diff --git a/dist/index.html b/dist/index.html index fe70fd073ebb17ee1ff2669055259042a6e1582a..aa13d753fcfbf0cfa85178d96efdd453f7410c7b 100644 --- a/dist/index.html +++ b/dist/index.html @@ -15,6 +15,6 @@ <img src="assets/spinner.gif"/> </div> </app-root> -<script src="runtime-es2015.1a02c9460fb9ddda5582.js" type="module"></script><script src="runtime-es5.1a02c9460fb9ddda5582.js" nomodule defer></script><script src="polyfills-es5.75b6ffa131ed9d18e439.js" nomodule defer></script><script src="polyfills-es2015.a3390f1652700a53f04b.js" type="module"></script><script src="scripts.3f995a62571f9f668311.js" defer></script><script src="main-es2015.a2812dd763af01c1f025.js" type="module"></script><script src="main-es5.a2812dd763af01c1f025.js" nomodule defer></script></body> +<script src="runtime-es2015.1a02c9460fb9ddda5582.js" type="module"></script><script src="runtime-es5.1a02c9460fb9ddda5582.js" nomodule defer></script><script src="polyfills-es5.75b6ffa131ed9d18e439.js" nomodule defer></script><script src="polyfills-es2015.a3390f1652700a53f04b.js" type="module"></script><script src="scripts.3f995a62571f9f668311.js" defer></script><script src="main-es2015.ca1394e9c1df11821f07.js" type="module"></script><script src="main-es5.ca1394e9c1df11821f07.js" nomodule defer></script></body> </html> \ No newline at end of file diff --git a/dist/main-es2015.a2812dd763af01c1f025.js b/dist/main-es2015.ca1394e9c1df11821f07.js similarity index 99% rename from dist/main-es2015.a2812dd763af01c1f025.js rename to dist/main-es2015.ca1394e9c1df11821f07.js index 441bede7dd02c6480be4083c1dfc5ffd483fadea..2e0c94380af403a58e4fd32f2c0a24df11c55c78 100644 --- a/dist/main-es2015.a2812dd763af01c1f025.js +++ b/dist/main-es2015.ca1394e9c1df11821f07.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{"+0xr":function(t,e,i){"use strict";i.d(e,"a",(function(){return It})),i.d(e,"b",(function(){return gt})),i.d(e,"c",(function(){return Ot})),i.d(e,"d",(function(){return kt})),i.d(e,"e",(function(){return xt})),i.d(e,"f",(function(){return Lt})),i.d(e,"g",(function(){return jt})),i.d(e,"h",(function(){return wt})),i.d(e,"i",(function(){return _t})),i.d(e,"j",(function(){return Et})),i.d(e,"k",(function(){return Vt})),i.d(e,"l",(function(){return Bt})),i.d(e,"m",(function(){return Nt})),i.d(e,"n",(function(){return Wt})),i.d(e,"o",(function(){return ft})),i.d(e,"p",(function(){return Xt})),i.d(e,"q",(function(){return Gt})),i.d(e,"r",(function(){return $t}));var n=i("8LU1"),a=i("0EQZ"),s=i("fXoL"),o=i("cH1L"),r=i("nLfN"),c=i("ofXK"),l=i("XNiG"),d=i("Cfvw"),h=i("2Vo4"),u=i("7+OI"),p=i("LRne"),b=i("1G5W"),f=i("IzEk"),m=i("vxfF");const g=[[["caption"]],[["colgroup"],["col"]]],v=["caption","colgroup, col"];function _(t,e){if(1&t&&(s.Wb(0,"th",3),s.Qc(1),s.Vb()),2&t){const t=s.hc();s.Lc("text-align",t.justify),s.Db(1),s.Sc(" ",t.headerText," ")}}function y(t,e){if(1&t&&(s.Wb(0,"td",4),s.Qc(1),s.Vb()),2&t){const t=e.$implicit,i=s.hc();s.Lc("text-align",i.justify),s.Db(1),s.Sc(" ",i.dataAccessor(t,i.name)," ")}}function x(t){return class extends t{constructor(...t){super(...t),this._sticky=!1,this._hasStickyChanged=!1}get sticky(){return this._sticky}set sticky(t){const e=this._sticky;this._sticky=Object(n.c)(t),this._hasStickyChanged=e!==this._sticky}hasStickyChanged(){const t=this._hasStickyChanged;return this._hasStickyChanged=!1,t}resetStickyChanged(){this._hasStickyChanged=!1}}}const C=new s.s("CDK_TABLE"),O=new s.s("text-column-options");let D=(()=>{class t{constructor(t){this.template=t}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.P))},t.\u0275dir=s.Lb({type:t,selectors:[["","cdkCellDef",""]]}),t})(),w=(()=>{class t{constructor(t){this.template=t}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.P))},t.\u0275dir=s.Lb({type:t,selectors:[["","cdkHeaderCellDef",""]]}),t})(),M=(()=>{class t{constructor(t){this.template=t}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.P))},t.\u0275dir=s.Lb({type:t,selectors:[["","cdkFooterCellDef",""]]}),t})();class k{}const S=x(k);let I=(()=>{class t extends S{constructor(t){super(),this._table=t,this._stickyEnd=!1}get name(){return this._name}set name(t){this._setNameInput(t)}get stickyEnd(){return this._stickyEnd}set stickyEnd(t){const e=this._stickyEnd;this._stickyEnd=Object(n.c)(t),this._hasStickyChanged=e!==this._stickyEnd}_updateColumnCssClassName(){this._columnCssClassName=["cdk-column-"+this.cssClassFriendlyName]}_setNameInput(t){t&&(this._name=t,this.cssClassFriendlyName=t.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName())}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(C,8))},t.\u0275dir=s.Lb({type:t,selectors:[["","cdkColumnDef",""]],contentQueries:function(t,e,i){var n;1&t&&(s.Jb(i,D,!0),s.Jb(i,w,!0),s.Jb(i,M,!0)),2&t&&(s.yc(n=s.ec())&&(e.cell=n.first),s.yc(n=s.ec())&&(e.headerCell=n.first),s.yc(n=s.ec())&&(e.footerCell=n.first))},inputs:{sticky:"sticky",name:["cdkColumnDef","name"],stickyEnd:"stickyEnd"},features:[s.Cb([{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:t}]),s.Ab]}),t})();class P{constructor(t,e){const i=e.nativeElement.classList;for(const n of t._columnCssClassName)i.add(n)}}let V=(()=>{class t extends P{constructor(t,e){super(t,e)}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(I),s.Qb(s.l))},t.\u0275dir=s.Lb({type:t,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],features:[s.Ab]}),t})(),R=(()=>{class t extends P{constructor(t,e){super(t,e)}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(I),s.Qb(s.l))},t.\u0275dir=s.Lb({type:t,selectors:[["cdk-footer-cell"],["td","cdk-footer-cell",""]],hostAttrs:["role","gridcell",1,"cdk-footer-cell"],features:[s.Ab]}),t})(),j=(()=>{class t extends P{constructor(t,e){super(t,e)}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(I),s.Qb(s.l))},t.\u0275dir=s.Lb({type:t,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:["role","gridcell",1,"cdk-cell"],features:[s.Ab]}),t})();class A{constructor(){this.tasks=[],this.endTasks=[]}}const W=new s.s("_COALESCED_STYLE_SCHEDULER");let T=(()=>{class t{constructor(t){this._ngZone=t,this._currentSchedule=null,this._destroyed=new l.a}schedule(t){this._createScheduleIfNeeded(),this._currentSchedule.tasks.push(t)}scheduleEnd(t){this._createScheduleIfNeeded(),this._currentSchedule.endTasks.push(t)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_createScheduleIfNeeded(){this._currentSchedule||(this._currentSchedule=new A,this._getScheduleObservable().pipe(Object(b.a)(this._destroyed)).subscribe(()=>{for(;this._currentSchedule.tasks.length||this._currentSchedule.endTasks.length;){const t=this._currentSchedule;this._currentSchedule=new A;for(const e of t.tasks)e();for(const e of t.endTasks)e()}this._currentSchedule=null}))}_getScheduleObservable(){return this._ngZone.isStable?Object(d.a)(Promise.resolve(void 0)):this._ngZone.onStable.pipe(Object(f.a)(1))}}return t.\u0275fac=function(e){return new(e||t)(s.ac(s.C))},t.\u0275prov=s.Mb({token:t,factory:t.\u0275fac}),t})(),E=(()=>{class t{constructor(t,e){this.template=t,this._differs=e}ngOnChanges(t){if(!this._columnsDiffer){const e=t.columns&&t.columns.currentValue||[];this._columnsDiffer=this._differs.find(e).create(),this._columnsDiffer.diff(e)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(t){return this instanceof Q?t.headerCell.template:this instanceof B?t.footerCell.template:t.cell.template}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.P),s.Qb(s.v))},t.\u0275dir=s.Lb({type:t,features:[s.Bb]}),t})();class F extends E{}const L=x(F);let Q=(()=>{class t extends L{constructor(t,e,i){super(t,e),this._table=i}ngOnChanges(t){super.ngOnChanges(t)}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.P),s.Qb(s.v),s.Qb(C,8))},t.\u0275dir=s.Lb({type:t,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:["cdkHeaderRowDef","columns"],sticky:["cdkHeaderRowDefSticky","sticky"]},features:[s.Ab,s.Bb]}),t})();class N extends E{}const z=x(N);let B=(()=>{class t extends z{constructor(t,e,i){super(t,e),this._table=i}ngOnChanges(t){super.ngOnChanges(t)}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.P),s.Qb(s.v),s.Qb(C,8))},t.\u0275dir=s.Lb({type:t,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:["cdkFooterRowDef","columns"],sticky:["cdkFooterRowDefSticky","sticky"]},features:[s.Ab,s.Bb]}),t})(),U=(()=>{class t extends E{constructor(t,e,i){super(t,e),this._table=i}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.P),s.Qb(s.v),s.Qb(C,8))},t.\u0275dir=s.Lb({type:t,selectors:[["","cdkRowDef",""]],inputs:{columns:["cdkRowDefColumns","columns"],when:["cdkRowDefWhen","when"]},features:[s.Ab]}),t})(),$=(()=>{class t{constructor(e){this._viewContainer=e,t.mostRecentCellOutlet=this}ngOnDestroy(){t.mostRecentCellOutlet===this&&(t.mostRecentCellOutlet=null)}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.T))},t.\u0275dir=s.Lb({type:t,selectors:[["","cdkCellOutlet",""]]}),t.mostRecentCellOutlet=null,t})(),H=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=s.Kb({type:t,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,e){1&t&&s.Sb(0,0)},directives:[$],encapsulation:2}),t})(),G=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=s.Kb({type:t,selectors:[["cdk-footer-row"],["tr","cdk-footer-row",""]],hostAttrs:["role","row",1,"cdk-footer-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,e){1&t&&s.Sb(0,0)},directives:[$],encapsulation:2}),t})(),X=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=s.Kb({type:t,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,e){1&t&&s.Sb(0,0)},directives:[$],encapsulation:2}),t})(),q=(()=>{class t{constructor(t){this.templateRef=t}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.P))},t.\u0275dir=s.Lb({type:t,selectors:[["ng-template","cdkNoDataRow",""]]}),t})();const K=["top","bottom","left","right"];class Y{constructor(t,e,i,n,a=!0,s=!0){this._isNativeHtmlTable=t,this._stickCellCss=e,this.direction=i,this._coalescedStyleScheduler=n,this._isBrowser=a,this._needsPositionStickyOnElement=s}clearStickyPositioning(t,e){const i=[];for(const n of t)if(n.nodeType===n.ELEMENT_NODE){i.push(n);for(let t=0;t<n.children.length;t++)i.push(n.children[t])}this._scheduleStyleChanges(()=>{for(const t of i)this._removeStickyStyle(t,e)})}updateStickyColumns(t,e,i){if(!t.length||!this._isBrowser||!e.some(t=>t)&&!i.some(t=>t))return;const n=t[0],a=n.children.length,s=this._getCellWidths(n),o=this._getStickyStartColumnPositions(s,e),r=this._getStickyEndColumnPositions(s,i);this._scheduleStyleChanges(()=>{const n="rtl"===this.direction,s=n?"right":"left",c=n?"left":"right";for(const l of t)for(let t=0;t<a;t++){const n=l.children[t];e[t]&&this._addStickyStyle(n,s,o[t]),i[t]&&this._addStickyStyle(n,c,r[t])}})}stickRows(t,e,i){if(!this._isBrowser)return;const n="bottom"===i?t.slice().reverse():t,a="bottom"===i?e.slice().reverse():e,s=[],o=[];for(let r=0,c=0;r<n.length;r++){if(s[r]=c,!a[r])continue;const t=n[r];o[r]=this._isNativeHtmlTable?Array.from(t.children):[t],r!==n.length-1&&(c+=t.getBoundingClientRect().height)}this._scheduleStyleChanges(()=>{for(let t=0;t<n.length;t++){if(!a[t])continue;const e=s[t];for(const n of o[t])this._addStickyStyle(n,i,e)}})}updateStickyFooterContainer(t,e){if(!this._isNativeHtmlTable)return;const i=t.querySelector("tfoot");this._scheduleStyleChanges(()=>{e.some(t=>!t)?this._removeStickyStyle(i,["bottom"]):this._addStickyStyle(i,"bottom",0)})}_removeStickyStyle(t,e){for(const i of e)t.style[i]="";K.some(i=>-1===e.indexOf(i)&&t.style[i])?t.style.zIndex=this._getCalculatedZIndex(t):(t.style.zIndex="",this._needsPositionStickyOnElement&&(t.style.position=""),t.classList.remove(this._stickCellCss))}_addStickyStyle(t,e,i){t.classList.add(this._stickCellCss),t.style[e]=i+"px",t.style.zIndex=this._getCalculatedZIndex(t),this._needsPositionStickyOnElement&&(t.style.cssText+="position: -webkit-sticky; position: sticky; ")}_getCalculatedZIndex(t){const e={top:100,bottom:10,left:1,right:1};let i=0;for(const n of K)t.style[n]&&(i+=e[n]);return i?""+i:""}_getCellWidths(t){const e=[],i=t.children;for(let n=0;n<i.length;n++)e.push(i[n].getBoundingClientRect().width);return e}_getStickyStartColumnPositions(t,e){const i=[];let n=0;for(let a=0;a<t.length;a++)e[a]&&(i[a]=n,n+=t[a]);return i}_getStickyEndColumnPositions(t,e){const i=[];let n=0;for(let a=t.length;a>0;a--)e[a]&&(i[a]=n,n+=t[a]);return i}_scheduleStyleChanges(t){this._coalescedStyleScheduler?this._coalescedStyleScheduler.schedule(t):t()}}let J=(()=>{class t{constructor(t,e){this.viewContainer=t,this.elementRef=e}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.T),s.Qb(s.l))},t.\u0275dir=s.Lb({type:t,selectors:[["","rowOutlet",""]]}),t})(),Z=(()=>{class t{constructor(t,e){this.viewContainer=t,this.elementRef=e}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.T),s.Qb(s.l))},t.\u0275dir=s.Lb({type:t,selectors:[["","headerRowOutlet",""]]}),t})(),tt=(()=>{class t{constructor(t,e){this.viewContainer=t,this.elementRef=e}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.T),s.Qb(s.l))},t.\u0275dir=s.Lb({type:t,selectors:[["","footerRowOutlet",""]]}),t})(),et=(()=>{class t{constructor(t,e){this.viewContainer=t,this.elementRef=e}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.T),s.Qb(s.l))},t.\u0275dir=s.Lb({type:t,selectors:[["","noDataRowOutlet",""]]}),t})(),it=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this._differs=t,this._changeDetectorRef=e,this._elementRef=i,this._dir=a,this._platform=o,this._viewRepeater=r,this._coalescedStyleScheduler=c,this._onDestroy=new l.a,this._columnDefsByName=new Map,this._customColumnDefs=new Set,this._customRowDefs=new Set,this._customHeaderRowDefs=new Set,this._customFooterRowDefs=new Set,this._headerRowDefChanged=!0,this._footerRowDefChanged=!0,this._cachedRenderRowsMap=new Map,this.stickyCssClass="cdk-table-sticky",this.needsPositionStickyOnElement=!0,this._isShowingNoDataRow=!1,this._multiTemplateDataRows=!1,this.viewChange=new h.a({start:0,end:Number.MAX_VALUE}),n||this._elementRef.nativeElement.setAttribute("role","grid"),this._document=s,this._isNativeHtmlTable="TABLE"===this._elementRef.nativeElement.nodeName}get trackBy(){return this._trackByFn}set trackBy(t){this._trackByFn=t}get dataSource(){return this._dataSource}set dataSource(t){this._dataSource!==t&&this._switchDataSource(t)}get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(t){this._multiTemplateDataRows=Object(n.c)(t),this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles())}ngOnInit(){this._setupStickyStyler(),this._isNativeHtmlTable&&this._applyNativeTableSections(),this._dataDiffer=this._differs.find([]).create((t,e)=>this.trackBy?this.trackBy(e.dataIndex,e.data):e)}ngAfterContentChecked(){this._cacheRowDefs(),this._cacheColumnDefs();const t=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():t&&this.updateStickyColumnStyles(),this._checkStickyStates()}ngOnDestroy(){this._rowOutlet.viewContainer.clear(),this._noDataRowOutlet.viewContainer.clear(),this._headerRowOutlet.viewContainer.clear(),this._footerRowOutlet.viewContainer.clear(),this._cachedRenderRowsMap.clear(),this._onDestroy.next(),this._onDestroy.complete(),Object(a.h)(this.dataSource)&&this.dataSource.disconnect(this)}renderRows(){this._renderRows=this._getAllRenderRows();const t=this._dataDiffer.diff(this._renderRows);if(!t)return void this._updateNoDataRow();const e=this._rowOutlet.viewContainer;this._viewRepeater?this._viewRepeater.applyChanges(t,e,(t,e,i)=>this._getEmbeddedViewArgs(t.item,i),t=>t.item.data,t=>{1===t.operation&&t.context&&this._renderCellTemplateForItem(t.record.item.rowDef,t.context)}):t.forEachOperation((t,i,n)=>{if(null==t.previousIndex){const e=t.item;this._renderRow(this._rowOutlet,e.rowDef,n,{$implicit:e.data})}else if(null==n)e.remove(i);else{const t=e.get(i);e.move(t,n)}}),this._updateRowIndexContext(),t.forEachIdentityChange(t=>{e.get(t.currentIndex).context.$implicit=t.item.data}),this._updateNoDataRow(),this.updateStickyColumnStyles()}addColumnDef(t){this._customColumnDefs.add(t)}removeColumnDef(t){this._customColumnDefs.delete(t)}addRowDef(t){this._customRowDefs.add(t)}removeRowDef(t){this._customRowDefs.delete(t)}addHeaderRowDef(t){this._customHeaderRowDefs.add(t),this._headerRowDefChanged=!0}removeHeaderRowDef(t){this._customHeaderRowDefs.delete(t),this._headerRowDefChanged=!0}addFooterRowDef(t){this._customFooterRowDefs.add(t),this._footerRowDefChanged=!0}removeFooterRowDef(t){this._customFooterRowDefs.delete(t),this._footerRowDefChanged=!0}updateStickyHeaderRowStyles(){const t=this._getRenderedRows(this._headerRowOutlet),e=this._elementRef.nativeElement.querySelector("thead");e&&(e.style.display=t.length?"":"none");const i=this._headerRowDefs.map(t=>t.sticky);this._stickyStyler.clearStickyPositioning(t,["top"]),this._stickyStyler.stickRows(t,i,"top"),this._headerRowDefs.forEach(t=>t.resetStickyChanged())}updateStickyFooterRowStyles(){const t=this._getRenderedRows(this._footerRowOutlet),e=this._elementRef.nativeElement.querySelector("tfoot");e&&(e.style.display=t.length?"":"none");const i=this._footerRowDefs.map(t=>t.sticky);this._stickyStyler.clearStickyPositioning(t,["bottom"]),this._stickyStyler.stickRows(t,i,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,i),this._footerRowDefs.forEach(t=>t.resetStickyChanged())}updateStickyColumnStyles(){const t=this._getRenderedRows(this._headerRowOutlet),e=this._getRenderedRows(this._rowOutlet),i=this._getRenderedRows(this._footerRowOutlet);this._stickyStyler.clearStickyPositioning([...t,...e,...i],["left","right"]),t.forEach((t,e)=>{this._addStickyColumnStyles([t],this._headerRowDefs[e])}),this._rowDefs.forEach(t=>{const i=[];for(let n=0;n<e.length;n++)this._renderRows[n].rowDef===t&&i.push(e[n]);this._addStickyColumnStyles(i,t)}),i.forEach((t,e)=>{this._addStickyColumnStyles([t],this._footerRowDefs[e])}),Array.from(this._columnDefsByName.values()).forEach(t=>t.resetStickyChanged())}_getAllRenderRows(){const t=[],e=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let i=0;i<this._data.length;i++){let n=this._data[i];const a=this._getRenderRowsForData(n,i,e.get(n));this._cachedRenderRowsMap.has(n)||this._cachedRenderRowsMap.set(n,new WeakMap);for(let e=0;e<a.length;e++){let i=a[e];const n=this._cachedRenderRowsMap.get(i.data);n.has(i.rowDef)?n.get(i.rowDef).push(i):n.set(i.rowDef,[i]),t.push(i)}}return t}_getRenderRowsForData(t,e,i){return this._getRowDefs(t,e).map(n=>{const a=i&&i.has(n)?i.get(n):[];if(a.length){const t=a.shift();return t.dataIndex=e,t}return{data:t,rowDef:n,dataIndex:e}})}_cacheColumnDefs(){this._columnDefsByName.clear(),nt(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(t=>{this._columnDefsByName.has(t.name),this._columnDefsByName.set(t.name,t)})}_cacheRowDefs(){this._headerRowDefs=nt(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=nt(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=nt(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);const t=this._rowDefs.filter(t=>!t.when);this._defaultRowDef=t[0]}_renderUpdatedColumns(){const t=(t,e)=>t||!!e.getColumnsDiff(),e=this._rowDefs.reduce(t,!1);e&&this._forceRenderDataRows();const i=this._headerRowDefs.reduce(t,!1);i&&this._forceRenderHeaderRows();const n=this._footerRowDefs.reduce(t,!1);return n&&this._forceRenderFooterRows(),e||i||n}_switchDataSource(t){this._data=[],Object(a.h)(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),t||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear()),this._dataSource=t}_observeRenderChanges(){if(!this.dataSource)return;let t;Object(a.h)(this.dataSource)?t=this.dataSource.connect(this):Object(u.a)(this.dataSource)?t=this.dataSource:Array.isArray(this.dataSource)&&(t=Object(p.a)(this.dataSource)),this._renderChangeSubscription=t.pipe(Object(b.a)(this._onDestroy)).subscribe(t=>{this._data=t||[],this.renderRows()})}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((t,e)=>this._renderRow(this._headerRowOutlet,t,e)),this.updateStickyHeaderRowStyles()}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((t,e)=>this._renderRow(this._footerRowOutlet,t,e)),this.updateStickyFooterRowStyles()}_addStickyColumnStyles(t,e){const i=Array.from(e.columns||[]).map(t=>this._columnDefsByName.get(t)),n=i.map(t=>t.sticky),a=i.map(t=>t.stickyEnd);this._stickyStyler.updateStickyColumns(t,n,a)}_getRenderedRows(t){const e=[];for(let i=0;i<t.viewContainer.length;i++){const n=t.viewContainer.get(i);e.push(n.rootNodes[0])}return e}_getRowDefs(t,e){if(1==this._rowDefs.length)return[this._rowDefs[0]];let i=[];if(this.multiTemplateDataRows)i=this._rowDefs.filter(i=>!i.when||i.when(e,t));else{let n=this._rowDefs.find(i=>i.when&&i.when(e,t))||this._defaultRowDef;n&&i.push(n)}return i}_getEmbeddedViewArgs(t,e){return{templateRef:t.rowDef.template,context:{$implicit:t.data},index:e}}_renderRow(t,e,i,n={}){const a=t.viewContainer.createEmbeddedView(e.template,n,i);return this._renderCellTemplateForItem(e,n),a}_renderCellTemplateForItem(t,e){for(let i of this._getCellTemplates(t))$.mostRecentCellOutlet&&$.mostRecentCellOutlet._viewContainer.createEmbeddedView(i,e);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){const t=this._rowOutlet.viewContainer;for(let e=0,i=t.length;e<i;e++){const n=t.get(e).context;n.count=i,n.first=0===e,n.last=e===i-1,n.even=e%2==0,n.odd=!n.even,this.multiTemplateDataRows?(n.dataIndex=this._renderRows[e].dataIndex,n.renderIndex=e):n.index=this._renderRows[e].dataIndex}}_getCellTemplates(t){return t&&t.columns?Array.from(t.columns,e=>{const i=this._columnDefsByName.get(e);return t.extractCellTemplate(i)}):[]}_applyNativeTableSections(){const t=this._document.createDocumentFragment(),e=[{tag:"thead",outlets:[this._headerRowOutlet]},{tag:"tbody",outlets:[this._rowOutlet,this._noDataRowOutlet]},{tag:"tfoot",outlets:[this._footerRowOutlet]}];for(const i of e){const e=this._document.createElement(i.tag);e.setAttribute("role","rowgroup");for(const t of i.outlets)e.appendChild(t.elementRef.nativeElement);t.appendChild(e)}this._elementRef.nativeElement.appendChild(t)}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){const t=(t,e)=>t||e.hasStickyChanged();this._headerRowDefs.reduce(t,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(t,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(t,!1)&&this.updateStickyColumnStyles()}_setupStickyStyler(){this._stickyStyler=new Y(this._isNativeHtmlTable,this.stickyCssClass,this._dir?this._dir.value:"ltr",this._coalescedStyleScheduler,this._platform.isBrowser,this.needsPositionStickyOnElement),(this._dir?this._dir.change:Object(p.a)()).pipe(Object(b.a)(this._onDestroy)).subscribe(t=>{this._stickyStyler.direction=t,this.updateStickyColumnStyles()})}_getOwnDefs(t){return t.filter(t=>!t._table||t._table===this)}_updateNoDataRow(){if(this._noDataRow){const t=0===this._rowOutlet.viewContainer.length;if(t!==this._isShowingNoDataRow){const e=this._noDataRowOutlet.viewContainer;t?e.createEmbeddedView(this._noDataRow.templateRef):e.clear(),this._isShowingNoDataRow=t}}}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.v),s.Qb(s.h),s.Qb(s.l),s.bc("role"),s.Qb(o.c,8),s.Qb(c.e),s.Qb(r.a),s.Qb(a.g,8),s.Qb(W,8))},t.\u0275cmp=s.Kb({type:t,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(t,e,i){var n;1&t&&(s.Jb(i,q,!0),s.Jb(i,I,!0),s.Jb(i,U,!0),s.Jb(i,Q,!0),s.Jb(i,B,!0)),2&t&&(s.yc(n=s.ec())&&(e._noDataRow=n.first),s.yc(n=s.ec())&&(e._contentColumnDefs=n),s.yc(n=s.ec())&&(e._contentRowDefs=n),s.yc(n=s.ec())&&(e._contentHeaderRowDefs=n),s.yc(n=s.ec())&&(e._contentFooterRowDefs=n))},viewQuery:function(t,e){var i;1&t&&(s.Kc(J,!0),s.Kc(Z,!0),s.Kc(tt,!0),s.Kc(et,!0)),2&t&&(s.yc(i=s.ec())&&(e._rowOutlet=i.first),s.yc(i=s.ec())&&(e._headerRowOutlet=i.first),s.yc(i=s.ec())&&(e._footerRowOutlet=i.first),s.yc(i=s.ec())&&(e._noDataRowOutlet=i.first))},hostAttrs:[1,"cdk-table"],inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:"multiTemplateDataRows"},exportAs:["cdkTable"],features:[s.Cb([{provide:C,useExisting:t},{provide:a.g,useClass:a.e},{provide:W,useClass:T}])],ngContentSelectors:v,decls:6,vars:0,consts:[["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,e){1&t&&(s.nc(g),s.mc(0),s.mc(1,1),s.Sb(2,0),s.Sb(3,1),s.Sb(4,2),s.Sb(5,3))},directives:[Z,J,et,tt],encapsulation:2}),t})();function nt(t,e){return t.concat(Array.from(e))}let at=(()=>{class t{constructor(t,e){this._table=t,this._options=e,this.justify="start",this._options=e||{}}get name(){return this._name}set name(t){this._name=t,this._syncColumnDefName()}ngOnInit(){this._syncColumnDefName(),void 0===this.headerText&&(this.headerText=this._createDefaultHeaderText()),this.dataAccessor||(this.dataAccessor=this._options.defaultDataAccessor||((t,e)=>t[e])),this._table&&(this.columnDef.cell=this.cell,this.columnDef.headerCell=this.headerCell,this._table.addColumnDef(this.columnDef))}ngOnDestroy(){this._table&&this._table.removeColumnDef(this.columnDef)}_createDefaultHeaderText(){const t=this.name;return this._options&&this._options.defaultHeaderTextTransform?this._options.defaultHeaderTextTransform(t):t[0].toUpperCase()+t.slice(1)}_syncColumnDefName(){this.columnDef&&(this.columnDef.name=this.name)}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(it,8),s.Qb(O,8))},t.\u0275cmp=s.Kb({type:t,selectors:[["cdk-text-column"]],viewQuery:function(t,e){var i;1&t&&(s.Kc(I,!0),s.Kc(D,!0),s.Kc(w,!0)),2&t&&(s.yc(i=s.ec())&&(e.columnDef=i.first),s.yc(i=s.ec())&&(e.cell=i.first),s.yc(i=s.ec())&&(e.headerCell=i.first))},inputs:{justify:"justify",name:"name",headerText:"headerText",dataAccessor:"dataAccessor"},decls:3,vars:0,consts:[["cdkColumnDef",""],["cdk-header-cell","",3,"text-align",4,"cdkHeaderCellDef"],["cdk-cell","",3,"text-align",4,"cdkCellDef"],["cdk-header-cell",""],["cdk-cell",""]],template:function(t,e){1&t&&(s.Ub(0,0),s.Oc(1,_,2,3,"th",1),s.Oc(2,y,2,3,"td",2),s.Tb())},directives:[I,w,D,V,j],encapsulation:2}),t})(),st=(()=>{class t{}return t.\u0275mod=s.Ob({type:t}),t.\u0275inj=s.Nb({factory:function(e){return new(e||t)},imports:[[m.g]]}),t})();var ot=i("FKr1"),rt=i("quSY"),ct=i("VRyK"),lt=i("itXk"),dt=i("lJxs");const ht=[[["caption"]],[["colgroup"],["col"]]],ut=["caption","colgroup, col"];function pt(t,e){if(1&t&&(s.Wb(0,"th",3),s.Qc(1),s.Vb()),2&t){const t=s.hc();s.Lc("text-align",t.justify),s.Db(1),s.Sc(" ",t.headerText," ")}}function bt(t,e){if(1&t&&(s.Wb(0,"td",4),s.Qc(1),s.Vb()),2&t){const t=e.$implicit,i=s.hc();s.Lc("text-align",i.justify),s.Db(1),s.Sc(" ",i.dataAccessor(t,i.name)," ")}}let ft=(()=>{class t extends it{constructor(){super(...arguments),this.stickyCssClass="mat-table-sticky",this.needsPositionStickyOnElement=!1}}return t.\u0275fac=function(e){return mt(e||t)},t.\u0275cmp=s.Kb({type:t,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-table"],exportAs:["matTable"],features:[s.Cb([{provide:a.g,useClass:a.e},{provide:it,useExisting:t},{provide:C,useExisting:t},{provide:W,useClass:T}]),s.Ab],ngContentSelectors:ut,decls:6,vars:0,consts:[["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,e){1&t&&(s.nc(ht),s.mc(0),s.mc(1,1),s.Sb(2,0),s.Sb(3,1),s.Sb(4,2),s.Sb(5,3))},directives:[Z,J,et,tt],styles:['mat-table{display:block}mat-header-row{min-height:56px}mat-row,mat-footer-row{min-height:48px}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-row::after,mat-header-row::after,mat-footer-row::after{display:inline-block;min-height:inherit;content:""}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}table.mat-table{border-spacing:0}tr.mat-header-row{height:56px}tr.mat-row,tr.mat-footer-row{height:48px}th.mat-header-cell{text-align:left}[dir=rtl] th.mat-header-cell{text-align:right}th.mat-header-cell,td.mat-cell,td.mat-footer-cell{padding:0;border-bottom-width:1px;border-bottom-style:solid}th.mat-header-cell:first-of-type,td.mat-cell:first-of-type,td.mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] th.mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] td.mat-cell:first-of-type:not(:only-of-type),[dir=rtl] td.mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}th.mat-header-cell:last-of-type,td.mat-cell:last-of-type,td.mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] th.mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] td.mat-cell:last-of-type:not(:only-of-type),[dir=rtl] td.mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}.mat-table-sticky{position:-webkit-sticky;position:sticky}\n'],encapsulation:2}),t})();const mt=s.Yb(ft);let gt=(()=>{class t extends D{}return t.\u0275fac=function(e){return vt(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","matCellDef",""]],features:[s.Cb([{provide:D,useExisting:t}]),s.Ab]}),t})();const vt=s.Yb(gt);let _t=(()=>{class t extends w{}return t.\u0275fac=function(e){return yt(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","matHeaderCellDef",""]],features:[s.Cb([{provide:w,useExisting:t}]),s.Ab]}),t})();const yt=s.Yb(_t);let xt=(()=>{class t extends M{}return t.\u0275fac=function(e){return Ct(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","matFooterCellDef",""]],features:[s.Cb([{provide:M,useExisting:t}]),s.Ab]}),t})();const Ct=s.Yb(xt);let Ot=(()=>{class t extends I{get name(){return this._name}set name(t){this._setNameInput(t)}_updateColumnCssClassName(){super._updateColumnCssClassName(),this._columnCssClassName.push("mat-column-"+this.cssClassFriendlyName)}}return t.\u0275fac=function(e){return Dt(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","matColumnDef",""]],inputs:{sticky:"sticky",name:["matColumnDef","name"]},features:[s.Cb([{provide:I,useExisting:t},{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:t}]),s.Ab]}),t})();const Dt=s.Yb(Ot);let wt=(()=>{class t extends V{}return t.\u0275fac=function(e){return Mt(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-header-cell"],features:[s.Ab]}),t})();const Mt=s.Yb(wt);let kt=(()=>{class t extends R{}return t.\u0275fac=function(e){return St(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["mat-footer-cell"],["td","mat-footer-cell",""]],hostAttrs:["role","gridcell",1,"mat-footer-cell"],features:[s.Ab]}),t})();const St=s.Yb(kt);let It=(()=>{class t extends j{}return t.\u0275fac=function(e){return Pt(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:["role","gridcell",1,"mat-cell"],features:[s.Ab]}),t})();const Pt=s.Yb(It);let Vt=(()=>{class t extends Q{}return t.\u0275fac=function(e){return Rt(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","matHeaderRowDef",""]],inputs:{columns:["matHeaderRowDef","columns"],sticky:["matHeaderRowDefSticky","sticky"]},features:[s.Cb([{provide:Q,useExisting:t}]),s.Ab]}),t})();const Rt=s.Yb(Vt);let jt=(()=>{class t extends B{}return t.\u0275fac=function(e){return At(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","matFooterRowDef",""]],inputs:{columns:["matFooterRowDef","columns"],sticky:["matFooterRowDefSticky","sticky"]},features:[s.Cb([{provide:B,useExisting:t}]),s.Ab]}),t})();const At=s.Yb(jt);let Wt=(()=>{class t extends U{}return t.\u0275fac=function(e){return Tt(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","matRowDef",""]],inputs:{columns:["matRowDefColumns","columns"],when:["matRowDefWhen","when"]},features:[s.Cb([{provide:U,useExisting:t}]),s.Ab]}),t})();const Tt=s.Yb(Wt);let Et=(()=>{class t extends H{}return t.\u0275fac=function(e){return Ft(e||t)},t.\u0275cmp=s.Kb({type:t,selectors:[["mat-header-row"],["tr","mat-header-row",""]],hostAttrs:["role","row",1,"mat-header-row"],exportAs:["matHeaderRow"],features:[s.Cb([{provide:H,useExisting:t}]),s.Ab],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,e){1&t&&s.Sb(0,0)},directives:[$],encapsulation:2}),t})();const Ft=s.Yb(Et);let Lt=(()=>{class t extends G{}return t.\u0275fac=function(e){return Qt(e||t)},t.\u0275cmp=s.Kb({type:t,selectors:[["mat-footer-row"],["tr","mat-footer-row",""]],hostAttrs:["role","row",1,"mat-footer-row"],exportAs:["matFooterRow"],features:[s.Cb([{provide:G,useExisting:t}]),s.Ab],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,e){1&t&&s.Sb(0,0)},directives:[$],encapsulation:2}),t})();const Qt=s.Yb(Lt);let Nt=(()=>{class t extends X{}return t.\u0275fac=function(e){return zt(e||t)},t.\u0275cmp=s.Kb({type:t,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-row"],exportAs:["matRow"],features:[s.Cb([{provide:X,useExisting:t}]),s.Ab],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,e){1&t&&s.Sb(0,0)},directives:[$],encapsulation:2}),t})();const zt=s.Yb(Nt);let Bt=(()=>{class t extends q{}return t.\u0275fac=function(e){return Ut(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["ng-template","matNoDataRow",""]],features:[s.Cb([{provide:q,useExisting:t}]),s.Ab]}),t})();const Ut=s.Yb(Bt);let $t=(()=>{class t extends at{}return t.\u0275fac=function(e){return Ht(e||t)},t.\u0275cmp=s.Kb({type:t,selectors:[["mat-text-column"]],features:[s.Ab],decls:3,vars:0,consts:[["matColumnDef",""],["mat-header-cell","",3,"text-align",4,"matHeaderCellDef"],["mat-cell","",3,"text-align",4,"matCellDef"],["mat-header-cell",""],["mat-cell",""]],template:function(t,e){1&t&&(s.Ub(0,0),s.Oc(1,pt,2,3,"th",1),s.Oc(2,bt,2,3,"td",2),s.Tb())},directives:[Ot,_t,gt,wt,It],encapsulation:2}),t})();const Ht=s.Yb($t);let Gt=(()=>{class t{}return t.\u0275mod=s.Ob({type:t}),t.\u0275inj=s.Nb({factory:function(e){return new(e||t)},imports:[[st,ot.k],ot.k]}),t})();class Xt extends a.b{constructor(t=[]){super(),this._renderData=new h.a([]),this._filter=new h.a(""),this._internalPageChanges=new l.a,this._renderChangesSubscription=rt.a.EMPTY,this.sortingDataAccessor=(t,e)=>{const i=t[e];if(Object(n.a)(i)){const t=Number(i);return t<9007199254740991?t:i}return i},this.sortData=(t,e)=>{const i=e.active,n=e.direction;return i&&""!=n?t.sort((t,e)=>{let a=this.sortingDataAccessor(t,i),s=this.sortingDataAccessor(e,i);const o=typeof a,r=typeof s;o!==r&&("number"===o&&(a+=""),"number"===r&&(s+=""));let c=0;return null!=a&&null!=s?a>s?c=1:a<s&&(c=-1):null!=a?c=1:null!=s&&(c=-1),c*("asc"==n?1:-1)}):t},this.filterPredicate=(t,e)=>{const i=Object.keys(t).reduce((e,i)=>e+t[i]+"\u25ec","").toLowerCase(),n=e.trim().toLowerCase();return-1!=i.indexOf(n)},this._data=new h.a(t),this._updateChangeSubscription()}get data(){return this._data.value}set data(t){this._data.next(t)}get filter(){return this._filter.value}set filter(t){this._filter.next(t)}get sort(){return this._sort}set sort(t){this._sort=t,this._updateChangeSubscription()}get paginator(){return this._paginator}set paginator(t){this._paginator=t,this._updateChangeSubscription()}_updateChangeSubscription(){const t=this._sort?Object(ct.a)(this._sort.sortChange,this._sort.initialized):Object(p.a)(null),e=this._paginator?Object(ct.a)(this._paginator.page,this._internalPageChanges,this._paginator.initialized):Object(p.a)(null),i=this._data,n=Object(lt.a)([i,this._filter]).pipe(Object(dt.a)(([t])=>this._filterData(t))),a=Object(lt.a)([n,t]).pipe(Object(dt.a)(([t])=>this._orderData(t))),s=Object(lt.a)([a,e]).pipe(Object(dt.a)(([t])=>this._pageData(t)));this._renderChangesSubscription.unsubscribe(),this._renderChangesSubscription=s.subscribe(t=>this._renderData.next(t))}_filterData(t){return this.filteredData=this.filter?t.filter(t=>this.filterPredicate(t,this.filter)):t,this.paginator&&this._updatePaginator(this.filteredData.length),this.filteredData}_orderData(t){return this.sort?this.sortData(t.slice(),this.sort):t}_pageData(t){if(!this.paginator)return t;const e=this.paginator.pageIndex*this.paginator.pageSize;return t.slice(e,e+this.paginator.pageSize)}_updatePaginator(t){Promise.resolve().then(()=>{const e=this.paginator;if(e&&(e.length=t,e.pageIndex>0)){const t=Math.ceil(e.length/e.pageSize)-1||0,i=Math.min(e.pageIndex,t);i!==e.pageIndex&&(e.pageIndex=i,this._internalPageChanges.next())}})}connect(){return this._renderData}disconnect(){}}},"+rOU":function(t,e,i){"use strict";i.d(e,"a",(function(){return l})),i.d(e,"b",(function(){return u})),i.d(e,"c",(function(){return p})),i.d(e,"d",(function(){return o})),i.d(e,"e",(function(){return h})),i.d(e,"f",(function(){return d})),i.d(e,"g",(function(){return b})),i.d(e,"h",(function(){return m})),i.d(e,"i",(function(){return r}));var n=i("fXoL"),a=i("ofXK");class s{attach(t){return this._attachedHost=t,t.attach(this)}detach(){let t=this._attachedHost;null!=t&&(this._attachedHost=null,t.detach())}get isAttached(){return null!=this._attachedHost}setAttachedHost(t){this._attachedHost=t}}class o extends s{constructor(t,e,i,n){super(),this.component=t,this.viewContainerRef=e,this.injector=i,this.componentFactoryResolver=n}}class r extends s{constructor(t,e,i){super(),this.templateRef=t,this.viewContainerRef=e,this.context=i}get origin(){return this.templateRef.elementRef}attach(t,e=this.context){return this.context=e,super.attach(t)}detach(){return this.context=void 0,super.detach()}}class c extends s{constructor(t){super(),this.element=t instanceof n.l?t.nativeElement:t}}class l{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(t){return t instanceof o?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof r?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof c?(this._attachedPortal=t,this.attachDomPortal(t)):void 0}detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(t){this._disposeFn=t}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}}class d extends l{constructor(t,e,i,n,a){super(),this.outletElement=t,this._componentFactoryResolver=e,this._appRef=i,this._defaultInjector=n,this.attachDomPortal=t=>{const e=t.element,i=this._document.createComment("dom-portal");e.parentNode.insertBefore(i,e),this.outletElement.appendChild(e),super.setDisposeFn(()=>{i.parentNode&&i.parentNode.replaceChild(e,i)})},this._document=a}attachComponentPortal(t){const e=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component);let i;return t.viewContainerRef?(i=t.viewContainerRef.createComponent(e,t.viewContainerRef.length,t.injector||t.viewContainerRef.injector),this.setDisposeFn(()=>i.destroy())):(i=e.create(t.injector||this._defaultInjector),this._appRef.attachView(i.hostView),this.setDisposeFn(()=>{this._appRef.detachView(i.hostView),i.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(i)),i}attachTemplatePortal(t){let e=t.viewContainerRef,i=e.createEmbeddedView(t.templateRef,t.context);return i.rootNodes.forEach(t=>this.outletElement.appendChild(t)),i.detectChanges(),this.setDisposeFn(()=>{let t=e.indexOf(i);-1!==t&&e.remove(t)}),i}dispose(){super.dispose(),null!=this.outletElement.parentNode&&this.outletElement.parentNode.removeChild(this.outletElement)}_getComponentRootNode(t){return t.hostView.rootNodes[0]}}class h extends d{}let u=(()=>{class t extends r{constructor(t,e){super(t,e)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.P),n.Qb(n.T))},t.\u0275dir=n.Lb({type:t,selectors:[["","cdkPortal",""]],exportAs:["cdkPortal"],features:[n.Ab]}),t})(),p=(()=>{class t extends l{constructor(t,e,i){super(),this._componentFactoryResolver=t,this._viewContainerRef=e,this._isInitialized=!1,this.attached=new n.o,this.attachDomPortal=t=>{const e=t.element,i=this._document.createComment("dom-portal");t.setAttachedHost(this),e.parentNode.insertBefore(i,e),this._getRootNode().appendChild(e),super.setDisposeFn(()=>{i.parentNode&&i.parentNode.replaceChild(e,i)})},this._document=i}get portal(){return this._attachedPortal}set portal(t){(!this.hasAttached()||t||this._isInitialized)&&(this.hasAttached()&&super.detach(),t&&super.attach(t),this._attachedPortal=t)}get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedPortal=null,this._attachedRef=null}attachComponentPortal(t){t.setAttachedHost(this);const e=null!=t.viewContainerRef?t.viewContainerRef:this._viewContainerRef,i=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component),n=e.createComponent(i,e.length,t.injector||e.injector);return e!==this._viewContainerRef&&this._getRootNode().appendChild(n.hostView.rootNodes[0]),super.setDisposeFn(()=>n.destroy()),this._attachedPortal=t,this._attachedRef=n,this.attached.emit(n),n}attachTemplatePortal(t){t.setAttachedHost(this);const e=this._viewContainerRef.createEmbeddedView(t.templateRef,t.context);return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=t,this._attachedRef=e,this.attached.emit(e),e}_getRootNode(){const t=this._viewContainerRef.element.nativeElement;return t.nodeType===t.ELEMENT_NODE?t:t.parentNode}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.j),n.Qb(n.T),n.Qb(a.e))},t.\u0275dir=n.Lb({type:t,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[n.Ab]}),t})(),b=(()=>{class t extends p{}return t.\u0275fac=function(e){return f(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["","cdkPortalHost",""],["","portalHost",""]],inputs:{portal:["cdkPortalHost","portal"]},exportAs:["cdkPortalHost"],features:[n.Cb([{provide:p,useExisting:t}]),n.Ab]}),t})();const f=n.Yb(b);let m=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)}}),t})()},"/1cH":function(t,e,i){"use strict";i.d(e,"a",(function(){return E})),i.d(e,"b",(function(){return X})),i.d(e,"c",(function(){return Q})),i.d(e,"d",(function(){return H}));var n=i("u47x"),a=i("8LU1"),s=i("fXoL"),o=i("FKr1"),r=i("quSY"),c=i("XNiG"),l=i("NXyV"),d=i("VRyK"),h=i("LRne"),u=i("xgIS"),p=i("ofXK"),b=i("rDax"),f=i("vxfF"),m=i("FtGj"),g=i("nLfN"),v=i("+rOU"),_=i("3Pt+"),y=i("kmnG"),x=i("IzEk"),C=i("eIep"),O=i("pLZG"),D=i("lJxs"),w=i("vkgz"),M=i("3E0/"),k=i("cH1L");const S=["panel"];function I(t,e){if(1&t&&(s.Wb(0,"div",0,1),s.mc(2),s.Vb()),2&t){const t=s.hc();s.oc("id",t.id)("ngClass",t._classList)}}const P=["*"];let V=0;class R{constructor(t,e){this.source=t,this.option=e}}class j{}const A=Object(o.B)(j),W=new s.s("mat-autocomplete-default-options",{providedIn:"root",factory:function(){return{autoActiveFirstOption:!1}}});let T=(()=>{class t extends A{constructor(t,e,i){super(),this._changeDetectorRef=t,this._elementRef=e,this._activeOptionChanges=r.a.EMPTY,this.showPanel=!1,this._isOpen=!1,this.displayWith=null,this.optionSelected=new s.o,this.opened=new s.o,this.closed=new s.o,this.optionActivated=new s.o,this._classList={},this.id="mat-autocomplete-"+V++,this._autoActiveFirstOption=!!i.autoActiveFirstOption}get isOpen(){return this._isOpen&&this.showPanel}get autoActiveFirstOption(){return this._autoActiveFirstOption}set autoActiveFirstOption(t){this._autoActiveFirstOption=Object(a.c)(t)}set classList(t){this._classList=t&&t.length?t.split(" ").reduce((t,e)=>(t[e.trim()]=!0,t),{}):{},this._setVisibilityClasses(this._classList),this._elementRef.nativeElement.className=""}ngAfterContentInit(){this._keyManager=new n.b(this.options).withWrap(),this._activeOptionChanges=this._keyManager.change.subscribe(t=>{this.optionActivated.emit({source:this,option:this.options.toArray()[t]||null})}),this._setVisibility()}ngOnDestroy(){this._activeOptionChanges.unsubscribe()}_setScrollTop(t){this.panel&&(this.panel.nativeElement.scrollTop=t)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options.length,this._setVisibilityClasses(this._classList),this._changeDetectorRef.markForCheck()}_emitSelectEvent(t){const e=new R(this,t);this.optionSelected.emit(e)}_setVisibilityClasses(t){t[this._visibleClass]=this.showPanel,t[this._hiddenClass]=!this.showPanel}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.h),s.Qb(s.l),s.Qb(W))},t.\u0275dir=s.Lb({type:t,viewQuery:function(t,e){var i;1&t&&(s.Kc(s.P,!0),s.Xc(S,!0)),2&t&&(s.yc(i=s.ec())&&(e.template=i.first),s.yc(i=s.ec())&&(e.panel=i.first))},inputs:{displayWith:"displayWith",autoActiveFirstOption:"autoActiveFirstOption",classList:["class","classList"],panelWidth:"panelWidth"},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},features:[s.Ab]}),t})(),E=(()=>{class t extends T{constructor(){super(...arguments),this._visibleClass="mat-autocomplete-visible",this._hiddenClass="mat-autocomplete-hidden"}}return t.\u0275fac=function(e){return F(e||t)},t.\u0275cmp=s.Kb({type:t,selectors:[["mat-autocomplete"]],contentQueries:function(t,e,i){var n;1&t&&(s.Jb(i,o.h,!0),s.Jb(i,o.p,!0)),2&t&&(s.yc(n=s.ec())&&(e.optionGroups=n),s.yc(n=s.ec())&&(e.options=n))},hostAttrs:[1,"mat-autocomplete"],inputs:{disableRipple:"disableRipple"},exportAs:["matAutocomplete"],features:[s.Cb([{provide:o.i,useExisting:t}]),s.Ab],ngContentSelectors:P,decls:1,vars:0,consts:[["role","listbox",1,"mat-autocomplete-panel",3,"id","ngClass"],["panel",""]],template:function(t,e){1&t&&(s.nc(),s.Oc(0,I,3,2,"ng-template"))},directives:[p.q],styles:[".mat-autocomplete-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;visibility:hidden;max-width:none;max-height:256px;position:relative;width:100%;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.mat-autocomplete-panel.mat-autocomplete-visible{visibility:visible}.mat-autocomplete-panel.mat-autocomplete-hidden{visibility:hidden}.mat-autocomplete-panel-above .mat-autocomplete-panel{border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px}.mat-autocomplete-panel .mat-divider-horizontal{margin-top:-1px}.cdk-high-contrast-active .mat-autocomplete-panel{outline:solid 1px}\n"],encapsulation:2,changeDetection:0}),t})();const F=s.Yb(E);let L=(()=>{class t{constructor(t){this.elementRef=t}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.l))},t.\u0275dir=s.Lb({type:t}),t})(),Q=(()=>{class t extends L{}return t.\u0275fac=function(e){return N(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","matAutocompleteOrigin",""]],exportAs:["matAutocompleteOrigin"],features:[s.Ab]}),t})();const N=s.Yb(Q),z=new s.s("mat-autocomplete-scroll-strategy"),B={provide:z,deps:[b.c],useFactory:function(t){return()=>t.scrollStrategies.reposition()}},U={provide:_.s,useExisting:Object(s.X)(()=>H),multi:!0};let $=(()=>{class t{constructor(t,e,i,n,a,s,o,h,u,p){this._element=t,this._overlay=e,this._viewContainerRef=i,this._zone=n,this._changeDetectorRef=a,this._dir=o,this._formField=h,this._document=u,this._viewportRuler=p,this._componentDestroyed=!1,this._autocompleteDisabled=!1,this._manuallyFloatingLabel=!1,this._viewportSubscription=r.a.EMPTY,this._canOpenOnNextFocus=!0,this._closeKeyEventStream=new c.a,this._windowBlurHandler=()=>{this._canOpenOnNextFocus=this._document.activeElement!==this._element.nativeElement||this.panelOpen},this._onChange=()=>{},this._onTouched=()=>{},this.position="auto",this.autocompleteAttribute="off",this._overlayAttached=!1,this.optionSelections=Object(l.a)(()=>this.autocomplete&&this.autocomplete.options?Object(d.a)(...this.autocomplete.options.map(t=>t.onSelectionChange)):this._zone.onStable.pipe(Object(x.a)(1),Object(C.a)(()=>this.optionSelections))),this._scrollStrategy=s}get autocompleteDisabled(){return this._autocompleteDisabled}set autocompleteDisabled(t){this._autocompleteDisabled=Object(a.c)(t)}ngAfterViewInit(){const t=this._getWindow();void 0!==t&&this._zone.runOutsideAngular(()=>t.addEventListener("blur",this._windowBlurHandler))}ngOnChanges(t){t.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){const t=this._getWindow();void 0!==t&&t.removeEventListener("blur",this._windowBlurHandler),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}openPanel(){this._attachOverlay(),this._floatLabel()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this.autocomplete.closed.emit(),this.autocomplete._isOpen=this._overlayAttached=!1,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._componentDestroyed||this._changeDetectorRef.detectChanges())}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return Object(d.a)(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(Object(O.a)(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(Object(O.a)(()=>this._overlayAttached)):Object(h.a)()).pipe(Object(D.a)(t=>t instanceof o.r?t:null))}get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return Object(d.a)(Object(u.a)(this._document,"click"),Object(u.a)(this._document,"touchend")).pipe(Object(O.a)(t=>{const e=this._isInsideShadowRoot&&t.composedPath?t.composedPath()[0]:t.target,i=this._formField?this._formField._elementRef.nativeElement:null,n=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;return this._overlayAttached&&e!==this._element.nativeElement&&(!i||!i.contains(e))&&(!n||!n.contains(e))&&!!this._overlayRef&&!this._overlayRef.overlayElement.contains(e)}))}writeValue(t){Promise.resolve(null).then(()=>this._setTriggerValue(t))}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this._element.nativeElement.disabled=t}_handleKeydown(t){const e=t.keyCode;if(e!==m.h||Object(m.v)(t)||t.preventDefault(),this.activeOption&&e===m.g&&this.panelOpen)this.activeOption._selectViaInteraction(),this._resetActiveItem(),t.preventDefault();else if(this.autocomplete){const i=this.autocomplete._keyManager.activeItem,n=e===m.s||e===m.e;this.panelOpen||e===m.r?this.autocomplete._keyManager.onKeydown(t):n&&this._canOpen()&&this.openPanel(),(n||this.autocomplete._keyManager.activeItem!==i)&&this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0)}}_handleInput(t){let e=t.target,i=e.value;"number"===e.type&&(i=""==i?null:parseFloat(i)),this._previousValue!==i&&(this._previousValue=i,this._onChange(i),this._canOpen()&&this._document.activeElement===t.target&&this.openPanel())}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_floatLabel(t=!1){this._formField&&"auto"===this._formField.floatLabel&&(t?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField.floatLabel="auto",this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){const t=this._zone.onStable.pipe(Object(x.a)(1)),e=this.autocomplete.options.changes.pipe(Object(w.a)(()=>this._positionStrategy.reapplyLastPosition()),Object(M.a)(0));return Object(d.a)(t,e).pipe(Object(C.a)(()=>{const t=this.panelOpen;return this._resetActiveItem(),this.autocomplete._setVisibility(),this.panelOpen&&(this._overlayRef.updatePosition(),t!==this.panelOpen&&this.autocomplete.opened.emit()),this.panelClosingActions}),Object(x.a)(1)).subscribe(t=>this._setValueAndClose(t))}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_setTriggerValue(t){const e=this.autocomplete&&this.autocomplete.displayWith?this.autocomplete.displayWith(t):t,i=null!=e?e:"";this._formField?this._formField._control.value=i:this._element.nativeElement.value=i,this._previousValue=i}_setValueAndClose(t){t&&t.source&&(this._clearPreviousSelectedOption(t.source),this._setTriggerValue(t.source.value),this._onChange(t.source.value),this._element.nativeElement.focus(),this.autocomplete._emitSelectEvent(t.source)),this.closePanel()}_clearPreviousSelectedOption(t){this.autocomplete.options.forEach(e=>{e!==t&&e.selected&&e.deselect()})}_attachOverlay(){null==this._isInsideShadowRoot&&(this._isInsideShadowRoot=!!Object(g.c)(this._element.nativeElement));let t=this._overlayRef;t?(this._positionStrategy.setOrigin(this._getConnectedElement()),t.updateSize({width:this._getPanelWidth()})):(this._portal=new v.i(this.autocomplete.template,this._viewContainerRef),t=this._overlay.create(this._getOverlayConfig()),this._overlayRef=t,t.keydownEvents().subscribe(t=>{(t.keyCode===m.h&&!Object(m.v)(t)||t.keyCode===m.s&&Object(m.v)(t,"altKey"))&&(this._resetActiveItem(),this._closeKeyEventStream.next(),t.stopPropagation(),t.preventDefault())}),this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&t&&t.updateSize({width:this._getPanelWidth()})})),t&&!t.hasAttached()&&(t.attach(this._portal),this._closingActionsSubscription=this._subscribeToClosingActions());const e=this.panelOpen;this.autocomplete._setVisibility(),this.autocomplete._isOpen=this._overlayAttached=!0,this.panelOpen&&e!==this.panelOpen&&this.autocomplete.opened.emit()}_getOverlayConfig(){return new b.d({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir})}_getOverlayPosition(){const t=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(t),this._positionStrategy=t,t}_setStrategyPositions(t){const e=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],i=this._aboveClass,n=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:i},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:i}];let a;a="above"===this.position?n:"below"===this.position?e:[...e,...n],t.withPositions(a)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){this.autocomplete._keyManager.setActiveItem(this.autocomplete.autoActiveFirstOption?0:-1)}_canOpen(){const t=this._element.nativeElement;return!t.readOnly&&!t.disabled&&!this._autocompleteDisabled}_getWindow(){var t;return(null===(t=this._document)||void 0===t?void 0:t.defaultView)||window}_scrollToOption(t){const e=this.autocomplete,i=Object(o.y)(t,e.options,e.optionGroups);if(0===t&&1===i)e._setScrollTop(0);else{const i=e.options.toArray()[t];if(i){const t=i._getHostElement(),n=Object(o.z)(t.offsetTop,t.offsetHeight,e._getScrollTop(),e.panel.nativeElement.offsetHeight);e._setScrollTop(n)}}}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.l),s.Qb(b.c),s.Qb(s.T),s.Qb(s.C),s.Qb(s.h),s.Qb(z),s.Qb(k.c,8),s.Qb(y.a,9),s.Qb(p.e,8),s.Qb(f.h))},t.\u0275dir=s.Lb({type:t,inputs:{position:["matAutocompletePosition","position"],autocompleteAttribute:["autocomplete","autocompleteAttribute"],autocompleteDisabled:["matAutocompleteDisabled","autocompleteDisabled"],autocomplete:["matAutocomplete","autocomplete"],connectedTo:["matAutocompleteConnectedTo","connectedTo"]},features:[s.Bb]}),t})(),H=(()=>{class t extends ${constructor(){super(...arguments),this._aboveClass="mat-autocomplete-panel-above"}}return t.\u0275fac=function(e){return G(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-autocomplete-trigger"],hostVars:7,hostBindings:function(t,e){1&t&&s.dc("focusin",(function(){return e._handleFocus()}))("blur",(function(){return e._onTouched()}))("input",(function(t){return e._handleInput(t)}))("keydown",(function(t){return e._handleKeydown(t)})),2&t&&s.Eb("autocomplete",e.autocompleteAttribute)("role",e.autocompleteDisabled?null:"combobox")("aria-autocomplete",e.autocompleteDisabled?null:"list")("aria-activedescendant",e.panelOpen&&e.activeOption?e.activeOption.id:null)("aria-expanded",e.autocompleteDisabled?null:e.panelOpen.toString())("aria-owns",e.autocompleteDisabled||!e.panelOpen||null==e.autocomplete?null:e.autocomplete.id)("aria-haspopup",!e.autocompleteDisabled)},exportAs:["matAutocompleteTrigger"],features:[s.Cb([U]),s.Ab]}),t})();const G=s.Yb(H);let X=(()=>{class t{}return t.\u0275mod=s.Ob({type:t}),t.\u0275inj=s.Nb({factory:function(e){return new(e||t)},providers:[B],imports:[[b.f,o.q,o.k,p.c],f.c,o.q,o.k]}),t})()},"/t3+":function(t,e,i){"use strict";i.d(e,"a",(function(){return u})),i.d(e,"b",(function(){return p})),i.d(e,"c",(function(){return h}));var n=i("FKr1"),a=i("ofXK"),s=i("fXoL"),o=i("nLfN");const r=["*",[["mat-toolbar-row"]]],c=["*","mat-toolbar-row"];class l{constructor(t){this._elementRef=t}}const d=Object(n.A)(l);let h=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),t})(),u=(()=>{class t extends d{constructor(t,e,i){super(t),this._platform=e,this._document=i}ngAfterViewInit(){this._platform.isBrowser&&(this._checkToolbarMixedModes(),this._toolbarRows.changes.subscribe(()=>this._checkToolbarMixedModes()))}_checkToolbarMixedModes(){}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.l),s.Qb(o.a),s.Qb(a.e))},t.\u0275cmp=s.Kb({type:t,selectors:[["mat-toolbar"]],contentQueries:function(t,e,i){var n;1&t&&s.Jb(i,h,!0),2&t&&s.yc(n=s.ec())&&(e._toolbarRows=n)},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(t,e){2&t&&s.Ib("mat-toolbar-multiple-rows",e._toolbarRows.length>0)("mat-toolbar-single-row",0===e._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[s.Ab],ngContentSelectors:c,decls:2,vars:0,template:function(t,e){1&t&&(s.nc(r),s.mc(0),s.mc(1,1))},styles:[".cdk-high-contrast-active .mat-toolbar{outline:solid 1px}.mat-toolbar-row,.mat-toolbar-single-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap}.mat-toolbar-multiple-rows{display:flex;box-sizing:border-box;flex-direction:column;width:100%}\n"],encapsulation:2,changeDetection:0}),t})(),p=(()=>{class t{}return t.\u0275mod=s.Ob({type:t}),t.\u0275inj=s.Nb({factory:function(e){return new(e||t)},imports:[[n.k],n.k]}),t})()},"/uUt":function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var n=i("7o/Q");function a(t,e){return i=>i.lift(new s(t,e))}class s{constructor(t,e){this.compare=t,this.keySelector=e}call(t,e){return e.subscribe(new o(t,this.compare,this.keySelector))}}class o extends n.a{constructor(t,e,i){super(t),this.keySelector=i,this.hasKey=!1,"function"==typeof e&&(this.compare=e)}compare(t,e){return t===e}_next(t){let e;try{const{keySelector:i}=this;e=i?i(t):t}catch(n){return this.destination.error(n)}let i=!1;if(this.hasKey)try{const{compare:t}=this;i=t(this.key,e)}catch(n){return this.destination.error(n)}else this.hasKey=!0;i||(this.key=e,this.destination.next(t))}}},0:function(t,e,i){t.exports=i("jj9e")},"0EQZ":function(t,e,i){"use strict";i.d(e,"a",(function(){return l})),i.d(e,"b",(function(){return r})),i.d(e,"c",(function(){return u})),i.d(e,"d",(function(){return p})),i.d(e,"e",(function(){return d})),i.d(e,"f",(function(){return h})),i.d(e,"g",(function(){return b})),i.d(e,"h",(function(){return c}));var n=i("7+OI"),a=i("LRne"),s=i("XNiG"),o=i("fXoL");class r{}function c(t){return t&&"function"==typeof t.connect}class l extends r{constructor(t){super(),this._data=t}connect(){return Object(n.a)(this._data)?this._data:Object(a.a)(this._data)}disconnect(){}}class d{applyChanges(t,e,i,n,a){t.forEachOperation((t,n,s)=>{let o,r;if(null==t.previousIndex){const a=i(t,n,s);o=e.createEmbeddedView(a.templateRef,a.context,a.index),r=1}else null==s?(e.remove(n),r=3):(o=e.get(n),e.move(o,s),r=2);a&&a({context:null==o?void 0:o.context,operation:r,record:t})})}detach(){}}class h{constructor(){this.viewCacheSize=20,this._viewCache=[]}applyChanges(t,e,i,n,a){t.forEachOperation((t,s,o)=>{let r,c;null==t.previousIndex?(r=this._insertView(()=>i(t,s,o),o,e,n(t)),c=r?1:0):null==o?(this._detachAndCacheView(s,e),c=3):(r=this._moveView(s,o,e,n(t)),c=2),a&&a({context:null==r?void 0:r.context,operation:c,record:t})})}detach(){for(const t of this._viewCache)t.destroy()}_insertView(t,e,i,n){let a=this._insertViewFromCache(e,i);if(a)return void(a.context.$implicit=n);const s=t();return i.createEmbeddedView(s.templateRef,s.context,s.index)}_detachAndCacheView(t,e){const i=this._detachView(t,e);this._maybeCacheView(i,e)}_moveView(t,e,i,n){const a=i.get(t);return i.move(a,e),a.context.$implicit=n,a}_maybeCacheView(t,e){if(this._viewCache.length<this.viewCacheSize)this._viewCache.push(t);else{const i=e.indexOf(t);-1===i?t.destroy():e.remove(i)}}_insertViewFromCache(t,e){const i=this._viewCache.pop();return i&&e.insert(i,t),i||null}_detachView(t,e){return e.detach(t)}}class u{constructor(t=!1,e,i=!0){this._multiple=t,this._emitChanges=i,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new s.a,e&&e.length&&(t?e.forEach(t=>this._markSelected(t)):this._markSelected(e[0]),this._selectedToEmit.length=0)}get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}select(...t){this._verifyValueAssignment(t),t.forEach(t=>this._markSelected(t)),this._emitChangeEvent()}deselect(...t){this._verifyValueAssignment(t),t.forEach(t=>this._unmarkSelected(t)),this._emitChangeEvent()}toggle(t){this.isSelected(t)?this.deselect(t):this.select(t)}clear(){this._unmarkAll(),this._emitChangeEvent()}isSelected(t){return this._selection.has(t)}isEmpty(){return 0===this._selection.size}hasValue(){return!this.isEmpty()}sort(t){this._multiple&&this.selected&&this._selected.sort(t)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(t){this.isSelected(t)||(this._multiple||this._unmarkAll(),this._selection.add(t),this._emitChanges&&this._selectedToEmit.push(t))}_unmarkSelected(t){this.isSelected(t)&&(this._selection.delete(t),this._emitChanges&&this._deselectedToEmit.push(t))}_unmarkAll(){this.isEmpty()||this._selection.forEach(t=>this._unmarkSelected(t))}_verifyValueAssignment(t){}}let p=(()=>{class t{constructor(){this._listeners=[]}notify(t,e){for(let i of this._listeners)i(t,e)}listen(t){return this._listeners.push(t),()=>{this._listeners=this._listeners.filter(e=>t!==e)}}ngOnDestroy(){this._listeners=[]}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(o.Mb)({factory:function(){return new t},token:t,providedIn:"root"}),t})();const b=new o.s("_ViewRepeater")},"0EUg":function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var n=i("bHdf");function a(){return Object(n.a)(1)}},"0IaG":function(t,e,i){"use strict";i.d(e,"a",(function(){return k})),i.d(e,"b",(function(){return R})),i.d(e,"c",(function(){return E})),i.d(e,"d",(function(){return A})),i.d(e,"e",(function(){return C})),i.d(e,"f",(function(){return T})),i.d(e,"g",(function(){return L})),i.d(e,"h",(function(){return w})),i.d(e,"i",(function(){return W}));var n=i("rDax"),a=i("+rOU"),s=i("fXoL"),o=i("FKr1"),r=i("cH1L"),c=i("ofXK"),l=i("XNiG"),d=i("NXyV"),h=i("LRne"),u=i("pLZG"),p=i("IzEk"),b=i("JX91"),f=i("R0Ic"),m=i("FtGj"),g=i("u47x");function v(t,e){}class _{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.maxWidth="80vw",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.autoFocus=!0,this.restoreFocus=!0,this.closeOnNavigation=!0}}const y={dialogContainer:Object(f.n)("dialogContainer",[Object(f.k)("void, exit",Object(f.l)({opacity:0,transform:"scale(0.7)"})),Object(f.k)("enter",Object(f.l)({transform:"none"})),Object(f.m)("* => enter",Object(f.e)("150ms cubic-bezier(0, 0, 0.2, 1)",Object(f.l)({transform:"none",opacity:1}))),Object(f.m)("* => void, * => exit",Object(f.e)("75ms cubic-bezier(0.4, 0.0, 0.2, 1)",Object(f.l)({opacity:0})))])};let x=(()=>{class t extends a.a{constructor(t,e,i,n,a,o){super(),this._elementRef=t,this._focusTrapFactory=e,this._changeDetectorRef=i,this._config=a,this._focusMonitor=o,this._animationStateChanged=new s.o,this._elementFocusedBeforeDialogWasOpened=null,this._closeInteractionType=null,this.attachDomPortal=t=>(this._portalOutlet.hasAttached(),this._portalOutlet.attachDomPortal(t)),this._ariaLabelledBy=a.ariaLabelledBy||null,this._document=n}_initializeWithAttachedContent(){this._setupFocusTrap(),this._capturePreviouslyFocusedElement(),this._focusDialogContainer()}attachComponentPortal(t){return this._portalOutlet.hasAttached(),this._portalOutlet.attachComponentPortal(t)}attachTemplatePortal(t){return this._portalOutlet.hasAttached(),this._portalOutlet.attachTemplatePortal(t)}_recaptureFocus(){this._containsFocus()||(!this._config.autoFocus||!this._focusTrap.focusInitialElement())&&this._elementRef.nativeElement.focus()}_trapFocus(){this._config.autoFocus?this._focusTrap.focusInitialElementWhenReady():this._containsFocus()||this._elementRef.nativeElement.focus()}_restoreFocus(){const t=this._elementFocusedBeforeDialogWasOpened;if(this._config.restoreFocus&&t&&"function"==typeof t.focus){const e=this._document.activeElement,i=this._elementRef.nativeElement;e&&e!==this._document.body&&e!==i&&!i.contains(e)||(this._focusMonitor?(this._focusMonitor.focusVia(t,this._closeInteractionType),this._closeInteractionType=null):t.focus())}this._focusTrap&&this._focusTrap.destroy()}_setupFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement)}_capturePreviouslyFocusedElement(){this._document&&(this._elementFocusedBeforeDialogWasOpened=this._document.activeElement)}_focusDialogContainer(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}_containsFocus(){const t=this._elementRef.nativeElement,e=this._document.activeElement;return t===e||t.contains(e)}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.l),s.Qb(g.i),s.Qb(s.h),s.Qb(c.e,8),s.Qb(_),s.Qb(g.h))},t.\u0275dir=s.Lb({type:t,viewQuery:function(t,e){var i;1&t&&s.Kc(a.c,!0),2&t&&s.yc(i=s.ec())&&(e._portalOutlet=i.first)},features:[s.Ab]}),t})(),C=(()=>{class t extends x{constructor(){super(...arguments),this._state="enter"}_onAnimationDone({toState:t,totalTime:e}){"enter"===t?(this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:e})):"exit"===t&&(this._restoreFocus(),this._animationStateChanged.next({state:"closed",totalTime:e}))}_onAnimationStart({toState:t,totalTime:e}){"enter"===t?this._animationStateChanged.next({state:"opening",totalTime:e}):"exit"!==t&&"void"!==t||this._animationStateChanged.next({state:"closing",totalTime:e})}_startExitAnimation(){this._state="exit",this._changeDetectorRef.markForCheck()}}return t.\u0275fac=function(e){return O(e||t)},t.\u0275cmp=s.Kb({type:t,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1","aria-modal","true",1,"mat-dialog-container"],hostVars:6,hostBindings:function(t,e){1&t&&s.Mc("@dialogContainer.start",(function(t){return e._onAnimationStart(t)}))("@dialogContainer.done",(function(t){return e._onAnimationDone(t)})),2&t&&(s.Zb("id",e._id),s.Eb("role",e._config.role)("aria-labelledby",e._config.ariaLabel?null:e._ariaLabelledBy)("aria-label",e._config.ariaLabel)("aria-describedby",e._config.ariaDescribedBy||null),s.Nc("@dialogContainer",e._state))},features:[s.Ab],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,e){1&t&&s.Oc(0,v,0,0,"ng-template",0)},directives:[a.c],styles:[".mat-dialog-container{display:block;padding:24px;border-radius:4px;box-sizing:border-box;overflow:auto;outline:0;width:100%;height:100%;min-height:inherit;max-height:inherit}.cdk-high-contrast-active .mat-dialog-container{outline:solid 1px}.mat-dialog-content{display:block;margin:0 -24px;padding:0 24px;max-height:65vh;overflow:auto;-webkit-overflow-scrolling:touch}.mat-dialog-title{margin:0 0 20px;display:block}.mat-dialog-actions{padding:8px 0;display:flex;flex-wrap:wrap;min-height:52px;align-items:center;margin-bottom:-24px}.mat-dialog-actions[align=end]{justify-content:flex-end}.mat-dialog-actions[align=center]{justify-content:center}.mat-dialog-actions .mat-button-base+.mat-button-base,.mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}\n"],encapsulation:2,data:{animation:[y.dialogContainer]}}),t})();const O=s.Yb(C);let D=0;class w{constructor(t,e,i="mat-dialog-"+D++){this._overlayRef=t,this._containerInstance=e,this.id=i,this.disableClose=this._containerInstance._config.disableClose,this._afterOpened=new l.a,this._afterClosed=new l.a,this._beforeClosed=new l.a,this._state=0,e._id=i,e._animationStateChanged.pipe(Object(u.a)(t=>"opened"===t.state),Object(p.a)(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),e._animationStateChanged.pipe(Object(u.a)(t=>"closed"===t.state),Object(p.a)(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._afterClosed.next(this._result),this._afterClosed.complete(),this.componentInstance=null,this._overlayRef.dispose()}),t.keydownEvents().pipe(Object(u.a)(t=>t.keyCode===m.h&&!this.disableClose&&!Object(m.v)(t))).subscribe(t=>{t.preventDefault(),M(this,"keyboard")}),t.backdropClick().subscribe(()=>{this.disableClose?this._containerInstance._recaptureFocus():M(this,"mouse")})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(Object(u.a)(t=>"closing"===t.state),Object(p.a)(1)).subscribe(e=>{this._beforeClosed.next(t),this._beforeClosed.complete(),this._overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),e.totalTime+100)}),this._state=1,this._containerInstance._startExitAnimation()}afterOpened(){return this._afterOpened}afterClosed(){return this._afterClosed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._overlayRef.backdropClick()}keydownEvents(){return this._overlayRef.keydownEvents()}updatePosition(t){let e=this._getPositionStrategy();return t&&(t.left||t.right)?t.left?e.left(t.left):e.right(t.right):e.centerHorizontally(),t&&(t.top||t.bottom)?t.top?e.top(t.top):e.bottom(t.bottom):e.centerVertically(),this._overlayRef.updatePosition(),this}updateSize(t="",e=""){return this._getPositionStrategy().width(t).height(e),this._overlayRef.updatePosition(),this}addPanelClass(t){return this._overlayRef.addPanelClass(t),this}removePanelClass(t){return this._overlayRef.removePanelClass(t),this}getState(){return this._state}_finishDialogClose(){this._state=2,this._overlayRef.dispose()}_getPositionStrategy(){return this._overlayRef.getConfig().positionStrategy}}function M(t,e,i){return void 0!==t._containerInstance&&(t._containerInstance._closeInteractionType=e),t.close(i)}const k=new s.s("MatDialogData"),S=new s.s("mat-dialog-default-options"),I=new s.s("mat-dialog-scroll-strategy"),P={provide:I,deps:[n.c],useFactory:function(t){return()=>t.scrollStrategies.block()}};let V=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this._overlay=t,this._injector=e,this._defaultOptions=i,this._parentDialog=n,this._overlayContainer=a,this._dialogRefConstructor=o,this._dialogContainerType=r,this._dialogDataToken=c,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new l.a,this._afterOpenedAtThisLevel=new l.a,this._ariaHiddenElements=new Map,this.afterAllClosed=Object(d.a)(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Object(b.a)(void 0))),this._scrollStrategy=s}get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){const t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}open(t,e){(e=function(t,e){return Object.assign(Object.assign({},e),t)}(e,this._defaultOptions||new _)).id&&this.getDialogById(e.id);const i=this._createOverlay(e),n=this._attachDialogContainer(i,e),a=this._attachDialogContent(t,n,i,e);return this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(a),a.afterClosed().subscribe(()=>this._removeOpenDialog(a)),this.afterOpened.next(a),n._initializeWithAttachedContent(),a}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(t){return this.openDialogs.find(e=>e.id===t)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_createOverlay(t){const e=this._getOverlayConfig(t);return this._overlay.create(e)}_getOverlayConfig(t){const e=new n.d({positionStrategy:this._overlay.position().global(),scrollStrategy:t.scrollStrategy||this._scrollStrategy(),panelClass:t.panelClass,hasBackdrop:t.hasBackdrop,direction:t.direction,minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight,disposeOnNavigation:t.closeOnNavigation});return t.backdropClass&&(e.backdropClass=t.backdropClass),e}_attachDialogContainer(t,e){const i=s.t.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:_,useValue:e}]}),n=new a.d(this._dialogContainerType,e.viewContainerRef,i,e.componentFactoryResolver);return t.attach(n).instance}_attachDialogContent(t,e,i,n){const o=new this._dialogRefConstructor(i,e,n.id);if(t instanceof s.P)e.attachTemplatePortal(new a.i(t,null,{$implicit:n.data,dialogRef:o}));else{const i=this._createInjector(n,o,e),s=e.attachComponentPortal(new a.d(t,n.viewContainerRef,i));o.componentInstance=s.instance}return o.updateSize(n.width,n.height).updatePosition(n.position),o}_createInjector(t,e,i){const n=t&&t.viewContainerRef&&t.viewContainerRef.injector,a=[{provide:this._dialogContainerType,useValue:i},{provide:this._dialogDataToken,useValue:t.data},{provide:this._dialogRefConstructor,useValue:e}];return!t.direction||n&&n.get(r.c,null)||a.push({provide:r.c,useValue:{value:t.direction,change:Object(h.a)()}}),s.t.create({parent:n||this._injector,providers:a})}_removeOpenDialog(t){const e=this.openDialogs.indexOf(t);e>-1&&(this.openDialogs.splice(e,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((t,e)=>{t?e.setAttribute("aria-hidden",t):e.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){const t=this._overlayContainer.getContainerElement();if(t.parentElement){const e=t.parentElement.children;for(let i=e.length-1;i>-1;i--){let n=e[i];n===t||"SCRIPT"===n.nodeName||"STYLE"===n.nodeName||n.hasAttribute("aria-live")||(this._ariaHiddenElements.set(n,n.getAttribute("aria-hidden")),n.setAttribute("aria-hidden","true"))}}}_closeDialogs(t){let e=t.length;for(;e--;)t[e].close()}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(n.c),s.Qb(s.t),s.Qb(void 0),s.Qb(void 0),s.Qb(n.e),s.Qb(void 0),s.Qb(s.R),s.Qb(s.R),s.Qb(s.s))},t.\u0275dir=s.Lb({type:t}),t})(),R=(()=>{class t extends V{constructor(t,e,i,n,a,s,o){super(t,e,n,s,o,a,w,C,k)}}return t.\u0275fac=function(e){return new(e||t)(s.ac(n.c),s.ac(s.t),s.ac(c.n,8),s.ac(S,8),s.ac(I),s.ac(t,12),s.ac(n.e))},t.\u0275prov=s.Mb({token:t,factory:t.\u0275fac}),t})(),j=0,A=(()=>{class t{constructor(t,e,i){this.dialogRef=t,this._elementRef=e,this._dialog=i,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=F(this._elementRef,this._dialog.openDialogs))}ngOnChanges(t){const e=t._matDialogClose||t._matDialogCloseResult;e&&(this.dialogResult=e.currentValue)}_onButtonClick(t){M(this.dialogRef,0===t.screenX&&0===t.screenY?"keyboard":"mouse",this.dialogResult)}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(w,8),s.Qb(s.l),s.Qb(R))},t.\u0275dir=s.Lb({type:t,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(t,e){1&t&&s.dc("click",(function(t){return e._onButtonClick(t)})),2&t&&s.Eb("aria-label",e.ariaLabel||null)("type",e.type)},inputs:{type:"type",dialogResult:["mat-dialog-close","dialogResult"],ariaLabel:["aria-label","ariaLabel"],_matDialogClose:["matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],features:[s.Bb]}),t})(),W=(()=>{class t{constructor(t,e,i){this._dialogRef=t,this._elementRef=e,this._dialog=i,this.id="mat-dialog-title-"+j++}ngOnInit(){this._dialogRef||(this._dialogRef=F(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{const t=this._dialogRef._containerInstance;t&&!t._ariaLabelledBy&&(t._ariaLabelledBy=this.id)})}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(w,8),s.Qb(s.l),s.Qb(R))},t.\u0275dir=s.Lb({type:t,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-dialog-title"],hostVars:1,hostBindings:function(t,e){2&t&&s.Zb("id",e.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),t})(),T=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-dialog-content"]}),t})(),E=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-dialog-actions"]}),t})();function F(t,e){let i=t.nativeElement.parentElement;for(;i&&!i.classList.contains("mat-dialog-container");)i=i.parentElement;return i?e.find(t=>t.id===i.id):null}let L=(()=>{class t{}return t.\u0275mod=s.Ob({type:t}),t.\u0275inj=s.Nb({factory:function(e){return new(e||t)},providers:[R,P],imports:[[n.f,a.h,o.k],o.k]}),t})()},"0MNC":function(t,e,i){"use strict";i.d(e,"a",(function(){return C})),i.d(e,"b",(function(){return D}));var n=i("fXoL"),a=i("8LU1"),s=i("XNiG"),o=i("itXk"),r=i("GyhO"),c=i("HDdC"),l=i("IzEk"),d=i("7o/Q");class h{constructor(t){this.total=t}call(t,e){return e.subscribe(new u(t,this.total))}}class u extends d.a{constructor(t,e){super(t),this.total=e,this.count=0}_next(t){++this.count>this.total&&this.destination.next(t)}}var p=i("Kj3r"),b=i("lJxs"),f=i("JX91"),m=i("1G5W"),g=i("nLfN");const v=new Set;let _,y=(()=>{class t{constructor(t){this._platform=t,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):x}matchMedia(t){return this._platform.WEBKIT&&function(t){if(!v.has(t))try{_||(_=document.createElement("style"),_.setAttribute("type","text/css"),document.head.appendChild(_)),_.sheet&&(_.sheet.insertRule(`@media ${t} {.fx-query-test{ }}`,0),v.add(t))}catch(e){console.error(e)}}(t),this._matchMedia(t)}}return t.\u0275fac=function(e){return new(e||t)(n.ac(g.a))},t.\u0275prov=Object(n.Mb)({factory:function(){return new t(Object(n.ac)(g.a))},token:t,providedIn:"root"}),t})();function x(t){return{matches:"all"===t||""===t,media:t,addListener:()=>{},removeListener:()=>{}}}let C=(()=>{class t{constructor(t,e){this._mediaMatcher=t,this._zone=e,this._queries=new Map,this._destroySubject=new s.a}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(t){return O(Object(a.b)(t)).some(t=>this._registerQuery(t).mql.matches)}observe(t){const e=O(Object(a.b)(t)).map(t=>this._registerQuery(t).observable);let i=Object(o.a)(e);return i=Object(r.a)(i.pipe(Object(l.a)(1)),i.pipe(t=>t.lift(new h(1)),Object(p.a)(0))),i.pipe(Object(b.a)(t=>{const e={matches:!1,breakpoints:{}};return t.forEach(({matches:t,query:i})=>{e.matches=e.matches||t,e.breakpoints[i]=t}),e}))}_registerQuery(t){if(this._queries.has(t))return this._queries.get(t);const e=this._mediaMatcher.matchMedia(t),i={observable:new c.a(t=>{const i=e=>this._zone.run(()=>t.next(e));return e.addListener(i),()=>{e.removeListener(i)}}).pipe(Object(f.a)(e),Object(b.a)(({matches:e})=>({query:t,matches:e})),Object(m.a)(this._destroySubject)),mql:e};return this._queries.set(t,i),i}}return t.\u0275fac=function(e){return new(e||t)(n.ac(y),n.ac(n.C))},t.\u0275prov=Object(n.Mb)({factory:function(){return new t(Object(n.ac)(y),Object(n.ac)(n.C))},token:t,providedIn:"root"}),t})();function O(t){return t.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}const D={XSmall:"(max-width: 599.99px)",Small:"(min-width: 600px) and (max-width: 959.99px)",Medium:"(min-width: 960px) and (max-width: 1279.99px)",Large:"(min-width: 1280px) and (max-width: 1919.99px)",XLarge:"(min-width: 1920px)",Handset:"(max-width: 599.99px) and (orientation: portrait), (max-width: 959.99px) and (orientation: landscape)",Tablet:"(min-width: 600px) and (max-width: 839.99px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279.99px) and (orientation: landscape)",Web:"(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)",HandsetPortrait:"(max-width: 599.99px) and (orientation: portrait)",TabletPortrait:"(min-width: 600px) and (max-width: 839.99px) and (orientation: portrait)",WebPortrait:"(min-width: 840px) and (orientation: portrait)",HandsetLandscape:"(max-width: 959.99px) and (orientation: landscape)",TabletLandscape:"(min-width: 960px) and (max-width: 1279.99px) and (orientation: landscape)",WebLandscape:"(min-width: 1280px) and (orientation: landscape)"}},1:function(t,e){},"1G5W":function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var n=i("zx2A");function a(t){return e=>e.lift(new s(t))}class s{constructor(t){this.notifier=t}call(t,e){const i=new o(t),a=Object(n.c)(this.notifier,new n.a(i));return a&&!i.seenValue?(i.add(a),e.subscribe(i)):i}}class o extends n.b{constructor(t){super(t),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}},"1YbM":function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var n=i("fXoL"),a=i("aEDk"),s=i("rH+9");let o=(()=>{class t{constructor(t,e){this.latinisePipe=t,this.functions=e}transform(t,e=""){let i="",n="";return this.functions.empty(t)?[]:(t.sort((t,a)=>(void 0===e?(i=this.latinisePipe.transform(t).toLocaleLowerCase(),n=this.latinisePipe.transform(a).toLocaleLowerCase()):(t[e]=null!==t[e]?t[e]:"",a[e]=null!==a[e]?a[e]:"",i="number"!=typeof t[e]?this.latinisePipe.transform(t[e]).toLocaleLowerCase():t[e],n="number"!=typeof a[e]?this.latinisePipe.transform(a[e]).toLocaleLowerCase():a[e]),i<n?-1:i>n?1:0)),t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(a.c),n.Qb(s.a))},t.\u0275pipe=n.Pb({name:"sortBy",type:t,pure:!0}),t})()},"1jcm":function(t,e,i){"use strict";i.d(e,"a",(function(){return x})),i.d(e,"b",(function(){return M})),i.d(e,"c",(function(){return O}));var n=i("GU7r"),a=i("fXoL"),s=i("FKr1"),o=i("8LU1"),r=i("3Pt+"),c=i("R1ws"),l=i("u47x");const d=["thumbContainer"],h=["toggleBar"],u=["input"],p=function(){return{enterDuration:150}},b=["*"],f=new a.s("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:!1})});let m=0;const g={provide:r.s,useExisting:Object(a.X)(()=>x),multi:!0};class v{constructor(t,e){this.source=t,this.checked=e}}class _{constructor(t){this._elementRef=t}}const y=Object(s.F)(Object(s.A)(Object(s.B)(Object(s.C)(_)),"accent"));let x=(()=>{class t extends y{constructor(t,e,i,n,s,o){super(t),this._focusMonitor=e,this._changeDetectorRef=i,this.defaults=s,this._animationMode=o,this._onChange=t=>{},this._onTouched=()=>{},this._uniqueId="mat-slide-toggle-"+ ++m,this._required=!1,this._checked=!1,this.name=null,this.id=this._uniqueId,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.change=new a.o,this.toggleChange=new a.o,this.tabIndex=parseInt(n)||0}get required(){return this._required}set required(t){this._required=Object(o.c)(t)}get checked(){return this._checked}set checked(t){this._checked=Object(o.c)(t),this._changeDetectorRef.markForCheck()}get inputId(){return(this.id||this._uniqueId)+"-input"}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{"keyboard"===t||"program"===t?this._inputElement.nativeElement.focus():t||Promise.resolve().then(()=>this._onTouched())})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}_onChangeEvent(t){t.stopPropagation(),this.toggleChange.emit(),this.defaults.disableToggleValue?this._inputElement.nativeElement.checked=this.checked:(this.checked=this._inputElement.nativeElement.checked,this._emitChangeEvent())}_onInputClick(t){t.stopPropagation()}writeValue(t){this.checked=!!t}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t,this._changeDetectorRef.markForCheck()}focus(t){this._focusMonitor.focusVia(this._inputElement,"keyboard",t)}toggle(){this.checked=!this.checked,this._onChange(this.checked)}_emitChangeEvent(){this._onChange(this.checked),this.change.emit(new v(this,this.checked))}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(l.h),a.Qb(a.h),a.bc("tabindex"),a.Qb(f),a.Qb(c.a,8))},t.\u0275cmp=a.Kb({type:t,selectors:[["mat-slide-toggle"]],viewQuery:function(t,e){var i;1&t&&(a.Xc(d,!0),a.Xc(h,!0),a.Xc(u,!0)),2&t&&(a.yc(i=a.ec())&&(e._thumbEl=i.first),a.yc(i=a.ec())&&(e._thumbBarEl=i.first),a.yc(i=a.ec())&&(e._inputElement=i.first))},hostAttrs:[1,"mat-slide-toggle"],hostVars:12,hostBindings:function(t,e){2&t&&(a.Zb("id",e.id),a.Eb("tabindex",e.disabled?null:-1)("aria-label",null)("aria-labelledby",null),a.Ib("mat-checked",e.checked)("mat-disabled",e.disabled)("mat-slide-toggle-label-before","before"==e.labelPosition)("_mat-animation-noopable","NoopAnimations"===e._animationMode))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex",name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],required:"required",checked:"checked"},outputs:{change:"change",toggleChange:"toggleChange"},exportAs:["matSlideToggle"],features:[a.Cb([g]),a.Ab],ngContentSelectors:b,decls:16,vars:18,consts:[[1,"mat-slide-toggle-label"],["label",""],[1,"mat-slide-toggle-bar"],["toggleBar",""],["type","checkbox","role","switch",1,"mat-slide-toggle-input","cdk-visually-hidden",3,"id","required","tabIndex","checked","disabled","change","click"],["input",""],[1,"mat-slide-toggle-thumb-container"],["thumbContainer",""],[1,"mat-slide-toggle-thumb"],["mat-ripple","",1,"mat-slide-toggle-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered","matRippleRadius","matRippleAnimation"],[1,"mat-ripple-element","mat-slide-toggle-persistent-ripple"],[1,"mat-slide-toggle-content",3,"cdkObserveContent"],["labelContent",""],[2,"display","none"]],template:function(t,e){if(1&t&&(a.nc(),a.Wb(0,"label",0,1),a.Wb(2,"div",2,3),a.Wb(4,"input",4,5),a.dc("change",(function(t){return e._onChangeEvent(t)}))("click",(function(t){return e._onInputClick(t)})),a.Vb(),a.Wb(6,"div",6,7),a.Rb(8,"div",8),a.Wb(9,"div",9),a.Rb(10,"div",10),a.Vb(),a.Vb(),a.Vb(),a.Wb(11,"span",11,12),a.dc("cdkObserveContent",(function(){return e._onLabelTextChange()})),a.Wb(13,"span",13),a.Qc(14,"\xa0"),a.Vb(),a.mc(15),a.Vb(),a.Vb()),2&t){const t=a.zc(1),i=a.zc(12);a.Eb("for",e.inputId),a.Db(2),a.Ib("mat-slide-toggle-bar-no-side-margin",!i.textContent||!i.textContent.trim()),a.Db(2),a.oc("id",e.inputId)("required",e.required)("tabIndex",e.tabIndex)("checked",e.checked)("disabled",e.disabled),a.Eb("name",e.name)("aria-checked",e.checked.toString())("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby),a.Db(5),a.oc("matRippleTrigger",t)("matRippleDisabled",e.disableRipple||e.disabled)("matRippleCentered",!0)("matRippleRadius",20)("matRippleAnimation",a.uc(17,p))}},directives:[s.u,n.a],styles:[".mat-slide-toggle{display:inline-block;height:24px;max-width:100%;line-height:24px;white-space:nowrap;outline:none;-webkit-tap-highlight-color:transparent}.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(16px, 0, 0)}[dir=rtl] .mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(-16px, 0, 0)}.mat-slide-toggle.mat-disabled{opacity:.38}.mat-slide-toggle.mat-disabled .mat-slide-toggle-label,.mat-slide-toggle.mat-disabled .mat-slide-toggle-thumb-container{cursor:default}.mat-slide-toggle-label{display:flex;flex:1;flex-direction:row;align-items:center;height:inherit;cursor:pointer}.mat-slide-toggle-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-slide-toggle-label-before .mat-slide-toggle-label{order:1}.mat-slide-toggle-label-before .mat-slide-toggle-bar{order:2}[dir=rtl] .mat-slide-toggle-label-before .mat-slide-toggle-bar,.mat-slide-toggle-bar{margin-right:8px;margin-left:0}[dir=rtl] .mat-slide-toggle-bar,.mat-slide-toggle-label-before .mat-slide-toggle-bar{margin-left:8px;margin-right:0}.mat-slide-toggle-bar-no-side-margin{margin-left:0;margin-right:0}.mat-slide-toggle-thumb-container{position:absolute;z-index:1;width:20px;height:20px;top:-3px;left:0;transform:translate3d(0, 0, 0);transition:all 80ms linear;transition-property:transform}._mat-animation-noopable .mat-slide-toggle-thumb-container{transition:none}[dir=rtl] .mat-slide-toggle-thumb-container{left:auto;right:0}.mat-slide-toggle-thumb{height:20px;width:20px;border-radius:50%}.mat-slide-toggle-bar{position:relative;width:36px;height:14px;flex-shrink:0;border-radius:8px}.mat-slide-toggle-input{bottom:0;left:10px}[dir=rtl] .mat-slide-toggle-input{left:auto;right:10px}.mat-slide-toggle-bar,.mat-slide-toggle-thumb{transition:all 80ms linear;transition-property:background-color;transition-delay:50ms}._mat-animation-noopable .mat-slide-toggle-bar,._mat-animation-noopable .mat-slide-toggle-thumb{transition:none}.mat-slide-toggle .mat-slide-toggle-ripple{position:absolute;top:calc(50% - 20px);left:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-slide-toggle .mat-slide-toggle-ripple .mat-ripple-element:not(.mat-slide-toggle-persistent-ripple){opacity:.12}.mat-slide-toggle-persistent-ripple{width:100%;height:100%;transform:none}.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:.04}.mat-slide-toggle:not(.mat-disabled).cdk-keyboard-focused .mat-slide-toggle-persistent-ripple{opacity:.12}.mat-slide-toggle-persistent-ripple,.mat-slide-toggle.mat-disabled .mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:0}@media(hover: none){.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{display:none}}.cdk-high-contrast-active .mat-slide-toggle-thumb,.cdk-high-contrast-active .mat-slide-toggle-bar{border:1px solid}.cdk-high-contrast-active .mat-slide-toggle.cdk-keyboard-focused .mat-slide-toggle-bar{outline:2px dotted;outline-offset:5px}\n"],encapsulation:2,changeDetection:0}),t})();const C={provide:r.r,useExisting:Object(a.X)(()=>O),multi:!0};let O=(()=>{class t extends r.b{}return t.\u0275fac=function(e){return D(e||t)},t.\u0275dir=a.Lb({type:t,selectors:[["mat-slide-toggle","required","","formControlName",""],["mat-slide-toggle","required","","formControl",""],["mat-slide-toggle","required","","ngModel",""]],features:[a.Cb([C]),a.Ab]}),t})();const D=a.Yb(O);let w=(()=>{class t{}return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)}}),t})(),M=(()=>{class t{}return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)},imports:[[w,s.v,s.k,n.c],w,s.k]}),t})()},2:function(t,e){},"2ChS":function(t,e,i){"use strict";i.d(e,"a",(function(){return b})),i.d(e,"b",(function(){return f}));var n=i("rDax"),a=i("+rOU"),s=i("fXoL"),o=i("FKr1"),r=i("0MNC"),c=i("R0Ic"),l=i("ofXK"),d=(i("cH1L"),i("XNiG"),i("VRyK"),i("LRne"),i("FtGj"),i("pLZG"),i("IzEk"),i("u47x"));function h(t,e){}class u{constructor(){this.data=null,this.hasBackdrop=!0,this.disableClose=!1,this.ariaLabel=null,this.closeOnNavigation=!0,this.autoFocus=!1,this.restoreFocus=!0}}const p={bottomSheetState:Object(c.n)("state",[Object(c.k)("void, hidden",Object(c.l)({transform:"translateY(100%)"})),Object(c.k)("visible",Object(c.l)({transform:"translateY(0%)"})),Object(c.m)("visible => void, visible => hidden",Object(c.e)(`${o.b.COMPLEX} ${o.a.ACCELERATION_CURVE}`)),Object(c.m)("void => visible",Object(c.e)(`${o.b.EXITING} ${o.a.DECELERATION_CURVE}`))])};let b=(()=>{class t extends a.a{constructor(t,e,i,n,a,o){super(),this._elementRef=t,this._changeDetectorRef=e,this._focusTrapFactory=i,this.bottomSheetConfig=o,this._animationState="void",this._animationStateChanged=new s.o,this._elementFocusedBeforeOpened=null,this.attachDomPortal=t=>(this._validatePortalAttached(),this._setPanelClass(),this._savePreviouslyFocusedElement(),this._portalOutlet.attachDomPortal(t)),this._document=a,this._breakpointSubscription=n.observe([r.b.Medium,r.b.Large,r.b.XLarge]).subscribe(()=>{this._toggleClass("mat-bottom-sheet-container-medium",n.isMatched(r.b.Medium)),this._toggleClass("mat-bottom-sheet-container-large",n.isMatched(r.b.Large)),this._toggleClass("mat-bottom-sheet-container-xlarge",n.isMatched(r.b.XLarge))})}attachComponentPortal(t){return this._validatePortalAttached(),this._setPanelClass(),this._savePreviouslyFocusedElement(),this._portalOutlet.attachComponentPortal(t)}attachTemplatePortal(t){return this._validatePortalAttached(),this._setPanelClass(),this._savePreviouslyFocusedElement(),this._portalOutlet.attachTemplatePortal(t)}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.detectChanges())}exit(){this._destroyed||(this._animationState="hidden",this._changeDetectorRef.markForCheck())}ngOnDestroy(){this._breakpointSubscription.unsubscribe(),this._destroyed=!0}_onAnimationDone(t){"hidden"===t.toState?this._restoreFocus():"visible"===t.toState&&this._trapFocus(),this._animationStateChanged.emit(t)}_onAnimationStart(t){this._animationStateChanged.emit(t)}_toggleClass(t,e){const i=this._elementRef.nativeElement.classList;e?i.add(t):i.remove(t)}_validatePortalAttached(){this._portalOutlet.hasAttached()}_setPanelClass(){const t=this._elementRef.nativeElement,e=this.bottomSheetConfig.panelClass;Array.isArray(e)?e.forEach(e=>t.classList.add(e)):e&&t.classList.add(e)}_trapFocus(){const t=this._elementRef.nativeElement;if(this._focusTrap||(this._focusTrap=this._focusTrapFactory.create(t)),this.bottomSheetConfig.autoFocus)this._focusTrap.focusInitialElementWhenReady();else{const e=this._document.activeElement;e===t||t.contains(e)||t.focus()}}_restoreFocus(){const t=this._elementFocusedBeforeOpened;if(this.bottomSheetConfig.restoreFocus&&t&&"function"==typeof t.focus){const e=this._document.activeElement,i=this._elementRef.nativeElement;e&&e!==this._document.body&&e!==i&&!i.contains(e)||t.focus()}this._focusTrap&&this._focusTrap.destroy()}_savePreviouslyFocusedElement(){this._elementFocusedBeforeOpened=this._document.activeElement,this._elementRef.nativeElement.focus&&Promise.resolve().then(()=>this._elementRef.nativeElement.focus())}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.l),s.Qb(s.h),s.Qb(d.i),s.Qb(r.a),s.Qb(l.e,8),s.Qb(u))},t.\u0275cmp=s.Kb({type:t,selectors:[["mat-bottom-sheet-container"]],viewQuery:function(t,e){var i;1&t&&s.Kc(a.c,!0),2&t&&s.yc(i=s.ec())&&(e._portalOutlet=i.first)},hostAttrs:["tabindex","-1","role","dialog","aria-modal","true",1,"mat-bottom-sheet-container"],hostVars:2,hostBindings:function(t,e){1&t&&s.Mc("@state.start",(function(t){return e._onAnimationStart(t)}))("@state.done",(function(t){return e._onAnimationDone(t)})),2&t&&(s.Eb("aria-label",null==e.bottomSheetConfig?null:e.bottomSheetConfig.ariaLabel),s.Nc("@state",e._animationState))},features:[s.Ab],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,e){1&t&&s.Oc(0,h,0,0,"ng-template",0)},directives:[a.c],styles:[".mat-bottom-sheet-container{padding:8px 16px;min-width:100vw;box-sizing:border-box;display:block;outline:0;max-height:80vh;overflow:auto}.cdk-high-contrast-active .mat-bottom-sheet-container{outline:1px solid}.mat-bottom-sheet-container-xlarge,.mat-bottom-sheet-container-large,.mat-bottom-sheet-container-medium{border-top-left-radius:4px;border-top-right-radius:4px}.mat-bottom-sheet-container-medium{min-width:384px;max-width:calc(100vw - 128px)}.mat-bottom-sheet-container-large{min-width:512px;max-width:calc(100vw - 256px)}.mat-bottom-sheet-container-xlarge{min-width:576px;max-width:calc(100vw - 384px)}\n"],encapsulation:2,data:{animation:[p.bottomSheetState]},changeDetection:0}),t})(),f=(()=>{class t{}return t.\u0275mod=s.Ob({type:t}),t.\u0275inj=s.Nb({factory:function(e){return new(e||t)},imports:[[n.f,o.k,a.h],o.k]}),t})()},"2QA8":function(t,e,i){"use strict";i.d(e,"a",(function(){return n}));const n=(()=>"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random())()},"2Vo4":function(t,e,i){"use strict";i.d(e,"a",(function(){return s}));var n=i("XNiG"),a=i("9ppp");class s extends n.a{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const e=super._subscribe(t);return e&&!e.closed&&t.next(this._value),e}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new a.a;return this._value}next(t){super.next(this._value=t)}}},"2fFW":function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));let n=!1;const a={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){const t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}else n&&console.log("RxJS: Back to a better error behavior. Thank you. <3");n=t},get useDeprecatedSynchronousErrorHandling(){return n}}},3:function(t,e){},"3E0/":function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var n=i("D0XW"),a=i("7o/Q"),s=i("WMd4");function o(t,e=n.a){var i;const a=(i=t)instanceof Date&&!isNaN(+i)?+t-e.now():Math.abs(t);return t=>t.lift(new r(a,e))}class r{constructor(t,e){this.delay=t,this.scheduler=e}call(t,e){return e.subscribe(new c(t,this.delay,this.scheduler))}}class c extends a.a{constructor(t,e,i){super(t),this.delay=e,this.scheduler=i,this.queue=[],this.active=!1,this.errored=!1}static dispatch(t){const e=t.source,i=e.queue,n=t.scheduler,a=t.destination;for(;i.length>0&&i[0].time-n.now()<=0;)i.shift().notification.observe(a);if(i.length>0){const e=Math.max(0,i[0].time-n.now());this.schedule(t,e)}else this.unsubscribe(),e.active=!1}_schedule(t){this.active=!0,this.destination.add(t.schedule(c.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))}scheduleNotification(t){if(!0===this.errored)return;const e=this.scheduler,i=new l(e.now()+this.delay,t);this.queue.push(i),!1===this.active&&this._schedule(e)}_next(t){this.scheduleNotification(s.a.createNext(t))}_error(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()}_complete(){this.scheduleNotification(s.a.createComplete()),this.unsubscribe()}}class l{constructor(t,e){this.time=t,this.notification=e}}},"3N8a":function(t,e,i){"use strict";i.d(e,"a",(function(){return s}));var n=i("quSY");class a extends n.a{constructor(t,e){super()}schedule(t,e=0){return this}}class s extends a{constructor(t,e){super(t,e),this.scheduler=t,this.work=e,this.pending=!1}schedule(t,e=0){if(this.closed)return this;this.state=t;const i=this.id,n=this.scheduler;return null!=i&&(this.id=this.recycleAsyncId(n,i,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(n,this.id,e),this}requestAsyncId(t,e,i=0){return setInterval(t.flush.bind(t,this),i)}recycleAsyncId(t,e,i=0){if(null!==i&&this.delay===i&&!1===this.pending)return e;clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(t,e);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let i=!1,n=void 0;try{this.work(t)}catch(a){i=!0,n=!!a&&a||new Error(a)}if(i)return this.unsubscribe(),n}_unsubscribe(){const t=this.id,e=this.scheduler,i=e.actions,n=i.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==n&&i.splice(n,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null}}},"3Pt+":function(t,e,i){"use strict";i.d(e,"a",(function(){return d})),i.d(e,"b",(function(){return Qt})),i.d(e,"c",(function(){return f})),i.d(e,"d",(function(){return p})),i.d(e,"e",(function(){return Bt})),i.d(e,"f",(function(){return pt})),i.d(e,"g",(function(){return jt})),i.d(e,"h",(function(){return Yt})),i.d(e,"i",(function(){return ht})),i.d(e,"j",(function(){return kt})),i.d(e,"k",(function(){return Tt})),i.d(e,"l",(function(){return ut})),i.d(e,"m",(function(){return It})),i.d(e,"n",(function(){return Vt})),i.d(e,"o",(function(){return Jt})),i.d(e,"p",(function(){return Gt})),i.d(e,"q",(function(){return $t})),i.d(e,"r",(function(){return O})),i.d(e,"s",(function(){return c})),i.d(e,"t",(function(){return g})),i.d(e,"u",(function(){return _})),i.d(e,"v",(function(){return y})),i.d(e,"w",(function(){return mt})),i.d(e,"x",(function(){return Ot})),i.d(e,"y",(function(){return yt})),i.d(e,"z",(function(){return z})),i.d(e,"A",(function(){return j})),i.d(e,"B",(function(){return qt})),i.d(e,"C",(function(){return T})),i.d(e,"D",(function(){return F})),i.d(e,"E",(function(){return Zt})),i.d(e,"F",(function(){return Lt})),i.d(e,"G",(function(){return N})),i.d(e,"H",(function(){return $})),i.d(e,"I",(function(){return M})),i.d(e,"J",(function(){return H})),i.d(e,"K",(function(){return Dt}));var n=i("fXoL"),a=i("ofXK"),s=i("cp0P"),o=i("Cfvw"),r=i("lJxs");const c=new n.s("NgValueAccessor"),l={provide:c,useExisting:Object(n.X)(()=>d),multi:!0};let d=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"checked",t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.I),n.Qb(n.l))},t.\u0275dir=n.Lb({type:t,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(t,e){1&t&&n.dc("change",(function(t){return e.onChange(t.target.checked)}))("blur",(function(){return e.onTouched()}))},features:[n.Cb([l])]}),t})();const h={provide:c,useExisting:Object(n.X)(()=>p),multi:!0},u=new n.s("CompositionEventMode");let p=(()=>{class t{constructor(t,e,i){this._renderer=t,this._elementRef=e,this._compositionMode=i,this.onChange=t=>{},this.onTouched=()=>{},this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function(){const t=Object(a.L)()?Object(a.L)().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.I),n.Qb(n.l),n.Qb(u,8))},t.\u0275dir=n.Lb({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(t,e){1&t&&n.dc("input",(function(t){return e._handleInput(t.target.value)}))("blur",(function(){return e.onTouched()}))("compositionstart",(function(){return e._compositionStart()}))("compositionend",(function(t){return e._compositionEnd(t.target.value)}))},features:[n.Cb([h])]}),t})(),b=(()=>{class t{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}reset(t){this.control&&this.control.reset(t)}hasError(t,e){return!!this.control&&this.control.hasError(t,e)}getError(t,e){return this.control?this.control.getError(t,e):null}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t}),t})(),f=(()=>{class t extends b{get formDirective(){return null}get path(){return null}}return t.\u0275fac=function(e){return m(e||t)},t.\u0275dir=n.Lb({type:t,features:[n.Ab]}),t})();const m=n.Yb(f);class g extends b{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null,this._rawValidators=[],this._rawAsyncValidators=[]}get validator(){}get asyncValidator(){}}class v{constructor(t){this._cd=t}get ngClassUntouched(){return!!this._cd.control&&this._cd.control.untouched}get ngClassTouched(){return!!this._cd.control&&this._cd.control.touched}get ngClassPristine(){return!!this._cd.control&&this._cd.control.pristine}get ngClassDirty(){return!!this._cd.control&&this._cd.control.dirty}get ngClassValid(){return!!this._cd.control&&this._cd.control.valid}get ngClassInvalid(){return!!this._cd.control&&this._cd.control.invalid}get ngClassPending(){return!!this._cd.control&&this._cd.control.pending}}let _=(()=>{class t extends v{constructor(t){super(t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g,2))},t.\u0275dir=n.Lb({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,e){2&t&&n.Ib("ng-untouched",e.ngClassUntouched)("ng-touched",e.ngClassTouched)("ng-pristine",e.ngClassPristine)("ng-dirty",e.ngClassDirty)("ng-valid",e.ngClassValid)("ng-invalid",e.ngClassInvalid)("ng-pending",e.ngClassPending)},features:[n.Ab]}),t})(),y=(()=>{class t extends v{constructor(t){super(t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(f,2))},t.\u0275dir=n.Lb({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:14,hostBindings:function(t,e){2&t&&n.Ib("ng-untouched",e.ngClassUntouched)("ng-touched",e.ngClassTouched)("ng-pristine",e.ngClassPristine)("ng-dirty",e.ngClassDirty)("ng-valid",e.ngClassValid)("ng-invalid",e.ngClassInvalid)("ng-pending",e.ngClassPending)},features:[n.Ab]}),t})();function x(t){return null==t||0===t.length}function C(t){return null!=t&&"number"==typeof t.length}const O=new n.s("NgValidators"),D=new n.s("NgAsyncValidators"),w=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class M{static min(t){return e=>{if(x(e.value)||x(t))return null;const i=parseFloat(e.value);return!isNaN(i)&&i<t?{min:{min:t,actual:e.value}}:null}}static max(t){return e=>{if(x(e.value)||x(t))return null;const i=parseFloat(e.value);return!isNaN(i)&&i>t?{max:{max:t,actual:e.value}}:null}}static required(t){return x(t.value)?{required:!0}:null}static requiredTrue(t){return!0===t.value?null:{required:!0}}static email(t){return x(t.value)||w.test(t.value)?null:{email:!0}}static minLength(t){return e=>x(e.value)||!C(e.value)?null:e.value.length<t?{minlength:{requiredLength:t,actualLength:e.value.length}}:null}static maxLength(t){return e=>C(e.value)&&e.value.length>t?{maxlength:{requiredLength:t,actualLength:e.value.length}}:null}static pattern(t){if(!t)return M.nullValidator;let e,i;return"string"==typeof t?(i="","^"!==t.charAt(0)&&(i+="^"),i+=t,"$"!==t.charAt(t.length-1)&&(i+="$"),e=new RegExp(i)):(i=t.toString(),e=t),t=>{if(x(t.value))return null;const n=t.value;return e.test(n)?null:{pattern:{requiredPattern:i,actualValue:n}}}}static nullValidator(t){return null}static compose(t){if(!t)return null;const e=t.filter(k);return 0==e.length?null:function(t){return I(P(t,e))}}static composeAsync(t){if(!t)return null;const e=t.filter(k);return 0==e.length?null:function(t){const i=P(t,e).map(S);return Object(s.a)(i).pipe(Object(r.a)(I))}}}function k(t){return null!=t}function S(t){const e=Object(n.vb)(t)?Object(o.a)(t):t;return Object(n.ub)(e),e}function I(t){let e={};return t.forEach(t=>{e=null!=t?Object.assign(Object.assign({},e),t):e}),0===Object.keys(e).length?null:e}function P(t,e){return e.map(e=>e(t))}function V(t){return t.map(t=>function(t){return!t.validate}(t)?t:e=>t.validate(e))}const R={provide:c,useExisting:Object(n.X)(()=>j),multi:!0};let j=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}registerOnChange(t){this.onChange=e=>{t(""==e?null:parseFloat(e))}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.I),n.Qb(n.l))},t.\u0275dir=n.Lb({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(t,e){1&t&&n.dc("input",(function(t){return e.onChange(t.target.value)}))("blur",(function(){return e.onTouched()}))},features:[n.Cb([R])]}),t})();const A={provide:c,useExisting:Object(n.X)(()=>T),multi:!0};let W=(()=>{class t{constructor(){this._accessors=[]}add(t,e){this._accessors.push([t,e])}remove(t){for(let e=this._accessors.length-1;e>=0;--e)if(this._accessors[e][1]===t)return void this._accessors.splice(e,1)}select(t){this._accessors.forEach(e=>{this._isSameGroup(e,t)&&e[1]!==t&&e[1].fireUncheck(t.value)})}_isSameGroup(t,e){return!!t[0].control&&t[0]._parent===e._control._parent&&t[1].name===e.name}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})(),T=(()=>{class t{constructor(t,e,i,n){this._renderer=t,this._elementRef=e,this._registry=i,this._injector=n,this.onChange=()=>{},this.onTouched=()=>{}}ngOnInit(){this._control=this._injector.get(g),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(t){this._state=t===this.value,this._renderer.setProperty(this._elementRef.nativeElement,"checked",this._state)}registerOnChange(t){this._fn=t,this.onChange=()=>{t(this.value),this._registry.select(this)}}fireUncheck(t){this.writeValue(t)}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_checkName(){!this.name&&this.formControlName&&(this.name=this.formControlName)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.I),n.Qb(n.l),n.Qb(W),n.Qb(n.t))},t.\u0275dir=n.Lb({type:t,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(t,e){1&t&&n.dc("change",(function(){return e.onChange()}))("blur",(function(){return e.onTouched()}))},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[n.Cb([A])]}),t})();const E={provide:c,useExisting:Object(n.X)(()=>F),multi:!0};let F=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",parseFloat(t))}registerOnChange(t){this.onChange=e=>{t(""==e?null:parseFloat(e))}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.I),n.Qb(n.l))},t.\u0275dir=n.Lb({type:t,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(t,e){1&t&&n.dc("change",(function(t){return e.onChange(t.target.value)}))("input",(function(t){return e.onChange(t.target.value)}))("blur",(function(){return e.onTouched()}))},features:[n.Cb([E])]}),t})();const L={provide:c,useExisting:Object(n.X)(()=>N),multi:!0};function Q(t,e){return null==t?""+e:(e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}let N=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=t=>{},this.onTouched=()=>{},this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){this.value=t;const e=this._getOptionId(t);null==e&&this._renderer.setProperty(this._elementRef.nativeElement,"selectedIndex",-1);const i=Q(e,t);this._renderer.setProperty(this._elementRef.nativeElement,"value",i)}registerOnChange(t){this.onChange=e=>{this.value=this._getOptionValue(e),t(this.value)}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(const e of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(e),t))return e;return null}_getOptionValue(t){const e=function(t){return t.split(":")[0]}(t);return this._optionMap.has(e)?this._optionMap.get(e):t}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.I),n.Qb(n.l))},t.\u0275dir=n.Lb({type:t,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(t,e){1&t&&n.dc("change",(function(t){return e.onChange(t.target.value)}))("blur",(function(){return e.onTouched()}))},inputs:{compareWith:"compareWith"},features:[n.Cb([L])]}),t})(),z=(()=>{class t{constructor(t,e,i){this._element=t,this._renderer=e,this._select=i,this._select&&(this.id=this._select._registerOption())}set ngValue(t){null!=this._select&&(this._select._optionMap.set(this.id,t),this._setElementValue(Q(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._setElementValue(t),this._select&&this._select.writeValue(this._select.value)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(n.I),n.Qb(N,9))},t.\u0275dir=n.Lb({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();const B={provide:c,useExisting:Object(n.X)(()=>$),multi:!0};function U(t,e){return null==t?""+e:("string"==typeof e&&(e=`'${e}'`),e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}let $=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=t=>{},this.onTouched=()=>{},this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){let e;if(this.value=t,Array.isArray(t)){const i=t.map(t=>this._getOptionId(t));e=(t,e)=>{t._setSelected(i.indexOf(e.toString())>-1)}}else e=(t,e)=>{t._setSelected(!1)};this._optionMap.forEach(e)}registerOnChange(t){this.onChange=e=>{const i=[];if(void 0!==e.selectedOptions){const t=e.selectedOptions;for(let e=0;e<t.length;e++){const n=t.item(e),a=this._getOptionValue(n.value);i.push(a)}}else{const t=e.options;for(let e=0;e<t.length;e++){const n=t.item(e);if(n.selected){const t=this._getOptionValue(n.value);i.push(t)}}}this.value=i,t(i)}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_registerOption(t){const e=(this._idCounter++).toString();return this._optionMap.set(e,t),e}_getOptionId(t){for(const e of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(e)._value,t))return e;return null}_getOptionValue(t){const e=function(t){return t.split(":")[0]}(t);return this._optionMap.has(e)?this._optionMap.get(e)._value:t}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.I),n.Qb(n.l))},t.\u0275dir=n.Lb({type:t,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(t,e){1&t&&n.dc("change",(function(t){return e.onChange(t.target)}))("blur",(function(){return e.onTouched()}))},inputs:{compareWith:"compareWith"},features:[n.Cb([B])]}),t})(),H=(()=>{class t{constructor(t,e,i){this._element=t,this._renderer=e,this._select=i,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){null!=this._select&&(this._value=t,this._setElementValue(U(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(U(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(n.I),n.Qb($,9))},t.\u0275dir=n.Lb({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();function G(t,e){return[...e.path,t]}function X(t,e){t.validator=M.compose([t.validator,e.validator]),t.asyncValidator=M.composeAsync([t.asyncValidator,e.asyncValidator]),e.valueAccessor.writeValue(t.value),function(t,e){e.valueAccessor.registerOnChange(i=>{t._pendingValue=i,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&q(t,e)})}(t,e),function(t,e){t.registerOnChange((t,i)=>{e.valueAccessor.writeValue(t),i&&e.viewToModelUpdate(t)})}(t,e),function(t,e){e.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&q(t,e),"submit"!==t.updateOn&&t.markAsTouched()})}(t,e),e.valueAccessor.setDisabledState&&t.registerOnDisabledChange(t=>{e.valueAccessor.setDisabledState(t)}),e._rawValidators.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(()=>t.updateValueAndValidity())}),e._rawAsyncValidators.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(()=>t.updateValueAndValidity())})}function q(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function K(t,e){t.validator=M.compose([t.validator,e.validator]),t.asyncValidator=M.composeAsync([t.asyncValidator,e.asyncValidator])}function Y(t){return null!=t?M.compose(V(t)):null}function J(t){return null!=t?M.composeAsync(V(t)):null}function Z(t,e){if(!t.hasOwnProperty("model"))return!1;const i=t.model;return!!i.isFirstChange()||!Object.is(e,i.currentValue)}const tt=[d,F,j,N,$,T];function et(t,e){t._syncPendingControls(),e.forEach(t=>{const e=t.control;"submit"===e.updateOn&&e._pendingChange&&(t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1)})}function it(t,e){if(!e)return null;Array.isArray(e);let i=void 0,n=void 0,a=void 0;return e.forEach(t=>{var e;t.constructor===p?i=t:(e=t,tt.some(t=>e.constructor===t)?n=t:a=t)}),a||n||i||null}function nt(t,e){const i=t.indexOf(e);i>-1&&t.splice(i,1)}function at(t,e,i,a){Object(n.Z)()&&"never"!==a&&((null!==a&&"once"!==a||e._ngModelWarningSentOnce)&&("always"!==a||i._ngModelWarningSent)||(e._ngModelWarningSentOnce=!0,i._ngModelWarningSent=!0))}function st(t){return(lt(t)?t.validators:t)||null}function ot(t){return Array.isArray(t)?Y(t):t||null}function rt(t,e){return(lt(e)?e.asyncValidators:t)||null}function ct(t){return Array.isArray(t)?J(t):t||null}function lt(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}class dt{constructor(t,e){this._hasOwnPendingAsyncValidator=!1,this._onCollectionChange=()=>{},this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=t,this._rawAsyncValidators=e,this._composedValidatorFn=ot(this._rawValidators),this._composedAsyncValidatorFn=ct(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get valid(){return"VALID"===this.status}get invalid(){return"INVALID"===this.status}get pending(){return"PENDING"==this.status}get disabled(){return"DISABLED"===this.status}get enabled(){return"DISABLED"!==this.status}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._rawValidators=t,this._composedValidatorFn=ot(t)}setAsyncValidators(t){this._rawAsyncValidators=t,this._composedAsyncValidatorFn=ct(t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(t=>t.markAllAsTouched())}markAsUntouched(t={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}markAsDirty(t={}){this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}markAsPristine(t={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(t=>{t.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}markAsPending(t={}){this.status="PENDING",!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}disable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status="DISABLED",this.errors=null,this._forEachChild(e=>{e.disable(Object.assign(Object.assign({},t),{onlySelf:!0}))}),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(t=>t(!0))}enable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status="VALID",this._forEachChild(e=>{e.enable(Object.assign(Object.assign({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(t=>t(!1))}_updateAncestors(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(t){this._parent=t}updateValueAndValidity(t={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),"VALID"!==this.status&&"PENDING"!==this.status||this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?"DISABLED":"VALID"}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status="PENDING",this._hasOwnPendingAsyncValidator=!0;const e=S(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(e=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(e,{emitEvent:t})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)}get(t){return function(t,e,i){if(null==e)return null;if(Array.isArray(e)||(e=e.split(".")),Array.isArray(e)&&0===e.length)return null;let n=t;return e.forEach(t=>{n=n instanceof ut?n.controls.hasOwnProperty(t)?n.controls[t]:null:n instanceof pt&&n.at(t)||null}),n}(this,t)}getError(t,e){const i=e?this.get(e):this;return i&&i.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}_initObservables(){this.valueChanges=new n.o,this.statusChanges=new n.o}_calculateStatus(){return this._allControlsDisabled()?"DISABLED":this.errors?"INVALID":this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus("PENDING")?"PENDING":this._anyControlsHaveStatus("INVALID")?"INVALID":"VALID"}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t={}){this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}_updateTouched(t={}){this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}_isBoxedValue(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){lt(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&this._parent&&this._parent.dirty&&!this._parent._anyControlsDirty()}}class ht extends dt{constructor(t=null,e,i){super(st(e),rt(i,e)),this._onChange=[],this._applyFormState(t),this._setUpdateStrategy(e),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),this._initObservables()}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(t=>t(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=null,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_clearChangeFns(){this._onChange=[],this._onDisabledChange=[],this._onCollectionChange=()=>{}}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_forEachChild(t){}_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(t){this._isBoxedValue(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}}class ut extends dt{constructor(t,e,i){super(st(e),rt(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e){this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}removeControl(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity(),this._onCollectionChange()}setControl(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){this._checkAllValuesPresent(t),Object.keys(t).forEach(i=>{this._throwIfControlMissing(i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){Object.keys(t).forEach(i=>{this.controls[i]&&this.controls[i].patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}reset(t={},e={}){this._forEachChild((i,n)=>{i.reset(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e instanceof ht?e.value:e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(t,e)=>!!e._syncPendingControls()||t);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_throwIfControlMissing(t){if(!Object.keys(this.controls).length)throw new Error("\n There are no form controls registered with this group yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.controls[t])throw new Error(`Cannot find form control with name: ${t}.`)}_forEachChild(t){Object.keys(this.controls).forEach(e=>t(this.controls[e],e))}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(const e of Object.keys(this.controls)){const i=this.controls[e];if(this.contains(e)&&t(i))return!0}return!1}_reduceValue(){return this._reduceChildren({},(t,e,i)=>((e.enabled||this.disabled)&&(t[i]=e.value),t))}_reduceChildren(t,e){let i=t;return this._forEachChild((t,n)=>{i=e(i,t,n)}),i}_allControlsDisabled(){for(const t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_checkAllValuesPresent(t){this._forEachChild((e,i)=>{if(void 0===t[i])throw new Error(`Must supply a value for form control with name: '${i}'.`)})}}class pt extends dt{constructor(t,e,i){super(st(e),rt(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}at(t){return this.controls[t]}push(t){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity(),this._onCollectionChange()}insert(t,e){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity()}removeAt(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),this.updateValueAndValidity()}setControl(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),e&&(this.controls.splice(t,0,e),this._registerControl(e)),this.updateValueAndValidity(),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){this._checkAllValuesPresent(t),t.forEach((t,i)=>{this._throwIfControlMissing(i),this.at(i).setValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t.forEach((t,i)=>{this.at(i)&&this.at(i).patchValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}reset(t=[],e={}){this._forEachChild((i,n)=>{i.reset(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t instanceof ht?t.value:t.getRawValue())}clear(){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity())}_syncPendingControls(){let t=this.controls.reduce((t,e)=>!!e._syncPendingControls()||t,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_throwIfControlMissing(t){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(t))throw new Error("Cannot find form control at index "+t)}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_checkAllValuesPresent(t){this._forEachChild((e,i)=>{if(void 0===t[i])throw new Error(`Must supply a value for form control at index: ${i}.`)})}_allControlsDisabled(){for(const t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}}const bt={provide:f,useExisting:Object(n.X)(()=>mt)},ft=(()=>Promise.resolve(null))();let mt=(()=>{class t extends f{constructor(t,e){super(),this.submitted=!1,this._directives=[],this.ngSubmit=new n.o,this.form=new ut({},Y(t),J(e))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){ft.then(()=>{const e=this._findContainer(t.path);t.control=e.registerControl(t.name,t.control),X(t.control,t),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.push(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){ft.then(()=>{const e=this._findContainer(t.path);e&&e.removeControl(t.name),nt(this._directives,t)})}addFormGroup(t){ft.then(()=>{const e=this._findContainer(t.path),i=new ut({});K(i,t),e.registerControl(t.name,i),i.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){ft.then(()=>{const e=this._findContainer(t.path);e&&e.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,e){ft.then(()=>{this.form.get(t.path).setValue(e)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submitted=!0,et(this.form,this._directives),this.ngSubmit.emit(t),!1}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(O,10),n.Qb(D,10))},t.\u0275dir=n.Lb({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(t,e){1&t&&n.dc("submit",(function(t){return e.onSubmit(t)}))("reset",(function(){return e.onReset()}))},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[n.Cb([bt]),n.Ab]}),t})(),gt=(()=>{class t extends f{ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return G(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}get validator(){return Y(this._validators)}get asyncValidator(){return J(this._asyncValidators)}_checkParentType(){}}return t.\u0275fac=function(e){return vt(e||t)},t.\u0275dir=n.Lb({type:t,features:[n.Ab]}),t})();const vt=n.Yb(gt),_t={provide:f,useExisting:Object(n.X)(()=>yt)};let yt=(()=>{class t extends gt{constructor(t,e,i){super(),this._parent=t,this._validators=e,this._asyncValidators=i}_checkParentType(){}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(f,5),n.Qb(O,10),n.Qb(D,10))},t.\u0275dir=n.Lb({type:t,selectors:[["","ngModelGroup",""]],inputs:{name:["ngModelGroup","name"]},exportAs:["ngModelGroup"],features:[n.Cb([_t]),n.Ab]}),t})();const xt={provide:g,useExisting:Object(n.X)(()=>Ot)},Ct=(()=>Promise.resolve(null))();let Ot=(()=>{class t extends g{constructor(t,e,i,a){super(),this.control=new ht,this._registered=!1,this.update=new n.o,this._parent=t,this._rawValidators=e||[],this._rawAsyncValidators=i||[],this.valueAccessor=it(0,a)}ngOnChanges(t){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in t&&this._updateDisabled(t),Z(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._parent?G(this.name,this._parent):[this.name]}get formDirective(){return this._parent?this._parent.formDirective:null}get validator(){return Y(this._rawValidators)}get asyncValidator(){return J(this._rawAsyncValidators)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_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(){X(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(t){Ct.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1})})}_updateDisabled(t){const e=t.isDisabled.currentValue,i=""===e||e&&"false"!==e;Ct.then(()=>{i&&!this.control.disabled?this.control.disable():!i&&this.control.disabled&&this.control.enable()})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(f,9),n.Qb(O,10),n.Qb(D,10),n.Qb(c,10))},t.\u0275dir=n.Lb({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:[n.Cb([xt]),n.Ab,n.Bb]}),t})(),Dt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),t})();const wt=new n.s("NgModelWithFormControlWarning"),Mt={provide:g,useExisting:Object(n.X)(()=>kt)};let kt=(()=>{class t extends g{constructor(t,e,i,a){super(),this._ngModelWarningConfig=a,this.update=new n.o,this._ngModelWarningSent=!1,this._rawValidators=t||[],this._rawAsyncValidators=e||[],this.valueAccessor=it(0,i)}set isDisabled(t){}ngOnChanges(e){this._isControlChanged(e)&&(X(this.form,this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this.form.updateValueAndValidity({emitEvent:!1})),Z(e,this.viewModel)&&(at(0,t,this,this._ngModelWarningConfig),this.form.setValue(this.model),this.viewModel=this.model)}get path(){return[]}get validator(){return Y(this._rawValidators)}get asyncValidator(){return J(this._rawAsyncValidators)}get control(){return this.form}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_isControlChanged(t){return t.hasOwnProperty("form")}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(O,10),n.Qb(D,10),n.Qb(c,10),n.Qb(wt,8))},t.\u0275dir=n.Lb({type:t,selectors:[["","formControl",""]],inputs:{isDisabled:["disabled","isDisabled"],form:["formControl","form"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[n.Cb([Mt]),n.Ab,n.Bb]}),t._ngModelWarningSentOnce=!1,t})();const St={provide:f,useExisting:Object(n.X)(()=>It)};let It=(()=>{class t extends f{constructor(t,e){super(),this._validators=t,this._asyncValidators=e,this.submitted=!1,this.directives=[],this.form=null,this.ngSubmit=new n.o}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations())}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){const e=this.form.get(t.path);return X(e,t),e.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),e}getControl(t){return this.form.get(t.path)}removeControl(t){nt(this.directives,t)}addFormGroup(t){const e=this.form.get(t.path);K(e,t),e.updateValueAndValidity({emitEvent:!1})}removeFormGroup(t){}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){const e=this.form.get(t.path);K(e,t),e.updateValueAndValidity({emitEvent:!1})}removeFormArray(t){}getFormArray(t){return this.form.get(t.path)}updateModel(t,e){this.form.get(t.path).setValue(e)}onSubmit(t){return this.submitted=!0,et(this.form,this.directives),this.ngSubmit.emit(t),!1}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_updateDomValue(){this.directives.forEach(t=>{const e=this.form.get(t.path);t.control!==e&&(function(t,e){const i=()=>{};e.valueAccessor.registerOnChange(i),e.valueAccessor.registerOnTouched(i),e._rawValidators.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(null)}),e._rawAsyncValidators.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(null)}),t&&t._clearChangeFns()}(t.control,t),e&&X(e,t),t.control=e)}),this.form._updateTreeValidity({emitEvent:!1})}_updateRegistrations(){this.form._registerOnCollectionChange(()=>this._updateDomValue()),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{}),this._oldForm=this.form}_updateValidators(){const t=Y(this._validators);this.form.validator=M.compose([this.form.validator,t]);const e=J(this._asyncValidators);this.form.asyncValidator=M.composeAsync([this.form.asyncValidator,e])}_checkFormPresent(){}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(O,10),n.Qb(D,10))},t.\u0275dir=n.Lb({type:t,selectors:[["","formGroup",""]],hostBindings:function(t,e){1&t&&n.dc("submit",(function(t){return e.onSubmit(t)}))("reset",(function(){return e.onReset()}))},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[n.Cb([St]),n.Ab,n.Bb]}),t})();const Pt={provide:f,useExisting:Object(n.X)(()=>Vt)};let Vt=(()=>{class t extends gt{constructor(t,e,i){super(),this._parent=t,this._validators=e,this._asyncValidators=i}_checkParentType(){At(this._parent)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(f,13),n.Qb(O,10),n.Qb(D,10))},t.\u0275dir=n.Lb({type:t,selectors:[["","formGroupName",""]],inputs:{name:["formGroupName","name"]},features:[n.Cb([Pt]),n.Ab]}),t})();const Rt={provide:f,useExisting:Object(n.X)(()=>jt)};let jt=(()=>{class t extends f{constructor(t,e,i){super(),this._parent=t,this._validators=e,this._asyncValidators=i}ngOnInit(){this._checkParentType(),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return G(null==this.name?this.name:this.name.toString(),this._parent)}get validator(){return Y(this._validators)}get asyncValidator(){return J(this._asyncValidators)}_checkParentType(){At(this._parent)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(f,13),n.Qb(O,10),n.Qb(D,10))},t.\u0275dir=n.Lb({type:t,selectors:[["","formArrayName",""]],inputs:{name:["formArrayName","name"]},features:[n.Cb([Rt]),n.Ab]}),t})();function At(t){return!(t instanceof Vt||t instanceof It||t instanceof jt)}const Wt={provide:g,useExisting:Object(n.X)(()=>Tt)};let Tt=(()=>{class t extends g{constructor(t,e,i,a,s){super(),this._ngModelWarningConfig=s,this._added=!1,this.update=new n.o,this._ngModelWarningSent=!1,this._parent=t,this._rawValidators=e||[],this._rawAsyncValidators=i||[],this.valueAccessor=it(0,a)}set isDisabled(t){}ngOnChanges(e){this._added||this._setUpControl(),Z(e,this.viewModel)&&(at(0,t,this,this._ngModelWarningConfig),this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}get path(){return G(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}get validator(){return Y(this._rawValidators)}get asyncValidator(){return J(this._rawAsyncValidators)}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this._added=!0}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(f,13),n.Qb(O,10),n.Qb(D,10),n.Qb(c,10),n.Qb(wt,8))},t.\u0275dir=n.Lb({type:t,selectors:[["","formControlName",""]],inputs:{isDisabled:["disabled","isDisabled"],name:["formControlName","name"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[n.Cb([Wt]),n.Ab,n.Bb]}),t._ngModelWarningSentOnce=!1,t})();const Et={provide:O,useExisting:Object(n.X)(()=>Lt),multi:!0},Ft={provide:O,useExisting:Object(n.X)(()=>Qt),multi:!0};let Lt=(()=>{class t{constructor(){this._required=!1}get required(){return this._required}set required(t){this._required=null!=t&&!1!==t&&""+t!="false",this._onChange&&this._onChange()}validate(t){return this.required?M.required(t):null}registerOnValidatorChange(t){this._onChange=t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(t,e){2&t&&n.Eb("required",e.required?"":null)},inputs:{required:"required"},features:[n.Cb([Et])]}),t})(),Qt=(()=>{class t extends Lt{validate(t){return this.required?M.requiredTrue(t):null}}return t.\u0275fac=function(e){return Nt(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["input","type","checkbox","required","","formControlName",""],["input","type","checkbox","required","","formControl",""],["input","type","checkbox","required","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&n.Eb("required",e.required?"":null)},features:[n.Cb([Ft]),n.Ab]}),t})();const Nt=n.Yb(Qt),zt={provide:O,useExisting:Object(n.X)(()=>Bt),multi:!0};let Bt=(()=>{class t{constructor(){this._enabled=!1}set email(t){this._enabled=""===t||!0===t||"true"===t,this._onChange&&this._onChange()}validate(t){return this._enabled?M.email(t):null}registerOnValidatorChange(t){this._onChange=t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["","email","","formControlName",""],["","email","","formControl",""],["","email","","ngModel",""]],inputs:{email:"email"},features:[n.Cb([zt])]}),t})();const Ut={provide:O,useExisting:Object(n.X)(()=>$t),multi:!0};let $t=(()=>{class t{constructor(){this._validator=M.nullValidator}ngOnChanges(t){"minlength"in t&&(this._createValidator(),this._onChange&&this._onChange())}validate(t){return null==this.minlength?null:this._validator(t)}registerOnValidatorChange(t){this._onChange=t}_createValidator(){this._validator=M.minLength("number"==typeof this.minlength?this.minlength:parseInt(this.minlength,10))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&n.Eb("minlength",e.minlength?e.minlength:null)},inputs:{minlength:"minlength"},features:[n.Cb([Ut]),n.Bb]}),t})();const Ht={provide:O,useExisting:Object(n.X)(()=>Gt),multi:!0};let Gt=(()=>{class t{constructor(){this._validator=M.nullValidator}ngOnChanges(t){"maxlength"in t&&(this._createValidator(),this._onChange&&this._onChange())}validate(t){return null!=this.maxlength?this._validator(t):null}registerOnValidatorChange(t){this._onChange=t}_createValidator(){this._validator=M.maxLength("number"==typeof this.maxlength?this.maxlength:parseInt(this.maxlength,10))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&n.Eb("maxlength",e.maxlength?e.maxlength:null)},inputs:{maxlength:"maxlength"},features:[n.Cb([Ht]),n.Bb]}),t})();const Xt={provide:O,useExisting:Object(n.X)(()=>qt),multi:!0};let qt=(()=>{class t{constructor(){this._validator=M.nullValidator}ngOnChanges(t){"pattern"in t&&(this._createValidator(),this._onChange&&this._onChange())}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}_createValidator(){this._validator=M.pattern(this.pattern)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&n.Eb("pattern",e.pattern?e.pattern:null)},inputs:{pattern:"pattern"},features:[n.Cb([Xt]),n.Bb]}),t})(),Kt=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)}}),t})(),Yt=(()=>{class t{group(t,e=null){const i=this._reduceControls(t);let n=null,a=null,s=void 0;return null!=e&&(function(t){return void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn}(e)?(n=null!=e.validators?e.validators:null,a=null!=e.asyncValidators?e.asyncValidators:null,s=null!=e.updateOn?e.updateOn:void 0):(n=null!=e.validator?e.validator:null,a=null!=e.asyncValidator?e.asyncValidator:null)),new ut(i,{asyncValidators:a,updateOn:s,validators:n})}control(t,e,i){return new ht(t,e,i)}array(t,e,i){const n=t.map(t=>this._createControl(t));return new pt(n,e,i)}_reduceControls(t){const e={};return Object.keys(t).forEach(i=>{e[i]=this._createControl(t[i])}),e}_createControl(t){return t instanceof ht||t instanceof ut||t instanceof pt?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})(),Jt=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},providers:[W],imports:[Kt]}),t})(),Zt=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:wt,useValue:e.warnOnNgModelWithFormControl}]}}}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},providers:[Yt,W],imports:[Kt]}),t})()},"3UWI":function(t,e,i){"use strict";i.d(e,"a",(function(){return c}));var n=i("D0XW"),a=i("zx2A");class s{constructor(t){this.durationSelector=t}call(t,e){return e.subscribe(new o(t,this.durationSelector))}}class o extends a.b{constructor(t,e){super(t),this.durationSelector=e,this.hasValue=!1}_next(t){if(this.value=t,this.hasValue=!0,!this.throttled){let i;try{const{durationSelector:e}=this;i=e(t)}catch(e){return this.destination.error(e)}const n=Object(a.c)(i,new a.a(this));!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}}clearThrottle(){const{value:t,hasValue:e,throttled:i}=this;i&&(this.remove(i),this.throttled=void 0,i.unsubscribe()),e&&(this.value=void 0,this.hasValue=!1,this.destination.next(t))}notifyNext(){this.clearThrottle()}notifyComplete(){this.clearThrottle()}}var r=i("PqYM");function c(t,e=n.a){return i=()=>Object(r.a)(t,e),function(t){return t.lift(new s(i))};var i}},4:function(t,e){},"4I5i":function(t,e,i){"use strict";i.d(e,"a",(function(){return n}));const n=(()=>{function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t})()},"4zkx":function(t,e,i){"use strict";i.d(e,"a",(function(){return u}));var n=i("vkgz"),a=i("JIr8"),s=i("lJxs"),o=i("LRne"),r=i("+rOU"),c=i("fXoL"),l=i("sYmb"),d=i("tk/3"),h=i("6Psc");let u=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.foldersService=i,this.componentFactoryResolver=n,this.injector=a,this.appRef=s,this.sideBarForm=!1,this.sideBarAdmin=!1,this.hideSideBar=!1,this.showhHeaderPanel=!0,this.showMenuShortcut=!0,this.showMenuNav=!0,this.sideNavLeft=null,this.sideBarButton=null,this.currentBasketInfo={ownerId:0,groupId:0,basketId:""},this.folderId=0,this.headerMessageIcon="",this.headerMessage="",this.subHeaderMessage="",this.user={firstname:"",lastname:"",groups:[],privileges:[],preferences:[],featureTour:[]},this.nbResourcesFollowed=0,this.base64=null}loadHeader(){return new Promise((t,e)=>{this.http.get("../rest/header").pipe(Object(n.a)(e=>{this.setUser(e.user),t(!0)}),Object(a.a)(e=>(console.log(e),t(!1),Object(o.a)(!1)))).subscribe()})}resfreshCurrentUser(){return new Promise((t,e)=>{this.http.get("../rest/currentUser/profile").pipe(Object(s.a)(e=>{this.user={mode:e.mode,id:e.id,userId:e.user_id,firstname:e.firstname,lastname:e.lastname,entities:e.entities,groups:e.groups,preferences:e.preferences,privileges:"ALL_PRIVILEGES"===e.privileges[0]?this.user.privileges:e.privileges,featureTour:e.featureTour},this.nbResourcesFollowed=e.nbFollowedResources,t(!0)})).subscribe()})}setUser(t={firstname:"",lastname:"",groups:[],privileges:[]}){this.user=t}getLastLoadedFile(){return this.base64}setLoadedFile(t){this.base64=t}setHeader(t,e="",i=""){this.headerMessage=t,this.subHeaderMessage=e,this.headerMessageIcon=i}resetSideNavSelection(){this.currentBasketInfo={ownerId:0,groupId:0,basketId:""},this.foldersService.setFolder({id:0}),this.sideBarForm=!1,this.showhHeaderPanel=!0,this.showMenuShortcut=!0,this.showMenuNav=!0,this.sideBarAdmin=!1,this.sideBarButton=null,this.hideSideBar=!0}injectInSideBarLeft(t,e,i="adminMenu",n=""){"form"===n?(this.sideBarForm=!0,this.showhHeaderPanel=!0,this.showMenuShortcut=!1,this.showMenuNav=!1,this.sideBarAdmin=!0):(this.showhHeaderPanel=!0,this.showMenuShortcut=!0,this.showMenuNav=!0),this.portalHost=new r.e(document.querySelector("#"+i),this.componentFactoryResolver,this.appRef,this.injector);const a=new r.i(t,e);this.portalHost.attach(a)}initTemplate(t,e,i="adminMenu",n=""){this.portalHost=new r.e(document.querySelector("#"+i),this.componentFactoryResolver,this.appRef,this.injector);const a=new r.i(t,e);this.portalHost.attach(a)}}return t.\u0275fac=function(e){return new(e||t)(c.ac(l.e),c.ac(d.b),c.ac(h.a),c.ac(c.j),c.ac(c.t),c.ac(c.g))},t.\u0275prov=c.Mb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()},5:function(t,e){},"5+WD":function(t,e,i){"use strict";i.d(e,"a",(function(){return _t})),i.d(e,"b",(function(){return bt})),i.d(e,"c",(function(){return mt})),i.d(e,"d",(function(){return vt})),i.d(e,"e",(function(){return ut})),i.d(e,"f",(function(){return ct})),i.d(e,"g",(function(){return xt})),i.d(e,"h",(function(){return G})),i.d(e,"i",(function(){return X}));var n=i("fXoL"),a=i("ofXK"),s=i("vxfF"),o=i("nLfN"),r=i("8LU1"),c=i("XNiG"),l=i("quSY"),d=i("HDdC"),h=i("D0XW"),u=i("Y7HM");function p(t){const{subscriber:e,counter:i,period:n}=t;e.next(i),this.schedule({subscriber:e,counter:i+1,period:n},n)}var b=i("eNwd"),f=i("VRyK"),m=i("1G5W"),g=i("JX91"),v=i("lJxs"),_=i("IzEk"),y=i("vkgz"),x=i("eIep"),C=i("cH1L");function O(t,e){for(let i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function D(t,e){const i=e?"":"none";O(t.style,{touchAction:e?"":"none",webkitUserDrag:e?"":"none",webkitTapHighlightColor:e?"":"transparent",userSelect:i,msUserSelect:i,webkitUserSelect:i,MozUserSelect:i})}function w(t,e){const i=t.style;i.position=e?"":"fixed",i.top=i.opacity=e?"":"0",i.left=e?"":"-999em"}function M(t){const e=t.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(t)*e}function k(t,e){return t.getPropertyValue(e).split(",").map(t=>t.trim())}function S(t){const e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}}function I(t,e,i){const{top:n,bottom:a,left:s,right:o}=t;return i>=n&&i<=a&&e>=s&&e<=o}function P(t,e,i){t.top+=e,t.bottom=t.top+t.height,t.left+=i,t.right=t.left+t.width}function V(t,e,i,n){const{top:a,right:s,bottom:o,left:r,width:c,height:l}=t,d=c*e,h=l*e;return n>a-h&&n<o+h&&i>r-d&&i<s+d}class R{constructor(t,e){this._document=t,this._viewportRuler=e,this.positions=new Map}clear(){this.positions.clear()}cache(t){this.clear(),this.positions.set(this._document,{scrollPosition:this._viewportRuler.getViewportScrollPosition()}),t.forEach(t=>{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:S(t)})})}handleScroll(t){const e=t.target,i=this.positions.get(e);if(!i)return null;const n=e===this._document?e.documentElement:e,a=i.scrollPosition;let s,o;if(e===this._document){const t=this._viewportRuler.getViewportScrollPosition();s=t.top,o=t.left}else s=e.scrollTop,o=e.scrollLeft;const r=a.top-s,c=a.left-o;return this.positions.forEach((t,i)=>{t.clientRect&&e!==i&&n.contains(i)&&P(t.clientRect,r,c)}),a.top=s,a.left=o,{top:r,left:c}}}function j(t){const e=t.cloneNode(!0),i=e.querySelectorAll("[id]"),n=t.nodeName.toLowerCase();e.removeAttribute("id");for(let a=0;a<i.length;a++)i[a].removeAttribute("id");return"canvas"===n?E(t,e):"input"!==n&&"select"!==n&&"textarea"!==n||T(t,e),A("canvas",t,e,E),A("input, textarea, select",t,e,T),e}function A(t,e,i,n){const a=e.querySelectorAll(t);if(a.length){const e=i.querySelectorAll(t);for(let t=0;t<a.length;t++)n(a[t],e[t])}}let W=0;function T(t,e){"file"!==e.type&&(e.value=t.value),"radio"===e.type&&e.name&&(e.name=`mat-clone-${e.name}-${W++}`)}function E(t,e){const i=e.getContext("2d");if(i)try{i.drawImage(t,0,0)}catch(n){}}const F=Object(o.f)({passive:!0}),L=Object(o.f)({passive:!1});class Q{constructor(t,e,i,n,a,s){this._config=e,this._document=i,this._ngZone=n,this._viewportRuler=a,this._dragDropRegistry=s,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._moveEvents=new c.a,this._pointerMoveSubscription=l.a.EMPTY,this._pointerUpSubscription=l.a.EMPTY,this._scrollSubscription=l.a.EMPTY,this._resizeSubscription=l.a.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this._disabled=!1,this.beforeStarted=new c.a,this.started=new c.a,this.released=new c.a,this.ended=new c.a,this.entered=new c.a,this.exited=new c.a,this.dropped=new c.a,this.moved=this._moveEvents,this._pointerDown=t=>{if(this.beforeStarted.next(),this._handles.length){const e=this._handles.find(e=>{const i=t.target;return!!i&&(i===e||e.contains(i))});!e||this._disabledHandles.has(e)||this.disabled||this._initializeDragSequence(e,t)}else this.disabled||this._initializeDragSequence(this._rootElement,t)},this._pointerMove=t=>{t.preventDefault();const e=this._getPointerPositionOnPage(t);if(!this._hasStartedDragging){if(Math.abs(e.x-this._pickupPositionOnPage.x)+Math.abs(e.y-this._pickupPositionOnPage.y)>=this._config.dragStartThreshold){const e=Date.now()>=this._dragStartTime+this._getDragStartDelay(t),i=this._dropContainer;if(!e)return void this._endDragSequence(t);i&&(i.isDragging()||i.isReceiving())||(this._hasStartedDragging=!0,this._ngZone.run(()=>this._startDragSequence(t)))}return}this._boundaryElement&&(this._previewRect&&(this._previewRect.width||this._previewRect.height)||(this._previewRect=(this._preview||this._rootElement).getBoundingClientRect()));const i=this._getConstrainedPointerPosition(e);if(this._hasMoved=!0,this._lastKnownPointerPosition=e,this._updatePointerDirectionDelta(i),this._dropContainer)this._updateActiveDropContainer(i,e);else{const t=this._activeTransform;t.x=i.x-this._pickupPositionOnPage.x+this._passiveTransform.x,t.y=i.y-this._pickupPositionOnPage.y+this._passiveTransform.y,this._applyRootElementTransform(t.x,t.y),"undefined"!=typeof SVGElement&&this._rootElement instanceof SVGElement&&this._rootElement.setAttribute("transform",`translate(${t.x} ${t.y})`)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:i,event:t,distance:this._getDragDistance(i),delta:this._pointerDirectionDelta})})},this._pointerUp=t=>{this._endDragSequence(t)},this.withRootElement(t),this._parentPositions=new R(i,a),s.registerDragItem(this)}get disabled(){return this._disabled||!(!this._dropContainer||!this._dropContainer.disabled)}set disabled(t){const e=Object(r.c)(t);e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions())}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(t){return this._handles=t.map(t=>Object(r.e)(t)),this._handles.forEach(t=>D(t,!1)),this._toggleNativeDragInteractions(),this}withPreviewTemplate(t){return this._previewTemplate=t,this}withPlaceholderTemplate(t){return this._placeholderTemplate=t,this}withRootElement(t){const e=Object(r.e)(t);return e!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{e.addEventListener("mousedown",this._pointerDown,L),e.addEventListener("touchstart",this._pointerDown,F)}),this._initialTransform=void 0,this._rootElement=e),"undefined"!=typeof SVGElement&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(t){return this._boundaryElement=t?Object(r.e)(t):null,this._resizeSubscription.unsubscribe(),t&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}dispose(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&B(this._rootElement),B(this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=null}isDragging(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(t){this._handles.indexOf(t)>-1&&this._disabledHandles.add(t)}enableHandle(t){this._disabledHandles.delete(t)}withDirection(t){return this._direction=t,this}_withDropContainer(t){this._dropContainer=t}getFreeDragPosition(){const t=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:t.x,y:t.y}}setFreeDragPosition(t){return this._activeTransform={x:0,y:0},this._passiveTransform.x=t.x,this._passiveTransform.y=t.y,this._dropContainer||this._applyRootElementTransform(t.x,t.y),this}_sortFromLastPointerPosition(){const t=this._lastKnownPointerPosition;t&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(t),t)}_removeSubscriptions(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe()}_destroyPreview(){this._preview&&B(this._preview),this._previewRef&&this._previewRef.destroy(),this._preview=this._previewRef=null}_destroyPlaceholder(){this._placeholder&&B(this._placeholder),this._placeholderRef&&this._placeholderRef.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(t){this._dragDropRegistry.isDragging(this)&&(this._removeSubscriptions(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging&&(this.released.next({source:this}),this._dropContainer?(this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(t),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)})):(this._passiveTransform.x=this._activeTransform.x,this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(this._getPointerPositionOnPage(t))})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this))))}_startDragSequence(t){U(t)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();const e=this._dropContainer;if(e){const t=this._rootElement,n=t.parentNode,a=this._preview=this._createPreviewElement(),s=this._placeholder=this._createPlaceholderElement(),o=this._anchor=this._anchor||this._document.createComment("");n.insertBefore(o,t),w(t,!1),this._document.body.appendChild(n.replaceChild(s,t)),(i=this._document,i.fullscreenElement||i.webkitFullscreenElement||i.mozFullScreenElement||i.msFullscreenElement||i.body).appendChild(a),this.started.next({source:this}),e.start(),this._initialContainer=e,this._initialIndex=e.getItemIndex(this)}else this.started.next({source:this}),this._initialContainer=this._initialIndex=void 0;var i;this._parentPositions.cache(e?e.getScrollableParents():[])}_initializeDragSequence(t,e){e.stopPropagation();const i=this.isDragging(),n=U(e),a=!n&&0!==e.button,s=this._rootElement,o=!n&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now();if(e.target&&e.target.draggable&&"mousedown"===e.type&&e.preventDefault(),i||a||o)return;this._handles.length&&(this._rootElementTapHighlight=s.style.webkitTapHighlightColor||"",s.style.webkitTapHighlightColor="transparent"),this._hasStartedDragging=this._hasMoved=!1,this._removeSubscriptions(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scroll.subscribe(t=>{this._updateOnScroll(t)}),this._boundaryElement&&(this._boundaryRect=S(this._boundaryElement));const r=this._previewTemplate;this._pickupPositionInElement=r&&r.template&&!r.matchSize?{x:0,y:0}:this._getPointerPositionInElement(t,e);const c=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:c.x,y:c.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(t){w(this._rootElement,!0),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._boundaryRect=this._previewRect=void 0,this._ngZone.run(()=>{const e=this._dropContainer,i=e.getItemIndex(this),n=this._getPointerPositionOnPage(t),a=this._getDragDistance(this._getPointerPositionOnPage(t)),s=e._isOverContainer(n.x,n.y);this.ended.next({source:this,distance:a}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:a}),e.drop(this,i,this._initialContainer,s,a,this._initialIndex),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:t,y:e},{x:i,y:n}){let a=this._initialContainer._getSiblingContainerFromPosition(this,t,e);!a&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(t,e)&&(a=this._initialContainer),a&&a!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=a,this._dropContainer.enter(this,t,e,a===this._initialContainer&&a.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:a,currentIndex:a.getItemIndex(this)})}),this._dropContainer._startScrollingIfNecessary(i,n),this._dropContainer._sortItem(this,t,e,this._pointerDirectionDelta),this._preview.style.transform=N(t-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y)}_createPreviewElement(){const t=this._previewTemplate,e=this.previewClass,i=t?t.template:null;let n;if(i&&t){const e=t.matchSize?this._rootElement.getBoundingClientRect():null,a=t.viewContainer.createEmbeddedView(i,t.context);a.detectChanges(),n=$(a,this._document),this._previewRef=a,t.matchSize?H(n,e):n.style.transform=N(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else{const t=this._rootElement;n=j(t),H(n,t.getBoundingClientRect())}return O(n.style,{pointerEvents:"none",margin:"0",position:"fixed",top:"0",left:"0",zIndex:""+(this._config.zIndex||1e3)}),D(n,!1),n.classList.add("cdk-drag-preview"),n.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(t=>n.classList.add(t)):n.classList.add(e)),n}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();const t=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._preview.style.transform=N(t.left,t.top);const e=function(t){const e=getComputedStyle(t),i=k(e,"transition-property"),n=i.find(t=>"transform"===t||"all"===t);if(!n)return 0;const a=i.indexOf(n),s=k(e,"transition-duration"),o=k(e,"transition-delay");return M(s[a])+M(o[a])}(this._preview);return 0===e?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(t=>{const i=e=>{(!e||e.target===this._preview&&"transform"===e.propertyName)&&(this._preview.removeEventListener("transitionend",i),t(),clearTimeout(n))},n=setTimeout(i,1.5*e);this._preview.addEventListener("transitionend",i)}))}_createPlaceholderElement(){const t=this._placeholderTemplate,e=t?t.template:null;let i;return e?(this._placeholderRef=t.viewContainer.createEmbeddedView(e,t.context),this._placeholderRef.detectChanges(),i=$(this._placeholderRef,this._document)):i=j(this._rootElement),i.classList.add("cdk-drag-placeholder"),i}_getPointerPositionInElement(t,e){const i=this._rootElement.getBoundingClientRect(),n=t===this._rootElement?null:t,a=n?n.getBoundingClientRect():i,s=U(e)?e.targetTouches[0]:e,o=this._getViewportScrollPosition();return{x:a.left-i.left+(s.pageX-a.left-o.left),y:a.top-i.top+(s.pageY-a.top-o.top)}}_getPointerPositionOnPage(t){const e=this._getViewportScrollPosition(),i=U(t)?t.touches[0]||t.changedTouches[0]||{pageX:0,pageY:0}:t,n=i.pageX-e.left,a=i.pageY-e.top;if(this._ownerSVGElement){const t=this._ownerSVGElement.getScreenCTM();if(t){const e=this._ownerSVGElement.createSVGPoint();return e.x=n,e.y=a,e.matrixTransform(t.inverse())}}return{x:n,y:a}}_getConstrainedPointerPosition(t){const e=this._dropContainer?this._dropContainer.lockAxis:null;let{x:i,y:n}=this.constrainPosition?this.constrainPosition(t,this):t;if("x"===this.lockAxis||"x"===e?n=this._pickupPositionOnPage.y:"y"!==this.lockAxis&&"y"!==e||(i=this._pickupPositionOnPage.x),this._boundaryRect){const{x:t,y:e}=this._pickupPositionInElement,a=this._boundaryRect,s=this._previewRect,o=a.top+e,r=a.bottom-(s.height-e);i=z(i,a.left+t,a.right-(s.width-t)),n=z(n,o,r)}return{x:i,y:n}}_updatePointerDirectionDelta(t){const{x:e,y:i}=t,n=this._pointerDirectionDelta,a=this._pointerPositionAtLastDirectionChange,s=Math.abs(e-a.x),o=Math.abs(i-a.y);return s>this._config.pointerDirectionChangeThreshold&&(n.x=e>a.x?1:-1,a.x=e),o>this._config.pointerDirectionChangeThreshold&&(n.y=i>a.y?1:-1,a.y=i),n}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;const t=this._handles.length>0||!this.isDragging();t!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=t,D(this._rootElement,t))}_removeRootElementListeners(t){t.removeEventListener("mousedown",this._pointerDown,L),t.removeEventListener("touchstart",this._pointerDown,F)}_applyRootElementTransform(t,e){const i=N(t,e);null==this._initialTransform&&(this._initialTransform=this._rootElement.style.transform||""),this._rootElement.style.transform=this._initialTransform?i+" "+this._initialTransform:i}_getDragDistance(t){const e=this._pickupPositionOnPage;return e?{x:t.x-e.x,y:t.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:t,y:e}=this._passiveTransform;if(0===t&&0===e||this.isDragging()||!this._boundaryElement)return;const i=this._boundaryElement.getBoundingClientRect(),n=this._rootElement.getBoundingClientRect();if(0===i.width&&0===i.height||0===n.width&&0===n.height)return;const a=i.left-n.left,s=n.right-i.right,o=i.top-n.top,r=n.bottom-i.bottom;i.width>n.width?(a>0&&(t+=a),s>0&&(t-=s)):t=0,i.height>n.height?(o>0&&(e+=o),r>0&&(e-=r)):e=0,t===this._passiveTransform.x&&e===this._passiveTransform.y||this.setFreeDragPosition({y:e,x:t})}_getDragStartDelay(t){const e=this.dragStartDelay;return"number"==typeof e?e:U(t)?e.touch:e?e.mouse:0}_updateOnScroll(t){const e=this._parentPositions.handleScroll(t);if(e){const i=t.target;this._boundaryRect&&(i===this._document||i!==this._boundaryElement&&i.contains(this._boundaryElement))&&P(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){const t=this._parentPositions.positions.get(this._document);return t?t.scrollPosition:this._viewportRuler.getViewportScrollPosition()}}function N(t,e){return`translate3d(${Math.round(t)}px, ${Math.round(e)}px, 0)`}function z(t,e,i){return Math.max(e,Math.min(i,t))}function B(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function U(t){return"t"===t.type[0]}function $(t,e){const i=t.rootNodes;if(1===i.length&&i[0].nodeType===e.ELEMENT_NODE)return i[0];const n=e.createElement("div");return i.forEach(t=>n.appendChild(t)),n}function H(t,e){t.style.width=e.width+"px",t.style.height=e.height+"px",t.style.transform=N(e.left,e.top)}function G(t,e,i){const n=q(e,t.length-1),a=q(i,t.length-1);if(n===a)return;const s=t[n],o=a<n?-1:1;for(let r=n;r!==a;r+=o)t[r]=t[r+o];t[a]=s}function X(t,e,i,n){const a=q(i,t.length-1),s=q(n,e.length);t.length&&e.splice(s,0,t.splice(a,1)[0])}function q(t,e){return Math.max(0,Math.min(e,t))}class K{constructor(t,e,i,n,a){this._dragDropRegistry=e,this._ngZone=n,this._viewportRuler=a,this.disabled=!1,this.sortingDisabled=!1,this.autoScrollDisabled=!1,this.enterPredicate=()=>!0,this.beforeStarted=new c.a,this.entered=new c.a,this.exited=new c.a,this.dropped=new c.a,this.sorted=new c.a,this._isDragging=!1,this._itemPositions=[],this._previousSwap={drag:null,delta:0,overlaps:!1},this._siblings=[],this._orientation="vertical",this._activeSiblings=new Set,this._direction="ltr",this._viewportScrollSubscription=l.a.EMPTY,this._verticalScrollDirection=0,this._horizontalScrollDirection=0,this._stopScrollTimers=new c.a,this._cachedShadowRoot=null,this._startScrollInterval=()=>{this._stopScrolling(),function(t=0,e=h.a){return(!Object(u.a)(t)||t<0)&&(t=0),e&&"function"==typeof e.schedule||(e=h.a),new d.a(i=>(i.add(e.schedule(p,t,{subscriber:i,counter:0,period:t})),i))}(0,b.a).pipe(Object(m.a)(this._stopScrollTimers)).subscribe(()=>{const t=this._scrollNode;1===this._verticalScrollDirection?J(t,-2):2===this._verticalScrollDirection&&J(t,2),1===this._horizontalScrollDirection?Z(t,-2):2===this._horizontalScrollDirection&&Z(t,2)})},this.element=Object(r.e)(t),this._document=i,this.withScrollableParents([this.element]),e.registerDropContainer(this),this._parentPositions=new R(i,a)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){const t=Object(r.e)(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=t.msScrollSnapType||t.scrollSnapType||"",t.scrollSnapType=t.msScrollSnapType="none",this._cacheItems(),this._siblings.forEach(t=>t._startReceiving(this)),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}enter(t,e,i,n){let a;this.start(),null==n?(a=this.sortingDisabled?this._draggables.indexOf(t):-1,-1===a&&(a=this._getItemIndexFromPointerPosition(t,e,i))):a=n;const s=this._activeDraggables,o=s.indexOf(t),c=t.getPlaceholderElement();let l=s[a];if(l===t&&(l=s[a+1]),o>-1&&s.splice(o,1),l&&!this._dragDropRegistry.isDragging(l)){const e=l.getRootElement();e.parentElement.insertBefore(c,e),s.splice(a,0,t)}else if(this._shouldEnterAsFirstChild(e,i)){const e=s[0].getRootElement();e.parentNode.insertBefore(c,e),s.unshift(t)}else Object(r.e)(this.element).appendChild(c),s.push(t);c.style.transform="",this._cacheItemPositions(),this._cacheParentPositions(),this.entered.next({item:t,container:this,currentIndex:this.getItemIndex(t)})}exit(t){this._reset(),this.exited.next({item:t,container:this})}drop(t,e,i,n,a,s){this._reset(),null==s&&(s=i.getItemIndex(t)),this.dropped.next({item:t,currentIndex:e,previousIndex:s,container:this,previousContainer:i,isPointerOverContainer:n,distance:a})}withItems(t){const e=this._draggables;return this._draggables=t,t.forEach(t=>t._withDropContainer(this)),this.isDragging()&&(e.filter(t=>t.isDragging()).every(e=>-1===t.indexOf(e))?this._reset():this._cacheItems()),this}withDirection(t){return this._direction=t,this}connectedTo(t){return this._siblings=t.slice(),this}withOrientation(t){return this._orientation=t,this}withScrollableParents(t){const e=Object(r.e)(this.element);return this._scrollableElements=-1===t.indexOf(e)?[e,...t]:t.slice(),this}getScrollableParents(){return this._scrollableElements}getItemIndex(t){return this._isDragging?Y("horizontal"===this._orientation&&"rtl"===this._direction?this._itemPositions.slice().reverse():this._itemPositions,e=>e.drag===t):this._draggables.indexOf(t)}isReceiving(){return this._activeSiblings.size>0}_sortItem(t,e,i,n){if(this.sortingDisabled||!V(this._clientRect,.05,e,i))return;const a=this._itemPositions,s=this._getItemIndexFromPointerPosition(t,e,i,n);if(-1===s&&a.length>0)return;const o="horizontal"===this._orientation,r=Y(a,e=>e.drag===t),c=a[s],l=c.clientRect,d=r>s?1:-1,h=this._getItemOffsetPx(a[r].clientRect,l,d),u=this._getSiblingOffsetPx(r,a,d),p=a.slice();G(a,r,s),this.sorted.next({previousIndex:r,currentIndex:s,container:this,item:t}),a.forEach((e,i)=>{if(p[i]===e)return;const n=e.drag===t,a=n?h:u,s=n?t.getPlaceholderElement():e.drag.getRootElement();e.offset+=a,o?(s.style.transform=`translate3d(${Math.round(e.offset)}px, 0, 0)`,P(e.clientRect,0,a)):(s.style.transform=`translate3d(0, ${Math.round(e.offset)}px, 0)`,P(e.clientRect,a,0))}),this._previousSwap.overlaps=I(l,e,i),this._previousSwap.drag=c.drag,this._previousSwap.delta=o?n.x:n.y}_startScrollingIfNecessary(t,e){if(this.autoScrollDisabled)return;let i,n=0,a=0;if(this._parentPositions.positions.forEach((s,o)=>{o!==this._document&&s.clientRect&&!i&&V(s.clientRect,.05,t,e)&&([n,a]=function(t,e,i,n){const a=tt(e,n),s=et(e,i);let o=0,r=0;if(a){const e=t.scrollTop;1===a?e>0&&(o=1):t.scrollHeight-e>t.clientHeight&&(o=2)}if(s){const e=t.scrollLeft;1===s?e>0&&(r=1):t.scrollWidth-e>t.clientWidth&&(r=2)}return[o,r]}(o,s.clientRect,t,e),(n||a)&&(i=o))}),!n&&!a){const{width:s,height:o}=this._viewportRuler.getViewportSize(),r={width:s,height:o,top:0,right:s,bottom:o,left:0};n=tt(r,e),a=et(r,t),i=window}!i||n===this._verticalScrollDirection&&a===this._horizontalScrollDirection&&i===this._scrollNode||(this._verticalScrollDirection=n,this._horizontalScrollDirection=a,this._scrollNode=i,(n||a)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_cacheParentPositions(){const t=Object(r.e)(this.element);this._parentPositions.cache(this._scrollableElements),this._clientRect=this._parentPositions.positions.get(t).clientRect}_cacheItemPositions(){const t="horizontal"===this._orientation;this._itemPositions=this._activeDraggables.map(t=>{const e=t.getVisibleElement();return{drag:t,offset:0,clientRect:S(e)}}).sort((e,i)=>t?e.clientRect.left-i.clientRect.left:e.clientRect.top-i.clientRect.top)}_reset(){this._isDragging=!1;const t=Object(r.e)(this.element).style;t.scrollSnapType=t.msScrollSnapType=this._initialScrollSnap,this._activeDraggables.forEach(t=>{const e=t.getRootElement();e&&(e.style.transform="")}),this._siblings.forEach(t=>t._stopReceiving(this)),this._activeDraggables=[],this._itemPositions=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1,this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_getSiblingOffsetPx(t,e,i){const n="horizontal"===this._orientation,a=e[t].clientRect,s=e[t+-1*i];let o=a[n?"width":"height"]*i;if(s){const t=n?"left":"top",e=n?"right":"bottom";-1===i?o-=s.clientRect[t]-a[e]:o+=a[t]-s.clientRect[e]}return o}_getItemOffsetPx(t,e,i){const n="horizontal"===this._orientation;let a=n?e.left-t.left:e.top-t.top;return-1===i&&(a+=n?e.width-t.width:e.height-t.height),a}_shouldEnterAsFirstChild(t,e){if(!this._activeDraggables.length)return!1;const i=this._itemPositions,n="horizontal"===this._orientation;if(i[0].drag!==this._activeDraggables[0]){const a=i[i.length-1].clientRect;return n?t>=a.right:e>=a.bottom}{const a=i[0].clientRect;return n?t<=a.left:e<=a.top}}_getItemIndexFromPointerPosition(t,e,i,n){const a="horizontal"===this._orientation;return Y(this._itemPositions,({drag:s,clientRect:o},r,c)=>{if(s===t)return c.length<2;if(n){const t=a?n.x:n.y;if(s===this._previousSwap.drag&&this._previousSwap.overlaps&&t===this._previousSwap.delta)return!1}return a?e>=Math.floor(o.left)&&e<Math.floor(o.right):i>=Math.floor(o.top)&&i<Math.floor(o.bottom)})}_cacheItems(){this._activeDraggables=this._draggables.slice(),this._cacheItemPositions(),this._cacheParentPositions()}_isOverContainer(t,e){return I(this._clientRect,t,e)}_getSiblingContainerFromPosition(t,e,i){return this._siblings.find(n=>n._canReceive(t,e,i))}_canReceive(t,e,i){if(!I(this._clientRect,e,i)||!this.enterPredicate(t,this))return!1;const n=this._getShadowRoot().elementFromPoint(e,i);if(!n)return!1;const a=Object(r.e)(this.element);return n===a||a.contains(n)}_startReceiving(t){const e=this._activeSiblings;e.has(t)||(e.add(t),this._cacheParentPositions(),this._listenToScrollEvents())}_stopReceiving(t){this._activeSiblings.delete(t),this._viewportScrollSubscription.unsubscribe()}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scroll.subscribe(t=>{if(this.isDragging()){const e=this._parentPositions.handleScroll(t);e&&(this._itemPositions.forEach(({clientRect:t})=>{P(t,e.top,e.left)}),this._itemPositions.forEach(({drag:t})=>{this._dragDropRegistry.isDragging(t)&&t._sortFromLastPointerPosition()}))}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){const t=Object(o.c)(Object(r.e)(this.element));this._cachedShadowRoot=t||this._document}return this._cachedShadowRoot}}function Y(t,e){for(let i=0;i<t.length;i++)if(e(t[i],i,t))return i;return-1}function J(t,e){t===window?t.scrollBy(0,e):t.scrollTop+=e}function Z(t,e){t===window?t.scrollBy(e,0):t.scrollLeft+=e}function tt(t,e){const{top:i,bottom:n,height:a}=t,s=.05*a;return e>=i-s&&e<=i+s?1:e>=n-s&&e<=n+s?2:0}function et(t,e){const{left:i,right:n,width:a}=t,s=.05*a;return e>=i-s&&e<=i+s?1:e>=n-s&&e<=n+s?2:0}const it=Object(o.f)({passive:!1,capture:!0});let nt=(()=>{class t{constructor(t,e){this._ngZone=t,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=new Set,this._globalListeners=new Map,this.pointerMove=new c.a,this.pointerUp=new c.a,this.scroll=new c.a,this._preventDefaultWhileDragging=t=>{this._activeDragInstances.size&&t.preventDefault()},this._persistentTouchmoveListener=t=>{this._activeDragInstances.size&&(t.preventDefault(),this.pointerMove.next(t))},this._document=e}registerDropContainer(t){this._dropInstances.has(t)||this._dropInstances.add(t)}registerDragItem(t){this._dragInstances.add(t),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,it)})}removeDropContainer(t){this._dropInstances.delete(t)}removeDragItem(t){this._dragInstances.delete(t),this.stopDragging(t),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,it)}startDragging(t,e){if(!this._activeDragInstances.has(t)&&(this._activeDragInstances.add(t),1===this._activeDragInstances.size)){const t=e.type.startsWith("touch");this._globalListeners.set(t?"touchend":"mouseup",{handler:t=>this.pointerUp.next(t),options:!0}).set("scroll",{handler:t=>this.scroll.next(t),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:it}),t||this._globalListeners.set("mousemove",{handler:t=>this.pointerMove.next(t),options:it}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((t,e)=>{this._document.addEventListener(e,t.handler,t.options)})})}}stopDragging(t){this._activeDragInstances.delete(t),0===this._activeDragInstances.size&&this._clearGlobalListeners()}isDragging(t){return this._activeDragInstances.has(t)}ngOnDestroy(){this._dragInstances.forEach(t=>this.removeDragItem(t)),this._dropInstances.forEach(t=>this.removeDropContainer(t)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((t,e)=>{this._document.removeEventListener(e,t.handler,t.options)}),this._globalListeners.clear()}}return t.\u0275fac=function(e){return new(e||t)(n.ac(n.C),n.ac(a.e))},t.\u0275prov=Object(n.Mb)({factory:function(){return new t(Object(n.ac)(n.C),Object(n.ac)(a.e))},token:t,providedIn:"root"}),t})();const at={dragStartThreshold:5,pointerDirectionChangeThreshold:5};let st=(()=>{class t{constructor(t,e,i,n){this._document=t,this._ngZone=e,this._viewportRuler=i,this._dragDropRegistry=n}createDrag(t,e=at){return new Q(t,e,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(t){return new K(t,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}}return t.\u0275fac=function(e){return new(e||t)(n.ac(a.e),n.ac(n.C),n.ac(s.h),n.ac(nt))},t.\u0275prov=Object(n.Mb)({factory:function(){return new t(Object(n.ac)(a.e),Object(n.ac)(n.C),Object(n.ac)(s.h),Object(n.ac)(nt))},token:t,providedIn:"root"}),t})();const ot=new n.s("CDK_DRAG_PARENT"),rt=new n.s("CdkDropListGroup");let ct=(()=>{class t{constructor(){this._items=new Set,this._disabled=!1}get disabled(){return this._disabled}set disabled(t){this._disabled=Object(r.c)(t)}ngOnDestroy(){this._items.clear()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["","cdkDropListGroup",""]],inputs:{disabled:["cdkDropListGroupDisabled","disabled"]},exportAs:["cdkDropListGroup"],features:[n.Cb([{provide:rt,useExisting:t}])]}),t})();const lt=new n.s("CDK_DRAG_CONFIG");let dt=0;const ht=new n.s("CdkDropList");let ut=(()=>{class t{constructor(e,i,a,s,o,r,l){this.element=e,this._changeDetectorRef=a,this._dir=s,this._group=o,this._scrollDispatcher=r,this._destroyed=new c.a,this.connectedTo=[],this.id="cdk-drop-list-"+dt++,this.enterPredicate=()=>!0,this.dropped=new n.o,this.entered=new n.o,this.exited=new n.o,this.sorted=new n.o,this._unsortedItems=new Set,this._dropListRef=i.createDropList(e),this._dropListRef.data=this,l&&this._assignDefaults(l),this._dropListRef.enterPredicate=(t,e)=>this.enterPredicate(t.data,e.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),t._dropLists.push(this),o&&o._items.add(this)}get disabled(){return this._disabled||!!this._group&&this._group.disabled}set disabled(t){this._dropListRef.disabled=this._disabled=Object(r.c)(t)}addItem(t){this._unsortedItems.add(t),this._dropListRef.isDragging()&&this._syncItemsWithRef()}removeItem(t){this._unsortedItems.delete(t),this._dropListRef.isDragging()&&this._syncItemsWithRef()}getSortedItems(){return Array.from(this._unsortedItems).sort((t,e)=>t._dragRef.getVisibleElement().compareDocumentPosition(e._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){const e=t._dropLists.indexOf(this);e>-1&&t._dropLists.splice(e,1),this._group&&this._group._items.delete(this),this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}_setupInputSyncSubscription(e){this._dir&&this._dir.change.pipe(Object(g.a)(this._dir.value),Object(m.a)(this._destroyed)).subscribe(t=>e.withDirection(t)),e.beforeStarted.subscribe(()=>{const i=Object(r.b)(this.connectedTo).map(e=>"string"==typeof e?t._dropLists.find(t=>t.id===e):e);if(this._group&&this._group._items.forEach(t=>{-1===i.indexOf(t)&&i.push(t)}),!this._scrollableParentsResolved&&this._scrollDispatcher){const t=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(t=>t.getElementRef().nativeElement);this._dropListRef.withScrollableParents(t),this._scrollableParentsResolved=!0}e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.sortingDisabled=Object(r.c)(this.sortingDisabled),e.autoScrollDisabled=Object(r.c)(this.autoScrollDisabled),e.connectedTo(i.filter(t=>t&&t!==this).map(t=>t._dropListRef)).withOrientation(this.orientation)})}_handleEvents(t){t.beforeStarted.subscribe(()=>{this._syncItemsWithRef(),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(t=>{this.entered.emit({container:this,item:t.item.data,currentIndex:t.currentIndex})}),t.exited.subscribe(t=>{this.exited.emit({container:this,item:t.item.data}),this._changeDetectorRef.markForCheck()}),t.sorted.subscribe(t=>{this.sorted.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,container:this,item:t.item.data})}),t.dropped.subscribe(t=>{this.dropped.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,previousContainer:t.previousContainer.data,container:t.container.data,item:t.item.data,isPointerOverContainer:t.isPointerOverContainer,distance:t.distance}),this._changeDetectorRef.markForCheck()})}_assignDefaults(t){const{lockAxis:e,draggingDisabled:i,sortingDisabled:n,listAutoScrollDisabled:a,listOrientation:s}=t;this.disabled=null!=i&&i,this.sortingDisabled=null!=n&&n,this.autoScrollDisabled=null!=a&&a,this.orientation=s||"vertical",e&&(this.lockAxis=e)}_syncItemsWithRef(){this._dropListRef.withItems(this.getSortedItems().map(t=>t._dragRef))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(st),n.Qb(n.h),n.Qb(C.c,8),n.Qb(rt,12),n.Qb(s.f),n.Qb(lt,8))},t.\u0275dir=n.Lb({type:t,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(t,e){2&t&&(n.Zb("id",e.id),n.Ib("cdk-drop-list-disabled",e.disabled)("cdk-drop-list-dragging",e._dropListRef.isDragging())("cdk-drop-list-receiving",e._dropListRef.isReceiving()))},inputs:{connectedTo:["cdkDropListConnectedTo","connectedTo"],id:"id",enterPredicate:["cdkDropListEnterPredicate","enterPredicate"],disabled:["cdkDropListDisabled","disabled"],sortingDisabled:["cdkDropListSortingDisabled","sortingDisabled"],autoScrollDisabled:["cdkDropListAutoScrollDisabled","autoScrollDisabled"],orientation:["cdkDropListOrientation","orientation"],lockAxis:["cdkDropListLockAxis","lockAxis"],data:["cdkDropListData","data"]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],features:[n.Cb([{provide:rt,useValue:void 0},{provide:ht,useExisting:t}])]}),t._dropLists=[],t})();const pt=new n.s("CdkDragHandle");let bt=(()=>{class t{constructor(t,e){this.element=t,this._stateChanges=new c.a,this._disabled=!1,this._parentDrag=e}get disabled(){return this._disabled}set disabled(t){this._disabled=Object(r.c)(t),this._stateChanges.next(this)}ngOnDestroy(){this._stateChanges.complete()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(ot,12))},t.\u0275dir=n.Lb({type:t,selectors:[["","cdkDragHandle",""]],hostAttrs:[1,"cdk-drag-handle"],inputs:{disabled:["cdkDragHandleDisabled","disabled"]},features:[n.Cb([{provide:pt,useExisting:t}])]}),t})();const ft=new n.s("CdkDragPlaceholder");let mt=(()=>{class t{constructor(t){this.templateRef=t}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.P))},t.\u0275dir=n.Lb({type:t,selectors:[["ng-template","cdkDragPlaceholder",""]],inputs:{data:"data"},features:[n.Cb([{provide:ft,useExisting:t}])]}),t})();const gt=new n.s("CdkDragPreview");let vt=(()=>{class t{constructor(t){this.templateRef=t,this._matchSize=!1}get matchSize(){return this._matchSize}set matchSize(t){this._matchSize=Object(r.c)(t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.P))},t.\u0275dir=n.Lb({type:t,selectors:[["ng-template","cdkDragPreview",""]],inputs:{matchSize:"matchSize",data:"data"},features:[n.Cb([{provide:gt,useExisting:t}])]}),t})(),_t=(()=>{class t{constructor(t,e,i,a,s,o,r,l,h,u){this.element=t,this.dropContainer=e,this._document=i,this._ngZone=a,this._viewContainerRef=s,this._dir=r,this._changeDetectorRef=h,this._selfHandle=u,this._destroyed=new c.a,this.started=new n.o,this.released=new n.o,this.ended=new n.o,this.entered=new n.o,this.exited=new n.o,this.dropped=new n.o,this.moved=new d.a(t=>{const e=this._dragRef.moved.pipe(Object(v.a)(t=>({source:this,pointerPosition:t.pointerPosition,event:t.event,delta:t.delta,distance:t.distance}))).subscribe(t);return()=>{e.unsubscribe()}}),this._dragRef=l.createDrag(t,{dragStartThreshold:o&&null!=o.dragStartThreshold?o.dragStartThreshold:5,pointerDirectionChangeThreshold:o&&null!=o.pointerDirectionChangeThreshold?o.pointerDirectionChangeThreshold:5,zIndex:null==o?void 0:o.zIndex}),this._dragRef.data=this,o&&this._assignDefaults(o),e&&(this._dragRef._withDropContainer(e._dropListRef),e.addItem(this)),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}get disabled(){return this._disabled||this.dropContainer&&this.dropContainer.disabled}set disabled(t){this._disabled=Object(r.c)(t),this._dragRef.disabled=this._disabled}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}ngAfterViewInit(){this._ngZone.onStable.pipe(Object(_.a)(1),Object(m.a)(this._destroyed)).subscribe(()=>{this._updateRootElement(),this._handles.changes.pipe(Object(g.a)(this._handles),Object(y.a)(t=>{const e=t.filter(t=>t._parentDrag===this).map(t=>t.element);this._selfHandle&&this.rootElementSelector&&e.push(this.element),this._dragRef.withHandles(e)}),Object(x.a)(t=>Object(f.a)(...t.map(t=>t._stateChanges.pipe(Object(g.a)(t))))),Object(m.a)(this._destroyed)).subscribe(t=>{const e=this._dragRef,i=t.element.nativeElement;t.disabled?e.disableHandle(i):e.enableHandle(i)}),this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)})}ngOnChanges(t){const e=t.rootElementSelector,i=t.freeDragPosition;e&&!e.firstChange&&this._updateRootElement(),i&&!i.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()}_updateRootElement(){const t=this.element.nativeElement,e=this.rootElementSelector?yt(t,this.rootElementSelector):t;this._dragRef.withRootElement(e||t)}_getBoundaryElement(){const t=this.boundaryElement;return t?"string"==typeof t?yt(this.element.nativeElement,t):Object(r.e)(t):null}_syncInputs(t){t.beforeStarted.subscribe(()=>{if(!t.isDragging()){const e=this._dir,i=this.dragStartDelay,n=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,a=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;t.disabled=this.disabled,t.lockAxis=this.lockAxis,t.dragStartDelay="object"==typeof i&&i?i:Object(r.f)(i),t.constrainPosition=this.constrainPosition,t.previewClass=this.previewClass,t.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(n).withPreviewTemplate(a),e&&t.withDirection(e.value)}})}_handleEvents(t){t.started.subscribe(()=>{this.started.emit({source:this}),this._changeDetectorRef.markForCheck()}),t.released.subscribe(()=>{this.released.emit({source:this})}),t.ended.subscribe(t=>{this.ended.emit({source:this,distance:t.distance}),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(t=>{this.entered.emit({container:t.container.data,item:this,currentIndex:t.currentIndex})}),t.exited.subscribe(t=>{this.exited.emit({container:t.container.data,item:this})}),t.dropped.subscribe(t=>{this.dropped.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,previousContainer:t.previousContainer.data,container:t.container.data,isPointerOverContainer:t.isPointerOverContainer,item:this,distance:t.distance})})}_assignDefaults(t){const{lockAxis:e,dragStartDelay:i,constrainPosition:n,previewClass:a,boundaryElement:s,draggingDisabled:o,rootElementSelector:r}=t;this.disabled=null!=o&&o,this.dragStartDelay=i||0,e&&(this.lockAxis=e),n&&(this.constrainPosition=n),a&&(this.previewClass=a),s&&(this.boundaryElement=s),r&&(this.rootElementSelector=r)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(ht,12),n.Qb(a.e),n.Qb(n.C),n.Qb(n.T),n.Qb(lt,8),n.Qb(C.c,8),n.Qb(st),n.Qb(n.h),n.Qb(pt,10))},t.\u0275dir=n.Lb({type:t,selectors:[["","cdkDrag",""]],contentQueries:function(t,e,i){var a;1&t&&(n.Jb(i,gt,!0),n.Jb(i,ft,!0),n.Jb(i,pt,!0)),2&t&&(n.yc(a=n.ec())&&(e._previewTemplate=a.first),n.yc(a=n.ec())&&(e._placeholderTemplate=a.first),n.yc(a=n.ec())&&(e._handles=a))},hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(t,e){2&t&&n.Ib("cdk-drag-disabled",e.disabled)("cdk-drag-dragging",e._dragRef.isDragging())},inputs:{disabled:["cdkDragDisabled","disabled"],dragStartDelay:["cdkDragStartDelay","dragStartDelay"],lockAxis:["cdkDragLockAxis","lockAxis"],constrainPosition:["cdkDragConstrainPosition","constrainPosition"],previewClass:["cdkDragPreviewClass","previewClass"],boundaryElement:["cdkDragBoundary","boundaryElement"],rootElementSelector:["cdkDragRootElement","rootElementSelector"],data:["cdkDragData","data"],freeDragPosition:["cdkDragFreeDragPosition","freeDragPosition"]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[n.Cb([{provide:ot,useExisting:t}]),n.Bb]}),t})();function yt(t,e){let i=t.parentElement;for(;i;){if(i.matches?i.matches(e):i.msMatchesSelector(e))return i;i=i.parentElement}return null}let xt=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},providers:[st],imports:[s.c]}),t})()},"5+tZ":function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var n=i("lJxs"),a=i("Cfvw"),s=i("zx2A");function o(t,e,i=Number.POSITIVE_INFINITY){return"function"==typeof e?s=>s.pipe(o((i,s)=>Object(a.a)(t(i,s)).pipe(Object(n.a)((t,n)=>e(i,t,s,n))),i)):("number"==typeof e&&(i=e),e=>e.lift(new r(t,i)))}class r{constructor(t,e=Number.POSITIVE_INFINITY){this.project=t,this.concurrent=e}call(t,e){return e.subscribe(new c(t,this.project,this.concurrent))}}class c extends s.b{constructor(t,e,i=Number.POSITIVE_INFINITY){super(t),this.project=e,this.concurrent=i,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)}_tryNext(t){let e;const i=this.index++;try{e=this.project(t,i)}catch(n){return void this.destination.error(n)}this.active++,this._innerSub(e)}_innerSub(t){const e=new s.a(this),i=this.destination;i.add(e);const n=Object(s.c)(t,e);n!==e&&i.add(n)}_complete(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()}notifyNext(t){this.destination.next(t)}notifyComplete(){const t=this.buffer;this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}},"5RNC":function(t,e,i){"use strict";i.d(e,"a",(function(){return y})),i.d(e,"b",(function(){return O}));var n=i("ofXK"),a=i("fXoL"),s=i("FKr1"),o=i("8LU1"),r=i("FtGj"),c=i("3Pt+"),l=i("R1ws"),d=i("nLfN"),h=i("quSY"),u=i("u47x"),p=i("cH1L");const b=["sliderWrapper"],f=Object(d.f)({passive:!1}),m={provide:c.s,useExisting:Object(a.X)(()=>y),multi:!0};class g{}class v{constructor(t){this._elementRef=t}}const _=Object(s.F)(Object(s.A)(Object(s.C)(v),"accent"));let y=(()=>{class t extends _{constructor(t,e,i,n,s,o,r,c){super(t),this._focusMonitor=e,this._changeDetectorRef=i,this._dir=n,this._ngZone=o,this._animationMode=c,this._invert=!1,this._max=100,this._min=0,this._step=1,this._thumbLabel=!1,this._tickInterval=0,this._value=null,this._vertical=!1,this.change=new a.o,this.input=new a.o,this.valueChange=new a.o,this.onTouched=()=>{},this._percent=0,this._isSliding=!1,this._isActive=!1,this._tickIntervalPercent=0,this._sliderDimensions=null,this._controlValueAccessorChangeFn=()=>{},this._dirChangeSubscription=h.a.EMPTY,this._pointerDown=t=>{this.disabled||this._isSliding||!x(t)&&0!==t.button||this._ngZone.run(()=>{const e=this.value,i=C(t);this._isSliding=!0,this._lastPointerEvent=t,t.preventDefault(),this._focusHostElement(),this._onMouseenter(),this._bindGlobalEvents(t),this._focusHostElement(),this._updateValueFromPosition(i),this._valueOnSlideStart=e,e!=this.value&&this._emitInputEvent()})},this._pointerMove=t=>{if(this._isSliding){t.preventDefault();const e=this.value;this._lastPointerEvent=t,this._updateValueFromPosition(C(t)),e!=this.value&&this._emitInputEvent()}},this._pointerUp=t=>{this._isSliding&&(t.preventDefault(),this._removeGlobalEvents(),this._isSliding=!1,this._valueOnSlideStart==this.value||this.disabled||this._emitChangeEvent(),this._valueOnSlideStart=this._lastPointerEvent=null)},this._windowBlur=()=>{this._lastPointerEvent&&this._pointerUp(this._lastPointerEvent)},this._document=r,this.tabIndex=parseInt(s)||0,o.runOutsideAngular(()=>{const e=t.nativeElement;e.addEventListener("mousedown",this._pointerDown,f),e.addEventListener("touchstart",this._pointerDown,f)})}get invert(){return this._invert}set invert(t){this._invert=Object(o.c)(t)}get max(){return this._max}set max(t){this._max=Object(o.f)(t,this._max),this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()}get min(){return this._min}set min(t){this._min=Object(o.f)(t,this._min),null===this._value&&(this.value=this._min),this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()}get step(){return this._step}set step(t){this._step=Object(o.f)(t,this._step),this._step%1!=0&&(this._roundToDecimal=this._step.toString().split(".").pop().length),this._changeDetectorRef.markForCheck()}get thumbLabel(){return this._thumbLabel}set thumbLabel(t){this._thumbLabel=Object(o.c)(t)}get tickInterval(){return this._tickInterval}set tickInterval(t){this._tickInterval="auto"===t?"auto":"number"==typeof t||"string"==typeof t?Object(o.f)(t,this._tickInterval):0}get value(){return null===this._value&&(this.value=this._min),this._value}set value(t){if(t!==this._value){let e=Object(o.f)(t);this._roundToDecimal&&(e=parseFloat(e.toFixed(this._roundToDecimal))),this._value=e,this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()}}get vertical(){return this._vertical}set vertical(t){this._vertical=Object(o.c)(t)}get displayValue(){return this.displayWith?this.displayWith(this.value):this._roundToDecimal&&this.value&&this.value%1!=0?this.value.toFixed(this._roundToDecimal):this.value||0}focus(t){this._focusHostElement(t)}blur(){this._blurHostElement()}get percent(){return this._clamp(this._percent)}_shouldInvertAxis(){return this.vertical?!this.invert:this.invert}_isMinValue(){return 0===this.percent}_getThumbGap(){return this.disabled?7:this._isMinValue()&&!this.thumbLabel?this._isActive?10:7:0}_getTrackBackgroundStyles(){const t=this.vertical?`1, ${1-this.percent}, 1`:1-this.percent+", 1, 1";return{transform:`translate${this.vertical?"Y":"X"}(${this._shouldInvertMouseCoords()?"-":""}${this._getThumbGap()}px) scale3d(${t})`}}_getTrackFillStyles(){const t=this.percent,e=this.vertical?`1, ${t}, 1`:t+", 1, 1";return{transform:`translate${this.vertical?"Y":"X"}(${this._shouldInvertMouseCoords()?"":"-"}${this._getThumbGap()}px) scale3d(${e})`,display:0===t?"none":""}}_getTicksContainerStyles(){return{transform:`translate${this.vertical?"Y":"X"}(${this.vertical||"rtl"!=this._getDirection()?"-":""}${this._tickIntervalPercent/2*100}%)`}}_getTicksStyles(){let t=100*this._tickIntervalPercent,e={backgroundSize:this.vertical?`2px ${t}%`:t+"% 2px",transform:`translateZ(0) translate${this.vertical?"Y":"X"}(${this.vertical||"rtl"!=this._getDirection()?"":"-"}${t/2}%)${this.vertical||"rtl"!=this._getDirection()?"":" rotate(180deg)"}`};if(this._isMinValue()&&this._getThumbGap()){const t=this._shouldInvertAxis();let i;i=this.vertical?t?"Bottom":"Top":t?"Right":"Left",e["padding"+i]=this._getThumbGap()+"px"}return e}_getThumbContainerStyles(){const t=this._shouldInvertAxis();return{transform:`translate${this.vertical?"Y":"X"}(-${100*(("rtl"!=this._getDirection()||this.vertical?t:!t)?this.percent:1-this.percent)}%)`}}_shouldInvertMouseCoords(){const t=this._shouldInvertAxis();return"rtl"!=this._getDirection()||this.vertical?t:!t}_getDirection(){return this._dir&&"rtl"==this._dir.value?"rtl":"ltr"}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{this._isActive=!!t&&"keyboard"!==t,this._changeDetectorRef.detectChanges()}),this._dir&&(this._dirChangeSubscription=this._dir.change.subscribe(()=>{this._changeDetectorRef.markForCheck()}))}ngOnDestroy(){const t=this._elementRef.nativeElement;t.removeEventListener("mousedown",this._pointerDown,f),t.removeEventListener("touchstart",this._pointerDown,f),this._lastPointerEvent=null,this._removeGlobalEvents(),this._focusMonitor.stopMonitoring(this._elementRef),this._dirChangeSubscription.unsubscribe()}_onMouseenter(){this.disabled||(this._sliderDimensions=this._getSliderDimensions(),this._updateTickIntervalPercent())}_onFocus(){this._sliderDimensions=this._getSliderDimensions(),this._updateTickIntervalPercent()}_onBlur(){this.onTouched()}_onKeydown(t){if(this.disabled||Object(r.v)(t))return;const e=this.value;switch(t.keyCode){case r.n:this._increment(10);break;case r.m:this._increment(-10);break;case r.f:this.value=this.max;break;case r.j:this.value=this.min;break;case r.k:this._increment("rtl"==this._getDirection()?1:-1);break;case r.s:this._increment(1);break;case r.o:this._increment("rtl"==this._getDirection()?-1:1);break;case r.e:this._increment(-1);break;default:return}e!=this.value&&(this._emitInputEvent(),this._emitChangeEvent()),this._isSliding=!0,t.preventDefault()}_onKeyup(){this._isSliding=!1}_getWindow(){return this._document.defaultView||window}_bindGlobalEvents(t){const e=this._document,i=x(t),n=i?"touchend":"mouseup";e.addEventListener(i?"touchmove":"mousemove",this._pointerMove,f),e.addEventListener(n,this._pointerUp,f),i&&e.addEventListener("touchcancel",this._pointerUp,f);const a=this._getWindow();void 0!==a&&a&&a.addEventListener("blur",this._windowBlur)}_removeGlobalEvents(){const t=this._document;t.removeEventListener("mousemove",this._pointerMove,f),t.removeEventListener("mouseup",this._pointerUp,f),t.removeEventListener("touchmove",this._pointerMove,f),t.removeEventListener("touchend",this._pointerUp,f),t.removeEventListener("touchcancel",this._pointerUp,f);const e=this._getWindow();void 0!==e&&e&&e.removeEventListener("blur",this._windowBlur)}_increment(t){this.value=this._clamp((this.value||0)+this.step*t,this.min,this.max)}_updateValueFromPosition(t){if(!this._sliderDimensions)return;let e=this._clamp(((this.vertical?t.y:t.x)-(this.vertical?this._sliderDimensions.top:this._sliderDimensions.left))/(this.vertical?this._sliderDimensions.height:this._sliderDimensions.width));if(this._shouldInvertMouseCoords()&&(e=1-e),0===e)this.value=this.min;else if(1===e)this.value=this.max;else{const t=this._calculateValue(e),i=Math.round((t-this.min)/this.step)*this.step+this.min;this.value=this._clamp(i,this.min,this.max)}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.value),this.valueChange.emit(this.value),this.change.emit(this._createChangeEvent())}_emitInputEvent(){this.input.emit(this._createChangeEvent())}_updateTickIntervalPercent(){if(this.tickInterval&&this._sliderDimensions)if("auto"==this.tickInterval){let t=this.vertical?this._sliderDimensions.height:this._sliderDimensions.width,e=Math.ceil(30/(t*this.step/(this.max-this.min)));this._tickIntervalPercent=e*this.step/t}else this._tickIntervalPercent=this.tickInterval*this.step/(this.max-this.min)}_createChangeEvent(t=this.value){let e=new g;return e.source=this,e.value=t,e}_calculatePercentage(t){return((t||0)-this.min)/(this.max-this.min)}_calculateValue(t){return this.min+t*(this.max-this.min)}_clamp(t,e=0,i=1){return Math.max(e,Math.min(t,i))}_getSliderDimensions(){return this._sliderWrapper?this._sliderWrapper.nativeElement.getBoundingClientRect():null}_focusHostElement(t){this._elementRef.nativeElement.focus(t)}_blurHostElement(){this._elementRef.nativeElement.blur()}writeValue(t){this.value=t}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(u.h),a.Qb(a.h),a.Qb(p.c,8),a.bc("tabindex"),a.Qb(a.C),a.Qb(n.e),a.Qb(l.a,8))},t.\u0275cmp=a.Kb({type:t,selectors:[["mat-slider"]],viewQuery:function(t,e){var i;1&t&&a.Xc(b,!0),2&t&&a.yc(i=a.ec())&&(e._sliderWrapper=i.first)},hostAttrs:["role","slider",1,"mat-slider","mat-focus-indicator"],hostVars:28,hostBindings:function(t,e){1&t&&a.dc("focus",(function(){return e._onFocus()}))("blur",(function(){return e._onBlur()}))("keydown",(function(t){return e._onKeydown(t)}))("keyup",(function(){return e._onKeyup()}))("mouseenter",(function(){return e._onMouseenter()}))("selectstart",(function(t){return t.preventDefault()})),2&t&&(a.Zb("tabIndex",e.tabIndex),a.Eb("aria-disabled",e.disabled)("aria-valuemax",e.max)("aria-valuemin",e.min)("aria-valuenow",e.value)("aria-orientation",e.vertical?"vertical":"horizontal"),a.Ib("mat-slider-disabled",e.disabled)("mat-slider-has-ticks",e.tickInterval)("mat-slider-horizontal",!e.vertical)("mat-slider-axis-inverted",e._shouldInvertAxis())("mat-slider-invert-mouse-coords",e._shouldInvertMouseCoords())("mat-slider-sliding",e._isSliding)("mat-slider-thumb-label-showing",e.thumbLabel)("mat-slider-vertical",e.vertical)("mat-slider-min-value",e._isMinValue())("mat-slider-hide-last-tick",e.disabled||e._isMinValue()&&e._getThumbGap()&&e._shouldInvertAxis())("_mat-animation-noopable","NoopAnimations"===e._animationMode))},inputs:{disabled:"disabled",color:"color",tabIndex:"tabIndex",invert:"invert",max:"max",min:"min",value:"value",step:"step",thumbLabel:"thumbLabel",tickInterval:"tickInterval",vertical:"vertical",displayWith:"displayWith"},outputs:{change:"change",input:"input",valueChange:"valueChange"},exportAs:["matSlider"],features:[a.Cb([m]),a.Ab],decls:13,vars:6,consts:[[1,"mat-slider-wrapper"],["sliderWrapper",""],[1,"mat-slider-track-wrapper"],[1,"mat-slider-track-background",3,"ngStyle"],[1,"mat-slider-track-fill",3,"ngStyle"],[1,"mat-slider-ticks-container",3,"ngStyle"],[1,"mat-slider-ticks",3,"ngStyle"],[1,"mat-slider-thumb-container",3,"ngStyle"],[1,"mat-slider-focus-ring"],[1,"mat-slider-thumb"],[1,"mat-slider-thumb-label"],[1,"mat-slider-thumb-label-text"]],template:function(t,e){1&t&&(a.Wb(0,"div",0,1),a.Wb(2,"div",2),a.Rb(3,"div",3),a.Rb(4,"div",4),a.Vb(),a.Wb(5,"div",5),a.Rb(6,"div",6),a.Vb(),a.Wb(7,"div",7),a.Rb(8,"div",8),a.Rb(9,"div",9),a.Wb(10,"div",10),a.Wb(11,"span",11),a.Qc(12),a.Vb(),a.Vb(),a.Vb(),a.Vb()),2&t&&(a.Db(3),a.oc("ngStyle",e._getTrackBackgroundStyles()),a.Db(1),a.oc("ngStyle",e._getTrackFillStyles()),a.Db(1),a.oc("ngStyle",e._getTicksContainerStyles()),a.Db(1),a.oc("ngStyle",e._getTicksStyles()),a.Db(1),a.oc("ngStyle",e._getThumbContainerStyles()),a.Db(5),a.Rc(e.displayValue))},directives:[n.w],styles:['.mat-slider{display:inline-block;position:relative;box-sizing:border-box;padding:8px;outline:none;vertical-align:middle}.mat-slider:not(.mat-slider-disabled):active,.mat-slider.mat-slider-sliding:not(.mat-slider-disabled){cursor:-webkit-grabbing;cursor:grabbing}.mat-slider-wrapper{position:absolute}.mat-slider-track-wrapper{position:absolute;top:0;left:0;overflow:hidden}.mat-slider-track-fill{position:absolute;transform-origin:0 0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-track-background{position:absolute;transform-origin:100% 100%;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-ticks-container{position:absolute;left:0;top:0;overflow:hidden}.mat-slider-ticks{background-repeat:repeat;background-clip:content-box;box-sizing:border-box;opacity:0;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-thumb-container{position:absolute;z-index:1;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-focus-ring{position:absolute;width:30px;height:30px;border-radius:50%;transform:scale(0);opacity:0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider.cdk-keyboard-focused .mat-slider-focus-ring,.mat-slider.cdk-program-focused .mat-slider-focus-ring{transform:scale(1);opacity:1}.mat-slider:not(.mat-slider-disabled):not(.mat-slider-sliding) .mat-slider-thumb-label,.mat-slider:not(.mat-slider-disabled):not(.mat-slider-sliding) .mat-slider-thumb{cursor:-webkit-grab;cursor:grab}.mat-slider-thumb{position:absolute;right:-10px;bottom:-10px;box-sizing:border-box;width:20px;height:20px;border:3px solid transparent;border-radius:50%;transform:scale(0.7);transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),border-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-thumb-label{display:none;align-items:center;justify-content:center;position:absolute;width:28px;height:28px;border-radius:50%;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),border-radius 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.cdk-high-contrast-active .mat-slider-thumb-label{outline:solid 1px}.mat-slider-thumb-label-text{z-index:1;opacity:0;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-sliding .mat-slider-track-fill,.mat-slider-sliding .mat-slider-track-background,.mat-slider-sliding .mat-slider-thumb-container{transition-duration:0ms}.mat-slider-has-ticks .mat-slider-wrapper::after{content:"";position:absolute;border-width:0;border-style:solid;opacity:0;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-has-ticks.cdk-focused:not(.mat-slider-hide-last-tick) .mat-slider-wrapper::after,.mat-slider-has-ticks:hover:not(.mat-slider-hide-last-tick) .mat-slider-wrapper::after{opacity:1}.mat-slider-has-ticks.cdk-focused:not(.mat-slider-disabled) .mat-slider-ticks,.mat-slider-has-ticks:hover:not(.mat-slider-disabled) .mat-slider-ticks{opacity:1}.mat-slider-thumb-label-showing .mat-slider-focus-ring{display:none}.mat-slider-thumb-label-showing .mat-slider-thumb-label{display:flex}.mat-slider-axis-inverted .mat-slider-track-fill{transform-origin:100% 100%}.mat-slider-axis-inverted .mat-slider-track-background{transform-origin:0 0}.mat-slider:not(.mat-slider-disabled).cdk-focused.mat-slider-thumb-label-showing .mat-slider-thumb{transform:scale(0)}.mat-slider:not(.mat-slider-disabled).cdk-focused .mat-slider-thumb-label{border-radius:50% 50% 0}.mat-slider:not(.mat-slider-disabled).cdk-focused .mat-slider-thumb-label-text{opacity:1}.mat-slider:not(.mat-slider-disabled).cdk-mouse-focused .mat-slider-thumb,.mat-slider:not(.mat-slider-disabled).cdk-touch-focused .mat-slider-thumb,.mat-slider:not(.mat-slider-disabled).cdk-program-focused .mat-slider-thumb{border-width:2px;transform:scale(1)}.mat-slider-disabled .mat-slider-focus-ring{transform:scale(0);opacity:0}.mat-slider-disabled .mat-slider-thumb{border-width:4px;transform:scale(0.5)}.mat-slider-disabled .mat-slider-thumb-label{display:none}.mat-slider-horizontal{height:48px;min-width:128px}.mat-slider-horizontal .mat-slider-wrapper{height:2px;top:23px;left:8px;right:8px}.mat-slider-horizontal .mat-slider-wrapper::after{height:2px;border-left-width:2px;right:0;top:0}.mat-slider-horizontal .mat-slider-track-wrapper{height:2px;width:100%}.mat-slider-horizontal .mat-slider-track-fill{height:2px;width:100%;transform:scaleX(0)}.mat-slider-horizontal .mat-slider-track-background{height:2px;width:100%;transform:scaleX(1)}.mat-slider-horizontal .mat-slider-ticks-container{height:2px;width:100%}.cdk-high-contrast-active .mat-slider-horizontal .mat-slider-ticks-container{height:0;outline:solid 2px;top:1px}.mat-slider-horizontal .mat-slider-ticks{height:2px;width:100%}.mat-slider-horizontal .mat-slider-thumb-container{width:100%;height:0;top:50%}.mat-slider-horizontal .mat-slider-focus-ring{top:-15px;right:-15px}.mat-slider-horizontal .mat-slider-thumb-label{right:-14px;top:-40px;transform:translateY(26px) scale(0.01) rotate(45deg)}.mat-slider-horizontal .mat-slider-thumb-label-text{transform:rotate(-45deg)}.mat-slider-horizontal.cdk-focused .mat-slider-thumb-label{transform:rotate(45deg)}.cdk-high-contrast-active .mat-slider-horizontal.cdk-focused .mat-slider-thumb-label,.cdk-high-contrast-active .mat-slider-horizontal.cdk-focused .mat-slider-thumb-label-text{transform:none}.mat-slider-vertical{width:48px;min-height:128px}.mat-slider-vertical .mat-slider-wrapper{width:2px;top:8px;bottom:8px;left:23px}.mat-slider-vertical .mat-slider-wrapper::after{width:2px;border-top-width:2px;bottom:0;left:0}.mat-slider-vertical .mat-slider-track-wrapper{height:100%;width:2px}.mat-slider-vertical .mat-slider-track-fill{height:100%;width:2px;transform:scaleY(0)}.mat-slider-vertical .mat-slider-track-background{height:100%;width:2px;transform:scaleY(1)}.mat-slider-vertical .mat-slider-ticks-container{width:2px;height:100%}.cdk-high-contrast-active .mat-slider-vertical .mat-slider-ticks-container{width:0;outline:solid 2px;left:1px}.mat-slider-vertical .mat-slider-focus-ring{bottom:-15px;left:-15px}.mat-slider-vertical .mat-slider-ticks{width:2px;height:100%}.mat-slider-vertical .mat-slider-thumb-container{height:100%;width:0;left:50%}.mat-slider-vertical .mat-slider-thumb{-webkit-backface-visibility:hidden;backface-visibility:hidden}.mat-slider-vertical .mat-slider-thumb-label{bottom:-14px;left:-40px;transform:translateX(26px) scale(0.01) rotate(-45deg)}.mat-slider-vertical .mat-slider-thumb-label-text{transform:rotate(45deg)}.mat-slider-vertical.cdk-focused .mat-slider-thumb-label{transform:rotate(-45deg)}[dir=rtl] .mat-slider-wrapper::after{left:0;right:auto}[dir=rtl] .mat-slider-horizontal .mat-slider-track-fill{transform-origin:100% 100%}[dir=rtl] .mat-slider-horizontal .mat-slider-track-background{transform-origin:0 0}[dir=rtl] .mat-slider-horizontal.mat-slider-axis-inverted .mat-slider-track-fill{transform-origin:0 0}[dir=rtl] .mat-slider-horizontal.mat-slider-axis-inverted .mat-slider-track-background{transform-origin:100% 100%}.mat-slider._mat-animation-noopable .mat-slider-track-fill,.mat-slider._mat-animation-noopable .mat-slider-track-background,.mat-slider._mat-animation-noopable .mat-slider-ticks,.mat-slider._mat-animation-noopable .mat-slider-thumb-container,.mat-slider._mat-animation-noopable .mat-slider-focus-ring,.mat-slider._mat-animation-noopable .mat-slider-thumb,.mat-slider._mat-animation-noopable .mat-slider-thumb-label,.mat-slider._mat-animation-noopable .mat-slider-thumb-label-text,.mat-slider._mat-animation-noopable .mat-slider-has-ticks .mat-slider-wrapper::after{transition:none}\n'],encapsulation:2,changeDetection:0}),t})();function x(t){return"t"===t.type[0]}function C(t){const e=x(t)?t.touches[0]||t.changedTouches[0]:t;return{x:e.clientX,y:e.clientY}}let O=(()=>{class t{}return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)},imports:[[n.c,s.k],s.k]}),t})()},"5cI5":function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var n=i("fXoL");let a=(()=>{class t{constructor(){this.appSession=null}setAppSession(t){this.appSession=t}getAppSession(){return this.appSession}save(t,e){localStorage.setItem(t+"_"+this.getAppSession(),e)}get(t){return localStorage.getItem(t+"_"+this.getAppSession())}remove(t){localStorage.removeItem(t+"_"+this.getAppSession())}resetLocal(){const t=[];for(let e=0;e<localStorage.length;e++)"filtersAdmin_"===localStorage.key(e).substring(0,13)&&t.push(localStorage.key(e));for(let e=0;e<t.length;e++)localStorage.removeItem(t[e])}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()},"6Psc":function(t,e,i){"use strict";i.d(e,"a",(function(){return b}));var n=i("XNiG"),a=i("LRne"),s=i("vkgz"),o=i("nYR2"),r=i("JIr8"),c=i("fXoL"),l=i("sYmb"),d=i("tk/3"),h=i("0IaG"),u=i("AXEc"),p=i("tyNb");let b=(()=>{class t{constructor(t,e,i,a,s){this.translate=t,this.http=e,this.dialog=i,this.notify=a,this.router=s,this.loading=!0,this.pinnedFolders=[],this.folders=[],this.currentFolder={id:0},this.eventAction=new n.a}ngOnInit(){}initFolder(){this.currentFolder={id:0}}catchEvent(){return this.eventAction.asObservable()}setEvent(t){return this.eventAction.next(t)}goToFolder(t){this.setFolder(t),this.router.navigate(["/folders/"+t.id])}setFolder(t){this.currentFolder=t,this.eventAction.next(t)}getCurrentFolder(){return this.currentFolder}getFolders(){this.http.get("../rest/folders").pipe(Object(s.a)(t=>{this.folders=t.folders,this.eventAction.next({type:"initTree",content:""})}),Object(o.a)(()=>this.loading=!1),Object(r.a)(t=>(this.notify.handleErrors(t),Object(a.a)(!1)))).subscribe()}getList(){return this.folders}getPinnedFolders(){this.loading=!0,this.http.get("../rest/pinnedFolders").pipe(Object(s.a)(t=>{this.pinnedFolders=t.folders}),Object(o.a)(()=>this.loading=!1),Object(r.a)(t=>(this.notify.handleErrors(t),Object(a.a)(!1)))).subscribe()}setFolders(t){this.folders=t}getPinnedList(){return this.pinnedFolders}pinFolder(t){this.http.post(`../rest/folders/${t.id}/pin`,{}).pipe(Object(s.a)(()=>{this.getPinnedFolders(),this.eventAction.next({type:"refreshFolderPinned",content:{id:t.id,pinned:!0}}),this.notify.success(this.translate.instant("lang.folderPinned"))}),Object(r.a)(t=>(this.notify.handleErrors(t),Object(a.a)(!1)))).subscribe()}unpinFolder(t){this.http.delete(`../rest/folders/${t.id}/unpin`).pipe(Object(s.a)(()=>{this.getPinnedFolders(),this.eventAction.next({type:"refreshFolderPinned",content:{id:t.id,pinned:!1}}),this.notify.success(this.translate.instant("lang.folderUnpinned"))}),Object(r.a)(t=>(this.notify.handleErrors(t),Object(a.a)(!1)))).subscribe()}getDragIds(){const t=this.folders.map(t=>"treefolder-list-"+t.id);return this.pinnedFolders.map(t=>"folder-list-"+t.id).concat(t)}classifyDocument(t,e){this.http.post(`../rest/folders/${e.id}/resources`,{resources:[t.item.data.resId]}).pipe(Object(s.a)(t=>{void 0!==this.pinnedFolders.filter(t=>t.id===e.id)[0]&&(this.pinnedFolders.filter(t=>t.id===e.id)[0].countResources=t.countResources),this.eventAction.next({type:"refreshFolderCount",content:{id:e.id,countResources:t.countResources}})}),Object(s.a)(()=>{this.notify.success(this.translate.instant("lang.mailClassified")),this.eventAction.next({type:"function",content:"refreshDao"})}),Object(o.a)(()=>e.drag=!1),Object(r.a)(t=>(this.notify.handleErrors(t),Object(a.a)(!1)))).subscribe()}getLoader(){return this.loading}}return t.\u0275fac=function(e){return new(e||t)(c.ac(l.e),c.ac(d.b),c.ac(h.b),c.ac(u.a),c.ac(p.c))},t.\u0275prov=c.Mb({token:t,factory:t.\u0275fac}),t})()},"7+OI":function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var n=i("HDdC");function a(t){return!!t&&(t instanceof n.a||"function"==typeof t.lift&&"function"==typeof t.subscribe)}},"7EHt":function(t,e,i){"use strict";i.d(e,"a",(function(){return B})),i.d(e,"b",(function(){return $})),i.d(e,"c",(function(){return F})),i.d(e,"d",(function(){return L})),i.d(e,"e",(function(){return W})),i.d(e,"f",(function(){return N})),i.d(e,"g",(function(){return Q})),i.d(e,"h",(function(){return z}));var n=i("fXoL"),a=i("8LU1"),s=i("XNiG"),o=i("quSY"),r=i("0EQZ");let c=0;const l=new n.s("CdkAccordion");let d=(()=>{class t{constructor(){this._stateChanges=new s.a,this._openCloseAllActions=new s.a,this.id="cdk-accordion-"+c++,this._multi=!1}get multi(){return this._multi}set multi(t){this._multi=Object(a.c)(t)}openAll(){this._openCloseAll(!0)}closeAll(){this._openCloseAll(!1)}ngOnChanges(t){this._stateChanges.next(t)}ngOnDestroy(){this._stateChanges.complete()}_openCloseAll(t){this.multi&&this._openCloseAllActions.next(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["cdk-accordion"],["","cdkAccordion",""]],inputs:{multi:"multi"},exportAs:["cdkAccordion"],features:[n.Cb([{provide:l,useExisting:t}]),n.Bb]}),t})(),h=0,u=(()=>{class t{constructor(t,e,i){this.accordion=t,this._changeDetectorRef=e,this._expansionDispatcher=i,this._openCloseAllSubscription=o.a.EMPTY,this.closed=new n.o,this.opened=new n.o,this.destroyed=new n.o,this.expandedChange=new n.o,this.id="cdk-accordion-child-"+h++,this._expanded=!1,this._disabled=!1,this._removeUniqueSelectionListener=()=>{},this._removeUniqueSelectionListener=i.listen((t,e)=>{this.accordion&&!this.accordion.multi&&this.accordion.id===e&&this.id!==t&&(this.expanded=!1)}),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions())}get expanded(){return this._expanded}set expanded(t){t=Object(a.c)(t),this._expanded!==t&&(this._expanded=t,this.expandedChange.emit(t),t?(this.opened.emit(),this._expansionDispatcher.notify(this.id,this.accordion?this.accordion.id:this.id)):this.closed.emit(),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(t){this._disabled=Object(a.c)(t)}ngOnDestroy(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe()}toggle(){this.disabled||(this.expanded=!this.expanded)}close(){this.disabled||(this.expanded=!1)}open(){this.disabled||(this.expanded=!0)}_subscribeToOpenCloseAllActions(){return this.accordion._openCloseAllActions.subscribe(t=>{this.disabled||(this.expanded=t)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(l,12),n.Qb(n.h),n.Qb(r.d))},t.\u0275dir=n.Lb({type:t,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:"expanded",disabled:"disabled"},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[n.Cb([{provide:l,useValue:void 0}])]}),t})(),p=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)}}),t})();var b=i("+rOU"),f=i("ofXK"),m=i("u47x"),g=i("/uUt"),v=i("JX91"),_=i("pLZG"),y=i("IzEk"),x=i("FtGj"),C=i("R1ws"),O=i("EY2u"),D=i("VRyK"),w=i("R0Ic");const M=["body"];function k(t,e){}const S=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],I=["mat-expansion-panel-header","*","mat-action-row"];function P(t,e){if(1&t&&n.Rb(0,"span",2),2&t){const t=n.hc();n.oc("@indicatorRotate",t._getExpandedState())}}const V=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],R=["mat-panel-title","mat-panel-description","*"],j=new n.s("MAT_ACCORDION"),A={indicatorRotate:Object(w.n)("indicatorRotate",[Object(w.k)("collapsed, void",Object(w.l)({transform:"rotate(0deg)"})),Object(w.k)("expanded",Object(w.l)({transform:"rotate(180deg)"})),Object(w.m)("expanded <=> collapsed, void => collapsed",Object(w.e)("225ms cubic-bezier(0.4,0.0,0.2,1)"))]),bodyExpansion:Object(w.n)("bodyExpansion",[Object(w.k)("collapsed, void",Object(w.l)({height:"0px",visibility:"hidden"})),Object(w.k)("expanded",Object(w.l)({height:"*",visibility:"visible"})),Object(w.m)("expanded <=> collapsed, void => collapsed",Object(w.e)("225ms cubic-bezier(0.4,0.0,0.2,1)"))])};let W=(()=>{class t{constructor(t){this._template=t}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.P))},t.\u0275dir=n.Lb({type:t,selectors:[["ng-template","matExpansionPanelContent",""]]}),t})(),T=0;const E=new n.s("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let F=(()=>{class t extends u{constructor(t,e,i,a,o,r,c){super(t,e,i),this._viewContainerRef=a,this._animationMode=r,this._hideToggle=!1,this.afterExpand=new n.o,this.afterCollapse=new n.o,this._inputChanges=new s.a,this._headerId="mat-expansion-panel-header-"+T++,this._bodyAnimationDone=new s.a,this.accordion=t,this._document=o,this._bodyAnimationDone.pipe(Object(g.a)((t,e)=>t.fromState===e.fromState&&t.toState===e.toState)).subscribe(t=>{"void"!==t.fromState&&("expanded"===t.toState?this.afterExpand.emit():"collapsed"===t.toState&&this.afterCollapse.emit())}),c&&(this.hideToggle=c.hideToggle)}get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(t){this._hideToggle=Object(a.c)(t)}get togglePosition(){return this._togglePosition||this.accordion&&this.accordion.togglePosition}set togglePosition(t){this._togglePosition=t}_hasSpacing(){return!!this.accordion&&this.expanded&&"default"===this.accordion.displayMode}_getExpandedState(){return this.expanded?"expanded":"collapsed"}toggle(){this.expanded=!this.expanded}close(){this.expanded=!1}open(){this.expanded=!0}ngAfterContentInit(){this._lazyContent&&this.opened.pipe(Object(v.a)(null),Object(_.a)(()=>this.expanded&&!this._portal),Object(y.a)(1)).subscribe(()=>{this._portal=new b.i(this._lazyContent._template,this._viewContainerRef)})}ngOnChanges(t){this._inputChanges.next(t)}ngOnDestroy(){super.ngOnDestroy(),this._bodyAnimationDone.complete(),this._inputChanges.complete()}_containsFocus(){if(this._body){const t=this._document.activeElement,e=this._body.nativeElement;return t===e||e.contains(t)}return!1}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(j,12),n.Qb(n.h),n.Qb(r.d),n.Qb(n.T),n.Qb(f.e),n.Qb(C.a,8),n.Qb(E,8))},t.\u0275cmp=n.Kb({type:t,selectors:[["mat-expansion-panel"]],contentQueries:function(t,e,i){var a;1&t&&n.Jb(i,W,!0),2&t&&n.yc(a=n.ec())&&(e._lazyContent=a.first)},viewQuery:function(t,e){var i;1&t&&n.Xc(M,!0),2&t&&n.yc(i=n.ec())&&(e._body=i.first)},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(t,e){2&t&&n.Ib("mat-expanded",e.expanded)("_mat-animation-noopable","NoopAnimations"===e._animationMode)("mat-expansion-panel-spacing",e._hasSpacing())},inputs:{disabled:"disabled",expanded:"expanded",hideToggle:"hideToggle",togglePosition:"togglePosition"},outputs:{opened:"opened",closed:"closed",expandedChange:"expandedChange",afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],features:[n.Cb([{provide:j,useValue:void 0}]),n.Ab,n.Bb],ngContentSelectors:I,decls:7,vars:4,consts:[["role","region",1,"mat-expansion-panel-content",3,"id"],["body",""],[1,"mat-expansion-panel-body"],[3,"cdkPortalOutlet"]],template:function(t,e){1&t&&(n.nc(S),n.mc(0),n.Wb(1,"div",0,1),n.dc("@bodyExpansion.done",(function(t){return e._bodyAnimationDone.next(t)})),n.Wb(3,"div",2),n.mc(4,1),n.Oc(5,k,0,0,"ng-template",3),n.Vb(),n.mc(6,2),n.Vb()),2&t&&(n.Db(1),n.oc("@bodyExpansion",e._getExpandedState())("id",e.id),n.Eb("aria-labelledby",e._headerId),n.Db(4),n.oc("cdkPortalOutlet",e._portal))},directives:[b.c],styles:[".mat-expansion-panel{box-sizing:content-box;display:block;margin:0;border-radius:4px;overflow:hidden;transition:margin 225ms cubic-bezier(0.4, 0, 0.2, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);position:relative}.mat-accordion .mat-expansion-panel:not(.mat-expanded),.mat-accordion .mat-expansion-panel:not(.mat-expansion-panel-spacing){border-radius:0}.mat-accordion .mat-expansion-panel:first-of-type{border-top-right-radius:4px;border-top-left-radius:4px}.mat-accordion .mat-expansion-panel:last-of-type{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.cdk-high-contrast-active .mat-expansion-panel{outline:solid 1px}.mat-expansion-panel.ng-animate-disabled,.ng-animate-disabled .mat-expansion-panel,.mat-expansion-panel._mat-animation-noopable{transition:none}.mat-expansion-panel-content{display:flex;flex-direction:column;overflow:visible}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion>.mat-expansion-panel-spacing:first-child,.mat-accordion>*:first-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-top:0}.mat-accordion>.mat-expansion-panel-spacing:last-child,.mat-accordion>*:last-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px}.mat-action-row button.mat-button-base,.mat-action-row button.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-action-row button.mat-button-base,[dir=rtl] .mat-action-row button.mat-mdc-button-base{margin-left:0;margin-right:8px}\n"],encapsulation:2,data:{animation:[A.bodyExpansion]},changeDetection:0}),t})(),L=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["mat-action-row"]],hostAttrs:[1,"mat-action-row"]}),t})(),Q=(()=>{class t{constructor(t,e,i,n,a,s){this.panel=t,this._element=e,this._focusMonitor=i,this._changeDetectorRef=n,this._animationMode=s,this._parentChangeSubscription=o.a.EMPTY;const r=t.accordion?t.accordion._stateChanges.pipe(Object(_.a)(t=>!(!t.hideToggle&&!t.togglePosition))):O.a;this._parentChangeSubscription=Object(D.a)(t.opened,t.closed,r,t._inputChanges.pipe(Object(_.a)(t=>!!(t.hideToggle||t.disabled||t.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),t.closed.pipe(Object(_.a)(()=>t._containsFocus())).subscribe(()=>i.focusVia(e,"program")),a&&(this.expandedHeight=a.expandedHeight,this.collapsedHeight=a.collapsedHeight)}get disabled(){return this.panel.disabled}_toggle(){this.disabled||this.panel.toggle()}_isExpanded(){return this.panel.expanded}_getExpandedState(){return this.panel._getExpandedState()}_getPanelId(){return this.panel.id}_getTogglePosition(){return this.panel.togglePosition}_showToggle(){return!this.panel.hideToggle&&!this.panel.disabled}_getHeaderHeight(){const t=this._isExpanded();return t&&this.expandedHeight?this.expandedHeight:!t&&this.collapsedHeight?this.collapsedHeight:null}_keydown(t){switch(t.keyCode){case x.q:case x.g:Object(x.v)(t)||(t.preventDefault(),this._toggle());break;default:return void(this.panel.accordion&&this.panel.accordion._handleHeaderKeydown(t))}}focus(t="program",e){this._focusMonitor.focusVia(this._element,t,e)}ngAfterViewInit(){this._focusMonitor.monitor(this._element).subscribe(t=>{t&&this.panel.accordion&&this.panel.accordion._handleHeaderFocus(this)})}ngOnDestroy(){this._parentChangeSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._element)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(F,1),n.Qb(n.l),n.Qb(m.h),n.Qb(n.h),n.Qb(E,8),n.Qb(C.a,8))},t.\u0275cmp=n.Kb({type:t,selectors:[["mat-expansion-panel-header"]],hostAttrs:["role","button",1,"mat-expansion-panel-header","mat-focus-indicator"],hostVars:15,hostBindings:function(t,e){1&t&&n.dc("click",(function(){return e._toggle()}))("keydown",(function(t){return e._keydown(t)})),2&t&&(n.Eb("id",e.panel._headerId)("tabindex",e.disabled?-1:0)("aria-controls",e._getPanelId())("aria-expanded",e._isExpanded())("aria-disabled",e.panel.disabled),n.Lc("height",e._getHeaderHeight()),n.Ib("mat-expanded",e._isExpanded())("mat-expansion-toggle-indicator-after","after"===e._getTogglePosition())("mat-expansion-toggle-indicator-before","before"===e._getTogglePosition())("_mat-animation-noopable","NoopAnimations"===e._animationMode))},inputs:{expandedHeight:"expandedHeight",collapsedHeight:"collapsedHeight"},ngContentSelectors:R,decls:5,vars:1,consts:[[1,"mat-content"],["class","mat-expansion-indicator",4,"ngIf"],[1,"mat-expansion-indicator"]],template:function(t,e){1&t&&(n.nc(V),n.Wb(0,"span",0),n.mc(1),n.mc(2,1),n.mc(3,2),n.Vb(),n.Oc(4,P,1,1,"span",1)),2&t&&(n.Db(4),n.oc("ngIf",e._showToggle()))},directives:[f.t],styles:['.mat-expansion-panel-header{display:flex;flex-direction:row;align-items:center;padding:0 24px;border-radius:inherit;transition:height 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel-header._mat-animation-noopable{transition:none}.mat-expansion-panel-header:focus,.mat-expansion-panel-header:hover{outline:none}.mat-expansion-panel-header.mat-expanded:focus,.mat-expansion-panel-header.mat-expanded:hover{background:inherit}.mat-expansion-panel-header:not([aria-disabled=true]){cursor:pointer}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before{flex-direction:row-reverse}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 16px 0 0}[dir=rtl] .mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 0 0 16px}.mat-content{display:flex;flex:1;flex-direction:row;overflow:hidden}.mat-expansion-panel-header-title,.mat-expansion-panel-header-description{display:flex;flex-grow:1;margin-right:16px}[dir=rtl] .mat-expansion-panel-header-title,[dir=rtl] .mat-expansion-panel-header-description{margin-right:0;margin-left:16px}.mat-expansion-panel-header-description{flex-grow:2}.mat-expansion-indicator::after{border-style:solid;border-width:0 2px 2px 0;content:"";display:inline-block;padding:3px;transform:rotate(45deg);vertical-align:middle}\n'],encapsulation:2,data:{animation:[A.indicatorRotate]},changeDetection:0}),t})(),N=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]}),t})(),z=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),t})(),B=(()=>{class t extends d{constructor(){super(...arguments),this._ownHeaders=new n.H,this._hideToggle=!1,this.displayMode="default",this.togglePosition="after"}get hideToggle(){return this._hideToggle}set hideToggle(t){this._hideToggle=Object(a.c)(t)}ngAfterContentInit(){this._headers.changes.pipe(Object(v.a)(this._headers)).subscribe(t=>{this._ownHeaders.reset(t.filter(t=>t.panel.accordion===this)),this._ownHeaders.notifyOnChanges()}),this._keyManager=new m.g(this._ownHeaders).withWrap().withHomeAndEnd()}_handleHeaderKeydown(t){this._keyManager.onKeydown(t)}_handleHeaderFocus(t){this._keyManager.updateActiveItem(t)}}return t.\u0275fac=function(e){return U(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["mat-accordion"]],contentQueries:function(t,e,i){var a;1&t&&n.Jb(i,Q,!0),2&t&&n.yc(a=n.ec())&&(e._headers=a)},hostAttrs:[1,"mat-accordion"],hostVars:2,hostBindings:function(t,e){2&t&&n.Ib("mat-accordion-multi",e.multi)},inputs:{multi:"multi",displayMode:"displayMode",togglePosition:"togglePosition",hideToggle:"hideToggle"},exportAs:["matAccordion"],features:[n.Cb([{provide:j,useExisting:t}]),n.Ab]}),t})();const U=n.Yb(B);let $=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[f.c,p,b.h]]}),t})()},"7Hc7":function(t,e,i){"use strict";i.d(e,"a",(function(){return u}));let n=1;const a=(()=>Promise.resolve())(),s={};function o(t){return t in s&&(delete s[t],!0)}const r={setImmediate(t){const e=n++;return s[e]=!0,a.then(()=>o(e)&&t()),e},clearImmediate(t){o(t)}};var c=i("3N8a");class l extends c.a{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,i=0){return null!==i&&i>0?super.requestAsyncId(t,e,i):(t.actions.push(this),t.scheduled||(t.scheduled=r.setImmediate(t.flush.bind(t,null))))}recycleAsyncId(t,e,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(t,e,i);0===t.actions.length&&(r.clearImmediate(e),t.scheduled=void 0)}}var d=i("IjjT");class h extends d.a{flush(t){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let i,n=-1,a=e.length;t=t||e.shift();do{if(i=t.execute(t.state,t.delay))break}while(++n<a&&(t=e.shift()));if(this.active=!1,i){for(;++n<a&&(t=e.shift());)t.unsubscribe();throw i}}}const u=new h(l)},"7o/Q":function(t,e,i){"use strict";i.d(e,"a",(function(){return l}));var n=i("n6bG"),a=i("gRHU"),s=i("quSY"),o=i("2QA8"),r=i("2fFW"),c=i("NJ4a");class l extends s.a{constructor(t,e,i){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=a.a;break;case 1:if(!t){this.destination=a.a;break}if("object"==typeof t){t instanceof l?(this.syncErrorThrowable=t.syncErrorThrowable,this.destination=t,t.add(this)):(this.syncErrorThrowable=!0,this.destination=new d(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new d(this,t,e,i)}}[o.a](){return this}static create(t,e,i){const n=new l(t,e,i);return n.syncErrorThrowable=!1,n}next(t){this.isStopped||this._next(t)}error(t){this.isStopped||(this.isStopped=!0,this._error(t))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(t){this.destination.next(t)}_error(t){this.destination.error(t),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:t}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this}}class d extends l{constructor(t,e,i,s){let o;super(),this._parentSubscriber=t;let r=this;Object(n.a)(e)?o=e:e&&(o=e.next,i=e.error,s=e.complete,e!==a.a&&(r=Object.create(e),Object(n.a)(r.unsubscribe)&&this.add(r.unsubscribe.bind(r)),r.unsubscribe=this.unsubscribe.bind(this))),this._context=r,this._next=o,this._error=i,this._complete=s}next(t){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;r.a.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}}error(t){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:i}=r.a;if(this._error)i&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)i?(e.syncErrorValue=t,e.syncErrorThrown=!0):Object(c.a)(t),this.unsubscribe();else{if(this.unsubscribe(),i)throw t;Object(c.a)(t)}}}complete(){if(!this.isStopped){const{_parentSubscriber:t}=this;if(this._complete){const e=()=>this._complete.call(this._context);r.a.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(t,e){try{t.call(this._context,e)}catch(i){if(this.unsubscribe(),r.a.useDeprecatedSynchronousErrorHandling)throw i;Object(c.a)(i)}}__tryOrSetError(t,e,i){if(!r.a.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,i)}catch(n){return r.a.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=n,t.syncErrorThrown=!0,!0):(Object(c.a)(n),!0)}return!1}_unsubscribe(){const{_parentSubscriber:t}=this;this._context=null,this._parentSubscriber=null,t.unsubscribe()}}},"8LU1":function(t,e,i){"use strict";i.d(e,"a",(function(){return o})),i.d(e,"b",(function(){return r})),i.d(e,"c",(function(){return a})),i.d(e,"d",(function(){return c})),i.d(e,"e",(function(){return l})),i.d(e,"f",(function(){return s}));var n=i("fXoL");function a(t){return null!=t&&""+t!="false"}function s(t,e=0){return o(t)?Number(t):e}function o(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}function r(t){return Array.isArray(t)?t:[t]}function c(t){return null==t?"":"string"==typeof t?t:t+"px"}function l(t){return t instanceof n.l?t.nativeElement:t}},"8yBR":function(t,e,i){"use strict";i.d(e,"a",(function(){return m})),i.d(e,"b",(function(){return y})),i.d(e,"c",(function(){return M})),i.d(e,"d",(function(){return w})),i.d(e,"e",(function(){return D})),i.d(e,"f",(function(){return k})),i.d(e,"g",(function(){return p})),i.d(e,"h",(function(){return b})),i.d(e,"i",(function(){return _})),i.d(e,"j",(function(){return g})),i.d(e,"k",(function(){return C}));var n=i("FvrZ"),a=i("FKr1"),s=i("8LU1"),o=i("0EQZ"),r=i("2Vo4"),c=i("VRyK"),l=i("IzEk"),d=i("lJxs"),h=i("fXoL");const u=Object(a.F)(Object(a.C)(n.e));let p=(()=>{class t extends u{constructor(t,e,i){super(t,e),this._elementRef=t,this._tree=e,this.role="treeitem",this.tabIndex=Number(i)||0}}return t.\u0275fac=function(e){return new(e||t)(h.Qb(h.l),h.Qb(n.c),h.bc("tabindex"))},t.\u0275dir=h.Lb({type:t,selectors:[["mat-tree-node"]],hostAttrs:[1,"mat-tree-node"],hostVars:3,hostBindings:function(t,e){2&t&&h.Eb("aria-expanded",e.isExpanded)("aria-level",e.level+1)("role",e.role)},inputs:{disabled:"disabled",tabIndex:"tabIndex",role:"role"},exportAs:["matTreeNode"],features:[h.Cb([{provide:n.e,useExisting:t}]),h.Ab]}),t})(),b=(()=>{class t extends n.f{}return t.\u0275fac=function(e){return f(e||t)},t.\u0275dir=h.Lb({type:t,selectors:[["","matTreeNodeDef",""]],inputs:{when:["matTreeNodeDefWhen","when"],data:["matTreeNode","data"]},features:[h.Cb([{provide:n.f,useExisting:t}]),h.Ab]}),t})();const f=h.Yb(b);let m=(()=>{class t extends n.b{constructor(t,e,i,n){super(t,e,i),this._elementRef=t,this._tree=e,this._differs=i,this._disabled=!1,this.tabIndex=Number(n)||0}get disabled(){return this._disabled}set disabled(t){this._disabled=Object(s.c)(t)}get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(t){this._tabIndex=null!=t?t:0}ngAfterContentInit(){super.ngAfterContentInit()}ngOnDestroy(){super.ngOnDestroy()}}return t.\u0275fac=function(e){return new(e||t)(h.Qb(h.l),h.Qb(n.c),h.Qb(h.v),h.bc("tabindex"))},t.\u0275dir=h.Lb({type:t,selectors:[["mat-nested-tree-node"]],hostAttrs:[1,"mat-nested-tree-node"],hostVars:2,hostBindings:function(t,e){2&t&&h.Eb("aria-expanded",e.isExpanded)("role",e.role)},inputs:{tabIndex:"tabIndex",disabled:"disabled",node:["matNestedTreeNode","node"]},exportAs:["matNestedTreeNode"],features:[h.Cb([{provide:n.b,useExisting:t},{provide:n.e,useExisting:t},{provide:n.a,useExisting:t}]),h.Ab]}),t})(),g=(()=>{class t extends n.h{get level(){return this._level}set level(t){this._setLevelInput(t)}get indent(){return this._indent}set indent(t){this._setIndentInput(t)}}return t.\u0275fac=function(e){return v(e||t)},t.\u0275dir=h.Lb({type:t,selectors:[["","matTreeNodePadding",""]],inputs:{level:["matTreeNodePadding","level"],indent:["matTreeNodePaddingIndent","indent"]},features:[h.Cb([{provide:n.h,useExisting:t}]),h.Ab]}),t})();const v=h.Yb(g);let _=(()=>{class t{constructor(t,e){this.viewContainer=t,this._node=e}}return t.\u0275fac=function(e){return new(e||t)(h.Qb(h.T),h.Qb(n.a,8))},t.\u0275dir=h.Lb({type:t,selectors:[["","matTreeNodeOutlet",""]],features:[h.Cb([{provide:n.g,useExisting:t}])]}),t})(),y=(()=>{class t extends n.c{}return t.\u0275fac=function(e){return x(e||t)},t.\u0275cmp=h.Kb({type:t,selectors:[["mat-tree"]],viewQuery:function(t,e){var i;1&t&&h.Kc(_,!0),2&t&&h.yc(i=h.ec())&&(e._nodeOutlet=i.first)},hostAttrs:["role","tree",1,"mat-tree"],exportAs:["matTree"],features:[h.Cb([{provide:n.c,useExisting:t}]),h.Ab],decls:1,vars:0,consts:[["matTreeNodeOutlet",""]],template:function(t,e){1&t&&h.Sb(0,0)},directives:[_],styles:[".mat-tree{display:block}.mat-tree-node{display:flex;align-items:center;flex:1;word-wrap:break-word}.mat-nested-tree-node{border-bottom-width:0}\n"],encapsulation:2}),t})();const x=h.Yb(y);let C=(()=>{class t extends n.i{get recursive(){return this._recursive}set recursive(t){this._recursive=Object(s.c)(t)}}return t.\u0275fac=function(e){return O(e||t)},t.\u0275dir=h.Lb({type:t,selectors:[["","matTreeNodeToggle",""]],inputs:{recursive:["matTreeNodeToggleRecursive","recursive"]},features:[h.Cb([{provide:n.i,useExisting:t}]),h.Ab]}),t})();const O=h.Yb(C);let D=(()=>{class t{}return t.\u0275mod=h.Ob({type:t}),t.\u0275inj=h.Nb({factory:function(e){return new(e||t)},imports:[[n.d,a.k],a.k]}),t})();class w{constructor(t,e,i,n){this.transformFunction=t,this.getLevel=e,this.isExpandable=i,this.getChildren=n}_flattenNode(t,e,i,n){const a=this.transformFunction(t,e);if(i.push(a),this.isExpandable(a)){const a=this.getChildren(t);a&&(Array.isArray(a)?this._flattenChildren(a,e,i,n):a.pipe(Object(l.a)(1)).subscribe(t=>{this._flattenChildren(t,e,i,n)}))}return i}_flattenChildren(t,e,i,n){t.forEach((a,s)=>{let o=n.slice();o.push(s!=t.length-1),this._flattenNode(a,e+1,i,o)})}flattenNodes(t){let e=[];return t.forEach(t=>this._flattenNode(t,0,e,[])),e}expandFlattenedNodes(t,e){let i=[],n=[];return n[0]=!0,t.forEach(t=>{let a=!0;for(let e=0;e<=this.getLevel(t);e++)a=a&&n[e];a&&i.push(t),this.isExpandable(t)&&(n[this.getLevel(t)+1]=e.isExpanded(t))}),i}}class M extends o.b{constructor(t,e,i=[]){super(),this._treeControl=t,this._treeFlattener=e,this._flattenedData=new r.a([]),this._expandedData=new r.a([]),this._data=new r.a(i)}get data(){return this._data.value}set data(t){this._data.next(t),this._flattenedData.next(this._treeFlattener.flattenNodes(this.data)),this._treeControl.dataNodes=this._flattenedData.value}connect(t){const e=[t.viewChange,this._treeControl.expansionModel.changed,this._flattenedData];return Object(c.a)(...e).pipe(Object(d.a)(()=>(this._expandedData.next(this._treeFlattener.expandFlattenedNodes(this._flattenedData.value,this._treeControl)),this._expandedData.value)))}disconnect(){}}class k extends o.b{constructor(){super(...arguments),this._data=new r.a([])}get data(){return this._data.value}set data(t){this._data.next(t)}connect(t){return Object(c.a)(t.viewChange,this._data).pipe(Object(d.a)(()=>this.data))}disconnect(){}}},"9ppp":function(t,e,i){"use strict";i.d(e,"a",(function(){return n}));const n=(()=>{function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t})()},A5z7:function(t,e,i){"use strict";i.d(e,"a",(function(){return S})),i.d(e,"b",(function(){return M})),i.d(e,"c",(function(){return E})),i.d(e,"d",(function(){return W})),i.d(e,"e",(function(){return I})),i.d(e,"f",(function(){return k})),i.d(e,"g",(function(){return L}));var n=i("FtGj"),a=i("fXoL"),s=i("FKr1"),o=i("8LU1"),r=i("ofXK"),c=i("R1ws"),l=i("XNiG"),d=i("VRyK"),h=i("IzEk"),u=i("1G5W"),p=i("JX91"),b=i("u47x"),f=i("0EQZ"),m=i("kmnG"),g=i("nLfN"),v=i("cH1L"),_=i("3Pt+");const y=["*"],x=new a.s("MatChipRemove"),C=new a.s("MatChipAvatar"),O=new a.s("MatChipTrailingIcon");class D{constructor(t){this._elementRef=t}}const w=Object(s.F)(Object(s.A)(Object(s.B)(D),"primary"),-1);let M=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=a.Lb({type:t,selectors:[["mat-chip-avatar"],["","matChipAvatar",""]],hostAttrs:[1,"mat-chip-avatar"],features:[a.Cb([{provide:C,useExisting:t}])]}),t})(),k=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=a.Lb({type:t,selectors:[["mat-chip-trailing-icon"],["","matChipTrailingIcon",""]],hostAttrs:[1,"mat-chip-trailing-icon"],features:[a.Cb([{provide:O,useExisting:t}])]}),t})(),S=(()=>{class t extends w{constructor(t,e,i,n,o,r,c,d){super(t),this._elementRef=t,this._ngZone=e,this._changeDetectorRef=r,this._hasFocus=!1,this.chipListSelectable=!0,this._chipListMultiple=!1,this._chipListDisabled=!1,this._selected=!1,this._selectable=!0,this._disabled=!1,this._removable=!0,this._onFocus=new l.a,this._onBlur=new l.a,this.selectionChange=new a.o,this.destroyed=new a.o,this.removed=new a.o,this._addHostClassName(),this._chipRippleTarget=(d||document).createElement("div"),this._chipRippleTarget.classList.add("mat-chip-ripple"),this._elementRef.nativeElement.appendChild(this._chipRippleTarget),this._chipRipple=new s.x(this,e,this._chipRippleTarget,i),this._chipRipple.setupTriggerEvents(t),this.rippleConfig=n||{},this._animationsDisabled="NoopAnimations"===o,this.tabIndex=null!=c&&parseInt(c)||-1}get rippleDisabled(){return this.disabled||this.disableRipple||!!this.rippleConfig.disabled}get selected(){return this._selected}set selected(t){const e=Object(o.c)(t);e!==this._selected&&(this._selected=e,this._dispatchSelectionChange())}get value(){return void 0!==this._value?this._value:this._elementRef.nativeElement.textContent}set value(t){this._value=t}get selectable(){return this._selectable&&this.chipListSelectable}set selectable(t){this._selectable=Object(o.c)(t)}get disabled(){return this._chipListDisabled||this._disabled}set disabled(t){this._disabled=Object(o.c)(t)}get removable(){return this._removable}set removable(t){this._removable=Object(o.c)(t)}get ariaSelected(){return this.selectable&&(this._chipListMultiple||this.selected)?this.selected.toString():null}_addHostClassName(){const t=this._elementRef.nativeElement;t.hasAttribute("mat-basic-chip")||"mat-basic-chip"===t.tagName.toLowerCase()?t.classList.add("mat-basic-chip"):t.classList.add("mat-standard-chip")}ngOnDestroy(){this.destroyed.emit({chip:this}),this._chipRipple._removeTriggerEvents()}select(){this._selected||(this._selected=!0,this._dispatchSelectionChange(),this._markForCheck())}deselect(){this._selected&&(this._selected=!1,this._dispatchSelectionChange(),this._markForCheck())}selectViaInteraction(){this._selected||(this._selected=!0,this._dispatchSelectionChange(!0),this._markForCheck())}toggleSelected(t=!1){return this._selected=!this.selected,this._dispatchSelectionChange(t),this._markForCheck(),this.selected}focus(){this._hasFocus||(this._elementRef.nativeElement.focus(),this._onFocus.next({chip:this})),this._hasFocus=!0}remove(){this.removable&&this.removed.emit({chip:this})}_handleClick(t){this.disabled?t.preventDefault():t.stopPropagation()}_handleKeydown(t){if(!this.disabled)switch(t.keyCode){case n.d:case n.b:this.remove(),t.preventDefault();break;case n.q:this.selectable&&this.toggleSelected(!0),t.preventDefault()}}_blur(){this._ngZone.onStable.pipe(Object(h.a)(1)).subscribe(()=>{this._ngZone.run(()=>{this._hasFocus=!1,this._onBlur.next({chip:this})})})}_dispatchSelectionChange(t=!1){this.selectionChange.emit({source:this,isUserInput:t,selected:this._selected})}_markForCheck(){this._changeDetectorRef&&this._changeDetectorRef.markForCheck()}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(a.C),a.Qb(g.a),a.Qb(s.j,8),a.Qb(c.a,8),a.Qb(a.h),a.bc("tabindex"),a.Qb(r.e,8))},t.\u0275dir=a.Lb({type:t,selectors:[["mat-basic-chip"],["","mat-basic-chip",""],["mat-chip"],["","mat-chip",""]],contentQueries:function(t,e,i){var n;1&t&&(a.Jb(i,C,!0),a.Jb(i,O,!0),a.Jb(i,x,!0)),2&t&&(a.yc(n=a.ec())&&(e.avatar=n.first),a.yc(n=a.ec())&&(e.trailingIcon=n.first),a.yc(n=a.ec())&&(e.removeIcon=n.first))},hostAttrs:["role","option",1,"mat-chip","mat-focus-indicator"],hostVars:14,hostBindings:function(t,e){1&t&&a.dc("click",(function(t){return e._handleClick(t)}))("keydown",(function(t){return e._handleKeydown(t)}))("focus",(function(){return e.focus()}))("blur",(function(){return e._blur()})),2&t&&(a.Eb("tabindex",e.disabled?null:e.tabIndex)("disabled",e.disabled||null)("aria-disabled",e.disabled.toString())("aria-selected",e.ariaSelected),a.Ib("mat-chip-selected",e.selected)("mat-chip-with-avatar",e.avatar)("mat-chip-with-trailing-icon",e.trailingIcon||e.removeIcon)("mat-chip-disabled",e.disabled)("_mat-animation-noopable",e._animationsDisabled))},inputs:{color:"color",disableRipple:"disableRipple",tabIndex:"tabIndex",selected:"selected",value:"value",selectable:"selectable",disabled:"disabled",removable:"removable"},outputs:{selectionChange:"selectionChange",destroyed:"destroyed",removed:"removed"},exportAs:["matChip"],features:[a.Ab]}),t})(),I=(()=>{class t{constructor(t,e){this._parentChip=t,e&&"BUTTON"===e.nativeElement.nodeName&&e.nativeElement.setAttribute("type","button")}_handleClick(t){const e=this._parentChip;e.removable&&!e.disabled&&e.remove(),t.stopPropagation()}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(S),a.Qb(a.l))},t.\u0275dir=a.Lb({type:t,selectors:[["","matChipRemove",""]],hostAttrs:[1,"mat-chip-remove","mat-chip-trailing-icon"],hostBindings:function(t,e){1&t&&a.dc("click",(function(t){return e._handleClick(t)}))},features:[a.Cb([{provide:x,useExisting:t}])]}),t})();const P=new a.s("mat-chips-default-options");class V{constructor(t,e,i,n){this._defaultErrorStateMatcher=t,this._parentForm=e,this._parentFormGroup=i,this.ngControl=n}}const R=Object(s.D)(V);let j=0;class A{constructor(t,e){this.source=t,this.value=e}}let W=(()=>{class t extends R{constructor(t,e,i,n,s,o,r){super(o,n,s,r),this._elementRef=t,this._changeDetectorRef=e,this._dir=i,this.ngControl=r,this.controlType="mat-chip-list",this._lastDestroyedChipIndex=null,this._destroyed=new l.a,this._uid="mat-chip-list-"+j++,this._tabIndex=0,this._userTabIndex=null,this._onTouched=()=>{},this._onChange=()=>{},this._multiple=!1,this._compareWith=(t,e)=>t===e,this._required=!1,this._disabled=!1,this.ariaOrientation="horizontal",this._selectable=!0,this.change=new a.o,this.valueChange=new a.o,this.ngControl&&(this.ngControl.valueAccessor=this)}get selected(){return this.multiple?this._selectionModel.selected:this._selectionModel.selected[0]}get role(){return this.empty?null:"listbox"}get multiple(){return this._multiple}set multiple(t){this._multiple=Object(o.c)(t),this._syncChipsState()}get compareWith(){return this._compareWith}set compareWith(t){this._compareWith=t,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(t){this.writeValue(t),this._value=t}get id(){return this._chipInput?this._chipInput.id:this._uid}get required(){return this._required}set required(t){this._required=Object(o.c)(t),this.stateChanges.next()}get placeholder(){return this._chipInput?this._chipInput.placeholder:this._placeholder}set placeholder(t){this._placeholder=t,this.stateChanges.next()}get focused(){return this._chipInput&&this._chipInput.focused||this._hasFocusedChip()}get empty(){return(!this._chipInput||this._chipInput.empty)&&(!this.chips||0===this.chips.length)}get shouldLabelFloat(){return!this.empty||this.focused}get disabled(){return this.ngControl?!!this.ngControl.disabled:this._disabled}set disabled(t){this._disabled=Object(o.c)(t),this._syncChipsState()}get selectable(){return this._selectable}set selectable(t){this._selectable=Object(o.c)(t),this.chips&&this.chips.forEach(t=>t.chipListSelectable=this._selectable)}set tabIndex(t){this._userTabIndex=t,this._tabIndex=t}get chipSelectionChanges(){return Object(d.a)(...this.chips.map(t=>t.selectionChange))}get chipFocusChanges(){return Object(d.a)(...this.chips.map(t=>t._onFocus))}get chipBlurChanges(){return Object(d.a)(...this.chips.map(t=>t._onBlur))}get chipRemoveChanges(){return Object(d.a)(...this.chips.map(t=>t.destroyed))}ngAfterContentInit(){this._keyManager=new b.g(this.chips).withWrap().withVerticalOrientation().withHomeAndEnd().withHorizontalOrientation(this._dir?this._dir.value:"ltr"),this._dir&&this._dir.change.pipe(Object(u.a)(this._destroyed)).subscribe(t=>this._keyManager.withHorizontalOrientation(t)),this._keyManager.tabOut.pipe(Object(u.a)(this._destroyed)).subscribe(()=>{this._allowFocusEscape()}),this.chips.changes.pipe(Object(p.a)(null),Object(u.a)(this._destroyed)).subscribe(()=>{this.disabled&&Promise.resolve().then(()=>{this._syncChipsState()}),this._resetChips(),this._initializeSelection(),this._updateTabIndex(),this._updateFocusForDestroyedChips(),this.stateChanges.next()})}ngOnInit(){this._selectionModel=new f.c(this.multiple,void 0,!1),this.stateChanges.next()}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==this._disabled&&(this.disabled=!!this.ngControl.disabled))}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete(),this.stateChanges.complete(),this._dropSubscriptions()}registerInput(t){this._chipInput=t,this._elementRef.nativeElement.setAttribute("data-mat-chip-input",t.id)}setDescribedByIds(t){this._ariaDescribedby=t.join(" ")}writeValue(t){this.chips&&this._setSelectionByValue(t,!1)}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t,this.stateChanges.next()}onContainerClick(t){this._originatesFromChip(t)||this.focus()}focus(t){this.disabled||this._chipInput&&this._chipInput.focused||(this.chips.length>0?(this._keyManager.setFirstItemActive(),this.stateChanges.next()):(this._focusInput(t),this.stateChanges.next()))}_focusInput(t){this._chipInput&&this._chipInput.focus(t)}_keydown(t){const e=t.target;t.keyCode===n.b&&this._isInputEmpty(e)?(this._keyManager.setLastItemActive(),t.preventDefault()):e&&e.classList.contains("mat-chip")&&(this._keyManager.onKeydown(t),this.stateChanges.next())}_updateTabIndex(){this._tabIndex=this._userTabIndex||(0===this.chips.length?-1:0)}_updateFocusForDestroyedChips(){if(null!=this._lastDestroyedChipIndex)if(this.chips.length){const t=Math.min(this._lastDestroyedChipIndex,this.chips.length-1);this._keyManager.setActiveItem(t)}else this.focus();this._lastDestroyedChipIndex=null}_isValidIndex(t){return t>=0&&t<this.chips.length}_isInputEmpty(t){return!(!t||"input"!==t.nodeName.toLowerCase()||t.value)}_setSelectionByValue(t,e=!0){if(this._clearSelection(),this.chips.forEach(t=>t.deselect()),Array.isArray(t))t.forEach(t=>this._selectValue(t,e)),this._sortValues();else{const i=this._selectValue(t,e);i&&e&&this._keyManager.setActiveItem(i)}}_selectValue(t,e=!0){const i=this.chips.find(e=>null!=e.value&&this._compareWith(e.value,t));return i&&(e?i.selectViaInteraction():i.select(),this._selectionModel.select(i)),i}_initializeSelection(){Promise.resolve().then(()=>{(this.ngControl||this._value)&&(this._setSelectionByValue(this.ngControl?this.ngControl.value:this._value,!1),this.stateChanges.next())})}_clearSelection(t){this._selectionModel.clear(),this.chips.forEach(e=>{e!==t&&e.deselect()}),this.stateChanges.next()}_sortValues(){this._multiple&&(this._selectionModel.clear(),this.chips.forEach(t=>{t.selected&&this._selectionModel.select(t)}),this.stateChanges.next())}_propagateChanges(t){let e=null;e=Array.isArray(this.selected)?this.selected.map(t=>t.value):this.selected?this.selected.value:t,this._value=e,this.change.emit(new A(this,e)),this.valueChange.emit(e),this._onChange(e),this._changeDetectorRef.markForCheck()}_blur(){this._hasFocusedChip()||this._keyManager.setActiveItem(-1),this.disabled||(this._chipInput?setTimeout(()=>{this.focused||this._markAsTouched()}):this._markAsTouched())}_markAsTouched(){this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next()}_allowFocusEscape(){-1!==this._tabIndex&&(this._tabIndex=-1,setTimeout(()=>{this._tabIndex=this._userTabIndex||0,this._changeDetectorRef.markForCheck()}))}_resetChips(){this._dropSubscriptions(),this._listenToChipsFocus(),this._listenToChipsSelection(),this._listenToChipsRemoved()}_dropSubscriptions(){this._chipFocusSubscription&&(this._chipFocusSubscription.unsubscribe(),this._chipFocusSubscription=null),this._chipBlurSubscription&&(this._chipBlurSubscription.unsubscribe(),this._chipBlurSubscription=null),this._chipSelectionSubscription&&(this._chipSelectionSubscription.unsubscribe(),this._chipSelectionSubscription=null),this._chipRemoveSubscription&&(this._chipRemoveSubscription.unsubscribe(),this._chipRemoveSubscription=null)}_listenToChipsSelection(){this._chipSelectionSubscription=this.chipSelectionChanges.subscribe(t=>{t.source.selected?this._selectionModel.select(t.source):this._selectionModel.deselect(t.source),this.multiple||this.chips.forEach(t=>{!this._selectionModel.isSelected(t)&&t.selected&&t.deselect()}),t.isUserInput&&this._propagateChanges()})}_listenToChipsFocus(){this._chipFocusSubscription=this.chipFocusChanges.subscribe(t=>{let e=this.chips.toArray().indexOf(t.chip);this._isValidIndex(e)&&this._keyManager.updateActiveItem(e),this.stateChanges.next()}),this._chipBlurSubscription=this.chipBlurChanges.subscribe(()=>{this._blur(),this.stateChanges.next()})}_listenToChipsRemoved(){this._chipRemoveSubscription=this.chipRemoveChanges.subscribe(t=>{const e=t.chip,i=this.chips.toArray().indexOf(t.chip);this._isValidIndex(i)&&e._hasFocus&&(this._lastDestroyedChipIndex=i)})}_originatesFromChip(t){let e=t.target;for(;e&&e!==this._elementRef.nativeElement;){if(e.classList.contains("mat-chip"))return!0;e=e.parentElement}return!1}_hasFocusedChip(){return this.chips&&this.chips.some(t=>t._hasFocus)}_syncChipsState(){this.chips&&this.chips.forEach(t=>{t._chipListDisabled=this._disabled,t._chipListMultiple=this.multiple})}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(a.h),a.Qb(v.c,8),a.Qb(_.w,8),a.Qb(_.m,8),a.Qb(s.d),a.Qb(_.t,10))},t.\u0275cmp=a.Kb({type:t,selectors:[["mat-chip-list"]],contentQueries:function(t,e,i){var n;1&t&&a.Jb(i,S,!0),2&t&&a.yc(n=a.ec())&&(e.chips=n)},hostAttrs:[1,"mat-chip-list"],hostVars:15,hostBindings:function(t,e){1&t&&a.dc("focus",(function(){return e.focus()}))("blur",(function(){return e._blur()}))("keydown",(function(t){return e._keydown(t)})),2&t&&(a.Zb("id",e._uid),a.Eb("tabindex",e.disabled?null:e._tabIndex)("aria-describedby",e._ariaDescribedby||null)("aria-required",e.role?e.required:null)("aria-disabled",e.disabled.toString())("aria-invalid",e.errorState)("aria-multiselectable",e.multiple)("role",e.role)("aria-orientation",e.ariaOrientation),a.Ib("mat-chip-list-disabled",e.disabled)("mat-chip-list-invalid",e.errorState)("mat-chip-list-required",e.required))},inputs:{ariaOrientation:["aria-orientation","ariaOrientation"],multiple:"multiple",compareWith:"compareWith",value:"value",required:"required",placeholder:"placeholder",disabled:"disabled",selectable:"selectable",tabIndex:"tabIndex",errorStateMatcher:"errorStateMatcher"},outputs:{change:"change",valueChange:"valueChange"},exportAs:["matChipList"],features:[a.Cb([{provide:m.d,useExisting:t}]),a.Ab],ngContentSelectors:y,decls:2,vars:0,consts:[[1,"mat-chip-list-wrapper"]],template:function(t,e){1&t&&(a.nc(),a.Wb(0,"div",0),a.mc(1),a.Vb())},styles:['.mat-chip{position:relative;box-sizing:border-box;-webkit-tap-highlight-color:transparent;transform:translateZ(0);border:none;-webkit-appearance:none;-moz-appearance:none}.mat-standard-chip{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);display:inline-flex;padding:7px 12px;border-radius:16px;align-items:center;cursor:default;min-height:32px;height:1px}._mat-animation-noopable.mat-standard-chip{transition:none;animation:none}.mat-standard-chip .mat-chip-remove.mat-icon{width:18px;height:18px}.mat-standard-chip::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;opacity:0;content:"";pointer-events:none;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-standard-chip:hover::after{opacity:.12}.mat-standard-chip:focus{outline:none}.mat-standard-chip:focus::after{opacity:.16}.cdk-high-contrast-active .mat-standard-chip{outline:solid 1px}.cdk-high-contrast-active .mat-standard-chip:focus{outline:dotted 2px}.mat-standard-chip.mat-chip-disabled::after{opacity:0}.mat-standard-chip.mat-chip-disabled .mat-chip-remove,.mat-standard-chip.mat-chip-disabled .mat-chip-trailing-icon{cursor:default}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar,.mat-standard-chip.mat-chip-with-avatar{padding-top:0;padding-bottom:0}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-right:8px;padding-left:0}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-left:8px;padding-right:0}.mat-standard-chip.mat-chip-with-trailing-icon{padding-top:7px;padding-bottom:7px;padding-right:8px;padding-left:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon{padding-left:8px;padding-right:12px}.mat-standard-chip.mat-chip-with-avatar{padding-left:0;padding-right:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-avatar{padding-right:0;padding-left:12px}.mat-standard-chip .mat-chip-avatar{width:24px;height:24px;margin-right:8px;margin-left:4px}[dir=rtl] .mat-standard-chip .mat-chip-avatar{margin-left:8px;margin-right:4px}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{width:18px;height:18px;cursor:pointer}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-standard-chip .mat-chip-remove,[dir=rtl] .mat-standard-chip .mat-chip-trailing-icon{margin-right:8px;margin-left:0}.mat-chip-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit;overflow:hidden}.mat-chip-list-wrapper{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;margin:-4px}.mat-chip-list-wrapper input.mat-input-element,.mat-chip-list-wrapper .mat-standard-chip{margin:4px}.mat-chip-list-stacked .mat-chip-list-wrapper{flex-direction:column;align-items:flex-start}.mat-chip-list-stacked .mat-chip-list-wrapper .mat-standard-chip{width:100%}.mat-chip-avatar{border-radius:50%;justify-content:center;align-items:center;display:flex;overflow:hidden;object-fit:cover}input.mat-chip-input{width:150px;margin:4px;flex:1 0 150px}\n'],encapsulation:2,changeDetection:0}),t})(),T=0,E=(()=>{class t{constructor(t,e){this._elementRef=t,this._defaultOptions=e,this.focused=!1,this._addOnBlur=!1,this.separatorKeyCodes=this._defaultOptions.separatorKeyCodes,this.chipEnd=new a.o,this.placeholder="",this.id="mat-chip-list-input-"+T++,this._disabled=!1,this._inputElement=this._elementRef.nativeElement}set chipList(t){t&&(this._chipList=t,this._chipList.registerInput(this))}get addOnBlur(){return this._addOnBlur}set addOnBlur(t){this._addOnBlur=Object(o.c)(t)}get disabled(){return this._disabled||this._chipList&&this._chipList.disabled}set disabled(t){this._disabled=Object(o.c)(t)}get empty(){return!this._inputElement.value}ngOnChanges(){this._chipList.stateChanges.next()}_keydown(t){t&&t.keyCode===n.r&&!Object(n.v)(t,"shiftKey")&&this._chipList._allowFocusEscape(),this._emitChipEnd(t)}_blur(){this.addOnBlur&&this._emitChipEnd(),this.focused=!1,this._chipList.focused||this._chipList._blur(),this._chipList.stateChanges.next()}_focus(){this.focused=!0,this._chipList.stateChanges.next()}_emitChipEnd(t){!this._inputElement.value&&t&&this._chipList._keydown(t),t&&!this._isSeparatorKey(t)||(this.chipEnd.emit({input:this._inputElement,value:this._inputElement.value}),t&&t.preventDefault())}_onInput(){this._chipList.stateChanges.next()}focus(t){this._inputElement.focus(t)}_isSeparatorKey(t){return!Object(n.v)(t)&&new Set(this.separatorKeyCodes).has(t.keyCode)}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(P))},t.\u0275dir=a.Lb({type:t,selectors:[["input","matChipInputFor",""]],hostAttrs:[1,"mat-chip-input","mat-input-element"],hostVars:5,hostBindings:function(t,e){1&t&&a.dc("keydown",(function(t){return e._keydown(t)}))("blur",(function(){return e._blur()}))("focus",(function(){return e._focus()}))("input",(function(){return e._onInput()})),2&t&&(a.Zb("id",e.id),a.Eb("disabled",e.disabled||null)("placeholder",e.placeholder||null)("aria-invalid",e._chipList&&e._chipList.ngControl?e._chipList.ngControl.invalid:null)("aria-required",e._chipList&&e._chipList.required||null))},inputs:{separatorKeyCodes:["matChipInputSeparatorKeyCodes","separatorKeyCodes"],placeholder:"placeholder",id:"id",chipList:["matChipInputFor","chipList"],addOnBlur:["matChipInputAddOnBlur","addOnBlur"],disabled:"disabled"},outputs:{chipEnd:"matChipInputTokenEnd"},exportAs:["matChipInput","matChipInputFor"],features:[a.Bb]}),t})();const F={separatorKeyCodes:[n.g]};let L=(()=>{class t{}return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)},providers:[s.d,{provide:P,useValue:F}]}),t})()},A6w4:function(t,e,i){"use strict";i.d(e,"a",(function(){return l}));var n=i("fXoL"),a=i("sYmb"),s=i("tk/3"),o=i("AXEc"),r=i("uqn4"),c=i("0IaG");let l=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.authService=n,this.dialog=a,this.screenWidth=1920}getViewMode(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||this.screenWidth<=768}setScreenWidth(t){this.screenWidth=t}}return t.\u0275fac=function(e){return new(e||t)(n.ac(a.e),n.ac(s.b),n.ac(o.a),n.ac(r.a),n.ac(c.b))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()},AXEc:function(t,e,i){"use strict";i.d(e,"a",(function(){return c}));var n=i("dNgK"),a=i("fXoL"),s=i("sYmb"),o=i("tyNb");let r=(()=>{class t{constructor(t){this.data=t}dismiss(){this.data.close()}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(n.a))},t.\u0275cmp=a.Kb({type:t,selectors:[["custom-snackbar"]],decls:7,vars:5,consts:[[1,"notif-container",3,"click"],[1,"notif-container-icon"],[1,"notif-container-content"],[1,"notif-container-content-msg"],[3,"innerHTML"]],template:function(t,e){1&t&&(a.Wb(0,"div",0),a.dc("click",(function(){return e.dismiss()})),a.Wb(1,"div",1),a.Rb(2,"i"),a.Vb(),a.Wb(3,"div",2),a.Wb(4,"div",3),a.Rb(5,"div",4),a.Rb(6,"div",4),a.Vb(),a.Vb(),a.Vb()),2&t&&(a.Db(2),a.Gb("fa fa-",e.data.icon," fa-2x"),a.Db(3),a.oc("innerHTML",e.data.url,a.Ec),a.Db(1),a.oc("innerHTML",e.data.message,a.Ec))},styles:[".notif-container[_ngcontent-%COMP%]{display:flex;align-items:center;padding-top:25px;padding-bottom:25px;cursor:pointer}.notif-container-icon[_ngcontent-%COMP%]{display:flex;width:50px;justify-content:center}.notif-container-content[_ngcontent-%COMP%]{display:flex;flex:1;justify-content:center}.notif-container-content-msg[_ngcontent-%COMP%]{display:flex;flex-direction:column} .mat-snack-bar-container.error-snackbar{color:#8e3e52;background:#fff;border:1px solid #8e3e52} .mat-snack-bar-container.success-snackbar{color:#135f7f;background:#fff;border:1px solid #135f7f}"]}),t})(),c=(()=>{class t{constructor(t,e,i){this.translate=t,this.router=e,this.snackBar=i}success(t){const e=this.getMessageDuration(t,2e3),i=this.snackBar.openFromComponent(r,{duration:e,panelClass:"success-snackbar",verticalPosition:"top",data:{message:t,icon:"info-circle",close:()=>{i.dismiss()}}})}error(t,e=null){const i=this.getMessageDuration(t,4e3),n=this.snackBar.openFromComponent(r,{duration:i,panelClass:"error-snackbar",verticalPosition:"top",data:{url:e,message:t,icon:"exclamation-triangle",close:()=>{n.dismiss()}}})}handleErrors(t){console.log(t),0===t.status&&"Unknown Error"===t.statusText?this.error(this.translate.instant("lang.connectionFailed")):void 0!==t.error?void 0!==t.error.errors?(void 0!==t.error.lang?this.error(this.translate.instant("lang."+t.error.lang)):"Document out of perimeter"===t.error.errors||"Resource out of perimeter"===t.error.errors?this.error(this.translate.instant("lang.documentOutOfPerimeter")):"Resources out of perimeter"===t.error.errors?this.error(this.translate.instant("lang.documentsOutOfPerimeter")):this.error(t.error.errors,t.url),403!==t.status&&404!==t.status||this.router.navigate(["/home"])):this.error(void 0!==t.error.exception?t.error.exception[0].message:void 0!==t.error.error?void 0!==t.error.error[0]?t.error.error[0].message:t.error.error.message:`${t.status} : ${t.statusText}`,t.url):this.error(t)}handleSoftErrors(t){console.log(t),void 0!==t.error?void 0!==t.error.errors?void 0!==t.error.lang?this.error(this.translate.instant("lang."+t.error.lang)):"Document out of perimeter"===t.error.errors||"Resource out of perimeter"===t.error.errors?this.error(this.translate.instant("lang.documentOutOfPerimeter")):"Resources out of perimeter"===t.error.errors?this.error(this.translate.instant("lang.documentsOutOfPerimeter")):this.error(t.error.errors,t.url):this.error(void 0!==t.error.exception?t.error.exception[0].message:void 0!==t.error.error?void 0!==t.error.error[0]?t.error.error[0].message:t.error.error.message:`${t.status} : ${t.statusText}`,t.url):this.error(t)}getMessageDuration(t,e){const i=t.length/25*1e3;return i<e?e:i>1e4?1e4:i}}return t.\u0275fac=function(e){return new(e||t)(a.ac(s.e),a.ac(o.c),a.ac(n.b))},t.\u0275prov=a.Mb({token:t,factory:t.\u0275fac}),t})()},"B/XX":function(t,e,i){"use strict";i.d(e,"a",(function(){return _})),i.d(e,"b",(function(){return f})),i.d(e,"c",(function(){return m})),i.d(e,"d",(function(){return y})),i.d(e,"e",(function(){return O})),i.d(e,"f",(function(){return x})),i.d(e,"g",(function(){return C})),i.d(e,"h",(function(){return v}));var n=i("u47x"),a=i("cH1L"),s=i("8LU1"),o=i("FtGj"),r=i("ofXK"),c=i("fXoL"),l=i("XNiG"),d=i("LRne"),h=i("JX91"),u=i("1G5W");function p(t,e){1&t&&c.mc(0)}const b=["*"];let f=(()=>{class t{constructor(t){this._elementRef=t}focus(){this._elementRef.nativeElement.focus()}}return t.\u0275fac=function(e){return new(e||t)(c.Qb(c.l))},t.\u0275dir=c.Lb({type:t,selectors:[["","cdkStepHeader",""]],hostAttrs:["role","tab"]}),t})(),m=(()=>{class t{constructor(t){this.template=t}}return t.\u0275fac=function(e){return new(e||t)(c.Qb(c.P))},t.\u0275dir=c.Lb({type:t,selectors:[["","cdkStepLabel",""]]}),t})(),g=0;const v=new c.s("STEPPER_GLOBAL_OPTIONS");let _=(()=>{class t{constructor(t,e){this._stepper=t,this.interacted=!1,this._editable=!0,this._optional=!1,this._completedOverride=null,this._customError=null,this._stepperOptions=e||{},this._displayDefaultIndicatorType=!1!==this._stepperOptions.displayDefaultIndicatorType,this._showError=!!this._stepperOptions.showError}get editable(){return this._editable}set editable(t){this._editable=Object(s.c)(t)}get optional(){return this._optional}set optional(t){this._optional=Object(s.c)(t)}get completed(){return null==this._completedOverride?this._getDefaultCompleted():this._completedOverride}set completed(t){this._completedOverride=Object(s.c)(t)}_getDefaultCompleted(){return this.stepControl?this.stepControl.valid&&this.interacted:this.interacted}get hasError(){return null==this._customError?this._getDefaultError():this._customError}set hasError(t){this._customError=Object(s.c)(t)}_getDefaultError(){return this.stepControl&&this.stepControl.invalid&&this.interacted}select(){this._stepper.selected=this}reset(){this.interacted=!1,null!=this._completedOverride&&(this._completedOverride=!1),null!=this._customError&&(this._customError=!1),this.stepControl&&this.stepControl.reset()}ngOnChanges(){this._stepper._stateChanged()}}return t.\u0275fac=function(e){return new(e||t)(c.Qb(Object(c.X)(()=>y)),c.Qb(v,8))},t.\u0275cmp=c.Kb({type:t,selectors:[["cdk-step"]],contentQueries:function(t,e,i){var n;1&t&&c.Jb(i,m,!0),2&t&&c.yc(n=c.ec())&&(e.stepLabel=n.first)},viewQuery:function(t,e){var i;1&t&&c.Kc(c.P,!0),2&t&&c.yc(i=c.ec())&&(e.content=i.first)},inputs:{editable:"editable",optional:"optional",completed:"completed",hasError:"hasError",stepControl:"stepControl",label:"label",errorMessage:"errorMessage",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],state:"state"},exportAs:["cdkStep"],features:[c.Bb],ngContentSelectors:b,decls:1,vars:0,template:function(t,e){1&t&&(c.nc(),c.Oc(0,p,1,0,"ng-template"))},encapsulation:2,changeDetection:0}),t})(),y=(()=>{class t{constructor(t,e,i,n){this._dir=t,this._changeDetectorRef=e,this._elementRef=i,this._destroyed=new l.a,this.steps=new c.H,this._linear=!1,this._selectedIndex=0,this.selectionChange=new c.o,this._orientation="horizontal",this._groupId=g++,this._document=n}get linear(){return this._linear}set linear(t){this._linear=Object(s.c)(t)}get selectedIndex(){return this._selectedIndex}set selectedIndex(t){const e=Object(s.f)(t);this.steps&&this._steps?this._selectedIndex!=e&&!this._anyControlsInvalidOrPending(e)&&(e>=this._selectedIndex||this.steps.toArray()[e].editable)&&this._updateSelectedItemIndex(t):this._selectedIndex=e}get selected(){return this.steps?this.steps.toArray()[this.selectedIndex]:void 0}set selected(t){this.selectedIndex=this.steps?this.steps.toArray().indexOf(t):-1}ngAfterContentInit(){this._steps.changes.pipe(Object(h.a)(this._steps),Object(u.a)(this._destroyed)).subscribe(t=>{this.steps.reset(t.filter(t=>t._stepper===this)),this.steps.notifyOnChanges()})}ngAfterViewInit(){this._keyManager=new n.g(this._stepHeader).withWrap().withHomeAndEnd().withVerticalOrientation("vertical"===this._orientation),(this._dir?this._dir.change:Object(d.a)()).pipe(Object(h.a)(this._layoutDirection()),Object(u.a)(this._destroyed)).subscribe(t=>this._keyManager.withHorizontalOrientation(t)),this._keyManager.updateActiveItem(this._selectedIndex),this.steps.changes.subscribe(()=>{this.selected||(this._selectedIndex=Math.max(this._selectedIndex-1,0))})}ngOnDestroy(){this.steps.destroy(),this._destroyed.next(),this._destroyed.complete()}next(){this.selectedIndex=Math.min(this._selectedIndex+1,this.steps.length-1)}previous(){this.selectedIndex=Math.max(this._selectedIndex-1,0)}reset(){this._updateSelectedItemIndex(0),this.steps.forEach(t=>t.reset()),this._stateChanged()}_getStepLabelId(t){return`cdk-step-label-${this._groupId}-${t}`}_getStepContentId(t){return`cdk-step-content-${this._groupId}-${t}`}_stateChanged(){this._changeDetectorRef.markForCheck()}_getAnimationDirection(t){const e=t-this._selectedIndex;return e<0?"rtl"===this._layoutDirection()?"next":"previous":e>0?"rtl"===this._layoutDirection()?"previous":"next":"current"}_getIndicatorType(t,e="number"){const i=this.steps.toArray()[t],n=this._isCurrentStep(t);return i._displayDefaultIndicatorType?this._getDefaultIndicatorLogic(i,n):this._getGuidelineLogic(i,n,e)}_getDefaultIndicatorLogic(t,e){return t._showError&&t.hasError&&!e?"error":!t.completed||e?"number":t.editable?"edit":"done"}_getGuidelineLogic(t,e,i="number"){return t._showError&&t.hasError&&!e?"error":t.completed&&!e?"done":t.completed&&e?i:t.editable&&e?"edit":i}_isCurrentStep(t){return this._selectedIndex===t}_getFocusIndex(){return this._keyManager?this._keyManager.activeItemIndex:this._selectedIndex}_updateSelectedItemIndex(t){const e=this.steps.toArray();this.selectionChange.emit({selectedIndex:t,previouslySelectedIndex:this._selectedIndex,selectedStep:e[t],previouslySelectedStep:e[this._selectedIndex]}),this._containsFocus()?this._keyManager.setActiveItem(t):this._keyManager.updateActiveItem(t),this._selectedIndex=t,this._stateChanged()}_onKeydown(t){const e=Object(o.v)(t),i=t.keyCode,n=this._keyManager;null==n.activeItemIndex||e||i!==o.q&&i!==o.g?n.onKeydown(t):(this.selectedIndex=n.activeItemIndex,t.preventDefault())}_anyControlsInvalidOrPending(t){const e=this.steps.toArray();return e[this._selectedIndex].interacted=!0,!!(this._linear&&t>=0)&&e.slice(0,t).some(t=>{const e=t.stepControl;return(e?e.invalid||e.pending||!t.interacted:!t.completed)&&!t.optional&&!t._completedOverride})}_layoutDirection(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}_containsFocus(){if(!this._document||!this._elementRef)return!1;const t=this._elementRef.nativeElement,e=this._document.activeElement;return t===e||t.contains(e)}}return t.\u0275fac=function(e){return new(e||t)(c.Qb(a.c,8),c.Qb(c.h),c.Qb(c.l),c.Qb(r.e))},t.\u0275dir=c.Lb({type:t,selectors:[["","cdkStepper",""]],contentQueries:function(t,e,i){var n;1&t&&(c.Jb(i,_,!0),c.Jb(i,f,!0)),2&t&&(c.yc(n=c.ec())&&(e._steps=n),c.yc(n=c.ec())&&(e._stepHeader=n))},inputs:{linear:"linear",selectedIndex:"selectedIndex",selected:"selected"},outputs:{selectionChange:"selectionChange"},exportAs:["cdkStepper"]}),t})(),x=(()=>{class t{constructor(t){this._stepper=t,this.type="submit"}_handleClick(){this._stepper.next()}}return t.\u0275fac=function(e){return new(e||t)(c.Qb(y))},t.\u0275dir=c.Lb({type:t,selectors:[["button","cdkStepperNext",""]],hostVars:1,hostBindings:function(t,e){1&t&&c.dc("click",(function(){return e._handleClick()})),2&t&&c.Zb("type",e.type)},inputs:{type:"type"}}),t})(),C=(()=>{class t{constructor(t){this._stepper=t,this.type="button"}_handleClick(){this._stepper.previous()}}return t.\u0275fac=function(e){return new(e||t)(c.Qb(y))},t.\u0275dir=c.Lb({type:t,selectors:[["button","cdkStepperPrevious",""]],hostVars:1,hostBindings:function(t,e){1&t&&c.dc("click",(function(){return e._handleClick()})),2&t&&c.Zb("type",e.type)},inputs:{type:"type"}}),t})(),O=(()=>{class t{}return t.\u0275mod=c.Ob({type:t}),t.\u0275inj=c.Nb({factory:function(e){return new(e||t)},imports:[[a.a]]}),t})()},Cfvw:function(t,e,i){"use strict";i.d(e,"a",(function(){return h}));var n=i("HDdC"),a=i("SeVD"),s=i("quSY"),o=i("kJWO"),r=i("jZKg"),c=i("Lhse"),l=i("c2HN"),d=i("I55L");function h(t,e){return e?function(t,e){if(null!=t){if(function(t){return t&&"function"==typeof t[o.a]}(t))return function(t,e){return new n.a(i=>{const n=new s.a;return n.add(e.schedule(()=>{const a=t[o.a]();n.add(a.subscribe({next(t){n.add(e.schedule(()=>i.next(t)))},error(t){n.add(e.schedule(()=>i.error(t)))},complete(){n.add(e.schedule(()=>i.complete()))}}))})),n})}(t,e);if(Object(l.a)(t))return function(t,e){return new n.a(i=>{const n=new s.a;return n.add(e.schedule(()=>t.then(t=>{n.add(e.schedule(()=>{i.next(t),n.add(e.schedule(()=>i.complete()))}))},t=>{n.add(e.schedule(()=>i.error(t)))}))),n})}(t,e);if(Object(d.a)(t))return Object(r.a)(t,e);if(function(t){return t&&"function"==typeof t[c.a]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new n.a(i=>{const n=new s.a;let a;return n.add(()=>{a&&"function"==typeof a.return&&a.return()}),n.add(e.schedule(()=>{a=t[c.a](),n.add(e.schedule((function(){if(i.closed)return;let t,e;try{const i=a.next();t=i.value,e=i.done}catch(n){return void i.error(n)}e?i.complete():(i.next(t),this.schedule())})))})),n})}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}(t,e):t instanceof n.a?t:new n.a(Object(a.a)(t))}},D0XW:function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var n=i("3N8a");const a=new(i("IjjT").a)(n.a)},DH7j:function(t,e,i){"use strict";i.d(e,"a",(function(){return n}));const n=(()=>Array.isArray||(t=>t&&"number"==typeof t.length))()},Dh3D:function(t,e,i){"use strict";i.d(e,"a",(function(){return g})),i.d(e,"b",(function(){return w})),i.d(e,"c",(function(){return M}));var n=i("fXoL"),a=i("8LU1"),s=i("FKr1"),o=i("FtGj"),r=i("XNiG"),c=i("VRyK"),l=i("R0Ic"),d=i("ofXK"),h=i("u47x");const u=["mat-sort-header",""];function p(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",3),n.dc("@arrowPosition.start",(function(){return n.Dc(t),n.hc()._disableViewStateAnimation=!0}))("@arrowPosition.done",(function(){return n.Dc(t),n.hc()._disableViewStateAnimation=!1})),n.Rb(1,"div",4),n.Wb(2,"div",5),n.Rb(3,"div",6),n.Rb(4,"div",7),n.Rb(5,"div",8),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.oc("@arrowOpacity",t._getArrowViewState())("@arrowPosition",t._getArrowViewState())("@allowChildren",t._getArrowDirectionState()),n.Db(2),n.oc("@indicator",t._getArrowDirectionState()),n.Db(1),n.oc("@leftPointer",t._getArrowDirectionState()),n.Db(1),n.oc("@rightPointer",t._getArrowDirectionState())}}const b=["*"];class f{}const m=Object(s.E)(Object(s.C)(f));let g=(()=>{class t extends m{constructor(){super(...arguments),this.sortables=new Map,this._stateChanges=new r.a,this.start="asc",this._direction="",this.sortChange=new n.o}get direction(){return this._direction}set direction(t){this._direction=t}get disableClear(){return this._disableClear}set disableClear(t){this._disableClear=Object(a.c)(t)}register(t){this.sortables.set(t.id,t)}deregister(t){this.sortables.delete(t.id)}sort(t){this.active!=t.id?(this.active=t.id,this.direction=t.start?t.start:this.start):this.direction=this.getNextSortDirection(t),this.sortChange.emit({active:this.active,direction:this.direction})}getNextSortDirection(t){if(!t)return"";let e=function(t,e){let i=["asc","desc"];return"desc"==t&&i.reverse(),e||i.push(""),i}(t.start||this.start,null!=t.disableClear?t.disableClear:this.disableClear),i=e.indexOf(this.direction)+1;return i>=e.length&&(i=0),e[i]}ngOnInit(){this._markInitialized()}ngOnChanges(){this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}}return t.\u0275fac=function(e){return v(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["","matSort",""]],hostAttrs:[1,"mat-sort"],inputs:{disabled:["matSortDisabled","disabled"],start:["matSortStart","start"],direction:["matSortDirection","direction"],disableClear:["matSortDisableClear","disableClear"],active:["matSortActive","active"]},outputs:{sortChange:"matSortChange"},exportAs:["matSort"],features:[n.Ab,n.Bb]}),t})();const v=n.Yb(g),_=s.b.ENTERING+" "+s.a.STANDARD_CURVE,y={indicator:Object(l.n)("indicator",[Object(l.k)("active-asc, asc",Object(l.l)({transform:"translateY(0px)"})),Object(l.k)("active-desc, desc",Object(l.l)({transform:"translateY(10px)"})),Object(l.m)("active-asc <=> active-desc",Object(l.e)(_))]),leftPointer:Object(l.n)("leftPointer",[Object(l.k)("active-asc, asc",Object(l.l)({transform:"rotate(-45deg)"})),Object(l.k)("active-desc, desc",Object(l.l)({transform:"rotate(45deg)"})),Object(l.m)("active-asc <=> active-desc",Object(l.e)(_))]),rightPointer:Object(l.n)("rightPointer",[Object(l.k)("active-asc, asc",Object(l.l)({transform:"rotate(45deg)"})),Object(l.k)("active-desc, desc",Object(l.l)({transform:"rotate(-45deg)"})),Object(l.m)("active-asc <=> active-desc",Object(l.e)(_))]),arrowOpacity:Object(l.n)("arrowOpacity",[Object(l.k)("desc-to-active, asc-to-active, active",Object(l.l)({opacity:1})),Object(l.k)("desc-to-hint, asc-to-hint, hint",Object(l.l)({opacity:.54})),Object(l.k)("hint-to-desc, active-to-desc, desc, hint-to-asc, active-to-asc, asc, void",Object(l.l)({opacity:0})),Object(l.m)("* => asc, * => desc, * => active, * => hint, * => void",Object(l.e)("0ms")),Object(l.m)("* <=> *",Object(l.e)(_))]),arrowPosition:Object(l.n)("arrowPosition",[Object(l.m)("* => desc-to-hint, * => desc-to-active",Object(l.e)(_,Object(l.h)([Object(l.l)({transform:"translateY(-25%)"}),Object(l.l)({transform:"translateY(0)"})]))),Object(l.m)("* => hint-to-desc, * => active-to-desc",Object(l.e)(_,Object(l.h)([Object(l.l)({transform:"translateY(0)"}),Object(l.l)({transform:"translateY(25%)"})]))),Object(l.m)("* => asc-to-hint, * => asc-to-active",Object(l.e)(_,Object(l.h)([Object(l.l)({transform:"translateY(25%)"}),Object(l.l)({transform:"translateY(0)"})]))),Object(l.m)("* => hint-to-asc, * => active-to-asc",Object(l.e)(_,Object(l.h)([Object(l.l)({transform:"translateY(0)"}),Object(l.l)({transform:"translateY(-25%)"})]))),Object(l.k)("desc-to-hint, asc-to-hint, hint, desc-to-active, asc-to-active, active",Object(l.l)({transform:"translateY(0)"})),Object(l.k)("hint-to-desc, active-to-desc, desc",Object(l.l)({transform:"translateY(-25%)"})),Object(l.k)("hint-to-asc, active-to-asc, asc",Object(l.l)({transform:"translateY(25%)"}))]),allowChildren:Object(l.n)("allowChildren",[Object(l.m)("* <=> *",[Object(l.i)("@*",Object(l.f)(),{optional:!0})])])};let x=(()=>{class t{constructor(){this.changes=new r.a,this.sortButtonLabel=t=>"Change sorting for "+t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(n.Mb)({factory:function(){return new t},token:t,providedIn:"root"}),t})();const C={provide:x,deps:[[new n.D,new n.N,x]],useFactory:function(t){return t||new x}};class O{}const D=Object(s.C)(O);let w=(()=>{class t extends D{constructor(t,e,i,n,a,s){super(),this._intl=t,this._sort=i,this._columnDef=n,this._focusMonitor=a,this._elementRef=s,this._showIndicatorHint=!1,this._arrowDirection="",this._disableViewStateAnimation=!1,this.arrowPosition="after",this._rerenderSubscription=Object(c.a)(i.sortChange,i._stateChanges,t.changes).subscribe(()=>{this._isSorted()&&this._updateArrowDirection(),!this._isSorted()&&this._viewState&&"active"===this._viewState.toState&&(this._disableViewStateAnimation=!1,this._setAnimationTransitionState({fromState:"active",toState:this._arrowDirection})),e.markForCheck()})}get disableClear(){return this._disableClear}set disableClear(t){this._disableClear=Object(a.c)(t)}ngOnInit(){!this.id&&this._columnDef&&(this.id=this._columnDef.name),this._updateArrowDirection(),this._setAnimationTransitionState({toState:this._isSorted()?"active":this._arrowDirection}),this._sort.register(this)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>this._setIndicatorHintVisible(!!t))}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._sort.deregister(this),this._rerenderSubscription.unsubscribe()}_setIndicatorHintVisible(t){this._isDisabled()&&t||(this._showIndicatorHint=t,this._isSorted()||(this._updateArrowDirection(),this._setAnimationTransitionState(this._showIndicatorHint?{fromState:this._arrowDirection,toState:"hint"}:{fromState:"hint",toState:this._arrowDirection})))}_setAnimationTransitionState(t){this._viewState=t,this._disableViewStateAnimation&&(this._viewState={toState:t.toState})}_toggleOnInteraction(){this._sort.sort(this),"hint"!==this._viewState.toState&&"active"!==this._viewState.toState||(this._disableViewStateAnimation=!0);const t=this._isSorted()?{fromState:this._arrowDirection,toState:"active"}:{fromState:"active",toState:this._arrowDirection};this._setAnimationTransitionState(t),this._showIndicatorHint=!1}_handleClick(){this._isDisabled()||this._toggleOnInteraction()}_handleKeydown(t){this._isDisabled()||t.keyCode!==o.q&&t.keyCode!==o.g||(t.preventDefault(),this._toggleOnInteraction())}_isSorted(){return this._sort.active==this.id&&("asc"===this._sort.direction||"desc"===this._sort.direction)}_getArrowDirectionState(){return`${this._isSorted()?"active-":""}${this._arrowDirection}`}_getArrowViewState(){const t=this._viewState.fromState;return(t?t+"-to-":"")+this._viewState.toState}_updateArrowDirection(){this._arrowDirection=this._isSorted()?this._sort.direction:this.start||this._sort.start}_isDisabled(){return this._sort.disabled||this.disabled}_getAriaSortAttribute(){return this._isSorted()?"asc"==this._sort.direction?"ascending":"descending":"none"}_renderArrow(){return!this._isDisabled()||this._isSorted()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(x),n.Qb(n.h),n.Qb(g,8),n.Qb("MAT_SORT_HEADER_COLUMN_DEF",8),n.Qb(h.h),n.Qb(n.l))},t.\u0275cmp=n.Kb({type:t,selectors:[["","mat-sort-header",""]],hostAttrs:[1,"mat-sort-header"],hostVars:3,hostBindings:function(t,e){1&t&&n.dc("click",(function(){return e._handleClick()}))("keydown",(function(t){return e._handleKeydown(t)}))("mouseenter",(function(){return e._setIndicatorHintVisible(!0)}))("mouseleave",(function(){return e._setIndicatorHintVisible(!1)})),2&t&&(n.Eb("aria-sort",e._getAriaSortAttribute()),n.Ib("mat-sort-header-disabled",e._isDisabled()))},inputs:{disabled:"disabled",arrowPosition:"arrowPosition",disableClear:"disableClear",id:["mat-sort-header","id"],start:"start"},exportAs:["matSortHeader"],features:[n.Ab],attrs:u,ngContentSelectors:b,decls:4,vars:6,consts:[["role","button",1,"mat-sort-header-container","mat-focus-indicator"],[1,"mat-sort-header-content"],["class","mat-sort-header-arrow",4,"ngIf"],[1,"mat-sort-header-arrow"],[1,"mat-sort-header-stem"],[1,"mat-sort-header-indicator"],[1,"mat-sort-header-pointer-left"],[1,"mat-sort-header-pointer-right"],[1,"mat-sort-header-pointer-middle"]],template:function(t,e){1&t&&(n.nc(),n.Wb(0,"div",0),n.Wb(1,"div",1),n.mc(2),n.Vb(),n.Oc(3,p,6,6,"div",2),n.Vb()),2&t&&(n.Ib("mat-sort-header-sorted",e._isSorted())("mat-sort-header-position-before","before"==e.arrowPosition),n.Eb("tabindex",e._isDisabled()?null:0),n.Db(3),n.oc("ngIf",e._renderArrow()))},directives:[d.t],styles:[".mat-sort-header-container{display:flex;cursor:pointer;align-items:center;letter-spacing:normal;outline:0}[mat-sort-header].cdk-keyboard-focused .mat-sort-header-container,[mat-sort-header].cdk-program-focused .mat-sort-header-container{border-bottom:solid 1px currentColor}.mat-sort-header-disabled .mat-sort-header-container{cursor:default}.mat-sort-header-content{text-align:center;display:flex;align-items:center}.mat-sort-header-position-before{flex-direction:row-reverse}.mat-sort-header-arrow{height:12px;width:12px;min-width:12px;position:relative;display:flex;opacity:0}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .mat-sort-header-arrow{margin:0 6px 0 0}.mat-sort-header-stem{background:currentColor;height:10px;width:2px;margin:auto;display:flex;align-items:center}.cdk-high-contrast-active .mat-sort-header-stem{width:0;border-left:solid 2px}.mat-sort-header-indicator{width:100%;height:2px;display:flex;align-items:center;position:absolute;top:0;left:0}.mat-sort-header-pointer-middle{margin:auto;height:2px;width:2px;background:currentColor;transform:rotate(45deg)}.cdk-high-contrast-active .mat-sort-header-pointer-middle{width:0;height:0;border-top:solid 2px;border-left:solid 2px}.mat-sort-header-pointer-left,.mat-sort-header-pointer-right{background:currentColor;width:6px;height:2px;position:absolute;top:0}.cdk-high-contrast-active .mat-sort-header-pointer-left,.cdk-high-contrast-active .mat-sort-header-pointer-right{width:0;height:0;border-left:solid 6px;border-top:solid 2px}.mat-sort-header-pointer-left{transform-origin:right;left:0}.mat-sort-header-pointer-right{transform-origin:left;right:0}\n"],encapsulation:2,data:{animation:[y.indicator,y.leftPointer,y.rightPointer,y.arrowOpacity,y.arrowPosition,y.allowChildren]},changeDetection:0}),t})(),M=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},providers:[C],imports:[[d.c]]}),t})()},EY2u:function(t,e,i){"use strict";i.d(e,"a",(function(){return a})),i.d(e,"b",(function(){return s}));var n=i("HDdC");const a=new n.a(t=>t.complete());function s(t){return t?function(t){return new n.a(e=>t.schedule(()=>e.complete()))}(t):a}},FKr1:function(t,e,i){"use strict";i.d(e,"a",(function(){return _})),i.d(e,"b",(function(){return y})),i.d(e,"c",(function(){return V})),i.d(e,"d",(function(){return B})),i.d(e,"e",(function(){return R})),i.d(e,"f",(function(){return P})),i.d(e,"g",(function(){return xt})),i.d(e,"h",(function(){return dt})),i.d(e,"i",(function(){return ft})),i.d(e,"j",(function(){return tt})),i.d(e,"k",(function(){return O})),i.d(e,"l",(function(){return U})),i.d(e,"m",(function(){return G})),i.d(e,"n",(function(){return z})),i.d(e,"o",(function(){return ht})),i.d(e,"p",(function(){return gt})),i.d(e,"q",(function(){return yt})),i.d(e,"r",(function(){return bt})),i.d(e,"s",(function(){return nt})),i.d(e,"t",(function(){return at})),i.d(e,"u",(function(){return et})),i.d(e,"v",(function(){return it})),i.d(e,"w",(function(){return L})),i.d(e,"x",(function(){return Z})),i.d(e,"y",(function(){return vt})),i.d(e,"z",(function(){return _t})),i.d(e,"A",(function(){return w})),i.d(e,"B",(function(){return M})),i.d(e,"C",(function(){return D})),i.d(e,"D",(function(){return S})),i.d(e,"E",(function(){return I})),i.d(e,"F",(function(){return k})),i.d(e,"G",(function(){return $}));var n=i("fXoL"),a=i("u47x"),s=i("cH1L");const o=new n.S("10.2.7");var r=i("ofXK"),c=i("8LU1"),l=i("XNiG"),d=i("HDdC"),h=i("nLfN"),u=i("JX91"),p=i("R1ws"),b=i("FtGj");const f=["*",[["mat-option"],["ng-container"]]],m=["*","mat-option, ng-container"];function g(t,e){if(1&t&&n.Rb(0,"mat-pseudo-checkbox",3),2&t){const t=n.hc();n.oc("state",t.selected?"checked":"unchecked")("disabled",t.disabled)}}const v=["*"];let _=(()=>{class t{}return t.STANDARD_CURVE="cubic-bezier(0.4,0.0,0.2,1)",t.DECELERATION_CURVE="cubic-bezier(0.0,0.0,0.2,1)",t.ACCELERATION_CURVE="cubic-bezier(0.4,0.0,1,1)",t.SHARP_CURVE="cubic-bezier(0.4,0.0,0.6,1)",t})(),y=(()=>{class t{}return t.COMPLEX="375ms",t.ENTERING="225ms",t.EXITING="195ms",t})();const x=new n.S("10.2.7"),C=new n.s("mat-sanity-checks",{providedIn:"root",factory:function(){return!0}});let O=(()=>{class t{constructor(t,e,i){this._hasDoneGlobalChecks=!1,this._document=i,t._applyBodyHighContrastModeCssClasses(),this._sanityChecks=e,this._hasDoneGlobalChecks||(this._checkDoctypeIsDefined(),this._checkThemeIsPresent(),this._checkCdkVersionMatch(),this._hasDoneGlobalChecks=!0)}_getDocument(){const t=this._document||document;return"object"==typeof t&&t?t:null}_getWindow(){const t=this._getDocument(),e=(null==t?void 0:t.defaultView)||window;return"object"==typeof e&&e?e:null}_checksAreEnabled(){return Object(n.Z)()&&!this._isTestEnv()}_isTestEnv(){const t=this._getWindow();return t&&(t.__karma__||t.jasmine)}_checkDoctypeIsDefined(){const t=this._checksAreEnabled()&&(!0===this._sanityChecks||this._sanityChecks.doctype),e=this._getDocument();t&&e&&!e.doctype&&console.warn("Current document does not have a doctype. This may cause some Angular Material components not to behave as expected.")}_checkThemeIsPresent(){const t=!this._checksAreEnabled()||!1===this._sanityChecks||!this._sanityChecks.theme,e=this._getDocument();if(t||!e||!e.body||"function"!=typeof getComputedStyle)return;const i=e.createElement("div");i.classList.add("mat-theme-loaded-marker"),e.body.appendChild(i);const n=getComputedStyle(i);n&&"none"!==n.display&&console.warn("Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming"),e.body.removeChild(i)}_checkCdkVersionMatch(){this._checksAreEnabled()&&(!0===this._sanityChecks||this._sanityChecks.version)&&x.full!==o.full&&console.warn("The Angular Material version ("+x.full+") does not match the Angular CDK version ("+o.full+").\nPlease ensure the versions of these two packages exactly match.")}}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)(n.ac(a.j),n.ac(C,8),n.ac(r.e,8))},imports:[[s.a],s.a]}),t})();function D(t){return class extends t{constructor(...t){super(...t),this._disabled=!1}get disabled(){return this._disabled}set disabled(t){this._disabled=Object(c.c)(t)}}}function w(t,e){return class extends t{constructor(...t){super(...t),this.defaultColor=e,this.color=e}get color(){return this._color}set color(t){const e=t||this.defaultColor;e!==this._color&&(this._color&&this._elementRef.nativeElement.classList.remove("mat-"+this._color),e&&this._elementRef.nativeElement.classList.add("mat-"+e),this._color=e)}}}function M(t){return class extends t{constructor(...t){super(...t),this._disableRipple=!1}get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=Object(c.c)(t)}}}function k(t,e=0){return class extends t{constructor(...t){super(...t),this._tabIndex=e,this.defaultTabIndex=e}get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(t){this._tabIndex=null!=t?Object(c.f)(t):this.defaultTabIndex}}}function S(t){return class extends t{constructor(...t){super(...t),this.errorState=!1,this.stateChanges=new l.a}updateErrorState(){const t=this.errorState,e=(this.errorStateMatcher||this._defaultErrorStateMatcher).isErrorState(this.ngControl?this.ngControl.control:null,this._parentFormGroup||this._parentForm);e!==t&&(this.errorState=e,this.stateChanges.next())}}}function I(t){return class extends t{constructor(...t){super(...t),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new d.a(t=>{this._isInitialized?this._notifySubscriber(t):this._pendingSubscribers.push(t)})}_markInitialized(){this._isInitialized=!0,this._pendingSubscribers.forEach(this._notifySubscriber),this._pendingSubscribers=null}_notifySubscriber(t){t.next(),t.complete()}}}const P=new n.s("MAT_DATE_LOCALE",{providedIn:"root",factory:function(){return Object(n.Y)(n.x)}});class V{constructor(){this._localeChanges=new l.a,this.localeChanges=this._localeChanges}getValidDateOrNull(t){return this.isDateInstance(t)&&this.isValid(t)?t:null}deserialize(t){return null==t||this.isDateInstance(t)&&this.isValid(t)?t:this.invalid()}setLocale(t){this.locale=t,this._localeChanges.next()}compareDate(t,e){return this.getYear(t)-this.getYear(e)||this.getMonth(t)-this.getMonth(e)||this.getDate(t)-this.getDate(e)}sameDate(t,e){if(t&&e){let i=this.isValid(t),n=this.isValid(e);return i&&n?!this.compareDate(t,e):i==n}return t==e}clampDate(t,e,i){return e&&this.compareDate(t,e)<0?e:i&&this.compareDate(t,i)>0?i:t}}const R=new n.s("mat-date-formats");let j;try{j="undefined"!=typeof Intl}catch(Ct){j=!1}const A={long:["January","February","March","April","May","June","July","August","September","October","November","December"],short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],narrow:["J","F","M","A","M","J","J","A","S","O","N","D"]},W=F(31,t=>String(t+1)),T={long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],narrow:["S","M","T","W","T","F","S"]},E=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;function F(t,e){const i=Array(t);for(let n=0;n<t;n++)i[n]=e(n);return i}let L=(()=>{class t extends V{constructor(t,e){super(),this.useUtcForDisplay=!0,super.setLocale(t),this.useUtcForDisplay=!e.TRIDENT,this._clampDate=e.TRIDENT||e.EDGE}getYear(t){return t.getFullYear()}getMonth(t){return t.getMonth()}getDate(t){return t.getDate()}getDayOfWeek(t){return t.getDay()}getMonthNames(t){if(j){const e=new Intl.DateTimeFormat(this.locale,{month:t,timeZone:"utc"});return F(12,t=>this._stripDirectionalityCharacters(this._format(e,new Date(2017,t,1))))}return A[t]}getDateNames(){if(j){const t=new Intl.DateTimeFormat(this.locale,{day:"numeric",timeZone:"utc"});return F(31,e=>this._stripDirectionalityCharacters(this._format(t,new Date(2017,0,e+1))))}return W}getDayOfWeekNames(t){if(j){const e=new Intl.DateTimeFormat(this.locale,{weekday:t,timeZone:"utc"});return F(7,t=>this._stripDirectionalityCharacters(this._format(e,new Date(2017,0,t+1))))}return T[t]}getYearName(t){if(j){const e=new Intl.DateTimeFormat(this.locale,{year:"numeric",timeZone:"utc"});return this._stripDirectionalityCharacters(this._format(e,t))}return String(this.getYear(t))}getFirstDayOfWeek(){return 0}getNumDaysInMonth(t){return this.getDate(this._createDateWithOverflow(this.getYear(t),this.getMonth(t)+1,0))}clone(t){return new Date(t.getTime())}createDate(t,e,i){let n=this._createDateWithOverflow(t,e,i);return n.getMonth(),n}today(){return new Date}parse(t){return"number"==typeof t?new Date(t):t?new Date(Date.parse(t)):null}format(t,e){if(!this.isValid(t))throw Error("NativeDateAdapter: Cannot format invalid date.");if(j){this._clampDate&&(t.getFullYear()<1||t.getFullYear()>9999)&&(t=this.clone(t)).setFullYear(Math.max(1,Math.min(9999,t.getFullYear()))),e=Object.assign(Object.assign({},e),{timeZone:"utc"});const i=new Intl.DateTimeFormat(this.locale,e);return this._stripDirectionalityCharacters(this._format(i,t))}return this._stripDirectionalityCharacters(t.toDateString())}addCalendarYears(t,e){return this.addCalendarMonths(t,12*e)}addCalendarMonths(t,e){let i=this._createDateWithOverflow(this.getYear(t),this.getMonth(t)+e,this.getDate(t));return this.getMonth(i)!=((this.getMonth(t)+e)%12+12)%12&&(i=this._createDateWithOverflow(this.getYear(i),this.getMonth(i),0)),i}addCalendarDays(t,e){return this._createDateWithOverflow(this.getYear(t),this.getMonth(t),this.getDate(t)+e)}toIso8601(t){return[t.getUTCFullYear(),this._2digit(t.getUTCMonth()+1),this._2digit(t.getUTCDate())].join("-")}deserialize(t){if("string"==typeof t){if(!t)return null;if(E.test(t)){let e=new Date(t);if(this.isValid(e))return e}}return super.deserialize(t)}isDateInstance(t){return t instanceof Date}isValid(t){return!isNaN(t.getTime())}invalid(){return new Date(NaN)}_createDateWithOverflow(t,e,i){const n=new Date;return n.setFullYear(t,e,i),n.setHours(0,0,0,0),n}_2digit(t){return("00"+t).slice(-2)}_stripDirectionalityCharacters(t){return t.replace(/[\u200e\u200f]/g,"")}_format(t,e){const i=new Date;return i.setUTCFullYear(e.getFullYear(),e.getMonth(),e.getDate()),i.setUTCHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),t.format(i)}}return t.\u0275fac=function(e){return new(e||t)(n.ac(P,8),n.ac(h.a))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})(),Q=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},providers:[{provide:V,useClass:L}],imports:[[h.b]]}),t})();const N={parse:{dateInput:null},display:{dateInput:{year:"numeric",month:"numeric",day:"numeric"},monthYearLabel:{year:"numeric",month:"short"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"}}};let z=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},providers:[{provide:R,useValue:N}],imports:[[Q]]}),t})(),B=(()=>{class t{isErrorState(t,e){return!!(t&&t.invalid&&(t.touched||e&&e.submitted))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(n.Mb)({factory:function(){return new t},token:t,providedIn:"root"}),t})(),U=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["","mat-line",""],["","matLine",""]],hostAttrs:[1,"mat-line"]}),t})();function $(t,e,i="mat"){t.changes.pipe(Object(u.a)(t)).subscribe(({length:t})=>{H(e,i+"-2-line",!1),H(e,i+"-3-line",!1),H(e,i+"-multi-line",!1),2===t||3===t?H(e,`${i}-${t}-line`,!0):t>3&&H(e,i+"-multi-line",!0)})}function H(t,e,i){const n=t.nativeElement.classList;i?n.add(e):n.remove(e)}let G=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[O],O]}),t})();class X{constructor(t,e,i){this._renderer=t,this.element=e,this.config=i,this.state=3}fadeOut(){this._renderer.fadeOutRipple(this)}}const q={enterDuration:450,exitDuration:400},K=Object(h.f)({passive:!0}),Y=["mousedown","touchstart"],J=["mouseup","mouseleave","touchend","touchcancel"];class Z{constructor(t,e,i,n){this._target=t,this._ngZone=e,this._isPointerDown=!1,this._activeRipples=new Set,this._pointerUpEventsRegistered=!1,n.isBrowser&&(this._containerElement=Object(c.e)(i))}fadeInRipple(t,e,i={}){const n=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),a=Object.assign(Object.assign({},q),i.animation);i.centered&&(t=n.left+n.width/2,e=n.top+n.height/2);const s=i.radius||function(t,e,i){const n=Math.max(Math.abs(t-i.left),Math.abs(t-i.right)),a=Math.max(Math.abs(e-i.top),Math.abs(e-i.bottom));return Math.sqrt(n*n+a*a)}(t,e,n),o=t-n.left,r=e-n.top,c=a.enterDuration,l=document.createElement("div");l.classList.add("mat-ripple-element"),l.style.left=o-s+"px",l.style.top=r-s+"px",l.style.height=2*s+"px",l.style.width=2*s+"px",null!=i.color&&(l.style.backgroundColor=i.color),l.style.transitionDuration=c+"ms",this._containerElement.appendChild(l),window.getComputedStyle(l).getPropertyValue("opacity"),l.style.transform="scale(1)";const d=new X(this,l,i);return d.state=0,this._activeRipples.add(d),i.persistent||(this._mostRecentTransientRipple=d),this._runTimeoutOutsideZone(()=>{const t=d===this._mostRecentTransientRipple;d.state=1,i.persistent||t&&this._isPointerDown||d.fadeOut()},c),d}fadeOutRipple(t){const e=this._activeRipples.delete(t);if(t===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),this._activeRipples.size||(this._containerRect=null),!e)return;const i=t.element,n=Object.assign(Object.assign({},q),t.config.animation);i.style.transitionDuration=n.exitDuration+"ms",i.style.opacity="0",t.state=2,this._runTimeoutOutsideZone(()=>{t.state=3,i.parentNode.removeChild(i)},n.exitDuration)}fadeOutAll(){this._activeRipples.forEach(t=>t.fadeOut())}setupTriggerEvents(t){const e=Object(c.e)(t);e&&e!==this._triggerElement&&(this._removeTriggerEvents(),this._triggerElement=e,this._registerEvents(Y))}handleEvent(t){"mousedown"===t.type?this._onMousedown(t):"touchstart"===t.type?this._onTouchStart(t):this._onPointerUp(),this._pointerUpEventsRegistered||(this._registerEvents(J),this._pointerUpEventsRegistered=!0)}_onMousedown(t){const e=Object(a.l)(t),i=this._lastTouchStartEvent&&Date.now()<this._lastTouchStartEvent+800;this._target.rippleDisabled||e||i||(this._isPointerDown=!0,this.fadeInRipple(t.clientX,t.clientY,this._target.rippleConfig))}_onTouchStart(t){if(!this._target.rippleDisabled){this._lastTouchStartEvent=Date.now(),this._isPointerDown=!0;const e=t.changedTouches;for(let t=0;t<e.length;t++)this.fadeInRipple(e[t].clientX,e[t].clientY,this._target.rippleConfig)}}_onPointerUp(){this._isPointerDown&&(this._isPointerDown=!1,this._activeRipples.forEach(t=>{!t.config.persistent&&(1===t.state||t.config.terminateOnPointerUp&&0===t.state)&&t.fadeOut()}))}_runTimeoutOutsideZone(t,e=0){this._ngZone.runOutsideAngular(()=>setTimeout(t,e))}_registerEvents(t){this._ngZone.runOutsideAngular(()=>{t.forEach(t=>{this._triggerElement.addEventListener(t,this,K)})})}_removeTriggerEvents(){this._triggerElement&&(Y.forEach(t=>{this._triggerElement.removeEventListener(t,this,K)}),this._pointerUpEventsRegistered&&J.forEach(t=>{this._triggerElement.removeEventListener(t,this,K)}))}}const tt=new n.s("mat-ripple-global-options");let et=(()=>{class t{constructor(t,e,i,n,a){this._elementRef=t,this._animationMode=a,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=n||{},this._rippleRenderer=new Z(this,e,t,i)}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._setupTriggerEventsIfEnabled()}get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(t){this._trigger=t,this._setupTriggerEventsIfEnabled()}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:Object.assign(Object.assign(Object.assign({},this._globalOptions.animation),"NoopAnimations"===this._animationMode?{enterDuration:0,exitDuration:0}:{}),this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(t,e=0,i){return"number"==typeof t?this._rippleRenderer.fadeInRipple(t,e,Object.assign(Object.assign({},this.rippleConfig),i)):this._rippleRenderer.fadeInRipple(0,0,Object.assign(Object.assign({},this.rippleConfig),t))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(n.C),n.Qb(h.a),n.Qb(tt,8),n.Qb(p.a,8))},t.\u0275dir=n.Lb({type:t,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(t,e){2&t&&n.Ib("mat-ripple-unbounded",e.unbounded)},inputs:{radius:["matRippleRadius","radius"],disabled:["matRippleDisabled","disabled"],trigger:["matRippleTrigger","trigger"],color:["matRippleColor","color"],unbounded:["matRippleUnbounded","unbounded"],centered:["matRippleCentered","centered"],animation:["matRippleAnimation","animation"]},exportAs:["matRipple"]}),t})(),it=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[O,h.b],O]}),t})(),nt=(()=>{class t{constructor(t){this._animationMode=t,this.state="unchecked",this.disabled=!1}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(p.a,8))},t.\u0275cmp=n.Kb({type:t,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:8,hostBindings:function(t,e){2&t&&n.Ib("mat-pseudo-checkbox-indeterminate","indeterminate"===e.state)("mat-pseudo-checkbox-checked","checked"===e.state)("mat-pseudo-checkbox-disabled",e.disabled)("_mat-animation-noopable","NoopAnimations"===e._animationMode)},inputs:{state:"state",disabled:"disabled"},decls:0,vars:0,template:function(t,e){},styles:['.mat-pseudo-checkbox{width:16px;height:16px;border:2px solid;border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate{border-color:transparent}._mat-animation-noopable.mat-pseudo-checkbox{transition:none;animation:none}._mat-animation-noopable.mat-pseudo-checkbox::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{top:5px;left:1px;width:10px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{top:2.4px;left:1px;width:8px;height:3px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}\n'],encapsulation:2,changeDetection:0}),t})(),at=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)}}),t})();class st{}const ot=D(st);let rt=0,ct=(()=>{class t extends ot{constructor(){super(...arguments),this._labelId="mat-optgroup-label-"+rt++}}return t.\u0275fac=function(e){return lt(e||t)},t.\u0275dir=n.Lb({type:t,inputs:{label:"label"},features:[n.Ab]}),t})();const lt=n.Yb(ct),dt=new n.s("MatOptgroup");let ht=(()=>{class t extends ct{}return t.\u0275fac=function(e){return ut(e||t)},t.\u0275cmp=n.Kb({type:t,selectors:[["mat-optgroup"]],hostAttrs:["role","group",1,"mat-optgroup"],hostVars:4,hostBindings:function(t,e){2&t&&(n.Eb("aria-disabled",e.disabled.toString())("aria-labelledby",e._labelId),n.Ib("mat-optgroup-disabled",e.disabled))},inputs:{disabled:"disabled"},exportAs:["matOptgroup"],features:[n.Cb([{provide:dt,useExisting:t}]),n.Ab],ngContentSelectors:m,decls:4,vars:2,consts:[[1,"mat-optgroup-label",3,"id"]],template:function(t,e){1&t&&(n.nc(f),n.Wb(0,"label",0),n.Qc(1),n.mc(2),n.Vb(),n.mc(3,1)),2&t&&(n.oc("id",e._labelId),n.Db(1),n.Sc("",e.label," "))},styles:[".mat-optgroup-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-optgroup-label[disabled]{cursor:default}[dir=rtl] .mat-optgroup-label{text-align:right}.mat-optgroup-label .mat-icon{margin-right:16px;vertical-align:middle}.mat-optgroup-label .mat-icon svg{vertical-align:top}[dir=rtl] .mat-optgroup-label .mat-icon{margin-left:16px;margin-right:0}\n"],encapsulation:2,changeDetection:0}),t})();const ut=n.Yb(ht);let pt=0;class bt{constructor(t,e=!1){this.source=t,this.isUserInput=e}}const ft=new n.s("MAT_OPTION_PARENT_COMPONENT");let mt=(()=>{class t{constructor(t,e,i,a){this._element=t,this._changeDetectorRef=e,this._parent=i,this.group=a,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id="mat-option-"+pt++,this.onSelectionChange=new n.o,this._stateChanges=new l.a}get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}get disabled(){return this.group&&this.group.disabled||this._disabled}set disabled(t){this._disabled=Object(c.c)(t)}get disableRipple(){return this._parent&&this._parent.disableRipple}get active(){return this._active}get viewValue(){return(this._getHostElement().textContent||"").trim()}select(){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}deselect(){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}focus(t,e){const i=this._getHostElement();"function"==typeof i.focus&&i.focus(e)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(t){t.keyCode!==b.g&&t.keyCode!==b.q||Object(b.v)(t)||(this._selectViaInteraction(),t.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getAriaSelected(){return this.selected||!this.multiple&&null}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){const t=this.viewValue;t!==this._mostRecentViewValue&&(this._mostRecentViewValue=t,this._stateChanges.next())}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(t=!1){this.onSelectionChange.emit(new bt(this,t))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(n.h),n.Qb(void 0),n.Qb(ct))},t.\u0275dir=n.Lb({type:t,inputs:{id:"id",disabled:"disabled",value:"value"},outputs:{onSelectionChange:"onSelectionChange"}}),t})(),gt=(()=>{class t extends mt{constructor(t,e,i,n){super(t,e,i,n)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(n.h),n.Qb(ft,8),n.Qb(dt,8))},t.\u0275cmp=n.Kb({type:t,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-option","mat-focus-indicator"],hostVars:12,hostBindings:function(t,e){1&t&&n.dc("click",(function(){return e._selectViaInteraction()}))("keydown",(function(t){return e._handleKeydown(t)})),2&t&&(n.Zb("id",e.id),n.Eb("tabindex",e._getTabIndex())("aria-selected",e._getAriaSelected())("aria-disabled",e.disabled.toString()),n.Ib("mat-selected",e.selected)("mat-option-multiple",e.multiple)("mat-active",e.active)("mat-option-disabled",e.disabled))},exportAs:["matOption"],features:[n.Ab],ngContentSelectors:v,decls:4,vars:3,consts:[["class","mat-option-pseudo-checkbox",3,"state","disabled",4,"ngIf"],[1,"mat-option-text"],["mat-ripple","",1,"mat-option-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-option-pseudo-checkbox",3,"state","disabled"]],template:function(t,e){1&t&&(n.nc(),n.Oc(0,g,1,2,"mat-pseudo-checkbox",0),n.Wb(1,"span",1),n.mc(2),n.Vb(),n.Rb(3,"div",2)),2&t&&(n.oc("ngIf",e.multiple),n.Db(3),n.oc("matRippleTrigger",e._getHostElement())("matRippleDisabled",e.disabled||e.disableRipple))},directives:[r.t,et,nt],styles:[".mat-option{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative;cursor:pointer;outline:none;display:flex;flex-direction:row;max-width:100%;box-sizing:border-box;align-items:center;-webkit-tap-highlight-color:transparent}.mat-option[disabled]{cursor:default}[dir=rtl] .mat-option{text-align:right}.mat-option .mat-icon{margin-right:16px;vertical-align:middle}.mat-option .mat-icon svg{vertical-align:top}[dir=rtl] .mat-option .mat-icon{margin-left:16px;margin-right:0}.mat-option[aria-disabled=true]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:32px}[dir=rtl] .mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:16px;padding-right:32px}.cdk-high-contrast-active .mat-option{margin:0 1px}.cdk-high-contrast-active .mat-option.mat-active{border:solid 1px currentColor;margin:0}.mat-option-text{display:inline-block;flex-grow:1;overflow:hidden;text-overflow:ellipsis}.mat-option .mat-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.cdk-high-contrast-active .mat-option .mat-option-ripple{opacity:.5}.mat-option-pseudo-checkbox{margin-right:8px}[dir=rtl] .mat-option-pseudo-checkbox{margin-left:8px;margin-right:0}\n"],encapsulation:2,changeDetection:0}),t})();function vt(t,e,i){if(i.length){let n=e.toArray(),a=i.toArray(),s=0;for(let e=0;e<t+1;e++)n[e].group&&n[e].group===a[s]&&s++;return s}return 0}function _t(t,e,i,n){return t<i?t:t+e>i+n?Math.max(0,t-n+e):i}let yt=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[it,r.c,at]]}),t})();const xt=new n.s("mat-label-global-options")},FtGj:function(t,e,i){"use strict";i.d(e,"a",(function(){return y})),i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return O})),i.d(e,"d",(function(){return m})),i.d(e,"e",(function(){return f})),i.d(e,"f",(function(){return d})),i.d(e,"g",(function(){return s})),i.d(e,"h",(function(){return o})),i.d(e,"i",(function(){return _})),i.d(e,"j",(function(){return h})),i.d(e,"k",(function(){return u})),i.d(e,"l",(function(){return v})),i.d(e,"m",(function(){return l})),i.d(e,"n",(function(){return c})),i.d(e,"o",(function(){return b})),i.d(e,"p",(function(){return C})),i.d(e,"q",(function(){return r})),i.d(e,"r",(function(){return a})),i.d(e,"s",(function(){return p})),i.d(e,"t",(function(){return x})),i.d(e,"u",(function(){return g})),i.d(e,"v",(function(){return D}));const n=8,a=9,s=13,o=27,r=32,c=33,l=34,d=35,h=36,u=37,p=38,b=39,f=40,m=46,g=48,v=57,_=59,y=65,x=90,C=186,O=188;function D(t,...e){return e.length?e.some(e=>t[e]):t.altKey||t.shiftKey||t.ctrlKey||t.metaKey}},FvrZ:function(t,e,i){"use strict";i.d(e,"a",(function(){return g})),i.d(e,"b",(function(){return O})),i.d(e,"c",(function(){return x})),i.d(e,"d",(function(){return k})),i.d(e,"e",(function(){return C})),i.d(e,"f",(function(){return y})),i.d(e,"g",(function(){return v})),i.d(e,"h",(function(){return w})),i.d(e,"i",(function(){return M})),i.d(e,"j",(function(){return f})),i.d(e,"k",(function(){return m}));var n=i("0EQZ"),a=i("7+OI"),s=i("XNiG"),o=i("2Vo4"),r=i("LRne"),c=i("IzEk"),l=i("pLZG"),d=i("1G5W"),h=i("fXoL"),u=i("8LU1"),p=i("cH1L");class b{constructor(){this.expansionModel=new n.c(!0)}toggle(t){this.expansionModel.toggle(this._trackByValue(t))}expand(t){this.expansionModel.select(this._trackByValue(t))}collapse(t){this.expansionModel.deselect(this._trackByValue(t))}isExpanded(t){return this.expansionModel.isSelected(this._trackByValue(t))}toggleDescendants(t){this.expansionModel.isSelected(this._trackByValue(t))?this.collapseDescendants(t):this.expandDescendants(t)}collapseAll(){this.expansionModel.clear()}expandDescendants(t){let e=[t];e.push(...this.getDescendants(t)),this.expansionModel.select(...e.map(t=>this._trackByValue(t)))}collapseDescendants(t){let e=[t];e.push(...this.getDescendants(t)),this.expansionModel.deselect(...e.map(t=>this._trackByValue(t)))}_trackByValue(t){return this.trackBy?this.trackBy(t):t}}class f extends b{constructor(t,e,i){super(),this.getLevel=t,this.isExpandable=e,this.options=i,this.options&&(this.trackBy=this.options.trackBy)}getDescendants(t){const e=[];for(let i=this.dataNodes.indexOf(t)+1;i<this.dataNodes.length&&this.getLevel(t)<this.getLevel(this.dataNodes[i]);i++)e.push(this.dataNodes[i]);return e}expandAll(){this.expansionModel.select(...this.dataNodes.map(t=>this._trackByValue(t)))}}class m extends b{constructor(t,e){super(),this.getChildren=t,this.options=e,this.options&&(this.trackBy=this.options.trackBy)}expandAll(){this.expansionModel.clear();const t=this.dataNodes.reduce((t,e)=>[...t,...this.getDescendants(e),e],[]);this.expansionModel.select(...t.map(t=>this._trackByValue(t)))}getDescendants(t){const e=[];return this._getDescendants(e,t),e.splice(1)}_getDescendants(t,e){t.push(e);const i=this.getChildren(e);Array.isArray(i)?i.forEach(e=>this._getDescendants(t,e)):Object(a.a)(i)&&i.pipe(Object(c.a)(1),Object(l.a)(Boolean)).subscribe(e=>{for(const i of e)this._getDescendants(t,i)})}}const g=new h.s("CDK_TREE_NODE_OUTLET_NODE");let v=(()=>{class t{constructor(t,e){this.viewContainer=t,this._node=e}}return t.\u0275fac=function(e){return new(e||t)(h.Qb(h.T),h.Qb(g,8))},t.\u0275dir=h.Lb({type:t,selectors:[["","cdkTreeNodeOutlet",""]]}),t})();class _{constructor(t){this.$implicit=t}}let y=(()=>{class t{constructor(t){this.template=t}}return t.\u0275fac=function(e){return new(e||t)(h.Qb(h.P))},t.\u0275dir=h.Lb({type:t,selectors:[["","cdkTreeNodeDef",""]],inputs:{when:["cdkTreeNodeDefWhen","when"]}}),t})(),x=(()=>{class t{constructor(t,e){this._differs=t,this._changeDetectorRef=e,this._onDestroy=new s.a,this._levels=new Map,this.viewChange=new o.a({start:0,end:Number.MAX_VALUE})}get dataSource(){return this._dataSource}set dataSource(t){this._dataSource!==t&&this._switchDataSource(t)}ngOnInit(){this._dataDiffer=this._differs.find([]).create(this.trackBy)}ngOnDestroy(){this._nodeOutlet.viewContainer.clear(),this.viewChange.complete(),this._onDestroy.next(),this._onDestroy.complete(),this._dataSource&&"function"==typeof this._dataSource.disconnect&&this.dataSource.disconnect(this),this._dataSubscription&&(this._dataSubscription.unsubscribe(),this._dataSubscription=null)}ngAfterContentChecked(){const t=this._nodeDefs.filter(t=>!t.when);this._defaultNodeDef=t[0],this.dataSource&&this._nodeDefs&&!this._dataSubscription&&this._observeRenderChanges()}_switchDataSource(t){this._dataSource&&"function"==typeof this._dataSource.disconnect&&this.dataSource.disconnect(this),this._dataSubscription&&(this._dataSubscription.unsubscribe(),this._dataSubscription=null),t||this._nodeOutlet.viewContainer.clear(),this._dataSource=t,this._nodeDefs&&this._observeRenderChanges()}_observeRenderChanges(){let t;Object(n.h)(this._dataSource)?t=this._dataSource.connect(this):Object(a.a)(this._dataSource)?t=this._dataSource:Array.isArray(this._dataSource)&&(t=Object(r.a)(this._dataSource)),t&&(this._dataSubscription=t.pipe(Object(d.a)(this._onDestroy)).subscribe(t=>this.renderNodeChanges(t)))}renderNodeChanges(t,e=this._dataDiffer,i=this._nodeOutlet.viewContainer,n){const a=e.diff(t);a&&(a.forEachOperation((e,a,s)=>{if(null==e.previousIndex)this.insertNode(t[s],s,i,n);else if(null==s)i.remove(a),this._levels.delete(e.item);else{const t=i.get(a);i.move(t,s)}}),this._changeDetectorRef.detectChanges())}_getNodeDef(t,e){return 1===this._nodeDefs.length?this._nodeDefs.first:this._nodeDefs.find(i=>i.when&&i.when(e,t))||this._defaultNodeDef}insertNode(t,e,i,n){const a=this._getNodeDef(t,e),s=new _(t);s.level=this.treeControl.getLevel?this.treeControl.getLevel(t):void 0!==n&&this._levels.has(n)?this._levels.get(n)+1:0,this._levels.set(t,s.level),(i||this._nodeOutlet.viewContainer).createEmbeddedView(a.template,s,e),C.mostRecentTreeNode&&(C.mostRecentTreeNode.data=t)}}return t.\u0275fac=function(e){return new(e||t)(h.Qb(h.v),h.Qb(h.h))},t.\u0275cmp=h.Kb({type:t,selectors:[["cdk-tree"]],contentQueries:function(t,e,i){var n;1&t&&h.Jb(i,y,!0),2&t&&h.yc(n=h.ec())&&(e._nodeDefs=n)},viewQuery:function(t,e){var i;1&t&&h.Kc(v,!0),2&t&&h.yc(i=h.ec())&&(e._nodeOutlet=i.first)},hostAttrs:["role","tree",1,"cdk-tree"],inputs:{dataSource:"dataSource",treeControl:"treeControl",trackBy:"trackBy"},exportAs:["cdkTree"],decls:1,vars:0,consts:[["cdkTreeNodeOutlet",""]],template:function(t,e){1&t&&h.Sb(0,0)},directives:[v],encapsulation:2}),t})(),C=(()=>{class t{constructor(e,i){this._elementRef=e,this._tree=i,this._destroyed=new s.a,this._dataChanges=new s.a,this.role="treeitem",t.mostRecentTreeNode=this}get data(){return this._data}set data(t){t!==this._data&&(this._data=t,this._setRoleFromData(),this._dataChanges.next())}get isExpanded(){return this._tree.treeControl.isExpanded(this._data)}get level(){return this._tree.treeControl.getLevel?this._tree.treeControl.getLevel(this._data):0}ngOnDestroy(){t.mostRecentTreeNode===this&&(t.mostRecentTreeNode=null),this._dataChanges.complete(),this._destroyed.next(),this._destroyed.complete()}focus(){this._elementRef.nativeElement.focus()}_setRoleFromData(){this.role="treeitem"}}return t.\u0275fac=function(e){return new(e||t)(h.Qb(h.l),h.Qb(x))},t.\u0275dir=h.Lb({type:t,selectors:[["cdk-tree-node"]],hostAttrs:[1,"cdk-tree-node"],hostVars:3,hostBindings:function(t,e){2&t&&h.Eb("aria-expanded",e.isExpanded)("aria-level",e.level+1)("role",e.role)},inputs:{role:"role"},exportAs:["cdkTreeNode"]}),t.mostRecentTreeNode=null,t})(),O=(()=>{class t extends C{constructor(t,e,i){super(t,e),this._elementRef=t,this._tree=e,this._differs=i}ngAfterContentInit(){this._dataDiffer=this._differs.find([]).create(this._tree.trackBy);const t=this._tree.treeControl.getChildren(this.data);Array.isArray(t)?this.updateChildrenNodes(t):Object(a.a)(t)&&t.pipe(Object(d.a)(this._destroyed)).subscribe(t=>this.updateChildrenNodes(t)),this.nodeOutlet.changes.pipe(Object(d.a)(this._destroyed)).subscribe(()=>this.updateChildrenNodes())}ngOnDestroy(){this._clear(),super.ngOnDestroy()}updateChildrenNodes(t){const e=this._getNodeOutlet();t&&(this._children=t),e&&this._children?this._tree.renderNodeChanges(this._children,this._dataDiffer,e.viewContainer,this._data):this._dataDiffer.diff([])}_clear(){const t=this._getNodeOutlet();t&&(t.viewContainer.clear(),this._dataDiffer.diff([]))}_getNodeOutlet(){const t=this.nodeOutlet;return t&&t.find(t=>!t._node||t._node===this)}}return t.\u0275fac=function(e){return new(e||t)(h.Qb(h.l),h.Qb(x),h.Qb(h.v))},t.\u0275dir=h.Lb({type:t,selectors:[["cdk-nested-tree-node"]],contentQueries:function(t,e,i){var n;1&t&&h.Jb(i,v,!0),2&t&&h.yc(n=h.ec())&&(e.nodeOutlet=n)},hostAttrs:[1,"cdk-tree-node","cdk-nested-tree-node"],hostVars:2,hostBindings:function(t,e){2&t&&h.Eb("aria-expanded",e.isExpanded)("role",e.role)},exportAs:["cdkNestedTreeNode"],features:[h.Cb([{provide:C,useExisting:t},{provide:g,useExisting:t}]),h.Ab]}),t})();const D=/([A-Za-z%]+)$/;let w=(()=>{class t{constructor(t,e,i,n,a){this._treeNode=t,this._tree=e,this._element=n,this._dir=a,this._destroyed=new s.a,this.indentUnits="px",this._indent=40,this._setPadding(),a&&a.change.pipe(Object(d.a)(this._destroyed)).subscribe(()=>this._setPadding(!0)),t._dataChanges.subscribe(()=>this._setPadding())}get level(){return this._level}set level(t){this._setLevelInput(t)}get indent(){return this._indent}set indent(t){this._setIndentInput(t)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_paddingIndent(){const t=this._treeNode.data&&this._tree.treeControl.getLevel?this._tree.treeControl.getLevel(this._treeNode.data):null,e=null==this._level?t:this._level;return"number"==typeof e?`${e*this._indent}${this.indentUnits}`:null}_setPadding(t=!1){const e=this._paddingIndent();if(e!==this._currentPadding||t){const t=this._element.nativeElement,i=this._dir&&"rtl"===this._dir.value?"paddingRight":"paddingLeft",n="paddingLeft"===i?"paddingRight":"paddingLeft";t.style[i]=e||"",t.style[n]="",this._currentPadding=e}}_setLevelInput(t){this._level=Object(u.f)(t,null),this._setPadding()}_setIndentInput(t){let e=t,i="px";if("string"==typeof t){const n=t.split(D);e=n[0],i=n[1]||i}this.indentUnits=i,this._indent=Object(u.f)(e),this._setPadding()}}return t.\u0275fac=function(e){return new(e||t)(h.Qb(C),h.Qb(x),h.Qb(h.I),h.Qb(h.l),h.Qb(p.c,8))},t.\u0275dir=h.Lb({type:t,selectors:[["","cdkTreeNodePadding",""]],inputs:{level:["cdkTreeNodePadding","level"],indent:["cdkTreeNodePaddingIndent","indent"]}}),t})(),M=(()=>{class t{constructor(t,e){this._tree=t,this._treeNode=e,this._recursive=!1}get recursive(){return this._recursive}set recursive(t){this._recursive=Object(u.c)(t)}_toggle(t){this.recursive?this._tree.treeControl.toggleDescendants(this._treeNode.data):this._tree.treeControl.toggle(this._treeNode.data),t.stopPropagation()}}return t.\u0275fac=function(e){return new(e||t)(h.Qb(x),h.Qb(C))},t.\u0275dir=h.Lb({type:t,selectors:[["","cdkTreeNodeToggle",""]],hostBindings:function(t,e){1&t&&h.dc("click",(function(t){return e._toggle(t)}))},inputs:{recursive:["cdkTreeNodeToggleRecursive","recursive"]}}),t})(),k=(()=>{class t{}return t.\u0275mod=h.Ob({type:t}),t.\u0275inj=h.Nb({factory:function(e){return new(e||t)}}),t})()},GU7r:function(t,e,i){"use strict";i.d(e,"a",(function(){return d})),i.d(e,"b",(function(){return l})),i.d(e,"c",(function(){return h}));var n=i("8LU1"),a=i("fXoL"),s=i("HDdC"),o=i("XNiG"),r=i("Kj3r");let c=(()=>{class t{create(t){return"undefined"==typeof MutationObserver?null:new MutationObserver(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(a.Mb)({factory:function(){return new t},token:t,providedIn:"root"}),t})(),l=(()=>{class t{constructor(t){this._mutationObserverFactory=t,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((t,e)=>this._cleanupObserver(e))}observe(t){const e=Object(n.e)(t);return new s.a(t=>{const i=this._observeElement(e).subscribe(t);return()=>{i.unsubscribe(),this._unobserveElement(e)}})}_observeElement(t){if(this._observedElements.has(t))this._observedElements.get(t).count++;else{const e=new o.a,i=this._mutationObserverFactory.create(t=>e.next(t));i&&i.observe(t,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(t,{observer:i,stream:e,count:1})}return this._observedElements.get(t).stream}_unobserveElement(t){this._observedElements.has(t)&&(this._observedElements.get(t).count--,this._observedElements.get(t).count||this._cleanupObserver(t))}_cleanupObserver(t){if(this._observedElements.has(t)){const{observer:e,stream:i}=this._observedElements.get(t);e&&e.disconnect(),i.complete(),this._observedElements.delete(t)}}}return t.\u0275fac=function(e){return new(e||t)(a.ac(c))},t.\u0275prov=Object(a.Mb)({factory:function(){return new t(Object(a.ac)(c))},token:t,providedIn:"root"}),t})(),d=(()=>{class t{constructor(t,e,i){this._contentObserver=t,this._elementRef=e,this._ngZone=i,this.event=new a.o,this._disabled=!1,this._currentSubscription=null}get disabled(){return this._disabled}set disabled(t){this._disabled=Object(n.c)(t),this._disabled?this._unsubscribe():this._subscribe()}get debounce(){return this._debounce}set debounce(t){this._debounce=Object(n.f)(t),this._subscribe()}ngAfterContentInit(){this._currentSubscription||this.disabled||this._subscribe()}ngOnDestroy(){this._unsubscribe()}_subscribe(){this._unsubscribe();const t=this._contentObserver.observe(this._elementRef);this._ngZone.runOutsideAngular(()=>{this._currentSubscription=(this.debounce?t.pipe(Object(r.a)(this.debounce)):t).subscribe(this.event)})}_unsubscribe(){this._currentSubscription&&this._currentSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(l),a.Qb(a.l),a.Qb(a.C))},t.\u0275dir=a.Lb({type:t,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),t})(),h=(()=>{class t{}return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)},providers:[c]}),t})()},GyhO:function(t,e,i){"use strict";i.d(e,"a",(function(){return s}));var n=i("LRne"),a=i("0EUg");function s(...t){return Object(a.a)()(Object(n.a)(...t))}},HDdC:function(t,e,i){"use strict";i.d(e,"a",(function(){return l}));var n=i("7o/Q"),a=i("2QA8"),s=i("gRHU"),o=i("kJWO"),r=i("SpAZ"),c=i("2fFW");let l=(()=>{class t{constructor(t){this._isScalar=!1,t&&(this._subscribe=t)}lift(e){const i=new t;return i.source=this,i.operator=e,i}subscribe(t,e,i){const{operator:o}=this,r=function(t,e,i){if(t){if(t instanceof n.a)return t;if(t[a.a])return t[a.a]()}return t||e||i?new n.a(t,e,i):new n.a(s.a)}(t,e,i);if(r.add(o?o.call(r,this.source):this.source||c.a.useDeprecatedSynchronousErrorHandling&&!r.syncErrorThrowable?this._subscribe(r):this._trySubscribe(r)),c.a.useDeprecatedSynchronousErrorHandling&&r.syncErrorThrowable&&(r.syncErrorThrowable=!1,r.syncErrorThrown))throw r.syncErrorValue;return r}_trySubscribe(t){try{return this._subscribe(t)}catch(e){c.a.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function(t){for(;t;){const{closed:e,destination:i,isStopped:a}=t;if(e||a)return!1;t=i&&i instanceof n.a?i:null}return!0}(t)?t.error(e):console.warn(e)}}forEach(t,e){return new(e=d(e))((e,i)=>{let n;n=this.subscribe(e=>{try{t(e)}catch(a){i(a),n&&n.unsubscribe()}},i,e)})}_subscribe(t){const{source:e}=this;return e&&e.subscribe(t)}[o.a](){return this}pipe(...t){return 0===t.length?this:(0===(e=t).length?r.a:1===e.length?e[0]:function(t){return e.reduce((t,e)=>e(t),t)})(this);var e}toPromise(t){return new(t=d(t))((t,e)=>{let i;this.subscribe(t=>i=t,t=>e(t),()=>t(i))})}}return t.create=e=>new t(e),t})();function d(t){if(t||(t=c.a.Promise||Promise),!t)throw new Error("no Promise impl found");return t}},I55L:function(t,e,i){"use strict";i.d(e,"a",(function(){return n}));const n=t=>t&&"number"==typeof t.length&&"function"!=typeof t},IjjT:function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));let n=(()=>{class t{constructor(e,i=t.now){this.SchedulerAction=e,this.now=i}schedule(t,e=0,i){return new this.SchedulerAction(this,t).schedule(i,e)}}return t.now=()=>Date.now(),t})();class a extends n{constructor(t,e=n.now){super(t,()=>a.delegate&&a.delegate!==this?a.delegate.now():e()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(t,e=0,i){return a.delegate&&a.delegate!==this?a.delegate.schedule(t,e,i):super.schedule(t,e,i)}flush(t){const{actions:e}=this;if(this.active)return void e.push(t);let i;this.active=!0;do{if(i=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,i){for(;t=e.shift();)t.unsubscribe();throw i}}}},IzEk:function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var n=i("7o/Q"),a=i("4I5i"),s=i("EY2u");function o(t){return e=>0===t?Object(s.b)():e.lift(new r(t))}class r{constructor(t){if(this.total=t,this.total<0)throw new a.a}call(t,e){return e.subscribe(new c(t,this.total))}}class c extends n.a{constructor(t,e){super(t),this.total=e,this.count=0}_next(t){const e=this.total,i=++this.count;i<=e&&(this.destination.next(t),i===e&&(this.destination.complete(),this.unsubscribe()))}}},JIr8:function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var n=i("zx2A");function a(t){return function(e){const i=new s(t),n=e.lift(i);return i.caught=n}}class s{constructor(t){this.selector=t}call(t,e){return e.subscribe(new o(t,this.selector,this.caught))}}class o extends n.b{constructor(t,e,i){super(t),this.selector=e,this.caught=i}error(t){if(!this.isStopped){let i;try{i=this.selector(t,this.caught)}catch(e){return void super.error(e)}this._unsubscribeAndRecycle();const a=new n.a(this);this.add(a);const s=Object(n.c)(i,a);s!==a&&this.add(s)}}}},JX91:function(t,e,i){"use strict";i.d(e,"a",(function(){return s}));var n=i("GyhO"),a=i("z+Ro");function s(...t){const e=t[t.length-1];return Object(a.a)(e)?(t.pop(),i=>Object(n.a)(t,i,e)):e=>Object(n.a)(t,e)}},Kj3r:function(t,e,i){"use strict";i.d(e,"a",(function(){return s}));var n=i("7o/Q"),a=i("D0XW");function s(t,e=a.a){return i=>i.lift(new o(t,e))}class o{constructor(t,e){this.dueTime=t,this.scheduler=e}call(t,e){return e.subscribe(new r(t,this.dueTime,this.scheduler))}}class r extends n.a{constructor(t,e,i){super(t),this.dueTime=e,this.scheduler=i,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(c,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:t}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}}clearDebounce(){const t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)}}function c(t){t.debouncedNext()}},LRne:function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var n=i("z+Ro"),a=i("yCtX"),s=i("jZKg");function o(...t){let e=t[t.length-1];return Object(n.a)(e)?(t.pop(),Object(s.a)(t,e)):Object(a.a)(t)}},Lhse:function(t,e,i){"use strict";function n(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}i.d(e,"a",(function(){return a}));const a=n()},M9IT:function(t,e,i){"use strict";i.d(e,"a",(function(){return O})),i.d(e,"b",(function(){return v})),i.d(e,"c",(function(){return D}));var n=i("ofXK"),a=i("fXoL"),s=i("bTqV"),o=i("d3UM"),r=i("Qu3c"),c=i("8LU1"),l=i("XNiG"),d=i("FKr1"),h=i("kmnG");function u(t,e){if(1&t&&(a.Wb(0,"mat-option",19),a.Qc(1),a.Vb()),2&t){const t=e.$implicit;a.oc("value",t),a.Db(1),a.Sc(" ",t," ")}}function p(t,e){if(1&t){const t=a.Xb();a.Wb(0,"mat-form-field",16),a.Wb(1,"mat-select",17),a.dc("selectionChange",(function(e){return a.Dc(t),a.hc(2)._changePageSize(e.value)})),a.Oc(2,u,2,2,"mat-option",18),a.Vb(),a.Vb()}if(2&t){const t=a.hc(2);a.oc("appearance",t._formFieldAppearance)("color",t.color),a.Db(1),a.oc("value",t.pageSize)("disabled",t.disabled)("aria-label",t._intl.itemsPerPageLabel),a.Db(1),a.oc("ngForOf",t._displayedPageSizeOptions)}}function b(t,e){if(1&t&&(a.Wb(0,"div",20),a.Qc(1),a.Vb()),2&t){const t=a.hc(2);a.Db(1),a.Rc(t.pageSize)}}function f(t,e){if(1&t&&(a.Wb(0,"div",12),a.Wb(1,"div",13),a.Qc(2),a.Vb(),a.Oc(3,p,3,6,"mat-form-field",14),a.Oc(4,b,2,1,"div",15),a.Vb()),2&t){const t=a.hc();a.Db(2),a.Sc(" ",t._intl.itemsPerPageLabel," "),a.Db(1),a.oc("ngIf",t._displayedPageSizeOptions.length>1),a.Db(1),a.oc("ngIf",t._displayedPageSizeOptions.length<=1)}}function m(t,e){if(1&t){const t=a.Xb();a.Wb(0,"button",21),a.dc("click",(function(){return a.Dc(t),a.hc().firstPage()})),a.gc(),a.Wb(1,"svg",7),a.Rb(2,"path",22),a.Vb(),a.Vb()}if(2&t){const t=a.hc();a.oc("matTooltip",t._intl.firstPageLabel)("matTooltipDisabled",t._previousButtonsDisabled())("matTooltipPosition","above")("disabled",t._previousButtonsDisabled()),a.Eb("aria-label",t._intl.firstPageLabel)}}function g(t,e){if(1&t){const t=a.Xb();a.gc(),a.fc(),a.Wb(0,"button",23),a.dc("click",(function(){return a.Dc(t),a.hc().lastPage()})),a.gc(),a.Wb(1,"svg",7),a.Rb(2,"path",24),a.Vb(),a.Vb()}if(2&t){const t=a.hc();a.oc("matTooltip",t._intl.lastPageLabel)("matTooltipDisabled",t._nextButtonsDisabled())("matTooltipPosition","above")("disabled",t._nextButtonsDisabled()),a.Eb("aria-label",t._intl.lastPageLabel)}}let v=(()=>{class t{constructor(){this.changes=new l.a,this.itemsPerPageLabel="Items per page:",this.nextPageLabel="Next page",this.previousPageLabel="Previous page",this.firstPageLabel="First page",this.lastPageLabel="Last page",this.getRangeLabel=(t,e,i)=>{if(0==i||0==e)return"0 of "+i;const n=t*e;return`${n+1} \u2013 ${n<(i=Math.max(i,0))?Math.min(n+e,i):n+e} of ${i}`}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(a.Mb)({factory:function(){return new t},token:t,providedIn:"root"}),t})();const _={provide:v,deps:[[new a.D,new a.N,v]],useFactory:function(t){return t||new v}},y=new a.s("MAT_PAGINATOR_DEFAULT_OPTIONS");class x{}const C=Object(d.C)(Object(d.E)(x));let O=(()=>{class t extends C{constructor(t,e,i){if(super(),this._intl=t,this._changeDetectorRef=e,this._pageIndex=0,this._length=0,this._pageSizeOptions=[],this._hidePageSize=!1,this._showFirstLastButtons=!1,this.page=new a.o,this._intlChanges=t.changes.subscribe(()=>this._changeDetectorRef.markForCheck()),i){const{pageSize:t,pageSizeOptions:e,hidePageSize:n,showFirstLastButtons:a,formFieldAppearance:s}=i;null!=t&&(this._pageSize=t),null!=e&&(this._pageSizeOptions=e),null!=n&&(this._hidePageSize=n),null!=a&&(this._showFirstLastButtons=a),null!=s&&(this._formFieldAppearance=s)}}get pageIndex(){return this._pageIndex}set pageIndex(t){this._pageIndex=Math.max(Object(c.f)(t),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(t){this._length=Object(c.f)(t),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(t){this._pageSize=Math.max(Object(c.f)(t),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(t){this._pageSizeOptions=(t||[]).map(t=>Object(c.f)(t)),this._updateDisplayedPageSizeOptions()}get hidePageSize(){return this._hidePageSize}set hidePageSize(t){this._hidePageSize=Object(c.c)(t)}get showFirstLastButtons(){return this._showFirstLastButtons}set showFirstLastButtons(t){this._showFirstLastButtons=Object(c.c)(t)}ngOnInit(){this._initialized=!0,this._updateDisplayedPageSizeOptions(),this._markInitialized()}ngOnDestroy(){this._intlChanges.unsubscribe()}nextPage(){if(!this.hasNextPage())return;const t=this.pageIndex;this.pageIndex++,this._emitPageEvent(t)}previousPage(){if(!this.hasPreviousPage())return;const t=this.pageIndex;this.pageIndex--,this._emitPageEvent(t)}firstPage(){if(!this.hasPreviousPage())return;const t=this.pageIndex;this.pageIndex=0,this._emitPageEvent(t)}lastPage(){if(!this.hasNextPage())return;const t=this.pageIndex;this.pageIndex=this.getNumberOfPages()-1,this._emitPageEvent(t)}hasPreviousPage(){return this.pageIndex>=1&&0!=this.pageSize}hasNextPage(){const t=this.getNumberOfPages()-1;return this.pageIndex<t&&0!=this.pageSize}getNumberOfPages(){return this.pageSize?Math.ceil(this.length/this.pageSize):0}_changePageSize(t){const e=this.pageIndex;this.pageIndex=Math.floor(this.pageIndex*this.pageSize/t)||0,this.pageSize=t,this._emitPageEvent(e)}_nextButtonsDisabled(){return this.disabled||!this.hasNextPage()}_previousButtonsDisabled(){return this.disabled||!this.hasPreviousPage()}_updateDisplayedPageSizeOptions(){this._initialized&&(this.pageSize||(this._pageSize=0!=this.pageSizeOptions.length?this.pageSizeOptions[0]:50),this._displayedPageSizeOptions=this.pageSizeOptions.slice(),-1===this._displayedPageSizeOptions.indexOf(this.pageSize)&&this._displayedPageSizeOptions.push(this.pageSize),this._displayedPageSizeOptions.sort((t,e)=>t-e),this._changeDetectorRef.markForCheck())}_emitPageEvent(t){this.page.emit({previousPageIndex:t,pageIndex:this.pageIndex,pageSize:this.pageSize,length:this.length})}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(v),a.Qb(a.h),a.Qb(y,8))},t.\u0275cmp=a.Kb({type:t,selectors:[["mat-paginator"]],hostAttrs:[1,"mat-paginator"],inputs:{disabled:"disabled",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",color:"color"},outputs:{page:"page"},exportAs:["matPaginator"],features:[a.Ab],decls:14,vars:14,consts:[[1,"mat-paginator-outer-container"],[1,"mat-paginator-container"],["class","mat-paginator-page-size",4,"ngIf"],[1,"mat-paginator-range-actions"],[1,"mat-paginator-range-label"],["mat-icon-button","","type","button","class","mat-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click",4,"ngIf"],["mat-icon-button","","type","button",1,"mat-paginator-navigation-previous",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["viewBox","0 0 24 24","focusable","false",1,"mat-paginator-icon"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],["mat-icon-button","","type","button",1,"mat-paginator-navigation-next",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"],["mat-icon-button","","type","button","class","mat-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click",4,"ngIf"],[1,"mat-paginator-page-size"],[1,"mat-paginator-page-size-label"],["class","mat-paginator-page-size-select",3,"appearance","color",4,"ngIf"],["class","mat-paginator-page-size-value",4,"ngIf"],[1,"mat-paginator-page-size-select",3,"appearance","color"],[3,"value","disabled","aria-label","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"mat-paginator-page-size-value"],["mat-icon-button","","type","button",1,"mat-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"],["mat-icon-button","","type","button",1,"mat-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"]],template:function(t,e){1&t&&(a.Wb(0,"div",0),a.Wb(1,"div",1),a.Oc(2,f,5,3,"div",2),a.Wb(3,"div",3),a.Wb(4,"div",4),a.Qc(5),a.Vb(),a.Oc(6,m,3,5,"button",5),a.Wb(7,"button",6),a.dc("click",(function(){return e.previousPage()})),a.gc(),a.Wb(8,"svg",7),a.Rb(9,"path",8),a.Vb(),a.Vb(),a.fc(),a.Wb(10,"button",9),a.dc("click",(function(){return e.nextPage()})),a.gc(),a.Wb(11,"svg",7),a.Rb(12,"path",10),a.Vb(),a.Vb(),a.Oc(13,g,3,5,"button",11),a.Vb(),a.Vb(),a.Vb()),2&t&&(a.Db(2),a.oc("ngIf",!e.hidePageSize),a.Db(3),a.Sc(" ",e._intl.getRangeLabel(e.pageIndex,e.pageSize,e.length)," "),a.Db(1),a.oc("ngIf",e.showFirstLastButtons),a.Db(1),a.oc("matTooltip",e._intl.previousPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),a.Eb("aria-label",e._intl.previousPageLabel),a.Db(3),a.oc("matTooltip",e._intl.nextPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),a.Eb("aria-label",e._intl.nextPageLabel),a.Db(3),a.oc("ngIf",e.showFirstLastButtons))},directives:[n.t,s.b,r.b,h.c,o.a,n.s,d.p],styles:[".mat-paginator{display:block}.mat-paginator-outer-container{display:flex}.mat-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap-reverse;width:100%}.mat-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-paginator-page-size{margin-right:0;margin-left:8px}.mat-paginator-page-size-label{margin:0 4px}.mat-paginator-page-size-select{margin:6px 4px 0 4px;width:56px}.mat-paginator-page-size-select.mat-form-field-appearance-outline{width:64px}.mat-paginator-page-size-select.mat-form-field-appearance-fill{width:64px}.mat-paginator-range-label{margin:0 32px 0 24px}.mat-paginator-range-actions{display:flex;align-items:center}.mat-paginator-icon{width:28px;fill:currentColor}[dir=rtl] .mat-paginator-icon{transform:rotate(180deg)}\n"],encapsulation:2,changeDetection:0}),t})(),D=(()=>{class t{}return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)},providers:[_],imports:[[n.c,s.c,o.b,r.c]]}),t})()},MJ5r:function(t,e,i){"use strict";i.d(e,"a",(function(){return n}));const n={production:!0,VERSION:i("kiQV").version,AUTHOR:i("kiQV").author}},MutI:function(t,e,i){"use strict";i.d(e,"a",(function(){return V})),i.d(e,"b",(function(){return R})),i.d(e,"c",(function(){return j})),i.d(e,"d",(function(){return W})),i.d(e,"e",(function(){return U})),i.d(e,"f",(function(){return z})),i.d(e,"g",(function(){return A})),i.d(e,"h",(function(){return I})),i.d(e,"i",(function(){return B}));var n=i("ofXK"),a=i("fXoL"),s=i("FKr1"),o=i("8LU1"),r=i("XNiG"),c=i("1G5W"),l=i("JX91"),d=i("u47x"),h=i("0EQZ"),u=i("FtGj"),p=i("3Pt+"),b=i("f0Cb");const f=["*"],m='.mat-subheader{display:flex;box-sizing:border-box;padding:16px;align-items:center}.mat-list-base .mat-subheader{margin:0}.mat-list-base{padding-top:8px;display:block;-webkit-tap-highlight-color:transparent}.mat-list-base .mat-subheader{height:48px;line-height:16px}.mat-list-base .mat-subheader:first-child{margin-top:-8px}.mat-list-base .mat-list-item,.mat-list-base .mat-list-option{display:block;height:48px;-webkit-tap-highlight-color:transparent;width:100%;padding:0}.mat-list-base .mat-list-item .mat-list-item-content,.mat-list-base .mat-list-option .mat-list-item-content{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:0 16px;position:relative;height:inherit}.mat-list-base .mat-list-item .mat-list-item-content-reverse,.mat-list-base .mat-list-option .mat-list-item-content-reverse{display:flex;align-items:center;padding:0 16px;flex-direction:row-reverse;justify-content:space-around}.mat-list-base .mat-list-item .mat-list-item-ripple,.mat-list-base .mat-list-option .mat-list-item-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-list-base .mat-list-item.mat-list-item-with-avatar,.mat-list-base .mat-list-option.mat-list-item-with-avatar{height:56px}.mat-list-base .mat-list-item.mat-2-line,.mat-list-base .mat-list-option.mat-2-line{height:72px}.mat-list-base .mat-list-item.mat-3-line,.mat-list-base .mat-list-option.mat-3-line{height:88px}.mat-list-base .mat-list-item.mat-multi-line,.mat-list-base .mat-list-option.mat-multi-line{height:auto}.mat-list-base .mat-list-item.mat-multi-line .mat-list-item-content,.mat-list-base .mat-list-option.mat-multi-line .mat-list-item-content{padding-top:16px;padding-bottom:16px}.mat-list-base .mat-list-item .mat-list-text,.mat-list-base .mat-list-option .mat-list-text{display:flex;flex-direction:column;flex:auto;box-sizing:border-box;overflow:hidden;padding:0}.mat-list-base .mat-list-item .mat-list-text>*,.mat-list-base .mat-list-option .mat-list-text>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-list-base .mat-list-item .mat-list-text:empty,.mat-list-base .mat-list-option .mat-list-text:empty{display:none}.mat-list-base .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list-base .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,.mat-list-base .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list-base .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:0;padding-left:16px}[dir=rtl] .mat-list-base .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:0}.mat-list-base .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-left:0;padding-right:16px}[dir=rtl] .mat-list-base .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-right:0;padding-left:16px}.mat-list-base .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-list-base .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:16px}.mat-list-base .mat-list-item .mat-list-avatar,.mat-list-base .mat-list-option .mat-list-avatar{flex-shrink:0;width:40px;height:40px;border-radius:50%;object-fit:cover}.mat-list-base .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-list-base .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:72px;width:calc(100% - 72px)}[dir=rtl] .mat-list-base .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-list-base .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:auto;margin-right:72px}.mat-list-base .mat-list-item .mat-list-icon,.mat-list-base .mat-list-option .mat-list-icon{flex-shrink:0;width:24px;height:24px;font-size:24px;box-sizing:content-box;border-radius:50%;padding:4px}.mat-list-base .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-list-base .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:64px;width:calc(100% - 64px)}[dir=rtl] .mat-list-base .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-list-base .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:auto;margin-right:64px}.mat-list-base .mat-list-item .mat-divider,.mat-list-base .mat-list-option .mat-divider{position:absolute;bottom:0;left:0;width:100%;margin:0}[dir=rtl] .mat-list-base .mat-list-item .mat-divider,[dir=rtl] .mat-list-base .mat-list-option .mat-divider{margin-left:auto;margin-right:0}.mat-list-base .mat-list-item .mat-divider.mat-divider-inset,.mat-list-base .mat-list-option .mat-divider.mat-divider-inset{position:absolute}.mat-list-base[dense]{padding-top:4px;display:block}.mat-list-base[dense] .mat-subheader{height:40px;line-height:8px}.mat-list-base[dense] .mat-subheader:first-child{margin-top:-4px}.mat-list-base[dense] .mat-list-item,.mat-list-base[dense] .mat-list-option{display:block;height:40px;-webkit-tap-highlight-color:transparent;width:100%;padding:0}.mat-list-base[dense] .mat-list-item .mat-list-item-content,.mat-list-base[dense] .mat-list-option .mat-list-item-content{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:0 16px;position:relative;height:inherit}.mat-list-base[dense] .mat-list-item .mat-list-item-content-reverse,.mat-list-base[dense] .mat-list-option .mat-list-item-content-reverse{display:flex;align-items:center;padding:0 16px;flex-direction:row-reverse;justify-content:space-around}.mat-list-base[dense] .mat-list-item .mat-list-item-ripple,.mat-list-base[dense] .mat-list-option .mat-list-item-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar{height:48px}.mat-list-base[dense] .mat-list-item.mat-2-line,.mat-list-base[dense] .mat-list-option.mat-2-line{height:60px}.mat-list-base[dense] .mat-list-item.mat-3-line,.mat-list-base[dense] .mat-list-option.mat-3-line{height:76px}.mat-list-base[dense] .mat-list-item.mat-multi-line,.mat-list-base[dense] .mat-list-option.mat-multi-line{height:auto}.mat-list-base[dense] .mat-list-item.mat-multi-line .mat-list-item-content,.mat-list-base[dense] .mat-list-option.mat-multi-line .mat-list-item-content{padding-top:16px;padding-bottom:16px}.mat-list-base[dense] .mat-list-item .mat-list-text,.mat-list-base[dense] .mat-list-option .mat-list-text{display:flex;flex-direction:column;flex:auto;box-sizing:border-box;overflow:hidden;padding:0}.mat-list-base[dense] .mat-list-item .mat-list-text>*,.mat-list-base[dense] .mat-list-option .mat-list-text>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-list-base[dense] .mat-list-item .mat-list-text:empty,.mat-list-base[dense] .mat-list-option .mat-list-text:empty{display:none}.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list-base[dense] .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:0;padding-left:16px}[dir=rtl] .mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:0}.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-left:0;padding-right:16px}[dir=rtl] .mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-right:0;padding-left:16px}.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:16px}.mat-list-base[dense] .mat-list-item .mat-list-avatar,.mat-list-base[dense] .mat-list-option .mat-list-avatar{flex-shrink:0;width:36px;height:36px;border-radius:50%;object-fit:cover}.mat-list-base[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-list-base[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:68px;width:calc(100% - 68px)}[dir=rtl] .mat-list-base[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-list-base[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:auto;margin-right:68px}.mat-list-base[dense] .mat-list-item .mat-list-icon,.mat-list-base[dense] .mat-list-option .mat-list-icon{flex-shrink:0;width:20px;height:20px;font-size:20px;box-sizing:content-box;border-radius:50%;padding:4px}.mat-list-base[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-list-base[dense] .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:60px;width:calc(100% - 60px)}[dir=rtl] .mat-list-base[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-list-base[dense] .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:auto;margin-right:60px}.mat-list-base[dense] .mat-list-item .mat-divider,.mat-list-base[dense] .mat-list-option .mat-divider{position:absolute;bottom:0;left:0;width:100%;margin:0}[dir=rtl] .mat-list-base[dense] .mat-list-item .mat-divider,[dir=rtl] .mat-list-base[dense] .mat-list-option .mat-divider{margin-left:auto;margin-right:0}.mat-list-base[dense] .mat-list-item .mat-divider.mat-divider-inset,.mat-list-base[dense] .mat-list-option .mat-divider.mat-divider-inset{position:absolute}.mat-nav-list a{text-decoration:none;color:inherit}.mat-nav-list .mat-list-item{cursor:pointer;outline:none}mat-action-list button{background:none;color:inherit;border:none;font:inherit;outline:inherit;-webkit-tap-highlight-color:transparent;text-align:left}[dir=rtl] mat-action-list button{text-align:right}mat-action-list button::-moz-focus-inner{border:0}mat-action-list .mat-list-item{cursor:pointer;outline:inherit}.mat-list-option:not(.mat-list-item-disabled){cursor:pointer;outline:none}.mat-list-item-disabled{pointer-events:none}.cdk-high-contrast-active .mat-list-item-disabled{opacity:.5}.cdk-high-contrast-active :host .mat-list-item-disabled{opacity:.5}.cdk-high-contrast-active .mat-selection-list:focus{outline-style:dotted}.cdk-high-contrast-active .mat-list-option:hover,.cdk-high-contrast-active .mat-list-option:focus,.cdk-high-contrast-active .mat-nav-list .mat-list-item:hover,.cdk-high-contrast-active .mat-nav-list .mat-list-item:focus,.cdk-high-contrast-active mat-action-list .mat-list-item:hover,.cdk-high-contrast-active mat-action-list .mat-list-item:focus{outline:dotted 1px}.cdk-high-contrast-active .mat-list-single-selected-option::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}.cdk-high-contrast-active [dir=rtl] .mat-list-single-selected-option::after{right:auto;left:16px}@media(hover: none){.mat-list-option:not(.mat-list-single-selected-option):not(.mat-list-item-disabled):hover,.mat-nav-list .mat-list-item:not(.mat-list-item-disabled):hover,.mat-action-list .mat-list-item:not(.mat-list-item-disabled):hover{background:none}}\n',g=[[["","mat-list-avatar",""],["","mat-list-icon",""],["","matListAvatar",""],["","matListIcon",""]],[["","mat-line",""],["","matLine",""]],"*"],v=["[mat-list-avatar], [mat-list-icon], [matListAvatar], [matListIcon]","[mat-line], [matLine]","*"],_=["text"];function y(t,e){if(1&t&&a.Rb(0,"mat-pseudo-checkbox",5),2&t){const t=a.hc();a.oc("state",t.selected?"checked":"unchecked")("disabled",t.disabled)}}const x=["*",[["","mat-list-avatar",""],["","mat-list-icon",""],["","matListAvatar",""],["","matListIcon",""]]],C=["*","[mat-list-avatar], [mat-list-icon], [matListAvatar], [matListIcon]"];class O{}const D=Object(s.C)(Object(s.B)(O));class w{}const M=Object(s.B)(w),k=new a.s("MatList"),S=new a.s("MatNavList");let I=(()=>{class t extends D{constructor(){super(...arguments),this._stateChanges=new r.a}ngOnChanges(){this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}}return t.\u0275fac=function(e){return P(e||t)},t.\u0275cmp=a.Kb({type:t,selectors:[["mat-nav-list"]],hostAttrs:["role","navigation",1,"mat-nav-list","mat-list-base"],inputs:{disableRipple:"disableRipple",disabled:"disabled"},exportAs:["matNavList"],features:[a.Cb([{provide:S,useExisting:t}]),a.Ab,a.Bb],ngContentSelectors:f,decls:1,vars:0,template:function(t,e){1&t&&(a.nc(),a.mc(0))},styles:[m],encapsulation:2,changeDetection:0}),t})();const P=a.Yb(I);let V=(()=>{class t extends D{constructor(t){super(),this._elementRef=t,this._stateChanges=new r.a,"action-list"===this._getListType()&&t.nativeElement.classList.add("mat-action-list")}_getListType(){const t=this._elementRef.nativeElement.nodeName.toLowerCase();return"mat-list"===t?"list":"mat-action-list"===t?"action-list":null}ngOnChanges(){this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l))},t.\u0275cmp=a.Kb({type:t,selectors:[["mat-list"],["mat-action-list"]],hostAttrs:[1,"mat-list","mat-list-base"],inputs:{disableRipple:"disableRipple",disabled:"disabled"},exportAs:["matList"],features:[a.Cb([{provide:k,useExisting:t}]),a.Ab,a.Bb],ngContentSelectors:f,decls:1,vars:0,template:function(t,e){1&t&&(a.nc(),a.mc(0))},styles:[m],encapsulation:2,changeDetection:0}),t})(),R=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=a.Lb({type:t,selectors:[["","mat-list-avatar",""],["","matListAvatar",""]],hostAttrs:[1,"mat-list-avatar"]}),t})(),j=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=a.Lb({type:t,selectors:[["","mat-list-icon",""],["","matListIcon",""]],hostAttrs:[1,"mat-list-icon"]}),t})(),A=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=a.Lb({type:t,selectors:[["","mat-subheader",""],["","matSubheader",""]],hostAttrs:[1,"mat-subheader"]}),t})(),W=(()=>{class t extends M{constructor(t,e,i,n){super(),this._element=t,this._isInteractiveList=!1,this._destroyed=new r.a,this._disabled=!1,this._isInteractiveList=!!(i||n&&"action-list"===n._getListType()),this._list=i||n;const a=this._getHostElement();"button"!==a.nodeName.toLowerCase()||a.hasAttribute("type")||a.setAttribute("type","button"),this._list&&this._list._stateChanges.pipe(Object(c.a)(this._destroyed)).subscribe(()=>{e.markForCheck()})}get disabled(){return this._disabled||!(!this._list||!this._list.disabled)}set disabled(t){this._disabled=Object(o.c)(t)}ngAfterContentInit(){Object(s.G)(this._lines,this._element)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_isRippleDisabled(){return!this._isInteractiveList||this.disableRipple||!(!this._list||!this._list.disableRipple)}_getHostElement(){return this._element.nativeElement}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(a.h),a.Qb(S,8),a.Qb(k,8))},t.\u0275cmp=a.Kb({type:t,selectors:[["mat-list-item"],["a","mat-list-item",""],["button","mat-list-item",""]],contentQueries:function(t,e,i){var n;1&t&&(a.Jb(i,R,!0),a.Jb(i,j,!0),a.Jb(i,s.l,!0)),2&t&&(a.yc(n=a.ec())&&(e._avatar=n.first),a.yc(n=a.ec())&&(e._icon=n.first),a.yc(n=a.ec())&&(e._lines=n))},hostAttrs:[1,"mat-list-item","mat-focus-indicator"],hostVars:6,hostBindings:function(t,e){2&t&&a.Ib("mat-list-item-disabled",e.disabled)("mat-list-item-avatar",e._avatar||e._icon)("mat-list-item-with-avatar",e._avatar||e._icon)},inputs:{disableRipple:"disableRipple",disabled:"disabled"},exportAs:["matListItem"],features:[a.Ab],ngContentSelectors:v,decls:6,vars:2,consts:[[1,"mat-list-item-content"],["mat-ripple","",1,"mat-list-item-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-list-text"]],template:function(t,e){1&t&&(a.nc(g),a.Wb(0,"div",0),a.Rb(1,"div",1),a.mc(2),a.Wb(3,"div",2),a.mc(4,1),a.Vb(),a.mc(5,2),a.Vb()),2&t&&(a.Db(1),a.oc("matRippleTrigger",e._getHostElement())("matRippleDisabled",e._isRippleDisabled()))},directives:[s.u],encapsulation:2,changeDetection:0}),t})();class T{}const E=Object(s.B)(T);class F{}const L=Object(s.B)(F),Q={provide:p.s,useExisting:Object(a.X)(()=>B),multi:!0};class N{constructor(t,e,i){this.source=t,this.option=e,this.options=i}}let z=(()=>{class t extends L{constructor(t,e,i){super(),this._element=t,this._changeDetector=e,this.selectionList=i,this._selected=!1,this._disabled=!1,this._hasFocus=!1,this.checkboxPosition="after",this._inputsInitialized=!1}get color(){return this._color||this.selectionList.color}set color(t){this._color=t}get value(){return this._value}set value(t){this.selected&&!this.selectionList.compareWith(t,this.value)&&this._inputsInitialized&&(this.selected=!1),this._value=t}get disabled(){return this._disabled||this.selectionList&&this.selectionList.disabled}set disabled(t){const e=Object(o.c)(t);e!==this._disabled&&(this._disabled=e,this._changeDetector.markForCheck())}get selected(){return this.selectionList.selectedOptions.isSelected(this)}set selected(t){const e=Object(o.c)(t);e!==this._selected&&(this._setSelected(e),this.selectionList._reportValueChange())}ngOnInit(){const t=this.selectionList;t._value&&t._value.some(e=>t.compareWith(e,this._value))&&this._setSelected(!0);const e=this._selected;Promise.resolve().then(()=>{(this._selected||e)&&(this.selected=!0,this._changeDetector.markForCheck())}),this._inputsInitialized=!0}ngAfterContentInit(){Object(s.G)(this._lines,this._element)}ngOnDestroy(){this.selected&&Promise.resolve().then(()=>{this.selected=!1});const t=this._hasFocus,e=this.selectionList._removeOptionFromList(this);t&&e&&e.focus()}toggle(){this.selected=!this.selected}focus(){this._element.nativeElement.focus()}getLabel(){return this._text&&this._text.nativeElement.textContent||""}_isRippleDisabled(){return this.disabled||this.disableRipple||this.selectionList.disableRipple}_handleClick(){this.disabled||!this.selectionList.multiple&&this.selected||(this.toggle(),this.selectionList._emitChangeEvent([this]))}_handleFocus(){this.selectionList._setFocusedOption(this),this._hasFocus=!0}_handleBlur(){this.selectionList._onTouched(),this._hasFocus=!1}_getHostElement(){return this._element.nativeElement}_setSelected(t){return t!==this._selected&&(this._selected=t,t?this.selectionList.selectedOptions.select(this):this.selectionList.selectedOptions.deselect(this),this._changeDetector.markForCheck(),!0)}_markForCheck(){this._changeDetector.markForCheck()}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(a.h),a.Qb(Object(a.X)(()=>B)))},t.\u0275cmp=a.Kb({type:t,selectors:[["mat-list-option"]],contentQueries:function(t,e,i){var n;1&t&&(a.Jb(i,R,!0),a.Jb(i,j,!0),a.Jb(i,s.l,!0)),2&t&&(a.yc(n=a.ec())&&(e._avatar=n.first),a.yc(n=a.ec())&&(e._icon=n.first),a.yc(n=a.ec())&&(e._lines=n))},viewQuery:function(t,e){var i;1&t&&a.Xc(_,!0),2&t&&a.yc(i=a.ec())&&(e._text=i.first)},hostAttrs:["role","option",1,"mat-list-item","mat-list-option","mat-focus-indicator"],hostVars:15,hostBindings:function(t,e){1&t&&a.dc("focus",(function(){return e._handleFocus()}))("blur",(function(){return e._handleBlur()}))("click",(function(){return e._handleClick()})),2&t&&(a.Eb("aria-selected",e.selected)("aria-disabled",e.disabled)("tabindex",-1),a.Ib("mat-list-item-disabled",e.disabled)("mat-list-item-with-avatar",e._avatar||e._icon)("mat-primary","primary"===e.color)("mat-accent","primary"!==e.color&&"warn"!==e.color)("mat-warn","warn"===e.color)("mat-list-single-selected-option",e.selected&&!e.selectionList.multiple))},inputs:{disableRipple:"disableRipple",checkboxPosition:"checkboxPosition",color:"color",value:"value",selected:"selected",disabled:"disabled"},exportAs:["matListOption"],features:[a.Ab],ngContentSelectors:C,decls:7,vars:5,consts:[[1,"mat-list-item-content"],["mat-ripple","",1,"mat-list-item-ripple",3,"matRippleTrigger","matRippleDisabled"],[3,"state","disabled",4,"ngIf"],[1,"mat-list-text"],["text",""],[3,"state","disabled"]],template:function(t,e){1&t&&(a.nc(x),a.Wb(0,"div",0),a.Rb(1,"div",1),a.Oc(2,y,1,2,"mat-pseudo-checkbox",2),a.Wb(3,"div",3,4),a.mc(5),a.Vb(),a.mc(6,1),a.Vb()),2&t&&(a.Ib("mat-list-item-content-reverse","after"==e.checkboxPosition),a.Db(1),a.oc("matRippleTrigger",e._getHostElement())("matRippleDisabled",e._isRippleDisabled()),a.Db(1),a.oc("ngIf",e.selectionList.multiple))},directives:[s.u,n.t,s.s],encapsulation:2,changeDetection:0}),t})(),B=(()=>{class t extends E{constructor(t,e,i,n){super(),this._element=t,this._changeDetector=i,this._focusMonitor=n,this._multiple=!0,this._contentInitialized=!1,this.selectionChange=new a.o,this.tabIndex=0,this.color="accent",this.compareWith=(t,e)=>t===e,this._disabled=!1,this.selectedOptions=new h.c(this._multiple),this._tabIndex=-1,this._onChange=t=>{},this._destroyed=new r.a,this._onTouched=()=>{}}get disabled(){return this._disabled}set disabled(t){this._disabled=Object(o.c)(t),this._markOptionsForCheck()}get multiple(){return this._multiple}set multiple(t){const e=Object(o.c)(t);e!==this._multiple&&(this._multiple=e,this.selectedOptions=new h.c(this._multiple,this.selectedOptions.selected))}ngAfterContentInit(){var t;this._contentInitialized=!0,this._keyManager=new d.g(this.options).withWrap().withTypeAhead().withHomeAndEnd().skipPredicate(()=>!1).withAllowedModifierKeys(["shiftKey"]),this._value&&this._setOptionsFromValues(this._value),this._keyManager.tabOut.pipe(Object(c.a)(this._destroyed)).subscribe(()=>{this._allowFocusEscape()}),this.options.changes.pipe(Object(l.a)(null),Object(c.a)(this._destroyed)).subscribe(()=>{this._updateTabIndex()}),this.selectedOptions.changed.pipe(Object(c.a)(this._destroyed)).subscribe(t=>{if(t.added)for(let e of t.added)e.selected=!0;if(t.removed)for(let e of t.removed)e.selected=!1}),null===(t=this._focusMonitor)||void 0===t||t.monitor(this._element).pipe(Object(c.a)(this._destroyed)).subscribe(t=>{if("keyboard"===t||"program"===t){const t=this._keyManager.activeItemIndex;t&&-1!==t?this._keyManager.setActiveItem(t):this._keyManager.setFirstItemActive()}})}ngOnChanges(t){const e=t.disableRipple,i=t.color;(e&&!e.firstChange||i&&!i.firstChange)&&this._markOptionsForCheck()}ngOnDestroy(){var t;null===(t=this._focusMonitor)||void 0===t||t.stopMonitoring(this._element),this._destroyed.next(),this._destroyed.complete(),this._isDestroyed=!0}focus(t){this._element.nativeElement.focus(t)}selectAll(){this._setAllOptionsSelected(!0)}deselectAll(){this._setAllOptionsSelected(!1)}_setFocusedOption(t){this._keyManager.updateActiveItem(t)}_removeOptionFromList(t){const e=this._getOptionIndex(t);return e>-1&&this._keyManager.activeItemIndex===e&&(e>0?this._keyManager.updateActiveItem(e-1):0===e&&this.options.length>1&&this._keyManager.updateActiveItem(Math.min(e+1,this.options.length-1))),this._keyManager.activeItem}_keydown(t){const e=t.keyCode,i=this._keyManager,n=i.activeItemIndex,a=Object(u.v)(t);switch(e){case u.q:case u.g:a||i.isTyping()||(this._toggleFocusedOption(),t.preventDefault());break;default:if(e===u.a&&this.multiple&&Object(u.v)(t,"ctrlKey")&&!i.isTyping()){const e=this.options.some(t=>!t.disabled&&!t.selected);this._setAllOptionsSelected(e,!0,!0),t.preventDefault()}else i.onKeydown(t)}this.multiple&&(e===u.s||e===u.e)&&t.shiftKey&&i.activeItemIndex!==n&&this._toggleFocusedOption()}_reportValueChange(){if(this.options&&!this._isDestroyed){const t=this._getSelectedOptionValues();this._onChange(t),this._value=t}}_emitChangeEvent(t){this.selectionChange.emit(new N(this,t[0],t))}writeValue(t){this._value=t,this.options&&this._setOptionsFromValues(t||[])}setDisabledState(t){this.disabled=t}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}_setOptionsFromValues(t){this.options.forEach(t=>t._setSelected(!1)),t.forEach(t=>{const e=this.options.find(e=>!e.selected&&this.compareWith(e.value,t));e&&e._setSelected(!0)})}_getSelectedOptionValues(){return this.options.filter(t=>t.selected).map(t=>t.value)}_toggleFocusedOption(){let t=this._keyManager.activeItemIndex;if(null!=t&&this._isValidIndex(t)){let e=this.options.toArray()[t];!e||e.disabled||!this._multiple&&e.selected||(e.toggle(),this._emitChangeEvent([e]))}}_setAllOptionsSelected(t,e,i){const n=[];this.options.forEach(i=>{e&&i.disabled||!i._setSelected(t)||n.push(i)}),n.length&&(this._reportValueChange(),i&&this._emitChangeEvent(n))}_isValidIndex(t){return t>=0&&t<this.options.length}_getOptionIndex(t){return this.options.toArray().indexOf(t)}_markOptionsForCheck(){this.options&&this.options.forEach(t=>t._markForCheck())}_allowFocusEscape(){this._tabIndex=-1,setTimeout(()=>{this._tabIndex=0,this._changeDetector.markForCheck()})}_updateTabIndex(){this._tabIndex=0===this.options.length?-1:0}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.bc("tabindex"),a.Qb(a.h),a.Qb(d.h))},t.\u0275cmp=a.Kb({type:t,selectors:[["mat-selection-list"]],contentQueries:function(t,e,i){var n;1&t&&a.Jb(i,z,!0),2&t&&a.yc(n=a.ec())&&(e.options=n)},hostAttrs:["role","listbox",1,"mat-selection-list","mat-list-base"],hostVars:3,hostBindings:function(t,e){1&t&&a.dc("keydown",(function(t){return e._keydown(t)})),2&t&&a.Eb("aria-multiselectable",e.multiple)("aria-disabled",e.disabled.toString())("tabindex",e._tabIndex)},inputs:{disableRipple:"disableRipple",tabIndex:"tabIndex",color:"color",compareWith:"compareWith",disabled:"disabled",multiple:"multiple"},outputs:{selectionChange:"selectionChange"},exportAs:["matSelectionList"],features:[a.Cb([Q]),a.Ab,a.Bb],ngContentSelectors:f,decls:1,vars:0,template:function(t,e){1&t&&(a.nc(),a.mc(0))},styles:[m],encapsulation:2,changeDetection:0}),t})(),U=(()=>{class t{}return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)},imports:[[s.m,s.v,s.k,s.t,n.c],s.m,s.k,s.t,b.b]}),t})()},NFeN:function(t,e,i){"use strict";i.d(e,"a",(function(){return j})),i.d(e,"b",(function(){return A})),i.d(e,"c",(function(){return D}));var n=i("fXoL"),a=i("FKr1"),s=i("8LU1"),o=i("ofXK"),r=i("LRne"),c=i("z6cu"),l=i("cp0P"),d=i("quSY"),h=i("vkgz"),u=i("lJxs"),p=i("JIr8"),b=i("nYR2"),f=i("w1tV"),m=i("IzEk"),g=i("tk/3"),v=i("jhN1");const _=["*"];function y(t){return Error(`Unable to find icon with the name "${t}"`)}function x(t){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${t}".`)}function C(t){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${t}".`)}class O{constructor(t,e,i){this.url=t,this.svgText=e,this.options=i}}let D=(()=>{class t{constructor(t,e,i,n){this._httpClient=t,this._sanitizer=e,this._errorHandler=n,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._defaultFontSetClass="material-icons",this._document=i}addSvgIcon(t,e,i){return this.addSvgIconInNamespace("",t,e,i)}addSvgIconLiteral(t,e,i){return this.addSvgIconLiteralInNamespace("",t,e,i)}addSvgIconInNamespace(t,e,i,n){return this._addSvgIconConfig(t,e,new O(i,null,n))}addSvgIconLiteralInNamespace(t,e,i,a){const s=this._sanitizer.sanitize(n.M.HTML,i);if(!s)throw C(i);return this._addSvgIconConfig(t,e,new O("",s,a))}addSvgIconSet(t,e){return this.addSvgIconSetInNamespace("",t,e)}addSvgIconSetLiteral(t,e){return this.addSvgIconSetLiteralInNamespace("",t,e)}addSvgIconSetInNamespace(t,e,i){return this._addSvgIconSetConfig(t,new O(e,null,i))}addSvgIconSetLiteralInNamespace(t,e,i){const a=this._sanitizer.sanitize(n.M.HTML,e);if(!a)throw C(e);return this._addSvgIconSetConfig(t,new O("",a,i))}registerFontClassAlias(t,e=t){return this._fontCssClassesByAlias.set(t,e),this}classNameForFontAlias(t){return this._fontCssClassesByAlias.get(t)||t}setDefaultFontSetClass(t){return this._defaultFontSetClass=t,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(t){const e=this._sanitizer.sanitize(n.M.RESOURCE_URL,t);if(!e)throw x(t);const i=this._cachedIconsByUrl.get(e);return i?Object(r.a)(w(i)):this._loadSvgIconFromConfig(new O(t,null)).pipe(Object(h.a)(t=>this._cachedIconsByUrl.set(e,t)),Object(u.a)(t=>w(t)))}getNamedSvgIcon(t,e=""){const i=M(e,t),n=this._svgIconConfigs.get(i);if(n)return this._getSvgFromConfig(n);const a=this._iconSetConfigs.get(e);return a?this._getSvgFromIconSetConfigs(t,a):Object(c.a)(y(i))}ngOnDestroy(){this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(t){return t.svgText?Object(r.a)(w(this._svgElementFromConfig(t))):this._loadSvgIconFromConfig(t).pipe(Object(u.a)(t=>w(t)))}_getSvgFromIconSetConfigs(t,e){const i=this._extractIconWithNameFromAnySet(t,e);if(i)return Object(r.a)(i);const a=e.filter(t=>!t.svgText).map(t=>this._loadSvgIconSetFromConfig(t).pipe(Object(p.a)(e=>{const i=this._sanitizer.sanitize(n.M.RESOURCE_URL,t.url);return this._errorHandler.handleError(new Error(`Loading icon set URL: ${i} failed: ${e.message}`)),Object(r.a)(null)})));return Object(l.a)(a).pipe(Object(u.a)(()=>{const i=this._extractIconWithNameFromAnySet(t,e);if(!i)throw y(t);return i}))}_extractIconWithNameFromAnySet(t,e){for(let i=e.length-1;i>=0;i--){const n=e[i];if(n.svgText&&n.svgText.indexOf(t)>-1){const e=this._svgElementFromConfig(n),i=this._extractSvgIconFromSet(e,t,n.options);if(i)return i}}return null}_loadSvgIconFromConfig(t){return this._fetchIcon(t).pipe(Object(h.a)(e=>t.svgText=e),Object(u.a)(()=>this._svgElementFromConfig(t)))}_loadSvgIconSetFromConfig(t){return t.svgText?Object(r.a)(null):this._fetchIcon(t).pipe(Object(h.a)(e=>t.svgText=e))}_extractSvgIconFromSet(t,e,i){const n=t.querySelector(`[id="${e}"]`);if(!n)return null;const a=n.cloneNode(!0);if(a.removeAttribute("id"),"svg"===a.nodeName.toLowerCase())return this._setSvgAttributes(a,i);if("symbol"===a.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(a),i);const s=this._svgElementFromString("<svg></svg>");return s.appendChild(a),this._setSvgAttributes(s,i)}_svgElementFromString(t){const e=this._document.createElement("DIV");e.innerHTML=t;const i=e.querySelector("svg");if(!i)throw Error("<svg> tag not found");return i}_toSvgElement(t){const e=this._svgElementFromString("<svg></svg>"),i=t.attributes;for(let n=0;n<i.length;n++){const{name:t,value:a}=i[n];"id"!==t&&e.setAttribute(t,a)}for(let n=0;n<t.childNodes.length;n++)t.childNodes[n].nodeType===this._document.ELEMENT_NODE&&e.appendChild(t.childNodes[n].cloneNode(!0));return e}_setSvgAttributes(t,e){return t.setAttribute("fit",""),t.setAttribute("height","100%"),t.setAttribute("width","100%"),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.setAttribute("focusable","false"),e&&e.viewBox&&t.setAttribute("viewBox",e.viewBox),t}_fetchIcon(t){var e;const{url:i,options:a}=t,s=null!==(e=null==a?void 0:a.withCredentials)&&void 0!==e&&e;if(!this._httpClient)throw Error("Could not find HttpClient provider for use with Angular Material icons. Please include the HttpClientModule from @angular/common/http in your app imports.");if(null==i)throw Error(`Cannot fetch icon from URL "${i}".`);const o=this._sanitizer.sanitize(n.M.RESOURCE_URL,i);if(!o)throw x(i);const r=this._inProgressUrlFetches.get(o);if(r)return r;const c=this._httpClient.get(o,{responseType:"text",withCredentials:s}).pipe(Object(b.a)(()=>this._inProgressUrlFetches.delete(o)),Object(f.a)());return this._inProgressUrlFetches.set(o,c),c}_addSvgIconConfig(t,e,i){return this._svgIconConfigs.set(M(t,e),i),this}_addSvgIconSetConfig(t,e){const i=this._iconSetConfigs.get(t);return i?i.push(e):this._iconSetConfigs.set(t,[e]),this}_svgElementFromConfig(t){if(!t.svgElement){const e=this._svgElementFromString(t.svgText);this._setSvgAttributes(e,t.options),t.svgElement=e}return t.svgElement}}return t.\u0275fac=function(e){return new(e||t)(n.ac(g.b,8),n.ac(v.b),n.ac(o.e,8),n.ac(n.n))},t.\u0275prov=Object(n.Mb)({factory:function(){return new t(Object(n.ac)(g.b,8),Object(n.ac)(v.b),Object(n.ac)(o.e,8),Object(n.ac)(n.n))},token:t,providedIn:"root"}),t})();function w(t){return t.cloneNode(!0)}function M(t,e){return t+":"+e}class k{constructor(t){this._elementRef=t}}const S=Object(a.A)(k),I=new n.s("mat-icon-location",{providedIn:"root",factory:function(){const t=Object(n.Y)(o.e),e=t?t.location:null;return{getPathname:()=>e?e.pathname+e.search:""}}}),P=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],V=P.map(t=>`[${t}]`).join(", "),R=/^url\(['"]?#(.*?)['"]?\)$/;let j=(()=>{class t extends S{constructor(t,e,i,n,a){super(t),this._iconRegistry=e,this._location=n,this._errorHandler=a,this._inline=!1,this._currentIconFetch=d.a.EMPTY,i||t.nativeElement.setAttribute("aria-hidden","true")}get inline(){return this._inline}set inline(t){this._inline=Object(s.c)(t)}get svgIcon(){return this._svgIcon}set svgIcon(t){t!==this._svgIcon&&(t?this._updateSvgIcon(t):this._svgIcon&&this._clearSvgElement(),this._svgIcon=t)}get fontSet(){return this._fontSet}set fontSet(t){const e=this._cleanupFontValue(t);e!==this._fontSet&&(this._fontSet=e,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(t){const e=this._cleanupFontValue(t);e!==this._fontIcon&&(this._fontIcon=e,this._updateFontIconClasses())}_splitIconName(t){if(!t)return["",""];const e=t.split(":");switch(e.length){case 1:return["",e[0]];case 2:return e;default:throw Error(`Invalid icon name: "${t}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){const t=this._elementsWithExternalReferences;if(t&&t.size){const t=this._location.getPathname();t!==this._previousPath&&(this._previousPath=t,this._prependPathToReferences(t))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(t){this._clearSvgElement();const e=t.querySelectorAll("style");for(let n=0;n<e.length;n++)e[n].textContent+=" ";const i=this._location.getPathname();this._previousPath=i,this._cacheChildrenWithExternalReferences(t),this._prependPathToReferences(i),this._elementRef.nativeElement.appendChild(t)}_clearSvgElement(){const t=this._elementRef.nativeElement;let e=t.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();e--;){const i=t.childNodes[e];1===i.nodeType&&"svg"!==i.nodeName.toLowerCase()||t.removeChild(i)}}_updateFontIconClasses(){if(!this._usingFontIcon())return;const t=this._elementRef.nativeElement,e=this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet):this._iconRegistry.getDefaultFontSetClass();e!=this._previousFontSetClass&&(this._previousFontSetClass&&t.classList.remove(this._previousFontSetClass),e&&t.classList.add(e),this._previousFontSetClass=e),this.fontIcon!=this._previousFontIconClass&&(this._previousFontIconClass&&t.classList.remove(this._previousFontIconClass),this.fontIcon&&t.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(t){return"string"==typeof t?t.trim().split(" ")[0]:t}_prependPathToReferences(t){const e=this._elementsWithExternalReferences;e&&e.forEach((e,i)=>{e.forEach(e=>{i.setAttribute(e.name,`url('${t}#${e.value}')`)})})}_cacheChildrenWithExternalReferences(t){const e=t.querySelectorAll(V),i=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let n=0;n<e.length;n++)P.forEach(t=>{const a=e[n],s=a.getAttribute(t),o=s?s.match(R):null;if(o){let e=i.get(a);e||(e=[],i.set(a,e)),e.push({name:t,value:o[1]})}})}_updateSvgIcon(t){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),t){const[e,i]=this._splitIconName(t);e&&(this._svgNamespace=e),i&&(this._svgName=i),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(i,e).pipe(Object(m.a)(1)).subscribe(t=>this._setSvgElement(t),t=>{this._errorHandler.handleError(new Error(`Error retrieving icon ${e}:${i}! ${t.message}`))})}}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(D),n.bc("aria-hidden"),n.Qb(I),n.Qb(n.n))},t.\u0275cmp=n.Kb({type:t,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:7,hostBindings:function(t,e){2&t&&(n.Eb("data-mat-icon-type",e._usingFontIcon()?"font":"svg")("data-mat-icon-name",e._svgName||e.fontIcon)("data-mat-icon-namespace",e._svgNamespace||e.fontSet),n.Ib("mat-icon-inline",e.inline)("mat-icon-no-color","primary"!==e.color&&"accent"!==e.color&&"warn"!==e.color))},inputs:{color:"color",inline:"inline",svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],features:[n.Ab],ngContentSelectors:_,decls:1,vars:0,template:function(t,e){1&t&&(n.nc(),n.mc(0))},styles:[".mat-icon{background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}\n"],encapsulation:2,changeDetection:0}),t})(),A=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[a.k],a.k]}),t})()},NJ4a:function(t,e,i){"use strict";function n(t){setTimeout(()=>{throw t},0)}i.d(e,"a",(function(){return n}))},NXyV:function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var n=i("HDdC"),a=i("Cfvw"),s=i("EY2u");function o(t){return new n.a(e=>{let i;try{i=t()}catch(n){return void e.error(n)}return(i?Object(a.a)(i):Object(s.b)()).subscribe(e)})}},NpuA:function(t,e,i){var n,a;void 0===(a="function"==typeof(n=function t(){"use strict";var e="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:{},i=!e.document&&!!e.postMessage,n=i&&/blob:/i.test((e.location||{}).protocol),a={},s=0,o={parse:function(i,n){var r=(n=n||{}).dynamicTyping||!1;if(x(r)&&(n.dynamicTypingFunction=r,r={}),n.dynamicTyping=r,n.transform=!!x(n.transform)&&n.transform,n.worker&&o.WORKERS_SUPPORTED){var c=function(){if(!o.WORKERS_SUPPORTED)return!1;var i,n,r=(i=e.URL||e.webkitURL||null,n=t.toString(),o.BLOB_URL||(o.BLOB_URL=i.createObjectURL(new Blob(["(",n,")();"],{type:"text/javascript"})))),c=new e.Worker(r);return c.onmessage=m,c.id=s++,a[c.id]=c}();return c.userStep=n.step,c.userChunk=n.chunk,c.userComplete=n.complete,c.userError=n.error,n.step=x(n.step),n.chunk=x(n.chunk),n.complete=x(n.complete),n.error=x(n.error),delete n.worker,void c.postMessage({input:i,config:n,workerId:c.id})}var p=null;return"string"==typeof i?p=n.download?new l(n):new h(n):!0===i.readable&&x(i.read)&&x(i.on)?p=new u(n):(e.File&&i instanceof File||i instanceof Object)&&(p=new d(n)),p.stream(i)},unparse:function(t,e){var i=!1,n=!0,a=",",s="\r\n",r='"',c=r+r,l=!1,d=null,h=!1;!function(){if("object"==typeof e){if("string"!=typeof e.delimiter||o.BAD_DELIMITERS.filter((function(t){return-1!==e.delimiter.indexOf(t)})).length||(a=e.delimiter),("boolean"==typeof e.quotes||"function"==typeof e.quotes||Array.isArray(e.quotes))&&(i=e.quotes),"boolean"!=typeof e.skipEmptyLines&&"string"!=typeof e.skipEmptyLines||(l=e.skipEmptyLines),"string"==typeof e.newline&&(s=e.newline),"string"==typeof e.quoteChar&&(r=e.quoteChar),"boolean"==typeof e.header&&(n=e.header),Array.isArray(e.columns)){if(0===e.columns.length)throw new Error("Option columns is empty");d=e.columns}void 0!==e.escapeChar&&(c=e.escapeChar+r),"boolean"==typeof e.escapeFormulae&&(h=e.escapeFormulae)}}();var u=new RegExp(b(r),"g");if("string"==typeof t&&(t=JSON.parse(t)),Array.isArray(t)){if(!t.length||Array.isArray(t[0]))return f(null,t,l);if("object"==typeof t[0])return f(d||p(t[0]),t,l)}else if("object"==typeof t)return"string"==typeof t.data&&(t.data=JSON.parse(t.data)),Array.isArray(t.data)&&(t.fields||(t.fields=t.meta&&t.meta.fields),t.fields||(t.fields=Array.isArray(t.data[0])?t.fields:p(t.data[0])),Array.isArray(t.data[0])||"object"==typeof t.data[0]||(t.data=[t.data])),f(t.fields||[],t.data||[],l);throw new Error("Unable to serialize unrecognized input");function p(t){if("object"!=typeof t)return[];var e=[];for(var i in t)e.push(i);return e}function f(t,e,i){var o="";"string"==typeof t&&(t=JSON.parse(t)),"string"==typeof e&&(e=JSON.parse(e));var r=Array.isArray(t)&&0<t.length,c=!Array.isArray(e[0]);if(r&&n){for(var l=0;l<t.length;l++)0<l&&(o+=a),o+=m(t[l],l);0<e.length&&(o+=s)}for(var d=0;d<e.length;d++){var h=r?t.length:e[d].length,u=!1,p=r?0===Object.keys(e[d]).length:0===e[d].length;if(i&&!r&&(u="greedy"===i?""===e[d].join("").trim():1===e[d].length&&0===e[d][0].length),"greedy"===i&&r){for(var b=[],f=0;f<h;f++)b.push(e[d][c?t[f]:f]);u=""===b.join("").trim()}if(!u){for(var g=0;g<h;g++)0<g&&!p&&(o+=a),o+=m(e[d][r&&c?t[g]:g],g);d<e.length-1&&(!i||0<h&&!p)&&(o+=s)}}return o}function m(t,e){if(null==t)return"";if(t.constructor===Date)return JSON.stringify(t).slice(1,25);!0===h&&"string"==typeof t&&null!==t.match(/^[=+\-@].*$/)&&(t="'"+t);var n=t.toString().replace(u,c);return"boolean"==typeof i&&i||"function"==typeof i&&i(t,e)||Array.isArray(i)&&i[e]||function(t,e){for(var i=0;i<e.length;i++)if(-1<t.indexOf(e[i]))return!0;return!1}(n,o.BAD_DELIMITERS)||-1<n.indexOf(a)||" "===n.charAt(0)||" "===n.charAt(n.length-1)?r+n+r:n}}};if(o.RECORD_SEP=String.fromCharCode(30),o.UNIT_SEP=String.fromCharCode(31),o.BYTE_ORDER_MARK="\ufeff",o.BAD_DELIMITERS=["\r","\n",'"',o.BYTE_ORDER_MARK],o.WORKERS_SUPPORTED=!i&&!!e.Worker,o.NODE_STREAM_INPUT=1,o.LocalChunkSize=10485760,o.RemoteChunkSize=5242880,o.DefaultDelimiter=",",o.Parser=f,o.ParserHandle=p,o.NetworkStreamer=l,o.FileStreamer=d,o.StringStreamer=h,o.ReadableStreamStreamer=u,e.jQuery){var r=e.jQuery;r.fn.parse=function(t){var i=t.config||{},n=[];return this.each((function(t){if("INPUT"!==r(this).prop("tagName").toUpperCase()||"file"!==r(this).attr("type").toLowerCase()||!e.FileReader||!this.files||0===this.files.length)return!0;for(var a=0;a<this.files.length;a++)n.push({file:this.files[a],inputElem:this,instanceConfig:r.extend({},i)})})),a(),this;function a(){if(0!==n.length){var e,i,a,c=n[0];if(x(t.before)){var l=t.before(c.file,c.inputElem);if("object"==typeof l){if("abort"===l.action)return e=c.file,i=c.inputElem,a=l.reason,void(x(t.error)&&t.error({name:"AbortError"},e,i,a));if("skip"===l.action)return void s();"object"==typeof l.config&&(c.instanceConfig=r.extend(c.instanceConfig,l.config))}else if("skip"===l)return void s()}var d=c.instanceConfig.complete;c.instanceConfig.complete=function(t){x(d)&&d(t,c.file,c.inputElem),s()},o.parse(c.file,c.instanceConfig)}else x(t.complete)&&t.complete()}function s(){n.splice(0,1),a()}}}function c(t){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(t){var e=_(t);e.chunkSize=parseInt(e.chunkSize),t.step||t.chunk||(e.chunkSize=null),this._handle=new p(e),(this._handle.streamer=this)._config=e}).call(this,t),this.parseChunk=function(t,i){if(this.isFirstChunk&&x(this._config.beforeFirstChunk)){var a=this._config.beforeFirstChunk(t);void 0!==a&&(t=a)}this.isFirstChunk=!1,this._halted=!1;var s=this._partialLine+t;this._partialLine="";var r=this._handle.parse(s,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var c=r.meta.cursor;this._finished||(this._partialLine=s.substring(c-this._baseIndex),this._baseIndex=c),r&&r.data&&(this._rowCount+=r.data.length);var l=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(n)e.postMessage({results:r,workerId:o.WORKER_ID,finished:l});else if(x(this._config.chunk)&&!i){if(this._config.chunk(r,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);r=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(r.data),this._completeResults.errors=this._completeResults.errors.concat(r.errors),this._completeResults.meta=r.meta),this._completed||!l||!x(this._config.complete)||r&&r.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),l||r&&r.meta.paused||this._nextChunk(),r}this._halted=!0},this._sendError=function(t){x(this._config.error)?this._config.error(t):n&&this._config.error&&e.postMessage({workerId:o.WORKER_ID,error:t,finished:!1})}}function l(t){var e;(t=t||{}).chunkSize||(t.chunkSize=o.RemoteChunkSize),c.call(this,t),this._nextChunk=i?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(t){this._input=t,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(e=new XMLHttpRequest,this._config.withCredentials&&(e.withCredentials=this._config.withCredentials),i||(e.onload=y(this._chunkLoaded,this),e.onerror=y(this._chunkError,this)),e.open(this._config.downloadRequestBody?"POST":"GET",this._input,!i),this._config.downloadRequestHeaders){var t=this._config.downloadRequestHeaders;for(var n in t)e.setRequestHeader(n,t[n])}this._config.chunkSize&&e.setRequestHeader("Range","bytes="+this._start+"-"+(this._start+this._config.chunkSize-1));try{e.send(this._config.downloadRequestBody)}catch(t){this._chunkError(t.message)}i&&0===e.status&&this._chunkError()}},this._chunkLoaded=function(){4===e.readyState&&(e.status<200||400<=e.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:e.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(t){var e=t.getResponseHeader("Content-Range");return null===e?-1:parseInt(e.substring(e.lastIndexOf("/")+1))}(e),this.parseChunk(e.responseText)))},this._chunkError=function(t){this._sendError(new Error(e.statusText||t))}}function d(t){var e,i;(t=t||{}).chunkSize||(t.chunkSize=o.LocalChunkSize),c.call(this,t);var n="undefined"!=typeof FileReader;this.stream=function(t){this._input=t,i=t.slice||t.webkitSlice||t.mozSlice,n?((e=new FileReader).onload=y(this._chunkLoaded,this),e.onerror=y(this._chunkError,this)):e=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var t=this._input;if(this._config.chunkSize){var a=Math.min(this._start+this._config.chunkSize,this._input.size);t=i.call(t,this._start,a)}var s=e.readAsText(t,this._config.encoding);n||this._chunkLoaded({target:{result:s}})},this._chunkLoaded=function(t){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(t.target.result)},this._chunkError=function(){this._sendError(e.error)}}function h(t){var e;c.call(this,t=t||{}),this.stream=function(t){return e=t,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var t,i=this._config.chunkSize;return i?(t=e.substring(0,i),e=e.substring(i)):(t=e,e=""),this._finished=!e,this.parseChunk(t)}}}function u(t){c.call(this,t=t||{});var e=[],i=!0,n=!1;this.pause=function(){c.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){c.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(t){this._input=t,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){n&&1===e.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),e.length?this.parseChunk(e.shift()):i=!0},this._streamData=y((function(t){try{e.push("string"==typeof t?t:t.toString(this._config.encoding)),i&&(i=!1,this._checkIsFinished(),this.parseChunk(e.shift()))}catch(t){this._streamError(t)}}),this),this._streamError=y((function(t){this._streamCleanUp(),this._sendError(t)}),this),this._streamEnd=y((function(){this._streamCleanUp(),n=!0,this._streamData("")}),this),this._streamCleanUp=y((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function p(t){var e,i,n,a=Math.pow(2,53),s=-a,r=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)(e[-+]?\d+)?\s*$/,c=/(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))/,l=this,d=0,h=0,u=!1,p=!1,m=[],g={data:[],errors:[],meta:{}};if(x(t.step)){var v=t.step;t.step=function(e){if(g=e,O())C();else{if(C(),0===g.data.length)return;d+=e.data.length,t.preview&&d>t.preview?i.abort():(g.data=g.data[0],v(g,l))}}}function y(e){return"greedy"===t.skipEmptyLines?""===e.join("").trim():1===e.length&&0===e[0].length}function C(){if(g&&n&&(w("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),n=!1),t.skipEmptyLines)for(var e=0;e<g.data.length;e++)y(g.data[e])&&g.data.splice(e--,1);return O()&&function(){if(g)if(Array.isArray(g.data[0])){for(var e=0;O()&&e<g.data.length;e++)g.data[e].forEach(i);g.data.splice(0,1)}else g.data.forEach(i);function i(e,i){x(t.transformHeader)&&(e=t.transformHeader(e,i)),m.push(e)}}(),function(){if(!g||!t.header&&!t.dynamicTyping&&!t.transform)return g;function e(e,i){var n,a=t.header?{}:[];for(n=0;n<e.length;n++){var s=n,o=e[n];t.header&&(s=n>=m.length?"__parsed_extra":m[n]),t.transform&&(o=t.transform(o,s)),o=D(s,o),"__parsed_extra"===s?(a[s]=a[s]||[],a[s].push(o)):a[s]=o}return t.header&&(n>m.length?w("FieldMismatch","TooManyFields","Too many fields: expected "+m.length+" fields but parsed "+n,h+i):n<m.length&&w("FieldMismatch","TooFewFields","Too few fields: expected "+m.length+" fields but parsed "+n,h+i)),a}var i=1;return!g.data.length||Array.isArray(g.data[0])?(g.data=g.data.map(e),i=g.data.length):g.data=e(g.data,0),t.header&&g.meta&&(g.meta.fields=m),h+=i,g}()}function O(){return t.header&&0===m.length}function D(e,i){return n=e,t.dynamicTypingFunction&&void 0===t.dynamicTyping[n]&&(t.dynamicTyping[n]=t.dynamicTypingFunction(n)),!0===(t.dynamicTyping[n]||t.dynamicTyping)?"true"===i||"TRUE"===i||"false"!==i&&"FALSE"!==i&&(function(t){if(r.test(t)){var e=parseFloat(t);if(s<e&&e<a)return!0}return!1}(i)?parseFloat(i):c.test(i)?new Date(i):""===i?null:i):i;var n}function w(t,e,i,n){var a={type:t,code:e,message:i};void 0!==n&&(a.row=n),g.errors.push(a)}this.parse=function(a,s,r){if(t.newline||(t.newline=function(t,e){t=t.substring(0,1048576);var i=new RegExp(b(e)+"([^]*?)"+b(e),"gm"),n=(t=t.replace(i,"")).split("\r"),a=t.split("\n");if(1===n.length||1<a.length&&a[0].length<n[0].length)return"\n";for(var s=0,o=0;o<n.length;o++)"\n"===n[o][0]&&s++;return s>=n.length/2?"\r\n":"\r"}(a,t.quoteChar||'"')),n=!1,t.delimiter)x(t.delimiter)&&(t.delimiter=t.delimiter(a),g.meta.delimiter=t.delimiter);else{var c=function(e,i,n,a,s){var r,c,l,d;s=s||[",","\t","|",";",o.RECORD_SEP,o.UNIT_SEP];for(var h=0;h<s.length;h++){var u=s[h],p=0,b=0,m=0;l=void 0;for(var g=new f({comments:a,delimiter:u,newline:i,preview:10}).parse(e),v=0;v<g.data.length;v++)if(n&&y(g.data[v]))m++;else{var _=g.data[v].length;b+=_,void 0!==l?0<_&&(p+=Math.abs(_-l),l=_):l=_}0<g.data.length&&(b/=g.data.length-m),(void 0===c||p<=c)&&(void 0===d||d<b)&&1.99<b&&(c=p,r=u,d=b)}return{successful:!!(t.delimiter=r),bestDelimiter:r}}(a,t.newline,t.skipEmptyLines,t.comments,t.delimitersToGuess);c.successful?t.delimiter=c.bestDelimiter:(n=!0,t.delimiter=o.DefaultDelimiter),g.meta.delimiter=t.delimiter}var l=_(t);return t.preview&&t.header&&l.preview++,e=a,i=new f(l),g=i.parse(e,s,r),C(),u?{meta:{paused:!0}}:g||{meta:{paused:!1}}},this.paused=function(){return u},this.pause=function(){u=!0,i.abort(),e=x(t.chunk)?"":e.substring(i.getCharIndex())},this.resume=function(){l.streamer._halted?(u=!1,l.streamer.parseChunk(e,!0)):setTimeout(l.resume,3)},this.aborted=function(){return p},this.abort=function(){p=!0,i.abort(),g.meta.aborted=!0,x(t.complete)&&t.complete(g),e=""}}function b(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function f(t){var e,i=(t=t||{}).delimiter,n=t.newline,a=t.comments,s=t.step,r=t.preview,c=t.fastMode,l=e=void 0===t.quoteChar?'"':t.quoteChar;if(void 0!==t.escapeChar&&(l=t.escapeChar),("string"!=typeof i||-1<o.BAD_DELIMITERS.indexOf(i))&&(i=","),a===i)throw new Error("Comment character same as delimiter");!0===a?a="#":("string"!=typeof a||-1<o.BAD_DELIMITERS.indexOf(a))&&(a=!1),"\n"!==n&&"\r"!==n&&"\r\n"!==n&&(n="\n");var d=0,h=!1;this.parse=function(t,o,u){if("string"!=typeof t)throw new Error("Input must be a string");var p=t.length,f=i.length,m=n.length,g=a.length,v=x(s),_=[],y=[],C=[],O=d=0;if(!t)return E();if(c||!1!==c&&-1===t.indexOf(e)){for(var D=t.split(n),w=0;w<D.length;w++){if(d+=(C=D[w]).length,w!==D.length-1)d+=n.length;else if(u)return E();if(!a||C.substring(0,g)!==a){if(v){if(_=[],j(C.split(i)),F(),h)return E()}else j(C.split(i));if(r&&r<=w)return _=_.slice(0,r),E(!0)}}return E()}for(var M=t.indexOf(i,d),k=t.indexOf(n,d),S=new RegExp(b(l)+b(e),"g"),I=t.indexOf(e,d);;)if(t[d]!==e)if(a&&0===C.length&&t.substring(d,d+g)===a){if(-1===k)return E();k=t.indexOf(n,d=k+m),M=t.indexOf(i,d)}else{if(-1!==M&&(M<k||-1===k)){if(!(M<I)){C.push(t.substring(d,M)),M=t.indexOf(i,d=M+f);continue}var P=L(M,I,k);if(P&&void 0!==P.nextDelim){I=P.quoteSearch,C.push(t.substring(d,M=P.nextDelim)),M=t.indexOf(i,d=M+f);continue}}if(-1===k)break;if(C.push(t.substring(d,k)),T(k+m),v&&(F(),h))return E();if(r&&_.length>=r)return E(!0)}else for(I=d,d++;;){if(-1===(I=t.indexOf(e,I+1)))return u||y.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:_.length,index:d}),W();if(I===p-1)return W(t.substring(d,I).replace(S,e));if(e!==l||t[I+1]!==l){if(e===l||0===I||t[I-1]!==l){-1!==M&&M<I+1&&(M=t.indexOf(i,I+1)),-1!==k&&k<I+1&&(k=t.indexOf(n,I+1));var V=A(-1===k?M:Math.min(M,k));if(t[I+1+V]===i){C.push(t.substring(d,I).replace(S,e)),t[d=I+1+V+f]!==e&&(I=t.indexOf(e,d)),M=t.indexOf(i,d),k=t.indexOf(n,d);break}var R=A(k);if(t.substring(I+1+R,I+1+R+m)===n){if(C.push(t.substring(d,I).replace(S,e)),T(I+1+R+m),M=t.indexOf(i,d),I=t.indexOf(e,d),v&&(F(),h))return E();if(r&&_.length>=r)return E(!0);break}y.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:_.length,index:d}),I++}}else I++}return W();function j(t){_.push(t),O=d}function A(e){var i=0;if(-1!==e){var n=t.substring(I+1,e);n&&""===n.trim()&&(i=n.length)}return i}function W(e){return u||(void 0===e&&(e=t.substring(d)),C.push(e),d=p,j(C),v&&F()),E()}function T(e){d=e,j(C),C=[],k=t.indexOf(n,d)}function E(t){return{data:_,errors:y,meta:{delimiter:i,linebreak:n,aborted:h,truncated:!!t,cursor:O+(o||0)}}}function F(){s(E()),_=[],y=[]}function L(n,a,s){var o={nextDelim:void 0,quoteSearch:void 0},r=t.indexOf(e,a+1);if(a<n&&n<r&&(r<s||-1===s)){var c=t.indexOf(i,r);if(-1===c)return o;r<c&&(r=t.indexOf(e,r+1)),o=L(c,r,s)}else o={nextDelim:n,quoteSearch:a};return o}},this.abort=function(){h=!0},this.getCharIndex=function(){return d}}function m(t){var e=t.data,i=a[e.workerId],n=!1;if(e.error)i.userError(e.error,e.file);else if(e.results&&e.results.data){var s={abort:function(){n=!0,g(e.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:v,resume:v};if(x(i.userStep)){for(var o=0;o<e.results.data.length&&(i.userStep({data:e.results.data[o],errors:e.results.errors,meta:e.results.meta},s),!n);o++);delete e.results}else x(i.userChunk)&&(i.userChunk(e.results,s,e.file),delete e.results)}e.finished&&!n&&g(e.workerId,e.results)}function g(t,e){var i=a[t];x(i.userComplete)&&i.userComplete(e),i.terminate(),delete a[t]}function v(){throw new Error("Not implemented.")}function _(t){if("object"!=typeof t||null===t)return t;var e=Array.isArray(t)?[]:{};for(var i in t)e[i]=_(t[i]);return e}function y(t,e){return function(){t.apply(e,arguments)}}function x(t){return"function"==typeof t}return n&&(e.onmessage=function(t){var i=t.data;if(void 0===o.WORKER_ID&&i&&(o.WORKER_ID=i.workerId),"string"==typeof i.input)e.postMessage({workerId:o.WORKER_ID,results:o.parse(i.input,i.config),finished:!0});else if(e.File&&i.input instanceof File||i.input instanceof Object){var n=o.parse(i.input,i.config);n&&e.postMessage({workerId:o.WORKER_ID,results:n,finished:!0})}}),(l.prototype=Object.create(c.prototype)).constructor=l,(d.prototype=Object.create(c.prototype)).constructor=d,(h.prototype=Object.create(h.prototype)).constructor=h,(u.prototype=Object.create(c.prototype)).constructor=u,o})?n.apply(e,[]):n)||(t.exports=a)},PqYM:function(t,e,i){"use strict";i.d(e,"a",(function(){return r}));var n=i("HDdC"),a=i("D0XW"),s=i("Y7HM"),o=i("z+Ro");function r(t=0,e,i){let r=-1;return Object(s.a)(e)?r=Number(e)<1?1:Number(e):Object(o.a)(e)&&(i=e),Object(o.a)(i)||(i=a.a),new n.a(e=>{const n=Object(s.a)(t)?t:+t-i.now();return i.schedule(c,n,{index:0,period:r,subscriber:e})})}function c(t){const{index:e,period:i,subscriber:n}=t;if(n.next(e),!n.closed){if(-1===i)return n.complete();t.index=e+1,this.schedule(t,i)}}},QibW:function(t,e,i){"use strict";i.d(e,"a",(function(){return D})),i.d(e,"b",(function(){return _})),i.d(e,"c",(function(){return w}));var n=i("fXoL"),a=i("FKr1"),s=i("8LU1"),o=i("3Pt+"),r=i("R1ws"),c=i("u47x"),l=i("0EQZ");const d=["input"],h=function(){return{enterDuration:150}},u=["*"],p=new n.s("mat-radio-default-options",{providedIn:"root",factory:function(){return{color:"accent"}}});let b=0;const f={provide:o.s,useExisting:Object(n.X)(()=>_),multi:!0};class m{constructor(t,e){this.source=t,this.value=e}}const g=new n.s("MatRadioGroup");let v=(()=>{class t{constructor(t){this._changeDetector=t,this._value=null,this._name="mat-radio-group-"+b++,this._selected=null,this._isInitialized=!1,this._labelPosition="after",this._disabled=!1,this._required=!1,this._controlValueAccessorChangeFn=()=>{},this.onTouched=()=>{},this.change=new n.o}get name(){return this._name}set name(t){this._name=t,this._updateRadioButtonNames()}get labelPosition(){return this._labelPosition}set labelPosition(t){this._labelPosition="before"===t?"before":"after",this._markRadiosForCheck()}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,this._updateSelectedRadioFromValue(),this._checkSelectedRadioButton())}_checkSelectedRadioButton(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)}get selected(){return this._selected}set selected(t){this._selected=t,this.value=t?t.value:null,this._checkSelectedRadioButton()}get disabled(){return this._disabled}set disabled(t){this._disabled=Object(s.c)(t),this._markRadiosForCheck()}get required(){return this._required}set required(t){this._required=Object(s.c)(t),this._markRadiosForCheck()}ngAfterContentInit(){this._isInitialized=!0}_touch(){this.onTouched&&this.onTouched()}_updateRadioButtonNames(){this._radios&&this._radios.forEach(t=>{t.name=this.name,t._markForCheck()})}_updateSelectedRadioFromValue(){this._radios&&(null===this._selected||this._selected.value!==this._value)&&(this._selected=null,this._radios.forEach(t=>{t.checked=this.value===t.value,t.checked&&(this._selected=t)}))}_emitChangeEvent(){this._isInitialized&&this.change.emit(new m(this._selected,this._value))}_markRadiosForCheck(){this._radios&&this._radios.forEach(t=>t._markForCheck())}writeValue(t){this.value=t,this._changeDetector.markForCheck()}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t,this._changeDetector.markForCheck()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.h))},t.\u0275dir=n.Lb({type:t,inputs:{name:"name",labelPosition:"labelPosition",value:"value",selected:"selected",disabled:"disabled",required:"required",color:"color"},outputs:{change:"change"}}),t})(),_=(()=>{class t extends v{}return t.\u0275fac=function(e){return y(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["mat-radio-group"]],contentQueries:function(t,e,i){var a;1&t&&n.Jb(i,D,!0),2&t&&n.yc(a=n.ec())&&(e._radios=a)},hostAttrs:["role","radiogroup",1,"mat-radio-group"],exportAs:["matRadioGroup"],features:[n.Cb([f,{provide:g,useExisting:t}]),n.Ab]}),t})();const y=n.Yb(_);class x{constructor(t){this._elementRef=t}}const C=Object(a.B)(Object(a.F)(x));let O=(()=>{class t extends C{constructor(t,e,i,a,o,r,c,l){super(e),this._changeDetector=i,this._focusMonitor=a,this._radioDispatcher=o,this._animationMode=r,this._providerOverride=c,this._uniqueId="mat-radio-"+ ++b,this.id=this._uniqueId,this.change=new n.o,this._checked=!1,this._value=null,this._removeUniqueSelectionListener=()=>{},this.radioGroup=t,l&&(this.tabIndex=Object(s.f)(l,0)),this._removeUniqueSelectionListener=o.listen((t,e)=>{t!==this.id&&e===this.name&&(this.checked=!1)})}get checked(){return this._checked}set checked(t){const e=Object(s.c)(t);this._checked!==e&&(this._checked=e,e&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!e&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),e&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,null!==this.radioGroup&&(this.checked||(this.checked=this.radioGroup.value===t),this.checked&&(this.radioGroup.selected=this)))}get labelPosition(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"}set labelPosition(t){this._labelPosition=t}get disabled(){return this._disabled||null!==this.radioGroup&&this.radioGroup.disabled}set disabled(t){this._setDisabled(Object(s.c)(t))}get required(){return this._required||this.radioGroup&&this.radioGroup.required}set required(t){this._required=Object(s.c)(t)}get color(){return this._color||this.radioGroup&&this.radioGroup.color||this._providerOverride&&this._providerOverride.color||"accent"}set color(t){this._color=t}get inputId(){return(this.id||this._uniqueId)+"-input"}focus(t){this._focusMonitor.focusVia(this._inputElement,"keyboard",t)}_markForCheck(){this._changeDetector.markForCheck()}ngOnInit(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.name=this.radioGroup.name)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{!t&&this.radioGroup&&this.radioGroup._touch()})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()}_emitChangeEvent(){this.change.emit(new m(this,this._value))}_isRippleDisabled(){return this.disableRipple||this.disabled}_onInputClick(t){t.stopPropagation()}_onInputChange(t){t.stopPropagation();const e=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),e&&this.radioGroup._emitChangeEvent())}_setDisabled(t){this._disabled!==t&&(this._disabled=t,this._changeDetector.markForCheck())}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(v),n.Qb(n.l),n.Qb(n.h),n.Qb(c.h),n.Qb(l.d),n.Qb(String),n.Qb(void 0),n.Qb(String))},t.\u0275dir=n.Lb({type:t,viewQuery:function(t,e){var i;1&t&&n.Xc(d,!0),2&t&&n.yc(i=n.ec())&&(e._inputElement=i.first)},inputs:{id:"id",checked:"checked",value:"value",labelPosition:"labelPosition",disabled:"disabled",required:"required",color:"color",name:"name",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"]},outputs:{change:"change"},features:[n.Ab]}),t})(),D=(()=>{class t extends O{constructor(t,e,i,n,a,s,o,r){super(t,e,i,n,a,s,o,r)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g,8),n.Qb(n.l),n.Qb(n.h),n.Qb(c.h),n.Qb(l.d),n.Qb(r.a,8),n.Qb(p,8),n.bc("tabindex"))},t.\u0275cmp=n.Kb({type:t,selectors:[["mat-radio-button"]],hostAttrs:[1,"mat-radio-button"],hostVars:17,hostBindings:function(t,e){1&t&&n.dc("focus",(function(){return e._inputElement.nativeElement.focus()})),2&t&&(n.Eb("tabindex",-1)("id",e.id)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),n.Ib("mat-radio-checked",e.checked)("mat-radio-disabled",e.disabled)("_mat-animation-noopable","NoopAnimations"===e._animationMode)("mat-primary","primary"===e.color)("mat-accent","accent"===e.color)("mat-warn","warn"===e.color))},inputs:{disableRipple:"disableRipple",tabIndex:"tabIndex"},exportAs:["matRadioButton"],features:[n.Ab],ngContentSelectors:u,decls:13,vars:19,consts:[[1,"mat-radio-label"],["label",""],[1,"mat-radio-container"],[1,"mat-radio-outer-circle"],[1,"mat-radio-inner-circle"],["type","radio",1,"mat-radio-input","cdk-visually-hidden",3,"id","checked","disabled","tabIndex","required","change","click"],["input",""],["mat-ripple","",1,"mat-radio-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered","matRippleRadius","matRippleAnimation"],[1,"mat-ripple-element","mat-radio-persistent-ripple"],[1,"mat-radio-label-content"],[2,"display","none"]],template:function(t,e){if(1&t&&(n.nc(),n.Wb(0,"label",0,1),n.Wb(2,"div",2),n.Rb(3,"div",3),n.Rb(4,"div",4),n.Wb(5,"input",5,6),n.dc("change",(function(t){return e._onInputChange(t)}))("click",(function(t){return e._onInputClick(t)})),n.Vb(),n.Wb(7,"div",7),n.Rb(8,"div",8),n.Vb(),n.Vb(),n.Wb(9,"div",9),n.Wb(10,"span",10),n.Qc(11,"\xa0"),n.Vb(),n.mc(12),n.Vb(),n.Vb()),2&t){const t=n.zc(1);n.Eb("for",e.inputId),n.Db(5),n.oc("id",e.inputId)("checked",e.checked)("disabled",e.disabled)("tabIndex",e.tabIndex)("required",e.required),n.Eb("name",e.name)("value",e.value)("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby)("aria-describedby",e.ariaDescribedby),n.Db(2),n.oc("matRippleTrigger",t)("matRippleDisabled",e._isRippleDisabled())("matRippleCentered",!0)("matRippleRadius",20)("matRippleAnimation",n.uc(18,h)),n.Db(2),n.Ib("mat-radio-label-before","before"==e.labelPosition)}},directives:[a.u],styles:[".mat-radio-button{display:inline-block;-webkit-tap-highlight-color:transparent;outline:0}.mat-radio-label{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;display:inline-flex;align-items:center;white-space:nowrap;vertical-align:middle;width:100%}.mat-radio-container{box-sizing:border-box;display:inline-block;position:relative;width:20px;height:20px;flex-shrink:0}.mat-radio-outer-circle{box-sizing:border-box;height:20px;left:0;position:absolute;top:0;transition:border-color ease 280ms;width:20px;border-width:2px;border-style:solid;border-radius:50%}._mat-animation-noopable .mat-radio-outer-circle{transition:none}.mat-radio-inner-circle{border-radius:50%;box-sizing:border-box;height:20px;left:0;position:absolute;top:0;transition:transform ease 280ms,background-color ease 280ms;width:20px;transform:scale(0.001)}._mat-animation-noopable .mat-radio-inner-circle{transition:none}.mat-radio-checked .mat-radio-inner-circle{transform:scale(0.5)}.cdk-high-contrast-active .mat-radio-checked .mat-radio-inner-circle{border:solid 10px}.mat-radio-label-content{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto;display:inline-block;order:0;line-height:inherit;padding-left:8px;padding-right:0}[dir=rtl] .mat-radio-label-content{padding-right:8px;padding-left:0}.mat-radio-label-content.mat-radio-label-before{order:-1;padding-left:0;padding-right:8px}[dir=rtl] .mat-radio-label-content.mat-radio-label-before{padding-right:0;padding-left:8px}.mat-radio-disabled,.mat-radio-disabled .mat-radio-label{cursor:default}.mat-radio-button .mat-radio-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-radio-button .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple){opacity:.16}.mat-radio-persistent-ripple{width:100%;height:100%;transform:none}.mat-radio-container:hover .mat-radio-persistent-ripple{opacity:.04}.mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-persistent-ripple,.mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-persistent-ripple{opacity:.12}.mat-radio-persistent-ripple,.mat-radio-disabled .mat-radio-container:hover .mat-radio-persistent-ripple{opacity:0}@media(hover: none){.mat-radio-container:hover .mat-radio-persistent-ripple{display:none}}.mat-radio-input{bottom:0;left:50%}.cdk-high-contrast-active .mat-radio-disabled{opacity:.5}\n"],encapsulation:2,changeDetection:0}),t})(),w=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[a.v,a.k],a.k]}),t})()},Qu3c:function(t,e,i){"use strict";i.d(e,"a",(function(){return O})),i.d(e,"b",(function(){return D})),i.d(e,"c",(function(){return M})),i.d(e,"d",(function(){return w}));var n=i("rDax"),a=i("u47x"),s=i("ofXK"),o=i("fXoL"),r=i("FKr1"),c=i("vxfF"),l=i("8LU1"),d=i("FtGj"),h=i("0MNC"),u=i("nLfN"),p=i("+rOU"),b=i("XNiG"),f=i("1G5W"),m=i("IzEk"),g=i("R0Ic"),v=i("cH1L");const _={tooltipState:Object(g.n)("state",[Object(g.k)("initial, void, hidden",Object(g.l)({opacity:0,transform:"scale(0)"})),Object(g.k)("visible",Object(g.l)({transform:"scale(1)"})),Object(g.m)("* => visible",Object(g.e)("200ms cubic-bezier(0, 0, 0.2, 1)",Object(g.h)([Object(g.l)({opacity:0,transform:"scale(0)",offset:0}),Object(g.l)({opacity:.5,transform:"scale(0.99)",offset:.5}),Object(g.l)({opacity:1,transform:"scale(1)",offset:1})]))),Object(g.m)("* => hidden",Object(g.e)("100ms cubic-bezier(0, 0, 0.2, 1)",Object(g.l)({opacity:0})))])},y=Object(u.f)({passive:!0}),x=new o.s("mat-tooltip-scroll-strategy"),C={provide:x,deps:[n.c],useFactory:function(t){return()=>t.scrollStrategies.reposition({scrollThrottle:20})}},O=new o.s("mat-tooltip-default-options",{providedIn:"root",factory:function(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}});let D=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c,l,h){this._overlay=t,this._elementRef=e,this._scrollDispatcher=i,this._viewContainerRef=n,this._ngZone=a,this._platform=s,this._ariaDescriber=o,this._focusMonitor=r,this._dir=l,this._defaultOptions=h,this._position="below",this._disabled=!1,this._viewInitialized=!1,this._pointerExitEventsInitialized=!1,this.showDelay=this._defaultOptions.showDelay,this.hideDelay=this._defaultOptions.hideDelay,this.touchGestures="auto",this._message="",this._passiveListeners=[],this._destroyed=new b.a,this._handleKeydown=t=>{this._isTooltipVisible()&&t.keyCode===d.h&&!Object(d.v)(t)&&(t.preventDefault(),t.stopPropagation(),this._ngZone.run(()=>this.hide(0)))},this._scrollStrategy=c,h&&(h.position&&(this.position=h.position),h.touchGestures&&(this.touchGestures=h.touchGestures)),a.runOutsideAngular(()=>{e.nativeElement.addEventListener("keydown",this._handleKeydown)})}get position(){return this._position}set position(t){t!==this._position&&(this._position=t,this._overlayRef&&(this._updatePosition(),this._tooltipInstance&&this._tooltipInstance.show(0),this._overlayRef.updatePosition()))}get disabled(){return this._disabled}set disabled(t){this._disabled=Object(l.c)(t),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}get message(){return this._message}set message(t){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message),this._message=null!=t?String(t).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage(),this._ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this._ariaDescriber.describe(this._elementRef.nativeElement,this.message)})}))}get tooltipClass(){return this._tooltipClass}set tooltipClass(t){this._tooltipClass=t,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Object(f.a)(this._destroyed)).subscribe(t=>{t?"keyboard"===t&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0))})}ngOnDestroy(){const t=this._elementRef.nativeElement;clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),t.removeEventListener("keydown",this._handleKeydown),this._passiveListeners.forEach(([e,i])=>{t.removeEventListener(e,i,y)}),this._passiveListeners.length=0,this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(t,this.message),this._focusMonitor.stopMonitoring(t)}show(t=this.showDelay){if(this.disabled||!this.message||this._isTooltipVisible()&&!this._tooltipInstance._showTimeoutId&&!this._tooltipInstance._hideTimeoutId)return;const e=this._createOverlay();this._detach(),this._portal=this._portal||new p.d(w,this._viewContainerRef),this._tooltipInstance=e.attach(this._portal).instance,this._tooltipInstance.afterHidden().pipe(Object(f.a)(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),this._tooltipInstance.show(t)}hide(t=this.hideDelay){this._tooltipInstance&&this._tooltipInstance.hide(t)}toggle(){this._isTooltipVisible()?this.hide():this.show()}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(){if(this._overlayRef)return this._overlayRef;const t=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef),e=this._overlay.position().flexibleConnectedTo(this._elementRef).withTransformOriginOn(".mat-tooltip").withFlexibleDimensions(!1).withViewportMargin(8).withScrollableContainers(t);return e.positionChanges.pipe(Object(f.a)(this._destroyed)).subscribe(t=>{this._tooltipInstance&&t.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:e,panelClass:"mat-tooltip-panel",scrollStrategy:this._scrollStrategy()}),this._updatePosition(),this._overlayRef.detachments().pipe(Object(f.a)(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(){const t=this._overlayRef.getConfig().positionStrategy,e=this._getOrigin(),i=this._getOverlayPosition();t.withPositions([Object.assign(Object.assign({},e.main),i.main),Object.assign(Object.assign({},e.fallback),i.fallback)])}_getOrigin(){const t=!this._dir||"ltr"==this._dir.value,e=this.position;let i;"above"==e||"below"==e?i={originX:"center",originY:"above"==e?"top":"bottom"}:"before"==e||"left"==e&&t||"right"==e&&!t?i={originX:"start",originY:"center"}:("after"==e||"right"==e&&t||"left"==e&&!t)&&(i={originX:"end",originY:"center"});const{x:n,y:a}=this._invertPosition(i.originX,i.originY);return{main:i,fallback:{originX:n,originY:a}}}_getOverlayPosition(){const t=!this._dir||"ltr"==this._dir.value,e=this.position;let i;"above"==e?i={overlayX:"center",overlayY:"bottom"}:"below"==e?i={overlayX:"center",overlayY:"top"}:"before"==e||"left"==e&&t||"right"==e&&!t?i={overlayX:"end",overlayY:"center"}:("after"==e||"right"==e&&t||"left"==e&&!t)&&(i={overlayX:"start",overlayY:"center"});const{x:n,y:a}=this._invertPosition(i.overlayX,i.overlayY);return{main:i,fallback:{overlayX:n,overlayY:a}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),this._ngZone.onMicrotaskEmpty.pipe(Object(m.a)(1),Object(f.a)(this._destroyed)).subscribe(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()}))}_setTooltipClass(t){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=t,this._tooltipInstance._markForCheck())}_invertPosition(t,e){return"above"===this.position||"below"===this.position?"top"===e?e="bottom":"bottom"===e&&(e="top"):"end"===t?t="start":"start"===t&&(t="end"),{x:t,y:e}}_setupPointerEnterEventsIfNeeded(){!this._disabled&&this.message&&this._viewInitialized&&!this._passiveListeners.length&&(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",()=>{this._setupPointerExitEventsIfNeeded(),this.show()}]):"off"!==this.touchGestures&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",()=>{this._setupPointerExitEventsIfNeeded(),clearTimeout(this._touchstartTimeout),this._touchstartTimeout=setTimeout(()=>this.show(),500)}])),this._addListeners(this._passiveListeners))}_setupPointerExitEventsIfNeeded(){if(this._pointerExitEventsInitialized)return;this._pointerExitEventsInitialized=!0;const t=[];if(this._platformSupportsMouseEvents())t.push(["mouseleave",()=>this.hide()]);else if("off"!==this.touchGestures){this._disableNativeGesturesIfNecessary();const e=()=>{clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions.touchendHideDelay)};t.push(["touchend",e],["touchcancel",e])}this._addListeners(t),this._passiveListeners.push(...t)}_addListeners(t){t.forEach(([t,e])=>{this._elementRef.nativeElement.addEventListener(t,e,y)})}_platformSupportsMouseEvents(){return!this._platform.IOS&&!this._platform.ANDROID}_disableNativeGesturesIfNecessary(){const t=this.touchGestures;if("off"!==t){const e=this._elementRef.nativeElement,i=e.style;("on"===t||"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName)&&(i.userSelect=i.msUserSelect=i.webkitUserSelect=i.MozUserSelect="none"),"on"!==t&&e.draggable||(i.webkitUserDrag="none"),i.touchAction="none",i.webkitTapHighlightColor="transparent"}}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(n.c),o.Qb(o.l),o.Qb(c.f),o.Qb(o.T),o.Qb(o.C),o.Qb(u.a),o.Qb(a.c),o.Qb(a.h),o.Qb(x),o.Qb(v.c,8),o.Qb(O,8))},t.\u0275dir=o.Lb({type:t,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-tooltip-trigger"],inputs:{showDelay:["matTooltipShowDelay","showDelay"],hideDelay:["matTooltipHideDelay","hideDelay"],touchGestures:["matTooltipTouchGestures","touchGestures"],position:["matTooltipPosition","position"],disabled:["matTooltipDisabled","disabled"],message:["matTooltip","message"],tooltipClass:["matTooltipClass","tooltipClass"]},exportAs:["matTooltip"]}),t})(),w=(()=>{class t{constructor(t,e){this._changeDetectorRef=t,this._breakpointObserver=e,this._visibility="initial",this._closeOnInteraction=!1,this._onHide=new b.a,this._isHandset=this._breakpointObserver.observe(h.b.Handset)}show(t){this._hideTimeoutId&&(clearTimeout(this._hideTimeoutId),this._hideTimeoutId=null),this._closeOnInteraction=!0,this._showTimeoutId=setTimeout(()=>{this._visibility="visible",this._showTimeoutId=null,this._markForCheck()},t)}hide(t){this._showTimeoutId&&(clearTimeout(this._showTimeoutId),this._showTimeoutId=null),this._hideTimeoutId=setTimeout(()=>{this._visibility="hidden",this._hideTimeoutId=null,this._markForCheck()},t)}afterHidden(){return this._onHide}isVisible(){return"visible"===this._visibility}ngOnDestroy(){this._onHide.complete()}_animationStart(){this._closeOnInteraction=!1}_animationDone(t){const e=t.toState;"hidden"!==e||this.isVisible()||this._onHide.next(),"visible"!==e&&"hidden"!==e||(this._closeOnInteraction=!0)}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0)}_markForCheck(){this._changeDetectorRef.markForCheck()}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(o.h),o.Qb(h.a))},t.\u0275cmp=o.Kb({type:t,selectors:[["mat-tooltip-component"]],hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(t,e){1&t&&o.dc("click",(function(){return e._handleBodyInteraction()}),!1,o.Ac),2&t&&o.Lc("zoom","visible"===e._visibility?1:null)},decls:3,vars:7,consts:[[1,"mat-tooltip",3,"ngClass"]],template:function(t,e){var i;1&t&&(o.Wb(0,"div",0),o.dc("@state.start",(function(){return e._animationStart()}))("@state.done",(function(t){return e._animationDone(t)})),o.ic(1,"async"),o.Qc(2),o.Vb()),2&t&&(o.Ib("mat-tooltip-handset",null==(i=o.jc(1,5,e._isHandset))?null:i.matches),o.oc("ngClass",e.tooltipClass)("@state",e._visibility),o.Db(2),o.Rc(e.message))},directives:[s.q],pipes:[s.b],styles:[".mat-tooltip-panel{pointer-events:none !important}.mat-tooltip{color:#fff;border-radius:4px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis}.cdk-high-contrast-active .mat-tooltip{outline:solid 1px}.mat-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}\n"],encapsulation:2,data:{animation:[_.tooltipState]},changeDetection:0}),t})(),M=(()=>{class t{}return t.\u0275mod=o.Ob({type:t}),t.\u0275inj=o.Nb({factory:function(e){return new(e||t)},providers:[C],imports:[[a.a,s.c,n.f,r.k],r.k,c.c]}),t})()},R0Ic:function(t,e,i){"use strict";i.d(e,"a",(function(){return s})),i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return a})),i.d(e,"d",(function(){return g})),i.d(e,"e",(function(){return r})),i.d(e,"f",(function(){return b})),i.d(e,"g",(function(){return c})),i.d(e,"h",(function(){return u})),i.d(e,"i",(function(){return f})),i.d(e,"j",(function(){return l})),i.d(e,"k",(function(){return h})),i.d(e,"l",(function(){return d})),i.d(e,"m",(function(){return p})),i.d(e,"n",(function(){return o})),i.d(e,"o",(function(){return v})),i.d(e,"p",(function(){return _}));class n{}class a{}const s="*";function o(t,e){return{type:7,name:t,definitions:e,options:{}}}function r(t,e=null){return{type:4,styles:e,timings:t}}function c(t,e=null){return{type:3,steps:t,options:e}}function l(t,e=null){return{type:2,steps:t,options:e}}function d(t){return{type:6,styles:t,offset:null}}function h(t,e,i){return{type:0,name:t,styles:e,options:i}}function u(t){return{type:5,steps:t}}function p(t,e,i=null){return{type:1,expr:t,animation:e,options:i}}function b(t=null){return{type:9,options:t}}function f(t,e,i=null){return{type:11,selector:t,animation:e,options:i}}function m(t){Promise.resolve(null).then(t)}class g{constructor(t=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this.parentPlayer=null,this.totalTime=t+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){m(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){}setPosition(t){}getPosition(){return 0}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}class v{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let e=0,i=0,n=0;const a=this.players.length;0==a?m(()=>this._onFinish()):this.players.forEach(t=>{t.onDone(()=>{++e==a&&this._onFinish()}),t.onDestroy(()=>{++i==a&&this._onDestroy()}),t.onStart(()=>{++n==a&&this._onStart()})}),this.totalTime=this.players.reduce((t,e)=>Math.max(t,e.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){const e=t*this.totalTime;this.players.forEach(t=>{const i=t.totalTime?Math.min(1,e/t.totalTime):1;t.setPosition(i)})}getPosition(){let t=0;return this.players.forEach(e=>{const i=e.getPosition();t=Math.min(i,t)}),t}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}const _="!"},R1ws:function(t,e,i){"use strict";i.d(e,"a",(function(){return fe})),i.d(e,"b",(function(){return ge}));var n=i("fXoL"),a=i("jhN1"),s=i("R0Ic");function o(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function r(t){switch(t.length){case 0:return new s.d;case 1:return t[0];default:return new s.o(t)}}function c(t,e,i,n,a={},o={}){const r=[],c=[];let l=-1,d=null;if(n.forEach(t=>{const i=t.offset,n=i==l,h=n&&d||{};Object.keys(t).forEach(i=>{let n=i,c=t[i];if("offset"!==i)switch(n=e.normalizePropertyName(n,r),c){case s.p:c=a[i];break;case s.a:c=o[i];break;default:c=e.normalizeStyleValue(i,n,c,r)}h[n]=c}),n||c.push(h),d=h,l=i}),r.length){const t="\n - ";throw new Error(`Unable to animate due to the following errors:${t}${r.join(t)}`)}return c}function l(t,e,i,n){switch(e){case"start":t.onStart(()=>n(i&&d(i,"start",t)));break;case"done":t.onDone(()=>n(i&&d(i,"done",t)));break;case"destroy":t.onDestroy(()=>n(i&&d(i,"destroy",t)))}}function d(t,e,i){const n=i.totalTime,a=h(t.element,t.triggerName,t.fromState,t.toState,e||t.phaseName,null==n?t.totalTime:n,!!i.disabled),s=t._data;return null!=s&&(a._data=s),a}function h(t,e,i,n,a="",s=0,o){return{element:t,triggerName:e,fromState:i,toState:n,phaseName:a,totalTime:s,disabled:!!o}}function u(t,e,i){let n;return t instanceof Map?(n=t.get(e),n||t.set(e,n=i)):(n=t[e],n||(n=t[e]=i)),n}function p(t){const e=t.indexOf(":");return[t.substring(1,e),t.substr(e+1)]}let b=(t,e)=>!1,f=(t,e)=>!1,m=(t,e,i)=>[];const g=o();(g||"undefined"!=typeof Element)&&(b=(t,e)=>t.contains(e),f=(()=>{if(g||Element.prototype.matches)return(t,e)=>t.matches(e);{const t=Element.prototype,e=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector;return e?(t,i)=>e.apply(t,[i]):f}})(),m=(t,e,i)=>{let n=[];if(i)n.push(...t.querySelectorAll(e));else{const i=t.querySelector(e);i&&n.push(i)}return n});let v=null,_=!1;function y(t){v||(v=("undefined"!=typeof document?document.body:null)||{},_=!!v.style&&"WebkitAppearance"in v.style);let e=!0;return v.style&&!function(t){return"ebkit"==t.substring(1,6)}(t)&&(e=t in v.style,!e&&_)&&(e="Webkit"+t.charAt(0).toUpperCase()+t.substr(1)in v.style),e}const x=f,C=b,O=m;function D(t){const e={};return Object.keys(t).forEach(i=>{const n=i.replace(/([a-z])([A-Z])/g,"$1-$2");e[n]=t[i]}),e}let w=(()=>{class t{validateStyleProperty(t){return y(t)}matchesElement(t,e){return x(t,e)}containsElement(t,e){return C(t,e)}query(t,e,i){return O(t,e,i)}computeStyle(t,e,i){return i||""}animate(t,e,i,n,a,o=[],r){return new s.d(i,n)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})(),M=(()=>{class t{}return t.NOOP=new w,t})();function k(t){if("number"==typeof t)return t;const e=t.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:S(parseFloat(e[1]),e[2])}function S(t,e){switch(e){case"s":return 1e3*t;default:return t}}function I(t,e,i){return t.hasOwnProperty("duration")?t:function(t,e,i){let n,a=0,s="";if("string"==typeof t){const i=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===i)return e.push(`The provided timing value "${t}" is invalid.`),{duration:0,delay:0,easing:""};n=S(parseFloat(i[1]),i[2]);const o=i[3];null!=o&&(a=S(parseFloat(o),i[4]));const r=i[5];r&&(s=r)}else n=t;if(!i){let i=!1,s=e.length;n<0&&(e.push("Duration values below 0 are not allowed for this animation step."),i=!0),a<0&&(e.push("Delay values below 0 are not allowed for this animation step."),i=!0),i&&e.splice(s,0,`The provided timing value "${t}" is invalid.`)}return{duration:n,delay:a,easing:s}}(t,e,i)}function P(t,e={}){return Object.keys(t).forEach(i=>{e[i]=t[i]}),e}function V(t,e,i={}){if(e)for(let n in t)i[n]=t[n];else P(t,i);return i}function R(t,e,i){return i?e+":"+i+";":""}function j(t){let e="";for(let i=0;i<t.style.length;i++){const n=t.style.item(i);e+=R(0,n,t.style.getPropertyValue(n))}for(const i in t.style)t.style.hasOwnProperty(i)&&!i.startsWith("_")&&(e+=R(0,i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),t.style[i]));t.setAttribute("style",e)}function A(t,e,i){t.style&&(Object.keys(e).forEach(n=>{const a=z(n);i&&!i.hasOwnProperty(n)&&(i[n]=t.style[a]),t.style[a]=e[n]}),o()&&j(t))}function W(t,e){t.style&&(Object.keys(e).forEach(e=>{const i=z(e);t.style[i]=""}),o()&&j(t))}function T(t){return Array.isArray(t)?1==t.length?t[0]:Object(s.j)(t):t}const E=new RegExp("{{\\s*(.+?)\\s*}}","g");function F(t){let e=[];if("string"==typeof t){let i;for(;i=E.exec(t);)e.push(i[1]);E.lastIndex=0}return e}function L(t,e,i){const n=t.toString(),a=n.replace(E,(t,n)=>{let a=e[n];return e.hasOwnProperty(n)||(i.push("Please provide a value for the animation param "+n),a=""),a.toString()});return a==n?t:a}function Q(t){const e=[];let i=t.next();for(;!i.done;)e.push(i.value),i=t.next();return e}const N=/-+([a-z0-9])/g;function z(t){return t.replace(N,(...t)=>t[1].toUpperCase())}function B(t,e){return 0===t||0===e}function U(t,e,i){const n=Object.keys(i);if(n.length&&e.length){let s=e[0],o=[];if(n.forEach(t=>{s.hasOwnProperty(t)||o.push(t),s[t]=i[t]}),o.length)for(var a=1;a<e.length;a++){let i=e[a];o.forEach((function(e){i[e]=H(t,e)}))}}return e}function $(t,e,i){switch(e.type){case 7:return t.visitTrigger(e,i);case 0:return t.visitState(e,i);case 1:return t.visitTransition(e,i);case 2:return t.visitSequence(e,i);case 3:return t.visitGroup(e,i);case 4:return t.visitAnimate(e,i);case 5:return t.visitKeyframes(e,i);case 6:return t.visitStyle(e,i);case 8:return t.visitReference(e,i);case 9:return t.visitAnimateChild(e,i);case 10:return t.visitAnimateRef(e,i);case 11:return t.visitQuery(e,i);case 12:return t.visitStagger(e,i);default:throw new Error("Unable to resolve animation metadata node #"+e.type)}}function H(t,e){return window.getComputedStyle(t)[e]}function G(t,e){const i=[];return"string"==typeof t?t.split(/\s*,\s*/).forEach(t=>function(t,e,i){if(":"==t[0]){const n=function(t,e){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,e)=>parseFloat(e)>parseFloat(t);case":decrement":return(t,e)=>parseFloat(e)<parseFloat(t);default:return e.push(`The transition alias value "${t}" is not supported`),"* => *"}}(t,i);if("function"==typeof n)return void e.push(n);t=n}const n=t.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==n||n.length<4)return i.push(`The provided transition expression "${t}" is not supported`),e;const a=n[1],s=n[2],o=n[3];e.push(K(a,o)),"<"!=s[0]||"*"==a&&"*"==o||e.push(K(o,a))}(t,i,e)):i.push(t),i}const X=new Set(["true","1"]),q=new Set(["false","0"]);function K(t,e){const i=X.has(t)||q.has(t),n=X.has(e)||q.has(e);return(a,s)=>{let o="*"==t||t==a,r="*"==e||e==s;return!o&&i&&"boolean"==typeof a&&(o=a?X.has(t):q.has(t)),!r&&n&&"boolean"==typeof s&&(r=s?X.has(e):q.has(e)),o&&r}}const Y=new RegExp("s*:selfs*,?","g");function J(t,e,i){return new Z(t).build(e,i)}class Z{constructor(t){this._driver=t}build(t,e){const i=new tt(e);return this._resetContextStyleTimingState(i),$(this,T(t),i)}_resetContextStyleTimingState(t){t.currentQuerySelector="",t.collectedStyles={},t.collectedStyles[""]={},t.currentTime=0}visitTrigger(t,e){let i=e.queryCount=0,n=e.depCount=0;const a=[],s=[];return"@"==t.name.charAt(0)&&e.errors.push("animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"),t.definitions.forEach(t=>{if(this._resetContextStyleTimingState(e),0==t.type){const i=t,n=i.name;n.toString().split(/\s*,\s*/).forEach(t=>{i.name=t,a.push(this.visitState(i,e))}),i.name=n}else if(1==t.type){const a=this.visitTransition(t,e);i+=a.queryCount,n+=a.depCount,s.push(a)}else e.errors.push("only state() and transition() definitions can sit inside of a trigger()")}),{type:7,name:t.name,states:a,transitions:s,queryCount:i,depCount:n,options:null}}visitState(t,e){const i=this.visitStyle(t.styles,e),n=t.options&&t.options.params||null;if(i.containsDynamicStyles){const a=new Set,s=n||{};if(i.styles.forEach(t=>{if(et(t)){const e=t;Object.keys(e).forEach(t=>{F(e[t]).forEach(t=>{s.hasOwnProperty(t)||a.add(t)})})}}),a.size){const i=Q(a.values());e.errors.push(`state("${t.name}", ...) must define default values for all the following style substitutions: ${i.join(", ")}`)}}return{type:0,name:t.name,style:i,options:n?{params:n}:null}}visitTransition(t,e){e.queryCount=0,e.depCount=0;const i=$(this,T(t.animation),e);return{type:1,matchers:G(t.expr,e.errors),animation:i,queryCount:e.queryCount,depCount:e.depCount,options:it(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(t=>$(this,t,e)),options:it(t.options)}}visitGroup(t,e){const i=e.currentTime;let n=0;const a=t.steps.map(t=>{e.currentTime=i;const a=$(this,t,e);return n=Math.max(n,e.currentTime),a});return e.currentTime=n,{type:3,steps:a,options:it(t.options)}}visitAnimate(t,e){const i=function(t,e){let i=null;if(t.hasOwnProperty("duration"))i=t;else if("number"==typeof t)return nt(I(t,e).duration,0,"");const n=t;if(n.split(/\s+/).some(t=>"{"==t.charAt(0)&&"{"==t.charAt(1))){const t=nt(0,0,"");return t.dynamic=!0,t.strValue=n,t}return i=i||I(n,e),nt(i.duration,i.delay,i.easing)}(t.timings,e.errors);let n;e.currentAnimateTimings=i;let a=t.styles?t.styles:Object(s.l)({});if(5==a.type)n=this.visitKeyframes(a,e);else{let a=t.styles,o=!1;if(!a){o=!0;const t={};i.easing&&(t.easing=i.easing),a=Object(s.l)(t)}e.currentTime+=i.duration+i.delay;const r=this.visitStyle(a,e);r.isEmptyStep=o,n=r}return e.currentAnimateTimings=null,{type:4,timings:i,style:n,options:null}}visitStyle(t,e){const i=this._makeStyleAst(t,e);return this._validateStyleAst(i,e),i}_makeStyleAst(t,e){const i=[];Array.isArray(t.styles)?t.styles.forEach(t=>{"string"==typeof t?t==s.a?i.push(t):e.errors.push(`The provided style string value ${t} is not allowed.`):i.push(t)}):i.push(t.styles);let n=!1,a=null;return i.forEach(t=>{if(et(t)){const e=t,i=e.easing;if(i&&(a=i,delete e.easing),!n)for(let t in e)if(e[t].toString().indexOf("{{")>=0){n=!0;break}}}),{type:6,styles:i,easing:a,offset:t.offset,containsDynamicStyles:n,options:null}}_validateStyleAst(t,e){const i=e.currentAnimateTimings;let n=e.currentTime,a=e.currentTime;i&&a>0&&(a-=i.duration+i.delay),t.styles.forEach(t=>{"string"!=typeof t&&Object.keys(t).forEach(i=>{if(!this._driver.validateStyleProperty(i))return void e.errors.push(`The provided animation property "${i}" is not a supported CSS property for animations`);const s=e.collectedStyles[e.currentQuerySelector],o=s[i];let r=!0;o&&(a!=n&&a>=o.startTime&&n<=o.endTime&&(e.errors.push(`The CSS property "${i}" that exists between the times of "${o.startTime}ms" and "${o.endTime}ms" is also being animated in a parallel animation between the times of "${a}ms" and "${n}ms"`),r=!1),a=o.startTime),r&&(s[i]={startTime:a,endTime:n}),e.options&&function(t,e,i){const n=e.params||{},a=F(t);a.length&&a.forEach(t=>{n.hasOwnProperty(t)||i.push(`Unable to resolve the local animation param ${t} in the given list of values`)})}(t[i],e.options,e.errors)})})}visitKeyframes(t,e){const i={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push("keyframes() must be placed inside of a call to animate()"),i;let n=0;const a=[];let s=!1,o=!1,r=0;const c=t.steps.map(t=>{const i=this._makeStyleAst(t,e);let c=null!=i.offset?i.offset:function(t){if("string"==typeof t)return null;let e=null;if(Array.isArray(t))t.forEach(t=>{if(et(t)&&t.hasOwnProperty("offset")){const i=t;e=parseFloat(i.offset),delete i.offset}});else if(et(t)&&t.hasOwnProperty("offset")){const i=t;e=parseFloat(i.offset),delete i.offset}return e}(i.styles),l=0;return null!=c&&(n++,l=i.offset=c),o=o||l<0||l>1,s=s||l<r,r=l,a.push(l),i});o&&e.errors.push("Please ensure that all keyframe offsets are between 0 and 1"),s&&e.errors.push("Please ensure that all keyframe offsets are in order");const l=t.steps.length;let d=0;n>0&&n<l?e.errors.push("Not all style() steps within the declared keyframes() contain offsets"):0==n&&(d=1/(l-1));const h=l-1,u=e.currentTime,p=e.currentAnimateTimings,b=p.duration;return c.forEach((t,n)=>{const s=d>0?n==h?1:d*n:a[n],o=s*b;e.currentTime=u+p.delay+o,p.duration=o,this._validateStyleAst(t,e),t.offset=s,i.styles.push(t)}),i}visitReference(t,e){return{type:8,animation:$(this,T(t.animation),e),options:it(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:it(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:it(t.options)}}visitQuery(t,e){const i=e.currentQuerySelector,n=t.options||{};e.queryCount++,e.currentQuery=t;const[a,s]=function(t){const e=!!t.split(/\s*,\s*/).find(t=>":self"==t);return e&&(t=t.replace(Y,"")),[t=t.replace(/@\*/g,".ng-trigger").replace(/@\w+/g,t=>".ng-trigger-"+t.substr(1)).replace(/:animating/g,".ng-animating"),e]}(t.selector);e.currentQuerySelector=i.length?i+" "+a:a,u(e.collectedStyles,e.currentQuerySelector,{});const o=$(this,T(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=i,{type:11,selector:a,limit:n.limit||0,optional:!!n.optional,includeSelf:s,animation:o,originalSelector:t.selector,options:it(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push("stagger() can only be used inside of query()");const i="full"===t.timings?{duration:0,delay:0,easing:"full"}:I(t.timings,e.errors,!0);return{type:12,animation:$(this,T(t.animation),e),timings:i,options:null}}}class tt{constructor(t){this.errors=t,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}}function et(t){return!Array.isArray(t)&&"object"==typeof t}function it(t){var e;return t?(t=P(t)).params&&(t.params=(e=t.params)?P(e):null):t={},t}function nt(t,e,i){return{duration:t,delay:e,easing:i}}function at(t,e,i,n,a,s,o=null,r=!1){return{type:1,element:t,keyframes:e,preStyleProps:i,postStyleProps:n,duration:a,delay:s,totalTime:a+s,easing:o,subTimeline:r}}class st{constructor(){this._map=new Map}consume(t){let e=this._map.get(t);return e?this._map.delete(t):e=[],e}append(t,e){let i=this._map.get(t);i||this._map.set(t,i=[]),i.push(...e)}has(t){return this._map.has(t)}clear(){this._map.clear()}}const ot=new RegExp(":enter","g"),rt=new RegExp(":leave","g");function ct(t,e,i,n,a,s={},o={},r,c,l=[]){return(new lt).buildKeyframes(t,e,i,n,a,s,o,r,c,l)}class lt{buildKeyframes(t,e,i,n,a,s,o,r,c,l=[]){c=c||new st;const d=new ht(t,e,c,n,a,l,[]);d.options=r,d.currentTimeline.setStyles([s],null,d.errors,r),$(this,i,d);const h=d.timelines.filter(t=>t.containsAnimation());if(h.length&&Object.keys(o).length){const t=h[h.length-1];t.allowOnlyTimelineStyles()||t.setStyles([o],null,d.errors,r)}return h.length?h.map(t=>t.buildKeyframes()):[at(e,[],[],[],0,0,"",!1)]}visitTrigger(t,e){}visitState(t,e){}visitTransition(t,e){}visitAnimateChild(t,e){const i=e.subInstructions.consume(e.element);if(i){const n=e.createSubContext(t.options),a=e.currentTimeline.currentTime,s=this._visitSubInstructions(i,n,n.options);a!=s&&e.transformIntoNewTimeline(s)}e.previousNode=t}visitAnimateRef(t,e){const i=e.createSubContext(t.options);i.transformIntoNewTimeline(),this.visitReference(t.animation,i),e.transformIntoNewTimeline(i.currentTimeline.currentTime),e.previousNode=t}_visitSubInstructions(t,e,i){let n=e.currentTimeline.currentTime;const a=null!=i.duration?k(i.duration):null,s=null!=i.delay?k(i.delay):null;return 0!==a&&t.forEach(t=>{const i=e.appendInstructionToTimeline(t,a,s);n=Math.max(n,i.duration+i.delay)}),n}visitReference(t,e){e.updateOptions(t.options,!0),$(this,t.animation,e),e.previousNode=t}visitSequence(t,e){const i=e.subContextCount;let n=e;const a=t.options;if(a&&(a.params||a.delay)&&(n=e.createSubContext(a),n.transformIntoNewTimeline(),null!=a.delay)){6==n.previousNode.type&&(n.currentTimeline.snapshotCurrentStyles(),n.previousNode=dt);const t=k(a.delay);n.delayNextStep(t)}t.steps.length&&(t.steps.forEach(t=>$(this,t,n)),n.currentTimeline.applyStylesToKeyframe(),n.subContextCount>i&&n.transformIntoNewTimeline()),e.previousNode=t}visitGroup(t,e){const i=[];let n=e.currentTimeline.currentTime;const a=t.options&&t.options.delay?k(t.options.delay):0;t.steps.forEach(s=>{const o=e.createSubContext(t.options);a&&o.delayNextStep(a),$(this,s,o),n=Math.max(n,o.currentTimeline.currentTime),i.push(o.currentTimeline)}),i.forEach(t=>e.currentTimeline.mergeTimelineCollectedStyles(t)),e.transformIntoNewTimeline(n),e.previousNode=t}_visitTiming(t,e){if(t.dynamic){const i=t.strValue;return I(e.params?L(i,e.params,e.errors):i,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,e){const i=e.currentAnimateTimings=this._visitTiming(t.timings,e),n=e.currentTimeline;i.delay&&(e.incrementTime(i.delay),n.snapshotCurrentStyles());const a=t.style;5==a.type?this.visitKeyframes(a,e):(e.incrementTime(i.duration),this.visitStyle(a,e),n.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}visitStyle(t,e){const i=e.currentTimeline,n=e.currentAnimateTimings;!n&&i.getCurrentStyleProperties().length&&i.forwardFrame();const a=n&&n.easing||t.easing;t.isEmptyStep?i.applyEmptyStep(a):i.setStyles(t.styles,a,e.errors,e.options),e.previousNode=t}visitKeyframes(t,e){const i=e.currentAnimateTimings,n=e.currentTimeline.duration,a=i.duration,s=e.createSubContext().currentTimeline;s.easing=i.easing,t.styles.forEach(t=>{s.forwardTime((t.offset||0)*a),s.setStyles(t.styles,t.easing,e.errors,e.options),s.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(s),e.transformIntoNewTimeline(n+a),e.previousNode=t}visitQuery(t,e){const i=e.currentTimeline.currentTime,n=t.options||{},a=n.delay?k(n.delay):0;a&&(6===e.previousNode.type||0==i&&e.currentTimeline.getCurrentStyleProperties().length)&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=dt);let s=i;const o=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!n.optional,e.errors);e.currentQueryTotal=o.length;let r=null;o.forEach((i,n)=>{e.currentQueryIndex=n;const o=e.createSubContext(t.options,i);a&&o.delayNextStep(a),i===e.element&&(r=o.currentTimeline),$(this,t.animation,o),o.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,o.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),r&&(e.currentTimeline.mergeTimelineCollectedStyles(r),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}visitStagger(t,e){const i=e.parentContext,n=e.currentTimeline,a=t.timings,s=Math.abs(a.duration),o=s*(e.currentQueryTotal-1);let r=s*e.currentQueryIndex;switch(a.duration<0?"reverse":a.easing){case"reverse":r=o-r;break;case"full":r=i.currentStaggerTime}const c=e.currentTimeline;r&&c.delayNextStep(r);const l=c.currentTime;$(this,t.animation,e),e.previousNode=t,i.currentStaggerTime=n.currentTime-l+(n.startTime-i.currentTimeline.startTime)}}const dt={};class ht{constructor(t,e,i,n,a,s,o,r){this._driver=t,this.element=e,this.subInstructions=i,this._enterClassName=n,this._leaveClassName=a,this.errors=s,this.timelines=o,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=dt,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=r||new ut(this._driver,e,0),o.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,e){if(!t)return;const i=t;let n=this.options;null!=i.duration&&(n.duration=k(i.duration)),null!=i.delay&&(n.delay=k(i.delay));const a=i.params;if(a){let t=n.params;t||(t=this.options.params={}),Object.keys(a).forEach(i=>{e&&t.hasOwnProperty(i)||(t[i]=L(a[i],t,this.errors))})}}_copyOptions(){const t={};if(this.options){const e=this.options.params;if(e){const i=t.params={};Object.keys(e).forEach(t=>{i[t]=e[t]})}}return t}createSubContext(t=null,e,i){const n=e||this.element,a=new ht(this._driver,n,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(n,i||0));return a.previousNode=this.previousNode,a.currentAnimateTimings=this.currentAnimateTimings,a.options=this._copyOptions(),a.updateOptions(t),a.currentQueryIndex=this.currentQueryIndex,a.currentQueryTotal=this.currentQueryTotal,a.parentContext=this,this.subContextCount++,a}transformIntoNewTimeline(t){return this.previousNode=dt,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,e,i){const n={duration:null!=e?e:t.duration,delay:this.currentTimeline.currentTime+(null!=i?i:0)+t.delay,easing:""},a=new pt(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,n,t.stretchStartingKeyframe);return this.timelines.push(a),n}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,e,i,n,a,s){let o=[];if(n&&o.push(this.element),t.length>0){t=(t=t.replace(ot,"."+this._enterClassName)).replace(rt,"."+this._leaveClassName);let e=this._driver.query(this.element,t,1!=i);0!==i&&(e=i<0?e.slice(e.length+i,e.length):e.slice(0,i)),o.push(...e)}return a||0!=o.length||s.push(`\`query("${e}")\` returned zero elements. (Use \`query("${e}", { optional: true })\` if you wish to allow this.)`),o}}class ut{constructor(t,e,i,n){this._driver=t,this.element=e,this.startTime=i,this._elementTimelineStylesLookup=n,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(t){const e=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,e){return this.applyStylesToKeyframe(),new ut(this._driver,t,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(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,e){this._localTimelineStyles[t]=e,this._globalTimelineStyles[t]=e,this._styleSummary[t]={time:this.currentTime,value:e}}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&(this._previousKeyframe.easing=t),Object.keys(this._globalTimelineStyles).forEach(t=>{this._backFill[t]=this._globalTimelineStyles[t]||s.a,this._currentKeyframe[t]=s.a}),this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,i,n){e&&(this._previousKeyframe.easing=e);const a=n&&n.params||{},o=function(t,e){const i={};let n;return t.forEach(t=>{"*"===t?(n=n||Object.keys(e),n.forEach(t=>{i[t]=s.a})):V(t,!1,i)}),i}(t,this._globalTimelineStyles);Object.keys(o).forEach(t=>{const e=L(o[t],a,i);this._pendingStyles[t]=e,this._localTimelineStyles.hasOwnProperty(t)||(this._backFill[t]=this._globalTimelineStyles.hasOwnProperty(t)?this._globalTimelineStyles[t]:s.a),this._updateStyle(t,e)})}applyStylesToKeyframe(){const t=this._pendingStyles,e=Object.keys(t);0!=e.length&&(this._pendingStyles={},e.forEach(e=>{this._currentKeyframe[e]=t[e]}),Object.keys(this._localTimelineStyles).forEach(t=>{this._currentKeyframe.hasOwnProperty(t)||(this._currentKeyframe[t]=this._localTimelineStyles[t])}))}snapshotCurrentStyles(){Object.keys(this._localTimelineStyles).forEach(t=>{const e=this._localTimelineStyles[t];this._pendingStyles[t]=e,this._updateStyle(t,e)})}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const t=[];for(let e in this._currentKeyframe)t.push(e);return t}mergeTimelineCollectedStyles(t){Object.keys(t._styleSummary).forEach(e=>{const i=this._styleSummary[e],n=t._styleSummary[e];(!i||n.time>i.time)&&this._updateStyle(e,n.value)})}buildKeyframes(){this.applyStylesToKeyframe();const t=new Set,e=new Set,i=1===this._keyframes.size&&0===this.duration;let n=[];this._keyframes.forEach((a,o)=>{const r=V(a,!0);Object.keys(r).forEach(i=>{const n=r[i];n==s.p?t.add(i):n==s.a&&e.add(i)}),i||(r.offset=o/this.duration),n.push(r)});const a=t.size?Q(t.values()):[],o=e.size?Q(e.values()):[];if(i){const t=n[0],e=P(t);t.offset=0,e.offset=1,n=[t,e]}return at(this.element,n,a,o,this.duration,this.startTime,this.easing,!1)}}class pt extends ut{constructor(t,e,i,n,a,s,o=!1){super(t,e,s.delay),this.element=e,this.keyframes=i,this.preStyleProps=n,this.postStyleProps=a,this._stretchStartingKeyframe=o,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:e,duration:i,easing:n}=this.timings;if(this._stretchStartingKeyframe&&e){const a=[],s=i+e,o=e/s,r=V(t[0],!1);r.offset=0,a.push(r);const c=V(t[0],!1);c.offset=bt(o),a.push(c);const l=t.length-1;for(let n=1;n<=l;n++){let o=V(t[n],!1);o.offset=bt((e+o.offset*i)/s),a.push(o)}i=s,e=0,n="",t=a}return at(this.element,t,this.preStyleProps,this.postStyleProps,i,e,n,!0)}}function bt(t,e=3){const i=Math.pow(10,e-1);return Math.round(t*i)/i}class ft{}class mt extends ft{normalizePropertyName(t,e){return z(t)}normalizeStyleValue(t,e,i,n){let a="";const s=i.toString().trim();if(gt[e]&&0!==i&&"0"!==i)if("number"==typeof i)a="px";else{const e=i.match(/^[+-]?[\d\.]+([a-z]*)$/);e&&0==e[1].length&&n.push(`Please provide a CSS unit value for ${t}:${i}`)}return s+a}}const gt=(()=>function(t){const e={};return t.forEach(t=>e[t]=!0),e}("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 vt(t,e,i,n,a,s,o,r,c,l,d,h,u){return{type:0,element:t,triggerName:e,isRemovalTransition:a,fromState:i,fromStyles:s,toState:n,toStyles:o,timelines:r,queriedElements:c,preStyleProps:l,postStyleProps:d,totalTime:h,errors:u}}const _t={};class yt{constructor(t,e,i){this._triggerName=t,this.ast=e,this._stateStyles=i}match(t,e,i,n){return function(t,e,i,n,a){return t.some(t=>t(e,i,n,a))}(this.ast.matchers,t,e,i,n)}buildStyles(t,e,i){const n=this._stateStyles["*"],a=this._stateStyles[t],s=n?n.buildStyles(e,i):{};return a?a.buildStyles(e,i):s}build(t,e,i,n,a,s,o,r,c,l){const d=[],h=this.ast.options&&this.ast.options.params||_t,p=this.buildStyles(i,o&&o.params||_t,d),b=r&&r.params||_t,f=this.buildStyles(n,b,d),m=new Set,g=new Map,v=new Map,_="void"===n,y={params:Object.assign(Object.assign({},h),b)},x=l?[]:ct(t,e,this.ast.animation,a,s,p,f,y,c,d);let C=0;if(x.forEach(t=>{C=Math.max(t.duration+t.delay,C)}),d.length)return vt(e,this._triggerName,i,n,_,p,f,[],[],g,v,C,d);x.forEach(t=>{const i=t.element,n=u(g,i,{});t.preStyleProps.forEach(t=>n[t]=!0);const a=u(v,i,{});t.postStyleProps.forEach(t=>a[t]=!0),i!==e&&m.add(i)});const O=Q(m.values());return vt(e,this._triggerName,i,n,_,p,f,x,O,g,v,C)}}class xt{constructor(t,e){this.styles=t,this.defaultParams=e}buildStyles(t,e){const i={},n=P(this.defaultParams);return Object.keys(t).forEach(e=>{const i=t[e];null!=i&&(n[e]=i)}),this.styles.styles.forEach(t=>{if("string"!=typeof t){const a=t;Object.keys(a).forEach(t=>{let s=a[t];s.length>1&&(s=L(s,n,e)),i[t]=s})}}),i}}class Ct{constructor(t,e){this.name=t,this.ast=e,this.transitionFactories=[],this.states={},e.states.forEach(t=>{this.states[t.name]=new xt(t.style,t.options&&t.options.params||{})}),Ot(this.states,"true","1"),Ot(this.states,"false","0"),e.transitions.forEach(e=>{this.transitionFactories.push(new yt(t,e,this.states))}),this.fallbackTransition=new yt(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[(t,e)=>!0],options:null,queryCount:0,depCount:0},this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,e,i,n){return this.transitionFactories.find(a=>a.match(t,e,i,n))||null}matchStyles(t,e,i){return this.fallbackTransition.buildStyles(t,e,i)}}function Ot(t,e,i){t.hasOwnProperty(e)?t.hasOwnProperty(i)||(t[i]=t[e]):t.hasOwnProperty(i)&&(t[e]=t[i])}const Dt=new st;class wt{constructor(t,e,i){this.bodyNode=t,this._driver=e,this._normalizer=i,this._animations={},this._playersById={},this.players=[]}register(t,e){const i=[],n=J(this._driver,e,i);if(i.length)throw new Error("Unable to build the animation due to the following errors: "+i.join("\n"));this._animations[t]=n}_buildPlayer(t,e,i){const n=t.element,a=c(0,this._normalizer,0,t.keyframes,e,i);return this._driver.animate(n,a,t.duration,t.delay,t.easing,[],!0)}create(t,e,i={}){const n=[],a=this._animations[t];let o;const c=new Map;if(a?(o=ct(this._driver,e,a,"ng-enter","ng-leave",{},{},i,Dt,n),o.forEach(t=>{const e=u(c,t.element,{});t.postStyleProps.forEach(t=>e[t]=null)})):(n.push("The requested animation doesn't exist or has already been destroyed"),o=[]),n.length)throw new Error("Unable to create the animation due to the following errors: "+n.join("\n"));c.forEach((t,e)=>{Object.keys(t).forEach(i=>{t[i]=this._driver.computeStyle(e,i,s.a)})});const l=r(o.map(t=>{const e=c.get(t.element);return this._buildPlayer(t,{},e)}));return this._playersById[t]=l,l.onDestroy(()=>this.destroy(t)),this.players.push(l),l}destroy(t){const e=this._getPlayer(t);e.destroy(),delete this._playersById[t];const i=this.players.indexOf(e);i>=0&&this.players.splice(i,1)}_getPlayer(t){const e=this._playersById[t];if(!e)throw new Error("Unable to find the timeline player referenced by "+t);return e}listen(t,e,i,n){const a=h(e,"","","");return l(this._getPlayer(t),i,a,n),()=>{}}command(t,e,i,n){if("register"==i)return void this.register(t,n[0]);if("create"==i)return void this.create(t,e,n[0]||{});const a=this._getPlayer(t);switch(i){case"play":a.play();break;case"pause":a.pause();break;case"reset":a.reset();break;case"restart":a.restart();break;case"finish":a.finish();break;case"init":a.init();break;case"setPosition":a.setPosition(parseFloat(n[0]));break;case"destroy":this.destroy(t)}}}const Mt=[],kt={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},St={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0};class It{constructor(t,e=""){this.namespaceId=e;const i=t&&t.hasOwnProperty("value");if(this.value=null!=(n=i?t.value:t)?n:null,i){const e=P(t);delete e.value,this.options=e}else this.options={};var n;this.options.params||(this.options.params={})}get params(){return this.options.params}absorbOptions(t){const e=t.params;if(e){const t=this.options.params;Object.keys(e).forEach(i=>{null==t[i]&&(t[i]=e[i])})}}}const Pt=new It("void");class Vt{constructor(t,e,i){this.id=t,this.hostElement=e,this._engine=i,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,Ft(e,this._hostClassName)}listen(t,e,i,n){if(!this._triggers.hasOwnProperty(e))throw new Error(`Unable to listen on the animation trigger event "${i}" because the animation trigger "${e}" doesn't exist!`);if(null==i||0==i.length)throw new Error(`Unable to listen on the animation trigger "${e}" because the provided event is undefined!`);if("start"!=(a=i)&&"done"!=a)throw new Error(`The provided animation trigger event "${i}" for the animation trigger "${e}" is not supported!`);var a;const s=u(this._elementListeners,t,[]),o={name:e,phase:i,callback:n};s.push(o);const r=u(this._engine.statesByElement,t,{});return r.hasOwnProperty(e)||(Ft(t,"ng-trigger"),Ft(t,"ng-trigger-"+e),r[e]=Pt),()=>{this._engine.afterFlush(()=>{const t=s.indexOf(o);t>=0&&s.splice(t,1),this._triggers[e]||delete r[e]})}}register(t,e){return!this._triggers[t]&&(this._triggers[t]=e,!0)}_getTrigger(t){const e=this._triggers[t];if(!e)throw new Error(`The provided animation trigger "${t}" has not been registered!`);return e}trigger(t,e,i,n=!0){const a=this._getTrigger(e),s=new jt(this.id,e,t);let o=this._engine.statesByElement.get(t);o||(Ft(t,"ng-trigger"),Ft(t,"ng-trigger-"+e),this._engine.statesByElement.set(t,o={}));let r=o[e];const c=new It(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&r&&c.absorbOptions(r.options),o[e]=c,r||(r=Pt),"void"!==c.value&&r.value===c.value){if(!function(t,e){const i=Object.keys(t),n=Object.keys(e);if(i.length!=n.length)return!1;for(let a=0;a<i.length;a++){const n=i[a];if(!e.hasOwnProperty(n)||t[n]!==e[n])return!1}return!0}(r.params,c.params)){const e=[],i=a.matchStyles(r.value,r.params,e),n=a.matchStyles(c.value,c.params,e);e.length?this._engine.reportError(e):this._engine.afterFlush(()=>{W(t,i),A(t,n)})}return}const l=u(this._engine.playersByElement,t,[]);l.forEach(t=>{t.namespaceId==this.id&&t.triggerName==e&&t.queued&&t.destroy()});let d=a.matchTransition(r.value,c.value,t,c.params),h=!1;if(!d){if(!n)return;d=a.fallbackTransition,h=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:d,fromState:r,toState:c,player:s,isFallbackTransition:h}),h||(Ft(t,"ng-animate-queued"),s.onStart(()=>{Lt(t,"ng-animate-queued")})),s.onDone(()=>{let e=this.players.indexOf(s);e>=0&&this.players.splice(e,1);const i=this._engine.playersByElement.get(t);if(i){let t=i.indexOf(s);t>=0&&i.splice(t,1)}}),this.players.push(s),l.push(s),s}deregister(t){delete this._triggers[t],this._engine.statesByElement.forEach((e,i)=>{delete e[t]}),this._elementListeners.forEach((e,i)=>{this._elementListeners.set(i,e.filter(e=>e.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);const e=this._engine.playersByElement.get(t);e&&(e.forEach(t=>t.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,e){const i=this._engine.driver.query(t,".ng-trigger",!0);i.forEach(t=>{if(t.__ng_removed)return;const i=this._engine.fetchNamespacesByElement(t);i.size?i.forEach(i=>i.triggerLeaveAnimation(t,e,!1,!0)):this.clearElementCache(t)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(t=>this.clearElementCache(t)))}triggerLeaveAnimation(t,e,i,n){const a=this._engine.statesByElement.get(t);if(a){const s=[];if(Object.keys(a).forEach(e=>{if(this._triggers[e]){const i=this.trigger(t,e,"void",n);i&&s.push(i)}}),s.length)return this._engine.markElementAsRemoved(this.id,t,!0,e),i&&r(s).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){const e=this._elementListeners.get(t);if(e){const i=new Set;e.forEach(e=>{const n=e.name;if(i.has(n))return;i.add(n);const a=this._triggers[n].fallbackTransition,s=this._engine.statesByElement.get(t)[n]||Pt,o=new It("void"),r=new jt(this.id,n,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:n,transition:a,fromState:s,toState:o,player:r,isFallbackTransition:!0})})}}removeNode(t,e){const i=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),this.triggerLeaveAnimation(t,e,!0))return;let n=!1;if(i.totalAnimations){const e=i.players.length?i.playersByQueriedElement.get(t):[];if(e&&e.length)n=!0;else{let e=t;for(;e=e.parentNode;)if(i.statesByElement.get(e)){n=!0;break}}}if(this.prepareLeaveAnimationListeners(t),n)i.markElementAsRemoved(this.id,t,!1,e);else{const n=t.__ng_removed;n&&n!==kt||(i.afterFlush(()=>this.clearElementCache(t)),i.destroyInnerAnimations(t),i._onRemovalComplete(t,e))}}insertNode(t,e){Ft(t,this._hostClassName)}drainQueuedTransitions(t){const e=[];return this._queue.forEach(i=>{const n=i.player;if(n.destroyed)return;const a=i.element,s=this._elementListeners.get(a);s&&s.forEach(e=>{if(e.name==i.triggerName){const n=h(a,i.triggerName,i.fromState.value,i.toState.value);n._data=t,l(i.player,e.phase,n,e.callback)}}),n.markedForDestroy?this._engine.afterFlush(()=>{n.destroy()}):e.push(i)}),this._queue=[],e.sort((t,e)=>{const i=t.transition.ast.depCount,n=e.transition.ast.depCount;return 0==i||0==n?i-n:this._engine.driver.containsElement(t.element,e.element)?1:-1})}destroy(t){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}elementContainsData(t){let e=!1;return this._elementListeners.has(t)&&(e=!0),e=!!this._queue.find(e=>e.element===t)||e,e}}class Rt{constructor(t,e,i){this.bodyNode=t,this.driver=e,this._normalizer=i,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=(t,e)=>{}}_onRemovalComplete(t,e){this.onRemovalComplete(t,e)}get queuedPlayers(){const t=[];return this._namespaceList.forEach(e=>{e.players.forEach(e=>{e.queued&&t.push(e)})}),t}createNamespace(t,e){const i=new Vt(t,e,this);return e.parentNode?this._balanceNamespaceList(i,e):(this.newHostElements.set(e,i),this.collectEnterElement(e)),this._namespaceLookup[t]=i}_balanceNamespaceList(t,e){const i=this._namespaceList.length-1;if(i>=0){let n=!1;for(let a=i;a>=0;a--)if(this.driver.containsElement(this._namespaceList[a].hostElement,e)){this._namespaceList.splice(a+1,0,t),n=!0;break}n||this._namespaceList.splice(0,0,t)}else this._namespaceList.push(t);return this.namespacesByHostElement.set(e,t),t}register(t,e){let i=this._namespaceLookup[t];return i||(i=this.createNamespace(t,e)),i}registerTrigger(t,e,i){let n=this._namespaceLookup[t];n&&n.register(e,i)&&this.totalAnimations++}destroy(t,e){if(!t)return;const i=this._fetchNamespace(t);this.afterFlush(()=>{this.namespacesByHostElement.delete(i.hostElement),delete this._namespaceLookup[t];const e=this._namespaceList.indexOf(i);e>=0&&this._namespaceList.splice(e,1)}),this.afterFlushAnimationsDone(()=>i.destroy(e))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){const e=new Set,i=this.statesByElement.get(t);if(i){const t=Object.keys(i);for(let n=0;n<t.length;n++){const a=i[t[n]].namespaceId;if(a){const t=this._fetchNamespace(a);t&&e.add(t)}}}return e}trigger(t,e,i,n){if(At(e)){const a=this._fetchNamespace(t);if(a)return a.trigger(e,i,n),!0}return!1}insertNode(t,e,i,n){if(!At(e))return;const a=e.__ng_removed;if(a&&a.setForRemoval){a.setForRemoval=!1,a.setForMove=!0;const t=this.collectedLeaveElements.indexOf(e);t>=0&&this.collectedLeaveElements.splice(t,1)}if(t){const n=this._fetchNamespace(t);n&&n.insertNode(e,i)}n&&this.collectEnterElement(e)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),Ft(t,"ng-animate-disabled")):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Lt(t,"ng-animate-disabled"))}removeNode(t,e,i,n){if(At(e)){const a=t?this._fetchNamespace(t):null;if(a?a.removeNode(e,n):this.markElementAsRemoved(t,e,!1,n),i){const i=this.namespacesByHostElement.get(e);i&&i.id!==t&&i.removeNode(e,n)}}else this._onRemovalComplete(e,n)}markElementAsRemoved(t,e,i,n){this.collectedLeaveElements.push(e),e.__ng_removed={namespaceId:t,setForRemoval:n,hasAnimation:i,removedBeforeQueried:!1}}listen(t,e,i,n,a){return At(e)?this._fetchNamespace(t).listen(e,i,n,a):()=>{}}_buildInstruction(t,e,i,n,a){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,i,n,t.fromState.options,t.toState.options,e,a)}destroyInnerAnimations(t){let e=this.driver.query(t,".ng-trigger",!0);e.forEach(t=>this.destroyActiveAnimationsForElement(t)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,".ng-animating",!0),e.forEach(t=>this.finishActiveQueriedAnimationOnElement(t)))}destroyActiveAnimationsForElement(t){const e=this.playersByElement.get(t);e&&e.forEach(t=>{t.queued?t.markedForDestroy=!0:t.destroy()})}finishActiveQueriedAnimationOnElement(t){const e=this.playersByQueriedElement.get(t);e&&e.forEach(t=>t.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return r(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t.__ng_removed;if(e&&e.setForRemoval){if(t.__ng_removed=kt,e.namespaceId){this.destroyInnerAnimations(t);const i=this._fetchNamespace(e.namespaceId);i&&i.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}this.driver.matchesElement(t,".ng-animate-disabled")&&this.markElementAsDisabled(t,!1),this.driver.query(t,".ng-animate-disabled",!0).forEach(t=>{this.markElementAsDisabled(t,!1)})}flush(t=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((t,e)=>this._balanceNamespaceList(t,e)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;i<this.collectedEnterElements.length;i++)Ft(this.collectedEnterElements[i],"ng-star-inserted");if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){const i=[];try{e=this._flushAnimations(i,t)}finally{for(let t=0;t<i.length;t++)i[t]()}}else for(let i=0;i<this.collectedLeaveElements.length;i++)this.processLeaveNode(this.collectedLeaveElements[i]);if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(t=>t()),this._flushFns=[],this._whenQuietFns.length){const t=this._whenQuietFns;this._whenQuietFns=[],e.length?r(e).onDone(()=>{t.forEach(t=>t())}):t.forEach(t=>t())}}reportError(t){throw new Error("Unable to process animations due to the following failed trigger transitions\n "+t.join("\n"))}_flushAnimations(t,e){const i=new st,n=[],a=new Map,o=[],c=new Map,l=new Map,d=new Map,h=new Set;this.disabledNodes.forEach(t=>{h.add(t);const e=this.driver.query(t,".ng-animate-queued",!0);for(let i=0;i<e.length;i++)h.add(e[i])});const p=this.bodyNode,b=Array.from(this.statesByElement.keys()),f=Et(b,this.collectedEnterElements),m=new Map;let g=0;f.forEach((t,e)=>{const i="ng-enter"+g++;m.set(e,i),t.forEach(t=>Ft(t,i))});const v=[],_=new Set,y=new Set;for(let s=0;s<this.collectedLeaveElements.length;s++){const t=this.collectedLeaveElements[s],e=t.__ng_removed;e&&e.setForRemoval&&(v.push(t),_.add(t),e.hasAnimation?this.driver.query(t,".ng-star-inserted",!0).forEach(t=>_.add(t)):y.add(t))}const x=new Map,C=Et(b,Array.from(_));C.forEach((t,e)=>{const i="ng-leave"+g++;x.set(e,i),t.forEach(t=>Ft(t,i))}),t.push(()=>{f.forEach((t,e)=>{const i=m.get(e);t.forEach(t=>Lt(t,i))}),C.forEach((t,e)=>{const i=x.get(e);t.forEach(t=>Lt(t,i))}),v.forEach(t=>{this.processLeaveNode(t)})});const O=[],D=[];for(let s=this._namespaceList.length-1;s>=0;s--)this._namespaceList[s].drainQueuedTransitions(e).forEach(t=>{const e=t.player,a=t.element;if(O.push(e),this.collectedEnterElements.length){const t=a.__ng_removed;if(t&&t.setForMove)return void e.destroy()}const s=!p||!this.driver.containsElement(p,a),r=x.get(a),h=m.get(a),b=this._buildInstruction(t,i,h,r,s);if(b.errors&&b.errors.length)D.push(b);else{if(s)return e.onStart(()=>W(a,b.fromStyles)),e.onDestroy(()=>A(a,b.toStyles)),void n.push(e);if(t.isFallbackTransition)return e.onStart(()=>W(a,b.fromStyles)),e.onDestroy(()=>A(a,b.toStyles)),void n.push(e);b.timelines.forEach(t=>t.stretchStartingKeyframe=!0),i.append(a,b.timelines),o.push({instruction:b,player:e,element:a}),b.queriedElements.forEach(t=>u(c,t,[]).push(e)),b.preStyleProps.forEach((t,e)=>{const i=Object.keys(t);if(i.length){let t=l.get(e);t||l.set(e,t=new Set),i.forEach(e=>t.add(e))}}),b.postStyleProps.forEach((t,e)=>{const i=Object.keys(t);let n=d.get(e);n||d.set(e,n=new Set),i.forEach(t=>n.add(t))})}});if(D.length){const t=[];D.forEach(e=>{t.push(`@${e.triggerName} has failed due to:\n`),e.errors.forEach(e=>t.push(`- ${e}\n`))}),O.forEach(t=>t.destroy()),this.reportError(t)}const w=new Map,M=new Map;o.forEach(t=>{const e=t.element;i.has(e)&&(M.set(e,e),this._beforeAnimationBuild(t.player.namespaceId,t.instruction,w))}),n.forEach(t=>{const e=t.element;this._getPreviousPlayers(e,!1,t.namespaceId,t.triggerName,null).forEach(t=>{u(w,e,[]).push(t),t.destroy()})});const k=v.filter(t=>Nt(t,l,d)),S=new Map;Tt(S,this.driver,y,d,s.a).forEach(t=>{Nt(t,l,d)&&k.push(t)});const I=new Map;f.forEach((t,e)=>{Tt(I,this.driver,new Set(t),l,s.p)}),k.forEach(t=>{const e=S.get(t),i=I.get(t);S.set(t,Object.assign(Object.assign({},e),i))});const P=[],V=[],R={};o.forEach(t=>{const{element:e,player:s,instruction:o}=t;if(i.has(e)){if(h.has(e))return s.onDestroy(()=>A(e,o.toStyles)),s.disabled=!0,s.overrideTotalTime(o.totalTime),void n.push(s);let t=R;if(M.size>1){let i=e;const n=[];for(;i=i.parentNode;){const e=M.get(i);if(e){t=e;break}n.push(i)}n.forEach(e=>M.set(e,t))}const i=this._buildAnimation(s.namespaceId,o,w,a,I,S);if(s.setRealPlayer(i),t===R)P.push(s);else{const e=this.playersByElement.get(t);e&&e.length&&(s.parentPlayer=r(e)),n.push(s)}}else W(e,o.fromStyles),s.onDestroy(()=>A(e,o.toStyles)),V.push(s),h.has(e)&&n.push(s)}),V.forEach(t=>{const e=a.get(t.element);if(e&&e.length){const i=r(e);t.setRealPlayer(i)}}),n.forEach(t=>{t.parentPlayer?t.syncPlayerEvents(t.parentPlayer):t.destroy()});for(let s=0;s<v.length;s++){const t=v[s],e=t.__ng_removed;if(Lt(t,"ng-leave"),e&&e.hasAnimation)continue;let i=[];if(c.size){let e=c.get(t);e&&e.length&&i.push(...e);let n=this.driver.query(t,".ng-animating",!0);for(let t=0;t<n.length;t++){let e=c.get(n[t]);e&&e.length&&i.push(...e)}}const n=i.filter(t=>!t.destroyed);n.length?Qt(this,t,n):this.processLeaveNode(t)}return v.length=0,P.forEach(t=>{this.players.push(t),t.onDone(()=>{t.destroy();const e=this.players.indexOf(t);this.players.splice(e,1)}),t.play()}),P}elementContainsData(t,e){let i=!1;const n=e.__ng_removed;return n&&n.setForRemoval&&(i=!0),this.playersByElement.has(e)&&(i=!0),this.playersByQueriedElement.has(e)&&(i=!0),this.statesByElement.has(e)&&(i=!0),this._fetchNamespace(t).elementContainsData(e)||i}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,e,i,n,a){let s=[];if(e){const e=this.playersByQueriedElement.get(t);e&&(s=e)}else{const e=this.playersByElement.get(t);if(e){const t=!a||"void"==a;e.forEach(e=>{e.queued||(t||e.triggerName==n)&&s.push(e)})}}return(i||n)&&(s=s.filter(t=>!(i&&i!=t.namespaceId||n&&n!=t.triggerName))),s}_beforeAnimationBuild(t,e,i){const n=e.element,a=e.isRemovalTransition?void 0:t,s=e.isRemovalTransition?void 0:e.triggerName;for(const o of e.timelines){const t=o.element,r=t!==n,c=u(i,t,[]);this._getPreviousPlayers(t,r,a,s,e.toState).forEach(t=>{const e=t.getRealPlayer();e.beforeDestroy&&e.beforeDestroy(),t.destroy(),c.push(t)})}W(n,e.fromStyles)}_buildAnimation(t,e,i,n,a,o){const l=e.triggerName,d=e.element,h=[],p=new Set,b=new Set,f=e.timelines.map(e=>{const r=e.element;p.add(r);const u=r.__ng_removed;if(u&&u.removedBeforeQueried)return new s.d(e.duration,e.delay);const f=r!==d,m=function(t){const e=[];return function t(e,i){for(let n=0;n<e.length;n++){const a=e[n];a instanceof s.o?t(a.players,i):i.push(a)}}(t,e),e}((i.get(r)||Mt).map(t=>t.getRealPlayer())).filter(t=>!!t.element&&t.element===r),g=a.get(r),v=o.get(r),_=c(0,this._normalizer,0,e.keyframes,g,v),y=this._buildPlayer(e,_,m);if(e.subTimeline&&n&&b.add(r),f){const e=new jt(t,l,r);e.setRealPlayer(y),h.push(e)}return y});h.forEach(t=>{u(this.playersByQueriedElement,t.element,[]).push(t),t.onDone(()=>function(t,e,i){let n;if(t instanceof Map){if(n=t.get(e),n){if(n.length){const t=n.indexOf(i);n.splice(t,1)}0==n.length&&t.delete(e)}}else if(n=t[e],n){if(n.length){const t=n.indexOf(i);n.splice(t,1)}0==n.length&&delete t[e]}return n}(this.playersByQueriedElement,t.element,t))}),p.forEach(t=>Ft(t,"ng-animating"));const m=r(f);return m.onDestroy(()=>{p.forEach(t=>Lt(t,"ng-animating")),A(d,e.toStyles)}),b.forEach(t=>{u(n,t,[]).push(m)}),m}_buildPlayer(t,e,i){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,i):new s.d(t.duration,t.delay)}}class jt{constructor(t,e,i){this.namespaceId=t,this.triggerName=e,this.element=i,this._player=new s.d,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,Object.keys(this._queuedCallbacks).forEach(e=>{this._queuedCallbacks[e].forEach(i=>l(t,e,void 0,i))}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){const e=this._player;e.triggerCallback&&t.onStart(()=>e.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,e){u(this._queuedCallbacks,t,[]).push(e)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}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(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){const e=this._player;e.triggerCallback&&e.triggerCallback(t)}}function At(t){return t&&1===t.nodeType}function Wt(t,e){const i=t.style.display;return t.style.display=null!=e?e:"none",i}function Tt(t,e,i,n,a){const s=[];i.forEach(t=>s.push(Wt(t)));const o=[];n.forEach((i,n)=>{const s={};i.forEach(t=>{const i=s[t]=e.computeStyle(n,t,a);i&&0!=i.length||(n.__ng_removed=St,o.push(n))}),t.set(n,s)});let r=0;return i.forEach(t=>Wt(t,s[r++])),o}function Et(t,e){const i=new Map;if(t.forEach(t=>i.set(t,[])),0==e.length)return i;const n=new Set(e),a=new Map;return e.forEach(t=>{const e=function t(e){if(!e)return 1;let s=a.get(e);if(s)return s;const o=e.parentNode;return s=i.has(o)?o:n.has(o)?1:t(o),a.set(e,s),s}(t);1!==e&&i.get(e).push(t)}),i}function Ft(t,e){if(t.classList)t.classList.add(e);else{let i=t.$$classes;i||(i=t.$$classes={}),i[e]=!0}}function Lt(t,e){if(t.classList)t.classList.remove(e);else{let i=t.$$classes;i&&delete i[e]}}function Qt(t,e,i){r(i).onDone(()=>t.processLeaveNode(e))}function Nt(t,e,i){const n=i.get(t);if(!n)return!1;let a=e.get(t);return a?n.forEach(t=>a.add(t)):e.set(t,n),i.delete(t),!0}class zt{constructor(t,e,i){this.bodyNode=t,this._driver=e,this._triggerCache={},this.onRemovalComplete=(t,e)=>{},this._transitionEngine=new Rt(t,e,i),this._timelineEngine=new wt(t,e,i),this._transitionEngine.onRemovalComplete=(t,e)=>this.onRemovalComplete(t,e)}registerTrigger(t,e,i,n,a){const s=t+"-"+n;let o=this._triggerCache[s];if(!o){const t=[],e=J(this._driver,a,t);if(t.length)throw new Error(`The animation trigger "${n}" has failed to build due to the following errors:\n - ${t.join("\n - ")}`);o=function(t,e){return new Ct(t,e)}(n,e),this._triggerCache[s]=o}this._transitionEngine.registerTrigger(e,n,o)}register(t,e){this._transitionEngine.register(t,e)}destroy(t,e){this._transitionEngine.destroy(t,e)}onInsert(t,e,i,n){this._transitionEngine.insertNode(t,e,i,n)}onRemove(t,e,i,n){this._transitionEngine.removeNode(t,e,n||!1,i)}disableAnimations(t,e){this._transitionEngine.markElementAsDisabled(t,e)}process(t,e,i,n){if("@"==i.charAt(0)){const[t,a]=p(i);this._timelineEngine.command(t,e,a,n)}else this._transitionEngine.trigger(t,e,i,n)}listen(t,e,i,n,a){if("@"==i.charAt(0)){const[t,n]=p(i);return this._timelineEngine.listen(t,e,n,a)}return this._transitionEngine.listen(t,e,i,n,a)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}function Bt(t,e){let i=null,n=null;return Array.isArray(e)&&e.length?(i=$t(e[0]),e.length>1&&(n=$t(e[e.length-1]))):e&&(i=$t(e)),i||n?new Ut(t,i,n):null}let Ut=(()=>{class t{constructor(e,i,n){this._element=e,this._startStyles=i,this._endStyles=n,this._state=0;let a=t.initialStylesByElement.get(e);a||t.initialStylesByElement.set(e,a={}),this._initialStyles=a}start(){this._state<1&&(this._startStyles&&A(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(A(this._element,this._initialStyles),this._endStyles&&(A(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(W(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(W(this._element,this._endStyles),this._endStyles=null),A(this._element,this._initialStyles),this._state=3)}}return t.initialStylesByElement=new WeakMap,t})();function $t(t){let e=null;const i=Object.keys(t);for(let n=0;n<i.length;n++){const a=i[n];Ht(a)&&(e=e||{},e[a]=t[a])}return e}function Ht(t){return"display"===t||"position"===t}class Gt{constructor(t,e,i,n,a,s,o){this._element=t,this._name=e,this._duration=i,this._delay=n,this._easing=a,this._fillMode=s,this._onDoneFn=o,this._finished=!1,this._destroyed=!1,this._startTime=0,this._position=0,this._eventFn=t=>this._handleCallback(t)}apply(){!function(t,e){const i=Zt(t,"").trim();i.length&&(function(t,e){let i=0;for(let n=0;n<t.length;n++)","===t.charAt(n)&&i++}(i),e=`${i}, ${e}`),Jt(t,"",e)}(this._element,`${this._duration}ms ${this._easing} ${this._delay}ms 1 normal ${this._fillMode} ${this._name}`),Yt(this._element,this._eventFn,!1),this._startTime=Date.now()}pause(){Xt(this._element,this._name,"paused")}resume(){Xt(this._element,this._name,"running")}setPosition(t){const e=qt(this._element,this._name);this._position=t*this._duration,Jt(this._element,"Delay",`-${this._position}ms`,e)}getPosition(){return this._position}_handleCallback(t){const e=t._ngTestManualTimestamp||Date.now(),i=1e3*parseFloat(t.elapsedTime.toFixed(3));t.animationName==this._name&&Math.max(e-this._startTime,0)>=this._delay&&i>=this._duration&&this.finish()}finish(){this._finished||(this._finished=!0,this._onDoneFn(),Yt(this._element,this._eventFn,!0))}destroy(){this._destroyed||(this._destroyed=!0,this.finish(),function(t,e){const i=Zt(t,"").split(","),n=Kt(i,e);n>=0&&(i.splice(n,1),Jt(t,"",i.join(",")))}(this._element,this._name))}}function Xt(t,e,i){Jt(t,"PlayState",i,qt(t,e))}function qt(t,e){const i=Zt(t,"");return i.indexOf(",")>0?Kt(i.split(","),e):Kt([i],e)}function Kt(t,e){for(let i=0;i<t.length;i++)if(t[i].indexOf(e)>=0)return i;return-1}function Yt(t,e,i){i?t.removeEventListener("animationend",e):t.addEventListener("animationend",e)}function Jt(t,e,i,n){const a="animation"+e;if(null!=n){const e=t.style[a];if(e.length){const t=e.split(",");t[n]=i,i=t.join(",")}}t.style[a]=i}function Zt(t,e){return t.style["animation"+e]}class te{constructor(t,e,i,n,a,s,o,r){this.element=t,this.keyframes=e,this.animationName=i,this._duration=n,this._delay=a,this._finalStyles=o,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this._state=0,this.easing=s||"linear",this.totalTime=n+a,this._buildStyler()}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}destroy(){this.init(),this._state>=4||(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}_flushDoneFns(){this._onDoneFns.forEach(t=>t()),this._onDoneFns=[]}_flushStartFns(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}finish(){this.init(),this._state>=3||(this._state=3,this._styler.finish(),this._flushStartFns(),this._specialStyles&&this._specialStyles.finish(),this._flushDoneFns())}setPosition(t){this._styler.setPosition(t)}getPosition(){return this._styler.getPosition()}hasStarted(){return this._state>=2}init(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())}play(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2,this._specialStyles&&this._specialStyles.start()),this._styler.resume()}pause(){this.init(),this._styler.pause()}restart(){this.reset(),this.play()}reset(){this._styler.destroy(),this._buildStyler(),this._styler.apply()}_buildStyler(){this._styler=new Gt(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",()=>this.finish())}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}beforeDestroy(){this.init();const t={};if(this.hasStarted()){const e=this._state>=3;Object.keys(this._finalStyles).forEach(i=>{"offset"!=i&&(t[i]=e?this._finalStyles[i]:H(this.element,i))})}this.currentSnapshot=t}}class ee extends s.d{constructor(t,e){super(),this.element=t,this._startingStyles={},this.__initialized=!1,this._styles=D(e)}init(){!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach(t=>{this._startingStyles[t]=this.element.style[t]}),super.init())}play(){this._startingStyles&&(this.init(),Object.keys(this._styles).forEach(t=>this.element.style.setProperty(t,this._styles[t])),super.play())}destroy(){this._startingStyles&&(Object.keys(this._startingStyles).forEach(t=>{const e=this._startingStyles[t];e?this.element.style.setProperty(t,e):this.element.style.removeProperty(t)}),this._startingStyles=null,super.destroy())}}class ie{constructor(){this._count=0,this._head=document.querySelector("head"),this._warningIssued=!1}validateStyleProperty(t){return y(t)}matchesElement(t,e){return x(t,e)}containsElement(t,e){return C(t,e)}query(t,e,i){return O(t,e,i)}computeStyle(t,e,i){return window.getComputedStyle(t)[e]}buildKeyframeElement(t,e,i){i=i.map(t=>D(t));let n=`@keyframes ${e} {\n`,a="";i.forEach(t=>{a=" ";const e=parseFloat(t.offset);n+=`${a}${100*e}% {\n`,a+=" ",Object.keys(t).forEach(e=>{const i=t[e];switch(e){case"offset":return;case"easing":return void(i&&(n+=`${a}animation-timing-function: ${i};\n`));default:return void(n+=`${a}${e}: ${i};\n`)}}),n+=a+"}\n"}),n+="}\n";const s=document.createElement("style");return s.textContent=n,s}animate(t,e,i,n,a,s=[],o){o&&this._notifyFaultyScrubber();const r=s.filter(t=>t instanceof te),c={};B(i,n)&&r.forEach(t=>{let e=t.currentSnapshot;Object.keys(e).forEach(t=>c[t]=e[t])});const l=function(t){let e={};return t&&(Array.isArray(t)?t:[t]).forEach(t=>{Object.keys(t).forEach(i=>{"offset"!=i&&"easing"!=i&&(e[i]=t[i])})}),e}(e=U(t,e,c));if(0==i)return new ee(t,l);const d="gen_css_kf_"+this._count++,h=this.buildKeyframeElement(t,d,e);document.querySelector("head").appendChild(h);const u=Bt(t,e),p=new te(t,e,d,i,n,a,l,u);return p.onDestroy(()=>{var t;(t=h).parentNode.removeChild(t)}),p}_notifyFaultyScrubber(){this._warningIssued||(console.warn("@angular/animations: please load the web-animations.js polyfill to allow programmatic access...\n"," visit http://bit.ly/IWukam to learn more about using the web-animation-js polyfill."),this._warningIssued=!0)}}class ne{constructor(t,e,i,n){this.element=t,this.keyframes=e,this.options=i,this._specialStyles=n,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:{},this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_triggerWebAnimation(t,e,i){return t.animate(e,i)}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),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(t=>t()),this._onDestroyFns=[])}setPosition(t){this.domPlayer.currentTime=t*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const t={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(e=>{"offset"!=e&&(t[e]=this._finished?this._finalKeyframe[e]:H(this.element,e))}),this.currentSnapshot=t}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}class ae{constructor(){this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(se().toString()),this._cssKeyframesDriver=new ie}validateStyleProperty(t){return y(t)}matchesElement(t,e){return x(t,e)}containsElement(t,e){return C(t,e)}query(t,e,i){return O(t,e,i)}computeStyle(t,e,i){return window.getComputedStyle(t)[e]}overrideWebAnimationsSupport(t){this._isNativeImpl=t}animate(t,e,i,n,a,s=[],o){if(!o&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(t,e,i,n,a,s);const r={duration:i,delay:n,fill:0==n?"both":"forwards"};a&&(r.easing=a);const c={},l=s.filter(t=>t instanceof ne);B(i,n)&&l.forEach(t=>{let e=t.currentSnapshot;Object.keys(e).forEach(t=>c[t]=e[t])});const d=Bt(t,e=U(t,e=e.map(t=>V(t,!1)),c));return new ne(t,e,r,d)}}function se(){return"undefined"!=typeof window&&void 0!==window.document&&Element.prototype.animate||{}}var oe=i("ofXK");let re=(()=>{class t extends s.b{constructor(t,e){super(),this._nextAnimationId=0,this._renderer=t.createRenderer(e.body,{id:"0",encapsulation:n.U.None,styles:[],data:{animation:[]}})}build(t){const e=this._nextAnimationId.toString();this._nextAnimationId++;const i=Array.isArray(t)?Object(s.j)(t):t;return de(this._renderer,null,e,"register",[i]),new ce(e,this._renderer)}}return t.\u0275fac=function(e){return new(e||t)(n.ac(n.J),n.ac(oe.e))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();class ce extends s.c{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new le(this._id,t,e||{},this._renderer)}}class le{constructor(t,e,i,n){this.id=t,this.element=e,this._renderer=n,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}_listen(t,e){return this._renderer.listen(this.element,`@@${this.id}:${t}`,e)}_command(t,...e){return de(this._renderer,this.element,this.id,t,e)}onDone(t){this._listen("done",t)}onStart(t){this._listen("start",t)}onDestroy(t){this._listen("destroy",t)}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")}setPosition(t){this._command("setPosition",t)}getPosition(){return 0}}function de(t,e,i,n,a){return t.setProperty(e,`@@${i}:${n}`,a)}let he=(()=>{class t{constructor(t,e,i){this.delegate=t,this.engine=e,this._zone=i,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),e.onRemovalComplete=(t,e)=>{e&&e.parentNode(t)&&e.removeChild(t.parentNode,t)}}createRenderer(t,e){const i=this.delegate.createRenderer(t,e);if(!(t&&e&&e.data&&e.data.animation)){let t=this._rendererCache.get(i);return t||(t=new ue("",i,this.engine),this._rendererCache.set(i,t)),t}const n=e.id,a=e.id+"-"+this._currentId;this._currentId++,this.engine.register(a,t);const s=e=>{Array.isArray(e)?e.forEach(s):this.engine.registerTrigger(n,a,t,e.name,e)};return e.data.animation.forEach(s),new pe(this,a,i,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(t,e,i){t>=0&&t<this._microtaskId?this._zone.run(()=>e(i)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(t=>{const[e,i]=t;e(i)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([e,i]))}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)(n.ac(n.J),n.ac(zt),n.ac(n.C))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();class ue{constructor(t,e,i){this.namespaceId=t,this.delegate=e,this.engine=i,this.destroyNode=this.delegate.destroyNode?t=>e.destroyNode(t):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)}insertBefore(t,e,i){this.delegate.insertBefore(t,e,i),this.engine.onInsert(this.namespaceId,e,t,!0)}removeChild(t,e,i){this.engine.onRemove(this.namespaceId,e,this.delegate,i)}selectRootElement(t,e){return this.delegate.selectRootElement(t,e)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,e,i,n){this.delegate.setAttribute(t,e,i,n)}removeAttribute(t,e,i){this.delegate.removeAttribute(t,e,i)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,i,n){this.delegate.setStyle(t,e,i,n)}removeStyle(t,e,i){this.delegate.removeStyle(t,e,i)}setProperty(t,e,i){"@"==e.charAt(0)&&"@.disabled"==e?this.disableAnimations(t,!!i):this.delegate.setProperty(t,e,i)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,i){return this.delegate.listen(t,e,i)}disableAnimations(t,e){this.engine.disableAnimations(t,e)}}class pe extends ue{constructor(t,e,i,n){super(e,i,n),this.factory=t,this.namespaceId=e}setProperty(t,e,i){"@"==e.charAt(0)?"."==e.charAt(1)&&"@.disabled"==e?this.disableAnimations(t,i=void 0===i||!!i):this.engine.process(this.namespaceId,t,e.substr(1),i):this.delegate.setProperty(t,e,i)}listen(t,e,i){if("@"==e.charAt(0)){const n=function(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(t);let a=e.substr(1),s="";return"@"!=a.charAt(0)&&([a,s]=function(t){const e=t.indexOf(".");return[t.substring(0,e),t.substr(e+1)]}(a)),this.engine.listen(this.namespaceId,n,a,s,t=>{this.factory.scheduleListenerCallback(t._data||-1,i,t)})}return this.delegate.listen(t,e,i)}}let be=(()=>{class t extends zt{constructor(t,e,i){super(t.body,e,i)}}return t.\u0275fac=function(e){return new(e||t)(n.ac(oe.e),n.ac(M),n.ac(ft))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();const fe=new n.s("AnimationModuleType"),me=[{provide:M,useFactory:function(){return"function"==typeof se()?new ae:new ie}},{provide:fe,useValue:"BrowserAnimations"},{provide:s.b,useClass:re},{provide:ft,useFactory:function(){return new mt}},{provide:zt,useClass:be},{provide:n.J,useFactory:function(t,e,i){return new he(t,e,i)},deps:[a.f,zt,n.C]}];let ge=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},providers:me,imports:[a.a]}),t})()},SIQe:function(t,e,i){"use strict";i.d(e,"a",(function(){return h}));var n=i("0IaG"),a=i("fXoL"),s=i("sYmb"),o=i("ofXK"),r=i("bTqV");function c(t,e){if(1&t&&(a.Wb(0,"h1",5),a.Qc(1),a.Vb()),2&t){const t=a.hc();a.Db(1),a.Rc(t.data.title)}}function l(t,e){if(1&t&&(a.Wb(0,"div",6),a.Rb(1,"div",7),a.Vb()),2&t){const t=a.hc();a.Db(1),a.Gb("alert-message ",t.data.mode,""),a.oc("innerHTML",t.data.msg,a.Ec)}}function d(t,e){if(1&t){const t=a.Xb();a.Wb(0,"div",8),a.Wb(1,"button",9),a.dc("click",(function(){return a.Dc(t),a.hc().dialogRef.close()})),a.Qc(2),a.ic(3,"translate"),a.Vb(),a.Vb()}2&t&&(a.Db(2),a.Rc(a.jc(3,1,"lang.ok")))}let h=(()=>{class t{constructor(t,e,i){this.translate=t,this.data=e,this.dialogRef=i,null==this.data.mode&&(this.data.mode="info"),this.data.mode="alert-message-"+this.data.mode,null===this.data.msg&&(this.data.msg="")}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(s.e),a.Qb(n.a),a.Qb(n.h))},t.\u0275cmp=a.Kb({type:t,selectors:[["ng-component"]],decls:5,vars:3,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title","",4,"ngIf"],["mat-dialog-content","",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",4,"ngIf"],["mat-dialog-title",""],["mat-dialog-content",""],[3,"innerHTML"],["mat-dialog-actions",""],["id","alertComponentClose","color","primary","mat-raised-button","",1,"actions",3,"click"]],template:function(t,e){1&t&&(a.Wb(0,"div",0),a.Oc(1,c,2,1,"h1",1),a.Oc(2,l,2,4,"div",2),a.Rb(3,"span",3),a.Oc(4,d,4,3,"div",4),a.Vb()),2&t&&(a.Db(1),a.oc("ngIf",""!==e.data.title),a.Db(1),a.oc("ngIf",""!==e.data.msg),a.Db(2),a.oc("ngIf",!e.data.hideButton))},directives:[o.t,n.i,n.f,n.c,r.b],pipes:[s.d],styles:[".alert-message-info[_ngcontent-%COMP%]{margin:0;font-size:16px}"]}),t})()},STbY:function(t,e,i){"use strict";i.d(e,"a",(function(){return V})),i.d(e,"b",(function(){return W})),i.d(e,"c",(function(){return G})),i.d(e,"d",(function(){return $})),i.d(e,"e",(function(){return N}));var n=i("u47x"),a=i("8LU1"),s=i("FtGj"),o=i("fXoL"),r=i("XNiG"),c=i("quSY"),l=i("VRyK"),d=i("LRne"),h=i("7Hc7"),u=i("JX91"),p=i("eIep"),b=i("IzEk"),f=i("pLZG"),m=i("1G5W"),g=i("3E0/"),v=i("R0Ic"),_=i("+rOU"),y=i("ofXK"),x=i("FKr1"),C=i("rDax"),O=i("nLfN"),D=i("vxfF"),w=i("cH1L");const M=["mat-menu-item",""],k=["*"];function S(t,e){if(1&t){const t=o.Xb();o.Wb(0,"div",0),o.dc("keydown",(function(e){return o.Dc(t),o.hc()._handleKeydown(e)}))("click",(function(){return o.Dc(t),o.hc().closed.emit("click")}))("@transformMenu.start",(function(e){return o.Dc(t),o.hc()._onAnimationStart(e)}))("@transformMenu.done",(function(e){return o.Dc(t),o.hc()._onAnimationDone(e)})),o.Wb(1,"div",1),o.mc(2),o.Vb(),o.Vb()}if(2&t){const t=o.hc();o.oc("id",t.panelId)("ngClass",t._classList)("@transformMenu",t._panelAnimationState),o.Eb("aria-label",t.ariaLabel||null)("aria-labelledby",t.ariaLabelledby||null)("aria-describedby",t.ariaDescribedby||null)}}const I={transformMenu:Object(v.n)("transformMenu",[Object(v.k)("void",Object(v.l)({opacity:0,transform:"scale(0.8)"})),Object(v.m)("void => enter",Object(v.g)([Object(v.i)(".mat-menu-content, .mat-mdc-menu-content",Object(v.e)("100ms linear",Object(v.l)({opacity:1}))),Object(v.e)("120ms cubic-bezier(0, 0, 0.2, 1)",Object(v.l)({transform:"scale(1)"}))])),Object(v.m)("* => void",Object(v.e)("100ms 25ms linear",Object(v.l)({opacity:0})))]),fadeInItems:Object(v.n)("fadeInItems",[Object(v.k)("showing",Object(v.l)({opacity:1})),Object(v.m)("void => *",[Object(v.l)({opacity:0}),Object(v.e)("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},P=new o.s("MatMenuContent");let V=(()=>{class t{constructor(t,e,i,n,a,s,o){this._template=t,this._componentFactoryResolver=e,this._appRef=i,this._injector=n,this._viewContainerRef=a,this._document=s,this._changeDetectorRef=o,this._attached=new r.a}attach(t={}){this._portal||(this._portal=new _.i(this._template,this._viewContainerRef)),this.detach(),this._outlet||(this._outlet=new _.f(this._document.createElement("div"),this._componentFactoryResolver,this._appRef,this._injector));const e=this._template.elementRef.nativeElement;e.parentNode.insertBefore(this._outlet.outletElement,e),this._changeDetectorRef&&this._changeDetectorRef.markForCheck(),this._portal.attach(this._outlet,t),this._attached.next()}detach(){this._portal.isAttached&&this._portal.detach()}ngOnDestroy(){this._outlet&&this._outlet.dispose()}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(o.P),o.Qb(o.j),o.Qb(o.g),o.Qb(o.t),o.Qb(o.T),o.Qb(y.e),o.Qb(o.h))},t.\u0275dir=o.Lb({type:t,selectors:[["ng-template","matMenuContent",""]],features:[o.Cb([{provide:P,useExisting:t}])]}),t})();const R=new o.s("MAT_MENU_PANEL");class j{}const A=Object(x.B)(Object(x.C)(j));let W=(()=>{class t extends A{constructor(t,e,i,n){super(),this._elementRef=t,this._focusMonitor=i,this._parentMenu=n,this.role="menuitem",this._hovered=new r.a,this._focused=new r.a,this._highlighted=!1,this._triggersSubmenu=!1,n&&n.addItem&&n.addItem(this)}focus(t="program",e){this._focusMonitor?this._focusMonitor.focusVia(this._getHostElement(),t,e):this._getHostElement().focus(e),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){var t,e;const i=this._elementRef.nativeElement.cloneNode(!0),n=i.querySelectorAll("mat-icon, .material-icons");for(let a=0;a<n.length;a++){const e=n[a];null===(t=e.parentNode)||void 0===t||t.removeChild(e)}return(null===(e=i.textContent)||void 0===e?void 0:e.trim())||""}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(o.l),o.Qb(y.e),o.Qb(n.h),o.Qb(R,8))},t.\u0275cmp=o.Kb({type:t,selectors:[["","mat-menu-item",""]],hostAttrs:[1,"mat-focus-indicator"],hostVars:10,hostBindings:function(t,e){1&t&&o.dc("click",(function(t){return e._checkDisabled(t)}))("mouseenter",(function(){return e._handleMouseEnter()})),2&t&&(o.Eb("role",e.role)("tabindex",e._getTabIndex())("aria-disabled",e.disabled.toString())("disabled",e.disabled||null),o.Ib("mat-menu-item",!0)("mat-menu-item-highlighted",e._highlighted)("mat-menu-item-submenu-trigger",e._triggersSubmenu))},inputs:{disabled:"disabled",disableRipple:"disableRipple",role:"role"},exportAs:["matMenuItem"],features:[o.Ab],attrs:M,ngContentSelectors:k,decls:2,vars:2,consts:[["matRipple","",1,"mat-menu-ripple",3,"matRippleDisabled","matRippleTrigger"]],template:function(t,e){1&t&&(o.nc(),o.mc(0),o.Rb(1,"div",0)),2&t&&(o.Db(1),o.oc("matRippleDisabled",e.disableRipple||e.disabled)("matRippleTrigger",e._getHostElement()))},directives:[x.u],encapsulation:2,changeDetection:0}),t})();const T=new o.s("mat-menu-default-options",{providedIn:"root",factory:function(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}});let E=0,F=(()=>{class t{constructor(t,e,i){this._elementRef=t,this._ngZone=e,this._defaultOptions=i,this._xPosition=this._defaultOptions.xPosition,this._yPosition=this._defaultOptions.yPosition,this._directDescendantItems=new o.H,this._tabSubscription=c.a.EMPTY,this._classList={},this._panelAnimationState="void",this._animationDone=new r.a,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new o.o,this.close=this.closed,this.panelId="mat-menu-panel-"+E++}get xPosition(){return this._xPosition}set xPosition(t){this._xPosition=t,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(t){this._yPosition=t,this.setPositionClasses()}get overlapTrigger(){return this._overlapTrigger}set overlapTrigger(t){this._overlapTrigger=Object(a.c)(t)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(t){this._hasBackdrop=Object(a.c)(t)}set panelClass(t){const e=this._previousPanelClass;e&&e.length&&e.split(" ").forEach(t=>{this._classList[t]=!1}),this._previousPanelClass=t,t&&t.length&&(t.split(" ").forEach(t=>{this._classList[t]=!0}),this._elementRef.nativeElement.className="")}get classList(){return this.panelClass}set classList(t){this.panelClass=t}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new n.g(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._tabSubscription=this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Object(u.a)(this._directDescendantItems),Object(p.a)(t=>Object(l.a)(...t.map(t=>t._focused)))).subscribe(t=>this._keyManager.updateActiveItem(t))}ngOnDestroy(){this._directDescendantItems.destroy(),this._tabSubscription.unsubscribe(),this.closed.complete()}_hovered(){return this._directDescendantItems.changes.pipe(Object(u.a)(this._directDescendantItems),Object(p.a)(t=>Object(l.a)(...t.map(t=>t._hovered))))}addItem(t){}removeItem(t){}_handleKeydown(t){const e=t.keyCode,i=this._keyManager;switch(e){case s.h:Object(s.v)(t)||(t.preventDefault(),this.closed.emit("keydown"));break;case s.k:this.parentMenu&&"ltr"===this.direction&&this.closed.emit("keydown");break;case s.o:this.parentMenu&&"rtl"===this.direction&&this.closed.emit("keydown");break;default:e!==s.s&&e!==s.e||i.setFocusOrigin("keyboard"),i.onKeydown(t)}}focusFirstItem(t="program"){this.lazyContent?this._ngZone.onStable.pipe(Object(b.a)(1)).subscribe(()=>this._focusFirstItem(t)):this._focusFirstItem(t)}_focusFirstItem(t){const e=this._keyManager;if(e.setFocusOrigin(t).setFirstItemActive(),!e.activeItem&&this._directDescendantItems.length){let t=this._directDescendantItems.first._getHostElement().parentElement;for(;t;){if("menu"===t.getAttribute("role")){t.focus();break}t=t.parentElement}}}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(t){const e="mat-elevation-z"+Math.min(4+t,24),i=Object.keys(this._classList).find(t=>t.startsWith("mat-elevation-z"));i&&i!==this._previousElevation||(this._previousElevation&&(this._classList[this._previousElevation]=!1),this._classList[e]=!0,this._previousElevation=e)}setPositionClasses(t=this.xPosition,e=this.yPosition){const i=this._classList;i["mat-menu-before"]="before"===t,i["mat-menu-after"]="after"===t,i["mat-menu-above"]="above"===e,i["mat-menu-below"]="below"===e}_startAnimation(){this._panelAnimationState="enter"}_resetAnimation(){this._panelAnimationState="void"}_onAnimationDone(t){this._animationDone.next(t),this._isAnimating=!1}_onAnimationStart(t){this._isAnimating=!0,"enter"===t.toState&&0===this._keyManager.activeItemIndex&&(t.element.scrollTop=0)}_updateDirectDescendants(){this._allItems.changes.pipe(Object(u.a)(this._allItems)).subscribe(t=>{this._directDescendantItems.reset(t.filter(t=>t._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(o.l),o.Qb(o.C),o.Qb(T))},t.\u0275dir=o.Lb({type:t,contentQueries:function(t,e,i){var n;1&t&&(o.Jb(i,P,!0),o.Jb(i,W,!0),o.Jb(i,W,!1)),2&t&&(o.yc(n=o.ec())&&(e.lazyContent=n.first),o.yc(n=o.ec())&&(e._allItems=n),o.yc(n=o.ec())&&(e.items=n))},viewQuery:function(t,e){var i;1&t&&o.Xc(o.P,!0),2&t&&o.yc(i=o.ec())&&(e.templateRef=i.first)},inputs:{backdropClass:"backdropClass",xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:"overlapTrigger",hasBackdrop:"hasBackdrop",panelClass:["class","panelClass"],classList:"classList",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"]},outputs:{closed:"closed",close:"close"}}),t})(),L=(()=>{class t extends F{}return t.\u0275fac=function(e){return Q(e||t)},t.\u0275dir=o.Lb({type:t,features:[o.Ab]}),t})();const Q=o.Yb(L);let N=(()=>{class t extends L{constructor(t,e,i){super(t,e,i)}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(o.l),o.Qb(o.C),o.Qb(T))},t.\u0275cmp=o.Kb({type:t,selectors:[["mat-menu"]],exportAs:["matMenu"],features:[o.Cb([{provide:R,useExisting:L},{provide:L,useExisting:t}]),o.Ab],ngContentSelectors:k,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-menu-panel",3,"id","ngClass","keydown","click"],[1,"mat-menu-content"]],template:function(t,e){1&t&&(o.nc(),o.Oc(0,S,3,6,"ng-template"))},directives:[y.q],styles:['.mat-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(100vh - 48px);border-radius:4px;outline:0;min-height:64px}.mat-menu-panel.ng-animating{pointer-events:none}.cdk-high-contrast-active .mat-menu-panel{outline:solid 1px}.mat-menu-content:not(:empty){padding-top:8px;padding-bottom:8px}.mat-menu-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative}.mat-menu-item::-moz-focus-inner{border:0}.mat-menu-item[disabled]{cursor:default}[dir=rtl] .mat-menu-item{text-align:right}.mat-menu-item .mat-icon{margin-right:16px;vertical-align:middle}.mat-menu-item .mat-icon svg{vertical-align:top}[dir=rtl] .mat-menu-item .mat-icon{margin-left:16px;margin-right:0}.mat-menu-item[disabled]{pointer-events:none}.cdk-high-contrast-active .mat-menu-item.cdk-program-focused,.cdk-high-contrast-active .mat-menu-item.cdk-keyboard-focused,.cdk-high-contrast-active .mat-menu-item-highlighted{outline:dotted 1px}.mat-menu-item-submenu-trigger{padding-right:32px}.mat-menu-item-submenu-trigger::after{width:0;height:0;border-style:solid;border-width:5px 0 5px 5px;border-color:transparent transparent transparent currentColor;content:"";display:inline-block;position:absolute;top:50%;right:16px;transform:translateY(-50%)}[dir=rtl] .mat-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}[dir=rtl] .mat-menu-item-submenu-trigger::after{right:auto;left:16px;transform:rotateY(180deg) translateY(-50%)}button.mat-menu-item{width:100%}.mat-menu-item .mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}\n'],encapsulation:2,data:{animation:[I.transformMenu,I.fadeInItems]},changeDetection:0}),t})();const z=new o.s("mat-menu-scroll-strategy"),B={provide:z,deps:[C.c],useFactory:function(t){return()=>t.scrollStrategies.reposition()}},U=Object(O.f)({passive:!0});let $=(()=>{class t{constructor(t,e,i,n,a,s,r,l){this._overlay=t,this._element=e,this._viewContainerRef=i,this._parentMenu=a,this._menuItemInstance=s,this._dir=r,this._focusMonitor=l,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=c.a.EMPTY,this._hoverSubscription=c.a.EMPTY,this._menuCloseSubscription=c.a.EMPTY,this._handleTouchStart=()=>this._openedBy="touch",this._openedBy=null,this.restoreFocus=!0,this.menuOpened=new o.o,this.onMenuOpen=this.menuOpened,this.menuClosed=new o.o,this.onMenuClose=this.menuClosed,e.nativeElement.addEventListener("touchstart",this._handleTouchStart,U),s&&(s._triggersSubmenu=this.triggersSubmenu()),this._scrollStrategy=n}get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(t){this.menu=t}get menu(){return this._menu}set menu(t){t!==this._menu&&(this._menu=t,this._menuCloseSubscription.unsubscribe(),t&&(this._menuCloseSubscription=t.close.subscribe(t=>{this._destroyMenu(),"click"!==t&&"tab"!==t||!this._parentMenu||this._parentMenu.closed.emit(t)})))}ngAfterContentInit(){this._checkMenu(),this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,U),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}triggersSubmenu(){return!(!this._menuItemInstance||!this._parentMenu)}toggleMenu(){return this._menuOpen?this.closeMenu():this.openMenu()}openMenu(){if(this._menuOpen)return;this._checkMenu();const t=this._createOverlay(),e=t.getConfig();this._setPosition(e.positionStrategy),e.hasBackdrop=null==this.menu.hasBackdrop?!this.triggersSubmenu():this.menu.hasBackdrop,t.attach(this._getPortal()),this.menu.lazyContent&&this.menu.lazyContent.attach(this.menuData),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this.closeMenu()),this._initMenu(),this.menu instanceof L&&this.menu._startAnimation()}closeMenu(){this.menu.close.emit()}focus(t="program",e){this._focusMonitor?this._focusMonitor.focusVia(this._element,t,e):this._element.nativeElement.focus(e)}_destroyMenu(){if(!this._overlayRef||!this.menuOpen)return;const t=this.menu;this._closingActionsSubscription.unsubscribe(),this._overlayRef.detach(),this._restoreFocus(),t instanceof L?(t._resetAnimation(),t.lazyContent?t._animationDone.pipe(Object(f.a)(t=>"void"===t.toState),Object(b.a)(1),Object(m.a)(t.lazyContent._attached)).subscribe({next:()=>t.lazyContent.detach(),complete:()=>this._setIsMenuOpen(!1)}):this._setIsMenuOpen(!1)):(this._setIsMenuOpen(!1),t.lazyContent&&t.lazyContent.detach())}_initMenu(){this.menu.parentMenu=this.triggersSubmenu()?this._parentMenu:void 0,this.menu.direction=this.dir,this._setMenuElevation(),this._setIsMenuOpen(!0),this.menu.focusFirstItem(this._openedBy||"program")}_setMenuElevation(){if(this.menu.setElevation){let t=0,e=this.menu.parentMenu;for(;e;)t++,e=e.parentMenu;this.menu.setElevation(t)}}_restoreFocus(){this.restoreFocus&&(this._openedBy?this.triggersSubmenu()||this.focus(this._openedBy):this.focus()),this._openedBy=null}_setIsMenuOpen(t){this._menuOpen=t,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&(this._menuItemInstance._highlighted=t)}_checkMenu(){}_createOverlay(){if(!this._overlayRef){const t=this._getOverlayConfig();this._subscribeToPositions(t.positionStrategy),this._overlayRef=this._overlay.create(t),this._overlayRef.keydownEvents().subscribe()}return this._overlayRef}_getOverlayConfig(){return new C.d({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:this.menu.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:this.menu.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir})}_subscribeToPositions(t){this.menu.setPositionClasses&&t.positionChanges.subscribe(t=>{this.menu.setPositionClasses("start"===t.connectionPair.overlayX?"after":"before","top"===t.connectionPair.overlayY?"below":"above")})}_setPosition(t){let[e,i]="before"===this.menu.xPosition?["end","start"]:["start","end"],[n,a]="above"===this.menu.yPosition?["bottom","top"]:["top","bottom"],[s,o]=[n,a],[r,c]=[e,i],l=0;this.triggersSubmenu()?(c=e="before"===this.menu.xPosition?"start":"end",i=r="end"===e?"start":"end",l="bottom"===n?8:-8):this.menu.overlapTrigger||(s="top"===n?"bottom":"top",o="top"===a?"bottom":"top"),t.withPositions([{originX:e,originY:s,overlayX:r,overlayY:n,offsetY:l},{originX:i,originY:s,overlayX:c,overlayY:n,offsetY:l},{originX:e,originY:o,overlayX:r,overlayY:a,offsetY:-l},{originX:i,originY:o,overlayX:c,overlayY:a,offsetY:-l}])}_menuClosingActions(){const t=this._overlayRef.backdropClick(),e=this._overlayRef.detachments(),i=this._parentMenu?this._parentMenu.closed:Object(d.a)(),n=this._parentMenu?this._parentMenu._hovered().pipe(Object(f.a)(t=>t!==this._menuItemInstance),Object(f.a)(()=>this._menuOpen)):Object(d.a)();return Object(l.a)(t,i,n,e)}_handleMousedown(t){Object(n.l)(t)||(this._openedBy=0===t.button?"mouse":null,this.triggersSubmenu()&&t.preventDefault())}_handleKeydown(t){const e=t.keyCode;this.triggersSubmenu()&&(e===s.o&&"ltr"===this.dir||e===s.k&&"rtl"===this.dir)&&this.openMenu()}_handleClick(t){this.triggersSubmenu()?(t.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){this.triggersSubmenu()&&(this._hoverSubscription=this._parentMenu._hovered().pipe(Object(f.a)(t=>t===this._menuItemInstance&&!t.disabled),Object(g.a)(0,h.a)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof L&&this.menu._isAnimating?this.menu._animationDone.pipe(Object(b.a)(1),Object(g.a)(0,h.a),Object(m.a)(this._parentMenu._hovered())).subscribe(()=>this.openMenu()):this.openMenu()}))}_getPortal(){return this._portal&&this._portal.templateRef===this.menu.templateRef||(this._portal=new _.i(this.menu.templateRef,this._viewContainerRef)),this._portal}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(C.c),o.Qb(o.l),o.Qb(o.T),o.Qb(z),o.Qb(L,8),o.Qb(W,10),o.Qb(w.c,8),o.Qb(n.h))},t.\u0275dir=o.Lb({type:t,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:["aria-haspopup","true",1,"mat-menu-trigger"],hostVars:2,hostBindings:function(t,e){1&t&&o.dc("mousedown",(function(t){return e._handleMousedown(t)}))("keydown",(function(t){return e._handleKeydown(t)}))("click",(function(t){return e._handleClick(t)})),2&t&&o.Eb("aria-expanded",e.menuOpen||null)("aria-controls",e.menuOpen?e.menu.panelId:null)},inputs:{restoreFocus:["matMenuTriggerRestoreFocus","restoreFocus"],_deprecatedMatMenuTriggerFor:["mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:["matMenuTriggerFor","menu"],menuData:["matMenuTriggerData","menuData"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"]}),t})(),H=(()=>{class t{}return t.\u0275mod=o.Ob({type:t}),t.\u0275inj=o.Nb({factory:function(e){return new(e||t)},providers:[B],imports:[x.k]}),t})(),G=(()=>{class t{}return t.\u0275mod=o.Ob({type:t}),t.\u0275inj=o.Nb({factory:function(e){return new(e||t)},providers:[B],imports:[[y.c,x.k,x.v,C.f,H],D.c,x.k,H]}),t})()},SeVD:function(t,e,i){"use strict";i.d(e,"a",(function(){return d}));var n=i("ngJS"),a=i("NJ4a"),s=i("Lhse"),o=i("kJWO"),r=i("I55L"),c=i("c2HN"),l=i("XoHu");const d=t=>{if(t&&"function"==typeof t[o.a])return d=t,t=>{const e=d[o.a]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if(Object(r.a)(t))return Object(n.a)(t);if(Object(c.a)(t))return i=t,t=>(i.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,a.a),t);if(t&&"function"==typeof t[s.a])return e=t,t=>{const i=e[s.a]();for(;;){let e;try{e=i.next()}catch(n){return t.error(n),t}if(e.done){t.complete();break}if(t.next(e.value),t.closed)break}return"function"==typeof i.return&&t.add(()=>{i.return&&i.return()}),t};{const e=Object(l.a)(t)?"an invalid object":`'${t}'`;throw new TypeError(`You provided ${e} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`)}var e,i,d}},SpAZ:function(t,e,i){"use strict";function n(t){return t}i.d(e,"a",(function(){return n}))},TCaw:function(t,e){function i(t){return Promise.resolve().then((function(){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}))}i.keys=function(){return[]},i.resolve=i,t.exports=i,i.id="TCaw"},TU8p:function(t,e,i){"use strict";i.d(e,"a",(function(){return h})),i.d(e,"b",(function(){return u}));var n=i("FKr1"),a=i("u47x"),s=i("8LU1"),o=i("R1ws"),r=i("fXoL");let c=0;class l{}const d=Object(n.C)(l);let h=(()=>{class t extends d{constructor(t,e,i,n,a){super(),this._ngZone=t,this._elementRef=e,this._ariaDescriber=i,this._renderer=n,this._animationMode=a,this._hasContent=!1,this._color="primary",this._overlap=!0,this.position="above after",this.size="medium",this._id=c++}get color(){return this._color}set color(t){this._setColor(t),this._color=t}get overlap(){return this._overlap}set overlap(t){this._overlap=Object(s.c)(t)}get description(){return this._description}set description(t){if(t!==this._description){const e=this._badgeElement;this._updateHostAriaDescription(t,this._description),this._description=t,e&&(t?e.setAttribute("aria-label",t):e.removeAttribute("aria-label"))}}get hidden(){return this._hidden}set hidden(t){this._hidden=Object(s.c)(t)}isAbove(){return-1===this.position.indexOf("below")}isAfter(){return-1===this.position.indexOf("before")}ngOnChanges(t){const e=t.content;if(e){const t=e.currentValue;this._hasContent=null!=t&&(""+t).trim().length>0,this._updateTextContent()}}ngOnDestroy(){const t=this._badgeElement;t&&(this.description&&this._ariaDescriber.removeDescription(t,this.description),this._renderer.destroyNode&&this._renderer.destroyNode(t))}getBadgeElement(){return this._badgeElement}_updateTextContent(){return this._badgeElement?this._badgeElement.textContent=this._stringifyContent():this._badgeElement=this._createBadgeElement(),this._badgeElement}_createBadgeElement(){const t=this._renderer.createElement("span");return this._clearExistingBadges("mat-badge-content"),t.setAttribute("id","mat-badge-content-"+this._id),t.classList.add("mat-badge-content"),t.textContent=this._stringifyContent(),"NoopAnimations"===this._animationMode&&t.classList.add("_mat-animation-noopable"),this.description&&t.setAttribute("aria-label",this.description),this._elementRef.nativeElement.appendChild(t),"function"==typeof requestAnimationFrame&&"NoopAnimations"!==this._animationMode?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{t.classList.add("mat-badge-active")})}):t.classList.add("mat-badge-active"),t}_updateHostAriaDescription(t,e){const i=this._updateTextContent();e&&this._ariaDescriber.removeDescription(i,e),t&&this._ariaDescriber.describe(i,t)}_setColor(t){if(t!==this._color){const e=this._elementRef.nativeElement.classList;this._color&&e.remove("mat-badge-"+this._color),t&&e.add("mat-badge-"+t)}}_clearExistingBadges(t){const e=this._elementRef.nativeElement;let i=e.children.length;for(;i--;){const n=e.children[i];n.classList.contains(t)&&e.removeChild(n)}}_stringifyContent(){const t=this.content;return null==t?"":""+t}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.C),r.Qb(r.l),r.Qb(a.c),r.Qb(r.I),r.Qb(o.a,8))},t.\u0275dir=r.Lb({type:t,selectors:[["","matBadge",""]],hostAttrs:[1,"mat-badge"],hostVars:20,hostBindings:function(t,e){2&t&&r.Ib("mat-badge-overlap",e.overlap)("mat-badge-above",e.isAbove())("mat-badge-below",!e.isAbove())("mat-badge-before",!e.isAfter())("mat-badge-after",e.isAfter())("mat-badge-small","small"===e.size)("mat-badge-medium","medium"===e.size)("mat-badge-large","large"===e.size)("mat-badge-hidden",e.hidden||!e._hasContent)("mat-badge-disabled",e.disabled)},inputs:{disabled:["matBadgeDisabled","disabled"],position:["matBadgePosition","position"],size:["matBadgeSize","size"],color:["matBadgeColor","color"],overlap:["matBadgeOverlap","overlap"],description:["matBadgeDescription","description"],hidden:["matBadgeHidden","hidden"],content:["matBadge","content"]},features:[r.Ab,r.Bb]}),t})(),u=(()=>{class t{}return t.\u0275mod=r.Ob({type:t}),t.\u0275inj=r.Nb({factory:function(e){return new(e||t)},imports:[[a.a,n.k],n.k]}),t})()},UXun:function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var n=i("jtHE");function a(t,e,i){let a;return a=t&&"object"==typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:i},t=>t.lift(function({bufferSize:t=Number.POSITIVE_INFINITY,windowTime:e=Number.POSITIVE_INFINITY,refCount:i,scheduler:a}){let s,o,r=0,c=!1,l=!1;return function(d){let h;r++,!s||c?(c=!1,s=new n.a(t,e,a),h=s.subscribe(this),o=d.subscribe({next(t){s.next(t)},error(t){c=!0,s.error(t)},complete(){l=!0,o=void 0,s.complete()}})):h=s.subscribe(this),this.add(()=>{r--,h.unsubscribe(),o&&!l&&i&&0===r&&(o.unsubscribe(),o=void 0,s=void 0)})}}(a))}},VRyK:function(t,e,i){"use strict";i.d(e,"a",(function(){return r}));var n=i("HDdC"),a=i("z+Ro"),s=i("bHdf"),o=i("yCtX");function r(...t){let e=Number.POSITIVE_INFINITY,i=null,r=t[t.length-1];return Object(a.a)(r)?(i=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(e=t.pop())):"number"==typeof r&&(e=t.pop()),null===i&&1===t.length&&t[0]instanceof n.a?t[0]:Object(s.a)(e)(Object(o.a)(t,i))}},WMd4:function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var n=i("EY2u"),a=i("LRne"),s=i("z6cu");let o=(()=>{class t{constructor(t,e,i){this.kind=t,this.value=e,this.error=i,this.hasValue="N"===t}observe(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}}do(t,e,i){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return i&&i()}}accept(t,e,i){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,i)}toObservable(){switch(this.kind){case"N":return Object(a.a)(this.value);case"E":return Object(s.a)(this.error);case"C":return Object(n.b)()}throw new Error("unexpected notification kind value")}static createNext(e){return void 0!==e?new t("N",e):t.undefinedValueNotification}static createError(e){return new t("E",void 0,e)}static createComplete(){return t.completeNotification}}return t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t})()},Wp6s:function(t,e,i){"use strict";i.d(e,"a",(function(){return O})),i.d(e,"b",(function(){return f})),i.d(e,"c",(function(){return C})),i.d(e,"d",(function(){return u})),i.d(e,"e",(function(){return m})),i.d(e,"f",(function(){return D})),i.d(e,"g",(function(){return g})),i.d(e,"h",(function(){return y})),i.d(e,"i",(function(){return _})),i.d(e,"j",(function(){return M})),i.d(e,"k",(function(){return v})),i.d(e,"l",(function(){return b})),i.d(e,"m",(function(){return p})),i.d(e,"n",(function(){return w})),i.d(e,"o",(function(){return x}));var n=i("R1ws"),a=i("FKr1"),s=i("fXoL");const o=["*",[["mat-card-footer"]]],r=["*","mat-card-footer"],c=[[["","mat-card-avatar",""],["","matCardAvatar",""]],[["mat-card-title"],["mat-card-subtitle"],["","mat-card-title",""],["","mat-card-subtitle",""],["","matCardTitle",""],["","matCardSubtitle",""]],"*"],l=["[mat-card-avatar], [matCardAvatar]","mat-card-title, mat-card-subtitle,\n [mat-card-title], [mat-card-subtitle],\n [matCardTitle], [matCardSubtitle]","*"],d=[[["mat-card-title"],["mat-card-subtitle"],["","mat-card-title",""],["","mat-card-subtitle",""],["","matCardTitle",""],["","matCardSubtitle",""]],[["img"]],"*"],h=["mat-card-title, mat-card-subtitle,\n [mat-card-title], [mat-card-subtitle],\n [matCardTitle], [matCardSubtitle]","img","*"];let u=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["mat-card-content"],["","mat-card-content",""],["","matCardContent",""]],hostAttrs:[1,"mat-card-content"]}),t})(),p=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["mat-card-title"],["","mat-card-title",""],["","matCardTitle",""]],hostAttrs:[1,"mat-card-title"]}),t})(),b=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["mat-card-subtitle"],["","mat-card-subtitle",""],["","matCardSubtitle",""]],hostAttrs:[1,"mat-card-subtitle"]}),t})(),f=(()=>{class t{constructor(){this.align="start"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["mat-card-actions"]],hostAttrs:[1,"mat-card-actions"],hostVars:2,hostBindings:function(t,e){2&t&&s.Ib("mat-card-actions-align-end","end"===e.align)},inputs:{align:"align"},exportAs:["matCardActions"]}),t})(),m=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["mat-card-footer"]],hostAttrs:[1,"mat-card-footer"]}),t})(),g=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","mat-card-image",""],["","matCardImage",""]],hostAttrs:[1,"mat-card-image"]}),t})(),v=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","mat-card-sm-image",""],["","matCardImageSmall",""]],hostAttrs:[1,"mat-card-sm-image"]}),t})(),_=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","mat-card-md-image",""],["","matCardImageMedium",""]],hostAttrs:[1,"mat-card-md-image"]}),t})(),y=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","mat-card-lg-image",""],["","matCardImageLarge",""]],hostAttrs:[1,"mat-card-lg-image"]}),t})(),x=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","mat-card-xl-image",""],["","matCardImageXLarge",""]],hostAttrs:[1,"mat-card-xl-image"]}),t})(),C=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","mat-card-avatar",""],["","matCardAvatar",""]],hostAttrs:[1,"mat-card-avatar"]}),t})(),O=(()=>{class t{constructor(t){this._animationMode=t}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(n.a,8))},t.\u0275cmp=s.Kb({type:t,selectors:[["mat-card"]],hostAttrs:[1,"mat-card","mat-focus-indicator"],hostVars:2,hostBindings:function(t,e){2&t&&s.Ib("_mat-animation-noopable","NoopAnimations"===e._animationMode)},exportAs:["matCard"],ngContentSelectors:r,decls:2,vars:0,template:function(t,e){1&t&&(s.nc(o),s.mc(0),s.mc(1,1))},styles:[".mat-card{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);display:block;position:relative;padding:16px;border-radius:4px}._mat-animation-noopable.mat-card{transition:none;animation:none}.mat-card .mat-divider-horizontal{position:absolute;left:0;width:100%}[dir=rtl] .mat-card .mat-divider-horizontal{left:auto;right:0}.mat-card .mat-divider-horizontal.mat-divider-inset{position:static;margin:0}[dir=rtl] .mat-card .mat-divider-horizontal.mat-divider-inset{margin-right:0}.cdk-high-contrast-active .mat-card{outline:solid 1px}.mat-card-actions,.mat-card-subtitle,.mat-card-content{display:block;margin-bottom:16px}.mat-card-title{display:block;margin-bottom:8px}.mat-card-actions{margin-left:-8px;margin-right:-8px;padding:8px 0}.mat-card-actions-align-end{display:flex;justify-content:flex-end}.mat-card-image{width:calc(100% + 32px);margin:0 -16px 16px -16px}.mat-card-footer{display:block;margin:0 -16px -16px -16px}.mat-card-actions .mat-button,.mat-card-actions .mat-raised-button,.mat-card-actions .mat-stroked-button{margin:0 8px}.mat-card-header{display:flex;flex-direction:row}.mat-card-header .mat-card-title{margin-bottom:12px}.mat-card-header-text{margin:0 16px}.mat-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0;object-fit:cover}.mat-card-title-group{display:flex;justify-content:space-between}.mat-card-sm-image{width:80px;height:80px}.mat-card-md-image{width:112px;height:112px}.mat-card-lg-image{width:152px;height:152px}.mat-card-xl-image{width:240px;height:240px;margin:-8px}.mat-card-title-group>.mat-card-xl-image{margin:-8px 0 8px}@media(max-width: 599px){.mat-card-title-group{margin:0}.mat-card-xl-image{margin-left:0;margin-right:0}}.mat-card>:first-child,.mat-card-content>:first-child{margin-top:0}.mat-card>:last-child:not(.mat-card-footer),.mat-card-content>:last-child:not(.mat-card-footer){margin-bottom:0}.mat-card-image:first-child{margin-top:-16px;border-top-left-radius:inherit;border-top-right-radius:inherit}.mat-card>.mat-card-actions:last-child{margin-bottom:-8px;padding-bottom:0}.mat-card-actions .mat-button:first-child,.mat-card-actions .mat-raised-button:first-child,.mat-card-actions .mat-stroked-button:first-child{margin-left:0;margin-right:0}.mat-card-title:not(:first-child),.mat-card-subtitle:not(:first-child){margin-top:-4px}.mat-card-header .mat-card-subtitle:not(:first-child){margin-top:-8px}.mat-card>.mat-card-xl-image:first-child{margin-top:-8px}.mat-card>.mat-card-xl-image:last-child{margin-bottom:-8px}\n"],encapsulation:2,changeDetection:0}),t})(),D=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=s.Kb({type:t,selectors:[["mat-card-header"]],hostAttrs:[1,"mat-card-header"],ngContentSelectors:l,decls:4,vars:0,consts:[[1,"mat-card-header-text"]],template:function(t,e){1&t&&(s.nc(c),s.mc(0),s.Wb(1,"div",0),s.mc(2,1),s.Vb(),s.mc(3,2))},encapsulation:2,changeDetection:0}),t})(),w=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=s.Kb({type:t,selectors:[["mat-card-title-group"]],hostAttrs:[1,"mat-card-title-group"],ngContentSelectors:h,decls:4,vars:0,template:function(t,e){1&t&&(s.nc(d),s.Wb(0,"div"),s.mc(1),s.Vb(),s.mc(2,1),s.mc(3,2))},encapsulation:2,changeDetection:0}),t})(),M=(()=>{class t{}return t.\u0275mod=s.Ob({type:t}),t.\u0275inj=s.Nb({factory:function(e){return new(e||t)},imports:[[a.k],a.k]}),t})()},XNiG:function(t,e,i){"use strict";i.d(e,"b",(function(){return l})),i.d(e,"a",(function(){return d}));var n=i("HDdC"),a=i("7o/Q"),s=i("quSY"),o=i("9ppp"),r=i("Ylt2"),c=i("2QA8");class l extends a.a{constructor(t){super(t),this.destination=t}}let d=(()=>{class t extends n.a{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[c.a](){return new l(this)}lift(t){const e=new h(this,this);return e.operator=t,e}next(t){if(this.closed)throw new o.a;if(!this.isStopped){const{observers:e}=this,i=e.length,n=e.slice();for(let a=0;a<i;a++)n[a].next(t)}}error(t){if(this.closed)throw new o.a;this.hasError=!0,this.thrownError=t,this.isStopped=!0;const{observers:e}=this,i=e.length,n=e.slice();for(let a=0;a<i;a++)n[a].error(t);this.observers.length=0}complete(){if(this.closed)throw new o.a;this.isStopped=!0;const{observers:t}=this,e=t.length,i=t.slice();for(let n=0;n<e;n++)i[n].complete();this.observers.length=0}unsubscribe(){this.isStopped=!0,this.closed=!0,this.observers=null}_trySubscribe(t){if(this.closed)throw new o.a;return super._trySubscribe(t)}_subscribe(t){if(this.closed)throw new o.a;return this.hasError?(t.error(this.thrownError),s.a.EMPTY):this.isStopped?(t.complete(),s.a.EMPTY):(this.observers.push(t),new r.a(this,t))}asObservable(){const t=new n.a;return t.source=this,t}}return t.create=(t,e)=>new h(t,e),t})();class h extends d{constructor(t,e){super(),this.destination=t,this.source=e}next(t){const{destination:e}=this;e&&e.next&&e.next(t)}error(t){const{destination:e}=this;e&&e.error&&this.destination.error(t)}complete(){const{destination:t}=this;t&&t.complete&&this.destination.complete()}_subscribe(t){const{source:e}=this;return e?this.source.subscribe(t):s.a.EMPTY}}},Xa2L:function(t,e,i){"use strict";i.d(e,"a",(function(){return g})),i.d(e,"b",(function(){return _})),i.d(e,"c",(function(){return v}));var n=i("fXoL"),a=i("ofXK"),s=i("FKr1"),o=i("8LU1"),r=i("nLfN"),c=i("R1ws");function l(t,e){if(1&t&&(n.gc(),n.Rb(0,"circle",3)),2&t){const t=n.hc();n.Lc("animation-name","mat-progress-spinner-stroke-rotate-"+t._spinnerAnimationLabel)("stroke-dashoffset",t._getStrokeDashOffset(),"px")("stroke-dasharray",t._getStrokeCircumference(),"px")("stroke-width",t._getCircleStrokeWidth(),"%"),n.Eb("r",t._getCircleRadius())}}function d(t,e){if(1&t&&(n.gc(),n.Rb(0,"circle",3)),2&t){const t=n.hc();n.Lc("stroke-dashoffset",t._getStrokeDashOffset(),"px")("stroke-dasharray",t._getStrokeCircumference(),"px")("stroke-width",t._getCircleStrokeWidth(),"%"),n.Eb("r",t._getCircleRadius())}}function h(t,e){if(1&t&&(n.gc(),n.Rb(0,"circle",3)),2&t){const t=n.hc();n.Lc("animation-name","mat-progress-spinner-stroke-rotate-"+t._spinnerAnimationLabel)("stroke-dashoffset",t._getStrokeDashOffset(),"px")("stroke-dasharray",t._getStrokeCircumference(),"px")("stroke-width",t._getCircleStrokeWidth(),"%"),n.Eb("r",t._getCircleRadius())}}function u(t,e){if(1&t&&(n.gc(),n.Rb(0,"circle",3)),2&t){const t=n.hc();n.Lc("stroke-dashoffset",t._getStrokeDashOffset(),"px")("stroke-dasharray",t._getStrokeCircumference(),"px")("stroke-width",t._getCircleStrokeWidth(),"%"),n.Eb("r",t._getCircleRadius())}}const p=".mat-progress-spinner{display:block;position:relative}.mat-progress-spinner svg{position:absolute;transform:rotate(-90deg);top:0;left:0;transform-origin:center;overflow:visible}.mat-progress-spinner circle{fill:transparent;transform-origin:center;transition:stroke-dashoffset 225ms linear}._mat-animation-noopable.mat-progress-spinner circle{transition:none;animation:none}.cdk-high-contrast-active .mat-progress-spinner circle{stroke:currentColor}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate]{animation:mat-progress-spinner-linear-rotate 2000ms linear infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate]{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition-property:stroke;animation-duration:4000ms;animation-timing-function:cubic-bezier(0.35, 0, 0.25, 1);animation-iteration-count:infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate]{animation:mat-progress-spinner-stroke-rotate-fallback 10000ms cubic-bezier(0.87, 0.03, 0.33, 1) infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate]{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] circle{transition-property:stroke}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] circle{transition:none;animation:none}@keyframes mat-progress-spinner-linear-rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes mat-progress-spinner-stroke-rotate-100{0%{stroke-dashoffset:268.606171575px;transform:rotate(0)}12.5%{stroke-dashoffset:56.5486677px;transform:rotate(0)}12.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(72.5deg)}25%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(72.5deg)}25.0001%{stroke-dashoffset:268.606171575px;transform:rotate(270deg)}37.5%{stroke-dashoffset:56.5486677px;transform:rotate(270deg)}37.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(161.5deg)}50%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(161.5deg)}50.0001%{stroke-dashoffset:268.606171575px;transform:rotate(180deg)}62.5%{stroke-dashoffset:56.5486677px;transform:rotate(180deg)}62.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(251.5deg)}75%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(251.5deg)}75.0001%{stroke-dashoffset:268.606171575px;transform:rotate(90deg)}87.5%{stroke-dashoffset:56.5486677px;transform:rotate(90deg)}87.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(341.5deg)}100%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(341.5deg)}}@keyframes mat-progress-spinner-stroke-rotate-fallback{0%{transform:rotate(0deg)}25%{transform:rotate(1170deg)}50%{transform:rotate(2340deg)}75%{transform:rotate(3510deg)}100%{transform:rotate(4680deg)}}\n";class b{constructor(t){this._elementRef=t}}const f=Object(s.A)(b,"primary"),m=new n.s("mat-progress-spinner-default-options",{providedIn:"root",factory:function(){return{diameter:100}}});let g=(()=>{class t extends f{constructor(e,i,n,a,s){super(e),this._elementRef=e,this._document=n,this._diameter=100,this._value=0,this._fallbackAnimation=!1,this.mode="determinate";const o=t._diameters;this._spinnerAnimationLabel=this._getSpinnerAnimationLabel(),o.has(n.head)||o.set(n.head,new Set([100])),this._fallbackAnimation=i.EDGE||i.TRIDENT,this._noopAnimations="NoopAnimations"===a&&!!s&&!s._forceAnimations,s&&(s.diameter&&(this.diameter=s.diameter),s.strokeWidth&&(this.strokeWidth=s.strokeWidth))}get diameter(){return this._diameter}set diameter(t){this._diameter=Object(o.f)(t),this._spinnerAnimationLabel=this._getSpinnerAnimationLabel(),!this._fallbackAnimation&&this._styleRoot&&this._attachStyleNode()}get strokeWidth(){return this._strokeWidth||this.diameter/10}set strokeWidth(t){this._strokeWidth=Object(o.f)(t)}get value(){return"determinate"===this.mode?this._value:0}set value(t){this._value=Math.max(0,Math.min(100,Object(o.f)(t)))}ngOnInit(){const t=this._elementRef.nativeElement;this._styleRoot=Object(r.c)(t)||this._document.head,this._attachStyleNode(),t.classList.add(`mat-progress-spinner-indeterminate${this._fallbackAnimation?"-fallback":""}-animation`)}_getCircleRadius(){return(this.diameter-10)/2}_getViewBox(){const t=2*this._getCircleRadius()+this.strokeWidth;return`0 0 ${t} ${t}`}_getStrokeCircumference(){return 2*Math.PI*this._getCircleRadius()}_getStrokeDashOffset(){return"determinate"===this.mode?this._getStrokeCircumference()*(100-this._value)/100:this._fallbackAnimation&&"indeterminate"===this.mode?.2*this._getStrokeCircumference():null}_getCircleStrokeWidth(){return this.strokeWidth/this.diameter*100}_attachStyleNode(){const e=this._styleRoot,i=this._diameter,n=t._diameters;let a=n.get(e);if(!a||!a.has(i)){const t=this._document.createElement("style");t.setAttribute("mat-spinner-animation",this._spinnerAnimationLabel),t.textContent=this._getAnimationText(),e.appendChild(t),a||(a=new Set,n.set(e,a)),a.add(i)}}_getAnimationText(){const t=this._getStrokeCircumference();return"\n @keyframes mat-progress-spinner-stroke-rotate-DIAMETER {\n 0% { stroke-dashoffset: START_VALUE; transform: rotate(0); }\n 12.5% { stroke-dashoffset: END_VALUE; transform: rotate(0); }\n 12.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n 25% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n\n 25.0001% { stroke-dashoffset: START_VALUE; transform: rotate(270deg); }\n 37.5% { stroke-dashoffset: END_VALUE; transform: rotate(270deg); }\n 37.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n 50% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n\n 50.0001% { stroke-dashoffset: START_VALUE; transform: rotate(180deg); }\n 62.5% { stroke-dashoffset: END_VALUE; transform: rotate(180deg); }\n 62.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n 75% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n\n 75.0001% { stroke-dashoffset: START_VALUE; transform: rotate(90deg); }\n 87.5% { stroke-dashoffset: END_VALUE; transform: rotate(90deg); }\n 87.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n 100% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n }\n".replace(/START_VALUE/g,""+.95*t).replace(/END_VALUE/g,""+.2*t).replace(/DIAMETER/g,""+this._spinnerAnimationLabel)}_getSpinnerAnimationLabel(){return this.diameter.toString().replace(".","_")}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(r.a),n.Qb(a.e,8),n.Qb(c.a,8),n.Qb(m))},t.\u0275cmp=n.Kb({type:t,selectors:[["mat-progress-spinner"]],hostAttrs:["role","progressbar",1,"mat-progress-spinner"],hostVars:10,hostBindings:function(t,e){2&t&&(n.Eb("aria-valuemin","determinate"===e.mode?0:null)("aria-valuemax","determinate"===e.mode?100:null)("aria-valuenow","determinate"===e.mode?e.value:null)("mode",e.mode),n.Lc("width",e.diameter,"px")("height",e.diameter,"px"),n.Ib("_mat-animation-noopable",e._noopAnimations))},inputs:{color:"color",mode:"mode",diameter:"diameter",strokeWidth:"strokeWidth",value:"value"},exportAs:["matProgressSpinner"],features:[n.Ab],decls:3,vars:8,consts:[["preserveAspectRatio","xMidYMid meet","focusable","false",3,"ngSwitch"],["cx","50%","cy","50%",3,"animation-name","stroke-dashoffset","stroke-dasharray","stroke-width",4,"ngSwitchCase"],["cx","50%","cy","50%",3,"stroke-dashoffset","stroke-dasharray","stroke-width",4,"ngSwitchCase"],["cx","50%","cy","50%"]],template:function(t,e){1&t&&(n.gc(),n.Wb(0,"svg",0),n.Oc(1,l,1,9,"circle",1),n.Oc(2,d,1,7,"circle",2),n.Vb()),2&t&&(n.Lc("width",e.diameter,"px")("height",e.diameter,"px"),n.oc("ngSwitch","indeterminate"===e.mode),n.Eb("viewBox",e._getViewBox()),n.Db(1),n.oc("ngSwitchCase",!0),n.Db(1),n.oc("ngSwitchCase",!1))},directives:[a.x,a.y],styles:[p],encapsulation:2,changeDetection:0}),t._diameters=new WeakMap,t})(),v=(()=>{class t extends g{constructor(t,e,i,n,a){super(t,e,i,n,a),this.mode="indeterminate"}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(r.a),n.Qb(a.e,8),n.Qb(c.a,8),n.Qb(m))},t.\u0275cmp=n.Kb({type:t,selectors:[["mat-spinner"]],hostAttrs:["role","progressbar","mode","indeterminate",1,"mat-spinner","mat-progress-spinner"],hostVars:6,hostBindings:function(t,e){2&t&&(n.Lc("width",e.diameter,"px")("height",e.diameter,"px"),n.Ib("_mat-animation-noopable",e._noopAnimations))},inputs:{color:"color"},features:[n.Ab],decls:3,vars:8,consts:[["preserveAspectRatio","xMidYMid meet","focusable","false",3,"ngSwitch"],["cx","50%","cy","50%",3,"animation-name","stroke-dashoffset","stroke-dasharray","stroke-width",4,"ngSwitchCase"],["cx","50%","cy","50%",3,"stroke-dashoffset","stroke-dasharray","stroke-width",4,"ngSwitchCase"],["cx","50%","cy","50%"]],template:function(t,e){1&t&&(n.gc(),n.Wb(0,"svg",0),n.Oc(1,h,1,9,"circle",1),n.Oc(2,u,1,7,"circle",2),n.Vb()),2&t&&(n.Lc("width",e.diameter,"px")("height",e.diameter,"px"),n.oc("ngSwitch","indeterminate"===e.mode),n.Eb("viewBox",e._getViewBox()),n.Db(1),n.oc("ngSwitchCase",!0),n.Db(1),n.oc("ngSwitchCase",!1))},directives:[a.x,a.y],styles:[p],encapsulation:2,changeDetection:0}),t})(),_=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[s.k,a.c],s.k]}),t})()},XhcP:function(t,e,i){"use strict";i.d(e,"a",(function(){return z})),i.d(e,"b",(function(){return B})),i.d(e,"c",(function(){return N})),i.d(e,"d",(function(){return $})),i.d(e,"e",(function(){return G})),i.d(e,"f",(function(){return U})),i.d(e,"g",(function(){return q}));var n=i("nLfN"),a=i("vxfF"),s=i("ofXK"),o=i("fXoL"),r=i("FKr1"),c=i("8LU1"),l=i("FtGj"),d=i("XNiG"),h=i("xgIS"),u=i("VRyK"),p=i("pLZG"),b=i("lJxs"),f=i("7o/Q");function m(t){return e=>e.lift(new g(t))}class g{constructor(t){this.value=t}call(t,e){return e.subscribe(new v(t,this.value))}}class v extends f.a{constructor(t,e){super(t),this.value=e}_next(t){this.destination.next(this.value)}}var _=i("1G5W"),y=i("/uUt"),x=i("IzEk"),C=i("JX91"),O=i("Kj3r"),D=i("R0Ic"),w=i("R1ws"),M=i("u47x"),k=i("cH1L");const S=["*"];function I(t,e){if(1&t){const t=o.Xb();o.Wb(0,"div",2),o.dc("click",(function(){return o.Dc(t),o.hc()._onBackdropClicked()})),o.Vb()}if(2&t){const t=o.hc();o.Ib("mat-drawer-shown",t._isShowingBackdrop())}}function P(t,e){1&t&&(o.Wb(0,"mat-drawer-content"),o.mc(1,2),o.Vb())}const V=[[["mat-drawer"]],[["mat-drawer-content"]],"*"],R=["mat-drawer","mat-drawer-content","*"];function j(t,e){if(1&t){const t=o.Xb();o.Wb(0,"div",2),o.dc("click",(function(){return o.Dc(t),o.hc()._onBackdropClicked()})),o.Vb()}if(2&t){const t=o.hc();o.Ib("mat-drawer-shown",t._isShowingBackdrop())}}function A(t,e){1&t&&(o.Wb(0,"mat-sidenav-content",3),o.mc(1,2),o.Vb())}const W=[[["mat-sidenav"]],[["mat-sidenav-content"]],"*"],T=["mat-sidenav","mat-sidenav-content","*"],E=".mat-drawer-container{position:relative;z-index:1;box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}.cdk-high-contrast-active .mat-drawer-backdrop{opacity:.5}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}.cdk-high-contrast-active .mat-drawer,.cdk-high-contrast-active [dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}.cdk-high-contrast-active [dir=rtl] .mat-drawer,.cdk-high-contrast-active .mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer{transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto;-webkit-overflow-scrolling:touch}.mat-sidenav-fixed{position:fixed}\n",F={transformDrawer:Object(D.n)("transform",[Object(D.k)("open, open-instant",Object(D.l)({transform:"none",visibility:"visible"})),Object(D.k)("void",Object(D.l)({"box-shadow":"none",visibility:"hidden"})),Object(D.m)("void => open-instant",Object(D.e)("0ms")),Object(D.m)("void <=> open, open-instant => void",Object(D.e)("400ms cubic-bezier(0.25, 0.8, 0.25, 1)"))])},L=new o.s("MAT_DRAWER_DEFAULT_AUTOSIZE",{providedIn:"root",factory:function(){return!1}}),Q=new o.s("MAT_DRAWER_CONTAINER");let N=(()=>{class t extends a.b{constructor(t,e,i,n,a){super(i,n,a),this._changeDetectorRef=t,this._container=e}ngAfterContentInit(){this._container._contentMarginChanges.subscribe(()=>{this._changeDetectorRef.markForCheck()})}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(o.h),o.Qb(Object(o.X)(()=>B)),o.Qb(o.l),o.Qb(a.f),o.Qb(o.C))},t.\u0275cmp=o.Kb({type:t,selectors:[["mat-drawer-content"]],hostAttrs:[1,"mat-drawer-content"],hostVars:4,hostBindings:function(t,e){2&t&&o.Lc("margin-left",e._container._contentMargins.left,"px")("margin-right",e._container._contentMargins.right,"px")},features:[o.Ab],ngContentSelectors:S,decls:1,vars:0,template:function(t,e){1&t&&(o.nc(),o.mc(0))},encapsulation:2,changeDetection:0}),t})(),z=(()=>{class t{constructor(t,e,i,n,a,s,r){this._elementRef=t,this._focusTrapFactory=e,this._focusMonitor=i,this._platform=n,this._ngZone=a,this._doc=s,this._container=r,this._elementFocusedBeforeDrawerWasOpened=null,this._enableAnimations=!1,this._position="start",this._mode="over",this._disableClose=!1,this._opened=!1,this._animationStarted=new d.a,this._animationEnd=new d.a,this._animationState="void",this.openedChange=new o.o(!0),this._openedStream=this.openedChange.pipe(Object(p.a)(t=>t),Object(b.a)(()=>{})),this.openedStart=this._animationStarted.pipe(Object(p.a)(t=>t.fromState!==t.toState&&0===t.toState.indexOf("open")),m(void 0)),this._closedStream=this.openedChange.pipe(Object(p.a)(t=>!t),Object(b.a)(()=>{})),this.closedStart=this._animationStarted.pipe(Object(p.a)(t=>t.fromState!==t.toState&&"void"===t.toState),m(void 0)),this._destroyed=new d.a,this.onPositionChanged=new o.o,this._modeChanged=new d.a,this.openedChange.subscribe(t=>{t?(this._doc&&(this._elementFocusedBeforeDrawerWasOpened=this._doc.activeElement),this._takeFocus()):this._isFocusWithinDrawer()&&this._restoreFocus()}),this._ngZone.runOutsideAngular(()=>{Object(h.a)(this._elementRef.nativeElement,"keydown").pipe(Object(p.a)(t=>t.keyCode===l.h&&!this.disableClose&&!Object(l.v)(t)),Object(_.a)(this._destroyed)).subscribe(t=>this._ngZone.run(()=>{this.close(),t.stopPropagation(),t.preventDefault()}))}),this._animationEnd.pipe(Object(y.a)((t,e)=>t.fromState===e.fromState&&t.toState===e.toState)).subscribe(t=>{const{fromState:e,toState:i}=t;(0===i.indexOf("open")&&"void"===e||"void"===i&&0===e.indexOf("open"))&&this.openedChange.emit(this._opened)})}get position(){return this._position}set position(t){(t="end"===t?"end":"start")!=this._position&&(this._position=t,this.onPositionChanged.emit())}get mode(){return this._mode}set mode(t){this._mode=t,this._updateFocusTrapState(),this._modeChanged.next()}get disableClose(){return this._disableClose}set disableClose(t){this._disableClose=Object(c.c)(t)}get autoFocus(){const t=this._autoFocus;return null==t?"side"!==this.mode:t}set autoFocus(t){this._autoFocus=Object(c.c)(t)}get opened(){return this._opened}set opened(t){this.toggle(Object(c.c)(t))}_takeFocus(){this.autoFocus&&this._focusTrap&&this._focusTrap.focusInitialElementWhenReady().then(t=>{t||"function"!=typeof this._elementRef.nativeElement.focus||this._elementRef.nativeElement.focus()})}_restoreFocus(){this.autoFocus&&(this._elementFocusedBeforeDrawerWasOpened?this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened,this._openedVia):this._elementRef.nativeElement.blur(),this._elementFocusedBeforeDrawerWasOpened=null,this._openedVia=null)}_isFocusWithinDrawer(){var t;const e=null===(t=this._doc)||void 0===t?void 0:t.activeElement;return!!e&&this._elementRef.nativeElement.contains(e)}ngAfterContentInit(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._updateFocusTrapState()}ngAfterContentChecked(){this._platform.isBrowser&&(this._enableAnimations=!0)}ngOnDestroy(){this._focusTrap&&this._focusTrap.destroy(),this._animationStarted.complete(),this._animationEnd.complete(),this._modeChanged.complete(),this._destroyed.next(),this._destroyed.complete()}open(t){return this.toggle(!0,t)}close(){return this.toggle(!1)}_closeViaBackdropClick(){return this._setOpen(!1,!0)}toggle(t=!this.opened,e){return this._setOpen(t,!t&&this._isFocusWithinDrawer(),e)}_setOpen(t,e,i="program"){return this._opened=t,t?(this._animationState=this._enableAnimations?"open":"open-instant",this._openedVia=i):(this._animationState="void",e&&this._restoreFocus()),this._updateFocusTrapState(),new Promise(t=>{this.openedChange.pipe(Object(x.a)(1)).subscribe(e=>t(e?"open":"close"))})}_getWidth(){return this._elementRef.nativeElement&&this._elementRef.nativeElement.offsetWidth||0}_updateFocusTrapState(){this._focusTrap&&(this._focusTrap.enabled=this.opened&&"side"!==this.mode)}_animationStartListener(t){this._animationStarted.next(t)}_animationDoneListener(t){this._animationEnd.next(t)}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(o.l),o.Qb(M.i),o.Qb(M.h),o.Qb(n.a),o.Qb(o.C),o.Qb(s.e,8),o.Qb(Q,8))},t.\u0275cmp=o.Kb({type:t,selectors:[["mat-drawer"]],hostAttrs:["tabIndex","-1",1,"mat-drawer"],hostVars:12,hostBindings:function(t,e){1&t&&o.Mc("@transform.start",(function(t){return e._animationStartListener(t)}))("@transform.done",(function(t){return e._animationDoneListener(t)})),2&t&&(o.Eb("align",null),o.Nc("@transform",e._animationState),o.Ib("mat-drawer-end","end"===e.position)("mat-drawer-over","over"===e.mode)("mat-drawer-push","push"===e.mode)("mat-drawer-side","side"===e.mode)("mat-drawer-opened",e.opened))},inputs:{position:"position",mode:"mode",disableClose:"disableClose",autoFocus:"autoFocus",opened:"opened"},outputs:{openedChange:"openedChange",_openedStream:"opened",openedStart:"openedStart",_closedStream:"closed",closedStart:"closedStart",onPositionChanged:"positionChanged"},exportAs:["matDrawer"],ngContentSelectors:S,decls:2,vars:0,consts:[[1,"mat-drawer-inner-container"]],template:function(t,e){1&t&&(o.nc(),o.Wb(0,"div",0),o.mc(1),o.Vb())},encapsulation:2,data:{animation:[F.transformDrawer]},changeDetection:0}),t})(),B=(()=>{class t{constructor(t,e,i,n,a,s=!1,r){this._dir=t,this._element=e,this._ngZone=i,this._changeDetectorRef=n,this._animationMode=r,this._drawers=new o.H,this.backdropClick=new o.o,this._destroyed=new d.a,this._doCheckSubject=new d.a,this._contentMargins={left:null,right:null},this._contentMarginChanges=new d.a,t&&t.change.pipe(Object(_.a)(this._destroyed)).subscribe(()=>{this._validateDrawers(),this.updateContentMargins()}),a.change().pipe(Object(_.a)(this._destroyed)).subscribe(()=>this.updateContentMargins()),this._autosize=s}get start(){return this._start}get end(){return this._end}get autosize(){return this._autosize}set autosize(t){this._autosize=Object(c.c)(t)}get hasBackdrop(){return null==this._backdropOverride?!this._start||"side"!==this._start.mode||!this._end||"side"!==this._end.mode:this._backdropOverride}set hasBackdrop(t){this._backdropOverride=null==t?null:Object(c.c)(t)}get scrollable(){return this._userContent||this._content}ngAfterContentInit(){this._allDrawers.changes.pipe(Object(C.a)(this._allDrawers),Object(_.a)(this._destroyed)).subscribe(t=>{this._drawers.reset(t.filter(t=>!t._container||t._container===this)),this._drawers.notifyOnChanges()}),this._drawers.changes.pipe(Object(C.a)(null)).subscribe(()=>{this._validateDrawers(),this._drawers.forEach(t=>{this._watchDrawerToggle(t),this._watchDrawerPosition(t),this._watchDrawerMode(t)}),(!this._drawers.length||this._isDrawerOpen(this._start)||this._isDrawerOpen(this._end))&&this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),this._ngZone.runOutsideAngular(()=>{this._doCheckSubject.pipe(Object(O.a)(10),Object(_.a)(this._destroyed)).subscribe(()=>this.updateContentMargins())})}ngOnDestroy(){this._contentMarginChanges.complete(),this._doCheckSubject.complete(),this._drawers.destroy(),this._destroyed.next(),this._destroyed.complete()}open(){this._drawers.forEach(t=>t.open())}close(){this._drawers.forEach(t=>t.close())}updateContentMargins(){let t=0,e=0;if(this._left&&this._left.opened)if("side"==this._left.mode)t+=this._left._getWidth();else if("push"==this._left.mode){const i=this._left._getWidth();t+=i,e-=i}if(this._right&&this._right.opened)if("side"==this._right.mode)e+=this._right._getWidth();else if("push"==this._right.mode){const i=this._right._getWidth();e+=i,t-=i}t=t||null,e=e||null,t===this._contentMargins.left&&e===this._contentMargins.right||(this._contentMargins={left:t,right:e},this._ngZone.run(()=>this._contentMarginChanges.next(this._contentMargins)))}ngDoCheck(){this._autosize&&this._isPushed()&&this._ngZone.runOutsideAngular(()=>this._doCheckSubject.next())}_watchDrawerToggle(t){t._animationStarted.pipe(Object(p.a)(t=>t.fromState!==t.toState),Object(_.a)(this._drawers.changes)).subscribe(t=>{"open-instant"!==t.toState&&"NoopAnimations"!==this._animationMode&&this._element.nativeElement.classList.add("mat-drawer-transition"),this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),"side"!==t.mode&&t.openedChange.pipe(Object(_.a)(this._drawers.changes)).subscribe(()=>this._setContainerClass(t.opened))}_watchDrawerPosition(t){t&&t.onPositionChanged.pipe(Object(_.a)(this._drawers.changes)).subscribe(()=>{this._ngZone.onMicrotaskEmpty.pipe(Object(x.a)(1)).subscribe(()=>{this._validateDrawers()})})}_watchDrawerMode(t){t&&t._modeChanged.pipe(Object(_.a)(Object(u.a)(this._drawers.changes,this._destroyed))).subscribe(()=>{this.updateContentMargins(),this._changeDetectorRef.markForCheck()})}_setContainerClass(t){const e=this._element.nativeElement.classList,i="mat-drawer-container-has-open";t?e.add(i):e.remove(i)}_validateDrawers(){this._start=this._end=null,this._drawers.forEach(t=>{"end"==t.position?this._end=t:this._start=t}),this._right=this._left=null,this._dir&&"rtl"===this._dir.value?(this._left=this._end,this._right=this._start):(this._left=this._start,this._right=this._end)}_isPushed(){return this._isDrawerOpen(this._start)&&"over"!=this._start.mode||this._isDrawerOpen(this._end)&&"over"!=this._end.mode}_onBackdropClicked(){this.backdropClick.emit(),this._closeModalDrawersViaBackdrop()}_closeModalDrawersViaBackdrop(){[this._start,this._end].filter(t=>t&&!t.disableClose&&this._canHaveBackdrop(t)).forEach(t=>t._closeViaBackdropClick())}_isShowingBackdrop(){return this._isDrawerOpen(this._start)&&this._canHaveBackdrop(this._start)||this._isDrawerOpen(this._end)&&this._canHaveBackdrop(this._end)}_canHaveBackdrop(t){return"side"!==t.mode||!!this._backdropOverride}_isDrawerOpen(t){return null!=t&&t.opened}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(k.c,8),o.Qb(o.l),o.Qb(o.C),o.Qb(o.h),o.Qb(a.h),o.Qb(L),o.Qb(w.a,8))},t.\u0275cmp=o.Kb({type:t,selectors:[["mat-drawer-container"]],contentQueries:function(t,e,i){var n;1&t&&(o.Jb(i,N,!0),o.Jb(i,z,!0)),2&t&&(o.yc(n=o.ec())&&(e._content=n.first),o.yc(n=o.ec())&&(e._allDrawers=n))},viewQuery:function(t,e){var i;1&t&&o.Xc(N,!0),2&t&&o.yc(i=o.ec())&&(e._userContent=i.first)},hostAttrs:[1,"mat-drawer-container"],hostVars:2,hostBindings:function(t,e){2&t&&o.Ib("mat-drawer-container-explicit-backdrop",e._backdropOverride)},inputs:{autosize:"autosize",hasBackdrop:"hasBackdrop"},outputs:{backdropClick:"backdropClick"},exportAs:["matDrawerContainer"],features:[o.Cb([{provide:Q,useExisting:t}])],ngContentSelectors:R,decls:4,vars:2,consts:[["class","mat-drawer-backdrop",3,"mat-drawer-shown","click",4,"ngIf"],[4,"ngIf"],[1,"mat-drawer-backdrop",3,"click"]],template:function(t,e){1&t&&(o.nc(V),o.Oc(0,I,1,2,"div",0),o.mc(1),o.mc(2,1),o.Oc(3,P,2,0,"mat-drawer-content",1)),2&t&&(o.oc("ngIf",e.hasBackdrop),o.Db(3),o.oc("ngIf",!e._content))},directives:[s.t,N],styles:[E],encapsulation:2,changeDetection:0}),t})(),U=(()=>{class t extends N{constructor(t,e,i,n,a){super(t,e,i,n,a)}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(o.h),o.Qb(Object(o.X)(()=>G)),o.Qb(o.l),o.Qb(a.f),o.Qb(o.C))},t.\u0275cmp=o.Kb({type:t,selectors:[["mat-sidenav-content"]],hostAttrs:[1,"mat-drawer-content","mat-sidenav-content"],hostVars:4,hostBindings:function(t,e){2&t&&o.Lc("margin-left",e._container._contentMargins.left,"px")("margin-right",e._container._contentMargins.right,"px")},features:[o.Ab],ngContentSelectors:S,decls:1,vars:0,template:function(t,e){1&t&&(o.nc(),o.mc(0))},encapsulation:2,changeDetection:0}),t})(),$=(()=>{class t extends z{constructor(){super(...arguments),this._fixedInViewport=!1,this._fixedTopGap=0,this._fixedBottomGap=0}get fixedInViewport(){return this._fixedInViewport}set fixedInViewport(t){this._fixedInViewport=Object(c.c)(t)}get fixedTopGap(){return this._fixedTopGap}set fixedTopGap(t){this._fixedTopGap=Object(c.f)(t)}get fixedBottomGap(){return this._fixedBottomGap}set fixedBottomGap(t){this._fixedBottomGap=Object(c.f)(t)}}return t.\u0275fac=function(e){return H(e||t)},t.\u0275cmp=o.Kb({type:t,selectors:[["mat-sidenav"]],hostAttrs:["tabIndex","-1",1,"mat-drawer","mat-sidenav"],hostVars:17,hostBindings:function(t,e){2&t&&(o.Eb("align",null),o.Lc("top",e.fixedInViewport?e.fixedTopGap:null,"px")("bottom",e.fixedInViewport?e.fixedBottomGap:null,"px"),o.Ib("mat-drawer-end","end"===e.position)("mat-drawer-over","over"===e.mode)("mat-drawer-push","push"===e.mode)("mat-drawer-side","side"===e.mode)("mat-drawer-opened",e.opened)("mat-sidenav-fixed",e.fixedInViewport))},inputs:{fixedInViewport:"fixedInViewport",fixedTopGap:"fixedTopGap",fixedBottomGap:"fixedBottomGap"},exportAs:["matSidenav"],features:[o.Ab],ngContentSelectors:S,decls:2,vars:0,consts:[[1,"mat-drawer-inner-container"]],template:function(t,e){1&t&&(o.nc(),o.Wb(0,"div",0),o.mc(1),o.Vb())},encapsulation:2,data:{animation:[F.transformDrawer]},changeDetection:0}),t})();const H=o.Yb($);let G=(()=>{class t extends B{}return t.\u0275fac=function(e){return X(e||t)},t.\u0275cmp=o.Kb({type:t,selectors:[["mat-sidenav-container"]],contentQueries:function(t,e,i){var n;1&t&&(o.Jb(i,U,!0),o.Jb(i,$,!0)),2&t&&(o.yc(n=o.ec())&&(e._content=n.first),o.yc(n=o.ec())&&(e._allDrawers=n))},hostAttrs:[1,"mat-drawer-container","mat-sidenav-container"],hostVars:2,hostBindings:function(t,e){2&t&&o.Ib("mat-drawer-container-explicit-backdrop",e._backdropOverride)},exportAs:["matSidenavContainer"],features:[o.Cb([{provide:Q,useExisting:t}]),o.Ab],ngContentSelectors:T,decls:4,vars:2,consts:[["class","mat-drawer-backdrop",3,"mat-drawer-shown","click",4,"ngIf"],["cdkScrollable","",4,"ngIf"],[1,"mat-drawer-backdrop",3,"click"],["cdkScrollable",""]],template:function(t,e){1&t&&(o.nc(W),o.Oc(0,j,1,2,"div",0),o.mc(1),o.mc(2,1),o.Oc(3,A,2,0,"mat-sidenav-content",1)),2&t&&(o.oc("ngIf",e.hasBackdrop),o.Db(3),o.oc("ngIf",!e._content))},directives:[s.t,U,a.b],styles:[E],encapsulation:2,changeDetection:0}),t})();const X=o.Yb(G);let q=(()=>{class t{}return t.\u0275mod=o.Ob({type:t}),t.\u0275inj=o.Nb({factory:function(e){return new(e||t)},imports:[[s.c,r.k,n.b,a.c],a.c,r.k]}),t})()},XoHu:function(t,e,i){"use strict";function n(t){return null!==t&&"object"==typeof t}i.d(e,"a",(function(){return n}))},XxY3:function(t,e){!function(t,e,i,n){t.DocEditor=function(n,s,o){var r=this,c=s||{};!function t(e,i){for(var n in i)i.hasOwnProperty(n)&&(void 0===e[n]?e[n]=i[n]:"object"==typeof e[n]&&"object"==typeof i[n]&&t(e[n],i[n]));return e}(c,t.DocEditor.defaultConfig),c.editorConfig.canUseHistory=c.events&&!!c.events.onRequestHistory,c.editorConfig.canHistoryClose=c.events&&!!c.events.onRequestHistoryClose,c.editorConfig.canHistoryRestore=c.events&&!!c.events.onRequestRestore,c.editorConfig.canSendEmailAddresses=c.events&&!!c.events.onRequestEmailAddresses,c.editorConfig.canRequestEditRights=c.events&&!!c.events.onRequestEditRights,c.editorConfig.canRequestClose=c.events&&!!c.events.onRequestClose,c.editorConfig.canRename=c.events&&!!c.events.onRequestRename,c.editorConfig.canMakeActionLink=c.events&&!!c.events.onMakeActionLink,c.editorConfig.canRequestUsers=c.events&&!!c.events.onRequestUsers,c.editorConfig.canRequestSendNotify=c.events&&!!c.events.onRequestSendNotify,c.editorConfig.mergeFolderUrl=c.editorConfig.mergeFolderUrl||c.editorConfig.saveAsUrl,c.editorConfig.canRequestSaveAs=c.events&&!!c.events.onRequestSaveAs,c.editorConfig.canRequestInsertImage=c.events&&!!c.events.onRequestInsertImage,c.editorConfig.canRequestMailMergeRecipients=c.events&&!!c.events.onRequestMailMergeRecipients,c.editorConfig.canRequestCompareFile=c.events&&!!c.events.onRequestCompareFile,c.editorConfig.canRequestSharingSettings=c.events&&!!c.events.onRequestSharingSettings,c.editorConfig.canRequestCreateNew=c.events&&!!c.events.onRequestCreateNew,c.frameEditorId=n,c.parentOrigin=e.location.origin,c.onlyOfficeIp=o;var l,d=function(t){x(t)},h=function(){e.addEventListener?e.addEventListener("mouseup",d,!1):e.attachEvent&&e.attachEvent("onmouseup",d)},u=function(){e.removeEventListener?e.removeEventListener("mouseup",d,!1):e.detachEvent&&e.detachEvent("onmouseup",d)};(l=/[\?\&]placement=(\w+)&?/.exec(e.location.search))&&l.length&&"desktop"==l[1]&&(c.editorConfig.targetApp=l[1],c.editorConfig.customization||(c.editorConfig.customization={}),c.editorConfig.customization.about=!1,c.editorConfig.customization.compactHeader=!1);var p,b=i.getElementById(n);if(b&&function(){if(c.document){if(!c.document.url||("string"!=typeof c.document.fileType||""==c.document.fileType)&&("string"!=typeof c.documentType||""==c.documentType))return e.alert("One or more required parameter for the config object is not set"),!1;var t;if("string"==typeof c.documentType&&""!=c.documentType){if(!(t={text:"docx","text-pdf":"pdf",spreadsheet:"xlsx",presentation:"pptx"}[c.documentType.toLowerCase()]))return e.alert('The "documentType" parameter for the config object is invalid. Please correct it.'),!1;"string"==typeof c.document.fileType&&""!=c.document.fileType||(c.document.fileType=t)}if("string"==typeof c.document.fileType&&""!=c.document.fileType){var i;if(c.document.fileType=c.document.fileType.toLowerCase(),!(i=/^(?:(xls|xlsx|ods|csv|xlst|xlsy|gsheet|xlsm|xlt|xltm|xltx|fods|ots)|(pps|ppsx|ppt|pptx|odp|pptt|ppty|gslides|pot|potm|potx|ppsm|pptm|fodp|otp)|(doc|docx|doct|odt|gdoc|txt|rtf|pdf|mht|htm|html|epub|djvu|xps|docm|dot|dotm|dotx|fodt|ott))$/.exec(c.document.fileType)))return e.alert('The "document.fileType" parameter for the config object is invalid. Please correct it.'),!1;"string"==typeof c.documentType&&""!=c.documentType||("string"==typeof i[1]?c.documentType="spreadsheet":"string"==typeof i[2]?c.documentType="presentation":"string"==typeof i[3]&&(c.documentType="text"))}if((i=/^(?:(pdf|djvu|xps))$/.exec(c.document.fileType))&&"string"==typeof i[1]&&(c.editorConfig.canUseHistory=!1),c.document.title&&""!=c.document.title||(c.document.title="Unnamed."+c.document.fileType),c.document.key){if("string"!=typeof c.document.key)return e.alert('The "document.key" parameter for the config object must be string. Please correct it.'),!1}else c.document.key="xxxxxxxxxxxxxxxxxxxx".replace(/[x]/g,(function(t){return(16*Math.random()|0).toString(16)}));c.document.token=c.token}return!0}()){if((p=function(t){var e=i.createElement("iframe");return e.src=function(t){var e=("undefined"==typeof extensionParams||null==extensionParams.url?null:extensionParams.url+"apps/")||function(t){return t.onlyOfficeIp+"/web-apps/apps/"}(t),i={text:"documenteditor","text-pdf":"documenteditor",spreadsheet:"spreadsheeteditor",presentation:"presentationeditor"},n=i.text;if("string"==typeof t.documentType)n=i[t.documentType.toLowerCase()];else if(t.document&&"string"==typeof t.document.fileType){var a=/^(?:(xls|xlsx|ods|csv|xlst|xlsy|gsheet|xlsm|xlt|xltm|xltx|fods|ots)|(pps|ppsx|ppt|pptx|odp|pptt|ppty|gslides|pot|potm|potx|ppsm|pptm|fodp|otp))$/.exec(t.document.fileType);a&&("string"==typeof a[1]?n=i.spreadsheet:"string"==typeof a[2]&&(n=i.presentation))}var s=navigator.userAgent.toLowerCase(),o=function(t){return t.test(s)},r=!o(/opera/)&&(o(/msie/)||o(/trident/)||o(/edge/)),c=!r&&o(/\bchrome\b/),l=!r&&!c&&o(/safari/)&&navigator.maxTouchPoints>0;e+=n+"/";var d="/index.html";if(t.editorConfig){var h=t.editorConfig.customization;"object"==typeof h&&(h.toolbarNoTabs||"desktop"!==t.editorConfig.targetApp&&(h.loaderName||h.loaderLogo))?d="/index_loader.html":"editdiagram"!=t.editorConfig.mode&&"editmerge"!=t.editorConfig.mode||(d="/index_internal.html")}return(e+="mobile"===t.type||l?"mobile":"embedded"===t.type?"embed":"main")+d}(t)+function(t){var e="?_dc=6.0.2-5";return t.editorConfig&&t.editorConfig.lang&&(e+="&lang="+t.editorConfig.lang),t.editorConfig&&"desktop"!==t.editorConfig.targetApp&&("object"==typeof t.editorConfig.customization&&t.editorConfig.customization.loaderName?"none"!==t.editorConfig.customization.loaderName&&(e+="&customer="+t.editorConfig.customization.loaderName):e+="&customer=ONLYOFFICE","object"==typeof t.editorConfig.customization&&t.editorConfig.customization.loaderLogo?""!==t.editorConfig.customization.loaderLogo&&(e+="&logo="+t.editorConfig.customization.loaderLogo):"object"==typeof t.editorConfig.customization&&t.editorConfig.customization.logo&&("embedded"==t.type&&t.editorConfig.customization.logo.imageEmbedded?e+="&headerlogo="+t.editorConfig.customization.logo.imageEmbedded:"embedded"!=t.type&&t.editorConfig.customization.logo.image&&(e+="&headerlogo="+t.editorConfig.customization.logo.image))),!t.editorConfig||"editdiagram"!=t.editorConfig.mode&&"editmerge"!=t.editorConfig.mode||(e+="&internal=true"),t.frameEditorId&&(e+="&frameEditorId="+t.frameEditorId),(t.editorConfig&&"view"==t.editorConfig.mode||t.document&&t.document.permissions&&!1===t.document.permissions.edit&&!t.document.permissions.review)&&(e+="&mode=view"),t.editorConfig&&t.editorConfig.customization&&t.editorConfig.customization.compactHeader&&(e+="&compact=true"),t.editorConfig&&t.editorConfig.customization&&!1===t.editorConfig.customization.toolbar&&(e+="&toolbar=false"),t.parentOrigin&&(e+="&parentOrigin="+t.parentOrigin),e}(t),e.width=t.width,e.height=t.height,e.align="top",e.frameBorder=0,e.name="frameEditor",e.allowFullscreen=!0,e.setAttribute("allowfullscreen",""),e.setAttribute("onmousewheel",""),e.setAttribute("allow","autoplay"),"mobile"==t.type&&(e.style.position="fixed",e.style.overflow="hidden",i.body.style.overscrollBehaviorY="contain"),e}(c)).src){var f=p.src.split("/");this.frameOrigin=f[0]+"//"+f[2]}b.parentNode&&b.parentNode.replaceChild(p,b);var m=new a((function(t){if(t)if("onExternalPluginMessage"===t.type)g(t);else if(t.frameEditorId==n){var e=(c.events||{})[t.event];"onRequestEditRights"!==t.event||e?"onInternalMessage"===t.event&&t.data&&"localstorage"==t.data.type?function(t){if("get"==t.cmd){if(t.keys&&t.keys.length){var e=t.keys.split(","),i=e[0];for(n=0;++n<e.length;)i+="|"+e[n];for(n in i=new RegExp(i),a={},localStorage)i.test(n)&&(a[n]=localStorage[n])}else a=localStorage;g({command:"internalCommand",data:{type:"localstorage",keys:a}})}else if("set"==t.cmd){var n,a=t.keys;for(n in a)localStorage.setItem(n,a[n])}}(t.data.data):("onAppReady"===t.event&&("mobile"===c.type&&(i.body.onfocus=function(t){setTimeout((function(){p.contentWindow.focus(),g({command:"resetFocus",data:{}})}),10)}),h(),c.editorConfig&&v(c.editorConfig),c.document&&_(c.document)),e&&"function"==typeof e&&e.call(r,{target:r,data:t.data})):y(!1,"handler isn't defined")}}),this)}var g=function(t){var i;p&&p.contentWindow&&(i=p.contentWindow)&&i.postMessage&&e.JSON&&i.postMessage(e.JSON.stringify(t),"*")},v=function(t){g({command:"init",data:{config:t}})},_=function(t){g({command:"openDocument",data:{doc:t}})},y=function(t,e){g({command:"applyEditRights",data:{allowed:t,message:e}})},x=function(t){var e=p.getBoundingClientRect();g({command:"processMouse",data:{type:t.type,x:t.x-e.left,y:t.y-e.top,event:t}})};return{showMessage:function(t,e){g({command:"showMessage",data:{msg:e=e||t}})},processSaveResult:function(t,e){g({command:"processSaveResult",data:{result:t,message:e}})},processRightsChange:function(t,e){g({command:"processRightsChange",data:{enabled:t,message:e}})},denyEditingRights:function(t){g({command:"processRightsChange",data:{enabled:!1,message:t}})},refreshHistory:function(t,e){g({command:"refreshHistory",data:{data:t,message:e}})},setHistoryData:function(t,e){g({command:"setHistoryData",data:{data:t,message:e}})},setEmailAddresses:function(t){g({command:"setEmailAddresses",data:{data:t}})},setActionLink:function(t){g({command:"setActionLink",data:{url:t}})},processMailMerge:function(t,e){g({command:"processMailMerge",data:{enabled:t,message:e}})},downloadAs:function(t){g({command:"downloadAs",data:t})},serviceCommand:function(t,e){g({command:"internalCommand",data:{command:t,data:e}})},attachMouseEvents:h,detachMouseEvents:u,destroyEditor:function(t){var e=i.createElement("div");e.setAttribute("id",n),p&&(m&&m.unbindEvents(),u(),p.parentNode&&p.parentNode.replaceChild(e,p))},setUsers:function(t){g({command:"setUsers",data:t})},showSharingSettings:function(t){g({command:"showSharingSettings",data:t})},setSharingSettings:function(t){g({command:"setSharingSettings",data:t})},insertImage:function(t){g({command:"insertImage",data:t})},setMailMergeRecipients:function(t){g({command:"setMailMergeRecipients",data:t})},setRevisedFile:function(t){g({command:"setRevisedFile",data:t})}}},t.DocEditor.defaultConfig={type:"desktop",width:"100%",height:"100%",editorConfig:{lang:"en",canCoAuthoring:!0,customization:{about:!0,feedback:!1}}},t.DocEditor.version=function(){return"6.0.2"};var a=function(t,i){var n=t,a=i||e,s=function(t){o(t)},o=function(t){if(t&&e.JSON&&a.frameOrigin==t.origin)try{t=e.JSON.parse(t.data),n&&n.call(a,t)}catch(i){}};return(function(){e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent&&e.attachEvent("onmessage",s)}).call(this),{unbindEvents:function(){e.removeEventListener?e.removeEventListener("message",s,!1):e.detachEvent&&e.detachEvent("onmessage",s)}}}}(window.DocsAPI=window.DocsAPI||{},window,document)},Y7HM:function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var n=i("DH7j");function a(t){return!Object(n.a)(t)&&t-parseFloat(t)+1>=0}},Ylt2:function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var n=i("quSY");class a extends n.a{constructor(t,e){super(),this.subject=t,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const t=this.subject,e=t.observers;if(this.subject=null,!e||0===e.length||t.isStopped||t.closed)return;const i=e.indexOf(this.subscriber);-1!==i&&e.splice(i,1)}}},aEDk:function(t,e,i){"use strict";i.d(e,"a",(function(){return d})),i.d(e,"b",(function(){return x})),i.d(e,"c",(function(){return C})),i.d(e,"d",(function(){return k})),i.d(e,"e",(function(){return u})),i.d(e,"f",(function(){return O})),i.d(e,"g",(function(){return I})),i.d(e,"h",(function(){return w})),i.d(e,"i",(function(){return W})),i.d(e,"j",(function(){return V})),i.d(e,"k",(function(){return p})),i.d(e,"l",(function(){return r})),i.d(e,"m",(function(){return S})),i.d(e,"n",(function(){return b})),i.d(e,"o",(function(){return f})),i.d(e,"p",(function(){return m})),i.d(e,"q",(function(){return y})),i.d(e,"r",(function(){return g})),i.d(e,"s",(function(){return M})),i.d(e,"t",(function(){return v})),i.d(e,"u",(function(){return _})),i.d(e,"v",(function(){return h})),i.d(e,"w",(function(){return D})),i.d(e,"x",(function(){return P}));var n=i("fXoL");function a(t){return"string"==typeof t}function s(t){return-1!==["a","e","i","o","u"].indexOf(t)}function o(t){const[e,...i]=t.split(/\s/g);return[e.toLowerCase().split(/(?=['|-])/g).map(t=>t.indexOf("-")+t.indexOf("'")>-2?t.slice(0,2).toUpperCase()+t.slice(2):t.slice(0,1).toUpperCase()+t.slice(1)).join(""),...i].join(" ")}let r=(()=>{class t{transform(t){return a(t)?t.split("").reverse().join(""):Array.isArray(t)?t.slice().reverse():t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"reverse",type:t,pure:!0}),t})(),c=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[]]}),t})(),l=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[]]}),t})(),d=(()=>{class t{constructor(){this.irregularMap={herb:"an",honor:"an",honorable:"an",hour:"an",mba:"an",msc:"an","m.sc.":"an",unicorn:"a"}}transform(t){if(t&&""!==t){const e=t.trim().split(" ")[0];return this.irregularMap[e.toLocaleLowerCase()]?`${this.irregularMap[e.toLocaleLowerCase()]} ${t}`:s(t[0])?"an "+t:"a "+t}return""}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"aOrAn",type:t,pure:!0}),t})(),h=(()=>{class t{transform(t){return a(t)?t.split(" ").map(t=>o(t)).join(" "):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"ucwords",type:t,pure:!0}),t})(),u=(()=>{class t{transform(t,e="\\s"){return a(t)?t.replace(new RegExp(`^[${e}]+`),""):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"ltrim",type:t,pure:!0}),t})(),p=(()=>{class t{transform(t,e=1,i=""){if(e<=0)throw new RangeError;return 1===e?t:this.repeat(t,e-1,i)}repeat(t,e,i){return a(t)?0===e?t:t+i+this.repeat(t,e-1,i):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"repeat",type:t,pure:!0}),t})(),b=(()=>{class t{transform(t,e="\\s"){return a(t)?t.replace(new RegExp(`[${e}]+$`),""):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"rtrim",type:t,pure:!0}),t})(),f=(()=>{class t{transform(t,e=[]){return a(t)?t.replace(/\{(\d+)}/g,(t,i)=>void 0===e[i]?t:e[i]):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"scan",type:t,pure:!0}),t})(),m=(()=>{class t{transform(t,e=0,i="",n=!0){if(!a(t))return t;if(t.length>e){if(n)return t.slice(0,e)+i;if(~t.indexOf(" ",e))return t.slice(0,t.indexOf(" ",e))+i}return t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"shorten",type:t,pure:!0}),t})(),g=(()=>{class t{transform(t,...e){return t.replace(e.length>0?new RegExp(`<(?!/?(${e.join("|")})s*/?)[^>]+>`,"g"):/<(?:.|\s)*?>/g,"")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"stripTags",type:t,pure:!0}),t})(),v=(()=>{class t{transform(t,e="\\s"){return a(t)?t.replace(new RegExp(`^[${e}]+|[${e}]+$`,"g"),""):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"trim",type:t,pure:!0}),t})(),_=(()=>{class t{transform(t){return a(t)?o(t):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"ucfirst",type:t,pure:!0}),t})(),y=(()=>{class t{transform(t){return a(t)?t.toLowerCase().trim().replace(/[^\w\-]+/g," ").replace(/\s+/g,"-"):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"slugify",type:t,pure:!0}),t})(),x=(()=>{class t{transform(t,e="\\s"){return a(t)?t.toLowerCase().split(/[-_\s]/g).filter(t=>!!t).map((t,e)=>e?t.slice(0,1).toUpperCase()+t.slice(1):t).join(""):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"camelize",type:t,pure:!0}),t})(),C=(()=>{class t{constructor(){this.latinMap={\u00c1:"A",\u0102:"A",\u1eae:"A",\u1eb6:"A",\u1eb0:"A",\u1eb2:"A",\u1eb4:"A",\u01cd:"A",\u00c2:"A",\u1ea4:"A",\u1eac:"A",\u1ea6:"A",\u1ea8:"A",\u1eaa:"A",\u00c4:"A",\u01de:"A",\u0226:"A",\u01e0:"A",\u1ea0:"A",\u0200:"A",\u00c0:"A",\u1ea2:"A",\u0202:"A",\u0100:"A",\u0104:"A",\u00c5:"A",\u01fa:"A",\u1e00:"A",\u023a:"A",\u00c3:"A",\ua732:"AA",\u00c6:"AE",\u01fc:"AE",\u01e2:"AE",\ua734:"AO",\ua736:"AU",\ua738:"AV",\ua73a:"AV",\ua73c:"AY",\u1e02:"B",\u1e04:"B",\u0181:"B",\u1e06:"B",\u0243:"B",\u0182:"B",\u0106:"C",\u010c:"C",\u00c7:"C",\u1e08:"C",\u0108:"C",\u010a:"C",\u0187:"C",\u023b:"C",\u010e:"D",\u1e10:"D",\u1e12:"D",\u1e0a:"D",\u1e0c:"D",\u018a:"D",\u1e0e:"D",\u01f2:"D",\u01c5:"D",\u0110:"D",\u018b:"D",\u01f1:"DZ",\u01c4:"DZ",\u00c9:"E",\u0114:"E",\u011a:"E",\u0228:"E",\u1e1c:"E",\u00ca:"E",\u1ebe:"E",\u1ec6:"E",\u1ec0:"E",\u1ec2:"E",\u1ec4:"E",\u1e18:"E",\u00cb:"E",\u0116:"E",\u1eb8:"E",\u0204:"E",\u00c8:"E",\u1eba:"E",\u0206:"E",\u0112:"E",\u1e16:"E",\u1e14:"E",\u0118:"E",\u0246:"E",\u1ebc:"E",\u1e1a:"E",\ua76a:"ET",\u1e1e:"F",\u0191:"F",\u01f4:"G",\u011e:"G",\u01e6:"G",\u0122:"G",\u011c:"G",\u0120:"G",\u0193:"G",\u1e20:"G",\u01e4:"G",\u1e2a:"H",\u021e:"H",\u1e28:"H",\u0124:"H",\u2c67:"H",\u1e26:"H",\u1e22:"H",\u1e24:"H",\u0126:"H",\u00cd:"I",\u012c:"I",\u01cf:"I",\u00ce:"I",\u00cf:"I",\u1e2e:"I",\u0130:"I",\u1eca:"I",\u0208:"I",\u00cc:"I",\u1ec8:"I",\u020a:"I",\u012a:"I",\u012e:"I",\u0197:"I",\u0128:"I",\u1e2c:"I",\ua779:"D",\ua77b:"F",\ua77d:"G",\ua782:"R",\ua784:"S",\ua786:"T",\ua76c:"IS",\u0134:"J",\u0248:"J",\u1e30:"K",\u01e8:"K",\u0136:"K",\u2c69:"K",\ua742:"K",\u1e32:"K",\u0198:"K",\u1e34:"K",\ua740:"K",\ua744:"K",\u0139:"L",\u023d:"L",\u013d:"L",\u013b:"L",\u1e3c:"L",\u1e36:"L",\u1e38:"L",\u2c60:"L",\ua748:"L",\u1e3a:"L",\u013f:"L",\u2c62:"L",\u01c8:"L",\u0141:"L",\u01c7:"LJ",\u1e3e:"M",\u1e40:"M",\u1e42:"M",\u2c6e:"M",\u0143:"N",\u0147:"N",\u0145:"N",\u1e4a:"N",\u1e44:"N",\u1e46:"N",\u01f8:"N",\u019d:"N",\u1e48:"N",\u0220:"N",\u01cb:"N",\u00d1:"N",\u01ca:"NJ",\u00d3:"O",\u014e:"O",\u01d1:"O",\u00d4:"O",\u1ed0:"O",\u1ed8:"O",\u1ed2:"O",\u1ed4:"O",\u1ed6:"O",\u00d6:"O",\u022a:"O",\u022e:"O",\u0230:"O",\u1ecc:"O",\u0150:"O",\u020c:"O",\u00d2:"O",\u1ece:"O",\u01a0:"O",\u1eda:"O",\u1ee2:"O",\u1edc:"O",\u1ede:"O",\u1ee0:"O",\u020e:"O",\ua74a:"O",\ua74c:"O",\u014c:"O",\u1e52:"O",\u1e50:"O",\u019f:"O",\u01ea:"O",\u01ec:"O",\u00d8:"O",\u01fe:"O",\u00d5:"O",\u1e4c:"O",\u1e4e:"O",\u022c:"O",\u01a2:"OI",\ua74e:"OO",\u0190:"E",\u0186:"O",\u0222:"OU",\u1e54:"P",\u1e56:"P",\ua752:"P",\u01a4:"P",\ua754:"P",\u2c63:"P",\ua750:"P",\ua758:"Q",\ua756:"Q",\u0154:"R",\u0158:"R",\u0156:"R",\u1e58:"R",\u1e5a:"R",\u1e5c:"R",\u0210:"R",\u0212:"R",\u1e5e:"R",\u024c:"R",\u2c64:"R",\ua73e:"C",\u018e:"E",\u015a:"S",\u1e64:"S",\u0160:"S",\u1e66:"S",\u015e:"S",\u015c:"S",\u0218:"S",\u1e60:"S",\u1e62:"S",\u1e68:"S",\u1e9e:"SS",\u0164:"T",\u0162:"T",\u1e70:"T",\u021a:"T",\u023e:"T",\u1e6a:"T",\u1e6c:"T",\u01ac:"T",\u1e6e:"T",\u01ae:"T",\u0166:"T",\u2c6f:"A",\ua780:"L",\u019c:"M",\u0245:"V",\ua728:"TZ",\u00da:"U",\u016c:"U",\u01d3:"U",\u00db:"U",\u1e76:"U",\u00dc:"U",\u01d7:"U",\u01d9:"U",\u01db:"U",\u01d5:"U",\u1e72:"U",\u1ee4:"U",\u0170:"U",\u0214:"U",\u00d9:"U",\u1ee6:"U",\u01af:"U",\u1ee8:"U",\u1ef0:"U",\u1eea:"U",\u1eec:"U",\u1eee:"U",\u0216:"U",\u016a:"U",\u1e7a:"U",\u0172:"U",\u016e:"U",\u0168:"U",\u1e78:"U",\u1e74:"U",\ua75e:"V",\u1e7e:"V",\u01b2:"V",\u1e7c:"V",\ua760:"VY",\u1e82:"W",\u0174:"W",\u1e84:"W",\u1e86:"W",\u1e88:"W",\u1e80:"W",\u2c72:"W",\u1e8c:"X",\u1e8a:"X",\u00dd:"Y",\u0176:"Y",\u0178:"Y",\u1e8e:"Y",\u1ef4:"Y",\u1ef2:"Y",\u01b3:"Y",\u1ef6:"Y",\u1efe:"Y",\u0232:"Y",\u024e:"Y",\u1ef8:"Y",\u0179:"Z",\u017d:"Z",\u1e90:"Z",\u2c6b:"Z",\u017b:"Z",\u1e92:"Z",\u0224:"Z",\u1e94:"Z",\u01b5:"Z",\u0132:"IJ",\u0152:"OE",\u1d00:"A",\u1d01:"AE",\u0299:"B",\u1d03:"B",\u1d04:"C",\u1d05:"D",\u1d07:"E",\ua730:"F",\u0262:"G",\u029b:"G",\u029c:"H",\u026a:"I",\u0281:"R",\u1d0a:"J",\u1d0b:"K",\u029f:"L",\u1d0c:"L",\u1d0d:"M",\u0274:"N",\u1d0f:"O",\u0276:"OE",\u1d10:"O",\u1d15:"OU",\u1d18:"P",\u0280:"R",\u1d0e:"N",\u1d19:"R",\ua731:"S",\u1d1b:"T",\u2c7b:"E",\u1d1a:"R",\u1d1c:"U",\u1d20:"V",\u1d21:"W",\u028f:"Y",\u1d22:"Z",\u00e1:"a",\u0103:"a",\u1eaf:"a",\u1eb7:"a",\u1eb1:"a",\u1eb3:"a",\u1eb5:"a",\u01ce:"a",\u00e2:"a",\u1ea5:"a",\u1ead:"a",\u1ea7:"a",\u1ea9:"a",\u1eab:"a",\u00e4:"a",\u01df:"a",\u0227:"a",\u01e1:"a",\u1ea1:"a",\u0201:"a",\u00e0:"a",\u1ea3:"a",\u0203:"a",\u0101:"a",\u0105:"a",\u1d8f:"a",\u1e9a:"a",\u00e5:"a",\u01fb:"a",\u1e01:"a",\u2c65:"a",\u00e3:"a",\ua733:"aa",\u00e6:"ae",\u01fd:"ae",\u01e3:"ae",\ua735:"ao",\ua737:"au",\ua739:"av",\ua73b:"av",\ua73d:"ay",\u1e03:"b",\u1e05:"b",\u0253:"b",\u1e07:"b",\u1d6c:"b",\u1d80:"b",\u0180:"b",\u0183:"b",\u0275:"o",\u0107:"c",\u010d:"c",\u00e7:"c",\u1e09:"c",\u0109:"c",\u0255:"c",\u010b:"c",\u0188:"c",\u023c:"c",\u010f:"d",\u1e11:"d",\u1e13:"d",\u0221:"d",\u1e0b:"d",\u1e0d:"d",\u0257:"d",\u1d91:"d",\u1e0f:"d",\u1d6d:"d",\u1d81:"d",\u0111:"d",\u0256:"d",\u018c:"d",\u0131:"i",\u0237:"j",\u025f:"j",\u0284:"j",\u01f3:"dz",\u01c6:"dz",\u00e9:"e",\u0115:"e",\u011b:"e",\u0229:"e",\u1e1d:"e",\u00ea:"e",\u1ebf:"e",\u1ec7:"e",\u1ec1:"e",\u1ec3:"e",\u1ec5:"e",\u1e19:"e",\u00eb:"e",\u0117:"e",\u1eb9:"e",\u0205:"e",\u00e8:"e",\u1ebb:"e",\u0207:"e",\u0113:"e",\u1e17:"e",\u1e15:"e",\u2c78:"e",\u0119:"e",\u1d92:"e",\u0247:"e",\u1ebd:"e",\u1e1b:"e",\ua76b:"et",\u1e1f:"f",\u0192:"f",\u1d6e:"f",\u1d82:"f",\u01f5:"g",\u011f:"g",\u01e7:"g",\u0123:"g",\u011d:"g",\u0121:"g",\u0260:"g",\u1e21:"g",\u1d83:"g",\u01e5:"g",\u1e2b:"h",\u021f:"h",\u1e29:"h",\u0125:"h",\u2c68:"h",\u1e27:"h",\u1e23:"h",\u1e25:"h",\u0266:"h",\u1e96:"h",\u0127:"h",\u0195:"hv",\u00ed:"i",\u012d:"i",\u01d0:"i",\u00ee:"i",\u00ef:"i",\u1e2f:"i",\u1ecb:"i",\u0209:"i",\u00ec:"i",\u1ec9:"i",\u020b:"i",\u012b:"i",\u012f:"i",\u1d96:"i",\u0268:"i",\u0129:"i",\u1e2d:"i",\ua77a:"d",\ua77c:"f",\u1d79:"g",\ua783:"r",\ua785:"s",\ua787:"t",\ua76d:"is",\u01f0:"j",\u0135:"j",\u029d:"j",\u0249:"j",\u1e31:"k",\u01e9:"k",\u0137:"k",\u2c6a:"k",\ua743:"k",\u1e33:"k",\u0199:"k",\u1e35:"k",\u1d84:"k",\ua741:"k",\ua745:"k",\u013a:"l",\u019a:"l",\u026c:"l",\u013e:"l",\u013c:"l",\u1e3d:"l",\u0234:"l",\u1e37:"l",\u1e39:"l",\u2c61:"l",\ua749:"l",\u1e3b:"l",\u0140:"l",\u026b:"l",\u1d85:"l",\u026d:"l",\u0142:"l",\u01c9:"lj",\u017f:"s",\u1e9c:"s",\u1e9b:"s",\u1e9d:"s",\u1e3f:"m",\u1e41:"m",\u1e43:"m",\u0271:"m",\u1d6f:"m",\u1d86:"m",\u0144:"n",\u0148:"n",\u0146:"n",\u1e4b:"n",\u0235:"n",\u1e45:"n",\u1e47:"n",\u01f9:"n",\u0272:"n",\u1e49:"n",\u019e:"n",\u1d70:"n",\u1d87:"n",\u0273:"n",\u00f1:"n",\u01cc:"nj",\u00f3:"o",\u014f:"o",\u01d2:"o",\u00f4:"o",\u1ed1:"o",\u1ed9:"o",\u1ed3:"o",\u1ed5:"o",\u1ed7:"o",\u00f6:"o",\u022b:"o",\u022f:"o",\u0231:"o",\u1ecd:"o",\u0151:"o",\u020d:"o",\u00f2:"o",\u1ecf:"o",\u01a1:"o",\u1edb:"o",\u1ee3:"o",\u1edd:"o",\u1edf:"o",\u1ee1:"o",\u020f:"o",\ua74b:"o",\ua74d:"o",\u2c7a:"o",\u014d:"o",\u1e53:"o",\u1e51:"o",\u01eb:"o",\u01ed:"o",\u00f8:"o",\u01ff:"o",\u00f5:"o",\u1e4d:"o",\u1e4f:"o",\u022d:"o",\u01a3:"oi",\ua74f:"oo",\u025b:"e",\u1d93:"e",\u0254:"o",\u1d97:"o",\u0223:"ou",\u1e55:"p",\u1e57:"p",\ua753:"p",\u01a5:"p",\u1d71:"p",\u1d88:"p",\ua755:"p",\u1d7d:"p",\ua751:"p",\ua759:"q",\u02a0:"q",\u024b:"q",\ua757:"q",\u0155:"r",\u0159:"r",\u0157:"r",\u1e59:"r",\u1e5b:"r",\u1e5d:"r",\u0211:"r",\u027e:"r",\u1d73:"r",\u0213:"r",\u1e5f:"r",\u027c:"r",\u1d72:"r",\u1d89:"r",\u024d:"r",\u027d:"r",\u2184:"c",\ua73f:"c",\u0258:"e",\u027f:"r",\u015b:"s",\u1e65:"s",\u0161:"s",\u1e67:"s",\u015f:"s",\u015d:"s",\u0219:"s",\u1e61:"s",\u1e63:"s",\u1e69:"s",\u0282:"s",\u1d74:"s",\u1d8a:"s",\u023f:"s",\u0261:"g",\u00df:"ss",\u1d11:"o",\u1d13:"o",\u1d1d:"u",\u0165:"t",\u0163:"t",\u1e71:"t",\u021b:"t",\u0236:"t",\u1e97:"t",\u2c66:"t",\u1e6b:"t",\u1e6d:"t",\u01ad:"t",\u1e6f:"t",\u1d75:"t",\u01ab:"t",\u0288:"t",\u0167:"t",\u1d7a:"th",\u0250:"a",\u1d02:"ae",\u01dd:"e",\u1d77:"g",\u0265:"h",\u02ae:"h",\u02af:"h",\u1d09:"i",\u029e:"k",\ua781:"l",\u026f:"m",\u0270:"m",\u1d14:"oe",\u0279:"r",\u027b:"r",\u027a:"r",\u2c79:"r",\u0287:"t",\u028c:"v",\u028d:"w",\u028e:"y",\ua729:"tz",\u00fa:"u",\u016d:"u",\u01d4:"u",\u00fb:"u",\u1e77:"u",\u00fc:"u",\u01d8:"u",\u01da:"u",\u01dc:"u",\u01d6:"u",\u1e73:"u",\u1ee5:"u",\u0171:"u",\u0215:"u",\u00f9:"u",\u1ee7:"u",\u01b0:"u",\u1ee9:"u",\u1ef1:"u",\u1eeb:"u",\u1eed:"u",\u1eef:"u",\u0217:"u",\u016b:"u",\u1e7b:"u",\u0173:"u",\u1d99:"u",\u016f:"u",\u0169:"u",\u1e79:"u",\u1e75:"u",\u1d6b:"ue",\ua778:"um",\u2c74:"v",\ua75f:"v",\u1e7f:"v",\u028b:"v",\u1d8c:"v",\u2c71:"v",\u1e7d:"v",\ua761:"vy",\u1e83:"w",\u0175:"w",\u1e85:"w",\u1e87:"w",\u1e89:"w",\u1e81:"w",\u2c73:"w",\u1e98:"w",\u1e8d:"x",\u1e8b:"x",\u1d8d:"x",\u00fd:"y",\u0177:"y",\u00ff:"y",\u1e8f:"y",\u1ef5:"y",\u1ef3:"y",\u01b4:"y",\u1ef7:"y",\u1eff:"y",\u0233:"y",\u1e99:"y",\u024f:"y",\u1ef9:"y",\u017a:"z",\u017e:"z",\u1e91:"z",\u0291:"z",\u2c6c:"z",\u017c:"z",\u1e93:"z",\u0225:"z",\u1e95:"z",\u1d76:"z",\u1d8e:"z",\u0290:"z",\u01b6:"z",\u0240:"z",\ufb00:"ff",\ufb03:"ffi",\ufb04:"ffl",\ufb01:"fi",\ufb02:"fl",\u0133:"ij",\u0153:"oe",\ufb06:"st",\u2090:"a",\u2091:"e",\u1d62:"i",\u2c7c:"j",\u2092:"o",\u1d63:"r",\u1d64:"u",\u1d65:"v",\u2093:"x"}}transform(t,e="\\s"){return a(t)?t.replace(/[^A-Za-z0-9]/g,t=>this.latinMap[t]||t):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"latinise",type:t,pure:!0}),t})(),O=(()=>{class t{transform(t,e="\\s"){return a(t)?t.replace(/\r\n/g,"\n").split("\n"):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"lines",type:t,pure:!0}),t})(),D=(()=>{class t{transform(t,e="\\s"){return a(t)?t.trim().replace(/\s+/g,"").replace(/[A-Z]/g,(t,e)=>e?"_"+t.toLowerCase():t.toLowerCase()):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"underscore",type:t,pure:!0}),t})(),w=(()=>{class t{transform(t,e,i){return a(t)?t.match(new RegExp(e,i)):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"match",type:t,pure:!0}),t})(),M=(()=>{class t{transform(t,e,i){return a(t)?new RegExp(e,i).test(t):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"test",type:t,pure:!0}),t})(),k=(()=>{class t{transform(t,e,i=" "){if(!a(t)||t.length>=e)return t;for(;t.length<e;)t=i+t;return t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"lpad",type:t,pure:!0}),t})(),S=(()=>{class t{transform(t,e=1,i=" "){if(!a(t)||t.length>=e)return t;for(;t.length<e;)t+=i;return t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"rpad",type:t,pure:!0}),t})(),I=(()=>{class t{constructor(){this.irregularMap={addendum:"addenda",alga:"algae",alumna:"alumnae",alumnus:"alumni",analysis:"analyses",antenna:"antennae",appendix:"appendices",aquarium:"aquaria",arch:"arches",axe:"axes",axis:"axes",bacillus:"bacilli",bacterium:"bacteria",basis:"bases",batch:"batches",beach:"beaches",beau:"beaux",bison:"bison",brush:"brushes",buffalo:"buffaloes",bureau:"bureaus",bus:"busses",cactus:"cacti",calf:"calves",chateau:"chateaux",cherry:"cherries",child:"children",church:"churches",circus:"circuses",cod:"cod",corps:"corps",corpus:"corpora",crisis:"crises",criterion:"criteria",curriculum:"curricula",datum:"data",deer:"deer",diagnosis:"diagnoses",die:"dice",domino:"dominoes",dwarf:"dwarves",echo:"echoes",elf:"elves",ellipsis:"ellipses",embargo:"embargoes",emphasis:"emphases",erratum:"errata",fax:"faxes",fireman:"firemen",fish:"fish",flush:"flushes",focus:"foci",foot:"feet",formula:"formulas",fungus:"fungi",genus:"genera",goose:"geese",grafito:"grafiti",half:"halves",hero:"heroes",hoax:"hoaxes",hoof:"hooves",hypothesis:"hypotheses",index:"indices",kiss:"kisses",knife:"knives",leaf:"leaves",life:"lives",loaf:"loaves",louse:"lice",man:"men",mango:"mangoes",matrix:"matrices",means:"means",medium:"media",memorandum:"memoranda",millennium:"milennia",moose:"moose",mosquito:"mosquitoes",motto:"mottoes",mouse:"mice",nebula:"nebulae",neurosis:"neuroses",nucleus:"nuclei",oasis:"oases",octopus:"octopodes",ovum:"ova",ox:"oxen",paralysis:"paralyses",parenthesis:"parentheses",person:"people",phenomenon:"phenomena",plateau:"plateaux",potato:"potatoes",quiz:"quizzes",radius:"radii",reflex:"reflexes","runner-up":"runners-up",scampo:"scampi",scarf:"scarves",scissors:"scissors",scratch:"scratches",self:"selves",series:"series",sheaf:"sheaves",sheep:"sheep",shelf:"shelves","son-in-law":"sons-in-law",species:"species",splash:"splashes",stimulus:"stimuli",stitch:"stitches",stratum:"strata",syllabus:"syllabi",symposium:"symposia",synopsis:"synopses",synthesis:"syntheses",tableau:"tableaux",tax:"taxes",that:"those",thesis:"theses",thief:"thieves",this:"these",tomato:"tomatoes",tooth:"teeth",tornado:"tornadoes",torpedo:"torpedoes",vertebra:"vertebrae",veto:"vetoes",vita:"vitae",volcano:"volcanoes",waltz:"waltzes",wash:"washes",watch:"watches",wharf:"wharves",wife:"wives",wolf:"wolves",woman:"women",zero:"zeroes"}}transform(t,e=0){if(!t||""===t)return"";if(1===e)return t;{const e=t.trim().split(" ")[t.trim().split(" ").length-1];return this.irregularMap[e.toLocaleLowerCase()]?e[0]===e[0].toLocaleUpperCase()?t.replace(e,this.irregularMap[e.toLocaleLowerCase()].replace(this.irregularMap[e.toLocaleLowerCase()][0],this.irregularMap[e.toLocaleLowerCase()][0].toLocaleUpperCase())):t.replace(e,this.irregularMap[e.toLocaleLowerCase()]):"y"===e[e.length-1]?s(e[e.length-2])?t+"s":t.replace(e,e.slice(0,-1)+"ies"):"s"===e[e.length-1]?t+"es":t+"s"}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"makePluralString",type:t,pure:!0}),t})(),P=(()=>{class t{transform(t,e="",i=""){return a(t)?(e&&a(e)?e:"")+t+(i&&a(i)?i:""):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"wrap",type:t,pure:!0}),t})(),V=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[]]}),t})(),R=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[]]}),t})(),j=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[]]}),t})(),A=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[]]}),t})(),W=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[c,V,R,j,l,A]}),t})()},bHdf:function(t,e,i){"use strict";i.d(e,"a",(function(){return s}));var n=i("5+tZ"),a=i("SpAZ");function s(t=Number.POSITIVE_INFINITY){return Object(n.a)(a.a,t)}},bOdf:function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var n=i("5+tZ");function a(t,e){return Object(n.a)(t,e,1)}},bSwM:function(t,e,i){"use strict";i.d(e,"a",(function(){return y})),i.d(e,"b",(function(){return w})),i.d(e,"c",(function(){return C}));var n=i("8LU1"),a=i("fXoL"),s=i("3Pt+"),o=i("FKr1"),r=i("R1ws"),c=i("GU7r"),l=i("u47x");const d=["input"],h=function(){return{enterDuration:150}},u=["*"],p=new a.s("mat-checkbox-default-options",{providedIn:"root",factory:function(){return{color:"accent",clickAction:"check-indeterminate"}}}),b=new a.s("mat-checkbox-click-action");let f=0;const m={provide:s.s,useExisting:Object(a.X)(()=>y),multi:!0};class g{}class v{constructor(t){this._elementRef=t}}const _=Object(o.F)(Object(o.A)(Object(o.B)(Object(o.C)(v))));let y=(()=>{class t extends _{constructor(t,e,i,n,s,o,r,c){super(t),this._changeDetectorRef=e,this._focusMonitor=i,this._ngZone=n,this._clickAction=o,this._animationMode=r,this._options=c,this.ariaLabel="",this.ariaLabelledby=null,this._uniqueId="mat-checkbox-"+ ++f,this.id=this._uniqueId,this.labelPosition="after",this.name=null,this.change=new a.o,this.indeterminateChange=new a.o,this._onTouched=()=>{},this._currentAnimationClass="",this._currentCheckState=0,this._controlValueAccessorChangeFn=()=>{},this._checked=!1,this._disabled=!1,this._indeterminate=!1,this._options=this._options||{},this._options.color&&(this.color=this.defaultColor=this._options.color),this.tabIndex=parseInt(s)||0,this._clickAction=this._clickAction||this._options.clickAction}get inputId(){return(this.id||this._uniqueId)+"-input"}get required(){return this._required}set required(t){this._required=Object(n.c)(t)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{t||Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}),this._syncIndeterminate(this._indeterminate)}ngAfterViewChecked(){}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}get checked(){return this._checked}set checked(t){t!=this.checked&&(this._checked=t,this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(t){const e=Object(n.c)(t);e!==this.disabled&&(this._disabled=e,this._changeDetectorRef.markForCheck())}get indeterminate(){return this._indeterminate}set indeterminate(t){const e=t!=this._indeterminate;this._indeterminate=Object(n.c)(t),e&&(this._transitionCheckState(this._indeterminate?3:this.checked?1:2),this.indeterminateChange.emit(this._indeterminate)),this._syncIndeterminate(this._indeterminate)}_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(t){this.checked=!!t}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t}_getAriaChecked(){return this.checked?"true":this.indeterminate?"mixed":"false"}_transitionCheckState(t){let e=this._currentCheckState,i=this._elementRef.nativeElement;if(e!==t&&(this._currentAnimationClass.length>0&&i.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(e,t),this._currentCheckState=t,this._currentAnimationClass.length>0)){i.classList.add(this._currentAnimationClass);const t=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{i.classList.remove(t)},1e3)})}}_emitChangeEvent(){const t=new g;t.source=this,t.checked=this.checked,this._controlValueAccessorChangeFn(this.checked),this.change.emit(t)}toggle(){this.checked=!this.checked}_onInputClick(t){t.stopPropagation(),this.disabled||"noop"===this._clickAction?this.disabled||"noop"!==this._clickAction||(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate):(this.indeterminate&&"check"!==this._clickAction&&Promise.resolve().then(()=>{this._indeterminate=!1,this.indeterminateChange.emit(this._indeterminate)}),this.toggle(),this._transitionCheckState(this._checked?1:2),this._emitChangeEvent())}focus(t="keyboard",e){this._focusMonitor.focusVia(this._inputElement,t,e)}_onInteractionEvent(t){t.stopPropagation()}_getAnimationClassForCheckStateTransition(t,e){if("NoopAnimations"===this._animationMode)return"";let i="";switch(t){case 0:if(1===e)i="unchecked-checked";else{if(3!=e)return"";i="unchecked-indeterminate"}break;case 2:i=1===e?"unchecked-checked":"unchecked-indeterminate";break;case 1:i=2===e?"checked-unchecked":"checked-indeterminate";break;case 3:i=1===e?"indeterminate-checked":"indeterminate-unchecked"}return"mat-checkbox-anim-"+i}_syncIndeterminate(t){const e=this._inputElement;e&&(e.nativeElement.indeterminate=t)}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(a.h),a.Qb(l.h),a.Qb(a.C),a.bc("tabindex"),a.Qb(b,8),a.Qb(r.a,8),a.Qb(p,8))},t.\u0275cmp=a.Kb({type:t,selectors:[["mat-checkbox"]],viewQuery:function(t,e){var i;1&t&&(a.Xc(d,!0),a.Xc(o.u,!0)),2&t&&(a.yc(i=a.ec())&&(e._inputElement=i.first),a.yc(i=a.ec())&&(e.ripple=i.first))},hostAttrs:[1,"mat-checkbox"],hostVars:12,hostBindings:function(t,e){2&t&&(a.Zb("id",e.id),a.Eb("tabindex",null),a.Ib("mat-checkbox-indeterminate",e.indeterminate)("mat-checkbox-checked",e.checked)("mat-checkbox-disabled",e.disabled)("mat-checkbox-label-before","before"==e.labelPosition)("_mat-animation-noopable","NoopAnimations"===e._animationMode))},inputs:{disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],id:"id",labelPosition:"labelPosition",name:"name",required:"required",checked:"checked",disabled:"disabled",indeterminate:"indeterminate",ariaDescribedby:["aria-describedby","ariaDescribedby"],value:"value"},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],features:[a.Cb([m]),a.Ab],ngContentSelectors:u,decls:17,vars:20,consts:[[1,"mat-checkbox-layout"],["label",""],[1,"mat-checkbox-inner-container"],["type","checkbox",1,"mat-checkbox-input","cdk-visually-hidden",3,"id","required","checked","disabled","tabIndex","change","click"],["input",""],["matRipple","",1,"mat-checkbox-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleRadius","matRippleCentered","matRippleAnimation"],[1,"mat-ripple-element","mat-checkbox-persistent-ripple"],[1,"mat-checkbox-frame"],[1,"mat-checkbox-background"],["version","1.1","focusable","false","viewBox","0 0 24 24",0,"xml","space","preserve",1,"mat-checkbox-checkmark"],["fill","none","stroke","white","d","M4.1,12.7 9,17.6 20.3,6.3",1,"mat-checkbox-checkmark-path"],[1,"mat-checkbox-mixedmark"],[1,"mat-checkbox-label",3,"cdkObserveContent"],["checkboxLabel",""],[2,"display","none"]],template:function(t,e){if(1&t&&(a.nc(),a.Wb(0,"label",0,1),a.Wb(2,"div",2),a.Wb(3,"input",3,4),a.dc("change",(function(t){return e._onInteractionEvent(t)}))("click",(function(t){return e._onInputClick(t)})),a.Vb(),a.Wb(5,"div",5),a.Rb(6,"div",6),a.Vb(),a.Rb(7,"div",7),a.Wb(8,"div",8),a.gc(),a.Wb(9,"svg",9),a.Rb(10,"path",10),a.Vb(),a.fc(),a.Rb(11,"div",11),a.Vb(),a.Vb(),a.Wb(12,"span",12,13),a.dc("cdkObserveContent",(function(){return e._onLabelTextChange()})),a.Wb(14,"span",14),a.Qc(15,"\xa0"),a.Vb(),a.mc(16),a.Vb(),a.Vb()),2&t){const t=a.zc(1),i=a.zc(13);a.Eb("for",e.inputId),a.Db(2),a.Ib("mat-checkbox-inner-container-no-side-margin",!i.textContent||!i.textContent.trim()),a.Db(1),a.oc("id",e.inputId)("required",e.required)("checked",e.checked)("disabled",e.disabled)("tabIndex",e.tabIndex),a.Eb("value",e.value)("name",e.name)("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby)("aria-checked",e._getAriaChecked())("aria-describedby",e.ariaDescribedby),a.Db(2),a.oc("matRippleTrigger",t)("matRippleDisabled",e._isRippleDisabled())("matRippleRadius",20)("matRippleCentered",!0)("matRippleAnimation",a.uc(19,h))}},directives:[o.u,c.a],styles:["@keyframes mat-checkbox-fade-in-background{0%{opacity:0}50%{opacity:1}}@keyframes mat-checkbox-fade-out-background{0%,50%{opacity:1}100%{opacity:0}}@keyframes mat-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:22.910259}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1)}100%{stroke-dashoffset:0}}@keyframes mat-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mat-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);stroke-dashoffset:0}to{stroke-dashoffset:-22.910259}}@keyframes mat-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(45deg)}}@keyframes mat-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:0;transform:rotate(45deg)}to{opacity:1;transform:rotate(360deg)}}@keyframes mat-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:0;transform:rotate(-45deg)}to{opacity:1;transform:rotate(0deg)}}@keyframes mat-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(315deg)}}@keyframes mat-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;opacity:1;transform:scaleX(1)}32.8%,100%{opacity:0;transform:scaleX(0)}}.mat-checkbox-background,.mat-checkbox-frame{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:2px;box-sizing:border-box;pointer-events:none}.mat-checkbox{transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);cursor:pointer;-webkit-tap-highlight-color:transparent}._mat-animation-noopable.mat-checkbox{transition:none;animation:none}.mat-checkbox .mat-ripple-element:not(.mat-checkbox-persistent-ripple){opacity:.16}.mat-checkbox-layout{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:inherit;align-items:baseline;vertical-align:middle;display:inline-flex;white-space:nowrap}.mat-checkbox-label{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.mat-checkbox-inner-container{display:inline-block;height:16px;line-height:0;margin:auto;margin-right:8px;order:0;position:relative;vertical-align:middle;white-space:nowrap;width:16px;flex-shrink:0}[dir=rtl] .mat-checkbox-inner-container{margin-left:8px;margin-right:auto}.mat-checkbox-inner-container-no-side-margin{margin-left:0;margin-right:0}.mat-checkbox-frame{background-color:transparent;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1);border-width:2px;border-style:solid}._mat-animation-noopable .mat-checkbox-frame{transition:none}.cdk-high-contrast-active .mat-checkbox.cdk-keyboard-focused .mat-checkbox-frame{border-style:dotted}.mat-checkbox-background{align-items:center;display:inline-flex;justify-content:center;transition:background-color 90ms cubic-bezier(0, 0, 0.2, 0.1),opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}._mat-animation-noopable .mat-checkbox-background{transition:none}.cdk-high-contrast-active .mat-checkbox .mat-checkbox-background{background:none}.mat-checkbox-persistent-ripple{width:100%;height:100%;transform:none}.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:.04}.mat-checkbox.cdk-keyboard-focused .mat-checkbox-persistent-ripple{opacity:.12}.mat-checkbox-persistent-ripple,.mat-checkbox.mat-checkbox-disabled .mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:0}@media(hover: none){.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{display:none}}.mat-checkbox-checkmark{top:0;left:0;right:0;bottom:0;position:absolute;width:100%}.mat-checkbox-checkmark-path{stroke-dashoffset:22.910259;stroke-dasharray:22.910259;stroke-width:2.1333333333px}.cdk-high-contrast-black-on-white .mat-checkbox-checkmark-path{stroke:#000 !important}.mat-checkbox-mixedmark{width:calc(100% - 6px);height:2px;opacity:0;transform:scaleX(0) rotate(0deg);border-radius:2px}.cdk-high-contrast-active .mat-checkbox-mixedmark{height:0;border-top:solid 2px;margin-top:2px}.mat-checkbox-label-before .mat-checkbox-inner-container{order:1;margin-left:8px;margin-right:auto}[dir=rtl] .mat-checkbox-label-before .mat-checkbox-inner-container{margin-left:auto;margin-right:8px}.mat-checkbox-checked .mat-checkbox-checkmark{opacity:1}.mat-checkbox-checked .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-checked .mat-checkbox-mixedmark{transform:scaleX(1) rotate(-45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark{opacity:0;transform:rotate(45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-indeterminate .mat-checkbox-mixedmark{opacity:1;transform:scaleX(1) rotate(0deg)}.mat-checkbox-unchecked .mat-checkbox-background{background-color:transparent}.mat-checkbox-disabled{cursor:default}.cdk-high-contrast-active .mat-checkbox-disabled{opacity:.5}.mat-checkbox-anim-unchecked-checked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-checked .mat-checkbox-checkmark-path{animation:180ms linear 0ms mat-checkbox-unchecked-checked-checkmark-path}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-unchecked-indeterminate-mixedmark}.mat-checkbox-anim-checked-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-checked-unchecked .mat-checkbox-checkmark-path{animation:90ms linear 0ms mat-checkbox-checked-unchecked-checkmark-path}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-checkmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-checkmark}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-mixedmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-checkmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-checkmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-mixedmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-mixedmark}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-mixedmark{animation:300ms linear 0ms mat-checkbox-indeterminate-unchecked-mixedmark}.mat-checkbox-input{bottom:0;left:50%}.mat-checkbox .mat-checkbox-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}\n"],encapsulation:2,changeDetection:0}),t})();const x={provide:s.r,useExisting:Object(a.X)(()=>C),multi:!0};let C=(()=>{class t extends s.b{}return t.\u0275fac=function(e){return O(e||t)},t.\u0275dir=a.Lb({type:t,selectors:[["mat-checkbox","required","","formControlName",""],["mat-checkbox","required","","formControl",""],["mat-checkbox","required","","ngModel",""]],features:[a.Cb([x]),a.Ab]}),t})();const O=a.Yb(C);let D=(()=>{class t{}return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)}}),t})(),w=(()=>{class t{}return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)},imports:[[o.v,o.k,c.c,D],o.k,D]}),t})()},bTqV:function(t,e,i){"use strict";i.d(e,"a",(function(){return b})),i.d(e,"b",(function(){return p})),i.d(e,"c",(function(){return f}));var n=i("FKr1"),a=i("R1ws"),s=i("fXoL"),o=i("u47x");const r=["mat-button",""],c=["*"],l=".mat-button .mat-button-focus-overlay,.mat-icon-button .mat-button-focus-overlay{opacity:0}.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:.04}@media(hover: none){.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:0}}.mat-button,.mat-icon-button,.mat-stroked-button,.mat-flat-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-button.mat-button-disabled,.mat-icon-button.mat-button-disabled,.mat-stroked-button.mat-button-disabled,.mat-flat-button.mat-button-disabled{cursor:default}.mat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-button.cdk-program-focused .mat-button-focus-overlay,.mat-icon-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-icon-button.cdk-program-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-program-focused .mat-button-focus-overlay,.mat-flat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-flat-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-raised-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button.mat-button-disabled{cursor:default}.mat-raised-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-raised-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-raised-button::-moz-focus-inner{border:0}._mat-animation-noopable.mat-raised-button{transition:none;animation:none}.mat-stroked-button{border:1px solid currentColor;padding:0 15px;line-height:34px}.mat-stroked-button .mat-button-ripple.mat-ripple,.mat-stroked-button .mat-button-focus-overlay{top:-1px;left:-1px;right:-1px;bottom:-1px}.mat-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:56px;height:56px;padding:0;flex-shrink:0}.mat-fab::-moz-focus-inner{border:0}.mat-fab.mat-button-disabled{cursor:default}.mat-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-fab::-moz-focus-inner{border:0}._mat-animation-noopable.mat-fab{transition:none;animation:none}.mat-fab .mat-button-wrapper{padding:16px 0;display:inline-block;line-height:24px}.mat-mini-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:40px;height:40px;padding:0;flex-shrink:0}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab.mat-button-disabled{cursor:default}.mat-mini-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-mini-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-mini-fab::-moz-focus-inner{border:0}._mat-animation-noopable.mat-mini-fab{transition:none;animation:none}.mat-mini-fab .mat-button-wrapper{padding:8px 0;display:inline-block;line-height:24px}.mat-icon-button{padding:0;min-width:0;width:40px;height:40px;flex-shrink:0;line-height:40px;border-radius:50%}.mat-icon-button i,.mat-icon-button .mat-icon{line-height:24px}.mat-button-ripple.mat-ripple,.mat-button-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-button-ripple.mat-ripple:not(:empty){transform:translateZ(0)}.mat-button-focus-overlay{opacity:0;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1),background-color 200ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-button-focus-overlay{transition:none}.mat-button-ripple-round{border-radius:50%;z-index:1}.mat-button .mat-button-wrapper>*,.mat-flat-button .mat-button-wrapper>*,.mat-stroked-button .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-fab .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*{vertical-align:middle}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button{display:block;font-size:inherit;width:2.5em;height:2.5em}.cdk-high-contrast-active .mat-button,.cdk-high-contrast-active .mat-flat-button,.cdk-high-contrast-active .mat-raised-button,.cdk-high-contrast-active .mat-icon-button,.cdk-high-contrast-active .mat-fab,.cdk-high-contrast-active .mat-mini-fab{outline:solid 1px}.cdk-high-contrast-active .mat-button-base.cdk-keyboard-focused,.cdk-high-contrast-active .mat-button-base.cdk-program-focused{outline:solid 3px}\n",d=["mat-button","mat-flat-button","mat-icon-button","mat-raised-button","mat-stroked-button","mat-mini-fab","mat-fab"];class h{constructor(t){this._elementRef=t}}const u=Object(n.A)(Object(n.C)(Object(n.B)(h)));let p=(()=>{class t extends u{constructor(t,e,i){super(t),this._focusMonitor=e,this._animationMode=i,this.isRoundButton=this._hasHostAttributes("mat-fab","mat-mini-fab"),this.isIconButton=this._hasHostAttributes("mat-icon-button");for(const n of d)this._hasHostAttributes(n)&&this._getHostElement().classList.add(n);t.nativeElement.classList.add("mat-button-base"),this.isRoundButton&&(this.color="accent")}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}focus(t="program",e){this._focusMonitor.focusVia(this._getHostElement(),t,e)}_getHostElement(){return this._elementRef.nativeElement}_isRippleDisabled(){return this.disableRipple||this.disabled}_hasHostAttributes(...t){return t.some(t=>this._getHostElement().hasAttribute(t))}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.l),s.Qb(o.h),s.Qb(a.a,8))},t.\u0275cmp=s.Kb({type:t,selectors:[["button","mat-button",""],["button","mat-raised-button",""],["button","mat-icon-button",""],["button","mat-fab",""],["button","mat-mini-fab",""],["button","mat-stroked-button",""],["button","mat-flat-button",""]],viewQuery:function(t,e){var i;1&t&&s.Xc(n.u,!0),2&t&&s.yc(i=s.ec())&&(e.ripple=i.first)},hostAttrs:[1,"mat-focus-indicator"],hostVars:5,hostBindings:function(t,e){2&t&&(s.Eb("disabled",e.disabled||null),s.Ib("_mat-animation-noopable","NoopAnimations"===e._animationMode)("mat-button-disabled",e.disabled))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color"},exportAs:["matButton"],features:[s.Ab],attrs:r,ngContentSelectors:c,decls:4,vars:5,consts:[[1,"mat-button-wrapper"],["matRipple","",1,"mat-button-ripple",3,"matRippleDisabled","matRippleCentered","matRippleTrigger"],[1,"mat-button-focus-overlay"]],template:function(t,e){1&t&&(s.nc(),s.Wb(0,"span",0),s.mc(1),s.Vb(),s.Rb(2,"span",1),s.Rb(3,"span",2)),2&t&&(s.Db(2),s.Ib("mat-button-ripple-round",e.isRoundButton||e.isIconButton),s.oc("matRippleDisabled",e._isRippleDisabled())("matRippleCentered",e.isIconButton)("matRippleTrigger",e._getHostElement()))},directives:[n.u],styles:[l],encapsulation:2,changeDetection:0}),t})(),b=(()=>{class t extends p{constructor(t,e,i){super(e,t,i)}_haltDisabledEvents(t){this.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(o.h),s.Qb(s.l),s.Qb(a.a,8))},t.\u0275cmp=s.Kb({type:t,selectors:[["a","mat-button",""],["a","mat-raised-button",""],["a","mat-icon-button",""],["a","mat-fab",""],["a","mat-mini-fab",""],["a","mat-stroked-button",""],["a","mat-flat-button",""]],hostAttrs:[1,"mat-focus-indicator"],hostVars:7,hostBindings:function(t,e){1&t&&s.dc("click",(function(t){return e._haltDisabledEvents(t)})),2&t&&(s.Eb("tabindex",e.disabled?-1:e.tabIndex||0)("disabled",e.disabled||null)("aria-disabled",e.disabled.toString()),s.Ib("_mat-animation-noopable","NoopAnimations"===e._animationMode)("mat-button-disabled",e.disabled))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex"},exportAs:["matButton","matAnchor"],features:[s.Ab],attrs:r,ngContentSelectors:c,decls:4,vars:5,consts:[[1,"mat-button-wrapper"],["matRipple","",1,"mat-button-ripple",3,"matRippleDisabled","matRippleCentered","matRippleTrigger"],[1,"mat-button-focus-overlay"]],template:function(t,e){1&t&&(s.nc(),s.Wb(0,"span",0),s.mc(1),s.Vb(),s.Rb(2,"span",1),s.Rb(3,"span",2)),2&t&&(s.Db(2),s.Ib("mat-button-ripple-round",e.isRoundButton||e.isIconButton),s.oc("matRippleDisabled",e._isRippleDisabled())("matRippleCentered",e.isIconButton)("matRippleTrigger",e._getHostElement()))},directives:[n.u],styles:[l],encapsulation:2,changeDetection:0}),t})(),f=(()=>{class t{}return t.\u0275mod=s.Ob({type:t}),t.\u0275inj=s.Nb({factory:function(e){return new(e||t)},imports:[[n.v,n.k],n.k]}),t})()},bv9b:function(t,e,i){"use strict";i.d(e,"a",(function(){return m})),i.d(e,"b",(function(){return v}));var n=i("fXoL"),a=i("ofXK"),s=i("FKr1"),o=i("8LU1"),r=i("R1ws"),c=i("quSY"),l=i("xgIS"),d=i("pLZG");const h=["primaryValueBar"];class u{constructor(t){this._elementRef=t}}const p=Object(s.A)(u,"primary"),b=new n.s("mat-progress-bar-location",{providedIn:"root",factory:function(){const t=Object(n.Y)(a.e),e=t?t.location:null;return{getPathname:()=>e?e.pathname+e.search:""}}});let f=0,m=(()=>{class t extends p{constructor(t,e,i,a){super(t),this._elementRef=t,this._ngZone=e,this._animationMode=i,this._isNoopAnimation=!1,this._value=0,this._bufferValue=0,this.animationEnd=new n.o,this._animationEndSubscription=c.a.EMPTY,this.mode="determinate",this.progressbarId="mat-progress-bar-"+f++;const s=a?a.getPathname().split("#")[0]:"";this._rectangleFillValue=`url('${s}#${this.progressbarId}')`,this._isNoopAnimation="NoopAnimations"===i}get value(){return this._value}set value(t){this._value=g(Object(o.f)(t)||0)}get bufferValue(){return this._bufferValue}set bufferValue(t){this._bufferValue=g(t||0)}_primaryTransform(){return{transform:`scaleX(${this.value/100})`}}_bufferTransform(){return"buffer"===this.mode?{transform:`scaleX(${this.bufferValue/100})`}:null}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{const t=this._primaryValueBar.nativeElement;this._animationEndSubscription=Object(l.a)(t,"transitionend").pipe(Object(d.a)(e=>e.target===t)).subscribe(()=>{"determinate"!==this.mode&&"buffer"!==this.mode||this._ngZone.run(()=>this.animationEnd.next({value:this.value}))})})}ngOnDestroy(){this._animationEndSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(n.C),n.Qb(r.a,8),n.Qb(b,8))},t.\u0275cmp=n.Kb({type:t,selectors:[["mat-progress-bar"]],viewQuery:function(t,e){var i;1&t&&n.Xc(h,!0),2&t&&n.yc(i=n.ec())&&(e._primaryValueBar=i.first)},hostAttrs:["role","progressbar","aria-valuemin","0","aria-valuemax","100",1,"mat-progress-bar"],hostVars:4,hostBindings:function(t,e){2&t&&(n.Eb("aria-valuenow","indeterminate"===e.mode||"query"===e.mode?null:e.value)("mode",e.mode),n.Ib("_mat-animation-noopable",e._isNoopAnimation))},inputs:{color:"color",mode:"mode",value:"value",bufferValue:"bufferValue"},outputs:{animationEnd:"animationEnd"},exportAs:["matProgressBar"],features:[n.Ab],decls:9,vars:4,consts:[["width","100%","height","4","focusable","false",1,"mat-progress-bar-background","mat-progress-bar-element"],["x","4","y","0","width","8","height","4","patternUnits","userSpaceOnUse",3,"id"],["cx","2","cy","2","r","2"],["width","100%","height","100%"],[1,"mat-progress-bar-buffer","mat-progress-bar-element",3,"ngStyle"],[1,"mat-progress-bar-primary","mat-progress-bar-fill","mat-progress-bar-element",3,"ngStyle"],["primaryValueBar",""],[1,"mat-progress-bar-secondary","mat-progress-bar-fill","mat-progress-bar-element"]],template:function(t,e){1&t&&(n.gc(),n.Wb(0,"svg",0),n.Wb(1,"defs"),n.Wb(2,"pattern",1),n.Rb(3,"circle",2),n.Vb(),n.Vb(),n.Rb(4,"rect",3),n.Vb(),n.fc(),n.Rb(5,"div",4),n.Rb(6,"div",5,6),n.Rb(8,"div",7)),2&t&&(n.Db(2),n.oc("id",e.progressbarId),n.Db(2),n.Eb("fill",e._rectangleFillValue),n.Db(1),n.oc("ngStyle",e._bufferTransform()),n.Db(1),n.oc("ngStyle",e._primaryTransform()))},directives:[a.w],styles:['.mat-progress-bar{display:block;height:4px;overflow:hidden;position:relative;transition:opacity 250ms linear;width:100%}._mat-animation-noopable.mat-progress-bar{transition:none;animation:none}.mat-progress-bar .mat-progress-bar-element,.mat-progress-bar .mat-progress-bar-fill::after{height:100%;position:absolute;width:100%}.mat-progress-bar .mat-progress-bar-background{width:calc(100% + 10px)}.cdk-high-contrast-active .mat-progress-bar .mat-progress-bar-background{display:none}.mat-progress-bar .mat-progress-bar-buffer{transform-origin:top left;transition:transform 250ms ease}.cdk-high-contrast-active .mat-progress-bar .mat-progress-bar-buffer{border-top:solid 5px;opacity:.5}.mat-progress-bar .mat-progress-bar-secondary{display:none}.mat-progress-bar .mat-progress-bar-fill{animation:none;transform-origin:top left;transition:transform 250ms ease}.cdk-high-contrast-active .mat-progress-bar .mat-progress-bar-fill{border-top:solid 4px}.mat-progress-bar .mat-progress-bar-fill::after{animation:none;content:"";display:inline-block;left:0}.mat-progress-bar[dir=rtl],[dir=rtl] .mat-progress-bar{transform:rotateY(180deg)}.mat-progress-bar[mode=query]{transform:rotateZ(180deg)}.mat-progress-bar[mode=query][dir=rtl],[dir=rtl] .mat-progress-bar[mode=query]{transform:rotateZ(180deg) rotateY(180deg)}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-fill,.mat-progress-bar[mode=query] .mat-progress-bar-fill{transition:none}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-primary,.mat-progress-bar[mode=query] .mat-progress-bar-primary{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-primary-indeterminate-translate 2000ms infinite linear;left:-145.166611%}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-primary.mat-progress-bar-fill::after,.mat-progress-bar[mode=query] .mat-progress-bar-primary.mat-progress-bar-fill::after{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-primary-indeterminate-scale 2000ms infinite linear}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-secondary,.mat-progress-bar[mode=query] .mat-progress-bar-secondary{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-secondary-indeterminate-translate 2000ms infinite linear;left:-54.888891%;display:block}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-secondary.mat-progress-bar-fill::after,.mat-progress-bar[mode=query] .mat-progress-bar-secondary.mat-progress-bar-fill::after{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-secondary-indeterminate-scale 2000ms infinite linear}.mat-progress-bar[mode=buffer] .mat-progress-bar-background{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-background-scroll 250ms infinite linear;display:block}.mat-progress-bar._mat-animation-noopable .mat-progress-bar-fill,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-fill::after,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-buffer,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-primary,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-primary.mat-progress-bar-fill::after,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-secondary,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-secondary.mat-progress-bar-fill::after,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-background{animation:none;transition-duration:1ms}@keyframes mat-progress-bar-primary-indeterminate-translate{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(83.67142%)}100%{transform:translateX(200.611057%)}}@keyframes mat-progress-bar-primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes mat-progress-bar-secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(37.651913%)}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(84.386165%)}100%{transform:translateX(160.277782%)}}@keyframes mat-progress-bar-secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes mat-progress-bar-background-scroll{to{transform:translateX(-8px)}}\n'],encapsulation:2,changeDetection:0}),t})();function g(t,e=0,i=100){return Math.max(e,Math.min(i,t))}let v=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[a.c,s.k],s.k]}),t})()},c2HN:function(t,e,i){"use strict";function n(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}i.d(e,"a",(function(){return n}))},cH1L:function(t,e,i){"use strict";i.d(e,"a",(function(){return c})),i.d(e,"b",(function(){return r})),i.d(e,"c",(function(){return o}));var n=i("fXoL"),a=i("ofXK");const s=new n.s("cdk-dir-doc",{providedIn:"root",factory:function(){return Object(n.Y)(a.e)}});let o=(()=>{class t{constructor(t){if(this.value="ltr",this.change=new n.o,t){const e=t.documentElement?t.documentElement.dir:null,i=(t.body?t.body.dir:null)||e;this.value="ltr"===i||"rtl"===i?i:"ltr"}}ngOnDestroy(){this.change.complete()}}return t.\u0275fac=function(e){return new(e||t)(n.ac(s,8))},t.\u0275prov=Object(n.Mb)({factory:function(){return new t(Object(n.ac)(s,8))},token:t,providedIn:"root"}),t})(),r=(()=>{class t{constructor(){this._dir="ltr",this._isInitialized=!1,this.change=new n.o}get dir(){return this._dir}set dir(t){const e=this._dir,i=t?t.toLowerCase():t;this._rawDir=t,this._dir="ltr"===i||"rtl"===i?i:"ltr",e!==this._dir&&this._isInitialized&&this.change.emit(this._dir)}get value(){return this.dir}ngAfterContentInit(){this._isInitialized=!0}ngOnDestroy(){this.change.complete()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["","dir",""]],hostVars:1,hostBindings:function(t,e){2&t&&n.Eb("dir",e._rawDir)},inputs:{dir:"dir"},outputs:{change:"dirChange"},exportAs:["dir"],features:[n.Cb([{provide:o,useExisting:t}])]}),t})(),c=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)}}),t})()},cMWS:function(t,e,i){"use strict";i.d(e,"a",(function(){return r}));var n=i("tk/3"),a=i("ofXK"),s=i("sYmb"),o=i("fXoL");let r=(()=>{class t{}return t.\u0275mod=o.Ob({type:t}),t.\u0275inj=o.Nb({factory:function(e){return new(e||t)},providers:[],imports:[[a.c,s.c.forRoot({loader:{provide:s.b,useFactory:l,deps:[n.b]}})],s.c]}),t})();class c{constructor(t){this.http=t}getTranslation(t){return this.http.get("../rest/languages/"+t)}}function l(t){return new c(t)}},cp0P:function(t,e,i){"use strict";i.d(e,"a",(function(){return c}));var n=i("HDdC"),a=i("DH7j"),s=i("lJxs"),o=i("XoHu"),r=i("Cfvw");function c(...t){if(1===t.length){const e=t[0];if(Object(a.a)(e))return l(e,null);if(Object(o.a)(e)&&Object.getPrototypeOf(e)===Object.prototype){const t=Object.keys(e);return l(t.map(t=>e[t]),t)}}if("function"==typeof t[t.length-1]){const e=t.pop();return l(t=1===t.length&&Object(a.a)(t[0])?t[0]:t,null).pipe(Object(s.a)(t=>e(...t)))}return l(t,null)}function l(t,e){return new n.a(i=>{const n=t.length;if(0===n)return void i.complete();const a=new Array(n);let s=0,o=0;for(let c=0;c<n;c++){const l=Object(r.a)(t[c]);let d=!1;i.add(l.subscribe({next:t=>{d||(d=!0,o++),a[c]=t},error:t=>i.error(t),complete:()=>{s++,s!==n&&d||(o===n&&i.next(e?e.reduce((t,e,i)=>(t[e]=a[i],t),{}):a),i.complete())}}))}})}},d3UM:function(t,e,i){"use strict";i.d(e,"a",(function(){return $})),i.d(e,"b",(function(){return H})),i.d(e,"c",(function(){return U}));var n=i("rDax"),a=i("ofXK"),s=i("fXoL"),o=i("FKr1"),r=i("kmnG"),c=i("vxfF"),l=i("u47x"),d=i("8LU1"),h=i("0EQZ"),u=i("FtGj"),p=i("XNiG"),b=i("NXyV"),f=i("VRyK"),m=i("JX91"),g=i("eIep"),v=i("IzEk"),_=i("pLZG"),y=i("lJxs"),x=i("/uUt"),C=i("1G5W"),O=i("R0Ic"),D=i("cH1L"),w=i("3Pt+");const M=["trigger"],k=["panel"];function S(t,e){if(1&t&&(s.Wb(0,"span",8),s.Qc(1),s.Vb()),2&t){const t=s.hc();s.Db(1),s.Rc(t.placeholder||"\xa0")}}function I(t,e){if(1&t&&(s.Wb(0,"span"),s.Qc(1),s.Vb()),2&t){const t=s.hc(2);s.Db(1),s.Rc(t.triggerValue||"\xa0")}}function P(t,e){1&t&&s.mc(0,0,["*ngSwitchCase","true"])}function V(t,e){if(1&t&&(s.Wb(0,"span",9),s.Oc(1,I,2,1,"span",10),s.Oc(2,P,1,0,"ng-content",11),s.Vb()),2&t){const t=s.hc();s.oc("ngSwitch",!!t.customTrigger),s.Db(2),s.oc("ngSwitchCase",!0)}}function R(t,e){if(1&t){const t=s.Xb();s.Wb(0,"div",12),s.Wb(1,"div",13,14),s.dc("@transformPanel.done",(function(e){return s.Dc(t),s.hc()._panelDoneAnimatingStream.next(e.toState)}))("keydown",(function(e){return s.Dc(t),s.hc()._handleKeydown(e)})),s.mc(3,1),s.Vb(),s.Vb()}if(2&t){const t=s.hc();s.oc("@transformPanelWrap",void 0),s.Db(1),s.Gb("mat-select-panel ",t._getPanelTheme(),""),s.Lc("transform-origin",t._transformOrigin)("font-size",t._triggerFontSize,"px"),s.oc("ngClass",t.panelClass)("@transformPanel",t.multiple?"showing-multiple":"showing"),s.Eb("id",t.id+"-panel")("aria-multiselectable",t.multiple)("aria-label",t.ariaLabel||null)("aria-labelledby",t._getPanelAriaLabelledby())}}const j=[[["mat-select-trigger"]],"*"],A=["mat-select-trigger","*"],W={transformPanelWrap:Object(O.n)("transformPanelWrap",[Object(O.m)("* => void",Object(O.i)("@transformPanel",[Object(O.f)()],{optional:!0}))]),transformPanel:Object(O.n)("transformPanel",[Object(O.k)("void",Object(O.l)({transform:"scaleY(0.8)",minWidth:"100%",opacity:0})),Object(O.k)("showing",Object(O.l)({opacity:1,minWidth:"calc(100% + 32px)",transform:"scaleY(1)"})),Object(O.k)("showing-multiple",Object(O.l)({opacity:1,minWidth:"calc(100% + 64px)",transform:"scaleY(1)"})),Object(O.m)("void => *",Object(O.e)("120ms cubic-bezier(0, 0, 0.2, 1)")),Object(O.m)("* => void",Object(O.e)("100ms 25ms linear",Object(O.l)({opacity:0})))])};let T=0;const E=new s.s("mat-select-scroll-strategy"),F=new s.s("MAT_SELECT_CONFIG"),L={provide:E,deps:[n.c],useFactory:function(t){return()=>t.scrollStrategies.reposition()}};class Q{constructor(t,e){this.source=t,this.value=e}}class N{constructor(t,e,i,n,a){this._elementRef=t,this._defaultErrorStateMatcher=e,this._parentForm=i,this._parentFormGroup=n,this.ngControl=a}}const z=Object(o.B)(Object(o.F)(Object(o.C)(Object(o.D)(N)))),B=new s.s("MatSelectTrigger");let U=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["mat-select-trigger"]],features:[s.Cb([{provide:B,useExisting:t}])]}),t})(),$=(()=>{class t extends z{constructor(t,e,i,n,a,o,r,c,l,d,h,u,x,C){super(a,n,r,c,d),this._viewportRuler=t,this._changeDetectorRef=e,this._ngZone=i,this._dir=o,this._parentFormField=l,this.ngControl=d,this._liveAnnouncer=x,this._panelOpen=!1,this._required=!1,this._scrollTop=0,this._multiple=!1,this._compareWith=(t,e)=>t===e,this._uid="mat-select-"+T++,this._triggerAriaLabelledBy=null,this._destroy=new p.a,this._triggerFontSize=0,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+T++,this._transformOrigin="top",this._panelDoneAnimatingStream=new p.a,this._offsetY=0,this._positions=[{originX:"start",originY:"top",overlayX:"start",overlayY:"top"},{originX:"start",originY:"bottom",overlayX:"start",overlayY:"bottom"}],this._disableOptionCentering=!1,this._focused=!1,this.controlType="mat-select",this.ariaLabel="",this.optionSelectionChanges=Object(b.a)(()=>{const t=this.options;return t?t.changes.pipe(Object(m.a)(t),Object(g.a)(()=>Object(f.a)(...t.map(t=>t.onSelectionChange)))):this._ngZone.onStable.pipe(Object(v.a)(1),Object(g.a)(()=>this.optionSelectionChanges))}),this.openedChange=new s.o,this._openedStream=this.openedChange.pipe(Object(_.a)(t=>t),Object(y.a)(()=>{})),this._closedStream=this.openedChange.pipe(Object(_.a)(t=>!t),Object(y.a)(()=>{})),this.selectionChange=new s.o,this.valueChange=new s.o,this.ngControl&&(this.ngControl.valueAccessor=this),this._scrollStrategyFactory=u,this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=parseInt(h)||0,this.id=this.id,C&&(null!=C.disableOptionCentering&&(this.disableOptionCentering=C.disableOptionCentering),null!=C.typeaheadDebounceInterval&&(this.typeaheadDebounceInterval=C.typeaheadDebounceInterval))}get focused(){return this._focused||this._panelOpen}get placeholder(){return this._placeholder}set placeholder(t){this._placeholder=t,this.stateChanges.next()}get required(){return this._required}set required(t){this._required=Object(d.c)(t),this.stateChanges.next()}get multiple(){return this._multiple}set multiple(t){this._multiple=Object(d.c)(t)}get disableOptionCentering(){return this._disableOptionCentering}set disableOptionCentering(t){this._disableOptionCentering=Object(d.c)(t)}get compareWith(){return this._compareWith}set compareWith(t){this._compareWith=t,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(t){t!==this._value&&(this.options&&this._setSelectionByValue(t),this._value=t)}get typeaheadDebounceInterval(){return this._typeaheadDebounceInterval}set typeaheadDebounceInterval(t){this._typeaheadDebounceInterval=Object(d.f)(t)}get id(){return this._id}set id(t){this._id=t||this._uid,this.stateChanges.next()}ngOnInit(){this._selectionModel=new h.c(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(Object(x.a)(),Object(C.a)(this._destroy)).subscribe(()=>{this.panelOpen?(this._scrollTop=0,this.openedChange.emit(!0)):(this.openedChange.emit(!1),this.overlayDir.offsetX=0,this._changeDetectorRef.markForCheck())}),this._viewportRuler.change().pipe(Object(C.a)(this._destroy)).subscribe(()=>{this._panelOpen&&(this._triggerRect=this.trigger.nativeElement.getBoundingClientRect(),this._changeDetectorRef.markForCheck())})}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(Object(C.a)(this._destroy)).subscribe(t=>{t.added.forEach(t=>t.select()),t.removed.forEach(t=>t.deselect())}),this.options.changes.pipe(Object(m.a)(null),Object(C.a)(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){const t=this._getTriggerAriaLabelledby();if(t!==this._triggerAriaLabelledBy){const e=this._elementRef.nativeElement;this._triggerAriaLabelledBy=t,t?e.setAttribute("aria-labelledby",t):e.removeAttribute("aria-labelledby")}this.ngControl&&this.updateErrorState()}ngOnChanges(t){t.disabled&&this.stateChanges.next(),t.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this._typeaheadDebounceInterval)}ngOnDestroy(){this._destroy.next(),this._destroy.complete(),this.stateChanges.complete()}toggle(){this.panelOpen?this.close():this.open()}open(){!this.disabled&&this.options&&this.options.length&&!this._panelOpen&&(this._triggerRect=this.trigger.nativeElement.getBoundingClientRect(),this._triggerFontSize=parseInt(getComputedStyle(this.trigger.nativeElement).fontSize||"0"),this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._calculateOverlayPosition(),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this._ngZone.onStable.pipe(Object(v.a)(1)).subscribe(()=>{this._triggerFontSize&&this.overlayDir.overlayRef&&this.overlayDir.overlayRef.overlayElement&&(this.overlayDir.overlayRef.overlayElement.style.fontSize=this._triggerFontSize+"px")}))}close(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched())}writeValue(t){this.value=t}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel.selected:this._selectionModel.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){const t=this._selectionModel.selected.map(t=>t.viewValue);return this._isRtl()&&t.reverse(),t.join(", ")}return this._selectionModel.selected[0].viewValue}_isRtl(){return!!this._dir&&"rtl"===this._dir.value}_handleKeydown(t){this.disabled||(this.panelOpen?this._handleOpenKeydown(t):this._handleClosedKeydown(t))}_handleClosedKeydown(t){const e=t.keyCode,i=e===u.e||e===u.s||e===u.k||e===u.o,n=e===u.g||e===u.q,a=this._keyManager;if(!a.isTyping()&&n&&!Object(u.v)(t)||(this.multiple||t.altKey)&&i)t.preventDefault(),this.open();else if(!this.multiple){const e=this.selected;a.onKeydown(t);const i=this.selected;i&&e!==i&&this._liveAnnouncer.announce(i.viewValue,1e4)}}_handleOpenKeydown(t){const e=this._keyManager,i=t.keyCode,n=i===u.e||i===u.s,a=e.isTyping();if(n&&t.altKey)t.preventDefault(),this.close();else if(a||i!==u.g&&i!==u.q||!e.activeItem||Object(u.v)(t))if(!a&&this._multiple&&i===u.a&&t.ctrlKey){t.preventDefault();const e=this.options.some(t=>!t.disabled&&!t.selected);this.options.forEach(t=>{t.disabled||(e?t.select():t.deselect())})}else{const i=e.activeItemIndex;e.onKeydown(t),this._multiple&&n&&t.shiftKey&&e.activeItem&&e.activeItemIndex!==i&&e.activeItem._selectViaInteraction()}else t.preventDefault(),e.activeItem._selectViaInteraction()}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this.disabled||this.panelOpen||(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_onAttached(){this.overlayDir.positionChange.pipe(Object(v.a)(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._calculateOverlayOffsetX(),this.panel.nativeElement.scrollTop=this._scrollTop})}_getPanelTheme(){return this._parentFormField?"mat-"+this._parentFormField.color:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this._setSelectionByValue(this.ngControl?this.ngControl.value:this._value),this.stateChanges.next()})}_setSelectionByValue(t){if(this.multiple&&t)Array.isArray(t),this._selectionModel.clear(),t.forEach(t=>this._selectValue(t)),this._sortValues();else{this._selectionModel.clear();const e=this._selectValue(t);e?this._keyManager.updateActiveItem(e):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectValue(t){const e=this.options.find(e=>{try{return null!=e.value&&this._compareWith(e.value,t)}catch(i){return!1}});return e&&this._selectionModel.select(e),e}_initKeyManager(){this._keyManager=new l.b(this.options).withTypeAhead(this._typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withAllowedModifierKeys(["shiftKey"]),this._keyManager.tabOut.pipe(Object(C.a)(this._destroy)).subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.pipe(Object(C.a)(this._destroy)).subscribe(()=>{this._panelOpen&&this.panel?this._scrollActiveOptionIntoView():this._panelOpen||this.multiple||!this._keyManager.activeItem||this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){const t=Object(f.a)(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Object(C.a)(t)).subscribe(t=>{this._onSelect(t.source,t.isUserInput),t.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Object(f.a)(...this.options.map(t=>t._stateChanges)).pipe(Object(C.a)(t)).subscribe(()=>{this._changeDetectorRef.markForCheck(),this.stateChanges.next()})}_onSelect(t,e){const i=this._selectionModel.isSelected(t);null!=t.value||this._multiple?(i!==t.selected&&(t.selected?this._selectionModel.select(t):this._selectionModel.deselect(t)),e&&this._keyManager.setActiveItem(t),this.multiple&&(this._sortValues(),e&&this.focus())):(t.deselect(),this._selectionModel.clear(),null!=this.value&&this._propagateChanges(t.value)),i!==this._selectionModel.isSelected(t)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){const t=this.options.toArray();this._selectionModel.sort((e,i)=>this.sortComparator?this.sortComparator(e,i,t):t.indexOf(e)-t.indexOf(i)),this.stateChanges.next()}}_propagateChanges(t){let e=null;e=this.multiple?this.selected.map(t=>t.value):this.selected?this.selected.value:t,this._value=e,this.valueChange.emit(e),this._onChange(e),this.selectionChange.emit(new Q(this,e)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){this._keyManager&&(this.empty?this._keyManager.setFirstItemActive():this._keyManager.setActiveItem(this._selectionModel.selected[0]))}_scrollActiveOptionIntoView(){const t=this._keyManager.activeItemIndex||0,e=Object(o.y)(t,this.options,this.optionGroups),i=this._getItemHeight();this.panel.nativeElement.scrollTop=Object(o.z)((t+e)*i,i,this.panel.nativeElement.scrollTop,256)}focus(t){this._elementRef.nativeElement.focus(t)}_getOptionIndex(t){return this.options.reduce((e,i,n)=>void 0!==e?e:t===i?n:void 0,void 0)}_calculateOverlayPosition(){const t=this._getItemHeight(),e=this._getItemCount(),i=Math.min(e*t,256),n=e*t-i;let a=this.empty?0:this._getOptionIndex(this._selectionModel.selected[0]);a+=Object(o.y)(a,this.options,this.optionGroups);const s=i/2;this._scrollTop=this._calculateOverlayScroll(a,s,n),this._offsetY=this._calculateOverlayOffsetY(a,s,n),this._checkOverlayWithinViewport(n)}_calculateOverlayScroll(t,e,i){const n=this._getItemHeight();return Math.min(Math.max(0,n*t-e+n/2),i)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;const t=this._getLabelId();return this.ariaLabelledby?t+" "+this.ariaLabelledby:t}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getLabelId(){var t;return(null===(t=this._parentFormField)||void 0===t?void 0:t.getLabelId())||""}_calculateOverlayOffsetX(){const t=this.overlayDir.overlayRef.overlayElement.getBoundingClientRect(),e=this._viewportRuler.getViewportSize(),i=this._isRtl(),n=this.multiple?56:32;let a;if(this.multiple)a=40;else{let t=this._selectionModel.selected[0]||this.options.first;a=t&&t.group?32:16}i||(a*=-1);const s=0-(t.left+a-(i?n:0)),o=t.right+a-e.width+(i?0:n);s>0?a+=s+8:o>0&&(a-=o+8),this.overlayDir.offsetX=Math.round(a),this.overlayDir.overlayRef.updatePosition()}_calculateOverlayOffsetY(t,e,i){const n=this._getItemHeight(),a=(n-this._triggerRect.height)/2,s=Math.floor(256/n);let o;return this._disableOptionCentering?0:(o=0===this._scrollTop?t*n:this._scrollTop===i?(t-(this._getItemCount()-s))*n+(n-(this._getItemCount()*n-256)%n):e-n/2,Math.round(-1*o-a))}_checkOverlayWithinViewport(t){const e=this._getItemHeight(),i=this._viewportRuler.getViewportSize(),n=this._triggerRect.top-8,a=i.height-this._triggerRect.bottom-8,s=Math.abs(this._offsetY),o=Math.min(this._getItemCount()*e,256)-s-this._triggerRect.height;o>a?this._adjustPanelUp(o,a):s>n?this._adjustPanelDown(s,n,t):this._transformOrigin=this._getOriginBasedOnOption()}_adjustPanelUp(t,e){const i=Math.round(t-e);this._scrollTop-=i,this._offsetY-=i,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop<=0&&(this._scrollTop=0,this._offsetY=0,this._transformOrigin="50% bottom 0px")}_adjustPanelDown(t,e,i){const n=Math.round(t-e);if(this._scrollTop+=n,this._offsetY+=n,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop>=i)return this._scrollTop=i,this._offsetY=0,void(this._transformOrigin="50% top 0px")}_getOriginBasedOnOption(){const t=this._getItemHeight(),e=(t-this._triggerRect.height)/2;return`50% ${Math.abs(this._offsetY)-e+t/2}px 0px`}_getItemCount(){return this.options.length+this.optionGroups.length}_getItemHeight(){return 3*this._triggerFontSize}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;let t=this._getLabelId()+" "+this._valueId;return this.ariaLabelledby&&(t+=" "+this.ariaLabelledby),t}setDescribedByIds(t){this._ariaDescribedby=t.join(" ")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this._panelOpen||!this.empty}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(c.h),s.Qb(s.h),s.Qb(s.C),s.Qb(o.d),s.Qb(s.l),s.Qb(D.c,8),s.Qb(w.w,8),s.Qb(w.m,8),s.Qb(r.a,8),s.Qb(w.t,10),s.bc("tabindex"),s.Qb(E),s.Qb(l.k),s.Qb(F,8))},t.\u0275cmp=s.Kb({type:t,selectors:[["mat-select"]],contentQueries:function(t,e,i){var n;1&t&&(s.Jb(i,B,!0),s.Jb(i,o.p,!0),s.Jb(i,o.h,!0)),2&t&&(s.yc(n=s.ec())&&(e.customTrigger=n.first),s.yc(n=s.ec())&&(e.options=n),s.yc(n=s.ec())&&(e.optionGroups=n))},viewQuery:function(t,e){var i;1&t&&(s.Xc(M,!0),s.Xc(k,!0),s.Xc(n.a,!0)),2&t&&(s.yc(i=s.ec())&&(e.trigger=i.first),s.yc(i=s.ec())&&(e.panel=i.first),s.yc(i=s.ec())&&(e.overlayDir=i.first))},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","true",1,"mat-select"],hostVars:20,hostBindings:function(t,e){1&t&&s.dc("keydown",(function(t){return e._handleKeydown(t)}))("focus",(function(){return e._onFocus()}))("blur",(function(){return e._onBlur()})),2&t&&(s.Eb("id",e.id)("tabindex",e.tabIndex)("aria-controls",e.panelOpen?e.id+"-panel":null)("aria-expanded",e.panelOpen)("aria-label",e.ariaLabel||null)("aria-required",e.required.toString())("aria-disabled",e.disabled.toString())("aria-invalid",e.errorState)("aria-describedby",e._ariaDescribedby||null)("aria-activedescendant",e._getAriaActiveDescendant()),s.Ib("mat-select-disabled",e.disabled)("mat-select-invalid",e.errorState)("mat-select-required",e.required)("mat-select-empty",e.empty)("mat-select-multiple",e.multiple))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex",ariaLabel:["aria-label","ariaLabel"],id:"id",disableOptionCentering:"disableOptionCentering",typeaheadDebounceInterval:"typeaheadDebounceInterval",placeholder:"placeholder",required:"required",multiple:"multiple",compareWith:"compareWith",value:"value",panelClass:"panelClass",ariaLabelledby:["aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",sortComparator:"sortComparator"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],features:[s.Cb([{provide:r.d,useExisting:t},{provide:o.i,useExisting:t}]),s.Ab,s.Bb],ngContentSelectors:A,decls:9,vars:10,consts:[["cdk-overlay-origin","",1,"mat-select-trigger",3,"click"],["origin","cdkOverlayOrigin","trigger",""],[1,"mat-select-value",3,"ngSwitch"],["class","mat-select-placeholder",4,"ngSwitchCase"],["class","mat-select-value-text",3,"ngSwitch",4,"ngSwitchCase"],[1,"mat-select-arrow-wrapper"],[1,"mat-select-arrow"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayMinWidth","cdkConnectedOverlayOffsetY","backdropClick","attach","detach"],[1,"mat-select-placeholder"],[1,"mat-select-value-text",3,"ngSwitch"],[4,"ngSwitchDefault"],[4,"ngSwitchCase"],[1,"mat-select-panel-wrap"],["role","listbox","tabindex","-1",3,"ngClass","keydown"],["panel",""]],template:function(t,e){if(1&t&&(s.nc(j),s.Wb(0,"div",0,1),s.dc("click",(function(){return e.toggle()})),s.Wb(3,"div",2),s.Oc(4,S,2,1,"span",3),s.Oc(5,V,3,2,"span",4),s.Vb(),s.Wb(6,"div",5),s.Rb(7,"div",6),s.Vb(),s.Vb(),s.Oc(8,R,4,14,"ng-template",7),s.dc("backdropClick",(function(){return e.close()}))("attach",(function(){return e._onAttached()}))("detach",(function(){return e.close()}))),2&t){const t=s.zc(1);s.Db(3),s.oc("ngSwitch",e.empty),s.Eb("id",e._valueId),s.Db(1),s.oc("ngSwitchCase",!0),s.Db(1),s.oc("ngSwitchCase",!1),s.Db(3),s.oc("cdkConnectedOverlayScrollStrategy",e._scrollStrategy)("cdkConnectedOverlayOrigin",t)("cdkConnectedOverlayOpen",e.panelOpen)("cdkConnectedOverlayPositions",e._positions)("cdkConnectedOverlayMinWidth",null==e._triggerRect?null:e._triggerRect.width)("cdkConnectedOverlayOffsetY",e._offsetY)}},directives:[n.b,a.x,a.y,n.a,a.z,a.q],styles:[".mat-select{display:inline-block;width:100%;outline:none}.mat-select-trigger{display:inline-table;cursor:pointer;position:relative;box-sizing:border-box}.mat-select-disabled .mat-select-trigger{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-select-value{display:table-cell;max-width:0;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-select-arrow-wrapper{display:table-cell;vertical-align:middle}.mat-form-field-appearance-fill .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-outline .mat-select-arrow-wrapper{transform:translateY(-25%)}.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:none}.mat-select-arrow{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;margin:0 4px}.mat-select-panel-wrap{flex-basis:100%}.mat-select-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;padding-top:0;padding-bottom:0;max-height:256px;min-width:100%;border-radius:4px}.cdk-high-contrast-active .mat-select-panel{outline:solid 1px}.mat-select-panel .mat-optgroup-label,.mat-select-panel .mat-option{font-size:inherit;line-height:3em;height:3em}.mat-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-form-field-flex{cursor:pointer}.mat-form-field-type-mat-select .mat-form-field-label{width:calc(100% - 18px)}.mat-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable .mat-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-select-placeholder{color:transparent;-webkit-text-fill-color:transparent;transition:none;display:block}\n"],encapsulation:2,data:{animation:[W.transformPanelWrap,W.transformPanel]},changeDetection:0}),t})(),H=(()=>{class t{}return t.\u0275mod=s.Ob({type:t}),t.\u0275inj=s.Nb({factory:function(e){return new(e||t)},providers:[L],imports:[[a.c,n.f,o.q,o.k],c.c,r.e,o.q,o.k]}),t})()},dNgK:function(t,e,i){"use strict";i.d(e,"a",(function(){return g})),i.d(e,"b",(function(){return M})),i.d(e,"c",(function(){return O})),i.d(e,"d",(function(){return D}));var n=i("rDax"),a=i("+rOU"),s=i("ofXK"),o=i("fXoL"),r=i("FKr1"),c=i("bTqV"),l=i("XNiG"),d=i("IzEk"),h=i("1G5W"),u=i("R0Ic"),p=i("u47x"),b=i("0MNC");function f(t,e){if(1&t){const t=o.Xb();o.Wb(0,"div",1),o.Wb(1,"button",2),o.dc("click",(function(){return o.Dc(t),o.hc().action()})),o.Qc(2),o.Vb(),o.Vb()}if(2&t){const t=o.hc();o.Db(2),o.Rc(t.data.action)}}function m(t,e){}const g=new o.s("MatSnackBarData");class v{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}const _=Math.pow(2,31)-1;class y{constructor(t,e){this._overlayRef=e,this._afterDismissed=new l.a,this._afterOpened=new l.a,this._onAction=new l.a,this._dismissedByAction=!1,this.containerInstance=t,this.onAction().subscribe(()=>this.dismiss()),t._onExit.subscribe(()=>this._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete())}closeWithAction(){this.dismissWithAction()}_dismissAfter(t){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(t,_))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}}let x=(()=>{class t{constructor(t,e){this.snackBarRef=t,this.data=e}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(y),o.Qb(g))},t.\u0275cmp=o.Kb({type:t,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-simple-snackbar"],decls:3,vars:2,consts:[["class","mat-simple-snackbar-action",4,"ngIf"],[1,"mat-simple-snackbar-action"],["mat-button","",3,"click"]],template:function(t,e){1&t&&(o.Wb(0,"span"),o.Qc(1),o.Vb(),o.Oc(2,f,3,1,"div",0)),2&t&&(o.Db(1),o.Rc(e.data.message),o.Db(1),o.oc("ngIf",e.hasAction))},directives:[s.t,c.b],styles:[".mat-simple-snackbar{display:flex;justify-content:space-between;align-items:center;line-height:20px;opacity:1}.mat-simple-snackbar-action{flex-shrink:0;margin:-8px -8px -8px 8px}.mat-simple-snackbar-action button{max-height:36px;min-width:0}[dir=rtl] .mat-simple-snackbar-action{margin-left:-8px;margin-right:8px}\n"],encapsulation:2,changeDetection:0}),t})();const C={snackBarState:Object(u.n)("state",[Object(u.k)("void, hidden",Object(u.l)({transform:"scale(0.8)",opacity:0})),Object(u.k)("visible",Object(u.l)({transform:"scale(1)",opacity:1})),Object(u.m)("* => visible",Object(u.e)("150ms cubic-bezier(0, 0, 0.2, 1)")),Object(u.m)("* => void, * => hidden",Object(u.e)("75ms cubic-bezier(0.4, 0.0, 1, 1)",Object(u.l)({opacity:0})))])};let O=(()=>{class t extends a.a{constructor(t,e,i,n){super(),this._ngZone=t,this._elementRef=e,this._changeDetectorRef=i,this.snackBarConfig=n,this._destroyed=!1,this._onExit=new l.a,this._onEnter=new l.a,this._animationState="void",this.attachDomPortal=t=>(this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachDomPortal(t)),this._role="assertive"!==n.politeness||n.announcementMessage?"off"===n.politeness?null:"status":"alert"}attachComponentPortal(t){return this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachComponentPortal(t)}attachTemplatePortal(t){return this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachTemplatePortal(t)}onAnimationEnd(t){const{fromState:e,toState:i}=t;if(("void"===i&&"void"!==e||"hidden"===i)&&this._completeExit(),"visible"===i){const t=this._onEnter;this._ngZone.run(()=>{t.next(),t.complete()})}}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.detectChanges())}exit(){return this._animationState="hidden",this._elementRef.nativeElement.setAttribute("mat-exit",""),this._onExit}ngOnDestroy(){this._destroyed=!0,this._completeExit()}_completeExit(){this._ngZone.onMicrotaskEmpty.pipe(Object(d.a)(1)).subscribe(()=>{this._onExit.next(),this._onExit.complete()})}_applySnackBarClasses(){const t=this._elementRef.nativeElement,e=this.snackBarConfig.panelClass;e&&(Array.isArray(e)?e.forEach(e=>t.classList.add(e)):t.classList.add(e)),"center"===this.snackBarConfig.horizontalPosition&&t.classList.add("mat-snack-bar-center"),"top"===this.snackBarConfig.verticalPosition&&t.classList.add("mat-snack-bar-top")}_assertNotAttached(){this._portalOutlet.hasAttached()}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(o.C),o.Qb(o.l),o.Qb(o.h),o.Qb(v))},t.\u0275cmp=o.Kb({type:t,selectors:[["snack-bar-container"]],viewQuery:function(t,e){var i;1&t&&o.Kc(a.c,!0),2&t&&o.yc(i=o.ec())&&(e._portalOutlet=i.first)},hostAttrs:[1,"mat-snack-bar-container"],hostVars:2,hostBindings:function(t,e){1&t&&o.Mc("@state.done",(function(t){return e.onAnimationEnd(t)})),2&t&&(o.Eb("role",e._role),o.Nc("@state",e._animationState))},features:[o.Ab],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,e){1&t&&o.Oc(0,m,0,0,"ng-template",0)},directives:[a.c],styles:[".mat-snack-bar-container{border-radius:4px;box-sizing:border-box;display:block;margin:24px;max-width:33vw;min-width:344px;padding:14px 16px;min-height:48px;transform-origin:center}.cdk-high-contrast-active .mat-snack-bar-container{border:solid 1px}.mat-snack-bar-handset{width:100%}.mat-snack-bar-handset .mat-snack-bar-container{margin:8px;max-width:100%;min-width:0;width:100%}\n"],encapsulation:2,data:{animation:[C.snackBarState]}}),t})(),D=(()=>{class t{}return t.\u0275mod=o.Ob({type:t}),t.\u0275inj=o.Nb({factory:function(e){return new(e||t)},imports:[[n.f,a.h,s.c,c.c,r.k],r.k]}),t})();const w=new o.s("mat-snack-bar-default-options",{providedIn:"root",factory:function(){return new v}});let M=(()=>{class t{constructor(t,e,i,n,a,s){this._overlay=t,this._live=e,this._injector=i,this._breakpointObserver=n,this._parentSnackBar=a,this._defaultConfig=s,this._snackBarRefAtThisLevel=null,this.simpleSnackBarComponent=x,this.snackBarContainerComponent=O,this.handsetCssClass="mat-snack-bar-handset"}get _openedSnackBarRef(){const t=this._parentSnackBar;return t?t._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(t){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=t:this._snackBarRefAtThisLevel=t}openFromComponent(t,e){return this._attach(t,e)}openFromTemplate(t,e){return this._attach(t,e)}open(t,e="",i){const n=Object.assign(Object.assign({},this._defaultConfig),i);return n.data={message:t,action:e},n.announcementMessage===t&&(n.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,n)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(t,e){const i=o.t.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:v,useValue:e}]}),n=new a.d(this.snackBarContainerComponent,e.viewContainerRef,i),s=t.attach(n);return s.instance.snackBarConfig=e,s.instance}_attach(t,e){const i=Object.assign(Object.assign(Object.assign({},new v),this._defaultConfig),e),n=this._createOverlay(i),s=this._attachSnackBarContainer(n,i),r=new y(s,n);if(t instanceof o.P){const e=new a.i(t,null,{$implicit:i.data,snackBarRef:r});r.instance=s.attachTemplatePortal(e)}else{const e=this._createInjector(i,r),n=new a.d(t,void 0,e),o=s.attachComponentPortal(n);r.instance=o.instance}return this._breakpointObserver.observe(b.b.HandsetPortrait).pipe(Object(h.a)(n.detachments())).subscribe(t=>{const e=n.overlayElement.classList;t.matches?e.add(this.handsetCssClass):e.remove(this.handsetCssClass)}),this._animateSnackBar(r,i),this._openedSnackBarRef=r,this._openedSnackBarRef}_animateSnackBar(t,e){t.afterDismissed().subscribe(()=>{this._openedSnackBarRef==t&&(this._openedSnackBarRef=null),e.announcementMessage&&this._live.clear()}),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{t.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):t.containerInstance.enter(),e.duration&&e.duration>0&&t.afterOpened().subscribe(()=>t._dismissAfter(e.duration)),e.announcementMessage&&this._live.announce(e.announcementMessage,e.politeness)}_createOverlay(t){const e=new n.d;e.direction=t.direction;let i=this._overlay.position().global();const a="rtl"===t.direction,s="left"===t.horizontalPosition||"start"===t.horizontalPosition&&!a||"end"===t.horizontalPosition&&a,o=!s&&"center"!==t.horizontalPosition;return s?i.left("0"):o?i.right("0"):i.centerHorizontally(),"top"===t.verticalPosition?i.top("0"):i.bottom("0"),e.positionStrategy=i,this._overlay.create(e)}_createInjector(t,e){return o.t.create({parent:t&&t.viewContainerRef&&t.viewContainerRef.injector||this._injector,providers:[{provide:y,useValue:e},{provide:g,useValue:t.data}]})}}return t.\u0275fac=function(e){return new(e||t)(o.ac(n.c),o.ac(p.k),o.ac(o.t),o.ac(b.a),o.ac(t,12),o.ac(w))},t.\u0275prov=Object(o.Mb)({factory:function(){return new t(Object(o.ac)(n.c),Object(o.ac)(p.k),Object(o.ac)(o.p),Object(o.ac)(b.a),Object(o.ac)(t,12),Object(o.ac)(w))},token:t,providedIn:D}),t})()},eIep:function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var n=i("lJxs"),a=i("Cfvw"),s=i("zx2A");function o(t,e){return"function"==typeof e?i=>i.pipe(o((i,s)=>Object(a.a)(t(i,s)).pipe(Object(n.a)((t,n)=>e(i,t,s,n))))):e=>e.lift(new r(t))}class r{constructor(t){this.project=t}call(t,e){return e.subscribe(new c(t,this.project))}}class c extends s.b{constructor(t,e){super(t),this.project=e,this.index=0}_next(t){let e;const i=this.index++;try{e=this.project(t,i)}catch(n){return void this.destination.error(n)}this._innerSub(e)}_innerSub(t){const e=this.innerSubscription;e&&e.unsubscribe();const i=new s.a(this),n=this.destination;n.add(i),this.innerSubscription=Object(s.c)(t,i),this.innerSubscription!==i&&n.add(this.innerSubscription)}_complete(){const{innerSubscription:t}=this;t&&!t.closed||super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(t){this.destination.next(t)}}},eNwd:function(t,e,i){"use strict";i.d(e,"a",(function(){return r}));var n=i("3N8a");class a extends n.a{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,i=0){return null!==i&&i>0?super.requestAsyncId(t,e,i):(t.actions.push(this),t.scheduled||(t.scheduled=requestAnimationFrame(()=>t.flush(null))))}recycleAsyncId(t,e,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(t,e,i);0===t.actions.length&&(cancelAnimationFrame(e),t.scheduled=void 0)}}var s=i("IjjT");class o extends s.a{flush(t){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let i,n=-1,a=e.length;t=t||e.shift();do{if(i=t.execute(t.state,t.delay))break}while(++n<a&&(t=e.shift()));if(this.active=!1,i){for(;++n<a&&(t=e.shift());)t.unsubscribe();throw i}}}const r=new o(a)},eiH7:function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var n=i("fXoL"),a=i("sYmb"),s=i("4zkx");let o=(()=>{class t{constructor(t,e){this.translate=t,this.headerService=e,this.administrations=[{id:"admin_users",label:"lang.users",comment:"lang.adminUsersDesc",route:"/administration/users",unit:"organisation",style:"fa fa-user",angular:!0,hasParams:!0},{id:"admin_groups",label:"lang.groups",comment:"lang.adminGroupsDesc",route:"/administration/groups",unit:"organisation",style:"fa fa-users",angular:!0,hasParams:!1},{id:"manage_entities",label:"lang.entities",comment:"lang.adminEntitiesDesc",route:"/administration/entities",unit:"organisation",style:"fa fa-sitemap",angular:!0,hasParams:!1},{id:"admin_listmodels",label:"lang.workflowModels",comment:"lang.adminWorkflowModelsDesc",route:"/administration/diffusionModels",unit:"organisation",style:"fa fa-th-list",angular:!0,hasParams:!1},{id:"admin_architecture",label:"lang.documentTypes",comment:"lang.adminDocumentTypesDesc",route:"/administration/doctypes",unit:"classement",style:"fa fa-suitcase",angular:!0,hasParams:!1},{id:"admin_tag",label:"lang.tags",comment:"lang.adminTagsDesc",route:"/administration/tags",unit:"classement",style:"fa fa-tags",angular:!0,hasParams:!1},{id:"admin_baskets",label:"lang.baskets",comment:"lang.adminBasketsDesc",route:"/administration/baskets",unit:"production",style:"fa fa-inbox",angular:!0,hasParams:!1},{id:"admin_status",label:"lang.statuses",comment:"lang.statusesAdmin",route:"/administration/statuses",unit:"production",style:"fa fa-check-circle",angular:!0,hasParams:!1},{id:"admin_actions",label:"lang.actions",comment:"lang.actionsAdmin",route:"/administration/actions",unit:"production",style:"fa fa-exchange-alt",angular:!0,hasParams:!1},{id:"admin_contacts",label:"lang.contacts",comment:"lang.contactsAdmin",route:"/administration/contacts",unit:"production",style:"fa fa-address-book",angular:!0,hasParams:!1},{id:"admin_priorities",label:"lang.priorities",comment:"lang.priorities",route:"/administration/priorities",unit:"production",style:"fa fa-clock",angular:!0,hasParams:!1},{id:"admin_templates",label:"lang.templates",comment:"lang.templatesAdmin",route:"/administration/templates",unit:"production",style:"fa fa-file-alt",angular:!0,hasParams:!1},{id:"admin_indexing_models",label:"lang.indexingModels",comment:"lang.indexingModels",route:"/administration/indexingModels",unit:"production",style:"fab fa-wpforms",angular:!0,hasParams:!1},{id:"admin_custom_fields",label:"lang.customFieldsAdmin",comment:"lang.customFieldsAdmin",route:"/administration/customFields",unit:"production",style:"fa fa-code",angular:!0,hasParams:!1},{id:"admin_notif",label:"lang.notifications",comment:"lang.notificationsAdmin",route:"/administration/notifications",unit:"production",style:"fa fa-bell",angular:!0,hasParams:!1},{id:"update_status_mail",label:"lang.updateStatus",comment:"lang.updateStatus",route:"/administration/update-status",unit:"supervision",style:"fa fa-envelope-square",angular:!0,hasParams:!1},{id:"admin_docservers",label:"lang.docservers",comment:"lang.docserversAdmin",route:"/administration/docservers",unit:"supervision",style:"fa fa-hdd",angular:!0,hasParams:!1},{id:"admin_parameters",label:"lang.parameters",comment:"lang.parameters",route:"/administration/parameters",unit:"supervision",style:"fa fa-wrench",angular:!0,hasParams:!1},{id:"admin_password_rules",label:"lang.securities",comment:"lang.securities",route:"/administration/securities",unit:"supervision",style:"fa fa-lock",angular:!0,hasParams:!1},{id:"admin_email_server",label:"lang.emailServerParam",comment:"lang.emailServerParamDesc",route:"/administration/sendmail",unit:"supervision",style:"fa fa-mail-bulk",angular:!0,hasParams:!1},{id:"admin_shippings",label:"lang.mailevaAdmin",comment:"lang.mailevaAdminDesc",route:"/administration/shippings",unit:"supervision",style:"fa fa-shipping-fast",angular:!0,hasParams:!1},{id:"view_history",label:"lang.history",comment:"lang.viewHistoryDesc",route:"/administration/history",unit:"supervision",style:"fa fa-history",angular:!0,hasParams:!1},{id:"view_history_batch",label:"lang.historyBatch",comment:"lang.historyBatchAdmin",route:"/administration/history-batch",unit:"supervision",style:"fa fa-history",angular:!0,hasParams:!1},{id:"admin_update_control",label:"lang.updateControl",comment:"lang.updateControlDesc",route:"/administration/versions-update",unit:"supervision",style:"fa fa-sync",angular:!0,hasParams:!1},{id:"admin_alfresco",label:"lang.alfresco",comment:"lang.adminAlfrescoDesc",route:"/administration/alfresco",unit:"supervision",style:"alfresco",angular:!0,hasParams:!1},{id:"admin_registered_mail",label:"lang.registeredMails",comment:"lang.adminRegisteredMailDesc",route:"/administration/registeredMails",unit:"supervision",style:"fas fa-dolly-flatbed",angular:!0,hasParams:!1},{id:"admin_search",label:"lang.search",comment:"lang.searchAdministration",route:"/administration/search",unit:"supervision",style:"fas fa-search",angular:!0,hasParams:!1},{id:"admin_connections",label:"lang.connections",comment:"lang.connectionsDesc",route:"/administration/connections/sso",unit:"supervision",style:"fas fa-plug",angular:!0,hasParams:!1}],this.privileges=[{id:"view_doc_history",label:"lang.viewDocHistory",comment:"lang.viewHistoryDesc",unit:"history"},{id:"view_full_history",label:"lang.viewFullHistory",comment:"lang.viewFullHistoryDesc",unit:"history"},{id:"edit_resource",label:"lang.editResource",comment:"lang.editResourceDesc",unit:"application"},{id:"add_links",label:"lang.addLinks",comment:"lang.addLinks",unit:"application"},{id:"manage_tags_application",label:"lang.manageTagsInApplication",comment:"lang.manageTagsInApplicationDesc",unit:"application"},{id:"create_contacts",label:"lang.manageCreateContacts",comment:"lang.manageCreateContactsDesc",unit:"application"},{id:"update_contacts",label:"lang.manageUpdateContacts",comment:"lang.manageUpdateContactsDesc",unit:"application"},{id:"update_diffusion_indexing",label:"lang.allRoles",comment:"lang.updateDiffusionWhileIndexing",unit:"diffusionList"},{id:"update_diffusion_except_recipient_indexing",label:"lang.rolesExceptAssignee",comment:"lang.updateDiffusionExceptRecipientWhileIndexing",unit:"diffusionList"},{id:"update_diffusion_process",label:"lang.allRoles",comment:"lang.updateDiffusionWhileProcess",unit:"diffusionList"},{id:"update_diffusion_except_recipient_process",label:"lang.rolesExceptAssignee",comment:"lang.updateDiffusionExceptRecipientWhileProcess",unit:"diffusionList"},{id:"update_diffusion_details",label:"lang.allRoles",comment:"lang.updateDiffusionWhileDetails",unit:"diffusionList"},{id:"update_diffusion_except_recipient_details",label:"lang.rolesExceptAssignee",comment:"lang.updateDiffusionExceptRecipientWhileDetails",unit:"diffusionList"},{id:"sendmail",label:"lang.sendmail",comment:"lang.sendmail",unit:"sendmail"},{id:"use_mail_services",label:"lang.useMailServices",comment:"lang.useMailServices",unit:"sendmail"},{id:"view_documents_with_notes",label:"lang.viewDocumentsWithNotes",comment:"lang.viewDocumentsWithNotesDesc",unit:"application"},{id:"view_technical_infos",label:"lang.showTechnicalInformations",comment:"lang.showTechnicalInformations",unit:"application"},{id:"config_avis_workflow",label:"lang.configAvisWorkflow",comment:"lang.configAvisWorkflowDesc",unit:"avis"},{id:"config_avis_workflow_in_detail",label:"lang.configAvisWorkflowInDetail",comment:"lang.configAvisWorkflowInDetailDesc",unit:"avis"},{id:"avis_documents",label:"lang.avisAnswer",comment:"lang.avisAnswerDesc",unit:"avis"},{id:"config_visa_workflow",label:"lang.configVisaWorkflow",comment:"lang.configVisaWorkflowDesc",unit:"visaWorkflow"},{id:"config_visa_workflow_in_detail",label:"lang.configVisaWorkflowInDetail",comment:"lang.configVisaWorkflowInDetailDesc",unit:"visaWorkflow"},{id:"visa_documents",label:"lang.visaAnswers",comment:"lang.visaAnswersDesc",unit:"visaWorkflow"},{id:"sign_document",label:"lang.signDocs",comment:"lang.signDocs",unit:"visaWorkflow"},{id:"modify_visa_in_signatureBook",label:"lang.modifyVisaInSignatureBook",comment:"lang.modifyVisaInSignatureBookDesc",unit:"visaWorkflow"},{id:"print_folder_doc",label:"lang.printFolderDoc",comment:"lang.printFolderDoc",unit:"application"},{id:"manage_attachments",label:"lang.manageAttachments",comment:"lang.manageAttachments",unit:"application"},{id:"view_personal_data",label:"lang.viewPersonalData",comment:"lang.viewPersonalData",unit:"confidentialityAndSecurity"},{id:"manage_personal_data",label:"lang.managePersonalData",comment:"lang.managePersonalData",unit:"confidentialityAndSecurity"},{id:"include_folders_and_followed_resources_perimeter",label:"lang.includeFolderPerimeter",comment:"lang.includeFolderPerimeter",unit:"application"},{id:"set_binding_document",label:"lang.setBindingDocument",comment:"lang.setBindingDocument",unit:"lifeCycle"},{id:"freeze_retention_rule",label:"lang.freezeRetentionRule",comment:"lang.freezeRetentionRule",unit:"lifeCycle"}],this.menus=[{id:"admin",label:"lang.administration",comment:"lang.administration",route:"/administration",style:"fa fa-cogs",unit:"application",angular:!0,shortcut:!0},{id:"adv_search_mlb",label:"lang.search",comment:"lang.search",route:"/search",style:"fa fa-search",unit:"application",angular:!0,shortcut:!0},{id:"entities_print_sep_mlb",label:"lang.entitiesSeparator",comment:"lang.entitiesSeparator",route:"/separators/print",style:"fa fa-print",unit:"entities",angular:!0,shortcut:!1},{id:"manage_numeric_package",label:"lang.manageNumericPackage",comment:"lang.manageNumericPackage",route:"/saveNumericPackage",style:"fa fa-file-archive",unit:"sendmail",angular:!0,shortcut:!1},{id:"registered_mail_receive_ar",label:"lang.arReception",comment:"lang.arReception",route:"/registeredMail/acknowledgement",style:"fa fa-barcode",unit:"registeredMails",angular:!0,shortcut:!1},{id:"registered_mail_mass_import",label:"lang.importRegisteredMails",comment:"lang.importRegisteredMails",route:"RegisteredMailImportComponent__modal",style:"fas fa-dolly-flatbed",unit:"registeredMails",angular:!0,shortcut:!1},{id:"create_custom",label:"lang.installNewCustom",comment:"lang.installNewCustom",route:"/install",style:"far fa-window-restore",unit:"application",angular:!0,shortcut:!1}],this.shortcuts=[{id:"followed",label:"lang.followedMail",comment:"lang.followedMail",route:"/followed",style:"fas fa-star",unit:"application",angular:!0,shortcut:!0}]}getAllPrivileges(t,e="standard"){let i=[];return i=i.concat(this.privileges.map(t=>t.id)),i=i.concat(this.administrations.map(t=>t.id)),i=i.concat(this.menus.map(t=>t.id)),i=i.filter(i=>-1===this.getExcludePrivilege(t,e).indexOf(i)),i}getPrivileges(t=null){return null!==t?this.privileges.filter(e=>t.indexOf(e.id)>-1):this.privileges}getUnitsPrivileges(){return this.privileges.map(t=>t.unit).filter((t,e,i)=>i.indexOf(t)===e)}getPrivilegesByUnit(t){return this.privileges.filter(e=>e.unit===t)}getMenus(){return this.menus}getCurrentUserMenus(){let t=this.menus.filter(t=>this.headerService.user.privileges.indexOf(t.id)>-1);if(this.headerService.user.groups.filter(t=>!0===t.can_index).length>0){const e=[];this.headerService.user.groups.filter(t=>!0===t.can_index).forEach(t=>{e.push({id:t.id,label:t.group_desc})}),t.push({id:"indexing",label:"lang.recordMail",comment:"lang.recordMail",route:"/indexing/"+e[0].id,style:"fa fa-file-medical",unit:"application",angular:!0,shortcut:!0,groups:e})}return t}getMenusByUnit(t){return this.menus.filter(e=>e.unit===t)}getUnitsMenus(){return this.menus.map(t=>t.unit).filter((t,e,i)=>i.indexOf(t)===e)}resfreshUserShortcuts(){if(this.shortcuts=[{id:"followed",label:"lang.followedMail",comment:"lang.followedMail",route:"/followed",style:"fas fa-star",unit:"application",angular:!0,shortcut:!0}],this.shortcuts=this.shortcuts.concat(this.menus.filter(t=>!0===t.shortcut).filter(t=>this.headerService.user.privileges.indexOf(t.id)>-1)),this.headerService.user.groups.filter(t=>!0===t.can_index).length>0){const t=[];this.headerService.user.groups.filter(t=>!0===t.can_index).forEach(e=>{t.push({id:e.id,label:e.group_desc})}),this.shortcuts.push({id:"indexing",label:"lang.recordMail",comment:"lang.recordMail",route:"/indexing",style:"fa fa-file-medical",unit:"application",angular:!0,shortcut:!0,groups:t})}}getAdministrations(){return this.administrations}getCurrentUserAdministrationsByUnit(t){return this.hasCurrentUserPrivilege("view_history")&&this.hasCurrentUserPrivilege("view_history_batch")?this.administrations.filter(e=>e.unit===t).filter(t=>this.headerService.user.privileges.indexOf(t.id)>-1).filter(t=>"view_history_batch"!==t.id):this.administrations.filter(e=>e.unit===t).filter(t=>this.headerService.user.privileges.indexOf(t.id)>-1)}hasCurrentUserPrivilege(t){return this.headerService.user.privileges.indexOf(t)>-1}getExcludePrivilege(t,e){let i=[];return t||(i=["create_custom","admin_update_control"]),"standard"!==e&&i.push("admin_password_rules"),i}}return t.\u0275fac=function(e){return new(e||t)(n.ac(a.e),n.ac(s.a))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})()},f0Cb:function(t,e,i){"use strict";i.d(e,"a",(function(){return o})),i.d(e,"b",(function(){return r}));var n=i("8LU1"),a=i("FKr1"),s=i("fXoL");let o=(()=>{class t{constructor(){this._vertical=!1,this._inset=!1}get vertical(){return this._vertical}set vertical(t){this._vertical=Object(n.c)(t)}get inset(){return this._inset}set inset(t){this._inset=Object(n.c)(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=s.Kb({type:t,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(t,e){2&t&&(s.Eb("aria-orientation",e.vertical?"vertical":"horizontal"),s.Ib("mat-divider-vertical",e.vertical)("mat-divider-horizontal",!e.vertical)("mat-divider-inset",e.inset))},inputs:{vertical:"vertical",inset:"inset"},decls:0,vars:0,template:function(t,e){},styles:[".mat-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mat-divider.mat-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mat-divider.mat-divider-inset{margin-left:80px}[dir=rtl] .mat-divider.mat-divider-inset{margin-left:auto;margin-right:80px}\n"],encapsulation:2,changeDetection:0}),t})(),r=(()=>{class t{}return t.\u0275mod=s.Ob({type:t}),t.\u0275inj=s.Nb({factory:function(e){return new(e||t)},imports:[[a.k],a.k]}),t})()},fXoL:function(t,e,i){"use strict";i.d(e,"a",(function(){return Is})),i.d(e,"b",(function(){return sl})),i.d(e,"c",(function(){return tl})),i.d(e,"d",(function(){return Jc})),i.d(e,"e",(function(){return Zc})),i.d(e,"f",(function(){return Yl})),i.d(e,"g",(function(){return Ll})),i.d(e,"h",(function(){return hs})),i.d(e,"i",(function(){return ml})),i.d(e,"j",(function(){return Sr})),i.d(e,"k",(function(){return cl})),i.d(e,"l",(function(){return Ir})),i.d(e,"m",(function(){return Gl})),i.d(e,"n",(function(){return Ri})),i.d(e,"o",(function(){return Mc})),i.d(e,"p",(function(){return X})),i.d(e,"q",(function(){return u})),i.d(e,"r",(function(){return m})),i.d(e,"s",(function(){return G})),i.d(e,"t",(function(){return Ss})),i.d(e,"u",(function(){return Kc})),i.d(e,"v",(function(){return Xr})),i.d(e,"w",(function(){return qr})),i.d(e,"x",(function(){return rl})),i.d(e,"y",(function(){return lt})),i.d(e,"z",(function(){return Nl})),i.d(e,"A",(function(){return ct})),i.d(e,"B",(function(){return Al})),i.d(e,"C",(function(){return _l})),i.d(e,"D",(function(){return p})),i.d(e,"E",(function(){return Yc})),i.d(e,"F",(function(){return al})),i.d(e,"G",(function(){return nl})),i.d(e,"H",(function(){return Sc})),i.d(e,"I",(function(){return jr})),i.d(e,"J",(function(){return Vr})),i.d(e,"K",(function(){return Rr})),i.d(e,"L",(function(){return Wr})),i.d(e,"M",(function(){return xn})),i.d(e,"N",(function(){return f})),i.d(e,"O",(function(){return Ul})),i.d(e,"P",(function(){return Zr})),i.d(e,"Q",(function(){return kl})),i.d(e,"R",(function(){return ps})),i.d(e,"S",(function(){return Tr})),i.d(e,"T",(function(){return ec})),i.d(e,"U",(function(){return vt})),i.d(e,"V",(function(){return Wl})),i.d(e,"W",(function(){return Ki})),i.d(e,"X",(function(){return R})),i.d(e,"Y",(function(){return at})),i.d(e,"Z",(function(){return qi})),i.d(e,"ab",(function(){return ql})),i.d(e,"bb",(function(){return Pl})),i.d(e,"cb",(function(){return ol})),i.d(e,"db",(function(){return bs})),i.d(e,"eb",(function(){return fr})),i.d(e,"fb",(function(){return _n})),i.d(e,"gb",(function(){return en})),i.d(e,"hb",(function(){return Qi})),i.d(e,"ib",(function(){return zi})),i.d(e,"jb",(function(){return Hi})),i.d(e,"kb",(function(){return Ui})),i.d(e,"lb",(function(){return Bi})),i.d(e,"mb",(function(){return $i})),i.d(e,"nb",(function(){return hr})),i.d(e,"ob",(function(){return Xl})),i.d(e,"pb",(function(){return ur})),i.d(e,"qb",(function(){return pr})),i.d(e,"rb",(function(){return Ni})),i.d(e,"sb",(function(){return L})),i.d(e,"tb",(function(){return Qs})),i.d(e,"ub",(function(){return bo})),i.d(e,"vb",(function(){return po})),i.d(e,"wb",(function(){return dr})),i.d(e,"xb",(function(){return qt})),i.d(e,"yb",(function(){return I})),i.d(e,"zb",(function(){return Li})),i.d(e,"Ab",(function(){return Rs})),i.d(e,"Bb",(function(){return Bt})),i.d(e,"Cb",(function(){return wr})),i.d(e,"Db",(function(){return Bn})),i.d(e,"Eb",(function(){return Gs})),i.d(e,"Fb",(function(){return Fo})),i.d(e,"Gb",(function(){return nr})),i.d(e,"Hb",(function(){return ar})),i.d(e,"Ib",(function(){return Eo})),i.d(e,"Jb",(function(){return Nc})),i.d(e,"Kb",(function(){return Ct})),i.d(e,"Lb",(function(){return Pt})),i.d(e,"Mb",(function(){return _})),i.d(e,"Nb",(function(){return y})),i.d(e,"Ob",(function(){return kt})),i.d(e,"Pb",(function(){return Vt})),i.d(e,"Qb",(function(){return eo})),i.d(e,"Rb",(function(){return ro})),i.d(e,"Sb",(function(){return ho})),i.d(e,"Tb",(function(){return lo})),i.d(e,"Ub",(function(){return co})),i.d(e,"Vb",(function(){return oo})),i.d(e,"Wb",(function(){return so})),i.d(e,"Xb",(function(){return uo})),i.d(e,"Yb",(function(){return Si})),i.d(e,"Zb",(function(){return sr})),i.d(e,"ac",(function(){return nt})),i.d(e,"bc",(function(){return io})),i.d(e,"cc",(function(){return qc})),i.d(e,"dc",(function(){return fo})),i.d(e,"ec",(function(){return Uc})),i.d(e,"fc",(function(){return ze})),i.d(e,"gc",(function(){return Ne})),i.d(e,"hc",(function(){return yo})),i.d(e,"ic",(function(){return yc})),i.d(e,"jc",(function(){return xc})),i.d(e,"kc",(function(){return Cc})),i.d(e,"lc",(function(){return Oc})),i.d(e,"mc",(function(){return Oo})),i.d(e,"nc",(function(){return Co})),i.d(e,"oc",(function(){return no})),i.d(e,"pc",(function(){return Do})),i.d(e,"qc",(function(){return wo})),i.d(e,"rc",(function(){return Mo})),i.d(e,"sc",(function(){return ko})),i.d(e,"tc",(function(){return So})),i.d(e,"uc",(function(){return uc})),i.d(e,"vc",(function(){return pc})),i.d(e,"wc",(function(){return bc})),i.d(e,"xc",(function(){return fc})),i.d(e,"yc",(function(){return Ec})),i.d(e,"zc",(function(){return to})),i.d(e,"Ac",(function(){return li})),i.d(e,"Bc",(function(){return ci})),i.d(e,"Cc",(function(){return ri})),i.d(e,"Dc",(function(){return fe})),i.d(e,"Ec",(function(){return Cn})),i.d(e,"Fc",(function(){return Dn})),i.d(e,"Gc",(function(){return On})),i.d(e,"Hc",(function(){return Ot})),i.d(e,"Ic",(function(){return St})),i.d(e,"Jc",(function(){return zc})),i.d(e,"Kc",(function(){return Fc})),i.d(e,"Lc",(function(){return To})),i.d(e,"Mc",(function(){return mo})),i.d(e,"Nc",(function(){return or})),i.d(e,"Oc",(function(){return Zs})),i.d(e,"Pc",(function(){return Xc})),i.d(e,"Qc",(function(){return Ko})),i.d(e,"Rc",(function(){return Yo})),i.d(e,"Sc",(function(){return Jo})),i.d(e,"Tc",(function(){return Zo})),i.d(e,"Uc",(function(){return tr})),i.d(e,"Vc",(function(){return er})),i.d(e,"Wc",(function(){return ir})),i.d(e,"Xc",(function(){return Lc}));var n=i("XNiG"),a=i("quSY"),s=i("HDdC"),o=i("VRyK"),r=i("w1tV");function c(t){return{toString:t}.toString()}function l(t){return function(...e){if(t){const i=t(...e);for(const t in i)this[t]=i[t]}}}function d(t,e,i){return c(()=>{const n=l(e);function a(...t){if(this instanceof a)return n.apply(this,t),this;const e=new a(...t);return i.annotation=e,i;function i(t,i,n){const a=t.hasOwnProperty("__parameters__")?t.__parameters__:Object.defineProperty(t,"__parameters__",{value:[]}).__parameters__;for(;a.length<=n;)a.push(null);return(a[n]=a[n]||[]).push(e),t}}return i&&(a.prototype=Object.create(i.prototype)),a.prototype.ngMetadataName=t,a.annotationCls=a,a})}function h(t,e,i,n){return c(()=>{const a=l(e);function s(...t){if(this instanceof s)return a.apply(this,t),this;const e=new s(...t);return function(i,a){const s=i.constructor,o=s.hasOwnProperty("__prop__metadata__")?s.__prop__metadata__:Object.defineProperty(s,"__prop__metadata__",{value:{}}).__prop__metadata__;o[a]=o.hasOwnProperty(a)&&o[a]||[],o[a].unshift(e),n&&n(i,a,...t)}}return i&&(s.prototype=Object.create(i.prototype)),s.prototype.ngMetadataName=t,s.annotationCls=s,s})}const u=d("Inject",t=>({token:t})),p=d("Optional"),b=d("Self"),f=d("SkipSelf");var m=function(t){return t[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional",t}({});function g(t){for(let e in t)if(t[e]===g)return e;throw Error("Could not find renamed property on target object.")}function v(t,e){for(const i in e)e.hasOwnProperty(i)&&!t.hasOwnProperty(i)&&(t[i]=e[i])}function _(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function y(t){return{factory:t.factory,providers:t.providers||[],imports:t.imports||[]}}function x(t){return C(t,t[D])||C(t,t[k])}function C(t,e){return e&&e.token===t?e:null}function O(t){return t&&(t.hasOwnProperty(w)||t.hasOwnProperty(S))?t[w]:null}const D=g({\u0275prov:g}),w=g({\u0275inj:g}),M=g({\u0275provFallback:g}),k=g({ngInjectableDef:g}),S=g({ngInjectorDef:g});function I(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(I).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return""+t.overriddenName;if(t.name)return""+t.name;const e=t.toString();if(null==e)return""+e;const i=e.indexOf("\n");return-1===i?e:e.substring(0,i)}function P(t,e){return null==t||""===t?null===e?"":e:null==e||""===e?t:t+" "+e}const V=g({__forward_ref__:g});function R(t){return t.__forward_ref__=R,t.toString=function(){return I(this())},t}function j(t){return A(t)?t():t}function A(t){return"function"==typeof t&&t.hasOwnProperty(V)&&t.__forward_ref__===R}const W="undefined"!=typeof globalThis&&globalThis,T="undefined"!=typeof window&&window,E="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,F="undefined"!=typeof global&&global,L=W||F||T||E,Q=g({\u0275cmp:g}),N=g({\u0275dir:g}),z=g({\u0275pipe:g}),B=g({\u0275mod:g}),U=g({\u0275loc:g}),$=g({\u0275fac:g}),H=g({__NG_ELEMENT_ID__:g});class G{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=_({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}toString(){return"InjectionToken "+this._desc}}const X=new G("INJECTOR",-1),q={},K=/\n/gm,Y=g({provide:String,useValue:g});let J,Z=void 0;function tt(t){const e=Z;return Z=t,e}function et(t){const e=J;return J=t,e}function it(t,e=m.Default){if(void 0===Z)throw new Error("inject() must be called from an injection context");return null===Z?st(t,void 0,e):Z.get(t,e&m.Optional?null:void 0,e)}function nt(t,e=m.Default){return(J||it)(j(t),e)}const at=nt;function st(t,e,i){const n=x(t);if(n&&"root"==n.providedIn)return void 0===n.value?n.value=n.factory():n.value;if(i&m.Optional)return null;if(void 0!==e)return e;throw new Error(`Injector: NOT_FOUND [${I(t)}]`)}function ot(t){const e=[];for(let i=0;i<t.length;i++){const n=j(t[i]);if(Array.isArray(n)){if(0===n.length)throw new Error("Arguments array must have arguments.");let t=void 0,i=m.Default;for(let e=0;e<n.length;e++){const a=n[e];a instanceof p||"Optional"===a.ngMetadataName||a===p?i|=m.Optional:a instanceof f||"SkipSelf"===a.ngMetadataName||a===f?i|=m.SkipSelf:a instanceof b||"Self"===a.ngMetadataName||a===b?i|=m.Self:t=a instanceof u||a===u?a.token:a}e.push(nt(t,i))}else e.push(nt(n))}return e}class rt{get(t,e=q){if(e===q){const e=new Error(`NullInjectorError: No provider for ${I(t)}!`);throw e.name="NullInjectorError",e}return e}}class ct{}class lt{}function dt(t,e){t.forEach(t=>Array.isArray(t)?dt(t,e):e(t))}function ht(t,e,i){e>=t.length?t.push(i):t.splice(e,0,i)}function ut(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function pt(t,e){const i=[];for(let n=0;n<t;n++)i.push(e);return i}function bt(t,e,i){let n=mt(t,e);return n>=0?t[1|n]=i:(n=~n,function(t,e,i,n){let a=t.length;if(a==e)t.push(i,n);else if(1===a)t.push(n,t[0]),t[0]=i;else{for(a--,t.push(t[a-1],t[a]);a>e;)t[a]=t[a-2],a--;t[e]=i,t[e+1]=n}}(t,n,e,i)),n}function ft(t,e){const i=mt(t,e);if(i>=0)return t[1|i]}function mt(t,e){return function(t,e,i){let n=0,a=t.length>>1;for(;a!==n;){const i=n+(a-n>>1),s=t[i<<1];if(e===s)return i<<1;s>e?a=i:n=i+1}return~(a<<1)}(t,e)}var gt=function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t}({}),vt=function(t){return t[t.Emulated=0]="Emulated",t[t.Native=1]="Native",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t}({});const _t={},yt=[];let xt=0;function Ct(t){return c(()=>{const e={},i={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===gt.OnPush,directiveDefs:null,pipeDefs:null,selectors:t.selectors||yt,viewQuery:t.viewQuery||null,features:t.features||null,data:t.data||{},encapsulation:t.encapsulation||vt.Emulated,id:"c",styles:t.styles||yt,_:null,setInput:null,schemas:t.schemas||null,tView:null},n=t.directives,a=t.features,s=t.pipes;return i.id+=xt++,i.inputs=It(t.inputs,e),i.outputs=It(t.outputs),a&&a.forEach(t=>t(i)),i.directiveDefs=n?()=>("function"==typeof n?n():n).map(Dt):null,i.pipeDefs=s?()=>("function"==typeof s?s():s).map(wt):null,i})}function Ot(t,e,i){const n=t.\u0275cmp;n.directiveDefs=()=>e.map(Dt),n.pipeDefs=()=>i.map(wt)}function Dt(t){return Rt(t)||function(t){return t[N]||null}(t)}function wt(t){return function(t){return t[z]||null}(t)}const Mt={};function kt(t){const e={type:t.type,bootstrap:t.bootstrap||yt,declarations:t.declarations||yt,imports:t.imports||yt,exports:t.exports||yt,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null};return null!=t.id&&c(()=>{Mt[t.id]=t.type}),e}function St(t,e){return c(()=>{const i=At(t,!0);i.declarations=e.declarations||yt,i.imports=e.imports||yt,i.exports=e.exports||yt})}function It(t,e){if(null==t)return _t;const i={};for(const n in t)if(t.hasOwnProperty(n)){let a=t[n],s=a;Array.isArray(a)&&(s=a[1],a=a[0]),i[a]=n,e&&(e[a]=s)}return i}const Pt=Ct;function Vt(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,onDestroy:t.type.prototype.ngOnDestroy||null}}function Rt(t){return t[Q]||null}function jt(t,e){return t.hasOwnProperty($)?t[$]:null}function At(t,e){const i=t[B]||null;if(!i&&!0===e)throw new Error(`Type ${I(t)} does not have '\u0275mod' property.`);return i}function Wt(t){return Array.isArray(t)&&"object"==typeof t[1]}function Tt(t){return Array.isArray(t)&&!0===t[1]}function Et(t){return 0!=(8&t.flags)}function Ft(t){return 2==(2&t.flags)}function Lt(t){return 1==(1&t.flags)}function Qt(t){return null!==t.template}function Nt(t){return 0!=(512&t[2])}class zt{constructor(t,e,i){this.previousValue=t,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}}function Bt(){return Ut}function Ut(t){return t.type.prototype.ngOnChanges&&(t.setInput=Ht),$t}function $t(){const t=Gt(this),e=null==t?void 0:t.current;if(e){const i=t.previous;if(i===_t)t.previous=e;else for(let t in e)i[t]=e[t];t.current=null,this.ngOnChanges(e)}}function Ht(t,e,i,n){const a=Gt(t)||function(t,e){return t.__ngSimpleChanges__=e}(t,{previous:_t,current:null}),s=a.current||(a.current={}),o=a.previous,r=this.declaredInputs[i],c=o[r];s[r]=new zt(c&&c.currentValue,e,o===_t),t[n]=e}function Gt(t){return t.__ngSimpleChanges__||null}Bt.ngInherit=!0;let Xt=void 0;function qt(t){Xt=t}function Kt(){return void 0!==Xt?Xt:"undefined"!=typeof document?document:void 0}function Yt(t){return!!t.listen}const Jt={createRenderer:(t,e)=>Kt()};function Zt(t){for(;Array.isArray(t);)t=t[0];return t}function te(t,e){return Zt(e[t+20])}function ee(t,e){return Zt(e[t.index])}function ie(t,e){return t.data[e+20]}function ne(t,e){return t[e+20]}function ae(t,e){const i=e[t];return Wt(i)?i:i[0]}function se(t){const e=function(t){return t.__ngContext__||null}(t);return e?Array.isArray(e)?e:e.lView:null}function oe(t){return 4==(4&t[2])}function re(t){return 128==(128&t[2])}function ce(t,e){return null===t||null==e?null:t[e]}function le(t){t[18]=0}function de(t,e){t[5]+=e;let i=t,n=t[3];for(;null!==n&&(1===e&&1===i[5]||-1===e&&0===i[5]);)n[5]+=e,i=n,n=n[3]}const he={lFrame:Ae(null),bindingsEnabled:!0,isInCheckNoChangesMode:!1};function ue(){return he.bindingsEnabled}function pe(){return he.lFrame.lView}function be(){return he.lFrame.tView}function fe(t){he.lFrame.contextLView=t}function me(){return he.lFrame.currentTNode}function ge(t,e){he.lFrame.currentTNode=t,he.lFrame.isParent=e}function ve(){return he.lFrame.isParent}function _e(){he.lFrame.isParent=!1}function ye(){return he.isInCheckNoChangesMode}function xe(t){he.isInCheckNoChangesMode=t}function Ce(){const t=he.lFrame;let e=t.bindingRootIndex;return-1===e&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function Oe(){return he.lFrame.bindingIndex}function De(){return he.lFrame.bindingIndex++}function we(t){const e=he.lFrame,i=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,i}function Me(t,e){const i=he.lFrame;i.bindingIndex=i.bindingRootIndex=t,ke(e)}function ke(t){he.lFrame.currentDirectiveIndex=t}function Se(t){const e=he.lFrame.currentDirectiveIndex;return-1===e?null:t[e]}function Ie(){return he.lFrame.currentQueryIndex}function Pe(t){he.lFrame.currentQueryIndex=t}function Ve(t,e){const i=je();he.lFrame=i,i.currentTNode=e,i.lView=t}function Re(t){const e=je(),i=t[1];he.lFrame=e,e.currentTNode=i.firstChild,e.lView=t,e.tView=i,e.contextLView=t,e.bindingIndex=i.bindingStartIndex}function je(){const t=he.lFrame,e=null===t?null:t.child;return null===e?Ae(t):e}function Ae(t){const e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:0,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null};return null!==t&&(t.child=e),e}function We(){const t=he.lFrame;return he.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const Te=We;function Ee(){const t=We();t.isParent=!0,t.tView=null,t.selectedIndex=0,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function Fe(){return he.lFrame.selectedIndex}function Le(t){he.lFrame.selectedIndex=t}function Qe(){const t=he.lFrame;return ie(t.tView,t.selectedIndex)}function Ne(){he.lFrame.currentNamespace="http://www.w3.org/2000/svg"}function ze(){he.lFrame.currentNamespace=null}function Be(t,e){for(let i=e.directiveStart,n=e.directiveEnd;i<n;i++){const e=t.data[i].type.prototype,{ngAfterContentInit:n,ngAfterContentChecked:a,ngAfterViewInit:s,ngAfterViewChecked:o,ngOnDestroy:r}=e;n&&(t.contentHooks||(t.contentHooks=[])).push(-i,n),a&&((t.contentHooks||(t.contentHooks=[])).push(i,a),(t.contentCheckHooks||(t.contentCheckHooks=[])).push(i,a)),s&&(t.viewHooks||(t.viewHooks=[])).push(-i,s),o&&((t.viewHooks||(t.viewHooks=[])).push(i,o),(t.viewCheckHooks||(t.viewCheckHooks=[])).push(i,o)),null!=r&&(t.destroyHooks||(t.destroyHooks=[])).push(i,r)}}function Ue(t,e,i){Ge(t,e,3,i)}function $e(t,e,i,n){(3&t[2])===i&&Ge(t,e,i,n)}function He(t,e){let i=t[2];(3&i)===e&&(i&=2047,i+=1,t[2]=i)}function Ge(t,e,i,n){const a=null!=n?n:-1;let s=0;for(let o=void 0!==n?65535&t[18]:0;o<e.length;o++)if("number"==typeof e[o+1]){if(s=e[o],null!=n&&s>=n)break}else e[o]<0&&(t[18]+=65536),(s<a||-1==a)&&(Xe(t,i,e,o),t[18]=(4294901760&t[18])+o+2),o++}function Xe(t,e,i,n){const a=i[n]<0,s=i[n+1],o=t[a?-i[n]:i[n]];a?t[2]>>11<t[18]>>16&&(3&t[2])===e&&(t[2]+=2048,s.call(o)):s.call(o)}class qe{constructor(t,e,i){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=i}}function Ke(t,e,i){const n=Yt(t);let a=0;for(;a<i.length;){const s=i[a];if("number"==typeof s){if(0!==s)break;a++;const o=i[a++],r=i[a++],c=i[a++];n?t.setAttribute(e,r,c,o):e.setAttributeNS(o,r,c)}else{const o=s,r=i[++a];Je(o)?n&&t.setProperty(e,o,r):n?t.setAttribute(e,o,r):e.setAttribute(o,r),a++}}return a}function Ye(t){return 3===t||4===t||6===t}function Je(t){return 64===t.charCodeAt(0)}function Ze(t,e){if(null===e||0===e.length);else if(null===t||0===t.length)t=e.slice();else{let i=-1;for(let n=0;n<e.length;n++){const a=e[n];"number"==typeof a?i=a:0===i||ti(t,i,a,null,-1===i||2===i?e[++n]:null)}}return t}function ti(t,e,i,n,a){let s=0,o=t.length;if(-1===e)o=-1;else for(;s<t.length;){const i=t[s++];if("number"==typeof i){if(i===e){o=-1;break}if(i>e){o=s-1;break}}}for(;s<t.length;){const e=t[s];if("number"==typeof e)break;if(e===i){if(null===n)return void(null!==a&&(t[s+1]=a));if(n===t[s+1])return void(t[s+2]=a)}s++,null!==n&&s++,null!==a&&s++}-1!==o&&(t.splice(o,0,e),s=o+1),t.splice(s++,0,i),null!==n&&t.splice(s++,0,n),null!==a&&t.splice(s++,0,a)}function ei(t){return-1!==t}function ii(t){return 32767&t}function ni(t,e){let i=t>>16,n=e;for(;i>0;)n=n[15],i--;return n}function ai(t){return"string"==typeof t?t:null==t?"":""+t}function si(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():ai(t)}const oi=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(L))();function ri(t){return{name:"window",target:t.ownerDocument.defaultView}}function ci(t){return{name:"document",target:t.ownerDocument}}function li(t){return{name:"body",target:t.ownerDocument.body}}function di(t){return t instanceof Function?t():t}let hi=!0;function ui(t){const e=hi;return hi=t,e}let pi=0;function bi(t,e){const i=mi(t,e);if(-1!==i)return i;const n=e[1];n.firstCreatePass&&(t.injectorIndex=e.length,fi(n.data,t),fi(e,null),fi(n.blueprint,null));const a=gi(t,e),s=t.injectorIndex;if(ei(a)){const t=ii(a),i=ni(a,e),n=i[1].data;for(let a=0;a<8;a++)e[s+a]=i[t+a]|n[t+a]}return e[s+8]=a,s}function fi(t,e){t.push(0,0,0,0,0,0,0,0,e)}function mi(t,e){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===e[t.injectorIndex+8]?-1:t.injectorIndex}function gi(t,e){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let i=0,n=null,a=e;for(;null!==a;){const t=a[1],e=t.type;if(n=2===e?t.declTNode:1===e?a[6]:null,null===n)return-1;if(i++,a=a[15],-1!==n.injectorIndex)return n.injectorIndex|i<<16}return-1}function vi(t,e,i){!function(t,e,i){let n;"string"==typeof i?n=i.charCodeAt(0)||0:i.hasOwnProperty(H)&&(n=i[H]),null==n&&(n=i[H]=pi++);const a=255&n,s=1<<a,o=64&a,r=32&a,c=e.data;128&a?o?r?c[t+7]|=s:c[t+6]|=s:r?c[t+5]|=s:c[t+4]|=s:o?r?c[t+3]|=s:c[t+2]|=s:r?c[t+1]|=s:c[t]|=s}(t,e,i)}function _i(t,e,i,n=m.Default,a){if(null!==t){const a=function(t){if("string"==typeof t)return t.charCodeAt(0)||0;const e=t.hasOwnProperty(H)?t[H]:void 0;return"number"==typeof e&&e>0?255&e:e}(i);if("function"==typeof a){Ve(e,t);try{const t=a();if(null!=t||n&m.Optional)return t;throw new Error(`No provider for ${si(i)}!`)}finally{Te()}}else if("number"==typeof a){if(-1===a)return new Mi(t,e);let s=null,o=mi(t,e),r=-1,c=n&m.Host?e[16][6]:null;for((-1===o||n&m.SkipSelf)&&(r=-1===o?gi(t,e):e[o+8],-1!==r&&wi(n,!1)?(s=e[1],o=ii(r),e=ni(r,e)):o=-1);-1!==o;){const t=e[1];if(Di(a,o,t.data)){const t=xi(o,e,i,s,n,c);if(t!==yi)return t}r=e[o+8],-1!==r&&wi(n,e[1].data[o+8]===c)&&Di(a,o,e)?(s=t,o=ii(r),e=ni(r,e)):o=-1}}}if(n&m.Optional&&void 0===a&&(a=null),0==(n&(m.Self|m.Host))){const t=e[9],s=et(void 0);try{return t?t.get(i,a,n&m.Optional):st(i,a,n&m.Optional)}finally{et(s)}}if(n&m.Optional)return a;throw new Error(`NodeInjector: NOT_FOUND [${si(i)}]`)}const yi={};function xi(t,e,i,n,a,s){const o=e[1],r=o.data[t+8],c=Ci(r,o,i,null==n?Ft(r)&&hi:n!=o&&2===r.type,a&m.Host&&s===r);return null!==c?Oi(e,o,c,r):yi}function Ci(t,e,i,n,a){const s=t.providerIndexes,o=e.data,r=1048575&s,c=t.directiveStart,l=s>>20,d=a?r+l:t.directiveEnd;for(let h=n?r:r+l;h<d;h++){const t=o[h];if(h<c&&i===t||h>=c&&t.type===i)return h}if(a){const t=o[c];if(t&&Qt(t)&&t.type===i)return c}return null}function Oi(t,e,i,n){let a=t[i];const s=e.data;if(a instanceof qe){const o=a;if(o.resolving)throw new Error("Circular dep for "+si(s[i]));const r=ui(o.canSeeViewProviders);o.resolving=!0;const c=o.injectImpl?et(o.injectImpl):null;Ve(t,n);try{a=t[i]=o.factory(void 0,s,t,n),e.firstCreatePass&&i>=n.directiveStart&&function(t,e,i){const{ngOnChanges:n,ngOnInit:a,ngDoCheck:s}=e.type.prototype;if(n){const n=Ut(e);(i.preOrderHooks||(i.preOrderHooks=[])).push(t,n),(i.preOrderCheckHooks||(i.preOrderCheckHooks=[])).push(t,n)}a&&(i.preOrderHooks||(i.preOrderHooks=[])).push(0-t,a),s&&((i.preOrderHooks||(i.preOrderHooks=[])).push(t,s),(i.preOrderCheckHooks||(i.preOrderCheckHooks=[])).push(t,s))}(i,s[i],e)}finally{null!==c&&et(c),ui(r),o.resolving=!1,Te()}}return a}function Di(t,e,i){const n=64&t,a=32&t;let s;return s=128&t?n?a?i[e+7]:i[e+6]:a?i[e+5]:i[e+4]:n?a?i[e+3]:i[e+2]:a?i[e+1]:i[e],!!(s&1<<t)}function wi(t,e){return!(t&m.Self||t&m.Host&&e)}class Mi{constructor(t,e){this._tNode=t,this._lView=e}get(t,e){return _i(this._tNode,this._lView,t,void 0,e)}}function ki(t){const e=t;if(A(t))return()=>{const t=ki(j(e));return t?t():null};let i=jt(e);if(null===i){const t=O(e);i=t&&t.factory}return i||null}function Si(t){return c(()=>{const e=t.prototype.constructor,i=e[$]||ki(e),n=Object.prototype;let a=Object.getPrototypeOf(t.prototype).constructor;for(;a&&a!==n;){const t=a[$]||ki(a);if(t&&t!==i)return t;a=Object.getPrototypeOf(a)}return t=>new t})}function Ii(t){return t.ngDebugContext}function Pi(t){return t.ngOriginalError}function Vi(t,...e){t.error(...e)}class Ri{constructor(){this._console=console}handleError(t){const e=this._findOriginalError(t),i=this._findContext(t),n=function(t){return t.ngErrorLogger||Vi}(t);n(this._console,"ERROR",t),e&&n(this._console,"ORIGINAL ERROR",e),i&&n(this._console,"ERROR CONTEXT",i)}_findContext(t){return t?Ii(t)?Ii(t):this._findContext(Pi(t)):null}_findOriginalError(t){let e=Pi(t);for(;e&&Pi(e);)e=Pi(e);return e}}class ji{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return"SafeValue must use [property]=binding: "+this.changingThisBreaksApplicationSecurity+" (see http://g.co/ng/security#xss)"}}class Ai extends ji{getTypeName(){return"HTML"}}class Wi extends ji{getTypeName(){return"Style"}}class Ti extends ji{getTypeName(){return"Script"}}class Ei extends ji{getTypeName(){return"URL"}}class Fi extends ji{getTypeName(){return"ResourceURL"}}function Li(t){return t instanceof ji?t.changingThisBreaksApplicationSecurity:t}function Qi(t,e){const i=Ni(t);if(null!=i&&i!==e){if("ResourceURL"===i&&"URL"===e)return!0;throw new Error(`Required a safe ${e}, got a ${i} (see http://g.co/ng/security#xss)`)}return i===e}function Ni(t){return t instanceof ji&&t.getTypeName()||null}function zi(t){return new Ai(t)}function Bi(t){return new Wi(t)}function Ui(t){return new Ti(t)}function $i(t){return new Ei(t)}function Hi(t){return new Fi(t)}let Gi=!0,Xi=!1;function qi(){return Xi=!0,Gi}function Ki(){if(Xi)throw new Error("Cannot enable prod mode after platform setup.");Gi=!1}class Yi{getInertBodyElement(t){t="<body><remove></remove>"+t;try{const e=(new window.DOMParser).parseFromString(t,"text/html").body;return e.removeChild(e.firstChild),e}catch(e){return null}}}class Ji{constructor(t){if(this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const t=this.inertDocument.createElement("html");this.inertDocument.appendChild(t);const e=this.inertDocument.createElement("body");t.appendChild(e)}}getInertBodyElement(t){const e=this.inertDocument.createElement("template");if("content"in e)return e.innerHTML=t,e;const i=this.inertDocument.createElement("body");return i.innerHTML=t,this.defaultDoc.documentMode&&this.stripCustomNsAttrs(i),i}stripCustomNsAttrs(t){const e=t.attributes;for(let n=e.length-1;0<n;n--){const i=e.item(n).name;"xmlns:ns1"!==i&&0!==i.indexOf("ns1:")||t.removeAttribute(i)}let i=t.firstChild;for(;i;)i.nodeType===Node.ELEMENT_NODE&&this.stripCustomNsAttrs(i),i=i.nextSibling}}const Zi=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi,tn=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;function en(t){return(t=String(t)).match(Zi)||t.match(tn)?t:(qi()&&console.warn(`WARNING: sanitizing unsafe URL value ${t} (see http://g.co/ng/security#xss)`),"unsafe:"+t)}function nn(t){const e={};for(const i of t.split(","))e[i]=!0;return e}function an(...t){const e={};for(const i of t)for(const t in i)i.hasOwnProperty(t)&&(e[t]=!0);return e}const sn=nn("area,br,col,hr,img,wbr"),on=nn("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),rn=nn("rp,rt"),cn=an(rn,on),ln=an(sn,an(on,nn("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")),an(rn,nn("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")),cn),dn=nn("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),hn=nn("srcset"),un=an(dn,hn,nn("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"),nn("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")),pn=nn("script,style,template");class bn{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(t){let e=t.firstChild,i=!0;for(;e;)if(e.nodeType===Node.ELEMENT_NODE?i=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,i&&e.firstChild)e=e.firstChild;else for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let t=this.checkClobberedElement(e,e.nextSibling);if(t){e=t;break}e=this.checkClobberedElement(e,e.parentNode)}return this.buf.join("")}startElement(t){const e=t.nodeName.toLowerCase();if(!ln.hasOwnProperty(e))return this.sanitizedSomething=!0,!pn.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);const i=t.attributes;for(let a=0;a<i.length;a++){const t=i.item(a),e=t.name,s=e.toLowerCase();if(!un.hasOwnProperty(s)){this.sanitizedSomething=!0;continue}let o=t.value;dn[s]&&(o=en(o)),hn[s]&&(n=o,o=(n=String(n)).split(",").map(t=>en(t.trim())).join(", ")),this.buf.push(" ",e,'="',gn(o),'"')}var n;return this.buf.push(">"),!0}endElement(t){const e=t.nodeName.toLowerCase();ln.hasOwnProperty(e)&&!sn.hasOwnProperty(e)&&(this.buf.push("</"),this.buf.push(e),this.buf.push(">"))}chars(t){this.buf.push(gn(t))}checkClobberedElement(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error("Failed to sanitize html because the element is clobbered: "+t.outerHTML);return e}}const fn=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,mn=/([^\#-~ |!])/g;function gn(t){return t.replace(/&/g,"&").replace(fn,(function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"})).replace(mn,(function(t){return"&#"+t.charCodeAt(0)+";"})).replace(/</g,"<").replace(/>/g,">")}let vn;function _n(t,e){let i=null;try{vn=vn||function(t){return function(){try{return!!(new window.DOMParser).parseFromString("","text/html")}catch(t){return!1}}()?new Yi:new Ji(t)}(t);let n=e?String(e):"";i=vn.getInertBodyElement(n);let a=5,s=n;do{if(0===a)throw new Error("Failed to sanitize html because the input is unstable");a--,n=s,s=i.innerHTML,i=vn.getInertBodyElement(n)}while(n!==s);const o=new bn,r=o.sanitizeChildren(yn(i)||i);return qi()&&o.sanitizedSomething&&console.warn("WARNING: sanitizing HTML stripped some content, see http://g.co/ng/security#xss"),r}finally{if(i){const t=yn(i)||i;for(;t.firstChild;)t.removeChild(t.firstChild)}}}function yn(t){return"content"in t&&function(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var xn=function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t}({});function Cn(t){const e=wn();return e?e.sanitize(xn.HTML,t)||"":Qi(t,"HTML")?Li(t):_n(Kt(),ai(t))}function On(t){const e=wn();return e?e.sanitize(xn.URL,t)||"":Qi(t,"URL")?Li(t):en(ai(t))}function Dn(t){const e=wn();if(e)return e.sanitize(xn.RESOURCE_URL,t)||"";if(Qi(t,"ResourceURL"))return Li(t);throw new Error("unsafe value used in a resource URL context (see http://g.co/ng/security#xss)")}function wn(){const t=pe();return t&&t[12]}function Mn(t,e){t.__ngContext__=e}function kn(t,e,i){let n=t.length;for(;;){const a=t.indexOf(e,i);if(-1===a)return a;if(0===a||t.charCodeAt(a-1)<=32){const i=e.length;if(a+i===n||t.charCodeAt(a+i)<=32)return a}i=a+1}}function Sn(t,e,i){let n=0;for(;n<t.length;){let a=t[n++];if(i&&"class"===a){if(a=t[n],-1!==kn(a.toLowerCase(),e,0))return!0}else if(1===a){for(;n<t.length&&"string"==typeof(a=t[n++]);)if(a.toLowerCase()===e)return!0;return!1}}return!1}function In(t){return 0===t.type&&"ng-template"!==t.tagName}function Pn(t,e,i){return e===(0!==t.type||i?t.tagName:"ng-template")}function Vn(t,e,i){let n=4;const a=t.attrs||[],s=function(t){for(let e=0;e<t.length;e++)if(Ye(t[e]))return e;return t.length}(a);let o=!1;for(let r=0;r<e.length;r++){const c=e[r];if("number"!=typeof c){if(!o)if(4&n){if(n=2|1&n,""!==c&&!Pn(t,c,i)||""===c&&1===e.length){if(Rn(n))return!1;o=!0}}else{const l=8&n?c:e[++r];if(8&n&&null!==t.attrs){if(!Sn(t.attrs,l,i)){if(Rn(n))return!1;o=!0}continue}const d=jn(8&n?"class":c,a,In(t),i);if(-1===d){if(Rn(n))return!1;o=!0;continue}if(""!==l){let t;t=d>s?"":a[d+1].toLowerCase();const e=8&n?t:null;if(e&&-1!==kn(e,l,0)||2&n&&l!==t){if(Rn(n))return!1;o=!0}}}}else{if(!o&&!Rn(n)&&!Rn(c))return!1;if(o&&Rn(c))continue;o=!1,n=c|1&n}}return Rn(n)||o}function Rn(t){return 0==(1&t)}function jn(t,e,i,n){if(null===e)return-1;let a=0;if(n||!i){let i=!1;for(;a<e.length;){const n=e[a];if(n===t)return a;if(3===n||6===n)i=!0;else{if(1===n||2===n){let t=e[++a];for(;"string"==typeof t;)t=e[++a];continue}if(4===n)break;if(0===n){a+=4;continue}}a+=i?1:2}return-1}return function(t,e){let i=t.indexOf(4);if(i>-1)for(i++;i<t.length;){const n=t[i];if("number"==typeof n)return-1;if(n===e)return i;i++}return-1}(e,t)}function An(t,e,i=!1){for(let n=0;n<e.length;n++)if(Vn(t,e[n],i))return!0;return!1}function Wn(t,e){t:for(let i=0;i<e.length;i++){const n=e[i];if(t.length===n.length){for(let e=0;e<t.length;e++)if(t[e]!==n[e])continue t;return!0}}return!1}function Tn(t,e){return t?":not("+e.trim()+")":e}function En(t){let e=t[0],i=1,n=2,a="",s=!1;for(;i<t.length;){let o=t[i];if("string"==typeof o)if(2&n){const e=t[++i];a+="["+o+(e.length>0?'="'+e+'"':"")+"]"}else 8&n?a+="."+o:4&n&&(a+=" "+o);else""===a||Rn(o)||(e+=Tn(s,a),a=""),n=o,s=s||!Rn(n);i++}return""!==a&&(e+=Tn(s,a)),e}const Fn={};function Ln(t){const e=t[3];return Tt(e)?e[3]:e}function Qn(t){return zn(t[13])}function Nn(t){return zn(t[4])}function zn(t){for(;null!==t&&!Tt(t);)t=t[4];return t}function Bn(t){Un(be(),pe(),Fe()+t,ye())}function Un(t,e,i,n){if(!n)if(3==(3&e[2])){const n=t.preOrderCheckHooks;null!==n&&Ue(e,n,i)}else{const n=t.preOrderHooks;null!==n&&$e(e,n,0,i)}Le(i)}function $n(t,e){return t<<17|e<<2}function Hn(t){return t>>17&32767}function Gn(t){return 2|t}function Xn(t){return(131068&t)>>2}function qn(t,e){return-131069&t|e<<2}function Kn(t){return 1|t}function Yn(t,e){const i=t.contentQueries;if(null!==i)for(let n=0;n<i.length;n+=2){const a=i[n],s=i[n+1];if(-1!==s){const i=t.data[s];Pe(a),i.contentQueries(2,e[s],s)}}}function Jn(t,e,i){return Yt(e)?e.createElement(t,i):null===i?e.createElement(t):e.createElementNS(i,t)}function Zn(t,e,i,n,a,s,o,r,c,l){const d=e.blueprint.slice();return d[0]=a,d[2]=140|n,le(d),d[3]=d[15]=t,d[8]=i,d[10]=o||t&&t[10],d[11]=r||t&&t[11],d[12]=c||t&&t[12]||null,d[9]=l||t&&t[9]||null,d[6]=s,d[16]=2==e.type?t[16]:d,d}function ta(t,e,i,n,a){const s=e+20,o=t.data[s]||function(t,e,i,n,a){const s=me(),o=ve(),r=t.data[e]=function(t,e,i,n,a,s){return{type:i,index:n,injectorIndex:e?e.injectorIndex:-1,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,propertyBindings:null,flags:0,providerIndexes:0,tagName:a,attrs:s,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tViews:null,next:null,projectionNext:null,child:null,parent:e,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}(0,o?s:s&&s.parent,i,e,n,a);return null===t.firstChild&&(t.firstChild=r),null!==s&&(o&&null==s.child&&null!==r.parent?s.child=r:o||(s.next=r)),r}(t,s,i,n,a);return ge(o,!0),o}function ea(t,e,i){Re(e);try{const n=t.viewQuery;null!==n&&Ra(1,n,i);const a=t.template;null!==a&&aa(t,e,a,1,i),t.firstCreatePass&&(t.firstCreatePass=!1),t.staticContentQueries&&Yn(t,e),t.staticViewQueries&&Ra(2,t.viewQuery,i);const s=t.components;null!==s&&function(t,e){for(let i=0;i<e.length;i++)ka(t,e[i])}(e,s)}catch(n){throw t.firstCreatePass&&(t.incompleteFirstPass=!0),n}finally{e[2]&=-5,Ee()}}function ia(t,e,i,n){const a=e[2];if(256==(256&a))return;Re(e);const s=ye();try{le(e),he.lFrame.bindingIndex=t.bindingStartIndex,null!==i&&aa(t,e,i,2,n);const o=3==(3&a);if(!s)if(o){const i=t.preOrderCheckHooks;null!==i&&Ue(e,i,null)}else{const i=t.preOrderHooks;null!==i&&$e(e,i,0,null),He(e,0)}if(function(t){for(let e=Qn(t);null!==e;e=Nn(e)){if(!e[2])continue;const t=e[9];for(let e=0;e<t.length;e++){const i=t[e],n=i[3];0==(1024&i[2])&&de(n,1),i[2]|=1024}}}(e),function(t){for(let e=Qn(t);null!==e;e=Nn(e))for(let t=10;t<e.length;t++){const i=e[t],n=i[1];re(i)&&ia(n,i,n.template,i[8])}}(e),null!==t.contentQueries&&Yn(t,e),!s)if(o){const i=t.contentCheckHooks;null!==i&&Ue(e,i)}else{const i=t.contentHooks;null!==i&&$e(e,i,1),He(e,1)}!function(t,e){try{const i=t.expandoInstructions;if(null!==i){let n=t.expandoStartIndex,a=-1,s=-1;for(let t=0;t<i.length;t++){const o=i[t];"number"==typeof o?o<=0?(s=0-o,Le(s),n+=9+i[++t],a=n):n+=o:(null!==o&&(Me(n,a),o(2,e[a])),a++)}}}finally{Le(-1)}}(t,e);const r=t.components;null!==r&&function(t,e){for(let i=0;i<e.length;i++)Ma(t,e[i])}(e,r);const c=t.viewQuery;if(null!==c&&Ra(2,c,n),!s)if(o){const i=t.viewCheckHooks;null!==i&&Ue(e,i)}else{const i=t.viewHooks;null!==i&&$e(e,i,2),He(e,2)}!0===t.firstUpdatePass&&(t.firstUpdatePass=!1),s||(e[2]&=-73),1024&e[2]&&(e[2]&=-1025,de(e[3],-1))}finally{Ee()}}function na(t,e,i,n){const a=e[10],s=!ye(),o=oe(e);try{s&&!o&&a.begin&&a.begin(),o&&ea(t,e,n),ia(t,e,i,n)}finally{s&&!o&&a.end&&a.end()}}function aa(t,e,i,n,a){const s=Fe();try{Le(-1),2&n&&e.length>20&&Un(t,e,0,ye()),i(n,a)}finally{Le(s)}}function sa(t,e,i){if(Et(e)){const n=e.directiveEnd;for(let a=e.directiveStart;a<n;a++){const e=t.data[a];e.contentQueries&&e.contentQueries(1,i[a],a)}}}function oa(t,e,i){ue()&&(function(t,e,i,n){const a=i.directiveStart,s=i.directiveEnd;t.firstCreatePass||bi(i,e),Mn(n,e);const o=i.initialInputs;for(let r=a;r<s;r++){const n=t.data[r],s=Qt(n);s&&Ca(e,i,n);const c=Oi(e,t,r,i);Mn(c,e),null!==o&&Oa(0,r-a,c,n,0,o),s&&(ae(i.index,e)[8]=c)}}(t,e,i,ee(i,e)),128==(128&i.flags)&&function(t,e,i){const n=i.directiveStart,a=i.directiveEnd,s=t.expandoInstructions,o=t.firstCreatePass,r=i.index-20,c=he.lFrame.currentDirectiveIndex;try{Le(r);for(let i=n;i<a;i++){const n=t.data[i],a=e[i];ke(i),null!==n.hostBindings||0!==n.hostVars||null!==n.hostAttrs?ma(n,a):o&&s.push(null)}}finally{Le(-1),ke(c)}}(t,e,i))}function ra(t,e,i=ee){const n=e.localNames;if(null!==n){let a=e.index+1;for(let s=0;s<n.length;s+=2){const o=n[s+1],r=-1===o?i(e,t):t[o];t[a++]=r}}}function ca(t){const e=t.tView;return null===e||e.incompleteFirstPass?t.tView=la(1,null,t.template,t.decls,t.vars,t.directiveDefs,t.pipeDefs,t.viewQuery,t.schemas,t.consts):e}function la(t,e,i,n,a,s,o,r,c,l){const d=20+n,h=d+a,u=function(t,e){const i=[];for(let n=0;n<e;n++)i.push(n<t?null:Fn);return i}(d,h),p="function"==typeof l?l():l;return u[1]={type:t,blueprint:u,template:i,queries:null,viewQuery:r,declTNode:e,data:u.slice().fill(null,d),bindingStartIndex:d,expandoStartIndex:h,expandoInstructions:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:"function"==typeof s?s():s,pipeRegistry:"function"==typeof o?o():o,firstChild:null,schemas:c,consts:p,incompleteFirstPass:!1}}function da(t,e,i,n){const a=Aa(e);a.push(i),t.firstCreatePass&&function(t){return t.cleanup||(t.cleanup=[])}(t).push(n,a.length-1)}function ha(t,e,i){for(let n in t)if(t.hasOwnProperty(n)){const a=t[n];(i=null===i?{}:i).hasOwnProperty(n)?i[n].push(e,a):i[n]=[e,a]}return i}function ua(t,e,i,n,a,s,o,r){const c=ee(e,i);let l,d=e.inputs;var h;!r&&null!=d&&(l=d[n])?(Ea(t,i,l,n,a),Ft(e)&&function(t,e){const i=ae(e,t);16&i[2]||(i[2]|=64)}(i,e.index)):2===e.type&&(n="class"===(h=n)?"className":"for"===h?"htmlFor":"formaction"===h?"formAction":"innerHtml"===h?"innerHTML":"readonly"===h?"readOnly":"tabindex"===h?"tabIndex":h,a=null!=o?o(a,e.tagName||"",n):a,Yt(s)?s.setProperty(c,n,a):Je(n)||(c.setProperty?c.setProperty(n,a):c[n]=a))}function pa(t,e,i,n){let a=!1;if(ue()){const s=function(t,e,i){const n=t.directiveRegistry;let a=null;if(n)for(let s=0;s<n.length;s++){const o=n[s];An(i,o.selectors,!1)&&(a||(a=[]),vi(bi(i,e),t,o.type),Qt(o)?(va(t,i),a.unshift(o)):a.push(o))}return a}(t,e,i),o=null===n?null:{"":-1};if(null!==s){let n=0;a=!0,ya(i,t.data.length,s.length);for(let t=0;t<s.length;t++){const e=s[t];e.providersResolver&&e.providersResolver(e)}ga(t,i,s.length);let r=!1,c=!1;for(let a=0;a<s.length;a++){const l=s[a];i.mergedAttrs=Ze(i.mergedAttrs,l.hostAttrs),xa(t,e,l),_a(t.data.length-1,l,o),null!==l.contentQueries&&(i.flags|=8),null===l.hostBindings&&null===l.hostAttrs&&0===l.hostVars||(i.flags|=128);const d=l.type.prototype;!r&&(d.ngOnChanges||d.ngOnInit||d.ngDoCheck)&&((t.preOrderHooks||(t.preOrderHooks=[])).push(i.index-20),r=!0),c||!d.ngOnChanges&&!d.ngDoCheck||((t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(i.index-20),c=!0),ba(t,l),n+=l.hostVars}!function(t,e){const i=e.directiveEnd,n=t.data,a=e.attrs,s=[];let o=null,r=null;for(let c=e.directiveStart;c<i;c++){const t=n[c],i=t.inputs,l=null===a||In(e)?null:Da(i,a);s.push(l),o=ha(i,c,o),r=ha(t.outputs,c,r)}null!==o&&(o.hasOwnProperty("class")&&(e.flags|=16),o.hasOwnProperty("style")&&(e.flags|=32)),e.initialInputs=s,e.inputs=o,e.outputs=r}(t,i),fa(t,e,n)}o&&function(t,e,i){if(e){const n=t.localNames=[];for(let t=0;t<e.length;t+=2){const a=i[e[t+1]];if(null==a)throw new Error(`Export of name '${e[t+1]}' not found!`);n.push(e[t],a)}}}(i,n,o)}return i.mergedAttrs=Ze(i.mergedAttrs,i.attrs),a}function ba(t,e){const i=t.expandoInstructions;i.push(e.hostBindings),0!==e.hostVars&&i.push(e.hostVars)}function fa(t,e,i){for(let n=0;n<i;n++)e.push(Fn),t.blueprint.push(Fn),t.data.push(null)}function ma(t,e){null!==t.hostBindings&&t.hostBindings(1,e)}function ga(t,e,i){const n=20-e.index,a=t.data.length-(1048575&e.providerIndexes);(t.expandoInstructions||(t.expandoInstructions=[])).push(n,a,i)}function va(t,e){e.flags|=2,(t.components||(t.components=[])).push(e.index)}function _a(t,e,i){if(i){if(e.exportAs)for(let n=0;n<e.exportAs.length;n++)i[e.exportAs[n]]=t;Qt(e)&&(i[""]=t)}}function ya(t,e,i){t.flags|=1,t.directiveStart=e,t.directiveEnd=e+i,t.providerIndexes=e}function xa(t,e,i){t.data.push(i);const n=i.factory||(i.factory=jt(i.type)),a=new qe(n,Qt(i),null);t.blueprint.push(a),e.push(a)}function Ca(t,e,i){const n=ee(e,t),a=ca(i),s=t[10],o=Sa(t,Zn(t,a,null,i.onPush?64:16,n,e,s,s.createRenderer(n,i),null,null));t[e.index]=o}function Oa(t,e,i,n,a,s){const o=s[e];if(null!==o){const t=n.setInput;for(let e=0;e<o.length;){const a=o[e++],s=o[e++],r=o[e++];null!==t?n.setInput(i,r,a,s):i[s]=r}}}function Da(t,e){let i=null,n=0;for(;n<e.length;){const a=e[n];if(0!==a)if(5!==a){if("number"==typeof a)break;t.hasOwnProperty(a)&&(null===i&&(i=[]),i.push(a,t[a],e[n+1])),n+=2}else n+=2;else n+=4}return i}function wa(t,e,i,n){return new Array(t,!0,!1,e,null,0,n,i,null,null)}function Ma(t,e){const i=ae(e,t);if(re(i)){const t=i[1];80&i[2]?ia(t,i,t.template,i[8]):i[5]>0&&function t(e){for(let n=Qn(e);null!==n;n=Nn(n))for(let e=10;e<n.length;e++){const i=n[e];if(1024&i[2]){const t=i[1];ia(t,i,t.template,i[8])}else i[5]>0&&t(i)}const i=e[1].components;if(null!==i)for(let n=0;n<i.length;n++){const a=ae(i[n],e);re(a)&&a[5]>0&&t(a)}}(i)}}function ka(t,e){const i=ae(e,t),n=i[1];!function(t,e){for(let i=e.length;i<t.blueprint.length;i++)e.push(t.blueprint[i])}(n,i),ea(n,i,i[8])}function Sa(t,e){return t[13]?t[14][4]=e:t[13]=e,t[14]=e,e}function Ia(t){for(;t;){t[2]|=64;const e=Ln(t);if(Nt(t)&&!e)return t;t=e}return null}function Pa(t,e,i){const n=e[10];n.begin&&n.begin();try{ia(t,e,t.template,i)}catch(a){throw Ta(e,a),a}finally{n.end&&n.end()}}function Va(t){!function(t){for(let e=0;e<t.components.length;e++){const i=t.components[e],n=se(i),a=n[1];na(a,n,a.template,i)}}(t[8])}function Ra(t,e,i){Pe(0),e(t,i)}const ja=(()=>Promise.resolve(null))();function Aa(t){return t[7]||(t[7]=[])}function Wa(t,e,i){return(null===t||Qt(t))&&(i=function(t){for(;Array.isArray(t);){if("object"==typeof t[1])return t;t=t[0]}return null}(i[e.index])),i[11]}function Ta(t,e){const i=t[9],n=i?i.get(Ri,null):null;n&&n.handleError(e)}function Ea(t,e,i,n,a){for(let s=0;s<i.length;){const o=i[s++],r=i[s++],c=e[o],l=t.data[o];null!==l.setInput?l.setInput(c,a,n,r):c[r]=a}}function Fa(t,e,i){const n=te(e,t),a=t[11];Yt(a)?a.setValue(n,i):n.textContent=i}function La(t,e,i,n,a){if(null!=n){let s,o=!1;Tt(n)?s=n:Wt(n)&&(o=!0,n=n[0]);const r=Zt(n);0===t&&null!==i?null==a?Ha(e,i,r):$a(e,i,r,a||null):1===t&&null!==i?$a(e,i,r,a||null):2===t?function(t,e,i){const n=Xa(t,e);n&&function(t,e,i,n){Yt(t)?t.removeChild(e,i,n):e.removeChild(i)}(t,n,e,i)}(e,r,o):3===t&&e.destroyNode(r),null!=s&&function(t,e,i,n,a){const s=i[7];s!==Zt(i)&&La(e,t,n,s,a);for(let o=10;o<i.length;o++){const a=i[o];Ja(a[1],a,t,e,n,s)}}(e,t,s,i,a)}}function Qa(t,e){const i=t[9],n=i.indexOf(e),a=e[3];1024&e[2]&&(e[2]&=-1025,de(a,-1)),i.splice(n,1)}function Na(t,e){if(t.length<=10)return;const i=10+e,n=t[i];if(n){const s=n[17];null!==s&&s!==t&&Qa(s,n),e>0&&(t[i-1][4]=n[4]);const o=ut(t,10+e);Ja(n[1],a=n,a[11],2,null,null),a[0]=null,a[6]=null;const r=o[19];null!==r&&r.detachView(o[1]),n[3]=null,n[4]=null,n[2]&=-129}var a;return n}function za(t,e){if(!(256&e[2])){const i=e[11];Yt(i)&&i.destroyNode&&Ja(t,e,i,3,null,null),function(t){let e=t[13];if(!e)return Ba(t[1],t);for(;e;){let i=null;if(Wt(e))i=e[13];else{const t=e[10];t&&(i=t)}if(!i){for(;e&&!e[4]&&e!==t;)Wt(e)&&Ba(e[1],e),e=e[3];null===e&&(e=t),Wt(e)&&Ba(e[1],e),i=e&&e[4]}e=i}}(e)}}function Ba(t,e){if(!(256&e[2])){e[2]&=-129,e[2]|=256,function(t,e){let i;if(null!=t&&null!=(i=t.destroyHooks))for(let n=0;n<i.length;n+=2){const t=e[i[n]];if(!(t instanceof qe)){const e=i[n+1];if(Array.isArray(e))for(let i=0;i<e.length;i+=2)e[i+1].call(t[e[i]]);else e.call(t)}}}(t,e),function(t,e){const i=t.cleanup;if(null!==i){const t=e[7];for(let n=0;n<i.length-1;n+=2)if("string"==typeof i[n]){const a=i[n+1],s="function"==typeof a?a(e):Zt(e[a]),o=t[i[n+2]],r=i[n+3];"boolean"==typeof r?s.removeEventListener(i[n],o,r):r>=0?t[r]():t[-r].unsubscribe(),n+=2}else i[n].call(t[i[n+1]]);e[7]=null}}(t,e),1===e[1].type&&Yt(e[11])&&e[11].destroy();const i=e[17];if(null!==i&&Tt(e[3])){i!==e[3]&&Qa(i,e);const n=e[19];null!==n&&n.detachView(t)}}}function Ua(t,e,i){let n=e.parent;for(;null!=n&&(3===n.type||4===n.type);)n=(e=n).parent;if(null===n)return i[0];if(e&&4===e.type&&4&e.flags)return ee(e,i).parentNode;if(2&n.flags){const e=t.data,i=e[e[n.index].directiveStart].encapsulation;if(i!==vt.ShadowDom&&i!==vt.Native)return null}return ee(n,i)}function $a(t,e,i,n){Yt(t)?t.insertBefore(e,i,n):e.insertBefore(i,n,!0)}function Ha(t,e,i){Yt(t)?t.appendChild(e,i):e.appendChild(i)}function Ga(t,e,i,n){null!==n?$a(t,e,i,n):Ha(t,e,i)}function Xa(t,e){return Yt(t)?t.parentNode(e):e.parentNode}function qa(t,e){return 3===t.type||4===t.type?ee(t,e):null}function Ka(t,e,i,n){const a=Ua(t,n,e);if(null!=a){const t=e[11],s=qa(n.parent||e[6],e);if(Array.isArray(i))for(let e=0;e<i.length;e++)Ga(t,a,i[e],s);else Ga(t,a,i,s)}}function Ya(t,e,i,n,a,s,o){for(;null!=i;){const r=n[i.index],c=i.type;o&&0===e&&(r&&Mn(Zt(r),n),i.flags|=4),64!=(64&i.flags)&&(3===c||4===c?(Ya(t,e,i.child,n,a,s,!1),La(e,t,a,r,s)):1===c?Za(t,e,n,i,a,s):La(e,t,a,r,s)),i=o?i.projectionNext:i.next}}function Ja(t,e,i,n,a,s){Ya(i,n,t.firstChild,e,a,s,!1)}function Za(t,e,i,n,a,s){const o=i[16],r=o[6].projection[n.projection];if(Array.isArray(r))for(let c=0;c<r.length;c++)La(e,t,a,r[c],s);else Ya(t,e,r,o[3],a,s,!0)}function ts(t,e,i){Yt(t)?t.setAttribute(e,"style",i):e.style.cssText=i}function es(t,e,i){Yt(t)?""===i?t.removeAttribute(e,"class"):t.setAttribute(e,"class",i):e.className=i}class is{constructor(t,e){this._lView=t,this._cdRefInjectingView=e,this._appRef=null,this._viewContainerRef=null}get rootNodes(){const t=this._lView,e=t[1];return function t(e,i,n,a,s=!1){for(;null!==n;){const o=i[n.index];if(null!==o&&a.push(Zt(o)),Tt(o))for(let e=10;e<o.length;e++){const i=o[e],n=i[1].firstChild;null!==n&&t(i[1],i,n,a)}const r=n.type;if(3===r||4===r)t(e,i,n.child,a);else if(1===r){const e=i[16],s=e[6].projection[n.projection];if(Array.isArray(s))a.push(...s);else{const i=Ln(e);t(i[1],i,s,a,!0)}}n=s?n.projectionNext:n.next}return a}(e,t,e.firstChild,[])}get context(){return this._lView[8]}get destroyed(){return 256==(256&this._lView[2])}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._viewContainerRef){const t=this._viewContainerRef.indexOf(this);t>-1&&this._viewContainerRef.detach(t),this._viewContainerRef=null}za(this._lView[1],this._lView)}onDestroy(t){da(this._lView[1],this._lView,null,t)}markForCheck(){Ia(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-129}reattach(){this._lView[2]|=128}detectChanges(){Pa(this._lView[1],this._lView,this.context)}checkNoChanges(){!function(t,e,i){xe(!0);try{Pa(t,e,i)}finally{xe(!1)}}(this._lView[1],this._lView,this.context)}attachToViewContainerRef(t){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=t}detachFromAppRef(){var t;this._appRef=null,Ja(this._lView[1],t=this._lView,t[11],2,null,null)}attachToAppRef(t){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t}}class ns extends is{constructor(t){super(t),this._view=t}detectChanges(){Va(this._view)}checkNoChanges(){!function(t){xe(!0);try{Va(t)}finally{xe(!1)}}(this._view)}get context(){return null}}let as,ss,os;function rs(t,e,i){return as||(as=class extends t{}),new as(ee(e,i))}function cs(t,e,i,n){return ss||(ss=class extends t{constructor(t,e,i){super(),this._declarationView=t,this._declarationTContainer=e,this.elementRef=i}createEmbeddedView(t){const e=this._declarationTContainer.tViews,i=Zn(this._declarationView,e,t,16,null,e.declTNode,null,null,null,null);i[17]=this._declarationView[this._declarationTContainer.index];const n=this._declarationView[19];return null!==n&&(i[19]=n.createEmbeddedView(e)),ea(e,i,t),new is(i)}}),0===i.type?new ss(n,i,rs(e,i,n)):null}function ls(t,e,i,n){let a;os||(os=class extends t{constructor(t,e,i){super(),this._lContainer=t,this._hostTNode=e,this._hostView=i}get element(){return rs(e,this._hostTNode,this._hostView)}get injector(){return new Mi(this._hostTNode,this._hostView)}get parentInjector(){const t=gi(this._hostTNode,this._hostView);if(ei(t)){const e=ni(t,this._hostView),i=ii(t);return new Mi(e[1].data[i+8],e)}return new Mi(null,this._hostView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){return null!==this._lContainer[8]&&this._lContainer[8][t]||null}get length(){return this._lContainer.length-10}createEmbeddedView(t,e,i){const n=t.createEmbeddedView(e||{});return this.insert(n,i),n}createComponent(t,e,i,n,a){const s=i||this.parentInjector;if(!a&&null==t.ngModule&&s){const t=s.get(ct,null);t&&(a=t)}const o=t.create(s,n,void 0,a);return this.insert(o.hostView,e),o}insert(t,e){const i=t._lView,n=i[1];if(t.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");if(this.allocateContainerIfNeeded(),Tt(i[3])){const e=this.indexOf(t);if(-1!==e)this.detach(e);else{const e=i[3],n=new os(e,e[6],e[3]);n.detach(n.indexOf(t))}}const a=this._adjustIndex(e),s=this._lContainer;!function(t,e,i,n){const a=10+n,s=i.length;n>0&&(i[a-1][4]=e),n<s-10?(e[4]=i[a],ht(i,10+n,e)):(i.push(e),e[4]=null),e[3]=i;const o=e[17];null!==o&&i!==o&&function(t,e){const i=t[9];e[16]!==e[3][3][16]&&(t[2]=!0),null===i?t[9]=[e]:i.push(e)}(o,e);const r=e[19];null!==r&&r.insertView(t),e[2]|=128}(n,i,s,a);const o=function t(e,i){const n=10+e+1;if(n<i.length){const e=i[n],a=e[1].firstChild;if(null!==a)return function e(i,n){if(null!==n){const a=n.type;if(2===a)return ee(n,i);if(0===a)return t(-1,i[n.index]);if(3===a||4===a){const a=n.child;if(null!==a)return e(i,a);{const e=i[n.index];return Tt(e)?t(-1,e):Zt(e)}}{const t=i[16],a=t[6],s=Ln(t),o=a.projection[n.projection];return null!=o?e(s,o):e(i,n.next)}}return null}(e,a)}return i[7]}(a,s),r=i[11],c=Xa(r,s[7]);return null!==c&&function(t,e,i,n,a,s){n[0]=a,n[6]=e,Ja(t,n,i,1,a,s)}(n,s[6],r,i,c,o),t.attachToViewContainerRef(this),ht(s[8],a,t),t}move(t,e){if(t.destroyed)throw new Error("Cannot move a destroyed View in a ViewContainer!");return this.insert(t,e)}indexOf(t){const e=this._lContainer[8];return null!==e?e.indexOf(t):-1}remove(t){this.allocateContainerIfNeeded();const e=this._adjustIndex(t,-1),i=Na(this._lContainer,e);i&&(ut(this._lContainer[8],e),za(i[1],i))}detach(t){this.allocateContainerIfNeeded();const e=this._adjustIndex(t,-1),i=Na(this._lContainer,e);return i&&null!=ut(this._lContainer[8],e)?new is(i):null}_adjustIndex(t,e=0){return null==t?this.length+e:t}allocateContainerIfNeeded(){null===this._lContainer[8]&&(this._lContainer[8]=[])}});const s=n[i.index];if(Tt(s))a=s;else{let t;if(3===i.type)t=Zt(s);else if(t=n[11].createComment(""),Nt(n)){const e=n[11],a=ee(i,n);$a(e,Xa(e,a),t,function(t,e){return Yt(t)?t.nextSibling(e):e.nextSibling}(e,a))}else Ka(n[1],n,t,i);n[i.index]=a=wa(s,n,t,i),Sa(n,a)}return new os(a,i,n)}function ds(t=!1){return function(t,e,i){if(!i&&Ft(t)){const i=ae(t.index,e);return new is(i,i)}return 2===t.type||0===t.type||3===t.type||4===t.type?new is(e[16],e):null}(me(),pe(),t)}let hs=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>us(),t})();const us=ds,ps=Function,bs=new G("Set Injector scope."),fs={},ms={},gs=[];let vs=void 0;function _s(){return void 0===vs&&(vs=new rt),vs}function ys(t,e=null,i=null,n){return new xs(t,i,e||_s(),n)}class xs{constructor(t,e,i,n=null){this.parent=i,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;const a=[];e&&dt(e,i=>this.processProvider(i,t,e)),dt([t],t=>this.processInjectorType(t,[],a)),this.records.set(X,Ds(void 0,this));const s=this.records.get(bs);this.scope=null!=s?s.value:null,this.source=n||("object"==typeof t?null:I(t))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(t=>t.ngOnDestroy())}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}get(t,e=q,i=m.Default){this.assertNotDestroyed();const n=tt(this);try{if(!(i&m.SkipSelf)){let e=this.records.get(t);if(void 0===e){const i=("function"==typeof(a=t)||"object"==typeof a&&a instanceof G)&&x(t);e=i&&this.injectableDefInScope(i)?Ds(Cs(t),fs):null,this.records.set(t,e)}if(null!=e)return this.hydrate(t,e)}return(i&m.Self?_s():this.parent).get(t,e=i&m.Optional&&e===q?null:e)}catch(s){if("NullInjectorError"===s.name){if((s.ngTempTokenPath=s.ngTempTokenPath||[]).unshift(I(t)),n)throw s;return function(t,e,i,n){const a=t.ngTempTokenPath;throw e.__source&&a.unshift(e.__source),t.message=function(t,e,i,n=null){t=t&&"\n"===t.charAt(0)&&"\u0275"==t.charAt(1)?t.substr(2):t;let a=I(e);if(Array.isArray(e))a=e.map(I).join(" -> ");else if("object"==typeof e){let t=[];for(let i in e)if(e.hasOwnProperty(i)){let n=e[i];t.push(i+":"+("string"==typeof n?JSON.stringify(n):I(n)))}a=`{${t.join(", ")}}`}return`${i}${n?"("+n+")":""}[${a}]: ${t.replace(K,"\n ")}`}("\n"+t.message,a,i,n),t.ngTokenPath=a,t.ngTempTokenPath=null,t}(s,t,"R3InjectorError",this.source)}throw s}finally{tt(n)}var a}_resolveInjectorDefTypes(){this.injectorDefTypes.forEach(t=>this.get(t))}toString(){const t=[];return this.records.forEach((e,i)=>t.push(I(i))),`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}processInjectorType(t,e,i){if(!(t=j(t)))return!1;let n=O(t);const a=null==n&&t.ngModule||void 0,s=void 0===a?t:a,o=-1!==i.indexOf(s);if(void 0!==a&&(n=O(a)),null==n)return!1;if(null!=n.imports&&!o){let t;i.push(s);try{dt(n.imports,n=>{this.processInjectorType(n,e,i)&&(void 0===t&&(t=[]),t.push(n))})}finally{}if(void 0!==t)for(let e=0;e<t.length;e++){const{ngModule:i,providers:n}=t[e];dt(n,t=>this.processProvider(t,i,n||gs))}}this.injectorDefTypes.add(s),this.records.set(s,Ds(n.factory,fs));const r=n.providers;if(null!=r&&!o){const e=t;dt(r,t=>this.processProvider(t,e,r))}return void 0!==a&&void 0!==t.providers}processProvider(t,e,i){let n=Ms(t=j(t))?t:j(t&&t.provide);const a=function(t,e,i){return ws(t)?Ds(void 0,t.useValue):Ds(Os(t),fs)}(t);if(Ms(t)||!0!==t.multi)this.records.get(n);else{let e=this.records.get(n);e||(e=Ds(void 0,fs,!0),e.factory=()=>ot(e.multi),this.records.set(n,e)),n=t,e.multi.push(t)}this.records.set(n,a)}hydrate(t,e){var i;return e.value===fs&&(e.value=ms,e.value=e.factory()),"object"==typeof e.value&&e.value&&null!==(i=e.value)&&"object"==typeof i&&"function"==typeof i.ngOnDestroy&&this.onDestroy.add(e.value),e.value}injectableDefInScope(t){return!!t.providedIn&&("string"==typeof t.providedIn?"any"===t.providedIn||t.providedIn===this.scope:this.injectorDefTypes.has(t.providedIn))}}function Cs(t){const e=x(t),i=null!==e?e.factory:jt(t);if(null!==i)return i;const n=O(t);if(null!==n)return n.factory;if(t instanceof G)throw new Error(`Token ${I(t)} is missing a \u0275prov definition.`);if(t instanceof Function)return function(t){const e=t.length;if(e>0){const i=pt(e,"?");throw new Error(`Can't resolve all parameters for ${I(t)}: (${i.join(", ")}).`)}const i=function(t){const e=t&&(t[D]||t[k]||t[M]&&t[M]());if(e){const i=function(t){if(t.hasOwnProperty("name"))return t.name;const e=(""+t).match(/^function\s*([^\s(]+)/);return null===e?"":e[1]}(t);return console.warn(`DEPRECATED: DI is instantiating a token "${i}" 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 "${i}" class.`),e}return null}(t);return null!==i?()=>i.factory(t):()=>new t}(t);throw new Error("unreachable")}function Os(t,e,i){let n=void 0;if(Ms(t)){const e=j(t);return jt(e)||Cs(e)}if(ws(t))n=()=>j(t.useValue);else if((a=t)&&a.useFactory)n=()=>t.useFactory(...ot(t.deps||[]));else if(function(t){return!(!t||!t.useExisting)}(t))n=()=>nt(j(t.useExisting));else{const e=j(t&&(t.useClass||t.provide));if(!function(t){return!!t.deps}(t))return jt(e)||Cs(e);n=()=>new e(...ot(t.deps))}var a;return n}function Ds(t,e,i=!1){return{factory:t,value:e,multi:i?[]:void 0}}function ws(t){return null!==t&&"object"==typeof t&&Y in t}function Ms(t){return"function"==typeof t}const ks=function(t,e,i){return function(t,e=null,i=null,n){const a=ys(t,e,i,n);return a._resolveInjectorDefTypes(),a}({name:i},e,t,i)};let Ss=(()=>{class t{static create(t,e){return Array.isArray(t)?ks(t,e,""):ks(t.providers,t.parent,t.name||"")}}return t.THROW_IF_NOT_FOUND=q,t.NULL=new rt,t.\u0275prov=_({token:t,providedIn:"any",factory:()=>nt(X)}),t.__NG_ELEMENT_ID__=-1,t})();const Is=new G("AnalyzeForEntryComponents");function Ps(t,e,i){let n=i?t.styles:null,a=i?t.classes:null,s=0;if(null!==e)for(let o=0;o<e.length;o++){const t=e[o];"number"==typeof t?s=t:1==s?a=P(a,t):2==s&&(n=P(n,t+": "+e[++o]+";"))}i?t.styles=n:t.stylesWithoutHost=n,i?t.classes=a:t.classesWithoutHost=a}function Vs(t,e){const i=se(t)[1],n=i.data.length-1;Be(i,{directiveStart:n,directiveEnd:n+1})}function Rs(t){let e=Object.getPrototypeOf(t.type.prototype).constructor,i=!0;const n=[t];for(;e;){let a=void 0;if(Qt(t))a=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new Error("Directives cannot inherit Components");a=e.\u0275dir}if(a){if(i){n.push(a);const e=t;e.inputs=js(t.inputs),e.declaredInputs=js(t.declaredInputs),e.outputs=js(t.outputs);const i=a.hostBindings;i&&Ts(t,i);const s=a.viewQuery,o=a.contentQueries;if(s&&As(t,s),o&&Ws(t,o),v(t.inputs,a.inputs),v(t.declaredInputs,a.declaredInputs),v(t.outputs,a.outputs),Qt(a)&&a.data.animation){const e=t.data;e.animation=(e.animation||[]).concat(a.data.animation)}}const e=a.features;if(e)for(let n=0;n<e.length;n++){const a=e[n];a&&a.ngInherit&&a(t),a===Rs&&(i=!1)}}e=Object.getPrototypeOf(e)}!function(t){let e=0,i=null;for(let n=t.length-1;n>=0;n--){const a=t[n];a.hostVars=e+=a.hostVars,a.hostAttrs=Ze(a.hostAttrs,i=Ze(i,a.hostAttrs))}}(n)}function js(t){return t===_t?{}:t===yt?[]:t}function As(t,e){const i=t.viewQuery;t.viewQuery=i?(t,n)=>{e(t,n),i(t,n)}:e}function Ws(t,e){const i=t.contentQueries;t.contentQueries=i?(t,n,a)=>{e(t,n,a),i(t,n,a)}:e}function Ts(t,e){const i=t.hostBindings;t.hostBindings=i?(t,n)=>{e(t,n),i(t,n)}:e}let Es=null;function Fs(){if(!Es){const t=L.Symbol;if(t&&t.iterator)Es=t.iterator;else{const t=Object.getOwnPropertyNames(Map.prototype);for(let e=0;e<t.length;++e){const i=t[e];"entries"!==i&&"size"!==i&&Map.prototype[i]===Map.prototype.entries&&(Es=i)}}}return Es}class Ls{constructor(t){this.wrapped=t}static wrap(t){return new Ls(t)}static unwrap(t){return Ls.isWrapped(t)?t.wrapped:t}static isWrapped(t){return t instanceof Ls}}function Qs(t){return!!Ns(t)&&(Array.isArray(t)||!(t instanceof Map)&&Fs()in t)}function Ns(t){return null!==t&&("function"==typeof t||"object"==typeof t)}function zs(t,e,i){return t[e]=i}function Bs(t,e,i){return!Object.is(t[e],i)&&(t[e]=i,!0)}function Us(t,e,i,n){const a=Bs(t,e,i);return Bs(t,e+1,n)||a}function $s(t,e,i,n,a){const s=Us(t,e,i,n);return Bs(t,e+2,a)||s}function Hs(t,e,i,n,a,s){const o=Us(t,e,i,n);return Us(t,e+2,a,s)||o}function Gs(t,e,i,n){const a=pe();return Bs(a,De(),e)&&(be(),function(t,e,i,n,a,s){const o=ee(t,e),r=e[11];if(null==n)Yt(r)?r.removeAttribute(o,i,s):o.removeAttribute(i);else{const e=null==a?ai(n):a(n,t.tagName||"",i);Yt(r)?r.setAttribute(o,i,e,s):s?o.setAttributeNS(s,i,e):o.setAttribute(i,e)}}(Qe(),a,t,e,i,n)),Gs}function Xs(t,e,i,n){return Bs(t,De(),i)?e+ai(i)+n:Fn}function qs(t,e,i,n,a,s){const o=Us(t,Oe(),i,a);return we(2),o?e+ai(i)+n+ai(a)+s:Fn}function Ks(t,e,i,n,a,s,o,r){const c=$s(t,Oe(),i,a,o);return we(3),c?e+ai(i)+n+ai(a)+s+ai(o)+r:Fn}function Ys(t,e,i,n,a,s,o,r,c,l){const d=Hs(t,Oe(),i,a,o,c);return we(4),d?e+ai(i)+n+ai(a)+s+ai(o)+r+ai(c)+l:Fn}function Js(t,e,i,n,a,s,o,r,c,l,d,h){const u=Oe();let p=Hs(t,u,i,a,o,c);return p=Bs(t,u+4,d)||p,we(5),p?e+ai(i)+n+ai(a)+s+ai(o)+r+ai(c)+l+ai(d)+h:Fn}function Zs(t,e,i,n,a,s,o,r){const c=pe(),l=be(),d=t+20,h=l.firstCreatePass?function(t,e,i,n,a,s,o,r,c){const l=e.consts,d=ta(e,t,0,o||null,ce(l,r));pa(e,i,d,ce(l,c)),Be(e,d);const h=d.tViews=la(2,d,n,a,s,e.directiveRegistry,e.pipeRegistry,null,e.schemas,l);return null!==e.queries&&(e.queries.template(e,d),h.queries=e.queries.embeddedTView(d)),d}(t,l,c,e,i,n,a,s,o):l.data[d];ge(h,!1);const u=c[11].createComment("");Ka(l,c,u,h),Mn(u,c),Sa(c,c[d]=wa(u,c,u,h)),Lt(h)&&oa(l,c,h),null!=o&&ra(c,h,r)}function to(t){return ne(he.lFrame.contextLView,t)}function eo(t,e=m.Default){const i=pe();return null===i?nt(t,e):_i(me(),i,j(t),e)}function io(t){return function(t,e){if("class"===e)return t.classes;if("style"===e)return t.styles;const i=t.attrs;if(i){const t=i.length;let n=0;for(;n<t;){const a=i[n];if(Ye(a))break;if(0===a)n+=2;else if("number"==typeof a)for(n++;n<t&&"string"==typeof i[n];)n++;else{if(a===e)return i[n+1];n+=2}}}return null}(me(),t)}function no(t,e,i){const n=pe();return Bs(n,De(),e)&&ua(be(),Qe(),n,t,e,n[11],i,!1),no}function ao(t,e,i,n,a){const s=a?"class":"style";Ea(t,i,e.inputs[s],s,n)}function so(t,e,i,n){const a=pe(),s=be(),o=20+t,r=a[11],c=a[o]=Jn(e,r,he.lFrame.currentNamespace),l=s.firstCreatePass?function(t,e,i,n,a,s,o){const r=e.consts,c=ta(e,t,2,a,ce(r,s));return pa(e,i,c,ce(r,o)),null!==c.attrs&&Ps(c,c.attrs,!1),null!==c.mergedAttrs&&Ps(c,c.mergedAttrs,!0),null!==e.queries&&e.queries.elementStart(e,c),c}(t,s,a,0,e,i,n):s.data[o];ge(l,!0);const d=l.mergedAttrs;null!==d&&Ke(r,c,d);const h=l.classes;null!==h&&es(r,c,h);const u=l.styles;null!==u&&ts(r,c,u),Ka(s,a,c,l),0===he.lFrame.elementDepthCount&&Mn(c,a),he.lFrame.elementDepthCount++,Lt(l)&&(oa(s,a,l),sa(s,l,a)),null!==n&&ra(a,l)}function oo(){let t=me();ve()?_e():(t=t.parent,ge(t,!1));const e=t;he.lFrame.elementDepthCount--;const i=be();i.firstCreatePass&&(Be(i,t),Et(t)&&i.queries.elementEnd(t)),null!=e.classesWithoutHost&&function(t){return 0!=(16&t.flags)}(e)&&ao(i,e,pe(),e.classesWithoutHost,!0),null!=e.stylesWithoutHost&&function(t){return 0!=(32&t.flags)}(e)&&ao(i,e,pe(),e.stylesWithoutHost,!1)}function ro(t,e,i,n){so(t,e,i,n),oo()}function co(t,e,i){const n=pe(),a=be(),s=t+20,o=a.firstCreatePass?function(t,e,i,n,a){const s=e.consts,o=ce(s,n),r=ta(e,t,3,"ng-container",o);return null!==o&&Ps(r,o,!0),pa(e,i,r,ce(s,a)),null!==e.queries&&e.queries.elementStart(e,r),r}(t,a,n,e,i):a.data[s];ge(o,!0);const r=n[s]=n[11].createComment("");Ka(a,n,r,o),Mn(r,n),Lt(o)&&(oa(a,n,o),sa(a,o,n)),null!=i&&ra(n,o)}function lo(){let t=me();const e=be();ve()?_e():(t=t.parent,ge(t,!1)),e.firstCreatePass&&(Be(e,t),Et(t)&&e.queries.elementEnd(t))}function ho(t,e,i){co(t,e,i),lo()}function uo(){return pe()}function po(t){return!!t&&"function"==typeof t.then}function bo(t){return!!t&&"function"==typeof t.subscribe}function fo(t,e,i=!1,n){const a=pe(),s=be(),o=me();return go(s,a,a[11],o,t,e,i,n),fo}function mo(t,e,i=!1,n){const a=me(),s=pe(),o=be();return go(o,s,Wa(Se(o.data),a,s),a,t,e,i,n),mo}function go(t,e,i,n,a,s,o=!1,r){const c=Lt(n),l=t.firstCreatePass&&(t.cleanup||(t.cleanup=[])),d=Aa(e);let h=!0;if(2===n.type){const u=ee(n,e),p=r?r(u):_t,b=p.target||u,f=d.length,m=r?t=>r(Zt(t[n.index])).target:n.index;if(Yt(i)){let o=null;if(!r&&c&&(o=function(t,e,i,n){const a=t.cleanup;if(null!=a)for(let s=0;s<a.length-1;s+=2){const t=a[s];if(t===i&&a[s+1]===n){const t=e[7],i=a[s+2];return t.length>i?t[i]:null}"string"==typeof t&&(s+=2)}return null}(t,e,a,n.index)),null!==o)(o.__ngLastListenerFn__||o).__ngNextListenerFn__=s,o.__ngLastListenerFn__=s,h=!1;else{s=_o(n,e,s,!1);const t=i.listen(p.name||b,a,s);d.push(s,t),l&&l.push(a,m,f,f+1)}}else s=_o(n,e,s,!0),b.addEventListener(a,s,o),d.push(s),l&&l.push(a,m,f,o)}const u=n.outputs;let p;if(h&&null!==u&&(p=u[a])){const t=p.length;if(t)for(let i=0;i<t;i+=2){const t=e[p[i]][p[i+1]].subscribe(s),o=d.length;d.push(s,t),l&&l.push(a,n.index,o,-(o+1))}}}function vo(t,e,i){try{return!1!==e(i)}catch(n){return Ta(t,n),!1}}function _o(t,e,i,n){return function a(s){if(s===Function)return i;const o=2&t.flags?ae(t.index,e):e;0==(32&e[2])&&Ia(o);let r=vo(e,i,s),c=a.__ngNextListenerFn__;for(;c;)r=vo(e,c,s)&&r,c=c.__ngNextListenerFn__;return n&&!1===r&&(s.preventDefault(),s.returnValue=!1),r}}function yo(t=1){return function(t){return(he.lFrame.contextLView=function(t,e){for(;t>0;)e=e[15],t--;return e}(t,he.lFrame.contextLView))[8]}(t)}function xo(t,e){let i=null;const n=function(t){const e=t.attrs;if(null!=e){const t=e.indexOf(5);if(0==(1&t))return e[t+1]}return null}(t);for(let a=0;a<e.length;a++){const s=e[a];if("*"!==s){if(null===n?An(t,s,!0):Wn(n,s))return a}else i=a}return i}function Co(t){const e=pe()[16][6];if(!e.projection){const i=e.projection=pt(t?t.length:1,null),n=i.slice();let a=e.child;for(;null!==a;){const e=t?xo(a,t):0;null!==e&&(n[e]?n[e].projectionNext=a:i[e]=a,n[e]=a),a=a.next}}}function Oo(t,e=0,i){const n=pe(),a=be(),s=ta(a,t,1,null,i||null);null===s.projection&&(s.projection=e),_e(),function(t,e,i){Za(e[11],0,e,i,Ua(t,i,e),qa(i.parent||e[6],e))}(a,n,s)}function Do(t,e,i){return wo(t,"",e,"",i),Do}function wo(t,e,i,n,a){const s=pe(),o=Xs(s,e,i,n);return o!==Fn&&ua(be(),Qe(),s,t,o,s[11],a,!1),wo}function Mo(t,e,i,n,a,s,o){const r=pe(),c=qs(r,e,i,n,a,s);return c!==Fn&&ua(be(),Qe(),r,t,c,r[11],o,!1),Mo}function ko(t,e,i,n,a,s,o,r,c){const l=pe(),d=Ks(l,e,i,n,a,s,o,r);return d!==Fn&&ua(be(),Qe(),l,t,d,l[11],c,!1),ko}function So(t,e,i,n,a,s,o,r,c,l,d){const h=pe(),u=Ys(h,e,i,n,a,s,o,r,c,l);return u!==Fn&&ua(be(),Qe(),h,t,u,h[11],d,!1),So}const Io=[];function Po(t,e,i,n,a){const s=t[i+1],o=null===e;let r=n?Hn(s):Xn(s),c=!1;for(;0!==r&&(!1===c||o);){const i=t[r+1];Vo(t[r],e)&&(c=!0,t[r+1]=n?Kn(i):Gn(i)),r=n?Hn(i):Xn(i)}c&&(t[i+1]=n?Gn(s):Kn(s))}function Vo(t,e){return null===t||null==e||(Array.isArray(t)?t[1]:t)===e||!(!Array.isArray(t)||"string"!=typeof e)&&mt(t,e)>=0}const Ro={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function jo(t){return t.substring(Ro.key,Ro.keyEnd)}function Ao(t,e){const i=Ro.textEnd;return i===e?-1:(e=Ro.keyEnd=function(t,e,i){for(;e<i&&t.charCodeAt(e)>32;)e++;return e}(t,Ro.key=e,i),Wo(t,e,i))}function Wo(t,e,i){for(;e<i&&t.charCodeAt(e)<=32;)e++;return e}function To(t,e,i){return Qo(t,e,i,!1),To}function Eo(t,e){return Qo(t,e,null,!0),Eo}function Fo(t){No(bt,Lo,t,!0)}function Lo(t,e){for(let i=function(t){return function(t){Ro.key=0,Ro.keyEnd=0,Ro.value=0,Ro.valueEnd=0,Ro.textEnd=t.length}(t),Ao(t,Wo(t,0,Ro.textEnd))}(e);i>=0;i=Ao(e,i))bt(t,jo(e),!0)}function Qo(t,e,i,n){const a=pe(),s=be(),o=we(2);s.firstUpdatePass&&Bo(s,t,o,n),e!==Fn&&Bs(a,o,e)&&Ho(s,s.data[Fe()+20],a,a[11],t,a[o+1]=function(t,e){return null==t||("string"==typeof e?t+=e:"object"==typeof t&&(t=I(Li(t)))),t}(e,i),n,o)}function No(t,e,i,n){const a=be(),s=we(2);a.firstUpdatePass&&Bo(a,null,s,n);const o=pe();if(i!==Fn&&Bs(o,s,i)){const r=a.data[Fe()+20];if(qo(r,n)&&!zo(a,s)){let t=n?r.classesWithoutHost:r.stylesWithoutHost;null!==t&&(i=P(t,i||"")),ao(a,r,o,i,n)}else!function(t,e,i,n,a,s,o,r){a===Fn&&(a=Io);let c=0,l=0,d=0<a.length?a[0]:null,h=0<s.length?s[0]:null;for(;null!==d||null!==h;){const u=c<a.length?a[c+1]:void 0,p=l<s.length?s[l+1]:void 0;let b=null,f=void 0;d===h?(c+=2,l+=2,u!==p&&(b=h,f=p)):null===h||null!==d&&d<h?(c+=2,b=d):(l+=2,b=h,f=p),null!==b&&Ho(t,e,i,n,b,f,o,r),d=c<a.length?a[c]:null,h=l<s.length?s[l]:null}}(a,r,o,o[11],o[s+1],o[s+1]=function(t,e,i){if(null==i||""===i)return Io;const n=[],a=Li(i);if(Array.isArray(a))for(let s=0;s<a.length;s++)t(n,a[s],!0);else if("object"==typeof a)for(const s in a)a.hasOwnProperty(s)&&t(n,s,a[s]);else"string"==typeof a&&e(n,a);return n}(t,e,i),n,s)}}function zo(t,e){return e>=t.expandoStartIndex}function Bo(t,e,i,n){const a=t.data;if(null===a[i+1]){const s=a[Fe()+20],o=zo(t,i);qo(s,n)&&null===e&&!o&&(e=!1),e=function(t,e,i,n){const a=Se(t);let s=n?e.residualClasses:e.residualStyles;if(null===a)0===(n?e.classBindings:e.styleBindings)&&(i=$o(i=Uo(null,t,e,i,n),e.attrs,n),s=null);else{const o=e.directiveStylingLast;if(-1===o||t[o]!==a)if(i=Uo(a,t,e,i,n),null===s){let i=function(t,e,i){const n=i?e.classBindings:e.styleBindings;if(0!==Xn(n))return t[Hn(n)]}(t,e,n);void 0!==i&&Array.isArray(i)&&(i=Uo(null,t,e,i[1],n),i=$o(i,e.attrs,n),function(t,e,i,n){t[Hn(i?e.classBindings:e.styleBindings)]=n}(t,e,n,i))}else s=function(t,e,i){let n=void 0;const a=e.directiveEnd;for(let s=1+e.directiveStylingLast;s<a;s++)n=$o(n,t[s].hostAttrs,i);return $o(n,e.attrs,i)}(t,e,n)}return void 0!==s&&(n?e.residualClasses=s:e.residualStyles=s),i}(a,s,e,n),function(t,e,i,n,a,s){let o=s?e.classBindings:e.styleBindings,r=Hn(o),c=Xn(o);t[n]=i;let l,d=!1;if(Array.isArray(i)){const t=i;l=t[1],(null===l||mt(t,l)>0)&&(d=!0)}else l=i;if(a)if(0!==c){const e=Hn(t[r+1]);t[n+1]=$n(e,r),0!==e&&(t[e+1]=qn(t[e+1],n)),t[r+1]=131071&t[r+1]|n<<17}else t[n+1]=$n(r,0),0!==r&&(t[r+1]=qn(t[r+1],n)),r=n;else t[n+1]=$n(c,0),0===r?r=n:t[c+1]=qn(t[c+1],n),c=n;d&&(t[n+1]=Gn(t[n+1])),Po(t,l,n,!0),Po(t,l,n,!1),function(t,e,i,n,a){const s=a?t.residualClasses:t.residualStyles;null!=s&&"string"==typeof e&&mt(s,e)>=0&&(i[n+1]=Kn(i[n+1]))}(e,l,t,n,s),o=$n(r,c),s?e.classBindings=o:e.styleBindings=o}(a,s,e,i,o,n)}}function Uo(t,e,i,n,a){let s=null;const o=i.directiveEnd;let r=i.directiveStylingLast;for(-1===r?r=i.directiveStart:r++;r<o&&(s=e[r],n=$o(n,s.hostAttrs,a),s!==t);)r++;return null!==t&&(i.directiveStylingLast=r),n}function $o(t,e,i){const n=i?1:2;let a=-1;if(null!==e)for(let s=0;s<e.length;s++){const o=e[s];"number"==typeof o?a=o:a===n&&(Array.isArray(t)||(t=void 0===t?[]:["",t]),bt(t,o,!!i||e[++s]))}return void 0===t?null:t}function Ho(t,e,i,n,a,s,o,r){if(2!==e.type)return;const c=t.data,l=c[r+1];Xo(1==(1&l)?Go(c,e,i,a,Xn(l),o):void 0)||(Xo(s)||2==(2&l)&&(s=Go(c,null,i,a,r,o)),function(t,e,i,n,a){const s=Yt(t);if(e)a?s?t.addClass(i,n):i.classList.add(n):s?t.removeClass(i,n):i.classList.remove(n);else{const e=-1==n.indexOf("-")?void 0:2;null==a?s?t.removeStyle(i,n,e):i.style.removeProperty(n):s?t.setStyle(i,n,a,e):i.style.setProperty(n,a)}}(n,o,te(Fe(),i),a,s))}function Go(t,e,i,n,a,s){const o=null===e;let r=void 0;for(;a>0;){const e=t[a],s=Array.isArray(e),c=s?e[1]:e,l=null===c;let d=i[a+1];d===Fn&&(d=l?Io:void 0);let h=l?ft(d,n):c===n?d:void 0;if(s&&!Xo(h)&&(h=ft(e,n)),Xo(h)&&(r=h,o))return r;const u=t[a+1];a=o?Hn(u):Xn(u)}if(null!==e){let t=s?e.residualClasses:e.residualStyles;null!=t&&(r=ft(t,n))}return r}function Xo(t){return void 0!==t}function qo(t,e){return 0!=(t.flags&(e?16:32))}function Ko(t,e=""){const i=pe(),n=be(),a=t+20,s=n.firstCreatePass?ta(n,t,2,null,null):n.data[a],o=i[a]=function(t,e){return Yt(e)?e.createText(t):e.createTextNode(t)}(e,i[11]);Ka(n,i,o,s),ge(s,!1)}function Yo(t){return Jo("",t,""),Yo}function Jo(t,e,i){const n=pe(),a=Xs(n,t,e,i);return a!==Fn&&Fa(n,Fe(),a),Jo}function Zo(t,e,i,n,a){const s=pe(),o=qs(s,t,e,i,n,a);return o!==Fn&&Fa(s,Fe(),o),Zo}function tr(t,e,i,n,a,s,o){const r=pe(),c=Ks(r,t,e,i,n,a,s,o);return c!==Fn&&Fa(r,Fe(),c),tr}function er(t,e,i,n,a,s,o,r,c){const l=pe(),d=Ys(l,t,e,i,n,a,s,o,r,c);return d!==Fn&&Fa(l,Fe(),d),er}function ir(t,e,i,n,a,s,o,r,c,l,d){const h=pe(),u=Js(h,t,e,i,n,a,s,o,r,c,l,d);return u!==Fn&&Fa(h,Fe(),u),ir}function nr(t,e,i){No(bt,Lo,Xs(pe(),t,e,i),!0)}function ar(t,e,i,n,a,s,o,r,c,l,d){No(bt,Lo,Js(pe(),t,e,i,n,a,s,o,r,c,l,d),!0)}function sr(t,e,i){const n=pe();return Bs(n,De(),e)&&ua(be(),Qe(),n,t,e,n[11],i,!0),sr}function or(t,e,i){const n=pe();if(Bs(n,De(),e)){const a=be(),s=Qe();ua(a,s,n,t,e,Wa(Se(a.data),s,n),i,!0)}return or}const rr=void 0;var cr=["en",[["a","p"],["AM","PM"],rr],[["AM","PM"],rr,rr],[["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"]],rr,[["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"]],rr,[["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}",rr,"{1} 'at' {0}",rr],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(t){let e=Math.floor(Math.abs(t)),i=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===i?1:5}];let lr={};function dr(t,e,i){"string"!=typeof e&&(i=e,e=t[fr.LocaleId]),e=e.toLowerCase().replace(/_/g,"-"),lr[e]=t,i&&(lr[e][fr.ExtraData]=i)}function hr(t){const e=function(t){return t.toLowerCase().replace(/_/g,"-")}(t);let i=br(e);if(i)return i;const n=e.split("-")[0];if(i=br(n),i)return i;if("en"===n)return cr;throw new Error(`Missing locale data for the locale "${t}".`)}function ur(t){return hr(t)[fr.CurrencyCode]||null}function pr(t){return hr(t)[fr.PluralCase]}function br(t){return t in lr||(lr[t]=L.ng&&L.ng.common&&L.ng.common.locales&&L.ng.common.locales[t]),lr[t]}var fr=function(t){return t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData",t}({});let mr="en-US";function gr(t){var e,i;i="Expected localeId to be defined",null==(e=t)&&function(t,e,i,n){throw new Error("ASSERTION ERROR: "+t+` [Expected=> null != ${e} <=Actual]`)}(i,e),"string"==typeof t&&(mr=t.toLowerCase().replace(/_/g,"-"))}function vr(t,e,i,n,a){if(t=j(t),Array.isArray(t))for(let s=0;s<t.length;s++)vr(t[s],e,i,n,a);else{const s=be(),o=pe();let r=Ms(t)?t:j(t.provide),c=Os(t);const l=me(),d=1048575&l.providerIndexes,h=l.directiveStart,u=l.providerIndexes>>20;if(Ms(t)||!t.multi){const n=new qe(c,a,eo),p=xr(r,e,a?d:d+u,h);-1===p?(vi(bi(l,o),s,r),_r(s,t,e.length),e.push(r),l.directiveStart++,l.directiveEnd++,a&&(l.providerIndexes+=1048576),i.push(n),o.push(n)):(i[p]=n,o[p]=n)}else{const p=xr(r,e,d+u,h),b=xr(r,e,d,d+u),f=p>=0&&i[p],m=b>=0&&i[b];if(a&&!m||!a&&!f){vi(bi(l,o),s,r);const d=function(t,e,i,n,a){const s=new qe(t,i,eo);return s.multi=[],s.index=e,s.componentProviders=0,yr(s,a,n&&!i),s}(a?Or:Cr,i.length,a,n,c);!a&&m&&(i[b].providerFactory=d),_r(s,t,e.length,0),e.push(r),l.directiveStart++,l.directiveEnd++,a&&(l.providerIndexes+=1048576),i.push(d),o.push(d)}else _r(s,t,p>-1?p:b,yr(i[a?b:p],c,!a&&n));!a&&n&&m&&i[b].componentProviders++}}}function _r(t,e,i,n){const a=Ms(e);if(a||e.useClass){const s=(e.useClass||e).prototype.ngOnDestroy;if(s){const o=t.destroyHooks||(t.destroyHooks=[]);if(!a&&e.multi){const t=o.indexOf(i);-1===t?o.push(i,[n,s]):o[t+1].push(n,s)}else o.push(i,s)}}}function yr(t,e,i){return i&&t.componentProviders++,t.multi.push(e)-1}function xr(t,e,i,n){for(let a=i;a<n;a++)if(e[a]===t)return a;return-1}function Cr(t,e,i,n){return Dr(this.multi,[])}function Or(t,e,i,n){const a=this.multi;let s;if(this.providerFactory){const t=this.providerFactory.componentProviders,e=Oi(i,i[1],this.providerFactory.index,n);s=e.slice(0,t),Dr(a,s);for(let i=t;i<e.length;i++)s.push(e[i])}else s=[],Dr(a,s);return s}function Dr(t,e){for(let i=0;i<t.length;i++)e.push((0,t[i])());return e}function wr(t,e=[]){return i=>{i.providersResolver=(i,n)=>function(t,e,i){const n=be();if(n.firstCreatePass){const a=Qt(t);vr(i,n.data,n.blueprint,a,!0),vr(e,n.data,n.blueprint,a,!1)}}(i,n?n(t):t,e)}}class Mr{}class kr{resolveComponentFactory(t){throw function(t){const e=Error(`No component factory found for ${I(t)}. Did you add it to @NgModule.entryComponents?`);return e.ngComponent=t,e}(t)}}let Sr=(()=>{class t{}return t.NULL=new kr,t})(),Ir=(()=>{class t{constructor(t){this.nativeElement=t}}return t.__NG_ELEMENT_ID__=()=>Pr(t),t})();const Pr=function(t){return rs(t,me(),pe())};class Vr{}var Rr=function(t){return t[t.Important=1]="Important",t[t.DashCase=2]="DashCase",t}({});let jr=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>Ar(),t})();const Ar=function(){const t=pe(),e=ae(me().index,t);return function(t){const e=t[11];if(Yt(e))return e;throw new Error("Cannot inject Renderer2 when the application uses Renderer3!")}(Wt(e)?e:t)};let Wr=(()=>{class t{}return t.\u0275prov=_({token:t,providedIn:"root",factory:()=>null}),t})();class Tr{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const Er=new Tr("10.2.0");class Fr{constructor(){}supports(t){return Qs(t)}create(t){return new Qr(t)}}const Lr=(t,e)=>e;class Qr{constructor(t){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=t||Lr}forEachItem(t){let e;for(e=this._itHead;null!==e;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,i=this._removalsHead,n=0,a=null;for(;e||i;){const s=!i||e&&e.currentIndex<Ur(i,n,a)?e:i,o=Ur(s,n,a),r=s.currentIndex;if(s===i)n--,i=i._nextRemoved;else if(e=e._next,null==s.previousIndex)n++;else{a||(a=[]);const t=o-n,e=r-n;if(t!=e){for(let i=0;i<t;i++){const n=i<a.length?a[i]:a[i]=0,s=n+i;e<=s&&s<t&&(a[i]=n+1)}a[s.previousIndex]=e-t}}o!==r&&t(s,o,r)}}forEachPreviousItem(t){let e;for(e=this._previousItHead;null!==e;e=e._nextPrevious)t(e)}forEachAddedItem(t){let e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)}forEachMovedItem(t){let e;for(e=this._movesHead;null!==e;e=e._nextMoved)t(e)}forEachRemovedItem(t){let e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)}forEachIdentityChange(t){let e;for(e=this._identityChangesHead;null!==e;e=e._nextIdentityChange)t(e)}diff(t){if(null==t&&(t=[]),!Qs(t))throw new Error(`Error trying to diff '${I(t)}'. Only arrays and iterables are allowed`);return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let e,i,n,a=this._itHead,s=!1;if(Array.isArray(t)){this.length=t.length;for(let e=0;e<this.length;e++)i=t[e],n=this._trackByFn(e,i),null!==a&&Object.is(a.trackById,n)?(s&&(a=this._verifyReinsertion(a,i,n,e)),Object.is(a.item,i)||this._addIdentityChange(a,i)):(a=this._mismatch(a,i,n,e),s=!0),a=a._next}else e=0,function(t,e){if(Array.isArray(t))for(let i=0;i<t.length;i++)e(t[i]);else{const i=t[Fs()]();let n;for(;!(n=i.next()).done;)e(n.value)}}(t,t=>{n=this._trackByFn(e,t),null!==a&&Object.is(a.trackById,n)?(s&&(a=this._verifyReinsertion(a,t,n,e)),Object.is(a.item,t)||this._addIdentityChange(a,t)):(a=this._mismatch(a,t,n,e),s=!0),a=a._next,e++}),this.length=e;return this._truncate(a),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,e,i,n){let a;return null===t?a=this._itTail:(a=t._prev,this._remove(t)),null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(i,n))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,a,n)):null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,a,n)):t=this._addAfter(new Nr(e,i),a,n),t}_verifyReinsertion(t,e,i,n){let a=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==a?t=this._reinsertAfter(a,t._prev,n):t.currentIndex!=n&&(t.currentIndex=n,this._addToMoves(t,n)),t}_truncate(t){for(;null!==t;){const e=t._next;this._addToRemovals(this._unlink(t)),t=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(t,e,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const n=t._prevRemoved,a=t._nextRemoved;return null===n?this._removalsHead=a:n._nextRemoved=a,null===a?this._removalsTail=n:a._prevRemoved=n,this._insertAfter(t,e,i),this._addToMoves(t,i),t}_moveAfter(t,e,i){return this._unlink(t),this._insertAfter(t,e,i),this._addToMoves(t,i),t}_addAfter(t,e,i){return this._insertAfter(t,e,i),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,e,i){const n=null===e?this._itHead:e._next;return t._next=n,t._prev=e,null===n?this._itTail=t:n._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new Br),this._linkedRecords.put(t),t.currentIndex=i,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const e=t._prev,i=t._next;return null===e?this._itHead=i:e._next=i,null===i?this._itTail=e:i._prev=e,t}_addToMoves(t,e){return t.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new Br),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,e){return t.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}}class Nr{constructor(t,e){this.item=t,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 zr{constructor(){this._head=null,this._tail=null}add(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,e){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===e||e<=i.currentIndex)&&Object.is(i.trackById,t))return i;return null}remove(t){const e=t._prevDup,i=t._nextDup;return null===e?this._head=i:e._nextDup=i,null===i?this._tail=e:i._prevDup=e,null===this._head}}class Br{constructor(){this.map=new Map}put(t){const e=t.trackById;let i=this.map.get(e);i||(i=new zr,this.map.set(e,i)),i.add(t)}get(t,e){const i=this.map.get(t);return i?i.get(t,e):null}remove(t){const e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function Ur(t,e,i){const n=t.previousIndex;if(null===n)return n;let a=0;return i&&n<i.length&&(a=i[n]),n+e+a}class $r{constructor(){}supports(t){return t instanceof Map||Ns(t)}create(){return new Hr}}class Hr{constructor(){this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}get isDirty(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead}forEachItem(t){let e;for(e=this._mapHead;null!==e;e=e._next)t(e)}forEachPreviousItem(t){let e;for(e=this._previousMapHead;null!==e;e=e._nextPrevious)t(e)}forEachChangedItem(t){let e;for(e=this._changesHead;null!==e;e=e._nextChanged)t(e)}forEachAddedItem(t){let e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)}forEachRemovedItem(t){let e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)}diff(t){if(t){if(!(t instanceof Map||Ns(t)))throw new Error(`Error trying to diff '${I(t)}'. Only maps and objects are allowed`)}else t=new Map;return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let e=this._mapHead;if(this._appendAfter=null,this._forEach(t,(t,i)=>{if(e&&e.key===i)this._maybeAddToChanges(e,t),this._appendAfter=e,e=e._next;else{const n=this._getOrCreateRecordForKey(i,t);e=this._insertBeforeOrAppend(e,n)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let t=e;null!==t;t=t._nextRemoved)t===this._mapHead&&(this._mapHead=null),this._records.delete(t.key),t._nextRemoved=t._next,t.previousValue=t.currentValue,t.currentValue=null,t._prev=null,t._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,e){if(t){const i=t._prev;return e._next=t,e._prev=i,t._prev=e,i&&(i._next=e),t===this._mapHead&&(this._mapHead=e),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(t,e){if(this._records.has(t)){const i=this._records.get(t);this._maybeAddToChanges(i,e);const n=i._prev,a=i._next;return n&&(n._next=a),a&&(a._prev=n),i._next=null,i._prev=null,i}const i=new Gr(t);return this._records.set(t,i),i.currentValue=e,this._addToAdditions(i),i}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,e){Object.is(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))}_addToAdditions(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(i=>e(t[i],i))}}class Gr{constructor(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}let Xr=(()=>{class t{constructor(t){this.factories=t}static create(e,i){if(null!=i){const t=i.factories.slice();e=e.concat(t)}return new t(e)}static extend(e){return{provide:t,useFactory:i=>{if(!i)throw new Error("Cannot extend IterableDiffers without a parent injector");return t.create(e,i)},deps:[[t,new f,new p]]}}find(t){const e=this.factories.find(e=>e.supports(t));if(null!=e)return e;throw new Error(`Cannot find a differ supporting object '${t}' of type '${i=t,i.name||typeof i}'`);var i}}return t.\u0275prov=_({token:t,providedIn:"root",factory:()=>new t([new Fr])}),t})(),qr=(()=>{class t{constructor(t){this.factories=t}static create(e,i){if(i){const t=i.factories.slice();e=e.concat(t)}return new t(e)}static extend(e){return{provide:t,useFactory:i=>{if(!i)throw new Error("Cannot extend KeyValueDiffers without a parent injector");return t.create(e,i)},deps:[[t,new f,new p]]}}find(t){const e=this.factories.find(e=>e.supports(t));if(e)return e;throw new Error(`Cannot find a differ supporting object '${t}'`)}}return t.\u0275prov=_({token:t,providedIn:"root",factory:()=>new t([new $r])}),t})();const Kr=[new $r],Yr=new Xr([new Fr]),Jr=new qr(Kr);let Zr=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>tc(t,Ir),t})();const tc=function(t,e){return cs(t,e,me(),pe())};let ec=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>ic(t,Ir),t})();const ic=function(t,e){return ls(t,e,me(),pe())},nc={};class ac extends Sr{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=Rt(t);return new rc(e,this.ngModule)}}function sc(t){const e=[];for(let i in t)t.hasOwnProperty(i)&&e.push({propName:t[i],templateName:i});return e}const oc=new G("SCHEDULER_TOKEN",{providedIn:"root",factory:()=>oi});class rc extends Mr{constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=t.selectors.map(En).join(","),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}get inputs(){return sc(this.componentDef.inputs)}get outputs(){return sc(this.componentDef.outputs)}create(t,e,i,n){const a=(n=n||this.ngModule)?function(t,e){return{get:(i,n,a)=>{const s=t.get(i,nc,a);return s!==nc||n===nc?s:e.get(i,n,a)}}}(t,n.injector):t,s=a.get(Vr,Jt),o=a.get(Wr,null),r=s.createRenderer(null,this.componentDef),c=this.componentDef.selectors[0][0]||"div",l=i?function(t,e,i){if(Yt(t))return t.selectRootElement(e,i===vt.ShadowDom);let n="string"==typeof e?t.querySelector(e):e;return n.textContent="",n}(r,i,this.componentDef.encapsulation):Jn(c,s.createRenderer(null,this.componentDef),function(t){const e=t.toLowerCase();return"svg"===e?"http://www.w3.org/2000/svg":"math"===e?"http://www.w3.org/1998/MathML/":null}(c)),d=this.componentDef.onPush?576:528,h={components:[],scheduler:oi,clean:ja,playerHandler:null,flags:0},u=la(0,null,null,1,0,null,null,null,null,null),p=Zn(null,u,h,d,null,null,s,r,o,a);let b,f;Re(p);try{const t=function(t,e,i,n,a,s){const o=i[1];i[20]=t;const r=ta(o,0,2,null,null),c=r.mergedAttrs=e.hostAttrs;null!==c&&(Ps(r,c,!0),null!==t&&(Ke(a,t,c),null!==r.classes&&es(a,t,r.classes),null!==r.styles&&ts(a,t,r.styles)));const l=n.createRenderer(t,e),d=Zn(i,ca(e),null,e.onPush?64:16,i[20],r,n,l,null,null);return o.firstCreatePass&&(vi(bi(r,i),o,e.type),va(o,r),ya(r,i.length,1)),Sa(i,d),i[20]=d}(l,this.componentDef,p,s,r);if(l)if(i)Ke(r,l,["ng-version",Er.full]);else{const{attrs:t,classes:e}=function(t){const e=[],i=[];let n=1,a=2;for(;n<t.length;){let s=t[n];if("string"==typeof s)2===a?""!==s&&e.push(s,t[++n]):8===a&&i.push(s);else{if(!Rn(a))break;a=s}n++}return{attrs:e,classes:i}}(this.componentDef.selectors[0]);t&&Ke(r,l,t),e&&e.length>0&&es(r,l,e.join(" "))}if(f=ie(u,0),void 0!==e){const t=f.projection=[];for(let i=0;i<this.ngContentSelectors.length;i++){const n=e[i];t.push(null!=n?Array.from(n):null)}}b=function(t,e,i,n,a){const s=i[1],o=function(t,e,i){const n=me();t.firstCreatePass&&(i.providersResolver&&i.providersResolver(i),ga(t,n,1),xa(t,e,i));const a=Oi(e,t,e.length-1,n);Mn(a,e);const s=ee(n,e);return s&&Mn(s,e),a}(s,i,e);n.components.push(o),t[8]=o,a&&a.forEach(t=>t(o,e)),e.contentQueries&&e.contentQueries(1,o,i.length-1);const r=me();if(s.firstCreatePass&&(null!==e.hostBindings||null!==e.hostAttrs)){Le(r.index-20);const t=i[1];ba(t,e),fa(t,i,e.hostVars),ma(e,o)}return o}(t,this.componentDef,p,h,[Vs]),ea(u,p,null)}finally{Ee()}return new cc(this.componentType,b,rs(Ir,f,p),p,f)}}class cc extends class{}{constructor(t,e,i,n,a){super(),this.location=i,this._rootLView=n,this._tNode=a,this.destroyCbs=[],this.instance=e,this.hostView=this.changeDetectorRef=new ns(n),this.componentType=t}get injector(){return new Mi(this._tNode,this._rootLView)}destroy(){this.destroyCbs&&(this.destroyCbs.forEach(t=>t()),this.destroyCbs=null,!this.hostView.destroyed&&this.hostView.destroy())}onDestroy(t){this.destroyCbs&&this.destroyCbs.push(t)}}const lc=new Map;class dc extends ct{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.injector=this,this.destroyCbs=[],this.componentFactoryResolver=new ac(this);const i=At(t),n=t[U]||null;n&&gr(n),this._bootstrapComponents=di(i.bootstrap),this._r3Injector=ys(t,e,[{provide:ct,useValue:this},{provide:Sr,useValue:this.componentFactoryResolver}],I(t)),this._r3Injector._resolveInjectorDefTypes(),this.instance=this.get(t)}get(t,e=Ss.THROW_IF_NOT_FOUND,i=m.Default){return t===Ss||t===ct||t===X?this:this._r3Injector.get(t,e,i)}destroy(){const t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}}class hc extends lt{constructor(t){super(),this.moduleType=t,null!==At(t)&&function t(e){if(null!==e.\u0275mod.id){const t=e.\u0275mod.id;(function(t,e,i){if(e&&e!==i)throw new Error(`Duplicate module registered for ${t} - ${I(e)} vs ${I(e.name)}`)})(t,lc.get(t),e),lc.set(t,e)}let i=e.\u0275mod.imports;i instanceof Function&&(i=i()),i&&i.forEach(e=>t(e))}(t)}create(t){return new dc(this.moduleType,t)}}function uc(t,e,i){const n=Ce()+t,a=pe();return a[n]===Fn?zs(a,n,i?e.call(i):e()):function(t,e){return t[e]}(a,n)}function pc(t,e,i,n){return gc(pe(),Ce(),t,e,i,n)}function bc(t,e,i,n,a){return vc(pe(),Ce(),t,e,i,n,a)}function fc(t,e,i,n,a,s){return _c(pe(),Ce(),t,e,i,n,a,s)}function mc(t,e){const i=t[e];return i===Fn?void 0:i}function gc(t,e,i,n,a,s){const o=e+i;return Bs(t,o,a)?zs(t,o+1,s?n.call(s,a):n(a)):mc(t,o+1)}function vc(t,e,i,n,a,s,o){const r=e+i;return Us(t,r,a,s)?zs(t,r+2,o?n.call(o,a,s):n(a,s)):mc(t,r+2)}function _c(t,e,i,n,a,s,o,r){const c=e+i;return $s(t,c,a,s,o)?zs(t,c+3,r?n.call(r,a,s,o):n(a,s,o)):mc(t,c+3)}function yc(t,e){const i=be();let n;const a=t+20;i.firstCreatePass?(n=function(t,e){if(e)for(let i=e.length-1;i>=0;i--){const n=e[i];if(t===n.name)return n}throw new Error(`The pipe '${t}' could not be found!`)}(e,i.pipeRegistry),i.data[a]=n,n.onDestroy&&(i.destroyHooks||(i.destroyHooks=[])).push(a,n.onDestroy)):n=i.data[a];const s=n.factory||(n.factory=jt(n.type)),o=et(eo);try{const e=ui(!1),n=s();return ui(e),function(t,e,i,n){const a=i+20;a>=t.data.length&&(t.data[a]=null,t.blueprint[a]=null),e[a]=n}(i,pe(),t,n),n}finally{et(o)}}function xc(t,e,i){const n=pe(),a=ne(n,t);return wc(n,Dc(n,t)?gc(n,Ce(),e,a.transform,i,a):a.transform(i))}function Cc(t,e,i,n){const a=pe(),s=ne(a,t);return wc(a,Dc(a,t)?vc(a,Ce(),e,s.transform,i,n,s):s.transform(i,n))}function Oc(t,e,i,n,a){const s=pe(),o=ne(s,t);return wc(s,Dc(s,t)?_c(s,Ce(),e,o.transform,i,n,a,o):o.transform(i,n,a))}function Dc(t,e){return t[1].data[e+20].pure}function wc(t,e){return Ls.isWrapped(e)&&(e=Ls.unwrap(e),t[Oe()]=Fn),e}const Mc=class extends n.a{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,e,i){let n,s=t=>null,o=()=>null;t&&"object"==typeof t?(n=this.__isAsync?e=>{setTimeout(()=>t.next(e))}:e=>{t.next(e)},t.error&&(s=this.__isAsync?e=>{setTimeout(()=>t.error(e))}:e=>{t.error(e)}),t.complete&&(o=this.__isAsync?()=>{setTimeout(()=>t.complete())}:()=>{t.complete()})):(n=this.__isAsync?e=>{setTimeout(()=>t(e))}:e=>{t(e)},e&&(s=this.__isAsync?t=>{setTimeout(()=>e(t))}:t=>{e(t)}),i&&(o=this.__isAsync?()=>{setTimeout(()=>i())}:()=>{i()}));const r=super.subscribe(n,s,o);return t instanceof a.a&&t.add(r),r}};function kc(){return this._results[Fs()]()}class Sc{constructor(){this.dirty=!0,this._results=[],this.changes=new Mc,this.length=0;const t=Fs(),e=Sc.prototype;e[t]||(e[t]=kc)}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,e){return this._results.reduce(t,e)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t){this._results=function t(e,i){void 0===i&&(i=e);for(let n=0;n<e.length;n++){let a=e[n];Array.isArray(a)?(i===e&&(i=e.slice(0,n)),t(a,i)):i!==e&&i.push(a)}return i}(t),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]}notifyOnChanges(){this.changes.emit(this)}setDirty(){this.dirty=!0}destroy(){this.changes.complete(),this.changes.unsubscribe()}}class Ic{constructor(t){this.queryList=t,this.matches=null}clone(){return new Ic(this.queryList)}setDirty(){this.queryList.setDirty()}}class Pc{constructor(t=[]){this.queries=t}createEmbeddedView(t){const e=t.queries;if(null!==e){const i=null!==t.contentQueries?t.contentQueries[0]:e.length,n=[];for(let t=0;t<i;t++){const i=e.getByIndex(t);n.push(this.queries[i.indexInDeclarationView].clone())}return new Pc(n)}return null}insertView(t){this.dirtyQueriesWithMatches(t)}detachView(t){this.dirtyQueriesWithMatches(t)}dirtyQueriesWithMatches(t){for(let e=0;e<this.queries.length;e++)null!==Gc(t,e).matches&&this.queries[e].setDirty()}}class Vc{constructor(t,e,i,n=null){this.predicate=t,this.descendants=e,this.isStatic=i,this.read=n}}class Rc{constructor(t=[]){this.queries=t}elementStart(t,e){for(let i=0;i<this.queries.length;i++)this.queries[i].elementStart(t,e)}elementEnd(t){for(let e=0;e<this.queries.length;e++)this.queries[e].elementEnd(t)}embeddedTView(t){let e=null;for(let i=0;i<this.length;i++){const n=null!==e?e.length:0,a=this.getByIndex(i).embeddedTView(t,n);a&&(a.indexInDeclarationView=i,null!==e?e.push(a):e=[a])}return null!==e?new Rc(e):null}template(t,e){for(let i=0;i<this.queries.length;i++)this.queries[i].template(t,e)}getByIndex(t){return this.queries[t]}get length(){return this.queries.length}track(t){this.queries.push(t)}}class jc{constructor(t,e=-1){this.metadata=t,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=e}elementStart(t,e){this.isApplyingToNode(e)&&this.matchTNode(t,e)}elementEnd(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}template(t,e){this.elementStart(t,e)}embeddedTView(t,e){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,e),new jc(this.metadata)):null}isApplyingToNode(t){if(this._appliesToNextNode&&!1===this.metadata.descendants){const e=this._declarationNodeIndex;let i=t.parent;for(;null!==i&&3===i.type&&i.index!==e;)i=i.parent;return e===(null!==i?i.index:-1)}return this._appliesToNextNode}matchTNode(t,e){const i=this.metadata.predicate;if(Array.isArray(i))for(let n=0;n<i.length;n++){const a=i[n];this.matchTNodeWithReadOption(t,e,Ac(e,a)),this.matchTNodeWithReadOption(t,e,Ci(e,t,a,!1,!1))}else i===Zr?0===e.type&&this.matchTNodeWithReadOption(t,e,-1):this.matchTNodeWithReadOption(t,e,Ci(e,t,i,!1,!1))}matchTNodeWithReadOption(t,e,i){if(null!==i){const n=this.metadata.read;if(null!==n)if(n===Ir||n===ec||n===Zr&&0===e.type)this.addMatch(e.index,-2);else{const i=Ci(e,t,n,!1,!1);null!==i&&this.addMatch(e.index,i)}else this.addMatch(e.index,i)}}addMatch(t,e){null===this.matches?this.matches=[t,e]:this.matches.push(t,e)}}function Ac(t,e){const i=t.localNames;if(null!==i)for(let n=0;n<i.length;n+=2)if(i[n]===e)return i[n+1];return null}function Wc(t,e,i,n){return-1===i?function(t,e){return 2===t.type||3===t.type?rs(Ir,t,e):0===t.type?cs(Zr,Ir,t,e):null}(e,t):-2===i?function(t,e,i){return i===Ir?rs(Ir,e,t):i===Zr?cs(Zr,Ir,e,t):i===ec?ls(ec,Ir,e,t):void 0}(t,e,n):Oi(t,t[1],i,e)}function Tc(t,e,i,n){const a=e[19].queries[n];if(null===a.matches){const n=t.data,s=i.matches,o=[];for(let t=0;t<s.length;t+=2){const a=s[t];o.push(a<0?null:Wc(e,n[a],s[t+1],i.metadata.read))}a.matches=o}return a.matches}function Ec(t){const e=pe(),i=be(),n=Ie();Pe(n+1);const a=Gc(i,n);if(t.dirty&&oe(e)===a.metadata.isStatic){if(null===a.matches)t.reset([]);else{const s=a.crossesNgTemplate?function t(e,i,n,a){const s=e.queries.getByIndex(n),o=s.matches;if(null!==o){const r=Tc(e,i,s,n);for(let e=0;e<o.length;e+=2){const n=o[e];if(n>0)a.push(r[e/2]);else{const s=o[e+1],r=i[-n];for(let e=10;e<r.length;e++){const i=r[e];i[17]===i[3]&&t(i[1],i,s,a)}if(null!==r[9]){const e=r[9];for(let i=0;i<e.length;i++){const n=e[i];t(n[1],n,s,a)}}}}}return a}(i,e,n,[]):Tc(i,e,a,n);t.reset(s),t.notifyOnChanges()}return!0}return!1}function Fc(t,e,i){Qc(be(),pe(),t,e,i,!0)}function Lc(t,e,i){Qc(be(),pe(),t,e,i,!1)}function Qc(t,e,i,n,a,s){t.firstCreatePass&&(Hc(t,new Vc(i,n,s,a),-1),s&&(t.staticViewQueries=!0)),$c(t,e)}function Nc(t,e,i,n){Bc(be(),pe(),e,i,n,!1,me(),t)}function zc(t,e,i,n){Bc(be(),pe(),e,i,n,!0,me(),t)}function Bc(t,e,i,n,a,s,o,r){t.firstCreatePass&&(Hc(t,new Vc(i,n,s,a),o.index),function(t,e){const i=t.contentQueries||(t.contentQueries=[]);e!==(t.contentQueries.length?i[i.length-1]:-1)&&i.push(t.queries.length-1,e)}(t,r),s&&(t.staticContentQueries=!0)),$c(t,e)}function Uc(){return t=pe(),e=Ie(),t[19].queries[e].queryList;var t,e}function $c(t,e){const i=new Sc;da(t,e,i,i.destroy),null===e[19]&&(e[19]=new Pc),e[19].queries.push(new Ic(i))}function Hc(t,e,i){null===t.queries&&(t.queries=new Rc),t.queries.track(new jc(e,i))}function Gc(t,e){return t.queries.getByIndex(e)}function Xc(t,e){return cs(Zr,Ir,t,e)}function qc(t=m.Default){const e=ds(!0);if(null!=e||t&m.Optional)return e;throw new Error("No provider for ChangeDetectorRef!")}const Kc=h("Input",t=>({bindingPropertyName:t})),Yc=h("Output",t=>({bindingPropertyName:t})),Jc=new G("Application Initializer");let Zc=(()=>{class t{constructor(t){this.appInits=t,this.initialized=!1,this.done=!1,this.donePromise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}runInitializers(){if(this.initialized)return;const t=[],e=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let i=0;i<this.appInits.length;i++){const e=this.appInits[i]();po(e)&&t.push(e)}Promise.all(t).then(()=>{e()}).catch(t=>{this.reject(t)}),0===t.length&&e(),this.initialized=!0}}return t.\u0275fac=function(e){return new(e||t)(nt(Jc,8))},t.\u0275prov=_({token:t,factory:t.\u0275fac}),t})();const tl=new G("AppId"),el={provide:tl,useFactory:function(){return`${il()}${il()}${il()}`},deps:[]};function il(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const nl=new G("Platform Initializer"),al=new G("Platform ID"),sl=new G("appBootstrapListener");let ol=(()=>{class t{log(t){console.log(t)}warn(t){console.warn(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=_({token:t,factory:t.\u0275fac}),t})();const rl=new G("LocaleId"),cl=new G("DefaultCurrencyCode");class ll{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}const dl=function(t){return new hc(t)},hl=dl,ul=function(t){return Promise.resolve(dl(t))},pl=function(t){const e=dl(t),i=di(At(t).declarations).reduce((t,e)=>{const i=Rt(e);return i&&t.push(new rc(i)),t},[]);return new ll(e,i)},bl=pl,fl=function(t){return Promise.resolve(pl(t))};let ml=(()=>{class t{constructor(){this.compileModuleSync=hl,this.compileModuleAsync=ul,this.compileModuleAndAllComponentsSync=bl,this.compileModuleAndAllComponentsAsync=fl}clearCache(){}clearCacheFor(t){}getModuleId(t){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=_({token:t,factory:t.\u0275fac}),t})();const gl=(()=>Promise.resolve(0))();function vl(t){"undefined"==typeof Zone?gl.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class _l{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Mc(!1),this.onMicrotaskEmpty=new Mc(!1),this.onStable=new Mc(!1),this.onError=new Mc(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched(),this._nesting=0,this._outer=this._inner=Zone.current,Zone.wtfZoneSpec&&(this._inner=this._inner.fork(Zone.wtfZoneSpec)),Zone.TaskTrackingZoneSpec&&(this._inner=this._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(this._inner=this._inner.fork(Zone.longStackTraceZoneSpec)),this.shouldCoalesceEventChangeDetection=e,this.lastRequestAnimationFrameId=-1,this.nativeRequestAnimationFrame=function(){let t=L.requestAnimationFrame,e=L.cancelAnimationFrame;if("undefined"!=typeof Zone&&t&&e){const i=t[Zone.__symbol__("OriginalDelegate")];i&&(t=i);const n=e[Zone.__symbol__("OriginalDelegate")];n&&(e=n)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function(t){const e=!!t.shouldCoalesceEventChangeDetection&&t.nativeRequestAnimationFrame&&(()=>{!function(t){-1===t.lastRequestAnimationFrameId&&(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(L,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,Ol(t),Cl(t)},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),Ol(t))}(t)});t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0,maybeDelayChangeDetection:e},onInvokeTask:(i,n,a,s,o,r)=>{try{return Dl(t),i.invokeTask(a,s,o,r)}finally{e&&"eventTask"===s.type&&e(),wl(t)}},onInvoke:(e,i,n,a,s,o,r)=>{try{return Dl(t),e.invoke(n,a,s,o,r)}finally{wl(t)}},onHasTask:(e,i,n,a)=>{e.hasTask(n,a),i===n&&("microTask"==a.change?(t._hasPendingMicrotasks=a.microTask,Ol(t),Cl(t)):"macroTask"==a.change&&(t.hasPendingMacrotasks=a.macroTask))},onHandleError:(e,i,n,a)=>(e.handleError(n,a),t.runOutsideAngular(()=>t.onError.emit(a)),!1)})}(this)}static isInAngularZone(){return!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!_l.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(_l.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(t,e,i){return this._inner.run(t,e,i)}runTask(t,e,i,n){const a=this._inner,s=a.scheduleEventTask("NgZoneEvent: "+n,t,xl,yl,yl);try{return a.runTask(s,e,i)}finally{a.cancelTask(s)}}runGuarded(t,e,i){return this._inner.runGuarded(t,e,i)}runOutsideAngular(t){return this._outer.run(t)}}function yl(){}const xl={};function Cl(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 Ol(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||t.shouldCoalesceEventChangeDetection&&-1!==t.lastRequestAnimationFrameId)}function Dl(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function wl(t){t._nesting--,Cl(t)}class Ml{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Mc,this.onMicrotaskEmpty=new Mc,this.onStable=new Mc,this.onError=new Mc}run(t,e,i){return t.apply(e,i)}runGuarded(t,e,i){return t.apply(e,i)}runOutsideAngular(t){return t()}runTask(t,e,i,n){return t.apply(e,i)}}let kl=(()=>{class t{constructor(t){this._ngZone=t,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),t.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:()=>{_l.assertNotInAngularZone(),vl(()=>{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())vl(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(this._didWork)}this._didWork=!1});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(e=>!e.updateCb||!e.updateCb(t)||(clearTimeout(e.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,e,i){let n=-1;e&&e>0&&(n=setTimeout(()=>{this._callbacks=this._callbacks.filter(t=>t.timeoutId!==n),t(this._didWork,this.getPendingTasks())},e)),this._callbacks.push({doneCb:t,timeoutId:n,updateCb:i})}whenStable(t,e,i){if(i&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(t,e,i),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(t,e,i){return[]}}return t.\u0275fac=function(e){return new(e||t)(nt(_l))},t.\u0275prov=_({token:t,factory:t.\u0275fac}),t})(),Sl=(()=>{class t{constructor(){this._applications=new Map,Rl.addToWindow(this)}registerApplication(t,e){this._applications.set(t,e)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,e=!0){return Rl.findTestabilityInTree(this,t,e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=_({token:t,factory:t.\u0275fac}),t})();class Il{addToWindow(t){}findTestabilityInTree(t,e,i){return null}}function Pl(t){Rl=t}let Vl,Rl=new Il;const jl=new G("AllowMultipleToken");class Al{constructor(t,e){this.name=t,this.token=e}}function Wl(t,e,i=[]){const n="Platform: "+e,a=new G(n);return(e=[])=>{let s=Tl();if(!s||s.injector.get(jl,!1))if(t)t(i.concat(e).concat({provide:a,useValue:!0}));else{const t=i.concat(e).concat({provide:a,useValue:!0},{provide:bs,useValue:"platform"});!function(t){if(Vl&&!Vl.destroyed&&!Vl.injector.get(jl,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");Vl=t.get(El);const e=t.get(nl,null);e&&e.forEach(t=>t())}(Ss.create({providers:t,name:n}))}return function(t){const e=Tl();if(!e)throw new Error("No platform exists!");if(!e.injector.get(t,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return e}(a)}}function Tl(){return Vl&&!Vl.destroyed?Vl:null}let El=(()=>{class t{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,e){const i=function(t,e){let i;return i="noop"===t?new Ml:("zone.js"===t?void 0:t)||new _l({enableLongStackTrace:qi(),shouldCoalesceEventChangeDetection:e}),i}(e?e.ngZone:void 0,e&&e.ngZoneEventCoalescing||!1),n=[{provide:_l,useValue:i}];return i.run(()=>{const e=Ss.create({providers:n,parent:this.injector,name:t.moduleType.name}),a=t.create(e),s=a.injector.get(Ri,null);if(!s)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return a.onDestroy(()=>Ql(this._modules,a)),i.runOutsideAngular(()=>i.onError.subscribe({next:t=>{s.handleError(t)}})),function(t,e,i){try{const n=i();return po(n)?n.catch(i=>{throw e.runOutsideAngular(()=>t.handleError(i)),i}):n}catch(n){throw e.runOutsideAngular(()=>t.handleError(n)),n}}(s,i,()=>{const t=a.injector.get(Zc);return t.runInitializers(),t.donePromise.then(()=>(gr(a.injector.get(rl,"en-US")||"en-US"),this._moduleDoBootstrap(a),a))})})}bootstrapModule(t,e=[]){const i=Fl({},e);return function(t,e,i){const n=new hc(i);return Promise.resolve(n)}(0,0,t).then(t=>this.bootstrapModuleFactory(t,i))}_moduleDoBootstrap(t){const e=t.injector.get(Ll);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(t=>e.bootstrap(t));else{if(!t.instance.ngDoBootstrap)throw new Error(`The module ${I(t.instance.constructor)} was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.`);t.instance.ngDoBootstrap(e)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(t=>t.destroy()),this._destroyListeners.forEach(t=>t()),this._destroyed=!0}get destroyed(){return this._destroyed}}return t.\u0275fac=function(e){return new(e||t)(nt(Ss))},t.\u0275prov=_({token:t,factory:t.\u0275fac}),t})();function Fl(t,e){return Array.isArray(e)?e.reduce(Fl,t):Object.assign(Object.assign({},t),e)}let Ll=(()=>{class t{constructor(t,e,i,n,a,c){this._zone=t,this._console=e,this._injector=i,this._exceptionHandler=n,this._componentFactoryResolver=a,this._initStatus=c,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=qi(),this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const l=new s.a(t=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{t.next(this._stable),t.complete()})}),d=new s.a(t=>{let e;this._zone.runOutsideAngular(()=>{e=this._zone.onStable.subscribe(()=>{_l.assertNotInAngularZone(),vl(()=>{this._stable||this._zone.hasPendingMacrotasks||this._zone.hasPendingMicrotasks||(this._stable=!0,t.next(!0))})})});const i=this._zone.onUnstable.subscribe(()=>{_l.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{t.next(!1)}))});return()=>{e.unsubscribe(),i.unsubscribe()}});this.isStable=Object(o.a)(l,d.pipe(Object(r.a)()))}bootstrap(t,e){if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");let i;i=t instanceof Mr?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(i.componentType);const n=i.isBoundToModule?void 0:this._injector.get(ct),a=i.create(Ss.NULL,[],e||i.selector,n);a.onDestroy(()=>{this._unloadComponent(a)});const s=a.injector.get(kl,null);return s&&a.injector.get(Sl).registerApplication(a.location.nativeElement,s),this._loadComponent(a),qi()&&this._console.log("Angular is running in development mode. Call enableProdMode() to enable production mode."),a}tick(){if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;for(let t of this._views)t.detectChanges();if(this._enforceNoNewChanges)for(let t of this._views)t.checkNoChanges()}catch(t){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(t))}finally{this._runningTick=!1}}attachView(t){const e=t;this._views.push(e),e.attachToAppRef(this)}detachView(t){const e=t;Ql(this._views,e),e.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(sl,[]).concat(this._bootstrapListeners).forEach(e=>e(t))}_unloadComponent(t){this.detachView(t.hostView),Ql(this.components,t)}ngOnDestroy(){this._views.slice().forEach(t=>t.destroy())}get viewCount(){return this._views.length}}return t.\u0275fac=function(e){return new(e||t)(nt(_l),nt(ol),nt(Ss),nt(Ri),nt(Sr),nt(Zc))},t.\u0275prov=_({token:t,factory:t.\u0275fac}),t})();function Ql(t,e){const i=t.indexOf(e);i>-1&&t.splice(i,1)}class Nl{}class zl{}const Bl={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"};let Ul=(()=>{class t{constructor(t,e){this._compiler=t,this._config=e||Bl}load(t){return this.loadAndCompile(t)}loadAndCompile(t){let[e,n]=t.split("#");return void 0===n&&(n="default"),i("TCaw")(e).then(t=>t[n]).then(t=>$l(t,e,n)).then(t=>this._compiler.compileModuleAsync(t))}loadFactory(t){let[e,n]=t.split("#"),a="NgFactory";return void 0===n&&(n="default",a=""),i("TCaw")(this._config.factoryPathPrefix+e+this._config.factoryPathSuffix).then(t=>t[n+a]).then(t=>$l(t,e,n))}}return t.\u0275fac=function(e){return new(e||t)(nt(ml),nt(zl,8))},t.\u0275prov=_({token:t,factory:t.\u0275fac}),t})();function $l(t,e,i){if(!t)throw new Error(`Cannot find '${i}' in '${e}'`);return t}class Hl extends hs{}class Gl extends Hl{}const Xl=function(t){return null},ql=Wl(null,"core",[{provide:al,useValue:"unknown"},{provide:El,deps:[Ss]},{provide:Sl,deps:[]},{provide:ol,deps:[]}]),Kl=[{provide:Ll,useClass:Ll,deps:[_l,ol,Ss,Ri,Sr,Zc]},{provide:oc,deps:[_l],useFactory:function(t){let e=[];return t.onStable.subscribe(()=>{for(;e.length;)e.pop()()}),function(t){e.push(t)}}},{provide:Zc,useClass:Zc,deps:[[new p,Jc]]},{provide:ml,useClass:ml,deps:[]},el,{provide:Xr,useFactory:function(){return Yr},deps:[]},{provide:qr,useFactory:function(){return Jr},deps:[]},{provide:rl,useFactory:function(t){return gr(t=t||"undefined"!=typeof $localize&&$localize.locale||"en-US"),t},deps:[[new u(rl),new p,new f]]},{provide:cl,useValue:"USD"}];let Yl=(()=>{class t{constructor(t){}}return t.\u0275mod=kt({type:t}),t.\u0275inj=y({factory:function(e){return new(e||t)(nt(Ll))},providers:Kl}),t})()},g9mw:function(t,e){t.exports=function(){"use strict";function t(t){this.config=t=t||{},this.config.id=t.id||"id",this.config.parent=t.parent||"parent",this.config.children=t.children||"children",this.config.options=t.options||{deleteParent:!0}}function e(t,e,i){void 0===e[t]&&(e[t]=[]),e[t].push(i)}function i(t,e,i){var n;for(n=i.length,void 0===e[t]&&(e[t]=[]);n-- >0;)e[t].push(i.shift())}return t.prototype.convert=function(t){var n,a,s,o,r,c,l,d,h;for(n=0,o=[],s={},d={},a=t.length;n<a;n++)c=(h=t[n])[this.config.parent],s[r=h[this.config.id]]=h,null==c?o.push(h):(void 0!==s[c]?e(this.config.children,s[c],h):e(c,d,h),this.config.options.deleteParent&&delete h[this.config.parent]),void 0!==d[r]&&i(this.config.children,h,d[r]);return 1===o.length?l=o[0]:o.length>1?(l={})[this.config.children]=o:l={},l},t}()},gRHU:function(t,e,i){"use strict";i.d(e,"a",(function(){return s}));var n=i("2fFW"),a=i("NJ4a");const s={closed:!0,next(t){},error(t){if(n.a.useDeprecatedSynchronousErrorHandling)throw t;Object(a.a)(t)},complete(){}}},iadO:function(t,e,i){"use strict";i.d(e,"a",(function(){return ut})),i.d(e,"b",(function(){return $})),i.d(e,"c",(function(){return ht})),i.d(e,"d",(function(){return Lt})),i.d(e,"e",(function(){return Tt})),i.d(e,"f",(function(){return xt})),i.d(e,"g",(function(){return _t})),i.d(e,"h",(function(){return St})),i.d(e,"i",(function(){return Qt})),i.d(e,"j",(function(){return Pt})),i.d(e,"k",(function(){return It})),i.d(e,"l",(function(){return Wt})),i.d(e,"m",(function(){return st})),i.d(e,"n",(function(){return ot})),i.d(e,"o",(function(){return At})),i.d(e,"p",(function(){return dt}));var n=i("u47x"),a=i("rDax"),s=i("+rOU"),o=i("ofXK"),r=i("fXoL"),c=i("bTqV"),l=i("0IaG"),d=i("vxfF"),h=i("FKr1"),u=i("XNiG"),p=i("quSY"),b=i("VRyK"),f=i("LRne"),m=i("FtGj"),g=i("IzEk"),v=i("JX91"),_=i("pLZG"),y=i("8LU1"),x=i("R0Ic"),C=i("3Pt+"),O=i("kmnG"),D=i("qFsG"),w=i("cH1L");const M=["mat-calendar-body",""];function k(t,e){if(1&t&&(r.Wb(0,"tr",2),r.Wb(1,"td",3),r.Qc(2),r.Vb(),r.Vb()),2&t){const t=r.hc();r.Db(1),r.Lc("padding-top",t._cellPadding)("padding-bottom",t._cellPadding),r.Eb("colspan",t.numCols),r.Db(1),r.Sc(" ",t.label," ")}}function S(t,e){if(1&t&&(r.Wb(0,"td",7),r.Qc(1),r.Vb()),2&t){const t=r.hc(2);r.Lc("padding-top",t._cellPadding)("padding-bottom",t._cellPadding),r.Eb("colspan",t._firstRowOffset),r.Db(1),r.Sc(" ",t._firstRowOffset>=t.labelMinRequiredCells?t.label:""," ")}}function I(t,e){if(1&t){const t=r.Xb();r.Wb(0,"td",8),r.dc("click",(function(i){r.Dc(t);const n=e.$implicit;return r.hc(2)._cellClicked(n,i)})),r.Wb(1,"div",9),r.Qc(2),r.Vb(),r.Rb(3,"div",10),r.Vb()}if(2&t){const t=e.$implicit,i=e.index,n=r.hc().index,a=r.hc();r.Lc("width",a._cellWidth)("padding-top",a._cellPadding)("padding-bottom",a._cellPadding),r.Ib("mat-calendar-body-disabled",!t.enabled)("mat-calendar-body-active",a._isActiveCell(n,i))("mat-calendar-body-range-start",a._isRangeStart(t.compareValue))("mat-calendar-body-range-end",a._isRangeEnd(t.compareValue))("mat-calendar-body-in-range",a._isInRange(t.compareValue))("mat-calendar-body-comparison-bridge-start",a._isComparisonBridgeStart(t.compareValue,n,i))("mat-calendar-body-comparison-bridge-end",a._isComparisonBridgeEnd(t.compareValue,n,i))("mat-calendar-body-comparison-start",a._isComparisonStart(t.compareValue))("mat-calendar-body-comparison-end",a._isComparisonEnd(t.compareValue))("mat-calendar-body-in-comparison-range",a._isInComparisonRange(t.compareValue))("mat-calendar-body-preview-start",a._isPreviewStart(t.compareValue))("mat-calendar-body-preview-end",a._isPreviewEnd(t.compareValue))("mat-calendar-body-in-preview",a._isInPreview(t.compareValue)),r.oc("ngClass",t.cssClasses)("tabindex",a._isActiveCell(n,i)?0:-1),r.Eb("data-mat-row",n)("data-mat-col",i)("aria-label",t.ariaLabel)("aria-disabled",!t.enabled||null)("aria-selected",a._isSelected(t.compareValue)),r.Db(1),r.Ib("mat-calendar-body-selected",a._isSelected(t.compareValue))("mat-calendar-body-comparison-identical",a._isComparisonIdentical(t.compareValue))("mat-calendar-body-today",a.todayValue===t.compareValue),r.Db(1),r.Sc(" ",t.displayValue," ")}}function P(t,e){if(1&t&&(r.Wb(0,"tr",4),r.Oc(1,S,2,6,"td",5),r.Oc(2,I,4,46,"td",6),r.Vb()),2&t){const t=e.$implicit,i=e.index,n=r.hc();r.Db(1),r.oc("ngIf",0===i&&n._firstRowOffset),r.Db(1),r.oc("ngForOf",t)}}function V(t,e){if(1&t&&(r.Wb(0,"th",5),r.Qc(1),r.Vb()),2&t){const t=e.$implicit;r.Eb("aria-label",t.long),r.Db(1),r.Rc(t.narrow)}}const R=["*"];function j(t,e){}function A(t,e){if(1&t){const t=r.Xb();r.Wb(0,"mat-month-view",5),r.dc("activeDateChange",(function(e){return r.Dc(t),r.hc().activeDate=e}))("_userSelection",(function(e){return r.Dc(t),r.hc()._dateSelected(e)})),r.Vb()}if(2&t){const t=r.hc();r.oc("activeDate",t.activeDate)("selected",t.selected)("dateFilter",t.dateFilter)("maxDate",t.maxDate)("minDate",t.minDate)("dateClass",t.dateClass)("comparisonStart",t.comparisonStart)("comparisonEnd",t.comparisonEnd)}}function W(t,e){if(1&t){const t=r.Xb();r.Wb(0,"mat-year-view",6),r.dc("activeDateChange",(function(e){return r.Dc(t),r.hc().activeDate=e}))("monthSelected",(function(e){return r.Dc(t),r.hc()._monthSelectedInYearView(e)}))("selectedChange",(function(e){return r.Dc(t),r.hc()._goToDateInView(e,"month")})),r.Vb()}if(2&t){const t=r.hc();r.oc("activeDate",t.activeDate)("selected",t.selected)("dateFilter",t.dateFilter)("maxDate",t.maxDate)("minDate",t.minDate)("dateClass",t.dateClass)}}function T(t,e){if(1&t){const t=r.Xb();r.Wb(0,"mat-multi-year-view",7),r.dc("activeDateChange",(function(e){return r.Dc(t),r.hc().activeDate=e}))("yearSelected",(function(e){return r.Dc(t),r.hc()._yearSelectedInMultiYearView(e)}))("selectedChange",(function(e){return r.Dc(t),r.hc()._goToDateInView(e,"year")})),r.Vb()}if(2&t){const t=r.hc();r.oc("activeDate",t.activeDate)("selected",t.selected)("dateFilter",t.dateFilter)("maxDate",t.maxDate)("minDate",t.minDate)("dateClass",t.dateClass)}}const E=["button"];function F(t,e){1&t&&(r.gc(),r.Wb(0,"svg",3),r.Rb(1,"path",4),r.Vb())}const L=[[["","matDatepickerToggleIcon",""]]],Q=["[matDatepickerToggleIcon]"],N=[[["input","matStartDate",""]],[["input","matEndDate",""]]],z=["input[matStartDate]","input[matEndDate]"];let B=(()=>{class t{constructor(){this.changes=new u.a,this.calendarLabel="Calendar",this.openCalendarLabel="Open calendar",this.prevMonthLabel="Previous month",this.nextMonthLabel="Next month",this.prevYearLabel="Previous year",this.nextYearLabel="Next year",this.prevMultiYearLabel="Previous 20 years",this.nextMultiYearLabel="Next 20 years",this.switchToMonthViewLabel="Choose date",this.switchToMultiYearViewLabel="Choose month and year"}formatYearRange(t,e){return`${t} \u2013 ${e}`}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(r.Mb)({factory:function(){return new t},token:t,providedIn:"root"}),t})();class U{constructor(t,e,i,n,a={},s=t,o){this.value=t,this.displayValue=e,this.ariaLabel=i,this.enabled=n,this.cssClasses=a,this.compareValue=s,this.rawValue=o}}let $=(()=>{class t{constructor(t,e){this._elementRef=t,this._ngZone=e,this.numCols=7,this.activeCell=0,this.isRange=!1,this.cellAspectRatio=1,this.previewStart=null,this.previewEnd=null,this.selectedValueChange=new r.o,this.previewChange=new r.o,this._enterHandler=t=>{if(this._skipNextFocus&&"focus"===t.type)this._skipNextFocus=!1;else if(t.target&&this.isRange){const e=this._getCellFromElement(t.target);e&&this._ngZone.run(()=>this.previewChange.emit({value:e.enabled?e:null,event:t}))}},this._leaveHandler=t=>{null!==this.previewEnd&&this.isRange&&t.target&&H(t.target)&&this._ngZone.run(()=>this.previewChange.emit({value:null,event:t}))},e.runOutsideAngular(()=>{const e=t.nativeElement;e.addEventListener("mouseenter",this._enterHandler,!0),e.addEventListener("focus",this._enterHandler,!0),e.addEventListener("mouseleave",this._leaveHandler,!0),e.addEventListener("blur",this._leaveHandler,!0)})}_cellClicked(t,e){t.enabled&&this.selectedValueChange.emit({value:t.value,event:e})}_isSelected(t){return this.startValue===t||this.endValue===t}ngOnChanges(t){const e=t.numCols,{rows:i,numCols:n}=this;(t.rows||e)&&(this._firstRowOffset=i&&i.length&&i[0].length?n-i[0].length:0),(t.cellAspectRatio||e||!this._cellPadding)&&(this._cellPadding=50*this.cellAspectRatio/n+"%"),!e&&this._cellWidth||(this._cellWidth=100/n+"%")}ngOnDestroy(){const t=this._elementRef.nativeElement;t.removeEventListener("mouseenter",this._enterHandler,!0),t.removeEventListener("focus",this._enterHandler,!0),t.removeEventListener("mouseleave",this._leaveHandler,!0),t.removeEventListener("blur",this._leaveHandler,!0)}_isActiveCell(t,e){let i=t*this.numCols+e;return t&&(i-=this._firstRowOffset),i==this.activeCell}_focusActiveCell(t=!0){this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe(Object(g.a)(1)).subscribe(()=>{const e=this._elementRef.nativeElement.querySelector(".mat-calendar-body-active");e&&(t||(this._skipNextFocus=!0),e.focus())})})}_isRangeStart(t){return G(t,this.startValue,this.endValue)}_isRangeEnd(t){return X(t,this.startValue,this.endValue)}_isInRange(t){return q(t,this.startValue,this.endValue,this.isRange)}_isComparisonStart(t){return G(t,this.comparisonStart,this.comparisonEnd)}_isComparisonBridgeStart(t,e,i){if(!this._isComparisonStart(t)||this._isRangeStart(t)||!this._isInRange(t))return!1;let n=this.rows[e][i-1];if(!n){const t=this.rows[e-1];n=t&&t[t.length-1]}return n&&!this._isRangeEnd(n.compareValue)}_isComparisonBridgeEnd(t,e,i){if(!this._isComparisonEnd(t)||this._isRangeEnd(t)||!this._isInRange(t))return!1;let n=this.rows[e][i+1];if(!n){const t=this.rows[e+1];n=t&&t[0]}return n&&!this._isRangeStart(n.compareValue)}_isComparisonEnd(t){return X(t,this.comparisonStart,this.comparisonEnd)}_isInComparisonRange(t){return q(t,this.comparisonStart,this.comparisonEnd,this.isRange)}_isComparisonIdentical(t){return this.comparisonStart===this.comparisonEnd&&t===this.comparisonStart}_isPreviewStart(t){return G(t,this.previewStart,this.previewEnd)}_isPreviewEnd(t){return X(t,this.previewStart,this.previewEnd)}_isInPreview(t){return q(t,this.previewStart,this.previewEnd,this.isRange)}_getCellFromElement(t){let e;if(H(t)?e=t:H(t.parentNode)&&(e=t.parentNode),e){const t=e.getAttribute("data-mat-row"),i=e.getAttribute("data-mat-col");if(t&&i)return this.rows[parseInt(t)][parseInt(i)]}return null}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l),r.Qb(r.C))},t.\u0275cmp=r.Kb({type:t,selectors:[["","mat-calendar-body",""]],hostAttrs:["role","grid","aria-readonly","true",1,"mat-calendar-body"],inputs:{numCols:"numCols",activeCell:"activeCell",isRange:"isRange",cellAspectRatio:"cellAspectRatio",previewStart:"previewStart",previewEnd:"previewEnd",label:"label",rows:"rows",todayValue:"todayValue",startValue:"startValue",endValue:"endValue",labelMinRequiredCells:"labelMinRequiredCells",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},outputs:{selectedValueChange:"selectedValueChange",previewChange:"previewChange"},exportAs:["matCalendarBody"],features:[r.Bb],attrs:M,decls:2,vars:2,consts:[["aria-hidden","true",4,"ngIf"],["role","row",4,"ngFor","ngForOf"],["aria-hidden","true"],[1,"mat-calendar-body-label"],["role","row"],["aria-hidden","true","class","mat-calendar-body-label",3,"paddingTop","paddingBottom",4,"ngIf"],["role","gridcell","class","mat-calendar-body-cell",3,"ngClass","tabindex","mat-calendar-body-disabled","mat-calendar-body-active","mat-calendar-body-range-start","mat-calendar-body-range-end","mat-calendar-body-in-range","mat-calendar-body-comparison-bridge-start","mat-calendar-body-comparison-bridge-end","mat-calendar-body-comparison-start","mat-calendar-body-comparison-end","mat-calendar-body-in-comparison-range","mat-calendar-body-preview-start","mat-calendar-body-preview-end","mat-calendar-body-in-preview","width","paddingTop","paddingBottom","click",4,"ngFor","ngForOf"],["aria-hidden","true",1,"mat-calendar-body-label"],["role","gridcell",1,"mat-calendar-body-cell",3,"ngClass","tabindex","click"],[1,"mat-calendar-body-cell-content","mat-focus-indicator"],[1,"mat-calendar-body-cell-preview"]],template:function(t,e){1&t&&(r.Oc(0,k,3,6,"tr",0),r.Oc(1,P,3,2,"tr",1)),2&t&&(r.oc("ngIf",e._firstRowOffset<e.labelMinRequiredCells),r.Db(1),r.oc("ngForOf",e.rows))},directives:[o.t,o.s,o.q],styles:['.mat-calendar-body{min-width:224px}.mat-calendar-body-label{height:0;line-height:0;text-align:left;padding-left:4.7142857143%;padding-right:4.7142857143%}.mat-calendar-body-cell{position:relative;height:0;line-height:0;text-align:center;outline:none;cursor:pointer}.mat-calendar-body-cell::before,.mat-calendar-body-cell::after,.mat-calendar-body-cell-preview{content:"";position:absolute;top:5%;left:0;z-index:0;box-sizing:border-box;height:90%;width:100%}.mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-start::after,.mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,.mat-calendar-body-comparison-start::after,.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:5%;width:95%;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,[dir=rtl] .mat-calendar-body-comparison-start::after,[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:0;border-radius:0;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,.mat-calendar-body-comparison-end::after,.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}[dir=rtl] .mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,[dir=rtl] .mat-calendar-body-comparison-end::after,[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{left:5%;border-radius:0;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-comparison-bridge-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-bridge-end.mat-calendar-body-range-start::after{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end.mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-end.mat-calendar-body-range-start::after{width:90%}.mat-calendar-body-in-preview .mat-calendar-body-cell-preview{border-top:dashed 1px;border-bottom:dashed 1px}.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:dashed 1px}[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:0;border-right:dashed 1px}.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:dashed 1px}[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:0;border-left:dashed 1px}.mat-calendar-body-disabled{cursor:default}.mat-calendar-body-cell-content{top:5%;left:5%;z-index:1;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;line-height:1;border-width:1px;border-style:solid;border-radius:999px}.mat-calendar-body-cell-content.mat-focus-indicator{position:absolute}.cdk-high-contrast-active .mat-calendar-body-cell-content{border:none}.cdk-high-contrast-active .mat-datepicker-popup:not(:empty),.cdk-high-contrast-active .mat-calendar-body-selected{outline:solid 1px}.cdk-high-contrast-active .mat-calendar-body-today{outline:dotted 1px}.cdk-high-contrast-active .cdk-keyboard-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected),.cdk-high-contrast-active .cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){outline:dotted 2px}[dir=rtl] .mat-calendar-body-label{text-align:right}@media(hover: none){.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){background-color:transparent}}\n'],encapsulation:2,changeDetection:0}),t})();function H(t){return"TD"===t.nodeName}function G(t,e,i){return null!==i&&e!==i&&t<i&&t===e}function X(t,e,i){return null!==e&&e!==i&&t>=e&&t===i}function q(t,e,i,n){return n&&null!==e&&null!==i&&e!==i&&t>=e&&t<=i}class K{constructor(t,e){this.start=t,this.end=e}}let Y=(()=>{class t{constructor(t,e){this.selection=t,this._adapter=e,this._selectionChanged=new u.a,this.selectionChanged=this._selectionChanged,this.selection=t}updateSelection(t,e){this.selection=t,this._selectionChanged.next({selection:t,source:e})}ngOnDestroy(){this._selectionChanged.complete()}_isValidDateInstance(t){return this._adapter.isDateInstance(t)&&this._adapter.isValid(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(void 0),r.Qb(h.c))},t.\u0275dir=r.Lb({type:t}),t})(),J=(()=>{class t extends Y{constructor(t){super(null,t)}add(t){super.updateSelection(t,this)}isValid(){return null!=this.selection&&this._isValidDateInstance(this.selection)}isComplete(){return null!=this.selection}}return t.\u0275fac=function(e){return new(e||t)(r.ac(h.c))},t.\u0275prov=r.Mb({token:t,factory:t.\u0275fac}),t})(),Z=(()=>{class t extends Y{constructor(t){super(new K(null,null),t)}add(t){let{start:e,end:i}=this.selection;null==e?e=t:null==i?i=t:(e=t,i=null),super.updateSelection(new K(e,i),this)}isValid(){const{start:t,end:e}=this.selection;return null==t&&null==e||(null!=t&&null!=e?this._isValidDateInstance(t)&&this._isValidDateInstance(e)&&this._adapter.compareDate(t,e)<=0:(null==t||this._isValidDateInstance(t))&&(null==e||this._isValidDateInstance(e)))}isComplete(){return null!=this.selection.start&&null!=this.selection.end}}return t.\u0275fac=function(e){return new(e||t)(r.ac(h.c))},t.\u0275prov=r.Mb({token:t,factory:t.\u0275fac}),t})();const tt={provide:Y,deps:[[new r.D,new r.N,Y],h.c],useFactory:function(t,e){return t||new J(e)}},et={provide:Y,deps:[[new r.D,new r.N,Y],h.c],useFactory:function(t,e){return t||new Z(e)}},it=new r.s("MAT_DATE_RANGE_SELECTION_STRATEGY");let nt=(()=>{class t{constructor(t){this._dateAdapter=t}selectionFinished(t,e){let{start:i,end:n}=e;return null==i?i=t:null==n&&t&&this._dateAdapter.compareDate(t,i)>=0?n=t:(i=t,n=null),new K(i,n)}createPreview(t,e){let i=null,n=null;return e.start&&!e.end&&t&&(i=e.start,n=t),new K(i,n)}}return t.\u0275fac=function(e){return new(e||t)(r.ac(h.c))},t.\u0275prov=r.Mb({token:t,factory:t.\u0275fac}),t})();const at={provide:it,deps:[[new r.D,new r.N,it],h.c],useFactory:function(t,e){return t||new nt(e)}};let st=(()=>{class t{constructor(t,e,i,n,a){this._changeDetectorRef=t,this._dateFormats=e,this._dateAdapter=i,this._dir=n,this._rangeStrategy=a,this._rerenderSubscription=p.a.EMPTY,this.selectedChange=new r.o,this._userSelection=new r.o,this.activeDateChange=new r.o,this._activeDate=this._dateAdapter.today()}get activeDate(){return this._activeDate}set activeDate(t){const e=this._activeDate,i=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(i,this.minDate,this.maxDate),this._hasSameMonthAndYear(e,this._activeDate)||this._init()}get selected(){return this._selected}set selected(t){this._selected=t instanceof K?t:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t)),this._setRanges(this._selected)}get minDate(){return this._minDate}set minDate(t){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get maxDate(){return this._maxDate}set maxDate(t){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(Object(v.a)(null)).subscribe(()=>this._init())}ngOnChanges(t){const e=t.comparisonStart||t.comparisonEnd;e&&!e.firstChange&&this._setRanges(this.selected)}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_dateSelected(t){const e=t.value,i=this._dateAdapter.getYear(this.activeDate),n=this._dateAdapter.getMonth(this.activeDate),a=this._dateAdapter.createDate(i,n,e);let s,o;this._selected instanceof K?(s=this._getDateInCurrentMonth(this._selected.start),o=this._getDateInCurrentMonth(this._selected.end)):s=o=this._getDateInCurrentMonth(this._selected),s===e&&o===e||this.selectedChange.emit(a),this._userSelection.emit({value:a,event:t.event})}_handleCalendarBodyKeydown(t){const e=this._activeDate,i=this._isRtl();switch(t.keyCode){case m.k:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,i?1:-1);break;case m.o:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,i?-1:1);break;case m.s:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,-7);break;case m.e:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,7);break;case m.j:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,1-this._dateAdapter.getDate(this._activeDate));break;case m.f:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,this._dateAdapter.getNumDaysInMonth(this._activeDate)-this._dateAdapter.getDate(this._activeDate));break;case m.n:this.activeDate=t.altKey?this._dateAdapter.addCalendarYears(this._activeDate,-1):this._dateAdapter.addCalendarMonths(this._activeDate,-1);break;case m.m:this.activeDate=t.altKey?this._dateAdapter.addCalendarYears(this._activeDate,1):this._dateAdapter.addCalendarMonths(this._activeDate,1);break;case m.g:case m.q:return void(this.dateFilter&&!this.dateFilter(this._activeDate)||(this._dateSelected({value:this._dateAdapter.getDate(this._activeDate),event:t}),t.preventDefault()));case m.h:return void(null!=this._previewEnd&&(this._previewStart=this._previewEnd=null,this.selectedChange.emit(null),this._userSelection.emit({value:null,event:t}),t.preventDefault(),t.stopPropagation()));default:return}this._dateAdapter.compareDate(e,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),t.preventDefault()}_init(){this._setRanges(this.selected),this._todayDate=this._getCellCompareValue(this._dateAdapter.today()),this._monthLabel=this._dateAdapter.getMonthNames("short")[this._dateAdapter.getMonth(this.activeDate)].toLocaleUpperCase();let t=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),1);this._firstWeekOffset=(7+this._dateAdapter.getDayOfWeek(t)-this._dateAdapter.getFirstDayOfWeek())%7,this._initWeekdays(),this._createWeekCells(),this._changeDetectorRef.markForCheck()}_focusActiveCell(t){this._matCalendarBody._focusActiveCell(t)}_previewChanged({event:t,value:e}){if(this._rangeStrategy){const i=this._rangeStrategy.createPreview(e?e.rawValue:null,this.selected,t);this._previewStart=this._getCellCompareValue(i.start),this._previewEnd=this._getCellCompareValue(i.end),this._changeDetectorRef.detectChanges()}}_initWeekdays(){const t=this._dateAdapter.getFirstDayOfWeek(),e=this._dateAdapter.getDayOfWeekNames("narrow");let i=this._dateAdapter.getDayOfWeekNames("long").map((t,i)=>({long:t,narrow:e[i]}));this._weekdays=i.slice(t).concat(i.slice(0,t))}_createWeekCells(){const t=this._dateAdapter.getNumDaysInMonth(this.activeDate),e=this._dateAdapter.getDateNames();this._weeks=[[]];for(let i=0,n=this._firstWeekOffset;i<t;i++,n++){7==n&&(this._weeks.push([]),n=0);const t=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),i+1),a=this._shouldEnableDate(t),s=this._dateAdapter.format(t,this._dateFormats.display.dateA11yLabel),o=this.dateClass?this.dateClass(t,"month"):void 0;this._weeks[this._weeks.length-1].push(new U(i+1,e[i],s,a,o,this._getCellCompareValue(t),t))}}_shouldEnableDate(t){return!!t&&(!this.minDate||this._dateAdapter.compareDate(t,this.minDate)>=0)&&(!this.maxDate||this._dateAdapter.compareDate(t,this.maxDate)<=0)&&(!this.dateFilter||this.dateFilter(t))}_getDateInCurrentMonth(t){return t&&this._hasSameMonthAndYear(t,this.activeDate)?this._dateAdapter.getDate(t):null}_hasSameMonthAndYear(t,e){return!(!t||!e||this._dateAdapter.getMonth(t)!=this._dateAdapter.getMonth(e)||this._dateAdapter.getYear(t)!=this._dateAdapter.getYear(e))}_getCellCompareValue(t){if(t){const e=this._dateAdapter.getYear(t),i=this._dateAdapter.getMonth(t),n=this._dateAdapter.getDate(t);return new Date(e,i,n).getTime()}return null}_isRtl(){return this._dir&&"rtl"===this._dir.value}_setRanges(t){t instanceof K?(this._rangeStart=this._getCellCompareValue(t.start),this._rangeEnd=this._getCellCompareValue(t.end),this._isRange=!0):(this._rangeStart=this._rangeEnd=this._getCellCompareValue(t),this._isRange=!1),this._comparisonRangeStart=this._getCellCompareValue(this.comparisonStart),this._comparisonRangeEnd=this._getCellCompareValue(this.comparisonEnd)}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.h),r.Qb(h.e,8),r.Qb(h.c,8),r.Qb(w.c,8),r.Qb(it,8))},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-month-view"]],viewQuery:function(t,e){var i;1&t&&r.Xc($,!0),2&t&&r.yc(i=r.ec())&&(e._matCalendarBody=i.first)},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},outputs:{selectedChange:"selectedChange",_userSelection:"_userSelection",activeDateChange:"activeDateChange"},exportAs:["matMonthView"],features:[r.Bb],decls:7,vars:13,consts:[["role","presentation",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["scope","col",4,"ngFor","ngForOf"],["colspan","7","aria-hidden","true",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"label","rows","todayValue","startValue","endValue","comparisonStart","comparisonEnd","previewStart","previewEnd","isRange","labelMinRequiredCells","activeCell","selectedValueChange","previewChange","keydown"],["scope","col"]],template:function(t,e){1&t&&(r.Wb(0,"table",0),r.Wb(1,"thead",1),r.Wb(2,"tr"),r.Oc(3,V,2,2,"th",2),r.Vb(),r.Wb(4,"tr"),r.Rb(5,"th",3),r.Vb(),r.Vb(),r.Wb(6,"tbody",4),r.dc("selectedValueChange",(function(t){return e._dateSelected(t)}))("previewChange",(function(t){return e._previewChanged(t)}))("keydown",(function(t){return e._handleCalendarBodyKeydown(t)})),r.Vb(),r.Vb()),2&t&&(r.Db(3),r.oc("ngForOf",e._weekdays),r.Db(3),r.oc("label",e._monthLabel)("rows",e._weeks)("todayValue",e._todayDate)("startValue",e._rangeStart)("endValue",e._rangeEnd)("comparisonStart",e._comparisonRangeStart)("comparisonEnd",e._comparisonRangeEnd)("previewStart",e._previewStart)("previewEnd",e._previewEnd)("isRange",e._isRange)("labelMinRequiredCells",3)("activeCell",e._dateAdapter.getDate(e.activeDate)-1))},directives:[o.s,$],encapsulation:2,changeDetection:0}),t})(),ot=(()=>{class t{constructor(t,e,i){this._changeDetectorRef=t,this._dateAdapter=e,this._dir=i,this._rerenderSubscription=p.a.EMPTY,this.selectedChange=new r.o,this.yearSelected=new r.o,this.activeDateChange=new r.o,this._activeDate=this._dateAdapter.today()}get activeDate(){return this._activeDate}set activeDate(t){let e=this._activeDate;const i=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(i,this.minDate,this.maxDate),rt(this._dateAdapter,e,this._activeDate,this.minDate,this.maxDate)||this._init()}get selected(){return this._selected}set selected(t){this._selected=t instanceof K?t:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t)),this._setSelectedYear(t)}get minDate(){return this._minDate}set minDate(t){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get maxDate(){return this._maxDate}set maxDate(t){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(Object(v.a)(null)).subscribe(()=>this._init())}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_init(){this._todayYear=this._dateAdapter.getYear(this._dateAdapter.today());const t=this._dateAdapter.getYear(this._activeDate)-ct(this._dateAdapter,this.activeDate,this.minDate,this.maxDate);this._years=[];for(let e=0,i=[];e<24;e++)i.push(t+e),4==i.length&&(this._years.push(i.map(t=>this._createCellForYear(t))),i=[]);this._changeDetectorRef.markForCheck()}_yearSelected(t){const e=t.value;this.yearSelected.emit(this._dateAdapter.createDate(e,0,1));let i=this._dateAdapter.getMonth(this.activeDate),n=this._dateAdapter.getNumDaysInMonth(this._dateAdapter.createDate(e,i,1));this.selectedChange.emit(this._dateAdapter.createDate(e,i,Math.min(this._dateAdapter.getDate(this.activeDate),n)))}_handleCalendarBodyKeydown(t){const e=this._activeDate,i=this._isRtl();switch(t.keyCode){case m.k:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,i?1:-1);break;case m.o:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,i?-1:1);break;case m.s:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-4);break;case m.e:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,4);break;case m.j:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-ct(this._dateAdapter,this.activeDate,this.minDate,this.maxDate));break;case m.f:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,24-ct(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)-1);break;case m.n:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?-240:-24);break;case m.m:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?240:24);break;case m.g:case m.q:this._yearSelected({value:this._dateAdapter.getYear(this._activeDate),event:t});break;default:return}this._dateAdapter.compareDate(e,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),t.preventDefault()}_getActiveCell(){return ct(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)}_focusActiveCell(){this._matCalendarBody._focusActiveCell()}_createCellForYear(t){const e=this._dateAdapter.createDate(t,0,1),i=this._dateAdapter.getYearName(e),n=this.dateClass?this.dateClass(e,"multi-year"):void 0;return new U(t,i,i,this._shouldEnableYear(t),n)}_shouldEnableYear(t){if(null==t||this.maxDate&&t>this._dateAdapter.getYear(this.maxDate)||this.minDate&&t<this._dateAdapter.getYear(this.minDate))return!1;if(!this.dateFilter)return!0;for(let e=this._dateAdapter.createDate(t,0,1);this._dateAdapter.getYear(e)==t;e=this._dateAdapter.addCalendarDays(e,1))if(this.dateFilter(e))return!0;return!1}_isRtl(){return this._dir&&"rtl"===this._dir.value}_setSelectedYear(t){if(this._selectedYear=null,t instanceof K){const e=t.start||t.end;e&&(this._selectedYear=this._dateAdapter.getYear(e))}else t&&(this._selectedYear=this._dateAdapter.getYear(t))}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.h),r.Qb(h.c,8),r.Qb(w.c,8))},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-multi-year-view"]],viewQuery:function(t,e){var i;1&t&&r.Xc($,!0),2&t&&r.yc(i=r.ec())&&(e._matCalendarBody=i.first)},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass"},outputs:{selectedChange:"selectedChange",yearSelected:"yearSelected",activeDateChange:"activeDateChange"},exportAs:["matMultiYearView"],decls:5,vars:7,consts:[["role","presentation",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["colspan","4",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"rows","todayValue","startValue","endValue","numCols","cellAspectRatio","activeCell","selectedValueChange","keydown"]],template:function(t,e){1&t&&(r.Wb(0,"table",0),r.Wb(1,"thead",1),r.Wb(2,"tr"),r.Rb(3,"th",2),r.Vb(),r.Vb(),r.Wb(4,"tbody",3),r.dc("selectedValueChange",(function(t){return e._yearSelected(t)}))("keydown",(function(t){return e._handleCalendarBodyKeydown(t)})),r.Vb(),r.Vb()),2&t&&(r.Db(4),r.oc("rows",e._years)("todayValue",e._todayYear)("startValue",e._selectedYear)("endValue",e._selectedYear)("numCols",4)("cellAspectRatio",4/7)("activeCell",e._getActiveCell()))},directives:[$],encapsulation:2,changeDetection:0}),t})();function rt(t,e,i,n,a){const s=t.getYear(e),o=t.getYear(i),r=lt(t,n,a);return Math.floor((s-r)/24)===Math.floor((o-r)/24)}function ct(t,e,i,n){return((t.getYear(e)-lt(t,i,n))%24+24)%24}function lt(t,e,i){let n=0;return i?n=t.getYear(i)-24+1:e&&(n=t.getYear(e)),n}let dt=(()=>{class t{constructor(t,e,i,n){this._changeDetectorRef=t,this._dateFormats=e,this._dateAdapter=i,this._dir=n,this._rerenderSubscription=p.a.EMPTY,this.selectedChange=new r.o,this.monthSelected=new r.o,this.activeDateChange=new r.o,this._activeDate=this._dateAdapter.today()}get activeDate(){return this._activeDate}set activeDate(t){let e=this._activeDate;const i=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(i,this.minDate,this.maxDate),this._dateAdapter.getYear(e)!==this._dateAdapter.getYear(this._activeDate)&&this._init()}get selected(){return this._selected}set selected(t){this._selected=t instanceof K?t:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t)),this._setSelectedMonth(t)}get minDate(){return this._minDate}set minDate(t){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get maxDate(){return this._maxDate}set maxDate(t){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(Object(v.a)(null)).subscribe(()=>this._init())}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_monthSelected(t){const e=t.value,i=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),e,1);this.monthSelected.emit(i);const n=this._dateAdapter.getNumDaysInMonth(i);this.selectedChange.emit(this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),e,Math.min(this._dateAdapter.getDate(this.activeDate),n)))}_handleCalendarBodyKeydown(t){const e=this._activeDate,i=this._isRtl();switch(t.keyCode){case m.k:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,i?1:-1);break;case m.o:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,i?-1:1);break;case m.s:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-4);break;case m.e:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,4);break;case m.j:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-this._dateAdapter.getMonth(this._activeDate));break;case m.f:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,11-this._dateAdapter.getMonth(this._activeDate));break;case m.n:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?-10:-1);break;case m.m:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?10:1);break;case m.g:case m.q:this._monthSelected({value:this._dateAdapter.getMonth(this._activeDate),event:t});break;default:return}this._dateAdapter.compareDate(e,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),t.preventDefault()}_init(){this._setSelectedMonth(this.selected),this._todayMonth=this._getMonthInCurrentYear(this._dateAdapter.today()),this._yearLabel=this._dateAdapter.getYearName(this.activeDate);let t=this._dateAdapter.getMonthNames("short");this._months=[[0,1,2,3],[4,5,6,7],[8,9,10,11]].map(e=>e.map(e=>this._createCellForMonth(e,t[e]))),this._changeDetectorRef.markForCheck()}_focusActiveCell(){this._matCalendarBody._focusActiveCell()}_getMonthInCurrentYear(t){return t&&this._dateAdapter.getYear(t)==this._dateAdapter.getYear(this.activeDate)?this._dateAdapter.getMonth(t):null}_createCellForMonth(t,e){const i=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),t,1),n=this._dateAdapter.format(i,this._dateFormats.display.monthYearA11yLabel),a=this.dateClass?this.dateClass(i,"year"):void 0;return new U(t,e.toLocaleUpperCase(),n,this._shouldEnableMonth(t),a)}_shouldEnableMonth(t){const e=this._dateAdapter.getYear(this.activeDate);if(null==t||this._isYearAndMonthAfterMaxDate(e,t)||this._isYearAndMonthBeforeMinDate(e,t))return!1;if(!this.dateFilter)return!0;for(let i=this._dateAdapter.createDate(e,t,1);this._dateAdapter.getMonth(i)==t;i=this._dateAdapter.addCalendarDays(i,1))if(this.dateFilter(i))return!0;return!1}_isYearAndMonthAfterMaxDate(t,e){if(this.maxDate){const i=this._dateAdapter.getYear(this.maxDate),n=this._dateAdapter.getMonth(this.maxDate);return t>i||t===i&&e>n}return!1}_isYearAndMonthBeforeMinDate(t,e){if(this.minDate){const i=this._dateAdapter.getYear(this.minDate),n=this._dateAdapter.getMonth(this.minDate);return t<i||t===i&&e<n}return!1}_isRtl(){return this._dir&&"rtl"===this._dir.value}_setSelectedMonth(t){this._selectedMonth=t instanceof K?this._getMonthInCurrentYear(t.start)||this._getMonthInCurrentYear(t.end):this._getMonthInCurrentYear(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.h),r.Qb(h.e,8),r.Qb(h.c,8),r.Qb(w.c,8))},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-year-view"]],viewQuery:function(t,e){var i;1&t&&r.Xc($,!0),2&t&&r.yc(i=r.ec())&&(e._matCalendarBody=i.first)},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass"},outputs:{selectedChange:"selectedChange",monthSelected:"monthSelected",activeDateChange:"activeDateChange"},exportAs:["matYearView"],decls:5,vars:9,consts:[["role","presentation",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["colspan","4",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"label","rows","todayValue","startValue","endValue","labelMinRequiredCells","numCols","cellAspectRatio","activeCell","selectedValueChange","keydown"]],template:function(t,e){1&t&&(r.Wb(0,"table",0),r.Wb(1,"thead",1),r.Wb(2,"tr"),r.Rb(3,"th",2),r.Vb(),r.Vb(),r.Wb(4,"tbody",3),r.dc("selectedValueChange",(function(t){return e._monthSelected(t)}))("keydown",(function(t){return e._handleCalendarBodyKeydown(t)})),r.Vb(),r.Vb()),2&t&&(r.Db(4),r.oc("label",e._yearLabel)("rows",e._months)("todayValue",e._todayMonth)("startValue",e._selectedMonth)("endValue",e._selectedMonth)("labelMinRequiredCells",2)("numCols",4)("cellAspectRatio",4/7)("activeCell",e._dateAdapter.getMonth(e.activeDate)))},directives:[$],encapsulation:2,changeDetection:0}),t})(),ht=(()=>{class t{constructor(t,e,i,n,a){this._intl=t,this.calendar=e,this._dateAdapter=i,this._dateFormats=n,this.calendar.stateChanges.subscribe(()=>a.markForCheck())}get periodButtonText(){if("month"==this.calendar.currentView)return this._dateAdapter.format(this.calendar.activeDate,this._dateFormats.display.monthYearLabel).toLocaleUpperCase();if("year"==this.calendar.currentView)return this._dateAdapter.getYearName(this.calendar.activeDate);const t=this._dateAdapter.getYear(this.calendar.activeDate)-ct(this._dateAdapter,this.calendar.activeDate,this.calendar.minDate,this.calendar.maxDate),e=t+24-1,i=this._dateAdapter.getYearName(this._dateAdapter.createDate(t,0,1)),n=this._dateAdapter.getYearName(this._dateAdapter.createDate(e,0,1));return this._intl.formatYearRange(i,n)}get periodButtonLabel(){return"month"==this.calendar.currentView?this._intl.switchToMultiYearViewLabel:this._intl.switchToMonthViewLabel}get prevButtonLabel(){return{month:this._intl.prevMonthLabel,year:this._intl.prevYearLabel,"multi-year":this._intl.prevMultiYearLabel}[this.calendar.currentView]}get nextButtonLabel(){return{month:this._intl.nextMonthLabel,year:this._intl.nextYearLabel,"multi-year":this._intl.nextMultiYearLabel}[this.calendar.currentView]}currentPeriodClicked(){this.calendar.currentView="month"==this.calendar.currentView?"multi-year":"month"}previousClicked(){this.calendar.activeDate="month"==this.calendar.currentView?this._dateAdapter.addCalendarMonths(this.calendar.activeDate,-1):this._dateAdapter.addCalendarYears(this.calendar.activeDate,"year"==this.calendar.currentView?-1:-24)}nextClicked(){this.calendar.activeDate="month"==this.calendar.currentView?this._dateAdapter.addCalendarMonths(this.calendar.activeDate,1):this._dateAdapter.addCalendarYears(this.calendar.activeDate,"year"==this.calendar.currentView?1:24)}previousEnabled(){return!this.calendar.minDate||!this.calendar.minDate||!this._isSameView(this.calendar.activeDate,this.calendar.minDate)}nextEnabled(){return!this.calendar.maxDate||!this._isSameView(this.calendar.activeDate,this.calendar.maxDate)}_isSameView(t,e){return"month"==this.calendar.currentView?this._dateAdapter.getYear(t)==this._dateAdapter.getYear(e)&&this._dateAdapter.getMonth(t)==this._dateAdapter.getMonth(e):"year"==this.calendar.currentView?this._dateAdapter.getYear(t)==this._dateAdapter.getYear(e):rt(this._dateAdapter,t,e,this.calendar.minDate,this.calendar.maxDate)}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(B),r.Qb(Object(r.X)(()=>ut)),r.Qb(h.c,8),r.Qb(h.e,8),r.Qb(r.h))},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-calendar-header"]],exportAs:["matCalendarHeader"],ngContentSelectors:R,decls:9,vars:8,consts:[[1,"mat-calendar-header"],[1,"mat-calendar-controls"],["mat-button","","type","button","cdkAriaLive","polite",1,"mat-calendar-period-button",3,"click"],[1,"mat-calendar-arrow"],[1,"mat-calendar-spacer"],["mat-icon-button","","type","button",1,"mat-calendar-previous-button",3,"disabled","click"],["mat-icon-button","","type","button",1,"mat-calendar-next-button",3,"disabled","click"]],template:function(t,e){1&t&&(r.nc(),r.Wb(0,"div",0),r.Wb(1,"div",1),r.Wb(2,"button",2),r.dc("click",(function(){return e.currentPeriodClicked()})),r.Qc(3),r.Rb(4,"div",3),r.Vb(),r.Rb(5,"div",4),r.mc(6),r.Wb(7,"button",5),r.dc("click",(function(){return e.previousClicked()})),r.Vb(),r.Wb(8,"button",6),r.dc("click",(function(){return e.nextClicked()})),r.Vb(),r.Vb(),r.Vb()),2&t&&(r.Db(2),r.Eb("aria-label",e.periodButtonLabel),r.Db(1),r.Sc(" ",e.periodButtonText," "),r.Db(1),r.Ib("mat-calendar-invert","month"!=e.calendar.currentView),r.Db(3),r.oc("disabled",!e.previousEnabled()),r.Eb("aria-label",e.prevButtonLabel),r.Db(1),r.oc("disabled",!e.nextEnabled()),r.Eb("aria-label",e.nextButtonLabel))},directives:[c.b,n.d],encapsulation:2,changeDetection:0}),t})(),ut=(()=>{class t{constructor(t,e,i,n){this._dateAdapter=e,this._dateFormats=i,this._changeDetectorRef=n,this._moveFocusOnNextTick=!1,this.startView="month",this.selectedChange=new r.o,this.yearSelected=new r.o,this.monthSelected=new r.o,this._userSelection=new r.o,this.stateChanges=new u.a,this._intlChanges=t.changes.subscribe(()=>{n.markForCheck(),this.stateChanges.next()})}get startAt(){return this._startAt}set startAt(t){this._startAt=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get selected(){return this._selected}set selected(t){this._selected=t instanceof K?t:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get minDate(){return this._minDate}set minDate(t){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get maxDate(){return this._maxDate}set maxDate(t){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get activeDate(){return this._clampedActiveDate}set activeDate(t){this._clampedActiveDate=this._dateAdapter.clampDate(t,this.minDate,this.maxDate),this.stateChanges.next(),this._changeDetectorRef.markForCheck()}get currentView(){return this._currentView}set currentView(t){this._currentView=t,this._moveFocusOnNextTick=!0,this._changeDetectorRef.markForCheck()}ngAfterContentInit(){this._calendarHeaderPortal=new s.d(this.headerComponent||ht),this.activeDate=this.startAt||this._dateAdapter.today(),this._currentView=this.startView}ngAfterViewChecked(){this._moveFocusOnNextTick&&(this._moveFocusOnNextTick=!1,this.focusActiveCell())}ngOnDestroy(){this._intlChanges.unsubscribe(),this.stateChanges.complete()}ngOnChanges(t){const e=t.minDate||t.maxDate||t.dateFilter;if(e&&!e.firstChange){const t=this._getCurrentViewComponent();t&&(this._changeDetectorRef.detectChanges(),t._init())}this.stateChanges.next()}focusActiveCell(){this._getCurrentViewComponent()._focusActiveCell(!1)}updateTodaysDate(){const t=this.currentView;let e;e="month"===t?this.monthView:"year"===t?this.yearView:this.multiYearView,e._init()}_dateSelected(t){const e=t.value;(this.selected instanceof K||e&&!this._dateAdapter.sameDate(e,this.selected))&&this.selectedChange.emit(e),this._userSelection.emit(t)}_yearSelectedInMultiYearView(t){this.yearSelected.emit(t)}_monthSelectedInYearView(t){this.monthSelected.emit(t)}_goToDateInView(t,e){this.activeDate=t,this.currentView=e}_getCurrentViewComponent(){return this.monthView||this.yearView||this.multiYearView}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(B),r.Qb(h.c,8),r.Qb(h.e,8),r.Qb(r.h))},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-calendar"]],viewQuery:function(t,e){var i;1&t&&(r.Xc(st,!0),r.Xc(dt,!0),r.Xc(ot,!0)),2&t&&(r.yc(i=r.ec())&&(e.monthView=i.first),r.yc(i=r.ec())&&(e.yearView=i.first),r.yc(i=r.ec())&&(e.multiYearView=i.first))},hostAttrs:[1,"mat-calendar"],inputs:{startView:"startView",startAt:"startAt",selected:"selected",minDate:"minDate",maxDate:"maxDate",headerComponent:"headerComponent",dateFilter:"dateFilter",dateClass:"dateClass",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},outputs:{selectedChange:"selectedChange",yearSelected:"yearSelected",monthSelected:"monthSelected",_userSelection:"_userSelection"},exportAs:["matCalendar"],features:[r.Cb([tt]),r.Bb],decls:5,vars:5,consts:[[3,"cdkPortalOutlet"],["cdkMonitorSubtreeFocus","","tabindex","-1",1,"mat-calendar-content",3,"ngSwitch"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","comparisonStart","comparisonEnd","activeDateChange","_userSelection",4,"ngSwitchCase"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","monthSelected","selectedChange",4,"ngSwitchCase"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","yearSelected","selectedChange",4,"ngSwitchCase"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","comparisonStart","comparisonEnd","activeDateChange","_userSelection"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","monthSelected","selectedChange"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","yearSelected","selectedChange"]],template:function(t,e){1&t&&(r.Oc(0,j,0,0,"ng-template",0),r.Wb(1,"div",1),r.Oc(2,A,1,8,"mat-month-view",2),r.Oc(3,W,1,6,"mat-year-view",3),r.Oc(4,T,1,6,"mat-multi-year-view",4),r.Vb()),2&t&&(r.oc("cdkPortalOutlet",e._calendarHeaderPortal),r.Db(1),r.oc("ngSwitch",e.currentView),r.Db(1),r.oc("ngSwitchCase","month"),r.Db(1),r.oc("ngSwitchCase","year"),r.Db(1),r.oc("ngSwitchCase","multi-year"))},directives:[s.c,n.e,o.x,o.y,st,dt,ot],styles:['.mat-calendar{display:block}.mat-calendar-header{padding:8px 8px 0 8px}.mat-calendar-content{padding:0 8px 8px 8px;outline:none}.mat-calendar-controls{display:flex;margin:5% calc(33% / 7 - 16px)}.mat-calendar-controls .mat-icon-button:hover .mat-button-focus-overlay{opacity:.04}.mat-calendar-spacer{flex:1 1 auto}.mat-calendar-period-button{min-width:0}.mat-calendar-arrow{display:inline-block;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top-width:5px;border-top-style:solid;margin:0 0 0 5px;vertical-align:middle}.mat-calendar-arrow.mat-calendar-invert{transform:rotate(180deg)}[dir=rtl] .mat-calendar-arrow{margin:0 5px 0 0}.mat-calendar-previous-button,.mat-calendar-next-button{position:relative}.mat-calendar-previous-button::after,.mat-calendar-next-button::after{top:0;left:0;right:0;bottom:0;position:absolute;content:"";margin:15.5px;border:0 solid currentColor;border-top-width:2px}[dir=rtl] .mat-calendar-previous-button,[dir=rtl] .mat-calendar-next-button{transform:rotate(180deg)}.mat-calendar-previous-button::after{border-left-width:2px;transform:translateX(2px) rotate(-45deg)}.mat-calendar-next-button::after{border-right-width:2px;transform:translateX(-2px) rotate(45deg)}.mat-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.mat-calendar-table-header th{text-align:center;padding:0 0 8px 0}.mat-calendar-table-header-divider{position:relative;height:1px}.mat-calendar-table-header-divider::after{content:"";position:absolute;top:0;left:-8px;right:-8px;height:1px}\n'],encapsulation:2,changeDetection:0}),t})();const pt={transformPanel:Object(x.n)("transformPanel",[Object(x.k)("void",Object(x.l)({opacity:0,transform:"scale(1, 0.8)"})),Object(x.m)("void => enter",Object(x.e)("120ms cubic-bezier(0, 0, 0.2, 1)",Object(x.l)({opacity:1,transform:"scale(1, 1)"}))),Object(x.m)("* => void",Object(x.e)("100ms linear",Object(x.l)({opacity:0})))]),fadeInCalendar:Object(x.n)("fadeInCalendar",[Object(x.k)("void",Object(x.l)({opacity:0})),Object(x.k)("enter",Object(x.l)({opacity:1})),Object(x.m)("void => *",Object(x.e)("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])};let bt=0;const ft=new r.s("mat-datepicker-scroll-strategy"),mt={provide:ft,deps:[a.c],useFactory:function(t){return()=>t.scrollStrategies.reposition()}};class gt{constructor(t){this._elementRef=t}}const vt=Object(h.A)(gt);let _t=(()=>{class t extends vt{constructor(t,e,i,n,a){super(t),this._changeDetectorRef=e,this._model=i,this._dateAdapter=n,this._rangeSelectionStrategy=a,this._subscriptions=new p.a,this._animationState="enter",this._animationDone=new u.a}ngAfterViewInit(){this._changeDetectorRef&&this._subscriptions.add(this.datepicker._stateChanges.subscribe(()=>{this._changeDetectorRef.markForCheck()})),this._calendar.focusActiveCell()}ngOnDestroy(){this._subscriptions.unsubscribe(),this._animationDone.complete()}_handleUserSelection(t){if(this._model&&this._dateAdapter){const e=this._model.selection,i=t.value,n=e instanceof K;if(n&&this._rangeSelectionStrategy){const n=this._rangeSelectionStrategy.selectionFinished(i,e,t.event);this._model.updateSelection(n,this)}else!i||!n&&this._dateAdapter.sameDate(i,e)||this._model.add(i)}this._model&&!this._model.isComplete()||this.datepicker.close()}_startExitAnimation(){this._animationState="void",this._changeDetectorRef&&this._changeDetectorRef.markForCheck()}_getSelected(){return this._model?this._model.selection:null}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l),r.Qb(r.h),r.Qb(Y),r.Qb(h.c),r.Qb(it,8))},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-datepicker-content"]],viewQuery:function(t,e){var i;1&t&&r.Xc(ut,!0),2&t&&r.yc(i=r.ec())&&(e._calendar=i.first)},hostAttrs:[1,"mat-datepicker-content"],hostVars:3,hostBindings:function(t,e){1&t&&r.Mc("@transformPanel.done",(function(){return e._animationDone.next()})),2&t&&(r.Nc("@transformPanel",e._animationState),r.Ib("mat-datepicker-content-touch",e.datepicker.touchUi))},inputs:{color:"color"},exportAs:["matDatepickerContent"],features:[r.Ab],decls:1,vars:13,consts:[["cdkTrapFocus","",3,"id","ngClass","startAt","startView","minDate","maxDate","dateFilter","headerComponent","selected","dateClass","comparisonStart","comparisonEnd","yearSelected","monthSelected","_userSelection"]],template:function(t,e){1&t&&(r.Wb(0,"mat-calendar",0),r.dc("yearSelected",(function(t){return e.datepicker._selectYear(t)}))("monthSelected",(function(t){return e.datepicker._selectMonth(t)}))("_userSelection",(function(t){return e._handleUserSelection(t)})),r.Vb()),2&t&&r.oc("id",e.datepicker.id)("ngClass",e.datepicker.panelClass)("startAt",e.datepicker.startAt)("startView",e.datepicker.startView)("minDate",e.datepicker._getMinDate())("maxDate",e.datepicker._getMaxDate())("dateFilter",e.datepicker._getDateFilter())("headerComponent",e.datepicker.calendarHeaderComponent)("selected",e._getSelected())("dateClass",e.datepicker.dateClass)("comparisonStart",e.comparisonStart)("comparisonEnd",e.comparisonEnd)("@fadeInCalendar","enter")},directives:[ut,n.f,o.q],styles:[".mat-datepicker-content{display:block;border-radius:4px}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content-touch{display:block;max-height:80vh;overflow:auto;margin:-24px}.mat-datepicker-content-touch .mat-calendar{min-width:250px;min-height:312px;max-width:750px;max-height:788px}@media all and (orientation: landscape){.mat-datepicker-content-touch .mat-calendar{width:64vh;height:80vh}}@media all and (orientation: portrait){.mat-datepicker-content-touch .mat-calendar{width:80vw;height:100vw}}\n"],encapsulation:2,data:{animation:[pt.transformPanel,pt.fadeInCalendar]},changeDetection:0}),t})(),yt=(()=>{class t{constructor(t,e,i,n,a,s,o,c,l){this._dialog=t,this._overlay=e,this._ngZone=i,this._viewContainerRef=n,this._dateAdapter=s,this._dir=o,this._document=c,this._model=l,this._inputStateChanges=p.a.EMPTY,this.startView="month",this._touchUi=!1,this.xPosition="start",this.yPosition="below",this.yearSelected=new r.o,this.monthSelected=new r.o,this.openedStream=new r.o,this.closedStream=new r.o,this._opened=!1,this.id="mat-datepicker-"+bt++,this._focusedElementBeforeOpen=null,this._backdropHarnessClass=this.id+"-backdrop",this._stateChanges=new u.a,this._scrollStrategy=a}get startAt(){return this._startAt||(this._datepickerInput?this._datepickerInput.getStartValue():null)}set startAt(t){this._startAt=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get color(){return this._color||(this._datepickerInput?this._datepickerInput.getThemePalette():void 0)}set color(t){this._color=t}get touchUi(){return this._touchUi}set touchUi(t){this._touchUi=Object(y.c)(t)}get disabled(){return void 0===this._disabled&&this._datepickerInput?this._datepickerInput.disabled:!!this._disabled}set disabled(t){const e=Object(y.c)(t);e!==this._disabled&&(this._disabled=e,this._stateChanges.next(void 0))}get opened(){return this._opened}set opened(t){Object(y.c)(t)?this.open():this.close()}_getMinDate(){return this._datepickerInput&&this._datepickerInput.min}_getMaxDate(){return this._datepickerInput&&this._datepickerInput.max}_getDateFilter(){return this._datepickerInput&&this._datepickerInput.dateFilter}ngOnChanges(t){const e=t.xPosition||t.yPosition;e&&!e.firstChange&&this._popupRef&&(this._setConnectedPositions(this._popupRef.getConfig().positionStrategy),this.opened&&this._popupRef.updatePosition()),this._stateChanges.next(void 0)}ngOnDestroy(){this._destroyPopup(),this.close(),this._inputStateChanges.unsubscribe(),this._stateChanges.complete()}select(t){this._model.add(t)}_selectYear(t){this.yearSelected.emit(t)}_selectMonth(t){this.monthSelected.emit(t)}_registerInput(t){return this._inputStateChanges.unsubscribe(),this._datepickerInput=t,this._inputStateChanges=t.stateChanges.subscribe(()=>this._stateChanges.next(void 0)),this._model}open(){this._opened||this.disabled||(this._document&&(this._focusedElementBeforeOpen=this._document.activeElement),this.touchUi?this._openAsDialog():this._openAsPopup(),this._opened=!0,this.openedStream.emit())}close(){if(!this._opened)return;if(this._popupComponentRef&&this._popupRef){const t=this._popupComponentRef.instance;t._startExitAnimation(),t._animationDone.pipe(Object(g.a)(1)).subscribe(()=>this._destroyPopup())}this._dialogRef&&(this._dialogRef.close(),this._dialogRef=null);const t=()=>{this._opened&&(this._opened=!1,this.closedStream.emit(),this._focusedElementBeforeOpen=null)};this._focusedElementBeforeOpen&&"function"==typeof this._focusedElementBeforeOpen.focus?(this._focusedElementBeforeOpen.focus(),setTimeout(t)):t()}_openAsDialog(){this._dialogRef&&this._dialogRef.close(),this._dialogRef=this._dialog.open(_t,{direction:this._dir?this._dir.value:"ltr",viewContainerRef:this._viewContainerRef,panelClass:"mat-datepicker-dialog",hasBackdrop:!0,disableClose:!1,backdropClass:["cdk-overlay-dark-backdrop",this._backdropHarnessClass],width:"",height:"",minWidth:"",minHeight:"",maxWidth:"80vw",maxHeight:"",position:{},autoFocus:!0,restoreFocus:!1}),this._dialogRef.afterClosed().subscribe(()=>this.close()),this._forwardContentValues(this._dialogRef.componentInstance)}_openAsPopup(){const t=new s.d(_t,this._viewContainerRef);this._destroyPopup(),this._createPopup(),this._popupComponentRef=this._popupRef.attach(t),this._forwardContentValues(this._popupComponentRef.instance),this._ngZone.onStable.pipe(Object(g.a)(1)).subscribe(()=>{this._popupRef.updatePosition()})}_forwardContentValues(t){t.datepicker=this,t.color=this.color}_createPopup(){const t=this._overlay.position().flexibleConnectedTo(this._datepickerInput.getConnectedOverlayOrigin()).withTransformOriginOn(".mat-datepicker-content").withFlexibleDimensions(!1).withViewportMargin(8).withLockedPosition(),e=new a.d({positionStrategy:this._setConnectedPositions(t),hasBackdrop:!0,backdropClass:["mat-overlay-transparent-backdrop",this._backdropHarnessClass],direction:this._dir,scrollStrategy:this._scrollStrategy(),panelClass:"mat-datepicker-popup"});this._popupRef=this._overlay.create(e),this._popupRef.overlayElement.setAttribute("role","dialog"),Object(b.a)(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(Object(_.a)(t=>t.keyCode===m.h||this._datepickerInput&&t.altKey&&t.keyCode===m.s))).subscribe(t=>{t&&t.preventDefault(),this.close()})}_destroyPopup(){this._popupRef&&(this._popupRef.dispose(),this._popupRef=this._popupComponentRef=null)}_setConnectedPositions(t){const e="end"===this.xPosition?"end":"start",i="start"===e?"end":"start",n="above"===this.yPosition?"bottom":"top",a="top"===n?"bottom":"top";return t.withPositions([{originX:e,originY:a,overlayX:e,overlayY:n},{originX:e,originY:n,overlayX:e,overlayY:a},{originX:i,originY:a,overlayX:i,overlayY:n},{originX:i,originY:n,overlayX:i,overlayY:a}])}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(l.b),r.Qb(a.c),r.Qb(r.C),r.Qb(r.T),r.Qb(ft),r.Qb(h.c,8),r.Qb(w.c,8),r.Qb(o.e,8),r.Qb(Y))},t.\u0275dir=r.Lb({type:t,inputs:{startView:"startView",xPosition:"xPosition",yPosition:"yPosition",startAt:"startAt",color:"color",touchUi:"touchUi",disabled:"disabled",opened:"opened",calendarHeaderComponent:"calendarHeaderComponent",panelClass:"panelClass",dateClass:"dateClass"},outputs:{yearSelected:"yearSelected",monthSelected:"monthSelected",openedStream:"opened",closedStream:"closed"},features:[r.Bb]}),t})(),xt=(()=>{class t extends yt{}return t.\u0275fac=function(e){return Ct(e||t)},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-datepicker"]],exportAs:["matDatepicker"],features:[r.Cb([tt]),r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();const Ct=r.Yb(xt);class Ot{constructor(t,e){this.target=t,this.targetElement=e,this.value=this.target.value}}let Dt=(()=>{class t{constructor(t,e,i){this._elementRef=t,this._dateAdapter=e,this._dateFormats=i,this.dateChange=new r.o,this.dateInput=new r.o,this._valueChange=new r.o,this.stateChanges=new u.a,this._onTouched=()=>{},this._validatorOnChange=()=>{},this._cvaOnChange=()=>{},this._valueChangesSubscription=p.a.EMPTY,this._localeSubscription=p.a.EMPTY,this._parseValidator=()=>this._lastValueValid?null:{matDatepickerParse:{text:this._elementRef.nativeElement.value}},this._filterValidator=t=>{const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t.value)),i=this._getDateFilter();return i&&e&&!i(e)?{matDatepickerFilter:!0}:null},this._minValidator=t=>{const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t.value)),i=this._getMinDate();return!i||!e||this._dateAdapter.compareDate(i,e)<=0?null:{matDatepickerMin:{min:i,actual:e}}},this._maxValidator=t=>{const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t.value)),i=this._getMaxDate();return!i||!e||this._dateAdapter.compareDate(i,e)>=0?null:{matDatepickerMax:{max:i,actual:e}}},this._lastValueValid=!1,this._localeSubscription=e.localeChanges.subscribe(()=>{this.value=this.value})}get value(){return this._model?this._getValueFromModel(this._model.selection):this._pendingValue}set value(t){t=this._dateAdapter.deserialize(t),this._lastValueValid=this._isValidValue(t),t=this._dateAdapter.getValidDateOrNull(t);const e=this.value;this._assignValue(t),this._formatValue(t),this._dateAdapter.sameDate(e,t)||this._valueChange.emit(t)}get disabled(){return!!this._disabled||this._parentDisabled()}set disabled(t){const e=Object(y.c)(t),i=this._elementRef.nativeElement;this._disabled!==e&&(this._disabled=e,this.stateChanges.next(void 0)),e&&this._isInitialized&&i.blur&&i.blur()}_getValidators(){return[this._parseValidator,this._minValidator,this._maxValidator,this._filterValidator]}_registerModel(t){this._model=t,this._valueChangesSubscription.unsubscribe(),this._pendingValue&&this._assignValue(this._pendingValue),this._valueChangesSubscription=this._model.selectionChanged.subscribe(t=>{if(t.source!==this){const e=this._getValueFromModel(t.selection);this._lastValueValid=this._isValidValue(e),this._cvaOnChange(e),this._onTouched(),this._formatValue(e),this._canEmitChangeEvent(t)&&(this.dateInput.emit(new Ot(this,this._elementRef.nativeElement)),this.dateChange.emit(new Ot(this,this._elementRef.nativeElement))),this._outsideValueChanged&&this._outsideValueChanged()}})}ngAfterViewInit(){this._isInitialized=!0}ngOnChanges(t){wt(t,this._dateAdapter)&&this.stateChanges.next(void 0)}ngOnDestroy(){this._valueChangesSubscription.unsubscribe(),this._localeSubscription.unsubscribe(),this._valueChange.complete(),this.stateChanges.complete()}registerOnValidatorChange(t){this._validatorOnChange=t}validate(t){return this._validator?this._validator(t):null}writeValue(t){this.value=t}registerOnChange(t){this._cvaOnChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t}_onKeydown(t){t.altKey&&t.keyCode===m.e&&!this._elementRef.nativeElement.readOnly&&(this._openPopup(),t.preventDefault())}_onInput(t){const e=this._lastValueValid;let i=this._dateAdapter.parse(t,this._dateFormats.parse.dateInput);this._lastValueValid=this._isValidValue(i),i=this._dateAdapter.getValidDateOrNull(i),this._dateAdapter.sameDate(i,this.value)?(t&&!this.value&&this._cvaOnChange(i),e!==this._lastValueValid&&this._validatorOnChange()):(this._assignValue(i),this._cvaOnChange(i),this._valueChange.emit(i),this.dateInput.emit(new Ot(this,this._elementRef.nativeElement)))}_onChange(){this.dateChange.emit(new Ot(this,this._elementRef.nativeElement))}_onBlur(){this.value&&this._formatValue(this.value),this._onTouched()}_formatValue(t){this._elementRef.nativeElement.value=t?this._dateAdapter.format(t,this._dateFormats.display.dateInput):""}_assignValue(t){this._model?(this._assignValueToModel(t),this._pendingValue=null):this._pendingValue=t}_isValidValue(t){return!t||this._dateAdapter.isValid(t)}_parentDisabled(){return!1}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l),r.Qb(h.c,8),r.Qb(h.e,8))},t.\u0275dir=r.Lb({type:t,inputs:{value:"value",disabled:"disabled"},outputs:{dateChange:"dateChange",dateInput:"dateInput"},features:[r.Bb]}),t})();function wt(t,e){const i=Object.keys(t);for(let n of i){const{previousValue:i,currentValue:a}=t[n];if(!e.isDateInstance(i)||!e.isDateInstance(a))return!0;if(!e.sameDate(i,a))return!0}return!1}const Mt={provide:C.s,useExisting:Object(r.X)(()=>St),multi:!0},kt={provide:C.r,useExisting:Object(r.X)(()=>St),multi:!0};let St=(()=>{class t extends Dt{constructor(t,e,i,n){super(t,e,i),this._formField=n,this._validator=C.I.compose(super._getValidators())}set matDatepicker(t){t&&(this._datepicker=t,this._registerModel(t._registerInput(this)))}get min(){return this._min}set min(t){const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t));this._dateAdapter.sameDate(e,this._min)||(this._min=e,this._validatorOnChange())}get max(){return this._max}set max(t){const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t));this._dateAdapter.sameDate(e,this._max)||(this._max=e,this._validatorOnChange())}get dateFilter(){return this._dateFilter}set dateFilter(t){this._dateFilter=t,this._validatorOnChange()}getConnectedOverlayOrigin(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef}getThemePalette(){return this._formField?this._formField.color:void 0}getStartValue(){return this.value}getPopupConnectionElementRef(){return this.getConnectedOverlayOrigin()}_openPopup(){this._datepicker&&this._datepicker.open()}_getValueFromModel(t){return t}_assignValueToModel(t){this._model&&this._model.updateSelection(t,this)}_getMinDate(){return this._min}_getMaxDate(){return this._max}_getDateFilter(){return this._dateFilter}_canEmitChangeEvent(){return!0}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l),r.Qb(h.c,8),r.Qb(h.e,8),r.Qb(O.a,8))},t.\u0275dir=r.Lb({type:t,selectors:[["input","matDatepicker",""]],hostAttrs:[1,"mat-datepicker-input"],hostVars:6,hostBindings:function(t,e){1&t&&r.dc("input",(function(t){return e._onInput(t.target.value)}))("change",(function(){return e._onChange()}))("blur",(function(){return e._onBlur()}))("keydown",(function(t){return e._onKeydown(t)})),2&t&&(r.Zb("disabled",e.disabled),r.Eb("aria-haspopup",e._datepicker?"dialog":null)("aria-owns",(null==e._datepicker?null:e._datepicker.opened)&&e._datepicker.id||null)("min",e.min?e._dateAdapter.toIso8601(e.min):null)("max",e.max?e._dateAdapter.toIso8601(e.max):null)("data-mat-calendar",e._datepicker?e._datepicker.id:null))},inputs:{matDatepicker:"matDatepicker",min:"min",max:"max",dateFilter:["matDatepickerFilter","dateFilter"]},exportAs:["matDatepickerInput"],features:[r.Cb([Mt,kt,{provide:D.a,useExisting:t}]),r.Ab]}),t})(),It=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Lb({type:t,selectors:[["","matDatepickerToggleIcon",""]]}),t})(),Pt=(()=>{class t{constructor(t,e,i){this._intl=t,this._changeDetectorRef=e,this._stateChanges=p.a.EMPTY;const n=Number(i);this.tabIndex=n||0===n?n:null}get disabled(){return void 0===this._disabled&&this.datepicker?this.datepicker.disabled:!!this._disabled}set disabled(t){this._disabled=Object(y.c)(t)}ngOnChanges(t){t.datepicker&&this._watchStateChanges()}ngOnDestroy(){this._stateChanges.unsubscribe()}ngAfterContentInit(){this._watchStateChanges()}_open(t){this.datepicker&&!this.disabled&&(this.datepicker.open(),t.stopPropagation())}_watchStateChanges(){const t=this.datepicker?this.datepicker._stateChanges:Object(f.a)(),e=this.datepicker&&this.datepicker._datepickerInput?this.datepicker._datepickerInput.stateChanges:Object(f.a)(),i=this.datepicker?Object(b.a)(this.datepicker.openedStream,this.datepicker.closedStream):Object(f.a)();this._stateChanges.unsubscribe(),this._stateChanges=Object(b.a)(this._intl.changes,t,e,i).subscribe(()=>this._changeDetectorRef.markForCheck())}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(B),r.Qb(r.h),r.bc("tabindex"))},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-datepicker-toggle"]],contentQueries:function(t,e,i){var n;1&t&&r.Jb(i,It,!0),2&t&&r.yc(n=r.ec())&&(e._customIcon=n.first)},viewQuery:function(t,e){var i;1&t&&r.Xc(E,!0),2&t&&r.yc(i=r.ec())&&(e._button=i.first)},hostAttrs:[1,"mat-datepicker-toggle"],hostVars:8,hostBindings:function(t,e){1&t&&r.dc("focus",(function(){return e._button.focus()})),2&t&&(r.Eb("tabindex",e.disabled?null:-1)("data-mat-calendar",e.datepicker?e.datepicker.id:null),r.Ib("mat-datepicker-toggle-active",e.datepicker&&e.datepicker.opened)("mat-accent",e.datepicker&&"accent"===e.datepicker.color)("mat-warn",e.datepicker&&"warn"===e.datepicker.color))},inputs:{tabIndex:"tabIndex",disabled:"disabled",datepicker:["for","datepicker"],disableRipple:"disableRipple"},exportAs:["matDatepickerToggle"],features:[r.Bb],ngContentSelectors:Q,decls:4,vars:6,consts:[["mat-icon-button","","type","button",3,"disabled","disableRipple","click"],["button",""],["class","mat-datepicker-toggle-default-icon","viewBox","0 0 24 24","width","24px","height","24px","fill","currentColor","focusable","false",4,"ngIf"],["viewBox","0 0 24 24","width","24px","height","24px","fill","currentColor","focusable","false",1,"mat-datepicker-toggle-default-icon"],["d","M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"]],template:function(t,e){1&t&&(r.nc(L),r.Wb(0,"button",0,1),r.dc("click",(function(t){return e._open(t)})),r.Oc(2,F,2,0,"svg",2),r.mc(3),r.Vb()),2&t&&(r.oc("disabled",e.disabled)("disableRipple",e.disableRipple),r.Eb("aria-haspopup",e.datepicker?"dialog":null)("aria-label",e._intl.openCalendarLabel)("tabindex",e.disabled?-1:e.tabIndex),r.Db(2),r.oc("ngIf",!e._customIcon))},directives:[c.b,o.t],styles:[".mat-form-field-appearance-legacy .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-datepicker-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-datepicker-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-datepicker-toggle-default-icon{margin:auto}\n"],encapsulation:2,changeDetection:0}),t})();const Vt=new r.s("MAT_DATE_RANGE_INPUT_PARENT");let Rt=(()=>{class t extends Dt{constructor(t,e,i,n,a,s,o,r){super(e,o,r),this._rangeInput=t,this._defaultErrorStateMatcher=i,this._injector=n,this._parentForm=a,this._parentFormGroup=s,this._outsideValueChanged=()=>{this._validatorOnChange()}}ngOnInit(){const t=this._injector.get(C.t,null,r.r.Self);t&&(this.ngControl=t)}ngDoCheck(){this.ngControl&&this.updateErrorState()}isEmpty(){return 0===this._elementRef.nativeElement.value.length}_getPlaceholder(){return this._elementRef.nativeElement.placeholder}focus(){this._elementRef.nativeElement.focus()}_onInput(t){super._onInput(t),this._rangeInput._handleChildValueChange()}_openPopup(){this._rangeInput._openDatepicker()}_getMinDate(){return this._rangeInput.min}_getMaxDate(){return this._rangeInput.max}_getDateFilter(){return this._rangeInput.dateFilter}_parentDisabled(){return this._rangeInput._groupDisabled}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(Vt),r.Qb(r.l),r.Qb(h.d),r.Qb(r.t),r.Qb(C.w,8),r.Qb(C.m,8),r.Qb(h.c,8),r.Qb(h.e,8))},t.\u0275dir=r.Lb({type:t,features:[r.Ab]}),t})();const jt=Object(h.D)(Rt);let At=(()=>{class t extends jt{constructor(t,e,i,n,a,s,o,r){super(t,e,i,n,a,s,o,r),this._startValidator=t=>{const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t.value)),i=this._model?this._model.selection.end:null;return!e||!i||this._dateAdapter.compareDate(e,i)<=0?null:{matStartDateInvalid:{end:i,actual:e}}},this._validator=C.I.compose([...super._getValidators(),this._startValidator]),this._canEmitChangeEvent=t=>t.source!==this._rangeInput._endInput}ngOnInit(){super.ngOnInit()}ngDoCheck(){super.ngDoCheck()}_getValueFromModel(t){return t.start}_assignValueToModel(t){if(this._model){const e=new K(t,this._model.selection.end);this._model.updateSelection(e,this),this._cvaOnChange(t)}}_formatValue(t){super._formatValue(t),this._rangeInput._handleChildValueChange()}getMirrorValue(){const t=this._elementRef.nativeElement,e=t.value;return e.length>0?e:t.placeholder}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(Vt),r.Qb(r.l),r.Qb(h.d),r.Qb(r.t),r.Qb(C.w,8),r.Qb(C.m,8),r.Qb(h.c,8),r.Qb(h.e,8))},t.\u0275dir=r.Lb({type:t,selectors:[["input","matStartDate",""]],hostAttrs:["type","text",1,"mat-start-date","mat-date-range-input-inner"],hostVars:6,hostBindings:function(t,e){1&t&&r.dc("input",(function(t){return e._onInput(t.target.value)}))("change",(function(){return e._onChange()}))("keydown",(function(t){return e._onKeydown(t)}))("blur",(function(){return e._onBlur()})),2&t&&(r.Zb("disabled",e.disabled),r.Eb("id",e._rangeInput.id)("aria-haspopup",e._rangeInput.rangePicker?"dialog":null)("aria-owns",(null==e._rangeInput.rangePicker?null:e._rangeInput.rangePicker.opened)&&e._rangeInput.rangePicker.id||null)("min",e._getMinDate()?e._dateAdapter.toIso8601(e._getMinDate()):null)("max",e._getMaxDate()?e._dateAdapter.toIso8601(e._getMaxDate()):null))},features:[r.Cb([{provide:C.s,useExisting:t,multi:!0},{provide:C.r,useExisting:t,multi:!0}]),r.Ab]}),t})(),Wt=(()=>{class t extends jt{constructor(t,e,i,n,a,s,o,r){super(t,e,i,n,a,s,o,r),this._endValidator=t=>{const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t.value)),i=this._model?this._model.selection.start:null;return!e||!i||this._dateAdapter.compareDate(e,i)>=0?null:{matEndDateInvalid:{start:i,actual:e}}},this._validator=C.I.compose([...super._getValidators(),this._endValidator]),this._canEmitChangeEvent=t=>t.source!==this._rangeInput._startInput}ngOnInit(){super.ngOnInit()}ngDoCheck(){super.ngDoCheck()}_getValueFromModel(t){return t.end}_assignValueToModel(t){if(this._model){const e=new K(this._model.selection.start,t);this._model.updateSelection(e,this),this._cvaOnChange(t)}}_onKeydown(t){t.keyCode!==m.b||this._elementRef.nativeElement.value||this._rangeInput._startInput.focus(),super._onKeydown(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(Vt),r.Qb(r.l),r.Qb(h.d),r.Qb(r.t),r.Qb(C.w,8),r.Qb(C.m,8),r.Qb(h.c,8),r.Qb(h.e,8))},t.\u0275dir=r.Lb({type:t,selectors:[["input","matEndDate",""]],hostAttrs:["type","text",1,"mat-end-date","mat-date-range-input-inner"],hostVars:5,hostBindings:function(t,e){1&t&&r.dc("input",(function(t){return e._onInput(t.target.value)}))("change",(function(){return e._onChange()}))("keydown",(function(t){return e._onKeydown(t)}))("blur",(function(){return e._onBlur()})),2&t&&(r.Zb("disabled",e.disabled),r.Eb("aria-haspopup",e._rangeInput.rangePicker?"dialog":null)("aria-owns",(null==e._rangeInput.rangePicker?null:e._rangeInput.rangePicker.opened)&&e._rangeInput.rangePicker.id||null)("min",e._getMinDate()?e._dateAdapter.toIso8601(e._getMinDate()):null)("max",e._getMaxDate()?e._dateAdapter.toIso8601(e._getMaxDate()):null))},features:[r.Cb([{provide:C.s,useExisting:t,multi:!0},{provide:C.r,useExisting:t,multi:!0}]),r.Ab]}),t})(),Tt=(()=>{class t extends yt{_forwardContentValues(t){super._forwardContentValues(t);const e=this._datepickerInput;e&&(t.comparisonStart=e.comparisonStart,t.comparisonEnd=e.comparisonEnd)}}return t.\u0275fac=function(e){return Et(e||t)},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-date-range-picker"]],exportAs:["matDateRangePicker"],features:[r.Cb([et,at]),r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();const Et=r.Yb(Tt);let Ft=0,Lt=(()=>{class t{constructor(t,e,i,n,a){this._changeDetectorRef=t,this._elementRef=e,this._dateAdapter=n,this._formField=a,this.id="mat-date-range-input-"+Ft++,this.focused=!1,this.controlType="mat-date-range-input",this._groupDisabled=!1,this._ariaDescribedBy=null,this.separator="\u2013",this.comparisonStart=null,this.comparisonEnd=null,this.stateChanges=new u.a,this.ngControl=i}get value(){return this._model?this._model.selection:null}get shouldLabelFloat(){return this.focused||!this.empty}get placeholder(){var t,e;const i=(null===(t=this._startInput)||void 0===t?void 0:t._getPlaceholder())||"",n=(null===(e=this._endInput)||void 0===e?void 0:e._getPlaceholder())||"";return i||n?`${i} ${this.separator} ${n}`:""}get rangePicker(){return this._rangePicker}set rangePicker(t){t&&(this._model=t._registerInput(this),this._rangePicker=t,this._registerModel(this._model))}get required(){return!!this._required}set required(t){this._required=Object(y.c)(t)}get dateFilter(){return this._dateFilter}set dateFilter(t){this._dateFilter=t,this._revalidate()}get min(){return this._min}set min(t){const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t));this._dateAdapter.sameDate(e,this._min)||(this._min=e,this._revalidate())}get max(){return this._max}set max(t){const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t));this._dateAdapter.sameDate(e,this._max)||(this._max=e,this._revalidate())}get disabled(){return this._startInput&&this._endInput?this._startInput.disabled&&this._endInput.disabled:this._groupDisabled}set disabled(t){const e=Object(y.c)(t);e!==this._groupDisabled&&(this._groupDisabled=e,this.stateChanges.next(void 0))}get errorState(){return!(!this._startInput||!this._endInput)&&(this._startInput.errorState||this._endInput.errorState)}get empty(){const t=!!this._startInput&&this._startInput.isEmpty(),e=!!this._endInput&&this._endInput.isEmpty();return t&&e}setDescribedByIds(t){this._ariaDescribedBy=t.length?t.join(" "):null}onContainerClick(){this.focused||this.disabled||(this._model&&this._model.selection.start?this._endInput.focus():this._startInput.focus())}ngAfterContentInit(){this._model&&this._registerModel(this._model),Object(b.a)(this._startInput.stateChanges,this._endInput.stateChanges).subscribe(()=>{this.stateChanges.next(void 0)})}ngOnChanges(t){wt(t,this._dateAdapter)&&this.stateChanges.next(void 0)}ngOnDestroy(){this.stateChanges.complete()}getStartValue(){return this.value?this.value.start:null}getThemePalette(){return this._formField?this._formField.color:void 0}getConnectedOverlayOrigin(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef}_getInputMirrorValue(){return this._startInput?this._startInput.getMirrorValue():""}_shouldHidePlaceholders(){return!!this._startInput&&!this._startInput.isEmpty()}_handleChildValueChange(){this.stateChanges.next(void 0),this._changeDetectorRef.markForCheck()}_openDatepicker(){this._rangePicker&&this._rangePicker.open()}_shouldHideSeparator(){return(!this._formField||this._formField._hideControlPlaceholder())&&this.empty}_getAriaLabelledby(){const t=this._formField;return t&&t._hasFloatingLabel()?t._labelId:null}_revalidate(){this._startInput&&this._startInput._validatorOnChange(),this._endInput&&this._endInput._validatorOnChange()}_registerModel(t){this._startInput&&this._startInput._registerModel(t),this._endInput&&this._endInput._registerModel(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.h),r.Qb(r.l),r.Qb(C.c,10),r.Qb(h.c,8),r.Qb(O.a,8))},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-date-range-input"]],contentQueries:function(t,e,i){var n;1&t&&(r.Jb(i,At,!0),r.Jb(i,Wt,!0)),2&t&&(r.yc(n=r.ec())&&(e._startInput=n.first),r.yc(n=r.ec())&&(e._endInput=n.first))},hostAttrs:["role","group",1,"mat-date-range-input"],hostVars:8,hostBindings:function(t,e){2&t&&(r.Eb("id",null)("aria-labelledby",e._getAriaLabelledby())("aria-describedby",e._ariaDescribedBy)("data-mat-calendar",e.rangePicker?e.rangePicker.id:null),r.Ib("mat-date-range-input-hide-placeholders",e._shouldHidePlaceholders())("mat-date-range-input-required",e.required))},inputs:{separator:"separator",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd",rangePicker:"rangePicker",required:"required",dateFilter:"dateFilter",min:"min",max:"max",disabled:"disabled"},exportAs:["matDateRangeInput"],features:[r.Cb([{provide:O.d,useExisting:t},{provide:Vt,useExisting:t}]),r.Bb],ngContentSelectors:z,decls:9,vars:4,consts:[["cdkMonitorSubtreeFocus","",1,"mat-date-range-input-container",3,"cdkFocusChange"],[1,"mat-date-range-input-start-wrapper"],["aria-hidden","true",1,"mat-date-range-input-mirror"],[1,"mat-date-range-input-separator"],[1,"mat-date-range-input-end-wrapper"]],template:function(t,e){1&t&&(r.nc(N),r.Wb(0,"div",0),r.dc("cdkFocusChange",(function(t){return e.focused=null!==t})),r.Wb(1,"div",1),r.mc(2),r.Wb(3,"span",2),r.Qc(4),r.Vb(),r.Vb(),r.Wb(5,"span",3),r.Qc(6),r.Vb(),r.Wb(7,"div",4),r.mc(8,1),r.Vb(),r.Vb()),2&t&&(r.Db(4),r.Rc(e._getInputMirrorValue()),r.Db(1),r.Ib("mat-date-range-input-separator-hidden",e._shouldHideSeparator()),r.Db(1),r.Rc(e.separator))},directives:[n.e],styles:[".mat-date-range-input{display:block;width:100%}.mat-date-range-input-container{display:flex;align-items:center}.mat-date-range-input-separator{transition:opacity 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);margin:0 4px}.mat-date-range-input-separator-hidden{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;opacity:0;transition:none}.mat-date-range-input-inner{font:inherit;background:transparent;color:currentColor;border:none;outline:none;padding:0;margin:0;vertical-align:bottom;text-align:inherit;-webkit-appearance:none;width:100%}.mat-date-range-input-inner::-ms-clear,.mat-date-range-input-inner::-ms-reveal{display:none}.mat-date-range-input-inner:-moz-ui-invalid{box-shadow:none}.mat-date-range-input-inner::placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-moz-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-webkit-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner:-ms-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-hide-placeholder .mat-date-range-input-inner::placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-moz-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-moz-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-webkit-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-webkit-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-date-range-input-inner:-ms-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner:-ms-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-date-range-input-mirror{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;visibility:hidden;white-space:nowrap;display:inline-block;min-width:2px}.mat-date-range-input-start-wrapper{position:relative;overflow:hidden;max-width:calc(50% - 4px)}.mat-date-range-input-start-wrapper .mat-date-range-input-inner{position:absolute;top:0;left:0}.mat-date-range-input-end-wrapper{flex-grow:1;max-width:calc(50% - 4px)}.mat-form-field-type-mat-date-range-input .mat-form-field-infix{width:200px}\n"],encapsulation:2,changeDetection:0}),t})(),Qt=(()=>{class t{}return t.\u0275mod=r.Ob({type:t}),t.\u0275inj=r.Nb({factory:function(e){return new(e||t)},providers:[B,mt],imports:[[o.c,c.c,l.g,a.f,n.a,s.h],d.c]}),t})()},ihCf:function(t,e,i){"use strict";i.d(e,"a",(function(){return p})),i.d(e,"b",(function(){return b})),i.d(e,"c",(function(){return f})),i.d(e,"d",(function(){return m}));var n=i("nLfN"),a=i("fXoL"),s=i("8LU1"),o=i("EY2u"),r=i("XNiG"),c=i("xgIS"),l=i("3UWI"),d=i("1G5W"),h=i("ofXK");const u=Object(n.f)({passive:!0});let p=(()=>{class t{constructor(t,e){this._platform=t,this._ngZone=e,this._monitoredElements=new Map}monitor(t){if(!this._platform.isBrowser)return o.a;const e=Object(s.e)(t),i=this._monitoredElements.get(e);if(i)return i.subject;const n=new r.a,a="cdk-text-field-autofilled",c=t=>{"cdk-text-field-autofill-start"!==t.animationName||e.classList.contains(a)?"cdk-text-field-autofill-end"===t.animationName&&e.classList.contains(a)&&(e.classList.remove(a),this._ngZone.run(()=>n.next({target:t.target,isAutofilled:!1}))):(e.classList.add(a),this._ngZone.run(()=>n.next({target:t.target,isAutofilled:!0})))};return this._ngZone.runOutsideAngular(()=>{e.addEventListener("animationstart",c,u),e.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(e,{subject:n,unlisten:()=>{e.removeEventListener("animationstart",c,u)}}),n}stopMonitoring(t){const e=Object(s.e)(t),i=this._monitoredElements.get(e);i&&(i.unlisten(),i.subject.complete(),e.classList.remove("cdk-text-field-autofill-monitored"),e.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(e))}ngOnDestroy(){this._monitoredElements.forEach((t,e)=>this.stopMonitoring(e))}}return t.\u0275fac=function(e){return new(e||t)(a.ac(n.a),a.ac(a.C))},t.\u0275prov=Object(a.Mb)({factory:function(){return new t(Object(a.ac)(n.a),Object(a.ac)(a.C))},token:t,providedIn:"root"}),t})(),b=(()=>{class t{constructor(t,e){this._elementRef=t,this._autofillMonitor=e,this.cdkAutofill=new a.o}ngOnInit(){this._autofillMonitor.monitor(this._elementRef).subscribe(t=>this.cdkAutofill.emit(t))}ngOnDestroy(){this._autofillMonitor.stopMonitoring(this._elementRef)}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(p))},t.\u0275dir=a.Lb({type:t,selectors:[["","cdkAutofill",""]],outputs:{cdkAutofill:"cdkAutofill"}}),t})(),f=(()=>{class t{constructor(t,e,i,n){this._elementRef=t,this._platform=e,this._ngZone=i,this._destroyed=new r.a,this._enabled=!0,this._previousMinRows=-1,this._document=n,this._textareaElement=this._elementRef.nativeElement,this._measuringClass=e.FIREFOX?"cdk-textarea-autosize-measuring-firefox":"cdk-textarea-autosize-measuring"}get minRows(){return this._minRows}set minRows(t){this._minRows=Object(s.f)(t),this._setMinHeight()}get maxRows(){return this._maxRows}set maxRows(t){this._maxRows=Object(s.f)(t),this._setMaxHeight()}get enabled(){return this._enabled}set enabled(t){t=Object(s.c)(t),this._enabled!==t&&((this._enabled=t)?this.resizeToFitContent(!0):this.reset())}_setMinHeight(){const t=this.minRows&&this._cachedLineHeight?this.minRows*this._cachedLineHeight+"px":null;t&&(this._textareaElement.style.minHeight=t)}_setMaxHeight(){const t=this.maxRows&&this._cachedLineHeight?this.maxRows*this._cachedLineHeight+"px":null;t&&(this._textareaElement.style.maxHeight=t)}ngAfterViewInit(){this._platform.isBrowser&&(this._initialHeight=this._textareaElement.style.height,this.resizeToFitContent(),this._ngZone.runOutsideAngular(()=>{const t=this._getWindow();Object(c.a)(t,"resize").pipe(Object(l.a)(16),Object(d.a)(this._destroyed)).subscribe(()=>this.resizeToFitContent(!0))}))}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_cacheTextareaLineHeight(){if(this._cachedLineHeight)return;let t=this._textareaElement.cloneNode(!1);t.rows=1,t.style.position="absolute",t.style.visibility="hidden",t.style.border="none",t.style.padding="0",t.style.height="",t.style.minHeight="",t.style.maxHeight="",t.style.overflow="hidden",this._textareaElement.parentNode.appendChild(t),this._cachedLineHeight=t.clientHeight,this._textareaElement.parentNode.removeChild(t),this._setMinHeight(),this._setMaxHeight()}ngDoCheck(){this._platform.isBrowser&&this.resizeToFitContent()}resizeToFitContent(t=!1){if(!this._enabled)return;if(this._cacheTextareaLineHeight(),!this._cachedLineHeight)return;const e=this._elementRef.nativeElement,i=e.value;if(!t&&this._minRows===this._previousMinRows&&i===this._previousValue)return;const n=e.placeholder;e.classList.add(this._measuringClass),e.placeholder="",e.style.height=e.scrollHeight-4+"px",e.classList.remove(this._measuringClass),e.placeholder=n,this._ngZone.runOutsideAngular(()=>{"undefined"!=typeof requestAnimationFrame?requestAnimationFrame(()=>this._scrollToCaretPosition(e)):setTimeout(()=>this._scrollToCaretPosition(e))}),this._previousValue=i,this._previousMinRows=this._minRows}reset(){void 0!==this._initialHeight&&(this._textareaElement.style.height=this._initialHeight)}_noopInputHandler(){}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_scrollToCaretPosition(t){const{selectionStart:e,selectionEnd:i}=t,n=this._getDocument();this._destroyed.isStopped||n.activeElement!==t||t.setSelectionRange(e,i)}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(n.a),a.Qb(a.C),a.Qb(h.e,8))},t.\u0275dir=a.Lb({type:t,selectors:[["textarea","cdkTextareaAutosize",""]],hostAttrs:["rows","1",1,"cdk-textarea-autosize"],hostBindings:function(t,e){1&t&&a.dc("input",(function(){return e._noopInputHandler()}))},inputs:{minRows:["cdkAutosizeMinRows","minRows"],maxRows:["cdkAutosizeMaxRows","maxRows"],enabled:["cdkTextareaAutosize","enabled"]},exportAs:["cdkTextareaAutosize"]}),t})(),m=(()=>{class t{}return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)},imports:[[n.b]]}),t})()},itXk:function(t,e,i){"use strict";i.d(e,"a",(function(){return p}));var n=i("z+Ro"),a=i("DH7j"),s=i("7o/Q");class o extends s.a{notifyNext(t,e,i,n,a){this.destination.next(e)}notifyError(t,e){this.destination.error(t)}notifyComplete(t){this.destination.complete()}}class r extends s.a{constructor(t,e,i){super(),this.parent=t,this.outerValue=e,this.outerIndex=i,this.index=0}_next(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)}_error(t){this.parent.notifyError(t,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}var c=i("SeVD"),l=i("HDdC");function d(t,e,i,n,a=new r(t,i,n)){if(!a.closed)return e instanceof l.a?e.subscribe(a):Object(c.a)(e)(a)}var h=i("yCtX");const u={};function p(...t){let e=void 0,i=void 0;return Object(n.a)(t[t.length-1])&&(i=t.pop()),"function"==typeof t[t.length-1]&&(e=t.pop()),1===t.length&&Object(a.a)(t[0])&&(t=t[0]),Object(h.a)(t,i).lift(new b(e))}class b{constructor(t){this.resultSelector=t}call(t,e){return e.subscribe(new f(t,this.resultSelector))}}class f extends o{constructor(t,e){super(t),this.resultSelector=e,this.active=0,this.values=[],this.observables=[]}_next(t){this.values.push(u),this.observables.push(t)}_complete(){const t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(let i=0;i<e;i++)this.add(d(this,t[i],void 0,i))}}notifyComplete(t){0==(this.active-=1)&&this.destination.complete()}notifyNext(t,e,i){const n=this.values,a=this.toRespond?n[i]===u?--this.toRespond:this.toRespond:0;n[i]=e,0===a&&(this.resultSelector?this._tryResultSelector(n):this.destination.next(n.slice()))}_tryResultSelector(t){let e;try{e=this.resultSelector.apply(this,t)}catch(i){return void this.destination.error(i)}this.destination.next(e)}}},jZKg:function(t,e,i){"use strict";i.d(e,"a",(function(){return s}));var n=i("HDdC"),a=i("quSY");function s(t,e){return new n.a(i=>{const n=new a.a;let s=0;return n.add(e.schedule((function(){s!==t.length?(i.next(t[s++]),i.closed||n.add(this.schedule())):i.complete()}))),n})}},jaxi:function(t,e,i){"use strict";i.d(e,"a",(function(){return _})),i.d(e,"b",(function(){return m})),i.d(e,"c",(function(){return y}));var n=i("8LU1"),a=i("0EQZ"),s=i("fXoL"),o=i("3Pt+"),r=i("FKr1"),c=i("u47x");const l=["button"],d=["*"],h=new s.s("MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS"),u=new s.s("MatButtonToggleGroup"),p={provide:o.s,useExisting:Object(s.X)(()=>m),multi:!0};let b=0;class f{constructor(t,e){this.source=t,this.value=e}}let m=(()=>{class t{constructor(t,e){this._changeDetector=t,this._vertical=!1,this._multiple=!1,this._disabled=!1,this._controlValueAccessorChangeFn=()=>{},this._onTouched=()=>{},this._name="mat-button-toggle-group-"+b++,this.valueChange=new s.o,this.change=new s.o,this.appearance=e&&e.appearance?e.appearance:"standard"}get name(){return this._name}set name(t){this._name=t,this._buttonToggles&&this._buttonToggles.forEach(t=>{t.name=this._name,t._markForCheck()})}get vertical(){return this._vertical}set vertical(t){this._vertical=Object(n.c)(t)}get value(){const t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t.map(t=>t.value):t[0]?t[0].value:void 0}set value(t){this._setSelectionByValue(t),this.valueChange.emit(this.value)}get selected(){const t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t:t[0]||null}get multiple(){return this._multiple}set multiple(t){this._multiple=Object(n.c)(t)}get disabled(){return this._disabled}set disabled(t){this._disabled=Object(n.c)(t),this._buttonToggles&&this._buttonToggles.forEach(t=>t._markForCheck())}ngOnInit(){this._selectionModel=new a.c(this.multiple,void 0,!1)}ngAfterContentInit(){this._selectionModel.select(...this._buttonToggles.filter(t=>t.checked))}writeValue(t){this.value=t,this._changeDetector.markForCheck()}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t}_emitChangeEvent(){const t=this.selected,e=Array.isArray(t)?t[t.length-1]:t,i=new f(e,this.value);this._controlValueAccessorChangeFn(i.value),this.change.emit(i)}_syncButtonToggle(t,e,i=!1,n=!1){this.multiple||!this.selected||t.checked||(this.selected.checked=!1),this._selectionModel?e?this._selectionModel.select(t):this._selectionModel.deselect(t):n=!0,n?Promise.resolve().then(()=>this._updateModelValue(i)):this._updateModelValue(i)}_isSelected(t){return this._selectionModel&&this._selectionModel.isSelected(t)}_isPrechecked(t){return void 0!==this._rawValue&&(this.multiple&&Array.isArray(this._rawValue)?this._rawValue.some(e=>null!=t.value&&e===t.value):t.value===this._rawValue)}_setSelectionByValue(t){this._rawValue=t,this._buttonToggles&&(this.multiple&&t?(Array.isArray(t),this._clearSelection(),t.forEach(t=>this._selectValue(t))):(this._clearSelection(),this._selectValue(t)))}_clearSelection(){this._selectionModel.clear(),this._buttonToggles.forEach(t=>t.checked=!1)}_selectValue(t){const e=this._buttonToggles.find(e=>null!=e.value&&e.value===t);e&&(e.checked=!0,this._selectionModel.select(e))}_updateModelValue(t){t&&this._emitChangeEvent(),this.valueChange.emit(this.value)}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.h),s.Qb(h,8))},t.\u0275dir=s.Lb({type:t,selectors:[["mat-button-toggle-group"]],contentQueries:function(t,e,i){var n;1&t&&s.Jb(i,_,!0),2&t&&s.yc(n=s.ec())&&(e._buttonToggles=n)},hostAttrs:["role","group",1,"mat-button-toggle-group"],hostVars:5,hostBindings:function(t,e){2&t&&(s.Eb("aria-disabled",e.disabled),s.Ib("mat-button-toggle-vertical",e.vertical)("mat-button-toggle-group-appearance-standard","standard"===e.appearance))},inputs:{appearance:"appearance",name:"name",vertical:"vertical",value:"value",multiple:"multiple",disabled:"disabled"},outputs:{valueChange:"valueChange",change:"change"},exportAs:["matButtonToggleGroup"],features:[s.Cb([p,{provide:u,useExisting:t}])]}),t})();class g{}const v=Object(r.B)(g);let _=(()=>{class t extends v{constructor(t,e,i,n,a,o){super(),this._changeDetectorRef=e,this._elementRef=i,this._focusMonitor=n,this._isSingleSelector=!1,this._checked=!1,this.ariaLabelledby=null,this._disabled=!1,this.change=new s.o;const r=Number(a);this.tabIndex=r||0===r?r:null,this.buttonToggleGroup=t,this.appearance=o&&o.appearance?o.appearance:"standard"}get buttonId(){return this.id+"-button"}get appearance(){return this.buttonToggleGroup?this.buttonToggleGroup.appearance:this._appearance}set appearance(t){this._appearance=t}get checked(){return this.buttonToggleGroup?this.buttonToggleGroup._isSelected(this):this._checked}set checked(t){const e=Object(n.c)(t);e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&this.buttonToggleGroup._syncButtonToggle(this,this._checked),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled||this.buttonToggleGroup&&this.buttonToggleGroup.disabled}set disabled(t){this._disabled=Object(n.c)(t)}ngOnInit(){const t=this.buttonToggleGroup;this._isSingleSelector=t&&!t.multiple,this.id=this.id||"mat-button-toggle-"+b++,this._isSingleSelector&&(this.name=t.name),t&&(t._isPrechecked(this)?this.checked=!0:t._isSelected(this)!==this._checked&&t._syncButtonToggle(this,this._checked))}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){const t=this.buttonToggleGroup;this._focusMonitor.stopMonitoring(this._elementRef),t&&t._isSelected(this)&&t._syncButtonToggle(this,!1,!1,!0)}focus(t){this._buttonElement.nativeElement.focus(t)}_onButtonClick(){const t=!!this._isSingleSelector||!this._checked;t!==this._checked&&(this._checked=t,this.buttonToggleGroup&&(this.buttonToggleGroup._syncButtonToggle(this,this._checked,!0),this.buttonToggleGroup._onTouched())),this.change.emit(new f(this,this.value))}_markForCheck(){this._changeDetectorRef.markForCheck()}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(u,8),s.Qb(s.h),s.Qb(s.l),s.Qb(c.h),s.bc("tabindex"),s.Qb(h,8))},t.\u0275cmp=s.Kb({type:t,selectors:[["mat-button-toggle"]],viewQuery:function(t,e){var i;1&t&&s.Xc(l,!0),2&t&&s.yc(i=s.ec())&&(e._buttonElement=i.first)},hostAttrs:[1,"mat-button-toggle"],hostVars:11,hostBindings:function(t,e){1&t&&s.dc("focus",(function(){return e.focus()})),2&t&&(s.Eb("tabindex",-1)("id",e.id)("name",null),s.Ib("mat-button-toggle-standalone",!e.buttonToggleGroup)("mat-button-toggle-checked",e.checked)("mat-button-toggle-disabled",e.disabled)("mat-button-toggle-appearance-standard","standard"===e.appearance))},inputs:{disableRipple:"disableRipple",ariaLabelledby:["aria-labelledby","ariaLabelledby"],tabIndex:"tabIndex",appearance:"appearance",checked:"checked",disabled:"disabled",id:"id",name:"name",ariaLabel:["aria-label","ariaLabel"],value:"value"},outputs:{change:"change"},exportAs:["matButtonToggle"],features:[s.Ab],ngContentSelectors:d,decls:6,vars:9,consts:[["type","button",1,"mat-button-toggle-button","mat-focus-indicator",3,"id","disabled","click"],["button",""],[1,"mat-button-toggle-label-content"],[1,"mat-button-toggle-focus-overlay"],["matRipple","",1,"mat-button-toggle-ripple",3,"matRippleTrigger","matRippleDisabled"]],template:function(t,e){if(1&t&&(s.nc(),s.Wb(0,"button",0,1),s.dc("click",(function(){return e._onButtonClick()})),s.Wb(2,"span",2),s.mc(3),s.Vb(),s.Vb(),s.Rb(4,"span",3),s.Rb(5,"span",4)),2&t){const t=s.zc(1);s.oc("id",e.buttonId)("disabled",e.disabled||null),s.Eb("tabindex",e.disabled?-1:e.tabIndex)("aria-pressed",e.checked)("name",e.name||null)("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby),s.Db(5),s.oc("matRippleTrigger",t)("matRippleDisabled",e.disableRipple||e.disabled)}},directives:[r.u],styles:[".mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;border-radius:2px;-webkit-tap-highlight-color:transparent}.cdk-high-contrast-active .mat-button-toggle-standalone,.cdk-high-contrast-active .mat-button-toggle-group{outline:solid 1px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:4px}.cdk-high-contrast-active .mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.cdk-high-contrast-active .mat-button-toggle-group-appearance-standard{outline:0}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:1}.cdk-high-contrast-active .mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:.5}.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{opacity:.04}.mat-button-toggle-appearance-standard.cdk-keyboard-focused:not(.mat-button-toggle-disabled) .mat-button-toggle-focus-overlay{opacity:.12}.cdk-high-contrast-active .mat-button-toggle-appearance-standard.cdk-keyboard-focused:not(.mat-button-toggle-disabled) .mat-button-toggle-focus-overlay{opacity:.5}@media(hover: none){.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-block;line-height:36px;padding:0 16px;position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{border-radius:inherit;pointer-events:none;opacity:0;top:0;left:0;right:0;bottom:0;position:absolute}.mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 36px}.cdk-high-contrast-active .mat-button-toggle-checked .mat-button-toggle-focus-overlay{opacity:.5;height:0}.cdk-high-contrast-active .mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}\n"],encapsulation:2,changeDetection:0}),t})(),y=(()=>{class t{}return t.\u0275mod=s.Ob({type:t}),t.\u0275inj=s.Nb({factory:function(e){return new(e||t)},imports:[[r.k,r.v],r.k]}),t})()},jhN1:function(t,e,i){"use strict";i.d(e,"a",(function(){return L})),i.d(e,"b",(function(){return j})),i.d(e,"c",(function(){return M})),i.d(e,"d",(function(){return k})),i.d(e,"e",(function(){return E})),i.d(e,"f",(function(){return x}));var n=i("ofXK"),a=i("fXoL");class s extends n.J{constructor(){super()}supportsDOMEvents(){return!0}}class o extends s{static makeCurrent(){Object(n.N)(new o)}getProperty(t,e){return t[e]}log(t){window.console&&window.console.log&&window.console.log(t)}logGroup(t){window.console&&window.console.group&&window.console.group(t)}logGroupEnd(){window.console&&window.console.groupEnd&&window.console.groupEnd()}onAndCancel(t,e,i){return t.addEventListener(e,i,!1),()=>{t.removeEventListener(e,i,!1)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){return t.parentNode&&t.parentNode.removeChild(t),t}getValue(t){return t.value}createElement(t,e){return(e=e||this.getDefaultDocument()).createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null}getHistory(){return window.history}getLocation(){return window.location}getBaseHref(t){const e=c||(c=document.querySelector("base"),c)?c.getAttribute("href"):null;return null==e?null:(i=e,r||(r=document.createElement("a")),r.setAttribute("href",i),"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname);var i}resetBaseElement(){c=null}getUserAgent(){return window.navigator.userAgent}performanceNow(){return window.performance&&window.performance.now?window.performance.now():(new Date).getTime()}supportsCookies(){return!0}getCookie(t){return Object(n.M)(document.cookie,t)}}let r,c=null;const l=new a.s("TRANSITION_ID"),d=[{provide:a.d,useFactory:function(t,e,i){return()=>{i.get(a.e).donePromise.then(()=>{const i=Object(n.L)();Array.prototype.slice.apply(e.querySelectorAll("style[ng-transition]")).filter(e=>e.getAttribute("ng-transition")===t).forEach(t=>i.remove(t))})}},deps:[l,n.e,a.t],multi:!0}];class h{static init(){Object(a.bb)(new h)}addToWindow(t){a.sb.getAngularTestability=(e,i=!0)=>{const n=t.findTestabilityInTree(e,i);if(null==n)throw new Error("Could not find testability for element.");return n},a.sb.getAllAngularTestabilities=()=>t.getAllTestabilities(),a.sb.getAllAngularRootElements=()=>t.getAllRootElements(),a.sb.frameworkStabilizers||(a.sb.frameworkStabilizers=[]),a.sb.frameworkStabilizers.push(t=>{const e=a.sb.getAllAngularTestabilities();let i=e.length,n=!1;const s=function(e){n=n||e,i--,0==i&&t(n)};e.forEach((function(t){t.whenStable(s)}))})}findTestabilityInTree(t,e,i){if(null==e)return null;const a=t.getTestability(e);return null!=a?a:i?Object(n.L)().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null}}const u=new a.s("EventManagerPlugins");let p=(()=>{class t{constructor(t,e){this._zone=e,this._eventNameToPlugin=new Map,t.forEach(t=>t.manager=this),this._plugins=t.slice().reverse()}addEventListener(t,e,i){return this._findPluginFor(e).addEventListener(t,e,i)}addGlobalEventListener(t,e,i){return this._findPluginFor(e).addGlobalEventListener(t,e,i)}getZone(){return this._zone}_findPluginFor(t){const e=this._eventNameToPlugin.get(t);if(e)return e;const i=this._plugins;for(let n=0;n<i.length;n++){const e=i[n];if(e.supports(t))return this._eventNameToPlugin.set(t,e),e}throw new Error("No event manager plugin found for event "+t)}}return t.\u0275fac=function(e){return new(e||t)(a.ac(u),a.ac(a.C))},t.\u0275prov=a.Mb({token:t,factory:t.\u0275fac}),t})();class b{constructor(t){this._doc=t}addGlobalEventListener(t,e,i){const a=Object(n.L)().getGlobalEventTarget(this._doc,t);if(!a)throw new Error(`Unsupported event target ${a} for event ${e}`);return this.addEventListener(a,e,i)}}let f=(()=>{class t{constructor(){this._stylesSet=new Set}addStyles(t){const e=new Set;t.forEach(t=>{this._stylesSet.has(t)||(this._stylesSet.add(t),e.add(t))}),this.onStylesAdded(e)}onStylesAdded(t){}getAllStyles(){return Array.from(this._stylesSet)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=a.Mb({token:t,factory:t.\u0275fac}),t})(),m=(()=>{class t extends f{constructor(t){super(),this._doc=t,this._hostNodes=new Set,this._styleNodes=new Set,this._hostNodes.add(t.head)}_addStylesToHost(t,e){t.forEach(t=>{const i=this._doc.createElement("style");i.textContent=t,this._styleNodes.add(e.appendChild(i))})}addHost(t){this._addStylesToHost(this._stylesSet,t),this._hostNodes.add(t)}removeHost(t){this._hostNodes.delete(t)}onStylesAdded(t){this._hostNodes.forEach(e=>this._addStylesToHost(t,e))}ngOnDestroy(){this._styleNodes.forEach(t=>Object(n.L)().remove(t))}}return t.\u0275fac=function(e){return new(e||t)(a.ac(n.e))},t.\u0275prov=a.Mb({token:t,factory:t.\u0275fac}),t})();const g={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/"},v=/%COMP%/g;function _(t,e,i){for(let n=0;n<e.length;n++){let a=e[n];Array.isArray(a)?_(t,a,i):(a=a.replace(v,t),i.push(a))}return i}function y(t){return e=>{if("__ngUnwrap__"===e)return t;!1===t(e)&&(e.preventDefault(),e.returnValue=!1)}}let x=(()=>{class t{constructor(t,e,i){this.eventManager=t,this.sharedStylesHost=e,this.appId=i,this.rendererByCompId=new Map,this.defaultRenderer=new C(t)}createRenderer(t,e){if(!t||!e)return this.defaultRenderer;switch(e.encapsulation){case a.U.Emulated:{let i=this.rendererByCompId.get(e.id);return i||(i=new O(this.eventManager,this.sharedStylesHost,e,this.appId),this.rendererByCompId.set(e.id,i)),i.applyToHost(t),i}case a.U.Native:case a.U.ShadowDom:return new D(this.eventManager,this.sharedStylesHost,t,e);default:if(!this.rendererByCompId.has(e.id)){const t=_(e.id,e.styles,[]);this.sharedStylesHost.addStyles(t),this.rendererByCompId.set(e.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return t.\u0275fac=function(e){return new(e||t)(a.ac(p),a.ac(m),a.ac(a.c))},t.\u0275prov=a.Mb({token:t,factory:t.\u0275fac}),t})();class C{constructor(t){this.eventManager=t,this.data=Object.create(null)}destroy(){}createElement(t,e){return e?document.createElementNS(g[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){t.appendChild(e)}insertBefore(t,e,i){t&&t.insertBefore(e,i)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t,e){let i="string"==typeof t?document.querySelector(t):t;if(!i)throw new Error(`The selector "${t}" did not match any elements`);return e||(i.textContent=""),i}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,i,n){if(n){e=n+":"+e;const a=g[n];a?t.setAttributeNS(a,e,i):t.setAttribute(e,i)}else t.setAttribute(e,i)}removeAttribute(t,e,i){if(i){const n=g[i];n?t.removeAttributeNS(n,e):t.removeAttribute(`${i}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,i,n){n&a.K.DashCase?t.style.setProperty(e,i,n&a.K.Important?"important":""):t.style[e]=i}removeStyle(t,e,i){i&a.K.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,i){t[e]=i}setValue(t,e){t.nodeValue=e}listen(t,e,i){return"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,y(i)):this.eventManager.addEventListener(t,e,y(i))}}class O extends C{constructor(t,e,i,n){super(t),this.component=i;const a=_(n+"-"+i.id,i.styles,[]);e.addStyles(a),this.contentAttr="_ngcontent-%COMP%".replace(v,n+"-"+i.id),this.hostAttr="_nghost-%COMP%".replace(v,n+"-"+i.id)}applyToHost(t){super.setAttribute(t,this.hostAttr,"")}createElement(t,e){const i=super.createElement(t,e);return super.setAttribute(i,this.contentAttr,""),i}}class D extends C{constructor(t,e,i,n){super(t),this.sharedStylesHost=e,this.hostEl=i,this.component=n,this.shadowRoot=n.encapsulation===a.U.ShadowDom?i.attachShadow({mode:"open"}):i.createShadowRoot(),this.sharedStylesHost.addHost(this.shadowRoot);const s=_(n.id,n.styles,[]);for(let a=0;a<s.length;a++){const t=document.createElement("style");t.textContent=s[a],this.shadowRoot.appendChild(t)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,i){return super.insertBefore(this.nodeOrShadowRoot(t),e,i)}removeChild(t,e){return super.removeChild(this.nodeOrShadowRoot(t),e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}}let w=(()=>{class t extends b{constructor(t){super(t)}supports(t){return!0}addEventListener(t,e,i){return t.addEventListener(e,i,!1),()=>this.removeEventListener(t,e,i)}removeEventListener(t,e,i){return t.removeEventListener(e,i)}}return t.\u0275fac=function(e){return new(e||t)(a.ac(n.e))},t.\u0275prov=a.Mb({token:t,factory:t.\u0275fac}),t})();const M=new a.s("HammerGestureConfig");let k=(()=>{class t{constructor(){this.events=[],this.overrides={}}buildHammer(t){const e=new Hammer(t,this.options);e.get("pinch").set({enable:!0}),e.get("rotate").set({enable:!0});for(const i in this.overrides)e.get(i).set(this.overrides[i]);return e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=a.Mb({token:t,factory:t.\u0275fac}),t})();const S=["alt","control","meta","shift"],I={"\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"},P={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"},V={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};let R=(()=>{class t extends b{constructor(t){super(t)}supports(e){return null!=t.parseEventName(e)}addEventListener(e,i,a){const s=t.parseEventName(i),o=t.eventCallback(s.fullKey,a,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Object(n.L)().onAndCancel(e,s.domEventName,o))}static parseEventName(e){const i=e.toLowerCase().split("."),n=i.shift();if(0===i.length||"keydown"!==n&&"keyup"!==n)return null;const a=t._normalizeKey(i.pop());let s="";if(S.forEach(t=>{const e=i.indexOf(t);e>-1&&(i.splice(e,1),s+=t+".")}),s+=a,0!=i.length||0===a.length)return null;const o={};return o.domEventName=n,o.fullKey=s,o}static getEventFullKey(t){let e="",i=function(t){let e=t.key;if(null==e){if(e=t.keyIdentifier,null==e)return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),3===t.location&&P.hasOwnProperty(e)&&(e=P[e]))}return I[e]||e}(t);return i=i.toLowerCase()," "===i?i="space":"."===i&&(i="dot"),S.forEach(n=>{n!=i&&(0,V[n])(t)&&(e+=n+".")}),e+=i,e}static eventCallback(e,i,n){return a=>{t.getEventFullKey(a)===e&&n.runGuarded(()=>i(a))}}static _normalizeKey(t){switch(t){case"esc":return"escape";default:return t}}}return t.\u0275fac=function(e){return new(e||t)(a.ac(n.e))},t.\u0275prov=a.Mb({token:t,factory:t.\u0275fac}),t})(),j=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(a.Mb)({factory:function(){return Object(a.ac)(W)},token:t,providedIn:"root"}),t})();function A(t){return new W(t.get(n.e))}let W=(()=>{class t extends j{constructor(t){super(),this._doc=t}sanitize(t,e){if(null==e)return null;switch(t){case a.M.NONE:return e;case a.M.HTML:return Object(a.hb)(e,"HTML")?Object(a.zb)(e):Object(a.fb)(this._doc,String(e));case a.M.STYLE:return Object(a.hb)(e,"Style")?Object(a.zb)(e):e;case a.M.SCRIPT:if(Object(a.hb)(e,"Script"))return Object(a.zb)(e);throw new Error("unsafe value used in a script context");case a.M.URL:return Object(a.rb)(e),Object(a.hb)(e,"URL")?Object(a.zb)(e):Object(a.gb)(String(e));case a.M.RESOURCE_URL:if(Object(a.hb)(e,"ResourceURL"))return Object(a.zb)(e);throw new Error("unsafe value used in a resource URL context (see http://g.co/ng/security#xss)");default:throw new Error(`Unexpected SecurityContext ${t} (see http://g.co/ng/security#xss)`)}}bypassSecurityTrustHtml(t){return Object(a.ib)(t)}bypassSecurityTrustStyle(t){return Object(a.lb)(t)}bypassSecurityTrustScript(t){return Object(a.kb)(t)}bypassSecurityTrustUrl(t){return Object(a.mb)(t)}bypassSecurityTrustResourceUrl(t){return Object(a.jb)(t)}}return t.\u0275fac=function(e){return new(e||t)(a.ac(n.e))},t.\u0275prov=Object(a.Mb)({factory:function(){return A(Object(a.ac)(a.p))},token:t,providedIn:"root"}),t})();const T=[{provide:a.F,useValue:n.K},{provide:a.G,useValue:function(){o.makeCurrent(),h.init()},multi:!0},{provide:n.e,useFactory:function(){return Object(a.xb)(document),document},deps:[]}],E=Object(a.V)(a.ab,"browser",T),F=[[],{provide:a.db,useValue:"root"},{provide:a.n,useFactory:function(){return new a.n},deps:[]},{provide:u,useClass:w,multi:!0,deps:[n.e,a.C,a.F]},{provide:u,useClass:R,multi:!0,deps:[n.e]},[],{provide:x,useClass:x,deps:[p,m,a.c]},{provide:a.J,useExisting:x},{provide:f,useExisting:m},{provide:m,useClass:m,deps:[n.e]},{provide:a.Q,useClass:a.Q,deps:[a.C]},{provide:p,useClass:p,deps:[u,a.C]},[]];let L=(()=>{class t{constructor(t){if(t)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:a.c,useValue:e.appId},{provide:l,useExisting:a.c},d]}}}return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)(a.ac(t,12))},providers:F,imports:[n.c,a.f]}),t})();"undefined"!=typeof window&&window},jj9e:function(t,e,i){"use strict";i.r(e);var n=i("fXoL"),a=i("MJ5r"),s=i("vWc3"),o=i("tyNb"),r=i("mrSG"),c=i("LRne"),l=i("lJxs"),d=i("pLZG"),h=i("Cfvw"),u=i("zx2A");function p(t,e){return e?i=>i.pipe(p((i,n)=>Object(h.a)(t(i,n)).pipe(Object(l.a)((t,a)=>e(i,t,n,a))))):e=>e.lift(new b(t))}class b{constructor(t){this.project=t}call(t,e){return e.subscribe(new f(t,this.project))}}class f extends u.b{constructor(t,e){super(t),this.project=e,this.hasSubscription=!1,this.hasCompleted=!1,this.index=0}_next(t){this.hasSubscription||this.tryNext(t)}tryNext(t){let e;const i=this.index++;try{e=this.project(t,i)}catch(n){return void this.destination.error(n)}this.hasSubscription=!0,this._innerSub(e)}_innerSub(t){const e=new u.a(this),i=this.destination;i.add(e);const n=Object(u.c)(t,e);n!==e&&i.add(n)}_complete(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()}notifyNext(t){this.destination.next(t)}notifyError(t){this.destination.error(t)}notifyComplete(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()}}var m=i("JIr8"),g=i("sYmb"),v=i("tk/3"),_=i("uqn4"),y=i("4zkx");let x=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.router=i,this.authService=n,this.headerService=a}canActivate(t,e){const i=e.url.replace(/^\/+|\/+$/g,"").split("/");return console.debug("== ROUTE GUARD =="),console.debug(e.url),this.headerService.resetSideNavSelection(),this.authService.getLoginInformations(e.url).pipe(Object(l.a)(t=>!!t&&(null===this.authService.getToken()?(this.authService.setCachedUrl(e.url.replace(/^\//g,"")),console.debug("Aucun token trouv\xe9 ! Redirection sur login ..."),this.authService.logout(!1,!0),!1):void 0)),Object(d.a)(()=>null!==this.authService.getToken()),p(()=>this.authService.getCurrentUserInfo()),Object(l.a)(t=>"ABS"===this.headerService.user.status?(this.router.navigate(["/activate-user"]),!1):(this.headerService.hideSideBar=i.filter(t=>["signatureBook","content"].indexOf(t)>-1).length>0,this.headerService.sideBarAdmin=i.filter(t=>"administration"===t).length>0||i.filter(t=>"profile"===t).length>0,!0)),Object(m.a)(t=>(console.log(t),"User must change his password"===t.error.errors?this.router.navigate(["/password-modification"]):Object(c.a)(!1))))}}return t.\u0275fac=function(e){return new(e||t)(n.ac(g.e),n.ac(v.b),n.ac(o.c),n.ac(_.a),n.ac(y.a))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),C=(()=>{class t{constructor(t){this.translate=t}canDeactivate(t,e,i,n){return Object(r.a)(this,void 0,void 0,(function*(){return(t.isToolModified()&&!t.isModalOpen()||void 0!==t.appDocumentViewer&&t.appDocumentViewer.isEditingTemplate())&&confirm(this.translate.instant("lang.saveModifiedData"))&&(yield t.saveModificationBeforeClose()),!0}))}}return t.\u0275fac=function(e){return new(e||t)(n.ac(g.e))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();var O=i("0EQZ"),D=i("AXEc"),w=i("A6w4"),M=i("/t3+"),k=i("bTqV"),S=i("NFeN"),I=i("XhcP"),P=i("ofXK"),V=i("Xa2L"),R=i("MutI"),j=i("bSwM"),A=i("Qu3c"),W=i("FKr1"),T=i("f0Cb");function E(t,e){1&t&&(n.Wb(0,"div",9),n.Rb(1,"mat-spinner",10),n.Vb())}function F(t,e){1&t&&(n.Ub(0),n.Rb(1,"br"),n.Qc(2),n.ic(3,"translate"),n.Rb(4,"br"),n.Tb()),2&t&&(n.Db(2),n.Sc(" ",n.jc(3,1,"lang.missingBasket"),""))}function L(t,e){1&t&&(n.Wb(0,"span",23),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.selectAll")," "))}function Q(t,e){1&t&&(n.Wb(0,"span",24),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.selectAll")," "))}function N(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item",26),n.dc("mouseover",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(3).showActions(e)}))("mouseout",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(3).hideActions(e)})),n.Wb(1,"mat-icon",17),n.Wb(2,"mat-checkbox",27),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("change",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc(3);return e?a.selectionBaskets.toggle(i):null})),n.Vb(),n.Vb(),n.Wb(3,"h4",28),n.Wb(4,"span",29),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(3).selectionBaskets.toggle(e)})),n.ic(5,"translate"),n.Qc(6),n.Wb(7,"span",30),n.Qc(8),n.Vb(),n.Wb(9,"span",23),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc(3);n.Db(2),n.oc("checked",e.selectionBaskets.isSelected(t)),n.Db(2),n.tc("matTooltip","",t.basket_name," [",t.group_desc,"] ",n.jc(5,9,"lang.redirectedTo")," ",t.userToDisplay,""),n.Db(2),n.Sc(" ",t.basket_name," "),n.Db(2),n.Rc(t.group_desc),n.Db(2),n.Tc(" ",n.jc(11,11,"lang.redirectedTo")," ",t.userToDisplay,"")}}function z(t,e){if(1&t&&(n.Ub(0),n.Oc(1,N,12,13,"mat-list-item",25),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",null!=t.userToDisplay)}}function B(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list"),n.Wb(1,"mat-list-item"),n.Wb(2,"mat-icon",17),n.Wb(3,"mat-checkbox",18),n.dc("change",(function(e){n.Dc(t);const i=n.hc(2);return e?i.masterToggleBaskets(e):null})),n.ic(4,"translate"),n.Vb(),n.Vb(),n.Wb(5,"p",19),n.Oc(6,L,3,3,"span",20),n.Oc(7,Q,3,3,"span",21),n.Vb(),n.Vb(),n.Rb(8,"mat-divider"),n.Oc(9,z,2,1,"ng-container",22),n.Vb()}if(2&t){const t=n.hc(2);n.Db(3),n.pc("matTooltip",n.jc(4,5,"lang.selectAll")),n.oc("checked",t.selectionBaskets.hasValue()),n.Db(3),n.oc("ngIf",!t.selectionBaskets.hasValue()),n.Db(1),n.oc("ngIf",t.selectionBaskets.hasValue()),n.Db(2),n.oc("ngForOf",t.user.redirectedBaskets)}}function U(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",31),n.Qc(1),n.ic(2,"translate"),n.Rb(3,"br"),n.Rb(4,"br"),n.Wb(5,"button",32),n.dc("click",(function(){return n.Dc(t),n.hc(2).activateUser()})),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Wb(8,"button",32),n.dc("click",(function(){return n.Dc(t),n.hc(2).logout()})),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.Sc(" ",n.jc(2,3,"lang.missingChoose"),""),n.Db(5),n.Rc(n.jc(7,5,"lang.validate")),n.Db(3),n.Rc(n.jc(10,7,"lang.cancel")))}function H(t,e){if(1&t&&(n.Wb(0,"div",11),n.Wb(1,"div",12),n.Qc(2),n.ic(3,"translate"),n.Rb(4,"br"),n.Qc(5),n.ic(6,"translate"),n.Rb(7,"br"),n.Oc(8,F,5,3,"ng-container",13),n.Vb(),n.Rb(9,"div",14),n.Wb(10,"div",14),n.Oc(11,B,10,7,"mat-list",13),n.Vb(),n.Rb(12,"div",14),n.Rb(13,"div",15),n.Oc(14,U,11,9,"div",16),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Sc(" ",n.jc(3,5,"lang.missingAdvert"),""),n.Db(3),n.Sc(" ",n.jc(6,7,"lang.missingAdvert2"),""),n.Db(3),n.oc("ngIf",t.user.redirectedBaskets.length>0),n.Db(3),n.oc("ngIf",t.user.redirectedBaskets.length>0),n.Db(3),n.oc("ngIf",!t.loading)}}let G=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.authService=i,this.headerService=n,this.notify=a,this.router=s,this.appService=o,this.user={baskets:[]},this.userAbsenceModel=[],this.basketsToRedirect=[],this.loading=!1,this.selectedIndex=0,this.selectionBaskets=new O.c(!0,[]),this.myBasketExpansionPanel=!1}masterToggleBaskets(t){t.checked?this.user.redirectedBaskets.forEach(t=>{this.selectionBaskets.select(t)}):this.selectionBaskets.clear()}ngOnInit(){this.loading=!0,"ABS"===this.headerService.user.status?this.http.get("../rest/currentUser/profile").subscribe(t=>{this.user=t,this.user.baskets.forEach((t,e)=>{this.user.baskets[e].disabled=!1,this.user.redirectedBaskets.forEach(i=>{t.basket_id==i.basket_id&&t.basket_owner==i.basket_owner&&(this.user.baskets[e].disabled=!0)})}),this.loading=!1}):this.router.navigate(["/home"])}showActions(t){$("#"+t.basket_id+"_"+t.group_id).show()}hideActions(t){$("#"+t.basket_id+"_"+t.group_id).hide()}activateUser(){this.http.put("../rest/users/"+this.headerService.user.id+"/status",{status:"OK"}).subscribe(()=>{this.headerService.user.status="OK";let t="";this.user.redirectedBaskets.forEach(e=>{-1!==this.selectionBaskets.selected.map(t=>t.basket_id).indexOf(e.basket_id)&&-1!==this.selectionBaskets.selected.map(t=>t.group_id).indexOf(e.group_id)&&(""!==t&&(t+="&redirectedBasketIds[]="),t+=e.id)}),""!==t?this.http.delete("../rest/users/"+this.headerService.user.id+"/redirectedBaskets?redirectedBasketIds[]="+t).subscribe(t=>{this.router.navigate(["/home"]),this.notify.success(this.translate.instant("lang.absOff"))},t=>{this.notify.error(t.error.errors)}):(this.router.navigate(["/home"]),this.notify.success(this.translate.instant("lang.absOff")))},t=>{this.notify.error(t.error.errors)})}logout(){this.authService.logout()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(_.a),n.Qb(y.a),n.Qb(D.a),n.Qb(o.c),n.Qb(w.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:12,vars:8,consts:[[1,"admin-container",2,"margin-top","-63px"],["color","primary",1,"admin-toolbar"],["mat-button",""],[1,"maarchLogoWhiteFull",3,"svgIcon"],[1,"admin-toolbar-title","text-center"],[2,"flex","1 1 auto"],["autosize","",1,"admin-sidenav-container"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"text-center",2,"margin-top","50px"],[4,"ngIf"],[1,"col-sm-4",2,"overflow","hidden"],[2,"clear","both"],["class","text-center","style","position:relative; top:50px;",4,"ngIf"],["mat-list-icon","","color","primary"],["color","primary",3,"checked","matTooltip","change"],["mat-line",""],["style","opacity: 0.5;font-style: italic;font-size: 80%;",4,"ngIf"],["style","opacity: 1;font-style: normal;font-size: 100%;",4,"ngIf"],[4,"ngFor","ngForOf"],[2,"opacity","0.5","font-style","italic","font-size","80%"],[2,"opacity","1","font-style","normal","font-size","100%"],["style","cursor: pointer;",3,"mouseover","mouseout",4,"ngIf"],[2,"cursor","pointer",3,"mouseover","mouseout"],["color","primary",3,"checked","click","change"],["mat-line","","color","primary",2,"display","flex","align-items","center"],[2,"flex","2","overflow","hidden","text-overflow","ellipsis",3,"matTooltip","click"],[1,"label","label-primary",2,"font-weight","normal"],[1,"text-center",2,"position","relative","top","50px"],["mat-raised-button","","color","primary","type","button",3,"click"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"mat-toolbar",1),n.Wb(2,"button",2),n.Rb(3,"mat-icon",3),n.Vb(),n.Wb(4,"h1",4),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Rb(7,"span",5),n.Vb(),n.Wb(8,"mat-sidenav-container",6),n.Wb(9,"mat-sidenav-content"),n.Oc(10,E,2,0,"div",7),n.Oc(11,H,15,9,"div",8),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Ib("admin-is-mobile",e.appService.getViewMode()),n.Db(3),n.oc("svgIcon",e.appService.getViewMode()?"maarchLogoOnly":"maarchLogo"),n.Db(2),n.Rc(n.jc(6,6,"lang.missingAdvertTitle")),n.Db(5),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[M.a,k.b,S.a,I.e,I.f,P.t,V.c,R.a,R.d,R.c,j.a,A.b,W.l,T.a,P.s],pipes:[g.d],encapsulation:2}),t})();var X=i("3Pt+"),q=i("0IaG"),K=i("Wp6s"),Y=i("kmnG"),J=i("qFsG");function Z(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Vb())}function tt(t,e){1&t&&(n.Qc(0),n.ic(1,"translate")),2&t&&n.Rc(n.jc(1,1,"lang.passwordModification"))}function et(t,e){1&t&&(n.Wb(0,"mat-error"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.requiredField")))}function it(t,e){1&t&&(n.Wb(0,"mat-hint"),n.Rb(1,"i",32),n.Wb(2,"span",33),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Rc(n.jc(4,1,"lang.passwordValid")))}function nt(t,e){1&t&&(n.Wb(0,"mat-hint"),n.Rb(1,"i",32),n.Wb(2,"span",33),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Rc(n.jc(4,1,"lang.passwordMatch")))}function at(t,e){if(1&t&&n.Rb(0,"div",34),2&t){const t=n.hc(2);n.oc("innerHTML",t.otherRuleText,n.Ec)}}const st=function(t){return[t]};function ot(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",17),n.Wb(1,"form",18),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Oc(2,tt,2,3,"ng-template"),n.Wb(3,"mat-form-field",19),n.Rb(4,"input",20),n.ic(5,"translate"),n.Wb(6,"mat-icon",21),n.dc("click",(function(){n.Dc(t);const e=n.hc();return e.hidePassword=!e.hidePassword})),n.Vb(),n.Oc(7,et,3,3,"mat-error",22),n.Vb(),n.Wb(8,"div",23),n.Qc(9),n.Vb(),n.Wb(10,"mat-form-field",19),n.Rb(11,"input",24,25),n.ic(13,"translate"),n.Wb(14,"mat-icon",21),n.dc("click",(function(){n.Dc(t);const e=n.hc();return e.hidePassword=!e.hidePassword})),n.Vb(),n.Oc(15,it,5,3,"mat-hint",22),n.Wb(16,"mat-error"),n.Qc(17),n.Vb(),n.Vb(),n.Wb(18,"mat-form-field",19),n.Rb(19,"input",26,27),n.ic(21,"translate"),n.Wb(22,"mat-icon",21),n.dc("click",(function(){n.Dc(t);const e=n.hc();return e.hidePassword=!e.hidePassword})),n.Vb(),n.Oc(23,nt,5,3,"mat-hint",22),n.Wb(24,"mat-error"),n.Qc(25),n.ic(26,"translate"),n.Vb(),n.Vb(),n.Wb(27,"div",28),n.Wb(28,"button",29),n.Qc(29),n.ic(30,"translate"),n.Vb(),n.Wb(31,"button",30),n.dc("click",(function(){return n.Dc(t),n.hc().logout()})),n.Qc(32),n.ic(33,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Oc(34,at,1,1,"div",31),n.Vb()}if(2&t){const t=n.hc();n.Db(1),n.oc("formGroup",t.firstFormGroup),n.Db(3),n.pc("placeholder",n.jc(5,20,"lang.typeCurrentPassword")),n.oc("type",t.hidePassword?"password":"text"),n.Db(2),n.oc("ngClass",n.vc(32,st,t.hidePassword?"fa-eye-slash":"fa-eye")),n.Db(1),n.oc("ngIf",t.firstFormGroup.controls.currentPasswordCtrl.hasError("required")),n.Db(2),n.Rc(t.ruleText),n.Db(2),n.pc("placeholder",n.jc(13,22,"lang.typeNewPassword")),n.oc("type",t.hidePassword?"password":"text"),n.Db(3),n.oc("ngClass",n.vc(34,st,t.hidePassword?"fa-eye-slash":"fa-eye")),n.Db(1),n.oc("ngIf",t.validPassword),n.Db(2),n.Rc(t.getErrorMessage()),n.Db(2),n.pc("placeholder",n.jc(21,24,"lang.retypeNewPassword")),n.oc("type",t.hidePassword?"password":"text"),n.Db(3),n.oc("ngClass",n.vc(36,st,t.hidePassword?"fa-eye-slash":"fa-eye")),n.Db(1),n.oc("ngIf",!t.firstFormGroup.controls.retypePasswordCtrl.hasError("mismatch")&&""!=t.firstFormGroup.controls.retypePasswordCtrl.value),n.Db(2),n.Sc("",n.jc(26,26,"lang.passwordNotMatch")," !"),n.Db(3),n.oc("disabled",!t.firstFormGroup.valid),n.Db(1),n.Rc(n.jc(30,28,"lang.validate")),n.Db(3),n.Rc(n.jc(33,30,"lang.logout")),n.Db(2),n.oc("ngIf",t.passwordRules.renewal.enabled||t.passwordRules.historyLastUse.enabled)}}function rt(t,e){if(1&t&&(n.Wb(0,"p"),n.Qc(1),n.ic(2,"translate"),n.Wb(3,"b"),n.Qc(4),n.Vb(),n.Qc(5,", "),n.Rb(6,"br"),n.Qc(7),n.ic(8,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Sc(" ",n.jc(2,4,"lang.hello")," "),n.Db(3),n.Tc("",t.data.user.firstname," ",t.data.user.lastname,""),n.Db(3),n.Sc("",n.jc(8,6,"lang.changePasswordInfo"),". ")}}function ct(t,e){1&t&&(n.Wb(0,"p"),n.Rb(1,"mat-icon",4),n.Wb(2,"span",5),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Rc(n.jc(4,1,"lang.passwordChanged")))}function lt(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",6),n.dc("click",(function(){return n.Dc(t),n.hc().dialogRef.close()})),n.Qc(1,"Ok"),n.Vb()}}function dt(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",6),n.dc("click",(function(){return n.Dc(t),n.hc().redirect()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.homePage")))}let ht=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.authService=i,this.headerService=n,this.notify=a,this._formBuilder=s,this.dialog=o,this.appService=r,this.config={},this.loading=!1,this.user={},this.ruleText="",this.hidePassword=!0,this.passLength=!1,this.arrValidator=[],this.validPassword=!1,this.matchPassword=!1,this.isLinear=!1,this.passwordRules={minLength:{enabled:!1,value:0},complexityUpper:{enabled:!1,value:0},complexityNumber:{enabled:!1,value:0},complexitySpecial:{enabled:!1,value:0},renewal:{enabled:!1,value:0},historyLastUse:{enabled:!1,value:0}},this.passwordModel={currentPassword:"",newPassword:"",reNewPassword:""},this.user=JSON.parse(atob(this.authService.getToken().split(".")[1])).user}ngOnInit(){setTimeout(()=>{this.config={panelClass:"maarch-modal",data:{user:this.user,state:"BEGIN"},disableClose:!0},this.dialogRef=this.dialog.open(ut,this.config)},0),this.http.get("../rest/passwordRules").subscribe(t=>{const e=[],i=[],n=[];e.push(X.I.required),t.rules.forEach(t=>{"minLength"===t.label?(this.passwordRules.minLength.enabled=t.enabled,this.passwordRules.minLength.value=t.value,t.enabled&&(e.push(X.I.minLength(this.passwordRules.minLength.value)),i.push(t.value+" "+this.translate.instant("lang.password"+t.label)))):"complexityUpper"===t.label?(this.passwordRules.complexityUpper.enabled=t.enabled,this.passwordRules.complexityUpper.value=t.value,t.enabled&&(e.push(this.regexValidator(new RegExp("[A-Z]"),{complexityUpper:""})),i.push(this.translate.instant("lang.password"+t.label)))):"complexityNumber"===t.label?(this.passwordRules.complexityNumber.enabled=t.enabled,this.passwordRules.complexityNumber.value=t.value,t.enabled&&(e.push(this.regexValidator(new RegExp("[0-9]"),{complexityNumber:""})),i.push(this.translate.instant("lang.password"+t.label)))):"complexitySpecial"===t.label?(this.passwordRules.complexitySpecial.enabled=t.enabled,this.passwordRules.complexitySpecial.value=t.value,t.enabled&&(e.push(this.regexValidator(new RegExp("[^A-Za-z0-9]"),{complexitySpecial:""})),i.push(this.translate.instant("lang.password"+t.label)))):"renewal"===t.label?(this.passwordRules.renewal.enabled=t.enabled,this.passwordRules.renewal.value=t.value,t.enabled&&n.push(this.translate.instant("lang.password"+t.label)+" <b>"+t.value+" "+this.translate.instant("lang.days")+"</b>. "+this.translate.instant("lang.password2"+t.label)+".")):"historyLastUse"===t.label&&(this.passwordRules.historyLastUse.enabled=t.enabled,this.passwordRules.historyLastUse.value=t.value,t.enabled&&n.push(this.translate.instant("lang.passwordhistoryLastUseDesc")+" <b>"+t.value+"</b> "+this.translate.instant("lang.passwordhistoryLastUseDesc2")+"."))}),this.ruleText=i.join(", "),this.otherRuleText=n.join("<br/>"),this.firstFormGroup.controls.newPasswordCtrl.setValidators(e)},t=>{this.notify.error(t.error.errors)}),this.firstFormGroup=this._formBuilder.group({newPasswordCtrl:[""],retypePasswordCtrl:["",X.I.compose([X.I.required])],currentPasswordCtrl:["",X.I.compose([X.I.required])]},{validator:this.matchValidator})}regexValidator(t,e){return i=>i.value?t.test(i.value)?null:e:null}matchValidator(t){return t.controls.newPasswordCtrl.value!==t.controls.retypePasswordCtrl.value&&(t.controls.retypePasswordCtrl.setErrors({mismatch:!0}),{mismatch:!0})}getErrorMessage(){return this.firstFormGroup.controls.retypePasswordCtrl.setErrors(this.firstFormGroup.controls.newPasswordCtrl.value!==this.firstFormGroup.controls.retypePasswordCtrl.value?{mismatch:!0}:null),this.firstFormGroup.controls.newPasswordCtrl.hasError("required")?this.translate.instant("lang.requiredField")+" !":this.firstFormGroup.controls.newPasswordCtrl.hasError("minlength")&&this.passwordRules.minLength.enabled?this.passwordRules.minLength.value+" "+this.translate.instant("lang.passwordminLength")+" !":null!=this.firstFormGroup.controls.newPasswordCtrl.errors&&void 0!==this.firstFormGroup.controls.newPasswordCtrl.errors.complexityUpper&&this.passwordRules.complexityUpper.enabled?this.translate.instant("lang.passwordcomplexityUpper")+" !":null!=this.firstFormGroup.controls.newPasswordCtrl.errors&&void 0!==this.firstFormGroup.controls.newPasswordCtrl.errors.complexityNumber&&this.passwordRules.complexityNumber.enabled?this.translate.instant("lang.passwordcomplexityNumber")+" !":null!=this.firstFormGroup.controls.newPasswordCtrl.errors&&void 0!==this.firstFormGroup.controls.newPasswordCtrl.errors.complexitySpecial&&this.passwordRules.complexitySpecial.enabled?this.translate.instant("lang.passwordcomplexitySpecial")+" !":(this.firstFormGroup.controls.newPasswordCtrl.setErrors(null),this.validPassword=!0,"")}onSubmit(){this.passwordModel.currentPassword=this.firstFormGroup.controls.currentPasswordCtrl.value,this.passwordModel.newPassword=this.firstFormGroup.controls.newPasswordCtrl.value,this.passwordModel.reNewPassword=this.firstFormGroup.controls.retypePasswordCtrl.value,this.http.put("../rest/users/"+this.user.id+"/password",this.passwordModel).subscribe(()=>{this.config={panelClass:"maarch-modal",data:{state:"END"},disableClose:!0},this.dialogRef=this.dialog.open(ut,this.config)},t=>{this.notify.error(t.error.errors)})}logout(){this.authService.logout()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(_.a),n.Qb(y.a),n.Qb(D.a),n.Qb(X.h),n.Qb(q.b),n.Qb(w.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:21,vars:20,consts:[[1,"admin-container",2,"margin-top","-63px"],["color","primary",1,"admin-toolbar"],["mat-button","",3,"click"],[1,"maarchLogoFull",3,"svgIcon"],[1,"admin-toolbar-title"],[2,"flex","1 1 auto"],["mat-button",""],["mat-list-icon","",1,"fa","fa-user","fa-2x",2,"color","white","margin","0px 12px 8px 0px"],["autosize","",1,"admin-sidenav-container"],["fixedTopGap","56",3,"mode","fixedInViewport","opened"],["snav",""],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content","style","display: flex;justify-content: center;align-items: center;",4,"ngIf"],["fixedTopGap","56","position","end",3,"mode","fixedInViewport","opened"],["snav2",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content",2,"display","flex","justify-content","center","align-items","center"],[2,"max-width","700px",3,"formGroup","ngSubmit"],[2,"padding","10px"],["matInput","","formControlName","currentPasswordCtrl","required","",3,"placeholder","type"],["matSuffix","",1,"fa","fa-2x",3,"ngClass","click"],[4,"ngIf"],[2,"text-align","center","color","rgba(0,0,0,0.54)","font-size","75%"],["matInput","","formControlName","newPasswordCtrl","required","",3,"placeholder","type"],["inputPasswd",""],["matInput","","required","","formControlName","retypePasswordCtrl",3,"placeholder","type"],["inputPasswd2",""],[1,"col-md-12","text-center",2,"padding","10px"],["mat-raised-button","","type","submit","color","primary",3,"disabled"],["mat-raised-button","","type","button","color","default",3,"click"],["class","alert alert-warning","role","alert","style","text-align:center;left:0px;bottom: 0px;position: absolute;width: 100%;margin: 0;",3,"innerHTML",4,"ngIf"],["color","accent",1,"fa","fa-check"],["color","accent"],["role","alert",1,"alert","alert-warning",2,"text-align","center","left","0px","bottom","0px","position","absolute","width","100%","margin","0",3,"innerHTML"]],template:function(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",0),n.Wb(1,"mat-toolbar",1),n.Wb(2,"button",2),n.dc("click",(function(){return n.Dc(t),n.zc(15).toggle()})),n.Rb(3,"mat-icon",3),n.Vb(),n.Wb(4,"h1",4),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Rb(7,"span",5),n.Wb(8,"button",6),n.Rb(9,"mat-icon",7),n.Qc(10),n.ic(11,"uppercase"),n.ic(12,"uppercase"),n.Vb(),n.Vb(),n.Wb(13,"mat-sidenav-container",8),n.Rb(14,"mat-sidenav",9,10),n.Wb(16,"mat-sidenav-content"),n.Oc(17,Z,2,0,"div",11),n.Oc(18,ot,35,38,"mat-card",12),n.Vb(),n.Rb(19,"mat-sidenav",13,14),n.Vb(),n.Vb()}2&t&&(n.Ib("admin-is-mobile",e.appService.getViewMode()),n.Db(3),n.oc("svgIcon",e.appService.getViewMode()?"maarchLogoOnly":"maarchLogo"),n.Db(2),n.Sc("",n.jc(6,14,"lang.passwordModification")," "),n.Db(5),n.Tc("",n.jc(11,16,e.user.firstname.charAt(0)),". ",n.jc(12,18,e.user.lastname),""),n.Db(4),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",!e.appService.getViewMode()),n.Db(3),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",(e.appService.getViewMode(),!1)))},directives:[M.a,k.b,S.a,R.c,I.e,I.d,I.f,P.t,V.c,K.a,X.K,X.v,X.m,Y.c,J.b,X.d,X.u,X.k,X.F,Y.j,P.q,Y.b,Y.f],pipes:[g.d,P.G],encapsulation:2}),t})(),ut=(()=>{class t{constructor(t,e,i,n){this.http=t,this.router=e,this.data=i,this.dialogRef=n}redirect(){this.router.navigate(["/home"]),this.dialogRef.close()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(v.b),n.Qb(o.c),n.Qb(q.a),n.Qb(q.h))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:8,vars:4,consts:[[1,"mat-dialog-content-container"],[4,"ngIf"],[1,"divider-modal"],["mat-raised-button","","color","primary",3,"click",4,"ngIf"],["color","primary",1,"fa","fa-check-circle","fa-2x"],[2,"padding-left","10px"],["mat-raised-button","","color","primary",3,"click"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"mat-dialog-content"),n.Oc(2,rt,9,8,"p",1),n.Oc(3,ct,5,3,"p",1),n.Vb(),n.Rb(4,"span",2),n.Wb(5,"mat-dialog-actions"),n.Oc(6,lt,2,0,"button",3),n.Oc(7,dt,3,3,"button",3),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.oc("ngIf","BEGIN"==e.data.state),n.Db(1),n.oc("ngIf","END"==e.data.state),n.Db(3),n.oc("ngIf","BEGIN"==e.data.state),n.Db(1),n.oc("ngIf","END"==e.data.state))},directives:[q.f,P.t,q.c,S.a,k.b],pipes:[g.d],encapsulation:2}),t})();var pt=i("Kj3r"),bt=i("/uUt"),ft=i("eIep"),mt=i("vkgz"),gt=i("7EHt"),vt=i("+0xr"),_t=i("rH+9");function yt(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",5),n.dc("click",(function(){return n.Dc(t),n.hc(2).headerService.sideNavLeft.open()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",6),n.Vb()}2&t&&n.pc("title",n.jc(1,1,"lang.openSidePanel"))}function xt(t,e){if(1&t&&n.Rb(0,"i"),2&t){const t=n.hc(2);n.Gb("",t.headerService.headerMessageIcon," headerIcon")}}function Ct(t,e){if(1&t&&(n.Wb(0,"div",1),n.Oc(1,yt,3,3,"button",2),n.Oc(2,xt,1,3,"i",3),n.Qc(3),n.Wb(4,"span",4),n.Qc(5),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",!t.headerService.sideNavLeft.opened),n.Db(1),n.oc("ngIf",""!==t.headerService.headerMessageIcon),n.Db(1),n.Sc(" ",t.headerService.headerMessage," "),n.Db(2),n.Rc(t.headerService.subHeaderMessage)}}let Ot=(()=>{class t{constructor(t,e){this.translate=t,this.headerService=e,this.config={}}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(y.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["header-left"]],inputs:{snavLeft:"snavLeft"},decls:1,vars:1,consts:[["class","bg-head-title-label",4,"ngIf"],[1,"bg-head-title-label"],["mat-icon-button","","style","font-size:20px;",3,"title","click",4,"ngIf"],[3,"class",4,"ngIf"],[1,"admin-toolbar-title-small"],["mat-icon-button","",2,"font-size","20px",3,"title","click"],[1,"fa","fa-stream"]],template:function(t,e){1&t&&n.Oc(0,Ct,6,4,"div",0),2&t&&n.oc("ngIf",void 0!==e.headerService.sideNavLeft)},directives:[P.t,k.b,S.a],pipes:[g.d],styles:[".bg-head-title-label[_ngcontent-%COMP%] .mat-icon-button[_ngcontent-%COMP%]{position:absolute;margin-left:-35px;margin-top:-10px}.headerIcon[_ngcontent-%COMP%]{font-size:22px}"]}),t})();var Dt=i("eiH7"),wt=i("TU8p");const Mt=[[["","md-fab",""],["","mat-fab",""]]],kt=["[md-fab], [mat-fab]"],St=[[["","md-mini-fab",""],["","mat-mini-fab",""]]],It=["[md-mini-fab], [mat-mini-fab]"],Pt=[[["smd-fab-trigger"]],[["smd-fab-actions"]]],Vt=["smd-fab-trigger","smd-fab-actions"];let Rt=(()=>{class t{constructor(t){this._parent=t,this.spin=!1}_onClick(t){this._parent.fixed||(this._parent.toggle(),t.stopPropagation())}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(Object(n.X)(()=>At)))},t.\u0275cmp=n.Kb({type:t,selectors:[["smd-fab-trigger"]],hostVars:2,hostBindings:function(t,e){1&t&&n.dc("click",(function(t){return e._onClick(t)})),2&t&&n.Ib("smd-spin",e.spin)},inputs:{spin:"spin"},ngContentSelectors:kt,decls:1,vars:0,template:function(t,e){1&t&&(n.nc(Mt),n.mc(0))},encapsulation:2}),t})(),jt=(()=>{class t{constructor(t,e){this._parent=t,this.renderer=e}ngAfterContentInit(){this._buttons.changes.subscribe(()=>{this.initButtonStates(),this._parent.setActionsVisibility()}),this.initButtonStates()}initButtonStates(){this._buttons.toArray().forEach((t,e)=>{this.renderer.addClass(t._getHostElement(),"smd-fab-action-item"),this.changeElementStyle(t._getHostElement(),"z-index",""+(23-e))})}show(){this._buttons&&this._buttons.toArray().forEach((t,e)=>{let i,n=0;"scale"==this._parent.animationMode?(n=3+65*e,i="scale(1)"):i=this.getTranslateFunction("0"),this.changeElementStyle(t._getHostElement(),"transition-delay",n+"ms"),this.changeElementStyle(t._getHostElement(),"opacity","1"),this.changeElementStyle(t._getHostElement(),"transform",i)})}hide(){this._buttons&&this._buttons.toArray().forEach((t,e)=>{let i,n="1",a=0;"scale"==this._parent.animationMode?(a=3-65*e,i="scale(0)",n="0"):i=this.getTranslateFunction(55*(e+1)-5*e+"px"),this.changeElementStyle(t._getHostElement(),"transition-delay",a+"ms"),this.changeElementStyle(t._getHostElement(),"opacity",n),this.changeElementStyle(t._getHostElement(),"transform",i)})}getTranslateFunction(t){let e=this._parent.direction;return("up"==e||"down"==e?"translateY":"translateX")+"("+("down"==e||"right"==e?"-":"")+t+")"}changeElementStyle(t,e,i){this.renderer.setStyle(t,e,i)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(Object(n.X)(()=>At)),n.Qb(n.I))},t.\u0275cmp=n.Kb({type:t,selectors:[["smd-fab-actions"]],contentQueries:function(t,e,i){var a;1&t&&n.Jb(i,k.b,!1),2&t&&n.yc(a=n.ec())&&(e._buttons=a)},ngContentSelectors:It,decls:1,vars:0,template:function(t,e){1&t&&(n.nc(St),n.mc(0))},encapsulation:2}),t})(),At=(()=>{class t{constructor(t,e){this.elementRef=t,this.renderer=e,this.isInitialized=!1,this._direction="up",this._open=!1,this._animationMode="fling",this.fixed=!1,this.openChange=new n.o}get open(){return this._open}set open(t){let e=this._open;this._open=t,e!=this._open&&(this.openChange.emit(this._open),this.isInitialized&&this.setActionsVisibility())}get direction(){return this._direction}set direction(t){let e=this._direction;this._direction=t,e!=this.direction&&(this._setElementClass(e,!1),this._setElementClass(this.direction,!0),this.isInitialized&&this.setActionsVisibility())}get animationMode(){return this._animationMode}set animationMode(t){let e=this._animationMode;this._animationMode=t,e!=this._animationMode&&(this._setElementClass(e,!1),this._setElementClass(this.animationMode,!0),this.isInitialized&&Promise.resolve(null).then(()=>this.open=!1))}ngAfterContentInit(){this.isInitialized=!0,this.setActionsVisibility(),this._setElementClass(this.direction,!0),this._setElementClass(this.animationMode,!0)}toggle(){this.open=!this.open}_onClick(){!this.fixed&&this.open&&(this.open=!1)}setActionsVisibility(){this.open?this._childActions.show():this._childActions.hide()}_setElementClass(t,e){e?this.renderer.addClass(this.elementRef.nativeElement,"smd-"+t):this.renderer.removeClass(this.elementRef.nativeElement,"smd-"+t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(n.I))},t.\u0275cmp=n.Kb({type:t,selectors:[["smd-fab-speed-dial"]],contentQueries:function(t,e,i){var a;1&t&&n.Jc(i,jt,!0),2&t&&n.yc(a=n.ec())&&(e._childActions=a.first)},hostVars:2,hostBindings:function(t,e){1&t&&n.dc("click",(function(){return e._onClick()})),2&t&&n.Ib("smd-opened",e.open)},inputs:{fixed:"fixed",open:"open",direction:"direction",animationMode:"animationMode"},outputs:{openChange:"openChange"},ngContentSelectors:Vt,decls:3,vars:0,consts:[[1,"smd-fab-speed-dial-container"]],template:function(t,e){1&t&&(n.nc(Pt),n.Wb(0,"div",0),n.mc(1),n.mc(2,1),n.Vb())},styles:["smd-fab-speed-dial{position:absolute;display:inline-block}smd-fab-speed-dial.smd-opened .smd-fab-speed-dial-container{height:auto}smd-fab-speed-dial.smd-opened .smd-fab-speed-dial-container smd-fab-trigger.smd-spin{transform:rotate(1turn)}smd-fab-speed-dial.smd-opened .smd-fab-speed-dial-container smd-fab-actions{height:auto}smd-fab-speed-dial .smd-fab-speed-dial-container{height:0;position:relative;display:flex;align-items:center;z-index:20}smd-fab-speed-dial .smd-fab-speed-dial-container smd-fab-trigger{pointer-events:auto;z-index:24}smd-fab-speed-dial .smd-fab-speed-dial-container smd-fab-trigger.smd-spin{transition:all .6s cubic-bezier(.4,0,.2,1)}smd-fab-speed-dial .smd-fab-speed-dial-container smd-fab-actions{height:0;display:flex}smd-fab-speed-dial.smd-fling .smd-fab-speed-dial-container smd-fab-actions .smd-fab-action-item{display:block;opacity:1;transition:all .3s cubic-bezier(.55,0,.55,.2)}smd-fab-speed-dial.smd-scale .smd-fab-speed-dial-container smd-fab-actions .smd-fab-action-item{transform:scale(0);transition:all .3s cubic-bezier(.55,0,.55,.2);transition-duration:.14286s}smd-fab-speed-dial.smd-down .smd-fab-speed-dial-container{flex-direction:column}smd-fab-speed-dial.smd-down .smd-fab-speed-dial-container smd-fab-trigger{order:1}smd-fab-speed-dial.smd-down .smd-fab-speed-dial-container smd-fab-actions{flex-direction:column;order:2}smd-fab-speed-dial.smd-down .smd-fab-speed-dial-container smd-fab-actions .smd-fab-action-item{margin-top:10px}smd-fab-speed-dial.smd-up .smd-fab-speed-dial-container{flex-direction:column}smd-fab-speed-dial.smd-up .smd-fab-speed-dial-container smd-fab-trigger{order:2}smd-fab-speed-dial.smd-up .smd-fab-speed-dial-container smd-fab-actions{flex-direction:column-reverse;order:1}smd-fab-speed-dial.smd-up .smd-fab-speed-dial-container smd-fab-actions .smd-fab-action-item{margin-bottom:10px}smd-fab-speed-dial.smd-left .smd-fab-speed-dial-container{flex-direction:row}smd-fab-speed-dial.smd-left .smd-fab-speed-dial-container smd-fab-trigger{order:2}smd-fab-speed-dial.smd-left .smd-fab-speed-dial-container smd-fab-actions{flex-direction:row-reverse;order:1}smd-fab-speed-dial.smd-left .smd-fab-speed-dial-container smd-fab-actions .smd-fab-action-item{margin-right:10px}smd-fab-speed-dial.smd-right .smd-fab-speed-dial-container{flex-direction:row}smd-fab-speed-dial.smd-right .smd-fab-speed-dial-container smd-fab-trigger{order:1}smd-fab-speed-dial.smd-right .smd-fab-speed-dial-container smd-fab-actions{flex-direction:row;order:2}smd-fab-speed-dial.smd-right .smd-fab-speed-dial-container smd-fab-actions .smd-fab-action-item{margin-left:10px}"],encapsulation:2}),t})();var Wt=i("1YbM"),Tt=i("aEDk");function Et(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",5),n.Wb(1,"button",6),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc().gotToMenu(e)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",7),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc();n.Db(1),n.pc("matTooltip",n.jc(2,7,t.label)),n.oc("id",t.id),n.Db(2),n.Gb("fa ",t.style,""),n.pc("matBadge",e.headerService.nbResourcesFollowed),n.pc("matBadgeHidden","followed"!=t.id)}}function Ft(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",15),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc(2).$implicit;return n.hc().onSpeedDialFabClicked(i,a)})),n.Wb(1,"span",16),n.Qc(2),n.ic(3,"shorten"),n.Vb(),n.Rb(4,"mat-icon",17),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2).$implicit;n.oc("id",i.id),n.Db(2),n.Rc(n.lc(3,2,t.label,20,"..."))}}function Lt(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",8),n.Wb(1,"smd-fab-speed-dial",9,10),n.dc("mouseenter",(function(){return n.Dc(t),n.zc(2).open=!0}))("mouseleave",(function(){return n.Dc(t),n.zc(2).open=!1})),n.Wb(3,"smd-fab-trigger",11),n.Wb(4,"button",12),n.Rb(5,"mat-icon",13),n.Vb(),n.Vb(),n.Wb(6,"smd-fab-actions"),n.Oc(7,Ft,5,6,"button",14),n.ic(8,"sortBy"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(5),n.Gb("fa ",t.style," spin360"),n.Db(2),n.oc("ngForOf",n.kc(8,4,t.groups,"label"))}}function Qt(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Et,4,9,"span",3),n.Oc(2,Lt,9,7,"span",4),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf","indexing"==t.id&&t.groups.length<=1||"indexing"!=t.id),n.Db(1),n.oc("ngIf","indexing"==t.id&&t.groups.length>1)}}function Nt(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"a",3),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().goTo(i)})),n.Rb(2,"mat-icon",4),n.Wb(3,"p",5),n.Qc(4),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=e.$implicit;n.Db(4),n.Sc(" ",t.label," ")}}let zt=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this._router=i,this.dialog=n,this.appService=a,this.privilegeService=s,this.headerService=o,this.config={},this.speedDialFabButtons=[],this.speedDialFabColumnDirection="column",this.router=i}ngOnInit(){}onSpeedDialFabClicked(t,e){this.router.navigate(["/indexing/"+t.id])}gotToMenu(t){"indexing"===t.id?this.router.navigate([t.route+"/"+t.groups[0].id]):!0===t.angular?this.router.navigate([t.route]):location.href=t.route}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.c),n.Qb(q.b),n.Qb(w.a),n.Qb(Dt.a),n.Qb(y.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["menu-shortcut"]],decls:5,vars:1,consts:[[2,"position","relative"],[1,"button-row",2,"padding-left","10px","padding-right","10px","display","flex","width","300px","margin-top","-10px","margin-bottom","10px"],[4,"ngFor","ngForOf"],["style","flex:1;text-align: left;padding: 5px;",4,"ngIf"],["style","flex:1;text-align: left;padding: 5px;position: relative;",4,"ngIf"],[2,"flex","1","text-align","left","padding","5px"],["color","default","mat-fab","","matTooltipPosition","above",1,"followedShortcut",2,"z-index","9999",3,"id","matTooltip","click"],[2,"height","auto","font-size","22px",3,"matBadge","matBadgeHidden"],[2,"flex","1","text-align","left","padding","5px","position","relative"],["direction","down","animationMode","fling","fixed","false",3,"mouseenter","mouseleave"],["myFab",""],["spin","true"],["color","default","mat-fab",""],[2,"font-size","22px"],["color","primary","mat-mini-fab","",3,"id","click",4,"ngFor","ngForOf"],["color","primary","mat-mini-fab","",3,"id","click"],["color","primary",1,"speedDialLabel",2,"display","none","position","absolute","margin-left","20px","margin-top","-5px"],[1,"fa","fa-plus"]],template:function(t,e){1&t&&(n.Rb(0,"mat-nav-list",0),n.Wb(1,"mat-nav-list"),n.Wb(2,"div",1),n.Oc(3,Qt,3,2,"ng-container",2),n.Vb(),n.Vb(),n.Rb(4,"mat-divider")),2&t&&(n.Db(3),n.oc("ngForOf",e.privilegeService.shortcuts))},directives:[R.h,P.s,T.a,P.t,k.b,A.b,S.a,wt.a,At,Rt,jt],pipes:[g.d,Wt.a,Tt.p],styles:[".button-row[_ngcontent-%COMP%] .mat-fab[_ngcontent-%COMP%]{border:2px solid #135f7f;color:#135f7f}.mat-fab[_ngcontent-%COMP%] .mat-button-wrapper{padding:0}.speedDialLabel[_ngcontent-%COMP%]{margin-left:-220px!important;width:200px;text-align:right;z-index:0;font-weight:700}.smd-opened[_ngcontent-%COMP%] .speedDialLabel[_ngcontent-%COMP%]{transition:opacity 1s ease-in!important;display:block!important}.mat-icon[_ngcontent-%COMP%]{height:auto!important}.followedShortcut[_ngcontent-%COMP%] .mat-badge-content{width:auto;min-width:25px;min-height:25px;text-align:center;align-items:center;padding:2px;font-size:15px;top:-23px!important;right:-22px!important}"]}),t})(),Bt=(()=>{class t{constructor(t,e,i,n){this.http=t,this.router=e,this.data=i,this.dialogRef=n}goTo(t){this.router.navigate(["/indexing/"+t.id]),this.dialogRef.close()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(v.b),n.Qb(o.c),n.Qb(q.a),n.Qb(q.h))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:7,vars:4,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title","","color","primary"],[4,"ngFor","ngForOf"],["mat-list-item","",3,"click"],["color","primary","mat-list-icon","",1,"fa","fa-users"],["mat-line",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h2",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-dialog-content"),n.Wb(5,"mat-nav-list"),n.Oc(6,Nt,5,1,"ng-container",2),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,2,"lang.chooseIndexationProfil")),n.Db(4),n.oc("ngForOf",e.data.indexingGroups))},directives:[q.i,q.f,R.h,P.s,R.d,S.a,R.c,W.l],pipes:[g.d],styles:[".mat-dialog-content[_ngcontent-%COMP%]{max-height: 65vh;width:600px;}"]}),t})();var Ut=i("5cI5");function $t(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-checkbox",10),n.dc("change",(function(){return n.Dc(t),n.hc(2).hideModal()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.hideModal")))}function Ht(t,e){if(1&t&&(n.Wb(0,"div",7),n.Rb(1,"div",8),n.Oc(2,$t,3,3,"mat-checkbox",9),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("innerHTML",t.data.msg,n.Ec),n.Db(1),n.oc("ngIf",null!==t.idModal)}}let Gt=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.data=e,this.dialogRef=i,this.headerService=n,this.localStorage=a,this.idModal=null,void 0!==this.data.idModal&&(this.idModal=this.data.idModal),null===this.data.msg&&(this.data.msg=""),void 0===this.data.buttonCancel&&(this.data.buttonCancel=this.translate.instant("lang.cancel")),void 0===this.data.buttonValidate&&(this.data.buttonValidate=this.translate.instant("lang.ok"))}hideModal(){""!==this.idModal?this.localStorage.save(`modal_${this.idModal}_${this.headerService.user.id}`,!0):alert("No idModal provided!")}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(q.a),n.Qb(q.h),n.Qb(y.a),n.Qb(Ut.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:10,vars:4,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content","",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions",""],["color","primary","mat-raised-button","",1,"actions",3,"click"],["color","","mat-raised-button","","cdkFocusInitial","",1,"actions",3,"click"],["mat-dialog-content",""],[1,"alert-message","alert-message-info",3,"innerHTML"],["color","primary",3,"change",4,"ngIf"],["color","primary",3,"change"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Oc(3,Ht,3,2,"div",2),n.Rb(4,"span",3),n.Wb(5,"div",4),n.Wb(6,"button",5),n.dc("click",(function(){return e.dialogRef.close("ok")})),n.Qc(7),n.Vb(),n.Wb(8,"button",6),n.dc("click",(function(){return e.dialogRef.close("")})),n.Qc(9),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.title),n.Db(1),n.oc("ngIf",""!==e.data.msg),n.Db(4),n.Rc(e.data.buttonValidate),n.Db(2),n.Rc(e.data.buttonCancel))},directives:[q.i,P.t,q.c,k.b,q.f,j.a],pipes:[g.d],styles:[".alert-message-info[_ngcontent-%COMP%]{margin:0;font-size:16px}"]}),t})();var Xt=i("nYR2"),qt=i("SIQe"),Kt=i("M9IT"),Yt=i("NpuA");let Jt=(()=>{let t=class{constructor(){this._papa=Yt}parse(t,e){return this._papa.parse(t,e)}unparse(t,e){return this._papa.unparse(t,e)}setLocalChunkSize(t){this._papa.LocalChunkSize=t}setRemoteChunkSize(t){this._papa.RemoteChunkSize=t}setDefaultDelimiter(t){this._papa.DefaultDelimiter=t}get badDelimiters(){return this._papa.BAD_DELIMITERS}get recordSeparator(){return this._papa.RECORD_SEP}get unitSeparator(){return this._papa.UNIT_SEP}get workersSupported(){return this._papa.WORKERS_SUPPORTED}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(n.Mb)({factory:function(){return new t},token:t,providedIn:"root"}),t})(),Zt=(()=>{class t{constructor(t,e,i,n){this.http=t,this.translate=e,this.notify=i,this.functions=n,this.coreFields=[{identifier:"doctype",label:this.translate.instant("lang.doctype"),icon:"fa-suitcase",unit:"mail",type:"select",system:!0,mandatory:!0,enabled:!0,default_value:"",values:[]},{identifier:"subject",label:this.translate.instant("lang.subject"),icon:"fa-quote-left",unit:"mail",type:"string",system:!0,mandatory:!0,enabled:!0,default_value:"",values:[]}],this.fields=[{identifier:"resId",label:this.translate.instant("lang.getResId"),icon:"fa-envelope",type:"integer",default_value:[],values:[],enabled:!0},{identifier:"chrono",label:this.translate.instant("lang.chrono"),icon:"fa-compass",type:"string",default_value:[],values:[],enabled:!0,indexingHide:!0},{identifier:"status",label:this.translate.instant("lang.status"),icon:"fa-mail-bulk",type:"select",default_value:[],values:[],enabled:!0,indexingHide:!0},{identifier:"category",label:this.translate.instant("lang.category_id"),icon:"fa-map-signs",type:"select",default_value:[],values:[],enabled:!0,indexingHide:!0},{identifier:"creationDate",label:this.translate.instant("lang.creationDate"),icon:"fa-calendar-day",type:"date",default_value:[],values:[],enabled:!0,indexingHide:!0},{identifier:"recipients",label:this.translate.instant("lang.getRecipients"),icon:"fa-user",type:"autocomplete",default_value:[],values:[],enabled:!0},{identifier:"priority",label:this.translate.instant("lang.priority"),icon:"fa-traffic-light",type:"select",default_value:null,values:[],enabled:!0},{identifier:"confidentiality",label:this.translate.instant("lang.confidential"),icon:"fa-user-secret",type:"radio",default_value:null,values:[{id:!0,label:this.translate.instant("lang.yes")},{id:!1,label:this.translate.instant("lang.no")}],enabled:!0},{identifier:"initiator",label:this.translate.instant("lang.initiatorEntityAlt"),icon:"fa-user",type:"select",default_value:null,values:[],enabled:!0},{identifier:"departureDate",label:this.translate.instant("lang.departureDate"),icon:"fa-calendar-check",type:"date",default_value:null,values:[],enabled:!0},{identifier:"processLimitDate",label:this.translate.instant("lang.processLimitDate"),icon:"fa-stopwatch",type:"date",default_value:null,values:[],enabled:!0},{identifier:"tags",label:this.translate.instant("lang.tags"),icon:"fa-tags",type:"autocomplete",default_value:[],values:["/rest/autocomplete/tags","/rest/tags"],enabled:!0},{identifier:"senders",label:this.translate.instant("lang.getSenders"),icon:"fa-address-book",type:"autocomplete",default_value:[],values:["/rest/autocomplete/correspondents"],enabled:!0},{identifier:"destination",label:this.translate.instant("lang.destination"),icon:"fa-sitemap",type:"select",default_value:null,values:[],enabled:!0},{identifier:"folders",label:this.translate.instant("lang.folders"),icon:"fa-folder",type:"autocomplete",default_value:[],values:["/rest/autocomplete/folders","/rest/folders"],enabled:!0},{identifier:"documentDate",label:this.translate.instant("lang.docDate"),icon:"fa-calendar-day",unit:"mail",type:"date",default_value:null,values:[],enabled:!0},{identifier:"arrivalDate",label:this.translate.instant("lang.arrivalDate"),icon:"fa-calendar",unit:"mail",type:"date",default_value:null,values:[],enabled:!0},{identifier:"registeredMail_type",label:this.translate.instant("lang.registeredMailType"),icon:"fa-file",type:"select",default_value:null,values:[{id:"2D",label:this.translate.instant("lang.registeredMail_2D")},{id:"2C",label:this.translate.instant("lang.registeredMail_2C")},{id:"RW",label:this.translate.instant("lang.registeredMail_RW")}],enabled:!0,searchHide:!0},{identifier:"registeredMail_issuingSite",label:this.translate.instant("lang.issuingSite"),icon:"fa-warehouse",type:"issuingSite",default_value:null,values:[],enabled:!0},{identifier:"registeredMail_number",label:this.translate.instant("lang.registeredMailNumber"),icon:"fa-barcode",type:"string",default_value:null,values:[],enabled:!1,searchHide:!0},{identifier:"registeredMail_warranty",label:this.translate.instant("lang.warrantyLevel"),icon:"fa-shield-alt",type:"radio",default_value:null,values:[{id:"R1",label:"R1"},{id:"R2",label:"R2"},{id:"R3",label:"R3"}],enabled:!0,searchHide:!0},{identifier:"registeredMail_letter",label:this.translate.instant("lang.letter"),icon:"fa-envelope",type:"radio",default_value:null,values:[{id:!0,label:this.translate.instant("lang.yes")},{id:!1,label:this.translate.instant("lang.no")}],enabled:!0,searchHide:!0},{identifier:"registeredMail_recipient",label:this.translate.instant("lang.registeredMailRecipient"),icon:"fa-address-book",type:"contact",default_value:null,values:[],enabled:!0},{identifier:"registeredMail_reference",label:this.translate.instant("lang.registeredMailReference"),icon:"fa-dolly-flatbed",type:"string",default_value:null,values:[],enabled:!0},{identifier:"registeredMail_receivedDate",label:this.translate.instant("lang.registeredMailReceivedDate"),icon:"fa-calendar-check",type:"date",default_value:null,values:[],enabled:!0},{identifier:"fulltext",label:this.translate.instant("lang.fulltext"),icon:"fa-file-alt",type:"string",default_value:[],values:[],enabled:!0,indexingHide:!0},{identifier:"closingDate",label:this.translate.instant("lang.closingDate"),icon:"fa-stopwatch",type:"date",default_value:[],values:[],enabled:!0},{identifier:"notes",label:this.translate.instant("lang.note"),icon:"fa-comments",type:"string",default_value:[],values:[],enabled:!0,indexingHide:!0},{identifier:"barcode",label:this.translate.instant("lang.barcode"),icon:"fa-barcode",type:"string",default_value:[],values:[],enabled:!0,indexingHide:!0},{identifier:"attachment_type",label:this.translate.instant("lang.attachmentType"),icon:"fa-paperclip",type:"select",default_value:[],values:[],enabled:!0,indexingHide:!0},{identifier:"attachment_creationDate",label:`${this.translate.instant("lang.creationDate")} (${this.translate.instant("lang.attachmentShort")})`,icon:"fa-calendar-day",type:"date",default_value:[],values:[],enabled:!0,indexingHide:!0},{identifier:"groupSign",label:this.translate.instant("lang.groupSign"),icon:"fa-user-friends",type:"select",default_value:[],values:[],enabled:!0,indexingHide:!0},{identifier:"senderDepartment",label:this.translate.instant("lang.sendersDepartment"),icon:"fa-map",type:"select",default_value:[],values:[],enabled:!0,indexingHide:!0},{identifier:"retentionFrozen",label:this.translate.instant("lang.retentionRuleFrozen"),icon:"fa-snowflake",type:"select",default_value:[],values:[{id:!0,label:this.translate.instant("lang.yes")},{id:!1,label:this.translate.instant("lang.no")}],enabled:!0,indexingHide:!0},{identifier:"binding",label:this.translate.instant("lang.bindingMail"),icon:"fa-exclamation",type:"select",default_value:[],values:[{id:!0,label:this.translate.instant("lang.yes")},{id:!1,label:this.translate.instant("lang.no")}],enabled:!0,indexingHide:!0}],this.customFields=[],this.roleFields=[],this.mappingdata={getPriority:"priority",getCategory:"category",getDoctype:"doctype",getRecipients:"recipients",getSenders:"senders",getSignatories:"role_sign",getModificationDate:"modificationDate",getOpinionLimitDate:"role_visa",getFolders:"folders",getResId:"resId",getBarcode:"barcode",getRegisteredMailRecipient:"registeredMail_recipient",getRegisteredMailReference:"registeredMail_reference",getRegisteredMailIssuingSite:"registeredMail_issuingSite",chronoNumberShort:"chrono"}}getCoreFields(t=""){const e=JSON.parse(JSON.stringify(this.coreFields));return""===t?e:e.filter(e=>!e[t])}getFields(t=""){const e=JSON.parse(JSON.stringify(this.fields));return""===t?e:e.filter(e=>!e[t])}getCustomFields(){return new Promise((t,e)=>{this.http.get("../rest/customFields").pipe(Object(mt.a)(t=>{this.customFields=t.customFields.map(t=>(t.identifier="indexingCustomField_"+t.id,t.icon="fa-hashtag",t.system=!1,t.enabled=!0,t.SQLMode=t.SQLMode,t.default_value=["integer","string","date"].indexOf(t.type)>-1&&!this.functions.empty(t.values)?t.values[0].key:"banAutocomplete"===t.type?[]:null,t.values=t.values.length>0?t.values.map(t=>({id:t.key,label:t.label})):t.values,t))}),Object(Xt.a)(()=>t(this.customFields)),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}getField(t){let e=this.getCoreFields().concat(this.getFields());return e=e.concat(this.customFields),e=e.concat(this.roleFields),e.filter(e=>e.identifier===t)[0]}getAllFields(){return Object(r.a)(this,void 0,void 0,(function*(){const t=yield this.getCustomFields(),e=yield this.getRolesFields();let i=this.getCoreFields().concat(this.getFields());return i=i.concat(t),i=i.concat(e),i}))}getAllSearchFields(){return Object(r.a)(this,void 0,void 0,(function*(){const t=yield this.getCustomFields(),e=yield this.getRolesFields();let i=this.getCoreFields("searchHide").concat(this.getFields("searchHide"));return i=i.concat(t),i=i.concat(e),i}))}getRolesFields(){return new Promise((t,e)=>{this.http.get("../rest/roles").pipe(Object(mt.a)(t=>{const e=[];t.roles.forEach(t=>{e.push({identifier:"role_"+t.id,label:t.label,icon:"dest"===t.id?"fa-user-edit":"fa-users",type:"select",default_value:null,values:[],enabled:!0})}),e.push({identifier:"role_visa",label:this.translate.instant("lang.visaUser"),icon:"fa-user-check",type:"select",default_value:null,values:[],enabled:!0}),e.push({identifier:"role_sign",label:this.translate.instant("lang.signUser"),icon:"fa-user-tie",type:"select",default_value:null,values:[],enabled:!0}),this.roleFields=e}),Object(Xt.a)(()=>t(this.roleFields)),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}formatData(){}}return t.\u0275fac=function(e){return new(e||t)(n.ac(v.b),n.ac(g.e),n.ac(D.a),n.ac(_t.a))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();var te=i("1jcm"),ee=i("d3UM");let ie=(()=>{class t{constructor(){this.onFileDropped=new n.o,this.disabled=!1,this.background="none",this.opacity="1"}onDragOver(t){this.disabled||(t.preventDefault(),t.stopPropagation(),this.background="#9ecbec",this.opacity="0.8")}onDragLeave(t){this.disabled||(t.preventDefault(),t.stopPropagation(),this.background="rgba(255,255,255,0)",this.opacity="1")}ondrop(t){if(!this.disabled){t.preventDefault(),t.stopPropagation(),this.background="rgba(255,255,255,0)",this.opacity="1";let e=t.dataTransfer.files;e.length>0&&this.onFileDropped.emit(e)}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["","appUploadFileDragDrop",""]],hostVars:4,hostBindings:function(t,e){1&t&&n.dc("dragover",(function(t){return e.onDragOver(t)}))("dragleave",(function(t){return e.onDragLeave(t)}))("drop",(function(t){return e.ondrop(t)})),2&t&&n.Lc("background-color",e.background)("opacity",e.opacity)},inputs:{disabled:"disabled"},outputs:{onFileDropped:"onFileDropped"}}),t})();var ne=i("STbY"),ae=i("iadO");function se(t,e){1&t&&(n.Rb(0,"div",19),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.infoImportregisteredMails"),n.Ec)}function oe(t,e){if(1&t&&(n.Wb(0,"mat-option",20),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function re(t,e){1&t&&(n.Ub(0),n.Wb(1,"div",21),n.Rb(2,"mat-spinner"),n.Vb(),n.Tb())}function ce(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",27),n.dc("click",(function(){return n.Dc(t),n.hc(),n.zc(1).click()}))("onFileDropped",(function(e){return n.Dc(t),n.hc(2).dndUploadFile(e)})),n.Wb(1,"div"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(2),n.Sc(" ",n.jc(3,1,"lang.dndFileCsvDesc")," "))}function le(t,e){1&t&&(n.Wb(0,"div",28),n.Wb(1,"div",29),n.Rb(2,"mat-paginator",30,31),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.oc("length",100)("hidePageSize",!0)("pageSize",10))}function de(t,e){if(1&t&&(n.Wb(0,"mat-option",20),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}function he(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Rb(1,"i",44),n.ic(2,"translate"),n.Qc(3,"\xa0"),n.Wb(4,"b",45),n.ic(5,"translate"),n.Qc(6),n.Vb(),n.Qc(7," \xa0"),n.Rb(8,"i",46),n.Qc(9,"\xa0 "),n.Rb(10,"i",47),n.ic(11,"translate"),n.Qc(12,"\xa0 "),n.Wb(13,"mat-form-field",48),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.ic(14,"translate"),n.Wb(15,"mat-select",49),n.dc("ngModelChange",(function(e){n.Dc(t);const i=n.hc(2).$implicit;return n.hc(3).associatedColumns[i.id]=e}))("selectionChange",(function(e){n.Dc(t);const i=n.hc(2).$implicit;return n.hc(3).changeColumn(i,e.value)})),n.Rb(16,"mat-option",50),n.Oc(17,de,2,2,"mat-option",12),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=n.hc(2).$implicit,e=n.hc(3);n.Db(1),n.oc("title",n.jc(2,7,"lang.dbColumn")),n.Db(3),n.oc("title",n.jc(5,9,"lang.dbColumn")),n.Db(2),n.Rc(t.label),n.Db(4),n.oc("title",n.jc(11,11,"lang.csvColumn")),n.Db(3),n.oc("title",n.jc(14,13,"lang.csvColumn")),n.Db(2),n.oc("ngModel",e.associatedColumns[t.id]),n.Db(2),n.oc("ngForOf",e.csvColumns)}}function ue(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",57),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc(4).$implicit;return n.hc(3).changeColumn(a,i.id)})),n.Wb(1,"span"),n.Qc(2),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(2),n.Rc(t.label)}}function pe(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"button",52),n.Wb(2,"b",53),n.Qc(3),n.Vb(),n.Rb(4,"mat-icon",54),n.Vb(),n.Wb(5,"mat-menu",null,55),n.Oc(7,ue,3,1,"button",56),n.Vb(),n.Tb()),2&t){const t=n.zc(6),e=n.hc(3).$implicit;n.Db(1),n.oc("matMenuTriggerFor",t),n.Db(2),n.Rc(e.label),n.Db(4),n.oc("ngForOf",e.values)}}function be(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field",58),n.Wb(1,"input",59),n.dc("dateChange",(function(e){n.Dc(t);const i=n.hc(3).$implicit;return n.hc(3).changeColumn(i,e.value)})),n.Vb(),n.Rb(2,"mat-datepicker",null,60),n.Vb(),n.Wb(4,"button",61),n.dc("click",(function(){return n.Dc(t),n.zc(3).open()})),n.Wb(5,"b",9),n.Qc(6),n.Vb(),n.Rb(7,"mat-icon",54),n.Vb()}if(2&t){const t=n.zc(3),e=n.hc(3).$implicit;n.Db(1),n.oc("matDatepicker",t),n.Db(5),n.Rc(e.label)}}function fe(t,e){if(1&t&&(n.Oc(0,pe,8,3,"ng-container",13),n.Oc(1,be,8,2,"ng-template",null,51,n.Pc)),2&t){const t=n.zc(2),e=n.hc(2).$implicit;n.oc("ngIf","departureDate"!==e.id)("ngIfElse",t)}}function me(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",42),n.Oc(1,he,18,15,"ng-container",13),n.Oc(2,fe,3,2,"ng-template",null,43,n.Pc),n.Vb()),2&t){const t=n.zc(3),e=n.hc().$implicit;n.Db(1),n.oc("ngIf",!e.form)("ngIfElse",t)}}function ge(t,e){if(1&t&&(n.Wb(0,"mat-cell",42),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc().$implicit,a=n.hc(3);n.Db(1),n.Sc(" ",a.getLabel(i.id,t[i.id])," ")}}function ve(t,e){if(1&t&&(n.Ub(0),n.Ub(1,39),n.Oc(2,me,4,2,"mat-header-cell",40),n.Oc(3,ge,2,1,"mat-cell",41),n.Tb(),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("matColumnDef",t.id)}}function _e(t,e){1&t&&n.Rb(0,"mat-header-row")}function ye(t,e){1&t&&n.Rb(0,"mat-row")}function xe(t,e){if(1&t&&(n.Wb(0,"div",32),n.Wb(1,"div",33),n.Wb(2,"mat-table",34,35),n.Oc(4,ve,4,1,"ng-container",36),n.Oc(5,_e,1,0,"mat-header-row",37),n.Oc(6,ye,1,0,"mat-row",38),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.Lc("width",300*t.contactColumns.length,"px"),n.oc("dataSource",t.dataSource),n.Db(2),n.oc("ngForOf",t.contactColumns),n.Db(1),n.oc("matHeaderRowDef",t.getcontactColumnsIds()),n.Db(1),n.oc("matRowDefColumns",t.getcontactColumnsIds())}}function Ce(t,e){if(1&t){const t=n.Xb();n.Wb(0,"input",22,23),n.dc("change",(function(e){return n.Dc(t),n.hc().uploadCsv(e)})),n.Vb(),n.Oc(2,ce,4,3,"div",24),n.Oc(3,le,4,3,"div",25),n.Oc(4,xe,7,6,"div",26)}if(2&t){const t=n.hc();n.Db(2),n.oc("ngIf",0===t.csvData.length),n.Db(1),n.oc("ngIf",t.csvData.length>0),n.Db(1),n.oc("ngIf",t.csvData.length>0)}}function Oe(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",62),n.dc("click",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc();n.oc("disabled",t.loading),n.Db(1),n.Rc(n.jc(2,2,"lang.validate"))}}let De=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c,l,d){this.translate=t,this.http=e,this.notify=i,this.functionsService=n,this.localStorage=a,this.headerService=s,this.dialog=o,this.dialogRef=r,this.papa=c,this.indexingFields=l,this.data=d,this.loading=!1,this.registeredMailFields=["registeredMail_issuingSite","registeredMail_warranty","registeredMail_type","departureDate","registeredMail_letter"],this.contactColumns=[{id:"company",label:this.translate.instant("lang.contactsParameters_company")},{id:"civility",label:this.translate.instant("lang.contactsParameters_civility")},{id:"firstname",label:this.translate.instant("lang.contactsParameters_firstname")},{id:"lastname",label:this.translate.instant("lang.contactsParameters_lastname")},{id:"department",label:this.translate.instant("lang.contactsParameters_department")},{id:"addressAdditional1",label:this.translate.instant("lang.contactsParameters_addressAdditional1")},{id:"addressNumber",label:this.translate.instant("lang.contactsParameters_addressNumber")},{id:"addressStreet",label:this.translate.instant("lang.contactsParameters_addressStreet")},{id:"addressAdditional2",label:this.translate.instant("lang.contactsParameters_addressAdditional2")},{id:"addressPostcode",label:this.translate.instant("lang.contactsParameters_addressPostcode")},{id:"addressTown",label:this.translate.instant("lang.contactsParameters_addressTown")},{id:"registeredMail_reference",label:this.translate.instant("lang.registeredMailReference")}],this.csvColumns=[],this.indexingModels=[],this.delimiters=[";",",","\t"],this.currentDelimiter=";",this.associatedColumns={company:"0",civility:"1",firstname:"3",lastname:"2",addressAdditional1:"5",addressStreet:"4",addressAdditional2:"6",addressPostcode:"7",addressTown:"8",registeredMail_reference:"9"},this.dataSource=new vt.p(null),this.hasHeader=!1,this.csvData=[],this.contactData=[],this.countAll=0,this.countAdd=0,this.countUp=0}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.registeredMailFields.forEach(t=>{const e=this.indexingFields.getField(t);this.contactColumns.unshift({id:e.identifier,label:e.label,values:e.values,form:!0})}),yield this.getRegisteredMailIndexingModels(),yield this.getIssuingSites(),yield this.getDefaultValues()}))}getRegisteredMailIndexingModels(){return new Promise(t=>{this.http.get("../rest/indexingModels").pipe(Object(l.a)(t=>t.indexingModels.filter(t=>"registeredMail"===t.category&&null===t.master).map(t=>({id:t.id,label:t.label}))),Object(mt.a)(e=>{e.length>0?(this.indexingModels=e,this.currentIndexingModel=this.indexingModels[0].id,t(!0)):(this.dialogRef.close(),this.notify.error(this.translate.instant("lang.noRegisteredMailModelAvailaible")))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}getIssuingSites(){return new Promise(t=>{this.http.get("../rest/registeredMail/sites").pipe(Object(mt.a)(e=>{e.sites.length>0?(this.contactColumns.filter(t=>"registeredMail_issuingSite"===t.id)[0].values=e.sites.map(t=>({id:t.id,label:t.label})),t(!0)):(this.dialogRef.close(),this.notify.error(this.translate.instant("lang.noIssuingSitesAvailaible")))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}getLabel(t,e){return"registeredMail_issuingSite"!==t||this.functionsService.empty(e)?[!0,!1].indexOf(e)>-1?this.translate.instant("lang."+e):this.functionsService.isDate(e)?this.functionsService.formatDateObjectToDateString(e):e:this.contactColumns.filter(t=>"registeredMail_issuingSite"===t.id)[0].values.filter(t=>t.id===e)[0].label}getDefaultValues(){return new Promise(t=>{this.http.get("../rest/indexingModels/"+this.currentIndexingModel).pipe(Object(mt.a)(t=>{this.registeredMailFields.forEach(e=>{"departureDate"===e?"_TODAY"===this.contactColumns.filter(t=>t.id===e)[0].default_value?this.contactColumns.filter(t=>t.id===e)[0].default_value=new Date:this.contactColumns.filter(t=>t.id===e)[0].default_value=this.functionsService.empty(this.contactColumns.filter(t=>t.id===e)[0].default_value)?new Date:this.functionsService.formatFrenchDateToObjectDate(t.indexingModel.fields.filter(t=>t.identifier===e)[0].default_value):this.contactColumns.filter(t=>t.id===e)[0].default_value=t.indexingModel.fields.filter(t=>t.identifier===e)[0].default_value}),this.currentDoctype=t.indexingModel.fields.filter(t=>"doctype"===t.identifier)[0].default_value}),Object(Xt.a)(()=>t(!0)),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}getcontactColumnsIds(){return this.contactColumns.map(t=>t.id)}changeColumn(t,e){this.contactData=[];for(let i=this.hasHeader?1:0;i<this.csvData.length;i++){const n=this.csvData[i],a={};this.contactColumns.forEach(i=>{t.form?t.id===i.id?(n[t.id]=e,a[i.id]=e):a[i.id]=n[this.associatedColumns[i.id]]:a[i.id]=t.id===i.id?n[this.csvColumns.filter(t=>t===e)[0]]:n[this.associatedColumns[i.id]]}),this.contactData.push(a)}setTimeout(()=>{this.dataSource=new vt.p(this.contactData),this.dataSource.paginator=this.paginator},0)}uploadCsv(t){if(t.target.files&&t.target.files[0]&&("text/csv"===t.target.files[0].type||"application/vnd.ms-excel"===t.target.files[0].type)){this.loading=!0;let e=[];const i=new FileReader;i.readAsText(t.target.files[0]),i.onload=t=>{this.papa.parse(t.target.result,{complete:t=>{e=t.data,e=e.filter(t=>t.length===e[0].length);let i=[],n={};this.setCsvColumns(e[0]),this.countAll=this.hasHeader?e.length-1:e.length;for(let a=0;a<e.length;a++)n={},i=e[a],i.forEach((t,e)=>{n[this.csvColumns[e]]=t}),this.csvData.push(n);this.initData(),this.localStorage.save("importContactFields_"+this.headerService.user.id,this.currentDelimiter),this.loading=!1}})}}else this.dialog.open(qt.a,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.notAllowedExtension")+" !",msg:this.translate.instant("lang.file")+" : <b>"+t.target.files[0].name+"</b>, "+this.translate.instant("lang.type")+" : <b>"+t.target.files[0].type+"</b><br/><br/><u>"+this.translate.instant("lang.allowedExtensions")+"</u> : <br/>text/csv"}})}setCsvColumns(t=null){this.csvColumns=t.filter(t=>this.functionsService.empty(t)).length>0?Object.keys(t).map((t,e)=>""+e):t}toggleHeader(){this.hasHeader=!this.hasHeader,this.countAll=this.hasHeader?this.csvData.length-1:this.csvData.length,this.hasHeader?(this.countAdd=this.csvData.filter((t,e)=>e>0&&this.functionsService.empty(t[this.associatedColumns.id])).length,this.countUp=this.csvData.filter((t,e)=>e>0&&!this.functionsService.empty(t[this.associatedColumns.id])).length):(this.countAdd=this.csvData.filter((t,e)=>this.functionsService.empty(t[this.associatedColumns.id])).length,this.countUp=this.csvData.filter((t,e)=>!this.functionsService.empty(t[this.associatedColumns.id])).length),this.initData()}initData(){this.contactData=[];for(let t=this.hasHeader?1:0;t<this.csvData.length;t++){const e=this.csvData[t],i={};this.contactColumns.forEach((n,a)=>{const s=this.csvColumns.indexOf(n.label);n.form?(this.associatedColumns[n.id]=n.id,this.csvData[t][n.id]=n.default_value,i[n.id]=n.default_value):s>-1?(this.associatedColumns[n.id]=this.csvColumns[s],i[n.id]=e[this.csvColumns[s]]):this.functionsService.empty(this.associatedColumns[n.id])?(this.associatedColumns[n.id]=e[a],i[n.id]=e[a]):i[n.id]=e[this.associatedColumns[n.id]]}),this.contactData.push(i)}setTimeout(()=>{this.dataSource=new vt.p(this.contactData),this.dataSource.paginator=this.paginator},0)}dndUploadFile(t){this.uploadCsv({target:{files:[t[0]]}})}onSubmit(){let t=null;const e=[];let i="";this.translate.get("lang.confirmImportRegisteredMails",{0:this.countAll}).subscribe(t=>{i=t+" ?<br/><br/>"}),t=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.import"),msg:i}}),t.afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.loading=!0,this.csvData.forEach((t,i)=>{if(this.hasHeader&&i>0||!this.hasHeader){const i={};this.contactColumns.forEach(e=>{i[e.id]=void 0===t[this.associatedColumns[e.id]]?"":t[this.associatedColumns[e.id]]instanceof Date&&!isNaN(t[this.associatedColumns[e.id]].valueOf())?this.functionsService.formatDateObjectToDateString(t[this.associatedColumns[e.id]],!1,"yyyy-mm-dd"):t[this.associatedColumns[e.id]]}),i.doctype=this.currentDoctype,i.modelId=this.currentIndexingModel,e.push(i)}})}),p(()=>this.http.put("../rest/registeredMails/import",{registeredMails:e})),Object(mt.a)(e=>{let i="";e.errors.count>0&&(i+=`<br/>${e.errors.count} ${this.translate.instant("lang.withErrors")} : <ul>`,e.errors.details.forEach(t=>{i+=`<li> ${this.translate.instant("lang."+t.lang,{0:t.langParam})} (${this.translate.instant("lang.line")} : ${this.hasHeader?t.index+2:t.index+1})</li>`}),i+="</ul>"),t=this.dialog.open(qt.a,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.import"),msg:"<b>"+e.success+"</b> / <b>"+this.countAll+"</b> "+this.translate.instant("lang.importedRegisteredMails")+"."+i}})}),p(()=>t.afterClosed()),Object(mt.a)(()=>{this.dialogRef.close("success")}),Object(m.a)(t=>(this.loading=!1,this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(_t.a),n.Qb(Ut.a),n.Qb(y.a),n.Qb(q.b),n.Qb(q.h),n.Qb(Jt),n.Qb(Zt),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Xc(Kt.a,!0),2&t&&n.yc(i=n.ec())&&(e.paginator=i.first)},decls:33,vars:26,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","alert-message alert-message-info","style","min-width: 100%",3,"innerHTML",4,"ngIf"],[1,"import-tool"],[2,"flex","1"],["color","primary",3,"checked","change"],[2,"flex","1","text-align","right"],["color","primary",1,"fas","fa-dolly-flatbed"],["color","primary"],["appearance","outline",2,"width","250px !important","height","55px"],[3,"ngModel","ngModelChange","click"],[3,"value",4,"ngFor","ngForOf"],[4,"ngIf","ngIfElse"],["elseTemplate",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click",4,"ngIf"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"alert-message","alert-message-info",2,"min-width","100%",3,"innerHTML"],[3,"value"],[1,"loader"],["type","file","name","files[]","id","uploadFile","accept",".csv",2,"display","none",3,"change"],["uploadFile",""],["appUploadFileDragDrop","","class","dndFile",3,"click","onFileDropped",4,"ngIf"],["class","row","style","margin: 0px;",4,"ngIf"],["class","tableContent",4,"ngIf"],["appUploadFileDragDrop","",1,"dndFile",3,"click","onFileDropped"],[1,"row",2,"margin","0px"],[1,"col-md-12"],[3,"length","hidePageSize","pageSize"],["paginator",""],[1,"tableContent"],[2,"overflow","auto"],[3,"dataSource"],["table",""],[4,"ngFor","ngForOf"],[4,"matHeaderRowDef"],[4,"matRowDef","matRowDefColumns"],[3,"matColumnDef"],["style","padding-left: 5px;padding-right: 5px;",4,"matHeaderCellDef"],["style","padding-left: 5px;padding-right: 5px;",4,"matCellDef"],[2,"padding-left","5px","padding-right","5px"],["formTemplate",""],["color","primary",1,"fas","fa-database",3,"title"],["color","primary",1,"colLabel",3,"title"],[1,"fas","fa-arrows-alt-h"],[1,"fas","fa-file-csv",3,"title"],[2,"width","80px !important",3,"title","click"],[3,"ngModel","ngModelChange","selectionChange"],["value",""],["elseDateType",""],["mat-button","",2,"padding","0px",3,"matMenuTriggerFor"],["color","primary",1,"colLabel"],["matSuffix","",1,"fa","fa-caret-down"],["menu","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["mat-menu-item","",3,"click"],[2,"display","none"],["matInput","",3,"matDatepicker","dateChange"],["picker",""],["mat-button","",2,"padding","0px",3,"click"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"]],template:function(t,e){if(1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"div",2),n.Oc(5,se,2,3,"div",3),n.Wb(6,"mat-toolbar",4),n.Wb(7,"span",5),n.Wb(8,"mat-slide-toggle",6),n.dc("change",(function(){return e.toggleHeader()})),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Wb(11,"span",7),n.Rb(12,"i",8),n.Qc(13),n.ic(14,"translate"),n.Wb(15,"b",9),n.Qc(16),n.Vb(),n.Vb(),n.Wb(17,"span",7),n.Wb(18,"mat-form-field",10),n.Wb(19,"mat-label"),n.Qc(20),n.ic(21,"translate"),n.Vb(),n.Wb(22,"mat-select",11),n.dc("ngModelChange",(function(t){return e.currentIndexingModel=t}))("click",(function(t){return t.stopPropagation()})),n.Oc(23,oe,2,2,"mat-option",12),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Oc(24,re,3,0,"ng-container",13),n.Oc(25,Ce,5,3,"ng-template",null,14,n.Pc),n.Vb(),n.Rb(27,"span",15),n.Wb(28,"div",16),n.Oc(29,Oe,3,4,"button",17),n.Wb(30,"button",18),n.Qc(31),n.ic(32,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.zc(26);n.Db(2),n.Rc(n.jc(3,16,"lang.importRegisteredMails")),n.Db(3),n.oc("ngIf",e.csvData.length>0),n.Db(1),n.Ib("hide",0===e.csvData.length||e.loading),n.Db(2),n.oc("checked",e.hasHeader),n.Db(1),n.Sc(" ",n.jc(10,18,"lang.csvHeader")," "),n.Db(4),n.Sc("\xa0",n.jc(14,20,"lang.registeredMails")," : "),n.Db(3),n.Rc(e.countAll),n.Db(4),n.Rc(n.jc(21,22,"lang.indexingModel")),n.Db(2),n.oc("ngModel",e.currentIndexingModel),n.Db(1),n.oc("ngForOf",e.indexingModels),n.Db(1),n.oc("ngIf",e.loading)("ngIfElse",t),n.Db(5),n.oc("ngIf",e.csvData.length>0),n.Db(1),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(32,24,"lang.cancel"))}},directives:[q.i,q.f,P.t,M.a,te.a,Y.c,Y.g,ee.a,X.u,X.x,P.s,q.c,k.b,q.d,W.p,V.c,ie,Kt.a,vt.o,vt.k,vt.n,vt.c,vt.i,vt.b,vt.h,ne.d,S.a,Y.j,ne.e,ne.b,J.b,ae.h,ae.f,vt.a,vt.j,vt.m],pipes:[g.d],styles:[".loader[_ngcontent-%COMP%]{display:flex;height:100%;align-items:center;justify-content:center}.hide[_ngcontent-%COMP%]{display:none}.import-tool[_ngcontent-%COMP%]{font-size:14px}.dndFile[_ngcontent-%COMP%]{height:100%;display:flex;align-items:center;margin:0;justify-content:center;font-size:30px;opacity:.5!important;cursor:pointer}.colLabel[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;text-overflow:ellipsis}.tableContent[_ngcontent-%COMP%]{width:100%;box-shadow:inset 0 0 5px 0 rgba(0,0,0,.75);padding:10px}"]}),t})();const we=["searchInput"];function Me(t,e){if(1&t){const t=n.Xb();n.Wb(0,"form",21,22),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().goTo()})),n.Wb(2,"mat-form-field",23),n.Wb(3,"input",24),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().searchTarget=e})),n.ic(4,"translate"),n.Vb(),n.Wb(5,"button",25),n.ic(6,"translate"),n.Rb(7,"mat-icon",26),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(3),n.oc("placeholder",n.jc(4,3,"lang.searchMails"))("ngModel",t.searchTarget),n.Db(2),n.oc("title",n.jc(6,5,"lang.quickSearchTarget"))}}function ke(t,e){if(1&t&&(n.Wb(0,"button",27),n.ic(1,"translate"),n.Rb(2,"mat-icon",28),n.Vb()),2&t){n.hc();const t=n.zc(4);n.pc("matTooltip",n.jc(1,2,"lang.menu")),n.oc("matMenuTriggerFor",t)}}function Se(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"button",29),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().gotToMenu(i)})),n.ic(2,"translate"),n.Rb(3,"i"),n.Rb(4,"br"),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Tb()}if(2&t){const t=e.$implicit;n.Db(1),n.pc("matTooltip",n.jc(2,5,t.comment)),n.Db(2),n.Gb("",t.style," fa-2x"),n.Db(2),n.Sc("",n.jc(6,7,t.label)," ")}}function Ie(t,e){1&t&&(n.Wb(0,"div",30),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noAvailableMenu")," "))}function Pe(t,e){if(1&t&&(n.Wb(0,"button",31),n.Rb(1,"mat-icon",32),n.Wb(2,"span"),n.Qc(3),n.ic(4,"titlecase"),n.Vb(),n.Qc(5,"\xa0"),n.Wb(6,"b"),n.Qc(7),n.ic(8,"uppercase"),n.Vb(),n.Vb()),2&t){const t=n.hc(),e=n.zc(11);n.oc("matMenuTriggerFor",e),n.Db(3),n.Rc(n.jc(4,3,t.headerService.user.firstname)),n.Db(4),n.Rc(n.jc(8,5,t.headerService.user.lastname))}}function Ve(t,e){if(1&t&&(n.Wb(0,"button",33),n.Rb(1,"mat-icon",34),n.Vb()),2&t){n.hc();const t=n.zc(11);n.oc("matMenuTriggerFor",t)}}function Re(t,e){if(1&t&&(n.Wb(0,"mat-list-item"),n.Wb(1,"p",35),n.Qc(2),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Sc(" ",t.group_desc," ")}}function je(t,e){if(1&t&&(n.Wb(0,"mat-list-item"),n.Wb(1,"p",35),n.Qc(2),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Sc(" ",t.entity_label," ")}}function Ae(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",36),n.Wb(1,"a",37),n.dc("click",(function(){return n.Dc(t),n.hc().authService.logout()})),n.Wb(2,"span",19),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb(),n.Vb()}2&t&&(n.Db(3),n.Rc(n.jc(4,1,"lang.logout")))}let We=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this.translate=t,this.http=e,this.router=i,this.dialog=n,this.authService=a,this.appService=s,this.headerService=o,this.functions=r,this.privilegeService=c,this.config={},this.menus=[],this.searchTarget="",this.hideSearch=!0}ngOnInit(){this.menus=this.privilegeService.getCurrentUserMenus()}gotToMenu(t){if("indexing"===t.id&&t.groups.length>1)this.config={panelClass:"maarch-modal",data:{indexingGroups:t.groups,link:t.route}},this.dialogRef=this.dialog.open(Bt,this.config);else if(!0===t.angular){const e=t.route.split("__");2===e.length?"RegisteredMailImportComponent"===e[0]&&this.dialog.open(De,{disableClose:!0,width:"99vw",maxWidth:"99vw",panelClass:"maarch-full-height-modal"}):this.router.navigate([t.route])}else location.href=t.route}showSearchInput(){this.hideSearch=!this.hideSearch,setTimeout(()=>{this.searchInput.focus()},200)}hideSearchBar(){return"/search"!==this.router.url.split("?")[0]}showLogout(){return!(["sso"].indexOf(this.authService.authMode)>-1&&this.functions.empty(this.authService.authUri))}goTo(){this.router.navigate(["/search"],{queryParams:{value:this.searchTarget}})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.c),n.Qb(q.b),n.Qb(_.a),n.Qb(w.a),n.Qb(y.a),n.Qb(_t.a),n.Qb(Dt.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["header-right"]],viewQuery:function(t,e){var i;1&t&&n.Xc(we,!0),2&t&&n.yc(i=n.ec())&&(e.searchInput=i.first)},decls:37,vars:32,consts:[[1,"bg-head-title-tool"],[3,"ngSubmit",4,"ngIf"],["mat-icon-button","",3,"matMenuTriggerFor","matTooltip",4,"ngIf"],[1,"headerMaarchShortcut"],["applications","matMenu"],[4,"ngFor","ngForOf"],["class","noAvailableMenu",4,"ngIf"],["mat-button","",3,"matMenuTriggerFor",4,"ngIf"],["mat-icon-button","",3,"matMenuTriggerFor",4,"ngIf"],[1,"headerMaarch"],["menu","matMenu"],["width","250","height","70",1,"header-bg",2,"margin-top","-8px","background-size","cover","border-bottom","solid 1px white"],["routerLink","/profile",2,"cursor","pointer","z-index","1","color","white","position","absolute","left","85px","top","17px","width","70px","height","70px","background-size","cover","background-position","top center","border-radius","50%","border","solid white","background-color","white",3,"title"],[1,"content",2,"padding-top","20px","color","white","max-height","250px","overflow-y","auto","overflow-x","hidden"],["routerLink","/profile",1,"text-center",2,"cursor","pointer"],["mat-subheader","",2,"color","white"],[2,"display","flex","padding","5px"],[2,"text-align","left","flex","1"],["routerLink","/profile",2,"color","white","padding-left","10px"],["color","primary",1,"badge",2,"background","white"],["style","text-align:right;flex:2;",4,"ngIf"],[3,"ngSubmit"],["criteriaFormUp","ngForm"],["floatLabel","never",1,"basket-search"],["type","text","matInput","","name","searchTarget",1,"metaSearch",3,"placeholder","ngModel","ngModelChange"],["mat-icon-button","","type","submit","matPrefix","",3,"title"],[1,"fas","fa-search"],["mat-icon-button","",3,"matMenuTriggerFor","matTooltip"],[1,"fa","fa-th",2,"font-size","22px"],["mat-button","","color","primary",1,"col-md-4","col-xs-6",2,"white-space","inherit","height","100px","line-height","20px",3,"matTooltip","click"],[1,"noAvailableMenu"],["mat-button","",3,"matMenuTriggerFor"],["mat-list-icon","",1,"fa","fa-user","fa-2x",2,"color","white","margin","0px 12px 8px 0px"],["mat-icon-button","",3,"matMenuTriggerFor"],["mat-list-icon","",1,"fa","fa-user","fa-2x",2,"color","white","height","auto"],["mat-line","",2,"color","white","opacity","0.5"],[2,"text-align","right","flex","2"],[2,"cursor","pointer","color","white","padding-right","10px",3,"click"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Oc(1,Me,8,7,"form",1),n.Oc(2,ke,3,4,"button",2),n.Wb(3,"mat-menu",3,4),n.Oc(5,Se,7,9,"ng-container",5),n.ic(6,"sortBy"),n.Oc(7,Ie,3,3,"div",6),n.Vb(),n.Oc(8,Pe,9,7,"button",7),n.Oc(9,Ve,2,1,"button",8),n.Wb(10,"mat-menu",9,10),n.Rb(12,"canvas",11),n.Rb(13,"i",12),n.ic(14,"translate"),n.Wb(15,"div",13),n.Wb(16,"p",14),n.Qc(17),n.ic(18,"uppercase"),n.Vb(),n.Wb(19,"mat-list"),n.Wb(20,"h3",15),n.Qc(21),n.ic(22,"translate"),n.Vb(),n.Rb(23,"mat-divider"),n.Oc(24,Re,3,1,"mat-list-item",5),n.Wb(25,"h3",15),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Rb(28,"mat-divider"),n.Oc(29,je,3,1,"mat-list-item",5),n.Vb(),n.Vb(),n.Wb(30,"div",16),n.Wb(31,"div",17),n.Wb(32,"a",18),n.Wb(33,"span",19),n.Qc(34),n.ic(35,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Oc(36,Ae,5,3,"div",20),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(1),n.oc("ngIf",e.hideSearchBar()),n.Db(1),n.oc("ngIf",!e.appService.getViewMode()),n.Db(3),n.oc("ngForOf",n.kc(6,19,e.menus,"label")),n.Db(2),n.oc("ngIf",e.functions.empty(e.menus)),n.Db(1),n.oc("ngIf",!e.appService.getViewMode()),n.Db(1),n.oc("ngIf",e.appService.getViewMode()),n.Db(3),n.Lc("background-image","url(../rest/images?image=loginPage)"),n.Db(1),n.Lc("background-image","url(../rest/images?image=onlyLogo)"),n.pc("title",n.jc(14,22,"lang.myProfileAccess")),n.Db(4),n.Tc("",e.headerService.user.firstname," ",n.jc(18,24,e.headerService.user.lastname),""),n.Db(4),n.Rc(n.jc(22,26,"lang.groups")),n.Db(3),n.oc("ngForOf",e.headerService.user.groups),n.Db(2),n.Rc(n.jc(27,28,"lang.entities")),n.Db(3),n.oc("ngForOf",e.headerService.user.entities),n.Db(5),n.Rc(n.jc(35,30,"lang.myProfile")),n.Db(2),n.oc("ngIf",e.showLogout()))},directives:[P.t,ne.e,P.s,o.d,R.a,R.g,T.a,o.f,X.K,X.v,X.w,Y.c,J.b,X.d,X.u,X.x,k.b,Y.i,S.a,ne.d,A.b,R.c,R.d,W.l],pipes:[Wt.a,g.d,P.G,P.F],styles:[".bg-head-title-tool[_ngcontent-%COMP%]{display:flex}.bg-head-title-tool[_ngcontent-%COMP%] .mat-form-field-label-wrapper{font-style:italic}.bg-head-title-tool[_ngcontent-%COMP%] .mat-form-field-label{font-size:12px;opacity:.5}.noAvailableMenu[_ngcontent-%COMP%]{text-align:center;font-size:14px;opacity:.5;font-style:italic;padding:22px}.basket-search[_ngcontent-%COMP%]{color:#666;width:500px;padding-right:10px;font-size:12px;height:35px}.basket-search[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:20px}.basket-search[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.basket-search[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center;background:#fff;height:35px;border-radius:30px}.basket-search[_ngcontent-%COMP%] .mat-form-field-label-wrapper{font-style:italic}.basket-search[_ngcontent-%COMP%] .mat-form-field-underline{display:none}"]}),t})();var Te=i("wZkO"),Ee=i("lJEt"),Fe=i("Dh3D"),Le=i("cp0P"),Qe=i("JX91"),Ne=i("/1cH"),ze=i("A5z7");const Be=["autoCompleteInput"];function Ue(t,e){if(1&t&&n.Rb(0,"input",11),2&t){const t=n.hc();n.oc("formControl",t.controlAutocomplete)}}function $e(t,e){if(1&t&&(n.Wb(0,"mat-label"),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.placeholder)}}function He(t,e){1&t&&n.Rb(0,"mat-icon",12)}function Ge(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",13),n.dc("click",(function(){return n.Dc(t),n.hc().unsetValue()})),n.Rb(1,"mat-icon",14),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.oc("title",n.jc(2,1,"lang.delete")))}function Xe(t,e){if(1&t&&n.Rb(0,"mat-icon",18),2&t){const t=n.hc().$implicit,e=n.hc(2);n.Gb("autcompleteIcon fas ",e.type[t.type],"")}}function qe(t,e){if(1&t&&(n.Wb(0,"mat-option",16),n.Oc(1,Xe,1,3,"mat-icon",17),n.Qc(2,"\xa0"),n.Wb(3,"span",18),n.Qc(4),n.Vb(),n.Qc(5,"\xa0"),n.Wb(6,"small"),n.Qc(7),n.Vb(),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.oc("value",t)("disabled",i.disableItems.indexOf(t.serialId)>-1),n.Db(1),n.oc("ngIf",i.type[t.type]),n.Db(3),n.Rc(t[i.key]),n.Db(3),n.Rc(t[i.subInfoKey])}}function Ke(t,e){if(1&t&&(n.Ub(0),n.Oc(1,qe,8,5,"mat-option",15),n.ic(2,"sortBy"),n.ic(3,"async"),n.Tb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",n.kc(2,1,n.jc(3,4,t.filteredOptions),t.key))}}function Ye(t,e){if(1&t&&n.Rb(0,"mat-option",19),2&t){const t=n.hc();n.oc("innerHTML",t.listInfo,n.Ec)}}function Je(t,e){1&t&&(n.Wb(0,"mat-option",20),n.Rb(1,"mat-spinner",21),n.Vb())}function Ze(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",25),n.dc("removed",(function(){n.Dc(t);const i=e.index;return n.hc(2).removeItem(i)})),n.Rb(1,"span",26),n.Rb(2,"mat-icon",27),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.oc("removable",!0),n.Db(1),n.oc("innerHTML",i.valuesToDisplay[t],n.Ec)}}function ti(t,e){1&t&&(n.Wb(0,"div",28),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noSelectedValue")," "))}function ei(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-chip-list",22),n.Oc(2,Ze,3,2,"mat-chip",23),n.Vb(),n.Oc(3,ti,3,3,"div",24),n.Tb()),2&t){const t=n.hc();n.Db(2),n.oc("ngForOf",t.controlAutocomplete.value),n.Db(1),n.oc("ngIf",0===t.controlAutocomplete.value.length)}}let ii=(()=>{class t{constructor(t,e,i,a,s){this.translate=t,this.http=e,this.notify=i,this.dialog=a,this.latinisePipe=s,this.myControl=new X.i,this.loading=!1,this.type={user:"fa-user",entity:"fa-sitemap"},this.disableItems=[],this.styles=[],this.selectedOpt=new n.o,this.valuesToDisplay={}}ngOnInit(){this.appearance=void 0===this.appearance?"legacy":"outline",this.singleMode=void 0!==this.singleMode,this.optGroupLabel=void 0===this.optGroupLabel?this.translate.instant("lang.availableValues"):this.optGroupLabel,this.placeholder=void 0===this.placeholder?this.translate.instant("lang.chooseValue"):this.placeholder,void 0!==this.controlAutocomplete&&(this.controlAutocomplete.setValue(null===this.controlAutocomplete.value||""===this.controlAutocomplete.value?[]:this.controlAutocomplete.value),this.initFormValue()),this.size=void 0===this.size?"default":this.size,void 0!==this.routeDatas?this.initAutocompleteRoute():this.initAutocompleteData()}initAutocompleteData(){this.listInfo=this.translate.instant("lang.noAvailableValue"),this.filteredOptions=this.myControl.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>this._filter(t)))}initAutocompleteRoute(){this.listInfo=this.translate.instant("lang.autocompleteInfo"),this.options=[],this.myControl.valueChanges.pipe(Object(pt.a)(300),Object(d.a)(t=>t.length>2),Object(mt.a)(()=>this.loading=!0),Object(ft.a)(t=>this.getDatas(t)),Object(mt.a)(t=>{this.listInfo=0===t.length?void 0!==this.manageDatas?this.translate.instant("lang.noAvailableValue")+" <div>"+this.translate.instant("lang.typeEnterToCreate")+"</div>":this.translate.instant("lang.noAvailableValue"):"",this.options=t,this.filteredOptions=Object(c.a)(this.options),this.loading=!1})).subscribe()}getDatas(t){const e=[],i=[];return this.routeDatas.forEach(i=>{e.push(this.http.get(".."+i,{params:{search:t}}))}),Object(Le.a)(e).pipe(Object(l.a)(t=>(t.forEach(t=>{t.forEach(t=>{i.push(t)})}),i)))}selectOpt(t){this.singleMode||void 0!==this.controlAutocomplete&&this.setFormValue(t.option.value),void 0!==this.selectedOpt&&(this.resetAutocomplete(),this.autoCompleteInput.nativeElement.blur(),this.selectedOpt.emit(t.option.value))}initFormValue(){this.controlAutocomplete.value.forEach(t=>{this.http.get(".."+this.manageDatas+"/"+t).pipe(Object(mt.a)(t=>{for(var e in t)this.valuesToDisplay[t[e].id]=t[e].label})).subscribe()})}setFormValue(t){if(-1===this.controlAutocomplete.value.indexOf(t.id)){let e=[];null!==this.controlAutocomplete.value&&(e=this.controlAutocomplete.value),e.push(t.id),this.valuesToDisplay[t.id]=t[this.key],this.controlAutocomplete.setValue(e)}}resetAutocomplete(){!1===this.singleMode&&this.myControl.setValue(""),void 0!==this.routeDatas&&(this.options=[],this.listInfo=this.translate.instant("lang.autocompleteInfo"))}_filter(t){if("string"==typeof t){const e=this.latinisePipe.transform(t.toLowerCase());return this.options.filter(t=>this.latinisePipe.transform(t[this.key].toLowerCase()).includes(e))}return this.options}unsetValue(){this.controlAutocomplete.setValue(""),this.myControl.setValue(""),this.myControl.enable()}removeItem(t){const e=this.controlAutocomplete.value;e.splice(t,1),this.controlAutocomplete.setValue(e)}addItem(){if(void 0!==this.manageDatas){const t={};t[this.key]=this.myControl.value,this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.confirm"),msg:"Voulez-vous cr\xe9er cet \xe9l\xe9ment <b>"+t[this.key]+"</b> ?"}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.post(".."+this.manageDatas,{label:t[this.key]})),Object(mt.a)(e=>{for(var i in e)t.id=e[i];this.setFormValue(t),this.notify.success(this.translate.instant("lang.elementAdded"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}}getValue(){return this.myControl.value}resetValue(){return this.myControl.setValue("")}displayFn(t){return t?t[this.key]:t}displayFnWrapper(){return t=>this.displayFn(t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(Tt.c))},t.\u0275cmp=n.Kb({type:t,selectors:[["plugin-autocomplete"]],viewQuery:function(t,e){var i;1&t&&n.Kc(Be,!0),2&t&&n.yc(i=n.ec())&&(e.autoCompleteInput=i.first)},inputs:{size:"size",singleMode:"singleMode",appearance:"appearance",required:"required",options:["datas","options"],routeDatas:"routeDatas",placeholder:["labelPlaceholder","placeholder"],optGroupLabel:["labelList","optGroupLabel"],key:["targetSearchKey","key"],subInfoKey:"subInfoKey",controlAutocomplete:["control","controlAutocomplete"],manageDatas:"manageDatas",disableItems:"disableItems",styles:"styles"},outputs:{selectedOpt:"triggerEvent"},decls:14,vars:18,consts:[["type","hidden",3,"formControl",4,"ngIf"],["floatLabel","never",1,"maarch-autocomplete",3,"appearance","click"],[4,"ngIf"],["color","primary","class","fa fa-search","matPrefix","",4,"ngIf"],["type","text","id","autoCompleteInput","aria-label","Number","matInput","",3,"placeholder","formControl","matAutocomplete","required","click","focus","keyup.enter"],["autoCompleteInput",""],["type","button","matSuffix","","mat-icon-button","","color","warn",3,"click",4,"ngIf"],[3,"displayWith","optionSelected"],["auto","matAutocomplete"],["class","autoCompleteInfoResult smallInputInfo","disabled","",3,"innerHTML",4,"ngIf"],["disabled","",4,"ngIf"],["type","hidden",3,"formControl"],["color","primary","matPrefix","",1,"fa","fa-search"],["type","button","matSuffix","","mat-icon-button","","color","warn",3,"click"],["color","warn",1,"fa","fa-times",3,"title"],[3,"value","disabled",4,"ngFor","ngForOf"],[3,"value","disabled"],["color","primary",3,"class",4,"ngIf"],["color","primary"],["disabled","",1,"autoCompleteInfoResult","smallInputInfo",3,"innerHTML"],["disabled",""],["diameter","20"],["color","default",1,"mat-chip-list-stacked"],["class","activeListAutocomplete","color","default",3,"removable","removed",4,"ngFor","ngForOf"],["class","noResult",4,"ngIf"],["color","default",1,"activeListAutocomplete",3,"removable","removed"],[2,"display","flex","flex","1",3,"innerHTML"],["matChipRemove","",1,"fa","fa-times"],[1,"noResult"]],template:function(t,e){if(1&t&&(n.Wb(0,"form"),n.Oc(1,Ue,1,1,"input",0),n.Wb(2,"mat-form-field",1),n.dc("click",(function(t){return t.stopPropagation()})),n.Oc(3,$e,2,1,"mat-label",2),n.Oc(4,He,1,0,"mat-icon",3),n.Wb(5,"input",4,5),n.dc("click",(function(t){return t.stopPropagation()}))("focus",(function(){return e.resetAutocomplete()}))("keyup.enter",(function(){return e.addItem()})),n.Vb(),n.Oc(7,Ge,3,3,"button",6),n.Wb(8,"mat-autocomplete",7,8),n.dc("optionSelected",(function(t){return e.selectOpt(t)})),n.Oc(10,Ke,4,6,"ng-container",2),n.Oc(11,Ye,1,1,"mat-option",9),n.Oc(12,Je,2,0,"mat-option",10),n.Vb(),n.Vb(),n.Oc(13,ei,4,2,"ng-container",2),n.Vb()),2&t){const t=n.zc(9);n.Db(1),n.oc("ngIf",void 0!==e.controlAutocomplete),n.Db(1),n.Ib("no-margin",e.styles.indexOf("no-margin")>-1)("smallInput","small"===e.size),n.oc("appearance",e.appearance),n.Db(1),n.oc("ngIf",e.singleMode),n.Db(1),n.oc("ngIf","small"!==e.size&&e.myControl.enabled&&!e.singleMode),n.Db(1),n.oc("placeholder",e.singleMode?"":e.placeholder)("formControl",e.myControl)("matAutocomplete",t)("required",e.required),n.Db(2),n.oc("ngIf",e.myControl.disabled),n.Db(1),n.oc("displayWith",e.displayFnWrapper()),n.Db(2),n.oc("ngIf",e.options.length>0&&!e.loading),n.Db(1),n.oc("ngIf",0===e.options.length&&!e.loading),n.Db(1),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",void 0!==e.controlAutocomplete)}},directives:[X.K,X.v,X.w,P.t,Y.c,J.b,X.d,Ne.d,X.u,X.j,X.F,Ne.a,Y.g,S.a,Y.i,k.b,Y.j,P.s,W.p,V.c,ze.d,ze.a,ze.e],pipes:[g.d,Wt.a,P.b],styles:[".mat-form-field-appearance-outline[_ngcontent-%COMP%]{font-size:11px} .mat-form-field-appearance-outline .mat-form-field-outline-thick{color:#135f7f} .mat-form-field-prefix{top:0!important}.no-margin[_ngcontent-%COMP%] .mat-form-field-wrapper{margin:0;padding:0}.mat-option[_ngcontent-%COMP%] .mat-option-text{align-items:center;display:flex}.mat-option[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:110%;font-weight:700}.mat-option-disabled[_ngcontent-%COMP%]{opacity:.3!important}.autcompleteIcon[_ngcontent-%COMP%]{width:20px;display:flex;align-items:center}.smallInput[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.smallInputInfo[_ngcontent-%COMP%]{font-size:9px;white-space:normal;line-height:13px;display:table-cell;vertical-align:middle}.input-form[_ngcontent-%COMP%] .mat-form-field-prefix{left:15px}.activeListAutocomplete[_ngcontent-%COMP%]{font-size:13px;height:auto}.noResult[_ngcontent-%COMP%]{text-align:center;font-style:italic;opacity:.5}.autoCompleteInfoResult[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();var ni=i("bv9b"),ai=i("HDdC");let si=(()=>{class t{constructor(t,e){this.http=t,this.authService=e}transform(t){const e=new v.f({Authorization:"Bearer "+this.authService.getToken()});return new ai.a(i=>(i.next("data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),void 0!==t&&this.http.get(t,{headers:e,responseType:"blob"}).subscribe(t=>{const e=new FileReader;e.readAsDataURL(t),e.onloadend=()=>{i.next(e.result)}}),{unsubscribe(){}}))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(v.b),n.Qb(_.a))},t.\u0275pipe=n.Pb({name:"secureUrl",type:t,pure:!0}),t})();const oi=["snav2"],ri=["adminMenuTemplate"],ci=["paginatorGroupsList"],li=["tableGroupsListSort"],di=["paginatorGroupsListAutocomplete"],hi=["paginatorContactsList"],ui=["tableContactsListSort"],pi=["paginatorHistory"],bi=["tableHistorySort"];function fi(t,e){if(1&t){const t=n.Xb();n.Wb(0,"a",15),n.dc("click",(function(){return n.Dc(t),n.hc(2).changePasswd()})),n.Rb(1,"mat-icon",19),n.Wb(2,"p",17),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(3),n.Sc(" ",n.jc(4,1,"lang.changeMyPassword")," "))}function mi(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",13),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",15),n.dc("click",(function(){return n.Dc(t),n.hc().askRedirectBasket()})),n.Rb(5,"mat-icon",16),n.Wb(6,"p",17),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Oc(9,fi,5,3,"a",18),n.Vb()}if(2&t){const t=n.hc();n.Db(2),n.Rc(n.jc(3,3,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,5,"lang.activateMyAbs")," "),n.Db(2),n.oc("ngIf",t.user.canModifyPassword)}}function gi(t,e){1&t&&(n.Wb(0,"div",20),n.Rb(1,"mat-spinner",21),n.Vb())}function vi(t,e){1&t&&(n.Wb(0,"mat-error"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.requiredField"),""))}function _i(t,e){1&t&&(n.Wb(0,"mat-hint"),n.Rb(1,"i",131),n.Wb(2,"span",132),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Rc(n.jc(4,1,"lang.passwordValid")))}function yi(t,e){1&t&&(n.Wb(0,"mat-hint"),n.Rb(1,"i",131),n.Wb(2,"span",132),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Rc(n.jc(4,1,"lang.passwordMatch")))}function xi(t,e){if(1&t&&(n.Wb(0,"div",66),n.Wb(1,"div",133),n.Rb(2,"div",134),n.Vb(),n.Vb()),2&t){const t=n.hc(3);n.Db(2),n.oc("innerHTML",t.otherRuleText,n.Ec)}}const Ci=function(t){return[t]};function Oi(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",117),n.Wb(1,"form",118),n.Wb(2,"div",66),n.Wb(3,"mat-form-field",119),n.Rb(4,"input",120),n.ic(5,"translate"),n.Wb(6,"mat-icon",121),n.dc("click",(function(){n.Dc(t);const e=n.hc(2);return e.hidePassword=!e.hidePassword})),n.Vb(),n.Oc(7,vi,3,3,"mat-error",28),n.Vb(),n.Vb(),n.Wb(8,"div",66),n.Wb(9,"div",122),n.Qc(10),n.Vb(),n.Wb(11,"div",123),n.Wb(12,"mat-form-field",119),n.Rb(13,"input",124,125),n.ic(15,"translate"),n.Wb(16,"mat-icon",121),n.dc("click",(function(){n.Dc(t);const e=n.hc(2);return e.hidePassword=!e.hidePassword})),n.Vb(),n.Oc(17,_i,5,3,"mat-hint",28),n.Wb(18,"mat-error"),n.Qc(19),n.Vb(),n.Vb(),n.Vb(),n.Wb(20,"div",123),n.Wb(21,"mat-form-field",119),n.Rb(22,"input",126,127),n.ic(24,"translate"),n.Wb(25,"mat-icon",121),n.dc("click",(function(){n.Dc(t);const e=n.hc(2);return e.hidePassword=!e.hidePassword})),n.Vb(),n.Oc(26,yi,5,3,"mat-hint",28),n.Wb(27,"mat-error"),n.Qc(28),n.ic(29,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Oc(30,xi,3,1,"div",128),n.Wb(31,"div",66),n.Wb(32,"div",53),n.Wb(33,"button",129),n.dc("click",(function(){return n.Dc(t),n.hc(2).updatePassword()})),n.Qc(34),n.ic(35,"translate"),n.Vb(),n.Wb(36,"button",130),n.dc("click",(function(){return n.Dc(t),n.hc(2).showPassword=!1})),n.Qc(37),n.ic(38,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.oc("formGroup",t.firstFormGroup),n.Db(3),n.pc("placeholder",n.jc(5,20,"lang.typeCurrentPassword")),n.oc("type",t.hidePassword?"password":"text"),n.Db(2),n.oc("ngClass",n.vc(32,Ci,t.hidePassword?"fa-eye-slash":"fa-eye")),n.Db(1),n.oc("ngIf",t.firstFormGroup.controls.currentPasswordCtrl.hasError("required")),n.Db(3),n.Sc(" ",t.ruleText,""),n.Db(3),n.pc("placeholder",n.jc(15,22,"lang.typeNewPassword")),n.oc("type",t.hidePassword?"password":"text"),n.Db(3),n.oc("ngClass",n.vc(34,Ci,t.hidePassword?"fa-eye-slash":"fa-eye")),n.Db(1),n.oc("ngIf",t.validPassword),n.Db(2),n.Rc(t.getErrorMessage()),n.Db(3),n.pc("placeholder",n.jc(24,24,"lang.retypeNewPassword")),n.oc("type",t.hidePassword?"password":"text"),n.Db(3),n.oc("ngClass",n.vc(36,Ci,t.hidePassword?"fa-eye-slash":"fa-eye")),n.Db(1),n.oc("ngIf",!t.firstFormGroup.controls.retypePasswordCtrl.hasError("mismatch")&&""!=t.firstFormGroup.controls.retypePasswordCtrl.value),n.Db(2),n.Sc("",n.jc(29,26,"lang.passwordNotMatch")," !"),n.Db(2),n.oc("ngIf",t.passwordRules.renewal.enabled||t.passwordRules.historyLastUse.enabled),n.Db(3),n.oc("disabled",!t.firstFormGroup.valid),n.Db(1),n.Rc(n.jc(35,28,"lang.update")),n.Db(3),n.Rc(n.jc(38,30,"lang.cancel"))}}function Di(t,e){if(1&t){const t=n.Xb();n.Wb(0,"form",135,136),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc(2).onSubmit()})),n.Wb(2,"div",66),n.Wb(3,"div",84),n.Wb(4,"div",137),n.Wb(5,"div",138),n.Rb(6,"i",139),n.Vb(),n.Vb(),n.Wb(7,"div",140),n.Wb(8,"mat-form-field"),n.Rb(9,"input",141),n.ic(10,"translate"),n.ic(11,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(12,"div",66),n.Wb(13,"div",142),n.Wb(14,"mat-form-field"),n.Wb(15,"input",143),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).user.lastname=e})),n.ic(16,"translate"),n.ic(17,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(18,"div",142),n.Wb(19,"mat-form-field"),n.Wb(20,"input",144),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).user.firstname=e})),n.ic(21,"translate"),n.ic(22,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(23,"div",145),n.Wb(24,"mat-form-field"),n.Wb(25,"input",146),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).user.initials=e})),n.ic(26,"translate"),n.ic(27,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(28,"div",66),n.Wb(29,"div",84),n.Wb(30,"mat-form-field"),n.Wb(31,"input",147),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).user.phone=e})),n.ic(32,"translate"),n.ic(33,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(34,"div",66),n.Wb(35,"div",84),n.Wb(36,"mat-form-field"),n.Wb(37,"input",148),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).user.mail=e})),n.ic(38,"translate"),n.ic(39,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(40,"div",149),n.Wb(41,"div",53),n.Wb(42,"button",72),n.Qc(43),n.ic(44,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(1),e=n.hc(2);n.Db(9),n.pc("title",n.jc(10,20,"lang.id")),n.pc("value",e.user.user_id),n.pc("placeholder",n.jc(11,22,"lang.id")),n.Db(6),n.pc("title",n.jc(16,24,"lang.lastname")),n.pc("placeholder",n.jc(17,26,"lang.lastname")),n.oc("ngModel",e.user.lastname),n.Db(5),n.pc("title",n.jc(21,28,"lang.firstname")),n.pc("placeholder",n.jc(22,30,"lang.firstname")),n.oc("ngModel",e.user.firstname),n.Db(5),n.pc("title",n.jc(26,32,"lang.initials")),n.pc("placeholder",n.jc(27,34,"lang.initials")),n.oc("ngModel",e.user.initials),n.Db(6),n.pc("title",n.jc(32,36,"lang.phoneNumber")),n.pc("placeholder",n.jc(33,38,"lang.phoneNumber")),n.oc("ngModel",e.user.phone),n.Db(6),n.pc("title",n.jc(38,40,"lang.email")),n.pc("placeholder",n.jc(39,42,"lang.email")),n.oc("ngModel",e.user.mail),n.Db(5),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(44,44,"lang.update"))}}function wi(t,e){1&t&&(n.Wb(0,"mat-panel-description"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.editorOptionAdmin")," "))}function Mi(t,e){if(1&t&&(n.Wb(0,"mat-option",150),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t,"")}}function ki(t,e){1&t&&(n.Wb(0,"mat-panel-description"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.basketsColorAdmin")," "))}function Si(t,e){if(1&t&&(n.Wb(0,"h3"),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Rc(t.groupDesc)}}const Ii=function(t){return{color:t}};function Pi(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item"),n.Rb(1,"mat-icon",151),n.Wb(2,"h4",152),n.Qc(3),n.Vb(),n.Wb(4,"input",153),n.dc("ngModelChange",(function(i){n.Dc(t);const a=e.index,s=n.hc().index;return n.hc(2).user.regroupedBaskets[s].baskets[a].color=i}))("change",(function(){n.Dc(t);const i=e.index,a=n.hc().index;return n.hc(2).updateBasketColor(a,i)})),n.Vb(),n.Wb(5,"a",154),n.dc("click",(function(){n.Dc(t);const i=e.index,a=n.hc().index,s=n.hc(2);return s.user.regroupedBaskets[a].baskets[i].color="",s.updateBasketColor(a,i)})),n.ic(6,"translate"),n.Rb(7,"i",155),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=e.index,a=n.hc().index,s=n.hc(2);n.Db(1),n.oc("ngStyle",n.vc(7,Ii,s.user.regroupedBaskets[a].baskets[i].color)),n.Db(1),n.pc("title",t.basket_id),n.Db(1),n.Rc(t.basket_name),n.Db(1),n.oc("ngModel",s.user.regroupedBaskets[a].baskets[i].color),n.Db(1),n.pc("title",n.jc(6,5,"lang.resetColor"))}}function Vi(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Si,2,1,"h3",28),n.Oc(2,Pi,8,9,"mat-list-item",14),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",t.baskets[0]),n.Db(1),n.oc("ngForOf",t.baskets)}}function Ri(t,e){1&t&&(n.Wb(0,"mat-panel-description"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.myBasketsDesc")," "))}function ji(t,e){1&t&&(n.Wb(0,"span",156),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.selectAll")," "))}const Ai=function(){return["/rest/autocomplete/users"]};function Wi(t,e){if(1&t){const t=n.Xb();n.Wb(0,"plugin-autocomplete",157),n.dc("triggerEvent",(function(e){return n.Dc(t),n.hc(2).addBasketRedirection(e)})),n.ic(1,"translate"),n.Vb()}if(2&t){const t=n.hc(2);n.oc("labelPlaceholder",n.jc(1,5,"lang.redirectBaskets"))("routeDatas",n.uc(7,Ai))("targetSearchKey","idToDisplay")("subInfoKey","descriptionToDisplay")("disableItems",n.vc(8,Ci,t.headerService.user.id))}}function Ti(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-icon",38),n.Wb(1,"mat-checkbox",164),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("change",(function(e){n.Dc(t);const i=n.hc(2).$implicit,a=n.hc(2);return e?a.selectionBaskets.toggle(i):null})),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2).$implicit,e=n.hc(2);n.Db(1),n.oc("checked",e.selectionBaskets.isSelected(t))}}function Ei(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item",159),n.dc("mouseover",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).showActions(e)}))("mouseout",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).hideActions(e)})),n.Oc(1,Ti,2,1,"mat-icon",160),n.Wb(2,"h4",161),n.Wb(3,"span",162),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).selectionBaskets.toggle(e)})),n.Qc(4),n.Wb(5,"span",163),n.Qc(6),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",t.enabled),n.Db(2),n.rc("matTooltip","",t.basket_name," [",t.group_desc,"]"),n.Db(1),n.Sc(" ",t.basket_name," "),n.Db(2),n.Rc(t.group_desc)}}function Fi(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Ei,7,5,"mat-list-item",158),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",null==t.userToDisplay)}}function Li(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"mat-list-item"),n.Rb(2,"mat-icon",165),n.Wb(3,"h4",166),n.Qc(4),n.Wb(5,"span",163),n.Qc(6),n.Vb(),n.Vb(),n.Wb(7,"p",17),n.Wb(8,"mat-form-field"),n.Rb(9,"input",167),n.ic(10,"translate"),n.Wb(11,"button",168),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=e.index;return n.hc(2).delBasketRedirection(i,a)})),n.ic(12,"translate"),n.Rb(13,"mat-icon",169),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=e.$implicit;n.Db(4),n.Sc("",t.basket_name," "),n.Db(2),n.Rc(t.group_desc),n.Db(3),n.rc("value","",n.jc(10,5,"lang.redirectedTo")," ",t.userToDisplay,""),n.Db(2),n.pc("matTooltip",n.jc(12,7,"lang.deleteRedirection"))}}function Qi(t,e){if(1&t){const t=n.Xb();n.Wb(0,"plugin-autocomplete",157),n.dc("triggerEvent",(function(e){n.Dc(t);const i=n.hc(),a=i.$implicit,s=i.index;return n.hc(2).reassignBasketRedirection(e,a,s)})),n.ic(1,"translate"),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc(2);n.oc("labelPlaceholder",n.jc(1,5,"lang.redirectBasket")+": "+t.basket_name)("routeDatas",n.uc(7,Ai))("targetSearchKey","idToDisplay")("subInfoKey","descriptionToDisplay")("disableItems",n.vc(8,Ci,e.headerService.user.id))}}function Ni(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Rb(1,"input",167),n.ic(2,"translate"),n.Wb(3,"button",168),n.dc("click",(function(){return n.Dc(t),n.hc().$implicit.redirectMode=!0})),n.ic(4,"translate"),n.Rb(5,"mat-icon",172),n.Vb(),n.Wb(6,"button",168),n.dc("click",(function(){n.Dc(t);const e=n.hc(),i=e.$implicit,a=e.index;return n.hc(2).delBasketAssignRedirection(i,a)})),n.ic(7,"translate"),n.Rb(8,"mat-icon",169),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(1),n.rc("value","",n.jc(2,4,"lang.assignBy")," ",t.userToDisplay,""),n.Db(2),n.pc("matTooltip",n.jc(4,6,"lang.reassign")),n.Db(3),n.pc("matTooltip",n.jc(7,8,"lang.deleteAssignation"))}}function zi(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-list-item"),n.Rb(2,"mat-icon",170),n.Wb(3,"h4",171),n.dc("click",(function(){return e.$implicit.redirectMode=!1})),n.Qc(4),n.Wb(5,"span",163),n.Qc(6),n.Vb(),n.Vb(),n.Wb(7,"p",17),n.Oc(8,Qi,2,10,"plugin-autocomplete",41),n.Oc(9,Ni,9,10,"mat-form-field",28),n.Vb(),n.Vb(),n.Tb()),2&t){const t=e.$implicit;n.Db(4),n.Sc("",t.basket_name," "),n.Db(2),n.Rc(t.group_desc),n.Db(2),n.oc("ngIf",t.redirectMode),n.Db(1),n.oc("ngIf",!t.redirectMode)}}function Bi(t,e){1&t&&(n.Wb(0,"mat-panel-description"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.mySignMailDesc")," "))}function Ui(t,e){if(1&t&&(n.Wb(0,"button",72),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){n.hc();const t=n.zc(78);n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(2,2,"lang.save"))}}function $i(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",129),n.dc("click",(function(){return n.Dc(t),n.hc(2).updateEmailSignature()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){n.hc();const t=n.zc(78);n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(2,2,"lang.update"))}}function Hi(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",173),n.dc("click",(function(){return n.Dc(t),n.hc(2).deleteEmailSignature()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.delete")))}function Gi(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",130),n.dc("click",(function(){return n.Dc(t),n.hc(2).resetEmailSignature()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.cancel")))}function Xi(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",174),n.Wb(1,"mat-card",175),n.Wb(2,"mat-card-content",53),n.Wb(3,"mat-form-field",176),n.Wb(4,"input",177),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.title=i})),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Wb(6,"button",178),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc(2).changeEmailSignature(i)})),n.ic(7,"translate"),n.Rb(8,"mat-icon",179),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(4),n.pc("placeholder",n.jc(5,3,"lang.label")),n.oc("ngModel",t.title),n.Db(2),n.pc("matTooltip",n.jc(7,5,"lang.update"))}}function qi(t,e){1&t&&(n.Wb(0,"mat-panel-description"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.mySignSignatureBookDesc")," "))}function Ki(t,e){if(1&t&&(n.Wb(0,"div",180),n.Rb(1,"img",181),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("src",t.signatureModel.base64ForJs,n.Gc)}}function Yi(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",182),n.Wb(1,"mat-card",175),n.Wb(2,"mat-card-content",53),n.Wb(3,"mat-form-field",176),n.Wb(4,"input",183),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.signature_label=i}))("change",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).updateSignature(i)})),n.ic(5,"translate"),n.Vb(),n.Wb(6,"button",184),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).deleteSignature(i.id)})),n.ic(7,"translate"),n.Rb(8,"mat-icon",185),n.Vb(),n.Vb(),n.Rb(9,"img",186),n.ic(10,"async"),n.ic(11,"secureUrl"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.Db(4),n.pc("placeholder",n.jc(5,4,"lang.label")),n.oc("ngModel",t.signature_label),n.Db(2),n.pc("matTooltip",n.jc(7,6,"lang.delete")),n.Db(3),n.oc("src",n.jc(10,8,n.jc(11,10,"../rest/users/"+i.user.id+"/signatures/"+t.id+"/content")),n.Gc)}}function Ji(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",187),n.dc("click",(function(){return n.Dc(t),n.hc(2).syncMP()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",188),n.Vb()}if(2&t){const t=n.hc(2);n.pc("matTooltip",n.jc(1,4,"lang.syncSignsToMaarchParapheur")),n.oc("disabled",!t.user.external_id.maarchParapheur||t.loadingSign),n.Db(2),n.Ib("fa-spin",t.loadingSign)}}function Zi(t,e){1&t&&(n.Wb(0,"mat-panel-description"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.myContactsGroupsDesc")," "))}function tn(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",189),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Sc(" ",n.jc(2,3,"lang.label"),"")}}function en(t,e){if(1&t&&(n.Wb(0,"mat-cell",190),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",t.label," ")}}function nn(t,e){1&t&&(n.Wb(0,"mat-header-cell",189),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.description"),""))}function an(t,e){if(1&t&&(n.Wb(0,"mat-cell",190),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.description," ")}}function sn(t,e){1&t&&(n.Wb(0,"mat-header-cell",191),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.relatedContactNumber")," "))}function on(t,e){if(1&t&&(n.Wb(0,"span"),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Rc(t.nbContacts)}}function rn(t,e){if(1&t&&(n.Wb(0,"span",194),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Rc(t.nbContacts)}}function cn(t,e){if(1&t&&(n.Wb(0,"mat-cell",192),n.Oc(1,on,2,1,"span",28),n.Oc(2,rn,2,1,"span",193),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",0==t.nbContacts),n.Db(1),n.oc("ngIf",t.nbContacts>0)}}function ln(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",191),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Sc(" ",n.jc(2,3,"lang.public"),"")}}function dn(t,e){1&t&&(n.Wb(0,"span"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.no")," "))}function hn(t,e){1&t&&(n.Wb(0,"span"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.yes")," "))}function un(t,e){if(1&t&&(n.Wb(0,"mat-cell",192),n.Oc(1,dn,3,3,"span",28),n.Oc(2,hn,3,3,"span",28),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.oc("ngIf",!t.public),n.Db(1),n.oc("ngIf",t.public)}}function pn(t,e){1&t&&(n.Wb(0,"mat-header-cell",191),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.createdBy"),""))}function bn(t,e){if(1&t&&(n.Wb(0,"mat-cell",192),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.labelledOwner," ")}}function fn(t,e){1&t&&n.Rb(0,"mat-header-cell")}function mn(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",195),n.Wb(1,"button",196),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.deleteContactsGroup(a.position)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",197),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.pc("matTooltip",n.jc(2,1,"lang.delete")))}function gn(t,e){1&t&&n.Rb(0,"mat-header-row")}function vn(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-row",198),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).loadContactsGroup(i)})),n.ic(1,"translate"),n.Vb()}2&t&&n.pc("matTooltip",n.jc(1,1,"lang.view"))}function _n(t,e){1&t&&(n.Rb(0,"div",216),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.limitDataReached_1000"),n.Ec)}function yn(t,e){1&t&&n.Rb(0,"mat-progress-bar",217)}function xn(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-header-cell",192),n.Wb(1,"mat-checkbox",227),n.dc("change",(function(e){n.Dc(t);const i=n.hc(4);return e?i.masterToggle(e):null})),n.Vb(),n.Vb()}if(2&t){const t=n.hc(4);n.Db(1),n.oc("checked",t.selection.hasValue())}}function Cn(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",192),n.Wb(1,"mat-checkbox",228),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("change",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(4);return i?s.selection.toggle(a.id):null})),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(4);n.Db(1),n.qc("id","check_",t.id,""),n.oc("disabled",i.isInGrp(t))("checked",i.selection.isSelected(t.id))}}function On(t,e){1&t&&(n.Wb(0,"mat-header-cell",229),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.contact"),""))}function Dn(t,e){if(1&t&&(n.Wb(0,"mat-cell",229),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.contact," ")}}function wn(t,e){1&t&&(n.Wb(0,"mat-header-cell",229),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.address"),""))}function Mn(t,e){if(1&t&&(n.Wb(0,"mat-cell",229),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.address," ")}}function kn(t,e){1&t&&n.Rb(0,"mat-header-row")}const Sn=function(t){return{opacity:t}};function In(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-row",230),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(4).selectContact(i.id)})),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(4);n.oc("ngStyle",n.vc(1,Sn,i.isInGrp(t)?"0.5":""))}}function Pn(t,e){if(1&t&&(n.Wb(0,"mat-table",218,219),n.Ub(2,220),n.Oc(3,xn,2,1,"mat-header-cell",221),n.Oc(4,Cn,2,3,"mat-cell",105),n.Tb(),n.Ub(5,222),n.Oc(6,On,3,3,"mat-header-cell",223),n.Oc(7,Dn,2,1,"mat-cell",224),n.Tb(),n.Ub(8,225),n.Oc(9,wn,3,3,"mat-header-cell",223),n.Oc(10,Mn,2,1,"mat-cell",224),n.Tb(),n.Oc(11,kn,1,0,"mat-header-row",113),n.Oc(12,In,1,3,"mat-row",226),n.Vb()),2&t){const t=n.hc(3);n.oc("dataSource",t.dataSourceContactsListAutocomplete),n.Db(11),n.oc("matHeaderRowDef",t.displayedColumnsContactsListAutocomplete),n.Db(1),n.oc("matRowDefColumns",t.displayedColumnsContactsListAutocomplete)}}function Vn(t,e){1&t&&(n.Wb(0,"mat-header-cell",238),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.contact")," "))}function Rn(t,e){if(1&t&&(n.Wb(0,"mat-cell",229),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.contact," ")}}function jn(t,e){1&t&&(n.Wb(0,"mat-header-cell",238),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.address")," "))}function An(t,e){if(1&t&&(n.Wb(0,"mat-cell",229),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.address," ")}}function Wn(t,e){1&t&&n.Rb(0,"mat-header-cell",192)}function Tn(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",239),n.Wb(1,"button",196),n.dc("click",(function(i){n.Dc(t);const a=e.index,s=n.hc(5);return i.stopPropagation(),s.preDelete(a)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",197),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.pc("matTooltip",n.jc(2,1,"lang.delete")))}function En(t,e){1&t&&n.Rb(0,"mat-header-row")}function Fn(t,e){1&t&&n.Rb(0,"mat-row")}function Ln(t,e){if(1&t&&(n.Wb(0,"mat-table",233,234),n.Ub(2,222),n.Oc(3,Vn,3,3,"mat-header-cell",235),n.Oc(4,Rn,2,1,"mat-cell",224),n.Tb(),n.Ub(5,225),n.Oc(6,jn,3,3,"mat-header-cell",235),n.Oc(7,An,2,1,"mat-cell",224),n.Tb(),n.Ub(8,110),n.Oc(9,Wn,1,0,"mat-header-cell",221),n.Oc(10,Tn,4,3,"mat-cell",236),n.Tb(),n.Oc(11,En,1,0,"mat-header-row",113),n.Oc(12,Fn,1,0,"mat-row",237),n.Vb()),2&t){const t=n.hc(4);n.oc("dataSource",t.dataSourceContactsList),n.Db(11),n.oc("matHeaderRowDef",t.displayedColumnsContactsList),n.Db(1),n.oc("matRowDefColumns",t.displayedColumnsContactsList)}}function Qn(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",213),n.Wb(1,"mat-tab-group"),n.Wb(2,"mat-tab",24),n.ic(3,"translate"),n.Wb(4,"div",201),n.Wb(5,"div",91),n.Wb(6,"mat-form-field"),n.Wb(7,"input",92),n.dc("keyup",(function(e){return n.Dc(t),n.hc(3).applyFilterContactsList(e.target.value)})),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(9,"div",91),n.Rb(10,"mat-paginator",93,231),n.Vb(),n.Vb(),n.Oc(12,Ln,13,3,"mat-table",232),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(3);n.Db(2),n.rc("label","",t.contactsGroup.contacts.length," ",n.jc(3,7,"lang.relatedContacts"),""),n.Db(5),n.pc("placeholder",n.jc(8,9,"lang.filterBy")),n.Db(3),n.oc("length",0)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("ngIf",t.contactsListMode)}}function Nn(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab",24),n.ic(1,"translate"),n.Wb(2,"mat-accordion"),n.Wb(3,"mat-expansion-panel",null,199),n.Wb(5,"mat-expansion-panel-header"),n.Wb(6,"mat-panel-title",80),n.Wb(7,"span",81),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(10,"div",200),n.Wb(11,"div",201),n.Wb(12,"div",202),n.Wb(13,"mat-form-field",203),n.Wb(14,"span",204),n.Rb(15,"mat-icon",205),n.Qc(16,"\xa0\xa0 "),n.Vb(),n.Wb(17,"input",206),n.dc("keyup",(function(){return n.Dc(t),n.hc(2).launchLoading()})),n.ic(18,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(19,"div",91),n.Oc(20,_n,2,3,"div",207),n.Vb(),n.Wb(21,"div",91),n.Rb(22,"mat-paginator",93,208),n.Vb(),n.Vb(),n.Oc(24,yn,1,0,"mat-progress-bar",209),n.Oc(25,Pn,13,3,"mat-table",210),n.Wb(26,"div",66),n.Wb(27,"div",211),n.Wb(28,"button",129),n.dc("click",(function(e){return n.Dc(t),n.hc(2).saveContactsList(e.target)})),n.Qc(29),n.ic(30,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(31,"div",212),n.Wb(32,"div",213),n.Wb(33,"form",135,83),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc(2).updateGroupSubmit()})),n.Wb(35,"div",66),n.Wb(36,"div",84),n.Wb(37,"mat-form-field"),n.Wb(38,"input",85),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).contactsGroup.label=e})),n.ic(39,"translate"),n.ic(40,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(41,"div",66),n.Wb(42,"div",84),n.Wb(43,"mat-form-field"),n.Wb(44,"input",86),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).contactsGroup.description=e})),n.ic(45,"translate"),n.ic(46,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(47,"div",66),n.Wb(48,"div",84),n.Wb(49,"mat-slide-toggle",214),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).contactsGroup.public=e})),n.ic(50,"translate"),n.Qc(51),n.ic(52,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(53,"div",66),n.Wb(54,"div",88),n.Wb(55,"button",72),n.Qc(56),n.ic(57,"translate"),n.Vb(),n.Wb(58,"button",130),n.dc("click",(function(){return n.Dc(t),n.hc(2).initGroupsContact()})),n.Qc(59),n.ic(60,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Oc(61,Qn,13,11,"div",215),n.Vb(),n.Vb()}if(2&t){const t=n.zc(34),e=n.hc(2);n.rc("label","",n.jc(1,26,"lang.grouping")," : ",e.contactsGroup.label,""),n.Db(8),n.Rc(n.jc(9,28,"lang.linkContact")),n.Db(9),n.pc("placeholder",n.jc(18,30,"lang.linkContact")),n.oc("formControl",e.searchTerm),n.Db(3),n.oc("ngIf",e.dataSourceContactsListAutocomplete&&1e3==e.dataSourceContactsListAutocomplete.data.length),n.Db(2),n.oc("length",0)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("ngIf",!e.dataSourceContactsListAutocomplete&&!e.initAutoCompleteContact),n.Db(1),n.oc("ngIf",e.dataSourceContactsListAutocomplete),n.Db(3),n.oc("disabled",0==e.selection.selected.length),n.Db(1),n.Rc(n.jc(30,32,"lang.add")),n.Db(9),n.pc("title",n.jc(39,34,"lang.label")),n.pc("placeholder",n.jc(40,36,"lang.label")),n.oc("ngModel",e.contactsGroup.label),n.Db(6),n.pc("title",n.jc(45,38,"lang.description")),n.pc("placeholder",n.jc(46,40,"lang.description")),n.oc("ngModel",e.contactsGroup.description),n.Db(5),n.pc("title",n.jc(50,42,"lang.public")),n.oc("ngModel",e.contactsGroup.public),n.Db(2),n.Sc(" ",n.jc(52,44,"lang.public")," "),n.Db(4),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(57,46,"lang.update")),n.Db(3),n.Rc(n.jc(60,48,"lang.close")),n.Db(2),n.oc("ngIf",e.contactsListMode)}}function zn(t,e){1&t&&(n.Wb(0,"mat-header-cell",248),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.date")," "))}function Bn(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.ic(2,"date"),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",n.kc(2,1,t.event_date,"dd/MM/y HH:mm")," ")}}function Un(t,e){1&t&&(n.Wb(0,"mat-header-cell",248),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.technicalId"),""))}function $n(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Rc(t.record_id)}}function Hn(t,e){1&t&&(n.Wb(0,"mat-header-cell",248),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.description")," "))}function Gn(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.info," ")}}function Xn(t,e){1&t&&n.Rb(0,"mat-header-row")}function qn(t,e){1&t&&n.Rb(0,"mat-row")}function Kn(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",90),n.Wb(1,"div",91),n.Wb(2,"mat-form-field"),n.Wb(3,"input",92),n.dc("keyup",(function(e){return n.Dc(t),n.hc(2).applyFilter(e.target.value)})),n.ic(4,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(5,"div",91),n.Rb(6,"mat-paginator",93,240),n.Vb(),n.Vb(),n.Wb(8,"mat-table",241,242),n.Ub(10,243),n.Oc(11,zn,3,3,"mat-header-cell",244),n.Oc(12,Bn,3,4,"mat-cell",245),n.Tb(),n.Ub(13,246),n.Oc(14,Un,3,3,"mat-header-cell",244),n.Oc(15,$n,2,1,"mat-cell",245),n.Tb(),n.Ub(16,247),n.Oc(17,Hn,3,3,"mat-header-cell",244),n.Oc(18,Gn,2,1,"mat-cell",245),n.Tb(),n.Oc(19,Xn,1,0,"mat-header-row",113),n.Oc(20,qn,1,0,"mat-row",237),n.Vb()}if(2&t){const t=n.hc(2);n.Db(3),n.pc("placeholder",n.jc(4,7,"lang.filterBy")),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.dataSource),n.Db(11),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns)}}function Yn(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",22),n.Wb(1,"mat-tab-group",23),n.dc("selectedTabChange",(function(e){return n.Dc(t),n.hc().initComponents(e)})),n.Wb(2,"mat-tab",24),n.ic(3,"translate"),n.Oc(4,Oi,39,38,"div",25),n.Oc(5,Di,45,46,"form",26),n.Vb(),n.Wb(6,"mat-tab",24),n.ic(7,"translate"),n.Wb(8,"mat-accordion"),n.Wb(9,"mat-expansion-panel"),n.Wb(10,"mat-expansion-panel-header"),n.Wb(11,"mat-panel-title"),n.Rb(12,"mat-icon",27),n.Wb(13,"span"),n.Qc(14),n.ic(15,"translate"),n.Vb(),n.Vb(),n.Oc(16,wi,3,3,"mat-panel-description",28),n.Vb(),n.Wb(17,"div",29),n.Qc(18),n.ic(19,"translate"),n.Vb(),n.Wb(20,"div",30),n.Wb(21,"mat-form-field"),n.Wb(22,"mat-select",31),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().user.preferences.documentEdition=e}))("selectionChange",(function(){return n.Dc(t),n.hc().updateUserPreferences()})),n.Oc(23,Mi,2,2,"mat-option",32),n.Vb(),n.Wb(24,"mat-hint"),n.Qc(25),n.ic(26,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(27,"mat-expansion-panel"),n.Wb(28,"mat-expansion-panel-header"),n.Wb(29,"mat-panel-title"),n.Rb(30,"mat-icon",33),n.Rb(31,"mat-icon",34),n.Wb(32,"span"),n.Qc(33),n.ic(34,"translate"),n.Vb(),n.Vb(),n.Oc(35,ki,3,3,"mat-panel-description",28),n.Vb(),n.Wb(36,"mat-list"),n.Oc(37,Vi,3,2,"ng-container",14),n.Vb(),n.Vb(),n.Wb(38,"mat-expansion-panel",35),n.Wb(39,"mat-expansion-panel-header"),n.Wb(40,"mat-panel-title"),n.Rb(41,"mat-icon",33),n.Rb(42,"mat-icon",36),n.Qc(43),n.ic(44,"translate"),n.Vb(),n.Oc(45,Ri,3,3,"mat-panel-description",28),n.Vb(),n.Wb(46,"div",37),n.Wb(47,"mat-list"),n.Wb(48,"mat-list-item"),n.Wb(49,"mat-icon",38),n.Wb(50,"mat-checkbox",39),n.dc("change",(function(e){n.Dc(t);const i=n.hc();return e?i.masterToggleBaskets(e):null})),n.ic(51,"translate"),n.Vb(),n.Vb(),n.Wb(52,"p",17),n.Oc(53,ji,3,3,"span",40),n.Oc(54,Wi,2,10,"plugin-autocomplete",41),n.Vb(),n.Vb(),n.Rb(55,"mat-divider"),n.Oc(56,Fi,2,1,"ng-container",14),n.Vb(),n.Vb(),n.Wb(57,"div",37),n.Wb(58,"mat-tab-group"),n.Wb(59,"mat-tab",24),n.ic(60,"translate"),n.Wb(61,"mat-list"),n.Oc(62,Li,14,9,"ng-container",14),n.Vb(),n.Vb(),n.Vb(),n.Wb(63,"mat-tab-group"),n.Wb(64,"mat-tab",24),n.ic(65,"translate"),n.Wb(66,"mat-list"),n.Oc(67,zi,10,4,"ng-container",14),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Rb(68,"div",42),n.Vb(),n.Wb(69,"mat-expansion-panel",43),n.dc("opened",(function(){return n.Dc(t),n.hc().initMce()})),n.Wb(70,"mat-expansion-panel-header"),n.Wb(71,"mat-panel-title"),n.Rb(72,"mat-icon",44),n.Qc(73),n.ic(74,"translate"),n.Vb(),n.Oc(75,Bi,3,3,"mat-panel-description",28),n.Vb(),n.Wb(76,"div",37),n.Wb(77,"form",45,46),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().submitEmailSignature()})),n.Wb(79,"div",47),n.Wb(80,"div",48),n.Wb(81,"mat-form-field"),n.Wb(82,"input",49),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().mailSignatureModel.title=e})),n.ic(83,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(84,"div",47),n.Wb(85,"div",48),n.Wb(86,"div",50),n.Rb(87,"textarea",51),n.Vb(),n.Vb(),n.Vb(),n.Wb(88,"div",52),n.Wb(89,"div",53),n.Oc(90,Ui,3,4,"button",54),n.Oc(91,$i,3,4,"button",55),n.Oc(92,Hi,3,3,"button",56),n.Oc(93,Gi,3,3,"button",57),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(94,"div",37),n.Oc(95,Xi,9,7,"div",58),n.Vb(),n.Rb(96,"div",42),n.Vb(),n.Wb(97,"mat-expansion-panel"),n.Wb(98,"mat-expansion-panel-header"),n.Wb(99,"mat-panel-title"),n.Rb(100,"mat-icon",59),n.Qc(101),n.ic(102,"translate"),n.Vb(),n.Oc(103,qi,3,3,"mat-panel-description",28),n.Vb(),n.Wb(104,"div",60),n.Wb(105,"div",61),n.dc("click",(function(){return n.Dc(t),n.hc().clickOnUploader("uploadSignFile")}))("dragover",(function(){return n.Dc(t),n.hc().highlightMe=!0}))("dragleave",(function(){return n.Dc(t),n.hc().highlightMe=!1}))("onDropSuccess",(function(e){n.Dc(t);const i=n.hc();return i.dndUploadSignature(e),i.highlightMe=!1})),n.ic(106,"translate"),n.Qc(107),n.ic(108,"translate"),n.Vb(),n.Wb(109,"form",62,63),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().submitSignature()})),n.Wb(111,"div",48),n.Wb(112,"mat-form-field"),n.Wb(113,"input",64),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().signatureModel.label=e})),n.ic(114,"translate"),n.ic(115,"translate"),n.Vb(),n.Vb(),n.Wb(116,"div",65),n.Wb(117,"div",66),n.Wb(118,"input",67),n.dc("change",(function(e){return n.Dc(t),n.hc().uploadSignatureTrigger(e)})),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(119,"div",68),n.Wb(120,"div",69),n.dc("click",(function(){return n.Dc(t),n.hc().clickOnUploader("uploadSignFile")})),n.Qc(121),n.ic(122,"translate"),n.Rb(123,"i",70),n.Qc(124," ( < 2MB) "),n.Vb(),n.Vb(),n.Oc(125,Ki,2,1,"div",71),n.Wb(126,"div",52),n.Wb(127,"div",53),n.Wb(128,"button",72),n.Qc(129),n.ic(130,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(131,"div",73),n.Wb(132,"div",74),n.Oc(133,Yi,12,12,"div",75),n.Vb(),n.Wb(134,"div"),n.Oc(135,Ji,3,6,"button",76),n.Vb(),n.Vb(),n.Rb(136,"div",42),n.Vb(),n.Wb(137,"mat-expansion-panel",43),n.dc("opened",(function(){return n.Dc(t),n.hc().initGroupsContact()})),n.Wb(138,"mat-expansion-panel-header"),n.Wb(139,"mat-panel-title"),n.Rb(140,"mat-icon",77),n.Qc(141),n.ic(142,"translate"),n.Vb(),n.Oc(143,Zi,3,3,"mat-panel-description",28),n.Vb(),n.Wb(144,"mat-tab-group",78),n.dc("selectedIndexChange",(function(e){n.Dc(t);const i=n.zc(149);return n.hc().changeTabContactGrp(e),i.close()})),n.Wb(145,"mat-tab",24),n.ic(146,"translate"),n.Wb(147,"mat-accordion"),n.Wb(148,"mat-expansion-panel",43,79),n.dc("opened",(function(){return n.Dc(t),n.hc().initGroupsContact()})),n.Wb(150,"mat-expansion-panel-header"),n.Wb(151,"mat-panel-title",80),n.Wb(152,"span",81),n.Qc(153),n.ic(154,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(155,"form",82,83),n.dc("ngSubmit",(function(){n.Dc(t);const e=n.zc(149);return n.hc().contactsGroupSubmit(),e.close()})),n.Wb(157,"div",66),n.Wb(158,"div",84),n.Wb(159,"mat-form-field"),n.Wb(160,"input",85),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().contactsGroup.label=e})),n.ic(161,"translate"),n.ic(162,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(163,"div",66),n.Wb(164,"div",84),n.Wb(165,"mat-form-field"),n.Wb(166,"input",86),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().contactsGroup.description=e})),n.ic(167,"translate"),n.ic(168,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(169,"div",66),n.Wb(170,"div",84),n.Wb(171,"mat-slide-toggle",87),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().contactsGroup.public=e})),n.ic(172,"translate"),n.Qc(173),n.ic(174,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(175,"div",66),n.Wb(176,"div",88),n.Wb(177,"button",72),n.Qc(178),n.ic(179,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(180,"div",89),n.Wb(181,"div",90),n.Wb(182,"div",91),n.Wb(183,"mat-form-field"),n.Wb(184,"input",92),n.dc("keyup",(function(e){return n.Dc(t),n.hc().applyFilterGroupsList(e.target.value)})),n.ic(185,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(186,"div",91),n.Rb(187,"mat-paginator",93,94),n.Vb(),n.Vb(),n.Wb(189,"mat-table",95,96),n.Ub(191,97),n.Oc(192,tn,3,5,"mat-header-cell",98),n.Oc(193,en,2,3,"mat-cell",99),n.Tb(),n.Ub(194,100),n.Oc(195,nn,3,3,"mat-header-cell",101),n.Oc(196,an,2,1,"mat-cell",102),n.Tb(),n.Ub(197,103),n.Oc(198,sn,3,3,"mat-header-cell",104),n.Oc(199,cn,3,2,"mat-cell",105),n.Tb(),n.Ub(200,106),n.Oc(201,ln,3,5,"mat-header-cell",107),n.Oc(202,un,3,4,"mat-cell",108),n.Tb(),n.Ub(203,109),n.Oc(204,pn,3,3,"mat-header-cell",104),n.Oc(205,bn,2,1,"mat-cell",105),n.Tb(),n.Ub(206,110),n.Oc(207,fn,1,0,"mat-header-cell",111),n.Oc(208,mn,4,3,"mat-cell",112),n.Tb(),n.Oc(209,gn,1,0,"mat-header-row",113),n.Oc(210,vn,2,3,"mat-row",114),n.Vb(),n.Vb(),n.Vb(),n.Oc(211,Nn,62,50,"mat-tab",115),n.Vb(),n.Rb(212,"div",42),n.Vb(),n.Vb(),n.Vb(),n.Wb(213,"mat-tab",24),n.ic(214,"translate"),n.Oc(215,Kn,21,9,"ng-template",116),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(110),e=n.zc(156),i=n.hc();n.Db(1),n.oc("selectedIndex",i.selectedIndex),n.Db(1),n.pc("label",n.jc(3,76,"lang.myInformations")),n.Db(2),n.oc("ngIf",i.showPassword),n.Db(1),n.oc("ngIf",!i.showPassword),n.Db(1),n.pc("label",n.jc(7,78,"lang.myParameters")),n.Db(8),n.Rc(n.jc(15,80,"lang.editorOption")),n.Db(2),n.oc("ngIf",!i.appService.getViewMode()),n.Db(2),n.Sc(" ",n.jc(19,82,"lang.documentEditor"),""),n.Db(4),n.oc("ngModel",i.user.preferences.documentEdition),n.Db(1),n.oc("ngForOf",i.editorsList),n.Db(2),n.Sc(" ",n.jc(26,84,"lang.documentEditor_"+i.user.preferences.documentEdition)," "),n.Db(8),n.Rc(n.jc(34,86,"lang.basketsColor")),n.Db(2),n.oc("ngIf",!i.appService.getViewMode()),n.Db(2),n.oc("ngForOf",i.user.regroupedBaskets),n.Db(1),n.oc("expanded",i.myBasketExpansionPanel),n.Db(5),n.Sc(" ",n.jc(44,88,"lang.myBaskets")," "),n.Db(2),n.oc("ngIf",!i.appService.getViewMode()),n.Db(5),n.pc("matTooltip",n.jc(51,90,"lang.selectAll")),n.oc("checked",i.selectionBaskets.hasValue()),n.Db(3),n.oc("ngIf",!i.selectionBaskets.hasValue()),n.Db(1),n.oc("ngIf",i.selectionBaskets.hasValue()),n.Db(2),n.oc("ngForOf",i.user.baskets),n.Db(3),n.pc("label",n.jc(60,92,"lang.basketsRedirected")),n.Db(3),n.oc("ngForOf",i.user.redirectedBaskets),n.Db(2),n.pc("label",n.jc(65,94,"lang.basketsAssigned")),n.Db(3),n.oc("ngForOf",i.user.assignedBaskets),n.Db(6),n.Sc(" ",n.jc(74,96,"lang.mySignMail")," "),n.Db(2),n.oc("ngIf",!i.appService.getViewMode()),n.Db(7),n.pc("placeholder",n.jc(83,98,"lang.label")),n.oc("ngModel",i.mailSignatureModel.title),n.Db(8),n.oc("ngIf",-1==i.mailSignatureModel.selected),n.Db(1),n.oc("ngIf",-1!=i.mailSignatureModel.selected),n.Db(1),n.oc("ngIf",-1!=i.mailSignatureModel.selected),n.Db(1),n.oc("ngIf",-1!=i.mailSignatureModel.selected),n.Db(2),n.oc("ngForOf",i.user.emailSignatures),n.Db(6),n.Sc(" ",n.jc(102,100,"lang.mySignSignatureBook")," "),n.Db(2),n.oc("ngIf",!i.appService.getViewMode()),n.Db(2),n.Ib("dndFileHighlighted",i.highlightMe),n.pc("matTooltip",n.jc(106,102,"lang.uploadSignFileInfo")),n.Db(2),n.Sc(" ",n.jc(108,104,"lang.uploadSignFile")," "),n.Db(6),n.pc("title",n.jc(114,106,"lang.label")),n.pc("placeholder",n.jc(115,108,"lang.label")),n.oc("ngModel",i.signatureModel.label),n.Db(6),n.oc("ngClass",n.vc(138,Ci,""!=i.signatureModel.size?"col-md-10":"col-md-12")),n.Db(2),n.Sc(" ",n.jc(122,110,"lang.clickOn")," "),n.Db(4),n.oc("ngIf",i.signatureModel.size),n.Db(3),n.oc("disabled",!t.form.valid||!i.signatureModel.size),n.Db(1),n.Rc(n.jc(130,112,"lang.save")),n.Db(4),n.oc("ngForOf",i.user.signatures),n.Db(2),n.oc("ngIf",i.user.signatures.length>0),n.Db(6),n.Sc(" ",n.jc(142,114,"lang.myContactsGroups")," "),n.Db(2),n.oc("ngIf",!i.appService.getViewMode()),n.Db(1),n.oc("selectedIndex",i.selectedIndexContactsGrp),n.Db(1),n.pc("label",n.jc(146,116,"lang.contactGroupList")),n.Db(8),n.Rc(n.jc(154,118,"lang.contactGroupCreate")),n.Db(7),n.pc("title",n.jc(161,120,"lang.label")),n.pc("placeholder",n.jc(162,122,"lang.label")),n.oc("ngModel",i.contactsGroup.label),n.Db(6),n.pc("title",n.jc(167,124,"lang.description")),n.pc("placeholder",n.jc(168,126,"lang.description")),n.oc("ngModel",i.contactsGroup.description),n.Db(5),n.pc("title",n.jc(172,128,"lang.contactsGroupDesc")),n.oc("ngModel",i.contactsGroup.public),n.Db(2),n.Sc(" ",n.jc(174,130,"lang.public"),""),n.Db(4),n.oc("disabled",!e.form.valid),n.Db(1),n.Rc(n.jc(179,132,"lang.save")),n.Db(6),n.pc("placeholder",n.jc(185,134,"lang.filterBy")),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",5),n.Db(2),n.oc("dataSource",i.dataSourceGroupsList),n.Db(20),n.oc("matHeaderRowDef",i.displayedColumnsGroupsList),n.Db(1),n.oc("matRowDefColumns",i.displayedColumnsGroupsList),n.Db(1),n.oc("ngIf",i.contactsListMode),n.Db(2),n.pc("label",n.jc(214,136,"lang.myHistoric"))}}function Jn(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item"),n.Rb(1,"mat-icon",249),n.Wb(2,"h4",17),n.Qc(3),n.Vb(),n.Wb(4,"p",17),n.Wb(5,"mat-form-field",250),n.Wb(6,"input",251),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.role=i})),n.ic(7,"translate"),n.ic(8,"translate"),n.Vb(),n.Wb(9,"mat-hint",252),n.ic(10,"translate"),n.Qc(11),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(3),n.Rc(t.group_desc),n.Db(3),n.pc("title",n.jc(7,6,"lang.role")),n.pc("placeholder",n.jc(8,8,"lang.role")),n.oc("ngModel",t.role),n.Db(3),n.pc("matTooltip",n.jc(10,10,"lang.perimeter")),n.Db(2),n.Rc(t.maarch_comment)}}function Zn(t,e){1&t&&n.Rb(0,"mat-icon",257)}function ta(t,e){1&t&&n.Rb(0,"mat-icon",258)}function ea(t,e){1&t&&(n.Wb(0,"span",163),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.primary")))}const ia=function(t){return{"font-weight":t}};function na(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item"),n.Oc(1,Zn,1,0,"mat-icon",253),n.Oc(2,ta,1,0,"mat-icon",254),n.Wb(3,"h4",255),n.Qc(4),n.Oc(5,ea,3,3,"span",256),n.Vb(),n.Wb(6,"p",17),n.Wb(7,"mat-form-field",250),n.Wb(8,"input",251),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.user_role=i})),n.ic(9,"translate"),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf","Y"==t.primary_entity),n.Db(1),n.oc("ngIf","Y"!=t.primary_entity),n.Db(1),n.pc("matTooltip",t.entity_label),n.oc("ngStyle",n.vc(13,ia,"Y"==t.primary_entity?"bold":"normal")),n.Db(1),n.Sc(" ",t.entity_label," "),n.Db(1),n.oc("ngIf","Y"==t.primary_entity),n.Db(3),n.pc("title",n.jc(9,9,"lang.role")),n.pc("placeholder",n.jc(10,11,"lang.role")),n.oc("ngModel",t.user_role)}}let aa=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c,l,h){this.translate=t,this.http=e,this.zone=i,this.notify=n,this.dialog=a,this._formBuilder=s,this.authService=o,this.headerService=r,this.appService=c,this.viewContainerRef=l,this.functions=h,this.highlightMe=!1,this.user={baskets:[]},this.histories=[],this.passwordModel={currentPassword:"",newPassword:"",reNewPassword:""},this.ruleText="",this.validPassword=!1,this.matchPassword=!1,this.hidePassword=!0,this.passwordRules={minLength:{enabled:!1,value:0},complexityUpper:{enabled:!1,value:0},complexityNumber:{enabled:!1,value:0},complexitySpecial:{enabled:!1,value:0},renewal:{enabled:!1,value:0},historyLastUse:{enabled:!1,value:0}},this.signatureModel={base64:"",base64ForJs:"",name:"",type:"",size:0,label:""},this.mailSignatureModel={selected:-1,htmlBody:"",title:""},this.userAbsenceModel=[],this.basketsToRedirect=[],this.showPassword=!1,this.selectedSignature=-1,this.selectedSignatureLabel="",this.loading=!1,this.selectedIndex=0,this.selectedIndexContactsGrp=0,this.loadingSign=!1,this.selectionBaskets=new O.c(!0,[]),this.myBasketExpansionPanel=!1,this.contactsGroups=[],this.displayedColumnsGroupsList=["label","description","nbContacts","public","actions"],this.contactsGroup={public:!1},this.initAutoCompleteContact=!0,this.searchTerm=new X.i,this.searchResult=[],this.displayedColumnsContactsListAutocomplete=["select","contact","address"],this.selection=new O.c(!0,[]),this.contactsListMode=!1,this.contactsList=[],this.displayedColumnsContactsList=["contact","address","actions"],this.displayedColumns=["event_date","record_id","info"],window.angularProfileComponent={componentAfterUpload:t=>this.processAfterUpload(t)},this.searchTerm.valueChanges.pipe(Object(pt.a)(500),Object(d.a)(t=>t.length>2),Object(bt.a)(),Object(ft.a)(t=>this.http.get("../rest/autocomplete/contacts",{params:{search:t}}))).subscribe(t=>{this.searchResult=t,this.dataSourceContactsListAutocomplete=new vt.p(this.searchResult),this.dataSourceContactsListAutocomplete.paginator=this.paginatorGroupsListAutocomplete}),this.http.get("../rest/documentEditors").pipe(Object(mt.a)(t=>{this.editorsList=t})).subscribe()}masterToggleBaskets(t){t.checked?this.user.baskets.forEach(t=>{t.userToDisplay||this.selectionBaskets.select(t)}):this.selectionBaskets.clear()}applyFilterGroupsList(t){t=(t=t.trim()).toLowerCase(),this.dataSourceGroupsList.filter=t}masterToggle(t){t.checked?this.dataSourceContactsListAutocomplete.data.forEach(t=>{$("#check_"+t.id+"-input").is(":disabled")||this.selection.select(t.id)}):this.selection.clear()}applyFilterContactsList(t){t=(t=t.trim()).toLowerCase(),this.dataSourceContactsList.filter=t}applyFilter(t){t=(t=t.trim()).toLowerCase(),this.dataSource.filter=t}initComponents(t){this.selectedIndex=t.index,2==t.index?(this.appService.getViewMode()||this.sidenavRight.open(),this.http.get("../rest/history/users/"+this.user.id).subscribe(t=>{this.histories=t.histories,setTimeout(()=>{this.dataSource=new vt.p(this.histories),this.dataSource.sortingDataAccessor=this.functions.listSortingDataAccessor,this.dataSource.paginator=this.paginatorHistory,this.dataSource.sort=this.sortHistory},0)},t=>{this.notify.error(t.error.errors)})):1==t.index?this.sidenavRight.close():this.appService.getViewMode()||this.sidenavRight.open()}initMce(){tinymce.remove("textarea"),tinymce.baseURL="../node_modules/tinymce",tinymce.suffix=".min",tinymce.init({selector:"textarea#emailSignature",statusbar:!1,language:this.translate.instant("lang.langISO").replace("-","_"),language_url:`../node_modules/tinymce-i18n/langs/${this.translate.instant("lang.langISO").replace("-","_")}.js`,height:"200",plugins:["textcolor"],external_plugins:{maarch_b64image:"../../src/frontend/plugins/tinymce/maarch_b64image/plugin.min.js"},menubar:!1,toolbar:"undo | bold italic underline | alignleft aligncenter alignright | maarch_b64image | forecolor",theme_buttons1_add:"fontselect,fontsizeselect",theme_buttons2_add_before:"cut,copy,paste,pastetext,pasteword,separator,search,replace,separator",theme_buttons2_add:"separator,insertdate,inserttime,preview,separator,forecolor,backcolor",theme_buttons3_add_before:"tablecontrols,separator",theme_buttons3_add:"separator,print,separator,ltr,rtl,separator,fullscreen,separator,insertlayer,moveforward,movebackward,absolut",theme_toolbar_align:"left",theme_advanced_toolbar_location:"top",theme_styles:"Header 1=header1;Header 2=header2;Header 3=header3;Table Row=tableRow1"})}initGroupsContact(){this.contactsListMode=!1,this.selectedIndexContactsGrp=0,this.http.get("../rest/contactsGroups").subscribe(t=>{this.contactsGroups=[],this.contactsGroup={public:!1,contacts:[]};let e=0;t.contactsGroups.forEach(t=>{t.owner==this.headerService.user.id&&(t.position=e,this.contactsGroups.push(t),e++)}),setTimeout(()=>{this.dataSourceGroupsList=new vt.p(this.contactsGroups),this.dataSourceGroupsList.paginator=this.paginatorGroupsList,this.dataSourceGroupsList.sort=this.sortGroupsList},0)},t=>{this.notify.handleErrors(t)})}contactsGroupSubmit(){this.http.post("../rest/contactsGroups",this.contactsGroup).subscribe(t=>{this.initGroupsContact(),this.notify.success(this.translate.instant("lang.contactsGroupAdded"))},t=>{this.notify.error(t.error.errors)})}updateGroupSubmit(){this.http.put("../rest/contactsGroups/"+this.contactsGroup.id,this.contactsGroup).subscribe(()=>{this.notify.success(this.translate.instant("lang.contactsGroupUpdated")),this.initGroupsContact()},t=>{this.notify.error(t.error.errors)})}deleteContactsGroup(t){var e=this.contactsGroups[t];confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.delete")+" \xab "+e.label+" \xbb")&&this.http.delete("../rest/contactsGroups/"+e.id).subscribe(()=>{this.contactsListMode=!1;var e=this.contactsGroups.length-1;this.contactsGroups[t]=this.contactsGroups[e],this.contactsGroups[t].position=t,this.contactsGroups.splice(e,1),this.dataSourceGroupsList=new vt.p(this.contactsGroups),this.dataSourceGroupsList.paginator=this.paginatorGroupsList,this.notify.success(this.translate.instant("lang.contactsGroupDeleted"))},t=>{this.notify.error(t.error.errors)})}loadContactsGroup(t){this.contactsListMode=!0,this.http.get("../rest/contactsGroups/"+t.id).subscribe(t=>{this.contactsGroup=t.contactsGroup,setTimeout(()=>{this.dataSourceContactsList=new vt.p(this.contactsGroup.contacts),this.dataSourceContactsList.paginator=this.paginatorContactsList,this.dataSourceContactsList.sort=this.sortContactsList,this.selectedIndexContactsGrp=1},0)})}saveContactsList(t){t.textContent=this.translate.instant("lang.loading")+"...",t.disabled=!0,this.http.post("../rest/contactsGroups/"+this.contactsGroup.id+"/contacts",{contacts:this.selection.selected}).subscribe(e=>{this.notify.success(this.translate.instant("lang.contactAdded")),this.selection.clear(),t.textContent=this.translate.instant("lang.add"),this.contactsGroup=e.contactsGroup,setTimeout(()=>{this.dataSourceContactsList=new vt.p(this.contactsGroup.contacts),this.dataSourceContactsList.paginator=this.paginatorContactsList,this.dataSourceContactsList.sort=this.sortContactsList},0)},t=>{this.notify.error(t.error.errors)})}preDelete(t){confirm(this.translate.instant("lang.reallyWantToDeleteContactFromGroup"))&&this.removeContact(this.contactsGroup.contacts[t],t)}removeContact(t,e){this.http.delete("../rest/contactsGroups/"+this.contactsGroup.id+"/contacts/"+t.id).subscribe(()=>{var t=this.contactsGroup.contacts.length-1;this.contactsGroup.contacts[e]=this.contactsGroup.contacts[t],this.contactsGroup.contacts[e].position=e,this.contactsGroup.contacts.splice(t,1),this.dataSourceContactsList=new vt.p(this.contactsGroup.contacts),this.dataSourceContactsList.paginator=this.paginatorContactsList,this.dataSourceContactsList.sort=this.sortContactsList,this.notify.success(this.translate.instant("lang.contactDeletedFromGroup"))},t=>{this.notify.error(t.error.errors)})}launchLoading(){this.searchTerm.value.length>2&&(this.dataSourceContactsListAutocomplete=null,this.initAutoCompleteContact=!1)}isInGrp(t){let e=!1;return this.contactsGroup.contacts.forEach(i=>{i.id==t.id&&(e=!0)}),e}selectContact(t){$("#check_"+t+"-input").is(":disabled")||this.selection.toggle(t)}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.myProfile")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,this.http.get("../rest/currentUser/profile").subscribe(t=>{this.user=t,this.user.baskets.forEach((t,e)=>{this.user.baskets[e].disabled=!1,this.user.redirectedBaskets.forEach(i=>{t.basket_id==i.basket_id&&t.basket_owner==i.basket_owner&&(this.user.baskets[e].disabled=!0)})}),this.loading=!1})}processAfterUpload(t){this.zone.run(()=>this.resfreshUpload(t))}resfreshUpload(t){this.signatureModel.size<=2e6?(this.signatureModel.base64=t.replace(/^data:.*?;base64,/,""),this.signatureModel.base64ForJs=t):(this.signatureModel.name="",this.signatureModel.size=0,this.signatureModel.type="",this.signatureModel.base64="",this.signatureModel.base64ForJs="",this.notify.error("Taille maximum de fichier d\xe9pass\xe9e (2 MB)"))}displayPassword(){this.showPassword=!this.showPassword}clickOnUploader(t){$("#"+t).click()}uploadSignatureTrigger(t){if(t.target.files&&t.target.files[0]){var e=new FileReader;this.signatureModel.name=t.target.files[0].name,this.signatureModel.size=t.target.files[0].size,this.signatureModel.type=t.target.files[0].type,""==this.signatureModel.label&&(this.signatureModel.label=this.signatureModel.name),e.readAsDataURL(t.target.files[0]),e.onload=t=>{window.angularProfileComponent.componentAfterUpload(t.target.result),this.submitSignature()}}}dndUploadSignature(t){if(t.mouseEvent.dataTransfer.files&&t.mouseEvent.dataTransfer.files[0]){var e=new FileReader;this.signatureModel.name=t.mouseEvent.dataTransfer.files[0].name,this.signatureModel.size=t.mouseEvent.dataTransfer.files[0].size,this.signatureModel.type=t.mouseEvent.dataTransfer.files[0].type,""==this.signatureModel.label&&(this.signatureModel.label=this.signatureModel.name),e.readAsDataURL(t.mouseEvent.dataTransfer.files[0]),e.onload=t=>{window.angularProfileComponent.componentAfterUpload(t.target.result),this.submitSignature()}}}displaySignatureEditionForm(t){this.selectedSignature=t,this.selectedSignatureLabel=this.user.signatures[t].signature_label}changeEmailSignature(t){this.mailSignatureModel.selected=t,tinymce.get("emailSignature").setContent(this.user.emailSignatures[t].html_body),this.mailSignatureModel.title=this.user.emailSignatures[t].title}resetEmailSignature(){this.mailSignatureModel.selected=-1,tinymce.get("emailSignature").setContent(""),this.mailSignatureModel.title=""}addBasketRedirection(t){let e=[];this.selectionBaskets.selected.forEach(i=>{e.push({actual_user_id:t.serialId,basket_id:i.basket_id,group_id:i.groupSerialId,originalOwner:null})}),confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.redirectBasket"))&&this.http.post("../rest/users/"+this.user.id+"/redirectedBaskets",e).subscribe(t=>{this.user.baskets=t.baskets,this.user.redirectedBaskets=t.redirectedBaskets,this.selectionBaskets.clear(),this.notify.success(this.translate.instant("lang.basketUpdated"))},t=>{this.notify.error(t.error.errors)})}delBasketRedirection(t,e){confirm(this.translate.instant("lang.confirmAction"))&&this.http.delete("../rest/users/"+this.user.id+"/redirectedBaskets?redirectedBasketIds[]="+t.id).subscribe(t=>{this.user.baskets=t.baskets,this.user.redirectedBaskets.splice(e,1),this.notify.success(this.translate.instant("lang.basketUpdated"))},t=>{this.notify.error(t.error.errors)})}delBasketAssignRedirection(t,e){confirm(this.translate.instant("lang.confirmAction"))&&this.http.delete("../rest/users/"+this.user.id+"/redirectedBaskets?redirectedBasketIds[]="+t.id).subscribe(t=>{this.user.baskets=t.baskets,this.user.assignedBaskets.splice(e,1),this.notify.success(this.translate.instant("lang.basketUpdated"))},t=>{this.notify.error(t.error.errors)})}reassignBasketRedirection(t,e,i){confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.redirectBasket"))&&this.http.post("../rest/users/"+this.user.id+"/redirectedBaskets",[{actual_user_id:t.serialId,basket_id:e.basket_id,group_id:e.group_id,originalOwner:e.owner_user_id}]).subscribe(t=>{this.user.baskets=t.baskets,this.user.assignedBaskets.splice(i,1),this.notify.success(this.translate.instant("lang.basketUpdated"))},t=>{this.notify.error(t.error.errors)})}updateBasketColor(t,e){this.http.put("../rest/currentUser/groups/"+this.user.regroupedBaskets[t].groupSerialId+"/baskets/"+this.user.regroupedBaskets[t].baskets[e].basket_id,{color:this.user.regroupedBaskets[t].baskets[e].color}).subscribe(t=>{this.user.regroupedBaskets=t.userBaskets,this.notify.success(this.translate.instant("lang.modificationSaved"))},t=>{this.notify.error(t.error.errors)})}activateAbsence(){confirm(this.translate.instant("lang.confirmToBeAbsent"))&&this.http.put("../rest/users/"+this.user.id+"/status",{status:"ABS"}).subscribe(()=>{this.authService.logout()},t=>{this.notify.error(t.error.errors)})}askRedirectBasket(){this.myBasketExpansionPanel=!1,this.viewPanels.forEach(t=>t.close()),confirm(this.translate.instant("lang.askRedirectBasketBeforeAbsence"))?(this.selectedIndex=1,setTimeout(()=>{this.myBasketExpansionPanel=!0},0)):this.activateAbsence()}updatePassword(){this.passwordModel.currentPassword=this.firstFormGroup.controls.currentPasswordCtrl.value,this.passwordModel.newPassword=this.firstFormGroup.controls.newPasswordCtrl.value,this.passwordModel.reNewPassword=this.firstFormGroup.controls.retypePasswordCtrl.value,this.http.put("../rest/users/"+this.user.id+"/password",this.passwordModel).subscribe(t=>{this.showPassword=!1,this.passwordModel={currentPassword:"",newPassword:"",reNewPassword:""},this.notify.success(this.translate.instant("lang.passwordUpdated"))},t=>{this.notify.error(t.error.errors)})}submitEmailSignature(){this.mailSignatureModel.htmlBody=tinymce.get("emailSignature").getContent(),this.http.post("../rest/currentUser/emailSignature",this.mailSignatureModel).subscribe(t=>{t.errors?this.notify.error(t.errors):(this.user.emailSignatures=t.emailSignatures,this.mailSignatureModel={selected:-1,htmlBody:"",title:""},tinymce.get("emailSignature").setContent(""),this.notify.success(this.translate.instant("lang.emailSignatureAdded")))})}updateEmailSignature(){this.mailSignatureModel.htmlBody=tinymce.get("emailSignature").getContent(),this.http.put("../rest/currentUser/emailSignature/"+this.user.emailSignatures[this.mailSignatureModel.selected].id,this.mailSignatureModel).subscribe(t=>{t.errors?this.notify.error(t.errors):(this.user.emailSignatures[this.mailSignatureModel.selected].title=t.emailSignature.title,this.user.emailSignatures[this.mailSignatureModel.selected].html_body=t.emailSignature.html_body,this.notify.success(this.translate.instant("lang.emailSignatureUpdated")))})}deleteEmailSignature(){confirm(this.translate.instant("lang.confirmDeleteMailSignature"))&&this.http.delete("../rest/currentUser/emailSignature/"+this.user.emailSignatures[this.mailSignatureModel.selected].id).subscribe(t=>{t.errors?this.notify.error(t.errors):(this.user.emailSignatures=t.emailSignatures,this.mailSignatureModel={selected:-1,htmlBody:"",title:""},tinymce.get("emailSignature").setContent(""),this.notify.success(this.translate.instant("lang.emailSignatureDeleted")))})}submitSignature(){this.http.post("../rest/users/"+this.user.id+"/signatures",this.signatureModel).subscribe(t=>{this.user.signatures=t.signatures,this.signatureModel={base64:"",base64ForJs:"",name:"",type:"",size:0,label:""},this.notify.success(this.translate.instant("lang.signatureAdded"))},t=>{this.notify.error(t.error.errors)})}updateSignature(t){this.http.put("../rest/users/"+this.user.id+"/signatures/"+t.id,{label:t.signature_label}).subscribe(t=>{this.notify.success(this.translate.instant("lang.signatureUpdated"))},t=>{this.notify.error(t.error.errors)})}deleteSignature(t){confirm(this.translate.instant("lang.confirmDeleteSignature"))&&this.http.delete("../rest/users/"+this.user.id+"/signatures/"+t).subscribe(t=>{this.user.signatures=t.signatures,this.notify.success(this.translate.instant("lang.signatureDeleted"))},t=>{this.notify.error(t.error.errors)})}onSubmit(){this.http.put("../rest/currentUser/profile",this.user).subscribe(()=>{this.notify.success(this.translate.instant("lang.modificationSaved")),this.headerService.user.firstname=this.user.firstname,this.headerService.user.lastname=this.user.lastname},t=>{this.notify.error(t.error.errors)})}updateUserPreferences(){this.http.put("../rest/currentUser/profile/preferences",{documentEdition:this.user.preferences.documentEdition}).subscribe(()=>{this.notify.success(this.translate.instant("lang.modificationSaved")),this.headerService.resfreshCurrentUser()},t=>{this.notify.error(t.error.errors)})}regexValidator(t,e){return i=>i.value?t.test(i.value)?null:e:null}changePasswd(){this.http.get("../rest/passwordRules").subscribe(t=>{let e=[],i=[],n=[];e.push(X.I.required),t.rules.forEach(t=>{"minLength"==t.label?(this.passwordRules.minLength.enabled=t.enabled,this.passwordRules.minLength.value=t.value,t.enabled&&(e.push(X.I.minLength(this.passwordRules.minLength.value)),i.push(t.value+" "+this.translate.instant("lang.password"+t.label)))):"complexityUpper"==t.label?(this.passwordRules.complexityUpper.enabled=t.enabled,this.passwordRules.complexityUpper.value=t.value,t.enabled&&(e.push(this.regexValidator(new RegExp("[A-Z]"),{complexityUpper:""})),i.push(this.translate.instant("lang.password"+t.label)))):"complexityNumber"==t.label?(this.passwordRules.complexityNumber.enabled=t.enabled,this.passwordRules.complexityNumber.value=t.value,t.enabled&&(e.push(this.regexValidator(new RegExp("[0-9]"),{complexityNumber:""})),i.push(this.translate.instant("lang.password"+t.label)))):"complexitySpecial"==t.label?(this.passwordRules.complexitySpecial.enabled=t.enabled,this.passwordRules.complexitySpecial.value=t.value,t.enabled&&(e.push(this.regexValidator(new RegExp("[^A-Za-z0-9]"),{complexitySpecial:""})),i.push(this.translate.instant("lang.password"+t.label)))):"renewal"==t.label?(this.passwordRules.renewal.enabled=t.enabled,this.passwordRules.renewal.value=t.value,t.enabled&&n.push(this.translate.instant("lang.password"+t.label)+" <b>"+t.value+" "+this.translate.instant("lang.days")+"</b>. "+this.translate.instant("lang.password2"+t.label)+".")):"historyLastUse"==t.label&&(this.passwordRules.historyLastUse.enabled=t.enabled,this.passwordRules.historyLastUse.value=t.value,t.enabled&&n.push(this.translate.instant("lang.passwordhistoryLastUseDesc")+" <b>"+t.value+"</b> "+this.translate.instant("lang.passwordhistoryLastUseDesc2")+"."))}),this.ruleText=i.join(", "),this.otherRuleText=n.join("<br/>"),this.firstFormGroup.controls.newPasswordCtrl.setValidators(e)},t=>{this.notify.error(t.error.errors)}),this.firstFormGroup=this._formBuilder.group({newPasswordCtrl:[""],retypePasswordCtrl:["",X.I.compose([X.I.required])],currentPasswordCtrl:["",X.I.compose([X.I.required])]},{validator:this.matchValidator}),this.validPassword=!1,this.firstFormGroup.controls.currentPasswordCtrl.setErrors(null),this.firstFormGroup.controls.newPasswordCtrl.setErrors(null),this.firstFormGroup.controls.retypePasswordCtrl.setErrors(null),this.selectedIndex=0,this.showPassword=!0}matchValidator(t){return t.controls.newPasswordCtrl.value!=t.controls.retypePasswordCtrl.value&&(t.controls.retypePasswordCtrl.setErrors({mismatch:!0}),{mismatch:!0})}getErrorMessage(){return this.firstFormGroup.controls.retypePasswordCtrl.setErrors(this.firstFormGroup.controls.newPasswordCtrl.value!=this.firstFormGroup.controls.retypePasswordCtrl.value?{mismatch:!0}:null),this.firstFormGroup.controls.newPasswordCtrl.hasError("required")?this.translate.instant("lang.requiredField")+" !":this.firstFormGroup.controls.newPasswordCtrl.hasError("minlength")&&this.passwordRules.minLength.enabled?this.passwordRules.minLength.value+" "+this.translate.instant("lang.passwordminLength")+" !":null!=this.firstFormGroup.controls.newPasswordCtrl.errors&&void 0!==this.firstFormGroup.controls.newPasswordCtrl.errors.complexityUpper&&this.passwordRules.complexityUpper.enabled?this.translate.instant("lang.passwordcomplexityUpper")+" !":null!=this.firstFormGroup.controls.newPasswordCtrl.errors&&void 0!==this.firstFormGroup.controls.newPasswordCtrl.errors.complexityNumber&&this.passwordRules.complexityNumber.enabled?this.translate.instant("lang.passwordcomplexityNumber")+" !":null!=this.firstFormGroup.controls.newPasswordCtrl.errors&&void 0!==this.firstFormGroup.controls.newPasswordCtrl.errors.complexitySpecial&&this.passwordRules.complexitySpecial.enabled?this.translate.instant("lang.passwordcomplexitySpecial")+" !":(this.firstFormGroup.controls.newPasswordCtrl.setErrors(null),this.validPassword=!0,"")}showActions(t){$("#"+t.basket_id+"_"+t.group_id).show()}hideActions(t){$("#"+t.basket_id+"_"+t.group_id).hide()}toggleAddGrp(){this.initGroupsContact(),$("#contactsGroupFormUp").toggle(),$("#contactsGroupList").toggle()}toggleAddContactGrp(){$("#contactsGroupFormAdd").toggle()}changeTabContactGrp(t){this.selectedIndexContactsGrp=t,0==t&&this.initGroupsContact()}syncMP(){this.loadingSign=!0,this.http.put("../rest/users/"+this.user.id+"/externalSignatures",{}).subscribe(t=>{this.loadingSign=!1,this.notify.success(this.translate.instant("lang.signsSynchronized"))},t=>{this.loadingSign=!1,this.notify.handleErrors(t)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(n.C),n.Qb(D.a),n.Qb(q.b),n.Qb(X.h),n.Qb(_.a),n.Qb(y.a),n.Qb(w.a),n.Qb(n.T),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(oi,!0),n.Kc(ri,!0),n.Xc(ci,!0),n.Xc(li,!0),n.Xc(di,!0),n.Xc(hi,!0),n.Xc(ui,!0),n.Xc(pi,!0),n.Xc(bi,!0),n.Xc(gt.c,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginatorGroupsList=i.first),n.yc(i=n.ec())&&(e.sortGroupsList=i.first),n.yc(i=n.ec())&&(e.paginatorGroupsListAutocomplete=i.first),n.yc(i=n.ec())&&(e.paginatorContactsList=i.first),n.yc(i=n.ec())&&(e.sortContactsList=i.first),n.yc(i=n.ec())&&(e.paginatorHistory=i.first),n.yc(i=n.ec())&&(e.sortHistory=i.first),n.yc(i=n.ec())&&(e.viewPanels=i))},decls:27,vars:19,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["fixedTopGap","56","position","end",2,"overflow-x","hidden","max-width","500px",3,"mode","fixedInViewport","opened"],["snav2",""],["mat-subheader",""],[4,"ngFor","ngForOf"],["mat-list-item","",3,"click"],["color","warn","mat-list-icon","",1,"fa","fa-plane"],["mat-line",""],["mat-list-item","",3,"click",4,"ngIf"],["color","primary","mat-list-icon","",1,"fa","fa-key"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[3,"selectedIndex","selectedTabChange"],[3,"label"],["style","margin-bottom: 5%",4,"ngIf"],["class","form-horizontal",3,"ngSubmit",4,"ngIf"],["color","primary",1,"fa","fa-file-word",2,"font-size","25px","width","50px"],[4,"ngIf"],[1,"col-sm-12","col-md-4",2,"line-height","50px"],[1,"col-sm-12","col-md-8"],["name","documentEdition",3,"ngModel","ngModelChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["color","primary",1,"fa","fa-inbox",2,"font-size","25px","width","50px"],["color","primary",1,"fa","fa-magic",2,"position","absolute","margin-left","30px","margin-top","-10px"],[3,"expanded"],["color","primary",1,"fa","fa-reply",2,"position","absolute","margin-left","30px","margin-top","-10px"],[1,"col-sm-6",2,"overflow","hidden"],["mat-list-icon","","color","primary"],["color","primary",3,"checked","matTooltip","change"],["style","opacity: 0.5;font-style: italic;font-size: 80%;",4,"ngIf"],["appearance","outline",3,"labelPlaceholder","routeDatas","targetSearchKey","subInfoKey","disableItems","triggerEvent",4,"ngIf"],[2,"clear","both"],[3,"opened"],["color","primary",1,"fa","fa-envelope",2,"font-size","25px","width","50px"],[3,"ngSubmit"],["emailSignatureForm","ngForm"],[1,"row",2,"margin-top","5px"],[1,"col-md-12"],["matInput","","type","text","name","title","required","",3,"ngModel","placeholder","ngModelChange"],["id","html_mode",2,"display","block","width","100%"],["name","emailSignature","id","emailSignature","rows","15","cols","60",2,"width","100%"],[1,"col-md-12","form-group",2,"margin-top","10px"],[2,"text-align","center"],["mat-raised-button","","color","primary","type","submit",3,"disabled",4,"ngIf"],["mat-raised-button","","color","primary","type","button",3,"disabled","click",4,"ngIf"],["mat-raised-button","","color","warn","type","button",3,"click",4,"ngIf"],["mat-raised-button","","color","default","type","button",3,"click",4,"ngIf"],["class","col-md-6 col-sm-6 col-xm-12",4,"ngFor","ngForOf"],["color","primary",1,"fa","fa-certificate",2,"font-size","25px","width","50px"],[2,"overflow","hidden"],["dnd-droppable","",1,"dndFile",3,"matTooltip","click","dragover","dragleave","onDropSuccess"],[2,"display","none",3,"ngSubmit"],["signatureForm","ngForm"],["matInput","","type","text","id","signature_label","name","signature_label","required","",3,"title","placeholder","ngModel","ngModelChange"],[1,"form-inline","hide"],[1,"form-group"],["type","file","name","files[]","id","uploadSignFile","accept","image/*",3,"change"],[3,"ngClass"],[1,"upload-drop-zone",2,"cursor","pointer",3,"click"],[1,"fa","fa-upload","fa-2x"],["class","col-md-2",4,"ngIf"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],[2,"display","flex","align-items","flex-start"],[2,"flex","1","overflow","hidden"],["class","col-md-4 col-sm-4 col-xm-6",4,"ngFor","ngForOf"],["mat-icon-button","","color","primary",3,"matTooltip","disabled","click",4,"ngIf"],["color","primary",1,"fa","fa-users",2,"font-size","25px","width","50px"],[3,"selectedIndex","selectedIndexChange"],["createGrpContPan",""],["color","primary"],[2,"margin-top","5px"],["id","contactsGroupFormUp",1,"form-horizontal",3,"ngSubmit"],["contactsGroupFormUp","ngForm"],[1,"col-sm-12"],["matInput","","required","","name","label","id","label","type","text","maxlength","32",3,"ngModel","title","placeholder","ngModelChange"],["matInput","","required","","name","description","id","description","type","text","maxlength","255",3,"ngModel","title","placeholder","ngModelChange"],["name","plubic","id","plubic","color","primary",3,"title","ngModel","ngModelChange"],[1,"col-sm-12",2,"text-align","center"],["id","contactsGroupList",2,"margin-top","10px"],[1,"row"],[1,"col-md-6","col-xs-6"],["matInput","",3,"placeholder","keyup"],[3,"length","hidePageSize","pageSize"],["paginatorGroupsList",""],["matSort","","matSortActive","label","matSortDirection","asc",3,"dataSource"],["tableGroupsListSort","matSort"],["matColumnDef","label"],["mat-sort-header","","style","flex:2;",3,"hide-for-mobile",4,"matHeaderCellDef"],["style","flex:2;",3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","description"],["mat-sort-header","","style","flex:2;",4,"matHeaderCellDef"],["style","flex:2;",4,"matCellDef"],["matColumnDef","nbContacts"],["mat-sort-header","","style","flex:1;",4,"matHeaderCellDef"],["style","flex:1;",4,"matCellDef"],["matColumnDef","public"],["mat-sort-header","","style","flex:1;",3,"hide-for-mobile",4,"matHeaderCellDef"],["style","flex:1;",3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","owner"],["matColumnDef","actions"],[4,"matHeaderCellDef"],["style","justify-content: flex-end;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"matTooltip","click",4,"matRowDef","matRowDefColumns"],[3,"label",4,"ngIf"],["matTabContent",""],[2,"margin-bottom","5%"],[3,"formGroup"],[2,"padding","10px"],["matInput","","formControlName","currentPasswordCtrl","required","",3,"placeholder","type"],["matSuffix","",1,"fa","fa-2x",3,"ngClass","click"],[2,"text-align","center","color","rgba(0,0,0,0.54)","font-size","75%"],[1,"col-sm-6",2,"padding-left","0px","padding-right","0px"],["matInput","","formControlName","newPasswordCtrl","required","",3,"placeholder","type"],["inputPasswd",""],["matInput","","required","","formControlName","retypePasswordCtrl",3,"placeholder","type"],["inputPasswd2",""],["class","form-group",4,"ngIf"],["mat-raised-button","","color","primary","type","button",3,"disabled","click"],["mat-raised-button","","color","default","type","button",3,"click"],["color","accent",1,"fa","fa-check"],["color","accent"],[1,"col-sm-12",2,"padding-left","0px","padding-right","0px"],["role","alert",1,"alert","alert-warning",2,"text-align","center",3,"innerHTML"],[1,"form-horizontal",3,"ngSubmit"],["profileForm","ngForm"],[1,"pull-left"],[1,"avatar",2,"font-size","90px","text-align","center"],[1,"fa","fa-user",2,"font-size","90px","padding-top","5px"],[1,"input-group"],["matInput","","type","text","disabled","",3,"title","value","placeholder"],[1,"col-sm-5",2,"font-weight","bold"],["matInput","","type","text","id","lastname","name","lastname","required","",3,"title","placeholder","ngModel","ngModelChange"],["matInput","","type","text","id","firstname","name","firstname","required","",3,"title","placeholder","ngModel","ngModelChange"],[1,"col-sm-2",2,"font-style","italic"],["matInput","","type","text","id","initials","name","initials",3,"title","placeholder","ngModel","ngModelChange"],["matInput","","type","tel","id","phone","name","phone","pattern","\\+?((|\\ |\\.|\\(|\\)|\\-)?(\\d)*)*\\d$",3,"title","placeholder","ngModel","ngModelChange"],["matInput","","type","email","id","mail","name","mail","pattern","(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$)","required","",3,"title","placeholder","ngModel","ngModelChange"],[1,"form-group",2,"margin-top","10px"],[3,"value"],["mat-list-icon","",1,"fa","fa-inbox",3,"ngStyle"],["mat-line","",3,"title"],["name","color","type","color",2,"background","none","border","none","height","20px","width","20px","padding","0","margin-right","15px",3,"ngModel","ngModelChange","change"],[2,"cursor","pointer","color","#666666",3,"title","click"],[1,"fa","fa-magic"],[2,"opacity","0.5","font-style","italic","font-size","80%"],["appearance","outline",3,"labelPlaceholder","routeDatas","targetSearchKey","subInfoKey","disableItems","triggerEvent"],["style","cursor: pointer;",3,"mouseover","mouseout",4,"ngIf"],[2,"cursor","pointer",3,"mouseover","mouseout"],["mat-list-icon","","color","primary",4,"ngIf"],["mat-line","","color","primary",2,"display","flex","align-items","center"],[2,"flex","2","overflow","hidden","text-overflow","ellipsis",3,"matTooltip","click"],[1,"label","label-primary",2,"font-weight","normal"],["color","primary",3,"checked","click","change"],["mat-list-icon","","color","primary",1,"fa","fa-paper-plane",2,"margin-top","-60px"],["mat-line","","color","primary"],["type","text","color","warn","matInput","","disabled","",3,"value"],["mat-button","","color","warn","matSuffix","","mat-icon-button","","aria-label","Clear",3,"matTooltip","click"],["color","warn",1,"fa","fa-times","text-danger"],["mat-list-icon","","color","primary",1,"fa","fa-reply",2,"margin-top","-60px"],["mat-line","","color","primary",3,"click"],["color","primary",1,"fa","fa-edit"],["mat-raised-button","","color","warn","type","button",3,"click"],[1,"col-md-6","col-sm-6","col-xm-12"],[2,"margin-bottom","10px"],["floatLabel","never"],["matInput","","type","text","name","selectedEmailSignatureLabel","disabled","",3,"ngModel","placeholder","ngModelChange"],["mat-icon-button","","color","primary",3,"matTooltip","click"],[1,"fa","fa-edit","fa-2x"],[1,"col-md-2"],["id","signaturePreview","alt","Image non valide",2,"width","100%",3,"src"],[1,"col-md-4","col-sm-4","col-xm-6"],["matInput","","type","text","name","selectedSignatureLabel",3,"ngModel","placeholder","ngModelChange","change"],["mat-button","","matSuffix","","mat-icon-button","","color","warn",3,"matTooltip","click"],[1,"fa","fa-times"],["alt","Signature",2,"max-width","100%","height","60px",3,"src"],["mat-icon-button","","color","primary",3,"matTooltip","disabled","click"],[1,"fa","fa-sync-alt","fa-2x"],["mat-sort-header","",2,"flex","2"],[2,"flex","2"],["mat-sort-header","",2,"flex","1"],[2,"flex","1"],["color","primary","style","font-weight:bold;",4,"ngIf"],["color","primary",2,"font-weight","bold"],[2,"justify-content","flex-end"],["mat-icon-button","","color","warn",3,"matTooltip","click"],["aria-hidden","true",1,"fa","fa-trash-alt","fa-2x"],[2,"cursor","pointer",3,"matTooltip","click"],["linkContPan",""],["id","contactsGroupFormAdd"],[1,"row",2,"margin","0px"],[1,"col-md-8",2,"padding","5px"],["hintLabel","3 caract\xe8res minimum"],["matPrefix",""],["color","primary",1,"fa","fa-user-plus"],["type","text","matInput","","autocomplete","off","minlength","3",1,"autocompleteSearch",3,"placeholder","formControl","keyup"],["class","alert alert-danger",3,"innerHTML",4,"ngIf"],["paginatorGroupsListAutocomplete",""],["mode","indeterminate",4,"ngIf"],[3,"dataSource",4,"ngIf"],[2,"text-align","center","margin-top","30px"],["id","contactsGroup",2,"margin-top","20px"],[1,"col-sm-6"],["name","public","id","public","color","primary",3,"title","ngModel","ngModelChange"],["class","col-sm-6",4,"ngIf"],[1,"alert","alert-danger",3,"innerHTML"],["mode","indeterminate"],[3,"dataSource"],["tableContactList",""],["matColumnDef","select"],["style","flex:1;",4,"matHeaderCellDef"],["matColumnDef","contact"],["style","flex:3;",4,"matHeaderCellDef"],["style","flex:3;",4,"matCellDef"],["matColumnDef","address"],["style","cursor: pointer;",3,"ngStyle","click",4,"matRowDef","matRowDefColumns"],["color","primary",3,"checked","change"],["color","primary",3,"id","disabled","checked","click","change"],[2,"flex","3"],[2,"cursor","pointer",3,"ngStyle","click"],["paginatorContactsList",""],["matSort","","matSortActive","contact","matSortDirection","asc",3,"dataSource",4,"ngIf"],["matSort","","matSortActive","contact","matSortDirection","asc",3,"dataSource"],["tableContactsListSort","matSort"],["mat-sort-header","","style","flex:3;",4,"matHeaderCellDef"],["style","justify-content: flex-end;flex:1;",4,"matCellDef"],[4,"matRowDef","matRowDefColumns"],["mat-sort-header","",2,"flex","3"],[2,"justify-content","flex-end","flex","1"],["paginatorHistory",""],["matSort","","matSortActive","event_date","matSortDirection","desc",3,"dataSource"],["tableHistorySort","matSort"],["matColumnDef","event_date"],["mat-sort-header","",4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","record_id"],["matColumnDef","info"],["mat-sort-header",""],["color","primary","mat-list-icon","",1,"fa","fa-users"],[2,"font-size","10px"],["matInput","","type","text","id","role","name","role","disabled","",3,"title","placeholder","ngModel","ngModelChange"],[3,"matTooltip"],["color","primary","mat-list-icon","","class","fa fa-sitemap",4,"ngIf"],["color","primary","mat-list-icon","","class","fa fa-sitemap","style","position:relative;",4,"ngIf"],["mat-line","",3,"ngStyle","matTooltip"],["class","label label-primary","style","font-weight:normal",4,"ngIf"],["color","primary","mat-list-icon","",1,"fa","fa-sitemap"],["color","primary","mat-list-icon","",1,"fa","fa-sitemap",2,"position","relative"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,mi,10,7,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,gi,2,0,"div",9),n.Oc(14,Yn,216,140,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Wb(15,"mat-sidenav",11,12),n.Wb(17,"mat-list"),n.Wb(18,"h3",13),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Oc(21,Jn,12,12,"mat-list-item",14),n.Rb(22,"mat-divider"),n.Wb(23,"h3",13),n.Qc(24),n.ic(25,"translate"),n.Vb(),n.Oc(26,na,11,15,"mat-list-item",14),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",!e.appService.getViewMode()),n.Db(4),n.Rc(n.jc(20,15,"lang.groups")),n.Db(2),n.oc("ngForOf",e.user.groups),n.Db(3),n.Rc(n.jc(25,17,"lang.entities")),n.Db(2),n.oc("ngForOf",e.user.entities))},directives:[I.e,I.f,Ot,We,P.t,I.d,R.a,R.g,P.s,T.a,R.h,R.d,S.a,R.c,W.l,V.c,K.a,Te.c,Te.a,gt.a,gt.c,gt.g,gt.h,Y.c,ee.a,X.u,X.x,Y.f,j.a,A.b,X.K,X.v,X.w,J.b,X.d,X.F,Ee.d,P.q,k.b,X.p,te.a,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,Te.b,X.m,X.k,Y.j,Y.b,X.B,gt.f,W.p,P.w,ii,K.d,vt.h,Fe.b,vt.a,vt.j,vt.m,Y.i,X.q,X.j,ni.a],pipes:[g.d,P.b,si,P.f],styles:[".upload-drop-zone[_ngcontent-%COMP%]{font-size:16px;height:100px;border-width:2px;margin-bottom:20px;color:#ccc;border-style:dashed;border-color:#ccc;line-height:100px;text-align:center}.upload-drop-zone.drop[_ngcontent-%COMP%]{color:#222;border-color:#222}.avatar[_ngcontent-%COMP%]{text-decoration:none;background:#135f7f;color:#fff;width:100px;height:100px;border-radius:5px;display:block;overflow:hidden;margin:5px}"]}),t})();function sa(t,e){1&t&&(n.Wb(0,"div",10),n.Rb(1,"mat-spinner",11),n.Vb())}function oa(t,e){if(1&t&&(n.Wb(0,"mat-card",12),n.Wb(1,"div",13),n.Wb(2,"h3"),n.Qc(3),n.Vb(),n.Wb(4,"em"),n.Qc(5,"Version : "),n.Wb(6,"a",14),n.Qc(7),n.Vb(),n.Vb(),n.Rb(8,"hr"),n.Wb(9,"p"),n.Wb(10,"em"),n.Qc(11),n.ic(12,"translate"),n.Vb(),n.Vb(),n.Wb(13,"p"),n.Qc(14),n.ic(15,"translate"),n.Wb(16,"a",15),n.Qc(17,"licence GNU GPLv3"),n.Vb(),n.Qc(18,"."),n.Vb(),n.Wb(19,"div"),n.Wb(20,"ul"),n.Wb(21,"li"),n.Qc(22),n.ic(23,"translate"),n.Wb(24,"a",16),n.Qc(25,"https://maarch.com"),n.Vb(),n.Vb(),n.Wb(26,"li"),n.Qc(27),n.ic(28,"translate"),n.Wb(29,"a",17),n.Qc(30,"https://community.maarch.org"),n.Vb(),n.Vb(),n.Wb(31,"li"),n.Qc(32),n.ic(33,"translate"),n.Wb(34,"a",18),n.Qc(35,"https://docs.maarch.org"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(36,"p"),n.Qc(37,"\xa0"),n.Vb(),n.Wb(38,"h3"),n.Qc(39),n.ic(40,"translate"),n.Vb(),n.Rb(41,"hr"),n.Wb(42,"em"),n.Qc(43),n.ic(44,"translate"),n.Vb(),n.Wb(45,"p"),n.Qc(46,"\xa0"),n.Vb(),n.Wb(47,"ul"),n.Wb(48,"li"),n.Wb(49,"a",19),n.Qc(50,"Angular"),n.Vb(),n.Vb(),n.Wb(51,"li"),n.Wb(52,"a",20),n.Qc(53,"Angular Material"),n.Vb(),n.Vb(),n.Wb(54,"li"),n.Wb(55,"a",21),n.Qc(56,"Bootstrap"),n.Vb(),n.Vb(),n.Wb(57,"li"),n.Wb(58,"a",22),n.Qc(59,"Font Awesome"),n.Vb(),n.Vb(),n.Wb(60,"li"),n.Wb(61,"a",23),n.Qc(62,"Fpdf"),n.Vb(),n.Vb(),n.Wb(63,"li"),n.Wb(64,"a",24),n.Qc(65,"fpdi"),n.Vb(),n.Vb(),n.Wb(66,"li"),n.Wb(67,"a",25),n.Qc(68,"Jquery"),n.Vb(),n.Vb(),n.Wb(69,"li"),n.Wb(70,"a",26),n.Qc(71,"Jquery Typeahead"),n.Vb(),n.Vb(),n.Wb(72,"li"),n.Wb(73,"a",27),n.Qc(74,"log4php"),n.Vb(),n.Vb(),n.Wb(75,"li"),n.Wb(76,"a",28),n.Qc(77,"Pdfb"),n.Vb(),n.Vb(),n.Wb(78,"li"),n.Wb(79,"a",29),n.Qc(80,"Pdftotext"),n.Vb(),n.Vb(),n.Wb(81,"li"),n.Wb(82,"a",30),n.Qc(83,"Tiny But Strong"),n.Vb(),n.Vb(),n.Wb(84,"li"),n.Wb(85,"a",31),n.Qc(86,"TinyMCE"),n.Vb(),n.Vb(),n.Wb(87,"li"),n.Wb(88,"a",32),n.Qc(89,"Zend Lucene Search"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(90,"div",33),n.Wb(91,"h3"),n.Qc(92,"Cr\xe9dits"),n.Vb(),n.Rb(93,"hr"),n.Wb(94,"ul"),n.Wb(95,"li"),n.Qc(96,"Florian AZIZIAN, Damien BUREL, Bruno CARLIN, Carole COTIN, Prosper DE LAURE, Driss DEMIRAY, Ga\xebl DE VILLEBLANCHE, Emmanuel DILLARD, Mathieu DONZEL, Jean-Louis ERCOLANI, Claire FIGUERAS, Laurent GIOVANNONI, Guillaume HEURTIER, Henri QUENEAU, Kader KANE, Yves-Christian KPAKPO, Alexandre MORIN, S\xe9bastien NANABONDJA, Fod\xe9 NDIAYE, C\xe9dric NDOUMBA, Alex ORLUC, Alexis RAGOT, Alexandre STEFANOVIC, Serge THIERRY-MIEG, Cyril VAZQUEZ, Arnaud VEBER, Loic VINET"),n.Vb(),n.Rb(97,"br"),n.Wb(98,"li"),n.Wb(99,"em"),n.Qc(100),n.ic(101,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(102,"p"),n.Qc(103,"\xa0"),n.Vb(),n.Wb(104,"div",34),n.Rb(105,"mat-icon",35),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(3),n.Sc("Maarch Courrier ",t.applicationVersion," "),n.Db(3),n.qc("href","https://labs.maarch.org/maarch/MaarchCourrier/commit/",t.commitHash,"",n.Gc),n.Db(1),n.Rc(t.commitHash),n.Db(4),n.Sc("Copyright \xa9 2008-2020 Maarch SAS ",n.jc(12,11,"lang.groupeCompany"),""),n.Db(3),n.Sc("",n.jc(15,13,"lang.maarchLicence")," "),n.Db(8),n.Sc("",n.jc(23,15,"lang.officialWebsite")," : "),n.Db(5),n.Sc("",n.jc(28,17,"lang.community")," : "),n.Db(5),n.Sc("",n.jc(33,19,"lang.documentation")," : "),n.Db(7),n.Rc(n.jc(40,21,"lang.externalComponents")),n.Db(4),n.Rc(n.jc(44,23,"lang.thanksToExtDev")),n.Db(57),n.Rc(n.jc(101,25,"lang.thanksToCommunity"))}}let ra=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.loading=!1,this.commitHash=this.translate.instant("lang.undefined")}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.headerService.setHeader(this.translate.instant("lang.aboutUs")),this.applicationVersion=a.a.VERSION,this.loading=!1,yield this.loadCommitInformation()}))}loadCommitInformation(){return new Promise(t=>{this.http.get("../rest/commitInformation").pipe(Object(mt.a)(e=>{this.commitHash=null!==e.hash?e.hash:this.translate.instant("lang.undefined"),t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:13,vars:8,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"col-sm-8"],["target","blank",3,"href"],["target","blank","href","http://www.gnu.org/licenses/gpl-3.0-standalone.html"],["target","blank","href","https://maarch.com/"],["target","blank","href","https://community.maarch.org/"],["target","blank","href","https://docs.maarch.org/"],["target","blank","href","https://angular.io/"],["target","blank","href","https://material.angular.io/"],["target","blank","href","http://getbootstrap.com/"],["target","blank","href","http://fortawesome.github.io/Font-Awesome/"],["target","blank","href","http://www.fpdf.org/"],["target","blank","href","http://www.setasign.de/products/pdf-php-solutions/fpdi/"],["target","blank","href","https://jquery.com/"],["target","blank","href","https://github.com/running-coder/jquery-typeahead"],["target","blank","href","http://logging.apache.org/log4php/"],["target","blank","href","http://chir.ag/tech/download/pdfb"],["target","blank","href","http://www.foolabs.com/xpdf/"],["target","blank","href","http://www.tinybutstrong.com/"],["target","blank","href","http://www.tinymce.com/"],["target","blank","href","http://framework.zend.com/"],[1,"col-sm-4"],[1,"img_credits_maarch_box"],["svgIcon","maarchBox",2,"width","100%","height","auto"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,sa,2,0,"div",8),n.Oc(12,oa,106,27,"mat-card",9),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,V.c,K.a,S.a],pipes:[g.d],styles:[".img_credits_maarch_box[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%}"]}),t})();var ca=i("jhN1"),la=i("jtHE"),da=i("XNiG");const ha=["stepHolder"],ua=["stepContainer"];function pa(t,e){if(1&t&&n.Rb(0,"joyride-arrow",17),2&t){const t=n.hc();n.Lc("top",t.arrowTopPosition,"px")("left",t.arrowLeftPosition,"px"),n.oc("position",t.arrowPosition)}}function ba(t,e){1&t&&n.Sb(0)}function fa(t,e){if(1&t&&(n.Qc(0),n.ic(1,"async")),2&t){const t=n.hc();n.Sc(" ",n.jc(1,1,t.text)," ")}}function ma(t,e){1&t&&n.Sb(0)}function ga(t,e){if(1&t&&(n.Wb(0,"div",20),n.Qc(1),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Rc(t.counter)}}function va(t,e){if(1&t&&(n.Wb(0,"div",18),n.Oc(1,ma,1,0,"ng-container",9),n.Oc(2,ga,2,1,"ng-template",null,19,n.Pc),n.Vb()),2&t){const t=n.zc(3),e=n.hc();n.Db(1),n.oc("ngTemplateOutlet",e.customCounter?e.customCounter:t)("ngTemplateOutletContext",e.counterData)}}function _a(t,e){1&t&&n.Sb(0)}function ya(t,e){if(1&t&&(n.Wb(0,"joyride-button",24),n.Qc(1),n.ic(2,"async"),n.Vb()),2&t){const t=n.hc(2);n.oc("color",t.themeColor),n.Db(1),n.Rc(n.jc(2,2,t.prevText))}}function xa(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",21),n.dc("click",(function(){return n.Dc(t),n.hc().prev()})),n.Oc(1,_a,1,0,"ng-container",22),n.Oc(2,ya,3,4,"ng-template",null,23,n.Pc),n.Vb()}if(2&t){const t=n.zc(3),e=n.hc();n.Db(1),n.oc("ngTemplateOutlet",e.customPrevButton?e.customPrevButton:t)}}function Ca(t,e){1&t&&n.Sb(0)}function Oa(t,e){if(1&t&&(n.Wb(0,"joyride-button",27),n.Qc(1),n.ic(2,"async"),n.Vb()),2&t){const t=n.hc(2);n.oc("color",t.themeColor),n.Db(1),n.Rc(n.jc(2,2,t.nextText))}}function Da(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",25),n.dc("click",(function(){return n.Dc(t),n.hc().next()})),n.Oc(1,Ca,1,0,"ng-container",22),n.Oc(2,Oa,3,4,"ng-template",null,26,n.Pc),n.Vb()}if(2&t){const t=n.zc(3),e=n.hc();n.Db(1),n.oc("ngTemplateOutlet",e.customNextButton?e.customNextButton:t)}}function wa(t,e){1&t&&n.Sb(0)}function Ma(t,e){if(1&t&&(n.Wb(0,"joyride-button",30),n.Qc(1),n.ic(2,"async"),n.Vb()),2&t){const t=n.hc(2);n.oc("color",t.themeColor),n.Db(1),n.Rc(n.jc(2,2,t.doneText))}}function ka(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",28),n.dc("click",(function(){return n.Dc(t),n.hc().close()})),n.Oc(1,wa,1,0,"ng-container",22),n.Oc(2,Ma,3,4,"ng-template",null,29,n.Pc),n.Vb()}if(2&t){const t=n.zc(3),e=n.hc();n.Db(1),n.oc("ngTemplateOutlet",e.customDoneButton?e.customDoneButton:t)}}const Sa=function(t,e,i){return{"background-color":t,color:e,"border-color":i}},Ia=["*"];class Pa{constructor(){this.title=new la.a,this.text=new la.a}}const Va={prev:Object(c.a)("prev"),next:Object(c.a)("next"),done:Object(c.a)("done"),close:Object(c.a)(null)};let Ra=(()=>{let t=class{constructor(){this.themeColor="#3b5560",this.stepDefaultPosition="bottom",this.logsEnabled=!1,this.showCounter=!0,this.showPrevButton=!0,this.stepsOrder=[]}setOptions(t){this.stepsOrder=t.steps,this.stepDefaultPosition=t.stepDefaultPosition?t.stepDefaultPosition:this.stepDefaultPosition,this.logsEnabled=void 0!==t.logsEnabled?t.logsEnabled:this.logsEnabled,this.showCounter=void 0!==t.showCounter?t.showCounter:this.showCounter,this.showPrevButton=void 0!==t.showPrevButton?t.showPrevButton:this.showPrevButton,this.themeColor=t.themeColor?t.themeColor:this.themeColor,this.firstStep=t.startWith,this.waitingTime=void 0!==t.waitingTime?t.waitingTime:1,this.setCustomText(void 0!==t.customTexts?t.customTexts:Va)}getBackdropColor(){return this.hexToRgb(this.themeColor)}getThemeColor(){return this.themeColor}getStepDefaultPosition(){return this.stepDefaultPosition}getStepsOrder(){return this.stepsOrder}getFirstStep(){return this.firstStep}getWaitingTime(){return this.waitingTime}areLogsEnabled(){return this.logsEnabled}isCounterVisible(){return this.showCounter}isPrevButtonVisible(){return this.showPrevButton}getCustomTexts(){return this.customTexts}setCustomText(t){let e,i,n,a;e=t.prev?t.prev:Va.prev,i=t.next?t.next:Va.next,n=t.done?t.done:Va.done,a=t.close?t.close:Va.close,this.customTexts={prev:this.toObservable(e),next:this.toObservable(i),done:this.toObservable(n),close:this.toObservable(a)}}toObservable(t){return t instanceof ai.a?t:Object(c.a)(t)}hexToRgb(t){t=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(t,e,i,n)=>e+e+i+i+n+n);const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?`${parseInt(e[1],16)}, ${parseInt(e[2],16)}, ${parseInt(e[3],16)}`:null}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=n.Mb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})();const ja="ngx-joyride:::";let Aa=(()=>{let t=class{constructor(t){this.optionService=t}debug(t,e=""){this.optionService.areLogsEnabled()&&console.debug(ja+t,e)}info(t,e=""){this.optionService.areLogsEnabled()&&console.info(ja+t,e)}warn(t,e=""){this.optionService.areLogsEnabled()&&console.warn(ja+t,e)}error(t,e=""){this.optionService.areLogsEnabled()&&console.error(ja+t,e)}};return t.\u0275fac=function(e){return new(e||t)(n.ac(Ra))},t.\u0275prov=n.Mb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})();class Wa extends Error{constructor(t){super(t),Object.setPrototypeOf(this,Wa.prototype)}}class Ta extends Error{constructor(t){super(t),Object.setPrototypeOf(this,Ta.prototype)}}class Ea extends Error{constructor(t){super(t),Object.setPrototypeOf(this,Ea.prototype)}}var Fa=function(t){return t.NEXT="NEXT",t.PREV="PREV",t}({});let La=(()=>{let t=class{constructor(t,e){this.stepOptions=t,this.logger=e,this.tempSteps=[],this.currentStepIndex=-2,this.stepHasBeenModified=new da.a}getFirstStepIndex(){const t=this.stepOptions.getFirstStep();let e=this.stepOptions.getStepsOrder().indexOf(t);return e<0&&(e=0,void 0!==t&&this.logger.warn(`The step ${t} does not exist. Check in your step list if it's present.`)),e}init(){this.logger.info("Initializing the steps array."),this.steps=[],this.currentStepIndex=this.getFirstStepIndex()-1,this.stepOptions.getStepsOrder().forEach(t=>this.steps.push({id:t,step:null}))}addStep(t){if(this.tempSteps.filter(e=>e.name===t.name).length>0){let e=this.tempSteps.findIndex(e=>e.name===t.name);this.tempSteps[e]=t}else this.logger.info(`Adding step ${t.name} to the steps list.`),this.tempSteps.push(t)}get(t){if(t===Fa.NEXT?this.currentStepIndex++:this.currentStepIndex--,this.currentStepIndex<0||this.currentStepIndex>=this.steps.length)throw new Ea("The first or last step of the tour cannot be found!");const e=this.getStepName(this.steps[this.currentStepIndex].id),i=this.tempSteps.findIndex(t=>t.name===e);let n=this.tempSteps[i];return this.steps[this.currentStepIndex].step=n,null==n&&this.logger.warn(`Step ${this.steps[this.currentStepIndex].id} not found in the DOM. Check if it's hidden by *ngIf directive.`),n}getStepRoute(t){let e;return e=t===Fa.NEXT?this.steps[this.currentStepIndex+1]?this.steps[this.currentStepIndex+1].id:null:this.steps[this.currentStepIndex-1]?this.steps[this.currentStepIndex-1].id:null,e&&e.includes("@")?e.split("@")[1]:""}updatePosition(t,e){let i=this.getStepIndex(t);this.steps[i].step?(this.steps[i].step.position=e,this.stepHasBeenModified.next(this.steps[i].step)):this.logger.warn(`Trying to modify the position of ${t} to ${e}. Step not found!Is this step located in a different route?`)}getStepNumber(t){return this.getStepIndex(t)+1}getStepsCount(){return this.stepOptions.getStepsOrder().length}getStepIndex(t){const e=this.steps.map(t=>t.id.includes("@")?t.id.split("@")[0]:t.id).findIndex(e=>t===e);if(-1===e)throw new Wa(`The step with name: ${t} does not exist in the step list.`);return e}getStepName(t){return t&&t.includes("@")?t.split("@")[0]:t}};return t.\u0275fac=function(e){return new(e||t)(n.ac(Ra),n.ac(Aa))},t.\u0275prov=n.Mb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})(),Qa=(()=>{let t=class{constructor(t){this.platformId=t,this.fakeDocument={body:{},documentElement:{}},this.fakeWindow={document:this.fakeDocument,navigator:{}}}getNativeWindow(){return Object(P.I)(this.platformId)?window:this.fakeWindow}getNativeDocument(){return Object(P.I)(this.platformId)?document:this.fakeDocument}};return t.\u0275fac=function(e){return new(e||t)(n.ac(n.F))},t.\u0275prov=n.Mb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})(),Na=(()=>{let t=class{setPrevButton(t){this._prevButton=t}getPrevButton(){return this._prevButton}setNextButton(t){this._nextButton=t}getNextButton(){return this._nextButton}setDoneButton(t){this._doneButton=t}getDoneButton(){return this._doneButton}setCounter(t){this._counter=t}getCounter(){return this._counter}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=n.Mb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})(),za=(()=>{let t=class{constructor(t,e,i,a,s,o){this.joyrideStepsContainer=t,this.viewContainerRef=e,this.domService=i,this.router=a,this.templateService=s,this.platformId=o,this.stepPosition="NO_POSITION",this.prev=new n.o,this.next=new n.o,this.done=new n.o,this.subscriptions=[],this.windowRef=this.domService.getNativeWindow(),this.step=new Pa}ngAfterViewInit(){if(Object(P.I)(this.platformId)){if(this.prevTemplate&&this.templateService.setPrevButton(this.prevTemplate),this.nextTemplate&&this.templateService.setNextButton(this.nextTemplate),this.doneTemplate&&this.templateService.setDoneButton(this.doneTemplate),this.counterTemplate&&this.templateService.setCounter(this.counterTemplate),this.step.position=this.stepPosition,this.step.targetViewContainer=this.viewContainerRef,this.setAsyncFields(this.step),this.step.stepContent=this.stepContent,this.step.stepContentParams=this.stepContentParams,this.step.nextClicked=this.next,this.step.prevCliked=this.prev,this.step.tourDone=this.done,!this.name)throw new Wa("All the steps should have the 'joyrideStep' property set with a custom name.");this.step.name=this.name,this.step.route="/"===this.router.url.substr(0,1)?this.router.url.substr(1):this.router.url,this.step.transformCssStyle=this.windowRef.getComputedStyle(this.viewContainerRef.element.nativeElement).transform,this.step.isElementOrAncestorFixed=this.isElementFixed(this.viewContainerRef.element)||this.isAncestorsFixed(this.viewContainerRef.element.nativeElement.parentElement),this.joyrideStepsContainer.addStep(this.step)}}ngOnChanges(t){(t.title||t.text)&&this.setAsyncFields(this.step)}isElementFixed(t){return"fixed"===this.windowRef.getComputedStyle(t.nativeElement).position}setAsyncFields(t){this.title instanceof ai.a?this.subscriptions.push(this.title.subscribe(e=>{t.title.next(e)})):t.title.next(this.title),this.text instanceof ai.a?this.subscriptions.push(this.text.subscribe(e=>{t.text.next(e)})):t.text.next(this.text)}isAncestorsFixed(t){if(!t||!t.parentElement)return!1;let e="fixed"===this.windowRef.getComputedStyle(t.parentElement).position;return"BODY"===t.nodeName?e:!!e||this.isAncestorsFixed(t.parentElement)}ngOnDestroy(){this.subscriptions.forEach(t=>{t.unsubscribe()})}};return t.\u0275fac=function(e){return new(e||t)(n.Qb(La),n.Qb(n.T),n.Qb(Qa),n.Qb(o.c),n.Qb(Na),n.Qb(n.F))},t.\u0275dir=n.Lb({type:t,selectors:[["joyrideStep"],["","joyrideStep",""]],inputs:{stepPosition:"stepPosition",name:["joyrideStep","name"],nextStep:"nextStep",title:"title",text:"text",stepContent:"stepContent",stepContentParams:"stepContentParams",prevTemplate:"prevTemplate",nextTemplate:"nextTemplate",doneTemplate:"doneTemplate",counterTemplate:"counterTemplate"},outputs:{prev:"prev",next:"next",done:"done"},features:[n.Bb]}),t})(),Ba=(()=>{let t=class{constructor(t){this.DOMService=t,this.setDocumentHeight(),document.elementsFromPoint||(document.elementsFromPoint=this.elementsFromPoint.bind(this))}getElementFixedTop(t){return t.nativeElement.getBoundingClientRect().top}getElementFixedLeft(t){return t.nativeElement.getBoundingClientRect().left}getElementAbsoluteTop(t){const e=this.getScrollOffsets();return t.nativeElement.getBoundingClientRect().top+e.y}getElementAbsoluteLeft(t){const e=this.getScrollOffsets();return t.nativeElement.getBoundingClientRect().left+e.x}setDocumentHeight(){this.documentHeight=this.calculateDocumentHeight()}getDocumentHeight(){return this.documentHeight}isParentScrollable(t){return this.getFirstScrollableParent(t.nativeElement)!==this.DOMService.getNativeDocument().body}isElementBeyondOthers(t,e,i){const n=e?this.getElementFixedLeft(t):this.getElementAbsoluteLeft(t),a=e?this.getElementFixedTop(t):this.getElementAbsoluteTop(t),s=n+t.nativeElement.getBoundingClientRect().width-1,o=a+t.nativeElement.getBoundingClientRect().height-1,r=this.DOMService.getNativeDocument().elementsFromPoint(n,a),c=this.DOMService.getNativeDocument().elementsFromPoint(s,o);return 0===r.length&&0===c.length?1:this.getFirstElementWithoutKeyword(r,i)!==t.nativeElement||this.getFirstElementWithoutKeyword(c,i)!==t.nativeElement?2:3}scrollIntoView(t,e){const i=this.getFirstScrollableParent(t.nativeElement),n=e?this.getElementFixedTop(t):this.getElementAbsoluteTop(t);i!==this.DOMService.getNativeDocument().body?i.scrollTo?i.scrollTo(0,n-150):i.scrollTop=n-150:this.DOMService.getNativeWindow().scrollTo(0,n-150)}scrollToTheTop(t){const e=this.getFirstScrollableParent(t.nativeElement);e!==this.DOMService.getNativeDocument().body?e.scrollTo?e.scrollTo(0,0):e.scrollTop=0:this.DOMService.getNativeWindow().scrollTo(0,0)}scrollToTheBottom(t){const e=this.getFirstScrollableParent(t.nativeElement);e!==this.DOMService.getNativeDocument().body?e.scrollTo?e.scrollTo(0,this.DOMService.getNativeDocument().body.scrollHeight):e.scrollTop=e.scrollHeight-e.clientHeight:this.DOMService.getNativeWindow().scrollTo(0,this.DOMService.getNativeDocument().body.scrollHeight)}getFirstScrollableParent(t){const e=/(auto|scroll|overlay)/,i=(t,e)=>this.DOMService.getNativeWindow().getComputedStyle(t,null).getPropertyValue(e),n=t=>t&&t!==this.DOMService.getNativeDocument().body?(t=>e.test(i(t,"overflow")+i(t,"overflow-y")+i(t,"overflow-x")))(t)?t:n(t.parentNode):this.DOMService.getNativeDocument().body;return n(t)}calculateDocumentHeight(){const t=this.DOMService.getNativeDocument();return Math.max(t.body.scrollHeight,t.documentElement.scrollHeight,t.body.offsetHeight,t.documentElement.offsetHeight,t.body.clientHeight,t.documentElement.clientHeight)}getScrollOffsets(){const t=this.DOMService.getNativeWindow(),e=this.DOMService.getNativeDocument();return null!=t.pageXOffset?{x:t.pageXOffset,y:t.pageYOffset}:"CSS1Compat"==e.compatMode?{x:e.documentElement.scrollLeft,y:e.documentElement.scrollTop}:{x:e.body.scrollLeft,y:e.body.scrollTop}}elementsFromPoint(t,e){var i=[],n=void 0;do{const a=this.DOMService.getNativeDocument().elementFromPoint(t,e);a&&n!==a?(i.push(n=a),n.style.pointerEvents="none"):n=!1}while(n);return i.forEach((function(t){return t.style.pointerEvents="all"})),i}getFirstElementWithoutKeyword(t,e){for(;t[0]&&t[0].classList.toString().includes(e);)t.shift();return t[0]}};return t.\u0275fac=function(e){return new(e||t)(n.ac(Qa))},t.\u0275prov=n.Mb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})(),Ua=(()=>{let t=class{constructor(t,e,i){this.documentService=t,this.optionsService=e,this.rendererFactory=i,this.lastXScroll=0,this.lastYScroll=0,this.setRenderer()}setRenderer(){this.renderer=this.rendererFactory.createRenderer(null,null)}draw(t){this.elementRef=t.targetViewContainer,this.targetAbsoluteTop=this.getTargetTotalTop(t),this.targetAbsoluteLeft=this.getTargetTotalLeft(t),this.currentBackdropContainer=this.renderer.createElement("div"),this.renderer.addClass(this.currentBackdropContainer,"backdrop-container"),this.renderer.setStyle(this.currentBackdropContainer,"position","fixed"),this.renderer.setStyle(this.currentBackdropContainer,"top","0px"),this.renderer.setStyle(this.currentBackdropContainer,"left","0px"),this.renderer.setStyle(this.currentBackdropContainer,"width","100%"),this.renderer.setStyle(this.currentBackdropContainer,"height","100%"),this.renderer.setStyle(this.currentBackdropContainer,"z-index","1000"),this.renderer.setAttribute(this.currentBackdropContainer,"id","backdrop-"+t.name),this.backdropContent=this.renderer.createElement("div"),this.renderer.addClass(this.backdropContent,"backdrop-content"),this.renderer.setStyle(this.backdropContent,"position","relative"),this.renderer.setStyle(this.backdropContent,"height","100%"),this.renderer.setStyle(this.backdropContent,"display","flex"),this.renderer.setStyle(this.backdropContent,"flex-direction","column"),this.renderer.appendChild(this.currentBackdropContainer,this.backdropContent),this.backdropTop=this.renderer.createElement("div"),this.renderer.addClass(this.backdropTop,"joyride-backdrop"),this.renderer.addClass(this.backdropTop,"backdrop-top"),this.renderer.setStyle(this.backdropTop,"width","100%"),this.renderer.setStyle(this.backdropTop,"height",this.targetAbsoluteTop-this.lastYScroll+"px"),this.renderer.setStyle(this.backdropTop,"flex-shrink","0"),this.renderer.setStyle(this.backdropTop,"background-color",`rgba(${this.optionsService.getBackdropColor()}, 0.7)`),this.renderer.appendChild(this.backdropContent,this.backdropTop),this.backdropMiddleContainer=this.renderer.createElement("div"),this.renderer.addClass(this.backdropMiddleContainer,"backdrop-middle-container"),this.renderer.setStyle(this.backdropMiddleContainer,"height",this.elementRef.element.nativeElement.offsetHeight+"px"),this.renderer.setStyle(this.backdropMiddleContainer,"width","100%"),this.renderer.setStyle(this.backdropMiddleContainer,"flex-shrink","0"),this.renderer.appendChild(this.backdropContent,this.backdropMiddleContainer),this.backdropMiddleContent=this.renderer.createElement("div"),this.renderer.addClass(this.backdropMiddleContent,"backdrop-middle-content"),this.renderer.setStyle(this.backdropMiddleContent,"display","flex"),this.renderer.setStyle(this.backdropMiddleContent,"width","100%"),this.renderer.setStyle(this.backdropMiddleContent,"height","100%"),this.renderer.appendChild(this.backdropMiddleContainer,this.backdropMiddleContent),this.leftBackdrop=this.renderer.createElement("div"),this.renderer.addClass(this.leftBackdrop,"joyride-backdrop"),this.renderer.addClass(this.leftBackdrop,"backdrop-left"),this.renderer.setStyle(this.leftBackdrop,"flex-shrink","0"),this.renderer.setStyle(this.leftBackdrop,"width",this.targetAbsoluteLeft-this.lastXScroll+"px"),this.renderer.setStyle(this.leftBackdrop,"background-color",`rgba(${this.optionsService.getBackdropColor()}, 0.7)`),this.renderer.appendChild(this.backdropMiddleContent,this.leftBackdrop),this.targetBackdrop=this.renderer.createElement("div"),this.renderer.addClass(this.targetBackdrop,"backdrop-target"),this.renderer.setStyle(this.targetBackdrop,"flex-shrink","0"),this.renderer.setStyle(this.targetBackdrop,"width",this.elementRef.element.nativeElement.offsetWidth+"px"),this.renderer.appendChild(this.backdropMiddleContent,this.targetBackdrop),this.rightBackdrop=this.renderer.createElement("div"),this.renderer.addClass(this.rightBackdrop,"joyride-backdrop"),this.renderer.addClass(this.rightBackdrop,"backdrop-right"),this.renderer.setStyle(this.rightBackdrop,"width","100%"),this.renderer.setStyle(this.rightBackdrop,"background-color",`rgba(${this.optionsService.getBackdropColor()}, 0.7)`),this.renderer.appendChild(this.backdropMiddleContent,this.rightBackdrop),this.backdropBottom=this.renderer.createElement("div"),this.renderer.addClass(this.backdropBottom,"joyride-backdrop"),this.renderer.addClass(this.backdropBottom,"backdrop-bottom"),this.renderer.setStyle(this.backdropBottom,"width","100%"),this.renderer.setStyle(this.backdropBottom,"height","100%"),this.renderer.setStyle(this.backdropBottom,"background-color",`rgba(${this.optionsService.getBackdropColor()}, 0.7)`),this.renderer.appendChild(this.backdropContent,this.backdropBottom),this.removeLastBackdrop(),this.drawCurrentBackdrop(),this.lastBackdropContainer=this.currentBackdropContainer}remove(){this.removeLastBackdrop()}redrawTarget(t){this.targetAbsoluteLeft=this.getTargetTotalLeft(t),this.targetAbsoluteTop=this.getTargetTotalTop(t),this.handleVerticalScroll(t),this.handleHorizontalScroll(t)}getTargetTotalTop(t){let e=t.targetViewContainer;return t.isElementOrAncestorFixed?this.documentService.getElementFixedTop(e.element):this.documentService.getElementAbsoluteTop(e.element)}getTargetTotalLeft(t){let e=t.targetViewContainer;return t.isElementOrAncestorFixed?this.documentService.getElementFixedLeft(e.element):this.documentService.getElementAbsoluteLeft(e.element)}redraw(t,e){this.lastYScroll!==e.scrollY&&(this.lastYScroll=e.scrollY,this.elementRef&&this.handleVerticalScroll(t)),this.lastXScroll!==e.scrollX&&(this.lastXScroll=e.scrollX,this.elementRef&&this.handleHorizontalScroll(t))}handleHorizontalScroll(t){let e=t.isElementOrAncestorFixed?this.targetAbsoluteLeft:this.targetAbsoluteLeft-this.lastXScroll;e>=0?(this.renderer.setStyle(this.leftBackdrop,"width",e+"px"),this.renderer.setStyle(this.targetBackdrop,"width",this.elementRef.element.nativeElement.offsetWidth+"px")):this.handleTargetPartialWidth(e)}handleTargetPartialWidth(t){this.renderer.setStyle(this.leftBackdrop,"width","0px");let e=this.elementRef.element.nativeElement.offsetWidth+t;this.renderer.setStyle(this.targetBackdrop,"width",e>=0?e+"px":"0px")}handleVerticalScroll(t){let e=t.isElementOrAncestorFixed?this.targetAbsoluteTop:this.targetAbsoluteTop-this.lastYScroll;e>=0?(this.renderer.setStyle(this.backdropTop,"height",e+"px"),this.renderer.setStyle(this.backdropMiddleContainer,"height",this.elementRef.element.nativeElement.offsetHeight+"px")):this.handleTargetPartialHeight(e)}handleTargetPartialHeight(t){this.renderer.setStyle(this.backdropTop,"height","0px");let e=this.elementRef.element.nativeElement.offsetHeight+t;this.renderer.setStyle(this.backdropMiddleContainer,"height",e>=0?e+"px":"0px")}removeLastBackdrop(){this.lastBackdropContainer&&(this.renderer.removeChild(document.body,this.lastBackdropContainer),this.lastBackdropContainer=void 0)}drawCurrentBackdrop(){this.renderer.appendChild(document.body,this.currentBackdropContainer)}};return t.\u0275fac=function(e){return new(e||t)(n.ac(Ba),n.ac(Ra),n.ac(n.J))},t.\u0275prov=n.Mb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})(),$a=(()=>{let t=class{constructor(t,e){this.rendererFactory=t,this.DOMService=e,this.scrollEvent=new da.a,this.resizeEvent=new da.a,this.renderer=t.createRenderer(null,null)}startListeningScrollEvents(){this.scrollUnlisten=this.renderer.listen("document","scroll",t=>{this.scrollEvent.next({scrollX:this.DOMService.getNativeWindow().pageXOffset,scrollY:this.DOMService.getNativeWindow().pageYOffset})})}startListeningResizeEvents(){this.resizeUnlisten=this.renderer.listen("window","resize",t=>{this.resizeEvent.next(t)})}stopListeningScrollEvents(){this.scrollUnlisten()}stopListeningResizeEvents(){this.resizeUnlisten()}};return t.\u0275fac=function(e){return new(e||t)(n.ac(n.J),n.ac(Qa))},t.\u0275prov=n.Mb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})(),Ha=(()=>{let t=class{constructor(t,e,i,n,a,s,o,r){this.injector=t,this.stepsContainerService=e,this.eventListenerService=i,this.documentService=n,this.renderer=a,this.logger=s,this.optionsService=o,this.templateService=r,this.stepWidth=200,this.stepHeight=200,this.showArrow=!0,this.arrowSize=Ja,this.subscriptions=[]}ngOnInit(){this.joyrideStepService=this.injector.get(Za),this.documentHeight=this.documentService.getDocumentHeight(),this.subscriptions.push(this.subscribeToResizeEvents()),this.title=this.step.title.asObservable(),this.text=this.step.text.asObservable(),this.setCustomTemplates(),this.setCustomTexts(),this.counter=this.getCounter(),this.isCounterVisible=this.optionsService.isCounterVisible(),this.isPrevButtonVisible=this.optionsService.isPrevButtonVisible(),this.themeColor=this.optionsService.getThemeColor(),this.text&&this.text.subscribe(t=>this.checkRedraw(t)),this.title&&this.title.subscribe(t=>this.checkRedraw(t))}ngAfterViewInit(){if(this.isCustomized())this.renderer.setStyle(this.stepContainer.nativeElement,"max-width","90vw"),this.updateStepDimensions();else{this.renderer.setStyle(this.stepContainer.nativeElement,"max-width","400px");let t=this.getDimensionsByAspectRatio(this.stepContainer.nativeElement.clientWidth,this.stepContainer.nativeElement.clientHeight,1.212);t=this.adjustDimensions(t.width,t.height),this.stepWidth=t.width,this.stepHeight=t.height,this.renderer.setStyle(this.stepContainer.nativeElement,"width",this.stepWidth+"px"),this.renderer.setStyle(this.stepContainer.nativeElement,"height",this.stepHeight+"px")}this.drawStep()}checkRedraw(t){null!=t&&setTimeout(()=>{this.redrawStep()},2)}isCustomized(){return this.step.stepContent||this.templateService.getCounter()||this.templateService.getPrevButton()||this.templateService.getNextButton()||this.templateService.getDoneButton()}setCustomTexts(){const t=this.optionsService.getCustomTexts();this.prevText=t.prev,this.nextText=t.next,this.doneText=t.done}drawStep(){let t=this.step.isElementOrAncestorFixed?"fixed":"absolute";this.renderer.setStyle(this.stepHolder.nativeElement,"position",t),this.renderer.setStyle(this.stepHolder.nativeElement,"transform",this.step.transformCssStyle),this.targetWidth=this.step.targetViewContainer.element.nativeElement.getBoundingClientRect().width,this.targetHeight=this.step.targetViewContainer.element.nativeElement.getBoundingClientRect().height,this.targetAbsoluteLeft="fixed"===t?this.documentService.getElementFixedLeft(this.step.targetViewContainer.element):this.documentService.getElementAbsoluteLeft(this.step.targetViewContainer.element),this.targetAbsoluteTop="fixed"===t?this.documentService.getElementFixedTop(this.step.targetViewContainer.element):this.documentService.getElementAbsoluteTop(this.step.targetViewContainer.element),this.setStepStyle()}getCounter(){let t=this.stepsContainerService.getStepNumber(this.step.name),e=this.stepsContainerService.getStepsCount();return this.counterData={step:t,total:e},t+"/"+e}setCustomTemplates(){this.customContent=this.step.stepContent,this.ctx=this.step.stepContentParams,this.customPrevButton=this.templateService.getPrevButton(),this.customNextButton=this.templateService.getNextButton(),this.customDoneButton=this.templateService.getDoneButton(),this.customCounter=this.templateService.getCounter()}prev(){this.joyrideStepService.prev()}next(){this.joyrideStepService.next()}close(){this.joyrideStepService.close()}isFirstStep(){return 1===this.stepsContainerService.getStepNumber(this.step.name)}isLastStep(){return this.stepsContainerService.getStepNumber(this.step.name)===this.stepsContainerService.getStepsCount()}setStepStyle(){switch(this.step.position){case"top":this.setStyleTop();break;case"bottom":this.setStyleBottom();break;case"right":this.setStyleRight();break;case"left":this.setStyleLeft();break;case"center":this.setStyleCenter();break;default:this.setStyleBottom()}}setStyleTop(){this.stepsContainerService.updatePosition(this.step.name,"top"),this.topPosition=this.targetAbsoluteTop-Ya-this.stepHeight,this.stepAbsoluteTop=this.targetAbsoluteTop-Ya-this.stepHeight,this.arrowTopPosition=this.stepHeight,this.leftPosition=this.targetWidth/2-this.stepWidth/2+this.targetAbsoluteLeft,this.stepAbsoluteLeft=this.targetWidth/2-this.stepWidth/2+this.targetAbsoluteLeft,this.arrowLeftPosition=this.stepWidth/2-this.arrowSize,this.adjustLeftPosition(),this.adjustRightPosition(),this.arrowPosition="bottom",this.autofixTopPosition()}setStyleRight(){this.stepsContainerService.updatePosition(this.step.name,"right"),this.topPosition=this.targetAbsoluteTop+this.targetHeight/2-this.stepHeight/2,this.stepAbsoluteTop=this.targetAbsoluteTop+this.targetHeight/2-this.stepHeight/2,this.arrowTopPosition=this.stepHeight/2-this.arrowSize,this.leftPosition=this.targetAbsoluteLeft+this.targetWidth+Ya,this.stepAbsoluteLeft=this.targetAbsoluteLeft+this.targetWidth+Ya,this.arrowLeftPosition=-this.arrowSize,this.adjustTopPosition(),this.adjustBottomPosition(),this.arrowPosition="left",this.autofixRightPosition()}setStyleBottom(){this.stepsContainerService.updatePosition(this.step.name,"bottom"),this.topPosition=this.targetAbsoluteTop+this.targetHeight+Ya,this.stepAbsoluteTop=this.targetAbsoluteTop+this.targetHeight+Ya,this.arrowTopPosition=-this.arrowSize,this.arrowLeftPosition=this.stepWidth/2-this.arrowSize,this.leftPosition=this.targetWidth/2-this.stepWidth/2+this.targetAbsoluteLeft,this.stepAbsoluteLeft=this.targetWidth/2-this.stepWidth/2+this.targetAbsoluteLeft,this.adjustLeftPosition(),this.adjustRightPosition(),this.arrowPosition="top",this.autofixBottomPosition()}setStyleLeft(){this.stepsContainerService.updatePosition(this.step.name,"left"),this.topPosition=this.targetAbsoluteTop+this.targetHeight/2-this.stepHeight/2,this.stepAbsoluteTop=this.targetAbsoluteTop+this.targetHeight/2-this.stepHeight/2,this.arrowTopPosition=this.stepHeight/2-this.arrowSize,this.leftPosition=this.targetAbsoluteLeft-this.stepWidth-Ya,this.stepAbsoluteLeft=this.targetAbsoluteLeft-this.stepWidth-Ya,this.arrowLeftPosition=this.stepWidth,this.adjustTopPosition(),this.adjustBottomPosition(),this.arrowPosition="right",this.autofixLeftPosition()}setStyleCenter(){this.renderer.setStyle(this.stepHolder.nativeElement,"position","fixed"),this.renderer.setStyle(this.stepHolder.nativeElement,"top","50%"),this.renderer.setStyle(this.stepHolder.nativeElement,"left","50%"),this.updateStepDimensions(),this.renderer.setStyle(this.stepHolder.nativeElement,"transform",`translate(-${this.stepWidth/2}px, -${this.stepHeight/2}px)`),this.showArrow=!1}adjustLeftPosition(){this.leftPosition<0&&(this.arrowLeftPosition=this.arrowLeftPosition+this.leftPosition-2,this.leftPosition=2)}adjustRightPosition(){let t=document.body.clientWidth;if(this.stepAbsoluteLeft+this.stepWidth>t){let e=this.leftPosition-(this.stepAbsoluteLeft+this.stepWidth+5-t),i=e-this.leftPosition;this.leftPosition=e,this.arrowLeftPosition=this.arrowLeftPosition-i}}adjustTopPosition(){this.stepAbsoluteTop<0&&(this.arrowTopPosition=this.arrowTopPosition+this.topPosition-2,this.topPosition=2)}adjustBottomPosition(){if(this.stepAbsoluteTop+this.stepHeight>this.documentHeight){let t=this.topPosition-(this.stepAbsoluteTop+this.stepHeight+5-this.documentHeight),e=t-this.topPosition;this.topPosition=t,this.arrowTopPosition=this.arrowTopPosition-e}}autofixTopPosition(){this.positionAlreadyFixed?this.logger.warn("No step positions found for this step. The step will be centered."):this.targetAbsoluteTop-this.stepHeight-this.arrowSize<0&&(this.positionAlreadyFixed=!0,this.setStyleRight())}autofixRightPosition(){this.targetAbsoluteLeft+this.targetWidth+this.stepWidth+this.arrowSize>document.body.clientWidth&&this.setStyleBottom()}autofixBottomPosition(){this.targetAbsoluteTop+this.stepHeight+this.arrowSize+this.targetHeight>this.documentHeight&&this.setStyleLeft()}autofixLeftPosition(){this.targetAbsoluteLeft-this.stepWidth-this.arrowSize<0&&this.setStyleTop()}subscribeToResizeEvents(){return this.eventListenerService.resizeEvent.subscribe(()=>{this.redrawStep()})}redrawStep(){this.updateStepDimensions(),this.drawStep()}getDimensionsByAspectRatio(t,e,i){let n=(t+e)/(1+i);return{width:n*i,height:n}}adjustDimensions(t,e){let i=t,n=e;return t>400?(i=400,n=t*e/i):t<200&&(i=200,n=200/1.212),{width:i,height:n}}updateStepDimensions(){this.stepWidth=this.stepContainer.nativeElement.clientWidth,this.stepHeight=this.stepContainer.nativeElement.clientHeight}ngOnDestroy(){this.subscriptions.forEach(t=>{t.unsubscribe()})}};return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.t),n.Qb(La),n.Qb($a),n.Qb(Ba),n.Qb(n.I),n.Qb(Aa),n.Qb(Ra),n.Qb(Na))},t.\u0275cmp=n.Kb({type:t,selectors:[["joyride-step"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(ha,!0),n.Kc(ua,!0)),2&t&&(n.yc(i=n.ec())&&(e.stepHolder=i.first),n.yc(i=n.ec())&&(e.stepContainer=i.first))},inputs:{step:"step"},decls:21,vars:17,consts:[[1,"joyride-step__holder",3,"id"],["stepHolder",""],["class","joyride-step__arrow",3,"position","top","left",4,"ngIf"],[1,"joyride-step__container"],["stepContainer",""],[1,"joyride-step__close",3,"click"],[1,"joyride-step__header"],[1,"joyride-step__title"],[1,"joyride-step__body"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["defaultContent",""],[1,"joyride-step__footer"],["class","joyride-step__counter-container",4,"ngIf"],[1,"joyride-step__buttons-container"],["class","joyride-step__prev-container joyride-step__button",3,"click",4,"ngIf"],["class","joyride-step__next-container joyride-step__button",3,"click",4,"ngIf","ngIfElse"],["doneButton",""],[1,"joyride-step__arrow",3,"position"],[1,"joyride-step__counter-container"],["defaultCounter",""],[1,"joyride-step__counter"],[1,"joyride-step__prev-container","joyride-step__button",3,"click"],[4,"ngTemplateOutlet"],["defaultPrevButton",""],[1,"joyride-step__prev-button",3,"color"],[1,"joyride-step__next-container","joyride-step__button",3,"click"],["defaulNextButton",""],[3,"color"],[1,"joyride-step__done-container","joyride-step__button",3,"click"],["defaultDoneButton",""],[1,"joyride-step__done-button",3,"color"]],template:function(t,e){if(1&t&&(n.Wb(0,"div",0,1),n.Oc(2,pa,1,5,"joyride-arrow",2),n.Wb(3,"div",3,4),n.Wb(5,"joy-close-button",5),n.dc("click",(function(){return e.close()})),n.Vb(),n.Wb(6,"div",6),n.Wb(7,"div",7),n.Qc(8),n.ic(9,"async"),n.Vb(),n.Vb(),n.Wb(10,"div",8),n.Oc(11,ba,1,0,"ng-container",9),n.Oc(12,fa,2,3,"ng-template",null,10,n.Pc),n.Vb(),n.Wb(14,"div",11),n.Oc(15,va,4,2,"div",12),n.Wb(16,"div",13),n.Oc(17,xa,4,1,"div",14),n.Oc(18,Da,4,1,"div",15),n.Oc(19,ka,4,1,"ng-template",null,16,n.Pc),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.zc(13),i=n.zc(20);n.Lc("top",e.topPosition,"px")("left",e.leftPosition,"px"),n.oc("id","joyride-step-"+e.step.name),n.Db(2),n.oc("ngIf",e.showArrow),n.Db(5),n.Lc("color",e.themeColor),n.Db(1),n.Rc(n.jc(9,15,e.title)),n.Db(3),n.oc("ngTemplateOutlet",e.customContent?e.customContent:t)("ngTemplateOutletContext",e.ctx),n.Db(4),n.oc("ngIf",e.isCounterVisible),n.Db(2),n.oc("ngIf",e.isPrevButtonVisible&&!e.isFirstStep()),n.Db(1),n.oc("ngIf",!e.isLastStep())("ngIfElse",i)}},directives:function(){return[P.t,qa,P.A,Ga,Xa]},pipes:function(){return[P.b]},styles:[".joyride-step__holder{position:absolute;font-family:Arial,Helvetica,sans-serif;font-size:16px;z-index:1001}.joyride-step__arrow{position:absolute;left:40px;z-index:1002}.joyride-step__container{box-sizing:border-box;position:relative;color:#000;background-color:#fff;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-pack:justify;justify-content:space-between;padding:10px;box-shadow:0 0 30px 1px #000}.joyride-step__header{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;padding:8px}.joyride-step__title{font-weight:700;font-size:20px}.joyride-step__close{position:absolute;right:10px;top:10px;width:14px;height:14px;cursor:pointer}.joyride-step__body{text-align:left;padding:10px 8px}.joyride-step__footer{display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-box-pack:justify;justify-content:space-between;-webkit-box-align:center;align-items:center;padding-left:8px}.joyride-step__buttons-container{display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}.joyride-step__button:first-child{margin-right:2.5px}.joyride-step__button:last-child{margin-left:2.5px}.joyride-step__counter{font-weight:700;font-size:14px}.joyride-step__counter-container{margin-right:10px}"],encapsulation:2}),t})(),Ga=(()=>{let t=class{constructor(){this.position="top"}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=n.Kb({type:t,selectors:[["joyride-arrow"]],inputs:{position:"position"},decls:1,vars:8,template:function(t,e){1&t&&n.Rb(0,"div"),2&t&&n.Ib("joyride-arrow__top","top"==e.position)("joyride-arrow__bottom","bottom"==e.position)("joyride-arrow__left","left"==e.position)("joyride-arrow__right","right"==e.position)},styles:[".joyride-arrow__top{border-left:11px solid transparent;border-right:11px solid transparent;border-bottom:11px solid #fff}.joyride-arrow__bottom{border-left:11px solid transparent;border-right:11px solid transparent;border-top:11px solid #fff}.joyride-arrow__right{border-left:11px solid #fff;border-bottom:11px solid transparent;border-top:11px solid transparent}.joyride-arrow__left{border-right:11px solid #fff;border-top:11px solid transparent;border-bottom:11px solid transparent}"],encapsulation:2}),t})(),Xa=(()=>{let t=class{constructor(){this.clicked=new n.o}onClick(){this.clicked.emit()}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=n.Kb({type:t,selectors:[["joyride-button"]],inputs:{color:"color"},outputs:{clicked:"clicked"},ngContentSelectors:Ia,decls:2,vars:5,consts:[[1,"joyride-button",3,"ngStyle","mouseleave","mouseover","click"]],template:function(t,e){1&t&&(n.nc(),n.Wb(0,"button",0),n.dc("mouseleave",(function(){return e.hover=!1}))("mouseover",(function(){return e.hover=!0}))("click",(function(){return e.onClick()})),n.mc(1),n.Vb()),2&t&&n.oc("ngStyle",n.xc(1,Sa,e.hover?"#fff":e.color,e.hover?e.color:"#fff",e.hover?e.color:"transparent"))},directives:[P.w],styles:[".joyride-button[_ngcontent-%COMP%]{text-transform:uppercase;border:2px solid transparent;outline:0;padding:6px 12px;font-size:12px;font-weight:700;color:#fff;background-color:#3b5560;cursor:pointer}.joyride-button[_ngcontent-%COMP%]:hover{color:#3b5560;border:2px solid #3b5560;background-color:#fff}"]}),t})(),qa=(()=>{let t=class{};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=n.Kb({type:t,selectors:[["joy-close-button"]],decls:3,vars:0,consts:[["viewBox","0 0 25 25","xmlns","http://www.w3.org/2000/svg"],["x1","1","y1","24","x2","24","y2","1","stroke","black","stroke-width","3"],["x1","1","y1","1","x2","24","y2","24","stroke","black","stroke-width","3"]],template:function(t,e){1&t&&(n.gc(),n.Wb(0,"svg",0),n.Rb(1,"line",1),n.Rb(2,"line",2),n.Vb())},encapsulation:2}),t})(),Ka=(()=>{let t=class{constructor(t,e,i){this.componentFactoryResolver=t,this.appRef=e,this.injector=i,this.refMap={}}draw(t){const e=this.componentFactoryResolver.resolveComponentFactory(Ha).create(this.injector);this.appRef.attachView(e.hostView),document.body.appendChild(e.hostView.rootNodes[0]);const i=e.instance;i.step=t,e.changeDetectorRef.detectChanges(),t.stepInstance=i,this.refMap[t.name]=e}remove(t){this.appRef.detachView(this.refMap[t.name].hostView),this.refMap[t.name].destroy()}};return t.\u0275fac=function(e){return new(e||t)(n.ac(n.j),n.ac(n.g),n.ac(n.t))},t.\u0275prov=n.Mb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})();const Ya=15,Ja=10;let Za=(()=>{let t=class{constructor(t,e,i,n,a,s,o,r,c){this.backDropService=t,this.eventListener=e,this.stepsContainerService=i,this.documentService=n,this.DOMService=a,this.stepDrawerService=s,this.optionsService=o,this.router=r,this.logger=c,this.winTopPosition=0,this.winBottomPosition=0,this.stepsObserver=new la.a,this.initViewportPositions(),this.subscribeToScrollEvents(),this.subscribeToResizeEvents()}initViewportPositions(){this.winTopPosition=0,this.winBottomPosition=this.DOMService.getNativeWindow().innerHeight-20}subscribeToScrollEvents(){this.eventListener.startListeningScrollEvents(),this.eventListener.scrollEvent.subscribe(t=>{this.winTopPosition=t.scrollY,this.winBottomPosition=this.winTopPosition+this.DOMService.getNativeWindow().innerHeight-20,this.currentStep&&this.backDropService.redraw(this.currentStep,t)})}subscribeToResizeEvents(){this.eventListener.resizeEvent.subscribe(()=>{this.currentStep&&this.backDropService.redrawTarget(this.currentStep)})}drawStep(t){t.position="NO_POSITION"===t.position?this.optionsService.getStepDefaultPosition():t.position,this.stepDrawerService.draw(t)}startTour(){return this.stepsObserver=new la.a,this.stepsContainerService.init(),this.documentService.setDocumentHeight(),this.tryShowStep(Fa.NEXT),this.eventListener.startListeningResizeEvents(),this.subscribeToStepsUpdates(),this.stepsObserver.asObservable()}close(){this.removeCurrentStep(),this.notifyTourIsFinished(),this.DOMService.getNativeWindow().scrollTo(0,0),this.eventListener.stopListeningResizeEvents(),this.backDropService.remove()}prev(){this.removeCurrentStep(),this.currentStep.prevCliked.emit(),this.tryShowStep(Fa.PREV)}next(){this.removeCurrentStep(),this.currentStep.nextClicked.emit(),this.tryShowStep(Fa.NEXT)}navigateToStepPage(t){let e=this.stepsContainerService.getStepRoute(t);e&&this.router.navigate([e])}subscribeToStepsUpdates(){this.stepsContainerService.stepHasBeenModified.subscribe(t=>{this.currentStep&&this.currentStep.name===t.name&&(this.currentStep=t)})}tryShowStep(t){this.navigateToStepPage(t);const e=this.optionsService.getWaitingTime();e>100&&this.backDropService.remove(),setTimeout(()=>{try{this.showStep(t)}catch(e){if(e instanceof Ta)this.tryShowStep(t);else{if(!(e instanceof Ea))throw new Error(e);this.logger.error("Forcing the tour closure: First or Last step not found in the DOM."),this.close()}}},e)}showStep(t){if(this.currentStep=this.stepsContainerService.get(t),null==this.currentStep)throw new Ta("");this.scrollIfElementBeyondOtherElements(),this.backDropService.draw(this.currentStep),this.drawStep(this.currentStep),this.scrollIfStepAndTargetAreNotVisible(),this.notifyStepClicked(t)}notifyStepClicked(t){let e={number:this.stepsContainerService.getStepNumber(this.currentStep.name),name:this.currentStep.name,route:this.currentStep.route,actionType:t};this.stepsObserver.next(e)}notifyTourIsFinished(){this.currentStep&&this.currentStep.tourDone.emit(),this.stepsObserver.complete()}removeCurrentStep(){this.currentStep&&this.stepDrawerService.remove(this.currentStep)}scrollIfStepAndTargetAreNotVisible(){this.scrollWhenTargetOrStepAreHiddenBottom(),this.scrollWhenTargetOrStepAreHiddenTop()}scrollWhenTargetOrStepAreHiddenBottom(){let t=this.getMaxTargetAndStepBottomPosition();t>this.winBottomPosition&&this.DOMService.getNativeWindow().scrollBy(0,t-this.winBottomPosition)}scrollWhenTargetOrStepAreHiddenTop(){let t=this.getMaxTargetAndStepTopPosition();t<this.winTopPosition&&this.DOMService.getNativeWindow().scrollBy(0,t-this.winTopPosition)}getMaxTargetAndStepBottomPosition(){let t=this.documentService.getElementAbsoluteTop(this.currentStep.targetViewContainer.element);return"top"===this.currentStep.position?t+this.currentStep.stepInstance.targetHeight:"bottom"===this.currentStep.position?t+this.currentStep.stepInstance.targetHeight+this.currentStep.stepInstance.stepHeight+Ja+Ya:"right"===this.currentStep.position||"left"===this.currentStep.position?Math.max(t+this.currentStep.stepInstance.targetHeight,t+this.currentStep.stepInstance.targetHeight/2+this.currentStep.stepInstance.stepHeight/2):void 0}getMaxTargetAndStepTopPosition(){let t=this.documentService.getElementAbsoluteTop(this.currentStep.targetViewContainer.element);return"top"===this.currentStep.position?t-(this.currentStep.stepInstance.stepHeight+Ja+Ya):"bottom"===this.currentStep.position?t:"right"===this.currentStep.position||"left"===this.currentStep.position?Math.min(t,t+this.currentStep.stepInstance.targetHeight/2-this.currentStep.stepInstance.stepHeight/2):void 0}scrollIfElementBeyondOtherElements(){2===this.isElementBeyondOthers()&&this.documentService.scrollToTheTop(this.currentStep.targetViewContainer.element),2===this.isElementBeyondOthers()&&this.documentService.scrollToTheBottom(this.currentStep.targetViewContainer.element),1===this.isElementBeyondOthers()&&this.documentService.isParentScrollable(this.currentStep.targetViewContainer.element)&&this.documentService.scrollIntoView(this.currentStep.targetViewContainer.element,this.currentStep.isElementOrAncestorFixed),1===this.isElementBeyondOthers()&&this.documentService.isParentScrollable(this.currentStep.targetViewContainer.element)&&this.currentStep.targetViewContainer.element.nativeElement.scrollIntoView()}isElementBeyondOthers(){return this.documentService.isElementBeyondOthers(this.currentStep.targetViewContainer.element,this.currentStep.isElementOrAncestorFixed,"backdrop")}};return t.\u0275fac=function(e){return new(e||t)(n.ac(Ua),n.ac($a),n.ac(La),n.ac(Ba),n.ac(Qa),n.ac(Ka),n.ac(Ra),n.ac(o.c),n.ac(Aa))},t.\u0275prov=n.Mb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})();class ts{}let es=(()=>{let t=class{constructor(t,e,i){this.platformId=t,this.stepService=e,this.optionsService=i,this.tourInProgress=!1}startTour(t){return Object(P.I)(this.platformId)?(this.tourInProgress||(this.tourInProgress=!0,t&&this.optionsService.setOptions(t),this.tour$=this.stepService.startTour().pipe(Object(Xt.a)(()=>this.tourInProgress=!1)),this.tour$.subscribe()),this.tour$):Object(c.a)(new ts)}closeTour(){this.isTourInProgress()&&this.stepService.close()}isTourInProgress(){return this.tourInProgress}};return t.\u0275fac=function(e){return new(e||t)(n.ac(n.F),n.ac(Za),n.ac(Ra))},t.\u0275prov=n.Mb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})();var is;const ns=o.g.forChild([]);let as=(()=>{let t=is=class{static forRoot(){return{ngModule:is,providers:[es,Za,La,Ua,$a,Ba,Ra,Ka,Qa,Aa,Na]}}static forChild(){return{ngModule:is,providers:[]}}};return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[P.c,ns]]}),t})(),ss=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.joyrideService=e,this.headerService=i,this.functionService=n,this.router=a,this.http=s,this.notify=o,this.currentStepType="",this.currentTour=null,this.tour=[{type:"welcome",stepId:"welcome",title:`<i class="far fa-question-circle" color="primary"></i> <b color="primary">${this.translate.instant("lang.welcomeTourTitle")}</b>`,description:this.translate.instant("lang.welcomeTourDescription"),redirectToAdmin:!1},{type:"email",stepId:"admin_email_server@administration",title:`<i class="far fa-question-circle" color="primary"></i> <b color="primary">${this.translate.instant("lang.admin_email_serverTitle")}</b>`,description:this.translate.instant("lang.admin_email_serverTour"),redirectToAdmin:!1},{type:"email",stepId:"emailTour@administration/sendmail",title:`<i class="far fa-question-circle" color="primary"></i> <b color="primary">${this.translate.instant("lang.emailTourTitle")}</b>`,description:this.translate.instant("lang.emailTourDescription"),redirectToAdmin:!1},{type:"email",stepId:"emailTour2@administration/sendmail",title:`<i class="far fa-question-circle" color="primary"></i> <b color="primary">${this.translate.instant("lang.emailTour2Title")}</b>`,description:this.translate.instant("lang.emailTour2Description"),redirectToAdmin:!1},{type:"notification",stepId:"admin_notif@administration",title:`<i class="far fa-question-circle" color="primary"></i> <b color="primary">${this.translate.instant("lang.admin_notifTitle")}</b>`,description:this.translate.instant("lang.admin_notifTour"),redirectToAdmin:!1},{type:"notification",stepId:"BASKETS_Tour@administration/notifications",title:`<i class="far fa-question-circle" color="primary"></i> <b color="primary">${this.translate.instant("lang.notifTour2Title")}</b>`,description:this.translate.instant("lang.notifTour2Description"),redirectToAdmin:!1},{type:"notification",stepId:"createScriptTour@administration/notifications/4",title:`<i class="far fa-question-circle" color="primary"></i> <b color="primary">${this.translate.instant("lang.createScriptTourTitle")}</b>`,description:this.translate.instant("lang.createScriptTourDescription"),redirectToAdmin:!1},{type:"notification",stepId:"notifTour@administration/notifications",title:`<i class="far fa-question-circle" color="primary"></i> <b color="primary">${this.translate.instant("lang.notifTourTitle")}</b>`,description:this.translate.instant("lang.notifTourDescription"),redirectToAdmin:!1},{type:"notification",stepId:"notifTour3@administration/notifications",title:`<i class="far fa-question-circle" color="primary"></i> <b color="primary">${this.translate.instant("lang.notifTour3Title")}</b>`,description:this.translate.instant("lang.notifTour3Description"),redirectToAdmin:!1},{type:"notification",stepId:"notifTour4@administration/notifications",title:`<i class="far fa-question-circle" color="primary"></i> <b color="primary">${this.translate.instant("lang.notifTour4Title")}</b>`,description:this.translate.instant("lang.notifTour4Description"),redirectToAdmin:!0}],this.featureTourEnd=[]}init(){if(this.getCurrentStepType(),!this.functionService.empty(this.currentStepType)){const t=this.tour.filter(t=>t.type===this.currentStepType).map(t=>t.stepId);this.joyrideService.startTour({customTexts:{next:">>",prev:"<<",done:this.translate.instant("lang.getIt")},steps:t,waitingTime:500}).subscribe(t=>{this.currentTour=this.tour.filter(e=>e.stepId.split("@")[0]===t.name)[0];const e=document.getElementsByClassName("joyride-step__container");e[0].style.width="auto",e[0].style.height="auto",document.getElementsByClassName("joyride-step__header")[0].innerHTML=""+this.currentTour.title,document.getElementsByClassName("joyride-step__body")[0].innerHTML=""+this.currentTour.description},t=>{},()=>{null===this.currentTour?this.router.navigate(["/home"]):this.currentTour.redirectToAdmin?this.router.navigate(["/administration"]):this.endTour()})}}getCurrentStepType(){this.featureTourEnd=this.headerService.user.featureTour,this.currentStepType=this.getFeatureTourTypes().filter(t=>-1===this.featureTourEnd.indexOf(t))[0]}endTour(){void 0!==this.currentStepType&&(this.featureTourEnd.push(this.currentStepType),this.http.put("../rest/currentUser/profile/featureTour",{featureTour:this.featureTourEnd}).pipe(Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe(),this.getCurrentStepType())}getFeatureTourTypes(){return[...new Set(this.tour.map(t=>t.type))]}isComplete(){return"root_visible"!==this.headerService.user.mode&&"root_invisible"!==this.headerService.user.mode||this.headerService.user.featureTour.length===this.getFeatureTourTypes().length}}return t.\u0275fac=function(e){return new(e||t)(n.ac(g.e),n.ac(es),n.ac(y.a),n.ac(_t.a),n.ac(o.c),n.ac(v.b),n.ac(D.a))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function os(t,e){1&t&&(n.Wb(0,"div",8),n.Rb(1,"mat-spinner",9),n.Vb())}const rs=function(t,e,i){return{"fa-file-signature":t,"fa-thumbs-up":e,"fa-comment-dots":i}};function cs(t,e){if(1&t&&(n.Wb(0,"td",10),n.Wb(1,"div",11),n.Rb(2,"mat-icon",12),n.ic(3,"translate"),n.Vb(),n.Wb(4,"div",13),n.Qc(5),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.pc("title",n.jc(3,4,"lang.to_"+t.mode)),n.oc("ngClass",n.xc(6,rs,"sign"==t.mode,"visa"==t.mode,"note"==t.mode)),n.Db(2),n.pc("title",t.reference),n.Db(1),n.Sc(" ",t.reference," ")}}function ls(t,e){if(1&t&&(n.Wb(0,"td",14),n.Wb(1,"div",15),n.Wb(2,"span"),n.Qc(3),n.Vb(),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.pc("title",t.title),n.Db(2),n.Rc(t.title)}}function ds(t,e){if(1&t){const t=n.Xb();n.Wb(0,"tr",16),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().goTo(i)})),n.Vb()}}function hs(t,e){1&t&&(n.Wb(0,"div",17),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noResult"),"\n"))}let us=(()=>{class t{constructor(t,e,i,a,s){this.translate=t,this.http=e,this.dialog=i,this.notify=a,this.headerService=s,this.loading=!0,this.userList=[],this.displayedColumns=["id","title"],this.maarchParapheurUrl="",this.triggerEvent=new n.o,this.dataSource=new vt.p(this.userList)}ngOnInit(){this.loading=!0}ngAfterViewInit(){this.http.get("../rest/home/maarchParapheurDocuments").pipe(Object(Xt.a)(()=>this.loading=!1)).subscribe(t=>{setTimeout(()=>{this.dataSource=new vt.p(t.documents),this.maarchParapheurUrl=t.url,this.triggerEvent.emit(t.count.current)},0)},t=>{this.notify.handleErrors(t)})}goTo(t){window.open(this.maarchParapheurUrl+"/dist/index.html#/documents/"+t.id,"_blank")}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.b),n.Qb(D.a),n.Qb(y.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-maarch-parapheur-list"]],outputs:{triggerEvent:"triggerEvent"},decls:8,vars:4,consts:[["style","display:flex;height:100%;",4,"ngIf"],["mat-table","","matSort","","matSortActive","id","matSortDisableClear","","matSortDirection","asc",2,"width","100%","table-layout","fixed",3,"dataSource"],["matColumnDef","id"],["mat-cell","","style","width:15%;text-align:center;overflow:hidden;text-overflow: ellipsis;white-space: nowrap;padding: 5px;vertical-align: middle;",4,"matCellDef"],["matColumnDef","title"],["mat-cell","","style","width:45%;overflow:hidden;text-overflow: ellipsis;padding: 5px;vertical-align: middle;",4,"matCellDef"],["mat-row","","style","cursor:pointer;",3,"click",4,"matRowDef","matRowDefColumns"],["class","noResult",4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],["mat-cell","",2,"width","15%","text-align","center","overflow","hidden","text-overflow","ellipsis","white-space","nowrap","padding","5px","vertical-align","middle"],[2,"overflow","hidden","text-overflow","ellipsis"],["color","primary",1,"fas","fa-2x",3,"ngClass","title"],[2,"padding-top","5px","color","rgba(0,0,0,0.4)","font-size","90%","overflow","hidden","text-overflow","ellipsis",3,"title"],["mat-cell","",2,"width","45%","overflow","hidden","text-overflow","ellipsis","padding","5px","vertical-align","middle"],[2,"overflow","hidden","line-height","1.5em","height","3em","overflow","hidden",3,"title"],["mat-row","",2,"cursor","pointer",3,"click"],[1,"noResult"]],template:function(t,e){1&t&&(n.Oc(0,os,2,0,"div",0),n.Wb(1,"table",1),n.Ub(2,2),n.Oc(3,cs,6,10,"td",3),n.Tb(),n.Ub(4,4),n.Oc(5,ls,4,2,"td",5),n.Tb(),n.Oc(6,ds,1,0,"tr",6),n.Vb(),n.Oc(7,hs,3,3,"div",7)),2&t&&(n.oc("ngIf",e.loading),n.Db(1),n.oc("dataSource",e.dataSource),n.Db(5),n.oc("matRowDefColumns",e.displayedColumns),n.Db(1),n.oc("ngIf",0===e.dataSource.filteredData.length))},directives:[P.t,vt.o,Fe.a,vt.c,vt.b,vt.n,V.c,vt.a,S.a,P.q,vt.m],pipes:[g.d],styles:[".noResult[_ngcontent-%COMP%]{padding:10px;text-align:center;opacity:.5}"]}),t})(),ps=(()=>{class t{constructor(t,e,i){this.translate=t,this.changeDetectorRef=e,this.ngZone=i}transform(t,e=null){this.removeTimer();let i=new Date(t),n=("0"+i.getDate()).slice(-2),a=("0"+(i.getMonth()+1)).slice(-2),s=("0"+i.getHours()).slice(-2),o=("0"+i.getMinutes()).slice(-2),r=new Date,c=[];c[0]=this.translate.instant("lang.januaryShort"),c[1]=this.translate.instant("lang.februaryShort"),c[2]=this.translate.instant("lang.marchShort"),c[3]=this.translate.instant("lang.aprilShort"),c[4]=this.translate.instant("lang.mayShort"),c[5]=this.translate.instant("lang.juneShort"),c[6]=this.translate.instant("lang.julyShort"),c[7]=this.translate.instant("lang.augustShort"),c[8]=this.translate.instant("lang.septemberShort"),c[9]=this.translate.instant("lang.octoberShort"),c[10]=this.translate.instant("lang.novemberShort"),c[11]=this.translate.instant("lang.decemberShort");let l=Math.round(Math.abs((r.getTime()-i.getTime())/1e3)),d=("0"+r.getDate()).slice(-2),h=Number.isNaN(l)?1e3:1e3*this.getSecondsUntilUpdate(l);this.timer=this.ngZone.runOutsideAngular(()=>"undefined"!=typeof window?window.setTimeout(()=>{this.ngZone.run(()=>this.changeDetectorRef.markForCheck())},h):null);let u=Math.round(Math.abs(l/60)),p=Math.round(Math.abs(u/60)),b=Math.round(Math.abs(p/24));return Math.round(Math.abs(b/30.416)),Math.round(Math.abs(b/365)),t==this.translate.instant("lang.undefined")?this.translate.instant("lang.undefined"):Number.isNaN(l)?"":l<=45?this.getFormatedDate(this.translate.instant("lang.dateAgo").toLowerCase(),this.translate.instant("lang.fewSeconds"),e):l<=90?this.getFormatedDate(this.translate.instant("lang.dateAgo").toLowerCase(),this.translate.instant("lang.oneMinute"),e):u<=45?this.getFormatedDate(this.translate.instant("lang.dateAgo").toLowerCase(),u+" "+this.translate.instant("lang.minutes"),e):u<=90?this.getFormatedDate(this.translate.instant("lang.dateAgo").toLowerCase(),this.translate.instant("lang.oneHour"),e):p<=24&&n===d?this.getFormatedDate(this.translate.instant("lang.at").toLowerCase(),s+":"+o,e):p<=24||b<=5?this.getFormatedDate(this.translate.instant("lang.dateAgo").toLowerCase(),b+" "+this.translate.instant("lang.dayS"),e):this.getFormatedDate(this.translate.instant("lang.dateTo").toLowerCase(),b<=345?i.getDate()+" "+c[i.getMonth()]:n+"/"+a+"/"+i.getFullYear(),e)}ngOnDestroy(){this.removeTimer()}removeTimer(){this.timer&&(window.clearTimeout(this.timer),this.timer=null)}getSecondsUntilUpdate(t){return t<60?2:t<3600?30:t<86400?300:3600}getFormatedDate(t,e,i){return"full"===i?`${t} ${e}`:e}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.cc(),n.Qb(n.C))},t.\u0275pipe=n.Pb({name:"timeAgo",type:t,pure:!1}),t})(),bs=(()=>{class t{constructor(t,e,i){this.translate=t,this.changeDetectorRef=e,this.ngZone=i}transform(t,e=null){this.removeTimer();let i=new Date(t),n=("0"+i.getDate()).slice(-2),a=("0"+(i.getMonth()+1)).slice(-2),s=(("0"+i.getHours()).slice(-2),("0"+i.getMinutes()).slice(-2),new Date),o=[];o[0]=this.translate.instant("lang.januaryShort"),o[1]=this.translate.instant("lang.februaryShort"),o[2]=this.translate.instant("lang.marchShort"),o[3]=this.translate.instant("lang.aprilShort"),o[4]=this.translate.instant("lang.mayShort"),o[5]=this.translate.instant("lang.juneShort"),o[6]=this.translate.instant("lang.julyShort"),o[7]=this.translate.instant("lang.augustShort"),o[8]=this.translate.instant("lang.septemberShort"),o[9]=this.translate.instant("lang.octoberShort"),o[10]=this.translate.instant("lang.novemberShort"),o[11]=this.translate.instant("lang.decemberShort");let r=Math.round(Math.abs((s.getTime()-i.getTime())/1e3)),c=("0"+s.getDate()).slice(-2),l=Number.isNaN(r)?1e3:1e3*this.getSecondsUntilUpdate(r);this.timer=this.ngZone.runOutsideAngular(()=>"undefined"!=typeof window?window.setTimeout(()=>{this.ngZone.run(()=>this.changeDetectorRef.markForCheck())},l):null);let d=Math.round(Math.abs(r/60)),h=Math.round(Math.abs(d/60)),u=Math.round(Math.abs(h/24));return Math.round(Math.abs(u/30.416)),Math.round(Math.abs(u/365)),null==t?"<span>"+this.translate.instant("lang.undefined")+"</span>":s>i?this.getFormatedDate("","badge"===e?h<=24&&n===c||h<=24?"<b>"+this.translate.instant("lang.outdated")+" "+this.translate.instant("lang.fromRange").toLowerCase()+" "+h+" "+this.translate.instant("lang.hours")+" !</b>":"<b>"+this.translate.instant("lang.outdated")+" "+this.translate.instant("lang.fromRange").toLowerCase()+" "+u+" "+this.translate.instant("lang.dayS")+" !</b>":"<b>"+this.translate.instant("lang.outdated")+" !</b>","warn",e):Number.isNaN(r)?"":d<=59?this.getFormatedDate(this.translate.instant("lang.in")[0].toUpperCase()+this.translate.instant("lang.in").substr(1).toLowerCase(),d+" "+this.translate.instant("lang.minutes"),"warn",e):h<=23?this.getFormatedDate(this.translate.instant("lang.in")[0].toUpperCase()+this.translate.instant("lang.in").substr(1).toLowerCase(),h+" "+this.translate.instant("lang.hours"),"warn",e):u<=5?this.getFormatedDate(this.translate.instant("lang.in")[0].toUpperCase()+this.translate.instant("lang.in").substr(1).toLowerCase(),u+" "+this.translate.instant("lang.dayS"),"secondary",e):u<=345?this.getFormatedDate(this.translate.instant("lang.onRange")[0].toUpperCase()+this.translate.instant("lang.onRange").substr(1).toLowerCase(),i.getDate()+" "+o[i.getMonth()],"accent",e):n+"/"+a+"/"+i.getFullYear()}ngOnDestroy(){this.removeTimer()}removeTimer(){this.timer&&(window.clearTimeout(this.timer),this.timer=null)}getSecondsUntilUpdate(t){return t<60?2:t<3600?30:t<86400?300:3600}getFormatedDate(t,e,i,n){return"badge"===n?`${t} ${e} <i class="fas fa-circle badgePipe_${i}"></i>`:`<span color="${i}">${e}</span>`}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.cc(),n.Qb(n.C))},t.\u0275pipe=n.Pb({name:"timeLimit",type:t,pure:!1}),t})();function fs(t,e){if(1&t&&(n.Rb(0,"img",13),n.ic(1,"async"),n.ic(2,"secureUrl")),2&t){const t=n.hc();n.oc("src",n.jc(1,1,n.jc(2,3,t.thumbnailUrl)),n.Gc)}}function ms(t,e){if(1&t&&(n.Wb(0,"mat-card",14),n.Wb(1,"div",15),n.Wb(2,"div",16),n.Rb(3,"span",17),n.Vb(),n.Vb(),n.Wb(4,"div",18),n.Wb(5,"button",19),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(3),n.oc("innerHTML",t.homeMessage,n.Ec),n.Db(3),n.Rc(n.jc(7,2,"lang.aboutUs"))}}function gs(t,e){if(1&t&&(n.Wb(0,"span",22),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("noDoc",0===t.nbMpDocs),n.pc("matBadge",t.nbMpDocs),n.Db(1),n.Rc(n.jc(2,4,"lang.maarchParapheurDocuments"))}}function vs(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab"),n.Oc(1,gs,3,6,"ng-template",20),n.Wb(2,"app-maarch-parapheur-list",21),n.dc("triggerEvent",(function(e){return n.Dc(t),n.hc().updateNbMpDocs(e)})),n.Vb(),n.Vb()}}function _s(t,e){1&t&&(n.Wb(0,"div",26),n.Rb(1,"mat-spinner",27),n.Vb())}function ys(t,e){if(1&t&&(n.Wb(0,"div",42),n.ic(1,"date"),n.ic(2,"translate"),n.ic(3,"translate"),n.Rb(4,"i",43),n.ic(5,"translate"),n.Qc(6),n.ic(7,"timeAgo"),n.Vb()),2&t){const t=n.hc().$implicit;n.qc("id","",t.res_id,"_creation_date"),n.pc("title",n.kc(1,4,t.creation_date,n.jc(2,7,"lang.onRange")+" dd/MM/y "+n.jc(3,9,"lang.atRange")+" HH:mm")),n.Db(4),n.pc("title",n.jc(5,11,"lang.creationDate")),n.Db(2),n.Sc(" ",n.jc(7,13,t.creation_date)," ")}}function xs(t,e){1&t&&(n.Wb(0,"span",44),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.confidential")))}const Cs=function(t){return{width:t}},Os=function(t){return{color:t}};function Ds(t,e){if(1&t&&(n.Wb(0,"td",36),n.Oc(1,ys,8,15,"div",37),n.Wb(2,"div",38),n.Rb(3,"mat-icon",39),n.Oc(4,xs,3,3,"span",40),n.Vb(),n.Wb(5,"div",41),n.Qc(6),n.Vb(),n.Vb()),2&t){const t=e.$implicit,i=n.hc(3);n.oc("ngStyle",n.vc(16,Cs,i.appService.getViewMode()?"30%":"15%")),n.Db(1),n.oc("ngIf",null==t.closing_date&&i.appService.getViewMode()),n.Db(2),n.Hb("",t.status_icon.charAt(0),"",t.status_icon.charAt(1)," ",t.status_icon," ",t.status_icon.charAt(0),"",t.status_icon.charAt(1),"-2x"),n.rc("title","",t.status_label," (",t.status_id,")"),n.oc("ngStyle",n.vc(18,Os,t.priority_color)),n.Db(1),n.oc("ngIf","Y"===t.confidentiality),n.Db(1),n.rc("title","",t.alt_identifier," (n\xb0",t.res_id,")"),n.Db(1),n.Sc(" ",t.alt_identifier," ")}}function ws(t,e){if(1&t&&(n.Wb(0,"div",48),n.Rb(1,"i",49),n.ic(2,"translate"),n.Qc(3,"\xa0 "),n.Rb(4,"span",50),n.ic(5,"timeLimit"),n.ic(6,"date"),n.ic(7,"translate"),n.ic(8,"translate"),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.pc("title",n.jc(2,3,"lang.processLimitDate")),n.Db(3),n.pc("title",n.kc(6,7,t.process_limit_date,n.jc(7,10,"lang.onRange")+" dd/MM/y "+n.jc(8,12,"lang.atRange")+" HH:mm")),n.oc("innerHTML",n.jc(5,5,t.process_limit_date),n.Ec)}}function Ms(t,e){if(1&t&&(n.Wb(0,"td",45),n.Oc(1,ws,9,14,"div",46),n.Wb(2,"div",47),n.Wb(3,"span"),n.Qc(4),n.Vb(),n.Vb(),n.Vb()),2&t){const t=e.$implicit,i=n.hc(3);n.Db(1),n.oc("ngIf",null==t.closing_date&&i.appService.getViewMode()),n.Db(1),n.pc("title",t.subject),n.Db(2),n.Rc(t.subject)}}function ks(t,e){if(1&t&&(n.Wb(0,"div",42),n.ic(1,"date"),n.ic(2,"translate"),n.ic(3,"translate"),n.Rb(4,"i",43),n.ic(5,"translate"),n.Qc(6),n.ic(7,"timeAgo"),n.Vb()),2&t){const t=n.hc().$implicit;n.qc("id","",t.res_id,"_creation_date"),n.pc("title",n.kc(1,4,t.creation_date,n.jc(2,7,"lang.onRange")+" dd/MM/y "+n.jc(3,9,"lang.atRange")+" HH:mm")),n.Db(4),n.pc("title",n.jc(5,11,"lang.creationDate")),n.Db(2),n.Sc(" ",n.jc(7,13,t.creation_date)," ")}}function Ss(t,e){if(1&t&&(n.Wb(0,"div",55),n.Rb(1,"i",49),n.ic(2,"translate"),n.Qc(3,"\xa0 "),n.Rb(4,"span",50),n.ic(5,"timeLimit"),n.ic(6,"date"),n.ic(7,"translate"),n.ic(8,"translate"),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.pc("title",n.jc(2,3,"lang.processLimitDate")),n.Db(3),n.pc("title",n.kc(6,7,t.process_limit_date,n.jc(7,10,"lang.onRange")+" dd/MM/y "+n.jc(8,12,"lang.atRange")+" HH:mm")),n.oc("innerHTML",n.jc(5,5,t.process_limit_date),n.Ec)}}function Is(t,e){if(1&t&&(n.Wb(0,"div",55),n.Rb(1,"i",56),n.ic(2,"translate"),n.Qc(3,"\xa0 "),n.Wb(4,"span",57),n.ic(5,"date"),n.ic(6,"translate"),n.ic(7,"translate"),n.Qc(8),n.ic(9,"timeAgo"),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.pc("title",n.jc(2,3,"lang.closingDate")),n.Db(3),n.pc("title",n.kc(5,5,t.closing_date,n.jc(6,8,"lang.onRange")+" dd/MM/y "+n.jc(7,10,"lang.atRange")+" HH:mm")),n.Db(4),n.Rc(n.jc(9,12,t.closing_date))}}const Ps=function(t){return[t]};function Vs(t,e){if(1&t){const t=n.Xb();n.Wb(0,"td",51),n.Oc(1,ks,8,15,"div",37),n.Oc(2,Ss,9,14,"div",52),n.Oc(3,Is,10,14,"div",52),n.Wb(4,"div"),n.Wb(5,"button",53),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(3);return i.stopPropagation(),s.viewDocument(a)}))("mouseenter",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).viewThumbnail(i)}))("mouseleave",(function(){return n.Dc(t),n.hc(3).closeThumbnail()})),n.ic(6,"translate"),n.ic(7,"translate"),n.Rb(8,"mat-icon",54),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",null==t.closing_date),n.Db(1),n.oc("ngIf",null==t.closing_date),n.Db(1),n.oc("ngIf",null!=t.closing_date),n.Db(2),n.pc("title",t.hasDocument?n.jc(6,6,"lang.viewResource"):n.jc(7,8,"lang.noDocument")),n.oc("disabled",!t.hasDocument),n.Db(3),n.oc("ngClass",n.vc(10,Ps,t.hasDocument?"fa-eye":"fa-eye-slash"))}}function Rs(t,e){if(1&t){const t=n.Xb();n.Wb(0,"tr",58),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).goToDetail(i)})),n.Vb()}}function js(t,e){if(1&t&&(n.Wb(0,"table",28),n.Ub(1,29),n.Oc(2,Ds,7,20,"td",30),n.Tb(),n.Ub(3,31),n.Oc(4,Ms,5,3,"td",32),n.Tb(),n.Ub(5,33),n.Oc(6,Vs,9,12,"td",34),n.Tb(),n.Oc(7,Rs,1,0,"tr",35),n.Vb()),2&t){const t=n.hc(2);n.oc("dataSource",t.dataSource),n.Db(7),n.oc("matRowDefColumns",t.displayedColumns)}}function As(t,e){if(1&t&&(n.Wb(0,"mat-tab",23),n.ic(1,"translate"),n.Oc(2,_s,2,0,"div",24),n.Oc(3,js,8,2,"table",25),n.Vb()),2&t){const t=n.hc();n.pc("label",n.jc(1,3,"lang.myLastResources")),n.Db(2),n.oc("ngIf",t.loading),n.Db(1),n.oc("ngIf",!t.loading)}}let Ws=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this.translate=t,this.http=e,this.dialog=i,this.sanitizer=n,this.notify=a,this.headerService=s,this.appService=o,this.router=r,this.featureTourService=c,this.loading=!1,this.docUrl="",this.currentDate="",this.nbMpDocs=0,this.displayedColumns=["res_id","subject","creation_date"],window.pdfWorkerSrc="pdfjs/pdf.worker.min.js"}ngOnInit(){this.loading=!0,this.appService.getViewMode()&&(this.displayedColumns=["res_id","subject"]),this.headerService.setHeader(this.translate.instant("lang.home"));const t=new Date;this.currentDate=t.toLocaleDateString(this.translate.instant("lang.langISO"),{weekday:"long",year:"numeric",month:"long",day:"numeric"}),this.http.get("../rest/home").subscribe(t=>{this.homeData=t,this.homeMessage=t.homeMessage})}ngAfterViewInit(){this.featureTourService.isComplete()||this.featureTourService.init(),this.http.get("../rest/home/lastRessources").subscribe(t=>{setTimeout(()=>{this.dataSource=new vt.p(t.lastResources),this.loading=!1},0)})}viewDocument(t){this.http.get(`../rest/resources/${t.res_id}/content?mode=view`,{responseType:"blob"}).pipe(Object(mt.a)(e=>{const i=new Blob([e],{type:"application/pdf"}),n=URL.createObjectURL(i),a=window.open();a.document.write(`<iframe style="width: 100%;height: 100%;margin: 0;padding: 0;" src="${n}" frameborder="0" allowfullscreen></iframe>`),a.document.title=t.alt_identifier}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}viewThumbnail(t){const e=+new Date;this.thumbnailUrl="../rest/resources/"+t.res_id+"/thumbnail?tsp="+e,$("#viewThumbnail").show(),$("#listContent").css({overflow:"hidden"})}closeThumbnail(){$("#viewThumbnail").hide(),$("#listContent").css({overflow:"auto"})}goToDetail(t){this.http.get("../rest/resources/"+t.res_id+"/isAllowed").subscribe(e=>{e.isAllowed?this.router.navigate(["/resources/"+t.res_id]):this.notify.error(this.translate.instant("lang.documentOutOfPerimeter"))},()=>{this.notify.error(this.translate.instant("lang.errorOccured"))})}updateNbMpDocs(t){this.nbMpDocs=t}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.b),n.Qb(ca.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(o.c),n.Qb(ss))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Xc(gt.c,!0),2&t&&n.yc(i=n.ec())&&(e.viewPanels=i)},decls:17,vars:10,consts:[["autosize","","joyrideStep","welcome","stepPosition","center",1,"maarch-container"],["id","viewThumbnail",2,"display","none","position","fixed","z-index","2","margin-left","1px"],["style","max-height: 100vh;",3,"src",4,"ngIf"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],["style","background: #135F7F;color: white;box-shadow: none;border: solid 2px white;width: 100%;border-radius: 20px;padding-bottom: 40px;",4,"ngIf"],[1,"container"],[1,"container-content"],[4,"ngIf"],[3,"label",4,"ngIf"],[2,"max-height","100vh",3,"src"],[2,"background","#135F7F","color","white","box-shadow","none","border","solid 2px white","width","100%","border-radius","20px","padding-bottom","40px"],[2,"display","flex","max-height","250px","overflow","auto"],[2,"padding-left","10px"],[3,"innerHTML"],[2,"text-align","right","opacity","0.5"],["mat-button","","routerLink","/about-us",2,"position","absolute","font-size","10px","right","0px","bottom","0px"],["matTabLabel",""],[3,"triggerEvent"],["matBadgeOverlap","false",3,"matBadge"],[3,"label"],["style","display:flex;height:100%;",4,"ngIf"],["mat-table","","matSort","","matSortActive","res_id","matSortDisableClear","","matSortDirection","asc","style","width:100%;table-layout: fixed;",3,"dataSource",4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],["mat-table","","matSort","","matSortActive","res_id","matSortDisableClear","","matSortDirection","asc",2,"width","100%","table-layout","fixed",3,"dataSource"],["matColumnDef","res_id"],["class","first_col","mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","subject"],["mat-cell","","style","width:45%;overflow:hidden;text-overflow: ellipsis;padding: 5px;vertical-align: middle;",4,"matCellDef"],["matColumnDef","creation_date"],["mat-cell","","style","text-align: right;width:15%;overflow:hidden;text-overflow: ellipsis;white-space: nowrap;padding: 5px;vertical-align: middle;",4,"matCellDef"],["mat-row","","style","cursor:pointer;",3,"click",4,"matRowDef","matRowDefColumns"],["mat-cell","",1,"first_col",3,"ngStyle"],["style","color: rgba(0,0,0,0.4);font-size: 90%;overflow: hidden;text-overflow: ellipsis;",3,"id","title",4,"ngIf"],[2,"overflow","hidden","text-overflow","ellipsis"],["color","primary",3,"ngStyle","title"],["class","watermark",4,"ngIf"],[2,"padding-top","5px","color","rgba(0,0,0,0.4)","font-size","90%","overflow","hidden","text-overflow","ellipsis",3,"title"],[2,"color","rgba(0,0,0,0.4)","font-size","90%","overflow","hidden","text-overflow","ellipsis",3,"id","title"],[1,"fa","fa-calendar",3,"title"],[1,"watermark"],["mat-cell","",2,"width","45%","overflow","hidden","text-overflow","ellipsis","padding","5px","vertical-align","middle"],["style","color: rgba(0,0,0,0.4);font-size: 90%;overflow: hidden;text-overflow: ellipsis;text-align: right;",4,"ngIf"],[2,"overflow","hidden","line-height","1.5em","height","3em","overflow","hidden",3,"title"],[2,"color","rgba(0,0,0,0.4)","font-size","90%","overflow","hidden","text-overflow","ellipsis","text-align","right"],[1,"fa","fa-stopwatch",3,"title"],[3,"innerHTML","title"],["mat-cell","",2,"text-align","right","width","15%","overflow","hidden","text-overflow","ellipsis","white-space","nowrap","padding","5px","vertical-align","middle"],["style","color: rgba(0,0,0,0.4);font-size: 90%;overflow: hidden;text-overflow: ellipsis;",4,"ngIf"],["mat-icon-button","",3,"disabled","title","click","mouseenter","mouseleave"],["color","primary",1,"fa",3,"ngClass"],[2,"color","rgba(0,0,0,0.4)","font-size","90%","overflow","hidden","text-overflow","ellipsis"],[1,"fa","fa-lock",3,"title"],[3,"title"],["mat-row","",2,"cursor","pointer",3,"click"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"mat-card",1),n.Oc(3,fs,3,5,"img",2),n.Vb(),n.Wb(4,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",6),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Wb(10,"div",7),n.Oc(11,ms,8,4,"mat-card",8),n.Vb(),n.Vb(),n.Wb(12,"div",9),n.Wb(13,"div",10),n.Wb(14,"mat-tab-group"),n.Oc(15,vs,3,0,"mat-tab",11),n.Oc(16,As,4,5,"mat-tab",12),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.oc("ngIf",""!==e.thumbnailUrl),n.Db(2),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.oc("ngIf",e.homeMessage),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(3),n.oc("ngIf",void 0!==e.homeData&&e.homeData.isLinkedToMaarchParapheur),n.Db(1),n.oc("ngIf",void 0!==e.homeData))},directives:[I.e,za,I.f,K.a,P.t,Ot,We,Te.c,k.b,o.d,Te.a,Te.d,us,wt.a,V.c,vt.o,Fe.a,vt.c,vt.b,vt.n,vt.a,P.w,S.a,P.q,vt.m],pipes:[P.b,si,g.d,P.f,ps,bs],styles:[".first_col[_ngcontent-%COMP%]{position:relative;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:5px;vertical-align:middle}.noDoc[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{color:#666;opacity:.5}.watermark[_ngcontent-%COMP%]{position:absolute;left:50%;transform:translateX(-50%) rotate(-20deg);color:red;font-weight:700;opacity:.6}"]}),t})();const Ts=["snav"];function Es(t,e){1&t&&(n.Wb(0,"div"),n.Rb(1,"i",9),n.Vb())}function Fs(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div"),n.Wb(1,"div",10),n.Wb(2,"div",11),n.Wb(3,"h2"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Wb(6,"form",12,13),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().submitNumericPackage()})),n.Wb(8,"input",14),n.dc("change",(function(e){return n.Dc(t),n.hc().uploadNumericPackage(e)})),n.Vb(),n.Rb(9,"br"),n.Wb(10,"div",15),n.Wb(11,"div",16),n.Wb(12,"button",17),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(7);n.Db(4),n.Rc(n.jc(5,3,"lang.saveNumericPackage")),n.Db(8),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(14,5,"lang.save"))}}let Ls=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.zone=i,this.notify=n,this.headerService=a,this.appService=s,this.numericPackage={base64:"",name:"",type:"",size:0,label:"",extension:""},this.loading=!1,window.angularSaveNumericPackageComponent={componentAfterUpload:t=>this.processAfterUpload(t)}}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.saveNumericPackage")),this.loading=!1}processAfterUpload(t){this.zone.run(()=>this.resfreshUpload(t))}resfreshUpload(t){this.numericPackage.base64=t.replace(/^data:.*?;base64,/,"")}uploadNumericPackage(t){if(t.target.files&&t.target.files[0]){var e=new FileReader;this.numericPackage.name=t.target.files[0].name,this.numericPackage.size=t.target.files[0].size,this.numericPackage.type=t.target.files[0].type,this.numericPackage.extension=t.target.files[0].name.split(".").pop(),""==this.numericPackage.label&&(this.numericPackage.label=this.numericPackage.name),e.readAsDataURL(t.target.files[0]),e.onload=function(t){window.angularSaveNumericPackageComponent.componentAfterUpload(t.target.result)}}}submitNumericPackage(){0!=this.numericPackage.size?this.http.post("../rest/saveNumericPackage",this.numericPackage).subscribe(t=>{t.errors?this.notify.error(t.errors):(this.numericPackage={base64:"",name:"",type:"",size:0,label:"",extension:""},$("#numericPackageFilePath").val(null),this.notify.success(this.translate.instant("lang.numericPackageImported")),null!=t.basketRedirection&&(window.location.href=t.basketRedirection))},t=>{this.notify.error(t.error.errors)}):(this.numericPackage.name="",this.numericPackage.size=0,this.numericPackage.type="",this.numericPackage.base64="",this.numericPackage.extension="",this.notify.error(this.translate.instant("lang.noNumericPackageSelected")))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(n.C),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(Ts,!0),2&t&&n.yc(i=n.ec())&&(e.sidenavLeft=i.first)},decls:13,vars:8,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],[4,"ngIf"],[1,"fa","fa-spinner","fa-spin","fa-5x",2,"margin-left","50%","margin-top","16%","font-size","8em"],[1,"row","row-eq-height"],[1,"col-md-5","col-md-offset-3",2,"margin-top","50px","border-top","solid 2px #F99830","border-bottom","solid 2px #F99830","padding","10px"],[1,"form-horizontal",3,"ngSubmit"],["saveNumericPackageForm","ngForm"],["id","numericPackageFilePath","type","file","name","files[]",3,"change"],[1,"form-group"],[2,"text-align","center"],["mat-raised-button","","color","primary","type","submit",3,"disabled"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,Es,2,0,"div",8),n.Oc(12,Fs,15,7,"div",8),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,X.K,X.v,X.w,k.b],pipes:[g.d],styles:[".upload-drop-zone[_ngcontent-%COMP%]{font-size:16px;height:100px;border-width:2px;margin-bottom:20px;color:#ccc;border-style:dashed;border-color:#ccc;line-height:100px;text-align:center}.upload-drop-zone.drop[_ngcontent-%COMP%]{color:#222;border-color:#222}.avatar[_ngcontent-%COMP%]{text-decoration:none;background:#135f7f;color:#fff;width:100px;height:100px;border-radius:5px;display:block;overflow:hidden;margin:5px}"]}),t})();const Qs=["pdfViewerContainer"],Ns=function(t){const e=new t.EventBus(!0);var i;return(i=e).on("documentload",(function(){const t=document.createEvent("CustomEvent");t.initCustomEvent("documentload",!0,!0,{}),window.dispatchEvent(t)})),i.on("pagerendered",(function(t){const e=document.createEvent("CustomEvent");e.initCustomEvent("pagerendered",!0,!0,{pageNumber:t.pageNumber,cssTransform:t.cssTransform}),t.source.div.dispatchEvent(e)})),i.on("textlayerrendered",(function(t){const e=document.createEvent("CustomEvent");e.initCustomEvent("textlayerrendered",!0,!0,{pageNumber:t.pageNumber}),t.source.textLayerDiv.dispatchEvent(e)})),i.on("pagechanging",(function(t){const e=document.createEvent("UIEvents");e.initEvent("pagechanging",!0,!0),e.pageNumber=t.pageNumber,t.source.container.dispatchEvent(e)})),i.on("pagesinit",(function(t){const e=document.createEvent("CustomEvent");e.initCustomEvent("pagesinit",!0,!0,null),t.source.container.dispatchEvent(e)})),i.on("pagesloaded",(function(t){const e=document.createEvent("CustomEvent");e.initCustomEvent("pagesloaded",!0,!0,{pagesCount:t.pagesCount}),t.source.container.dispatchEvent(e)})),i.on("scalechange",(function(t){const e=document.createEvent("UIEvents");e.initEvent("scalechange",!0,!0),e.scale=t.scale,e.presetValue=t.presetValue,t.source.container.dispatchEvent(e)})),i.on("updateviewarea",(function(t){const e=document.createEvent("UIEvents");e.initEvent("updateviewarea",!0,!0),e.location=t.location,t.source.container.dispatchEvent(e)})),i.on("find",(function(t){if(t.source===window)return;const e=document.createEvent("CustomEvent");e.initCustomEvent("find"+t.type,!0,!0,{query:t.query,phraseSearch:t.phraseSearch,caseSensitive:t.caseSensitive,highlightAll:t.highlightAll,findPrevious:t.findPrevious}),window.dispatchEvent(e)})),i.on("attachmentsloaded",(function(t){const e=document.createEvent("CustomEvent");e.initCustomEvent("attachmentsloaded",!0,!0,{attachmentsCount:t.attachmentsCount}),t.source.container.dispatchEvent(e)})),i.on("sidebarviewchanged",(function(t){const e=document.createEvent("CustomEvent");e.initCustomEvent("sidebarviewchanged",!0,!0,{view:t.view}),t.source.outerContainer.dispatchEvent(e)})),i.on("pagemode",(function(t){const e=document.createEvent("CustomEvent");e.initCustomEvent("pagemode",!0,!0,{mode:t.mode}),t.source.pdfViewer.container.dispatchEvent(e)})),i.on("namedaction",(function(t){const e=document.createEvent("CustomEvent");e.initCustomEvent("namedaction",!0,!0,{action:t.action}),t.source.pdfViewer.container.dispatchEvent(e)})),i.on("presentationmodechanged",(function(t){const e=document.createEvent("CustomEvent");e.initCustomEvent("presentationmodechanged",!0,!0,{active:t.active,switchInProgress:t.switchInProgress}),window.dispatchEvent(e)})),i.on("outlineloaded",(function(t){const e=document.createEvent("CustomEvent");e.initCustomEvent("outlineloaded",!0,!0,{outlineCount:t.outlineCount}),t.source.container.dispatchEvent(e)})),e};var zs;let Bs,Us;function $s(){return"undefined"==typeof window}$s()||(Bs=i("lRFz"),Us=i("louq"),Bs.verbosity=Bs.VerbosityLevel.ERRORS);var Hs=function(t){return t[t.DISABLED=0]="DISABLED",t[t.ENABLED=1]="ENABLED",t[t.ENHANCED=2]="ENHANCED",t}({});let Gs=(()=>{let t=zs=class{constructor(t){if(this.element=t,this.isVisible=!1,this._cMapsUrl=void 0!==Bs?`https://unpkg.com/pdfjs-dist@${Bs.version}/cmaps/`:null,this._renderText=!0,this._renderTextMode=Hs.ENABLED,this._stickToPage=!1,this._originalSize=!0,this._page=1,this._zoom=1,this._zoomScale="page-width",this._rotation=0,this._showAll=!0,this._canAutoResize=!0,this._fitToPage=!1,this._externalLinkTarget="blank",this._showBorders=!1,this.isInitialized=!1,this.afterLoadComplete=new n.o,this.pageRendered=new n.o,this.textLayerRendered=new n.o,this.onError=new n.o,this.onProgress=new n.o,this.pageChange=new n.o(!0),$s())return;let e;e=window.hasOwnProperty("pdfWorkerSrc")&&"string"==typeof window.pdfWorkerSrc&&window.pdfWorkerSrc?window.pdfWorkerSrc:`https://cdnjs.cloudflare.com/ajax/libs/pdf.js/${Bs.version}/pdf.worker.min.js`,Bs.GlobalWorkerOptions.workerSrc=e}set cMapsUrl(t){this._cMapsUrl=t}set page(t){const e=t=parseInt(t,10)||1;this._pdf&&(t=this.getValidPageNumber(t)),this._page=t,e!==t&&this.pageChange.emit(t)}set renderText(t){this._renderText=t}set renderTextMode(t){this._renderTextMode=t}set originalSize(t){this._originalSize=t}set showAll(t){this._showAll=t}set stickToPage(t){this._stickToPage=t}set zoom(t){t<=0||(this._zoom=t)}get zoom(){return this._zoom}set zoomScale(t){this._zoomScale=t}get zoomScale(){return this._zoomScale}set rotation(t){"number"==typeof t&&t%90==0?this._rotation=t:console.warn("Invalid pages rotation angle.")}set externalLinkTarget(t){this._externalLinkTarget=t}set autoresize(t){this._canAutoResize=Boolean(t)}set fitToPage(t){this._fitToPage=Boolean(t)}set showBorders(t){this._showBorders=Boolean(t)}static getLinkTarget(t){switch(t){case"blank":return Bs.LinkTarget.BLANK;case"none":return Bs.LinkTarget.NONE;case"self":return Bs.LinkTarget.SELF;case"parent":return Bs.LinkTarget.PARENT;case"top":return Bs.LinkTarget.TOP}return null}static setExternalLinkTarget(t){const e=zs.getLinkTarget(t);null!==e&&(Bs.externalLinkTarget=e)}ngAfterViewChecked(){if(this.isInitialized)return;const t=this.pdfViewerContainer.nativeElement.offsetParent;!0!==this.isVisible||null!=t?!1===this.isVisible&&null!=t&&(this.isVisible=!0,setTimeout(()=>{this.ngOnInit(),this.ngOnChanges({src:this.src})})):this.isVisible=!1}ngOnInit(){!$s()&&this.isVisible&&(this.isInitialized=!0,this.setupMultiPageViewer(),this.setupSinglePageViewer())}ngOnDestroy(){this.clear()}onPageResize(){this._canAutoResize&&this._pdf&&(this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{this.updateSize()},100))}get pdfLinkService(){return this._showAll?this.pdfMultiPageLinkService:this.pdfSinglePageLinkService}get pdfViewer(){return this.getCurrentViewer()}get pdfFindController(){return this._showAll?this.pdfMultiPageFindController:this.pdfSinglePageFindController}ngOnChanges(t){if(!$s()&&this.isVisible)if("src"in t)this.loadPDF();else if(this._pdf){if("renderText"in t?(this.getCurrentViewer().textLayerMode=this._renderText?this._renderTextMode:Hs.DISABLED,this.resetPdfDocument()):"showAll"in t&&this.resetPdfDocument(),"page"in t){if(t.page.currentValue===this._latestScrolledPage)return;this.getCurrentViewer().scrollPageIntoView({pageNumber:this._page})}this.update()}}updateSize(){const t=this.getCurrentViewer();this._pdf.getPage(t.currentPageNumber).then(e=>{const i=this._rotation||e.rotate,n=e.getViewport({scale:this._zoom,rotation:i}).width*zs.CSS_UNITS;let a=this._zoom,s=!0;if(!this._originalSize||this._fitToPage&&n>this.pdfViewerContainer.nativeElement.clientWidth){const t=e.getViewport({scale:1,rotation:i});a=this.getScale(t.width,t.height),s=!this._stickToPage}t._setScale(a,s)})}clear(){this.loadingTask&&!this.loadingTask.destroyed&&this.loadingTask.destroy(),this._pdf&&(this._pdf.destroy(),this._pdf=null,this.pdfMultiPageViewer.setDocument(null),this.pdfSinglePageViewer.setDocument(null),this.pdfMultiPageLinkService.setDocument(null,null),this.pdfSinglePageLinkService.setDocument(null,null),this.pdfMultiPageFindController.setDocument(null),this.pdfSinglePageFindController.setDocument(null))}setupMultiPageViewer(){Bs.disableTextLayer=!this._renderText,zs.setExternalLinkTarget(this._externalLinkTarget);const t=Ns(Us);t.on("pagerendered",t=>{this.pageRendered.emit(t)}),t.on("pagechanging",t=>{this.pageScrollTimeout&&clearTimeout(this.pageScrollTimeout),this.pageScrollTimeout=setTimeout(()=>{this._latestScrolledPage=t.pageNumber,this.pageChange.emit(t.pageNumber)},100)}),t.on("textlayerrendered",t=>{this.textLayerRendered.emit(t)}),this.pdfMultiPageLinkService=new Us.PDFLinkService({eventBus:t}),this.pdfMultiPageFindController=new Us.PDFFindController({linkService:this.pdfMultiPageLinkService,eventBus:t});const e={eventBus:t,container:this.element.nativeElement.querySelector("div"),removePageBorders:!this._showBorders,linkService:this.pdfMultiPageLinkService,textLayerMode:this._renderText?this._renderTextMode:Hs.DISABLED,findController:this.pdfMultiPageFindController};this.pdfMultiPageViewer=new Us.PDFViewer(e),this.pdfMultiPageLinkService.setViewer(this.pdfMultiPageViewer),this.pdfMultiPageFindController.setDocument(this._pdf)}setupSinglePageViewer(){Bs.disableTextLayer=!this._renderText,zs.setExternalLinkTarget(this._externalLinkTarget);const t=Ns(Us);t.on("pagechanging",t=>{t.pageNumber!=this._page&&(this.page=t.pageNumber)}),t.on("pagerendered",t=>{this.pageRendered.emit(t)}),t.on("textlayerrendered",t=>{this.textLayerRendered.emit(t)}),this.pdfSinglePageLinkService=new Us.PDFLinkService({eventBus:t}),this.pdfSinglePageFindController=new Us.PDFFindController({linkService:this.pdfSinglePageLinkService,eventBus:t});const e={eventBus:t,container:this.element.nativeElement.querySelector("div"),removePageBorders:!this._showBorders,linkService:this.pdfSinglePageLinkService,textLayerMode:this._renderText?this._renderTextMode:Hs.DISABLED,findController:this.pdfSinglePageFindController};this.pdfSinglePageViewer=new Us.PDFSinglePageViewer(e),this.pdfSinglePageLinkService.setViewer(this.pdfSinglePageViewer),this.pdfSinglePageFindController.setDocument(this._pdf),this.pdfSinglePageViewer._currentPageNumber=this._page}getValidPageNumber(t){return t<1?1:t>this._pdf.numPages?this._pdf.numPages:t}getDocumentParams(){const t=typeof this.src;if(!this._cMapsUrl)return this.src;const e={cMapUrl:this._cMapsUrl,cMapPacked:!0};return"string"===t?e.url=this.src:"object"===t&&(void 0!==this.src.byteLength?e.data=this.src:Object.assign(e,this.src)),e}loadPDF(){if(!this.src)return;if(this.lastLoaded===this.src)return void this.update();this.clear(),this.loadingTask=Bs.getDocument(this.getDocumentParams()),this.loadingTask.onProgress=t=>{this.onProgress.emit(t)};const t=this.src;this.loadingTask.promise.then(e=>{this._pdf=e,this.lastLoaded=t,this.afterLoadComplete.emit(e),this.pdfMultiPageViewer||(this.setupMultiPageViewer(),this.setupSinglePageViewer()),this.resetPdfDocument(),this.update()},t=>{this.onError.emit(t)})}update(){this.page=this._page,this.render()}render(){this._page=this.getValidPageNumber(this._page);const t=this.getCurrentViewer();0===this._rotation&&t.pagesRotation===this._rotation||setTimeout(()=>{t.pagesRotation=this._rotation}),this._stickToPage&&setTimeout(()=>{t.currentPageNumber=this._page}),this.updateSize()}getScale(t,e){const i=this._showBorders?2*zs.BORDER_WIDTH:0,n=this.pdfViewerContainer.nativeElement.clientWidth-i,a=this.pdfViewerContainer.nativeElement.clientHeight-i;if(0===a||0===e||0===n||0===t)return 1;let s=1;switch(this._zoomScale){case"page-fit":s=Math.min(a/e,n/t);break;case"page-height":s=a/e;break;case"page-width":default:s=n/t}return this._zoom*s/zs.CSS_UNITS}getCurrentViewer(){return this._showAll?this.pdfMultiPageViewer:this.pdfSinglePageViewer}resetPdfDocument(){this.pdfFindController.setDocument(this._pdf),this._showAll?(this.pdfSinglePageViewer.setDocument(null),this.pdfSinglePageLinkService.setDocument(null),this.pdfMultiPageViewer.setDocument(this._pdf),this.pdfMultiPageLinkService.setDocument(this._pdf,null)):(this.pdfMultiPageViewer.setDocument(null),this.pdfMultiPageLinkService.setDocument(null),this.pdfSinglePageViewer.setDocument(this._pdf),this.pdfSinglePageLinkService.setDocument(this._pdf,null))}};return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l))},t.\u0275cmp=n.Kb({type:t,selectors:[["pdf-viewer"]],viewQuery:function(t,e){var i;1&t&&n.Xc(Qs,!0),2&t&&n.yc(i=n.ec())&&(e.pdfViewerContainer=i.first)},hostBindings:function(t,e){1&t&&n.dc("resize",(function(){return e.onPageResize()}),!1,n.Cc)},inputs:{cMapsUrl:["c-maps-url","cMapsUrl"],page:"page",renderText:["render-text","renderText"],renderTextMode:["render-text-mode","renderTextMode"],originalSize:["original-size","originalSize"],showAll:["show-all","showAll"],stickToPage:["stick-to-page","stickToPage"],zoom:"zoom",zoomScale:["zoom-scale","zoomScale"],rotation:"rotation",externalLinkTarget:["external-link-target","externalLinkTarget"],autoresize:"autoresize",fitToPage:["fit-to-page","fitToPage"],showBorders:["show-borders","showBorders"],src:"src"},outputs:{afterLoadComplete:"after-load-complete",pageRendered:"page-rendered",textLayerRendered:"text-layer-rendered",onError:"error",onProgress:"on-progress",pageChange:"pageChange"},features:[n.Bb],decls:3,vars:0,consts:[[1,"ng2-pdf-viewer-container"],["pdfViewerContainer",""],[1,"pdfViewer"]],template:function(t,e){1&t&&(n.Wb(0,"div",0,1),n.Rb(2,"div",2),n.Vb())},styles:['.ng2-pdf-viewer-container[_ngcontent-%COMP%]{overflow-x:auto;position:relative;height:100%;-webkit-overflow-scrolling:touch}[_nghost-%COMP%] .textLayer{position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;opacity:.2;line-height:1}[_nghost-%COMP%] .textLayer>span{color:transparent;position:absolute;white-space:pre;cursor:text;-webkit-transform-origin:0 0;transform-origin:0 0}[_nghost-%COMP%] .textLayer .highlight{margin:-1px;padding:1px;background-color:#b400aa;border-radius:4px}[_nghost-%COMP%] .textLayer .highlight.begin{border-radius:4px 0 0 4px}[_nghost-%COMP%] .textLayer .highlight.end{border-radius:0 4px 4px 0}[_nghost-%COMP%] .textLayer .highlight.middle{border-radius:0}[_nghost-%COMP%] .textLayer .highlight.selected{background-color:#006400}[_nghost-%COMP%] .textLayer ::-moz-selection{background:#00f}[_nghost-%COMP%] .textLayer ::selection{background:#00f}[_nghost-%COMP%] .textLayer .endOfContent{display:block;position:absolute;left:0;top:100%;right:0;bottom:0;z-index:-1;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[_nghost-%COMP%] .textLayer .endOfContent.active{top:0}[_nghost-%COMP%] .annotationLayer section{position:absolute}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.pushButton>a, [_nghost-%COMP%] .annotationLayer .linkAnnotation>a{position:absolute;font-size:1em;top:0;left:0;width:100%;height:100%}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.pushButton>a:hover, [_nghost-%COMP%] .annotationLayer .linkAnnotation>a:hover{opacity:.2;background:#ff0;box-shadow:0 2px 10px #ff0}[_nghost-%COMP%] .annotationLayer .textAnnotation img{position:absolute;cursor:pointer}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input, [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation textarea{background-color:rgba(0,54,255,.13);border:1px solid transparent;box-sizing:border-box;font-size:9px;height:100%;margin:0;padding:0 3px;vertical-align:top;width:100%}[_nghost-%COMP%] .annotationLayer .choiceWidgetAnnotation select{background-color:rgba(0,54,255,.13);border:1px solid transparent;box-sizing:border-box;font-size:9px;height:100%;margin:0;padding:0 3px;vertical-align:top;width:100%}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input{background-color:rgba(0,54,255,.13);border:1px solid transparent;box-sizing:border-box;font-size:9px;height:100%;margin:0;vertical-align:top;width:100%}[_nghost-%COMP%] .annotationLayer .choiceWidgetAnnotation select option{padding:0}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input{border-radius:50%}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation textarea{font:message-box;font-size:9px;resize:none}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input[disabled], [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation textarea[disabled]{background:0 0;border:1px solid transparent;cursor:not-allowed}[_nghost-%COMP%] .annotationLayer .choiceWidgetAnnotation select[disabled]{background:0 0;border:1px solid transparent;cursor:not-allowed}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input[disabled], [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input[disabled]{background:0 0;border:1px solid transparent;cursor:not-allowed}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input:hover, [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation textarea:hover{border:1px solid #000}[_nghost-%COMP%] .annotationLayer .choiceWidgetAnnotation select:hover{border:1px solid #000}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:hover, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input:hover{border:1px solid #000}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input:focus, [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation textarea:focus{background:0 0;border:1px solid transparent}[_nghost-%COMP%] .annotationLayer .choiceWidgetAnnotation select:focus{background:0 0;border:1px solid transparent}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before{background-color:#000;content:"";display:block;position:absolute;height:80%;left:45%;width:1px}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{background-color:#000;content:"";display:block;position:absolute;border-radius:50%;height:50%;left:30%;top:20%;width:50%}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before{-webkit-transform:rotate(45deg);transform:rotate(45deg)}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input.comb{font-family:monospace;padding-left:2px;padding-right:0}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input.comb:focus{width:115%}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0}[_nghost-%COMP%] .annotationLayer .popupWrapper{position:absolute;width:20em}[_nghost-%COMP%] .annotationLayer .popup{position:absolute;z-index:200;max-width:20em;background-color:#ff9;box-shadow:0 2px 5px #888;border-radius:2px;padding:6px;margin-left:5px;cursor:pointer;font:message-box;font-size:9px;word-wrap:break-word}[_nghost-%COMP%] .annotationLayer .popup>*{font-size:9px}[_nghost-%COMP%] .annotationLayer .popup h1{display:inline-block}[_nghost-%COMP%] .annotationLayer .popup span{display:inline-block;margin-left:5px}[_nghost-%COMP%] .annotationLayer .popup p{border-top:1px solid #333;margin-top:2px;padding-top:2px}[_nghost-%COMP%] .annotationLayer .caretAnnotation, [_nghost-%COMP%] .annotationLayer .circleAnnotation svg ellipse, [_nghost-%COMP%] .annotationLayer .fileAttachmentAnnotation, [_nghost-%COMP%] .annotationLayer .freeTextAnnotation, [_nghost-%COMP%] .annotationLayer .highlightAnnotation, [_nghost-%COMP%] .annotationLayer .inkAnnotation svg polyline, [_nghost-%COMP%] .annotationLayer .lineAnnotation svg line, [_nghost-%COMP%] .annotationLayer .polygonAnnotation svg polygon, [_nghost-%COMP%] .annotationLayer .polylineAnnotation svg polyline, [_nghost-%COMP%] .annotationLayer .squareAnnotation svg rect, [_nghost-%COMP%] .annotationLayer .squigglyAnnotation, [_nghost-%COMP%] .annotationLayer .stampAnnotation, [_nghost-%COMP%] .annotationLayer .strikeoutAnnotation, [_nghost-%COMP%] .annotationLayer .underlineAnnotation{cursor:pointer}[_nghost-%COMP%] .pdfViewer{padding-bottom:10px}[_nghost-%COMP%] .pdfViewer .canvasWrapper{overflow:hidden}[_nghost-%COMP%] .pdfViewer .page{direction:ltr;width:816px;height:1056px;margin:1px auto -8px;position:relative;overflow:visible;border:9px solid rgba(0,0,0,.01);box-sizing:initial;background-clip:content-box;-webkit-border-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAA6UlEQVR4Xl2Pi2rEMAwE16fm1f7/r14v7w4rI0IzLAF7hLxNevBSEMEF5+OilNCsRd8ZMyn+a4NmsOT8WJw1lFbSYgGFzF2bLFoLjTClWjKKGRWpDYAGXUnZ4uhbBUzF3Oe/GG/ue2fn4GgsyXhNgysV2JnrhKEMg4fEZcALmiKbNhBBRFpSyDOj1G4QOVly6O1FV54ZZq8OVygrciDt6JazRgi1ljTPH0gbrPmHPXAbCiDd4GawIjip1TPh9tt2sz24qaCjr/jAb/GBFTbq9KZ7Ke/Cqt8nayUikZKsWZK7Fe6bg5dOUt8fZHWG2BHc+6EAAAAASUVORK5CYII=) 9 9 repeat;-o-border-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAA6UlEQVR4Xl2Pi2rEMAwE16fm1f7/r14v7w4rI0IzLAF7hLxNevBSEMEF5+OilNCsRd8ZMyn+a4NmsOT8WJw1lFbSYgGFzF2bLFoLjTClWjKKGRWpDYAGXUnZ4uhbBUzF3Oe/GG/ue2fn4GgsyXhNgysV2JnrhKEMg4fEZcALmiKbNhBBRFpSyDOj1G4QOVly6O1FV54ZZq8OVygrciDt6JazRgi1ljTPH0gbrPmHPXAbCiDd4GawIjip1TPh9tt2sz24qaCjr/jAb/GBFTbq9KZ7Ke/Cqt8nayUikZKsWZK7Fe6bg5dOUt8fZHWG2BHc+6EAAAAASUVORK5CYII=) 9 9 repeat;border-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAA6UlEQVR4Xl2Pi2rEMAwE16fm1f7/r14v7w4rI0IzLAF7hLxNevBSEMEF5+OilNCsRd8ZMyn+a4NmsOT8WJw1lFbSYgGFzF2bLFoLjTClWjKKGRWpDYAGXUnZ4uhbBUzF3Oe/GG/ue2fn4GgsyXhNgysV2JnrhKEMg4fEZcALmiKbNhBBRFpSyDOj1G4QOVly6O1FV54ZZq8OVygrciDt6JazRgi1ljTPH0gbrPmHPXAbCiDd4GawIjip1TPh9tt2sz24qaCjr/jAb/GBFTbq9KZ7Ke/Cqt8nayUikZKsWZK7Fe6bg5dOUt8fZHWG2BHc+6EAAAAASUVORK5CYII=) 9 9 repeat;background-color:#fff}[_nghost-%COMP%] .pdfViewer.removePageBorders .page{margin:0 auto 10px;border:none}[_nghost-%COMP%] .pdfViewer.removePageBorders{padding-bottom:0}[_nghost-%COMP%] .pdfViewer.singlePageView{display:inline-block}[_nghost-%COMP%] .pdfViewer.singlePageView .page{margin:0;border:none}[_nghost-%COMP%] .pdfViewer.scrollHorizontal, [_nghost-%COMP%] .pdfViewer.scrollWrapped{margin-left:3.5px;margin-right:3.5px;text-align:center}[_nghost-%COMP%] .spread{margin-left:3.5px;margin-right:3.5px;text-align:center}[_nghost-%COMP%] .pdfViewer.scrollHorizontal, [_nghost-%COMP%] .spread{white-space:nowrap}[_nghost-%COMP%] .pdfViewer.removePageBorders, [_nghost-%COMP%] .pdfViewer.scrollHorizontal .spread, [_nghost-%COMP%] .pdfViewer.scrollWrapped .spread{margin-left:0;margin-right:0}[_nghost-%COMP%] .spread .page{display:inline-block;vertical-align:middle;margin-left:-3.5px;margin-right:-3.5px}[_nghost-%COMP%] .pdfViewer.scrollHorizontal .page, [_nghost-%COMP%] .pdfViewer.scrollHorizontal .spread, [_nghost-%COMP%] .pdfViewer.scrollWrapped .page, [_nghost-%COMP%] .pdfViewer.scrollWrapped .spread{display:inline-block;vertical-align:middle}[_nghost-%COMP%] .pdfViewer.scrollHorizontal .page, [_nghost-%COMP%] .pdfViewer.scrollWrapped .page{margin-left:-3.5px;margin-right:-3.5px}[_nghost-%COMP%] .pdfViewer.removePageBorders .spread .page, [_nghost-%COMP%] .pdfViewer.removePageBorders.scrollHorizontal .page, [_nghost-%COMP%] .pdfViewer.removePageBorders.scrollWrapped .page{margin-left:5px;margin-right:5px}[_nghost-%COMP%] .pdfViewer .page canvas{margin:0;display:block}[_nghost-%COMP%] .pdfViewer .page canvas[hidden]{display:none}[_nghost-%COMP%] .pdfViewer .page .loadingIcon{position:absolute;display:block;left:0;top:0;right:0;bottom:0;background:url(data:image/gif;base64,R0lGODlhGAAYAPQAAP///wAAAM7Ozvr6+uDg4LCwsOjo6I6OjsjIyJycnNjY2KioqMDAwPLy8nZ2doaGhri4uGhoaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJBwAAACwAAAAAGAAYAAAFriAgjiQAQWVaDgr5POSgkoTDjFE0NoQ8iw8HQZQTDQjDn4jhSABhAAOhoTqSDg7qSUQwxEaEwwFhXHhHgzOA1xshxAnfTzotGRaHglJqkJcaVEqCgyoCBQkJBQKDDXQGDYaIioyOgYSXA36XIgYMBWRzXZoKBQUMmil0lgalLSIClgBpO0g+s26nUWddXyoEDIsACq5SsTMMDIECwUdJPw0Mzsu0qHYkw72bBmozIQAh+QQJBwAAACwAAAAAGAAYAAAFsCAgjiTAMGVaDgR5HKQwqKNxIKPjjFCk0KNXC6ATKSI7oAhxWIhezwhENTCQEoeGCdWIPEgzESGxEIgGBWstEW4QCGGAIJEoxGmGt5ZkgCRQQHkGd2CESoeIIwoMBQUMP4cNeQQGDYuNj4iSb5WJnmeGng0CDGaBlIQEJziHk3sABidDAHBgagButSKvAAoyuHuUYHgCkAZqebw0AgLBQyyzNKO3byNuoSS8x8OfwIchACH5BAkHAAAALAAAAAAYABgAAAW4ICCOJIAgZVoOBJkkpDKoo5EI43GMjNPSokXCINKJCI4HcCRIQEQvqIOhGhBHhUTDhGo4diOZyFAoKEQDxra2mAEgjghOpCgz3LTBIxJ5kgwMBShACREHZ1V4Kg1rS44pBAgMDAg/Sw0GBAQGDZGTlY+YmpyPpSQDiqYiDQoCliqZBqkGAgKIS5kEjQ21VwCyp76dBHiNvz+MR74AqSOdVwbQuo+abppo10ssjdkAnc0rf8vgl8YqIQAh+QQJBwAAACwAAAAAGAAYAAAFrCAgjiQgCGVaDgZZFCQxqKNRKGOSjMjR0qLXTyciHA7AkaLACMIAiwOC1iAxCrMToHHYjWQiA4NBEA0Q1RpWxHg4cMXxNDk4OBxNUkPAQAEXDgllKgMzQA1pSYopBgonCj9JEA8REQ8QjY+RQJOVl4ugoYssBJuMpYYjDQSliwasiQOwNakALKqsqbWvIohFm7V6rQAGP6+JQLlFg7KDQLKJrLjBKbvAor3IKiEAIfkECQcAAAAsAAAAABgAGAAABbUgII4koChlmhokw5DEoI4NQ4xFMQoJO4uuhignMiQWvxGBIQC+AJBEUyUcIRiyE6CR0CllW4HABxBURTUw4nC4FcWo5CDBRpQaCoF7VjgsyCUDYDMNZ0mHdwYEBAaGMwwHDg4HDA2KjI4qkJKUiJ6faJkiA4qAKQkRB3E0i6YpAw8RERAjA4tnBoMApCMQDhFTuySKoSKMJAq6rD4GzASiJYtgi6PUcs9Kew0xh7rNJMqIhYchACH5BAkHAAAALAAAAAAYABgAAAW0ICCOJEAQZZo2JIKQxqCOjWCMDDMqxT2LAgELkBMZCoXfyCBQiFwiRsGpku0EshNgUNAtrYPT0GQVNRBWwSKBMp98P24iISgNDAS4ipGA6JUpA2WAhDR4eWM/CAkHBwkIDYcGiTOLjY+FmZkNlCN3eUoLDmwlDW+AAwcODl5bYl8wCVYMDw5UWzBtnAANEQ8kBIM0oAAGPgcREIQnVloAChEOqARjzgAQEbczg8YkWJq8nSUhACH5BAkHAAAALAAAAAAYABgAAAWtICCOJGAYZZoOpKKQqDoORDMKwkgwtiwSBBYAJ2owGL5RgxBziQQMgkwoMkhNqAEDARPSaiMDFdDIiRSFQowMXE8Z6RdpYHWnEAWGPVkajPmARVZMPUkCBQkJBQINgwaFPoeJi4GVlQ2Qc3VJBQcLV0ptfAMJBwdcIl+FYjALQgimoGNWIhAQZA4HXSpLMQ8PIgkOSHxAQhERPw7ASTSFyCMMDqBTJL8tf3y2fCEAIfkECQcAAAAsAAAAABgAGAAABa8gII4k0DRlmg6kYZCoOg5EDBDEaAi2jLO3nEkgkMEIL4BLpBAkVy3hCTAQKGAznM0AFNFGBAbj2cA9jQixcGZAGgECBu/9HnTp+FGjjezJFAwFBQwKe2Z+KoCChHmNjVMqA21nKQwJEJRlbnUFCQlFXlpeCWcGBUACCwlrdw8RKGImBwktdyMQEQciB7oACwcIeA4RVwAODiIGvHQKERAjxyMIB5QlVSTLYLZ0sW8hACH5BAkHAAAALAAAAAAYABgAAAW0ICCOJNA0ZZoOpGGQrDoOBCoSxNgQsQzgMZyIlvOJdi+AS2SoyXrK4umWPM5wNiV0UDUIBNkdoepTfMkA7thIECiyRtUAGq8fm2O4jIBgMBA1eAZ6Knx+gHaJR4QwdCMKBxEJRggFDGgQEREPjjAMBQUKIwIRDhBDC2QNDDEKoEkDoiMHDigICGkJBS2dDA6TAAnAEAkCdQ8ORQcHTAkLcQQODLPMIgIJaCWxJMIkPIoAt3EhACH5BAkHAAAALAAAAAAYABgAAAWtICCOJNA0ZZoOpGGQrDoOBCoSxNgQsQzgMZyIlvOJdi+AS2SoyXrK4umWHM5wNiV0UN3xdLiqr+mENcWpM9TIbrsBkEck8oC0DQqBQGGIz+t3eXtob0ZTPgNrIwQJDgtGAgwCWSIMDg4HiiUIDAxFAAoODwxDBWINCEGdSTQkCQcoegADBaQ6MggHjwAFBZUFCm0HB0kJCUy9bAYHCCPGIwqmRq0jySMGmj6yRiEAIfkECQcAAAAsAAAAABgAGAAABbIgII4k0DRlmg6kYZCsOg4EKhLE2BCxDOAxnIiW84l2L4BLZKipBopW8XRLDkeCiAMyMvQAA+uON4JEIo+vqukkKQ6RhLHplVGN+LyKcXA4Dgx5DWwGDXx+gIKENnqNdzIDaiMECwcFRgQCCowiCAcHCZIlCgICVgSfCEMMnA0CXaU2YSQFoQAKUQMMqjoyAglcAAyBAAIMRUYLCUkFlybDeAYJryLNk6xGNCTQXY0juHghACH5BAkHAAAALAAAAAAYABgAAAWzICCOJNA0ZVoOAmkY5KCSSgSNBDE2hDyLjohClBMNij8RJHIQvZwEVOpIekRQJyJs5AMoHA+GMbE1lnm9EcPhOHRnhpwUl3AsknHDm5RN+v8qCAkHBwkIfw1xBAYNgoSGiIqMgJQifZUjBhAJYj95ewIJCQV7KYpzBAkLLQADCHOtOpY5PgNlAAykAEUsQ1wzCgWdCIdeArczBQVbDJ0NAqyeBb64nQAGArBTt8R8mLuyPyEAOwAAAAAAAAAAAA==) center no-repeat}[_nghost-%COMP%] .pdfPresentationMode .pdfViewer{margin-left:0;margin-right:0}[_nghost-%COMP%] .pdfPresentationMode .pdfViewer .page, [_nghost-%COMP%] .pdfPresentationMode .pdfViewer .spread{display:block}[_nghost-%COMP%] .pdfPresentationMode .pdfViewer .page, [_nghost-%COMP%] .pdfPresentationMode .pdfViewer.removePageBorders .page{margin-left:auto;margin-right:auto}[_nghost-%COMP%] .pdfPresentationMode:-ms-fullscreen .pdfViewer .page{margin-bottom:100%!important}[_nghost-%COMP%] .pdfPresentationMode:-webkit-full-screen .pdfViewer .page{margin-bottom:100%;border:0}[_nghost-%COMP%] .pdfPresentationMode:-moz-full-screen .pdfViewer .page, [_nghost-%COMP%] .pdfPresentationMode:-webkit-full-screen .pdfViewer .page, [_nghost-%COMP%] .pdfPresentationMode:fullscreen .pdfViewer .page{margin-bottom:100%;border:0}']}),t.CSS_UNITS=96/72,t.BORDER_WIDTH=9,t})(),Xs=(()=>{let t=class{};return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)}}),t})();const qs=["snav"],Ks=["snav2"];function Ys(t,e){if(1&t&&(n.Wb(0,"mat-option",25),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",n.jc(2,2,"lang."+t)," ")}}function Js(t,e){if(1&t&&(n.Wb(0,"mat-option",25),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",n.jc(2,2,"lang."+t)," ")}}function Zs(t,e){1&t&&(n.Wb(0,"div",26),n.Rb(1,"mat-spinner"),n.Vb())}const to=function(t){return{width:t}};let eo=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.entities=[],this.entitiesChosen=[],this.loading=!1,this.docUrl="",this.docData="",this.docBuffer=null,this.separatorTypes=["barcode","qrcode"],this.separatorTargets=["entities","generic"],this.separator={type:"qrcode",target:"entities",entities:[]},window.pdfWorkerSrc="pdfjs/pdf.worker.min.js"}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.printSeparators")),this.http.get("../rest/entities").subscribe(t=>{this.entities=t.entities,this.entities.forEach(t=>{t.state.disabled=!1}),this.loadEntities()},t=>{this.notify.handleErrors(t)})}loadEntities(){setTimeout(()=>{$("#jstree").on("select_node.jstree",(t,e)=>{this.separator.entities=$("#jstree").jstree("get_checked",null,!0)}).on("deselect_node.jstree",(t,e)=>{this.separator.entities=$("#jstree").jstree("get_checked",null,!0)}).jstree({checkbox:{three_state:!1},core:{force_text:!0,themes:{name:"proton",responsive:!0},data:this.entities},plugins:["checkbox","search","sort"]});let t=!1;$("#jstree_search").keyup((function(){t&&clearTimeout(t),t=setTimeout((function(){const t=$("#jstree_search").val();$("#jstree").jstree(!0).search(t)}),250)})),$("#jstree").jstree()},0)}generateSeparators(){this.loading=!0,this.separator.entities=$("#jstree").jstree("get_checked",null,!0),this.http.post("../rest/entitySeparators",this.separator).subscribe(t=>{this.docData=t,this.docBuffer=this.base64ToArrayBuffer(this.docData),this.downloadSeparators(),this.loading=!1},t=>{this.notify.handleErrors(t)})}base64ToArrayBuffer(t){const e=window.atob(t),i=e.length,n=new Uint8Array(i);for(let a=0;a<i;a++)n[a]=e.charCodeAt(a);return n.buffer}changeType(t){this.docBuffer=null,"entities"===t.value?(this.entities.forEach(t=>{t.state.disabled=!1}),$("#jstree").jstree(!0).settings.core.data=this.entities,$("#jstree").jstree("deselect_all"),$("#jstree").jstree("refresh")):(this.entities.forEach(t=>{t.state.disabled=!0}),$("#jstree").jstree(!0).settings.core.data=this.entities,$("#jstree").jstree("deselect_all"),$("#jstree").jstree("refresh"))}downloadSeparators(){const t=document.createElement("a");document.body.appendChild(t),t.style.display="none";const e="data:application/pdf;base64,"+this.docData;let i,n,a,s;t.href=e,i=new Date,n=i.getDate(),a=i.getMonth()+1,s=i.getFullYear(),n<10&&(n="0"+n),a<10&&(a="0"+a),i=n+"-"+a+"-"+s,t.download=this.translate.instant("lang.separators")+"_"+i+".pdf",t.click(),window.URL.revokeObjectURL(e)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(qs,!0),n.Kc(Ks,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavLeft=i.first),n.yc(i=n.ec())&&(e.sidenavRight=i.first))},decls:49,vars:44,consts:[[1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],[2,"height","90%","overflow","auto","position","absolute","width","100%"],["role","alert",1,"alert-message","alert-message-info",2,"max-width","100%","margin","30px",3,"innerHTML"],[1,"col-md-12"],[1,"col-md-6"],[3,"ngModel","ngModelChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["matInput","","id","jstree_search","name","jstree_search","type","text",3,"placeholder"],["id","jstree"],[1,"col-md-12","text-center",2,"bottom","0px","padding-top","10px","position","absolute","height","10%","width","100%"],["mat-raised-button","","color","primary",3,"disabled","click"],[1,"table-head"],["position","end","autoFocus","false",1,"panel-right",2,"overflow-x","hidden",3,"fixedInViewport","opened","mode","ngStyle"],["snav2",""],["class","example-loading-shade",4,"ngIf"],[1,"titlePanel"],["color","primary",2,"flex","1","font-size","20px","font-weight","bold","padding","10px"],[1,"viewSep",3,"src","render-text","autoresize","original-size","show-all"],[3,"value"],[1,"example-loading-shade"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Wb(11,"div",8),n.Rb(12,"div",9),n.ic(13,"translate"),n.Wb(14,"div",10),n.Wb(15,"div",11),n.Wb(16,"mat-form-field"),n.Wb(17,"mat-label"),n.Qc(18),n.ic(19,"translate"),n.Vb(),n.Wb(20,"mat-select",12),n.dc("ngModelChange",(function(t){return e.separator.type=t}))("selectionChange",(function(){return e.docBuffer=null})),n.Oc(21,Ys,3,4,"mat-option",13),n.Vb(),n.Vb(),n.Vb(),n.Wb(22,"div",11),n.Wb(23,"mat-form-field"),n.Wb(24,"mat-label"),n.Qc(25),n.ic(26,"translate"),n.Vb(),n.Wb(27,"mat-select",12),n.dc("ngModelChange",(function(t){return e.separator.target=t}))("selectionChange",(function(t){return e.changeType(t)})),n.Oc(28,Js,3,4,"mat-option",13),n.Vb(),n.Vb(),n.Vb(),n.Wb(29,"mat-form-field"),n.Rb(30,"input",14),n.ic(31,"translate"),n.Wb(32,"mat-hint"),n.Qc(33),n.ic(34,"translate"),n.Vb(),n.Vb(),n.Rb(35,"div",15),n.Vb(),n.Vb(),n.Wb(36,"div",16),n.Wb(37,"button",17),n.dc("click",(function(){return e.generateSeparators()})),n.Qc(38),n.ic(39,"translate"),n.Vb(),n.Vb(),n.Rb(40,"div",18),n.Vb(),n.Vb(),n.Vb(),n.Wb(41,"mat-sidenav",19,20),n.Oc(43,Zs,2,0,"div",21),n.Wb(44,"div",22),n.Wb(45,"span",23),n.Qc(46),n.ic(47,"translate"),n.Vb(),n.Vb(),n.Rb(48,"pdf-viewer",24),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(3),n.oc("innerHTML",n.jc(13,28,"lang.printSeparatorInfo"),n.Ec),n.Db(6),n.Rc(n.jc(19,30,"lang.separatorType")),n.Db(2),n.oc("ngModel",e.separator.type),n.Db(1),n.oc("ngForOf",e.separatorTypes),n.Db(4),n.Rc(n.jc(26,32,"lang.separatorTarget")),n.Db(2),n.oc("ngModel",e.separator.target),n.Db(1),n.oc("ngForOf",e.separatorTargets),n.Db(2),n.pc("placeholder",n.jc(31,34,"lang.searchEntities")),n.Db(3),n.Rc(n.jc(34,36,"lang.entityTreeInfoSeparator")),n.Db(4),n.oc("disabled",e.loading||"entities"==e.separator.target&&0==e.separator.entities.length),n.Db(1),n.Rc(n.jc(39,38,"lang.generateAndDownload")),n.Db(3),n.oc("fixedInViewport",e.appService.getViewMode())("opened",!e.appService.getViewMode()&&null!=e.docBuffer)("mode",e.appService.getViewMode()?"over":"side")("ngStyle",n.vc(42,to,e.appService.getViewMode()?"80%":"30%")),n.Db(2),n.oc("ngIf",e.loading),n.Db(3),n.Rc(n.jc(47,40,"lang.separators")),n.Db(2),n.oc("src",e.docBuffer)("render-text",!1)("autoresize",!0)("original-size",!1)("show-all",!0))},directives:[I.e,I.f,Ot,We,Y.c,Y.g,ee.a,X.u,X.x,P.s,J.b,Y.f,k.b,I.d,P.w,P.t,Gs,W.p,V.c],pipes:[g.d],styles:[".panel-right[_ngcontent-%COMP%] .mat-drawer-inner-container{display:flex;flex-direction:column}.panel-right[_ngcontent-%COMP%] .titlePanel[_ngcontent-%COMP%]{display:flex;align-items:center}.panel-right[_ngcontent-%COMP%] .viewSep[_ngcontent-%COMP%]{flex:1;display:flex;overflow:auto}"]}),t})(),io=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.router=i,this.notificationService=n,this.headerService=a,this.loadingForm=!1,this.loading=!1,this.newLogin={login:""},this.labelButton=this.translate.instant("lang.send")}ngOnInit(){this.headerService.hideSideBar=!0}generateLink(){this.labelButton=this.translate.instant("lang.generation"),this.loading=!0,this.http.post("../rest/password",{login:this.newLogin.login}).pipe(Object(Xt.a)(()=>{this.labelButton=this.translate.instant("lang.send"),this.loading=!1})).subscribe(t=>{this.loadingForm=!0,this.notificationService.success(this.translate.instant("lang.requestSentByEmail")),this.router.navigate(["/login"])},t=>{this.notificationService.handleErrors(t)})}cancel(){this.router.navigate(["/login"])}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:14,vars:12,consts:[[1,"login-content"],["svgIcon","maarchLogoWhiteFull",1,"maarchLogo"],[1,"login-form"],[3,"ngSubmit"],[1,"alert-message","alert-message-info",3,"innerHTML"],[1,"input-row"],["name","login","matInput","","type","text","oninput","this.value = this.value.toLowerCase()",3,"placeholder","ngModel","ngModelChange"],["type","submit","mat-button","",3,"disabled"],["type","button","mat-button","",3,"click"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Rb(1,"mat-icon",1),n.Wb(2,"mat-card",2),n.Wb(3,"form",3),n.dc("ngSubmit",(function(){return e.generateLink()})),n.Rb(4,"div",4),n.ic(5,"translate"),n.Wb(6,"mat-form-field",5),n.Wb(7,"input",6),n.dc("ngModelChange",(function(t){return e.newLogin.login=t})),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Wb(9,"button",7),n.Qc(10),n.Vb(),n.Wb(11,"button",8),n.dc("click",(function(){return e.cancel()})),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(4),n.oc("innerHTML",n.jc(5,6,"lang.afterClickingSendLinkChangePassword"),n.Ec),n.Db(3),n.pc("placeholder",n.jc(8,8,"lang.enterLogin")),n.oc("ngModel",e.newLogin.login),n.Db(2),n.oc("disabled",""==e.newLogin.login||e.loading),n.Db(1),n.Rc(e.labelButton),n.Db(2),n.Rc(n.jc(13,10,"lang.cancel")))},directives:[S.a,K.a,X.K,X.v,X.w,Y.c,J.b,X.d,X.u,X.x,k.b],pipes:[g.d],styles:[".login-content[_ngcontent-%COMP%]{background-color:#135f7f;height:100vh;width:100vw;display:flex;flex-direction:column;justify-content:center;align-items:center}.login-form[_ngcontent-%COMP%]{max-width:600px;text-align:center}.input-row[_ngcontent-%COMP%]{width:100%;padding-top:10px;padding-bottom:10px}.maarchLogo[_ngcontent-%COMP%]{position:absolute;transition:all 1s ease-in-out;width:250px;height:auto;padding-bottom:10px;transform:translateY(-200px)}footer[_ngcontent-%COMP%]{color:#fff;position:absolute;bottom:5px;font-size:10px;opacity:.5}"]}),t})();function no(t,e){1&t&&(n.Wb(0,"mat-hint",8),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.passwordNotMatch"),""))}function ao(t,e){1&t&&(n.Wb(0,"mat-hint",14),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.passwordMatch"),""))}const so=function(t){return[t]};let oo=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.router=e,this.route=i,this.http=n,this.notificationService=a,this.authService=s,this.loadingForm=!1,this.loading=!1,this.token="",this.password={newPassword:"",passwordConfirmation:""},this.labelButton=this.translate.instant("lang.update"),this.hideNewPassword=!0,this.hideNewPasswordConfirm=!0,this.passwordRules={minLength:{enabled:!1,value:0},complexityUpper:{enabled:!1,value:0},complexityNumber:{enabled:!1,value:0},complexitySpecial:{enabled:!1,value:0},renewal:{enabled:!1,value:0},historyLastUse:{enabled:!1,value:0}},this.handlePassword={error:!1,errorMsg:""},this.ruleText="",this.otherRuleText="",this.route.queryParams.subscribe(t=>{this.token=t.token})}ngOnInit(){this.getPassRules()}updatePassword(){this.labelButton=this.translate.instant("lang.emailSendInProgress"),this.loading=!0,this.http.put("../rest/password",{token:this.token,password:this.password.newPassword}).pipe(Object(Xt.a)(()=>{this.labelButton=this.translate.instant("lang.update"),this.loading=!1})).subscribe(t=>{this.loadingForm=!0,this.notificationService.success(this.translate.instant("lang.passwordChanged")),this.router.navigate(["/login"])},t=>{this.notificationService.handleSoftErrors(t)})}checkPasswordValidity(t){this.handlePassword.error=!0,!t.match(/[A-Z]/g)&&this.passwordRules.complexityUpper.enabled?this.handlePassword.errorMsg=this.translate.instant("lang.passwordcomplexityUpperRequired"):!t.match(/[0-9]/g)&&this.passwordRules.complexityNumber.enabled?this.handlePassword.errorMsg=this.translate.instant("lang.passwordcomplexityNumberRequired"):!t.match(/[^A-Za-z0-9]/g)&&this.passwordRules.complexitySpecial.enabled?this.handlePassword.errorMsg=this.translate.instant("lang.passwordcomplexitySpecialRequired"):t.length<this.passwordRules.minLength.value&&this.passwordRules.minLength.enabled?this.handlePassword.errorMsg=this.passwordRules.minLength.value+" "+this.translate.instant("lang.passwordminLength")+" !":(this.handlePassword.error=!1,this.handlePassword.errorMsg="")}getPassRules(){this.handlePassword.error=!1,this.handlePassword.errorMsg="",this.http.get("../rest/passwordRules").subscribe(t=>{const e=[],i=[];t.rules.forEach(t=>{"minLength"===t.label?(this.passwordRules.minLength.enabled=t.enabled,this.passwordRules.minLength.value=t.value,t.enabled&&e.push(t.value+" "+this.translate.instant("lang.password"+t.label))):"complexityUpper"===t.label?(this.passwordRules.complexityUpper.enabled=t.enabled,this.passwordRules.complexityUpper.value=t.value,t.enabled&&e.push(this.translate.instant("lang.password"+t.label))):"complexityNumber"===t.label?(this.passwordRules.complexityNumber.enabled=t.enabled,this.passwordRules.complexityNumber.value=t.value,t.enabled&&e.push(this.translate.instant("lang.password"+t.label))):"complexitySpecial"===t.label?(this.passwordRules.complexitySpecial.enabled=t.enabled,this.passwordRules.complexitySpecial.value=t.value,t.enabled&&e.push(this.translate.instant("lang.password"+t.label))):"renewal"===t.label?(this.passwordRules.renewal.enabled=t.enabled,this.passwordRules.renewal.value=t.value,t.enabled&&i.push(this.translate.instant("lang.password"+t.label)+" <b>"+t.value+" "+this.translate.instant("lang.days")+"</b>. "+this.translate.instant("lang.password2"+t.label)+".")):"historyLastUse"===t.label&&(this.passwordRules.historyLastUse.enabled=t.enabled,this.passwordRules.historyLastUse.value=t.value,t.enabled&&i.push(this.translate.instant("lang.passwordhistoryLastUseDesc")+" <b>"+t.value+"</b> "+this.translate.instant("lang.passwordhistoryLastUseDesc2")+"."))}),this.ruleText=e.join(", "),this.otherRuleText=i.join("<br/>")},t=>{this.notificationService.handleErrors(t)})}allowValidate(){return!(!this.handlePassword.error&&this.password.newPassword===this.password.passwordConfirmation&&0!==this.password.newPassword.length&&0!==this.password.passwordConfirmation.length)}cancel(){this.router.navigate(["/login"])}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(o.c),n.Qb(o.a),n.Qb(v.b),n.Qb(D.a),n.Qb(_.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:24,vars:27,consts:[[1,"login-content"],["svgIcon","maarchLogoWhiteFull",1,"maarchLogo"],[1,"login-form"],[3,"ngSubmit"],["role","alert",1,"alert-message","alert-message-info"],[1,"input-row"],["name","newPassword","matInput","",3,"ngModel","placeholder","type","ngModelChange","keyup"],["matSuffix","",1,"fa","fa-2x",3,"ngClass","click"],[2,"color","red"],["name","passwordConfirmation","matInput","",3,"ngModel","placeholder","type","ngModelChange"],["style","color:red;",4,"ngIf"],["style","color:green;",4,"ngIf"],["type","submit","mat-button","",3,"disabled"],["type","button","mat-button","",3,"click"],[2,"color","green"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Rb(1,"mat-icon",1),n.Wb(2,"mat-card",2),n.Wb(3,"form",3),n.dc("ngSubmit",(function(){return e.updatePassword()})),n.Wb(4,"div",4),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Wb(7,"mat-form-field",5),n.Wb(8,"input",6),n.dc("ngModelChange",(function(t){return e.password.newPassword=t}))("keyup",(function(){return e.checkPasswordValidity(e.password.newPassword)})),n.ic(9,"translate"),n.Vb(),n.Wb(10,"mat-icon",7),n.dc("click",(function(){return e.hideNewPassword=!e.hideNewPassword})),n.Vb(),n.Wb(11,"mat-hint",8),n.Qc(12),n.Vb(),n.Vb(),n.Wb(13,"mat-form-field",5),n.Wb(14,"input",9),n.dc("ngModelChange",(function(t){return e.password.passwordConfirmation=t})),n.ic(15,"translate"),n.Vb(),n.Wb(16,"mat-icon",7),n.dc("click",(function(){return e.hideNewPasswordConfirm=!e.hideNewPasswordConfirm})),n.Vb(),n.Oc(17,no,3,3,"mat-hint",10),n.Oc(18,ao,3,3,"mat-hint",11),n.Vb(),n.Wb(19,"button",12),n.Qc(20),n.Vb(),n.Wb(21,"button",13),n.dc("click",(function(){return e.cancel()})),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Sc(" ",n.jc(6,15,"lang.logInOncePasswordChanged")," "),n.Db(3),n.pc("placeholder",n.jc(9,17,"lang.typeNewPassword")),n.oc("ngModel",e.password.newPassword)("type",e.hideNewPassword?"password":"text"),n.Db(2),n.oc("ngClass",n.vc(23,so,e.hideNewPassword?"fa-eye-slash":"fa-eye")),n.Db(2),n.Rc(e.handlePassword.errorMsg),n.Db(2),n.pc("placeholder",n.jc(15,19,"lang.retypeNewPassword")),n.oc("ngModel",e.password.passwordConfirmation)("type",e.hideNewPasswordConfirm?"password":"text"),n.Db(2),n.oc("ngClass",n.vc(25,so,e.hideNewPasswordConfirm?"fa-eye-slash":"fa-eye")),n.Db(1),n.oc("ngIf",e.password.passwordConfirmation!==e.password.newPassword),n.Db(1),n.oc("ngIf",e.password.passwordConfirmation===e.password.newPassword&&e.password.newPassword.length>0&&e.password.passwordConfirmation.length>0),n.Db(1),n.oc("disabled",e.allowValidate()||e.loading),n.Db(1),n.Rc(e.labelButton),n.Db(2),n.Rc(n.jc(23,21,"lang.cancel")))},directives:[S.a,K.a,X.K,X.v,X.w,Y.c,J.b,X.d,X.u,X.x,Y.j,P.q,Y.f,P.t,k.b],pipes:[g.d],styles:[".login-content[_ngcontent-%COMP%]{background-color:#135f7f;height:100vh;width:100vw;display:flex;flex-direction:column;justify-content:center;align-items:center}.login-form[_ngcontent-%COMP%]{max-width:480px;text-align:center}.input-row[_ngcontent-%COMP%]{width:100%;padding-top:10px;padding-bottom:10px}.maarchLogo[_ngcontent-%COMP%]{position:absolute;transition:all 1s ease-in-out;width:250px;height:auto;padding-bottom:10px;transform:translateY(-230px)}footer[_ngcontent-%COMP%]{color:#fff;position:absolute;bottom:5px;font-size:10px;opacity:.5}"]}),t})();var ro=i("IzEk");let co=(()=>{class t{constructor(t,e,i){this.translate=t,this.dialogRef=e,this.data=i,this.loading=!1}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(q.h),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:11,vars:7,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],[1,"divider-modal"],["mat-icon-button","",3,"title","mat-dialog-close"],[1,"fa","fa-times-circle","fa-2x"],[2,"height","100%","width","100%",3,"editMode","base64","title"],["appDocumentViewer",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Wb(2,"span"),n.Qc(3),n.Vb(),n.Rb(4,"span",2),n.Wb(5,"button",3),n.ic(6,"translate"),n.Rb(7,"mat-icon",4),n.Vb(),n.Vb(),n.Wb(8,"mat-dialog-content"),n.Rb(9,"app-document-viewer",5,6),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Rc(e.data.title),n.Db(2),n.pc("title",n.jc(6,5,"lang.close")),n.Db(4),n.oc("editMode",!1)("base64",e.data.base64)("title",e.data.title))},styles:[""]}),t})();var lo=i("5+WD");let ho=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.data=i,this.dialogRef=n,this.notify=a,this.loading=!1,this.template={id:0,type:"visaCircuit",title:"",items:[]}}ngOnInit(){this.template.items=this.data.visaWorkflow.map(t=>({id:t.item_id,type:"user",mode:t.requested_signature?"sign":"visa"}))}onSubmit(){this.http.post("../rest/listTemplates",this.template).pipe(Object(mt.a)(t=>{this.template.id=t.id,this.notify.success(this.translate.instant("lang.modelSaved")),this.dialogRef.close(this.template)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.a),n.Qb(q.h),n.Qb(D.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:14,vars:9,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],[1,"modal-container"],["appearance","outline"],["type","text","matInput","","placeholder","Nom du mod\xe8le",3,"ngModel","ngModelChange"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2,"Ajouter un mod\xe8le"),n.Vb(),n.Wb(3,"mat-dialog-content",2),n.Wb(4,"mat-form-field",3),n.Wb(5,"input",4),n.dc("ngModelChange",(function(t){return e.template.title=t})),n.Vb(),n.Vb(),n.Vb(),n.Rb(6,"span",5),n.Wb(7,"div",6),n.Wb(8,"button",7),n.dc("click",(function(){return e.onSubmit()})),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Wb(11,"button",8),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.oc("ngModel",e.template.title),n.Db(3),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(10,5,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(13,7,"lang.cancel")))},directives:[q.i,q.f,Y.c,J.b,X.d,X.u,X.x,q.c,k.b,q.d],pipes:[g.d],styles:[".avatarAccount[_ngcontent-%COMP%]{border:3px solid #f99830;height:45px!important;width:45px!important;background-size:cover;background-repeat:no-repeat;background-position:50%}"]}),t})(),uo=(()=>{class t{constructor(t,e){this.translate=t,this.functions=e}transform(t){if(this.functions.empty(t))return"";{const e=new Date(t),i={weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric"};return this.translate.instant("lang.onRange")[0].toUpperCase()+this.translate.instant("lang.onRange").substr(1).toLowerCase()+" "+e.toLocaleDateString(this.translate.instant("lang.langISO"),i)}}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(_t.a))},t.\u0275pipe=n.Pb({name:"fullDate",type:t,pure:!1}),t})();function po(t,e){if(1&t&&(n.Wb(0,"mat-list-item",6),n.Rb(1,"mat-icon",7),n.Wb(2,"div",8),n.Wb(3,"div",9),n.Wb(4,"div",10),n.Qc(5),n.Vb(),n.Wb(6,"div",11),n.Qc(7),n.Vb(),n.Vb(),n.Wb(8,"div"),n.Wb(9,"button",12),n.ic(10,"translate"),n.ic(11,"translate"),n.ic(12,"translate"),n.ic(13,"translate"),n.Qc(14),n.ic(15,"translate"),n.ic(16,"translate"),n.ic(17,"translate"),n.ic(18,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(5),n.Sc(" ",t.itemLabel," "),n.Db(2),n.Sc(" ",t.itemSubLabel," "),n.Db(2),n.pc("title",null===t.process_date?t.requested_signature?n.jc(10,4,"lang.signUser"):n.jc(11,6,"lang.visaUser"):t.signatory?n.jc(12,8,"lang.signUser"):n.jc(13,10,"lang.visaUser")),n.Db(5),n.Sc(" ",null===t.process_date?t.requested_signature?n.jc(15,12,"lang.signUser"):n.jc(16,14,"lang.visaUser"):t.signatory?n.jc(17,16,"lang.signUser"):n.jc(18,18,"lang.visaUser")," ")}}function bo(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-list"),n.Wb(2,"div",3),n.Wb(3,"div",4),n.ic(4,"fullDate"),n.Qc(5),n.ic(6,"translate"),n.Wb(7,"b"),n.Qc(8),n.Vb(),n.Qc(9," \xa0"),n.Wb(10,"b"),n.Qc(11),n.ic(12,"timeAgo"),n.Vb(),n.Vb(),n.Rb(13,"mat-divider"),n.Vb(),n.Oc(14,po,19,20,"mat-list-item",5),n.Vb(),n.Tb()),2&t){const t=e.$implicit;n.Db(3),n.oc("title",n.jc(4,5,t.creationDate)),n.Db(2),n.Sc(" ",n.jc(6,7,"lang.createdBy"),"\xa0"),n.Db(3),n.Rc(t.user),n.Db(3),n.Rc(n.kc(12,9,t.creationDate,"full")),n.Db(3),n.oc("ngForOf",t.details)}}function fo(t,e){if(1&t&&(n.Ub(0),n.Oc(1,bo,15,12,"ng-container",2),n.Tb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",t.visaWorkflowHistory)}}function mo(t,e){1&t&&(n.Wb(0,"div",13),n.Rb(1,"mat-spinner",14),n.Vb())}let go=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.functions=n,this.dialog=a,this.visaWorkflowHistory=[],this.loading=!1,this.resId=null}ngOnInit(){this.functions.empty(this.resId)||this.loadWorkflowHistory(),this.loading=!1}loadWorkflowHistory(){return this.loading=!0,new Promise((t,e)=>{this.http.get(`../rest/resources/${this.resId}/circuitsHistory?type=visaCircuit`).pipe(Object(mt.a)(t=>{this.visaWorkflowHistory=t.listInstanceHistory}),Object(Xt.a)(()=>{this.loading=!1,t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(_t.a),n.Qb(q.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-history-visa-workflow"]],inputs:{resId:"resId"},decls:2,vars:2,consts:[[4,"ngIf"],["style","display:flex;padding: 10px;",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"dateTitle"],["mat-subheader","",1,"primary",3,"title"],["disableRipple","","class","workflow",4,"ngFor","ngForOf"],["disableRipple","",1,"workflow"],["mat-list-icon","","color","primary",1,"fa","fa-2x","fa-user"],["mat-line","",1,"workflowLine"],[1,"workflowLineContainer"],[1,"workflowLineLabel"],[1,"workflowLineSubLabel"],["color","primary","disabled","","mat-raised-button","",1,"currentRoleButton",3,"title"],[2,"display","flex","padding","10px"],[2,"margin","auto"]],template:function(t,e){1&t&&(n.Oc(0,fo,2,1,"ng-container",0),n.Oc(1,mo,2,0,"div",1)),2&t&&(n.oc("ngIf",!e.loading),n.Db(1),n.oc("ngIf",e.loading))},directives:[P.t,P.s,R.a,R.g,T.a,R.d,S.a,R.c,W.l,k.b,V.c],pipes:[uo,g.d,ps],styles:[".mat-form-field-appearance-outline[_ngcontent-%COMP%]{font-size:11px}.visaSignList[_ngcontent-%COMP%] .mat-optgroup-label{color:#135f7f;position:-webkit-sticky;position:sticky;top:0;background:#fff!important;z-index:1}.currentRoleButton[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;font-size:13px;width:120px;text-align:center}.emptyContent[_ngcontent-%COMP%]{opacity:.5;text-align:center;font-size:10px;padding:10px}.workflow[_ngcontent-%COMP%]{padding-top:10px;padding-bottom:10px;height:auto!important;margin-bottom:10px;background:hsla(0,0%,84.7%,.1);border-radius:10px;font-size:13px}.workflowLine[_ngcontent-%COMP%]{display:flex!important;align-items:center}.workflowLineContainer[_ngcontent-%COMP%]{flex:1}.workflowLineContainer[_ngcontent-%COMP%], .workflowLineLabel[_ngcontent-%COMP%], .workflowLineSubLabel[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis}.workflowLineSubLabel[_ngcontent-%COMP%]{font-size:80%;opacity:.5;flex:1}.workflowLineProcessDate[_ngcontent-%COMP%]{flex:1;text-align:left;font-size:80%}.workflowLine[_ngcontent-%COMP%] .mat-raised-button[disabled][_ngcontent-%COMP%]{background:none;color:#135f7f!important;opacity:1}.primary[_ngcontent-%COMP%]{color:#135f7f}"]}),t})();const vo=["searchVisaSignUserInput"];function _o(t,e){1&t&&(n.Wb(0,"mat-option",16),n.Wb(1,"div",17),n.Rb(2,"mat-spinner",18),n.Vb(),n.Vb())}function yo(t,e){if(1&t&&(n.Wb(0,"mat-option",21),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t.label," ")}}function xo(t,e){if(1&t&&(n.Wb(0,"mat-optgroup",19),n.ic(1,"translate"),n.Oc(2,yo,2,2,"mat-option",20),n.ic(3,"sortBy"),n.ic(4,"async"),n.Vb()),2&t){const t=n.hc(3);n.oc("label",n.jc(1,2,"lang.publicModel")),n.Db(2),n.oc("ngForOf",n.kc(3,4,n.jc(4,7,t.filteredPublicModels),"label"))}}function Co(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-option",21),n.Wb(1,"div",22),n.Wb(2,"div",23),n.Qc(3),n.Vb(),n.Wb(4,"button",24),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(4);return i.stopPropagation(),s.deletePrivateModel(a)})),n.Rb(5,"mat-icon",25),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.oc("value",t),n.Db(3),n.Sc(" ",t.label," ")}}function Oo(t,e){if(1&t&&(n.Wb(0,"mat-optgroup",19),n.ic(1,"translate"),n.Oc(2,Co,6,2,"mat-option",20),n.ic(3,"sortBy"),n.ic(4,"async"),n.Vb()),2&t){const t=n.hc(3);n.oc("label",n.jc(1,2,"lang.privateModel")),n.Db(2),n.oc("ngForOf",n.kc(3,4,n.jc(4,7,t.filteredPrivateModels),"label"))}}function Do(t,e){if(1&t&&(n.Wb(0,"mat-option",21),n.Qc(1),n.Wb(2,"small"),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t.label,"\xa0"),n.Db(2),n.Sc("(",t.entity,")")}}function wo(t,e){if(1&t&&(n.Wb(0,"mat-optgroup",19),n.ic(1,"translate"),n.ic(2,"translate"),n.Oc(3,Do,4,3,"mat-option",20),n.ic(4,"sortBy"),n.ic(5,"async"),n.Vb()),2&t){const t=n.hc(3);n.oc("label",n.jc(1,2,"lang.visaUser")+" / "+n.jc(2,4,"lang.signUser")),n.Db(3),n.oc("ngForOf",n.kc(4,6,n.jc(5,9,t.filteredSignVisaUsers),"label"))}}function Mo(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",26),n.dc("click",(function(e){n.Dc(t);const i=n.hc(3);return e.stopPropagation(),i.openPromptSaveModel()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",27),n.Vb()}2&t&&n.pc("title",n.jc(1,1,"lang.saveAsPrivateModel"))}function ko(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field",8),n.Rb(1,"input",9,10),n.ic(3,"translate"),n.Wb(4,"mat-autocomplete",11,12),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc(2).addItemToWorkflow(e.option.value)}))("opened",(function(){return n.Dc(t),n.hc(2).initFilterVisaModelList()})),n.Oc(6,_o,3,0,"mat-option",13),n.Oc(7,xo,5,9,"mat-optgroup",14),n.ic(8,"async"),n.Oc(9,Oo,5,9,"mat-optgroup",14),n.ic(10,"async"),n.Oc(11,wo,6,11,"mat-optgroup",14),n.ic(12,"async"),n.Vb(),n.Oc(13,Mo,3,3,"button",15),n.Vb()}if(2&t){const t=n.zc(5),e=n.hc(2);var i,a,s;n.Db(1),n.pc("placeholder",n.jc(3,8,"lang.addUsers")),n.oc("formControl",e.searchVisaSignUser)("matAutocomplete",t),n.Db(5),n.oc("ngIf",e.visaModelListNotLoaded),n.Db(1),n.oc("ngIf",(null==(i=n.jc(8,10,e.filteredPublicModels))?null:i.length)>0),n.Db(2),n.oc("ngIf",(null==(a=n.jc(10,12,e.filteredPrivateModels))?null:a.length)>0),n.Db(2),n.oc("ngIf",(null==(s=n.jc(12,14,e.filteredSignVisaUsers))?null:s.length)>0),n.Db(2),n.oc("ngIf",e.visaWorkflow.items.length>0&&e.showListModels)}}const So=function(){return["/rest/autocomplete/maarchParapheurUsers"]};function Io(t,e){if(1&t){const t=n.Xb();n.Wb(0,"plugin-autocomplete",28),n.dc("triggerEvent",(function(e){return n.Dc(t),n.hc(2).addItemToWorkflow(e,!0)})),n.ic(1,"translate"),n.Vb()}2&t&&n.oc("labelPlaceholder",n.jc(1,4,"lang.addPerson"))("routeDatas",n.uc(6,So))("targetSearchKey","idToDisplay")("subInfoKey","email")}function Po(t,e){1&t&&(n.Wb(0,"div",29),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noVisaWorkflow")," "))}function Vo(t,e){1&t&&(n.Wb(0,"div",29),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.cannotAddVisaCircuit")," "))}function Ro(t,e){1&t&&n.Rb(0,"mat-icon",44)}function jo(t,e){if(1&t&&n.Rb(0,"i",45),2&t){const t=n.hc().$implicit;n.oc("matTooltip",t.process_comment)}}const Ao=function(t,e){return[t,e]};function Wo(t,e){if(1&t&&(n.Ub(0),n.Rb(1,"mat-icon",46),n.ic(2,"translate"),n.ic(3,"translate"),n.ic(4,"translate"),n.ic(5,"translate"),n.ic(6,"translate"),n.ic(7,"translate"),n.ic(8,"translate"),n.ic(9,"translate"),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Ib("fa-hourglass",null==t.process_date)("fa-thumbs-up",null!=t.process_date&&-1===n.wc(29,Ao,n.jc(2,13,"lang.visaWorkflowInterrupted"),n.jc(3,15,"lang.hasInterruptedWorkflow")).indexOf(t.process_comment))("fa-hand-paper",null!=t.process_date&&t.process_comment===n.jc(4,17,"lang.hasInterruptedWorkflow"))("fa-times",null!=t.process_date&&t.process_comment===n.jc(5,19,"lang.visaWorkflowInterrupted"))("valid",null!=t.process_date&&-1===n.wc(32,Ao,n.jc(6,21,"lang.visaWorkflowInterrupted"),n.jc(7,23,"lang.hasInterruptedWorkflow")).indexOf(t.process_comment))("invalid",null!=t.process_date&&n.wc(35,Ao,n.jc(8,25,"lang.visaWorkflowInterrupted"),n.jc(9,27,"lang.hasInterruptedWorkflow")).indexOf(t.process_comment)>-1),n.oc("title",null!==t.process_comment?t.process_comment:"")}}function To(t,e){if(1&t&&(n.Ub(0),n.Rb(1,"mat-icon",47),n.ic(2,"translate"),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("title",n.jc(2,1,"lang.insteadOf")+" "+t.delegatedBy)}}function Eo(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",37),n.Wb(1,"mat-form-field"),n.Wb(2,"input",48),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().$implicit.process_comment=e})),n.ic(3,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(),e=t.$implicit,i=t.index,a=n.hc(2);n.Db(2),n.oc("disabled",!a.adminMode||null!=e.process_date||"signatureBook"===a.target&&a.getCurrentVisaUserIndex()===i)("placeholder",n.jc(3,3,"lang.visaNote"))("ngModel",e.process_comment)}}function Fo(t,e){if(1&t&&(n.Wb(0,"div",49),n.ic(1,"fullDate"),n.Qc(2),n.ic(3,"translate"),n.ic(4,"translate"),n.ic(5,"timeAgo"),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc(2);n.pc("title",n.jc(1,3,t.process_date)),n.Db(2),n.Tc("",e.functions.empty(t.process_date)&&t.requested_signature||t.signatory?n.jc(3,5,"lang.signedUserDate"):n.jc(4,7,"lang.approvedUserDate")," ",n.kc(5,9,t.process_date,"full"),"")}}function Lo(t,e){if(1&t&&(n.Wb(0,"div",50),n.ic(1,"fullDate"),n.Qc(2),n.ic(3,"translate"),n.ic(4,"timeAgo"),n.Vb()),2&t){const t=n.hc().$implicit;n.pc("title",n.jc(1,3,t.process_date)),n.Db(2),n.Tc("",n.jc(3,5,"lang.interrupted")," ",n.kc(4,7,t.process_date,"full"),"")}}function Qo(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div"),n.Wb(1,"button",51),n.dc("click",(function(){n.Dc(t);const e=n.hc().index;return n.hc(2).changeRole(e)})),n.ic(2,"translate"),n.Qc(3),n.ic(4,"translate"),n.ic(5,"translate"),n.Vb(),n.Vb()}if(2&t){const t=n.hc(),e=t.$implicit,i=t.index,a=n.hc(2);n.Db(1),n.pc("title",n.jc(2,4,"lang."+e.currentRole+"User")),n.oc("color",a.functions.empty(e.process_date)&&e.requested_signature||e.signatory?"primary":"")("disabled",!a.canManageUser(e,i)),n.Db(2),n.Rc(a.functions.empty(e.process_date)&&e.requested_signature||e.signatory?n.jc(4,6,"lang.signUser"):n.jc(5,8,"lang.visaUser"))}}function No(t,e){1&t&&(n.Wb(0,"div",52),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noPrivileges")," "))}function zo(t,e){1&t&&(n.Wb(0,"div",53),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.userNotValid")," "))}function Bo(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",54),n.dc("click",(function(){n.Dc(t);const e=n.hc().index;return n.hc(2).deleteItem(e)})),n.Rb(1,"mat-icon",55),n.Vb()}}const Uo=function(){return["A termin\xe9 le circuit"]};function $o(t,e){if(1&t&&(n.Wb(0,"mat-list-item",30),n.ic(1,"translate"),n.ic(2,"translate"),n.ic(3,"translate"),n.ic(4,"translate"),n.Oc(5,Ro,1,0,"mat-icon",31),n.Wb(6,"mat-icon",32),n.ic(7,"translate"),n.Oc(8,jo,1,1,"i",33),n.Vb(),n.Oc(9,Wo,10,38,"ng-container",0),n.Wb(10,"div",34),n.Wb(11,"div",35),n.Wb(12,"div",36),n.Qc(13),n.Oc(14,To,3,3,"ng-container",0),n.Vb(),n.Wb(15,"div",37),n.Qc(16),n.Vb(),n.Oc(17,Eo,4,5,"div",38),n.Oc(18,Fo,6,12,"div",39),n.ic(19,"translate"),n.ic(20,"translate"),n.Oc(21,Lo,5,10,"div",40),n.Vb(),n.Oc(22,Qo,6,10,"div",0),n.Oc(23,No,3,3,"div",41),n.Oc(24,zo,3,3,"div",42),n.Vb(),n.Oc(25,Bo,2,0,"button",43),n.Vb()),2&t){const t=e.$implicit,i=e.index,a=n.hc(2);n.Ib("notDraggable",!a.canManageUser(t,i))("notEditable",!a.adminMode)("processed",null!=t.process_date&&-1===n.wc(53,Ao,n.jc(1,39,"lang.visaWorkflowInterrupted"),n.jc(2,41,"lang.hasInterruptedWorkflow")).indexOf(t.process_comment))("interrupt",null!=t.process_date&&n.wc(56,Ao,n.jc(3,43,"lang.visaWorkflowInterrupted"),n.jc(4,45,"lang.hasInterruptedWorkflow")).indexOf(t.process_comment)>-1),n.oc("cdkDragDisabled",!a.canManageUser(t,i)),n.Db(5),n.oc("ngIf",a.getCurrentVisaUserIndex()===i&&(!a.adminMode||"signatureBook"===a.target)),n.Db(1),n.Lc("background-image",a.functions.empty(t.picture)?"":"url("+t.picture+")"),n.Ib("avatar",!a.functions.empty(t.picture))("fa-user",a.functions.empty(t.picture)&&t.isValid||null===t.process_date&&null===t.delegatedBy)("fa-user-friends",null!=t.process_date&&null!==t.delegatedBy)("fa-user-slash",!t.isValid)("invalid",!t.hasPrivilege||!t.isValid),n.oc("title",t.isValid?"":n.jc(7,47,"lang.userNotValid")),n.Db(2),n.oc("ngIf",!a.functions.empty(t.process_comment)),n.Db(1),n.oc("ngIf",(!a.adminMode||null!=t.process_date)&&t.isValid),n.Db(3),n.Ib("unauthorized",!t.hasPrivilege||!t.isValid),n.Db(1),n.Sc(" ",t.labelToDisplay," "),n.Db(1),n.oc("ngIf",null!=t.process_date&&null!==t.delegatedBy),n.Db(1),n.Ib("unauthorized",!t.hasPrivilege||!t.isValid),n.Db(1),n.Sc(" ",t.item_entity," "),n.Db(1),n.oc("ngIf",a.showComment&&(!a.linkedToMaarchParapheur&&a.adminMode&&a.functions.empty(t.process_date)||!a.linkedToMaarchParapheur&&a.getCurrentVisaUserIndex()===i&&!a.functions.empty(t.process_comment))&&t.hasPrivilege&&t.isValid),n.Db(1),n.oc("ngIf",t.requested_signature&&null!=t.process_date&&-1===n.wc(59,Ao,n.jc(19,49,"lang.visaWorkflowInterrupted"),n.jc(20,51,"lang.hasInterruptedWorkflow")).indexOf(t.process_comment)),n.Db(3),n.oc("ngIf",null!=t.process_date&&n.uc(62,Uo).indexOf(t.process_comment)>-1),n.Db(1),n.oc("ngIf",t.hasPrivilege&&t.isValid),n.Db(1),n.oc("ngIf",!t.hasPrivilege),n.Db(1),n.oc("ngIf",!t.isValid),n.Db(1),n.oc("ngIf",a.canManageUser(t,i))}}function Ho(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list"),n.Oc(1,ko,14,16,"mat-form-field",2),n.Oc(2,Io,2,7,"plugin-autocomplete",3),n.Wb(3,"div",4,5),n.dc("cdkDropListDropped",(function(e){return n.Dc(t),n.hc().drop(e)})),n.Oc(5,Po,3,3,"div",6),n.Oc(6,Vo,3,3,"div",6),n.Oc(7,$o,26,63,"mat-list-item",7),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.adminMode&&!t.linkedToMaarchParapheur),n.Db(1),n.oc("ngIf",t.linkedToMaarchParapheur&&t.adminMode),n.Db(1),n.oc("cdkDropListData",t.visaWorkflow.items)("cdkDropListDisabled",!t.adminMode),n.Db(2),n.oc("ngIf",t.adminMode&&0===t.visaWorkflow.items.length),n.Db(1),n.oc("ngIf",!t.adminMode&&0===t.visaWorkflow.items.length),n.Db(1),n.oc("ngForOf",t.visaWorkflow.items)}}function Go(t,e){1&t&&(n.Wb(0,"div",56),n.Rb(1,"mat-spinner",57),n.Vb())}function Xo(t,e){if(1&t&&n.Rb(0,"app-history-visa-workflow",61),2&t){const t=n.hc(2);n.oc("resId",t.resId)}}function qo(t,e){1&t&&(n.Ub(0),n.Rb(1,"mat-divider"),n.Wb(2,"mat-expansion-panel",58),n.Wb(3,"mat-expansion-panel-header"),n.Wb(4,"mat-panel-title",59),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Vb(),n.Oc(7,Xo,1,1,"ng-template",60),n.Vb(),n.Tb()),2&t&&(n.Db(5),n.Sc(" ",n.jc(6,1,"lang.showVisaWorkflowHistory")," "))}let Ko=(()=>{class t{constructor(t,e,i,a,s,o,r,c,l){this.translate=t,this.http=e,this.notify=i,this.functions=a,this.latinisePipe=s,this.dialog=o,this.scanPipe=r,this.route=c,this.privilegeService=l,this.visaWorkflow={roles:["sign","visa"],items:[]},this.visaWorkflowClone=[],this.visaTemplates={private:[],public:[]},this.signVisaUsers=[],this.loading=!1,this.hasHistory=!1,this.visaModelListNotLoaded=!0,this.target="",this.resId=null,this.showListModels=!0,this.showComment=!0,this.linkedToMaarchParapheur=!1,this.workflowUpdated=new n.o,this.searchVisaSignUser=new X.i,this.loadedInConstructor=!1,this.route.params.subscribe(t=>{this.loading=!0,this.resId=t.resId,this.functions.empty(this.resId)?this.loadedInConstructor=!1:(this.loadedInConstructor=!0,this.loadWorkflow(this.resId))},t=>{this.notify.handleErrors(t)})}ngOnInit(){this.functions.empty(this.resId)||this.loadedInConstructor?this.loading=!1:this.loadWorkflow(this.resId)}drop(t){t.previousContainer===t.container&&(this.canManageUser(this.visaWorkflow.items[t.currentIndex],t.currentIndex)?(Object(lo.h)(t.container.data,t.previousIndex,t.currentIndex),this.workflowUpdated.emit(t.container)):this.notify.error(this.translate.instant("lang.moveVisaUserErr",{value1:this.visaWorkflow.items[t.previousIndex].labelToDisplay})))}loadListModel(t){this.loading=!0,this.visaWorkflow.items=[];const e=!0===this.linkedToMaarchParapheur?`../rest/listTemplates/entities/${t}?type=visaCircuit&maarchParapheur=true`:`../rest/listTemplates/entities/${t}?type=visaCircuit`;return new Promise(t=>{this.http.get(e).subscribe(e=>{e.listTemplates[0]&&(this.visaWorkflow.items=e.listTemplates[0].items.map(t=>Object.assign(Object.assign({},t),{item_entity:t.descriptionToDisplay,requested_signature:"visa"!==t.item_mode,currentRole:t.item_mode}))),this.visaWorkflow.items.forEach((t,e)=>{this.functions.empty(t.externalId)||this.getMaarchParapheurUserAvatar(t.externalId.maarchParapheur,e)}),this.visaWorkflowClone=JSON.parse(JSON.stringify(this.visaWorkflow.items)),this.loading=!1,t(!0)})})}loadVisaSignUsersList(){return new Promise((t,e)=>{this.http.get("../rest/autocomplete/users/circuit").pipe(Object(l.a)(t=>t.map(t=>({id:t.id,title:`${t.idToDisplay} (${t.otherInfo})`,label:t.idToDisplay,entity:t.otherInfo,type:"user",hasPrivilege:!0,isValid:!0,currentRole:"visa"}))),Object(mt.a)(e=>{this.signVisaUsers=e,this.filteredSignVisaUsers=this.searchVisaSignUser.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>this._filter(t))),t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}loadVisaModelList(){return Object(r.a)(this,void 0,void 0,(function*(){return this.functions.empty(this.resId)||(yield this.loadDefaultModel()),new Promise((t,e)=>{this.http.get("../rest/availableCircuits?circuit=visa").pipe(Object(mt.a)(e=>{this.visaTemplates.public=this.visaTemplates.public.concat(e.circuits.filter(t=>!t.private).map(t=>({id:t.id,title:t.title,label:t.title,type:"entity"}))),this.visaTemplates.private=e.circuits.filter(t=>t.private).map(t=>({id:t.id,title:t.title,label:t.title,type:"entity"})),this.filteredPublicModels=this.searchVisaSignUser.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>this._filterPublicModel(t))),this.filteredPrivateModels=this.searchVisaSignUser.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>this._filterPrivateModel(t))),t(!0)})).subscribe()})}))}loadDefaultModel(){return this.visaTemplates.public=[],new Promise((t,e)=>{this.http.get(`../rest/resources/${this.resId}/defaultCircuit?circuit=visa`).pipe(Object(d.a)(t=>!this.functions.empty(t.circuit)),Object(mt.a)(t=>{this.functions.empty(t.circuit)||this.visaTemplates.public.push({id:t.circuit.id,title:t.circuit.title,label:t.circuit.title,type:"entity"})}),Object(Xt.a)(()=>t(!0)),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}initFilterVisaModelList(){return Object(r.a)(this,void 0,void 0,(function*(){this.linkedToMaarchParapheur||this.visaModelListNotLoaded&&(yield this.loadVisaSignUsersList(),this.showListModels&&(yield this.loadVisaModelList()),this.searchVisaSignUser.reset(),this.visaModelListNotLoaded=!1)}))}_filter(t){if("string"==typeof t){const e=this.latinisePipe.transform(t.toLowerCase());return this.signVisaUsers.filter(t=>this.latinisePipe.transform(t.title.toLowerCase()).includes(e))}return this.signVisaUsers}_filterPrivateModel(t){if("string"==typeof t){const e=this.latinisePipe.transform(t.toLowerCase());return this.visaTemplates.private.filter(t=>this.latinisePipe.transform(t.title.toLowerCase()).includes(e))}return this.visaTemplates.private}_filterPublicModel(t){if("string"==typeof t){const e=this.latinisePipe.transform(t.toLowerCase());return this.visaTemplates.public.filter(t=>this.latinisePipe.transform(t.title.toLowerCase()).includes(e))}return this.visaTemplates.public}loadWorkflow(t){return this.resId=t,this.loading=!0,this.visaWorkflow.items=[],new Promise(e=>{this.http.get("../rest/resources/"+t+"/visaCircuit").pipe(Object(mt.a)(t=>{this.functions.empty(t.circuit)||(t.circuit.forEach(t=>{this.visaWorkflow.items.push(Object.assign(Object.assign({},t),{difflist_type:"VISA_CIRCUIT",currentRole:t.requested_signature?"sign":"visa"}))}),this.visaWorkflowClone=JSON.parse(JSON.stringify(this.visaWorkflow.items))),this.hasHistory=t.hasHistory}),Object(Xt.a)(()=>{this.loading=!1,e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}loadDefaultWorkflow(t){this.loading=!0,this.visaWorkflow.items=[],this.http.get("../rest/resources/"+t+"/defaultCircuit?circuit=visaCircuit").pipe(Object(d.a)(t=>!this.functions.empty(t.circuit)),Object(mt.a)(t=>{t.circuit.items.forEach(t=>{this.visaWorkflow.items.push(Object.assign(Object.assign({},t),{requested_signature:"visa"!==t.item_mode,difflist_type:"VISA_CIRCUIT"}))}),this.visaWorkflowClone=JSON.parse(JSON.stringify(this.visaWorkflow.items))}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}loadWorkflowMaarchParapheur(t,e){this.loading=!0,this.visaWorkflow.items=[],this.http.get(`../rest/documents/${t}/maarchParapheurWorkflow?type=${e}`).subscribe(t=>{t.workflow.forEach((t,e)=>{const i={listinstance_id:e,id:t.userId,labelToDisplay:t.userDisplay,requested_signature:"visa"!==t.mode,process_date:this.functions.formatFrenchDateToTechnicalDate(t.processDate),picture:"",hasPrivilege:!0,isValid:!0};this.visaWorkflow.items.push(i),this.http.get("../rest/maarchParapheur/user/"+t.userId+"/picture").subscribe(e=>{this.visaWorkflow.items.filter(e=>e.id===t.userId)[0].picture=e.picture},t=>{this.notify.handleErrors(t)})}),this.loading=!1},t=>{this.notify.handleErrors(t)})}deleteItem(t){this.visaWorkflow.items.splice(t,1),this.workflowUpdated.emit(this.visaWorkflow.items)}getVisaCount(){return this.visaWorkflow.items.length}changeRole(t){this.visaWorkflow.items[t].requested_signature=!this.visaWorkflow.items[t].requested_signature,this.visaWorkflow.items[t].currentRole=this.visaWorkflow.items[t].requested_signature?"sign":"visa",this.workflowUpdated.emit(this.visaWorkflow.items)}getWorkflow(){return this.visaWorkflow.items}getCurrentVisaUserIndex(){if(void 0===this.getLastVisaUser().listinstance_id)return this.getRealIndex(0);{let t=this.visaWorkflow.items.map(t=>t.listinstance_id).indexOf(this.getLastVisaUser().listinstance_id);return t++,this.getRealIndex(t)}}getFirstVisaUser(){return!this.functions.empty(this.visaWorkflow.items[0])&&this.visaWorkflow.items[0].isValid?this.visaWorkflow.items[0]:""}getNextVisaUser(){let t=this.getCurrentVisaUserIndex();t+=1;const e=this.getRealIndex(t);return this.functions.empty(this.visaWorkflow.items[e])?"":this.visaWorkflow.items[e]}getLastVisaUser(){const t=this.visaWorkflow.items.filter(t=>!this.functions.empty(t.process_date)&&t.isValid);return this.functions.empty(t[t.length-1])?"":t[t.length-1]}getRealIndex(t){for(;t<this.visaWorkflow.items.length&&!this.visaWorkflow.items[t].isValid;)t++;return t}checkExternalSignatoryBook(){return this.visaWorkflow.items.filter(t=>this.functions.empty(t.externalId)).map(t=>t.labelToDisplay)}saveVisaWorkflow(t=[this.resId]){return new Promise((e,i)=>{if(0===this.visaWorkflow.items.length)this.http.delete(`../rest/resources/${t[0]}/circuits/visaCircuit`).pipe(Object(mt.a)(()=>{this.visaWorkflowClone=JSON.parse(JSON.stringify(this.visaWorkflow.items)),this.notify.success(this.translate.instant("lang.visaWorkflowDeleted")),e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),e(!1),Object(c.a)(!1)))).subscribe();else if(this.isValidWorkflow()){const i=t.map(t=>({resId:t,listInstances:this.visaWorkflow.items}));this.http.put("../rest/circuits/visaCircuit",{resources:i}).pipe(Object(mt.a)(t=>{this.visaWorkflowClone=JSON.parse(JSON.stringify(this.visaWorkflow.items)),this.notify.success(this.translate.instant("lang.visaWorkflowUpdated")),e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),e(!1),Object(c.a)(!1)))).subscribe()}else this.notify.error(this.getError()),e(!1)})}addItemToWorkflow(t,e=!1){return new Promise((i,n)=>{if(e){const e=!this.functions.empty(t.requested_signature)&&t.requested_signature;this.visaWorkflow.items.push({item_id:t.id,item_type:"user",item_entity:t.email,labelToDisplay:t.idToDisplay,externalId:t.externalId,difflist_type:"VISA_CIRCUIT",signatory:!this.functions.empty(t.signatory)&&t.signatory,requested_signature:e,hasPrivilege:!0,isValid:!0,currentRole:e?"sign":"visa"}),this.linkedToMaarchParapheur&&this.getMaarchParapheurUserAvatar(t.externalId.maarchParapheur,this.visaWorkflow.items.length-1),this.searchVisaSignUser.reset(),i(!0)}else if("user"===t.type){const e=!this.functions.empty(t.requested_signature)&&t.requested_signature;this.visaWorkflow.items.push({item_id:t.id,item_type:"user",item_entity:t.entity,labelToDisplay:t.label,externalId:this.functions.empty(t.externalId)?null:t.externalId,difflist_type:"VISA_CIRCUIT",signatory:!this.functions.empty(t.signatory)&&t.signatory,requested_signature:e,hasPrivilege:t.hasPrivilege,isValid:t.isValid,currentRole:e?"sign":"visa"}),this.linkedToMaarchParapheur&&this.getMaarchParapheurUserAvatar(t.externalId.maarchParapheur,this.visaWorkflow.items.length-1),this.searchVisaSignUser.reset(),this.searchVisaSignUserInput.nativeElement.blur(),this.workflowUpdated.emit(this.visaWorkflow.items),i(!0)}else"entity"===t.type&&this.http.get("../rest/listTemplates/"+t.id).pipe(Object(mt.a)(t=>{this.visaWorkflow.items=this.visaWorkflow.items.concat(t.listTemplate.items.map(t=>({item_id:t.item_id,item_type:"user",labelToDisplay:t.idToDisplay,item_entity:t.descriptionToDisplay,difflist_type:"VISA_CIRCUIT",signatory:!1,requested_signature:"sign"===t.item_mode,hasPrivilege:t.hasPrivilege,isValid:t.isValid,currentRole:t.item_mode}))),this.searchVisaSignUser.reset(),this.searchVisaSignUserInput.nativeElement.blur(),i(!0)})).subscribe()})}resetWorkflow(){this.visaWorkflow.items=[]}isValidWorkflow(){return this.visaWorkflow.items.filter(t=>t.requested_signature).length>0&&0===this.visaWorkflow.items.filter(t=>(!t.hasPrivilege||!t.isValid)&&(null===t.process_date||this.functions.empty(t.process_date))).length&&this.visaWorkflow.items.length>0}getError(){return 0===this.visaWorkflow.items.filter(t=>t.requested_signature).length?this.translate.instant("lang.signUserRequired"):this.visaWorkflow.items.filter(t=>!t.hasPrivilege).length>0?this.translate.instant("lang.mustDeleteUsersWithNoPrivileges"):this.visaWorkflow.items.filter(t=>!t.isValid&&(null===t.process_date||this.functions.empty(t.process_date))).length>0?this.translate.instant("lang.mustDeleteInvalidUsers"):void 0}emptyWorkflow(){return 0===this.visaWorkflow.items.length}workflowEnd(){return this.visaWorkflow.items.filter(t=>!this.functions.empty(t.process_date)).length===this.visaWorkflow.items.length}openPromptSaveModel(){this.dialog.open(ho,{panelClass:"maarch-modal",data:{visaWorkflow:this.visaWorkflow.items}}).afterClosed().pipe(Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.visaTemplates.private.push({id:t.id,title:t.title,label:t.title,type:"entity"}),this.searchVisaSignUser.reset()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}deletePrivateModel(t){this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete("../rest/listTemplates/"+t.id)),Object(mt.a)(()=>{this.visaTemplates.private=this.visaTemplates.private.filter(e=>e.id!==t.id),this.searchVisaSignUser.reset(),this.notify.success(this.translate.instant("lang.modelDeleted"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}getMaarchParapheurUserAvatar(t,e){this.functions.empty(t)||this.http.get("../rest/maarchParapheur/user/"+t+"/picture").subscribe(t=>{this.visaWorkflow.items[e].picture=t.picture},t=>{this.notify.handleErrors(t)})}isModified(){return!(this.loading||JSON.stringify(this.visaWorkflow.items)===JSON.stringify(this.visaWorkflowClone))}canManageUser(t,e){return!!this.adminMode&&!!this.functions.empty(t.process_date)&&("signatureBook"!==this.target||this.getCurrentVisaUserIndex()!==e||this.privilegeService.hasCurrentUserPrivilege("modify_visa_in_signatureBook"))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(_t.a),n.Qb(Tt.c),n.Qb(q.b),n.Qb(Tt.o),n.Qb(o.a),n.Qb(Dt.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-visa-workflow"]],viewQuery:function(t,e){var i;1&t&&n.Xc(vo,!0),2&t&&n.yc(i=n.ec())&&(e.searchVisaSignUserInput=i.first)},inputs:{injectDatas:"injectDatas",target:"target",adminMode:"adminMode",resId:"resId",showListModels:"showListModels",showComment:"showComment",linkedToMaarchParapheur:"linkedToMaarchParapheur"},outputs:{workflowUpdated:"workflowUpdated"},features:[n.Cb([Tt.o])],decls:3,vars:3,consts:[[4,"ngIf"],["style","display:flex;padding: 10px;",4,"ngIf"],["appearance","outline",4,"ngIf"],["appearance","outline",3,"labelPlaceholder","routeDatas","targetSearchKey","subInfoKey","triggerEvent",4,"ngIf"],["cdkDropList","",1,"cdk-list",3,"cdkDropListData","cdkDropListDisabled","cdkDropListDropped"],["dataAvailableList","cdkDropList"],["class","emptyContent",4,"ngIf"],["disableRipple","","cdkDrag","","class","columns workflow",3,"cdkDragDisabled","notDraggable","notEditable","processed","interrupt",4,"ngFor","ngForOf"],["appearance","outline"],["type","text","matInput","","id","searchVisaSignUserInput",3,"placeholder","formControl","matAutocomplete"],["searchVisaSignUserInput",""],[3,"optionSelected","opened"],["autoGroup","matAutocomplete"],["disabled","",4,"ngIf"],["class","visaSignList",3,"label",4,"ngIf"],["mat-icon-button","","matSuffix","","color","primary",3,"title","click",4,"ngIf"],["disabled",""],[2,"display","flex","justify-content","center"],["diameter","35"],[1,"visaSignList",3,"label"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[2,"display","flex","align-items","center"],[2,"flex","1"],["mat-icon-button","","color","warn",3,"click"],[1,"fa","fa-trash",2,"margin","0px"],["mat-icon-button","","matSuffix","","color","primary",3,"title","click"],[1,"fa","fa-plus"],["appearance","outline",3,"labelPlaceholder","routeDatas","targetSearchKey","subInfoKey","triggerEvent"],[1,"emptyContent"],["disableRipple","","cdkDrag","",1,"columns","workflow",3,"cdkDragDisabled"],["class","fa fa-chevron-right fa-2x","mat-list-icon","","color","accent",4,"ngIf"],["mat-list-icon","","color","primary",1,"fa","fa-2x",2,"position","relative",3,"title"],["class","far fa-comment-dots commentBubble",3,"matTooltip",4,"ngIf"],["mat-line","",1,"workflowLine"],[1,"workflowLineContainer"],[1,"workflowLineLabel"],[1,"workflowLineSubLabel"],["class","workflowLineSubLabel",4,"ngIf"],["class","workflowLineProcessDate","color","accent",3,"title",4,"ngIf"],["class","workflowLineProcessDate","color","warn",3,"title",4,"ngIf"],["class","invalid",4,"ngIf"],["class","invalid invalidMsg",4,"ngIf"],["mat-icon-button","",3,"click",4,"ngIf"],["mat-list-icon","","color","accent",1,"fa","fa-chevron-right","fa-2x"],[1,"far","fa-comment-dots","commentBubble",3,"matTooltip"],["mat-list-icon","",1,"fa-2x","fa",2,"opacity","0.5",3,"title"],["mat-list-icon","",1,"fas","fa-exclamation-circle",2,"opacity","0.5","font-size","125%","height","15px","color","red","cursor","help",3,"title"],["matInput","","maxlength","255",1,"comment",3,"disabled","placeholder","ngModel","ngModelChange"],["color","accent",1,"workflowLineProcessDate",3,"title"],["color","warn",1,"workflowLineProcessDate",3,"title"],["mat-raised-button","",1,"currentRoleButton",3,"color","disabled","title","click"],[1,"invalid"],[1,"invalid","invalidMsg"],["mat-icon-button","",3,"click"],["color","warn",1,"fa","fa-times"],[2,"display","flex","padding","10px"],[2,"margin","auto"],[2,"box-shadow","none"],["color","primary"],["matExpansionPanelContent",""],[2,"display","contents",3,"resId"]],template:function(t,e){1&t&&(n.Oc(0,Ho,8,7,"mat-list",0),n.Oc(1,Go,2,0,"div",1),n.Oc(2,qo,8,3,"ng-container",0)),2&t&&(n.oc("ngIf",!e.loading),n.Db(1),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading&&e.hasHistory))},directives:[P.t,R.a,lo.e,P.s,Y.c,J.b,X.d,Ne.d,X.u,X.j,Ne.a,W.p,V.c,W.o,k.b,S.a,Y.j,ii,R.d,lo.a,R.c,W.l,A.b,X.p,X.x,T.a,gt.c,gt.g,gt.h,gt.e,go],pipes:[g.d,P.b,Wt.a,uo,ps],styles:[".mat-form-field-appearance-outline[_ngcontent-%COMP%]{font-size:11px}.visaSignList[_ngcontent-%COMP%] .mat-optgroup-label{color:#135f7f;position:-webkit-sticky;position:sticky;top:0;background:#fff!important;z-index:1}.cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);background:#fff!important;padding:10px}.cdk-drag-preview[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%], .cdk-drag-preview[_ngcontent-%COMP%] .mat-icon-button[_ngcontent-%COMP%]{display:none}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.columns[_ngcontent-%COMP%]:last-child{border:none}.cdk-list.cdk-drop-list-dragging[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.columns[_ngcontent-%COMP%]{cursor:move}.notDraggable[_ngcontent-%COMP%]{cursor:not-allowed}.notEditable[_ngcontent-%COMP%]{cursor:auto}.currentContextButton[_ngcontent-%COMP%]{width:150px;text-align:left}.currentContextButton[_ngcontent-%COMP%], .currentRoleButton[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;font-size:13px}.currentRoleButton[_ngcontent-%COMP%]{width:120px;text-align:center}.emptyContent[_ngcontent-%COMP%]{opacity:.5;text-align:center;font-size:10px;padding:10px}.processed[_ngcontent-%COMP%]{background:rgba(0,104,65,.11)!important}.interrupt[_ngcontent-%COMP%]{background:rgba(142,62,82,.11)!important}.workflow[_ngcontent-%COMP%]{padding-top:10px;padding-bottom:10px;height:auto!important;margin-bottom:10px;background:hsla(0,0%,84.7%,.1);border-radius:10px;font-size:13px}.workflowLine[_ngcontent-%COMP%]{display:flex!important;align-items:center}.workflowLineContainer[_ngcontent-%COMP%]{flex:1}.workflowLineContainer[_ngcontent-%COMP%], .workflowLineLabel[_ngcontent-%COMP%], .workflowLineSubLabel[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis}.workflowLineSubLabel[_ngcontent-%COMP%]{font-size:80%;opacity:.5;flex:1}.workflowLineProcessDate[_ngcontent-%COMP%]{flex:1;text-align:left;font-size:80%}.workflowLine[_ngcontent-%COMP%] .mat-raised-button[disabled][_ngcontent-%COMP%]{background:none;color:#135f7f!important;opacity:1}.avatar[_ngcontent-%COMP%]{border:3px solid #f99830;height:45px!important;width:45px!important;background-size:cover;background-repeat:no-repeat;background-position:50%}.valid[_ngcontent-%COMP%]{color:#006841}.invalid[_ngcontent-%COMP%]{color:#8e3e52}.commentBubble[_ngcontent-%COMP%]{color:#f99830;position:absolute;top:-12px;right:-11px;font-size:20px;cursor:help}.comment[_ngcontent-%COMP%]:disabled{color:#000}.unauthorized[_ngcontent-%COMP%]{color:#8e3e52;text-decoration:line-through}.invalidMsg[_ngcontent-%COMP%]{opacity:.5;width:150px;white-space:break-spaces;text-align:center}"]}),t})();const Yo=["appVisaWorkflow"];let Jo=(()=>{class t{constructor(t,e,i,n){this.translate=t,this.http=e,this.data=i,this.dialogRef=n}ngOnInit(){this.appVisaWorkflow.loadWorkflowMaarchParapheur(this.data.id,this.data.type)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.a),n.Qb(q.h))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(Yo,!0),2&t&&n.yc(i=n.ec())&&(e.appVisaWorkflow=i.first)},decls:7,vars:4,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],[3,"adminMode"],["appVisaWorkflow",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-dialog-content"),n.Rb(5,"app-visa-workflow",2,3),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,2,"lang.externalVisaWorkflow")),n.Db(3),n.oc("adminMode",!1))},directives:[q.i,q.f,Ko],pipes:[g.d],styles:[".avatarAccount[_ngcontent-%COMP%]{border:3px solid #f99830;height:45px!important;width:45px!important;background-size:cover;background-repeat:no-repeat;background-position:50%}"]}),t})();var Zo=i("1G5W");const tr=["searchSelectInput"],er=["test"];function ir(t,e){if(1&t&&(n.Wb(0,"mat-label"),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.label)}}function nr(t,e){if(1&t&&(n.Wb(0,"span",11),n.Qc(1),n.ic(2,"lowercase"),n.ic(3,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Tc(" (+",t.formControlSelect.value.length-1," ",n.jc(2,2,n.jc(3,4,"lang.others")),") ")}}function ar(t,e){if(1&t&&(n.Wb(0,"mat-select-trigger"),n.Qc(1),n.Oc(2,nr,4,6,"span",10),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Sc(" ",t.formControlSelect.value.length>0?t.getFirstDataLabel():""," "),n.Db(1),n.oc("ngIf",(null==t.formControlSelect.value?null:t.formControlSelect.value.length)>1)}}function sr(t,e){1&t&&n.Rb(0,"input",12)}function or(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",18),n.dc("click",(function(){return n.Dc(t),n.hc(2)._reset(!0)})),n.Rb(1,"mat-icon",19),n.Vb()}}function rr(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",20),n.dc("click",(function(){return n.Dc(t),n.hc(2).formControlSearch.setValue("__SELECTED")})),n.ic(1,"translate"),n.Rb(2,"mat-icon",21),n.Vb()}if(2&t){const t=n.hc(2);n.oc("disabled",0===t.formControlSelect.value.length)("title",n.jc(1,2,"lang.displaySelectedValues"))}}const cr=function(t){return{"mat-select-search-inner-multiple":t}};function lr(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",13),n.Wb(1,"input",14,15),n.dc("keydown",(function(e){return n.Dc(t),n.hc()._handleKeydown(e)}))("input",(function(e){return n.Dc(t),n.hc().onInputChange(e.target.value)}))("blur",(function(e){return n.Dc(t),n.hc().onBlur(e.target.value)})),n.ic(3,"translate"),n.Vb(),n.Oc(4,or,2,0,"button",16),n.Oc(5,rr,3,4,"button",17),n.Vb()}if(2&t){const t=n.hc();n.oc("ngClass",n.vc(7,cr,t.matSelect.multiple)),n.Db(1),n.oc("formControl",t.formControlSearch)("placeholder",n.jc(3,5,"lang.filterBy")),n.Db(3),n.oc("ngIf",t.formControlSearch.value),n.Db(1),n.oc("ngIf",t.functions.empty(t.formControlSearch.value)&&t.multiple)}}function dr(t,e){1&t&&(n.Wb(0,"div",22),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noResult")," "))}function hr(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-option",23),n.dc("onSelectionChange",(function(e){return n.Dc(t),n.hc().selectChange(e)})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc();n.oc("value",t.emptyData()),n.Db(1),n.Sc("(",n.jc(2,2,"lang.emptyValue"),")")}}function ur(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-option",24),n.dc("onSelectionChange",(function(e){return n.Dc(t),n.hc().selectChange(e)})),n.Rb(1,"span",25),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc();n.Lc("color",t.color),n.Ib("opt-group",t.isTitle)("fixPos",t.isTitle&&i.datas.length>5),n.oc("value","id"===i.returnValue?t.id:t)("title",void 0!==t.title?t.title:t.label)("disabled",t.disabled),n.Db(1),n.oc("innerHTML",t.label,n.Ec)}}function pr(t,e){if(1&t&&(n.Wb(0,"mat-error"),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Sc(" ",t.getErrorMsg(t.formControlSelect.errors),"")}}function br(t,e){if(1&t&&n.Rb(0,"mat-icon",26),2&t){const t=n.hc();n.Lc("color",t.suffixIcon.color),n.oc("title",void 0!==t.suffixIcon.title?t.suffixIcon.title:"")}}let fr=(()=>{class t{constructor(t,e,i,a,s,o,r){this.translate=t,this.latinisePipe=e,this.changeDetectorRef=i,this.renderer=a,this.appService=s,this.functions=o,this.sortPipe=r,this.placeholderLabel=this.translate.instant("lang.chooseValue"),this.formControlSelect=new X.i,this.datas=[],this.returnValue="id",this.id="",this.showLabel=!1,this.required=!1,this.hideErrorDesc=!0,this.multiple=!1,this.optGroupTarget=null,this.optGroupList=null,this.suffixIcon=null,this.class="input-form",this.afterSelected=new n.o,this.afterOpened=new n.o,this.filteredDatasMulti=new la.a(1),this.datasClone=[],this.isModelModified=!1,this.overlayClassSet=!1,this.change=new n.o,this._onDestroy=new da.a,this.formControlSearch=new X.i,this.selected=[],this.onChange=t=>{},this.onTouched=t=>{}}get value(){return this._value}ngOnInit(){this.multiple&&(this.matSelect.compareWith=(t,e)=>t&&e?t.id===e.id:t===e),null!==this.optGroupList&&this.initOptGroups();const t="mat-select-search-panel";this.matSelect.panelClass?Array.isArray(this.matSelect.panelClass)?this.matSelect.panelClass.push(t):"string"==typeof this.matSelect.panelClass?this.matSelect.panelClass=[this.matSelect.panelClass,t]:"object"==typeof this.matSelect.panelClass&&(this.matSelect.panelClass[t]=!0):this.matSelect.panelClass=t,this.matSelect.openedChange.pipe(Object(Zo.a)(this._onDestroy)).subscribe(t=>{t?this.appService.getViewMode()||this._focus():this.formControlSearch.reset()}),this.matSelect.openedChange.pipe(Object(ro.a)(1)).pipe(Object(Zo.a)(this._onDestroy)).subscribe(()=>{this._options=this.matSelect.options,this._options.changes.pipe(Object(Zo.a)(this._onDestroy)).subscribe(()=>{const t=this.matSelect._keyManager;t&&this.matSelect.panelOpen&&setTimeout(()=>{t.setFirstItemActive()})})});let e="";this.datasClone=JSON.parse(JSON.stringify(this.datas)),this.datasClone.forEach((t,i)=>{t.isTitle?(e="group_"+i,t.id=e,i++):t.group=e}),this.filteredDatas=this.formControlSearch.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>this._filter(t)))}ngDoCheck(){if(this.datasClone.length!==this.datas.length||0===this.datasClone.length&&this.isModelModified){this.datasClone=JSON.parse(JSON.stringify(this.datas));let t="",e=1;this.datasClone.forEach(i=>{i.isTitle?(t="group_"+e,i.id=t,e++):i.group=t}),this.filteredDatas=this.formControlSearch.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>this._filter(t))),this.isModelModified=!1}}initOptGroups(){this.datas.unshift({id:0,label:"toto",disabled:!0});let t=[];this.optGroupList=this.sortPipe.transform(this.optGroupList,"label"),this.optGroupList.forEach(e=>{t.push({id:e.id,label:e.label,disabled:!0}),t=t.concat(this.datas.filter(t=>t[this.optGroupTarget]===e.id).map(t=>Object.assign(Object.assign({},t),{title:t.label,label:"  "+t.label})))}),this.datas=t}ngOnDestroy(){this._onDestroy.next(),this._onDestroy.complete()}ngAfterViewInit(){this.datas.length>5&&this.setOverlayClass()}_handleKeydown(t){32===t.keyCode&&t.stopPropagation()}writeValue(t){t!==this._value&&(this._value=t,this.change.emit(t))}onInputChange(t){t!==this._value&&(this._value=t,this.onChange(t),this.change.emit(t))}onBlur(t){this.writeValue(t),this.onTouched()}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}_focus(){const t=this.matSelect.panel.nativeElement,e=t.scrollTop;this.datas.length>5&&this.renderer.selectRootElement("#searchSelectInput").focus(),t.scrollTop=e}_reset(t){this.formControlSearch.reset(),this.renderer.selectRootElement("#searchSelectInput").focus()}setOverlayClass(){this.overlayClassSet||(this.matSelect.overlayDir.attach.pipe(Object(Zo.a)(this._onDestroy)).subscribe(()=>{void 0!==this.searchSelectInput&&this.searchSelectInput.nativeElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList.add("cdk-overlay-pane-select-search")}),this.overlayClassSet=!0)}initMultipleHandling(){this.matSelect.valueChange.pipe(Object(Zo.a)(this._onDestroy)).subscribe(t=>{if(this.matSelect.multiple){let e=!1;if(this._value&&this._value.length&&this.previousSelectedValues&&Array.isArray(this.previousSelectedValues)){t&&Array.isArray(t)||(t=[]);const i=this.matSelect.options.map(t=>t.value);this.previousSelectedValues.forEach(n=>{-1===t.indexOf(n)&&-1===i.indexOf(n)&&(t.push(n),e=!0)})}e&&this.matSelect._onChange(t),this.previousSelectedValues=t}})}_filter(t,e=!1){if("__SELECTED"===t)return this.datas.filter("id"===this.returnValue?t=>this.formControlSelect.value.indexOf(t.id)>-1:t=>this.formControlSelect.value.map(t=>t.id).indexOf(t.id)>-1);if("string"==typeof t&&""!==t){const e=this.latinisePipe.transform(t.toLowerCase()),i=this.datasClone.filter(t=>t.isTitle&&this.latinisePipe.transform(t.label.toLowerCase()).includes(e)).map(t=>t.id);return this.datasClone.filter(t=>t.isTitle&&i.indexOf(t.id)>-1||i.indexOf(t.group)>-1||this.latinisePipe.transform(t.label.toLowerCase()).includes(e))}return this.datas}launchEvent(t){if(this.selected.length>0){const t=new Set(this.formControlSelect.value.map(t=>t.id)),e=[...this.formControlSelect.value,...this.selected.filter(e=>!t.has(e.id))];this.formControlSelect.setValue(e)}void 0!==this.afterSelected&&this.afterSelected.emit(t.value)}selectChange(t){this.multiple&&t.isUserInput&&(this.selected=t.source._selected?this.formControlSelect.value:this.selected.length>0?this.selected.filter(e=>e.id!==t.source.value.id):[])}getErrorMsg(t){return void 0!==t.required?this.translate.instant("lang.requiredField"):void 0!==t.pattern||void 0!==t.email?this.translate.instant("lang.badFormat"):"unknow validator"}getFirstDataLabel(){return this.formControlSelect.value[0].label.replace(/ /g,"")}emptyData(){return"id"===this.returnValue?null:{id:null,label:this.translate.instant("lang.emptyValue")}}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(Tt.c),n.Qb(n.h),n.Qb(n.I),n.Qb(w.a),n.Qb(_t.a),n.Qb(Wt.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["plugin-select-search"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(tr,!0,n.l),n.Kc(er,!0)),2&t&&(n.yc(i=n.ec())&&(e.searchSelectInput=i.first),n.yc(i=n.ec())&&(e.matSelect=i.first))},inputs:{placeholderLabel:"placeholderLabel",formControlSelect:"formControlSelect",datas:"datas",returnValue:"returnValue",label:"label",id:"id",showResetOption:"showResetOption",showLabel:"showLabel",required:"required",hideErrorDesc:"hideErrorDesc",multiple:"multiple",optGroupTarget:"optGroupTarget",optGroupList:"optGroupList",suffixIcon:"suffixIcon",class:"class"},outputs:{afterSelected:"afterSelected",afterOpened:"afterOpened"},features:[n.Cb([Wt.a])],decls:13,vars:19,consts:[[3,"floatLabel"],[4,"ngIf"],[3,"id","formControl","placeholder","required","multiple","selectionChange"],["test",""],["matInput","","class","mat-select-search-input mat-select-search-hidden",4,"ngIf"],["class","mat-select-search-inner",3,"ngClass",4,"ngIf"],["class","mat-select-search-no-entries-found",4,"ngIf"],[3,"value","onSelectionChange",4,"ngIf"],[3,"value","title","disabled","opt-group","fixPos","color","onSelectionChange",4,"ngFor","ngForOf"],["style","height: auto;","matSuffix","","class","fas fa-circle selectSuffixIcon",3,"color","title",4,"ngIf"],["class","multipleLabels",4,"ngIf"],[1,"multipleLabels"],["matInput","",1,"mat-select-search-input","mat-select-search-hidden"],[1,"mat-select-search-inner",3,"ngClass"],["id","searchSelectInput",1,"mat-select-search-input",3,"formControl","placeholder","keydown","input","blur"],["searchSelectInput",""],["mat-button","","mat-icon-button","","aria-label","Clear","class","mat-select-search-clear",3,"click",4,"ngIf"],["color","primary","mat-icon-button","","class","mat-select-search-clear",3,"disabled","title","click",4,"ngIf"],["mat-button","","mat-icon-button","","aria-label","Clear",1,"mat-select-search-clear",3,"click"],[1,"fa","fa-times"],["color","primary","mat-icon-button","",1,"mat-select-search-clear",3,"disabled","title","click"],[1,"fas","fa-check-double"],[1,"mat-select-search-no-entries-found"],[3,"value","onSelectionChange"],[3,"value","title","disabled","onSelectionChange"],[3,"innerHTML"],["matSuffix","",1,"fas","fa-circle","selectSuffixIcon",2,"height","auto",3,"title"]],template:function(t,e){1&t&&(n.Wb(0,"mat-form-field",0),n.Oc(1,ir,2,1,"mat-label",1),n.Wb(2,"mat-select",2,3),n.dc("selectionChange",(function(t){return e.launchEvent(t)})),n.Oc(4,ar,3,2,"mat-select-trigger",1),n.Oc(5,sr,1,0,"input",4),n.Oc(6,lr,6,9,"div",5),n.Oc(7,dr,3,3,"div",6),n.Oc(8,hr,3,4,"mat-option",7),n.Oc(9,ur,2,10,"mat-option",8),n.ic(10,"async"),n.Vb(),n.Oc(11,pr,2,1,"mat-error",1),n.Oc(12,br,1,3,"mat-icon",9),n.Vb()),2&t&&(n.Fb(e.class+" search-select"),n.oc("floatLabel",e.appService.getViewMode()||e.showLabel?"":"never"),n.Db(1),n.oc("ngIf",e.appService.getViewMode()||e.showLabel),n.Db(1),n.oc("id",e.id)("formControl",e.formControlSelect)("placeholder",e.placeholderLabel)("required",e.required)("multiple",e.multiple),n.Db(2),n.oc("ngIf",e.multiple),n.Db(1),n.oc("ngIf",e.datas.length>5),n.Db(1),n.oc("ngIf",e.datas.length>5),n.Db(1),n.oc("ngIf",e.value&&0===(null==e._options?null:e._options.length)&&e.datas.length>5),n.Db(1),n.oc("ngIf",e.showResetOption),n.Db(1),n.oc("ngForOf",n.jc(10,17,e.filteredDatas)),n.Db(2),n.oc("ngIf","VALID"!==e.formControlSelect.status&&e.formControlSelect.touched&&!e.hideErrorDesc),n.Db(1),n.oc("ngIf",null!==e.suffixIcon))},directives:[Y.c,P.t,ee.a,X.u,X.j,X.F,P.s,Y.g,ee.c,J.b,P.q,X.d,k.b,S.a,W.p,Y.b,Y.j],pipes:[P.b,P.p,g.d],styles:[".mat-select-search-hidden[_ngcontent-%COMP%]{visibility:hidden}.mat-select-search-inner[_ngcontent-%COMP%]{position:absolute;top:0;width:calc(100% + 15px);border-bottom:1px solid #ccc;background:#fff;z-index:100}.mat-select-search-inner.mat-select-search-inner-multiple[_ngcontent-%COMP%]{width:calc(100% + 48px)} .mat-select-search-panel{transform:none!important;max-height:350px!important;max-width:inherit!important}.mat-select-search-input[_ngcontent-%COMP%]{padding:16px 36px 16px 16px;box-sizing:border-box;width:100%;border:none}.mat-select-search-no-entries-found[_ngcontent-%COMP%]{padding:16px}.mat-select-search-clear[_ngcontent-%COMP%]{position:absolute;right:0;top:4px} .cdk-overlay-pane-select-search{margin-top:-50px}.mat-error[_ngcontent-%COMP%]{font-weight:700}.mat-error[_ngcontent-%COMP%], .selectSuffixIcon[_ngcontent-%COMP%]{font-size:10px;text-align:right}.search-select[_ngcontent-%COMP%] .mat-selected:not(.mat-option-disabled){font-weight:700}.opt-group[_ngcontent-%COMP%]{position:-webkit-sticky;position:sticky;top:0;background:#fff;z-index:1}.opt-group[_ngcontent-%COMP%] .mat-pseudo-checkbox{display:none}.fixPos[_ngcontent-%COMP%]{top:50px!important}.multipleLabels[_ngcontent-%COMP%]{color:#f99830}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();function mr(t,e){1&t&&(n.Wb(0,"div",7),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.checkOnlyofficeServer"),"..."))}function gr(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",8),n.dc("click",(function(){return n.Dc(t),n.hc().quit()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",9),n.Vb()}if(2&t){const t=n.hc();n.Ib("buttonsHide",t.hideButtons)("fullScreen",t.fullscreenMode),n.oc("title",n.jc(1,5,"lang.closeEditor"))}}i("XxY3");let vr=(()=>{class t{constructor(t,e,i,a,s){this.translate=t,this.http=e,this.dialog=i,this.notify=a,this.headerService=s,this.loading=!0,this.editMode=!1,this.file={},this.params={},this.hideCloseEditor=!1,this.triggerAfterUpdatedDoc=new n.o,this.triggerCloseEditor=new n.o,this.triggerModifiedDocument=new n.o,this.key="",this.documentLoaded=!1,this.canUpdateDocument=!1,this.isSaving=!1,this.fullscreenMode=!1,this.tmpFilename="",this.appUrl="",this.onlyOfficeUrl="",this.hideButtons=!1,this.allowedExtension=["doc","docx","dotx","odt","ott","rtf","txt","html","xlsl","xlsx","xltx","ods","ots","csv"],this.eventAction=new da.a}onMessage(t){const e=JSON.parse(t.data);"onDownloadAs"===e.event?this.getEncodedDocument(e.data):"onDocumentReady"===e.event&&this.triggerModifiedDocument.emit()}quit(){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.close"),msg:this.translate.instant("lang.confirmCloseEditor")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.docEditor.destroyEditor(),this.closeEditor()})).subscribe()}closeEditor(){null===this.headerService.sideNavLeft||this.headerService.hideSideBar||this.headerService.sideNavLeft.open(),$("iframe[name='frameEditor']").css("position","initial"),this.fullscreenMode=!1,this.triggerAfterUpdatedDoc.emit(),this.triggerCloseEditor.emit()}getDocument(){this.isSaving=!0,this.docEditor.downloadAs(this.file.format)}getEncodedDocument(t){this.http.get("../rest/onlyOffice/encodedFile",{params:{url:t}}).pipe(Object(mt.a)(t=>{this.file.content=t.encodedFile,this.isSaving=!1,this.triggerAfterUpdatedDoc.emit(),this.eventAction.next(this.file)})).subscribe()}getEditorMode(t){return["csv","fods","ods","ots","xls","xlsm","xlsx","xlt","xltm","xltx"].indexOf(t)>-1?"spreadsheet":["fodp","odp","otp","pot","potm","potx","pps","ppsm","ppsx","ppt","pptm","pptx"].indexOf(t)>-1?"presentation":"text"}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.key=this.generateUniqueId(),this.canLaunchOnlyOffice()&&(yield this.getServerConfiguration(),yield this.checkServerStatus(),yield this.getMergedFileTemplate(),this.setEditorConfig(),yield this.getTokenOOServer(),this.initOfficeEditor(),this.loading=!1)}))}canLaunchOnlyOffice(){return!!this.isAllowedEditExtension(this.file.format)||(this.notify.error(this.translate.instant("lang.onlyofficeEditDenied")+" <b>"+this.file.format+"</b> "+this.translate.instant("lang.onlyofficeEditDenied2")),this.triggerCloseEditor.emit(),!1)}getServerConfiguration(){return new Promise((t,e)=>{this.http.get("../rest/onlyOffice/configuration").pipe(Object(mt.a)(e=>{if(e.enabled){const i=e.serverUri.split("/"),n=e.serverSsl?"https://":"http://",a=e.serverUri.split("/")[0],s=i.slice(1).join("/"),o=[a+(e.serverPort?":"+e.serverPort:":80"),s].join("/");this.onlyOfficeUrl=`${n}${o}`,this.appUrl=e.coreUrl,t(!0)}else this.triggerCloseEditor.emit()}),Object(m.a)(t=>(this.notify.handleErrors(t),this.triggerCloseEditor.emit(),Object(c.a)(!1)))).subscribe()})}checkServerStatus(){return new Promise((t,e)=>{null!==this.appUrl.match(/127\.0\.0\.1/g)||null!==this.appUrl.match(/localhost/g)?(this.notify.error(""+this.translate.instant("lang.errorOnlyoffice1")),this.triggerCloseEditor.emit()):this.http.get("../rest/onlyOffice/available").pipe(Object(mt.a)(e=>{e.isAvailable?t(!0):(this.notify.error(`${this.translate.instant("lang.errorOnlyoffice2")} ${this.onlyOfficeUrl}`),this.triggerCloseEditor.emit())}),Object(m.a)(t=>(this.notify.error(this.translate.instant("lang."+t.error.lang)),this.triggerCloseEditor.emit(),Object(c.a)(!1)))).subscribe()})}getMergedFileTemplate(){return new Promise((t,e)=>{this.http.post("../"+this.params.docUrl,{objectId:this.params.objectId,objectType:this.params.objectType,format:this.file.format,onlyOfficeKey:this.key,data:this.params.dataToMerge}).pipe(Object(mt.a)(e=>{this.tmpFilename=e.filename,this.file={name:this.key,format:e.filename.split(".").pop(),type:null,contentMode:"base64",content:null,src:null},t(!0)}),Object(m.a)(t=>(this.notify.handleErrors(t),this.triggerCloseEditor.emit(),Object(c.a)(!1)))).subscribe()})}generateUniqueId(t=5){let e="";const i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=i.length;for(let a=0;a<t;a++)e+=i.charAt(Math.floor(Math.random()*n));return e}ngAfterViewInit(){}initOfficeEditor(){this.docEditor=new DocsAPI.DocEditor("placeholder",this.editorConfig,this.onlyOfficeUrl)}getTokenOOServer(){return new Promise((t,e)=>{this.http.post("../rest/onlyOffice/token",{config:this.editorConfig}).pipe(Object(mt.a)(e=>{null!==e&&(this.editorConfig.token=e),t(!0)}),Object(m.a)(t=>(this.notify.handleErrors(t),this.triggerCloseEditor.emit(),Object(c.a)(!1)))).subscribe()})}setEditorConfig(){this.editorConfig={documentType:this.getEditorMode(this.file.format),document:{fileType:this.file.format,key:this.key,title:"Edition",url:`${this.appUrl}${this.params.docUrl}?filename=${this.tmpFilename}`,permissions:{comment:!1,download:!0,edit:this.editMode,print:!0,review:!1}},editorConfig:{callbackUrl:this.appUrl+"rest/onlyOfficeCallback",lang:this.translate.instant("lang.language"),region:this.translate.instant("lang.langISO"),mode:"edit",customization:{chat:!1,comments:!1,compactToolbar:!1,feedback:!1,forcesave:!1,goback:!1,hideRightMenu:!0,showReviewChanges:!1,zoom:-2},user:{id:"1",name:" "}}}}isLocked(){return!!this.isSaving}getFile(){return this.getDocument(),this.eventAction.asObservable()}ngOnDestroy(){this.eventAction.complete()}openFullscreen(){$("iframe[name='frameEditor']").css("top","0px"),$("iframe[name='frameEditor']").css("left","0px"),this.fullscreenMode?(null===this.headerService.sideNavLeft||this.headerService.hideSideBar||this.headerService.sideNavLeft.open(),$("iframe[name='frameEditor']").css("position","initial"),$("iframe[name='frameEditor']").css("z-index","1")):(null!==this.headerService.sideNavLeft&&this.headerService.sideNavLeft.close(),$("iframe[name='frameEditor']").css("position","fixed"),$("iframe[name='frameEditor']").css("z-index","2")),this.fullscreenMode=!this.fullscreenMode}isAllowedEditExtension(t){return this.allowedExtension.filter(e=>e.toLowerCase()===t.toLowerCase()).length>0}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.b),n.Qb(D.a),n.Qb(y.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["onlyoffice-viewer"]],hostBindings:function(t,e){1&t&&n.dc("message",(function(t){return e.onMessage(t)}),!1,n.Cc)},inputs:{editMode:"editMode",file:"file",params:"params",hideCloseEditor:"hideCloseEditor"},outputs:{triggerAfterUpdatedDoc:"triggerAfterUpdatedDoc",triggerCloseEditor:"triggerCloseEditor",triggerModifiedDocument:"triggerModifiedDocument"},decls:11,vars:24,consts:[["style","display:block;padding: 10px;",4,"ngIf"],["class","onlyofficeButton_fullscreen","mat-mini-fab","","color","warn",3,"buttonsHide","fullScreen","title","click",4,"ngIf"],["mat-mini-fab","","color","default",1,"onlyofficeButton_close",3,"title","click"],[1,"fas",2,"height","auto"],["mat-mini-fab","","color","default",1,"onlyofficeButton_hide",3,"title","click"],[1,"fa","fa-arrow-right",2,"height","auto"],["id","placeholder"],[2,"display","block","padding","10px"],["mat-mini-fab","","color","warn",1,"onlyofficeButton_fullscreen",3,"title","click"],[1,"fa","fa-times",2,"height","auto"]],template:function(t,e){1&t&&(n.Oc(0,mr,3,3,"div",0),n.Oc(1,gr,3,7,"button",1),n.Wb(2,"button",2),n.dc("click",(function(){return e.openFullscreen()})),n.ic(3,"translate"),n.ic(4,"translate"),n.Rb(5,"mat-icon",3),n.Vb(),n.Wb(6,"button",4),n.dc("click",(function(){return e.hideButtons=!e.hideButtons})),n.ic(7,"translate"),n.ic(8,"translate"),n.Rb(9,"mat-icon",5),n.Vb(),n.Rb(10,"div",6)),2&t&&(n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.hideCloseEditor),n.Db(1),n.Ib("buttonsHide",e.hideButtons)("fullScreen",e.fullscreenMode),n.oc("title",e.fullscreenMode?n.jc(3,16,"lang.closeFullscreen"):n.jc(4,18,"lang.openFullscreen")),n.Db(3),n.Ib("fa-expand",!e.fullscreenMode)("fa-compress",e.fullscreenMode),n.Db(1),n.Ib("fullScreen",e.fullscreenMode)("buttonsHide",e.hideButtons),n.oc("title",e.hideButtons?n.jc(8,22,"lang.showTool"):n.jc(7,20,"lang.hideTool")))},directives:[P.t,k.b,S.a],pipes:[g.d],styles:[".onlyofficeButton_close[_ngcontent-%COMP%], .onlyofficeButton_fullscreen[_ngcontent-%COMP%], .onlyofficeButton_hide[_ngcontent-%COMP%], .onlyofficeButton_show[_ngcontent-%COMP%]{position:absolute;top:12px;z-index:3;transition:all .5s}.onlyofficeButton_fullscreen[_ngcontent-%COMP%]{right:6px}.onlyofficeButton_close[_ngcontent-%COMP%]{right:56px}.onlyofficeButton_hide[_ngcontent-%COMP%]{right:106px}.onlyofficeButton_show[_ngcontent-%COMP%]{right:-15px}.fullScreen[_ngcontent-%COMP%]{position:fixed}.fullScreenEditor[_ngcontent-%COMP%]{top:0;left:0}.buttonsHide[_ngcontent-%COMP%]{top:-15px;right:-15px;transform:rotate(125deg);transition:all .5s}"]}),t})();const _r=["collaboraFrame"];function yr(t,e){1&t&&(n.Wb(0,"div",8),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.checkCollaboraOnlineServer"),"..."))}function xr(t,e){if(1&t&&n.Rb(0,"iframe",9,10),2&t){const t=n.hc();n.oc("src",t.editorUrl,n.Fc)}}let Cr=(()=>{class t{constructor(t,e,i,a,s,o){this.translate=t,this.http=e,this.dialog=i,this.notify=a,this.sanitizer=s,this.headerService=o,this.loading=!0,this.editMode=!1,this.file={},this.params={},this.triggerAfterUpdatedDoc=new n.o,this.triggerCloseEditor=new n.o,this.triggerModifiedDocument=new n.o,this.key=0,this.isSaving=!1,this.isModified=!1,this.fullscreenMode=!1,this.hideButtons=!1,this.allowedExtension=["doc","docx","dotx","odt","ott","rtf","txt","html","xlsl","xlsx","xltx","ods","ots","csv"],this.eventAction=new da.a,this.editorUrl="",this.token=""}onMessage(t){const e=JSON.parse(t.data);"Doc_ModifiedStatus"===e.MessageId&&!1===e.Values.Modified&&(this.isModified=!1),"Action_Save_Resp"!==e.MessageId||!0!==e.Values.success||this.isModified?"Doc_ModifiedStatus"===e.MessageId&&!1===e.Values.Modified&&this.isSaving?(this.triggerAfterUpdatedDoc.emit(),this.getTmpFile()):"Doc_ModifiedStatus"===e.MessageId&&!0===e.Values.Modified?(this.isModified=!0,this.triggerModifiedDocument.emit()):"App_LoadingStatus"===e.MessageId&&"Document_Loaded"===e.Values.Status&&this.collaboraFrame.nativeElement.contentWindow.postMessage(JSON.stringify({MessageId:"Host_PostmessageReady"}),"*"):setTimeout(()=>{this.triggerAfterUpdatedDoc.emit(),this.getTmpFile()},500)}quit(){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.close"),msg:this.translate.instant("lang.confirmCloseEditor")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.closeEditor()})).subscribe()}closeEditor(){null===this.headerService.sideNavLeft||this.headerService.hideSideBar||this.headerService.sideNavLeft.open(),$("iframe[name='frameEditor']").css("position","initial"),this.fullscreenMode=!1,this.collaboraFrame.nativeElement.contentWindow.postMessage(JSON.stringify({MessageId:"Action_Close",Values:null}),"*"),this.deleteTmpFile(),this.triggerAfterUpdatedDoc.emit(),this.triggerCloseEditor.emit()}saveDocument(){this.isSaving=!0,this.collaboraFrame.nativeElement.contentWindow.postMessage(JSON.stringify({MessageId:"Action_Save",Values:{Notify:!0,ExtendedData:"FinalSave=True",DontTerminateEdit:!0,DontSaveIfUnmodified:!1}}),"*")}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.key=this.generateUniqueId(10),this.canLaunchCollaboraOnline()&&(yield this.checkServerStatus(),this.params.objectPath=void 0,"string"!=typeof this.params.objectId||"templateModification"!==this.params.objectType&&"templateCreation"!==this.params.objectType?"string"==typeof this.params.objectId&&"encodedResource"===this.params.objectType&&(this.params.content=this.params.objectId,this.params.objectId=this.key,this.params.objectType="templateEncoded",yield this.saveEncodedFile()):(this.params.objectPath=this.params.objectId,this.params.objectId=this.key),yield this.getConfiguration(),this.loading=!1)}))}canLaunchCollaboraOnline(){return!!this.isAllowedEditExtension(this.file.format)||(this.notify.error(this.translate.instant("lang.onlyofficeEditDenied")+" <b>"+this.file.format+"</b> "+this.translate.instant("lang.collaboraOnlineEditDenied2")),this.triggerCloseEditor.emit(),!1)}checkServerStatus(){return new Promise(t=>{"127.0.0.1"===location.host||"localhost"===location.host?(this.notify.error(""+this.translate.instant("lang.errorCollaboraOnline1")),this.triggerCloseEditor.emit()):this.http.get("../rest/collaboraOnline/available").pipe(Object(mt.a)(e=>{e.isAvailable?t(!0):(this.notify.error(""+this.translate.instant("lang.errorCollaboraOnline2")),this.triggerCloseEditor.emit())}),Object(m.a)(t=>(this.notify.error(this.translate.instant("lang."+t.error.lang)),this.triggerCloseEditor.emit(),Object(c.a)(!1)))).subscribe()})}getTmpFile(){return new Promise(t=>{this.http.post("../rest/collaboraOnline/file",{token:this.token}).pipe(Object(mt.a)(e=>{this.file={name:this.key,format:e.format,type:null,contentMode:"base64",content:e.content,src:null},this.eventAction.next(this.file),t(!0)}),Object(m.a)(t=>(this.notify.handleErrors(t),this.triggerCloseEditor.emit(),Object(c.a)(!1)))).subscribe()})}deleteTmpFile(){return new Promise(t=>{this.http.delete("../rest/collaboraOnline/file?token="+this.token).pipe(Object(mt.a)(()=>{t(!0)}),Object(m.a)(t=>(this.notify.handleErrors(t),this.triggerCloseEditor.emit(),Object(c.a)(!1)))).subscribe()})}saveEncodedFile(){return new Promise(t=>{this.http.post("../rest/collaboraOnline/encodedFile",{content:this.params.content,format:this.file.format,key:this.key}).pipe(Object(mt.a)(()=>{t(!0)}),Object(m.a)(t=>(this.notify.handleErrors(t),this.triggerCloseEditor.emit(),Object(c.a)(!1)))).subscribe()})}generateUniqueId(t=5){let e="";const i="0123456789".length;for(let n=0;n<t;n++)e+="0123456789".charAt(Math.floor(Math.random()*i));return parseInt(e,10)}ngAfterViewInit(){}getConfiguration(){return new Promise(t=>{this.http.post("../rest/collaboraOnline/configuration",{resId:this.params.objectId,type:this.params.objectType,format:this.file.format,path:this.params.objectPath,data:this.params.dataToMerge,lang:this.translate.instant("lang.langISO")}).pipe(Object(mt.a)(e=>{this.editorUrl=e.url,this.editorUrl=this.sanitizer.bypassSecurityTrustResourceUrl(this.editorUrl),this.token=e.token,t(!0)}),Object(m.a)(t=>(this.notify.handleErrors(t),this.triggerCloseEditor.emit(),Object(c.a)(!1)))).subscribe()})}getFile(){return this.saveDocument(),this.eventAction.asObservable()}ngOnDestroy(){this.eventAction.complete()}openFullscreen(){const t=$("iframe[name='frameEditor']");t.css("top","0px"),t.css("left","0px"),this.fullscreenMode?(null===this.headerService.sideNavLeft||this.headerService.hideSideBar||this.headerService.sideNavLeft.open(),t.css("position","initial"),t.css("z-index","1")):(null!==this.headerService.sideNavLeft&&this.headerService.sideNavLeft.close(),t.css("position","fixed"),t.css("z-index","2")),this.fullscreenMode=!this.fullscreenMode}isAllowedEditExtension(t){return this.allowedExtension.filter(e=>e.toLowerCase()===t.toLowerCase()).length>0}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.b),n.Qb(D.a),n.Qb(ca.b),n.Qb(y.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-collabora-online-viewer"]],viewQuery:function(t,e){var i;1&t&&n.Xc(_r,!0),2&t&&n.yc(i=n.ec())&&(e.collaboraFrame=i.first)},hostBindings:function(t,e){1&t&&n.dc("message",(function(t){return e.onMessage(t)}),!1,n.Cc)},inputs:{editMode:"editMode",file:"file",params:"params"},outputs:{triggerAfterUpdatedDoc:"triggerAfterUpdatedDoc",triggerCloseEditor:"triggerCloseEditor",triggerModifiedDocument:"triggerModifiedDocument"},decls:13,vars:31,consts:[["style","display:block;padding: 10px;",4,"ngIf"],["mat-mini-fab","","color","warn",1,"collaboraOnlineButton_fullscreen",3,"title","click"],[1,"fa","fa-times",2,"height","auto"],["mat-mini-fab","","color","default",1,"collaboraOnlineButton_close",3,"title","click"],[1,"fas",2,"height","auto"],["mat-mini-fab","","color","default",1,"collaboraOnlineButton_hide",3,"title","click"],[1,"fa","fa-arrow-right",2,"height","auto"],["id","collabora","width","100%","height","100%","name","frameEditor",3,"src",4,"ngIf"],[2,"display","block","padding","10px"],["id","collabora","width","100%","height","100%","name","frameEditor",3,"src"],["collaboraFrame",""]],template:function(t,e){1&t&&(n.Oc(0,yr,3,3,"div",0),n.Wb(1,"button",1),n.dc("click",(function(){return e.quit()})),n.ic(2,"translate"),n.Rb(3,"mat-icon",2),n.Vb(),n.Wb(4,"button",3),n.dc("click",(function(){return e.openFullscreen()})),n.ic(5,"translate"),n.ic(6,"translate"),n.Rb(7,"mat-icon",4),n.Vb(),n.Wb(8,"button",5),n.dc("click",(function(){return e.hideButtons=!e.hideButtons})),n.ic(9,"translate"),n.ic(10,"translate"),n.Rb(11,"mat-icon",6),n.Vb(),n.Oc(12,xr,2,1,"iframe",7)),2&t&&(n.oc("ngIf",e.loading),n.Db(1),n.Ib("buttonsHide",e.hideButtons)("fullScreen",e.fullscreenMode),n.oc("title",n.jc(2,21,"lang.closeEditor")),n.Db(3),n.Ib("buttonsHide",e.hideButtons)("fullScreen",e.fullscreenMode),n.oc("title",e.fullscreenMode?n.jc(5,23,"lang.closeFullscreen"):n.jc(6,25,"lang.openFullscreen")),n.Db(3),n.Ib("fa-expand",!e.fullscreenMode)("fa-compress",e.fullscreenMode),n.Db(1),n.Ib("buttonsHide",e.hideButtons)("fullScreen",e.fullscreenMode),n.oc("title",e.hideButtons?n.jc(10,29,"lang.showTool"):n.jc(9,27,"lang.hideTool")),n.Db(4),n.oc("ngIf",""!==e.editorUrl))},directives:[P.t,k.b,S.a],pipes:[g.d],styles:[".collaboraOnlineButton_close[_ngcontent-%COMP%], .collaboraOnlineButton_fullscreen[_ngcontent-%COMP%], .collaboraOnlineButton_hide[_ngcontent-%COMP%], .collaboraOnlineButton_show[_ngcontent-%COMP%]{position:absolute;top:12px;z-index:3;transition:all .5s}.collaboraOnlineButton_fullscreen[_ngcontent-%COMP%]{right:6px}.collaboraOnlineButton_close[_ngcontent-%COMP%]{right:56px}.collaboraOnlineButton_hide[_ngcontent-%COMP%]{right:106px}.collaboraOnlineButton_show[_ngcontent-%COMP%]{right:-15px}.fullScreen[_ngcontent-%COMP%]{position:fixed}.fullScreenEditor[_ngcontent-%COMP%]{top:0;left:0}.buttonsHide[_ngcontent-%COMP%]{top:-15px;right:-15px;transform:rotate(125deg);transition:all .5s}"]}),t})();const Or=["templateList"],Dr=["onlyofficeViewer"],wr=["collaboraOnlineViewer"];function Mr(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"div",3),n.Rb(2,"i",4),n.Wb(3,"div"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Wb(6,"div"),n.Wb(7,"button",5),n.dc("click",(function(){return n.Dc(t),n.hc().cancelTemplateEdition()})),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Tb()}2&t&&(n.Db(4),n.Sc(" ",n.jc(5,2,"lang.editInProgress")," "),n.Db(4),n.Rc(n.jc(9,4,"lang.cancel")))}function kr(t,e){1&t&&(n.Ub(0),n.Wb(1,"div",8),n.Rb(2,"i",9),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Tb()),2&t&&(n.Db(3),n.Sc(" ",n.jc(4,1,"lang.noFile")," "))}function Sr(t,e){if(1&t&&(n.Wb(0,"div",18),n.Rb(1,"mat-progress-spinner",19),n.Wb(2,"div",20),n.Qc(3),n.Vb(),n.Wb(4,"div",21),n.Qc(5),n.Vb(),n.Vb()),2&t){const t=n.hc(3);n.Db(1),n.oc("mode",t.loadingInfo.mode)("value",t.loadingInfo.percent),n.Db(2),n.Sc("",t.loadingInfo.percent," %"),n.Db(2),n.Rc(t.loadingInfo.message)}}function Ir(t,e){if(1&t){const t=n.Xb();n.Wb(0,"plugin-select-search",28,29),n.dc("afterSelected",(function(e){return n.Dc(t),n.hc(4).editTemplate(e)})),n.ic(2,"translate"),n.ic(3,"translate"),n.Vb()}if(2&t){const t=n.hc(4);n.Fb("input-form-filled"),n.oc("label",n.jc(2,6,"lang.chooseModel"))("placeholderLabel",n.jc(3,8,"lang.chooseModel"))("datas",t.listTemplates)("formControlSelect",t.templateListForm)}}function Pr(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",22),n.dc("onFileDropped",(function(e){return n.Dc(t),n.hc(3).dndUploadFile(e)})),n.Rb(1,"i",23),n.Rb(2,"br"),n.Qc(3),n.ic(4,"translate"),n.Rb(5,"br"),n.Qc(6),n.ic(7,"translate"),n.Wb(8,"div",24),n.Wb(9,"div",25),n.Oc(10,Ir,4,10,"plugin-select-search",26),n.Vb(),n.Wb(11,"button",27),n.dc("click",(function(){return n.Dc(t),n.hc(),n.zc(3).click()})),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(3);n.oc("disabled",!t.editMode),n.Db(3),n.Sc(" ",n.jc(4,5,"lang.dragAndDrop"),""),n.Db(3),n.Sc("",n.jc(7,7,"lang.or")," "),n.Db(4),n.oc("ngIf",t.listTemplates.length>0),n.Db(2),n.Rc(n.jc(13,9,"lang.chooseFile"))}}function Vr(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",38),n.dc("click",(function(){return n.Dc(t),n.hc(4).editResource()})),n.ic(1,"translate"),n.ic(2,"translate"),n.Rb(3,"mat-icon",39),n.Vb()}if(2&t){const t=n.hc(4);n.Ib("disabledButton",!t.functions.empty(t.file.subinfos)&&t.file.subinfos.signedDocVersions),n.oc("disabled",!t.functions.empty(t.file.subinfos)&&t.file.subinfos.signedDocVersions)("matTooltip",t.functions.empty(t.file.subinfos)||!t.functions.empty(t.file.subinfos)&&!t.file.subinfos.signedDocVersions?n.jc(1,4,"lang.editDocument"):n.jc(2,6,"lang.documentSignedMsg"))}}function Rr(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",40),n.dc("click",(function(){return n.Dc(t),n.hc(4).openPdfInTab()})),n.Rb(1,"mat-icon",41),n.Wb(2,"span"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(3),n.Rc(n.jc(4,1,"lang.openInExternalModal")))}function jr(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",40),n.dc("click",(function(){return n.Dc(t),n.hc(4).openMaarchParapheurWorkflow()})),n.Rb(1,"mat-icon",42),n.Wb(2,"span"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(3),n.Rc(n.jc(4,1,"lang.externalVisaWorkflow")))}function Ar(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",40),n.dc("click",(function(){return n.Dc(t),n.hc(2),n.zc(3).click()})),n.Rb(1,"mat-icon",43),n.Wb(2,"span"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(3),n.Rc(n.jc(4,1,"lang.uploadAnOtherFile")))}function Wr(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",40),n.dc("click",(function(){return n.Dc(t),n.hc(4).cleanFile()})),n.Rb(1,"mat-icon",44),n.Wb(2,"span"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(3),n.Rc(n.jc(4,1,"lang.removeFile")))}function Tr(t,e){if(1&t&&(n.Wb(0,"button",49),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){n.hc();const t=n.zc(3),e=n.hc(4);n.oc("matBadge",e.file.subinfos.mainDocVersions.length)("matMenuTriggerFor",t),n.Db(1),n.Sc(" ",n.jc(2,3,"lang.versions")," ")}}function Er(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",40),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(5).openResourceVersion(i,"PDF")})),n.Wb(1,"span"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(2),n.Tc("",n.jc(3,2,"lang.version")," ",t,"")}}function Fr(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",5),n.dc("click",(function(){n.Dc(t);const e=n.hc(5);return e.openResourceVersion(e.file.subinfos.mainDocVersions[e.file.subinfos.mainDocVersions.length-1],"SIGN")})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.SIGN_version")," "))}function Lr(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",5),n.dc("click",(function(){n.Dc(t);const e=n.hc(5);return e.openResourceVersion(e.file.subinfos.mainDocVersions[e.file.subinfos.mainDocVersions.length-1],"NOTE")})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.NOTE_version")," "))}function Qr(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Tr,3,5,"button",45),n.Wb(2,"mat-menu",null,46),n.Oc(4,Er,4,4,"button",47),n.Vb(),n.Oc(5,Fr,3,3,"button",48),n.Oc(6,Lr,3,3,"button",48),n.Tb()),2&t){const t=n.hc(4);n.Db(1),n.oc("ngIf",t.file.subinfos.mainDocVersions.length>1&&!t.file.subinfos.signedDocVersions),n.Db(3),n.oc("ngForOf",t.file.subinfos.mainDocVersions),n.Db(1),n.oc("ngIf",t.file.subinfos.signedDocVersions),n.Db(1),n.oc("ngIf",t.file.subinfos.commentedDocVersions>0)}}function Nr(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",30),n.Wb(1,"button",31),n.dc("click",(function(){return n.Dc(t),n.hc(3).downloadOriginalFile()})),n.ic(2,"translate"),n.Rb(3,"mat-icon",32),n.Vb(),n.Oc(4,Vr,4,8,"button",33),n.Wb(5,"button",34),n.Rb(6,"mat-icon",35),n.Vb(),n.Wb(7,"mat-menu",null,36),n.Oc(9,Rr,5,3,"button",37),n.Oc(10,jr,5,3,"button",37),n.Oc(11,Ar,5,3,"button",37),n.Oc(12,Wr,5,3,"button",37),n.Vb(),n.Oc(13,Qr,7,4,"ng-container",0),n.Vb()}if(2&t){const t=n.zc(8),e=n.hc(3);n.Db(1),n.oc("matTooltip",n.jc(2,10,"lang.downloadOriginalFile")),n.Db(3),n.oc("ngIf",e.editMode&&null!==e.resId&&!e.noConvertedFound),n.Db(1),n.oc("matMenuTriggerFor",t),n.Db(2),n.Fb("optionsListMenu"),n.Db(2),n.oc("ngIf",void 0!==e.file.contentView||null!==e.base64),n.Db(1),n.oc("ngIf",(void 0!==e.file.contentView||null!==e.base64)&&null!=e.resId&&"attachment"!==e.mode&&e.externalId.signatureBookId),n.Db(1),n.oc("ngIf",e.editMode&&null===e.resId),n.Db(1),n.oc("ngIf",e.editMode&&null===e.resId),n.Db(1),n.oc("ngIf","mainDocument"===e.mode&&!e.functions.empty(e.file.subinfos))}}function zr(t,e){if(1&t){const t=n.Xb();n.Wb(0,"pdf-viewer",50),n.dc("error",(function(e){return n.Dc(t),n.hc(3).onError(e)})),n.Vb()}if(2&t){const t=n.hc(3);n.oc("src",t.file.src)("render-text",!0)("autoresize",!0)("original-size",!1)("show-all",!0)}}function Br(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",51),n.dc("onFileDropped",(function(e){return n.Dc(t),n.hc(3).dndUploadFile(e)})),n.Wb(1,"div",52),n.Rb(2,"i",53),n.Qc(3,"\xa0"),n.Wb(4,"a",54),n.dc("click",(function(){return n.Dc(t),n.hc(3).downloadOriginalFile()})),n.Qc(5),n.Vb(),n.Qc(6,"\xa0"),n.Wb(7,"b"),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Vb(),n.Wb(10,"div",55),n.Rb(11,"i",56),n.Rb(12,"br"),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Vb()}if(2&t){const t=n.hc(3);n.oc("disabled",!t.editMode),n.Db(5),n.Rc(t.file.name),n.Db(3),n.Rc(n.jc(9,4,"lang.loaded")),n.Db(5),n.Rc(n.jc(14,6,"lang.noAvailablePreview"))}}function Ur(t,e){if(1&t){const t=n.Xb();n.Oc(0,Sr,6,4,"div",10),n.Oc(1,Pr,14,11,"div",11),n.Wb(2,"input",12,13),n.dc("change",(function(e){return n.Dc(t),n.hc(2).uploadTrigger(e)})),n.Vb(),n.Wb(4,"div",14),n.dc("onFileDropped",(function(e){return n.Dc(t),n.hc(2).dndUploadFile(e)})),n.Oc(5,Nr,14,12,"div",15),n.Wb(6,"div"),n.Oc(7,zr,1,5,"pdf-viewer",16),n.Vb(),n.Vb(),n.Oc(8,Br,15,8,"div",17)}if(2&t){const t=n.hc(2);n.oc("ngIf",t.loading),n.Db(1),n.oc("ngIf",null===t.file.content&&!t.loading),n.Db(1),n.oc("ngModel",t.docToUploadValue),n.Db(2),n.oc("disabled",!t.editMode),n.Db(1),n.oc("ngIf",!t.loading&&null!==t.file.content&&!t.hideTools),n.Db(2),n.oc("ngIf",null!==t.file.src),n.Db(1),n.oc("ngIf",null!==t.file.content&&t.noConvertedFound)}}function $r(t,e){if(1&t&&(n.Ub(0),n.Oc(1,kr,5,3,"ng-container",6),n.Oc(2,Ur,9,7,"ng-template",null,7,n.Pc),n.Tb()),2&t){const t=n.zc(3),e=n.hc();n.Db(1),n.oc("ngIf",e.noFile)("ngIfElse",t)}}function Hr(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"onlyoffice-viewer",57,58),n.dc("triggerAfterUpdatedDoc",(function(){return n.Dc(t),n.hc().triggerEvent.emit()}))("triggerCloseEditor",(function(){return n.Dc(t),n.hc().closeEditor()}))("triggerModifiedDocument",(function(){return n.Dc(t),n.hc().isDocModified=!0})),n.Vb(),n.Tb()}if(2&t){const t=n.hc();n.Db(1),n.oc("params",t.editor.options)("file",t.file)("editMode",!0)}}function Gr(t,e){1&t&&(n.Wb(0,"div",18),n.Rb(1,"mat-spinner",60),n.Vb())}function Xr(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"app-collabora-online-viewer",57,59),n.dc("triggerAfterUpdatedDoc",(function(){return n.Dc(t),n.hc().triggerEvent.emit()}))("triggerCloseEditor",(function(){return n.Dc(t),n.hc().closeEditor()}))("triggerModifiedDocument",(function(){return n.Dc(t),n.hc().isDocModified=!0})),n.Vb(),n.Oc(3,Gr,2,0,"div",10),n.Tb()}if(2&t){const t=n.zc(2),e=n.hc();n.Db(1),n.oc("params",e.editor.options)("file",e.file)("editMode",!0),n.Db(2),n.oc("ngIf",t.isSaving)}}function qr(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",61),n.dc("click",(function(){return n.Dc(t),n.hc().saveMainDocument()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",62),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.saveModifications"))}function Kr(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",61),n.dc("click",(function(){return n.Dc(t),n.hc().saveTmpDocument()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",62),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.saveModifications"))}function Yr(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",63),n.dc("click",(function(){return n.Dc(t),n.hc().unsignMainDocument()})),n.ic(1,"translate"),n.Qc(2),n.ic(3,"translate"),n.Vb()}2&t&&(n.oc("title",n.jc(1,2,"lang.unsign")),n.Db(2),n.Sc(" ",n.jc(3,4,"lang.removeSignature"),"\n"))}let Jr=(()=>{class t{constructor(t,e,i,a,s,o,r,c,l,d,h){this.translate=t,this.http=e,this.notify=i,this.headerService=a,this.appService=s,this.dialog=o,this.sortPipe=r,this.functions=c,this.privilegeService=l,this.authService=d,this.localStorage=h,this.base64=null,this.format=null,this.mode="mainDocument",this.resId=null,this.resIdMaster=null,this.editMode=!1,this.hideTools=!1,this.title="",this.attachType=null,this.triggerEvent=new n.o,this.loading=!0,this.noConvertedFound=!1,this.noFile=!1,this.file={name:"",type:"",contentMode:"base64",content:null,src:null},this.allowedExtensions=[],this.maxFileSize=0,this.maxFileSizeLabel="",this.percentInProgress=0,this.editInProgress=!1,this.listTemplates=[],this.externalId={},this.templateListForm=new X.i,this.loadingInfo={mode:"indeterminate",percent:0,message:""},this.editor={mode:"",async:!0,options:{docUrl:null,dataToMerge:null}},this.isDocModified=!1,window.pdfWorkerSrc="pdfjs/pdf.worker.min.js"}ngOnInit(){this.setEditor(),this.http.get("../rest/indexing/fileInformations").pipe(Object(mt.a)(t=>{this.allowedExtensions=t.informations.allowedFiles.map(t=>({extension:"."+t.extension.toLowerCase(),mimeType:t.mimeType,canConvert:t.canConvert})),this.allowedExtensions=this.sortPipe.transform(this.allowedExtensions,"extension"),this.maxFileSize=t.informations.maximumSize,this.maxFileSizeLabel=t.informations.maximumSizeLabel,null!==this.resId?(this.loadRessource(this.resId,this.mode),this.editMode&&(null!==this.attachType&&"attachment"===this.mode?this.loadTemplatesByResId(this.resIdMaster,this.attachType):this.loadTemplates())):(this.loadTemplates(),this.loading=!1)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe(),this.functions.empty(this.base64)?""!==this.tmpFilename&&void 0!==this.tmpFilename&&this.http.get("../rest/convertedFile/"+this.tmpFilename).pipe(Object(mt.a)(t=>{this.file={name:this.tmpFilename,format:"pdf",type:"application/pdf",contentMode:"base64",content:this.getBase64Document(this.base64ToArrayBuffer(t.encodedResource)),src:this.base64ToArrayBuffer(t.encodedResource)},this.noConvertedFound=!1,this.loading=!1}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe():this.loadFileFromBase64()}ngOnDestroy(){this.intervalLockFile&&this.cancelTemplateEdition()}loadFileFromBase64(){this.loading=!0,this.file={name:"maarch",format:"pdf",type:"application/pdf",contentMode:"base64",content:this.base64,src:this.base64ToArrayBuffer(this.base64)},this.loading=!1}loadTmpFile(t){return new Promise((e,i)=>{this.loading=!0,this.loadingInfo.mode="determinate",this.requestWithLoader(`../rest/convertedFile/${t}?convert=true`).subscribe(i=>{i.encodedResource&&(this.file={name:t,format:i.extension,type:i.type,contentMode:"base64",content:i.encodedResource,src:void 0!==i.encodedConvertedResource?this.base64ToArrayBuffer(i.encodedConvertedResource):null},this.editMode=!0,this.triggerEvent.emit(),void 0!==i.encodedConvertedResource?this.noConvertedFound=!1:(this.noConvertedFound=!0,this.notify.error(i.convertedResourceErrors)),this.loading=!1,e(!0))},t=>(this.noConvertedFound=!0,this.notify.handleErrors(t),this.loading=!1,e(!0),Object(c.a)(!1)))})}uploadTrigger(t){if(t.target.files&&t.target.files[0]&&this.isExtensionAllowed(t.target.files[0])){this.initUpload();const e=new FileReader;this.file.name=t.target.files[0].name,this.file.type=t.target.files[0].type,this.file.format=this.file.name.split(".").pop(),e.readAsArrayBuffer(t.target.files[0]),e.onload=t=>{this.file.content=this.getBase64Document(t.target.result),this.triggerEvent.emit(),"application/pdf"!==this.file.type?this.convertDocument(this.file):(this.file.src=t.target.result,this.loading=!1)}}else this.loading=!1}initUpload(){this.loading=!0,this.file={name:"",type:"",contentMode:"base64",content:null,src:null},this.noConvertedFound=!1,this.loadingInfo.message=this.translate.instant("lang.loadingFile")+"...",this.loadingInfo.mode="indeterminate"}getBase64Document(t){const e=new Uint8Array(t).reduce((t,e)=>t+String.fromCharCode(e),"");return btoa(e)}base64ToArrayBuffer(t){const e=window.atob(t),i=e.length,n=new Uint8Array(i);for(let a=0;a<i;a++)n[a]=e.charCodeAt(a);return n.buffer}b64toBlob(t,e="",i=512){const n=atob(t),a=[];for(let s=0;s<n.length;s+=i){const t=n.slice(s,s+i),e=new Array(t.length);for(let i=0;i<t.length;i++)e[i]=t.charCodeAt(i);const o=new Uint8Array(e);a.push(o)}return new Blob(a,{type:e})}convertDocument(t){this.canBeConverted(t)?this.upload({name:t.name,base64:t.content}).subscribe(t=>{t.encodedResource&&(this.file.base64src=t.encodedResource,this.file.src=this.base64ToArrayBuffer(t.encodedResource),this.loading=!1)},t=>(this.noConvertedFound=!0,this.notify.handleErrors(t),this.loading=!1,Object(c.a)(!1))):(this.noConvertedFound=!0,this.loading=!1)}upload(t){return this.http.post("../rest/convertedFile",t,{reportProgress:!0,observe:"events"}).pipe(Object(l.a)(t=>{switch(t.type){case v.e.DownloadProgress:const e=Math.round(100*t.loaded/t.total);return this.loadingInfo.percent=e,this.loadingInfo.mode="determinate",this.loadingInfo.message=`3/3 ${this.translate.instant("lang.downloadConvertedFile")}...`,{status:"progress",message:e};case v.e.UploadProgress:const i=Math.round(100*t.loaded/t.total);return this.loadingInfo.percent=i,100===i?(this.loadingInfo.mode="indeterminate",this.loadingInfo.message=`2/3 ${this.translate.instant("lang.convertingFile")}...`):(this.loadingInfo.mode="determinate",this.loadingInfo.message=`1/3 ${this.translate.instant("lang.loadingFile")}...`),{status:"progress",message:i};case v.e.Response:return t.body;default:return"Unhandled event: "+t.type}}))}requestWithLoader(t){return this.loadingInfo.percent=0,this.http.get(t,{reportProgress:!0,observe:"events"}).pipe(Object(l.a)(t=>{switch(t.type){case v.e.DownloadProgress:const e=Math.round(100*t.loaded/t.total);return this.loadingInfo.percent=e,this.loadingInfo.mode="determinate",this.loadingInfo.message="",{status:"progressDownload",message:e};case v.e.Response:return t.body;default:return"Unhandled event: "+t.type}}))}onError(t){console.log(t)}cleanFile(){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.confirmAction")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.templateListForm.reset(),this.file={name:"",type:"",content:null,src:null},this.docToUploadValue="",this.triggerEvent.emit("cleanFile")}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}saveDocService(){return Object(r.a)(this,void 0,void 0,(function*(){const t=yield this.getFilePdf();this.headerService.setLoadedFile(t)}))}getFile(){if("onlyoffice"===this.editor.mode&&void 0!==this.onlyofficeViewer)return this.onlyofficeViewer.getFile();if("collaboraOnline"===this.editor.mode&&void 0!==this.collaboraOnlineViewer)return this.collaboraOnlineViewer.getFile();{const t=JSON.parse(JSON.stringify(this.file));return t.content="route"===t.contentMode?null:t.content,Object(c.a)(t)}}getFilePdf(){return new Promise((t,e)=>{this.functions.empty(this.file.src)?this.getFile().pipe(Object(ro.a)(1),Object(mt.a)(t=>("collaboraOnline"===this.editor.mode&&void 0!==this.collaboraOnlineViewer&&(this.collaboraOnlineViewer.isSaving=!1),t)),p(t=>this.http.post("../rest/convertedFile",{name:`${t.name}.${t.format}`,base64:""+t.content})),Object(mt.a)(e=>{t(e.encodedResource)})).subscribe():t(this.getBase64Document(this.file.src))})}dndUploadFile(t){this.uploadTrigger({target:{files:[t[0]]}})}canBeConverted(t){const e="."+t.name.toLowerCase().split(".").pop();return this.allowedExtensions.filter(i=>!0===i.canConvert&&i.mimeType===t.type&&i.extension===e).length>0}isExtensionAllowed(t){const e="."+t.name.toLowerCase().split(".").pop();return 0===this.allowedExtensions.filter(i=>i.mimeType===t.type&&i.extension===e).length?(this.dialog.open(qt.a,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.notAllowedExtension")+" !",msg:this.translate.instant("lang.file")+" : <b>"+t.name+"</b>, "+this.translate.instant("lang.type")+" : <b>"+t.type+"</b><br/><br/><u>"+this.translate.instant("lang.allowedExtensions")+"</u> : <br/>"+this.allowedExtensions.map(t=>t.extension).filter((t,e,i)=>e===i.indexOf(t)).join(", ")}}),!1):!(t.size>this.maxFileSize&&this.maxFileSize>0&&(this.dialog.open(qt.a,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.maxFileSizeReached")+" ! ",msg:this.translate.instant("lang.maxFileSize")+" : "+this.maxFileSizeLabel}}),1))}downloadOriginalFile(){const t=document.createElement("a");"base64"===this.file.contentMode?(t.href=`data:${this.file.type};base64,${this.file.content}`,t.setAttribute("download",this.file.name),document.body.appendChild(t),t.click()):this.http.get(this.file.content).pipe(Object(mt.a)(e=>{t.href=`data:${e.mimeType};base64,${e.encodedDocument}`,t.setAttribute("download",this.file.name),document.body.appendChild(t),t.click()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}openPdfInTab(){let t="";if("base64"===this.file.contentMode){t=`data:${this.file.type};base64,${this.file.content}`;const e=window.open();e.document.write(`<iframe style="width: 100%;height: 100%;margin: 0;padding: 0;" src="${t}" frameborder="0" allowfullscreen></iframe>`),e.document.title=this.title}else this.http.get(this.file.contentView).pipe(Object(mt.a)(e=>{t=`data:${e.mimeType};base64,${e.encodedDocument}`;const i=window.open();i.document.write(`<iframe style="width: 100%;height: 100%;margin: 0;padding: 0;" src="${t}" frameborder="0" allowfullscreen></iframe>`),i.document.title=this.title}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}loadRessource(t,e="mainDocument"){return Object(r.a)(this,void 0,void 0,(function*(){this.resId=t,this.mode=e,this.loading=!0,"attachment"===e?this.requestWithLoader(`../rest/attachments/${t}/content?mode=base64`).subscribe(e=>{e.encodedDocument&&(this.file.contentMode="route",this.file.name=`${t}.${e.originalFormat}`,this.file.format=e.originalFormat,this.file.creatorId=e.originalCreatorId,this.file.signatoryId=e.signatoryId,this.file.content=`../rest/attachments/${t}/originalContent?mode=base64`,this.file.contentView=`../rest/attachments/${t}/content?mode=base64`,this.file.src=this.base64ToArrayBuffer(e.encodedDocument),this.loading=!1,this.noFile=!1)},e=>("Document has no file"===e.error.errors?this.noFile=!0:"Converted Document not found"===e.error.errors||"Document can not be converted"===e.error.errors?(this.file.contentMode="route",this.file.content=`../rest/attachments/${t}/originalContent?mode=base64`,this.noConvertedFound=!0):(this.notify.error(e.error.errors),this.noFile=!0),this.loading=!1,Object(c.a)(!1))):(yield this.loadMainDocumentSubInformations(),0===this.file.subinfos.mainDocVersions.length?(this.noFile=!0,this.loading=!1):this.file.subinfos.canConvert?(this.requestWithLoader(`../rest/resources/${t}/content?mode=base64`).subscribe(e=>{e.encodedDocument&&(this.file.contentMode="route",this.file.name=`${t}.${e.originalFormat}`,this.file.format=e.originalFormat,this.file.signatoryId=e.signatoryId,this.file.content=`../rest/resources/${t}/originalContent?mode=base64`,this.file.contentView=`../rest/resources/${t}/content?mode=base64`,this.file.src=this.base64ToArrayBuffer(e.encodedDocument),this.loading=!1,this.noFile=!1)},t=>(this.notify.error(t.error.errors),this.noFile=!0,this.loading=!1,Object(c.a)(!1))),this.http.get(`../rest/resources/${this.resId}/fields/externalId`).pipe(Object(mt.a)(t=>{this.externalId=t.field}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()):(this.file.contentMode="route",this.file.content=`../rest/resources/${t}/originalContent?mode=base64`,this.noConvertedFound=!0,this.loading=!1))}))}loadMainDocumentSubInformations(){return new Promise((t,e)=>{this.http.get(`../rest/resources/${this.resId}/versionsInformations`).pipe(Object(mt.a)(t=>{const e=t.DOC;let i=!1,n=!1,a=!1;void 0!==t.DOC[t.DOC.length-1]&&(n=t.SIGN.indexOf(t.DOC[t.DOC.length-1])>-1,a=t.NOTE.indexOf(t.DOC[t.DOC.length-1])>-1,i=t.PDF.indexOf(t.DOC[t.DOC.length-1])>-1),this.file.subinfos={mainDocVersions:e,signedDocVersions:n,commentedDocVersions:a,mainDocPDFVersions:i}}),p(()=>this.http.get(`../rest/resources/${this.resId}/fileInformation`)),Object(mt.a)(e=>{this.file.subinfos.canConvert=e.information.canConvert,t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}editTemplate(t){null!==this.localStorage.get("modal_confirmEditTemplate_"+this.headerService.user.id)?this.launchEditTemplate(t):this.confirmEditTemplate(t)}confirmEditTemplate(t){let e="";e="attachment"===this.mode?this.translate.instant("lang.editionAttachmentConfirmFirst")+"<br><br>"+this.translate.instant("lang.editionAttachmentConfirmThird"):this.translate.instant("lang.editionAttachmentConfirmFirst")+"<br><br>"+this.translate.instant("lang.editionAttachmentConfirmSecond"),this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{idModal:"confirmEditTemplate",title:this.translate.instant("lang.templateEdition"),msg:e}}),this.dialogRef.afterClosed().pipe(Object(mt.a)(t=>{"ok"!==t&&this.templateListForm.reset()}),Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.launchEditTemplate(t)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}launchEditTemplate(t){this.triggerEvent.emit();const e=this.listTemplates.filter(e=>e.id===t)[0];this.file.format=e.extension,"onlyoffice"===this.editor.mode?(this.editor.async=!1,this.editor.options={objectType:"attachmentCreation",objectId:e.id,docUrl:"rest/onlyOffice/mergedFile",dataToMerge:this.resourceDatas},this.editInProgress=!0):"collaboraOnline"===this.editor.mode?(this.editor.async=!1,this.editInProgress=!0,this.editor.options={objectType:"attachment"===this.mode?"attachmentCreation":"resourceCreation",objectId:e.id,dataToMerge:this.resourceDatas}):(this.editor.async=!0,this.editor.options={objectType:"attachmentCreation",objectId:e.id,cookie:document.cookie,authToken:this.authService.getToken(),data:this.resourceDatas},this.editInProgress=!0,this.http.post("../rest/jnlp",this.editor.options).pipe(Object(mt.a)(t=>{window.location.href="../rest/jnlp/"+t.generatedJnlp,this.checkLockFile(t.jnlpUniqueId,e.extension)})).subscribe())}editResource(){"java"===this.editor.mode&&"pdf"===this.file.format.toLowerCase()?this.notify.error(this.translate.instant("lang.javaEditDenied")+" <b>PDF</b> "+this.translate.instant("lang.javaEditDenied2")):"attachment"===this.mode?this.editAttachment():this.editMainDocument()}editAttachment(){this.triggerEvent.emit("setData"),"onlyoffice"===this.editor.mode?(this.editor.async=!1,this.editor.options={objectType:"attachmentModification",objectId:this.resId,docUrl:"rest/onlyOffice/mergedFile",dataToMerge:this.resourceDatas},this.editInProgress=!0):"collaboraOnline"===this.editor.mode?(this.editor.async=!1,this.editInProgress=!0,this.editor.options={objectType:"attachmentModification",objectId:this.resId,dataToMerge:this.resourceDatas}):(this.editor.async=!0,this.editor.options={objectType:"attachmentModification",objectId:this.resId,cookie:document.cookie,authToken:this.authService.getToken(),data:this.resourceDatas},this.editInProgress=!0,this.http.post("../rest/jnlp",this.editor.options).pipe(Object(mt.a)(t=>{window.location.href="../rest/jnlp/"+t.generatedJnlp,this.checkLockFile(t.jnlpUniqueId,this.file.format)})).subscribe())}editMainDocument(){"onlyoffice"===this.editor.mode?(this.editor.async=!1,this.editor.options={objectType:"resourceModification",objectId:this.resId,docUrl:"rest/onlyOffice/mergedFile"},this.editInProgress=!0):"collaboraOnline"===this.editor.mode?(this.editor.async=!1,this.editor.options={objectType:"resourceModification",objectId:this.resId,dataToMerge:this.resourceDatas},this.editInProgress=!0):(this.editor.async=!0,this.editor.options={objectType:"resourceModification",objectId:this.resId,cookie:document.cookie},this.editInProgress=!0,this.http.post("../rest/jnlp",this.editor.options).pipe(Object(mt.a)(t=>{window.location.href="../rest/jnlp/"+t.generatedJnlp,this.checkLockFile(t.jnlpUniqueId,this.file.format)})).subscribe())}setDatas(t){this.resourceDatas=t}checkLockFile(t,e){this.intervalLockFile=setInterval(()=>{this.http.get("../rest/jnlp/lock/"+t).subscribe(t=>Object(r.a)(this,void 0,void 0,(function*(){t.lockFileFound||(this.editInProgress=!1,clearInterval(this.intervalLockFile),yield this.loadTmpFile(`${t.fileTrunk}.${e}`),"mainDocument"===this.mode&&null!==this.resId&&this.saveMainDocument())})))},1e3)}cancelTemplateEdition(){clearInterval(this.intervalLockFile),this.editInProgress=!1}isEditingTemplate(){return"onlyoffice"===this.editor.mode?void 0!==this.onlyofficeViewer:"collaboraOnline"===this.editor.mode?void 0!==this.collaboraOnlineViewer:this.editInProgress}loadTemplatesByResId(t,e){const i=[];let n=[];this.listTemplates=[],this.http.get("../rest/attachmentsTypes").pipe(Object(mt.a)(t=>{Object.keys(t.attachmentsTypes).forEach(e=>{n.push({id:e,label:t.attachmentsTypes[e].label})}),n=this.sortPipe.transform(n,"label"),n.push({id:"all",label:this.translate.instant("lang.others")})}),p(()=>this.http.get(`../rest/resources/${t}/templates?attachmentType=${e},all`)),Object(mt.a)(t=>{this.listTemplates=t.templates,n=n.filter(e=>t.templates.map(t=>t.attachmentType).indexOf(e.id)>-1),n.forEach(e=>{i.push({id:e.id,label:e.label,title:e.label,disabled:!0,isTitle:!0,color:"#135f7f"}),t.templates.filter(t=>t.attachmentType===e.id).forEach(t=>{i.push({id:t.id,label:" "+t.label,title:t.exists?t.label:this.translate.instant("lang.fileDoesNotExists"),extension:t.extension,disabled:!t.exists})})}),this.listTemplates=i})).subscribe()}loadTemplates(){if(0===this.listTemplates.length){const t=[];if("mainDocument"===this.mode)this.http.get("../rest/currentUser/templates?target=indexingFile").pipe(Object(mt.a)(e=>{this.listTemplates=e.templates,t.push({id:"all",label:this.translate.instant("lang.indexation"),title:this.translate.instant("lang.indexation"),disabled:!0,isTitle:!0,color:"#135f7f"}),e.templates.forEach(e=>{t.push({id:e.id,label:" "+e.label,title:e.exists?e.label:this.translate.instant("lang.fileDoesNotExists"),extension:e.extension,disabled:!e.exists})}),this.listTemplates=t})).subscribe();else{let e=[];this.http.get("../rest/attachmentsTypes").pipe(Object(mt.a)(t=>{e.push({id:"all",label:this.translate.instant("lang.others")}),Object.keys(t.attachmentsTypes).forEach(i=>{e.push({id:i,label:t.attachmentsTypes[i].label}),e=this.sortPipe.transform(e,"label")})}),p(()=>this.http.get("../rest/currentUser/templates?target=attachments&type=office")),Object(mt.a)(i=>{this.listTemplates=i.templates,e=e.filter(t=>i.templates.map(t=>t.attachmentType).indexOf(t.id)>-1),e.forEach(e=>{t.push({id:e.id,label:e.label,title:e.label,disabled:!0,isTitle:!0,color:"#135f7f"}),i.templates.filter(t=>t.attachmentType===e.id).forEach(e=>{t.push({id:e.id,label:" "+e.label,title:e.exists?e.label:this.translate.instant("lang.fileDoesNotExists"),extension:e.extension,disabled:!e.exists})})}),this.listTemplates=t})).subscribe()}}}closeEditor(){this.templateListForm.reset(),this.editInProgress=!1,this.isDocModified=!1}setEditor(){"java"===this.headerService.user.preferences.documentEdition?(this.editor.mode="java",this.editor.async=!0):"onlyoffice"===this.headerService.user.preferences.documentEdition?(this.editor.mode="onlyoffice",this.editor.async=!1):"collaboraonline"===this.headerService.user.preferences.documentEdition&&(this.editor.mode="collaboraOnline",this.editor.async=!1)}saveMainDocument(){return this.loading=!0,new Promise(t=>{this.getFile().pipe(Object(l.a)(t=>({encodedFile:t.content,format:t.format,resId:this.resId})),p(t=>this.http.put(`../rest/resources/${this.resId}?onlyDocument=true`,t)),Object(mt.a)(()=>{this.closeEditor(),this.loadRessource(this.resId),t(!0)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}loadTmpDocument(t,e){return new Promise((i,n)=>{this.http.post("../rest/convertedFile/encodedFile",{format:e,encodedFile:t}).pipe(Object(mt.a)(i=>{this.file={name:"maarch",format:e,type:"application/pdf",contentMode:"base64",content:t,src:this.base64ToArrayBuffer(i.encodedResource)}}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),i(!1),Object(c.a)(!1)))).subscribe()})}saveTmpDocument(){return new Promise((t,e)=>{this.getFile().pipe(Object(mt.a)(t=>{this.file={name:"maarch",format:t.format,type:"application/pdf",contentMode:"base64",content:t.content,src:null}}),p(t=>this.http.post("../rest/convertedFile/encodedFile",{format:t.format,encodedFile:t.content})),Object(mt.a)(e=>{this.file.src=this.base64ToArrayBuffer(e.encodedResource),this.closeEditor(),t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}openResourceVersion(t,e){const i="PDF"!==e?this.translate.instant("lang."+e+"_version"):`${this.translate.instant("lang.version")} ${t}`;this.http.get(`../rest/resources/${this.resId}/content/${t}?type=${e="SIGN"===e?"PDF":e}`).pipe(Object(mt.a)(t=>{this.dialog.open(co,{autoFocus:!1,panelClass:"maarch-full-height-modal",data:{title:""+i,base64:t.encodedDocument}})}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}unsignMainDocument(){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.UNSIGN"),msg:this.translate.instant("lang.confirmAction")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.put(`../rest/resources/${this.resId}/unsign`,{})),Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.documentUnsigned")),this.loadRessource(this.resId)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}isEditorLoaded(){return!this.isEditingTemplate()||this.isEditingTemplate()&&this.isDocModified}openMaarchParapheurWorkflow(){this.dialog.open(Jo,{panelClass:"maarch-modal",data:{id:this.resId,type:"resource"}})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(q.b),n.Qb(Wt.a),n.Qb(_t.a),n.Qb(Dt.a),n.Qb(_.a),n.Qb(Ut.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-document-viewer"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(Or,!0),n.Xc(Dr,!0),n.Xc(wr,!0)),2&t&&(n.yc(i=n.ec())&&(e.templateList=i.first),n.yc(i=n.ec())&&(e.onlyofficeViewer=i.first),n.yc(i=n.ec())&&(e.collaboraOnlineViewer=i.first))},inputs:{tmpFilename:"tmpFilename",base64:"base64",format:"format",mode:"mode",resId:"resId",resIdMaster:"resIdMaster",editMode:"editMode",hideTools:"hideTools",title:"title",attachType:"attachType"},outputs:{triggerEvent:"triggerEvent"},features:[n.Cb([Wt.a])],decls:7,vars:7,consts:[[4,"ngIf"],["mat-fab","","color","accent","style","position: absolute;z-index: 3;bottom: 40px;right: 60px;",3,"title","click",4,"ngIf"],["mat-raised-button","","color","warn","style","position: fixed;z-index: 1;bottom: 100px;right: 150px;",3,"title","click",4,"ngIf"],[1,"editInProgress"],[1,"fas","fa-file-word","bounce"],["mat-button","",3,"click"],[4,"ngIf","ngIfElse"],["elseHaveFile",""],[1,"noFile"],[1,"far","fa-times-circle"],["class","example-loading-shade",4,"ngIf"],["class","view-doc-container","appUploadFileDragDrop","",3,"disabled","onFileDropped",4,"ngIf"],["type","file","name","files[]",2,"display","none",3,"ngModel","change"],["docToUpload",""],["appUploadFileDragDrop","",2,"display","block","width","100%",3,"disabled","onFileDropped"],["class","viewer-tools",4,"ngIf"],["style","width:100%;",3,"src","render-text","autoresize","original-size","show-all","error",4,"ngIf"],["class","no-doc-container","appUploadFileDragDrop","",3,"disabled","onFileDropped",4,"ngIf"],[1,"example-loading-shade"],[3,"mode","value"],[1,"percent"],[2,"padding-top","10px"],["appUploadFileDragDrop","",1,"view-doc-container",3,"disabled","onFileDropped"],[1,"fa","fa-file-upload","upload-icon"],[2,"display","flex"],[2,"margin-right","20px","align-items","center","justify-content","center","text-align","center","display","flex"],["style","width: 240px;text-align: left;font-weight:normal;font-size: 13px;",3,"label","placeholderLabel","datas","class","formControlSelect","afterSelected",4,"ngIf"],["mat-button","",1,"button-form-primary-alt",2,"align-items","center","justify-content","center","text-align","center","display","flex",3,"click"],[2,"width","240px","text-align","left","font-weight","normal","font-size","13px",3,"label","placeholderLabel","datas","formControlSelect","afterSelected"],["templateList",""],[1,"viewer-tools"],["mat-icon-button","",3,"matTooltip","click"],[1,"fa","fa-download"],["mat-icon-button","",3,"disabled","disabledButton","matTooltip","click",4,"ngIf"],["mat-icon-button","",3,"matMenuTriggerFor"],[1,"fas","fa-chevron-down"],["menuOptions","matMenu"],["mat-menu-item","",3,"click",4,"ngIf"],["mat-icon-button","",3,"disabled","matTooltip","click"],[1,"fa","fa-edit"],["mat-menu-item","",3,"click"],["color","primary",1,"fas","fa-external-link-alt"],["color","primary",1,"fas","fa-list-ol"],["color","primary",1,"fa","fa-file-upload"],["color","warn",1,"fa","fa-trash"],["mat-button","",3,"matBadge","matMenuTriggerFor",4,"ngIf"],["menuVersionsDoc","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["mat-button","",3,"click",4,"ngIf"],["mat-button","",3,"matBadge","matMenuTriggerFor"],[2,"width","100%",3,"src","render-text","autoresize","original-size","show-all","error"],["appUploadFileDragDrop","",1,"no-doc-container",3,"disabled","onFileDropped"],[1,"loaded-file"],[1,"fa","fa-file"],[3,"click"],[1,"no-view"],[1,"far","fa-eye-slash","no-view-icon"],[2,"height","100%","width","100%",3,"params","file","editMode","triggerAfterUpdatedDoc","triggerCloseEditor","triggerModifiedDocument"],["onlyofficeViewer",""],["collaboraOnlineViewer",""],[2,"margin","auto"],["mat-fab","","color","accent",2,"position","absolute","z-index","3","bottom","40px","right","60px",3,"title","click"],[1,"fas","fa-check",2,"height","auto","font-size","20px"],["mat-raised-button","","color","warn",2,"position","fixed","z-index","1","bottom","100px","right","150px",3,"title","click"]],template:function(t,e){1&t&&(n.Oc(0,Mr,10,6,"ng-container",0),n.Oc(1,$r,4,2,"ng-container",0),n.Oc(2,Hr,3,3,"ng-container",0),n.Oc(3,Xr,4,4,"ng-container",0),n.Oc(4,qr,3,3,"button",1),n.Oc(5,Kr,3,3,"button",1),n.Oc(6,Yr,4,6,"button",2)),2&t&&(n.oc("ngIf",e.editInProgress&&"onlyoffice"!==e.editor.mode&&"collaboraOnline"!==e.editor.mode),n.Db(1),n.oc("ngIf",!e.editInProgress),n.Db(1),n.oc("ngIf",e.editInProgress&&"onlyoffice"===e.editor.mode),n.Db(1),n.oc("ngIf",e.editInProgress&&"collaboraOnline"===e.editor.mode),n.Db(1),n.oc("ngIf",e.isDocModified&&"mainDocument"===e.mode&&null!==e.resId),n.Db(1),n.oc("ngIf",e.isDocModified&&"attachment"===e.mode),n.Db(1),n.oc("ngIf",!e.isDocModified&&"mainDocument"===e.mode&&null!==e.resId&&!e.functions.empty(e.file.subinfos)&&e.file.subinfos.signedDocVersions&&e.headerService.user.id==e.file.signatoryId&&!e.hideTools&&e.editMode))},directives:[P.t,k.b,X.d,X.u,X.x,ie,V.a,fr,A.b,S.a,ne.d,ne.e,ne.b,P.s,wt.a,Gs,vr,Cr,V.c],pipes:[g.d],styles:[".upload-icon[_ngcontent-%COMP%]{font-size:180px;opacity:.4;margin-bottom:30px}.view-doc-container[_ngcontent-%COMP%]{width:100%;height:100%;align-items:center;display:flex;flex-direction:column;justify-content:center}.example-loading-shade[_ngcontent-%COMP%]{background:hsla(0,0%,100%,.7);display:flex;flex-direction:column}.example-loading-shade[_ngcontent-%COMP%] .percent[_ngcontent-%COMP%]{position:absolute;margin-top:-5px;color:#135f7f}.viewer-tools[_ngcontent-%COMP%]{position:fixed;margin-top:5px;z-index:1;background:#135f7f;margin-left:5px;border-radius:10px;color:#fff;display:flex;align-items:left;transition:all .5s}.viewer-tools[_ngcontent-%COMP%] .mat-button[_ngcontent-%COMP%]{font-size:10px} .optionsListMenu{min-height:auto} .optionsListMenu .mat-menu-content{font-size:13px;padding-top:0;padding-bottom:0} .optionsListMenu .mat-icon{height:auto}.viewer-tools[_ngcontent-%COMP%]:hover .mat-icon-button[_ngcontent-%COMP%]:hover .mat-icon[_ngcontent-%COMP%]{transition:all .5s;border-radius:5px;background:hsla(0,0%,100%,.2)}.no-doc-container[_ngcontent-%COMP%]{width:100%;height:100%;align-items:center;display:flex;flex-direction:column;justify-content:center;font-weight:400}.no-doc-container[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#fff;cursor:pointer;text-decoration:underline}.no-view[_ngcontent-%COMP%]{font-size:30px;opacity:.2}.no-view[_ngcontent-%COMP%] .no-view-icon[_ngcontent-%COMP%]{font-size:100px}.noFile[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;height:100%;font-size:30px;opacity:.2}.noFile[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:100px}.loaded-file[_ngcontent-%COMP%]{position:absolute;top:105px;padding:10px;border-radius:10px;background:hsla(0,0%,100%,.2784313725490196)}.extensionsList[_ngcontent-%COMP%]{height:200px;overflow:auto}.editInProgress[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;justify-content:center;opacity:.5}.editInProgress[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{font-size:20px;padding-top:20px}.editInProgress[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:150px}@-webkit-keyframes bounce{0%,20%,53%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);transform:translateZ(0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);transform:translate3d(0,-30px,0)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);transform:translate3d(0,-15px,0)}90%{transform:translate3d(0,-4px,0)}}@keyframes bounce{0%,20%,53%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);transform:translateZ(0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);transform:translate3d(0,-30px,0)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);transform:translate3d(0,-15px,0)}90%{transform:translate3d(0,-4px,0)}}.bounce[_ngcontent-%COMP%]{-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-name:bounce;animation-name:bounce;transform-origin:center bottom;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.disabledButton[_ngcontent-%COMP%]{cursor:not-allowed}.example-loading-shade[_ngcontent-%COMP%]{background:hsla(0,0%,100%,.7686274509803922);z-index:2}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();function Zr(t,e){if(1&t&&n.Rb(0,"app-document-viewer",2,3),2&t){const t=n.hc();n.oc("editMode",!1)("resId",t.resId)("title",t.resId)}}let tc=(()=>{class t{constructor(t,e,i,n,a){this.http=t,this.route=e,this.router=i,this.notify=n,this.headerService=a,this.loading=!0,this.resId=0}ngOnInit(){this.route.params.subscribe(t=>{void 0!==t.resId?(this.resId=t.resId,this.http.get(`../rest/resources/${this.resId}/fileInformation`).pipe(Object(mt.a)(t=>{this.loading=!1}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.router.navigate(["/home"]),Object(c.a)(!1)))).subscribe()):this.router.navigate(["/home"])})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-document-viewer-page"]],decls:2,vars:1,consts:[[1,"doc-container"],["style","display:block;height:100%;width:100%;max-width:800px;overflow: auto;",3,"editMode","resId","title",4,"ngIf"],[2,"display","block","height","100%","width","100%","max-width","800px","overflow","auto",3,"editMode","resId","title"],["appDocumentViewer",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Oc(1,Zr,2,3,"app-document-viewer",1),n.Vb()),2&t&&(n.Db(1),n.oc("ngIf",!e.loading))},directives:[P.t,Jr],styles:[".doc-container[_ngcontent-%COMP%]{background:#135f7f;display:flex;justify-content:center}"]}),t})(),ec=(()=>{class t{constructor(t){this.sanitizer=t}transform(t){return this.sanitizer.bypassSecurityTrustHtml(t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(ca.b))},t.\u0275pipe=n.Pb({name:"safeHtml",type:t,pure:!0}),t})();function ic(t,e){1&t&&(n.Wb(0,"mat-form-field",12),n.Rb(1,"input",13),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.oc("placeholder",n.jc(2,1,"lang.id")))}function nc(t,e){1&t&&(n.Wb(0,"mat-hint",17),n.Wb(1,"a",18),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Sc("",n.jc(3,1,"lang.forgotPassword")," ?"))}function ac(t,e){if(1&t&&(n.Wb(0,"mat-hint",17),n.Wb(1,"span",19),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.Rc(n.jc(3,1,"lang."+t.authService.authMode+"Enabled"))}}function sc(t,e){if(1&t&&(n.Wb(0,"mat-form-field",14),n.Rb(1,"input",15),n.ic(2,"translate"),n.Oc(3,nc,4,3,"mat-hint",16),n.Oc(4,ac,4,3,"mat-hint",16),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("placeholder",n.jc(2,3,"lang.password")),n.Db(2),n.oc("ngIf","standard"===t.authService.authMode),n.Db(1),n.oc("ngIf","ldap"===t.authService.authMode)}}function oc(t,e){if(1&t&&(n.Wb(0,"div",20),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Sc(" ",n.jc(2,1,"lang."+t.authService.authMode+"Enabled")," ")}}const rc=function(){return["cas","keycloak","sso","azure_saml"]};let cc=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c,l,d){this.translate=t,this.http=e,this.router=i,this.headerService=n,this.authService=a,this.localStorage=s,this.functionsService=o,this.notify=r,this.dialog=c,this.formBuilder=l,this.timeLimit=d,this.loading=!1,this.showForm=!0,this.applicationName="",this.loginMessage=""}ngOnInit(){this.headerService.hideSideBar=!0,this.loginForm=this.formBuilder.group({login:[null,X.I.required],password:[null,X.I.required]}),this.environment=a.a,null!==this.authService.getToken()?this.functionsService.empty(this.authService.getUrl(JSON.parse(atob(this.authService.getToken().split(".")[1])).user.id))?this.router.navigate(["/home"]):this.router.navigate([this.authService.getUrl(JSON.parse(atob(this.authService.getToken().split(".")[1])).user.id)]):this.initConnection()}onSubmit(t=null){this.loading=!0;let e="../rest/authenticate";null!==t&&(e+=t),this.http.post(e,{login:this.loginForm.get("login").value,password:this.loginForm.get("password").value},{observe:"response"}).pipe(Object(mt.a)(t=>{this.localStorage.resetLocal(),this.authService.saveTokens(t.headers.get("Token"),t.headers.get("Refresh-Token")),this.authService.setUser({}),this.authService.getCachedUrl()?(this.router.navigateByUrl(this.authService.getCachedUrl()),this.authService.cleanCachedUrl()):this.functionsService.empty(this.authService.getUrl(JSON.parse(atob(t.headers.get("Token").split(".")[1])).user.id))?this.router.navigate(["/home"]):this.router.navigate([this.authService.getUrl(JSON.parse(atob(t.headers.get("Token").split(".")[1])).user.id)])}),Object(m.a)(t=>(this.loading=!1,"Authentication Failed"===t.error.errors?this.notify.error(this.translate.instant("lang.wrongLoginPassword")):"Account Locked"===t.error.errors?this.notify.error(this.translate.instant("lang.accountLocked")+" "+this.timeLimit.transform(t.error.date)):"sso"===this.authService.authMode&&"Authentication Failed : login not present in header"===t.error.errors&&!this.functionsService.empty(this.authService.authUri)||"openam"===this.authService.authMode&&"Authentication Failed : User cookie is not set"===t.error.errors&&!this.functionsService.empty(this.authService.authUri)?window.location.href=this.authService.authUri:"azure_saml"===this.authService.authMode&&"Authentication Failed : not logged"===t.error.errors?window.location.href=t.error.authUri:this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}initConnection(){if(["sso","openam","azure_saml"].indexOf(this.authService.authMode)>-1)this.loginForm.disable(),this.loginForm.setValidators(null),this.onSubmit();else if(["cas","keycloak"].indexOf(this.authService.authMode)>-1){this.loginForm.disable(),this.loginForm.setValidators(null);const t=/code=[.]*/g;if(null!==window.location.search.match(/ticket=[.]*/g)||null!==window.location.search.match(t)){const t=window.location.search.substring(1,window.location.search.length);if(null!==t.match(/state=[.]*/g)){const t=new URLSearchParams(window.location.search.substring(1)),e=this.localStorage.get("keycloakState"),i=t.get("state");if(this.localStorage.save("keycloakState",null),e!==i&&null!==e)return void(window.location.href=this.authService.authUri)}window.history.replaceState({},document.title,window.location.pathname+window.location.hash),this.onSubmit("?"+t)}else window.location.href=this.authService.authUri}}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.c),n.Qb(y.a),n.Qb(_.a),n.Qb(Ut.a),n.Qb(_t.a),n.Qb(D.a),n.Qb(q.b),n.Qb(X.h),n.Qb(bs))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],features:[n.Cb([bs])],decls:18,vars:21,consts:[[1,"login-container"],[1,"login-content"],[1,"login-form"],[3,"formGroup","ngSubmit"],["svgIcon","maarchLogoFull",1,"maarchLogo"],[2,"color","white","font-size","14px",3,"innerHTML"],[2,"color","white","font-size","14px","font-weight","bold"],[2,"padding-left","30px","padding-right","30px"],["class","input-row login","appearance","outline","style","padding-bottom: 0px;",4,"ngIf"],["class","input-row","appearance","outline",4,"ngIf"],["class","alert-message alert-message-info","role","alert","style","max-width: 100%;",4,"ngIf"],["id","submit","type","submit","mat-stroked-button","",2,"color","white","border-color","#24b0ed","background","#24b0ed",3,"disabled"],["appearance","outline",1,"input-row","login",2,"padding-bottom","0px"],["id","login","name","login","matInput","","formControlName","login","type","text",3,"placeholder"],["appearance","outline",1,"input-row"],["id","password","name","password","matInput","","type","password","formControlName","password",3,"placeholder"],["align","end",4,"ngIf"],["align","end"],["routerLink","/forgot-password",1,"infoLogin"],[1,"infoLogin"],["role","alert",1,"alert-message","alert-message-info",2,"max-width","100%"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"div",1),n.Wb(2,"div",2),n.Wb(3,"form",3),n.dc("ngSubmit",(function(){return e.onSubmit()})),n.Rb(4,"mat-icon",4),n.Rb(5,"div",5),n.ic(6,"safeHtml"),n.Wb(7,"p",6),n.Qc(8),n.Vb(),n.Wb(9,"div",7),n.Oc(10,ic,3,3,"mat-form-field",8),n.Oc(11,sc,5,5,"mat-form-field",9),n.Vb(),n.Oc(12,oc,3,3,"div",10),n.Wb(13,"button",11),n.Qc(14),n.ic(15,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(16,"footer"),n.Qc(17),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(1),n.Lc("background-image","url(../rest/images?image=loginPage)"),n.Ib("showForm",e.showForm),n.Db(2),n.oc("formGroup",e.loginForm),n.Db(2),n.oc("innerHTML",n.jc(6,14,e.authService.loginMessage),n.Ec),n.Db(3),n.Rc(e.authService.applicationName),n.Db(2),n.oc("ngIf",-1===n.uc(18,rc).indexOf(e.authService.authMode)),n.Db(1),n.oc("ngIf",-1===n.uc(19,rc).indexOf(e.authService.authMode)),n.Db(1),n.oc("ngIf",n.uc(20,rc).indexOf(e.authService.authMode)>-1),n.Db(1),n.oc("disabled",e.loginForm.invalid||e.loading),n.Db(1),n.Rc(n.jc(15,16,"lang.LOGIN")),n.Db(3),n.Tc(" Maarch courrier ",e.environment.VERSION," Powered by ",e.environment.AUTHOR," "))},directives:[X.K,X.v,X.m,S.a,P.t,k.b,Y.c,J.b,X.d,X.u,X.k,Y.f,o.f],pipes:[ec,g.d],styles:['.login-container[_ngcontent-%COMP%], .login-content[_ngcontent-%COMP%]{background-color:#135f7f}.login-content[_ngcontent-%COMP%]{opacity:0;background-attachment:fixed;background-size:cover;display:grid;align-items:center;justify-content:center;height:100vh;transition:opacity 1s}.login-form[_ngcontent-%COMP%]{max-width:768px}.showForm[_ngcontent-%COMP%]{opacity:1;transition:opacity 1s}.input-row[_ngcontent-%COMP%]{padding-top:10px}.input-row[_ngcontent-%COMP%], .maarchLogo[_ngcontent-%COMP%]{width:100%;padding-bottom:10px}.maarchLogo[_ngcontent-%COMP%]{transition:all 1s ease-in-out;height:auto}footer[_ngcontent-%COMP%]{color:#fff;position:absolute;bottom:5px;font-size:10px;opacity:.5;left:10px}.infoLogin[_ngcontent-%COMP%]{font-weight:700;color:#fff;text-decoration:none}.login-form[_ngcontent-%COMP%]{text-align:center;padding:10px;max-width:550px;height:auto;box-shadow:0 0 1rem 0 rgba(0,0,0,.2);border-radius:5px;position:relative;z-index:1;background:inherit;overflow:hidden;border:2px solid #24b0ed}.login-form[_ngcontent-%COMP%] .mat-form-field-appearance-outline.mat-form-field-invalid.mat-form-field-invalid .mat-form-field-outline-thick{color:#fff!important}.login-form[_ngcontent-%COMP%] .mat-form-field-appearance-outline .mat-form-field-outline{color:#fff!important;background:#fff}.login-form[_ngcontent-%COMP%] .mat-form-field-ripple, .login-form[_ngcontent-%COMP%] .mat-form-field-underline{background-color:#fff!important}.login-form[_ngcontent-%COMP%]:before{content:"";position:absolute;background:inherit;z-index:-1;top:0;left:0;right:0;bottom:0;filter:blur(10px);margin:-20px}.login[_ngcontent-%COMP%] .mat-form-field-wrapper{padding-bottom:0!important}']}),t})(),lc=(()=>{class t{constructor(t,e,i){this.translate=t,this.http=e,this.functions=i}getFillingColor(t){return"first"===t?"#E81C2B":"second"===t?"#F4891E":"third"===t?"#0AA34F":""}formatCivilityObject(t){return this.empty(t)?{label:"",abbreviation:""}:t}formatFillingObject(t){return this.empty(t)?{rate:"",color:""}:{rate:t.rate,color:this.getFillingColor(t.thresholdLevel)}}empty(t){return null===t||""===t||void 0===t}formatContact(t){if(this.functions.empty(t.firstname)&&this.functions.empty(t.lastname))return t.company;{const e=[];return e.push(t.firstname),e.push(t.lastname),this.functions.empty(t.company)||e.push("("+t.company+")"),e.filter(t=>""!==t).join(" ")}}}return t.\u0275fac=function(e){return new(e||t)(n.ac(g.e),n.ac(v.b),n.ac(_t.a))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();var dc=i("R0Ic"),hc=i("QibW");const uc=["snav2"];function pc(t,e){1&t&&(n.Wb(0,"div",2),n.Rb(1,"mat-spinner",3),n.Vb())}function bc(t,e){if(1&t&&(n.Rb(0,"mat-icon",21),n.ic(1,"translate")),2&t){const t=n.hc(4);n.Lc("color",t.fillingRate.color),n.oc("title",n.jc(1,3,"lang.targetFillingField"))}}function fc(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",19),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return e.display=!e.display})),n.Oc(1,bc,2,5,"mat-icon",20),n.Wb(2,"span"),n.Qc(3),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",t.filling),n.Db(2),n.Rc(t.label)}}function mc(t,e){if(1&t&&(n.Ub(0),n.Oc(1,fc,4,2,"button",18),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",!t.display&&"mainInfo"===t.unit)}}function gc(t,e){if(1&t&&(n.Rb(0,"mat-icon",21),n.ic(1,"translate")),2&t){const t=n.hc(4);n.Lc("color",t.fillingRate.color),n.oc("title",n.jc(1,3,"lang.targetFillingField"))}}function vc(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",19),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return e.display=!e.display})),n.Oc(1,gc,2,5,"mat-icon",20),n.Wb(2,"span"),n.Qc(3),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",t.filling),n.Db(2),n.Rc(t.label)}}function _c(t,e){if(1&t&&(n.Ub(0),n.Oc(1,vc,4,2,"button",18),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",!t.display&&"address"===t.unit)}}function yc(t,e){if(1&t&&(n.Rb(0,"mat-icon",21),n.ic(1,"translate")),2&t){const t=n.hc(4);n.Lc("color",t.fillingRate.color),n.oc("title",n.jc(1,3,"lang.targetFillingField"))}}function xc(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",19),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return e.display=!e.display})),n.Oc(1,yc,2,5,"mat-icon",20),n.Wb(2,"span"),n.Qc(3),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",t.filling),n.Db(2),n.Rc(t.label)}}function Cc(t,e){if(1&t&&(n.Ub(0),n.Oc(1,xc,4,2,"button",18),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",!t.display&&"complement"===t.unit)}}function Oc(t,e){if(1&t&&(n.Rb(0,"mat-icon",21),n.ic(1,"translate")),2&t){const t=n.hc(4);n.Lc("color",t.fillingRate.color),n.oc("title",n.jc(1,3,"lang.targetFillingField"))}}function Dc(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",19),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return e.display=!e.display})),n.Oc(1,Oc,2,5,"mat-icon",20),n.Wb(2,"span"),n.Qc(3),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",t.filling),n.Db(2),n.Rc(t.label)}}function wc(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Dc,4,2,"button",18),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",!t.display&&"maarch2maarch"===t.unit)}}function Mc(t,e){if(1&t&&(n.Wb(0,"div",22),n.Wb(1,"div",23),n.Qc(2),n.ic(3,"translate"),n.Wb(4,"b"),n.Qc(5),n.Vb(),n.Vb(),n.Rb(6,"mat-progress-bar",24),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Lc("color",t.fillingRate.color),n.Db(1),n.Sc("",n.jc(3,6,"lang.contactFilledTo")," "),n.Db(3),n.Sc("",t.fillingRate.value," %"),n.Db(1),n.oc("color",t.fillingRate.class)("value",t.fillingRate.value)}}function kc(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",25),n.Wb(1,"div",22),n.Qc(2),n.ic(3,"translate"),n.Wb(4,"b"),n.Qc(5),n.Vb(),n.Qc(6),n.ic(7,"translate"),n.Wb(8,"a",26),n.dc("click",(function(){n.Dc(t);const e=n.hc(2);return e.setAddress(e.companyFound)})),n.Qc(9),n.ic(10,"translate"),n.ic(11,"translate"),n.Vb(),n.Qc(12),n.ic(13,"translate"),n.Rb(14,"br"),n.Wb(15,"q",27),n.Qc(16),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.oc("@hideShow",void 0),n.Db(2),n.Sc(" ",n.jc(3,12,"lang.contactsParameters_company")," "),n.Db(3),n.Rc(t.companyFound.company),n.Db(1),n.Sc(" ",n.jc(7,14,"lang.found")," ! "),n.Db(3),n.Tc("",n.jc(10,16,"lang.click")," ",n.jc(11,18,"lang.here"),""),n.Db(3),n.Sc(" ",n.jc(13,20,"lang.toCopyAddress")," :"),n.Db(4),n.Wc("",t.companyFound.addressNumber," ",t.companyFound.addressStreet,", ",t.companyFound.addressPostcode," ",t.companyFound.addressTown,", ",t.companyFound.addressCountry,"")}}function Sc(t,e){if(1&t){const t=n.Xb();n.Wb(0,"a",32),n.dc("click",(function(){n.Dc(t);const e=n.hc(4);return e.addressBANMode=!e.addressBANMode})),n.Qc(1),n.ic(2,"translate"),n.ic(3,"translate"),n.Vb()}if(2&t){const t=n.hc(4);n.Db(1),n.Rc(t.addressBANMode?n.jc(2,1,"lang.switchManualAddress"):n.jc(3,3,"lang.searchAddressDb"))}}function Ic(t,e){if(1&t&&n.Rb(0,"mat-hint",42),2&t){const t=n.hc(4).$implicit;n.oc("innerHTML",t.desc,n.Ec)}}function Pc(t,e){if(1&t&&(n.Wb(0,"mat-error"),n.Qc(1),n.Vb()),2&t){const t=n.hc(4).$implicit,e=n.hc(4);n.Db(1),n.Sc(" ",e.getErrorMsg(t.control.errors),"")}}function Vc(t,e){if(1&t&&(n.Rb(0,"mat-icon",43),n.ic(1,"translate")),2&t){const t=n.hc(8);n.Lc("color",t.fillingRate.color),n.oc("title",n.jc(1,3,"lang.targetFillingField"))}}function Rc(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"mat-form-field"),n.Wb(2,"input",39),n.dc("blur",(function(){n.Dc(t);const e=n.hc(3).$implicit,i=n.hc(4);return i.checkCompany(e),i.checkFilling()}))("ngModelChange",(function(e){n.Dc(t);const i=n.hc(3).$implicit;return n.hc(4).toUpperCase(i,e)})),n.Vb(),n.Oc(3,Ic,1,1,"mat-hint",40),n.Oc(4,Pc,2,1,"mat-error",34),n.Oc(5,Vc,2,5,"mat-icon",41),n.Vb(),n.Tb()}if(2&t){const t=n.hc(3).$implicit,e=n.hc(4);n.Db(2),n.oc("formControl",t.control)("placeholder",t.label)("required",t.required),n.Db(1),n.oc("ngIf",!e.isEmptyValue(t.desc)),n.Db(1),n.oc("ngIf","VALID"!==t.control.status&&t.control.touched),n.Db(1),n.oc("ngIf",t.filling)}}function jc(t,e){if(1&t&&(n.Wb(0,"mat-error"),n.Qc(1),n.Vb()),2&t){const t=n.hc(4).$implicit,e=n.hc(4);n.Db(1),n.Sc(" ",e.getErrorMsg(t.control.errors),"")}}function Ac(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-form-field"),n.Rb(2,"input",44),n.Oc(3,jc,2,1,"mat-error",34),n.Vb(),n.Tb()),2&t){const t=n.hc(3).$implicit;n.Db(2),n.oc("formControl",t.control)("placeholder",t.label)("required",t.required),n.Db(1),n.oc("ngIf","VALID"!==t.control.status&&t.control.touched)}}const Wc=function(t,e){return{class:"fa-circle",color:t,title:e}};function Tc(t,e){if(1&t&&(n.Ub(0),n.Rb(1,"plugin-select-search",45),n.ic(2,"translate"),n.Tb()),2&t){const t=n.hc(3).$implicit,e=n.hc(4);n.Db(1),n.Fb(""),n.oc("label",t.label)("required",t.required)("showLabel",!0)("formControlSelect",t.control)("placeholderLabel",t.label)("hideErrorDesc",!1)("datas",t.values)("suffixIcon",t.filling?n.wc(12,Wc,e.fillingRate.color,n.jc(2,10,"lang.targetFillingField")):null)}}function Ec(t,e){if(1&t&&n.Rb(0,"mat-datepicker-toggle",51),2&t){n.hc();const t=n.zc(7);n.oc("for",t)}}function Fc(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",52),n.dc("click",(function(e){n.Dc(t);const i=n.hc(4).$implicit;return e.stopPropagation(),i.control.reset()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",53),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.eraseValue"))}function Lc(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"mat-form-field",32),n.dc("click",(function(){return n.Dc(t),n.zc(7).open()})),n.Wb(2,"mat-label"),n.Qc(3),n.Vb(),n.Rb(4,"input",46),n.Oc(5,Ec,1,1,"mat-datepicker-toggle",47),n.Rb(6,"mat-datepicker",48,49),n.Oc(8,Fc,3,3,"button",50),n.Vb(),n.Tb()}if(2&t){const t=n.zc(7),e=n.hc(3).$implicit,i=n.hc(4);n.Db(3),n.Sc("",e.label," "),n.Db(1),n.oc("formControl",e.control)("matDatepicker",t)("placeholder",e.label),n.Db(1),n.oc("ngIf",!e.control.value),n.Db(1),n.oc("touchUi",i.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.control.value&&!e.control.disabled)}}function Qc(t,e){1&t&&(n.Ub(0),n.Qc(1,"* "),n.Tb())}function Nc(t,e){if(1&t&&(n.Wb(0,"mat-radio-button",58),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function zc(t,e){if(1&t&&(n.Rb(0,"i",59),n.ic(1,"translate")),2&t){const t=n.hc(8);n.Lc("color",t.fillingRate.color),n.oc("title",n.jc(1,3,"lang.targetFillingField"))}}function Bc(t,e){if(1&t&&(n.Wb(0,"mat-error"),n.Qc(1),n.Vb()),2&t){const t=n.hc(4).$implicit,e=n.hc(4);n.Db(1),n.Sc(" ",e.getErrorMsg(t.control.errors),"")}}function Uc(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"label",54),n.Qc(2),n.Oc(3,Qc,2,0,"ng-container",34),n.Vb(),n.Wb(4,"mat-radio-group",55),n.Oc(5,Nc,2,2,"mat-radio-button",56),n.Vb(),n.Oc(6,zc,2,5,"i",57),n.Oc(7,Bc,2,1,"mat-error",34),n.Tb()),2&t){const t=n.hc(3).$implicit;n.Db(2),n.Sc("",t.label," "),n.Db(1),n.oc("ngIf",t.required),n.Db(1),n.oc("formControl",t.control),n.Db(1),n.oc("ngForOf",t.values),n.Db(1),n.oc("ngIf",t.filling),n.Db(1),n.oc("ngIf","VALID"!==t.control.status&&t.control.touched)}}function $c(t,e){1&t&&(n.Ub(0),n.Qc(1,"* "),n.Tb())}function Hc(t,e){if(1&t&&(n.Wb(0,"mat-list-option",63),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function Gc(t,e){if(1&t&&(n.Rb(0,"i",59),n.ic(1,"translate")),2&t){const t=n.hc(8);n.Lc("color",t.fillingRate.color),n.oc("title",n.jc(1,3,"lang.targetFillingField"))}}function Xc(t,e){if(1&t&&(n.Wb(0,"mat-error"),n.Qc(1),n.Vb()),2&t){const t=n.hc(4).$implicit,e=n.hc(4);n.Db(1),n.Sc(" ",e.getErrorMsg(t.control.errors),"")}}function qc(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"label",54),n.Qc(2),n.Oc(3,$c,2,0,"ng-container",34),n.Vb(),n.Wb(4,"mat-selection-list",60,61),n.Oc(6,Hc,2,2,"mat-list-option",62),n.Vb(),n.Oc(7,Gc,2,5,"i",57),n.Oc(8,Xc,2,1,"mat-error",34),n.Tb()),2&t){const t=n.hc(3).$implicit;n.Db(2),n.Sc("",t.label," "),n.Db(1),n.oc("ngIf",t.required),n.Db(1),n.oc("formControl",t.control),n.Db(2),n.oc("ngForOf",t.values),n.Db(1),n.oc("ngIf",t.filling),n.Db(1),n.oc("ngIf","VALID"!==t.control.status&&t.control.touched)}}function Kc(t,e){if(1&t&&n.Rb(0,"mat-hint",42),2&t){const t=n.hc(5).$implicit;n.oc("innerHTML",t.desc,n.Ec)}}function Yc(t,e){if(1&t&&(n.Wb(0,"mat-option",58),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t.unitOrganization," ")}}function Jc(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Yc,2,2,"mat-option",56),n.ic(2,"async"),n.Tb()),2&t){const t=n.hc(9);n.Db(1),n.oc("ngForOf",n.jc(2,1,t.communicationMeanFilteredResult))}}function Zc(t,e){if(1&t&&n.Rb(0,"mat-option",70),2&t){const t=n.hc(9);n.oc("innerHTML",t.communicationMeanInfo,n.Ec)}}function tl(t,e){1&t&&(n.Wb(0,"mat-option",71),n.Rb(1,"mat-spinner",72),n.Vb())}function el(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"input",64,65),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("keyup",(function(){return n.Dc(t),n.hc(8).resetM2MFields()})),n.ic(3,"translate"),n.Vb(),n.Oc(4,Kc,1,1,"mat-hint",40),n.Wb(5,"mat-autocomplete",66,67),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc(8).selectCommunicationMean(e)})),n.Oc(7,Jc,3,3,"ng-container",34),n.Oc(8,Zc,1,1,"mat-option",68),n.Oc(9,tl,2,0,"mat-option",69),n.Vb(),n.Vb()}if(2&t){const t=n.zc(6),e=n.hc(4).$implicit,i=n.hc(4);n.Db(1),n.oc("placeholder",n.jc(3,7,"lang.searchCommunicationMean"))("formControl",e.control)("matAutocomplete",t),n.Db(3),n.oc("ngIf",!i.isEmptyValue(e.desc)),n.Db(3),n.oc("ngIf",i.communicationMeanResult.length>0&&!i.communicationMeanLoading),n.Db(1),n.oc("ngIf",0===i.communicationMeanResult.length&&!i.communicationMeanLoading),n.Db(1),n.oc("ngIf",i.communicationMeanLoading)}}function il(t,e){if(1&t&&n.Rb(0,"mat-hint",42),2&t){const t=n.hc(5).$implicit;n.oc("innerHTML",t.desc,n.Ec)}}function nl(t,e){if(1&t&&(n.Wb(0,"mat-form-field"),n.Rb(1,"input",73,65),n.ic(3,"translate"),n.Oc(4,il,1,1,"mat-hint",40),n.Vb()),2&t){const t=n.hc(4).$implicit,e=n.hc(4);n.Db(1),n.oc("placeholder",n.jc(3,3,"lang.communicationMean"))("formControl",t.control),n.Db(3),n.oc("ngIf",!e.isEmptyValue(t.desc))}}function al(t,e){if(1&t&&(n.Ub(0),n.Oc(1,el,10,9,"mat-form-field",34),n.Oc(2,nl,5,5,"mat-form-field",34),n.Tb()),2&t){const t=n.hc(7);n.Db(1),n.oc("ngIf",t.annuaryEnabled),n.Db(1),n.oc("ngIf",!t.annuaryEnabled)}}function sl(t,e){if(1&t&&n.Rb(0,"mat-hint",42),2&t){const t=n.hc(5).$implicit;n.oc("innerHTML",t.desc,n.Ec)}}function ol(t,e){if(1&t&&(n.Wb(0,"mat-option",58),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t.unitOrganization," ")}}function rl(t,e){if(1&t&&(n.Ub(0),n.Oc(1,ol,2,2,"mat-option",56),n.ic(2,"async"),n.Tb()),2&t){const t=n.hc(9);n.Db(1),n.oc("ngForOf",n.jc(2,1,t.externalId_m2mFilteredResult))}}function cl(t,e){if(1&t&&n.Rb(0,"mat-option",70),2&t){const t=n.hc(9);n.oc("innerHTML",t.externalId_m2mInfo,n.Ec)}}function ll(t,e){1&t&&(n.Wb(0,"mat-option",71),n.Rb(1,"mat-spinner",72),n.Vb())}function dl(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"input",64,74),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("keyup",(function(){return n.Dc(t),n.hc(8).resetAutocompleteExternalIdM2M()})),n.ic(3,"translate"),n.Vb(),n.Oc(4,sl,1,1,"mat-hint",40),n.Wb(5,"mat-autocomplete",66,67),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc(8).selectExternalIdM2M(e)})),n.Oc(7,rl,3,3,"ng-container",34),n.Oc(8,cl,1,1,"mat-option",68),n.Oc(9,ll,2,0,"mat-option",69),n.Vb(),n.Vb()}if(2&t){const t=n.zc(6),e=n.hc(4).$implicit,i=n.hc(4);n.Db(1),n.oc("placeholder",n.jc(3,7,"lang.searchExternalIdM2M"))("formControl",e.control)("matAutocomplete",t),n.Db(3),n.oc("ngIf",!i.isEmptyValue(e.desc)),n.Db(3),n.oc("ngIf",i.externalId_m2mResult.length>0&&!i.externalId_m2mLoading),n.Db(1),n.oc("ngIf",0===i.externalId_m2mResult.length&&!i.externalId_m2mLoading),n.Db(1),n.oc("ngIf",i.externalId_m2mLoading)}}function hl(t,e){if(1&t&&n.Rb(0,"mat-hint",42),2&t){const t=n.hc(5).$implicit;n.oc("innerHTML",t.desc,n.Ec)}}function ul(t,e){if(1&t&&(n.Wb(0,"mat-form-field"),n.Rb(1,"input",73,74),n.ic(3,"translate"),n.Oc(4,hl,1,1,"mat-hint",40),n.Vb()),2&t){const t=n.hc(4).$implicit,e=n.hc(4);n.Db(1),n.oc("placeholder",n.jc(3,3,"lang.IdMaarch2Maarch"))("formControl",t.control),n.Db(3),n.oc("ngIf",!e.isEmptyValue(t.desc))}}function pl(t,e){if(1&t&&(n.Ub(0),n.Oc(1,dl,10,9,"mat-form-field",34),n.Oc(2,ul,5,5,"mat-form-field",34),n.Tb()),2&t){const t=n.hc(7);n.Db(1),n.oc("ngIf",t.annuaryEnabled),n.Db(1),n.oc("ngIf",!t.annuaryEnabled)}}function bl(t,e){if(1&t&&(n.Wb(0,"mat-option",58),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}function fl(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"mat-form-field"),n.Rb(2,"input",75,76),n.Wb(4,"mat-autocomplete",77,78),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc(7).selectCountry(e)})),n.Oc(6,bl,2,2,"mat-option",56),n.ic(7,"async"),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=n.zc(5),e=n.hc(3).$implicit,i=n.hc(4);n.Db(2),n.oc("formControl",e.control)("placeholder",e.label)("matAutocomplete",t),n.Db(4),n.oc("ngForOf",n.jc(7,4,i.countriesFilteredResult))}}function ml(t,e){if(1&t&&(n.Wb(0,"p",38),n.Oc(1,Rc,6,6,"ng-container",34),n.Oc(2,Ac,4,4,"ng-container",34),n.Oc(3,Tc,3,15,"ng-container",34),n.Oc(4,Lc,9,7,"ng-container",34),n.Oc(5,Uc,8,6,"ng-container",34),n.Oc(6,qc,9,6,"ng-container",34),n.Oc(7,al,3,2,"ng-container",34),n.Oc(8,pl,3,2,"ng-container",34),n.Oc(9,fl,8,6,"ng-container",34),n.Vb()),2&t){const t=n.hc(2).$implicit;n.Db(1),n.oc("ngIf","string"===t.type&&"communicationMeans"!==t.id&&"externalId_m2m"!==t.id&&"addressCountry"!=t.id),n.Db(1),n.oc("ngIf","integer"===t.type),n.Db(1),n.oc("ngIf","select"===t.type),n.Db(1),n.oc("ngIf","date"===t.type),n.Db(1),n.oc("ngIf","radio"===t.type),n.Db(1),n.oc("ngIf","checkbox"===t.type),n.Db(1),n.oc("ngIf","communicationMeans"===t.id),n.Db(1),n.oc("ngIf","externalId_m2m"===t.id),n.Db(1),n.oc("ngIf","addressCountry"===t.id)}}function gl(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",79),n.dc("click",(function(){n.Dc(t);const e=n.hc(2).$implicit;return n.hc(4).removeField(e)})),n.Rb(1,"mat-icon",80),n.Vb()}if(2&t){const t=n.hc(2).$implicit,e=n.hc(4);n.oc("disabled",!e.canDelete(t))}}function vl(t,e){if(1&t&&(n.Wb(0,"mat-list-item",35),n.Oc(1,ml,10,9,"p",36),n.Oc(2,gl,2,1,"button",37),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",t.display),n.Db(1),n.oc("ngIf",t.display)}}function _l(t,e){1&t&&(n.Wb(0,"mat-error"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.requiredField"),""))}function yl(t,e){if(1&t&&(n.Wb(0,"p",38),n.Wb(1,"mat-form-field"),n.Rb(2,"input",81),n.Oc(3,_l,3,3,"mat-error",34),n.Vb(),n.Vb()),2&t){const t=n.hc(2).$implicit;n.Db(2),n.oc("formControl",t.control)("placeholder",t.label)("required",t.required),n.Db(1),n.oc("ngIf",t.control.hasError("required"))}}function xl(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",79),n.dc("click",(function(){n.Dc(t);const e=n.hc(2).$implicit;return n.hc(4).removeField(e)})),n.Rb(1,"mat-icon",80),n.Vb()}if(2&t){const t=n.hc(2).$implicit,e=n.hc(4);n.oc("disabled",!e.canDelete(t))}}function Cl(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-list-item",35),n.Oc(2,yl,4,4,"p",36),n.Oc(3,xl,2,1,"button",37),n.Vb(),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(2),n.oc("ngIf",t.display),n.Db(1),n.oc("ngIf",t.display)}}function Ol(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",19),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(6).addressBANCurrentDepartment=i})),n.Qc(1),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.Rc(t)}}function Dl(t,e){if(1&t&&(n.Wb(0,"mat-option",58),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t.address," ")}}function wl(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Dl,2,2,"mat-option",56),n.ic(2,"async"),n.Tb()),2&t){const t=n.hc(6);n.Db(1),n.oc("ngForOf",n.jc(2,1,t.addressBANFilteredResult))}}function Ml(t,e){if(1&t&&n.Rb(0,"mat-option",70),2&t){const t=n.hc(6);n.oc("innerHTML",t.addressBANInfo,n.Ec)}}function kl(t,e){1&t&&(n.Wb(0,"mat-option",71),n.Rb(1,"mat-spinner",72),n.Vb())}function Sl(t,e){if(1&t&&(n.Wb(0,"p",38),n.Qc(1),n.Vb()),2&t){const t=n.hc(7);n.Db(1),n.Sc(" ",t.getValue("addressAdditional1")," ")}}function Il(t,e){if(1&t&&(n.Wb(0,"p",38),n.Qc(1),n.Vb()),2&t){const t=n.hc(7);n.Db(1),n.Sc(" ",t.getValue("addressAdditional2")," ")}}function Pl(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",90),n.Wb(1,"mat-list-item",91),n.dc("click",(function(){return n.Dc(t),n.hc(6).goTo()})),n.ic(2,"translate"),n.Rb(3,"mat-icon",92),n.Oc(4,Sl,2,1,"p",36),n.Wb(5,"p",38),n.Qc(6),n.Vb(),n.Oc(7,Il,2,1,"p",36),n.Wb(8,"p",38),n.Qc(9),n.Vb(),n.Wb(10,"p",38),n.Qc(11),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(6);n.Db(1),n.oc("title",n.jc(2,8,"lang.address")),n.Db(3),n.oc("ngIf",!t.isEmptyValue(t.getValue("addressAdditional1"))),n.Db(2),n.Tc(" ",t.getValue("addressNumber")," ",t.getValue("addressStreet")," "),n.Db(1),n.oc("ngIf",!t.isEmptyValue(t.getValue("addressAdditional2"))),n.Db(2),n.Tc(" ",t.getValue("addressPostcode")," ",t.getValue("addressTown")," "),n.Db(2),n.Sc(" ",t.getValue("addressCountry")," ")}}function Vl(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"mat-list-item"),n.Wb(2,"p",38),n.Wb(3,"mat-form-field",82),n.Wb(4,"button",83),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.ic(5,"translate"),n.Qc(6),n.Rb(7,"i",84),n.Vb(),n.Wb(8,"mat-menu",null,85),n.Oc(10,Ol,2,1,"button",86),n.Vb(),n.Rb(11,"mat-icon",87),n.Wb(12,"input",88,76),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("focus",(function(){return n.Dc(t),n.hc(5).resetAutocompleteAddressBan()})),n.ic(14,"translate"),n.Vb(),n.Wb(15,"mat-autocomplete",66,67),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc(5).selectAddressBan(e)})),n.Oc(17,wl,3,3,"ng-container",34),n.Oc(18,Ml,1,1,"mat-option",68),n.Oc(19,kl,2,0,"mat-option",69),n.Vb(),n.Vb(),n.Oc(20,Pl,12,10,"mat-card",89),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=n.zc(9),e=n.zc(16),i=n.hc(5);n.Db(4),n.oc("matMenuTriggerFor",t)("title",n.jc(5,11,"lang.targetDepartment")),n.Db(2),n.Sc(" ",i.addressBANCurrentDepartment,"\xa0"),n.Db(4),n.oc("ngForOf",i.departmentList),n.Db(2),n.oc("placeholder",n.jc(14,13,"lang.searchAddressBan"))("formControl",i.addressBANControl)("matAutocomplete",e),n.Db(5),n.oc("ngIf",i.addressBANResult.length>0&&!i.addressBANLoading),n.Db(1),n.oc("ngIf",0===i.addressBANResult.length&&!i.addressBANLoading),n.Db(1),n.oc("ngIf",i.addressBANLoading),n.Db(1),n.oc("ngIf",!i.emptyAddress())}}const Rl=function(){return["addressAdditional1","addressAdditional2"]};function jl(t,e){if(1&t&&(n.Ub(0),n.Oc(1,vl,3,2,"mat-list-item",33),n.Oc(2,Cl,4,2,"ng-container",34),n.Oc(3,Vl,21,15,"ng-container",34),n.Tb()),2&t){const t=e.$implicit,i=e.index,a=n.hc(2).$implicit,s=n.hc(2);n.Db(1),n.oc("ngIf",t.unit===a.id&&"address"!==a.id||t.unit===a.id&&"address"===a.id&&!s.addressBANMode),n.Db(1),n.oc("ngIf","address"===a.id&&s.addressBANMode&&n.uc(3,Rl).indexOf(t.id)>-1),n.Db(1),n.oc("ngIf","address"===a.id&&s.addressBANMode&&0===i)}}function Al(t,e){if(1&t&&(n.Wb(0,"div"),n.Wb(1,"mat-list"),n.Wb(2,"h3",29),n.Wb(3,"span",30),n.Qc(4),n.Vb(),n.Oc(5,Sc,4,5,"a",31),n.Vb(),n.Oc(6,jl,4,4,"ng-container",8),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc(2);n.Ib("col-sm-12","maarch2maarch"!==t.id&&"complement"!==t.id&&!e.isEmptyUnit("mainInfo")&&!e.isEmptyUnit("address"))("col-md-6","maarch2maarch"!==t.id&&"complement"!==t.id&&!e.isEmptyUnit("mainInfo")&&!e.isEmptyUnit("address"))("col-md-12","complement"===t.id||"maarch2maarch"===t.id),n.Db(4),n.Rc(t.label),n.Db(1),n.oc("ngIf","address"===t.id),n.Db(1),n.oc("ngForOf",e.contactForm)}}function Wl(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Al,7,9,"div",28),n.Tb()),2&t){const t=e.$implicit,i=n.hc(2);n.Db(1),n.oc("ngIf",!i.isEmptyUnit(t.id))}}function Tl(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-menu",null,4),n.Wb(2,"button",5),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"button",5),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Wb(8,"button",5),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Wb(11,"button",5),n.Qc(12,"Maarch2Maarch"),n.Vb(),n.Vb(),n.Wb(13,"mat-menu",null,6),n.Wb(15,"button",7),n.dc("click",(function(){return n.Dc(t),n.hc().toogleAllFieldsUnit("mainInfo")})),n.Qc(16),n.ic(17,"translate"),n.Vb(),n.Rb(18,"mat-divider"),n.Oc(19,mc,2,1,"ng-container",8),n.Vb(),n.Wb(20,"mat-menu",null,9),n.Wb(22,"button",7),n.dc("click",(function(){return n.Dc(t),n.hc().toogleAllFieldsUnit("address")})),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Rb(25,"mat-divider"),n.Oc(26,_c,2,1,"ng-container",8),n.Vb(),n.Wb(27,"mat-menu",null,10),n.Wb(29,"button",7),n.dc("click",(function(){return n.Dc(t),n.hc().toogleAllFieldsUnit("complement")})),n.Qc(30),n.ic(31,"translate"),n.Vb(),n.Rb(32,"mat-divider"),n.Oc(33,Cc,2,1,"ng-container",8),n.Vb(),n.Wb(34,"mat-menu",null,11),n.Wb(36,"button",7),n.dc("click",(function(){return n.Dc(t),n.hc().toogleAllFieldsUnit("maarch2maarch")})),n.Qc(37),n.ic(38,"translate"),n.Vb(),n.Rb(39,"mat-divider"),n.Oc(40,wc,2,1,"ng-container",8),n.Vb(),n.Oc(41,Mc,7,8,"div",12),n.Oc(42,kc,17,22,"div",13),n.Wb(43,"div",14),n.Oc(44,Wl,2,1,"ng-container",8),n.Vb(),n.Wb(45,"div",15),n.Wb(46,"button",16),n.Qc(47),n.ic(48,"translate"),n.Vb(),n.Wb(49,"button",17),n.dc("click",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Qc(50),n.ic(51,"translate"),n.Vb(),n.Vb()}if(2&t){const t=n.zc(1),e=n.zc(14),i=n.zc(21),a=n.zc(28),s=n.zc(35),o=n.hc();n.Db(2),n.oc("matMenuTriggerFor",e)("disabled",o.noField("mainInfo")),n.Db(1),n.Rc(n.jc(4,25,"lang.denomination")),n.Db(2),n.oc("matMenuTriggerFor",i)("disabled",o.noField("address")),n.Db(1),n.Rc(n.jc(7,27,"lang.address")),n.Db(2),n.oc("matMenuTriggerFor",a)("disabled",o.noField("complement")),n.Db(1),n.Rc(n.jc(10,29,"lang.additionals")),n.Db(2),n.oc("matMenuTriggerFor",s)("disabled",o.noField("maarch2maarch")),n.Db(5),n.Rc(n.jc(17,31,"lang.addAll")),n.Db(3),n.oc("ngForOf",o.contactForm),n.Db(4),n.Rc(n.jc(24,33,"lang.addAll")),n.Db(3),n.oc("ngForOf",o.contactForm),n.Db(4),n.Rc(n.jc(31,35,"lang.addAll")),n.Db(3),n.oc("ngForOf",o.contactForm),n.Db(4),n.Rc(n.jc(38,37,"lang.addAll")),n.Db(3),n.oc("ngForOf",o.contactForm),n.Db(1),n.oc("ngIf",o.fillingParameters.enable),n.Db(1),n.oc("ngIf",null!==o.companyFound),n.Db(2),n.oc("ngForOf",o.contactUnit),n.Db(2),n.oc("matMenuTriggerFor",t),n.Db(1),n.Sc("",n.jc(48,39,"lang.moreInfos"),"..."),n.Db(3),n.Rc(n.jc(51,41,"lang.validate"))}}let El=(()=>{class t{constructor(t,e,i,s,o,r,c,l,d,h,u){this.translate=t,this.http=e,this.route=i,this.router=s,this.notify=o,this.headerService=r,this.appService=c,this.dialog=l,this.contactService=d,this.functions=h,this.latinisePipe=u,this.countries=[],this.countryControl=new X.i,this.loading=!1,this.creationMode=!0,this.contactId=null,this.onSubmitEvent=new n.o,this.maarch2maarchUrl=`https://docs.maarch.org/gitbook/html/MaarchCourrier/${a.a.VERSION.split(".")[0]+"."+a.a.VERSION.split(".")[1]}/guat/guat_exploitation/maarch2maarch.html`,this.contactUnit=[{id:"mainInfo",label:this.translate.instant("lang.denomination")},{id:"address",label:this.translate.instant("lang.address")},{id:"complement",label:this.translate.instant("lang.additionals")},{id:"maarch2maarch",label:"Maarch2Maarch"}],this.contactForm=[{id:"company",unit:"mainInfo",label:this.translate.instant("lang.contactsParameters_company"),type:"string",control:new X.i,required:!1,display:!0,filling:!1,values:[]},{id:"civility",unit:"mainInfo",label:this.translate.instant("lang.contactsParameters_civility"),type:"select",control:new X.i,required:!1,display:!1,filling:!1,values:[]},{id:"firstname",unit:"mainInfo",label:this.translate.instant("lang.contactsParameters_firstname"),type:"string",control:new X.i,required:!1,display:!1,filling:!1,values:[]},{id:"lastname",unit:"mainInfo",label:this.translate.instant("lang.contactsParameters_lastname"),type:"string",control:new X.i,required:!1,display:!1,filling:!1,values:[]},{id:"function",unit:"mainInfo",label:this.translate.instant("lang.contactsParameters_function"),type:"string",control:new X.i,required:!1,display:!1,filling:!1,values:[]},{id:"department",unit:"mainInfo",label:this.translate.instant("lang.contactsParameters_department"),type:"string",control:new X.i,required:!1,display:!1,filling:!1,values:[]},{id:"email",unit:"mainInfo",label:this.translate.instant("lang.email"),type:"string",control:new X.i,required:!1,display:!0,filling:!1,values:[]},{id:"phone",unit:"mainInfo",label:this.translate.instant("lang.phoneNumber"),type:"string",control:new X.i,required:!1,display:!0,filling:!1,values:[]},{id:"notes",unit:"mainInfo",label:this.translate.instant("lang.note"),type:"string",control:new X.i,required:!1,display:!1,filling:!1,values:[]},{id:"addressAdditional1",unit:"address",label:this.translate.instant("lang.contactsParameters_addressAdditional1"),type:"string",control:new X.i,required:!1,display:!1,filling:!1,values:[]},{id:"addressNumber",unit:"address",label:this.translate.instant("lang.contactsParameters_addressNumber"),type:"string",control:new X.i,required:!1,display:!1,filling:!1,values:[]},{id:"addressStreet",unit:"address",label:this.translate.instant("lang.contactsParameters_addressStreet"),type:"string",control:new X.i,required:!1,display:!1,filling:!1,values:[]},{id:"addressAdditional2",unit:"address",label:this.translate.instant("lang.contactsParameters_addressAdditional2"),type:"string",control:new X.i,required:!1,display:!1,filling:!1,values:[]},{id:"addressPostcode",unit:"address",label:this.translate.instant("lang.contactsParameters_addressPostcode"),type:"string",control:new X.i,required:!1,display:!1,filling:!1,values:[]},{id:"addressTown",unit:"address",label:this.translate.instant("lang.contactsParameters_addressTown"),type:"string",control:new X.i,required:!1,display:!1,filling:!1,values:[]},{id:"addressCountry",unit:"address",label:this.translate.instant("lang.contactsParameters_addressCountry"),type:"string",control:new X.i,required:!1,display:!1,filling:!1,values:[]},{id:"communicationMeans",unit:"maarch2maarch",label:this.translate.instant("lang.communicationMean"),desc:`${this.translate.instant("lang.communicationMeanDesc")} (${this.translate.instant("lang.see")} <a href="${this.maarch2maarchUrl}" target="_blank">MAARCH2MAARCH</a>)`,type:"string",control:new X.i,required:!1,display:!1,filling:!1,values:[]},{id:"externalId_m2m",unit:"maarch2maarch",label:this.translate.instant("lang.IdMaarch2Maarch"),desc:`${this.translate.instant("lang.m2mContactInfo")} (${this.translate.instant("lang.see")} <a href="${this.maarch2maarchUrl}" target="_blank">MAARCH2MAARCH</a>)`,type:"string",control:new X.i,required:!1,display:!1,filling:!1,values:[]}],this.addressBANInfo="",this.addressBANMode=!0,this.addressBANControl=new X.i,this.addressBANLoading=!1,this.addressBANResult=[],this.addressBANCurrentDepartment="75",this.departmentList=[],this.fillingParameters=null,this.fillingRate={class:"warn",color:this.contactService.getFillingColor("first"),value:0},this.companyFound=null,this.communicationMeanInfo="",this.communicationMeanResult=[],this.communicationMeanLoading=!1,this.externalId_m2mInfo="",this.externalId_m2mResult=[],this.externalId_m2mLoading=!1,this.annuaryM2MId=null,this.annuaryEnabled=!1}ngOnInit(){this.loading=!0,this.initBanSearch(),null===this.contactId?(this.creationMode=!0,this.http.get("../rest/contactsParameters").pipe(Object(mt.a)(t=>{this.fillingParameters=t.contactsFilling,this.initElemForm(t),this.annuaryEnabled=t.annuaryEnabled}),p(()=>this.http.get("../rest/civilities")),Object(mt.a)(t=>{this.initCivilities(t.civilities)}),p(()=>this.http.get("../rest/contactsCustomFields")),Object(mt.a)(t=>{this.initCustomElementForm(t),this.initAutocompleteAddressBan(),this.initAutocompleteCommunicationMeans(),this.initAutocompleteExternalIdM2M(),this.getCountries(),this.initAutocompleteCountries()}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()):(this.creationMode=!1,this.contactForm.forEach(t=>{t.display=!1}),this.http.get("../rest/contactsParameters").pipe(Object(mt.a)(t=>{this.fillingParameters=t.contactsFilling,this.initElemForm(t),this.annuaryEnabled=t.annuaryEnabled}),p(()=>this.http.get("../rest/civilities")),Object(mt.a)(t=>{this.initCivilities(t.civilities)}),p(()=>this.http.get("../rest/contactsCustomFields")),Object(mt.a)(t=>{this.initCustomElementForm(t),this.initAutocompleteAddressBan(),this.initAutocompleteCommunicationMeans(),this.initAutocompleteExternalIdM2M(),this.getCountries(),this.initAutocompleteCountries()}),p(()=>this.http.get("../rest/contacts/"+this.contactId)),Object(l.a)(t=>(t.fillingRate=this.contactService.formatFillingObject(t.fillingRate),t)),Object(mt.a)(t=>{this.setContactData(t),this.setContactDataExternal(t)}),Object(d.a)(t=>null!==t.customFields),Object(mt.a)(t=>{this.setContactCustomData(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe())}initElemForm(t){let e=[];t.contactsParameters.forEach(t=>{let i=this.contactForm.filter(e=>e.id===t.identifier)[0];if(e=[],void 0===i&&void 0!==t.identifier.split("_")[1]){let e={};e={id:"customField_"+t.identifier.split("_")[1],unit:"complement",label:null,type:null,control:new X.i,required:!1,display:!1,values:[]},this.contactForm.push(e),i=this.contactForm.filter(t=>t.id===e.id)[0]}void 0!==i&&((t.filling&&this.fillingParameters.enable&&this.creationMode||t.mandatory)&&(i.display=!0),t.filling&&this.fillingParameters.enable&&(i.filling=!0),"email"===t.identifier?e.push(X.I.email):"phone"===t.identifier&&e.push(X.I.pattern(/^\+?((|\ |\.|\(|\)|\-)?(\d)*)*\d$/)),t.mandatory&&(i.required=!0,e.push(X.I.required)),i.control.setValidators(e))})}initCivilities(t){const e=[];Object.keys(t).forEach(i=>{e.push({id:i,label:t[i].label})}),this.contactForm.filter(t=>"civility"===t.id)[0].values=e}getCountries(){this.http.get("../rest/registeredMail/countries").pipe(Object(mt.a)(t=>{this.countries=t.countries.map(t=>this.latinisePipe.transform(t.toUpperCase()))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}initAutocompleteCountries(){this.contactForm.map(t=>{"addressCountry"===t.id&&(this.countriesFilteredResult=t.control.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>this._filter(t))))})}_filter(t){const e=t.toLowerCase();return this.countries.filter(t=>t.toLowerCase().includes(e))}selectCountry(t){const e=this.contactForm.map(t=>t.id).indexOf("addressCountry");this.contactForm[e].control.setValue(t.option.value)}initCustomElementForm(t){let e=[],i={};t.customFields.forEach(t=>{e=[],i=this.contactForm.filter(e=>e.id==="customField_"+t.id)[0],void 0!==i&&(i.label=t.label,i.type=t.type,i.values=t.values.map(t=>({id:t,label:t})),"integer"===t.type&&(e.push(X.I.pattern(/^[+-]?([0-9]+([.][0-9]*)?|[.][0-9]+)$/)),i.control.setValidators(e)))})}setContactData(t){let e=-1;Object.keys(t).forEach(i=>{e=this.contactForm.map(t=>t.id).indexOf(i),!this.isEmptyValue(t[i])&&e>-1&&(this.contactForm[e].control.setValue("civility"===i?t[i].id:t[i]),"company"===i&&this.isEmptyValue(this.contactForm.filter(t=>"lastname"===t.id)[0].control.value)?this.contactForm.filter(t=>"lastname"===t.id)[0].display=!1:"lastname"===i&&this.isEmptyValue(this.contactForm.filter(t=>"company"===t.id)[0].control.value)&&(this.contactForm.filter(t=>"company"===t.id)[0].display=!1),this.contactForm[e].display=!0)}),this.isEmptyValue(this.contactForm.filter(t=>"company"===t.id)[0].control.value)&&!this.isEmptyValue(this.contactForm.filter(t=>"lastname"===t.id)[0].control.value)&&(this.contactForm.filter(t=>"company"===t.id)[0].display=!1),this.checkFilling()}setContactDataExternal(t){void 0!==t.externalId&&Object.keys(t.externalId).forEach(e=>{this.isEmptyValue(t.externalId[e])||("m2m"===e?(this.contactForm.filter(t=>"externalId_m2m"===t.id)[0].control.setValue(t.externalId[e]),this.contactForm.filter(t=>"externalId_m2m"===t.id)[0].display=!0):this.contactForm.push("m2m_annuary_id"===e?{id:"externalId_"+e,unit:"maarch2maarch",label:e,type:"string",control:new X.i({value:t.externalId[e],disabled:!0}),required:!1,display:!0,filling:!1,values:[]}:{id:"externalId_"+e,unit:"complement",label:e,type:"string",control:new X.i({value:t.externalId[e],disabled:!0}),required:!1,display:!0,filling:!1,values:[]}))})}setContactCustomData(t){let e=-1;Object.keys(t.customFields).forEach(i=>{if(e=this.contactForm.map(t=>t.id).indexOf("customField_"+i),!this.isEmptyValue(t.customFields[i])&&e>-1){if("date"===this.contactForm[e].type){const e=new Date(this.functions.formatFrenchDateToTechnicalDate(t.customFields[i]));t.customFields[i]=e}this.contactForm[e].control.setValue(t.customFields[i]),this.contactForm[e].display=!0}}),this.checkFilling()}initBanSearch(){this.http.get("../rest/ban/availableDepartments").pipe(Object(mt.a)(t=>{null!==t.default&&-1!==t.departments.indexOf(t.default.toString())&&(this.addressBANCurrentDepartment=t.default),this.departmentList=t.departments}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}isValidForm(){let t=!0;return this.contactForm.filter(t=>t.display).forEach(e=>{"DISABLED"!==e.control.status&&"VALID"!==e.control.status&&(t=!1),e.control.markAsTouched()}),t}onSubmit(){this.checkFilling(),this.addressBANMode&&this.emptyAddress()&&!this.noAddressRequired()?this.notify.error(this.translate.instant("lang.chooseBAN")):this.isValidForm()?null!==this.contactId?this.updateContact():this.createContact():this.notify.error(this.translate.instant("lang.mustFixErrors"))}createContact(){this.http.post("../rest/contacts",this.formatContact()).pipe(Object(mt.a)(t=>{this.onSubmitEvent.emit(t.id),this.notify.success(this.translate.instant("lang.contactAdded")),this.functions.empty(t.warning)||this.notify.error(t.warning)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}updateContact(){this.http.put("../rest/contacts/"+this.contactId,this.formatContact()).pipe(Object(mt.a)(t=>{this.onSubmitEvent.emit(this.contactId),this.notify.success(this.translate.instant("lang.contactUpdated")),this.functions.empty(t)||this.functions.empty(t.warning)||this.notify.error(t.warning)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}formatContact(){const t={customFields:{},externalId:{}},e=/customField_[.]*/g,i=/externalId_[.]*/g;return this.contactForm.filter(t=>t.display).forEach(n=>{if("date"===n.type&&!this.functions.empty(n.control.value)){const t=new Date(n.control.value);n.control.value=this.functions.formatDateObjectToDateString(t)}null!==n.id.match(e)?t.customFields[n.id.split(/_(.+)/)[1]]=n.control.value:null!==n.id.match(i)?t.externalId[n.id.split(/_(.+)/)[1]]=n.control.value:t[n.id]=n.control.value}),t}isEmptyUnit(t){return 0===this.contactForm.filter(e=>e.display&&e.unit===t).length}initForm(){this.contactForm.forEach(t=>{t.control=new X.i({value:"",disabled:!1})})}toogleAllFieldsUnit(t){this.contactForm.filter(e=>e.unit===t).forEach(t=>{t.display=!0})}noField(t){return 0===this.contactForm.filter(e=>!e.display&&e.unit===t).length}isEmptyValue(t){return null==t||(Array.isArray(t)?!(t.length>0):""===String(t))}checkCompany(t){"company"!==t.id||""===t.control.value||null!==this.companyFound&&this.companyFound.company===t.control.value?"company"===t.id&&""===t.control.value&&(this.companyFound=null):this.http.get("../rest/autocomplete/contacts/company?search="+t.control.value).pipe(Object(mt.a)(()=>this.companyFound=null),Object(d.a)(t=>t.length>0),Object(mt.a)(t=>{this.functions.empty(t[0].addressNumber)&&this.functions.empty(t[0].addressStreet)&&this.functions.empty(t[0].addressPostcode)&&this.functions.empty(t[0].addressTown)&&this.functions.empty(t[0].addressCountry)||(this.companyFound=t[0])}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}setAddress(t,e=!0){this.companyFound=null;let i=-1;Object.keys(t).forEach(e=>{i=this.contactForm.map(t=>t.id).indexOf(e),!this.isEmptyValue(t[e])&&i>-1&&["company","addressNumber","addressStreet","addressAdditional2","addressPostcode","addressTown","addressCountry"].indexOf(e)>-1&&(this.contactForm[i].control.setValue(t[e]),this.contactForm[i].display=!0)}),this.checkFilling(),this.addressBANMode=!e}canDelete(t){if("company"===t.id){const e=this.contactForm.filter(t=>"lastname"===t.id)[0];if(e.display&&!this.isEmptyValue(e.control.value))return t.control.setValidators([]),t.required=!1,!0;{const e=[];return e.push(X.I.required),t.control.setValidators(e),t.required=!0,!1}}if("lastname"===t.id){const e=this.contactForm.filter(t=>"company"===t.id)[0];if(e.display&&!this.isEmptyValue(e.control.value))return t.control.setValidators([]),t.required=!1,!0;{const e=[];return e.push(X.I.required),t.control.setValidators(e),t.required=!0,!1}}return!t.required&&!t.control.disabled}removeField(t){if(t.display=!t.display,t.control.reset(),("externalId_m2m"===t.id||"communicationMeans"===t.id)&&!t.display){const t=this.contactForm.map(t=>t.id).indexOf("externalId_m2m_annuary_id");t>-1&&this.contactForm.splice(t,1)}this.checkFilling()}initAutocompleteCommunicationMeans(){this.communicationMeanInfo=this.translate.instant("lang.autocompleteInfo"),this.communicationMeanResult=[];const t=this.contactForm.map(t=>t.id).indexOf("communicationMeans");this.contactForm[t].control.valueChanges.pipe(Object(pt.a)(300),Object(d.a)(t=>t.length>2),Object(bt.a)(),Object(mt.a)(()=>this.communicationMeanLoading=!0),Object(ft.a)(t=>this.http.get("../rest/autocomplete/ouM2MAnnuary",{params:{company:t}})),Object(mt.a)(t=>{this.communicationMeanInfo=this.isEmptyValue(t)?this.translate.instant("lang.noAvailableValue"):"",this.communicationMeanResult=t,this.communicationMeanFilteredResult=Object(c.a)(this.communicationMeanResult),this.communicationMeanLoading=!1}),Object(m.a)(t=>(this.communicationMeanInfo=t.error.errors,this.communicationMeanLoading=!1,Object(c.a)(!1)))).subscribe()}selectCommunicationMean(t){const e=this.contactForm.map(t=>t.id).indexOf("communicationMeans");this.contactForm[e].control.setValue(t.option.value.communicationValue);const i=this.contactForm.map(t=>t.id).indexOf("externalId_m2m");this.contactForm[i].control.setValue(t.option.value.businessIdValue+"/"),this.contactForm[i].display=!0;const n=this.contactForm.map(t=>t.id).indexOf("department");this.contactForm[n].display=!0}initAutocompleteExternalIdM2M(){this.externalId_m2mInfo=this.translate.instant("lang.autocompleteInfo"),this.externalId_m2mResult=[];const t=this.contactForm.map(t=>t.id).indexOf("communicationMeans"),e=this.contactForm.map(t=>t.id).indexOf("externalId_m2m");this.contactForm[e].control.valueChanges.pipe(Object(pt.a)(300),Object(bt.a)(),Object(mt.a)(()=>this.externalId_m2mLoading=!0),Object(ft.a)(e=>this.http.get("../rest/autocomplete/businessIdM2MAnnuary",{params:{query:e,communicationValue:this.contactForm[t].control.value}})),Object(mt.a)(t=>{this.externalId_m2mInfo=this.isEmptyValue(t)?this.translate.instant("lang.noAvailableValue"):"",this.externalId_m2mResult=t,this.externalId_m2mFilteredResult=Object(c.a)(this.externalId_m2mResult),this.externalId_m2mLoading=!1}),Object(m.a)(t=>(this.externalId_m2mInfo=t.error.errors,this.externalId_m2mLoading=!1,Object(c.a)(!1)))).subscribe()}selectExternalIdM2M(t){const e=this.contactForm.map(t=>t.id).indexOf("externalId_m2m");this.contactForm[e].control.setValue(t.option.value.businessIdValue);const i=this.contactForm.map(t=>t.id).indexOf("externalId_m2m_annuary_id");this.contactForm[i].control.setValue(t.option.value.entryuuid)}resetAutocompleteExternalIdM2M(){let t=-1;t=this.contactForm.map(t=>t.id).indexOf("externalId_m2m_annuary_id"),t>-1?this.contactForm[t].control.setValue(""):this.contactForm.push({id:"externalId_m2m_annuary_id",unit:"maarch2maarch",label:"m2m_annuary_id",type:"string",control:new X.i({value:"",disabled:!0}),required:!1,display:!0,filling:!1,values:[]})}resetM2MFields(){let t=-1;t=this.contactForm.map(t=>t.id).indexOf("externalId_m2m"),this.contactForm[t].control.setValue(""),this.resetAutocompleteExternalIdM2M()}initAutocompleteAddressBan(){this.addressBANInfo=this.translate.instant("lang.autocompleteInfo"),this.addressBANResult=[],this.addressBANControl.valueChanges.pipe(Object(pt.a)(300),Object(d.a)(t=>t.length>2),Object(bt.a)(),Object(mt.a)(()=>this.addressBANLoading=!0),Object(ft.a)(t=>this.http.get("../rest/autocomplete/banAddresses",{params:{address:t,department:this.addressBANCurrentDepartment}})),Object(mt.a)(t=>{this.addressBANInfo=0===t.length?this.translate.instant("lang.noAvailableValue"):"",this.addressBANResult=t,this.addressBANFilteredResult=Object(c.a)(this.addressBANResult),this.addressBANLoading=!1})).subscribe()}resetAutocompleteAddressBan(){this.addressBANResult=[],this.addressBANInfo=this.translate.instant("lang.autocompleteInfo")}selectAddressBan(t){this.setAddress({addressNumber:t.option.value.number,addressStreet:t.option.value.afnorName,addressPostcode:t.option.value.postalCode,addressTown:t.option.value.city,addressCountry:"FRANCE"},!1),this.addressBANControl.setValue("")}getValue(t){return this.contactForm.filter(e=>e.id===t)[0].control.value}emptyAddress(){return 5===this.contactForm.filter(t=>this.isEmptyValue(t.control.value)&&["addressNumber","addressStreet","addressPostcode","addressTown","addressCountry"].indexOf(t.id)>-1).length}noAddressRequired(){return 5===this.contactForm.filter(t=>!t.required&&["addressNumber","addressStreet","addressPostcode","addressTown","addressCountry"].indexOf(t.id)>-1).length}goTo(){const t=this.contactForm.filter(t=>"addressNumber"===t.id)[0].control.value,e=this.contactForm.filter(t=>"addressStreet"===t.id)[0].control.value,i=this.contactForm.filter(t=>"addressPostcode"===t.id)[0].control.value,n=this.contactForm.filter(t=>"addressTown"===t.id)[0].control.value,a=this.contactForm.filter(t=>"addressCountry"===t.id)[0].control.value;window.open(`https://www.google.com/maps/search/${t}+${e},+${i}+${n},+${a}`,"_blank")}switchAddressMode(){const t=[];this.addressBANMode?(t.push(X.I.required),this.contactForm.filter(t=>["addressNumber","addressStreet","addressPostcode","addressTown","addressCountry"].indexOf(t.id)>-1).forEach(e=>{e.mandatory&&e.control.setValidators(t)}),this.addressBANMode=!this.addressBANMode):(this.contactForm.filter(t=>["addressNumber","addressStreet","addressPostcode","addressTown","addressCountry"].indexOf(t.id)>-1).forEach(e=>{e.mandatory&&e.control.setValidators(t)}),this.addressBANMode=!this.addressBANMode)}getErrorMsg(t){if(!this.isEmptyValue(t))return void 0!==t.required?this.translate.instant("lang.requiredField"):void 0!==t.pattern||void 0!==t.email?this.translate.instant("lang.badFormat"):"unknow validator"}checkFilling(){const t=this.contactForm.filter(t=>t.filling).length,e=this.contactForm.filter(t=>!this.isEmptyValue(t.control.value)&&t.filling).length;this.fillingRate.value=Math.round(100*e/t),this.fillingRate.value<=this.fillingParameters.first_threshold?(this.fillingRate.color=this.contactService.getFillingColor("first"),this.fillingRate.class="warn"):this.fillingRate.value<=this.fillingParameters.second_threshold?(this.fillingRate.color=this.contactService.getFillingColor("second"),this.fillingRate.class="primary"):(this.fillingRate.color=this.contactService.getFillingColor("third"),this.fillingRate.class="accent")}toUpperCase(t,e){setTimeout(()=>{const e=t.control.value;if(["lastname"].indexOf(t.id)>-1)t.control.setValue(e.toUpperCase());else if(["firstname"].indexOf(t.id)>-1){let i=e.toLowerCase().split(" ");for(let t=0;t<i.length;t++)i[t]=i[t].charAt(0).toUpperCase()+i[t].substring(1);i=i.join(" "),i=i.split("-");for(let t=0;t<i.length;t++)i[t]=i[t].charAt(0).toUpperCase()+i[t].substring(1);t.control.setValue(i.join("-"))}},100)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(q.b),n.Qb(lc),n.Qb(_t.a),n.Qb(Tt.c))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-contact-form"]],viewQuery:function(t,e){var i;1&t&&n.Kc(uc,!0),2&t&&n.yc(i=n.ec())&&(e.sidenavRight=i.first)},inputs:{creationMode:"creationMode",contactId:"contactId"},outputs:{onSubmitEvent:"onSubmitEvent"},features:[n.Cb([lc])],decls:3,vars:2,consts:[["class","loading",4,"ngIf","ngIfElse"],["elseTemplate",""],[1,"loading"],[2,"margin","auto"],["menu","matMenu"],["mat-menu-item","",3,"matMenuTriggerFor","disabled"],["mainInfo","matMenu"],["mat-menu-item","",2,"text-align","center",3,"click"],[4,"ngFor","ngForOf"],["address","matMenu"],["complement","matMenu"],["maarch2maarch","matMenu"],["style","padding: 10px;",4,"ngIf"],["class","alert-message alert-message-info","role","alert",4,"ngIf"],[1,"row",2,"margin","0px"],[2,"text-align","center","padding-top","10px"],["mat-raised-button","","color","default","type","button",3,"matMenuTriggerFor"],["mat-raised-button","","color","primary","type","button",3,"click"],["mat-menu-item","",3,"click",4,"ngIf"],["mat-menu-item","",3,"click"],["style","height: auto;padding-right: 10px;","class","fas fa-circle rate",3,"title","color",4,"ngIf"],[1,"fas","fa-circle","rate",2,"height","auto","padding-right","10px",3,"title"],[2,"padding","10px"],[1,"rate"],["mode","determinate",1,"fillingBar",3,"color","value"],["role","alert",1,"alert-message","alert-message-info"],[2,"cursor","pointer","font-weight","bold","font-style","italic",3,"click"],[2,"font-weight","bold","width","100%","display","block","text-align","center"],[3,"col-sm-12","col-md-6","col-md-12",4,"ngIf"],["mat-subheader","",1,"unitTitle"],[2,"flex","1"],["style","cursor: pointer;",3,"click",4,"ngIf"],[2,"cursor","pointer",3,"click"],["class","contact-item",4,"ngIf"],[4,"ngIf"],[1,"contact-item"],["mat-line","","class","contact-content",4,"ngIf"],["mat-icon-button","","matSuffix","","color","warn",3,"disabled","click",4,"ngIf"],["mat-line","",1,"contact-content"],["matInput","",3,"formControl","placeholder","required","blur","ngModelChange"],["align","end",3,"innerHTML",4,"ngIf"],["style","height: auto;","matSuffix","","class","fas fa-circle rate",3,"title","color",4,"ngIf"],["align","end",3,"innerHTML"],["matSuffix","",1,"fas","fa-circle","rate",2,"height","auto",3,"title"],["type","text","matInput","","min","0","step","0.1",3,"formControl","placeholder","required"],[3,"label","required","showLabel","formControlSelect","placeholderLabel","hideErrorDesc","datas","suffixIcon"],["matInput","","readonly","",2,"cursor","pointer",3,"formControl","matDatepicker","placeholder"],["matSuffix","",3,"for",4,"ngIf"],[3,"touchUi"],["picker",""],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click",4,"ngIf"],["matSuffix","",3,"for"],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click"],["color","warn",1,"fa","fa-calendar-times"],[1,"labelCustom"],["color","primary",1,"radio-form",3,"formControl"],[3,"value",4,"ngFor","ngForOf"],["style","position:absolute;height: auto;padding-right: 10px;right: 0px;z-index: 1;top: 50%;transform: translateY(-50%);","class","fas fa-circle rate",3,"title","color",4,"ngIf"],[3,"value"],[1,"fas","fa-circle","rate",2,"position","absolute","height","auto","padding-right","10px","right","0px","z-index","1","top","50%","transform","translateY(-50%)",3,"title"],[1,"checkbox-form",3,"formControl"],["shoes",""],["color","primary","checkboxPosition","before",3,"value",4,"ngFor","ngForOf"],["color","primary","checkboxPosition","before",3,"value"],["type","text","matInput","",3,"placeholder","formControl","matAutocomplete","click","keyup"],["autoCompleteInputCommunicationMean",""],[3,"optionSelected"],["auto","matAutocomplete"],["class","autoCompleteInfoResult smallInputInfo","disabled","",3,"innerHTML",4,"ngIf"],["disabled","",4,"ngIf"],["disabled","",1,"autoCompleteInfoResult","smallInputInfo",3,"innerHTML"],["disabled",""],["diameter","20"],["type","text","matInput","",3,"placeholder","formControl"],["autoCompleteInputExternalIdM2M",""],["matInput","",3,"formControl","placeholder","matAutocomplete"],["autoCompleteInput",""],["isOpen","true",3,"optionSelected"],["matAutocompleteCountries","matAutocomplete"],["mat-icon-button","","matSuffix","","color","warn",3,"disabled","click"],[1,"fa","fa-trash"],["matInput","",3,"formControl","placeholder","required"],["appearance","outline",1,"smallInput"],["mat-button","","matSuffix","",3,"matMenuTriggerFor","title","click"],[1,"fa","fa-chevron-down"],["menuDep","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["color","primary","matPrefix","",1,"fa","fa-search",2,"font-size","15px"],["type","text","matInput","","maxlength","128",3,"placeholder","formControl","matAutocomplete","click","focus"],["style","margin:10px;",4,"ngIf"],[2,"margin","10px"],[1,"contact-address",3,"title","click"],["mat-list-icon","","color","primary",1,"contact-group","fas","fa-map-marker-alt"]],template:function(t,e){if(1&t&&(n.Oc(0,pc,2,0,"div",0),n.Oc(1,Tl,52,43,"ng-template",null,1,n.Pc)),2&t){const t=n.zc(2);n.oc("ngIf",e.loading)("ngIfElse",t)}},directives:[P.t,V.c,ne.e,ne.b,ne.d,T.a,P.s,k.b,S.a,ni.a,R.a,R.g,R.d,W.l,Y.c,J.b,X.d,X.u,X.j,X.F,Y.f,Y.b,Y.j,fr,Y.g,ae.h,ae.f,ae.j,hc.b,hc.a,R.i,R.f,Ne.d,Ne.a,W.p,Y.i,X.p,K.a,R.c],pipes:[g.d,P.b],styles:[".contact-item[_ngcontent-%COMP%]{height:auto!important}.unitTitle[_ngcontent-%COMP%]{display:flex;color:#135f7f}.contact-address[_ngcontent-%COMP%]{cursor:pointer;color:#337ab7}.contact-address[_ngcontent-%COMP%]:hover .contact-content[_ngcontent-%COMP%]{text-decoration:underline}.contact-content[_ngcontent-%COMP%]{position:relative}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-button[_ngcontent-%COMP%]{width:30px;height:25px;color:#135f7f}.smallInput[_ngcontent-%COMP%] .mat-button[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;line-height:normal;align-items:center}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.radio-form[_ngcontent-%COMP%]{display:flex}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1;max-width:250px}.checkbox-form[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr);overflow:auto;max-height:200px;border:1px solid rgba(0,0,0,.12);border-radius:5px}.loading[_ngcontent-%COMP%]{display:flex;height:100%}.fillingBar[_ngcontent-%COMP%] .mat-progress-bar-buffer{background:#e4e8eb}.rate[_ngcontent-%COMP%]{font-size:10px;text-align:right}.fillingBar.mat-warn[_ngcontent-%COMP%] .mat-progress-bar-fill:after{background-color:#e81c2b}.fillingBar.mat-primary[_ngcontent-%COMP%] .mat-progress-bar-fill:after{background-color:#f4891e}.fillingBar.mat-accent[_ngcontent-%COMP%] .mat-progress-bar-fill:after{background-color:#0aa34f}.mat-error[_ngcontent-%COMP%]{font-size:10px;text-align:right;font-weight:700}.labelCustom[_ngcontent-%COMP%]{color:rgba(0,0,0,.54);transform:scale(.75) translateX(-15%);font-weight:400}.alert-message-info[_ngcontent-%COMP%]{margin:10px auto auto;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content;padding:0;overflow:hidden}"],data:{animation:[Object(dc.n)("hideShow",[Object(dc.m)(":enter",[Object(dc.l)({height:"0px"}),Object(dc.e)("200ms",Object(dc.l)({height:"30px"}))]),Object(dc.m)(":leave",[Object(dc.l)({height:"30px"}),Object(dc.e)("200ms",Object(dc.l)({height:"0px"}))])])]}}),t})();function Fl(t,e){1&t&&(n.Ub(0),n.Wb(1,"div",2),n.Rb(2,"mat-spinner"),n.Vb(),n.Tb())}function Ll(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",17),n.dc("click",(function(){n.Dc(t);const e=n.hc(3);return e.toggleContact(e.contact)})),n.Wb(1,"span"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Rb(4,"br"),n.Wb(5,"small",18),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Vb()}if(2&t){const t=n.hc(3);n.Db(2),n.Rc(n.jc(3,3,"lang.selectDuplicatedContact")),n.Db(4),n.Tc("",t.contact.resourcesCount," ",n.jc(7,5,"lang.associatedElements"),"")}}function Ql(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",19),n.dc("click",(function(){n.Dc(t);const e=n.hc(3);return e.toggleContact(e.contact)})),n.Rb(1,"i",20),n.Qc(2),n.ic(3,"translate"),n.Vb()}2&t&&(n.Db(2),n.Sc(" ",n.jc(3,1,"lang.selectedContact"),""))}function Nl(t,e){if(1&t&&(n.Wb(0,"div",14),n.Oc(1,Ll,8,7,"button",15),n.Oc(2,Ql,4,3,"button",16),n.Vb()),2&t){const t=n.hc(2);n.Ib("selected",t.contact.selected),n.Db(1),n.oc("ngIf",!t.contact.selected),n.Db(1),n.oc("ngIf",t.contact.selected)}}function zl(t,e){1&t&&(n.Wb(0,"div",21),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.contactDisabled")))}function Bl(t,e){if(1&t&&(n.Wb(0,"sup",24),n.Qc(1),n.Vb()),2&t){const t=n.hc(3);n.Ib("newData",t.isNewValue("civility")),n.Db(1),n.Sc("",t.contact.civility.abbreviation,"\xa0")}}function Ul(t,e){if(1&t&&(n.Wb(0,"mat-card-title",22),n.Oc(1,Bl,2,3,"sup",23),n.Qc(2),n.Vb()),2&t){const t=n.hc(2);n.oc("title",t.contact.civility.label+" "+t.contact.firstname+" "+t.contact.lastname),n.Db(1),n.oc("ngIf",!t.functionsService.empty(t.contact.civility)),n.Db(1),n.Tc("",t.contact.firstname," ",t.contact.lastname," ")}}function $l(t,e){if(1&t&&(n.Wb(0,"mat-card-title",22),n.Qc(1),n.Vb()),2&t){const t=n.hc(2);n.Ib("newData",t.isNewValue("company")),n.oc("title",t.contact.company),n.Db(1),n.Sc(" ",t.contact.company,"")}}function Hl(t,e){if(1&t&&(n.Wb(0,"mat-card-subtitle",22),n.Qc(1),n.Vb()),2&t){const t=n.hc(2);n.Ib("newData",t.isNewValue("function")),n.oc("title",t.contact.function),n.Db(1),n.Sc(" ",t.contact.function,"\xa0 ")}}function Gl(t,e){if(1&t&&(n.Rb(0,"i",25),n.ic(1,"translate")),2&t){const t=n.hc(2);n.Lc("color",t.contact.fillingRate.color),n.oc("title",n.jc(1,3,"lang.contactsFillingRate"))}}function Xl(t,e){if(1&t&&(n.Wb(0,"mat-list-item",26),n.Rb(1,"mat-icon",27),n.ic(2,"translate"),n.Wb(3,"p",28),n.Qc(4),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("title",n.jc(2,4,"lang.contactsParameters_company")),n.Db(2),n.Ib("newData",t.isNewValue("company")),n.Db(1),n.Sc(" ",t.contact.company," ")}}function ql(t,e){if(1&t&&(n.Wb(0,"mat-list-item",26),n.Rb(1,"mat-icon",29),n.ic(2,"translate"),n.Wb(3,"p",28),n.Qc(4),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("title",n.jc(2,4,"lang.contactsParameters_department")),n.Db(2),n.Ib("newData",t.isNewValue("department")),n.Db(1),n.Sc(" ",t.contact.department," ")}}function Kl(t,e){if(1&t&&(n.Wb(0,"mat-list-item",26),n.Rb(1,"mat-icon",30),n.ic(2,"translate"),n.Wb(3,"a",31),n.Qc(4),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("title",n.jc(2,5,"lang.email")),n.Db(2),n.Ib("newData",t.isNewValue("email")),n.qc("href","mailto:",t.contact.email,"",n.Gc),n.Db(1),n.Sc(" ",t.contact.email," ")}}function Yl(t,e){if(1&t&&(n.Wb(0,"mat-list-item",26),n.Rb(1,"mat-icon",32),n.ic(2,"translate"),n.Wb(3,"p",28),n.Qc(4),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("title",n.jc(2,4,"lang.phoneNumber")),n.Db(2),n.Ib("newData",t.isNewValue("phone")),n.Db(1),n.Sc(" ",t.contact.phone," ")}}function Jl(t,e){if(1&t&&(n.Wb(0,"p",28),n.Qc(1),n.Vb()),2&t){const t=n.hc(3);n.Ib("newData",t.isNewValue("addressAdditional1")),n.Db(1),n.Sc(" ",t.contact.addressAdditional1,"")}}function Zl(t,e){if(1&t&&(n.Wb(0,"p",28),n.Wb(1,"span"),n.Qc(2),n.Vb(),n.Qc(3,"\xa0"),n.Wb(4,"span"),n.Qc(5),n.Vb(),n.Vb()),2&t){const t=n.hc(3);n.Db(1),n.Ib("newData",t.isNewValue("addressNumber")),n.Db(1),n.Rc(t.contact.addressNumber),n.Db(2),n.Ib("newData",t.isNewValue("addressStreet")),n.Db(1),n.Rc(t.contact.addressStreet)}}function td(t,e){if(1&t&&(n.Wb(0,"p",28),n.Qc(1),n.Vb()),2&t){const t=n.hc(3);n.Ib("newData",t.isNewValue("addressAdditional2")),n.Db(1),n.Sc("",t.contact.addressAdditional2," ")}}function ed(t,e){if(1&t&&(n.Wb(0,"p",28),n.Qc(1),n.Vb()),2&t){const t=n.hc(3);n.Db(1),n.Tc(" ",t.contact.addressPostcode," ",t.contact.addressTown," ")}}function id(t,e){if(1&t&&(n.Wb(0,"p",28),n.Qc(1),n.Vb()),2&t){const t=n.hc(3);n.Ib("newData",t.isNewValue("addressCountry")),n.Db(1),n.Sc(" ",t.contact.addressCountry," ")}}function nd(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item",33),n.dc("click",(function(){n.Dc(t);const e=n.hc(2);return e.goTo(e.contact)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",34),n.Oc(3,Jl,2,3,"p",35),n.Oc(4,Zl,6,6,"p",36),n.Oc(5,td,2,3,"p",35),n.Oc(6,ed,2,2,"p",36),n.Oc(7,id,2,3,"p",35),n.Vb()}if(2&t){const t=n.hc(2);n.oc("title",n.jc(1,6,"lang.address")),n.Db(3),n.oc("ngIf",!t.functionsService.empty(t.contact.addressAdditional1)),n.Db(1),n.oc("ngIf",!t.functionsService.empty(t.contact.addressNumber)||!t.functionsService.empty(t.contact.addressStreet)),n.Db(1),n.oc("ngIf",!t.functionsService.empty(t.contact.addressAdditional2)),n.Db(1),n.oc("ngIf",!t.functionsService.empty(t.contact.addressPostcode)||!t.functionsService.empty(t.contact.addressTown)),n.Db(1),n.oc("ngIf",!t.functionsService.empty(t.contact.addressCountry))}}function ad(t,e){if(1&t&&(n.Wb(0,"mat-list-item",40),n.ic(1,"translate"),n.Rb(2,"mat-icon",41),n.Wb(3,"p",42),n.Qc(4),n.Vb(),n.Vb()),2&t){const t=n.hc(3);n.oc("title",n.jc(1,5,"lang.note")),n.Db(3),n.Ib("newData",t.isNewValue("notes")),n.oc("title",t.contact.notes),n.Db(1),n.Sc(" ",t.contact.notes," ")}}function sd(t,e){if(1&t&&(n.Wb(0,"mat-list-item",40),n.ic(1,"translate"),n.Rb(2,"mat-icon",43),n.Wb(3,"p",42),n.Qc(4),n.Vb(),n.Vb()),2&t){const t=n.hc(3);n.oc("title",n.jc(1,5,"lang.communicationMean")),n.Db(3),n.Ib("newData",t.isNewValue("communicationMeans")),n.oc("title",t.contact.communicationMeans),n.Db(1),n.Sc(" ",t.contact.communicationMeans," ")}}function od(t,e){if(1&t&&(n.Wb(0,"mat-list-item",40),n.ic(1,"translate"),n.Rb(2,"mat-icon",43),n.Wb(3,"p",42),n.Qc(4),n.Vb(),n.Vb()),2&t){const t=n.hc(3);n.oc("title",n.jc(1,3,"lang.IdMaarch2Maarch")),n.Db(3),n.oc("title",t.contact.externalId.m2m),n.Db(1),n.Sc(" ",t.contact.externalId.m2m," ")}}function rd(t,e){if(1&t&&(n.Wb(0,"mat-list-item",26),n.Rb(1,"mat-icon",44),n.Wb(2,"p",42),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc(3);n.Db(1),n.oc("title",t.value.label),n.Db(1),n.Ib("newData",e.isNewValue(t)),n.oc("title",t.value.value),n.Db(1),n.Sc(" ",t.value.value," ")}}function cd(t,e){if(1&t&&(n.Ub(0),n.Oc(1,rd,4,5,"mat-list-item",11),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",null!==t.value.value)}}function ld(t,e){if(1&t&&(n.Wb(0,"mat-expansion-panel",37),n.Wb(1,"mat-expansion-panel-header"),n.Wb(2,"mat-panel-title"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb(),n.Wb(5,"mat-list"),n.Oc(6,ad,5,7,"mat-list-item",38),n.Oc(7,sd,5,7,"mat-list-item",38),n.Oc(8,od,5,5,"mat-list-item",38),n.Oc(9,cd,2,1,"ng-container",39),n.ic(10,"keyvalue"),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.oc("expanded",t.selectable),n.Db(3),n.Sc(" ",n.jc(4,6,"lang.othersInfos")," "),n.Db(3),n.oc("ngIf",!t.functionsService.empty(t.contact.notes)),n.Db(1),n.oc("ngIf",!t.functionsService.empty(t.contact.communicationMeans)),n.Db(1),n.oc("ngIf",!t.functionsService.empty(t.contact.externalId)&&!t.functionsService.empty(t.contact.externalId.m2m)),n.Db(1),n.oc("ngForOf",n.jc(10,8,t.contact.customFields))}}function dd(t,e){if(1&t&&(n.Wb(0,"mat-card",3),n.Oc(1,Nl,3,4,"div",4),n.Oc(2,zl,3,3,"div",5),n.Wb(3,"mat-card-header"),n.Rb(4,"div",6),n.ic(5,"translate"),n.Oc(6,Ul,3,4,"mat-card-title",7),n.Oc(7,$l,2,4,"mat-card-title",8),n.Oc(8,Hl,2,4,"mat-card-subtitle",8),n.Oc(9,Gl,2,5,"i",9),n.Vb(),n.Wb(10,"mat-card-content"),n.Wb(11,"mat-list"),n.Wb(12,"h3",10),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Oc(15,Xl,5,6,"mat-list-item",11),n.Oc(16,ql,5,6,"mat-list-item",11),n.Oc(17,Kl,5,7,"mat-list-item",11),n.Oc(18,Yl,5,6,"mat-list-item",11),n.Oc(19,nd,8,8,"mat-list-item",12),n.Vb(),n.Oc(20,ld,11,10,"mat-expansion-panel",13),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.selectable),n.Db(1),n.oc("ngIf",!t.contact.enabled),n.Db(2),n.Ib("fa-address-card","contact"===t.contact.type)("fa-users","contactGroup"===t.contact.type)("fa-sitemap","entity"===t.contact.type)("fa-user","user"===t.contact.type),n.oc("title",n.jc(5,22,"lang.contact_"+t.contact.type)),n.Db(2),n.oc("ngIf",!t.functionsService.empty(t.contact.firstname)||!t.functionsService.empty(t.contact.lastname)),n.Db(1),n.oc("ngIf",t.functionsService.empty(t.contact.firstname)&&t.functionsService.empty(t.contact.lastname)),n.Db(1),n.oc("ngIf",!t.functionsService.empty(t.contact.function)),n.Db(1),n.oc("ngIf","contact"===t.contact.type&&!t.functionsService.empty(t.contact.fillingRate.color)),n.Db(4),n.Rc(n.jc(14,24,"lang.contactDetails")),n.Db(2),n.oc("ngIf",!(t.functionsService.empty(t.contact.firstname)&&t.functionsService.empty(t.contact.lastname)||t.functionsService.empty(t.contact.company))),n.Db(1),n.oc("ngIf",!t.functionsService.empty(t.contact.department)),n.Db(1),n.oc("ngIf",!t.functionsService.empty(t.contact.email)),n.Db(1),n.oc("ngIf",!t.functionsService.empty(t.contact.phone)),n.Db(1),n.oc("ngIf",!(t.functionsService.empty(t.contact.addressNumber)&&t.functionsService.empty(t.contact.addressStreet)&&t.functionsService.empty(t.contact.addressAdditional2)&&t.functionsService.empty(t.contact.addressPostcode)&&t.functionsService.empty(t.contact.addressTown)&&t.functionsService.empty(t.contact.addressCountry))),n.Db(1),n.oc("ngIf",!t.emptyOtherInfo(t.contact))}}let hd=(()=>{class t{constructor(t,e,i,a,s){this.translate=t,this.http=e,this.notify=i,this.contactService=a,this.functionsService=s,this.contact={},this.selectable=!1,this.afterSelectedEvent=new n.o,this.afterDeselectedEvent=new n.o,this.loading=!0,this.contactClone={},this.customFields=[]}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){yield this.getCustomFields(),2===Object.keys(this.contact).length?this.loadContact(this.contact.id,this.contact.type):Object.keys(this.contact).length>2&&(this.contactClone=JSON.parse(JSON.stringify(this.contact)),this.loading=!1)}))}getCustomFields(){return new Promise((t,e)=>{this.http.get("../rest/contactsCustomFields").pipe(Object(mt.a)(e=>{this.customFields=e.customFields.map(t=>({id:t.id,label:t.label})),t(!0)})).subscribe()})}loadContact(t,e){"contact"===e?this.http.get("../rest/contacts/"+t+(this.selectable?"?resourcesCount=true":"")).pipe(Object(mt.a)(t=>{this.contact=Object.assign(Object.assign({},t),{civility:this.contactService.formatCivilityObject(t.civility),fillingRate:this.contactService.formatFillingObject(t.fillingRate),customFields:this.functionsService.empty(t.customFields)?[]:this.formatCustomField(t.customFields),type:"contact"}),this.contactClone=JSON.parse(JSON.stringify(this.contact))}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe():"user"===e?this.http.get("../rest/users/"+t).pipe(Object(mt.a)(t=>{this.contact={type:"user",civility:this.contactService.formatCivilityObject(null),fillingRate:this.contactService.formatFillingObject(null),customFields:[],firstname:t.firstname,lastname:t.lastname,email:t.mail,department:t.department,phone:t.phone,enabled:t.enabled},this.contactClone=JSON.parse(JSON.stringify(this.contact))}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe():"entity"===e&&this.http.get("../rest/entities/"+t).pipe(Object(mt.a)(t=>{this.contact={type:"entity",civility:this.contactService.formatCivilityObject(null),fillingRate:this.contactService.formatFillingObject(null),customFields:[],lastname:t.short_label,email:t.email,addressStreet:t.address,addressPostcode:t.addressPostcode,addressCountry:t.addressCountry,enabled:"Y"===t.enabled},this.contactClone=JSON.parse(JSON.stringify(this.contact))}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.error(t.error.errors),Object(c.a)(!1)))).subscribe()}formatCustomField(t){let e=[];return Object.keys(t).forEach(i=>{e.push({label:this.customFields.filter(t=>t.id==i).length>0?this.customFields.filter(t=>t.id==i)[0].label:i,value:t[i]})}),e}goTo(t){window.open(`https://www.google.com/maps/search/${t.addressNumber}+${t.addressStreet},+${t.addressPostcode}+${t.addressTown},+${t.addressCountry}`,"_blank")}emptyOtherInfo(t){return!!("contact"!==t.type||this.functionsService.empty(t.notes)&&this.functionsService.empty(t.communicationMeans)&&this.functionsService.empty(t.customFields))}toggleContact(t){t.selected=!t.selected,t.selected?this.afterSelectedEvent.emit(t):this.afterDeselectedEvent.emit(t)}getContactInfo(){return this.contact}resetContact(){this.contact=JSON.parse(JSON.stringify(this.contactClone))}setContactInfo(t,e){this.functionsService.empty(e)||("customFields"===t?this.contact[t].push(e):this.contact[t]=e)}isNewValue(t){return"object"==typeof t&&"civility"!==t?0===this.contactClone.customFields.filter(e=>e.label===t.value.label).length:"civility"===t?JSON.stringify(this.contact[t])!==JSON.stringify(this.contactClone[t]):this.contact[t]!==this.contactClone[t]}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(lc),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-contact-detail"]],inputs:{contact:"contact",selectable:"selectable"},outputs:{afterSelectedEvent:"afterSelectedEvent",afterDeselectedEvent:"afterDeselectedEvent"},features:[n.Cb([lc])],decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["elseTemplate",""],[1,"loading"],[1,"contact-card"],["class","selectable",3,"selected",4,"ngIf"],["class","disabledContact",4,"ngIf"],["mat-card-avatar","",1,"contact-header-image","fa",3,"title"],[3,"title",4,"ngIf"],[3,"newData","title",4,"ngIf"],["class","contact-filling fa fa-circle",3,"color","title",4,"ngIf"],["mat-subheader",""],["class","contact-item",4,"ngIf"],["class","contact-address",3,"title","click",4,"ngIf"],[3,"expanded",4,"ngIf"],[1,"selectable"],["style","line-height: 15px;padding: 5px;","mat-raised-button","","color","primary",3,"click",4,"ngIf"],["style","line-height: 15px;padding: 10px;","mat-raised-button","","color","primary",3,"click",4,"ngIf"],["mat-raised-button","","color","primary",2,"line-height","15px","padding","5px",3,"click"],[2,"font-size","80%"],["mat-raised-button","","color","primary",2,"line-height","15px","padding","10px",3,"click"],[1,"far","fa-check-circle"],[1,"disabledContact"],[3,"title"],["style","color: #666;",3,"newData",4,"ngIf"],[2,"color","#666"],[1,"contact-filling","fa","fa-circle",3,"title"],[1,"contact-item"],["mat-list-icon","",1,"contact-group","far","fa-building",3,"title"],["mat-line","",1,"contact-content"],["mat-list-icon","",1,"contact-group","fa","fa-sitemap",3,"title"],["mat-list-icon","",1,"contact-group","far","fa-envelope",3,"title"],["matLine","",1,"contact-content",3,"href"],["mat-list-icon","",1,"contact-group","fas","fa-phone",3,"title"],[1,"contact-address",3,"title","click"],["mat-list-icon","",1,"contact-group","fas","fa-map-marker-alt"],["mat-line","","class","contact-content",3,"newData",4,"ngIf"],["mat-line","","class","contact-content",4,"ngIf"],[3,"expanded"],["class","contact-item",3,"title",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"contact-item",3,"title"],["mat-list-icon","",1,"contact-group","far","fa-sticky-note"],["mat-line","",1,"contact-content",3,"title"],["mat-list-icon","",1,"contact-group","fas","fa-hashtag"],["mat-list-icon","",1,"contact-group","fas","fa-hashtag",3,"title"]],template:function(t,e){if(1&t&&(n.Oc(0,Fl,3,0,"ng-container",0),n.Oc(1,dd,21,26,"ng-template",null,1,n.Pc)),2&t){const t=n.zc(2);n.oc("ngIf",e.loading)("ngIfElse",t)}},directives:[P.t,V.c,K.a,K.f,K.c,K.d,R.a,R.g,k.b,K.m,K.l,R.d,S.a,R.c,W.l,gt.c,gt.g,gt.h,P.s],pipes:[g.d,P.l],styles:[".contact-list-container[_ngcontent-%COMP%]{padding:10px;display:grid;grid-template-columns:repeat(3,1fr);grid-gap:10px}.contact-list-container-1[_ngcontent-%COMP%]{grid-template-columns:1fr}.contact-list-container-2[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}.contact-card[_ngcontent-%COMP%]{padding:0;box-shadow:none;border:1px solid rgba(0,0,0,.12);height:100%}.contact-card[_ngcontent-%COMP%] .mat-expansion-panel-body{padding-left:0;padding-right:0}.mat-card-header[_ngcontent-%COMP%]{background:#f9f9f9;padding:10px 10px 5px}.mat-card-title[_ngcontent-%COMP%]{padding-right:15px}.contact-item[_ngcontent-%COMP%]{height:35px!important}.contact-header-image[_ngcontent-%COMP%]{background:#135f7f;display:flex;align-items:center;justify-content:center;font-size:18px;color:#fff}.contact-header-image[_ngcontent-%COMP%] .mat-checkbox-layout{margin:0}.contact-header-image[_ngcontent-%COMP%] [_ngcontent-%COMP%]:not( .mat-checkbox-checked) .mat-checkbox-frame{border-color:#e6dfdf!important}.contact-group[_ngcontent-%COMP%]{color:#135f7f;font-size:16px!important;display:flex;align-items:center;justify-content:center}.contact-content[_ngcontent-%COMP%]{font-size:13px!important}.contact-address[_ngcontent-%COMP%]{cursor:pointer;color:#337ab7}.contact-address[_ngcontent-%COMP%]:hover .contact-content[_ngcontent-%COMP%]{text-decoration:underline}.mat-expansion-panel[_ngcontent-%COMP%]{box-shadow:none!important}.mat-expansion-panel-header-title[_ngcontent-%COMP%]{font-size:14px;color:#666}.contact-filling[_ngcontent-%COMP%]{position:absolute;right:20px}.loading[_ngcontent-%COMP%]{display:flex;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:1;overflow:hidden;justify-content:center;align-items:center}.newData[_ngcontent-%COMP%]{color:#f99830!important}.selectable[_ngcontent-%COMP%]{z-index:1;background:rgba(0,0,0,.2);position:absolute;align-items:center;justify-content:center;display:flex;width:100%;height:100%;opacity:0;flex-direction:column;transition:opacity .2s}.contact-card[_ngcontent-%COMP%]:hover .selectable[_ngcontent-%COMP%]{opacity:1;transition:opacity .2s}.selected[_ngcontent-%COMP%]{opacity:1!important}.disabledContact[_ngcontent-%COMP%]{font-size:20px;color:red;text-align:center;opacity:.2;position:absolute;top:50%;left:50%;transform:translateX(-50%) translateY(-50%) rotate(-30deg);white-space:pre;font-weight:700}"]}),t})();const ud=["drawer"];function pd(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-contact-form",13),n.dc("onSubmitEvent",(function(e){return n.Dc(t),n.hc().dialogRef.close(e)})),n.Vb()}if(2&t){const t=n.hc();n.oc("creationMode",t.creationMode)("contactId",t.data.contactId)}}function bd(t,e){if(1&t&&n.Rb(0,"app-contact-detail",14),2&t){const t=n.hc();n.oc("contact",t.contact)}}function fd(t,e){if(1&t&&n.Rb(0,"app-document-viewer",15,16),2&t){const t=n.hc();n.oc("editMode",!1)("base64",t.headerService.getLastLoadedFile())}}function md(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",17),n.Wb(1,"button",18),n.dc("click",(function(){return n.Dc(t),n.hc().switchMode()})),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(2),n.Rc(n.jc(3,1,"lang.update")))}let gd=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.privilegeService=i,this.data=n,this.dialogRef=a,this.headerService=s,this.renderer=o,this.creationMode=!0,this.canUpdate=!1,this.contact=null,this.mode="read",this.loadedDocument=!1}ngOnInit(){null!==this.data.contactId?(this.contact={id:this.data.contactId,type:this.data.contactType},this.creationMode=!1):(this.creationMode=!0,this.mode="update","update"===this.mode&&($(".maarch-modal").css({height:"99vh"}),$(".maarch-modal").css({width:"99vw"})),null!==this.headerService.getLastLoadedFile()&&(this.drawer.toggle(),setTimeout(()=>{this.loadedDocument=!0},200))),this.canUpdate=this.privilegeService.hasCurrentUserPrivilege("update_contacts")}switchMode(){this.mode="read"===this.mode?"update":"read","update"===this.mode&&($(".maarch-modal").css({height:"99vh"}),$(".maarch-modal").css({width:"99vw"})),null!==this.headerService.getLastLoadedFile()&&(this.drawer.toggle(),setTimeout(()=>{this.loadedDocument=!0},200))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(Dt.a),n.Qb(q.a),n.Qb(q.h),n.Qb(y.a),n.Qb(n.I))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(ud,!0),2&t&&n.yc(i=n.ec())&&(e.drawer=i.first)},decls:19,vars:12,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],[2,"flex","1"],["mat-icon-button","",3,"title","click"],[1,"fa","fa-times"],[1,"modal-container"],[3,"creationMode","contactId","onSubmitEvent",4,"ngIf"],[3,"contact",4,"ngIf"],["position","end","mode","side","autoFocus","false",2,"overflow-x","hidden","width","50%"],["drawer",""],["style","height:100%;width:100%;position: relative;",3,"editMode","base64",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","","class","actions",4,"ngIf"],[3,"creationMode","contactId","onSubmitEvent"],[3,"contact"],[2,"height","100%","width","100%","position","relative",3,"editMode","base64"],["appDocumentViewer",""],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","color","primary",3,"click"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Wb(2,"span",2),n.Qc(3),n.ic(4,"translate"),n.ic(5,"translate"),n.Vb(),n.Wb(6,"button",3),n.dc("click",(function(){return e.dialogRef.close()})),n.ic(7,"translate"),n.Rb(8,"mat-icon",4),n.Vb(),n.Vb(),n.Wb(9,"mat-dialog-content",5),n.Wb(10,"mat-sidenav-container"),n.Wb(11,"mat-sidenav-content"),n.Oc(12,pd,1,2,"app-contact-form",6),n.Oc(13,bd,1,1,"app-contact-detail",7),n.Vb(),n.Wb(14,"mat-sidenav",8,9),n.Oc(16,fd,2,2,"app-document-viewer",10),n.Vb(),n.Vb(),n.Vb(),n.Rb(17,"span",11),n.Oc(18,md,4,3,"div",12),n.Vb()),2&t&&(n.Db(3),n.Sc(" ",e.creationMode?n.jc(4,6,"lang.contactCreation"):n.jc(5,8,"lang.contact")," "),n.Db(3),n.oc("title",n.jc(7,10,"lang.close")),n.Db(6),n.oc("ngIf","update"===e.mode),n.Db(1),n.oc("ngIf","read"===e.mode),n.Db(3),n.oc("ngIf",e.loadedDocument),n.Db(2),n.oc("ngIf",e.canUpdate&&"read"===e.mode&&"contact"===e.contact.type))},directives:[q.i,k.b,S.a,q.f,I.e,I.f,P.t,I.d,El,hd,Jr,q.c],pipes:[g.d],styles:[".admin-contact[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;width:90vw}.mat-sidenav-container[_ngcontent-%COMP%]{height:100%}"]}),t})();const vd=["autoCompleteInput"];function _d(t,e){if(1&t&&(n.Wb(0,"sup",25),n.Qc(1),n.Vb()),2&t){const t=n.hc(2).$implicit;n.Db(1),n.Sc("",t.civility.abbreviation,"\xa0")}}function yd(t,e){if(1&t&&(n.Wb(0,"mat-card-title",23),n.Oc(1,_d,2,1,"sup",24),n.Qc(2),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc(3);n.oc("title",t.civility.label+" "+t.firstname+" "+t.lastname),n.Db(1),n.oc("ngIf",!e.empty(t.civility.abbreviation)),n.Db(1),n.Tc("",t.firstname," ",t.lastname,"")}}function xd(t,e){if(1&t&&(n.Wb(0,"mat-card-title",23),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.oc("title",t.company),n.Db(1),n.Rc(t.company)}}function Cd(t,e){if(1&t&&(n.Wb(0,"mat-card-subtitle",23),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.oc("title",t.function),n.Db(1),n.Sc(" ",t.function,"\xa0 ")}}function Od(t,e){if(1&t&&(n.Rb(0,"i",26),n.ic(1,"translate")),2&t){const t=n.hc().$implicit;n.Lc("color",t.fillingRate.color),n.oc("title",n.jc(1,3,"lang.contactsFillingRate")+" : "+t.fillingRate.rate+"%")}}function Dd(t,e){if(1&t&&(n.Wb(0,"mat-list-item",27),n.Rb(1,"mat-icon",28),n.ic(2,"translate"),n.Wb(3,"p",29),n.Qc(4),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("title",n.jc(2,3,"lang.contactsParameters_company")),n.Db(2),n.oc("title",t.company),n.Db(1),n.Sc(" ",t.company," ")}}function wd(t,e){if(1&t&&(n.Wb(0,"p",29),n.Qc(1),n.Vb()),2&t){const t=n.hc(2).$implicit;n.oc("title",t.addressAdditional1),n.Db(1),n.Sc(" (",t.addressAdditional1,") ")}}function Md(t,e){if(1&t&&(n.Wb(0,"mat-list-item",27),n.Rb(1,"mat-icon",30),n.ic(2,"translate"),n.Wb(3,"p",29),n.Qc(4),n.Vb(),n.Oc(5,wd,2,2,"p",31),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc(3);n.Db(1),n.oc("title",n.jc(2,4,"lang.contactsParameters_department")),n.Db(2),n.oc("title",t.department),n.Db(1),n.Sc(" ",t.department," "),n.Db(1),n.oc("ngIf",!e.empty(t.addressAdditional1))}}function kd(t,e){if(1&t&&(n.Wb(0,"mat-list-item",27),n.Rb(1,"mat-icon",32),n.ic(2,"translate"),n.Wb(3,"p",29),n.Qc(4),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("title",n.jc(2,3,"lang.email")),n.Db(2),n.oc("title",t.email),n.Db(1),n.Sc(" ",t.email," ")}}function Sd(t,e){if(1&t&&(n.Wb(0,"mat-list-item",27),n.Rb(1,"mat-icon",33),n.ic(2,"translate"),n.Wb(3,"p",29),n.Qc(4),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("title",n.jc(2,3,"lang.phoneNumber")),n.Db(2),n.oc("title",t.phone),n.Db(1),n.Sc(" ",t.phone," ")}}function Id(t,e){if(1&t&&(n.Wb(0,"p",29),n.Qc(1),n.Vb()),2&t){const t=n.hc(2).$implicit;n.oc("title",t.addressStreet),n.Db(1),n.Tc(" ",t.addressNumber," ",t.addressStreet," ")}}function Pd(t,e){if(1&t&&(n.Wb(0,"p",29),n.Qc(1),n.Vb()),2&t){const t=n.hc(2).$implicit;n.oc("title",t.addressAdditional2),n.Db(1),n.Sc(" (",t.addressAdditional2,") ")}}function Vd(t,e){if(1&t&&(n.Wb(0,"p",29),n.Qc(1),n.Vb()),2&t){const t=n.hc(2).$implicit;n.oc("title",t.addressPostcode+" "+t.addressTown),n.Db(1),n.Tc(" ",t.addressPostcode," ",t.addressTown," ")}}function Rd(t,e){if(1&t&&(n.Wb(0,"p",29),n.Qc(1),n.Vb()),2&t){const t=n.hc(2).$implicit;n.oc("title",t.addressCountry),n.Db(1),n.Sc(" ",t.addressCountry," ")}}function jd(t,e){if(1&t&&(n.Wb(0,"mat-list-item",34),n.ic(1,"translate"),n.Rb(2,"mat-icon",35),n.Oc(3,Id,2,3,"p",31),n.Oc(4,Pd,2,2,"p",31),n.Oc(5,Vd,2,3,"p",31),n.Oc(6,Rd,2,2,"p",31),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc(3);n.oc("title",n.jc(1,5,"lang.address")),n.Db(3),n.oc("ngIf",!e.empty(t.addressNumber)||!e.empty(t.addressStreet)),n.Db(1),n.oc("ngIf",!e.empty(t.addressAdditional2)),n.Db(1),n.oc("ngIf",!e.empty(t.addressPostcode)||!e.empty(t.addressTown)),n.Db(1),n.oc("ngIf",!e.empty(t.addressCountry))}}function Ad(t,e){if(1&t&&(n.Wb(0,"mat-list-item",27),n.Rb(1,"mat-icon",36),n.ic(2,"translate"),n.Wb(3,"p",29),n.Qc(4),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("title",n.jc(2,3,"lang.note")),n.Db(2),n.oc("title",t.notes),n.Db(1),n.Sc(" ",t.notes," ")}}function Wd(t,e){if(1&t&&(n.Wb(0,"mat-list-item",27),n.Rb(1,"mat-icon",37),n.Wb(2,"p",29),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("title",t.label),n.Db(1),n.oc("title",t.value),n.Db(1),n.Sc(" ",t.value," ")}}function Td(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Wd,4,3,"mat-list-item",20),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",null!==t.value)}}function Ed(t,e){if(1&t&&(n.Wb(0,"mat-option",15),n.Wb(1,"mat-card"),n.Wb(2,"mat-card-header",16),n.Rb(3,"div",17),n.ic(4,"translate"),n.Oc(5,yd,3,4,"mat-card-title",18),n.Oc(6,xd,2,2,"mat-card-title",18),n.Oc(7,Cd,2,2,"mat-card-subtitle",18),n.Oc(8,Od,2,5,"i",19),n.Vb(),n.Wb(9,"mat-card-content"),n.Wb(10,"mat-list"),n.Oc(11,Dd,5,5,"mat-list-item",20),n.Oc(12,Md,6,6,"mat-list-item",20),n.Oc(13,kd,5,5,"mat-list-item",20),n.Oc(14,Sd,5,5,"mat-list-item",20),n.Oc(15,jd,7,7,"mat-list-item",21),n.Oc(16,Ad,5,5,"mat-list-item",20),n.Oc(17,Td,2,1,"ng-container",22),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t){const t=e.$implicit,i=n.hc(3);n.oc("id",i.id+"-"+t.id)("value",t),n.Db(3),n.Ib("fa-address-card","contact"===t.type)("fa-users","contactGroup"===t.type)("fa-sitemap","entity"===t.type)("fa-user","user"===t.type),n.oc("title",n.jc(4,22,"lang.contact_"+t.type)),n.Db(2),n.oc("ngIf",!i.empty(t.firstname)||!i.empty(t.lastname)),n.Db(1),n.oc("ngIf",i.empty(t.firstname)&&i.empty(t.lastname)),n.Db(1),n.oc("ngIf",!i.empty(t.function)),n.Db(1),n.oc("ngIf","contact"===t.type&&!i.empty(t.fillingRate.rate)),n.Db(3),n.oc("ngIf",!(i.empty(t.firstname)&&i.empty(t.lastname)||i.empty(t.company))),n.Db(1),n.oc("ngIf",!i.empty(t.department)),n.Db(1),n.oc("ngIf",!i.empty(t.email)),n.Db(1),n.oc("ngIf",!i.empty(t.phone)),n.Db(1),n.oc("ngIf",!(i.empty(t.addressNumber)&&i.empty(t.addressStreet)&&i.empty(t.addressAdditional2)&&i.empty(t.addressPostcode)&&i.empty(t.addressTown)&&i.empty(t.addressCountry))),n.Db(1),n.oc("ngIf",!i.empty(t.notes)),n.Db(1),n.oc("ngForOf",t.customFields)}}function Fd(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Ed,18,24,"mat-option",14),n.ic(2,"async"),n.Tb()),2&t){const t=n.hc(2);n.Db(1),n.oc("ngForOf",n.jc(2,1,t.filteredOptions))}}function Ld(t,e){if(1&t&&n.Rb(0,"mat-option",38),2&t){const t=n.hc(2);n.oc("innerHTML",t.listInfo,n.Ec)}}function Qd(t,e){1&t&&(n.Wb(0,"mat-option",39),n.Rb(1,"mat-spinner",40),n.Vb())}function Nd(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",41),n.Wb(1,"a",42),n.dc("click",(function(e){n.Dc(t);const i=n.hc(2);return e.stopPropagation(),i.openContact()})),n.Rb(2,"mat-icon",43),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(3),n.Sc(" ",n.jc(4,1,"lang.createContact")," "))}function zd(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field",4),n.Rb(1,"mat-icon",5),n.Wb(2,"input",6,7),n.dc("click",(function(e){n.Dc(t);const i=n.hc();return e.stopPropagation(),i.noResultFound=null})),n.ic(4,"translate"),n.Vb(),n.Wb(5,"mat-autocomplete",8,9),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc().selectOpt(e)})),n.Oc(7,Fd,3,3,"ng-container",10),n.Oc(8,Ld,1,1,"mat-option",11),n.Oc(9,Qd,2,0,"mat-option",12),n.Oc(10,Nd,5,3,"div",13),n.Vb(),n.Vb()}if(2&t){const t=n.zc(6),e=n.hc();n.Db(2),n.oc("id",e.id)("placeholder",n.jc(4,8,"lang.searchContact"))("formControl",e.myControl)("matAutocomplete",t),n.Db(5),n.oc("ngIf",e.options.length>0&&!e.loading),n.Db(1),n.oc("ngIf",0===e.options.length&&!e.loading),n.Db(1),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",e.canAdd&&(null!==e.noResultFound||e.options.length>0)&&!e.loading)}}function Bd(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",44),n.Wb(1,"button",45),n.dc("click",(function(){return n.Dc(t),n.hc().resetAll()})),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(2),n.Rc(n.jc(3,1,"lang.deleteAll")))}function Ud(t,e){if(1&t&&(n.Ub(0),n.Qc(1),n.Tb()),2&t){const t=n.hc().$implicit,e=n.hc(4);n.Db(1),n.Sc(" ",e.valuesToDisplay[t.id].firstname," ")}}function $d(t,e){if(1&t&&(n.Ub(0),n.Qc(1),n.Tb()),2&t){const t=n.hc().$implicit,e=n.hc(4);n.Db(1),n.Sc(" (",e.valuesToDisplay[t.id].company,")")}}function Hd(t,e){if(1&t&&n.Rb(0,"i",56),2&t){const t=n.hc().$implicit,e=n.hc(4);n.Lc("color",e.valuesToDisplay[t.id].fillingRate.color)}}function Gd(t,e){1&t&&n.Rb(0,"mat-icon",57)}function Xd(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",51),n.dc("removed",(function(){n.Dc(t);const i=e.index;return n.hc(4).removeItem(i)}))("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(4).openContact(i)})),n.Wb(1,"span",52),n.Rb(2,"i",53),n.ic(3,"translate"),n.Oc(4,Ud,2,1,"ng-container",10),n.Qc(5),n.Oc(6,$d,2,1,"ng-container",10),n.Vb(),n.Oc(7,Hd,1,2,"i",54),n.Oc(8,Gd,1,0,"mat-icon",55),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(4);n.oc("removable",!i.controlAutocomplete.disabled),n.Db(2),n.Ib("fa-address-card","contact"===i.valuesToDisplay[t.id].type)("fa-sitemap","entity"===i.valuesToDisplay[t.id].type)("fa-user","user"===i.valuesToDisplay[t.id].type),n.oc("title",n.jc(3,13,"lang."+i.valuesToDisplay[t.id].type)),n.Db(2),n.oc("ngIf",!i.empty(i.valuesToDisplay[t.id].firstname)),n.Db(1),n.Sc(" ",i.valuesToDisplay[t.id].lastname," "),n.Db(1),n.oc("ngIf",!i.empty(i.valuesToDisplay[t.id].company)),n.Db(1),n.oc("ngIf",!i.functions.empty(i.valuesToDisplay[t.id].fillingRate.color)),n.Db(1),n.oc("ngIf",!i.controlAutocomplete.disabled)}}function qd(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Xd,9,15,"mat-chip",50),n.Tb()),2&t){const t=n.hc(3);n.Db(1),n.oc("ngForOf",t.controlAutocomplete.value)}}function Kd(t,e){if(1&t&&(n.Wb(0,"mat-chip-list",49),n.Oc(1,qd,2,1,"ng-container",10),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("ngIf",!t.loadingValues)}}function Yd(t,e){1&t&&(n.Wb(0,"div",58),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noSelectedContact")," "))}function Jd(t,e){if(1&t&&(n.Wb(0,"div",46),n.Oc(1,Kd,2,1,"mat-chip-list",47),n.Oc(2,Yd,3,3,"div",48),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.controlAutocomplete.value.length>0),n.Db(1),n.oc("ngIf",0===t.controlAutocomplete.value.length)}}let Zd=(()=>{class t{constructor(t,e,i,a,s,o,r,c,l,d){this.translate=t,this.http=e,this.notify=i,this.dialog=a,this.headerService=s,this.appService=o,this.latinisePipe=r,this.privilegeService=c,this.contactService=l,this.functions=d,this.loading=!1,this.loadingValues=!0,this.key="id",this.canAdd=!1,this.canUpdate=!1,this.noResultFound=null,this.myControl=new X.i,this.valuesToDisplay={},this.newIds=[],this.customFields=[],this.controlAutocomplete=new X.i,this.id="contact-autocomplete",this.exclusion="",this.singleMode=!1,this.inputMode=!1,this.retrieveDocumentEvent=new n.o,this.afterSelected=new n.o}ngOnInit(){this.controlAutocomplete.setValue(null===this.controlAutocomplete.value||""===this.controlAutocomplete.value?[]:this.controlAutocomplete.value),this.canAdd=this.privilegeService.hasCurrentUserPrivilege("create_contacts"),this.canUpdate=this.privilegeService.hasCurrentUserPrivilege("update_contacts"),this.getCustomFields(),this.initFormValue(),this.initAutocompleteRoute()}initAutocompleteRoute(){this.listInfo=this.translate.instant("lang.autocompleteInfo"),this.options=[],this.myControl.valueChanges.pipe(Object(mt.a)(()=>{this.noResultFound=null,this.options=[],this.listInfo=this.translate.instant("lang.autocompleteInfo")}),Object(pt.a)(300),Object(d.a)(t=>t.length>2),Object(mt.a)(()=>this.loading=!0),Object(ft.a)(t=>this.getDatas(t)),Object(l.a)(t=>(t=t.filter(t=>!this.singleMode||"entity"!==t.type&&"contactGroup"!==t.type&&this.singleMode)).map(t=>Object.assign(Object.assign({},t),{civility:this.contactService.formatCivilityObject(t.civility),fillingRate:this.contactService.formatFillingObject(t.fillingRate),customFields:void 0!==t.customFields?this.formatCustomField(t.customFields):[]}))),Object(mt.a)(t=>{0===t.length?(this.noResultFound=!0,this.listInfo=this.translate.instant("lang.noAvailableValue")):(this.noResultFound=!1,this.listInfo=""),this.options=t,this.filteredOptions=Object(c.a)(this.options),this.loading=!1})).subscribe()}getCustomFields(){this.http.get("../rest/contactsCustomFields").pipe(Object(mt.a)(t=>{this.customFields=t.customFields.map(t=>({id:t.id,label:t.label}))})).subscribe()}formatCustomField(t){const e=[];return Object.keys(t).forEach(i=>{e.push({label:this.customFields.filter(t=>t.id==i)[0].label,value:t[i]})}),e}getDatas(t){return this.http.get("../rest/autocomplete/correspondents"+this.exclusion,{params:{search:t}})}selectOpt(t){this.setFormValue(t.option.value),this.afterSelected.emit(t.option.value),this.myControl.setValue("")}initFormValue(){this.controlAutocomplete.value.forEach(t=>{this.valuesToDisplay[t.id]={type:"",firstname:"",lastname:this.translate.instant("lang.undefined"),company:"",fillingRate:{color:""}},"contact"===t.type?this.http.get("../rest/contacts/"+t.id).pipe(Object(mt.a)(t=>{this.valuesToDisplay[t.id]={type:"contact",firstname:t.firstname,lastname:t.lastname,company:t.company,fillingRate:this.functions.empty(t.fillingRate)?"":{color:this.contactService.getFillingColor(t.fillingRate.thresholdLevel)}}}),Object(Xt.a)(()=>this.loadingValues=!1),Object(m.a)(t=>(this.notify.error(t.error.errors),Object(c.a)(!1)))).subscribe():"user"===t.type?this.http.get("../rest/users/"+t.id).pipe(Object(mt.a)(t=>{this.valuesToDisplay[t.id]={type:"user",firstname:t.firstname,lastname:t.lastname,fillingRate:{color:""}}}),Object(Xt.a)(()=>this.loadingValues=!1),Object(m.a)(t=>(this.notify.error(t.error.errors),Object(c.a)(!1)))).subscribe():"entity"===t.type&&this.http.get("../rest/entities/"+t.id).pipe(Object(mt.a)(t=>{this.valuesToDisplay[t.id]={type:"entity",lastname:t.entity_label,fillingRate:{color:""}}}),Object(Xt.a)(()=>this.loadingValues=!1),Object(m.a)(t=>(this.notify.error(t.error.errors),Object(c.a)(!1)))).subscribe()})}setFormValue(t){"contactGroup"===t.type?this.http.get("../rest/contactsGroups/"+t.id).pipe(Object(l.a)(t=>t.contactsGroup.contacts.map(t=>({id:t.id,type:t.type,lastname:t.contact,fillingRate:this.functions.empty(t.thresholdLevel)?"":{color:this.contactService.getFillingColor(t.thresholdLevel)}}))),Object(mt.a)(t=>{t.forEach(t=>{this.setContact(t)})}),Object(Xt.a)(()=>this.loadingValues=!1),Object(m.a)(t=>(this.notify.error(t.error.errors),Object(c.a)(!1)))).subscribe():this.setContact(t)}setContact(t){if(-1===this.controlAutocomplete.value.map(t=>t.id).indexOf(t.id)){let e=[];null!==this.controlAutocomplete.value&&(e=this.controlAutocomplete.value),this.valuesToDisplay[t.id]=t,e.push({type:t.type,id:t.id,label:this.getFormatedContact(t.id)}),this.controlAutocomplete.setValue(e),this.loadingValues=!1}}resetAutocomplete(){this.options=[],this.listInfo=this.translate.instant("lang.autocompleteInfo"),this.myControl.setValue("")}_filter(t){if("string"==typeof t){const e=this.latinisePipe.transform(t.toLowerCase());return this.options.filter(t=>this.latinisePipe.transform(t[this.key].toLowerCase()).includes(e))}return this.options}unsetValue(){this.controlAutocomplete.setValue(""),this.myControl.setValue(""),this.myControl.enable()}removeItem(t){if(-1===this.newIds.indexOf(this.controlAutocomplete.value[t])){const e=this.controlAutocomplete.value;this.controlAutocomplete.value.splice(t,1),this.controlAutocomplete.setValue(e)}else this.http.delete("../rest/tags/"+this.controlAutocomplete.value[t]).pipe(Object(mt.a)(e=>{const i=this.controlAutocomplete.value;this.controlAutocomplete.value.splice(t,1),this.controlAutocomplete.setValue(i)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}openContact(t=null){this.retrieveDocumentEvent.emit(),this.dialog.open(gd,{maxWidth:"100vw",width:null===t?"99vw":"auto",panelClass:null===t?"maarch-full-height-modal":"maarch-modal",disableClose:!0,data:{editMode:this.canUpdate,contactId:null!==t?t.id:null,contactType:null!==t?t.type:null}}).afterClosed().pipe(Object(d.a)(t=>void 0!==t),Object(mt.a)(t=>{this.setFormValue({type:"contact",id:t}),this.initFormValue()}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}empty(t){return null===t||""===t||void 0===t}resetAll(){this.controlAutocomplete.setValue([]),this.valuesToDisplay={}}getFormatedContact(t){return this.contactService.formatContact(this.valuesToDisplay[t])}getInputValue(){return this.myControl.value}setInputValue(t){this.myControl.setValue(t)}resetInputValue(){this.myControl.setValue("")}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(y.a),n.Qb(w.a),n.Qb(Tt.c),n.Qb(Dt.a),n.Qb(lc),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-contact-autocomplete"]],viewQuery:function(t,e){var i;1&t&&n.Kc(vd,!0),2&t&&n.yc(i=n.ec())&&(e.autoCompleteInput=i.first)},inputs:{controlAutocomplete:["control","controlAutocomplete"],id:"id",exclusion:"exclusion",singleMode:"singleMode",inputMode:"inputMode"},outputs:{retrieveDocumentEvent:"retrieveDocumentEvent",afterSelected:"afterSelected"},features:[n.Cb([Wt.a,lc])],decls:5,vars:4,consts:[["type","hidden",3,"formControl"],["floatLabel","never","class","input-form",4,"ngIf"],["style","text-align: right;",4,"ngIf"],["class","itemList",4,"ngIf"],["floatLabel","never",1,"input-form"],["color","primary","matPrefix","",1,"fa","fa-search",2,"padding-left","20px","font-size","15px"],["type","text","matInput","","maxlength","128",3,"id","placeholder","formControl","matAutocomplete","click"],["autoCompleteInput",""],[3,"optionSelected"],["auto","matAutocomplete"],[4,"ngIf"],["class","autoCompleteInfoResult smallInputInfo","disabled","",3,"innerHTML",4,"ngIf"],["disabled","","style","text-align: center;display: block;padding: 10px;",4,"ngIf"],["class","autoCompleteInfoResult smallInputInfo create-contact","disabled","",4,"ngIf"],[3,"id","value",4,"ngFor","ngForOf"],[3,"id","value"],[1,"contact-header"],["mat-card-avatar","",1,"contact-header-image","fa",3,"title"],[3,"title",4,"ngIf"],["class","contact-filling fa fa-circle",3,"title","color",4,"ngIf"],["class","contact-item",4,"ngIf"],["class","contact-address",3,"title",4,"ngIf"],[4,"ngFor","ngForOf"],[3,"title"],["style","color: #666;",4,"ngIf"],[2,"color","#666"],[1,"contact-filling","fa","fa-circle",3,"title"],[1,"contact-item"],["mat-list-icon","",1,"contact-group","far","fa-building",3,"title"],["mat-line","",1,"contact-content",3,"title"],["mat-list-icon","",1,"contact-group","fa","fa-sitemap",3,"title"],["mat-line","","class","contact-content",3,"title",4,"ngIf"],["mat-list-icon","",1,"contact-group","far","fa-envelope",3,"title"],["mat-list-icon","",1,"contact-group","fas","fa-phone",3,"title"],[1,"contact-address",3,"title"],["mat-list-icon","",1,"contact-group","fas","fa-map-marker-alt"],["mat-list-icon","",1,"contact-group","far","fa-sticky-note",3,"title"],["mat-list-icon","",1,"contact-group","fas","fa-hashtag",3,"title"],["disabled","",1,"autoCompleteInfoResult","smallInputInfo",3,"innerHTML"],["disabled","",2,"text-align","center","display","block","padding","10px"],["diameter","20"],["disabled","",1,"autoCompleteInfoResult","smallInputInfo","create-contact"],[2,"cursor","pointer",3,"click"],["matSuffix","",1,"fas","fa-plus-circle",2,"padding-top","5px"],[2,"text-align","right"],["mat-button","","color","warn",2,"font-size","10px",3,"click"],[1,"itemList"],["class","mat-chip-list-stacked itemChip","color","default",4,"ngIf"],["class","noResult",4,"ngIf"],["color","default",1,"mat-chip-list-stacked","itemChip"],["class","listAutocomplete","color","default",3,"removable","removed","click",4,"ngFor","ngForOf"],["color","default",1,"listAutocomplete",3,"removable","removed","click"],[2,"display","flex","flex","1","align-items","center"],[1,"fa",2,"padding-right","5px",3,"title"],["class","fa fa-circle","style","font-size: 9px;",3,"color",4,"ngIf"],["matChipRemove","","class","fa fa-times",4,"ngIf"],[1,"fa","fa-circle",2,"font-size","9px"],["matChipRemove","",1,"fa","fa-times"],[1,"noResult"]],template:function(t,e){1&t&&(n.Wb(0,"form"),n.Rb(1,"input",0),n.Oc(2,zd,11,10,"mat-form-field",1),n.Oc(3,Bd,4,3,"div",2),n.Oc(4,Jd,3,2,"div",3),n.Vb()),2&t&&(n.Db(1),n.oc("formControl",e.controlAutocomplete),n.Db(1),n.oc("ngIf",!e.controlAutocomplete.disabled&&!e.singleMode||e.singleMode&&0===e.controlAutocomplete.value.length&&!e.controlAutocomplete.disabled),n.Db(1),n.oc("ngIf",e.controlAutocomplete.value.length>=2&&!e.controlAutocomplete.disabled&&!e.inputMode),n.Db(1),n.oc("ngIf",!e.inputMode))},directives:[X.K,X.v,X.w,X.d,X.u,X.j,P.t,Y.c,S.a,Y.i,J.b,Ne.d,X.p,Ne.a,P.s,W.p,K.a,K.f,K.c,K.d,R.a,K.m,K.l,R.d,R.c,W.l,V.c,Y.j,k.b,ze.d,ze.a,ze.e],pipes:[g.d,P.b],styles:[".smallInputInfo[_ngcontent-%COMP%]{font-size:9px;white-space:normal;line-height:13px;display:table-cell;vertical-align:middle;text-align:center}.mat-chip.mat-standard-chip[_ngcontent-%COMP%]{color:#1a80ab;background-color:#fff;border:1px solid #1a80ab}.noResult[_ngcontent-%COMP%]{text-align:center;font-style:italic;opacity:.5}.listAutocomplete[_ngcontent-%COMP%]{cursor:pointer;height:auto}.itemChip[_ngcontent-%COMP%]{display:block;width:95%}.itemChip[_ngcontent-%COMP%] .mat-chip-list-wrapper{margin:0}.mat-card[_ngcontent-%COMP%]{padding:0;margin:5px}.mat-card[_ngcontent-%COMP%]:hover{box-shadow:inset 0 0 5px 0 rgba(0,0,0,.12)}.itemList[_ngcontent-%COMP%]{padding-top:10px;overflow-x:hidden;max-height:165px}.mat-list[_ngcontent-%COMP%]{padding:0}.mat-option[_ngcontent-%COMP%]:not(.smallInputInfo){white-space:normal;line-height:normal;height:auto;padding:0}.mat-option[_ngcontent-%COMP%]:hover{background:initial}.contact-card[_ngcontent-%COMP%]{width:100%;margin-top:10px;margin-bottom:10px;padding:0;box-shadow:none;border:1px solid rgba(0,0,0,.12)}.mat-card-header[_ngcontent-%COMP%]{background:#f9f9f9;padding:10px 10px 5px}.contact-header[_ngcontent-%COMP%] .mat-card-header-text, .mat-card-subtitle[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis}.mat-card-subtitle[_ngcontent-%COMP%]{white-space:pre}.contact-item[_ngcontent-%COMP%]{height:20px!important}.contact-item[_ngcontent-%COMP%] .mat-list-text{padding-left:0!important}.mat-card-title[_ngcontent-%COMP%]{font-size:13px}.mat-card-subtitle[_ngcontent-%COMP%]{font-size:10px;margin-bottom:0}.contact-header-image[_ngcontent-%COMP%]{background:#135f7f;font-size:10px;color:#fff;height:24px;width:24px}.contact-group[_ngcontent-%COMP%], .contact-header-image[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.contact-group[_ngcontent-%COMP%]{color:#135f7f;font-size:10px!important;padding:0!important;margin:0}.mat-list-item-content[_ngcontent-%COMP%]{padding:0}.contact-content[_ngcontent-%COMP%]{font-size:10px!important;color:#337ab7}.contact-address[_ngcontent-%COMP%]{height:auto!important;padding-top:5px;padding-bottom:5px}.contact-address[_ngcontent-%COMP%] .mat-list-text{padding-left:0!important}.contact-address[_ngcontent-%COMP%] .mat-list-item-content{padding-top:0!important;padding-bottom:0!important}.contact-filling[_ngcontent-%COMP%]{position:absolute;right:8px;border-radius:10px}.create-contact[_ngcontent-%COMP%]{text-align:center;justify-content:center;display:flex;height:auto;position:-webkit-sticky;position:sticky;bottom:0;width:auto;padding:0;background:#fff;box-shadow:1px 0 2px 0 rgba(0,0,0,.12);font-size:11px}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();const th=["appDocumentViewer"],eh=["contactAutocomplete"];function ih(t,e){1&t&&(n.Wb(0,"div",11),n.Rb(1,"mat-spinner"),n.Vb())}function nh(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",12),n.dc("click",(function(){return n.Dc(t),n.hc().dialogRef.close()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",13),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.close"))}function ah(t,e){1&t&&(n.Wb(0,"div",14),n.Rb(1,"mat-spinner",15),n.Vb())}function sh(t,e){1&t&&n.Rb(0,"i",31)}function oh(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",32),n.dc("click",(function(e){n.Dc(t);const i=n.hc(2).index,a=n.hc(2);return e.stopPropagation(),a.removePj(i)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",33),n.Vb()}if(2&t){const t=n.hc(4);n.oc("disabled",t.isDocLoading())("title",n.jc(1,2,"lang.delAttachment"))}}function rh(t,e){if(1&t&&(n.Wb(0,"span"),n.Qc(1),n.ic(2,"translate"),n.Oc(3,sh,1,0,"i",29),n.Oc(4,oh,3,4,"button",30),n.Vb()),2&t){const t=n.hc().index,e=n.hc(2);n.Ib("complete",e.isPjValid(t)),n.Db(1),n.Tc("",n.jc(2,6,"lang.attachmentShort")," n\xb0",t+1,"\xa0"),n.Db(2),n.oc("ngIf",e.isPjValid(t)),n.Db(1),n.oc("ngIf",e.attachments.length>1)}}function ch(t,e){1&t&&n.Rb(0,"i",51)}function lh(t,e){1&t&&n.Rb(0,"i",52)}function dh(t,e){1&t&&n.Rb(0,"i",53)}function hh(t,e){1&t&&n.Rb(0,"i",51)}function uh(t,e){1&t&&n.Rb(0,"i",52)}function ph(t,e){1&t&&n.Rb(0,"i",53)}function bh(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",35),n.Wb(1,"plugin-select-search",54),n.dc("afterSelected",(function(e){return n.Dc(t),n.hc(4).selectContact(e)})),n.ic(2,"translate"),n.ic(3,"translate"),n.Vb(),n.Wb(4,"div",37),n.Wb(5,"button",55),n.dc("click",(function(){return n.Dc(t),n.hc(4).toggleSendMass()})),n.ic(6,"translate"),n.ic(7,"translate"),n.Rb(8,"mat-icon",56),n.Vb(),n.Rb(9,"i",57),n.Vb(),n.Vb()}if(2&t){const t=n.hc(4);n.Db(1),n.oc("label",n.jc(2,8,"lang.selectContact"))("placeholderLabel",n.jc(3,10,"lang.selectContact"))("datas",t.resourceContacts)("returnValue","object")("formControlSelect",t.selectedContact),n.Db(4),n.Ib("active",t.sendMassMode),n.oc("title",t.sendMassMode?n.jc(6,12,"lang.disableMailing"):n.jc(7,14,"lang.enableMailing"))}}function fh(t,e){1&t&&(n.Wb(0,"div",58),n.Rb(1,"div",59),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.oc("innerHTML",n.jc(2,1,"lang.mailingMsg"),n.Ec))}function mh(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-contact-autocomplete",61),n.dc("retrieveDocumentEvent",(function(){return n.Dc(t),n.hc(3),n.zc(6).saveDocService()})),n.Vb()}if(2&t){const t=n.hc(3).$implicit;n.oc("control",t.recipient)("singleMode",!0)}}function gh(t,e){if(1&t&&(n.Wb(0,"div",35),n.Oc(1,mh,1,2,"app-contact-autocomplete",60),n.Wb(2,"div",37),n.Rb(3,"i",57),n.Vb(),n.Vb()),2&t){const t=n.hc(4);n.Db(1),n.oc("ngIf",!t.loadingContact)}}function vh(t,e){if(1&t&&n.Rb(0,"mat-datepicker-toggle",62),2&t){n.hc();const t=n.zc(29);n.oc("for",t)}}function _h(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",63),n.dc("click",(function(e){n.Dc(t);const i=n.hc(2).$implicit;return e.stopPropagation(),i.validationDate.reset()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",64),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.eraseValue"))}function yh(t,e){1&t&&n.Rb(0,"i",57)}function xh(t,e){1&t&&n.Rb(0,"i",53)}function Ch(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",34),n.Wb(1,"div",35),n.Wb(2,"plugin-select-search",36),n.dc("afterSelected",(function(e){n.Dc(t);const i=n.hc().index;return n.hc(2).getAttachType(e,i)})),n.ic(3,"translate"),n.ic(4,"translate"),n.Vb(),n.Wb(5,"div",37),n.Oc(6,ch,1,0,"i",38),n.Oc(7,lh,1,0,"i",28),n.Oc(8,dh,1,0,"i",39),n.Vb(),n.Vb(),n.Wb(9,"div",35),n.Wb(10,"mat-form-field",40),n.Rb(11,"input",41),n.ic(12,"translate"),n.Vb(),n.Wb(13,"div",37),n.Oc(14,hh,1,0,"i",38),n.Oc(15,uh,1,0,"i",28),n.Oc(16,ph,1,0,"i",39),n.Vb(),n.Vb(),n.Oc(17,bh,10,16,"div",42),n.Oc(18,fh,3,3,"div",43),n.Oc(19,gh,4,1,"div",42),n.Wb(20,"div",35),n.Wb(21,"mat-form-field",44),n.dc("click",(function(){return n.Dc(t),n.zc(29).open()})),n.Wb(22,"mat-label"),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Rb(25,"input",45),n.ic(26,"translate"),n.Oc(27,vh,1,1,"mat-datepicker-toggle",46),n.Rb(28,"mat-datepicker",47,48),n.Oc(30,_h,3,3,"button",49),n.Vb(),n.Wb(31,"div",37),n.Oc(32,yh,1,0,"i",50),n.Oc(33,xh,1,0,"i",39),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(29),e=n.hc().$implicit,i=n.hc(2);n.Db(2),n.oc("label",n.jc(3,25,"lang.type"))("placeholderLabel",n.jc(4,27,"lang.type"))("formControlSelect",e.type)("datas",i.attachmentsTypes),n.Db(4),n.oc("ngIf",e.type.hasError("required")&&e.type.untouched),n.Db(1),n.oc("ngIf",e.type.touched&&e.type.hasError("required")),n.Db(1),n.oc("ngIf",e.type.valid&&!i.isEmptyField(e.type)),n.Db(3),n.pc("placeholder",n.jc(12,29,"lang.subject")),n.oc("formControl",e.title),n.Db(3),n.oc("ngIf",e.title.hasError("required")&&e.title.untouched),n.Db(1),n.oc("ngIf",e.title.touched&&e.title.hasError("required")),n.Db(1),n.oc("ngIf",e.title.valid&&!i.isEmptyField(e.title)),n.Db(1),n.oc("ngIf",i.resourceContacts.length>1),n.Db(1),n.oc("ngIf",i.sendMassMode),n.Db(1),n.oc("ngIf",!i.sendMassMode),n.Db(4),n.Rc(n.jc(24,31,"lang.expectedReturnDate")),n.Db(2),n.oc("formControl",e.validationDate)("matDatepicker",t)("placeholder",n.jc(26,33,"lang.expectedReturnDate"))("min",i.now),n.Db(2),n.oc("ngIf",!e.validationDate.value),n.Db(1),n.oc("touchUi",i.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.validationDate.value&&!e.validationDate.disabled),n.Db(2),n.oc("ngIf",e.validationDate.valid&&i.isEmptyField(e.validationDate)),n.Db(1),n.oc("ngIf",e.validationDate.valid&&!i.isEmptyField(e.validationDate))}}function Oh(t,e){1&t&&n.Rb(0,"i",52)}function Dh(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab",21),n.Oc(1,rh,5,8,"ng-template",20),n.Wb(2,"div",22),n.Oc(3,Ch,34,35,"div",23),n.Wb(4,"div",24),n.Wb(5,"app-document-viewer",25,26),n.dc("triggerEvent",(function(){n.Dc(t);const i=e.index;return n.hc(2).setDatasViewer(i)})),n.Vb(),n.Wb(7,"div",27),n.Oc(8,Oh,1,0,"i",28),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.oc("disabled",i.isDocLoading()),n.Db(3),n.oc("ngIf",!i.loading),n.Db(2),n.oc("editMode",!0)("mode","attachment"),n.Db(3),n.oc("ngIf",t.encodedFile.touched&&t.encodedFile.hasError("required"))}}function wh(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span"),n.Wb(1,"button",65),n.dc("click",(function(e){n.Dc(t);const i=n.hc(2);return e.stopPropagation(),i.newPj()})),n.ic(2,"translate"),n.Rb(3,"mat-icon",66),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.oc("disabled",t.sendMassMode||t.isDocLoading())("title",n.jc(2,2,"lang.newAttachment"))}}function Mh(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab-group",16,17),n.dc("selectedIndexChange",(function(e){return n.Dc(t),n.hc().indexTab=e}))("selectedIndexChange",(function(e){return n.Dc(t),n.hc().updateFile(e)})),n.Oc(2,Dh,9,5,"mat-tab",18),n.Wb(3,"mat-tab",19),n.Oc(4,wh,4,4,"ng-template",20),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.oc("selectedIndex",t.indexTab),n.Db(2),n.oc("ngForOf",t.attachments)}}function kh(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",67),n.dc("click",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc();n.oc("disabled",t.canValidatePj()),n.Db(1),n.Rc(n.jc(2,2,"lang.validate"))}}function Sh(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",67),n.dc("click",(function(){return n.Dc(t),n.hc().onSubmit("mailing")})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc();n.oc("disabled",t.canValidatePj()),n.Db(1),n.Rc(n.jc(2,2,"lang.mailing"))}}function Ih(t,e){if(1&t&&(n.Wb(0,"button",68),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.oc("disabled",t.canValidatePj()),n.Db(1),n.Rc(n.jc(2,2,"lang.cancel"))}}let Ph=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c,l){this.translate=t,this.http=e,this.data=i,this.dialogRef=n,this.appService=a,this.notify=s,this.sortPipe=o,this.dialog=r,this.functions=c,this.contactService=l,this.loading=!0,this.sendMassMode=!1,this.sendingData=!1,this.attachmentsTypes=[],this.creationMode=!0,this.attachFormGroup=[],this.attachments=[],this.now=new Date,this.asyncIndexTab=0,this.indexTab=0,this.resourceSubject="",this.resourceContacts=[],this.selectedContact=new X.i,this.loadingContact=!1,this.resId=null}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){yield this.loadAttachmentTypes(),yield this.loadResource(),this.loading=!1}))}loadAttachmentTypes(){return new Promise((t,e)=>{this.http.get("../rest/attachmentsTypes").pipe(Object(mt.a)(e=>{Object.keys(e.attachmentsTypes).forEach(t=>{e.attachmentsTypes[t].show&&this.attachmentsTypes.push(Object.assign({id:t},e.attachmentsTypes[t]))}),this.attachmentsTypes=this.sortPipe.transform(this.attachmentsTypes,"label"),t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(""),Object(c.a)(!1)))).subscribe()})}loadResource(){return new Promise((t,e)=>{this.http.get(`../rest/resources/${this.data.resIdMaster}?light=true`).pipe(Object(mt.a)(e=>Object(r.a)(this,void 0,void 0,(function*(){let i="";"outgoing"===e.categoryId?!this.functions.empty(e.recipients)&&e.recipients.length>0&&(e.recipients=e.recipients.filter(t=>"entity"!==t.type),yield this.getContacts(e.recipients),i=this.functions.empty(e.recipients)?"":[{id:this.resourceContacts[0].id,type:this.resourceContacts[0].type}]):!this.functions.empty(e.senders)&&e.senders.length>0&&(e.senders=e.senders.filter(t=>"entity"!==t.type),yield this.getContacts(e.senders),i=this.functions.empty(e.senders)?"":[{id:this.resourceContacts[0].id,type:this.resourceContacts[0].type}]),this.resourceSubject=e.subject,this.attachments.push({title:new X.i({value:e.subject,disabled:!1},[X.I.required]),recipient:new X.i({value:i,disabled:!1}),type:new X.i({value:"response_project",disabled:!1},[X.I.required]),validationDate:new X.i({value:"",disabled:!1}),format:new X.i({value:"",disabled:!1},[X.I.required]),encodedFile:new X.i({value:"",disabled:!1},[X.I.required])}),setTimeout(()=>{this.getAttachType("response_project",0)},800),this.attachFormGroup.push(new X.l(this.attachments[0])),"outgoing"===e.categoryId?!this.functions.empty(e.recipients)&&e.recipients.length>1&&this.toggleSendMass():!this.functions.empty(e.senders)&&e.senders.length>1&&this.toggleSendMass(),t(!0)}))),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(""),Object(c.a)(!1)))).subscribe()})}getContacts(t){return Object(r.a)(this,void 0,void 0,(function*(){this.resourceContacts=[],yield Promise.all(t.map(t=>Object(r.a)(this,void 0,void 0,(function*(){yield this.getContact(t.id,t.type)})))),this.resourceContacts=this.sortPipe.transform(this.resourceContacts,"label")}))}selectContact(t){this.loadingContact=!0;const e=JSON.parse(JSON.stringify(this.resourceContacts.filter(e=>e.id===t.id&&e.type===t.type)[0]));this.attachments[this.indexTab].recipient.setValue([e]),setTimeout(()=>{this.loadingContact=!1},0),this.selectedContact.reset()}getContact(t,e){return new Promise((i,n)=>{"contact"===e?this.http.get("../rest/contacts/"+t).pipe(Object(mt.a)(t=>{this.resourceContacts.push({id:t.id,type:"contact",label:this.contactService.formatContact(t)}),i(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),i(!1),Object(c.a)(!1)))).subscribe():"user"===e?this.http.get("../rest/users/"+t).pipe(Object(mt.a)(t=>{this.resourceContacts.push({id:t.id,type:"user",label:`${t.firstname} ${t.lastname}`}),i(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),i(!1),Object(c.a)(!1)))).subscribe():"entity"===e&&this.http.get("../rest/entities/"+t).pipe(Object(mt.a)(t=>{this.resourceContacts.push({id:t.id,type:"entity",label:t.entity_label}),i(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),i(!1),Object(c.a)(!1)))).subscribe()})}selectAttachType(t,e){t.type=e.id}formatAttachments(){let t=[];return this.attachments.forEach((e,i)=>{t.push({resIdMaster:this.data.resIdMaster,type:e.type.value,title:e.title.value,recipientId:e.recipient.value.length>0?e.recipient.value[0].id:null,recipientType:e.recipient.value.length>0?e.recipient.value[0].type:null,validationDate:""!==e.validationDate.value?e.validationDate.value:null,encodedFile:e.encodedFile.value,format:e.format.value})}),t}onSubmit(t="default"){this.appDocumentViewer.toArray()[this.indexTab].getFile().pipe(Object(bt.a)(),Object(mt.a)(t=>{this.attachments[this.indexTab].encodedFile.setValue(t.content),this.attachments[this.indexTab].format.setValue(t.format)}),Object(mt.a)(()=>Object(r.a)(this,void 0,void 0,(function*(){if(this.isValid()){let e=null;this.sendingData=!0;const i=this.formatAttachments();for(const t of i)e=yield this.saveAttachment(t);this.sendMassMode&&null!==e&&"mailing"===t&&(yield this.generateMailling(e)),this.sendingData=!1,this.notify.success(this.translate.instant("lang.attachmentAdded")),this.dialogRef.close("success")}else this.sendingData=!1,this.notify.error(this.translate.instant("lang.mustCompleteAllAttachments"))})))).subscribe()}saveAttachment(t){return t.status=this.sendMassMode?"SEND_MASS":"A_TRA",new Promise((e,i)=>{this.http.post("../rest/attachments",t).pipe(Object(mt.a)(t=>{e(t.id)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(""),Object(c.a)(!1)))).subscribe()})}generateMailling(t){return new Promise((e,i)=>{this.http.post(`../rest/attachments/${t}/mailing`,{}).pipe(Object(mt.a)(()=>{e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(""),Object(c.a)(!1)))).subscribe()})}isValid(){let t=!0;return this.attachFormGroup.forEach(e=>{Object.keys(e.controls).forEach(t=>{e.controls[t].markAsTouched()}),"INVALID"===e.status&&(t=!1)}),t}isPjValid(t){let e=!0;return"INVALID"===this.attachFormGroup[t].status&&(e=!1),e}isDocLoading(){let t=!1;return this.appDocumentViewer.toArray().forEach((e,i)=>{e.isEditingTemplate()&&(t=!0)}),t}canValidatePj(){let t=!1;return this.appDocumentViewer.toArray().forEach((e,i)=>{e.isEditingTemplate()&&e.editor.async&&(t=!0)}),t}setDatasViewer(t){let e={};Object.keys(this.attachments[t]).forEach(i=>{["title","validationDate","recipient"].indexOf(i)>-1&&("recipient"===i&&this.attachments[t][i].value.length>0?(e.recipientId=this.attachments[t][i].value[0].id,e.recipientType=this.attachments[t][i].value[0].type):e["attachment_"+i]=this.attachments[t][i].value)});let i=1;this.attachments.forEach(t=>{"transmission"==t.type.value&&(e["transmissionRecipientId"+i]=t.recipient.value[0].id,e["transmissionRecipientType"+i]=t.recipient.value[0].type,i++)}),e.resId=this.data.resIdMaster,this.sendMassMode&&(e.inMailing=!0),this.appDocumentViewer.toArray()[t].setDatas(e)}newPj(){this.attachments.push({title:new X.i({value:this.resourceSubject,disabled:!1},[X.I.required]),recipient:new X.i({value:this.functions.empty(this.resourceContacts[this.attachments.length])?null:[{id:this.resourceContacts[this.attachments.length].id,type:this.resourceContacts[this.attachments.length].type}],disabled:!1}),type:new X.i({value:"response_project",disabled:!1},[X.I.required]),validationDate:new X.i({value:null,disabled:!1}),encodedFile:new X.i({value:"",disabled:!1},[X.I.required]),format:new X.i({value:"",disabled:!1},[X.I.required])}),this.attachFormGroup.push(new X.l(this.attachments[this.attachments.length-1])),this.indexTab=this.attachments.length-1,setTimeout(()=>{this.getAttachType("response_project",this.indexTab)},800)}updateFile(t){this.functions.empty(this.attachments[this.asyncIndexTab].encodedFile.value)?this.appDocumentViewer.toArray()[this.asyncIndexTab].getFile().pipe(Object(ro.a)(1),Object(mt.a)(e=>{this.attachments[this.asyncIndexTab].encodedFile.setValue(e.content),this.attachments[this.asyncIndexTab].format.setValue(e.format),this.asyncIndexTab=t})).subscribe():this.asyncIndexTab=t}removePj(t){this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete")+" : "+this.translate.instant("lang.attachmentShort")+" n\xb0"+(t+1),msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.indexTab=0,this.asyncIndexTab=this.indexTab,this.attachments.splice(t,1),this.attachFormGroup.splice(t,1)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}getAttachType(t,e){this.appDocumentViewer.toArray()[e].loadTemplatesByResId(this.data.resIdMaster,t)}isEmptyField(t){return null===t.value||(Array.isArray(t.value)?!(t.value.length>0):""===String(t.value))}toggleSendMass(){this.sendMassMode?(this.sendMassMode=!this.sendMassMode,this.selectedContact.enable()):1===this.attachments.length?(this.sendMassMode=!this.sendMassMode,this.selectedContact.disable()):this.notify.error("Veuillez supprimer les <b>autres onglets PJ</b> avant de passer en <b>publipostage</b>.")}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.a),n.Qb(q.h),n.Qb(w.a),n.Qb(D.a),n.Qb(Wt.a),n.Qb(q.b),n.Qb(_t.a),n.Qb(lc))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Xc(th,!0),n.Xc(eh,!0)),2&t&&(n.yc(i=n.ec())&&(e.appDocumentViewer=i),n.yc(i=n.ec())&&(e.contactAutocomplete=i))},inputs:{resId:"resId"},features:[n.Cb([Wt.a,lc])],decls:14,vars:10,consts:[[1,"attach-container"],["class","example-loading-shade",4,"ngIf"],["mat-dialog-title",""],[2,"flex","1"],["mat-icon-button","",3,"title","click",4,"ngIf"],[1,"attach-content"],["class","loading",4,"ngIf"],["style","width: 100%;",3,"selectedIndex","selectedIndexChange",4,"ngIf"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","color","primary",3,"disabled","click",4,"ngIf"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close",4,"ngIf"],[1,"example-loading-shade"],["mat-icon-button","",3,"title","click"],[1,"fa","fa-times"],[1,"loading"],[2,"margin","auto"],[2,"width","100%",3,"selectedIndex","selectedIndexChange"],["pjList",""],[3,"disabled",4,"ngFor","ngForOf"],["disabled","",1,"addPJ"],["mat-tab-label",""],[3,"disabled"],[2,"height","100%","overflow","auto"],["class","attachment-form col-md-3 col-sm-12",4,"ngIf"],[1,"documentContent","col-md-9","col-sm-12"],[2,"height","100%","width","100%","position","relative",3,"editMode","mode","triggerEvent"],["appDocumentViewer",""],[1,"fieldState","stateDoc"],["class","fas fa-exclamation-triangle fieldError",4,"ngIf"],["class","fa fa-check",4,"ngIf"],["mat-icon-button","","color","warn",3,"disabled","title","click",4,"ngIf"],[1,"fa","fa-check"],["mat-icon-button","","color","warn",3,"disabled","title","click"],[1,"fa","fa-minus"],[1,"attachment-form","col-md-3","col-sm-12"],[1,"attachment-form-item"],[2,"width","100%",3,"label","placeholderLabel","formControlSelect","datas","afterSelected"],[1,"fieldState"],["class","fas fa-asterisk fieldRequired",4,"ngIf"],["class","fas fa-check fieldFull",4,"ngIf"],[1,"input-form"],["matInput","",3,"placeholder","formControl"],["class","attachment-form-item",4,"ngIf"],["class","attachment-form-item","style","display: block;",4,"ngIf"],[1,"input-form","input-date",2,"cursor","pointer",3,"click"],["matInput","","readonly","",2,"cursor","pointer",3,"formControl","matDatepicker","placeholder","min"],["matSuffix","",3,"for",4,"ngIf"],[3,"touchUi"],["picker",""],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click",4,"ngIf"],["class","fas fa-asterisk noMandatory",4,"ngIf"],[1,"fas","fa-asterisk","fieldRequired"],[1,"fas","fa-exclamation-triangle","fieldError"],[1,"fas","fa-check","fieldFull"],[2,"width","100%",3,"label","placeholderLabel","datas","returnValue","formControlSelect","afterSelected"],["mat-icon-button","","color","primary",3,"title","click"],[1,"fas","fa-mail-bulk"],[1,"fas","fa-asterisk","noMandatory"],[1,"attachment-form-item",2,"display","block"],["role","alert",1,"alert","alert-info",3,"innerHTML"],["style","width:100%;",3,"control","singleMode","retrieveDocumentEvent",4,"ngIf"],[2,"width","100%",3,"control","singleMode","retrieveDocumentEvent"],["matSuffix","",3,"for"],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click"],["color","warn",1,"fa","fa-calendar-times"],["mat-icon-button","",3,"disabled","title","click"],[1,"fa","fa-plus"],["mat-raised-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Oc(1,ih,2,0,"div",1),n.Wb(2,"h1",2),n.Wb(3,"span",3),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Oc(6,nh,3,3,"button",4),n.Vb(),n.Wb(7,"mat-dialog-content",5),n.Oc(8,ah,2,0,"div",6),n.Oc(9,Mh,5,2,"mat-tab-group",7),n.Vb(),n.Wb(10,"div",8),n.Oc(11,kh,3,4,"button",9),n.Oc(12,Sh,3,4,"button",9),n.Oc(13,Ih,3,4,"button",10),n.Vb(),n.Vb()),2&t&&(n.Db(1),n.oc("ngIf",e.sendingData),n.Db(3),n.Sc(" ",n.jc(5,8,"lang.attachmentCreation")," "),n.Db(2),n.oc("ngIf",!e.loading),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(2),n.oc("ngIf",e.creationMode&&!e.loading),n.Db(1),n.oc("ngIf",e.sendMassMode&&!e.loading),n.Db(1),n.oc("ngIf",e.creationMode&&!e.loading))},directives:[P.t,q.i,q.f,q.c,V.c,k.b,S.a,Te.c,P.s,Te.a,Te.d,Jr,fr,Y.c,J.b,X.d,X.u,X.j,Y.g,ae.h,ae.f,Zd,ae.j,Y.j,q.d],pipes:[g.d],styles:[".loading[_ngcontent-%COMP%]{display:flex;height:100%;width:100%}.attach-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;height:100%}.attach-container[_ngcontent-%COMP%] .mat-tab-body-content, .attach-container[_ngcontent-%COMP%] .mat-tab-body-wrapper{height:100%!important}.mat-dialog-title[_ngcontent-%COMP%]{margin:0!important;display:flex;align-items:center}.attach-content[_ngcontent-%COMP%]{margin:0;padding:0!important;height:100%;display:flex;overflow:auto}.attach-content[_ngcontent-%COMP%] .mat-tab-label:last-child{min-width:50px;padding:0;opacity:1;color:#135f7f}.attachment-form[_ngcontent-%COMP%]{padding:10px;overflow:auto;position:-webkit-sticky;position:sticky;top:0}.attachment-form-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding-top:10px;padding-bottom:10px}.attachment-form-item[_ngcontent-%COMP%] .mat-form-field-should-float .mat-form-field-label-wrapper{margin-top:-7px}.attachment-form-item[_ngcontent-%COMP%] .mat-form-field-should-float .mat-form-field-label{background:#fff;width:auto!important;padding-top:5px;padding-left:5px;padding-right:5px}.example-loading-shade[_ngcontent-%COMP%]{background:hsla(0,0%,100%,.7686274509803922);z-index:2}.actions[_ngcontent-%COMP%]{margin:0}.complete[_ngcontent-%COMP%]{color:green;font-weight:700}.fieldState[_ngcontent-%COMP%]{padding-top:0!important}.stateDoc[_ngcontent-%COMP%]{position:absolute;right:20px;top:20px}.documentContent[_ngcontent-%COMP%]{display:flex;flex:1;align-items:center;justify-content:center;text-align:center;background:#135f7f;overflow:auto;color:#fff;height:100%}.active[_ngcontent-%COMP%]{color:#f99830}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();const Vh=["appAttachmentViewer"];function Rh(t,e){1&t&&(n.Wb(0,"div",13),n.Rb(1,"mat-spinner"),n.Vb())}function jh(t,e){if(1&t&&(n.Ub(0),n.Qc(1),n.Tb()),2&t){const t=n.hc(2);n.Db(1),n.Sc(" ",t.attachment.chrono.value," - ")}}function Ah(t,e){if(1&t&&(n.Wb(0,"span",14),n.Oc(1,jh,2,1,"ng-container",7),n.Qc(2),n.ic(3,"shorten"),n.Vb()),2&t){const t=n.hc();n.oc("title",t.attachment.title.value),n.Db(1),n.oc("ngIf",null!==t.attachment.chrono.value),n.Db(1),n.Sc(" ",n.lc(3,3,t.attachment.title.value,50,"...")," ")}}function Wh(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",17),n.Wb(1,"mat-slide-toggle",37),n.dc("change",(function(){n.Dc(t);const e=n.hc(2);return e.newVersion=!e.newVersion})),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.oc("checked",t.newVersion),n.Db(1),n.Rc(n.jc(3,2,"lang.newVersion"))}}function Th(t,e){if(1&t&&(n.Wb(0,"div",17),n.Rb(1,"div",38),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("innerHTML",t.translate.instant("lang.mustEditDocument"),n.Ec)}}function Eh(t,e){1&t&&n.Rb(0,"i",39)}function Fh(t,e){1&t&&n.Rb(0,"i",40)}function Lh(t,e){1&t&&n.Rb(0,"i",41)}function Qh(t,e){1&t&&n.Rb(0,"i",39)}function Nh(t,e){1&t&&n.Rb(0,"i",40)}function zh(t,e){1&t&&n.Rb(0,"i",41)}function Bh(t,e){if(1&t&&(n.Wb(0,"div",42),n.Rb(1,"div",43),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("innerHTML",t.translate.instant("lang.mailingMsg"),n.Ec)}}function Uh(t,e){if(1&t&&(n.Wb(0,"div",17),n.Rb(1,"app-contact-autocomplete",44),n.Wb(2,"div",20),n.Rb(3,"i",21),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("control",t.attachment.recipient)("singleMode",!0)}}function $h(t,e){if(1&t&&(n.Wb(0,"div",17),n.Wb(1,"mat-form-field",18),n.Rb(2,"input",28),n.ic(3,"translate"),n.ic(4,"fullDate"),n.ic(5,"ucfirst"),n.ic(6,"timeAgo"),n.Vb(),n.Wb(7,"div",20),n.Rb(8,"i",21),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.pc("placeholder",n.jc(3,3,"lang.signedAlt")),n.oc("title",n.jc(4,5,t.attachment.signDate.value))("value",n.jc(5,7,n.kc(6,9,t.attachment.signDate.value,"full")))}}function Hh(t,e){if(1&t&&(n.Wb(0,"div",17),n.Wb(1,"mat-form-field",18),n.Rb(2,"input",26),n.ic(3,"translate"),n.ic(4,"translate"),n.Vb(),n.Wb(5,"div",20),n.Rb(6,"i",21),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.rc("placeholder","",n.jc(3,3,"lang.signedAlt")," ",n.jc(4,5,"lang.by"),""),n.oc("formControl",t.attachment.signatory)}}function Gh(t,e){if(1&t&&(n.Wb(0,"div",17),n.Wb(1,"mat-form-field",18),n.Rb(2,"input",29),n.ic(3,"translate"),n.ic(4,"timeAgo"),n.Vb(),n.Wb(5,"div",20),n.Rb(6,"i",21),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.pc("placeholder",n.jc(3,3,"lang.modified")),n.oc("formControl",t.attachment.modificationDate)("value",n.kc(4,5,t.attachment.modificationDate.value,"full"))}}function Xh(t,e){if(1&t&&(n.Wb(0,"div",17),n.Wb(1,"mat-form-field",18),n.Rb(2,"input",26),n.ic(3,"translate"),n.ic(4,"translate"),n.Vb(),n.Wb(5,"div",20),n.Rb(6,"i",21),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.rc("placeholder","",n.jc(3,3,"lang.modified")," ",n.jc(4,5,"lang.by"),""),n.oc("formControl",t.attachment.modifiedBy)}}function qh(t,e){if(1&t&&n.Rb(0,"mat-datepicker-toggle",45),2&t){n.hc();const t=n.zc(62);n.oc("for",t)}}function Kh(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",46),n.dc("click",(function(e){n.Dc(t);const i=n.hc(2);return e.stopPropagation(),i.attachment.validationDate.reset()})),n.Rb(1,"mat-icon",47),n.Vb()}if(2&t){const t=n.hc(2);n.oc("title",t.translate.instant("lang.eraseValue"))}}function Yh(t,e){1&t&&n.Rb(0,"i",21)}function Jh(t,e){1&t&&n.Rb(0,"i",41)}function Zh(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"div",15),n.Oc(2,Wh,4,4,"div",16),n.Oc(3,Th,2,1,"div",16),n.Wb(4,"div",17),n.Wb(5,"mat-form-field",18),n.Rb(6,"input",19),n.ic(7,"translate"),n.ic(8,"translate"),n.Vb(),n.Wb(9,"div",20),n.Rb(10,"i",21),n.Vb(),n.Vb(),n.Wb(11,"div",17),n.Wb(12,"plugin-select-search",22),n.dc("afterSelected",(function(e){return n.Dc(t),n.hc().getAttachType(e)})),n.Vb(),n.Wb(13,"div",20),n.Oc(14,Eh,1,0,"i",23),n.Oc(15,Fh,1,0,"i",24),n.Oc(16,Lh,1,0,"i",25),n.Vb(),n.Vb(),n.Wb(17,"div",17),n.Wb(18,"mat-form-field",18),n.Rb(19,"input",26),n.ic(20,"translate"),n.Vb(),n.Wb(21,"div",20),n.Oc(22,Qh,1,0,"i",23),n.Oc(23,Nh,1,0,"i",24),n.Oc(24,zh,1,0,"i",25),n.Vb(),n.Vb(),n.Oc(25,Bh,2,1,"div",27),n.Oc(26,Uh,4,2,"div",16),n.Oc(27,$h,9,12,"div",16),n.Oc(28,Hh,7,7,"div",16),n.Wb(29,"mat-expansion-panel"),n.Wb(30,"mat-expansion-panel-header"),n.Wb(31,"mat-panel-title"),n.Qc(32),n.ic(33,"translate"),n.Vb(),n.Vb(),n.Wb(34,"div",17),n.Wb(35,"mat-form-field",18),n.Rb(36,"input",28),n.ic(37,"translate"),n.ic(38,"fullDate"),n.ic(39,"timeAgo"),n.Vb(),n.Wb(40,"div",20),n.Rb(41,"i",21),n.Vb(),n.Vb(),n.Wb(42,"div",17),n.Wb(43,"mat-form-field",18),n.Rb(44,"input",26),n.ic(45,"translate"),n.ic(46,"translate"),n.Vb(),n.Wb(47,"div",20),n.Rb(48,"i",21),n.Vb(),n.Vb(),n.Oc(49,Gh,7,8,"div",16),n.Oc(50,Xh,7,7,"div",16),n.Wb(51,"div",17),n.Wb(52,"mat-form-field",18),n.Rb(53,"input",29),n.ic(54,"translate"),n.Vb(),n.Wb(55,"div",20),n.Rb(56,"i",21),n.Vb(),n.Vb(),n.Wb(57,"div",17),n.Wb(58,"mat-form-field",30),n.dc("click",(function(){return n.Dc(t),n.zc(62).open()})),n.Rb(59,"input",31),n.Oc(60,qh,1,1,"mat-datepicker-toggle",32),n.Rb(61,"mat-datepicker",33,34),n.Oc(63,Kh,2,1,"button",35),n.Vb(),n.Wb(64,"div",20),n.Oc(65,Yh,1,0,"i",36),n.Oc(66,Jh,1,0,"i",25),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=n.zc(62),e=n.hc();n.Db(2),n.oc("ngIf",e.editMode),n.Db(1),n.oc("ngIf",e.newVersion),n.Db(3),n.pc("placeholder",n.jc(7,41,"lang.status")),n.oc("value",n.jc(8,43,"lang.attachment_"+e.attachment.status.value)),n.Db(6),n.oc("label",e.translate.instant("lang.type"))("placeholderLabel",e.translate.instant("lang.type"))("formControlSelect",e.attachment.type)("datas",e.attachmentsTypes),n.Db(2),n.oc("ngIf",e.attachment.type.hasError("required")&&e.attachment.type.untouched),n.Db(1),n.oc("ngIf",e.attachment.type.touched&&e.attachment.type.hasError("required")),n.Db(1),n.oc("ngIf",e.attachment.type.valid&&!e.isEmptyField(e.attachment.type)),n.Db(3),n.pc("placeholder",n.jc(20,45,"lang.subject")),n.oc("formControl",e.attachment.title),n.Db(3),n.oc("ngIf",e.attachment.title.hasError("required")&&e.attachment.title.untouched),n.Db(1),n.oc("ngIf",e.attachment.title.touched&&e.attachment.title.hasError("required")),n.Db(1),n.oc("ngIf",e.attachment.title.valid&&!e.isEmptyField(e.attachment.title)),n.Db(1),n.oc("ngIf",e.sendMassMode),n.Db(1),n.oc("ngIf",!e.sendMassMode),n.Db(1),n.oc("ngIf",void 0!==e.attachment.signedResponse.value),n.Db(1),n.oc("ngIf",void 0!==e.attachment.signedResponse.value),n.Db(4),n.Sc(" ",n.jc(33,47,"lang.othersInfos")," "),n.Db(4),n.pc("placeholder",n.jc(37,49,"lang.created")),n.oc("title",n.jc(38,51,e.attachment.creationDate.value))("value",n.kc(39,53,e.attachment.creationDate.value,"full")),n.Db(8),n.rc("placeholder","",n.jc(45,56,"lang.created")," ",n.jc(46,58,"lang.by"),""),n.oc("formControl",e.attachment.typistLabel),n.Db(5),n.oc("ngIf",null!==e.attachment.modificationDate.value),n.Db(1),n.oc("ngIf",null!==e.attachment.modificationDate.value),n.Db(3),n.pc("placeholder",n.jc(54,60,"lang.version")),n.oc("formControl",e.attachment.relation)("value",e.translate.instant("lang.version")+" "+e.attachment.relation.value),n.Db(6),n.oc("formControl",e.attachment.validationDate)("matDatepicker",t)("placeholder",e.translate.instant("lang.expectedReturnDate"))("min",e.now),n.Db(1),n.oc("ngIf",!e.attachment.validationDate.value),n.Db(1),n.oc("touchUi",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.attachment.validationDate.value&&!e.attachment.validationDate.disabled),n.Db(2),n.oc("ngIf",e.attachment.validationDate.valid&&e.isEmptyField(e.attachment.validationDate)),n.Db(1),n.oc("ngIf",e.attachment.validationDate.valid&&!e.isEmptyField(e.attachment.validationDate))}}function tu(t,e){if(1&t&&(n.Rb(0,"app-document-viewer",56,57),n.ic(2,"translate")),2&t){const t=n.hc(3);n.oc("editMode",!1)("resId",t.attachment.resIdMaster.value)("title",n.jc(2,3,"lang.mainDocument"))}}function eu(t,e){1&t&&(n.Wb(0,"mat-tab",54),n.ic(1,"translate"),n.Oc(2,tu,3,5,"ng-template",55),n.Vb()),2&t&&n.pc("label",n.jc(1,1,"lang.mainDocument"))}function iu(t,e){1&t&&(n.Wb(0,"span",59),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.signedAttachment")))}function nu(t,e){if(1&t&&(n.Wb(0,"mat-tab"),n.Oc(1,iu,3,3,"ng-template",50),n.Rb(2,"app-document-viewer",58,57),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.oc("editMode",!1)("resId",t.attachment.signedResponse.value)("mode","attachment")("title",t.attachment.chrono.value+" - "+t.attachment.title.value+" ("+t.translate.instant("lang.signed")+")")}}function au(t,e){1&t&&(n.Wb(0,"span",60),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.attachment")))}function su(t,e){if(1&t&&n.Rb(0,"app-document-viewer",61,57),2&t){const t=n.hc().$implicit,e=n.hc(2);n.oc("editMode",!1)("resId",t.resId)("mode","attachment")("format",e.attachment.format.value)("title",e.attachment.chrono.value+" - "+e.attachment.title.value+" ("+t.relation+")")}}function ou(t,e){if(1&t&&(n.Wb(0,"mat-tab",54),n.ic(1,"translate"),n.ic(2,"translate"),n.Oc(3,su,2,5,"ng-template",55),n.Vb()),2&t){const t=e.$implicit;n.sc("label","",n.jc(1,3,"lang.attachment")," (",n.jc(2,5,"lang.version")," ",t.relation,")")}}function ru(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab-group",48),n.Oc(1,eu,3,3,"mat-tab",49),n.Oc(2,nu,4,4,"mat-tab",7),n.Wb(3,"mat-tab"),n.Oc(4,au,3,3,"ng-template",50),n.Wb(5,"app-document-viewer",51,52),n.dc("triggerEvent",(function(e){return n.Dc(t),n.hc().setDatasViewer(e)})),n.Vb(),n.Vb(),n.Oc(7,ou,4,7,"mat-tab",53),n.Vb()}if(2&t){const t=n.hc();n.oc("selectedIndex",1),n.Db(1),n.oc("ngIf",null!==t.attachment.res_id_master),n.Db(1),n.oc("ngIf","SIGN"===t.attachment.status.value),n.Db(3),n.oc("editMode",t.editMode)("resId",t.data.resId)("resIdMaster",t.attachment.resIdMaster.value)("mode","attachment")("format",t.attachment.format.value)("attachType",t.attachment.type.value)("title",t.attachment.chrono.value+" - "+t.attachment.title.value),n.Db(2),n.oc("ngForOf",t.versions)}}function cu(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",62),n.dc("click",(function(){return n.Dc(t),n.hc().updateAttachment()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc();n.oc("disabled",!(t.loading||t.editMode&&t.attachFormGroup.valid)),n.Db(1),n.Rc(n.jc(2,2,"lang.validate"))}}function lu(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",62),n.dc("click",(function(){return n.Dc(t),n.hc().updateAttachment("mailing")})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc();n.oc("disabled",!(t.loading||t.editMode&&t.attachFormGroup.valid)),n.Db(1),n.Rc(n.jc(2,2,"lang.mailing"))}}function du(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",62),n.dc("click",(function(){return n.Dc(t),n.hc().createNewVersion()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc();n.oc("disabled",!t.editMode||!t.isEditing()),n.Db(1),n.Rc(n.jc(2,2,"lang.createNewVersion"))}}function hu(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",62),n.dc("click",(function(){return n.Dc(t),n.hc().createNewVersion("mailing")})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc();n.oc("disabled",!t.editMode||!t.isEditing()),n.Db(1),n.Rc(n.jc(2,2,"lang.mailing"))}}function uu(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",63),n.dc("click",(function(){return n.Dc(t),n.hc().deleteSignedVersion()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.deleteSignedVersion")))}let pu=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c,l,d){this.translate=t,this.http=e,this.data=i,this.dialog=n,this.dialogRef=a,this.appService=s,this.notify=o,this.sortPipe=r,this.headerService=c,this.privilegeService=l,this.functions=d,this.loading=!0,this.sendMassMode=!1,this.sendingData=!1,this.attachmentsTypes=[],this.versions=[],this.hidePanel=!1,this.newVersion=!1,this.attachFormGroup=null,this.editMode=!1,this.now=new Date}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.hidePanel=void 0!==this.data.hidePanel&&this.data.hidePanel,yield this.loadAttachmentTypes(),yield this.loadAttachment(),this.loading=!1}))}loadAttachmentTypes(){return new Promise(t=>{this.http.get("../rest/attachmentsTypes").pipe(Object(mt.a)(e=>{Object.keys(e.attachmentsTypes).forEach(t=>{this.attachmentsTypes.push(Object.assign({id:t},e.attachmentsTypes[t]))}),this.attachmentsTypes=this.sortPipe.transform(this.attachmentsTypes,"label"),t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(""),Object(c.a)(!1)))).subscribe()})}loadAttachment(){return new Promise(t=>{this.http.get("../rest/attachments/"+this.data.resId).pipe(Object(mt.a)(e=>{let i=null;this.functions.empty(this.data.editMode)?!this.privilegeService.hasCurrentUserPrivilege("manage_attachments")&&this.headerService.user.id!==e.typist||"SIGN"===e.status||"FRZ"===e.status||(this.editMode=!0):this.editMode=this.data.editMode,"acknowledgement_record_management"!==e.type&&"reply_record_management"!==e.type||(this.editMode=!1),null!==e.recipientId&&"SEND_MASS"!==e.status&&(i=[{id:e.recipientId,type:e.recipientType}]),this.sendMassMode="SEND_MASS"===e.status,this.attachment={typist:new X.i({value:e.typist,disabled:!0},[X.I.required]),typistLabel:new X.i({value:e.typistLabel,disabled:!0},[X.I.required]),creationDate:new X.i({value:e.creationDate,disabled:!0},[X.I.required]),modificationDate:new X.i({value:e.modificationDate,disabled:!0}),modifiedBy:new X.i({value:e.modifiedBy,disabled:!0}),signatory:new X.i({value:e.signatory,disabled:!0}),signatoryId:new X.i({value:e.signatoryId,disabled:!0}),signDate:new X.i({value:e.signDate,disabled:!0}),resId:new X.i({value:this.data.resId,disabled:!0},[X.I.required]),chrono:new X.i({value:e.chrono,disabled:!0}),originId:new X.i({value:e.originId,disabled:!0}),resIdMaster:new X.i({value:e.resIdMaster,disabled:!0},[X.I.required]),status:new X.i({value:e.status,disabled:!0},[X.I.required]),relation:new X.i({value:e.relation,disabled:!0},[X.I.required]),title:new X.i({value:e.title,disabled:!this.editMode},[X.I.required]),recipient:new X.i({value:i,disabled:!this.editMode}),type:new X.i({value:e.type,disabled:!this.editMode},[X.I.required]),validationDate:new X.i({value:null!==e.validationDate?new Date(e.validationDate):null,disabled:!this.editMode}),signedResponse:new X.i({value:e.signedResponse,disabled:!1}),encodedFile:new X.i({value:"_CURRENT_FILE",disabled:!this.editMode},[X.I.required]),format:new X.i({value:e.format,disabled:!0},[X.I.required])},this.versions=e.versions,this.attachFormGroup=new X.l(this.attachment),t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(""),Object(c.a)(!1)))).subscribe()})}createNewVersion(t="default"){this.sendingData=!0,this.appAttachmentViewer.getFile().pipe(Object(mt.a)(t=>{this.attachment.encodedFile.setValue(t.content),this.attachment.format.setValue(t.format),this.functions.empty(this.attachment.encodedFile.value)&&(this.notify.error(this.translate.instant("lang.mustEditAttachmentFirst")),this.sendingData=!1)}),Object(d.a)(()=>!this.functions.empty(this.attachment.encodedFile.value)),p(()=>this.http.post("../rest/attachments",this.getAttachmentValues(!0,t))),Object(mt.a)(e=>Object(r.a)(this,void 0,void 0,(function*(){this.sendMassMode&&"mailing"===t?(yield this.generateMailling(e.id),this.notify.success(this.translate.instant("lang.attachmentGenerated"))):this.notify.success(this.translate.instant("lang.newVersionAdded")),this.dialogRef.close("success")}))),Object(Xt.a)(()=>this.sendingData=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(""),Object(c.a)(!1)))).subscribe()}updateAttachment(t="default"){this.sendingData=!0,this.appAttachmentViewer.getFile().pipe(Object(mt.a)(t=>{this.attachment.encodedFile.setValue(t.content),this.attachment.format.setValue(t.format)}),p(()=>this.http.put("../rest/attachments/"+this.attachment.resId.value,this.getAttachmentValues(!1,t))),Object(mt.a)(()=>Object(r.a)(this,void 0,void 0,(function*(){this.sendMassMode&&"mailing"===t?(yield this.generateMailling(this.attachment.resId.value),this.notify.success(this.translate.instant("lang.attachmentGenerated"))):this.notify.success(this.translate.instant("lang.attachmentUpdated")),this.dialogRef.close("success")}))),Object(Xt.a)(()=>this.sendingData=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(""),Object(c.a)(!1)))).subscribe()}generateMailling(t){return new Promise(e=>{this.http.post(`../rest/attachments/${t}/mailing`,{}).pipe(Object(mt.a)(()=>{e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(""),Object(c.a)(!1)))).subscribe()})}enableForm(t){Object.keys(this.attachment).forEach(e=>{-1===["status","typistLabel","creationDate","relation","modificationDate","modifiedBy"].indexOf(e)&&(t?this.attachment[e].enable():this.attachment[e].disable())})}getAttachmentValues(t=!1,e){const i={};return Object.keys(this.attachment).forEach(t=>{if(void 0!==this.attachment[t]&&null!=this.attachment[t].value){if("validationDate"===t){const e=this.attachment[t].value.getDate(),n=this.attachment[t].value.getMonth()+1,a=this.attachment[t].value.getFullYear();i[t]=("00"+e).slice(-2)+"-"+("00"+n).slice(-2)+"-"+a+" 23:59:59"}else"recipient"===t?(i.recipientId=this.attachment[t].value.length>0?this.attachment[t].value[0].id:null,i.recipientType=this.attachment[t].value.length>0?this.attachment[t].value[0].type:null):i[t]=this.attachment[t].value;"encodedFile"===t&&"_CURRENT_FILE"===this.attachment[t].value&&(i.encodedFile=null),"mailing"===e&&(i.inMailing=!0)}}),t&&(i.originId=null!==this.attachment.originId.value?this.attachment.originId.value:i.resId,i.relation=this.attachment.relation.value+1,delete i.resId),i}setDatasViewer(t){const e={};Object.keys(this.attachment).forEach(t=>{["title","validationDate","effectiveDate"].indexOf(t)>-1&&(e["attachment_"+t]=this.attachment[t].value)}),"setData"===t?this.appAttachmentViewer.setDatas(e):"cleanFile"===t?this.attachment.encodedFile.setValue(null):(e.resId=this.attachment.resIdMaster.value,this.appAttachmentViewer.setDatas(e))}getAttachType(t){this.appAttachmentViewer.loadTemplatesByResId(this.attachment.resIdMaster.value,t)}setNewVersion(){this.newVersion||this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.createNewVersion"),msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.newVersion=!0}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}deleteSignedVersion(){this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.deleteSignedVersion"),msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.put(`../rest/attachments/${this.attachment.resId.value}/unsign`,{})),Object(mt.a)(()=>{this.attachment.status.setValue("A_TRA"),this.attachment.signedResponse.setValue(null),(this.privilegeService.hasCurrentUserPrivilege("manage_attachments")||this.headerService.user.id===this.attachment.typist.value)&&(this.editMode=!0,this.enableForm(this.editMode)),this.notify.success(this.translate.instant("lang.signedVersionDeleted")),this.dialogRef.close("success")}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}isEmptyField(t){return null===t.value||(Array.isArray(t.value)?!(t.value.length>0):""===String(t.value))}isEditing(){return!this.functions.empty(this.appAttachmentViewer)&&this.appAttachmentViewer.isEditorLoaded()}closeModal(){this.appAttachmentViewer.isEditingTemplate()?this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.close"),msg:this.translate.instant("lang.editingDocumentMsg")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.dialogRef.close()}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe():this.dialogRef.close()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.a),n.Qb(q.b),n.Qb(q.h),n.Qb(w.a),n.Qb(D.a),n.Qb(Wt.a),n.Qb(y.a),n.Qb(Dt.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-attachment-page"]],viewQuery:function(t,e){var i;1&t&&n.Xc(Vh,!0),2&t&&n.yc(i=n.ec())&&(e.appAttachmentViewer=i.first)},features:[n.Cb([Wt.a])],decls:18,vars:14,consts:[[1,"attach-container"],["class","example-loading-shade",4,"ngIf"],["mat-dialog-title",""],["style","flex: 1;",3,"title",4,"ngIf"],["mat-icon-button","",3,"title","click"],[1,"fa","fa-times"],[1,"attach-content"],[4,"ngIf"],["class","pjList","animationDuration","0","style","height: 100%",3,"selectedIndex",4,"ngIf"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","color","primary",3,"disabled","click",4,"ngIf"],["mat-raised-button","","color","warn",3,"click",4,"ngIf"],["mat-raised-button","","mat-button","",3,"disabled","click"],[1,"example-loading-shade"],[2,"flex","1",3,"title"],[1,"attachment-form","col-md-3","col-sm-12"],["class","attachment-form-item",4,"ngIf"],[1,"attachment-form-item"],[1,"input-form"],["disabled","","matInput","",3,"placeholder","value"],[1,"fieldState"],[1,"fas","fa-asterisk","noMandatory"],[2,"width","100%",3,"label","placeholderLabel","formControlSelect","datas","afterSelected"],["class","fas fa-asterisk fieldRequired",4,"ngIf"],["class","fas fa-exclamation-triangle fieldError",4,"ngIf"],["class","fas fa-check fieldFull",4,"ngIf"],["matInput","",3,"placeholder","formControl"],["class","attachment-form-item","style","display: block;",4,"ngIf"],["matInput","","disabled","",3,"placeholder","title","value"],["matInput","",3,"placeholder","formControl","value"],[1,"input-form",2,"cursor","pointer",3,"click"],["matInput","","readonly","",2,"cursor","pointer",3,"formControl","matDatepicker","placeholder","min"],["matSuffix","",3,"for",4,"ngIf"],[3,"touchUi"],["picker",""],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click",4,"ngIf"],["class","fas fa-asterisk noMandatory",4,"ngIf"],["color","primary",3,"checked","change"],["role","alert",1,"alert-message","alert-message-danger",3,"innerHTML"],[1,"fas","fa-asterisk","fieldRequired"],[1,"fas","fa-exclamation-triangle","fieldError"],[1,"fas","fa-check","fieldFull"],[1,"attachment-form-item",2,"display","block"],["role","alert",1,"alert","alert-info",3,"innerHTML"],[2,"width","100%",3,"control","singleMode"],["matSuffix","",3,"for"],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click"],["color","warn",1,"fa","fa-calendar-times"],["animationDuration","0",1,"pjList",2,"height","100%",3,"selectedIndex"],[3,"label",4,"ngIf"],["mat-tab-label",""],[2,"display","block","height","100%","width","100%","overflow","auto",3,"editMode","resId","resIdMaster","mode","format","attachType","title","triggerEvent"],["appAttachmentViewer",""],[3,"label",4,"ngFor","ngForOf"],[3,"label"],["matTabContent",""],[2,"display","block","height","100%","width","100%","overflow","auto",3,"editMode","resId","title"],["appDocumentViewer",""],[2,"display","block","height","100%","width","100%","overflow","auto",3,"editMode","resId","mode","title"],[2,"color","green"],[2,"color","#135f7f"],[2,"display","block","height","100%","width","100%","overflow","auto",3,"editMode","resId","mode","format","title"],["mat-raised-button","","color","primary",3,"disabled","click"],["mat-raised-button","","color","warn",3,"click"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Oc(1,Rh,2,0,"div",1),n.Wb(2,"h1",2),n.Oc(3,Ah,4,7,"span",3),n.Wb(4,"button",4),n.dc("click",(function(){return e.dialogRef.close()})),n.Rb(5,"mat-icon",5),n.Vb(),n.Vb(),n.Wb(6,"mat-dialog-content",6),n.Oc(7,Zh,67,62,"ng-container",7),n.Oc(8,ru,8,11,"mat-tab-group",8),n.Vb(),n.Wb(9,"div",9),n.Oc(10,cu,3,4,"button",10),n.Oc(11,lu,3,4,"button",10),n.Oc(12,du,3,4,"button",10),n.Oc(13,hu,3,4,"button",10),n.Oc(14,uu,3,3,"button",11),n.Wb(15,"button",12),n.dc("click",(function(){return e.closeModal()})),n.Qc(16),n.ic(17,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(1),n.oc("ngIf",e.sendingData),n.Db(2),n.oc("ngIf",!e.loading),n.Db(1),n.oc("title",e.translate.instant("lang.close")),n.Db(3),n.oc("ngIf",!e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(2),n.oc("ngIf",!e.newVersion),n.Db(1),n.oc("ngIf",!e.newVersion&&e.sendMassMode&&!e.loading),n.Db(1),n.oc("ngIf",e.newVersion),n.Db(1),n.oc("ngIf",e.newVersion&&e.sendMassMode&&!e.loading),n.Db(1),n.oc("ngIf",!e.loading&&"SIGN"===e.attachment.status.value&&e.headerService.user.id==e.attachment.signatoryId.value),n.Db(1),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(17,12,"lang.close")))},directives:[P.t,q.i,k.b,S.a,q.f,q.c,V.c,Y.c,J.b,fr,X.d,X.u,X.j,gt.c,gt.g,gt.h,ae.h,ae.f,te.a,Zd,ae.j,Y.j,Te.c,Te.a,Te.d,Jr,P.s,Te.b],pipes:[g.d,Tt.p,uo,ps,Tt.u],styles:[".attach-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;height:100%}.attach-container[_ngcontent-%COMP%] .mat-tab-body-content, .attach-container[_ngcontent-%COMP%] .mat-tab-body-wrapper{height:100%!important}.attach-container[_ngcontent-%COMP%] .mat-drawer-inner-container{overflow-x:hidden}.mat-dialog-title[_ngcontent-%COMP%]{margin:0!important;display:flex;align-items:center}.attach-content[_ngcontent-%COMP%]{margin:0;padding:0!important;display:block;overflow:auto;max-height:100vh!important;height:calc(100% - 75px)}.attachment-form[_ngcontent-%COMP%]{position:-webkit-sticky;position:sticky;top:0;overflow:auto;height:100%;padding:10px}.attachment-form[_ngcontent-%COMP%] .mat-expansion-panel-body{padding:0}.attachment-form-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding-top:10px;padding-bottom:10px}.attachment-form-item[_ngcontent-%COMP%] .mat-form-field-should-float .mat-form-field-label-wrapper{margin-top:-7px}.attachment-form-item[_ngcontent-%COMP%] .mat-form-field-should-float .mat-form-field-label{background:#fff;width:auto!important;padding-top:5px;padding-left:5px;padding-right:5px}.pjList[_ngcontent-%COMP%]{flex:1}.pjList[_ngcontent-%COMP%] .mat-tab-header{position:-webkit-sticky;position:sticky;z-index:1;height:50px;background:#fff;top:0}.pjList[_ngcontent-%COMP%] .mat-tab-body-wrapper{flex:1}.pjList[_ngcontent-%COMP%] .mat-tab-body-content{display:block;height:100%!important;text-align:center;background:#135f7f;color:#fff}.example-loading-shade[_ngcontent-%COMP%]{background:hsla(0,0%,100%,.7686274509803922);z-index:2}.actions[_ngcontent-%COMP%]{margin:0}.complete[_ngcontent-%COMP%]{color:green;font-weight:700}.fieldState[_ngcontent-%COMP%]{padding-top:0!important}.stateDoc[_ngcontent-%COMP%]{position:absolute;right:20px;top:20px}.documentContent[_ngcontent-%COMP%]{display:flex;flex:1;align-items:center;justify-content:center;text-align:center;background:#135f7f;overflow:auto;color:#fff}.mat-expansion-panel[_ngcontent-%COMP%]{box-shadow:none!important}.mat-expansion-panel-header-title[_ngcontent-%COMP%]{font-size:14px;color:#666}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();function bu(t,e){if(1&t&&(n.Wb(0,"button",18),n.Wb(1,"span"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()),2&t){n.hc();const t=n.zc(20);n.oc("matMenuTriggerFor",t),n.Db(2),n.Rc(n.jc(3,2,"lang.visibleBy"))}}function fu(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",19),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().selectTemplate(i)})),n.Wb(1,"span"),n.Qc(2),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.pc("matTooltip",t.template_content),n.Db(2),n.Rc(t.template_label)}}function mu(t,e){1&t&&(n.Wb(0,"button",20),n.Wb(1,"span"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,1,"lang.noTemplate")))}function gu(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",24),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.selectEntity(a)})),n.Qc(1),n.Vb()}if(2&t){const t=e.$implicit;n.oc("disabled",t.selected)("title",t.entity_label),n.Db(1),n.Sc(" ",t.entity_label," ")}}function vu(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field",21),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.Wb(1,"input",22),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("keydown",(function(e){return n.Dc(t),e.stopPropagation()})),n.ic(2,"translate"),n.Vb(),n.Vb(),n.Ub(3),n.Oc(4,gu,2,3,"button",23),n.Tb()}if(2&t){const t=n.hc();n.Db(1),n.pc("placeholder",n.jc(2,3,"lang.searchEntities")),n.oc("formControl",t.searchTerm),n.Db(3),n.oc("ngForOf",t.entitiesList)}}function _u(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",25),n.dc("click",(function(){return n.Dc(t),n.hc().addNote()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",26),n.Vb()}if(2&t){const t=n.hc();n.pc("title",n.jc(1,2,"lang.add")),n.oc("disabled",""==t.content.trim()||t.loading)}}function yu(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",25),n.dc("click",(function(){return n.Dc(t),n.hc().updateNote()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",26),n.Vb()}if(2&t){const t=n.hc();n.pc("title",n.jc(1,2,"lang.validate")),n.oc("disabled",""==t.content.trim()||t.loading)}}function xu(t,e){1&t&&(n.Wb(0,"span",27),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.all")))}function Cu(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",29),n.dc("click",(function(){n.Dc(t);const e=n.hc(),i=e.$implicit,a=e.index,s=n.hc();return s.removeEntityRestriction(s.entitiesRestriction.indexOf(i.id),a)})),n.ic(1,"translate"),n.Rb(2,"i",30),n.Qc(3),n.Rb(4,"i",31),n.Vb()}if(2&t){const t=n.hc().$implicit;n.pc("title",n.jc(1,2,"lang.restrictedEntity")),n.Db(3),n.Sc(" ",t.entity_label,"\xa0")}}function Ou(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Cu,5,4,"span",28),n.Tb()),2&t){const t=e.$implicit,i=n.hc();n.Db(1),n.oc("ngIf",i.entitiesRestriction.indexOf(t.id)>-1)}}let Du=(()=>{class t{constructor(t,e,i,a,s,o){this.translate=t,this.http=e,this.notify=i,this.headerService=a,this.functions=s,this.latinisePipe=o,this.loading=!1,this.templatesNote=[],this.entities=[],this.entitiesRestriction=[],this.title=this.translate.instant("lang.addNote"),this.content="",this.disableRestriction=!1,this.refreshNotes=new n.o,this.searchTerm=new X.i,this.entitiesList=[]}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){yield this.getEntities(),this.defaultRestriction&&this.setDefaultRestriction(),this.upMode&&(this.content=this.noteContent,(this.content.startsWith(`[${this.translate.instant("lang.avisUserState")}]`)||this.content.startsWith(`[${this.translate.instant("lang.avisUserAsk").toUpperCase()}]`))&&(this.disableRestriction=!0),this.entitiesRestriction=this.entitiesNoteRestriction),this.entitiesList=this.entities,this.searchTerm.valueChanges.pipe(Object(pt.a)(300),Object(mt.a)(t=>{if(t.length>0){let e=this.latinisePipe.transform(t.toLowerCase());this.entitiesList=this.entities.filter(t=>this.latinisePipe.transform(t.entity_label.toLowerCase()).includes(e)||this.latinisePipe.transform(t.entity_id.toLowerCase()).includes(e))}else this.entitiesList=this.entities}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}))}setDefaultRestriction(){this.entitiesRestriction=[],this.http.get(`../rest/resources/${this.resIds[0]}/fields/destination`).pipe(Object(mt.a)(t=>{this.entitiesRestriction=this.headerService.user.entities.map(t=>t.entity_id),-1!==this.entitiesRestriction.indexOf(t.field)||this.functions.empty(t.field)||this.entitiesRestriction.push(t.field),this.entities.filter(t=>this.entitiesRestriction.indexOf(t.id)>-1).forEach(t=>{t.selected=!0})}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}addNote(){this.loading=!0,this.http.post("../rest/notes",{value:this.content,resId:this.resIds[0],entities:this.entitiesRestriction}).subscribe(t=>{this.refreshNotes.emit(this.resIds[0]),this.loading=!1})}updateNote(){this.loading=!0,this.http.put("../rest/notes/"+this.noteId,{value:this.content,resId:this.resIds[0],entities:this.entitiesRestriction}).subscribe(t=>{this.refreshNotes.emit(this.resIds[0]),this.loading=!1})}getNoteContent(){return this.content}setNoteContent(t){this.content=t}getNote(){return{content:this.content,entities:this.entitiesRestriction}}selectTemplate(t){this.content=this.content.length>0?this.content+" "+t.template_content:t.template_content}selectEntity(t){t.selected=!0,this.entitiesRestriction.push(t.id)}getTemplatesNote(){if(0==this.templatesNote.length){let t={};this.functions.empty(this.resIds)||1!=this.resIds.length||(t.resId=this.resIds[0]),this.http.get("../rest/notesTemplates",{params:t}).subscribe(t=>{this.templatesNote=t.templates})}}getEntities(){return new Promise((t,e)=>{if(0==this.entities.length){let e={};this.functions.empty(this.resIds)||1!=this.resIds.length||(e.resId=this.resIds[0]),this.http.get("../rest/entities").pipe(Object(mt.a)(e=>{this.entities=e.entities,t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()}})}removeEntityRestriction(t,e){this.entities[e].selected=!1,this.entitiesRestriction.splice(t,1)}isWritingNote(){return""!==this.content}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(_t.a),n.Qb(Tt.c))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-note-editor"]],inputs:{title:"title",content:"content",resIds:"resIds",addMode:"addMode",upMode:"upMode",noteContent:"noteContent",entitiesNoteRestriction:"entitiesNoteRestriction",noteId:"noteId",defaultRestriction:"defaultRestriction",disableRestriction:"disableRestriction"},outputs:{refreshNotes:"refreshNotes"},decls:34,vars:37,consts:[["appearance","outline",1,"noteEditorContent"],["matInput","",3,"placeholder","ngModel","ngModelChange"],["matSuffix","","color","primary","mat-icon-button","",3,"title","matMenuTriggerFor"],["fontSet","fas","fontIcon","fa-angle-right fa-2x"],["menuMain","matMenu"],["mat-menu-item","",3,"matMenuTriggerFor","menuOpened"],["mat-menu-item","",3,"matMenuTriggerFor",4,"ngIf"],["menuTemplates","matMenu"],[2,"z-index","1","position","sticky","top","0px","text-align","center","font-size","10px","color","white","background","#135F7F","padding","5px","font-weight","bold"],["mat-menu-item","","matTooltipPosition","left",3,"matTooltip","click",4,"ngFor","ngForOf"],["mat-menu-item","","disabled","",4,"ngIf"],["menuEntities","matMenu"],["matMenuContent",""],["color","primary","matSuffix","","mat-icon-button","",3,"title","disabled","click",4,"ngIf"],[2,"overflow","auto","max-height","75px"],[2,"font-size","11px","position","sticky","top","0px"],["class","label label-default noNoteRestriction",4,"ngIf"],[4,"ngFor","ngForOf"],["mat-menu-item","",3,"matMenuTriggerFor"],["mat-menu-item","","matTooltipPosition","left",3,"matTooltip","click"],["mat-menu-item","","disabled",""],["floatLabel","never","appearance","outline",1,"smallInput",2,"margin-bottom","-15px",3,"click"],["matInput","","id","searchTerm","autocomplete","off",3,"placeholder","formControl","click","keydown"],["mat-menu-item","","class","labelFolder",3,"disabled","title","click",4,"ngFor","ngForOf"],["mat-menu-item","",1,"labelFolder",3,"disabled","title","click"],["color","primary","matSuffix","","mat-icon-button","",3,"title","disabled","click"],["fontSet","far","fontIcon","fa-paper-plane fa-2x"],[1,"label","label-default","noNoteRestriction"],["class","label label-default noteRestriction",3,"title","click",4,"ngIf"],[1,"label","label-default","noteRestriction",3,"title","click"],[1,"fa","fa-sitemap"],[1,"fa","fa-times",2,"cursor","pointer"]],template:function(t,e){if(1&t&&(n.Wb(0,"mat-form-field",0),n.Wb(1,"textarea",1),n.dc("ngModelChange",(function(t){return e.content=t})),n.Vb(),n.Wb(2,"button",2),n.ic(3,"translate"),n.Rb(4,"mat-icon",3),n.Vb(),n.Wb(5,"mat-menu",null,4),n.Wb(7,"button",5),n.dc("menuOpened",(function(){return e.getTemplatesNote()})),n.Wb(8,"span"),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Oc(11,bu,4,4,"button",6),n.Vb(),n.Wb(12,"mat-menu",null,7),n.Wb(14,"div",8),n.Qc(15),n.ic(16,"translate"),n.Vb(),n.Oc(17,fu,3,2,"button",9),n.Oc(18,mu,4,3,"button",10),n.Vb(),n.Wb(19,"mat-menu",null,11),n.Wb(21,"div",8),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Oc(24,vu,5,5,"ng-template",12),n.Vb(),n.Oc(25,_u,3,4,"button",13),n.Oc(26,yu,3,4,"button",13),n.Vb(),n.Wb(27,"div",14),n.Wb(28,"div",15),n.Qc(29),n.ic(30,"translate"),n.Vb(),n.Oc(31,xu,3,3,"span",16),n.Oc(32,Ou,2,1,"ng-container",17),n.ic(33,"sortBy"),n.Vb()),2&t){const t=n.zc(6),i=n.zc(13);n.Db(1),n.pc("placeholder",e.title),n.oc("ngModel",e.content),n.Db(1),n.pc("title",n.jc(3,24,"lang.options")),n.oc("matMenuTriggerFor",t),n.Db(3),n.Fb("templateNoteListMenu"),n.Db(2),n.oc("matMenuTriggerFor",i),n.Db(2),n.Rc(n.jc(10,26,"lang.noteTemplates")),n.Db(2),n.oc("ngIf",!e.disableRestriction),n.Db(1),n.Fb("templateNoteListMenu"),n.Db(3),n.Sc(" ",n.jc(16,28,"lang.noteTemplates")," "),n.Db(2),n.oc("ngForOf",e.templatesNote),n.Db(1),n.oc("ngIf",0==e.templatesNote.length),n.Db(1),n.Fb("templateNoteListMenu fixedWidth"),n.Db(3),n.Sc(" ",n.jc(23,30,"lang.entities")," "),n.Db(3),n.oc("ngIf",e.addMode),n.Db(1),n.oc("ngIf",e.upMode),n.Db(2),n.Lc("background",e.upMode&&e.entitiesRestriction.length>0?"#FFEDCC":"white"),n.Db(1),n.Rc(n.jc(30,32,"lang.noteVisibleBy")),n.Db(2),n.oc("ngIf",0===e.entitiesRestriction.length),n.Db(1),n.oc("ngForOf",n.kc(33,34,e.entities,"entity_label"))}},directives:[Y.c,J.b,X.d,X.u,X.x,k.b,Y.j,ne.d,S.a,ne.e,ne.b,P.t,P.s,ne.a,A.b,X.j],pipes:[g.d,Wt.a],styles:[".noteEditorContent[_ngcontent-%COMP%] .mat-icon-button[_ngcontent-%COMP%]:disabled{opacity:.5}.noteEditorContent[_ngcontent-%COMP%] .mat-form-field-flex{align-items:flex-start}.noteEditorContent[_ngcontent-%COMP%] .mat-form-field-wrapper{padding-bottom:0} .templateNoteListMenu .mat-menu-content{padding-top:0;padding-bottom:0;max-height:500px} .fixedWidth .mat-menu-content{min-width:265px} .mat-tooltip{font-size:14px}.noteRestriction[_ngcontent-%COMP%]{background-color:rgba(0,0,0,.4)}.noNoteRestriction[_ngcontent-%COMP%], .noteRestriction[_ngcontent-%COMP%]{white-space:normal;display:inline-block;margin:5px!important;cursor:pointer}.noNoteRestriction[_ngcontent-%COMP%]{background-color:#135f7f}.labelFolder[_ngcontent-%COMP%]{color:#666;font-size:12px;font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}"]}),t})();const wu=["noteEditor"];function Mu(t,e){1&t&&(n.Wb(0,"div",13),n.Rb(1,"mat-spinner",14),n.Vb())}function ku(t,e){1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function Su(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function Iu(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}let Pu=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.loading=!1}ngOnInit(){}onSubmit(){this.loading=!0,0===this.data.resIds.length?this.indexDocumentAndExecuteAction():this.executeAction()}indexDocumentAndExecuteAction(){this.http.post("../rest/resources",this.data.resource).pipe(Object(mt.a)(t=>{this.data.resIds=[t.resId]}),p(()=>this.http.put(this.data.indexActionRoute,{resource:this.data.resIds[0],note:this.noteEditor.getNote()})),Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(),Object(c.a)(!1)))).subscribe()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.data.resIds,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(wu,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:24,vars:17,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,Mu,2,0,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Qc(7),n.ic(8,"translate"),n.Oc(9,ku,3,3,"b",6),n.Oc(10,Su,2,1,"b",6),n.Oc(11,Iu,3,4,"b",6),n.Qc(12," ? "),n.Vb(),n.Wb(13,"div",5),n.Rb(14,"app-note-editor",7,8),n.Vb(),n.Vb(),n.Vb(),n.Rb(16,"span",9),n.Wb(17,"div",10),n.Wb(18,"button",11),n.dc("click",(function(){return e.onSubmit()})),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"button",12),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(3),n.Sc(" ",n.jc(8,11,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(3),n.oc("resIds",e.data.resIds),n.Db(4),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(20,13,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(23,15,"lang.cancel")))},directives:[q.i,q.f,P.t,Du,q.c,k.b,q.d,V.c],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:1;overflow:hidden}"]}),t})();const Vu=["noteEditor"];function Ru(t,e){1&t&&(n.Wb(0,"div",11),n.Rb(1,"mat-spinner",12),n.Vb())}function ju(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.chrono),n.Db(1),n.Sc(" : ",t.fields," ")}}function Au(t,e){if(1&t&&(n.Wb(0,"div",15),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,ju,4,2,"li",16),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.Sc("",n.jc(3,2,"lang.cannotCloseMails")," :"),n.Db(3),n.oc("ngForOf",t.emptyMandatoryFields)}}function Wu(t,e){if(1&t&&(n.Wb(0,"div",15),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.Tc("",n.jc(3,2,"lang.cannotCloseThisMail")," : ",t.emptyMandatoryFields[0].fields,"")}}function Tu(t,e){if(1&t&&(n.Wb(0,"div",13),n.Oc(1,Au,6,4,"div",14),n.Oc(2,Wu,4,4,"div",14),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.data.resIds.length>1),n.Db(1),n.oc("ngIf",t.data.resIds.length<2)}}function Eu(t,e){1&t&&(n.Wb(0,"b",21),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function Fu(t,e){if(1&t&&(n.Wb(0,"b",21),n.Qc(1),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Rc(t.data.resource.chrono)}}function Lu(t,e){if(1&t&&(n.Wb(0,"b",21),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Tc("",t.canCloseResIds.length," ",n.jc(2,2,"lang.elements"),"")}}function Qu(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div",13),n.Qc(2),n.ic(3,"translate"),n.Oc(4,Eu,3,3,"b",17),n.Oc(5,Fu,2,1,"b",17),n.Oc(6,Lu,3,4,"b",17),n.Qc(7," ? "),n.Rb(8,"div",18),n.ic(9,"translate"),n.Vb(),n.Wb(10,"div",13),n.Rb(11,"app-note-editor",19,20),n.Vb(),n.Tb()),2&t){const t=n.hc();n.Db(2),n.Sc(" ",n.jc(3,6,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===t.data.resIds.length),n.Db(1),n.oc("ngIf",1===t.data.resIds.length),n.Db(1),n.oc("ngIf",t.data.resIds.length>1),n.Db(2),n.oc("innerHTML",n.jc(9,8,"lang.updateClosingDate"),n.Ec),n.Db(3),n.oc("resIds",t.canCloseResIds)}}let Nu=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.loading=!1,this.emptyMandatoryFields=[],this.canCloseResIds=[],this.customFields=[]}ngOnInit(){this.data.resIds.length>0?(this.loading=!0,this.checkClose()):this.checkIndexingClose()}checkIndexingClose(){this.http.get("../rest/actions/"+this.data.action.id).pipe(Object(mt.a)(t=>{this.requiredFields=this.functions.empty(t.action.parameters.requiredFields)?[]:t.action.parameters.requiredFields}),p(()=>this.http.get("../rest/customFields")),Object(mt.a)(t=>this.customFields=t.customFields),Object(mt.a)(()=>{let t=[];this.requiredFields.forEach(e=>{for(let i of Object.keys(this.data.resource.customFields))e==="indexingCustomField_"+i&&this.functions.empty(this.data.resource.customFields[i])&&t.push(this.customFields.filter(t=>t.id==i)[0].label)}),this.functions.empty(t)?this.canCloseResIds=[1]:(this.emptyMandatoryFields.push({fields:t.join(", ")}),this.canCloseResIds=[])}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}checkClose(){this.http.post(`../rest/resourcesList/users/${this.data.userId}/groups/${this.data.groupId}/baskets/${this.data.basketId}/actions/${this.data.action.id}/checkCloseWithFieldsAction`,{resources:this.data.resIds}).pipe(Object(mt.a)(t=>{this.emptyMandatoryFields=t.errors,this.canCloseResIds=t.success}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}onSubmit(){this.loading=!0,0===this.data.resIds.length?this.indexDocumentAndExecuteAction():this.executeAction()}indexDocumentAndExecuteAction(){this.http.post("../rest/resources",this.data.resource).pipe(Object(mt.a)(t=>{this.data.resIds=[t.resId]}),p(()=>this.http.put(this.data.indexActionRoute,{resource:this.data.resIds[0],note:this.noteEditor.getNote()})),Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(),Object(c.a)(!1)))).subscribe()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.canCloseResIds,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(()=>{this.dialogRef.close(this.canCloseResIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Xc(Vu,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:16,vars:12,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],["class","col-md-12",4,"ngIf"],[4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],[1,"col-md-12"],["class","alert-message alert-message-danger mailList","role","alert",4,"ngIf"],["role","alert",1,"alert-message","alert-message-danger","mailList"],[4,"ngFor","ngForOf"],["color","primary","class","highlight",4,"ngIf"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","30px",3,"innerHTML"],[3,"resIds"],["noteEditor",""],["color","primary",1,"highlight"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,Ru,2,0,"div",3),n.Wb(5,"div",4),n.Oc(6,Tu,3,2,"div",5),n.Oc(7,Qu,13,10,"ng-container",6),n.Vb(),n.Vb(),n.Rb(8,"span",7),n.Wb(9,"div",8),n.Wb(10,"button",9),n.dc("click",(function(){return e.onSubmit()})),n.Qc(11),n.ic(12,"translate"),n.Vb(),n.Wb(13,"button",10),n.Qc(14),n.ic(15,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(2),n.oc("ngIf",e.emptyMandatoryFields.length>0),n.Db(1),n.oc("ngIf",0===e.data.resIds.length||e.canCloseResIds.length>0),n.Db(3),n.oc("disabled",e.loading||0==e.canCloseResIds.length),n.Db(1),n.Rc(n.jc(12,8,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(15,10,"lang.cancel")))},directives:[q.i,q.f,P.t,q.c,k.b,q.d,V.c,P.s,Du],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}"]}),t})();const zu=["noteEditor"],Bu=["appVisaWorkflow"];function Uu(t,e){1&t&&(n.Wb(0,"div",17),n.Rb(1,"mat-spinner",18),n.Vb())}function $u(t,e){if(1&t&&(n.Wb(0,"b",19),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function Hu(t,e){if(1&t&&(n.Wb(0,"b",19),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function Gu(t,e){1&t&&(n.Rb(0,"div",20),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.rejectVisaBack"),n.Ec)}function Xu(t,e){if(1&t&&(n.Rb(0,"div",20),n.ic(1,"translate")),2&t){const t=n.hc();n.oc("innerHTML",n.jc(1,1,"lang.rejectVisaBackUser")+" <b>"+t.appVisaWorkflow.getLastVisaUser().labelToDisplay+"</b>",n.Ec)}}function qu(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function Ku(t,e){if(1&t&&(n.Wb(0,"div",21),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,qu,5,4,"li",22),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Sc(" ",n.jc(3,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.resourcesErrors)}}function Yu(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function Ju(t,e){if(1&t&&(n.Wb(0,"div",23),n.Wb(1,"ul",24),n.Oc(2,Yu,5,4,"li",22),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.oc("ngForOf",t.resourcesWarnings)}}function Zu(t,e){if(1&t&&n.Rb(0,"app-visa-workflow",25,26),2&t){const t=n.hc();n.oc("adminMode",!1)("resId",t.data.resIds[0])}}let tp=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.loading=!1,this.resourcesWarnings=[],this.resourcesErrors=[],this.noResourceToProcess=null}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.loading=!0,yield this.checkRejectVisaBackToPrevious(),this.loading=!1}))}checkRejectVisaBackToPrevious(){return this.resourcesErrors=[],this.resourcesWarnings=[],new Promise((t,e)=>{this.http.post("../rest/resourcesList/users/"+this.data.userId+"/groups/"+this.data.groupId+"/baskets/"+this.data.basketId+"/actions/"+this.data.action.id+"/checkRejectVisa",{resources:this.data.resIds}).subscribe(e=>{this.functions.empty(e.resourcesInformations.warning)||(this.resourcesWarnings=e.resourcesInformations.warning),this.functions.empty(e.resourcesInformations.error)||(this.resourcesErrors=e.resourcesInformations.error,this.noResourceToProcess=this.resourcesErrors.length===this.data.resIds.length),t(!0)},t=>{this.notify.handleSoftErrors(t),this.dialogRef.close()})})}onSubmit(){this.loading=!0,this.executeAction()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.data.resIds,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isValidAction(){return!this.noResourceToProcess}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(zu,!0),n.Xc(Bu,!0)),2&t&&(n.yc(i=n.ec())&&(e.noteEditor=i.first),n.yc(i=n.ec())&&(e.appVisaWorkflow=i.first))},decls:28,vars:21,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],["class","alert-message alert-message-info","role","alert","style","margin-top: 30px;",3,"innerHTML",4,"ngIf"],["class","alert-message alert-message-danger mailList","role","alert",4,"ngIf"],["class","alert-message alert-message-info mailList","role","alert",4,"ngIf"],[3,"adminMode","resId",4,"ngIf"],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","30px",3,"innerHTML"],["role","alert",1,"alert-message","alert-message-danger","mailList"],[4,"ngFor","ngForOf"],["role","alert",1,"alert-message","alert-message-info","mailList"],[2,"margin","0","padding-bottom","0px"],[3,"adminMode","resId"],["appVisaWorkflow",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,Uu,2,0,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Qc(7),n.ic(8,"translate"),n.Oc(9,$u,2,1,"b",6),n.Oc(10,Hu,3,4,"b",6),n.Qc(11," ? "),n.Oc(12,Gu,2,3,"div",7),n.Oc(13,Xu,2,3,"div",7),n.Oc(14,Ku,6,4,"div",8),n.Oc(15,Ju,3,1,"div",9),n.Oc(16,Zu,2,2,"app-visa-workflow",10),n.Vb(),n.Wb(17,"div",5),n.Rb(18,"app-note-editor",11,12),n.Vb(),n.Vb(),n.Vb(),n.Rb(20,"span",13),n.Wb(21,"div",14),n.Wb(22,"button",15),n.dc("click",(function(){return e.onSubmit()})),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Wb(25,"button",16),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(3),n.Sc(" ",n.jc(8,15,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",1===e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(2),n.oc("ngIf",e.data.resIds.length>1),n.Db(1),n.oc("ngIf",1==e.data.resIds.length&&void 0!==e.appVisaWorkflow&&""!==e.appVisaWorkflow.getLastVisaUser()),n.Db(1),n.oc("ngIf",e.resourcesErrors.length>0),n.Db(1),n.oc("ngIf",e.resourcesWarnings.length>0),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(2),n.oc("resIds",e.data.resIds),n.Db(4),n.oc("disabled",e.loading||!e.isValidAction()),n.Db(1),n.Rc(n.jc(24,17,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(27,19,"lang.cancel")))},directives:[q.i,q.f,P.t,Du,q.c,k.b,q.d,V.c,P.s,Ko],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}"]}),t})();const ep=["noteEditor"],ip=["appVisaWorkflow"];function np(t,e){1&t&&(n.Wb(0,"div",17),n.Rb(1,"mat-spinner",18),n.Vb())}function ap(t,e){if(1&t&&(n.Wb(0,"b",19),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function sp(t,e){if(1&t&&(n.Wb(0,"b",19),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function op(t,e){1&t&&(n.Rb(0,"div",20),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.resetVisaWorkflow"),n.Ec)}function rp(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function cp(t,e){if(1&t&&(n.Wb(0,"div",21),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,rp,5,4,"li",22),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Sc(" ",n.jc(3,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.resourcesErrors)}}function lp(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function dp(t,e){if(1&t&&(n.Wb(0,"div",23),n.Wb(1,"ul",24),n.Oc(2,lp,5,4,"li",22),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.oc("ngForOf",t.resourcesWarnings)}}function hp(t,e){if(1&t&&n.Rb(0,"app-visa-workflow",25,26),2&t){const t=n.hc();n.oc("adminMode",!1)("resId",t.data.resIds[0])}}let up=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.loading=!1,this.resourcesWarnings=[],this.resourcesErrors=[],this.noResourceToProcess=null}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.loading=!0,yield this.checkResetVisa(),this.loading=!1}))}checkResetVisa(){return this.resourcesErrors=[],this.resourcesWarnings=[],new Promise((t,e)=>{this.http.post("../rest/resourcesList/users/"+this.data.userId+"/groups/"+this.data.groupId+"/baskets/"+this.data.basketId+"/actions/"+this.data.action.id+"/checkInterruptResetVisa",{resources:this.data.resIds}).subscribe(e=>{this.functions.empty(e.resourcesInformations.warning)||(this.resourcesWarnings=e.resourcesInformations.warning),this.functions.empty(e.resourcesInformations.error)||(this.resourcesErrors=e.resourcesInformations.error,this.noResourceToProcess=this.resourcesErrors.length===this.data.resIds.length),t(!0)},t=>{this.notify.handleSoftErrors(t),this.dialogRef.close()})})}onSubmit(){this.loading=!0,this.executeAction()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.data.resIds,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isValidAction(){return!this.noResourceToProcess}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(ep,!0),n.Xc(ip,!0)),2&t&&(n.yc(i=n.ec())&&(e.noteEditor=i.first),n.yc(i=n.ec())&&(e.appVisaWorkflow=i.first))},decls:27,vars:20,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],["class","alert-message alert-message-info","role","alert","style","margin-top: 30px;",3,"innerHTML",4,"ngIf"],["class","alert-message alert-message-danger mailList","role","alert",4,"ngIf"],["class","alert-message alert-message-info mailList","role","alert",4,"ngIf"],[3,"adminMode","resId",4,"ngIf"],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","30px",3,"innerHTML"],["role","alert",1,"alert-message","alert-message-danger","mailList"],[4,"ngFor","ngForOf"],["role","alert",1,"alert-message","alert-message-info","mailList"],[2,"margin","0","padding-bottom","0px"],[3,"adminMode","resId"],["appVisaWorkflow",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,np,2,0,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Qc(7),n.ic(8,"translate"),n.Oc(9,ap,2,1,"b",6),n.Oc(10,sp,3,4,"b",6),n.Qc(11," ? "),n.Oc(12,op,2,3,"div",7),n.Oc(13,cp,6,4,"div",8),n.Oc(14,dp,3,1,"div",9),n.Oc(15,hp,2,2,"app-visa-workflow",10),n.Vb(),n.Wb(16,"div",5),n.Rb(17,"app-note-editor",11,12),n.Vb(),n.Vb(),n.Vb(),n.Rb(19,"span",13),n.Wb(20,"div",14),n.Wb(21,"button",15),n.dc("click",(function(){return e.onSubmit()})),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Wb(24,"button",16),n.Qc(25),n.ic(26,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(3),n.Sc(" ",n.jc(8,14,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",1===e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(2),n.oc("ngIf",e.data.resIds.length>0),n.Db(1),n.oc("ngIf",e.resourcesErrors.length>0),n.Db(1),n.oc("ngIf",e.resourcesWarnings.length>0),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(2),n.oc("resIds",e.data.resIds),n.Db(4),n.oc("disabled",e.loading||!e.isValidAction()),n.Db(1),n.Rc(n.jc(23,16,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(26,18,"lang.cancel")))},directives:[q.i,q.f,P.t,Du,q.c,k.b,q.d,V.c,P.s,Ko],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}"]}),t})();const pp=["noteEditor"];function bp(t,e){1&t&&(n.Wb(0,"div",17),n.Rb(1,"mat-spinner",18),n.Vb())}function fp(t,e){if(1&t&&(n.Wb(0,"b",19),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function mp(t,e){if(1&t&&(n.Wb(0,"b",19),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function gp(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function vp(t,e){if(1&t&&(n.Wb(0,"div",20),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,gp,5,4,"li",21),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Sc(" ",n.jc(3,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.resourcesErrors)}}function _p(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function yp(t,e){if(1&t&&(n.Wb(0,"div",22),n.Wb(1,"ul",23),n.Oc(2,_p,5,4,"li",21),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.oc("ngForOf",t.resourcesWarnings)}}function xp(t,e){if(1&t&&n.Rb(0,"app-visa-workflow",24,25),2&t){const t=n.hc();n.oc("adminMode",!1)("resId",t.data.resIds[0])}}let Cp=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.loading=!1,this.resourcesWarnings=[],this.resourcesErrors=[],this.noResourceToProcess=null}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.loading=!0,yield this.checkInterruptVisa(),this.loading=!1}))}checkInterruptVisa(){return this.resourcesErrors=[],this.resourcesWarnings=[],new Promise((t,e)=>{this.http.post("../rest/resourcesList/users/"+this.data.userId+"/groups/"+this.data.groupId+"/baskets/"+this.data.basketId+"/actions/"+this.data.action.id+"/checkInterruptResetVisa",{resources:this.data.resIds}).subscribe(e=>{this.functions.empty(e.resourcesInformations.warning)||(this.resourcesWarnings=e.resourcesInformations.warning),this.functions.empty(e.resourcesInformations.error)||(this.resourcesErrors=e.resourcesInformations.error,this.noResourceToProcess=this.resourcesErrors.length===this.data.resIds.length),t(!0)},t=>{this.notify.handleSoftErrors(t),this.dialogRef.close()})})}onSubmit(){this.loading=!0,this.executeAction()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.data.resIds,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isValidAction(){return!this.noResourceToProcess}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(pp,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:28,vars:22,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","30px",3,"innerHTML"],["class","alert-message alert-message-danger mailList","role","alert",4,"ngIf"],["class","alert-message alert-message-info mailList","role","alert",4,"ngIf"],[3,"adminMode","resId",4,"ngIf"],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"],["role","alert",1,"alert-message","alert-message-danger","mailList"],[4,"ngFor","ngForOf"],["role","alert",1,"alert-message","alert-message-info","mailList"],[2,"margin","0","padding-bottom","0px"],[3,"adminMode","resId"],["appVisaWorkflow",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,bp,2,0,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Qc(7),n.ic(8,"translate"),n.Oc(9,fp,2,1,"b",6),n.Oc(10,mp,3,4,"b",6),n.Qc(11," ? "),n.Rb(12,"div",7),n.ic(13,"translate"),n.Oc(14,vp,6,4,"div",8),n.Oc(15,yp,3,1,"div",9),n.Oc(16,xp,2,2,"app-visa-workflow",10),n.Vb(),n.Wb(17,"div",5),n.Rb(18,"app-note-editor",11,12),n.Vb(),n.Vb(),n.Vb(),n.Rb(20,"span",13),n.Wb(21,"div",14),n.Wb(22,"button",15),n.dc("click",(function(){return e.onSubmit()})),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Wb(25,"button",16),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(3),n.Sc(" ",n.jc(8,14,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",1===e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(2),n.oc("innerHTML",n.jc(13,16,"lang.interruptVisaWorkflow"),n.Ec),n.Db(2),n.oc("ngIf",e.resourcesErrors.length>0),n.Db(1),n.oc("ngIf",e.resourcesWarnings.length>0),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(2),n.oc("resIds",e.data.resIds),n.Db(4),n.oc("disabled",e.loading||!e.isValidAction()),n.Db(1),n.Rc(n.jc(24,18,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(27,20,"lang.cancel")))},directives:[q.i,q.f,P.t,Du,q.c,k.b,q.d,V.c,P.s,Ko],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}"]}),t})();const Op=["noteEditor"];function Dp(t,e){1&t&&(n.Wb(0,"div",14),n.Rb(1,"mat-spinner",15),n.Vb())}function wp(t,e){1&t&&(n.Wb(0,"b",16),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function Mp(t,e){if(1&t&&(n.Wb(0,"b",16),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function kp(t,e){if(1&t&&(n.Wb(0,"b",16),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}let Sp=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.loading=!1}ngOnInit(){}onSubmit(){this.loading=!0,0===this.data.resIds.length?this.indexDocumentAndExecuteAction():this.executeAction()}indexDocumentAndExecuteAction(){this.http.post("../rest/resources",this.data.resource).pipe(Object(mt.a)(t=>{this.data.resIds=[t.resId]}),p(()=>this.http.put(this.data.indexActionRoute,{resource:this.data.resIds[0],note:this.noteEditor.getNote()})),Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(),Object(c.a)(!1)))).subscribe()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.data.resIds,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(Op,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:28,vars:23,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","30px",3,"innerHTML"],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,Dp,2,0,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Qc(7),n.ic(8,"translate"),n.Oc(9,wp,3,3,"b",6),n.Oc(10,Mp,2,1,"b",6),n.Oc(11,kp,3,4,"b",6),n.Qc(12," ? "),n.Rb(13,"div",7),n.ic(14,"translate"),n.Rb(15,"div",7),n.ic(16,"translate"),n.Vb(),n.Wb(17,"div",5),n.Rb(18,"app-note-editor",8,9),n.Vb(),n.Vb(),n.Vb(),n.Rb(20,"span",10),n.Wb(21,"div",11),n.Wb(22,"button",12),n.dc("click",(function(){return e.onSubmit()})),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Wb(25,"button",13),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(3),n.Sc(" ",n.jc(8,13,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1===e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(2),n.oc("innerHTML",n.jc(14,15,"lang.updateClosingDate"),n.Ec),n.Db(2),n.oc("innerHTML",n.jc(16,17,"lang.openIndexation"),n.Ec),n.Db(3),n.oc("resIds",e.data.selectedRes),n.Db(4),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(24,19,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(27,21,"lang.cancel")))},directives:[q.i,q.f,P.t,Du,q.c,k.b,q.d,V.c],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}"]}),t})();const Ip=["noteEditor"];function Pp(t,e){1&t&&(n.Wb(0,"div",19),n.Rb(1,"mat-spinner",20),n.Vb())}function Vp(t,e){1&t&&(n.Wb(0,"b",21),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function Rp(t,e){if(1&t&&(n.Wb(0,"b",21),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function jp(t,e){if(1&t&&(n.Wb(0,"b",21),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}let Ap=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.loading=!1,this.acknowledgementSendDate=new Date,this.acknowledgementSendDateEnd=new Date}ngOnInit(){}onSubmit(){this.loading=!0,this.data.resIds.length>0&&this.executeAction()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.data.resIds,note:this.noteEditor.getNote(),data:{send_date:(this.acknowledgementSendDate.getTime()/1e3).toString()}}).pipe(Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(Ip,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:33,vars:28,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","30px",3,"innerHTML"],[1,"col-sm-6",2,"padding-top","10px"],["matInput","",3,"ngModel","max","matDatepicker","placeholder","ngModelChange","focus"],["matSuffix","",3,"for"],[3,"startAt"],["pickerStart",""],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"]],template:function(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,Pp,2,0,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Qc(7),n.ic(8,"translate"),n.Oc(9,Vp,3,3,"b",6),n.Oc(10,Rp,2,1,"b",6),n.Oc(11,jp,3,4,"b",6),n.Qc(12," ? "),n.Rb(13,"div",7),n.ic(14,"translate"),n.Wb(15,"div",8),n.Wb(16,"mat-form-field"),n.Wb(17,"input",9),n.dc("ngModelChange",(function(t){return e.acknowledgementSendDate=t}))("focus",(function(){return n.Dc(t),n.zc(21).open()})),n.ic(18,"translate"),n.Vb(),n.Rb(19,"mat-datepicker-toggle",10),n.Rb(20,"mat-datepicker",11,12),n.Vb(),n.Vb(),n.Vb(),n.Wb(22,"div",5),n.Rb(23,"app-note-editor",13,14),n.Vb(),n.Vb(),n.Vb(),n.Rb(25,"span",15),n.Wb(26,"div",16),n.Wb(27,"button",17),n.dc("click",(function(){return e.onSubmit()})),n.Qc(28),n.ic(29,"translate"),n.Vb(),n.Wb(30,"button",18),n.Qc(31),n.ic(32,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(21);n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(3),n.Sc(" ",n.jc(8,18,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(2),n.oc("innerHTML",n.jc(14,20,"lang.updateAcknowledgementSendDate"),n.Ec),n.Db(4),n.pc("placeholder",n.jc(18,22,"lang.acknowledgementSendDate")),n.oc("ngModel",e.acknowledgementSendDate)("max",e.acknowledgementSendDateEnd)("matDatepicker",t),n.Db(2),n.oc("for",t),n.Db(1),n.oc("startAt",e.acknowledgementSendDate),n.Db(3),n.oc("resIds",e.data.resIds),n.Db(4),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(29,24,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(32,26,"lang.cancel"))}},directives:[q.i,q.f,P.t,Y.c,J.b,X.d,ae.h,X.u,X.x,ae.j,Y.j,ae.f,Du,q.c,k.b,q.d,V.c],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}"]}),t})();const Wp=["noteEditor"];function Tp(t,e){1&t&&(n.Wb(0,"div",14),n.Rb(1,"mat-spinner",15),n.Vb())}function Ep(t,e){1&t&&(n.Wb(0,"b",17),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function Fp(t,e){if(1&t&&(n.Wb(0,"b",17),n.Qc(1),n.Vb()),2&t){const t=n.hc(3);n.Db(1),n.Rc(t.data.resource.chrono)}}function Lp(t,e){if(1&t&&(n.Wb(0,"b",17),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(3);n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function Qp(t,e){if(1&t&&(n.Wb(0,"p"),n.Qc(1),n.ic(2,"translate"),n.Oc(3,Ep,3,3,"b",16),n.Oc(4,Fp,2,1,"b",16),n.Oc(5,Lp,3,4,"b",16),n.Qc(6," ? "),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Sc(" ",n.jc(2,4,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===t.data.resIds.length),n.Db(1),n.oc("ngIf",1==t.data.resIds.length),n.Db(1),n.oc("ngIf",t.data.resIds.length>1)}}function Np(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div"),n.Wb(1,"mat-slide-toggle",18),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).manualAR=e}))("change",(function(e){return n.Dc(t),n.hc(2).toggleArManual(e.checked)})),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.oc("ngModel",t.manualAR),n.Db(1),n.Sc(" ",n.jc(3,2,"lang.editAcknowledgementReceipt"),"")}}function zp(t,e){if(1&t){const t=n.Xb();n.Wb(0,"plugin-select-search",26),n.dc("afterSelected",(function(e){return n.Dc(t),n.hc(3).mergeEmailTemplate(e)})),n.ic(1,"translate"),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(3);n.oc("label",n.jc(1,4,"lang.emailModel"))("placeholderLabel",n.jc(2,6,"lang.emailModel"))("datas",t.availableEmailModels)("formControlSelect",t.templateEmailListForm)}}function Bp(t,e){if(1&t){const t=n.Xb();n.Wb(0,"plugin-select-search",26,27),n.dc("afterSelected",(function(e){return n.Dc(t),n.hc(3).mergeSignEmailTemplate(e)})),n.ic(2,"translate"),n.ic(3,"translate"),n.Vb()}if(2&t){const t=n.hc(3);n.oc("label",n.jc(2,4,"lang.emailSignatures"))("placeholderLabel",n.jc(3,6,"lang.emailSignatures"))("datas",t.availableSignEmailModels)("formControlSelect",t.emailSignListForm)}}function Up(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div"),n.Wb(1,"mat-form-field",19),n.Wb(2,"span",20),n.Wb(3,"span",21),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Qc(6,"[AR]\xa0"),n.Vb(),n.Wb(7,"input",22),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).emailsubject=e})),n.Vb(),n.Vb(),n.Wb(8,"div",23),n.Oc(9,zp,3,8,"plugin-select-search",24),n.Oc(10,Bp,4,8,"plugin-select-search",24),n.Vb(),n.Wb(11,"textarea",25),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).emailContent=e})),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(4),n.Sc("",n.jc(5,5,"lang.object"),"\xa0:\xa0"),n.Db(3),n.oc("ngModel",t.emailsubject),n.Db(2),n.oc("ngIf",t.availableEmailModels.length>0),n.Db(1),n.oc("ngIf",t.availableSignEmailModels.length>0),n.Db(1),n.oc("ngModel",t.emailContent)}}function $p(t,e){if(1&t&&(n.Wb(0,"li"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.alt_identifier," ")}}function Hp(t,e){if(1&t&&(n.Wb(0,"div"),n.Wb(1,"div",28),n.Wb(2,"p"),n.Wb(3,"b"),n.Qc(4),n.Vb(),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Wb(7,"ul"),n.Oc(8,$p,2,1,"li",29),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(4),n.Rc(t.acknowledgement.alreadySend.number),n.Db(1),n.Sc(" ",n.jc(6,3,"lang.arAlreadySend")," : "),n.Db(3),n.oc("ngForOf",t.acknowledgement.alreadySend.list)}}function Gp(t,e){if(1&t&&(n.Wb(0,"li"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.alt_identifier," ")}}function Xp(t,e){if(1&t&&(n.Wb(0,"div"),n.Wb(1,"div",28),n.Wb(2,"p"),n.Wb(3,"b"),n.Qc(4),n.Vb(),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Wb(7,"ul"),n.Oc(8,Gp,2,1,"li",29),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(4),n.Rc(t.acknowledgement.alreadyGenerated.number),n.Db(1),n.Sc(" ",n.jc(6,3,"lang.arAlreadyGenerated")," : "),n.Db(3),n.oc("ngForOf",t.acknowledgement.alreadyGenerated.list)}}function qp(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Qc(4),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(null!=t.alt_identifier?t.alt_identifier:n.jc(3,2,"lang.undefined")),n.Db(2),n.Sc(" : ",t.info," ")}}function Kp(t,e){if(1&t&&(n.Wb(0,"div"),n.Wb(1,"div",28),n.Wb(2,"p"),n.Wb(3,"b"),n.Qc(4),n.Vb(),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Wb(7,"ul"),n.Oc(8,qp,5,4,"li",29),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(4),n.Rc(t.acknowledgement.noSendAR.number),n.Db(1),n.Sc(" ",n.jc(6,3,"lang.canNotSendAr")," :"),n.Db(3),n.oc("ngForOf",t.acknowledgement.noSendAR.list)}}function Yp(t,e){if(1&t&&(n.Wb(0,"div"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=n.hc(3);n.Db(2),n.Rc(t.acknowledgement.sendEmail),n.Db(1),n.Sc(" ",n.jc(4,2,"lang.readyToSendElectronicAr")," ")}}function Jp(t,e){if(1&t&&(n.Wb(0,"div"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=n.hc(3);n.Db(2),n.Rc(t.acknowledgement.sendPaper),n.Db(1),n.Sc(" ",n.jc(4,2,"lang.readyToGeneratePaperAr")," ")}}function Zp(t,e){if(1&t&&(n.Wb(0,"div",30),n.Oc(1,Yp,5,4,"div",11),n.Oc(2,Jp,5,4,"div",11),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("ngIf",t.acknowledgement.sendEmail),n.Db(1),n.oc("ngIf",t.acknowledgement.sendPaper)}}function tb(t,e){if(1&t&&(n.Wb(0,"div",10),n.Rb(1,"app-note-editor",31,32),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("resIds",t.data.resIds)}}function eb(t,e){if(1&t&&(n.Wb(0,"div",7),n.Oc(1,Tp,2,0,"div",8),n.Wb(2,"div",9),n.Wb(3,"div",10),n.Oc(4,Qp,7,6,"p",11),n.Oc(5,Np,4,4,"div",11),n.Oc(6,Up,12,7,"div",11),n.Oc(7,Hp,9,5,"div",11),n.Oc(8,Xp,9,5,"div",11),n.Oc(9,Kp,9,5,"div",11),n.Oc(10,Zp,3,2,"div",12),n.Vb(),n.Oc(11,tb,3,1,"div",13),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.loading),n.Db(3),n.oc("ngIf","both"==t.arMode||t.acknowledgement.sendEmail||t.acknowledgement.sendPaper),n.Db(1),n.oc("ngIf","both"==t.arMode),n.Db(1),n.oc("ngIf",t.manualAR&&t.realResSelected.length>0),n.Db(1),n.oc("ngIf",t.acknowledgement.alreadySend.number),n.Db(1),n.oc("ngIf",t.acknowledgement.alreadyGenerated.number),n.Db(1),n.oc("ngIf",t.acknowledgement.noSendAR.number),n.Db(1),n.oc("ngIf",t.acknowledgement.sendEmail||t.acknowledgement.sendPaper),n.Db(1),n.oc("ngIf",t.acknowledgement.sendEmail||t.acknowledgement.sendPaper)}}let ib=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.functions=a,this.data=s,this.loading=!1,this.loadingInit=!1,this.emailsubject="",this.emailContent="",this.availableEmailModels=[],this.availableSignEmailModels=[],this.emailSignListForm=new X.i,this.templateEmailListForm=new X.i,this.acknowledgement={alReadyGenerated:{},alReadySend:{},noSendAR:{},sendEmail:0,sendPaper:0,sendList:[]},this.realResSelected=[],this.currentMode="",this.manualAR=!1,this.arMode="auto"}ngOnInit(){this.loadingInit=!0,this.checkAcknowledgementReceipt()}checkAcknowledgementReceipt(){this.http.post("../rest/resourcesList/users/"+this.data.userId+"/groups/"+this.data.groupId+"/baskets/"+this.data.basketId+"/actions/"+this.data.action.id+"/checkAcknowledgementReceipt?"+this.currentMode,{resources:this.data.resIds}).subscribe(t=>{this.acknowledgement=t,this.realResSelected=t.sendList,this.loadingInit=!1,this.arMode=t.mode,this.arModeInit(this.arMode)},t=>{this.notify.error(t.error.errors),this.dialogRef.close(),this.loadingInit=!1})}arModeInit(t){"manual"===t&&this.toggleArManual(!0)}onSubmit(){this.loading=!0,this.data.resIds.length>0&&this.executeAction()}ngOnDestroy(){tinymce.remove()}executeAction(){let t=null;if(this.manualAR){if(this.functions.empty(tinymce.get("emailSignature").getContent()))return this.notify.error(this.translate.instant("lang.arContentIsEmpty")),this.loading=!1,!1;t={subject:this.emailsubject,content:tinymce.get("emailSignature").getContent(),manual:!0}}this.http.put(this.data.processActionRoute,{resources:this.realResSelected,note:this.noteEditor.getNote(),data:t}).pipe(Object(mt.a)(t=>{t&&null!=t.data&&this.downloadAcknowledgementReceipt(t.data),t&&null!=t.errors&&this.notify.error(t.errors),this.dialogRef.close(this.realResSelected)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}downloadAcknowledgementReceipt(t){this.loadingExport=!0,this.http.post("../rest/acknowledgementReceipts",{resources:t},{responseType:"blob"}).subscribe(t=>{let e,i,n,a,s=document.createElement("a");s.href=window.URL.createObjectURL(t),e=new Date,i=e.getDate(),n=e.getMonth()+1,a=e.getFullYear(),i<10&&(i="0"+i),n<10&&(n="0"+n),e=i+"-"+n+"-"+a,s.setAttribute("download","acknowledgement_receipt_maarch_"+e+".pdf"),document.body.appendChild(s),s.click(),this.loadingExport=!1},t=>{this.notify.handleErrors(t)})}toggleArManual(t){t?(this.currentMode="mode=manual",this.checkAcknowledgementReceipt(),this.manualAR=!0,1===this.data.resIds.length&&(this.emailsubject=this.data.resource.subject,this.emailsubject=this.emailsubject.substring(0,100)),this.initEmailModelsList(),this.initSignEmailModelsList(),setTimeout(()=>{this.initMce()},800)):(this.currentMode="mode=auto",this.checkAcknowledgementReceipt(),tinymce.remove(),this.manualAR=!1)}initMce(){tinymce.init({selector:"textarea#emailSignature",base_url:"../node_modules/tinymce/",readonly:!1,suffix:".min",language:this.translate.instant("lang.langISO").replace("-","_"),language_url:`../node_modules/tinymce-i18n/langs/${this.translate.instant("lang.langISO").replace("-","_")}.js`,menubar:!1,statusbar:!1,plugins:["autolink","autoresize"],external_plugins:{maarch_b64image:"../../src/frontend/plugins/tinymce/maarch_b64image/plugin.min.js"},toolbar_sticky:!0,toolbar_drawer:"floating",toolbar:"undo redo | fontselect fontsizeselect | bold italic underline strikethrough forecolor | maarch_b64image | alignleft aligncenter alignright alignjustify bullist numlist outdent indent | removeformat"})}mergeEmailTemplate(t){this.templateEmailListForm.reset(),this.http.post(`../rest/templates/${t}/mergeEmail`,{data:{resId:this.data.resIds[0]}}).pipe(Object(mt.a)(t=>{var e=document.createElement("div");if(e.innerHTML=tinymce.get("emailSignature").getContent(),e.getElementsByClassName("signature").length>0){const i=e.getElementsByClassName("signature")[0].innerHTML;e.getElementsByClassName("signature")[0].remove(),tinymce.get("emailSignature").setContent(`${e.innerHTML}${t.mergedDocument}<div class="signature">${i}</div>`)}else tinymce.get("emailSignature").setContent(`${tinymce.get("emailSignature").getContent()}${t.mergedDocument}`)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}mergeSignEmailTemplate(t){this.emailSignListForm.reset(),this.http.get("../rest/currentUser/emailSignatures/"+t).pipe(Object(mt.a)(t=>{var e=document.createElement("div");e.innerHTML=tinymce.get("emailSignature").getContent(),e.getElementsByClassName("signature").length>0?(e.getElementsByClassName("signature")[0].remove(),tinymce.get("emailSignature").setContent(`${e.innerHTML}<div class="signature">${t.emailSignature.content}</div>`)):tinymce.get("emailSignature").setContent(`${tinymce.get("emailSignature").getContent()}<div class="signature">${t.emailSignature.content}</div>`)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}initEmailModelsList(){0===this.availableEmailModels.length&&1===this.data.resIds.length&&this.http.get(`../rest/resources/${this.data.resIds[0]}/emailTemplates`).pipe(Object(mt.a)(t=>{this.availableEmailModels=t.templates}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}initSignEmailModelsList(){0===this.availableSignEmailModels.length&&1===this.data.resIds.length&&this.http.get("../rest/currentUser/emailSignatures").pipe(Object(mt.a)(t=>{this.availableSignEmailModels=t.emailSignatures}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(_t.a),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Xc(Wp,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:12,vars:10,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content","",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[1,"col-md-12"],[4,"ngIf"],["class","alert-message alert-message-success acknowledgementList","role","alert","style","padding: 10px;",4,"ngIf"],["class","col-md-12",4,"ngIf"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary","class","highlight",4,"ngIf"],["color","primary",1,"highlight"],["color","primary",3,"ngModel","ngModelChange","change"],["floatLabel","never"],["matPrefix",""],[1,"attachLabel"],["matInput","","maxlength","100",3,"ngModel","ngModelChange"],[1,"models"],[3,"label","placeholderLabel","datas","formControlSelect","afterSelected",4,"ngIf"],["name","emailSignature","id","emailSignature",2,"padding-top","10px",3,"ngModel","ngModelChange"],[3,"label","placeholderLabel","datas","formControlSelect","afterSelected"],["templateList",""],["role","alert",1,"alert-message","alert-message-info","acknowledgementList"],[4,"ngFor","ngForOf"],["role","alert",1,"alert-message","alert-message-success","acknowledgementList",2,"padding","10px"],[3,"resIds"],["noteEditor",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Oc(3,eb,12,9,"div",2),n.Rb(4,"span",3),n.Wb(5,"div",4),n.Wb(6,"button",5),n.dc("click",(function(){return e.onSubmit()})),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Wb(9,"button",6),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(1),n.oc("ngIf",!e.loadingInit),n.Db(3),n.oc("disabled",e.loading||!e.acknowledgement.sendEmail&&!e.acknowledgement.sendPaper),n.Db(1),n.Rc(n.jc(8,6,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(11,8,"lang.cancel")))},directives:[q.i,P.t,q.c,k.b,q.d,q.f,V.c,te.a,X.u,X.x,Y.c,Y.i,J.b,X.d,X.p,fr,P.s,Du],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:1;overflow:hidden}.acknowledgementList[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{font-size:12px;max-height:100px;overflow:auto;padding-left:25px;padding-right:5px;padding-bottom:10px;margin-top:10px}.acknowledgementList[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;text-decoration:underline}.acknowledgementList[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{font-size:120%}.models[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;grid-gap:20px;padding-top:10px;margin-bottom:10px}.attachLabel[_ngcontent-%COMP%]{color:#135f7f}"]}),t})();const nb=["noteEditor"];function ab(t,e){1&t&&(n.Wb(0,"div",14),n.Rb(1,"mat-spinner",15),n.Vb())}function sb(t,e){1&t&&(n.Wb(0,"b",16),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function ob(t,e){if(1&t&&(n.Wb(0,"b",16),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function rb(t,e){if(1&t&&(n.Wb(0,"b",16),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}let cb=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.loading=!1}ngOnInit(){}onSubmit(){this.loading=!0,this.data.resIds.length>0&&this.executeAction()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.data.resIds,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(nb,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:26,vars:20,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","30px",3,"innerHTML"],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,ab,2,0,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Qc(7),n.ic(8,"translate"),n.Oc(9,sb,3,3,"b",6),n.Oc(10,ob,2,1,"b",6),n.Oc(11,rb,3,4,"b",6),n.Qc(12," ? "),n.Rb(13,"div",7),n.ic(14,"translate"),n.Vb(),n.Wb(15,"div",5),n.Rb(16,"app-note-editor",8,9),n.Vb(),n.Vb(),n.Vb(),n.Rb(18,"span",10),n.Wb(19,"div",11),n.Wb(20,"button",12),n.dc("click",(function(){return e.onSubmit()})),n.Qc(21),n.ic(22,"translate"),n.Vb(),n.Wb(23,"button",13),n.Qc(24),n.ic(25,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(3),n.Sc(" ",n.jc(8,12,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(2),n.oc("innerHTML",n.jc(14,14,"lang.updateDepartureDate"),n.Ec),n.Db(3),n.oc("resIds",e.data.resIds),n.Db(4),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(22,16,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(25,18,"lang.cancel")))},directives:[q.i,q.f,P.t,Du,q.c,k.b,q.d,V.c],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}"]}),t})();const lb=["noteEditor"];function db(t,e){1&t&&(n.Wb(0,"div",13),n.Rb(1,"mat-spinner",14),n.Vb())}function hb(t,e){1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function ub(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function pb(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}let bb=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.loading=!1}ngOnInit(){}onSubmit(){this.loading=!0,this.data.resIds.length>0&&this.executeAction()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.data.resIds,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(lb,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:24,vars:17,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,db,2,0,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Qc(7),n.ic(8,"translate"),n.Oc(9,hb,3,3,"b",6),n.Oc(10,ub,2,1,"b",6),n.Oc(11,pb,3,4,"b",6),n.Qc(12," ? "),n.Vb(),n.Wb(13,"div",5),n.Rb(14,"app-note-editor",7,8),n.Vb(),n.Vb(),n.Vb(),n.Rb(16,"span",9),n.Wb(17,"div",10),n.Wb(18,"button",11),n.dc("click",(function(){return e.onSubmit()})),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"button",12),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(3),n.Sc(" ",n.jc(8,11,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(3),n.oc("resIds",e.data.resIds),n.Db(4),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(20,13,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(23,15,"lang.cancel")))},directives:[q.i,q.f,P.t,Du,q.c,k.b,q.d,V.c],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:1;overflow:hidden}"]}),t})();const fb=["noteEditor"];function mb(t,e){1&t&&(n.Wb(0,"div",13),n.Rb(1,"mat-spinner",14),n.Vb())}function gb(t,e){1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function vb(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function _b(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}let yb=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.loading=!1}ngOnInit(){}onSubmit(){this.loading=!0,this.data.resIds.length>0&&this.executeAction()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.data.resIds,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(fb,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:24,vars:17,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,mb,2,0,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Qc(7),n.ic(8,"translate"),n.Oc(9,gb,3,3,"b",6),n.Oc(10,vb,2,1,"b",6),n.Oc(11,_b,3,4,"b",6),n.Qc(12," ? "),n.Vb(),n.Wb(13,"div",5),n.Rb(14,"app-note-editor",7,8),n.Vb(),n.Vb(),n.Vb(),n.Rb(16,"span",9),n.Wb(17,"div",10),n.Wb(18,"button",11),n.dc("click",(function(){return e.onSubmit()})),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"button",12),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(3),n.Sc(" ",n.jc(8,11,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(3),n.oc("resIds",e.data.resIds),n.Db(4),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(20,13,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(23,15,"lang.cancel")))},directives:[q.i,q.f,P.t,Du,q.c,k.b,q.d,V.c],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:1;overflow:hidden}"]}),t})();const xb=["noteEditor"];function Cb(t,e){1&t&&(n.Wb(0,"div",13),n.Rb(1,"mat-spinner",14),n.Vb())}function Ob(t,e){1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function Db(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function wb(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}let Mb=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.loading=!1}ngOnInit(){}onSubmit(){this.loading=!0,this.data.resIds.length>0&&this.executeAction()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.data.resIds,data:{basketId:this.data.basketId},note:this.noteEditor.getNote()}).pipe(Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(xb,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:24,vars:17,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,Cb,2,0,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Qc(7),n.ic(8,"translate"),n.Oc(9,Ob,3,3,"b",6),n.Oc(10,Db,2,1,"b",6),n.Oc(11,wb,3,4,"b",6),n.Qc(12," ? "),n.Vb(),n.Wb(13,"div",5),n.Rb(14,"app-note-editor",7,8),n.Vb(),n.Vb(),n.Vb(),n.Rb(16,"span",9),n.Wb(17,"div",10),n.Wb(18,"button",11),n.dc("click",(function(){return e.onSubmit()})),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"button",12),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(3),n.Sc(" ",n.jc(8,11,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(3),n.oc("resIds",e.data.resIds),n.Db(4),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(20,13,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(23,15,"lang.cancel")))},directives:[q.i,q.f,P.t,Du,q.c,k.b,q.d,V.c],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:1;overflow:hidden}"]}),t})(),kb=(()=>{class t{constructor(t,e){this.translate=t,this.data=e}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:10,vars:7,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-icon-button","",3,"title","mat-dialog-close"],[1,"fa","fa-times-circle","fa-2x"],["mat-dialog-content","",2,"min-height","200px"],[2,"display","block","height","100%","width","100%","overflow","auto",3,"editMode","resId","title"],["appDocumentViewer",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Wb(2,"span"),n.Qc(3),n.Vb(),n.Wb(4,"button",2),n.ic(5,"translate"),n.Rb(6,"mat-icon",3),n.Vb(),n.Vb(),n.Wb(7,"div",4),n.Rb(8,"app-document-viewer",5,6),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Sc(" ",e.data.resource.chrono," "),n.Db(1),n.pc("title",n.jc(5,5,"lang.close")),n.Db(4),n.oc("editMode",!1)("resId",e.data.resource.resId)("title",e.data.resource.chrono+" - "+e.data.resource.subject))},directives:[q.i,k.b,q.d,S.a,q.f,Jr],pipes:[g.d],styles:[""]}),t})(),Sb=(()=>{class t{constructor(t,e,i){this.translate=t,this.http=e,this.notify=i,this.loading=!1,this.currentAccount=null,this.usersWorkflowList=[],this.injectDatasParam={resId:0,editable:!0}}ngOnInit(){}isValidParaph(){return 0!==this.additionalsInfos.attachments.length}getRessources(){return this.additionalsInfos.attachments.map(t=>t.res_id)}getDatas(){return this.externalSignatoryBookDatas}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-i-paraph"]],inputs:{additionalsInfos:"additionalsInfos",externalSignatoryBookDatas:"externalSignatoryBookDatas"},decls:6,vars:3,consts:[[1,"col-md-12"],["role","alert",1,"alert-message","alert-message-info"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"div"),n.Wb(2,"div",1),n.Wb(3,"p"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(4),n.Rc(n.jc(5,1,"lang.sentToIParapheur")))},pipes:[g.d],styles:[".alert-message[_ngcontent-%COMP%]{margin:0}"]}),t})();function Ib(t,e){1&t&&(n.Wb(0,"div"),n.Wb(1,"div",4),n.Wb(2,"p"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Rc(n.jc(4,1,"lang.noIxbusNature")))}function Pb(t,e){1&t&&(n.Wb(0,"div"),n.Wb(1,"div",4),n.Wb(2,"p"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Rc(n.jc(4,1,"lang.noWorkflowIxbus")))}function Vb(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Ib,5,3,"div",3),n.Oc(2,Pb,5,3,"div",3),n.Tb()),2&t){const t=n.hc(2);n.Db(1),n.oc("ngIf",0==t.natures.length),n.Db(1),n.oc("ngIf",0==t.messagesModel.length)}}function Rb(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"div",5),n.Wb(2,"div",6),n.Wb(3,"plugin-select-search",7),n.dc("afterSelected",(function(){n.Dc(t);const e=n.hc(2);return e.ixbusDatas.nature=e.selectNature.value})),n.ic(4,"translate"),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(6,"div",5),n.Wb(7,"div",6),n.Wb(8,"plugin-select-search",7),n.dc("afterSelected",(function(){n.Dc(t);const e=n.hc(2);return e.ixbusDatas.messageModel=e.selectWorkflow.value})),n.ic(9,"translate"),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(11,"div",8),n.Wb(12,"div",6),n.Wb(13,"mat-form-field"),n.Wb(14,"input",9),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).ixbusDatas.login=e})),n.ic(15,"translate"),n.ic(16,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(17,"div",8),n.Wb(18,"div",6),n.Wb(19,"mat-form-field"),n.Wb(20,"input",10),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).ixbusDatas.password=e})),n.ic(21,"translate"),n.ic(22,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(23,"mat-radio-group",11),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).ixbusDatas.signatureMode=e})),n.Wb(24,"mat-radio-button",12),n.Qc(25),n.ic(26,"translate"),n.Vb(),n.Wb(27,"mat-radio-button",13),n.Qc(28),n.ic(29,"translate"),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=n.hc(2);n.Db(3),n.Fb(""),n.oc("showLabel",!0)("label",n.jc(4,25,"lang.natureIxbusParapheur"))("placeholderLabel",n.jc(5,27,"lang.natureIxbusParapheur"))("formControlSelect",t.selectNature)("datas",t.natures)("required",!0),n.Db(5),n.Fb(""),n.oc("showLabel",!0)("label",n.jc(9,29,"lang.workflowModelIxbus"))("placeholderLabel",n.jc(10,31,"lang.workflowModelIxbus"))("formControlSelect",t.selectWorkflow)("datas",t.messagesModel)("required",!0),n.Db(6),n.pc("title",n.jc(15,33,"lang.loginIxbus")),n.pc("placeholder",n.jc(16,35,"lang.loginIxbus")),n.oc("ngModel",t.ixbusDatas.login),n.Db(6),n.pc("title",n.jc(21,37,"lang.passwordIxbus")),n.pc("placeholder",n.jc(22,39,"lang.passwordIxbus")),n.oc("ngModel",t.ixbusDatas.password),n.Db(3),n.oc("ngModel",t.ixbusDatas.signatureMode),n.Db(2),n.Sc(" ",n.jc(26,41,"lang.handwrittenSignature")," "),n.Db(3),n.Sc(" ",n.jc(29,43,"lang.electronicSignature")," ")}}function jb(t,e){if(1&t&&(n.Wb(0,"div",1),n.Wb(1,"div"),n.Wb(2,"div",2),n.Wb(3,"p"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Oc(6,Vb,3,2,"ng-container",3),n.Oc(7,Rb,30,45,"ng-container",3),n.Vb()),2&t){const t=n.hc();n.Db(4),n.Rc(n.jc(5,3,"lang.sentToIxbusParapheur")),n.Db(2),n.oc("ngIf",0==t.natures.length||0==t.messagesModel.length),n.Db(1),n.oc("ngIf",0!=t.natures.length&&0!=t.messagesModel.length)}}let Ab=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.localStorage=a,this.loading=!0,this.currentAccount=null,this.usersWorkflowList=[],this.natures=[],this.messagesModel=[],this.ixbusDatas={nature:"",messageModel:"",login:"",password:"",signatureMode:"manual"},this.injectDatasParam={resId:0,editable:!0},this.selectNature=new X.i,this.selectWorkflow=new X.i}ngOnInit(){this.natures=this.additionalsInfos.ixbus.natures.map(t=>({id:t,label:t})),this.messagesModel=this.additionalsInfos.ixbus.messagesModel.map(t=>({id:t,label:t})),null!==this.localStorage.get("ixBusSignatureMode_"+this.headerService.user.id)&&(this.ixbusDatas.signatureMode=this.localStorage.get("ixBusSignatureMode_"+this.headerService.user.id)),this.loading=!1}isValidParaph(){return!!(0!==this.additionalsInfos.attachments.length&&0!==this.natures.length&&0!==this.messagesModel.length&&this.ixbusDatas.nature&&this.ixbusDatas.messageModel&&this.ixbusDatas.login&&this.ixbusDatas.password)}getRessources(){return this.additionalsInfos.attachments.map(t=>t.res_id)}getDatas(){return this.localStorage.save("ixBusSignatureMode_"+this.headerService.user.id,this.ixbusDatas.signatureMode),this.externalSignatoryBookDatas={ixbus:this.ixbusDatas,steps:[]},this.externalSignatoryBookDatas}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(Ut.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-ixbus-paraph"]],inputs:{additionalsInfos:"additionalsInfos",externalSignatoryBookDatas:"externalSignatoryBookDatas"},decls:1,vars:1,consts:[["class","col-md-12",4,"ngIf"],[1,"col-md-12"],["role","alert",1,"alert-message","alert-message-info"],[4,"ngIf"],["role","alert",1,"alert-message","alert-message-danger","mailList"],[1,"form-group",2,"margin-top","10px"],[1,"col-sm-12"],[2,"width","100%",3,"showLabel","label","placeholderLabel","formControlSelect","datas","required","afterSelected"],[1,"form-group"],["matInput","","required","","name","loginIxbus","id","loginIxbus","type","text",3,"ngModel","title","placeholder","ngModelChange"],["matInput","","required","","name","passwordIxbus","id","passwordIxbus","type","password",3,"ngModel","title","placeholder","ngModelChange"],["id","handwrittenSignature","name","handwrittenSignature","color","primary",3,"ngModel","ngModelChange"],["value","manual","color","primary"],["value","electronic","color","primary",2,"margin-left","5px"]],template:function(t,e){1&t&&n.Oc(0,jb,8,5,"div",0),2&t&&n.oc("ngIf",!e.loading)},directives:[P.t,fr,Y.c,J.b,X.d,X.F,X.u,X.x,hc.b,hc.a],pipes:[g.d],styles:[".alert-message[_ngcontent-%COMP%]{margin:0}"]}),t})(),Wb=(()=>{class t{constructor(t,e){this.translate=t,this.http=e,this.loading=!1,this.currentAccount=null,this.usersWorkflowList=[],this.injectDatasParam={resId:0,editable:!0}}ngOnInit(){}isValidParaph(){return 0!==this.additionalsInfos.attachments.length}getRessources(){return this.additionalsInfos.attachments.map(t=>t.res_id)}getDatas(){return this.externalSignatoryBookDatas}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-fast-paraph"]],inputs:{additionalsInfos:"additionalsInfos",externalSignatoryBookDatas:"externalSignatoryBookDatas"},decls:6,vars:3,consts:[[1,"col-md-12"],["role","alert",1,"alert-message","alert-message-info"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"div"),n.Wb(2,"div",1),n.Wb(3,"p"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(4),n.Rc(n.jc(5,1,"lang.sentToFastParapheur")))},pipes:[g.d],styles:[".alert-message[_ngcontent-%COMP%]{margin:0}"]}),t})();const Tb=["appVisaWorkflow"];function Eb(t,e){if(1&t&&(n.Wb(0,"div",7),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){n.hc();const t=n.zc(7);n.Db(2),n.Rc(t.checkExternalSignatoryBook().join(", ")),n.Db(1),n.Sc(" ",n.jc(4,2,"lang.usersMissingInSignatureBook")," ! ")}}function Fb(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function Lb(t,e){if(1&t&&(n.Wb(0,"div",0),n.Wb(1,"div"),n.Wb(2,"div",8),n.Wb(3,"p"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Wb(6,"ul"),n.Oc(7,Fb,5,4,"li",9),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.Sc(" ",n.jc(5,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.additionalsInfos.visaWorkflowError)}}let Qb=(()=>{class t{constructor(t,e){this.translate=t,this.http=e,this.loading=!1,this.currentAccount=null,this.usersWorkflowList=[],this.injectDatasParam={resId:0,editable:!0}}ngOnInit(){void 0!==this.additionalsInfos.destinationId&&""!==this.additionalsInfos.destinationId&&setTimeout(()=>{this.appVisaWorkflow.loadListModel(this.additionalsInfos.destinationId)},0)}isValidParaph(){return!(0===this.additionalsInfos.attachments.length||0===this.appVisaWorkflow.getWorkflow().length||this.appVisaWorkflow.checkExternalSignatoryBook().length>0)}getRessources(){return this.additionalsInfos.attachments.map(t=>t.res_id)}getDatas(){return this.appVisaWorkflow.getWorkflow().forEach(t=>{this.externalSignatoryBookDatas.steps.push({externalId:t.externalId.maarchParapheur,action:t.requested_signature?"sign":"visa"})}),this.externalSignatoryBookDatas}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-maarch-paraph"]],viewQuery:function(t,e){var i;1&t&&n.Xc(Tb,!0),2&t&&n.yc(i=n.ec())&&(e.appVisaWorkflow=i.first)},inputs:{additionalsInfos:"additionalsInfos",externalSignatoryBookDatas:"externalSignatoryBookDatas"},decls:10,vars:8,consts:[[1,"col-md-12"],[1,"fieldsetdContainer",2,"flex","2"],[1,"fieldsetdContent"],[3,"adminMode","injectDatas","linkedToMaarchParapheur"],["appVisaWorkflow",""],["class","alert-message alert-message-danger","role","alert",4,"ngIf"],["class","col-md-12",4,"ngIf"],["role","alert",1,"alert-message","alert-message-danger"],["role","alert",1,"alert-message","alert-message-danger","mailList"],[4,"ngFor","ngForOf"]],template:function(t,e){if(1&t&&(n.Wb(0,"div",0),n.Wb(1,"div",1),n.Wb(2,"h2"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"div",2),n.Rb(6,"app-visa-workflow",3,4),n.Oc(8,Eb,5,4,"div",5),n.Vb(),n.Vb(),n.Vb(),n.Oc(9,Lb,8,4,"div",6)),2&t){const t=n.zc(7);n.Db(3),n.Sc("",n.jc(4,6,"lang.visaWorkflow")," :"),n.Db(3),n.oc("adminMode",!0)("injectDatas",e.injectDatasParam)("linkedToMaarchParapheur",!0),n.Db(2),n.oc("ngIf",t.checkExternalSignatoryBook().length>0),n.Db(1),n.oc("ngIf",e.additionalsInfos.visaWorkflowError)}},directives:[Ko,P.t,P.s],pipes:[g.d],styles:[".fieldsetdContainer[_ngcontent-%COMP%]{position:relative}.fieldsetdContainer[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:-5px;left:30px;margin:0;padding:0 5px;color:#135f7f}.fieldsetdContainer[_ngcontent-%COMP%] .fieldsetdContent[_ngcontent-%COMP%]{background:#fff;border-radius:4px;border:1px solid #ccc;margin-top:10px;padding:10px;overflow:auto;height:450px}.alert-message[_ngcontent-%COMP%]{margin:0}"]}),t})();function Nb(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-option",8),n.Wb(1,"span",9),n.Qc(2),n.Vb(),n.Wb(3,"button",10),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc(2).removeAccount(i)})),n.ic(4,"translate"),n.Rb(5,"mat-icon",11),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.oc("value",t),n.Db(2),n.Tc("",t.login," (",t.siret,")"),n.Db(1),n.pc("title",n.jc(4,4,"lang.delete"))}}function zb(t,e){if(1&t){const t=n.Xb();n.Wb(0,"form",null,3),n.Wb(2,"div",4),n.Wb(3,"mat-form-field"),n.Wb(4,"mat-label"),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Wb(7,"mat-select",5),n.dc("selectionChange",(function(e){return n.Dc(t),n.hc().selectAccount(e)})),n.Oc(8,Nb,6,6,"mat-option",6),n.Vb(),n.Wb(9,"mat-hint"),n.Wb(10,"a",7),n.dc("click",(function(){return n.Dc(t),n.hc().initNewAccount()})),n.Qc(11),n.ic(12,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(5),n.Rc(n.jc(6,3,"lang.selectedAccount")),n.Db(3),n.oc("ngForOf",t.additionalsInfos.accounts),n.Db(3),n.Rc(n.jc(12,5,"lang.addNewAccount"))}}function Bb(t,e){if(1&t){const t=n.Xb();n.Wb(0,"form",12,13),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().addNewAccount()})),n.Wb(2,"div",14),n.Wb(3,"mat-form-field"),n.Wb(4,"input",15),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().newAccount.login=e})),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(6,"div",14),n.Wb(7,"mat-form-field"),n.Wb(8,"input",16),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().newAccount.siret=e})),n.ic(9,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(10,"div",17),n.Wb(11,"button",18),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Wb(14,"button",19),n.dc("click",(function(){return n.Dc(t),n.hc().addAccountMode=!1})),n.Qc(15),n.ic(16,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(1),e=n.hc();n.Db(4),n.pc("placeholder",n.jc(5,7,"lang.newAccount")),n.oc("ngModel",e.newAccount.login),n.Db(4),n.pc("placeholder",n.jc(9,9,"lang.siret")),n.oc("ngModel",e.newAccount.siret),n.Db(3),n.oc("disabled",!t.form.valid||e.loading),n.Db(1),n.Sc(" ",n.jc(13,11,"lang.add")," "),n.Db(3),n.Sc(" ",n.jc(16,13,"lang.cancel")," ")}}function Ub(t,e){if(1&t&&(n.Wb(0,"mat-option",33),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t.displayName," ")}}function $b(t,e){1&t&&(n.Wb(0,"div",34),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noPerson")," "))}function Hb(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",49),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc().index;return n.hc(2).changeRole(a,i)})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.Rc(n.jc(2,1,"lang."+t+"User"))}}function Gb(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",49),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc().index;return n.hc(2).changeContext(a,i)})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.Rc(n.jc(2,1,"lang."+t))}}function Xb(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list",35),n.Wb(1,"mat-list-item"),n.Rb(2,"mat-icon",36),n.Wb(3,"h4",37),n.Wb(4,"span",38),n.Qc(5),n.Vb(),n.Vb(),n.Wb(6,"p",39),n.Wb(7,"span",40),n.Wb(8,"button",41),n.ic(9,"translate"),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Wb(12,"mat-menu",null,42),n.Wb(14,"div",43),n.Qc(15),n.ic(16,"translate"),n.Vb(),n.Oc(17,Hb,3,3,"button",44),n.Vb(),n.Wb(18,"button",45),n.ic(19,"translate"),n.Qc(20),n.ic(21,"translate"),n.Vb(),n.Wb(22,"mat-menu",null,46),n.Wb(24,"div",43),n.Qc(25),n.ic(26,"translate"),n.Vb(),n.Oc(27,Gb,3,3,"button",44),n.Vb(),n.Vb(),n.Vb(),n.Wb(28,"button",47),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc(2).deleteItem(i)})),n.Rb(29,"mat-icon",48),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.zc(13),a=n.zc(23),s=n.hc(2);n.Db(5),n.Rc(t.displayName),n.Db(3),n.pc("title",n.jc(9,15,"lang."+t.currentRole+"User")),n.oc("matMenuTriggerFor",i),n.Db(2),n.Rc(n.jc(11,17,"lang."+t.currentRole+"User")),n.Db(2),n.Fb("listMenu"),n.Db(3),n.Sc(" ",n.jc(16,19,"lang.roles")," "),n.Db(2),n.oc("ngForOf",t.roles),n.Db(1),n.pc("title",n.jc(19,21,"lang."+t.currentContext)),n.oc("matMenuTriggerFor",a),n.Db(2),n.Rc(n.jc(21,23,"lang."+t.currentContext)),n.Db(2),n.Fb("listMenu"),n.Db(3),n.Sc(" ",n.jc(26,25,"lang.contextParaph")," "),n.Db(2),n.oc("ngForOf",s.contextList)}}function qb(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",20),n.Wb(1,"div",21),n.Wb(2,"h2",22),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"div",23),n.Wb(6,"mat-form-field",24),n.Rb(7,"input",25),n.ic(8,"translate"),n.Wb(9,"mat-autocomplete",26,27),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc().addItem(e)})),n.Oc(11,Ub,2,2,"mat-option",28),n.ic(12,"async"),n.Vb(),n.Vb(),n.Wb(13,"div",29,30),n.dc("cdkDropListDropped",(function(e){return n.Dc(t),n.hc().drop(e)})),n.Oc(15,$b,3,3,"div",31),n.Oc(16,Xb,30,27,"mat-list",32),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(10),e=n.hc();n.Db(3),n.Sc("",n.jc(4,10,"lang.visaWorkflow")," :"),n.Db(3),n.Lc("font-size",10,"px"),n.Db(1),n.pc("placeholder",n.jc(8,12,"lang.addPerson")),n.oc("matAutocomplete",t)("formControl",e.usersCtrl),n.Db(4),n.oc("ngForOf",n.jc(12,14,e.filteredUsers)),n.Db(2),n.oc("cdkDropListData",e.currentWorkflow),n.Db(2),n.oc("ngIf",0===e.currentWorkflow.length),n.Db(1),n.oc("ngForOf",e.currentWorkflow)}}let Kb=(()=>{class t{constructor(t,e,i){this.translate=t,this.http=e,this.notify=i,this.loading=!1,this.newAccount={},this.currentAccount=null,this.usersWorkflowList=[],this.currentWorkflow=[],this.contextList=["FON","PER","SPH","DIR","DLP","EXE"],this.addAccountMode=!1,this.usersCtrl=new X.i}ngOnInit(){}drop(t){t.previousContainer===t.container&&Object(lo.h)(t.container.data,t.previousIndex,t.currentIndex)}selectAccount(t){this.loading=!1,this.currentAccount=t.value,this.usersWorkflowList=[],this.currentWorkflow=[],this.getUsersWorkflowList(this.currentAccount)}getUsersWorkflowList(t){this.loading=!0,this.filteredUsers=this.usersCtrl.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>t?this._filterUsers(t):this.usersWorkflowList.slice())),this.http.get("../rest/xParaphWorkflow?login="+t.login+"&siret="+t.siret).subscribe(t=>{this.usersWorkflowList=t.workflow,this.usersWorkflowList.forEach(t=>{t.currentRole=t.roles[0],t.currentContext=this.contextList[0]}),setTimeout(()=>{$("#availableUsers").focus()},0)},t=>{this.loading=!1,this.notify.error(t.error.errors[0])})}changeRole(t,e){this.currentWorkflow[t].currentRole=e}changeContext(t,e){this.currentWorkflow[t].currentContext=e}addItem(t){this.currentWorkflow.push(JSON.parse(JSON.stringify(t.option.value))),$("#availableUsers").blur(),this.usersCtrl.setValue("")}deleteItem(t){this.currentWorkflow.splice(t,1)}_filterUsers(t){if("string"==typeof t){const e=t.toLowerCase();return this.usersWorkflowList.filter(t=>-1!==t.displayName.toLowerCase().indexOf(e))}}isValidParaph(){return this.additionalsInfos.attachments.length>0&&this.currentWorkflow.length>0&&""!==this.currentAccount.login&&""!==this.currentAccount.siret}getRessources(){return this.additionalsInfos.attachments.map(t=>t.res_id)}getDatas(){return this.externalSignatoryBookDatas={info:{siret:this.currentAccount.siret,login:this.currentAccount.login},steps:[]},this.currentWorkflow.forEach(t=>{this.externalSignatoryBookDatas.steps.push({login:t.userId,action:"visa"===t.currentRole?"2":"1",contexte:t.currentContext})}),this.externalSignatoryBookDatas}addNewAccount(){this.loading=!0,this.http.post("../rest/xParaphAccount",{login:this.newAccount.login,siret:this.newAccount.siret}).subscribe(t=>{this.additionalsInfos.accounts.push({login:this.newAccount.login,siret:this.newAccount.siret}),this.newAccount={},this.loading=!1,this.addAccountMode=!1,this.notify.success(this.translate.instant("lang.accountAdded"))},t=>{this.notify.handleErrors(t),this.loading=!1})}removeAccount(t){confirm(this.translate.instant("lang.confirmDeleteAccount"))&&this.http.delete("../rest/xParaphAccount?siret="+this.additionalsInfos.accounts[t].siret+"&login="+this.additionalsInfos.accounts[t].login).subscribe(e=>{this.additionalsInfos.accounts.splice(t,1),this.notify.success(this.translate.instant("lang.accountDeleted"))},t=>{this.notify.handleErrors(t),this.loading=!1})}initNewAccount(){this.loading=!1,this.usersWorkflowList=[],this.currentWorkflow=[],this.currentAccount=null,this.addAccountMode=!0,setTimeout(()=>{$("#newAccountLogin").focus()},0)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-x-paraph"]],inputs:{additionalsInfos:"additionalsInfos",externalSignatoryBookDatas:"externalSignatoryBookDatas"},decls:3,vars:3,consts:[[4,"ngIf"],[3,"ngSubmit",4,"ngIf"],["class","col-md-12","style","padding-top: 20px;",4,"ngIf"],["accountForm","ngForm"],[1,"col-md-12",2,"padding-top","10px"],["name","loginAccount","required","",3,"selectionChange"],["class","accountList",3,"value",4,"ngFor","ngForOf"],[2,"cursor","pointer",3,"click"],[1,"accountList",3,"value"],[1,"accountName"],["mat-icon-button","","color","warn",3,"title","click"],[1,"fa","fa-trash"],[3,"ngSubmit"],["newAccountForm","ngForm"],[1,"col-md-6",2,"padding-top","10px"],["id","newAccountLogin","matInput","","name","newAccountLogin","required","",3,"placeholder","ngModel","ngModelChange"],["id","newAccountSiret","matInput","","name","newAccountSiret","required","",3,"placeholder","ngModel","ngModelChange"],[1,"col-md-12","text-center",2,"padding-top","10px"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],["mat-raised-button","",3,"click"],[1,"col-md-12",2,"padding-top","20px"],[1,"workflowContent"],[2,"top","-5px"],[1,"contentUser"],["appearance","outline","floatLabel","never"],["id","availableUsers","type","text","matInput","",3,"placeholder","matAutocomplete","formControl"],["isOpen","true",3,"optionSelected"],["auto","matAutocomplete"],[3,"value",4,"ngFor","ngForOf"],["cdkDropList","",1,"cdk-list",3,"cdkDropListData","cdkDropListDropped"],["dataAvailableList","cdkDropList"],["style","opacity: 0.5;text-align: center;font-size: 10px;padding: 10px;",4,"ngIf"],["class","columns","cdkDrag","",4,"ngFor","ngForOf"],[3,"value"],[2,"opacity","0.5","text-align","center","font-size","10px","padding","10px"],["cdkDrag","",1,"columns"],["mat-list-icon","","color","primary",1,"fa","fa-user","fa-2x"],["mat-line","",2,"display","flex"],[2,"flex","1","text-overflow","ellipsis","overflow","hidden"],["mat-line","",1,"otherInfo",2,"display","flex"],[2,"opacity","0.5","flex","1"],["mat-button","",1,"currentRoleButton",3,"matMenuTriggerFor","title"],["menu","matMenu"],[2,"text-align","center","font-size","10px","color","white","background","#135F7F","padding","5px","font-weight","bold"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["mat-button","",1,"currentContextButton",3,"matMenuTriggerFor","title"],["menuContext","matMenu"],["mat-icon-button","",3,"click"],["color","warn",1,"fa","fa-times"],["mat-menu-item","",3,"click"]],template:function(t,e){1&t&&(n.Oc(0,zb,13,7,"form",0),n.Oc(1,Bb,17,15,"form",1),n.Oc(2,qb,17,16,"div",2)),2&t&&(n.oc("ngIf",!e.addAccountMode&&e.additionalsInfos.attachments.length>0),n.Db(1),n.oc("ngIf",e.addAccountMode&&e.additionalsInfos.attachments.length>0),n.Db(1),n.oc("ngIf",e.usersWorkflowList.length>0))},directives:[P.t,X.K,X.v,X.w,Y.c,Y.g,ee.a,P.s,Y.f,W.p,k.b,S.a,J.b,X.d,X.F,X.u,X.x,Ne.d,X.j,Ne.a,lo.e,R.a,lo.a,R.d,R.c,W.l,ne.d,ne.e,ne.b],pipes:[g.d,P.b],styles:[".cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);background:#fff;padding:10px}.cdk-drag-preview[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{display:none}.cdk-drag-placeholder[_ngcontent-%COMP%], .cdk-drag-preview[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.columns[_ngcontent-%COMP%]:last-child{border:none}.cdk-list[_ngcontent-%COMP%]{height:250px;overflow:auto}.cdk-list.cdk-drop-list-dragging[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.columns[_ngcontent-%COMP%]{cursor:move}.workflowContent[_ngcontent-%COMP%]{position:relative;background:#fff;border-radius:4px;border:1px solid #ccc;padding:10px}.workflowContent[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{height:auto;font-size:13px}.workflowContent[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:5px;left:10px;margin:0;padding:0 5px;color:#135f7f}.accountList[_ngcontent-%COMP%] .mat-option-text{display:flex}.accountList[_ngcontent-%COMP%] .accountName[_ngcontent-%COMP%]{flex:1} .listMenu .mat-menu-content{padding-top:0;padding-bottom:0}.currentContextButton[_ngcontent-%COMP%]{width:150px}.currentContextButton[_ngcontent-%COMP%], .currentRoleButton[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;font-size:13px;text-align:left}.currentRoleButton[_ngcontent-%COMP%]{width:120px}"]}),t})();const Yb=["noteEditor"],Jb=["xParaph"],Zb=["maarchParapheur"],tf=["fastParapheur"],ef=["iParapheur"],nf=["ixbus"];function af(t,e){1&t&&(n.Wb(0,"div",20),n.Rb(1,"mat-spinner",21),n.Vb())}function sf(t,e){1&t&&(n.Wb(0,"b",22),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function of(t,e){if(1&t&&(n.Wb(0,"b",22),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function rf(t,e){if(1&t&&(n.Wb(0,"b",22),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function cf(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-checkbox",25),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).toggleIntegration(i.key)})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.oc("checked",i.data.resource.integrations[t.key]),n.Db(1),n.Sc("",n.jc(2,2,"lang."+t.key+"_doc")," ")}}function lf(t,e){if(1&t&&(n.Wb(0,"div",23),n.Oc(1,cf,3,4,"mat-checkbox",24),n.ic(2,"keyvalue"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",n.jc(2,1,t.integrationsInfo))}}function df(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier)}}function hf(t,e){if(1&t&&(n.Wb(0,"div",26),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,df,3,1,"li",27),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Rc(n.jc(3,2,"lang.mailingActionInformations")),n.Db(3),n.oc("ngForOf",t.resourcesMailing)}}function uf(t,e){if(1&t&&n.Rb(0,"app-i-paraph",28,29),2&t){const t=n.hc();n.oc("additionalsInfos",t.additionalsInfos)("externalSignatoryBookDatas",t.externalSignatoryBookDatas)}}function pf(t,e){if(1&t&&n.Rb(0,"app-ixbus-paraph",28,30),2&t){const t=n.hc();n.oc("additionalsInfos",t.additionalsInfos)("externalSignatoryBookDatas",t.externalSignatoryBookDatas)}}function bf(t,e){if(1&t&&n.Rb(0,"app-fast-paraph",28,31),2&t){const t=n.hc();n.oc("additionalsInfos",t.additionalsInfos)("externalSignatoryBookDatas",t.externalSignatoryBookDatas)}}function ff(t,e){if(1&t&&n.Rb(0,"app-maarch-paraph",28,32),2&t){const t=n.hc();n.oc("additionalsInfos",t.additionalsInfos)("externalSignatoryBookDatas",t.externalSignatoryBookDatas)}}function mf(t,e){if(1&t&&n.Rb(0,"app-x-paraph",28,33),2&t){const t=n.hc();n.oc("additionalsInfos",t.additionalsInfos)("externalSignatoryBookDatas",t.externalSignatoryBookDatas)}}function gf(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function vf(t,e){if(1&t&&(n.Wb(0,"div",7),n.Wb(1,"div"),n.Wb(2,"div",34),n.Wb(3,"p"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Wb(6,"ul"),n.Oc(7,gf,5,4,"li",27),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.Sc(" ",n.jc(5,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.additionalsInfos.noAttachment)}}let _f=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.changeDetectorRef=s,this.loading=!1,this.additionalsInfos={destinationId:"",users:[],attachments:[],noAttachment:[]},this.resourcesMailing=[],this.signatoryBookEnabled="",this.externalSignatoryBookDatas={steps:[],objectSent:"attachment"},this.integrationsInfo={inSignatureBook:{icon:"fas fa-file-signature"}}}ngOnInit(){this.loading=!0,this.checkExternalSignatureBook()}onSubmit(){this.loading=!0,this.data.resIds.length>0&&this.executeAction()}checkExternalSignatureBook(){return this.loading=!0,new Promise((t,e)=>{this.http.post(`../rest/resourcesList/users/${this.data.userId}/groups/${this.data.groupId}/baskets/${this.data.basketId}/checkExternalSignatoryBook`,{resources:this.data.resIds}).pipe(Object(mt.a)(e=>{this.additionalsInfos=e.additionalsInfos,this.additionalsInfos.attachments.length>0&&(this.signatoryBookEnabled=e.signatureBookEnabled,e.additionalsInfos.attachments.forEach(t=>{t.mailing&&this.resourcesMailing.push(t)})),this.errors=e.errors,t(!0)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(),Object(c.a)(!1)))).subscribe()})}executeAction(){let t,e;t=this[this.signatoryBookEnabled].getRessources(),e=this[this.signatoryBookEnabled].getDatas(),this.http.put(this.data.processActionRoute,{resources:t,note:this.noteEditor.getNote(),data:e}).pipe(Object(mt.a)(e=>{e||this.dialogRef.close(t),e&&null!=e.errors&&this.notify.error(e.errors)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isValidAction(){return void 0!==this[this.signatoryBookEnabled]&&this[this.signatoryBookEnabled].isValidParaph()}toggleIntegration(t){this.http.put("../rest/resourcesList/integrations",{resources:this.data.resIds,integrations:{[t]:!this.data.resource.integrations[t]}}).pipe(Object(mt.a)(()=>Object(r.a)(this,void 0,void 0,(function*(){this.data.resource.integrations[t]=!this.data.resource.integrations[t],yield this.checkExternalSignatureBook(),this.changeDetectorRef.detectChanges()}))),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(n.h))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(Yb,!0),n.Xc(Jb,!0),n.Xc(Zb,!0),n.Xc(tf,!0),n.Xc(ef,!0),n.Xc(nf,!0)),2&t&&(n.yc(i=n.ec())&&(e.noteEditor=i.first),n.yc(i=n.ec())&&(e.xParaph=i.first),n.yc(i=n.ec())&&(e.maarchParapheur=i.first),n.yc(i=n.ec())&&(e.fastParapheur=i.first),n.yc(i=n.ec())&&(e.iParapheur=i.first),n.yc(i=n.ec())&&(e.ixbus=i.first))},decls:35,vars:25,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],["autosize","",2,"height","100%"],[2,"background","white"],[1,"row",2,"margin","0"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],["style","padding:10px;display: flex;flex-direction: column;",4,"ngIf"],["class","alert-message alert-message-info","role","alert",4,"ngIf"],[3,"additionalsInfos","externalSignatoryBookDatas",4,"ngIf"],["class","col-md-12",4,"ngIf"],[1,"col-md-12",2,"padding-top","10px"],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"],[2,"padding","10px","display","flex","flex-direction","column"],["color","primary",3,"checked","click",4,"ngFor","ngForOf"],["color","primary",3,"checked","click"],["role","alert",1,"alert-message","alert-message-info"],[4,"ngFor","ngForOf"],[3,"additionalsInfos","externalSignatoryBookDatas"],["iParapheur",""],["ixbus",""],["fastParapheur",""],["maarchParapheur",""],["xParaph",""],["role","alert",1,"alert-message","alert-message-danger","mailList"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,af,2,0,"div",3),n.Wb(5,"mat-sidenav-container",4),n.Wb(6,"mat-sidenav-content",5),n.Wb(7,"div",6),n.Wb(8,"div",7),n.Qc(9),n.ic(10,"translate"),n.Oc(11,sf,3,3,"b",8),n.Oc(12,of,2,1,"b",8),n.Oc(13,rf,3,4,"b",8),n.Qc(14," ? "),n.Vb(),n.Oc(15,lf,3,3,"div",9),n.Oc(16,hf,6,4,"div",10),n.Wb(17,"div"),n.Oc(18,uf,2,2,"app-i-paraph",11),n.Oc(19,pf,2,2,"app-ixbus-paraph",11),n.Oc(20,bf,2,2,"app-fast-paraph",11),n.Oc(21,ff,2,2,"app-maarch-paraph",11),n.Oc(22,mf,2,2,"app-x-paraph",11),n.Oc(23,vf,8,4,"div",12),n.Vb(),n.Wb(24,"div",13),n.Rb(25,"app-note-editor",14,15),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Rb(27,"span",16),n.Wb(28,"div",17),n.Wb(29,"button",18),n.dc("click",(function(){return e.onSubmit()})),n.Qc(30),n.ic(31,"translate"),n.Vb(),n.Wb(32,"button",19),n.Qc(33),n.ic(34,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(5),n.Sc(" ",n.jc(10,19,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(2),n.oc("ngIf",e.data.resIds.length>0),n.Db(1),n.oc("ngIf",e.resourcesMailing.length>0),n.Db(2),n.oc("ngIf","iParapheur"==e.signatoryBookEnabled),n.Db(1),n.oc("ngIf","ixbus"==e.signatoryBookEnabled),n.Db(1),n.oc("ngIf","fastParapheur"==e.signatoryBookEnabled),n.Db(1),n.oc("ngIf","maarchParapheur"==e.signatoryBookEnabled),n.Db(1),n.oc("ngIf","xParaph"==e.signatoryBookEnabled),n.Db(1),n.oc("ngIf",0!=e.additionalsInfos.noAttachment.length&&"attachment"==e.externalSignatoryBookDatas.objectSent),n.Db(2),n.oc("resIds",e.data.resIds),n.Db(4),n.oc("disabled",e.loading||!e.isValidAction()),n.Db(1),n.Rc(n.jc(31,21,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(34,23,"lang.cancel")))},directives:[q.i,q.f,P.t,I.e,I.f,Du,q.c,k.b,q.d,V.c,P.s,j.a,Sb,Ab,Wb,Qb,Kb],pipes:[g.d,P.l],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:2;overflow:hidden}.mailList[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{font-size:12px;max-height:100px;overflow:auto;padding-left:25px;padding-right:5px;padding-bottom:10px;margin-top:10px}.mailList[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;text-decoration:underline}.mailList[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{font-size:120%}.formType[_ngcontent-%COMP%]{align-items:center;display:flex;margin:10px;border-radius:4px;border:1px solid #ccc;position:relative;padding:10px}.formType-title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:-7px;left:10px;padding:0;margin:0;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-form-field-suffix{color:#f99830;font-size:15px;top:0}.formType[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.priceContent[_ngcontent-%COMP%]{align-items:center;width:100%}.priceContent[_ngcontent-%COMP%], .priceContent-label[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.priceContent-label[_ngcontent-%COMP%]{text-align:right;color:#135f7f;flex:1;padding-right:10px}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:90px!important}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.priceInfo[_ngcontent-%COMP%]{padding-right:20px;font-size:10px;opacity:.5;width:100%}.pjList[_ngcontent-%COMP%]{display:flex;width:100%;overflow:auto;flex-direction:column;background:#666}.pjList[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin:10px}"]}),t})();const yf=["noteEditor"];function xf(t,e){1&t&&(n.Wb(0,"div",18),n.Rb(1,"mat-spinner",19),n.Vb())}function Cf(t,e){1&t&&(n.Wb(0,"b",20),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function Of(t,e){if(1&t&&(n.Wb(0,"b",20),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function Df(t,e){if(1&t&&(n.Wb(0,"b",20),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function wf(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",11),n.Wb(1,"plugin-autocomplete",21),n.dc("triggerEvent",(function(e){return n.Dc(t),n.hc().setVal(e)})),n.ic(2,"translate"),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(1),n.oc("labelPlaceholder",n.jc(2,5,"lang.userMaarchParapheur"))("datas",t.additionalsInfos.users)("targetSearchKey","displayName")("subInfoKey","email")("singleMode",!0)}}function Mf(t,e){1&t&&(n.Wb(0,"div",7),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noUserDefinedInMaarchParapheur")," "))}function kf(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function Sf(t,e){if(1&t&&(n.Wb(0,"div",7),n.Wb(1,"div"),n.Wb(2,"div",22),n.Wb(3,"p"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Wb(6,"ul"),n.Oc(7,kf,5,4,"li",23),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.Sc(" ",n.jc(5,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.additionalsInfos.noMail)}}let If=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.loading=!1,this.additionalsInfos={users:[],mails:[],noMail:[]},this.externalSignatoryBookDatas={processingUser:""}}ngOnInit(){this.loading=!0,this.http.post("../rest/resourcesList/users/"+this.data.userId+"/groups/"+this.data.groupId+"/baskets/"+this.data.basketId+"/checkExternalNoteBook",{resources:this.data.resIds}).pipe(Object(l.a)(t=>(t.additionalsInfos.users.forEach(t=>{t.displayName=t.firstname+" "+t.lastname}),t)),Object(mt.a)(t=>{this.additionalsInfos=t.additionalsInfos,this.errors=t.errors}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),this.dialogRef.close(),Object(c.a)(!1)))).subscribe()}onSubmit(){this.loading=!0,this.data.resIds.length>0&&this.executeAction()}executeAction(){let t,e;t=this.additionalsInfos.mails.map(t=>t.res_id),e=this.externalSignatoryBookDatas,this.http.put(this.data.processActionRoute,{resources:t,note:this.noteEditor.getNote(),data:e}).pipe(Object(mt.a)(e=>{e||this.dialogRef.close(t),e&&null!=e.errors&&this.notify.error(e.errors)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}checkValidAction(){return 0==this.additionalsInfos.mails.length||!this.externalSignatoryBookDatas.processingUser||0==this.additionalsInfos.users.length}setVal(t){this.externalSignatoryBookDatas.processingUser=t.id}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(yf,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:30,vars:20,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],["autosize","",2,"height","100%"],[2,"background","white"],[1,"row",2,"margin","0"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],["class","col-md-12","style","padding-top: 10px;",4,"ngIf"],["class","col-md-12",4,"ngIf"],[1,"col-md-12",2,"padding-top","10px"],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"],["appearance","outline",3,"labelPlaceholder","datas","targetSearchKey","subInfoKey","singleMode","triggerEvent"],["role","alert",1,"alert-message","alert-message-danger","mailList"],[4,"ngFor","ngForOf"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,xf,2,0,"div",3),n.Wb(5,"mat-sidenav-container",4),n.Wb(6,"mat-sidenav-content",5),n.Wb(7,"div",6),n.Wb(8,"div",7),n.Qc(9),n.ic(10,"translate"),n.Oc(11,Cf,3,3,"b",8),n.Oc(12,Of,2,1,"b",8),n.Oc(13,Df,3,4,"b",8),n.Qc(14," ? "),n.Vb(),n.Wb(15,"div"),n.Oc(16,wf,3,7,"div",9),n.Oc(17,Mf,3,3,"div",10),n.Oc(18,Sf,8,4,"div",10),n.Vb(),n.Wb(19,"div",11),n.Rb(20,"app-note-editor",12,13),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Rb(22,"span",14),n.Wb(23,"div",15),n.Wb(24,"button",16),n.dc("click",(function(){return e.onSubmit()})),n.Qc(25),n.ic(26,"translate"),n.Vb(),n.Wb(27,"button",17),n.Qc(28),n.ic(29,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(5),n.Sc(" ",n.jc(10,14,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(3),n.oc("ngIf",0!=e.additionalsInfos.users.length),n.Db(1),n.oc("ngIf",0==e.additionalsInfos.users.length),n.Db(1),n.oc("ngIf",0!=e.additionalsInfos.noMail.length),n.Db(2),n.oc("resIds",e.data.resIds),n.Db(4),n.oc("disabled",e.loading||e.checkValidAction()),n.Db(1),n.Rc(n.jc(26,16,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(29,18,"lang.cancel")))},directives:[q.i,q.f,P.t,I.e,I.f,Du,q.c,k.b,q.d,V.c,ii,P.s],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:2;overflow:hidden}.mailList[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{font-size:12px;max-height:100px;overflow:auto;padding-left:25px;padding-right:5px;padding-bottom:10px;margin-top:10px}.mailList[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;text-decoration:underline}.mailList[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{font-size:120%}.formType[_ngcontent-%COMP%]{align-items:center;display:flex;margin:10px;border-radius:4px;border:1px solid #ccc;position:relative;padding:10px}.formType-title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:-7px;left:10px;padding:0;margin:0;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-form-field-suffix{color:#f99830;font-size:15px;top:0}.formType[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.priceContent[_ngcontent-%COMP%]{align-items:center;width:100%}.priceContent[_ngcontent-%COMP%], .priceContent-label[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.priceContent-label[_ngcontent-%COMP%]{text-align:right;color:#135f7f;flex:1;padding-right:10px}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:90px!important}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.priceInfo[_ngcontent-%COMP%]{padding-right:20px;font-size:10px;opacity:.5;width:100%}.pjList[_ngcontent-%COMP%]{display:flex;width:100%;overflow:auto;flex-direction:column;background:#666}.pjList[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin:10px}"]}),t})();function Pf(t,e){if(1&t&&(n.Ub(0),n.Qc(1),n.Tb()),2&t){const t=n.hc(2).$implicit,e=n.hc().$implicit;n.Db(1),n.Sc(" (",e.details[t.id].items.length,") ")}}function Vf(t,e){if(1&t&&(n.Wb(0,"mat-list-item",8),n.Rb(1,"mat-icon",9),n.Wb(2,"div",10),n.Wb(3,"p",11),n.Qc(4),n.Vb(),n.Wb(5,"p",12),n.Qc(6),n.Vb(),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Ib("fa-user","user_id"===t.item_type||"user"===t.item_type)("fa-sitemap","entity_id"===t.item_type||"entity"===t.item_type),n.Db(2),n.oc("title",t.itemLabel),n.Db(1),n.Rc(t.itemLabel),n.Db(1),n.oc("title",t.itemSubLabel),n.Db(1),n.Sc(" ",t.itemSubLabel,"")}}function Rf(t,e){if(1&t&&(n.Wb(0,"mat-expansion-panel",6),n.Wb(1,"mat-expansion-panel-header"),n.Wb(2,"mat-panel-title"),n.Qc(3),n.Oc(4,Pf,2,1,"ng-container",0),n.Vb(),n.Vb(),n.Wb(5,"mat-list"),n.Oc(6,Vf,7,8,"mat-list-item",7),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc().$implicit,i=n.hc(2);n.oc("expanded","dest"===t.id||i.expanded),n.Db(3),n.Sc(" ",t.label," "),n.Db(1),n.oc("ngIf","dest"!==t.id),n.Db(2),n.oc("ngForOf",e.details[t.id].items)}}function jf(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Rf,7,4,"mat-expansion-panel",5),n.Tb()),2&t){const t=e.$implicit,i=n.hc().$implicit;n.Db(1),n.oc("ngIf",i.details[t.id])}}function Af(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div",3),n.Wb(2,"div",4),n.ic(3,"fullDate"),n.Qc(4),n.ic(5,"translate"),n.Wb(6,"b"),n.Qc(7),n.Vb(),n.Qc(8," \xa0"),n.Wb(9,"b"),n.Qc(10),n.ic(11,"timeAgo"),n.Vb(),n.Vb(),n.Rb(12,"mat-divider"),n.Vb(),n.Oc(13,jf,2,1,"ng-container",2),n.Tb()),2&t){const t=e.$implicit,i=n.hc(2);n.Db(2),n.oc("title",n.jc(3,5,t.creationDate)),n.Db(2),n.Sc(" ",n.jc(5,7,"lang.createdBy"),"\xa0"),n.Db(3),n.Rc(t.user),n.Db(3),n.Rc(n.kc(11,9,t.creationDate,"full")),n.Db(3),n.oc("ngForOf",i.availableRoles)}}function Wf(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Af,14,12,"ng-container",2),n.Tb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",t.diffListHistory)}}function Tf(t,e){1&t&&(n.Wb(0,"div",13),n.Rb(1,"mat-spinner",14),n.Vb())}let Ef=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.notify=i,this.renderer=n,this.dialog=a,this.functions=s,this.headerService=o,this.roles=[],this.loading=!0,this.availableRoles=[],this.currentEntityId=0,this.userDestList=[],this.diffListHistory=[],this.resId=null,this.expanded=!0}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){yield this.initRoles(),null!==this.resId&&this.getListinstanceHistory(),this.loading=!1}))}getListinstanceHistory(){return new Promise((t,e)=>{this.http.get(`../rest/resources/${this.resId}/listInstanceHistory`).pipe(Object(mt.a)(t=>{this.diffListHistory=t.listInstanceHistory}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}initRoles(){return new Promise((t,e)=>{this.http.get("../rest/roles").pipe(Object(l.a)(t=>(t.roles=t.roles.map(t=>Object.assign(Object.assign({},t),{id:t.id})),t.roles)),Object(mt.a)(e=>{this.availableRoles=e,t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(n.I),n.Qb(q.b),n.Qb(_t.a),n.Qb(y.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-history-diffusions-list"]],inputs:{resId:"resId",expanded:"expanded"},decls:2,vars:2,consts:[[4,"ngIf"],["style","display:flex;",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"dateTitle"],["mat-subheader","","color","primary",3,"title"],["class","diffusionList",3,"expanded",4,"ngIf"],[1,"diffusionList",3,"expanded"],["disableRipple","","class","item-diffusion-list",4,"ngFor","ngForOf"],["disableRipple","",1,"item-diffusion-list"],["mat-list-icon","","color","primary",1,"fa"],[1,"item-diffusion"],["mat-line","",3,"title"],["mat-line","",1,"subInfo",3,"title"],[2,"display","flex"],[2,"margin","auto"]],template:function(t,e){1&t&&(n.Oc(0,Wf,2,1,"ng-container",0),n.Oc(1,Tf,2,0,"div",1)),2&t&&(n.oc("ngIf",!e.loading),n.Db(1),n.oc("ngIf",e.loading))},directives:[P.t,P.s,R.g,T.a,gt.c,gt.g,gt.h,R.a,R.d,S.a,R.c,W.l,V.c],pipes:[uo,g.d,ps],styles:[".columns[_ngcontent-%COMP%]{cursor:move}.notDraggable[_ngcontent-%COMP%]{cursor:not-allowed}.notEditable[_ngcontent-%COMP%]{cursor:auto}.roleList[_ngcontent-%COMP%]{padding-bottom:40px}.diffusionList[_ngcontent-%COMP%]{min-width:400px;box-shadow:none}.diffusionList[_ngcontent-%COMP%] .mat-expansion-panel-header-title[_ngcontent-%COMP%]{color:#4a4a4a;font-weight:700;font-size:13px}.diffusionList[_ngcontent-%COMP%] .item-diffusion-list[_ngcontent-%COMP%]{height:55px;margin-bottom:10px;background-color:hsla(0,0%,84.7%,.1);border-radius:10px;font-size:13px}.diffusionList[_ngcontent-%COMP%] .item-diffusion-list[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{font-size:13px;height:13px;width:13px;padding-right:10px}.diffusionList[_ngcontent-%COMP%] .item-diffusion-list[_ngcontent-%COMP%] .item-diffusion[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;justify-content:center;overflow:hidden}.diffusionList[_ngcontent-%COMP%] .item-diffusion-list[_ngcontent-%COMP%] .item-diffusion[_ngcontent-%COMP%] .mat-line[_ngcontent-%COMP%]{margin:0}.diffusionList[_ngcontent-%COMP%] .item-diffusion-list[_ngcontent-%COMP%] .subInfo[_ngcontent-%COMP%]{font-size:13px;opacity:.5}.diffusionList[_ngcontent-%COMP%] .item-diffusion-list[_ngcontent-%COMP%] .mat-button[_ngcontent-%COMP%]{background:#fff;font-size:13px;border:.5px solid rgba(74,74,74,.32);border-radius:29.5px;color:#4a4a4a} .roleListMenu .mat-menu-content{padding-top:0;padding-bottom:0;font-size:13px;color:#4a4a4a}"]}),t})();const Ff=function(){return["/rest/autocomplete/users","/rest/autocomplete/entities"]};function Lf(t,e){if(1&t){const t=n.Xb();n.Wb(0,"plugin-autocomplete",6,7),n.dc("triggerEvent",(function(e){return n.Dc(t),n.hc(2).addElem(e)})),n.ic(2,"translate"),n.Vb()}2&t&&n.oc("labelPlaceholder",n.jc(2,4,"lang.addUserOrEntity"))("routeDatas",n.uc(6,Ff))("targetSearchKey","idToDisplay")("subInfoKey","descriptionToDisplay")}function Qf(t,e){1&t&&(n.Wb(0,"div",8),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noDiffusionList")," "))}function Nf(t,e){1&t&&(n.Rb(0,"div",9),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.diffNoDestmsg"),n.Ec)}function zf(t,e){if(1&t&&(n.Ub(0),n.Qc(1),n.Tb()),2&t){const t=n.hc(2).$implicit,e=n.hc(2);n.Db(1),n.Sc("(",e.diffList[t.id].items.length,") ")}}function Bf(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",22),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(6).changeDest(i)})),n.Wb(1,"span"),n.Qc(2),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(2),n.Rc(t.labelToDisplay)}}function Uf(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div"),n.Wb(1,"button",18),n.dc("click",(function(){return n.Dc(t),n.hc(5).loadDestUserList()})),n.ic(2,"translate"),n.Rb(3,"mat-icon",19),n.Vb(),n.Wb(4,"mat-menu",null,20),n.Oc(6,Bf,3,1,"button",21),n.Vb(),n.Vb()}if(2&t){const t=n.zc(5),e=n.hc(5);n.Db(1),n.pc("title",n.jc(2,3,"lang.chooseAnotherEntityUser")),n.oc("matMenuTriggerFor",t),n.Db(5),n.oc("ngForOf",e.userDestList)}}function $f(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",27),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit,i=n.hc(2).$implicit,a=n.hc(2).$implicit;return n.hc(2).changeRole(i,a,e)})),n.Qc(1),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(1),n.Rc(t.label)}}function Hf(t,e){if(1&t&&(n.Ub(0),n.Oc(1,$f,2,1,"button",26),n.Tb()),2&t){const t=e.$implicit,i=n.hc(6);n.Db(1),n.oc("ngIf",t.canUpdate&&"redirect"!==i.target||"dest"!==t.id&&"redirect"===i.target&&t.canUpdate)}}function Gf(t,e){if(1&t&&(n.Wb(0,"div"),n.Wb(1,"button",23),n.Qc(2),n.Rb(3,"i",24),n.Vb(),n.Wb(4,"mat-menu",null,25),n.Oc(6,Hf,2,1,"ng-container",5),n.Vb(),n.Vb()),2&t){const t=n.zc(5),e=n.hc(3).$implicit,i=n.hc(2);n.Db(1),n.oc("matMenuTriggerFor",t)("disabled",!i.canUpdateRoles()),n.Db(1),n.Sc("",e.label," "),n.Db(2),n.Fb("roleListMenu"),n.Db(2),n.oc("ngForOf",i.availableRoles)}}function Xf(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div"),n.Wb(1,"button",28),n.dc("click",(function(){n.Dc(t);const e=n.hc().index,i=n.hc(2).$implicit;return n.hc(2).deleteItem(i.id,e)})),n.Rb(2,"mat-icon",29),n.Vb(),n.Vb()}if(2&t){const t=n.hc(5);n.Db(1),n.oc("disabled",!t.canUpdateRoles())}}function qf(t,e){if(1&t&&(n.Wb(0,"mat-list-item",13),n.Rb(1,"mat-icon",14),n.Wb(2,"div",15),n.Wb(3,"p",16),n.Qc(4),n.Vb(),n.Wb(5,"p",17),n.Qc(6),n.Vb(),n.Vb(),n.Oc(7,Uf,7,5,"div",0),n.Oc(8,Gf,7,6,"div",0),n.Oc(9,Xf,3,1,"div",0),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2).$implicit,a=n.hc(2);n.Db(1),n.Ib("fa-user","user_id"===t.item_type||"user"===t.item_type)("fa-sitemap","entity_id"===t.item_type||"entity"===t.item_type),n.Db(2),n.oc("title",t.itemLabel),n.Db(1),n.Rc(t.itemLabel),n.Db(1),n.oc("title",t.itemSubLabel),n.Db(1),n.Sc(" ",t.itemSubLabel,""),n.Db(1),n.oc("ngIf","dest"===i.id&&"redirect"===a.target&&a.adminMode),n.Db(1),n.oc("ngIf","dest"!==i.id&&a.adminMode&&("user_id"===t.item_type||"user"===t.item_type)),n.Db(1),n.oc("ngIf","dest"!==i.id&&a.adminMode)}}function Kf(t,e){if(1&t&&(n.Wb(0,"mat-expansion-panel",11),n.Wb(1,"mat-expansion-panel-header"),n.Wb(2,"mat-panel-title"),n.Qc(3),n.Oc(4,zf,2,1,"ng-container",0),n.Vb(),n.Vb(),n.Wb(5,"mat-list"),n.Oc(6,qf,10,11,"mat-list-item",12),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc(2);n.oc("expanded","dest"===t.id||e.adminMode||e.expanded),n.Db(3),n.Sc(" ",t.label," "),n.Db(1),n.oc("ngIf","dest"!==t.id),n.Db(2),n.oc("ngForOf",e.diffList[t.id].items)}}function Yf(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Kf,7,4,"mat-expansion-panel",10),n.Tb()),2&t){const t=e.$implicit,i=n.hc(2);n.Db(1),n.oc("ngIf",i.diffList[t.id].items.length>0)}}function Jf(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Lf,3,7,"plugin-autocomplete",2),n.Oc(2,Qf,3,3,"div",3),n.Oc(3,Nf,2,3,"div",4),n.Oc(4,Yf,2,1,"ng-container",5),n.Tb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.adminMode&&t.canUpdateRoles()),n.Db(1),n.oc("ngIf",t.isEmptyList()&&!t.loading),n.Db(1),n.oc("ngIf",t.hasNoDest),n.Db(1),n.oc("ngForOf",t.availableRoles)}}function Zf(t,e){1&t&&(n.Wb(0,"div",30),n.Rb(1,"mat-spinner",31),n.Vb())}function tm(t,e){if(1&t&&n.Rb(0,"app-history-diffusions-list",35),2&t){const t=n.hc(2);n.oc("resId",t.resId)}}function em(t,e){1&t&&(n.Ub(0),n.Rb(1,"mat-divider"),n.Wb(2,"mat-expansion-panel",32),n.Wb(3,"mat-expansion-panel-header"),n.Wb(4,"mat-panel-title",33),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Vb(),n.Oc(7,tm,1,1,"ng-template",34),n.Vb(),n.Tb()),2&t&&(n.Db(5),n.Sc(" ",n.jc(6,1,"lang.showDiffusionHistory")," "))}let im=(()=>{class t{constructor(t,e,i,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.renderer=a,this.dialog=s,this.functions=o,this.headerService=r,this.roles=[],this.loading=!0,this.hasHistory=!1,this.availableRoles=[],this.keepRoles=[],this.currentEntityId=0,this.userDestList=[],this.diffList=null,this.listinstanceClone=[],this.hasNoDest=!1,this.keepDiffusionRoleInOutgoingIndexation=!1,this.resId=null,this.keepDestForRedirection=!1,this.entityId=null,this.selfDest=!1,this.category="",this.adminMode=!1,this.allowedEntities=[],this.expanded=!1,this.customDiffusion=[],this.target="",this.triggerEvent=new n.o}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){yield this.initRoles(),null!==this.resId&&0!=this.resId&&"redirect"!==this.target?this.loadListinstance(this.resId):null!==this.resId&&0!=this.resId||this.functions.empty(this.entityId)||0!==this.customDiffusion.length?this.customDiffusion.length>0&&this.loadCustomDiffusion():this.loadListModel(this.entityId,!1,this.selfDest),this.loading=!1}))}drop(t){t.previousContainer===t.container||"dest"!=t.container.id&&Object(lo.i)(t.previousContainer.data,t.container.data,t.previousIndex,t.currentIndex)}noReturnPredicate(){return!1}allPredicate(){return!0}loadCustomDiffusion(){[...new Set(this.customDiffusion.map(t=>t.mode))].forEach(t=>{this.diffList[t].items=this.customDiffusion.filter(e=>e.mode===t).map(e=>({item_mode:t,item_type:e.type,itemSerialId:e.id,itemId:"",itemLabel:e.labelToDisplay,itemSubLabel:e.descriptionToDisplay,difflist_type:"entity_id",process_date:null,process_comment:null}))}),void 0!==this.diffFormControl&&this.setFormValues()}loadListModel(t,e=!1,i=!1){return Object(r.a)(this,void 0,void 0,(function*(){this.loading=!0,this.currentEntityId=t,this.userDestList=[];const n=yield this.getListModel(t);if(this.removeAllItems(),n.length>0&&n[0].forEach(t=>{this.diffList[t.item_mode].items.push(t)}),i&&this.headerService.user.entities[0].id===t&&(this.diffList.dest.items=[{item_mode:"dest",item_type:"user",itemSerialId:this.headerService.user.id,itemId:"",itemLabel:`${this.headerService.user.firstname} ${this.headerService.user.lastname}`,itemSubLabel:this.headerService.user.entities[0].entity_label,difflist_type:"entity_id",process_date:null,process_comment:null}]),null!==this.resId){const t=yield this.getListinstance(this.resId);void 0!==t&&t.forEach(t=>{e&&"dest"==t.item_mode&&(this.diffList[t.item_mode].items=[t]),this.keepRoles.indexOf(t.item_mode)>-1&&0===this.diffList[t.item_mode].items.filter(e=>e.itemSerialId===t.itemSerialId&&e.item_type===t.item_type).length&&this.diffList[t.item_mode].items.push(t),this.keepDestForRedirection&&"dest"==t.item_mode&&0===this.diffList.cc.items.filter(e=>e.itemSerialId===t.itemSerialId&&e.item_type===t.item_type).length&&this.diffList.cc.items.push(t)})}"outgoing"!==this.category||this.keepDiffusionRoleInOutgoingIndexation||Object.keys(this.diffList).forEach(t=>{"dest"!==t&&(this.diffList[t].items=[])}),void 0!==this.diffFormControl&&this.setFormValues(),this.listinstanceClone=JSON.parse(JSON.stringify(this.getCurrentListinstance())),this.loading=!1}))}getListModel(t){return new Promise((e,i)=>{this.http.get(`../rest/listTemplates/entities/${t}?type=diffusionList`).pipe(Object(l.a)(t=>(t.listTemplates=t.listTemplates.map(t=>t.items.map(t=>({listmodel_id:t.id,listinstance_id:t.listinstance_id,item_mode:t.item_mode,item_type:t.item_type,itemSerialId:t.item_id,itemId:"",itemLabel:t.labelToDisplay,itemSubLabel:t.descriptionToDisplay,difflist_type:"entity_id",process_date:null,process_comment:null}))),t.listTemplates)),Object(mt.a)(t=>{e(t)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}getListinstance(t){return new Promise((e,i)=>{0!=t?this.http.get(`../rest/resources/${t}/listInstance`).pipe(Object(l.a)(t=>(this.hasHistory=t.hasHistory,t.listInstance=t.listInstance.map(t=>({listinstance_id:t.listinstance_id,item_mode:t.item_mode,item_type:"user_id"===t.item_type?"user":"entity",itemSerialId:t.itemSerialId,itemId:t.item_id,itemLabel:t.labelToDisplay,itemSubLabel:t.descriptionToDisplay,difflist_type:t.difflist_type,process_date:null,process_comment:null})),t.listInstance)),Object(mt.a)(t=>{e(t)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe():e([])})}loadListinstance(t){return Object(r.a)(this,void 0,void 0,(function*(){this.resId=t,this.http.get(`../rest/resources/${t}/fields/destination?alt=true`).pipe(Object(mt.a)(t=>{this.currentEntityId=t.field}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe(),this.loading=!0;const e=yield this.getListinstance(t);this.removeAllItems(),e.forEach(t=>{this.functions.empty(this.diffList[t.item_mode])||this.diffList[t.item_mode].items.push(t)}),0===e.filter(t=>"dest"===t.item_mode).length&&!this.availableRoles.filter(t=>"dest"===t.id)[0].canUpdate&&this.adminMode&&(this.adminMode=!1,this.hasNoDest=!0),void 0!==this.diffFormControl&&this.setFormValues(),this.loading=!1,this.listinstanceClone=JSON.parse(JSON.stringify(this.getCurrentListinstance()))}))}saveListinstance(){if(!this.hasEmptyDest())return new Promise((t,e)=>{const i=[{resId:this.resId,listInstances:this.getCurrentListinstance()}];this.http.put("../rest/listinstances",i).pipe(Object(mt.a)(e=>{e&&null!=e.errors?this.notify.error(e.errors):(this.listinstanceClone=JSON.parse(JSON.stringify(this.getCurrentListinstance())),this.notify.success(this.translate.instant("lang.diffusionListUpdated")),t(!0))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()});this.notify.error(this.translate.instant("lang.noDest"))}initRoles(){return new Promise((t,e)=>{this.http.get("../rest/roles?context="+this.target).pipe(Object(l.a)(t=>(this.keepDiffusionRoleInOutgoingIndexation=t.parameters.keepDiffusionRoleInOutgoingIndexation,t.roles=t.roles.map(t=>Object.assign(Object.assign({},t),{id:t.id})),t.roles)),Object(mt.a)(e=>{this.diffList={},this.availableRoles=e,this.availableRoles.forEach(t=>{this.diffList[t.id]={label:t.label,items:[]},t.keepInListInstance&&this.keepRoles.push(t.id)}),t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}deleteItem(t,e){this.diffList[t].items.splice(e,1),void 0!==this.diffFormControl&&this.setFormValues()}getCurrentListinstance(){let t=[];return null!==this.diffList&&Object.keys(this.diffList).forEach(e=>{this.diffList[e].items.length>0&&this.diffList[e].items.forEach(i=>{t.push({difflist_type:i.difflist_type,item_id:i.itemSerialId,item_mode:"copy"===e?"cc":e,item_type:i.item_type,process_date:i.process_date,process_comment:i.process_comment})})}),t}loadDestUserList(){this.currentEntityId>0&&0==this.userDestList.length&&this.http.get("../rest/entities/"+this.currentEntityId+"/users").subscribe(t=>{this.userDestList=t.users,this.loading=!1},t=>{this.notify.handleErrors(t)})}changeDest(t){this.diffList.dest.items[0]={listinstance_id:null,item_mode:"dest",item_type:"user",itemSerialId:t.id,itemId:t.user_id,itemLabel:t.labelToDisplay,itemSubLabel:t.descriptionToDisplay,difflist_type:"entity_id",process_date:null,process_comment:null}}getDestUser(){return!(null===this.diffList||!this.diffList.dest)&&this.diffList.dest.items}addElem(t){return Object(r.a)(this,void 0,void 0,(function*(){let e="cc";this.hasEmptyDest()&&"user"==t.type&&(e=this.currentEntityId?(yield this.isUserInCurrentEntity(t.serialId))&&this.availableRoles.filter(t=>"dest"===t.id)[0].canUpdate?"dest":"cc":this.availableRoles.filter(t=>"dest"===t.id)[0].canUpdate?"dest":"cc");let i="";i="user"==t.type?"user":"entity";const n={listinstance_id:null,item_mode:e,item_type:i,itemSerialId:t.serialId,itemId:t.id,itemLabel:t.idToDisplay,itemSubLabel:t.descriptionToDisplay,difflist_type:"entity_id",process_date:null,process_comment:null};this.isItemInThisRole(n,"cc")||(this.diffList[e].items.unshift(n),void 0!==this.diffFormControl&&this.setFormValues())}))}isItemInThisRole(t,e){return this.diffList[e].items.map((t,e)=>Object.assign(Object.assign({},t),{index:e})).filter(e=>e.itemSerialId===t.itemSerialId&&e.item_type===t.item_type).length>0}isUserInCurrentEntity(t){return new Promise((e,i)=>{this.http.get(`../rest/entities/${this.currentEntityId}/users`).pipe(Object(mt.a)(i=>{const n=i.users.filter(e=>e.id===t).length>0;e(n)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}removeAllItems(){Object.keys(this.diffList).forEach(t=>{this.diffList[t].items=[]})}hasEmptyDest(){return 0===this.diffList.dest.items.length}isEmptyList(){let t=!0;return null!==this.diffList&&Object.keys(this.diffList).forEach(e=>{this.diffList[e].items.length>0&&(t=!1)}),t}changeRole(t,e,i){"dest"===i.id?this.switchUserWithOldDest(t,e):this.changeUserRole(t,e,i)}switchMode(){this.adminMode=!this.adminMode,this.adminMode&&this.canUpdateRoles()&&setTimeout(()=>{this.renderer.selectRootElement("#autoCompleteInput").focus()},100)}switchUserWithOldDest(t,e){this.http.get("../rest/users/"+t.itemSerialId+"/entities").pipe(Object(l.a)(t=>(t.entities=t.entities.filter(t=>"Y"===t.primary_entity).map(t=>t.id),t)),Object(mt.a)(i=>{let n=-1,a=!1,s=[];if(this.allowedEntities.forEach(t=>{i.entities.indexOf(t)>-1&&(a=!0,s.push(i.entities[i.entities.indexOf(t)]))}),a||"process"===this.target||"details"===this.target){if(this.diffList.dest.items.length>0){const t=this.diffList.dest.items[0];n=this.diffList[e.id].items.map(t=>t.itemSerialId).indexOf(t.itemSerialId),-1!==n||this.isItemInThisRole(t,e.id)||(t.item_mode=e.id,this.diffList[e.id].items.push(t))}const i=this.diffList[e.id].items.map((t,e)=>Object.assign(Object.assign({},t),{index:e})).filter(e=>e.itemSerialId===t.itemSerialId&&e.item_type===t.item_type);i.length>0&&this.diffList[e.id].items.splice(i[0].index,1),t.item_mode="dest",this.diffList.dest.items[0]=t,void 0!==this.diffFormControl&&this.setFormValues(),void 0!==this.triggerEvent&&this.triggerEvent.emit(s)}else this.dialog.open(qt.a,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.userUnauthorized"),msg:"<b>"+t.itemLabel+"</b> "+this.translate.instant("lang.notInAuthorizedEntities")}})})).subscribe()}changeUserRole(t,e,i){let n;n=this.diffList[e.id].items.map(t=>t.itemSerialId).indexOf(t.itemSerialId),n>-1&&this.diffList[e.id].items.splice(n,1),this.isItemInThisRole(t,i.id)||(t.item_mode=i.id,this.diffList[i.id].items.push(t)),void 0!==this.diffFormControl&&this.setFormValues()}setFormValues(){let t=[];Object.keys(this.diffList).forEach(e=>{t=t.concat(this.diffList[e].items.map(t=>({id:t.itemSerialId,mode:e,type:"user"===t.item_type?"user":"entity"})))}),this.diffFormControl.setValue(t),this.diffFormControl.markAsTouched()}canUpdateRoles(){return this.availableRoles.filter(t=>!0===t.canUpdate).length>0}isModified(){return JSON.stringify(this.listinstanceClone)!==JSON.stringify(this.getCurrentListinstance())}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(n.I),n.Qb(q.b),n.Qb(_t.a),n.Qb(y.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-diffusions-list"]],inputs:{resId:"resId",keepDestForRedirection:"keepDestForRedirection",entityId:"entityId",selfDest:"selfDest",category:"category",adminMode:"adminMode",allowedEntities:"allowedEntities",expanded:"expanded",customDiffusion:"customDiffusion",target:"target",diffFormControl:"diffFormControl"},outputs:{triggerEvent:"triggerEvent"},decls:3,vars:3,consts:[[4,"ngIf"],["style","display:flex;",4,"ngIf"],["appearance","ouline",3,"labelPlaceholder","routeDatas","targetSearchKey","subInfoKey","triggerEvent",4,"ngIf"],["style","text-align:center;font-size:24px;font-weight:bold;opacity:0.3;",4,"ngIf"],["class","alert-message alert-message-danger","role","alert",3,"innerHTML",4,"ngIf"],[4,"ngFor","ngForOf"],["appearance","ouline",3,"labelPlaceholder","routeDatas","targetSearchKey","subInfoKey","triggerEvent"],["test",""],[2,"text-align","center","font-size","24px","font-weight","bold","opacity","0.3"],["role","alert",1,"alert-message","alert-message-danger",3,"innerHTML"],["class","diffusionList",3,"expanded",4,"ngIf"],[1,"diffusionList",3,"expanded"],["disableRipple","","class","item-diffusion-list",4,"ngFor","ngForOf"],["disableRipple","",1,"item-diffusion-list"],["mat-list-icon","","color","primary",1,"fa"],[1,"item-diffusion"],["mat-line","",3,"title"],["mat-line","",1,"subInfo",3,"title"],["mat-icon-button","",3,"matMenuTriggerFor","title","click"],["color","primary",1,"fa","fa-edit"],["menuDestUserList","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["mat-menu-item","",3,"click"],["mat-button","",3,"matMenuTriggerFor","disabled"],[1,"fa","fa-chevron-down"],["menu","matMenu"],["mat-menu-item","","style","font-size:13px;",3,"click",4,"ngIf"],["mat-menu-item","",2,"font-size","13px",3,"click"],["mat-icon-button","","color","warn",3,"disabled","click"],[1,"fa","fa-trash",2,"height","auto"],[2,"display","flex"],[2,"margin","auto"],[2,"box-shadow","none"],["color","primary"],["matExpansionPanelContent",""],[2,"display","contents",3,"resId"]],template:function(t,e){1&t&&(n.Oc(0,Jf,5,4,"ng-container",0),n.Oc(1,Zf,2,0,"div",1),n.Oc(2,em,8,3,"ng-container",0)),2&t&&(n.oc("ngIf",!e.loading),n.Db(1),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading&&e.hasHistory))},directives:[P.t,P.s,ii,gt.c,gt.g,gt.h,R.a,R.d,S.a,R.c,W.l,k.b,ne.d,ne.e,ne.b,V.c,T.a,gt.e,Ef],pipes:[g.d],styles:[".cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);background:#fff;padding:10px}.cdk-drag-preview[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{display:none}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.columns[_ngcontent-%COMP%]:last-child{border:none}.cdk-list.cdk-drop-list-dragging[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.columns[_ngcontent-%COMP%]{cursor:move}.notDraggable[_ngcontent-%COMP%]{cursor:not-allowed}.notEditable[_ngcontent-%COMP%]{cursor:auto}.roleList[_ngcontent-%COMP%]{padding-bottom:40px}.diffusionList[_ngcontent-%COMP%]{box-shadow:none}.diffusionList[_ngcontent-%COMP%] .mat-expansion-panel-header-title[_ngcontent-%COMP%]{color:#4a4a4a;font-weight:700;font-size:13px}.diffusionList[_ngcontent-%COMP%] .item-diffusion-list[_ngcontent-%COMP%]{height:55px;margin-bottom:10px;background-color:hsla(0,0%,84.7%,.1);border-radius:10px;font-size:13px}.diffusionList[_ngcontent-%COMP%] .item-diffusion-list[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{font-size:13px;height:13px;width:13px;padding-right:10px}.diffusionList[_ngcontent-%COMP%] .item-diffusion-list[_ngcontent-%COMP%] .item-diffusion[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;justify-content:center;overflow:hidden}.diffusionList[_ngcontent-%COMP%] .item-diffusion-list[_ngcontent-%COMP%] .item-diffusion[_ngcontent-%COMP%] .mat-line[_ngcontent-%COMP%]{margin:0}.diffusionList[_ngcontent-%COMP%] .item-diffusion-list[_ngcontent-%COMP%] .subInfo[_ngcontent-%COMP%]{font-size:13px;opacity:.5}.diffusionList[_ngcontent-%COMP%] .item-diffusion-list[_ngcontent-%COMP%] .mat-button[_ngcontent-%COMP%]{background:#fff;font-size:13px;border:.5px solid rgba(74,74,74,.32);border-radius:29.5px;color:#4a4a4a} .roleListMenu .mat-menu-content{padding-top:0;padding-bottom:0;font-size:13px;color:#4a4a4a}"]}),t})();const nm=["appDiffusionsList"],am=["noteEditor"];function sm(t,e){1&t&&(n.Wb(0,"div",10),n.Rb(1,"mat-spinner",11),n.Vb())}function om(t,e){1&t&&(n.Wb(0,"b",13),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function rm(t,e){if(1&t&&(n.Wb(0,"b",13),n.Qc(1),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Rc(t.data.resource.chrono)}}function cm(t,e){if(1&t&&(n.Wb(0,"b",13),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function lm(t,e){if(1&t&&(n.Ub(0),n.Qc(1),n.ic(2,"translate"),n.Oc(3,om,3,3,"b",12),n.Oc(4,rm,2,1,"b",12),n.Oc(5,cm,3,4,"b",12),n.Qc(6," ?"),n.Rb(7,"br"),n.Tb()),2&t){const t=n.hc();n.Db(1),n.Sc(" ",n.jc(2,4,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===t.data.resIds.length),n.Db(1),n.oc("ngIf",1==t.data.resIds.length),n.Db(1),n.oc("ngIf",t.data.resIds.length>1)}}function dm(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",14),n.Wb(1,"div"),n.Wb(2,"button",15),n.dc("click",(function(){return n.Dc(t),n.hc().loadEntities()})),n.Rb(3,"i",16),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Wb(6,"div"),n.Wb(7,"button",15),n.dc("click",(function(){return n.Dc(t),n.hc().loadDestUser()})),n.Rb(8,"i",17),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Vb()}2&t&&(n.Db(4),n.Rc(n.jc(5,2,"lang.toAService")),n.Db(5),n.Rc(n.jc(10,4,"lang.toAnUser")))}function hm(t,e){1&t&&(n.Wb(0,"div"),n.Wb(1,"div",18),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Sc(" ",n.jc(3,1,"lang.noSettingsAvailable"),""))}function um(t,e){if(1&t&&(n.Wb(0,"div",19),n.Wb(1,"div",20),n.Wb(2,"h2"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"div",21),n.Wb(6,"mat-form-field",22),n.Rb(7,"input",23),n.ic(8,"translate"),n.Vb(),n.Rb(9,"div",24),n.Vb(),n.Vb(),n.Wb(10,"div",25),n.Wb(11,"h2",26),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Wb(14,"div",21),n.Rb(15,"app-diffusions-list",27,28),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(3),n.Sc("",n.jc(4,11,"lang.redirectTo")," :"),n.Db(3),n.Lc("font-size",10,"px"),n.Db(1),n.pc("placeholder",n.jc(8,13,"lang.searchEntities")),n.Db(4),n.pc("title",t.currentEntity.entity_label),n.Db(1),n.Tc("",n.jc(13,15,"lang.diffusionList"),' "',t.currentEntity.entity_label,'" : '),n.Db(3),n.oc("adminMode",!0)("resId",t.injectDatasParam.resId)("keepDestForRedirection",t.injectDatasParam.keepDestForRedirection)("target","redirect")}}function pm(t,e){if(1&t&&(n.Wb(0,"mat-option",38),n.Wb(1,"mat-list"),n.Wb(2,"mat-list-item"),n.Rb(3,"mat-icon",39),n.Wb(4,"h4",40),n.Qc(5),n.Vb(),n.Wb(6,"p",41),n.Qc(7),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(5),n.Rc(t.labelToDisplay),n.Db(2),n.Sc(" ",t.descriptionToDisplay," ")}}function bm(t,e){if(1&t&&(n.Wb(0,"mat-list"),n.Wb(1,"mat-list-item"),n.Rb(2,"mat-icon",42),n.Wb(3,"h4",40),n.Qc(4),n.Vb(),n.Wb(5,"p",43),n.Qc(6),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(4),n.Rc(t.destUser.labelToDisplay),n.Db(2),n.Sc(" ",t.destUser.descriptionToDisplay," ")}}function fm(t,e){1&t&&(n.Wb(0,"div",44),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noPerson")," "))}function mm(t,e){if(1&t&&(n.Wb(0,"div",45),n.Qc(1),n.ic(2,"translate"),n.Wb(3,"b"),n.Qc(4),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Sc("",n.jc(2,2,"lang.destinationChangingInfo")," "),n.Db(3),n.Rc(t.destUser.descriptionToDisplay)}}function gm(t,e){if(1&t&&(n.Wb(0,"div",45),n.Qc(1),n.ic(2,"translate"),n.Wb(3,"b"),n.Qc(4),n.Vb(),n.Qc(5),n.ic(6,"translate"),n.Wb(7,"b"),n.Qc(8),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Sc("",n.jc(2,4,"lang.destinationChangingInfoMass")," "),n.Db(3),n.Rc(t.destUser.labelToDisplay),n.Db(1),n.Sc(" ",n.jc(6,6,"lang.destinationChangingInfoMass2")," "),n.Db(3),n.Rc(t.destUser.descriptionToDisplay)}}function vm(t,e){if(1&t&&(n.Wb(0,"div",45),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3,"\xa0"),n.Rb(4,"span",46),n.ic(5,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.Rc(t.oldUser.labelToDisplay),n.Db(2),n.oc("innerHTML",n.jc(5,2,"lang.willBeAutomaticallyInCopy"),n.Ec)}}function _m(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",29),n.Wb(1,"mat-form-field",22),n.Wb(2,"input",30),n.dc("click",(function(){return n.Dc(t),n.hc().userRedirectCtrl.setValue("")})),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-autocomplete",31,32),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc().changeDest(e)})),n.Oc(6,pm,8,3,"mat-option",33),n.ic(7,"async"),n.Vb(),n.Vb(),n.Wb(8,"div",20),n.Wb(9,"h2",34),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Wb(12,"div",35),n.Oc(13,bm,7,2,"mat-list",4),n.Oc(14,fm,3,3,"div",36),n.Vb(),n.Vb(),n.Oc(15,mm,5,4,"div",37),n.Oc(16,gm,9,8,"div",37),n.Oc(17,vm,6,4,"div",37),n.Vb()}if(2&t){const t=n.zc(5),e=n.hc();n.Db(1),n.Lc("font-size",10,"px"),n.Db(1),n.pc("placeholder",n.jc(3,12,"lang.searchNewAssignee")),n.oc("matAutocomplete",t)("formControl",e.userRedirectCtrl),n.Db(4),n.oc("ngForOf",n.jc(7,14,e.filteredUserRedirect)),n.Db(4),n.Sc("",n.jc(11,16,"lang.newAssignee")," :"),n.Db(3),n.oc("ngIf",null!=e.destUser),n.Db(1),n.oc("ngIf",null==e.destUser),n.Db(1),n.oc("ngIf",e.isDestinationChanging&&1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.isDestinationChanging&&e.data.resIds.length>1),n.Db(1),n.oc("ngIf",e.keepDestForRedirection&&null!=e.oldUser)}}function ym(t,e){if(1&t&&(n.Wb(0,"div",29),n.Rb(1,"app-note-editor",47,48),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("resIds",t.data.resIds)}}function xm(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",52),n.dc("click",(function(){return n.Dc(t),n.hc(2).onSubmit()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(2);n.oc("disabled",t.checkValidity()),n.Db(1),n.Rc(n.jc(2,2,"lang.validate"))}}function Cm(t,e){if(1&t&&(n.Wb(0,"div",49),n.Oc(1,xm,3,4,"button",50),n.Wb(2,"button",51),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",""!=t.redirectMode),n.Db(1),n.oc("disabled",t.loading),n.Db(1),n.Rc(n.jc(4,3,"lang.cancel"))}}let Om=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functionsService=s,this.loading=!1,this.entities=[],this.injectDatasParam={resId:0,editable:!0,keepDestForRedirection:!1},this.destUser=null,this.oldUser=null,this.keepDestForRedirection=!1,this.currentDiffusionListDestRedirect=[],this.diffusionListDestRedirect=[],this.currentEntity={serialId:0,entity_label:""},this.redirectMode="",this.userListRedirect=[],this.userRedirectCtrl=new X.i,this.isDestinationChanging=!1}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.loading=!0,yield this.getEntities(),yield this.getDefaultEntity(),0===this.userListRedirect.length&&0===this.entities.filter(t=>t.allowed).length?(this.redirectMode="none",this.loading=!1):0===this.userListRedirect.length&&this.entities.filter(t=>t.allowed).length>0?this.loadEntities():this.userListRedirect.length>0&&0===this.entities.filter(t=>t.allowed).length?this.loadDestUser():this.loading=!1}))}getEntities(){return new Promise((t,e)=>{this.http.get(`../rest/resourcesList/users/${this.data.userId}/groups/${this.data.groupId}/baskets/${this.data.basketId}/actions/${this.data.action.id}/getRedirect`).pipe(Object(mt.a)(e=>{this.entities=e.entities,this.userListRedirect=e.users,this.keepDestForRedirection=e.keepDestForRedirection,this.injectDatasParam.keepDestForRedirection=e.keepDestForRedirection,t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}getDefaultEntity(){return new Promise((t,e)=>{1===this.data.resIds.length?this.http.get(`../rest/resources/${this.data.resIds[0]}/fields/destination?alt=true`).pipe(Object(mt.a)(e=>{this.functionsService.empty(e.field)?this.entities.filter(t=>t.state.selected).length>0&&(this.currentEntity=this.entities.filter(t=>t.state.selected)[0]):(this.currentEntity=this.entities.filter(t=>t.serialId===e.field)[0],this.entities=this.entities.map(t=>Object.assign(Object.assign({},t),{state:{selected:!1,opened:!1,disabled:t.state.disabled}}))),t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe():(this.currentEntity=this.entities.filter(t=>t.state.selected)[0],t(!0))})}loadEntities(){this.redirectMode="entity",1===this.data.resIds.length&&(this.injectDatasParam.resId=this.data.resIds[0]),this.loading=!1,setTimeout(()=>{$("#jstree").jstree({checkbox:{deselect_all:!0,three_state:!1},core:{force_text:!0,themes:{name:"proton",responsive:!0},multiple:!1,data:this.entities},plugins:["checkbox","search","sort"]});let t=!1;$("#jstree_search").keyup((function(){t&&clearTimeout(t),t=setTimeout((function(){const t=$("#jstree_search").val();$("#jstree").jstree(!0).search(t)}),250)})),$("#jstree").on("loaded.jstree",(t,e)=>{this.currentEntity.serialId>0&&($("#jstree").jstree("select_node",this.currentEntity),this.selectEntity(this.currentEntity,!0))}).on("select_node.jstree",(t,e)=>{this.selectEntity(e.node.original)}).on("deselect_node.jstree",(t,e)=>{$("#jstree").jstree("select_node",e.node.original)}).jstree()},0)}loadDestUser(){this.redirectMode="user",this.filteredUserRedirect=this.userRedirectCtrl.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>t?this._filterUserRedirect(t):this.userListRedirect.slice())),this.loading=!1,1===this.data.resIds.length?this.http.get("../rest/resources/"+this.data.resIds[0]+"/listInstance").subscribe(t=>{this.diffusionListDestRedirect=t.listInstance,Object.keys(t).forEach(e=>{t[e].forEach(t=>{"dest"===t.item_mode&&(this.oldUser=t)})}),$(".searchUserRedirect").click()},t=>{this.notify.handleErrors(t)}):(this.keepDestForRedirection=!1,setTimeout(()=>{$(".searchUserRedirect").click()},200))}changeDest(t){this.currentDiffusionListDestRedirect=this.diffusionListDestRedirect;const e=t.option.value;if(this.destUser={difflist_type:"entity_id",item_mode:"dest",item_type:"user_id",item_id:e.user_id,labelToDisplay:e.labelToDisplay,descriptionToDisplay:e.descriptionToDisplay},1===this.data.resIds.length){if(this.isDestinationChanging=!1,this.http.get("../rest/resources/"+this.data.resIds[0]+"/users/"+e.id+"/isDestinationChanging").subscribe(t=>{this.isDestinationChanging=t.isDestinationChanging},t=>{this.notify.handleErrors(t)}),this.keepDestForRedirection&&this.currentDiffusionListDestRedirect.length>0){let t=!1,e=null;this.currentDiffusionListDestRedirect.forEach(e=>{"cc"===e.item_mode&&e.item_id===this.oldUser.item_id&&(t=!0)}),t||(e=this.oldUser,e.item_mode="cc",this.currentDiffusionListDestRedirect.push(e))}this.currentDiffusionListDestRedirect.splice(this.currentDiffusionListDestRedirect.map(t=>t.item_mode).indexOf("dest"),1)}else this.isDestinationChanging=!0;this.currentDiffusionListDestRedirect.push(this.destUser),this.userRedirectCtrl.reset(),$(".searchUserRedirect").blur()}_filterUserRedirect(t){if("string"==typeof t){const e=t.toLowerCase();return this.userListRedirect.filter(t=>t.labelToDisplay.toLowerCase().indexOf(e)>=0)}}selectEntity(t,e=!1){this.currentEntity=t,this.appDiffusionsList.loadListModel(t.serialId,e)}onSubmit(){this.loading=!0,this.data.resIds.length>0&&this.executeAction()}executeAction(){"user"===this.redirectMode?this.http.put(this.data.processActionRoute,{resources:this.data.resIds,data:{onlyRedirectDest:!0,listInstances:this.currentDiffusionListDestRedirect},note:this.noteEditor.getNote()}).pipe(Object(mt.a)(t=>{t&&null!=t.errors&&this.notify.error(t.errors),this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe():this.http.put(this.data.processActionRoute,{resources:this.data.resIds,data:{listInstances:this.appDiffusionsList.getCurrentListinstance()},note:this.noteEditor.getNote()}).pipe(Object(mt.a)(t=>{t&&null!=t.errors&&this.notify.error(t.errors),this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}checkValidity(){return!("entity"===this.redirectMode&&this.appDiffusionsList&&this.appDiffusionsList.getDestUser().length>0&&this.currentEntity.serialId>0&&!this.loading||"user"===this.redirectMode&&this.currentDiffusionListDestRedirect.length>0&&null!=this.destUser&&!this.loading)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Xc(nm,!0),n.Xc(am,!0)),2&t&&(n.yc(i=n.ec())&&(e.appDiffusionsList=i.first),n.yc(i=n.ec())&&(e.noteEditor=i.first))},decls:13,vars:11,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[4,"ngIf"],["class","chooseMode",4,"ngIf"],["class","row","style","display: flex;",4,"ngIf"],["class","row",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","","class","actions",4,"ngIf"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary","class","highlight",4,"ngIf"],["color","primary",1,"highlight"],[1,"chooseMode"],["mat-stroked-button","","color","primary",3,"click"],[1,"fa","fa-sitemap"],[1,"fa","fa-user"],["role","alert",1,"alert-message","alert-message-danger",2,"margin-top","30px"],[1,"row",2,"display","flex"],[1,"redirectContent",2,"flex","2"],[1,"contentEntities"],["appearance","outline","floatLabel","never"],["matInput","","id","jstree_search","name","jstree_search","type","text",3,"placeholder"],["id","jstree"],[1,"redirectContent",2,"flex","1","overflow","auto"],[3,"title"],[3,"adminMode","resId","keepDestForRedirection","target"],["appDiffusionsList",""],[1,"row"],["matInput","",1,"searchUserRedirect",3,"placeholder","matAutocomplete","formControl","click"],["isOpen","true",3,"optionSelected"],["auto","matAutocomplete"],[3,"value",4,"ngFor","ngForOf"],[2,"top","-5px"],[1,"contentUser"],["class","noSelection",4,"ngIf"],["class","alert-message alert-message-info","role","alert","style","margin-top: 30px;",4,"ngIf"],[3,"value"],["mat-list-icon","","color","primary",1,"fa","fa-user",2,"padding-top","0px"],["mat-line",""],["mat-line","",2,"opacity","0.5","line-height","15px","font-size","10px"],["mat-list-icon","","color","primary",1,"fa","fa-2x","fa-user"],["mat-line","",2,"opacity","0.5"],[1,"noSelection"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","30px"],[3,"innerHTML"],[3,"resIds"],["noteEditor",""],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click",4,"ngIf"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,sm,2,0,"div",3),n.Oc(5,lm,8,6,"ng-container",4),n.Oc(6,dm,11,6,"div",5),n.Oc(7,hm,4,3,"div",4),n.Oc(8,um,17,17,"div",6),n.Oc(9,_m,18,18,"div",7),n.Oc(10,ym,3,1,"div",7),n.Vb(),n.Rb(11,"span",8),n.Oc(12,Cm,5,5,"div",9),n.Vb()),2&t&&(n.Db(2),n.Sc('"',e.data.action.label,'"'),n.Db(1),n.Ib("fullWidth","entity"==e.redirectMode),n.Db(1),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("ngIf",""==e.redirectMode&&!e.loading),n.Db(1),n.oc("ngIf","none"==e.redirectMode&&!e.loading),n.Db(1),n.oc("ngIf","entity"==e.redirectMode),n.Db(1),n.oc("ngIf","user"==e.redirectMode),n.Db(1),n.oc("ngIf",""!=e.redirectMode&&"none"!=e.redirectMode),n.Db(2),n.oc("ngIf",!e.loading))},directives:[q.i,q.f,P.t,V.c,k.b,Y.c,J.b,im,Ne.d,X.d,X.u,X.j,Ne.a,P.s,W.p,R.a,R.d,S.a,R.c,W.l,Du,q.c,q.d],pipes:[g.d,P.b],styles:[".fullWidth[_ngcontent-%COMP%]{width:70vw}.highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:1;overflow:hidden}.redirectContent[_ngcontent-%COMP%]{position:relative}.redirectContent[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:5px;left:30px;margin:0;padding:0 5px;color:#135f7f}.contentEntities[_ngcontent-%COMP%]{overflow:auto;height:60vh}.contentEntities[_ngcontent-%COMP%], .contentUser[_ngcontent-%COMP%]{background:#fff;border-radius:4px;border:1px solid #ccc;margin:10px;padding:10px}.contentEntitiesList[_ngcontent-%COMP%]{background:#fff;margin:10px;padding:10px;overflow:auto;height:60vh}.chooseMode[_ngcontent-%COMP%], .chooseMode[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:flex;justify-content:center}.chooseMode[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{flex:1}.chooseMode[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:10px;margin:10px;width:200px}.chooseMode[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{padding-right:10px}.noSelection[_ngcontent-%COMP%]{text-align:center;opacity:.5;font-style:italic}"]}),t})();const Dm=["noteEditor"];function wm(t,e){1&t&&(n.Wb(0,"div",10),n.Rb(1,"mat-spinner",11),n.Vb())}function Mm(t,e){if(1&t&&(n.Wb(0,"div",12),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Sc(" ",n.jc(2,1,"lang."+t.fatalError.reason)," ")}}function km(t,e){if(1&t&&(n.Wb(0,"li"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t," ")}}function Sm(t,e){if(1&t&&(n.Wb(0,"div",12),n.Qc(1),n.ic(2,"translate"),n.Rb(3,"br"),n.Wb(4,"div",13),n.Wb(5,"ul"),n.Oc(6,km,2,1,"li",14),n.Vb(),n.Vb(),n.Rb(7,"span",15),n.ic(8,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Sc(" ",n.jc(2,3,"lang.noShippingTemplate")," :"),n.Db(5),n.oc("ngForOf",t.entitiesList),n.Db(1),n.oc("innerHTML",n.jc(8,5,"lang.doShippingParameter"),n.Ec)}}function Im(t,e){1&t&&(n.Wb(0,"b",31),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function Pm(t,e){if(1&t&&(n.Wb(0,"b",31),n.Qc(1),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Rc(t.data.resource.chrono)}}function Vm(t,e){if(1&t&&(n.Wb(0,"b",31),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function Rm(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-checkbox",34),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).toggleIntegration(i.key)})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(3);n.oc("checked",i.data.resource.integrations[t.key]),n.Db(1),n.Sc("",n.jc(2,2,"lang."+t.key+"_doc")," ")}}function jm(t,e){if(1&t&&(n.Wb(0,"div",32),n.Oc(1,Rm,3,4,"mat-checkbox",33),n.ic(2,"keyvalue"),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("ngForOf",n.jc(2,1,t.integrationsInfo))}}function Am(t,e){if(1&t&&(n.Wb(0,"mat-option",35),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t.label," ")}}function Wm(t,e){if(1&t&&(n.Wb(0,"div",19),n.Wb(1,"div"),n.Wb(2,"div",36),n.Wb(3,"b"),n.Qc(4),n.Vb(),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(4),n.Rc(t.attachList.length),n.Db(1),n.Sc(" ",n.jc(6,2,"lang.shippingReadyToSend")," ")}}function Tm(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.chrono),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function Em(t,e){if(1&t&&(n.Wb(0,"div",19),n.Wb(1,"div"),n.Wb(2,"div",12),n.Wb(3,"p"),n.Wb(4,"b"),n.Qc(5),n.Vb(),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Wb(8,"ul"),n.Oc(9,Tm,5,4,"li",14),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(5),n.Rc(t.mailsNotSend.length),n.Db(1),n.Sc(" ",n.jc(7,3,"lang.shippingNotEligible")," : "),n.Db(3),n.oc("ngForOf",t.mailsNotSend)}}function Fm(t,e){if(1&t&&(n.Wb(0,"li"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",n.jc(2,1,"lang.maileva_"+t)," ")}}function Lm(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",19),n.Wb(1,"div",37),n.Wb(2,"div",38),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"div",39),n.Wb(6,"div",40),n.Wb(7,"div",41),n.Wb(8,"p"),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Wb(11,"ul"),n.Wb(12,"li"),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(15,"div",41),n.Wb(16,"p"),n.Qc(17),n.ic(18,"translate"),n.Vb(),n.Wb(19,"ul"),n.Oc(20,Fm,3,3,"li",14),n.Vb(),n.Vb(),n.Vb(),n.Wb(21,"mat-form-field",42),n.Wb(22,"input",43),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).currentShipping.fee=e})),n.ic(23,"translate"),n.Vb(),n.Wb(24,"span",44),n.Qc(25,"\xa0\u20ac"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(3),n.Sc(" ",n.jc(4,7,"lang.pricesInformations")," "),n.Db(6),n.Sc(" ",n.jc(10,9,"lang.sendMode")," : "),n.Db(4),n.Sc(" ",n.jc(14,11,"lang.maileva_"+t.currentShipping.options.sendMode)," "),n.Db(4),n.Sc(" ",n.jc(18,13,"lang.shapingOptions")," : "),n.Db(3),n.oc("ngForOf",t.currentShipping.options.shapingOptions),n.Db(2),n.pc("title",n.jc(23,15,"lang.totalPrice")),n.oc("ngModel",t.currentShipping.fee)}}function Qm(t,e){if(1&t&&(n.Rb(0,"img",45),n.ic(1,"async"),n.ic(2,"secureUrl")),2&t){const t=e.$implicit;n.rc("title","",t.chrono," : ",t.title,""),n.oc("src",n.jc(1,3,n.jc(2,5,"../rest/"+("attachment"===t.type?"attachments":"resources")+"/"+t.res_id+"/thumbnail")),n.Gc)}}function Nm(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-sidenav-container",16),n.Wb(1,"mat-sidenav-content",17),n.Wb(2,"div",18),n.Wb(3,"div",19),n.Qc(4),n.ic(5,"translate"),n.Oc(6,Im,3,3,"b",20),n.Oc(7,Pm,2,1,"b",20),n.Oc(8,Vm,3,4,"b",20),n.Qc(9," ? "),n.Vb(),n.Oc(10,jm,3,3,"div",21),n.Wb(11,"div",22),n.Wb(12,"mat-form-field"),n.Wb(13,"mat-label"),n.Qc(14),n.ic(15,"translate"),n.Vb(),n.Wb(16,"mat-select",23),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().currentShipping=e})),n.Oc(17,Am,2,2,"mat-option",24),n.Vb(),n.Vb(),n.Vb(),n.Oc(18,Wm,7,4,"div",25),n.Oc(19,Em,10,5,"div",25),n.Oc(20,Lm,26,17,"div",25),n.Wb(21,"div",19),n.Rb(22,"app-note-editor",26,27),n.Vb(),n.Vb(),n.Vb(),n.Wb(24,"mat-sidenav",28),n.Wb(25,"div",29),n.Oc(26,Qm,3,7,"img",30),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(4),n.Sc(" ",n.jc(5,14,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===t.data.resIds.length),n.Db(1),n.oc("ngIf",1==t.data.resIds.length),n.Db(1),n.oc("ngIf",t.data.resIds.length>1),n.Db(2),n.oc("ngIf",t.data.resIds.length>0),n.Db(4),n.Rc(n.jc(15,16,"lang.shippings")),n.Db(2),n.oc("ngModel",t.currentShipping),n.Db(1),n.oc("ngForOf",t.shippings),n.Db(1),n.oc("ngIf",t.attachList.length>0),n.Db(1),n.oc("ngIf",t.mailsNotSend.length>0),n.Db(1),n.oc("ngIf",null!=t.currentShipping),n.Db(2),n.oc("resIds",t.data.resIds),n.Db(2),n.oc("opened",t.attachList.length>0),n.Db(2),n.oc("ngForOf",t.attachList)}}let zm=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.loading=!1,this.shippings=[{label:"",description:"",options:{shapingOptions:[],sendMode:""},fee:0,account:{id:"",password:""}}],this.currentShipping=null,this.entitiesList=[],this.attachList=[],this.mailsNotSend=[],this.integrationsInfo={inShipping:{icon:"fas fa-shipping-fast"}},this.fatalError=""}ngOnInit(){this.loading=!0,this.checkShipping()}onSubmit(){this.loading=!0,this.data.resIds.length>0&&this.executeAction()}checkShipping(){this.http.post(`../rest/resourcesList/users/${this.data.userId}/groups/${this.data.groupId}/baskets/${this.data.basketId}/actions/${this.data.action.id}/checkShippings`,{resources:this.data.resIds}).pipe(Object(mt.a)(t=>{this.functions.empty(t.fatalError)?(this.shippings=t.shippingTemplates,this.mailsNotSend=t.canNotSend,this.entitiesList=t.entities,this.attachList=t.resources):(this.fatalError=t,this.shippings=[])}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(),Object(c.a)(!1)))).subscribe()}executeAction(){let t=this.attachList.filter(t=>"attachment"===t.type).map(t=>t.res_id_master);t=t.concat(this.attachList.filter(t=>"mail"===t.type).map(t=>t.res_id)),this.http.put(this.data.processActionRoute,{resources:t,data:{shippingTemplateId:this.currentShipping.id},note:this.noteEditor.getNote()}).pipe(Object(mt.a)(e=>{e&&null!=e.errors?this.notify.error(e.errors):this.dialogRef.close(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}toggleIntegration(t){this.http.put("../rest/resourcesList/integrations",{resources:this.data.resIds,integrations:{[t]:!this.data.resource.integrations[t]}}).pipe(Object(mt.a)(()=>{this.data.resource.integrations[t]=!this.data.resource.integrations[t],this.checkShipping()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Xc(Dm,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:16,vars:17,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],["class","alert-message alert-message-danger mailList","role","alert",4,"ngIf"],["autosize","","style","height:100%;",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["role","alert",1,"alert-message","alert-message-danger","mailList"],[1,"mailList"],[4,"ngFor","ngForOf"],[3,"innerHTML"],["autosize","",2,"height","100%"],[2,"background","white"],[1,"row",2,"margin","0"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],["style","padding:10px;display: flex;flex-direction: column;",4,"ngIf"],[1,"col-md-12",2,"padding-top","10px"],["name","currentShipping","required","",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["class","col-md-12",4,"ngIf"],[3,"resIds"],["noteEditor",""],["mode","side","fixedTopGap","56","position","end",2,"width","50%",3,"opened"],[1,"pjList"],[3,"title","src",4,"ngFor","ngForOf"],["color","primary",1,"highlight"],[2,"padding","10px","display","flex","flex-direction","column"],["color","primary",3,"checked","click",4,"ngFor","ngForOf"],["color","primary",3,"checked","click"],[3,"value"],["role","alert",1,"alert-message","alert-message-info","mailList"],[1,"formType",2,"flex-direction","column"],[1,"formType-title"],[1,"priceContent"],[1,"priceInfo"],[1,"col-md-6"],["appearance","outline"],["matInput","","required","","name","totalPrice","id","totalPrice","type","number","disabled","",3,"ngModel","title","ngModelChange"],["matSuffix",""],[3,"title","src"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,wm,2,0,"div",3),n.Oc(5,Mm,3,3,"div",4),n.Oc(6,Sm,9,7,"div",4),n.Oc(7,Nm,27,18,"mat-sidenav-container",5),n.Vb(),n.Rb(8,"span",6),n.Wb(9,"div",7),n.Wb(10,"button",8),n.dc("click",(function(){return e.onSubmit()})),n.Qc(11),n.ic(12,"translate"),n.Vb(),n.Wb(13,"button",9),n.Qc(14),n.ic(15,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(1),n.Ib("fullWidth",e.shippings.length>0)("fullHeight",e.shippings.length>0),n.Db(1),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.functions.empty(e.fatalError)),n.Db(1),n.oc("ngIf",e.functions.empty(e.fatalError)&&0==e.shippings.length),n.Db(1),n.oc("ngIf",e.shippings.length>0),n.Db(3),n.oc("disabled",e.loading||null==e.currentShipping||0==e.attachList.length),n.Db(1),n.Rc(n.jc(12,13,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(15,15,"lang.cancel")))},directives:[q.i,q.f,P.t,q.c,k.b,q.d,V.c,P.s,I.e,I.f,Y.c,Y.g,ee.a,X.F,X.u,X.x,Du,I.d,j.a,W.p,J.b,X.A,X.d,Y.j],pipes:[g.d,P.l,P.b,si],styles:[".fullHeight[_ngcontent-%COMP%]{height:70vh}.fullWidth[_ngcontent-%COMP%]{width:70vw}.highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:2;overflow:hidden}.mailList[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{font-size:12px;max-height:100px;overflow:auto;padding-left:25px;padding-right:5px;padding-bottom:10px;margin-top:10px}.mailList[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;text-decoration:underline}.mailList[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{font-size:120%}.formType[_ngcontent-%COMP%]{align-items:center;display:flex;margin:10px;border-radius:4px;border:1px solid #ccc;position:relative;padding:10px}.formType-title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:-7px;left:10px;padding:0;margin:0;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-form-field-suffix{color:#f99830;font-size:15px;top:0}.formType[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.priceContent[_ngcontent-%COMP%]{align-items:center;width:100%}.priceContent[_ngcontent-%COMP%], .priceContent-label[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.priceContent-label[_ngcontent-%COMP%]{text-align:right;color:#135f7f;flex:1;padding-right:10px}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:90px!important}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.priceInfo[_ngcontent-%COMP%]{padding-right:20px;font-size:10px;opacity:.5;width:100%}.pjList[_ngcontent-%COMP%]{display:flex;width:100%;overflow:auto;flex-direction:column;background:#666}.pjList[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin:10px}"]}),t})();const Bm=["noteEditor"];function Um(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Vb())}function $m(t,e){if(1&t&&(n.Wb(0,"b",17),n.Qc(1),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Rc(t.data.resource.chrono)}}function Hm(t,e){if(1&t&&(n.Wb(0,"b",17),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function Gm(t,e){if(1&t&&(n.Wb(0,"li"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t," ")}}function Xm(t,e){if(1&t&&(n.Wb(0,"div"),n.Wb(1,"div",18),n.Wb(2,"p"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"ul"),n.Oc(6,Gm,2,1,"li",19),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(3),n.Sc(" ",n.jc(4,2,"lang.hasNoEntity")," : "),n.Db(3),n.oc("ngForOf",t.resourcesInfo.withoutEntity)}}function qm(t,e){1&t&&(n.Wb(0,"div"),n.Wb(1,"div",20),n.Wb(2,"p"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Sc(" ",n.jc(4,1,"lang.destUserSetToDefault")," "))}function Km(t,e){if(1&t&&(n.Wb(0,"div",7),n.Oc(1,Um,2,0,"div",8),n.Wb(2,"div",9),n.Wb(3,"div",10),n.Qc(4),n.ic(5,"translate"),n.Oc(6,$m,2,1,"b",11),n.Oc(7,Hm,3,4,"b",11),n.Qc(8," ? "),n.Oc(9,Xm,7,4,"div",12),n.Oc(10,qm,5,3,"div",12),n.Vb(),n.Wb(11,"div",10),n.Rb(12,"app-note-editor",13,14),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.loading),n.Db(3),n.Sc(" ",n.jc(5,7,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",1==t.data.resIds.length),n.Db(1),n.oc("ngIf",t.data.resIds.length>1),n.Db(2),n.oc("ngIf",t.resourcesInfo.withoutEntity.length>0),n.Db(1),n.oc("ngIf",t.resourcesInfo.withEntity.length>0),n.Db(2),n.oc("resIds",t.data.resIds)}}let Ym=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.loading=!1,this.loadingInit=!1,this.resourcesInfo={withEntity:[],withoutEntity:[]}}ngOnInit(){this.loadingInit=!0,this.http.post("../rest/resourcesList/users/"+this.data.userId+"/groups/"+this.data.groupId+"/baskets/"+this.data.basketId+"/checkInitiatorEntity",{resources:this.data.resIds}).subscribe(t=>{this.resourcesInfo=t,this.loadingInit=!1},t=>{this.notify.error(t.error.errors),this.loadingInit=!1,this.dialogRef.close()})}onSubmit(){this.loading=!0,this.executeAction()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.resourcesInfo.withEntity,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(t=>{t&&null!=t.errors&&this.notify.error(t.errors),this.dialogRef.close(this.resourcesInfo.withEntity)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Xc(Bm,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:12,vars:10,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content","",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],[4,"ngIf"],[3,"resIds"],["noteEditor",""],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"],["role","alert",1,"alert-message","alert-message-danger","acknowledgementList"],[4,"ngFor","ngForOf"],["role","alert",1,"alert-message","alert-message-success"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Oc(3,Km,14,9,"div",2),n.Rb(4,"span",3),n.Wb(5,"div",4),n.Wb(6,"button",5),n.dc("click",(function(){return e.onSubmit()})),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Wb(9,"button",6),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(1),n.oc("ngIf",!e.loadingInit),n.Db(3),n.oc("disabled",e.loading||0==e.resourcesInfo.withEntity.length),n.Db(1),n.Rc(n.jc(8,6,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(11,8,"lang.cancel")))},directives:[q.i,P.t,q.c,k.b,q.d,q.f,Du,V.c,P.s],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:1;overflow:hidden}.acknowledgementList[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{font-size:12px;max-height:100px;overflow:auto;padding-left:25px;padding-right:5px;padding-bottom:10px;margin-top:10px}.acknowledgementList[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;text-decoration:underline}.acknowledgementList[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{font-size:120%}"]}),t})();const Jm=["noteEditor"];function Zm(t,e){1&t&&(n.Wb(0,"div",16),n.Rb(1,"mat-spinner",17),n.Vb())}function tg(t,e){if(1&t&&(n.Wb(0,"b",18),n.Qc(1),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Rc(t.data.resource.chrono)}}function eg(t,e){if(1&t&&(n.Wb(0,"b",18),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function ig(t,e){if(1&t&&(n.Wb(0,"li"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t," ")}}function ng(t,e){if(1&t&&(n.Wb(0,"div"),n.Wb(1,"div",19),n.Wb(2,"p"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"ul"),n.Oc(6,ig,2,1,"li",20),n.Vb(),n.Vb(),n.Wb(7,"div",21),n.Wb(8,"p"),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(3),n.Sc(" ",n.jc(4,3,"lang.hasNoAttachmentsNotes")," : "),n.Db(3),n.oc("ngForOf",t.resourcesInfo.noAttachmentsNotes),n.Db(3),n.Sc(" ",n.jc(10,5,"lang.closeMailAddNoteMandatory")," ")}}function ag(t,e){if(1&t&&(n.Wb(0,"div",7),n.Oc(1,Zm,2,0,"div",8),n.Wb(2,"div",9),n.Wb(3,"div",10),n.Qc(4),n.ic(5,"translate"),n.Oc(6,tg,2,1,"b",11),n.Oc(7,eg,3,4,"b",11),n.Qc(8," ? "),n.Rb(9,"div",12),n.ic(10,"translate"),n.Oc(11,ng,11,7,"div",13),n.Vb(),n.Wb(12,"div",10),n.Rb(13,"app-note-editor",14,15),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.loading),n.Db(3),n.Sc(" ",n.jc(5,7,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",1==t.data.resIds.length),n.Db(1),n.oc("ngIf",t.data.resIds.length>1),n.Db(2),n.oc("innerHTML",n.jc(10,9,"lang.updateClosingDate"),n.Ec),n.Db(2),n.oc("ngIf",t.resourcesInfo.noAttachmentsNotes.length>0),n.Db(2),n.oc("resIds",t.data.resIds)}}let sg=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.loading=!1,this.loadingInit=!1,this.resourcesInfo={withEntity:[],withoutEntity:[]}}ngOnInit(){this.loadingInit=!0,this.http.post("../rest/resourcesList/users/"+this.data.userId+"/groups/"+this.data.groupId+"/baskets/"+this.data.basketId+"/checkAttachmentsAndNotes",{resources:this.data.resIds}).subscribe(t=>{this.resourcesInfo=t,this.loadingInit=!1},t=>{this.notify.error(t.error.errors),this.loadingInit=!1})}onSubmit(){this.loading=!0,this.executeAction()}checkNote(){return!(!this.noteEditor||!this.noteEditor.getNoteContent())}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.data.resIds,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(t=>{t&&null!=t.errors&&this.notify.error(t.errors),this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Xc(Jm,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:12,vars:10,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content","",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","30px",3,"innerHTML"],[4,"ngIf"],[3,"resIds"],["noteEditor",""],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"],["role","alert",1,"alert-message","alert-message-info","acknowledgementList"],[4,"ngFor","ngForOf"],["role","alert",1,"alert-message","alert-message-danger"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Oc(3,ag,15,11,"div",2),n.Rb(4,"span",3),n.Wb(5,"div",4),n.Wb(6,"button",5),n.dc("click",(function(){return e.onSubmit()})),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Wb(9,"button",6),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(1),n.oc("ngIf",!e.loadingInit),n.Db(3),n.oc("disabled",e.loading||void 0!==e.resourcesInfo.noAttachmentsNotes&&e.resourcesInfo.noAttachmentsNotes.length>0&&!e.checkNote()),n.Db(1),n.Rc(n.jc(8,6,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(11,8,"lang.cancel")))},directives:[q.i,P.t,q.c,k.b,q.d,q.f,Du,V.c,P.s],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:1;overflow:hidden}.acknowledgementList[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{font-size:12px;max-height:100px;overflow:auto;padding-left:25px;padding-right:5px;padding-bottom:10px;margin-top:10px}.acknowledgementList[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;text-decoration:underline}.acknowledgementList[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{font-size:120%}"]}),t})();var og=i("jaxi");let rg=(()=>{class t{constructor(t){this.latinisePipe=t}transform(t,e,i){if(void 0!==i){let n=e.toLocaleLowerCase();return n?t.filter(t=>-1!=this.latinisePipe.transform(t[i].toLocaleLowerCase()).indexOf(this.latinisePipe.transform(n))):t}console.log("Init filter failed for values : "),console.log(t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(Tt.c))},t.\u0275pipe=n.Pb({name:"filterList",type:t,pure:!0}),t})();function cg(t,e){1&t&&(n.Ub(0),n.Wb(1,"div",2),n.Rb(2,"mat-spinner"),n.Vb(),n.Tb())}function lg(t,e){1&t&&(n.Wb(0,"div",9),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noAttachment")," "))}function dg(t,e){if(1&t&&(n.Wb(0,"mat-button-toggle",11),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(3);n.oc("checked",i.currentFilter===t.id)("value",t.id),n.Db(1),n.Sc("",t.label," ")}}function hg(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-button-toggle-group",10),n.dc("change",(function(e){return n.Dc(t),n.hc(2).filterType(e)})),n.Wb(1,"mat-button-toggle",11),n.Qc(2,"Tous"),n.Vb(),n.Oc(3,dg,2,3,"mat-button-toggle",12),n.ic(4,"sortBy"),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.oc("checked",""===t.currentFilter)("value",""),n.Db(2),n.oc("ngForOf",n.kc(4,3,t.filterAttachTypes,"label"))}}function ug(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",34),n.dc("click",(function(e){n.Dc(t);const i=n.hc(2).$implicit,a=n.hc(2);return e.stopPropagation(),a.deleteAttachment(i)})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.deleteResource")))}function pg(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",31),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).showAttachment(e)})),n.Wb(1,"button",32),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc(2);return e.stopPropagation(),a.showAttachment(i)})),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Oc(4,ug,3,3,"button",33),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc(2);n.oc("@myAnimation",void 0),n.Db(2),n.Rc(n.jc(3,3,"lang.viewResource")),n.Db(2),n.oc("ngIf","reply_record_management"!==t.type&&"acknowledgement_record_management"!==t.type&&"SIGN"!==t.status&&"FRZ"!==t.status&&t.canDelete&&(e.canModify||null===e.canModify))}}function bg(t,e){if(1&t&&(n.Wb(0,"span",35),n.Qc(1),n.ic(2,"translate"),n.Wb(3,"b",36),n.Qc(4),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Sc("",n.jc(2,2,"lang.version")," "),n.Db(3),n.Rc(t.relation)}}function fg(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Rb(1,"mat-divider"),n.Wb(2,"button",37),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).openMaarchParapheurWorkflow(e)})),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Tb()}2&t&&(n.Db(3),n.Sc(" ",n.jc(4,1,"lang.externalVisaWorkflow")," "))}function mg(t,e){1&t&&(n.Rb(0,"i",38),n.ic(1,"translate")),2&t&&n.pc("title",n.jc(1,1,"lang.inSignatureBook"))}function gg(t,e){1&t&&(n.Rb(0,"i",39),n.ic(1,"translate")),2&t&&n.pc("title",n.jc(1,1,"lang.inShipping"))}function vg(t,e){if(1&t&&(n.Wb(0,"div",40),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Sc(" ",t.chrono,"\xa0 ")}}function _g(t,e){if(1&t&&(n.Wb(0,"div",40),n.Qc(1),n.ic(2,"shorten"),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Sc(" ",n.lc(2,1,t.title,40,"...")," ")}}function yg(t,e){if(1&t&&(n.Wb(0,"div",41),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Sc(" ",t.typeLabel," ")}}function xg(t,e){if(1&t&&(n.Ub(0),n.Qc(1),n.ic(2,"translate"),n.Wb(3,"b"),n.Qc(4),n.ic(5,"timeAgo"),n.Vb(),n.Qc(6),n.ic(7,"lowercase"),n.ic(8,"translate"),n.Wb(9,"b"),n.Qc(10),n.Vb(),n.Tb()),2&t){const t=n.hc(2).$implicit;n.Db(1),n.Sc(" ",n.jc(2,4,"lang.signedAlt")," "),n.Db(3),n.Rc(n.kc(5,6,t.signDate,"full")),n.Db(2),n.Sc(" ",n.jc(7,9,n.jc(8,11,"lang.by"))," "),n.Db(4),n.Rc(t.signatory)}}function Cg(t,e){if(1&t&&(n.Ub(0),n.Qc(1),n.ic(2,"translate"),n.Wb(3,"b"),n.Qc(4),n.ic(5,"timeAgo"),n.Vb(),n.Qc(6),n.ic(7,"lowercase"),n.ic(8,"translate"),n.Wb(9,"b"),n.Qc(10),n.Vb(),n.Tb()),2&t){const t=n.hc(3).$implicit;n.Db(1),n.Sc(" ",n.jc(2,4,"lang.modified")," "),n.Db(3),n.Rc(n.kc(5,6,t.modificationDate,"full")),n.Db(2),n.Sc(" ",n.jc(7,9,n.jc(8,11,"lang.by"))," "),n.Db(4),n.Rc(t.modifiedBy)}}function Og(t,e){if(1&t&&(n.Qc(0),n.ic(1,"translate"),n.Wb(2,"b"),n.Qc(3),n.ic(4,"timeAgo"),n.Vb(),n.Qc(5),n.ic(6,"lowercase"),n.ic(7,"translate"),n.Wb(8,"b"),n.Qc(9),n.Vb()),2&t){const t=n.hc(3).$implicit;n.Sc(" ",n.jc(1,4,"lang.created")," "),n.Db(3),n.Rc(n.kc(4,6,t.creationDate,"full")),n.Db(2),n.Sc(" ",n.jc(6,9,n.jc(7,11,"lang.by"))," "),n.Db(4),n.Rc(t.typistLabel)}}function Dg(t,e){if(1&t&&(n.Oc(0,Cg,11,13,"ng-container",0),n.Oc(1,Og,10,13,"ng-template",null,43,n.Pc)),2&t){const t=n.zc(2),e=n.hc(2).$implicit;n.oc("ngIf",null!==e.modificationDate)("ngIfElse",t)}}function wg(t,e){if(1&t&&(n.Wb(0,"div",41),n.Oc(1,xg,11,13,"ng-container",0),n.Oc(2,Dg,3,2,"ng-template",null,42,n.Pc),n.Vb()),2&t){const t=n.zc(3),e=n.hc().$implicit;n.Db(1),n.oc("ngIf",void 0!==e.signDate)("ngIfElse",t)}}function Mg(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",13),n.dc("mouseover",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.toggleInfo(a,!0)})),n.ic(1,"async"),n.ic(2,"secureUrl"),n.Oc(3,pg,5,5,"div",14),n.Wb(4,"div",15),n.Oc(5,bg,5,4,"span",16),n.Wb(6,"button",17),n.Rb(7,"mat-icon",18),n.Vb(),n.Wb(8,"mat-menu",null,19),n.Wb(10,"button",20),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).setInSignatureBook(i)})),n.Wb(11,"mat-checkbox",21),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.inSignatureBook=i})),n.Vb(),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Wb(14,"button",20),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).setInSendAttachment(i)})),n.Wb(15,"mat-checkbox",22),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.inSendAttach=i})),n.Vb(),n.Qc(16),n.ic(17,"translate"),n.Vb(),n.Oc(18,fg,5,3,"ng-container",23),n.Vb(),n.Vb(),n.Wb(19,"div",24),n.Wb(20,"div",25),n.Oc(21,mg,2,3,"i",26),n.Qc(22,"\xa0 "),n.Oc(23,gg,2,3,"i",27),n.Vb(),n.Oc(24,vg,2,1,"div",28),n.Oc(25,_g,3,5,"div",28),n.Oc(26,yg,2,1,"div",29),n.Oc(27,wg,4,2,"div",29),n.Wb(28,"div",30),n.Qc(29),n.ic(30,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.zc(9),a=n.hc(2);n.Lc("background-image","url("+n.jc(1,22,n.jc(2,24,t.thumbnailUrl))+")"),n.Ib("signed","SIGN"===t.status),n.Db(3),n.oc("ngIf",t.hideMainInfo),n.Db(2),n.oc("ngIf",t.relation>1),n.Db(1),n.oc("matMenuTriggerFor",i),n.Db(4),n.oc("disabled","FRZ"===t.status),n.Db(1),n.oc("ngModel",t.inSignatureBook),n.Db(1),n.Sc(" ",n.jc(13,26,"lang.putInSignatureBook")," "),n.Db(2),n.oc("disabled",!a.mailevaEnabled),n.Db(1),n.oc("ngModel",t.inSendAttach)("disabled",!a.mailevaEnabled),n.Db(1),n.Sc(" ",n.jc(17,28,"lang.putInSendAttach")," "),n.Db(2),n.oc("ngIf",a.maarchParapheurEnabled&&"FRZ"===t.status),n.Db(3),n.oc("ngIf",t.inSignatureBook),n.Db(2),n.oc("ngIf",t.inSendAttach),n.Db(1),n.oc("ngIf",!t.hideMainInfo),n.Db(1),n.oc("ngIf",t.hideMainInfo),n.Db(1),n.oc("ngIf",!t.hideMainInfo),n.Db(1),n.oc("ngIf",t.hideMainInfo),n.Db(2),n.Sc(" ",n.jc(30,30,"lang.attachment_"+t.status)," ")}}function kg(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",3),n.dc("mouseover",(function(){return n.Dc(t),n.hc().resetToggleInfo()})),n.Oc(1,lg,3,3,"div",4),n.Oc(2,hg,5,6,"mat-button-toggle-group",5),n.Oc(3,Mg,31,32,"mat-card",6),n.ic(4,"filterList"),n.Vb(),n.Wb(5,"button",7),n.dc("click",(function(){return n.Dc(t),n.hc().createAttachment()})),n.ic(6,"translate"),n.Rb(7,"mat-icon",8),n.Vb()}if(2&t){const t=n.hc();n.Db(1),n.oc("ngIf",0==t.attachments.length),n.Db(1),n.oc("ngIf",t.attachments.length>0),n.Db(1),n.oc("ngForOf",n.lc(4,8,t.attachments,t.currentFilter,"type")),n.Db(2),n.Ib("addPjPanel","panel"===t.target)("addPjProcess","process"===t.target),n.oc("title",n.jc(6,12,"lang.addAttachment"))}}let Sg=(()=>{class t{constructor(t,e,i,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.dialog=a,this.appService=s,this.headerService=o,this.privilegeService=r,this.loading=!0,this.pos=0,this.mailevaEnabled=!1,this.maarchParapheurEnabled=!1,this.hideMainInfo=!1,this.filterAttachTypes=[],this.currentFilter="",this.resId=null,this.target="panel",this.autoOpenCreation=!1,this.canModify=null,this.reloadBadgeAttachments=new n.o,this.afterActionAttachment=new n.o}ngOnInit(){this.autoOpenCreation&&this.createAttachment(),this.checkMaarchParapheurEnabled(),null!==this.resId&&this.http.get(`../rest/resources/${this.resId}/attachments`).pipe(Object(mt.a)(t=>{this.mailevaEnabled=t.mailevaEnabled,this.attachments=t.attachments,this.attachments.forEach(t=>{0===this.filterAttachTypes.filter(e=>e.id===t.type).length&&this.filterAttachTypes.push({id:t.type,label:t.typeLabel}),t.thumbnailUrl="../rest/attachments/"+t.resId+"/thumbnail",t.canDelete=this.privilegeService.hasCurrentUserPrivilege("manage_attachments")||this.headerService.user.id===t.typist})}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}checkMaarchParapheurEnabled(){this.http.get("../rest/externalSignatureBooks/enabled").subscribe(t=>{"maarchParapheur"===t.enabledSignatureBook&&(this.maarchParapheurEnabled=!0)},t=>{this.notify.error(t.error.errors)})}loadAttachments(t){let e=+new Date;this.resId=t,this.loading=!0,this.filterAttachTypes=[],this.http.get("../rest/resources/"+this.resId+"/attachments").subscribe(t=>{this.mailevaEnabled=t.mailevaEnabled,this.attachments=t.attachments,this.attachments.forEach(t=>{0===this.filterAttachTypes.filter(e=>e.id===t.type).length&&this.filterAttachTypes.push({id:t.type,label:t.typeLabel}),t.thumbnailUrl="../rest/attachments/"+t.resId+"/thumbnail?tsp="+e,t.canDelete=this.privilegeService.hasCurrentUserPrivilege("manage_attachments")||this.headerService.user.id===t.typist}),0===this.attachments.filter(t=>t.type===this.currentFilter).length&&(this.currentFilter=""),this.reloadBadgeAttachments.emit(""+this.attachments.length),this.loading=!1},t=>{this.notify.error(t.error.errors)})}setInSignatureBook(t){this.http.put("../rest/attachments/"+t.resId+"/inSignatureBook",{}).subscribe(()=>{t.inSignatureBook=!t.inSignatureBook,this.afterActionAttachment.emit("setInSignatureBook"),this.notify.success(this.translate.instant("lang.actionDone"))},t=>{this.notify.error(t.error.errors)})}setInSendAttachment(t){this.http.put("../rest/attachments/"+t.resId+"/inSendAttachment",{}).subscribe(()=>{t.inSendAttach=!t.inSendAttach,this.afterActionAttachment.emit("setInSendAttachment"),this.notify.success(this.translate.instant("lang.actionDone"))},t=>{this.notify.error(t.error.errors)})}toggleInfo(t,e){this.attachments.forEach(t=>{t.hideMainInfo=!1}),t.hideMainInfo=e}resetToggleInfo(){this.attachments.forEach(t=>{t.hideMainInfo=!1})}showAttachment(t){this.dialogRef=this.dialog.open(pu,{height:"99vh",width:this.appService.getViewMode()?"99vw":"90vw",maxWidth:this.appService.getViewMode()?"99vw":"90vw",panelClass:"attachment-modal-container",disableClose:!0,data:{resId:t.resId,editMode:this.canModify}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"success"===t),Object(mt.a)(()=>{this.loadAttachments(this.resId)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}createAttachment(){this.dialogRef=this.dialog.open(Ph,{disableClose:!0,panelClass:"attachment-modal-container",height:"90vh",width:this.appService.getViewMode()?"99vw":"90vw",maxWidth:this.appService.getViewMode()?"99vw":"90vw",data:{resIdMaster:this.resId}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"success"===t),Object(mt.a)(()=>{this.loadAttachments(this.resId),this.afterActionAttachment.emit("setInSendAttachment")}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}deleteAttachment(t){this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete("../rest/attachments/"+t.resId)),Object(mt.a)(()=>{this.loadAttachments(this.resId),this.afterActionAttachment.emit("setInSendAttachment"),this.notify.success(this.translate.instant("lang.attachmentDeleted"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}filterType(t){this.currentFilter=t.value}openMaarchParapheurWorkflow(t){this.dialog.open(Jo,{panelClass:"maarch-modal",data:{id:t.resId,type:"attachment"}})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(w.a),n.Qb(y.a),n.Qb(Dt.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-attachments-list"]],inputs:{injectDatas:"injectDatas",resId:"resId",target:"target",autoOpenCreation:"autoOpenCreation",canModify:"canModify"},outputs:{reloadBadgeAttachments:"reloadBadgeAttachments",afterActionAttachment:"afterActionAttachment"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["elseLoading",""],[1,"loading"],[3,"mouseover"],["style","text-align:center;font-size:24px;font-weight:bold;opacity:0.3;",4,"ngIf"],["class","filterTypes",3,"change",4,"ngIf"],["style","padding:0;margin: 30px;min-height: 300px;background-size: cover;overflow: hidden;",3,"signed","background-image","mouseover",4,"ngFor","ngForOf"],["mat-fab","","color","primary",1,"addPj",3,"title","click"],[1,"fa","fa-plus"],[2,"text-align","center","font-size","24px","font-weight","bold","opacity","0.3"],[1,"filterTypes",3,"change"],[3,"checked","value"],[3,"checked","value",4,"ngFor","ngForOf"],[2,"padding","0","margin","30px","min-height","300px","background-size","cover","overflow","hidden",3,"mouseover"],["class","layout",3,"click",4,"ngIf"],[1,"pjToolsContent"],["color","primary","class","versionButton",4,"ngIf"],["color","primary","mat-icon-button","",1,"actionsButton",3,"matMenuTriggerFor"],["fontSet","fas","fontIcon","fa-ellipsis-v"],["menuPjAction","matMenu"],["mat-menu-item","",3,"disabled","click"],["color","primary",3,"ngModel","ngModelChange"],["color","primary",3,"ngModel","disabled","ngModelChange"],[4,"ngIf"],[1,"infosPj"],[1,"stateInfo"],["class","fas fa-file-signature",3,"title",4,"ngIf"],["class","fa fa-shipping-fast",3,"title",4,"ngIf"],["class","mainInfos",4,"ngIf"],["class","subInfos",4,"ngIf"],[1,"statusInfo"],[1,"layout",3,"click"],["mat-raised-button","","color","primary",3,"click"],["mat-raised-button","","color","warn",3,"click",4,"ngIf"],["mat-raised-button","","color","warn",3,"click"],["color","primary",1,"versionButton"],["color","secondary"],["mat-menu-item","",3,"click"],[1,"fas","fa-file-signature",3,"title"],[1,"fa","fa-shipping-fast",3,"title"],[1,"mainInfos"],[1,"subInfos"],["elseTemplate",""],["creationTemplate",""]],template:function(t,e){if(1&t&&(n.Oc(0,cg,3,0,"ng-container",0),n.Oc(1,kg,8,14,"ng-template",null,1,n.Pc)),2&t){const t=n.zc(2);n.oc("ngIf",e.loading)("ngIfElse",t)}},directives:[P.t,V.c,P.s,k.b,S.a,og.b,og.a,K.a,ne.d,ne.e,ne.b,j.a,X.u,X.x,T.a],pipes:[rg,g.d,Wt.a,P.b,si,Tt.p,ps,P.p],styles:[".mat-card[_ngcontent-%COMP%]{border:1px solid #e0e0e0;box-shadow:0 0 8px 0 rgba(0,0,0,.75)}.layout[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;background:rgba(0,0,0,.2);display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer}.layout[_ngcontent-%COMP%] .mat-raised-button[_ngcontent-%COMP%]{width:200px}.infosPj[_ngcontent-%COMP%]{background:#f9f9f9;border-top:1px solid rgba(0,0,0,.12);position:absolute;width:100%;bottom:0;padding:5px;display:flex;flex-direction:column;align-items:center}.infosPj[_ngcontent-%COMP%] .mat-expansion-panel-body{padding:0}.infosPj[_ngcontent-%COMP%] .mat-form-field-label{color:#135f7f}.mainInfos[_ngcontent-%COMP%]{display:block;font-size:16px;color:#666}.subInfos[_ngcontent-%COMP%]{display:block;font-size:10px;color:#135f7f}.stateInfo[_ngcontent-%COMP%]{color:#135f7f;left:0;justify-content:left;padding-left:10px}.stateInfo[_ngcontent-%COMP%], .statusInfo[_ngcontent-%COMP%]{font-size:12px;position:absolute;height:100%;top:0;width:100px;display:flex;align-items:center;font-style:italic}.statusInfo[_ngcontent-%COMP%]{color:#666;opacity:.5;right:0;justify-content:center}.subInfosBottom[_ngcontent-%COMP%]{font-style:italic;font-size:12px;color:#666}.signed[_ngcontent-%COMP%]{border:1px solid green}.signed[_ngcontent-%COMP%] .infosPj[_ngcontent-%COMP%]{background:green}.signed[_ngcontent-%COMP%] .mainInfos[_ngcontent-%COMP%], .signed[_ngcontent-%COMP%] .stateInfo[_ngcontent-%COMP%], .signed[_ngcontent-%COMP%] .statusInfo[_ngcontent-%COMP%], .signed[_ngcontent-%COMP%] .subInfos[_ngcontent-%COMP%], .signed[_ngcontent-%COMP%] .subInfosBottom[_ngcontent-%COMP%]{color:#fff}.mat-icon[_ngcontent-%COMP%]{height:auto}.pjToolsContent[_ngcontent-%COMP%]{position:absolute;right:0;border-bottom:1px solid #e0e0e0;border-left:1px solid #e0e0e0;border-bottom-left-radius:5px;background:#fff}.pjToolsContent[_ngcontent-%COMP%] .actionsButton[_ngcontent-%COMP%], .pjToolsContent[_ngcontent-%COMP%] .downloadButton[_ngcontent-%COMP%], .pjToolsContent[_ngcontent-%COMP%] .versionButton[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;font-size:10px}.pjToolsContent[_ngcontent-%COMP%] .downloadButton[_ngcontent-%COMP%]:active, .pjToolsContent[_ngcontent-%COMP%] .downloadButton[_ngcontent-%COMP%]:focus, .pjToolsContent[_ngcontent-%COMP%] .downloadButton[_ngcontent-%COMP%]:hover{text-decoration:none}.pjToolsContent[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:0;top:-7px;font-size:10px}.loading[_ngcontent-%COMP%]{display:flex;justify-content:center;top:0;left:0;width:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:1;overflow:hidden}.filterTypes[_ngcontent-%COMP%]{overflow:auto;overflow-y:hidden;width:auto;max-width:100%;margin-left:10px}.filterTypes[_ngcontent-%COMP%] .mat-button-toggle-checked{background:#f99830;color:#fff;font-weight:700;height:25px;font-size:10px}.filterTypes[_ngcontent-%COMP%] .mat-button-toggle-checked .mat-button-toggle-label-content{line-height:0}.filterTypes[_ngcontent-%COMP%] .mat-button-toggle-checked .mat-button-toggle-button{height:100%}.filterTypes[_ngcontent-%COMP%] [_ngcontent-%COMP%]:not( .mat-button-toggle-checked) .mat-button-toggle-button{color:#135f7f;font-weight:700;height:25px;font-size:10px}.filterTypes[_ngcontent-%COMP%] [_ngcontent-%COMP%]:not( .mat-button-toggle-checked) .mat-button-toggle-button .mat-button-toggle-label-content{line-height:0}.addPjProcess[_ngcontent-%COMP%]{bottom:0}.addPjPanel[_ngcontent-%COMP%], .addPjProcess[_ngcontent-%COMP%]{position:-webkit-sticky;position:sticky;z-index:2;margin-left:10px}.addPjPanel[_ngcontent-%COMP%]{bottom:10px}"],data:{animation:[Object(dc.n)("myAnimation",[Object(dc.m)(":enter",[Object(dc.l)({transform:"translateY(-10%)",opacity:0}),Object(dc.e)("150ms",Object(dc.l)({transform:"translateY(0)",opacity:1}))]),Object(dc.m)(":leave",[Object(dc.l)({transform:"translateY(0)",opacity:1}),Object(dc.e)("150ms",Object(dc.l)({transform:"translateY(-10%)",opacity:0}))])])]}}),t})();const Ig=["noteEditor"],Pg=["appVisaWorkflow"];function Vg(t,e){1&t&&(n.Wb(0,"div",19),n.Rb(1,"mat-spinner",20),n.Vb())}function Rg(t,e){1&t&&(n.Wb(0,"b",21),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function jg(t,e){if(1&t&&(n.Wb(0,"b",21),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function Ag(t,e){if(1&t&&(n.Wb(0,"b",21),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function Wg(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-checkbox",24),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).toggleIntegration(i.key)})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.oc("checked",i.data.resource.integrations[t.key]),n.Db(1),n.Sc(" ",n.jc(2,2,"lang."+t.key+"_doc"),"")}}function Tg(t,e){if(1&t&&(n.Wb(0,"div",22),n.Oc(1,Wg,3,4,"mat-checkbox",23),n.ic(2,"keyvalue"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",n.jc(2,1,t.integrationsInfo))}}const Eg=function(t){return{min:t}};function Fg(t,e){if(1&t&&(n.Wb(0,"p"),n.Qc(1),n.ic(2,"translate"),n.ic(3,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Tc(" ",n.jc(2,2,"lang.notEnoughVisaUser")," (",n.kc(3,4,"lang.requiredVisaUser",n.vc(7,Eg,t.minimumVisaRole)),") ")}}const Lg=function(t){return{max:t}};function Qg(t,e){if(1&t&&(n.Wb(0,"p"),n.Qc(1),n.ic(2,"translate"),n.ic(3,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Tc(" ",n.jc(2,2,"lang.tooManySignUser")," (",n.kc(3,4,"lang.authorizedSignUser",n.vc(7,Lg,t.maximumSignRole)),") ")}}function Ng(t,e){1&t&&(n.Wb(0,"p"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.signUserRequired")))}function zg(t,e){if(1&t&&(n.Wb(0,"div",25),n.Oc(1,Fg,4,9,"p",26),n.Oc(2,Qg,4,9,"p",26),n.Oc(3,Ng,3,3,"p",26),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",!t.visaNumberCorrect),n.Db(1),n.oc("ngIf",!t.signNumberCorrect),n.Db(1),n.oc("ngIf",!t.atLeastOneSign)}}function Bg(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function Ug(t,e){if(1&t&&(n.Wb(0,"div",27),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,Bg,5,4,"li",28),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Sc(" ",n.jc(3,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.resourcesError)}}function $g(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier)}}function Hg(t,e){if(1&t&&(n.Wb(0,"div",29),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,$g,3,1,"li",28),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Rc(n.jc(3,2,"lang.mailingActionInformations")),n.Db(3),n.oc("ngForOf",t.resourcesMailing)}}function Gg(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-visa-workflow",30,31),n.dc("workflowUpdated",(function(e){return n.Dc(t),n.hc().checkMinMaxVisaSign(e)})),n.Vb()}2&t&&n.oc("adminMode",!0)}function Xg(t,e){if(1&t&&(n.Wb(0,"div",32),n.Rb(1,"app-note-editor",33,34),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("resIds",t.data.resIds)}}function qg(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-attachments-list",35),n.dc("afterActionAttachment",(function(){return n.Dc(t),n.hc().checkSignatureBook()})),n.Vb()}if(2&t){const t=n.hc();n.oc("resId",t.data.resIds[0])}}const Kg=function(){return{width:"400px"}};let Yg=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.loading=!0,this.resourcesMailing=[],this.resourcesError=[],this.noResourceToProcess=null,this.integrationsInfo={inSignatureBook:{icon:"fas fa-file-signature"}},this.minimumVisaRole=0,this.maximumSignRole=0,this.visaNumberCorrect=!0,this.signNumberCorrect=!0,this.atLeastOneSign=!1}ngAfterViewInit(){return Object(r.a)(this,void 0,void 0,(function*(){0===this.data.resIds.length?(null===this.data.resource.encodedFile?(this.noResourceToProcess=!0,this.resourcesError=[{alt_identifier:this.translate.instant("lang.currentIndexingMail"),reason:"noDocumentToSend"}]):this.functions.empty(this.data.resource.destination)||(this.noResourceToProcess=!1,yield this.appVisaWorkflow.loadListModel(this.data.resource.destination),yield this.loadMinMaxVisaSignParameters()),this.loading=!1):this.data.resIds.length>0?(yield this.checkSignatureBook(),this.loading=!1):this.loading=!1,1===this.data.resIds.length&&(yield this.appVisaWorkflow.loadWorkflow(this.data.resIds[0]),this.appVisaWorkflow.emptyWorkflow()&&this.appVisaWorkflow.loadDefaultWorkflow(this.data.resIds[0])),this.checkMinMaxVisaSign(this.appVisaWorkflow.visaWorkflow.items)}))}onSubmit(){return Object(r.a)(this,void 0,void 0,(function*(){if(this.loading=!0,0===this.data.resIds.length){let t=yield this.indexDocument();t&&(t=yield this.appVisaWorkflow.saveVisaWorkflow(this.data.resIds)),t&&this.executeIndexingAction(this.data.resIds[0])}else{const t=this.data.resIds.filter(t=>-1===this.resourcesError.map(t=>t.res_id).indexOf(t));(yield this.appVisaWorkflow.saveVisaWorkflow(t))&&this.executeAction(t)}this.loading=!1}))}checkSignatureBook(){return this.resourcesError=[],new Promise(t=>{this.http.post("../rest/resourcesList/users/"+this.data.userId+"/groups/"+this.data.groupId+"/baskets/"+this.data.basketId+"/actions/"+this.data.action.id+"/checkSignatureBook",{resources:this.data.resIds}).subscribe(e=>{this.functions.empty(e.resourcesInformations.error)||(this.resourcesError=e.resourcesInformations.error),this.noResourceToProcess=this.data.resIds.length===this.resourcesError.length,e.resourcesInformations.success&&(this.resourcesMailing=e.resourcesInformations.success.filter(t=>t.mailing)),this.minimumVisaRole=e.minimumVisaRole,this.maximumSignRole=e.maximumSignRole,t(!0)},t=>{this.notify.handleSoftErrors(t),this.dialogRef.close()})})}toggleIntegration(t){this.http.put("../rest/resourcesList/integrations",{resources:this.data.resIds,integrations:{[t]:!this.data.resource.integrations[t]}}).pipe(Object(mt.a)(()=>{this.data.resource.integrations[t]=!this.data.resource.integrations[t],this.checkSignatureBook()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}indexDocument(){return this.data.resource.integrations={inSignatureBook:!0},new Promise(t=>{this.http.post("../rest/resources",this.data.resource).pipe(Object(mt.a)(e=>{this.data.resIds=[e.resId],t(!0)}),Object(m.a)(e=>(this.notify.handleErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}executeAction(t){this.http.put(this.data.processActionRoute,{resources:t,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(e=>{e||this.dialogRef.close(t),e&&null!=e.errors&&this.notify.error(e.errors)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}executeIndexingAction(t){this.http.put(this.data.indexActionRoute,{resource:t,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(t=>{t||this.dialogRef.close(this.data.resIds),t&&null!=t.errors&&this.notify.error(t.errors)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isValidAction(){return!this.noResourceToProcess&&void 0!==this.appVisaWorkflow&&!this.appVisaWorkflow.emptyWorkflow()&&!this.appVisaWorkflow.workflowEnd()&&this.signNumberCorrect&&this.visaNumberCorrect}checkMinMaxVisaSign(t){let e=0,i=0;t.forEach(t=>{t.requested_signature?i++:e++}),this.atLeastOneSign=i>=1,0===this.maximumSignRole&&0===this.minimumVisaRole||(this.visaNumberCorrect=0===this.minimumVisaRole||e>=this.minimumVisaRole,this.signNumberCorrect=0===this.maximumSignRole||i<=this.maximumSignRole)}loadMinMaxVisaSignParameters(){return Object(r.a)(this,void 0,void 0,(function*(){return new Promise(t=>{this.http.get("../rest/parameters/minimumVisaRole").pipe(Object(mt.a)(t=>{this.minimumVisaRole=t.parameter.param_value_int}),p(()=>this.http.get("../rest/parameters/maximumSignRole")),Object(mt.a)(e=>{this.maximumSignRole=e.parameter.param_value_int,t(!0)}),Object(m.a)(e=>(this.notify.handleErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Xc(Ig,!0),n.Xc(Pg,!0)),2&t&&(n.yc(i=n.ec())&&(e.noteEditor=i.first),n.yc(i=n.ec())&&(e.appVisaWorkflow=i.first))},decls:30,vars:26,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],["autosize","",2,"height","100%"],[2,"background","white","padding","10px"],["color","primary","class","highlight",4,"ngIf"],["style","padding:10px;display: flex;flex-direction: column;",4,"ngIf"],["class","alert-message alert-message-danger","role","alert",4,"ngIf"],["class","alert-message alert-message-danger mailList","role","alert",4,"ngIf"],["class","alert-message alert-message-info","role","alert",4,"ngIf"],[3,"adminMode","workflowUpdated",4,"ngIf"],["style","padding-top: 10px;",4,"ngIf"],["position","end","mode","side","autoFocus","false",2,"overflow-x","hidden",3,"opened","ngStyle"],[3,"resId","afterActionAttachment",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"],[2,"padding","10px","display","flex","flex-direction","column"],["color","primary",3,"checked","click",4,"ngFor","ngForOf"],["color","primary",3,"checked","click"],["role","alert",1,"alert-message","alert-message-danger"],[4,"ngIf"],["role","alert",1,"alert-message","alert-message-danger","mailList"],[4,"ngFor","ngForOf"],["role","alert",1,"alert-message","alert-message-info"],[3,"adminMode","workflowUpdated"],["appVisaWorkflow",""],[2,"padding-top","10px"],[3,"resIds"],["noteEditor",""],[3,"resId","afterActionAttachment"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,Vg,2,0,"div",3),n.Wb(5,"mat-sidenav-container",4),n.Wb(6,"mat-sidenav-content",5),n.Wb(7,"div"),n.Qc(8),n.ic(9,"translate"),n.Oc(10,Rg,3,3,"b",6),n.Oc(11,jg,2,1,"b",6),n.Oc(12,Ag,3,4,"b",6),n.Qc(13," ? "),n.Vb(),n.Oc(14,Tg,3,3,"div",7),n.Oc(15,zg,4,3,"div",8),n.Oc(16,Ug,6,4,"div",9),n.Oc(17,Hg,6,4,"div",10),n.Oc(18,Gg,2,1,"app-visa-workflow",11),n.Oc(19,Xg,3,1,"div",12),n.Vb(),n.Wb(20,"mat-sidenav",13),n.Oc(21,qg,1,1,"app-attachments-list",14),n.Vb(),n.Vb(),n.Vb(),n.Rb(22,"span",15),n.Wb(23,"div",16),n.Wb(24,"button",17),n.dc("click",(function(){return e.onSubmit()})),n.Qc(25),n.ic(26,"translate"),n.Vb(),n.Wb(27,"button",18),n.Qc(28),n.ic(29,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(4),n.Sc(" ",n.jc(9,19,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(2),n.oc("ngIf",e.data.resIds.length>0),n.Db(1),n.oc("ngIf",!e.visaNumberCorrect||!e.signNumberCorrect||!e.atLeastOneSign),n.Db(1),n.oc("ngIf",e.resourcesError.length>0),n.Db(1),n.oc("ngIf",e.resourcesMailing.length>0&&""!=e.appVisaWorkflow.getFirstVisaUser()&&e.appVisaWorkflow.visaWorkflow.items[0].requested_signature),n.Db(1),n.oc("ngIf",!e.noResourceToProcess),n.Db(1),n.oc("ngIf",!e.noResourceToProcess),n.Db(1),n.oc("opened",1===e.data.resIds.length&&e.noResourceToProcess)("ngStyle",n.uc(25,Kg)),n.Db(1),n.oc("ngIf",1===e.data.resIds.length&&e.noResourceToProcess),n.Db(3),n.oc("disabled",e.loading||!e.isValidAction()),n.Db(1),n.Rc(n.jc(26,21,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(29,23,"lang.cancel")))},directives:[q.i,q.f,P.t,I.e,I.f,I.d,P.w,q.c,k.b,q.d,V.c,P.s,j.a,Ko,Du,Sg],pipes:[g.d,P.l],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:2;overflow:hidden}.mailList[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{font-size:12px;max-height:100px;overflow:auto;padding-left:25px;padding-right:5px;padding-bottom:10px;margin-top:10px}.mailList[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;text-decoration:underline}.mailList[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{font-size:120%}.formType[_ngcontent-%COMP%]{align-items:center;display:flex;margin:10px;border-radius:4px;border:1px solid #ccc;position:relative;padding:10px}.formType-title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:-7px;left:10px;padding:0;margin:0;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-form-field-suffix{color:#f99830;font-size:15px;top:0}.formType[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.priceContent[_ngcontent-%COMP%]{align-items:center;width:100%}.priceContent[_ngcontent-%COMP%], .priceContent-label[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.priceContent-label[_ngcontent-%COMP%]{text-align:right;color:#135f7f;flex:1;padding-right:10px}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:90px!important}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.priceInfo[_ngcontent-%COMP%]{padding-right:20px;font-size:10px;opacity:.5;width:100%}.pjList[_ngcontent-%COMP%]{display:flex;width:100%;overflow:auto;flex-direction:column;background:#666}.pjList[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin:10px}.checked[_ngcontent-%COMP%]{opacity:1;color:#f99830}.unchecked[_ngcontent-%COMP%]{opacity:.5}"]}),t})();const Jg=["noteEditor"],Zg=["appVisaWorkflow"];function tv(t,e){1&t&&(n.Wb(0,"div",19),n.Rb(1,"mat-spinner",20),n.Vb())}function ev(t,e){1&t&&(n.Wb(0,"b",21),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function iv(t,e){if(1&t&&(n.Wb(0,"b",21),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function nv(t,e){if(1&t&&(n.Wb(0,"b",21),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function av(t,e){if(1&t&&(n.Rb(0,"div",22),n.ic(1,"translate")),2&t){const t=n.hc();n.oc("innerHTML",n.jc(1,1,"lang.sendToDocTo")+" <b>"+t.appVisaWorkflow.getNextVisaUser().labelToDisplay+"</b>",n.Ec)}}function sv(t,e){1&t&&(n.Rb(0,"div",22),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.endWorkflow"),n.Ec)}function ov(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function rv(t,e){if(1&t&&(n.Wb(0,"div",23),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,ov,5,4,"li",24),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Sc(" ",n.jc(3,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.resourcesErrors)}}function cv(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function lv(t,e){if(1&t&&(n.Wb(0,"div",25),n.Wb(1,"ul",26),n.Oc(2,cv,5,4,"li",24),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.oc("ngForOf",t.resourcesWarnings)}}function dv(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier)}}function hv(t,e){if(1&t&&(n.Wb(0,"div",27),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,dv,3,1,"li",24),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Rc(n.jc(3,2,"lang.mailingActionInformations")),n.Db(3),n.oc("ngForOf",t.resourcesMailing)}}function uv(t,e){if(1&t&&n.Rb(0,"app-visa-workflow",28,29),2&t){const t=n.hc();n.oc("adminMode",!1)("resId",t.data.resIds[0])}}let pv=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.loading=!1,this.resourcesMailing=[],this.resourcesWarnings=[],this.resourcesErrors=[],this.noResourceToProcess=null}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.loading=!0,yield this.checkSignatureBook(),this.loading=!1}))}checkSignatureBook(){return this.resourcesErrors=[],this.resourcesWarnings=[],new Promise((t,e)=>{this.http.post("../rest/resourcesList/users/"+this.data.userId+"/groups/"+this.data.groupId+"/baskets/"+this.data.basketId+"/actions/"+this.data.action.id+"/checkContinueVisaCircuit",{resources:this.data.resIds}).subscribe(e=>{this.functions.empty(e.resourcesInformations.warning)||(this.resourcesWarnings=e.resourcesInformations.warning),this.functions.empty(e.resourcesInformations.error)||(this.resourcesErrors=e.resourcesInformations.error,this.noResourceToProcess=this.resourcesErrors.length===this.data.resIds.length),e.resourcesInformations.success&&e.resourcesInformations.success.forEach(t=>{t.mailing&&this.resourcesMailing.push(t)}),t(!0)},t=>{this.notify.handleSoftErrors(t),this.dialogRef.close()})})}onSubmit(){return Object(r.a)(this,void 0,void 0,(function*(){const t=this.data.resIds.filter(t=>-1===this.resourcesErrors.map(t=>t.res_id).indexOf(t));this.executeAction(t)}))}executeAction(t){this.http.put(this.data.processActionRoute,{resources:t,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(e=>{e||this.dialogRef.close(t),e&&null!=e.errors&&this.notify.error(e.errors)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isValidAction(){return!this.noResourceToProcess}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(Jg,!0),n.Xc(Zg,!0)),2&t&&(n.yc(i=n.ec())&&(e.noteEditor=i.first),n.yc(i=n.ec())&&(e.appVisaWorkflow=i.first))},decls:31,vars:23,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],["autosize","",2,"height","100%"],[2,"background","white","padding","10px"],["color","primary","class","highlight",4,"ngIf"],["class","alert-message alert-message-info","role","alert","style","margin-top: 30px;",3,"innerHTML",4,"ngIf"],["class","alert-message alert-message-danger mailList","role","alert",4,"ngIf"],["class","alert-message alert-message-info mailList","role","alert",4,"ngIf"],["class","alert-message alert-message-info","role","alert",4,"ngIf"],[3,"adminMode","resId",4,"ngIf"],[2,"padding-top","10px"],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","30px",3,"innerHTML"],["role","alert",1,"alert-message","alert-message-danger","mailList"],[4,"ngFor","ngForOf"],["role","alert",1,"alert-message","alert-message-info","mailList"],[2,"margin","0","padding-bottom","0px"],["role","alert",1,"alert-message","alert-message-info"],[3,"adminMode","resId"],["appVisaWorkflow",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,tv,2,0,"div",3),n.Wb(5,"mat-sidenav-container",4),n.Wb(6,"mat-sidenav-content",5),n.Wb(7,"div"),n.Qc(8),n.ic(9,"translate"),n.Oc(10,ev,3,3,"b",6),n.Oc(11,iv,2,1,"b",6),n.Oc(12,nv,3,4,"b",6),n.Qc(13," ? "),n.Vb(),n.Oc(14,av,2,3,"div",7),n.Oc(15,sv,2,3,"div",7),n.Oc(16,rv,6,4,"div",8),n.Oc(17,lv,3,1,"div",9),n.Oc(18,hv,6,4,"div",10),n.Oc(19,uv,2,2,"app-visa-workflow",11),n.Wb(20,"div",12),n.Rb(21,"app-note-editor",13,14),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Rb(23,"span",15),n.Wb(24,"div",16),n.Wb(25,"button",17),n.dc("click",(function(){return e.onSubmit()})),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Wb(28,"button",18),n.Qc(29),n.ic(30,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(4),n.Sc(" ",n.jc(9,17,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(2),n.oc("ngIf",1==e.data.resIds.length&&void 0!==e.appVisaWorkflow&&""!==e.appVisaWorkflow.getNextVisaUser()),n.Db(1),n.oc("ngIf",1==e.data.resIds.length&&void 0!==e.appVisaWorkflow&&""===e.appVisaWorkflow.getNextVisaUser()&&!e.noResourceToProcess),n.Db(1),n.oc("ngIf",e.resourcesErrors.length>0),n.Db(1),n.oc("ngIf",e.resourcesWarnings.length>0),n.Db(1),n.oc("ngIf",e.resourcesMailing.length>0&&void 0!==e.appVisaWorkflow&&""!==e.appVisaWorkflow.getNextVisaUser()&&e.appVisaWorkflow.getNextVisaUser().requested_signature),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(2),n.oc("resIds",e.data.resIds),n.Db(4),n.oc("disabled",e.loading||!e.isValidAction()),n.Db(1),n.Rc(n.jc(27,19,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(30,21,"lang.cancel")))},directives:[q.i,q.f,P.t,I.e,I.f,Du,q.c,k.b,q.d,V.c,P.s,Ko],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:2;overflow:hidden}.mailList[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{font-size:12px;max-height:100px;overflow:auto;padding-left:25px;padding-right:5px;padding-bottom:10px;margin-top:10px}.mailList[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;text-decoration:underline}.mailList[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{font-size:120%}.formType[_ngcontent-%COMP%]{align-items:center;display:flex;margin:10px;border-radius:4px;border:1px solid #ccc;position:relative;padding:10px}.formType-title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:-7px;left:10px;padding:0;margin:0;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-form-field-suffix{color:#f99830;font-size:15px;top:0}.formType[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.priceContent[_ngcontent-%COMP%]{align-items:center;width:100%}.priceContent[_ngcontent-%COMP%], .priceContent-label[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.priceContent-label[_ngcontent-%COMP%]{text-align:right;color:#135f7f;flex:1;padding-right:10px}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:90px!important}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.priceInfo[_ngcontent-%COMP%]{padding-right:20px;font-size:10px;opacity:.5;width:100%}.pjList[_ngcontent-%COMP%]{display:flex;width:100%;overflow:auto;flex-direction:column;background:#666}.pjList[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin:10px}"]}),t})(),bv=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.data=i,this.dialogRef=n,this.notify=a,this.loading=!1,this.template={id:0,type:"opinionCircuit",title:"",items:[]}}ngOnInit(){this.template.items=this.data.avisWorkflow.map(t=>({id:t.item_id,type:"user",mode:"avis"}))}onSubmit(){this.http.post("../rest/listTemplates",this.template).pipe(Object(mt.a)(t=>{this.template.id=t.id,this.notify.success(this.translate.instant("lang.modelSaved")),this.dialogRef.close(this.template)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.a),n.Qb(q.h),n.Qb(D.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:14,vars:9,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],[1,"modal-container"],["appearance","outline"],["type","text","matInput","","placeholder","Nom du mod\xe8le",3,"ngModel","ngModelChange"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2,"Ajouter un mod\xe8le"),n.Vb(),n.Wb(3,"mat-dialog-content",2),n.Wb(4,"mat-form-field",3),n.Wb(5,"input",4),n.dc("ngModelChange",(function(t){return e.template.title=t})),n.Vb(),n.Vb(),n.Vb(),n.Rb(6,"span",5),n.Wb(7,"div",6),n.Wb(8,"button",7),n.dc("click",(function(){return e.onSubmit()})),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Wb(11,"button",8),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.oc("ngModel",e.template.title),n.Db(3),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(10,5,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(13,7,"lang.cancel")))},directives:[q.i,q.f,Y.c,J.b,X.d,X.u,X.x,q.c,k.b,q.d],pipes:[g.d],styles:[""]}),t})();const fv=["searchAvisUserInput"];function mv(t,e){1&t&&(n.Wb(0,"mat-option",15),n.Wb(1,"div",16),n.Rb(2,"mat-spinner",17),n.Vb(),n.Vb())}function gv(t,e){if(1&t&&(n.Wb(0,"mat-option",20),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t.label," ")}}function vv(t,e){if(1&t&&(n.Wb(0,"mat-optgroup",18),n.ic(1,"translate"),n.Oc(2,gv,2,2,"mat-option",19),n.ic(3,"sortBy"),n.ic(4,"async"),n.Vb()),2&t){const t=n.hc(3);n.oc("label",n.jc(1,2,"lang.publicModel")),n.Db(2),n.oc("ngForOf",n.kc(3,4,n.jc(4,7,t.filteredPublicModels),"label"))}}function _v(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-option",20),n.Wb(1,"div",21),n.Wb(2,"div",22),n.Qc(3),n.Vb(),n.Wb(4,"button",23),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(4);return i.stopPropagation(),s.deletePrivateModel(a)})),n.Rb(5,"mat-icon",24),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.oc("value",t),n.Db(3),n.Sc(" ",t.label," ")}}function yv(t,e){if(1&t&&(n.Wb(0,"mat-optgroup",18),n.ic(1,"translate"),n.Oc(2,_v,6,2,"mat-option",19),n.ic(3,"sortBy"),n.ic(4,"async"),n.Vb()),2&t){const t=n.hc(3);n.oc("label",n.jc(1,2,"lang.privateModel")),n.Db(2),n.oc("ngForOf",n.kc(3,4,n.jc(4,7,t.filteredPrivateModels),"label"))}}function xv(t,e){if(1&t&&(n.Wb(0,"mat-option",20),n.Qc(1),n.Wb(2,"small"),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t.label," "),n.Db(2),n.Sc("(",t.entity,")")}}function Cv(t,e){if(1&t&&(n.Wb(0,"mat-optgroup",18),n.ic(1,"titlecase"),n.ic(2,"translate"),n.Oc(3,xv,4,3,"mat-option",19),n.ic(4,"sortBy"),n.ic(5,"async"),n.Vb()),2&t){const t=n.hc(3);n.oc("label",n.jc(1,2,n.jc(2,4,"lang.user"))),n.Db(3),n.oc("ngForOf",n.kc(4,6,n.jc(5,9,t.filteredSignAvisUsers),"label"))}}function Ov(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",25),n.dc("click",(function(e){n.Dc(t);const i=n.hc(3);return e.stopPropagation(),i.openPromptSaveModel()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",26),n.Vb()}2&t&&n.pc("title",n.jc(1,1,"lang.saveAsPrivateModel"))}function Dv(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field",7),n.Rb(1,"input",8,9),n.Wb(3,"mat-autocomplete",10,11),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc(2).addItemToWorkflow(e.option.value)}))("opened",(function(){return n.Dc(t),n.hc(2).initFilterAvisModelList()})),n.Oc(5,mv,3,0,"mat-option",12),n.Oc(6,vv,5,9,"mat-optgroup",13),n.ic(7,"async"),n.Oc(8,yv,5,9,"mat-optgroup",13),n.ic(9,"async"),n.Oc(10,Cv,6,11,"mat-optgroup",13),n.ic(11,"async"),n.Vb(),n.Oc(12,Ov,3,3,"button",14),n.Vb()}if(2&t){const t=n.zc(4),e=n.hc(2);var i,a,s;n.Db(1),n.oc("formControl",e.searchAvisUser)("matAutocomplete",t),n.Db(4),n.oc("ngIf",e.avisModelListNotLoaded),n.Db(1),n.oc("ngIf",(null==(i=n.jc(7,7,e.filteredPublicModels))?null:i.length)>0),n.Db(2),n.oc("ngIf",(null==(a=n.jc(9,9,e.filteredPrivateModels))?null:a.length)>0),n.Db(2),n.oc("ngIf",(null==(s=n.jc(11,11,e.filteredSignAvisUsers))?null:s.length)>0),n.Db(2),n.oc("ngIf",e.avisWorkflow.items.length>0&&e.showListModels)}}function wv(t,e){1&t&&(n.Wb(0,"div",27),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noCircuitAvailable")," "))}function Mv(t,e){1&t&&(n.Wb(0,"div",27),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.cannotAddAvisCircuit")," "))}function kv(t,e){1&t&&n.Rb(0,"mat-icon",38)}function Sv(t,e){if(1&t&&(n.Ub(0),n.Rb(1,"mat-icon",39),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Ib("fa-hourglass",null==t.process_date)("fa-thumbs-up",null!=t.process_date)("valid",null!=t.process_date)}}function Iv(t,e){if(1&t&&(n.Ub(0),n.Rb(1,"mat-icon",40),n.ic(2,"translate"),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("title",n.jc(2,1,"lang.insteadOf")+" "+t.delegatedBy)}}function Pv(t,e){if(1&t&&(n.Wb(0,"div",41),n.ic(1,"fullDate"),n.Qc(2),n.ic(3,"translate"),n.ic(4,"timeAgo"),n.Vb()),2&t){const t=n.hc().$implicit;n.pc("title",n.jc(1,3,t.process_date)),n.Db(2),n.Tc("",n.jc(3,5,"lang.avisSent")," ",n.kc(4,7,t.process_date,"full"),"")}}function Vv(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",45),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc(2).index;return n.hc(2).changeRole(i,a)})),n.Qc(1),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.Rc(t.label)}}function Rv(t,e){if(1&t&&(n.Wb(0,"div"),n.Wb(1,"button",42),n.Qc(2),n.Vb(),n.Wb(3,"mat-menu",null,43),n.Oc(5,Vv,2,1,"button",44),n.Vb(),n.Vb()),2&t){const t=n.zc(4),e=n.hc().$implicit,i=n.hc(2);n.Db(1),n.oc("disabled",!i.adminMode||!i.functions.empty(e.process_date))("matMenuTriggerFor",t)("title",i.getRoleLabel(e.item_mode)),n.Db(1),n.Rc(i.getRoleLabel(e.item_mode)),n.Db(3),n.oc("ngForOf",i.availableRoles)}}function jv(t,e){1&t&&(n.Wb(0,"div",46),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noPrivileges")," "))}function Av(t,e){1&t&&(n.Wb(0,"div",46),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.userNotValid")," "))}function Wv(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",47),n.dc("click",(function(){n.Dc(t);const e=n.hc().index;return n.hc(2).deleteItem(e)})),n.Rb(1,"mat-icon",48),n.Vb()}}const Tv=function(t,e){return{"fa fa-user fa-2x":t,avatar:e}};function Ev(t,e){if(1&t&&(n.Wb(0,"mat-list-item",28),n.Oc(1,kv,1,0,"mat-icon",29),n.Rb(2,"mat-icon",30),n.Oc(3,Sv,2,6,"ng-container",0),n.Wb(4,"div",31),n.Wb(5,"div",32),n.Wb(6,"div",33),n.Qc(7),n.Oc(8,Iv,3,3,"ng-container",0),n.Vb(),n.Wb(9,"div",34),n.Qc(10),n.Vb(),n.Oc(11,Pv,5,10,"div",35),n.Vb(),n.Oc(12,Rv,6,5,"div",0),n.Oc(13,jv,3,3,"div",36),n.Oc(14,Av,3,3,"div",36),n.Vb(),n.Oc(15,Wv,2,0,"button",37),n.Vb()),2&t){const t=e.$implicit,i=e.index,a=n.hc(2);n.Ib("notDraggable",!a.adminMode||!a.functions.empty(t.process_date))("notEditable",!a.adminMode)("processed",null!=t.process_date),n.oc("cdkDragDisabled",!a.adminMode||!a.functions.empty(t.process_date)),n.Db(1),n.oc("ngIf",a.getCurrentAvisUserIndex()===i&&!a.adminMode),n.Db(1),n.Lc("background-image",a.functions.empty(t.picture)?"":"url("+t.picture+")"),n.Ib("invalid",!t.hasPrivilege||!t.isValid),n.oc("ngClass",n.wc(26,Tv,a.functions.empty(t.picture),!a.functions.empty(t.picture))),n.Db(1),n.oc("ngIf",!a.adminMode||null!=t.process_date),n.Db(3),n.Ib("unauthorized",!t.hasPrivilege||!t.isValid),n.Db(1),n.Sc(" ",t.labelToDisplay," "),n.Db(1),n.oc("ngIf",null!=t.process_date&&null!==t.delegatedBy),n.Db(1),n.Ib("unauthorized",!t.hasPrivilege||!t.isValid),n.Db(1),n.Sc(" ",t.item_entity," "),n.Db(1),n.oc("ngIf",null!=t.process_date),n.Db(1),n.oc("ngIf","parallel"===a.mode),n.Db(1),n.oc("ngIf",!t.hasPrivilege),n.Db(1),n.oc("ngIf",!t.isValid),n.Db(1),n.oc("ngIf",a.adminMode&&a.functions.empty(t.process_date))}}function Fv(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list"),n.Oc(1,Dv,13,13,"mat-form-field",2),n.Wb(2,"div",3,4),n.dc("cdkDropListDropped",(function(e){return n.Dc(t),n.hc().drop(e)})),n.Oc(4,wv,3,3,"div",5),n.Oc(5,Mv,3,3,"div",5),n.Oc(6,Ev,16,29,"mat-list-item",6),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.adminMode),n.Db(1),n.oc("cdkDropListData",t.avisWorkflow.items)("cdkDropListDisabled",!t.adminMode),n.Db(2),n.oc("ngIf",t.adminMode&&0===t.avisWorkflow.items.length),n.Db(1),n.oc("ngIf",!t.adminMode&&0===t.avisWorkflow.items.length),n.Db(1),n.oc("ngForOf",t.avisWorkflow.items)}}function Lv(t,e){1&t&&(n.Wb(0,"div",49),n.Rb(1,"mat-spinner",50),n.Vb())}let Qv=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.functions=n,this.latinisePipe=a,this.dialog=s,this.avisWorkflow={roles:["sign","avis"],items:[]},this.avisWorkflowClone=[],this.avisTemplates={private:[],public:[]},this.availableRoles=[],this.signAvisUsers=[],this.loading=!1,this.avisModelListNotLoaded=!0,this.resId=null,this.showListModels=!0,this.mode="circuit",this.searchAvisUser=new X.i}ngOnInit(){"parallel"===this.mode&&this.adminMode&&this.loadAvisRoles(),null!==this.resId&&("circuit"===this.mode?this.loadWorkflow(this.resId):this.loadParallelWorkflow(this.resId))}drop(t){t.previousContainer===t.container&&(this.functions.empty(this.avisWorkflow.items[t.currentIndex].process_date)?Object(lo.h)(t.container.data,t.previousIndex,t.currentIndex):this.notify.error(`${this.translate.instant("lang.moveAvisUserErr1")} <b>${this.avisWorkflow.items[t.previousIndex].labelToDisplay}</b> ${this.translate.instant("lang.moveAvisUserErr2")}.`))}loadAvisRoles(){return new Promise((t,e)=>{this.http.get("../rest/roles").pipe(Object(mt.a)(e=>{this.availableRoles=e.roles.filter(t=>["avis","avis_copy","avis_info"].indexOf(t.id)>-1).map(t=>({id:t.id,label:t.label})),t(!0)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()})}getRoleLabel(t){return this.availableRoles.filter(e=>e.id===t)[0].label}loadListModel(t){this.loading=!0,this.avisWorkflow.items=[],this.http.get(`../rest/listTemplates/entities/${t}?type=opinionCircuit`).subscribe(t=>{t.listTemplates[0]&&(this.avisWorkflow.items=t.listTemplates[0].items.map(t=>Object.assign(Object.assign({},t),{item_entity:t.descriptionToDisplay}))),this.avisWorkflowClone=JSON.parse(JSON.stringify(this.avisWorkflow.items)),this.loading=!1})}loadAvisUsersList(){return new Promise((t,e)=>{this.http.get("../rest/autocomplete/users/circuit?circuit=opinion").pipe(Object(l.a)(t=>t.map(t=>({id:t.id,title:`${t.idToDisplay} (${t.otherInfo})`,label:t.idToDisplay,entity:t.otherInfo,type:"user"}))),Object(mt.a)(e=>{this.signAvisUsers=e,this.filteredSignAvisUsers=this.searchAvisUser.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>this._filter(t))),t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}loadAvisModelList(){return Object(r.a)(this,void 0,void 0,(function*(){return null!==this.resId&&(yield this.loadDefaultModel()),new Promise((t,e)=>{this.http.get("../rest/availableCircuits?circuit=opinion").pipe(Object(mt.a)(e=>{this.avisTemplates.public=this.avisTemplates.public.concat(e.circuits.filter(t=>!t.private).map(t=>({id:t.id,title:t.title,label:t.title,type:"entity"}))),this.avisTemplates.private=e.circuits.filter(t=>t.private).map(t=>({id:t.id,title:t.title,label:t.title,type:"entity"})),this.filteredPublicModels=this.searchAvisUser.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>this._filterPublicModel(t))),this.filteredPrivateModels=this.searchAvisUser.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>this._filterPrivateModel(t))),t(!0)})).subscribe()})}))}loadDefaultModel(){return this.avisTemplates.public=[],new Promise((t,e)=>{this.http.get(`../rest/resources/${this.resId}/defaultCircuit?circuit=opinion`).pipe(Object(mt.a)(t=>{this.functions.empty(t.itemsRemoved)||this.notify.error(this.translate.instant("lang.itemRemovedFromAvisTemplate")+" : "+t.itemsRemoved.join(", "))}),Object(d.a)(t=>!this.functions.empty(t.circuit)),Object(mt.a)(t=>{this.functions.empty(t.circuit)||this.avisTemplates.public.push({id:t.circuit.id,title:t.circuit.title,label:t.circuit.title,type:"entity"})}),Object(Xt.a)(()=>t(!0)),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}initFilterAvisModelList(){return Object(r.a)(this,void 0,void 0,(function*(){this.avisModelListNotLoaded&&(yield this.loadAvisUsersList(),this.showListModels&&(yield this.loadAvisModelList()),this.searchAvisUser.reset(),this.avisModelListNotLoaded=!1)}))}_filter(t){if("string"==typeof t){const e=this.latinisePipe.transform(t.toLowerCase());return this.signAvisUsers.filter(t=>this.latinisePipe.transform(t.title.toLowerCase()).includes(e))}return this.signAvisUsers}_filterPrivateModel(t){if("string"==typeof t){const e=this.latinisePipe.transform(t.toLowerCase());return this.avisTemplates.private.filter(t=>this.latinisePipe.transform(t.title.toLowerCase()).includes(e))}return this.avisTemplates.private}_filterPublicModel(t){if("string"==typeof t){const e=this.latinisePipe.transform(t.toLowerCase());return this.avisTemplates.public.filter(t=>this.latinisePipe.transform(t.title.toLowerCase()).includes(e))}return this.avisTemplates.public}loadWorkflow(t){return this.resId=t,this.loading=!0,this.avisWorkflow.items=[],new Promise((e,i)=>{this.http.get("../rest/resources/"+t+"/opinionCircuit").pipe(Object(mt.a)(t=>{this.functions.empty(t.itemsRemoved)||this.notify.error(this.translate.instant("lang.itemRemovedFromAvisTemplate")+" : "+t.itemsRemoved.join(", "))}),Object(d.a)(t=>!this.functions.empty(t.circuit)),Object(mt.a)(t=>{t.circuit.forEach(t=>{this.avisWorkflow.items.push(Object.assign(Object.assign({},t),{difflist_type:"circuit"===this.mode?"AVIS_CIRCUIT":"entity_id"}))}),this.avisWorkflowClone=JSON.parse(JSON.stringify(this.avisWorkflow.items))}),Object(Xt.a)(()=>{this.loading=!1,e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}loadParallelWorkflow(t){return this.resId=t,this.loading=!0,this.avisWorkflow.items=[],new Promise((e,i)=>{this.http.get("../rest/resources/"+t+"/parallelOpinion").subscribe(t=>{t.forEach(t=>{this.avisWorkflow.items.push(Object.assign(Object.assign({},t),{difflist_type:"entity_id"}))}),this.avisWorkflowClone=JSON.parse(JSON.stringify(this.avisWorkflow.items)),this.loading=!1,e(!0)},t=>{this.notify.handleErrors(t)})})}loadDefaultWorkflow(t){this.loading=!0,this.avisWorkflow.items=[],this.http.get("../rest/resources/"+t+"/defaultCircuit?circuit=opinion").pipe(Object(mt.a)(t=>{this.functions.empty(t.itemsRemoved)||this.notify.error(this.translate.instant("lang.itemRemovedFromAvisTemplate")+" : "+t.itemsRemoved.join(", "))}),Object(d.a)(t=>!this.functions.empty(t.circuit)),Object(mt.a)(t=>{t.circuit.items.forEach(t=>{this.avisWorkflow.items.push(Object.assign(Object.assign({},t),{difflist_type:"circuit"===this.mode?"AVIS_CIRCUIT":"entity_id",item_entity:t.descriptionToDisplay}))}),this.avisWorkflowClone=JSON.parse(JSON.stringify(this.avisWorkflow.items))}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}deleteItem(t){this.avisWorkflow.items.splice(t,1)}getAvisCount(){return this.avisWorkflow.items.length}changeRole(t,e){this.avisWorkflow.items[e].item_mode=t.id}getWorkflow(){return this.avisWorkflow.items}getCurrentAvisUserIndex(){return this.avisWorkflow.items.map(t=>t.listinstance_id).indexOf(this.getLastAvisUser().listinstance_id)+1}getFirstAvisUser(){return this.functions.empty(this.avisWorkflow.items[0])?"":this.avisWorkflow.items[0]}getCurrentAvisUser(){const t=this.avisWorkflow.items.map(t=>t.listinstance_id).indexOf(this.getLastAvisUser().listinstance_id);return this.functions.empty(this.avisWorkflow.items[t+1])?"":this.avisWorkflow.items[t+1]}getNextAvisUser(){const t=this.avisWorkflow.items.map(t=>t.listinstance_id).indexOf(this.getLastAvisUser().listinstance_id);return this.functions.empty(this.avisWorkflow.items[t+2])?"":this.avisWorkflow.items[t+2]}getLastAvisUser(){let t=this.avisWorkflow.items.filter(t=>!this.functions.empty(t.process_date));return this.functions.empty(t[t.length-1])?"":t[t.length-1]}saveAvisWorkflow(t=[this.resId]){return new Promise((e,i)=>{if(0===this.avisWorkflow.items.length)this.http.delete(`../rest/resources/${t[0]}/circuits/opinionCircuit`).pipe(Object(mt.a)(()=>{this.avisWorkflowClone=JSON.parse(JSON.stringify(this.avisWorkflow.items)),this.notify.success(this.translate.instant("lang.avisWorkflowDeleted")),e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe();else if(this.isValidWorkflow()){const i=t.map(t=>({resId:t,listInstances:this.avisWorkflow.items}));this.http.put("../rest/circuits/opinionCircuit",{resources:i}).pipe(Object(mt.a)(t=>{this.avisWorkflowClone=JSON.parse(JSON.stringify(this.avisWorkflow.items)),this.notify.success(this.translate.instant("lang.avisWorkflowUpdated")),e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}else this.notify.error(this.getError()),e(!1)})}addItemToWorkflow(t){return new Promise((e,i)=>{"user"===t.type?(this.avisWorkflow.items.push({item_id:t.id,item_type:"user",item_entity:t.entity,item_mode:"avis",labelToDisplay:t.label,externalId:this.functions.empty(t.externalId)?null:t.externalId,difflist_type:"circuit"===this.mode?"AVIS_CIRCUIT":"entity_id",hasPrivilege:!0,isValid:!0}),this.searchAvisUser.reset(),this.searchAvisUserInput.nativeElement.blur(),e(!0)):"entity"===t.type&&this.http.get("../rest/listTemplates/"+t.id).pipe(Object(mt.a)(t=>{this.avisWorkflow.items=this.avisWorkflow.items.concat(t.listTemplate.items.map(t=>({item_id:t.item_id,item_type:"user",labelToDisplay:t.idToDisplay,item_entity:t.descriptionToDisplay,item_mode:"avis",difflist_type:"circuit"===this.mode?"AVIS_CIRCUIT":"entity_id",hasPrivilege:t.hasPrivilege,isValid:t.isValid}))),this.searchAvisUser.reset(),this.searchAvisUserInput.nativeElement.blur(),e(!0)})).subscribe()})}resetWorkflow(){this.avisWorkflow.items=[]}isValidWorkflow(){return 0===this.avisWorkflow.items.filter(t=>!t.hasPrivilege||!t.isValid).length&&this.avisWorkflow.items.length>0}getError(){return this.avisWorkflow.items.filter(t=>!t.hasPrivilege).length>0?this.translate.instant("lang.mustDeleteUsersWithNoPrivileges"):this.avisWorkflow.items.filter(t=>!t.isValid).length>0?this.translate.instant("lang.mustDeleteInvalidUsers"):void 0}emptyWorkflow(){return 0===this.avisWorkflow.items.length}workflowEnd(){return this.avisWorkflow.items.filter(t=>!this.functions.empty(t.process_date)).length===this.avisWorkflow.items.length}openPromptSaveModel(){this.dialog.open(bv,{panelClass:"maarch-modal",data:{avisWorkflow:this.avisWorkflow.items}}).afterClosed().pipe(Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.avisTemplates.private.push({id:t.id,title:t.title,label:t.title,type:"entity"}),this.searchAvisUser.reset()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}deletePrivateModel(t){this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete("../rest/listTemplates/"+t.id)),Object(mt.a)(()=>{this.avisTemplates.private=this.avisTemplates.private.filter(e=>e.id!==t.id),this.searchAvisUser.reset(),this.notify.success(this.translate.instant("lang.modelDeleted"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}getMaarchParapheurUserAvatar(t,e){this.functions.empty(t)||this.http.get("../rest/maarchParapheur/user/"+t+"/picture").subscribe(t=>{this.avisWorkflow.items[e].picture=t.picture},t=>{this.notify.handleErrors(t)})}isModified(){return!this.loading&&JSON.stringify(this.avisWorkflow.items)!==JSON.stringify(this.avisWorkflowClone)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(_t.a),n.Qb(Tt.c),n.Qb(q.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-avis-workflow"]],viewQuery:function(t,e){var i;1&t&&n.Xc(fv,!0),2&t&&n.yc(i=n.ec())&&(e.searchAvisUserInput=i.first)},inputs:{injectDatas:"injectDatas",adminMode:"adminMode",resId:"resId",showListModels:"showListModels",mode:"mode"},decls:2,vars:2,consts:[[4,"ngIf"],["style","display:flex;padding: 10px;",4,"ngIf"],["appearance","outline",4,"ngIf"],["cdkDropList","",1,"cdk-list",3,"cdkDropListData","cdkDropListDisabled","cdkDropListDropped"],["dataAvailableList","cdkDropList"],["class","emptyContent",4,"ngIf"],["disableRipple","","cdkDrag","","class","columns workflow",3,"cdkDragDisabled","notDraggable","notEditable","processed",4,"ngFor","ngForOf"],["appearance","outline"],["type","text","matInput","","placeholder","Ajouter des personnes","id","searchAvisUserInput",3,"formControl","matAutocomplete"],["searchAvisUserInput",""],[3,"optionSelected","opened"],["autoGroup","matAutocomplete"],["disabled","",4,"ngIf"],["class","avisSignList",3,"label",4,"ngIf"],["mat-icon-button","","matSuffix","","color","primary",3,"title","click",4,"ngIf"],["disabled",""],[2,"display","flex","justify-content","center"],["diameter","35"],[1,"avisSignList",3,"label"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[2,"display","flex","align-items","center"],[2,"flex","1"],["mat-icon-button","","color","warn",3,"click"],[1,"fa","fa-trash",2,"margin","0px"],["mat-icon-button","","matSuffix","","color","primary",3,"title","click"],[1,"fa","fa-plus"],[1,"emptyContent"],["disableRipple","","cdkDrag","",1,"columns","workflow",3,"cdkDragDisabled"],["class","fa fa-chevron-right fa-2x","mat-list-icon","","color","accent",4,"ngIf"],["mat-list-icon","","color","primary",3,"ngClass"],["mat-line","",1,"workflowLine"],[1,"workflowLineContainer"],[1,"workflowLineLabel"],[1,"workflowLineSubLabel"],["class","workflowLineProcessDate","color","accent",3,"title",4,"ngIf"],["class","invalid",4,"ngIf"],["mat-icon-button","",3,"click",4,"ngIf"],["mat-list-icon","","color","accent",1,"fa","fa-chevron-right","fa-2x"],["mat-list-icon","",1,"fa-2x","far",2,"opacity","0.5"],["mat-list-icon","",1,"fas","fa-exclamation-circle",2,"opacity","0.5","font-size","125%","height","15px","color","red",3,"title"],["color","accent",1,"workflowLineProcessDate",3,"title"],["color","primary","mat-raised-button","",1,"currentRoleButton",3,"disabled","matMenuTriggerFor","title"],["menu","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["mat-menu-item","",3,"click"],[1,"invalid"],["mat-icon-button","",3,"click"],["color","warn",1,"fa","fa-times"],[2,"display","flex","padding","10px"],[2,"margin","auto"]],template:function(t,e){1&t&&(n.Oc(0,Fv,7,6,"mat-list",0),n.Oc(1,Lv,2,0,"div",1)),2&t&&(n.oc("ngIf",!e.loading),n.Db(1),n.oc("ngIf",e.loading))},directives:[P.t,R.a,lo.e,P.s,Y.c,J.b,X.d,Ne.d,X.u,X.j,Ne.a,W.p,V.c,W.o,k.b,S.a,Y.j,R.d,lo.a,R.c,P.q,W.l,ne.d,ne.e,ne.b],pipes:[P.b,g.d,Wt.a,P.F,uo,ps],styles:[".mat-form-field-appearance-outline[_ngcontent-%COMP%]{font-size:11px}.avisSignList[_ngcontent-%COMP%] .mat-optgroup-label{color:#135f7f;position:-webkit-sticky;position:sticky;top:0;background:#fff!important;z-index:1}.cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);background:#fff!important;padding:10px}.cdk-drag-preview[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%], .cdk-drag-preview[_ngcontent-%COMP%] .mat-icon-button[_ngcontent-%COMP%]{display:none}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.columns[_ngcontent-%COMP%]:last-child{border:none}.cdk-list.cdk-drop-list-dragging[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.columns[_ngcontent-%COMP%]{cursor:move}.notDraggable[_ngcontent-%COMP%]{cursor:not-allowed}.notEditable[_ngcontent-%COMP%]{cursor:auto}.currentContextButton[_ngcontent-%COMP%]{width:150px;text-align:left}.currentContextButton[_ngcontent-%COMP%], .currentRoleButton[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;font-size:13px}.currentRoleButton[_ngcontent-%COMP%]{width:120px;text-align:center}.emptyContent[_ngcontent-%COMP%]{opacity:.5;text-align:center;font-size:10px;padding:10px}.processed[_ngcontent-%COMP%]{background:rgba(0,128,0,.11)!important}.workflow[_ngcontent-%COMP%]{height:55px;margin-bottom:10px;background:hsla(0,0%,84.7%,.1);border-radius:10px;font-size:13px}.workflowLine[_ngcontent-%COMP%]{display:flex!important;align-items:center}.workflowLineContainer[_ngcontent-%COMP%]{flex:1}.workflowLineContainer[_ngcontent-%COMP%], .workflowLineLabel[_ngcontent-%COMP%], .workflowLineSubLabel[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis}.workflowLineSubLabel[_ngcontent-%COMP%]{font-size:80%;opacity:.5;flex:1}.workflowLineProcessDate[_ngcontent-%COMP%]{flex:1;text-align:left;font-size:80%}.workflowLine[_ngcontent-%COMP%] .mat-raised-button[disabled][_ngcontent-%COMP%]{background:none;color:#135f7f!important;opacity:1}.avatar[_ngcontent-%COMP%]{border:3px solid #f99830;height:45px!important;width:45px!important;background-size:cover;background-repeat:no-repeat;background-position:50%}.valid[_ngcontent-%COMP%]{color:#006841}.invalid[_ngcontent-%COMP%]{color:#8e3e52}.unauthorized[_ngcontent-%COMP%]{color:#8e3e52;text-decoration:line-through}"]}),t})();const Nv=["noteEditor"],zv=["appAvisWorkflow"];function Bv(t,e){1&t&&(n.Wb(0,"div",20),n.Rb(1,"mat-spinner",21),n.Vb())}function Uv(t,e){1&t&&(n.Wb(0,"b",22),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function $v(t,e){if(1&t&&(n.Wb(0,"b",22),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function Hv(t,e){if(1&t&&(n.Wb(0,"b",22),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function Gv(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function Xv(t,e){if(1&t&&(n.Wb(0,"div",23),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,Gv,5,4,"li",24),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Sc(" ",n.jc(3,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.resourcesError)}}function qv(t,e){if(1&t&&n.Rb(0,"mat-datepicker-toggle",25),2&t){n.hc();const t=n.zc(23);n.oc("for",t)}}function Kv(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",26),n.dc("click",(function(e){n.Dc(t);const i=n.hc();return e.stopPropagation(),i.opinionLimitDate=null})),n.ic(1,"translate"),n.Rb(2,"mat-icon",27),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.eraseValue"))}function Yv(t,e){1&t&&n.Rb(0,"app-avis-workflow",28,29),2&t&&n.oc("adminMode",!0)}let Jv=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.loading=!1,this.resourcesError=[],this.noResourceToProcess=null,this.opinionLimitDate=null,this.today=new Date}ngAfterViewInit(){return Object(r.a)(this,void 0,void 0,(function*(){1===this.data.resIds.length&&(yield this.appAvisWorkflow.loadWorkflow(this.data.resIds[0]),this.appAvisWorkflow.emptyWorkflow()&&this.appAvisWorkflow.loadDefaultWorkflow(this.data.resIds[0]))}))}onSubmit(){return Object(r.a)(this,void 0,void 0,(function*(){if(this.loading=!0,0===this.data.resIds.length){let t=yield this.indexDocument();t&&(t=yield this.appAvisWorkflow.saveAvisWorkflow(this.data.resIds)),t&&this.executeAction(this.data.resIds)}else{const t=this.data.resIds.filter(t=>-1===this.resourcesError.map(t=>t.res_id).indexOf(t));(yield this.appAvisWorkflow.saveAvisWorkflow(t))&&this.executeAction(t)}this.loading=!1}))}indexDocument(){return new Promise((t,e)=>{this.http.post("../rest/resources",this.data.resource).pipe(Object(mt.a)(e=>{this.data.resIds=[e.resId],t(!0)}),Object(m.a)(e=>(this.notify.handleErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}executeAction(t){const e=`[${this.translate.instant("lang.avisUserAsk").toUpperCase()}] ${this.noteEditor.getNoteContent()}`;this.noteEditor.setNoteContent(e),this.http.put(this.data.processActionRoute,{resources:t,note:this.noteEditor.getNote(),data:{opinionLimitDate:this.functions.formatDateObjectToDateString(this.opinionLimitDate,!0)}}).pipe(Object(mt.a)(e=>{e||this.dialogRef.close(t),e&&null!=e.errors&&this.notify.error(e.errors)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isValidAction(){return!(this.noResourceToProcess||void 0===this.appAvisWorkflow||this.appAvisWorkflow.emptyWorkflow()||this.appAvisWorkflow.workflowEnd()||this.functions.empty(this.noteEditor.getNoteContent())||this.functions.empty(this.functions.formatDateObjectToDateString(this.opinionLimitDate)))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(Nv,!0),n.Xc(zv,!0)),2&t&&(n.yc(i=n.ec())&&(e.noteEditor=i.first),n.yc(i=n.ec())&&(e.appAvisWorkflow=i.first))},decls:37,vars:34,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],["autosize","",2,"height","100%"],[2,"background","white","padding","10px"],["color","primary","class","highlight",4,"ngIf"],["class","alert-message alert-message-danger mailList","role","alert",4,"ngIf"],["appearance","outline",2,"cursor","pointer","margin-top","10px",3,"click"],["matInput","","readonly","","required","",2,"cursor","pointer",3,"ngModel","matDatepicker","placeholder","min","ngModelChange"],["matSuffix","",3,"for",4,"ngIf"],["picker",""],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click",4,"ngIf"],[3,"title","resIds","disableRestriction"],["noteEditor",""],[3,"adminMode",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"],["role","alert",1,"alert-message","alert-message-danger","mailList"],[4,"ngFor","ngForOf"],["matSuffix","",3,"for"],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click"],["color","warn",1,"fa","fa-calendar-times"],[3,"adminMode"],["appAvisWorkflow",""]],template:function(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,Bv,2,0,"div",3),n.Wb(5,"mat-sidenav-container",4),n.Wb(6,"mat-sidenav-content",5),n.Wb(7,"div"),n.Qc(8),n.ic(9,"translate"),n.Oc(10,Uv,3,3,"b",6),n.Oc(11,$v,2,1,"b",6),n.Oc(12,Hv,3,4,"b",6),n.Qc(13," ? "),n.Vb(),n.Oc(14,Xv,6,4,"div",7),n.Wb(15,"mat-form-field",8),n.dc("click",(function(){return n.Dc(t),n.zc(23).open()})),n.Wb(16,"mat-label"),n.Qc(17),n.ic(18,"translate"),n.Vb(),n.Wb(19,"input",9),n.dc("ngModelChange",(function(t){return e.opinionLimitDate=t})),n.ic(20,"translate"),n.Vb(),n.Oc(21,qv,1,1,"mat-datepicker-toggle",10),n.Rb(22,"mat-datepicker",null,11),n.Oc(24,Kv,3,3,"button",12),n.Vb(),n.Rb(25,"app-note-editor",13,14),n.ic(27,"translate"),n.Oc(28,Yv,2,1,"app-avis-workflow",15),n.Vb(),n.Vb(),n.Vb(),n.Rb(29,"span",16),n.Wb(30,"div",17),n.Wb(31,"button",18),n.dc("click",(function(){return e.onSubmit()})),n.Qc(32),n.ic(33,"translate"),n.Vb(),n.Wb(34,"button",19),n.Qc(35),n.ic(36,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(23);n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(4),n.Sc(" ",n.jc(9,22,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(2),n.oc("ngIf",e.resourcesError.length>0),n.Db(3),n.Rc(n.jc(18,24,"lang.opinionLimitDate")),n.Db(2),n.oc("ngModel",e.opinionLimitDate)("matDatepicker",t)("placeholder",n.jc(20,26,"lang.chooseDate"))("min",e.today),n.Db(2),n.oc("ngIf",!e.opinionLimitDate),n.Db(3),n.oc("ngIf",e.opinionLimitDate),n.Db(1),n.oc("title",n.jc(27,28,"lang.addOpinionReason"))("resIds",e.data.resIds)("disableRestriction",!0),n.Db(3),n.oc("ngIf",1==e.data.resIds.length||!e.noResourceToProcess&&e.data.resIds.length>1),n.Db(3),n.oc("disabled",e.loading||!e.isValidAction()),n.Db(1),n.Rc(n.jc(33,30,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(36,32,"lang.cancel"))}},directives:[q.i,q.f,P.t,I.e,I.f,Y.c,Y.g,J.b,X.d,ae.h,X.F,X.u,X.x,ae.f,Du,q.c,k.b,q.d,V.c,P.s,ae.j,Y.j,S.a,Qv],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:2;overflow:hidden}.mailList[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{font-size:12px;max-height:100px;overflow:auto;padding-left:25px;padding-right:5px;padding-bottom:10px;margin-top:10px}.mailList[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;text-decoration:underline}.mailList[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{font-size:120%}.formType[_ngcontent-%COMP%]{align-items:center;display:flex;margin:10px;border-radius:4px;border:1px solid #ccc;position:relative;padding:10px}.formType-title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:-7px;left:10px;padding:0;margin:0;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-form-field-suffix{color:#f99830;font-size:15px;top:0}.formType[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.priceContent[_ngcontent-%COMP%]{align-items:center;width:100%}.priceContent[_ngcontent-%COMP%], .priceContent-label[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.priceContent-label[_ngcontent-%COMP%]{text-align:right;color:#135f7f;flex:1;padding-right:10px}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:90px!important}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.priceInfo[_ngcontent-%COMP%]{padding-right:20px;font-size:10px;opacity:.5;width:100%}.pjList[_ngcontent-%COMP%]{display:flex;width:100%;overflow:auto;flex-direction:column;background:#666}.pjList[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin:10px}"]}),t})();const Zv=["noteEditor"],t_=["appAvisWorkflow"];function e_(t,e){1&t&&(n.Wb(0,"div",18),n.Rb(1,"mat-spinner",19),n.Vb())}function i_(t,e){1&t&&(n.Wb(0,"b",20),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function n_(t,e){if(1&t&&(n.Wb(0,"b",20),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function a_(t,e){if(1&t&&(n.Wb(0,"b",20),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function s_(t,e){if(1&t&&(n.Rb(0,"div",21),n.ic(1,"translate")),2&t){const t=n.hc();n.oc("innerHTML","<b>"+t.ownerOpinion+"</b> "+n.jc(1,1,"lang.askOpinionUser")+" :<br/><br/>"+t.opinionContent,n.Ec)}}function o_(t,e){if(1&t&&(n.Rb(0,"div",21),n.ic(1,"translate")),2&t){const t=n.hc();n.oc("innerHTML",n.jc(1,1,"lang.sendToDocTo")+" <b>"+t.appAvisWorkflow.getNextAvisUser().labelToDisplay+"</b>",n.Ec)}}function r_(t,e){1&t&&(n.Rb(0,"div",21),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.endWorkflow"),n.Ec)}function c_(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function l_(t,e){if(1&t&&(n.Wb(0,"div",22),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,c_,5,4,"li",23),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Sc(" ",n.jc(3,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.resourcesErrors)}}function d_(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function h_(t,e){if(1&t&&(n.Wb(0,"div",24),n.Wb(1,"ul",25),n.Oc(2,d_,5,4,"li",23),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.oc("ngForOf",t.resourcesWarnings)}}function u_(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field",26),n.Wb(1,"mat-label"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"input",27),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().opinionLimitDate=e})),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(2),n.Rc(n.jc(3,2,"lang.opinionLimitDate")),n.Db(2),n.oc("ngModel",t.opinionLimitDate)}}function p_(t,e){if(1&t&&n.Rb(0,"app-avis-workflow",28,29),2&t){const t=n.hc();n.oc("adminMode",!1)("resId",t.data.resIds[0])}}let b_=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.loading=!1,this.resourcesWarnings=[],this.resourcesErrors=[],this.ownerOpinion="",this.opinionContent="",this.opinionLimitDate=null,this.noResourceToProcess=null}ngOnInit(){this.checkAvisCircuit()}checkAvisCircuit(){this.loading=!0,this.resourcesErrors=[],this.resourcesWarnings=[],this.http.post("../rest/resourcesList/users/"+this.data.userId+"/groups/"+this.data.groupId+"/baskets/"+this.data.basketId+"/actions/"+this.data.action.id+"/checkContinueOpinionCircuit",{resources:this.data.resIds}).pipe(Object(mt.a)(t=>{this.functions.empty(t.resourcesInformations.warning)||(this.resourcesWarnings=t.resourcesInformations.warning),this.functions.empty(t.resourcesInformations.error)||(this.resourcesErrors=t.resourcesInformations.error,this.noResourceToProcess=this.resourcesErrors.length===this.data.resIds.length),this.noResourceToProcess||(this.ownerOpinion=t.resourcesInformations.success[0].avisUserAsk,this.opinionContent=t.resourcesInformations.success[0].note,this.opinionLimitDate=new Date(t.resourcesInformations.success[0].opinionLimitDate),this.opinionLimitDate=this.functions.formatDateObjectToDateString(this.opinionLimitDate))}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(),Object(c.a)(!1)))).subscribe()}onSubmit(){const t=this.data.resIds.filter(t=>-1===this.resourcesErrors.map(t=>t.res_id).indexOf(t));this.executeAction(t)}executeAction(t){const e=`[${this.translate.instant("lang.avisUserState")}] ${this.noteEditor.getNoteContent()}`;this.noteEditor.setNoteContent(e),this.http.put(this.data.processActionRoute,{resources:t,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(e=>{e||this.dialogRef.close(t),e&&null!=e.errors&&this.notify.error(e.errors)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isValidAction(){return!this.noResourceToProcess&&!this.functions.empty(this.noteEditor.getNoteContent())}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(Zv,!0),n.Xc(t_,!0)),2&t&&(n.yc(i=n.ec())&&(e.noteEditor=i.first),n.yc(i=n.ec())&&(e.appAvisWorkflow=i.first))},decls:32,vars:28,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],["autosize","",2,"height","100%"],[2,"background","white","padding","10px"],["color","primary","class","highlight",4,"ngIf"],["class","alert-message alert-message-info","role","alert","style","margin-top: 30px;",3,"innerHTML",4,"ngIf"],["class","alert-message alert-message-danger mailList","role","alert",4,"ngIf"],["class","alert-message alert-message-info mailList","role","alert",4,"ngIf"],["appearance","outline","style","cursor:pointer;margin-top: 10px;",4,"ngIf"],[3,"title","resIds","disableRestriction"],["noteEditor",""],[3,"adminMode","resId",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","30px",3,"innerHTML"],["role","alert",1,"alert-message","alert-message-danger","mailList"],[4,"ngFor","ngForOf"],["role","alert",1,"alert-message","alert-message-info","mailList"],[2,"margin","0","padding-bottom","0px"],["appearance","outline",2,"cursor","pointer","margin-top","10px"],["matInput","","readonly","","disabled","",2,"cursor","pointer",3,"ngModel","ngModelChange"],[3,"adminMode","resId"],["appAvisWorkflow",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,e_,2,0,"div",3),n.Wb(5,"mat-sidenav-container",4),n.Wb(6,"mat-sidenav-content",5),n.Wb(7,"div"),n.Qc(8),n.ic(9,"translate"),n.Oc(10,i_,3,3,"b",6),n.Oc(11,n_,2,1,"b",6),n.Oc(12,a_,3,4,"b",6),n.Qc(13," ? "),n.Vb(),n.Oc(14,s_,2,3,"div",7),n.Oc(15,o_,2,3,"div",7),n.Oc(16,r_,2,3,"div",7),n.Oc(17,l_,6,4,"div",8),n.Oc(18,h_,3,1,"div",9),n.Oc(19,u_,5,4,"mat-form-field",10),n.Rb(20,"app-note-editor",11,12),n.ic(22,"translate"),n.Oc(23,p_,2,2,"app-avis-workflow",13),n.Vb(),n.Vb(),n.Vb(),n.Rb(24,"span",14),n.Wb(25,"div",15),n.Wb(26,"button",16),n.dc("click",(function(){return e.onSubmit()})),n.Qc(27),n.ic(28,"translate"),n.Vb(),n.Wb(29,"button",17),n.Qc(30),n.ic(31,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(4),n.Sc(" ",n.jc(9,20,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(2),n.oc("ngIf",1==e.data.resIds.length&&!e.noResourceToProcess),n.Db(1),n.oc("ngIf",1==e.data.resIds.length&&void 0!==e.appAvisWorkflow&&""!==e.appAvisWorkflow.getNextAvisUser()),n.Db(1),n.oc("ngIf",1==e.data.resIds.length&&void 0!==e.appAvisWorkflow&&""===e.appAvisWorkflow.getNextAvisUser()&&!e.noResourceToProcess),n.Db(1),n.oc("ngIf",e.resourcesErrors.length>0),n.Db(1),n.oc("ngIf",e.resourcesWarnings.length>0),n.Db(1),n.oc("ngIf",1===e.data.resIds.length&&!e.noResourceToProcess),n.Db(1),n.oc("title",n.jc(22,22,"lang.addOpinion"))("resIds",e.data.resIds)("disableRestriction",!0),n.Db(3),n.oc("ngIf",1==e.data.resIds.length),n.Db(3),n.oc("disabled",e.loading||!e.isValidAction()),n.Db(1),n.Rc(n.jc(28,24,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(31,26,"lang.cancel")))},directives:[q.i,q.f,P.t,I.e,I.f,Du,q.c,k.b,q.d,V.c,P.s,Y.c,Y.g,J.b,X.d,X.u,X.x,Qv],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:2;overflow:hidden}.mailList[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{font-size:12px;max-height:100px;overflow:auto;padding-left:25px;padding-right:5px;padding-bottom:10px;margin-top:10px}.mailList[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;text-decoration:underline}.mailList[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{font-size:120%}.formType[_ngcontent-%COMP%]{align-items:center;display:flex;margin:10px;border-radius:4px;border:1px solid #ccc;position:relative;padding:10px}.formType-title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:-7px;left:10px;padding:0;margin:0;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-form-field-suffix{color:#f99830;font-size:15px;top:0}.formType[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.priceContent[_ngcontent-%COMP%]{align-items:center;width:100%}.priceContent[_ngcontent-%COMP%], .priceContent-label[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.priceContent-label[_ngcontent-%COMP%]{text-align:right;color:#135f7f;flex:1;padding-right:10px}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:90px!important}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.priceInfo[_ngcontent-%COMP%]{padding-right:20px;font-size:10px;opacity:.5;width:100%}.pjList[_ngcontent-%COMP%]{display:flex;width:100%;overflow:auto;flex-direction:column;background:#666}.pjList[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin:10px}"]}),t})();const f_=["noteEditor"],m_=["appAvisWorkflow"];function g_(t,e){1&t&&(n.Wb(0,"div",20),n.Rb(1,"mat-spinner",21),n.Vb())}function v_(t,e){1&t&&(n.Wb(0,"b",22),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function __(t,e){if(1&t&&(n.Wb(0,"b",22),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function y_(t,e){if(1&t&&(n.Wb(0,"b",22),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function x_(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function C_(t,e){if(1&t&&(n.Wb(0,"div",23),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,x_,5,4,"li",24),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Sc(" ",n.jc(3,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.resourcesError)}}function O_(t,e){if(1&t&&n.Rb(0,"mat-datepicker-toggle",25),2&t){n.hc();const t=n.zc(23);n.oc("for",t)}}function D_(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",26),n.dc("click",(function(e){n.Dc(t);const i=n.hc();return e.stopPropagation(),i.opinionLimitDate=null})),n.ic(1,"translate"),n.Rb(2,"mat-icon",27),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.eraseValue"))}function w_(t,e){1&t&&n.Rb(0,"app-avis-workflow",28,29),2&t&&n.oc("adminMode",!0)("mode","parallel")}let M_=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.loading=!1,this.resourcesError=[],this.noResourceToProcess=null,this.opinionLimitDate=null,this.today=new Date,this.availableRoles=[]}ngAfterViewInit(){return Object(r.a)(this,void 0,void 0,(function*(){1===this.data.resIds.length&&(yield this.appAvisWorkflow.loadParallelWorkflow(this.data.resIds[0]),this.appAvisWorkflow.emptyWorkflow()&&this.appAvisWorkflow.loadDefaultWorkflow(this.data.resIds[0]))}))}onSubmit(){return Object(r.a)(this,void 0,void 0,(function*(){if(this.loading=!0,0===this.data.resIds.length)(yield this.indexDocument())&&this.executeAction(this.data.resIds);else{const t=this.data.resIds.filter(t=>-1===this.resourcesError.map(t=>t.res_id).indexOf(t));this.executeAction(t)}this.loading=!1}))}indexDocument(){return new Promise((t,e)=>{this.http.post("../rest/resources",this.data.resource).pipe(Object(mt.a)(e=>{this.data.resIds=[e.resId],t(!0)}),Object(m.a)(e=>(this.notify.handleErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}executeAction(t){const e=`[${this.translate.instant("lang.avisUserAsk").toUpperCase()}] ${this.noteEditor.getNoteContent()}`;this.noteEditor.setNoteContent(e),this.http.put(this.data.processActionRoute,{resources:t,note:this.noteEditor.getNote(),data:{opinionLimitDate:this.functions.formatDateObjectToDateString(this.opinionLimitDate,!0,"yyyy-mm-dd"),opinionCircuit:this.appAvisWorkflow.getWorkflow()}}).pipe(Object(mt.a)(e=>{e||this.dialogRef.close(t),e&&null!=e.errors&&this.notify.error(e.errors)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isValidAction(){return!(this.noResourceToProcess||void 0===this.appAvisWorkflow||this.appAvisWorkflow.emptyWorkflow()||this.appAvisWorkflow.workflowEnd()||this.functions.empty(this.noteEditor.getNoteContent())||this.functions.empty(this.functions.formatDateObjectToDateString(this.opinionLimitDate)))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(f_,!0),n.Xc(m_,!0)),2&t&&(n.yc(i=n.ec())&&(e.noteEditor=i.first),n.yc(i=n.ec())&&(e.appAvisWorkflow=i.first))},decls:37,vars:34,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],["autosize","",2,"height","100%"],[2,"background","white","padding","10px"],["color","primary","class","highlight",4,"ngIf"],["class","alert-message alert-message-danger mailList","role","alert",4,"ngIf"],["appearance","outline",2,"cursor","pointer","margin-top","10px",3,"click"],["matInput","","readonly","","required","",2,"cursor","pointer",3,"ngModel","matDatepicker","placeholder","min","ngModelChange"],["matSuffix","",3,"for",4,"ngIf"],["picker",""],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click",4,"ngIf"],[3,"title","resIds","disableRestriction"],["noteEditor",""],[3,"adminMode","mode",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"],["role","alert",1,"alert-message","alert-message-danger","mailList"],[4,"ngFor","ngForOf"],["matSuffix","",3,"for"],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click"],["color","warn",1,"fa","fa-calendar-times"],[3,"adminMode","mode"],["appAvisWorkflow",""]],template:function(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,g_,2,0,"div",3),n.Wb(5,"mat-sidenav-container",4),n.Wb(6,"mat-sidenav-content",5),n.Wb(7,"div"),n.Qc(8),n.ic(9,"translate"),n.Oc(10,v_,3,3,"b",6),n.Oc(11,__,2,1,"b",6),n.Oc(12,y_,3,4,"b",6),n.Qc(13," ? "),n.Vb(),n.Oc(14,C_,6,4,"div",7),n.Wb(15,"mat-form-field",8),n.dc("click",(function(){return n.Dc(t),n.zc(23).open()})),n.Wb(16,"mat-label"),n.Qc(17),n.ic(18,"translate"),n.Vb(),n.Wb(19,"input",9),n.dc("ngModelChange",(function(t){return e.opinionLimitDate=t})),n.ic(20,"translate"),n.Vb(),n.Oc(21,O_,1,1,"mat-datepicker-toggle",10),n.Rb(22,"mat-datepicker",null,11),n.Oc(24,D_,3,3,"button",12),n.Vb(),n.Rb(25,"app-note-editor",13,14),n.ic(27,"translate"),n.Oc(28,w_,2,2,"app-avis-workflow",15),n.Vb(),n.Vb(),n.Vb(),n.Rb(29,"span",16),n.Wb(30,"div",17),n.Wb(31,"button",18),n.dc("click",(function(){return e.onSubmit()})),n.Qc(32),n.ic(33,"translate"),n.Vb(),n.Wb(34,"button",19),n.Qc(35),n.ic(36,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(23);n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(4),n.Sc(" ",n.jc(9,22,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(2),n.oc("ngIf",e.resourcesError.length>0),n.Db(3),n.Rc(n.jc(18,24,"lang.opinionLimitDate")),n.Db(2),n.oc("ngModel",e.opinionLimitDate)("matDatepicker",t)("placeholder",n.jc(20,26,"lang.chooseDate"))("min",e.today),n.Db(2),n.oc("ngIf",!e.opinionLimitDate),n.Db(3),n.oc("ngIf",e.opinionLimitDate),n.Db(1),n.oc("title",n.jc(27,28,"lang.addOpinionReason"))("resIds",e.data.resIds)("disableRestriction",!0),n.Db(3),n.oc("ngIf",1==e.data.resIds.length||!e.noResourceToProcess&&e.data.resIds.length>1),n.Db(3),n.oc("disabled",e.loading||!e.isValidAction()),n.Db(1),n.Rc(n.jc(33,30,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(36,32,"lang.cancel"))}},directives:[q.i,q.f,P.t,I.e,I.f,Y.c,Y.g,J.b,X.d,ae.h,X.F,X.u,X.x,ae.f,Du,q.c,k.b,q.d,V.c,P.s,ae.j,Y.j,S.a,Qv],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:2;overflow:hidden}.mailList[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{font-size:12px;max-height:100px;overflow:auto;padding-left:25px;padding-right:5px;padding-bottom:10px;margin-top:10px}.mailList[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;text-decoration:underline}.mailList[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{font-size:120%}.formType[_ngcontent-%COMP%]{align-items:center;display:flex;margin:10px;border-radius:4px;border:1px solid #ccc;position:relative;padding:10px}.formType-title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:-7px;left:10px;padding:0;margin:0;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-form-field-suffix{color:#f99830;font-size:15px;top:0}.formType[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.priceContent[_ngcontent-%COMP%]{align-items:center;width:100%}.priceContent[_ngcontent-%COMP%], .priceContent-label[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.priceContent-label[_ngcontent-%COMP%]{text-align:right;color:#135f7f;flex:1;padding-right:10px}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:90px!important}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.priceInfo[_ngcontent-%COMP%]{padding-right:20px;font-size:10px;opacity:.5;width:100%}.pjList[_ngcontent-%COMP%]{display:flex;width:100%;overflow:auto;flex-direction:column;background:#666}.pjList[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin:10px}"]}),t})();const k_=["noteEditor"];function S_(t,e){1&t&&(n.Wb(0,"div",17),n.Rb(1,"mat-spinner",18),n.Vb())}function I_(t,e){1&t&&(n.Wb(0,"b",19),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function P_(t,e){if(1&t&&(n.Wb(0,"b",19),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function V_(t,e){if(1&t&&(n.Wb(0,"b",19),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function R_(t,e){if(1&t&&(n.Rb(0,"div",20),n.ic(1,"translate")),2&t){const t=n.hc();n.oc("innerHTML","<b>"+t.ownerOpinion+"</b> "+n.jc(1,1,"lang.askOpinionUser")+" :<br/><br/>"+t.opinionContent,n.Ec)}}function j_(t,e){1&t&&(n.Rb(0,"div",20),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.askOpinion"),n.Ec)}function A_(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function W_(t,e){if(1&t&&(n.Wb(0,"div",21),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,A_,5,4,"li",22),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Sc(" ",n.jc(3,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.resourcesErrors)}}function T_(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function E_(t,e){if(1&t&&(n.Wb(0,"div",23),n.Wb(1,"ul",24),n.Oc(2,T_,5,4,"li",22),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.oc("ngForOf",t.resourcesWarnings)}}function F_(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field",25),n.Wb(1,"mat-label"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"input",26),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().opinionLimitDate=e})),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(2),n.Rc(n.jc(3,2,"lang.opinionLimitDate")),n.Db(2),n.oc("ngModel",t.opinionLimitDate)}}let L_=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.loading=!1,this.resourcesWarnings=[],this.resourcesErrors=[],this.noResourceToProcess=null,this.opinionLimitDate=null,this.ownerOpinion="",this.opinionContent=""}ngOnInit(){this.checkAvisParallel()}checkAvisParallel(){this.loading=!0,this.resourcesErrors=[],this.resourcesWarnings=[],this.http.post("../rest/resourcesList/users/"+this.data.userId+"/groups/"+this.data.groupId+"/baskets/"+this.data.basketId+"/actions/"+this.data.action.id+"/checkGiveParallelOpinion",{resources:this.data.resIds}).pipe(Object(mt.a)(t=>{this.functions.empty(t.resourcesInformations.warning)||(this.resourcesWarnings=t.resourcesInformations.warning),this.functions.empty(t.resourcesInformations.error)||(this.resourcesErrors=t.resourcesInformations.error,this.noResourceToProcess=this.resourcesErrors.length===this.data.resIds.length),this.noResourceToProcess||(this.ownerOpinion=t.resourcesInformations.success[0].avisUserAsk,this.opinionContent=t.resourcesInformations.success[0].note,this.opinionLimitDate=new Date(t.resourcesInformations.success[0].opinionLimitDate),this.opinionLimitDate=this.functions.formatDateObjectToDateString(this.opinionLimitDate))}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(),Object(c.a)(!1)))).subscribe()}onSubmit(){const t=this.data.resIds.filter(t=>-1===this.resourcesErrors.map(t=>t.res_id).indexOf(t));this.executeAction(t)}executeAction(t){const e=`[${this.translate.instant("lang.avisUserState")}] ${this.noteEditor.getNoteContent()}`;this.noteEditor.setNoteContent(e),this.http.put(this.data.processActionRoute,{resources:t,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(e=>{e||this.dialogRef.close(t),e&&null!=e.errors&&this.notify.error(e.errors)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isValidAction(){return!this.noResourceToProcess&&!this.functions.empty(this.noteEditor.getNoteContent())}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(k_,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:30,vars:26,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],["autosize","",2,"height","100%"],[2,"background","white","padding","10px"],["color","primary","class","highlight",4,"ngIf"],["class","alert-message alert-message-info","role","alert","style","margin-top: 30px;",3,"innerHTML",4,"ngIf"],["class","alert-message alert-message-danger mailList","role","alert",4,"ngIf"],["class","alert-message alert-message-info mailList","role","alert",4,"ngIf"],["appearance","outline","style","cursor:pointer;margin-top: 10px;",4,"ngIf"],[3,"title","resIds","disableRestriction"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","30px",3,"innerHTML"],["role","alert",1,"alert-message","alert-message-danger","mailList"],[4,"ngFor","ngForOf"],["role","alert",1,"alert-message","alert-message-info","mailList"],[2,"margin","0","padding-bottom","0px"],["appearance","outline",2,"cursor","pointer","margin-top","10px"],["matInput","","readonly","","disabled","",2,"cursor","pointer",3,"ngModel","ngModelChange"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,S_,2,0,"div",3),n.Wb(5,"mat-sidenav-container",4),n.Wb(6,"mat-sidenav-content",5),n.Wb(7,"div"),n.Qc(8),n.ic(9,"translate"),n.Oc(10,I_,3,3,"b",6),n.Oc(11,P_,2,1,"b",6),n.Oc(12,V_,3,4,"b",6),n.Qc(13," ? "),n.Vb(),n.Oc(14,R_,2,3,"div",7),n.Oc(15,j_,2,3,"div",7),n.Oc(16,W_,6,4,"div",8),n.Oc(17,E_,3,1,"div",9),n.Oc(18,F_,5,4,"mat-form-field",10),n.Rb(19,"app-note-editor",11,12),n.ic(21,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Rb(22,"span",13),n.Wb(23,"div",14),n.Wb(24,"button",15),n.dc("click",(function(){return e.onSubmit()})),n.Qc(25),n.ic(26,"translate"),n.Vb(),n.Wb(27,"button",16),n.Qc(28),n.ic(29,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(4),n.Sc(" ",n.jc(9,18,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(2),n.oc("ngIf",1==e.data.resIds.length&&!e.noResourceToProcess),n.Db(1),n.oc("ngIf",e.data.resIds.length>1&&!e.noResourceToProcess),n.Db(1),n.oc("ngIf",e.resourcesErrors.length>0),n.Db(1),n.oc("ngIf",e.resourcesWarnings.length>0),n.Db(1),n.oc("ngIf",1===e.data.resIds.length&&!e.noResourceToProcess),n.Db(1),n.oc("title",n.jc(21,20,"lang.addOpinion"))("resIds",e.data.resIds)("disableRestriction",!0),n.Db(5),n.oc("disabled",e.loading||!e.isValidAction()),n.Db(1),n.Rc(n.jc(26,22,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(29,24,"lang.cancel")))},directives:[q.i,q.f,P.t,I.e,I.f,Du,q.c,k.b,q.d,V.c,P.s,Y.c,Y.g,J.b,X.d,X.u,X.x],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:2;overflow:hidden}.mailList[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{font-size:12px;max-height:100px;overflow:auto;padding-left:25px;padding-right:5px;padding-bottom:10px;margin-top:10px}.mailList[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;text-decoration:underline}.mailList[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{font-size:120%}.formType[_ngcontent-%COMP%]{align-items:center;display:flex;margin:10px;border-radius:4px;border:1px solid #ccc;position:relative;padding:10px}.formType-title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:-7px;left:10px;padding:0;margin:0;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-form-field-suffix{color:#f99830;font-size:15px;top:0}.formType[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.priceContent[_ngcontent-%COMP%]{align-items:center;width:100%}.priceContent[_ngcontent-%COMP%], .priceContent-label[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.priceContent-label[_ngcontent-%COMP%]{text-align:right;color:#135f7f;flex:1;padding-right:10px}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:90px!important}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.priceInfo[_ngcontent-%COMP%]{padding-right:20px;font-size:10px;opacity:.5;width:100%}.pjList[_ngcontent-%COMP%]{display:flex;width:100%;overflow:auto;flex-direction:column;background:#666}.pjList[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin:10px}"]}),t})();const Q_=["noteEditor"],N_=["appAvisWorkflow"];function z_(t,e){1&t&&(n.Wb(0,"div",16),n.Rb(1,"mat-spinner",17),n.Vb())}function B_(t,e){1&t&&(n.Wb(0,"b",18),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function U_(t,e){if(1&t&&(n.Wb(0,"b",18),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function $_(t,e){if(1&t&&(n.Wb(0,"b",18),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function H_(t,e){if(1&t&&(n.Rb(0,"div",19),n.ic(1,"translate")),2&t){const t=n.hc();n.oc("innerHTML",n.jc(1,1,"lang.validateAvisParallelSingle")+" <b>"+t.ownerOpinion+"</b>",n.Ec)}}function G_(t,e){1&t&&(n.Rb(0,"div",19),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.validateAvisParallel"),n.Ec)}function X_(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function q_(t,e){if(1&t&&(n.Wb(0,"div",20),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,X_,5,4,"li",21),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Sc(" ",n.jc(3,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.resourcesErrors)}}function K_(t,e){if(1&t&&n.Rb(0,"mat-datepicker-toggle",27),2&t){n.hc();const t=n.zc(8);n.oc("for",t)}}function Y_(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",28),n.dc("click",(function(e){n.Dc(t);const i=n.hc(2);return e.stopPropagation(),i.opinionLimitDate=null})),n.ic(1,"translate"),n.Rb(2,"mat-icon",29),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.eraseValue"))}function J_(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field",22),n.dc("click",(function(){return n.Dc(t),n.zc(8).open()})),n.Wb(1,"mat-label"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"input",23),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().opinionLimitDate=e})),n.ic(5,"translate"),n.Vb(),n.Oc(6,K_,1,1,"mat-datepicker-toggle",24),n.Rb(7,"mat-datepicker",null,25),n.Oc(9,Y_,3,3,"button",26),n.Vb()}if(2&t){const t=n.zc(8),e=n.hc();n.Db(2),n.Rc(n.jc(3,7,"lang.opinionLimitDate")),n.Db(2),n.oc("ngModel",e.opinionLimitDate)("matDatepicker",t)("placeholder",n.jc(5,9,"lang.chooseDate"))("min",e.today),n.Db(2),n.oc("ngIf",!e.opinionLimitDate),n.Db(3),n.oc("ngIf",e.opinionLimitDate)}}function Z_(t,e){if(1&t&&(n.Rb(0,"app-note-editor",30,31),n.ic(2,"translate")),2&t){const t=n.hc();n.oc("title",n.jc(2,4,"lang.addOpinionReason"))("content",t.opinionContent)("resIds",t.data.resIds)("disableRestriction",!0)}}function ty(t,e){1&t&&n.Rb(0,"app-avis-workflow",32,33),2&t&&n.oc("adminMode",!0)("mode","parallel")}let ey=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.headerService=o,this.loading=!1,this.resourcesWarnings=[],this.resourcesErrors=[],this.ownerOpinion="",this.opinionContent="",this.noResourceToProcess=null,this.opinionLimitDate=null,this.today=new Date,this.availableRoles=[]}ngOnInit(){this.checkAvisCircuit()}checkAvisCircuit(){this.loading=!0,this.resourcesErrors=[],this.resourcesWarnings=[],this.http.post("../rest/resourcesList/users/"+this.data.userId+"/groups/"+this.data.groupId+"/baskets/"+this.data.basketId+"/actions/"+this.data.action.id+"/checkValidateParallelOpinion",{resources:this.data.resIds}).pipe(Object(mt.a)(t=>{this.functions.empty(t.resourcesInformations.warning)||(this.resourcesWarnings=t.resourcesInformations.warning),this.functions.empty(t.resourcesInformations.error)||(this.resourcesErrors=t.resourcesInformations.error,this.noResourceToProcess=this.resourcesErrors.length===this.data.resIds.length),this.noResourceToProcess||(this.ownerOpinion=t.resourcesInformations.success[0].avisUserAsk,this.opinionContent=t.resourcesInformations.success[0].note,this.opinionLimitDate=new Date(t.resourcesInformations.success[0].opinionLimitDate))}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(),Object(c.a)(!1)))).subscribe()}ngAfterViewInit(){return Object(r.a)(this,void 0,void 0,(function*(){1===this.data.resIds.length&&(yield this.appAvisWorkflow.loadParallelWorkflow(this.data.resIds[0]))}))}onSubmit(){return Object(r.a)(this,void 0,void 0,(function*(){const t=this.data.resIds.filter(t=>-1===this.resourcesErrors.map(t=>t.res_id).indexOf(t));this.executeAction(t)}))}executeAction(t){const e=`[${this.translate.instant("lang.avisUserAsk").toUpperCase()}] ${this.noteEditor.getNoteContent()} \u2190 ${this.translate.instant("lang.validateBy")} ${this.headerService.user.firstname} ${this.headerService.user.lastname}`;this.noteEditor.setNoteContent(e),this.http.put(this.data.processActionRoute,{resources:t,data:{note:this.noteEditor.getNote(),opinionLimitDate:this.functions.formatDateObjectToDateString(this.opinionLimitDate,!0),opinionCircuit:this.appAvisWorkflow.getWorkflow()}}).pipe(Object(mt.a)(e=>{e||this.dialogRef.close(t),e&&null!=e.errors&&this.notify.error(e.errors)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isValidAction(){return 1===this.data.resIds.length?!(this.noResourceToProcess||void 0===this.noteEditor||void 0===this.appAvisWorkflow||this.appAvisWorkflow.emptyWorkflow()||this.appAvisWorkflow.workflowEnd()||this.functions.empty(this.noteEditor.getNoteContent())||this.functions.empty(this.functions.formatDateObjectToDateString(this.opinionLimitDate))):!this.noResourceToProcess}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a),n.Qb(y.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Xc(Q_,!0),n.Xc(N_,!0)),2&t&&(n.yc(i=n.ec())&&(e.noteEditor=i.first),n.yc(i=n.ec())&&(e.appAvisWorkflow=i.first))},decls:28,vars:22,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],["autosize","",2,"height","100%"],[2,"background","white","padding","10px"],["color","primary","class","highlight",4,"ngIf"],["class","alert-message alert-message-info","role","alert","style","margin-top: 30px;",3,"innerHTML",4,"ngIf"],["class","alert-message alert-message-danger mailList","role","alert",4,"ngIf"],["appearance","outline","style","cursor:pointer;margin-top: 10px;",3,"click",4,"ngIf"],[3,"title","content","resIds","disableRestriction",4,"ngIf"],[3,"adminMode","mode",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","30px",3,"innerHTML"],["role","alert",1,"alert-message","alert-message-danger","mailList"],[4,"ngFor","ngForOf"],["appearance","outline",2,"cursor","pointer","margin-top","10px",3,"click"],["matInput","","readonly","","required","",2,"cursor","pointer",3,"ngModel","matDatepicker","placeholder","min","ngModelChange"],["matSuffix","",3,"for",4,"ngIf"],["picker",""],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click",4,"ngIf"],["matSuffix","",3,"for"],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click"],["color","warn",1,"fa","fa-calendar-times"],[3,"title","content","resIds","disableRestriction"],["noteEditor",""],[3,"adminMode","mode"],["appAvisWorkflow",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,z_,2,0,"div",3),n.Wb(5,"mat-sidenav-container",4),n.Wb(6,"mat-sidenav-content",5),n.Wb(7,"div"),n.Qc(8),n.ic(9,"translate"),n.Oc(10,B_,3,3,"b",6),n.Oc(11,U_,2,1,"b",6),n.Oc(12,$_,3,4,"b",6),n.Qc(13," ? "),n.Vb(),n.Oc(14,H_,2,3,"div",7),n.Oc(15,G_,2,3,"div",7),n.Oc(16,q_,6,4,"div",8),n.Oc(17,J_,10,11,"mat-form-field",9),n.Oc(18,Z_,3,6,"app-note-editor",10),n.Oc(19,ty,2,2,"app-avis-workflow",11),n.Vb(),n.Vb(),n.Vb(),n.Rb(20,"span",12),n.Wb(21,"div",13),n.Wb(22,"button",14),n.dc("click",(function(){return e.onSubmit()})),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Wb(25,"button",15),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(4),n.Sc(" ",n.jc(9,16,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(2),n.oc("ngIf",1==e.data.resIds.length&&!e.noResourceToProcess),n.Db(1),n.oc("ngIf",e.data.resIds.length>1&&!e.noResourceToProcess),n.Db(1),n.oc("ngIf",e.resourcesErrors.length>0),n.Db(1),n.oc("ngIf",1===e.data.resIds.length&&!e.noResourceToProcess),n.Db(1),n.oc("ngIf",1===e.data.resIds.length&&!e.noResourceToProcess),n.Db(1),n.oc("ngIf",1===e.data.resIds.length&&!e.noResourceToProcess),n.Db(3),n.oc("disabled",e.loading||!e.isValidAction()),n.Db(1),n.Rc(n.jc(24,18,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(27,20,"lang.cancel")))},directives:[q.i,q.f,P.t,I.e,I.f,q.c,k.b,q.d,V.c,P.s,Y.c,Y.g,J.b,X.d,ae.h,X.F,X.u,X.x,ae.f,ae.j,Y.j,S.a,Du,Qv],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:2;overflow:hidden}.mailList[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{font-size:12px;max-height:100px;overflow:auto;padding-left:25px;padding-right:5px;padding-bottom:10px;margin-top:10px}.mailList[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;text-decoration:underline}.mailList[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{font-size:120%}.formType[_ngcontent-%COMP%]{align-items:center;display:flex;margin:10px;border-radius:4px;border:1px solid #ccc;position:relative;padding:10px}.formType-title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:-7px;left:10px;padding:0;margin:0;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-form-field-suffix{color:#f99830;font-size:15px;top:0}.formType[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.priceContent[_ngcontent-%COMP%]{align-items:center;width:100%}.priceContent[_ngcontent-%COMP%], .priceContent-label[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.priceContent-label[_ngcontent-%COMP%]{text-align:right;color:#135f7f;flex:1;padding-right:10px}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:90px!important}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.priceInfo[_ngcontent-%COMP%]{padding-right:20px;font-size:10px;opacity:.5;width:100%}.pjList[_ngcontent-%COMP%]{display:flex;width:100%;overflow:auto;flex-direction:column;background:#666}.pjList[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin:10px}"]}),t})();const iy=["noteEditor"],ny=["appSearchResultList"];function ay(t,e){1&t&&(n.Wb(0,"div",10),n.Rb(1,"mat-spinner",11),n.Vb())}function sy(t,e){1&t&&(n.Wb(0,"b",16),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function oy(t,e){if(1&t&&(n.Wb(0,"b",16),n.Qc(1),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Rc(t.data.resource.chrono)}}function ry(t,e){if(1&t&&(n.Wb(0,"b",16),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function cy(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function ly(t,e){if(1&t&&(n.Wb(0,"div",17),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,cy,5,4,"li",18),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.Sc(" ",n.jc(3,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.resourcesErrors)}}function dy(t,e){if(1&t&&(n.Wb(0,"div",12),n.Rb(1,"div",19),n.ic(2,"translate"),n.ic(3,"translate"),n.ic(4,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("innerHTML",1===t.data.resIds.length?n.jc(2,1,"lang.reconcileMsg"):n.jc(3,3,"lang.reconcileMsg")+"<br/>"+n.jc(4,5,"lang.reconcileMsg2"),n.Ec)}}const hy=function(){return["chrono","subject","recipients","senders"]};function uy(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",12),n.Wb(1,"div",20),n.Wb(2,"app-criteria-tool",21,22),n.dc("searchUrlGenerated",(function(e){return n.Dc(t),n.zc(6).launchSearch(e)})),n.Vb(),n.Rb(4,"div",23),n.Vb(),n.Rb(5,"app-search-result-list",24,25),n.Vb()}if(2&t){const t=n.zc(3);n.Db(2),n.oc("openedPanel",!0)("defaultCriteria",n.uc(7,hy)),n.Db(3),n.oc("actionMode",!1)("hideFilter",!0)("appCriteriaTool",t)("standalone",!0)("singleSelection",!0)}}function py(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div",12),n.Qc(2),n.ic(3,"translate"),n.Oc(4,sy,3,3,"b",13),n.Oc(5,oy,2,1,"b",13),n.Oc(6,ry,3,4,"b",13),n.Qc(7," ? "),n.Vb(),n.Wb(8,"div",12),n.Oc(9,ly,6,4,"div",14),n.Vb(),n.Oc(10,dy,5,7,"div",15),n.Oc(11,uy,7,8,"div",15),n.Tb()),2&t){const t=n.hc();n.Db(2),n.Sc(" ",n.jc(3,7,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===t.data.resIds.length),n.Db(1),n.oc("ngIf",1===t.data.resIds.length),n.Db(1),n.oc("ngIf",t.data.resIds.length>1),n.Db(3),n.oc("ngIf",t.resourcesErrors.length>0),n.Db(1),n.oc("ngIf",!t.noResourceToProcess),n.Db(1),n.oc("ngIf",!t.noResourceToProcess)}}let by=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.loading=!1,this.searchUrl="",this.resourcesErrors=[],this.selectedRes=[],this.noResourceToProcess=!1}ngOnInit(){this.checkReconcile()}onSubmit(){this.loading=!0,this.executeAction()}checkReconcile(){return this.resourcesErrors=[],new Promise((t,e)=>{this.http.post("../rest/resourcesList/users/"+this.data.userId+"/groups/"+this.data.groupId+"/baskets/"+this.data.basketId+"/actions/"+this.data.action.id+"/checkReconcile",{resources:this.data.resIds}).subscribe(e=>{this.functions.empty(e.resourcesInformations.error)||(this.resourcesErrors=e.resourcesInformations.error),e.resourcesInformations.success&&e.resourcesInformations.success.forEach(t=>{this.selectedRes.push(t.res_id)}),this.noResourceToProcess=this.resourcesErrors.length===this.data.resIds.length,t(!0)},t=>{this.notify.handleSoftErrors(t),this.dialogRef.close()})})}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.selectedRes,data:{resId:this.appSearchResultList.getSelectedResources()[0]}}).pipe(Object(mt.a)(t=>{null===t||this.functions.empty(t.errors)?this.dialogRef.close(this.selectedRes):this.notify.error(t.errors)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isSelectedResources(){return void 0!==this.appSearchResultList&&this.appSearchResultList.getSelectedResources().filter(t=>-1===this.data.resIds.indexOf(t)).length>0}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Xc(iy,!0),n.Xc(ny,!0)),2&t&&(n.yc(i=n.ec())&&(e.noteEditor=i.first),n.yc(i=n.ec())&&(e.appSearchResultList=i.first))},decls:15,vars:11,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],["class","alert-message alert-message-danger mailList","style","max-width: 100%;",4,"ngIf"],["class","col-md-12",4,"ngIf"],["color","primary",1,"highlight"],[1,"alert-message","alert-message-danger","mailList",2,"max-width","100%"],[4,"ngFor","ngForOf"],["role","alert",1,"alert-message","alert-message-info",2,"max-width","100%",3,"innerHTML"],[1,"bg-primary"],[3,"openedPanel","defaultCriteria","searchUrlGenerated"],["appCriteriaTool",""],["id","toolTemplate",2,"padding-top","10px"],[3,"actionMode","hideFilter","appCriteriaTool","standalone","singleSelection"],["appSearchResultList",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,ay,2,0,"div",3),n.Wb(5,"div",4),n.Oc(6,py,12,9,"ng-container",5),n.Vb(),n.Vb(),n.Rb(7,"span",6),n.Wb(8,"div",7),n.Wb(9,"button",8),n.dc("click",(function(){return e.onSubmit()})),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Wb(12,"button",9),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(2),n.oc("ngIf",e.data.resIds.length>0),n.Db(3),n.oc("disabled",e.loading||!e.isSelectedResources()||e.noResourceToProcess),n.Db(1),n.Rc(n.jc(11,7,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(14,9,"lang.cancel")))},styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.bg-primary[_ngcontent-%COMP%]{padding:10px;background:#135f7f}"]}),t})();var fy=i("FvrZ"),my=i("2Vo4"),gy=i("VRyK"),vy=i("8yBR");function _y(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tree-node",3),n.Wb(1,"button",4),n.Rb(2,"mat-icon",5),n.Vb(),n.Wb(3,"span",6),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc();return a.toggleNode(a.getData(i.item))})),n.Rb(4,"i"),n.Qc(5),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc();n.Db(3),n.Ib("node-selected",i.getData(t.item).selected),n.Db(1),n.Fb(i.getData(t.item).icon),n.Db(1),n.Sc("\xa0",i.getData(t.item).text,"")}}function yy(t,e){1&t&&n.Rb(0,"i",10),2&t&&n.Lc("left",25*e.$implicit,"px")}function xy(t,e){1&t&&n.Rb(0,"mat-progress-bar",11)}function Cy(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tree-node",3),n.Oc(1,yy,1,2,"i",7),n.Wb(2,"button",8),n.Rb(3,"mat-icon"),n.Vb(),n.Wb(4,"span",6),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc();return a.toggleNode(a.getData(i.item))})),n.Rb(5,"i"),n.Qc(6),n.Vb(),n.Oc(7,xy,1,0,"mat-progress-bar",9),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc();n.Db(1),n.oc("ngForOf",i.getIteration(t.level)),n.Db(1),n.Eb("aria-label","toggle "+t.filename),n.Db(1),n.Gb("mat-icon-rtl-mirror ",i.treeControl.isExpanded(t)?"maarch-tree-collapse":"maarch-tree-expand",""),n.Db(1),n.Ib("node-selected",i.getData(t.item).selected),n.Db(1),n.Fb(i.getData(t.item).icon),n.Db(1),n.Sc("\xa0",i.getData(t.item).text," "),n.Db(1),n.oc("ngIf",t.isLoading)}}class Oy{constructor(t,e=1,i=!1,n=!1){this.item=t,this.level=e,this.expandable=i,this.isLoading=n}}let Dy=(()=>{class t{constructor(){this.dataMap=new Map([]),this.rootLevelNodes=[]}initialData(){return this.rootLevelNodes.map(t=>new Oy(t,0,!0))}setData(t){return this.dataMap.set(t.id,t.childrens)}setRootNode(t){this.rootLevelNodes=t}getChildren(t){return this.dataMap.get(t)}isExpandable(t){return this.dataMap.has(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();class wy{constructor(t,e,i,n,a){this._treeControl=t,this._database=e,this.rawData=i,this.childrenRoute=n,this.httpClient=a,this.dataChange=new my.a([])}get data(){return this.dataChange.value}set data(t){this._treeControl.dataNodes=t,this.dataChange.next(t)}connect(t){return this._treeControl.expansionModel.changed.subscribe(t=>{(t.added||t.removed)&&this.handleTreeControl(t)}),Object(gy.a)(t.viewChange,this.dataChange).pipe(Object(l.a)(()=>this.data))}disconnect(t){}handleTreeControl(t){t.added&&t.added.forEach(t=>this.toggleNode(t,!0)),t.removed&&t.removed.slice().reverse().forEach(t=>this.toggleNode(t,!1))}toggleNode(t,e){let i=this._database.getChildren(t.item),n=this.data.indexOf(t);if(this.rawData[n].children)if(t.isLoading=!0,e)if(void 0===i)this.httpClient.get(this.childrenRoute.replace("__node",t.item)).pipe(Object(d.a)(t=>t.length>0),Object(mt.a)(e=>{e.forEach(t=>{this.rawData.push(t)}),this.rawData.map(t=>t.id),this.rawData.forEach(t=>{const e={id:t.id,childrens:this.rawData.filter(e=>e.parent===t.id).map(t=>t.id)};this.rawData.filter(e=>e.parent===t.id).length>0&&this._database.setData(e)}),i=this._database.getChildren(t.item),n=this.data.indexOf(t);const a=i.map(e=>new Oy(e,t.level+1,this._database.isExpandable(e)));this.data.splice(n+1,0,...a),this.dataChange.next(this.data)}),Object(Xt.a)(()=>t.isLoading=!1)).subscribe();else{const e=i.map(e=>new Oy(e,t.level+1,this._database.isExpandable(e)));this.data.splice(n+1,0,...e),this.dataChange.next(this.data),t.isLoading=!1}else{let e=0;for(let i=n+1;i<this.data.length&&this.data[i].level>t.level;i++,e++);this.data.splice(n+1,e),this.dataChange.next(this.data),t.isLoading=!1}}}let My=(()=>{class t{constructor(t,e){this.database=t,this.httpClient=e,this.rawData=[],this.childrenRoute="",this.multiple=!1,this.afterSelectNode=new n.o,this.afterDeselectNode=new n.o,this.getLevel=t=>t.level,this.isExpandable=t=>t.expandable,this.hasChild=(t,e)=>this.getData(e.item).children}ngOnInit(){this.treeControl=new fy.j(this.getLevel,this.isExpandable),this.dataSource=new wy(this.treeControl,this.database,this.rawData,this.childrenRoute,this.httpClient),this.initTree()}initTree(){this.rawData.forEach(t=>{const e={id:t.id,childrens:this.rawData.filter(e=>e.parent===t.id).map(t=>t.id)};this.rawData.filter(e=>e.parent===t.id).length>0&&this.database.setData(e)}),this.database.setRootNode(this.rawData.filter(t=>"#"===t.parent).map(t=>t.id)),this.dataSource.data=this.database.initialData()}getData(t){return this.rawData.filter(e=>e.id===t)[0]}toggleNode(t){t.selected?this.afterDeselectNode.emit(t):this.afterSelectNode.emit(t),this.multiple?t.selected=!t.selected:this.rawData.forEach(e=>{e.selected=e.id===t.id&&!t.selected})}getIteration(t){return Array(t).fill(0).map((t,e)=>e)}getTreeData(){return this.rawData}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(Dy),n.Qb(v.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-maaarch-tree"]],inputs:{rawData:"rawData",childrenRoute:"childrenRoute",multiple:"multiple"},outputs:{afterSelectNode:"afterSelectNode",afterDeselectNode:"afterDeselectNode"},features:[n.Cb([Dy])],decls:3,vars:3,consts:[[3,"dataSource","treeControl"],["matTreeNodePadding","","matTreeNodePaddingIndent","25px","style","background-size: 320px 96px;background-image: url(32px.png); background-position: -288px -5px;background-repeat: repeat-y;",4,"matTreeNodeDef"],["matTreeNodePadding","","matTreeNodePaddingIndent","25px","style","background-size: 320px 96px;background-image: url(32px.png); background-position: -288px -5px;background-repeat: repeat-y;",4,"matTreeNodeDef","matTreeNodeDefWhen"],["matTreeNodePadding","","matTreeNodePaddingIndent","25px",2,"background-size","320px 96px","background-image","url(32px.png)","background-position","-288px -5px","background-repeat","repeat-y"],["mat-icon-button","","disabled","",2,"width","32px","height","32px","background-size","320px 96px","background-image","url('32px.png')","background-position","-288px -5px","background-repeat","repeat-y"],[1,"maarch-tree-node"],[1,"node-content",3,"click"],["style","background-size: 320px 96px;background-image: url(32px.png); background-position: -288px -5px;background-repeat: repeat-y;width: 32px;height: 32px;position: absolute;",3,"left",4,"ngFor","ngForOf"],["type","button","mat-icon-button","","matTreeNodeToggle","",2,"width","32px","height","32px","background-size","320px 96px","background-image","url('32px.png')","background-position","-288px -5px","background-repeat","repeat-y"],["mode","indeterminate","class","example-tree-progress-bar",4,"ngIf"],[2,"background-size","320px 96px","background-image","url(32px.png)","background-position","-288px -5px","background-repeat","repeat-y","width","32px","height","32px","position","absolute"],["mode","indeterminate",1,"example-tree-progress-bar"]],template:function(t,e){1&t&&(n.Wb(0,"mat-tree",0),n.Oc(1,_y,6,5,"mat-tree-node",1),n.Oc(2,Cy,8,11,"mat-tree-node",2),n.Vb()),2&t&&(n.oc("dataSource",e.dataSource)("treeControl",e.treeControl),n.Db(2),n.oc("matTreeNodeDefWhen",e.hasChild))},directives:[vy.b,vy.h,vy.g,vy.j,k.b,S.a,P.s,vy.k,P.t,ni.a],styles:[".example-tree-progress-bar[_ngcontent-%COMP%]{margin-left:30px}.maarch-tree-expand[_ngcontent-%COMP%]{background-position:-101px -8px}.maarch-tree-collapse[_ngcontent-%COMP%], .maarch-tree-expand[_ngcontent-%COMP%]{background-size:320px 96px;background-image:url(32px.dcd8942fa7a2e261368d.png);width:22px;height:22px;line-height:22px;display:inline-block}.maarch-tree-collapse[_ngcontent-%COMP%]{background-position:-133px -8px}.maarch-tree-node[_ngcontent-%COMP%]{background-size:320px 96px;background-image:url(32px.dcd8942fa7a2e261368d.png);width:22px;height:22px;line-height:22px;display:inline-block;background-position:-69px -8px}.mat-tree[_ngcontent-%COMP%]{position:relative}.mat-tree-node[_ngcontent-%COMP%]{font-family:Titillium Web,sans-serif,Arial;min-height:32px;line-height:32px;min-width:32px;height:32px}.mat-tree-node[_ngcontent-%COMP%] button[disabled][_ngcontent-%COMP%]{opacity:1}.node-content[_ngcontent-%COMP%]{padding-left:5px;padding-right:5px;cursor:pointer;transition:all .3s;border-radius:5px;height:25px;display:flex;align-items:center;white-space:pre}.node-content[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#135f7f}.node-content[_ngcontent-%COMP%]:not(.node-selected):hover{background-color:hsla(0,0%,40%,.10980392156862745);transition:all .3s}.node-selected[_ngcontent-%COMP%]{background-color:#135f7f;color:#fff;transition:all .3s}.node-selected[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fff}"]}),t})();const ky=["noteEditor"],Sy=["maarchTree"];function Iy(t,e){1&t&&(n.Wb(0,"div",22),n.Rb(1,"mat-spinner",23),n.Vb())}function Py(t,e){1&t&&(n.Wb(0,"b",24),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function Vy(t,e){if(1&t&&(n.Wb(0,"b",24),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function Ry(t,e){if(1&t&&(n.Wb(0,"b",24),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function jy(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function Ay(t,e){if(1&t&&(n.Wb(0,"div",25),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,jy,5,4,"li",26),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Sc(" ",n.jc(3,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.resourcesErrors)}}function Wy(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-maaarch-tree",27,28),n.dc("afterSelectNode",(function(e){return n.Dc(t),n.hc().selectFolder(e)})),n.Vb()}if(2&t){const t=n.hc();n.oc("childrenRoute","../rest/alfresco/folders/__node/children")("rawData",t.alfrescoFolders)}}let Ty=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.loading=!1,this.alfrescoFolders=[],this.searchFolder=new X.i,this.selectedFolder=null,this.selectedFolderName=null,this.resourcesErrors=[],this.noResourceToProcess=null}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.loading=!0,yield this.checkAlfresco(),this.loading=!1,this.getRootFolders(),this.searchFolder.valueChanges.pipe(Object(pt.a)(300),Object(mt.a)(t=>Object(r.a)(this,void 0,void 0,(function*(){this.selectedFolder=null,this.selectedFolderName=null,0===t.length&&(yield this.getRootFolders(),this.refreshTree())}))),Object(d.a)(t=>t.length>2),Object(ft.a)(t=>this.http.get("../rest/alfresco/autocomplete/folders",{params:{search:t}})),Object(mt.a)(t=>{this.alfrescoFolders=t,this.refreshTree()})).subscribe()}))}checkAlfresco(){return this.resourcesErrors=[],new Promise((t,e)=>{this.http.post("../rest/resourcesList/users/"+this.data.userId+"/groups/"+this.data.groupId+"/baskets/"+this.data.basketId+"/actions/"+this.data.action.id+"/checkSendAlfresco",{resources:this.data.resIds}).subscribe(e=>{this.functions.empty(e.fatalError)?this.functions.empty(e.resourcesInformations.error)||(this.resourcesErrors=e.resourcesInformations.error,this.noResourceToProcess=this.resourcesErrors.length===this.data.resIds.length):(this.notify.error(this.translate.instant("lang."+e.reason)),this.dialogRef.close()),t(!0)},t=>{this.notify.handleSoftErrors(t),this.dialogRef.close()})})}refreshTree(){const t=this.alfrescoFolders;this.alfrescoFolders=[],setTimeout(()=>{this.alfrescoFolders=t},200)}getRootFolders(){return new Promise((t,e)=>{this.http.get("../rest/alfresco/rootFolders").pipe(Object(mt.a)(e=>{this.alfrescoFolders=e,t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}selectFolder(t){this.selectedFolder=t.id,this.selectedFolderName=this.getNameWithParents(t.text,t.parent)}onSubmit(){this.loading=!0,this.data.resIds.length>0&&this.executeAction()}executeAction(){const t=this.data.resIds.filter(t=>-1===this.resourcesErrors.map(t=>t.res_id).indexOf(t));this.http.put(this.data.processActionRoute,{resources:t,note:this.noteEditor.getNoteContent(),data:{folderId:this.selectedFolder,folderName:this.selectedFolderName}}).pipe(Object(mt.a)(t=>{t||this.dialogRef.close("success"),t&&null!=t.errors&&this.notify.error(t.errors)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}isValidAction(){return null!==this.selectedFolder&&!this.noResourceToProcess}getNameWithParents(t,e){return"#"===e||this.maarchTree.getTreeData().forEach(i=>{i.id==e&&(t=i.text+"/"+t,"#"!==i.parent&&(t=this.getNameWithParents(t,i.parent)))}),t}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(ky,!0),n.Xc(Sy,!0)),2&t&&(n.yc(i=n.ec())&&(e.noteEditor=i.first),n.yc(i=n.ec())&&(e.maarchTree=i.first))},decls:33,vars:21,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row",2,"margin","0"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],["class","alert-message alert-message-danger mailList","role","alert",4,"ngIf"],[2,"clear","both"],["appearance","outline","floatLabel","never",1,"smallInput"],["color","primary","matPrefix","",1,"fa","fa-search"],["type","text","id","autoCompleteInput","matInput","",3,"placeholder","formControl"],["autoCompleteInput",""],[3,"childrenRoute","rawData","afterSelectNode",4,"ngIf"],["id","jstreeAlfresco"],[1,"col-md-12",2,"padding-top","10px"],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"],["role","alert",1,"alert-message","alert-message-danger","mailList"],[4,"ngFor","ngForOf"],[3,"childrenRoute","rawData","afterSelectNode"],["maarchTree",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,Iy,2,0,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Qc(7),n.ic(8,"translate"),n.Oc(9,Py,3,3,"b",6),n.Oc(10,Vy,2,1,"b",6),n.Oc(11,Ry,3,4,"b",6),n.Qc(12," ? "),n.Vb(),n.Rb(13,"br"),n.Oc(14,Ay,6,4,"div",7),n.Wb(15,"div",8),n.Wb(16,"mat-form-field",9),n.Rb(17,"mat-icon",10),n.Rb(18,"input",11,12),n.Vb(),n.Oc(20,Wy,2,2,"app-maaarch-tree",13),n.Rb(21,"div",14),n.Vb(),n.Wb(22,"div",15),n.Rb(23,"app-note-editor",16,17),n.Vb(),n.Vb(),n.Vb(),n.Rb(25,"span",18),n.Wb(26,"div",19),n.Wb(27,"button",20),n.dc("click",(function(){return e.onSubmit()})),n.Qc(28),n.ic(29,"translate"),n.Vb(),n.Wb(30,"button",21),n.Qc(31),n.ic(32,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(3),n.Sc(" ",n.jc(8,15,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(3),n.oc("ngIf",e.resourcesErrors.length>0),n.Db(4),n.oc("placeholder","Recherche un dossier")("formControl",e.searchFolder),n.Db(2),n.oc("ngIf",e.alfrescoFolders.length>0),n.Db(3),n.oc("resIds",e.data.resIds),n.Db(4),n.oc("disabled",e.loading||!e.isValidAction()),n.Db(1),n.Rc(n.jc(29,17,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(32,19,"lang.cancel")))},directives:[q.i,q.f,P.t,Y.c,S.a,Y.i,J.b,X.d,X.u,X.j,Du,q.c,k.b,q.d,V.c,P.s,My],pipes:[g.d],styles:[".loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:2;overflow:hidden}.smallInput[_ngcontent-%COMP%]{font-size:9px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-flex{display:flex;align-items:center}.smallInput[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{height:auto}"]}),t})();const Ey=["noteEditor"];function Fy(t,e){1&t&&(n.Wb(0,"div",13),n.Rb(1,"mat-spinner",14),n.Vb())}function Ly(t,e){1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function Qy(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function Ny(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}let zy=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.loading=!1}ngOnInit(){}onSubmit(){this.loading=!0,0===this.data.resIds.length?this.indexDocumentAndExecuteAction():this.executeAction()}indexDocumentAndExecuteAction(){this.http.post("../rest/resources",this.data.resource).pipe(Object(mt.a)(t=>{this.data.resIds=[t.resId]}),p(()=>this.http.put(this.data.indexActionRoute,{resource:this.data.resIds[0],note:this.noteEditor.getNote(),data:{type:this.data.resource.registeredMail_type,warranty:this.data.resource.registeredMail_warranty,issuingSiteId:this.data.resource.registeredMail_issuingSite,letter:this.data.resource.registeredMail_letter,recipient:this.data.resource.registeredMail_recipient,reference:this.data.resource.registeredMail_reference,generated:!1}})),Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(),Object(c.a)(!1)))).subscribe()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.data.resIds,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(Ey,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:24,vars:17,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,Fy,2,0,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Qc(7),n.ic(8,"translate"),n.Oc(9,Ly,3,3,"b",6),n.Oc(10,Qy,2,1,"b",6),n.Oc(11,Ny,3,4,"b",6),n.Qc(12," ? "),n.Vb(),n.Wb(13,"div",5),n.Rb(14,"app-note-editor",7,8),n.Vb(),n.Vb(),n.Vb(),n.Rb(16,"span",9),n.Wb(17,"div",10),n.Wb(18,"button",11),n.dc("click",(function(){return e.onSubmit()})),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"button",12),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(3),n.Sc(" ",n.jc(8,11,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(3),n.oc("resIds",e.data.resIds),n.Db(4),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(20,13,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(23,15,"lang.cancel")))},directives:[q.i,q.f,P.t,Du,q.c,k.b,q.d,V.c],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:1;overflow:hidden}"]}),t})();const By=["noteEditor"];function Uy(t,e){1&t&&(n.Wb(0,"div",13),n.Rb(1,"mat-spinner",14),n.Vb())}function $y(t,e){1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function Hy(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function Gy(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}let Xy=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.loading=!1}ngOnInit(){}onSubmit(){this.loading=!0,0===this.data.resIds.length?this.indexDocumentAndExecuteAction():this.executeAction()}indexDocumentAndExecuteAction(){this.http.post("../rest/resources",this.data.resource).pipe(Object(mt.a)(t=>{this.data.resIds=[t.resId]}),p(()=>this.http.put(this.data.indexActionRoute,{resource:this.data.resIds[0],note:this.noteEditor.getNote(),data:{type:this.data.resource.registeredMail_type,warranty:this.data.resource.registeredMail_warranty,issuingSiteId:this.data.resource.registeredMail_issuingSite,letter:this.data.resource.registeredMail_letter,recipient:this.data.resource.registeredMail_recipient,reference:this.data.resource.registeredMail_reference,generated:!0}})),Object(mt.a)(t=>{if(t&&null!=t.errors)this.notify.error(t.errors);else{const e=document.createElement("a");e.href="data:application/pdf;base64,"+t.fileContent,e.setAttribute("download","recommande_"+t.registeredMailNumber.split(" ").join("_")+".pdf"),document.body.appendChild(e),e.click(),this.dialogRef.close(this.data.resIds)}}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(),Object(c.a)(!1)))).subscribe()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.data.resIds,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(By,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:24,vars:17,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,Uy,2,0,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Qc(7),n.ic(8,"translate"),n.Oc(9,$y,3,3,"b",6),n.Oc(10,Hy,2,1,"b",6),n.Oc(11,Gy,3,4,"b",6),n.Qc(12," ? "),n.Vb(),n.Wb(13,"div",5),n.Rb(14,"app-note-editor",7,8),n.Vb(),n.Vb(),n.Vb(),n.Rb(16,"span",9),n.Wb(17,"div",10),n.Wb(18,"button",11),n.dc("click",(function(){return e.onSubmit()})),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"button",12),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(3),n.Sc(" ",n.jc(8,11,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(3),n.oc("resIds",e.data.resIds),n.Db(4),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(20,13,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(23,15,"lang.cancel")))},directives:[q.i,q.f,P.t,Du,q.c,k.b,q.d,V.c],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:1;overflow:hidden}"]}),t})();const qy=["noteEditor"];function Ky(t,e){1&t&&(n.Wb(0,"div",13),n.Rb(1,"mat-spinner",14),n.Vb())}function Yy(t,e){1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function Jy(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function Zy(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}let tx=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.loading=!1}ngOnInit(){}onSubmit(){this.loading=!0,0===this.data.resIds.length?this.indexDocumentAndExecuteAction():this.executeAction()}indexDocumentAndExecuteAction(){this.http.post("../rest/resources",this.data.resource).pipe(Object(mt.a)(t=>{this.data.resIds=[t.resId]}),p(()=>this.http.put(this.data.indexActionRoute,{resource:this.data.resIds[0],note:this.noteEditor.getNote(),data:{type:this.data.resource.registeredMail_type,warranty:this.data.resource.registeredMail_warranty,issuingSiteId:this.data.resource.registeredMail_issuingSite,letter:this.data.resource.registeredMail_letter,recipient:this.data.resource.registeredMail_recipient,reference:this.data.resource.registeredMail_reference,generated:!1}})),Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(),Object(c.a)(!1)))).subscribe()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.data.resIds,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(qy,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:24,vars:17,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,Ky,2,0,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Qc(7),n.ic(8,"translate"),n.Oc(9,Yy,3,3,"b",6),n.Oc(10,Jy,2,1,"b",6),n.Oc(11,Zy,3,4,"b",6),n.Qc(12," ? "),n.Vb(),n.Wb(13,"div",5),n.Rb(14,"app-note-editor",7,8),n.Vb(),n.Vb(),n.Vb(),n.Rb(16,"span",9),n.Wb(17,"div",10),n.Wb(18,"button",11),n.dc("click",(function(){return e.onSubmit()})),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"button",12),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(3),n.Sc(" ",n.jc(8,11,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(3),n.oc("resIds",e.data.resIds),n.Db(4),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(20,13,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(23,15,"lang.cancel")))},directives:[q.i,q.f,P.t,Du,q.c,k.b,q.d,V.c],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:1;overflow:hidden}"]}),t})();const ex=["noteEditor"];function ix(t,e){1&t&&(n.Wb(0,"div",13),n.Rb(1,"mat-spinner",14),n.Vb())}function nx(t,e){1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function ax(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function sx(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}let ox=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.functions=n,this.dialogRef=a,this.data=s,this.loading=!1}ngOnInit(){}onSubmit(){this.loading=!0,this.executeAction()}executeAction(){const t=document.createElement("a");this.http.put(this.data.processActionRoute,{resources:this.data.resIds,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(e=>{e&&null!=e.errors?this.notify.error(e.errors):Object.values(e.data).forEach(e=>{if(!this.functions.empty(e)){let i;if(t.href="data:application/pdf;base64,"+e,1===this.data.resIds.length)i=this.data.resource.chrono.split(" ").join("_");else{let t,e,n,a;t=new Date,e=t.getDate(),n=t.getMonth()+1,a=t.getFullYear(),e<10&&(e="0"+e),n<10&&(n="0"+n),i=e+"-"+n+"-"+a}t.setAttribute("download","recommande_"+i+".pdf"),document.body.appendChild(t),t.click(),this.dialogRef.close(this.data.resIds)}})}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(_t.a),n.Qb(q.h),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(ex,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:24,vars:17,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,ix,2,0,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Qc(7),n.ic(8,"translate"),n.Oc(9,nx,3,3,"b",6),n.Oc(10,ax,2,1,"b",6),n.Oc(11,sx,3,4,"b",6),n.Qc(12," ? "),n.Vb(),n.Wb(13,"div",5),n.Rb(14,"app-note-editor",7,8),n.Vb(),n.Vb(),n.Vb(),n.Rb(16,"span",9),n.Wb(17,"div",10),n.Wb(18,"button",11),n.dc("click",(function(){return e.onSubmit()})),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"button",12),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(3),n.Sc(" ",n.jc(8,11,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(3),n.oc("resIds",e.data.resIds),n.Db(4),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(20,13,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(23,15,"lang.cancel")))},directives:[q.i,q.f,P.t,Du,q.c,k.b,q.d,V.c],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:1;overflow:hidden}"]}),t})();const rx=["noteEditor"];function cx(t,e){1&t&&(n.Wb(0,"div",14),n.Rb(1,"mat-spinner",15),n.Vb())}function lx(t,e){if(1&t&&(n.Wb(0,"li"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t," ")}}function dx(t,e){if(1&t&&(n.Wb(0,"div",16),n.Qc(1),n.ic(2,"translate"),n.Wb(3,"ul"),n.Oc(4,lx,2,1,"li",17),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Sc(" ",n.jc(2,2,"lang.cannotGenerateDepositListForMails")," "),n.Db(3),n.oc("ngForOf",t.cannotGenerate)}}function hx(t,e){if(1&t&&(n.Wb(0,"div",18),n.Rb(1,"app-note-editor",19,20),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("resIds",t.data.resIds)}}function ux(t,e){if(1&t&&(n.Wb(0,"div",7),n.Oc(1,cx,2,0,"div",8),n.Wb(2,"div",9),n.Wb(3,"div"),n.Wb(4,"div",10),n.Wb(5,"p"),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Wb(8,"p"),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Wb(11,"p"),n.Wb(12,"b"),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Qc(15," : "),n.Rb(16,"span",11),n.Rb(17,"br"),n.Wb(18,"b"),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Qc(21," : "),n.Rb(22,"span",11),n.Rb(23,"br"),n.Wb(24,"b"),n.Qc(25),n.ic(26,"translate"),n.Vb(),n.Qc(27," : "),n.Rb(28,"span",11),n.Rb(29,"br"),n.Vb(),n.Vb(),n.Oc(30,dx,5,4,"div",12),n.Vb(),n.Oc(31,hx,3,1,"div",13),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.loading),n.Db(5),n.Sc(" ",n.jc(7,11,"lang.registeredMailsIncludedExplication")," "),n.Db(3),n.Sc(" ",n.jc(10,13,"lang.registeredMailsIncluded")," "),n.Db(4),n.Rc(n.jc(14,15,"lang.registeredMail_2C")),n.Db(3),n.oc("innerHTML",t.types["2C"],n.Ec),n.Db(3),n.Rc(n.jc(20,17,"lang.registeredMail_2D")),n.Db(3),n.oc("innerHTML",t.types["2D"],n.Ec),n.Db(3),n.Rc(n.jc(26,19,"lang.registeredMail_RW")),n.Db(3),n.oc("innerHTML",t.types.RW,n.Ec),n.Db(2),n.oc("ngIf",0!==t.cannotGenerate.length),n.Db(1),n.oc("ngIf",0!==t.canGenerate.length)}}let px=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.functions=a,this.data=s,this.loading=!1,this.loadingInit=!1,this.types=[],this.canGenerate=[],this.cannotGenerate=[]}ngOnInit(){this.loadingInit=!0,this.checkPrintDepositList()}checkPrintDepositList(){this.http.post("../rest/resourcesList/users/"+this.data.userId+"/groups/"+this.data.groupId+"/baskets/"+this.data.basketId+"/actions/"+this.data.action.id+"/checkPrintDepositList",{resources:this.data.resIds}).subscribe(t=>{this.types=t.types,this.types["2C"]=this.functions.empty(this.types["2C"])?this.translate.instant("lang.noneItalic"):this.types["2C"],this.types["2D"]=this.functions.empty(this.types["2D"])?this.translate.instant("lang.noneItalic"):this.types["2D"],this.types.RW=this.functions.empty(this.types.RW)?this.translate.instant("lang.noneItalic"):this.types.RW,this.canGenerate=t.canGenerate,this.cannotGenerate=t.cannotGenerate,this.loadingInit=!1},t=>{this.notify.error(t.error.errors),this.dialogRef.close(),this.loadingInit=!1})}onSubmit(){this.loading=!0,this.data.resIds.length>0&&this.executeAction()}executeAction(){const t=document.createElement("a");this.http.put(this.data.processActionRoute,{resources:this.canGenerate,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(e=>{if(e&&null!=e.errors&&this.notify.error(e.errors),!this.functions.empty(e.data.encodedFile)){let i,n,a,s;t.href="data:application/pdf;base64,"+e.data.encodedFile,i=new Date,n=i.getDate(),a=i.getMonth()+1,s=i.getFullYear(),n<10&&(n="0"+n),a<10&&(a="0"+a),i=n+"-"+a+"-"+s,t.setAttribute("download","descriptif_pli_"+i+".pdf"),document.body.appendChild(t),t.click(),this.dialogRef.close(this.canGenerate)}}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(_t.a),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Xc(rx,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:12,vars:10,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content","",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],["role","alert",1,"alert-message","alert-message-info"],[3,"innerHTML"],["class","alert-message alert-message-danger","role","alert",4,"ngIf"],["class","col-md-12",4,"ngIf"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["role","alert",1,"alert-message","alert-message-danger"],[4,"ngFor","ngForOf"],[1,"col-md-12"],[3,"resIds"],["noteEditor",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Oc(3,ux,32,21,"div",2),n.Rb(4,"span",3),n.Wb(5,"div",4),n.Wb(6,"button",5),n.dc("click",(function(){return e.onSubmit()})),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Wb(9,"button",6),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(1),n.oc("ngIf",!e.loadingInit),n.Db(3),n.oc("disabled",e.loading||0===e.canGenerate.length),n.Db(1),n.Rc(n.jc(8,6,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(11,8,"lang.cancel")))},directives:[q.i,P.t,q.c,k.b,q.d,q.f,V.c,P.s,Du],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:1;overflow:hidden}.acknowledgementList[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{font-size:12px;max-height:100px;overflow:auto;padding-left:25px;padding-right:5px;padding-bottom:10px;margin-top:10px}.acknowledgementList[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;text-decoration:underline}.acknowledgementList[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{font-size:120%}.models[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;grid-gap:20px;padding-top:10px;margin-bottom:10px}.attachLabel[_ngcontent-%COMP%]{color:#135f7f}"]}),t})();function bx(t,e){1&t&&(n.Wb(0,"div",11),n.Rb(1,"mat-spinner",12),n.Qc(2),n.ic(3,"translate"),n.Vb()),2&t&&(n.Db(2),n.Sc("\xa0",n.jc(3,1,"lang.checkInProgress")," ... "))}function fx(t,e){1&t&&(n.Wb(0,"div",13),n.Rb(1,"mat-spinner"),n.Vb())}function mx(t,e){1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function gx(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Rc(t.data.resource.chrono)}}function vx(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function _x(t,e){if(1&t&&(n.Wb(0,"div"),n.Qc(1),n.ic(2,"translate"),n.Oc(3,mx,3,3,"b",14),n.Oc(4,gx,2,1,"b",14),n.Oc(5,vx,3,4,"b",14),n.Qc(6," ? "),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Sc(" ",n.jc(2,4,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===t.data.resIds.length),n.Db(1),n.oc("ngIf",1===t.data.resIds.length),n.Db(1),n.oc("ngIf",t.data.resIds.length>1)}}function yx(t,e){if(1&t&&(n.Wb(0,"mat-option",38),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label,"")}}function xx(t,e){if(1&t&&(n.Wb(0,"mat-option",38),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label,"")}}function Cx(t,e){if(1&t&&(n.Wb(0,"mat-option",38),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function Ox(t,e){if(1&t&&(n.Wb(0,"mat-form-field"),n.Wb(1,"mat-label"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-select",39),n.Oc(5,Cx,2,2,"mat-option",23),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.Rc(n.jc(3,2,"lang.folder")),n.Db(3),n.oc("ngForOf",t.folders)}}function Dx(t,e){if(1&t&&(n.Wb(0,"mat-list-item"),n.Wb(1,"span",43),n.Qc(2),n.Vb(),n.Qc(3,"\xa0-\xa0"),n.Wb(4,"span",44),n.Qc(5),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.chrono),n.Db(3),n.Rc(t.object)}}function wx(t,e){if(1&t&&(n.Wb(0,"mat-expansion-panel"),n.Wb(1,"mat-expansion-panel-header"),n.Wb(2,"mat-panel-title",40),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb(),n.Wb(5,"mat-list",41),n.Oc(6,Dx,6,2,"mat-list-item",42),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(3),n.Sc(" ",n.jc(4,2,"lang.linkedMails")," "),n.Db(3),n.oc("ngForOf",t.linkedResources)}}function Mx(t,e){if(1&t&&(n.Wb(0,"mat-option",38),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Rc(t.label)}}function kx(t,e){if(1&t&&(n.Wb(0,"mat-option",38),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Rc(t.label)}}function Sx(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab",45),n.Wb(1,"mat-form-field"),n.Wb(2,"mat-label"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"input",46),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.id=i})),n.Vb(),n.Vb(),n.Wb(6,"mat-form-field"),n.Wb(7,"mat-label"),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Wb(10,"input",46),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.label=i})),n.Vb(),n.Vb(),n.Wb(11,"mat-form-field"),n.Wb(12,"mat-label"),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Wb(15,"input",46),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.type=i})),n.Vb(),n.Vb(),n.Wb(16,"mat-form-field"),n.Wb(17,"mat-label"),n.Qc(18),n.ic(19,"translate"),n.Vb(),n.Wb(20,"mat-select",47),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.descriptionLevel=i})),n.Oc(21,kx,2,2,"mat-option",23),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=e.index,a=n.hc(2);n.qc("label","Unit\xe9 d'archive n\xb0",i+1,""),n.Db(3),n.Rc(n.jc(4,10,"lang.id")),n.Db(2),n.oc("ngModel",t.id),n.Db(3),n.Rc(n.jc(9,12,"lang.label")),n.Db(2),n.oc("ngModel",t.label),n.Db(3),n.Rc(n.jc(14,14,"lang.type")),n.Db(2),n.oc("ngModel",t.type),n.Db(3),n.Rc(n.jc(19,16,"lang.descriptionLevel")),n.Db(2),n.oc("ngModel",t.descriptionLevel),n.Db(1),n.oc("ngForOf",a.descriptionLevels)}}function Ix(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"form",16),n.Wb(2,"mat-form-field",17),n.Wb(3,"mat-label"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Rb(6,"input",18),n.Vb(),n.Wb(7,"mat-form-field",17),n.Wb(8,"mat-label"),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Rb(11,"input",19),n.Vb(),n.Wb(12,"div",20),n.Wb(13,"div",21),n.Wb(14,"mat-form-field"),n.Wb(15,"mat-label"),n.Qc(16),n.ic(17,"translate"),n.Vb(),n.Wb(18,"mat-select",22),n.dc("selectionChange",(function(e){return n.Dc(t),n.hc().archivalAgreementSelected(e)})),n.Oc(19,yx,2,2,"mat-option",23),n.Vb(),n.Vb(),n.Vb(),n.Wb(20,"div",21),n.Wb(21,"mat-form-field"),n.Wb(22,"mat-label"),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Wb(25,"mat-select",24),n.dc("selectionChange",(function(e){return n.Dc(t),n.hc().entityArchiveRecipientSelected(e)})),n.Oc(26,xx,2,2,"mat-option",23),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(27,"div",25),n.Wb(28,"div",26),n.Wb(29,"div",27),n.Qc(30),n.ic(31,"translate"),n.Vb(),n.Wb(32,"mat-form-field"),n.Wb(33,"mat-label"),n.Qc(34),n.ic(35,"translate"),n.Vb(),n.Rb(36,"input",28),n.Vb(),n.Wb(37,"mat-form-field"),n.Wb(38,"mat-label"),n.Qc(39),n.ic(40,"translate"),n.Vb(),n.Rb(41,"input",29),n.Vb(),n.Wb(42,"mat-form-field"),n.Wb(43,"mat-label"),n.Qc(44),n.ic(45,"translate"),n.Vb(),n.Rb(46,"input",30),n.Vb(),n.Vb(),n.Wb(47,"div",26),n.Wb(48,"div",27),n.Qc(49),n.ic(50,"translate"),n.Vb(),n.Wb(51,"mat-form-field"),n.Wb(52,"mat-label"),n.Qc(53),n.ic(54,"translate"),n.Vb(),n.Rb(55,"input",31),n.Vb(),n.Wb(56,"mat-form-field"),n.Wb(57,"mat-label"),n.Qc(58),n.ic(59,"translate"),n.Vb(),n.Rb(60,"input",32),n.Vb(),n.Wb(61,"mat-form-field"),n.Wb(62,"mat-label"),n.Qc(63),n.ic(64,"translate"),n.Vb(),n.Rb(65,"input",33),n.Vb(),n.Vb(),n.Vb(),n.Oc(66,Ox,6,4,"mat-form-field",5),n.Oc(67,wx,7,4,"mat-expansion-panel",5),n.Wb(68,"div",34),n.Wb(69,"div",21),n.Wb(70,"mat-form-field",17),n.Wb(71,"mat-label"),n.Qc(72),n.ic(73,"translate"),n.Vb(),n.Rb(74,"input",35),n.Vb(),n.Vb(),n.Wb(75,"div",21),n.Wb(76,"mat-form-field"),n.Wb(77,"mat-label"),n.Qc(78),n.ic(79,"translate"),n.Vb(),n.Wb(80,"mat-select",36),n.Oc(81,Mx,2,2,"mat-option",23),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(82,"mat-tab-group"),n.Oc(83,Sx,22,18,"mat-tab",37),n.Vb(),n.Tb()}if(2&t){const t=n.hc();n.Db(1),n.oc("formGroup",t.actionFormGroup),n.Db(3),n.Rc(n.jc(5,21,"lang.slipLabel")),n.Db(5),n.Rc(n.jc(10,23,"lang.slipId")),n.Db(7),n.Rc(n.jc(17,25,"lang.archivalAgreement")),n.Db(3),n.oc("ngForOf",t.archivalAgreements),n.Db(4),n.Rc(n.jc(24,27,"lang.archivalAgency")),n.Db(3),n.oc("ngForOf",t.recipientArchiveEntities),n.Db(4),n.Sc(" ",n.jc(31,29,"lang.transferEntity")," "),n.Db(4),n.Rc(n.jc(35,31,"lang.label")),n.Db(5),n.Rc(n.jc(40,33,"lang.producerService")),n.Db(5),n.Rc(n.jc(45,35,"lang.senderArchiveEntity")),n.Db(5),n.Sc(" ",n.jc(50,37,"lang.doctype")," "),n.Db(4),n.Rc(n.jc(54,39,"lang.label")),n.Db(5),n.Rc(n.jc(59,41,"lang.retentionRule")),n.Db(5),n.Rc(n.jc(64,43,"lang.retentionFinalDisposition")),n.Db(3),n.oc("ngIf",t.folders.length>0),n.Db(1),n.oc("ngIf",t.linkedResources.length>0),n.Db(5),n.Rc(n.jc(73,45,"lang.archiveId")),n.Db(6),n.Rc(n.jc(79,47,"lang.descriptionLevel")),n.Db(3),n.oc("ngForOf",t.descriptionLevels),n.Db(2),n.oc("ngForOf",t.archives)}}function Px(t,e){if(1&t&&(n.Wb(0,"div",48),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Sc(" ",t.resourcesErrors[0]," ")}}let Vx=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this._formBuilder=a,this.data=s,this.functions=o,this.loading=!1,this.checking=!1,this.resourcesErrors=[],this.recipientArchiveEntities=[],this.archivalAgreements=[],this.descriptionLevels=[{id:"Class",label:"Classe"},{id:"Collection",label:"Collection"},{id:"File",label:"Dossier"},{id:"Fonds",label:"Fonds"},{id:"Item",label:"Pi\xe8ce"},{id:"RecordGrp",label:"Groupe de documents"},{id:"Series",label:"S\xe9rie organique"},{id:"Subfonds",label:"Sous-fonds"},{id:"SubGrp",label:"Sous-groupe de documents"},{id:"Subseries",label:"Sous-s\xe9rie organique"}],this.archives=[],this.folders=[],this.linkedResources=[],this.actionFormGroup=this._formBuilder.group({folder:[""],packageName:["",X.I.required],slipId:[{value:"",disabled:!0},X.I.required],slipDate:[new Date,X.I.required],archivalAgreement:[{value:"",disabled:!1},X.I.required],entityArchiveRecipient:[{value:"",disabled:!1},X.I.required],entityLabelTransferEntity:[{value:"",disabled:!0},X.I.required],producerTransferEntity:[{value:"",disabled:!0},X.I.required],senderArchiveEntity:[{value:"",disabled:!0},X.I.required],archiveId:[{value:"",disabled:!0},X.I.required],archiveDescriptionLevel:[{value:"File",disabled:!1},X.I.required],doctype:[{value:"",disabled:!0},X.I.required],entityRetentionRule:[{value:"",disabled:!0},X.I.required],doctypeRetentionFinalDisposition:[{value:"",disabled:!0},X.I.required]})}ngOnInit(){1===this.data.resIds.length?this.getData():this.resourcesErrors.push({lang:"onlySingleResourceAllowed"})}getData(){this.checking=!0,this.http.post(`../rest/resourcesList/users/${this.data.userId}/groups/${this.data.groupId}/baskets/${this.data.basketId}/actions/${this.data.action.id}/checkSendToRecordManagement`,{resources:this.data.resIds}).pipe(Object(mt.a)(t=>{this.archives=t.archiveUnits,this.archives.forEach(t=>{t.type=this.translate.instant("lang."+t.type)}),this.linkedResources=t.additionalData.linkedResources,this.folders=t.additionalData.folders,this.recipientArchiveEntities=t.recipientArchiveEntities,this.archivalAgreements=t.archivalAgreements,this.actionFormGroup=this._formBuilder.group({folder:[this.folders.length>0?this.folders[0].id:null],packageName:["",X.I.required],slipId:[{value:t.data.slipInfo.slipId,disabled:!0},X.I.required],slipDate:[new Date,X.I.required],archivalAgreement:[{value:"",disabled:!1},X.I.required],entityArchiveRecipient:[{value:"",disabled:!1},X.I.required],entityLabelTransferEntity:[{value:t.data.entity.label,disabled:!0},X.I.required],producerTransferEntity:[{value:t.data.entity.producerService,disabled:!0},X.I.required],senderArchiveEntity:[{value:t.data.entity.senderArchiveEntity,disabled:!0},X.I.required],archiveId:[{value:t.data.slipInfo.archiveId,disabled:!0},X.I.required],archiveDescriptionLevel:[{value:"File",disabled:!1},X.I.required],doctype:[{value:t.data.doctype.label,disabled:!0},X.I.required],entityRetentionRule:[{value:t.data.doctype.retentionRule,disabled:!0},X.I.required],doctypeRetentionFinalDisposition:[{value:t.data.doctype.retentionFinalDisposition,disabled:!0},X.I.required]})}),Object(Xt.a)(()=>this.checking=!1),Object(m.a)(t=>(this.functions.empty(t.error.lang)?this.resourcesErrors.push(t.error.errors):this.resourcesErrors.push(this.translate.instant("lang."+t.error.lang)),Object(c.a)(!1)))).subscribe()}onSubmit(t){this.loading=!0,this.data.resIds.length>0&&this.executeAction(t)}executeAction(t){this.http.put(this.data.processActionRoute,{resources:this.data.resIds,data:this.formatData(t)}).pipe(Object(mt.a)(e=>{if("download"!==t||this.functions.empty(e.data.encodedFile))e||this.dialogRef.close("success");else{const t=document.createElement("a");let i,n,a,s;t.href="data:application/zip;base64,"+e.data.encodedFile,i=new Date,n=i.getDate(),a=i.getMonth()+1,s=i.getFullYear(),n<10&&(n="0"+n),a<10&&(a="0"+a),i=n+"-"+a+"-"+s,t.setAttribute("download","seda_package_"+i+".zip"),document.body.appendChild(t),t.click(),this.dialogRef.close("success")}e&&null!=e.errors&&this.notify.error(e.errors)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}formatData(t){const e={};return Object.keys(this.actionFormGroup.controls).forEach(t=>{e[t]=this.actionFormGroup.controls[t].value}),e.archives=this.archives.map(t=>({id:t.id,descriptionLevel:t.descriptionLevel})),e.actionMode=t,e}archivalAgreementSelected(t){const e=this.archivalAgreements.filter(e=>e.id===t.value);this.actionFormGroup.patchValue({entityArchiveRecipient:e[0].archiveEntityRegNumber})}entityArchiveRecipientSelected(t){this.functions.empty(this.actionFormGroup.get("archivalAgreement").value)||this.functions.empty(t.value)||0===this.archivalAgreements.filter(e=>e.id===this.actionFormGroup.get("archivalAgreement").value&&e.archiveEntityRegNumber===t.value).length&&this.actionFormGroup.patchValue({archivalAgreement:null})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(X.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-send-to-record-management"]],decls:20,vars:18,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","checking","color","primary","style","display:flex;height:100%;justify-content: center;padding: 30px;",4,"ngIf"],["class","loading","color","primary",4,"ngIf"],[4,"ngIf"],["class","alert-message alert-message-danger",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],["color","primary",1,"checking",2,"display","flex","height","100%","justify-content","center","padding","30px"],["diameter","24"],["color","primary",1,"loading"],["color","primary","class","highlight",4,"ngIf"],["color","primary",1,"highlight"],[2,"display","contents",3,"formGroup"],["appearance","outline"],["type","text","matInput","","formControlName","packageName"],["type","text","matInput","","formControlName","slipId"],[1,"row"],[1,"col-md-6"],["formControlName","archivalAgreement",3,"selectionChange"],[3,"value",4,"ngFor","ngForOf"],["formControlName","entityArchiveRecipient",3,"selectionChange"],[1,"form-group",2,"display","flex","flex-direction","row","flex-wrap","wrap"],[1,"formType","ratio-2","col-sm-12"],[1,"formType-title"],["type","text","matInput","","formControlName","entityLabelTransferEntity"],["type","text","matInput","","formControlName","producerTransferEntity"],["type","text","matInput","","formControlName","senderArchiveEntity"],["type","text","matInput","","formControlName","doctype"],["type","text","matInput","","formControlName","entityRetentionRule"],["type","text","matInput","","formControlName","doctypeRetentionFinalDisposition"],[1,"row",2,"padding-top","10px"],["type","text","matInput","","formControlName","archiveId"],["formControlName","archiveDescriptionLevel"],[3,"label",4,"ngFor","ngForOf"],[3,"value"],["formControlName","folder"],["color","primary",2,"font-size","14px"],[2,"max-height","350px","overflow","auto"],[4,"ngFor","ngForOf"],[2,"font-size","12px","color","#666"],["color","primary",2,"font-size","12px"],[3,"label"],["type","text","matInput","","disabled","",3,"ngModel","ngModelChange"],["required","",3,"ngModel","ngModelChange"],[1,"alert-message","alert-message-danger"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,bx,4,3,"div",3),n.Oc(5,fx,2,0,"div",4),n.Oc(6,_x,7,6,"div",5),n.Oc(7,Ix,84,49,"ng-container",5),n.Oc(8,Px,2,1,"div",6),n.Vb(),n.Rb(9,"span",7),n.Wb(10,"div",8),n.Wb(11,"button",9),n.dc("click",(function(){return e.onSubmit("send")})),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Wb(14,"button",9),n.dc("click",(function(){return e.onSubmit("download")})),n.Qc(15),n.ic(16,"translate"),n.Vb(),n.Wb(17,"button",10),n.Qc(18),n.ic(19,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.checking),n.Db(1),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.checking),n.Db(1),n.oc("ngIf",!e.checking&&0===e.resourcesErrors.length),n.Db(1),n.oc("ngIf",e.resourcesErrors.length>0),n.Db(3),n.oc("disabled",e.loading||!e.actionFormGroup.valid),n.Db(1),n.Rc(n.jc(13,12,"lang.send")),n.Db(2),n.oc("disabled",e.loading||!e.actionFormGroup.valid),n.Db(1),n.Rc(n.jc(16,14,"lang.download")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(19,16,"lang.cancel")))},directives:[q.i,q.f,P.t,q.c,k.b,q.d,V.c,X.K,X.v,X.m,Y.c,Y.g,J.b,X.d,X.u,X.k,ee.a,P.s,Te.c,W.p,gt.c,gt.g,gt.h,R.a,R.d,Te.a,X.x,X.F],pipes:[g.d],styles:[".loading[_ngcontent-%COMP%]{position:absolute;width:100%;left:0;top:0;z-index:1;background:hsla(0,0%,100%,.8)}.checking[_ngcontent-%COMP%], .loading[_ngcontent-%COMP%]{display:flex;height:100%;justify-content:center;align-items:center}.checking[_ngcontent-%COMP%]{padding:30px}.formType[_ngcontent-%COMP%]{align-items:center;display:flex;margin:10px;border-radius:4px;border:1px solid #ccc;position:relative;padding:10px;flex-direction:column}.formType-title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:-7px;left:10px;padding:0;margin:0;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-slide-toggle-label{color:#666;font-weight:700}.formType[_ngcontent-%COMP%] .mat-radio-button, .formType[_ngcontent-%COMP%] .mat-slide-toggle{opacity:.5;color:#666;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.formType[_ngcontent-%COMP%] .mat-checked, .formType[_ngcontent-%COMP%] .mat-radio-checked{opacity:1;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-checked .mat-slide-toggle-label{color:#135f7f}.formType[_ngcontent-%COMP%] .mat-form-field-suffix{color:#f99830;font-size:15px;top:0}.ratio-1[_ngcontent-%COMP%], .ratio-2[_ngcontent-%COMP%]{flex:1}.mat-input-element[_ngcontent-%COMP%]:disabled{color:#135f7f!important}"]}),t})();const Rx=["noteEditor"];function jx(t,e){1&t&&(n.Wb(0,"div",10),n.Rb(1,"mat-spinner",11),n.Qc(2),n.ic(3,"translate"),n.Vb()),2&t&&(n.Db(2),n.Sc("\xa0",n.jc(3,1,"lang.checkInProgress")," ... "))}function Ax(t,e){1&t&&(n.Wb(0,"div",12),n.Rb(1,"mat-spinner"),n.Vb())}function Wx(t,e){1&t&&(n.Wb(0,"b",18),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function Tx(t,e){if(1&t&&(n.Wb(0,"b",18),n.Qc(1),n.Vb()),2&t){const t=n.hc(3);n.Db(1),n.Rc(t.data.resource.chrono)}}function Ex(t,e){if(1&t&&(n.Wb(0,"b",18),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(3);n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function Fx(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function Lx(t,e){if(1&t&&(n.Wb(0,"div",19),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,Fx,5,4,"li",20),n.Vb(),n.Vb()),2&t){const t=n.hc(3);n.Db(2),n.Sc(" ",n.jc(3,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.resourcesErrors)}}function Qx(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div"),n.Qc(2),n.ic(3,"translate"),n.Oc(4,Wx,3,3,"b",16),n.Oc(5,Tx,2,1,"b",16),n.Oc(6,Ex,3,4,"b",16),n.Qc(7," ? "),n.Vb(),n.Wb(8,"div"),n.Oc(9,Lx,6,4,"div",17),n.Vb(),n.Tb()),2&t){const t=n.hc(2);n.Db(2),n.Sc(" ",n.jc(3,5,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===t.data.resIds.length),n.Db(1),n.oc("ngIf",1===t.data.resIds.length),n.Db(1),n.oc("ngIf",t.data.resIds.length>1),n.Db(3),n.oc("ngIf",t.resourcesErrors.length>0)}}function Nx(t,e){if(1&t&&(n.Wb(0,"div"),n.Rb(1,"app-note-editor",21,22),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("resIds",t.selectedRes)}}function zx(t,e){if(1&t&&(n.Wb(0,"div",13),n.Rb(1,"div",14),n.ic(2,"translate"),n.Oc(3,Qx,10,7,"ng-container",15),n.Oc(4,Nx,3,1,"div",15),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("innerHTML",n.jc(2,3,"lang.checkReplyRecordManagementDesc"),n.Ec),n.Db(2),n.oc("ngIf",t.data.resIds.length>0),n.Db(1),n.oc("ngIf",t.selectedRes.length>0)}}let Bx=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.loading=!1,this.checking=!0,this.resourcesErrors=[],this.selectedRes=[]}ngOnInit(){this.checkReply()}checkReply(){this.http.post(`../rest/resourcesList/users/${this.data.userId}/groups/${this.data.groupId}/baskets/${this.data.basketId}/checkReplyRecordManagement`,{resources:this.data.resIds}).pipe(Object(mt.a)(t=>{this.resourcesErrors=t.resourcesInformations.errors,this.selectedRes=t.resourcesInformations.success}),Object(Xt.a)(()=>this.checking=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}onSubmit(){this.loading=!0,this.executeAction()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.selectedRes,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(t=>{t||this.dialogRef.close(this.selectedRes),t&&null!=t.errors&&this.notify.error(t.errors)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-check-reply-record-management"]],viewQuery:function(t,e){var i;1&t&&n.Xc(Rx,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:15,vars:12,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","checking","color","primary","style","display:flex;height:100%;justify-content: center;padding: 30px;",4,"ngIf"],["class","loading","color","primary",4,"ngIf"],["class","row",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],["color","primary",1,"checking",2,"display","flex","height","100%","justify-content","center","padding","30px"],["diameter","24"],["color","primary",1,"loading"],[1,"row"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","0px",3,"innerHTML"],[4,"ngIf"],["color","primary","class","highlight",4,"ngIf"],["class","alert-message alert-message-danger mailList",4,"ngIf"],["color","primary",1,"highlight"],[1,"alert-message","alert-message-danger","mailList"],[4,"ngFor","ngForOf"],[3,"resIds"],["noteEditor",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,jx,4,3,"div",3),n.Oc(5,Ax,2,0,"div",4),n.Oc(6,zx,5,5,"div",5),n.Vb(),n.Rb(7,"span",6),n.Wb(8,"div",7),n.Wb(9,"button",8),n.dc("click",(function(){return e.onSubmit()})),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Wb(12,"button",9),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.checking),n.Db(1),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.checking),n.Db(3),n.oc("disabled",e.loading||0==e.selectedRes.length),n.Db(1),n.Rc(n.jc(11,8,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(14,10,"lang.cancel")))},directives:[q.i,q.f,P.t,q.c,k.b,q.d,V.c,P.s,Du],pipes:[g.d],styles:[".loading[_ngcontent-%COMP%]{position:absolute;width:100%;left:0;top:0;z-index:1;background:hsla(0,0%,100%,.8)}.checking[_ngcontent-%COMP%], .loading[_ngcontent-%COMP%]{display:flex;height:100%;justify-content:center;align-items:center}.checking[_ngcontent-%COMP%]{padding:30px}"]}),t})();const Ux=["noteEditor"];function $x(t,e){1&t&&(n.Wb(0,"div",10),n.Rb(1,"mat-spinner",11),n.Qc(2),n.ic(3,"translate"),n.Vb()),2&t&&(n.Db(2),n.Sc("\xa0",n.jc(3,1,"lang.checkInProgress")," ... "))}function Hx(t,e){1&t&&(n.Wb(0,"div",12),n.Rb(1,"mat-spinner"),n.Vb())}function Gx(t,e){1&t&&(n.Wb(0,"b",18),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function Xx(t,e){if(1&t&&(n.Wb(0,"b",18),n.Qc(1),n.Vb()),2&t){const t=n.hc(3);n.Db(1),n.Rc(t.data.resource.chrono)}}function qx(t,e){if(1&t&&(n.Wb(0,"b",18),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(3);n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function Kx(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function Yx(t,e){if(1&t&&(n.Wb(0,"div",19),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,Kx,5,4,"li",20),n.Vb(),n.Vb()),2&t){const t=n.hc(3);n.Db(2),n.Sc(" ",n.jc(3,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.resourcesErrors)}}function Jx(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div"),n.Qc(2),n.ic(3,"translate"),n.Oc(4,Gx,3,3,"b",16),n.Oc(5,Xx,2,1,"b",16),n.Oc(6,qx,3,4,"b",16),n.Qc(7," ? "),n.Vb(),n.Wb(8,"div"),n.Oc(9,Yx,6,4,"div",17),n.Vb(),n.Tb()),2&t){const t=n.hc(2);n.Db(2),n.Sc(" ",n.jc(3,5,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===t.data.resIds.length),n.Db(1),n.oc("ngIf",1===t.data.resIds.length),n.Db(1),n.oc("ngIf",t.data.resIds.length>1),n.Db(3),n.oc("ngIf",t.resourcesErrors.length>0)}}function Zx(t,e){if(1&t&&(n.Wb(0,"div"),n.Rb(1,"app-note-editor",21,22),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("resIds",t.selectedRes)}}function tC(t,e){if(1&t&&(n.Wb(0,"div",13),n.Rb(1,"div",14),n.ic(2,"translate"),n.Oc(3,Jx,10,7,"ng-container",15),n.Oc(4,Zx,3,1,"div",15),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("innerHTML",n.jc(2,3,"lang.resetRecordManagementDesc"),n.Ec),n.Db(2),n.oc("ngIf",t.data.resIds.length>0),n.Db(1),n.oc("ngIf",t.selectedRes.length>0)}}let eC=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.loading=!1,this.checking=!0,this.resourcesErrors=[],this.selectedRes=[]}ngOnInit(){this.checkReply()}checkReply(){this.http.post(`../rest/resourcesList/users/${this.data.userId}/groups/${this.data.groupId}/baskets/${this.data.basketId}/checkReplyRecordManagement`,{resources:this.data.resIds,resetAction:!0}).pipe(Object(mt.a)(t=>{this.resourcesErrors=t.resourcesInformations.errors,this.selectedRes=t.resourcesInformations.success}),Object(Xt.a)(()=>this.checking=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}onSubmit(){this.loading=!0,this.executeAction()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.selectedRes,note:this.noteEditor.getNote(),data:{resetAction:!0}}).pipe(Object(mt.a)(t=>{t||this.dialogRef.close(this.selectedRes),t&&null!=t.errors&&this.notify.error(t.errors)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-reset-record-management"]],viewQuery:function(t,e){var i;1&t&&n.Xc(Ux,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:15,vars:12,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","checking","color","primary","style","display:flex;height:100%;justify-content: center;padding: 30px;",4,"ngIf"],["class","loading","color","primary",4,"ngIf"],["class","row",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],["color","primary",1,"checking",2,"display","flex","height","100%","justify-content","center","padding","30px"],["diameter","24"],["color","primary",1,"loading"],[1,"row"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","0px",3,"innerHTML"],[4,"ngIf"],["color","primary","class","highlight",4,"ngIf"],["class","alert-message alert-message-danger mailList",4,"ngIf"],["color","primary",1,"highlight"],[1,"alert-message","alert-message-danger","mailList"],[4,"ngFor","ngForOf"],[3,"resIds"],["noteEditor",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,$x,4,3,"div",3),n.Oc(5,Hx,2,0,"div",4),n.Oc(6,tC,5,5,"div",5),n.Vb(),n.Rb(7,"span",6),n.Wb(8,"div",7),n.Wb(9,"button",8),n.dc("click",(function(){return e.onSubmit()})),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Wb(12,"button",9),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.checking),n.Db(1),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.checking),n.Db(3),n.oc("disabled",e.loading||0==e.selectedRes.length),n.Db(1),n.Rc(n.jc(11,8,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(14,10,"lang.cancel")))},directives:[q.i,q.f,P.t,q.c,k.b,q.d,V.c,P.s,Du],pipes:[g.d],styles:[".loading[_ngcontent-%COMP%]{position:absolute;width:100%;left:0;top:0;z-index:1;background:hsla(0,0%,100%,.8)}.checking[_ngcontent-%COMP%], .loading[_ngcontent-%COMP%]{display:flex;height:100%;justify-content:center;align-items:center}.checking[_ngcontent-%COMP%]{padding:30px}"]}),t})();const iC=["noteEditor"];function nC(t,e){1&t&&(n.Wb(0,"div",10),n.Rb(1,"mat-spinner",11),n.Qc(2),n.ic(3,"translate"),n.Vb()),2&t&&(n.Db(2),n.Sc("\xa0",n.jc(3,1,"lang.checkInProgress")," ... "))}function aC(t,e){1&t&&(n.Wb(0,"div",12),n.Rb(1,"mat-spinner"),n.Vb())}function sC(t,e){1&t&&(n.Wb(0,"b",18),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function oC(t,e){if(1&t&&(n.Wb(0,"b",18),n.Qc(1),n.Vb()),2&t){const t=n.hc(3);n.Db(1),n.Rc(t.data.resource.chrono)}}function rC(t,e){if(1&t&&(n.Wb(0,"b",18),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(3);n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function cC(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function lC(t,e){if(1&t&&(n.Wb(0,"div",19),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,cC,5,4,"li",20),n.Vb(),n.Vb()),2&t){const t=n.hc(3);n.Db(2),n.Sc(" ",n.jc(3,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.resourcesErrors)}}function dC(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div"),n.Qc(2),n.ic(3,"translate"),n.Oc(4,sC,3,3,"b",16),n.Oc(5,oC,2,1,"b",16),n.Oc(6,rC,3,4,"b",16),n.Qc(7," ? "),n.Vb(),n.Wb(8,"div"),n.Oc(9,lC,6,4,"div",17),n.Vb(),n.Tb()),2&t){const t=n.hc(2);n.Db(2),n.Sc(" ",n.jc(3,5,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===t.data.resIds.length),n.Db(1),n.oc("ngIf",1===t.data.resIds.length),n.Db(1),n.oc("ngIf",t.data.resIds.length>1),n.Db(3),n.oc("ngIf",t.resourcesErrors.length>0)}}function hC(t,e){if(1&t&&(n.Wb(0,"div"),n.Rb(1,"app-note-editor",21,22),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("resIds",t.selectedRes)}}function uC(t,e){if(1&t&&(n.Wb(0,"div",13),n.Rb(1,"div",14),n.ic(2,"translate"),n.Oc(3,dC,10,7,"ng-container",15),n.Oc(4,hC,3,1,"div",15),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("innerHTML",n.jc(2,3,"lang.checkAcknowledgmentRecordManagementDesc"),n.Ec),n.Db(2),n.oc("ngIf",t.data.resIds.length>0),n.Db(1),n.oc("ngIf",t.selectedRes.length>0)}}let pC=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.loading=!1,this.checking=!0,this.resourcesErrors=[],this.selectedRes=[]}ngOnInit(){this.checkAcknowledgement()}checkAcknowledgement(){this.http.post(`../rest/resourcesList/users/${this.data.userId}/groups/${this.data.groupId}/baskets/${this.data.basketId}/checkAcknowledgementRecordManagement`,{resources:this.data.resIds}).pipe(Object(mt.a)(t=>{this.resourcesErrors=t.resourcesInformations.errors,this.selectedRes=t.resourcesInformations.success}),Object(Xt.a)(()=>this.checking=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}onSubmit(){this.loading=!0,this.executeAction()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.selectedRes,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(t=>{t||this.dialogRef.close(this.selectedRes),t&&null!=t.errors&&this.notify.error(t.errors)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-check-acknowledgment-record-management"]],viewQuery:function(t,e){var i;1&t&&n.Xc(iC,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:15,vars:12,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","checking","color","primary","style","display:flex;height:100%;justify-content: center;padding: 30px;",4,"ngIf"],["class","loading","color","primary",4,"ngIf"],["class","row",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],["color","primary",1,"checking",2,"display","flex","height","100%","justify-content","center","padding","30px"],["diameter","24"],["color","primary",1,"loading"],[1,"row"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","0px",3,"innerHTML"],[4,"ngIf"],["color","primary","class","highlight",4,"ngIf"],["class","alert-message alert-message-danger mailList",4,"ngIf"],["color","primary",1,"highlight"],[1,"alert-message","alert-message-danger","mailList"],[4,"ngFor","ngForOf"],[3,"resIds"],["noteEditor",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,nC,4,3,"div",3),n.Oc(5,aC,2,0,"div",4),n.Oc(6,uC,5,5,"div",5),n.Vb(),n.Rb(7,"span",6),n.Wb(8,"div",7),n.Wb(9,"button",8),n.dc("click",(function(){return e.onSubmit()})),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Wb(12,"button",9),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.checking),n.Db(1),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.checking),n.Db(3),n.oc("disabled",e.loading||0==e.selectedRes.length),n.Db(1),n.Rc(n.jc(11,8,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(14,10,"lang.cancel")))},directives:[q.i,q.f,P.t,q.c,k.b,q.d,V.c,P.s,Du],pipes:[g.d],styles:[".loading[_ngcontent-%COMP%]{position:absolute;width:100%;left:0;top:0;z-index:1;background:hsla(0,0%,100%,.8)}.checking[_ngcontent-%COMP%], .loading[_ngcontent-%COMP%]{display:flex;height:100%;justify-content:center;align-items:center}.checking[_ngcontent-%COMP%]{padding:30px}"]}),t})(),bC=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.dialog=i,this.notify=n,this.router=a,this.headerService=s,this.functions=o,this.mode="indexing",this.currentResourceLock=null,this.lockMode=!0,this.actionEnded=!1,this.currentAction=null,this.currentUserId=null,this.currentGroupId=null,this.currentBasketId=null,this.currentResIds=[],this.currentResourceInformations=null,this.loading=!1,this.eventAction=new da.a}ngOnDestroy(){this.currentResourceLock&&this.unlockResourceAfterActionModal(this.currentResIds)}catchAction(){return this.eventAction.asObservable()}emitAction(){this.eventAction.next()}setLoading(t){this.loading=t}setActionInformations(t,e,i,n,a){return!(null!==t&&null===t.component||(null!==t&&e>0&&i>0?(this.mode=null===n?"indexing":"process",this.currentAction=t,this.currentUserId=e,this.currentGroupId=i,this.currentBasketId=n,this.currentResIds=null===a?[]:a,this.indexActionRoute=`../rest/indexing/groups/${this.currentGroupId}/actions/${this.currentAction.id}`,this.processActionRoute=`../rest/resourcesList/users/${this.currentUserId}/groups/${this.currentGroupId}/baskets/${this.currentBasketId}/actions/${this.currentAction.id}`,0):(console.log("Bad informations: "),console.log({action:t},{userId:e},{groupId:i},{basketId:n},{resIds:a}),this.notify.error("Une erreur est survenue"),1)))}saveDocument(t){return this.loading=!0,this.setResourceInformations(t),this.http.post("../rest/resources",this.currentResourceInformations)}setResourceInformations(t){this.currentResourceInformations=t}setResourceIds(t){this.currentResourceInformations.resId=t,this.currentResIds=t}launchIndexingAction(t,e,i,n){if(this.setActionInformations(t,e,i,null,null)){this.setResourceInformations(n),this.loading=!0;try{this[t.component]()}catch(a){console.log(a),console.log(t.component),alert(this.translate.instant("lang.actionNotExist"))}}}launchAction(t,e,i,n,a,s,o=!0){return Object(r.a)(this,void 0,void 0,(function*(){if(this.setActionInformations(t,e,i,n,a))if(this.actionEnded=!1,this.loading=!0,this.lockMode=o,this.setResourceInformations(s),this.lockMode){if(!0===(yield this.canExecuteAction(a)))if(["viewDoc","documentDetails","signatureBookAction","processDocument"].indexOf(t.component)>-1)this[t.component](t.data);else try{this.lockResource(),this[t.component](t.data)}catch(r){console.log(r),console.log(t),this.unlockResourceAfterActionModal([]),alert(this.translate.instant("lang.actionNotExist"))}}else try{this[t.component]()}catch(r){console.log(r),console.log(t),alert(this.translate.instant("lang.actionNotExist"))}}))}canExecuteAction(t,e=this.currentUserId,i=this.currentGroupId,n=this.currentBasketId){return new Promise(a=>{this.http.put(`../rest/resourcesList/users/${e}/groups/${i}/baskets/${n}/locked`,{resources:t}).pipe(Object(mt.a)(e=>{let i=this.translate.instant("lang.warnLockRes")+" : "+e.lockers.join(", ");e.countLockedResources!=t.length&&(i+=this.translate.instant("lang.warnLockRes2")+"."),e.countLockedResources>0&&alert(e.countLockedResources+" "+i),e.countLockedResources!=t.length?(this.currentResIds=e.resourcesToProcess,a(!0)):a(!1)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()})}hasLockResources(){return!this.functions.empty(this.currentResourceLock)}lockResource(t=this.currentUserId,e=this.currentGroupId,i=this.currentBasketId,n=this.currentResIds){console.debug("Lock resources : "+n),this.http.put(`../rest/resourcesList/users/${t}/groups/${e}/baskets/${i}/lock`,{resources:n}).pipe(Object(mt.a)(()=>console.debug("Cycle lock : ",this.currentResourceLock)),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe(),this.functions.empty(this.currentResourceLock)||clearInterval(this.currentResourceLock),this.currentResourceLock=setInterval(()=>{this.http.put(`../rest/resourcesList/users/${t}/groups/${e}/baskets/${i}/lock`,{resources:n}).pipe(Object(mt.a)(()=>console.debug("Cycle lock : ",this.currentResourceLock)),Object(m.a)(t=>(403===t.status&&clearInterval(this.currentResourceLock),this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()},5e4)}unlockResource(t=this.currentUserId,e=this.currentGroupId,i=this.currentBasketId,n=this.currentResIds){n.length>0&&(console.debug("Unlock resources : "+n),this.http.put(`../rest/resourcesList/users/${t}/groups/${e}/baskets/${i}/unlock`,{resources:n}).pipe(Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe())}stopRefreshResourceLock(){null!==this.currentResourceLock&&(console.debug("Cycle lock cancel"),clearInterval(this.currentResourceLock))}setDatasActionToSend(){return{resIds:this.currentResIds,resource:this.currentResourceInformations,action:this.currentAction,userId:this.currentUserId,groupId:this.currentGroupId,basketId:this.currentBasketId,indexActionRoute:this.indexActionRoute,processActionRoute:this.processActionRoute}}unlockResourceAfterActionModal(t){this.lockMode&&(this.stopRefreshResourceLock(),this.functions.empty(t)&&this.unlockResource())}endAction(t){"indexing"===this.mode&&!this.functions.empty(this.currentResourceInformations.followed)&&this.currentResourceInformations.followed&&this.headerService.nbResourcesFollowed++,this.notify.success(this.translate.instant("lang.action")+' : "'+this.currentAction.label+'" '+this.translate.instant("lang.done")),this.actionEnded=!0,this.eventAction.next(t)}confirmAction(t=null){this.dialog.open(Pu,{panelClass:"maarch-modal",disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}closeMailAction(t=null){this.dialog.open(Nu,{disableClose:!0,width:"500px",panelClass:"maarch-modal",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}closeAndIndexAction(t=null){this.dialog.open(Sp,{panelClass:"maarch-modal",disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}redirectInitiatorEntityAction(t=null){this.dialog.open(Ym,{panelClass:"maarch-modal",disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}closeMailWithAttachmentsOrNotesAction(t=null){this.dialog.open(sg,{panelClass:"maarch-modal",disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}updateAcknowledgementSendDateAction(t=null){this.dialog.open(Ap,{panelClass:"maarch-modal",disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}createAcknowledgementReceiptsAction(t=null){this.dialog.open(ib,{panelClass:"maarch-modal",disableClose:!0,width:"600px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}updateDepartureDateAction(t=null){this.dialog.open(cb,{panelClass:"maarch-modal",disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}disabledBasketPersistenceAction(t=null){this.dialog.open(bb,{disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}enabledBasketPersistenceAction(t=null){this.dialog.open(yb,{disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}resMarkAsReadAction(t=null){this.dialog.open(Mb,{disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}viewDoc(t=null){this.dialog.open(kb,{panelClass:"maarch-modal",data:this.setDatasActionToSend()})}sendExternalSignatoryBookAction(t=null){this.dialog.open(_f,{panelClass:"maarch-modal",disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}sendExternalNoteBookAction(t=null){this.dialog.open(If,{panelClass:"maarch-modal",disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}redirectAction(t=null){this.dialog.open(Om,{panelClass:"maarch-modal",disableClose:!0,data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}sendShippingAction(t=null){this.dialog.open(zm,{panelClass:"maarch-modal",disableClose:!0,minWidth:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}sendSignatureBookAction(t=null){this.dialog.open(Yg,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}continueVisaCircuitAction(t=null){this.dialog.open(pv,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}noConfirmAction(t=null){const e=this.setDatasActionToSend();0===e.resIds.length?this.http.post("../rest/resources",e.resource).pipe(Object(mt.a)(t=>{e.resIds=[t.resId]}),p(()=>this.http.put(e.indexActionRoute,{resource:e.resIds[0]})),Object(mt.a)(()=>{this.endAction(e.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe():this.http.put(e.processActionRoute,{resources:this.setDatasActionToSend().resIds}).pipe(Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}processDocument(t=null){this.router.navigate([`/process/users/${this.currentUserId}/groups/${this.currentGroupId}/baskets/${this.currentBasketId}/resId/${this.currentResIds}`])}signatureBookAction(t=null){this.router.navigate([`/signatureBook/users/${this.currentUserId}/groups/${this.currentGroupId}/baskets/${this.currentBasketId}/resources/${this.currentResIds}`])}documentDetails(t=null){this.router.navigate(["/resources/"+this.currentResIds])}rejectVisaBackToPreviousAction(t=null){this.dialog.open(tp,{panelClass:"maarch-modal",disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}resetVisaAction(t=null){this.dialog.open(up,{panelClass:"maarch-modal",disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}interruptVisaAction(t=null){this.dialog.open(Cp,{panelClass:"maarch-modal",disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}sendToOpinionCircuitAction(t=null){this.dialog.open(Jv,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}sendToParallelOpinion(t=null){this.dialog.open(M_,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}continueOpinionCircuitAction(t=null){this.dialog.open(b_,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}giveOpinionParallelAction(t=null){this.dialog.open(L_,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}validateParallelOpinionDiffusionAction(t=null){this.dialog.open(ey,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}reconcileAction(t=null){this.dialog.open(by,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(()=>{this.stopRefreshResourceLock()}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}sendAlfrescoAction(t=null){this.dialog.open(Ty,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>"success"===t),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}saveRegisteredMailAction(t=null){this.dialog.open(zy,{panelClass:"maarch-modal",disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}saveAndPrintRegisteredMailAction(t=null){this.dialog.open(Xy,{panelClass:"maarch-modal",disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}saveAndIndexRegisteredMailAction(t=null){this.dialog.open(tx,{panelClass:"maarch-modal",disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}printRegisteredMailAction(t=null){this.dialog.open(ox,{panelClass:"maarch-modal",disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}printDepositListAction(t=null){this.dialog.open(px,{panelClass:"maarch-modal",disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}sendToRecordManagementAction(t=null){this.dialog.open(Vx,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}checkReplyRecordManagementAction(t=null){this.dialog.open(Bx,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}resetRecordManagementAction(t=null){this.dialog.open(eC,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}checkAcknowledgmentRecordManagementAction(t=null){this.dialog.open(pC,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.ac(g.e),n.ac(v.b),n.ac(q.b),n.ac(D.a),n.ac(o.c),n.ac(y.a),n.ac(_t.a))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();const fC=["noteEditor"];function mC(t,e){1&t&&(n.Wb(0,"div",2),n.Rb(1,"mat-spinner",3),n.Vb())}function gC(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-note-editor",7,8),n.dc("refreshNotes",(function(e){return n.Dc(t),n.hc(2).loadNotes(e)})),n.Vb()}if(2&t){const t=n.hc(2);n.oc("addMode",!0)("resIds",t.resIds)("defaultRestriction",!0)}}function vC(t,e){1&t&&(n.Wb(0,"div",9),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noNote")," "))}function _C(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card-subtitle",16),n.Wb(1,"button",17),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).editNote(e)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",18),n.Vb(),n.Wb(4,"button",19),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).removeNote(e)})),n.ic(5,"translate"),n.Rb(6,"mat-icon",20),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.pc("title",n.jc(2,2,"lang.editNote")),n.Db(3),n.pc("title",n.jc(5,4,"lang.removeNote")))}function yC(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-note-editor",21,8),n.dc("refreshNotes",(function(e){return n.Dc(t),n.hc(3).loadNotes(e)})),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc(2);n.oc("resIds",e.resIds)("upMode",!0)("noteId",t.id)("entitiesNoteRestriction",e.getRestrictionEntitiesId(t.entities_restriction))("noteContent",t.value)}}function xC(t,e){if(1&t&&(n.Wb(0,"span",26),n.ic(1,"translate"),n.Rb(2,"i",27),n.Qc(3),n.Vb()),2&t){const t=e.$implicit;n.pc("title",n.jc(1,2,"lang.restrictedEntity")),n.Db(3),n.Sc(" ",t.short_label,"")}}function CC(t,e){if(1&t&&(n.Wb(0,"div",24),n.Oc(1,xC,4,4,"span",25),n.Vb()),2&t){const t=n.hc(2).$implicit;n.Db(1),n.oc("ngForOf",t.entities_restriction)}}function OC(t,e){if(1&t&&(n.Wb(0,"mat-card-content"),n.Wb(1,"p",22),n.Qc(2),n.Vb(),n.Oc(3,CC,2,1,"div",23),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(2),n.Sc(" ",t.value," "),n.Db(1),n.oc("ngIf",!e.functions.empty(t.entities_restriction))}}const DC=function(t){return{"background-color":t}};function wC(t,e){if(1&t&&(n.Wb(0,"mat-card",10),n.Wb(1,"mat-card-header"),n.Wb(2,"div",11),n.Rb(3,"i",12),n.Vb(),n.Wb(4,"mat-card-title"),n.Qc(5),n.Vb(),n.Wb(6,"mat-card-subtitle"),n.Qc(7),n.Vb(),n.Wb(8,"mat-card-subtitle",13),n.ic(9,"fullDate"),n.Qc(10),n.ic(11,"timeAgo"),n.Vb(),n.Oc(12,_C,7,6,"mat-card-subtitle",14),n.Vb(),n.Oc(13,yC,2,5,"app-note-editor",15),n.Oc(14,OC,4,2,"mat-card-content",1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.oc("ngStyle",n.vc(13,DC,t.entities_restriction?"#FFEDCC":"white")),n.Db(5),n.Tc("",t.firstname," ",t.lastname,""),n.Db(2),n.Rc(t.entity_label),n.Db(1),n.pc("title",n.jc(9,9,t.creation_date)),n.Db(2),n.Rc(n.jc(11,11,t.creation_date)),n.Db(2),n.oc("ngIf",t.user_id==i.headerService.user.id),n.Db(1),n.oc("ngIf",t.edit),n.Db(1),n.oc("ngIf",!t.edit)}}function MC(t,e){if(1&t&&(n.Ub(0),n.Oc(1,gC,2,3,"app-note-editor",4),n.Oc(2,vC,3,3,"div",5),n.Oc(3,wC,15,15,"mat-card",6),n.Tb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.editMode),n.Db(1),n.oc("ngIf",0==t.notes.length),n.Db(1),n.oc("ngForOf",t.notes)}}let kC=(()=>{class t{constructor(t,e,i,a,s,o){this.translate=t,this.http=e,this.notify=i,this.headerService=a,this.dialog=s,this.functions=o,this.notes=[],this.loading=!0,this.resIds=[],this.resId=null,this.editMode=!1,this.reloadBadgeNotes=new n.o}ngOnInit(){null!==this.resId&&this.http.get(`../rest/resources/${this.resId}/notes`).pipe(Object(mt.a)(t=>{this.resIds[0]=this.resId,this.notes=t.notes}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}loadNotes(t){this.resIds[0]=t,this.loading=!0,this.http.get("../rest/resources/"+this.resIds[0]+"/notes").subscribe(t=>{this.notes=t.notes,this.reloadBadgeNotes.emit(""+this.notes.length),this.loading=!1})}getRestrictionEntitiesId(t){return this.functions.empty(t)?[]:t.map(t=>t.item_id[0])}removeNote(t){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!1,data:{title:this.translate.instant("lang.confirmRemoveNote"),msg:this.translate.instant("lang.confirmAction")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.request("DELETE","../rest/notes/"+t.id)),Object(mt.a)(()=>{const e=this.notes.findIndex(e=>e.id==t.id);e>-1&&this.notes.splice(e,1),this.notify.success(this.translate.instant("lang.noteRemoved")),this.reloadBadgeNotes.emit(""+this.notes.length)})).subscribe()}editNote(t){t.edit=!t.edit}isModified(){return void 0!==this.noteEditor&&this.noteEditor.isWritingNote()}addNote(){this.noteEditor.addNote()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(q.b),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-notes-list"]],viewQuery:function(t,e){var i;1&t&&n.Xc(fC,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},inputs:{injectDatas:"injectDatas",resId:"resId",editMode:"editMode"},outputs:{reloadBadgeNotes:"reloadBadgeNotes"},decls:2,vars:2,consts:[["style","display:flex;height:100%;",4,"ngIf"],[4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],["style","margin: 20px;display: flex;flex-direction: column;",3,"addMode","resIds","defaultRestriction","refreshNotes",4,"ngIf"],["style","text-align:center;font-size:24px;font-weight:bold;opacity:0.3;",4,"ngIf"],["style","margin-top: 10px;",3,"ngStyle",4,"ngFor","ngForOf"],[2,"margin","20px","display","flex","flex-direction","column",3,"addMode","resIds","defaultRestriction","refreshNotes"],["noteEditor",""],[2,"text-align","center","font-size","24px","font-weight","bold","opacity","0.3"],[2,"margin-top","10px",3,"ngStyle"],["mat-card-avatar",""],["color","primary",1,"fa","fa-user"],[1,"dateNote",3,"title"],["class","removeNote",4,"ngIf"],["style","margin: 20px;display: flex;flex-direction: column;",3,"resIds","upMode","noteId","entitiesNoteRestriction","noteContent","refreshNotes",4,"ngIf"],[1,"removeNote"],["matSuffix","","mat-icon-button","",1,"editNote",3,"title","click"],["fontSet","fas","fontIcon","fa-pencil-alt fa-2x"],["matSuffix","","mat-icon-button","",2,"color","red",3,"title","click"],["fontSet","far","fontIcon","fa-trash-alt fa-2x"],[2,"margin","20px","display","flex","flex-direction","column",3,"resIds","upMode","noteId","entitiesNoteRestriction","noteContent","refreshNotes"],[1,"noteTextContent"],["style","overflow: auto;max-height: 75px;",4,"ngIf"],[2,"overflow","auto","max-height","75px"],["class","label label-default noteRestriction",3,"title",4,"ngFor","ngForOf"],[1,"label","label-default","noteRestriction",3,"title"],[1,"fa","fa-sitemap"]],template:function(t,e){1&t&&(n.Oc(0,mC,2,0,"div",0),n.Oc(1,MC,4,3,"ng-container",1)),2&t&&(n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[P.t,V.c,P.s,Du,K.a,P.w,K.f,K.c,K.m,K.l,k.b,Y.j,S.a,K.d],pipes:[g.d,uo,ps],styles:[".mat-card[_ngcontent-%COMP%]{margin:20px;padding:0;box-shadow:none;border:1px solid rgba(0,0,0,.12)}.mat-card-header[_ngcontent-%COMP%]{background:#f9f9f9;padding:10px}.mat-card-avatar[_ngcontent-%COMP%]{height:auto;width:auto;border-radius:0;display:flex;text-align:center}.mat-card-avatar[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{flex:1;font-size:25px;margin:auto}.mat-card-title[_ngcontent-%COMP%]{font-size:14px;font-weight:700;margin:0}.mat-card-subtitle[_ngcontent-%COMP%]{margin:0;padding-top:5px}.dateNote[_ngcontent-%COMP%]{position:absolute;right:10px;top:13px;font-size:12px;margin:0;color:#135f7f}.removeNote[_ngcontent-%COMP%]{position:absolute;top:22px;right:0}.editNote[_ngcontent-%COMP%]{margin-right:-10px;color:#135f7f}.noteTextContent[_ngcontent-%COMP%]{white-space:pre-line;padding:30px}.noteRestriction[_ngcontent-%COMP%]{background-color:rgba(0,0,0,.4);white-space:normal;display:inline-block;margin:5px!important}"]}),t})();const SC=["tableHistoryListSort"],IC=["autoCompleteInput"];function PC(t,e){1&t&&n.Rb(0,"mat-spinner")}function VC(t,e){if(1&t&&(n.Wb(0,"div",35),n.Oc(1,PC,1,0,"mat-spinner",10),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.isLoadingResults)}}function RC(t,e){1&t&&(n.Wb(0,"mat-option",36),n.Wb(1,"div",37),n.Rb(2,"mat-spinner",38),n.Vb(),n.Vb())}function jC(t,e){if(1&t&&(n.Wb(0,"mat-option",42),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2).$implicit,a=n.hc(2);n.Lc("color",t.used?"":a.filterColor[i.key]),n.oc("id",i.key)("value",t)("disabled",t.used),n.Db(1),n.Sc(" ",t.label," ")}}function AC(t,e){if(1&t&&(n.Wb(0,"mat-optgroup",40),n.ic(1,"translate"),n.Oc(2,jC,2,6,"mat-option",41),n.ic(3,"sortBy"),n.ic(4,"async"),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc(2);n.oc("label",n.jc(1,2,"lang."+t.key)),n.Db(2),n.oc("ngForOf",n.kc(3,4,n.jc(4,7,e.filteredList[t.key]),"label"))}}function WC(t,e){if(1&t&&(n.Ub(0),n.Oc(1,AC,5,9,"mat-optgroup",39),n.ic(2,"async"),n.Tb()),2&t){const t=e.$implicit,a=n.hc(2);var i;n.Db(1),n.oc("ngIf",(null==(i=n.jc(2,1,a.filteredList[t.key]))?null:i.length)>0)}}function TC(t,e){if(1&t&&(n.Ub(0),n.Oc(1,WC,3,3,"ng-container",18),n.ic(2,"keyvalue"),n.Tb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",n.jc(2,1,t.filterList))}}function EC(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",43),n.dc("click",(function(){return n.Dc(t),n.hc().switchHistoryMode()})),n.ic(1,"translate"),n.ic(2,"translate"),n.Rb(3,"mat-icon",44),n.Vb()}if(2&t){const t=n.hc();n.oc("title",t.fullHistoryMode?n.jc(2,7,"lang.viewActionsHistory"):n.jc(1,5,"lang.viewAllHistory")),n.Db(3),n.Ib("fa-exchange-alt",t.fullHistoryMode)("fa-history",!t.fullHistoryMode)}}function FC(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",46),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=e.index,s=n.hc(2).$implicit;return n.hc().removeItemFilter(i,s.key,a)})),n.ic(1,"translate"),n.Qc(2),n.Rb(3,"i",47),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2).$implicit,a=n.hc();n.Lc("background",a.filterColor[i.key]),n.oc("title",n.jc(1,4,"lang."+i.key)),n.Db(2),n.Sc("",t.label," ")}}function LC(t,e){if(1&t&&(n.Ub(0),n.Oc(1,FC,4,6,"span",45),n.Tb()),2&t){const t=n.hc().$implicit,e=n.hc();n.Db(1),n.oc("ngForOf",e.filterUsed[t.key])}}const QC=function(){return["startDate","endDate"]};function NC(t,e){if(1&t&&(n.Ub(0),n.Oc(1,LC,2,1,"ng-container",10),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",-1===n.uc(1,QC).indexOf(t.key))}}function zC(t,e){1&t&&(n.Wb(0,"mat-header-cell",48),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.event")))}function BC(t,e){if(1&t&&(n.Wb(0,"div",51),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Sc(" ",t.userLabel," ")}}function UC(t,e){if(1&t&&(n.Wb(0,"mat-cell",49),n.ic(1,"fullDate"),n.Oc(2,BC,2,1,"div",50),n.Wb(3,"div"),n.Qc(4),n.ic(5,"ucfirst"),n.ic(6,"timeAgo"),n.Vb(),n.Vb()),2&t){const t=e.$implicit,i=n.hc();n.Ib("smallText",null!==i.resId),n.oc("title",n.jc(1,5,t.event_date)),n.Db(2),n.oc("ngIf",null!==i.resId),n.Db(2),n.Sc(" ",n.jc(5,7,n.kc(6,9,t.event_date,"full"))," ")}}function $C(t,e){1&t&&(n.Wb(0,"mat-header-cell"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.technicalId")))}function HC(t,e){if(1&t&&(n.Wb(0,"mat-cell",52),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.record_id," ")}}function GC(t,e){1&t&&(n.Wb(0,"mat-header-cell",48),n.Qc(1),n.ic(2,"ucfirst"),n.ic(3,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,n.jc(3,3,"lang.user"))))}function XC(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.userLabel," ")}}function qC(t,e){1&t&&(n.Wb(0,"mat-header-cell",53),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.information")," "))}function KC(t,e){if(1&t&&(n.Wb(0,"mat-cell",54),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.info," ")}}function YC(t,e){1&t&&(n.Wb(0,"mat-header-cell",48),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.ip")," "))}function JC(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.remote_ip," ")}}function ZC(t,e){1&t&&n.Rb(0,"mat-header-row")}function tO(t,e){if(1&t&&(n.Ub(0),n.Oc(1,ZC,1,0,"mat-header-row",55),n.Tb()),2&t){const t=n.hc();n.Db(1),n.oc("matHeaderRowDef",t.displayedColumnsHistory)}}function eO(t,e){1&t&&n.Rb(0,"mat-row")}let iO=(()=>{class t{constructor(t,e,i,a,s,o,r,c){this.translate=t,this.http=e,this.notify=i,this.headerService=a,this.dialog=s,this.functions=o,this.latinisePipe=r,this.privilegeService=c,this.loading=!1,this.fullHistoryMode=!0,this.filtersChange=new n.o,this.displayedColumnsHistory=["event_date","userLabel","info","remote_ip"],this.isLoadingResults=!0,this.routeUrl="../rest/history",this.filterListUrl="../rest/history/availableFilters",this.extraParamUrl="",this.resultsLength=0,this.searchHistory=new X.i,this.startDateFilter="",this.endDateFilter="",this.filterUrl="",this.filterList=null,this.filteredList={},this.filterUsed={},this.filterColor={startDate:"#b5cfd8",endDate:"#7393a7",actions:"#7d5ba6",systemActions:"#7d5ba6",users:"#009dc5"},this.loadingFilters=!0,this.resId=null,this.destroy$=new da.a}ngOnInit(){null!==this.resId?(this.displayedColumnsHistory=["event_date","info"],this.fullHistoryMode=!this.privilegeService.hasCurrentUserPrivilege("view_doc_history")):this.displayedColumnsHistory=["event_date","record_id","userLabel","info","remote_ip"],this.loading=!0,this.initHistoryMode(),this.initHistoryList()}switchHistoryMode(){this.fullHistoryMode=!this.fullHistoryMode,this.initHistoryMode(),this.refreshDao()}resetFilter(){this.loadingFilters=!0,this.filterList=null,this.filterUsed={},this.filterUrl=""}initHistoryMode(){this.resetFilter(),this.fullHistoryMode?(this.extraParamUrl=null!==this.resId?"&resId="+this.resId:"",this.filterListUrl=null!==this.resId?"../rest/history/availableFilters?resId="+this.resId:"../rest/history/availableFilters"):(this.extraParamUrl=null!==this.resId?`&resId=${this.resId}&onlyActions=true`:"&onlyActions=true",this.filterListUrl=null!==this.resId?`../rest/history/availableFilters?resId=${this.resId}&onlyActions=true`:"../rest/history/availableFilters?onlyActions=true")}initHistoryList(){this.resultListDatabase=new nO(this.http),this.paginator.pageIndex=0,this.sort.active="event_date",this.sort.direction="desc",this.sort.sortChange.subscribe(()=>this.paginator.pageIndex=0),Object(gy.a)(this.sort.sortChange,this.paginator.page,this.filtersChange).pipe(Object(Zo.a)(this.destroy$),Object(Qe.a)({}),Object(ft.a)(()=>{this.isLoadingResults=!0;let t="";return this.functions.empty(this.searchHistory.value)||(t="&search="+this.searchHistory.value),this.resultListDatabase.getRepoIssues(this.sort.active,this.sort.direction,this.paginator.pageIndex,this.routeUrl,this.filterUrl,this.extraParamUrl,t)}),Object(l.a)(t=>(this.isLoadingResults=!1,t=this.processPostData(t),this.resultsLength=t.count,t.history)),Object(m.a)(t=>(this.notify.handleErrors(t),this.isLoadingResults=!1,Object(c.a)([])))).subscribe(t=>this.data=t)}processPostData(t){return t.history=t.history.map(t=>Object.assign(Object.assign({},t),{userLabel:this.functions.empty(t.userLabel)?this.translate.instant("lang.userDeleted"):t.userLabel})),t}refreshDao(){this.paginator.pageIndex=0,this.filtersChange.emit()}initFilterListHistory(){null===this.filterList&&(this.filterList={},this.filterUsed={},this.filterUrl="",this.loadingFilters=!0,this.http.get(this.filterListUrl).pipe(Object(l.a)(t=>{let e=t.actions.filter(t=>null===t.label).map(t=>t.id),i=t.users.filter(t=>null===t.label).map(t=>t.login);return t.actions=t.actions.filter(t=>null!==t.label),e.length>0&&t.actions.push({id:e,label:this.translate.instant("lang.actionDeleted")}),t.users=t.users.filter(t=>null!==t.label),i.length>0&&t.users.push({id:i,label:this.translate.instant("lang.userDeleted")}),t.systemActions=t.systemActions.map(t=>({id:t.id,label:this.functions.empty(this.translate.instant("lang."+t.id))?t.id:this.translate.instant("lang."+t.id)})),t}),Object(mt.a)(t=>{Object.keys(t).forEach(e=>{this.functions.empty(this.filterList[e])&&(this.filterList[e]=[],this.filteredList[e]=[]),t[e].forEach(t=>{this.filterList[e].push(t)}),this.filteredList[e]=this.searchHistory.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>t?this.filter(t,e):this.filterList[e].slice()))})}),Object(Xt.a)(()=>this.loadingFilters=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe())}filterStartDate(){this.functions.empty(this.filterUsed.startDate)&&(this.filterUsed.startDate=[]),this.filterUsed.startDate[0]={id:this.functions.empty(this.startDateFilter)?"":this.functions.formatDateObjectToDateString(this.startDateFilter),label:this.functions.empty(this.startDateFilter)?"":this.functions.formatDateObjectToDateString(this.startDateFilter)},this.generateUrlFilter(),this.refreshDao()}filterEndDate(){this.functions.empty(this.filterUsed.endDate)&&(this.filterUsed.endDate=[]),this.filterUsed.endDate[0]={id:this.functions.empty(this.endDateFilter)?"":this.functions.formatDateObjectToDateString(this.endDateFilter,!0),label:this.functions.empty(this.endDateFilter)?"":this.functions.formatDateObjectToDateString(this.endDateFilter)},this.generateUrlFilter(),this.refreshDao()}addItemFilter(t){t.value.used=!0,this.functions.empty(this.filterUsed[t.id])&&(this.filterUsed[t.id]=[]),this.filterUsed[t.id].push(t.value),this.generateUrlFilter(),this.searchHistory.reset(),this.autoCompleteInput.nativeElement.blur(),this.refreshDao()}removeItemFilter(t,e,i){t.used=!1,this.filterUsed[e].splice(i,1),this.generateUrlFilter(),this.refreshDao()}generateUrlFilter(){this.filterUrl="";let t=[];Object.keys(this.filterUsed).forEach(e=>{this.filterUsed[e].forEach(i=>{this.functions.empty(i.id)||(["startDate","endDate"].indexOf(e)>-1?t.push(`${e}=${i.id}`):t.push(`${e}[]=${i.id}`))})}),t.length>0&&(this.filterUrl="&"+t.join("&"))}directSearchHistory(){this.refreshDao()}filter(t,e){if("string"==typeof t){const i=this.latinisePipe.transform(t.toLowerCase());return this.filterList[e].filter(t=>this.latinisePipe.transform(t.label.toLowerCase()).includes(i))}return this.filterList[e]}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(q.b),n.Qb(_t.a),n.Qb(Tt.c),n.Qb(Dt.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-history-list"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(Kt.a,!0),n.Kc(SC,!0),n.Kc(IC,!0)),2&t&&(n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first),n.yc(i=n.ec())&&(e.autoCompleteInput=i.first))},inputs:{resId:"resId"},decls:45,vars:27,consts:[["class","example-loading-shade",4,"ngIf"],[1,"table-head"],[1,"table-head-result"],[3,"ngSubmit"],["floatLabel","never",2,"font-size","13px"],["type","text","matInput","","maxlength","128",3,"matAutocomplete","placeholder","formControl","click"],["autoCompleteInput",""],[3,"optionSelected","opened"],["auto","matAutocomplete"],["disabled","",4,"ngIf"],[4,"ngIf"],["mat-button","","matSuffix","","mat-icon-button","",2,"float","right",3,"title","click"],["color","primary",1,"fa","fa-search"],["color","primary","mat-icon-button","",3,"title","click",4,"ngIf"],[1,"table-head-tool"],[1,"paginatorResultList",3,"length","hidePageSize","pageSize"],["paginatorHistoryList",""],[1,"filterBadges"],[4,"ngFor","ngForOf"],["id","history-list","matSort","","matSortActive","event_date","matSortDirection","desc",2,"width","100%",3,"dataSource"],["tableHistoryListSort","matSort"],["matColumnDef","event_date"],["mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"title","smallText",4,"matCellDef"],["matColumnDef","record_id"],[4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","userLabel"],[4,"matCellDef"],["matColumnDef","info"],["mat-sort-header","","style","flex: 2;",4,"matHeaderCellDef"],["style","flex: 2;",4,"matCellDef"],["matColumnDef","remote_ip"],[4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],[1,"example-loading-shade"],["disabled",""],[2,"display","flex","justify-content","center"],["diameter","35"],["class","filterList",3,"label",4,"ngIf"],[1,"filterList",3,"label"],[3,"id","color","value","disabled",4,"ngFor","ngForOf"],[3,"id","value","disabled"],["color","primary","mat-icon-button","",3,"title","click"],[1,"fas"],["class","label",3,"background","title","click",4,"ngFor","ngForOf"],[1,"label",3,"title","click"],[1,"fa","fa-times-circle"],["mat-sort-header",""],["mat-cell","",3,"title"],["style","font-size: 10px;",4,"ngIf"],[2,"font-size","10px"],["mat-cell",""],["mat-sort-header","",2,"flex","2"],[2,"flex","2"],[4,"matHeaderRowDef"]],template:function(t,e){if(1&t&&(n.Oc(0,VC,2,1,"div",0),n.Wb(1,"div",1),n.Wb(2,"div",2),n.Wb(3,"form",3),n.dc("ngSubmit",(function(){return e.directSearchHistory()})),n.Wb(4,"mat-form-field",4),n.Wb(5,"input",5,6),n.dc("click",(function(t){return t.stopPropagation()})),n.ic(7,"translate"),n.Vb(),n.Wb(8,"mat-autocomplete",7,8),n.dc("optionSelected",(function(t){return e.addItemFilter(t.option)}))("opened",(function(){return e.initFilterListHistory()})),n.Oc(10,RC,3,0,"mat-option",9),n.Oc(11,TC,3,3,"ng-container",10),n.Vb(),n.Wb(12,"button",11),n.dc("click",(function(){return e.directSearchHistory()})),n.ic(13,"translate"),n.Rb(14,"mat-icon",12),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Oc(15,EC,4,9,"button",13),n.Wb(16,"div",14),n.Rb(17,"mat-paginator",15,16),n.Vb(),n.Vb(),n.Wb(19,"div"),n.Wb(20,"div",17),n.Oc(21,NC,2,2,"ng-container",18),n.ic(22,"keyvalue"),n.Vb(),n.Wb(23,"mat-table",19,20),n.Ub(25,21),n.Oc(26,zC,3,3,"mat-header-cell",22),n.Oc(27,UC,7,12,"mat-cell",23),n.Tb(),n.Ub(28,24),n.Oc(29,$C,3,3,"mat-header-cell",25),n.Oc(30,HC,2,1,"mat-cell",26),n.Tb(),n.Ub(31,27),n.Oc(32,GC,4,5,"mat-header-cell",22),n.Oc(33,XC,2,1,"mat-cell",28),n.Tb(),n.Ub(34,29),n.Oc(35,qC,3,3,"mat-header-cell",30),n.Oc(36,KC,2,1,"mat-cell",31),n.Tb(),n.Ub(37,32),n.Oc(38,YC,3,3,"mat-header-cell",22),n.Oc(39,JC,2,1,"mat-cell",28),n.Tb(),n.Oc(40,tO,2,1,"ng-container",10),n.Oc(41,eO,1,0,"mat-row",33),n.Vb(),n.Wb(42,"div",34),n.Qc(43),n.ic(44,"translate"),n.Vb(),n.Vb()),2&t){const t=n.zc(9);n.oc("ngIf",e.isLoadingResults),n.Db(5),n.oc("matAutocomplete",t)("placeholder",n.jc(7,19,"lang.filterBy"))("formControl",e.searchHistory),n.Db(5),n.oc("ngIf",e.loadingFilters),n.Db(1),n.oc("ngIf",null!==e.filterList&&!e.loadingFilters),n.Db(1),n.oc("title",n.jc(13,21,"lang.search")),n.Db(3),n.oc("ngIf",e.privilegeService.hasCurrentUserPrivilege("view_full_history")&&e.privilegeService.hasCurrentUserPrivilege("view_doc_history")),n.Db(2),n.oc("length",e.resultsLength)("hidePageSize",!0)("pageSize",10),n.Db(2),n.Ib("table-admin",null===e.resId),n.Db(2),n.oc("ngForOf",n.jc(22,23,e.filterUsed)),n.Db(2),n.oc("dataSource",e.data),n.Db(17),n.oc("ngIf",null===e.resId),n.Db(1),n.oc("matRowDefColumns",e.displayedColumnsHistory),n.Db(2),n.Tc(" ",e.resultsLength," ",n.jc(44,25,"lang.elements"),"")}},directives:[P.t,X.K,X.v,X.w,Y.c,J.b,Ne.d,X.d,X.p,X.u,X.j,Ne.a,k.b,Y.j,S.a,Kt.a,P.s,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.n,V.c,W.p,W.o,vt.h,Fe.b,vt.a,vt.k,vt.j,vt.m],pipes:[g.d,P.l,P.b,Wt.a,uo,Tt.u,ps],styles:[".active[_ngcontent-%COMP%], .active[_ngcontent-%COMP%]:active, .active[_ngcontent-%COMP%]:focus, .active[_ngcontent-%COMP%]:hover{color:#135f7f;border-left:5px solid #135f7f;background:rgba(19,95,127,.14)}.paginatorResultList[_ngcontent-%COMP%] .mat-paginator-range-label{justify-content:flex-end;display:flex}.filterList[_ngcontent-%COMP%] .mat-optgroup-label{color:#135f7f;position:-webkit-sticky;position:sticky;top:0;background:#fff!important;z-index:1}.label[_ngcontent-%COMP%]{cursor:pointer;margin:5px}.bg-head-content[_ngcontent-%COMP%] .mat-focused .mat-form-field-label{color:#fff!important}.bg-head-content[_ngcontent-%COMP%] .mat-form-field-ripple, .bg-head-content[_ngcontent-%COMP%] .mat-form-field-underline{background-color:#fff!important}.bg-head-content[_ngcontent-%COMP%] .mat-datepicker-toggle[_ngcontent-%COMP%], .bg-head-content[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{color:#fff}.table-admin[_ngcontent-%COMP%]{height:90%;overflow:auto;position:absolute;width:100%}.smallText[_ngcontent-%COMP%]{flex-direction:column;align-items:center;justify-content:center;font-size:10px;opacity:.5;width:150px;flex:initial}"]}),t})();class nO{constructor(t){this.http=t}getRepoIssues(t,e,i,n,a,s,o){return this.http.get(`${n}?limit=10&offset=${10*i}&order=${e}&orderBy=${t}${a}${s}${o}`)}}let aO=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.data=i,this.dialogRef=n,this.notify=a}onSubmit(){this.http.post("../rest/searchTemplates",this.data.searchTemplate).pipe(Object(mt.a)(t=>{this.data.searchTemplate.id=t.id,this.notify.success(this.translate.instant("lang.searchTemplateAdded")),this.dialogRef.close(this.data)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.a),n.Qb(q.h),n.Qb(D.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:23,vars:20,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],[3,"ngSubmit"],["submitForm","ngForm"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","15px"],["appearance","outline"],["matInput","","name","label","required","","maxlength","256",3,"placeholder","ngModel","ngModelChange"],["mat-raised-button","","color","primary","type","submit",3,"disabled","click"],["mat-raised-button","","color","default","type","button",3,"click"]],template:function(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-dialog-content"),n.Wb(5,"form",2,3),n.dc("ngSubmit",(function(){return e.onSubmit()})),n.Wb(7,"div",4),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Wb(10,"mat-form-field",5),n.Wb(11,"mat-label"),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Wb(14,"input",6),n.dc("ngModelChange",(function(t){return e.data.searchTemplate.label=t})),n.ic(15,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(16,"mat-dialog-actions"),n.Wb(17,"button",7),n.dc("click",(function(){return n.Dc(t),n.zc(6).ngSubmit.emit()})),n.Qc(18),n.ic(19,"translate"),n.Vb(),n.Wb(20,"button",8),n.dc("click",(function(){return e.dialogRef.close()})),n.Qc(21),n.ic(22,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(6);n.Db(2),n.Rc(n.jc(3,8,"lang.searchTemplateCreation")),n.Db(6),n.Sc("",n.jc(9,10,"lang.addSearchTemplateMsg")," "),n.Db(4),n.Rc(n.jc(13,12,"lang.label")),n.Db(2),n.pc("placeholder",n.jc(15,14,"lang.label")),n.oc("ngModel",e.data.searchTemplate.label),n.Db(3),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(19,16,"lang.validate")),n.Db(3),n.Rc(n.jc(22,18,"lang.cancel"))}},directives:[q.i,q.f,X.K,X.v,X.w,Y.c,Y.g,J.b,X.d,X.F,X.p,X.u,X.x,q.c,k.b],pipes:[g.d],styles:["mat-icon[_ngcontent-%COMP%]{height:auto!important}"]}),t})();const sO=["searchSelectInput"],oO=["test"];function rO(t,e){if(1&t&&(n.Wb(0,"mat-label"),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.label)}}function cO(t,e){if(1&t&&(n.Wb(0,"span",15),n.Qc(1),n.ic(2,"lowercase"),n.ic(3,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Tc(" (+",t.formControlSelect.value.length-1," ",n.jc(2,2,n.jc(3,4,"lang.others")),") ")}}function lO(t,e){if(1&t&&(n.Wb(0,"mat-select-trigger"),n.Qc(1),n.Oc(2,cO,4,6,"span",14),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Sc(" ",t.formControlSelect.value?t.getFirstDataLabel():""," "),n.Db(1),n.oc("ngIf",(null==t.formControlSelect.value?null:t.formControlSelect.value.length)>1)}}function dO(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",16),n.dc("click",(function(){return n.Dc(t),n.hc()._reset(!0)})),n.Rb(1,"mat-icon",17),n.Vb()}}function hO(t,e){1&t&&n.Rb(0,"mat-spinner",18)}function uO(t,e){1&t&&(n.Wb(0,"div",19),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noResult")," "))}function pO(t,e){1&t&&(n.Wb(0,"mat-option",20),n.Wb(1,"i"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()),2&t&&(n.oc("value",null),n.Db(2),n.Sc("(",n.jc(3,2,"lang.emptyValue"),")"))}function bO(t,e){if(1&t&&(n.Wb(0,"mat-option",21),n.Rb(1,"span",22),n.Vb()),2&t){const t=e.$implicit,i=n.hc();n.Lc("color",t.color),n.Ib("opt-group",t.isTitle),n.oc("value","id"===i.returnValue?t.id:t)("title",void 0!==t.title?t.title:t.label)("disabled",t.disabled),n.Db(1),n.oc("innerHTML",t.label,n.Ec)}}function fO(t,e){if(1&t&&(n.Wb(0,"mat-error"),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Sc(" ",t.getErrorMsg(t.formControlSelect.errors),"")}}function mO(t,e){if(1&t&&n.Rb(0,"mat-icon",23),2&t){const t=n.hc();n.Lc("color",t.suffixIcon.color),n.oc("title",void 0!==t.suffixIcon.title?t.suffixIcon.title:"")}}const gO=function(t){return{"mat-select-search-inner-multiple":t}};let vO=(()=>{class t{constructor(t,e,i,a,s,o,r,c){this.http=t,this.translate=e,this.latinisePipe=i,this.changeDetectorRef=a,this.renderer=s,this.appService=o,this.functions=r,this.sortPipe=c,this.placeholderLabel=this.translate.instant("lang.chooseValue"),this.formControlSelect=new X.i,this.datas=[],this.returnValue="id",this.id="",this.showLabel=!1,this.required=!1,this.hideErrorDesc=!0,this.multiple=!1,this.optGroupTarget=null,this.optGroupList=null,this.suffixIcon=null,this.class="input-form",this.afterSelected=new n.o,this.afterOpened=new n.o,this.filteredDatasMulti=new la.a(1),this.overlayClassSet=!1,this.change=new n.o,this._onDestroy=new da.a,this.formControlSearch=new X.i,this.noResult=null,this.loadingSearch=null,this.onChange=t=>{},this.onTouched=t=>{}}get value(){return this._value}ngOnInit(){null!==this.optGroupList&&this.initOptGroups();const t="mat-select-search-panel";this.matSelect.panelClass?Array.isArray(this.matSelect.panelClass)?this.matSelect.panelClass.push(t):"string"==typeof this.matSelect.panelClass?this.matSelect.panelClass=[this.matSelect.panelClass,t]:"object"==typeof this.matSelect.panelClass&&(this.matSelect.panelClass[t]=!0):this.matSelect.panelClass=t,this.matSelect.openedChange.pipe(Object(Zo.a)(this._onDestroy)).subscribe(t=>{t?this.appService.getViewMode()||(this.noResult=null,this._focus()):this.formControlSearch.reset()}),this.matSelect.openedChange.pipe(Object(ro.a)(1)).pipe(Object(Zo.a)(this._onDestroy)).subscribe(()=>{this._options=this.matSelect.options,this._options.changes.pipe(Object(Zo.a)(this._onDestroy)).subscribe(()=>{const t=this.matSelect._keyManager;t&&this.matSelect.panelOpen&&setTimeout(()=>{t.setFirstItemActive()})})}),this.formControlSearch.valueChanges.pipe(Object(pt.a)(300),Object(d.a)(t=>null!==t&&t.length>2),Object(mt.a)(()=>this.loadingSearch=!0),Object(ft.a)(t=>this.getDatas(t)),Object(mt.a)(t=>{let e=[],i=[],n=[];this.functions.empty(this.formControlSelect.value)||(n="id"===this.returnValue?this.formControlSelect.value:this.formControlSelect.value.map(t=>null!==t?t.id:null)),e=this.datas.filter(t=>n.indexOf(t.id)>-1),i=t.filter(t=>-1===n.indexOf(t.id)),this.datas=e.concat(i),this.filteredDatas=Object(c.a)(this.datas),this.noResult=0===this.datas.filter(t=>-1===this.formControlSelect.value.indexOf(t.id)).length,this.loadingSearch=!1})).subscribe()}resetACDatas(){this.datas=this.datas.filter("id"===this.returnValue?t=>this.formControlSelect.value.indexOf(t.id)>-1:t=>this.formControlSelect.value.map(t=>null!==t?t.id:null).indexOf(t.id)>-1),this.filteredDatas=Object(c.a)(this.datas)}initOptGroups(){this.datas.unshift({id:0,label:"toto",disabled:!0});let t=[];this.optGroupList=this.sortPipe.transform(this.optGroupList,"label"),this.optGroupList.forEach(e=>{t.push({id:e.id,label:e.label,disabled:!0}),t=t.concat(this.datas.filter(t=>t[this.optGroupTarget]===e.id).map(t=>Object.assign(Object.assign({},t),{title:t.label,label:"  "+t.label})))}),this.datas=t}ngOnDestroy(){this._onDestroy.next(),this._onDestroy.complete()}ngAfterViewInit(){this.datas.length>5&&this.setOverlayClass()}_handleKeydown(t){32===t.keyCode&&t.stopPropagation()}writeValue(t){t!==this._value&&(this._value=t,this.change.emit(t))}onInputChange(t){t!==this._value&&(this._value=t,this.onChange(t),this.change.emit(t))}onBlur(t){this.writeValue(t),this.onTouched()}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}_focus(){const t=this.matSelect.panel.nativeElement,e=t.scrollTop;this.renderer.selectRootElement("#searchSelectInput").focus(),t.scrollTop=e}_reset(t){this.formControlSearch.reset(),this.resetACDatas(),this.renderer.selectRootElement("#searchSelectInput").focus()}setOverlayClass(){this.overlayClassSet||(this.matSelect.overlayDir.attach.pipe(Object(Zo.a)(this._onDestroy)).subscribe(()=>{void 0!==this.searchSelectInput&&this.searchSelectInput.nativeElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList.add("cdk-overlay-pane-select-search")}),this.overlayClassSet=!0)}initMultipleHandling(){this.matSelect.valueChange.pipe(Object(Zo.a)(this._onDestroy)).subscribe(t=>{if(this.matSelect.multiple){let e=!1;if(this._value&&this._value.length&&this.previousSelectedValues&&Array.isArray(this.previousSelectedValues)){t&&Array.isArray(t)||(t=[]);const i=this.matSelect.options.map(t=>t.value);this.previousSelectedValues.forEach(n=>{-1===t.indexOf(n)&&-1===i.indexOf(n)&&(t.push(n),e=!0)})}e&&this.matSelect._onChange(t),this.previousSelectedValues=t}})}_filter(t,e=!1){if("__SELECTED"===t)return this.datas.filter(t=>this.formControlSelect.value.indexOf(t.id)>-1);if("string"==typeof t&&""!==t){const e=this.latinisePipe.transform(t.toLowerCase());return this.datas.filter(t=>!t.disabled&&this.latinisePipe.transform(t.label.toLowerCase()).includes(e))}return this.datas}launchEvent(t){void 0!==this.afterSelected&&this.afterSelected.emit(this.datas.filter(e=>e.id===t.value)[0])}getErrorMsg(t){return void 0!==t.required?this.translate.instant("lang.requiredField"):void 0!==t.pattern||void 0!==t.email?this.translate.instant("lang.badFormat"):"unknow validator"}getDatas(t){const e=[],i=[];return this.routeDatas.forEach(i=>{e.push(this.http.get(".."+i,{params:{search:t}}))}),Object(Le.a)(e).pipe(Object(l.a)(t=>(t.forEach(t=>{t.forEach(t=>{let e={id:t.id,label:t.idToDisplay};if(this.extraModel.length>0){const i=this.getExtraDatas(t);e=Object.assign(Object.assign({},e),i)}i.push(e)})}),i)))}getExtraDatas(t){const e={};return Object.keys(t).forEach(i=>{this.extraModel.indexOf(i)>-1&&(e[i]=t[i])}),e}getFirstDataLabel(){return"id"===this.returnValue?this.formControlSelect.value[0].label:this.formControlSelect.value.map(t=>null!==t?t.label:this.translate.instant("lang.emptyValue"))[0]}getDataLabel(t){return"id"===this.returnValue?this.datas.filter(e=>e.id===t)[0].label:this.datas.filter(e=>e.id===t.id)[0].label}setDatas(t){this.datas=t}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(v.b),n.Qb(g.e),n.Qb(Tt.c),n.Qb(n.h),n.Qb(n.I),n.Qb(w.a),n.Qb(_t.a),n.Qb(Wt.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["plugin-select-autocomplete-search"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(sO,!0,n.l),n.Kc(oO,!0)),2&t&&(n.yc(i=n.ec())&&(e.searchSelectInput=i.first),n.yc(i=n.ec())&&(e.matSelect=i.first))},inputs:{placeholderLabel:"placeholderLabel",formControlSelect:"formControlSelect",datas:"datas",returnValue:"returnValue",label:"label",id:"id",showResetOption:"showResetOption",showLabel:"showLabel",required:"required",hideErrorDesc:"hideErrorDesc",multiple:"multiple",optGroupTarget:"optGroupTarget",routeDatas:"routeDatas",extraModel:"extraModel",optGroupList:"optGroupList",suffixIcon:"suffixIcon",class:"class"},outputs:{afterSelected:"afterSelected",afterOpened:"afterOpened"},features:[n.Cb([Wt.a])],decls:18,vars:26,consts:[[3,"floatLabel"],[4,"ngIf"],[3,"id","formControl","placeholder","required","multiple","selectionChange","openedChange"],["test",""],["matInput","",1,"mat-select-search-input","mat-select-search-hidden"],[1,"mat-select-search-inner",3,"ngClass"],["id","searchSelectInput",1,"mat-select-search-input",3,"formControl","placeholder","keydown","input","blur"],["searchSelectInput",""],["mat-button","","mat-icon-button","","aria-label","Clear","class","mat-select-search-clear",3,"click",4,"ngIf"],["class","mat-select-search-loading","diameter","24",4,"ngIf"],["class","mat-select-search-no-entries-found","style","font-style: italic;opacity: 0.5;",4,"ngIf"],[3,"value",4,"ngIf"],[3,"value","title","disabled","opt-group","color",4,"ngFor","ngForOf"],["style","height: auto;","matSuffix","","class","fas fa-circle selectSuffixIcon",3,"color","title",4,"ngIf"],["class","multipleLabels",4,"ngIf"],[1,"multipleLabels"],["mat-button","","mat-icon-button","","aria-label","Clear",1,"mat-select-search-clear",3,"click"],[1,"fa","fa-times"],["diameter","24",1,"mat-select-search-loading"],[1,"mat-select-search-no-entries-found",2,"font-style","italic","opacity","0.5"],[3,"value"],[3,"value","title","disabled"],[3,"innerHTML"],["matSuffix","",1,"fas","fa-circle","selectSuffixIcon",2,"height","auto",3,"title"]],template:function(t,e){1&t&&(n.Wb(0,"mat-form-field",0),n.Oc(1,rO,2,1,"mat-label",1),n.Wb(2,"mat-select",2,3),n.dc("selectionChange",(function(t){return e.launchEvent(t)}))("openedChange",(function(){return e.resetACDatas()})),n.Oc(4,lO,3,2,"mat-select-trigger",1),n.Rb(5,"input",4),n.Wb(6,"div",5),n.Wb(7,"input",6,7),n.dc("keydown",(function(t){return e._handleKeydown(t)}))("input",(function(t){return e.onInputChange(t.target.value)}))("blur",(function(t){return e.onBlur(t.target.value)})),n.ic(9,"translate"),n.Vb(),n.Oc(10,dO,2,0,"button",8),n.Oc(11,hO,1,0,"mat-spinner",9),n.Vb(),n.Oc(12,uO,3,3,"div",10),n.Oc(13,pO,4,4,"mat-option",11),n.Oc(14,bO,2,8,"mat-option",12),n.ic(15,"async"),n.Vb(),n.Oc(16,fO,2,1,"mat-error",1),n.Oc(17,mO,1,3,"mat-icon",13),n.Vb()),2&t&&(n.Fb(e.class+" search-select"),n.oc("floatLabel",e.appService.getViewMode()||e.showLabel?"":"never"),n.Db(1),n.oc("ngIf",e.appService.getViewMode()||e.showLabel),n.Db(1),n.oc("id",e.id)("formControl",e.formControlSelect)("placeholder",e.placeholderLabel)("required",e.required)("multiple",e.multiple),n.Db(2),n.oc("ngIf",e.multiple),n.Db(2),n.oc("ngClass",n.vc(24,gO,e.matSelect.multiple)),n.Db(1),n.oc("formControl",e.formControlSearch)("placeholder",n.jc(9,20,"Saisissez un terme de recherche")),n.Db(3),n.oc("ngIf",e.formControlSearch.value&&!e.loadingSearch),n.Db(1),n.oc("ngIf",e.loadingSearch),n.Db(1),n.oc("ngIf",e.noResult),n.Db(1),n.oc("ngIf",e.showResetOption),n.Db(1),n.oc("ngForOf",n.jc(15,22,e.filteredDatas)),n.Db(2),n.oc("ngIf","VALID"!==e.formControlSelect.status&&e.formControlSelect.touched&&!e.hideErrorDesc),n.Db(1),n.oc("ngIf",null!==e.suffixIcon))},directives:[Y.c,P.t,ee.a,X.u,X.j,X.F,J.b,P.q,X.d,P.s,Y.g,ee.c,k.b,S.a,V.c,W.p,Y.b,Y.j],pipes:[g.d,P.b,P.p],styles:[".mat-select-search-hidden[_ngcontent-%COMP%]{visibility:hidden}.mat-select-search-inner[_ngcontent-%COMP%]{position:absolute;top:0;width:calc(100% + 15px);border-bottom:1px solid #ccc;background:#fff;z-index:100}.mat-select-search-inner.mat-select-search-inner-multiple[_ngcontent-%COMP%]{width:calc(100% + 48px)} .mat-select-search-panel{transform:none!important;max-height:350px!important;max-width:inherit!important}.mat-select-search-input[_ngcontent-%COMP%]{padding:16px 36px 16px 16px;box-sizing:border-box;width:100%;border:none}.mat-select-search-no-entries-found[_ngcontent-%COMP%]{padding:16px}.mat-select-search-clear[_ngcontent-%COMP%]{position:absolute;right:0;top:4px}.mat-select-search-loading[_ngcontent-%COMP%]{position:absolute;right:0;top:15px} .cdk-overlay-pane-select-search{margin-top:-50px}.mat-error[_ngcontent-%COMP%]{font-weight:700}.mat-error[_ngcontent-%COMP%], .selectSuffixIcon[_ngcontent-%COMP%]{font-size:10px;text-align:right}.search-select[_ngcontent-%COMP%] .mat-selected:not(.mat-option-disabled){font-weight:700}.opt-group[_ngcontent-%COMP%]{position:-webkit-sticky;position:sticky;top:50px;background:#fff;z-index:1}.opt-group[_ngcontent-%COMP%] .mat-pseudo-checkbox{display:none}.multipleLabels[_ngcontent-%COMP%]{color:#f99830}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();const _O=["autoCompleteInput"];function yO(t,e){if(1&t&&(n.Wb(0,"mat-option",17),n.Wb(1,"span",18),n.Qc(2),n.Vb(),n.Vb()),2&t){const t=e.$implicit,i=n.hc(3);n.oc("value",t)("title",t[i.key]),n.Db(2),n.Rc(t[i.key])}}function xO(t,e){if(1&t&&(n.Ub(0),n.Oc(1,yO,3,3,"mat-option",16),n.ic(2,"sortBy"),n.ic(3,"async"),n.Tb()),2&t){const t=n.hc(2);n.Db(1),n.oc("ngForOf",n.kc(2,1,n.jc(3,4,t.filteredOptions),t.key))}}function CO(t,e){if(1&t&&n.Rb(0,"mat-option",19),2&t){const t=n.hc(2);n.oc("innerHTML",t.listInfo,n.Ec)}}function OO(t,e){1&t&&(n.Wb(0,"mat-option",20),n.Rb(1,"mat-spinner",21),n.Vb())}function DO(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field",5),n.Rb(1,"mat-icon",6),n.Wb(2,"input",7,8),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("focus",(function(){return n.Dc(t),n.hc().resetAutocomplete()})),n.ic(4,"translate"),n.Vb(),n.Wb(5,"button",9),n.dc("click",(function(){return n.Dc(t),n.hc().addItem()})),n.Rb(6,"mat-icon",10),n.ic(7,"translate"),n.Vb(),n.Wb(8,"mat-autocomplete",11,12),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc().selectOpt(e)})),n.Oc(10,xO,4,6,"ng-container",13),n.Oc(11,CO,1,1,"mat-option",14),n.Oc(12,OO,2,0,"mat-option",15),n.Vb(),n.Vb()}if(2&t){const t=n.zc(9),e=n.hc();n.Db(2),n.oc("placeholder",n.jc(4,10,"lang.searchFolder"))("formControl",e.myControl)("matAutocomplete",t),n.Db(3),n.oc("disabled",!e.canAdd),n.Db(1),n.Lc("visibility",e.canAdd&&null!==e.myControl.value&&e.myControl.value.length>0?"visible":"hidden"),n.oc("title",n.jc(7,12,"lang.add")),n.Db(4),n.oc("ngIf",e.options.length>0&&!e.loading),n.Db(1),n.oc("ngIf",0===e.options.length&&!e.loading),n.Db(1),n.oc("ngIf",e.loading)}}function wO(t,e){1&t&&n.Rb(0,"mat-icon",28)}function MO(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",24),n.dc("removed",(function(){n.Dc(t);const i=e.index;return n.hc(2).removeItem(i)})),n.Wb(1,"span",25),n.Rb(2,"i",26),n.Qc(3),n.Vb(),n.Oc(4,wO,1,0,"mat-icon",27),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.oc("removable",!i.controlAutocomplete.disabled),n.Db(1),n.oc("title",i.getFolderLabel(t)),n.Db(2),n.Sc("\xa0",i.getFolderLabel(t)," "),n.Db(1),n.oc("ngIf",!i.controlAutocomplete.disabled)}}function kO(t,e){if(1&t&&(n.Wb(0,"mat-chip-list",22),n.Oc(1,MO,5,4,"mat-chip",23),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",t.controlAutocomplete.value)}}function SO(t,e){1&t&&(n.Wb(0,"div",29),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noSelectedFolder")," "))}let IO=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.dialog=n,this.headerService=a,this.appService=s,this.latinisePipe=o,this.functionsService=r,this.loading=!1,this.key="idToDisplay",this.canAdd=!0,this.myControl=new X.i,this.valuesToDisplay={},this.newIds=[],this.tmpObject=null,this.returnValue="id"}ngOnInit(){this.controlAutocomplete.valueChanges.pipe(Object(mt.a)(t=>{"object"===this.returnValue?(this.valuesToDisplay={},t.forEach(t=>{this.valuesToDisplay[t.id]=t.label})):this.functionsService.empty(this.tmpObject)?this.initFormValue():(this.valuesToDisplay[this.tmpObject.id]=this.tmpObject[this.key],this.tmpObject=null)})).subscribe(),this.controlAutocomplete.setValue(null===this.controlAutocomplete.value||""===this.controlAutocomplete.value?[]:this.controlAutocomplete.value),this.initAutocompleteRoute()}initAutocompleteRoute(){this.listInfo=this.translate.instant("lang.autocompleteInfo"),this.options=[],this.myControl.valueChanges.pipe(Object(pt.a)(300),Object(d.a)(t=>t.length>2),Object(bt.a)(),Object(mt.a)(()=>this.loading=!0),Object(ft.a)(t=>this.getDatas(t)),Object(mt.a)(t=>{this.listInfo=0===t.length?this.translate.instant("lang.noAvailableValue"):"",this.options=t,this.filteredOptions=Object(c.a)(this.options),this.loading=!1})).subscribe()}getDatas(t){return this.http.get("../rest/autocomplete/folders",{params:{search:t}})}selectOpt(t){this.setFormValue(t.option.value),this.myControl.setValue("")}initFormValue(){this.controlAutocomplete.value.forEach(t=>{this.http.get("../rest/folders/"+t).pipe(Object(mt.a)(t=>{for(var e in t)this.valuesToDisplay[t[e].id]=t[e].label})).subscribe()})}setFormValue(t){if(!("id"===this.returnValue?this.controlAutocomplete.value.indexOf(t.id)>-1:this.controlAutocomplete.value.map(t=>t.id).indexOf(t.id)>-1)){let e=[];null!==this.controlAutocomplete.value&&(e=this.controlAutocomplete.value),e.push("id"===this.returnValue?t.id:{id:t.id,label:t.idToDisplay}),this.controlAutocomplete.setValue(e)}}resetAutocomplete(){this.options=[],this.listInfo=this.translate.instant("lang.autocompleteInfo")}_filter(t){if("string"==typeof t){const e=this.latinisePipe.transform(t.toLowerCase());return this.options.filter(t=>this.latinisePipe.transform(t[this.key].toLowerCase()).includes(e))}return this.options}unsetValue(){this.controlAutocomplete.setValue(""),this.myControl.setValue(""),this.myControl.enable()}removeItem(t){if(-1===this.newIds.indexOf(this.controlAutocomplete.value[t])){let e=this.controlAutocomplete.value;this.controlAutocomplete.value.splice(t,1),this.controlAutocomplete.setValue(e)}else this.http.delete("../rest/folders/"+this.controlAutocomplete.value[t]).pipe(Object(mt.a)(e=>{let i=this.controlAutocomplete.value;this.controlAutocomplete.value.splice(t,1),this.controlAutocomplete.setValue(i)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}addItem(){const t={};t[this.key]=this.myControl.value,this.http.post("../rest/folders",{label:t[this.key]}).pipe(Object(mt.a)(e=>{for(var i in e)t.id=e[i],this.newIds.push(e[i]);this.setFormValue(t),this.myControl.setValue("")}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}getFolderLabel(t){return"id"===this.returnValue?this.valuesToDisplay[t]:this.valuesToDisplay[t.id]}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(y.a),n.Qb(w.a),n.Qb(Tt.c),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-folder-input"]],viewQuery:function(t,e){var i;1&t&&n.Kc(_O,!0),2&t&&n.yc(i=n.ec())&&(e.autoCompleteInput=i.first)},inputs:{controlAutocomplete:["control","controlAutocomplete"],returnValue:"returnValue"},features:[n.Cb([Wt.a])],decls:6,vars:4,consts:[["type","hidden",3,"formControl"],["floatLabel","never","class","input-form",4,"ngIf"],[1,"itemList"],["class","mat-chip-list-stacked itemChip","color","default",4,"ngIf"],["class","noResult",4,"ngIf"],["floatLabel","never",1,"input-form"],["color","primary","matPrefix","",1,"fa","fa-search",2,"padding-left","20px","font-size","15px"],["type","text","matInput","",3,"placeholder","formControl","matAutocomplete","click","focus"],["autoCompleteInput",""],["type","button","matSuffix","","mat-icon-button","",3,"disabled","click"],[1,"fa","fa-folder-plus",3,"title"],[3,"optionSelected"],["auto","matAutocomplete"],[4,"ngIf"],["class","autoCompleteInfoResult smallInputInfo","disabled","",3,"innerHTML",4,"ngIf"],["disabled","",4,"ngIf"],[3,"value","title",4,"ngFor","ngForOf"],[3,"value","title"],["color","primary"],["disabled","",1,"autoCompleteInfoResult","smallInputInfo",3,"innerHTML"],["disabled",""],["diameter","20"],["color","default",1,"mat-chip-list-stacked","itemChip"],["color","default","class","listAutocomplete",3,"removable","removed",4,"ngFor","ngForOf"],["color","default",1,"listAutocomplete",3,"removable","removed"],[2,"display","flex","flex","1","align-items","center",3,"title"],[1,"fa","fa-folder-open",2,"padding-right","5px"],["matChipRemove","","class","fa fa-times",4,"ngIf"],["matChipRemove","",1,"fa","fa-times"],[1,"noResult"]],template:function(t,e){1&t&&(n.Wb(0,"form"),n.Rb(1,"input",0),n.Oc(2,DO,13,14,"mat-form-field",1),n.Wb(3,"div",2),n.Oc(4,kO,2,1,"mat-chip-list",3),n.Oc(5,SO,3,3,"div",4),n.Vb(),n.Vb()),2&t&&(n.Db(1),n.oc("formControl",e.controlAutocomplete),n.Db(1),n.oc("ngIf",!e.controlAutocomplete.disabled),n.Db(2),n.oc("ngIf",e.controlAutocomplete.value.length>0),n.Db(1),n.oc("ngIf",0===e.controlAutocomplete.value.length))},directives:[X.K,X.v,X.w,X.d,X.u,X.j,P.t,Y.c,S.a,Y.i,J.b,Ne.d,k.b,Y.j,Ne.a,P.s,W.p,V.c,ze.d,ze.a,ze.e],pipes:[g.d,Wt.a,P.b],styles:[".smallInputInfo[_ngcontent-%COMP%]{font-size:9px;white-space:normal;line-height:13px;display:table-cell;vertical-align:middle;text-align:center}.mat-chip.mat-standard-chip[_ngcontent-%COMP%]{color:#fff;background-color:#1a80ab}.noResult[_ngcontent-%COMP%]{text-align:center;font-style:italic;opacity:.5}.itemChip[_ngcontent-%COMP%]{display:block;width:95%}.itemChip[_ngcontent-%COMP%] .mat-chip-list-wrapper{margin:0}.itemList[_ngcontent-%COMP%]{padding-top:10px;overflow-x:hidden;max-height:165px}.listAutocomplete[_ngcontent-%COMP%]{height:auto}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();function PO(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",15),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).selectTag(i)})),n.ic(1,"translate"),n.Qc(2),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(3);n.oc("title",n.jc(1,2,"lang.linkedTags")),n.Db(2),n.Rc(i.getTagLabel(t))}}function VO(t,e){if(1&t&&(n.Ub(0),n.Rb(1,"br"),n.Rb(2,"hr"),n.Oc(3,PO,3,4,"span",14),n.Tb()),2&t){const t=n.hc(2);n.Db(3),n.oc("ngForOf",t.tag.links)}}function RO(t,e){if(1&t&&(n.Wb(0,"div",11),n.Wb(1,"div",12),n.Wb(2,"b"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Rb(5,"br"),n.Qc(6),n.ic(7,"translate"),n.Rb(8,"br"),n.Rb(9,"br"),n.Wb(10,"b"),n.Qc(11),n.ic(12,"translate"),n.Vb(),n.Rb(13,"br"),n.Qc(14),n.ic(15,"translate"),n.Oc(16,VO,4,1,"ng-container",13),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(3),n.Sc("",n.jc(4,5,"lang.description")," :"),n.Db(3),n.Sc(" ",t.functionsService.empty(t.tag.description)?n.jc(7,7,"lang.undefined"):t.tag.description," "),n.Db(5),n.Sc("",n.jc(12,9,"lang.usage")," :"),n.Db(3),n.Sc(" ",t.functionsService.empty(t.tag.usage)?n.jc(15,11,"lang.undefined"):t.tag.usage," "),n.Db(2),n.oc("ngIf",t.tag.links.length>0)}}function jO(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",16),n.Wb(1,"button",17),n.dc("click",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"button",18),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(1),n.oc("disabled",t.loading||t.functionsService.empty(t.tag)),n.Db(1),n.Rc(n.jc(3,4,"lang.validate")),n.Db(2),n.oc("disabled",t.loading),n.Db(1),n.Rc(n.jc(6,6,"lang.cancel"))}}let AO=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functionsService=s,this.loading=!1,this.tags=[],this.tag=null}ngOnInit(){this.getTagsTree()}getTags(){return new Promise(t=>{this.http.get("../rest/tags").pipe(Object(mt.a)(e=>{this.tags=e.tags.map(t=>({id:t.id,label:t.label,parentId:t.parentId,countResources:t.countResources})),t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}getTag(t){this.http.get("../rest/tags/"+t).pipe(Object(mt.a)(t=>{this.tag=t}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}getTagsTree(){return Object(r.a)(this,void 0,void 0,(function*(){yield this.getTags();const t=this.tags.map(t=>({id:t.id,text:t.label,parent:this.functionsService.empty(t.parentId)?"#":t.parentId,state:{opened:this.data.id==t.id,selected:this.data.id==t.id,disabled:!this.functionsService.empty(this.data.id)}}));setTimeout(()=>{$("#jstree").on("select_node.jstree",(t,e)=>{this.getTag(e.node.id)}).jstree({checkbox:{deselect_all:!0,three_state:!1},core:{force_text:!0,themes:{name:"proton",responsive:!0},multiple:!1,data:t},plugins:["checkbox","search","sort"]})},0),this.functionsService.empty(this.data.id)||this.getTag(this.data.id)}))}selectTag(t){this.functionsService.empty(this.data.id)&&($("#jstree").jstree("deselect_all"),$("#jstree").jstree("select_node",t))}getTagLabel(t){return this.tags.filter(e=>e.id==t)[0].label}onSubmit(){this.dialogRef.close(this.tag)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:14,vars:10,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],[2,"flex","1"],["mat-icon-button","",3,"title","mat-dialog-close"],[1,"fa","fa-times-circle","fa-2x"],["mat-dialog-content",""],[1,"col-md-6",2,"overflow","auto"],["id","jstree"],["class","col-md-6",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","","class","actions",4,"ngIf"],[1,"col-md-6"],["role","alert",1,"alert-message","alert-message-info"],[4,"ngIf"],["class","badge","style","cursor: pointer;",3,"title","click",4,"ngFor","ngForOf"],[1,"badge",2,"cursor","pointer",3,"title","click"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Wb(2,"span",2),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"button",3),n.ic(6,"translate"),n.Rb(7,"mat-icon",4),n.Vb(),n.Vb(),n.Wb(8,"div",5),n.Wb(9,"div",6),n.Rb(10,"div",7),n.Vb(),n.Oc(11,RO,17,13,"div",8),n.Vb(),n.Rb(12,"span",9),n.Oc(13,jO,7,8,"div",10),n.Vb()),2&t&&(n.Db(3),n.Rc(n.jc(4,6,"lang.tags")),n.Db(2),n.pc("title",n.jc(6,8,"lang.close")),n.Db(4),n.Ib("col-md-12",!e.functionsService.empty(e.tag)),n.Db(2),n.oc("ngIf",!e.functionsService.empty(e.tag)),n.Db(2),n.oc("ngIf",e.functionsService.empty(e.data.id)))},directives:[q.i,k.b,q.d,S.a,q.f,P.t,P.s,q.c],pipes:[g.d],styles:[".badge[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;font-size:10px!important;color:#fff;font-weight:400;border-radius:.25em;background:#135f7f;margin:5px}"]}),t})();const WO=["autoCompleteInput"];function TO(t,e){if(1&t&&(n.Wb(0,"mat-option",18),n.Wb(1,"span",19),n.Qc(2),n.Vb(),n.Vb()),2&t){const t=e.$implicit,i=n.hc(3);n.oc("value",t)("title",t[i.key]),n.Db(2),n.Rc(t[i.key])}}function EO(t,e){if(1&t&&(n.Ub(0),n.Oc(1,TO,3,3,"mat-option",17),n.ic(2,"sortBy"),n.ic(3,"async"),n.Tb()),2&t){const t=n.hc(2);n.Db(1),n.oc("ngForOf",n.kc(2,1,n.jc(3,4,t.filteredOptions),t.key))}}function FO(t,e){if(1&t&&n.Rb(0,"mat-option",20),2&t){const t=n.hc(2);n.oc("innerHTML",t.listInfo,n.Ec)}}function LO(t,e){1&t&&(n.Wb(0,"mat-option",21),n.Rb(1,"mat-spinner",22),n.Vb())}function QO(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field",5),n.Wb(1,"button",6),n.dc("click",(function(e){n.Dc(t);const i=n.hc();return e.stopPropagation(),i.openThesaurus()})),n.Rb(2,"mat-icon",7),n.ic(3,"translate"),n.Vb(),n.Wb(4,"input",8,9),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("focus",(function(){return n.Dc(t),n.hc().resetAutocomplete()})),n.ic(6,"translate"),n.Vb(),n.Wb(7,"button",10),n.dc("click",(function(){return n.Dc(t),n.hc().addItem()})),n.Rb(8,"mat-icon",11),n.ic(9,"translate"),n.Vb(),n.Wb(10,"mat-autocomplete",12,13),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc().selectOpt(e)})),n.Oc(12,EO,4,6,"ng-container",14),n.Oc(13,FO,1,1,"mat-option",15),n.Oc(14,LO,2,0,"mat-option",16),n.Vb(),n.Vb()}if(2&t){const t=n.zc(11),e=n.hc();n.Db(2),n.oc("title",n.jc(3,11,"lang.openThesaurus")),n.Db(2),n.oc("placeholder",n.jc(6,13,"lang.searchTag"))("formControl",e.myControl)("matAutocomplete",t),n.Db(3),n.oc("disabled",!e.canAdd||null===e.myControl.value||0===e.myControl.value.length),n.Db(1),n.Lc("visibility",e.canAdd&&null!==e.myControl.value&&e.myControl.value.length>0?"visible":"hidden"),n.oc("title",n.jc(9,15,"lang.add")),n.Db(4),n.oc("ngIf",e.options.length>0&&!e.loading),n.Db(1),n.oc("ngIf",0===e.options.length&&!e.loading),n.Db(1),n.oc("ngIf",e.loading)}}function NO(t,e){1&t&&n.Rb(0,"mat-icon",29)}function zO(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",25),n.dc("removed",(function(){n.Dc(t);const i=e.index;return n.hc(2).removeItem(i)}))("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).openThesaurus(i)})),n.Wb(1,"span",26),n.Rb(2,"i",27),n.Qc(3),n.Vb(),n.Oc(4,NO,1,0,"mat-icon",28),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.oc("removable",!i.controlAutocomplete.disabled),n.Db(1),n.oc("title",i.getTagLabel(t)),n.Db(2),n.Sc("\xa0",i.getTagLabel(t)," "),n.Db(1),n.oc("ngIf",!i.controlAutocomplete.disabled)}}function BO(t,e){if(1&t&&(n.Wb(0,"mat-chip-list",23),n.Oc(1,zO,5,4,"mat-chip",24),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",t.controlAutocomplete.value)}}function UO(t,e){1&t&&(n.Wb(0,"div",30),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noSelectedTag")," "))}let $O=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this.translate=t,this.http=e,this.notify=i,this.dialog=n,this.headerService=a,this.appService=s,this.latinisePipe=o,this.privilegeService=r,this.functionsService=c,this.loading=!1,this.key="idToDisplay",this.canAdd=!1,this.myControl=new X.i,this.valuesToDisplay={},this.newIds=[],this.tags=[],this.tmpObject=null,this.returnValue="id"}ngOnInit(){this.controlAutocomplete.valueChanges.pipe(Object(mt.a)(t=>{"object"===this.returnValue?(this.valuesToDisplay={},t.forEach(t=>{this.valuesToDisplay[t.id]=t.label})):this.functionsService.empty(this.tmpObject)?this.initFormValue():(this.valuesToDisplay[this.tmpObject.id]=this.tmpObject[this.key],this.tmpObject=null)})).subscribe(),this.controlAutocomplete.setValue(null===this.controlAutocomplete.value||""===this.controlAutocomplete.value?[]:this.controlAutocomplete.value),this.canAdd=this.privilegeService.hasCurrentUserPrivilege("manage_tags_application"),this.initAutocompleteRoute()}initAutocompleteRoute(){this.listInfo=this.translate.instant("lang.autocompleteInfo"),this.options=[],this.myControl.valueChanges.pipe(Object(pt.a)(300),Object(d.a)(t=>t.length>2),Object(bt.a)(),Object(mt.a)(()=>this.loading=!0),Object(ft.a)(t=>this.getDatas(t)),Object(mt.a)(t=>{this.listInfo=0===t.length?this.translate.instant("lang.noAvailableValue"):"",this.options=t,this.filteredOptions=Object(c.a)(this.options),this.loading=!1})).subscribe()}getDatas(t){return this.http.get("../rest/autocomplete/tags",{params:{search:t}})}selectOpt(t){this.setFormValue(t.option.value),this.myControl.setValue("")}initFormValue(){this.controlAutocomplete.value.forEach(t=>{this.http.get("../rest/tags/"+t).pipe(Object(mt.a)(t=>{this.valuesToDisplay[t.id]=t.label})).subscribe()})}setFormValue(t){if(!("id"===this.returnValue?this.controlAutocomplete.value.indexOf(t.id)>-1:this.controlAutocomplete.value.map(t=>t.id).indexOf(t.id)>-1)){let e=[];null!==this.controlAutocomplete.value&&(e=this.controlAutocomplete.value),e.push("id"===this.returnValue?t.id:{id:t.id,label:t.idToDisplay}),this.controlAutocomplete.setValue(e)}}resetAutocomplete(){this.options=[],this.listInfo=this.translate.instant("lang.autocompleteInfo")}_filter(t){if("string"==typeof t){const e=this.latinisePipe.transform(t.toLowerCase());return this.options.filter(t=>this.latinisePipe.transform(t[this.key].toLowerCase()).includes(e))}return this.options}unsetValue(){this.controlAutocomplete.setValue(""),this.myControl.setValue(""),this.myControl.enable()}removeItem(t){if(-1===this.newIds.indexOf(this.controlAutocomplete.value[t])){let e=this.controlAutocomplete.value;this.controlAutocomplete.value.splice(t,1),this.controlAutocomplete.setValue(e)}else this.http.delete("../rest/tags/"+this.controlAutocomplete.value[t]).pipe(Object(mt.a)(e=>{let i=this.controlAutocomplete.value;this.controlAutocomplete.value.splice(t,1),this.controlAutocomplete.setValue(i)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}addItem(){const t={};t[this.key]=this.myControl.value,this.http.post("../rest/tags",{label:t[this.key]}).pipe(Object(mt.a)(e=>{for(var i in e)t.id=e[i],this.newIds.push(e[i]);this.setFormValue(t),this.myControl.setValue("")}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}openThesaurus(t=null){null!==t&&(t="id"===this.returnValue?t:t.id),this.dialog.open(AO,{panelClass:"maarch-modal",width:"600px",data:{id:t}}).afterClosed().pipe(Object(d.a)(t=>!this.functionsService.empty(t)),Object(l.a)(t=>({id:t.id,idToDisplay:t.label})),Object(mt.a)(t=>{this.tmpObject=t,this.setFormValue(t)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}getTagLabel(t){return"id"===this.returnValue?this.valuesToDisplay[t]:this.valuesToDisplay[t.id]}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(y.a),n.Qb(w.a),n.Qb(Tt.c),n.Qb(Dt.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-tag-input"]],viewQuery:function(t,e){var i;1&t&&n.Kc(WO,!0),2&t&&n.yc(i=n.ec())&&(e.autoCompleteInput=i.first)},inputs:{controlAutocomplete:["control","controlAutocomplete"],returnValue:"returnValue"},features:[n.Cb([Wt.a])],decls:6,vars:4,consts:[["type","hidden",3,"formControl"],["floatLabel","never","class","input-form",4,"ngIf"],[1,"itemList"],["class","mat-chip-list-stacked itemChip","color","default",4,"ngIf"],["class","noResult",4,"ngIf"],["floatLabel","never",1,"input-form"],["color","primary","type","button","matPrefix","","mat-icon-button","",2,"left","20px","z-index","1",3,"click"],[1,"fas","fa-external-link-alt",2,"font-size","15px",3,"title"],["type","text","matInput","","maxlength","128",3,"placeholder","formControl","matAutocomplete","click","focus"],["autoCompleteInput",""],["type","button","matSuffix","","mat-icon-button","",3,"disabled","click"],[1,"fa","fa-plus",3,"title"],[3,"optionSelected"],["auto","matAutocomplete"],[4,"ngIf"],["class","autoCompleteInfoResult smallInputInfo","disabled","",3,"innerHTML",4,"ngIf"],["disabled","",4,"ngIf"],[3,"value","title",4,"ngFor","ngForOf"],[3,"value","title"],["color","primary"],["disabled","",1,"autoCompleteInfoResult","smallInputInfo",3,"innerHTML"],["disabled",""],["diameter","20"],["color","default",1,"mat-chip-list-stacked","itemChip"],["class","listAutocomplete","color","default",3,"removable","removed","click",4,"ngFor","ngForOf"],["color","default",1,"listAutocomplete",3,"removable","removed","click"],[2,"display","flex","flex","1","align-items","center","cursor","pointer",3,"title"],[1,"fa","fa-tag",2,"padding-right","5px"],["matChipRemove","","class","fa fa-times",4,"ngIf"],["matChipRemove","",1,"fa","fa-times"],[1,"noResult"]],template:function(t,e){1&t&&(n.Wb(0,"form"),n.Rb(1,"input",0),n.Oc(2,QO,15,17,"mat-form-field",1),n.Wb(3,"div",2),n.Oc(4,BO,2,1,"mat-chip-list",3),n.Oc(5,UO,3,3,"div",4),n.Vb(),n.Vb()),2&t&&(n.Db(1),n.oc("formControl",e.controlAutocomplete),n.Db(1),n.oc("ngIf",!e.controlAutocomplete.disabled),n.Db(2),n.oc("ngIf",e.controlAutocomplete.value.length>0),n.Db(1),n.oc("ngIf",0===e.controlAutocomplete.value.length))},directives:[X.K,X.v,X.w,X.d,X.u,X.j,P.t,Y.c,k.b,Y.i,S.a,J.b,Ne.d,X.p,Y.j,Ne.a,P.s,W.p,V.c,ze.d,ze.a,ze.e],pipes:[g.d,Wt.a,P.b],styles:[".smallInputInfo[_ngcontent-%COMP%]{font-size:9px;white-space:normal;line-height:13px;display:table-cell;vertical-align:middle;text-align:center}.mat-chip.mat-standard-chip[_ngcontent-%COMP%]{color:#fff;background-color:#1a80ab}.noResult[_ngcontent-%COMP%]{text-align:center;font-style:italic;opacity:.5}.listAutocomplete[_ngcontent-%COMP%]{height:auto}.itemChip[_ngcontent-%COMP%]{display:block;width:95%}.itemChip[_ngcontent-%COMP%] .mat-chip-list-wrapper{margin:0}.itemList[_ngcontent-%COMP%]{padding-top:10px;overflow-x:hidden;max-height:165px}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();const HO=["autoCompleteInput"];function GO(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",17),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).addressBANCurrentDepartment=i})),n.Wb(1,"span"),n.Qc(2),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(2),n.Rc(t)}}function XO(t,e){if(1&t&&(n.Wb(0,"mat-option",19),n.Wb(1,"span",20),n.Qc(2),n.Vb(),n.Vb()),2&t){const t=e.$implicit,i=n.hc(3);n.oc("value",t)("title",t[i.key]),n.Db(2),n.Rc(t[i.key])}}function qO(t,e){if(1&t&&(n.Ub(0),n.Oc(1,XO,3,3,"mat-option",18),n.ic(2,"sortBy"),n.ic(3,"async"),n.Tb()),2&t){const t=n.hc(2);n.Db(1),n.oc("ngForOf",n.kc(2,1,n.jc(3,4,t.filteredOptions),t.key))}}function KO(t,e){if(1&t&&n.Rb(0,"mat-option",21),2&t){const t=n.hc(2);n.oc("innerHTML",t.listInfo,n.Ec)}}function YO(t,e){1&t&&(n.Wb(0,"mat-option",22),n.Rb(1,"mat-spinner",23),n.Vb())}function JO(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field",5),n.Wb(1,"button",6),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.Qc(2),n.Rb(3,"i",7),n.Vb(),n.Wb(4,"mat-menu",null,8),n.Oc(6,GO,3,1,"button",9),n.Vb(),n.Wb(7,"input",10,11),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("focus",(function(){return n.Dc(t),n.hc().resetAutocomplete()})),n.ic(9,"translate"),n.Vb(),n.Wb(10,"mat-autocomplete",12,13),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc().selectOpt(e)})),n.Oc(12,qO,4,6,"ng-container",14),n.Oc(13,KO,1,1,"mat-option",15),n.Oc(14,YO,2,0,"mat-option",16),n.Vb(),n.Vb()}if(2&t){const t=n.zc(5),e=n.zc(11),i=n.hc();n.Db(1),n.oc("matMenuTriggerFor",t)("disabled",i.adminMode),n.Db(1),n.Sc(" ",i.addressBANCurrentDepartment," "),n.Db(4),n.oc("ngForOf",i.departmentList),n.Db(1),n.oc("placeholder",n.jc(9,10,"lang.searchAddressBan"))("formControl",i.myControl)("matAutocomplete",e),n.Db(5),n.oc("ngIf",i.options.length>0&&!i.loading),n.Db(1),n.oc("ngIf",0===i.options.length&&!i.loading),n.Db(1),n.oc("ngIf",i.loading)}}function ZO(t,e){1&t&&n.Rb(0,"mat-icon",29)}function tD(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",26),n.dc("removed",(function(){n.Dc(t);const i=e.index;return n.hc(2).removeItem(i)})),n.Wb(1,"span",27),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).goTo(i)})),n.Qc(2),n.Vb(),n.Oc(3,ZO,1,0,"mat-icon",28),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.oc("removable",!i.controlAutocomplete.disabled),n.Db(1),n.oc("title",i.valuesToDisplay[t.id]),n.Db(1),n.Sc(" ",i.valuesToDisplay[t.id]," "),n.Db(1),n.oc("ngIf",!i.controlAutocomplete.disabled)}}function eD(t,e){if(1&t&&(n.Wb(0,"mat-chip-list",24),n.Oc(1,tD,4,4,"mat-chip",25),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",t.controlAutocomplete.value)}}function iD(t,e){1&t&&(n.Wb(0,"div",30),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noSelectedAddress")," "))}let nD=(()=>{class t{constructor(t,e,i,n){this.translate=t,this.http=e,this.notify=i,this.dialog=n,this.loading=!1,this.key="address",this.canAdd=!0,this.myControl=new X.i,this.valuesToDisplay={},this.addressBANCurrentDepartment="75",this.departmentList=[]}ngOnInit(){this.controlAutocomplete.setValue(null===this.controlAutocomplete.value||""===this.controlAutocomplete.value?[]:this.controlAutocomplete.value),this.initFormValue(),this.adminMode||this.initBanSearch(),this.initAutocompleteRoute()}initBanSearch(){this.http.get("../rest/ban/availableDepartments").pipe(Object(mt.a)(t=>{null!==t.default&&-1!==t.departments.indexOf(t.default.toString())&&(this.addressBANCurrentDepartment=t.default),this.departmentList=t.departments}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}initAutocompleteRoute(){this.listInfo=this.translate.instant("lang.autocompleteInfo"),this.options=[],this.myControl.valueChanges.pipe(Object(pt.a)(300),Object(d.a)(t=>t.length>2),Object(bt.a)(),Object(mt.a)(()=>this.loading=!0),Object(ft.a)(t=>this.getDatas(t)),Object(mt.a)(t=>{this.listInfo=0===t.length?this.translate.instant("lang.noAvailableValue"):"",this.options=t,this.filteredOptions=Object(c.a)(this.options),this.loading=!1})).subscribe()}getDatas(t){return this.http.get("../rest/autocomplete/banAddresses",{params:{address:t,department:this.addressBANCurrentDepartment}})}selectOpt(t){this.setFormValue({id:t.option.value.banId,label:`${t.option.value.number} ${t.option.value.afnorName}, ${t.option.value.city} (${t.option.value.postalCode})`,addressNumber:t.option.value.number,addressStreet:t.option.value.afnorName,addressPostcode:t.option.value.postalCode,addressTown:t.option.value.city,longitude:t.option.value.lon,latitude:t.option.value.lat}),this.myControl.setValue("")}initFormValue(){this.controlAutocomplete.value.forEach(t=>{this.valuesToDisplay[t.id]=`${t.addressNumber} ${t.addressStreet}, ${t.addressTown} (${t.addressPostcode})`})}setFormValue(t){this.valuesToDisplay[t.id]=`${t.addressNumber} ${t.addressStreet}, ${t.addressTown} (${t.addressPostcode})`,this.controlAutocomplete.setValue([t])}resetAutocomplete(){this.options=[],this.listInfo=this.translate.instant("lang.autocompleteInfo")}unsetValue(){this.controlAutocomplete.setValue(""),this.myControl.setValue(""),this.myControl.enable()}removeItem(t){let e=this.controlAutocomplete.value;this.controlAutocomplete.value.splice(t,1),this.controlAutocomplete.setValue(e)}goTo(t){window.open(`https://www.google.com/maps/search/${t.latitude},${t.longitude}`,"_blank")}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-address-ban-input"]],viewQuery:function(t,e){var i;1&t&&n.Kc(HO,!0),2&t&&n.yc(i=n.ec())&&(e.autoCompleteInput=i.first)},inputs:{controlAutocomplete:["control","controlAutocomplete"],adminMode:["admin","adminMode"]},decls:6,vars:4,consts:[["type","hidden",3,"formControl"],["floatLabel","never","class","input-form depList",4,"ngIf"],[1,"itemList"],["class","mat-chip-list-stacked itemChip","color","default",4,"ngIf"],["class","noResult",4,"ngIf"],["floatLabel","never",1,"input-form","depList"],["mat-button","","matPrefix","",3,"matMenuTriggerFor","disabled","click"],[1,"fas","fa-angle-down"],["menu","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["type","text","matInput","",3,"placeholder","formControl","matAutocomplete","click","focus"],["autoCompleteInput",""],[3,"optionSelected"],["auto","matAutocomplete"],[4,"ngIf"],["class","autoCompleteInfoResult smallInputInfo","disabled","",3,"innerHTML",4,"ngIf"],["disabled","",4,"ngIf"],["mat-menu-item","",3,"click"],[3,"value","title",4,"ngFor","ngForOf"],[3,"value","title"],["color","primary"],["disabled","",1,"autoCompleteInfoResult","smallInputInfo",3,"innerHTML"],["disabled",""],["diameter","20"],["color","default",1,"mat-chip-list-stacked","itemChip"],["class","activeListAutocomplete","style","height:auto;","color","default",3,"removable","removed",4,"ngFor","ngForOf"],["color","default",1,"activeListAutocomplete",2,"height","auto",3,"removable","removed"],[2,"display","flex","flex","1","align-items","center","cursor","pointer",3,"title","click"],["matChipRemove","","class","fa fa-times",4,"ngIf"],["matChipRemove","",1,"fa","fa-times"],[1,"noResult"]],template:function(t,e){1&t&&(n.Wb(0,"form"),n.Rb(1,"input",0),n.Oc(2,JO,15,12,"mat-form-field",1),n.Wb(3,"div",2),n.Oc(4,eD,2,1,"mat-chip-list",3),n.Oc(5,iD,3,3,"div",4),n.Vb(),n.Vb()),2&t&&(n.Db(1),n.oc("formControl",e.controlAutocomplete),n.Db(1),n.oc("ngIf",!e.controlAutocomplete.disabled),n.Db(2),n.oc("ngIf",e.controlAutocomplete.value.length>0),n.Db(1),n.oc("ngIf",0===e.controlAutocomplete.value.length))},directives:[X.K,X.v,X.w,X.d,X.u,X.j,P.t,Y.c,k.b,Y.i,ne.d,ne.e,P.s,J.b,Ne.d,Ne.a,ne.b,W.p,V.c,ze.d,ze.a,S.a,ze.e],pipes:[g.d,Wt.a,P.b],styles:[".smallInputInfo[_ngcontent-%COMP%]{font-size:9px;white-space:normal;line-height:13px;display:table-cell;vertical-align:middle;text-align:center}.mat-chip.mat-standard-chip[_ngcontent-%COMP%]{color:#fff;background-color:#1a80ab}.noResult[_ngcontent-%COMP%]{text-align:center;font-style:italic;opacity:.5}.itemChip[_ngcontent-%COMP%]{display:block;width:95%}.itemChip[_ngcontent-%COMP%] .mat-chip-list-wrapper{margin:0}.itemList[_ngcontent-%COMP%]{padding-top:10px;overflow-x:hidden;max-height:165px}.depList[_ngcontent-%COMP%] .mat-form-field-infix{margin-left:-20px}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();const aD=["criteriaTool"],sD=["searchCriteriaInput"],oD=["appFolderInput"],rD=["appTagInput"],cD=["appIssuingSiteInput"],lD=["appContactAutocomplete"],dD=["pluginSelectAutocompleteSearch"];function hD(t,e){if(1&t&&(n.Wb(0,"mat-form-field",30),n.Rb(1,"input",31),n.ic(2,"translate"),n.Wb(3,"button",32),n.Rb(4,"mat-icon",33),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("formControl",t.searchTermControl)("placeholder",n.jc(2,3,"lang.quickSearchTarget")),n.Db(2),n.oc("disabled",t.isLoadingResult)}}function uD(t,e){if(1&t&&(n.Wb(0,"button",34),n.Qc(1),n.ic(2,"translate"),n.Rb(3,"i",35),n.Vb()),2&t){n.hc();const t=n.zc(15);n.oc("matMenuTriggerFor",t),n.Db(1),n.Sc(" ",n.jc(2,2,"lang.mySearchTemplates"),"\xa0 ")}}function pD(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"button",36),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().selectSearchTemplate(i)})),n.Wb(2,"div",18),n.Qc(3),n.ic(4,"shorten"),n.Vb(),n.Wb(5,"mat-icon",37),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=e.index,o=n.hc();return i.stopPropagation(),o.deleteSearchTemplate(a.id,s)})),n.ic(6,"translate"),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=e.$implicit;n.Db(1),n.oc("title",t.label),n.Db(2),n.Sc(" ",n.lc(4,3,t.label,45,"...")," "),n.Db(2),n.oc("title",n.jc(6,7,"lang.delete"))}}function bD(t,e){1&t&&(n.Wb(0,"button",38),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.noResult")))}function fD(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",39),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit;return n.hc().addCriteria(a),i.stopPropagation()})),n.Rb(1,"i",40),n.Qc(2),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc();n.oc("disabled",i.isCurrentCriteriaById(t.identifier)),n.Db(1),n.Gb("fa ",t.icon,""),n.Db(1),n.Sc(" ",t.label," ")}}function mD(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"sup",50),n.Qc(2),n.Vb(),n.Tb()),2&t){const t=e.$implicit;n.Db(2),n.Sc("(",t,")")}}function gD(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"span",47),n.Rb(2,"i"),n.Qc(3),n.Oc(4,mD,3,1,"ng-container",14),n.Qc(5,"\xa0:\xa0 "),n.Vb(),n.Wb(6,"mat-form-field",48),n.Rb(7,"input",49),n.ic(8,"translate"),n.Vb(),n.Tb()),2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(2),n.Gb("fa ",t.icon,""),n.Db(1),n.Sc(" ",t.label," "),n.Db(1),n.oc("ngForOf",e.getBadgesInfoField(t)),n.Db(3),n.oc("id",t.identifier)("placeholder",n.jc(8,8,"lang.typeValue"))("formControl",t.control)}}function vD(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"sup",50),n.Qc(2),n.Vb(),n.Tb()),2&t){const t=e.$implicit;n.Db(2),n.Sc("(",t,")")}}function _D(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"span",47),n.Rb(2,"i"),n.Qc(3),n.Oc(4,vD,3,1,"ng-container",14),n.Qc(5,"\xa0:\xa0 "),n.Vb(),n.Wb(6,"mat-form-field",48),n.Wb(7,"div",51),n.Rb(8,"input",52),n.Wb(9,"input",53),n.dc("input",(function(e){return n.Dc(t),n.hc().$implicit.control.value.start=e.target.value})),n.ic(10,"translate"),n.Vb(),n.Wb(11,"span",54),n.Qc(12,"\u2013"),n.Vb(),n.Wb(13,"input",53),n.dc("input",(function(e){return n.Dc(t),n.hc().$implicit.control.value.end=e.target.value})),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(2),n.Gb("fa ",t.icon,""),n.Db(1),n.Sc(" ",t.label," "),n.Db(1),n.oc("ngForOf",e.getBadgesInfoField(t)),n.Db(5),n.oc("value",t.control.value.start)("placeholder",n.jc(10,9,"lang.start")),n.Db(4),n.oc("value",t.control.value.end)("placeholder",n.jc(14,11,"lang.end"))}}function yD(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"sup",50),n.Qc(2),n.Vb(),n.Tb()),2&t){const t=e.$implicit;n.Db(2),n.Sc("(",t,")")}}function xD(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"span",47),n.Rb(2,"i"),n.Qc(3),n.Oc(4,yD,3,1,"ng-container",14),n.Qc(5,"\xa0:\xa0 "),n.Vb(),n.Rb(6,"plugin-select-search",55),n.ic(7,"translate"),n.Tb()),2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(2),n.Gb("fa ",t.icon,""),n.Db(1),n.Sc(" ",t.label,""),n.Db(1),n.oc("ngForOf",e.getBadgesInfoField(t)),n.Db(2),n.oc("id",t.identifier)("showResetOption",!0)("placeholderLabel",n.jc(7,12,"lang.chooseValue"))("formControlSelect",t.control)("datas",t.values)("returnValue","object")("multiple",!0)}}function CD(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"sup",50),n.Qc(2),n.Vb(),n.Tb()),2&t){const t=e.$implicit;n.Db(2),n.Sc("(",t,")")}}const OD=function(){return["type"]};function DD(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"span",47),n.Rb(2,"i"),n.Qc(3),n.Oc(4,CD,3,1,"ng-container",14),n.Qc(5,"\xa0:\xa0 "),n.Vb(),n.Rb(6,"plugin-select-autocomplete-search",56,57),n.ic(8,"translate"),n.Tb()),2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(2),n.Gb("fa ",t.icon,""),n.Db(1),n.Sc(" ",t.label," "),n.Db(1),n.oc("ngForOf",e.getBadgesInfoField(t)),n.Db(2),n.oc("id",t.identifier)("showResetOption",!0)("placeholderLabel",n.jc(8,14,"lang.chooseValue"))("formControlSelect",t.control)("datas",t.values)("routeDatas",t.routeDatas)("extraModel",n.uc(16,OD))("multiple",!0)("returnValue",t.returnValue)}}function wD(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"sup",50),n.Qc(2),n.Vb(),n.Tb()),2&t){const t=e.$implicit;n.Db(2),n.Sc("(",t,")")}}function MD(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"span",47),n.Rb(2,"i"),n.Qc(3),n.Oc(4,wD,3,1,"ng-container",14),n.Qc(5,"\xa0:\xa0 "),n.Vb(),n.Wb(6,"mat-form-field",58),n.dc("click",(function(){return n.Dc(t),n.zc(14).open()})),n.Wb(7,"mat-date-range-input",59),n.Wb(8,"input",60),n.dc("dateChange",(function(e){return n.Dc(t),n.hc().$implicit.control.value.start=e.value})),n.ic(9,"translate"),n.Vb(),n.Wb(10,"input",61),n.dc("dateChange",(function(e){return n.Dc(t),n.hc().$implicit.control.value.end=e.value})),n.ic(11,"translate"),n.Vb(),n.Vb(),n.Rb(12,"mat-datepicker-toggle",62),n.Rb(13,"mat-date-range-picker",null,63),n.Vb(),n.Tb()}if(2&t){const t=n.zc(14),e=n.hc().$implicit,i=n.hc(2);n.Db(2),n.Gb("fa ",e.icon,""),n.Db(1),n.Sc(" ",e.label," "),n.Db(1),n.oc("ngForOf",i.getBadgesInfoField(e)),n.Db(3),n.oc("rangePicker",t),n.Db(1),n.oc("placeholder",n.jc(9,13,"lang.start"))("value",e.control.value.start)("disabled",e.control.disabled),n.Db(2),n.oc("placeholder",n.jc(11,15,"lang.end"))("value",e.control.value.end)("disabled",e.control.disabled),n.Db(2),n.oc("for",t)}}function kD(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"sup",50),n.Qc(2),n.Vb(),n.Tb()),2&t){const t=e.$implicit;n.Db(2),n.Sc("(",t,")")}}function SD(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"span",47),n.Rb(2,"i"),n.Qc(3),n.Oc(4,kD,3,1,"ng-container",14),n.Qc(5,"\xa0:\xa0 "),n.Vb(),n.Rb(6,"app-contact-autocomplete",64,65),n.Tb()),2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(2),n.Gb("fa ",t.icon,""),n.Db(1),n.Sc(" ",t.label," "),n.Db(1),n.oc("ngForOf",e.getBadgesInfoField(t)),n.Db(2),n.oc("id",t.identifier)("control",t.control)("exclusion","registeredMail_recipient"===t.identifier?"?noUsers=true&noEntities=true&noContactsGroups=true":"")}}function ID(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"sup",50),n.Qc(2),n.Vb(),n.Tb()),2&t){const t=e.$implicit;n.Db(2),n.Sc("(",t,")")}}function PD(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"span",47),n.Rb(2,"i"),n.Qc(3),n.Oc(4,ID,3,1,"ng-container",14),n.Qc(5,"\xa0:\xa0 "),n.Vb(),n.Rb(6,"app-folder-input",66,67),n.Tb()),2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(2),n.Gb("fa ",t.icon,""),n.Db(1),n.Sc(" ",t.label," "),n.Db(1),n.oc("ngForOf",e.getBadgesInfoField(t)),n.Db(2),n.oc("control",t.control)("returnValue","object")}}function VD(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"sup",50),n.Qc(2),n.Vb(),n.Tb()),2&t){const t=e.$implicit;n.Db(2),n.Sc("(",t,")")}}function RD(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"span",47),n.Rb(2,"i"),n.Qc(3),n.Oc(4,VD,3,1,"ng-container",14),n.Qc(5,"\xa0:\xa0 "),n.Vb(),n.Rb(6,"app-tag-input",66,68),n.Tb()),2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(2),n.Gb("fa ",t.icon,""),n.Db(1),n.Sc(" ",t.label," "),n.Db(1),n.oc("ngForOf",e.getBadgesInfoField(t)),n.Db(2),n.oc("control",t.control)("returnValue","object")}}function jD(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"sup",50),n.Qc(2),n.Vb(),n.Tb()),2&t){const t=e.$implicit;n.Db(2),n.Sc("(",t,")")}}function AD(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"span",47),n.Rb(2,"i"),n.Qc(3),n.Oc(4,jD,3,1,"ng-container",14),n.Qc(5,"\xa0:\xa0 "),n.Vb(),n.Rb(6,"app-address-ban-input",69),n.Tb()),2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(2),n.Gb("fa ",t.icon,""),n.Db(1),n.Sc(" ",t.label," "),n.Db(1),n.oc("ngForOf",e.getBadgesInfoField(t)),n.Db(2),n.oc("control",t.control)}}const WD=function(){return["select","radio","checkbox"]},TD=function(){return["registeredMail_issuingSite"]},ED=function(){return["selectAutocomplete"]},FD=function(){return["senders","recipients"]};function LD(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",43),n.Oc(1,gD,9,10,"ng-container",44),n.Oc(2,_D,15,13,"ng-container",44),n.Oc(3,xD,8,14,"ng-container",44),n.Oc(4,DD,9,17,"ng-container",44),n.Oc(5,MD,15,17,"ng-container",44),n.Oc(6,SD,8,8,"ng-container",44),n.Oc(7,PD,8,7,"ng-container",44),n.Oc(8,RD,8,7,"ng-container",44),n.Oc(9,AD,7,6,"ng-container",44),n.Wb(10,"button",45),n.dc("click",(function(i){n.Dc(t);const a=e.index,s=n.hc(2);return i.stopPropagation(),s.removeCriteria(a)})),n.Rb(11,"mat-icon",46),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf","string"===t.type),n.Db(1),n.oc("ngIf","integer"===t.type),n.Db(1),n.oc("ngIf",n.uc(9,WD).indexOf(t.type)>-1||n.uc(10,TD).indexOf(t.identifier)>-1),n.Db(1),n.oc("ngIf",n.uc(11,ED).indexOf(t.type)>-1),n.Db(1),n.oc("ngIf","date"===t.type),n.Db(1),n.oc("ngIf",n.uc(12,FD).indexOf(t.identifier)>-1||"contact"===t.type),n.Db(1),n.oc("ngIf","folders"===t.identifier),n.Db(1),n.oc("ngIf","tags"===t.identifier),n.Db(1),n.oc("ngIf","banAutocomplete"===t.type)}}function QD(t,e){if(1&t&&(n.Wb(0,"div",71),n.Wb(1,"sup",72),n.Qc(2),n.Vb(),n.Qc(3,"\xa0"),n.Rb(4,"span",73),n.ic(5,"translate"),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(2),n.Sc("(",t.id,")"),n.Db(2),n.oc("innerHTML",n.jc(5,2,t.desc),n.Ec)}}function ND(t,e){if(1&t&&(n.Ub(0),n.Oc(1,QD,6,4,"div",70),n.Tb()),2&t){const t=e.$implicit,i=n.hc(2);n.Db(1),n.oc("ngIf",i.displayInfoSearch(t.id))}}function zD(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div"),n.Oc(2,LD,12,13,"div",41),n.Vb(),n.Wb(3,"div",42),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Oc(6,ND,2,1,"ng-container",14),n.Tb()),2&t){const t=n.hc();n.Db(1),n.Ib("criteria-content",!t.appService.getViewMode())("criteria-content-mobile",t.appService.getViewMode()),n.Db(1),n.oc("ngForOf",t.currentCriteria),n.Db(2),n.Sc(" ",n.jc(5,7,"lang.criteriaOverQuickSearch")," "),n.Db(2),n.oc("ngForOf",t.infoFields)}}function BD(t,e){1&t&&n.Rb(0,"mat-spinner",74)}function UD(t,e){if(1&t&&(n.Wb(0,"div",75),n.Wb(1,"button",76),n.Rb(2,"mat-icon",77),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("disabled",t.isLoadingResult),n.Db(2),n.Sc(" ",n.jc(4,2,"lang.searchMails")," ")}}let $D=(()=>{class t{constructor(t,e,i,a,s,o,r,c,l,d,h){this._activatedRoute=t,this.translate=e,this.http=i,this.appService=a,this.functions=s,this.indexingFields=o,this.dialog=r,this.notify=c,this.datePipe=l,this.latinisePipe=d,this.sortPipe=h,this.loading=!0,this.criteria=[],this.currentCriteria=[],this.searchTermControl=new X.i,this.searchCriteria=new X.i,this.infoFields=[{id:1,desc:"lang.searchInAttachmentsInfo"},{id:2,desc:"lang.searchFulltextInfo"},{id:3,desc:"lang.manualSearchInfo"}],this.searchTerm="Foo",this.defaultCriteria=[],this.adminMode=!1,this.openedPanel=!0,this.isLoadingResult=!1,this.class="main",this.searchUrlGenerated=new n.o,this.loaded=new n.o,t.queryParams.subscribe(t=>{this.searchTerm=t.value})}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.searchTermControl.setValue(this.searchTerm),this.criteria=yield this.indexingFields.getAllSearchFields(),this.criteria.forEach(t=>{this.defaultCriteria.indexOf(t.identifier)>-1&&(t.control=new X.i(""),this.addCriteria(t,!1))}),this.loaded.emit(!0),this.filteredCriteria=this.searchCriteria.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>this._filter(t))),this.loading=!1,setTimeout(()=>{this.searchTermControl.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>{"string"!=typeof t||this.functions.empty(t)||(this.searchTerm=t)})).subscribe()},500),this.adminMode||this.getSearchTemplates()}))}_filter(t){if("string"==typeof t){const e=this.latinisePipe.transform(t.toLowerCase());return this.criteria.filter(t=>this.latinisePipe.transform(t.label.toLowerCase()).includes(e))}return this.criteria}isCurrentCriteriaById(t){return this.currentCriteria.filter(e=>t.indexOf(e.identifier)>-1).length>0}isCurrentCriteriaByType(t){return this.currentCriteria.filter(e=>t.indexOf(e.type)>-1).length>0}addCriteria(t,e=!0){return Object(r.a)(this,void 0,void 0,(function*(){(this.functions.empty(t.control)||this.functions.empty(t.control.value))&&(t.control=new X.i("date"===t.type||"integer"===t.type?{}:"")),this.initField(t),this.currentCriteria.push(t),this.adminMode&&t.control.disable(),this.searchCriteria.reset(),e&&setTimeout(()=>{this.criteriaTool.open()},0)}))}initField(t){try{null!==t.identifier.match(/role_[.]*/g)?this.set_role_field(t):this["set_"+t.identifier+"_field"](t)}catch(e){}}removeCriteria(t){this.currentCriteria.splice(t,1)}getFilterControl(){return this.searchCriteria}getCriterias(){return this.criteria}getFilteredCriterias(){return this.filteredCriteria}focusFilter(){setTimeout(()=>{this.searchCriteriaInput.nativeElement.focus()},100)}getCurrentCriteriaValues(){const t={};this.functions.empty(this.searchTermControl.value)||(t.meta={values:this.searchTermControl.value}),this.currentCriteria.forEach(e=>{"date"===e.type||"integer"===e.type?this.functions.empty(e.control.value.start)&&this.functions.empty(e.control.value.end)||(t[e.identifier]={type:e.type,values:{start:this.functions.empty(e.control.value.start)?null:e.control.value.start,end:this.functions.empty(e.control.value.end)?null:e.control.value.end}}):this.functions.empty(e.control.value)?(["recipients","senders"].indexOf(e.identifier)>-1||"contact"===e.type)&&(this.functions.empty(this.appContactAutocomplete.toArray().filter(t=>t.id===e.identifier)[0].getInputValue())||(t[e.identifier]={type:e.type,values:[this.appContactAutocomplete.toArray().filter(t=>t.id===e.identifier)[0].getInputValue()]})):t[e.identifier]={type:e.type,values:e.control.value}}),this.searchUrlGenerated.emit(t)}toggleTool(t){t?this.criteriaTool.open():this.criteriaTool.close()}getLabelValue(t,e){return this.functions.empty(e)?this.translate.instant("lang.undefined"):"object"!=typeof e?e:Object.keys(e).indexOf("title")>-1?e.title:Object.keys(e).indexOf("label")>-1?e.label:void 0}getFormatLabel(t,e){return"date"===this.criteria.filter(e=>e.identifier===t)[0].type?`${null!==e.start?this.datePipe.transform(e.start,"dd/MM/y"):"\u221e"} - ${null!==e.end?this.datePipe.transform(e.end,"dd/MM/y"):"\u221e"}`:"integer"===this.criteria.filter(e=>e.identifier===t)[0].type?`${null!==e.start?e.start:"\u221e"} - ${null!==e.end?e.end:"\u221e"}`:"registeredMail_issuingSite"===t?this.appIssuingSiteInput.getSiteLabel(e):e}getLabelValues(t,e){return 0===e.length?this.translate.instant("lang.undefined"):"object"!=typeof e[0]?e:Object.keys(e[0]).indexOf("title")>-1?e.map(t=>t.title):Object.keys(e[0]).indexOf("label")>-1?e.map(t=>t.label):void 0}resetAllCriteria(){this.currentCriteria.forEach((t,e)=>{this.resetCriteria(t.identifier,null,!1)}),this.resetCriteria("meta",null,!1),this.getCurrentCriteriaValues()}resetCriteria(t,e,i=!0){if("meta"!==t){const i=this.currentCriteria.filter(e=>e.identifier===t)[0];if(void 0!==i){if("date"===i.type&&this.functions.empty(i.values))i.control.setValue({start:null,end:null});else if(null!==e){const t=i.control.value.map(t=>JSON.stringify(t)).indexOf(JSON.stringify(e)),n=i.control.value.slice();n.splice(t,1),t>-1&&i.control.setValue(n)}else i.control.setValue([]);(["recipients","senders"].indexOf(i.identifier)>-1||"contact"===i.type)&&this.functions.empty(i.control.value)&&this.appContactAutocomplete.toArray().filter(t=>t.id===i.identifier)[0].resetInputValue()}}else this.searchTermControl.setValue("");i&&this.getCurrentCriteriaValues()}searchInAttachments(t){return["subject","chrono","fulltext"].indexOf(t)>-1}displayInfoSearch(t){return!(1!==t||!this.isCurrentCriteriaById(["subject","chrono","fulltext"]))||!(2!==t||!this.isCurrentCriteriaById(["fulltext"]))||!(3!==t||!this.isCurrentCriteriaById(["recipients","senders","registeredMail_recipient"])&&!this.isCurrentCriteriaByType(["contact"]))}getBadgesInfoField(t){const e=[];return["subject","chrono","fulltext"].indexOf(t.identifier)>-1&&e.push(1),["fulltext"].indexOf(t.identifier)>-1&&e.push(2),(["recipients","senders","registeredMail_recipient"].indexOf(t.identifier)>-1||"contact"===t.type)&&e.push(3),e}set_meta_field(t){this.searchTermControl.setValue(t)}set_doctype_field(t){return new Promise((e,i)=>{this.http.get("../rest/doctypes").pipe(Object(mt.a)(i=>{let n=[];i.structure.forEach(t=>{void 0===t.doctypes_second_level_id&&(n.push({id:t.doctypes_first_level_id,label:t.doctypes_first_level_label,title:t.doctypes_first_level_label,disabled:!0,isTitle:!0,color:t.css_style}),i.structure.filter(e=>e.doctypes_first_level_id===t.doctypes_first_level_id&&void 0!==e.doctypes_second_level_id&&void 0===e.description).forEach(t=>{n.push({id:t.doctypes_second_level_id,label:" "+t.doctypes_second_level_label,title:t.doctypes_second_level_label,disabled:!0,isTitle:!0,color:t.css_style}),n=n.concat(i.structure.filter(e=>e.doctypes_second_level_id===t.doctypes_second_level_id&&void 0!==e.description).map(t=>({id:t.type_id,label:" "+t.description,title:t.description,disabled:!1,isTitle:!1})))}))}),t.values=n,t.event="calcLimitDate",e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}set_priority_field(t){return new Promise((e,i)=>{this.http.get("../rest/priorities").pipe(Object(mt.a)(i=>{t.values=i.priorities,e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}set_status_field(t){return new Promise((e,i)=>{this.http.get("../rest/statuses").pipe(Object(mt.a)(i=>{t.values=i.statuses.map(t=>({id:t.identifier,label:t.label_status})),e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}set_category_field(t){return new Promise((e,i)=>{this.http.get("../rest/categories").pipe(Object(mt.a)(i=>{t.values=i.categories.map(t=>({id:t.id,label:t.label})),e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}set_attachment_type_field(t){return t.values=[],new Promise((e,i)=>{this.http.get("../rest/attachmentsTypes").pipe(Object(mt.a)(i=>{Object.keys(i.attachmentsTypes).forEach(e=>{t.values.push({id:e,label:i.attachmentsTypes[e].label})}),t.values=this.sortPipe.transform(t.values,"label"),e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}set_groupSign_field(t){return new Promise((e,i)=>{this.http.get("../rest/groups").pipe(Object(mt.a)(i=>{t.values=i.groups.map(t=>({id:t.id,label:t.group_desc})),t.values=this.sortPipe.transform(t.values,"label"),e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}set_destination_field(t){return t.values=[],new Promise((e,i)=>{this.http.get("../rest/indexingModels/entities").pipe(Object(mt.a)(i=>{let n="";t.values=t.values.concat(i.entities.map(t=>{n=t.entity_label;for(let e=0;e<t.level;e++)t.entity_label=" "+t.entity_label;return{id:t.id,title:n,label:t.entity_label,disabled:!1}})),e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}set_initiator_field(t){return t.values=[],new Promise((e,i)=>{this.http.get("../rest/indexingModels/entities").pipe(Object(mt.a)(i=>{let n="";t.values=t.values.concat(i.entities.map(t=>{n=t.entity_label;for(let e=0;e<t.level;e++)t.entity_label=" "+t.entity_label;return{id:t.id,title:n,label:t.entity_label,disabled:!1}})),e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}set_registeredMail_issuingSite_field(t){return new Promise((e,i)=>{this.http.get("../rest/registeredMail/sites").pipe(Object(mt.a)(i=>{t.values=i.sites.map(t=>({id:t.id,label:`${t.label} (${t.accountNumber})`})),e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}set_role_field(t){t.type="selectAutocomplete",t.routeDatas=["role_dest","role_visa","role_sign"].indexOf(t.identifier)>-1?["/rest/autocomplete/users?serial=serialId"]:["/rest/autocomplete/users?serial=serialId","/rest/autocomplete/entities?serial=serialId"],t.extraModel=["type"],t.returnValue="object"}set_senderDepartment_field(t){return new Promise((e,i)=>{this.http.get("../rest/departments").pipe(Object(mt.a)(i=>{t.values=[],Object.keys(i.departments).forEach(e=>{t.values.push({id:e,label:`${e} - ${i.departments[e]}`})}),t.values=this.sortPipe.transform(t.values,"label"),e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}getSearchTemplates(){this.http.get("../rest/searchTemplates").pipe(Object(mt.a)(t=>{this.searchTemplates=t.searchTemplates})).subscribe()}saveSearchTemplate(){let t=[];this.currentCriteria.forEach((e,i)=>{t.push({identifier:e.identifier,values:e.control.value})}),t.push({identifier:"meta",values:this.searchTermControl.value}),this.dialog.open(aO,{panelClass:"maarch-modal",autoFocus:!0,disableClose:!0,data:{searchTemplate:{query:t}}}).afterClosed().pipe(Object(d.a)(t=>void 0!==t),Object(mt.a)(t=>{this.searchTemplates.push(t.searchTemplate)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}deleteSearchTemplate(t,e){this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete("../rest/searchTemplates/"+t)),Object(mt.a)(()=>{this.searchTemplates.splice(e,1),this.notify.success(this.translate.instant("lang.searchTemplateDeleted"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}selectSearchTemplate(t,e=!0){let i;this.currentCriteria=[],this.criteria.forEach(n=>{if(i=t.query.map(t=>t.identifier).indexOf(n.identifier),i>-1){if(void 0===n.control&&(n.control=new X.i({value:t.query[i].values,disabled:!1})),n.control.setValue(t.query[i].values),this.addCriteria(n,e),(["recipients","senders"].indexOf(n.identifier)>-1||"contact"===n.type)&&"string"==typeof t.query[i].values[0]){const e=t.query[i].values[0];setTimeout(()=>{this.appContactAutocomplete.toArray().filter(t=>t.id===n.identifier)[0].setInputValue(e)},0)}"selectAutocomplete"===n.type&&setTimeout(()=>{this.pluginSelectAutocompleteSearch.toArray().filter(t=>t.id===n.identifier)[0].setDatas(n.control.value),this.pluginSelectAutocompleteSearch.toArray().filter(t=>t.id===n.identifier)[0].resetACDatas()},0)}}),i=t.query.map(t=>t.identifier).indexOf("meta"),i>-1&&this.searchTermControl.setValue(t.query[i].values)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(o.a),n.Qb(g.e),n.Qb(v.b),n.Qb(w.a),n.Qb(_t.a),n.Qb(Zt),n.Qb(q.b),n.Qb(D.a),n.Qb(P.f),n.Qb(Tt.c),n.Qb(Wt.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-criteria-tool"]],viewQuery:function(t,e){var i;1&t&&(n.Xc(aD,!0),n.Xc(sD,!0),n.Xc(oD,!0),n.Xc(rD,!0),n.Xc(cD,!0),n.Xc(lD,!0),n.Xc(dD,!0)),2&t&&(n.yc(i=n.ec())&&(e.criteriaTool=i.first),n.yc(i=n.ec())&&(e.searchCriteriaInput=i.first),n.yc(i=n.ec())&&(e.appFolderInput=i.first),n.yc(i=n.ec())&&(e.appTagInput=i.first),n.yc(i=n.ec())&&(e.appIssuingSiteInput=i.first),n.yc(i=n.ec())&&(e.appContactAutocomplete=i),n.yc(i=n.ec())&&(e.pluginSelectAutocompleteSearch=i))},inputs:{searchTerm:"searchTerm",defaultCriteria:"defaultCriteria",adminMode:"adminMode",openedPanel:"openedPanel",isLoadingResult:"isLoadingResult",class:"class"},outputs:{searchUrlGenerated:"searchUrlGenerated",loaded:"loaded"},features:[n.Cb([P.f,Wt.a])],decls:57,vars:51,consts:[[3,"ngSubmit"],["criteriaFormUp","ngForm"],["floatLabel","never","class","basket-search",4,"ngIf"],["togglePosition","before",3,"expanded"],["criteriaTool",""],[2,"background","white","height","1px","flex","1","margin-left","10px"],[1,"myCriterias",3,"click"],["type","button","mat-button","","class","button-form-primary","style","width: auto; height: 24px; line-height: 0px;",3,"matMenuTriggerFor",4,"ngIf"],[1,"searchTemplateMenu"],["IndexingModelsMenu","matMenu"],[1,"menuTitle"],["floatLabel","never","appearance","outline",1,"smallInput",2,"width","220px !important","padding-top","10px",3,"click"],["matInput","","id","searchTerm","autocomplete","off",3,"placeholder","click","keydown"],["listFilter",""],[4,"ngFor","ngForOf"],[1,"saveSearchTemplate"],["mat-menu-item","",2,"display","flex","align-items","center",3,"disabled","click"],["color","primary",1,"fa","fa-copy",2,"line-height","21px"],[2,"flex","1"],["type","button","mat-stroked-button","",1,"addCriteriaButton",3,"matMenuTriggerFor","title","menuOpened","click"],[1,"fa","fa-plus",2,"height","auto"],["menu","matMenu"],[1,"menuTitle",2,"position","sticky","top","0px","background","white","z-index","1","display","flex","justify-content","center"],["matInput","","id","searchTerm","autocomplete","off",3,"formControl","placeholder","click","keydown"],["searchCriteriaInput",""],["mat-menu-item","","disabled","",4,"ngIf"],["mat-menu-item","",3,"disabled","click",4,"ngFor","ngForOf"],[4,"ngIf","ngIfElse"],["loadingTemplate",""],["class","col-md-12","style","text-align: center;",4,"ngIf"],["floatLabel","never",1,"basket-search"],["type","text","matInput","",1,"metaSearch",3,"formControl","placeholder"],["mat-icon-button","","matPrefix","",3,"disabled"],[1,"fas","fa-search"],["type","button","mat-button","",1,"button-form-primary",2,"width","auto","height","24px","line-height","0px",3,"matMenuTriggerFor"],[1,"fa","fa-chevron-down",2,"margin","0 0 0 10px"],["mat-menu-item","",2,"display","flex","align-items","center",3,"title","click"],["color","warn",1,"fa","fa-trash",3,"title","click"],["mat-menu-item","","disabled",""],["mat-menu-item","",3,"disabled","click"],["color","primary",2,"font-size","14px","width","50px","text-align","center"],["style","display: grid;align-items: baseline;grid-template-columns: 35% 60% 5%;padding:5px;",4,"ngFor","ngForOf"],[1,"infoSearchDesc",2,"padding-top","25px"],[2,"display","grid","align-items","baseline","grid-template-columns","35% 60% 5%","padding","5px"],[4,"ngIf"],["mat-icon-button","","type","button","matSuffix","","color","warn",3,"click"],[1,"fa","fa-trash"],[1,"criteria-label"],["floatLabel","never",1,"input-form"],["type","text","matInput","",3,"id","placeholder","formControl"],["color","primary",1,"searchInAttachments"],["role","group",1,"range-number-container"],["matInput","",2,"display","none"],["type","number","min","0","step","1",1,"range-number-input-element",3,"value","placeholder","input"],[1,"range-number-spacer"],[2,"width","100%",3,"id","showResetOption","placeholderLabel","formControlSelect","datas","returnValue","multiple"],[2,"width","100%",3,"id","showResetOption","placeholderLabel","formControlSelect","datas","routeDatas","extraModel","multiple","returnValue"],["pluginSelectAutocompleteSearch",""],["floatLabel","never",1,"input-form","input-date",2,"cursor","pointer",3,"click"],[3,"rangePicker"],["matStartDate","",3,"placeholder","value","disabled","dateChange"],["matEndDate","",3,"placeholder","value","disabled","dateChange"],["matSuffix","",3,"for"],["picker",""],[2,"width","100%",3,"id","control","exclusion"],["appContactAutocomplete",""],[2,"width","100%",3,"control","returnValue"],["appFolderInput",""],["appTagInput",""],[2,"width","100%",3,"control"],["class","infoSearchDesc",4,"ngIf"],[1,"infoSearchDesc"],["color","primary"],[3,"innerHTML"],[1,"loader"],[1,"col-md-12",2,"text-align","center"],["mat-raised-button","","matSuffix","","color","primary","type","submit",3,"disabled"],[1,"fa","fa-search",2,"height","auto","font-size","24px"]],template:function(t,e){if(1&t&&(n.Wb(0,"form",0,1),n.dc("ngSubmit",(function(){return e.getCurrentCriteriaValues()})),n.Oc(2,hD,5,5,"mat-form-field",2),n.Wb(3,"mat-accordion"),n.Wb(4,"mat-expansion-panel",3,4),n.Wb(6,"mat-expansion-panel-header"),n.Wb(7,"mat-panel-title"),n.Wb(8,"span"),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Rb(11,"span",5),n.Vb(),n.Wb(12,"mat-panel-description",6),n.dc("click",(function(t){return t.stopPropagation()})),n.Oc(13,uD,4,4,"button",7),n.Wb(14,"mat-menu",8,9),n.Wb(16,"div",10),n.Wb(17,"span"),n.Qc(18),n.ic(19,"translate"),n.Vb(),n.Wb(20,"mat-form-field",11),n.dc("click",(function(t){return t.stopPropagation()})),n.Wb(21,"input",12,13),n.dc("click",(function(t){return t.stopPropagation()}))("keydown",(function(t){return t.stopPropagation()})),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Oc(24,pD,7,9,"ng-container",14),n.ic(25,"filterList"),n.Wb(26,"div",15),n.Rb(27,"mat-divider"),n.Wb(28,"button",16),n.dc("click",(function(){return e.saveSearchTemplate()})),n.Rb(29,"mat-icon",17),n.Wb(30,"div",18),n.Qc(31),n.ic(32,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(33,"button",19),n.dc("menuOpened",(function(){return e.focusFilter()}))("click",(function(t){return t.stopPropagation()})),n.ic(34,"translate"),n.Rb(35,"mat-icon",20),n.Qc(36),n.ic(37,"translate"),n.Vb(),n.Wb(38,"mat-menu",8,21),n.Wb(40,"div",22),n.Wb(41,"span"),n.Qc(42),n.ic(43,"translate"),n.Vb(),n.Wb(44,"mat-form-field",11),n.dc("click",(function(t){return t.stopPropagation()})),n.Wb(45,"input",23,24),n.dc("click",(function(t){return t.stopPropagation()}))("keydown",(function(t){return t.stopPropagation()})),n.ic(47,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Oc(48,bD,3,3,"button",25),n.ic(49,"async"),n.Oc(50,fD,3,5,"button",26),n.ic(51,"sortBy"),n.ic(52,"async"),n.Vb(),n.Oc(53,zD,7,9,"ng-container",27),n.Oc(54,BD,1,0,"ng-template",null,28,n.Pc),n.Oc(56,UD,5,4,"div",29),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.zc(22),a=n.zc(39),s=n.zc(55);var i;n.Db(2),n.oc("ngIf",!e.adminMode),n.Db(1),n.Ib("criteria-container","main"===e.class)("criteria-container-secondary","secondary"===e.class),n.Db(1),n.oc("expanded",e.openedPanel),n.Db(5),n.Sc(" ",n.jc(10,24,"lang.criteriaSearch")," "),n.Db(4),n.oc("ngIf",!e.adminMode),n.Db(5),n.Sc(" ",n.jc(19,26,"lang.mySearchTemplates")," "),n.Db(3),n.pc("placeholder",n.jc(23,28,"lang.filterBy")),n.Db(3),n.oc("ngForOf",n.lc(25,30,e.searchTemplates,t.value,"label")),n.Db(4),n.oc("disabled",e.functions.empty(e.currentCriteria)&&e.functions.empty(e.searchTermControl.value)),n.Db(3),n.Sc(" ",n.jc(32,34,"lang.createSearchTemplate")," "),n.Db(2),n.oc("matMenuTriggerFor",a)("title",n.jc(34,36,"lang.displayCriteria")),n.Db(3),n.Sc(" ",n.jc(37,38,"lang.addCriteria")," "),n.Db(6),n.Sc(" ",n.jc(43,40,"lang.criteria")," "),n.Db(3),n.pc("placeholder",n.jc(47,42,"lang.filterBy")),n.oc("formControl",e.getFilterControl()),n.Db(3),n.oc("ngIf",0===(null==(i=n.jc(49,44,e.getFilteredCriterias()))?null:i.length)),n.Db(2),n.oc("ngForOf",n.kc(51,46,n.jc(52,49,e.getFilteredCriterias()),"label")),n.Db(3),n.oc("ngIf",!e.loading)("ngIfElse",s),n.Db(3),n.oc("ngIf",!e.adminMode)}},directives:[X.K,X.v,X.w,P.t,gt.a,gt.c,gt.g,gt.h,gt.f,ne.e,Y.c,J.b,P.s,T.a,ne.b,S.a,k.b,ne.d,X.d,X.u,X.j,Y.i,Y.j,fr,vO,ae.d,ae.o,ae.l,ae.j,ae.e,Zd,IO,$O,nD,V.c],pipes:[g.d,rg,P.b,Wt.a,Tt.p],styles:[".criteria-content[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}.criteria-content[_ngcontent-%COMP%], .criteria-content-mobile[_ngcontent-%COMP%]{display:grid;align-items:start;max-height:300px;overflow:hidden;overflow-y:auto}.criteria-content-mobile[_ngcontent-%COMP%]{grid-template-columns:repeat(1,1fr)}.addCriteriaField[_ngcontent-%COMP%]{font-size:10px}.criteriaField[_ngcontent-%COMP%]{font-size:13px}.basket-search[_ngcontent-%COMP%]{color:#666;width:500px;padding-right:10px;height:55px}.basket-search[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:30px}.basket-search[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.basket-search[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;border-radius:30px}.basket-search[_ngcontent-%COMP%] .mat-form-field-label-wrapper{font-style:italic}.basket-search[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.basket-search[_ngcontent-%COMP%] .processLimitButton[_ngcontent-%COMP%]{color:#666;position:absolute;top:-32px;left:-47px;border-radius:30px}.basket-search[_ngcontent-%COMP%] .mat-button-toggle-checked[_ngcontent-%COMP%]{background-color:#f99830!important;color:#fff}.criteria-container[_ngcontent-%COMP%] .mat-expansion-panel[_ngcontent-%COMP%]{background:none;box-shadow:none}.criteria-container[_ngcontent-%COMP%] .mat-expansion-panel-header-title[_ngcontent-%COMP%]{color:#fff;align-items:center}.criteria-container[_ngcontent-%COMP%] .mat-expansion-panel-content{background:#fff;border-radius:30px}.criteria-container[_ngcontent-%COMP%] .mat-expansion-panel-body{padding-top:5px}.criteria-container[_ngcontent-%COMP%] .mat-expansion-indicator:after{color:#fff}.criteria-container-secondary[_ngcontent-%COMP%] .mat-expansion-panel-header-title[_ngcontent-%COMP%]{color:#135f7f;align-items:center}.criteria-container-secondary[_ngcontent-%COMP%] .mat-expansion-panel-content{background:#fff;border-radius:30px}.criteria-container-secondary[_ngcontent-%COMP%] .mat-expansion-panel-body{padding-top:5px}.criteria-list[_ngcontent-%COMP%] .mat-option-text{display:flex;align-items:center}.criteria-list[_ngcontent-%COMP%] .mat-optgroup-label{z-index:1;position:-webkit-sticky;position:sticky;top:0;background:#fff;display:flex;align-items:center}.criteria-label[_ngcontent-%COMP%]{text-align:right;color:#4a4a4a;white-space:pre;overflow:hidden;text-overflow:ellipsis}.loader[_ngcontent-%COMP%]{margin:auto}.loader[_ngcontent-%COMP%] circle{stroke:#fff!important}.myCriterias[_ngcontent-%COMP%]{flex-grow:0;margin-right:0} .searchTemplateMenu.mat-menu-panel{max-width:400px!important;width:400px!important;max-height:400px!important}.menuTitle[_ngcontent-%COMP%]{display:flex;padding-left:20px;align-items:center;color:#135f7f;font-weight:700}.fieldDesc[_ngcontent-%COMP%]{font-size:10px;text-align:right;color:#fff;font-style:italic;opacity:.5}.searchInAttachments[_ngcontent-%COMP%]{cursor:help}.infoSearchDesc[_ngcontent-%COMP%]{color:#4a4a4a;font-size:12px;font-style:italic;opacity:.8}.range-number-container[_ngcontent-%COMP%]{display:flex}.range-number-input-element[_ngcontent-%COMP%]{border:none;background:none;padding:0!important;outline:none;font:inherit;text-align:center;color:#135f7f}.range-number-input-element[_ngcontent-%COMP%]::-moz-placeholder{color:initial}.range-number-input-element[_ngcontent-%COMP%]:-ms-input-placeholder{color:initial}.range-number-input-element[_ngcontent-%COMP%]::placeholder{color:initial}.range-number-container[_ngcontent-%COMP%]{color:#135f7f}.saveSearchTemplate[_ngcontent-%COMP%]{position:-webkit-sticky;position:sticky;bottom:0;background-color:#fff}.addCriteriaButton[_ngcontent-%COMP%]{border-radius:20px;border-color:#135f7f;color:#135f7f}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})(),HD=(()=>{class t{constructor(t,e){this.latinisePipe=t,this.functions=e}transform(t,e=""){let i="";if("string"==typeof t&&"string"==typeof e){const n=this.latinisePipe.transform(t.toLowerCase()).indexOf(this.latinisePipe.transform(e.toLowerCase()));n>=0&&(i=t.substring(0,n)+"<span class='highlightResult'>"+t.substring(n,n+e.length)+"</span>"+t.substring(n+e.length))}return this.functions.empty(i)?t:i}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(Tt.c),n.Qb(_t.a))},t.\u0275pipe=n.Pb({name:"highlight",type:t,pure:!0}),t})();function GD(t,e){1&t&&(n.Ub(0),n.Wb(1,"div",2),n.Rb(2,"mat-spinner"),n.Vb(),n.Tb())}function XD(t,e){if(1&t&&(n.Wb(0,"div"),n.Rb(1,"app-contact-detail",4,5),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.oc("contact",t)}}function qD(t,e){if(1&t&&n.Oc(0,XD,3,1,"div",3),2&t){const t=n.hc();n.oc("ngForOf",t.contacts)}}let KD=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.contactService=n,this.functionsService=a,this.loading=!0,this.contacts=[],this.customFields=[],this.resId=null,this.mode="recipients"}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){yield this.getCustomFields(),null!==this.resId&&this.loadContactsOfResource(this.resId,this.mode)}))}getCustomFields(){return new Promise((t,e)=>{this.http.get("../rest/contactsCustomFields").pipe(Object(mt.a)(e=>{this.customFields=e.customFields.map(t=>({id:t.id,label:t.label})),t(!0)})).subscribe()})}loadContactsOfResource(t,e){this.http.get(`../rest/resources/${t}/contacts?type=${e}`).pipe(Object(mt.a)(t=>{this.contacts=t.contacts.map(t=>Object.assign(Object.assign({},t),{civility:this.contactService.formatCivilityObject(t.civility),fillingRate:this.contactService.formatFillingObject(t.fillingRate),customFields:this.functionsService.empty(t.customFields)?[]:this.formatCustomField(t.customFields)}))}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}formatCustomField(t){const e=[];return Object.keys(t).forEach(i=>{e.push({label:this.customFields.filter(t=>t.id==i).length>0?this.customFields.filter(t=>t.id==i)[0].label:i,value:t[i]})}),e}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(lc),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-contact-resource"]],inputs:{resId:"resId",mode:"mode"},features:[n.Cb([lc])],decls:4,vars:5,consts:[[4,"ngIf","ngIfElse"],["elseTemplate",""],[1,"loading"],[4,"ngFor","ngForOf"],[3,"contact"],["appContactDetail",""]],template:function(t,e){if(1&t&&(n.Wb(0,"div"),n.Oc(1,GD,3,0,"ng-container",0),n.Oc(2,qD,1,1,"ng-template",null,1,n.Pc),n.Vb()),2&t){const t=n.zc(3);n.Gb("contact-list-container contact-list-container-",e.contacts.length,""),n.Db(1),n.oc("ngIf",e.loading)("ngIfElse",t)}},directives:[P.t,V.c,P.s,hd],styles:[".contact-list-container[_ngcontent-%COMP%]{padding:10px;display:grid;grid-template-columns:repeat(3,33%);grid-gap:10px}.contact-list-container-1[_ngcontent-%COMP%]{grid-template-columns:1fr}.contact-list-container-2[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}.contact-card[_ngcontent-%COMP%]{min-width:350px;width:100%;margin-top:10px;margin-bottom:10px;padding:0;box-shadow:none;border:1px solid rgba(0,0,0,.12)}.contact-card[_ngcontent-%COMP%] .mat-expansion-panel-body{padding-left:0;padding-right:0}.mat-card-header[_ngcontent-%COMP%]{background:#f9f9f9;padding:10px 10px 5px}.mat-card-title[_ngcontent-%COMP%]{padding-right:15px}.contact-item[_ngcontent-%COMP%]{height:35px!important}.contact-header-image[_ngcontent-%COMP%]{background:#135f7f;font-size:18px;color:#fff}.contact-group[_ngcontent-%COMP%], .contact-header-image[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.contact-group[_ngcontent-%COMP%]{color:#135f7f;font-size:16px!important}.contact-content[_ngcontent-%COMP%]{font-size:13px!important}.contact-address[_ngcontent-%COMP%]{cursor:pointer;color:#337ab7}.contact-address[_ngcontent-%COMP%]:hover .contact-content[_ngcontent-%COMP%]{text-decoration:underline}.mat-expansion-panel[_ngcontent-%COMP%]{box-shadow:none!important}.mat-expansion-panel-header-title[_ngcontent-%COMP%]{font-size:14px;color:#666}.contact-filling[_ngcontent-%COMP%]{position:absolute;right:20px}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:1;overflow:hidden;justify-content:center;align-items:center}.newData[_ngcontent-%COMP%]{color:#f99830}"]}),t})(),YD=(()=>{class t{constructor(t,e,i,n){this.translate=t,this.http=e,this.data=i,this.dialogRef=n}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.a),n.Qb(q.h))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:10,vars:11,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],[2,"flex","1",3,"title"],["mat-icon-button","",3,"title","click"],[1,"fa","fa-times"],[3,"resId","mode"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Wb(2,"span",2),n.Qc(3),n.ic(4,"shorten"),n.Vb(),n.Wb(5,"button",3),n.dc("click",(function(){return e.dialogRef.close()})),n.ic(6,"translate"),n.Rb(7,"mat-icon",4),n.Vb(),n.Vb(),n.Wb(8,"mat-dialog-content"),n.Rb(9,"app-contact-resource",5),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.oc("title",e.data.title),n.Db(1),n.Sc(" ",n.lc(4,5,e.data.title,50,"...")," "),n.Db(2),n.oc("title",n.jc(6,9,"lang.close")),n.Db(4),n.oc("resId",e.data.resId)("mode",e.data.mode))},directives:[q.i,k.b,S.a,q.f,KD],pipes:[Tt.p,g.d],styles:[""]}),t})(),JD=(()=>{class t{constructor(t,e,i){this.datePipe=t,this.functions=e,this.headerService=i,this.listsProperties={page:0,pageSize:0,order:"creationDate",orderDir:"DESC",criteria:[],filters:{}}}initListsProperties(t){const e=JSON.parse(sessionStorage.getItem("criteriaSearch_"+t));return this.listsProperties=null!==e?JSON.parse(sessionStorage.getItem("criteriaSearch_"+t)):{page:0,pageSize:0,order:"creationDate",orderDir:"DESC",criteria:[],filters:{}},this.listsProperties}updateListsPropertiesPage(t){this.listsProperties.page=t,this.saveListsProperties()}updateListsPropertiesPageSize(t){this.listsProperties.pageSize=t,this.saveListsProperties()}updateListsPropertiesCriteria(t){this.listsProperties.criteria=t,this.saveListsProperties()}updateListsPropertiesFilters(t){this.listsProperties.filters=t,this.saveListsProperties()}updateListsProperties(t){this.listsProperties=t,this.saveListsProperties()}saveListsProperties(){sessionStorage.setItem("criteriaSearch_"+this.headerService.user.id,JSON.stringify(this.listsProperties))}getCriteria(){return this.listsProperties.criteria}formatDatas(t){return Object.keys(t).forEach(e=>{["folders","tags","registeredMail_issuingSite"].indexOf(e)>-1||["select","radio","checkbox"].indexOf(t[e].type)>-1?t[e].values=t[e].values.map(t=>t.id):"date"===t[e].type&&(t[e].values.start=this.datePipe.transform(t[e].values.start,"y-MM-dd"),t[e].values.end=this.datePipe.transform(t[e].values.end,"y-MM-dd")),delete t[e].type}),t}}return t.\u0275fac=function(e){return new(e||t)(n.ac(P.f),n.ac(_t.a),n.ac(y.a))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();var ZD=i("rDax"),tw=i("6Psc");const ew=["listFilter"];function iw(t,e){1&t&&(n.Wb(0,"div",32),n.Rb(1,"mat-spinner"),n.Vb())}function nw(t,e){if(1&t&&(n.Wb(0,"mat-option",33),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}function aw(t,e){if(1&t&&(n.Wb(0,"mat-option",33),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}function sw(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",34),n.Wb(1,"mat-form-field",5),n.Wb(2,"mat-label"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"mat-select",35),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().exportModel.delimiter=e})),n.ic(6,"translate"),n.Oc(7,aw,2,2,"mat-option",7),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(3),n.Rc(n.jc(4,5,"lang.delimiter")),n.Db(2),n.pc("placeholder",n.jc(6,7,"lang.delimiter")),n.oc("ngModel",t.exportModel.delimiter)("disabled","csv"!=t.exportModel.format),n.Db(2),n.oc("ngForOf",t.delimiters)}}function ow(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",36),n.Qc(1),n.Wb(2,"i",37),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().addData(i)})),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.pc("id",t.value),n.Db(1),n.Sc("",t.label," ")}}function rw(t,e){1&t&&(n.Wb(0,"div",38),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.noDataAvailable")))}function cw(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",36),n.Qc(1),n.Wb(2,"i",39),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc().removeData(i)})),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.pc("id",t.value),n.Db(1),n.Sc("",t.label," ")}}function lw(t,e){1&t&&(n.Wb(0,"div",38),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.noDataAvailable")))}const dw=function(t){return[t]};let hw=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.data=n,this.sortPipe=a,this.loading=!1,this.loadingExport=!1,this.delimiters=[";",",","TAB"],this.formats=["csv","pdf"],this.exportModel={delimiter:";",format:"csv",data:[],resources:[]},this.dataAvailable=[{value:"res_id",label:this.translate.instant("lang.resId"),isFunction:!1},{value:"type_label",label:this.translate.instant("lang.doctype"),isFunction:!1},{value:"doctypes_first_level_label",label:this.translate.instant("lang.firstLevelDoctype"),isFunction:!1},{value:"doctypes_second_level_label",label:this.translate.instant("lang.secondLevelDoctype"),isFunction:!1},{value:"format",label:this.translate.instant("lang.format"),isFunction:!1},{value:"doc_date",label:this.translate.instant("lang.docDate"),isFunction:!1},{value:"departure_date",label:this.translate.instant("lang.departureDate"),isFunction:!1},{value:"barcode",label:this.translate.instant("lang.barcode"),isFunction:!1},{value:"getFolder",label:this.translate.instant("lang.folderName"),isFunction:!0},{value:"confidentiality",label:this.translate.instant("lang.confidentiality"),isFunction:!1},{value:"alt_identifier",label:this.translate.instant("lang.chronoNumber"),isFunction:!1},{value:"admission_date",label:this.translate.instant("lang.admissionDate"),isFunction:!1},{value:"process_limit_date",label:this.translate.instant("lang.processLimitDate"),isFunction:!1},{value:"opinion_limit_date",label:this.translate.instant("lang.getOpinionLimitDate"),isFunction:!1},{value:"closing_date",label:this.translate.instant("lang.closingDate"),isFunction:!1},{value:"subject",label:this.translate.instant("lang.subject"),isFunction:!1},{value:"getRetentionFrozen",label:this.translate.instant("lang.retentionRuleFrozen"),isFunction:!0},{value:"getBinding",label:this.translate.instant("lang.bindingMail"),isFunction:!0},{value:"getStatus",label:this.translate.instant("lang.status"),isFunction:!0},{value:"getPriority",label:this.translate.instant("lang.priority"),isFunction:!0},{value:"getCopies",label:this.translate.instant("lang.copyUsersEntities"),isFunction:!0},{value:"getDetailLink",label:this.translate.instant("lang.detailLink"),isFunction:!0},{value:"getParentFolder",label:this.translate.instant("lang.parentFolder"),isFunction:!0},{value:"getCategory",label:this.translate.instant("lang.category_id"),isFunction:!0},{value:"getInitiatorEntity",label:this.translate.instant("lang.initiatorEntity"),isFunction:!0},{value:"getDestinationEntity",label:this.translate.instant("lang.destinationEntity"),isFunction:!0},{value:"getDestinationEntityType",label:this.translate.instant("lang.destinationEntityType"),isFunction:!0},{value:"getSenders",label:this.translate.instant("lang.getSenders"),isFunction:!0},{value:"getRecipients",label:this.translate.instant("lang.getRecipients"),isFunction:!0},{value:"getTypist",label:this.translate.instant("lang.typist"),isFunction:!0},{value:"getAssignee",label:this.translate.instant("lang.dest_user"),isFunction:!0},{value:"getTags",label:this.translate.instant("lang.tags"),isFunction:!0},{value:"getSignatories",label:this.translate.instant("lang.signUser"),isFunction:!0},{value:"getSignatureDates",label:this.translate.instant("lang.signatureDate"),isFunction:!0},{value:"getDepartment",label:this.translate.instant("lang.department"),isFunction:!0},{value:"getAcknowledgementSendDate",label:this.translate.instant("lang.acknowledgementSendDate"),isFunction:!0},{value:"getVisaCircuit",label:this.translate.instant("lang.getVisaWorkflow"),isFunction:!0},{value:"getOpinionCircuit",label:this.translate.instant("lang.opinionCircuit"),isFunction:!0},{value:"",label:this.translate.instant("lang.comment"),isFunction:!0}],this.dataAvailableClone=[]}ngOnInit(){this.dataAvailableClone=JSON.parse(JSON.stringify(this.dataAvailable)),this.http.get("../rest/resourcesList/exportTemplate").subscribe(t=>{this.exportModel.resources=this.data.selectedRes,this.exportModelList=t.templates,this.exportModel.data=t.templates.csv.data,this.exportModel.data.forEach(t=>{this.dataAvailable.forEach((e,i)=>{t.value===e.value&&this.dataAvailable.splice(i,1)})}),this.loading=!1},t=>{this.notify.handleErrors(t)}),this.http.get("../rest/customFields").pipe(Object(l.a)(t=>(t.customFields=t.customFields.map(t=>({value:"custom_"+t.id,label:t.label,isFunction:!0})),t)),Object(mt.a)(t=>{this.dataAvailable=this.dataAvailable.concat(t.customFields),this.dataAvailableClone=this.dataAvailableClone.concat(t.customFields)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}drop(t){if(t.previousContainer===t.container)Object(lo.h)(t.container.data,t.previousIndex,t.currentIndex);else{let e=t.previousIndex;if("selectedElements"===t.container.id&&(e=0,void 0!==$(".available-data .columns")[t.previousIndex])){const i=$(".available-data .columns")[t.previousIndex].id;e=this.dataAvailable.map(t=>t.value).indexOf(i)}Object(lo.i)(t.previousContainer.data,t.container.data,e,t.currentIndex);const i=this.listFilter.nativeElement.value;this.listFilter.nativeElement.value="",setTimeout(()=>{this.listFilter.nativeElement.value=i},10)}}exportData(){this.loadingExport=!0,this.http.put("../rest/resourcesList/exports",this.exportModel,{responseType:"blob"}).pipe(Object(mt.a)(t=>{if("text/html"!==t.type){const e=document.createElement("a");let i,n,a,s;e.href=window.URL.createObjectURL(t),i=new Date,n=i.getDate(),a=i.getMonth()+1,s=i.getFullYear(),n<10&&(n="0"+n),a<10&&(a="0"+a),i=n+"-"+a+"-"+s,e.setAttribute("download","export_maarch_"+i+"."+this.exportModel.format.toLowerCase()),document.body.appendChild(e),e.click(),this.exportModelList[this.exportModel.format.toLowerCase()].data=this.exportModel.data}else alert(this.translate.instant("lang.tooMuchDatas"))}),Object(Xt.a)(()=>this.loadingExport=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}addData(t){let e=0;this.dataAvailable.forEach((i,n)=>{i.value===t.value&&(e=n)}),Object(lo.i)(this.dataAvailable,this.exportModel.data,e,this.exportModel.data.length);const i=this.listFilter.nativeElement.value;this.listFilter.nativeElement.value="",setTimeout(()=>{this.listFilter.nativeElement.value=i},10)}removeData(t){Object(lo.i)(this.exportModel.data,this.dataAvailable,t,this.dataAvailable.length),this.sortPipe.transform(this.dataAvailable,"label")}removeAllData(){this.dataAvailable=this.dataAvailable.concat(this.exportModel.data),this.exportModel.data=[]}addAllData(){for(this.exportModel.data=this.exportModel.data.concat(this.dataAvailable);this.dataAvailable.length>0;)this.dataAvailable.pop();this.listFilter.nativeElement.value=""}changeTemplate(t){this.dataAvailable=JSON.parse(JSON.stringify(this.dataAvailableClone)),this.exportModel.format=t.value,this.exportModel.data=this.exportModelList[t.value].data,this.exportModel.data.forEach(t=>{this.dataAvailable.forEach((e,i)=>{t.value===e.value&&this.dataAvailable.splice(i,1)})})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.a),n.Qb(Wt.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(ew,!0),2&t&&n.yc(i=n.ec())&&(e.listFilter=i.first)},features:[n.Cb([Wt.a])],decls:63,vars:62,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loader",4,"ngIf"],[1,"row"],["appearance","outline"],[3,"placeholder","ngModel","ngModelChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["class","col-md-9",4,"ngIf"],[3,"expanded"],[1,"col-md-12"],["appearance","outline",1,"listFilter"],["matInput","","cdkFocusInitial","",3,"placeholder"],["listFilter",""],[1,"row","exportList"],[1,"col-md-6","available-data"],[1,"title"],["color","primary",1,"fa","fa-plus-circle","removeAllDatas",3,"title","click"],["id","availableElements","cdkDropList","",1,"cdk-list",3,"cdkDropListData","cdkDropListConnectedTo","cdkDropListDropped"],["dataAvailableList","cdkDropList"],["class","columns","cdkDrag","",3,"id",4,"ngFor","ngForOf"],["class","noData",4,"ngIf"],[2,"display","flex","align-items","center"],[1,"fas","fa-arrow-right"],[1,"col-md-6","active-data"],["color","warn",1,"fa","fa-minus-circle","removeAllDatas",3,"title","click"],["id","selectedElements","cdkDropList","",1,"cdk-list",3,"cdkDropListData","cdkDropListConnectedTo","cdkDropListDropped"],["dataExportList","cdkDropList"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"mat-dialog-close"],[1,"loader"],[3,"value"],[1,"col-md-9"],[3,"placeholder","ngModel","disabled","ngModelChange"],["cdkDrag","",1,"columns",3,"id"],["color","primary",1,"fa","fa-plus",2,"cursor","pointer",3,"click"],[1,"noData"],["color","warn",1,"fa","fa-minus",2,"cursor","pointer",3,"click"]],template:function(t,e){if(1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"div",2),n.Oc(5,iw,2,0,"div",3),n.Wb(6,"div",4),n.Wb(7,"div"),n.Wb(8,"mat-form-field",5),n.Wb(9,"mat-label"),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Wb(12,"mat-select",6),n.dc("ngModelChange",(function(t){return e.exportModel.format=t}))("selectionChange",(function(t){return e.changeTemplate(t)})),n.ic(13,"translate"),n.Oc(14,nw,2,2,"mat-option",7),n.Vb(),n.Vb(),n.Vb(),n.Oc(15,sw,8,9,"div",8),n.Vb(),n.Wb(16,"mat-accordion"),n.Wb(17,"mat-expansion-panel",9),n.Wb(18,"mat-expansion-panel-header"),n.Wb(19,"mat-panel-title"),n.Qc(20),n.ic(21,"translate"),n.Vb(),n.Vb(),n.Wb(22,"div",4),n.Wb(23,"div",10),n.Wb(24,"mat-form-field",11),n.Rb(25,"input",12,13),n.ic(27,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(28,"div",14),n.Wb(29,"div",15),n.Wb(30,"h2"),n.Wb(31,"span",16),n.Qc(32),n.ic(33,"translate"),n.Vb(),n.Wb(34,"i",17),n.dc("click",(function(){return e.addAllData()})),n.ic(35,"translate"),n.Vb(),n.Vb(),n.Wb(36,"div",18,19),n.dc("cdkDropListDropped",(function(t){return e.drop(t)})),n.Oc(38,ow,3,2,"div",20),n.ic(39,"filterList"),n.ic(40,"sortBy"),n.Oc(41,rw,3,3,"div",21),n.Vb(),n.Vb(),n.Wb(42,"div",22),n.Rb(43,"i",23),n.Vb(),n.Wb(44,"div",24),n.Wb(45,"h2"),n.Wb(46,"span",16),n.Qc(47),n.ic(48,"translate"),n.Vb(),n.Wb(49,"i",25),n.dc("click",(function(){return e.removeAllData()})),n.ic(50,"translate"),n.Vb(),n.Vb(),n.Wb(51,"div",26,27),n.dc("cdkDropListDropped",(function(t){return e.drop(t)})),n.Oc(53,cw,3,2,"div",20),n.Oc(54,lw,3,3,"div",21),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Rb(55,"span",28),n.Wb(56,"div",29),n.Wb(57,"button",30),n.dc("click",(function(){return e.exportData()})),n.Qc(58),n.ic(59,"translate"),n.Vb(),n.Wb(60,"button",31),n.Qc(61),n.ic(62,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.zc(26),i=n.zc(37),a=n.zc(52);n.Db(2),n.Rc(n.jc(3,29,"lang.exportDatas")),n.Db(3),n.oc("ngIf",e.loadingExport),n.Db(2),n.Ib("col-md-12","csv"!=e.exportModel.format)("col-md-3","csv"==e.exportModel.format),n.Db(3),n.Rc(n.jc(11,31,"lang.format")),n.Db(2),n.pc("placeholder",n.jc(13,33,"lang.format")),n.oc("ngModel",e.exportModel.format),n.Db(2),n.oc("ngForOf",e.formats),n.Db(1),n.oc("ngIf","csv"==e.exportModel.format),n.Db(2),n.oc("expanded",!0),n.Db(3),n.Sc(" ",n.jc(21,35,"lang.datasToExport")," "),n.Db(5),n.pc("placeholder",n.jc(27,37,"lang.searchDatas")),n.Db(7),n.Rc(n.jc(33,39,"lang.availableDatas")),n.Db(2),n.pc("title",n.jc(35,41,"lang.addAllData")),n.Db(2),n.oc("cdkDropListData",e.dataAvailable)("cdkDropListConnectedTo",n.vc(58,dw,a)),n.Db(2),n.oc("ngForOf",n.lc(39,43,n.kc(40,47,e.dataAvailable,"label"),t.value,"label")),n.Db(3),n.oc("ngIf",0==e.dataAvailable.length),n.Db(6),n.Rc(n.jc(48,50,"lang.chosenDatas")),n.Db(2),n.pc("title",n.jc(50,52,"lang.removeAllDatas")),n.Db(2),n.oc("cdkDropListData",e.exportModel.data)("cdkDropListConnectedTo",n.vc(60,dw,i)),n.Db(2),n.oc("ngForOf",e.exportModel.data),n.Db(1),n.oc("ngIf",0==e.exportModel.data.length),n.Db(3),n.oc("disabled",0==e.exportModel.data.length),n.Db(1),n.Rc(n.jc(59,54,"lang.toExport")),n.Db(3),n.Rc(n.jc(62,56,"lang.cancel"))}},directives:[q.i,q.f,P.t,Y.c,Y.g,ee.a,X.u,X.x,P.s,gt.a,gt.c,gt.g,gt.h,J.b,lo.e,q.c,k.b,q.d,V.c,W.p,lo.a],pipes:[g.d,rg,Wt.a],styles:[".mat-dialog-container{position:relative}.mat-dialog-content[_ngcontent-%COMP%]{padding-bottom:10px;overflow-x:hidden} .mat-expansion-panel-body{padding-bottom:50px}.mat-expansion-panel-header[_ngcontent-%COMP%], .noData[_ngcontent-%COMP%]{opacity:.5}.noData[_ngcontent-%COMP%]{text-align:center}.removeAllDatas[_ngcontent-%COMP%]{float:right;font-size:14px;opacity:1;cursor:pointer;margin-right:10px}.listFilter[_ngcontent-%COMP%]{font-size:10px;margin-bottom:-20px}.exportList[_ngcontent-%COMP%]{display:flex}.exportList[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{float:left;height:20px;font-size:10px;font-weight:700;opacity:.5}.exportList[_ngcontent-%COMP%] .cdk-list[_ngcontent-%COMP%]{height:100%}.cdk-list[_ngcontent-%COMP%]{max-width:100%;border:1px solid #ccc;display:block;border-radius:4px;max-height:310px;min-height:310px;overflow:auto}.cdk-list[_ngcontent-%COMP%], .columns[_ngcontent-%COMP%]{width:100%;background:#fff}.columns[_ngcontent-%COMP%]{height:50px;padding:20px 10px;border-bottom:1px solid #ccc;color:rgba(0,0,0,.87);display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;cursor:move;font-size:14px}.cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.columns[_ngcontent-%COMP%]:last-child{border:none}.cdk-list.cdk-drop-list-dragging[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.actions[_ngcontent-%COMP%], .loader[_ngcontent-%COMP%]{justify-content:center}.loader[_ngcontent-%COMP%]{position:absolute;display:flex;width:100%;left:0;top:0;height:100%;background:hsla(0,0%,100%,.6);z-index:1;align-items:center}"]}),t})();function uw(t,e){1&t&&(n.Wb(0,"div",25),n.Rb(1,"mat-spinner"),n.Vb())}function pw(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",41),n.dc("click",(function(){n.Dc(t);const e=n.hc(2).index;return n.hc().removeCustomUnit(e)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",42),n.Vb()}2&t&&n.pc("title",n.jc(1,1,"lang.deleteUnit"))}function bw(t,e){if(1&t&&(n.Wb(0,"div"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(3).$implicit;n.Fb(i.css),n.Db(1),n.Sc(" ",t," ")}}function fw(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",43),n.dc("click",(function(){n.Dc(t);const e=n.hc(2).$implicit;return e.enabled=!e.enabled})),n.Oc(1,bw,2,4,"div",44),n.Vb()}if(2&t){const t=n.hc(2).$implicit;n.Db(1),n.oc("ngForOf",t.desc)}}function mw(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",43),n.dc("click",(function(){n.Dc(t);const e=n.hc(2).$implicit;return e.enabled=!e.enabled})),n.Rb(1,"div",45),n.Vb()}if(2&t){const t=n.hc(2).$implicit;n.Db(1),n.oc("innerHTML",t.advanced_desc,n.Ec)}}function gw(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",27),n.Wb(1,"div",28),n.Wb(2,"div",29),n.gc(),n.Wb(3,"svg",30),n.Rb(4,"path",31),n.Rb(5,"path",32),n.Vb(),n.Vb(),n.fc(),n.Wb(6,"mat-form-field",33),n.Wb(7,"input",34),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().$implicit.label=e}))("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Oc(9,pw,3,3,"button",35),n.Vb(),n.Wb(10,"div",36),n.Wb(11,"div",37),n.Oc(12,fw,2,1,"div",38),n.Rb(13,"br"),n.Oc(14,mw,2,1,"div",38),n.Vb(),n.Wb(15,"div",39),n.Wb(16,"mat-slide-toggle",40),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().$implicit.enabled=e})),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc();n.Ib("disabled",!t.enabled),n.pc("id",t.id),n.Db(7),n.pc("placeholder",n.jc(8,9,"lang.label")),n.oc("ngModel",t.label),n.Db(2),n.oc("ngIf","freeField"==t.unit),n.Db(3),n.oc("ngIf",!e.functions.empty(t.desc)),n.Db(2),n.oc("ngIf",t.advanced_desc),n.Db(2),n.oc("ngModel",t.enabled)}}function vw(t,e){if(1&t&&(n.Ub(0),n.Oc(1,gw,17,11,"div",26),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf","qrcode"!==t.unit)}}function _w(t,e){1&t&&(n.Wb(0,"div",20),n.Wb(1,"span",46),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,1,"lang.firstSummarySheetsGenerated")))}function yw(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",47),n.dc("click",(function(){return n.Dc(t),n.hc().closeModalWithParams()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.validate")))}function xw(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",47),n.dc("click",(function(){return n.Dc(t),n.hc().genSummarySheets()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.genSummarySheets")))}let Cw=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.sanitizer=o,this.loading=!1,this.withQrcode=!0,this.paramMode=!1,this.dataAvailable=[{id:"primaryInformations",unit:"primaryInformations",label:this.translate.instant("lang.primaryInformations"),css:"col-md-6 text-left",desc:[this.translate.instant("lang.mailDate"),this.translate.instant("lang.arrivalDate"),this.translate.instant("lang.nature"),this.translate.instant("lang.creation_date"),this.translate.instant("lang.mailType"),this.translate.instant("lang.initiator")],enabled:!0},{id:"senderRecipientInformations",unit:"senderRecipientInformations",label:this.translate.instant("lang.senderRecipientInformations"),css:"col-md-6 text-left",desc:[this.translate.instant("lang.senders"),this.translate.instant("lang.recipients")],enabled:!0},{id:"secondaryInformations",unit:"secondaryInformations",label:this.translate.instant("lang.secondaryInformations"),css:"col-md-6 text-left",desc:[this.translate.instant("lang.category_id"),this.translate.instant("lang.status"),this.translate.instant("lang.priority"),this.translate.instant("lang.processLimitDate"),this.translate.instant("lang.retentionRuleFrozen"),this.translate.instant("lang.bindingMail"),this.translate.instant("lang.customFieldsAdmin")],enabled:!0},{id:"diffusionList",unit:"diffusionList",label:this.translate.instant("lang.diffusionList"),css:"col-md-6 text-left",desc:[this.translate.instant("lang.dest_user"),this.translate.instant("lang.copyUsersEntities")],enabled:!0},{id:"opinionWorkflow",unit:"opinionWorkflow",label:this.translate.instant("lang.avis"),css:"col-md-4 text-center",desc:[this.translate.instant("lang.firstname")+" "+this.translate.instant("lang.lastname")+" ("+this.translate.instant("lang.destination").toLowerCase()+")",this.translate.instant("lang.role"),this.translate.instant("lang.processDate")],enabled:!0},{id:"visaWorkflow",unit:"visaWorkflow",label:this.translate.instant("lang.visaWorkflow"),css:"col-md-4 text-center",desc:[this.translate.instant("lang.firstname")+" "+this.translate.instant("lang.lastname")+" ("+this.translate.instant("lang.destination").toLowerCase()+")",this.translate.instant("lang.role"),this.translate.instant("lang.processDate")],enabled:!0},{id:"notes",unit:"notes",label:this.translate.instant("lang.notes"),css:"col-md-4 text-center",desc:[this.translate.instant("lang.firstname")+" "+this.translate.instant("lang.lastname"),this.translate.instant("lang.creation_date"),this.translate.instant("lang.content")],enabled:!0},{id:"trafficRecords",unit:"trafficRecords",label:this.translate.instant("lang.trafficRecordSummarySheet"),css:"col-md-4 text-center",desc:[],enabled:!0}]}ngOnInit(){this.paramMode=!this.functions.empty(this.data.paramMode),this.http.get("../rest/parameters").pipe(Object(mt.a)(t=>{const e=t.parameters.filter(t=>"traffic_record_summary_sheet"===t.id&&!this.functions.empty(t.param_value_string));this.dataAvailable=0===e.length?this.dataAvailable.filter(t=>"trafficRecords"!==t.id):this.dataAvailable.map(t=>("trafficRecords"===t.id&&(t.advanced_desc=this.sanitizer.bypassSecurityTrustHtml(e[0].param_value_string)),t))})).subscribe()}drop(t){t.previousContainer===t.container&&Object(lo.h)(t.container.data,t.previousIndex,t.currentIndex)}genSummarySheets(){this.loading=!0,this.http.post("../rest/resourcesList/summarySheets",{units:this.formatSummarySheet(),resources:this.data.selectedRes},{responseType:"blob"}).subscribe(t=>{if("text/html"!==t.type){const e=document.createElement("a");let i,n,a,s;e.href=window.URL.createObjectURL(t),i=new Date,n=i.getDate(),a=i.getMonth()+1,s=i.getFullYear(),n<10&&(n="0"+n),a<10&&(a="0"+a),i=n+"-"+a+"-"+s,e.setAttribute("download",this.translate.instant("lang.summarySheetsAlt")+"_"+i+".pdf"),document.body.appendChild(e),e.click()}else alert(this.translate.instant("lang.tooMuchDatas"));this.loading=!1},t=>{this.notify.handleErrors(t)})}formatSummarySheet(){const t=[];return this.withQrcode&&t.push({unit:"qrcode",label:""}),this.dataAvailable.forEach(e=>{e.enabled&&t.push({unit:e.unit,label:e.label})}),t}toggleQrcode(){this.withQrcode=!this.withQrcode}addCustomUnit(){this.dataAvailable.push({id:"freeField_"+this.dataAvailable.length,unit:"freeField",label:this.translate.instant("lang.comments"),css:"col-md-12 text-left",desc:[this.translate.instant("lang.freeNote")],enabled:!0})}removeCustomUnit(t){this.dataAvailable.splice(t,1)}closeModalWithParams(){this.dialogRef.close(this.formatSummarySheet())}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a),n.Qb(ca.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:44,vars:36,consts:[[1,"mat-dialog-content-container"],["mat-dialog-content","",1,"summarySheet"],["class","loader",4,"ngIf"],[1,"row","header"],[1,"col-md-4","text-left"],[1,"col-md-4","text-center"],[1,"col-md-4","text-right"],["multiple","",2,"position","absolute","top","-2px","right","0px",3,"change"],[1,"qrcode",2,"width","40px","height","40px",3,"checked","title"],["fontSet","fas","fontIcon","fa-qrcode",2,"height","auto","font-size","30px"],[1,"row"],[1,"col-md-12","title"],[1,"col-md-12"],["cdkDropList","",1,"cdk-list",3,"cdkDropListData","cdkDropListDropped"],["dataAvailableList","cdkDropList"],[4,"ngFor","ngForOf"],["mat-dialog-actions","","class","actions",4,"ngIf"],[2,"padding","10px"],[1,"alert-message","alert-message-info"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"click",4,"ngIf"],["mat-raised-button","","mat-button","",3,"mat-dialog-close"],["mat-mini-fab","","color","primary",2,"position","absolute","right","30px",3,"title","click"],["fontSet","fas","fontIcon","fa-plus",2,"height","auto"],[1,"loader"],["class","columns","cdkDrag","","style","position: relative;",3,"disabled","id",4,"ngIf"],["cdkDrag","",1,"columns",2,"position","relative",3,"id"],[1,"unitTitle"],["cdkDragHandle","",1,"handleDrag"],["width","24px","fill","currentColor","viewBox","0 0 24 24"],["d","M10 9h4V6h3l-5-5-5 5h3v3zm-1 1H6V7l-5 5 5 5v-3h3v-4zm14 2l-5-5v3h-3v4h3v3l5-5zm-9 3h-4v3H7l5 5 5-5h-3v-3z"],["d","M0 0h24v24H0z","fill","none"],["floatLabel","never",2,"margin-top","-10px"],["matInput","",3,"placeholder","ngModel","ngModelChange","click"],["mat-icon-button","","color","warn",3,"title","click",4,"ngIf"],[1,"rowData"],[1,"column-1"],["class","row unitData",3,"click",4,"ngIf"],[1,"column-2"],["color","primary",1,"unitToggle",3,"ngModel","ngModelChange"],["mat-icon-button","","color","warn",3,"title","click"],["fontSet","fas","fontIcon","fa-minus"],[1,"row","unitData",3,"click"],[3,"class",4,"ngFor","ngForOf"],["name","traffic_record_summary_sheet","id","traffic_record_summary_sheet",2,"padding-top","10px",3,"innerHTML"],[2,"color","#d24747","font-style","italic"],["mat-raised-button","","mat-button","","color","primary",3,"click"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"div",1),n.Oc(2,uw,2,0,"div",2),n.Wb(3,"div",3),n.Wb(4,"div",4),n.Qc(5),n.ic(6,"translate"),n.ic(7,"translate"),n.Vb(),n.Wb(8,"div",5),n.Wb(9,"b"),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Rb(12,"br"),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Wb(15,"div",6),n.Wb(16,"mat-button-toggle-group",7),n.dc("change",(function(){return e.toggleQrcode()})),n.Wb(17,"mat-button-toggle",8),n.ic(18,"translate"),n.Rb(19,"mat-icon",9),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(20,"div",10),n.Wb(21,"div",11),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Wb(24,"div",10),n.Wb(25,"div",12),n.Wb(26,"div",13,14),n.dc("cdkDropListDropped",(function(t){return e.drop(t)})),n.Oc(28,vw,2,1,"ng-container",15),n.Vb(),n.Vb(),n.Vb(),n.Oc(29,_w,4,3,"div",16),n.Wb(30,"div",17),n.Wb(31,"span",18),n.Qc(32),n.ic(33,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Rb(34,"span",19),n.Wb(35,"div",20),n.Oc(36,yw,3,3,"button",21),n.Oc(37,xw,3,3,"button",21),n.Wb(38,"button",22),n.Qc(39),n.ic(40,"translate"),n.Vb(),n.Wb(41,"button",23),n.dc("click",(function(){return e.addCustomUnit()})),n.ic(42,"translate"),n.Rb(43,"mat-icon",24),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.oc("ngIf",e.loading),n.Db(3),n.Tc(" ",n.jc(6,18,"lang.appName")," / ",n.jc(7,20,"lang.printDate")," "),n.Db(5),n.Rc(n.jc(11,22,"lang.summarySheet")),n.Db(3),n.Sc("",n.jc(14,24,"lang.chronoNumber")," "),n.Db(2),n.Ib("disabled",!e.withQrcode),n.Db(2),n.pc("title",n.jc(18,26,"lang.toggleQrcode")),n.oc("checked",e.withQrcode),n.Db(5),n.Sc(" ",n.jc(23,28,"lang.object")," "),n.Db(4),n.oc("cdkDropListData",e.dataAvailable),n.Db(2),n.oc("ngForOf",e.dataAvailable),n.Db(1),n.oc("ngIf",!e.functions.empty(e.data.selectedRes)&&e.data.selectedRes.length>500&&!e.paramMode),n.Db(3),n.Rc(n.jc(33,30,"lang.arGenWithModelMessage")),n.Db(4),n.oc("ngIf",e.paramMode),n.Db(1),n.oc("ngIf",!e.paramMode),n.Db(2),n.Rc(n.jc(40,32,"lang.cancel")),n.Db(2),n.pc("title",n.jc(42,34,"lang.addCustomUnit")))},directives:[q.f,P.t,og.b,og.a,S.a,lo.e,P.s,q.c,k.b,q.d,V.c,lo.a,lo.b,Y.c,J.b,X.d,X.u,X.x,te.a],pipes:[g.d],styles:[".mat-expansion-panel-body{padding-bottom:50px} .mat-slide-toggle-content{color:rgba(0,0,0,.87)}.cdk-drag-preview[_ngcontent-%COMP%] .header[_ngcontent-%COMP%], .summarySheet[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{font-size:10px;padding:10px}.cdk-drag-preview[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .summarySheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{text-align:center;font-weight:700;font-size:24px;margin-top:10px;margin-bottom:10px;border:1px solid #000}.cdk-drag-preview[_ngcontent-%COMP%] .unitTitle[_ngcontent-%COMP%], .summarySheet[_ngcontent-%COMP%] .unitTitle[_ngcontent-%COMP%]{display:flex;cursor:auto;top:2px;left:5px;width:50%}.cdk-drag-preview[_ngcontent-%COMP%] .unitData[_ngcontent-%COMP%], .summarySheet[_ngcontent-%COMP%] .unitData[_ngcontent-%COMP%]{cursor:pointer;width:100%;opacity:.5}.cdk-drag-preview[_ngcontent-%COMP%] .unitToggle[_ngcontent-%COMP%], .summarySheet[_ngcontent-%COMP%] .unitToggle[_ngcontent-%COMP%]{right:10px}.cdk-drag-preview[_ngcontent-%COMP%] .rowData[_ngcontent-%COMP%], .summarySheet[_ngcontent-%COMP%] .rowData[_ngcontent-%COMP%]{display:flex;margin:8px;flex-direction:row}.cdk-list[_ngcontent-%COMP%]{max-width:100%;border:1px solid #ccc;min-height:60px;display:block;border-radius:4px;overflow:auto}.cdk-list[_ngcontent-%COMP%], .columns[_ngcontent-%COMP%]{width:100%;background:#fff}.columns[_ngcontent-%COMP%]{padding:8px 4px;border-bottom:1px solid #ccc;color:rgba(0,0,0,.87);align-items:center;justify-content:space-between;box-sizing:border-box;font-size:14px}.cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.columns[_ngcontent-%COMP%]:last-child{border:none}.cdk-list.cdk-drop-list-dragging[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.actions[_ngcontent-%COMP%]{position:relative}.actions[_ngcontent-%COMP%], .loader[_ngcontent-%COMP%]{justify-content:center}.loader[_ngcontent-%COMP%]{position:absolute;display:flex;width:100%;left:0;top:0;height:100%;background:hsla(0,0%,100%,.6);z-index:1;align-items:center}.disabled[_ngcontent-%COMP%]{opacity:.5}.qrcode[_ngcontent-%COMP%] .mat-button-toggle-label-content{padding-left:7px!important;line-height:40px!important}.qrcode.mat-button-toggle-checked.mat-button-toggle-appearance-standard[_ngcontent-%COMP%]{background-color:#135f7f;color:#fff}.handleDrag[_ngcontent-%COMP%]{padding-right:5px;cursor:move;display:inline-block;opacity:.5}.column-1[_ngcontent-%COMP%]{width:90%}.column-2[_ngcontent-%COMP%]{width:10%}#traffic_record_summary_sheet[_ngcontent-%COMP%]{margin-left:20px;margin-right:-75px}"]}),t})(),Ow=(()=>{class t{constructor(t,e,i){this.translate=t,this.http=e,this.dialog=i,this.priorities=[],this.categories=[],this.entitiesList=[],this.statuses=[],this.metaSearchInput="",this.stateGroups=[],this.isLoading=!1}ngOnInit(){}openExport(){this.dialog.open(hw,{panelClass:"maarch-modal",width:"800px",data:{selectedRes:this.selectedRes}})}openSummarySheet(){this.dialog.open(Cw,{panelClass:"maarch-full-height-modal",width:"800px",data:{selectedRes:this.selectedRes}})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-tools-list"]],viewQuery:function(t,e){var i;1&t&&n.Kc(Ne.d,!0),2&t&&n.yc(i=n.ec())&&(e.autocomplete=i.first)},inputs:{listProperties:"listProperties",currentBasketInfo:"currentBasketInfo",sidenavRight:["snavR","sidenavRight"],selectedRes:"selectedRes",totalRes:"totalRes"},decls:6,vars:8,consts:[["mat-mini-fab","",3,"disabled","title","click"],[1,"fas","fa-scroll"],[1,"fa","fa-file-download"]],template:function(t,e){1&t&&(n.Wb(0,"button",0),n.dc("click",(function(){return e.openSummarySheet()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",1),n.Vb(),n.Wb(3,"button",0),n.dc("click",(function(){return e.openExport()})),n.ic(4,"translate"),n.Rb(5,"mat-icon",2),n.Vb()),2&t&&(n.pc("title",n.jc(1,4,"lang.summarySheets")),n.oc("disabled",0==e.selectedRes.length),n.Db(3),n.pc("title",n.jc(4,6,"lang.exportDatas")),n.oc("disabled",0==e.selectedRes.length))},directives:[k.b,S.a],pipes:[g.d],styles:[".mat-icon[_ngcontent-%COMP%]{height:auto}.mat-mini-fab[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;box-shadow:none;margin-left:5px;margin-right:5px}.mat-mini-fab[_ngcontent-%COMP%]:disabled{border:1px solid #fff}"]}),t})();function Dw(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div",8),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Rb(4,"mat-divider",9),n.Tb()),2&t){const t=n.hc().$implicit,e=n.hc();n.Db(2),n.Tc("",n.jc(3,2,"lang."+t.key)," (",e.getRealCount(t.key),")")}}function ww(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-option",11),n.dc("click",(function(){n.Dc(t);const e=n.hc(2).index,i=n.hc().$implicit;return n.hc().toggleFilter(i.key,e)})),n.Wb(1,"span",12),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"span",13),n.Qc(5),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2).$implicit,e=n.hc(2);n.oc("selected",t.selected)("disabled",e.isLoadingResults),n.Db(1),n.oc("title",t.label),n.Db(1),n.Rc(null!==t.id?t.label:n.jc(3,7,"lang.undefined")),n.Db(2),n.Ib("noRes",0===t.count),n.Db(1),n.Rc(t.count)}}function Mw(t,e){if(1&t&&(n.Ub(0),n.Oc(1,ww,6,9,"mat-list-option",10),n.Tb()),2&t){const t=n.hc().index,e=n.hc().$implicit,i=n.hc();n.Db(1),n.oc("ngIf",t<5||i.filters[e.key].expand)}}function kw(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Mw,2,1,"ng-container",5),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",t.count>0||0===t.count&&t.selected)}}function Sw(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",14),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc().toggleDisplay(e.key)})),n.Qc(1),n.ic(2,"translate"),n.ic(3,"translate"),n.Rb(4,"mat-icon",15),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc();n.Db(1),n.Rc(e.filters[t.key].expand?n.jc(2,5,"lang.less"):n.jc(3,7,"lang.more")),n.Db(3),n.Ib("fa-chevron-down",!e.filters[t.key].expand)("fa-chevron-up",e.filters[t.key].expand)}}function Iw(t,e){if(1&t&&(n.Wb(0,"mat-selection-list",3,4),n.Oc(2,Dw,5,4,"ng-container",5),n.Oc(3,kw,2,1,"ng-container",6),n.Oc(4,Sw,5,9,"button",7),n.Vb()),2&t){const t=e.$implicit,i=n.hc();n.Db(2),n.oc("ngIf",i.getRealCount(t.key)>0),n.Db(1),n.oc("ngForOf",i.getFiltersNotEmpty(t.key)),n.Db(1),n.oc("ngIf",i.getRealCount(t.key)>5)}}let Pw=(()=>{class t{constructor(t,e,i,a){this.translate=t,this.http=e,this.appService=i,this.functions=a,this.filters={},this.isLoadingResults=!1,this.filterChanged=new n.o}ngOnInit(){}setfilters(t){this.filters=t}toggleFilter(t,e){this.getFiltersNotEmpty(t)[e].selected=!this.getFiltersNotEmpty(t)[e].selected,this.filterChanged.emit()}toggleDisplay(t){this.filters[t].expand=!this.filters[t].expand}getRealCount(t){return this.filters[t].values.filter(t=>t.count>0||0===t.count&&t.selected).length}getFiltersNotEmpty(t){return this.filters[t].values.filter(t=>t.count>0||0===t.count&&t.selected)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(w.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-filter-tool-adv-search"]],inputs:{filters:"filters",isLoadingResults:"isLoadingResults"},outputs:{filterChanged:"filterChanged"},decls:8,vars:6,consts:[["expanded","",1,"FilterContainer"],[1,"fas","fa-filter","panelIconMenu"],["class","filter-list",4,"ngFor","ngForOf"],[1,"filter-list"],["filterList",""],[4,"ngIf"],[4,"ngFor","ngForOf"],["mat-button","","style","width:100%;","color","primary",3,"click",4,"ngIf"],[1,"catGroupTitle"],[2,"width","80%"],["color","primary","class","catContent","checkboxPosition","before",3,"selected","disabled","click",4,"ngIf"],["color","primary","checkboxPosition","before",1,"catContent",3,"selected","disabled","click"],[1,"catLabel",3,"title"],[1,"catBadge"],["mat-button","","color","primary",2,"width","100%",3,"click"],[1,"fas",2,"height","auto"]],template:function(t,e){1&t&&(n.Wb(0,"mat-expansion-panel",0),n.Wb(1,"mat-expansion-panel-header"),n.Wb(2,"mat-panel-title"),n.Rb(3,"i",1),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Oc(6,Iw,5,3,"mat-selection-list",2),n.ic(7,"keyvalue"),n.Vb()),2&t&&(n.Db(4),n.Sc("\xa0",n.jc(5,2,"lang.filterBy")," "),n.Db(2),n.oc("ngForOf",n.jc(7,4,e.filters)))},directives:[gt.c,gt.g,gt.h,P.s,R.i,P.t,T.a,R.f,k.b,S.a],pipes:[g.d,P.l],styles:[".catGroupTitle[_ngcontent-%COMP%]{color:#135f7f;font-size:14px;font-weight:500;padding-left:10px}.catContent[_ngcontent-%COMP%]{font-size:12px;font-weight:700}.catLabel[_ngcontent-%COMP%]{flex:1}.catBadge[_ngcontent-%COMP%]{color:#135f7f;font-size:14px;font-weight:700!important;min-width:auto}.filter-list[_ngcontent-%COMP%] .mat-list-text{flex-direction:row}.FilterContainer[_ngcontent-%COMP%]{border-radius:0;box-shadow:none}.FilterContainer[_ngcontent-%COMP%] .mat-expansion-panel-body{padding:0}.FilterContainer[_ngcontent-%COMP%] .mat-expansion-panel-header-title[_ngcontent-%COMP%]{color:#135f7f;display:flex;align-items:center;font-size:14px;font-weight:500}.FilterContainer[_ngcontent-%COMP%] .mat-line[_ngcontent-%COMP%]{font-size:12px;font-weight:700}.FilterContainer[_ngcontent-%COMP%] .mat-pseudo-checkbox-disabled{opacity:.5}.panelIconMenu[_ngcontent-%COMP%]{font-size:22px}.mat-list-item-disabled[_ngcontent-%COMP%]{background:initial}.noRes[_ngcontent-%COMP%]{color:#666!important;opacity:.5}"]}),t})(),Vw=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.data=n,this.dialogRef=a,this.loading=!1,this.folderName=""}ngOnInit(){this.folderName=void 0!==this.data.folderName?this.data.folderName:""}onSubmit(){this.loading=!0,this.http.post("../rest/folders",{label:this.folderName}).pipe(Object(mt.a)(t=>{this.notify.success(this.translate.instant("lang.folderAdded")),this.dialogRef.close(t.folder)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.a),n.Qb(q.h))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:16,vars:15,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["appearance","outline"],["type","text","matInput","",3,"ngModel","placeholder","ngModelChange"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"div",2),n.Wb(5,"mat-form-field",3),n.Wb(6,"input",4),n.dc("ngModelChange",(function(t){return e.folderName=t})),n.ic(7,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Rb(8,"span",5),n.Wb(9,"div",6),n.Wb(10,"button",7),n.dc("click",(function(){return e.onSubmit()})),n.Qc(11),n.ic(12,"translate"),n.Vb(),n.Wb(13,"button",8),n.Qc(14),n.ic(15,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,7,"lang.addFolder")),n.Db(4),n.oc("ngModel",e.folderName)("placeholder",n.jc(7,9,"lang.folderName")),n.Db(4),n.oc("disabled",e.loading||""===e.folderName),n.Db(1),n.Rc(n.jc(12,11,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(15,13,"lang.cancel")))},directives:[q.i,q.f,Y.c,J.b,X.d,X.u,X.x,q.c,k.b,q.d],pipes:[g.d],styles:[""]}),t})();function Rw(t,e){if(1&t&&(n.Wb(0,"button",8),n.Rb(1,"mat-icon",9),n.Wb(2,"span"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()),2&t){n.hc();const t=n.zc(2);n.oc("matMenuTriggerFor",t),n.Db(3),n.Sc("",n.jc(4,2,"lang.removeFromFolder"),"...")}}function jw(t,e){1&t&&(n.Rb(0,"i",12),n.ic(1,"translate")),2&t&&n.pc("title",n.jc(1,1,"lang.sharedFolder"))}function Aw(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",10),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().unclassifyDocuments(i)})),n.Oc(1,jw,2,3,"i",11),n.Qc(2),n.Vb()}if(2&t){const t=e.$implicit;n.oc("title",t.label),n.Db(1),n.oc("ngIf",t.public),n.Db(1),n.Sc(" ",t.label,"")}}function Ww(t,e){1&t&&(n.Wb(0,"button",19),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.myPinnedFolder")))}function Tw(t,e){1&t&&(n.Wb(0,"button",19),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.noPinnedFolder")))}function Ew(t,e){1&t&&(n.Wb(0,"button",19),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.noAvailableFolder")))}function Fw(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",20),n.dc("click",(function(){return n.Dc(t),n.hc(3).openCreateFolderModal()})),n.Qc(1,"Cr\xe9er un dossier"),n.Vb()}}function Lw(t,e){1&t&&(n.Rb(0,"i",12),n.ic(1,"translate")),2&t&&n.pc("title",n.jc(1,1,"lang.sharedFolder"))}function Qw(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",10),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).classifyDocuments(i)})),n.Oc(1,Lw,2,3,"i",11),n.Qc(2),n.Vb()}if(2&t){const t=e.$implicit;n.oc("title",t.label),n.Db(1),n.oc("ngIf",t.public),n.Db(1),n.Sc(" ",t.label,"")}}function Nw(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Ww,3,3,"button",17),n.Oc(2,Tw,3,3,"button",17),n.Oc(3,Ew,3,3,"button",17),n.Oc(4,Fw,2,0,"button",18),n.Oc(5,Qw,3,3,"button",2),n.ic(6,"sortBy"),n.Tb()),2&t){const t=n.hc(2);n.Db(1),n.oc("ngIf",t.pinnedFolder&&0!==t.foldersList.length),n.Db(1),n.oc("ngIf",t.pinnedFolder&&0===t.foldersList.length),n.Db(1),n.oc("ngIf",!t.pinnedFolder&&0===t.foldersList.length&&!t.loading),n.Db(1),n.oc("ngIf",!t.pinnedFolder&&0===t.foldersList.length&&!t.loading),n.Db(1),n.oc("ngForOf",n.kc(6,5,t.foldersList,"label"))}}function zw(t,e){1&t&&(n.Wb(0,"div",21),n.Rb(1,"mat-spinner",22),n.Vb())}function Bw(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field",13),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.Wb(1,"input",14),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("keydown",(function(e){return n.Dc(t),e.stopPropagation()})),n.ic(2,"translate"),n.Vb(),n.Vb(),n.Oc(3,Nw,7,8,"ng-container",15),n.Oc(4,zw,2,0,"ng-template",null,16,n.Pc)}if(2&t){const t=n.zc(5),e=n.hc();n.Db(1),n.pc("placeholder",n.jc(2,4,"lang.searchFolder")),n.oc("formControl",e.searchTerm),n.Db(2),n.oc("ngIf",!e.loading)("ngIfElse",t)}}let Uw=(()=>{class t{constructor(t,e,i,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.dialog=a,this.renderer=s,this.foldersService=o,this.functions=r,this.foldersList=[],this.pinnedFolder=!0,this.loading=!0,this.refreshFolders=new n.o,this.refreshList=new n.o,this.searchTerm=new X.i}ngOnInit(){this.searchTerm.valueChanges.pipe(Object(pt.a)(300),Object(mt.a)(t=>{0===t.length&&(this.pinnedFolder=!0,this.getFolders())}),Object(d.a)(t=>t.length>2),Object(mt.a)(()=>this.loading=!0),Object(ft.a)(t=>this.http.get("../rest/autocomplete/folders",{params:{search:t}})),Object(mt.a)(t=>{this.pinnedFolder=!1,this.foldersList=t.map(t=>({id:t.id,label:t.idToDisplay})),this.loading=!1}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}initFolderMenu(){this.searchTerm.setValue(""),setTimeout(()=>{this.renderer.selectRootElement("#searchTerm").focus()},200)}getFolders(){this.loading=!0,this.http.get("../rest/pinnedFolders").pipe(Object(l.a)(t=>t.folders),Object(mt.a)(t=>{this.foldersList=t}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}classifyDocuments(t){this.http.post("../rest/folders/"+t.id+"/resources",{resources:this.resIds}).pipe(Object(mt.a)(()=>{this.foldersService.getPinnedFolders(),this.refreshList.emit(),this.refreshFolders.emit(),this.notify.success(this.translate.instant("lang.mailClassified"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}unclassifyDocuments(t){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.unclassifyQuestion")+" <b>"+this.resIds.length+"</b> "+this.translate.instant("lang.mailsInFolder")+" ?"}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.request("DELETE","../rest/folders/"+t.id+"/resources",{body:{resources:this.resIds}})),Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.removedFromFolder")),this.foldersService.getPinnedFolders(),this.refreshList.emit(),this.refreshFolders.emit()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}openCreateFolderModal(){this.dialogRef=this.dialog.open(Vw,{panelClass:"maarch-modal",data:{folderName:this.searchTerm.value}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.classifyDocuments({id:t})}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(n.I),n.Qb(tw.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["folder-menu"]],inputs:{resIds:"resIds",currentFoldersList:["currentFolders","currentFoldersList"]},outputs:{refreshFolders:"refreshFolders",refreshList:"refreshList"},decls:13,vars:14,consts:[["mat-menu-item","","class","folderAction",3,"matMenuTriggerFor",4,"ngIf"],["currentFolders","matMenu"],["mat-menu-item","","class","labelFolder",3,"title","click",4,"ngFor","ngForOf"],["mat-menu-item","",1,"folderAction",3,"matMenuTriggerFor","disabled","menuOpened"],["color","primary",1,"fa","fa-folder-open","fa-2x"],["restoreFocus","false"],["folders","matMenu"],["matMenuContent",""],["mat-menu-item","",1,"folderAction",3,"matMenuTriggerFor"],["color","warn",1,"fa","fa-folder-minus","fa-2x"],["mat-menu-item","",1,"labelFolder",3,"title","click"],["class","fa fa-users private",3,"title",4,"ngIf"],[1,"fa","fa-users","private",3,"title"],["floatLabel","never","appearance","outline",1,"smallInput",3,"click"],["matInput","","id","searchTerm","autocomplete","off",3,"placeholder","formControl","click","keydown"],[4,"ngIf","ngIfElse"],["elseTemplate",""],["mat-menu-item","","class","noFolder","disabled","",4,"ngIf"],["mat-menu-item","","class","createFolder",3,"click",4,"ngIf"],["mat-menu-item","","disabled","",1,"noFolder"],["mat-menu-item","",1,"createFolder",3,"click"],[1,"loading"],["diameter","35"]],template:function(t,e){if(1&t&&(n.Oc(0,Rw,5,4,"button",0),n.Wb(1,"mat-menu",null,1),n.Oc(3,Aw,3,3,"button",2),n.ic(4,"sortBy"),n.Vb(),n.Wb(5,"button",3),n.dc("menuOpened",(function(){return e.initFolderMenu()})),n.Rb(6,"mat-icon",4),n.Wb(7,"span"),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Vb(),n.Wb(10,"mat-menu",5,6),n.Oc(12,Bw,6,6,"ng-template",7),n.Vb()),2&t){const t=n.zc(11);n.oc("ngIf",void 0!==e.currentFoldersList&&e.currentFoldersList.length>0),n.Db(1),n.Fb("folderListMenu"),n.Db(2),n.oc("ngForOf",n.kc(4,9,e.currentFoldersList,"label")),n.Db(2),n.oc("matMenuTriggerFor",t)("disabled",0===e.resIds.length),n.Db(3),n.Rc(n.jc(9,12,"lang.classifyIn")),n.Db(2),n.Fb("folderListMenu")}},directives:[P.t,ne.e,P.s,ne.b,ne.d,S.a,ne.a,Y.c,J.b,X.d,X.u,X.j,V.c],pipes:[Wt.a,g.d],styles:[".folderAction[_ngcontent-%COMP%]{font-style:italic}.folderAction[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{font-size:20px}.labelFolder[_ngcontent-%COMP%]{color:#666;font-size:12px;font-weight:700}.private[_ngcontent-%COMP%]{color:#f99830} .folderListMenu{width:auto}.noFolder[_ngcontent-%COMP%]{font-size:12px;color:#666;text-align:center;font-style:italic}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.loading[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.createFolder[_ngcontent-%COMP%]{color:#135f7f;text-align:center}"]}),t})();function $w(t,e){if(1&t&&(n.Wb(0,"button",17),n.Qc(1),n.ic(2,"translate"),n.Rb(3,"mat-icon",18),n.Vb()),2&t){n.hc();const t=n.zc(3);n.oc("matMenuTriggerFor",t),n.Db(1),n.Rc(n.jc(2,2,"lang.actionsAlt"))}}function Hw(t,e){if(1&t&&n.Rb(0,"span",19,20),2&t){const t=n.hc(),e=n.zc(3);n.Lc("left",t.contextMenuPosition.x)("top",t.contextMenuPosition.y),n.oc("matMenuTriggerFor",e)}}function Gw(t,e){if(1&t&&(n.Wb(0,"div",21),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Sc(" ",t.contextMenuTitle," ")}}function Xw(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",22),n.dc("menuOpened",(function(){return n.Dc(t),n.hc().getBaskets()})),n.Wb(1,"span"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()}if(2&t){n.hc();const t=n.zc(7);n.oc("matMenuTriggerFor",t),n.Db(2),n.Rc(n.jc(3,2,"lang.goToBasket"))}}function qw(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",25),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).goTo(e)})),n.Qc(1),n.Vb()}if(2&t){const t=n.hc().$implicit;n.pc("title",t.basketName),n.Db(1),n.Sc("",t.basketName," ")}}function Kw(t,e){if(1&t&&(n.Ub(0),n.Oc(1,qw,2,2,"button",24),n.Tb()),2&t){const t=e.$implicit,i=n.hc().$implicit;n.Db(1),n.oc("ngIf",t.groupId===i.groupId)}}function Yw(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div",23),n.Qc(2),n.Vb(),n.Oc(3,Kw,2,1,"ng-container",6),n.ic(4,"sortBy"),n.Tb()),2&t){const t=e.$implicit,i=n.hc();n.Db(2),n.Rc(t.groupName),n.Db(1),n.oc("ngForOf",n.kc(4,2,i.basketList.list,"basketName"))}}function Jw(t,e){1&t&&(n.Wb(0,"div",26),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.mailNotPresentInBasket")," "))}function Zw(t,e){if(1&t&&(n.Wb(0,"button",27),n.ic(1,"translate"),n.Rb(2,"mat-icon",28),n.Wb(3,"span"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc(),e=n.zc(20);n.oc("matMenuTriggerFor",e)("disabled",0===t.selectedRes.length)("title",n.jc(1,4,"lang.freezeRetentionRule")),n.Db(4),n.Rc(n.jc(5,6,"lang.freezeRetentionRule"))}}function tM(t,e){if(1&t&&(n.Wb(0,"button",27),n.ic(1,"translate"),n.Rb(2,"mat-icon",29),n.Wb(3,"span"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc(),e=n.zc(32);n.oc("matMenuTriggerFor",e)("disabled",0===t.selectedRes.length)("title",n.jc(1,4,"lang.setBindingDocument")),n.Db(4),n.Rc(n.jc(5,6,"lang.setBindingDocument"))}}let eM=(()=>{class t{constructor(t,e,i,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.dialog=a,this.router=s,this.headerService=o,this.privilegeService=r,this.loading=!1,this.triggerEvent=new n.o,this.contextMenuPosition={x:"0px",y:"0px"},this.contextMenuTitle="",this.currentAction={},this.basketInfo={},this.contextResId=0,this.currentLock=null,this.arrRes=[],this.folderList=[],this.actionsList=[],this.basketList={groups:[],list:[]},this.currentResource={},this.refreshEvent=new n.o,this.refreshPanelFolders=new n.o}ngOnInit(){}open(t,e,i){return this.contextMenuPosition.x=t+"px",this.contextMenuPosition.y=e+"px",this.currentResource=i,this.contextMenuTitle=i.chrono,this.contextResId=i.resId,this.folderList=void 0!==i.folders?i.folders:[],this.contextMenu.openMenu(),this.getFreezeBindingValue(),!1}refreshList(){this.refreshEvent.emit()}refreshFolders(){this.refreshPanelFolders.emit()}refreshDaoAfterAction(){this.refreshEvent.emit()}unFollow(){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.stopFollowingAlert")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.request("DELETE","../rest/resources/unfollow",{body:{resources:this.selectedRes}})),Object(mt.a)(t=>{this.notify.success(this.translate.instant("lang.removedFromFolder")),this.headerService.nbResourcesFollowed-=t.unFollowed,this.refreshDaoAfterAction()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}getBaskets(){this.http.get("../rest/resources/"+this.selectedRes+"/baskets").pipe(Object(mt.a)(t=>{this.basketList.groups=t.groupsBaskets.filter((t,e,i)=>t&&i.map(t=>t.groupId).indexOf(t.groupId)===e),this.basketList.list=t.groupsBaskets}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}goTo(t){this.contextMenuTitle!==this.translate.instant("lang.undefined")&&""!==this.contextMenuTitle?this.router.navigate(["/basketList/users/"+this.headerService.user.id+"/groups/"+t.groupId+"/baskets/"+t.basketId],{queryParams:{chrono:'"'+this.contextMenuTitle+'"'}}):this.router.navigate(["/basketList/users/"+this.headerService.user.id+"/groups/"+t.groupId+"/baskets/"+t.basketId])}toggleFreezing(t){this.http.put("../rest/archival/freezeRetentionRule",{resources:this.selectedRes,freeze:t}).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant(t?"lang.retentionRuleFrozen":"lang.retentionRuleUnfrozen")),this.refreshList()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}toogleBinding(t){this.http.put("../rest/archival/binding",{resources:this.selectedRes,binding:t}).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant(t?"lang.bindingMail":!1===t?"lang.noBindingMail":"lang.bindingUndefined")),this.refreshList()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}getFreezeBindingValue(){this.isSelectedFreeze=this.currentResource.retentionFrozen,this.isSelectedBinding=this.currentResource.binding}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(o.c),n.Qb(y.a),n.Qb(Dt.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-followed-action-list"]],viewQuery:function(t,e){var i;1&t&&n.Xc(ne.d,!0),2&t&&n.yc(i=n.ec())&&(e.contextMenu=i.first)},inputs:{selectedRes:"selectedRes",totalRes:"totalRes",contextMode:"contextMode",currentFolderInfo:"currentFolderInfo",currentResource:"currentResource",menuShortcut:"menuShortcut"},outputs:{triggerEvent:"triggerEvent",refreshEvent:"refreshEvent",refreshPanelFolders:"refreshPanelFolders"},decls:50,vars:70,consts:[["mat-stroked-button","",3,"matMenuTriggerFor",4,"ngIf"],["style","position: fixed;",3,"matMenuTriggerFor","left","top",4,"ngIf"],["menu","matMenu"],["style","text-align: center;font-size: 10px;color: white;background: #135F7F;padding: 5px;font-weight: bold;",4,"ngIf"],["mat-menu-item","",3,"matMenuTriggerFor","menuOpened",4,"ngIf"],["baskets","matMenu"],[4,"ngFor","ngForOf"],["class","noAvailableBasket",4,"ngIf"],["mat-menu-item","",1,"followAction",3,"disabled","click"],[1,"far","fa-star","fa-2x"],["mat-menu-item","",3,"matMenuTriggerFor","disabled","title",4,"ngIf"],["ng-switch","getValue(var)"],["freezeRentalRule","matMenu"],["mat-menu-item","",3,"title","click"],["bindingRentalRule","matMenu"],["mat-menu-item","",3,"title","innerHTML","click"],[3,"resIds","currentFolders","refreshList","refreshFolders"],["mat-stroked-button","",3,"matMenuTriggerFor"],["matSuffix","",1,"fa","fa-caret-down"],[2,"position","fixed",3,"matMenuTriggerFor"],["menu2",""],[2,"text-align","center","font-size","10px","color","white","background","#135F7F","padding","5px","font-weight","bold"],["mat-menu-item","",3,"matMenuTriggerFor","menuOpened"],[1,"basketGroupName"],["mat-menu-item","","class","labelBasket",3,"title","click",4,"ngIf"],["mat-menu-item","",1,"labelBasket",3,"title","click"],[1,"noAvailableBasket"],["mat-menu-item","",3,"matMenuTriggerFor","disabled","title"],[1,"freezeIcon","fas","fa-snowflake",2,"font-size","20px"],[1,"bindidngIcon","fas","fa-exclamation",2,"font-size","20px"]],template:function(t,e){1&t&&(n.Oc(0,$w,4,4,"button",0),n.Oc(1,Hw,2,5,"span",1),n.Wb(2,"mat-menu",null,2),n.Oc(4,Gw,2,1,"div",3),n.Oc(5,Xw,4,4,"button",4),n.Wb(6,"mat-menu",null,5),n.Oc(8,Yw,5,5,"ng-container",6),n.ic(9,"sortBy"),n.Oc(10,Jw,3,3,"div",7),n.Vb(),n.Rb(11,"mat-divider"),n.Wb(12,"button",8),n.dc("click",(function(){return e.unFollow()})),n.Rb(13,"mat-icon",9),n.Wb(14,"span"),n.Qc(15),n.ic(16,"translate"),n.Vb(),n.Vb(),n.Rb(17,"mat-divider"),n.Oc(18,Zw,6,8,"button",10),n.Wb(19,"mat-menu",11,12),n.Wb(21,"button",13),n.dc("click",(function(){return e.toggleFreezing(!0)})),n.ic(22,"translate"),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Rb(25,"mat-divider"),n.Wb(26,"button",13),n.dc("click",(function(){return e.toggleFreezing(!1)})),n.ic(27,"translate"),n.Qc(28),n.ic(29,"translate"),n.Vb(),n.Vb(),n.Oc(30,tM,6,8,"button",10),n.Wb(31,"mat-menu",null,14),n.Wb(33,"buton",15),n.dc("click",(function(){return e.toogleBinding(!0)})),n.ic(34,"stripTags"),n.ic(35,"translate"),n.ic(36,"translate"),n.Vb(),n.Rb(37,"mat-divider"),n.Wb(38,"buton",15),n.dc("click",(function(){return e.toogleBinding(!1)})),n.ic(39,"stripTags"),n.ic(40,"translate"),n.ic(41,"translate"),n.Vb(),n.Rb(42,"mat-divider"),n.Wb(43,"buton",13),n.dc("click",(function(){return e.toogleBinding(null)})),n.ic(44,"translate"),n.Qc(45),n.ic(46,"translate"),n.Vb(),n.Rb(47,"mat-divider"),n.Vb(),n.Rb(48,"mat-divider"),n.Wb(49,"folder-menu",16),n.dc("refreshList",(function(){return e.refreshList()}))("refreshFolders",(function(){return e.refreshFolders()})),n.Vb(),n.Vb()),2&t&&(n.oc("ngIf",!e.contextMode),n.Db(1),n.oc("ngIf",e.contextMode),n.Db(1),n.Fb("actionListMenu"),n.Db(2),n.oc("ngIf",e.contextMode&&1==e.selectedRes.length),n.Db(1),n.oc("ngIf",1==e.selectedRes.length),n.Db(1),n.Fb("folderListMenu"),n.Db(2),n.oc("ngForOf",n.kc(9,41,e.basketList.groups,"groupName")),n.Db(2),n.oc("ngIf",0==e.basketList.groups.length),n.Db(2),n.oc("disabled",0===e.selectedRes.length),n.Db(3),n.Rc(n.jc(16,44,"lang.untrackThisMail")),n.Db(3),n.oc("ngIf",e.privilegeService.hasCurrentUserPrivilege("freeze_retention_rule")),n.Db(3),n.Fb(!0===e.isSelectedFreeze?"isSelectedMenu":"notSelectedMenu"),n.oc("title",n.jc(22,46,"lang.freezeTheCurrentUsefulLife")),n.Db(2),n.Sc(" ",n.jc(24,48,"lang.freezeTheCurrentUsefulLife")," "),n.Db(3),n.Fb(!1===e.isSelectedFreeze?"isSelectedMenu":"notSelectedMenu"),n.oc("title",n.jc(27,50,"lang.unfreezeTheCurrentUsefulLife")),n.Db(2),n.Sc(" ",n.jc(29,52,"lang.unfreezeTheCurrentUsefulLife")," "),n.Db(2),n.oc("ngIf",e.privilegeService.hasCurrentUserPrivilege("set_binding_document")),n.Db(3),n.Fb(!0===e.isSelectedBinding?"isSelectedMenu":"notSelectedMenu"),n.oc("title",n.jc(34,54,n.jc(35,56,"lang.bindingMail")))("innerHTML",n.jc(36,58,"lang.bindingMail"),n.Ec),n.Db(5),n.Fb(!1===e.isSelectedBinding?"isSelectedMenu":"notSelectedMenu"),n.oc("title",n.jc(39,60,n.jc(40,62,"lang.noBindingMail")))("innerHTML",n.jc(41,64,"lang.noBindingMail"),n.Ec),n.Db(5),n.Fb(null===e.isSelectedBinding?"isSelectedMenu":"notSelectedMenu"),n.oc("title",n.jc(44,66,"lang.doNotDefine")),n.Db(2),n.Sc(" ",n.jc(46,68,"lang.doNotDefine"),""),n.Db(4),n.oc("resIds",e.selectedRes)("currentFolders",e.folderList))},directives:[P.t,ne.e,P.s,T.a,ne.b,S.a,Uw,k.b,ne.d,Y.j],pipes:[Wt.a,g.d,Tt.r],styles:[".mat-icon[_ngcontent-%COMP%]{height:auto}.mat-stroked-button[_ngcontent-%COMP%]{border-radius:20px;border-color:#135f7f;color:#135f7f} .actionListMenu .mat-menu-content{padding-top:0;padding-bottom:0}.followAction[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{font-size:20px;color:#8e3e52}.basketGroupName[_ngcontent-%COMP%]{color:#135f7f;padding-left:10px;padding-right:10px}.labelBasket[_ngcontent-%COMP%]{color:#666;font-size:12px;font-weight:700}.noAvailableBasket[_ngcontent-%COMP%]{text-align:center;font-size:12px;opacity:.5;font-style:italic;padding:22px}.freezeIcon[_ngcontent-%COMP%]{color:#135f7f}.bindidngIcon[_ngcontent-%COMP%]{color:#135f7f;margin-left:5px}.isSelectedMenu[_ngcontent-%COMP%]{background:#f99830}.notSelectedMenu[_ngcontent-%COMP%]{background:#fff}"]}),t})();const iM=["appDiffusionsList"],nM=["appVisaWorkflow"],aM=["appAvisWorkflow"],sM=["appNotesList"],oM=["appAttachmentsList"],rM=function(t){return{color:t}};function cM(t,e){if(1&t&&n.Rb(0,"mat-icon",10),2&t){const t=n.hc(2);n.Hb("",t.currentResource.statusImage.charAt(0),"",t.currentResource.statusImage.charAt(1)," ",t.currentResource.statusImage," ",t.currentResource.statusImage.charAt(0),"",t.currentResource.statusImage.charAt(1),"-2x"),n.oc("ngStyle",n.vc(8,rM,t.currentResource.priorityColor))}}function lM(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab-group",11),n.dc("selectedIndexChange",(function(e){return n.Dc(t),n.hc(2).selectedDiffusionTab=e})),n.Wb(1,"mat-tab",12),n.ic(2,"translate"),n.Rb(3,"app-diffusions-list",13,14),n.Vb(),n.Wb(5,"mat-tab",15),n.ic(6,"translate"),n.Rb(7,"app-visa-workflow",16,17),n.Vb(),n.Wb(9,"mat-tab",15),n.ic(10,"translate"),n.Rb(11,"app-avis-workflow",16,18),n.Vb(),n.Vb()}if(2&t){const t=n.zc(8),e=n.zc(12),i=n.hc(2);n.oc("selectedIndex",i.selectedDiffusionTab),n.Db(1),n.pc("label",n.jc(2,11,"lang.diffusionList")),n.Db(2),n.oc("adminMode",!1),n.Db(2),n.pc("label",n.jc(6,13,"lang.visaWorkflow")),n.oc("disabled",0==t.getVisaCount()),n.Db(2),n.oc("adminMode",!1)("injectDatas",i.injectDatasParam),n.Db(2),n.pc("label",n.jc(10,15,"lang.avis")),n.oc("disabled",0==e.getAvisCount()),n.Db(2),n.oc("adminMode",!1)("injectDatas",i.injectDatasParam)}}function dM(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-notes-list",19,20),n.dc("reloadBadgeNotes",(function(e){return n.Dc(t),n.hc(2).reloadBadgeNotes(e)})),n.Vb()}if(2&t){const t=n.hc(2);n.oc("editMode",!0)("injectDatas",t.injectDatasParam)}}function hM(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-attachments-list",21,22),n.dc("reloadBadgeAttachments",(function(e){return n.Dc(t),n.hc(2).reloadBadgeAttachments(e)})),n.Vb()}if(2&t){const t=n.hc(2);n.oc("injectDatas",t.injectDatasParam)}}function uM(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div",1),n.Rb(2,"mat-icon",2),n.Vb(),n.Wb(3,"div",3),n.Oc(4,cM,1,10,"mat-icon",4),n.Qc(5,"\xa0"),n.Rb(6,"span",5),n.Vb(),n.Rb(7,"div",6),n.ic(8,"stripTags"),n.ic(9,"shorten"),n.Oc(10,lM,13,17,"mat-tab-group",7),n.Oc(11,dM,2,2,"app-notes-list",8),n.Oc(12,hM,2,1,"app-attachments-list",9),n.Tb()),2&t){const t=n.hc();n.Db(2),n.qc("fontIcon","",t.icon," fa-2x"),n.Db(2),n.oc("ngIf",void 0!==t.currentResource.statusImage),n.Db(2),n.oc("innerHTML",t.currentResource.chrono,n.Ec),n.Db(1),n.pc("title",n.jc(8,8,t.currentResource.subject)),n.oc("innerHTML",n.lc(9,10,t.currentResource.subject,50,"..."),n.Ec),n.Db(3),n.oc("ngIf","diffusion"==t.mode),n.Db(1),n.oc("ngIf","note"==t.mode),n.Db(1),n.oc("ngIf","attachment"==t.mode)}}let pM=(()=>{class t{constructor(t){this.translate=t,this.loading=!1,this.selectedDiffusionTab=0,this.injectDatasParam={resId:0,editable:!1},this.currentResource={},this.refreshBadgeNotes=new n.o,this.refreshBadgeAttachments=new n.o}ngOnInit(){}loadComponent(t,e){this.mode=t,this.currentResource=e,this.injectDatasParam.resId=this.currentResource.resId,"diffusion"===t?setTimeout(()=>{this.icon="fa-sitemap",this.selectedDiffusionTab=0,this.injectDatasParam.resId=this.currentResource.resId,this.appDiffusionsList.loadListinstance(this.currentResource.resId),this.appVisaWorkflow.loadWorkflow(this.currentResource.resId),this.appAvisWorkflow.loadWorkflow(this.currentResource.resId)},0):"note"===t?(setTimeout(()=>{this.icon="fa-comments",this.appNotesList.loadNotes(this.currentResource.resId)},0),setTimeout(()=>{$("textarea").focus()},200)):"attachment"===t&&setTimeout(()=>{this.icon="fa-paperclip",this.appAttachmentsList.loadAttachments(this.currentResource.resId)},0)}reloadBadgeNotes(t){this.refreshBadgeNotes.emit(t)}reloadBadgeAttachments(t){this.refreshBadgeAttachments.emit(t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-panel-list"]],viewQuery:function(t,e){var i;1&t&&(n.Xc(iM,!0),n.Xc(nM,!0),n.Xc(aM,!0),n.Xc(sM,!0),n.Xc(oM,!0)),2&t&&(n.yc(i=n.ec())&&(e.appDiffusionsList=i.first),n.yc(i=n.ec())&&(e.appVisaWorkflow=i.first),n.yc(i=n.ec())&&(e.appAvisWorkflow=i.first),n.yc(i=n.ec())&&(e.appNotesList=i.first),n.yc(i=n.ec())&&(e.appAttachmentsList=i.first))},outputs:{refreshBadgeNotes:"refreshBadgeNotes",refreshBadgeAttachments:"refreshBadgeAttachments"},decls:1,vars:1,consts:[[4,"ngIf"],[2,"font-size","60px","opacity","0.1","padding-bottom","30px","text-align","center"],["fontSet","fas",3,"fontIcon"],[2,"position","sticky","top","0px","background","white","z-index","1","display","flex","justify-content","center","align-items","center","color","#666","padding","10px"],["style","width: auto;","color","primary",3,"ngStyle","class",4,"ngIf"],[3,"innerHTML"],[2,"text-align","center","font-weight","bold","margin-bottom","30px","padding-left","10px","padding-right","10px",3,"title","innerHTML"],["class","diffusionTab",3,"selectedIndex","selectedIndexChange",4,"ngIf"],[3,"editMode","injectDatas","reloadBadgeNotes",4,"ngIf"],[3,"injectDatas","reloadBadgeAttachments",4,"ngIf"],["color","primary",2,"width","auto",3,"ngStyle"],[1,"diffusionTab",3,"selectedIndex","selectedIndexChange"],[3,"label"],[3,"adminMode"],["appDiffusionsList",""],[3,"label","disabled"],[3,"adminMode","injectDatas"],["appVisaWorkflow",""],["appAvisWorkflow",""],[3,"editMode","injectDatas","reloadBadgeNotes"],["appNotesList",""],[3,"injectDatas","reloadBadgeAttachments"],["appAttachmentsList",""]],template:function(t,e){1&t&&n.Oc(0,uM,13,14,"ng-container",0),2&t&&n.oc("ngIf",void 0!==e.currentResource.resId)},directives:[P.t,S.a,P.w,Te.c,Te.a,im,Ko,Qv,kC,Sg],pipes:[Tt.r,Tt.p,g.d],styles:[""]}),t})();const bM=["filterTemplate"],fM=["toolTemplate"],mM=["panelTemplate"],gM=["adminMenuTemplate"],vM=["actionsListContext"],_M=["appPanelList"],yM=["appFilterToolAdvSearch"],xM=["tableBasketListSort"],CM=["basketHome"];function OM(t,e){if(1&t&&(n.Rb(0,"img",25),n.ic(1,"async"),n.ic(2,"secureUrl")),2&t){const t=n.hc();n.oc("src",n.jc(1,1,n.jc(2,3,t.thumbnailUrl)),n.Gc)}}function DM(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-filter-tool-adv-search",27,28),n.dc("filterChanged",(function(){return n.Dc(t),n.hc(2).launchSearch()})),n.Vb()}if(2&t){const t=n.hc(2);n.oc("filters",t.dataFilters)("isLoadingResults",t.isLoadingResults)}}function wM(t,e){if(1&t&&n.Oc(0,DM,2,2,"app-filter-tool-adv-search",26),2&t){const t=n.hc();n.oc("ngIf",!t.hideFilter)}}function MM(t,e){if(1&t&&(n.Wb(0,"mat-option",43),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",n.jc(2,2,"lang."+t.id)," ")}}function kM(t,e){1&t&&n.Rb(0,"mat-icon",44)}function SM(t,e){1&t&&n.Rb(0,"mat-icon",45)}function IM(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",46),n.dc("click",(function(){return n.Dc(t),n.hc(2).removeCriteria("_ALL")})),n.ic(1,"translate"),n.Rb(2,"i",47),n.Vb()}2&t&&n.pc("title",n.jc(1,1,"lang.eraseAllFilters"))}function PM(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",49),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc(2).$implicit;return n.hc(2).removeCriteria(a.key,i)})),n.Rb(1,"i",50),n.Qc(2),n.Rb(3,"i",51),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2).$implicit,a=n.hc(2);n.oc("title",a.appCriteriaTool.getLabelValue(i.key,t)),n.Db(1),n.Gb("fa ",a.indexingFieldService.getField(i.key).icon,""),n.oc("title",a.indexingFieldService.getField(i.key).label),n.Db(1),n.Sc("\xa0",a.appCriteriaTool.getLabelValue(i.key,t),"\xa0")}}function VM(t,e){if(1&t&&(n.Ub(0),n.Oc(1,PM,4,6,"span",48),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngForOf",t.value.values)}}function RM(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"span",49),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).removeCriteria(e.key)})),n.Rb(2,"i",50),n.Qc(3),n.Rb(4,"i",51),n.Vb(),n.Tb()}if(2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(1),n.oc("title",e.appCriteriaTool.getLabelValues(t.key,t.value.values)),n.Db(1),n.Gb("fa ",e.indexingFieldService.getField(t.key).icon,""),n.oc("title",e.indexingFieldService.getField(t.key).label),n.Db(1),n.Sc("\xa0",t.value.values.length," valeurs\xa0")}}function jM(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"span",49),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).removeCriteria(e.key)})),n.Rb(2,"i",50),n.Qc(3),n.Rb(4,"i",51),n.Vb(),n.Tb()}if(2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(1),n.oc("title",e.appCriteriaTool.getFormatLabel(t.key,t.value.values)),n.Db(1),n.Gb("fa ",e.indexingFieldService.getField(t.key).icon,""),n.oc("title",e.indexingFieldService.getField(t.key).label),n.Db(1),n.Sc("\xa0",e.appCriteriaTool.getFormatLabel(t.key,t.value.values),"\xa0")}}function AM(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"span",49),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).removeCriteria(e.key)})),n.Qc(2),n.Rb(3,"i",51),n.Vb(),n.Tb()}if(2&t){const t=n.hc().$implicit;n.Db(1),n.oc("title","meta"),n.Db(1),n.Sc("",t.value.values,"\xa0")}}function WM(t,e){if(1&t&&(n.Ub(0),n.Oc(1,VM,2,1,"ng-container",8),n.Oc(2,RM,5,6,"ng-container",8),n.Oc(3,jM,5,6,"ng-container",8),n.Oc(4,AM,4,2,"ng-container",8),n.Tb()),2&t){const t=e.$implicit,i=n.hc(2);n.Db(1),n.oc("ngIf",i.isArrayType(t.value.values)&&t.value.values.length<=3),n.Db(1),n.oc("ngIf",i.isArrayType(t.value.values)&&t.value.values.length>3),n.Db(1),n.oc("ngIf",!i.isArrayType(t.value.values)&&"meta"!==t.key),n.Db(1),n.oc("ngIf",!i.isArrayType(t.value.values)&&"meta"===t.key)}}function TM(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",29),n.Rb(1,"div",30),n.Wb(2,"div",31),n.Wb(3,"mat-form-field",32),n.Rb(4,"mat-icon",33),n.Wb(5,"mat-select",34),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().listProperties.order=e}))("selectionChange",(function(){return n.Dc(t),n.hc().updateFilters()})),n.Oc(6,MM,3,4,"mat-option",35),n.Vb(),n.Vb(),n.Vb(),n.Wb(7,"div",36),n.Wb(8,"button",37),n.dc("click",(function(){return n.Dc(t),n.hc().changeOrderDir()})),n.ic(9,"translate"),n.ic(10,"translate"),n.Oc(11,kM,1,0,"mat-icon",38),n.Oc(12,SM,1,0,"mat-icon",39),n.Vb(),n.Vb(),n.Vb(),n.Wb(13,"div",40),n.Oc(14,IM,3,3,"span",41),n.Oc(15,WM,5,4,"ng-container",42),n.ic(16,"keyvalue"),n.Vb()}if(2&t){const t=n.hc();n.Db(5),n.oc("ngModel",t.listProperties.order)("disabled",t.isLoadingResults||0===t.data.length),n.Db(1),n.oc("ngForOf",t.displayColsOrder),n.Db(2),n.Lc("opacity",""==t.listProperties.order?"0.2":"1"),n.oc("disabled",""==t.listProperties.order||t.isLoadingResults||0===t.data.length)("title","DESC"==t.listProperties.orderDir?n.jc(9,11,"lang.descOrder"):n.jc(10,13,"lang.ascOrder")),n.Db(3),n.oc("ngIf","DESC"==t.listProperties.orderDir),n.Db(1),n.oc("ngIf","ASC"==t.listProperties.orderDir),n.Db(2),n.oc("ngIf",!t.emptyCriteria()),n.Db(1),n.oc("ngForOf",n.jc(16,15,t.criteria))}}function EM(t,e){1&t&&n.Rb(0,"mat-spinner")}function FM(t,e){if(1&t&&(n.Wb(0,"div",52),n.Oc(1,EM,1,0,"mat-spinner",8),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.isLoadingResults)}}function LM(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-checkbox",53),n.dc("change",(function(e){return n.Dc(t),n.hc().toggleAllRes(e)})),n.ic(1,"translate"),n.Vb()}if(2&t){const t=n.hc();n.pc("title",n.jc(1,3,"lang.selectAllResInBasket")),n.oc("checked",t.selectedRes.length==t.resultsLength&&t.selectedRes.length>0)("indeterminate",t.selectedRes.length>0&&t.selectedRes.length<t.resultsLength)}}function QM(t,e){if(1&t&&(n.Wb(0,"small"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("- ",t.selectedRes.length," ",n.jc(2,2,"lang.selected"),"")}}function NM(t,e){if(1&t&&n.Rb(0,"div",54),2&t){n.hc();const t=n.zc(20);n.oc("matMenuTriggerFor",t)}}function zM(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",55),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc().goToPage(i)})),n.Qc(1),n.Vb()}if(2&t){const t=e.index;n.Db(1),n.Rc(t+1)}}function BM(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span"),n.Wb(1,"app-followed-action-list",56,17),n.dc("refreshEvent",(function(){return n.Dc(t),n.hc().refreshDaoAfterAction()})),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(1),n.oc("contextMode",!1)("currentFolderInfo",t.folderInfo)("totalRes",t.resultsLength)("selectedRes",t.selectedRes)}}function UM(t,e){if(1&t&&(n.Ub(0),n.Rb(1,"i",75),n.ic(2,"translate"),n.Qc(3,"\xa0"),n.Rb(4,"span",76),n.ic(5,"timeAgo"),n.ic(6,"fullDate"),n.Qc(7," - "),n.Rb(8,"i",77),n.ic(9,"translate"),n.Qc(10,"\xa0"),n.Rb(11,"span",76),n.ic(12,"timeAgo"),n.ic(13,"fullDate"),n.Tb()),2&t){const t=n.hc(2).$implicit,e=n.hc(2).$implicit;n.Db(1),n.pc("title",n.jc(2,10,"lang.creationDate")),n.Db(3),n.Ib("highlightResult",t.displayValue.creationDateHighlighted),n.pc("title",n.jc(6,14,t.displayValue.creationDate)),n.oc("innerHTML",n.jc(5,12,t.displayValue.creationDate),n.Ec),n.Db(4),n.pc("title",n.jc(9,16,"lang.closingDate")),n.Db(3),n.Ib("highlightResult",t.displayValue.closingDateHighlighted),n.pc("title",n.jc(13,20,e.closing_date)),n.oc("innerHTML",n.jc(12,18,e.closing_date),n.Ec)}}function $M(t,e){if(1&t&&(n.Ub(0),n.Rb(1,"i",75),n.ic(2,"translate"),n.Qc(3,"\xa0"),n.Rb(4,"span",76),n.ic(5,"timeAgo"),n.ic(6,"fullDate"),n.Qc(7," - "),n.Rb(8,"i",78),n.ic(9,"translate"),n.Qc(10,"\xa0"),n.Rb(11,"span",76),n.ic(12,"timeLimit"),n.ic(13,"fullDate"),n.Tb()),2&t){const t=n.hc(2).$implicit;n.Db(1),n.pc("title",n.jc(2,10,"lang.creationDate")),n.Db(3),n.Ib("highlightResult",t.displayValue.creationDateHighlighted),n.pc("title",n.jc(6,14,t.displayValue.creationDate)),n.oc("innerHTML",n.jc(5,12,t.displayValue.creationDate),n.Ec),n.Db(4),n.pc("title",n.jc(9,16,"lang.processLimitDate")),n.Db(3),n.Ib("highlightResult",t.displayValue.processLimitDateHighlighted),n.pc("title",n.jc(13,20,t.displayValue.processLimitDate)),n.oc("innerHTML",n.jc(12,18,t.displayValue.processLimitDate),n.Ec)}}function HM(t,e){if(1&t&&(n.Ub(0),n.Oc(1,UM,14,22,"ng-container",8),n.ic(2,"translate"),n.Oc(3,$M,14,22,"ng-container",8),n.ic(4,"translate"),n.Tb()),2&t){const t=n.hc(3).$implicit;n.Db(1),n.oc("ngIf",t.closing_date!=n.jc(2,2,"lang.undefined")),n.Db(2),n.oc("ngIf",t.closing_date==n.jc(4,4,"lang.undefined"))}}function GM(t,e){if(1&t&&(n.Ub(0),n.Rb(1,"i",50),n.Qc(2," \xa0 "),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Gb("fa ",t.icon,""),n.pc("title",t.label)}}function XM(t,e){if(1&t&&(n.Wb(0,"span",81),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2).$implicit;n.qc("title","id: ",t.displayValue,""),n.Db(1),n.Rc(n.jc(2,2,"lang.undefined"))}}function qM(t,e){if(1&t&&(n.Wb(0,"span",50),n.ic(1,"translate"),n.Qc(2),n.ic(3,"translate"),n.Vb()),2&t){const t=n.hc(2).$implicit;n.pc("title",n.jc(1,2,"lang."+t.displayValue)),n.Db(2),n.Rc(n.jc(3,4,"lang."+t.displayValue))}}function KM(t,e){if(1&t&&(n.Ub(0),n.Oc(1,XM,3,4,"span",79),n.ic(2,"translate"),n.Oc(3,qM,4,6,"span",80),n.ic(4,"translate"),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",!n.jc(2,2,"lang."+t.displayValue)),n.Db(2),n.oc("ngIf",n.jc(4,4,"lang."+t.displayValue))}}function YM(t,e){if(1&t&&n.Rb(0,"span",84),2&t){const t=n.hc(2).$implicit;n.pc("title",t.displayTitle),n.oc("innerHTML",t.displayValue,n.Ec)}}function JM(t,e){if(1&t&&(n.Rb(0,"span",85),n.ic(1,"timeAgo")),2&t){const t=n.hc(2).$implicit;n.oc("innerHTML",n.jc(1,1,t.displayValue),n.Ec)}}function ZM(t,e){if(1&t&&(n.Ub(0),n.Oc(1,YM,1,2,"span",82),n.Oc(2,JM,2,3,"span",83),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",!t.value.includes("Date")),n.Db(1),n.oc("ngIf",t.value.includes("Date"))}}function tk(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",74),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc(2).$implicit;return n.hc().launchEventSubData(i,a)})),n.ic(1,"translate"),n.Oc(2,HM,5,6,"ng-container",8),n.Oc(3,GM,3,4,"ng-container",8),n.Oc(4,KM,5,6,"ng-container",8),n.Oc(5,ZM,3,2,"ng-container",8),n.Vb()}if(2&t){const t=e.$implicit;n.Fb(t.cssClasses.join(" ")),n.Ib("hasEvent",t.event&&t.displayValue!==n.jc(1,8,"lang.undefined")),n.Db(2),n.oc("ngIf","getCreationAndProcessLimitDates"==t.value),n.Db(1),n.oc("ngIf",""!=t.icon),n.Db(1),n.oc("ngIf","getCategory"==t.value),n.Db(1),n.oc("ngIf","getCategory"!=t.value&&"getCreationAndProcessLimitDates"!=t.value)}}function ek(t,e){if(1&t&&(n.Wb(0,"div",72),n.Oc(1,tk,6,10,"span",73),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc();n.Gb("sub-info column-",e.templateColumns,"-list"),n.Db(1),n.oc("ngForOf",t.display)}}const ik=function(t){return{color:t}};function nk(t,e){if(1&t&&n.Rb(0,"mat-icon",86),2&t){const t=n.hc().$implicit;n.Hb("",t.statusImage.charAt(0),"",t.statusImage.charAt(1)," ",t.statusImage," ",t.statusImage.charAt(0),"",t.statusImage.charAt(1),"-2x"),n.pc("title",t.statusLabel),n.oc("ngStyle",n.vc(9,ik,t.priorityColor))}}function ak(t,e){1&t&&(n.Wb(0,"span",87),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.confidential")))}function sk(t,e){if(1&t&&(n.Rb(0,"mat-icon",88),n.ic(1,"translate")),2&t){const t=n.hc().$implicit;n.rc("title","",n.jc(1,2,"lang.warnLockResInProgress")," : ",t.locker,"")}}function ok(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"span",90),n.Rb(2,"i",91),n.ic(3,"translate"),n.Qc(4,"\xa0"),n.Rb(5,"span",84),n.Vb(),n.Tb()),2&t){const t=n.hc(2).$implicit;n.Db(2),n.pc("title",n.jc(3,3,"lang.barcode")),n.Db(3),n.pc("title",t.barcode_title),n.oc("innerHTML",t.barcode,n.Ec)}}function rk(t,e){if(1&t&&(n.Ub(0),n.Rb(1,"span",84),n.Tb()),2&t){const t=n.hc(2).$implicit;n.Db(1),n.pc("title",t.chrono_title),n.oc("innerHTML",t.chrono,n.Ec)}}function ck(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",89),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc().launch(e)})),n.Oc(1,ok,6,5,"ng-container",8),n.ic(2,"translate"),n.ic(3,"translate"),n.Oc(4,rk,2,2,"ng-container",8),n.ic(5,"translate"),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",t.chrono==n.jc(2,2,"lang.undefined")&&t.barcode!=n.jc(3,4,"lang.undefined")),n.Db(3),n.oc("ngIf",t.chrono!=n.jc(5,6,"lang.undefined"))}}const lk=function(t){return[t]};function dk(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",99),n.dc("click",(function(e){n.Dc(t);const i=n.hc(2).$implicit,a=n.hc();return e.stopPropagation(),a.viewDocument(i)}))("mouseenter",(function(){n.Dc(t);const e=n.hc(2).$implicit;return n.hc().viewThumbnail(e)}))("mouseleave",(function(){return n.Dc(t),n.hc(3).closeThumbnail()})),n.ic(1,"translate"),n.ic(2,"translate"),n.Rb(3,"mat-icon",100),n.Vb()}if(2&t){const t=n.hc(2).$implicit;n.pc("title",t.hasDocument?n.jc(1,3,"lang.viewResource"):n.jc(2,5,"lang.noDocument")),n.oc("disabled",!t.hasDocument),n.Db(3),n.oc("ngClass",n.vc(7,lk,t.hasDocument?"fa-eye":"fa-eye-slash"))}}function hk(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",93),n.dc("click",(function(e){n.Dc(t);const i=n.hc(2).$implicit,a=n.hc();return e.stopPropagation(),a.goToDetail(i)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",101),n.Vb()}if(2&t){const t=n.hc(2).$implicit;n.Ib("highlightResult",t.inDocument),n.pc("title",n.jc(1,3,"lang.linkDetails"))}}function uk(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",92),n.Wb(1,"button",93),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc();return e.stopPropagation(),a.togglePanel("note",i)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",94),n.Vb(),n.Wb(4,"button",93),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc();return e.stopPropagation(),a.togglePanel("attachment",i)})),n.ic(5,"translate"),n.Rb(6,"mat-icon",95),n.Vb(),n.Wb(7,"button",93),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc();return e.stopPropagation(),a.togglePanel("diffusion",i)})),n.ic(8,"translate"),n.Rb(9,"mat-icon",96),n.Vb(),n.Oc(10,dk,4,9,"button",97),n.Oc(11,hk,3,5,"button",98),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc();n.Db(1),n.Ib("highlightResultIcon",t.inNotes)("noData",0==t.countNotes),n.pc("title",n.jc(2,22,"lang.notes")),n.Db(2),n.pc("matBadgeHidden",0==t.countNotes),n.pc("matBadge",t.countNotes),n.oc("color",e.sidenavRight.opened&&t.checked&&"note"==e.currentMode?"primary":""),n.Db(1),n.Ib("highlightResultIcon",t.inAttachments)("noData",0==t.countAttachments),n.pc("title",n.jc(5,24,"lang.attachments")),n.Db(2),n.pc("matBadgeHidden",0==t.countAttachments),n.pc("matBadge",t.countAttachments),n.oc("color",e.sidenavRight.opened&&t.checked&&"attachment"==e.currentMode?"primary":""),n.Db(1),n.Ib("highlightResultIcon",t.inDiffusions),n.pc("title",n.jc(8,26,"lang.diffusionList")),n.Db(2),n.oc("color",e.sidenavRight.opened&&t.checked&&"diffusion"==e.currentMode?"primary":""),n.Db(1),n.oc("ngIf",!e.appService.getViewMode()),n.Db(1),n.oc("ngIf",!e.appService.getViewMode())}}function pk(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",104),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(3);return i.stopPropagation(),s.goToFolder(a)})),n.ic(1,"translate"),n.Rb(2,"i",105),n.Qc(3),n.Vb()}if(2&t){const t=e.$implicit;n.rc("title","",n.jc(1,3,"lang.goToFolder")," : ",t.label,""),n.Db(3),n.Sc(" ",t.label,"")}}function bk(t,e){if(1&t&&(n.Wb(0,"div",102),n.Oc(1,pk,4,5,"span",103),n.ic(2,"sortBy"),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngForOf",n.kc(2,1,t.folders,"label"))}}function fk(t,e){if(1&t){const t=n.Xb();n.Wb(0,"td",57),n.Oc(1,ek,2,4,"div",58),n.Wb(2,"div",59),n.Wb(3,"span",60),n.Wb(4,"mat-checkbox",61),n.dc("change",(function(i){n.Dc(t);const a=e.$implicit;return n.hc().toggleRes(i,a)}))("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.Vb(),n.Vb(),n.Wb(5,"button",62),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc();return i.stopPropagation(),s.toggleMailTracking(a)})),n.ic(6,"translate"),n.ic(7,"translate"),n.Rb(8,"mat-icon",63),n.Vb(),n.Wb(9,"span",64),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().launch(i)})),n.Oc(10,nk,1,11,"mat-icon",65),n.Oc(11,ak,3,3,"span",66),n.Oc(12,sk,2,4,"mat-icon",67),n.Vb(),n.Oc(13,ck,6,8,"span",68),n.Wb(14,"span",69),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().launch(i)})),n.ic(15,"translate"),n.Vb(),n.Oc(16,uk,12,28,"span",70),n.Vb(),n.Oc(17,bk,3,4,"div",71),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc();n.Db(1),n.oc("ngIf",!i.appService.getViewMode()&&t.display.length>0),n.Db(1),n.Ib("selected-data",t.checked),n.Db(2),n.oc("checked",t.checked),n.Db(1),n.oc("title",!0===t.mailTracking?n.jc(6,18,"lang.untrackThisMail"):n.jc(7,20,"lang.trackThisMail")),n.Db(3),n.oc("ngClass",n.vc(24,lk,!0===t.mailTracking?"fas fa-star":"far fa-star")),n.Db(1),n.Ib("highlightResultIcon",t.inStatus),n.Db(1),n.oc("ngIf",!0!==t.isLocked),n.Db(1),n.oc("ngIf","Y"===t.confidentiality),n.Db(1),n.oc("ngIf",!0===t.isLocked),n.Db(1),n.oc("ngIf",!i.appService.getViewMode()),n.Db(1),n.Ib("undefined",t.subject==n.jc(15,22,"lang.undefined")),n.pc("title",t.subject_title),n.oc("innerHTML",t.subject,n.Ec),n.Db(2),n.oc("ngIf",void 0!==i.sidenavRight),n.Db(1),n.oc("ngIf",void 0!==t.folders&&t.folders.length>0&&i.actionMode)}}function mk(t,e){1&t&&n.Rb(0,"div",109)}function gk(t,e){if(1&t&&(n.Wb(0,"div",110),n.Rb(1,"i",111),n.Rb(2,"br"),n.Qc(3),n.ic(4,"translate"),n.Wb(5,"b"),n.Qc(6),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(3),n.Sc(" ",n.jc(4,2,"lang.classifyInFolder")," : "),n.Db(3),n.Rc(t.chrono)}}function vk(t,e){if(1&t){const t=n.Xb();n.Wb(0,"tr",106),n.dc("contextmenu",(function(i){n.Dc(t);const a=e.$implicit;return n.hc().open(i,a)}))("cdkDragStarted",(function(){n.Dc(t);const i=e.$implicit;return n.hc().selectSpecificRes(i)})),n.Oc(1,mk,1,0,"div",107),n.Oc(2,gk,7,4,"div",108),n.Vb()}if(2&t){const t=e.$implicit;n.Ib("locked",1==t.isLocked),n.oc("cdkDragDisabled",!t.allowed)("cdkDragData",t)}}function _k(t,e){if(1&t&&n.Rb(0,"div",118),2&t){const t=n.hc(2);n.oc("matTooltip",t.currentChrono)("innerHTML",t.innerHtml,n.Ec)}}function yk(t,e){if(1&t){const t=n.Xb();n.Oc(0,_k,1,2,"div",112),n.Wb(1,"div",113),n.Wb(2,"button",114),n.dc("click",(function(){return n.Dc(t),n.hc().sidenavRight.close()})),n.Rb(3,"mat-icon",115),n.Vb(),n.Vb(),n.Wb(4,"app-panel-list",116,117),n.dc("refreshBadgeNotes",(function(e){return n.Dc(t),n.hc().refreshBadgeNotes(e)}))("refreshBadgeAttachments",(function(e){return n.Dc(t),n.hc().refreshBadgeAttachments(e)})),n.Vb(),n.Rb(6,"mat-divider")}if(2&t){const t=n.hc();n.oc("ngIf",t.innerHtml)}}function xk(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-followed-action-list",119,120),n.dc("refreshEvent",(function(){return n.Dc(t),n.hc().refreshDaoAfterAction()}))("refreshPanelFolders",(function(){return n.Dc(t),n.hc().foldersService.getFolders()})),n.Vb()}if(2&t){const t=n.hc();n.oc("contextMode",!0)("currentFolderInfo",t.folderInfo)("totalRes",t.resultsLength)("selectedRes",t.selectedRes)}}const Ck=function(){return[10,25,50,100,150]};let Ok=(()=>{class t{constructor(t,e,i,a,s,o,r,c,l,d,h,u,p,b,f,m,g,v){this._activatedRoute=t,this.translate=e,this.router=i,this.route=a,this.http=s,this.dialog=o,this.sanitizer=r,this.headerService=c,this.criteriaSearchService=l,this.notify=d,this.overlay=h,this.viewContainerRef=u,this.appService=p,this.foldersService=b,this.functions=f,this.indexingFieldService=m,this.highlightPipe=g,this.privilegeService=v,this.searchTerm="",this.actionMode=!0,this.singleSelection=!1,this.standalone=!1,this.hideFilter=!1,this.loadingResult=new n.o,this.loading=!0,this.initSearch=!1,this.docUrl="",this.searchUrl="../rest/search",this.criteria={},this.injectDatasParam={resId:0,editable:!1},this.currentResource={},this.filtersChange=new n.o,this.dragInit=!0,this.displayedColumnsBasket=["resId"],this.displayedMainData=[{value:"chrono",cssClasses:["softColorData","align_centerData","chronoData"],icon:""},{value:"subject",cssClasses:["longData"],icon:""}],this.data=[],this.resultsLength=0,this.isLoadingResults=!1,this.dataFilters={},this.listProperties={},this.currentChrono="",this.currentMode="",this.thumbnailUrl="",this.selectedRes=[],this.allResInBasket=[],this.selectedDiffusionTab=0,this.folderInfo={id:0,label:"",ownerDisplayName:"",entitiesSharing:[]},this.folderInfoOpened=!1,this.destroy$=new da.a,this.displayColsOrder=[{id:"destUser"},{id:"categoryId"},{id:"creationDate"},{id:"processLimitDate"},{id:"entityLabel"},{id:"subject"},{id:"chrono"},{id:"priority"},{id:"status"},{id:"typeLabel"}],this.currentSelectedChrono="",this.templateColumns=7,t.queryParams.subscribe(t=>{this.functions.empty(t.value)||(this.searchTerm=t.value,this.initSearch=!0,this.criteria={meta:{values:this.searchTerm}})})}ngOnInit(){this.functions.empty(this.searchTerm)||(this.initSearch=!0,this.criteria={meta:{values:this.searchTerm}}),this.headerService.sideBarAdmin=!0,this.isLoadingResults=!1,void 0!==this.toolTemplate&&this.headerService.initTemplate(this.toolTemplate,this.viewContainerRef,"toolTemplate"),void 0!==this.panelTemplate&&void 0!==this.sidenavRight&&this.headerService.initTemplate(this.panelTemplate,this.viewContainerRef,"panelTemplate"),void 0===this.filterTemplate||this.hideFilter||this.headerService.initTemplate(this.filterTemplate,this.viewContainerRef,"filterTemplate"),this.listProperties=this.criteriaSearchService.initListsProperties(this.headerService.user.id),this.loading=!1}initSavedCriteria(){if(Object.keys(this.listProperties.criteria).length>0){const t={query:[]};Object.keys(this.listProperties.criteria).forEach(e=>{const i={};i.identifier=e,i.values=this.listProperties.criteria[e].values,t.query.push(i)}),this.appCriteriaTool.selectSearchTemplate(t,!1),this.criteria=this.listProperties.criteria,this.functions.empty(this.listProperties.filters)||(this.dataFilters=this.listProperties.filters),this.initResultList()}else this.initSearch&&this.initResultList()}ngOnDestroy(){this.destroy$.next(!0)}launch(t){const e={checked:!0},i={checked:!1};this.actionMode?(t.checked=!0,this.toggleAllRes(i),this.toggleRes(e,t),this.router.navigate(["/resources/"+t.resId])):(t.checked=!t.checked,this.toggleRes(t.checked?e:i,t))}launchEventSubData(t,e){t.event&&["getSenders","getRecipients"].indexOf(t.value)>-1&&t.displayValue!==this.translate.instant("lang.undefined")&&this.openContact(e,"getSenders"===t.value?"senders":"recipients")}openContact(t,e){this.dialog.open(YD,{panelClass:"maarch-modal",data:{title:`${t.chrono} - ${t.subject}`,mode:e,resId:t.resId}})}launchSearch(t=this.criteria,e=!1){this.listProperties.page=0,this.listProperties.pageSize=0,e&&(this.dataFilters={}),this.criteria=JSON.parse(JSON.stringify(t)),this.initSearch?this.refreshDao():(this.initResultList(),this.initSearch=!0)}initResultList(){this.resultListDatabase=new Dk(this.http,this.criteriaSearchService),this.paginator.pageIndex=this.listProperties.page,this.paginator.pageSize=this.listProperties.pageSize,this.sort.sortChange.subscribe(()=>this.paginator.pageIndex=0),Object(gy.a)(this.sort.sortChange,this.paginator.page,this.filtersChange).pipe(Object(Zo.a)(this.destroy$),Object(Qe.a)({}),Object(ft.a)(()=>{if(!this.isLoadingResults)return this.data=[],void 0!==this.sidenavRight&&this.sidenavRight.close(),this.isLoadingResults=!0,this.loadingResult.emit(!0),this.resultListDatabase.getRepoIssues(this.sort.active,this.sort.direction,this.paginator.pageIndex,this.searchUrl,this.listProperties,this.paginator.pageSize,this.criteria,this.dataFilters)}),Object(l.a)(t=>(this.selectedRes=[],this.isLoadingResults=!1,this.loadingResult.emit(!1),t=this.processPostData(t),this.templateColumns=t.templateColumns,this.dataFilters=t.filters,this.criteriaSearchService.updateListsPropertiesFilters(t.filters),this.resultsLength=t.count,this.paginatorLength=t.count>1e4?1e4:t.count,this.allResInBasket=t.allResources,t.resources)),Object(m.a)(t=>(this.notify.handleErrors(t),this.selectedRes=[],this.data=[],this.resultsLength=0,this.paginatorLength=0,this.dataFilters={},this.allResInBasket=[],this.isLoadingResults=!1,this.loadingResult.emit(!1),this.initSearch=!1,Object(c.a)(!1)))).subscribe(t=>this.data=t)}goToPage(t){this.paginator.pageIndex=t,this.paginator.page.next({pageIndex:t,pageSize:this.paginator.pageSize,length:this.paginator.length})}goTo(t){this.docUrl==="../rest/resources/"+t.resId+"/content"&&this.sidenavRight.opened?this.sidenavRight.close():(this.docUrl="../rest/resources/"+t.resId+"/content",this.currentChrono=t.chrono,this.innerHtml=this.sanitizer.bypassSecurityTrustHtml("<iframe style='height:100%;width:100%;' src='"+this.docUrl+"' class='embed-responsive-item'></iframe>"),this.sidenavRight.open())}goToDetail(t){this.router.navigate(["/resources/"+t.resId])}goToFolder(t){this.router.navigate(["/folders/"+t.id])}togglePanel(t,e){e.checked=!0,this.toggleAllRes({checked:!1}),this.toggleRes({checked:!0},e),this.currentResource.resId===e.resId&&this.sidenavRight.opened&&this.currentMode===t?this.sidenavRight.close():(this.currentMode=t,this.currentResource=e,this.appPanelList.loadComponent(t,e),this.sidenavRight.open())}refreshBadgeNotes(t){this.currentResource.countNotes=t}refreshFolderInformations(){this.http.get("../rest/folders/"+this.folderInfo.id).subscribe(t=>{const e=[{keyword:"ALL_ENTITIES",text:this.translate.instant("lang.allEntities")}];this.folderInfo={id:t.folder.id,label:t.folder.label,ownerDisplayName:t.folder.ownerDisplayName,entitiesSharing:t.folder.sharing.entities.map(t=>this.functions.empty(t.label)?e.filter(e=>e.keyword===t.keyword)[0].text:t.label)},this.headerService.setHeader(this.folderInfo.label,"","fa fa-folder-open")})}refreshBadgeAttachments(t){this.currentResource.countAttachments=t}refreshDao(){this.paginator.pageIndex=this.listProperties.page,this.filtersChange.emit()}refreshDaoAfterAction(){this.sidenavRight.close(),this.refreshDao(),this.toggleAllRes({checked:!1})}viewThumbnail(t){t.hasDocument&&(this.thumbnailUrl="../rest/resources/"+t.resId+"/thumbnail",$("#viewThumbnail").show(),$("#listContent").css({overflow:"hidden"}))}closeThumbnail(){$("#viewThumbnail").hide(),$("#listContent").css({overflow:"auto"})}processPostData(t){return t.resources.forEach(t=>{Object.keys(this.criteria).filter(t=>t.indexOf("role_")>-1).length>0&&(t.inDiffusions=!0),Object.keys(t).forEach(e=>{t[e+"_title"]=t[e],"statusImage"===e&&null==t[e]?t[e]="fa-question undefined":null!=t[e]&&""!==t[e]||-1!==["closingDate","countAttachments","countNotes","display","mailTracking","hasDocument","binding"].indexOf(e)||(t[e]=this.translate.instant("lang.undefined")),Object.keys(this.criteria).indexOf(e)>-1?t[e]=this.highlightPipe.transform(t[e],this.criteria[e].values):["subject","chrono","resId"].indexOf(e)>-1&&Object.keys(this.criteria).indexOf("meta")>-1&&(t[e]=this.highlightPipe.transform(t[e],this.criteria.meta.values)),"countAttachments"===e&&Object.keys(this.criteria).indexOf("attachment_type")>-1&&(t.inAttachments=!0),"countNotes"===e&&Object.keys(this.criteria).indexOf("notes")>-1&&(t.inNotes=!0),"statusLabel"===e&&Object.keys(this.criteria).indexOf("status")>-1&&(t.inStatus=!0)}),t.display.forEach(t=>{if(t.event=!1,t.displayTitle=t.displayValue,null!=t.displayValue&&""!==t.displayValue||-1!==["getCreationAndProcessLimitDates","getParallelOpinionsNumber"].indexOf(t.value))if(["getSenders","getRecipients"].indexOf(t.value)>-1)t.event=!0,t.displayValue.length>1?(t.displayTitle=t.displayValue.join(" - "),t.displayValue="<b>"+t.displayValue.length+"</b> "+this.translate.instant("lang.contactsAlt")):t.displayValue=1===t.displayValue.length?t.displayValue[0]:this.translate.instant("lang.undefined");else if("getCreationAndProcessLimitDates"===t.value)t.icon="";else if("getVisaWorkflow"===t.value){let e=[],i="",n="";const a=[];t.displayValue.forEach((t,s)=>{i="",n=t.user,a.push(n),"sign"===t.mode&&(n="<u>"+n+"</u>"),i=""===t.date?'<i class="fa fa-hourglass-half"></i> <span title="'+this.translate.instant("lang."+t.mode+"User")+'">'+n+"</span>":'<span color="accent" style=""><i class="fa fa-check"></i> <span title="'+this.translate.instant("lang."+t.mode+"User")+'">'+n+"</span></span>",t.current&&s>=0&&(i='<b color="primary">'+i+"</b>"),e.push(i)});const s=t.displayValue.map(t=>t.current).indexOf(!0);if(s>0){e=e.slice(s-1),e=e.reverse();const i=t.displayValue.map(t=>t.current).reverse().indexOf(!0);i>1&&(e=e.slice(i-1)),e=e.reverse()}else 0===s?(e=e.reverse(),e=e.slice(s-2),e=e.reverse()):-1===s&&(e=e.slice(e.length-2));(s>=2||-1===s&&t.displayValue.length>=3)&&e.unshift("..."),-1!==s&&s-2<=t.displayValue.length&&s+2<t.displayValue.length&&t.displayValue.length>=3&&e.push("..."),t.displayValue=e.join(' <i class="fas fa-long-arrow-alt-right"></i> '),t.displayTitle=a.join(" - ")}else if("getSignatories"===t.value){const e=[];t.displayValue.forEach(t=>{e.push(t.user)}),t.displayValue=e.join(", "),t.displayTitle=e.join(", ")}else"getParallelOpinionsNumber"===t.value&&(t.displayTitle=t.displayValue+" "+this.translate.instant("lang.opinionsSent"),t.displayValue=t.displayValue>0?'<b color="primary">'+t.displayValue+"</b> "+this.translate.instant("lang.opinionsSent"):t.displayValue+" "+this.translate.instant("lang.opinionsSent"));else t.displayValue=this.translate.instant("lang.undefined"),t.displayTitle="";t.label=void 0===t.displayLabel?this.translate.instant("lang."+t.value):t.displayLabel,t.displayValue=this.setHighLightData(t)}),t.checked=-1!==this.selectedRes.indexOf(t.resId)}),t}setHighLightData(t){return Object.keys(this.criteria).indexOf(this.indexingFieldService.mappingdata[t.value])>-1?Array.isArray(this.criteria[this.indexingFieldService.mappingdata[t.value]].values)?this.criteria[this.indexingFieldService.mappingdata[t.value]].values.forEach(e=>{t.displayValue=this.highlightPipe.transform(t.displayValue,this.functions.empty(e.label)?e:e.label.replace(/ /g,""))}):t.displayValue=this.highlightPipe.transform(t.displayValue,this.criteria[this.indexingFieldService.mappingdata[t.value]].values):"getAssignee"===t.value?(Object.keys(this.criteria).indexOf("role_dest")>-1&&this.criteria.role_dest.values.forEach(e=>{null!==e&&(t.displayValue=this.highlightPipe.transform(t.displayValue,e.label.replace(/ /g,"")))}),Object.keys(this.criteria).indexOf("destination")>-1&&this.criteria.destination.values.forEach(e=>{t.displayValue=this.highlightPipe.transform(t.displayValue,e.label.replace(/ /g,""))})):"getCreationAndProcessLimitDates"===t.value?(Object.keys(this.criteria).indexOf("creationDate")>-1&&(t.displayValue.creationDateHighlighted=!0),Object.keys(this.criteria).indexOf("processLimitDate")>-1&&(t.displayValue.processLimitDateHighlighted=!0),Object.keys(this.criteria).indexOf("closingDate")>-1&&(t.displayValue.closingDateHighlighted=!0)):null!==t.value.match(/indexingCustomField_[.]*/g)&&Object.keys(this.criteria).indexOf(t.value)>-1&&(Array.isArray(this.criteria[t.value].values)?this.criteria[t.value].values.forEach(e=>{t.displayValue=this.highlightPipe.transform(t.displayValue,e.label.replace(/ /g,""))}):t.displayValue=this.highlightPipe.transform(t.displayValue,this.criteria[t.value].values)),t.displayValue}toggleRes(t,e){if(this.singleSelection&&this.toggleAllRes({checked:!1}),t.checked)-1===this.selectedRes.indexOf(e.resId)&&(this.selectedRes.push(e.resId),e.checked=!0);else{const t=this.selectedRes.indexOf(e.resId);this.selectedRes.splice(t,1),e.checked=!1}}toggleAllRes(t){this.selectedRes=[],t.checked?(this.data.forEach(t=>{t.checked=!0}),this.selectedRes=JSON.parse(JSON.stringify(this.allResInBasket))):this.data.forEach(t=>{t.checked=!1})}selectSpecificRes(t){this.toggleAllRes({checked:!1}),this.toggleRes({checked:!0},t)}open({x:t,y:e},i){return!1===i.checked&&(i.checked=!0,this.toggleAllRes({checked:!1}),this.toggleRes({checked:!0},i)),this.actionMode&&this.actionsList.open(t,e,i),!1}listTodrag(){return this.foldersService.getDragIds()}toggleMailTracking(t){t.mailTracking?this.http.request("DELETE","../rest/resources/unfollow",{body:{resources:[t.resId]}}).pipe(Object(mt.a)(()=>{this.headerService.nbResourcesFollowed--,t.mailTracking=!t.mailTracking}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe():this.http.post("../rest/resources/follow",{resources:[t.resId]}).pipe(Object(mt.a)(()=>{this.headerService.nbResourcesFollowed++,t.mailTracking=!t.mailTracking}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}viewDocument(t){this.http.get(`../rest/resources/${t.resId}/content?mode=view`,{responseType:"blob"}).pipe(Object(mt.a)(e=>{const i=new Blob([e],{type:"application/pdf"}),n=URL.createObjectURL(i),a=window.open();a.document.write(`<iframe style="width: 100%;height: 100%;margin: 0;padding: 0;" src="${n}" frameborder="0" allowfullscreen></iframe>`),a.document.title=t.chrono}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}emptyCriteria(){return 0===Object.keys(this.criteria).length}isArrayType(t){return Array.isArray(t)}removeCriteria(t,e=null){if(!this.isLoadingResults)if(this.appCriteriaTool.toggleTool(!0),"_ALL"!==t){if(null===e||1===this.criteria[t].values.length)this.criteria[t].values=[];else{const i=this.criteria[t].values.indexOf(e);this.criteria[t].values.splice(i,1)}this.appCriteriaTool.resetCriteria(t,e)}else Object.keys(this.criteria).forEach(t=>{this.criteria[t].values=[]}),this.appCriteriaTool.resetAllCriteria()}updateFilters(){this.listProperties.page=0,this.criteriaSearchService.updateListsProperties(this.listProperties),this.refreshDao()}changeOrderDir(){this.listProperties.orderDir="ASC"===this.listProperties.orderDir?"DESC":"ASC",this.updateFilters()}getSelectedResources(){return this.selectedRes}counter(t){return new Array(t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(o.a),n.Qb(g.e),n.Qb(o.c),n.Qb(o.a),n.Qb(v.b),n.Qb(q.b),n.Qb(ca.b),n.Qb(y.a),n.Qb(JD),n.Qb(D.a),n.Qb(ZD.c),n.Qb(n.T),n.Qb(w.a),n.Qb(tw.a),n.Qb(_t.a),n.Qb(Zt),n.Qb(HD),n.Qb(Dt.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-search-result-list"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(bM,!0),n.Kc(fM,!0),n.Kc(mM,!0),n.Kc(gM,!0),n.Xc(vM,!0),n.Xc(_M,!0),n.Xc(yM,!0),n.Kc(Kt.a,!0),n.Kc(xM,!0),n.Kc(CM,!0)),2&t&&(n.yc(i=n.ec())&&(e.filterTemplate=i.first),n.yc(i=n.ec())&&(e.toolTemplate=i.first),n.yc(i=n.ec())&&(e.panelTemplate=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.actionsList=i.first),n.yc(i=n.ec())&&(e.appPanelList=i.first),n.yc(i=n.ec())&&(e.appFilterToolAdvSearch=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first),n.yc(i=n.ec())&&(e.basketHome=i.first))},inputs:{searchTerm:"searchTerm",actionMode:"actionMode",singleSelection:"singleSelection",standalone:"standalone",hideFilter:"hideFilter",appCriteriaTool:"appCriteriaTool",sidenavRight:"sidenavRight"},outputs:{loadingResult:"loadingResult"},features:[n.Cb([HD])],decls:37,vars:25,consts:[["id","viewThumbnail",2,"display","none","position","fixed","z-index","2","margin-left","1px"],["style","max-height: 100vh;",3,"src",4,"ngIf"],["filterTemplate",""],["toolTemplate",""],["class","example-loading-shade",4,"ngIf"],[1,"table-head"],[1,"table-head-result"],["color","primary","style","margin: 10px;padding-right: 10px;",3,"checked","indeterminate","title","change",4,"ngIf"],[4,"ngIf"],[1,"table-head-tool"],[2,"position","relative"],[1,"paginatorResultList",3,"length","pageSizeOptions"],["paginatorResultList",""],["class","pageList",3,"matMenuTriggerFor",4,"ngIf"],["page","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],[3,"selectedRes"],["actionsList",""],["cdkDropList","","id","document-list","mat-table","","matSort","","matSortActive","resId","matSortDisableClear","","matSortDirection","asc",2,"width","100%",3,"cdkDropListConnectedTo","cdkDropListData","dataSource","cdkDropListDisabled"],["tableBasketListSort","matSort"],["matColumnDef","resId"],["mat-cell","","style","padding:0;border-top: solid 1px rgba(0, 0, 0, 0.12);",4,"matCellDef"],["mat-row","","class","rowData","style","cursor: pointer;","cdkDrag","",3,"locked","cdkDragDisabled","cdkDragData","contextmenu","cdkDragStarted",4,"matRowDef","matRowDefColumns"],["panelTemplate",""],[3,"contextMode","currentFolderInfo","totalRes","selectedRes","refreshEvent","refreshPanelFolders",4,"ngIf"],[2,"max-height","100vh",3,"src"],[3,"filters","isLoadingResults","filterChanged",4,"ngIf"],[3,"filters","isLoadingResults","filterChanged"],["appFilterToolAdvSearch",""],[1,"filtersContent"],[2,"flex","1"],[1,"orderTool"],[1,"basket-order"],["matPrefix","",1,"fa","fa-list"],[3,"ngModel","disabled","ngModelChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[1,"ascDescTool"],["mat-fab","",2,"color","rgba(0,0,0,0.38)",3,"disabled","title","click"],["fontSet","fas","fontIcon","fa-sort-amount-down fa-2x",4,"ngIf"],["fontSet","fas","fontIcon","fa-sort-amount-up fa-2x",4,"ngIf"],[1,"filterBadges"],["class","label badge-eraser",3,"title","click",4,"ngIf"],[4,"ngFor","ngForOf"],[3,"value"],["fontSet","fas","fontIcon","fa-sort-amount-down fa-2x"],["fontSet","fas","fontIcon","fa-sort-amount-up fa-2x"],[1,"label","badge-eraser",3,"title","click"],[1,"fas","fa-eraser"],["class","label badge-search",3,"title","click",4,"ngFor","ngForOf"],[1,"label","badge-search",3,"title","click"],[3,"title"],[1,"fa","fa-times-circle"],[1,"example-loading-shade"],["color","primary",2,"margin","10px","padding-right","10px",3,"checked","indeterminate","title","change"],[1,"pageList",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click"],[3,"contextMode","currentFolderInfo","totalRes","selectedRes","refreshEvent"],["mat-cell","",2,"padding","0","border-top","solid 1px rgba(0, 0, 0, 0.12)"],["style","cursor: initial;",3,"class",4,"ngIf"],[1,"main-info"],[2,"width","50px"],["color","primary",3,"checked","change","click"],["mat-icon-button","",1,"followIcon",2,"margin-left","-25px",3,"title","click"],[2,"margin-bottom","5px",3,"ngClass"],[1,"main-info-status",2,"cursor","pointer",3,"click"],["style","width: 100%;","color","primary",3,"title","ngStyle","class",4,"ngIf"],["class","watermark",4,"ngIf"],["style","color: red;","class","fa fa-lock fa-2x",3,"title",4,"ngIf"],["class","main-info-data","style","width:200px;text-align:center;cursor:pointer;",3,"click",4,"ngIf"],[1,"main-info-data",2,"font-weight","bold","flex","1","cursor","pointer",3,"title","innerHTML","click"],["class","main-info-action",4,"ngIf"],["class","folder-info",4,"ngIf"],[2,"cursor","initial"],["class","sub-info-data","style","flex:1;white-space: pre;overflow: hidden;text-overflow: ellipsis;\n padding-left: 5px;\n padding-right: 5px;",3,"class","hasEvent","click",4,"ngFor","ngForOf"],[1,"sub-info-data",2,"flex","1","white-space","pre","overflow","hidden","text-overflow","ellipsis","padding-left","5px","padding-right","5px",3,"click"],[1,"fa","fa-calendar",3,"title"],[3,"innerHTML","title"],[1,"fa","fa-lock",3,"title"],[1,"fa","fa-stopwatch",3,"title"],["style","opacity: 0.5",3,"title",4,"ngIf"],[3,"title",4,"ngIf"],[2,"opacity","0.5",3,"title"],[3,"title","innerHTML",4,"ngIf"],[3,"innerHTML",4,"ngIf"],[3,"title","innerHTML"],[3,"innerHTML"],["color","primary",2,"width","100%",3,"title","ngStyle"],[1,"watermark"],[1,"fa","fa-lock","fa-2x",2,"color","red",3,"title"],[1,"main-info-data",2,"width","200px","text-align","center","cursor","pointer",3,"click"],[2,"color","rgba(0,0,0,0.4)","font-size","90%"],[1,"fas","fa-barcode",3,"title"],[1,"main-info-action"],["mat-icon-button","",3,"title","click"],["fontSet","fas","fontIcon","fa-comments fa-2x",3,"matBadgeHidden","matBadge","color"],["fontSet","fas","fontIcon","fa-paperclip fa-2x",3,"matBadgeHidden","matBadge","color"],["fontSet","fas","fontIcon","fa-sitemap fa-2x",3,"color"],["mat-icon-button","",3,"title","disabled","click","mouseenter","mouseleave",4,"ngIf"],["mat-icon-button","",3,"title","highlightResult","click",4,"ngIf"],["mat-icon-button","",3,"title","disabled","click","mouseenter","mouseleave"],[1,"fa",3,"ngClass"],["fontSet","fas","fontIcon","fa-info-circle fa-2x"],[1,"folder-info"],["class","badge badge-folder",3,"title","click",4,"ngFor","ngForOf"],[1,"badge","badge-folder",3,"title","click"],[1,"fa","fa-folder"],["mat-row","","cdkDrag","",1,"rowData",2,"cursor","pointer",3,"cdkDragDisabled","cdkDragData","contextmenu","cdkDragStarted"],["class","example-custom-placeholder",4,"cdkDragPlaceholder"],["class","dragPreview",4,"cdkDragPreview"],[1,"example-custom-placeholder"],[1,"dragPreview"],[1,"fas","fa-envelope-open-text","fa-2x"],["style","height: 100%;overflow: hidden;",3,"matTooltip","innerHTML",4,"ngIf"],[2,"display","flex","position","sticky","top","0px","z-index","2"],["mat-icon-button","",2,"font-size","20px","color","#666",3,"click"],[1,"fa","fa-arrow-right"],[3,"refreshBadgeNotes","refreshBadgeAttachments"],["appPanelList",""],[2,"height","100%","overflow","hidden",3,"matTooltip","innerHTML"],[3,"contextMode","currentFolderInfo","totalRes","selectedRes","refreshEvent","refreshPanelFolders"],["actionsListContext",""]],template:function(t,e){if(1&t&&(n.Wb(0,"mat-card",0),n.Oc(1,OM,3,5,"img",1),n.Vb(),n.Oc(2,wM,1,1,"ng-template",null,2,n.Pc),n.Oc(4,TM,17,17,"ng-template",null,3,n.Pc),n.Oc(6,FM,2,1,"div",4),n.Wb(7,"div",5),n.Wb(8,"div",6),n.Oc(9,LM,2,5,"mat-checkbox",7),n.Qc(10),n.ic(11,"ucfirst"),n.ic(12,"translate"),n.Oc(13,QM,3,4,"small",8),n.Vb(),n.Wb(14,"div",9),n.Wb(15,"span",10),n.Rb(16,"mat-paginator",11,12),n.Oc(18,NM,1,1,"div",13),n.Wb(19,"mat-menu",null,14),n.Oc(21,zM,2,1,"button",15),n.Vb(),n.Vb(),n.Wb(22,"span"),n.Wb(23,"span"),n.Rb(24,"app-tools-list",16,17),n.Vb(),n.Oc(26,BM,3,4,"span",8),n.Vb(),n.Vb(),n.Vb(),n.Wb(27,"div"),n.Wb(28,"table",18,19),n.Ub(30,20),n.Oc(31,fk,18,26,"td",21),n.Tb(),n.Oc(32,vk,3,4,"tr",22),n.Vb(),n.Vb(),n.Rb(33,"div",5),n.Oc(34,yk,7,1,"ng-template",null,23,n.Pc),n.Oc(36,xk,2,4,"app-followed-action-list",24)),2&t){const t=n.zc(17);n.Db(1),n.oc("ngIf",""!==e.thumbnailUrl),n.Db(5),n.oc("ngIf",e.isLoadingResults),n.Db(3),n.oc("ngIf",!e.singleSelection),n.Db(1),n.Tc("\xa0",e.resultsLength," ",n.jc(11,20,n.jc(12,22,"lang.records")),"\xa0"),n.Db(3),n.oc("ngIf",e.selectedRes.length>0),n.Db(3),n.oc("length",e.paginatorLength)("pageSizeOptions",n.uc(24,Ck)),n.Db(2),n.oc("ngIf",t.getNumberOfPages()>0),n.Db(3),n.oc("ngForOf",e.counter(t.getNumberOfPages())),n.Db(3),n.oc("selectedRes",e.selectedRes),n.Db(2),n.oc("ngIf",e.actionMode),n.Db(1),n.Ib("integratedContent",!e.standalone),n.Db(1),n.oc("cdkDropListConnectedTo",e.listTodrag())("cdkDropListData",e.data)("dataSource",e.data)("cdkDropListDisabled",e.dragInit||e.appService.getViewMode()),n.Db(4),n.oc("matRowDefColumns",e.displayedColumnsBasket),n.Db(4),n.oc("ngIf",e.actionMode)}},directives:[K.a,P.t,Kt.a,ne.e,P.s,Ow,vt.o,lo.e,Fe.a,vt.c,vt.b,vt.n,Pw,Y.c,S.a,Y.i,ee.a,X.u,X.x,k.b,W.p,V.c,j.a,ne.d,ne.b,eM,vt.a,P.q,P.w,wt.a,vt.m,lo.a,lo.c,lo.d,pM,T.a,A.b],pipes:[Tt.u,g.d,P.b,si,P.l,ps,uo,bs,Wt.a],styles:[".followIcon[_ngcontent-%COMP%]{color:#f99830}.folder-info[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.badge-folder[_ngcontent-%COMP%]{cursor:pointer;background:#f99830;margin:5px;font-size:12px;border-radius:3px;opacity:.8;max-width:250px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.filterBadges[_ngcontent-%COMP%]{width:100%}.filterBadges[_ngcontent-%COMP%] > .badge-eraser[_ngcontent-%COMP%]{margin:5px;background:none;cursor:pointer;color:#fff;font-size:20px}.filterBadges[_ngcontent-%COMP%] > .label[_ngcontent-%COMP%]{white-space:inherit}.filterBadges[_ngcontent-%COMP%] > .badge-search[_ngcontent-%COMP%]{margin:5px;background:#fff;color:#135f7f;cursor:pointer}.filtersContent[_ngcontent-%COMP%]{width:100%;display:flex}.filtersContent[_ngcontent-%COMP%] .orderTool[_ngcontent-%COMP%]{flex:1}.basket-order[_ngcontent-%COMP%]{color:#fff;width:300px;padding-left:10px;padding-right:10px;height:55px}.basket-order[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{font-size:30px}.basket-order[_ngcontent-%COMP%] .mat-select-value{color:#fff}.basket-order[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.basket-order[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border:2px solid #fff;border-radius:30px;display:flex;align-items:center}.basket-order[_ngcontent-%COMP%] .mat-form-field-prefix{padding-left:15px;padding-right:10px}.basket-order[_ngcontent-%COMP%] .mat-form-field-label-wrapper{color:#fff}.basket-order[_ngcontent-%COMP%] .mat-select-arrow{color:#fff;margin-right:25px}.basket-order[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.ascDescTool[_ngcontent-%COMP%] .mat-fab[_ngcontent-%COMP%]{background:#135f7f;border:2px solid #fff;color:#fff!important;box-shadow:none}.integratedContent[_ngcontent-%COMP%]{height:90%;overflow:auto;position:absolute;width:100%} .highlightResult{background:#ff0}.highlightResultIcon[_ngcontent-%COMP%]{border-radius:20px;background:#ff0}.align_leftData[_ngcontent-%COMP%]{text-align:left}.align_centerData[_ngcontent-%COMP%]{text-align:center}.align_rightData[_ngcontent-%COMP%]{text-align:right}.boldFontData[_ngcontent-%COMP%]{font-weight:700}.bigFontData[_ngcontent-%COMP%]{font-size:14px}.smallFontData[_ngcontent-%COMP%]{font-size:10px}.normalData[_ngcontent-%COMP%]{flex:1}.pageInput[_ngcontent-%COMP%]{padding:0}.pageInput[_ngcontent-%COMP%] .mat-form-field-wrapper{margin:0;padding:0}.pageList[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:0;left:110px;height:100%;width:120px}.freezeIcon[_ngcontent-%COMP%]{color:#f99830}.unfreezeIcon[_ngcontent-%COMP%]{color:#135f7f}.bindIcon[_ngcontent-%COMP%]{color:#f99830}.noBindIcon[_ngcontent-%COMP%]{color:#135f7f}.watermark[_ngcontent-%COMP%]{position:absolute;left:50%;transform:translateX(-50%) rotate(-20deg);color:red;font-weight:700;opacity:.6}"]}),t})();class Dk{constructor(t,e){this.http=t,this.criteriaSearchService=e}getRepoIssues(t,e,i,n,a,s,o,r){this.criteriaSearchService.updateListsPropertiesPage(i),this.criteriaSearchService.updateListsPropertiesPageSize(s),this.criteriaSearchService.updateListsPropertiesCriteria(o);const c=`${n}?limit=${s}&offset=${i*s}&order=${a.order}&orderDir=${a.orderDir}`,l=Object.assign({},this.criteriaSearchService.formatDatas(JSON.parse(JSON.stringify(o))),{filters:r});return this.http.post(c,l)}}const wk=["appSearchResultList"],Mk=function(){return["chrono","subject","recipients","senders"]};let kk=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.data=n,this.dialogRef=a,this.searchUrl=""}ngOnInit(){}linkResources(){const t=this.appSearchResultList.getSelectedResources().filter(t=>t!==this.data.resId);this.http.post(`../rest/resources/${this.data.resId}/linkedResources`,{linkedResources:t}).pipe(Object(mt.a)(()=>{this.dialogRef.close("success")}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isSelectedResources(){return void 0!==this.appSearchResultList&&this.appSearchResultList.getSelectedResources().filter(t=>t!==this.data.resId).length>0}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.a),n.Qb(q.h))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Xc(wk,!0),2&t&&n.yc(i=n.ec())&&(e.appSearchResultList=i.first)},decls:21,vars:20,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],[2,"flex","1",3,"title"],["mat-icon-button","",3,"title","click"],[1,"fa","fa-times"],[1,"bg-primary"],[3,"openedPanel","defaultCriteria","searchUrlGenerated"],["appCriteriaTool",""],["id","toolTemplate",2,"padding-top","10px"],[3,"actionMode","hideFilter","appCriteriaTool","standalone"],["appSearchResultList",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","color","primary",3,"disabled","click"]],template:function(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Wb(2,"span",2),n.ic(3,"translate"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Wb(6,"button",3),n.dc("click",(function(){return e.dialogRef.close()})),n.ic(7,"translate"),n.Rb(8,"mat-icon",4),n.Vb(),n.Vb(),n.Wb(9,"mat-dialog-content"),n.Wb(10,"div",5),n.Wb(11,"app-criteria-tool",6,7),n.dc("searchUrlGenerated",(function(e){return n.Dc(t),n.zc(15).launchSearch(e)})),n.Vb(),n.Rb(13,"div",8),n.Vb(),n.Rb(14,"app-search-result-list",9,10),n.Vb(),n.Rb(16,"span",11),n.Wb(17,"div",12),n.Wb(18,"button",13),n.dc("click",(function(){return e.linkResources()})),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(12);n.Db(2),n.oc("title",n.jc(3,11,"lang.linkResource")),n.Db(2),n.Sc(" ",n.jc(5,13,"lang.linkResource")," "),n.Db(2),n.oc("title",n.jc(7,15,"lang.close")),n.Db(5),n.oc("openedPanel",!0)("defaultCriteria",n.uc(19,Mk)),n.Db(3),n.oc("actionMode",!1)("hideFilter",!0)("appCriteriaTool",t)("standalone",!0),n.Db(4),n.oc("disabled",!e.isSelectedResources()),n.Db(1),n.Rc(n.jc(20,17,"lang.linkSelectedResources"))}},directives:[q.i,k.b,S.a,q.f,$D,Ok,q.c],pipes:[g.d],styles:[".mat-dialog-content[_ngcontent-%COMP%]{padding:0}.bg-primary[_ngcontent-%COMP%]{padding:10px;background:#135f7f}"]}),t})();function Sk(t,e){1&t&&(n.Ub(0),n.Wb(1,"div",2),n.Rb(2,"mat-spinner"),n.Vb(),n.Tb())}function Ik(t,e){if(1&t&&(n.Rb(0,"img",15),n.ic(1,"async"),n.ic(2,"secureUrl")),2&t){const t=n.hc(2);n.oc("src",n.jc(1,1,n.jc(2,3,t.thumbnailUrl)),n.Gc)}}function Pk(t,e){if(1&t&&(n.Wb(0,"span",36),n.Rb(1,"i",37),n.ic(2,"translate"),n.Qc(3," \xa0 "),n.Wb(4,"span",20),n.Qc(5),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(1),n.pc("title",n.jc(2,3,"lang.visaWorkflow")),n.Db(3),n.oc("title",e.getUsersVisaCircuit(t)),n.Db(1),n.Rc(e.getUsersVisaCircuit(t))}}function Vk(t,e){1&t&&(n.Wb(0,"span",38),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.confidential")))}function Rk(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",39),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc(2);return e.stopPropagation(),a.unlinkResource(i)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",40),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.unlink"))}const jk=function(t){return{color:t}};function Ak(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",16),n.Wb(1,"div",17),n.Wb(2,"span",18),n.Rb(3,"i",19),n.ic(4,"translate"),n.Qc(5," \xa0 "),n.Wb(6,"span",20),n.ic(7,"translate"),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Vb(),n.Wb(10,"span",21),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).openContact(i,"senders")})),n.Rb(11,"i",22),n.ic(12,"translate"),n.Qc(13," \xa0 "),n.Wb(14,"span",20),n.Qc(15),n.Vb(),n.Vb(),n.Wb(16,"span",23),n.Rb(17,"i",24),n.ic(18,"translate"),n.Qc(19," \xa0 "),n.Wb(20,"span",20),n.ic(21,"fullDate"),n.Qc(22),n.ic(23,"ucfirst"),n.ic(24,"timeAgo"),n.Vb(),n.Vb(),n.Wb(25,"span",25),n.Rb(26,"i",26),n.ic(27,"translate"),n.Qc(28," \xa0 "),n.Wb(29,"span",20),n.Qc(30),n.Vb(),n.Vb(),n.Oc(31,Pk,6,5,"span",27),n.Vb(),n.Wb(32,"div",28),n.Wb(33,"span",29),n.Rb(34,"mat-icon",30),n.Oc(35,Vk,3,3,"span",31),n.Vb(),n.Wb(36,"span",32),n.Qc(37),n.Vb(),n.Wb(38,"span",33),n.ic(39,"translate"),n.Qc(40),n.ic(41,"shorten"),n.Vb(),n.Wb(42,"span",34),n.Oc(43,Rk,3,3,"button",35),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.Db(3),n.pc("title",n.jc(4,29,"lang.category_id")),n.Db(3),n.pc("title",n.jc(7,31,"lang."+t.categoryId)),n.Db(2),n.Rc(n.jc(9,33,"lang."+t.categoryId)),n.Db(3),n.pc("title",n.jc(12,35,"lang.contact")),n.Db(3),n.oc("title",t.senders),n.Db(1),n.Rc(t.senders),n.Db(2),n.pc("title",n.jc(18,37,"lang.creationDate")),n.Db(3),n.oc("title",n.jc(21,39,t.documentDate)),n.Db(2),n.Rc(n.jc(23,41,n.kc(24,43,t.documentDate,"full"))),n.Db(4),n.pc("title",n.jc(27,46,"lang.getAssignee")),n.Db(3),n.oc("title",t.destUserLabel+" ("+t.destinationLabel+")"),n.Db(1),n.Rc(t.destUserLabel+" ("+t.destinationLabel+")"),n.Db(1),n.oc("ngIf",t.visaCircuit.length>0),n.Db(3),n.Hb("",t.statusImage.charAt(0),"",t.statusImage.charAt(1)," ",t.statusImage," ",t.statusImage.charAt(0),"",t.statusImage.charAt(1),"-2x"),n.pc("title",t.statusLabel),n.oc("ngStyle",n.vc(54,jk,t.priorityColor)),n.Db(1),n.oc("ngIf",t.confidentiality),n.Db(2),n.Sc(" ",t.chrono," "),n.Db(1),n.Ib("undefined",t.subject==n.jc(39,48,"lang.undefined")),n.pc("title",t.subject),n.Db(2),n.Rc(n.lc(41,50,t.subject,150,"...")),n.Db(3),n.oc("ngIf",i.privilegeService.hasCurrentUserPrivilege("add_links"))}}function Wk(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-row",41),n.dc("mouseenter",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).viewThumbnail(i)}))("mouseleave",(function(){return n.Dc(t),n.hc(2).closeThumbnail()})),n.Vb()}2&t&&n.qc("routerLink","/resources/",e.$implicit.resId,"")}function Tk(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",42),n.dc("click",(function(){return n.Dc(t),n.hc(2).openSearchResourceModal()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",43),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.linkResource"))}function Ek(t,e){if(1&t&&(n.Wb(0,"mat-card",3),n.Oc(1,Ik,3,5,"img",4),n.Vb(),n.Wb(2,"div",5),n.Wb(3,"div",6),n.Rb(4,"mat-paginator",7,8),n.Vb(),n.Vb(),n.Wb(6,"mat-table",9,10),n.Ub(8,11),n.Oc(9,Ak,44,56,"mat-cell",12),n.Tb(),n.Oc(10,Wk,1,1,"mat-row",13),n.Vb(),n.Oc(11,Tk,3,3,"button",14)),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",""!==t.thumbnailUrl),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.dataSource),n.Db(4),n.oc("matRowDefColumns",t.displayedColumns),n.Db(1),n.oc("ngIf",t.privilegeService.hasCurrentUserPrivilege("add_links"))}}let Fk=(()=>{class t{constructor(t,e,i,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.appService=a,this.dialog=s,this.functions=o,this.privilegeService=r,this.loading=!0,this.linkedResources=[],this.displayedColumns=["resId"],this.thumbnailUrl="",this.reloadBadgeLinkedResources=new n.o}ngOnInit(){this.loading=!0,this.initLinkedResources()}initLinkedResources(){this.http.get(`../rest/resources/${this.resId}/linkedResources`).pipe(Object(mt.a)(t=>{this.linkedResources=t.linkedResources,this.reloadBadgeLinkedResources.emit(""+this.linkedResources.length),setTimeout(()=>{this.linkedResources=this.processPostData(this.linkedResources),this.dataSource=new vt.p(this.linkedResources),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort},0)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}processPostData(t){return t.forEach(t=>{Object.keys(t).forEach(e=>{"statusImage"===e&&this.functions.empty(t[e])?t[e]="fa-question undefined":this.functions.empty(t[e])&&-1===["senders","recipients","attachments","hasDocument","confidentiality","visaCircuit"].indexOf(e)&&(t[e]=this.translate.instant("lang.undefined")),"senders"===e&&t[e].length>1&&(t[e]=t[e].length>1?t[e].length+" "+this.translate.instant("lang.contactsAlt"):t[e][0])})}),t}getUsersVisaCircuit(t){return t.visaCircuit.length>0?t.visaCircuit.map(t=>t.userLabel):""}unlinkResource(t){this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.unlink"),msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete(`../rest/resources/${this.resId}/linkedResources/${t.resId}`)),Object(mt.a)(()=>{this.linkedResources=this.linkedResources.filter(e=>e.resId!==t.resId),this.reloadBadgeLinkedResources.emit(""+this.linkedResources.length),this.dataSource=new vt.p(this.linkedResources),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort,this.notify.success(this.translate.instant("lang.resourceUnlinked"))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}viewThumbnail(t){t.hasDocument&&(this.thumbnailUrl="../rest/resources/"+t.resId+"/thumbnail",$("#viewThumbnail").show())}closeThumbnail(){$("#viewThumbnail").hide()}openSearchResourceModal(){this.dialog.open(kk,{panelClass:"maarch-full-height-modal",minWidth:"80%",data:{resId:this.resId,currentLinkedRes:this.linkedResources.map(t=>t.resId)}}).afterClosed().pipe(Object(d.a)(t=>"success"===t),Object(mt.a)(()=>{this.initLinkedResources(),this.notify.success(this.translate.instant("lang.resourcesLinked"))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}openContact(t,e){this.dialog.open(YD,{panelClass:"maarch-modal",data:{title:`${t.chrono} - ${t.subject}`,mode:e,resId:t.resId}})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(w.a),n.Qb(q.b),n.Qb(_t.a),n.Qb(Dt.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-linked-resource-list"]],viewQuery:function(t,e){var i;1&t&&(n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},inputs:{resId:"resId"},outputs:{reloadBadgeLinkedResources:"reloadBadgeLinkedResources"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["elseLoading",""],[1,"loading"],["id","viewThumbnail",2,"display","none","position","fixed","z-index","2","margin-left","1px","left","50%","transform","translate(-50%,-50%)","top","50%"],["style","max-height: 100vh;",3,"src",4,"ngIf"],[1,"row",2,"margin","0px"],[1,"col-md-12"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSort","","matSortActive","resId","matSortDirection","desc",3,"dataSource"],["table",""],["matColumnDef","resId"],["style","flex: 1;flex-direction: column;padding: 0px;",4,"matCellDef"],["style","cursor: pointer;",3,"routerLink","mouseenter","mouseleave",4,"matRowDef","matRowDefColumns"],["mat-fab","","class","linkRes","color","primary",3,"title","click",4,"ngIf"],[2,"max-height","100vh",3,"src"],[2,"flex","1","flex-direction","column","padding","0px"],[1,"sub-info"],[1,"sub-info-data","col-md-4"],[1,"fas","fa-exchange-alt",3,"title"],[3,"title"],[1,"sub-info-data","col-md-4","text-center","senders",3,"click"],[1,"fas","fa-user",3,"title"],[1,"sub-info-data","col-md-4","text-right"],[1,"fas","fa-calendar",3,"title"],[1,"sub-info-data","col-md-6"],[1,"fas","fa-sitemap",3,"title"],["class","sub-info-data col-md-6 text-right",4,"ngIf"],[1,"main-info"],[1,"main-info-status"],["color","primary",3,"title","ngStyle"],["class","watermark",4,"ngIf"],[1,"main-info-data",2,"width","200px","text-align","center"],[1,"main-info-data",2,"font-weight","bold","flex","1",3,"title"],[1,"main-info-data"],["mat-icon-button","","color","warn",3,"title","click",4,"ngIf"],[1,"sub-info-data","col-md-6","text-right"],[1,"fas","fa-list-ol",3,"title"],[1,"watermark"],["mat-icon-button","","color","warn",3,"title","click"],["aria-hidden","true",1,"fa","fa-unlink","fa-2x"],[2,"cursor","pointer",3,"routerLink","mouseenter","mouseleave"],["mat-fab","","color","primary",1,"linkRes",3,"title","click"],[1,"fa","fa-link",2,"height","auto"]],template:function(t,e){if(1&t&&(n.Oc(0,Sk,3,0,"ng-container",0),n.Oc(1,Ek,12,7,"ng-template",null,1,n.Pc)),2&t){const t=n.zc(2);n.oc("ngIf",e.loading)("ngIfElse",t)}},directives:[P.t,V.c,K.a,Kt.a,vt.o,Fe.a,vt.c,vt.b,vt.n,vt.a,S.a,P.w,k.b,vt.m,o.d],pipes:[P.b,si,g.d,uo,Tt.u,ps,Tt.p],styles:[".loading[_ngcontent-%COMP%]{display:flex;justify-content:center}.linkRes[_ngcontent-%COMP%]{position:-webkit-sticky;position:sticky;z-index:2;bottom:10px;margin-left:10px;margin-top:10px}.main-info[_ngcontent-%COMP%], .sub-info[_ngcontent-%COMP%]{width:100%}.sub-info[_ngcontent-%COMP%]{display:block}.sub-info-data[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;text-overflow:ellipsis;padding-left:5px;padding-right:5px}.watermark[_ngcontent-%COMP%]{position:absolute;left:50%;transform:translateX(-50%) rotate(-20deg);color:red;font-weight:700;opacity:.6}.senders[_ngcontent-%COMP%]{cursor:pointer}.senders[_ngcontent-%COMP%]:hover{color:#135f7f}"]}),t})();const Lk=["appVisaWorkflow"],Qk=["appDocumentViewer"],Nk=["appNotesList"];function zk(t,e){1&t&&(n.Wb(0,"div",4),n.Rb(1,"i",5),n.Vb())}const Bk=function(t){return{activeTabSignatureBook:t}};function Uk(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",35),n.dc("click",(function(){return n.Dc(t),n.hc(2).changeSignatureBookLeftContent("document")})),n.ic(1,"translate"),n.Rb(2,"i",36),n.Vb()}if(2&t){const t=n.hc(2);n.pc("title",n.jc(1,2,"lang.mail")),n.oc("ngClass",n.vc(4,Bk,"document"==t.headerTab))}}function $k(t,e){1&t&&n.Rb(0,"i",38)}function Hk(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",35),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc(2);return!!a.isToolEnabled(i.id)&&a.changeSignatureBookLeftContent(i.id)})),n.Rb(1,"i"),n.Oc(2,$k,1,0,"i",37),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.Ib("tool-disabled",!i.isToolEnabled(t.id)),n.pc("title",t.label),n.oc("ngClass",n.vc(7,Bk,i.headerTab==t.id)),n.Db(1),n.Fb(t.icon),n.Db(1),n.oc("ngIf",t.count>0)}}function Gk(t,e){if(1&t&&(n.Wb(0,"option",39),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.pc("value",t.id),n.Db(1),n.Rc(t.label)}}function Xk(t,e){if(1&t&&(n.Wb(0,"div",40),n.Wb(1,"span",41),n.Rb(2,"input",42),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.pc("value",t.signatureBook.consigne),n.pc("title",t.signatureBook.consigne)}}function qk(t,e){1&t&&n.Rb(0,"i",53)}const Kk=function(t){return{resListContentFrameSelected:t}},Yk=function(t){return{color:t}};function Jk(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",43),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).changeLocation(i.res_id,"view")})),n.Wb(1,"div",44),n.Rb(2,"i",45),n.ic(3,"translate"),n.Qc(4),n.Oc(5,qk,1,0,"i",46),n.Qc(6,"\xa0 "),n.Rb(7,"i",47),n.Vb(),n.Wb(8,"div",44),n.Rb(9,"i",48),n.ic(10,"translate"),n.Qc(11),n.Vb(),n.Wb(12,"div",44),n.Rb(13,"i",49),n.ic(14,"translate"),n.Qc(15),n.Vb(),n.Wb(16,"div",44),n.Rb(17,"i",50),n.ic(18,"translate"),n.Qc(19),n.ic(20,"date"),n.Vb(),n.Wb(21,"div",51),n.Rb(22,"i",52),n.ic(23,"translate"),n.Qc(24),n.ic(25,"date"),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.oc("ngClass",n.vc(30,Kk,i.resId==t.res_id)),n.Db(2),n.pc("title",n.jc(3,14,"lang.chronoNumber")),n.Db(2),n.Sc(" ",t.alt_identifier," "),n.Db(1),n.oc("ngIf",t.allSigned),n.Db(2),n.pc("title",t.priorityLabel),n.oc("ngStyle",n.vc(32,Yk,t.priorityColor)),n.Db(2),n.pc("title",n.jc(10,16,"lang.object")),n.Db(2),n.Sc(" ",t.subject," "),n.Db(2),n.pc("title",n.jc(14,18,"lang.contactInfo")),n.Db(2),n.Sc(" ",t.sender," "),n.Db(2),n.pc("title",n.jc(18,20,"lang.arrivalDate")),n.Db(2),n.Sc(" ",n.kc(20,22,t.creation_date,"dd/MM/y")," "),n.Db(3),n.pc("title",n.jc(23,25,"lang.processLimitDate")),n.Db(2),n.Sc(" ",n.kc(25,27,t.process_limit_date,"dd/MM/y")," ")}}function Zk(t,e){1&t&&(n.Wb(0,"div",54),n.Rb(1,"i",55),n.Vb())}function tS(t,e){1&t&&n.Rb(0,"i",66)}function eS(t,e){1&t&&n.Rb(0,"i",67)}function iS(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",65),n.dc("click",(function(){return n.Dc(t),n.hc(3).displayPanel("RESLEFT")})),n.Oc(1,tS,1,0,"i",64),n.Oc(2,eS,1,0,"i",63),n.Vb()}if(2&t){const t=n.hc(3);n.Db(1),n.oc("ngIf",t.showResLeftPanel),n.Db(1),n.oc("ngIf",!t.showResLeftPanel)}}const nS=function(t){return{panelSelectedThumbnail:t}};function aS(t,e){if(1&t){const t=n.Xb();n.Wb(0,"img",76),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc(5).changeLeftViewer(i)})),n.ic(1,"async"),n.ic(2,"secureUrl"),n.Vb()}if(2&t){const t=e.$implicit,i=e.index,a=n.hc(5);n.pc("title",t.title),n.oc("src",n.jc(1,3,n.jc(2,5,t.thumbnailLink)),n.Gc)("ngClass",n.vc(7,nS,i==a.leftSelectedThumbnail))}}function sS(t,e){if(1&t&&(n.Wb(0,"div",73),n.Wb(1,"div",74),n.Oc(2,aS,3,9,"img",75),n.Vb(),n.Vb()),2&t){const t=n.hc(4);n.Db(2),n.oc("ngForOf",t.signatureBook.documents)}}function oS(t,e){1&t&&n.Rb(0,"i",81)}function rS(t,e){if(1&t&&(n.Wb(0,"sup",82),n.Qc(1),n.Vb()),2&t){const t=n.hc(5);n.Db(1),n.Rc(t.signatureBook.documents.length-1)}}function cS(t,e){1&t&&n.Rb(0,"i",83)}function lS(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",77),n.dc("click",(function(){return n.Dc(t),n.hc(4).displayPanel("TOPLEFT")})),n.ic(1,"translate"),n.Oc(2,oS,1,0,"i",78),n.Oc(3,rS,2,1,"sup",79),n.Oc(4,cS,1,0,"i",80),n.Vb()}if(2&t){const t=n.hc(4);n.rc("title","",t.signatureBook.documents.length-1," ",n.jc(1,5,"lang.mailAttachments"),""),n.Db(2),n.oc("ngIf",!t.showTopLeftPanel),n.Db(1),n.oc("ngIf",!t.showTopLeftPanel),n.Db(1),n.oc("ngIf",t.showTopLeftPanel)}}const dS=function(t){return{height:t}};function hS(t,e){if(1&t){const t=n.Xb();n.Wb(0,"pdf-viewer",84,85),n.dc("error",(function(){n.Dc(t);const e=n.hc(4);return e.pdfViewerError(e.leftViewerLink)})),n.ic(2,"async"),n.ic(3,"secureUrl"),n.Vb()}if(2&t){const t=n.hc(4);n.oc("src",n.jc(2,6,n.jc(3,8,t.leftViewerLink)))("render-text",!0)("fit-to-page",!1)("original-size",!0)("ngStyle",n.vc(10,dS,t.showTopLeftPanel?"84%":"99%"))("show-all",!0)}}function uS(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",86),n.Wb(1,"div",87),n.Qc(2),n.ic(3,"translate"),n.Rb(4,"br"),n.Wb(5,"sub"),n.Qc(6),n.ic(7,"translate"),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Wb(9,"div",88),n.Wb(10,"a",89),n.dc("click",(function(){n.Dc(t);const e=n.hc(4);return e.downloadOriginalFile(e.signatureBook.documents[e.leftSelectedThumbnail].res_id)})),n.ic(11,"translate"),n.Rb(12,"i",90),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(4);n.oc("ngStyle",n.vc(15,dS,t.showTopLeftPanel?"79%":"96%")),n.Db(2),n.Sc(" ",n.jc(3,7,"lang.noOverviewAvailable"),""),n.Db(4),n.Vc("",n.jc(7,9,"lang.pdfVersionFile"),' "',t.signatureBook.documents[t.leftSelectedThumbnail].title,".",t.signatureBook.documents[t.leftSelectedThumbnail].format,'" ',n.jc(8,11,"lang.isNotAvailable"),"."),n.Db(4),n.pc("title",n.jc(11,13,"lang.dlAttachment"))}}function pS(t,e){if(1&t&&(n.Wb(0,"div",68),n.Oc(1,sS,3,1,"div",69),n.Oc(2,lS,5,7,"div",70),n.Oc(3,hS,4,12,"pdf-viewer",71),n.Oc(4,uS,13,17,"div",72),n.Vb()),2&t){const t=n.hc(3);n.Db(1),n.oc("ngIf",t.showTopLeftPanel),n.Db(1),n.oc("ngIf",t.signatureBook.documents.length-1>0),n.Db(1),n.oc("ngIf",""!=t.leftViewerLink&&(0==t.leftSelectedThumbnail||"pdf"==t.signatureBook.documents[t.leftSelectedThumbnail].format||t.signatureBook.documents[t.leftSelectedThumbnail].isConverted)),n.Db(1),n.oc("ngIf",t.leftSelectedThumbnail>0&&"pdf"!=t.signatureBook.documents[t.leftSelectedThumbnail].format&&!t.signatureBook.documents[t.leftSelectedThumbnail].isConverted)}}function bS(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",91),n.Wb(1,"app-notes-list",92,93),n.dc("reloadBadgeNotes",(function(e){return n.Dc(t),n.hc(3).refreshBadge(e,"notes")})),n.Vb(),n.Vb()}if(2&t){const t=n.hc(3);n.Db(1),n.oc("editMode",!0)("resId",t.resId)}}function fS(t,e){if(1&t&&(n.Wb(0,"div",94),n.Rb(1,"app-visa-workflow",95,96),n.Vb()),2&t){const t=n.hc(3);n.Db(1),n.oc("resId",t.resId)("adminMode",t.privilegeService.hasCurrentUserPrivilege("config_visa_workflow"))("target","signatureBook")}}function mS(t,e){if(1&t&&(n.Wb(0,"div",91),n.Rb(1,"app-history-list",97,98),n.Vb()),2&t){const t=n.hc(3);n.Db(1),n.oc("resId",t.resId)}}function gS(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",91),n.Wb(1,"app-linked-resource-list",99,100),n.dc("reloadBadgeLinkedResources",(function(e){return n.Dc(t),n.hc(3).refreshBadge(e,"linkedResources")})),n.Vb(),n.Vb()}if(2&t){const t=n.hc(3);n.Db(1),n.oc("resId",t.resId)}}function vS(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",101),n.dc("click",(function(){return n.Dc(t),n.hc(3).saveTool()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",102),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.saveModifications"))}function _S(t,e){1&t&&n.Rb(0,"i",67)}function yS(t,e){1&t&&n.Rb(0,"i",66)}const xS=function(t){return{width:t}},CS=function(t){return{right:t}};function OS(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",56),n.Oc(1,iS,3,2,"div",57),n.Oc(2,pS,5,4,"div",58),n.Oc(3,bS,3,2,"div",59),n.Oc(4,fS,3,3,"div",60),n.Oc(5,mS,3,1,"div",59),n.Oc(6,gS,3,1,"div",59),n.Oc(7,vS,3,3,"button",61),n.Wb(8,"div",62),n.dc("click",(function(){return n.Dc(t),n.hc(2).displayPanel("MIDDLE")})),n.Oc(9,_S,1,0,"i",63),n.Oc(10,yS,1,0,"i",64),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.oc("ngStyle",n.vc(11,xS,t.leftContentWidth)),n.Db(1),n.oc("ngIf",t.showLeftPanel&&t.showRightPanel),n.Db(1),n.oc("ngIf","document"==t.headerTab),n.Db(1),n.oc("ngIf","notes"==t.headerTab),n.Db(1),n.oc("ngIf","visaCircuit"==t.headerTab),n.Db(1),n.oc("ngIf","history"==t.headerTab),n.Db(1),n.oc("ngIf","linkedResources"==t.headerTab),n.Db(1),n.oc("ngIf",t.isToolModified()),n.Db(1),n.oc("ngStyle",n.vc(13,CS,t.showRightPanel?"-10px":"0px")),n.Db(1),n.oc("ngIf",t.showRightPanel),n.Db(1),n.oc("ngIf",!t.showRightPanel)}}function DS(t,e){1&t&&n.Rb(0,"i",66)}function wS(t,e){1&t&&n.Rb(0,"i",67)}function MS(t,e){1&t&&(n.Wb(0,"sup",122),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.signed")))}function kS(t,e){if(1&t&&(n.Wb(0,"div",113),n.Wb(1,"label"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"span"),n.Qc(5),n.Vb(),n.Vb()),2&t){const t=n.hc(4);n.pc("title",t.signatureBook.attachments[t.rightSelectedThumbnail].typist),n.Db(2),n.Sc("",n.jc(3,3,"lang.createdBy")," :\xa0"),n.Db(3),n.Rc(t.signatureBook.attachments[t.rightSelectedThumbnail].typist)}}function SS(t,e){if(1&t&&(n.Wb(0,"div",113),n.ic(1,"translate"),n.ic(2,"date"),n.Wb(3,"label"),n.Wb(4,"i"),n.Qc(5,"*"),n.Vb(),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Wb(8,"span"),n.Qc(9),n.Vb(),n.Vb()),2&t){const t=n.hc(4);n.sc("title","",n.jc(1,5,"lang.modifiedBy")," : ",t.signatureBook.attachments[t.rightSelectedThumbnail].updated_by," le ",n.kc(2,7,t.signatureBook.attachments[t.rightSelectedThumbnail].doc_date,"dd/MM/y"),""),n.Db(6),n.Sc(" ",n.jc(7,10,"lang.createdBy")," :\xa0"),n.Db(3),n.Rc(t.signatureBook.attachments[t.rightSelectedThumbnail].typist)}}function IS(t,e){1&t&&n.Rb(0,"i",123)}function PS(t,e){1&t&&n.Rb(0,"i",83)}function VS(t,e){if(1&t&&n.Rb(0,"app-document-viewer",124,125),2&t){const t=n.hc(4);n.oc("editMode",!0)("hideTools",!0)("mode",t.signatureBook.attachments[t.rightSelectedThumbnail].isResource?"mainDocument":"attachment")("resId",t.signatureBook.attachments[t.rightSelectedThumbnail].signed?t.signatureBook.attachments[t.rightSelectedThumbnail].viewerId:t.signatureBook.attachments[t.rightSelectedThumbnail].res_id)("title",t.signatureBook.attachments[t.rightSelectedThumbnail].identifier)}}function RS(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",86),n.Wb(1,"div",87),n.Qc(2),n.ic(3,"translate"),n.Rb(4,"br"),n.Wb(5,"sub"),n.Qc(6),n.ic(7,"translate"),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Wb(9,"div",88),n.Wb(10,"a",89),n.dc("click",(function(){n.Dc(t);const e=n.hc(4);return e.downloadOriginalFile(e.signatureBook.attachments[e.rightSelectedThumbnail].res_id)})),n.ic(11,"translate"),n.Rb(12,"i",90),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(4);n.oc("ngStyle",n.vc(15,dS,t.showTopRightPanel?"79%":"96%")),n.Db(2),n.Sc(" ",n.jc(3,7,"lang.noOverviewAvailable"),""),n.Db(4),n.Vc("",n.jc(7,9,"lang.pdfVersionFile"),' "',t.signatureBook.attachments[t.rightSelectedThumbnail].title,".",t.signatureBook.attachments[t.rightSelectedThumbnail].format,'" ',n.jc(8,11,"lang.isNotAvailable"),"."),n.Db(4),n.pc("title",n.jc(11,13,"lang.dlAttachment"))}}function jS(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",86),n.Rb(1,"div",126),n.ic(2,"translate"),n.Wb(3,"div"),n.Wb(4,"a",127),n.dc("click",(function(){n.Dc(t);const e=n.hc(4);return e.showAttachment(e.signatureBook.attachments[e.rightSelectedThumbnail])})),n.ic(5,"translate"),n.Rb(6,"i",128),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(4);n.oc("ngStyle",n.vc(7,dS,t.showTopRightPanel?"79%":"96%")),n.Db(1),n.oc("innerHTML",n.jc(2,3,"lang.editingAttachmentInterrupted"),n.Ec),n.Db(3),n.pc("title",n.jc(5,5,"lang.editAttachment"))}}const AS=function(t){return{display:t}};function WS(t,e){if(1&t){const t=n.Xb();n.Wb(0,"img",133),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc(7);return a.signFile(a.signatureBook.attachments[a.rightSelectedThumbnail],i)})),n.ic(1,"async"),n.ic(2,"secureUrl"),n.Vb()}if(2&t){const t=e.$implicit,i=e.index,a=n.hc(7);n.pc("title",t.signature_label),n.oc("src",n.jc(1,3,n.jc(2,5,"../rest/users/"+t.user_serial_id+"/signatures/"+t.id+"/content")),n.Gc)("ngStyle",n.vc(7,AS,!a.showSignaturesPanel&&i>0?"none":""))}}function TS(t,e){if(1&t&&(n.Wb(0,"span"),n.Oc(1,WS,3,9,"img",132),n.Vb()),2&t){const t=n.hc(6);n.Db(1),n.oc("ngForOf",t.signatureBook.signatures)}}function ES(t,e){1&t&&n.Rb(0,"i",134)}function FS(t,e){if(1&t&&(n.Wb(0,"span"),n.Oc(1,TS,2,1,"span",3),n.Oc(2,ES,1,0,"i",131),n.Vb()),2&t){const t=n.hc(5);n.Db(1),n.oc("ngIf",!t.loadingSign),n.Db(1),n.oc("ngIf",t.loadingSign)}}function LS(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",135),n.dc("click",(function(){n.Dc(t);const e=n.hc(5);return e.unsignFile(e.signatureBook.attachments[e.rightSelectedThumbnail])})),n.Rb(1,"i",136),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.pc("title",n.jc(2,1,"lang.unsign")))}const QS=function(t){return[t]},NS=function(t){return{"box-shadow":t}};function zS(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",129),n.dc("mouseenter",(function(){return n.Dc(t),n.hc(4).showSignaturesPanel=!0}))("mouseleave",(function(){return n.Dc(t),n.hc(4).showSignaturesPanel=!1})),n.Oc(1,FS,3,2,"span",3),n.Oc(2,LS,3,3,"span",130),n.Vb()}if(2&t){const t=n.hc(4);n.oc("ngClass",n.vc(4,QS,"SIGN"==t.signatureBook.attachments[t.rightSelectedThumbnail].status?"signed":""))("ngStyle",n.vc(6,NS,t.signatureBook.listinstance.requested_signature?"inset 0px 0px 5px 0px red":"inset 0px 0px 5px 0px #656565;")),n.Db(1),n.oc("ngIf","SIGN"!=t.signatureBook.attachments[t.rightSelectedThumbnail].status&&t.signatureBook.signatures[0]),n.Db(1),n.oc("ngIf","SIGN"==t.signatureBook.attachments[t.rightSelectedThumbnail].status)}}function BS(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",111),n.Wb(1,"div",112),n.Wb(2,"div",113),n.Wb(3,"label"),n.Qc(4,"Type :\xa0"),n.Vb(),n.Wb(5,"span"),n.Qc(6),n.Oc(7,MS,3,3,"sup",114),n.Vb(),n.Vb(),n.Wb(8,"div",113),n.Wb(9,"label"),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Wb(12,"span"),n.Qc(13),n.Vb(),n.Vb(),n.Wb(14,"div",113),n.Wb(15,"label"),n.Qc(16),n.ic(17,"translate"),n.Vb(),n.Wb(18,"span"),n.Qc(19),n.Vb(),n.Vb(),n.Wb(20,"div"),n.Oc(21,kS,6,5,"div",115),n.Oc(22,SS,10,12,"div",115),n.Wb(23,"div",116),n.Wb(24,"label"),n.Qc(25),n.ic(26,"translate"),n.Vb(),n.Wb(27,"span"),n.Qc(28),n.ic(29,"date"),n.Vb(),n.Vb(),n.Wb(30,"div",113),n.ic(31,"date"),n.Wb(32,"label"),n.Qc(33),n.ic(34,"translate"),n.Vb(),n.Wb(35,"span"),n.Qc(36),n.ic(37,"date"),n.Vb(),n.Vb(),n.Wb(38,"div",113),n.Wb(39,"label"),n.Qc(40),n.ic(41,"translate"),n.Vb(),n.Wb(42,"span"),n.Qc(43),n.Vb(),n.Vb(),n.Wb(44,"div",116),n.Wb(45,"label"),n.Qc(46,"Version :\xa0"),n.Vb(),n.Wb(47,"span"),n.Qc(48),n.Vb(),n.Rb(49,"i",117),n.Vb(),n.Wb(50,"div",116),n.Wb(51,"label"),n.Qc(52,"Format :\xa0"),n.Vb(),n.Wb(53,"span"),n.Qc(54),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(55,"div",118),n.dc("click",(function(){return n.Dc(t),n.hc(3).displayPanel("TOPRIGHT")})),n.ic(56,"translate"),n.Oc(57,IS,1,0,"i",119),n.Oc(58,PS,1,0,"i",80),n.Vb(),n.Oc(59,VS,2,5,"app-document-viewer",120),n.Oc(60,RS,13,17,"div",72),n.Oc(61,jS,7,9,"div",72),n.Oc(62,zS,3,8,"div",121),n.Vb()}if(2&t){const t=n.hc(3);n.Db(1),n.oc("ngStyle",n.vc(51,AS,t.showTopRightPanel?"block":"none")),n.Db(1),n.pc("title",t.signatureBook.attachments[t.rightSelectedThumbnail].attachment_type),n.Db(4),n.Sc("",t.signatureBook.attachments[t.rightSelectedThumbnail].attachment_type," "),n.Db(1),n.oc("ngIf","SIGN"==t.signatureBook.attachments[t.rightSelectedThumbnail].status),n.Db(1),n.pc("title",t.signatureBook.attachments[t.rightSelectedThumbnail].title),n.Db(2),n.Sc("",n.jc(11,30,"lang.object")," :\xa0"),n.Db(3),n.Rc(t.signatureBook.attachments[t.rightSelectedThumbnail].title),n.Db(1),n.pc("title",t.signatureBook.attachments[t.rightSelectedThumbnail].destUser),n.Db(2),n.Sc("",n.jc(17,32,"lang.for")," :\xa0"),n.Db(3),n.Rc(t.signatureBook.attachments[t.rightSelectedThumbnail].destUser),n.Db(2),n.oc("ngIf",!t.signatureBook.attachments[t.rightSelectedThumbnail].updated_by),n.Db(1),n.oc("ngIf",t.signatureBook.attachments[t.rightSelectedThumbnail].updated_by),n.Db(3),n.Sc("",n.jc(26,34,"lang.createdOn")," :\xa0"),n.Db(3),n.Rc(n.kc(29,36,t.signatureBook.attachments[t.rightSelectedThumbnail].creation_date,"dd/MM/y \xe0 HH:mm")),n.Db(2),n.pc("title",n.kc(31,39,t.signatureBook.attachments[t.rightSelectedThumbnail].validation_date,"dd/MM/y")),n.Db(3),n.Sc("",n.jc(34,42,"lang.back")," :\xa0"),n.Db(3),n.Rc(n.kc(37,44,t.signatureBook.attachments[t.rightSelectedThumbnail].validation_date,"dd/MM/y")),n.Db(2),n.pc("title",t.signatureBook.attachments[t.rightSelectedThumbnail].identifier),n.Db(2),n.Sc("",n.jc(41,47,"lang.chrono")," :\xa0"),n.Db(3),n.Rc(t.signatureBook.attachments[t.rightSelectedThumbnail].identifier),n.Db(5),n.Rc(t.signatureBook.attachments[t.rightSelectedThumbnail].relation),n.Db(1),n.oc("ngStyle",n.vc(53,AS,t.signatureBook.attachments[t.rightSelectedThumbnail].relation>1?"":"none")),n.Db(5),n.Rc(t.signatureBook.attachments[t.rightSelectedThumbnail].format.toUpperCase()),n.Db(1),n.pc("title",n.jc(56,49,"lang.details")),n.Db(2),n.oc("ngIf",!t.showTopRightPanel),n.Db(1),n.oc("ngIf",t.showTopRightPanel),n.Db(1),n.oc("ngIf",t.signatureBook.attachments[t.rightSelectedThumbnail].isConverted),n.Db(1),n.oc("ngIf","pdf"!=t.signatureBook.attachments[t.rightSelectedThumbnail].format&&"TMP"!=t.signatureBook.attachments[t.rightSelectedThumbnail].status&&!t.signatureBook.attachments[t.rightSelectedThumbnail].isConverted),n.Db(1),n.oc("ngIf","TMP"==t.signatureBook.attachments[t.rightSelectedThumbnail].status&&!t.signatureBook.attachments[t.rightSelectedThumbnail].isConverted),n.Db(1),n.oc("ngIf",t.signatureBook.signatures[0]&&t.signatureBook.canSign&&"TMP"!=t.signatureBook.attachments[t.rightSelectedThumbnail].status&&t.signatureBook.attachments[t.rightSelectedThumbnail].sign&&t.signatureBook.attachments[t.rightSelectedThumbnail].isConverted)}}function US(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-attachments-list",137,138),n.dc("reloadBadgeAttachments",(function(){return n.Dc(t),n.hc(3).refreshAttachments()}))("afterActionAttachment",(function(){return n.Dc(t),n.hc(3).refreshAttachments()})),n.Vb()}if(2&t){const t=n.hc(3);n.oc("resId",t.resId)("target","process")("canModify",t.canUpdateDocument)}}function $S(t,e){1&t&&(n.Wb(0,"div",139),n.Rb(1,"div",109),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.oc("innerHTML",n.jc(2,1,"lang.noAttachmentClickToAddOne"),n.Ec))}const HS=function(t){return{"margin-left":t}};function GS(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",103),n.Wb(1,"div",104),n.dc("click",(function(){return n.Dc(t),n.hc(2).displayPanel("LEFT")})),n.Oc(2,DS,1,0,"i",64),n.Oc(3,wS,1,0,"i",63),n.Vb(),n.Wb(4,"div",105),n.Oc(5,BS,63,55,"div",106),n.Oc(6,US,2,3,"app-attachments-list",107),n.Vb(),n.Wb(7,"div",108),n.Rb(8,"div",109),n.ic(9,"translate"),n.Vb(),n.Oc(10,$S,3,3,"div",110),n.Vb()}if(2&t){const t=n.hc(2);n.oc("ngStyle",n.vc(10,xS,t.rightContentWidth)),n.Db(1),n.oc("ngStyle",n.vc(12,HS,t.showLeftPanel?"-13px":"-2px")),n.Db(1),n.oc("ngIf",t.showLeftPanel),n.Db(1),n.oc("ngIf",!t.showLeftPanel),n.Db(2),n.oc("ngIf",t.signatureBook.attachments[t.rightSelectedThumbnail]&&!t.showAttachmentPanel),n.Db(1),n.oc("ngIf",t.showAttachmentPanel),n.Db(2),n.oc("innerHTML",n.jc(9,8,"lang.noVisaWorkflowNoSignature"),n.Ec),n.Db(2),n.oc("ngIf",!t.signatureBook.attachments[t.rightSelectedThumbnail])}}function XS(t,e){1&t&&n.Rb(0,"i",150)}function qS(t,e){1&t&&n.Rb(0,"i",151)}function KS(t,e){1&t&&(n.Wb(0,"i",152),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.draft")))}function YS(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",142),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc(3).changeRightViewer(i)})),n.Wb(1,"span",143),n.Rb(2,"i",144),n.Wb(3,"i",145),n.Qc(4),n.Vb(),n.Vb(),n.Oc(5,XS,1,0,"i",146),n.Oc(6,qS,1,0,"i",147),n.Oc(7,KS,3,3,"i",148),n.Rb(8,"br"),n.Wb(9,"i",149),n.Qc(10),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=e.index,a=n.hc(3);n.rc("title","[",t.attachment_type,"] ",t.title,""),n.oc("ngClass",n.vc(8,nS,i==a.rightSelectedThumbnail&&!a.showAttachmentPanel)),n.Db(4),n.Rc(t.icon),n.Db(1),n.oc("ngIf",t.sign&&"SIGN"==t.status),n.Db(1),n.oc("ngIf",t.sign&&"SIGN"!=t.status&&"TMP"!=t.status),n.Db(1),n.oc("ngIf",t.sign&&"TMP"==t.status),n.Db(3),n.Sc(".",t.format,"")}}function JS(t,e){if(1&t&&(n.Wb(0,"div",140),n.Oc(1,YS,11,10,"div",141),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("ngForOf",t.signatureBook.attachments)}}const ZS=function(t){return{visaDisabledButton:t}};function tI(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div"),n.Wb(1,"div",153),n.dc("click",(function(){n.Dc(t);const e=n.hc(2);return e.showAttachment(e.signatureBook.attachments[e.rightSelectedThumbnail])})),n.ic(2,"translate"),n.Rb(3,"i",154),n.Vb(),n.Wb(4,"div",155),n.dc("click",(function(){n.Dc(t);const e=n.hc(2);return e.delAttachment(e.signatureBook.attachments[e.rightSelectedThumbnail])})),n.ic(5,"translate"),n.Rb(6,"i",156),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.pc("title",n.jc(2,4,"lang.editDocument")),n.oc("ngClass",n.vc(8,ZS,!t.canUpdateDocument||"SIGN"==t.signatureBook.attachments[t.rightSelectedThumbnail].status)),n.Db(3),n.pc("title",n.jc(5,6,"lang.deleteAtt")),n.oc("ngClass",n.vc(10,ZS,!t.canUpdateDocument))}}function eI(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",4),n.Wb(1,"div",6),n.Wb(2,"div",7),n.Oc(3,Uk,3,6,"div",8),n.Oc(4,Hk,3,9,"div",9),n.Vb(),n.Wb(5,"div",10),n.Wb(6,"div"),n.Qc(7),n.Vb(),n.Vb(),n.Wb(8,"div",11),n.Wb(9,"i",12),n.dc("click",(function(){return n.Dc(t),n.hc().backToBasket()})),n.Vb(),n.Vb(),n.Wb(10,"div",13),n.Wb(11,"i",14),n.dc("click",(function(){return n.Dc(t),n.hc().backToDetails()})),n.ic(12,"translate"),n.Vb(),n.Qc(13,"\xa0 "),n.Wb(14,"select",15),n.Oc(15,Gk,2,2,"option",16),n.Vb(),n.Wb(16,"input",17),n.dc("click",(function(){return n.Dc(t),n.hc().validForm()})),n.ic(17,"translate"),n.Vb(),n.Vb(),n.Oc(18,Xk,3,2,"div",18),n.Vb(),n.Wb(19,"div",19),n.Wb(20,"div",20),n.Wb(21,"div",21),n.Oc(22,Jk,26,34,"div",22),n.Vb(),n.Oc(23,Zk,2,0,"div",23),n.Vb(),n.Oc(24,OS,11,15,"div",24),n.Oc(25,GS,11,14,"div",25),n.Wb(26,"div",26),n.Oc(27,JS,2,1,"div",27),n.Wb(28,"div",28),n.Wb(29,"div",29),n.dc("click",(function(){return n.Dc(t),n.hc().displayAttachmentPanel()})),n.ic(30,"translate"),n.Rb(31,"i",30),n.Vb(),n.Rb(32,"hr",31),n.Wb(33,"div",32),n.dc("click",(function(){return n.Dc(t),n.hc().createAttachment()})),n.ic(34,"translate"),n.Rb(35,"i",33),n.Rb(36,"i",34),n.Vb(),n.Oc(37,tI,7,12,"div",3),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(3),n.oc("ngIf",t.signatureBook.documents[0]&&!t.signatureBook.documents[0].inSignatureBook),n.Db(1),n.oc("ngForOf",t.processTool),n.Db(1),n.pc("title",t.signatureBook.documents[0].title),n.Db(2),n.Tc("",t.signatureBook.documents[0].alt_id," : ",t.signatureBook.documents[0].title,""),n.Db(4),n.pc("title",n.jc(12,19,"lang.linkDetails")),n.Db(4),n.oc("ngForOf",t.signatureBook.actions),n.Db(1),n.pc("value",n.jc(17,21,"lang.validate")),n.Db(2),n.oc("ngIf",!t.functions.empty(t.signatureBook.consigne)),n.Db(2),n.oc("ngStyle",n.vc(27,AS,t.showResLeftPanel?"inline-block":"none")),n.Db(2),n.oc("ngForOf",t.signatureBook.resList),n.Db(1),n.oc("ngIf",0==t.signatureBook.resList.length),n.Db(1),n.oc("ngIf",t.showLeftPanel),n.Db(1),n.oc("ngIf",t.showRightPanel),n.Db(2),n.oc("ngIf",t.signatureBook.attachments),n.Db(2),n.pc("title",n.jc(30,23,"lang.displayAtt")),n.oc("ngClass",n.vc(29,nS,t.showAttachmentPanel)),n.Db(4),n.pc("title",n.jc(34,25,"lang.createAtt")),n.Db(4),n.oc("ngIf",t.signatureBook.attachments[t.rightSelectedThumbnail])}}function iI(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div"),n.Wb(1,"span"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"span"),n.Qc(5),n.Vb(),n.Qc(6,"\xa0 "),n.Wb(7,"span"),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Wb(10,"span"),n.Qc(11),n.Vb(),n.Qc(12,"\xa0 "),n.Wb(13,"a",89),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).downloadOriginalFile(i.resId)})),n.ic(14,"translate"),n.Rb(15,"i",90),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(2),n.Sc("",n.jc(3,5,"lang.version")," : "),n.Db(3),n.Rc(t.relation),n.Db(3),n.Sc("",n.jc(9,7,"lang.object")," : "),n.Db(3),n.Rc(t.title),n.Db(2),n.pc("title",n.jc(14,9,"lang.dlAttachment"))}}function nI(t,e){if(1&t&&(n.Wb(0,"div"),n.Oc(1,iI,16,11,"div",157),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",t.signatureBook.attachments[t.rightSelectedThumbnail].obsAttachments)}}let aI=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c,l,d,h){this.translate=t,this.http=e,this.appService=i,this.route=n,this.router=a,this.zone=s,this.notify=o,this.privilegeService=r,this.dialog=c,this.functions=l,this.actionService=d,this.headerService=h,this.signatureBook={consigne:"",documents:[],attachments:[],resList:[],resListIndex:0,lang:{}},this.rightSelectedThumbnail=0,this.leftSelectedThumbnail=0,this.rightViewerLink="",this.leftViewerLink="",this.headerTab="document",this.showTopRightPanel=!1,this.showTopLeftPanel=!1,this.showResLeftPanel=!0,this.showLeftPanel=!0,this.showRightPanel=!0,this.showAttachmentPanel=!1,this.showSignaturesPanel=!1,this.loading=!1,this.loadingSign=!1,this.canUpdateDocument=!1,this.currentResourceLock=null,this.leftContentWidth="44%",this.rightContentWidth="44%",this.processTool=[{id:"notes",icon:"fas fa-pen-square fa-2x",label:this.translate.instant("lang.notesAlt"),count:0},{id:"visaCircuit",icon:"fas fa-list-ol fa-2x",label:this.translate.instant("lang.visaWorkflow"),count:0},{id:"history",icon:"fas fa-history fa-2x",label:this.translate.instant("lang.history"),count:0},{id:"linkedResources",icon:"fas fa-link fa-2x",label:this.translate.instant("lang.links"),count:0}],window.pdfWorkerSrc="pdfjs/pdf.worker.min.js",this.subscription=this.actionService.catchAction().subscribe(t=>{this.processAfterAction()})}ngOnInit(){this.loading=!0,this.route.params.subscribe(t=>{this.resId=+t.resId,this.basketId=t.basketId,this.groupId=t.groupId,this.userId=t.userId,this.signatureBook.resList=[],this.actionService.lockResource(this.userId,this.groupId,this.basketId,[this.resId]),this.http.get("../rest/signatureBook/users/"+this.userId+"/groups/"+this.groupId+"/baskets/"+this.basketId+"/resources/"+this.resId).subscribe(t=>{if(t.error)return location.hash="",void(location.search="");this.signatureBook=t,this.canUpdateDocument=t.canUpdateDocuments,this.headerTab="document",this.leftSelectedThumbnail=0,this.rightSelectedThumbnail=0,this.leftViewerLink="",this.rightViewerLink="",this.showLeftPanel=!0,this.showRightPanel=!0,this.showResLeftPanel=!0,this.showTopLeftPanel=!1,this.showTopRightPanel=!1,this.showAttachmentPanel=!1,this.leftContentWidth="44%",this.rightContentWidth="44%",this.signatureBook.documents[0]&&(this.leftViewerLink=this.signatureBook.documents[0].viewerLink,this.signatureBook.documents[0].inSignatureBook&&(this.headerTab="visaCircuit")),this.signatureBook.attachments[0]&&(this.rightViewerLink=this.signatureBook.attachments[0].viewerLink),this.signatureBook.resListIndex=this.signatureBook.resList.map(t=>t.res_id).indexOf(this.resId),this.displayPanel("RESLEFT"),this.loading=!1,setTimeout(()=>{$("#rightPanelContent").niceScroll({touchbehavior:!1,cursorcolor:"#666",cursoropacitymax:.6,cursorwidth:"4"}),0===$(".tooltipstered").length&&$("#obsVersion").tooltipster({theme:"tooltipster-light",interactive:!0})},0),this.loadBadges(),this.loadActions(),void 0!==this.appDocumentViewer&&this.appDocumentViewer.loadRessource(this.signatureBook.attachments[this.rightSelectedThumbnail].signed?this.signatureBook.attachments[this.rightSelectedThumbnail].viewerId:this.signatureBook.attachments[this.rightSelectedThumbnail].res_id,this.signatureBook.attachments[this.rightSelectedThumbnail].isResource?"mainDocument":"attachment")},t=>{this.notify.error(t.error.errors),setTimeout(()=>{this.backToBasket()},2e3)})})}loadActions(){this.http.get("../rest/resourcesList/users/"+this.userId+"/groups/"+this.groupId+"/baskets/"+this.basketId+"/actions?resId="+this.resId).subscribe(t=>{this.signatureBook.actions=t.actions},t=>{this.notify.error(t.error.errors)})}processAfterAction(){let t=-1;const e=this.signatureBook.resList.length;for(let i=0;i<e;i++)this.signatureBook.resList[i].res_id===this.resId&&(this.signatureBook.resList[i+1]?t=this.signatureBook.resList[i+1].res_id:i>0&&(t=this.signatureBook.resList[i-1].res_id));e>0&&(t>=0?($("#send").removeAttr("disabled"),$("#send").css("opacity","1"),this.changeLocation(t,"action")):this.backToBasket())}changeSignatureBookLeftContent(t){this.isToolModified()?this.openConfirmModification().afterClosed().pipe(Object(mt.a)(e=>{"ok"!==e&&(this.headerTab=t,this.showTopLeftPanel=!1)}),Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.saveTool(),this.headerTab=t,this.showTopLeftPanel=!1}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe():(this.headerTab=t,this.showTopLeftPanel=!1)}isToolModified(){return!("visaCircuit"!==this.headerTab||void 0===this.appVisaWorkflow||!this.appVisaWorkflow.isModified())||!("notes"!==this.headerTab||void 0===this.appNotesList||!this.appNotesList.isModified())}saveTool(){return Object(r.a)(this,void 0,void 0,(function*(){"visaCircuit"===this.headerTab&&void 0!==this.appVisaWorkflow?(yield this.appVisaWorkflow.saveVisaWorkflow(),this.loadBadges()):"notes"===this.headerTab&&void 0!==this.appNotesList&&(this.appNotesList.addNote(),this.loadBadges())}))}openConfirmModification(){return this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.confirm"),msg:this.translate.instant("lang.saveModifiedData"),buttonValidate:this.translate.instant("lang.yes"),buttonCancel:this.translate.instant("lang.no")}})}changeRightViewer(t){this.showAttachmentPanel=!1,this.rightViewerLink=this.signatureBook.attachments[t]?this.signatureBook.attachments[t].viewerLink:"",this.rightSelectedThumbnail=t,this.appDocumentViewer.loadRessource(this.signatureBook.attachments[this.rightSelectedThumbnail].signed?this.signatureBook.attachments[this.rightSelectedThumbnail].viewerId:this.signatureBook.attachments[this.rightSelectedThumbnail].res_id,this.signatureBook.attachments[this.rightSelectedThumbnail].isResource?"mainDocument":"attachment")}changeLeftViewer(t){this.leftViewerLink=this.signatureBook.documents[t].viewerLink,this.leftSelectedThumbnail=t}displayPanel(t){"TOPRIGHT"===t?this.showTopRightPanel=!this.showTopRightPanel:"TOPLEFT"===t?this.showTopLeftPanel=!this.showTopLeftPanel:"LEFT"===t?(this.showLeftPanel=!this.showLeftPanel,this.showResLeftPanel=!1,this.showLeftPanel?(this.rightContentWidth="48%",this.leftContentWidth="48%",$("#hideLeftContent").css("background","#fbfbfb")):(this.rightContentWidth="96%",$("#hideLeftContent").css("background","none"))):"RESLEFT"===t?(this.showResLeftPanel=!this.showResLeftPanel,this.showResLeftPanel?(this.rightContentWidth="44%",this.leftContentWidth="44%",0!==this.signatureBook.resList.length&&void 0!==this.signatureBook.resList[0].creation_date||this.http.get("../rest/signatureBook/users/"+this.userId+"/groups/"+this.groupId+"/baskets/"+this.basketId+"/resources").subscribe(t=>{this.signatureBook.resList=t.resources,this.signatureBook.resList.forEach((t,e)=>{t.res_id==this.resId&&(this.signatureBook.resListIndex=e)}),setTimeout(()=>{$("#resListContent").niceScroll({touchbehavior:!1,cursorcolor:"#666",cursoropacitymax:.6,cursorwidth:"4"}),$("#resListContent").scrollTop(0),$("#resListContent").scrollTop($(".resListContentFrameSelected").offset().top-42)},0)})):(this.rightContentWidth="48%",this.leftContentWidth="48%")):"MIDDLE"===t&&(this.showRightPanel=!this.showRightPanel,this.showResLeftPanel=!1,this.showRightPanel?(this.rightContentWidth="48%",this.leftContentWidth="48%",$("#contentLeft").css("border-right","solid 1px")):(this.leftContentWidth="96%",$("#contentLeft").css("border-right","none")))}displayAttachmentPanel(){this.showAttachmentPanel=!this.showAttachmentPanel,this.rightSelectedThumbnail=0,this.signatureBook.attachments[0]&&(this.rightViewerLink=this.signatureBook.attachments[0].viewerLink)}refreshAttachments(t="rightContent"){"rightContent"===t&&this.http.get("../rest/signatureBook/"+this.resId+"/incomingMailAttachments").subscribe(t=>{this.signatureBook.documents=t}),this.http.get("../rest/signatureBook/"+this.resId+"/attachments").subscribe(e=>{let i=0;if("add"===t){let t=!1;e.forEach((e,n)=>{t||this.signatureBook.attachments[n]&&e.res_id==this.signatureBook.attachments[n].res_id||(i=n,t=!0)})}else if("edit"===t){const t=this.signatureBook.attachments[this.rightSelectedThumbnail].res_id;e.forEach((e,n)=>{e.res_id==t&&(i=n)})}this.signatureBook.attachments=e,"add"===t||"edit"===t?this.changeRightViewer(i):"del"===t&&this.changeRightViewer(0)})}delAttachment(t){if(this.canUpdateDocument){let e=!1;e=this.signatureBook.attachments.length<=1?confirm("Attention, ceci est votre derni\xe8re pi\xe8ce jointe pour ce courrier, voulez-vous vraiment la supprimer ?"):confirm("Voulez-vous vraiment supprimer la pi\xe8ce jointe ?"),e&&this.http.delete("../rest/attachments/"+t.res_id).pipe(Object(mt.a)(()=>{this.refreshAttachments("del")}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}}signFile(t,e){!this.loadingSign&&this.signatureBook.canSign&&(this.loadingSign=!0,this.http.put(t.isResource?"../rest/resources/"+t.res_id+"/sign":"../rest/attachments/"+t.res_id+"/sign",{signatureId:e.id}).subscribe(e=>{t.isResource?(this.appDocumentViewer.loadRessource(t.res_id,"mainDocument"),this.rightViewerLink+="?tsp="+Math.floor(100*Math.random()),this.signatureBook.attachments[this.rightSelectedThumbnail].status="SIGN"):(this.appDocumentViewer.loadRessource(e.id,"attachment"),this.rightViewerLink="../rest/attachments/"+e.id+"/content",this.signatureBook.attachments[this.rightSelectedThumbnail].status="SIGN",this.signatureBook.attachments[this.rightSelectedThumbnail].idToDl=e.new_id,this.signatureBook.attachments[this.rightSelectedThumbnail].signed=!0,this.signatureBook.attachments[this.rightSelectedThumbnail].viewerId=e.id),this.signatureBook.attachments[this.rightSelectedThumbnail].viewerLink=this.rightViewerLink;let i=!0;this.signatureBook.attachments.forEach(t=>{t.sign&&"SIGN"!==t.status&&(i=!1)}),this.signatureBook.resList.length>0&&(this.signatureBook.resList[this.signatureBook.resListIndex].allSigned=i),this.showSignaturesPanel=!1,this.loadingSign=!1},t=>{this.notify.handleSoftErrors(t),this.loadingSign=!1}))}unsignFile(t){t.isResource?this.unSignMainDocument(t):this.unSignAttachment(t)}unSignMainDocument(t){this.http.put(`../rest/resources/${t.res_id}/unsign`,{}).pipe(Object(mt.a)(()=>{this.appDocumentViewer.loadRessource(t.res_id,"maintDocument"),this.rightViewerLink+="?tsp="+Math.floor(100*Math.random()),this.signatureBook.attachments[this.rightSelectedThumbnail].status="A_TRA",this.signatureBook.resList.length>0&&(this.signatureBook.resList[this.signatureBook.resListIndex].allSigned=!1),"visaCircuit"===this.headerTab&&(this.changeSignatureBookLeftContent("document"),setTimeout(()=>{this.changeSignatureBookLeftContent("visaCircuit")},0))}),Object(m.a)(t=>(403===t.status?this.notify.error(this.translate.instant("lang.youCannotUnsign")):this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}unSignAttachment(t){this.http.put("../rest/attachments/"+t.res_id+"/unsign",{}).pipe(Object(mt.a)(()=>{this.appDocumentViewer.loadRessource(t.res_id,"attachment"),this.rightViewerLink="../rest/attachments/"+t.res_id+"/content",this.signatureBook.attachments[this.rightSelectedThumbnail].viewerLink=this.rightViewerLink,this.signatureBook.attachments[this.rightSelectedThumbnail].status="A_TRA",this.signatureBook.attachments[this.rightSelectedThumbnail].idToDl=t.res_id,this.signatureBook.attachments[this.rightSelectedThumbnail].signed=!1,this.signatureBook.attachments[this.rightSelectedThumbnail].viewerId=t.res_id,this.signatureBook.resList.length>0&&(this.signatureBook.resList[this.signatureBook.resListIndex].allSigned=!1),"visaCircuit"===this.headerTab&&(this.changeSignatureBookLeftContent("document"),setTimeout(()=>{this.changeSignatureBookLeftContent("visaCircuit")},0))}),Object(m.a)(t=>(403===t.status?this.notify.error(this.translate.instant("lang.youCannotUnsign")):this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}backToBasket(){this.router.navigate(["/basketList/users/"+this.userId+"/groups/"+this.groupId+"/baskets/"+this.basketId])}backToDetails(){this.http.put("../rest/resourcesList/users/"+this.userId+"/groups/"+this.groupId+"/baskets/"+this.basketId+"/unlock",{resources:[this.resId]}).subscribe(t=>{this.router.navigate(["/resources/"+this.resId])},t=>{})}changeLocation(t,e){return Object(r.a)(this,void 0,void 0,(function*(){t!==this.resId&&(!0===(yield this.actionService.canExecuteAction([t],this.userId,this.groupId,this.basketId))?(this.actionService.stopRefreshResourceLock(),this.actionService.actionEnded||this.actionService.unlockResource(this.userId,this.groupId,this.basketId,[this.resId]),this.router.navigate(["signatureBook/users/"+this.userId+"/groups/"+this.groupId+"/baskets/"+this.basketId+"/resources/"+t])):this.backToBasket())}))}validForm(){""!==$("#signatureBookActions option:selected").val()?this.processAction():alert("Aucune action choisie")}processAction(){this.http.get(`../rest/resources/${this.resId}?light=true`).pipe(Object(mt.a)(t=>{const e=$("#signatureBookActions option:selected").val(),i=this.signatureBook.actions.filter(t=>t.id==e)[0];this.actionService.launchAction(i,this.userId,this.groupId,this.basketId,[this.resId],t,!1)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}refreshBadge(t,e){this.processTool.filter(t=>t.id===e)[0].count=t}loadBadges(){this.http.get(`../rest/resources/${this.resId}/items`).pipe(Object(mt.a)(t=>{this.processTool.forEach(e=>{e.count=void 0!==t[e.id]?t[e.id]:0})}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}createAttachment(){this.dialogRef=this.dialog.open(Ph,{disableClose:!0,panelClass:"attachment-modal-container",height:"90vh",width:"90vw",data:{resIdMaster:this.resId}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"success"===t),Object(mt.a)(()=>{this.refreshAttachments("add")}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}showAttachment(t){this.canUpdateDocument&&"SIGN"!==t.status&&(t.isResource?this.appDocumentViewer.editResource():(this.dialogRef=this.dialog.open(pu,{height:"99vh",width:this.appService.getViewMode()?"99vw":"90vw",maxWidth:this.appService.getViewMode()?"99vw":"90vw",panelClass:"attachment-modal-container",disableClose:!0,data:{resId:t.res_id}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"success"===t),Object(mt.a)(()=>{this.refreshAttachments("edit")}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()))}saveVisaWorkflow(){this.appVisaWorkflow.saveVisaWorkflow()}downloadOriginalFile(t){const e=document.createElement("a");this.http.get(`../rest/attachments/${t}/originalContent?mode=base64`).pipe(Object(mt.a)(i=>{e.href=`data:${i.mimeType};base64,${i.encodedDocument}`,e.setAttribute("download",`${t}.${i.extension}`),document.body.appendChild(e),e.click()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}ngOnDestroy(){this.actionService.stopRefreshResourceLock(),this.actionService.actionEnded||this.actionService.unlockResource(this.userId,this.groupId,this.basketId,[this.resId]),this.subscription.unsubscribe()}pdfViewerError(t){this.http.get(t).pipe(Object(m.a)(t=>(200!==t.status&&this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isToolEnabled(t){return"history"!==t||!(!this.privilegeService.hasCurrentUserPrivilege("view_full_history")&&!this.privilegeService.hasCurrentUserPrivilege("view_doc_history"))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(w.a),n.Qb(o.a),n.Qb(o.c),n.Qb(n.C),n.Qb(D.a),n.Qb(Dt.a),n.Qb(q.b),n.Qb(_t.a),n.Qb(bC),n.Qb(y.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Xc(Lk,!0),n.Xc(Qk,!0),n.Xc(Nk,!0)),2&t&&(n.yc(i=n.ec())&&(e.appVisaWorkflow=i.first),n.yc(i=n.ec())&&(e.appDocumentViewer=i.first),n.yc(i=n.ec())&&(e.appNotesList=i.first))},decls:5,vars:3,consts:[["class","visaContent",4,"ngIf"],[1,"tooltip_templates",2,"display","none"],["id","obsVersionTooltip"],[4,"ngIf"],[1,"visaContent"],[1,"fa","fa-spinner","fa-spin","fa-5x",2,"margin-left","50%","margin-top","16%","font-size","8em"],[1,"titleSignatureBook"],["id","tabSignatureBook"],["class","item",3,"title","ngClass","click",4,"ngIf"],["class","item",3,"title","ngClass","tool-disabled","click",4,"ngFor","ngForOf"],["id","labelSignatureBook",3,"title"],["id","closeSignatureBook"],[1,"fa","fa-times-circle","fa-2x",2,"cursor","pointer",3,"click"],[1,"actions"],[1,"fa","fa-info-circle","fa-2x",2,"cursor","pointer","vertical-align","middle",3,"title","click"],["id","signatureBookActions"],[3,"value",4,"ngFor","ngForOf"],["name","send","id","send","type","button",1,"button","button-form-primary-filled",3,"value","click"],["class","others",4,"ngIf"],[1,"contentSignatureBook"],["id","resListContent",1,"resListContent",3,"ngStyle"],[1,"resListContentPos"],["class","resListContentFrame",3,"ngClass","click",4,"ngFor","ngForOf"],["style","position: absolute;top: 48%; left: 3%",4,"ngIf"],["class","contentLeft","id","contentLeft",3,"ngStyle",4,"ngIf"],["class","contentRight","id","contentRight",3,"ngStyle",4,"ngIf"],[1,"panelRight"],["id","rightPanelContent","class","panelRightContent",4,"ngIf"],[2,"bottom","0px","position","absolute","width","100%"],[1,"panelRightListPj",3,"title","ngClass","click"],[1,"fa","fa-bars","fa-2x"],[2,"background-color","#666","margin-top","0px"],[1,"panelRightAddPj",3,"title","click"],[1,"fa","fa-paperclip","fa-2x"],[1,"fa","fa-plus",2,"position","absolute"],[1,"item",3,"title","ngClass","click"],[1,"fa","fa-file-alt","fa-2x"],["class","fas fa-circle haveContent",4,"ngIf"],[1,"fas","fa-circle","haveContent"],[3,"value"],[1,"others"],["id","consigne"],["type","text","readonly","readonly",1,"inputConsigne",3,"value","title"],[1,"resListContentFrame",3,"ngClass","click"],[1,"resListContentInfo"],[1,"fa","fa-compass",3,"title"],["class","fa fa-certificate",4,"ngIf"],["aria-hidden","true",1,"fa","fa-circle",2,"position","absolute","right","0px","top","-10px","font-size","25px",3,"title","ngStyle"],[1,"fa","fa-info",3,"title"],[1,"fa","fa-book",3,"title"],[1,"fa","fa-calendar-alt",3,"title"],[1,"resListContentInfo",2,"margin-top","-10px"],[1,"fa","fa-bell",3,"title"],[1,"fa","fa-certificate"],[2,"position","absolute","top","48%","left","3%"],[1,"fa","fa-spinner","fa-spin","fa-4x"],["id","contentLeft",1,"contentLeft",3,"ngStyle"],["class","hideresListContent",3,"click",4,"ngIf"],["class","contentShow",4,"ngIf"],["class","contentShow","style","width:98%;",4,"ngIf"],["class","contentShow","style","width:98%;overflow-x: hidden;",4,"ngIf"],["style","position: absolute;bottom: 20px;right:20px;","mat-fab","","color","accent",3,"title","click",4,"ngIf"],[1,"hideRightContent",3,"ngStyle","click"],["class","fa fa-chevron-right","aria-hidden","true",4,"ngIf"],["class","fa fa-chevron-left","aria-hidden","true",4,"ngIf"],[1,"hideresListContent",3,"click"],["aria-hidden","true",1,"fa","fa-chevron-left"],["aria-hidden","true",1,"fa","fa-chevron-right"],[1,"contentShow"],["class","pjDoc",4,"ngIf"],["class","pjDetailsMore","style","left:25px;",3,"title","click",4,"ngIf"],["id","leftPanelShowDocumentIframe",3,"src","render-text","fit-to-page","original-size","ngStyle","show-all","error",4,"ngIf"],["class","visaNoPdfWarning",3,"ngStyle",4,"ngIf"],[1,"pjDoc"],[2,"height","100%"],["id","thumnails_img","class","leftPanelThumbnails",3,"title","src","ngClass","click",4,"ngFor","ngForOf"],["id","thumnails_img",1,"leftPanelThumbnails",3,"title","src","ngClass","click"],[1,"pjDetailsMore",2,"left","25px",3,"title","click"],["class","fa fa-envelope-square fa-2x","aria-hidden","true",4,"ngIf"],["class","nbRes","style","position: absolute;right: 6px;top: 5px;",4,"ngIf"],["class","fa fa-chevron-up","aria-hidden","true",4,"ngIf"],["aria-hidden","true",1,"fa","fa-envelope-square","fa-2x"],[1,"nbRes",2,"position","absolute","right","6px","top","5px"],["aria-hidden","true",1,"fa","fa-chevron-up"],["id","leftPanelShowDocumentIframe",3,"src","render-text","fit-to-page","original-size","ngStyle","show-all","error"],["leftPanelShowDocumentIframe",""],[1,"visaNoPdfWarning",3,"ngStyle"],[2,"padding-top","25%"],[1,"visaPjView"],[2,"cursor","pointer",3,"title","click"],[1,"fa","fa-download","fa-2x"],[1,"contentShow",2,"width","98%"],[3,"editMode","resId","reloadBadgeNotes"],["appNotesList",""],[1,"contentShow",2,"width","98%","overflow-x","hidden"],[3,"resId","adminMode","target"],["appVisaWorkflow",""],[3,"resId"],["appHistoryList",""],[3,"resId","reloadBadgeLinkedResources"],["appLinkedResourceList",""],["mat-fab","","color","accent",2,"position","absolute","bottom","20px","right","20px",3,"title","click"],[1,"fas","fa-check",2,"height","auto","font-size","20px"],["id","contentRight",1,"contentRight",3,"ngStyle"],["id","hideLeftContent",1,"hideLeftContent",3,"ngStyle","click"],[1,"contentShow",2,"overflow","auto"],["style","height:100%;overflow: auto;",4,"ngIf"],[3,"resId","target","canModify","reloadBadgeAttachments","afterActionAttachment",4,"ngIf"],[1,"visaNoWorkflowWarning"],[2,"margin-top","200px",3,"innerHTML"],["class","visaNoPjWarning",4,"ngIf"],[2,"height","100%","overflow","auto"],[1,"pjDetails",3,"ngStyle"],[1,"infoPj",3,"title"],["style","color:#135F7F;",4,"ngIf"],["class","infoPj",3,"title",4,"ngIf"],[1,"infoPj"],["id","obsVersion","data-tooltip-content","#obsVersionTooltip","aria-hidden","true",1,"fa","fa-chevron-circle-up",2,"color","#135F7F",3,"ngStyle"],[1,"pjDetailsMore",3,"title","click"],["class","fa fa-list-alt fa-2x","aria-hidden","true",4,"ngIf"],["id","rightPanelShowDocumentIframe","style","height:100%;width:100%;",3,"editMode","hideTools","mode","resId","title",4,"ngIf"],["class","pjSign",3,"ngClass","ngStyle","mouseenter","mouseleave",4,"ngIf"],[2,"color","#135F7F"],["aria-hidden","true",1,"fa","fa-list-alt","fa-2x"],["id","rightPanelShowDocumentIframe",2,"height","100%","width","100%",3,"editMode","hideTools","mode","resId","title"],["appDocumentViewer",""],[2,"padding-top","25%",3,"innerHTML"],[3,"title","click"],[1,"fa","fa-edit","fa-2x",2,"cursor","pointer"],[1,"pjSign",3,"ngClass","ngStyle","mouseenter","mouseleave"],["style","cursor: pointer;color: green;",3,"click",4,"ngIf"],["class","fa fa-spinner fa-pulse fa-2x fa-fw",4,"ngIf"],[3,"src","ngStyle","title","click",4,"ngFor","ngForOf"],[3,"src","ngStyle","title","click"],[1,"fa","fa-spinner","fa-pulse","fa-2x","fa-fw"],[2,"cursor","pointer","color","green",3,"click"],["aria-hidden","true",1,"fa","fa-check","fa-2x",3,"title"],[3,"resId","target","canModify","reloadBadgeAttachments","afterActionAttachment"],["appAttachmentsList",""],[1,"visaNoPjWarning"],["id","rightPanelContent",1,"panelRightContent"],["style","position: relative;","class","item",3,"title","ngClass","click",4,"ngFor","ngForOf"],[1,"item",2,"position","relative",3,"title","ngClass","click"],[1,"fa-stack","fa-lg"],[1,"far","fa-file","fa-stack-2x"],[2,"font-weight","bold","letter-spacing","-1px"],["title","Le document a \xe9t\xe9 sign\xe9","style","position: absolute;top: 12px;right: 6px;","class","fa fa-circle",4,"ngIf"],["title","Le document n'a pas encore \xe9t\xe9 sign\xe9","style","position: absolute;top: 12px;right: 6px;","class","far fa-circle",4,"ngIf"],["style","color:green;-ms-transform: rotate(-35deg);-webkit-transform: rotate(-35deg);transform: rotate(-35deg);position: absolute;top: 39px;right: 1px;",4,"ngIf"],[2,"position","absolute","margin-left","-9px"],["title","Le document a \xe9t\xe9 sign\xe9",1,"fa","fa-circle",2,"position","absolute","top","12px","right","6px"],["title","Le document n'a pas encore \xe9t\xe9 sign\xe9",1,"far","fa-circle",2,"position","absolute","top","12px","right","6px"],[2,"color","green","-ms-transform","rotate(-35deg)","-webkit-transform","rotate(-35deg)","transform","rotate(-35deg)","position","absolute","top","39px","right","1px"],[1,"visaPjUp",3,"ngClass","title","click"],[1,"fa","fa-edit","fa-2x"],[1,"visaPjDel",3,"ngClass","title","click"],[1,"fa","fa-trash-alt","fa-2x"],[4,"ngFor","ngForOf"]],template:function(t,e){1&t&&(n.Oc(0,zk,2,0,"div",0),n.Oc(1,eI,38,31,"div",0),n.Wb(2,"div",1),n.Wb(3,"span",2),n.Oc(4,nI,2,1,"div",3),n.Vb(),n.Vb()),2&t&&(n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(3),n.oc("ngIf",e.signatureBook.attachments[e.rightSelectedThumbnail]&&e.signatureBook.attachments[e.rightSelectedThumbnail].relation>1))},directives:[P.t,P.s,P.w,P.q,X.z,X.J,Gs,kC,Ko,iO,Fk,k.b,S.a,Jr,Sg],pipes:[g.d,P.f,P.b,si],styles:['.selectedId[_ngcontent-%COMP%]{background-color:#f99830}#tab_visaSetWorkflow[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{white-space:pre}[draggable=true][_ngcontent-%COMP%]{cursor:move}[draggable=true][_ngcontent-%COMP%]:hover{box-shadow:0 0 5px green}[draggable=false][_ngcontent-%COMP%]:hover{cursor:not-allowed}#visa_content[_ngcontent-%COMP%]{display:block;width:100%}.droptarget[_ngcontent-%COMP%]{position:relative;background-color:rgba(19,95,127,.2);display:table;margin:10px;padding:5px;text-align:left;width:95%;cursor:default;border:2px dashed rgba(19,95,127,.2)}.droptarget_arrow[_ngcontent-%COMP%]{border:none;display:table-cell}.vised[_ngcontent-%COMP%]{opacity:1;color:green;border:2px solid green}.moved[_ngcontent-%COMP%]{opacity:.5!important;color:#666!important;border:2px solid #fff!important;text-decoration:line-through!important}.droptarget[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%}#visaUserList[_ngcontent-%COMP%]{width:45%;float:left}.droptarget.currentVis[_ngcontent-%COMP%]{color:#135f7f;border:2px solid #135f7f}.visaUserAction[_ngcontent-%COMP%], .visaUserConsigne[_ngcontent-%COMP%], .visaUserInfo[_ngcontent-%COMP%], .visaUserStatus[_ngcontent-%COMP%]{display:table-cell;vertical-align:middle}.visaUserStatus[_ngcontent-%COMP%]{width:5%}.vised[_ngcontent-%COMP%] .visaUserStatus[_ngcontent-%COMP%]{opacity:1}.visaUserInfo[_ngcontent-%COMP%]{width:55%;font-weight:700}.visaUserInfo[_ngcontent-%COMP%] .nbRes[_ngcontent-%COMP%]{background-color:grey;font-weight:400}.visaUserInfo[_ngcontent-%COMP%] sub[_ngcontent-%COMP%]{font-weight:400}.droptarget[_ngcontent-%COMP%]:hover.vised #dropZone[_ngcontent-%COMP%]{visibility:hidden}.droptarget[_ngcontent-%COMP%]:hover #dropZone[_ngcontent-%COMP%]{visibility:visible}.dropArea[_ngcontent-%COMP%]{border:3px dashed #fff;width:60%;margin:auto;opacity:.5;padding:5px}.dropArea[_ngcontent-%COMP%]:after{font-weight:bolder}#dropZone[_ngcontent-%COMP%], #dropZone[_ngcontent-%COMP%]:active{width:40px;text-align:right;opacity:.5;visibility:hidden;float:right;margin:5px}#dropZone[_ngcontent-%COMP%]:hover{cursor:-webkit-grab;cursor:grab}#dropZone[_ngcontent-%COMP%]:active{cursor:-webkit-grabbing;cursor:grabbing}.visaUserConsigne[_ngcontent-%COMP%]{width:30%}.visaUserAction[_ngcontent-%COMP%]{color:red;text-align:center;width:5%}.visaUserAction[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{cursor:pointer}.visaContent[_ngcontent-%COMP%]{position:relative;font-size:12px;display:flex;flex-direction:column;height:100vh;overflow:hidden}.visaContent[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{display:block!important;position:static!important;padding:10px;text-align:center!important}.titleSignatureBook[_ngcontent-%COMP%] .others[_ngcontent-%COMP%]{float:right;width:14%;padding:5px;vertical-align:middle;text-align:right}.titleSignatureBook[_ngcontent-%COMP%] .others[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:95%;background:#e6e6e6;border-radius:2px;border:none;padding:5px}.resListContent[_ngcontent-%COMP%]{width:8%;height:100%;text-align:center;border-right:1px solid;vertical-align:top;overflow:auto;font-size:10px}.resListContentInfo[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:95%;text-align:left;padding:5px;cursor:pointer;margin-top:0}.resListContentInfo[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{width:5%;text-align:center}.resListContentFrame[_ngcontent-%COMP%]:hover{background-color:#f99830}.resListContentFrame[_ngcontent-%COMP%]{border-bottom:1px solid #000;position:relative;overflow:hidden;background-color:#fff}.resListContentPos[_ngcontent-%COMP%]{overflow-x:hidden;overflow-y:auto}.hideLeftContent[_ngcontent-%COMP%]{z-index:1;margin-left:-13px}.hideLeftContent[_ngcontent-%COMP%], .hideRightContent[_ngcontent-%COMP%]{position:absolute;color:#666;top:45%;padding:5px;cursor:pointer;background:#fbfbfb;border-radius:40px}.hideRightContent[_ngcontent-%COMP%]{right:-10px}.hideresListContent[_ngcontent-%COMP%]{position:absolute;left:-4px;color:#666;top:45%;padding:5px;cursor:pointer;background:#fbfbfb;border-radius:40px}.contentLeft[_ngcontent-%COMP%]{position:relative;border-right:1px solid;padding-left:10px}.contentLeft[_ngcontent-%COMP%], .contentRight[_ngcontent-%COMP%]{vertical-align:top;display:inline-block;height:100%}.visaContent[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{margin:auto;width:100%;height:75vh;border:none}.contentLeft[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{height:99%}.panelRight[_ngcontent-%COMP%]{width:50px;border-left:1px solid;text-align:center;position:absolute;right:0;background-color:#fff}.panelRightContent[_ngcontent-%COMP%]{width:100%;height:69%;overflow:auto}.panelRight[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{cursor:pointer;padding:20px 10px 20px 5px}.contentRight[_ngcontent-%COMP%] .contentShow[_ngcontent-%COMP%]{display:inline-block;height:91vh}.panelRight[_ngcontent-%COMP%]{display:inline-block;height:calc(100% - 38px)}.contentLeft[_ngcontent-%COMP%] .contentShow[_ngcontent-%COMP%]{height:95vh;overflow:auto;width:98%}.contentLeft[_ngcontent-%COMP%] .contentShow[_ngcontent-%COMP%], .contentRight[_ngcontent-%COMP%] .contentShow[_ngcontent-%COMP%]{padding:5px;height:100%}.contentRight[_ngcontent-%COMP%] .contentShow[_ngcontent-%COMP%]{position:relative;vertical-align:top;width:100%}.pjDetails[_ngcontent-%COMP%], .pjDoc[_ngcontent-%COMP%]{margin-bottom:5px}.pjDetails[_ngcontent-%COMP%], .pjSign[_ngcontent-%COMP%]{background-color:#fff;display:block;width:99%;text-align:left;-o-box-shadow:inset 0 0 5px 0 #656565;box-shadow:inset 0 0 5px 0 #656565;filter:progid:DXImageTransform.Microsoft.Shadow(color=#656565,Direction=NaN,Strength=5);border-radius:5px;padding:10px;height:100px}.pjDetails[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-weight:700;cursor:inherit}.pjDetailsMore[_ngcontent-%COMP%]{z-index:1;position:absolute;left:15px;margin-top:2px;text-align:center;cursor:pointer;background:#135f7f;color:#fff;padding:10px;-o-box-shadow:0 0 10px 0 #656565;box-shadow:0 0 10px 0 #656565;filter:progid:DXImageTransform.Microsoft.Shadow(color=#656565,Direction=NaN,Strength=10)}.pjDetails[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{white-space:normal}.pjDetails[_ngcontent-%COMP%]{color:#666;font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;font-weight:400;letter-spacing:.02em}.pjDoc[_ngcontent-%COMP%]{height:100px;background-color:#fff;-o-box-shadow:inset 0 0 5px 0 #656565;box-shadow:inset 0 0 5px 0 #656565;filter:progid:DXImageTransform.Microsoft.Shadow(color=#656565,Direction=NaN,Strength=5);border-radius:5px;padding:10px}.pjDoc[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:95%;border:2px solid #fff;cursor:pointer}img.panelSelectedThumbnail[_ngcontent-%COMP%], img[_ngcontent-%COMP%]:hover.panelSelectedThumbnail{border:2px solid #135f7f;cursor:pointer}.actions[_ngcontent-%COMP%]{float:right;width:25%;padding:5px;vertical-align:middle;text-align:right;text-transform:none;border-left:1px solid #000;border-right:1px solid #000}.actions[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{width:5%}.actions[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{width:75%}.actions[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{text-align:center;width:17%}#signatureBookActions[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#000;font:400 13.3333px Arial}.titleSignatureBook[_ngcontent-%COMP%]{height:38px;font-size:12px;display:block;width:100%;border:1px solid #000;vertical-align:middle;font-weight:700;background:#135f7f;color:#fff;text-transform:uppercase;white-space:nowrap;overflow:hidden}#closeSignatureBook[_ngcontent-%COMP%]{float:right;padding:5px;width:47px;text-align:center}#labelSignatureBook[_ngcontent-%COMP%]{float:left;width:33%;padding-left:10px;margin-top:10px}#labelSignatureBook[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;display:block}#tabSignatureBook[_ngcontent-%COMP%]{float:left;width:auto}.titleSignatureBook[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:inline-block;vertical-align:middle}#tabSignatureBook[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{border-right:1px solid #000;display:table-cell;cursor:pointer;vertical-align:middle;width:60px;text-align:center;padding:5px 10px 7px;color:#666;background-color:#fbfbfb}.contentSignatureBook[_ngcontent-%COMP%]{border:1px solid #000;border-top:none;display:block;width:100%;flex:1;overflow:hidden;background-color:#fbfbfb}#tabSignatureBook[_ngcontent-%COMP%] .item.activeTabSignatureBook[_ngcontent-%COMP%]{-o-box-shadow:inset 0 0 5px 0 #656565;box-shadow:inset 0 0 5px 0 #656565;padding-left:10px;padding-right:10px}.resListContentFrameSelected[_ngcontent-%COMP%]{background-color:#f99830}.panelRightContent[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]:hover, .panelSelectedThumbnail[_ngcontent-%COMP%]{-o-box-shadow:inset 0 0 5px 0 #656565;box-shadow:inset 0 0 5px 0 #656565;background-color:#f99830}.panelSelectedThumbnail[_ngcontent-%COMP%]{color:#666!important}.infoPj[_ngcontent-%COMP%]{width:30%;display:inline-block;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis;padding-left:10px}.infoPj[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{vertical-align:top}.ng-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{text-align:left;padding:5px;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ng-table[_ngcontent-%COMP%] th.sortable[_ngcontent-%COMP%]{cursor:pointer}.ng-table[_ngcontent-%COMP%] th.sortable[_ngcontent-%COMP%] .sort-indicator[_ngcontent-%COMP%]{padding-right:18px;position:relative}.ng-table[_ngcontent-%COMP%] th.sortable[_ngcontent-%COMP%] .sort-indicator[_ngcontent-%COMP%]:after, .ng-table[_ngcontent-%COMP%] th.sortable[_ngcontent-%COMP%] .sort-indicator[_ngcontent-%COMP%]:before{content:"";border-color:#000 transparent;border-style:solid;border-width:0 4px 4px;visibility:visible;right:5px;top:50%;position:absolute;opacity:.3;margin-top:-4px}.ng-table[_ngcontent-%COMP%] th.sortable[_ngcontent-%COMP%] .sort-indicator[_ngcontent-%COMP%]:before{margin-top:2px;border:4px solid transparent;border-top-color:#000;border-bottom:none}.ng-table[_ngcontent-%COMP%] th.sortable[_ngcontent-%COMP%] .sort-indicator[_ngcontent-%COMP%]:hover:after, .ng-table[_ngcontent-%COMP%] th.sortable[_ngcontent-%COMP%] .sort-indicator[_ngcontent-%COMP%]:hover:before{opacity:1;visibility:visible}.ng-table[_ngcontent-%COMP%] th.sortable.sort-asc[_ngcontent-%COMP%], .ng-table[_ngcontent-%COMP%] th.sortable.sort-desc[_ngcontent-%COMP%]{background-color:rgba(141,192,219,.25);text-shadow:0 1px 1px hsla(0,0%,100%,.75)}.ng-table[_ngcontent-%COMP%] th.sortable.sort-asc[_ngcontent-%COMP%] .sort-indicator[_ngcontent-%COMP%]:after, .ng-table[_ngcontent-%COMP%] th.sortable.sort-desc[_ngcontent-%COMP%] .sort-indicator[_ngcontent-%COMP%]:after{margin-top:-2px}.ng-table[_ngcontent-%COMP%] th.sortable.sort-asc[_ngcontent-%COMP%] .sort-indicator[_ngcontent-%COMP%]:before, .ng-table[_ngcontent-%COMP%] th.sortable.sort-desc[_ngcontent-%COMP%] .sort-indicator[_ngcontent-%COMP%]:before{visibility:hidden}.ng-table[_ngcontent-%COMP%] th.sortable.sort-asc[_ngcontent-%COMP%] .sort-indicator[_ngcontent-%COMP%]:after, .ng-table[_ngcontent-%COMP%] th.sortable.sort-asc[_ngcontent-%COMP%] .sort-indicator[_ngcontent-%COMP%]:hover:after, .ng-table[_ngcontent-%COMP%] th.sortable.sort-desc[_ngcontent-%COMP%] .sort-indicator[_ngcontent-%COMP%]:after{visibility:visible;filter:alpha(opacity=60);-khtml-opacity:.6;-moz-opacity:.6;opacity:.6}.ng-table[_ngcontent-%COMP%] th.sortable.sort-desc[_ngcontent-%COMP%] .sort-indicator[_ngcontent-%COMP%]:after{border:4px solid transparent;border-top-color:#000;border-bottom:none;box-shadow:none}.ng-table[_ngcontent-%COMP%] th.filter[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]{margin:0;display:block;width:auto;font-size:9px;box-sizing:border-box}.ng-table[_ngcontent-%COMP%] .ng-table-group-header[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{text-align:left}.ng-table[_ngcontent-%COMP%] .ng-table-group-selector[_ngcontent-%COMP%]{display:block}.ng-table[_ngcontent-%COMP%] .ng-table-group-close[_ngcontent-%COMP%], .ng-table[_ngcontent-%COMP%] .ng-table-group-toggle[_ngcontent-%COMP%]{float:right}.ng-table[_ngcontent-%COMP%] .ng-table-group-toggle[_ngcontent-%COMP%]{margin-right:5px}@media only screen and (max-width:800px){.ng-table-responsive[_ngcontent-%COMP%]{border-bottom:1px solid #999}.ng-table-responsive[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border-top:1px solid #999;border-left:1px solid #999;border-right:1px solid #999}.ng-table-responsive[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:before{position:absolute;padding:8px;left:0;top:0;width:50%;white-space:nowrap;text-align:left;font-weight:700}.ng-table-responsive[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{text-align:left}.ng-table-responsive[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr.ng-table-filters[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:0}.ng-table-responsive[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr.ng-table-filters[_ngcontent-%COMP%] th[_ngcontent-%COMP%] form[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{padding:8px}.ng-table-responsive[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:none;border-bottom:1px solid #eee;position:relative;padding-left:50%;white-space:normal;text-align:left}.ng-table-responsive[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:before{content:attr(data-title-text)}.ng-table-responsive[_ngcontent-%COMP%], .ng-table-responsive[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%], .ng-table-responsive[_ngcontent-%COMP%] td[_ngcontent-%COMP%], .ng-table-responsive[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .ng-table-responsive[_ngcontent-%COMP%] thead[_ngcontent-%COMP%], .ng-table-responsive[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{display:block}}.ng-table-pagination[_ngcontent-%COMP%]{margin-top:0}.filter[_ngcontent-%COMP%]:after, .filter[_ngcontent-%COMP%]:before, .ng-table-group-selector[_ngcontent-%COMP%]:after, .ng-table-group-selector[_ngcontent-%COMP%]:before{display:table;content:" "}.filter[_ngcontent-%COMP%]:after, .ng-table-group-selector[_ngcontent-%COMP%]:after{clear:both}.filter[_ngcontent-%COMP%] > .filter-cell[_ngcontent-%COMP%]{float:left;box-sizing:border-box}.filter-horizontal[_ngcontent-%COMP%] > .filter-cell[_ngcontent-%COMP%]{padding:0 2px}.filter-horizontal[_ngcontent-%COMP%] > .filter-cell[_ngcontent-%COMP%]:first-child{padding-left:0}.filter-horizontal[_ngcontent-%COMP%] > .filter-cell.last[_ngcontent-%COMP%], .filter-horizontal[_ngcontent-%COMP%] > .filter-cell[_ngcontent-%COMP%]:last-child{padding-right:0}.s12[_ngcontent-%COMP%]{width:100%}.s11[_ngcontent-%COMP%]{width:91.66666666666666%}.s10[_ngcontent-%COMP%]{width:83.33333333333334%}.s9[_ngcontent-%COMP%]{width:75%}.s8[_ngcontent-%COMP%]{width:66.66666666666666%}.s7[_ngcontent-%COMP%]{width:58.333333333333336%}.s6[_ngcontent-%COMP%]{width:50%}.s5[_ngcontent-%COMP%]{width:41.66666666666667%}.s4[_ngcontent-%COMP%]{width:33.33333333333333%}.s3[_ngcontent-%COMP%]{width:25%}.s2[_ngcontent-%COMP%]{width:16.666666666666664%}.s1[_ngcontent-%COMP%]{width:8.333333333333332%}@media (max-width:468px){.s1[_ngcontent-%COMP%], .s2[_ngcontent-%COMP%], .s3[_ngcontent-%COMP%], .s4[_ngcontent-%COMP%], .s5[_ngcontent-%COMP%], .s6[_ngcontent-%COMP%], .s7[_ngcontent-%COMP%], .s8[_ngcontent-%COMP%], .s9[_ngcontent-%COMP%], .s10[_ngcontent-%COMP%], .s11[_ngcontent-%COMP%], .s12[_ngcontent-%COMP%]{width:100%}.filter[_ngcontent-%COMP%] > .filter-cell[_ngcontent-%COMP%]{padding:0}}.ng-table[_ngcontent-%COMP%]{margin-bottom:20px;max-width:100%;width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0;border-bottom:1px solid #135f7f}.ng-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{text-align:left;padding:10px}.ng-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border-bottom:1px solid #135f7f}.ng-table-counts[_ngcontent-%COMP%]{display:none}.ng-table-pagination[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:inline-block;border:1px solid #135f7f;padding:5px;margin:5px;border-radius:10px}.ng-table-pagination[_ngcontent-%COMP%] li.active[_ngcontent-%COMP%]{background:#135f7f;color:#fff}.ng-table-pagination[_ngcontent-%COMP%] li.active[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#fff}.ng-table-pagination[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:hover{background:#135f7f;color:#fff}.ng-table-pagination[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:hover a[_ngcontent-%COMP%]{color:#fff}.ng-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:rgba(141,192,219,.25)}.ng-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child, .ng-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:nth-child(2){width:20%}.ng-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:nth-child(3){width:60%}#footer[_ngcontent-%COMP%]{padding:0}.pjSign[_ngcontent-%COMP%]{text-align:left;height:auto;position:absolute;bottom:0;background:#fff;margin-bottom:5px;width:80px;transition:width .5s;overflow:auto!important}.pjSign.signed[_ngcontent-%COMP%]{width:auto!important}.pjSign[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{cursor:pointer;border:2px solid #fff;height:30px;width:auto;min-width:60px;transition:all .5s}.pjSign[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]{height:60px;width:auto;transition:all .5s}.pjSign[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]:hover{border:2px solid #135f7f}.pjSign[_ngcontent-%COMP%]:hover{display:flex;white-space:pre;overflow:hidden!important;width:95%;transition:width .5s}.visaPjView[_ngcontent-%COMP%]{color:initial}.panelRightListPj[_ngcontent-%COMP%]{padding:3px;margin-bottom:5px;cursor:pointer}.panelRightListPj[_ngcontent-%COMP%]:hover{color:#135f7f}.panelRightAddPj[_ngcontent-%COMP%]{display:block;background-color:#16a765}.panelRightAddPj[_ngcontent-%COMP%], .visaPjUp[_ngcontent-%COMP%]{margin:auto auto 10px;font-size:10px;height:40px;width:40px;cursor:pointer;padding:10px;color:#fff;border-radius:25px;-o-box-shadow:0 0 10px 0 #656565;box-shadow:0 0 10px 0 #656565;filter:progid:DXImageTransform.Microsoft.Shadow(color=#656565,Direction=NaN,Strength=10)}.visaPjUp[_ngcontent-%COMP%]{background-color:#4285f4}.visaPjDel[_ngcontent-%COMP%]{margin:auto;font-size:10px;height:40px;width:40px;cursor:pointer;padding:10px;background-color:#d14836;color:#fff;border-radius:25px;-o-box-shadow:0 0 10px 0 #656565;box-shadow:0 0 10px 0 #656565;filter:progid:DXImageTransform.Microsoft.Shadow(color=#656565,Direction=NaN,Strength=10)}.visaNoPdfWarning[_ngcontent-%COMP%]{border:dashed;font-weight:700;opacity:.5;white-space:normal;font-size:40px;text-align:center}.visaNoWorkflowWarning[_ngcontent-%COMP%]{height:97%;width:100%}.visaNoPjWarning[_ngcontent-%COMP%], .visaNoWorkflowWarning[_ngcontent-%COMP%]{font-size:40px;border:dashed;font-weight:700;opacity:.5;white-space:normal;margin-top:10px}.visaNoPjWarning[_ngcontent-%COMP%]{height:80vh}.visaDisabledButton[_ngcontent-%COMP%]{cursor:inherit;opacity:.3}.chosen-container-single[_ngcontent-%COMP%] .chosen-default[_ngcontent-%COMP%]{color:#000!important}#visa_content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{font-size:11px}.nbResZero[_ngcontent-%COMP%]{background:#666}.nbRes[_ngcontent-%COMP%], .nbResZero[_ngcontent-%COMP%]{color:#fff;padding:3px;border-radius:7px}.nbRes[_ngcontent-%COMP%]{background:#f99830}.haveContent[_ngcontent-%COMP%]{font-size:9px!important;color:#f99830;margin-left:2px}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;transition:all .1s;margin-left:5px}.inputConsigne[_ngcontent-%COMP%]{height:22px;margin-top:2px;color:#000;font-weight:400}.tool-disabled[_ngcontent-%COMP%]{cursor:not-allowed!important}.tool-disabled[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{opacity:.3}']}),t})(),sI=(()=>{class t{constructor(){this.listsProperties=[],this.listsPropertiesIndex=0,this.filterMode=!1,this.mode="basket"}initListsProperties(t,e,i,n,a=""){let s;return this.listsProperties=JSON.parse(sessionStorage.getItem("propertyList"+n)),this.listsPropertiesIndex=0,this.mode=n,null!=this.listsProperties?this.listsProperties.forEach((n,a)=>{n.id==t&&n.groupId==e&&n.targetId==i&&(this.listsPropertiesIndex=a,s=n)}):this.listsProperties=[],s&&""===a||(s={id:t,groupId:e,targetId:i,page:"0",pageSize:10,order:"",orderDir:"DESC",search:a,delayed:!1,categories:[],priorities:[],entities:[],subEntities:[],statuses:[],doctypes:[],folders:[]},this.listsProperties.push(s),this.listsPropertiesIndex=this.listsProperties.length-1,this.saveListsProperties()),s}updateListsPropertiesPage(t){this.listsProperties&&(this.listsProperties[this.listsPropertiesIndex].page=t,this.saveListsProperties())}updateListsPropertiesPageSize(t){this.listsProperties&&(this.listsProperties[this.listsPropertiesIndex].pageSize=t,this.saveListsProperties())}updateListsProperties(t){this.listsProperties&&(this.listsProperties[this.listsPropertiesIndex]=t,this.saveListsProperties())}saveListsProperties(){sessionStorage.setItem("propertyList"+this.mode,JSON.stringify(this.listsProperties))}getUrlFilters(){let t="";if(this.listsProperties){if(this.listsProperties[this.listsPropertiesIndex].delayed&&(t+="&delayed=true"),this.listsProperties[this.listsPropertiesIndex].order.length>0&&(t+="&order="+this.listsProperties[this.listsPropertiesIndex].order+" "+this.listsProperties[this.listsPropertiesIndex].orderDir),this.listsProperties[this.listsPropertiesIndex].search.length>0&&(t+="&search="+this.listsProperties[this.listsPropertiesIndex].search),this.listsProperties[this.listsPropertiesIndex].categories.length>0){let e=[];this.listsProperties[this.listsPropertiesIndex].categories.forEach(t=>{e.push(t.id)}),t+="&categories="+e.join(",")}if(this.listsProperties[this.listsPropertiesIndex].priorities.length>0){let e=[];this.listsProperties[this.listsPropertiesIndex].priorities.forEach(t=>{e.push(t.id)}),t+="&priorities="+e.join(",")}if(this.listsProperties[this.listsPropertiesIndex].statuses.length>0){let e=[];this.listsProperties[this.listsPropertiesIndex].statuses.forEach(t=>{e.push(t.id)}),t+="&statuses="+e.join(",")}if(this.listsProperties[this.listsPropertiesIndex].entities.length>0){let e=[];this.listsProperties[this.listsPropertiesIndex].entities.forEach(t=>{e.push(t.id)}),t+="&entities="+e.join(",")}if(this.listsProperties[this.listsPropertiesIndex].subEntities.length>0){let e=[];this.listsProperties[this.listsPropertiesIndex].subEntities.forEach(t=>{e.push(t.id)}),t+="&entitiesChildren="+e.join(",")}if(this.listsProperties[this.listsPropertiesIndex].doctypes.length>0){let e=[];this.listsProperties[this.listsPropertiesIndex].doctypes.forEach(t=>{e.push(t.id)}),t+="&doctypes="+e.join(",")}if(this.listsProperties[this.listsPropertiesIndex].folders.length>0){let e=[];this.listsProperties[this.listsPropertiesIndex].folders.forEach(t=>{e.push(t.id)}),t+="&folders="+e.join(",")}}return t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();function oI(t,e){1&t&&(n.Wb(0,"mat-option",32),n.Rb(1,"mat-spinner",33),n.Vb())}function rI(t,e){if(1&t&&(n.Wb(0,"mat-option",38),n.Wb(1,"span",39),n.Qc(2),n.Vb(),n.Wb(3,"span",22),n.Wb(4,"span",40),n.Qc(5),n.Vb(),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Ib("undefined","_UNDEFINED"===t.label),n.Db(1),n.Rc(t.label),n.Db(2),n.Gb("badge badge-",t.id,""),n.Db(1),n.Rc(t.count)}}function cI(t,e){if(1&t&&(n.Wb(0,"mat-optgroup",36),n.Oc(1,rI,6,8,"mat-option",37),n.Vb()),2&t){const t=n.hc().$implicit;n.oc("label",t.letter),n.Db(1),n.oc("ngForOf",t.names)}}function lI(t,e){if(1&t&&(n.Ub(0),n.Oc(1,cI,2,2,"mat-optgroup",35),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",t.names.length>0)}}function dI(t,e){if(1&t&&(n.Ub(0),n.Oc(1,lI,2,1,"ng-container",34),n.ic(2,"async"),n.Tb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",n.jc(2,1,t.stateGroupOptions))}}function hI(t,e){if(1&t&&(n.Wb(0,"mat-option",41),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",n.jc(2,2,"lang."+t.id)," ")}}function uI(t,e){1&t&&n.Rb(0,"mat-icon",42)}function pI(t,e){1&t&&n.Rb(0,"mat-icon",43)}function bI(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",44),n.dc("click",(function(){n.Dc(t);const e=n.hc();return e.listProperties.search="",e.removeFilters()})),n.ic(1,"translate"),n.Rb(2,"i",45),n.Vb()}2&t&&n.pc("title",n.jc(1,1,"lang.eraseAllFilters"))}function fI(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",46),n.dc("click",(function(){n.Dc(t);const e=n.hc();return e.listProperties.search="",e.updateFilters()})),n.ic(1,"translate"),n.ic(2,"translate"),n.Qc(3),n.Rb(4,"i",47),n.Vb()}if(2&t){const t=n.hc();n.rc("title","",n.jc(1,3,"lang.subject")," / ",n.jc(2,5,"lang.chronoNumber"),""),n.Db(3),n.Sc("",t.listProperties.search," ")}}function mI(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",48),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc().removeFilter("categories",i)})),n.ic(1,"translate"),n.Qc(2),n.Rb(3,"i",47),n.Vb()}if(2&t){const t=e.$implicit;n.pc("title",n.jc(1,2,"lang.categories")),n.Db(2),n.Sc("",t.label," ")}}function gI(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",49),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc().removeFilter("priorities",i)})),n.ic(1,"translate"),n.Qc(2),n.Rb(3,"i",47),n.Vb()}if(2&t){const t=e.$implicit;n.pc("title",n.jc(1,2,"lang.priorities")),n.Db(2),n.Sc("",t.label," ")}}function vI(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",50),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc().removeFilter("statuses",i)})),n.ic(1,"translate"),n.Qc(2),n.Rb(3,"i",47),n.Vb()}if(2&t){const t=e.$implicit;n.pc("title",n.jc(1,2,"lang.statuses")),n.Db(2),n.Sc("",t.label," ")}}function _I(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",51),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc().removeFilter("entities",i)})),n.ic(1,"translate"),n.Qc(2),n.Rb(3,"i",47),n.Vb()}if(2&t){const t=e.$implicit;n.pc("title",n.jc(1,2,"lang.entities")),n.Db(2),n.Sc("",t.label," ")}}function yI(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",52),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc().removeFilter("subEntities",i)})),n.ic(1,"translate"),n.Qc(2),n.Rb(3,"i",47),n.Vb()}if(2&t){const t=e.$implicit;n.pc("title",n.jc(1,2,"lang.subEntities")),n.Db(2),n.Sc("",t.label," ")}}function xI(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",53),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc().removeFilter("doctypes",i)})),n.ic(1,"translate"),n.Qc(2),n.Rb(3,"i",47),n.Vb()}if(2&t){const t=e.$implicit;n.pc("title",n.jc(1,2,"lang.doctypes")),n.Db(2),n.Sc("",t.label," ")}}function CI(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",54),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc().removeFilter("folders",i)})),n.ic(1,"translate"),n.Qc(2),n.Rb(3,"i",47),n.Vb()}if(2&t){const t=e.$implicit;n.pc("title",n.jc(1,2,"lang.folders")),n.Db(2),n.Sc("",t.label," ")}}let OI=(()=>{class t{constructor(t,e,i,a,s,o){this.translate=t,this.http=e,this.filtersListService=i,this.fb=a,this.latinisePipe=s,this.dialog=o,this.stateForm=this.fb.group({stateGroup:""}),this.displayColsOrder=[{id:"dest_user"},{id:"category_id"},{id:"creation_date"},{id:"process_limit_date"},{id:"entity_label"},{id:"subject"},{id:"alt_identifier"},{id:"priority"},{id:"status"},{id:"type_label"}],this.priorities=[],this.categories=[],this.entitiesList=[],this.statuses=[],this.metaSearchInput="",this.stateGroups=[],this.isLoading=!1,this.refreshEvent=new n.o,this.refreshEventAfterAction=new n.o,this.toggleAllRes=new n.o,this._filter=(t,e)=>{if("string"==typeof e){const i=e.toLowerCase();return t.filter(t=>-1!==this.latinisePipe.transform(t.label.toLowerCase()).indexOf(this.latinisePipe.transform(i)))}}}ngOnInit(){}_filterGroup(t){return t&&"string"==typeof t?this.stateGroups.map(e=>({letter:e.letter,names:this._filter(e.names,t)})).filter(t=>t.names.length>0):this.stateGroups}changeOrderDir(){this.listProperties.orderDir="ASC"===this.listProperties.orderDir?"DESC":"ASC",this.updateFilters()}updateFilters(){this.listProperties.page=0,this.filtersListService.updateListsProperties(this.listProperties),this.refreshEvent.emit()}refreshAfterAction(){this.refreshEventAfterAction.emit()}setFilters(t,e){this.listProperties[e]=t.source.checked,this.updateFilters()}selectFilter(t){this.listProperties[t.option.value.id].push({id:t.option.value.value,label:t.option.value.label}),$(".metaSearch").blur(),this.stateForm.controls.stateGroup.reset(),this.updateFilters()}metaSearch(t){this.listProperties.search=t.target.value,$(".metaSearch").blur(),this.stateForm.controls.stateGroup.reset(),this.autocomplete.closePanel(),this.updateFilters()}removeFilter(t,e){this.listProperties[t].splice(e,1),this.updateFilters()}removeFilters(){Object.keys(this.listProperties).forEach(t=>{Array.isArray(this.listProperties[t])?this.listProperties[t]=[]:"search"===t&&(this.listProperties[t]="")}),this.updateFilters()}haveFilters(){let t=!1;return Object.keys(this.listProperties).forEach(e=>{(Array.isArray(this.listProperties[e])&&this.listProperties[e].length>0||"search"===e&&""!==this.listProperties[e])&&(t=!0)}),t}setInputSearch(t){$(".metaSearch").focus(),this.metaSearchInput=t}initFilters(){this.isLoading=!0,this.stateForm.controls.stateGroup.reset(),this.stateGroups=[{letter:this.translate.instant("lang.categories"),names:[]},{letter:this.translate.instant("lang.priorities"),names:[]},{letter:this.translate.instant("lang.statuses"),names:[]},{letter:this.translate.instant("lang.entities"),names:[]},{letter:this.translate.instant("lang.subEntities"),names:[]},{letter:this.translate.instant("lang.doctypes"),names:[]},{letter:this.translate.instant("lang.folders"),names:[]}],this.http.get(".."+this.routeDatas+"?init"+this.filtersListService.getUrlFilters()).subscribe(t=>{t.categories.forEach(t=>{-1===this.listProperties.categories.map(t=>t.id).indexOf(t.id)&&this.stateGroups[0].names.push({id:"categories",value:t.id,label:null!==t.id?t.label:this.translate.instant("lang.undefined"),count:t.count})}),t.priorities.forEach(t=>{-1===this.listProperties.priorities.map(t=>t.id).indexOf(t.id)&&this.stateGroups[1].names.push({id:"priorities",value:t.id,label:null!==t.id?t.label:this.translate.instant("lang.undefined"),count:t.count})}),t.statuses.forEach(t=>{-1===this.listProperties.statuses.map(t=>t.id).indexOf(t.id)&&this.stateGroups[2].names.push({id:"statuses",value:t.id,label:null!==t.id?t.label:this.translate.instant("lang.undefined"),count:t.count})}),t.entities.forEach(t=>{-1===this.listProperties.entities.map(t=>t.id).indexOf(t.entityId)&&0===this.listProperties.subEntities.length&&this.stateGroups[3].names.push({id:"entities",value:t.entityId,label:null!==t.entityId?t.label:this.translate.instant("lang.undefined"),count:t.count})}),t.entitiesChildren.forEach(t=>{-1===this.listProperties.subEntities.map(t=>t.id).indexOf(t.entityId)&&0===this.listProperties.entities.length&&this.stateGroups[4].names.push({id:"subEntities",value:t.entityId,label:null!==t.entityId?t.label:this.translate.instant("lang.undefined"),count:t.count})}),t.doctypes.forEach(t=>{-1===this.listProperties.doctypes.map(t=>t.id).indexOf(t.id)&&this.stateGroups[5].names.push({id:"doctypes",value:t.id,label:null!==t.id?t.label:this.translate.instant("lang.undefined"),count:t.count})}),t.folders.forEach(t=>{-1===this.listProperties.folders.map(t=>t.id).indexOf(t.id)&&this.stateGroups[6].names.push({id:"folders",value:t.id,label:null!==t.id?t.label:this.translate.instant("lang.undefined"),count:t.count})}),this.isLoading=!1,this.metaSearchInput.length>0&&setTimeout(()=>{this.stateForm.controls.stateGroup.setValue(this.metaSearchInput),this.metaSearchInput=""},200)}),this.stateGroupOptions=this.stateForm.get("stateGroup").valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>this._filterGroup(t)))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(sI),n.Qb(X.h),n.Qb(Tt.c),n.Qb(q.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-filters-tool"]],viewQuery:function(t,e){var i;1&t&&n.Kc(Ne.d,!0),2&t&&n.yc(i=n.ec())&&(e.autocomplete=i.first)},inputs:{listProperties:"listProperties",title:"title",routeDatas:"routeDatas",selectedRes:"selectedRes",totalRes:"totalRes"},outputs:{refreshEvent:"refreshEvent",refreshEventAfterAction:"refreshEventAfterAction",toggleAllRes:"toggleAllRes"},features:[n.Cb([Tt.c])],decls:37,vars:35,consts:[[1,"filtersContent"],[1,"filterTool",3,"formGroup"],["floatLabel","never",1,"basket-search"],["type","text","matInput","","formControlName","stateGroup",1,"metaSearch",3,"placeholder","matAutocomplete","focus","keyup.enter"],["mat-icon-button","","matPrefix",""],[1,"fa","fa-search"],["matSuffix","","value","delayed",1,"processLimitButton",3,"checked","title","click","change"],["fontSet","fas","fontIcon","fa-stopwatch fa-2x"],[3,"optionSelected"],["autoGroup","matAutocomplete"],["class","is-loading",4,"ngIf"],[4,"ngIf"],[1,"orderTool"],[1,"basket-order"],["matPrefix","",1,"fa","fa-list"],[3,"ngModel","ngModelChange","selectionChange"],["value","",2,"text-align","center"],[3,"value",4,"ngFor","ngForOf"],[1,"ascDescTool"],["mat-fab","",2,"color","rgba(0,0,0,0.38)",3,"disabled","title","click"],["fontSet","fas","fontIcon","fa-sort-amount-down fa-2x",4,"ngIf"],["fontSet","fas","fontIcon","fa-sort-amount-up fa-2x",4,"ngIf"],[1,"filterBadges"],["class","label badge-eraser",3,"title","click",4,"ngIf"],["class","label badge-search",3,"title","click",4,"ngIf"],["class","label badge-categories",3,"title","click",4,"ngFor","ngForOf"],["class","label badge-priorities",3,"title","click",4,"ngFor","ngForOf"],["class","label badge-statuses",3,"title","click",4,"ngFor","ngForOf"],["class","label badge-entities",3,"title","click",4,"ngFor","ngForOf"],["class","label badge-subEntities",3,"title","click",4,"ngFor","ngForOf"],["class","label badge-doctypes",3,"title","click",4,"ngFor","ngForOf"],["class","label badge-folders",3,"title","click",4,"ngFor","ngForOf"],[1,"is-loading"],["diameter","50"],[4,"ngFor","ngForOf"],[3,"label",4,"ngIf"],[3,"label"],["class","filterOptionContent",3,"value",4,"ngFor","ngForOf"],[1,"filterOptionContent",3,"value"],[2,"flex","1","overflow","hidden","text-overflow","ellipsis"],[2,"min-width","auto"],[3,"value"],["fontSet","fas","fontIcon","fa-sort-amount-down fa-2x"],["fontSet","fas","fontIcon","fa-sort-amount-up fa-2x"],[1,"label","badge-eraser",3,"title","click"],[1,"fas","fa-eraser"],[1,"label","badge-search",3,"title","click"],[1,"fa","fa-times-circle"],[1,"label","badge-categories",3,"title","click"],[1,"label","badge-priorities",3,"title","click"],[1,"label","badge-statuses",3,"title","click"],[1,"label","badge-entities",3,"title","click"],[1,"label","badge-subEntities",3,"title","click"],[1,"label","badge-doctypes",3,"title","click"],[1,"label","badge-folders",3,"title","click"]],template:function(t,e){if(1&t&&(n.Wb(0,"div",0),n.Wb(1,"form",1),n.Wb(2,"mat-form-field",2),n.Wb(3,"input",3),n.dc("focus",(function(){return e.initFilters()}))("keyup.enter",(function(t){return e.metaSearch(t)})),n.Vb(),n.Wb(4,"button",4),n.Rb(5,"mat-icon",5),n.Vb(),n.Wb(6,"mat-button-toggle",6),n.dc("click",(function(t){return t.stopPropagation()}))("change",(function(t){return e.setFilters(t,"delayed")})),n.ic(7,"translate"),n.Rb(8,"mat-icon",7),n.Vb(),n.Wb(9,"mat-autocomplete",8,9),n.dc("optionSelected",(function(t){return e.selectFilter(t)})),n.Oc(11,oI,2,0,"mat-option",10),n.Oc(12,dI,3,3,"ng-container",11),n.Vb(),n.Vb(),n.Vb(),n.Wb(13,"div",12),n.Wb(14,"mat-form-field",13),n.Rb(15,"mat-icon",14),n.Wb(16,"mat-select",15),n.dc("ngModelChange",(function(t){return e.listProperties.order=t}))("selectionChange",(function(){return e.updateFilters()})),n.Wb(17,"mat-option",16),n.Qc(18),n.ic(19,"translate"),n.Vb(),n.Oc(20,hI,3,4,"mat-option",17),n.Vb(),n.Vb(),n.Vb(),n.Wb(21,"div",18),n.Wb(22,"button",19),n.dc("click",(function(){return e.changeOrderDir()})),n.ic(23,"translate"),n.ic(24,"translate"),n.Oc(25,uI,1,0,"mat-icon",20),n.Oc(26,pI,1,0,"mat-icon",21),n.Vb(),n.Vb(),n.Vb(),n.Wb(27,"div",22),n.Oc(28,bI,3,3,"span",23),n.Oc(29,fI,5,7,"span",24),n.Oc(30,mI,4,4,"span",25),n.Oc(31,gI,4,4,"span",26),n.Oc(32,vI,4,4,"span",27),n.Oc(33,_I,4,4,"span",28),n.Oc(34,yI,4,4,"span",29),n.Oc(35,xI,4,4,"span",30),n.Oc(36,CI,4,4,"span",31),n.Vb()),2&t){const t=n.zc(10);n.Db(1),n.oc("formGroup",e.stateForm),n.Db(2),n.pc("placeholder",e.title),n.oc("matAutocomplete",t),n.Db(3),n.pc("title",n.jc(7,27,"lang.displayProcessLimitRes")),n.oc("checked",e.listProperties.delayed),n.Db(3),n.Fb("autoCompletePanelFilter"),n.Db(2),n.oc("ngIf",e.isLoading),n.Db(1),n.oc("ngIf",!e.isLoading),n.Db(4),n.oc("ngModel",e.listProperties.order),n.Db(2),n.Rc(n.jc(19,29,"lang.defaultOrder")),n.Db(2),n.oc("ngForOf",e.displayColsOrder),n.Db(2),n.Lc("opacity",""==e.listProperties.order?"0.2":"1"),n.oc("disabled",""==e.listProperties.order)("title","DESC"==e.listProperties.orderDir?n.jc(23,31,"lang.descOrder"):n.jc(24,33,"lang.ascOrder")),n.Db(3),n.oc("ngIf","DESC"==e.listProperties.orderDir),n.Db(1),n.oc("ngIf","ASC"==e.listProperties.orderDir),n.Db(2),n.oc("ngIf",e.haveFilters()),n.Db(1),n.oc("ngIf",""!==e.listProperties.search),n.Db(1),n.oc("ngForOf",e.listProperties.categories),n.Db(1),n.oc("ngForOf",e.listProperties.priorities),n.Db(1),n.oc("ngForOf",e.listProperties.statuses),n.Db(1),n.oc("ngForOf",e.listProperties.entities),n.Db(1),n.oc("ngForOf",e.listProperties.subEntities),n.Db(1),n.oc("ngForOf",e.listProperties.doctypes),n.Db(1),n.oc("ngForOf",e.listProperties.folders)}},directives:[X.K,X.v,X.m,Y.c,J.b,X.d,Ne.d,X.u,X.k,k.b,Y.i,S.a,og.a,Y.j,Ne.a,P.t,ee.a,X.x,W.p,P.s,V.c,W.o],pipes:[g.d,P.b],styles:[".filtersContent[_ngcontent-%COMP%]{display:flex}.filtersContent[_ngcontent-%COMP%] .filterTool[_ngcontent-%COMP%], .filtersContent[_ngcontent-%COMP%] .orderTool[_ngcontent-%COMP%]{flex:1}.basket-search[_ngcontent-%COMP%]{color:#666;width:500px;padding-right:10px;height:55px}.basket-search[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:30px}.basket-search[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.basket-search[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;border-radius:30px}.basket-search[_ngcontent-%COMP%] .mat-form-field-label-wrapper{font-style:italic}.basket-search[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.basket-search[_ngcontent-%COMP%] .processLimitButton[_ngcontent-%COMP%]{color:#666;position:absolute;top:-32px;left:-47px;border-radius:30px}.basket-search[_ngcontent-%COMP%] .mat-button-toggle-checked[_ngcontent-%COMP%]{background-color:#f99830!important;color:#fff}.basket-order[_ngcontent-%COMP%]{color:#fff;width:300px;padding-left:10px;padding-right:10px;height:55px}.basket-order[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{font-size:30px}.basket-order[_ngcontent-%COMP%] .mat-select-value{color:#fff}.basket-order[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.basket-order[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border:2px solid #fff;border-radius:30px;display:flex;align-items:center}.basket-order[_ngcontent-%COMP%] .mat-form-field-prefix{padding-left:15px;padding-right:10px}.basket-order[_ngcontent-%COMP%] .mat-form-field-label-wrapper{color:#fff}.basket-order[_ngcontent-%COMP%] .mat-select-arrow{color:#fff;margin-right:25px}.basket-order[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.ascDescTool[_ngcontent-%COMP%] .mat-fab[_ngcontent-%COMP%]{background:#135f7f;border:2px solid #fff;color:#fff!important;box-shadow:none}.filterOptionContent[_ngcontent-%COMP%] .mat-option-text{display:flex;overflow:inherit}.mat-option[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{background:#f99830;font-size:11px}.filterBadges[_ngcontent-%COMP%] > .badge-eraser[_ngcontent-%COMP%]{margin:5px;background:none;cursor:pointer;color:#fff;font-size:20px}.filterBadges[_ngcontent-%COMP%] > .label[_ngcontent-%COMP%]{white-space:inherit}.filterBadges[_ngcontent-%COMP%] > .badge-search[_ngcontent-%COMP%]{margin:5px;background:#666;cursor:pointer}.filterBadges[_ngcontent-%COMP%] > .badge-categories[_ngcontent-%COMP%]{margin:5px;background:#78ad32;cursor:pointer}.filterBadges[_ngcontent-%COMP%] > .badge-statuses[_ngcontent-%COMP%]{margin:5px;background:#5bc0de;cursor:pointer}.filterBadges[_ngcontent-%COMP%] > .badge-priorities[_ngcontent-%COMP%]{margin:5px;background:#f9d812;cursor:pointer}.filterBadges[_ngcontent-%COMP%] > .badge-entities[_ngcontent-%COMP%]{margin:5px;background:#7d5ba6;cursor:pointer}.filterBadges[_ngcontent-%COMP%] > .badge-subEntities[_ngcontent-%COMP%]{margin:5px;background:#9440d5;cursor:pointer}.filterBadges[_ngcontent-%COMP%] > .badge-doctypes[_ngcontent-%COMP%]{margin:5px;background:#d6716f;cursor:pointer}.filterBadges[_ngcontent-%COMP%] > .badge-folders[_ngcontent-%COMP%]{margin:5px;background:#f99830;cursor:pointer} .autoCompletePanelFilter{left:25px;min-width:400px!important;max-width:90%!important}.mat-optgroup-label[_ngcontent-%COMP%]{color:#f99830;font-size:14px;font-weight:500}"]}),t})();const DI=["snav2"],wI=["actionsListContext"],MI=["appPanelList"],kI=["tableBasketListSort"],SI=["basketHome"],II=["menuShortcut"];function PI(t,e){if(1&t&&(n.Rb(0,"img",38),n.ic(1,"async"),n.ic(2,"secureUrl")),2&t){const t=n.hc();n.oc("src",n.jc(1,1,n.jc(2,3,t.thumbnailUrl)),n.Gc)}}function VI(t,e){1&t&&n.Rb(0,"mat-spinner")}function RI(t,e){if(1&t&&(n.Wb(0,"div",39),n.Oc(1,VI,1,0,"mat-spinner",16),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.isLoadingResults)}}function jI(t,e){if(1&t&&(n.Wb(0,"small"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("- ",t.selectedRes.length," ",n.jc(2,2,"lang.selected"),"")}}const AI=function(t){return{color:t}};function WI(t,e){if(1&t&&n.Rb(0,"mat-icon",56),2&t){const t=n.hc(2).$implicit;n.Hb("",t.statusImage.charAt(0),"",t.statusImage.charAt(1)," ",t.statusImage," ",t.statusImage.charAt(0),"",t.statusImage.charAt(1),"-2x"),n.pc("title",t.statusLabel),n.oc("ngStyle",n.vc(9,AI,t.priorityColor))}}function TI(t,e){1&t&&(n.Wb(0,"span",57),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.confidential")))}function EI(t,e){if(1&t&&(n.Rb(0,"mat-icon",58),n.ic(1,"translate")),2&t){const t=n.hc(2).$implicit;n.rc("title","",n.jc(1,2,"lang.warnLockResInProgress")," : ",t.locker,"")}}function FI(t,e){if(1&t&&(n.Wb(0,"span",52),n.Oc(1,WI,1,11,"mat-icon",53),n.Oc(2,TI,3,3,"span",54),n.Oc(3,EI,2,4,"mat-icon",55),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",!0!==t.isLocked),n.Db(1),n.oc("ngIf","Y"===t.confidentiality),n.Db(1),n.oc("ngIf",!0===t.isLocked)}}function LI(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"span",60),n.Rb(2,"i",61),n.ic(3,"translate"),n.Qc(4),n.Vb(),n.Tb()),2&t){const t=n.hc(2).$implicit;n.Db(2),n.pc("title",n.jc(3,2,"lang.barcode")),n.Db(2),n.Sc(" ",t.barcode,"")}}function QI(t,e){if(1&t&&(n.Ub(0),n.Qc(1),n.Tb()),2&t){const t=n.hc(2).$implicit;n.Db(1),n.Sc(" ",t.chrono," ")}}function NI(t,e){if(1&t&&(n.Wb(0,"span",59),n.Oc(1,LI,5,4,"ng-container",16),n.ic(2,"translate"),n.ic(3,"translate"),n.Oc(4,QI,2,1,"ng-container",16),n.ic(5,"translate"),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",t.chrono==n.jc(2,2,"lang.undefined")&&t.barcode!=n.jc(3,4,"lang.undefined")),n.Db(3),n.oc("ngIf",t.chrono!=n.jc(5,6,"lang.undefined"))}}function zI(t,e){1&t&&(n.Wb(0,"div",62),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.documentOutOfPerimeter")," "))}const BI=function(t){return[t]};function UI(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"button",63),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc();return e.stopPropagation(),a.togglePanel("note",i)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",64),n.Vb(),n.Wb(4,"button",63),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc();return e.stopPropagation(),a.togglePanel("attachment",i)})),n.ic(5,"translate"),n.Rb(6,"mat-icon",65),n.Vb(),n.Wb(7,"button",63),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc();return e.stopPropagation(),a.togglePanel("diffusion",i)})),n.ic(8,"translate"),n.Rb(9,"mat-icon",66),n.Vb(),n.Wb(10,"button",67),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc();return e.stopPropagation(),a.viewDocument(i)}))("mouseenter",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc().viewThumbnail(e)}))("mouseleave",(function(){return n.Dc(t),n.hc(2).closeThumbnail()})),n.ic(11,"translate"),n.ic(12,"translate"),n.Rb(13,"mat-icon",68),n.Vb(),n.Wb(14,"button",63),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc();return e.stopPropagation(),a.goToDetail(i)})),n.ic(15,"translate"),n.Rb(16,"mat-icon",69),n.Vb(),n.Tb()}if(2&t){const t=n.hc().$implicit,e=n.hc(),i=n.zc(40);n.Db(1),n.Ib("noData",0==t.countNotes),n.pc("title",n.jc(2,18,"lang.notes")),n.Db(2),n.pc("matBadgeHidden",0==t.countNotes),n.pc("matBadge",t.countNotes),n.oc("color",i.opened&&t.checked&&"note"==e.currentMode?"primary":""),n.Db(1),n.Ib("noData",0==t.countAttachments),n.pc("title",n.jc(5,20,"lang.attachments")),n.Db(2),n.pc("matBadgeHidden",0==t.countAttachments),n.pc("matBadge",t.countAttachments),n.oc("color",i.opened&&t.checked&&"attachment"==e.currentMode?"primary":""),n.Db(1),n.pc("title",n.jc(8,22,"lang.diffusionList")),n.Db(2),n.oc("color",i.opened&&t.checked&&"diffusion"==e.currentMode?"primary":""),n.Db(1),n.pc("title",t.hasDocument?n.jc(11,24,"lang.viewResource"):n.jc(12,26,"lang.noDocument")),n.oc("disabled",!t.hasDocument),n.Db(3),n.oc("ngClass",n.vc(30,BI,t.hasDocument?"fa-eye":"fa-eye-slash")),n.Db(1),n.pc("title",n.jc(15,28,"lang.linkDetails"))}}function $I(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",72),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(3);return i.stopPropagation(),s.goToFolder(a)})),n.ic(1,"translate"),n.Rb(2,"i",73),n.Qc(3),n.Vb()}if(2&t){const t=e.$implicit;n.rc("title","",n.jc(1,3,"lang.goToFolder")," : ",t.label,""),n.Db(3),n.Sc(" ",t.label,"")}}function HI(t,e){if(1&t&&(n.Wb(0,"div",70),n.Oc(1,$I,4,5,"span",71),n.ic(2,"sortBy"),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngForOf",n.kc(2,1,t.folders,"label"))}}function GI(t,e){if(1&t){const t=n.Xb();n.Wb(0,"td",40),n.Wb(1,"div",41),n.Wb(2,"span",42),n.Wb(3,"mat-checkbox",43),n.dc("change",(function(i){n.Dc(t);const a=e.$implicit;return n.hc().toggleRes(i,a)}))("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.Vb(),n.Vb(),n.Wb(4,"button",44),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc();return i.stopPropagation(),s.unfollowMail(a)})),n.ic(5,"translate"),n.Rb(6,"mat-icon",45),n.Vb(),n.Oc(7,FI,4,3,"span",46),n.Oc(8,NI,6,8,"span",47),n.Wb(9,"span",48),n.ic(10,"translate"),n.Qc(11),n.ic(12,"shorten"),n.Vb(),n.Wb(13,"span",49),n.Oc(14,zI,3,3,"div",50),n.Oc(15,UI,17,32,"ng-container",16),n.Vb(),n.Vb(),n.Oc(16,HI,3,4,"div",51),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc();n.Ib("selected-data",t.checked),n.Db(3),n.oc("checked",t.checked),n.Db(1),n.pc("title",n.jc(5,13,"lang.untrackThisMail")),n.Db(3),n.oc("ngIf",!i.appService.getViewMode()),n.Db(1),n.oc("ngIf",!i.appService.getViewMode()),n.Db(1),n.Ib("undefined",t.subject==n.jc(10,15,"lang.undefined")),n.pc("title",t.subject),n.Db(2),n.Rc(n.lc(12,17,t.subject,150,"...")),n.Db(3),n.oc("ngIf",!t.allowed),n.Db(1),n.oc("ngIf",t.allowed),n.Db(1),n.oc("ngIf",void 0!==t.folders&&t.folders.length>0)}}function XI(t,e){1&t&&n.Rb(0,"div",77)}function qI(t,e){if(1&t&&(n.Wb(0,"div",78),n.Rb(1,"i",79),n.Rb(2,"br"),n.Qc(3),n.ic(4,"translate"),n.Wb(5,"b"),n.Qc(6),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(3),n.Sc(" ",n.jc(4,2,"lang.classifyInFolder")," : "),n.Db(3),n.Rc(t.chrono)}}function KI(t,e){if(1&t){const t=n.Xb();n.Wb(0,"tr",74),n.dc("contextmenu",(function(i){n.Dc(t);const a=e.$implicit;return n.hc().open(i,a)}))("click",(function(i){n.Dc(t);const a=e.$implicit;return n.hc().open(i,a)}))("cdkDragStarted",(function(){n.Dc(t);const i=e.$implicit;return n.hc().selectSpecificRes(i)})),n.Oc(1,XI,1,0,"div",75),n.Oc(2,qI,7,4,"div",76),n.Vb()}if(2&t){const t=e.$implicit;n.Ib("locked",1==t.isLocked),n.oc("cdkDragDisabled",!t.allowed)("cdkDragData",t)}}function YI(t,e){if(1&t&&n.Rb(0,"div",80),2&t){const t=n.hc();n.oc("matTooltip",t.currentChrono)("innerHTML",t.innerHtml,n.Ec)}}const JI=function(){return[10,25,50,100,150]},ZI=function(t){return{width:t}};let tP=(()=>{class t{constructor(t,e,i,a,s,o,r,c,l,d,h,u,p){this.translate=t,this.router=e,this.route=i,this.http=a,this.dialog=s,this.sanitizer=o,this.headerService=r,this.filtersListService=c,this.notify=l,this.overlay=d,this.viewContainerRef=h,this.appService=u,this.foldersService=p,this.loading=!1,this.docUrl="",this.injectDatasParam={resId:0,editable:!1},this.currentResource={},this.filtersChange=new n.o,this.dragInit=!0,this.displayedColumnsBasket=["resId"],this.displayedMainData=[{value:"chrono",cssClasses:["softColorData","align_centerData","chronoData"],icon:""},{value:"subject",cssClasses:["longData"],icon:""}],this.resultsLength=0,this.isLoadingResults=!0,this.listProperties={},this.currentChrono="",this.currentMode="",this.thumbnailUrl="",this.selectedRes=[],this.allResInBasket=[],this.selectedDiffusionTab=0,this.folderInfo={id:0,label:"",ownerDisplayName:"",entitiesSharing:[]},this.destroy$=new da.a,this.currentSelectedChrono="",this.subscription=this.foldersService.catchEvent().subscribe(t=>{"function"===t.type&&"refreshDao"===t.content&&this.refreshDao()})}ngOnInit(){this.loading=!1,this.isLoadingResults=!1,this.route.params.subscribe(t=>{this.dragInit=!0,this.destroy$.next(!0),this.http.get("../rest/followedResources").subscribe(t=>{this.headerService.setHeader(this.translate.instant("lang.followedMail"),"","fas fa-star")}),this.basketUrl="../rest/followedResources",this.filtersListService.filterMode=!1,this.selectedRes=[],this.listProperties=this.filtersListService.initListsProperties(this.headerService.user.id,0,null,"followed"),setTimeout(()=>{this.dragInit=!1},1e3),this.initResultList()},t=>{this.notify.handleErrors(t)})}ngOnDestroy(){this.destroy$.next(!0)}initResultList(){this.resultListDatabase=new eP(this.http,this.filtersListService),this.paginator.pageIndex=this.listProperties.page,this.paginator.pageSize=this.listProperties.pageSize,this.sort.sortChange.subscribe(()=>this.paginator.pageIndex=0),Object(gy.a)(this.sort.sortChange,this.paginator.page,this.filtersChange).pipe(Object(Zo.a)(this.destroy$),Object(Qe.a)({}),Object(ft.a)(()=>(this.isLoadingResults=!0,this.resultListDatabase.getRepoIssues(this.sort.active,this.sort.direction,this.paginator.pageIndex,this.basketUrl,this.filtersListService.getUrlFilters(),this.paginator.pageSize))),Object(l.a)(t=>(this.isLoadingResults=!1,t=this.processPostData(t),this.resultsLength=t.countResources,this.allResInBasket=t.allResources,t.resources)),Object(m.a)(t=>(this.notify.handleErrors(t),this.router.navigate(["/home"]),this.isLoadingResults=!1,Object(c.a)(!1)))).subscribe(t=>this.data=t)}goTo(t){this.filtersListService.filterMode=!1,this.docUrl==="../rest/resources/"+t.resId+"/content"&&this.sidenavRight.opened?this.sidenavRight.close():(this.docUrl="../rest/resources/"+t.resId+"/content",this.currentChrono=t.chrono,this.innerHtml=this.sanitizer.bypassSecurityTrustHtml("<iframe style='height:100%;width:100%;' src='"+this.docUrl+"' class='embed-responsive-item'></iframe>"),this.sidenavRight.open())}goToDetail(t){this.router.navigate(["/resources/"+t.resId])}goToFolder(t){this.router.navigate(["/folders/"+t.id])}togglePanel(t,e){e.checked=!0,this.toggleAllRes({checked:!1}),this.toggleRes({checked:!0},e),this.currentResource.resId===e.resId&&this.sidenavRight.opened&&this.currentMode===t?this.sidenavRight.close():(this.currentMode=t,this.currentResource=e,this.appPanelList.loadComponent(t,e),this.sidenavRight.open())}refreshBadgeNotes(t){this.currentResource.countNotes=t}refreshBadgeAttachments(t){this.currentResource.countAttachments=t}refreshDao(){this.paginator.pageIndex=this.listProperties.page,this.filtersChange.emit()}refreshDaoAfterAction(){this.sidenavRight.close(),this.refreshDao(),this.toggleAllRes({checked:!1})}viewThumbnail(t){t.hasDocument&&(this.thumbnailUrl="../rest/resources/"+t.resId+"/thumbnail",$("#viewThumbnail").show(),$("#listContent").css({overflow:"hidden"}))}closeThumbnail(){$("#viewThumbnail").hide(),$("#listContent").css({overflow:"auto"})}processPostData(t){return t.resources.forEach(t=>{Object.keys(t).forEach(e=>{"statusImage"===e&&null==t[e]?t[e]="fa-question undefined":null!=t[e]&&""!==t[e]||-1!==["closingDate","countAttachments","countNotes","display","mailTracking","hasDocument","folders","binding"].indexOf(e)||(t[e]=this.translate.instant("lang.undefined"))}),t.checked=-1!==this.selectedRes.indexOf(t.resId)}),t}toggleRes(t,e){if(t.checked)-1===this.selectedRes.indexOf(e.resId)&&(this.selectedRes.push(e.resId),e.checked=!0);else{const t=this.selectedRes.indexOf(e.resId);this.selectedRes.splice(t,1),e.checked=!1}}toggleAllRes(t){this.selectedRes=[],t.checked?(this.data.forEach(t=>{t.checked=!0}),this.selectedRes=JSON.parse(JSON.stringify(this.allResInBasket))):this.data.forEach(t=>{t.checked=!1})}selectSpecificRes(t){this.toggleAllRes({checked:!1}),this.toggleRes({checked:!0},t)}open({x:t,y:e},i){return!1===i.checked&&(i.checked=!0,this.toggleAllRes({checked:!1}),this.toggleRes({checked:!0},i)),this.actionsList.open(t,e,i),!1}listTodrag(){return this.foldersService.getDragIds()}unfollowMail(t){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.stopFollowingAlert")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.request("DELETE","../rest/resources/unfollow",{body:{resources:[t.resId]}})),Object(mt.a)(t=>{this.headerService.nbResourcesFollowed--,this.initResultList()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}viewDocument(t){this.http.get(`../rest/resources/${t.resId}/content?mode=view`,{responseType:"blob"}).pipe(Object(mt.a)(e=>{const i=new Blob([e],{type:"application/pdf"}),n=URL.createObjectURL(i),a=window.open();a.document.write(`<iframe style="width: 100%;height: 100%;margin: 0;padding: 0;" src="${n}" frameborder="0" allowfullscreen></iframe>`),a.document.title=t.chrono}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(o.c),n.Qb(o.a),n.Qb(v.b),n.Qb(q.b),n.Qb(ca.b),n.Qb(y.a),n.Qb(sI),n.Qb(D.a),n.Qb(ZD.c),n.Qb(n.T),n.Qb(w.a),n.Qb(tw.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(DI,!0),n.Kc(wI,!0),n.Kc(MI,!0),n.Kc(Kt.a,!0),n.Kc(kI,!0),n.Kc(SI,!0),n.Kc(II,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.actionsList=i.first),n.yc(i=n.ec())&&(e.appPanelList=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first),n.yc(i=n.ec())&&(e.basketHome=i.first),n.yc(i=n.ec())&&(e.menuShortcut=i.first))},decls:50,vars:56,consts:[[1,"maarch-container"],["id","viewThumbnail",2,"display","none","position","fixed","z-index","2","margin-left","1px"],["style","max-height: 100vh;",3,"src",4,"ngIf"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[2,"flex","1","overflow-x","auto","overflow-y","hidden",3,"listProperties","totalRes","selectedRes","routeDatas","title","toggleAllRes","refreshEventAfterAction","refreshEvent"],["filtersTool",""],[1,"container"],[1,"container-content"],["class","example-loading-shade",4,"ngIf"],[1,"table-head"],[1,"table-head-result"],["color","primary",2,"margin","10px","padding-right","10px",3,"checked","indeterminate","title","change"],[4,"ngIf"],[1,"table-head-tool"],[1,"paginatorResultList",3,"length","pageSizeOptions"],["paginatorResultList",""],[3,"contextMode","currentFolderInfo","totalRes","selectedRes","menuShortcut","currentResource","refreshEvent"],["actionsList",""],[2,"height","90%","overflow","auto","position","absolute","width","100%"],["cdkDropList","","id","folder-list","mat-table","","matSort","","matSortActive","resId","matSortDisableClear","","matSortDirection","asc",2,"width","100%",3,"cdkDropListConnectedTo","cdkDropListData","cdkDropListDisabled","dataSource"],["tableBasketListSort","matSort"],["matColumnDef","resId"],["mat-cell","","style","padding:0;border-top: solid 1px rgba(0, 0, 0, 0.12);",3,"selected-data",4,"matCellDef"],["mat-row","","class","rowData","style","cursor: pointer;","cdkDrag","",3,"locked","cdkDragDisabled","cdkDragData","contextmenu","click","cdkDragStarted",4,"matRowDef","matRowDefColumns"],["position","end","autoFocus","false",1,"panel-right",2,"overflow-x","hidden",3,"fixedInViewport","opened","mode","ngStyle"],["snav2",""],["style","height: 100%;overflow: hidden;",3,"matTooltip","innerHTML",4,"ngIf"],[2,"display","flex","position","sticky","top","0px","z-index","2"],["mat-icon-button","",2,"font-size","20px","color","#666",3,"click"],[1,"fa","fa-arrow-right"],[3,"refreshBadgeNotes","refreshBadgeAttachments"],["appPanelList",""],[3,"contextMode","currentFolderInfo","totalRes","selectedRes","menuShortcut","currentResource","refreshEvent","refreshPanelFolders"],["actionsListContext",""],[2,"max-height","100vh",3,"src"],[1,"example-loading-shade"],["mat-cell","",2,"padding","0","border-top","solid 1px rgba(0, 0, 0, 0.12)"],[1,"main-info"],[2,"width","50px"],["color","primary",3,"checked","change","click"],["mat-icon-button","",1,"followIcon",2,"margin-left","-25px",3,"title","click"],[1,"fas","fa-star",2,"margin-bottom","5px"],["style","cursor:pointer;","class","main-info-status",4,"ngIf"],["class","main-info-data","style","width:200px;text-align:center;cursor:pointer;",4,"ngIf"],[1,"main-info-data",2,"font-weight","bold","flex","1","cursor","pointer",3,"title"],[1,"main-info-action"],["color","warn",4,"ngIf"],["class","folder-info",4,"ngIf"],[1,"main-info-status",2,"cursor","pointer"],["color","primary",3,"title","ngStyle","class",4,"ngIf"],["class","watermark",4,"ngIf"],["style","color: red;","class","fa fa-lock fa-2x",3,"title",4,"ngIf"],["color","primary",3,"title","ngStyle"],[1,"watermark"],[1,"fa","fa-lock","fa-2x",2,"color","red",3,"title"],[1,"main-info-data",2,"width","200px","text-align","center","cursor","pointer"],[2,"color","rgba(0,0,0,0.4)","font-size","90%"],[1,"fas","fa-barcode",3,"title"],["color","warn"],["mat-icon-button","",3,"title","click"],["fontSet","fas","fontIcon","fa-comments fa-2x",3,"matBadgeHidden","matBadge","color"],["fontSet","fas","fontIcon","fa-paperclip fa-2x",3,"matBadgeHidden","matBadge","color"],["fontSet","fas","fontIcon","fa-sitemap fa-2x",3,"color"],["mat-icon-button","",3,"title","disabled","click","mouseenter","mouseleave"],[1,"fa",3,"ngClass"],["fontSet","fas","fontIcon","fa-info-circle fa-2x"],[1,"folder-info"],["class","badge badge-folder",3,"title","click",4,"ngFor","ngForOf"],[1,"badge","badge-folder",3,"title","click"],[1,"fa","fa-folder"],["mat-row","","cdkDrag","",1,"rowData",2,"cursor","pointer",3,"cdkDragDisabled","cdkDragData","contextmenu","click","cdkDragStarted"],["class","example-custom-placeholder",4,"cdkDragPlaceholder"],["class","dragPreview",4,"cdkDragPreview"],[1,"example-custom-placeholder"],[1,"dragPreview"],[1,"fas","fa-envelope-open-text","fa-2x"],[2,"height","100%","overflow","hidden",3,"matTooltip","innerHTML"]],template:function(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"mat-card",1),n.Oc(3,PI,3,5,"img",2),n.Vb(),n.Wb(4,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",6),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Wb(10,"div",7),n.Wb(11,"app-filters-tool",8,9),n.dc("toggleAllRes",(function(t){return e.toggleAllRes(t)}))("refreshEventAfterAction",(function(){return e.refreshDaoAfterAction()}))("refreshEvent",(function(){return e.refreshDao()})),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(14,"div",10),n.Wb(15,"div",11),n.Oc(16,RI,2,1,"div",12),n.Wb(17,"div",13),n.Wb(18,"div",14),n.Wb(19,"mat-checkbox",15),n.dc("change",(function(t){return e.toggleAllRes(t)})),n.ic(20,"translate"),n.Vb(),n.Qc(21),n.ic(22,"ucfirst"),n.ic(23,"translate"),n.Oc(24,jI,3,4,"small",16),n.Vb(),n.Wb(25,"div",17),n.Wb(26,"span"),n.Rb(27,"mat-paginator",18,19),n.Vb(),n.Wb(29,"span"),n.Wb(30,"app-followed-action-list",20,21),n.dc("refreshEvent",(function(){return e.refreshDaoAfterAction()})),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(32,"div",22),n.Wb(33,"table",23,24),n.Ub(35,25),n.Oc(36,GI,17,21,"td",26),n.Tb(),n.Oc(37,KI,3,4,"tr",27),n.Vb(),n.Vb(),n.Rb(38,"div",13),n.Vb(),n.Vb(),n.Vb(),n.Wb(39,"mat-sidenav",28,29),n.Oc(41,YI,1,2,"div",30),n.Wb(42,"div",31),n.Wb(43,"button",32),n.dc("click",(function(){return n.Dc(t),n.zc(40).close()})),n.Rb(44,"mat-icon",33),n.Vb(),n.Vb(),n.Wb(45,"app-panel-list",34,35),n.dc("refreshBadgeNotes",(function(t){return e.refreshBadgeNotes(t)}))("refreshBadgeAttachments",(function(t){return e.refreshBadgeAttachments(t)})),n.Vb(),n.Rb(47,"mat-divider"),n.Vb(),n.Vb(),n.Wb(48,"app-followed-action-list",36,37),n.dc("refreshEvent",(function(){return e.refreshDaoAfterAction()}))("refreshPanelFolders",(function(){return e.foldersService.getFolders()})),n.Vb()}2&t&&(n.Db(3),n.oc("ngIf",""!==e.thumbnailUrl),n.Db(2),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.oc("listProperties",e.listProperties)("totalRes",e.allResInBasket.length)("selectedRes",e.selectedRes)("routeDatas","/rest/followedResources/filters")("title",n.jc(13,45,"lang.searchTrackedMail")),n.Db(3),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.isLoadingResults),n.Db(3),n.pc("title",n.jc(20,47,"lang.selectAllResInBasket")),n.oc("checked",e.selectedRes.length==e.allResInBasket.length&&e.selectedRes.length>0)("indeterminate",e.selectedRes.length>0&&e.selectedRes.length<e.allResInBasket.length),n.Db(2),n.Tc("\xa0",e.resultsLength," ",n.jc(22,49,n.jc(23,51,"lang.records")),"\xa0"),n.Db(3),n.oc("ngIf",e.selectedRes.length>0),n.Db(3),n.oc("length",e.resultsLength)("pageSizeOptions",n.uc(53,JI)),n.Db(3),n.oc("contextMode",!1)("currentFolderInfo",e.folderInfo)("totalRes",e.allResInBasket.length)("selectedRes",e.selectedRes)("menuShortcut",e.menuShortcut)("currentResource",e.currentResource),n.Db(3),n.oc("cdkDropListConnectedTo",e.listTodrag())("cdkDropListData",e.data)("cdkDropListDisabled",e.dragInit||e.appService.getViewMode())("dataSource",e.data),n.Db(4),n.oc("matRowDefColumns",e.displayedColumnsBasket),n.Db(2),n.Ib("docView",e.innerHtml),n.oc("fixedInViewport",e.appService.getViewMode())("opened",(e.appService.getViewMode(),!1))("mode",e.appService.getViewMode()?"over":"side")("ngStyle",n.vc(54,ZI,e.appService.getViewMode()?"80%":"30%")),n.Db(2),n.oc("ngIf",e.innerHtml),n.Db(7),n.oc("contextMode",!0)("currentFolderInfo",e.folderInfo)("totalRes",e.allResInBasket.length)("selectedRes",e.selectedRes)("menuShortcut",e.menuShortcut)("currentResource",e.currentResource))},directives:[I.e,I.f,K.a,P.t,Ot,We,OI,j.a,Kt.a,eM,vt.o,lo.e,Fe.a,vt.c,vt.b,vt.n,I.d,P.w,k.b,S.a,pM,T.a,V.c,vt.a,wt.a,P.q,P.s,vt.m,lo.a,lo.c,lo.d,A.b],pipes:[g.d,Tt.u,P.b,si,Tt.p,Wt.a],styles:[".dragPreview[_ngcontent-%COMP%]{text-align:center;border-radius:5px;background:#fff;padding:10px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);color:#135f7f}.banner-opened[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:10px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;background:#1a80ab;width:100%}.banner-opened[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#fff}.banner-opened[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#1a80ab;height:1px}.banner-opened[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{display:flex;font-size:16px}.banner-opened[_ngcontent-%COMP%] .content-item[_ngcontent-%COMP%]{flex:1;padding-left:20px;padding-right:20px}.banner-opened[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .private[_ngcontent-%COMP%]{font-style:italic;display:flex;justify-content:flex-end;align-items:center}.banner-closed[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:10px;position:relative;width:100%}.banner-closed[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#fff}.followIcon[_ngcontent-%COMP%]{color:#f99830}.folder-info[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.badge-folder[_ngcontent-%COMP%]{cursor:pointer;background:#f99830;margin:5px;font-size:12px;border-radius:3px;opacity:.8;max-width:250px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),t})();class eP{constructor(t,e){this.http=t,this.filtersListService=e}getRepoIssues(t,e,i,n,a,s){return this.filtersListService.updateListsPropertiesPage(i),this.filtersListService.updateListsPropertiesPageSize(s),this.http.get(`${n}?limit=${s}&offset=${i*s}${a}`)}}function iP(t,e){if(1&t&&(n.Wb(0,"button",19),n.Qc(1),n.ic(2,"translate"),n.Rb(3,"mat-icon",20),n.Vb()),2&t){n.hc();const t=n.zc(3);n.oc("matMenuTriggerFor",t),n.Db(1),n.Rc(n.jc(2,2,"lang.actionsAlt"))}}function nP(t,e){if(1&t&&n.Rb(0,"span",21,22),2&t){const t=n.hc(),e=n.zc(3);n.Lc("left",t.contextMenuPosition.x)("top",t.contextMenuPosition.y),n.oc("matMenuTriggerFor",e)}}function aP(t,e){if(1&t&&(n.Wb(0,"div",23),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Sc(" ",t.contextMenuTitle," ")}}function sP(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",24),n.dc("menuOpened",(function(){return n.Dc(t),n.hc().getBaskets()})),n.Wb(1,"span"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()}if(2&t){n.hc();const t=n.zc(7);n.oc("matMenuTriggerFor",t),n.Db(2),n.Rc(n.jc(3,2,"lang.goToBasket"))}}function oP(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",27),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).goTo(e)})),n.Qc(1),n.Vb()}if(2&t){const t=n.hc().$implicit;n.pc("title",t.basketName),n.Db(1),n.Sc("",t.basketName," ")}}function rP(t,e){if(1&t&&(n.Ub(0),n.Oc(1,oP,2,2,"button",26),n.Tb()),2&t){const t=e.$implicit,i=n.hc().$implicit;n.Db(1),n.oc("ngIf",t.groupId===i.groupId)}}function cP(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div",25),n.Qc(2),n.Vb(),n.Oc(3,rP,2,1,"ng-container",6),n.ic(4,"sortBy"),n.Tb()),2&t){const t=e.$implicit,i=n.hc();n.Db(2),n.Rc(t.groupName),n.Db(1),n.oc("ngForOf",n.kc(4,2,i.basketList.list,"basketName"))}}function lP(t,e){1&t&&(n.Wb(0,"div",28),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.mailNotPresentInBasket")," "))}function dP(t,e){if(1&t&&(n.Wb(0,"button",29),n.ic(1,"translate"),n.Rb(2,"mat-icon",30),n.Wb(3,"span"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc(),e=n.zc(20);n.oc("matMenuTriggerFor",e)("disabled",0===t.selectedRes.length)("title",n.jc(1,4,"lang.freezeRetentionRule")),n.Db(4),n.Rc(n.jc(5,6,"lang.freezeRetentionRule"))}}function hP(t,e){if(1&t&&(n.Wb(0,"button",29),n.ic(1,"translate"),n.Rb(2,"mat-icon",31),n.Wb(3,"span"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc(),e=n.zc(32);n.oc("matMenuTriggerFor",e)("disabled",0===t.selectedRes.length)("title",n.jc(1,4,"lang.setBindingDocument")),n.Db(4),n.Rc(n.jc(5,6,"lang.setBindingDocument"))}}let uP=(()=>{class t{constructor(t,e,i,a,s,o,r,c){this.translate=t,this.http=e,this.notify=i,this.dialog=a,this.router=s,this.headerService=o,this.foldersService=r,this.privilegeService=c,this.loading=!1,this.triggerEvent=new n.o,this.contextMenuPosition={x:"0px",y:"0px"},this.contextMenuTitle="",this.currentAction={},this.basketInfo={},this.contextResId=0,this.currentLock=null,this.arrRes=[],this.actionsList=[],this.basketList={groups:[],list:[]},this.currentResource={},this.refreshEvent=new n.o,this.refreshPanelFolders=new n.o}ngOnInit(){}open(t,e,i){return this.contextMenuPosition.x=t+"px",this.contextMenuPosition.y=e+"px",this.contextMenuTitle=i.chrono,this.contextResId=i.resId,this.currentResource=i,this.getFreezeBindingValue(),this.contextMenu.openMenu(),!1}refreshList(){this.refreshEvent.emit()}refreshFolders(){this.refreshPanelFolders.emit()}refreshDaoAfterAction(){this.refreshEvent.emit()}unclassify(){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:"Voulez-vous enlever <b>"+this.selectedRes.length+"</b> document(s) du classement ?"}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.request("DELETE","../rest/folders/"+this.currentFolderInfo.id+"/resources",{body:{resources:this.selectedRes}})),Object(mt.a)(t=>{this.notify.success(this.translate.instant("lang.removedFromFolder")),this.refreshFolders(),this.foldersService.getPinnedFolders(),this.refreshDaoAfterAction()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}getBaskets(){this.http.get("../rest/resources/"+this.selectedRes+"/baskets").pipe(Object(mt.a)(t=>{this.basketList.groups=t.groupsBaskets.filter((t,e,i)=>t&&i.map(t=>t.groupId).indexOf(t.groupId)===e),this.basketList.list=t.groupsBaskets}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}goTo(t){this.contextMenuTitle!==this.translate.instant("lang.undefined")?this.router.navigate(["/basketList/users/"+this.headerService.user.id+"/groups/"+t.groupId+"/baskets/"+t.basketId],{queryParams:{chrono:'"'+this.contextMenuTitle+'"'}}):this.router.navigate(["/basketList/users/"+this.headerService.user.id+"/groups/"+t.groupId+"/baskets/"+t.basketId])}unFollow(){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.stopFollowingAlert")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.request("DELETE","../rest/resources/unfollow",{body:{resources:this.selectedRes}})),Object(mt.a)(t=>{this.notify.success(this.translate.instant("lang.removedFromFolder")),this.headerService.nbResourcesFollowed-=t.unFollowed,this.refreshDaoAfterAction()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}toggleFreezing(t){this.http.put("../rest/archival/freezeRetentionRule",{resources:this.selectedRes,freeze:t}).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant(t?"lang.retentionRuleFrozen":"lang.retentionRuleUnfrozen")),this.refreshList()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}toogleBinding(t){this.http.put("../rest/archival/binding",{resources:this.selectedRes,binding:t}).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant(t?"lang.bindingMail":!1===t?"lang.noBindingMail":"lang.bindingUndefined")),this.refreshList()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}getFreezeBindingValue(){this.isSelectedFreeze=this.currentResource.retentionFrozen,this.isSelectedBinding=this.currentResource.binding}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(o.c),n.Qb(y.a),n.Qb(tw.a),n.Qb(Dt.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-folder-action-list"]],viewQuery:function(t,e){var i;1&t&&n.Xc(ne.d,!0),2&t&&n.yc(i=n.ec())&&(e.contextMenu=i.first)},inputs:{selectedRes:"selectedRes",totalRes:"totalRes",contextMode:"contextMode",currentFolderInfo:"currentFolderInfo",currentResource:"currentResource"},outputs:{triggerEvent:"triggerEvent",refreshEvent:"refreshEvent",refreshPanelFolders:"refreshPanelFolders"},decls:55,vars:73,consts:[["mat-stroked-button","",3,"matMenuTriggerFor",4,"ngIf"],["style","position: fixed;",3,"matMenuTriggerFor","left","top",4,"ngIf"],["menu","matMenu"],["style","text-align: center;font-size: 10px;color: white;background: #135F7F;padding: 5px;font-weight: bold;",4,"ngIf"],["mat-menu-item","",3,"matMenuTriggerFor","menuOpened",4,"ngIf"],["baskets","matMenu"],[4,"ngFor","ngForOf"],["class","noAvailableBasket",4,"ngIf"],["mat-menu-item","",1,"followAction",3,"disabled","click"],[1,"far","fa-star","fa-2x"],["mat-menu-item","",3,"matMenuTriggerFor","disabled","title",4,"ngIf"],["ng-switch","getValue(var)"],["freezeRentalRule","matMenu"],["mat-menu-item","",3,"title","click"],["bindingRentalRule","matMenu"],["mat-menu-item","",3,"title","innerHTML","click"],["mat-menu-item","",1,"folderAction",3,"disabled","click"],[1,"fa","fa-folder-minus","fa-2x"],[3,"resIds","refreshList","refreshFolders"],["mat-stroked-button","",3,"matMenuTriggerFor"],["matSuffix","",1,"fa","fa-caret-down"],[2,"position","fixed",3,"matMenuTriggerFor"],["menu2",""],[2,"text-align","center","font-size","10px","color","white","background","#135F7F","padding","5px","font-weight","bold"],["mat-menu-item","",3,"matMenuTriggerFor","menuOpened"],[1,"basketGroupName"],["mat-menu-item","","class","labelBasket",3,"title","click",4,"ngIf"],["mat-menu-item","",1,"labelBasket",3,"title","click"],[1,"noAvailableBasket"],["mat-menu-item","",3,"matMenuTriggerFor","disabled","title"],[1,"freezeIcon","fas","fa-snowflake",2,"font-size","20px"],[1,"bindidngIcon","fas","fa-exclamation",2,"font-size","20px"]],template:function(t,e){1&t&&(n.Oc(0,iP,4,4,"button",0),n.Oc(1,nP,2,5,"span",1),n.Wb(2,"mat-menu",null,2),n.Oc(4,aP,2,1,"div",3),n.Oc(5,sP,4,4,"button",4),n.Wb(6,"mat-menu",null,5),n.Oc(8,cP,5,5,"ng-container",6),n.ic(9,"sortBy"),n.Oc(10,lP,3,3,"div",7),n.Vb(),n.Rb(11,"mat-divider"),n.Wb(12,"button",8),n.dc("click",(function(){return e.unFollow()})),n.Rb(13,"mat-icon",9),n.Wb(14,"span"),n.Qc(15),n.ic(16,"translate"),n.Vb(),n.Vb(),n.Rb(17,"mat-divider"),n.Oc(18,dP,6,8,"button",10),n.Wb(19,"mat-menu",11,12),n.Wb(21,"button",13),n.dc("click",(function(){return e.toggleFreezing(!0)})),n.ic(22,"translate"),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Rb(25,"mat-divider"),n.Wb(26,"button",13),n.dc("click",(function(){return e.toggleFreezing(!1)})),n.ic(27,"translate"),n.Qc(28),n.ic(29,"translate"),n.Vb(),n.Vb(),n.Oc(30,hP,6,8,"button",10),n.Wb(31,"mat-menu",null,14),n.Wb(33,"buton",15),n.dc("click",(function(){return e.toogleBinding(!0)})),n.ic(34,"stripTags"),n.ic(35,"translate"),n.ic(36,"translate"),n.Vb(),n.Rb(37,"mat-divider"),n.Wb(38,"buton",15),n.dc("click",(function(){return e.toogleBinding(!1)})),n.ic(39,"stripTags"),n.ic(40,"translate"),n.ic(41,"translate"),n.Vb(),n.Rb(42,"mat-divider"),n.Wb(43,"buton",13),n.dc("click",(function(){return e.toogleBinding(null)})),n.ic(44,"translate"),n.Qc(45),n.ic(46,"translate"),n.Vb(),n.Rb(47,"mat-divider"),n.Vb(),n.Rb(48,"mat-divider"),n.Wb(49,"button",16),n.dc("click",(function(){return e.unclassify()})),n.Rb(50,"mat-icon",17),n.Wb(51,"span"),n.Qc(52),n.ic(53,"translate"),n.Vb(),n.Vb(),n.Wb(54,"folder-menu",18),n.dc("refreshList",(function(){return e.refreshDaoAfterAction()}))("refreshFolders",(function(){return e.refreshFolders()})),n.Vb(),n.Vb()),2&t&&(n.oc("ngIf",!e.contextMode),n.Db(1),n.oc("ngIf",e.contextMode),n.Db(1),n.Fb("actionListMenu"),n.Db(2),n.oc("ngIf",e.contextMode&&1==e.selectedRes.length),n.Db(1),n.oc("ngIf",1==e.selectedRes.length),n.Db(1),n.Fb("folderListMenu"),n.Db(2),n.oc("ngForOf",n.kc(9,42,e.basketList.groups,"groupName")),n.Db(2),n.oc("ngIf",0==e.basketList.groups.length),n.Db(2),n.oc("disabled",0===e.selectedRes.length),n.Db(3),n.Rc(n.jc(16,45,"lang.untrackThisMail")),n.Db(3),n.oc("ngIf",e.privilegeService.hasCurrentUserPrivilege("freeze_retention_rule")),n.Db(3),n.Fb(!0===e.isSelectedFreeze?"isSelectedMenu":"notSelectedMenu"),n.oc("title",n.jc(22,47,"lang.freezeTheCurrentUsefulLife")),n.Db(2),n.Sc(" ",n.jc(24,49,"lang.freezeTheCurrentUsefulLife")," "),n.Db(3),n.Fb(!1===e.isSelectedFreeze?"isSelectedMenu":"notSelectedMenu"),n.oc("title",n.jc(27,51,"lang.unfreezeTheCurrentUsefulLife")),n.Db(2),n.Sc(" ",n.jc(29,53,"lang.unfreezeTheCurrentUsefulLife")," "),n.Db(2),n.oc("ngIf",e.privilegeService.hasCurrentUserPrivilege("set_binding_document")),n.Db(3),n.Fb(!0===e.isSelectedBinding?"isSelectedMenu":"notSelectedMenu"),n.oc("title",n.jc(34,55,n.jc(35,57,"lang.bindingMail")))("innerHTML",n.jc(36,59,"lang.bindingMail"),n.Ec),n.Db(5),n.Fb(!1===e.isSelectedBinding?"isSelectedMenu":"notSelectedMenu"),n.oc("title",n.jc(39,61,n.jc(40,63,"lang.noBindingMail")))("innerHTML",n.jc(41,65,"lang.noBindingMail"),n.Ec),n.Db(5),n.Fb(null===e.isSelectedBinding?"isSelectedMenu":"notSelectedMenu"),n.oc("title",n.jc(44,67,"lang.doNotDefine")),n.Db(2),n.Sc(" ",n.jc(46,69,"lang.doNotDefine"),""),n.Db(4),n.oc("disabled",0===e.selectedRes.length),n.Db(3),n.Rc(n.jc(53,71,"lang.removeFromFolder")),n.Db(2),n.oc("resIds",e.selectedRes))},directives:[P.t,ne.e,P.s,T.a,ne.b,S.a,Uw,k.b,ne.d,Y.j],pipes:[Wt.a,g.d,Tt.r],styles:[".mat-icon[_ngcontent-%COMP%]{height:auto}.mat-stroked-button[_ngcontent-%COMP%]{border-radius:20px;border-color:#135f7f;color:#135f7f} .actionListMenu .mat-menu-content{padding-top:0;padding-bottom:0}.folderAction[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%], .followAction[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{font-size:20px;color:#8e3e52}.basketGroupName[_ngcontent-%COMP%]{color:#135f7f;padding-left:10px;padding-right:10px}.labelBasket[_ngcontent-%COMP%]{color:#666;font-size:12px;font-weight:700}.noAvailableBasket[_ngcontent-%COMP%]{text-align:center;font-size:12px;opacity:.5;font-style:italic;padding:22px}.freezeIcon[_ngcontent-%COMP%]{color:#135f7f}.bindidngIcon[_ngcontent-%COMP%]{color:#135f7f;margin-left:5px}.isSelectedMenu[_ngcontent-%COMP%]{background:#f99830}.notSelectedMenu[_ngcontent-%COMP%]{background:#fff}"]}),t})();const pP=["snav2"],bP=["actionsListContext"],fP=["appPanelList"],mP=["tableBasketListSort"],gP=["basketHome"];function vP(t,e){if(1&t&&(n.Rb(0,"img",42),n.ic(1,"async"),n.ic(2,"secureUrl")),2&t){const t=n.hc();n.oc("src",n.jc(1,1,n.jc(2,3,t.thumbnailUrl)),n.Gc)}}function _P(t,e){1&t&&n.Rb(0,"div",43)}function yP(t,e){1&t&&(n.Wb(0,"div",48),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.privateFolder")," "))}function xP(t,e){if(1&t&&(n.Wb(0,"div"),n.Wb(1,"b",51),n.Qc(2),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t)}}function CP(t,e){if(1&t&&(n.Wb(0,"div",45),n.Qc(1),n.ic(2,"translate"),n.Rb(3,"br"),n.Wb(4,"div",49),n.Oc(5,xP,3,1,"div",50),n.ic(6,"sortBy"),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Sc(" ",n.jc(2,2,"lang.visibleBy")," :"),n.Db(4),n.oc("ngForOf",n.jc(6,4,t.folderInfo.entitiesSharing))}}function OP(t,e){if(1&t&&(n.Wb(0,"div",44),n.Wb(1,"div",45),n.Qc(2),n.ic(3,"translate"),n.Rb(4,"br"),n.Wb(5,"b"),n.Qc(6),n.Vb(),n.Vb(),n.Oc(7,yP,3,3,"div",46),n.Oc(8,CP,7,6,"div",47),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Sc(" ",n.jc(3,4,"lang.owner")," :"),n.Db(4),n.Rc(t.folderInfo.ownerDisplayName),n.Db(1),n.oc("ngIf",0===t.folderInfo.entitiesSharing.length),n.Db(1),n.oc("ngIf",t.folderInfo.entitiesSharing.length>0)}}function DP(t,e){1&t&&n.Rb(0,"mat-spinner")}function wP(t,e){if(1&t&&(n.Wb(0,"div",52),n.Oc(1,DP,1,0,"mat-spinner",21),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.isLoadingResults)}}function MP(t,e){if(1&t&&(n.Wb(0,"small"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("- ",t.selectedRes.length," ",n.jc(2,2,"lang.selected"),"")}}const kP=function(t){return{color:t}};function SP(t,e){if(1&t&&n.Rb(0,"mat-icon",69),2&t){const t=n.hc(2).$implicit;n.Hb("",t.statusImage.charAt(0),"",t.statusImage.charAt(1)," ",t.statusImage," ",t.statusImage.charAt(0),"",t.statusImage.charAt(1),"-2x"),n.pc("title",t.statusLabel),n.oc("ngStyle",n.vc(9,kP,t.priorityColor))}}function IP(t,e){1&t&&(n.Wb(0,"span",70),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.confidential")))}function PP(t,e){if(1&t&&(n.Rb(0,"mat-icon",71),n.ic(1,"translate")),2&t){const t=n.hc(2).$implicit;n.rc("title","",n.jc(1,2,"lang.warnLockResInProgress")," : ",t.locker,"")}}function VP(t,e){if(1&t&&(n.Wb(0,"span",65),n.Oc(1,SP,1,11,"mat-icon",66),n.Oc(2,IP,3,3,"span",67),n.Oc(3,PP,2,4,"mat-icon",68),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",!0!==t.isLocked),n.Db(1),n.oc("ngIf","Y"===t.confidentiality),n.Db(1),n.oc("ngIf",!0===t.isLocked)}}function RP(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"span",73),n.Rb(2,"i",74),n.ic(3,"translate"),n.Qc(4),n.Vb(),n.Tb()),2&t){const t=n.hc(2).$implicit;n.Db(2),n.pc("title",n.jc(3,2,"lang.barcode")),n.Db(2),n.Sc(" ",t.barcode,"")}}function jP(t,e){if(1&t&&(n.Ub(0),n.Qc(1),n.Tb()),2&t){const t=n.hc(2).$implicit;n.Db(1),n.Sc(" ",t.chrono," ")}}function AP(t,e){if(1&t&&(n.Wb(0,"span",72),n.Oc(1,RP,5,4,"ng-container",21),n.ic(2,"translate"),n.ic(3,"translate"),n.Oc(4,jP,2,1,"ng-container",21),n.ic(5,"translate"),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",t.chrono==n.jc(2,2,"lang.undefined")&&t.barcode!=n.jc(3,4,"lang.undefined")),n.Db(3),n.oc("ngIf",t.chrono!=n.jc(5,6,"lang.undefined"))}}function WP(t,e){1&t&&(n.Wb(0,"div",75),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.documentOutOfPerimeter")," "))}const TP=function(t){return[t]};function EP(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"button",76),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc();return e.stopPropagation(),a.togglePanel("note",i)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",77),n.Vb(),n.Wb(4,"button",76),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc();return e.stopPropagation(),a.togglePanel("attachment",i)})),n.ic(5,"translate"),n.Rb(6,"mat-icon",78),n.Vb(),n.Wb(7,"button",76),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc();return e.stopPropagation(),a.togglePanel("diffusion",i)})),n.ic(8,"translate"),n.Rb(9,"mat-icon",79),n.Vb(),n.Wb(10,"button",80),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc();return e.stopPropagation(),a.viewDocument(i)}))("mouseenter",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc().viewThumbnail(e)}))("mouseleave",(function(){return n.Dc(t),n.hc(2).closeThumbnail()})),n.ic(11,"translate"),n.ic(12,"translate"),n.Rb(13,"mat-icon",81),n.Vb(),n.Wb(14,"button",76),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc();return e.stopPropagation(),a.goToDetail(i)})),n.ic(15,"translate"),n.Rb(16,"mat-icon",82),n.Vb(),n.Tb()}if(2&t){const t=n.hc().$implicit,e=n.hc(),i=n.zc(48);n.Db(1),n.Ib("noData",0==t.countNotes),n.pc("title",n.jc(2,18,"lang.notes")),n.Db(2),n.pc("matBadgeHidden",0==t.countNotes),n.pc("matBadge",t.countNotes),n.oc("color",i.opened&&t.checked&&"note"==e.currentMode?"primary":""),n.Db(1),n.Ib("noData",0==t.countAttachments),n.pc("title",n.jc(5,20,"lang.attachments")),n.Db(2),n.pc("matBadgeHidden",0==t.countAttachments),n.pc("matBadge",t.countAttachments),n.oc("color",i.opened&&t.checked&&"attachment"==e.currentMode?"primary":""),n.Db(1),n.pc("title",n.jc(8,22,"lang.diffusionList")),n.Db(2),n.oc("color",i.opened&&t.checked&&"diffusion"==e.currentMode?"primary":""),n.Db(1),n.pc("title",t.hasDocument?n.jc(11,24,"lang.viewResource"):n.jc(12,26,"lang.noDocument")),n.oc("disabled",!t.hasDocument),n.Db(3),n.oc("ngClass",n.vc(30,TP,t.hasDocument?"fa-eye":"fa-eye-slash")),n.Db(1),n.pc("title",n.jc(15,28,"lang.linkDetails"))}}function FP(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",85),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(3);return i.stopPropagation(),s.goToFolder(a)})),n.ic(1,"translate"),n.Rb(2,"i",86),n.Qc(3),n.Vb()}if(2&t){const t=e.$implicit;n.rc("title","",n.jc(1,3,"lang.goToFolder")," : ",t.label,""),n.Db(3),n.Sc(" ",t.label,"")}}function LP(t,e){if(1&t&&(n.Wb(0,"div",83),n.Oc(1,FP,4,5,"span",84),n.ic(2,"sortBy"),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngForOf",n.kc(2,1,t.folders,"label"))}}function QP(t,e){if(1&t){const t=n.Xb();n.Wb(0,"td",53),n.Wb(1,"div",54),n.Wb(2,"span",55),n.Wb(3,"mat-checkbox",56),n.dc("change",(function(i){n.Dc(t);const a=e.$implicit;return n.hc().toggleRes(i,a)}))("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.Vb(),n.Vb(),n.Wb(4,"button",57),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc();return i.stopPropagation(),s.toggleMailTracking(a)})),n.ic(5,"translate"),n.ic(6,"translate"),n.Rb(7,"mat-icon",58),n.Vb(),n.Oc(8,VP,4,3,"span",59),n.Oc(9,AP,6,8,"span",60),n.Wb(10,"span",61),n.ic(11,"translate"),n.Qc(12),n.ic(13,"shorten"),n.Vb(),n.Wb(14,"span",62),n.Oc(15,WP,3,3,"div",63),n.Oc(16,EP,17,32,"ng-container",21),n.Vb(),n.Vb(),n.Oc(17,LP,3,4,"div",64),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc();n.Ib("selected-data",t.checked),n.Db(3),n.oc("checked",t.checked),n.Db(1),n.oc("title",!0===t.mailTracking?n.jc(5,14,"lang.untrackThisMail"):n.jc(6,16,"lang.trackThisMail")),n.Db(3),n.oc("ngClass",n.vc(24,TP,!0===t.mailTracking?"fas fa-star":"far fa-star")),n.Db(1),n.oc("ngIf",!i.appService.getViewMode()),n.Db(1),n.oc("ngIf",!i.appService.getViewMode()),n.Db(1),n.Ib("undefined",t.subject==n.jc(11,18,"lang.undefined")),n.pc("title",t.subject),n.Db(2),n.Rc(n.lc(13,20,t.subject,150,"...")),n.Db(3),n.oc("ngIf",!t.allowed),n.Db(1),n.oc("ngIf",t.allowed),n.Db(1),n.oc("ngIf",void 0!==t.folders&&t.folders.length>0)}}function NP(t,e){1&t&&n.Rb(0,"div",90)}function zP(t,e){if(1&t&&(n.Wb(0,"div",91),n.Rb(1,"i",92),n.Rb(2,"br"),n.Qc(3),n.ic(4,"translate"),n.Wb(5,"b"),n.Qc(6),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(3),n.Sc(" ",n.jc(4,2,"lang.classifyInFolder")," : "),n.Db(3),n.Rc(t.chrono)}}function BP(t,e){if(1&t){const t=n.Xb();n.Wb(0,"tr",87),n.dc("contextmenu",(function(i){n.Dc(t);const a=e.$implicit;return n.hc().open(i,a)}))("click",(function(i){n.Dc(t);const a=e.$implicit;return n.hc().open(i,a)}))("cdkDragStarted",(function(){n.Dc(t);const i=e.$implicit;return n.hc().selectSpecificRes(i)})),n.Oc(1,NP,1,0,"div",88),n.Oc(2,zP,7,4,"div",89),n.Vb()}if(2&t){const t=e.$implicit;n.Ib("locked",1==t.isLocked),n.oc("cdkDragDisabled",!t.allowed)("cdkDragData",t)}}function UP(t,e){if(1&t&&n.Rb(0,"div",93),2&t){const t=n.hc();n.oc("matTooltip",t.currentChrono)("innerHTML",t.innerHtml,n.Ec)}}const $P=function(){return[10,25,50,100,150]},HP=function(t){return{width:t}};let GP=(()=>{class t{constructor(t,e,i,a,s,o,r,c,l,d,h,u,p,b){this.translate=t,this.router=e,this.route=i,this.http=a,this.dialog=s,this.sanitizer=o,this.headerService=r,this.filtersListService=c,this.notify=l,this.overlay=d,this.viewContainerRef=h,this.appService=u,this.foldersService=p,this.functions=b,this.loading=!1,this.docUrl="",this.injectDatasParam={resId:0,editable:!1},this.currentResource={},this.filtersChange=new n.o,this.dragInit=!0,this.displayedColumnsBasket=["resId"],this.displayedMainData=[{value:"chrono",cssClasses:["softColorData","align_centerData","chronoData"],icon:""},{value:"subject",cssClasses:["longData"],icon:""}],this.resultsLength=0,this.isLoadingResults=!0,this.listProperties={},this.currentChrono="",this.currentMode="",this.thumbnailUrl="",this.selectedRes=[],this.allResInBasket=[],this.selectedDiffusionTab=0,this.folderInfo={id:0,label:"",ownerDisplayName:"",entitiesSharing:[]},this.folderInfoOpened=!1,this.destroy$=new da.a,this.currentSelectedChrono="",this.subscription=this.foldersService.catchEvent().subscribe(t=>{"refreshFolderInformations"===t.type&&t.content.id==this.folderInfo.id&&this.refreshFolderInformations(),"function"===t.type&&"refreshDao"===t.content&&this.refreshDao()})}ngOnInit(){this.loading=!1,this.isLoadingResults=!1,this.route.params.subscribe(t=>{this.folderInfoOpened=!1,this.dragInit=!0,this.destroy$.next(!0),this.http.get("../rest/folders/"+t.folderId).subscribe(e=>{const i=[{keyword:"ALL_ENTITIES",text:this.translate.instant("lang.allEntities")}];this.folderInfo={id:t.folderId,label:e.folder.label,ownerDisplayName:e.folder.ownerDisplayName,entitiesSharing:e.folder.sharing.entities.map(t=>this.functions.empty(t.label)?i.filter(e=>e.keyword===t.keyword)[0].text:t.label)},this.foldersService.setFolder(this.folderInfo),this.headerService.setHeader(this.folderInfo.label,"","fa fa-folder-open")}),this.basketUrl="../rest/folders/"+t.folderId+"/resources",this.filtersListService.filterMode=!1,this.selectedRes=[],this.sidenavRight.close(),this.listProperties=this.filtersListService.initListsProperties(this.headerService.user.id,0,t.folderId,"folder"),setTimeout(()=>{this.dragInit=!1},1e3),this.initResultList()},t=>{this.notify.handleErrors(t)})}ngOnDestroy(){this.destroy$.next(!0),this.subscription.unsubscribe()}initResultList(){this.resultListDatabase=new XP(this.http,this.filtersListService),this.paginator.pageIndex=this.listProperties.page,this.paginator.pageSize=this.listProperties.pageSize,this.sort.sortChange.subscribe(()=>this.paginator.pageIndex=0),Object(gy.a)(this.sort.sortChange,this.paginator.page,this.filtersChange).pipe(Object(Zo.a)(this.destroy$),Object(Qe.a)({}),Object(ft.a)(()=>(this.isLoadingResults=!0,this.resultListDatabase.getRepoIssues(this.sort.active,this.sort.direction,this.paginator.pageIndex,this.basketUrl,this.filtersListService.getUrlFilters(),this.paginator.pageSize))),Object(l.a)(t=>(this.isLoadingResults=!1,t=this.processPostData(t),this.resultsLength=t.countResources,this.allResInBasket=t.allResources,t.resources)),Object(m.a)(t=>(this.notify.handleErrors(t),this.router.navigate(["/home"]),this.isLoadingResults=!1,Object(c.a)(!1)))).subscribe(t=>this.data=t)}goTo(t){this.filtersListService.filterMode=!1,this.docUrl==="../rest/resources/"+t.resId+"/content"&&this.sidenavRight.opened?this.sidenavRight.close():(this.docUrl="../rest/resources/"+t.resId+"/content",this.currentChrono=t.chrono,this.innerHtml=this.sanitizer.bypassSecurityTrustHtml("<iframe style='height:100%;width:100%;' src='"+this.docUrl+"' class='embed-responsive-item'></iframe>"),this.sidenavRight.open())}goToDetail(t){this.router.navigate(["/resources/"+t.resId])}goToFolder(t){this.router.navigate(["/folders/"+t.id])}togglePanel(t,e){e.checked=!0,this.toggleAllRes({checked:!1}),this.toggleRes({checked:!0},e),this.currentResource.resId===e.resId&&this.sidenavRight.opened&&this.currentMode===t?this.sidenavRight.close():(this.currentMode=t,this.currentResource=e,this.appPanelList.loadComponent(t,e),this.sidenavRight.open())}refreshBadgeNotes(t){this.currentResource.countNotes=t}refreshFolderInformations(){this.http.get("../rest/folders/"+this.folderInfo.id).subscribe(t=>{const e=[{keyword:"ALL_ENTITIES",text:this.translate.instant("lang.allEntities")}];this.folderInfo={id:t.folder.id,label:t.folder.label,ownerDisplayName:t.folder.ownerDisplayName,entitiesSharing:t.folder.sharing.entities.map(t=>this.functions.empty(t.label)?e.filter(e=>e.keyword===t.keyword)[0].text:t.label)},this.headerService.setHeader(this.folderInfo.label,"","fa fa-folder-open")})}refreshBadgeAttachments(t){this.currentResource.countAttachments=t}refreshDao(){this.paginator.pageIndex=this.listProperties.page,this.filtersChange.emit()}refreshDaoAfterAction(){this.sidenavRight.close(),this.refreshDao(),this.toggleAllRes({checked:!1})}viewThumbnail(t){t.hasDocument&&(this.thumbnailUrl="../rest/resources/"+t.resId+"/thumbnail",$("#viewThumbnail").show(),$("#listContent").css({overflow:"hidden"}))}closeThumbnail(){$("#viewThumbnail").hide(),$("#listContent").css({overflow:"auto"})}processPostData(t){return t.resources.forEach(t=>{Object.keys(t).forEach(e=>{"statusImage"===e&&null==t[e]?t[e]="fa-question undefined":null!=t[e]&&""!==t[e]||-1!==["closingDate","countAttachments","countNotes","display","mailTracking","hasDocument","binding"].indexOf(e)||(t[e]=this.translate.instant("lang.undefined"))}),t.checked=-1!==this.selectedRes.indexOf(t.resId)}),t}toggleRes(t,e){if(t.checked)-1===this.selectedRes.indexOf(e.resId)&&(this.selectedRes.push(e.resId),e.checked=!0);else{const t=this.selectedRes.indexOf(e.resId);this.selectedRes.splice(t,1),e.checked=!1}}toggleAllRes(t){this.selectedRes=[],t.checked?(this.data.forEach(t=>{t.checked=!0}),this.selectedRes=JSON.parse(JSON.stringify(this.allResInBasket))):this.data.forEach(t=>{t.checked=!1})}selectSpecificRes(t){this.toggleAllRes({checked:!1}),this.toggleRes({checked:!0},t)}open({x:t,y:e},i){return!1===i.checked&&(i.checked=!0,this.toggleAllRes({checked:!1}),this.toggleRes({checked:!0},i)),this.actionsList.open(t,e,i),!1}listTodrag(){return this.foldersService.getDragIds()}toggleMailTracking(t){t.mailTracking?this.http.request("DELETE","../rest/resources/unfollow",{body:{resources:[t.resId]}}).pipe(Object(mt.a)(()=>{this.headerService.nbResourcesFollowed--,t.mailTracking=!t.mailTracking}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe():this.http.post("../rest/resources/follow",{resources:[t.resId]}).pipe(Object(mt.a)(()=>{this.headerService.nbResourcesFollowed++,t.mailTracking=!t.mailTracking}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}viewDocument(t){this.http.get(`../rest/resources/${t.resId}/content?mode=view`,{responseType:"blob"}).pipe(Object(mt.a)(e=>{const i=new Blob([e],{type:"application/pdf"}),n=URL.createObjectURL(i),a=window.open();a.document.write(`<iframe style="width: 100%;height: 100%;margin: 0;padding: 0;" src="${n}" frameborder="0" allowfullscreen></iframe>`),a.document.title=t.chrono}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(o.c),n.Qb(o.a),n.Qb(v.b),n.Qb(q.b),n.Qb(ca.b),n.Qb(y.a),n.Qb(sI),n.Qb(D.a),n.Qb(ZD.c),n.Qb(n.T),n.Qb(w.a),n.Qb(tw.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(pP,!0),n.Kc(bP,!0),n.Kc(fP,!0),n.Kc(Kt.a,!0),n.Kc(mP,!0),n.Kc(gP,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.actionsList=i.first),n.yc(i=n.ec())&&(e.appPanelList=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first),n.yc(i=n.ec())&&(e.basketHome=i.first))},decls:58,vars:69,consts:[[1,"maarch-container"],["id","viewThumbnail",2,"display","none","position","fixed","z-index","2","margin-left","1px"],["style","max-height: 100vh;",3,"src",4,"ngIf"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content",2,"padding-bottom","20px"],[1,"title",2,"cursor","pointer",3,"click"],[1,"far",2,"cursor","pointer","margin-left","10px"],["class","title-divider",4,"ngIf"],["class","content",4,"ngIf"],[1,"bg-head-content"],[2,"flex","1","overflow-x","auto","overflow-y","hidden",3,"listProperties","totalRes","selectedRes","routeDatas","title","toggleAllRes","refreshEventAfterAction","refreshEvent"],["filtersTool",""],[1,"container"],[1,"container-content"],["class","example-loading-shade",4,"ngIf"],[1,"table-head"],[1,"table-head-result"],["color","primary",2,"margin","10px","padding-right","10px",3,"checked","indeterminate","title","change"],[4,"ngIf"],[1,"table-head-tool"],[1,"paginatorResultList",3,"length","pageSizeOptions"],["paginatorResultList",""],[3,"contextMode","currentFolderInfo","totalRes","selectedRes","currentResource","refreshEvent","refreshPanelFolders"],["actionsList",""],[2,"height","90%","overflow","auto","position","absolute","width","100%"],["cdkDropList","","id","folder-list","mat-table","","matSort","","matSortActive","resId","matSortDisableClear","","matSortDirection","asc",2,"width","100%",3,"cdkDropListConnectedTo","cdkDropListData","cdkDropListDisabled","dataSource"],["tableBasketListSort","matSort"],["matColumnDef","resId"],["mat-cell","","style","padding:0;border-top: solid 1px rgba(0, 0, 0, 0.12);",3,"selected-data",4,"matCellDef"],["mat-row","","class","rowData","style","cursor: pointer;","cdkDrag","",3,"locked","cdkDragDisabled","cdkDragData","contextmenu","click","cdkDragStarted",4,"matRowDef","matRowDefColumns"],["position","end","autoFocus","false",1,"panel-right",2,"overflow-x","hidden",3,"fixedInViewport","opened","mode","ngStyle"],["snav2",""],["style","height: 100%;overflow: hidden;",3,"matTooltip","innerHTML",4,"ngIf"],[2,"display","flex","position","sticky","top","0px","z-index","2"],["mat-icon-button","",2,"font-size","20px","color","#666",3,"click"],[1,"fa","fa-arrow-right"],[3,"refreshBadgeNotes","refreshBadgeAttachments"],["appPanelList",""],["actionsListContext",""],[2,"max-height","100vh",3,"src"],[1,"title-divider"],[1,"content"],[1,"content-item"],["class","content-item private",4,"ngIf"],["class","content-item",4,"ngIf"],[1,"content-item","private"],[2,"max-height","100px","overflow","auto"],[4,"ngFor","ngForOf"],["color","secondary"],[1,"example-loading-shade"],["mat-cell","",2,"padding","0","border-top","solid 1px rgba(0, 0, 0, 0.12)"],[1,"main-info"],[2,"width","50px"],["color","primary",3,"checked","change","click"],["mat-icon-button","",1,"followIcon",2,"margin-left","-25px",3,"title","click"],[2,"margin-bottom","5px",3,"ngClass"],["style","cursor:pointer;","class","main-info-status",4,"ngIf"],["class","main-info-data","style","width:200px;text-align:center;cursor:pointer;",4,"ngIf"],[1,"main-info-data",2,"font-weight","bold","flex","1","cursor","pointer",3,"title"],[1,"main-info-action"],["color","warn",4,"ngIf"],["class","folder-info",4,"ngIf"],[1,"main-info-status",2,"cursor","pointer"],["color","primary",3,"title","ngStyle","class",4,"ngIf"],["class","watermark",4,"ngIf"],["style","color: red;","class","fa fa-lock fa-2x",3,"title",4,"ngIf"],["color","primary",3,"title","ngStyle"],[1,"watermark"],[1,"fa","fa-lock","fa-2x",2,"color","red",3,"title"],[1,"main-info-data",2,"width","200px","text-align","center","cursor","pointer"],[2,"color","rgba(0,0,0,0.4)","font-size","90%"],[1,"fas","fa-barcode",3,"title"],["color","warn"],["mat-icon-button","",3,"title","click"],["fontSet","fas","fontIcon","fa-comments fa-2x",3,"matBadgeHidden","matBadge","color"],["fontSet","fas","fontIcon","fa-paperclip fa-2x",3,"matBadgeHidden","matBadge","color"],["fontSet","fas","fontIcon","fa-sitemap fa-2x",3,"color"],["mat-icon-button","",3,"title","disabled","click","mouseenter","mouseleave"],[1,"fa",3,"ngClass"],["fontSet","fas","fontIcon","fa-info-circle fa-2x"],[1,"folder-info"],["class","badge badge-folder",3,"title","click",4,"ngFor","ngForOf"],[1,"badge","badge-folder",3,"title","click"],[1,"fa","fa-folder"],["mat-row","","cdkDrag","",1,"rowData",2,"cursor","pointer",3,"cdkDragDisabled","cdkDragData","contextmenu","click","cdkDragStarted"],["class","example-custom-placeholder",4,"cdkDragPlaceholder"],["class","dragPreview",4,"cdkDragPreview"],[1,"example-custom-placeholder"],[1,"dragPreview"],[1,"fas","fa-envelope-open-text","fa-2x"],[2,"height","100%","overflow","hidden",3,"matTooltip","innerHTML"]],template:function(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"mat-card",1),n.Oc(3,vP,3,5,"img",2),n.Vb(),n.Wb(4,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",6),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Wb(10,"div",7),n.Wb(11,"div"),n.Wb(12,"div",8),n.dc("click",(function(){return e.folderInfoOpened=!e.folderInfoOpened})),n.Rb(13,"i",9),n.Qc(14),n.ic(15,"translate"),n.Oc(16,_P,1,0,"div",10),n.Vb(),n.Oc(17,OP,9,6,"div",11),n.Vb(),n.Vb(),n.Wb(18,"div",12),n.Wb(19,"app-filters-tool",13,14),n.dc("toggleAllRes",(function(t){return e.toggleAllRes(t)}))("refreshEventAfterAction",(function(){return e.refreshDaoAfterAction()}))("refreshEvent",(function(){return e.refreshDao()})),n.ic(21,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(22,"div",15),n.Wb(23,"div",16),n.Oc(24,wP,2,1,"div",17),n.Wb(25,"div",18),n.Wb(26,"div",19),n.Wb(27,"mat-checkbox",20),n.dc("change",(function(t){return e.toggleAllRes(t)})),n.ic(28,"translate"),n.Vb(),n.Qc(29),n.ic(30,"ucfirst"),n.ic(31,"translate"),n.Oc(32,MP,3,4,"small",21),n.Vb(),n.Wb(33,"div",22),n.Wb(34,"span"),n.Rb(35,"mat-paginator",23,24),n.Vb(),n.Wb(37,"span"),n.Wb(38,"app-folder-action-list",25,26),n.dc("refreshEvent",(function(){return e.refreshDaoAfterAction()}))("refreshPanelFolders",(function(){return e.foldersService.getFolders()})),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(40,"div",27),n.Wb(41,"table",28,29),n.Ub(43,30),n.Oc(44,QP,18,26,"td",31),n.Tb(),n.Oc(45,BP,3,4,"tr",32),n.Vb(),n.Vb(),n.Rb(46,"div",18),n.Vb(),n.Vb(),n.Vb(),n.Wb(47,"mat-sidenav",33,34),n.Oc(49,UP,1,2,"div",35),n.Wb(50,"div",36),n.Wb(51,"button",37),n.dc("click",(function(){return n.Dc(t),n.zc(48).close()})),n.Rb(52,"mat-icon",38),n.Vb(),n.Vb(),n.Wb(53,"app-panel-list",39,40),n.dc("refreshBadgeNotes",(function(t){return e.refreshBadgeNotes(t)}))("refreshBadgeAttachments",(function(t){return e.refreshBadgeAttachments(t)})),n.Vb(),n.Rb(55,"mat-divider"),n.Vb(),n.Vb(),n.Wb(56,"app-folder-action-list",25,41),n.dc("refreshEvent",(function(){return e.refreshDaoAfterAction()}))("refreshPanelFolders",(function(){return e.foldersService.getFolders()})),n.Vb()}2&t&&(n.Db(3),n.oc("ngIf",""!==e.thumbnailUrl),n.Db(2),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("banner-opened",e.folderInfoOpened)("banner-closed",!e.folderInfoOpened),n.Db(2),n.Ib("fa-plus-square",!e.folderInfoOpened)("fa-minus-square",e.folderInfoOpened),n.Db(1),n.Sc("\xa0",n.jc(15,56,"lang.folderInformations")," "),n.Db(2),n.oc("ngIf",e.folderInfoOpened),n.Db(1),n.oc("ngIf",e.folderInfoOpened),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.oc("listProperties",e.listProperties)("totalRes",e.allResInBasket.length)("selectedRes",e.selectedRes)("routeDatas","/rest/folders/"+e.folderInfo.id+"/filters")("title",n.jc(21,58,"lang.searchMailInFolder")),n.Db(3),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.isLoadingResults),n.Db(3),n.pc("title",n.jc(28,60,"lang.selectAllResInBasket")),n.oc("checked",e.selectedRes.length==e.allResInBasket.length&&e.selectedRes.length>0)("indeterminate",e.selectedRes.length>0&&e.selectedRes.length<e.allResInBasket.length),n.Db(2),n.Tc("\xa0",e.resultsLength," ",n.jc(30,62,n.jc(31,64,"lang.records")),"\xa0"),n.Db(3),n.oc("ngIf",e.selectedRes.length>0),n.Db(3),n.oc("length",e.resultsLength)("pageSizeOptions",n.uc(66,$P)),n.Db(3),n.oc("contextMode",!1)("currentFolderInfo",e.folderInfo)("totalRes",e.allResInBasket.length)("selectedRes",e.selectedRes)("currentResource",e.currentResource),n.Db(3),n.oc("cdkDropListConnectedTo",e.listTodrag())("cdkDropListData",e.data)("cdkDropListDisabled",e.dragInit||e.appService.getViewMode())("dataSource",e.data),n.Db(4),n.oc("matRowDefColumns",e.displayedColumnsBasket),n.Db(2),n.Ib("docView",e.innerHtml),n.oc("fixedInViewport",e.appService.getViewMode())("opened",(e.appService.getViewMode(),!1))("mode",e.appService.getViewMode()?"over":"side")("ngStyle",n.vc(67,HP,e.appService.getViewMode()?"80%":"30%")),n.Db(2),n.oc("ngIf",e.innerHtml),n.Db(7),n.oc("contextMode",!0)("currentFolderInfo",e.folderInfo)("totalRes",e.allResInBasket.length)("selectedRes",e.selectedRes)("currentResource",e.currentResource))},directives:[I.e,I.f,K.a,P.t,Ot,We,OI,j.a,Kt.a,uP,vt.o,lo.e,Fe.a,vt.c,vt.b,vt.n,I.d,P.w,k.b,S.a,pM,T.a,P.s,V.c,vt.a,P.q,wt.a,vt.m,lo.a,lo.c,lo.d,A.b],pipes:[g.d,Tt.u,P.b,si,Wt.a,Tt.p],styles:[".dragPreview[_ngcontent-%COMP%]{text-align:center;border-radius:5px;background:#fff;padding:10px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);color:#135f7f}.banner-opened[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:10px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;background:#1a80ab;width:100%}.banner-opened[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#fff}.banner-opened[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#1a80ab;height:1px}.banner-opened[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{display:flex;font-size:16px}.banner-opened[_ngcontent-%COMP%] .content-item[_ngcontent-%COMP%]{flex:1;padding-left:20px;padding-right:20px}.banner-opened[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .private[_ngcontent-%COMP%]{font-style:italic;display:flex;justify-content:flex-end;align-items:center}.banner-closed[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:10px;position:relative;width:100%}.banner-closed[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#fff}.followIcon[_ngcontent-%COMP%]{color:#f99830}.folder-info[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.badge-folder[_ngcontent-%COMP%]{cursor:pointer;background:#f99830;margin:5px;font-size:12px;border-radius:3px;opacity:.8;max-width:250px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),t})();class XP{constructor(t,e){this.http=t,this.filtersListService=e}getRepoIssues(t,e,i,n,a,s){return this.filtersListService.updateListsPropertiesPage(i),this.filtersListService.updateListsPropertiesPageSize(s),this.http.get(`${n}?limit=${s}&offset=${i*s}${a}`)}}function qP(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",14),n.dc("click",(function(){return n.Dc(t),n.hc().loadActionList()})),n.Qc(1,"Actions "),n.Rb(2,"mat-icon",15),n.Vb()}if(2&t){n.hc();const t=n.zc(3);n.oc("matMenuTriggerFor",t)}}function KP(t,e){if(1&t&&n.Rb(0,"span",16,17),2&t){const t=n.hc(),e=n.zc(3);n.Lc("left",t.contextMenuPosition.x)("top",t.contextMenuPosition.y),n.oc("matMenuTriggerFor",e)}}function YP(t,e){if(1&t&&(n.Wb(0,"div",18),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Sc(" ",t.contextMenuTitle," ")}}function JP(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",19),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().launchEvent(i)})),n.Wb(1,"span"),n.Qc(2),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc();n.oc("disabled",""==t.component||0==i.selectedRes.length),n.Db(2),n.Rc(t.label)}}function ZP(t,e){if(1&t&&(n.Wb(0,"button",20),n.ic(1,"translate"),n.Rb(2,"mat-icon",21),n.Wb(3,"span"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc(),e=n.zc(15);n.oc("matMenuTriggerFor",e)("disabled",0===t.selectedRes.length)("title",n.jc(1,4,"lang.freezeRetentionRule")),n.Db(4),n.Rc(n.jc(5,6,"lang.freezeRetentionRule"))}}function tV(t,e){if(1&t&&(n.Wb(0,"button",20),n.ic(1,"translate"),n.Rb(2,"mat-icon",22),n.Wb(3,"span"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc(),e=n.zc(27);n.oc("matMenuTriggerFor",e)("disabled",0===t.selectedRes.length)("title",n.jc(1,4,"lang.setBindingDocument")),n.Db(4),n.Rc(n.jc(5,6,"lang.setBindingDocument"))}}let eV=(()=>{class t{constructor(t,e,i,a,s,o,r,c,l){this.translate=t,this.http=e,this.notify=i,this.dialog=a,this.router=s,this.actionService=o,this.headerService=r,this.functionService=c,this.privilegeService=l,this.loading=!1,this.triggerEvent=new n.o,this.contextMenuPosition={x:"0px",y:"0px"},this.contextMenuTitle="",this.currentAction={},this.basketInfo={},this.contextResId=0,this.currentLock=null,this.arrRes=[],this.folderList=[],this.actionsList=[],this.currentResource={},this.refreshEvent=new n.o,this.refreshEventAfterAction=new n.o,this.refreshPanelFolders=new n.o}ngOnInit(){}open(t,e,i){return this.loadActionList(),this.contextMenuPosition.x=t+"px",this.contextMenuPosition.y=e+"px",this.currentResource=i,this.contextMenuTitle=i.chrono,this.contextResId=i.resId,this.folderList=void 0!==i.folders?i.folders:[],this.getFreezeBindingValue(),this.contextMenu.openMenu(),!1}launchEvent(t,e=null){this.arrRes=[],this.currentAction=t,this.arrRes=this.selectedRes,this.contextMode&&this.selectedRes.length>1&&(this.contextMenuTitle="",this.contextResId=0),this.functionService.empty(e)||(this.contextMenuTitle=e.chrono,this.currentResource=e),this.actionService.launchAction(t,this.currentBasketInfo.ownerId,this.currentBasketInfo.groupId,this.currentBasketInfo.basketId,this.selectedRes,this.currentResource,!0)}loadActionList(){JSON.stringify(this.basketInfo)!=JSON.stringify(this.currentBasketInfo)&&(this.basketInfo=JSON.parse(JSON.stringify(this.currentBasketInfo)),this.http.get("../rest/resourcesList/users/"+this.currentBasketInfo.ownerId+"/groups/"+this.currentBasketInfo.groupId+"/baskets/"+this.currentBasketInfo.basketId+"/actions").subscribe(t=>{this.actionsList=t.actions.length>0?t.actions:[{id:0,label:this.translate.instant("lang.noAction"),component:""}],this.loading=!1},t=>{this.notify.handleErrors(t)}))}refreshList(){this.refreshEvent.emit()}refreshFolders(){this.refreshPanelFolders.emit()}unFollow(){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.stopFollowingAlert")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.request("DELETE","../rest/resources/unfollow",{body:{resources:this.selectedRes}})),Object(mt.a)(t=>{this.notify.success(this.translate.instant("lang.removedFromFolder")),this.headerService.nbResourcesFollowed-=t.unFollowed,this.refreshList()})).subscribe()}toggleFreezing(t){this.http.put("../rest/archival/freezeRetentionRule",{resources:this.selectedRes,freeze:t}).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant(t?"lang.retentionRuleFrozen":"lang.retentionRuleUnfrozen")),this.refreshList()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}toogleBinding(t){this.http.put("../rest/archival/binding",{resources:this.selectedRes,binding:t}).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant(t?"lang.bindingMail":!1===t?"lang.noBindingMail":"lang.bindingUndefined")),this.refreshList()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}getFreezeBindingValue(){this.isSelectedFreeze=this.currentResource.retentionFrozen,this.isSelectedBinding=this.currentResource.binding}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(o.c),n.Qb(bC),n.Qb(y.a),n.Qb(_t.a),n.Qb(Dt.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-actions-list"]],viewQuery:function(t,e){var i;1&t&&n.Xc(ne.d,!0),2&t&&n.yc(i=n.ec())&&(e.contextMenu=i.first)},inputs:{selectedRes:"selectedRes",totalRes:"totalRes",contextMode:"contextMode",currentBasketInfo:"currentBasketInfo",currentResource:"currentResource"},outputs:{triggerEvent:"triggerEvent",refreshEvent:"refreshEvent",refreshEventAfterAction:"refreshEventAfterAction",refreshPanelFolders:"refreshPanelFolders"},decls:45,vars:63,consts:[["mat-stroked-button","",3,"matMenuTriggerFor","click",4,"ngIf"],["style","position: fixed;",3,"matMenuTriggerFor","left","top",4,"ngIf"],["menu","matMenu"],["style","text-align: center;font-size: 10px;color: white;background: #135F7F;padding: 5px;font-weight: bold;",4,"ngIf"],["mat-menu-item","",3,"disabled","click",4,"ngFor","ngForOf"],["mat-menu-item","",1,"followAction",3,"disabled","click"],[1,"far","fa-star","fa-2x"],["mat-menu-item","",3,"matMenuTriggerFor","disabled","title",4,"ngIf"],["ng-switch","getValue(var)"],["freezeRentalRule","matMenu"],["mat-menu-item","",3,"title","click"],["bindingRentalRule","matMenu"],["mat-menu-item","",3,"title","innerHTML","click"],[3,"resIds","currentFolders","refreshList","refreshFolders"],["mat-stroked-button","",3,"matMenuTriggerFor","click"],["matSuffix","",1,"fa","fa-caret-down"],[2,"position","fixed",3,"matMenuTriggerFor"],["menu2",""],[2,"text-align","center","font-size","10px","color","white","background","#135F7F","padding","5px","font-weight","bold"],["mat-menu-item","",3,"disabled","click"],["mat-menu-item","",3,"matMenuTriggerFor","disabled","title"],[1,"freezeIcon","fas","fa-snowflake",2,"font-size","20px"],[1,"bindidngIcon","fas","fa-exclamation",2,"font-size","20px"]],template:function(t,e){1&t&&(n.Oc(0,qP,3,1,"button",0),n.Oc(1,KP,2,5,"span",1),n.Wb(2,"mat-menu",null,2),n.Oc(4,YP,2,1,"div",3),n.Oc(5,JP,3,2,"button",4),n.Rb(6,"mat-divider"),n.Wb(7,"button",5),n.dc("click",(function(){return e.unFollow()})),n.Rb(8,"mat-icon",6),n.Wb(9,"span"),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Vb(),n.Rb(12,"mat-divider"),n.Oc(13,ZP,6,8,"button",7),n.Wb(14,"mat-menu",8,9),n.Wb(16,"button",10),n.dc("click",(function(){return e.toggleFreezing(!0)})),n.ic(17,"translate"),n.Qc(18),n.ic(19,"translate"),n.Vb(),n.Rb(20,"mat-divider"),n.Wb(21,"button",10),n.dc("click",(function(){return e.toggleFreezing(!1)})),n.ic(22,"translate"),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Vb(),n.Oc(25,tV,6,8,"button",7),n.Wb(26,"mat-menu",null,11),n.Wb(28,"buton",12),n.dc("click",(function(){return e.toogleBinding(!0)})),n.ic(29,"stripTags"),n.ic(30,"translate"),n.ic(31,"translate"),n.Vb(),n.Rb(32,"mat-divider"),n.Wb(33,"buton",12),n.dc("click",(function(){return e.toogleBinding(!1)})),n.ic(34,"stripTags"),n.ic(35,"translate"),n.ic(36,"translate"),n.Vb(),n.Rb(37,"mat-divider"),n.Wb(38,"buton",10),n.dc("click",(function(){return e.toogleBinding(null)})),n.ic(39,"translate"),n.Qc(40),n.ic(41,"translate"),n.Vb(),n.Rb(42,"mat-divider"),n.Vb(),n.Rb(43,"mat-divider"),n.Wb(44,"folder-menu",13),n.dc("refreshList",(function(){return e.refreshList()}))("refreshFolders",(function(){return e.refreshFolders()})),n.Vb(),n.Vb()),2&t&&(n.oc("ngIf",!e.contextMode),n.Db(1),n.oc("ngIf",e.contextMode),n.Db(1),n.Fb("actionListMenu"),n.Db(2),n.oc("ngIf",e.contextMode&&1==e.selectedRes.length),n.Db(1),n.oc("ngForOf",e.actionsList),n.Db(2),n.oc("disabled",0===e.selectedRes.length),n.Db(3),n.Rc(n.jc(11,37,"lang.untrackThisMail")),n.Db(3),n.oc("ngIf",e.privilegeService.hasCurrentUserPrivilege("freeze_retention_rule")),n.Db(3),n.Fb(!0===e.isSelectedFreeze?"isSelectedMenu":"notSelectedMenu"),n.oc("title",n.jc(17,39,"lang.freezeTheCurrentUsefulLife")),n.Db(2),n.Sc(" ",n.jc(19,41,"lang.freezeTheCurrentUsefulLife")," "),n.Db(3),n.Fb(!1===e.isSelectedFreeze?"isSelectedMenu":"notSelectedMenu"),n.oc("title",n.jc(22,43,"lang.unfreezeTheCurrentUsefulLife")),n.Db(2),n.Sc(" ",n.jc(24,45,"lang.unfreezeTheCurrentUsefulLife")," "),n.Db(2),n.oc("ngIf",e.privilegeService.hasCurrentUserPrivilege("set_binding_document")),n.Db(3),n.Fb(!0===e.isSelectedBinding?"isSelectedMenu":"notSelectedMenu"),n.oc("title",n.jc(29,47,n.jc(30,49,"lang.bindingMail")))("innerHTML",n.jc(31,51,"lang.bindingMail"),n.Ec),n.Db(5),n.Fb(!1===e.isSelectedBinding?"isSelectedMenu":"notSelectedMenu"),n.oc("title",n.jc(34,53,n.jc(35,55,"lang.noBindingMail")))("innerHTML",n.jc(36,57,"lang.noBindingMail"),n.Ec),n.Db(5),n.Fb(null===e.isSelectedBinding?"isSelectedMenu":"notSelectedMenu"),n.oc("title",n.jc(39,59,"lang.doNotDefine")),n.Db(2),n.Sc(" ",n.jc(41,61,"lang.doNotDefine"),""),n.Db(4),n.oc("resIds",e.selectedRes)("currentFolders",e.folderList))},directives:[P.t,ne.e,P.s,T.a,ne.b,S.a,Uw,k.b,ne.d,Y.j],pipes:[g.d,Tt.r],styles:[".mat-icon[_ngcontent-%COMP%]{height:auto}.mat-stroked-button[_ngcontent-%COMP%]{border-radius:20px;border-color:#135f7f;color:#135f7f} .actionListMenu .mat-menu-content{padding-top:0;padding-bottom:0}.followAction[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{font-size:20px;color:#8e3e52}.freezeIcon[_ngcontent-%COMP%]{color:#135f7f}.bindidngIcon[_ngcontent-%COMP%]{color:#135f7f;margin-left:5px}.isSelectedMenu[_ngcontent-%COMP%]{background:#f99830}.notSelectedMenu[_ngcontent-%COMP%]{background:#fff}"]}),t})();const iV=["snav2"],nV=["actionsListContext"],aV=["filtersTool"],sV=["appPanelList"],oV=["tableBasketListSort"];function rV(t,e){if(1&t&&(n.Rb(0,"img",39),n.ic(1,"async"),n.ic(2,"secureUrl")),2&t){const t=n.hc();n.oc("src",n.jc(1,1,n.jc(2,3,t.thumbnailUrl)),n.Gc)}}function cV(t,e){1&t&&n.Rb(0,"mat-spinner")}function lV(t,e){if(1&t&&(n.Wb(0,"div",40),n.Oc(1,cV,1,0,"mat-spinner",16),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.isLoadingResults)}}function dV(t,e){if(1&t&&(n.Wb(0,"small"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("- ",t.selectedRes.length," ",n.jc(2,2,"lang.selected"),"")}}function hV(t,e){if(1&t&&(n.Ub(0),n.Rb(1,"i",62),n.ic(2,"translate"),n.Qc(3,"\xa0"),n.Rb(4,"span",63),n.ic(5,"timeAgo"),n.ic(6,"fullDate"),n.Qc(7," - "),n.Rb(8,"i",64),n.ic(9,"translate"),n.Qc(10,"\xa0"),n.Rb(11,"span",63),n.ic(12,"timeAgo"),n.ic(13,"fullDate"),n.Tb()),2&t){const t=n.hc(2).$implicit,e=n.hc(2).$implicit;n.Db(1),n.pc("title",n.jc(2,6,"lang.creationDate")),n.Db(3),n.pc("title",n.jc(6,10,t.displayValue.creationDate)),n.oc("innerHTML",n.jc(5,8,t.displayValue.creationDate),n.Ec),n.Db(4),n.pc("title",n.jc(9,12,"lang.closingDate")),n.Db(3),n.pc("title",n.jc(13,16,e.closing_date)),n.oc("innerHTML",n.jc(12,14,e.closing_date),n.Ec)}}function uV(t,e){if(1&t&&(n.Ub(0),n.Rb(1,"i",62),n.ic(2,"translate"),n.Qc(3,"\xa0"),n.Rb(4,"span",63),n.ic(5,"timeAgo"),n.ic(6,"fullDate"),n.Qc(7," - "),n.Rb(8,"i",65),n.ic(9,"translate"),n.Qc(10,"\xa0"),n.Rb(11,"span",63),n.ic(12,"timeLimit"),n.ic(13,"fullDate"),n.Tb()),2&t){const t=n.hc(2).$implicit;n.Db(1),n.pc("title",n.jc(2,6,"lang.creationDate")),n.Db(3),n.pc("title",n.jc(6,10,t.displayValue.creationDate)),n.oc("innerHTML",n.jc(5,8,t.displayValue.creationDate),n.Ec),n.Db(4),n.pc("title",n.jc(9,12,"lang.processLimitDate")),n.Db(3),n.pc("title",n.jc(13,16,t.displayValue.processLimitDate)),n.oc("innerHTML",n.jc(12,14,t.displayValue.processLimitDate),n.Ec)}}function pV(t,e){if(1&t&&(n.Ub(0),n.Oc(1,hV,14,18,"ng-container",16),n.ic(2,"translate"),n.Oc(3,uV,14,18,"ng-container",16),n.ic(4,"translate"),n.Tb()),2&t){const t=n.hc(3).$implicit;n.Db(1),n.oc("ngIf",t.closing_date!=n.jc(2,2,"lang.undefined")),n.Db(2),n.oc("ngIf",t.closing_date==n.jc(4,4,"lang.undefined"))}}function bV(t,e){if(1&t&&(n.Ub(0),n.Rb(1,"i",66),n.Qc(2," \xa0 "),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Gb("fa ",t.icon,""),n.pc("title",t.label)}}function fV(t,e){if(1&t&&(n.Wb(0,"span",69),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2).$implicit;n.qc("title","id: ",t.displayValue,""),n.Db(1),n.Rc(n.jc(2,2,"lang.undefined"))}}function mV(t,e){if(1&t&&(n.Wb(0,"span",66),n.ic(1,"translate"),n.Qc(2),n.ic(3,"translate"),n.Vb()),2&t){const t=n.hc(2).$implicit;n.pc("title",n.jc(1,2,"lang."+t.displayValue)),n.Db(2),n.Rc(n.jc(3,4,"lang."+t.displayValue))}}function gV(t,e){if(1&t&&(n.Ub(0),n.Oc(1,fV,3,4,"span",67),n.ic(2,"translate"),n.Oc(3,mV,4,6,"span",68),n.ic(4,"translate"),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",!n.jc(2,2,"lang."+t.displayValue)),n.Db(2),n.oc("ngIf",n.jc(4,4,"lang."+t.displayValue))}}function vV(t,e){if(1&t&&n.Rb(0,"span",72),2&t){const t=n.hc(2).$implicit;n.pc("title",t.displayTitle),n.oc("innerHTML",t.displayValue,n.Ec)}}function _V(t,e){if(1&t&&(n.Rb(0,"span",73),n.ic(1,"timeAgo")),2&t){const t=n.hc(2).$implicit;n.oc("innerHTML",n.jc(1,1,t.displayValue),n.Ec)}}function yV(t,e){if(1&t&&(n.Ub(0),n.Oc(1,vV,1,2,"span",70),n.Oc(2,_V,2,3,"span",71),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",!t.value.includes("Date")),n.Db(1),n.oc("ngIf",t.value.includes("Date"))}}function xV(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",61),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc(2).$implicit;return n.hc().launchEventSubData(i,a)})),n.ic(1,"translate"),n.Oc(2,pV,5,6,"ng-container",16),n.Oc(3,bV,3,4,"ng-container",16),n.Oc(4,gV,5,6,"ng-container",16),n.Oc(5,yV,3,2,"ng-container",16),n.Vb()}if(2&t){const t=e.$implicit;n.Fb(t.cssClasses.join(" ")),n.Ib("hasEvent",t.event&&t.displayValue!==n.jc(1,8,"lang.undefined")),n.Db(2),n.oc("ngIf","getCreationAndProcessLimitDates"==t.value),n.Db(1),n.oc("ngIf",""!=t.icon),n.Db(1),n.oc("ngIf","getCategory"==t.value),n.Db(1),n.oc("ngIf","getCategory"!=t.value&&"getCreationAndProcessLimitDates"!=t.value)}}function CV(t,e){if(1&t&&(n.Wb(0,"div"),n.Oc(1,xV,6,10,"span",60),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc();n.Gb("sub-info column-",e.templateColumns,"-list"),n.Db(1),n.oc("ngForOf",t.display)}}const OV=function(t){return{color:t}};function DV(t,e){if(1&t&&n.Rb(0,"mat-icon",78),2&t){const t=n.hc(2).$implicit;n.Hb("",t.statusImage.charAt(0),"",t.statusImage.charAt(1)," ",t.statusImage," ",t.statusImage.charAt(0),"",t.statusImage.charAt(1),"-2x"),n.pc("title",t.statusLabel),n.oc("ngStyle",n.vc(9,OV,t.priorityColor))}}function wV(t,e){1&t&&(n.Wb(0,"span",79),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.confidential")))}function MV(t,e){if(1&t&&(n.Rb(0,"mat-icon",80),n.ic(1,"translate")),2&t){const t=n.hc(2).$implicit;n.rc("title","",n.jc(1,2,"lang.warnLockResInProgress")," : ",t.locker,"")}}function kV(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",74),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit,i=n.hc();return i.launch(i.defaultAction,e)})),n.Oc(1,DV,1,11,"mat-icon",75),n.Oc(2,wV,3,3,"span",76),n.Oc(3,MV,2,4,"mat-icon",77),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",!0!==t.isLocked),n.Db(1),n.oc("ngIf","Y"===t.confidentiality),n.Db(1),n.oc("ngIf",!0===t.isLocked)}}function SV(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"span",82),n.Rb(2,"i",83),n.ic(3,"translate"),n.Qc(4),n.Vb(),n.Tb()),2&t){const t=n.hc(2).$implicit;n.Db(2),n.pc("title",n.jc(3,2,"lang.barcode")),n.Db(2),n.Sc(" ",t.barcode,"")}}function IV(t,e){if(1&t&&(n.Ub(0),n.Qc(1),n.Tb()),2&t){const t=n.hc(2).$implicit;n.Db(1),n.Sc(" ",t.chrono," ")}}function PV(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",81),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit,i=n.hc();return i.launch(i.defaultAction,e)})),n.Oc(1,SV,5,4,"ng-container",16),n.ic(2,"translate"),n.ic(3,"translate"),n.Oc(4,IV,2,1,"ng-container",16),n.ic(5,"translate"),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",t.chrono==n.jc(2,2,"lang.undefined")&&t.barcode!=n.jc(3,4,"lang.undefined")),n.Db(3),n.oc("ngIf",t.chrono!=n.jc(5,6,"lang.undefined"))}}function VV(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",86),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(3);return i.stopPropagation(),s.goToFolder(a)})),n.ic(1,"translate"),n.Rb(2,"i",87),n.Qc(3),n.Vb()}if(2&t){const t=e.$implicit;n.rc("title","",n.jc(1,3,"lang.goToFolder")," : ",t.label,""),n.Db(3),n.Sc(" ",t.label,"")}}function RV(t,e){if(1&t&&(n.Wb(0,"div",84),n.Oc(1,VV,4,5,"span",85),n.ic(2,"sortBy"),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngForOf",n.kc(2,1,t.folders,"label"))}}const jV=function(t){return[t]};function AV(t,e){if(1&t){const t=n.Xb();n.Wb(0,"td",41),n.Oc(1,CV,2,4,"div",42),n.Wb(2,"div",43),n.Wb(3,"span",44),n.Wb(4,"mat-checkbox",45),n.dc("change",(function(i){n.Dc(t);const a=e.$implicit;return n.hc().toggleRes(i,a)}))("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.Vb(),n.Vb(),n.Wb(5,"button",46),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc();return i.stopPropagation(),s.toggleMailTracking(a)})),n.ic(6,"translate"),n.ic(7,"translate"),n.Rb(8,"mat-icon",47),n.Vb(),n.Oc(9,kV,4,3,"span",48),n.Oc(10,PV,6,8,"span",49),n.Wb(11,"span",50),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc();return a.launch(a.defaultAction,i)})),n.ic(12,"translate"),n.Qc(13),n.ic(14,"shorten"),n.Vb(),n.Wb(15,"span",51),n.Wb(16,"button",52),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc();return i.stopPropagation(),s.togglePanel("note",a)})),n.ic(17,"translate"),n.Rb(18,"mat-icon",53),n.Vb(),n.Wb(19,"button",52),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc();return i.stopPropagation(),s.togglePanel("attachment",a)})),n.ic(20,"translate"),n.Rb(21,"mat-icon",54),n.Vb(),n.Wb(22,"button",52),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc();return i.stopPropagation(),s.togglePanel("diffusion",a)})),n.ic(23,"translate"),n.Rb(24,"mat-icon",55),n.Vb(),n.Wb(25,"button",56),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc();return i.stopPropagation(),s.viewDocument(a)}))("mouseenter",(function(){n.Dc(t);const i=e.$implicit;return n.hc().viewThumbnail(i)}))("mouseleave",(function(){return n.Dc(t),n.hc().closeThumbnail()})),n.ic(26,"translate"),n.ic(27,"translate"),n.Rb(28,"mat-icon",57),n.Vb(),n.Wb(29,"button",52),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc();return i.stopPropagation(),s.goToDetail(a)})),n.ic(30,"translate"),n.Rb(31,"mat-icon",58),n.Vb(),n.Vb(),n.Vb(),n.Oc(32,RV,3,4,"div",59),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(),a=n.zc(43);n.Ib("selected-data",t.checked),n.Db(1),n.oc("ngIf",!a.opened&&!i.appService.getViewMode()&&t.display.length>0),n.Db(3),n.oc("checked",t.checked),n.Db(1),n.oc("title",!0===t.mailTracking?n.jc(6,31,"lang.untrackThisMail"):n.jc(7,33,"lang.trackThisMail")),n.Db(3),n.oc("ngClass",n.vc(53,jV,!0===t.mailTracking?"fas fa-star":"far fa-star")),n.Db(1),n.oc("ngIf",!i.appService.getViewMode()),n.Db(1),n.oc("ngIf",!i.appService.getViewMode()),n.Db(1),n.Ib("undefined",t.subject==n.jc(12,35,"lang.undefined")),n.pc("title",t.subject),n.Db(2),n.Rc(n.lc(14,37,t.subject,150,"...")),n.Db(3),n.Ib("noData",0==t.countNotes),n.pc("title",n.jc(17,41,"lang.notes")),n.Db(2),n.pc("matBadgeHidden",0==t.countNotes),n.pc("matBadge",t.countNotes),n.oc("color",a.opened&&t.checked&&"note"==i.currentMode?"primary":""),n.Db(1),n.Ib("noData",0==t.countAttachments),n.pc("title",n.jc(20,43,"lang.attachments")),n.Db(2),n.pc("matBadgeHidden",0==t.countAttachments),n.pc("matBadge",t.countAttachments),n.oc("color",a.opened&&t.checked&&"attachment"==i.currentMode?"primary":""),n.Db(1),n.pc("title",n.jc(23,45,"lang.diffusionList")),n.Db(2),n.oc("color",a.opened&&t.checked&&"diffusion"==i.currentMode?"primary":""),n.Db(1),n.pc("title",t.hasDocument?n.jc(26,47,"lang.viewResource"):n.jc(27,49,"lang.noDocument")),n.oc("disabled",!t.hasDocument),n.Db(3),n.oc("ngClass",n.vc(55,jV,t.hasDocument?"fa-eye":"fa-eye-slash")),n.Db(1),n.pc("title",n.jc(30,51,"lang.linkDetails")),n.Db(3),n.oc("ngIf",i.displayFolderTags&&void 0!==t.folders&&t.folders.length>0)}}function WV(t,e){1&t&&n.Rb(0,"div",91)}function TV(t,e){if(1&t&&(n.Wb(0,"div",92),n.Rb(1,"i",93),n.Rb(2,"br"),n.Qc(3),n.ic(4,"translate"),n.Wb(5,"b"),n.Qc(6),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(3),n.Sc("",n.jc(4,2,"lang.classifyInFolder")," : "),n.Db(3),n.Rc(t.chrono)}}function EV(t,e){if(1&t){const t=n.Xb();n.Wb(0,"tr",88),n.dc("contextmenu",(function(i){n.Dc(t);const a=e.$implicit;return n.hc().open(i,a)}))("cdkDragStarted",(function(){n.Dc(t);const i=e.$implicit;return n.hc().selectSpecificRes(i)})),n.Oc(1,WV,1,0,"div",89),n.Oc(2,TV,7,4,"div",90),n.Vb()}if(2&t){const t=e.$implicit;n.Ib("locked",1==t.isLocked),n.oc("cdkDragData",t)}}function FV(t,e){if(1&t&&n.Rb(0,"div",94),2&t){const t=n.hc();n.oc("matTooltip",t.currentChrono)("innerHTML",t.innerHtml,n.Ec)}}const LV=function(){return[10,25,50,100,150]},QV=function(t){return{width:t}};let NV=(()=>{class t{constructor(t,e,i,a,s,o,r,c,l,d,h,u,p,b,f){this.translate=t,this.router=e,this._activatedRoute=i,this.route=a,this.http=s,this.dialog=o,this.sanitizer=r,this.headerService=c,this.filtersListService=l,this.notify=d,this.overlay=h,this.viewContainerRef=u,this.appService=p,this.foldersService=b,this.actionService=f,this.loading=!1,this.docUrl="",this.injectDatasParam={resId:0,editable:!1},this.currentResource={},this.filtersChange=new n.o,this.dragInit=!0,this.templateColumns=7,this.displayedColumnsBasket=["resId"],this.displayedMainData=[{value:"chrono",cssClasses:["softColorData","align_centerData","chronoData"],icon:""},{value:"subject",cssClasses:["longData"],icon:""}],this.displayedSecondaryData=[],this.resultsLength=0,this.isLoadingResults=!0,this.listProperties={},this.currentBasketInfo={},this.currentChrono="",this.currentMode="",this.defaultAction={id:19,component:"processAction"},this.thumbnailUrl="",this.selectedRes=[],this.allResInBasket=[],this.selectedDiffusionTab=0,this.specificChrono="",this.displayFolderTags=!1,this.destroy$=new da.a,this.currentSelectedChrono="",i.queryParams.subscribe(t=>this.specificChrono=t.chrono),this.subscription=this.foldersService.catchEvent().subscribe(t=>{"function"===t.type&&this[t.content]()}),this.subscription2=this.actionService.catchAction().subscribe(t=>{this.refreshDaoAfterAction()})}ngOnInit(){this.loading=!1,this.isLoadingResults=!1,this.route.params.subscribe(t=>{this.dragInit=!0,this.destroy$.next(!0),this.basketUrl="../rest/resourcesList/users/"+t.userSerialId+"/groups/"+t.groupSerialId+"/baskets/"+t.basketId,this.currentBasketInfo={ownerId:t.userSerialId,groupId:t.groupSerialId,basketId:t.basketId},this.headerService.currentBasketInfo=this.currentBasketInfo,this.filtersListService.filterMode=!1,this.selectedRes=[],this.sidenavRight.close(),this.listProperties=this.filtersListService.initListsProperties(this.currentBasketInfo.ownerId,this.currentBasketInfo.groupId,this.currentBasketInfo.basketId,"basket",this.specificChrono),setTimeout(()=>{this.dragInit=!1},1e3),this.initResultList()},t=>{this.notify.handleErrors(t)})}ngOnDestroy(){this.destroy$.next(!0),this.subscription.unsubscribe(),this.subscription2.unsubscribe()}initResultList(){this.resultListDatabase=new zV(this.http,this.filtersListService),this.paginator.pageIndex=this.listProperties.page,this.paginator.pageSize=this.listProperties.pageSize,this.sort.sortChange.subscribe(()=>this.paginator.pageIndex=0),Object(gy.a)(this.sort.sortChange,this.paginator.page,this.filtersChange).pipe(Object(Zo.a)(this.destroy$),Object(Qe.a)({}),Object(ft.a)(()=>(this.data=[],this.isLoadingResults=!0,this.resultListDatabase.getRepoIssues(this.sort.active,this.sort.direction,this.paginator.pageIndex,this.basketUrl,this.filtersListService.getUrlFilters(),this.paginator.pageSize))),Object(l.a)(t=>(this.isLoadingResults=!1,t=this.processPostData(t),this.resultsLength=t.count,this.allResInBasket=t.allResources,this.currentBasketInfo.basket_id=t.basket_id,this.defaultAction=t.defaultAction,this.displayFolderTags=t.displayFolderTags,this.templateColumns=t.templateColumns,this.headerService.setHeader(t.basketLabel,"","fa fa-inbox"),t.resources)),Object(m.a)(t=>(this.notify.handleErrors(t),this.router.navigate(["/home"]),this.isLoadingResults=!1,Object(c.a)(!1)))).subscribe(t=>this.data=t)}goTo(t){this.filtersListService.filterMode=!1,this.docUrl==="../rest/resources/"+t.resId+"/content"&&this.sidenavRight.opened?this.sidenavRight.close():(this.docUrl="../rest/resources/"+t.resId+"/content",this.currentChrono=t.chrono,this.innerHtml=this.sanitizer.bypassSecurityTrustHtml("<iframe style='height:100%;width:100%;' src='"+this.docUrl+"' class='embed-responsive-item'></iframe>"),this.sidenavRight.open())}goToDetail(t){this.router.navigate(["/resources/"+t.resId])}goToFolder(t){this.router.navigate(["/folders/"+t.id])}togglePanel(t,e){const i=this.currentResource;e.checked=!0,this.toggleAllRes({checked:!1}),this.toggleRes({checked:!0},e),i.resId===e.resId&&this.sidenavRight.opened&&this.currentMode===t?this.sidenavRight.close():(this.currentMode=t,this.currentResource=e,this.appPanelList.loadComponent(t,e),this.sidenavRight.open())}refreshBadgeNotes(t){this.currentResource.countNotes=t}refreshBadgeAttachments(t){this.currentResource.countAttachments=t}refreshDao(){this.paginator.pageIndex=this.listProperties.page,this.filtersChange.emit()}refreshDaoAfterAction(){this.sidenavRight.close(),this.refreshDao(),this.toggleAllRes({checked:!1})}filterThis(t){this.filtersTool.setInputSearch(t)}viewThumbnail(t){if(t.hasDocument){const e=+new Date;this.thumbnailUrl="../rest/resources/"+t.resId+"/thumbnail?tsp="+e,$("#viewThumbnail").show(),$("#listContent").css({overflow:"hidden"})}}closeThumbnail(){$("#viewThumbnail").hide(),$("#listContent").css({overflow:"auto"})}processPostData(t){return this.displayedSecondaryData=[],t.resources.forEach(t=>{Object.keys(t).forEach(e=>{"statusImage"===e&&null==t[e]?t[e]="fa-question undefined":null!=t[e]&&""!==t[e]||-1!==["closingDate","countAttachments","countNotes","display","folders","hasDocument","integrations","mailTracking"].indexOf(e)||(t[e]=this.translate.instant("lang.undefined"))}),t.display.forEach(t=>{if(t.event=!1,t.displayTitle=t.displayValue,null!=t.displayValue&&""!==t.displayValue||-1!==["getCreationAndProcessLimitDates","getParallelOpinionsNumber"].indexOf(t.value))if(["getSenders","getRecipients"].indexOf(t.value)>-1)t.event=!0,t.displayValue.length>1?(t.displayTitle=t.displayValue.join(" - "),t.displayValue="<b>"+t.displayValue.length+"</b> "+this.translate.instant("lang.contactsAlt")):t.displayValue=1===t.displayValue.length?t.displayValue[0]:this.translate.instant("lang.undefined");else if("getCreationAndProcessLimitDates"===t.value)t.icon="";else if("getVisaWorkflow"===t.value){let e=[],i="",n="";const a=[];t.displayValue.forEach((t,s)=>{i="",n=t.user,a.push(n),"sign"===t.mode&&(n="<u>"+n+"</u>"),i=""===t.date?'<i class="fa fa-hourglass-half"></i> <span title="'+this.translate.instant("lang."+t.mode+"User")+'">'+n+"</span>":'<span color="accent" style=""><i class="fa fa-check"></i> <span title="'+this.translate.instant("lang."+t.mode+"User")+'">'+n+"</span></span>",t.current&&s>=0&&(i='<b color="primary">'+i+"</b>"),e.push(i)});const s=t.displayValue.map(t=>t.current).indexOf(!0);if(s>0){e=e.slice(s-1),e=e.reverse();const i=t.displayValue.map(t=>t.current).reverse().indexOf(!0);i>1&&(e=e.slice(i-1)),e=e.reverse()}else 0===s?(e=e.reverse(),e=e.slice(s-2),e=e.reverse()):-1===s&&(e=e.slice(e.length-2));(s>=2||-1===s&&t.displayValue.length>=3)&&e.unshift("..."),-1!==s&&s-2<=t.displayValue.length&&s+2<t.displayValue.length&&t.displayValue.length>=3&&e.push("..."),t.displayValue=e.join(' <i class="fas fa-long-arrow-alt-right"></i> '),t.displayTitle=a.join(" - ")}else if("getSignatories"===t.value){const e=[];t.displayValue.forEach(t=>{e.push(t.user)}),t.displayValue=e.join(", "),t.displayTitle=e.join(", ")}else"getParallelOpinionsNumber"===t.value&&(t.displayTitle=t.displayValue+" "+this.translate.instant("lang.opinionsSent"),t.displayValue=t.displayValue>0?'<b color="primary">'+t.displayValue+"</b> "+this.translate.instant("lang.opinionsSent"):t.displayValue+" "+this.translate.instant("lang.opinionsSent"));else t.displayValue=this.translate.instant("lang.undefined"),t.displayTitle="";t.label=void 0===t.displayLabel?this.translate.instant("lang."+t.value):t.displayLabel}),t.checked=-1!==this.selectedRes.indexOf(t.resId)}),t}toggleRes(t,e){if(t.checked)-1===this.selectedRes.indexOf(e.resId)&&(this.currentResource=e,this.selectedRes.push(e.resId),e.checked=!0);else{const t=this.selectedRes.indexOf(e.resId);this.selectedRes.splice(t,1),e.checked=!1}}toggleAllRes(t){this.selectedRes=[],t.checked?(this.data.forEach(t=>{t.checked=!0}),this.selectedRes=JSON.parse(JSON.stringify(this.allResInBasket))):this.data.forEach(t=>{t.checked=!1})}selectSpecificRes(t){this.toggleAllRes({checked:!1}),this.toggleRes({checked:!0},t)}open({x:t,y:e},i){return!1===i.checked&&(i.checked=!0,this.toggleAllRes({checked:!1}),this.toggleRes({checked:!0},i)),this.actionsList.open(t,e,i),!1}launch(t,e){e.checked=!0,this.toggleAllRes({checked:!1}),this.toggleRes({checked:!0},e),setTimeout(()=>{this.actionsList.launchEvent(t,e)},200)}listTodrag(){return this.foldersService.getDragIds()}launchEventSubData(t,e){t.event&&["getSenders","getRecipients"].indexOf(t.value)>-1&&t.displayValue!==this.translate.instant("lang.undefined")&&this.openContact(e,"getSenders"===t.value?"senders":"recipients")}openContact(t,e){this.dialog.open(YD,{panelClass:"maarch-modal",data:{title:`${t.chrono} - ${t.subject}`,mode:e,resId:t.resId}})}viewDocument(t){this.http.get(`../rest/resources/${t.resId}/content?mode=view`,{responseType:"blob"}).pipe(Object(mt.a)(e=>{const i=new Blob([e],{type:"application/pdf"}),n=URL.createObjectURL(i),a=window.open();a.document.write(`<iframe style="width: 100%;height: 100%;margin: 0;padding: 0;" src="${n}" frameborder="0" allowfullscreen></iframe>`),a.document.title=t.chrono}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}toggleMailTracking(t){t.mailTracking?this.http.request("DELETE","../rest/resources/unfollow",{body:{resources:[t.resId]}}).pipe(Object(mt.a)(()=>this.headerService.nbResourcesFollowed--),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe():this.http.post("../rest/resources/follow",{resources:[t.resId]}).pipe(Object(mt.a)(()=>this.headerService.nbResourcesFollowed++),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe(),t.mailTracking=!t.mailTracking}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(o.c),n.Qb(o.a),n.Qb(o.a),n.Qb(v.b),n.Qb(q.b),n.Qb(ca.b),n.Qb(y.a),n.Qb(sI),n.Qb(D.a),n.Qb(ZD.c),n.Qb(n.T),n.Qb(w.a),n.Qb(tw.a),n.Qb(bC))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(iV,!0),n.Kc(nV,!0),n.Kc(aV,!0),n.Kc(sV,!0),n.Kc(Kt.a,!0),n.Kc(oV,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.actionsList=i.first),n.yc(i=n.ec())&&(e.filtersTool=i.first),n.yc(i=n.ec())&&(e.appPanelList=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:53,vars:55,consts:[[1,"maarch-container"],["id","viewThumbnail",2,"display","none","position","fixed","z-index","2","margin-left","1px"],["style","max-height: 100vh;",3,"src",4,"ngIf"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[2,"flex","1","overflow-x","auto","overflow-y","hidden",3,"listProperties","totalRes","selectedRes","routeDatas","title","toggleAllRes","refreshEventAfterAction","refreshEvent"],["filtersTool",""],[1,"container"],[1,"container-content"],["class","example-loading-shade",4,"ngIf"],[1,"table-head"],[1,"table-head-result"],["color","primary",2,"margin","10px","padding-right","10px",3,"checked","indeterminate","title","change"],[4,"ngIf"],[1,"table-head-tool"],[1,"paginatorResultList",3,"length","pageSizeOptions"],["paginatorResultList",""],[3,"selectedRes","currentBasketInfo"],["actionsList",""],[3,"contextMode","totalRes","selectedRes","currentBasketInfo","currentResource","refreshEvent","refreshPanelFolders"],[2,"height","90%","overflow","auto","position","absolute","width","100%"],["cdkDropList","","id","document-list","mat-table","","matSort","","matSortActive","resId","matSortDisableClear","","matSortDirection","asc",2,"width","100%",3,"cdkDropListConnectedTo","cdkDropListData","dataSource","cdkDropListDisabled"],["tableBasketListSort","matSort"],["matColumnDef","resId"],["mat-cell","","style","padding:0;border-top: solid 1px rgba(0, 0, 0, 0.12);",3,"selected-data",4,"matCellDef"],["mat-row","","class","rowData","cdkDrag","",3,"locked","cdkDragData","contextmenu","cdkDragStarted",4,"matRowDef","matRowDefColumns"],["position","end","autoFocus","false",1,"panel-right",2,"overflow-x","hidden",3,"fixedInViewport","opened","mode","ngStyle"],["snav2",""],["style","height: 100%;overflow: hidden;",3,"matTooltip","innerHTML",4,"ngIf"],[2,"display","flex","position","sticky","top","0px","z-index","2"],["mat-icon-button","",2,"font-size","20px","color","#666",3,"click"],[1,"fa","fa-arrow-right"],[3,"refreshBadgeNotes","refreshBadgeAttachments"],["appPanelList",""],[3,"contextMode","totalRes","selectedRes","currentBasketInfo","refreshEvent","refreshEventAfterAction","refreshPanelFolders"],["actionsListContext",""],[2,"max-height","100vh",3,"src"],[1,"example-loading-shade"],["mat-cell","",2,"padding","0","border-top","solid 1px rgba(0, 0, 0, 0.12)"],[3,"class",4,"ngIf"],[1,"main-info"],[2,"width","50px","height","16px"],["color","primary",3,"checked","change","click"],["mat-icon-button","",1,"followIcon",2,"margin-left","-25px",3,"title","click"],[3,"ngClass"],["style","cursor:pointer;","class","main-info-status",3,"click",4,"ngIf"],["class","main-info-data","style","width:200px;text-align:center;cursor:pointer;",3,"click",4,"ngIf"],[1,"main-info-data",2,"font-weight","bold","flex","1","cursor","pointer",3,"title","click"],[1,"main-info-action"],["mat-icon-button","",3,"title","click"],["fontSet","fas","fontIcon","fa-comments fa-2x",3,"matBadgeHidden","matBadge","color"],["fontSet","fas","fontIcon","fa-paperclip fa-2x",3,"matBadgeHidden","matBadge","color"],["fontSet","fas","fontIcon","fa-sitemap fa-2x",3,"color"],["mat-icon-button","",3,"title","disabled","click","mouseenter","mouseleave"],[1,"fa",3,"ngClass"],["fontSet","fas","fontIcon","fa-info-circle fa-2x"],["class","folder-info",4,"ngIf"],["class","sub-info-data","style","flex:1;white-space: pre;\n overflow: hidden;\n text-overflow: ellipsis;\n padding-left: 5px;\n padding-right: 5px;",3,"class","hasEvent","click",4,"ngFor","ngForOf"],[1,"sub-info-data",2,"flex","1","white-space","pre","overflow","hidden","text-overflow","ellipsis","padding-left","5px","padding-right","5px",3,"click"],[1,"fa","fa-calendar",3,"title"],[3,"innerHTML","title"],[1,"fa","fa-lock",3,"title"],[1,"fa","fa-stopwatch",3,"title"],[3,"title"],["style","opacity: 0.5",3,"title",4,"ngIf"],[3,"title",4,"ngIf"],[2,"opacity","0.5",3,"title"],[3,"title","innerHTML",4,"ngIf"],[3,"innerHTML",4,"ngIf"],[3,"title","innerHTML"],[3,"innerHTML"],[1,"main-info-status",2,"cursor","pointer",3,"click"],["color","primary",3,"title","ngStyle","class",4,"ngIf"],["class","watermark",4,"ngIf"],["style","color: red;","class","fa fa-lock fa-2x",3,"title",4,"ngIf"],["color","primary",3,"title","ngStyle"],[1,"watermark"],[1,"fa","fa-lock","fa-2x",2,"color","red",3,"title"],[1,"main-info-data",2,"width","200px","text-align","center","cursor","pointer",3,"click"],[2,"color","rgba(0,0,0,0.4)","font-size","90%"],[1,"fas","fa-barcode",3,"title"],[1,"folder-info"],["class","badge badge-folder",3,"title","click",4,"ngFor","ngForOf"],[1,"badge","badge-folder",3,"title","click"],[1,"fa","fa-folder"],["mat-row","","cdkDrag","",1,"rowData",3,"cdkDragData","contextmenu","cdkDragStarted"],["class","example-custom-placeholder",4,"cdkDragPlaceholder"],["class","dragPreview",4,"cdkDragPreview"],[1,"example-custom-placeholder"],[1,"dragPreview"],[1,"fas","fa-envelope-open-text","fa-2x"],[2,"height","100%","overflow","hidden",3,"matTooltip","innerHTML"]],template:function(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"mat-card",1),n.Oc(3,rV,3,5,"img",2),n.Vb(),n.Wb(4,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",6),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Wb(10,"div",7),n.Wb(11,"app-filters-tool",8,9),n.dc("toggleAllRes",(function(t){return e.toggleAllRes(t)}))("refreshEventAfterAction",(function(){return e.refreshDaoAfterAction()}))("refreshEvent",(function(){return e.refreshDao()})),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(14,"div",10),n.Wb(15,"div",11),n.Oc(16,lV,2,1,"div",12),n.Wb(17,"div",13),n.Wb(18,"div",14),n.Wb(19,"mat-checkbox",15),n.dc("change",(function(t){return e.toggleAllRes(t)})),n.ic(20,"translate"),n.Vb(),n.Qc(21),n.ic(22,"ucfirst"),n.ic(23,"translate"),n.Oc(24,dV,3,4,"small",16),n.Vb(),n.Wb(25,"div",17),n.Wb(26,"span"),n.Rb(27,"mat-paginator",18,19),n.Vb(),n.Wb(29,"span"),n.Rb(30,"app-tools-list",20,21),n.Vb(),n.Wb(32,"span"),n.Wb(33,"app-actions-list",22,21),n.dc("refreshEvent",(function(){return e.refreshDao()}))("refreshPanelFolders",(function(){return e.foldersService.getFolders()})),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(35,"div",23),n.Wb(36,"table",24,25),n.Ub(38,26),n.Oc(39,AV,33,57,"td",27),n.Tb(),n.Oc(40,EV,3,3,"tr",28),n.Vb(),n.Vb(),n.Rb(41,"div",13),n.Vb(),n.Vb(),n.Vb(),n.Wb(42,"mat-sidenav",29,30),n.Oc(44,FV,1,2,"div",31),n.Wb(45,"div",32),n.Wb(46,"button",33),n.dc("click",(function(){return n.Dc(t),n.zc(43).close()})),n.Rb(47,"mat-icon",34),n.Vb(),n.Vb(),n.Wb(48,"app-panel-list",35,36),n.dc("refreshBadgeNotes",(function(t){return e.refreshBadgeNotes(t)}))("refreshBadgeAttachments",(function(t){return e.refreshBadgeAttachments(t)})),n.Vb(),n.Rb(50,"mat-divider"),n.Vb(),n.Vb(),n.Wb(51,"app-actions-list",37,38),n.dc("refreshEvent",(function(){return e.refreshDao()}))("refreshEventAfterAction",(function(){return e.refreshDaoAfterAction()}))("refreshPanelFolders",(function(){return e.foldersService.getFolders()})),n.Vb()}2&t&&(n.Db(3),n.oc("ngIf",""!==e.thumbnailUrl),n.Db(2),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.oc("listProperties",e.listProperties)("totalRes",e.allResInBasket.length)("selectedRes",e.selectedRes)("routeDatas","/rest/resourcesList/users/"+e.currentBasketInfo.ownerId+"/groups/"+e.currentBasketInfo.groupId+"/baskets/"+e.currentBasketInfo.basketId+"/filters")("title",n.jc(13,44,"lang.searchMailInBasket")),n.Db(3),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.isLoadingResults),n.Db(3),n.pc("title",n.jc(20,46,"lang.selectAllResInBasket")),n.oc("checked",e.selectedRes.length==e.allResInBasket.length&&e.selectedRes.length>0)("indeterminate",e.selectedRes.length>0&&e.selectedRes.length<e.allResInBasket.length),n.Db(2),n.Tc("\xa0",e.allResInBasket.length," ",n.jc(22,48,n.jc(23,50,"lang.records")),"\xa0"),n.Db(3),n.oc("ngIf",e.selectedRes.length>0),n.Db(3),n.oc("length",e.resultsLength)("pageSizeOptions",n.uc(52,LV)),n.Db(3),n.oc("selectedRes",e.selectedRes)("currentBasketInfo",e.currentBasketInfo),n.Db(3),n.oc("contextMode",!1)("totalRes",e.allResInBasket.length)("selectedRes",e.selectedRes)("currentBasketInfo",e.currentBasketInfo)("currentResource",e.currentResource),n.Db(3),n.oc("cdkDropListConnectedTo",e.listTodrag())("cdkDropListData",e.data)("dataSource",e.data)("cdkDropListDisabled",e.dragInit||e.appService.getViewMode()),n.Db(4),n.oc("matRowDefColumns",e.displayedColumnsBasket),n.Db(2),n.Ib("docView",!e.filtersListService.filterMode),n.oc("fixedInViewport",e.appService.getViewMode())("opened",(e.appService.getViewMode(),!1))("mode",e.appService.getViewMode()?"over":"side")("ngStyle",n.vc(53,QV,e.appService.getViewMode()?"80%":"30%")),n.Db(2),n.oc("ngIf",e.innerHtml&&!e.filtersListService.filterMode),n.Db(7),n.oc("contextMode",!0)("totalRes",e.allResInBasket.length)("selectedRes",e.selectedRes)("currentBasketInfo",e.currentBasketInfo))},directives:[I.e,I.f,K.a,P.t,Ot,We,OI,j.a,Kt.a,Ow,eV,vt.o,lo.e,Fe.a,vt.c,vt.b,vt.n,I.d,P.w,k.b,S.a,pM,T.a,V.c,vt.a,P.q,wt.a,P.s,vt.m,lo.a,lo.c,lo.d,A.b],pipes:[g.d,Tt.u,P.b,si,Tt.p,ps,uo,bs,Wt.a],styles:[".align_leftData[_ngcontent-%COMP%]{text-align:left}.align_centerData[_ngcontent-%COMP%]{text-align:center}.align_rightData[_ngcontent-%COMP%]{text-align:right}.boldFontData[_ngcontent-%COMP%]{font-weight:700}.bigFontData[_ngcontent-%COMP%]{font-size:14px}.smallFontData[_ngcontent-%COMP%]{font-size:10px}.normalData[_ngcontent-%COMP%]{flex:1}.chronoData[_ngcontent-%COMP%]{width:150px}.longData[_ngcontent-%COMP%]{flex:3}.locked[_ngcontent-%COMP%]{opacity:.5}.watermark[_ngcontent-%COMP%]{position:absolute;left:50%;transform:translateX(-50%) rotate(-20deg);color:red;font-weight:700;opacity:.6}.dragPreview[_ngcontent-%COMP%]{text-align:center;border-radius:5px;background:#fff;padding:10px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);color:#135f7f}.folder-info[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.badge-folder[_ngcontent-%COMP%]{background:#f99830;margin:5px;font-size:12px;border-radius:3px;opacity:.8;max-width:250px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.badge-folder[_ngcontent-%COMP%], .hasEvent[_ngcontent-%COMP%]{cursor:pointer}.hasEvent[_ngcontent-%COMP%]:hover{color:#135f7f}.followIcon[_ngcontent-%COMP%]{color:#f99830}"]}),t})();class zV{constructor(t,e){this.http=t,this.filtersListService=e}getRepoIssues(t,e,i,n,a,s){return this.filtersListService.updateListsPropertiesPage(i),this.filtersListService.updateListsPropertiesPageSize(s),this.http.get(`${n}?limit=${s}&offset=${i*s}${a}`)}}const BV=["numberInput"];function UV(t,e){1&t&&(n.Wb(0,"div",10),n.Rb(1,"mat-spinner",11),n.Vb())}function $V(t,e){if(1&t&&n.Rb(0,"mat-datepicker-toggle",34),2&t){n.hc();const t=n.zc(8);n.oc("for",t)}}function HV(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field",30),n.dc("click",(function(){return n.Dc(t),n.zc(8).open()})),n.Wb(1,"mat-label"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"input",31),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).receivedDate=e})),n.ic(5,"translate"),n.Vb(),n.Oc(6,$V,1,1,"mat-datepicker-toggle",32),n.Rb(7,"mat-datepicker",null,33),n.Vb()}if(2&t){const t=n.zc(8),e=n.hc(2);n.Db(2),n.Rc(n.jc(3,6,"lang.registeredMailReceivedDate")),n.Db(2),n.oc("ngModel",e.receivedDate)("matDatepicker",t)("placeholder",n.jc(5,8,"lang.chooseDate"))("max",e.today),n.Db(2),n.oc("ngIf",!e.receivedDate)}}function GV(t,e){if(1&t&&(n.Wb(0,"mat-option",15),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Rc(t)}}function XV(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"mat-select",35),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).reason=e})),n.ic(2,"translate"),n.Oc(3,GV,2,2,"mat-option",36),n.Wb(4,"mat-option",15),n.ic(5,"translate"),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.pc("placeholder",n.jc(2,5,"lang.returnReason")),n.oc("ngModel",t.reason),n.Db(2),n.oc("ngForOf",t.returnReasons),n.Db(1),n.pc("value",n.jc(5,7,"lang.others")),n.Db(2),n.Rc(n.jc(7,9,"lang.others"))}}function qV(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"mat-label"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"input",37),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).reasonOther=e})),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(2),n.Rc(n.jc(3,2,"lang.precise")),n.Db(2),n.oc("ngModel",t.reasonOther)}}function KV(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"mat-label"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"input",38,39),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).number=e})),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(2),n.Rc(n.jc(3,2,"lang.registeredMailNumber")),n.Db(2),n.oc("ngModel",t.number)}}function YV(t,e){1&t&&(n.Wb(0,"mat-header-cell"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.returnType")))}function JV(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.ic(2,"translate"),n.ic(3,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ","distributed"===t.type?n.jc(2,1,"lang.registeredMailDistributed"):n.jc(3,3,"lang.registeredMailNotDistributed")," ")}}function ZV(t,e){1&t&&(n.Wb(0,"mat-header-cell"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.registeredMailNumber")))}function tR(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.number," ")}}function eR(t,e){1&t&&(n.Wb(0,"mat-header-cell"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.registeredMailReceivedDate")))}function iR(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.receivedDate," ")}}function nR(t,e){1&t&&(n.Wb(0,"mat-header-cell"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.returnReason")))}function aR(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc("",t.returnReason," ")}}function sR(t,e){1&t&&(n.Wb(0,"mat-header-cell"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.cancel")))}function oR(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell"),n.Wb(1,"button",40),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).rollbackReception(i)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",41),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.oc("title",n.jc(2,1,"lang.cancel")))}function rR(t,e){1&t&&n.Rb(0,"mat-header-row")}function cR(t,e){1&t&&n.Rb(0,"mat-row")}function lR(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",12),n.Wb(1,"form",13),n.Wb(2,"div"),n.Wb(3,"mat-form-field"),n.Wb(4,"mat-select",14),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().type=e}))("ngModelChange",(function(e){n.Dc(t);const i=n.hc();return i.changeType(e),i.focusRegisteredMailNumber(),i.receivedDate=i.today})),n.ic(5,"translate"),n.Wb(6,"mat-option",15),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Wb(9,"mat-option",15),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Oc(12,HV,9,10,"mat-form-field",16),n.Oc(13,XV,8,11,"mat-form-field",17),n.Oc(14,qV,5,4,"mat-form-field",17),n.ic(15,"translate"),n.Oc(16,KV,6,4,"mat-form-field",17),n.Wb(17,"div",18),n.Wb(18,"button",19),n.dc("click",(function(){n.Dc(t);const e=n.hc();return e.receiveAcknowledgement(),e.focusRegisteredMailNumber()})),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(21,"mat-table",20),n.Ub(22,21),n.Oc(23,YV,3,3,"mat-header-cell",22),n.Oc(24,JV,4,5,"mat-cell",23),n.Tb(),n.Ub(25,24),n.Oc(26,ZV,3,3,"mat-header-cell",22),n.Oc(27,tR,2,1,"mat-cell",23),n.Tb(),n.Ub(28,25),n.Oc(29,eR,3,3,"mat-header-cell",22),n.Oc(30,iR,2,1,"mat-cell",23),n.Tb(),n.Ub(31,26),n.Oc(32,nR,3,3,"mat-header-cell",22),n.Oc(33,aR,2,1,"mat-cell",23),n.Tb(),n.Ub(34,27),n.Oc(35,sR,3,3,"mat-header-cell",22),n.Oc(36,oR,4,3,"mat-cell",23),n.Tb(),n.Oc(37,rR,1,0,"mat-header-row",28),n.Oc(38,cR,1,0,"mat-row",29),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(1),n.oc("formGroup",t.adminFormGroup),n.Db(3),n.pc("placeholder",n.jc(5,16,"lang.returnType")),n.oc("ngModel",t.type),n.Db(2),n.oc("value","distributed"),n.Db(1),n.Rc(n.jc(8,18,"lang.registeredMailDistributed")),n.Db(2),n.oc("value","notDistributed"),n.Db(1),n.Rc(n.jc(11,20,"lang.registeredMailNotDistributed")),n.Db(2),n.oc("ngIf","notDistributed"===t.type||"distributed"===t.type),n.Db(1),n.oc("ngIf","notDistributed"===t.type),n.Db(1),n.oc("ngIf","notDistributed"===t.type&&t.reason===n.jc(15,22,"lang.others")),n.Db(2),n.oc("ngIf","notDistributed"===t.type||"distributed"===t.type),n.Db(2),n.oc("disabled",!t.adminFormGroup.valid),n.Db(1),n.Rc(n.jc(20,24,"lang.validate")),n.Db(2),n.oc("dataSource",t.dataSource),n.Db(16),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns)}}let dR=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.http=t,this.notify=e,this.headerService=i,this.functions=n,this.appService=a,this.translate=s,this._formBuilder=o,this.dialog=r,this.loading=!1,this.today=new Date,this.receivedDate=this.today,this.displayedColumns=["type","number","receivedDate","returnReason","rollback"],this.returnReasons=[this.translate.instant("lang.returnReasonCannotAccess"),this.translate.instant("lang.returnReasonNotClaimed"),this.translate.instant("lang.returnReasonRejected"),this.translate.instant("lang.returnReasonUnknown")]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.arReception"));const t=[X.I.pattern(/(2C|2D|RW) ?([0-9]{3} ?[0-9]{3} ?[0-9]{4}) ?([0-9])/),X.I.required];this.adminFormGroup=this._formBuilder.group({type:["",X.I.required],number:["",t],receivedDate:[""],returnReason:[""],returnReasonOther:[""]}),this.loading=!1,this.dataSource=new vt.p([]),this.returnReasons.sort(),this.adminFormGroup.controls.number.valueChanges.pipe(Object(pt.a)(500),Object(mt.a)(()=>this.receiveAcknowledgement())).subscribe()}receiveAcknowledgement(){const t={type:this.type,number:this.number,receivedDate:this.functions.formatDateObjectToDateString(this.receivedDate),returnReason:this.reason,status:void 0};if(!this.functions.empty(this.number)&&this.adminFormGroup.get("number").valid){if("notDistributed"===this.type){if(!this.adminFormGroup.get("receivedDate").valid)return void this.notify.error(this.translate.instant("lang.fieldsNotValid"));if(!this.adminFormGroup.get("returnReason").valid)return void this.notify.error(this.translate.instant("lang.selectReturnReason"));if(this.reason===this.translate.instant("lang.others")&&this.functions.empty(this.reasonOther))return void this.notify.error(this.translate.instant("lang.fieldsNotValid"));this.reason!==this.translate.instant("lang.others")||this.functions.empty(this.reasonOther)||(t.returnReason=this.reasonOther)}this.http.put("../rest/registeredMails/acknowledgement",t).pipe(Object(mt.a)(e=>{if(e.canRescan){t.status=e.previousStatus;let i=this.translate.instant("lang.confirmRescanToNotDistributed");"distributed"===t.type&&(i=this.translate.instant("lang.confirmRescanToDistributed")),this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.confirmRescanTitle"),msg:i}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>Object(r.a)(this,void 0,void 0,(function*(){yield this.rollbackReception(t),this.receiveAcknowledgement()})))).subscribe()}else{this.notify.success(this.translate.instant("lang.arReceived")),t.status=e.previousStatus;const i=this.dataSource.data;i.unshift(t),this.dataSource.data=i,this.number="",this.receivedDate=this.today,this.reason="",this.reasonOther="",this.focusRegisteredMailNumber()}}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}rollbackReception(t){return Object(r.a)(this,void 0,void 0,(function*(){return new Promise(e=>{this.http.put("../rest/registeredMails/acknowledgement/rollback",t).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.receptionCanceled"));const i=this.dataSource.data;i.splice(i.indexOf(t),1),this.dataSource.data=i,this.focusRegisteredMailNumber(),e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}))}focusRegisteredMailNumber(){setTimeout(()=>{this.numberInput.nativeElement.focus()},0)}changeType(t){"distributed"===t?this.adminFormGroup.get("receivedDate").disable():this.adminFormGroup.get("receivedDate").enable()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(_t.a),n.Qb(w.a),n.Qb(g.e),n.Qb(X.h),n.Qb(q.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-acknowledgement-reception"]],viewQuery:function(t,e){var i;1&t&&n.Xc(BV,!0),2&t&&n.yc(i=n.ec())&&(e.numberInput=i.first)},decls:13,vars:8,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[2,"display","contents",3,"formGroup"],["formControlName","type",3,"ngModel","placeholder","ngModelChange"],[3,"value"],["appearance","outline","style","cursor:pointer;margin-top: 10px;",3,"click",4,"ngIf"],[4,"ngIf"],[2,"text-align","center"],["mat-raised-button","","color","primary","type","button",3,"disabled","click"],[3,"dataSource"],["matColumnDef","type"],[4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","number"],["matColumnDef","receivedDate"],["matColumnDef","returnReason"],["matColumnDef","rollback"],[4,"matHeaderRowDef"],[4,"matRowDef","matRowDefColumns"],["appearance","outline",2,"cursor","pointer","margin-top","10px",3,"click"],["matInput","","readonly","","formControlName","receivedDate","required","",2,"cursor","pointer",3,"ngModel","matDatepicker","placeholder","max","ngModelChange"],["matSuffix","",3,"for",4,"ngIf"],["picker",""],["matSuffix","",3,"for"],["formControlName","returnReason","required","",3,"ngModel","placeholder","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["matInput","","name","returnReasonOther","formControlName","returnReasonOther",3,"ngModel","ngModelChange"],["type","text","matInput","","required","","formControlName","number",3,"ngModel","ngModelChange"],["numberInput",""],["mat-icon-button","","color","primary",3,"title","click"],[1,"fa","fa-undo","fa-2x"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,UV,2,0,"div",8),n.Oc(12,lR,39,26,"mat-card",9),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,V.c,K.a,X.K,X.v,X.m,Y.c,ee.a,X.u,X.k,W.p,k.b,vt.o,vt.c,vt.i,vt.b,vt.k,vt.n,Y.g,J.b,X.d,ae.h,X.F,ae.f,ae.j,Y.j,P.s,vt.h,vt.a,S.a,vt.j,vt.m],pipes:[g.d],encapsulation:2}),t})();const hR=["snav2"],uR=["adminMenuTemplate"],pR=["appSearchResultList"],bR=["appCriteriaTool"];function fR(t,e){1&t&&n.Rb(0,"div",17)}const mR=function(t){return{width:t}};let gR=(()=>{class t{constructor(t,e,i,a,s,o){this.translate=e,this.headerService=i,this.viewContainerRef=a,this.appService=s,this.functions=o,this.searchTerm="",this.filtersChange=new n.o,this.loadingResult=!1,t.queryParams.subscribe(t=>{this.functions.empty(t.value)||(this.searchTerm=t.value)})}ngOnInit(){this.headerService.sideBarAdmin=!0,this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.headerService.setHeader(this.translate.instant("lang.searchMails"),"","")}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(o.a),n.Qb(g.e),n.Qb(y.a),n.Qb(n.T),n.Qb(w.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(hR,!0),n.Kc(uR,!0),n.Xc(pR,!0),n.Kc(bR,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.appSearchResultList=i.first),n.yc(i=n.ec())&&(e.appCriteriaTool=i.first))},decls:21,vars:16,consts:[[1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[2,"width","100%","padding-bottom","10px",3,"isLoadingResult","searchUrlGenerated","loaded"],["appCriteriaTool",""],["id","toolTemplate",2,"width","100%"],[1,"container"],[1,"container-content"],[3,"searchTerm","appCriteriaTool","sidenavRight","loadingResult"],["appSearchResultList",""],["position","end","autoFocus","false",1,"panel-right",2,"overflow-x","hidden",3,"fixedInViewport","opened","mode","ngStyle"],["snav2",""],["id","panelTemplate"],["id","filterTemplate"]],template:function(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-sidenav-container",0),n.Oc(1,fR,1,0,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Wb(10,"div",6),n.Wb(11,"app-criteria-tool",7,8),n.dc("searchUrlGenerated",(function(e){return n.Dc(t),n.zc(17).launchSearch(e,!0)}))("loaded",(function(){return n.Dc(t),n.zc(17).initSavedCriteria()})),n.Vb(),n.Rb(13,"div",9),n.Vb(),n.Vb(),n.Wb(14,"div",10),n.Wb(15,"div",11),n.Wb(16,"app-search-result-list",12,13),n.dc("loadingResult",(function(t){return e.loadingResult=t})),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(18,"mat-sidenav",14,15),n.Rb(20,"div",16),n.Vb(),n.Vb()}if(2&t){const t=n.zc(12);n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.oc("isLoadingResult",e.loadingResult),n.Db(3),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("searchTerm",e.searchTerm)("appCriteriaTool",t)("sidenavRight",e.sidenavRight),n.Db(2),n.oc("fixedInViewport",e.appService.getViewMode())("opened",(e.appService.getViewMode(),!1))("mode",e.appService.getViewMode()?"over":"side")("ngStyle",n.vc(14,mR,e.appService.getViewMode()?"80%":"30%"))}},directives:[I.e,I.f,Ot,We,$D,Ok,I.d,P.w],styles:[".bg-head-content[_ngcontent-%COMP%]{flex-direction:column;padding-bottom:70px}.dragPreview[_ngcontent-%COMP%]{text-align:center;border-radius:5px;background:#fff;padding:10px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);color:#135f7f}.banner-opened[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:10px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;background:#1a80ab;width:100%}.banner-opened[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#fff}.banner-opened[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#1a80ab;height:1px}.banner-opened[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{display:flex;font-size:16px}.banner-opened[_ngcontent-%COMP%] .content-item[_ngcontent-%COMP%]{flex:1;padding-left:20px;padding-right:20px}.banner-opened[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .private[_ngcontent-%COMP%]{font-style:italic;display:flex;justify-content:flex-end;align-items:center}.banner-closed[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:10px;position:relative;width:100%}.banner-closed[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#fff}.followIcon[_ngcontent-%COMP%]{color:#f99830}.folder-info[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.badge-folder[_ngcontent-%COMP%]{cursor:pointer;background:#f99830;margin:5px;font-size:12px;border-radius:3px;opacity:.8;max-width:250px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.filterBadges[_ngcontent-%COMP%]{width:100%}.filterBadges[_ngcontent-%COMP%] > .badge-eraser[_ngcontent-%COMP%]{margin:5px;background:none;cursor:pointer;color:#fff;font-size:20px}.filterBadges[_ngcontent-%COMP%] > .label[_ngcontent-%COMP%]{white-space:inherit}.filterBadges[_ngcontent-%COMP%] > .badge-search[_ngcontent-%COMP%]{margin:5px;background:#fff;color:#135f7f;cursor:pointer}.filtersContent[_ngcontent-%COMP%]{width:100%;display:flex}.filtersContent[_ngcontent-%COMP%] .orderTool[_ngcontent-%COMP%]{flex:1}.basket-order[_ngcontent-%COMP%]{color:#fff;width:300px;padding-left:10px;padding-right:10px;height:55px}.basket-order[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{font-size:30px}.basket-order[_ngcontent-%COMP%] .mat-select-value{color:#fff}.basket-order[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.basket-order[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border:2px solid #fff;border-radius:30px;display:flex;align-items:center}.basket-order[_ngcontent-%COMP%] .mat-form-field-prefix{padding-left:15px;padding-right:10px}.basket-order[_ngcontent-%COMP%] .mat-form-field-label-wrapper{color:#fff}.basket-order[_ngcontent-%COMP%] .mat-select-arrow{color:#fff;margin-right:25px}.basket-order[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.ascDescTool[_ngcontent-%COMP%] .mat-fab[_ngcontent-%COMP%]{background:#135f7f;border:2px solid #fff;color:#fff!important;box-shadow:none}"]}),t})();function vR(t,e){1&t&&(n.Wb(0,"div",11),n.Rb(1,"mat-spinner",12),n.Vb())}function _R(t,e){1&t&&n.Rb(0,"mat-spinner")}function yR(t,e){if(1&t&&(n.Wb(0,"div",20),n.Oc(1,_R,1,0,"mat-spinner",21),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("ngIf",t.isLoadingResults)}}function xR(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-expansion-panel",22),n.Wb(1,"mat-expansion-panel-header"),n.Wb(2,"mat-panel-title",23),n.Wb(3,"mat-checkbox",24),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).mainDocument=e})),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.oc("title",t.mainDocumentInformation.canConvert?"":"Aucune version pdf trouv\xe9!"),n.Db(3),n.oc("ngModel",t.mainDocument)("disabled",!t.mainDocumentInformation.canConvert),n.Db(1),n.Sc("",n.jc(5,4,"lang.mainDocument")," ")}}function CR(t,e){if(1&t&&(n.Wb(0,"div",36),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Sc(" ",t.chronoMaster," ")}}function OR(t,e){if(1&t&&(n.Wb(0,"div",36),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Sc(" ",t.chrono," ")}}function DR(t,e){if(1&t&&(n.Wb(0,"div",37),n.Qc(1),n.ic(2,"ucfirst"),n.ic(3,"translate"),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Tc(" ",n.jc(2,2,n.jc(3,4,"lang.for"))," : ",t.recipients," ")}}function wR(t,e){if(1&t&&(n.Wb(0,"div",36),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Sc(" ",t.creator," ")}}function MR(t,e){if(1&t&&(n.Wb(0,"div",38),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Sc(" ",t.type," ")}}function kR(t,e){if(1&t&&(n.Wb(0,"div",40),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2).$implicit;n.Db(1),n.Sc(" ",n.jc(2,1,"lang.attachment_"+t.status)," ")}}function SR(t,e){if(1&t&&(n.Wb(0,"div"),n.Oc(1,kR,3,3,"div",39),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf","SIGN"===t.status)}}function IR(t,e){if(1&t&&(n.Wb(0,"mat-list-option",30),n.Wb(1,"div"),n.Oc(2,CR,2,1,"div",31),n.Oc(3,OR,2,1,"div",31),n.Oc(4,DR,4,6,"div",32),n.Oc(5,wR,2,1,"div",31),n.Rb(6,"div",33),n.ic(7,"shorten"),n.Oc(8,MR,2,1,"div",34),n.Oc(9,SR,2,1,"div",21),n.Wb(10,"div",35),n.ic(11,"fullDate"),n.Qc(12),n.ic(13,"date"),n.Vb(),n.Vb(),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2).$implicit,a=n.hc(2);n.Ib("disabled",!t.canConvert),n.oc("title",t.canConvert?"":"Aucune version pdf trouv\xe9!")("disabled",!t.canConvert)("value",t.id),n.Db(1),n.Gb("printedFolderElement-item ",i.key,""),n.Db(1),n.oc("ngIf",!a.functions.empty(t.chronoMaster)),n.Db(1),n.oc("ngIf",!a.functions.empty(t.chrono)),n.Db(1),n.oc("ngIf",!a.functions.empty(t.recipients)),n.Db(1),n.oc("ngIf",!a.functions.empty(t.creator)),n.Db(1),n.oc("title",t.label)("innerHTML",n.lc(7,18,t.label,150,"..."),n.Ec),n.Db(2),n.oc("ngIf",!a.functions.empty(t.type)),n.Db(1),n.oc("ngIf",!a.functions.empty(t.status)),n.Db(1),n.oc("title",n.jc(11,22,t.creationDate)),n.Db(2),n.Sc(" ",n.kc(13,24,t.creationDate,"dd/MM/y HH:mm")," ")}}function PR(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",26),n.Wb(1,"mat-expansion-panel"),n.Wb(2,"mat-expansion-panel-header"),n.Wb(3,"mat-panel-title",23),n.Wb(4,"mat-checkbox",27),n.dc("change",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc(2);return e?a.toggleAllElements(e.checked,i.key):null}))("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(7,"mat-selection-list",28),n.Oc(8,IR,14,27,"mat-list-option",29),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(4),n.oc("checked",e.selectedPrintedFolderElement[t.key].value.length>0&&e.selectedPrintedFolderElement[t.key].value.length===e.printedFolderElement[t.key].length)("indeterminate",e.selectedPrintedFolderElement[t.key].value.length>0&&e.selectedPrintedFolderElement[t.key].value.length!==e.printedFolderElement[t.key].length),n.Db(1),n.Sc("",n.jc(6,5,"lang."+t.key)," "),n.Db(2),n.oc("formControl",e.selectedPrintedFolderElement[t.key]),n.Db(1),n.oc("ngForOf",e.printedFolderElement[t.key])}}function VR(t,e){if(1&t&&(n.Ub(0),n.Oc(1,PR,9,7,"div",25),n.Tb()),2&t){const t=e.$implicit,i=n.hc(2);n.Db(1),n.oc("ngIf",i.printedFolderElement[t.key].length>0)}}function RR(t,e){if(1&t){const t=n.Xb();n.Oc(0,yR,2,1,"div",13),n.Wb(1,"div",14),n.Wb(2,"mat-slide-toggle",15),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().summarySheet=e}))("change",(function(e){n.Dc(t);const i=n.hc();return!!e.checked&&i.openSummarySheet()})),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb(),n.Wb(5,"div",14),n.Wb(6,"mat-slide-toggle",16),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().withSeparator=e})),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Wb(9,"div",17),n.Oc(10,xR,6,6,"mat-expansion-panel",18),n.Oc(11,VR,2,1,"ng-container",19),n.ic(12,"keyvalue"),n.Vb()}if(2&t){const t=n.hc();n.oc("ngIf",t.isLoadingResults),n.Db(2),n.oc("ngModel",t.summarySheet),n.Db(1),n.Sc("",n.jc(4,7,"lang.attachSummarySheet")," "),n.Db(3),n.oc("ngModel",t.withSeparator),n.Db(1),n.Sc("",n.jc(8,9,"lang.generateSeparators")," "),n.Db(3),n.oc("ngIf",null!==t.mainDocumentInformation.format),n.Db(1),n.oc("ngForOf",n.jc(12,11,t.printedFolderElement))}}let jR=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.data=n,this.dialogRef=a,this.functions=s,this.sortPipe=o,this.dialog=r,this.loading=!0,this.document=[],this.mainDocument=!1,this.summarySheet=!1,this.withSeparator=!1,this.isLoadingResults=!1,this.mainDocumentInformation={},this.printedFolderElement={attachments:[],notes:[],emails:[],acknowledgementReceipts:[],linkedResources:[],linkedResourcesAttachments:[]},this.selectedPrintedFolderElement={}}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){Object.keys(this.printedFolderElement).forEach(t=>{this.selectedPrintedFolderElement[t]=new X.i({value:[],disabled:!1})}),this.getMainDocInfo(),this.getAttachments(),this.getEmails(),this.getAcknowledgementReceips(),this.getNotes(),yield this.getLinkedResources(),this.loading=!1}))}getMainDocInfo(){return new Promise(t=>{this.http.get(`../rest/resources/${this.data.resId}/fileInformation`).pipe(Object(l.a)(t=>Object.assign(Object.assign({},t.information),{id:this.data.resId})),Object(mt.a)(e=>{this.mainDocumentInformation=e,t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}getAttachments(){return new Promise(t=>{this.http.get("../rest/resources/"+this.data.resId+"/attachments").pipe(Object(l.a)(t=>(t.attachments=t.attachments.map(t=>({id:t.resId,label:t.title,chrono:this.functions.empty(t.chrono)?this.translate.instant("lang.undefined"):t.chrono,type:t.typeLabel,creationDate:t.creationDate,canConvert:t.canConvert,status:t.status})),t.attachments)),Object(mt.a)(e=>{this.printedFolderElement.attachments=this.sortPipe.transform(e,"chrono"),t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}getLinkedResources(){return new Promise(t=>{this.http.get(`../rest/resources/${this.data.resId}/linkedResources`).pipe(Object(mt.a)(e=>Object(r.a)(this,void 0,void 0,(function*(){for(let t=0;t<e.linkedResources.length;t++)this.printedFolderElement.linkedResources.push({id:e.linkedResources[t].resId,label:e.linkedResources[t].subject,chrono:this.functions.empty(e.linkedResources[t].chrono)?this.translate.instant("lang.undefined"):e.linkedResources[t].chrono,creationDate:e.linkedResources[t].documentDate,canConvert:e.linkedResources[t].canConvert}),yield this.getLinkedAttachments(e.linkedResources[t]);t(!0)}))),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}getLinkedAttachments(t){return new Promise(e=>{this.http.get(`../rest/resources/${t.resId}/attachments`).pipe(Object(l.a)(e=>(e.attachments=e.attachments.map(e=>({id:e.resId,label:e.title,resIdMaster:t.resId,chronoMaster:t.chrono,chrono:this.functions.empty(e.chrono)?this.translate.instant("lang.undefined"):e.chrono,type:e.typeLabel,creationDate:e.creationDate,canConvert:e.canConvert,status:e.status})),e.attachments)),Object(mt.a)(t=>{this.printedFolderElement.linkedResourcesAttachments=this.printedFolderElement.linkedResourcesAttachments.concat(this.sortPipe.transform(t,"chronoMaster")),e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),e(!1),Object(c.a)(!1)))).subscribe()})}getEmails(){return new Promise(t=>{this.http.get(`../rest/resources/${this.data.resId}/emails?type=email`).pipe(Object(l.a)(t=>(t.emails=t.emails.map(t=>({id:t.id,recipients:t.recipients,creationDate:t.creation_date,label:this.functions.empty(t.object)?`<i>${this.translate.instant("lang.emptySubject")}<i>`:t.object,canConvert:!0})),t.emails)),Object(mt.a)(e=>{this.printedFolderElement.emails=this.sortPipe.transform(e,"creationDate"),t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}getNotes(){return new Promise(t=>{this.http.get(`../rest/resources/${this.data.resId}/notes`).pipe(Object(l.a)(t=>(t.notes=t.notes.map(t=>({id:t.id,creator:`${t.firstname} ${t.lastname}`,creationDate:t.creation_date,label:t.value,canConvert:!0})),t.notes)),Object(mt.a)(e=>{this.printedFolderElement.notes=this.sortPipe.transform(e,"creationDate"),t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}getAcknowledgementReceips(){return new Promise(t=>{this.http.get(`../rest/resources/${this.data.resId}/acknowledgementReceipts?type=ar`).pipe(Object(l.a)(t=>t.map(t=>{let e,i;return e=this.functions.empty(t.contact.email)?this.translate.instant("lang.contactDeleted"):t.contact.email,i=this.functions.empty(t.contact.firstname)||this.functions.empty(t.contact.lastname)?this.translate.instant("lang.contactDeleted"):`${t.contact.firstname} ${t.contact.lastname}`,{id:t.id,sender:!1,recipients:"html"===t.format?e:i,creationDate:t.creationDate,label:this.translate.instant("html"===t.format?"lang.ARelectronic":"lang.ARPaper"),canConvert:!0}})),Object(mt.a)(e=>{this.printedFolderElement.acknowledgementReceipts=this.sortPipe.transform(e,"creationDate"),t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}toggleAllElements(t,e){this.selectedPrintedFolderElement[e].setValue(t?this.printedFolderElement[e].filter(t=>t.canConvert).map(t=>t.id):[])}onSubmit(){this.isLoadingResults=!0,this.http.post("../rest/resources/folderPrint",this.formatPrintedFolder(),{responseType:"blob"}).pipe(Object(mt.a)(t=>{const e=document.createElement("a");let i,n,a,s;e.href=window.URL.createObjectURL(t),i=new Date,n=i.getDate(),a=i.getMonth()+1,s=i.getFullYear(),n<10&&(n="0"+n),a<10&&(a="0"+a),i=n+"-"+a+"-"+s,e.setAttribute("download","export_maarch_"+i+".pdf"),document.body.appendChild(e),e.click()}),Object(Xt.a)(()=>this.isLoadingResults=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}formatPrintedFolder(){const t={withSeparator:this.withSeparator,summarySheet:this.summarySheet,resources:[]},e={resId:this.data.resId,document:this.mainDocument};return Object.keys(this.printedFolderElement).forEach(t=>{e[t]=this.selectedPrintedFolderElement[t].value.length!==this.printedFolderElement[t].length?this.selectedPrintedFolderElement[t].value:this.selectedPrintedFolderElement[t].value.length>0?"ALL":[]}),t.resources.push(e),t}openSummarySheet(){this.dialog.open(Cw,{panelClass:"maarch-full-height-modal",width:"800px",data:{paramMode:!0}}).afterClosed().pipe(Object(mt.a)(t=>{this.summarySheet=t}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isEmptySelection(){let t=!0;return Object.keys(this.printedFolderElement).forEach(e=>{this.selectedPrintedFolderElement[e].value.length>0&&(t=!1)}),(this.summarySheet||this.mainDocument)&&(t=!1),t}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.a),n.Qb(q.h),n.Qb(_t.a),n.Qb(Wt.a),n.Qb(q.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],features:[n.Cb([Wt.a])],decls:17,vars:12,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],[2,"flex","1"],["mat-icon-button","",3,"title","click"],[1,"fa","fa-times"],[2,"padding-bottom","10px"],["class","loading",4,"ngIf","ngIfElse"],["loadingTemplate",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","color","primary",3,"disabled","click"],[1,"loading"],[2,"margin","auto"],["class","example-loading-shade",4,"ngIf"],[2,"padding","10px"],["color","primary",3,"ngModel","ngModelChange","change"],["color","primary",3,"ngModel","ngModelChange"],[1,"printedFolderContainer"],["hideToggle","","disabled","",3,"title",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"example-loading-shade"],[4,"ngIf"],["hideToggle","","disabled","",3,"title"],[2,"color","#135f7f","font-weight","bold"],["color","primary","disableRipple","",3,"ngModel","disabled","ngModelChange"],["class","printedFolderElement",4,"ngIf"],[1,"printedFolderElement"],["color","primary","disableRipple","",3,"checked","indeterminate","change","click"],["color","primary",1,"printedFolderElement-content",3,"formControl"],["class","printedFolderElement-option","checkboxPosition","before",3,"title","disabled","value",4,"ngFor","ngForOf"],["checkboxPosition","before",1,"printedFolderElement-option",3,"title","disabled","value"],["color","primary","style","flex:1;font-size: 80%;padding-right: 10px;",4,"ngIf"],["color","primary","style","flex:1;display: flex;font-size: 80%;white-space: pre;padding-right: 10px;",4,"ngIf"],[2,"flex","2","padding-right","10px",3,"title","innerHTML"],["color","primary","style","flex:1;font-size: 80%;white-space: pre;padding-right: 10px;",4,"ngIf"],["color","primary",2,"flex","1","justify-content","flex-end","display","flex","font-size","80%",3,"title"],["color","primary",2,"flex","1","font-size","80%","padding-right","10px"],["color","primary",2,"flex","1","display","flex","font-size","80%","white-space","pre","padding-right","10px"],["color","primary",2,"flex","1","font-size","80%","white-space","pre","padding-right","10px"],["style","color: green",4,"ngIf"],[2,"color","green"]],template:function(t,e){if(1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Wb(2,"span",2),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"button",3),n.dc("click",(function(){return e.dialogRef.close()})),n.ic(6,"translate"),n.Rb(7,"mat-icon",4),n.Vb(),n.Vb(),n.Wb(8,"mat-dialog-content",5),n.Oc(9,vR,2,0,"div",6),n.Oc(10,RR,13,13,"ng-template",null,7,n.Pc),n.Vb(),n.Rb(12,"span",8),n.Wb(13,"div",9),n.Wb(14,"button",10),n.dc("click",(function(){return e.onSubmit()})),n.Qc(15),n.ic(16,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.zc(11);n.Db(3),n.Sc(" ",n.jc(4,6,"lang.generateAndDownloadPrintedFolder")," "),n.Db(2),n.oc("title",n.jc(6,8,"lang.close")),n.Db(4),n.oc("ngIf",e.loading)("ngIfElse",t),n.Db(5),n.oc("disabled",e.isLoadingResults||e.isEmptySelection()),n.Db(1),n.Rc(n.jc(16,10,"lang.validate"))}},directives:[q.i,k.b,S.a,q.f,P.t,q.c,V.c,te.a,X.u,X.x,P.s,gt.c,gt.g,gt.h,j.a,R.i,X.j,R.f],pipes:[g.d,P.l,Tt.p,uo,P.f,Tt.u],styles:[".mat-dialog-title[_ngcontent-%COMP%]{padding:10px;display:flex;align-items:center}.modal-container[_ngcontent-%COMP%]{min-height:250px;height:auto;padding-bottom:5px}.modal-body[_ngcontent-%COMP%]{min-height:auto}.loading[_ngcontent-%COMP%]{display:flex;height:100%;width:100%;padding:10px;top:0;left:0}.printedFolderElement-title[_ngcontent-%COMP%]{position:-webkit-sticky;position:sticky;top:-10px;padding:10px;font-size:20px;font-weight:700;color:#135f7f;background:#fff;z-index:1}.printedFolderElement-option[_ngcontent-%COMP%]:nth-child(2n){background:rgba(19,95,127,.1)}.printedFolderElement-item[_ngcontent-%COMP%]{font-size:14px!important;align-items:center;display:grid;grid-template-columns:1fr 2fr 1fr;grid-gap:20px}.attachments[_ngcontent-%COMP%]{grid-template-columns:1fr 2fr 1fr 1fr 1fr}.linkedResourcesAttachments[_ngcontent-%COMP%]{grid-template-columns:1fr 1fr 2fr 1fr 1fr 1fr}.printedFolderContainer[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;grid-gap:20px}.mat-expansion-panel-header[aria-disabled=true][_ngcontent-%COMP%]{color:initial!important}.disabled[_ngcontent-%COMP%]{opacity:.5;cursor:not-allowed}"]}),t})();function AR(t,e){1&t&&(n.Wb(0,"div",9),n.Rb(1,"mat-spinner"),n.Vb())}function WR(t,e){if(1&t&&(n.Wb(0,"mat-form-field",11),n.Rb(1,"mat-icon",12),n.Wb(2,"mat-label"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Rb(5,"input",13),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Fb(t.value.icon),n.Db(2),n.Rc(n.jc(4,4,"lang."+t.key)),n.Db(2),n.oc("value",t.value.value)}}function TR(t,e){if(1&t&&(n.Ub(0),n.Oc(1,WR,6,6,"mat-form-field",10),n.Tb()),2&t){const t=e.$implicit,i=n.hc();n.Db(1),n.oc("ngIf",!i.functions.empty(t.value.value))}}function ER(t,e){if(1&t&&(n.Wb(0,"mat-form-field",11),n.Rb(1,"mat-icon",12),n.Wb(2,"mat-label"),n.Qc(3),n.Vb(),n.Rb(4,"input",13),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Fb(t.value.icon),n.Db(2),n.Rc(t.value.label),n.Db(1),n.oc("value",t.value.value)}}function FR(t,e){if(1&t&&(n.Wb(0,"mat-accordion"),n.Wb(1,"mat-expansion-panel",14),n.Wb(2,"mat-expansion-panel-header"),n.Wb(3,"mat-panel-title"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Oc(6,ER,5,4,"mat-form-field",15),n.ic(7,"keyvalue"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.Sc(" ",n.jc(5,2,"lang.otherInformations")," "),n.Db(2),n.oc("ngForOf",n.jc(7,4,t.customsData))}}let LR=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this.translate=t,this.http=e,this.notify=i,this.dialog=n,this.dialogRef=a,this.data=s,this.appService=o,this.functions=r,this.datePipe=c,this.loading=!1,this.techData={initiator:{label:"initiator",value:"",icon:"fas fa-user"},creationDate:{label:"creationDate",value:"",icon:"fas fa-calendar-day"},size:{label:"filesize",value:"",icon:"fas fa-cubes"},format:{label:"fileFormat",value:"",icon:"far fa-file-archive"},filename:{label:"filename",value:"",icon:"fas fa-quote-right"},docserverPathFile:{label:"docserverPathFile",value:"",icon:"fas fa-terminal"},fingerprint:{label:"fingerprint",value:"",icon:"fas fa-fingerprint"},fulltext:{label:"fulltext",value:"",icon:"far fa-file-alt"}},this.customsData={},this.customs={}}ngOnInit(){this.fetchData()}fetchData(){this.http.get(`../rest/resources/${this.data.resId}/fileInformation`).pipe(Object(mt.a)(t=>{this.techData.format.value=t.information.format,this.techData.fingerprint.value=t.information.fingerprint,this.techData.size.value=this.functions.formatBytes(t.information.filesize),this.techData.fulltext.value=t.information.fulltext_result,this.techData.docserverPathFile.value=t.information.docserverPathFile,this.techData.filename.value=t.information.filename,this.techData.initiator.value=t.information.typistLabel,this.techData.creationDate.value=this.datePipe.transform(t.information.creationDate,"dd/MM/y HH:mm"),this.loading=!1}),p(()=>this.http.get("../rest/customFields")),Object(mt.a)(t=>{t.customFields.filter(t=>"technical"===t.mode).map(t=>{this.customs[t.id]={label:t.label,type:t.type}})}),p(()=>this.http.get("../rest/resources/"+this.data.resId)),Object(mt.a)(t=>{Object.keys(t.customFields).forEach(e=>{this.functions.empty(this.customs[e])||(this.customsData[e]={label:this.customs[e].label,value:t.customFields[e],icon:"fas fa-hashtag"})})}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isEmptyCustom(){return 0===Object.keys(this.customsData).length}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(q.h),n.Qb(q.a),n.Qb(w.a),n.Qb(_t.a),n.Qb(P.f))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:14,vars:15,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],[2,"flex","1",3,"title"],["mat-icon-button","",3,"title","click"],[1,"fa","fa-times"],["mat-dialog-content",""],["class","loading","color","primary",4,"ngIf"],[4,"ngFor","ngForOf"],[4,"ngIf"],["color","primary",1,"loading"],["class","data-item",4,"ngIf"],[1,"data-item"],["matPrefix","","color","primary",2,"width","35px","text-align","center"],["matInput","","readonly","",3,"value"],["expanded",""],["class","data-item",4,"ngFor","ngForOf"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Wb(2,"span",2),n.ic(3,"translate"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Wb(6,"button",3),n.dc("click",(function(){return e.dialogRef.close()})),n.ic(7,"translate"),n.Rb(8,"mat-icon",4),n.Vb(),n.Vb(),n.Wb(9,"div",5),n.Oc(10,AR,2,0,"div",6),n.Oc(11,TR,2,1,"ng-container",7),n.ic(12,"keyvalue"),n.Oc(13,FR,8,6,"mat-accordion",8),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.oc("title",n.jc(3,6,"lang.linkResource")),n.Db(2),n.Sc(" ",n.jc(5,8,"lang.technicalInformations")," "),n.Db(2),n.oc("title",n.jc(7,10,"lang.close")),n.Db(4),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngForOf",n.kc(12,12,e.techData,null)),n.Db(2),n.oc("ngIf",!e.isEmptyCustom()))},directives:[q.i,k.b,S.a,q.f,P.t,P.s,V.c,Y.c,Y.i,Y.g,J.b,gt.a,gt.c,gt.g,gt.h],pipes:[g.d,P.l],styles:[".data-item[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}"]}),t})();function QR(t,e){1&t&&(n.Ub(0),n.Wb(1,"div",2),n.Rb(2,"mat-spinner",3),n.Vb(),n.Tb())}function NR(t,e){if(1&t&&(n.Wb(0,"div",8),n.Wb(1,"div",9),n.ic(2,"fullDate"),n.Qc(3),n.ic(4,"timeAgo"),n.Vb(),n.Wb(5,"div",10),n.Qc(6),n.ic(7,"shorten"),n.Vb(),n.Wb(8,"div",11),n.Qc(9),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.oc("title",n.jc(2,4,t.event_date)),n.Db(2),n.Sc(" ",n.jc(4,6,t.event_date)," "),n.Db(3),n.Sc(" ",n.lc(7,8,t.info,110,"...")," "),n.Db(3),n.Sc(" ",t.userLabel," ")}}function zR(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",12),n.dc("click",(function(){return n.Dc(t),n.hc(3).showMore()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.showMore")))}function BR(t,e){1&t&&(n.Wb(0,"div",13),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noEvent")," "))}function UR(t,e){if(1&t&&(n.Ub(0),n.Oc(1,NR,10,12,"div",5),n.Oc(2,zR,3,3,"button",6),n.Oc(3,BR,3,3,"div",7),n.Tb()),2&t){const t=n.hc(2);n.Db(1),n.oc("ngForOf",t.histories),n.Db(1),n.oc("ngIf",3===t.histories.length),n.Db(1),n.oc("ngIf",0===t.histories.length)}}function $R(t,e){1&t&&(n.Wb(0,"div",13),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.historyDisabled")," "))}function HR(t,e){if(1&t&&(n.Oc(0,UR,4,3,"ng-container",0),n.Oc(1,$R,3,3,"ng-template",null,4,n.Pc)),2&t){const t=n.zc(2),e=n.hc();n.oc("ngIf",!e.disabledHistory)("ngIfElse",t)}}let GR=(()=>{class t{constructor(t,e,i,a){this.translate=t,this.http=e,this.notify=i,this.privilegeService=a,this.loading=!0,this.disabledHistory=!0,this.histories=[],this.resId=null,this.goTo=new n.o}ngOnInit(){this.loading=!0,this.privilegeService.hasCurrentUserPrivilege("view_full_history")||this.privilegeService.hasCurrentUserPrivilege("view_doc_history")?(this.disabledHistory=!1,this.loadHistory(this.resId)):this.loading=!1}loadHistory(t){this.loading=!0,this.http.get(`../rest/history?resId=${t}&limit=3&onlyActions=true`).pipe(Object(mt.a)(t=>{this.histories=t.history}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}showMore(){this.goTo.emit()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(Dt.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-history-workflow-resume"]],inputs:{resId:"resId"},outputs:{goTo:"goTo"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["elseTemplate",""],[1,"loading"],["diameter","35"],["noPrivilegeTemplate",""],["class","historyList",4,"ngFor","ngForOf"],["mat-button","","class","showMore",3,"click",4,"ngIf"],["class","noData",4,"ngIf"],[1,"historyList"],[1,"date",3,"title"],[1,"info"],[1,"date"],["mat-button","",1,"showMore",3,"click"],[1,"noData"]],template:function(t,e){if(1&t&&(n.Oc(0,QR,3,0,"ng-container",0),n.Oc(1,HR,3,2,"ng-template",null,1,n.Pc)),2&t){const t=n.zc(2);n.oc("ngIf",e.loading)("ngIfElse",t)}},directives:[P.t,V.c,P.s,k.b],pipes:[uo,ps,Tt.p,g.d],styles:[".historyList[_ngcontent-%COMP%]{font-size:13px;width:100%;display:grid;grid-template-columns:15% 70% 15%;align-items:center}.historyList[_ngcontent-%COMP%]:nth-child(2n){background:rgba(19,95,127,.1)}.date[_ngcontent-%COMP%]{color:#135f7f}.date[_ngcontent-%COMP%], .info[_ngcontent-%COMP%]{padding:5px}.noData[_ngcontent-%COMP%]{text-align:center;font-size:24px;font-weight:700;opacity:.3}.loading[_ngcontent-%COMP%]{display:flex;justify-content:center;height:100%}.showMore[_ngcontent-%COMP%]{float:right;font-size:10px;position:absolute;right:10px;margin-top:-2px;padding:0;line-height:20px;width:35px;color:#f99830;font-weight:700}"]}),t})();function XR(t,e){1&t&&(n.Ub(0),n.Wb(1,"div",2),n.Rb(2,"mat-spinner",3),n.Vb(),n.Tb())}function qR(t,e){if(1&t&&(n.Wb(0,"div",7),n.Wb(1,"div",8),n.ic(2,"fullDate"),n.Qc(3),n.ic(4,"timeAgo"),n.Vb(),n.Wb(5,"div",9),n.Qc(6),n.ic(7,"shorten"),n.Vb(),n.Wb(8,"div",10),n.Qc(9),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.oc("title",n.jc(2,6,t.creation_date)),n.Db(2),n.Sc(" ",n.jc(4,8,t.creation_date)," "),n.Db(2),n.oc("title",t.value),n.Db(1),n.Sc(" ",n.lc(7,10,t.value,110,"...")," "),n.Db(3),n.Tc(" ",t.firstname," ",t.lastname," ")}}function KR(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",11),n.dc("click",(function(){return n.Dc(t),n.hc(2).showMore()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.showMore")))}function YR(t,e){1&t&&(n.Wb(0,"div",12),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noNote")," "))}function JR(t,e){if(1&t&&(n.Oc(0,qR,10,14,"div",4),n.Oc(1,KR,3,3,"button",5),n.Oc(2,YR,3,3,"div",6)),2&t){const t=n.hc();n.oc("ngForOf",t.notes),n.Db(1),n.oc("ngIf",3===t.notes.length),n.Db(1),n.oc("ngIf",0===t.notes.length)}}let ZR=(()=>{class t{constructor(t,e,i){this.translate=t,this.http=e,this.notify=i,this.loading=!0,this.notes=[],this.resId=null,this.goTo=new n.o}ngOnInit(){this.loading=!0,this.loadNotes(this.resId)}loadNotes(t){this.loading=!0,this.http.get(`../rest/resources/${t}/notes?limit=3`).pipe(Object(mt.a)(t=>{this.notes=t.notes}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}showMore(){this.goTo.emit()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-note-resume"]],inputs:{resId:"resId"},outputs:{goTo:"goTo"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["elseTemplate",""],[1,"loading"],["diameter","35"],["class","noteList",4,"ngFor","ngForOf"],["mat-button","","class","showMore",3,"click",4,"ngIf"],["class","noData",4,"ngIf"],[1,"noteList"],[1,"date",3,"title"],[1,"info",3,"title"],[1,"date"],["mat-button","",1,"showMore",3,"click"],[1,"noData"]],template:function(t,e){if(1&t&&(n.Oc(0,XR,3,0,"ng-container",0),n.Oc(1,JR,3,3,"ng-template",null,1,n.Pc)),2&t){const t=n.zc(2);n.oc("ngIf",e.loading)("ngIfElse",t)}},directives:[P.t,V.c,P.s,k.b],pipes:[uo,ps,Tt.p,g.d],styles:[".noteList[_ngcontent-%COMP%]{font-size:13px;width:100%;display:grid;grid-template-columns:15% 70% 15%;align-items:center}.noteList[_ngcontent-%COMP%]:nth-child(2n){background:rgba(19,95,127,.1)}.date[_ngcontent-%COMP%]{color:#135f7f}.date[_ngcontent-%COMP%], .info[_ngcontent-%COMP%]{padding:5px}.noData[_ngcontent-%COMP%]{text-align:center;font-size:24px;font-weight:700;opacity:.3}.loading[_ngcontent-%COMP%]{display:flex;justify-content:center;height:100%}.showMore[_ngcontent-%COMP%]{float:right;font-size:10px;position:absolute;right:10px;margin-top:-2px;padding:0;line-height:20px;width:35px;color:#f99830;font-weight:700}"]}),t})();function tj(t,e){1&t&&(n.Ub(0),n.Wb(1,"div",2),n.Rb(2,"mat-spinner",3),n.Vb(),n.Tb())}function ej(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div",10),n.ic(2,"fullDate"),n.Qc(3),n.ic(4,"timeAgo"),n.Vb(),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("title",n.jc(2,2,t.modificationDate)),n.Db(2),n.Sc(" ",n.jc(4,4,t.modificationDate)," ")}}function ij(t,e){if(1&t&&(n.Wb(0,"div",10),n.ic(1,"fullDate"),n.Qc(2),n.ic(3,"timeAgo"),n.Vb()),2&t){const t=n.hc().$implicit;n.oc("title",n.jc(1,2,t.creationDate)),n.Db(2),n.Sc(" ",n.jc(3,4,t.creationDate)," ")}}function nj(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",7),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).showAttachment(i)})),n.Oc(1,ej,5,6,"ng-container",0),n.Oc(2,ij,4,6,"ng-template",null,1,n.Pc),n.Wb(4,"div",8),n.Qc(5),n.ic(6,"shorten"),n.Vb(),n.Wb(7,"div",9),n.Qc(8),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.zc(3);n.Db(1),n.oc("ngIf",null!==t.modificationDate)("ngIfElse",i),n.Db(4),n.Sc(" ",n.lc(6,4,t.title,110,"...")," "),n.Db(3),n.Sc(" ",t.typeLabel," ")}}function aj(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",11),n.dc("click",(function(){return n.Dc(t),n.hc(2).showMore()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.showMore")))}function sj(t,e){1&t&&(n.Wb(0,"div",12),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noAttachment")," "))}function oj(t,e){if(1&t&&(n.Oc(0,nj,9,8,"div",4),n.Oc(1,aj,3,3,"button",5),n.Oc(2,sj,3,3,"div",6)),2&t){const t=n.hc();n.oc("ngForOf",t.attachments),n.Db(1),n.oc("ngIf",3===t.attachments.length),n.Db(1),n.oc("ngIf",0===t.attachments.length)}}let rj=(()=>{class t{constructor(t,e,i,a){this.translate=t,this.http=e,this.notify=i,this.dialog=a,this.loading=!0,this.attachments=[],this.resId=null,this.goTo=new n.o}ngOnInit(){this.loading=!0,this.loadAttachments(this.resId)}loadAttachments(t){this.loading=!0,this.http.get(`../rest/resources/${t}/attachments?limit=3`).pipe(Object(mt.a)(t=>{this.attachments=t.attachments}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}showAttachment(t){this.dialogRef=this.dialog.open(pu,{height:"99vh",width:"99vw",disableClose:!0,panelClass:"modal-container",data:{resId:t.resId}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"success"===t),Object(mt.a)(()=>{this.loadAttachments(this.resId)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}showMore(){this.goTo.emit()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-attachments-resume"]],inputs:{resId:"resId"},outputs:{goTo:"goTo"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["elseTemplate",""],[1,"loading"],["diameter","35"],["class","attachmentsList",3,"click",4,"ngFor","ngForOf"],["mat-button","","class","showMore",3,"click",4,"ngIf"],["class","noData",4,"ngIf"],[1,"attachmentsList",3,"click"],[1,"info"],[1,"attachmentType"],[1,"date",3,"title"],["mat-button","",1,"showMore",3,"click"],[1,"noData"]],template:function(t,e){if(1&t&&(n.Oc(0,tj,3,0,"ng-container",0),n.Oc(1,oj,3,3,"ng-template",null,1,n.Pc)),2&t){const t=n.zc(2);n.oc("ngIf",e.loading)("ngIfElse",t)}},directives:[P.t,V.c,P.s,k.b],pipes:[Tt.p,uo,ps,g.d],styles:[".attachmentsList[_ngcontent-%COMP%]{cursor:pointer;font-size:13px;width:100%;display:grid;grid-template-columns:15% 65% 20%;align-items:center}.attachmentsList[_ngcontent-%COMP%]:nth-child(2n){background:rgba(19,95,127,.1)}.date[_ngcontent-%COMP%]{color:#135f7f}.date[_ngcontent-%COMP%], .info[_ngcontent-%COMP%]{padding:5px}.attachmentType[_ngcontent-%COMP%]{font-size:10px;color:#135f7f}.noData[_ngcontent-%COMP%]{text-align:center;font-size:24px;font-weight:700;opacity:.3}.loading[_ngcontent-%COMP%]{display:flex;justify-content:center;height:100%}.showMore[_ngcontent-%COMP%]{float:right;font-size:10px;position:absolute;right:10px;margin-top:-2px;padding:0;line-height:20px;width:35px;color:#f99830;font-weight:700}"]}),t})();function cj(t,e){1&t&&(n.Ub(0),n.Wb(1,"div",2),n.Rb(2,"mat-spinner",3),n.Vb(),n.Tb())}function lj(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div",10),n.ic(2,"fullDate"),n.Qc(3),n.ic(4,"timeAgo"),n.Vb(),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("title",n.jc(2,2,t.send_date)),n.Db(2),n.Sc(" ",n.jc(4,4,t.send_date)," ")}}function dj(t,e){if(1&t&&(n.Wb(0,"div",12),n.ic(1,"fullDate"),n.Qc(2),n.ic(3,"translate"),n.Vb()),2&t){const t=n.hc(2).$implicit;n.oc("title",n.jc(1,2,t.send_date)),n.Db(2),n.Sc(" ",n.jc(3,4,"lang.sendError")," ")}}function hj(t,e){if(1&t&&n.Oc(0,dj,4,6,"div",11),2&t){const t=n.hc().$implicit;n.oc("ngIf","ERROR"===t.status)}}function uj(t,e){if(1&t&&(n.Wb(0,"div",7),n.Oc(1,lj,5,6,"ng-container",0),n.Oc(2,hj,1,1,"ng-template",null,1,n.Pc),n.Rb(4,"div",8),n.ic(5,"shorten"),n.Wb(6,"div",9),n.Qc(7),n.Vb(),n.Vb()),2&t){const t=e.$implicit,i=n.zc(3);n.Db(1),n.oc("ngIf","SENT"===t.status)("ngIfElse",i),n.Db(3),n.Ib("arType","aknowledgement_receipt"===t.type),n.oc("innerHTML",n.lc(5,6,t.object,110,"..."),n.Ec),n.Db(3),n.Sc(" ",t.userInfo," ")}}function pj(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",13),n.dc("click",(function(){return n.Dc(t),n.hc(2).showMore()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.showMore")))}function bj(t,e){1&t&&(n.Wb(0,"div",14),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noSendmail")," "))}function fj(t,e){if(1&t&&(n.Oc(0,uj,8,10,"div",4),n.Oc(1,pj,3,3,"button",5),n.Oc(2,bj,3,3,"div",6)),2&t){const t=n.hc();n.oc("ngForOf",t.mails),n.Db(1),n.oc("ngIf",3===t.mails.length),n.Db(1),n.oc("ngIf",0===t.mails.length)}}let mj=(()=>{class t{constructor(t,e,i,a){this.translate=t,this.http=e,this.notify=i,this.functions=a,this.loading=!0,this.mails=[],this.resId=null,this.goTo=new n.o}ngOnInit(){this.loading=!0,this.loadMails(this.resId)}loadMails(t){this.loading=!0,this.http.get(`../rest/externalSummary/${t}?limit=3`).pipe(Object(l.a)(t=>(t.elementsSend=t.elementsSend.map(t=>{let e=t.object,i=t.type;return"aknowledgement_receipt"==t.type&&this.functions.empty(t.object)?(e=this.translate.instant("lang.ARPaper"),i="aknowledgement_receipt"):"aknowledgement_receipt"==t.type&&t.object.startsWith("[AR]")&&(e=this.translate.instant("lang.ARelectronic"),i="aknowledgement_receipt"),{object:this.functions.empty(e)?`<i>${this.translate.instant("lang.emptySubject")}<i>`:e,send_date:t.send_date,status:t.status,userInfo:t.userInfo,type:i}}),t)),Object(mt.a)(t=>{this.mails=t.elementsSend}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}showMore(){this.goTo.emit()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-mail-resume"]],inputs:{resId:"resId"},outputs:{goTo:"goTo"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["elseTemplate",""],[1,"loading"],["diameter","35"],["class","mailList",4,"ngFor","ngForOf"],["mat-button","","class","showMore",3,"click",4,"ngIf"],["class","noData",4,"ngIf"],[1,"mailList"],[1,"info",3,"innerHTML"],[1,"date"],[1,"date",3,"title"],["class","error",3,"title",4,"ngIf"],[1,"error",3,"title"],["mat-button","",1,"showMore",3,"click"],[1,"noData"]],template:function(t,e){if(1&t&&(n.Oc(0,cj,3,0,"ng-container",0),n.Oc(1,fj,3,3,"ng-template",null,1,n.Pc)),2&t){const t=n.zc(2);n.oc("ngIf",e.loading)("ngIfElse",t)}},directives:[P.t,V.c,P.s,k.b],pipes:[Tt.p,uo,ps,g.d],styles:[".mailList[_ngcontent-%COMP%]{font-size:13px;width:100%;display:grid;grid-template-columns:15% 70% 15%;align-items:center}.mailList[_ngcontent-%COMP%]:nth-child(2n){background:rgba(19,95,127,.1)}.date[_ngcontent-%COMP%]{color:#135f7f}.date[_ngcontent-%COMP%], .info[_ngcontent-%COMP%]{padding:5px}.noData[_ngcontent-%COMP%]{text-align:center;font-size:24px;font-weight:700;opacity:.3}.loading[_ngcontent-%COMP%]{display:flex;justify-content:center;height:100%}.showMore[_ngcontent-%COMP%]{float:right;font-size:10px;position:absolute;right:10px;margin-top:-2px;padding:0;line-height:20px;width:35px;color:#f99830;font-weight:700}.error[_ngcontent-%COMP%]{padding:5px;color:#8e3e52}.arType[_ngcontent-%COMP%], .error[_ngcontent-%COMP%]{font-style:italic}.arType[_ngcontent-%COMP%]{color:#666}"]}),t})();var gj=i("FtGj");const vj=["recipientsField"],_j=["copiesField"],yj=["invisibleCopiesField"];function xj(t,e){1&t&&(n.Wb(0,"div",32),n.Rb(1,"mat-spinner",33),n.Vb())}function Cj(t,e){if(1&t&&n.Rb(0,"input",34),2&t){const t=n.hc();n.oc("value",t.currentSender.email)}}function Oj(t,e){if(1&t&&(n.Wb(0,"mat-option",36),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Tc(" ",t.label," (",t.email,") ")}}function Dj(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-select",35),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().currentSender=e})),n.Oc(1,Oj,2,3,"mat-option",18),n.ic(2,"sortBy"),n.Vb()}if(2&t){const t=n.hc();n.oc("compareWith",t.compareSenders)("ngModel",t.currentSender),n.Db(1),n.oc("ngForOf",n.kc(2,3,t.availableSenders,"label"))}}function wj(t,e){1&t&&n.Rb(0,"mat-icon",39)}function Mj(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",37),n.dc("removed",(function(){n.Dc(t);const i=e.$implicit;return n.hc().remove(i,"recipients")}))("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().remove(i,"recipients")})),n.Qc(1),n.Oc(2,wj,1,0,"mat-icon",38),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc();n.Ib("badFormat",t.badFormat),n.oc("cdkDragDisabled","SENT"==i.emailStatus||"ERROR"==i.emailStatus)("removable",i.canManageMail())("title",t.email),n.Db(1),n.Tc(" ",t.label,"",t.label!==t.email?" ("+t.email+")":""," "),n.Db(1),n.oc("ngIf",i.canManageMail())}}function kj(t,e){if(1&t&&(n.Wb(0,"span",41),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Sc(" (",t.email,")")}}function Sj(t,e){if(1&t&&(n.Wb(0,"mat-option",36),n.Qc(1),n.Oc(2,kj,2,1,"span",40),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t.label,""),n.Db(1),n.oc("ngIf","contactGroup"!==t.type)}}function Ij(t,e){1&t&&n.Rb(0,"mat-icon",39)}function Pj(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",47),n.dc("removed",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).remove(i,"copies")}))("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).remove(i,"recipients")})),n.Qc(1),n.Oc(2,Ij,1,0,"mat-icon",38),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.Ib("badFormat",t.badFormat),n.oc("cdkDragDisabled","SENT"==i.emailStatus||"ERROR"==i.emailStatus)("removable",i.canManageMail())("title",t.email),n.Db(1),n.Tc(" ",t.label,"",t.label!==t.email?" ("+t.email+")":""," "),n.Db(1),n.oc("ngIf",i.canManageMail())}}function Vj(t,e){if(1&t&&(n.Wb(0,"span",41),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Sc(" (",t.email,")")}}function Rj(t,e){if(1&t&&(n.Wb(0,"mat-option",36),n.Qc(1),n.Oc(2,Vj,2,1,"span",40),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t.label,""),n.Db(1),n.oc("ngIf","contactGroup"!==t.type)}}const jj=function(){return["recipients-list","invcopies-list"]};function Aj(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"span",7),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-chip-list",42,43),n.dc("cdkDropListDropped",(function(e){return n.Dc(t),n.hc().drop(e)})),n.Oc(6,Pj,3,8,"mat-chip",44),n.Wb(7,"input",14,45),n.dc("matChipInputTokenEnd",(function(e){return n.Dc(t),n.hc().add(e,"copies")}))("focus",(function(){return n.Dc(t),n.hc().resetAutocomplete()}))("paste",(function(e){return n.Dc(t),n.hc().onPaste(e,"copies")})),n.Vb(),n.Vb(),n.Wb(9,"mat-autocomplete",16,46),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc().addEmail(e.option.value,"copies")})),n.Oc(11,Rj,3,3,"mat-option",18),n.ic(12,"async"),n.Vb(),n.Vb()}if(2&t){const t=n.zc(5),e=n.zc(10),i=n.hc();n.Db(2),n.Sc("",n.jc(3,10,"lang.copieShort"),"\xa0:\xa0"),n.Db(2),n.oc("cdkDropListConnectedTo",n.uc(14,jj))("cdkDropListData",i.copies),n.Db(2),n.oc("ngForOf",i.copies),n.Db(1),n.oc("formControl",i.recipientsInput)("matChipInputFor",t)("matChipInputSeparatorKeyCodes",i.separatorKeysCodes)("matChipInputAddOnBlur",!0)("matAutocomplete",e),n.Db(4),n.oc("ngForOf",n.jc(12,12,i.filteredEmails))}}function Wj(t,e){1&t&&n.Rb(0,"mat-icon",39)}function Tj(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",47),n.dc("removed",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).remove(i,"invisibleCopies")}))("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).remove(i,"recipients")})),n.Qc(1),n.Oc(2,Wj,1,0,"mat-icon",38),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.Ib("badFormat",t.badFormat),n.oc("cdkDragDisabled","SENT"==i.emailStatus||"ERROR"==i.emailStatus)("removable",i.canManageMail())("title",t.email),n.Db(1),n.Tc(" ",t.label,"",t.label!==t.email?" ("+t.email+")":""," "),n.Db(1),n.oc("ngIf",i.canManageMail())}}function Ej(t,e){if(1&t&&(n.Wb(0,"span",41),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Sc(" (",t.email,")")}}function Fj(t,e){if(1&t&&(n.Wb(0,"mat-option",36),n.Qc(1),n.Oc(2,Ej,2,1,"span",40),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t.label,""),n.Db(1),n.oc("ngIf","contactGroup"!==t.type)}}const Lj=function(){return["recipients-list","copies-list"]};function Qj(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"span",7),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-chip-list",48,49),n.dc("cdkDropListDropped",(function(e){return n.Dc(t),n.hc().drop(e)})),n.Oc(6,Tj,3,8,"mat-chip",44),n.Wb(7,"input",14,50),n.dc("matChipInputTokenEnd",(function(e){return n.Dc(t),n.hc().add(e,"invisibleCopies")}))("focus",(function(){return n.Dc(t),n.hc().resetAutocomplete()}))("paste",(function(e){return n.Dc(t),n.hc().onPaste(e,"invisibleCopies")})),n.Vb(),n.Vb(),n.Wb(9,"mat-autocomplete",16,51),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc().addEmail(e.option.value,"invisibleCopies")})),n.Oc(11,Fj,3,3,"mat-option",18),n.ic(12,"async"),n.Vb(),n.Vb()}if(2&t){const t=n.zc(5),e=n.zc(10),i=n.hc();n.Db(2),n.Sc("",n.jc(3,10,"lang.invisibleCopyShort"),"\xa0:\xa0"),n.Db(2),n.oc("cdkDropListConnectedTo",n.uc(14,Lj))("cdkDropListData",i.invisibleCopies),n.Db(2),n.oc("ngForOf",i.invisibleCopies),n.Db(1),n.oc("formControl",i.recipientsInput)("matChipInputFor",t)("matChipInputSeparatorKeyCodes",i.separatorKeysCodes)("matChipInputAddOnBlur",!0)("matAutocomplete",e),n.Db(4),n.oc("ngForOf",n.jc(12,12,i.filteredEmails))}}function Nj(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",52),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc();return i.stopPropagation(),s.currentEmailAttachTool=a.key,s.openSummarySheetModal(a.key)})),n.Rb(1,"mat-icon",53),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(),a=n.zc(42);n.oc("disabled",!i.canManageMail()||"summarySheet"!==t.key&&0===i.emailAttachTool[t.key].list.length||"summarySheet"===t.key&&!i.functions.empty(i.emailAttach.summarySheet))("title",i.emailAttachTool[t.key].title)("matMenuTriggerFor",a),n.Db(1),n.Fb(i.emailAttachTool[t.key].icon),n.Ib("activeButton","document"===t.key&&i.emailAttach.document.isLinked||"document"!==t.key&&i.emailAttach[t.key].length>0)}}function zj(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",61),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit,i=n.hc(2).$implicit;return n.hc().toggleAttachMail(e,i.key,"original")})),n.Qc(1),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(1),n.Sc(".",t.format,"")}}function Bj(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",61),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit,i=n.hc(2).$implicit;return n.hc().toggleAttachMail(e,i.key,"pdf")})),n.Qc(1,".pdf"),n.Vb()}}function Uj(t,e){if(1&t&&(n.Ub(0),n.Qc(1),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Sc(" ",t.chrono," \xa0 ")}}function $j(t,e){1&t&&(n.Wb(0,"span",62),n.Qc(1),n.ic(2,"lowercase"),n.ic(3,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("\xa0(",n.jc(2,1,n.jc(3,3,"lang.signed")),")"))}function Hj(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"button",54),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.Wb(2,"div",55),n.Wb(3,"div"),n.Oc(4,zj,2,1,"button",56),n.Rb(5,"br"),n.Oc(6,Bj,2,0,"button",56),n.Vb(),n.Wb(7,"div"),n.Wb(8,"span",57),n.Wb(9,"div",58),n.Oc(10,Uj,2,1,"ng-container",19),n.Qc(11),n.Vb(),n.Wb(12,"div"),n.Qc(13),n.ic(14,"shorten"),n.Vb(),n.Wb(15,"div",59),n.Qc(16),n.Oc(17,$j,4,5,"span",60),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Rb(18,"mat-divider"),n.Tb()}if(2&t){const t=e.$implicit,i=n.hc(2).$implicit,a=n.hc();n.Db(1),n.oc("disabled",a.isSelectedAttachMail(t,i.key)),n.Db(3),n.oc("ngIf","SIGN"!==t.status),n.Db(2),n.oc("ngIf",!a.functions.empty(t.convertedDocument)),n.Db(2),n.oc("title",t.label),n.Db(2),n.oc("ngIf",!a.functions.empty(t.chrono)),n.Db(1),n.Sc(" ",t.creator," "),n.Db(2),n.Sc(" ",n.lc(14,9,t.label,45,"...")," "),n.Db(3),n.Sc(" ",t.typeLabel,""),n.Db(1),n.oc("ngIf","SIGN"===t.status)}}function Gj(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Hj,19,13,"ng-container",24),n.Tb()),2&t){const t=n.hc().$implicit,e=n.hc();n.Db(1),n.oc("ngForOf",e.emailAttachTool[t.key].list)}}function Xj(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Gj,2,1,"ng-container",19),n.Tb()),2&t){const t=e.$implicit,i=n.hc();n.Db(1),n.oc("ngIf",t.key===i.currentEmailAttachTool)}}function qj(t,e){1&t&&n.Rb(0,"mat-icon",39)}function Kj(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",63),n.dc("removed",(function(){return n.Dc(t),n.hc().removeAttachMail(0,"document")})),n.Rb(1,"i",64),n.Qc(2),n.ic(3,"shorten"),n.Wb(4,"small",41),n.Qc(5),n.Vb(),n.Oc(6,qj,1,0,"mat-icon",38),n.Vb()}if(2&t){const t=n.hc();n.oc("removable",t.canManageMail())("title",t.emailAttach.document.chrono+" - "+t.emailAttach.document.label),n.Db(2),n.Sc("\xa0",n.lc(3,6,t.emailAttach.document.label,25,"..."),"\xa0"),n.Db(3),n.Tc("(",t.emailAttach.document.format," - ",t.emailAttach.document.size,")"),n.Db(1),n.oc("ngIf",t.canManageMail())}}function Yj(t,e){1&t&&n.Rb(0,"mat-icon",39)}function Jj(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",63),n.dc("removed",(function(){n.Dc(t);const i=e.index,a=n.hc(2).$implicit;return n.hc().removeAttachMail(i,a.key)})),n.Rb(1,"i"),n.Qc(2),n.ic(3,"shorten"),n.Wb(4,"small",41),n.Qc(5),n.Vb(),n.Oc(6,Yj,1,0,"mat-icon",38),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2).$implicit,a=n.hc();n.oc("removable",a.canManageMail())("title",t.title),n.Db(1),n.Gb("",a.emailAttachTool[i.key].icon," attachLabel"),n.Db(1),n.Sc("\xa0",n.lc(3,9,t.label,25,"..."),"\xa0"),n.Db(3),n.Tc("(",t.format,"",a.functions.empty(t.size)?"":" - "+t.size,")"),n.Db(1),n.oc("ngIf",a.canManageMail())}}function Zj(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Jj,7,13,"mat-chip",65),n.Tb()),2&t){const t=n.hc().$implicit,e=n.hc();n.Db(1),n.oc("ngForOf",e.emailAttach[t.key])}}function tA(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Zj,2,1,"ng-container",19),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf","document"!==t.key)}}function eA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"plugin-select-search",68),n.dc("afterSelected",(function(e){return n.Dc(t),n.hc(2).mergeEmailTemplate(e)})),n.ic(1,"translate"),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(2);n.oc("label",n.jc(1,4,"lang.emailModel"))("placeholderLabel",n.jc(2,6,"lang.emailModel"))("datas",t.availableEmailModels)("formControlSelect",t.templateEmailListForm)}}function iA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"plugin-select-search",68,69),n.dc("afterSelected",(function(e){return n.Dc(t),n.hc(2).mergeSignEmailTemplate(e)})),n.ic(2,"translate"),n.ic(3,"translate"),n.Vb()}if(2&t){const t=n.hc(2);n.oc("label",n.jc(2,4,"lang.emailSignatures"))("placeholderLabel",n.jc(3,6,"lang.emailSignatures"))("datas",t.availableSignEmailModels)("formControlSelect",t.emailSignListForm)}}function nA(t,e){if(1&t&&(n.Wb(0,"div",66),n.Oc(1,eA,3,8,"plugin-select-search",67),n.Oc(2,iA,4,8,"plugin-select-search",67),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.availableEmailModels.length>0),n.Db(1),n.oc("ngIf",t.availableSignEmailModels.length>0)}}function aA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"textarea",70),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().emailContent=e})),n.Vb()}if(2&t){const t=n.hc();n.oc("ngModel",t.emailContent)}}function sA(t,e){if(1&t&&n.Rb(0,"app-document-viewer",71,72),2&t){const t=n.hc();n.oc("editMode",!1)("base64",t.emailContent)}}function oA(t,e){if(1&t&&(n.Wb(0,"button",79),n.Rb(1,"mat-icon",80),n.Vb()),2&t){n.hc();const t=n.zc(3);n.oc("matMenuTriggerFor",t)}}function rA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",81),n.dc("click",(function(){return n.Dc(t),n.hc(2).switchEditionMode()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.switchInPlainText")," "))}function cA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",81),n.dc("click",(function(){return n.Dc(t),n.hc(2).switchEditionMode()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.switchInHtml")," "))}function lA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",82),n.dc("click",(function(){return n.Dc(t),n.hc(2).onSubmit()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(2);n.oc("disabled",0===t.recipients.length||t.emailsubject.length>256),n.Db(1),n.Rc(n.jc(2,2,"lang.send"))}}function dA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",83),n.dc("click",(function(){return n.Dc(t),n.hc(2).deleteEmail()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(2);n.oc("disabled",t.headerService.user.id!==t.emailCreatorId),n.Db(1),n.Rc(n.jc(2,2,"lang.delete"))}}function hA(t,e){if(1&t&&(n.Wb(0,"div",73),n.Oc(1,oA,2,1,"button",74),n.Wb(2,"mat-menu",null,75),n.Oc(4,rA,3,3,"button",76),n.Oc(5,cA,3,3,"button",76),n.Vb(),n.Oc(6,lA,3,4,"button",77),n.Oc(7,dA,3,4,"button",78),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.canManageMail()&&t.privilegeService.hasCurrentUserPrivilege("sendmail")),n.Db(1),n.Fb("attachListMenu"),n.Db(2),n.oc("ngIf",t.htmlMode),n.Db(1),n.oc("ngIf",!t.htmlMode),n.Db(1),n.oc("ngIf",t.canManageMail()&&t.privilegeService.hasCurrentUserPrivilege("sendmail")),n.Db(1),n.oc("ngIf",t.data.emailId&&"email"===t.data.emailType)}}const uA=function(){return["copies-list","invcopies-list"]};let pA=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c,l){this.http=t,this.notify=e,this.data=i,this.dialog=n,this.dialogRef=a,this.functions=s,this.contactService=o,this.privilegeService=r,this.headerService=c,this.translate=l,this.loading=!0,this.separatorKeysCodes=[gj.c,gj.p,gj.i,190],this.availableEmailModels=[],this.availableSignEmailModels=[],this.resourceData=null,this.availableSenders=[],this.currentSender={},this.recipients=[],this.copies=[],this.invisibleCopies=[],this.recipientsInput=new X.i,this.emailSignListForm=new X.i,this.templateEmailListForm=new X.i,this.showCopies=!1,this.showInvisibleCopies=!1,this.emailCreatorId=null,this.emailId=null,this.emailsubject="",this.emailStatus="WAITING",this.emailContent="",this.currentEmailAttachTool="",this.emailAttachTool={document:{icon:"fa fa-file",title:this.translate.instant("lang.attachMainDocument"),list:[]},notes:{icon:"fas fa-pen-square",title:this.translate.instant("lang.attachNote"),list:[]},attachments:{icon:"fa fa-paperclip",title:this.translate.instant("lang.attachAttachment"),list:[]},summarySheet:{icon:"fas fa-scroll",title:this.translate.instant("lang.attachSummarySheet"),list:[]}},this.emailAttach={},this.encodedSummarySheet=null,this.summarySheetUnits=[],this.canManage=!1,this.pdfMode=!1,this.htmlMode=!0}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){Object.keys(this.emailAttachTool).forEach(t=>{this.emailAttach[t]="document"===t?{id:this.data.resId,isLinked:!1,original:!1}:[]}),yield this.getAttachElements(),this.data.emailId&&"email"===this.data.emailType?yield this.getEmailData(this.data.emailId):this.data.emailId&&"acknowledgementReceipt"===this.data.emailType&&(yield this.getAcknowledgementReceiptData(this.data.emailId)),this.canManageMail()&&(this.initEmailModelsList(),this.initEmailsList(),this.initSignEmailModelsList(),yield this.getResourceData(),yield this.getUserEmails(),"DRAFT"!==this.emailStatus&&this.setDefaultInfo()),setTimeout(()=>{this.initMce()},0)}))}initMce(){tinymce.init({selector:"textarea#emailSignature",base_url:"../node_modules/tinymce/",setup:t=>{t.on("init",t=>{this.loading=!1})},readonly:"SENT"===this.emailStatus,height:"400",suffix:".min",language:this.translate.instant("lang.langISO").replace("-","_"),language_url:`../node_modules/tinymce-i18n/langs/${this.translate.instant("lang.langISO").replace("-","_")}.js`,menubar:!1,statusbar:!1,plugins:["autolink"],external_plugins:{maarch_b64image:"../../src/frontend/plugins/tinymce/maarch_b64image/plugin.min.js"},toolbar_sticky:!0,toolbar_drawer:"floating",toolbar:"SENT"!==this.emailStatus&&"undo redo | fontselect fontsizeselect | bold italic underline strikethrough forecolor | maarch_b64image | alignleft aligncenter alignright alignjustify bullist numlist outdent indent | removeformat"})}add(t,e){const i=t.input,n=t.value;(n||"").trim()&&this[e].push({label:n.trim(),email:n.trim(),badFormat:this.isBadEmailFormat(n.trim())}),i&&(i.value="")}isBadEmailFormat(t){return null===t.trim().match(/^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$/g)}closeModal(t=""){tinymce.remove(),this.dialogRef.close(t)}addEmail(t,e){this[e].splice(this[e].length-1,1),"contactGroup"===t.type?this.http.get("../rest/contactsGroups/"+t.id).pipe(Object(l.a)(t=>t.contactsGroup.contacts.filter(t=>!this.functions.empty(t.email)).map(t=>({label:t.contact,email:t.email}))),Object(mt.a)(t=>{this[e]=this[e].concat(t)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe():this[e].push({label:t.label,email:t.email})}mergeEmailTemplate(t){this.templateEmailListForm.reset(),this.http.post(`../rest/templates/${t}/mergeEmail`,{data:{resId:this.data.resId}}).pipe(Object(mt.a)(t=>{const e=document.createElement("div");if(e.innerHTML=tinymce.get("emailSignature").getContent(),e.getElementsByClassName("signature").length>0){const i=e.getElementsByClassName("signature")[0].innerHTML;e.getElementsByClassName("signature")[0].remove(),tinymce.get("emailSignature").setContent(`${e.innerHTML}${t.mergedDocument}<div class="signature">${i}</div>`)}else tinymce.get("emailSignature").setContent(`${tinymce.get("emailSignature").getContent()}${t.mergedDocument}`);this.htmlMode||tinymce.get("emailSignature").setContent(tinymce.get("emailSignature").getContent({format:"text"})),this.functions.empty(t.mergedSubject)||(this.emailsubject=t.mergedSubject)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}mergeSignEmailTemplate(t){this.emailSignListForm.reset(),this.http.get("../rest/currentUser/emailSignatures/"+t).pipe(Object(mt.a)(t=>{const e=document.createElement("div");e.innerHTML=tinymce.get("emailSignature").getContent(),e.getElementsByClassName("signature").length>0?(e.getElementsByClassName("signature")[0].remove(),tinymce.get("emailSignature").setContent(`${e.innerHTML}<div class="signature">${t.emailSignature.content}</div>`)):tinymce.get("emailSignature").setContent(`${tinymce.get("emailSignature").getContent()}<div class="signature">${t.emailSignature.content}</div>`),this.htmlMode||tinymce.get("emailSignature").setContent(tinymce.get("emailSignature").getContent({format:"text"}))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}remove(t,e){if(this.canManageMail()){const i=this[e].indexOf(t);i>=0&&this[e].splice(i,1)}}getEmailData(t){return new Promise(e=>{this.http.get("../rest/emails/"+t).pipe(Object(mt.a)(t=>{this.emailCreatorId=t.userId,this.recipients=t.recipients.map(t=>({label:t,email:t,badFormat:this.isBadEmailFormat(t)})),this.copies=t.cc.map(t=>({label:t,email:t,badFormat:this.isBadEmailFormat(t)})),this.invisibleCopies=t.cci.map(t=>({label:t,email:t,badFormat:this.isBadEmailFormat(t)})),this.showCopies=this.copies.length>0,this.showInvisibleCopies=this.invisibleCopies.length>0,this.emailsubject=t.object,this.emailStatus=t.status,this.currentSender={entityId:t.sender.entityId,label:t.sender.label,email:t.sender.email},this.emailContent=t.body,Object.keys(t.document).forEach(e=>{-1===["id","isLinked","original"].indexOf(e)?(this.emailAttach[e]=[],t.document[e].forEach(t=>{const i=this.emailAttachTool[e].list.filter(e=>e.id===t.id||e.id===t);i.length>0&&(this.emailAttach[e]=this.emailAttach[e].concat(i.map(e=>Object.assign(Object.assign({},e),{format:t.original||void 0===t.original?e.format:"pdf",original:t.original,size:t.original||void 0===t.original?e.size:e.convertedDocument.size}))))})):"isLinked"===e&&!0===t.document.isLinked&&(this.emailAttach.document.isLinked=!0,this.emailAttach.document.format=t.document.original||void 0===t.document.original?this.emailAttachTool.document.list[0].format:"pdf",this.emailAttach.document.original=t.document.original,this.emailAttach.document.size=this.emailAttach.document.original?this.emailAttachTool.document.list[0].size:this.emailAttachTool.document.list[0].convertedDocument.size)}),e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),e(!1),Object(c.a)(!1)))).subscribe()})}getAcknowledgementReceiptData(t){return new Promise(e=>{this.http.get("../rest/acknowledgementReceipts/"+t).pipe(Object(mt.a)(t=>{this.currentSender={label:t.acknowledgementReceipt.userLabel,email:t.acknowledgementReceipt.userLabel},this.recipients=[{label:this.functions.empty(t.acknowledgementReceipt.contact)?this.translate.instant("lang.contactDeleted"):this.contactService.formatContact(t.acknowledgementReceipt.contact),email:this.functions.empty(t.acknowledgementReceipt.contact.email)?this.translate.instant("lang.withoutEmail"):t.acknowledgementReceipt.contact.email}],this.emailStatus="SENT"}),p(()=>this.http.get(`../rest/acknowledgementReceipts/${t}/content`)),Object(mt.a)(t=>{this.pdfMode="pdf"===t.format,this.pdfMode?(this.emailsubject=this.translate.instant("lang.ARPaper"),this.emailContent=t.encodedDocument,this.loading=!1):(this.emailsubject=this.translate.instant("lang.ARelectronic"),this.emailContent=this.b64DecodeUnicode(t.encodedDocument)),e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),e(!1),Object(c.a)(!1)))).subscribe()})}getResourceData(){return new Promise(t=>{this.http.get(`../rest/resources/${this.data.resId}?light=true`).pipe(Object(mt.a)(e=>{this.resourceData=e,this.emailAttach.document.chrono=this.resourceData.chrono,this.emailAttach.document.label=this.resourceData.subject,t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}setDefaultInfo(){this.emailsubject=`[${this.resourceData.chrono}] ${this.resourceData.subject}`,this.emailsubject=this.emailsubject.substring(0,70),this.currentSender=0===this.headerService.user.entities.length?this.availableSenders[0]:this.availableSenders.filter(t=>t.entityId===this.headerService.user.entities[0].id).length>0?this.availableSenders.filter(t=>t.entityId===this.headerService.user.entities[0].id)[0]:this.availableSenders[0],this.functions.empty(this.resourceData.senders)||this.resourceData.senders.forEach(t=>{this.setSender(t)})}setSender(t){switch(t.type){case"contact":this.http.get("../rest/contacts/"+t.id).pipe(Object(mt.a)(t=>{this.functions.empty(t.email)||this.recipients.push({label:this.contactService.formatContact(t),email:t.email})}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe();break;case"user":this.http.get("../rest/users/"+t.id).pipe(Object(mt.a)(t=>{this.functions.empty(t.mail)||this.recipients.push({label:this.contactService.formatContact(t),email:t.mail})}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}getUserEmails(){return new Promise(t=>{this.http.get("../rest/currentUser/availableEmails").pipe(Object(mt.a)(e=>{this.availableSenders=e.emails,t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}getAttachElements(){return new Promise(t=>{this.http.get(`../rest/resources/${this.data.resId}/emailsInitialization`).pipe(Object(mt.a)(e=>{Object.keys(e).forEach(t=>{"resource"===t?(this.emailAttachTool.document.list=[],this.functions.empty(e[t])||(this.emailAttachTool.document.list=[e[t]])):this.emailAttachTool[t].list=e[t].map(e=>(e.attachInMail&&this.toggleAttachMail(e,t,"SIGN"===e.status?"pdf":"original"),Object.assign(Object.assign({},e),{original:void 0===e.original||e.original,title:void 0!==e.chrono?`${e.chrono} - ${e.label} (${e.typeLabel})`:`${e.label} (${e.typeLabel})`})))}),t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}initEmailsList(){this.recipientsInput.valueChanges.pipe(Object(d.a)(t=>null!==t),Object(pt.a)(300),Object(mt.a)(t=>{0===t.length&&(this.filteredEmails=Object(c.a)([]))}),Object(d.a)(t=>t.length>2),Object(bt.a)(),Object(ft.a)(t=>this.http.get("../rest/autocomplete/correspondents",{params:{search:t,searchEmails:"true"}})),Object(mt.a)(t=>{t=t.filter(t=>!this.functions.empty(t.email)||"contactGroup"===t.type).map(t=>{let e="";return e="user"===t.type||"contact"===t.type?this.functions.empty(t.firstname)&&this.functions.empty(t.lastname)?t.company:t.firstname+" "+t.lastname:"contactGroup"===t.type?`${t.firstname} ${t.lastname}`:""+t.lastname,{id:t.id,type:t.type,label:e,email:t.email}}),this.filteredEmails=Object(c.a)(t)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}initEmailModelsList(){this.http.get(`../rest/resources/${this.data.resId}/emailTemplates`).pipe(Object(mt.a)(t=>{this.availableEmailModels=t.templates}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}initSignEmailModelsList(){this.http.get("../rest/currentUser/emailSignatures").pipe(Object(mt.a)(t=>{this.availableSignEmailModels=t.emailSignatures}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}resetAutocomplete(){this.filteredEmails=Object(c.a)([])}onSubmit(){this.emailStatus="WAITING",null===this.data.emailId?this.isAllEmailRightFormat()?""===this.emailsubject?this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.confirm"),msg:this.translate.instant("lang.warnEmptySubject")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.createEmail(!0)})).subscribe():this.createEmail(!0):this.notify.error(this.translate.instant("lang.badEmailsFormat")):this.updateEmail(!0)}createEmail(t=!0){return Object(r.a)(this,void 0,void 0,(function*(){0!==this.summarySheetUnits.length&&(yield this.createSummarySheet()),this.http.post("../rest/emails",this.formatEmail()).pipe(Object(mt.a)(()=>{"DRAFT"===this.emailStatus||this.notify.success(this.translate.instant("lang.sendingEmail")+"..."),t&&this.closeModal("success")}),Object(Xt.a)(()=>{"DRAFT"===this.emailStatus&&this.closeModal("success")}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}))}deleteEmail(){this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete("../rest/emails/"+this.data.emailId)),Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.emailDeleted")),this.closeModal("success")}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}updateEmail(t=!0){return Object(r.a)(this,void 0,void 0,(function*(){0!==this.summarySheetUnits.length&&(yield this.createSummarySheet()),this.http.put("../rest/emails/"+this.data.emailId,this.formatEmail()).pipe(Object(mt.a)(()=>{"DRAFT"===this.emailStatus||this.notify.success(this.translate.instant("lang.sendingEmail")+"..."),t&&this.closeModal("success")}),Object(Xt.a)(()=>{"DRAFT"===this.emailStatus&&this.closeModal("success")}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}))}saveDraft(){this.canManageMail()?(this.emailStatus="DRAFT",null===this.data.emailId?this.functions.empty(tinymce.get("emailSignature").getContent())?this.closeModal():this.createEmail(!0):this.updateEmail(!0)):this.closeModal()}drop(t){t.previousContainer!==t.container&&Object(lo.i)(t.previousContainer.data,t.container.data,t.previousIndex,t.currentIndex)}toggleAttachMail(t,e,i){"document"===e?!1===this.emailAttach.document.isLinked&&(this.emailAttach.document.isLinked=!0,this.emailAttach.document.format="pdf"!==i?t.format:"pdf",this.emailAttach.document.original="pdf"!==i,this.emailAttach.document.size="pdf"===i?t.convertedDocument.size:t.size):0===this.emailAttach[e].filter(e=>e.id===t.id).length&&this.emailAttach[e].push(Object.assign(Object.assign({},t),{format:"pdf"!==i?t.format:"pdf",original:"pdf"!==i,size:"pdf"===i?t.convertedDocument.size:t.size}))}removeAttachMail(t,e){"document"===e?(this.emailAttach.document.isLinked=!1,this.emailAttach.document.original=!1):this.emailAttach[e].splice(t,1)}switchEditionMode(){this.htmlMode=!this.htmlMode,this.htmlMode?($(".tox-editor-header").show(),tinymce.get("emailSignature").setContent(tinymce.get("emailSignature").getContent())):this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.switchInPlainText"),msg:this.translate.instant("lang.confirmSwitchInPlanText")}}).afterClosed().pipe(Object(mt.a)(t=>{"ok"===t?($(".tox-editor-header").hide(),tinymce.get("emailSignature").setContent(tinymce.get("emailSignature").getContent({format:"text"}))):this.htmlMode=!this.htmlMode})).subscribe()}formatEmail(){let t={};Object.keys(this.emailAttach).forEach(e=>{this.functions.empty(this.emailAttach[e])||("document"===e?t={id:this.emailAttach[e].id,isLinked:this.emailAttach[e].isLinked,original:this.emailAttach[e].original}:t[e]=this.emailAttach[e].map("notes"===e?t=>t.id:t=>({id:t.id,original:t.original})))});const e={email:this.currentSender.email,entityId:this.functions.empty(this.currentSender.entityId)?null:this.currentSender.entityId};return{document:t,sender:e,recipients:this.recipients.map(t=>t.email),cc:this.showCopies?this.copies.map(t=>t.email):[],cci:this.showInvisibleCopies?this.invisibleCopies.map(t=>t.email):[],object:this.emailsubject,body:this.htmlMode?tinymce.get("emailSignature").getContent():tinymce.get("emailSignature").getContent({format:"text"}),isHtml:!0,status:this.emailStatus}}isSelectedAttachMail(t,e){return"document"===e?this.emailAttach.document.isLinked:this.emailAttach[e].filter(e=>e.id===t.id).length>0}canManageMail(){return null===this.data.emailId||"SENT"!==this.emailStatus&&this.headerService.user.id===this.emailCreatorId?(this.recipientsInput.enable(),!0):(this.recipientsInput.disable(),!1)}isAllEmailRightFormat(){let t=!0;return this.recipients.concat(this.copies).concat(this.invisibleCopies).map(t=>t.email).forEach(e=>{this.isBadEmailFormat(e)&&(t=!1)}),t}compareSenders(t,e){return!(t.label!==e.label&&(null!==t.label&&null!==e.label||null!==t.entityId&&null!==e.entityId)||t.entityId!==e.entityId||t.email!==e.email)}b64DecodeUnicode(t){return decodeURIComponent(atob(t).split("").map((function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)})).join(""))}onPaste(t,e){const i=t.clipboardData.getData("text");this.formatEmailAddress(i,e)}formatEmailAddress(t,e){const i=t.split(/[,;]+/);this.functions.empty(i)||(setTimeout(()=>{this.recipientsInput.setValue(null),this[e+"Field"].nativeElement.value=""},0),i.forEach(t=>{t=t.match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+)/gi),this.functions.empty(t)||this[e].push({label:t[0],email:t[0]})}))}openSummarySheetModal(t){if("summarySheet"!==t)return;let e,i,n,a;e=new Date,i=e.getDate(),n=e.getMonth()+1,a=e.getFullYear(),i<10&&(i="0"+i),n<10&&(n="0"+n),e=i+"-"+n+"-"+a;const s=this.translate.instant("lang.summarySheet")+" "+e;this.dialog.open(Cw,{panelClass:"maarch-full-height-modal",width:"800px",data:{paramMode:!0}}).afterClosed().pipe(Object(d.a)(t=>void 0!==t),Object(mt.a)(t=>{this.summarySheetUnits=t,this.emailAttach.summarySheet.push({label:s,format:"pdf",title:s,list:[]})}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}createSummarySheet(){return Object(r.a)(this,void 0,void 0,(function*(){return new Promise(t=>{this.http.post("../rest/resourcesList/summarySheets?mode=base64",{units:this.summarySheetUnits,resources:[this.data.resId]}).pipe(Object(mt.a)(e=>Object(r.a)(this,void 0,void 0,(function*(){yield this.saveSummarySheet(e.encodedDocument),this.loading=!1,t(!0)}))),Object(m.a)(e=>(this.notify.handleErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}))}saveSummarySheet(t){return Object(r.a)(this,void 0,void 0,(function*(){return new Promise(e=>{let i,n,a,s;i=new Date,n=i.getDate(),a=i.getMonth()+1,s=i.getFullYear(),n<10&&(n="0"+n),a<10&&(a="0"+a),i=n+"-"+a+"-"+s;const o=this.translate.instant("lang.summarySheet")+" "+i;this.http.post("../rest/attachments",{resIdMaster:this.data.resId,encodedFile:t,type:"summary_sheet",format:"PDF",title:o}).pipe(Object(mt.a)(t=>{this.emailAttach.summarySheet=void 0,this.emailAttach.attachments.push({id:t.id,label:o,format:"pdf",title:o,original:!0}),this.loading=!1,e(!0)}),Object(m.a)(t=>(this.notify.handleErrors(t),e(!1),Object(c.a)(!1)))).subscribe()})}))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(v.b),n.Qb(D.a),n.Qb(q.a),n.Qb(q.b),n.Qb(q.h),n.Qb(_t.a),n.Qb(lc),n.Qb(Dt.a),n.Qb(y.a),n.Qb(g.e))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-sent-resource-page"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(vj,!0),n.Xc(_j,!0),n.Xc(yj,!0)),2&t&&(n.yc(i=n.ec())&&(e.recipientsField=i.first),n.yc(i=n.ec())&&(e.copiesField=i.first),n.yc(i=n.ec())&&(e.invisibleCopiesField=i.first))},features:[n.Cb([lc,w.a])],decls:55,vars:60,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],[2,"flex","1"],["mat-icon-button","",3,"title","click"],[1,"fa","fa-times"],[1,"modal-container"],["class","loading",4,"ngIf"],["matPrefix","",1,"attachLabel"],["matInput","","readonly","",3,"value",4,"ngIf"],[3,"compareWith","ngModel","ngModelChange",4,"ngIf"],["mat-button","","color","primary","matSuffix","",3,"disabled","click"],["id","recipients-list","cdkDropList","",3,"cdkDropListConnectedTo","cdkDropListData","cdkDropListDropped"],["recipientsList",""],["cdkDrag","","class","recipients",3,"cdkDragDisabled","removable","title","badFormat","removed","click",4,"ngFor","ngForOf"],[3,"formControl","matChipInputFor","matChipInputSeparatorKeyCodes","matChipInputAddOnBlur","matAutocomplete","matChipInputTokenEnd","focus","paste"],["recipientsField",""],[3,"optionSelected"],["autoEmails","matAutocomplete"],[3,"value",4,"ngFor","ngForOf"],[4,"ngIf"],["floatLabel","never"],["matInput","","maxlength","255",3,"placeholder","readonly","ngModel","ngModelChange"],["mat-icon-button","","matSuffix","",3,"disabled","title","matMenuTriggerFor","click",4,"ngFor","ngForOf"],["emailAttachListMenu","matMenu"],[4,"ngFor","ngForOf"],["class","copy",3,"removable","title","removed",4,"ngIf"],["class","models",4,"ngIf"],[2,"padding-top","10px"],["style","padding-top: 10px;","name","emailSignature","id","emailSignature",3,"ngModel","ngModelChange",4,"ngIf"],["style","display:block;height:400px;width:100%;overflow: auto;",3,"editMode","base64",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","","class","actions",4,"ngIf"],[1,"loading"],[2,"margin","auto"],["matInput","","readonly","",3,"value"],[3,"compareWith","ngModel","ngModelChange"],[3,"value"],["cdkDrag","",1,"recipients",3,"cdkDragDisabled","removable","title","removed","click"],["matChipRemove","","class","fa fa-times",4,"ngIf"],["matChipRemove","",1,"fa","fa-times"],["class","attachLabel",4,"ngIf"],[1,"attachLabel"],["id","copies-list","cdkDropList","",3,"cdkDropListConnectedTo","cdkDropListData","cdkDropListDropped"],["copiesList",""],["cdkDrag","","class","copy",3,"cdkDragDisabled","removable","title","badFormat","removed","click",4,"ngFor","ngForOf"],["copiesField",""],["autoEmails2","matAutocomplete"],["cdkDrag","",1,"copy",3,"cdkDragDisabled","removable","title","removed","click"],["id","invcopies-list","cdkDropList","",3,"cdkDropListConnectedTo","cdkDropListData","cdkDropListDropped"],["invCopiesList",""],["invisibleCopiesField",""],["autoEmails3","matAutocomplete"],["mat-icon-button","","matSuffix","",3,"disabled","title","matMenuTriggerFor","click"],["color","primary"],["mat-menu-item","","disableRipple","",1,"attachListButton",2,"line-height","normal","height","auto","padding","10px",3,"disabled","click"],[1,"attachListContainer"],["mat-raised-button","","class","extensionButton","color","primary",3,"click",4,"ngIf"],[3,"title"],[2,"font-size","10px","opacity","0.5"],[1,"attachLabel",2,"font-size","10px"],["style","color:green",4,"ngIf"],["mat-raised-button","","color","primary",1,"extensionButton",3,"click"],[2,"color","green"],[1,"copy",3,"removable","title","removed"],[1,"fa","fa-file","attachLabel"],["class","copy",3,"removable","title","removed",4,"ngFor","ngForOf"],[1,"models"],[3,"label","placeholderLabel","datas","formControlSelect","afterSelected",4,"ngIf"],[3,"label","placeholderLabel","datas","formControlSelect","afterSelected"],["templateList",""],["name","emailSignature","id","emailSignature",2,"padding-top","10px",3,"ngModel","ngModelChange"],[2,"display","block","height","400px","width","100%","overflow","auto",3,"editMode","base64"],["appDocumentViewer",""],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","color","primary","style","min-width: auto;width: 30px;padding: 0;background-color: white; color: grey;",3,"matMenuTriggerFor",4,"ngIf"],["emailActionMenu","matMenu"],["mat-menu-item","",3,"click",4,"ngIf"],["mat-raised-button","","color","primary",3,"disabled","click",4,"ngIf"],["mat-raised-button","","color","warn",3,"disabled","click",4,"ngIf"],["mat-raised-button","","color","primary",2,"min-width","auto","width","30px","padding","0","background-color","white","color","grey",3,"matMenuTriggerFor"],[1,"fas","fa-ellipsis-v",2,"height","auto"],["mat-menu-item","",3,"click"],["mat-raised-button","","color","primary",3,"disabled","click"],["mat-raised-button","","color","warn",3,"disabled","click"]],template:function(t,e){if(1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Wb(2,"span",2),n.Qc(3),n.Vb(),n.Wb(4,"button",3),n.dc("click",(function(){return e.saveDraft()})),n.ic(5,"translate"),n.Rb(6,"mat-icon",4),n.Vb(),n.Vb(),n.Wb(7,"mat-dialog-content",5),n.Oc(8,xj,2,0,"div",6),n.Wb(9,"mat-form-field"),n.Wb(10,"span",7),n.Qc(11),n.ic(12,"translate"),n.Vb(),n.Oc(13,Cj,1,1,"input",8),n.Oc(14,Dj,3,6,"mat-select",9),n.Wb(15,"button",10),n.dc("click",(function(t){return t.stopPropagation(),e.showCopies=!e.showCopies})),n.Qc(16),n.ic(17,"translate"),n.Vb(),n.Wb(18,"button",10),n.dc("click",(function(t){return t.stopPropagation(),e.showInvisibleCopies=!e.showInvisibleCopies})),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Vb(),n.Wb(21,"mat-form-field"),n.Wb(22,"span",7),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Wb(25,"mat-chip-list",11,12),n.dc("cdkDropListDropped",(function(t){return e.drop(t)})),n.Oc(27,Mj,3,8,"mat-chip",13),n.Wb(28,"input",14,15),n.dc("matChipInputTokenEnd",(function(t){return e.add(t,"recipients")}))("focus",(function(){return e.resetAutocomplete()}))("paste",(function(t){return e.onPaste(t,"recipients")})),n.Vb(),n.Vb(),n.Wb(30,"mat-autocomplete",16,17),n.dc("optionSelected",(function(t){return e.addEmail(t.option.value,"recipients")})),n.Oc(32,Sj,3,3,"mat-option",18),n.ic(33,"async"),n.Vb(),n.Vb(),n.Oc(34,Aj,13,15,"mat-form-field",19),n.Oc(35,Qj,13,15,"mat-form-field",19),n.Wb(36,"mat-form-field",20),n.Wb(37,"input",21),n.dc("ngModelChange",(function(t){return e.emailsubject=t})),n.ic(38,"translate"),n.Vb(),n.Oc(39,Nj,2,8,"button",22),n.ic(40,"keyvalue"),n.Wb(41,"mat-menu",null,23),n.Oc(43,Xj,2,1,"ng-container",24),n.ic(44,"keyvalue"),n.Vb(),n.Vb(),n.Wb(45,"mat-chip-list"),n.Oc(46,Kj,7,10,"mat-chip",25),n.Oc(47,tA,2,1,"ng-container",24),n.ic(48,"keyvalue"),n.Vb(),n.Oc(49,nA,3,2,"div",26),n.Wb(50,"div",27),n.Oc(51,aA,1,1,"textarea",28),n.Oc(52,sA,2,2,"app-document-viewer",29),n.Vb(),n.Vb(),n.Rb(53,"span",30),n.Oc(54,hA,8,7,"div",31),n.Vb()),2&t){const t=n.zc(26),i=n.zc(31);n.Db(3),n.Sc(" ",e.data.title," "),n.Db(1),n.oc("title",n.jc(5,39,"lang.saveAndClose")),n.Db(4),n.oc("ngIf",e.loading),n.Db(3),n.Sc("",n.jc(12,41,"lang.senderShort"),"\xa0:\xa0"),n.Db(2),n.oc("ngIf",!e.canManageMail()),n.Db(1),n.oc("ngIf",e.canManageMail()),n.Db(1),n.Ib("activeButton",e.showCopies),n.oc("disabled",!e.canManageMail()),n.Db(1),n.Rc(n.jc(17,43,"lang.copieShort")),n.Db(2),n.Ib("activeButton",e.showInvisibleCopies),n.oc("disabled",!e.canManageMail()),n.Db(1),n.Rc(n.jc(20,45,"lang.invisibleCopyShort")),n.Db(4),n.Sc("",n.jc(24,47,"lang.recipientShort"),"\xa0:\xa0"),n.Db(2),n.oc("cdkDropListConnectedTo",n.uc(59,uA))("cdkDropListData",e.recipients),n.Db(2),n.oc("ngForOf",e.recipients),n.Db(1),n.oc("formControl",e.recipientsInput)("matChipInputFor",t)("matChipInputSeparatorKeyCodes",e.separatorKeysCodes)("matChipInputAddOnBlur",!0)("matAutocomplete",i),n.Db(4),n.oc("ngForOf",n.jc(33,49,e.filteredEmails)),n.Db(2),n.oc("ngIf",e.showCopies),n.Db(1),n.oc("ngIf",e.showInvisibleCopies),n.Db(2),n.oc("placeholder",n.jc(38,51,"lang.object"))("readonly",!e.canManageMail())("ngModel",e.emailsubject),n.Db(2),n.oc("ngForOf",n.jc(40,53,e.emailAttachTool)),n.Db(2),n.Fb("attachListMenu"),n.Db(2),n.oc("ngForOf",n.jc(44,55,e.emailAttachTool)),n.Db(3),n.oc("ngIf",e.emailAttach.document.isLinked),n.Db(1),n.oc("ngForOf",n.jc(48,57,e.emailAttach)),n.Db(2),n.oc("ngIf",e.canManageMail()),n.Db(2),n.oc("ngIf",!e.pdfMode),n.Db(1),n.oc("ngIf",e.pdfMode),n.Db(2),n.oc("ngIf",!e.loading)}},directives:[q.i,k.b,S.a,q.f,P.t,Y.c,Y.i,Y.j,ze.d,lo.e,P.s,X.d,ze.c,Ne.d,X.u,X.j,Ne.a,J.b,X.p,X.x,ne.e,V.c,ee.a,W.p,ze.a,lo.a,ze.e,ne.d,ne.b,T.a,fr,Jr,q.c],pipes:[g.d,P.b,P.l,Wt.a,Tt.p,P.p],styles:[".loading[_ngcontent-%COMP%]{display:flex;height:100%;position:absolute;z-index:2;width:100%;top:0;left:0;background:#fff}.mat-dialog-title[_ngcontent-%COMP%]{display:flex;align-items:center}.copy[_ngcontent-%COMP%], .recipients[_ngcontent-%COMP%]{font-size:12px!important;padding:5px!important;min-height:auto;height:auto;border-radius:5px;cursor:pointer}.copy[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%], .recipients[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{width:auto;font-size:12px;height:auto}.models[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;grid-gap:20px;padding-top:10px}.activeButton[_ngcontent-%COMP%]{color:#f99830;font-weight:700}.attachLabel[_ngcontent-%COMP%], .pdfVersion[_ngcontent-%COMP%]:hover{color:#135f7f} .attachListMenu{width:auto;max-width:none;min-height:auto}.attachListButton[_ngcontent-%COMP%]:hover{background:initial!important;cursor:default}.attachListContainer[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto 1fr;grid-gap:10px;align-items:center}.extensionButton[_ngcontent-%COMP%]{line-height:20px;min-width:50px;padding:0}.badFormat[_ngcontent-%COMP%]{background-color:#d03c3c;color:#fff}"]}),t})();const bA=["recipientsInput"];function fA(t,e){1&t&&(n.Wb(0,"div",35),n.Rb(1,"mat-spinner",36),n.Vb())}const mA=function(t){return{value1:t}};function gA(t,e){if(1&t&&(n.Rb(0,"div",37),n.ic(1,"translate")),2&t){const t=n.hc();n.oc("innerHTML",n.kc(1,1,"lang.sendNumericPackageInfo",n.vc(4,mA,t.maarch2maarchUrl)),n.Ec)}}function vA(t,e){if(1&t&&n.Rb(0,"input",38),2&t){const t=n.hc();n.oc("value",t.currentSender.label)}}function _A(t,e){if(1&t&&(n.Wb(0,"mat-option",41),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Tc(" ",t.label," (",t.m2m,") ")}}function yA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-select",39),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().currentSender=e})),n.Oc(1,_A,2,3,"mat-option",40),n.ic(2,"sortBy"),n.Vb()}if(2&t){const t=n.hc();n.oc("compareWith",t.compareSenders)("ngModel",t.currentSender),n.Db(1),n.oc("ngForOf",n.kc(2,3,t.availableSenders,"label"))}}function xA(t,e){1&t&&n.Rb(0,"mat-icon",44)}function CA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",42),n.dc("removed",(function(){n.Dc(t);const i=e.$implicit;return n.hc().remove(i,"recipients")}))("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().remove(i,"recipients")})),n.Wb(1,"span",2),n.Wb(2,"div"),n.Qc(3),n.Wb(4,"b"),n.Qc(5),n.Vb(),n.Vb(),n.Wb(6,"div",8),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Oc(9,xA,1,0,"mat-icon",43),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc();n.oc("removable",i.canManageMail()),n.Db(3),n.Sc(" ",t.label," - "),n.Db(2),n.Rc(t.m2m),n.Db(2),n.Tc(" (",n.jc(8,6,"lang.communicationMean")," : ",t.communicationMeans,") "),n.Db(2),n.oc("ngIf",i.canManageMail())}}function OA(t,e){if(1&t&&(n.Wb(0,"mat-option",45),n.Wb(1,"div"),n.Qc(2),n.Wb(3,"b"),n.Qc(4),n.Vb(),n.Vb(),n.Wb(5,"div",8),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(2),n.Sc(" ",t.label," - "),n.Db(2),n.Rc(t.m2m),n.Db(2),n.Tc(" (",n.jc(7,5,"lang.communicationMean")," : ",t.communicationMeans,") ")}}function DA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",46),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc();return i.stopPropagation(),s.numericPackageCurrentAttachTool=a.key})),n.Rb(1,"mat-icon",47),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(),a=n.zc(38);n.oc("disabled",!i.canManageMail()||0===i.numericPackageAttachTool[t.key].list.length)("title",i.numericPackageAttachTool[t.key].title)("matMenuTriggerFor",a),n.Db(1),n.Fb(i.numericPackageAttachTool[t.key].icon),n.Ib("activeButton",i.isSelectedAttachType(t.key))}}function wA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",49),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2).$implicit,o=n.hc();return i.stopPropagation(),o.toggleAttach(a,s.key,"original")})),n.Wb(1,"span",50),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2).$implicit,o=n.hc();return i.stopPropagation(),o.toggleAttach(a,s.key,"original")})),n.Wb(2,"div",51),n.Qc(3),n.Vb(),n.Qc(4),n.ic(5,"shorten"),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2).$implicit,a=n.hc();n.oc("disabled",a.isSelectedAttach(t,i.key)),n.Db(1),n.oc("title",t.label),n.Db(2),n.Uc("",t.chrono," - ",t.typeLabel," (",t.creator,")"),n.Db(1),n.Tc(" ",n.lc(5,7,t.label,45,"...")," - ",t.format," ")}}function MA(t,e){if(1&t&&(n.Ub(0),n.Oc(1,wA,6,11,"button",48),n.Tb()),2&t){const t=n.hc().$implicit,e=n.hc();n.Db(1),n.oc("ngForOf",e.numericPackageAttachTool[t.key].list)}}function kA(t,e){if(1&t&&(n.Ub(0),n.Oc(1,MA,2,1,"ng-container",23),n.Tb()),2&t){const t=e.$implicit,i=n.hc();n.Db(1),n.oc("ngIf",t.key===i.numericPackageCurrentAttachTool)}}function SA(t,e){if(1&t&&(n.Wb(0,"mat-form-field"),n.Wb(1,"mat-label",8),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Rb(4,"input",38),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Rc(n.jc(3,2,"lang.reference")),n.Db(2),n.oc("value",t.reference)}}function IA(t,e){1&t&&(n.Wb(0,"div",52),n.Qc(1),n.ic(2,"translate"),n.Rb(3,"i",53),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.attachItemToNumericPackage")," "))}function PA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",62),n.dc("click",(function(){return n.Dc(t),n.hc(3).numericPackage.mainExchangeDoc=null})),n.Rb(1,"mat-icon",63),n.Vb()}}function VA(t,e){if(1&t&&(n.Wb(0,"mat-list-item",56),n.Wb(1,"p",57),n.Wb(2,"span",58),n.Qc(3),n.Vb(),n.Wb(4,"span",59),n.Qc(5),n.Vb(),n.Wb(6,"span",60),n.Qc(7),n.Vb(),n.Oc(8,PA,2,0,"button",61),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(3),n.Rc(t.numericPackage.mainExchangeDoc.label),n.Db(2),n.Rc(t.numericPackage.mainExchangeDoc.typeLabel),n.Db(2),n.Sc(".",t.numericPackage.mainExchangeDoc.format,""),n.Db(1),n.oc("ngIf",t.canManageMail())}}function RA(t,e){if(1&t&&(n.Wb(0,"mat-list"),n.Wb(1,"h3",54),n.Qc(2),n.ic(3,"translate"),n.ic(4,"translate"),n.Vb(),n.Oc(5,VA,9,4,"mat-list-item",55),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Rc(t.canManageMail()?n.jc(3,2,"lang.mainDocNumericPackageToSend"):n.jc(4,4,"lang.mainDocNumericPackage")),n.Db(3),n.oc("ngIf",null!==t.numericPackage.mainExchangeDoc)}}function jA(t,e){1&t&&n.Rb(0,"mat-divider")}function AA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",62),n.dc("click",(function(){n.Dc(t);const e=n.hc().index;return n.hc(2).removeAttach(e)})),n.Rb(1,"mat-icon",63),n.Vb()}}function WA(t,e){if(1&t&&(n.Wb(0,"mat-list-item",56),n.Wb(1,"p",57),n.Wb(2,"span",65),n.Qc(3),n.Vb(),n.Wb(4,"span",59),n.Qc(5),n.Vb(),n.Wb(6,"span",60),n.Qc(7),n.Vb(),n.Oc(8,AA,2,0,"button",61),n.Vb(),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Db(2),n.oc("title",t.label),n.Db(1),n.Rc(t.label),n.Db(2),n.Rc(t.typeLabel),n.Db(2),n.Sc(".",t.format,""),n.Db(1),n.oc("ngIf",i.canManageMail())}}function TA(t,e){if(1&t&&(n.Wb(0,"mat-list"),n.Wb(1,"h3",54),n.Qc(2),n.ic(3,"translate"),n.ic(4,"translate"),n.Vb(),n.Oc(5,WA,9,5,"mat-list-item",64),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Rc(t.canManageMail()?n.jc(3,2,"lang.attachmentsNumericPackageToSend"):n.jc(4,4,"lang.attachmentsNumericPackage")),n.Db(3),n.oc("ngForOf",t.numericPackageAttach)}}function EA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"plugin-select-search",68),n.dc("afterSelected",(function(e){return n.Dc(t),n.hc(2).mergeEmailTemplate(e)})),n.ic(1,"translate"),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(2);n.oc("label",n.jc(1,4,"lang.emailModel"))("placeholderLabel",n.jc(2,6,"lang.emailModel"))("datas",t.availableEmailModels)("formControlSelect",t.templateEmailListForm)}}function FA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"plugin-select-search",68,69),n.dc("afterSelected",(function(e){return n.Dc(t),n.hc(2).mergeSignEmailTemplate(e)})),n.ic(2,"translate"),n.ic(3,"translate"),n.Vb()}if(2&t){const t=n.hc(2);n.oc("label",n.jc(2,4,"lang.emailSignatures"))("placeholderLabel",n.jc(3,6,"lang.emailSignatures"))("datas",t.availableSignEmailModels)("formControlSelect",t.emailSignListForm)}}function LA(t,e){if(1&t&&(n.Wb(0,"div",66),n.Oc(1,EA,3,8,"plugin-select-search",67),n.Oc(2,FA,4,8,"plugin-select-search",67),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.availableEmailModels.length>0),n.Db(1),n.oc("ngIf",t.availableSignEmailModels.length>0)}}function QA(t,e){if(1&t&&(n.Wb(0,"div",78),n.Wb(1,"div",79),n.Qc(2),n.ic(3,"timeAgo"),n.Vb(),n.Wb(4,"div"),n.Qc(5),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Sc(" ",n.kc(3,2,t.date,"full")," "),n.Db(3),n.Sc(" ",t.content," ")}}function NA(t,e){1&t&&(n.Wb(0,"div",80),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.noActionProcessed")))}function zA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",70),n.Wb(1,"div",71),n.Wb(2,"label",8),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"div",72),n.Oc(6,QA,6,5,"div",73),n.Oc(7,NA,3,3,"div",74),n.Vb(),n.Vb(),n.Wb(8,"div",75),n.Wb(9,"button",76),n.dc("click",(function(){return n.Dc(t),n.hc().saveNumericPackageFile()})),n.Rb(10,"i",77),n.Rb(11,"br"),n.Wb(12,"span"),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(3),n.Rc(n.jc(4,4,"lang.actionsHistory")),n.Db(3),n.oc("ngForOf",t.messageReview),n.Db(1),n.oc("ngIf",0===t.messageReview.length),n.Db(6),n.Rc(n.jc(14,6,"lang.downloadNumericPackage"))}}function BA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",81),n.dc("click",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc();n.oc("disabled",0===t.recipients.length||null===t.numericPackage.mainExchangeDoc||t.loading),n.Db(1),n.Rc(n.jc(2,2,"lang.send"))}}function UA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",82),n.dc("click",(function(){return n.Dc(t),n.hc().deleteEmail()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc();n.oc("disabled",t.headerService.user.id!==t.numericPackageCreatorId),n.Db(1),n.Rc(n.jc(2,2,"lang.delete"))}}let $A=(()=>{class t{constructor(t,e,i,n,s,o,r,c,l,d,h,u){this.translate=t,this.http=e,this.notify=i,this.data=n,this.dialog=s,this.dialogRef=o,this.functions=r,this.contactService=c,this.privilegeService=l,this.headerService=d,this.stringPipe=h,this.reversePipe=u,this.loading=!0,this.availableEmailModels=[],this.availableSignEmailModels=[],this.resourceData=null,this.availableSenders=[],this.currentSender={},this.recipients=[],this.recipientsCtrl=new X.i,this.emailSignListForm=new X.i,this.templateEmailListForm=new X.i,this.numericPackageCreatorId=null,this.numericPackageStatus="WAITING",this.numericPackageCurrentAttachTool="",this.numericPackageAttachTool={document:{icon:"fa fa-file",title:this.translate.instant("lang.attachMainDocument"),list:[]},notes:{icon:"fas fa-pen-square",title:this.translate.instant("lang.attachNote"),list:[]},attachments:{icon:"fa fa-paperclip",title:this.translate.instant("lang.attachAttachment"),list:[]}},this.numericPackageAttach=[],this.numericPackage={mainExchangeDoc:null,object:"",contacts:[],joinFile:[],joinAttachment:[],notes:[],content:"",senderEmail:null},this.reference=null,this.messageReview=[],this.maarch2maarchUrl=`https://docs.maarch.org/gitbook/html/MaarchCourrier/${a.a.VERSION.split(".")[0]+"."+a.a.VERSION.split(".")[1]}/guat/guat_exploitation/maarch2maarch.html`}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){yield this.getAttachElements(),this.data.emailId&&(yield this.getNumericPackageData(this.data.emailId)),this.canManageMail()&&(this.initEmailModelsList(),this.initM2MList(),this.initSignEmailModelsList(),yield this.getResourceData(),yield this.getM2MSenders(),this.setDefaultInfo()),this.loading=!1}))}isBadEmailFormat(t){return null===t.trim().match(/^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$/g)}closeModal(t=""){this.dialogRef.close(t)}addRecipient(t){this.recipients.push(t),this.recipientsInput.nativeElement.value="",this.recipientsCtrl.setValue("")}mergeEmailTemplate(t){this.templateEmailListForm.reset(),this.http.post(`../rest/templates/${t}/mergeEmail`,{data:{resId:this.data.resId}}).pipe(Object(mt.a)(t=>{const e=document.createElement("textarea");e.innerHTML=t.mergedDocument,this.numericPackage.content+=this.stringPipe.transform(e.value)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}mergeSignEmailTemplate(t){this.emailSignListForm.reset(),this.http.get("../rest/currentUser/emailSignatures/"+t).pipe(Object(mt.a)(t=>{const e=document.createElement("textarea");e.innerHTML=t.emailSignature.content,this.numericPackage.content+=this.stringPipe.transform(e.value)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}remove(t,e){if(this.canManageMail()){const i=this[e].indexOf(t);i>=0&&this[e].splice(i,1)}}getNumericPackageData(t){return new Promise(e=>{this.http.get("../rest/messageExchanges/"+t).pipe(Object(l.a)(t=>t.messageExchange),Object(mt.a)(t=>{this.numericPackageCreatorId=t.userId,t.recipient.communicationMeans=t.communicationType,this.recipients=[t.recipient],this.currentSender.label=t.sender,this.numericPackage.object=t.object,this.numericPackageStatus=t.status.toUpperCase(),this.numericPackage.content=t.body,this.reference=t.reference,this.messageReview=t.messageReview.map(t=>({date:this.functions.formatFrenchDateToObjectDate(t.substring(1,19),"/"),content:t.substring(21)})),this.messageReview=this.reversePipe.transform(this.messageReview),"res_letterbox"===t.disposition.tablename?(this.numericPackage.mainExchangeDoc=Object.assign(Object.assign({},this.numericPackageAttachTool.document.list[0]),{typeLabel:this.translate.instant("lang.mainDocument"),type:"document"}),this.numericPackageAttach=this.numericPackageAttach.concat(this.numericPackageAttachTool.attachments.list.filter(e=>t.attachments.indexOf(e.id.toString())>-1))):(this.numericPackage.mainExchangeDoc=Object.assign(Object.assign({},this.numericPackageAttachTool.attachments.list.filter(e=>e.id===t.disposition.res_id)[0]),{type:"attachments"}),this.numericPackageAttach=this.numericPackageAttach.concat(this.numericPackageAttachTool.attachments.list.filter(e=>t.attachments.indexOf(e.id.toString())>-1&&e.id!==t.disposition.res_id))),t.resMasterAttached&&"res_letterbox"!==t.disposition.tablename&&this.numericPackageAttach.push(Object.assign(Object.assign({},this.numericPackageAttachTool.document.list[0]),{typeLabel:this.translate.instant("lang.mainDocument"),type:"document"})),this.numericPackageAttach=this.numericPackageAttach.concat(this.numericPackageAttachTool.notes.list.filter(e=>t.notes.indexOf(e.id.toString())>-1)),e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),e(!1),Object(c.a)(!1)))).subscribe()})}getResourceData(){return new Promise(t=>{this.http.get(`../rest/resources/${this.data.resId}?light=true`).pipe(Object(mt.a)(e=>{this.resourceData=e,this.numericPackage.object=this.resourceData.subject,t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}setDefaultInfo(){this.functions.empty(this.resourceData.senders)||this.resourceData.senders.forEach(t=>{"contact"===t.type&&this.setSender(t.id)})}setSender(t){this.http.get("../rest/contacts/"+t).pipe(Object(mt.a)(e=>{this.functions.empty(e.communicationMeans)||this.functions.empty(e.externalId.m2m)||this.recipients.push({id:t,label:this.contactService.formatContact(e),email:e.email,m2m:e.externalId.m2m,communicationMeans:e.communicationMeans})}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}getM2MSenders(){return new Promise(t=>{this.http.get("../rest/messageExchangesInitialization").pipe(Object(mt.a)(e=>{this.availableSenders=e.entities,this.currentSender=this.availableSenders[0],t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}getAttachElements(){return new Promise(t=>{this.http.get(`../rest/resources/${this.data.resId}/emailsInitialization`).pipe(Object(mt.a)(e=>{Object.keys(e).forEach(t=>{"resource"===t?(this.numericPackageAttachTool.document.list=[],this.functions.empty(e[t])||(this.numericPackageAttachTool.document.list=[e[t]])):this.numericPackageAttachTool[t].list=e[t].map(t=>Object.assign(Object.assign({},t),{original:void 0===t.original||t.original,title:void 0!==t.chrono?`${t.chrono} - ${t.label} (${t.typeLabel})`:`${t.label} (${t.typeLabel})`}))}),t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}initM2MList(){this.recipientsCtrl.valueChanges.pipe(Object(d.a)(t=>null!==t),Object(pt.a)(300),Object(mt.a)(t=>{0===t.length&&(this.filteredEmails=Object(c.a)([]))}),Object(d.a)(t=>t.length>2),Object(bt.a)(),Object(ft.a)(t=>this.http.get("../rest/autocomplete/contacts/m2m",{params:{search:t}})),Object(mt.a)(t=>{t=t.map(t=>Object.assign(Object.assign({},t),{address:this.contactService.formatContact(t),label:this.contactService.formatContact(t)})),this.filteredEmails=Object(c.a)(t)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}initEmailModelsList(){this.http.get(`../rest/resources/${this.data.resId}/emailTemplates`).pipe(Object(mt.a)(t=>{this.availableEmailModels=t.templates}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}initSignEmailModelsList(){this.http.get("../rest/currentUser/emailSignatures").pipe(Object(mt.a)(t=>{this.availableSignEmailModels=t.emailSignatures}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}resetAutocomplete(){this.filteredEmails=Object(c.a)([])}onSubmit(){this.loading=!0,this.numericPackageStatus="WAITING",null===this.data.emailId?""===this.numericPackage.object?this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.confirm"),msg:this.translate.instant("lang.warnEmptySubject")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.createEmail(!0)})).subscribe():this.createEmail(!0):this.updateEmail(!0)}createEmail(t=!0){this.http.post(`../rest/resources/${this.data.resId}/messageExchange`,this.formatNumericPackage()).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.numericPackageSent")),this.closeModal("success")}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}deleteEmail(){this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete("../rest/messageExchanges/"+this.data.emailId)),Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.numericPackageDeleted")),this.closeModal("success")}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}updateEmail(t=!0){this.http.put("../rest/emails/"+this.data.emailId,this.formatNumericPackage()).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.numericPackageSent")),t&&this.closeModal("success")}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}toggleAttach(t,e,i){null===this.numericPackage.mainExchangeDoc&&"notes"!==e?this.numericPackage.mainExchangeDoc=Object.assign(Object.assign({},t),{typeLabel:void 0!==t.typeLabel?t.typeLabel:this.translate.instant("lang.mainDocument"),type:e}):this.numericPackageAttach.push(Object.assign(Object.assign({},t),{typeLabel:void 0!==t.typeLabel?t.typeLabel:this.translate.instant("lang.mainDocument"),type:e}))}removeAttach(t){this.numericPackageAttach.splice(t,1)}formatNumericPackage(){const t={};if(null!==this.numericPackage.mainExchangeDoc){let e="res_letterbox";"attachments"===this.numericPackage.mainExchangeDoc.type?e="res_attachments":"notes"===this.numericPackage.mainExchangeDoc.type&&(e="notes"),t.joinFile=[parseInt(this.numericPackage.mainExchangeDoc.id)],t.mainExchangeDoc=`${e}__${this.numericPackage.mainExchangeDoc.id}`}return t.object=this.numericPackage.object,t.content=this.numericPackage.content,t.contacts=this.recipients.map(t=>t.id),t.joinAttachment=this.numericPackageAttach.filter(t=>"attachments"===t.type).map(t=>t.id),t.notes=this.numericPackageAttach.filter(t=>"notes"===t.type).map(t=>t.id),t.senderEmail=this.currentSender.id,t}isSelectedAttach(t,e){return this.numericPackageAttach.filter(i=>i.id===t.id&&i.type===e).length>0||null!==this.numericPackage.mainExchangeDoc&&this.numericPackage.mainExchangeDoc.id===t.id&&e===this.numericPackage.mainExchangeDoc.type}isSelectedAttachType(t){return this.numericPackageAttach.filter(e=>e.type===t).length>0||null!==this.numericPackage.mainExchangeDoc&&t===this.numericPackage.mainExchangeDoc.type}canManageMail(){return null===this.data.emailId||"SENT"!==this.numericPackageStatus&&this.headerService.user.id===this.numericPackageCreatorId?(this.recipientsCtrl.enable(),!0):(this.recipientsCtrl.disable(),!1)}compareSenders(t,e){return!(t.label!==e.label&&(null!==t.label&&null!==e.label||null!==t.entityId&&null!==e.entityId)||t.entityId!==e.entityId||t.email!==e.email)}saveNumericPackageFile(){this.http.get(`../rest/messageExchanges/${this.data.emailId}/archiveContent`,{responseType:"blob"}).pipe(Object(mt.a)(t=>{const e=document.createElement("a");let i,n,a,s;e.href=window.URL.createObjectURL(t),i=new Date,n=i.getDate(),a=i.getMonth()+1,s=i.getFullYear(),n<10&&(n="0"+n),a<10&&(a="0"+a),i=n+"-"+a+"-"+s,e.setAttribute("download","NumericPackage_"+i+".zip"),document.body.appendChild(e),e.click()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}canSendNumericPackage(){return this.privilegeService.getCurrentUserMenus().filter(t=>"manage_numeric_package"===t.id).length>0}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.a),n.Qb(q.b),n.Qb(q.h),n.Qb(_t.a),n.Qb(lc),n.Qb(Dt.a),n.Qb(y.a),n.Qb(Tt.r),n.Qb(Tt.l))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-sent-numeric-package-page"]],viewQuery:function(t,e){var i;1&t&&n.Kc(bA,!0),2&t&&n.yc(i=n.ec())&&(e.recipientsInput=i.first)},features:[n.Cb([lc,Tt.r,Tt.l])],decls:61,vars:53,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],[2,"flex","1"],["mat-icon-button","",3,"title","click"],[1,"fa","fa-times"],[1,"modal-container"],["class","loading",4,"ngIf"],["class","alert-message alert-message-info",3,"innerHTML",4,"ngIf"],[1,"attachLabel"],["matInput","","readonly","",3,"value",4,"ngIf"],["required","",3,"compareWith","ngModel","ngModelChange",4,"ngIf"],["id","recipients-list"],["recipientsList",""],["class","recipients",3,"removable","removed","click",4,"ngFor","ngForOf"],["required","",3,"formControl","matChipInputFor","matAutocomplete","focus"],["recipientsInput",""],[3,"optionSelected"],["autoEmails","matAutocomplete"],["class","m2mRecipientList",3,"value",4,"ngFor","ngForOf"],["matInput","","maxlength","70","required","",3,"readonly","ngModel","ngModelChange"],["mat-icon-button","","matSuffix","",3,"disabled","title","matMenuTriggerFor","click",4,"ngFor","ngForOf"],["emailAttachListMenu","matMenu"],[4,"ngFor","ngForOf"],[4,"ngIf"],["class","attachMsg",4,"ngIf"],[2,"overflow","auto","max-height","300px"],["class","models",4,"ngIf"],["class","row","style","margin: 0;padding-top: 10px;",4,"ngIf"],[2,"padding-top","10px"],["appearance","outline"],["matInput","","matTextareaAutosize","",2,"padding","0",3,"placeholder","ngModel","readonly","ngModelChange"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","color","primary",3,"disabled","click",4,"ngIf"],["mat-raised-button","","color","warn",3,"disabled","click",4,"ngIf"],[1,"loading"],[2,"margin","auto"],[1,"alert-message","alert-message-info",3,"innerHTML"],["matInput","","readonly","",3,"value"],["required","",3,"compareWith","ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"recipients",3,"removable","removed","click"],["matChipRemove","","class","fa fa-times",4,"ngIf"],["matChipRemove","",1,"fa","fa-times"],[1,"m2mRecipientList",3,"value"],["mat-icon-button","","matSuffix","",3,"disabled","title","matMenuTriggerFor","click"],["color","primary"],["mat-menu-item","","style","line-height: normal;","disableRipple","",3,"disabled","click",4,"ngFor","ngForOf"],["mat-menu-item","","disableRipple","",2,"line-height","normal",3,"disabled","click"],[3,"title","click"],[2,"font-size","10px","opacity","0.5"],[1,"attachMsg"],[1,"fas","fa-arrow-up"],["mat-subheader","",1,"attachLabel"],["class","numericPackageAttach",4,"ngIf"],[1,"numericPackageAttach"],["mat-line","",1,"numericPackageAttachItem"],[2,"overflow","hidden","text-overflow","ellipsis"],[1,"badge"],[1,"subInfo"],["mat-icon-button","","color","warn",3,"click",4,"ngIf"],["mat-icon-button","","color","warn",3,"click"],[1,"fa","fa-trash"],["class","numericPackageAttach",4,"ngFor","ngForOf"],[2,"overflow","hidden","text-overflow","ellipsis",3,"title"],[1,"models"],[3,"label","placeholderLabel","datas","formControlSelect","afterSelected",4,"ngIf"],[3,"label","placeholderLabel","datas","formControlSelect","afterSelected"],["templateList",""],[1,"row",2,"margin","0","padding-top","10px"],[1,"col-md-9"],[1,"messageExchangeHistory"],["class","messageExchangeHistoryItem",4,"ngFor","ngForOf"],["class","noAction",4,"ngIf"],[1,"col-md-3","text-center"],["mat-button","","color","primary",2,"width","180px","white-space","initial","line-height","20px","padding","10px",3,"click"],[1,"fas","fa-file-download",2,"font-size","40px"],[1,"messageExchangeHistoryItem"],[1,"messageExchangeHistoryDate"],[1,"noAction"],["mat-raised-button","","color","primary",3,"disabled","click"],["mat-raised-button","","color","warn",3,"disabled","click"]],template:function(t,e){if(1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Wb(2,"span",2),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"button",3),n.dc("click",(function(){return e.closeModal()})),n.ic(6,"translate"),n.Rb(7,"mat-icon",4),n.Vb(),n.Vb(),n.Wb(8,"mat-dialog-content",5),n.Oc(9,fA,2,0,"div",6),n.Oc(10,gA,2,6,"div",7),n.Wb(11,"mat-form-field"),n.Wb(12,"mat-label",8),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Oc(15,vA,1,1,"input",9),n.Oc(16,yA,3,6,"mat-select",10),n.Vb(),n.Wb(17,"mat-form-field"),n.Wb(18,"mat-label",8),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"mat-chip-list",11,12),n.Oc(23,CA,10,8,"mat-chip",13),n.Wb(24,"input",14,15),n.dc("focus",(function(){return e.resetAutocomplete()})),n.Vb(),n.Vb(),n.Wb(26,"mat-autocomplete",16,17),n.dc("optionSelected",(function(t){return e.addRecipient(t.option.value)})),n.Oc(28,OA,8,7,"mat-option",18),n.ic(29,"async"),n.Vb(),n.Vb(),n.Wb(30,"mat-form-field"),n.Wb(31,"mat-label",8),n.Qc(32),n.ic(33,"translate"),n.Vb(),n.Wb(34,"input",19),n.dc("ngModelChange",(function(t){return e.numericPackage.object=t})),n.Vb(),n.Oc(35,DA,2,8,"button",20),n.ic(36,"keyvalue"),n.Wb(37,"mat-menu",null,21),n.Oc(39,kA,2,1,"ng-container",22),n.ic(40,"keyvalue"),n.Vb(),n.Vb(),n.Oc(41,SA,5,4,"mat-form-field",23),n.Oc(42,IA,4,3,"div",24),n.Wb(43,"div",25),n.Oc(44,RA,6,6,"mat-list",23),n.Oc(45,jA,1,0,"mat-divider",23),n.Oc(46,TA,6,6,"mat-list",23),n.Vb(),n.Oc(47,LA,3,2,"div",26),n.Rb(48,"mat-divider"),n.Oc(49,zA,15,8,"div",27),n.Wb(50,"div",28),n.Wb(51,"mat-form-field",29),n.Wb(52,"mat-label",8),n.Qc(53),n.ic(54,"translate"),n.Vb(),n.Wb(55,"textarea",30),n.dc("ngModelChange",(function(t){return e.numericPackage.content=t})),n.ic(56,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Rb(57,"span",31),n.Wb(58,"div",32),n.Oc(59,BA,3,4,"button",33),n.Oc(60,UA,3,4,"button",34),n.Vb(),n.Vb()),2&t){const t=n.zc(22),i=n.zc(27);n.Db(3),n.Sc(" ",e.functions.empty(e.reference)?n.jc(4,33,"lang.sendNumericPackage"):e.reference," "),n.Db(2),n.oc("title",n.jc(6,35,"lang.close")),n.Db(4),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",e.canManageMail()),n.Db(3),n.Rc(n.jc(14,37,"lang.sender")),n.Db(2),n.oc("ngIf",!e.canManageMail()),n.Db(1),n.oc("ngIf",e.canManageMail()),n.Db(3),n.Sc("",n.jc(20,39,"lang.recipient")," *"),n.Db(4),n.oc("ngForOf",e.recipients),n.Db(1),n.oc("formControl",e.recipientsCtrl)("matChipInputFor",t)("matAutocomplete",i),n.Db(4),n.oc("ngForOf",n.jc(29,41,e.filteredEmails)),n.Db(4),n.Rc(n.jc(33,43,"lang.mailSubject")),n.Db(2),n.oc("readonly",!e.canManageMail())("ngModel",e.numericPackage.object),n.Db(1),n.oc("ngForOf",n.jc(36,45,e.numericPackageAttachTool)),n.Db(2),n.Fb("attachListMenu"),n.Db(2),n.oc("ngForOf",n.jc(40,47,e.numericPackageAttachTool)),n.Db(2),n.oc("ngIf",!e.canManageMail()),n.Db(1),n.oc("ngIf",null===e.numericPackage.mainExchangeDoc&&0===e.numericPackageAttach.length&&e.canManageMail()),n.Db(2),n.oc("ngIf",null!==e.numericPackage.mainExchangeDoc),n.Db(1),n.oc("ngIf",e.numericPackageAttach.length>0),n.Db(1),n.oc("ngIf",e.numericPackageAttach.length>0),n.Db(1),n.oc("ngIf",e.canManageMail()),n.Db(2),n.oc("ngIf",!e.canManageMail()),n.Db(4),n.Rc(n.jc(54,49,"lang.note")),n.Db(2),n.oc("placeholder",n.jc(56,51,"lang.addNoteToNumericPackage"))("ngModel",e.numericPackage.content)("readonly",!e.canManageMail()),n.Db(4),n.oc("ngIf",e.canManageMail()&&e.canSendNumericPackage()&&"ERROR"!==e.numericPackageStatus),n.Db(1),n.oc("ngIf",e.data.emailId&&!e.loading&&"ERROR"===e.numericPackageStatus)}},directives:[q.i,k.b,S.a,q.f,P.t,Y.c,Y.g,ze.d,P.s,X.d,ze.c,Ne.d,X.F,X.u,X.j,Ne.a,J.b,X.p,X.x,ne.e,T.a,J.d,q.c,V.c,ee.a,W.p,ze.a,ze.e,Y.j,ne.d,ne.b,R.a,R.g,R.d,W.l,fr],pipes:[g.d,P.b,P.l,Wt.a,Tt.p,ps],styles:[".loading[_ngcontent-%COMP%]{display:flex;height:100%;position:absolute;z-index:2;width:100%;top:0;left:0;background:#fff}.models[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;grid-gap:20px;padding-top:10px}.activeButton[_ngcontent-%COMP%]{color:#f99830;font-weight:700}.attachLabel[_ngcontent-%COMP%]{color:#135f7f} .attachListMenu{width:auto;max-width:none;min-height:auto}.numericPackageAttachItem[_ngcontent-%COMP%]{font-size:14px;display:grid!important;grid-template-columns:1fr 150px 50px 50px;grid-gap:10px;align-items:center}.numericPackageAttachItem[_ngcontent-%COMP%] .subInfo[_ngcontent-%COMP%]{color:#135f7f;font-size:80%}.m2mRecipientList[_ngcontent-%COMP%]{line-height:normal;font-size:14px}.recipients[_ngcontent-%COMP%]{font-size:14px!important;padding:10px!important;width:100%;min-height:auto;height:auto;border-radius:5px;cursor:pointer}.attachMsg[_ngcontent-%COMP%]{font-size:20px;padding:30px;opacity:.5;font-weight:700;position:relative;text-align:center}.attachMsg[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{position:absolute;top:0;right:40px;transform:rotate(29deg)}.badge[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;font-size:10px!important;color:#fff;font-weight:400;border-radius:.25em;background:#135f7f}.alert-message[_ngcontent-%COMP%]{min-width:100%}.messageExchangeHistory[_ngcontent-%COMP%]{max-height:300px;overflow:auto}.messageExchangeHistoryItem[_ngcontent-%COMP%]{display:grid;grid-template-columns:130px 1fr;grid-gap:10px;align-items:center;padding:10px}.messageExchangeHistoryItem[_ngcontent-%COMP%]:nth-child(odd){background:rgba(19,95,127,.1)}.messageExchangeHistoryDate[_ngcontent-%COMP%]{color:#135f7f}.noAction[_ngcontent-%COMP%]{padding:10px;opacity:.5;font-style:italic}"]}),t})();function HA(t,e){1&t&&(n.Ub(0),n.Wb(1,"div",2),n.Rb(2,"mat-spinner"),n.Vb(),n.Tb())}function GA(t,e){if(1&t&&(n.Wb(0,"mat-button-toggle",13),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(3);n.oc("checked",i.currentFilter===t.id)("value",t.id),n.Db(1),n.Sc("",t.label," ")}}function XA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-button-toggle-group",12),n.dc("change",(function(e){return n.Dc(t),n.hc(2).filterType(e)})),n.Wb(1,"mat-button-toggle",13),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Oc(4,GA,2,3,"mat-button-toggle",14),n.ic(5,"sortBy"),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.oc("checked",""===t.currentFilter)("value",""),n.Db(1),n.Rc(n.jc(3,4,"lang.all")),n.Db(2),n.oc("ngForOf",n.kc(5,6,t.filterTypes,"label"))}}function qA(t,e){if(1&t&&(n.Wb(0,"span",34),n.ic(1,"fullDate"),n.Qc(2),n.ic(3,"translate"),n.ic(4,"translate"),n.Wb(5,"b"),n.Qc(6),n.ic(7,"timeAgo"),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit;n.oc("title",n.jc(1,3,t.creationDate)),n.Db(2),n.Sc(" ","m2m_ARCHIVETRANSFER"==t.type?n.jc(3,5,"lang.sent"):n.jc(4,7,"lang.createdAlt")," : "),n.Db(4),n.Rc(n.kc(7,9,t.creationDate,"full"))}}function KA(t,e){if(1&t&&(n.Wb(0,"span",35),n.ic(1,"fullDate"),n.Qc(2),n.ic(3,"translate"),n.Wb(4,"b"),n.Qc(5),n.ic(6,"timeAgo"),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit;n.oc("title",n.jc(1,3,t.sendDate)),n.Db(2),n.Sc(" ","m2m_ARCHIVETRANSFER"==t.type?"Re\xe7u":n.jc(3,5,"lang.sent")," : "),n.Db(3),n.Rc(n.kc(6,7,t.sendDate,"full"))}}function YA(t,e){1&t&&(n.Wb(0,"span",36),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.draft")," "))}function JA(t,e){1&t&&(n.Wb(0,"span",36),n.Qc(1," En attente de r\xe9ception "),n.Vb())}function ZA(t,e){1&t&&(n.Wb(0,"span",37),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.emailSendInProgress")," "))}function tW(t,e){1&t&&(n.Wb(0,"span",38),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.notSent")," "))}function eW(t,e){1&t&&(n.Wb(0,"span",36),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.manualSendingAR")," "))}function iW(t,e){if(1&t&&(n.Wb(0,"span",35),n.ic(1,"fullDate"),n.Qc(2),n.ic(3,"translate"),n.Wb(4,"b"),n.Qc(5),n.ic(6,"timeAgo"),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit;n.oc("title",n.jc(1,3,t.operationDate)),n.Db(2),n.Sc(" ",n.jc(3,5,"lang.delivery")," : "),n.Db(3),n.Rc(n.kc(6,7,t.operationDate,"full"))}}function nW(t,e){1&t&&n.Rb(0,"i",39)}function aW(t,e){1&t&&n.Rb(0,"i",40)}function sW(t,e){1&t&&n.Rb(0,"i",41)}function oW(t,e){if(1&t&&(n.Wb(0,"span",33),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc().$implicit;n.oc("title",t.sender),n.Db(1),n.Tc(" ",n.jc(2,3,"lang.senderShort")," : ",t.sender," ")}}function rW(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",15),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).open(i)})),n.Wb(1,"div",16),n.Oc(2,qA,8,12,"span",17),n.Oc(3,KA,7,10,"span",18),n.Oc(4,YA,3,3,"span",19),n.Oc(5,JA,2,0,"span",19),n.Oc(6,ZA,3,3,"span",20),n.Oc(7,tW,3,3,"span",21),n.Oc(8,eW,3,3,"span",19),n.Oc(9,iW,7,10,"span",18),n.Vb(),n.Wb(10,"div",22),n.Wb(11,"div",23),n.Wb(12,"span",24),n.Wb(13,"span",25),n.ic(14,"translate"),n.Qc(15),n.ic(16,"translate"),n.Vb(),n.Wb(17,"div",26),n.Oc(18,nW,1,0,"i",27),n.Oc(19,aW,1,0,"i",28),n.Oc(20,sW,1,0,"i",29),n.Vb(),n.Vb(),n.Vb(),n.Rb(21,"div",30),n.Wb(22,"div",31),n.Oc(23,oW,3,5,"span",32),n.Wb(24,"span",33),n.Qc(25),n.ic(26,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.Ib("canManage",t.canManage),n.Db(2),n.oc("ngIf",null===t.sendDate&&"SENT"===t.status&&"m2m_ARCHIVETRANSFER"==t.type||"m2m_ARCHIVETRANSFER"!=t.type),n.Db(1),n.oc("ngIf",null!==t.sendDate),n.Db(1),n.oc("ngIf","DRAFT"===t.status),n.Db(1),n.oc("ngIf",null===t.sendDate&&"SENT"===t.status),n.Db(1),n.oc("ngIf","WAITING"===t.status),n.Db(1),n.oc("ngIf","ERROR"===t.status),n.Db(1),n.oc("ngIf","ERROR"!==t.status&&"acknowledgementReceipt"==t.type&&i.functions.empty(t.sendDate)),n.Db(1),n.oc("ngIf",!i.functions.empty(t.operationDate)),n.Db(4),n.Lc("background",t.typeColor),n.oc("title",n.jc(14,22,"lang."+t.type)),n.Db(2),n.Rc(n.jc(16,24,"lang."+t.type)),n.Db(3),n.oc("ngIf",t.hasMainDoc),n.Db(1),n.oc("ngIf",t.hasAttach),n.Db(1),n.oc("ngIf",t.hasNote),n.Db(1),n.oc("innerHTML",t.desc,n.Ec),n.Db(2),n.oc("ngIf",t.sender),n.Db(1),n.oc("title",t.recipients),n.Db(1),n.Tc(" ",n.jc(26,26,"lang.recipientShort")," : ",t.recipients," ")}}function cW(t,e){1&t&&n.Rb(0,"mat-row")}function lW(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",42),n.dc("click",(function(){return n.Dc(t),n.hc(2).openPromptMail()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",43),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.sendElement"))}function dW(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",42),n.dc("click",(function(){return n.Dc(t),n.hc(2).openPromptNumericPackage()})),n.ic(1,"translate"),n.Wb(2,"mat-icon",44),n.Rb(3,"i",45),n.Rb(4,"i",46),n.Vb(),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.sendNumericPackage"))}function hW(t,e){if(1&t&&(n.Wb(0,"div",3),n.Wb(1,"div",4),n.Oc(2,XA,6,9,"mat-button-toggle-group",5),n.Vb(),n.Vb(),n.Wb(3,"mat-table",6,7),n.Ub(5,8),n.Oc(6,rW,27,28,"mat-cell",9),n.Tb(),n.Oc(7,cW,1,0,"mat-row",10),n.Vb(),n.Oc(8,lW,3,3,"button",11),n.Oc(9,dW,5,3,"button",11)),2&t){const t=n.hc();n.Db(2),n.oc("ngIf",t.sentResources.length>0),n.Db(1),n.oc("dataSource",t.dataSource),n.Db(4),n.oc("matRowDefColumns",t.displayedColumns),n.Db(1),n.oc("ngIf",t.privilegeService.hasCurrentUserPrivilege("sendmail")),n.Db(1),n.oc("ngIf",t.canSendNumericPackage())}}let uW=(()=>{class t{constructor(t,e,i,a,s,o){this.translate=t,this.http=e,this.notify=i,this.dialog=a,this.functions=s,this.privilegeService=o,this.loading=!0,this.displayedColumns=["creationDate"],this.sentResources=[],this.resultsLength=0,this.currentFilter="",this.filterTypes=[],this.resId=null,this.currentUserId=null,this.currentGroupId=null,this.currentBasketId=null,this.reloadBadgeSentResource=new n.o}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.loadList()}))}loadList(){return Object(r.a)(this,void 0,void 0,(function*(){this.sentResources=[],this.loading=!0,yield this.initAcknowledgementReceiptList(),yield this.initEmailList(),yield this.initMessageExchange(),yield this.initShippings(),this.reloadBadgeSentResource.emit(""+this.sentResources.length),this.initFilter(),setTimeout(()=>{this.dataSource=new vt.p(this.sentResources),this.dataSource.sort=this.sort},0),this.loading=!1}))}initAcknowledgementReceiptList(){return new Promise(t=>{this.http.get(`../rest/resources/${this.resId}/acknowledgementReceipts?type=ar`).pipe(Object(l.a)(t=>t.map(t=>{let e,i;return e=this.functions.empty(t.contact.email)?this.translate.instant("lang.withoutEmail"):t.contact.email,i=this.functions.empty(t.contact.firstname)&&this.functions.empty(t.contact.lastname)?this.functions.empty(t.contact.company)?this.translate.instant("lang.contactDeleted"):t.contact.company:t.contact.firstname+" "+t.contact.lastname,{id:t.id,sender:!1,recipients:"html"===t.format?e:i,creationDate:t.creationDate,sendDate:t.sendDate,type:"acknowledgementReceipt",typeColor:"#7d5ba6",desc:this.translate.instant("html"===t.format?"lang.ARelectronic":"lang.ARPaper"),status:"html"===t.format&&null===t.sendDate?"ERROR":"SENT",hasAttach:!1,hasNote:!1,hasMainDoc:!1,canManage:!0}})),Object(mt.a)(e=>{this.sentResources=this.sentResources.concat(e),t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}initEmailList(){return new Promise(t=>{this.http.get(`../rest/resources/${this.resId}/emails?type=email`).pipe(Object(l.a)(t=>(t.emails=t.emails.map(t=>({id:t.id,sender:t.sender.email,recipients:t.recipients,creationDate:t.creation_date,sendDate:t.send_date,type:"email",typeColor:"#5bc0de",desc:this.functions.empty(t.object)?`<i>${this.translate.instant("lang.emptySubject")}<i>`:t.object,status:t.status,hasAttach:!this.functions.empty(t.document.attachments),hasNote:!this.functions.empty(t.document.notes),hasMainDoc:t.document.isLinked,canManage:!0})),t.emails)),Object(mt.a)(e=>{this.sentResources=this.sentResources.concat(e),t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}initMessageExchange(){return new Promise(t=>{this.http.get(`../rest/resources/${this.resId}/messageExchanges`).pipe(Object(l.a)(t=>(t.messageExchanges=t.messageExchanges.map(t=>({id:t.messageId,sender:t.sender,recipients:t.recipient,creationDate:t.creationDate,sendDate:t.receptionDate,operationDate:t.operationDate,type:"m2m_ARCHIVETRANSFER",typeColor:"#F99830",desc:this.translate.instant("lang.m2m_ARCHIVETRANSFER"),status:t.status.toUpperCase(),hasAttach:!1,hasNote:!1,hasMainDoc:!1,canManage:!0})),t.messageExchanges)),Object(mt.a)(e=>{this.sentResources=this.sentResources.concat(e),t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}initShippings(){return new Promise(t=>{this.http.get(`../rest/resources/${this.resId}/shippings`).pipe(Object(l.a)(t=>t.map(t=>({id:t.id,sender:t.userLabel,recipients:t.recipients.map(t=>t.contactLabel),creationDate:t.creationDate,sendDate:t.creationDate,type:"shipping",typeColor:"#9440D5",desc:this.translate.instant("lang.shipping"),status:"SENT",hasAttach:"attachment"===t.creationDate,hasNote:!1,hasMainDoc:"resource"===t.creationDate,canManage:!1}))),Object(mt.a)(e=>{this.sentResources=this.sentResources.concat(e),t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}initFilter(){this.sentResources.forEach(t=>{0===this.filterTypes.filter(e=>e.id===t.type).length&&this.filterTypes.push({id:t.type,label:this.translate.instant("lang."+t.type)})})}filterType(t){this.currentFilter=t.value,this.dataSource.filter=t.value}open(t={id:null,type:null}){"m2m_ARCHIVETRANSFER"===t.type?this.openPromptNumericPackage(t):this.openPromptMail(t)}openPromptMail(t={id:null,type:null}){let e=this.translate.instant("lang.sendElement");null!==t.id&&(e=this.translate.instant("lang."+t.type)),(t.canManage||null===t.id)&&this.dialog.open(pA,{panelClass:"maarch-modal",width:"60vw",disableClose:!0,data:{title:e,resId:this.resId,emailId:t.id,emailType:t.type,currentUserId:this.currentUserId,currentGroupId:this.currentGroupId,currentBasketId:this.currentBasketId}}).afterClosed().pipe(Object(d.a)(t=>"success"===t.state||"success"===t),Object(mt.a)(()=>{this.refreshEmailList(),setTimeout(()=>{this.refreshWaitingElements()},5e3)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}openPromptNumericPackage(t={id:null,type:null}){let e=this.translate.instant("lang.sendElement");null!==t.id&&(e=this.translate.instant("lang."+t.type)),(t.canManage||null===t.id)&&this.dialog.open($A,{panelClass:"maarch-modal",width:"60vw",disableClose:!0,data:{title:e,resId:this.resId,emailId:t.id}}).afterClosed().pipe(Object(d.a)(t=>"success"===t.state||"success"===t),Object(mt.a)(()=>{this.loadList()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}refreshWaitingElements(){this.sentResources.forEach(t=>{"WAITING"==t.status&&"email"==t.type&&this.http.get("../rest/emails/"+t.id).pipe(Object(mt.a)(e=>{"SENT"!=e.status&&"ERROR"!=e.status||("SENT"==e.status?this.notify.success(this.translate.instant("lang.emailSent")):this.notify.error(this.translate.instant("lang.emailCannotSent")),this.sentResources.forEach((i,n)=>{i.id==t.id&&"email"==i.type&&(this.sentResources[n].status=e.status,this.sentResources[n].sendDate=e.sendDate)}))})).subscribe()}),setTimeout(()=>{this.dataSource=new vt.p(this.sentResources),this.dataSource.sort=this.sort},0)}refreshEmailList(){return new Promise(t=>{this.http.get(`../rest/resources/${this.resId}/emails?type=email`).pipe(Object(l.a)(t=>(t.emails=t.emails.map(t=>({id:t.id,sender:t.sender.email,recipients:t.recipients,creationDate:t.creation_date,sendDate:t.send_date,type:"email",typeColor:"#5bc0de",desc:this.functions.empty(t.object)?`<i>${this.translate.instant("lang.emptySubject")}<i>`:t.object,status:t.status,hasAttach:!this.functions.empty(t.document.attachments),hasNote:!this.functions.empty(t.document.notes),hasMainDoc:t.document.isLinked,canManage:!0})),t.emails)),Object(mt.a)(e=>{const i=this.sentResources.filter(t=>"email"!==t.type);this.sentResources=i.concat(e),setTimeout(()=>{this.dataSource=new vt.p(this.sentResources),this.dataSource.sort=this.sort},0),this.initFilter(),t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}canSendNumericPackage(){return this.privilegeService.getCurrentUserMenus().filter(t=>"manage_numeric_package"===t.id).length>0}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(_t.a),n.Qb(Dt.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-sent-resource-list"]],viewQuery:function(t,e){var i;1&t&&n.Xc(Fe.a,!0),2&t&&n.yc(i=n.ec())&&(e.sort=i.first)},inputs:{resId:"resId",currentUserId:"currentUserId",currentGroupId:"currentGroupId",currentBasketId:"currentBasketId"},outputs:{reloadBadgeSentResource:"reloadBadgeSentResource"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["elseLoading",""],[1,"loading"],[1,"row",2,"margin","0px"],[1,"col-md-12",2,"padding-bottom","10px"],["class","filterTypes",3,"change",4,"ngIf"],["matSort","","matSortActive","creationDate","matSortDirection","desc",3,"dataSource"],["table",""],["matColumnDef","creationDate"],["class","dataLine","style","flex: 1;padding: 0px;flex-direction: column;",3,"canManage","click",4,"matCellDef"],[4,"matRowDef","matRowDefColumns"],["mat-fab","","class","addSentResource","color","primary",3,"title","click",4,"ngIf"],[1,"filterTypes",3,"change"],[3,"checked","value"],[3,"checked","value",4,"ngFor","ngForOf"],[1,"dataLine",2,"flex","1","padding","0px","flex-direction","column",3,"click"],[1,"subinfo"],["style","flex:1",3,"title",4,"ngIf"],["style","flex:1;color:green",3,"title",4,"ngIf"],["style","flex:1;color:orange",4,"ngIf"],["style","flex:1;color:orange;font-weight: bold;",4,"ngIf"],["style","flex:1;color:red;font-weight: bold;",4,"ngIf"],[2,"display","grid","grid-template-columns","100px 1fr 170px","width","100%","grid-gap","10px","align-items","center","padding","10px"],[1,"dateType"],[1,"type"],[1,"badge",3,"title"],[1,"attach"],["class","fas fa-file","title","Document attach\xe9",4,"ngIf"],["class","fas fa-paperclip","title","Pi\xe8ce(s) jointe(s) attach\xe9e(s)",4,"ngIf"],["class","fas fa-pen-square","title","Note(s) attach\xe9e(s)",4,"ngIf"],[1,"desc",3,"innerHTML"],[1,"contact"],["style","white-space: pre;overflow: hidden;text-overflow: ellipsis;",3,"title",4,"ngIf"],[2,"white-space","pre","overflow","hidden","text-overflow","ellipsis",3,"title"],[2,"flex","1",3,"title"],[2,"flex","1","color","green",3,"title"],[2,"flex","1","color","orange"],[2,"flex","1","color","orange","font-weight","bold"],[2,"flex","1","color","red","font-weight","bold"],["title","Document attach\xe9",1,"fas","fa-file"],["title","Pi\xe8ce(s) jointe(s) attach\xe9e(s)",1,"fas","fa-paperclip"],["title","Note(s) attach\xe9e(s)",1,"fas","fa-pen-square"],["mat-fab","","color","primary",1,"addSentResource",3,"title","click"],[1,"fa","fa-plus",2,"height","auto","width","auto"],[2,"height","auto","width","auto","font-size","20px"],[1,"fas","fa-envelope-open-text",2,"left","-5px","position","relative"],[1,"fas","fa-wifi",2,"position","absolute","font-size","10px","transform","rotate(35deg)","margin-left","-3px","margin-top","-3px"]],template:function(t,e){if(1&t&&(n.Oc(0,HA,3,0,"ng-container",0),n.Oc(1,hW,10,5,"ng-template",null,1,n.Pc)),2&t){const t=n.zc(2);n.oc("ngIf",e.loading)("ngIfElse",t)}},directives:[P.t,V.c,vt.o,Fe.a,vt.c,vt.b,vt.n,og.b,og.a,P.s,vt.a,vt.m,k.b,S.a],pipes:[g.d,Wt.a,uo,ps],styles:[".dateType[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;text-align:center}.dateType[_ngcontent-%COMP%], .dateType[_ngcontent-%COMP%] .type[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{width:100px;font-size:10px!important}.dateType[_ngcontent-%COMP%] .type[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;color:#fff;font-weight:400;border-radius:.25em}.dateType[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{opacity:.5}.desc[_ngcontent-%COMP%]{font-size:13px;flex:1;display:flex;flex-direction:column}.error[_ngcontent-%COMP%]{color:red}.success[_ngcontent-%COMP%]{color:green}.contact[_ngcontent-%COMP%]{font-size:10px;flex-direction:column;display:flex}.filterTypes[_ngcontent-%COMP%]{overflow:auto;overflow-y:hidden;width:auto;max-width:100%;margin-left:10px}.filterTypes[_ngcontent-%COMP%] .mat-button-toggle-checked{background:#f99830;color:#fff;font-weight:700;height:25px;font-size:10px}.filterTypes[_ngcontent-%COMP%] .mat-button-toggle-checked .mat-button-toggle-label-content{line-height:0}.filterTypes[_ngcontent-%COMP%] .mat-button-toggle-checked .mat-button-toggle-button{height:100%}.filterTypes[_ngcontent-%COMP%] [_ngcontent-%COMP%]:not( .mat-button-toggle-checked) .mat-button-toggle-button{color:#135f7f;font-weight:700;height:25px;font-size:10px}.filterTypes[_ngcontent-%COMP%] [_ngcontent-%COMP%]:not( .mat-button-toggle-checked) .mat-button-toggle-button .mat-button-toggle-label-content{line-height:0}.subinfo[_ngcontent-%COMP%]{padding:5px;display:flex;font-size:10px;width:100%}.canManage[_ngcontent-%COMP%]{cursor:pointer;transition:all .5s}.canManage[_ngcontent-%COMP%]:hover{background:rgba(19,95,127,.1);transition:all .5s}.attach[_ngcontent-%COMP%]{font-size:13px;display:flex;padding:5px;color:#135f7f}.attach[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{flex:1;cursor:help}.addSentResource[_ngcontent-%COMP%]{position:-webkit-sticky;position:sticky;z-index:2;bottom:10px;margin-left:10px}.loading[_ngcontent-%COMP%]{display:flex;width:100%;align-items:center;justify-content:center}"]}),t})(),pW=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.data=i,this.dialogRef=n,this.notify=a}ngOnInit(){}onSubmit(){this.http.post("../rest/indexingModels",this.data.indexingModel).pipe(Object(mt.a)(t=>{this.data.indexingModel.id=t.id,this.notify.success(this.translate.instant("lang.indexingModelAdded")),this.dialogRef.close(this.data)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.a),n.Qb(q.h),n.Qb(D.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:23,vars:22,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],[3,"ngSubmit"],["submitForm","ngForm"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","30px",3,"innerHTML"],["appearance","outline"],["matInput","","name","label","required","","maxlength","256",3,"placeholder","ngModel","ngModelChange"],["mat-raised-button","","color","primary","type","submit",3,"disabled","click"],["mat-raised-button","","color","default","type","button",3,"click"]],template:function(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-dialog-content"),n.Wb(5,"form",2,3),n.dc("ngSubmit",(function(){return e.onSubmit()})),n.Rb(7,"div",4),n.ic(8,"translate"),n.ic(9,"translate"),n.Wb(10,"mat-form-field",5),n.Wb(11,"mat-label"),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Wb(14,"input",6),n.dc("ngModelChange",(function(t){return e.data.indexingModel.label=t})),n.ic(15,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(16,"mat-dialog-actions"),n.Wb(17,"button",7),n.dc("click",(function(){return n.Dc(t),n.zc(6).ngSubmit.emit()})),n.Qc(18),n.ic(19,"translate"),n.Vb(),n.Wb(20,"button",8),n.dc("click",(function(){return e.dialogRef.close()})),n.Qc(21),n.ic(22,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(6);n.Db(2),n.Rc(n.jc(3,8,"lang.privateIndexingModelCreation")),n.Db(5),n.oc("innerHTML",n.jc(8,10,"lang.addPrivateIndexingModelMsg")+"<b> "+e.data.masterIndexingModel.label+"</b> "+n.jc(9,12,"lang.addPrivateIndexingModelMsg2"),n.Ec),n.Db(5),n.Rc(n.jc(13,14,"lang.label")),n.Db(2),n.pc("placeholder",n.jc(15,16,"lang.label")),n.oc("ngModel",e.data.indexingModel.label),n.Db(3),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(19,18,"lang.validate")),n.Db(3),n.Rc(n.jc(22,20,"lang.cancel"))}},directives:[q.i,q.f,X.K,X.v,X.w,Y.c,Y.g,J.b,X.d,X.F,X.p,X.u,X.x,q.c,k.b],pipes:[g.d],styles:["mat-icon[_ngcontent-%COMP%]{height:auto!important}"]}),t})();function bW(t,e){if(1&t&&(n.Wb(0,"div",3),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc(" Mod\xe8le utilis\xe9 : ",t.currentIndexingModel.label," ",t.currentIndexingModel.default?"("+t.translate.instant("lang.default")+")":""," ")}}function fW(t,e){if(1&t&&(n.Wb(0,"div",19),n.Qc(1),n.ic(2,"shorten"),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(1),n.Tc(" ",n.lc(2,2,t.label,45,"...")," ",t.default?"("+e.translate.instant("lang.default")+")":""," ")}}function mW(t,e){if(1&t&&(n.Wb(0,"div",19),n.Qc(1),n.ic(2,"shorten"),n.Wb(3,"span",20),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Sc(" ",n.lc(2,2,t.label,45,"..."),"\xa0"),n.Db(3),n.Rc(n.jc(5,6,"lang.private"))}}function gW(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",21),n.dc("click",(function(e){n.Dc(t);const i=n.hc(),a=i.$implicit,s=i.index,o=n.hc(2);return e.stopPropagation(),o.deletePrivateIndexingModel(a.id,s)})),n.Rb(1,"mat-icon",22),n.Vb()}if(2&t){const t=n.hc(3);n.oc("title",t.translate.instant("lang.delete"))}}function vW(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"button",16),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).selectIndexingModel(i)})),n.Oc(2,fW,3,6,"div",17),n.Oc(3,mW,6,8,"div",17),n.Oc(4,gW,2,1,"button",18),n.Vb(),n.Tb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.Db(1),n.Ib("listModels-menu-selected",t.id===i.currentIndexingModel.id)("private",t.private),n.oc("title",t.label),n.Db(1),n.oc("ngIf",!t.private),n.Db(1),n.oc("ngIf",t.private),n.Db(1),n.oc("ngIf",t.id!==i.currentIndexingModel.id&&t.private)}}function _W(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",4),n.Rb(1,"mat-icon",5),n.Wb(2,"span",6),n.Qc(3),n.Vb(),n.Rb(4,"i",7),n.Vb(),n.Wb(5,"mat-menu",null,8),n.Wb(7,"div",9),n.Wb(8,"span"),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Wb(11,"mat-form-field",10),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.Wb(12,"input",11,12),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("keydown",(function(e){return n.Dc(t),e.stopPropagation()})),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Oc(15,vW,5,8,"ng-container",13),n.ic(16,"filterList"),n.Vb(),n.Wb(17,"button",14),n.dc("click",(function(){return n.Dc(t),n.hc().savePrivateIndexingModel()})),n.Rb(18,"mat-icon",15),n.Vb()}if(2&t){const t=n.zc(6),e=n.zc(13),i=n.hc();n.oc("matMenuTriggerFor",t),n.Db(2),n.oc("title",i.currentIndexingModel.label),n.Db(1),n.Tc(" ",i.currentIndexingModel.label," ",i.currentIndexingModel.default?"("+i.translate.instant("lang.default")+")":""," "),n.Db(2),n.Fb("menuForm listModels-menu"),n.Db(4),n.Sc(" ",n.jc(10,10,"lang.indexingModel")," "),n.Db(3),n.pc("placeholder",n.jc(14,12,"lang.filterBy")),n.Db(3),n.oc("ngForOf",n.lc(16,14,i.indexingModels,e.value,"label")),n.Db(2),n.oc("title",i.translate.instant("lang.createPrivateIndexingModel"))}}let yW=(()=>{class t{constructor(t,e,i,a,s,o){this.translate=t,this.http=e,this.headerService=i,this.notify=a,this.sortPipe=s,this.dialog=o,this.loading=!0,this.defaultIndexingModelId=null,this.indexingModels=[],this.adminMode=!1,this.afterListModelsLoaded=new n.o,this.afterSelectedListModel=new n.o,this.currentIndexingModel={}}ngOnInit(){this.getIndexingModelList()}getIndexingModelList(){this.http.get("../rest/indexingModels").pipe(Object(mt.a)(t=>{this.indexingModels=t.indexingModels,this.indexingModels.length>0&&(this.currentIndexingModel=null===this.defaultIndexingModelId?this.indexingModels.filter(t=>!0===t.default)[0]:this.indexingModels.filter(t=>t.id===this.defaultIndexingModelId)[0],void 0===this.currentIndexingModel&&(this.currentIndexingModel=this.indexingModels[0],this.notify.error(this.translate.instant("lang.noDefaultIndexingModel"))),this.loadIndexingModelsList())}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}loadIndexingModelsList(){const t=this.sortPipe.transform(this.indexingModels.filter(t=>null===t.master),"label"),e=this.sortPipe.transform(this.indexingModels.filter(t=>null!==t.master),"label");this.indexingModels=[],t.forEach(t=>{this.indexingModels.push(t),e.forEach(e=>{e.master===t.id&&this.indexingModels.push(e)})}),this.afterListModelsLoaded.emit(this.currentIndexingModel)}resetIndexingModel(){this.currentIndexingModel=this.indexingModels.filter(t=>!0===t.default)[0],this.afterSelectedListModel.emit(this.currentIndexingModel)}selectIndexingModel(t){this.currentIndexingModel=t,this.afterSelectedListModel.emit(t)}getCurrentIndexingModel(){return this.currentIndexingModel}getIndexingModels(){return this.indexingModels}savePrivateIndexingModel(){const t=JSON.parse(JSON.stringify(this.indexingForm.getDatas()));t.forEach((e,i)=>{delete t[i].event,delete t[i].label,delete t[i].system,delete t[i].type,delete t[i].values});const e={category:this.indexingForm.getCategory(),label:"",owner:this.headerService.user.id,private:!0,fields:t,master:null!==this.currentIndexingModel.master?this.currentIndexingModel.master:this.currentIndexingModel.id},i=this.indexingModels.filter(t=>t.id===e.master)[0];this.dialog.open(pW,{panelClass:"maarch-modal",autoFocus:!0,disableClose:!0,data:{indexingModel:e,masterIndexingModel:i}}).afterClosed().pipe(Object(d.a)(t=>void 0!==t),Object(mt.a)(t=>{this.indexingModels.push(t.indexingModel),this.currentIndexingModel=this.indexingModels.filter(e=>e.id===t.indexingModel.id)[0],this.loadIndexingModelsList()}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}deletePrivateIndexingModel(t,e){this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete("../rest/indexingModels/"+t)),Object(mt.a)(()=>{this.indexingModels.splice(e,1),this.notify.success(this.translate.instant("lang.indexingModelDeleted"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(y.a),n.Qb(D.a),n.Qb(Wt.a),n.Qb(q.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-select-indexing-model"]],inputs:{defaultIndexingModelId:"defaultIndexingModelId",indexingModels:"indexingModels",indexingForm:"indexingForm",adminMode:"adminMode"},outputs:{afterListModelsLoaded:"afterListModelsLoaded",afterSelectedListModel:"afterSelectedListModel"},features:[n.Cb([Wt.a])],decls:4,vars:2,consts:[[1,"listModels"],["class","primary",4,"ngIf","ngIfElse"],["menuModel",""],[1,"primary"],["mat-button","",1,"button-form-primary","listModels-button",3,"matMenuTriggerFor"],["mattPrefix","",1,"fab","fa-wpforms"],[1,"menu-label",3,"title"],[1,"fa","fa-chevron-down","menu-icon"],["IndexingModelsMenu","matMenu"],[1,"menuTitle"],["floatLabel","never","appearance","outline",1,"smallInput",2,"width","220px !important",3,"click"],["matInput","","id","searchTerm","autocomplete","off",3,"placeholder","click","keydown"],["listFilter",""],[4,"ngFor","ngForOf"],["mat-icon-button","","type","button","color","primary",3,"title","click"],[1,"far","fa-copy"],["mat-menu-item","",2,"display","flex","align-items","center",3,"title","click"],["style","flex:1;",4,"ngIf"],["mat-icon-button","","class","listModels-menu-delete",3,"title","click",4,"ngIf"],[2,"flex","1"],[1,"listModels-menu-badge"],["mat-icon-button","",1,"listModels-menu-delete",3,"title","click"],["color","warn",1,"fa","fa-trash"]],template:function(t,e){if(1&t&&(n.Wb(0,"div",0),n.Oc(1,bW,2,2,"div",1),n.Oc(2,_W,19,18,"ng-template",null,2,n.Pc),n.Vb()),2&t){const t=n.zc(3);n.Db(1),n.oc("ngIf",!e.adminMode)("ngIfElse",t)}},directives:[P.t,k.b,ne.d,S.a,ne.e,Y.c,J.b,P.s,ne.b],pipes:[g.d,rg,Tt.p],styles:[".listModels[_ngcontent-%COMP%]{background:#f9f9f9;display:flex;padding:10px 40px}@media (max-width:768px){.listModels[_ngcontent-%COMP%]{padding-bottom:20px;padding-left:0;padding-right:0}}.listModels[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{font-size:20px;height:auto}.listModels-button[_ngcontent-%COMP%]{margin-right:20px;width:450px!important} .listModels-menu{min-width:450px!important} .listModels-menu .mat-menu-item:hover:hover .listModels-menu-badge{background:#fff!important;color:#135f7f!important} .listModels-menu .mat-menu-item:hover:hover .listModels-menu-delete .mat-icon{color:#fff!important} .listModels-menu-badge{font-size:70%;background:#135f7f;border-radius:20px;color:#fff;padding:2px 5px;font-weight:700} .listModels-menu-delete .mat-icon{margin-right:0} .listModels-menu-selected{color:#fff!important;background:#135f7f} .listModels-menu-selected .listModels-menu-badge{background:#fff!important;color:#135f7f!important}.smallInput[_ngcontent-%COMP%]{padding:10px}.smallInput[_ngcontent-%COMP%] .mat-form-field-wrapper{padding-bottom:0}.menuTitle[_ngcontent-%COMP%]{display:flex;padding-left:20px;align-items:center;color:#135f7f;font-weight:700}.private[_ngcontent-%COMP%]{padding-left:50px}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();const xW=["autoCompleteInput"];function CW(t,e){if(1&t){const t=n.Xb();n.Wb(0,"plugin-select-search",2),n.dc("afterSelected",(function(e){n.Dc(t);const i=n.hc();return i.afterSelected.emit(e),i.setAddress(e)})),n.ic(1,"translate"),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc();n.oc("label",n.jc(1,5,"lang.issuingSite"))("placeholderLabel",n.jc(2,7,"lang.issuingSite"))("formControlSelect",t.control)("showResetOption",t.showResetOption)("datas",t.issuingSiteList)}}function OW(t,e){if(1&t&&(n.Wb(0,"div"),n.Qc(1),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Sc(" ",t.issuingSiteAddress.addressCountry," ")}}function DW(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",3),n.Wb(1,"div"),n.Qc(2),n.Vb(),n.Wb(3,"div"),n.Qc(4),n.Vb(),n.Wb(5,"div"),n.Qc(6),n.Vb(),n.Wb(7,"div"),n.Qc(8),n.Vb(),n.Wb(9,"div"),n.Qc(10),n.Vb(),n.Oc(11,OW,2,1,"div",4),n.Wb(12,"button",5),n.dc("click",(function(){return n.Dc(t),n.hc().goTo()})),n.ic(13,"translate"),n.Rb(14,"mat-icon",6),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(2),n.Sc(" ",t.issuingSiteAddress.siteLabel," "),n.Db(2),n.Sc(" ",t.issuingSiteAddress.addressAdditional1," "),n.Db(2),n.Tc(" ",t.issuingSiteAddress.addressNumber," ",t.issuingSiteAddress.addressStreet," "),n.Db(2),n.Sc(" ",t.issuingSiteAddress.addressAdditional2," "),n.Db(2),n.Tc(" ",t.issuingSiteAddress.addressPostcode," ",t.issuingSiteAddress.addressTown," "),n.Db(1),n.oc("ngIf","RW"===t.registedMailType),n.Db(1),n.oc("title",n.jc(13,9,"lang.openMap"))}}let wW=(()=>{class t{constructor(t,e,i,a){this.http=t,this.notify=e,this.headerService=i,this.functions=a,this.loading=!1,this.issuingSiteList=[],this.issuingSiteAddress=null,this.control=new X.i(""),this.registedMailType=null,this.showResetOption=!1,this.afterSelected=new n.o}ngOnInit(){this.getIssuingSites(),this.functions.empty(this.control.value)||setTimeout(()=>{this.setAddress(this.control.value)},0)}getIssuingSites(){this.loading=!0,this.http.get("../rest/registeredMail/sites").pipe(Object(mt.a)(t=>{this.issuingSiteAddress=null,this.issuingSiteList=this.functions.empty(this.headerService.user.entities)?t.sites.map(t=>Object.assign(Object.assign({},t),{id:t.id,label:`${t.label} (${t.accountNumber})`})):t.sites.filter(t=>t.entities.indexOf(this.headerService.user.entities[0].id)>-1).map(t=>Object.assign(Object.assign({},t),{id:t.id,label:`${t.label} (${t.accountNumber})`}))}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}setAddress(t){null===t?this.issuingSiteAddress=null:this.http.get("../rest/registeredMail/sites/"+t).pipe(Object(mt.a)(t=>{this.issuingSiteAddress=t.site}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}getSiteLabel(t){return this.issuingSiteList.filter(e=>e.id===t)[0].label}goTo(){window.open(`https://www.google.com/maps/search/${this.issuingSiteAddress.addressNumber}+${this.issuingSiteAddress.addressStreet},+${this.issuingSiteAddress.addressPostcode}+${this.issuingSiteAddress.addressTown},+${this.issuingSiteAddress.addressCountry}`,"_blank")}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-issuing-site-input"]],viewQuery:function(t,e){var i;1&t&&n.Kc(xW,!0),2&t&&n.yc(i=n.ec())&&(e.autoCompleteInput=i.first)},inputs:{control:"control",registedMailType:"registedMailType",showResetOption:"showResetOption"},outputs:{afterSelected:"afterSelected"},decls:3,vars:2,consts:[["style","width:100%;",3,"label","placeholderLabel","formControlSelect","showResetOption","datas","afterSelected",4,"ngIf"],["color","primary",4,"ngIf"],[2,"width","100%",3,"label","placeholderLabel","formControlSelect","showResetOption","datas","afterSelected"],["color","primary"],[4,"ngIf"],["mat-icon-button","",1,"map-icon",3,"title","click"],[1,"fa","fas","fa-map-marked-alt"]],template:function(t,e){1&t&&(n.Wb(0,"form"),n.Oc(1,CW,3,9,"plugin-select-search",0),n.Oc(2,DW,15,11,"mat-card",1),n.Vb()),2&t&&(n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("ngIf",null!==e.issuingSiteAddress))},directives:[X.K,X.v,X.w,P.t,fr,K.a,k.b,S.a],pipes:[g.d],styles:[".address-icon[_ngcontent-%COMP%]{right:10px;top:10px}.address-icon[_ngcontent-%COMP%], .map-icon[_ngcontent-%COMP%]{position:absolute;font-size:14px}.map-icon[_ngcontent-%COMP%]{cursor:pointer;z-index:2;right:0;bottom:0}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();function MW(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-contact-autocomplete",4),n.dc("afterSelected",(function(e){return n.Dc(t),n.hc().getContact(e)})),n.Vb()}2&t&&n.oc("exclusion","?noUsers=true&noEntities=true&noContactsGroups=true")("inputMode",!0)}function kW(t,e){if(1&t){const t=n.Xb();n.Wb(0,"a",5),n.dc("click",(function(){n.Dc(t);const e=n.hc();return e.manualAddress=!e.manualAddress})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.switchManualAddress")))}function SW(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",38),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).addressBANCurrentDepartment=i})),n.Qc(1),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.Rc(t)}}function IW(t,e){if(1&t&&(n.Wb(0,"mat-option",40),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t)("title",t.address),n.Db(1),n.Sc(" ",t.address," ")}}function PW(t,e){if(1&t&&(n.Ub(0),n.Oc(1,IW,2,3,"mat-option",39),n.ic(2,"async"),n.Tb()),2&t){const t=n.hc(3);n.Db(1),n.oc("ngForOf",n.jc(2,1,t.addressBANFilteredResult))}}function VW(t,e){if(1&t&&n.Rb(0,"mat-option",41),2&t){const t=n.hc(3);n.oc("innerHTML",t.addressBANInfo,n.Ec)}}function RW(t,e){1&t&&(n.Wb(0,"mat-option",42),n.Rb(1,"mat-spinner",43),n.Vb())}function jW(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field",26),n.Wb(1,"button",27),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.ic(2,"translate"),n.Qc(3),n.Rb(4,"i",28),n.Vb(),n.Wb(5,"mat-menu",null,29),n.Oc(7,SW,2,1,"button",30),n.Vb(),n.Rb(8,"mat-icon",31),n.Wb(9,"input",32,23),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("focus",(function(){return n.Dc(t),n.hc(2).resetAutocompleteAddressBan()})),n.ic(11,"translate"),n.Vb(),n.Wb(12,"mat-autocomplete",33,34),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc(2).selectAddressBan(e)})),n.Oc(14,PW,3,3,"ng-container",35),n.Oc(15,VW,1,1,"mat-option",36),n.Oc(16,RW,2,0,"mat-option",37),n.Vb(),n.Vb()}if(2&t){const t=n.zc(6),e=n.zc(13),i=n.hc(2);n.Db(1),n.oc("matMenuTriggerFor",t)("title",n.jc(2,10,"lang.targetDepartment")),n.Db(2),n.Sc(" ",i.addressBANCurrentDepartment,"\xa0"),n.Db(4),n.oc("ngForOf",i.departmentList),n.Db(2),n.oc("placeholder",n.jc(11,12,"lang.searchAddressBan"))("formControl",i.addressBANControl)("matAutocomplete",e),n.Db(5),n.oc("ngIf",i.addressBANResult.length>0&&!i.addressBANLoading),n.Db(1),n.oc("ngIf",0===i.addressBANResult.length&&!i.addressBANLoading),n.Db(1),n.oc("ngIf",i.addressBANLoading)}}function AW(t,e){if(1&t&&(n.Wb(0,"mat-option",44),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.label),n.Db(1),n.Sc(" ",t.label," ")}}function WW(t,e){if(1&t&&(n.Wb(0,"mat-option",44),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}function TW(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",6),n.Oc(1,jW,17,14,"mat-form-field",7),n.Wb(2,"button",8),n.dc("click",(function(){n.Dc(t);const e=n.hc();return e.manualAddress=!e.manualAddress})),n.ic(3,"translate"),n.Rb(4,"mat-icon",9),n.Vb(),n.Wb(5,"mat-form-field",10),n.Wb(6,"mat-label"),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Wb(9,"input",11),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().control.value.company=e}))("ngModelChange",(function(e){return n.Dc(t),n.hc().toUpperCase("company",e)})),n.Vb(),n.Vb(),n.Wb(10,"mat-form-field",10),n.Wb(11,"mat-label"),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Wb(14,"mat-select",12),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().control.value.civility=e})),n.Oc(15,AW,2,2,"mat-option",13),n.ic(16,"sortBy"),n.Vb(),n.Vb(),n.Wb(17,"mat-form-field",10),n.Wb(18,"mat-label"),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"input",14),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().control.value.firstname=e}))("ngModelChange",(function(e){return n.Dc(t),n.hc().toUpperCase("firstname",e)})),n.Vb(),n.Vb(),n.Wb(22,"mat-form-field",10),n.Wb(23,"mat-label"),n.Qc(24),n.ic(25,"translate"),n.Vb(),n.Wb(26,"input",15),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().control.value.lastname=e}))("ngModelChange",(function(e){return n.Dc(t),n.hc().toUpperCase("lastname",e)})),n.Vb(),n.Vb(),n.Wb(27,"mat-form-field",10),n.Wb(28,"mat-label"),n.Qc(29),n.ic(30,"translate"),n.Vb(),n.Wb(31,"input",16),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().control.value.addressAdditional1=e}))("ngModelChange",(function(e){return n.Dc(t),n.hc().toUpperCase("addressAdditional1",e)})),n.Vb(),n.Vb(),n.Wb(32,"mat-form-field",10),n.Wb(33,"mat-label"),n.Qc(34),n.ic(35,"translate"),n.Vb(),n.Wb(36,"input",17),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().control.value.addressNumber=e}))("ngModelChange",(function(e){return n.Dc(t),n.hc().toUpperCase("addressNumber",e)})),n.Vb(),n.Vb(),n.Wb(37,"mat-form-field",10),n.Wb(38,"mat-label"),n.Qc(39),n.ic(40,"translate"),n.Vb(),n.Wb(41,"input",18),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().control.value.addressStreet=e}))("ngModelChange",(function(e){return n.Dc(t),n.hc().toUpperCase("addressStreet",e)})),n.Vb(),n.Vb(),n.Wb(42,"mat-form-field",10),n.Wb(43,"mat-label"),n.Qc(44),n.ic(45,"translate"),n.Vb(),n.Wb(46,"input",19),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().control.value.addressAdditional2=e}))("ngModelChange",(function(e){return n.Dc(t),n.hc().toUpperCase("addressAdditional2",e)})),n.Vb(),n.Vb(),n.Wb(47,"mat-form-field",10),n.Wb(48,"mat-label"),n.Qc(49),n.ic(50,"translate"),n.Vb(),n.Wb(51,"input",20),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().control.value.addressPostcode=e}))("ngModelChange",(function(e){return n.Dc(t),n.hc().toUpperCase("addressPostcode",e)})),n.Vb(),n.Vb(),n.Wb(52,"mat-form-field",10),n.Wb(53,"mat-label"),n.Qc(54),n.ic(55,"translate"),n.Vb(),n.Wb(56,"input",21),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().control.value.addressTown=e}))("ngModelChange",(function(e){return n.Dc(t),n.hc().toUpperCase("addressTown",e)})),n.Vb(),n.Vb(),n.Wb(57,"mat-form-field",10),n.Wb(58,"mat-label"),n.Qc(59),n.ic(60,"translate"),n.Vb(),n.Wb(61,"input",22,23),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().control.value.addressCountry=e})),n.Vb(),n.Wb(63,"mat-autocomplete",24,25),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc().control.value.addressCountry=e.option.value})),n.Oc(65,WW,2,2,"mat-option",13),n.ic(66,"async"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(64),e=n.hc();n.Db(1),n.oc("ngIf","DISABLED"!==e.control.status),n.Db(1),n.oc("title",n.jc(3,32,"lang.showAddress")),n.Db(5),n.Rc(n.jc(8,34,"lang.contactsParameters_company")),n.Db(2),n.oc("ngModel",e.control.value.company)("required",e.functions.empty(e.control.value.lastname)),n.Db(3),n.Rc(n.jc(13,36,"lang.contactsParameters_civility")),n.Db(2),n.oc("ngModel",e.control.value.civility),n.Db(1),n.oc("ngForOf",n.kc(16,38,e.civilities,"label")),n.Db(4),n.Rc(n.jc(20,41,"lang.contactsParameters_firstname")),n.Db(2),n.oc("ngModel",e.control.value.firstname)("required",e.functions.empty(e.control.value.company)),n.Db(3),n.Rc(n.jc(25,43,"lang.contactsParameters_lastname")),n.Db(2),n.oc("ngModel",e.control.value.lastname)("required",e.functions.empty(e.control.value.company)),n.Db(3),n.Rc(n.jc(30,45,"lang.contactsParameters_addressAdditional1")),n.Db(2),n.oc("ngModel",e.control.value.addressAdditional1),n.Db(3),n.Rc(n.jc(35,47,"lang.contactsParameters_addressNumber")),n.Db(2),n.oc("ngModel",e.control.value.addressNumber),n.Db(3),n.Rc(n.jc(40,49,"lang.contactsParameters_addressStreet")),n.Db(2),n.oc("ngModel",e.control.value.addressStreet),n.Db(3),n.Rc(n.jc(45,51,"lang.contactsParameters_addressAdditional2")),n.Db(2),n.oc("ngModel",e.control.value.addressAdditional2),n.Db(3),n.Rc(n.jc(50,53,"lang.contactsParameters_addressPostcode")),n.Db(2),n.oc("ngModel",e.control.value.addressPostcode),n.Db(3),n.Rc(n.jc(55,55,"lang.contactsParameters_addressTown")),n.Db(2),n.oc("ngModel",e.control.value.addressTown),n.Db(3),n.Rc(n.jc(60,57,"lang.contactsParameters_addressCountry")),n.Db(2),n.oc("ngModel",e.control.value.addressCountry)("matAutocomplete",t)("formControl",e.countryControl)("required","RW"===e.registeredMailType),n.Db(4),n.oc("ngForOf",n.jc(66,59,e.countriesFilteredResult))}}function EW(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",8),n.dc("click",(function(){n.Dc(t);const e=n.hc(2);return e.manualAddress=!e.manualAddress})),n.ic(1,"translate"),n.Rb(2,"mat-icon",49),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.update"))}function FW(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",45),n.Oc(1,EW,3,3,"button",46),n.Wb(2,"div"),n.Qc(3),n.Vb(),n.Wb(4,"div"),n.Qc(5),n.Vb(),n.Wb(6,"div"),n.Qc(7),n.Vb(),n.Wb(8,"div"),n.Qc(9),n.Vb(),n.Wb(10,"div"),n.Qc(11),n.Vb(),n.Wb(12,"div"),n.Qc(13),n.Vb(),n.Wb(14,"div"),n.Qc(15),n.Vb(),n.Wb(16,"button",47),n.dc("click",(function(){return n.Dc(t),n.hc().goTo()})),n.ic(17,"translate"),n.Rb(18,"mat-icon",48),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(1),n.oc("ngIf","DISABLED"!==t.control.status),n.Db(2),n.Sc(" ",t.control.value.company," "),n.Db(2),n.Uc(" ",t.control.value.civility," ",t.control.value.firstname," ",t.control.value.lastname," "),n.Db(2),n.Sc(" ",t.control.value.addressAdditional1," "),n.Db(2),n.Tc(" ",t.control.value.addressNumber," ",t.control.value.addressStreet," "),n.Db(2),n.Sc(" ",t.control.value.addressAdditional2," "),n.Db(2),n.Tc(" ",t.control.value.addressPostcode," ",t.control.value.addressTown," "),n.Db(2),n.Sc(" ",t.control.value.addressCountry," "),n.Db(1),n.oc("title",n.jc(17,13,"lang.openMap"))}}let LW=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.latinisePipe=n,this.functions=a,this.manualAddress=!1,this.civilities=[],this.addressBANInfo="",this.addressBANMode=!0,this.addressBANControl=new X.i,this.addressBANLoading=!1,this.addressBANResult=[],this.addressBANCurrentDepartment="75",this.departmentList=[],this.countries=[],this.countryControl=new X.i}ngOnInit(){this.getCivilities(),this.getCountries(),this.initAutocompleteCountries(),this.initBanSearch(),this.initAutocompleteAddressBan(),null===this.control.value&&(this.control.setValue({}),this.control.setErrors({required:!0}))}getCivilities(){this.http.get("../rest/civilities").pipe(Object(mt.a)(t=>{Object.keys(t.civilities).forEach(e=>{this.civilities.push({id:e,label:t.civilities[e].label.toUpperCase()})})}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}getCountries(){this.http.get("../rest/registeredMail/countries").pipe(Object(mt.a)(t=>{this.countries=t.countries.map(t=>this.latinisePipe.transform(t.toUpperCase()))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}initAutocompleteCountries(){this.countriesFilteredResult=this.countryControl.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>this._filter(t)))}_filter(t){const e=t.toLowerCase();return this.countries.filter(t=>t.toLowerCase().includes(e))}initBanSearch(){this.http.get("../rest/ban/availableDepartments").pipe(Object(mt.a)(t=>{null!==t.default&&-1!==t.departments.indexOf(t.default.toString())&&(this.addressBANCurrentDepartment=t.default),this.departmentList=t.departments}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}initAutocompleteAddressBan(){this.addressBANInfo=this.translate.instant("lang.autocompleteInfo"),this.addressBANResult=[],this.addressBANControl.valueChanges.pipe(Object(pt.a)(300),Object(d.a)(t=>t.length>2),Object(bt.a)(),Object(mt.a)(()=>this.addressBANLoading=!0),Object(ft.a)(t=>this.http.get("../rest/autocomplete/banAddresses",{params:{address:t,department:this.addressBANCurrentDepartment}})),Object(mt.a)(t=>{this.addressBANInfo=0===t.length?this.translate.instant("lang.noAvailableValue"):"",this.addressBANResult=t,this.addressBANFilteredResult=Object(c.a)(this.addressBANResult),this.addressBANLoading=!1})).subscribe()}resetAutocompleteAddressBan(){this.addressBANResult=[],this.addressBANInfo=this.translate.instant("lang.autocompleteInfo")}selectAddressBan(t){this.control.value.addressNumber=t.option.value.number,this.control.value.addressStreet=t.option.value.afnorName,this.control.value.addressPostcode=t.option.value.postalCode,this.control.value.addressTown=t.option.value.city,this.control.value.addressCountry="FRANCE",this.countryControl.setValue("FRANCE"),this.addressBANControl.setValue(""),this.checkRequiredFields(),this.control.markAsTouched()}getFormatedAdress(){const t={};return Object.keys(this.control.value).forEach(e=>{t[e]=this.control.value[e]}),t}emptyAddress(){let t=!0;return Object.keys(this.control.value).forEach(e=>{this.functions.empty(this.control.value[e])||(t=!1)}),t}toUpperCase(t,e){setTimeout(()=>{const e=this.latinisePipe.transform(this.control.value[t].toUpperCase());this.control.value[t]=e,this.checkRequiredFields()},100)}checkRequiredFields(){this.functions.empty(this.control.value.company)?this.functions.empty(this.control.value.company)&&(this.functions.empty(this.control.value.firstname)||this.functions.empty(this.control.value.lastname)||this.functions.empty(this.control.value.addressNumber)||this.functions.empty(this.control.value.addressStreet)||this.functions.empty(this.control.value.addressPostcode)||this.functions.empty(this.control.value.addressTown)||"RW"===this.registeredMailType&&this.functions.empty(this.control.value.addressCountry)?this.control.setErrors({required:!0}):this.control.setErrors(null)):this.functions.empty(this.control.value.addressNumber)||this.functions.empty(this.control.value.addressStreet)||this.functions.empty(this.control.value.addressPostcode)||this.functions.empty(this.control.value.addressTown)||"RW"===this.registeredMailType&&this.functions.empty(this.control.value.addressCountry)?this.control.setErrors({required:!0}):this.control.setErrors(null)}goTo(){window.open(`https://www.google.com/maps/search/${this.control.value.addressNumber}+${this.control.value.addressStreet},+${this.control.value.addressPostcode}+${this.control.value.addressTown},+${this.control.value.addressCountry}`,"_blank")}getContact(t){this.http.get("../rest/contacts/"+t.id).pipe(Object(mt.a)(t=>{this.control.value.firstname=t.firstname,this.control.value.lastname=t.lastname,this.control.value.addressStreet=t.addressStreet,this.control.value.addressPostcode=t.addressPostcode,this.control.value.addressTown=t.addressTown,this.control.value.addressCountry=t.addressCountry,this.control.value.addressNumber=t.addressNumber,this.control.value.company=t.company,this.control.value.civility=t.civility.label.toUpperCase(),this.control.value.addressAdditional1=t.addressAdditional1,this.control.value.addressAdditional2=t.addressAdditional2,this.countryControl.setValue(t.addressCountry),this.control.markAsTouched()}),Object(m.a)(t=>(this.notify.error(t.error.errors),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(Tt.c),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-registered-mail-recipient-input"]],inputs:{control:"control",registeredMailType:"registeredMailType"},decls:4,vars:4,consts:[["style","width:100%;",3,"exclusion","inputMode","afterSelected",4,"ngIf"],["style","cursor: pointer;",3,"click",4,"ngIf"],["color","primary",4,"ngIf"],["color","primary","style","min-height: 60px",4,"ngIf"],[2,"width","100%",3,"exclusion","inputMode","afterSelected"],[2,"cursor","pointer",3,"click"],["color","primary"],["appearance","outline","class","smallInput",4,"ngIf"],["mat-icon-button","",1,"address-icon",3,"title","click"],[1,"fa","fa-eye"],["floatLabel","always"],["matInput","","name","company",3,"ngModel","required","ngModelChange"],["name","civility",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["matInput","","name","firstname",3,"ngModel","required","ngModelChange"],["matInput","","name","lastname",3,"ngModel","required","ngModelChange"],["matInput","","name","addressAdditional1",3,"ngModel","ngModelChange"],["matInput","","name","addressNumber","required","",3,"ngModel","ngModelChange"],["matInput","","name","addressStreet","required","",3,"ngModel","ngModelChange"],["matInput","","name","addressAdditional2",3,"ngModel","ngModelChange"],["matInput","","name","addressPostcode","required","",3,"ngModel","ngModelChange"],["matInput","","name","addressTown","required","",3,"ngModel","ngModelChange"],["matInput","",3,"ngModel","matAutocomplete","formControl","required","ngModelChange"],["autoCompleteInput",""],["isOpen","true",3,"optionSelected"],["matAutocompleteCountries","matAutocomplete"],["appearance","outline",1,"smallInput"],["mat-button","","matSuffix","",3,"matMenuTriggerFor","title","click"],[1,"fa","fa-chevron-down"],["menuDep","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["color","primary","matPrefix","",1,"fa","fa-search",2,"font-size","15px"],["type","text","matInput","","maxlength","128",3,"placeholder","formControl","matAutocomplete","click","focus"],[3,"optionSelected"],["auto","matAutocomplete"],[4,"ngIf"],["class","autoCompleteInfoResult smallInputInfo","disabled","",3,"innerHTML",4,"ngIf"],["disabled","",4,"ngIf"],["mat-menu-item","",3,"click"],[3,"value","title",4,"ngFor","ngForOf"],[3,"value","title"],["disabled","",1,"autoCompleteInfoResult","smallInputInfo",3,"innerHTML"],["disabled",""],["diameter","20"],[3,"value"],["color","primary",2,"min-height","60px"],["mat-icon-button","","class","address-icon",3,"title","click",4,"ngIf"],["mat-icon-button","",1,"map-icon",3,"title","click"],[1,"fa","fas","fa-map-marked-alt"],[1,"fa","fa-edit"]],template:function(t,e){1&t&&(n.Oc(0,MW,1,2,"app-contact-autocomplete",0),n.Oc(1,kW,3,3,"a",1),n.Oc(2,TW,67,61,"mat-card",2),n.Oc(3,FW,19,15,"mat-card",3)),2&t&&(n.oc("ngIf","DISABLED"!==e.control.status),n.Db(1),n.oc("ngIf",!e.manualAddress&&e.emptyAddress()),n.Db(1),n.oc("ngIf",e.manualAddress),n.Db(1),n.oc("ngIf",!e.manualAddress&&!e.emptyAddress()))},directives:[P.t,Zd,K.a,k.b,S.a,Y.c,Y.g,J.b,X.d,X.u,X.x,X.F,ee.a,P.s,Ne.d,X.j,Ne.a,Y.j,ne.d,ne.e,Y.i,X.p,ne.b,W.p,V.c],pipes:[g.d,Wt.a,P.b],styles:[".smallInput[_ngcontent-%COMP%]{width:230px!important;font-size:11px}.smallInput[_ngcontent-%COMP%] .mat-button[_ngcontent-%COMP%]{width:30px;height:25px;color:#135f7f}.smallInput[_ngcontent-%COMP%] .mat-button[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;line-height:normal;align-items:center}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.address-icon[_ngcontent-%COMP%]{top:0}.address-icon[_ngcontent-%COMP%], .map-icon[_ngcontent-%COMP%]{cursor:pointer;z-index:2;position:absolute;right:0;font-size:14px}.map-icon[_ngcontent-%COMP%]{bottom:0}"]}),t})();const QW=["appDiffusionsList"],NW=["appIssuingSiteInput"],zW=["appRegisteredMailRecipientInput"];function BW(t,e){1&t&&(n.Wb(0,"div",2),n.Rb(1,"mat-spinner",3),n.Vb())}function UW(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",6),n.Wb(1,"button",7),n.dc("click",(function(){return n.Dc(t),n.hc(2).toggleMailTracking()})),n.ic(2,"translate"),n.ic(3,"translate"),n.Qc(4),n.ic(5,"translate"),n.ic(6,"translate"),n.Rb(7,"mat-icon",8),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.oc("title",t.arrFormControl["mail\xadtracking"].value?n.jc(2,5,"lang.untrackThisMail"):n.jc(3,7,"lang.trackThisMail")),n.Db(3),n.Sc(" ",t.arrFormControl["mail\xadtracking"].value?n.jc(5,9,"lang.untrackThisMail"):n.jc(6,11,"lang.trackThisMail")," "),n.Db(3),n.Gb("",t.arrFormControl["mail\xadtracking"].value?"fas":"far"," fa-star")}}function $W(t,e){if(1&t&&(n.Wb(0,"small",16),n.ic(1,"translate"),n.Qc(2),n.ic(3,"titlecase"),n.ic(4,"translate"),n.Vb()),2&t){const t=n.hc(4);n.oc("title",n.jc(1,2,"lang.category_id")),n.Db(2),n.Rc(n.jc(3,4,n.jc(4,6,"lang.indexing_"+t.currentCategory)))}}function HW(t,e){1&t&&(n.Rb(0,"i",30),n.ic(1,"translate")),2&t&&n.oc("title",n.jc(1,1,"lang.move"))}function GW(t,e){if(1&t&&(n.Wb(0,"button",31),n.Rb(1,"mat-icon",32),n.Vb()),2&t){n.hc();const t=n.zc(5);n.oc("matMenuTriggerFor",t)}}function XW(t,e){1&t&&(n.Wb(0,"span"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.mandatoryField")))}function qW(t,e){1&t&&(n.Wb(0,"span"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.optionalField")))}function KW(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",33),n.dc("click",(function(){n.Dc(t);const e=n.hc(3).$implicit;return e.mandatory=!e.mandatory})),n.Oc(1,XW,3,3,"span",1),n.Oc(2,qW,3,3,"span",1),n.Vb()}if(2&t){const t=n.hc(3).$implicit;n.Db(1),n.oc("ngIf",!t.mandatory),n.Db(1),n.oc("ngIf",t.mandatory)}}function YW(t,e){1&t&&n.Rb(0,"mat-divider")}function JW(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",33),n.dc("click",(function(){n.Dc(t);const e=n.hc(3).$implicit;return n.hc(4).enableField(e,!0)})),n.Wb(1,"span"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(2),n.Rc(n.jc(3,1,"lang.enableField")))}function ZW(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",33),n.dc("click",(function(){n.Dc(t);const e=n.hc(3).$implicit;return n.hc(4).enableField(e,!1)})),n.Wb(1,"span"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(2),n.Rc(n.jc(3,1,"lang.disableField")))}function tT(t,e){1&t&&n.Rb(0,"mat-divider")}function eT(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",33),n.dc("click",(function(){n.Dc(t);const e=n.hc(3),i=e.$implicit,a=e.index,s=n.hc(2).$implicit;return n.hc(2).removeItem("indexingModels_"+s,i,a)})),n.Rb(1,"mat-icon",34),n.Wb(2,"span"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(3),n.Rc(n.jc(4,1,"lang.delete")))}function iT(t,e){if(1&t&&(n.Wb(0,"div",25),n.Oc(1,HW,2,3,"i",26),n.Qc(2),n.Oc(3,GW,2,1,"button",27),n.Wb(4,"mat-menu",null,28),n.Oc(6,KW,3,2,"button",29),n.Oc(7,YW,1,0,"mat-divider",1),n.Oc(8,JW,4,3,"button",29),n.Oc(9,ZW,4,3,"button",29),n.Oc(10,tT,1,0,"mat-divider",1),n.Oc(11,eT,5,3,"button",29),n.Vb(),n.Vb()),2&t){const t=n.hc(2).$implicit,e=n.hc(4);n.Db(1),n.oc("ngIf",e.adminMode),n.Db(1),n.Sc("\xa0 ",t.label," "),n.Db(1),n.oc("ngIf",e.adminMode),n.Db(1),n.Fb("parametersFieldsMenu"),n.Db(2),n.oc("ngIf",!t.system),n.Db(1),n.oc("ngIf",!t.system),n.Db(1),n.oc("ngIf",!t.enabled),n.Db(1),n.oc("ngIf",t.enabled),n.Db(1),n.oc("ngIf",!t.system),n.Db(1),n.oc("ngIf",!t.system&&-1===t.identifier.indexOf("registeredMail_")&&("registeredMail"==e.currentCategory&&"departureDate"!=t.identifier||"registeredMail"!=e.currentCategory))}}function nT(t,e){1&t&&(n.Wb(0,"button",38),n.ic(1,"translate"),n.Rb(2,"mat-icon",39),n.Vb()),2&t&&n.oc("title",n.jc(1,1,"lang.bddModeCustomFieldMsg"))}function aT(t,e){if(1&t&&(n.Wb(0,"mat-label"),n.Qc(1),n.Vb()),2&t){const t=n.hc(3).$implicit;n.Db(1),n.Rc(t.label)}}function sT(t,e){if(1&t&&(n.Ub(0),n.Oc(1,nT,3,3,"button",35),n.Wb(2,"mat-form-field",36),n.Oc(3,aT,2,1,"mat-label",1),n.Rb(4,"textarea",37),n.ic(5,"translate"),n.ic(6,"translate"),n.Vb(),n.Tb()),2&t){const t=n.hc(2).$implicit,e=n.hc(4);n.Db(1),n.oc("ngIf",t.SQLMode&&e.adminMode),n.Db(1),n.oc("floatLabel",e.appService.getViewMode()?"":"never"),n.Db(1),n.oc("ngIf",e.appService.getViewMode()),n.Db(1),n.oc("id",t.identifier)("formControl",e.arrFormControl[t.identifier])("placeholder",e.adminMode?n.jc(6,8,"lang.defaultValue"):n.jc(5,6,"lang.typeValue"))}}function oT(t,e){1&t&&(n.Wb(0,"button",38),n.ic(1,"translate"),n.Rb(2,"mat-icon",39),n.Vb()),2&t&&n.oc("title",n.jc(1,1,"lang.bddModeCustomFieldMsg"))}function rT(t,e){if(1&t&&(n.Wb(0,"mat-label"),n.Qc(1),n.Vb()),2&t){const t=n.hc(3).$implicit;n.Db(1),n.Rc(t.label)}}function cT(t,e){if(1&t&&(n.Ub(0),n.Oc(1,oT,3,3,"button",35),n.Wb(2,"mat-form-field",36),n.Oc(3,rT,2,1,"mat-label",1),n.Rb(4,"input",40),n.ic(5,"translate"),n.ic(6,"translate"),n.Vb(),n.Tb()),2&t){const t=n.hc(2).$implicit,e=n.hc(4);n.Db(1),n.oc("ngIf",t.SQLMode&&e.adminMode),n.Db(1),n.oc("floatLabel",e.appService.getViewMode()?"":"never"),n.Db(1),n.oc("ngIf",e.appService.getViewMode()),n.Db(1),n.oc("id",t.identifier)("formControl",e.arrFormControl[t.identifier])("placeholder",e.adminMode?n.jc(6,8,"lang.defaultValue"):n.jc(5,6,"lang.typeValue"))}}function lT(t,e){1&t&&(n.Wb(0,"button",38),n.ic(1,"translate"),n.Rb(2,"mat-icon",39),n.Vb()),2&t&&n.oc("title",n.jc(1,1,"lang.bddModeCustomFieldMsg"))}function dT(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Oc(1,lT,3,3,"button",35),n.Wb(2,"plugin-select-search",41),n.dc("afterSelected",(function(e){n.Dc(t);const i=n.hc(2).$implicit;return n.hc(4).launchEvent(e,i)})),n.ic(3,"translate"),n.ic(4,"translate"),n.Vb(),n.Tb()}if(2&t){const t=n.hc(2).$implicit,e=n.hc(4);n.Db(1),n.oc("ngIf",t.SQLMode&&e.adminMode),n.Db(1),n.oc("id",t.identifier)("showResetOption",e.adminMode||!t.mandatory)("label",t.label)("placeholderLabel",e.adminMode?n.jc(4,9,"lang.defaultValue"):n.jc(3,7,"lang.chooseValue"))("formControlSelect",e.arrFormControl[t.identifier])("datas",t.values)}}function hT(t,e){1&t&&(n.Wb(0,"button",38),n.ic(1,"translate"),n.Rb(2,"mat-icon",39),n.Vb()),2&t&&n.oc("title",n.jc(1,1,"lang.bddModeCustomFieldMsg"))}function uT(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",49),n.dc("click",(function(e){n.Dc(t);const i=n.hc(3).$implicit,a=n.hc(4);return e.stopPropagation(),a.toggleTodayDate(i)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",50),n.Vb()}if(2&t){const t=n.hc(3).$implicit;n.oc("matTooltip",n.jc(1,4,"lang.todayDate")),n.Db(2),n.Fb(t.today?"far fa-bell-slash":"far fa-bell")}}function pT(t,e){if(1&t&&(n.Wb(0,"mat-label"),n.Qc(1),n.Vb()),2&t){const t=n.hc(3).$implicit;n.Db(1),n.Rc(t.label)}}function bT(t,e){if(1&t&&n.Rb(0,"mat-datepicker-toggle",51),2&t){n.hc();const t=n.zc(10);n.oc("for",t)}}function fT(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",52),n.dc("click",(function(e){n.Dc(t);const i=n.hc(3).$implicit,a=n.hc(4);return e.stopPropagation(),a.arrFormControl[i.identifier].reset()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",53),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.eraseValue"))}function mT(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Oc(1,hT,3,3,"button",35),n.Oc(2,uT,3,6,"button",42),n.Wb(3,"mat-form-field",43),n.dc("click",(function(){return n.Dc(t),n.zc(10).open()})),n.Oc(4,pT,2,1,"mat-label",1),n.Wb(5,"input",44),n.dc("dateChange",(function(e){n.Dc(t);const i=n.hc(2).$implicit;return n.hc(4).launchEvent(e,i)})),n.ic(6,"translate"),n.ic(7,"translate"),n.Vb(),n.Oc(8,bT,1,1,"mat-datepicker-toggle",45),n.Rb(9,"mat-datepicker",46,47),n.Oc(11,fT,3,3,"button",48),n.Vb(),n.Tb()}if(2&t){const t=n.zc(10),e=n.hc(2).$implicit,i=n.hc(4);n.Db(1),n.oc("ngIf",e.SQLMode&&i.adminMode),n.Db(1),n.oc("ngIf",i.adminMode&&!e.SQLMode),n.Db(1),n.oc("floatLabel",i.appService.getViewMode()?"":"never"),n.Db(1),n.oc("ngIf",i.appService.getViewMode()),n.Db(1),n.oc("id",e.identifier)("formControl",i.arrFormControl[e.identifier])("matDatepicker",t)("placeholder",i.adminMode?n.jc(7,15,"lang.defaultValue"):n.jc(6,13,"lang.chooseDate"))("min",i.getMinDate(e.startDate))("max",i.getMaxDate(e.endDate)),n.Db(3),n.oc("ngIf",!i.arrFormControl[e.identifier].value),n.Db(1),n.oc("touchUi",i.appService.getViewMode()),n.Db(2),n.oc("ngIf",i.arrFormControl[e.identifier].value&&!i.arrFormControl[e.identifier].disabled)}}function gT(t,e){1&t&&(n.Wb(0,"button",38),n.ic(1,"translate"),n.Rb(2,"mat-icon",39),n.Vb()),2&t&&n.oc("title",n.jc(1,1,"lang.bddModeCustomFieldMsg"))}function vT(t,e){if(1&t&&(n.Wb(0,"mat-label"),n.Qc(1),n.Vb()),2&t){const t=n.hc(3).$implicit;n.Db(1),n.Rc(t.label)}}function _T(t,e){if(1&t&&(n.Wb(0,"mat-radio-button",58),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id)("disabled",t.disabled),n.Db(1),n.Sc(" ",t.label," ")}}function yT(t,e){if(1&t&&(n.Ub(0),n.Oc(1,gT,3,3,"button",35),n.Wb(2,"mat-form-field",54),n.Oc(3,vT,2,1,"mat-label",1),n.Rb(4,"input",55),n.Wb(5,"mat-radio-group",56),n.Oc(6,_T,2,3,"mat-radio-button",57),n.Vb(),n.Vb(),n.Tb()),2&t){const t=n.hc(2).$implicit,e=n.hc(4);n.Db(1),n.oc("ngIf",t.SQLMode&&e.adminMode),n.Db(1),n.oc("floatLabel",e.appService.getViewMode()?"":"never"),n.Db(1),n.oc("ngIf",e.appService.getViewMode()),n.Db(2),n.oc("formControl",e.arrFormControl[t.identifier]),n.Db(1),n.oc("ngForOf",t.values)}}function xT(t,e){1&t&&(n.Wb(0,"button",38),n.ic(1,"translate"),n.Rb(2,"mat-icon",39),n.Vb()),2&t&&n.oc("title",n.jc(1,1,"lang.bddModeCustomFieldMsg"))}function CT(t,e){if(1&t&&(n.Wb(0,"mat-list-option",65),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function OT(t,e){if(1&t&&(n.Wb(0,"mat-chip",66),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(3).$implicit,a=n.hc(4);n.Db(1),n.Sc(" ",a.getCheckboxListLabel(t.value,i.values)," ")}}function DT(t,e){if(1&t&&(n.Ub(0),n.Oc(1,xT,3,3,"button",35),n.Wb(2,"div",59),n.Wb(3,"mat-selection-list",60,61),n.Oc(5,CT,2,2,"mat-list-option",62),n.Vb(),n.Vb(),n.Wb(6,"mat-chip-list",63),n.Oc(7,OT,2,1,"mat-chip",64),n.Vb(),n.Tb()),2&t){const t=n.zc(4),e=n.hc(2).$implicit,i=n.hc(4);n.Db(1),n.oc("ngIf",e.SQLMode&&i.adminMode),n.Db(2),n.oc("formControl",i.arrFormControl[e.identifier]),n.Db(2),n.oc("ngForOf",e.values),n.Db(1),n.oc("disabled",e.system&&i.adminMode),n.Db(1),n.oc("ngForOf",t.selectedOptions.selected)}}function wT(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"app-contact-autocomplete",67),n.dc("retrieveDocumentEvent",(function(){return n.Dc(t),n.hc(6).retrieveDocumentEvent.emit()})),n.Vb(),n.Tb()}if(2&t){const t=n.hc(2).$implicit,e=n.hc(4);n.Db(1),n.oc("id",t.identifier)("control",e.arrFormControl[t.identifier])}}function MT(t,e){if(1&t&&(n.Ub(0),n.Rb(1,"app-folder-input",68),n.Tb()),2&t){const t=n.hc(2).$implicit,e=n.hc(4);n.Db(1),n.oc("control",e.arrFormControl[t.identifier])}}function kT(t,e){if(1&t&&(n.Ub(0),n.Rb(1,"app-tag-input",68),n.Tb()),2&t){const t=n.hc(2).$implicit,e=n.hc(4);n.Db(1),n.oc("control",e.arrFormControl[t.identifier])}}function ST(t,e){if(1&t&&(n.Ub(0),n.Rb(1,"app-address-ban-input",69),n.Tb()),2&t){const t=n.hc(2).$implicit,e=n.hc(4);n.Db(1),n.oc("control",e.arrFormControl[t.identifier])("admin",e.adminMode)}}function IT(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"app-contact-autocomplete",67),n.dc("retrieveDocumentEvent",(function(){return n.Dc(t),n.hc(6).retrieveDocumentEvent.emit()})),n.Vb(),n.Tb()}if(2&t){const t=n.hc(2).$implicit,e=n.hc(4);n.Db(1),n.oc("id",t.identifier)("control",e.arrFormControl[t.identifier])}}function PT(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"app-issuing-site-input",70,71),n.dc("afterSelected",(function(e){n.Dc(t);const i=n.hc(2).$implicit;return n.hc(4).launchEvent(e,i)})),n.Vb(),n.Tb()}if(2&t){const t=n.hc(2).$implicit,e=n.hc(4);n.Db(1),n.oc("registedMailType",e.arrFormControl.registeredMail_type.value)("control",e.arrFormControl[t.identifier])("showResetOption",e.adminMode||!t.mandatory)}}function VT(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-contact-autocomplete",74),n.dc("retrieveDocumentEvent",(function(){return n.Dc(t),n.hc(7).retrieveDocumentEvent.emit()})),n.Vb()}if(2&t){const t=n.hc(3).$implicit,e=n.hc(4);n.oc("exclusion","?noUsers=true&noEntities=true&noContactsGroups=true")("id",t.identifier)("singleMode",!0)("control",e.arrFormControl[t.identifier])}}function RT(t,e){if(1&t&&n.Rb(0,"app-registered-mail-recipient-input",75,76),2&t){const t=n.hc(3).$implicit,e=n.hc(4);n.oc("control",e.arrFormControl[t.identifier])("registeredMailType",e.arrFormControl.registeredMail_type.value)}}function jT(t,e){if(1&t&&(n.Ub(0),n.Oc(1,VT,1,4,"app-contact-autocomplete",72),n.Oc(2,RT,2,2,"app-registered-mail-recipient-input",73),n.Tb()),2&t){const t=n.hc(6);n.Db(1),n.oc("ngIf","indexation"===t.mode),n.Db(1),n.oc("ngIf","indexation"!==t.mode)}}function AT(t,e){if(1&t&&n.Rb(0,"i",77),2&t){const t=n.hc(2).$implicit;n.Ib("noMandatory",!t.mandatory)}}function WT(t,e){1&t&&n.Rb(0,"i",78)}function TT(t,e){1&t&&n.Rb(0,"i",79)}const ET=function(){return["senders","recipients"]};function FT(t,e){if(1&t&&(n.Wb(0,"div",18),n.Oc(1,iT,12,11,"div",19),n.Wb(2,"div",20),n.Oc(3,sT,7,10,"ng-container",1),n.Oc(4,cT,7,10,"ng-container",1),n.Oc(5,dT,5,11,"ng-container",1),n.Oc(6,mT,12,17,"ng-container",1),n.Oc(7,yT,7,5,"ng-container",1),n.Oc(8,DT,8,5,"ng-container",1),n.Oc(9,wT,2,2,"ng-container",1),n.Oc(10,MT,2,1,"ng-container",1),n.Oc(11,kT,2,1,"ng-container",1),n.Oc(12,ST,2,2,"ng-container",1),n.Oc(13,IT,2,2,"ng-container",1),n.Oc(14,PT,3,3,"ng-container",1),n.Oc(15,jT,3,2,"ng-container",1),n.Vb(),n.Wb(16,"div",21),n.Oc(17,AT,1,2,"i",22),n.Oc(18,WT,1,0,"i",23),n.Oc(19,TT,1,0,"i",24),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc(4);n.oc("cdkDragData",t),n.Db(1),n.oc("ngIf",!e.adminMode&&!e.appService.getViewMode()||e.adminMode),n.Db(1),n.Ib("textareaInput","string"===t.type)("checkboxInput","checkbox"===t.type),n.Db(1),n.oc("ngIf","string"===t.type),n.Db(1),n.oc("ngIf","integer"===t.type),n.Db(1),n.oc("ngIf","select"===t.type),n.Db(1),n.oc("ngIf","date"===t.type),n.Db(1),n.oc("ngIf","radio"===t.type),n.Db(1),n.oc("ngIf","checkbox"===t.type),n.Db(1),n.oc("ngIf",n.uc(22,ET).indexOf(t.identifier)>-1),n.Db(1),n.oc("ngIf","folders"===t.identifier),n.Db(1),n.oc("ngIf","tags"===t.identifier),n.Db(1),n.oc("ngIf","banAutocomplete"===t.type),n.Db(1),n.oc("ngIf","contact"===t.type),n.Db(1),n.oc("ngIf","registeredMail_issuingSite"===t.identifier),n.Db(1),n.oc("ngIf","registeredMail_recipient"===t.identifier),n.Db(2),n.oc("ngIf",e.adminMode||e.arrFormControl[t.identifier].hasError("required")&&e.arrFormControl[t.identifier].untouched),n.Db(1),n.oc("ngIf",!e.adminMode&&e.arrFormControl[t.identifier].touched&&e.arrFormControl[t.identifier].hasError("required")),n.Db(1),n.oc("ngIf",!e.adminMode&&e.arrFormControl[t.identifier].valid&&!e.isEmptyField(t))}}function LT(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",86),n.dc("click",(function(){return n.Dc(t),n.hc(),n.zc(12).switchMode()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",87),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.modifyDiffusionList"))}function QT(t,e){if(1&t&&n.Rb(0,"i",77),2&t){const t=n.hc(2).$implicit;n.Ib("noMandatory",!t.mandatory)}}function NT(t,e){1&t&&n.Rb(0,"i",78)}function zT(t,e){1&t&&n.Rb(0,"i",79)}function BT(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div"),n.Rb(1,"mat-divider"),n.Wb(2,"div",80),n.Wb(3,"div",81),n.Qc(4),n.ic(5,"translate"),n.Oc(6,LT,3,3,"button",82),n.Vb(),n.Wb(7,"div",83),n.Oc(8,QT,1,2,"i",22),n.Oc(9,NT,1,0,"i",23),n.Oc(10,zT,1,0,"i",24),n.Vb(),n.Vb(),n.Wb(11,"app-diffusions-list",84,85),n.dc("triggerEvent",(function(e){n.Dc(t);const i=n.hc().$implicit;return n.hc(4).changeDestination(e,i.allowedEntities)})),n.Vb(),n.Rb(13,"mat-divider"),n.Vb()}if(2&t){const t=n.zc(12),e=n.hc().$implicit,i=n.hc(4);n.Db(4),n.Sc(" ",n.jc(5,13,"lang.diffusionList")," "),n.Db(2),n.oc("ngIf",t.canUpdateRoles()&&i.canEdit&&"process"!==i.mode&&e.enabled),n.Db(2),n.oc("ngIf",i.adminMode||i.arrFormControl.diffusionList.hasError("required")&&i.arrFormControl.diffusionList.untouched),n.Db(1),n.oc("ngIf",!i.adminMode&&i.arrFormControl.diffusionList.touched&&"INVALID"===i.arrFormControl.diffusionList.status),n.Db(1),n.oc("ngIf",!i.adminMode&&i.arrFormControl.diffusionList.valid&&!i.isEmptyField(e)),n.Db(1),n.oc("resId",i.resId)("entityId",i.arrFormControl[e.identifier].value)("diffFormControl",i.arrFormControl.diffusionList)("allowedEntities",e.allowedEntities)("category",i.currentCategory)("target","indexation")("selfDest",i.selfDest)("customDiffusion",i.customDiffusion)}}function UT(t,e){if(1&t&&(n.Ub(0),n.Oc(1,FT,20,23,"div",17),n.Oc(2,BT,14,15,"div",1),n.Tb()),2&t){const t=e.$implicit,i=n.hc(2).$implicit,a=n.hc(2);n.Db(1),n.oc("ngIf",t.unit===i),n.Db(1),n.oc("ngIf","destination"===t.identifier&&!a.adminMode&&a.arrFormControl.destination.value>0&&!a.hideDiffusionList)}}const $T=function(){return["indexingModelsCustomFieldsList_mail","indexingModelsCustomFieldsList_contact","indexingModelsCustomFieldsList_process","indexingModelsCustomFieldsList_classifying","customFieldsList","fieldsList"]};function HT(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",10),n.Wb(1,"div",11),n.Qc(2),n.ic(3,"uppercase"),n.ic(4,"translate"),n.Oc(5,$W,5,8,"small",12),n.Rb(6,"div",13),n.Vb(),n.Wb(7,"div",14),n.Wb(8,"div",15),n.dc("cdkDropListDropped",(function(e){return n.Dc(t),n.hc(3).drop(e)})),n.Oc(9,UT,3,2,"ng-container",5),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc(2);n.Lc("border-color",e.currentPriorityColor),n.Db(1),n.Lc("color",e.currentPriorityColor),n.Db(1),n.Sc(" ",n.jc(3,11,n.jc(4,13,"lang."+t))," "),n.Db(3),n.oc("ngIf","mail"===t),n.Db(3),n.qc("id","indexingModelsCustomFieldsList_",t,""),n.oc("cdkDropListConnectedTo",n.uc(15,$T))("cdkDropListData",e["indexingModels_"+t])("cdkDropListDisabled",!e.adminMode),n.Db(1),n.oc("ngForOf",e["indexingModels_"+t])}}function GT(t,e){if(1&t&&(n.Ub(0),n.Oc(1,HT,10,16,"div",9),n.Tb()),2&t){const t=e.$implicit,i=n.hc(2);n.Db(1),n.oc("ngIf",i["indexingModels_"+t].length>0||i.adminMode)}}function XT(t,e){if(1&t&&(n.Ub(0),n.Oc(1,UW,8,13,"div",4),n.Oc(2,GT,2,1,"ng-container",5),n.Tb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",!t.adminMode&&"indexation"==t.mode),n.Db(1),n.oc("ngForOf",t.fieldCategories)}}let qT=(()=>{class t{constructor(t,e,i,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.dialog=a,this.headerService=s,this.appService=o,this.functions=r,this.loading=!0,this.resId=null,this.canEdit=!0,this.mode="indexation",this.hideDiffusionList=!1,this.retrieveDocumentEvent=new n.o,this.loadingFormEndEvent=new n.o,this.afterSaveEvent=new n.o,this.fieldCategories=["mail","contact","process","classifying"],this.indexingModelsCore=[{identifier:"doctype",label:this.translate.instant("lang.doctype"),unit:"mail",type:"select",system:!0,mandatory:!0,enabled:!0,default_value:"",values:[]},{identifier:"subject",label:this.translate.instant("lang.subject"),unit:"mail",type:"string",system:!0,mandatory:!0,enabled:!0,default_value:"",values:[]}],this.indexingModels_mail=[],this.indexingModels_contact=[],this.indexingModels_process=[],this.indexingModels_classement=[],this.indexingModels_mailClone=[],this.indexingModels_contactClone=[],this.indexingModels_processClone=[],this.indexingModels_classementClone=[],this.indexingModelsCustomFields=[],this.availableFields=[{identifier:"recipients",label:this.translate.instant("lang.getRecipients"),type:"autocomplete",default_value:[],values:[],enabled:!0},{identifier:"priority",label:this.translate.instant("lang.priority"),type:"select",default_value:null,values:[],enabled:!0},{identifier:"confidentiality",label:this.translate.instant("lang.confidential"),type:"radio",default_value:null,values:[{id:!0,label:this.translate.instant("lang.yes")},{id:!1,label:this.translate.instant("lang.no")}],enabled:!0},{identifier:"initiator",label:this.translate.instant("lang.initiatorEntityAlt"),type:"select",default_value:null,values:[],enabled:!0},{identifier:"departureDate",label:this.translate.instant("lang.departureDate"),type:"date",default_value:null,values:[],enabled:!0},{identifier:"processLimitDate",label:this.translate.instant("lang.processLimitDate"),type:"date",default_value:null,values:[],enabled:!0},{identifier:"tags",label:this.translate.instant("lang.tags"),type:"autocomplete",default_value:[],values:["/rest/autocomplete/tags","/rest/tags"],enabled:!0},{identifier:"senders",label:this.translate.instant("lang.getSenders"),type:"autocomplete",default_value:[],values:["/rest/autocomplete/correspondents"],enabled:!0},{identifier:"destination",label:this.translate.instant("lang.destination"),type:"select",default_value:null,values:[],enabled:!0},{identifier:"folders",label:this.translate.instant("lang.folders"),type:"autocomplete",default_value:[],values:["/rest/autocomplete/folders","/rest/folders"],enabled:!0},{identifier:"documentDate",label:this.translate.instant("lang.docDate"),unit:"mail",type:"date",default_value:null,values:[],enabled:!0},{identifier:"arrivalDate",label:this.translate.instant("lang.arrivalDate"),unit:"mail",type:"date",default_value:null,values:[],enabled:!0},{identifier:"registeredMail_type",label:this.translate.instant("lang.registeredMailType"),type:"select",default_value:null,values:[{id:"2D",label:this.translate.instant("lang.registeredMail_2D")},{id:"2C",label:this.translate.instant("lang.registeredMail_2C")},{id:"RW",label:this.translate.instant("lang.registeredMail_RW")}],enabled:!0},{identifier:"registeredMail_issuingSite",label:this.translate.instant("lang.issuingSite"),type:"issuingSite",default_value:null,values:[],enabled:!0},{identifier:"registeredMail_number",label:this.translate.instant("lang.registeredMailNumber"),type:"string",default_value:null,values:[],enabled:!1},{identifier:"registeredMail_warranty",label:this.translate.instant("lang.warrantyLevel"),type:"radio",default_value:null,values:[{id:"R1",label:"R1"},{id:"R2",label:"R2"},{id:"R3",label:"R3"}],enabled:!0},{identifier:"registeredMail_letter",label:this.translate.instant("lang.letter"),type:"radio",default_value:null,values:[{id:!0,label:this.translate.instant("lang.yes")},{id:!1,label:this.translate.instant("lang.no")}],enabled:!0},{identifier:"registeredMail_recipient",label:this.translate.instant("lang.registeredMailRecipient"),type:"autocomplete",default_value:null,values:["/rest/autocomplete/correspondents"],enabled:!0},{identifier:"registeredMail_reference",label:this.translate.instant("lang.registeredMailReference"),type:"string",default_value:null,values:[],enabled:!0}],this.availableFieldsClone=[],this.availableCustomFields=[],this.availableCustomFieldsClone=null,this.arrFormControl={},this.currentCategory="",this.currentPriorityColor="",this.currentResourceValues=null,this.selfDest=!1,this.customDiffusion=[]}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.adminMode=void 0!==this.adminMode,this.availableFieldsClone=JSON.parse(JSON.stringify(this.availableFields)),this.fieldCategories.forEach(t=>{this["indexingModels_"+t]=[]}),this.indexingFormId<=0||void 0===this.indexingFormId?(yield this.initFields(),yield this.initCustomFields(),this.initElemForm()):this.loadForm(this.indexingFormId)}))}initFields(){return new Promise((t,e)=>{this.fieldCategories.forEach(t=>{this["indexingModels_"+t]=this.indexingModelsCore.filter((e,i,n)=>e.unit===t),this["indexingModels_"+t].forEach(t=>{this.initValidator(t)})}),t(!0)})}initCustomFields(){return new Promise((t,e)=>{this.http.get("../rest/customFields").pipe(Object(mt.a)(e=>{const i=e.customFields.filter(t=>"form"===t.mode);this.availableCustomFields=i.map(t=>(t.identifier="indexingCustomField_"+t.id,t.system=!1,t.enabled=!0,t.SQLMode=t.SQLMode,t.default_value=["integer","string","date"].indexOf(t.type)>-1&&!this.functions.empty(t.values)?t.values[0].key:["contact","banAutocomplete"].indexOf(t.type)>-1?[]:null,t.values=t.values.length>0?t.values.map(t=>({id:t.key,label:t.label})):t.values,t)),this.availableCustomFieldsClone=JSON.parse(JSON.stringify(this.availableCustomFields)),t(!0)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()})}drop(t){t.item.data.unit=t.container.id.split("_")[1],t.previousContainer===t.container?Object(lo.h)(t.container.data,t.previousIndex,t.currentIndex):(null!==t.item.data.identifier.match(/registeredMail_[.]*/g)&&"fieldsList"===t.previousContainer.id?this.transferRegisteredMailInput(t):this.transferInput(t),["destination","priority"].indexOf(t.item.data.identifier)>-1&&this.initElemForm())}transferInput(t){this.initValidator(t.item.data),Object(lo.i)(t.previousContainer.data,t.container.data,t.previousIndex,t.currentIndex)}onSubmit(){let t=[];this.fieldCategories.forEach(e=>{t=t.concat(this["indexingModels_"+e])})}removeItem(t,e,i){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.indexingModelModification"),msg:this.translate.instant("lang.updateIndexingFieldWarning")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{e.mandatory=!1,e.enabled=!0,e.identifier.indexOf("indexingCustomField")>-1?(this.availableCustomFields.push(e),this[t].splice(i,1)):(this.availableFields.push(e),this[t].splice(i,1))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}getDatas(t=!0){let e=[];return this.fieldCategories.forEach(t=>{e=e.concat(this["indexingModels_"+t])}),e.forEach(i=>{i.default_value="date"!==i.type||this.functions.empty(this.arrFormControl[i.identifier].value)?""===this.arrFormControl[i.identifier].value?null:this.arrFormControl[i.identifier].value:!0===i.today?this.adminMode?"_TODAY":this.functions.formatDateObjectToDateString(this.arrFormControl[i.identifier].value,!1):this.functions.formatDateObjectToDateString(this.arrFormControl[i.identifier].value,"processLimitDate"===i.identifier),"destination"===i.identifier&&!this.adminMode&&t&&e.push({identifier:"diffusionList",default_value:this.arrFormControl.diffusionList.value})}),this.adminMode||(e.push({identifier:"modelId",default_value:this.indexingFormId}),"indexation"===this.mode&&e.push({identifier:"followed",default_value:this.arrFormControl["mail\xadtracking"].value})),e}saveData(){return new Promise((t,e)=>{if(this.isValidForm()){const e=this.formatDatas(this.getDatas());return this.http.put("../rest/resources/"+this.resId,e).pipe(Object(mt.a)(()=>{"registeredMail"===this.currentCategory&&this.http.put("../rest/registeredMails/"+this.resId,{type:e.registeredMail_type,warranty:e.registeredMail_warranty,issuingSiteId:e.registeredMail_issuingSite,letter:e.registeredMail_letter,recipient:e.registeredMail_recipient,reference:e.registeredMail_reference}).pipe(Object(mt.a)(()=>{this.loadForm(this.indexingFormId),this.afterSaveEvent.emit()}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}),Object(mt.a)(()=>{this.currentResourceValues=JSON.parse(JSON.stringify(this.getDatas(!1))),this.notify.success(this.translate.instant("lang.dataUpdated")),t(!0)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe(),!0}return this.notify.error(this.translate.instant("lang.mustFixErrors")),!1})}formatDatas(t){let e={};const i=/indexingCustomField_[.]*/g;return e.customFields={},t.forEach(t=>{null!==t.identifier.match(i)?e.customFields[t.identifier.split("_")[1]]=t.default_value:e[t.identifier]=t.default_value}),e}getCategory(){return this.currentCategory}getAvailableFields(){return this.availableFields}getAvailableCustomFields(){return this.availableCustomFields}isModified(){let t=!1,e="",i="";return this.fieldCategories.forEach(n=>{e=JSON.stringify(this["indexingModels_"+n]),i=JSON.stringify(this["indexingModels_"+n+"Clone"]),e!==i&&(t=!0)}),t}isResourceModified(){return!this.loading&&JSON.stringify(this.currentResourceValues)!==JSON.stringify(this.getDatas(!1))}setModification(){this.fieldCategories.forEach(t=>{this["indexingModels_"+t+"Clone"]=JSON.parse(JSON.stringify(this["indexingModels_"+t]))})}cancelModification(){this.fieldCategories.forEach(t=>{this["indexingModels_"+t]=JSON.parse(JSON.stringify(this["indexingModels_"+t+"Clone"]))})}setDocumentDateField(t){t.startDate="",t.endDate="_TODAY",this.fieldCategories.forEach(e=>{this["indexingModels_"+e].filter(t=>"arrivalDate"===t.identifier).length>0?t.endDate="arrivalDate":this["indexingModels_"+e].filter(t=>"departureDate"===t.identifier).length>0&&(t.endDate="departureDate")})}setDestinationField(t){let e=this.adminMode||"indexation"!==this.mode?"../rest/indexingModels/entities":`../rest/indexing/groups/${this.groupId}/entities`;return new Promise((i,n)=>{this.http.get(e).pipe(Object(mt.a)(e=>{var n;if(this.adminMode){let i="";t.values=[{id:"#myPrimaryEntity",title:this.translate.instant("lang.myPrimaryEntity"),label:'<i class="fa fa-hashtag"></i> '+this.translate.instant("lang.myPrimaryEntity"),disabled:!1}],t.values=t.values.concat(e.entities.map(t=>{i=t.entity_label;for(let e=0;e<t.level;e++)t.entity_label=" "+t.entity_label;return{id:t.id,title:i,label:t.entity_label,disabled:!1}}))}else{let i="";if("#myPrimaryEntity"===t.default_value)this.selfDest="outgoing"===this.currentCategory,t.default_value=null===(n=this.headerService.user.entities[0])||void 0===n?void 0:n.id,this.arrFormControl[t.identifier].setValue(t.default_value);else{this.selfDest=!1;const i=e.entities.filter(e=>!0===e.enabled&&e.id===t.default_value);t.default_value=i.length>0?i[0].id:null,this.arrFormControl[t.identifier].setValue(i.length>0?i[0].id:"")}t.values=e.entities.map(t=>{i=t.entity_label;for(let e=0;e<t.level;e++)t.entity_label=" "+t.entity_label;return{id:t.id,title:i,label:t.entity_label,disabled:!t.enabled}}),t.event="loadDiffusionList",t.allowedEntities=t.values.filter(t=>!1===t.disabled).map(t=>t.id)}i(!0)})).subscribe()})}setInitiatorField(t){t.values=this.headerService.user.entities.map(t=>({id:t.id,label:t.entity_label}))}setCategoryField(t){return new Promise((e,i)=>{this.http.get("../rest/categories").pipe(Object(mt.a)(i=>{t.values=i.categories,e(!0)})).subscribe()})}setPriorityField(t){return new Promise((e,i)=>{this.http.get("../rest/priorities").pipe(Object(mt.a)(i=>{t.values=i.priorities,t.event="calcLimitDateByPriority",null!==t.default_value&&this.calcLimitDateByPriority(t,t.default_value),e(!0)})).subscribe()})}setDoctypeField(t){return new Promise((e,i)=>{this.http.get("../rest/doctypes").pipe(Object(mt.a)(i=>{let n=[];i.structure.forEach(t=>{void 0===t.doctypes_second_level_id&&(n.push({id:t.doctypes_first_level_id,label:t.doctypes_first_level_label,title:t.doctypes_first_level_label,disabled:!0,isTitle:!0,color:t.css_style}),i.structure.filter(e=>e.doctypes_first_level_id===t.doctypes_first_level_id&&void 0!==e.doctypes_second_level_id&&void 0===e.description).forEach(t=>{n.push({id:t.doctypes_second_level_id,label:" "+t.doctypes_second_level_label,title:t.doctypes_second_level_label,disabled:!0,isTitle:!0,color:t.css_style}),n=n.concat(i.structure.filter(e=>e.doctypes_second_level_id===t.doctypes_second_level_id&&void 0!==e.description).map(t=>({id:t.type_id,label:" "+t.description,title:t.description,disabled:!1,isTitle:!1})))}))}),t.values=n,t.event="calcLimitDate",this.functions.empty(t.default_value)||this.adminMode||this.calcLimitDate(t,t.default_value),e(!0)})).subscribe()})}initElemForm(t=!0){return Object(r.a)(this,void 0,void 0,(function*(){this.loading=!0,this.adminMode||this.arrFormControl["mail\xadtracking"].setValue(!1),this.currentPriorityColor="",yield Promise.all(this.fieldCategories.map(t=>Object(r.a)(this,void 0,void 0,(function*(){yield Promise.all(this["indexingModels_"+t].map(t=>Object(r.a)(this,void 0,void 0,(function*(){"documentDate"===t.identifier?this.setDocumentDateField(t):"destination"===t.identifier?yield this.setDestinationField(t):"arrivalDate"===t.identifier?(t.startDate="documentDate",t.endDate="_TODAY"):"initiator"!==t.identifier||this.adminMode?"processLimitDate"===t.identifier?(t.startDate="_TODAY",t.endDate="",t.event="setPriorityColorByLimitDate"):"departureDate"===t.identifier?(t.startDate="documentDate",t.endDate=""):"folders"===t.identifier?t.values=null:"category_id"===t.identifier?yield this.setCategoryField(t):"priority"===t.identifier?yield this.setPriorityField(t):"doctype"===t.identifier?yield this.setDoctypeField(t):"registeredMail_type"===t.identifier&&(t.event="getIssuingSites"):this.setInitiatorField(t)}))))})))),null!==this.resId&&(yield this.setResource(t)),this.loading=!1}))}setResource(t=!0){return new Promise((e,i)=>{this.http.get("../rest/resources/"+this.resId).pipe(Object(mt.a)(i=>Object(r.a)(this,void 0,void 0,(function*(){yield Promise.all(this.fieldCategories.map(e=>Object(r.a)(this,void 0,void 0,(function*(){yield Promise.all(this["indexingModels_"+e].map(e=>Object(r.a)(this,void 0,void 0,(function*(){const n=Object.keys(i.customFields).filter(t=>t===e.identifier.split("indexingCustomField_")[1])[0];if(Object.keys(i).indexOf(e.identifier)>-1||void 0!==n){let t="";t=void 0!==n?i.customFields[n]:i[e.identifier],"registeredMail_type"===e.identifier&&this.getIssuingSites(null,t),"priority"===e.identifier?this.setPriorityColor(null,t):"processLimitDate"!==e.identifier||this.functions.empty(t)?"destination"===e.identifier?("process"===this.mode&&this.arrFormControl[e.identifier].disable(),this.arrFormControl.diffusionList.disable()):"initiator"!==e.identifier||0!==e.values.filter(e=>e.id===t).length||this.functions.empty(t)||(yield this.getCurrentInitiator(e,t)):e.startDate="","date"!==e.type||this.functions.empty(t)||(t=new Date(t)),this.functions.empty(t)||this.arrFormControl[e.identifier].setValue(t)}else t||"destination"!==e.identifier||(this.arrFormControl[e.identifier].disable(),this.arrFormControl[e.identifier].setValidators([]),this.arrFormControl.diffusionList.disable());this.canEdit||this.arrFormControl[e.identifier].disable()}))))})))),this.arrFormControl["mail\xadtracking"].setValue(i.followed),t&&(this.currentResourceValues=JSON.parse(JSON.stringify(this.getDatas(!1)))),e(!0)}))),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()})}getCurrentInitiator(t,e){return new Promise((i,n)=>{this.http.get("../rest/entities/"+e).pipe(Object(mt.a)(e=>{t.values.unshift({id:e.id,label:e.entity_label}),i(!0)})).subscribe()})}createForm(){this.indexingFormGroup=new X.l(this.arrFormControl),this.loadingFormEndEvent.emit()}resetForm(){return Object(r.a)(this,void 0,void 0,(function*(){Object.keys(this.arrFormControl).forEach(t=>{delete this.arrFormControl[t]}),this.availableFields=JSON.parse(JSON.stringify(this.availableFieldsClone)),this.fieldCategories.forEach(t=>{this["indexingModels_"+t]=[]}),null===this.availableCustomFieldsClone?yield this.initCustomFields():this.availableCustomFields=JSON.parse(JSON.stringify(this.availableCustomFieldsClone))}))}loadForm(t,e=!0){return Object(r.a)(this,void 0,void 0,(function*(){this.loading=!0,this.customDiffusion=[],this.indexingFormId=t,yield this.resetForm(),this.adminMode||(this.arrFormControl["mail\xadtracking"]=new X.i({value:"",disabled:!!this.adminMode})),this.http.get("../rest/indexingModels/"+t).pipe(Object(mt.a)(t=>Object(r.a)(this,void 0,void 0,(function*(){let i;this.indexingFormId=null!==t.indexingModel.master?t.indexingModel.master:t.indexingModel.id,this.currentCategory=t.indexingModel.category,0===t.indexingModel.fields.length?(this.initFields(),this.notify.error(this.translate.instant("lang.noFieldInModelMsg"))):t.indexingModel.fields.forEach(t=>{i=!1,t.system=!1,t.values=[];let e=this.availableFields.map(t=>t.identifier).indexOf(t.identifier);e>-1&&(t.label=this.availableFields[e].label,t.default_value=this.functions.empty(t.default_value)?this.availableFields[e].default_value:t.default_value,t.values=this.availableFields[e].values,t.type=this.availableFields[e].type,this.availableFields.splice(e,1),i=!0),e=this.availableCustomFields.map(t=>t.identifier).indexOf(t.identifier),e>-1&&(t.label=this.availableCustomFields[e].label,t.default_value=this.functions.empty(t.default_value)?this.availableCustomFields[e].default_value:t.default_value,t.values=this.availableCustomFields[e].values,t.type=this.availableCustomFields[e].type,t.SQLMode=this.availableCustomFields[e].SQLMode,this.availableCustomFields.splice(e,1),i=!0),e=this.indexingModelsCore.map(t=>t.identifier).indexOf(t.identifier),e>-1&&(t.label=this.indexingModelsCore[e].label,t.default_value=this.functions.empty(t.default_value)?this.indexingModelsCore[e].default_value:t.default_value,t.values=this.indexingModelsCore[e].values,t.type=this.indexingModelsCore[e].type,i=!0,t.system=!0),"date"===t.type&&"_TODAY"===t.default_value&&(t.today=!0,t.default_value=new Date),"initiator"===t.identifier&&"indexation"===this.mode&&this.functions.empty(t.default_value)&&this.headerService.user.entities[0]&&(t.default_value=this.headerService.user.entities.filter(t=>"Y"===t.primary_entity)[0].id),"diffusionList"===t.identifier&&(this.customDiffusion=t.default_value),i?(this["indexingModels_"+t.unit].push(t),this.initValidator(t)):"diffusionList"!==t.identifier&&this.notify.error(this.translate.instant("lang.fieldNotExist")+": "+t.identifier)}),yield this.initElemForm(e),this.createForm()}))),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}))}enableField(t,e){if(e)this.isAlwaysDisabledField(t)||this.arrFormControl[t.identifier].enable(),t.enabled=!0;else{if(this.functions.empty(this.arrFormControl[t.identifier].value)&&t.mandatory)return alert(this.translate.instant("lang.canNotDisabledField")),!1;this.arrFormControl[t.identifier].disable(),t.enabled=!1}}isAlwaysDisabledField(t){return!(!this.adminMode||!(["integer","string","date"].indexOf(t.type)>-1&&!this.functions.empty(t.values)||t.today))}initValidator(t){let e=[];const i=!t.enabled||this.isAlwaysDisabledField(t);if(i||(t.enabled=!0),this.arrFormControl[t.identifier]=new X.i({value:t.default_value,disabled:i}),"integer"===t.type?e.push(this.regexValidator(new RegExp("[+-]?([0-9]*[.])?[0-9]+"),{floatNumber:""})):"date"!==t.type||this.functions.empty(t.default_value)||this.arrFormControl[t.identifier].setValue(new Date(t.default_value)),t.mandatory&&!this.adminMode&&e.push(X.I.required),this.arrFormControl[t.identifier].setValidators(e),"destination"===t.identifier){let e=[];t.mandatory?(e.push(X.I.required),e.push(this.requireDestValidator({isDest:""}))):e.push(this.requireDestValidatorOrEmpty({isDest:""})),this.arrFormControl.diffusionList=new X.i({value:null,disabled:!1}),this.arrFormControl.diffusionList.setValidators(e),this.arrFormControl.diffusionList.setValue([])}}requireDestValidator(t){return e=>e.value?e.value.filter(t=>"dest"===t.mode).length>0?null:t:null}requireDestValidatorOrEmpty(t){return e=>e.value?e.value.filter(t=>"dest"===t.mode).length>0||this.functions.empty(this.arrFormControl.destination.value)?null:t:null}regexValidator(t,e){return i=>i.value?t.test(i.value)?null:e:null}isValidForm(){return this.indexingFormGroup.valid||Object.keys(this.indexingFormGroup.controls).forEach(t=>{null!=this.indexingFormGroup.get(t).errors&&this.indexingFormGroup.controls[t].markAsTouched()}),this.indexingFormGroup.valid}isEmptyField(t){return null===this.arrFormControl[t.identifier].value||(Array.isArray(this.arrFormControl[t.identifier].value)?!(this.arrFormControl[t.identifier].value.length>0):""===String(this.arrFormControl[t.identifier].value))}getMinDate(t){return void 0!==this.arrFormControl[t]?this.arrFormControl[t].value:"_TODAY"===t?new Date:""}getMaxDate(t){return void 0!==this.arrFormControl[t]?this.arrFormControl[t].value:"_TODAY"===t?new Date:""}toggleTodayDate(t){t.today=!t.today,t.today?(this.arrFormControl[t.identifier].disable(),this.arrFormControl[t.identifier].setValue(new Date)):(this.arrFormControl[t.identifier].setValue(""),this.arrFormControl[t.identifier].enable())}toggleMailTracking(){this.arrFormControl["mail\xadtracking"].setValue(!this.arrFormControl["mail\xadtracking"].value)}changeCategory(t){this.currentCategory=t,this.changeRegisteredMailItems(t)}changeDestination(t,e){-1===t.indexOf(this.arrFormControl.destination.value)&&this.arrFormControl.destination.setValue(t[0])}launchEvent(t,e){void 0===e.event||null===t||this.adminMode||this[e.event](e,t)}calcLimitDate(t,e){let i=null;void 0!==this.arrFormControl.processLimitDate&&this.http.get("../rest/indexing/processLimitDate",{params:{doctype:e}}).pipe(Object(mt.a)(t=>{i=null!==t.processLimitDate?new Date(t.processLimitDate):"",this.arrFormControl.processLimitDate.setValue(i)}),Object(d.a)(t=>void 0!==this.arrFormControl.priority&&null!==t.processLimitDate),p(()=>this.http.get("../rest/indexing/priority",{params:{processLimitDate:i.toDateString()}})),Object(mt.a)(t=>{this.arrFormControl.priority.setValue(t.priority),this.setPriorityColor(null,t.priority)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}calcLimitDateByPriority(t,e){let i=null;void 0!==this.arrFormControl.processLimitDate?this.http.get("../rest/indexing/processLimitDate",{params:{priority:e}}).pipe(Object(mt.a)(n=>{i=null!==n.processLimitDate?new Date(n.processLimitDate):"",this.arrFormControl.processLimitDate.setValue(i),this.setPriorityColor(t,e)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe():this.setPriorityColor(t,e)}setPriorityColor(t,e){null!==t?this.currentPriorityColor=t.values.filter(t=>t.id===e).map(t=>t.color)[0]:this.fieldCategories.forEach(t=>{this["indexingModels_"+t].filter(t=>"priority"===t.identifier).length>0&&(this.currentPriorityColor=this["indexingModels_"+t].filter(t=>"priority"===t.identifier)[0].values.filter(t=>t.id===e).map(t=>t.color)[0])})}setPriorityColorByLimitDate(t,e){const i=new Date(e.value);this.http.get("../rest/indexing/priority",{params:{processLimitDate:i.toDateString()}}).pipe(Object(mt.a)(t=>{this.functions.empty(this.arrFormControl.priority)||this.arrFormControl.priority.setValue(t.priority),this.setPriorityColor(null,t.priority)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}loadDiffusionList(t,e){this.functions.empty(this.appDiffusionsList)||this.appDiffusionsList.loadListModel(e)}getCheckboxListLabel(t,e){return e.filter(e=>e.id===t)[0].label}getIssuingSites(t,e){this.fieldCategories.forEach(t=>{this["indexingModels_"+t].forEach(t=>{"registeredMail_warranty"===t.identifier&&(t.values[2].disabled="RW"===e)}),"RW"===e&&"R3"===this.arrFormControl.registeredMail_warranty.value&&this.arrFormControl.registeredMail_warranty.setValue("R1")}),this.functions.empty(this.appIssuingSiteInput)||(this.appIssuingSiteInput.registedMailType=e)}transferRegisteredMailInput(t){const e=/registeredMail_[.]*/g;if(this.transferInput(t),"registeredMail_type"!==t.item.data.identifier){const e=t.previousContainer.data.map((t,e)=>({index:e,identifier:t.identifier})).filter(t=>"registeredMail_type"===t.identifier)[0];this.initValidator(t.previousContainer.data[e.index]),t.previousContainer.data[e.index].unit=t.container.id.split("_")[1],t.container.data.splice(t.currentIndex,0,t.previousContainer.data[e.index]),t.previousContainer.data.splice(e.index,1)}t.previousContainer.data.forEach((i,n)=>{null!==i.identifier.match(e)&&(this.initValidator(i),i.unit=t.container.id.split("_")[1],t.container.data.splice(t.currentIndex,0,i),t.previousContainer.data.splice(n,1))}),this.initElemForm()}changeRegisteredMailItems(t){"registeredMail"!==t?this.fieldCategories.forEach(t=>{this.availableFields=this.availableFields.concat(this["indexingModels_"+t].filter(t=>t.identifier.indexOf("registeredMail_")>-1)),this["indexingModels_"+t]=this["indexingModels_"+t].filter(t=>-1===t.identifier.indexOf("registeredMail_"))}):(this.indexingModels_mail=this.indexingModels_mail.concat(this.availableFields.filter(t=>t.identifier.indexOf("registeredMail_")>-1||"departureDate"===t.identifier)),this.indexingModels_mail.forEach(t=>{(t.identifier.indexOf("registeredMail_")>-1||"departureDate"===t.identifier)&&(this.functions.empty(t.unit)&&(t.unit="mail"),"registeredMail_number"!==t.identifier&&(t.mandatory=!0),this.initValidator(t))}),this.availableFields=this.availableFields.filter(t=>-1===t.identifier.indexOf("registeredMail_")&&"departureDate"!==t.identifier))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-indexing-form"]],viewQuery:function(t,e){var i;1&t&&(n.Xc(QW,!0),n.Xc(NW,!0),n.Xc(zW,!0)),2&t&&(n.yc(i=n.ec())&&(e.appDiffusionsList=i.first),n.yc(i=n.ec())&&(e.appIssuingSiteInput=i.first),n.yc(i=n.ec())&&(e.appRegisteredMailRecipientInput=i.first))},inputs:{indexingFormId:"indexingFormId",resId:"resId",groupId:"groupId",adminMode:["admin","adminMode"],canEdit:"canEdit",mode:"mode",hideDiffusionList:"hideDiffusionList"},outputs:{retrieveDocumentEvent:"retrieveDocumentEvent",loadingFormEndEvent:"loadingFormEndEvent",afterSaveEvent:"afterSaveEvent"},features:[n.Cb([Wt.a])],decls:2,vars:2,consts:[["style","display:flex;height:100%;",4,"ngIf"],[4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],["style","display: flex;align-items: center;justify-content: flex-end;margin-top: 10px;margin-bottom: -20px;",4,"ngIf"],[4,"ngFor","ngForOf"],[2,"display","flex","align-items","center","justify-content","flex-end","margin-top","10px","margin-bottom","-20px"],["mat-button","",1,"categoryLabel",3,"title","click"],["color","primary",2,"font-size","20px"],["class","banner",3,"borderColor",4,"ngIf"],[1,"banner"],[1,"title"],[3,"title",4,"ngIf"],[1,"title-divider"],[1,"content"],["cdkDropList","",1,"indexingModelsCustomFieldsList",2,"min-height","50px",3,"id","cdkDropListConnectedTo","cdkDropListData","cdkDropListDisabled","cdkDropListDropped"],[3,"title"],["class","fieldRow","cdkDrag","","cdkDragLockAxis","y",3,"cdkDragData",4,"ngIf"],["cdkDrag","","cdkDragLockAxis","y",1,"fieldRow",3,"cdkDragData"],["class","fieldLabel",4,"ngIf"],[1,"fieldInput"],[1,"fieldState"],["class","fas fa-asterisk fieldRequired",3,"noMandatory",4,"ngIf"],["class","fas fa-exclamation-triangle fieldError",4,"ngIf"],["class","fas fa-check fieldFull",4,"ngIf"],[1,"fieldLabel"],["class","fas fa-bars fa-2x","color","primary","style","cursor: move","cdkDragHandle","",3,"title",4,"ngIf"],["mat-icon-button","",3,"matMenuTriggerFor",4,"ngIf"],["fieldActions","matMenu"],["mat-menu-item","",3,"click",4,"ngIf"],["color","primary","cdkDragHandle","",1,"fas","fa-bars","fa-2x",2,"cursor","move",3,"title"],["mat-icon-button","",3,"matMenuTriggerFor"],["color","secondary",1,"fa","fa-ellipsis-v"],["mat-menu-item","",3,"click"],["color","warn",1,"fa","fa-trash"],["mat-button","","color","primary","matPrefix","","mat-icon-button","","disabled","","style","position: absolute;left: -40px;",3,"title",4,"ngIf"],[1,"input-form",3,"floatLabel"],["matInput","","matTextareaAutosize","",1,"subject",3,"id","formControl","placeholder"],["mat-button","","color","primary","matPrefix","","mat-icon-button","","disabled","",2,"position","absolute","left","-40px",3,"title"],["color","primary",1,"fas","fa-database"],["type","number","matInput","","min","0","step","0.1",3,"id","formControl","placeholder"],[2,"width","100%",3,"id","showResetOption","label","placeholderLabel","formControlSelect","datas","afterSelected"],["mat-button","","color","primary","matPrefix","","mat-icon-button","","style","position: absolute;left: -40px;",3,"matTooltip","click",4,"ngIf"],[1,"input-form","input-date",2,"cursor","pointer",3,"floatLabel","click"],["matInput","","readonly","",2,"cursor","pointer",3,"id","formControl","matDatepicker","placeholder","min","max","dateChange"],["matSuffix","",3,"for",4,"ngIf"],[3,"touchUi"],["picker",""],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click",4,"ngIf"],["mat-button","","color","primary","matPrefix","","mat-icon-button","",2,"position","absolute","left","-40px",3,"matTooltip","click"],["color","primary"],["matSuffix","",3,"for"],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click"],["color","warn",1,"fa","fa-calendar-times"],[1,"input-form","input-radio",3,"floatLabel"],["matInput","",2,"display","none"],["color","primary",1,"radio-form",3,"formControl"],[3,"value","disabled",4,"ngFor","ngForOf"],[3,"value","disabled"],[1,"input-form","checkbox-form"],[1,"div-list",3,"formControl"],["shoes",""],["color","primary","checkboxPosition","before",3,"value",4,"ngFor","ngForOf"],[1,"checkbox-selected-list",3,"disabled"],["selected","",4,"ngFor","ngForOf"],["color","primary","checkboxPosition","before",3,"value"],["selected",""],[2,"width","100%",3,"id","control","retrieveDocumentEvent"],[2,"width","100%",3,"control"],[2,"width","100%",3,"control","admin"],[2,"width","100%",3,"registedMailType","control","showResetOption","afterSelected"],["appIssuingSiteInput",""],["style","width:100%;",3,"exclusion","id","singleMode","control","retrieveDocumentEvent",4,"ngIf"],["style","width:100%;",3,"control","registeredMailType",4,"ngIf"],[2,"width","100%",3,"exclusion","id","singleMode","control","retrieveDocumentEvent"],[2,"width","100%",3,"control","registeredMailType"],["appRegisteredMailRecipientInput",""],[1,"fas","fa-asterisk","fieldRequired"],[1,"fas","fa-exclamation-triangle","fieldError"],[1,"fas","fa-check","fieldFull"],[2,"padding","10px","font-size","16px","color","#135F7F","letter-spacing","2px","font-weight","bold","display","flex","align-items","center"],[2,"display","flex","flex","1","align-items","center"],["mat-icon-button","","color","primary",3,"title","click",4,"ngIf"],[1,"fieldState",2,"width","20px","padding","0px"],[3,"resId","entityId","diffFormControl","allowedEntities","category","target","selfDest","customDiffusion","triggerEvent"],["appDiffusionsList",""],["mat-icon-button","","color","primary",3,"title","click"],[1,"fa","fa-edit"]],template:function(t,e){1&t&&(n.Oc(0,BW,2,0,"div",0),n.Oc(1,XT,3,2,"ng-container",1)),2&t&&(n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[P.t,V.c,P.s,k.b,S.a,lo.e,lo.a,ne.e,lo.b,ne.d,ne.b,T.a,Y.c,J.b,J.d,X.d,X.u,X.j,Y.i,Y.g,X.A,fr,ae.h,ae.f,A.b,ae.j,Y.j,hc.b,hc.a,R.i,ze.d,R.f,ze.a,Zd,IO,$O,nD,wW,LW,im],pipes:[g.d,P.G,P.F],styles:[".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();const KT=["snav2"],YT=["adminMenuTemplate"],JT=["appDocumentViewer"],ZT=["indexingForm"],tE=["appDiffusionsList"],eE=["appVisaWorkflow"],iE=["appAvisWorkflow"],nE=["appNotesList"];function aE(t,e){1&t&&(n.Wb(0,"div",28),n.Rb(1,"i",29),n.Qc(2,"\xa0"),n.Rb(3,"span",30),n.ic(4,"translate"),n.Vb()),2&t&&(n.Db(3),n.oc("innerHTML",n.jc(4,1,"lang.retentionRuleFrozenAlt"),n.Ec))}function sE(t,e){if(1&t&&(n.Wb(0,"div",28),n.Rb(1,"i",31),n.Qc(2,"\xa0 "),n.Rb(3,"span",30),n.ic(4,"translate"),n.ic(5,"translate"),n.Qc(6," \xa0 "),n.Rb(7,"i",32),n.ic(8,"translate"),n.ic(9,"translate"),n.Vb()),2&t){const t=n.hc(3);n.Db(3),n.oc("innerHTML",t.resourceBinded?n.jc(4,2,"lang.bindingMailAlt"):n.jc(5,4,"lang.noBindingMailAlt"),n.Ec),n.Db(4),n.oc("title",t.resourceBinded?n.jc(8,6,"lang.bindingMailDesc"):n.jc(9,8,"lang.noBindingMailDesc"))}}function oE(t,e){if(1&t&&(n.Wb(0,"div",26),n.Oc(1,aE,5,3,"div",27),n.Oc(2,sE,10,10,"div",27),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("ngIf",t.resourceFreezed),n.Db(1),n.oc("ngIf",null!==t.resourceBinded)}}function rE(t,e){1&t&&n.Rb(0,"i",35)}function cE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",33),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc(2);return!!a.isToolEnabled(i.id)&&a.changeTab(i.id)})),n.Oc(1,rE,1,0,"i",34),n.Rb(2,"i"),n.Wb(3,"span"),n.Qc(4),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.Ib("processTool-module-active",t.id===i.currentTool)("tool-disabled",!i.isToolEnabled(t.id)),n.Db(1),n.oc("ngIf",t.count>0),n.Db(1),n.Fb(t.icon),n.Db(2),n.Rc(t.label)}}function lE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",38),n.dc("click",(function(){return n.Dc(t),n.hc(3).openTechnicalInfo()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",40),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.showTechnicalInfo"))}function dE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",36),n.Oc(1,lE,3,3,"button",37),n.Wb(2,"button",38),n.dc("click",(function(){return n.Dc(t),n.hc(2).createModal()})),n.ic(3,"translate"),n.Rb(4,"mat-icon",39),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.oc("ngIf",t.privilegeService.hasCurrentUserPrivilege("view_technical_infos")),n.Db(1),n.oc("title",n.jc(3,2,"lang.openInExternalModal"))}}function hE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-history-workflow-resume",48),n.dc("goTo",(function(){return n.Dc(t),n.hc(3).currentTool="history"})),n.Vb()}if(2&t){const t=n.hc(3);n.oc("resId",t.currentResourceInformations.resId)}}function uE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-note-resume",48),n.dc("goTo",(function(){return n.Dc(t),n.hc(3).currentTool="notes"})),n.Vb()}if(2&t){const t=n.hc(3);n.oc("resId",t.currentResourceInformations.resId)}}function pE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-attachments-resume",48),n.dc("goTo",(function(){return n.Dc(t),n.hc(3).currentTool="attachments"})),n.Vb()}if(2&t){const t=n.hc(3);n.oc("resId",t.currentResourceInformations.resId)}}function bE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-mail-resume",48),n.dc("goTo",(function(){return n.Dc(t),n.hc(3).currentTool="emails"})),n.Vb()}if(2&t){const t=n.hc(3);n.oc("resId",t.currentResourceInformations.resId)}}function fE(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"div",41),n.Wb(2,"button",42),n.dc("click",(function(){return n.Dc(t),n.hc(2).openPrintedFolderPrompt()})),n.ic(3,"translate"),n.Rb(4,"mat-icon",43),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Vb(),n.Wb(7,"div",44),n.Wb(8,"div",45),n.dc("click",(function(){return n.Dc(t),n.hc(2).currentTool="history"})),n.Qc(9),n.ic(10,"translate"),n.Rb(11,"div",46),n.Vb(),n.Wb(12,"div",12),n.Oc(13,hE,1,1,"app-history-workflow-resume",47),n.Vb(),n.Vb(),n.Wb(14,"div",44),n.Wb(15,"div",45),n.dc("click",(function(){return n.Dc(t),n.hc(2).currentTool="notes"})),n.Qc(16),n.ic(17,"translate"),n.Rb(18,"div",46),n.Vb(),n.Wb(19,"div",12),n.Oc(20,uE,1,1,"app-note-resume",47),n.Vb(),n.Vb(),n.Wb(21,"div",44),n.Wb(22,"div",45),n.dc("click",(function(){return n.Dc(t),n.hc(2).currentTool="attachments"})),n.Qc(23),n.ic(24,"translate"),n.Rb(25,"div",46),n.Vb(),n.Wb(26,"div",12),n.Oc(27,pE,1,1,"app-attachments-resume",47),n.Vb(),n.Vb(),n.Wb(28,"div",44),n.Wb(29,"div",45),n.dc("click",(function(){return n.Dc(t),n.hc(2).currentTool="emails"})),n.Qc(30),n.ic(31,"translate"),n.Rb(32,"div",46),n.Vb(),n.Wb(33,"div",12),n.Oc(34,bE,1,1,"app-mail-resume",47),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=n.hc(2);n.Db(2),n.oc("title",n.jc(3,10,"lang.generateAndDownloadPrintedFolder")),n.Db(3),n.Sc(" ",n.jc(6,12,"lang.printedFolder")," "),n.Db(4),n.Sc(" ",n.jc(10,14,"lang.history")," "),n.Db(4),n.oc("ngIf",!t.loading),n.Db(3),n.Sc(" ",n.jc(17,16,"lang.notesAlt")," "),n.Db(4),n.oc("ngIf",!t.loading),n.Db(3),n.Sc(" ",n.jc(24,18,"lang.attachments")," "),n.Db(4),n.oc("ngIf",!t.loading),n.Db(3),n.Sc(" ",n.jc(31,20,"lang.mailsSentAlt")," "),n.Db(4),n.oc("ngIf",!t.loading)}}function mE(t,e){if(1&t&&n.Rb(0,"app-history-list",61,62),2&t){const t=n.hc(3);n.oc("resId",t.currentResourceInformations.resId)}}function gE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-notes-list",63,64),n.dc("reloadBadgeNotes",(function(e){return n.Dc(t),n.hc(3).refreshBadge(e,"notes")})),n.Vb()}if(2&t){const t=n.hc(3);n.oc("editMode",!0)("resId",t.currentResourceInformations.resId)}}function vE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-linked-resource-list",65,66),n.dc("reloadBadgeLinkedResources",(function(e){return n.Dc(t),n.hc(3).refreshBadge(e,"linkedResources")})),n.Vb()}if(2&t){const t=n.hc(3);n.oc("resId",t.currentResourceInformations.resId)}}function _E(t,e){if(1&t&&n.Rb(0,"app-diffusions-list",67,68),2&t){const t=n.hc(3);n.oc("adminMode",!0)("target",t.detailMode?"details":"process")("resId",t.currentResourceInformations.resId)("expanded",!0)}}function yE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-sent-resource-list",69,70),n.dc("reloadBadgeSentResource",(function(e){return n.Dc(t),n.hc(3).refreshBadge(e,"emails")})),n.Vb()}if(2&t){const t=n.hc(3);n.oc("resId",t.currentResourceInformations.resId)("currentUserId",t.currentUserId)("currentGroupId",t.currentGroupId)("currentBasketId",t.currentBasketId)}}function xE(t,e){if(1&t&&n.Rb(0,"app-visa-workflow",71,72),2&t){const t=n.hc(3);n.oc("resId",t.currentResourceInformations.resId)("adminMode",t.privilegeService.hasCurrentUserPrivilege(t.detailMode?"config_visa_workflow_in_detail":"config_visa_workflow"))}}function CE(t,e){if(1&t&&n.Rb(0,"app-avis-workflow",71,73),2&t){const t=n.hc(3);n.oc("resId",t.currentResourceInformations.resId)("adminMode",t.privilegeService.hasCurrentUserPrivilege(t.detailMode?"config_avis_workflow_in_detail":"config_avis_workflow"))}}function OE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-attachments-list",74,75),n.dc("reloadBadgeAttachments",(function(e){return n.Dc(t),n.hc(3).refreshBadge(e,"attachments")})),n.Vb()}if(2&t){const t=n.hc(3);n.oc("resId",t.currentResourceInformations.resId)("autoOpenCreation",t.isMailing)("target","process")}}function DE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-select-indexing-model",76,77),n.dc("afterSelectedListModel",(function(e){return n.Dc(t),n.hc(3).indexingForm.loadForm(e.id,!1)})),n.Vb()}if(2&t){const t=n.hc(3);n.oc("defaultIndexingModelId",t.currentResourceInformations.modelId)("adminMode",t.canChangeModel)("indexingForm",t.indexingForm)}}function wE(t,e){1&t&&(n.Rb(0,"div",78),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.dispositListGeneratedMsg"),n.Ec)}function ME(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-indexing-form",79,80),n.dc("loadingFormEndEvent",(function(){return n.Dc(t),n.hc(3).triggerProcessAction()}))("retrieveDocumentEvent",(function(){return n.Dc(t),n.hc(3).appDocumentViewer.saveDocService()}))("afterSaveEvent",(function(){return n.Dc(t),n.hc(3).refreshData()})),n.Vb()}if(2&t){const t=n.hc(3);n.oc("groupId",t.currentGroupId)("resId",t.currentResourceInformations.resId)("indexingFormId",t.currentResourceInformations.modelId)("mode","process")("canEdit",t.canEditData)("hideDiffusionList",!0)}}function kE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",81),n.dc("click",(function(){return n.Dc(t),n.hc(3).saveTool()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",82),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.saveModifications"))}function SE(t,e){if(1&t&&(n.Ub(0),n.Oc(1,mE,2,1,"app-history-list",49),n.Oc(2,gE,2,2,"app-notes-list",50),n.Oc(3,vE,2,1,"app-linked-resource-list",51),n.Oc(4,_E,2,4,"app-diffusions-list",52),n.Oc(5,yE,2,4,"app-sent-resource-list",53),n.Oc(6,xE,2,2,"app-visa-workflow",54),n.Oc(7,CE,2,2,"app-avis-workflow",54),n.Oc(8,OE,2,3,"app-attachments-list",55),n.Oc(9,DE,2,3,"app-select-indexing-model",56),n.Oc(10,wE,2,3,"div",57),n.Oc(11,ME,2,6,"app-indexing-form",58),n.Wb(12,"div",59),n.Oc(13,kE,3,3,"button",60),n.Vb(),n.Tb()),2&t){const t=n.hc(2);n.Db(1),n.oc("ngIf","history"===t.currentTool&&!t.loading),n.Db(1),n.oc("ngIf","notes"===t.currentTool&&!t.loading),n.Db(1),n.oc("ngIf","linkedResources"===t.currentTool&&!t.loading),n.Db(1),n.oc("ngIf","diffusionList"===t.currentTool&&!t.loading),n.Db(1),n.oc("ngIf","emails"===t.currentTool&&!t.loading),n.Db(1),n.oc("ngIf","visaCircuit"===t.currentTool&&!t.loading),n.Db(1),n.oc("ngIf","opinionCircuit"===t.currentTool&&!t.loading),n.Db(1),n.oc("ngIf","attachments"===t.currentTool&&!t.loading),n.Db(1),n.oc("ngIf","info"===t.currentTool&&!t.loading),n.Db(1),n.oc("ngIf","info"===t.currentTool&&!t.loading&&!t.functions.empty(t.currentResourceInformations.registeredMail_deposit_id)),n.Db(1),n.oc("ngIf","info"===t.currentTool&&!t.loading),n.Db(2),n.oc("ngIf",t.isToolModified())}}function IE(t,e){1&t&&(n.Wb(0,"div",83),n.Rb(1,"i",39),n.Qc(2),n.ic(3,"translate"),n.Vb()),2&t&&(n.Db(2),n.Sc(" ",n.jc(3,1,"lang.openedInExternalModal")," "))}function PE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",98),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(4).selectAction(e)})),n.Wb(1,"span",99),n.Qc(2),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc(4);n.Ib("listModels-menu-selected",t.id===e.selectedAction.id),n.oc("title",t.label),n.Db(2),n.Rc(t.label)}}function VE(t,e){if(1&t&&(n.Ub(0),n.Oc(1,PE,3,4,"button",97),n.Tb()),2&t){const t=e.$implicit,i=n.hc(4);n.Db(1),n.oc("ngIf",i.showActionInCurrentCategory(t))}}function RE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",100),n.dc("click",(function(){return n.Dc(t),n.hc(4).onSubmit()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(4);n.oc("disabled",t.actionService.loading||0===t.selectedAction.id||void 0!==t.appDocumentViewer&&!t.appDocumentViewer.isEditorLoaded()),n.Db(1),n.Rc(n.jc(2,2,"lang.validate"))}}function jE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",101),n.dc("click",(function(){return n.Dc(t),n.hc(4).onSubmit()})),n.Rb(1,"mat-icon",102),n.Vb()}}function AE(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"button",86),n.Rb(2,"span",87),n.Rb(3,"i",88),n.Vb(),n.Wb(4,"mat-menu",null,89),n.Wb(6,"div",90),n.Wb(7,"span"),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Wb(10,"mat-form-field",91),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.Wb(11,"input",92,93),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("keydown",(function(e){return n.Dc(t),e.stopPropagation()})),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Oc(14,VE,2,1,"ng-container",94),n.ic(15,"filterList"),n.Vb(),n.Oc(16,RE,3,4,"button",95),n.Oc(17,jE,2,0,"button",96),n.Tb()}if(2&t){const t=n.zc(5),e=n.zc(12),i=n.hc(3);n.Db(1),n.oc("disabled",0===i.selectedAction.id)("matMenuTriggerFor",t)("title",i.selectedAction.label),n.Db(1),n.oc("innerHTML",i.selectedAction.label,n.Ec),n.Db(2),n.Fb("menuForm menuAction"),n.Db(4),n.Sc(" ",n.jc(9,11,"lang.actions")," "),n.Db(3),n.pc("placeholder",n.jc(13,13,"lang.filterBy")),n.Db(3),n.oc("ngForOf",n.lc(15,15,i.actionsList,e.value,"label")),n.Db(2),n.oc("ngIf",!i.appService.getViewMode()),n.Db(1),n.oc("ngIf",i.appService.getViewMode())}}function WE(t,e){1&t&&(n.Rb(0,"div",103),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.noAvailableActionProcess"),n.Ec)}function TE(t,e){if(1&t&&(n.Wb(0,"div",84),n.Oc(1,AE,18,19,"ng-container",23),n.Oc(2,WE,2,3,"div",85),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("ngIf",t.actionsList.length>0&&void 0!==t.selectedAction),n.Db(1),n.oc("ngIf",0===t.actionsList.length)}}function EE(t,e){if(1&t&&(n.Oc(0,oE,3,2,"div",17),n.Wb(1,"div",18),n.Wb(2,"div",19),n.Oc(3,cE,5,8,"div",20),n.Vb(),n.Vb(),n.Wb(4,"div",21),n.Oc(5,dE,5,4,"div",22),n.Oc(6,fE,35,22,"ng-container",23),n.Oc(7,SE,14,12,"ng-container",9),n.Oc(8,IE,4,3,"ng-template",null,24,n.Pc),n.Vb(),n.Oc(10,TE,3,2,"div",25)),2&t){const t=n.zc(9),e=n.hc();n.oc("ngIf",(e.resourceFreezed||null!==e.resourceBinded)&&!e.loading),n.Db(3),n.oc("ngForOf",e.processTool),n.Db(2),n.oc("ngIf",!e.isModalOpen()&&"dashboard"!==e.currentTool),n.Db(1),n.oc("ngIf","dashboard"===e.currentTool),n.Db(1),n.oc("ngIf",!e.isModalOpen()&&!e.loading)("ngIfElse",t),n.Db(3),n.oc("ngIf",!e.detailMode)}}function FE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",107),n.dc("click",(function(){return n.Dc(t),n.hc(2).toggleFreezing()})),n.ic(1,"translate"),n.ic(2,"translate"),n.Rb(3,"mat-icon",108),n.Vb()}if(2&t){const t=n.hc(2);n.oc("title",t.resourceFreezed?n.jc(1,4,"lang.unfreezeRetentionRule"):n.jc(2,6,"lang.freezeRetentionRule")),n.Db(3),n.Gb("",t.resourceFreezed?"freezeUnfreezIcon":"nonFreeze"," fas fa-snowflake")}}function LE(t,e){if(1&t&&(n.Wb(0,"button",121),n.ic(1,"translate"),n.Rb(2,"mat-icon",122),n.Vb()),2&t){n.hc();const t=n.zc(15);n.oc("matMenuTriggerFor",t)("title",n.jc(1,2,"lang.setBindingDocument"))}}function QE(t,e){if(1&t&&(n.Wb(0,"div",114),n.Wb(1,"b"),n.Rb(2,"i",123),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.Lc("color",t.currentResourceInformations.priorityColor),n.Db(1),n.Sc(" ",t.currentResourceInformations.priorityLabel,"")}}function NE(t,e){if(1&t&&n.Rb(0,"i",124),2&t){const t=n.hc(2);n.Lc("color",t.senderLightInfo.filling)}}function zE(t,e){if(1&t&&(n.Wb(0,"div",114),n.Wb(1,"div"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"div",115),n.ic(5,"fullDate"),n.Qc(6),n.ic(7,"date"),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.Sc("",n.jc(3,3,"lang.returnDate")," :"),n.Db(2),n.oc("title",n.jc(5,5,t.currentResourceInformations.registeredMail_returnDate)),n.Db(2),n.Sc(" ",n.kc(7,7,t.currentResourceInformations.registeredMail_returnDate,"dd/MM/y")," ")}}function BE(t,e){if(1&t&&(n.Wb(0,"div",114),n.Wb(1,"div"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"div",115),n.Qc(5),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.Sc("",n.jc(3,3,"lang.returnReason")," :"),n.Db(2),n.oc("title",t.currentResourceInformations.registeredMail_returnReason),n.Db(1),n.Sc(" ",t.currentResourceInformations.registeredMail_returnReason,"")}}function UE(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div",126),n.ic(2,"fullDate"),n.Qc(3),n.ic(4,"translate"),n.ic(5,"timeAgo"),n.Rb(6,"i",127),n.Vb(),n.Tb()),2&t){const t=n.hc(3);n.Db(1),n.oc("title",n.jc(2,3,t.currentResourceInformations.closingDate)),n.Db(2),n.Tc(" ",n.jc(4,5,"lang.closed")," ",n.kc(5,7,t.currentResourceInformations.closingDate,"full"),"\xa0\xa0")}}function $E(t,e){if(1&t&&(n.Wb(0,"div"),n.Qc(1),n.ic(2,"translate"),n.Vb(),n.Rb(3,"div",128),n.ic(4,"fullDate"),n.ic(5,"timeLimit")),2&t){const t=n.hc(3);n.Db(1),n.Sc("",n.jc(2,3,"lang.processLimitDate")," :"),n.Db(2),n.oc("title",n.jc(4,5,t.currentResourceInformations.processLimitDate))("innerHTML",n.kc(5,7,t.currentResourceInformations.processLimitDate,"badge"),n.Ec)}}function HE(t,e){if(1&t&&(n.Wb(0,"div",114),n.Oc(1,UE,7,10,"ng-container",9),n.Oc(2,$E,6,10,"ng-template",null,125,n.Pc),n.Vb()),2&t){const t=n.zc(3),e=n.hc(2);n.Db(1),n.oc("ngIf",null!==e.currentResourceInformations.closingDate)("ngIfElse",t)}}function GE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",129),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).toggleIntegration(i.key)})),n.ic(1,"translate"),n.Rb(2,"mat-icon"),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.pc("matTooltip",n.jc(1,7,"lang."+t.key)),n.Db(2),n.Fb(t.value.icon),n.Ib("checked",i.currentResourceInformations.integrations[t.key])("unchecked",!i.currentResourceInformations.integrations[t.key])}}function XE(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"div",104),n.Wb(2,"span",105),n.Qc(3),n.Wb(4,"small",106),n.Qc(5),n.Vb(),n.Vb(),n.Rb(6,"div",46),n.Vb(),n.Wb(7,"div",12),n.Wb(8,"button",107),n.dc("click",(function(){return n.Dc(t),n.hc().toggleFollow()})),n.ic(9,"translate"),n.ic(10,"translate"),n.Rb(11,"mat-icon",108),n.Vb(),n.Oc(12,FE,4,8,"button",109),n.Oc(13,LE,3,4,"button",110),n.Wb(14,"mat-menu",null,111),n.Wb(16,"buton",112),n.dc("click",(function(){return n.Dc(t),n.hc().toggleBinding(!0)})),n.ic(17,"stripTags"),n.ic(18,"translate"),n.ic(19,"translate"),n.Vb(),n.Rb(20,"mat-divider"),n.Wb(21,"buton",112),n.dc("click",(function(){return n.Dc(t),n.hc().toggleBinding(!1)})),n.ic(22,"stripTags"),n.ic(23,"translate"),n.ic(24,"translate"),n.Vb(),n.Rb(25,"mat-divider"),n.Wb(26,"buton",98),n.dc("click",(function(){return n.Dc(t),n.hc().toggleBinding(null)})),n.ic(27,"translate"),n.Qc(28),n.ic(29,"translate"),n.Vb(),n.Rb(30,"mat-divider"),n.Vb(),n.Oc(31,QE,4,3,"div",113),n.Wb(32,"div",114),n.Wb(33,"div"),n.Qc(34),n.ic(35,"translate"),n.Vb(),n.Wb(36,"div",115),n.Qc(37),n.Vb(),n.Vb(),n.Wb(38,"div",116),n.dc("click",(function(){return n.Dc(t),n.hc().openContact()})),n.Wb(39,"div"),n.Qc(40),n.ic(41,"translate"),n.ic(42,"translate"),n.Vb(),n.Wb(43,"div",117),n.Qc(44),n.Oc(45,NE,1,2,"i",118),n.Vb(),n.Vb(),n.Oc(46,zE,8,10,"div",113),n.Oc(47,BE,6,5,"div",113),n.Oc(48,HE,4,2,"div",113),n.Wb(49,"div",119),n.Oc(50,GE,3,9,"button",120),n.ic(51,"keyvalue"),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=n.hc();n.Db(2),n.oc("title",t.currentResourceInformations.subject+" ("+t.currentResourceInformations.statusLabel+")"),n.Db(1),n.Sc(" ",t.currentResourceInformations.subject," "),n.Db(2),n.Rc(t.currentResourceInformations.statusLabel),n.Db(3),n.oc("title",t.resourceFollowed?n.jc(9,32,"lang.untrackThisMail"):n.jc(10,34,"lang.trackThisMail")),n.Db(3),n.Gb("followIcon ",t.resourceFollowed?"fas":"far"," fa-star"),n.Db(1),n.oc("ngIf",t.privilegeService.hasCurrentUserPrivilege("freeze_retention_rule")),n.Db(1),n.oc("ngIf",t.privilegeService.hasCurrentUserPrivilege("set_binding_document")),n.Db(3),n.Ib("isSelectedMenu",!0===t.resourceBinded),n.oc("title",n.jc(17,36,n.jc(18,38,"lang.bindingMail")))("innerHTML",n.jc(19,40,"lang.bindingMail"),n.Ec),n.Db(5),n.Ib("isSelectedMenu",!1===t.resourceBinded),n.oc("title",n.jc(22,42,n.jc(23,44,"lang.noBindingMail")))("innerHTML",n.jc(24,46,"lang.noBindingMail"),n.Ec),n.Db(5),n.Ib("isSelectedMenu",null===t.resourceBinded),n.oc("title",n.jc(27,48,"lang.doNotDefine")),n.Db(2),n.Sc(" ",n.jc(29,50,"lang.doNotDefine"),""),n.Db(3),n.oc("ngIf",void 0!==t.currentResourceInformations.priority),n.Db(3),n.Sc("",n.jc(35,52,"lang.chronoNumberShort")," :"),n.Db(2),n.oc("title","N\xb0 "+t.currentResourceInformations.resId),n.Db(1),n.Sc(" ",t.currentResourceInformations.chrono,""),n.Db(3),n.Sc(" ","outgoing"!==t.currentResourceInformations.categoryId?n.jc(41,54,"lang.senders"):n.jc(42,56,"lang.recipient")," :"),n.Db(4),n.Sc("",t.senderLightInfo.displayName," "),n.Db(1),n.oc("ngIf",t.senderLightInfo.filling),n.Db(1),n.oc("ngIf",!t.functions.empty(t.currentResourceInformations.registeredMail_returnDate)),n.Db(1),n.oc("ngIf",!t.functions.empty(t.currentResourceInformations.registeredMail_returnReason)),n.Db(1),n.oc("ngIf",void 0!==t.currentResourceInformations.processLimitDate),n.Db(2),n.oc("ngForOf",n.jc(51,58,t.integrationsInfo))}}function qE(t,e){1&t&&(n.Wb(0,"div",130),n.Rb(1,"mat-spinner",131),n.Vb())}function KE(t,e){if(1&t&&n.Rb(0,"app-document-viewer",132,133),2&t){const t=n.hc();n.oc("editMode",t.canEditData)("resId",t.currentResourceInformations.resId)("title",t.currentResourceInformations.chrono+" - "+t.currentResourceInformations.subject)}}function YE(t,e){if(1&t&&n.Rb(0,"app-history-list",61,62),2&t){const t=n.hc(2);n.oc("resId",t.currentResourceInformations.resId)}}function JE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-notes-list",63,64),n.dc("reloadBadgeNotes",(function(e){return n.Dc(t),n.hc(2).refreshBadge(e,"notes")})),n.Vb()}if(2&t){const t=n.hc(2);n.oc("editMode",!0)("resId",t.currentResourceInformations.resId)}}function ZE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-linked-resource-list",65,66),n.dc("reloadBadgeLinkedResources",(function(e){return n.Dc(t),n.hc(2).refreshBadge(e,"linkedResources")})),n.Vb()}if(2&t){const t=n.hc(2);n.oc("resId",t.currentResourceInformations.resId)}}function tF(t,e){if(1&t&&n.Rb(0,"app-diffusions-list",67,68),2&t){const t=n.hc(2);n.oc("adminMode",!0)("target",t.detailMode?"details":"process")("resId",t.currentResourceInformations.resId)("expanded",!0)}}function eF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-sent-resource-list",145,70),n.dc("reloadBadgeSentResource",(function(e){return n.Dc(t),n.hc(2).refreshBadge(e,"emails")})),n.Vb()}if(2&t){const t=n.hc(2);n.oc("resId",t.currentResourceInformations.resId)}}function iF(t,e){if(1&t&&n.Rb(0,"app-visa-workflow",146,72),2&t){const t=n.hc(2);n.oc("adminMode",t.privilegeService.hasCurrentUserPrivilege(t.detailMode?"config_visa_workflow_in_detail":"config_visa_workflow"))("resId",t.currentResourceInformations.resId)}}function nF(t,e){if(1&t&&n.Rb(0,"app-avis-workflow",71,73),2&t){const t=n.hc(2);n.oc("resId",t.currentResourceInformations.resId)("adminMode",t.privilegeService.hasCurrentUserPrivilege(t.detailMode?"config_avis_workflow_in_detail":"config_avis_workflow"))}}function aF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-attachments-list",147,75),n.dc("reloadBadgeAttachments",(function(e){return n.Dc(t),n.hc(2).refreshBadge(e,"attachments")})),n.Vb()}if(2&t){const t=n.hc(2);n.oc("resId",t.currentResourceInformations.resId)("autoOpenCreation",t.isMailing)}}function sF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-select-indexing-model",148,77),n.dc("afterSelectedListModel",(function(e){return n.Dc(t),n.hc(2).indexingForm.loadForm(e.id,!1)})),n.Vb()}if(2&t){const t=n.hc(2);n.oc("adminMode",t.canChangeModel)("indexingForm",t.indexingForm)("defaultIndexingModelId",t.currentResourceInformations.modelId)}}function oF(t,e){1&t&&(n.Rb(0,"div",78),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.dispositListGeneratedMsg"),n.Ec)}function rF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-indexing-form",149,80),n.dc("loadingFormEndEvent",(function(){return n.Dc(t),n.hc(2).triggerProcessAction()}))("retrieveDocumentEvent",(function(){return n.Dc(t),n.hc(2).appDocumentViewer.saveDocService()}))("afterSaveEvent",(function(){return n.Dc(t),n.hc(2).refreshData()})),n.Vb()}if(2&t){const t=n.hc(2);n.oc("groupId",t.currentGroupId)("indexingFormId",t.currentResourceInformations.modelId)("resId",t.currentResourceInformations.resId)("mode","process")("canEdit",t.canEditData)("hideDiffusionList",!0)}}function cF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",81),n.dc("click",(function(){return n.Dc(t),n.hc(2).confirmModification()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",82),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.saveModifications"))}function lF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",81),n.dc("click",(function(){return n.Dc(t),n.hc(2).saveListinstance()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",82),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.saveModifications"))}function dF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",81),n.dc("click",(function(){return n.Dc(t),n.hc(2).saveVisaWorkflow()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",82),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.saveModifications"))}function hF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",134),n.Wb(1,"div",135),n.Wb(2,"span"),n.Qc(3),n.Vb(),n.Wb(4,"button",136),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc().removeModal(i)})),n.Rb(5,"mat-icon",137),n.Vb(),n.Vb(),n.Wb(6,"div",138),n.Oc(7,YE,2,1,"app-history-list",49),n.Oc(8,JE,2,2,"app-notes-list",50),n.Oc(9,ZE,2,1,"app-linked-resource-list",51),n.Oc(10,tF,2,4,"app-diffusions-list",52),n.Oc(11,eF,2,1,"app-sent-resource-list",139),n.Oc(12,iF,2,2,"app-visa-workflow",140),n.Oc(13,nF,2,2,"app-avis-workflow",54),n.Oc(14,aF,2,2,"app-attachments-list",141),n.Oc(15,sF,2,3,"app-select-indexing-model",142),n.Oc(16,oF,2,3,"div",57),n.Oc(17,rF,2,6,"app-indexing-form",143),n.Wb(18,"div",144),n.Oc(19,cF,3,3,"button",60),n.Oc(20,lF,3,3,"button",60),n.Oc(21,dF,3,3,"button",60),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc();n.Gb("modal-module ",t.id," largeModal"),n.Db(3),n.Sc(" ",t.label," "),n.Db(4),n.oc("ngIf","history"===t.id&&!i.loading),n.Db(1),n.oc("ngIf","notes"===t.id&&!i.loading),n.Db(1),n.oc("ngIf","linkedResources"===t.id&&!i.loading),n.Db(1),n.oc("ngIf","diffusionList"===t.id&&!i.loading),n.Db(1),n.oc("ngIf","emails"===t.id&&!i.loading),n.Db(1),n.oc("ngIf","visaCircuit"===t.id&&!i.loading),n.Db(1),n.oc("ngIf","opinionCircuit"===t.id&&!i.loading),n.Db(1),n.oc("ngIf","attachments"===t.id&&!i.loading),n.Db(1),n.oc("ngIf","info"===t.id&&!i.loading),n.Db(1),n.oc("ngIf","info"===t.id&&!i.loading&&!i.functions.empty(i.currentResourceInformations.registeredMail_deposit_id)),n.Db(1),n.oc("ngIf","info"===t.id&&!i.loading),n.Db(2),n.oc("ngIf",void 0!==i.indexingForm&&i.indexingForm.isResourceModified()&&"info"===t.id),n.Db(1),n.oc("ngIf",void 0!==i.appDiffusionsList&&i.appDiffusionsList.isModified()&&"diffusionList"===t.id),n.Db(1),n.oc("ngIf",void 0!==i.appVisaWorkflow&&i.appVisaWorkflow.isModified()&&"visaCircuit"===t.id)}}const uF=function(t){return{width:t}};let pF=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c,l,d,h,u,p,b,f){this.translate=t,this.route=e,this._activatedRoute=i,this.http=n,this.dialog=a,this.headerService=s,this.filtersListService=o,this.notify=r,this.overlay=c,this.viewContainerRef=l,this.appService=d,this.actionService=h,this.contactService=u,this.router=p,this.privilegeService=b,this.functions=f,this.loading=!0,this.detailMode=!1,this.isMailing=!1,this.actionsList=[],this.currentUserId=null,this.currentBasketId=null,this.currentGroupId=null,this.selectedAction={id:0,label:"",component:"",default:!1,categoryUse:[]},this.currentResourceInformations={},this.processTool=[{id:"dashboard",icon:"fas fa-columns",label:this.translate.instant("lang.newsFeed"),count:0},{id:"history",icon:"fas fa-history",label:this.translate.instant("lang.history"),count:0},{id:"notes",icon:"fas fa-pen-square",label:this.translate.instant("lang.notesAlt"),count:0},{id:"attachments",icon:"fas fa-paperclip",label:this.translate.instant("lang.attachments"),count:0},{id:"linkedResources",icon:"fas fa-link",label:this.translate.instant("lang.links"),count:0},{id:"emails",icon:"fas fa-envelope",label:this.translate.instant("lang.mailsSentAlt"),count:0},{id:"diffusionList",icon:"fas fa-share-alt",label:this.translate.instant("lang.diffusionList"),editMode:!1,count:0},{id:"visaCircuit",icon:"fas fa-list-ol",label:this.translate.instant("lang.visaWorkflow"),count:0},{id:"opinionCircuit",icon:"fas fa-comment-alt",label:this.translate.instant("lang.avis"),count:0},{id:"info",icon:"fas fa-info-circle",label:this.translate.instant("lang.informations"),count:0}],this.modalModule=[],this.actionEnded=!1,this.canEditData=!1,this.canChangeModel=!1,this.autoAction=!1,this.integrationsInfo={inSignatureBook:{icon:"fas fa-file-signature"}},this.senderLightInfo={displayName:null,fillingRate:null},this.hasContact=!1,this.resourceFollowed=!1,this.resourceFreezed=!1,this.resourceBinded=!1,this.route.params.subscribe(t=>{this.loading=!0,this.headerService.sideBarForm=!0,this.headerService.showhHeaderPanel=!0,this.headerService.showMenuShortcut=!1,this.headerService.showMenuNav=!1,this.headerService.sideBarAdmin=!0,void 0!==t.detailResId?this.initDetailPage(t):this.initProcessPage(t)},t=>{this.notify.handleErrors(t)}),this.subscription=this.actionService.catchAction().subscribe(t=>{this.actionEnded=!0,this.router.navigate([`/basketList/users/${this.currentUserId}/groups/${this.currentGroupId}/baskets/${this.currentBasketId}`])})}ngOnInit(){this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu","form"),this.headerService.setHeader(this.translate.instant("lang.eventProcessDoc"))}checkAccesDocument(t){return new Promise((e,i)=>{this.http.get(`../rest/resources/${t}/isAllowed`).pipe(Object(mt.a)(t=>{t.isAllowed?e(!0):(this.notify.error(this.translate.instant("lang.documentOutOfPerimeter")),this.router.navigate(["/home"]))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.router.navigate(["/home"]),Object(c.a)(!1)))).subscribe()})}initProcessPage(t){return Object(r.a)(this,void 0,void 0,(function*(){this.detailMode=!1,this.currentUserId=t.userSerialId,this.currentGroupId=t.groupSerialId,this.currentBasketId=t.basketId,this.currentResourceInformations={resId:t.resId,mailtracking:!1},this.headerService.sideBarButton={icon:"fa fa-inbox",label:this.translate.instant("lang.backBasket"),route:`/basketList/users/${this.currentUserId}/groups/${this.currentGroupId}/baskets/${this.currentBasketId}`},yield this.checkAccesDocument(this.currentResourceInformations.resId),this.actionService.lockResource(this.currentUserId,this.currentGroupId,this.currentBasketId,[this.currentResourceInformations.resId]),this.loadBadges(),this.loadResource(),this.appService.getViewMode()&&setTimeout(()=>{this.headerService.sideNavLeft.open()},800),this.http.get(`../rest/resourcesList/users/${this.currentUserId}/groups/${this.currentGroupId}/baskets/${this.currentBasketId}/actions?resId=${this.currentResourceInformations.resId}`).pipe(Object(l.a)(t=>(t.actions=t.actions.map((t,e)=>({id:t.id,label:t.label,component:t.component,categoryUse:t.categories})),t)),Object(mt.a)(t=>{this.selectedAction=t.actions[0],this.actionsList=t.actions}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}))}initDetailPage(t){return Object(r.a)(this,void 0,void 0,(function*(){this._activatedRoute.queryParamMap.subscribe(t=>{this.isMailing=!this.functions.empty(t.get("isMailing"))}),this.detailMode=!0,this.currentResourceInformations={resId:t.detailResId,mailtracking:!1,retentionFrozen:!1},this.headerService.sideBarButton={icon:"fas fa-arrow-left",label:this.translate.instant("lang.back"),route:"__GOBACK"},yield this.checkAccesDocument(this.currentResourceInformations.resId),this.loadBadges(),this.loadResource(),this.appService.getViewMode()&&setTimeout(()=>{this.headerService.sideNavLeft.open()},800)}))}isActionEnded(){return this.actionEnded}loadResource(t=!0){this.http.get(`../rest/resources/${this.currentResourceInformations.resId}?light=true`).pipe(Object(mt.a)(e=>{this.currentResourceInformations=e,this.resourceFollowed=e.followed,this.resourceBinded=e.binding,this.resourceFreezed=e.retentionFrozen,"outgoing"!==this.currentResourceInformations.categoryId?this.loadSenders():this.loadRecipients(),t&&this.setEditDataPrivilege(),this.loadAvaibleIntegrations(e.integrations),this.headerService.setHeader(this.translate.instant(this.detailMode?"lang.detailDoc":"lang.eventProcessDoc"),this.translate.instant("lang."+this.currentResourceInformations.categoryId))}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}setEditDataPrivilege(){this.detailMode?(this.http.get("../rest/search/configuration").pipe(Object(mt.a)(t=>{this.currentTool=null==t.configuration.listEvent.defaultTab?"dashboard":t.configuration.listEvent.defaultTab}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe(),this.canEditData=this.privilegeService.hasCurrentUserPrivilege("edit_resource")&&this.currentResourceInformations.statusAlterable&&this.functions.empty(this.currentResourceInformations.registeredMail_deposit_id),this.isMailing&&this.isToolEnabled("attachments")&&(this.currentTool="attachments",setTimeout(()=>{this.isMailing=!1},200))):this.http.get(`../rest/resources/${this.currentResourceInformations.resId}/users/${this.currentUserId}/groups/${this.currentGroupId}/baskets/${this.currentBasketId}/processingData`).pipe(Object(mt.a)(t=>{null!==t.listEventData&&(this.isToolEnabled(t.listEventData.defaultTab)&&(this.currentTool=t.listEventData.defaultTab),this.canEditData=t.listEventData.canUpdateData&&this.functions.empty(this.currentResourceInformations.registeredMail_deposit_id),this.canChangeModel=t.listEventData.canUpdateModel)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}loadAvaibleIntegrations(t){this.integrationsInfo.inSignatureBook.enable=!this.functions.empty(t.inSignatureBook)&&t.inSignatureBook,this.http.get("../rest/externalConnectionsEnabled").pipe(Object(mt.a)(t=>{Object.keys(t.connection).filter(t=>"maarchParapheur"!==t).forEach(t=>{"maileva"===t&&(this.integrationsInfo.inShipping={icon:"fas fa-shipping-fast"})})}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}toggleIntegration(t){this.http.put("../rest/resourcesList/integrations",{resources:[this.currentResourceInformations.resId],integrations:{[t]:!this.currentResourceInformations.integrations[t]}}).pipe(Object(mt.a)(()=>{this.currentResourceInformations.integrations[t]=!this.currentResourceInformations.integrations[t],this.notify.success(this.translate.instant("lang.actionDone"))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}loadBadges(){this.http.get(`../rest/resources/${this.currentResourceInformations.resId}/items`).pipe(Object(mt.a)(t=>{this.processTool.forEach(e=>{e.count=void 0!==t[e.id]?t[e.id]:0})}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}loadSenders(){void 0===this.currentResourceInformations.senders||0===this.currentResourceInformations.senders.length?(this.hasContact=!1,this.senderLightInfo={displayName:this.translate.instant("lang.noSelectedContact"),filling:null}):1===this.currentResourceInformations.senders.length?(this.hasContact=!0,"contact"===this.currentResourceInformations.senders[0].type?this.http.get("../rest/contacts/"+this.currentResourceInformations.senders[0].id).pipe(Object(mt.a)(t=>{const e=[];this.empty(t.firstname)&&this.empty(t.lastname)?this.senderLightInfo=this.functions.empty(t.fillingRate)?{displayName:t.company}:{displayName:t.company,filling:this.contactService.getFillingColor(t.fillingRate.thresholdLevel)}:(e.push(t.firstname),e.push(t.lastname),this.empty(t.company)||e.push("("+t.company+")"),this.senderLightInfo=this.functions.empty(t.fillingRate)?{displayName:e.filter(t=>""!==t).join(" ")}:{displayName:e.filter(t=>""!==t).join(" "),filling:this.contactService.getFillingColor(t.fillingRate.thresholdLevel)})})).subscribe():"entity"===this.currentResourceInformations.senders[0].type?this.http.get("../rest/entities/"+this.currentResourceInformations.senders[0].id).pipe(Object(mt.a)(t=>{this.senderLightInfo={displayName:t.entity_label,filling:null}})).subscribe():"user"===this.currentResourceInformations.senders[0].type&&this.http.get("../rest/users/"+this.currentResourceInformations.senders[0].id).pipe(Object(mt.a)(t=>{this.senderLightInfo={displayName:t.firstname+" "+t.lastname,filling:null}})).subscribe()):this.currentResourceInformations.senders.length>1&&(this.hasContact=!0,this.senderLightInfo={displayName:this.currentResourceInformations.senders.length+" "+this.translate.instant("lang.senders"),filling:null})}loadRecipients(){void 0===this.currentResourceInformations.recipients||0===this.currentResourceInformations.recipients.length?(this.hasContact=!1,this.senderLightInfo={displayName:this.translate.instant("lang.noSelectedContact"),filling:null}):1===this.currentResourceInformations.recipients.length?(this.hasContact=!0,"contact"===this.currentResourceInformations.recipients[0].type?this.http.get("../rest/contacts/"+this.currentResourceInformations.recipients[0].id).pipe(Object(mt.a)(t=>{const e=[];this.empty(t.firstname)&&this.empty(t.lastname)?this.senderLightInfo=this.functions.empty(t.fillingRate)?{displayName:t.company}:{displayName:t.company,filling:this.contactService.getFillingColor(t.fillingRate.thresholdLevel)}:(e.push(t.firstname),e.push(t.lastname),this.empty(t.company)||e.push("("+t.company+")"),this.senderLightInfo=this.functions.empty(t.fillingRate)?{displayName:e.filter(t=>""!==t).join(" ")}:{displayName:e.filter(t=>""!==t).join(" "),filling:this.contactService.getFillingColor(t.fillingRate.thresholdLevel)})})).subscribe():"entity"===this.currentResourceInformations.recipients[0].type?this.http.get("../rest/entities/"+this.currentResourceInformations.recipients[0].id).pipe(Object(mt.a)(t=>{this.senderLightInfo={displayName:t.entity_label,filling:null}})).subscribe():"user"===this.currentResourceInformations.recipients[0].type&&this.http.get("../rest/users/"+this.currentResourceInformations.recipients[0].id).pipe(Object(mt.a)(t=>{this.senderLightInfo={displayName:t.firstname+" "+t.lastname,filling:null}})).subscribe()):this.currentResourceInformations.recipients.length>1&&(this.hasContact=!0,this.senderLightInfo={displayName:this.currentResourceInformations.recipients.length+" "+this.translate.instant("lang.recipients"),filling:null})}onSubmit(){"info"===this.currentTool||this.isModalOpen("info")?this.processAction():this.isToolModified()?this.openConfirmModification().afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.saveTool()}),Object(Xt.a)(()=>{this.autoAction=!0,this.currentTool="info"}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe():(this.autoAction=!0,this.currentTool="info")}triggerProcessAction(){this.autoAction&&(this.processAction(),this.autoAction=!this.autoAction)}processAction(){return Object(r.a)(this,void 0,void 0,(function*(){this.indexingForm.isValidForm()?(this.actionService.loading=!0,this.isToolModified()?this.openConfirmModification().afterClosed().pipe(Object(mt.a)(t=>{"ok"!==t&&(this.refreshTool(),this.actionService.loading=!1)}),Object(mt.a)(t=>Object(r.a)(this,void 0,void 0,(function*(){"ok"===t&&(yield this.saveTool()),this.appDocumentViewer.isEditingTemplate()&&(yield this.appDocumentViewer.saveMainDocument()),this.actionService.launchAction(this.selectedAction,this.currentUserId,this.currentGroupId,this.currentBasketId,[this.currentResourceInformations.resId],this.currentResourceInformations,!1)}))),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.actionService.loading=!1,Object(c.a)(!1)))).subscribe():(this.appDocumentViewer.isEditingTemplate()&&(yield this.appDocumentViewer.saveMainDocument()),this.actionService.launchAction(this.selectedAction,this.currentUserId,this.currentGroupId,this.currentBasketId,[this.currentResourceInformations.resId],this.currentResourceInformations,!1))):this.notify.error(this.translate.instant("lang.mustFixErrors"))}))}showActionInCurrentCategory(t){if(-1===this.selectedAction.categoryUse.indexOf(this.currentResourceInformations.categoryId)){const t=this.actionsList.filter(t=>t.categoryUse.indexOf(this.currentResourceInformations.categoryId)>-1)[0];this.selectedAction=void 0!==t?this.actionsList.filter(t=>t.categoryUse.indexOf(this.currentResourceInformations.categoryId)>-1)[0]:{id:0,label:"",component:"",default:!1,categoryUse:[]}}return t.categoryUse.indexOf(this.currentResourceInformations.categoryId)>-1}selectAction(t){this.selectedAction=t}createModal(){this.modalModule.push(this.processTool.filter(t=>t.id===this.currentTool)[0])}openTechnicalInfo(){this.dialog.open(LR,{panelClass:"maarch-modal",autoFocus:!1,data:{resId:this.currentResourceInformations.resId}})}removeModal(t){"info"===this.modalModule[t].id&&this.indexingForm.isResourceModified()?this.openConfirmModification().afterClosed().pipe(Object(mt.a)(e=>{"ok"!==e&&this.modalModule.splice(t,1)}),Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.indexingForm.saveData(),setTimeout(()=>{this.loadResource(!1)},400),this.modalModule.splice(t,1)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe():this.modalModule.splice(t,1)}isModalOpen(t=this.currentTool){return this.modalModule.map(t=>t.id).indexOf(t)>-1}ngOnDestroy(){this.detailMode||(this.actionService.stopRefreshResourceLock(),this.actionService.actionEnded||this.actionService.unlockResource(this.currentUserId,this.currentGroupId,this.currentBasketId,[this.currentResourceInformations.resId])),this.subscription.unsubscribe()}changeTab(t){this.isToolModified()&&!this.isModalOpen()?this.openConfirmModification().afterClosed().pipe(Object(mt.a)(e=>{"ok"!==e&&(this.currentTool=t)}),Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.saveTool(),setTimeout(()=>{this.loadResource(!1)},400),this.currentTool=t}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe():this.currentTool=t}openConfirmModification(){return this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.confirm"),msg:this.translate.instant("lang.saveModifiedData"),buttonValidate:this.translate.instant("lang.yes"),buttonCancel:this.translate.instant("lang.no")}})}confirmModification(){this.indexingForm.saveData(),setTimeout(()=>{this.loadResource(!1)},400)}saveModificationBeforeClose(){return Object(r.a)(this,void 0,void 0,(function*(){this.isToolModified()&&!this.isModalOpen()&&(yield this.saveTool()),this.appDocumentViewer.isEditingTemplate()&&(yield this.appDocumentViewer.saveMainDocument())}))}refreshData(){this.appDocumentViewer.loadRessource(this.currentResourceInformations.resId)}refreshBadge(t,e){this.processTool.filter(t=>t.id===e)[0].count=t}openContact(){this.hasContact&&this.dialog.open(YD,{panelClass:"maarch-modal",data:{title:`${this.currentResourceInformations.chrono} - ${this.currentResourceInformations.subject}`,mode:"outgoing"!==this.currentResourceInformations.categoryId?"senders":"recipients",resId:this.currentResourceInformations.resId}})}saveListinstance(){this.appDiffusionsList.saveListinstance()}saveVisaWorkflow(){this.appVisaWorkflow.saveVisaWorkflow()}isToolModified(){return!!("info"===this.currentTool&&void 0!==this.indexingForm&&this.indexingForm.isResourceModified()||"diffusionList"===this.currentTool&&void 0!==this.appDiffusionsList&&this.appDiffusionsList.isModified()||"visaCircuit"===this.currentTool&&void 0!==this.appVisaWorkflow&&this.appVisaWorkflow.isModified()||"opinionCircuit"===this.currentTool&&void 0!==this.appAvisWorkflow&&this.appAvisWorkflow.isModified()||"notes"===this.currentTool&&void 0!==this.appNotesList&&this.appNotesList.isModified())}refreshTool(){const t=this.currentTool;this.currentTool="",setTimeout(()=>{this.currentTool=t},0)}saveTool(){return Object(r.a)(this,void 0,void 0,(function*(){"info"===this.currentTool&&void 0!==this.indexingForm?(yield this.indexingForm.saveData(),setTimeout(()=>{this.loadResource(!1)},400)):"diffusionList"===this.currentTool&&void 0!==this.appDiffusionsList?(yield this.appDiffusionsList.saveListinstance(),this.loadBadges()):"visaCircuit"===this.currentTool&&void 0!==this.appVisaWorkflow?(yield this.appVisaWorkflow.saveVisaWorkflow(),this.loadBadges()):"opinionCircuit"===this.currentTool&&void 0!==this.appAvisWorkflow?(yield this.appAvisWorkflow.saveAvisWorkflow(),this.loadBadges()):"notes"===this.currentTool&&void 0!==this.appNotesList&&(this.appNotesList.addNote(),this.loadBadges())}))}empty(t){return null==t||(Array.isArray(t)?!(t.length>0):""===String(t))}toggleFollow(){this.resourceFollowed=!this.resourceFollowed,this.resourceFollowed?this.http.post("../rest/resources/follow",{resources:[this.currentResourceInformations.resId]}).pipe(Object(mt.a)(()=>this.headerService.nbResourcesFollowed++),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe():this.http.request("DELETE","../rest/resources/unfollow",{body:{resources:[this.currentResourceInformations.resId]}}).pipe(Object(mt.a)(()=>this.headerService.nbResourcesFollowed--),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}toggleFreezing(){this.resourceFreezed=!this.resourceFreezed,this.http.put("../rest/archival/freezeRetentionRule",{resources:[this.currentResourceInformations.resId],freeze:this.resourceFreezed}).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant(this.resourceFreezed?"lang.retentionRuleFrozen":"lang.retentionRuleUnfrozen"))}),Object(m.a)(t=>(this.resourceFreezed=!this.resourceFreezed,this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}toggleBinding(t){this.resourceBinded=t,this.http.put("../rest/archival/binding",{resources:[this.currentResourceInformations.resId],binding:t}).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant(t?"lang.bindingMail":!1===t?"lang.noBindingMail":"lang.bindingUndefined"))}),Object(m.a)(t=>(this.resourceBinded=!this.resourceBinded,this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isToolEnabled(t){return"history"!==t||!(!this.privilegeService.hasCurrentUserPrivilege("view_full_history")&&!this.privilegeService.hasCurrentUserPrivilege("view_doc_history"))}openPrintedFolderPrompt(){this.dialog.open(jR,{panelClass:"maarch-modal",data:{resId:this.currentResourceInformations.resId}})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(o.a),n.Qb(o.a),n.Qb(v.b),n.Qb(q.b),n.Qb(y.a),n.Qb(sI),n.Qb(D.a),n.Qb(ZD.c),n.Qb(n.T),n.Qb(w.a),n.Qb(bC),n.Qb(lc),n.Qb(o.c),n.Qb(Dt.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(KT,!0),n.Kc(YT,!0),n.Xc(JT,!0),n.Xc(ZT,!0),n.Xc(tE,!0),n.Xc(eE,!0),n.Xc(iE,!0),n.Xc(nE,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.appDocumentViewer=i.first),n.yc(i=n.ec())&&(e.indexingForm=i.first),n.yc(i=n.ec())&&(e.appDiffusionsList=i.first),n.yc(i=n.ec())&&(e.appVisaWorkflow=i.first),n.yc(i=n.ec())&&(e.appAvisWorkflow=i.first),n.yc(i=n.ec())&&(e.appNotesList=i.first))},features:[n.Cb([bC,lc])],decls:21,vars:18,consts:[[1,"maarch-container"],["adminMenuTemplate",""],[1,"process-content"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content",2,"padding-bottom","20px"],[1,"resourceInfo"],[4,"ngIf","ngIfElse"],["elseInfoRes",""],[1,"document-container"],[1,"content"],["style","height:100%;width:100%;",3,"editMode","resId","title",4,"ngIf"],["cdkDrag","","cdkDragBoundary",".process-content",3,"class",4,"ngFor","ngForOf"],["position","end","autoFocus","false",1,"panel-right",2,"overflow-x","hidden",3,"fixedInViewport","opened","mode","ngStyle"],["snav2",""],["class","alert-message alert-message-danger","style","min-width: 100%; margin: 10px 0;",4,"ngIf"],[1,"listModels"],[1,"processTool"],["class","processTool-module jiggle","matRipple","",3,"processTool-module-active","tool-disabled","click",4,"ngFor","ngForOf"],[1,"indexing-form-container"],["style","display: flex;justify-content: flex-end;",4,"ngIf"],[4,"ngIf"],["elseTemplate",""],["class","actions-indexing-form",4,"ngIf"],[1,"alert-message","alert-message-danger",2,"min-width","100%","margin","10px 0"],["style","display: flex;align-items: center;",4,"ngIf"],[2,"display","flex","align-items","center"],[1,"fas","fa-snowflake",2,"width","25px","text-align","center"],[3,"innerHTML"],[1,"fas","fa-exclamation",2,"width","25px","text-align","center"],[1,"fa","fa-info-circle",2,"cursor","help","opacity","0.5",3,"title"],["matRipple","",1,"processTool-module","jiggle",3,"click"],["class","fas fa-circle haveContent",4,"ngIf"],[1,"fas","fa-circle","haveContent"],[2,"display","flex","justify-content","flex-end"],["mat-icon-button","","color","primary",3,"title","click",4,"ngIf"],["mat-icon-button","","color","primary",3,"title","click"],[1,"fas","fa-external-link-alt"],[1,"far","fa-file-code"],[2,"display","flex","align-items","center","justify-content","flex-end","margin-top","10px","margin-bottom","-20px"],["mat-button","","color","primary",3,"title","click"],[1,"fa","fa-print",2,"height","auto"],[1,"banner"],[1,"title",3,"click"],[1,"title-divider"],[3,"resId","goTo",4,"ngIf"],[3,"resId","goTo"],[3,"resId",4,"ngIf"],[3,"editMode","resId","reloadBadgeNotes",4,"ngIf"],[3,"resId","reloadBadgeLinkedResources",4,"ngIf"],[3,"adminMode","target","resId","expanded",4,"ngIf"],[3,"resId","currentUserId","currentGroupId","currentBasketId","reloadBadgeSentResource",4,"ngIf"],[3,"resId","adminMode",4,"ngIf"],[3,"resId","autoOpenCreation","target","reloadBadgeAttachments",4,"ngIf"],[3,"defaultIndexingModelId","adminMode","indexingForm","afterSelectedListModel",4,"ngIf"],["class","alert-message alert-message-info","style","min-width: 100%;",3,"innerHTML",4,"ngIf"],[3,"groupId","resId","indexingFormId","mode","canEdit","hideDiffusionList","loadingFormEndEvent","retrieveDocumentEvent","afterSaveEvent",4,"ngIf"],[2,"position","sticky","bottom","0px","text-align","right"],["mat-fab","","color","accent",3,"title","click",4,"ngIf"],[3,"resId"],["appHistoryList",""],[3,"editMode","resId","reloadBadgeNotes"],["appNotesList",""],[3,"resId","reloadBadgeLinkedResources"],["appLinkedResourceList",""],[3,"adminMode","target","resId","expanded"],["appDiffusionsList",""],[3,"resId","currentUserId","currentGroupId","currentBasketId","reloadBadgeSentResource"],["appSentResource",""],[3,"resId","adminMode"],["appVisaWorkflow",""],["appAvisWorkflow",""],[3,"resId","autoOpenCreation","target","reloadBadgeAttachments"],["appAttachmentsList",""],[3,"defaultIndexingModelId","adminMode","indexingForm","afterSelectedListModel"],["appSelectIndexingModel",""],[1,"alert-message","alert-message-info",2,"min-width","100%",3,"innerHTML"],[3,"groupId","resId","indexingFormId","mode","canEdit","hideDiffusionList","loadingFormEndEvent","retrieveDocumentEvent","afterSaveEvent"],["indexingForm",""],["mat-fab","","color","accent",3,"title","click"],[1,"fas","fa-check",2,"height","auto","font-size","20px"],[1,"openedModal"],[1,"actions-indexing-form"],["class","emptyAction",3,"innerHTML",4,"ngIf"],["mat-button","",1,"button-form-primary",2,"width","350px","margin-right","20px",3,"disabled","matMenuTriggerFor","title"],[1,"menu-label",3,"innerHTML"],[1,"fa","fa-chevron-down","menu-icon"],["menu","matMenu"],[1,"menuTitle"],["floatLabel","never","appearance","outline",1,"smallInput",3,"click"],["matInput","","id","searchTerm","autocomplete","off",3,"placeholder","click","keydown"],["listFilter",""],[4,"ngFor","ngForOf"],["mat-button","","class","button-form-primary-filled","style","width: 150px;align-items: center;justify-content: center;text-align: center;display: flex;",3,"disabled","click",4,"ngIf"],["mat-icon-button","","class","button-form-primary",3,"click",4,"ngIf"],["mat-menu-item","",3,"title","listModels-menu-selected","click",4,"ngIf"],["mat-menu-item","",3,"title","click"],[2,"flex","1"],["mat-button","",1,"button-form-primary-filled",2,"width","150px","align-items","center","justify-content","center","text-align","center","display","flex",3,"disabled","click"],["mat-icon-button","",1,"button-form-primary",3,"click"],[1,"fa","fa-check"],[1,"emptyAction",3,"innerHTML"],[1,"title"],[2,"white-space","nowrap","padding-left","10px","padding-right","10px",3,"title"],[1,"subSubject"],["mat-icon-button","",1,"categoryLabel",3,"title","click"],[2,"font-size","20px"],["mat-icon-button","","class","categoryLabel",3,"title","click",4,"ngIf"],["mat-icon-button","","class","categoryLabel",3,"matMenuTriggerFor","title",4,"ngIf"],["bindingRentalRule","matMenu"],["mat-menu-item","",3,"title","innerHTML","click"],["class","content-item",4,"ngIf"],[1,"content-item"],[1,"content-item-value",3,"title"],[1,"content-item",2,"cursor","pointer",3,"click"],[1,"content-item-value"],["class","fas fa-circle","style","font-size: 8px",3,"color",4,"ngIf"],[2,"position","absolute","right","0px","top","0px","height","100%","display","flex","flex-direction","column","justify-content","center"],["mat-icon-button","",3,"matTooltip","click",4,"ngFor","ngForOf"],["mat-icon-button","",1,"categoryLabel",3,"matMenuTriggerFor","title"],[1,"bindIcon","fas","fa-exclamation",2,"font-size","20px"],[1,"fas","fa-flag",2,"font-size","25px","padding-right","20px"],[1,"fas","fa-circle",2,"font-size","8px"],["elseLimitDate",""],[2,"font-weight","bold",3,"title"],[1,"fa","fa-lock"],[1,"content-item-value",3,"title","innerHTML"],["mat-icon-button","",3,"matTooltip","click"],[1,"loadingBanner"],["diameter","35"],[2,"height","100%","width","100%",3,"editMode","resId","title"],["appDocumentViewer",""],["cdkDrag","","cdkDragBoundary",".process-content"],["cdkDragHandle","",1,"modal-module-title"],["mat-icon-button","",3,"click"],[1,"fas","fa-times"],[1,"modal-module-content"],[3,"resId","reloadBadgeSentResource",4,"ngIf"],[3,"adminMode","resId",4,"ngIf"],[3,"resId","autoOpenCreation","reloadBadgeAttachments",4,"ngIf"],[3,"adminMode","indexingForm","defaultIndexingModelId","afterSelectedListModel",4,"ngIf"],[3,"groupId","indexingFormId","resId","mode","canEdit","hideDiffusionList","loadingFormEndEvent","retrieveDocumentEvent","afterSaveEvent",4,"ngIf"],[2,"position","sticky","bottom","0px","text-align","right","padding","15px"],[3,"resId","reloadBadgeSentResource"],[3,"adminMode","resId"],[3,"resId","autoOpenCreation","reloadBadgeAttachments"],[3,"adminMode","indexingForm","defaultIndexingModelId","afterSelectedListModel"],[3,"groupId","indexingFormId","resId","mode","canEdit","hideDiffusionList","loadingFormEndEvent","retrieveDocumentEvent","afterSaveEvent"]],template:function(t,e){if(1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,EE,11,7,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content",2),n.Wb(4,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",6),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Wb(10,"div",7),n.Wb(11,"div",8),n.Oc(12,XE,52,60,"ng-container",9),n.Oc(13,qE,2,0,"ng-template",null,10,n.Pc),n.Vb(),n.Vb(),n.Vb(),n.Wb(15,"div",11),n.Wb(16,"div",12),n.Oc(17,KE,2,3,"app-document-viewer",13),n.Vb(),n.Vb(),n.Oc(18,hF,22,18,"div",14),n.Vb(),n.Rb(19,"mat-sidenav",15,16),n.Vb()),2&t){const t=n.zc(14);n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",!e.loading)("ngIfElse",t),n.Db(3),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",!e.loading),n.Db(1),n.oc("ngForOf",e.modalModule),n.Db(1),n.Ib("docView",!e.filtersListService.filterMode),n.oc("fixedInViewport",e.appService.getViewMode())("opened",(e.appService.getViewMode(),!1))("mode",e.appService.getViewMode()?"over":"side")("ngStyle",n.vc(16,uF,e.appService.getViewMode()?"80%":"30%"))}},directives:[I.e,I.f,Ot,We,P.t,P.s,I.d,P.w,W.u,k.b,S.a,GR,ZR,rj,mj,iO,kC,Fk,im,uW,Ko,Qv,Sg,yW,qT,ne.d,ne.e,Y.c,J.b,ne.b,T.a,A.b,V.c,Jr,lo.a,lo.b],pipes:[g.d,rg,Tt.r,P.l,uo,P.f,ps,bs],styles:[".document-container[_ngcontent-%COMP%]{flex:1;padding-left:50px;padding-right:50px;color:#fff;margin-top:0;width:100%;overflow:hidden;background-color:#135f7f}@media (max-width:768px){.document-container[_ngcontent-%COMP%]{padding-left:0;padding-right:0}}.document-container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{overflow-y:auto;overflow-x:hidden;position:relative;height:100%;min-height:200px;width:100%;border-radius:0;box-shadow:none;border:1px solid #fff;justify-content:center;display:flex;align-items:center;text-align:center;font-weight:700;flex-direction:column}.indexing-form-container[_ngcontent-%COMP%]{position:relative;height:100%;overflow:auto;padding-left:20px;padding-right:20px;padding-bottom:20px}@media (max-width:768px){.indexing-form-container[_ngcontent-%COMP%]{padding-right:0;padding-left:0}}.actions-indexing-form[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;box-shadow:0 -5px 10px 0 rgba(0,0,0,.07);padding:10px 40px}@media (max-width:768px){.actions-indexing-form[_ngcontent-%COMP%]{padding-left:0;padding-right:0}}.emptyModel[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;align-items:center;justify-content:center;text-align:center;padding-left:20px;padding-right:20px;font-size:25px;opacity:.3;font-weight:700}.listModels[_ngcontent-%COMP%]{background:#f9f9f9;display:flex;padding:10px 40px}@media (max-width:768px){.listModels[_ngcontent-%COMP%]{padding-bottom:20px;padding-left:0;padding-right:0}}.listModels[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{font-size:20px;height:auto}.listModels-button[_ngcontent-%COMP%]{margin-right:20px;width:450px!important} .listModels-menu{min-width:450px!important} .listModels-menu .mat-menu-item:hover:hover .listModels-menu-badge{background:#fff!important;color:#135f7f!important} .listModels-menu .mat-menu-item:hover:hover .listModels-menu-delete .mat-icon{color:#fff!important} .listModels-menu-badge{font-size:70%;background:#135f7f;border-radius:20px;color:#fff;padding:2px 5px;font-weight:700} .listModels-menu-delete .mat-icon{margin-right:0} .listModels-menu-selected{color:#fff!important;background:#135f7f} .listModels-menu-selected .listModels-menu-badge{background:#fff!important;color:#135f7f!important}.emptyAction[_ngcontent-%COMP%]{color:#8e3e52;font-size:14px;text-align:center}.loading[_ngcontent-%COMP%]{display:flex;height:100%;position:absolute;width:100%;background:hsla(0,0%,100%,.7294117647058823);z-index:2}.loadingBanner[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center} .menuAction{min-width:350px!important}.resourceInfo[_ngcontent-%COMP%]{display:flex;flex-direction:column;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px 40px 20px 20px;background:#1a80ab;width:100%}.resourceInfo[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#fff}.resourceInfo[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#1a80ab;height:1px}.resourceInfo[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{display:flex;font-size:15px;overflow:auto}.resourceInfo[_ngcontent-%COMP%] .content-item[_ngcontent-%COMP%]{flex-direction:column;align-items:center;justify-content:center;display:flex;flex:1;padding-left:20px;padding-right:20px;white-space:pre}.resourceInfo[_ngcontent-%COMP%] .content-item-value[_ngcontent-%COMP%]{font-weight:700;display:flex;align-items:center}.resourceInfo[_ngcontent-%COMP%] .content-item-value[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{padding-left:10px}.processTool[_ngcontent-%COMP%]{width:100%;display:grid;grid-template-columns:20% 20% 20% 20% 20%;background-color:#fff;color:#b3b3b3;border:1px solid #dedede;padding:5px;border-radius:15px;text-align:center}.processTool-module[_ngcontent-%COMP%]{display:flex;justify-content:center;flex-direction:column;padding:5px;border-right:1px solid #dedede;cursor:pointer;transition:all .3s}.processTool-module[_ngcontent-%COMP%]:nth-child(-n+5){border-bottom:1px solid #dedede}.processTool-module[_ngcontent-%COMP%]:nth-child(5n){border-right:none}.processTool-module[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:30px}.processTool-module[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{white-space:pre;font-size:10px}.processTool-module-active[_ngcontent-%COMP%]{font-weight:700;color:#135f7f}.processTool-module[_ngcontent-%COMP%]:hover:not(.tool-disabled){transition:all .3s;color:#135f7f}.haveContent[_ngcontent-%COMP%]{position:absolute;right:15px;top:15px;font-size:10px!important;color:#f99830}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{cursor:pointer}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{overflow:auto;max-height:300px}.jiggle[_ngcontent-%COMP%]:active:not(.tool-disabled) i[_ngcontent-%COMP%]{-webkit-animation:jiggle .2s;-moz-animation-duration:.2s;-moz-animation-name:jiggle;-moz-animation-iteration-count:2;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg)}@-webkit-keyframes jiggle{0%{-webkit-transform:rotate(-9deg)}50%{-webkit-transform:rotate(9deg)}}.modal-module[_ngcontent-%COMP%]{background:#fff;position:absolute;right:50px;z-index:1;box-shadow:10px 10px 21px -15px rgba(0,0,0,.75);border-radius:5px;padding:10px;width:400px}.modal-module-title[_ngcontent-%COMP%]{cursor:move;color:#fff;padding-left:10px;padding-right:10px;background:#f99830;margin-top:-10px;margin-left:-10px;margin-right:-10px;border-top-left-radius:5px;border-top-right-radius:5px;display:flex;align-items:center}.modal-module-title[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:flex;flex:1}.modal-module-content[_ngcontent-%COMP%]{overflow:auto;max-height:500px}.openedModal[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;justify-content:center;align-items:center;font-size:30px;font-weight:700;opacity:.2}.largeModal[_ngcontent-%COMP%]{width:560px}.menuTitle[_ngcontent-%COMP%]{display:flex;padding-left:20px;align-items:center;color:#135f7f;font-weight:700}.smallInput[_ngcontent-%COMP%]{padding:10px}.smallInput[_ngcontent-%COMP%] .mat-form-field-wrapper{padding-bottom:0}.followIcon[_ngcontent-%COMP%], .freezeUnfreezIcon[_ngcontent-%COMP%]{color:#f99830}.nonFreeze[_ngcontent-%COMP%]{color:#135f7f}.bindIcon[_ngcontent-%COMP%]{color:#f99830;margin-left:5px}.tool-disabled[_ngcontent-%COMP%]{cursor:not-allowed;opacity:.3}.checked[_ngcontent-%COMP%]{opacity:1;color:#f99830}.unchecked[_ngcontent-%COMP%]{opacity:.5}.emails[_ngcontent-%COMP%], .linkedResources[_ngcontent-%COMP%]{width:600px}.subSubject[_ngcontent-%COMP%]{color:#f99830}.isSelectedMenu[_ngcontent-%COMP%]{background:#f99830}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();const bF=["adminMenuTemplate"],fF=["appSelectIndexingModel"],mF=["indexingForm"],gF=["appDocumentViewer"];function vF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-indexing-form",19,20),n.dc("retrieveDocumentEvent",(function(){return n.Dc(t),n.hc(3),n.zc(13).saveDocService()})),n.Vb()}if(2&t){const t=n.hc(3);n.oc("groupId",t.currentGroupId)("indexingFormId",t.currentIndexingModel.id)}}function _F(t,e){1&t&&(n.Wb(0,"small",36),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.badActionParam")))}function yF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",33),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(4).selectAction(e)})),n.Wb(1,"span",34),n.Qc(2),n.Vb(),n.Oc(3,_F,3,3,"small",35),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc(4);n.Ib("listModels-menu-selected",t.id===e.selectedAction.id),n.oc("title",t.label)("disabled",!t.enabled),n.Db(2),n.Rc(t.label),n.Db(1),n.oc("ngIf",!t.enabled)}}function xF(t,e){if(1&t&&(n.Ub(0),n.Oc(1,yF,4,6,"button",32),n.Tb()),2&t){const t=e.$implicit,i=n.hc(4);n.Db(1),n.oc("ngIf",i.showActionInCurrentCategory(t))}}function CF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",37),n.dc("click",(function(){return n.Dc(t),n.hc(4).onSubmit()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(4),e=n.zc(13);n.oc("disabled",t.actionService.loading||0===t.selectedAction.id||void 0!==e&&!e.isEditorLoaded()),n.Db(1),n.Rc(n.jc(2,2,"lang.validate"))}}function OF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",38),n.dc("click",(function(){return n.Dc(t),n.hc(4).onSubmit()})),n.Rb(1,"mat-icon",39),n.Vb()}}function DF(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"button",21),n.Rb(2,"span",22),n.Rb(3,"i",23),n.Vb(),n.Wb(4,"mat-menu",null,24),n.Wb(6,"div",25),n.Wb(7,"span"),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Wb(10,"mat-form-field",26),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.Wb(11,"input",27,28),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("keydown",(function(e){return n.Dc(t),e.stopPropagation()})),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Oc(14,xF,2,1,"ng-container",29),n.ic(15,"filterList"),n.Vb(),n.Oc(16,CF,3,4,"button",30),n.Oc(17,OF,2,0,"button",31),n.Tb()}if(2&t){const t=n.zc(5),e=n.zc(12),i=n.hc(3);n.Db(1),n.oc("disabled",0===i.selectedAction.id)("matMenuTriggerFor",t)("title",i.selectedAction.label),n.Db(1),n.oc("innerHTML",i.selectedAction.label,n.Ec),n.Db(2),n.Fb("menuForm menuAction"),n.Db(4),n.Sc(" ",n.jc(9,11,"lang.actions")," "),n.Db(3),n.pc("placeholder",n.jc(13,13,"lang.filterBy")),n.Db(3),n.oc("ngForOf",n.lc(15,15,i.actionsList,e.value,"label")),n.Db(2),n.oc("ngIf",!i.appService.getViewMode()),n.Db(1),n.oc("ngIf",i.appService.getViewMode())}}function wF(t,e){1&t&&(n.Rb(0,"div",40),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.noAvailableAction"),n.Ec)}function MF(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div",15),n.Oc(2,vF,2,2,"app-indexing-form",16),n.Vb(),n.Wb(3,"div",17),n.Oc(4,DF,18,19,"ng-container",13),n.Oc(5,wF,2,3,"div",18),n.Vb(),n.Tb()),2&t){const t=n.hc(2);n.Db(2),n.oc("ngIf",void 0!==t.currentIndexingModel.id),n.Db(2),n.oc("ngIf",t.actionsList.length>0&&void 0!==t.indexingForm&&void 0!==t.selectedAction),n.Db(1),n.oc("ngIf",0===t.actionsList.length)}}function kF(t,e){1&t&&(n.Rb(0,"div",41),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.noAvailableIndexingModel"),n.Ec)}function SF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-select-indexing-model",11,12),n.dc("afterListModelsLoaded",(function(e){return n.Dc(t),n.hc().loadIndexingModel(e)}))("afterSelectedListModel",(function(e){n.Dc(t);const i=n.hc();return i.currentIndexingModel=e,i.indexingForm.loadForm(e.id)})),n.Vb(),n.Oc(2,MF,6,3,"ng-container",13),n.Oc(3,kF,2,3,"div",14)}if(2&t){const t=n.hc();n.oc("adminMode",!0)("indexingForm",t.indexingForm),n.Db(2),n.oc("ngIf",!t.isEmptyIndexingModels()),n.Db(1),n.oc("ngIf",t.isEmptyIndexingModels())}}function IF(t,e){1&t&&(n.Wb(0,"div",42),n.Rb(1,"i",43),n.Vb())}let PF=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c,l,d,h,u,p,b){this.translate=t,this.route=e,this._activatedRoute=i,this.http=n,this.dialog=a,this.headerService=s,this.filtersListService=o,this.notify=r,this.overlay=c,this.viewContainerRef=l,this.appService=d,this.actionService=h,this.router=u,this.sortPipe=p,this.functions=b,this.loading=!1,this.indexingModels=[],this.currentIndexingModel={},this.actionsList=[],this.selectedAction={id:0,label:"",component:"",default:!1,categoryUse:[]},this.tmpFilename="",this.isMailing=!1,i.queryParams.subscribe(t=>this.tmpFilename=t.tmpfilename),this.subscription=this.actionService.catchAction().subscribe(t=>{["closeAndIndexAction","saveAndIndexRegisteredMailAction"].indexOf(this.selectedAction.component)>-1?(this.appDocumentViewer.templateListForm.reset(),this.appDocumentViewer.file={name:"",type:"",content:null,src:null},this.appDocumentViewer.triggerEvent.emit("cleanFile"),this.appSelectIndexingModel.resetIndexingModel()):this.router.navigate(["/resources/"+t[0]],{queryParams:this.isMailing?{isMailing:!0}:null})})}ngOnInit(){this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu","form"),this.headerService.sideBarButton={icon:"fa fa-home",label:this.translate.instant("lang.backHome"),route:"/home"},this.fetchData()}fetchData(){this.loading=!1,this.headerService.setHeader(this.translate.instant("lang.recordingMail")),this.route.params.subscribe(t=>{this.currentGroupId=t.groupId,this.http.get("../rest/indexing/groups/"+this.currentGroupId+"/actions").pipe(Object(l.a)(t=>(t.actions=t.actions.map((t,e)=>({id:t.id,label:t.label,component:t.component,enabled:t.enabled,default:0===e,categoryUse:t.categories})),t)),Object(mt.a)(t=>{this.selectedAction=t.actions[0],this.actionsList=t.actions}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()},t=>{this.notify.handleErrors(t)})}isEmptyIndexingModels(){return void 0!==this.appSelectIndexingModel&&0===this.appSelectIndexingModel.getIndexingModels().length}onSubmit(){if(this.indexingForm.isValidForm()){this.actionService.loading=!0;const t=this.indexingForm.formatDatas(this.indexingForm.getDatas());t.modelId=null!==this.currentIndexingModel.master?this.currentIndexingModel.master:this.currentIndexingModel.id,t.chrono=!0,this.appDocumentViewer.getFile().pipe(Object(ro.a)(1),Object(mt.a)(e=>{t.encodedFile=e.content,t.format=e.format,this.isMailing=!this.functions.empty(t.recipients)&&t.recipients.length>0&&"outgoing"===this.currentIndexingModel.category&&null===t.encodedFile,null===t.encodedFile&&"registeredMail"!==this.currentIndexingModel.category?(this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.noFile"),msg:this.translate.instant("lang.noFileMsg")}}),this.dialogRef.afterClosed().pipe(Object(mt.a)(t=>{"ok"!==t&&(this.actionService.loading=!1)}),Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.actionService.launchIndexingAction(this.selectedAction,this.headerService.user.id,this.currentGroupId,t)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()):this.actionService.launchIndexingAction(this.selectedAction,this.headerService.user.id,this.currentGroupId,t)})).subscribe()}else this.notify.error(this.translate.instant("lang.mustFixErrors"))}formatDatas(t){const e={},i=/indexingCustomField_[.]*/g;return e.customFields={},t.forEach(t=>{null!==t.identifier.match(i)?e.customFields[t.identifier.split("_")[1]]=t.default_value:e[t.identifier]=t.default_value}),e}loadIndexingModel(t){this.currentIndexingModel=t}selectAction(t){this.selectedAction=t}ngOnDestroy(){this.subscription.unsubscribe()}showActionInCurrentCategory(t){if(-1===this.selectedAction.categoryUse.indexOf(this.indexingForm.getCategory())){const t=this.actionsList.filter(t=>t.categoryUse.indexOf(this.indexingForm.getCategory())>-1)[0];this.selectedAction=void 0!==t?this.actionsList.filter(t=>t.categoryUse.indexOf(this.indexingForm.getCategory())>-1)[0]:{id:0,label:"",component:"",default:!1,categoryUse:[]}}return t.categoryUse.indexOf(this.indexingForm.getCategory())>-1}refreshDatas(){this.appDocumentViewer.setDatas(this.indexingForm.formatDatas(this.indexingForm.getDatas()))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(o.a),n.Qb(o.a),n.Qb(v.b),n.Qb(q.b),n.Qb(y.a),n.Qb(sI),n.Qb(D.a),n.Qb(ZD.c),n.Qb(n.T),n.Qb(w.a),n.Qb(bC),n.Qb(o.c),n.Qb(Wt.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(bF,!0),n.Xc(fF,!0),n.Xc(mF,!0),n.Xc(gF,!0)),2&t&&(n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.appSelectIndexingModel=i.first),n.yc(i=n.ec())&&(e.indexingForm=i.first),n.yc(i=n.ec())&&(e.appDocumentViewer=i.first))},features:[n.Cb([bC,Wt.a])],decls:15,vars:9,consts:[[1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"document-container"],[1,"content"],[2,"height","100%","width","100%",3,"editMode","tmpFilename","triggerEvent"],["appDocumentViewer",""],["style","font-size: 120px;opacity: 0.4;",4,"ngIf"],[3,"adminMode","indexingForm","afterListModelsLoaded","afterSelectedListModel"],["appSelectIndexingModel",""],[4,"ngIf"],["class","emptyModel",3,"innerHTML",4,"ngIf"],[1,"indexing-form-container"],[3,"groupId","indexingFormId","retrieveDocumentEvent",4,"ngIf"],[1,"actions-indexing-form"],["class","emptyAction",3,"innerHTML",4,"ngIf"],[3,"groupId","indexingFormId","retrieveDocumentEvent"],["indexingForm",""],["mat-button","",1,"button-form-primary",2,"width","350px","margin-right","20px",3,"disabled","matMenuTriggerFor","title"],[1,"menu-label",3,"innerHTML"],[1,"fa","fa-chevron-down","menu-icon"],["menu","matMenu"],[1,"menuTitle"],["floatLabel","never","appearance","outline",1,"smallInput",3,"click"],["matInput","","id","searchTerm","autocomplete","off",3,"placeholder","click","keydown"],["listFilter",""],[4,"ngFor","ngForOf"],["mat-button","","class","button-form-primary-filled","style","width: 150px;align-items: center;justify-content: center;text-align: center;display: flex;",3,"disabled","click",4,"ngIf"],["mat-icon-button","","class","button-form-primary",3,"click",4,"ngIf"],["mat-menu-item","",3,"title","listModels-menu-selected","disabled","click",4,"ngIf"],["mat-menu-item","",3,"title","disabled","click"],[2,"flex","1"],["style","position: absolute;top: 15px;left: 140px;","color","warn",4,"ngIf"],["color","warn",2,"position","absolute","top","15px","left","140px"],["mat-button","",1,"button-form-primary-filled",2,"width","150px","align-items","center","justify-content","center","text-align","center","display","flex",3,"disabled","click"],["mat-icon-button","",1,"button-form-primary",3,"click"],[1,"fa","fa-check"],[1,"emptyAction",3,"innerHTML"],[1,"emptyModel",3,"innerHTML"],[2,"font-size","120px","opacity","0.4"],[1,"fas","fa-dolly-flatbed"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,SF,4,4,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Vb(),n.Wb(10,"div",6),n.Wb(11,"div",7),n.Wb(12,"app-document-viewer",8,9),n.dc("triggerEvent",(function(){return e.refreshDatas()})),n.Vb(),n.Oc(14,IF,2,0,"div",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.Lc("display","registeredMail"!==e.currentIndexingModel.category?"block":"none"),n.oc("editMode",!0)("tmpFilename",e.tmpFilename),n.Db(2),n.oc("ngIf","registeredMail"===e.currentIndexingModel.category))},directives:[I.e,I.f,Ot,We,Jr,P.t,yW,qT,k.b,ne.d,ne.e,Y.c,J.b,P.s,ne.b,S.a],pipes:[g.d,rg],styles:[".panel-left[_ngcontent-%COMP%] .mat-drawer-inner-container{display:flex;flex-direction:column}.document-container[_ngcontent-%COMP%]{flex:1;padding-left:50px;padding-right:50px;color:#fff;margin-top:0;width:100%;overflow:hidden;background-color:#135f7f}@media (max-width:768px){.document-container[_ngcontent-%COMP%]{padding-left:0;padding-right:0}}.document-container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{overflow-y:auto;overflow-x:hidden;position:relative;height:100%;min-height:200px;width:100%;border-radius:0;box-shadow:none;border:1px solid #fff;justify-content:center;display:flex;align-items:center;text-align:center;font-weight:700;flex-direction:column}.indexing-form-container[_ngcontent-%COMP%]{height:100%;overflow:auto;padding-left:20px;padding-right:20px;padding-bottom:20px}@media (max-width:768px){.indexing-form-container[_ngcontent-%COMP%]{padding-right:0;padding-left:0}}.actions-indexing-form[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;box-shadow:0 -5px 10px 0 rgba(0,0,0,.07);padding:10px 40px}@media (max-width:768px){.actions-indexing-form[_ngcontent-%COMP%]{padding-left:0;padding-right:0}}.emptyModel[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;align-items:center;justify-content:center;text-align:center;padding-left:20px;padding-right:20px;font-size:25px;opacity:.3;font-weight:700}.listModels[_ngcontent-%COMP%]{background:#f9f9f9;display:flex;padding:10px 40px}@media (max-width:768px){.listModels[_ngcontent-%COMP%]{padding-bottom:20px;padding-left:0;padding-right:0}}.listModels[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{font-size:20px;height:auto}.listModels-button[_ngcontent-%COMP%]{margin-right:20px;width:450px!important} .listModels-menu{min-width:450px!important} .listModels-menu .mat-menu-item:hover:hover .listModels-menu-badge{background:#fff!important;color:#135f7f!important} .listModels-menu .mat-menu-item:hover:hover .listModels-menu-delete .mat-icon{color:#fff!important} .listModels-menu-badge{font-size:70%;background:#135f7f;border-radius:20px;color:#fff;padding:2px 5px;font-weight:700} .listModels-menu-delete .mat-icon{margin-right:0} .listModels-menu-selected{color:#fff!important;background:#135f7f} .listModels-menu-selected .listModels-menu-badge{background:#fff!important;color:#135f7f!important}.emptyAction[_ngcontent-%COMP%]{color:#8e3e52;font-size:14px;text-align:center}.loading[_ngcontent-%COMP%]{display:flex;height:100%;position:absolute;width:100%;background:hsla(0,0%,100%,.7294117647058823);z-index:2} .menuAction{min-width:350px!important}.menuTitle[_ngcontent-%COMP%]{display:flex;padding-left:20px;align-items:center;color:#135f7f;font-weight:700}.smallInput[_ngcontent-%COMP%]{padding:10px}.smallInput[_ngcontent-%COMP%] .mat-form-field-wrapper{padding-bottom:0}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})(),VF=(()=>{class t{constructor(t,e,i,n){this.translate=t,this.http=e,this.authService=i,this.headerService=n}canActivate(t,e){return e.url.replace(/^\/+|\/+$/g,"").split("/"),console.debug("== ROUTE LIGHT GUARD =="),console.debug(e.url),this.headerService.resetSideNavSelection(),this.authService.getLoginInformations(e.url).pipe(p(()=>null!==this.authService.getToken()&&"/login"!==e.url?this.authService.getCurrentUserInfo():Object(c.a)(!1)),Object(l.a)(()=>!0),Object(m.a)(t=>Object(c.a)(!0)))}}return t.\u0275fac=function(e){return new(e||t)(n.ac(g.e),n.ac(v.b),n.ac(_.a),n.ac(y.a))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const RF=[{path:"resources/:resId/content",canActivate:[x],component:tc},{path:"install",canActivate:[VF],loadChildren:()=>i.e(5).then(i.bind(null,"6S62")).then(t=>t.InstallerModule)},{path:"signatureBook/users/:userId/groups/:groupId/baskets/:basketId/resources/:resId",canActivate:[x],component:aI},{path:"followed",canActivate:[x],component:tP},{path:"saveNumericPackage",canActivate:[x],component:Ls},{path:"separators/print",canActivate:[x],component:eo},{path:"forgot-password",component:io},{path:"reset-password",component:oo},{path:"activate-user",component:G},{path:"password-modification",component:ht},{path:"folders/:folderId",canActivate:[x],component:GP},{path:"profile",canActivate:[x],component:aa},{path:"about-us",canActivate:[x],component:ra},{path:"home",canActivate:[x],component:Ws},{path:"basketList/users/:userSerialId/groups/:groupSerialId/baskets/:basketId",canActivate:[x],component:NV},{path:"login",canActivate:[VF],component:cc},{path:"registeredMail/acknowledgement",canActivate:[x],component:dR},{path:"search",canActivate:[x],component:gR},{path:"process/users/:userSerialId/groups/:groupSerialId/baskets/:basketId/resId/:resId",canActivate:[x],canDeactivate:[C],component:pF},{path:"resources/:detailResId",canActivate:[x],canDeactivate:[C],component:pF},{path:"indexing/:groupId",canActivate:[x],component:PF},{path:"",redirectTo:"home",pathMatch:"full"}];let jF=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[o.g.forRoot(RF,{preloadingStrategy:o.b,useHash:!0})],o.g]}),t})();var AF=i("cMWS");const WF=["snav2"],TF=["searchServiceInput"];function EF(t,e){1&t&&(n.Wb(0,"div",18),n.Rb(1,"mat-spinner",19),n.Vb())}function FF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",20),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().goToSpecifiedAdministration(i)})),n.Wb(1,"div",21),n.Rb(2,"i",22),n.Vb(),n.Wb(3,"span",23),n.Qc(4),n.Vb(),n.Qc(5),n.ic(6,"translate"),n.Vb()}if(2&t){const t=e.$implicit;n.Db(2),n.Fb(t.style),n.Db(2),n.Rc(t.count),n.Db(1),n.Sc("\xa0 ",n.jc(6,5,t.label)," ")}}function LF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",24),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().goToSpecifiedAdministration(i)})),n.ic(1,"translate"),n.Wb(2,"div",25),n.Wb(3,"span",26),n.Rb(4,"i"),n.Vb(),n.Wb(5,"span",27),n.Qc(6),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.oc("joyrideStep",t.id)("title",n.jc(1,6,t.comment)),n.Db(4),n.Gb("avatarCount2 ",t.style,""),n.Db(2),n.Sc(" ",t.label," ")}}const QF=function(t){return{width:t}};let NF=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c,l){this.translate=t,this.http=e,this.router=i,this.headerService=n,this.appService=a,this.privilegeService=s,this.latinisePipe=o,this.notify=r,this.functionService=c,this.featureTourService=l,this.loading=!1,this.shortcutsAdmin=[],this.organisationServices=[],this.productionServices=[],this.classementServices=[],this.supervisionServices=[],this.searchService=new X.i,this.administrations=[]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")),this.organisationServices=this.privilegeService.getCurrentUserAdministrationsByUnit("organisation"),this.productionServices=this.privilegeService.getCurrentUserAdministrationsByUnit("production"),this.classementServices=this.privilegeService.getCurrentUserAdministrationsByUnit("classement"),this.supervisionServices=this.privilegeService.getCurrentUserAdministrationsByUnit("supervision"),this.administrations=this.organisationServices.concat(this.productionServices).concat(this.classementServices).concat(this.supervisionServices),this.administrations=this.administrations.map(t=>Object.assign(Object.assign({},t),{label:this.translate.instant(t.label)})),this.shortcutsAdmin=this.administrations.filter(t=>["admin_users","admin_groups","manage_entities"].indexOf(t.id)>-1).map(t=>Object.assign(Object.assign({},t),{count:0})),this.getNbShortcuts(),this.filteredAdministrations=this.searchService.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>this._filter(t,"administrations"))),this.loading=!1,setTimeout(()=>{this.searchServiceInput.nativeElement.focus()},0)}ngAfterViewInit(){this.featureTourService.isComplete()||this.featureTourService.init()}goToSpecifiedAdministration(t){!0===t.angular?this.router.navigate([t.route]):window.location.assign(t.route)}_filter(t,e){if("string"==typeof t){const i=this.latinisePipe.transform(t.toLowerCase());return this[e].filter(t=>this.latinisePipe.transform(this.translate.instant(t.label).toLowerCase()).includes(i))}return this[e]}getNbShortcuts(){this.http.get("../rest/administration/details").pipe(Object(mt.a)(t=>{this.functionService.empty(t.count.users)||(this.shortcutsAdmin.filter(t=>"admin_users"===t.id)[0].count=t.count.users),this.functionService.empty(t.count.groups)||(this.shortcutsAdmin.filter(t=>"admin_groups"===t.id)[0].count=t.count.groups),this.functionService.empty(t.count.entities)||(this.shortcutsAdmin.filter(t=>"manage_entities"===t.id)[0].count=t.count.entities)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.c),n.Qb(y.a),n.Qb(w.a),n.Qb(Dt.a),n.Qb(Tt.c),n.Qb(D.a),n.Qb(_t.a),n.Qb(ss))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(WF,!0),n.Kc(TF,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.searchServiceInput=i.first))},decls:25,vars:24,consts:[[1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],["stepNumber","1","joyrideStep","firstStep","title","demoTour",1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content",2,"display","flex","flex-direction","column"],["class","loading",4,"ngIf"],[2,"display","grid","grid-template-columns","repeat(auto-fill, minmax(400px, 1fr))","gap","20px","padding","20px"],["class","countCard","matRipple","",3,"click",4,"ngFor","ngForOf"],[2,"padding","10px","font-size","10px","width","250px !important"],["matInput","",3,"formControl","placeholder"],["searchServiceInput",""],[2,"margin","20px","display","grid","grid-template-columns","repeat(auto-fill, minmax(300px, 1fr))","gap","20px","padding","20px","padding-top","0px","margin-top","0px"],["mat-button","","style","font-size:20px;height:80px;",3,"joyrideStep","title","click",4,"ngFor","ngForOf"],["position","end","autoFocus","false",1,"panel-right",2,"overflow-x","hidden",3,"fixedInViewport","opened","mode","ngStyle"],["snav2",""],[1,"loading"],[2,"margin","auto"],["matRipple","",1,"countCard",3,"click"],["mat-card-avatar","",1,"avatarCount",2,"margin-right","10px"],[2,"position","absolute"],[2,"font-size","40px"],["mat-button","",2,"font-size","20px","height","80px",3,"joyrideStep","title","click"],[2,"display","flex","align-items","center"],[2,"padding-right","10px"],[1,"countLabel",2,"white-space","initial","text-align","left"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,EF,2,0,"div",8),n.Wb(12,"div",9),n.Oc(13,FF,7,7,"mat-card",10),n.Vb(),n.Rb(14,"mat-divider"),n.Wb(15,"mat-form-field",11),n.Rb(16,"input",12,13),n.ic(18,"translate"),n.Vb(),n.Wb(19,"div",14),n.Oc(20,LF,7,8,"button",15),n.ic(21,"sortBy"),n.ic(22,"async"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Rb(23,"mat-sidenav",16,17),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(2),n.oc("ngForOf",e.shortcutsAdmin),n.Db(3),n.oc("formControl",e.searchService)("placeholder",n.jc(18,15,"lang.filterBy")),n.Db(4),n.oc("ngForOf",n.kc(21,17,n.jc(22,20,e.filteredAdministrations),"label")),n.Db(3),n.oc("fixedInViewport",e.appService.getViewMode())("opened",(e.appService.getViewMode(),!1))("mode",e.appService.getViewMode()?"over":"side")("ngStyle",n.vc(22,QF,e.appService.getViewMode()?"80%":"30%")))},directives:[I.e,I.f,Ot,za,We,P.t,P.s,T.a,Y.c,J.b,X.d,X.u,X.j,I.d,P.w,V.c,K.a,W.u,K.c,k.b],pipes:[g.d,Wt.a,P.b],styles:[".adminArea[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap}.adminArea_1[_ngcontent-%COMP%]{flex:1}.adminArea_1[_ngcontent-%COMP%], .adminArea_2[_ngcontent-%COMP%], .adminArea_3[_ngcontent-%COMP%], .adminArea_4[_ngcontent-%COMP%]{overflow:hidden;padding:20px}.loading[_ngcontent-%COMP%]{display:flex;height:100%}.adminArea-label[_ngcontent-%COMP%]{font-size:20px;font-weight:bolder;opacity:.2;text-align:center}.adminArea-button[_ngcontent-%COMP%]{white-space:inherit;height:100px;line-height:20px} .autocompleteServices .mat-optgroup-label{position:-webkit-sticky;position:sticky;top:0;background:#fff;z-index:1}.countCard[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;height:100px;color:#fff;background:#135f7f;cursor:pointer}.avatarCount[_ngcontent-%COMP%]{color:#135f7f;font-size:20px;background:#fff}.avatarCount[_ngcontent-%COMP%], .avatarCount2[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:center;border-radius:40px;padding:10px}.avatarCount2[_ngcontent-%COMP%]{color:#fff;font-size:30px;background:#135f7f;width:55px!important;height:55px!important}.countLabel[_ngcontent-%COMP%]{color:#135f7f;font-size:16px}"]}),t})();function zF(t,e){1&t&&(n.Ub(0),n.Wb(1,"div",18),n.Rb(2,"mat-spinner"),n.Vb(),n.Tb())}function BF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",25),n.dc("click",(function(){return n.Dc(t),n.hc(),n.zc(1).click()}))("onFileDropped",(function(e){return n.Dc(t),n.hc(2).dndUploadFile(e)})),n.Wb(1,"div"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(2),n.Sc(" ",n.jc(3,1,"lang.dndFileCsvDesc")," "))}function UF(t,e){1&t&&(n.Wb(0,"div",26),n.Wb(1,"div",27),n.Rb(2,"mat-paginator",28,29),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.oc("length",100)("hidePageSize",!0)("pageSize",8))}function $F(t,e){if(1&t&&(n.Wb(0,"mat-option",46),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}function HF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-header-cell"),n.Rb(1,"i",38),n.ic(2,"translate"),n.Qc(3,"\xa0"),n.Wb(4,"b",39),n.ic(5,"translate"),n.Qc(6),n.Vb(),n.Qc(7," \xa0"),n.Rb(8,"i",40),n.Qc(9,"\xa0 "),n.Rb(10,"i",41),n.ic(11,"translate"),n.Qc(12,"\xa0"),n.Wb(13,"mat-form-field",42),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.ic(14,"translate"),n.Wb(15,"mat-select",43),n.dc("ngModelChange",(function(e){n.Dc(t);const i=n.hc().$implicit;return n.hc(3).associatedColmuns[i]=e}))("selectionChange",(function(e){n.Dc(t);const i=n.hc().$implicit;return n.hc(3).changeColumn(i,e.value)})),n.Rb(16,"mat-option",44),n.Oc(17,$F,2,2,"mat-option",45),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc(3);n.Db(1),n.oc("title",n.jc(2,7,"lang.dbColumn")),n.Db(3),n.oc("title",n.jc(5,9,"lang.dbColumn")),n.Db(2),n.Rc(t),n.Db(4),n.oc("title",n.jc(11,11,"lang.csvColumn")),n.Db(3),n.oc("title",n.jc(14,13,"lang.csvColumn")),n.Db(2),n.oc("ngModel",e.associatedColmuns[t]),n.Db(2),n.oc("ngForOf",e.csvColumns)}}function GF(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc().$implicit;n.Db(1),n.Sc(" ",t[i]," ")}}function XF(t,e){if(1&t&&(n.Ub(0),n.Ub(1,35),n.Oc(2,HF,18,15,"mat-header-cell",36),n.Oc(3,GF,2,1,"mat-cell",37),n.Tb(),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("matColumnDef",t)}}function qF(t,e){1&t&&n.Rb(0,"mat-header-row")}function KF(t,e){1&t&&n.Rb(0,"mat-row")}function YF(t,e){if(1&t&&(n.Wb(0,"mat-table",30,31),n.Oc(2,XF,4,1,"ng-container",32),n.Oc(3,qF,1,0,"mat-header-row",33),n.Oc(4,KF,1,0,"mat-row",34),n.Vb()),2&t){const t=n.hc(2);n.oc("dataSource",t.dataSource),n.Db(2),n.oc("ngForOf",t.userColmuns),n.Db(1),n.oc("matHeaderRowDef",t.userColmuns),n.Db(1),n.oc("matRowDefColumns",t.userColmuns)}}function JF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"input",19,20),n.dc("change",(function(e){return n.Dc(t),n.hc().uploadCsv(e)})),n.Vb(),n.Oc(2,BF,4,3,"div",21),n.Oc(3,UF,4,3,"div",22),n.Oc(4,YF,5,4,"mat-table",23),n.Rb(5,"div",24),n.ic(6,"translate"),n.Rb(7,"div",24),n.ic(8,"translate")}if(2&t){const t=n.hc();n.Db(2),n.oc("ngIf",0===t.csvData.length),n.Db(1),n.oc("ngIf",0!==t.csvData.length),n.Db(1),n.oc("ngIf",t.csvData.length>0),n.Db(1),n.oc("innerHTML",n.jc(6,5,"lang.infoImportNoIdToCreate"),n.Ec),n.Db(2),n.oc("innerHTML",n.jc(8,7,"lang.infoImportusers2"),n.Ec)}}function ZF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",47),n.dc("click",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc();n.oc("disabled",t.loading),n.Db(1),n.Rc(n.jc(2,2,"lang.validate"))}}let tL=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c,l){this.translate=t,this.http=e,this.notify=i,this.functionsService=n,this.localStorage=a,this.headerService=s,this.dialog=o,this.dialogRef=r,this.papa=c,this.data=l,this.loading=!1,this.userColmuns=["id","user_id","firstname","lastname","mail","phone"],this.csvColumns=[],this.associatedColmuns={},this.dataSource=new vt.p(null),this.hasHeader=!0,this.csvData=[],this.userData=[],this.countAll=0,this.countAdd=0,this.countUp=0}ngOnInit(){}changeColumn(t,e){this.userData=[];for(let i=this.hasHeader?1:0;i<this.csvData.length;i++){const n=this.csvData[i];this.userData.push({id:"id"===t?n[this.csvColumns.filter(t=>t===e)[0]]:n[this.associatedColmuns.id],user_id:"user_id"===t?n[this.csvColumns.filter(t=>t===e)[0]]:n[this.associatedColmuns.user_id],firstname:"firstname"===t?n[this.csvColumns.filter(t=>t===e)[0]]:n[this.associatedColmuns.firstname],lastname:"lastname"===t?n[this.csvColumns.filter(t=>t===e)[0]]:n[this.associatedColmuns.lastname],mail:"mail"===t?n[this.csvColumns.filter(t=>t===e)[0]]:n[this.associatedColmuns.mail],phone:"phone"===t?n[this.csvColumns.filter(t=>t===e)[0]]:n[this.associatedColmuns.phone]})}this.countAdd=this.csvData.filter((t,e)=>e>0&&this.functionsService.empty(t[this.associatedColmuns.id])).length,this.countUp=this.csvData.filter((t,e)=>e>0&&!this.functionsService.empty(t[this.associatedColmuns.id])).length,setTimeout(()=>{this.dataSource=new vt.p(this.userData),this.dataSource.paginator=this.paginator},0)}uploadCsv(t){if(t.target.files&&t.target.files[0]&&("text/csv"===t.target.files[0].type||"application/vnd.ms-excel"===t.target.files[0].type)){this.loading=!0;let e=[];const i=new FileReader;i.readAsText(t.target.files[0],"ISO-8859-1"),i.onload=t=>{this.papa.parse(t.target.result,{complete:t=>{e=t.data,e=e.filter(t=>t.length===e[0].length);let i=[],n={};this.setCsvColumns(e[0]),this.countAll=this.hasHeader?e.length-1:e.length;for(let a=0;a<e.length;a++)n={},i=e[a],i.forEach((t,e)=>{n[this.csvColumns[e]]=t}),this.csvData.push(n);this.initData(),this.countAdd=this.csvData.filter((t,e)=>e>0&&this.functionsService.empty(t[this.associatedColmuns.id])).length,this.countUp=this.csvData.filter((t,e)=>e>0&&!this.functionsService.empty(t[this.associatedColmuns.id])).length,this.loading=!1}})}}else this.dialog.open(qt.a,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.notAllowedExtension")+" !",msg:this.translate.instant("lang.file")+" : <b>"+t.target.files[0].name+"</b>, "+this.translate.instant("lang.type")+" : <b>"+t.target.files[0].type+"</b><br/><br/><u>"+this.translate.instant("lang.allowedExtensions")+"</u> : <br/>text/csv"}})}setCsvColumns(t=null){this.csvColumns=t.filter(t=>this.functionsService.empty(t)).length>0?Object.keys(t).map((t,e)=>""+e):t}toggleHeader(){this.hasHeader=!this.hasHeader,this.countAll=this.hasHeader?this.csvData.length-1:this.csvData.length,this.hasHeader?(this.countAdd=this.csvData.filter((t,e)=>e>0&&this.functionsService.empty(t[this.associatedColmuns.id])).length,this.countUp=this.csvData.filter((t,e)=>e>0&&!this.functionsService.empty(t[this.associatedColmuns.id])).length):(this.countAdd=this.csvData.filter((t,e)=>this.functionsService.empty(t[this.associatedColmuns.id])).length,this.countUp=this.csvData.filter((t,e)=>!this.functionsService.empty(t[this.associatedColmuns.id])).length),this.initData()}initData(){this.userData=[];for(let t=this.hasHeader?1:0;t<this.csvData.length;t++){const e=this.csvData[t];this.associatedColmuns.id=this.csvColumns[0],this.associatedColmuns.user_id=this.csvColumns[1],this.associatedColmuns.firstname=this.csvColumns[2],this.associatedColmuns.lastname=this.csvColumns[3],this.associatedColmuns.mail=this.csvColumns[4],this.associatedColmuns.phone=this.csvColumns[5],this.userData.push({id:e[this.csvColumns[0]],user_id:e[this.csvColumns[1]],firstname:e[this.csvColumns[2]],lastname:e[this.csvColumns[3]],mail:e[this.csvColumns[4]],phone:e[this.csvColumns[5]]})}setTimeout(()=>{this.dataSource=new vt.p(this.userData),this.dataSource.paginator=this.paginator},0)}dndUploadFile(t){this.uploadCsv({target:{files:[t[0]]}})}onSubmit(){let t=null;const e=[];let i="";this.translate.get("lang.confirmImportUsers",{0:this.countAll}).subscribe(t=>{i=t+" ?<br/><br/>",i+=`<ul><li><b>${this.countAdd}</b> ${this.translate.instant("lang.additions")}</li><li><b>${this.countUp}</b> ${this.translate.instant("lang.modifications")}</li></ul>`}),t=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.import"),msg:i}}),t.afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.loading=!0,this.csvData.forEach((t,i)=>{(this.hasHeader&&i>0||!this.hasHeader)&&e.push({id:t[this.associatedColmuns.id],user_id:t[this.associatedColmuns.user_id],firstname:t[this.associatedColmuns.firstname],lastname:t[this.associatedColmuns.lastname],mail:t[this.associatedColmuns.mail],phone:t[this.associatedColmuns.phone]})})}),p(()=>this.http.put("../rest/users/import",{users:e})),Object(mt.a)(e=>{let i="";e.warnings.count>0&&(i=`<br/>${e.warnings.count} ${this.translate.instant("lang.withWarnings")} : <ul>`,e.warnings.details.forEach(t=>{i+=`<li> ${this.translate.instant("lang."+t.lang)} (${this.translate.instant("lang.line")} : ${this.hasHeader?t.index+2:t.index+1})</li>`}),i+="</ul>"),e.errors.count>0&&(i+=`<br/>${e.errors.count} ${this.translate.instant("lang.withErrors")} : <ul>`,e.errors.details.forEach(t=>{i+=`<li> ${this.translate.instant("lang."+t.lang)} (${this.translate.instant("lang.line")} : ${this.hasHeader?t.index+2:t.index+1})</li>`}),i+="</ul>"),t=this.dialog.open(qt.a,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.import"),msg:"<b>"+e.success+"</b> / <b>"+this.countAll+"</b> "+this.translate.instant("lang.importedUsers")+"."+i}})}),p(()=>t.afterClosed()),Object(mt.a)(()=>{this.dialogRef.close("success")}),Object(m.a)(t=>(this.loading=!1,this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(_t.a),n.Qb(Ut.a),n.Qb(y.a),n.Qb(q.b),n.Qb(q.h),n.Qb(Jt),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Xc(Kt.a,!0),2&t&&n.yc(i=n.ec())&&(e.paginator=i.first)},decls:37,vars:28,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],[1,"import-tool"],[2,"flex","1"],["color","primary",3,"checked","change"],[2,"flex","1","text-align","center"],["color","primary",1,"fa","fa-users"],["color","primary"],["color","primary",1,"fa","fa-user-plus"],[2,"flex","1","text-align","right"],["color","primary",1,"fa","fa-user-edit"],[4,"ngIf","ngIfElse"],["elseTemplate",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click",4,"ngIf"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loader"],["type","file","name","files[]","id","uploadFile","accept",".csv",2,"display","none",3,"change"],["uploadFile",""],["appUploadFileDragDrop","","class","dndFile",3,"click","onFileDropped",4,"ngIf"],["class","row","style","margin: 0px;",4,"ngIf"],[3,"dataSource",4,"ngIf"],[1,"alert-message","alert-message-info",2,"min-width","100%",3,"innerHTML"],["appUploadFileDragDrop","",1,"dndFile",3,"click","onFileDropped"],[1,"row",2,"margin","0px"],[1,"col-md-12"],[3,"length","hidePageSize","pageSize"],["paginator",""],[3,"dataSource"],["table",""],[4,"ngFor","ngForOf"],[4,"matHeaderRowDef"],[4,"matRowDef","matRowDefColumns"],[3,"matColumnDef"],[4,"matHeaderCellDef"],[4,"matCellDef"],["color","primary",1,"fas","fa-database",3,"title"],["color","primary",3,"title"],[1,"fas","fa-arrows-alt-h"],[1,"fas","fa-file-csv",3,"title"],[2,"width","80px !important",3,"title","click"],[3,"ngModel","ngModelChange","selectionChange"],["value",""],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"]],template:function(t,e){if(1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"div",2),n.Wb(5,"mat-toolbar",3),n.Wb(6,"span",4),n.Wb(7,"mat-slide-toggle",5),n.dc("change",(function(){return e.toggleHeader()})),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Vb(),n.Wb(10,"span",6),n.Rb(11,"i",7),n.Qc(12),n.ic(13,"translate"),n.Wb(14,"b",8),n.Qc(15),n.Vb(),n.Vb(),n.Wb(16,"span",6),n.Rb(17,"i",9),n.Qc(18),n.ic(19,"translate"),n.Wb(20,"b",8),n.Qc(21),n.Vb(),n.Vb(),n.Wb(22,"span",10),n.Rb(23,"i",11),n.Qc(24),n.ic(25,"translate"),n.Wb(26,"b",8),n.Qc(27),n.Vb(),n.Vb(),n.Vb(),n.Oc(28,zF,3,0,"ng-container",12),n.Oc(29,JF,9,9,"ng-template",null,13,n.Pc),n.Vb(),n.Rb(31,"span",14),n.Wb(32,"div",15),n.Oc(33,ZF,3,4,"button",16),n.Wb(34,"button",17),n.Qc(35),n.ic(36,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.zc(30);n.Db(2),n.Rc(n.jc(3,16,"lang.usersImport")),n.Db(3),n.Ib("hide",0===e.csvData.length||e.loading),n.Db(2),n.oc("checked",e.hasHeader),n.Db(1),n.Rc(n.jc(9,18,"lang.csvHeader")),n.Db(4),n.Sc("\xa0",n.jc(13,20,"lang.usersOfFile")," : "),n.Db(3),n.Rc(e.countAll),n.Db(3),n.Sc("\xa0",n.jc(19,22,"lang.additions")," : "),n.Db(3),n.Rc(e.countAdd),n.Db(3),n.Sc("\xa0",n.jc(25,24,"lang.modifications")," : "),n.Db(3),n.Rc(e.countUp),n.Db(1),n.oc("ngIf",e.loading)("ngIfElse",t),n.Db(5),n.oc("ngIf",e.csvData.length>0),n.Db(1),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(36,26,"lang.cancel"))}},directives:[q.i,q.f,M.a,te.a,P.t,q.c,k.b,q.d,V.c,ie,Kt.a,vt.o,P.s,vt.k,vt.n,vt.c,vt.i,vt.b,vt.h,Y.c,ee.a,X.u,X.x,W.p,vt.a,vt.j,vt.m],pipes:[g.d],styles:[".mat-dialog-content[_ngcontent-%COMP%]{display:flex;flex-direction:column}.loader[_ngcontent-%COMP%]{display:flex;height:100%;align-items:center;justify-content:center}.hide[_ngcontent-%COMP%]{display:none}.import-tool[_ngcontent-%COMP%]{font-size:14px}.dndFile[_ngcontent-%COMP%]{flex:1;display:flex;align-items:center;margin:0;justify-content:center;font-size:30px;opacity:.5!important;cursor:pointer}"]}),t})();function eL(t,e){1&t&&(n.Wb(0,"div",14),n.Rb(1,"mat-spinner"),n.Vb())}function iL(t,e){if(1&t&&(n.Wb(0,"mat-option",15),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}function nL(t,e){if(1&t&&(n.Wb(0,"mat-option",15),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}let aL=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.localStorage=s,this.headerService=o,this.loading=!1,this.loadingExport=!1,this.delimiters=[";",",","TAB"],this.formats=["csv"],this.exportModel={delimiter:";",format:"csv"}}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.setConfiguration()}))}exportData(){this.localStorage.save("exportUsersFields_"+this.headerService.user.id,JSON.stringify(this.exportModel)),this.loadingExport=!0,this.http.put("../rest/users/export",this.exportModel,{responseType:"blob"}).pipe(Object(mt.a)(t=>{if("text/html"!==t.type){const e=document.createElement("a");let i,n,a,s;e.href=window.URL.createObjectURL(t),i=new Date,n=i.getDate(),a=i.getMonth()+1,s=i.getFullYear(),n<10&&(n="0"+n),a<10&&(a="0"+a),i=n+"-"+a+"-"+s,e.setAttribute("download","export_users_maarch_"+i+"."+this.exportModel.format.toLowerCase()),document.body.appendChild(e),e.click(),this.dialogRef.close()}else alert(this.translate.instant("lang.tooMuchDatas"))}),Object(Xt.a)(()=>this.loadingExport=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}setConfiguration(){null!==this.localStorage.get("exportUsersFields_"+this.headerService.user.id)&&(this.exportModel.delimiter=JSON.parse(this.localStorage.get("exportUsersFields_"+this.headerService.user.id)).delimiter)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(Ut.a),n.Qb(y.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:31,vars:27,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loader",4,"ngIf"],[1,"row"],[1,"col-md-6"],["appearance","outline"],[3,"placeholder","ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[3,"placeholder","ngModel","disabled","ngModelChange"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"click"],["mat-raised-button","","mat-button","",3,"mat-dialog-close"],[1,"loader"],[3,"value"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"div",2),n.Oc(5,eL,2,0,"div",3),n.Wb(6,"div",4),n.Wb(7,"div",5),n.Wb(8,"mat-form-field",6),n.Wb(9,"mat-label"),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Wb(12,"mat-select",7),n.dc("ngModelChange",(function(t){return e.exportModel.format=t})),n.ic(13,"translate"),n.Oc(14,iL,2,2,"mat-option",8),n.Vb(),n.Vb(),n.Vb(),n.Wb(15,"div",5),n.Wb(16,"mat-form-field",6),n.Wb(17,"mat-label"),n.Qc(18),n.ic(19,"translate"),n.Vb(),n.Wb(20,"mat-select",9),n.dc("ngModelChange",(function(t){return e.exportModel.delimiter=t})),n.ic(21,"translate"),n.Oc(22,nL,2,2,"mat-option",8),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Rb(23,"span",10),n.Wb(24,"div",11),n.Wb(25,"button",12),n.dc("click",(function(){return e.exportData()})),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Wb(28,"button",13),n.Qc(29),n.ic(30,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,13,"lang.exportDatas")),n.Db(3),n.oc("ngIf",e.loadingExport),n.Db(5),n.Rc(n.jc(11,15,"lang.format")),n.Db(2),n.pc("placeholder",n.jc(13,17,"lang.format")),n.oc("ngModel",e.exportModel.format),n.Db(2),n.oc("ngForOf",e.formats),n.Db(4),n.Rc(n.jc(19,19,"lang.delimiter")),n.Db(2),n.pc("placeholder",n.jc(21,21,"lang.delimiter")),n.oc("ngModel",e.exportModel.delimiter)("disabled","csv"!=e.exportModel.format),n.Db(2),n.oc("ngForOf",e.delimiters),n.Db(4),n.Rc(n.jc(27,23,"lang.toExport")),n.Db(3),n.Rc(n.jc(30,25,"lang.cancel")))},directives:[q.i,q.f,P.t,Y.c,Y.g,ee.a,X.u,X.x,P.s,q.c,k.b,q.d,V.c,W.p],pipes:[g.d],styles:[".mat-dialog-container{position:relative}.mat-dialog-content[_ngcontent-%COMP%]{min-height:150px;padding-bottom:10px;overflow-x:hidden}.actions[_ngcontent-%COMP%], .loader[_ngcontent-%COMP%]{justify-content:center}.loader[_ngcontent-%COMP%]{position:absolute;display:flex;width:100%;left:0;top:0;height:100%;background:hsla(0,0%,100%,.6);z-index:1;align-items:center}"]}),t})();const sL=function(t){return[t]};function oL(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",10),n.Wb(1,"plugin-autocomplete",11),n.dc("triggerEvent",(function(i){n.Dc(t);const a=e.index;return n.hc(3).setRedirectUserListModels(a,i)})),n.ic(2,"translate"),n.ic(3,"translate"),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.pc("id",t.object_id),n.Db(1),n.oc("labelPlaceholder",n.jc(2,6,"lang.newDest")+" : "+t.title)("labelList",n.jc(3,8,"lang.availableUsers"))("routeDatas",n.vc(10,sL,"/rest/autocomplete/users?inEntity="+t.entity_id))("targetSearchKey","idToDisplay")("subInfoKey","descriptionToDisplay")}}function rL(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"h2"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"div",7),n.Wb(5,"b"),n.Qc(6),n.Vb(),n.Qc(7,"\xa0"),n.Rb(8,"span",8),n.ic(9,"translate"),n.Qc(10," : "),n.Vb(),n.Oc(11,oL,4,12,"div",9),n.Tb()),2&t){const t=n.hc(2);n.Db(2),n.Rc(n.jc(3,5,"lang.redirectUserListDiff")),n.Db(4),n.Tc("",t.data.user.firstname," ",t.data.user.lastname,""),n.Db(2),n.oc("innerHTML",n.jc(9,7,"lang.chooseNewDest"),n.Ec),n.Db(3),n.oc("ngForOf",t.userDestTemplates)}}const cL=function(){return["/rest/autocomplete/users"]};function lL(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"h2"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"div",7),n.Wb(5,"b"),n.Qc(6),n.Vb(),n.Qc(7,"\xa0"),n.Rb(8,"span",8),n.ic(9,"translate"),n.Qc(10," : "),n.Vb(),n.Wb(11,"div",10),n.Wb(12,"plugin-autocomplete",11),n.dc("triggerEvent",(function(e){return n.Dc(t),n.hc(2).setRedirectUserRes(e)})),n.ic(13,"translate"),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=n.hc(2);n.Db(2),n.Rc(n.jc(3,10,"lang.redirectUserListInstances")),n.Db(4),n.Tc("",t.data.user.firstname," ",t.data.user.lastname,""),n.Db(2),n.oc("innerHTML",n.jc(9,12,"lang.chooseNewDestUser"),n.Ec),n.Db(3),n.pc("id",t.data.user.user_id),n.Db(1),n.oc("labelPlaceholder",n.jc(13,14,"lang.newDestRes"))("labelList",n.jc(14,16,"lang.availableUsers"))("routeDatas",n.uc(18,cL))("targetSearchKey","idToDisplay")("subInfoKey","descriptionToDisplay")}}const dL=function(){return["/rest/autocomplete/users/circuit"]};function hL(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"h2"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"div",7),n.Wb(5,"b"),n.Qc(6),n.Vb(),n.Qc(7,"\xa0"),n.Rb(8,"span",8),n.ic(9,"translate"),n.Qc(10," : "),n.Vb(),n.Wb(11,"div",10),n.Wb(12,"plugin-autocomplete",11),n.dc("triggerEvent",(function(e){return n.Dc(t),n.hc(2).setRedirectUserVisaWorkflowRes(e)})),n.ic(13,"translate"),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=n.hc(2);n.Db(2),n.Rc(n.jc(3,10,"lang.redirectUserVisaWorkflow")),n.Db(4),n.Tc("",t.data.user.firstname," ",t.data.user.lastname,""),n.Db(2),n.oc("innerHTML",n.jc(9,12,"lang.chooseNewVisaUser"),n.Ec),n.Db(3),n.pc("id",t.data.user.user_id),n.Db(1),n.oc("labelPlaceholder",n.jc(13,14,"lang.newDestRes"))("labelList",n.jc(14,16,"lang.availableUsers"))("routeDatas",n.uc(18,dL))("targetSearchKey","idToDisplay")("subInfoKey","descriptionToDisplay")}}function uL(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div",7),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Tb()),2&t){const t=n.hc(2);n.Db(2),n.Uc(" ",n.jc(3,3,"lang."+t.data.user.actionMode)," ",t.data.user.firstname," ",t.data.user.lastname," ")}}function pL(t,e){if(1&t&&(n.Ub(0),n.Oc(1,rL,12,9,"ng-container",2),n.Oc(2,lL,15,19,"ng-container",2),n.Oc(3,hL,15,19,"ng-container",2),n.Oc(4,uL,4,5,"ng-container",2),n.Tb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.userDestTemplates.length>0),n.Db(1),n.oc("ngIf",t.userDestDifflists.length>0),n.Db(1),n.oc("ngIf",t.userVisaWorkflowResources.length>0),n.Db(1),n.oc("ngIf",0===t.userDestTemplates.length&&0===t.userDestDifflists.length&&0===t.userVisaWorkflowResources.length)}}function bL(t,e){if(1&t&&(n.Wb(0,"mat-list-item"),n.Wb(1,"mat-icon",16),n.Rb(2,"i",17),n.Vb(),n.Wb(3,"p",14),n.Wb(4,"span"),n.Qc(5),n.Vb(),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(5),n.Sc(" ",t," ")}}function fL(t,e){if(1&t&&(n.Wb(0,"div",13),n.Wb(1,"mat-list"),n.Wb(2,"p",14),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Oc(5,bL,6,1,"mat-list-item",15),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(3),n.Rc(n.jc(4,2,"lang.diffusionList")),n.Db(2),n.oc("ngForOf",t.userDestTemplates)}}function mL(t,e){if(1&t&&(n.Wb(0,"mat-list-item"),n.Wb(1,"mat-icon",16),n.Rb(2,"i",18),n.Vb(),n.Wb(3,"p",14),n.Wb(4,"span"),n.Qc(5),n.Vb(),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(5),n.Sc(" ",t," ")}}function gL(t,e){if(1&t&&(n.Wb(0,"div",13),n.Wb(1,"mat-list"),n.Wb(2,"p",14),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Oc(5,mL,6,1,"mat-list-item",15),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(3),n.Rc(n.jc(4,2,"lang.mailEntitiesList")),n.Db(2),n.oc("ngForOf",t.userDestDifflists)}}function vL(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div",7),n.Wb(2,"p"),n.Rb(3,"span",8),n.ic(4,"translate"),n.Wb(5,"b"),n.Qc(6),n.Vb(),n.Qc(7,"\xa0"),n.Vb(),n.Wb(8,"p"),n.Rb(9,"span",8),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Oc(11,fL,6,4,"div",12),n.Oc(12,gL,6,4,"div",12),n.Tb()),2&t){const t=n.hc();n.Db(3),n.oc("innerHTML",n.jc(4,6,"lang.userIsNotDeletable"),n.Ec),n.Db(3),n.Tc("",t.data.user.firstname," ",t.data.user.lastname,""),n.Db(3),n.oc("innerHTML",n.jc(10,8,"lang.userIsDeletableBy"),n.Ec),n.Db(2),n.oc("ngIf",t.userDestTemplates.length>0),n.Db(1),n.oc("ngIf",t.userDestDifflists.length>0)}}function _L(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",19),n.dc("click",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Qc(1),n.ic(2,"translate"),n.ic(3,"translate"),n.Vb()}if(2&t){const t=n.hc();n.oc("disabled",!t.isValid()),n.Db(1),n.Tc("",n.jc(2,3,"lang.delete")," ",n.jc(3,5,"lang.user"),"")}}function yL(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",20),n.dc("click",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Qc(1),n.ic(2,"translate"),n.ic(3,"translate"),n.Vb()}if(2&t){const t=n.hc();n.oc("disabled",!t.isValid()),n.Db(1),n.Tc("",n.jc(2,3,"lang.suspend")," ",n.jc(3,5,"lang.user"),"")}}function xL(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",21),n.dc("click",(function(){return n.Dc(t),n.hc().dialogRef.close()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.close")))}let CL=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.data=i,this.dialogRef=n,this.notify=a,this.modalTitle="lang.confirmAction",this.isDeletable=!1,this.userDestTemplates=[],this.userDestDifflists=[],this.userDestDifflistsRedirectUserId=null,this.userVisaWorkflowResources=[],this.userVisaWorkflowResourcesRedirectUserId=null}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){yield this.getActionInfo()}))}onSubmit(){return Object(r.a)(this,void 0,void 0,(function*(){this.userDestTemplates.length>0&&(yield this.updateListmodels()),this.userDestDifflists.length>0&&(yield this.updateListinstances()),this.userVisaWorkflowResources.length>0&&(yield this.updateVisaWorkflow()),"delete"===this.data.user.actionMode?yield this.deleteUser():yield this.suspendUser(),this.dialogRef.close("success")}))}getActionInfo(){return new Promise(t=>{this.http.get(`../rest/users/${this.data.user.id}/isDeletable`).pipe(Object(mt.a)(e=>{e&&e.hasOwnProperty("errors")?(this.notify.error(e.errors),this.dialogRef.close("")):(this.isDeletable=e.isDeletable,this.isDeletable?(this.userDestTemplates=e.listTemplates,this.userDestDifflists=e.listInstances,this.userVisaWorkflowResources=e.workflowListInstances):(this.modalTitle="delete"===this.data.user.actionMode?"lang.unableToDelete":"lang.unableToSuspend",this.userDestTemplates=e.listTemplateEntities,this.userDestDifflists=e.listInstanceEntities),t(!0))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}setRedirectUserListModels(t,e){this.data.user.user_id!=e.id?this.userDestTemplates[t].redirectUserId=e.id:(this.userDestTemplates[t].redirectUserId=null,this.notify.error(this.translate.instant("lang.userUnauthorized")))}setRedirectUserRes(t){this.data.user.user_id!=t.id?this.userDestDifflistsRedirectUserId=t.id:(this.userDestDifflistsRedirectUserId=null,this.notify.error(this.translate.instant("lang.userUnauthorized")))}setRedirectUserVisaWorkflowRes(t){this.data.user.user_id!=t.id?this.userVisaWorkflowResourcesRedirectUserId=t.id:(this.userVisaWorkflowResourcesRedirectUserId=null,this.notify.error(this.translate.instant("lang.userUnauthorized")))}isValid(){let t=!0;return this.userDestTemplates.length>0&&this.userDestTemplates.forEach(e=>{e.redirectUserId||(t=!1)}),this.userDestDifflists.length>0&&(this.userDestDifflistsRedirectUserId||(t=!1)),this.userVisaWorkflowResources.length>0&&(this.userVisaWorkflowResourcesRedirectUserId||(t=!1)),t}updateListmodels(){return new Promise(t=>{this.http.put("../rest/listTemplates/entityDest/itemId/"+this.data.user.id,{redirectListModels:this.userDestTemplates}).pipe(Object(mt.a)(e=>{null!=e&&e.errors?this.notify.error(e.errors):t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}updateListinstances(){return this.userDestDifflists.forEach((t,e)=>{this.userDestDifflists[e].listInstances=this.userDestDifflists[e].listInstances.map(t=>Object.assign(Object.assign({},t),{item_id:"dest"===t.item_mode&&t.item_id===this.data.user.id?this.userDestDifflistsRedirectUserId:t.item_id}))}),new Promise(t=>{this.http.put("../rest/listinstances",this.userDestDifflists).pipe(Object(mt.a)(e=>{e&&e.hasOwnProperty("errors")?this.notify.error(e.errors):t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}updateVisaWorkflow(){return this.userVisaWorkflowResources.forEach((t,e)=>{this.userVisaWorkflowResources[e].listInstances=this.userVisaWorkflowResources[e].listInstances.map(t=>Object.assign(Object.assign({},t),{item_id:null!==t.process_mode&&t.item_id===this.data.user.id?this.userVisaWorkflowResourcesRedirectUserId:t.item_id}))}),new Promise(t=>{this.http.put("../rest/circuits/visaCircuit",{resources:this.userVisaWorkflowResources}).pipe(Object(mt.a)(e=>{e&&e.hasOwnProperty("errors")?this.notify.error(e.errors):t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}deleteUser(){return new Promise(t=>{this.http.delete("../rest/users/"+this.data.user.id).pipe(Object(mt.a)(e=>{this.notify.success(this.translate.instant("lang.userDeleted")+" \xab "+this.data.user.user_id+" \xbb"),t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}suspendUser(){return new Promise(t=>{this.http.put(`../rest/users/${this.data.user.id}/suspend`,this.data.user).pipe(Object(mt.a)(e=>{this.notify.success(this.translate.instant("lang.userSuspended")),t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.a),n.Qb(q.h),n.Qb(D.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:12,vars:8,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],[4,"ngIf"],[1,"divider-modal"],["mat-raised-button","","color","warn","type","submit","class","btn btn-danger",3,"disabled","click",4,"ngIf"],["mat-raised-button","","color","primary","type","submit",3,"disabled","click",4,"ngIf"],["mat-raised-button","","color","default","type","submit",3,"click",4,"ngIf"],["role","alert",1,"alert-message","alert-message-info"],[3,"innerHTML"],["class","form-group",3,"id",4,"ngFor","ngForOf"],[1,"form-group",3,"id"],["singleMode","","required","",3,"labelPlaceholder","labelList","routeDatas","targetSearchKey","subInfoKey","triggerEvent"],["class","modal-body","class","col-md-6",4,"ngIf"],[1,"col-md-6"],["mat-line",""],[4,"ngFor","ngForOf"],["mat-list-icon",""],["color","primary",1,"fa","fa-share-alt"],["color","primary",1,"fa","fa-inbox"],["mat-raised-button","","color","warn","type","submit",1,"btn","btn-danger",3,"disabled","click"],["mat-raised-button","","color","primary","type","submit",3,"disabled","click"],["mat-raised-button","","color","default","type","submit",3,"click"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-dialog-content"),n.Oc(5,pL,5,4,"ng-container",2),n.Oc(6,vL,13,10,"ng-container",2),n.Vb(),n.Rb(7,"span",3),n.Wb(8,"mat-dialog-actions"),n.Oc(9,_L,4,7,"button",4),n.Oc(10,yL,4,7,"button",5),n.Oc(11,xL,3,3,"button",6),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,6,e.modalTitle)),n.Db(3),n.oc("ngIf",e.isDeletable),n.Db(1),n.oc("ngIf",!e.isDeletable),n.Db(3),n.oc("ngIf","delete"==e.data.user.actionMode&&e.isDeletable),n.Db(1),n.oc("ngIf","suspend"==e.data.user.actionMode&&e.isDeletable),n.Db(1),n.oc("ngIf",!e.data.isDeletable))},directives:[q.i,q.f,P.t,q.c,P.s,ii,R.a,W.l,R.d,S.a,R.c,k.b],pipes:[g.d],styles:["mat-icon[_ngcontent-%COMP%]{height:auto!important}.alert-message[_ngcontent-%COMP%]{max-width:100%}"]}),t})(),OL=(()=>{class t{constructor(t,e,i,n){this.notify=t,this.headerService=e,this.functionsService=i,this.localStorage=n,this.filters={},this.defaultFilters={admin_users:{sort:"user_id",sortDirection:"asc",page:0,field:""},admin_actions:{sort:"id",sortDirection:"asc",page:0,field:""},admin_baskets:{sort:"basket_id",sortDirection:"asc",page:0,field:""},admin_contacts_groups:{sort:"label",sortDirection:"asc",page:0,field:""},admin_listmodels:{sort:"title",sortDirection:"asc",page:0,field:""},admin_groups:{sort:"group_desc",sortDirection:"asc",page:0,field:""},admin_indexing_models:{sort:"label",sortDirection:"asc",page:0,field:""},admin_notif:{sort:"notification_id",sortDirection:"asc",page:0,field:""},admin_parameters:{sort:"id",sortDirection:"asc",page:0,field:""},admin_priorities:{sort:"label",sortDirection:"asc",page:0,field:""},admin_shippings:{sort:"label",sortDirection:"asc",page:0,field:""},admin_status:{sort:"label_status",sortDirection:"asc",page:0,field:""},admin_tag:{sort:"label",sortDirection:"asc",page:0,field:""},admin_templates:{sort:"template_label",sortDirection:"asc",page:0,field:""},admin_alfresco:{sort:"label",sortDirection:"asc",page:0,field:""},admin_contacts_list:{sort:"lastname",sortDirection:"asc",page:0,field:""},admin_regitered_mail_issuing_site:{sort:"accountNumber",sortDirection:"asc",page:0,field:""},admin_regitered_mail:{sort:"rangeNumber",sortDirection:"asc",page:0,field:""},admin_sso:{sort:"label",sortDirection:"asc",page:0,field:""}},this.searchTerm=new X.i(""),this.currentAdminId=""}setAdminId(t){this.currentAdminId=t}setDataSource(t,e,i,n,a){this.currentAdminId=t,null!==this.localStorage.get("filtersAdmin_"+this.headerService.user.id)?(this.filters=JSON.parse(this.localStorage.get("filtersAdmin_"+this.headerService.user.id)),void 0===this.filters[t]&&this.saveDefaultFilter()):this.saveDefaultFilter(),this.searchTerm=new X.i(""),this.searchTerm.valueChanges.pipe(Object(mt.a)(t=>{this.setFilter("field",t),this.saveFilter(this.filters[this.currentAdminId]),t=(t=t.trim()).toLowerCase(),setTimeout(()=>{this.dataSource.filter=t},0),this.dataSource.filterPredicate=(t,e)=>this.functionsService.filterUnSensitive(t,e,this.filterColumns)})).subscribe(),this.filterColumns=a,this.dataSource=new vt.p(e),this.dataSource.paginator=n,this.dataSource.sortingDataAccessor=this.functionsService.listSortingDataAccessor,n.pageIndex=this.getFilter("page"),this.dataSource.sort=i;const s=document.getElementsByClassName("mat-column-"+this.getFilter("sort"))[0];s.click(),"desc"===this.getFilter("sortDirection")&&s.click(),this.searchTerm.setValue(this.getFilter("field")),Object(gy.a)(i.sortChange,n.page).pipe(Object(Qe.a)({}),Object(mt.a)(()=>{this.saveFilter({sort:i.active,sortDirection:i.direction,page:n.pageIndex,field:this.getFilter("field")})}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}saveDefaultFilter(){this.saveFilter(this.defaultFilters[this.currentAdminId])}setFilter(t,e){this.filters[this.currentAdminId][t]=e}saveFilter(t){this.filters[this.currentAdminId]=t,this.localStorage.save("filtersAdmin_"+this.headerService.user.id,JSON.stringify(this.filters))}getFilterField(){return this.searchTerm}getDataSource(){return this.dataSource}getFilter(t=null){return this.functionsService.empty(this.filters[this.currentAdminId])?null:this.functionsService.empty(t)?this.functionsService.empty(this.filters[this.currentAdminId])?"":this.filters[this.currentAdminId]:this.functionsService.empty(this.filters[this.currentAdminId][t])?"":this.filters[this.currentAdminId][t]}}return t.\u0275fac=function(e){return new(e||t)(n.ac(D.a),n.ac(y.a),n.ac(_t.a),n.ac(Ut.a))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();const DL=["adminMenuTemplate"];function wL(t,e){1&t&&n.Rb(0,"mat-divider")}function ML(t,e){if(1&t&&(n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",11),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"p",19),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Wb(7,"p",19),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Wb(10,"p",19),n.Qc(11),n.ic(12,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.Rc(n.jc(3,7,"lang.quota")),n.Db(3),n.Tc("",n.jc(6,9,"lang.actives")," : ",t.quota.actives,""),n.Db(3),n.Tc("",n.jc(9,11,"lang.inactives")," : ",t.quota.inactives,""),n.Db(3),n.Tc("",n.jc(12,13,"lang.quota")," : ",t.quota.userQuota,"")}}function kL(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",11),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",12),n.Rb(5,"mat-icon",13),n.Wb(6,"p",14),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Wb(9,"a",15),n.dc("click",(function(){return n.Dc(t),n.hc().openUsersExportModal()})),n.Rb(10,"mat-icon",16),n.Wb(11,"p",14),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Wb(14,"a",15),n.dc("click",(function(){return n.Dc(t),n.hc().openUsersImportModal()})),n.Rb(15,"mat-icon",17),n.Wb(16,"p",14),n.Qc(17),n.ic(18,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Rb(19,"mat-divider"),n.Oc(20,wL,1,0,"mat-divider",18),n.Oc(21,ML,13,15,"mat-nav-list",18)}if(2&t){const t=n.hc();n.Db(2),n.Rc(n.jc(3,6,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,8,"lang.add")," "),n.Db(5),n.Sc(" ",n.jc(13,10,"lang.usersExport")," "),n.Db(5),n.Sc(" ",n.jc(18,12,"lang.usersImport")," "),n.Db(3),n.oc("ngIf",t.quota.userQuota),n.Db(1),n.oc("ngIf",t.quota.userQuota)}}function SL(t,e){1&t&&(n.Wb(0,"div",20),n.Rb(1,"mat-spinner",21),n.Vb())}function IL(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",48),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Sc("",n.jc(2,3,"lang.technicalId")," ")}}function PL(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",t.id," ")}}function VL(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",48),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Rc(n.jc(2,3,"lang.id"))}}function RL(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",t.user_id," ")}}function jL(t,e){1&t&&(n.Wb(0,"mat-header-cell",48),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.lastname")))}function AL(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.lastname," ")}}function WL(t,e){1&t&&(n.Wb(0,"mat-header-cell",48),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.firstname")))}function TL(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.firstname," ")}}function EL(t,e){1&t&&(n.Wb(0,"mat-header-cell",48),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.status")))}const FL=function(){return["SPD","ABS"]},LL=function(t,e){return{statusUserLabelWarn:t,statusUserLabelPrimary:e}};function QL(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Wb(1,"span",49),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngClass",n.wc(6,LL,n.uc(4,FL).indexOf(t.status)>-1,-1==n.uc(5,FL).indexOf(t.status))),n.Db(1),n.Rc(n.jc(3,2,"lang.user"+t.status))}}function NL(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",48),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Rc(n.jc(2,3,"lang.email"))}}function zL(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",t.mail," ")}}function BL(t,e){1&t&&n.Rb(0,"mat-header-cell")}const UL=function(){return["root_visible","root_invisible"]};function $L(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",55),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc(2);return e.stopPropagation(),a.actionUserPrompt(i,"suspend")})),n.ic(1,"translate"),n.Rb(2,"mat-icon",56),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc(2);n.pc("matTooltip",n.jc(1,2,"lang.suspend")),n.oc("disabled",t.id===e.user.id||n.uc(4,UL).indexOf(t.mode)>-1&&"standard"===e.headerService.user.mode)}}function HL(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",57),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc(2);return e.stopPropagation(),a.activateUser(i)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",58),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc(2);n.pc("matTooltip",n.jc(1,2,"lang.authorize")),n.oc("disabled",n.uc(4,UL).indexOf(t.mode)>-1&&"standard"===e.headerService.user.mode)}}function GL(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",50),n.Oc(1,$L,3,5,"button",51),n.Oc(2,HL,3,5,"button",52),n.Wb(3,"button",53),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.actionUserPrompt(a,"delete")})),n.ic(4,"translate"),n.Rb(5,"mat-icon",54),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.Db(1),n.oc("ngIf","SPD"!=t.status),n.Db(1),n.oc("ngIf","SPD"==t.status),n.Db(1),n.pc("matTooltip",n.jc(4,4,"lang.delete")),n.oc("disabled",t.id===i.user.id||n.uc(6,UL).indexOf(t.mode)>-1)}}function XL(t,e){1&t&&n.Rb(0,"mat-header-row")}function qL(t,e){if(1&t&&(n.Rb(0,"mat-row",59),n.ic(1,"translate")),2&t){const t=e.$implicit;n.Ib("admin",n.uc(6,UL).indexOf(t.mode)>-1),n.qc("routerLink","/administration/users/",t.id,""),n.pc("matTooltip",n.jc(1,4,"lang.view"))}}function KL(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",22),n.Wb(1,"div",23),n.Wb(2,"div",24),n.Wb(3,"mat-form-field"),n.Rb(4,"input",25),n.ic(5,"translate"),n.Wb(6,"mat-button-toggle",26),n.dc("click",(function(e){n.Dc(t);const i=n.hc();return e.stopPropagation(),i.toggleWebserviceAccount()})),n.ic(7,"translate"),n.Rb(8,"mat-icon",27),n.Vb(),n.Vb(),n.Vb(),n.Wb(9,"div",24),n.Rb(10,"mat-paginator",28,29),n.Vb(),n.Vb(),n.Wb(12,"mat-table",30,31),n.Ub(14,32),n.Oc(15,IL,3,5,"mat-header-cell",33),n.Oc(16,PL,2,3,"mat-cell",34),n.Tb(),n.Ub(17,35),n.Oc(18,VL,3,5,"mat-header-cell",33),n.Oc(19,RL,2,3,"mat-cell",34),n.Tb(),n.Ub(20,36),n.Oc(21,jL,3,3,"mat-header-cell",37),n.Oc(22,AL,2,1,"mat-cell",38),n.Tb(),n.Ub(23,39),n.Oc(24,WL,3,3,"mat-header-cell",37),n.Oc(25,TL,2,1,"mat-cell",38),n.Tb(),n.Ub(26,40),n.Oc(27,EL,3,3,"mat-header-cell",37),n.Oc(28,QL,4,9,"mat-cell",38),n.Tb(),n.Ub(29,41),n.Oc(30,NL,3,5,"mat-header-cell",33),n.Oc(31,zL,2,3,"mat-cell",34),n.Tb(),n.Ub(32,42),n.Oc(33,BL,1,0,"mat-header-cell",43),n.Oc(34,GL,6,7,"mat-cell",44),n.Tb(),n.Oc(35,XL,1,0,"mat-header-row",45),n.Oc(36,qL,2,7,"mat-row",46),n.Vb(),n.Wb(37,"div",47),n.Qc(38),n.ic(39,"translate"),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(4),n.pc("placeholder",n.jc(5,12,"lang.filterBy")),n.oc("formControl",t.adminService.getFilterField()),n.Db(2),n.pc("title",n.jc(7,14,"lang.displayWebserviceAccount")),n.oc("checked",t.withWebserviceAccount),n.Db(4),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.adminService.getDataSource()),n.Db(23),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns),n.Db(2),n.Tc(" ",t.data.length," ",n.jc(39,16,"lang.usersAlt"),"")}}let YL=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this.translate=t,this.http=e,this.notify=i,this.dialog=n,this.headerService=a,this.appService=s,this.functions=o,this.adminService=r,this.viewContainerRef=c,this.loading=!0,this.updateListModel=!0,this.updateListInstance=!0,this.data=[],this.config={},this.userDestRedirect={},this.userDestRedirectModels=[],this.listinstances=[],this.quota={},this.user={},this.withWebserviceAccount=!1,this.webserviceAccounts=[],this.noWebserviceAccounts=[],this.displayedColumns=["id","user_id","lastname","firstname","status","mail","actions"],this.filterColumns=["id","user_id","lastname","firstname","mail"]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.users")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.user=this.headerService.user,this.getData()}getData(){this.webserviceAccounts=[],this.noWebserviceAccounts=[],this.data=[],this.http.get("../rest/users").pipe(Object(mt.a)(t=>{this.data=t.users,this.data.forEach(t=>{t.statusLabel=this.translate.instant("lang.user"+t.status),"rest"===t.mode?this.webserviceAccounts.push(t):this.noWebserviceAccounts.push(t)}),this.data=this.noWebserviceAccounts,this.quota=t.quota,this.quota.actives>this.quota.userQuota&&this.notify.error(this.translate.instant("lang.quotaExceeded")),this.loading=!1,setTimeout(()=>{this.adminService.setDataSource("admin_users",this.data,this.sort,this.paginator,this.filterColumns)},0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}activateUser(t){confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.authorize")+" \xab "+t.user_id+" \xbb")&&(t.status="OK",this.http.put("../rest/users/"+t.id,t).subscribe(()=>{this.notify.success(this.translate.instant("lang.userAuthorized")),this.updateQuota(t,"activate")},e=>{t.status="SPD",this.notify.error(e.error.errors)}))}updateQuota(t,e){"delete"===e?this.quota.userQuota&&"OK"===t.status?this.quota.actives--:this.quota.userQuota&&"SPD"===t.status&&this.quota.inactives--:"suspend"===e?this.quota.userQuota&&(this.quota.inactives++,this.quota.actives--):"activate"===e&&this.quota.userQuota&&(this.quota.inactives--,this.quota.actives++,this.quota.actives>this.quota.userQuota&&this.notify.error(this.translate.instant("lang.quotaExceeded")))}actionUserPrompt(t,e){t.actionMode=e,this.dialogRef=this.dialog.open(CL,{panelClass:"maarch-modal",data:{user:t}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"success"===t),Object(mt.a)(i=>{if(this.updateQuota(t,e),"delete"===t.actionMode){for(const e in this.data)this.data[e].id==t.id&&this.data.splice(Number(e),1);this.adminService.setDataSource("admin_users",this.data,this.sort,this.paginator,this.filterColumns)}else t.status="SPD"})).subscribe()}toggleWebserviceAccount(){this.withWebserviceAccount=!this.withWebserviceAccount,this.data=this.withWebserviceAccount?this.webserviceAccounts:this.noWebserviceAccounts,this.adminService.setDataSource("admin_users",this.data,this.sort,this.paginator,this.filterColumns)}openUsersImportModal(){this.dialog.open(tL,{disableClose:!0,width:"99vw",maxWidth:"99vw",panelClass:"maarch-full-height-modal"}).afterClosed().pipe(Object(d.a)(t=>"success"===t),Object(mt.a)(()=>{this.getData()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}openUsersExportModal(){this.dialog.open(aL,{panelClass:"maarch-modal",width:"400px",autoFocus:!1})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a),n.Qb(OL),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(DL,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:15,vars:8,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["mat-subheader",""],["mat-list-item","","routerLink","/administration/users/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],["mat-list-item","",3,"click"],["color","primary","mat-list-icon","",1,"fas","fa-file-export"],["color","primary","mat-list-icon","",1,"fas","fa-file-import"],[4,"ngIf"],["mat-line","",2,"margin-left","20px"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"row"],[1,"col-md-6","col-xs-6"],["matInput","",3,"formControl","placeholder"],["matSuffix","",1,"webserviceAccount",3,"checked","title","click"],["fontSet","fas","fontIcon","fa-user-shield fa-2x",2,"margin-left","-2px","margin-top","-4px"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSort","","matSortDisableClear","",3,"dataSource"],["table",""],["matColumnDef","id"],["mat-sort-header","",3,"hide-for-mobile",4,"matHeaderCellDef"],[3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","user_id"],["matColumnDef","lastname"],["mat-sort-header","",4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","firstname"],["matColumnDef","status"],["matColumnDef","mail"],["matColumnDef","actions"],[4,"matHeaderCellDef"],["style","justify-content: flex-end;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"routerLink","matTooltip","admin",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["mat-sort-header",""],[1,"label",3,"ngClass"],[2,"justify-content","flex-end"],["mat-icon-button","","color","primary",3,"disabled","matTooltip","click",4,"ngIf"],["mat-icon-button","","color","accent",3,"matTooltip","disabled","click",4,"ngIf"],["mat-icon-button","","color","warn","data-toggle","modal","data-target","#changeDiffListDest",3,"disabled","matTooltip","click"],[1,"fa","fa-trash-alt","fa-2x"],["mat-icon-button","","color","primary",3,"disabled","matTooltip","click"],["aria-hidden","true",1,"fa","fa-pause","fa-2x"],["mat-icon-button","","color","accent",3,"matTooltip","disabled","click"],["aria-hidden","true",1,"fa","fa-check","fa-2x"],[2,"cursor","pointer",3,"routerLink","matTooltip"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,kL,22,14,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,SL,2,0,"div",9),n.Oc(14,KL,40,18,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,R.h,R.g,R.d,o.f,S.a,R.c,W.l,T.a,V.c,K.a,Y.c,J.b,X.d,X.u,X.j,og.a,Y.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,vt.h,Fe.b,vt.a,P.q,k.b,A.b,vt.j,vt.m,o.d],pipes:[g.d],styles:["button[_ngcontent-%COMP%]:disabled{opacity:.3!important}.statusUserLabelWarn[_ngcontent-%COMP%]{color:#8e3e52}.statusUserLabelPrimary[_ngcontent-%COMP%]{color:#135f7f}.webserviceAccount[_ngcontent-%COMP%]{color:#666;width:37px;height:37px;font-size:x-small;border-radius:18px!important}.mat-button-toggle-checked[_ngcontent-%COMP%]{background-color:#f99830!important;color:#fff}.admin[_ngcontent-%COMP%]{font-weight:700}"]}),t})();function JL(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list"),n.Wb(1,"mat-list-item"),n.Rb(2,"mat-icon",8),n.Wb(3,"h4",9),n.Qc(4),n.Vb(),n.Wb(5,"p",10),n.Qc(6),n.Vb(),n.Wb(7,"button",11),n.dc("click",(function(){return n.Dc(t),n.hc().unlinkMaarchParapheurAccount()})),n.ic(8,"translate"),n.Rb(9,"mat-icon",12),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(2),n.Lc("background-image","url("+t.externalUser.picture+")"),n.Db(2),n.Tc("",t.externalUser.firstname," ",t.externalUser.lastname,""),n.Db(2),n.Rc(t.externalUser.email),n.Db(1),n.oc("title",n.jc(8,6,"lang.unlinkAccount"))}}function ZL(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"input",13),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().externalUser.login=e})),n.ic(2,"translate"),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(1),n.pc("placeholder",n.jc(2,2,"lang.newLoginInMaarchParapheur")),n.oc("ngModel",t.externalUser.login)}}function tQ(t,e){if(1&t&&(n.Rb(0,"div",14),n.ic(1,"translate"),n.ic(2,"translate")),2&t){const t=n.hc();n.oc("innerHTML",n.jc(1,1,"lang.maarchParapheurAccountMsg")+" <b>"+t.externalUser.login+"</b> "+n.jc(2,3,"lang.maarchParapheurAccountMsg2"),n.Ec)}}const eQ=function(){return["/rest/autocomplete/maarchParapheurUsers?exludeAlreadyConnected=true"]};let iQ=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.data=i,this.dialogRef=n,this.notify=a,this.externalUser={inMaarchParapheur:!1,login:"",firstname:"",lastname:"",email:"",picture:""}}ngOnInit(){this.http.get("../rest/autocomplete/maarchParapheurUsers",{params:{search:this.data.user.mail,exludeAlreadyConnected:"true"}}).subscribe(t=>{t.length>0?(this.externalUser=t[0],this.externalUser.inMaarchParapheur=!0,this.http.get("../rest/maarchParapheur/user/"+this.externalUser.id+"/picture").subscribe(t=>{this.externalUser.picture=t.picture},t=>{this.notify.handleErrors(t)})):(this.externalUser.inMaarchParapheur=!1,this.externalUser=this.data.user,this.externalUser.login=this.data.user.user_id,this.externalUser.email=this.data.user.mail)},t=>{this.notify.handleErrors(t)})}selectUser(t){this.externalUser=t,this.externalUser.inMaarchParapheur=!0,this.http.get("../rest/maarchParapheur/user/"+this.externalUser.id+"/picture").subscribe(t=>{this.externalUser.picture=t.picture},t=>{this.notify.handleErrors(t)})}unlinkMaarchParapheurAccount(){this.externalUser.inMaarchParapheur=!1,this.externalUser=this.data.user,this.externalUser.login=this.data.user.user_id,this.externalUser.email=this.data.user.mail}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.a),n.Qb(q.h),n.Qb(D.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:18,vars:20,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["appearance","outline",3,"labelPlaceholder","routeDatas","targetSearchKey","subInfoKey","triggerEvent"],[4,"ngIf"],["class","alert-message alert-message-danger","role","alert","style","margin-top: 30px;",3,"innerHTML",4,"ngIf"],[1,"divider-modal"],["color","primary","mat-raised-button","",3,"disabled","click"],["mat-raised-button","",3,"click"],["color","primary","mat-list-icon","",1,"avatarAccount"],["mat-line",""],["mat-line","",2,"color","#666"],["mat-icon-button","","color","warn",3,"title","click"],[1,"fas","fa-unlink"],["type","text","matInput","",3,"placeholder","ngModel","ngModelChange"],["role","alert",1,"alert-message","alert-message-danger",2,"margin-top","30px",3,"innerHTML"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-dialog-content"),n.Wb(5,"plugin-autocomplete",2),n.dc("triggerEvent",(function(t){return e.selectUser(t)})),n.ic(6,"translate"),n.Vb(),n.Oc(7,JL,10,8,"mat-list",3),n.Oc(8,ZL,3,4,"mat-form-field",3),n.Oc(9,tQ,3,5,"div",4),n.Vb(),n.Rb(10,"span",5),n.Wb(11,"mat-dialog-actions"),n.Wb(12,"button",6),n.dc("click",(function(){return e.dialogRef.close(e.externalUser)})),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Wb(15,"button",7),n.dc("click",(function(){return e.dialogRef.close("")})),n.Qc(16),n.ic(17,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,11,"lang.linkAccount")),n.Db(3),n.oc("labelPlaceholder",n.jc(6,13,"lang.searchUserInMaarchParapheur"))("routeDatas",n.uc(19,eQ))("targetSearchKey","idToDisplay")("subInfoKey","email"),n.Db(2),n.oc("ngIf",e.externalUser.inMaarchParapheur),n.Db(1),n.oc("ngIf",!e.externalUser.inMaarchParapheur),n.Db(1),n.oc("ngIf",!e.externalUser.inMaarchParapheur),n.Db(3),n.oc("disabled",""===e.externalUser.login),n.Db(1),n.Rc(n.jc(14,15,"lang.validate")),n.Db(3),n.Rc(n.jc(17,17,"lang.cancel")))},directives:[q.i,q.f,ii,P.t,q.c,k.b,R.a,R.d,S.a,R.c,W.l,Y.c,J.b,X.d,X.u,X.x],pipes:[g.d],styles:[".avatarAccount[_ngcontent-%COMP%]{border:3px solid #f99830;height:45px!important;width:45px!important;background-size:cover;background-repeat:no-repeat;background-position:50%}"]}),t})();function nQ(t,e){1&t&&(n.Rb(0,"mat-hint",7),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.hotkeyInfo"),n.Ec)}function aQ(t,e){1&t&&(n.Wb(0,"div",8),n.ic(1,"translate"),n.Rb(2,"i",9),n.Qc(3,"\xa0"),n.Rb(4,"span",10),n.ic(5,"translate"),n.Vb()),2&t&&(n.oc("title",n.jc(1,2,"lang.hotkeyTitle")),n.Db(4),n.oc("innerHTML",n.jc(5,4,"lang.hotkeyMsg"),n.Ec))}function sQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-nested-tree-node"),n.Wb(1,"li"),n.Wb(2,"div",11),n.Rb(3,"button",12),n.Wb(4,"div",13),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().selectNode(i)})),n.Rb(5,"i",14),n.Qc(6),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc();n.Db(4),n.Ib("node-selected",t.state.selected)("node-disabled",t.state.disabled)("node-hide",i.searchMode&&!t.state.search)("node-highlight",i.searchMode&&t.state.search),n.Db(1),n.Fb(t.icon),n.Db(1),n.Sc("\xa0",t.text," ")}}function oQ(t,e){1&t&&(n.Wb(0,"div"),n.Sb(1,19),n.Vb())}function rQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-nested-tree-node"),n.Wb(1,"li",15),n.Wb(2,"div",11),n.Wb(3,"button",16),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc();return a.toggleNode(a.dataSource.data,{opened:!i.state.opened},[i.id])})),n.Rb(4,"mat-icon"),n.Vb(),n.Wb(5,"div",13),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().selectNode(i)})),n.Rb(6,"i",14),n.Qc(7),n.Vb(),n.Vb(),n.Wb(8,"ul",17),n.Oc(9,oQ,2,0,"div",18),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc();n.Db(1),n.Ib("fixHeight",!t.state.opened),n.Db(2),n.qc("id","button-",t.id,""),n.Eb("aria-label","toggle "+t.filename),n.Db(1),n.Gb("tree-exp far ",t.state.opened?"fa-minus-square":"fa-plus-square",""),n.Db(1),n.Ib("node-selected",t.state.selected)("node-disabled",t.state.disabled)("node-hide",i.searchMode&&!t.state.search)("node-highlight",i.searchMode&&t.state.search),n.Db(1),n.Fb(t.icon),n.Db(1),n.Sc("\xa0",t.text," "),n.Db(1),n.Ib("lastNode",t.last),n.Db(1),n.oc("ngIf",t.state.opened)}}let cQ=(()=>{class t{constructor(t,e){this.sortPipe=t,this.latinisePipe=e,this.rawData=[],this.selectionPropagation=!0,this.openState="",this.afterSelectNode=new n.o,this.afterDeselectNode=new n.o,this.holdShift=!1,this.defaultOpenedNodes=[],this.treeControl=new fy.k(t=>t.children),this.dataSource=new vy.f,this.searchMode=!1,this.searchTerm=new X.i(""),this.lastSelectedNodeIds=[],this.pendingChildOf={},this.temp={},this.hasChild=(t,e)=>!!e.children&&e.children.length>0}onKeydownHandler(t){this.selectionPropagation&&(this.holdShift=!0)}onKeyupHandler(t){this.holdShift=!1}ngOnInit(){this.rawData.length>0&&this.initData()}initData(t=this.rawData){let e,n;this.rawData=t,"all"!==this.openState&&this.setDefaultOpened(),this.rawData=t.map(t=>Object.assign(Object.assign({},t),{parent_id:"#"===t.parent_id||""===t.parent_id?null:t.parent_id,state:void 0!==t.state?{selected:t.state.selected,opened:t.state.opened||this.defaultOpenedNodes.indexOf(t.id)>-1||"all"===this.openState,disabled:t.state.disabled}:{selected:!1,opened:this.defaultOpenedNodes.indexOf(t.id)>-1||"all"===this.openState,disabled:!1}})),this.rawData=this.sortPipe.transform(this.rawData,"text"),e=i("g9mw"),n=new e({id:"id",parent:"parent_id",children:"children",options:{deleteParent:!1}});let a=n.convert(this.rawData);a=a.children,this.initLastNodes(a),this.dataSource.data=a,this.treeControl.dataNodes=a,this.searchTerm.valueChanges.pipe(Object(pt.a)(300),Object(mt.a)(t=>{t=(t=t.trim()).toLowerCase(),this.searchNode(this.dataSource.data,t)})).subscribe()}setDefaultOpened(){this.rawData.filter(t=>void 0!==t.state&&t.state.opened).forEach(t=>{this.defaultOpenedNodes=this.defaultOpenedNodes.concat(this.getParents([t]))}),this.defaultOpenedNodes=this.defaultOpenedNodes.map(t=>t.id)}getData(t){return this.rawData.filter(e=>e.id===t)[0]}getIteration(t){return Array(t).fill(0).map((t,e)=>e)}selectNode(t){t.state.disabled||(this.searchMode&&(this.searchMode=!1,this.searchTerm.setValue("")),this.lastSelectedNodeIds=[],this.holdShift?this.toggleNode(this.dataSource.data,{selected:!t.state.selected,opened:!0},[t.id]):(t.state.selected=!t.state.selected,this.lastSelectedNodeIds=[t]),t.state.selected?this.afterSelectNode.emit(this.lastSelectedNodeIds):this.afterDeselectNode.emit(this.lastSelectedNodeIds))}toggleNode(t,e,i){Array.isArray(t)?t.forEach(t=>{(i.indexOf(t.id)>-1||this.holdShift&&i.indexOf(t.parent_id)>-1)&&Object.keys(e).forEach(i=>{t.state.disabled&&"opened"===i?t.state[i]=e[i]:t.state.disabled||(t.state[i]=e[i],"selected"===i&&this.lastSelectedNodeIds.push(t))}),this.holdShift&&i.indexOf(t.parent_id)>-1&&i.push(t.id),this.toggleNode(t,e,i)}):t instanceof Object&&(t.children||[]).forEach(t=>{(i.indexOf(t.id)>-1||this.holdShift&&i.indexOf(t.parent_id)>-1)&&Object.keys(e).forEach(i=>{t.state.disabled&&"opened"===i?t.state[i]=e[i]:t.state.disabled||(t.state[i]=e[i],"selected"===i&&this.lastSelectedNodeIds.push(t))}),this.holdShift&&i.indexOf(t.parent_id)>-1&&i.push(t.id),this.toggleNode(t,e,i)})}getParents(t){const e=this.rawData.filter(e=>e.id===t[t.length-1].parent_id);return e.length>0?(t.push(e[0]),this.getParents(t)):t}searchNode(t,e){this.searchMode=""!==e,Array.isArray(t)?t.forEach(t=>{t.state.opened=!0,this.latinisePipe.transform(t.text.toLowerCase()).indexOf(this.latinisePipe.transform(e))>-1?t.state.search=!0:""===e?delete t.state.search:t.state.search=!1,this.searchNode(t,e)}):t instanceof Object&&(t.children||[]).forEach(t=>{t.state.opened=!0,this.latinisePipe.transform(t.text.toLowerCase()).indexOf(this.latinisePipe.transform(e))>-1?t.state.search=!0:""===e?delete t.state.search:t.state.search=!1,this.searchNode(t,e)})}initLastNodes(t){Array.isArray(t)?t.forEach((e,i)=>{i===t.length-1&&(e.last=!0),this.initLastNodes(e)}):t instanceof Object&&(t.children||[]).forEach((e,i)=>{i===t.children.length-1&&(e.last=!0),this.initLastNodes(e)})}getSelectedNodes(){return this.rawData.filter(t=>t.state.selected)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(Wt.a),n.Qb(Tt.c))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-maarch-flat-tree"]],hostBindings:function(t,e){1&t&&n.dc("keydown.Shift",(function(t){return e.onKeydownHandler(t)}),!1,n.Bc)("keyup.Shift",(function(t){return e.onKeyupHandler(t)}),!1,n.Bc)},inputs:{rawData:"rawData",selectionPropagation:"selectionPropagation",openState:"openState"},outputs:{afterSelectNode:"afterSelectNode",afterDeselectNode:"afterDeselectNode"},features:[n.Cb([Wt.a])],decls:9,vars:9,consts:[["matInput","","type","text",3,"formControl","placeholder"],["align","end",3,"innerHTML",4,"ngIf"],[2,"position","relative","padding-top","20px"],["class","msgHotkey",3,"title",4,"ngIf"],[3,"dataSource","treeControl"],[4,"matTreeNodeDef"],[4,"matTreeNodeDef","matTreeNodeDefWhen"],["align","end",3,"innerHTML"],[1,"msgHotkey",3,"title"],[1,"fas","fa-keyboard"],[3,"innerHTML"],[1,"mat-tree-node"],["mat-icon-button","","matTreeNodeToggle","","disabled","",2,"position","absolute","left","-35px"],[1,"node-content",3,"click"],[2,"width","24px","text-align","center"],[1,"example-tree-container"],["mat-icon-button","",2,"position","absolute","left","-35px",3,"id","click"],[1,"example-tree-nested-node"],[4,"ngIf"],["matTreeNodeOutlet",""]],template:function(t,e){1&t&&(n.Wb(0,"mat-form-field"),n.Rb(1,"input",0),n.ic(2,"translate"),n.Oc(3,nQ,2,3,"mat-hint",1),n.Vb(),n.Wb(4,"div",2),n.Oc(5,aQ,6,6,"div",3),n.Wb(6,"mat-tree",4),n.Oc(7,sQ,7,11,"mat-nested-tree-node",5),n.Oc(8,rQ,10,21,"mat-nested-tree-node",6),n.Vb(),n.Vb()),2&t&&(n.Db(1),n.pc("placeholder",n.jc(2,7,"lang.searchEntities")),n.oc("formControl",e.searchTerm),n.Db(2),n.oc("ngIf",e.selectionPropagation),n.Db(2),n.oc("ngIf",e.holdShift),n.Db(1),n.oc("dataSource",e.dataSource)("treeControl",e.treeControl),n.Db(2),n.oc("matTreeNodeDefWhen",e.hasChild))},directives:[Y.c,J.b,X.d,X.u,X.j,P.t,vy.b,vy.h,Y.f,vy.a,k.b,vy.k,S.a,vy.i],pipes:[g.d],styles:[".example-tree-progress-bar[_ngcontent-%COMP%]{margin-left:30px}.example-tree-nested-node[_ngcontent-%COMP%]{padding-left:30px}mat-tree[_ngcontent-%COMP%]{margin-left:10px}.mat-tree-node[_ngcontent-%COMP%]{font-family:Titillium Web,sans-serif,Arial;min-height:32px;line-height:32px;min-width:32px;height:32px;padding:0;background-color:#fff;white-space:pre}.mat-nested-tree-node[_ngcontent-%COMP%]{top:-24px}li[_ngcontent-%COMP%], ul[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0}li.example-tree-container[_ngcontent-%COMP%]{border-bottom:0}ul[_ngcontent-%COMP%]{padding-left:40px}li[_ngcontent-%COMP%]{padding-left:15px;border:1px dotted grey;border-width:0 0 1px 1px;position:relative;top:-24px}li.mat-tree-node[_ngcontent-%COMP%], li[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:0;position:relative;top:17px}li[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{padding-top:15px;border-top:1px dotted grey;margin-left:-15px;padding-left:27px}.lastNode[_ngcontent-%COMP%]{border-left:1px solid #fff;margin-left:-16px!important}.mat-icon-button[_ngcontent-%COMP%]{z-index:100}.fixHeight[_ngcontent-%COMP%]{height:33px}.node-content[_ngcontent-%COMP%]{height:24px;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;border-radius:5px;display:flex;align-items:center;margin-top:-35px!important;z-index:2}.node-content[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#666;color:#135f7f}.node-content[_ngcontent-%COMP%]:not(.node-selected):not(.node-disabled):hover{background-color:hsla(0,0%,40%,.10980392156862745)!important;transition:all .3s}.node-selected[_ngcontent-%COMP%]{background-color:#1a80ab;color:#fff;transition:all .3s}.node-selected[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fff}.node-disabled[_ngcontent-%COMP%]{opacity:.5;cursor:not-allowed}.node-hide[_ngcontent-%COMP%]{opacity:.5}.node-highlight[_ngcontent-%COMP%]{font-weight:700;color:#135f7f}.tree-exp[_ngcontent-%COMP%]:before{background:#fff}.msgHotkey[_ngcontent-%COMP%]{position:absolute;background:rgba(0,0,0,.5882352941176471);color:#fff;z-index:3;padding:5px;border-radius:5px;font-size:10px;top:0;right:0}"]}),t})();const lQ=["snav2"],dQ=["adminMenuTemplate"],hQ=["maarchTree"];function uQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"a",18),n.dc("click",(function(){return n.Dc(t),n.hc(3).activateAbsence()})),n.Rb(1,"mat-icon",19),n.Wb(2,"p",20),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(3),n.Sc(" ",n.jc(4,1,"lang.activateAbsence")," "))}function pQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"a",18),n.dc("click",(function(){return n.Dc(t),n.hc(3).desactivateAbsence()})),n.Rb(1,"mat-icon",21),n.Wb(2,"p",20),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(3),n.Sc(" ",n.jc(4,1,"lang.desactivateAbsence")," "))}function bQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"a",18),n.dc("click",(function(){return n.Dc(t),n.hc(3).resendActivationNotification()})),n.Rb(1,"mat-icon",22),n.Wb(2,"p",20),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(3),n.Sc(" ",n.jc(4,1,"lang.sendActivationNotification")," "))}function fQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"a",18),n.dc("click",(function(){return n.Dc(t),n.hc(3).changePasswd()})),n.Rb(1,"mat-icon",23),n.Wb(2,"p",20),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(3),n.Sc(" ",n.jc(4,1,"lang.changePassword")," "))}function mQ(t,e){1&t&&(n.Wb(0,"p",27),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.maarchParapheurLinkbroken")," "))}function gQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"a",24),n.dc("click",(function(){return n.Dc(t),n.hc(3).linkMaarchParapheurAccount()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",25),n.Wb(3,"p",20),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Oc(6,mQ,3,3,"p",26),n.Vb()}if(2&t){const t=n.hc(3);n.pc("title",n.jc(1,3,"lang.createUserInMaarchParapheur")),n.Db(4),n.Sc(" ",n.jc(5,5,"lang.linkAccount")," "),n.Db(2),n.oc("ngIf",!t.maarchParapheurConnectionStatus)}}function vQ(t,e){if(1&t&&(n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",13),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Oc(4,uQ,5,3,"a",16),n.Oc(5,pQ,5,3,"a",16),n.Oc(6,bQ,5,3,"a",16),n.Oc(7,fQ,5,3,"a",16),n.Oc(8,gQ,7,7,"a",17),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.Rc(n.jc(3,6,"lang.actions")),n.Db(2),n.oc("ngIf","ABS"!=t.user.status),n.Db(1),n.oc("ngIf","ABS"==t.user.status),n.Db(1),n.oc("ngIf",t.user.canSendActivationNotification),n.Db(1),n.oc("ngIf",t.user.canModifyPassword),n.Db(1),n.oc("ngIf",t.user.canCreateMaarchParapheurUser||""===t.maarchParapheurLink.login)}}function _Q(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list"),n.Wb(1,"h3",13),n.Qc(2,"Compte Maarch Parapheur"),n.Vb(),n.Wb(3,"mat-list-item"),n.Rb(4,"mat-icon",28),n.Wb(5,"p",29),n.Wb(6,"span"),n.Qc(7),n.Vb(),n.Wb(8,"button",30),n.dc("click",(function(){return n.Dc(t),n.hc(2).unlinkMaarchParapheurAccount()})),n.ic(9,"translate"),n.Rb(10,"mat-icon",31),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(4),n.Lc("background-image","url("+t.maarchParapheurLink.picture+")"),n.Db(3),n.Sc(" ",t.maarchParapheurLink.login," "),n.Db(1),n.pc("title",n.jc(9,4,"lang.unlinkAccount"))}}function yQ(t,e){if(1&t&&(n.Oc(0,vQ,9,8,"mat-nav-list",15),n.Rb(1,"mat-divider"),n.Oc(2,_Q,11,6,"mat-list",15)),2&t){const t=n.hc();n.oc("ngIf",!t.creationMode&&!t.loading),n.Db(2),n.oc("ngIf",""!==t.maarchParapheurLink.login)}}function xQ(t,e){1&t&&(n.Wb(0,"div",32),n.Rb(1,"mat-spinner",33),n.Vb())}function CQ(t,e){1&t&&(n.Wb(0,"mat-error"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.requiredField"),""))}function OQ(t,e){1&t&&(n.Wb(0,"mat-hint"),n.Rb(1,"i",58),n.Wb(2,"span",59),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Rc(n.jc(4,1,"lang.passwordValid")))}function DQ(t,e){1&t&&(n.Wb(0,"mat-hint"),n.Rb(1,"i",58),n.Wb(2,"span",59),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Rc(n.jc(4,1,"lang.passwordMatch")))}function wQ(t,e){if(1&t&&(n.Wb(0,"div",44),n.Wb(1,"div",60),n.Rb(2,"div",61),n.Vb(),n.Vb()),2&t){const t=n.hc(3);n.Db(2),n.oc("innerHTML",t.otherRuleText,n.Ec)}}const MQ=function(t){return[t]};function kQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",42),n.Wb(1,"form",43),n.Wb(2,"div",44),n.Wb(3,"mat-form-field",45),n.Rb(4,"input",46),n.ic(5,"translate"),n.Wb(6,"mat-icon",47),n.dc("click",(function(){n.Dc(t);const e=n.hc(2);return e.hidePassword=!e.hidePassword})),n.Vb(),n.Oc(7,CQ,3,3,"mat-error",15),n.Vb(),n.Vb(),n.Wb(8,"div",44),n.Wb(9,"div",48),n.Qc(10),n.Vb(),n.Wb(11,"div",49),n.Wb(12,"mat-form-field",45),n.Rb(13,"input",50,51),n.ic(15,"translate"),n.Wb(16,"mat-icon",47),n.dc("click",(function(){n.Dc(t);const e=n.hc(2);return e.hidePassword=!e.hidePassword})),n.Vb(),n.Oc(17,OQ,5,3,"mat-hint",15),n.Wb(18,"mat-error"),n.Qc(19),n.Vb(),n.Vb(),n.Vb(),n.Wb(20,"div",49),n.Wb(21,"mat-form-field",45),n.Rb(22,"input",52,53),n.ic(24,"translate"),n.Wb(25,"mat-icon",47),n.dc("click",(function(){n.Dc(t);const e=n.hc(2);return e.hidePassword=!e.hidePassword})),n.Vb(),n.Oc(26,DQ,5,3,"mat-hint",15),n.Wb(27,"mat-error"),n.Qc(28),n.ic(29,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Oc(30,wQ,3,1,"div",54),n.Wb(31,"div",44),n.Wb(32,"div",55),n.Wb(33,"button",56),n.dc("click",(function(){return n.Dc(t),n.hc(2).updatePassword()})),n.Qc(34),n.ic(35,"translate"),n.Vb(),n.Wb(36,"button",57),n.dc("click",(function(){return n.Dc(t),n.hc(2).showPassword=!1})),n.Qc(37),n.ic(38,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.oc("formGroup",t.firstFormGroup),n.Db(3),n.pc("placeholder",n.jc(5,20,"lang.typeCurrentPassword")),n.oc("type",t.hidePassword?"password":"text"),n.Db(2),n.oc("ngClass",n.vc(32,MQ,t.hidePassword?"fa-eye-slash":"fa-eye")),n.Db(1),n.oc("ngIf",t.firstFormGroup.controls.currentPasswordCtrl.hasError("required")),n.Db(3),n.Sc(" ",t.ruleText,""),n.Db(3),n.pc("placeholder",n.jc(15,22,"lang.typeNewPassword")),n.oc("type",t.hidePassword?"password":"text"),n.Db(3),n.oc("ngClass",n.vc(34,MQ,t.hidePassword?"fa-eye-slash":"fa-eye")),n.Db(1),n.oc("ngIf",t.validPassword),n.Db(2),n.Rc(t.getErrorMessage()),n.Db(3),n.pc("placeholder",n.jc(24,24,"lang.retypeNewPassword")),n.oc("type",t.hidePassword?"password":"text"),n.Db(3),n.oc("ngClass",n.vc(36,MQ,t.hidePassword?"fa-eye-slash":"fa-eye")),n.Db(1),n.oc("ngIf",!t.firstFormGroup.controls.retypePasswordCtrl.hasError("mismatch")&&""!=t.firstFormGroup.controls.retypePasswordCtrl.value),n.Db(2),n.Sc("",n.jc(29,26,"lang.passwordNotMatch")," !"),n.Db(2),n.oc("ngIf",t.passwordRules.renewal.enabled||t.passwordRules.historyLastUse.enabled),n.Db(3),n.oc("disabled",!t.firstFormGroup.valid),n.Db(1),n.Rc(n.jc(35,28,"lang.update")),n.Db(3),n.Rc(n.jc(38,30,"lang.cancel"))}}function SQ(t,e){if(1&t&&(n.Wb(0,"div",62),n.Qc(1),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Sc(" ",t.user.status,"")}}function IQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"input",84),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(3).user.userId=e}))("keyup",(function(){return n.Dc(t),n.hc(3).setLowerUserId()})),n.ic(1,"translate"),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(3);n.pc("title",n.jc(1,3,"lang.id")),n.pc("placeholder",n.jc(2,5,"lang.id")),n.oc("ngModel",t.user.userId)}}function PQ(t,e){if(1&t&&(n.Rb(0,"input",85),n.ic(1,"translate"),n.ic(2,"translate")),2&t){const t=n.hc(3);n.pc("title",n.jc(1,3,"lang.id")),n.pc("value",t.user.user_id),n.pc("placeholder",n.jc(2,5,"lang.id"))}}const VQ=function(){return["root_visible","root_invisible"]};function RQ(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-option",86),n.ic(2,"translate"),n.Qc(3),n.Vb(),n.Tb()),2&t){const t=e.$implicit,i=n.hc(3);n.Db(1),n.oc("value",t.id)("disabled","standard"===i.headerService.user.mode&&n.uc(6,VQ).indexOf(t.id)>-1)("title","standard"===i.headerService.user.mode&&n.uc(7,VQ).indexOf(t.id)>-1?n.jc(2,4,"lang.mustSuperadmin"):""),n.Db(2),n.Sc(" ",t.label," ")}}function jQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div"),n.Wb(1,"mat-form-field"),n.Wb(2,"mat-label"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"textarea",87),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(3).user.authorizedApi=e})),n.Vb(),n.Wb(6,"mat-hint"),n.Qc(7),n.ic(8,"translate"),n.Wb(9,"a",88),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(3);n.Db(3),n.Rc(n.jc(4,5,"lang.authorizedRoutes")),n.Db(2),n.oc("ngModel",t.user.authorizedApi),n.Db(2),n.Sc("",n.jc(8,7,"lang.authorizedRoutesInformations")," "),n.Db(2),n.qc("href","https://docs.maarch.org/gitbook/html/MaarchCourrier/",t.appVersion,"/guat/guat_architecture/API_REST/home.html",n.Gc),n.Db(1),n.Rc(n.jc(11,9,"lang.here"))}}function AQ(t,e){if(1&t&&(n.Wb(0,"button",89),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){n.hc();const t=n.zc(1);n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(2,2,"lang.save"))}}function WQ(t,e){if(1&t&&(n.Wb(0,"button",89),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){n.hc();const t=n.zc(1);n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(2,2,"lang.update"))}}function TQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"form",63,64),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc(2).onSubmit()})),n.Wb(2,"div",44),n.Wb(3,"div",65),n.Wb(4,"div",66),n.Wb(5,"div",67),n.Rb(6,"i",68),n.Vb(),n.Vb(),n.Wb(7,"div",69),n.Wb(8,"mat-form-field"),n.Oc(9,IQ,3,7,"input",70),n.Oc(10,PQ,3,7,"input",71),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(11,"div",44),n.Wb(12,"div",72),n.Wb(13,"mat-form-field"),n.Wb(14,"input",73),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).user.lastname=e})),n.ic(15,"translate"),n.ic(16,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(17,"div",72),n.Wb(18,"mat-form-field"),n.Wb(19,"input",74),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).user.firstname=e})),n.ic(20,"translate"),n.ic(21,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(22,"div",75),n.Wb(23,"mat-form-field"),n.Wb(24,"input",76),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).user.initials=e})),n.ic(25,"translate"),n.ic(26,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(27,"div",44),n.Wb(28,"div",65),n.Wb(29,"mat-form-field"),n.Wb(30,"input",77),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).user.phone=e})),n.ic(31,"translate"),n.ic(32,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(33,"div",44),n.Wb(34,"div",65),n.Wb(35,"mat-form-field"),n.Wb(36,"input",78),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).user.mail=e})),n.ic(37,"translate"),n.ic(38,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(39,"mat-accordion"),n.Wb(40,"mat-expansion-panel",79),n.Wb(41,"mat-expansion-panel-header"),n.Wb(42,"mat-panel-title",80),n.Qc(43),n.ic(44,"translate"),n.Vb(),n.Vb(),n.Wb(45,"div"),n.Wb(46,"mat-form-field"),n.Wb(47,"mat-label"),n.Qc(48),n.ic(49,"translate"),n.Vb(),n.Wb(50,"mat-select",81),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).user.mode=e})),n.Oc(51,RQ,4,8,"ng-container",14),n.ic(52,"sortBy"),n.Vb(),n.Vb(),n.Vb(),n.Oc(53,jQ,12,11,"div",15),n.Vb(),n.Vb(),n.Wb(54,"div",82),n.Wb(55,"div",55),n.Oc(56,AQ,3,4,"button",83),n.Oc(57,WQ,3,4,"button",83),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(9),n.oc("ngIf",t.creationMode),n.Db(1),n.oc("ngIf",!t.creationMode),n.Db(4),n.pc("title",n.jc(15,27,"lang.lastname")),n.pc("placeholder",n.jc(16,29,"lang.lastname")),n.oc("ngModel",t.user.lastname),n.Db(5),n.pc("title",n.jc(20,31,"lang.firstname")),n.pc("placeholder",n.jc(21,33,"lang.firstname")),n.oc("ngModel",t.user.firstname),n.Db(5),n.pc("title",n.jc(25,35,"lang.initials")),n.pc("placeholder",n.jc(26,37,"lang.initials")),n.oc("ngModel",t.user.initials),n.Db(6),n.pc("title",n.jc(31,39,"lang.phoneNumber")),n.pc("placeholder",n.jc(32,41,"lang.phoneNumber")),n.oc("ngModel",t.user.phone)("disabled",t.creationMode&&!t.canManagePersonalDatas||!t.creationMode&&(!t.canManagePersonalDatas||!t.canViewPersonalDatas)),n.Db(6),n.pc("title",n.jc(37,43,"lang.email")),n.pc("placeholder",n.jc(38,45,"lang.email")),n.oc("ngModel",t.user.mail),n.Db(4),n.oc("expanded",t.creationMode),n.Db(3),n.Sc(" ",n.jc(44,47,"lang.otherInformations")," "),n.Db(5),n.Rc(n.jc(49,49,"lang.accountType")),n.Db(2),n.oc("ngModel",t.user.mode)("disabled","standard"===t.headerService.user.mode&&n.uc(54,VQ).indexOf(t.user.mode)>-1),n.Db(1),n.oc("ngForOf",n.kc(52,51,t.adminModes,"label")),n.Db(2),n.oc("ngIf","rest"===t.user.mode),n.Db(3),n.oc("ngIf",t.creationMode),n.Db(1),n.oc("ngIf",!t.creationMode)}}function EQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item",91),n.Wb(1,"mat-slide-toggle",92),n.dc("change",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).toggleGroup(i)})),n.Qc(2),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.pc("id",t.group_id),n.oc("checked",1==t.checked)("disabled",!t.enabled),n.Db(1),n.Sc(" ",t.group_desc,"")}}function FQ(t,e){if(1&t&&(n.Wb(0,"mat-tab",36),n.ic(1,"translate"),n.Wb(2,"mat-nav-list"),n.Oc(3,EQ,3,4,"mat-list-item",90),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.pc("label",n.jc(1,2,"lang.groups")),n.Db(3),n.oc("ngForOf",t.user.allGroups)}}function LQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab",36),n.ic(1,"translate"),n.Wb(2,"app-maarch-flat-tree",93,94),n.dc("afterSelectNode",(function(e){return n.Dc(t),n.hc(2).addEntity(e)}))("afterDeselectNode",(function(e){return n.Dc(t),n.hc(2).deleteEntity(e)})),n.Vb(),n.Vb()}2&t&&(n.pc("label",n.jc(1,3,"lang.entities")),n.Db(2),n.oc("selectionPropagation",!1)("openState","all"))}function QQ(t,e){1&t&&(n.Wb(0,"p",100),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.selectAll")," "))}const NQ=function(){return["/rest/autocomplete/users"]},zQ=function(){return["no-margin"]};function BQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"p",101),n.Wb(1,"button",102),n.ic(2,"translate"),n.Rb(3,"mat-icon",103),n.Rb(4,"mat-divider",104),n.Vb(),n.Wb(5,"button",105),n.dc("click",(function(){return n.Dc(t),n.hc(3).toggleBasket(!1)})),n.ic(6,"translate"),n.Rb(7,"mat-icon",106),n.Vb(),n.Wb(8,"button",107),n.dc("click",(function(){return n.Dc(t),n.hc(3).toggleBasket(!0)})),n.ic(9,"translate"),n.Rb(10,"mat-icon",108),n.Vb(),n.Wb(11,"mat-menu",109,110),n.Wb(13,"plugin-autocomplete",111),n.dc("triggerEvent",(function(e){return n.Dc(t),n.hc(3).addBasketRedirection(e)})),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(12),e=n.hc(3);n.Db(1),n.pc("matTooltip",n.jc(2,11,"lang.redirectBaskets")),n.oc("matMenuTriggerFor",t),n.Db(3),n.oc("vertical",!0),n.Db(1),n.pc("matTooltip",n.jc(6,13,"lang.disableBasket")),n.Db(3),n.pc("matTooltip",n.jc(9,15,"lang.enableBasket")),n.Db(5),n.oc("labelPlaceholder",n.jc(14,17,"lang.redirectBaskets"))("routeDatas",n.uc(19,NQ))("targetSearchKey","idToDisplay")("subInfoKey","descriptionToDisplay")("disableItems",n.vc(20,MQ,e.user.id))("styles",n.uc(22,zQ))}}function UQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-icon",96),n.Wb(1,"mat-checkbox",118),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("change",(function(e){n.Dc(t);const i=n.hc(2).$implicit,a=n.hc(3);return e?a.selectionBaskets.toggle(i):null})),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2).$implicit,e=n.hc(3);n.Db(1),n.oc("checked",e.selectionBaskets.isSelected(t))}}const $Q=function(t){return{opacity:t}};function HQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item",113),n.Oc(1,UQ,2,1,"mat-icon",114),n.Wb(2,"h4",115),n.Wb(3,"span",116),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(3).selectionBaskets.toggle(e)})),n.Qc(4),n.Wb(5,"span",117),n.Qc(6),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",t.enabled),n.Db(2),n.rc("matTooltip","",t.basket_name," [",t.group_desc,"]"),n.oc("ngStyle",n.vc(6,$Q,t.allowed?"1":"0.5")),n.Db(1),n.Sc(" ",t.basket_name," "),n.Db(2),n.Rc(t.group_desc)}}function GQ(t,e){if(1&t&&(n.Ub(0),n.Oc(1,HQ,7,8,"mat-list-item",112),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",null==t.userToDisplay)}}function XQ(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"mat-list-item"),n.Rb(2,"mat-icon",119),n.Wb(3,"h4",120),n.Qc(4),n.Wb(5,"span",117),n.Qc(6),n.Vb(),n.Vb(),n.Wb(7,"p",20),n.Wb(8,"mat-form-field"),n.Rb(9,"input",121),n.ic(10,"translate"),n.Wb(11,"button",122),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=e.index;return n.hc(3).delBasketRedirection(i,a)})),n.ic(12,"translate"),n.Rb(13,"mat-icon",123),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=e.$implicit;n.Db(4),n.Sc("",t.basket_name," "),n.Db(2),n.Rc(t.group_desc),n.Db(3),n.rc("value","",n.jc(10,5,"lang.redirectedTo")," ",t.userToDisplay,""),n.Db(2),n.pc("matTooltip",n.jc(12,7,"lang.deleteRedirection"))}}function qQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"plugin-autocomplete",127),n.dc("triggerEvent",(function(e){n.Dc(t);const i=n.hc(),a=i.$implicit,s=i.index;return n.hc(3).reassignBasketRedirection(e,a,s)})),n.ic(1,"translate"),n.Vb()}2&t&&n.oc("labelPlaceholder",n.jc(1,4,"lang.redirectBaskets"))("routeDatas",n.uc(6,NQ))("targetSearchKey","idToDisplay")("subInfoKey","descriptionToDisplay")}function KQ(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"mat-list-item"),n.Rb(2,"mat-icon",124),n.Wb(3,"h4",120),n.Qc(4),n.Wb(5,"span",117),n.Qc(6),n.Vb(),n.Vb(),n.Wb(7,"p",20),n.Oc(8,qQ,2,7,"plugin-autocomplete",125),n.Wb(9,"mat-form-field"),n.Rb(10,"input",121),n.ic(11,"translate"),n.Wb(12,"button",122),n.dc("click",(function(){return e.$implicit.userToDisplay=null})),n.ic(13,"translate"),n.Rb(14,"mat-icon",126),n.Vb(),n.Wb(15,"button",122),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=e.index;return n.hc(3).delBasketAssignRedirection(i,a)})),n.ic(16,"translate"),n.Rb(17,"mat-icon",123),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=e.$implicit;n.Db(4),n.Sc("",t.basket_name," "),n.Db(2),n.Rc(t.group_desc),n.Db(2),n.oc("ngIf",null==t.userToDisplay),n.Db(2),n.rc("value","",n.jc(11,7,"lang.assignBy")," ",t.userToDisplay,""),n.Db(2),n.pc("matTooltip",n.jc(13,9,"lang.reassign")),n.Db(3),n.pc("matTooltip",n.jc(16,11,"lang.deleteAssignation"))}}function YQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab",36),n.ic(1,"translate"),n.Wb(2,"div",95),n.Wb(3,"mat-list"),n.Wb(4,"mat-list-item"),n.Wb(5,"mat-icon",96),n.Wb(6,"mat-checkbox",97),n.dc("change",(function(e){n.Dc(t);const i=n.hc(2);return e?i.masterToggleBaskets(e):null})),n.ic(7,"translate"),n.Vb(),n.Vb(),n.Oc(8,QQ,3,3,"p",98),n.Oc(9,BQ,15,23,"p",99),n.Vb(),n.Rb(10,"mat-divider"),n.Oc(11,GQ,2,1,"ng-container",14),n.Vb(),n.Vb(),n.Wb(12,"div",95),n.Wb(13,"mat-tab-group"),n.Wb(14,"mat-tab",36),n.ic(15,"translate"),n.Wb(16,"mat-list"),n.Oc(17,XQ,14,9,"ng-container",14),n.Vb(),n.Vb(),n.Vb(),n.Wb(18,"mat-tab-group"),n.Wb(19,"mat-tab",36),n.ic(20,"translate"),n.Wb(21,"mat-list"),n.Oc(22,KQ,18,13,"ng-container",14),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.pc("label",n.jc(1,10,"lang.baskets")),n.Db(6),n.pc("matTooltip",n.jc(7,12,"lang.selectAll")),n.oc("checked",t.selectionBaskets.hasValue()),n.Db(2),n.oc("ngIf",!t.selectionBaskets.hasValue()),n.Db(1),n.oc("ngIf",t.selectionBaskets.hasValue()),n.Db(2),n.oc("ngForOf",t.user.baskets),n.Db(3),n.pc("label",n.jc(15,14,"lang.basketsRedirected")),n.Db(3),n.oc("ngForOf",t.user.redirectedBaskets),n.Db(2),n.pc("label",n.jc(20,16,"lang.basketsAssigned")),n.Db(3),n.oc("ngForOf",t.user.assignedBaskets)}}function JQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",147),n.dc("click",(function(){return n.Dc(t),n.hc(3).clickOnUploader("uploadSignFile")}))("dragover",(function(){return n.Dc(t),n.hc(3).highlightMe=!0}))("dragleave",(function(){return n.Dc(t),n.hc(3).highlightMe=!1}))("onDropSuccess",(function(e){n.Dc(t);const i=n.hc(3);return i.test(e),i.highlightMe=!1})),n.ic(1,"translate"),n.Qc(2),n.ic(3,"translate"),n.Vb()}if(2&t){const t=n.hc(3);n.Ib("dndFileHighlighted",t.highlightMe),n.pc("matTooltip",n.jc(1,4,"lang.uploadSignFileInfo")),n.Db(2),n.Sc(" ",n.jc(3,6,"lang.uploadSignFile")," ")}}function ZQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",148),n.Wb(1,"mat-card",149),n.Wb(2,"mat-card-content",55),n.Wb(3,"mat-form-field",150),n.Wb(4,"input",151),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.signature_label=i}))("change",(function(){n.Dc(t);const i=e.index;return n.hc(3).updateSignature(i)})),n.ic(5,"translate"),n.Vb(),n.Wb(6,"button",152),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).deleteSignature(i)})),n.ic(7,"translate"),n.Rb(8,"mat-icon",153),n.Vb(),n.Vb(),n.Rb(9,"img",154),n.ic(10,"async"),n.ic(11,"secureUrl"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(3);n.Db(4),n.pc("placeholder",n.jc(5,6,"lang.label")),n.oc("ngModel",t.signature_label)("disabled",!i.canManagePersonalDatas),n.Db(2),n.pc("matTooltip",n.jc(7,8,"lang.delete")),n.oc("disabled",!i.canManagePersonalDatas),n.Db(3),n.oc("src",n.jc(10,10,n.jc(11,12,"../rest/users/"+i.user.id+"/signatures/"+t.id+"/content")),n.Gc)}}function tN(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",155),n.dc("click",(function(){return n.Dc(t),n.hc(3).syncMP()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",156),n.Vb()}if(2&t){const t=n.hc(3);n.pc("matTooltip",n.jc(1,4,"lang.syncSignsToMaarchParapheur")),n.oc("disabled",!t.user.external_id.maarchParapheur||t.loadingSign),n.Db(2),n.Ib("fa-spin",t.loadingSign)}}function eN(t,e){if(1&t&&(n.Wb(0,"div",157),n.Rb(1,"img",158),n.Vb()),2&t){const t=n.hc(3);n.Db(1),n.pc("src",t.signatureModel.base64ForJs,n.Gc)}}function iN(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab",128),n.ic(1,"translate"),n.Oc(2,JQ,4,8,"div",129),n.Wb(3,"div",130),n.Wb(4,"div",131),n.Oc(5,ZQ,12,14,"div",132),n.Vb(),n.Wb(6,"div"),n.Oc(7,tN,3,6,"button",133),n.Vb(),n.Vb(),n.Wb(8,"form",134,135),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc(2).submitSignature()})),n.Wb(10,"div",136),n.Wb(11,"input",137),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).signatureModel.label=e})),n.ic(12,"translate"),n.Vb(),n.Wb(13,"div",138),n.Wb(14,"div",44),n.Wb(15,"input",139),n.dc("change",(function(e){return n.Dc(t),n.hc(2).uploadSignatureTrigger(e)})),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(16,"div",140),n.Wb(17,"button",141),n.Rb(18,"i",142),n.Vb(),n.Vb(),n.Wb(19,"div",143),n.Wb(20,"div",144),n.dc("click",(function(){return n.Dc(t),n.hc(2).clickOnUploader("uploadSignFile")})),n.Qc(21),n.ic(22,"translate"),n.Rb(23,"i",145),n.Qc(24," ( < 2MB ) "),n.Vb(),n.Vb(),n.Oc(25,eN,2,1,"div",146),n.Vb(),n.Vb()}if(2&t){const t=n.zc(9),e=n.hc(2);n.pc("label",n.jc(1,11,"lang.signatures")),n.oc("disabled",!e.canViewPersonalDatas),n.Db(2),n.oc("ngIf",e.canManagePersonalDatas),n.Db(3),n.oc("ngForOf",e.user.signatures),n.Db(2),n.oc("ngIf",e.user.signatures.length>0&&e.canManagePersonalDatas),n.Db(4),n.pc("placeholder",n.jc(12,13,"lang.label")),n.oc("ngModel",e.signatureModel.label),n.Db(6),n.oc("disabled",!t.form.valid||!e.signatureModel.size),n.Db(2),n.oc("ngClass",n.vc(17,MQ,""!=e.signatureModel.size?"col-md-10":"col-md-12")),n.Db(2),n.Sc(" ",n.jc(22,15,"lang.clickOn")," "),n.Db(4),n.oc("ngIf",e.signatureModel.size)}}function nN(t,e){1&t&&(n.Wb(0,"mat-header-cell",183),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.date")," "))}function aN(t,e){if(1&t&&(n.Wb(0,"mat-cell",131),n.Qc(1),n.ic(2,"date"),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",n.kc(2,1,t.event_date,"dd/MM/y HH:mm"),"")}}function sN(t,e){1&t&&(n.Wb(0,"mat-header-cell",131),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.technicalId")," "))}function oN(t,e){if(1&t&&(n.Wb(0,"mat-cell",131),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc("",t.record_id," ")}}function rN(t,e){1&t&&(n.Wb(0,"mat-header-cell",184),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.description"),""))}function cN(t,e){if(1&t&&(n.Wb(0,"mat-cell",185),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.info," ")}}function lN(t,e){1&t&&(n.Wb(0,"mat-header-cell",183),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.ip")," "))}function dN(t,e){if(1&t&&(n.Wb(0,"mat-cell",131),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.remote_ip," ")}}function hN(t,e){1&t&&n.Rb(0,"mat-header-row")}function uN(t,e){1&t&&n.Rb(0,"mat-row")}function pN(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab",36),n.ic(1,"translate"),n.Wb(2,"div",159),n.Wb(3,"div"),n.Wb(4,"div",160),n.Wb(5,"div",161),n.Wb(6,"mat-form-field"),n.Wb(7,"input",162),n.dc("keyup",(function(e){return n.Dc(t),n.hc(2).applyFilter(e.target.value)})),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(9,"div",161),n.Rb(10,"mat-paginator",163,164),n.Vb(),n.Vb(),n.Wb(12,"mat-table",165,166),n.Ub(14,167),n.Oc(15,nN,3,3,"mat-header-cell",168),n.Oc(16,aN,3,4,"mat-cell",169),n.Tb(),n.Ub(17,170),n.Oc(18,sN,3,3,"mat-header-cell",171),n.Oc(19,oN,2,1,"mat-cell",169),n.Tb(),n.Ub(20,172),n.Oc(21,rN,3,3,"mat-header-cell",173),n.Oc(22,cN,2,1,"mat-cell",174),n.Tb(),n.Ub(23,175),n.Oc(24,lN,3,3,"mat-header-cell",168),n.Oc(25,dN,2,1,"mat-cell",169),n.Tb(),n.Oc(26,hN,1,0,"mat-header-row",176),n.Oc(27,uN,1,0,"mat-row",177),n.Vb(),n.Wb(28,"div",160),n.Wb(29,"div",178),n.Wb(30,"mat-form-field"),n.Wb(31,"input",179),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).minDate=e})),n.ic(32,"translate"),n.Vb(),n.Rb(33,"mat-datepicker-toggle",180),n.Rb(34,"mat-datepicker",181,182),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(35),e=n.hc(2);n.pc("label",n.jc(1,13,"lang.history")),n.Db(7),n.pc("placeholder",n.jc(8,15,"lang.filterBy")),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",e.dataSource),n.Db(14),n.oc("matHeaderRowDef",e.displayedColumns),n.Db(1),n.oc("matRowDefColumns",e.displayedColumns),n.Db(4),n.pc("placeholder",n.jc(32,17,"lang.since")),n.oc("ngModel",e.minDate)("matDatepicker",t),n.Db(2),n.oc("for",t),n.Db(1),n.oc("startAt",e.minDate)}}function bN(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",34),n.Wb(1,"mat-tab-group",35),n.dc("selectedIndexChange",(function(e){return n.Dc(t),n.hc().selectedTabIndex=e}))("selectedTabChange",(function(){return n.Dc(t),n.hc().initService()})),n.Wb(2,"mat-tab",36),n.ic(3,"translate"),n.Oc(4,kQ,39,38,"div",37),n.Oc(5,SQ,2,1,"div",38),n.Oc(6,TQ,58,55,"form",39),n.Vb(),n.Oc(7,FQ,4,4,"mat-tab",40),n.Oc(8,LQ,4,5,"mat-tab",40),n.Oc(9,YQ,23,18,"mat-tab",40),n.Oc(10,iN,26,19,"mat-tab",41),n.Oc(11,pN,36,19,"mat-tab",40),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(1),n.oc("selectedIndex",t.selectedTabIndex),n.Db(1),n.pc("label",n.jc(3,10,"lang.informations")),n.Db(2),n.oc("ngIf",t.showPassword),n.Db(1),n.oc("ngIf","ABS"==t.user.status&&!t.showPassword),n.Db(1),n.oc("ngIf",!t.showPassword),n.Db(1),n.oc("ngIf",!t.creationMode),n.Db(1),n.oc("ngIf",!t.creationMode),n.Db(1),n.oc("ngIf",!t.creationMode),n.Db(1),n.oc("ngIf",!t.creationMode),n.Db(1),n.oc("ngIf",!t.creationMode)}}function fN(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item"),n.Rb(1,"mat-icon",186),n.Wb(2,"h4",20),n.Qc(3),n.Vb(),n.Wb(4,"p",20),n.Wb(5,"mat-form-field",187),n.Wb(6,"input",188),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.role=i}))("change",(function(){n.Dc(t);const i=e.$implicit;return n.hc().updateGroup(i)})),n.ic(7,"translate"),n.ic(8,"translate"),n.Vb(),n.Wb(9,"mat-hint",189),n.ic(10,"translate"),n.Qc(11),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(3),n.Rc(t.group_desc),n.Db(3),n.pc("title",n.jc(7,6,"lang.role")),n.pc("placeholder",n.jc(8,8,"lang.role")),n.oc("ngModel",t.role),n.Db(3),n.pc("matTooltip",n.jc(10,10,"lang.perimeter")),n.Db(2),n.Rc(t.maarch_comment)}}function mN(t,e){1&t&&n.Rb(0,"mat-icon",194)}function gN(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-icon",195),n.Wb(1,"button",196),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc().updatePrimaryEntity(e)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",197),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.pc("matTooltip",n.jc(2,1,"lang.entityTooglePrimary")))}function vN(t,e){1&t&&(n.Wb(0,"span",117),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.primary")))}const _N=function(t){return{"font-weight":t}};function yN(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item"),n.Oc(1,mN,1,0,"mat-icon",190),n.Oc(2,gN,4,3,"mat-icon",191),n.Wb(3,"h4",192),n.Qc(4),n.Oc(5,vN,3,3,"span",193),n.Vb(),n.Wb(6,"p",20),n.Wb(7,"mat-form-field",187),n.Wb(8,"input",188),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.user_role=i}))("change",(function(){n.Dc(t);const i=e.$implicit;return n.hc().updateEntity(i)})),n.ic(9,"translate"),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf","Y"==t.primary_entity),n.Db(1),n.oc("ngIf","Y"!=t.primary_entity),n.Db(1),n.pc("matTooltip",t.entity_label),n.oc("ngStyle",n.vc(13,_N,"Y"==t.primary_entity?"bold":"normal")),n.Db(1),n.Sc(" ",t.entity_label," "),n.Db(1),n.oc("ngIf","Y"==t.primary_entity),n.Db(3),n.pc("title",n.jc(9,9,"lang.role")),n.pc("placeholder",n.jc(10,11,"lang.role")),n.oc("ngModel",t.user_role)}}function xN(t,e){1&t&&(n.Rb(0,"div",15),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.redirectConfidentialInfo"),n.Ec)}function CN(t,e){1&t&&(n.Rb(0,"div",15),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.redirectModelInfo"),n.Ec)}function ON(t,e){if(1&t){const t=n.Xb();n.Wb(0,"plugin-autocomplete",16),n.dc("triggerEvent",(function(e){return n.Dc(t),n.hc().setRedirectUser(e)})),n.ic(1,"translate"),n.ic(2,"translate"),n.Vb()}2&t&&n.oc("labelPlaceholder",n.jc(1,5,"lang.userReplacement"))("labelList",n.jc(2,7,"lang.availableUsers"))("routeDatas",n.uc(9,NQ))("targetSearchKey","idToDisplay")("subInfoKey","descriptionToDisplay")}function DN(t,e){1&t&&(n.Wb(0,"span"),n.Wb(1,"em"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,1,"lang.doNothingRedirectInformations")))}function wN(t,e){1&t&&(n.Rb(0,"span",17),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.removeUserRedirectInformations"),n.Ec)}function MN(t,e){1&t&&(n.Wb(0,"span"),n.Wb(1,"em"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,1,"lang.reaffectUserRedirectInformations")))}let kN=(()=>{class t{constructor(t,e,i,n,s,o,r,c,l,d,h,u){this.translate=t,this.http=e,this.route=i,this.router=n,this.zone=s,this.notify=o,this.dialog=r,this.headerService=c,this._formBuilder=l,this.appService=d,this.privilegeService=h,this.viewContainerRef=u,this.loading=!1,this.highlightMe=!1,this.config={},this.mode="",this.user={mode:"standard",authorizedApi:""},this._search="",this.signatureModel={base64:"",base64ForJs:"",name:"",type:"",size:0,label:""},this.userAbsenceModel=[],this.userList=[],this.maarchParapheurLink={login:"",picture:""},this.selectedSignature=-1,this.selectedSignatureLabel="",this.loadingSign=!1,this.data=[],this.CurrentYear=(new Date).getFullYear(),this.currentMonth=(new Date).getMonth()+1,this.minDate=new Date,this.ruleText="",this.validPassword=!1,this.showPassword=!1,this.hidePassword=!0,this.passwordModel={currentPassword:"",newPassword:"",reNewPassword:""},this.passwordRules={minLength:{enabled:!1,value:0},complexityUpper:{enabled:!1,value:0},complexityNumber:{enabled:!1,value:0},complexitySpecial:{enabled:!1,value:0},renewal:{enabled:!1,value:0},historyLastUse:{enabled:!1,value:0}},this.displayedColumns=["event_date","record_id","info","remote_ip"],this.dataSource=new vt.p(this.data),this.selectedTabIndex=0,this.maarchParapheurConnectionStatus=!0,this.canViewPersonalDatas=!1,this.canManagePersonalDatas=!1,this.adminModes=[{id:"standard",label:this.translate.instant("lang.standard")},{id:"root_visible",label:this.translate.instant("lang.root_visible")},{id:"root_invisible",label:this.translate.instant("lang.root_invisible")},{id:"rest",label:this.translate.instant("lang.rest")}],this.appVersion=a.a.VERSION.split(".")[0]+"."+a.a.VERSION.split(".")[1],this.selectionBaskets=new O.c(!0,[]),window.angularUserAdministrationComponent={componentAfterUpload:t=>this.processAfterUpload(t)}}applyFilter(t){t=(t=t.trim()).toLowerCase(),this.dataSource.filter=t}masterToggleBaskets(t){t.checked?this.user.baskets.forEach(t=>{t.userToDisplay||this.selectionBaskets.select(t)}):this.selectionBaskets.clear()}ngOnInit(){this.loading=!0,this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.route.params.subscribe(t=>{void 0===t.id?(this.headerService.setHeader(this.translate.instant("lang.userCreation")),this.creationMode=!0,this.canViewPersonalDatas=!1,this.canManagePersonalDatas=this.privilegeService.hasCurrentUserPrivilege("manage_personal_data"),this.loading=!1):(this.creationMode=!1,this.serialId=t.id,this.http.get("../rest/users/"+this.serialId+"/details").subscribe(t=>{this.user=t,"rest"===this.user.mode&&(this.user.authorizedApi=this.user.authorizedApi.join("\n")),this.headerService.user.id===this.user.id?(this.canViewPersonalDatas=!0,this.canManagePersonalDatas=!0):(this.canViewPersonalDatas=this.privilegeService.hasCurrentUserPrivilege("view_personal_data"),this.canManagePersonalDatas=this.privilegeService.hasCurrentUserPrivilege("manage_personal_data")),this.canManagePersonalDatas&&(this.canViewPersonalDatas=!0),this.canViewPersonalDatas||(this.user.phone="****"),this.data=t.history,this.userId=t.user_id,this.minDate=new Date(this.CurrentYear+"-"+this.currentMonth+"-01"),this.headerService.setHeader(this.translate.instant("lang.userModification"),t.firstname+" "+t.lastname),void 0!==this.user.external_id.maarchParapheur&&this.checkInfoMaarchParapheurAccount(),this.loading=!1,setTimeout(()=>{this.dataSource=new vt.p(this.data),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort},0)},t=>{this.notify.handleErrors(t)}))})}checkInfoMaarchParapheurAccount(){this.http.get("../rest/users/"+this.serialId+"/statusInMaarchParapheur").subscribe(t=>{this.maarchParapheurLink.login=t.link,this.loading=!1,""!==this.maarchParapheurLink.login?this.loadAvatarMaarchParapheur(this.user.external_id.maarchParapheur):this.maarchParapheurConnectionStatus=!1})}linkMaarchParapheurAccount(){this.dialog.open(iQ,{panelClass:"maarch-modal",autoFocus:!1,data:{user:this.user}}).afterClosed().subscribe(t=>{t&&(t.inMaarchParapheur?this.linkAccountToMaarchParahpeur(t.id):this.createAccountToMaarchParahpeur(t.id,t.login))})}linkAccountToMaarchParahpeur(t){this.http.put("../rest/users/"+this.serialId+"/linkToMaarchParapheur",{maarchParapheurUserId:t}).subscribe(()=>{this.user.canCreateMaarchParapheurUser=!1,this.user.external_id.maarchParapheur=t,this.checkInfoMaarchParapheurAccount(),this.notify.success(this.translate.instant("lang.accountLinked"))},t=>{this.notify.error(t.error.errors)})}createAccountToMaarchParahpeur(t,e){this.http.put("../rest/users/"+t+"/createInMaarchParapheur",{login:e}).subscribe(t=>{this.user.canCreateMaarchParapheurUser=!1,this.user.external_id.maarchParapheur=t.externalId,this.checkInfoMaarchParapheurAccount(),this.notify.success(this.translate.instant("lang.accountAdded"))},t=>{"Login already exists"===t.error.errors&&(t.error.errors=this.translate.instant("lang.loginAlreadyExistsInMaarchParapheur")),this.notify.error(t.error.errors)})}loadAvatarMaarchParapheur(t){this.http.get("../rest/maarchParapheur/user/"+t+"/picture").subscribe(t=>{this.maarchParapheurLink.picture=t.picture},t=>{this.notify.handleErrors(t)})}unlinkMaarchParapheurAccount(){confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.unlinkAccount"))&&this.http.put("../rest/users/"+this.serialId+"/unlinkToMaarchParapheur",{}).subscribe(()=>{this.user.canCreateMaarchParapheurUser=!0,this.maarchParapheurLink.login="",this.maarchParapheurLink.picture="",this.notify.success(this.translate.instant("lang.accountUnlinked")),this.maarchParapheurConnectionStatus=!0},t=>{this.notify.error(t.error.errors)})}toogleRedirect(t){$("#redirectUser_"+t.group_id+"_"+t.basket_id).toggle(),this.http.get("../rest/users").subscribe(t=>{},t=>{this.notify.handleErrors(t)})}initService(){0===this.maarchTree.rawData.length&&this.maarchTree.initData(this.user.allEntities.map(t=>Object.assign(Object.assign({},t),{parent_id:t.parent})))}processAfterUpload(t){this.zone.run(()=>this.resfreshUpload(t))}resfreshUpload(t){this.signatureModel.size<=2e6?(this.signatureModel.base64=t.replace(/^data:.*?;base64,/,""),this.signatureModel.base64ForJs=t):(this.signatureModel.name="",this.signatureModel.size=0,this.signatureModel.type="",this.signatureModel.base64="",this.signatureModel.base64ForJs="",this.notify.error("Taille maximum de fichier d\xe9pass\xe9e (2 MB)"))}clickOnUploader(t){$("#"+t).click()}uploadSignatureTrigger(t){if(t.target.files&&t.target.files[0]){const e=new FileReader;this.signatureModel.name=t.target.files[0].name,this.signatureModel.size=t.target.files[0].size,this.signatureModel.type=t.target.files[0].type,""===this.signatureModel.label&&(this.signatureModel.label=this.signatureModel.name),e.readAsDataURL(t.target.files[0]),e.onload=t=>{window.angularUserAdministrationComponent.componentAfterUpload(t.target.result),this.submitSignature()}}}displaySignatureEditionForm(t){this.selectedSignature=t,this.selectedSignatureLabel=this.user.signatures[t].signature_label}resendActivationNotification(){confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.sendActivationNotification"))&&this.http.put("../rest/users/"+this.serialId+"/accountActivationNotification",{}).subscribe(t=>{this.notify.success(this.translate.instant("lang.activationNotificationSend"))},t=>{this.notify.error(t.error.errors)})}toggleGroup(t){!0===$("#"+t.group_id+"-input").is(":checked")?this.http.post("../rest/users/"+this.serialId+"/groups",{groupId:t.group_id,role:t.role}).subscribe(t=>Object(r.a)(this,void 0,void 0,(function*(){this.user.groups=t.groups,this.user.baskets=t.baskets,this.headerService.user.id==this.serialId&&(yield this.headerService.resfreshCurrentUser(),this.privilegeService.resfreshUserShortcuts()),this.notify.success(this.translate.instant("lang.groupAdded"))})),t=>{this.notify.error(t.error.errors)}):this.http.delete("../rest/users/"+this.serialId+"/groups/"+t.group_id).subscribe(t=>Object(r.a)(this,void 0,void 0,(function*(){this.user.groups=t.groups,this.user.baskets=t.baskets,this.user.redirectedBaskets=t.redirectedBaskets,this.headerService.user.id==this.serialId&&(yield this.headerService.resfreshCurrentUser(),this.privilegeService.resfreshUserShortcuts()),this.notify.success(this.translate.instant("lang.groupDeleted"))})),t=>{this.notify.error(t.error.errors)})}updateGroup(t){this.http.put("../rest/users/"+this.serialId+"/groups/"+t.group_id,t).subscribe(t=>{this.notify.success(this.translate.instant("lang.groupUpdated"))},t=>{this.notify.error(t.error.errors)})}addEntity(t){t.forEach(t=>{this.http.post("../rest/users/"+this.serialId+"/entities",{entityId:t.entity_id,role:""}).subscribe(t=>{this.user.entities=t.entities,this.user.allEntities=t.allEntities,this.headerService.user.id==this.serialId&&this.headerService.resfreshCurrentUser(),this.notify.success(this.translate.instant("lang.entityAdded"))},t=>{this.notify.error(t.error.errors)})})}updateEntity(t){this.http.put("../rest/users/"+this.serialId+"/entities/"+t.entity_id,t).subscribe(()=>{this.notify.success(this.translate.instant("lang.entityUpdated"))},t=>{this.notify.error(t.error.errors)})}updatePrimaryEntity(t){this.http.put("../rest/users/"+this.serialId+"/entities/"+t.entity_id+"/primaryEntity",{}).subscribe(e=>{this.user.entities=e.entities,this.notify.success(this.translate.instant("lang.entityTooglePrimary")+" \xab "+t.entity_id+" \xbb")},t=>{this.notify.error(t.error.errors)})}deleteEntity(t){t.forEach(t=>{const e=t.entity_id;this.http.get("../rest/users/"+this.serialId+"/entities/"+e).subscribe(i=>{i.hasConfidentialityInstances||i.hasListTemplates?(this.config={panelClass:"maarch-modal",data:{hasConfidentialityInstances:i.hasConfidentialityInstances,hasListTemplates:i.hasListTemplates}},this.dialogRef=this.dialog.open(SN,this.config),this.dialogRef.afterClosed().subscribe(i=>{this.mode="delete",i?(this.mode=i.processMode,this.http.request("DELETE","../rest/users/"+this.serialId+"/entities/"+e,{body:{mode:this.mode,newUser:i.newUser}}).subscribe(t=>{this.user.entities=t.entities,this.user.allEntities=t.allEntities,this.headerService.user.id==this.serialId&&this.headerService.resfreshCurrentUser(),this.notify.success(this.translate.instant("lang.entityDeleted"))},t=>{this.notify.error(t.error.errors)})):(this.maarchTree.toggleNode(this.maarchTree.dataSource.data,{selected:!0,opened:!0},[t.id]),this.mode=""),this.dialogRef=null})):this.http.delete("../rest/users/"+this.serialId+"/entities/"+e).subscribe(t=>{this.user.entities=t.entities,this.user.allEntities=t.allEntities,this.headerService.user.id==this.serialId&&this.headerService.resfreshCurrentUser(),this.notify.success(this.translate.instant("lang.entityDeleted"))},t=>{this.notify.error(t.error.errors)})},t=>{this.notify.error(t.error.errors)})})}submitSignature(){this.http.post("../rest/users/"+this.serialId+"/signatures",this.signatureModel).subscribe(t=>{this.user.signatures=t.signatures,this.notify.success(this.translate.instant("lang.signAdded")),this.signatureModel={base64:"",base64ForJs:"",name:"",type:"",size:0,label:""}},t=>{this.notify.error(t.error.errors)})}updateSignature(t){this.http.put("../rest/users/"+this.serialId+"/signatures/"+this.user.signatures[t].id,{label:this.user.signatures[t].signature_label}).subscribe(e=>{this.user.signatures[t].signature_label=e.signature.signature_label,this.notify.success(this.translate.instant("lang.signUpdated"))},t=>{this.notify.error(t.error.errors)})}deleteSignature(t){confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.delete")+" \xab "+t.signature_label+" \xbb")&&this.http.delete("../rest/users/"+this.serialId+"/signatures/"+t.id).subscribe(t=>{this.user.signatures=t.signatures,this.notify.success(this.translate.instant("lang.signDeleted"))},t=>{this.notify.error(t.error.errors)})}test(t){if(t.mouseEvent.dataTransfer.files&&t.mouseEvent.dataTransfer.files[0]){const e=new FileReader;this.signatureModel.name=t.mouseEvent.dataTransfer.files[0].name,this.signatureModel.size=t.mouseEvent.dataTransfer.files[0].size,this.signatureModel.type=t.mouseEvent.dataTransfer.files[0].type,""===this.signatureModel.label&&(this.signatureModel.label=this.signatureModel.name),e.readAsDataURL(t.mouseEvent.dataTransfer.files[0]),e.onload=t=>{window.angularUserAdministrationComponent.componentAfterUpload(t.target.result),this.submitSignature()}}}addBasketRedirection(t){const e=[];this.selectionBaskets.selected.forEach(i=>{e.push({actual_user_id:t.serialId,basket_id:i.basket_id,group_id:i.groupSerialId,originalOwner:null})}),confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.redirectBasket"))&&this.http.post("../rest/users/"+this.serialId+"/redirectedBaskets",e).subscribe(t=>{this.user.baskets=t.baskets,this.user.redirectedBaskets=t.redirectedBaskets,this.selectionBaskets.clear(),this.notify.success(this.translate.instant("lang.basketUpdated"))},t=>{this.notify.error(t.error.errors)})}reassignBasketRedirection(t,e,i){confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.redirectBasket"))&&this.http.post("../rest/users/"+this.serialId+"/redirectedBaskets",[{actual_user_id:t.serialId,basket_id:e.basket_id,group_id:e.group_id,originalOwner:e.owner_user_id}]).subscribe(t=>{this.user.baskets=t.baskets,this.user.assignedBaskets.splice(i,1),this.notify.success(this.translate.instant("lang.basketUpdated"))},t=>{this.notify.error(t.error.errors)})}delBasketRedirection(t,e){confirm(this.translate.instant("lang.confirmAction"))&&this.http.delete("../rest/users/"+this.serialId+"/redirectedBaskets?redirectedBasketIds[]="+t.id).subscribe(t=>{this.user.baskets=t.baskets,this.user.redirectedBaskets.splice(e,1),this.notify.success(this.translate.instant("lang.basketUpdated"))},t=>{this.notify.error(t.error.errors)})}delBasketAssignRedirection(t,e){confirm(this.translate.instant("lang.confirmAction"))&&this.http.delete("../rest/users/"+this.serialId+"/redirectedBaskets?redirectedBasketIds[]="+t.id).subscribe(t=>{this.user.baskets=t.baskets,this.user.assignedBaskets.splice(e,1),this.notify.success(this.translate.instant("lang.basketUpdated"))},t=>{this.notify.error(t.error.errors)})}toggleBasket(t){const e=[];this.user.baskets.forEach(i=>{this.selectionBaskets.selected.forEach(n=>{i.basket_id===n.basket_id&&i.group_id===n.group_id&&i.allowed!==t&&(i.allowed=t,e.push({basketId:i.basket_id,groupSerialId:i.groupSerialId,allowed:t}))})}),e.length>0&&this.http.put("../rest/users/"+this.serialId+"/baskets",{baskets:e}).subscribe(t=>{this.selectionBaskets.clear(),this.notify.success(this.translate.instant("lang.basketsUpdated"))},t=>{this.notify.error(t.error.errors)})}activateAbsence(){this.http.put("../rest/users/"+this.serialId+"/status",{status:"ABS"}).subscribe(t=>{this.user.status=t.user.status,this.userAbsenceModel=[],this.notify.success(this.translate.instant("lang.absOn"))},t=>{this.notify.error(t.error.errors)})}desactivateAbsence(){this.http.put("../rest/users/"+this.serialId+"/status",{status:"OK"}).subscribe(t=>{this.user.status=t.user.status,this.notify.success(this.translate.instant("lang.absOff"))},t=>{this.notify.error(t.error.errors)})}getErrorMessage(){return this.firstFormGroup.controls.retypePasswordCtrl.setErrors(this.firstFormGroup.controls.newPasswordCtrl.value!==this.firstFormGroup.controls.retypePasswordCtrl.value?{mismatch:!0}:null),this.firstFormGroup.controls.newPasswordCtrl.hasError("required")?this.translate.instant("lang.requiredField")+" !":this.firstFormGroup.controls.newPasswordCtrl.hasError("minlength")&&this.passwordRules.minLength.enabled?this.passwordRules.minLength.value+" "+this.translate.instant("lang.passwordminLength")+" !":null!=this.firstFormGroup.controls.newPasswordCtrl.errors&&void 0!==this.firstFormGroup.controls.newPasswordCtrl.errors.complexityUpper&&this.passwordRules.complexityUpper.enabled?this.translate.instant("lang.passwordcomplexityUpper")+" !":null!=this.firstFormGroup.controls.newPasswordCtrl.errors&&void 0!==this.firstFormGroup.controls.newPasswordCtrl.errors.complexityNumber&&this.passwordRules.complexityNumber.enabled?this.translate.instant("lang.passwordcomplexityNumber")+" !":null!=this.firstFormGroup.controls.newPasswordCtrl.errors&&void 0!==this.firstFormGroup.controls.newPasswordCtrl.errors.complexitySpecial&&this.passwordRules.complexitySpecial.enabled?this.translate.instant("lang.passwordcomplexitySpecial")+" !":(this.firstFormGroup.controls.newPasswordCtrl.setErrors(null),this.validPassword=!0,"")}matchValidator(t){return t.controls.newPasswordCtrl.value!==t.controls.retypePasswordCtrl.value&&(t.controls.retypePasswordCtrl.setErrors({mismatch:!0}),{mismatch:!0})}regexValidator(t,e){return i=>i.value?t.test(i.value)?null:e:null}changePasswd(){this.http.get("../rest/passwordRules").subscribe(t=>{const e=[],i=[],n=[];e.push(X.I.required),t.rules.forEach(t=>{"minLength"===t.label?(this.passwordRules.minLength.enabled=t.enabled,this.passwordRules.minLength.value=t.value,t.enabled&&(e.push(X.I.minLength(this.passwordRules.minLength.value)),i.push(t.value+" "+this.translate.instant("lang.password"+t.label)))):"complexityUpper"===t.label?(this.passwordRules.complexityUpper.enabled=t.enabled,this.passwordRules.complexityUpper.value=t.value,t.enabled&&(e.push(this.regexValidator(new RegExp("[A-Z]"),{complexityUpper:""})),i.push(this.translate.instant("lang.password"+t.label)))):"complexityNumber"===t.label?(this.passwordRules.complexityNumber.enabled=t.enabled,this.passwordRules.complexityNumber.value=t.value,t.enabled&&(e.push(this.regexValidator(new RegExp("[0-9]"),{complexityNumber:""})),i.push(this.translate.instant("lang.password"+t.label)))):"complexitySpecial"===t.label?(this.passwordRules.complexitySpecial.enabled=t.enabled,this.passwordRules.complexitySpecial.value=t.value,t.enabled&&(e.push(this.regexValidator(new RegExp("[^A-Za-z0-9]"),{complexitySpecial:""})),i.push(this.translate.instant("lang.password"+t.label)))):"renewal"===t.label?(this.passwordRules.renewal.enabled=t.enabled,this.passwordRules.renewal.value=t.value,t.enabled&&n.push(this.translate.instant("lang.password"+t.label)+" <b>"+t.value+" "+this.translate.instant("lang.days")+"</b>. "+this.translate.instant("lang.password2"+t.label)+".")):"historyLastUse"===t.label&&(this.passwordRules.historyLastUse.enabled=t.enabled,this.passwordRules.historyLastUse.value=t.value,t.enabled&&n.push(this.translate.instant("lang.passwordhistoryLastUseDesc")+" <b>"+t.value+"</b> "+this.translate.instant("lang.passwordhistoryLastUseDesc2")+"."))}),this.ruleText=i.join(", "),this.otherRuleText=n.join("<br/>"),this.firstFormGroup.controls.newPasswordCtrl.setValidators(e)},t=>{this.notify.error(t.error.errors)}),this.firstFormGroup=this._formBuilder.group({newPasswordCtrl:[""],retypePasswordCtrl:["",X.I.compose([X.I.required])],currentPasswordCtrl:["",X.I.compose([X.I.required])]},{validator:this.matchValidator}),this.validPassword=!1,this.firstFormGroup.controls.currentPasswordCtrl.setErrors(null),this.firstFormGroup.controls.newPasswordCtrl.setErrors(null),this.firstFormGroup.controls.retypePasswordCtrl.setErrors(null),this.showPassword=!0,this.selectedTabIndex=0}updatePassword(){this.passwordModel.currentPassword=this.firstFormGroup.controls.currentPasswordCtrl.value,this.passwordModel.newPassword=this.firstFormGroup.controls.newPasswordCtrl.value,this.passwordModel.reNewPassword=this.firstFormGroup.controls.retypePasswordCtrl.value,this.http.put("../rest/users/"+this.serialId+"/password",this.passwordModel).subscribe(()=>{this.showPassword=!1,this.passwordModel={currentPassword:"",newPassword:"",reNewPassword:""},this.notify.success(this.translate.instant("lang.passwordUpdated"))},t=>{this.notify.error(t.error.errors)})}onSubmit(){if(this.creationMode){let t=!0;this.http.get("../rest/users/"+this.user.userId+"/status").subscribe(e=>{let i=!1;e.status&&"DEL"===e.status&&(t=confirm(this.translate.instant("lang.reactivateUserDeleted")),i=!0),t&&this.http.post("../rest/users",this.user).subscribe(t=>{this.notify.success(this.translate.instant(i?"lang.userUpdated":"lang.userAdded")),this.router.navigate(["/administration/users/"+t.id])},t=>{this.notify.handleSoftErrors(t)})},t=>{this.notify.error(t.error.errors)})}else{const t=Object.assign({},this.user);"rest"===this.user.mode&&(t.authorizedApi=""!==this.user.authorizedApi.split("\n")[0]?this.user.authorizedApi.split("\n"):[]),this.http.put("../rest/users/"+this.serialId,t).subscribe(t=>{this.headerService.user.id==this.serialId&&this.headerService.resfreshCurrentUser(),this.notify.success(this.translate.instant("lang.userUpdated"))},t=>{this.notify.handleSoftErrors(t)})}}setUserModeLogin(t){this.user.mode=t.checked?"rest":"standard"}sendToMaarchParapheur(){confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.createUserInMaarchParapheur"))&&this.http.put("../rest/users/"+this.serialId+"/maarchParapheur","").subscribe(t=>{this.notify.success(this.translate.instant("lang.userCreatedInMaarchParapheur")),this.user.external_id.maarchParapheur=t.externalId,this.user.canCreateMaarchParapheurUser=!1},t=>{this.notify.error(t.error.errors)})}setLowerUserId(){this.user.userId=this.user.userId.toLowerCase()}syncMP(){this.loadingSign=!0,this.http.put("../rest/users/"+this.user.id+"/externalSignatures",{}).subscribe(t=>{this.loadingSign=!1,this.notify.success(this.translate.instant("lang.signsSynchronized"))},t=>{this.loadingSign=!1,this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(n.C),n.Qb(D.a),n.Qb(q.b),n.Qb(y.a),n.Qb(X.h),n.Qb(w.a),n.Qb(Dt.a),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(lQ,!0),n.Kc(dQ,!0),n.Xc(hQ,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.maarchTree=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:27,vars:19,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["fixedTopGap","56","position","end",2,"overflow-x","hidden","max-width","500px",3,"mode","fixedInViewport","opened"],["snav2",""],["mat-subheader",""],[4,"ngFor","ngForOf"],[4,"ngIf"],["mat-list-item","",3,"click",4,"ngIf"],["mat-list-item","",3,"title","click",4,"ngIf"],["mat-list-item","",3,"click"],["color","warn","mat-list-icon","",1,"fa","fa-plane"],["mat-line",""],["color","accent","mat-list-icon","",1,"fa","fa-check"],["color","primary","mat-list-icon","",1,"fa","fa-paper-plane"],["color","primary","mat-list-icon","",1,"fa","fa-key"],["mat-list-item","",3,"title","click"],["color","primary","mat-list-icon","",1,"fa","fa-link"],["mat-line","","style","font-size:11px;color:red",4,"ngIf"],["mat-line","",2,"font-size","11px","color","red"],["color","primary","mat-list-icon","",1,"avatarAccount"],["mat-line","",1,"accountInfo"],["mat-icon-button","","color","warn",3,"title","click"],[1,"fas","fa-unlink"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[3,"selectedIndex","selectedIndexChange","selectedTabChange"],[3,"label"],["style","margin-bottom: 5%",4,"ngIf"],["class","text-warning","style","position: absolute;opacity: 0.25;font-size: 120px;transform: rotate(324deg);-webkit-transform: rotate(324deg);margin-left: 35%;margin-top: 90px;",4,"ngIf"],["class","form-horizontal",3,"ngSubmit",4,"ngIf"],[3,"label",4,"ngIf"],[3,"label","disabled",4,"ngIf"],[2,"margin-bottom","5%"],[3,"formGroup"],[1,"form-group"],[2,"padding","10px"],["matInput","","formControlName","currentPasswordCtrl","required","",3,"placeholder","type"],["matSuffix","",1,"fa","fa-2x",3,"ngClass","click"],[2,"text-align","center","color","rgba(0,0,0,0.54)","font-size","75%"],[1,"col-sm-6",2,"padding-left","0px","padding-right","0px"],["matInput","","formControlName","newPasswordCtrl","required","",3,"placeholder","type"],["inputPasswd",""],["matInput","","required","","formControlName","retypePasswordCtrl",3,"placeholder","type"],["inputPasswd2",""],["class","form-group",4,"ngIf"],[2,"text-align","center"],["mat-raised-button","","color","primary","type","button",3,"disabled","click"],["mat-raised-button","","color","default","type","button",3,"click"],["color","accent",1,"fa","fa-check"],["color","accent"],[1,"col-sm-12",2,"padding-left","0px","padding-right","0px"],["role","alert",1,"alert","alert-warning",2,"text-align","center",3,"innerHTML"],[1,"text-warning",2,"position","absolute","opacity","0.25","font-size","120px","transform","rotate(324deg)","-webkit-transform","rotate(324deg)","margin-left","35%","margin-top","90px"],[1,"form-horizontal",3,"ngSubmit"],["profileForm","ngForm"],[1,"col-sm-12"],[1,"pull-left"],[1,"avatar",2,"font-size","90px","text-align","center"],[1,"fa","fa-user",2,"font-size","90px","padding-top","5px"],[1,"input-group"],["matInput","","type","text","name","user_id","pattern","^[\\w.@-]*$","required","","maxlength","128",3,"title","ngModel","placeholder","ngModelChange","keyup",4,"ngIf"],["matInput","","type","text","disabled","",3,"title","value","placeholder",4,"ngIf"],[1,"col-sm-5",2,"font-weight","bold"],["matInput","","type","text","id","lastname","name","lastname","maxlength","255","required","",3,"title","placeholder","ngModel","ngModelChange"],["matInput","","type","text","id","firstname","name","firstname","maxlength","255","required","",3,"title","placeholder","ngModel","ngModelChange"],[1,"col-sm-2",2,"font-style","italic"],["matInput","","type","text","id","initials","name","initials","maxlength","32",3,"title","placeholder","ngModel","ngModelChange"],["matInput","","type","tel","id","phone","name","phone","maxlength","32","pattern","\\+?((|\\ |\\.|\\(|\\)|\\-)?(\\d)*)*\\d$",3,"title","placeholder","ngModel","disabled","ngModelChange"],["matInput","","type","email","id","mail","name","mail","maxlength","255","pattern","(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$)","required","",3,"title","placeholder","ngModel","ngModelChange"],[3,"expanded"],[2,"color","rgba(0,0,0,0.54)"],["id","accountType","name","accountType","required","",3,"ngModel","disabled","ngModelChange"],[1,"form-group",2,"margin-top","10px"],["mat-raised-button","","color","primary","type","submit",3,"disabled",4,"ngIf"],["matInput","","type","text","name","user_id","pattern","^[\\w.@-]*$","required","","maxlength","128",3,"title","ngModel","placeholder","ngModelChange","keyup"],["matInput","","type","text","disabled","",3,"title","value","placeholder"],[3,"value","disabled","title"],["matInput","","name","authorizedApi","placeholder","Ex : PUT/attachments/{id}",3,"ngModel","ngModelChange"],["target","_blank",3,"href"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],["disableRipple","true",4,"ngFor","ngForOf"],["disableRipple","true"],["color","primary",3,"id","checked","disabled","change"],[3,"selectionPropagation","openState","afterSelectNode","afterDeselectNode"],["maarchTree",""],[1,"col-sm-6",2,"overflow","hidden"],["mat-list-icon","","color","primary"],["color","primary",3,"checked","matTooltip","change"],["mat-line","","style","opacity: 0.5;font-style: italic;font-size: 80%;margin-top:10px;",4,"ngIf"],["mat-line","","style","margin-top:10px;",4,"ngIf"],["mat-line","",2,"opacity","0.5","font-style","italic","font-size","80%","margin-top","10px"],["mat-line","",2,"margin-top","10px"],["mat-icon-button","",3,"matMenuTriggerFor","matTooltip"],[1,"fa","fa-reply"],[1,"vertical-divider",3,"vertical"],["color","warn","mat-icon-button","",3,"matTooltip","click"],[1,"fa","fa-ban"],["color","accent","mat-icon-button","",3,"matTooltip","click"],[1,"fa","fa-check"],[2,"width","200px !important"],["menu","matMenu"],["appearance","outline",3,"labelPlaceholder","routeDatas","targetSearchKey","subInfoKey","disableItems","styles","triggerEvent"],["style","cursor: pointer;",4,"ngIf"],[2,"cursor","pointer"],["mat-list-icon","","color","primary",4,"ngIf"],["mat-line","","color","primary",2,"display","flex","align-items","center"],[2,"flex","2","overflow","hidden","text-overflow","ellipsis",3,"matTooltip","ngStyle","click"],[1,"label","label-primary",2,"font-weight","normal"],["color","primary",3,"checked","click","change"],["mat-list-icon","","color","primary",1,"fa","fa-paper-plane",2,"margin-top","-60px"],["mat-line","","color","primary"],["type","text","color","warn","matInput","","disabled","",3,"value"],["mat-button","","color","warn","matSuffix","","mat-icon-button","","aria-label","Clear",3,"matTooltip","click"],["color","warn",1,"fa","fa-times","text-danger"],["mat-list-icon","","color","primary",1,"fa","fa-reply",2,"margin-top","-60px"],["appearance","outline",3,"labelPlaceholder","routeDatas","targetSearchKey","subInfoKey","triggerEvent",4,"ngIf"],["color","primary",1,"fa","fa-edit"],["appearance","outline",3,"labelPlaceholder","routeDatas","targetSearchKey","subInfoKey","triggerEvent"],[3,"label","disabled"],["dnd-droppable","","class","dndFile",3,"matTooltip","dndFileHighlighted","click","dragover","dragleave","onDropSuccess",4,"ngIf"],[2,"display","flex","align-items","flex-start"],[2,"flex","1"],["class","col-md-3 col-sm-6 col-xm-12",4,"ngFor","ngForOf"],["mat-icon-button","","color","primary",3,"matTooltip","disabled","click",4,"ngIf"],[2,"display","none",3,"ngSubmit"],["signatureForm","ngForm"],[1,"col-md-11"],["type","text","id","signLabel","name","label","required","",1,"form-control",3,"ngModel","placeholder","ngModelChange"],[1,"form-inline","hide"],["type","file","name","files[]","id","uploadSignFile","accept","image/*",3,"change"],[1,"col-md-1",2,"margin-bottom","5px"],["type","submit",1,"form-control","btn","btn-sm","btn-success",3,"disabled"],[1,"fa","fa-plus"],[3,"ngClass"],[1,"upload-drop-zone",2,"cursor","pointer",3,"click"],[1,"fa","fa-upload","fa-2x"],["class","col-md-2",4,"ngIf"],["dnd-droppable","",1,"dndFile",3,"matTooltip","click","dragover","dragleave","onDropSuccess"],[1,"col-md-3","col-sm-6","col-xm-12"],[2,"margin-bottom","10px","overflow","hidden"],["floatLabel","never"],["matInput","","type","text","name","selectedSignatureLabel",3,"ngModel","placeholder","disabled","ngModelChange","change"],["mat-button","","matSuffix","","mat-icon-button","","color","warn",3,"matTooltip","disabled","click"],[1,"fa","fa-times"],["alt","Signature",2,"width","auto","height","60px",3,"src"],["mat-icon-button","","color","primary",3,"matTooltip","disabled","click"],[1,"fa","fa-sync-alt","fa-2x"],[1,"col-md-2"],["id","signaturePreview","alt","Invalid image",2,"width","100%",3,"src"],[1,"col-md-12"],[1,"row"],[1,"col-md-6","col-xs-6"],["matInput","",3,"placeholder","keyup"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSort","","matSortActive","event_date","matSortDirection","desc",3,"dataSource"],["table",""],["matColumnDef","event_date"],["mat-sort-header","","style","flex:1;",4,"matHeaderCellDef"],["style","flex:1;",4,"matCellDef"],["matColumnDef","record_id"],["style","flex:1;",4,"matHeaderCellDef"],["matColumnDef","info"],["mat-sort-header","","style","flex:2;",4,"matHeaderCellDef"],["style","flex:2;",4,"matCellDef"],["matColumnDef","remote_ip"],[4,"matHeaderRowDef"],[4,"matRowDef","matRowDefColumns"],[1,"col-md-3","pull-right",2,"padding-top","10px"],["matInput","","disabled","",3,"ngModel","matDatepicker","placeholder","ngModelChange"],["matSuffix","",3,"for"],["startView","month",3,"startAt"],["picker",""],["mat-sort-header","",2,"flex","1"],["mat-sort-header","",2,"flex","2"],[2,"flex","2"],["color","primary","mat-list-icon","",1,"fa","fa-users"],[2,"font-size","10px"],["matInput","","type","text","id","role","name","role",3,"title","placeholder","ngModel","ngModelChange","change"],[3,"matTooltip"],["color","primary","mat-list-icon","","class","fa fa-sitemap",4,"ngIf"],["color","primary","mat-list-icon","","class","fa fa-sitemap","style","position:relative;",4,"ngIf"],["mat-line","",3,"ngStyle","matTooltip"],["class","label label-primary","style","font-weight:normal",4,"ngIf"],["color","primary","mat-list-icon","",1,"fa","fa-sitemap"],["color","primary","mat-list-icon","",1,"fa","fa-sitemap",2,"position","relative"],["mat-icon-button","",2,"cursor","pointer","position","absolute","right","-20px","top","-20px","font-size","10px",3,"matTooltip","click"],[1,"fa","fa-arrow-up"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,yQ,3,2,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,xQ,2,0,"div",9),n.Oc(14,bN,12,12,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Wb(15,"mat-sidenav",11,12),n.Wb(17,"mat-list"),n.Wb(18,"h3",13),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Oc(21,fN,12,12,"mat-list-item",14),n.Rb(22,"mat-divider"),n.Wb(23,"h3",13),n.Qc(24),n.ic(25,"translate"),n.Vb(),n.Oc(26,yN,11,15,"mat-list-item",14),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",!e.appService.getViewMode()&&!e.creationMode),n.Db(4),n.Rc(n.jc(20,15,"lang.groups")),n.Db(2),n.oc("ngForOf",e.user.groups),n.Db(3),n.Rc(n.jc(25,17,"lang.entities")),n.Db(2),n.oc("ngForOf",e.user.entities))},directives:[I.e,I.f,Ot,We,P.t,I.d,R.a,R.g,P.s,T.a,R.h,R.d,S.a,R.c,W.l,k.b,V.c,K.a,Te.c,Te.a,X.K,X.v,X.m,Y.c,J.b,X.d,X.u,X.k,X.F,Y.j,P.q,Y.b,Y.f,X.w,X.p,X.x,X.B,gt.a,gt.c,gt.g,gt.h,Y.g,ee.a,W.p,te.a,cQ,j.a,A.b,ne.d,ne.e,ii,P.w,Ee.d,K.d,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,ae.h,ae.j,ae.f,vt.h,Fe.b,vt.a,vt.j,vt.m],pipes:[g.d,Wt.a,P.b,si,P.f],styles:[".avatar[_ngcontent-%COMP%]{text-decoration:none;background:#135f7f;color:#fff;width:100px;height:100px;border-radius:5px;display:block;overflow:hidden;margin:5px}.form-group[_ngcontent-%COMP%]{margin:0}.vertical-divider[_ngcontent-%COMP%]{height:80%}.avatarAccount[_ngcontent-%COMP%]{border:3px solid #f99830;height:45px!important;width:45px!important;background-size:cover;background-repeat:no-repeat;background-position:50%}.accountInfo[_ngcontent-%COMP%]{margin-left:20px!important;display:flex!important}.accountInfo[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1;align-items:center;display:flex}"]}),t})(),SN=(()=>{class t{constructor(t,e,i){this.http=t,this.data=e,this.dialogRef=i,this.redirectUser="",this.processMode=""}setRedirectUser(t){this.redirectUser=t}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(v.b),n.Qb(q.a),n.Qb(q.h))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:30,vars:23,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["redirectConfForm","ngForm"],["class","alert-message alert-message-info","role","alert",3,"innerHTML",4,"ngIf"],[1,"input-group"],["id","processMode","name","processMode","color","primary",2,"display","inline-flex","flex-direction","column",3,"ngModel","ngModelChange"],["value","","checked","true","color","primary"],["value","delete","color","primary"],["value","reaffect","color","primary"],["singleMode","","required","",3,"labelPlaceholder","labelList","routeDatas","targetSearchKey","subInfoKey","triggerEvent",4,"ngIf"],["role","alert",1,"alert-message","alert-message-info",2,"max-width","inherit"],[4,"ngIf"],[3,"innerHTML",4,"ngIf"],[1,"divider-modal"],["mat-raised-button","","color","primary","type","submit",3,"disabled","click"],["role","alert",1,"alert-message","alert-message-info",3,"innerHTML"],["singleMode","","required","",3,"labelPlaceholder","labelList","routeDatas","targetSearchKey","subInfoKey","triggerEvent"],[3,"innerHTML"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-dialog-content"),n.Wb(5,"form",null,2),n.Oc(7,xN,2,3,"div",3),n.Oc(8,CN,2,3,"div",3),n.Wb(9,"div",4),n.Wb(10,"mat-radio-group",5),n.dc("ngModelChange",(function(t){return e.processMode=t})),n.Wb(11,"mat-radio-button",6),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Wb(14,"mat-radio-button",7),n.Qc(15),n.ic(16,"translate"),n.Vb(),n.Wb(17,"mat-radio-button",8),n.Qc(18),n.ic(19,"translate"),n.Vb(),n.Vb(),n.Oc(20,ON,3,10,"plugin-autocomplete",9),n.Wb(21,"div",10),n.Oc(22,DN,4,3,"span",11),n.Oc(23,wN,2,3,"span",12),n.Oc(24,MN,4,3,"span",11),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Rb(25,"span",13),n.Wb(26,"mat-dialog-actions"),n.Wb(27,"button",14),n.dc("click",(function(){return e.dialogRef.close({newUser:e.redirectUser,processMode:e.processMode})})),n.Qc(28),n.ic(29,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,13,"lang.redirects")),n.Db(5),n.oc("ngIf",e.data.hasConfidentialityInstances),n.Db(1),n.oc("ngIf",e.data.hasListTemplates),n.Db(2),n.oc("ngModel",e.processMode),n.Db(2),n.Sc(" ",n.jc(13,15,"lang.doNothingRedirect")," "),n.Db(3),n.Sc(" ",n.jc(16,17,"lang.removeUserRedirect")," "),n.Db(3),n.Sc(" ",n.jc(19,19,"lang.reaffectUserRedirect")," "),n.Db(2),n.oc("ngIf","reaffect"==e.processMode),n.Db(2),n.oc("ngIf",""==e.processMode),n.Db(1),n.oc("ngIf","delete"==e.processMode),n.Db(1),n.oc("ngIf","reaffect"==e.processMode),n.Db(3),n.oc("disabled",!e.redirectUser&&"reaffect"==e.processMode),n.Db(1),n.Rc(n.jc(29,21,"lang.validate")))},directives:[q.i,q.f,X.K,X.v,X.w,P.t,hc.b,X.u,X.x,hc.a,q.c,k.b,ii],pipes:[g.d],styles:[".mat-dialog-content[_ngcontent-%COMP%]{max-height: 65vh;width:600px;}"]}),t})();const IN=["snav2"],PN=["adminMenuTemplate"];function VN(t,e){1&t&&(n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",11),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",12),n.Rb(5,"mat-icon",13),n.Wb(6,"p",14),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,2,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,4,"lang.add")," "))}function RN(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Vb())}function jN(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",37),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Rc(n.jc(2,3,"lang.id"))}}function AN(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",t.group_id," ")}}function WN(t,e){1&t&&(n.Wb(0,"mat-header-cell",38),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.description")," "))}function TN(t,e){if(1&t&&(n.Wb(0,"mat-cell",39),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.group_desc," ")}}function EN(t,e){1&t&&n.Rb(0,"mat-header-cell",40)}function FN(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",41),n.Wb(1,"button",42),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.preDelete(a)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",43),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.pc("matTooltip",n.jc(2,1,"lang.delete")))}function LN(t,e){1&t&&n.Rb(0,"mat-header-row")}function QN(t,e){1&t&&(n.Rb(0,"mat-row",44),n.ic(1,"translate")),2&t&&(n.qc("routerLink","/administration/groups/",e.$implicit.id,""),n.pc("matTooltip",n.jc(1,2,"lang.view")))}function NN(t,e){if(1&t&&(n.Wb(0,"mat-card",17),n.Wb(1,"div",18),n.Wb(2,"div",19),n.Wb(3,"mat-form-field"),n.Rb(4,"input",20),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Wb(6,"div",19),n.Rb(7,"mat-paginator",21,22),n.Vb(),n.Vb(),n.Wb(9,"mat-table",23,24),n.Ub(11,25),n.Oc(12,jN,3,5,"mat-header-cell",26),n.Oc(13,AN,2,3,"mat-cell",27),n.Tb(),n.Ub(14,28),n.Oc(15,WN,3,3,"mat-header-cell",29),n.Oc(16,TN,2,1,"mat-cell",30),n.Tb(),n.Ub(17,31),n.Oc(18,EN,1,0,"mat-header-cell",32),n.Oc(19,FN,4,3,"mat-cell",33),n.Tb(),n.Oc(20,LN,1,0,"mat-header-row",34),n.Oc(21,QN,2,4,"mat-row",35),n.Vb(),n.Wb(22,"div",36),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.pc("placeholder",n.jc(5,10,"lang.filterBy")),n.oc("formControl",t.adminService.getFilterField()),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.adminService.getDataSource()),n.Db(11),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns),n.Db(2),n.Tc(" ",t.groups.length," ",n.jc(24,12,"lang.groups"),"")}}function zN(t,e){if(1&t&&(n.Wb(0,"mat-list-item",11),n.Rb(1,"mat-icon",12),n.Rb(2,"h4",13),n.Wb(3,"p",13),n.Qc(4),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(4),n.Tc(" ",t.firstname," ",t.lastname,"")}}function BN(t,e){if(1&t&&(n.Wb(0,"mat-option",14),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.group_desc," ")}}let UN=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this.translate=t,this.http=e,this.notify=i,this.dialog=n,this.headerService=a,this.appService=s,this.functions=o,this.adminService=r,this.viewContainerRef=c,this.loading=!1,this.config={},this.groups=[],this.groupsForAssign=[],this.displayedColumns=["group_id","group_desc","actions"],this.filterColumns=["group_id","group_desc"]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.groups")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,this.http.get("../rest/groups").subscribe(t=>{this.groups=t.groups,this.loading=!1,setTimeout(()=>{this.adminService.setDataSource("admin_groups",this.groups,this.sort,this.paginator,this.filterColumns)},0)},t=>{this.notify.handleErrors(t)})}preDelete(t){0===t.users.length?confirm(this.translate.instant("lang.reallyWantToDeleteThisGroup"))&&this.deleteGroup(t):(this.groupsForAssign=[],this.groups.forEach(e=>{t.group_id!==e.group_id&&this.groupsForAssign.push(e)}),this.config={panelClass:"maarch-modal",data:{id:t.id,group_desc:t.group_desc,groupsForAssign:this.groupsForAssign,users:t.users}},this.dialogRef=this.dialog.open($N,this.config),this.dialogRef.afterClosed().subscribe(e=>{e&&("_NO_REPLACEMENT"===e?this.deleteGroup(t):this.http.put("../rest/groups/"+t.id+"/reassign/"+e,{}).subscribe(e=>{this.deleteGroup(t)},t=>{this.notify.error(t.error.errors)})),this.dialogRef=null}))}deleteGroup(t){this.http.delete("../rest/groups/"+t.id).subscribe(t=>{setTimeout(()=>{this.groups=t.groups,this.adminService.setDataSource("admin_groups",this.groups,this.sort,this.paginator,this.filterColumns)},0),this.notify.success(this.translate.instant("lang.groupDeleted"))},t=>{this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a),n.Qb(OL),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(IN,!0),n.Kc(PN,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:15,vars:8,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["mat-subheader",""],["mat-list-item","","routerLink","/administration/groups/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"row",2,"margin","0px"],[1,"col-md-6","col-xs-6"],["matInput","",3,"formControl","placeholder"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSortDisableClear","","matSort","",3,"dataSource"],["table",""],["matColumnDef","group_id"],["mat-sort-header","",3,"hide-for-mobile",4,"matHeaderCellDef"],[3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","group_desc"],["mat-sort-header","","style","flex:2;",4,"matHeaderCellDef"],["style","flex:2;",4,"matCellDef"],["matColumnDef","actions"],["style","flex:1;",4,"matHeaderCellDef"],["style","justify-content: flex-end;flex:1;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"routerLink","matTooltip",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["mat-sort-header",""],["mat-sort-header","",2,"flex","2"],[2,"flex","2"],[2,"flex","1"],[2,"justify-content","flex-end","flex","1"],["mat-icon-button","","color","warn",3,"matTooltip","click"],["aria-hidden","true",1,"fa","fa-trash-alt","fa-2x"],[2,"cursor","pointer",3,"routerLink","matTooltip"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,VN,9,6,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,RN,2,0,"div",9),n.Oc(14,NN,25,14,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,R.h,R.g,R.d,o.f,S.a,R.c,W.l,V.c,K.a,Y.c,J.b,X.d,X.u,X.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,vt.h,Fe.b,vt.a,k.b,A.b,vt.j,vt.m,o.d],pipes:[g.d],encapsulation:2}),t})(),$N=(()=>{class t{constructor(t,e,i){this.http=t,this.data=e,this.dialogRef=i}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(v.b),n.Qb(q.a),n.Qb(q.h))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:34,vars:30,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["changeGroupUsersForm","ngForm"],["role","alert",1,"alert-message","alert-message-info"],["style","height:25px;",4,"ngFor","ngForOf"],["id","groups_redirect","name","groups_redirect","required","",3,"title","placeholder","ngModel","ngModelChange"],["value","_NO_REPLACEMENT"],[3,"label"],[3,"value",4,"ngFor","ngForOf"],[1,"divider-modal"],["mat-raised-button","","color","primary","type","submit",3,"disabled","click"],[2,"height","25px"],["mat-list-icon","","color","primary",1,"fa","fa-user"],["mat-line",""],[3,"value"]],template:function(t,e){if(1&t&&(n.Wb(0,"div",0),n.Wb(1,"h2",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-dialog-content"),n.Wb(5,"form",null,2),n.Wb(7,"div",3),n.Qc(8," Le groupe "),n.Wb(9,"b"),n.Qc(10),n.Vb(),n.Qc(11),n.ic(12,"translate"),n.Wb(13,"b"),n.Qc(14),n.Vb(),n.Qc(15),n.ic(16,"translate"),n.Wb(17,"mat-list"),n.Oc(18,zN,5,2,"mat-list-item",4),n.Vb(),n.Vb(),n.Wb(19,"mat-form-field"),n.Wb(20,"mat-select",5),n.dc("ngModelChange",(function(t){return e.data.group_redirect=t})),n.ic(21,"translate"),n.ic(22,"translate"),n.Wb(23,"mat-option",6),n.Qc(24),n.ic(25,"translate"),n.Vb(),n.Wb(26,"mat-optgroup",7),n.ic(27,"translate"),n.Oc(28,BN,2,2,"mat-option",8),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Rb(29,"span",9),n.Wb(30,"mat-dialog-actions"),n.Wb(31,"button",10),n.dc("click",(function(){return e.dialogRef.close(e.data.group_redirect)})),n.Qc(32),n.ic(33,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.zc(6);n.Db(2),n.Rc(n.jc(3,14,"lang.groupRedirect")),n.Db(8),n.Rc(e.data.group_desc),n.Db(1),n.Sc(" ",n.jc(12,16,"lang.isAssociatedTo")," "),n.Db(3),n.Rc(e.data.users.length),n.Db(1),n.Sc(" ",n.jc(16,18,"lang.usersAlt"),": "),n.Db(3),n.oc("ngForOf",e.data.users),n.Db(2),n.pc("title",n.jc(21,20,"lang.chooseRedirectGroup")),n.pc("placeholder",n.jc(22,22,"lang.chooseRedirectGroup")),n.oc("ngModel",e.data.group_redirect),n.Db(4),n.Sc("-- ",n.jc(25,24,"lang.noReplacement")," --"),n.Db(2),n.pc("label",n.jc(27,26,"lang.groups")),n.Db(2),n.oc("ngForOf",e.data.groupsForAssign),n.Db(3),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(33,28,"lang.validate"))}},directives:[q.i,q.f,X.K,X.v,X.w,R.a,P.s,Y.c,ee.a,X.F,X.u,X.x,W.p,W.o,q.c,k.b,R.d,S.a,R.c,W.l],pipes:[g.d],encapsulation:2}),t})();function HN(t,e){1&t&&(n.Wb(0,"div",19),n.Rb(1,"mat-spinner",20),n.Vb())}function GN(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",21),n.Qc(1),n.ic(2,"translate"),n.Wb(3,"button",22),n.dc("click",(function(){n.Dc(t);const e=n.hc();return e.toggleIndex(!e.indexingInfo.canIndex)})),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.Sc("",n.jc(2,2,"lang.warnIndex")," "),n.Db(3),n.Rc(n.jc(5,4,"lang.enableIndex")))}function XN(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",23),n.dc("click",(function(){n.Dc(t);const e=n.hc();return e.toggleIndex(!e.indexingInfo.canIndex)})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.disableIndex")))}function qN(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item",24),n.Wb(1,"div"),n.Rb(2,"i",25),n.Vb(),n.Wb(3,"div",26),n.Qc(4),n.Vb(),n.Wb(5,"div"),n.Wb(6,"button",27),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc().removeAction(i)})),n.Rb(7,"mat-icon",28),n.Vb(),n.Vb(),n.Rb(8,"mat-divider"),n.Vb()}if(2&t){const t=e.$implicit;n.oc("cdkDragData",t),n.Db(4),n.Sc(" ",t.label_action,"")}}let KN=(()=>{class t{constructor(t,e,i,a){this.translate=t,this.http=e,this.notify=i,this.dialog=a,this.loading=!0,this.resfreshShortcut=new n.o,this.keywordEntities=[],this.actionList=[],this.indexingInfo={canIndex:!1,actions:[],keywords:[],entities:[]},this.keywordEntities=[{id:"ALL_ENTITIES",keyword:"ALL_ENTITIES",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:this.translate.instant("lang.allEntities")},{id:"ENTITIES_JUST_BELOW",keyword:"ENTITIES_JUST_BELOW",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:this.translate.instant("lang.immediatelyBelowMyPrimaryEntity")},{id:"ENTITIES_BELOW",keyword:"ENTITIES_BELOW",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:this.translate.instant("lang.belowAllMyEntities")},{id:"ALL_ENTITIES_BELOW",keyword:"ALL_ENTITIES_BELOW",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:this.translate.instant("lang.belowMyPrimaryEntity")},{id:"MY_ENTITIES",keyword:"MY_ENTITIES",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:this.translate.instant("lang.myEntities")},{id:"MY_PRIMARY_ENTITY",keyword:"MY_PRIMARY_ENTITY",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:this.translate.instant("lang.myPrimaryEntity")},{id:"SAME_LEVEL_ENTITIES",keyword:"SAME_LEVEL_ENTITIES",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:this.translate.instant("lang.sameLevelMyPrimaryEntity")},{id:"ENTITIES_JUST_UP",keyword:"ENTITIES_JUST_UP",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:this.translate.instant("lang.immediatelySuperiorMyPrimaryEntity")}]}ngOnInit(){this.getIndexingInformations().pipe(Object(mt.a)(t=>this.indexingInfo.canIndex=t.group.canIndex),Object(mt.a)(t=>this.getActions(t.actions)),Object(mt.a)(t=>this.getSelectedActions(t.group.indexationParameters.actions)),Object(l.a)(t=>this.getEntities(t)),Object(l.a)(t=>this.getSelectedEntities(t)),Object(mt.a)(t=>this.initEntitiesTree(t)),Object(Xt.a)(()=>this.loading=!1)).subscribe()}initEntitiesTree(t){$("#jstree").jstree({checkbox:{three_state:!1},core:{force_text:!0,themes:{name:"proton",responsive:!0},data:t},plugins:["checkbox","search"]});let e=!1;$("#jstree_search").keyup((function(){e&&clearTimeout(e),e=setTimeout((function(){const t=$("#jstree_search").val();$("#jstree").jstree(!0).search(t)}),250)})),$("#jstree").on("select_node.jstree",(t,e)=>{isNaN(e.node.id)?this.addKeyword(e.node.id):this.addEntity(e.node.id)}).on("deselect_node.jstree",(t,e)=>{isNaN(e.node.id)?this.removeKeyword(e.node.id):this.removeEntity(e.node.id)}).jstree()}getEntities(t){return this.keywordEntities.forEach(e=>{e.state=t.group.indexationParameters.keywords.indexOf(e.id)>-1?{opened:!0,selected:!0}:{opened:!0,selected:!1}}),t.entities=this.keywordEntities.concat(t.entities),t}getSelectedEntities(t){return this.indexingInfo.entities=[...t.group.indexationParameters.entities],this.indexingInfo.keywords=[...t.group.indexationParameters.keywords],t.entities}getActions(t){this.actionList=t}getIndexingInformations(){return this.http.get("../rest/groups/"+this.groupId+"/indexing")}getSelectedActions(t){let e=-1;t.forEach(t=>{e=this.actionList.findIndex(e=>e.id==t),e>-1&&(this.indexingInfo.actions.push(this.actionList[e]),this.actionList.splice(e,1))})}addEntity(t){const e=this.indexingInfo.entities.concat([t]);this.http.put("../rest/groups/"+this.groupId+"/indexing",{entities:e}).pipe(Object(mt.a)(()=>{this.indexingInfo.entities.push(t)}),Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.entityAdded"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}removeEntity(t){const e=this.indexingInfo.entities.indexOf(t),i=[...this.indexingInfo.entities];i.splice(e,1),this.http.put("../rest/groups/"+this.groupId+"/indexing",{entities:i}).pipe(Object(mt.a)(()=>{this.indexingInfo.entities.splice(e,1)}),Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.entityDeleted"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}addKeyword(t){const e=this.indexingInfo.keywords.concat([t]);this.http.put("../rest/groups/"+this.groupId+"/indexing",{keywords:e}).pipe(Object(mt.a)(()=>{this.indexingInfo.keywords.push(t)}),Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.keywordAdded"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}removeKeyword(t){const e=this.indexingInfo.keywords.indexOf(t),i=[...this.indexingInfo.keywords];i.splice(e,1),this.http.put("../rest/groups/"+this.groupId+"/indexing",{keywords:i}).pipe(Object(mt.a)(()=>{this.indexingInfo.keywords.splice(e,1)}),Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.keywordDeleted"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}addAction(t){const e=this.indexingInfo.actions.map(t=>t.id).concat([t].map(t=>t.id));this.http.put("../rest/groups/"+this.groupId+"/indexing",{actions:e}).pipe(Object(mt.a)(()=>{const e=this.actionList.findIndex(e=>e.id===t.id),i=Object.assign({},this.actionList[e]);this.indexingInfo.actions.push(i),this.actionList.splice(e,1)}),Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.actionAdded"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}removeAction(t){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.confirmAction")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(l.a)(()=>{this.dialogRef=null;const e=[...this.indexingInfo.actions];return e.splice(t,1),e.map(t=>t.id)}),p(t=>this.http.put("../rest/groups/"+this.groupId+"/indexing",{actions:t})),Object(mt.a)(()=>{this.actionList.push(this.indexingInfo.actions[t]),this.indexingInfo.actions.splice(t,1)}),Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.actionDeleted"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}toggleIndex(t){this.http.put("../rest/groups/"+this.groupId+"/indexing",{canIndex:t}).pipe(Object(mt.a)(()=>{this.indexingInfo.canIndex=t,this.resfreshShortcut.emit()}),Object(mt.a)(()=>{this.notify.success(this.translate.instant(this.indexingInfo.canIndex?"lang.indexEnabled":"lang.indexDisabled"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}drop(t){if(t.previousContainer===t.container){Object(lo.h)(t.container.data,t.previousIndex,t.currentIndex);const e=this.indexingInfo.actions.map(t=>t.id);this.http.put("../rest/groups/"+this.groupId+"/indexing",{actions:e}).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.actionAdded"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-indexing-administration"]],inputs:{groupId:"groupId"},outputs:{resfreshShortcut:"resfreshShortcut"},decls:27,vars:22,consts:[["class","loading",4,"ngIf"],[1,"row",2,"margin","0px"],[1,"col-md-12"],["class","alert-message alert-message-danger","role","alert","style","margin-top: 30px;",4,"ngIf"],["color","warn","mat-raised-button","",3,"click",4,"ngIf"],[1,"col-md-8",2,"margin-top","20px"],[1,"formType"],[1,"formType-title"],[1,"infoActions",3,"innerHTML"],["appearance","outline",3,"labelPlaceholder","datas","targetSearchKey","triggerEvent"],["cdkDropList","","role","list",1,"selectedActionList",3,"cdkDropListData","cdkDropListDropped"],["class","selectedAction","role","listitem","cdkDrag","","cdkDragLockAxis","y",3,"cdkDragData",4,"ngFor","ngForOf"],[1,"col-md-4",2,"margin-top","20px"],[1,"formType","jstreeEntities"],["appearance","outline"],["color","primary","matPrefix","",1,"fa","fa-search"],["matInput","","id","jstree_search","name","jstree_search","type","text",3,"placeholder"],["id","jstree"],["jstree",""],[1,"loading"],[2,"margin","auto"],["role","alert",1,"alert-message","alert-message-danger",2,"margin-top","30px"],["mat-raised-button","",3,"click"],["color","warn","mat-raised-button","",3,"click"],["role","listitem","cdkDrag","","cdkDragLockAxis","y",1,"selectedAction",3,"cdkDragData"],["color","primary","cdkDragHandle","",1,"fas","fa-bars","fa-2x",2,"cursor","move"],[1,"actionLabel"],["mat-icon-button","","color","warn",3,"click"],[1,"fa","fa-trash"]],template:function(t,e){1&t&&(n.Oc(0,HN,2,0,"div",0),n.Wb(1,"div",1),n.Wb(2,"div",2),n.Oc(3,GN,6,6,"div",3),n.Oc(4,XN,3,3,"button",4),n.Vb(),n.Wb(5,"div",5),n.Wb(6,"div",6),n.Wb(7,"div",7),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Rb(10,"mat-hint",8),n.ic(11,"translate"),n.Wb(12,"plugin-autocomplete",9),n.dc("triggerEvent",(function(t){return e.addAction(t)})),n.ic(13,"translate"),n.Vb(),n.Wb(14,"mat-list",10),n.dc("cdkDropListDropped",(function(t){return e.drop(t)})),n.Oc(15,qN,9,2,"mat-list-item",11),n.Vb(),n.Vb(),n.Vb(),n.Wb(16,"div",12),n.Wb(17,"div",13),n.Wb(18,"div",7),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"mat-form-field",14),n.Rb(22,"mat-icon",15),n.Rb(23,"input",16),n.ic(24,"translate"),n.Vb(),n.Rb(25,"div",17,18),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.oc("ngIf",e.loading),n.Db(3),n.oc("ngIf",!e.indexingInfo.canIndex),n.Db(1),n.oc("ngIf",e.indexingInfo.canIndex),n.Db(4),n.Sc(" ",n.jc(9,12,"lang.availableIndexingActions")," "),n.Db(2),n.oc("innerHTML",n.jc(11,14,"lang.actionsInfo"),n.Ec),n.Db(2),n.oc("labelPlaceholder",n.jc(13,16,"lang.linkNewAction"))("datas",e.actionList)("targetSearchKey","label_action"),n.Db(2),n.oc("cdkDropListData",e.indexingInfo.actions),n.Db(1),n.oc("ngForOf",e.indexingInfo.actions),n.Db(4),n.Sc(" ",n.jc(20,18,"lang.authorizedEntities")," "),n.Db(4),n.pc("placeholder",n.jc(24,20,"lang.searchEntities")))},directives:[P.t,Y.f,ii,R.a,lo.e,P.s,Y.c,S.a,Y.i,J.b,V.c,k.b,R.d,lo.a,lo.b,T.a],pipes:[g.d],styles:[".loading[_ngcontent-%COMP%]{display:flex;height:100%;position:absolute;background:#fff;z-index:2}.loading[_ngcontent-%COMP%], .selectedActionList[_ngcontent-%COMP%]{width:100%}.infoActions[_ngcontent-%COMP%]{font-size:80%}.selectedAction[_ngcontent-%COMP%]{height:70px}.selectedAction[_ngcontent-%COMP%] .actionLabel[_ngcontent-%COMP%]{padding-left:10px;flex:1}.formType[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:10px;border-radius:4px;border:1px solid #ccc;position:relative;padding:10px}.formType-title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;background:#fff;position:absolute;top:-18px;left:10px;padding:0;margin:0;color:#135f7f}.alert-message[_ngcontent-%COMP%]{max-width:100%}a[_ngcontent-%COMP%]{cursor:pointer}.jstreeEntities[_ngcontent-%COMP%] .mat-form-field-appearance-outline[_ngcontent-%COMP%]{font-size:11px}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.cdk-drag-preview[_ngcontent-%COMP%] .mat-icon-button[_ngcontent-%COMP%], .cdk-drag-preview[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{visibility:hidden}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.selectedAction[_ngcontent-%COMP%]:last-child{border:none}.selectedAction.cdk-drop-list-dragging[_ngcontent-%COMP%] .selectedAction[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}"]}),t})();const YN=["snav2"],JN=["paginatorBaskets"],ZN=["sortBaskets"],tz=["sortUsers"];function ez(t,e){1&t&&(n.Wb(0,"div",13),n.Rb(1,"mat-spinner",14),n.Vb())}function iz(t,e){if(1&t){const t=n.Xb();n.Wb(0,"input",28),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).group.group_id=e})),n.ic(1,"translate"),n.Vb()}if(2&t){const t=n.hc(2);n.pc("placeholder",n.jc(1,2,"lang.id")),n.oc("ngModel",t.group.group_id)}}function nz(t,e){if(1&t){const t=n.Xb();n.Wb(0,"input",29),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).group.group_id=e})),n.ic(1,"translate"),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(2);n.pc("placeholder",n.jc(1,3,"lang.id")),n.pc("title",n.jc(2,5,"lang.id")),n.oc("ngModel",t.group.group_id)}}function az(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item"),n.Wb(1,"mat-slide-toggle",37),n.dc("change",(function(i){n.Dc(t);const a=e.$implicit;return n.hc(4).toggleService(i,a)})),n.ic(2,"translate"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(4);n.Db(1),n.pc("name",t.label),n.pc("matTooltip",n.jc(2,5,t.comment)),n.oc("checked",i.group.privileges.indexOf(t.id)>-1)("disabled","create_custom"==t.id&&i.group.lockAdvancedPrivileges),n.Db(2),n.Sc(" ",n.jc(4,7,t.label),"")}}function sz(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",41),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc(4);return e.stopPropagation(),a.openUserParams(i.id)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",42),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc(4);n.Ib("active",e.panelMode===t.id),n.oc("title",n.jc(1,4,"lang.goToAdminParams"))("disabled",-1===e.group.privileges.indexOf(t.id))}}function oz(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",38),n.Wb(1,"mat-slide-toggle",39),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.checked=i}))("change",(function(i){n.Dc(t);const a=e.$implicit;return n.hc(4).toggleService(i,a)})),n.ic(2,"translate"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Oc(5,sz,3,6,"button",40),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(4);n.Db(1),n.pc("name",t.label),n.pc("matTooltip",n.jc(2,7,t.comment)),n.oc("ngModel",t.checked)("checked",t.checked)("disabled","admin_update_control"==t.id&&i.group.lockAdvancedPrivileges||"admin_password_rules"==t.id&&"standard"!==i.authService.authMode),n.Db(2),n.Sc(" ",n.jc(4,9,t.label)," "),n.Db(2),n.oc("ngIf",t.hasParams)}}function rz(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item"),n.Wb(1,"mat-slide-toggle",44),n.dc("change",(function(i){n.Dc(t);const a=e.$implicit;return n.hc(6).toggleService(i,a)})),n.ic(2,"translate"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(6);n.Db(1),n.pc("name",t.label),n.pc("matTooltip",n.jc(2,4,t.comment)),n.oc("checked",i.group.privileges.indexOf(t.id)>-1),n.Db(2),n.Sc(" ",n.jc(4,6,t.label)," ")}}function cz(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-list"),n.Oc(2,rz,5,8,"mat-list-item",30),n.ic(3,"filterList"),n.ic(4,"sortBy"),n.Vb(),n.Tb()),2&t){const t=n.hc().$implicit;n.hc();const e=n.zc(19);n.Db(2),n.oc("ngForOf",n.lc(3,1,n.kc(4,5,t.services,"label"),e.value,"label"))}}function lz(t,e){if(1&t&&(n.Wb(0,"mat-option",52),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc("",n.jc(2,2,t.label)," ")}}function dz(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item",46),n.Rb(1,"span",47),n.Wb(2,"mat-form-field",48),n.Wb(3,"mat-select",49),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.current=i}))("selectionChange",(function(i){n.Dc(t);const a=e.$implicit;return n.hc(6).changeDifflistPrivilege(i,a.id)})),n.Wb(4,"mat-option",50),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Oc(7,lz,3,4,"mat-option",51),n.Vb(),n.Vb(),n.Qc(8,". "),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.oc("innerHTML",t.label,n.Ec),n.Db(2),n.oc("ngModel",t.current),n.Db(2),n.Rc(n.jc(6,4,"lang.noRole")),n.Db(2),n.oc("ngForOf",t.services)}}function hz(t,e){if(1&t&&(n.Ub(0),n.Oc(1,dz,9,6,"mat-list-item",45),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngForOf",t.services)}}function uz(t,e){if(1&t&&(n.Wb(0,"mat-option",52),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc("",n.jc(2,2,t.label)," ")}}function pz(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item",46),n.Rb(1,"span",47),n.Wb(2,"mat-form-field",53),n.Wb(3,"mat-select",49),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.current=i}))("selectionChange",(function(e){return n.Dc(t),n.hc(6).changePersonalDataPrivilege(e)})),n.Wb(4,"mat-option",50),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Oc(7,uz,3,4,"mat-option",51),n.Vb(),n.Vb(),n.Qc(8,". "),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.oc("innerHTML",t.label,n.Ec),n.Db(2),n.oc("ngModel",t.current),n.Db(2),n.Sc("",n.jc(6,4,"lang.notVisible")," "),n.Db(2),n.oc("ngForOf",t.services)}}function bz(t,e){if(1&t&&(n.Ub(0),n.Oc(1,pz,9,6,"mat-list-item",45),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngForOf",t.services)}}const fz=function(){return["diffusionList","confidentialityAndSecurity"]};function mz(t,e){if(1&t&&(n.Wb(0,"mat-expansion-panel",43),n.ic(1,"filterList"),n.Wb(2,"mat-expansion-panel-header"),n.Wb(3,"mat-panel-title"),n.Qc(4),n.Vb(),n.Vb(),n.Oc(5,cz,5,8,"ng-container",12),n.Oc(6,hz,2,1,"ng-container",12),n.Oc(7,bz,2,1,"ng-container",12),n.Vb()),2&t){const t=e.$implicit;n.hc();const i=n.zc(19);n.Ib("emptyExpansionPanel",0==n.lc(1,6,t.services,i.value,"label").length),n.Db(4),n.Sc(" ",t.label," "),n.Db(1),n.oc("ngIf",-1===n.uc(10,fz).indexOf(t.id)),n.Db(1),n.oc("ngIf","diffusionList"===t.id),n.Db(1),n.oc("ngIf","confidentialityAndSecurity"===t.id)}}function gz(t,e){if(1&t&&(n.Wb(0,"mat-tab-group"),n.Wb(1,"mat-tab",16),n.ic(2,"translate"),n.Wb(3,"mat-list"),n.Oc(4,az,5,9,"mat-list-item",30),n.ic(5,"sortBy"),n.Vb(),n.Vb(),n.Wb(6,"mat-tab",16),n.ic(7,"translate"),n.Wb(8,"mat-form-field",31),n.Rb(9,"input",32,33),n.ic(11,"translate"),n.Vb(),n.Oc(12,oz,6,11,"div",34),n.ic(13,"filterList"),n.ic(14,"sortBy"),n.Vb(),n.Wb(15,"mat-tab",16),n.ic(16,"translate"),n.Wb(17,"mat-form-field",31),n.Rb(18,"input",32,35),n.ic(20,"translate"),n.Vb(),n.Oc(21,mz,8,11,"mat-expansion-panel",36),n.ic(22,"sortBy"),n.Vb(),n.Vb()),2&t){const t=n.zc(10),e=n.hc(3);n.Db(1),n.pc("label",n.jc(2,8,"lang.menus")),n.Db(3),n.oc("ngForOf",n.kc(5,10,e.privilegeService.getMenus(),"label")),n.Db(2),n.pc("label",n.jc(7,13,"lang.administrationServices")),n.Db(3),n.pc("placeholder",n.jc(11,15,"lang.filterBy")),n.Db(3),n.oc("ngForOf",n.lc(13,17,n.kc(14,21,e.administrationPrivileges,"label"),t.value,"label")),n.Db(3),n.pc("label",n.jc(16,24,"lang.functionnalities")),n.Db(3),n.pc("placeholder",n.jc(20,26,"lang.filterBy")),n.Db(3),n.oc("ngForOf",n.kc(22,28,e.unitPrivileges,"label"))}}function vz(t,e){if(1&t&&(n.Wb(0,"mat-tab",16),n.ic(1,"translate"),n.Oc(2,gz,23,31,"mat-tab-group",12),n.Vb()),2&t){const t=n.hc(2);n.pc("label",n.jc(1,2,"lang.privileges")),n.Db(2),n.oc("ngIf",!t.creationMode)}}function _z(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-indexing-administration",55),n.dc("resfreshShortcut",(function(){return n.Dc(t),n.hc(3).resfreshShortcut()})),n.Vb()}if(2&t){const t=n.hc(3);n.oc("groupId",t.group.id)}}function yz(t,e){1&t&&(n.Wb(0,"mat-tab",16),n.ic(1,"translate"),n.Oc(2,_z,1,1,"ng-template",54),n.Vb()),2&t&&n.pc("label",n.jc(1,1,"lang.indexation"))}const xz=function(){return["/rest/autocomplete/users/administration"]};function Cz(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",70),n.Wb(1,"plugin-autocomplete",71),n.dc("triggerEvent",(function(e){return n.Dc(t),n.hc(3).linkUser(e)})),n.ic(2,"translate"),n.ic(3,"translate"),n.Vb(),n.Rb(4,"hr"),n.Vb()}2&t&&(n.Db(1),n.oc("labelPlaceholder",n.jc(2,4,"lang.linkUser"))("labelList",n.jc(3,6,"lang.availableUsers"))("routeDatas",n.uc(8,xz))("targetSearchKey","idToDisplay"))}function Oz(t,e){1&t&&(n.Wb(0,"mat-header-cell",72),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.firstname")," "))}function Dz(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.firstname," ")}}function wz(t,e){1&t&&(n.Wb(0,"mat-header-cell",72),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.lastname")," "))}function Mz(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.lastname," ")}}function kz(t,e){1&t&&n.Rb(0,"mat-header-row")}const Sz=function(t,e){return{cursor:t,opacity:e}};function Iz(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-row",73),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).goToUserAdmin(i)})),n.ic(1,"translate"),n.Vb()}if(2&t){const t=e.$implicit;n.pc("matTooltip",n.jc(1,3,"lang.view")),n.oc("matTooltipDisabled",!t.allowed)("ngStyle",n.wc(5,Sz,t.allowed?"pointer":"",t.allowed?"1":"0.6"))}}function Pz(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab",16),n.ic(1,"translate"),n.Wb(2,"div",56),n.Oc(3,Cz,5,9,"div",57),n.Wb(4,"div",58),n.Wb(5,"mat-form-field"),n.Wb(6,"input",59),n.dc("keyup",(function(e){return n.Dc(t),n.hc(2).applyFilter(e.target.value)})),n.ic(7,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(8,"div",58),n.Rb(9,"mat-paginator",60,61),n.Vb(),n.Vb(),n.Wb(11,"mat-table",62,63),n.Ub(13,64),n.Oc(14,Oz,3,3,"mat-header-cell",65),n.Oc(15,Dz,2,1,"mat-cell",66),n.Tb(),n.Ub(16,67),n.Oc(17,wz,3,3,"mat-header-cell",65),n.Oc(18,Mz,2,1,"mat-cell",66),n.Tb(),n.Oc(19,kz,1,0,"mat-header-row",68),n.Oc(20,Iz,2,8,"mat-row",69),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.pc("label",n.jc(1,9,"lang.relatedUsers")),n.Db(3),n.oc("ngIf",t.group.canAdminUsers),n.Db(3),n.pc("placeholder",n.jc(7,11,"lang.filterBy")),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.usersDataSource),n.Db(8),n.oc("matHeaderRowDef",t.usersDisplayedColumns),n.Db(1),n.oc("matRowDefColumns",t.usersDisplayedColumns)}}function Vz(t,e){1&t&&(n.Wb(0,"mat-header-cell",72),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.label")," "))}function Rz(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.basket_name," ")}}function jz(t,e){1&t&&(n.Wb(0,"mat-header-cell",72),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.description")," "))}function Az(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.basket_desc," ")}}function Wz(t,e){1&t&&n.Rb(0,"mat-header-row")}function Tz(t,e){1&t&&(n.Rb(0,"mat-row",80),n.ic(1,"translate")),2&t&&(n.qc("routerLink","/administration/baskets/",e.$implicit.basket_id,""),n.pc("matTooltip",n.jc(1,2,"lang.view")))}function Ez(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab",16),n.ic(1,"translate"),n.Wb(2,"div",56),n.Wb(3,"div",58),n.Wb(4,"mat-form-field"),n.Wb(5,"input",59),n.dc("keyup",(function(e){return n.Dc(t),n.hc(2).applyBasketsFilter(e.target.value)})),n.ic(6,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(7,"div",58),n.Rb(8,"mat-paginator",60,74),n.Vb(),n.Vb(),n.Wb(10,"mat-table",75,76),n.Ub(12,77),n.Oc(13,Vz,3,3,"mat-header-cell",65),n.Oc(14,Rz,2,1,"mat-cell",66),n.Tb(),n.Ub(15,78),n.Oc(16,jz,3,3,"mat-header-cell",65),n.Oc(17,Az,2,1,"mat-cell",66),n.Tb(),n.Oc(18,Wz,1,0,"mat-header-row",68),n.Oc(19,Tz,2,4,"mat-row",79),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.pc("label",n.jc(1,8,"lang.relatedBaskets")),n.Db(5),n.pc("placeholder",n.jc(6,10,"lang.filterBy")),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.basketsDataSource),n.Db(8),n.oc("matHeaderRowDef",t.basketsDisplayedColumns),n.Db(1),n.oc("matRowDefColumns",t.basketsDisplayedColumns)}}function Fz(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",15),n.Wb(1,"mat-tab-group"),n.Wb(2,"mat-tab",16),n.ic(3,"translate"),n.Wb(4,"form",17,18),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Wb(6,"mat-form-field"),n.Oc(7,iz,2,4,"input",19),n.Oc(8,nz,3,7,"input",20),n.Vb(),n.Wb(9,"mat-form-field"),n.Wb(10,"input",21),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().group.group_desc=e})),n.ic(11,"translate"),n.ic(12,"translate"),n.Vb(),n.Vb(),n.Wb(13,"mat-form-field"),n.Wb(14,"input",22),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().group.security.maarch_comment=e})),n.ic(15,"translate"),n.ic(16,"translate"),n.Vb(),n.Vb(),n.Wb(17,"mat-form-field"),n.Wb(18,"textarea",23),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().group.security.where_clause=e})),n.ic(19,"translate"),n.ic(20,"translate"),n.Vb(),n.Wb(21,"mat-icon",24),n.dc("click",(function(){n.Dc(t);const e=n.hc(),i=n.zc(14);return e.panelMode="keywordInfos",i.toggle()})),n.ic(22,"translate"),n.Vb(),n.Vb(),n.Wb(23,"div",25),n.Wb(24,"button",26),n.Qc(25),n.ic(26,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Oc(27,vz,3,4,"mat-tab",27),n.Oc(28,yz,3,3,"mat-tab",27),n.Oc(29,Pz,21,13,"mat-tab",27),n.Oc(30,Ez,20,12,"mat-tab",27),n.Vb(),n.Vb()}if(2&t){const t=n.zc(5),e=n.hc();n.Db(2),n.pc("label",n.jc(3,19,"lang.informations")),n.Db(5),n.oc("ngIf",e.creationMode),n.Db(1),n.oc("ngIf",!e.creationMode),n.Db(2),n.pc("title",n.jc(11,21,"lang.label")),n.pc("placeholder",n.jc(12,23,"lang.label")),n.oc("ngModel",e.group.group_desc),n.Db(4),n.pc("title",n.jc(15,25,"lang.description")),n.pc("placeholder",n.jc(16,27,"lang.description")),n.oc("ngModel",e.group.security.maarch_comment),n.Db(4),n.pc("title",n.jc(19,29,"lang.clauseGroup")),n.pc("placeholder",n.jc(20,31,"lang.clauseGroup")),n.oc("ngModel",e.group.security.where_clause),n.Db(3),n.pc("matTooltip",n.jc(22,33,"lang.keywordHelper")),n.Db(3),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(26,35,"lang.save")),n.Db(2),n.oc("ngIf",!e.creationMode),n.Db(1),n.oc("ngIf",!e.creationMode),n.Db(1),n.oc("ngIf",!e.creationMode),n.Db(1),n.oc("ngIf",!e.creationMode)}}function Lz(t,e){1&t&&(n.Ub(0),n.Wb(1,"mat-nav-list"),n.Wb(2,"h3",81),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb(),n.Wb(5,"mat-list",82),n.Wb(6,"p",83),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Wb(9,"div",84),n.Wb(10,"b"),n.Qc(11,"DESTINATION = @my_primary_entity or DESTINATION in (@subentities[@my_primary_entity])"),n.Vb(),n.Vb(),n.Wb(12,"h4",85),n.Qc(13,"@user :"),n.Vb(),n.Wb(14,"p",86),n.Qc(15),n.ic(16,"translate"),n.Vb(),n.Wb(17,"h4",85),n.Qc(18,"@user_id :"),n.Vb(),n.Wb(19,"p",86),n.Qc(20),n.ic(21,"translate"),n.Vb(),n.Wb(22,"h4",85),n.Qc(23,"@email :"),n.Vb(),n.Wb(24,"p",86),n.Qc(25),n.ic(26,"translate"),n.Vb(),n.Wb(27,"h4",85),n.Qc(28,"@my_entities :"),n.Vb(),n.Wb(29,"p",86),n.Qc(30),n.ic(31,"translate"),n.Vb(),n.Wb(32,"h4",85),n.Qc(33,"@my_entities_id :"),n.Vb(),n.Wb(34,"p",86),n.Qc(35),n.ic(36,"translate"),n.Vb(),n.Wb(37,"h4",85),n.Qc(38,"@my_primary_entity :"),n.Vb(),n.Wb(39,"p",86),n.Qc(40),n.ic(41,"translate"),n.Vb(),n.Wb(42,"h4",85),n.Qc(43,"@my_primary_entity_id :"),n.Vb(),n.Wb(44,"p",86),n.Qc(45),n.ic(46,"translate"),n.Vb(),n.Wb(47,"h4",85),n.Qc(48,"@subentities[('entity_1',...,'entity_n')] : "),n.Vb(),n.Wb(49,"p",86),n.Qc(50),n.ic(51,"translate"),n.Vb(),n.Wb(52,"h4",85),n.Qc(53,"@subentities_id[(1, 2, ...)] :"),n.Vb(),n.Wb(54,"p",86),n.Qc(55),n.ic(56,"translate"),n.Vb(),n.Wb(57,"h4",85),n.Qc(58,"@parent_entity['entity_id'] :"),n.Vb(),n.Wb(59,"p",86),n.Qc(60),n.ic(61,"translate"),n.Vb(),n.Wb(62,"h4",85),n.Qc(63,"@sisters_entities['entity_id'] :"),n.Vb(),n.Wb(64,"p",86),n.Qc(65),n.ic(66,"translate"),n.Vb(),n.Wb(67,"h4",85),n.Qc(68,"@entity_type['type'] :"),n.Vb(),n.Wb(69,"p",86),n.Qc(70),n.ic(71,"translate"),n.Vb(),n.Wb(72,"h4",85),n.Qc(73,"@all_entities :"),n.Vb(),n.Wb(74,"p",86),n.Qc(75),n.ic(76,"translate"),n.Vb(),n.Wb(77,"h4",85),n.Qc(78,"@immediate_children['entity_1',..., 'entity_id'] : "),n.Vb(),n.Wb(79,"p",86),n.Qc(80),n.ic(81,"translate"),n.Vb(),n.Vb(),n.Tb()),2&t&&(n.Db(3),n.Rc(n.jc(4,16,"lang.keywordHelp")),n.Db(4),n.Rc(n.jc(8,18,"lang.keywordHelpDesc_11")),n.Db(8),n.Rc(n.jc(16,20,"lang.keywordHelpDesc_1")),n.Db(5),n.Rc(n.jc(21,22,"lang.keywordHelpDesc_12")),n.Db(5),n.Rc(n.jc(26,24,"lang.keywordHelpDesc_2")),n.Db(5),n.Rc(n.jc(31,26,"lang.keywordHelpDesc_3")),n.Db(5),n.Rc(n.jc(36,28,"lang.keywordHelpDesc_13")),n.Db(5),n.Rc(n.jc(41,30,"lang.keywordHelpDesc_4")),n.Db(5),n.Rc(n.jc(46,32,"lang.keywordHelpDesc_14")),n.Db(5),n.Rc(n.jc(51,34,"lang.keywordHelpDesc_5")),n.Db(5),n.Rc(n.jc(56,36,"lang.keywordHelpDesc_15")),n.Db(5),n.Rc(n.jc(61,38,"lang.keywordHelpDesc_6")),n.Db(5),n.Rc(n.jc(66,40,"lang.keywordHelpDesc_7")),n.Db(5),n.Rc(n.jc(71,42,"lang.keywordHelpDesc_8")),n.Db(5),n.Rc(n.jc(76,44,"lang.keywordHelpDesc_9")),n.Db(5),n.Rc(n.jc(81,46,"lang.keywordHelpDesc_10")))}function Qz(t,e){if(1&t&&(n.Wb(0,"mat-list-option",91),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("selected",t.checked)("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function Nz(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"mat-nav-list"),n.Wb(2,"h3",81),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb(),n.Wb(5,"mat-list",82),n.Wb(6,"p",87),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Wb(9,"mat-selection-list",88,89),n.dc("selectionChange",(function(){n.Dc(t);const e=n.zc(10);return n.hc().updatePrivilegeParams(e.selectedOptions.selected)})),n.Oc(11,Qz,2,3,"mat-list-option",90),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=n.hc();n.Db(3),n.Rc(n.jc(4,3,"lang.adminParamsUsers")),n.Db(4),n.Sc(" ",n.jc(8,5,"lang.chooseAllowedGroups")," : "),n.Db(4),n.oc("ngForOf",t.authorizedGroupsUserParams)}}let zz=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c,l){this.translate=t,this.http=e,this.route=i,this.router=n,this.notify=a,this.headerService=s,this.appService=o,this.privilegeService=r,this.authService=c,this.dialog=l,this.loading=!1,this.paramsLoading=!1,this.group={security:{}},this.menus={},this.usersDisplayedColumns=["firstname","lastname"],this.basketsDisplayedColumns=["basket_name","basket_desc"],this.unitPrivileges=[],this.administrationPrivileges=[],this.authorizedGroupsUserParams=[],this.panelMode="keywordInfos"}applyFilter(t){t=(t=t.trim()).toLowerCase(),this.usersDataSource.filter=t}applyBasketsFilter(t){t=(t=t.trim()).toLowerCase(),this.basketsDataSource.filter=t}ngOnInit(){this.loading=!0,this.route.params.subscribe(t=>{void 0===t.id?(this.headerService.setHeader(this.translate.instant("lang.groupCreation")),this.creationMode=!0,this.loading=!1):(this.creationMode=!1,this.http.get("../rest/groups/"+t.id+"/details").subscribe(t=>{this.group=t.group,this.administrationPrivileges=this.privilegeService.getAdministrations(),this.administrationPrivileges=this.administrationPrivileges.map(t=>Object.assign(Object.assign({},t),{checked:this.group.privileges.indexOf(t.id)>-1})),this.privilegeService.getUnitsPrivileges().forEach(t=>{let e=this.privilegeService.getPrivilegesByUnit(t);if("diffusionList"===t)e=[{id:"indexing_diffList",label:this.translate.instant("lang.diffListPrivilegeMsgIndexing"),current:void 0!==this.group.privileges.filter(t=>["update_diffusion_indexing","update_diffusion_except_recipient_indexing"].indexOf(t)>-1)[0]?this.group.privileges.filter(t=>["update_diffusion_indexing","update_diffusion_except_recipient_indexing"].indexOf(t)>-1)[0]:"",services:this.privilegeService.getPrivileges(["update_diffusion_indexing","update_diffusion_except_recipient_indexing"])},{id:"process_diffList",label:this.translate.instant("lang.diffListPrivilegeMsgProcess"),current:void 0!==this.group.privileges.filter(t=>["update_diffusion_process","update_diffusion_except_recipient_process"].indexOf(t)>-1)[0]?this.group.privileges.filter(t=>["update_diffusion_process","update_diffusion_except_recipient_process"].indexOf(t)>-1)[0]:"",services:this.privilegeService.getPrivileges(["update_diffusion_process","update_diffusion_except_recipient_process"])},{id:"details_diffList",label:this.translate.instant("lang.diffListPrivilegeMsgDetails"),current:void 0!==this.group.privileges.filter(t=>["update_diffusion_details","update_diffusion_except_recipient_details"].indexOf(t)>-1)[0]?this.group.privileges.filter(t=>["update_diffusion_details","update_diffusion_except_recipient_details"].indexOf(t)>-1)[0]:"",services:this.privilegeService.getPrivileges(["update_diffusion_details","update_diffusion_except_recipient_details"])}];else if("confidentialityAndSecurity"===t){let t="";this.group.privileges.filter(t=>"manage_personal_data"===t)[0]?t="manage_personal_data":this.group.privileges.filter(t=>"view_personal_data"===t)[0]&&(t="view_personal_data"),e=[{id:"confidentialityAndSecurity_personal_data",label:this.translate.instant("lang.personalDataMsg"),current:t,services:this.privilegeService.getPrivileges(["view_personal_data","manage_personal_data"])}]}this.unitPrivileges.push({id:t,label:this.translate.instant("lang."+t),services:e})}),this.headerService.setHeader(this.translate.instant("lang.groupModification"),this.group.group_desc),this.loading=!1,setTimeout(()=>{this.usersDataSource=new vt.p(this.group.users),this.usersDataSource.paginator=this.paginator,this.usersDataSource.sort=this.sortUsers,this.basketsDataSource=new vt.p(this.group.baskets),this.basketsDataSource.paginator=this.paginatorBaskets,this.basketsDataSource.sort=this.sortBaskets},0)},t=>{this.notify.handleErrors(t)}))})}changeDifflistPrivilege(t,e){"indexing_diffList"===e?"update_diffusion_indexing"===t.value?this.manageServices(["update_diffusion_indexing","update_diffusion_except_recipient_indexing"]):"update_diffusion_except_recipient_indexing"===t.value?this.manageServices(["update_diffusion_except_recipient_indexing","update_diffusion_indexing"]):this.manageServices(["update_diffusion_indexing","update_diffusion_except_recipient_indexing"],"deleteAll"):"process_diffList"===e?"update_diffusion_process"===t.value?this.manageServices(["update_diffusion_process","update_diffusion_except_recipient_process"]):"update_diffusion_except_recipient_process"===t.value?this.manageServices(["update_diffusion_except_recipient_process","update_diffusion_process"]):this.manageServices(["update_diffusion_process","update_diffusion_except_recipient_process"],"deleteAll"):"update_diffusion_details"===t.value?this.manageServices(["update_diffusion_details","update_diffusion_except_recipient_details"]):"update_diffusion_except_recipient_details"===t.value?this.manageServices(["update_diffusion_except_recipient_details","update_diffusion_details"]):this.manageServices(["update_diffusion_details","update_diffusion_except_recipient_details"],"deleteAll")}manageServices(t,e=null){"deleteAll"!==e?this.http.post(`../rest/groups/${this.group.id}/privileges/${t[0]}`,{}).pipe(Object(mt.a)(()=>{this.group.privileges.push(t[0])}),p(()=>this.http.delete(`../rest/groups/${this.group.id}/privileges/${t[1]}`)),Object(mt.a)(()=>{this.group.privileges.splice(this.group.privileges.indexOf(t[1]),1),this.headerService.resfreshCurrentUser(),this.notify.success(this.translate.instant("lang.groupServicesUpdated"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe():this.http.delete(`../rest/groups/${this.group.id}/privileges/${t[0]}`).pipe(Object(mt.a)(()=>{this.group.privileges.splice(this.group.privileges.indexOf(t[0]),1)}),p(()=>this.http.delete(`../rest/groups/${this.group.id}/privileges/${t[1]}`)),Object(mt.a)(()=>{this.group.privileges.splice(this.group.privileges.indexOf(t[1]),1),this.headerService.resfreshCurrentUser(),this.notify.success(this.translate.instant("lang.groupServicesUpdated"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}changePersonalDataPrivilege(t){"view_personal_data"===t.value?this.manageServices(["view_personal_data","manage_personal_data"]):"manage_personal_data"===t.value?this.http.post(`../rest/groups/${this.group.id}/privileges/view_personal_data`,{}).pipe(Object(mt.a)(()=>{this.group.privileges.push("view_personal_data")}),p(()=>this.http.post(`../rest/groups/${this.group.id}/privileges/manage_personal_data`,{})),Object(mt.a)(()=>{this.group.privileges.splice(this.group.privileges.indexOf("manage_personal_data"),1),this.headerService.resfreshCurrentUser(),this.notify.success(this.translate.instant("lang.groupServicesUpdated"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe():this.manageServices(["view_personal_data","manage_personal_data"],"deleteAll")}resfreshShortcut(){return Object(r.a)(this,void 0,void 0,(function*(){yield this.headerService.resfreshCurrentUser(),this.privilegeService.resfreshUserShortcuts()}))}getCurrentPrivListDiff(t){return this.group.privileges.indexOf(t)>-1}onSubmit(){this.creationMode?this.http.post("../rest/groups",this.group).subscribe(t=>{this.notify.success(this.translate.instant("lang.groupAdded")),this.router.navigate(["/administration/groups/"+t.group])},t=>{this.notify.error(t.error.errors)}):this.http.put("../rest/groups/"+this.group.id,{description:this.group.group_desc,security:this.group.security}).subscribe(()=>{this.notify.success(this.translate.instant("lang.groupUpdated"))},t=>{this.notify.error(t.error.errors)})}toggleService(t,e){t.checked?"admin_groups"===e.id?this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.confirmAction"),msg:this.translate.instant("lang.enableGroupMsg")}}).afterClosed().pipe(Object(mt.a)(t=>{"ok"!==t&&(e.checked=!1)}),Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.addService(e)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe():this.addService(e):(this.sidenavRight.close(),this.removeService(e))}addService(t){this.http.post(`../rest/groups/${this.group.id}/privileges/${t.id}`,{}).pipe(Object(mt.a)(()=>{this.group.privileges.push(t.id),this.headerService.resfreshCurrentUser(),this.notify.success(this.translate.instant("lang.groupServicesUpdated"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}removeService(t){this.http.delete(`../rest/groups/${this.group.id}/privileges/${t.id}`).pipe(Object(mt.a)(()=>{this.group.privileges.splice(this.group.privileges.indexOf(t.id),1),this.headerService.resfreshCurrentUser(),this.notify.success(this.translate.instant("lang.groupServicesUpdated"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}linkUser(t){this.http.post("../rest/users/"+t.id+"/groups",{groupId:this.group.group_id,role:this.group.role}).subscribe(()=>{const e=t.idToDisplay.split(" ");this.group.users.push({id:t.id,user_id:t.otherInfo,firstname:e[0],lastname:e[1],allowed:!0}),this.usersDataSource=new vt.p(this.group.users),this.usersDataSource.paginator=this.paginator,this.usersDataSource.sort=this.sortUsers,this.notify.success(this.translate.instant("lang.userAdded"))},t=>{this.notify.error(t.error.errors)})}openUserParams(t){this.sidenavRight.toggle(),this.sidenavRight.opened?(this.panelMode=t,this.paramsLoading=!0,this.http.get("../rest/groups").pipe(Object(l.a)(t=>(t.groups=t.groups.map(t=>({id:t.id,label:t.group_desc})),t)),Object(mt.a)(t=>{this.authorizedGroupsUserParams=t.groups}),p(()=>this.http.get(`../rest/groups/${this.group.id}/privileges/${this.panelMode}/parameters?parameter=groups`)),Object(mt.a)(t=>{const e=t;this.authorizedGroupsUserParams.forEach(t=>{t.checked=e.indexOf(t.id)>-1})}),Object(Xt.a)(()=>this.paramsLoading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()):this.panelMode=""}updatePrivilegeParams(t){let e={};"admin_users"===this.panelMode&&(e={groups:t.map(t=>t.value)}),this.http.put(`../rest/groups/${this.group.id}/privileges/${this.panelMode}/parameters`,{parameters:e}).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.parameterUpdated"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}goToUserAdmin(t){t.allowed&&this.router.navigate(["/administration/users/"+t.id])}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(Dt.a),n.Qb(_.a),n.Qb(q.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(YN,!0),n.Xc(JN,!0),n.Kc(ZN,!0),n.Xc(Kt.a,!0),n.Kc(tz,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.paginatorBaskets=i.first),n.yc(i=n.ec())&&(e.sortBaskets=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sortUsers=i.first))},decls:17,vars:13,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["fixedTopGap","56","position","end",3,"mode","fixedInViewport","opened"],["snav2",""],[4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[3,"label"],[1,"form-horizontal",3,"ngSubmit"],["groupForm","ngForm"],["matInput","","name","identifier","pattern","^[\\w.-]*$","maxlength","32","required","",3,"placeholder","ngModel","ngModelChange",4,"ngIf"],["matInput","","name","identifier","disabled","",3,"placeholder","title","ngModel","ngModelChange",4,"ngIf"],["matInput","","name","description","maxlength","255","required","",3,"title","placeholder","ngModel","ngModelChange"],["matInput","","name","comment",3,"title","placeholder","ngModel","ngModelChange"],["matInput","","name","clause","required","","matTextareaAutosize","","matAutosizeMinRows","1","matAutosizeMaxRows","5",3,"title","placeholder","ngModel","ngModelChange"],["color","primary","matSuffix","",1,"fa","fa-info-circle",2,"cursor","pointer",3,"matTooltip","click"],[1,"col-md-12","text-center",2,"padding","10px"],["mat-raised-button","","color","primary",3,"disabled"],[3,"label",4,"ngIf"],["matInput","","name","identifier","pattern","^[\\w.-]*$","maxlength","32","required","",3,"placeholder","ngModel","ngModelChange"],["matInput","","name","identifier","disabled","",3,"placeholder","title","ngModel","ngModelChange"],[4,"ngFor","ngForOf"],["floatLabel","never","appearance","outline",1,"basketsFilter",2,"padding-left","20px","padding-right","20px","font-size","11px"],["matInput","",3,"placeholder"],["listFilterAdmin",""],["class","col-md-3","style","padding:10px;",4,"ngFor","ngForOf"],["listFilter",""],["expanded","",3,"emptyExpansionPanel",4,"ngFor","ngForOf"],["color","primary",3,"name","checked","disabled","matTooltip","change"],[1,"col-md-3",2,"padding","10px"],["color","primary",3,"name","ngModel","checked","disabled","matTooltip","ngModelChange","change"],["mat-icon-button","","color","primary",3,"active","title","disabled","click",4,"ngIf"],["mat-icon-button","","color","primary",3,"title","disabled","click"],[1,"fa","fa-cogs"],["expanded",""],["color","primary",3,"name","checked","matTooltip","change"],["color","primary","style","font-size: 16px;",4,"ngFor","ngForOf"],["color","primary",2,"font-size","16px"],[3,"innerHTML"],[2,"width","250px !important","padding-left","10px","padding-right","10px"],[3,"ngModel","ngModelChange","selectionChange"],["value",""],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[2,"width","300px !important","padding-left","10px","padding-right","10px"],["matTabContent",""],[3,"groupId","resfreshShortcut"],[1,"row",2,"margin","0px"],["class","col-md-12","style","padding:5px;",4,"ngIf"],[1,"col-md-6","col-xs-6"],["matInput","",3,"placeholder","keyup"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSort","","matSortActive","lastname","matSortDirection","asc",3,"dataSource"],["sortUsers","matSort"],["matColumnDef","firstname"],["mat-sort-header","",4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","lastname"],[4,"matHeaderRowDef"],[3,"matTooltip","matTooltipDisabled","ngStyle","click",4,"matRowDef","matRowDefColumns"],[1,"col-md-12",2,"padding","5px"],[3,"labelPlaceholder","labelList","routeDatas","targetSearchKey","triggerEvent"],["mat-sort-header",""],[3,"matTooltip","matTooltipDisabled","ngStyle","click"],["paginatorBaskets",""],["matSort","","matSortActive","basket_name","matSortDirection","asc",3,"dataSource"],["sortBaskets","matSort"],["matColumnDef","basket_name"],["matColumnDef","basket_desc"],["style","cursor:pointer;",3,"routerLink","matTooltip",4,"matRowDef","matRowDefColumns"],[2,"cursor","pointer",3,"routerLink","matTooltip"],["mat-subheader",""],["role","list",2,"width","400px","padding","5px"],[2,"font-size","10px"],[2,"border","1px black solid","padding","3px","font-size","10px"],["mat-line","",2,"font-weight","bold","font-size","10px"],["mat-line","",2,"font-size","10px"],["color","primary"],[3,"selectionChange"],["paramsList",""],["color","primary","style","font-size: 13px;","checkboxPosition","before",3,"selected","value",4,"ngFor","ngForOf"],["color","primary","checkboxPosition","before",2,"font-size","13px",3,"selected","value"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,ez,2,0,"div",8),n.Oc(12,Fz,31,37,"mat-card",9),n.Vb(),n.Vb(),n.Vb(),n.Wb(13,"mat-sidenav",10,11),n.Oc(15,Lz,82,48,"ng-container",12),n.Oc(16,Nz,12,7,"ng-container",12),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",(e.appService.getViewMode(),!1)),n.Db(2),n.oc("ngIf","keywordInfos"===e.panelMode),n.Db(1),n.oc("ngIf","admin_users"===e.panelMode))},directives:[I.e,I.f,Ot,We,P.t,I.d,V.c,K.a,Te.c,Te.a,X.K,X.v,X.w,Y.c,J.b,X.d,X.p,X.F,X.u,X.x,J.d,S.a,Y.j,A.b,k.b,X.B,R.a,P.s,R.d,te.a,gt.c,gt.g,gt.h,ee.a,W.p,Te.b,KN,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,ii,vt.h,Fe.b,vt.a,vt.j,vt.m,P.w,o.d,R.h,R.g,W.l,R.i,R.f],pipes:[g.d,Wt.a,rg],styles:["textarea.mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0}.active[_ngcontent-%COMP%]{color:#f99830}.emptyExpansionPanel[_ngcontent-%COMP%]{height:0}"]}),t})();const Bz=["snav2"],Uz=["adminMenuTemplate"];function $z(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",16),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",17),n.Rb(5,"mat-icon",18),n.Wb(6,"p",19),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Wb(9,"a",20),n.dc("click",(function(){return n.Dc(t),n.hc(),n.zc(16).toggle()})),n.Rb(10,"mat-icon",21),n.Wb(11,"p",19),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Vb()}2&t&&(n.Db(2),n.Rc(n.jc(3,3,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,5,"lang.add")," "),n.Db(5),n.Sc(" ",n.jc(13,7,"lang.basketsOrder")," "))}function Hz(t,e){1&t&&(n.Wb(0,"div",22),n.Rb(1,"mat-spinner",23),n.Vb())}function Gz(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",45),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Rc(n.jc(2,3,"lang.id"))}}function Xz(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",t.basket_id," ")}}function qz(t,e){1&t&&(n.Wb(0,"mat-header-cell",45),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.label")))}function Kz(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.basket_name," ")}}function Yz(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",45),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Sc("",n.jc(2,3,"lang.description")," ")}}function Jz(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",t.basket_desc," ")}}function Zz(t,e){1&t&&n.Rb(0,"mat-header-cell")}function tB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",46),n.Wb(1,"button",47),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.delete(a)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",48),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.pc("matTooltip",n.jc(2,1,"lang.delete")))}function eB(t,e){1&t&&n.Rb(0,"mat-header-row")}function iB(t,e){1&t&&(n.Rb(0,"mat-row",49),n.ic(1,"translate")),2&t&&(n.qc("routerLink","/administration/baskets/",e.$implicit.basket_id,""),n.pc("matTooltip",n.jc(1,2,"lang.view")))}function nB(t,e){if(1&t&&(n.Wb(0,"mat-card",24),n.Wb(1,"div",25),n.Wb(2,"div",26),n.Wb(3,"mat-form-field"),n.Rb(4,"input",27),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Wb(6,"div",26),n.Rb(7,"mat-paginator",28,29),n.Vb(),n.Vb(),n.Wb(9,"mat-table",30,31),n.Ub(11,32),n.Oc(12,Gz,3,5,"mat-header-cell",33),n.Oc(13,Xz,2,3,"mat-cell",34),n.Tb(),n.Ub(14,35),n.Oc(15,qz,3,3,"mat-header-cell",36),n.Oc(16,Kz,2,1,"mat-cell",37),n.Tb(),n.Ub(17,38),n.Oc(18,Yz,3,5,"mat-header-cell",33),n.Oc(19,Jz,2,3,"mat-cell",34),n.Tb(),n.Ub(20,39),n.Oc(21,Zz,1,0,"mat-header-cell",40),n.Oc(22,tB,4,3,"mat-cell",41),n.Tb(),n.Oc(23,eB,1,0,"mat-header-row",42),n.Oc(24,iB,2,4,"mat-row",43),n.Vb(),n.Wb(25,"div",44),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.pc("placeholder",n.jc(5,10,"lang.filterBy")),n.oc("formControl",t.adminService.getFilterField()),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.adminService.getDataSource()),n.Db(14),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns),n.Db(2),n.Tc(" ",t.baskets.length," ",n.jc(27,12,"lang.baskets"),"")}}function aB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item",50),n.dc("onDropSuccess",(function(){n.Dc(t);const i=e.$implicit;return n.hc().updateBasketOrder(i)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",51),n.Wb(3,"p",19),n.Qc(4),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=e.index;n.pc("title",n.jc(1,4,"lang.move")),n.oc("sortableIndex",i),n.Db(4),n.Tc("",i+1," - ",t.basket_name,"")}}const sB=function(){return["boxers-zone"]};let oB=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.functions=s,this.adminService=o,this.viewContainerRef=r,this.loading=!1,this.baskets=[],this.basketsOrder=[],this.displayedColumns=["basket_id","basket_name","basket_desc","actions"],this.filterColumns=["basket_id","basket_name","basket_desc"]}ngOnInit(){this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.baskets")),this.loading=!0,this.getSortedBasket(),this.http.get("../rest/baskets").subscribe(t=>{this.baskets=t.baskets,this.loading=!1,setTimeout(()=>{this.adminService.setDataSource("admin_baskets",this.baskets,this.sort,this.paginator,this.filterColumns)},0)},t=>{this.notify.handleErrors(t)})}getSortedBasket(){this.http.get("../rest/sortedBaskets").pipe(Object(mt.a)(t=>{this.basketsOrder=t.baskets}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}delete(t){confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.delete")+" \xab "+t.basket_name+" \xbb")&&this.http.delete("../rest/baskets/"+t.basket_id).subscribe(t=>{this.notify.success(this.translate.instant("lang.basketDeleted")),this.baskets=t.baskets,this.adminService.setDataSource("admin_baskets",this.baskets,this.sort,this.paginator,this.filterColumns),this.getSortedBasket()},t=>{this.notify.error(t.error.errors)})}updateBasketOrder(t){this.http.put("../rest/sortedBaskets/"+t.basket_id,this.basketsOrder).subscribe(t=>{this.baskets=t.baskets,this.notify.success(this.translate.instant("lang.modificationSaved"))},t=>{this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a),n.Qb(OL),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(Bz,!0),n.Kc(Uz,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:23,vars:18,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["fixedTopGap","56","position","end",3,"mode","fixedInViewport","opened"],["snav2",""],[2,"font-size","15px","padding","10px"],["dnd-sortable-container","",3,"dropZones","sortableData"],["disableRipple","true","dnd-sortable","",3,"title","sortableIndex","onDropSuccess",4,"ngFor","ngForOf"],["mat-subheader",""],["mat-list-item","","routerLink","/administration/baskets/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],["mat-list-item","",3,"click"],["color","primary","mat-list-icon","",1,"fa","fa-list-ol"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"row"],[1,"col-md-6","col-xs-6"],["matInput","",3,"formControl","placeholder"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSortDisableClear","","matSort","",3,"dataSource"],["table",""],["matColumnDef","basket_id"],["mat-sort-header","",3,"hide-for-mobile",4,"matHeaderCellDef"],[3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","basket_name"],["mat-sort-header","",4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","basket_desc"],["matColumnDef","actions"],[4,"matHeaderCellDef"],["style","justify-content: flex-end;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"routerLink","matTooltip",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["mat-sort-header",""],[2,"justify-content","flex-end"],["mat-icon-button","","color","warn",3,"matTooltip","click"],["aria-hidden","true",1,"fa","fa-trash-alt","fa-2x"],[2,"cursor","pointer",3,"routerLink","matTooltip"],["disableRipple","true","dnd-sortable","",3,"title","sortableIndex","onDropSuccess"],["color","primary","mat-list-icon","",1,"fa","fa-inbox"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,$z,14,9,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,Hz,2,0,"div",9),n.Oc(14,nB,28,14,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Wb(15,"mat-sidenav",11,12),n.Wb(17,"p",13),n.Qc(18),n.ic(19,"translate"),n.Vb(),n.Wb(20,"mat-list"),n.Wb(21,"span",14),n.Oc(22,aB,5,6,"mat-list-item",15),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",(e.appService.getViewMode(),!1)),n.Db(3),n.Sc(" ",n.jc(19,15,"lang.basketHelpDesc")," "),n.Db(3),n.oc("dropZones",n.uc(17,sB))("sortableData",e.basketsOrder),n.Db(1),n.oc("ngForOf",e.basketsOrder))},directives:[I.e,I.f,Ot,We,P.t,I.d,R.a,Ee.f,P.s,R.h,R.g,R.d,o.f,S.a,R.c,W.l,V.c,K.a,Y.c,J.b,X.d,X.u,X.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,vt.h,Fe.b,vt.a,k.b,A.b,vt.j,vt.m,o.d,Ee.e],pipes:[g.d],encapsulation:2}),t})();function rB(t,e){if(1&t&&(n.Wb(0,"mat-option",31),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.value),n.Db(1),n.Sc(" ",n.jc(2,2,"lang."+t.id)," ")}}function cB(t,e){if(1&t&&(n.Wb(0,"mat-option",31),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function lB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",32),n.Wb(1,"div",33),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-form-field",0),n.Wb(5,"mat-label"),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Wb(8,"mat-select",34),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().selectedProcessTool.defaultTab=e})),n.Oc(9,cB,2,2,"mat-option",2),n.ic(10,"sortBy"),n.Vb(),n.Vb(),n.Wb(11,"div",35),n.Wb(12,"mat-slide-toggle",36),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().selectedProcessTool.canUpdateData=e}))("change",(function(e){return n.Dc(t),n.hc().toggleCanUpdate(e.checked)})),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Wb(15,"div",35),n.Wb(16,"mat-slide-toggle",37),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().selectedProcessTool.canUpdateModel=e})),n.Qc(17),n.ic(18,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(2),n.Sc(" ",n.jc(3,9,"lang.options")," "),n.Db(4),n.Rc(n.jc(7,11,"lang.tabProcessPosition")),n.Db(2),n.oc("ngModel",t.selectedProcessTool.defaultTab),n.Db(1),n.oc("ngForOf",n.kc(10,13,t.processTool,"label")),n.Db(3),n.oc("ngModel",t.selectedProcessTool.canUpdateData),n.Db(1),n.Rc(n.jc(14,16,"lang.canUpdateData")),n.Db(3),n.oc("ngModel",t.selectedProcessTool.canUpdateModel)("disabled",!t.selectedProcessTool.canUpdateData),n.Db(1),n.Sc("",n.jc(18,18,"lang.canUpdateIndexingModel")," ")}}function dB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",32),n.Wb(1,"div",33),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"div",35),n.Wb(5,"mat-slide-toggle",38),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().selectedProcessTool.canUpdateDocuments=e})),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(2),n.Sc(" ",n.jc(3,3,"lang.options")," "),n.Db(3),n.oc("ngModel",t.selectedProcessTool.canUpdateDocuments),n.Db(1),n.Sc(" ",n.jc(7,5,"lang.canUpdateResourcesInSignatureBook"),"")}}function hB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",39),n.dc("click",(function(){return n.Dc(t),n.hc().toggleData()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",40),n.Vb()}2&t&&n.pc("title",n.jc(1,1,"lang.preview"))}function uB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",39),n.dc("click",(function(){return n.Dc(t),n.hc().toggleData()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",41),n.Vb()}2&t&&n.pc("title",n.jc(1,1,"lang.edition"))}function pB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",42),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().selectedTemplateDisplayedSecondaryData=i})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.Tc("",t," ",n.jc(2,2,"lang.columns"),"")}}function bB(t,e){if(1&t&&(n.Wb(0,"mat-option",43),n.Wb(1,"span",44),n.Wb(2,"span",45),n.Rb(3,"i",46),n.Vb(),n.Wb(4,"span",47),n.Qc(5),n.Vb(),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.value),n.Db(3),n.Gb("fa ",t.icon," fa-2x"),n.Db(2),n.Sc(" ",t.label," ")}}function fB(t,e){if(1&t&&(n.Wb(0,"button",61),n.Rb(1,"mat-icon",62),n.Vb()),2&t){n.hc();const t=n.zc(3);n.oc("matMenuTriggerFor",t)}}function mB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",51),n.Oc(1,fB,2,1,"button",52),n.Wb(2,"mat-menu",null,8),n.Wb(4,"button",42),n.dc("click",(function(){n.Dc(t);const e=n.hc(),i=e.$implicit,a=e.index;return n.hc(2).removeData(i,a)})),n.Rb(5,"mat-icon",53),n.Wb(6,"span"),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Rb(9,"mat-divider"),n.Wb(10,"button",42),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).setStyle(e,"boldFontData")})),n.Rb(11,"mat-icon",54),n.Wb(12,"span"),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Wb(15,"button",42),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).setStyle(e,"align_leftData")})),n.Rb(16,"mat-icon",55),n.Wb(17,"span"),n.Qc(18),n.ic(19,"translate"),n.Vb(),n.Vb(),n.Wb(20,"button",42),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).setStyle(e,"align_centerData")})),n.Rb(21,"mat-icon",56),n.Wb(22,"span"),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Vb(),n.Wb(25,"button",42),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).setStyle(e,"align_rightData")})),n.Rb(26,"mat-icon",57),n.Wb(27,"span"),n.Qc(28),n.ic(29,"translate"),n.Vb(),n.Vb(),n.Wb(30,"button",42),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).setStyle(e,"bigFontData")})),n.Rb(31,"mat-icon",58),n.Wb(32,"span"),n.Qc(33),n.ic(34,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(35,"span",59),n.Rb(36,"i"),n.Qc(37,"\xa0 "),n.Rb(38,"span",60),n.Vb(),n.Vb()}if(2&t){const t=n.hc(),e=t.index,i=t.$implicit,a=n.hc(2);n.oc("sortableIndex",e),n.Db(1),n.oc("ngIf","label"==a.displayMode),n.Db(6),n.Rc(n.jc(8,24,"lang.delete")),n.Db(3),n.Ib("isSelectedMenu",i.cssClasses.indexOf("boldFontData")>-1),n.Db(3),n.Rc(n.jc(14,26,"lang.fontBold")),n.Db(2),n.Ib("isSelectedMenu",i.cssClasses.indexOf("align_leftData")>-1),n.Db(3),n.Rc(n.jc(19,28,"lang.alignLeft")),n.Db(2),n.Ib("isSelectedMenu",i.cssClasses.indexOf("align_centerData")>-1),n.Db(3),n.Rc(n.jc(24,30,"lang.alignCenter")),n.Db(2),n.Ib("isSelectedMenu",i.cssClasses.indexOf("align_rightData")>-1),n.Db(3),n.Rc(n.jc(29,32,"lang.alignRight")),n.Db(2),n.Ib("isSelectedMenu",i.cssClasses.indexOf("bigFontData")>-1),n.Db(3),n.Rc(n.jc(34,34,"lang.fontBig")),n.Db(2),n.Fb(i.cssClasses.join(" ")),n.Db(1),n.Gb("fa ",i.icon,""),n.Db(2),n.oc("innerHTML",i[a.displayMode],n.Ec)}}function gB(t,e){if(1&t&&(n.Ub(0),n.Oc(1,mB,39,36,"span",50),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf","getFolders"!=t.value)}}const vB=function(){return["boxers-zone"]};function _B(t,e){if(1&t&&(n.Wb(0,"div",48),n.Wb(1,"mat-toolbar"),n.Oc(2,gB,2,1,"ng-container",49),n.Vb(),n.Vb()),2&t){const t=n.hc();n.oc("dropZones",n.uc(6,vB))("sortableData",t.displayedSecondaryData),n.Db(1),n.Gb("secondaryInformations example-list column-",t.selectedTemplateDisplayedSecondaryData,"-list"),n.Db(1),n.oc("ngForOf",t.displayedSecondaryData)}}function yB(t,e){1&t&&n.Rb(0,"mat-icon",68)}function xB(t,e){1&t&&n.Rb(0,"mat-icon",69)}function CB(t,e){if(1&t&&(n.Wb(0,"span"),n.Oc(1,yB,1,0,"mat-icon",65),n.Oc(2,xB,1,0,"mat-icon",66),n.Rb(3,"br"),n.Wb(4,"span",67),n.Qc(5),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc();n.Db(1),n.oc("ngIf","label"==e.displayMode),n.Db(1),n.oc("ngIf","sample"==e.displayMode),n.Db(3),n.Rc(t[e.displayMode])}}function OB(t,e){if(1&t&&(n.Wb(0,"span"),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc();n.Db(1),n.Sc(" ",t[e.displayMode]," ")}}function DB(t,e){if(1&t&&(n.Wb(0,"span",63),n.Oc(1,CB,6,3,"span",64),n.Oc(2,OB,2,1,"span",64),n.Vb()),2&t){const t=e.index;n.Fb(e.$implicit.cssClasses.join(" ")),n.Db(1),n.oc("ngIf",0==t),n.Db(1),n.oc("ngIf",1==t)}}function wB(t,e){if(1&t&&(n.Wb(0,"button",61),n.Rb(1,"mat-icon",62),n.Vb()),2&t){n.hc();const t=n.zc(3);n.oc("matMenuTriggerFor",t)}}function MB(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Oc(1,wB,2,1,"button",52),n.Wb(2,"mat-menu",null,8),n.Wb(4,"button",42),n.dc("click",(function(){n.Dc(t);const e=n.hc(),i=e.$implicit,a=e.index;return n.hc().removeData(i,a)})),n.Rb(5,"mat-icon",53),n.Wb(6,"span"),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(9,"span",71),n.Rb(10,"i",72),n.Qc(11),n.Vb(),n.Tb()}if(2&t){const t=n.hc().$implicit,e=n.hc();n.Db(1),n.oc("ngIf","label"==e.displayMode),n.Db(6),n.Rc(n.jc(8,3,"lang.delete")),n.Db(4),n.Sc(" ",t[e.displayMode],"")}}function kB(t,e){if(1&t&&(n.Wb(0,"div",70),n.Oc(1,MB,12,5,"ng-container",64),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf","getFolders"==t.value)}}let SB=(()=>{class t{constructor(t,e,i,a){this.translate=t,this.http=e,this.notify=i,this.functions=a,this.loading=!1,this.displayedMainData=[{value:"chronoNumberShort",label:this.translate.instant("lang.chronoNumberShort"),sample:"MAARCH/2019A/1",cssClasses:["align_centerData","normalData"],icon:""},{value:"object",label:this.translate.instant("lang.object"),sample:this.translate.instant("lang.objectSample"),cssClasses:["longData"],icon:""}],this.availableData=[{value:"getPriority",label:this.translate.instant("lang.getPriority"),sample:this.translate.instant("lang.getPrioritySample"),cssClasses:["align_leftData"],icon:"fa-traffic-light"},{value:"getCategory",label:this.translate.instant("lang.getCategory"),sample:this.translate.instant("lang.incoming"),cssClasses:["align_leftData"],icon:"fa-exchange-alt"},{value:"getDoctype",label:this.translate.instant("lang.getDoctype"),sample:this.translate.instant("lang.getDoctypeSample"),cssClasses:["align_leftData"],icon:"fa-suitcase"},{value:"getAssignee",label:this.translate.instant("lang.getAssignee"),sample:this.translate.instant("lang.getAssigneeSample"),cssClasses:["align_leftData"],icon:"fa-sitemap"},{value:"getRecipients",label:this.translate.instant("lang.getRecipients"),sample:"Patricia PETIT",cssClasses:["align_leftData"],icon:"fa-user"},{value:"getSenders",label:this.translate.instant("lang.getSenders"),sample:"Alain DUBOIS (MAARCH)",cssClasses:["align_leftData"],icon:"fa-book"},{value:"getCreationAndProcessLimitDates",label:this.translate.instant("lang.getCreationAndProcessLimitDates"),sample:this.translate.instant("lang.getCreationAndProcessLimitDatesSample"),cssClasses:["align_leftData"],icon:"fa-calendar"},{value:"getVisaWorkflow",label:this.translate.instant("lang.getVisaWorkflow"),sample:'<i color="accent" class="fa fa-check"></i> Barbara BAIN -> <i class="fa fa-hourglass-half"></i> <b>Bruno BOULE</b> -> <i class="fa fa-hourglass-half"></i> Patricia PETIT',cssClasses:["align_leftData"],icon:"fa-list-ol"},{value:"getSignatories",label:this.translate.instant("lang.getSignatories"),sample:"Denis DAULL, Patricia PETIT",cssClasses:["align_leftData"],icon:"fa-certificate"},{value:"getModificationDate",label:this.translate.instant("lang.getModificationDate"),sample:"01-01-2019",cssClasses:["align_leftData"],icon:"fa-calendar-check"},{value:"getOpinionLimitDate",label:this.translate.instant("lang.getOpinionLimitDate"),sample:"01-01-2019",cssClasses:["align_leftData"],icon:"fa-stopwatch"},{value:"getParallelOpinionsNumber",label:this.translate.instant("lang.getParallelOpinionsNumber"),sample:this.translate.instant("lang.getParallelOpinionsNumberSample"),cssClasses:["align_leftData"],icon:"fa-comment-alt"},{value:"getFolders",label:this.translate.instant("lang.getFolders"),sample:this.translate.instant("lang.getFoldersSample"),cssClasses:["align_leftData"],icon:"fa-folder"},{value:"getResId",label:this.translate.instant("lang.getResId"),sample:this.translate.instant("lang.getResIdSample"),cssClasses:["align_leftData"],icon:"fa-envelope"},{value:"getBarcode",label:this.translate.instant("lang.getBarcode"),sample:this.translate.instant("lang.getBarcodeSample"),cssClasses:["align_leftData"],icon:"fa-barcode"},{value:"getRegisteredMailRecipient",label:this.translate.instant("lang.registeredMailRecipient"),sample:this.translate.instant("lang.registeredMailRecipientSample"),cssClasses:["align_leftData"],icon:"fa-user"},{value:"getRegisteredMailReference",label:this.translate.instant("lang.registeredMailReference"),sample:this.translate.instant("lang.registeredMailReferenceSample"),cssClasses:["align_leftData"],icon:"fa-hashtag"},{value:"getRegisteredMailIssuingSite",label:this.translate.instant("lang.issuingSite"),sample:this.translate.instant("lang.issuingSiteSample"),cssClasses:["align_leftData"],icon:"fas fa-warehouse"}],this.availableDataClone=[],this.displayedSecondaryData=[],this.displayedSecondaryDataClone=[],this.displayMode="label",this.dataControl=new X.i,this.listEvent=[{id:"detailDoc",value:"documentDetails"},{id:"eventVisaMail",value:"signatureBookAction"},{id:"eventProcessDoc",value:"processDocument"},{id:"eventViewDoc",value:"viewDoc"}],this.templateDisplayedSecondaryData=[2,3,4,5,6,7],this.selectedTemplateDisplayedSecondaryData=7,this.selectedTemplateDisplayedSecondaryDataClone=7,this.selectedListEvent=null,this.selectedListEventClone=null,this.processTool=[{id:"dashboard",icon:"fas fa-columns",label:this.translate.instant("lang.newsFeed")},{id:"history",icon:"fas fa-history",label:this.translate.instant("lang.history")},{id:"notes",icon:"fas fa-pen-square",label:this.translate.instant("lang.notesAlt")},{id:"attachments",icon:"fas fa-paperclip",label:this.translate.instant("lang.attachments")},{id:"linkedResources",icon:"fas fa-link",label:this.translate.instant("lang.links")},{id:"diffusionList",icon:"fas fa-share-alt",label:this.translate.instant("lang.diffusionList")},{id:"emails",icon:"fas fa-envelope",label:this.translate.instant("lang.mailsSentAlt")},{id:"visaCircuit",icon:"fas fa-list-ol",label:this.translate.instant("lang.visaWorkflow")},{id:"opinionCircuit",icon:"fas fa-comment-alt",label:this.translate.instant("lang.avis")},{id:"info",icon:"fas fa-info-circle",label:this.translate.instant("lang.informations")}],this.selectedProcessTool={defaultTab:null,canUpdateData:!1,canUpdateModel:!1,canUpdateDocuments:!1},this.selectedProcessToolClone=null,this.refreshBasketGroup=new n.o}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){yield this.initCustomFields(),this.filteredDataOptions=this.dataControl.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>this._filterData(t))),this.availableDataClone=JSON.parse(JSON.stringify(this.availableData)),this.displayedSecondaryData=[],this.selectedTemplateDisplayedSecondaryData=this.basketGroup.list_display.templateColumns,this.selectedTemplateDisplayedSecondaryDataClone=this.selectedTemplateDisplayedSecondaryData,this.basketGroup.list_display.subInfos.forEach(t=>{this.addData(t.value),this.displayedSecondaryData[this.displayedSecondaryData.length-1].cssClasses=t.cssClasses}),this.selectedListEvent=this.basketGroup.list_event,this.selectedListEventClone=this.selectedListEvent,"processDocument"===this.basketGroup.list_event?(this.selectedProcessTool.defaultTab=null===this.basketGroup.list_event_data?"dashboard":this.basketGroup.list_event_data.defaultTab,this.selectedProcessTool.canUpdateData=null!==this.basketGroup.list_event_data&&this.basketGroup.list_event_data.canUpdateData,this.selectedProcessTool.canUpdateModel=null!==this.basketGroup.list_event_data&&this.basketGroup.list_event_data.canUpdateModel):"signatureBookAction"===this.basketGroup.list_event&&(this.selectedProcessTool.canUpdateDocuments=null!==this.basketGroup.list_event_data&&this.basketGroup.list_event_data.canUpdateDocuments),this.selectedProcessToolClone=JSON.parse(JSON.stringify(this.selectedProcessTool)),this.displayedSecondaryDataClone=JSON.parse(JSON.stringify(this.displayedSecondaryData))}))}initCustomFields(){return new Promise((t,e)=>{this.http.get("../rest/customFields").pipe(Object(l.a)(t=>(t.customFields=t.customFields.map(t=>({value:"indexingCustomField_"+t.id,label:t.label,sample:this.translate.instant("lang.customField")+t.id,cssClasses:["align_leftData"],icon:"fa-hashtag"})),t.customFields)),Object(mt.a)(e=>{this.availableData=this.availableData.concat(e),t(!0)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()})}toggleData(){this.dataControl.disabled?this.dataControl.enable():this.dataControl.disable(),this.displayMode="label"===this.displayMode?"sample":"label"}setStyle(t,e){const i=e.split("_");2===i.length&&t.cssClasses.forEach((n,a)=>{n.includes(i[0])&&n!==e&&t.cssClasses.splice(a,1)});const n=t.cssClasses.indexOf(e);-1===n?t.cssClasses.push(e):t.cssClasses.splice(n,1)}addData(t){const e=this.availableData.map(t=>t.value).indexOf(t);this.displayedSecondaryData.push(this.availableData.filter(e=>e.value===t)[0]),this.availableData.splice(e,1),$("#availableData").blur(),this.dataControl.setValue("")}removeData(t,e){this.availableData.push(t),this.displayedSecondaryData.splice(e,1),this.dataControl.setValue("")}removeAllData(){this.displayedSecondaryData=this.displayedSecondaryData.concat(),this.availableData=this.availableData.concat(this.displayedSecondaryData),this.dataControl.setValue(""),this.displayedSecondaryData=[]}drop(t){t.previousContainer===t.container?Object(lo.h)(t.container.data,t.previousIndex,t.currentIndex):(Object(lo.i)(t.previousContainer.data,t.container.data,t.previousIndex,t.currentIndex-1),this.displayedSecondaryData.forEach((t,e)=>{t.length>this.selectedTemplateDisplayedSecondaryData?Object(lo.i)(t,this.displayedSecondaryData[e+1],t.length,0):t.length<this.selectedTemplateDisplayedSecondaryData&&!this.functions.empty(this.displayedSecondaryData[e+1])&&Object(lo.i)(this.displayedSecondaryData[e+1],t,0,t.length)}))}saveTemplate(){this.http.put("../rest/baskets/"+this.basketGroup.basket_id+"/groups/"+this.basketGroup.group_id,{list_display:{templateColumns:this.selectedTemplateDisplayedSecondaryData,subInfos:this.displayedSecondaryData},list_event:this.selectedListEvent,list_event_data:this.selectedProcessTool}).subscribe(()=>{this.displayedSecondaryDataClone=JSON.parse(JSON.stringify(this.displayedSecondaryData)),this.basketGroup.list_display=this.displayedSecondaryData,this.basketGroup.list_event=this.selectedListEvent,this.selectedListEventClone=this.selectedListEvent,this.basketGroup.list_event_data=this.selectedProcessTool,this.selectedProcessToolClone=JSON.parse(JSON.stringify(this.selectedProcessTool)),this.selectedTemplateDisplayedSecondaryDataClone=JSON.parse(JSON.stringify(this.selectedTemplateDisplayedSecondaryData)),this.notify.success(this.translate.instant("lang.modificationsProcessed")),this.refreshBasketGroup.emit(this.basketGroup)},t=>{this.notify.error(t.error.errors)})}_filterData(t){let e="";return"string"==typeof t?e=t.toLowerCase():null!==t&&(e=t.label.toLowerCase()),this.availableData.filter(t=>t.label.toLowerCase().includes(e))}checkModif(){return JSON.stringify(this.displayedSecondaryData)===JSON.stringify(this.displayedSecondaryDataClone)&&this.selectedListEvent===this.selectedListEventClone&&JSON.stringify(this.selectedProcessTool)===JSON.stringify(this.selectedProcessToolClone)&&JSON.stringify(this.selectedTemplateDisplayedSecondaryData)===JSON.stringify(this.selectedTemplateDisplayedSecondaryDataClone)}cancelModification(){this.displayedSecondaryData=JSON.parse(JSON.stringify(this.displayedSecondaryDataClone)),this.selectedListEvent=this.selectedListEventClone,this.selectedProcessTool=JSON.parse(JSON.stringify(this.selectedProcessToolClone)),this.availableData=JSON.parse(JSON.stringify(this.availableDataClone)),this.selectedTemplateDisplayedSecondaryData=JSON.parse(JSON.stringify(this.selectedTemplateDisplayedSecondaryDataClone)),this.dataControl.setValue("")}hasFolder(){return this.displayedSecondaryData.map(t=>t.value).indexOf("getFolders")>-1}changeEventList(t){this.selectedProcessTool="processDocument"===t.value?{defaultTab:"dashboard"}:{}}toggleCanUpdate(t){t||(this.selectedProcessTool.canUpdateModel=t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["list-administration"]],inputs:{basketGroup:["currentBasketGroup","basketGroup"]},outputs:{refreshBasketGroup:"refreshBasketGroup"},decls:59,vars:56,consts:[["appearance","outline",1,"eventList"],[3,"ngModel","ngModelChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["class","formType ratio-2 col-sm-12",4,"ngIf"],[1,"editorTool"],["color","primary","mat-icon-button","",3,"title","click",4,"ngIf"],["color","primary","mat-button","",3,"title","matMenuTriggerFor"],[1,"fas","fa-columns"],["menu","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],[1,"area"],["appearance","outline","floatLabel","never"],["id","availableData","name","availableData","type","text","matInput","",3,"formControl","placeholder","matAutocomplete"],[3,"optionSelected"],["auto","matAutocomplete"],["class","dataList",3,"value",4,"ngFor","ngForOf"],["color","warn","mat-button","",2,"float","right",3,"disabled","click"],["dnd-sortable-container","","style","border: solid 1px #F9983066;border-radius: 4px;",3,"dropZones","sortableData",4,"ngIf"],[1,"resultRow","newRow"],["class","resultCol",3,"class",4,"ngFor","ngForOf"],["multiple","",1,"actions"],["color","primary","mat-icon-button","",3,"title","disabled"],["fontSet","fas","matBadge","2","fontIcon","fa-comments fa-2x",3,"matBadgeHidden"],["fontSet","fas","matBadge","7","fontIcon","fa-paperclip fa-2x",3,"matBadgeHidden"],["fontSet","fas","fontIcon","fa-sitemap fa-2x"],["fontSet","fas","fontIcon","fa-info-circle fa-2x"],["class","folder-info",4,"ngFor","ngForOf"],[1,"row"],[1,"col-md-12","text-center",2,"margin-top","30px"],["color","primary","mat-raised-button","",3,"disabled","click"],["color","default","mat-raised-button","",3,"disabled","click"],[3,"value"],[1,"formType","ratio-2","col-sm-12"],[1,"formType-title"],[3,"ngModel","ngModelChange"],[2,"padding","10px"],["color","primary",3,"ngModel","ngModelChange","change"],["color","primary",3,"ngModel","disabled","ngModelChange"],["color","primary",3,"ngModel","ngModelChange"],["color","primary","mat-icon-button","",3,"title","click"],["fontSet","fas","fontIcon","fa-eye"],["fontSet","fas","fontIcon","fa-edit"],["mat-menu-item","",3,"click"],[1,"dataList",3,"value"],[1,"optionContent"],[1,"dataIcon"],["color","primary"],[1,"dataLabel"],["dnd-sortable-container","",2,"border","solid 1px #F9983066","border-radius","4px",3,"dropZones","sortableData"],[4,"ngFor","ngForOf"],["class","example-box","dnd-sortable","",3,"sortableIndex",4,"ngIf"],["dnd-sortable","",1,"example-box",3,"sortableIndex"],["color","primary","mat-icon-button","",3,"matMenuTriggerFor",4,"ngIf"],["color","warn","fontSet","fas","fontIcon","fa-trash fa-2x",1,"secondaryInformations_icon"],["fontSet","fas","fontIcon","fa-bold fa-2x",1,"secondaryInformations_icon"],["fontSet","fas","fontIcon","fa-align-left fa-2x",1,"secondaryInformations_icon"],["fontSet","fas","fontIcon","fa-align-center fa-2x",1,"secondaryInformations_icon"],["fontSet","fas","fontIcon","fa-align-right fa-2x",1,"secondaryInformations_icon"],["fontSet","fas","fontIcon","fa-text-height fa-2x",1,"secondaryInformations_icon"],[2,"width","100%"],[1,"secondaryInformations_label",3,"innerHTML"],["color","primary","mat-icon-button","",3,"matMenuTriggerFor"],["fontSet","fas","fontIcon","fa-ellipsis-v fa-2x"],[1,"resultCol"],[4,"ngIf"],["color","primary","class","fm fm-letter fm-2x",4,"ngIf"],["color","warn","class","fm fm-letter-status-inprogress fm-2x",4,"ngIf"],[1,"resultCol_chrono"],["color","primary",1,"fm","fm-letter","fm-2x"],["color","warn",1,"fm","fm-letter-status-inprogress","fm-2x"],[1,"folder-info"],[1,"badge","badge-folder"],[1,"fa","fa-folder"]],template:function(t,e){if(1&t&&(n.Wb(0,"mat-form-field",0),n.Wb(1,"mat-label"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-select",1),n.dc("ngModelChange",(function(t){return e.selectedListEvent=t}))("selectionChange",(function(t){return e.changeEventList(t)})),n.Oc(5,rB,3,4,"mat-option",2),n.Vb(),n.Vb(),n.Oc(6,lB,19,20,"div",3),n.Oc(7,dB,8,7,"div",3),n.Rb(8,"hr"),n.Wb(9,"mat-toolbar",4),n.Wb(10,"span"),n.Oc(11,hB,3,3,"button",5),n.Oc(12,uB,3,3,"button",5),n.Wb(13,"button",6),n.ic(14,"translate"),n.Qc(15),n.Rb(16,"i",7),n.Vb(),n.Wb(17,"mat-menu",null,8),n.Oc(19,pB,3,4,"button",9),n.Vb(),n.Vb(),n.Wb(20,"span",10),n.Wb(21,"form"),n.Wb(22,"mat-form-field",11),n.Rb(23,"input",12),n.ic(24,"translate"),n.Wb(25,"mat-autocomplete",13,14),n.dc("optionSelected",(function(t){return e.addData(t.option.value)})),n.Oc(27,bB,6,5,"mat-option",15),n.ic(28,"async"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(29,"span"),n.Wb(30,"button",16),n.dc("click",(function(){return e.removeAllData()})),n.Qc(31),n.ic(32,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(33,"mat-card"),n.Oc(34,_B,3,7,"div",17),n.Wb(35,"div",18),n.Oc(36,DB,3,4,"span",19),n.Wb(37,"mat-button-toggle-group",20),n.Wb(38,"button",21),n.ic(39,"translate"),n.Rb(40,"mat-icon",22),n.Vb(),n.Wb(41,"button",21),n.ic(42,"translate"),n.Rb(43,"mat-icon",23),n.Vb(),n.Wb(44,"button",21),n.ic(45,"translate"),n.Rb(46,"mat-icon",24),n.Vb(),n.Wb(47,"button",21),n.ic(48,"translate"),n.Rb(49,"mat-icon",25),n.Vb(),n.Vb(),n.Vb(),n.Oc(50,kB,2,1,"div",26),n.Vb(),n.Wb(51,"div",27),n.Wb(52,"div",28),n.Wb(53,"button",29),n.dc("click",(function(){return e.saveTemplate()})),n.Qc(54),n.ic(55,"translate"),n.Vb(),n.Wb(56,"button",30),n.dc("click",(function(){return e.cancelModification()})),n.Qc(57),n.ic(58,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.zc(18),i=n.zc(26);n.Db(2),n.Rc(n.jc(3,34,"lang.eventList")),n.Db(2),n.oc("ngModel",e.selectedListEvent),n.Db(1),n.oc("ngForOf",e.listEvent),n.Db(1),n.oc("ngIf","processDocument"===e.selectedListEvent),n.Db(1),n.oc("ngIf","signatureBookAction"===e.selectedListEvent),n.Db(4),n.oc("ngIf","label"==e.displayMode),n.Db(1),n.oc("ngIf","sample"==e.displayMode),n.Db(1),n.oc("title",n.jc(14,36,"lang.templateUsed"))("matMenuTriggerFor",t),n.Db(2),n.Sc(" ",e.selectedTemplateDisplayedSecondaryData," "),n.Db(4),n.oc("ngForOf",e.templateDisplayedSecondaryData),n.Db(4),n.pc("placeholder",n.jc(24,38,"lang.availableDatas")),n.oc("formControl",e.dataControl)("matAutocomplete",i),n.Db(4),n.oc("ngForOf",n.jc(28,40,e.filteredDataOptions)),n.Db(3),n.oc("disabled","sample"==e.displayMode),n.Db(1),n.Sc(" ",n.jc(32,42,"lang.eraseAll")," "),n.Db(3),n.oc("ngIf",e.displayedSecondaryData.length>0),n.Db(2),n.oc("ngForOf",e.displayedMainData),n.Db(2),n.pc("title",n.jc(39,44,"lang.notes")),n.oc("disabled","label"==e.displayMode),n.Db(2),n.oc("matBadgeHidden","label"==e.displayMode),n.Db(1),n.pc("title",n.jc(42,46,"lang.attachments")),n.oc("disabled","label"==e.displayMode),n.Db(2),n.oc("matBadgeHidden","label"==e.displayMode),n.Db(1),n.pc("title",n.jc(45,48,"lang.diffusionList")),n.oc("disabled","label"==e.displayMode),n.Db(3),n.pc("title",n.jc(48,50,"lang.linkDetails")),n.oc("disabled","label"==e.displayMode),n.Db(3),n.oc("ngForOf",e.displayedSecondaryData),n.Db(3),n.oc("disabled",e.checkModif()),n.Db(1),n.Sc(" ",n.jc(55,52,"lang.validate")," "),n.Db(2),n.oc("disabled",e.checkModif()),n.Db(1),n.Sc(" ",n.jc(58,54,"lang.cancel")," ")}},directives:[Y.c,Y.g,ee.a,X.u,X.x,P.s,P.t,M.a,k.b,ne.d,ne.e,X.K,X.v,X.w,J.b,X.d,Ne.d,X.j,Ne.a,K.a,og.b,S.a,wt.a,W.p,te.a,ne.b,Ee.f,Ee.e,T.a],pipes:[g.d,P.b,Wt.a],styles:[".availableData[_ngcontent-%COMP%]{margin:10px;display:flex}.secondaryInformations[_ngcontent-%COMP%]{font-size:10px;height:30px;color:#666}.secondaryInformations_icon[_ngcontent-%COMP%]{height:auto}.secondaryInformations_label[_ngcontent-%COMP%]{width:100%}.resultRow[_ngcontent-%COMP%]{align-items:center;display:flex;padding:5px}.resultRow-mobile[_ngcontent-%COMP%]{font-size:80%}.resultCol[_ngcontent-%COMP%]{flex:1;overflow:hidden;text-overflow:ellipsis}.resultCol-mobile[_ngcontent-%COMP%]{overflow:inherit;text-overflow:inherit;word-break:break-all}.resultCol_chrono[_ngcontent-%COMP%]{color:rgba(0,0,0,.4);font-size:90%}.actions[_ngcontent-%COMP%]{text-align:right;box-shadow:none;border:none;flex:1;justify-content:flex-end;overflow:inherit}.elemToDrag[_ngcontent-%COMP%]{flex:1;border:1px dashed;padding:10px;height:10px;line-height:0;cursor:move;margin-right:5px;margin-left:5px}.columns[_ngcontent-%COMP%]{width:100%;height:90px;padding:20px 10px;border-bottom:1px solid #ccc;color:rgba(0,0,0,.87);display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;background:#fff;font-size:14px}.mat-badge-content[_ngcontent-%COMP%]{background:#f99830}.example-list[_ngcontent-%COMP%]{display:grid;gap:10px;height:auto;max-width:100%;font-size:10px;background:#f5f5f5}.example-box[_ngcontent-%COMP%]{color:#666;display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;cursor:move;background:#f5f5f5;flex-grow:1;flex-basis:0;height:20px}.cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.example-box[_ngcontent-%COMP%]:last-child{border:none}.example-list.cdk-drop-list-dragging[_ngcontent-%COMP%] .example-box[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.editorTool[_ngcontent-%COMP%]{display:flex;height:44px;font-size:10px;margin-bottom:30px}.editorTool[_ngcontent-%COMP%] .area[_ngcontent-%COMP%]{flex:1}.editorTool[_ngcontent-%COMP%] .area[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{width:100%}.editorTool[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{border-left:1px solid #666;height:70%;margin-left:10px;margin-right:10px}.editorTool[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{height:35px}.editorTool[_ngcontent-%COMP%] .mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline{background:inherit}.editorTool[_ngcontent-%COMP%] .mat-form-field-outline{background:#fff}.optionContent[_ngcontent-%COMP%]{display:flex!important}.optionContent[_ngcontent-%COMP%] .dataIcon[_ngcontent-%COMP%]{width:30px}.optionContent[_ngcontent-%COMP%] .dataIcon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:14px}.optionContent[_ngcontent-%COMP%] .dataLabel[_ngcontent-%COMP%]{flex:1}.isSelectedMenu[_ngcontent-%COMP%]{background:rgba(249,152,48,.14)}.align_leftData[_ngcontent-%COMP%]{text-align:left}.align_centerData[_ngcontent-%COMP%]{text-align:center}.align_rightData[_ngcontent-%COMP%]{text-align:right}.boldFontData[_ngcontent-%COMP%]{font-weight:700}.bigFontData[_ngcontent-%COMP%]{font-size:14px}.smallFontData[_ngcontent-%COMP%]{font-size:10px}.normalData[_ngcontent-%COMP%]{flex:1}.longData[_ngcontent-%COMP%]{flex:3}.eventList[_ngcontent-%COMP%]{padding-top:10px}.badge-folder[_ngcontent-%COMP%]{cursor:default;background:#135f7f;margin:5px;font-size:8px;max-width:250px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.formType[_ngcontent-%COMP%]{align-items:center;margin-bottom:10px;border-radius:4px;border:1px solid #ccc;position:relative;padding:10px}.formType-title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:-7px;left:10px;padding:0;margin:0;color:#135f7f}"]}),t})();const IB=["snav2"],PB=["adminMenuTemplate"],VB=function(t){return{opacity:t}};function RB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",13),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",20),n.dc("click",(function(){return n.Dc(t),n.hc(2).linkGroup()})),n.Rb(5,"mat-icon",21),n.Wb(6,"p",22),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Rb(9,"mat-divider"),n.Wb(10,"a",23),n.ic(11,"translate"),n.Wb(12,"mat-icon",24),n.Wb(13,"mat-slide-toggle",25),n.dc("change",(function(){n.Dc(t);const e=n.hc(2);return e.toggleIsSearchBasket(e.basket),!1})),n.Vb(),n.Vb(),n.Wb(14,"p",26),n.dc("click",(function(){n.Dc(t);const e=n.hc(2);return e.toggleIsSearchBasket(e.basket),!1})),n.Qc(15),n.ic(16,"translate"),n.Vb(),n.Vb(),n.Wb(17,"a",23),n.ic(18,"translate"),n.Wb(19,"mat-icon",24),n.Wb(20,"mat-slide-toggle",25),n.dc("change",(function(){n.Dc(t);const e=n.hc(2);return e.toggleFlagNotif(e.basket),!1})),n.Vb(),n.Vb(),n.Wb(21,"p",26),n.dc("click",(function(){n.Dc(t);const e=n.hc(2);return e.toggleFlagNotif(e.basket),!1})),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(2),n.Rc(n.jc(3,10,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,12,"lang.linkGroup")," "),n.Db(3),n.pc("matTooltip",n.jc(11,14,"lang.isSearchBasketInfo")),n.Db(3),n.oc("checked",t.basket.isSearchBasket),n.Db(1),n.oc("ngStyle",n.vc(22,VB,t.basket.isSearchBasket?"":"0.3")),n.Db(1),n.Sc(" ",n.jc(16,16,"lang.isSearchBasket")," "),n.Db(2),n.pc("matTooltip",n.jc(18,18,"lang.basketNotification")),n.Db(3),n.oc("checked",t.basket.flagNotif),n.Db(1),n.oc("ngStyle",n.vc(24,VB,t.basket.flagNotif?"":"0.3")),n.Db(1),n.Sc(" ",n.jc(23,20,"lang.activateNotification")," ")}}function jB(t,e){if(1&t&&n.Oc(0,RB,24,26,"mat-nav-list",19),2&t){const t=n.hc();n.oc("ngIf",!t.creationMode)}}function AB(t,e){1&t&&(n.Wb(0,"div",27),n.Rb(1,"mat-spinner",28),n.Vb())}function WB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"input",49),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).basket.id=e}))("blur",(function(){return n.Dc(t),n.hc(2).isAvailable()})),n.ic(1,"translate"),n.Vb()}if(2&t){const t=n.hc(2);n.pc("placeholder",n.jc(1,2,"lang.id")),n.oc("ngModel",t.basket.id)}}function TB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"input",50),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).basket.id=e})),n.ic(1,"translate"),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(2);n.pc("placeholder",n.jc(1,3,"lang.id")),n.pc("title",n.jc(2,5,"lang.id")),n.oc("ngModel",t.basket.id)}}function EB(t,e){if(1&t&&(n.Wb(0,"mat-option",58),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(3);n.oc("value",t),n.Db(1),n.Sc(" ",i.langVarName[i.orderColumns.indexOf(t)],"")}}function FB(t,e){if(1&t&&(n.Wb(0,"mat-option",58),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(3);n.oc("value",t),n.Db(1),n.Sc(" ",i.langOrderName[i.orderByColumns.indexOf(t)],"")}}function LB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",59),n.dc("click",(function(){return n.Dc(t),n.hc(3).addLine()})),n.Rb(1,"mat-icon",60),n.Vb()}if(2&t){const t=n.hc(3);n.oc("disabled",2==t.orderColumnsSelected.length)}}function QB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",36),n.Wb(1,"div",51),n.Wb(2,"mat-form-field"),n.Wb(3,"mat-select",52),n.dc("ngModelChange",(function(i){n.Dc(t);const a=e.index;return n.hc(2).orderColumnsSelected[a].column=i})),n.ic(4,"translate"),n.Oc(5,EB,2,2,"mat-option",53),n.Vb(),n.Vb(),n.Vb(),n.Wb(6,"div",51),n.Wb(7,"mat-form-field"),n.Wb(8,"mat-select",52),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.order=i})),n.ic(9,"translate"),n.Oc(10,FB,2,2,"mat-option",53),n.Vb(),n.Vb(),n.Vb(),n.Wb(11,"div",54),n.Wb(12,"button",55),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc(2).removeLine(i)})),n.Rb(13,"mat-icon",56),n.Vb(),n.Oc(14,LB,2,1,"button",57),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=e.index,a=n.hc(2);n.Db(3),n.rc("placeholder","",n.jc(4,11,"lang.defaultSort")," ",i+1,""),n.qc("name","basket_res_order",i,""),n.oc("ngModel",a.orderColumnsSelected[i].column),n.Db(2),n.oc("ngForOf",a.orderColumns),n.Db(3),n.pc("placeholder",n.jc(9,13,"lang.orderBy")),n.qc("name","order_by_select",i,""),n.oc("ngModel",t.order),n.Db(2),n.oc("ngForOf",a.orderByColumns),n.Db(2),n.oc("disabled",1==a.orderColumnsSelected.length),n.Db(2),n.oc("ngIf",a.orderColumnsSelected.length==i+1)}}function NB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span"),n.Qc(1),n.Vb(),n.Wb(2,"mat-icon",62),n.dc("click",(function(){n.Dc(t);const e=n.hc().index;return n.hc(2).unlinkGroup(e)})),n.ic(3,"translate"),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(1),n.Rc(t.group_desc),n.Db(1),n.pc("matTooltip",n.jc(3,2,"lang.unlinkGroup"))}}function zB(t,e){1&t&&(n.Wb(0,"small"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("(",n.jc(2,1,"lang.default"),")"))}function BB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-icon",85),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.ic(1,"translate"),n.Vb()}2&t&&n.pc("matTooltip",n.jc(1,1,"lang.delete"))}const UB=function(t){return{"font-weight":t}};function $B(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",81),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit,i=n.hc(2).$implicit;return n.hc(2).openSettings(i,e)}))("removed",(function(){n.Dc(t);const e=n.hc().$implicit,i=n.hc(2).$implicit;return n.hc(2).unlinkAction(i,e)})),n.Qc(1," \xa0 "),n.Wb(2,"span"),n.Qc(3),n.Vb(),n.Qc(4,"\xa0 "),n.Oc(5,zB,3,3,"small",19),n.Rb(6,"span",82),n.Wb(7,"button",83),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc(2).$implicit,s=n.hc(2);return e.stopPropagation(),s.setDefaultAction(a,i)})),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Oc(10,BB,2,3,"mat-icon",84),n.Vb()}if(2&t){const t=n.hc().$implicit;n.qc("matTooltip","id : ",t.id,""),n.oc("ngStyle",n.vc(9,UB,1==t.default_action_list?"bold":"")),n.Db(3),n.Rc(t.label_action),n.Db(2),n.oc("ngIf",1==t.default_action_list),n.Db(2),n.oc("disabled",t.default_action_list),n.Db(1),n.Rc(n.jc(9,7,"lang.setByDefault")),n.Db(2),n.oc("ngIf",1!=t.default_action_list)}}function HB(t,e){if(1&t&&(n.Wb(0,"span",79),n.Oc(1,$B,11,11,"mat-chip",80),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",1==t.checked)}}function GB(t,e){1&t&&n.Rb(0,"mat-header-cell")}function XB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",86),n.Wb(1,"mat-checkbox",87),n.dc("change",(function(){n.Dc(t);const e=n.hc(2).$implicit;return n.hc(2).addAction(e)}))("ngModelChange",(function(i){return n.Dc(t),e.$implicit.checked=i})),n.Wb(2,"span"),n.Qc(3),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.qc("matTooltip","id : ",t.id,""),n.Db(1),n.oc("disabled",1==t.default_action_list)("ngModel",t.checked),n.Db(2),n.Rc(t.label_action)}}function qB(t,e){1&t&&n.Rb(0,"mat-header-cell")}function KB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",88),n.Wb(1,"button",89),n.Rb(2,"mat-icon",90),n.Vb(),n.Wb(3,"mat-menu",null,91),n.Wb(5,"button",92),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc(2).$implicit;return n.hc(2).setDefaultAction(a,i)})),n.Rb(6,"mat-icon",93),n.Wb(7,"span"),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Vb(),n.Wb(10,"button",94),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc(2).$implicit;return n.hc(2).openSettings(a,i)})),n.Rb(11,"mat-icon",95),n.Wb(12,"span"),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.zc(4);n.qc("matTooltip","id : ",t.id,""),n.Db(1),n.oc("matMenuTriggerFor",i)("disabled",!t.checked),n.Db(4),n.oc("disabled",1==t.default_action_list),n.Db(3),n.Rc(n.jc(9,6,"lang.defaultAction")),n.Db(5),n.Rc(n.jc(14,8,"lang.moreOptions"))}}function YB(t,e){1&t&&n.Rb(0,"mat-row")}function JB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab-group"),n.Wb(1,"mat-tab",31),n.ic(2,"translate"),n.Wb(3,"div",63),n.Wb(4,"h5"),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Wb(7,"mat-chip-list",64,65),n.Oc(9,HB,2,1,"span",66),n.ic(10,"sortBy"),n.Vb(),n.Vb(),n.Wb(11,"div",63),n.Wb(12,"mat-accordion",67),n.Wb(13,"mat-expansion-panel",68),n.dc("opened",(function(){n.Dc(t);const e=n.hc().index;return n.hc(2).initAction(e)})),n.Wb(14,"mat-expansion-panel-header"),n.Wb(15,"mat-panel-title"),n.Qc(16),n.ic(17,"translate"),n.Vb(),n.Vb(),n.Wb(18,"div"),n.Wb(19,"mat-form-field"),n.Wb(20,"input",69),n.dc("keyup",(function(e){return n.Dc(t),n.hc(3).applyFilter(e.target.value)})),n.ic(21,"translate"),n.Vb(),n.Vb(),n.Wb(22,"mat-table",70,71),n.Ub(24,72),n.Oc(25,GB,1,0,"mat-header-cell",73),n.Oc(26,XB,4,4,"mat-cell",74),n.Tb(),n.Ub(27,75),n.Oc(28,qB,1,0,"mat-header-cell",73),n.Oc(29,KB,15,10,"mat-cell",76),n.Tb(),n.Oc(30,YB,1,0,"mat-row",77),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(31,"mat-tab",31),n.ic(32,"translate"),n.Wb(33,"list-administration",78),n.dc("refreshBasketGroup",(function(e){n.Dc(t);const i=n.hc().$implicit;return n.hc(2).updateGroupInfo(i,e)})),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(1),n.pc("label",n.jc(2,9,"lang.actions")),n.Db(4),n.Rc(n.jc(6,11,"lang.actionChosen")),n.Db(4),n.oc("ngForOf",n.kc(10,13,t.groupActions,"label_action")),n.Db(7),n.Sc(" ",n.jc(17,16,"lang.actionAvailable")," "),n.Db(4),n.pc("placeholder",n.jc(21,18,"lang.filterBy")),n.Db(2),n.oc("dataSource",e.dataSource),n.Db(8),n.oc("matRowDefColumns",e.displayedColumns),n.Db(1),n.pc("label",n.jc(32,20,"lang.resultPage")),n.Db(2),n.oc("currentBasketGroup",t)}}function ZB(t,e){if(1&t&&(n.Wb(0,"mat-tab",31),n.Oc(1,NB,4,4,"ng-template",61),n.Oc(2,JB,34,22,"mat-tab-group",19),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.pc("label",t.group_desc),n.Db(2),n.oc("ngIf",i.selectedIndex>0)}}const tU=function(t){return{color:t}};function eU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",29),n.Wb(1,"mat-tab-group",30),n.dc("selectedIndexChange",(function(e){return n.Dc(t),n.hc().selectedIndex=e})),n.Wb(2,"mat-tab",31),n.ic(3,"translate"),n.Wb(4,"form",32,33),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Wb(6,"mat-form-field"),n.Oc(7,WB,2,4,"input",34),n.Oc(8,TB,3,7,"input",35),n.Vb(),n.Wb(9,"div",36),n.Wb(10,"div",37),n.Wb(11,"mat-form-field"),n.Wb(12,"input",38),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().basket.basket_name=e})),n.ic(13,"translate"),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(15,"div",39),n.Wb(16,"mat-form-field"),n.Wb(17,"input",40),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().basket.color=e})),n.ic(18,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(19,"mat-form-field"),n.Wb(20,"input",41),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().basket.basket_desc=e})),n.ic(21,"translate"),n.ic(22,"translate"),n.Vb(),n.Vb(),n.Wb(23,"mat-form-field"),n.Wb(24,"textarea",42),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().basket.clause=e})),n.ic(25,"translate"),n.ic(26,"translate"),n.Vb(),n.Wb(27,"mat-icon",43),n.dc("click",(function(){return n.Dc(t),n.hc(),n.zc(16).toggle()})),n.ic(28,"translate"),n.Vb(),n.Vb(),n.Wb(29,"div",44),n.Oc(30,QB,15,15,"div",45),n.Vb(),n.Wb(31,"div",46),n.Wb(32,"button",47),n.Qc(33),n.ic(34,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Oc(35,ZB,3,2,"mat-tab",48),n.Vb(),n.Vb()}if(2&t){const t=n.zc(5),e=n.hc();n.Db(1),n.oc("selectedIndex",e.selectedIndex),n.Db(1),n.pc("label",n.jc(3,21,"lang.informations")),n.Db(5),n.oc("ngIf",e.creationMode),n.Db(1),n.oc("ngIf",!e.creationMode),n.Db(4),n.pc("title",n.jc(13,23,"lang.label")),n.pc("placeholder",n.jc(14,25,"lang.label")),n.oc("ngModel",e.basket.basket_name)("ngStyle",n.vc(41,tU,e.basket.color)),n.Db(5),n.pc("matTooltip",n.jc(18,27,"lang.chooseColor")),n.oc("ngModel",e.basket.color),n.Db(3),n.pc("title",n.jc(21,29,"lang.description")),n.pc("placeholder",n.jc(22,31,"lang.description")),n.oc("ngModel",e.basket.basket_desc),n.Db(4),n.pc("title",n.jc(25,33,"lang.clause")),n.pc("placeholder",n.jc(26,35,"lang.clause")),n.oc("ngModel",e.basket.clause),n.Db(3),n.pc("matTooltip",n.jc(28,37,"lang.keywordHelper")),n.Db(3),n.oc("ngForOf",e.orderColumnsSelected),n.Db(2),n.oc("disabled",!t.form.valid||0==e.orderColumnsSelected.length),n.Db(1),n.Rc(n.jc(34,39,"lang.save")),n.Db(2),n.oc("ngForOf",e.basketGroups)}}const iU=["statusInput"];function nU(t,e){1&t&&(n.Qc(0),n.ic(1,"translate")),2&t&&n.Sc(" ",n.jc(1,1,"lang.redirects")," ")}function aU(t,e){1&t&&n.Oc(0,nU,2,3,"ng-template",21)}function sU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-expansion-panel",17),n.dc("opened",(function(){return n.Dc(t),n.hc(2).initService2()})),n.Wb(1,"mat-expansion-panel-header"),n.Wb(2,"mat-panel-title"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb(),n.Wb(5,"mat-form-field"),n.Rb(6,"input",22),n.ic(7,"translate"),n.Vb(),n.Rb(8,"div",23),n.Vb()}2&t&&(n.Db(3),n.Sc(" ",n.jc(4,2,"lang.toUsersEntities")," "),n.Db(3),n.pc("placeholder",n.jc(7,4,"lang.searchEntities")))}function oU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab"),n.Oc(1,aU,1,0,void 0,7),n.Wb(2,"mat-accordion"),n.Wb(3,"mat-expansion-panel",17),n.dc("opened",(function(){return n.Dc(t),n.hc().initService()})),n.Wb(4,"mat-expansion-panel-header"),n.Wb(5,"mat-panel-title"),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Vb(),n.Wb(8,"mat-form-field"),n.Rb(9,"input",18),n.ic(10,"translate"),n.Vb(),n.Rb(11,"div",19),n.Vb(),n.Oc(12,sU,9,6,"mat-expansion-panel",20),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(1),n.oc("ngIf","redirect"==t.data.action.keyword),n.Db(5),n.Sc(" ",n.jc(7,4,"lang.toEntities")," "),n.Db(3),n.pc("placeholder",n.jc(10,6,"lang.searchEntities")),n.Db(3),n.oc("ngIf","redirect"==t.data.action.keyword)}}function rU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item",4),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc().validateForm(e)})),n.Qc(1),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(1),n.Sc(" ",t.group_desc," ")}}function cU(t,e){if(1&t&&(n.Wb(0,"span"),n.Oc(1,rU,2,1,"mat-list-item",3),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",0==t.isUsed)}}let lU=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this.translate=t,this.http=e,this.route=i,this.router=n,this.notify=a,this.dialog=s,this.headerService=o,this.appService=r,this.viewContainerRef=c,this.selectedIndex=0,this.loading=!1,this.config={},this.basket={},this.basketClone={},this.basketGroups=[],this.allGroups=[],this.actionsList=[],this.list_display=[],this.displayedColumns=["label_action","actions"],this.orderColumns=["alt_identifier","creation_date","process_limit_date","res_id","priority"],this.orderByColumns=["asc","desc"],this.langVarName=[this.translate.instant("lang.chrono"),this.translate.instant("lang.creationDate"),this.translate.instant("lang.processLimitDate"),this.translate.instant("lang.id"),this.translate.instant("lang.priority")],this.langOrderName=[this.translate.instant("lang.ascending"),this.translate.instant("lang.descending")],this.orderColumnsSelected=[{column:"res_id",order:"asc"}]}applyFilter(t){t=(t=t.trim()).toLowerCase(),this.dataSource.filter=t}ngOnInit(){this.loading=!0,this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.route.params.subscribe(t=>{void 0===t.id?(this.headerService.setHeader(this.translate.instant("lang.basketCreation")),this.creationMode=!0,this.basketIdAvailable=!1,this.loading=!1):(this.orderColumnsSelected=[],this.creationMode=!1,this.basketIdAvailable=!0,this.id=t.id,this.http.get("../rest/baskets/"+this.id).subscribe(t=>{if(this.headerService.setHeader(this.translate.instant("lang.basketModification"),t.basket.basket_name),this.basket=t.basket,this.basket.id=t.basket.basket_id,this.basket.name=t.basket.basket_name,this.basket.description=t.basket.basket_desc,this.basket.clause=t.basket.basket_clause,this.basket.isSearchBasket="Y"!==t.basket.is_visible,this.basket.flagNotif="Y"===t.basket.flag_notif,""===this.basket.basket_res_order||null==this.basket.basket_res_order)this.orderColumnsSelected=[];else{const t=this.basket.basket_res_order.split(", ");for(let e=0;e<t.length;e++){const i=t[e].split(" ");i[1]||(i[1]="desc"),this.orderColumnsSelected.push({column:i[0],order:i[1]})}}this.basketClone=JSON.parse(JSON.stringify(this.basket)),this.http.get("../rest/baskets/"+this.id+"/groups").subscribe(t=>{this.allGroups=t.allGroups,this.allGroups.forEach(e=>{e.isUsed=!1,t.groups.forEach(t=>{e.group_id===t.group_id&&(e.isUsed=!0)})}),t.groups.forEach(t=>{t.groupActions.forEach(t=>{t.used_in_basketlist="Y"===t.used_in_basketlist,t.used_in_action_page="Y"===t.used_in_action_page,t.default_action_list="Y"===t.default_action_list})}),this.basketGroups=t.groups,this.loading=!1},t=>{this.notify.handleErrors(t)})},t=>{this.notify.handleErrors(t)}))})}openSettings(t,e){this.config={panelClass:"maarch-modal",data:{group:t,action:e}},this.dialogRef=this.dialog.open(dU,this.config),this.dialogRef.afterClosed().subscribe(i=>{i&&this.http.put("../rest/baskets/"+this.id+"/groups/"+i.group.group_id+"/actions",{groupActions:i.group.groupActions}).subscribe(()=>{this.dialogRef=null,this.notify.success(this.translate.instant("lang.basketUpdated"))},i=>{this.dialogRef=null,this.openSettings(t,e),this.notify.error(i.error.errors)})})}isAvailable(){this.basket.id?this.http.get("../rest/baskets/"+this.basket.id).subscribe(()=>{this.basketIdAvailable=!1},t=>{this.basketIdAvailable=!1,t.error.errors===this.translate.instant("lang.basketNotFound")&&(this.basketIdAvailable=!0)}):this.basketIdAvailable=!1}onSubmit(){if(null!==this.orderColumnsSelected&&this.orderColumnsSelected.length>0){const t=[];for(let e=0;e<this.orderColumnsSelected.length;e++)t[e]=this.orderColumnsSelected[e].column+" "+this.orderColumnsSelected[e].order;this.basket.basket_res_order=t.join(", ")}else this.basket.basket_res_order="";this.creationMode?this.http.post("../rest/baskets",this.basket).subscribe(()=>{this.notify.success(this.translate.instant("lang.basketAdded")),this.router.navigate(["/administration/baskets/"+this.basket.id])},t=>{this.notify.error(t.error.errors)}):this.http.put("../rest/baskets/"+this.id,this.basket).subscribe(()=>{this.notify.success(this.translate.instant("lang.basketUpdated")),this.router.navigate(["/administration/baskets"])},t=>{this.notify.error(t.error.errors)})}addLine(){this.orderColumnsSelected.push(JSON.parse(JSON.stringify(this.orderColumnsSelected[0])))}removeLine(t){this.orderColumnsSelected.splice(t,1)}initAction(t){this.dataSource=new vt.p(this.basketGroups[t].groupActions),this.dataSource.sort=this.sort}setDefaultAction(t,e){t.groupActions.forEach(t=>{t.default_action_list=t.id===e.id}),this.addAction(t)}unlinkGroup(t){confirm(this.translate.instant("lang.unlinkGroup")+" ?")&&this.http.delete("../rest/baskets/"+this.id+"/groups/"+this.basketGroups[t].group_id).subscribe(()=>{this.allGroups.forEach(e=>{e.group_id===this.basketGroups[t].group_id&&(e.isUsed=!1)}),this.basketGroups.splice(t,1),this.notify.success(this.translate.instant("lang.basketUpdated")),this.selectedIndex=0},t=>{this.notify.error(t.error.errors)})}linkGroup(){this.config={panelClass:"maarch-modal",data:{basketId:this.basket.id,groups:this.allGroups,linkedGroups:this.basketGroups}},this.dialogRef=this.dialog.open(hU,this.config),this.dialogRef.afterClosed().subscribe(t=>{t&&(t.list_display=this.basketGroups.length>0?this.basketGroups[this.basketGroups.length-1].list_display:{subInfos:[],templateColumns:0},this.http.post("../rest/baskets/"+this.id+"/groups",t).subscribe(()=>{this.basketGroups.push(t),this.allGroups.forEach(e=>{e.group_id===t.group_id&&(e.isUsed=!0)}),this.notify.success(this.translate.instant("lang.basketUpdated")),this.selectedIndex=this.basketGroups.length},t=>{this.notify.error(t.error.errors)})),this.dialogRef=null})}addAction(t){this.http.put("../rest/baskets/"+this.id+"/groups/"+t.group_id+"/actions",{groupActions:t.groupActions}).subscribe(()=>{this.notify.success(this.translate.instant("lang.actionsGroupBasketUpdated"))},t=>{this.notify.error(t.error.errors)})}toggleIsSearchBasket(t){t.isSearchBasket=!t.isSearchBasket,this.basketClone.isSearchBasket=t.isSearchBasket,this.http.put("../rest/baskets/"+this.id,this.basketClone).subscribe(()=>{this.notify.success(this.translate.instant("lang.basketUpdated"))},t=>{this.notify.error(t.error.errors)})}toggleFlagNotif(t){t.flagNotif=!t.flagNotif,this.basketClone.flagNotif=t.flagNotif,this.http.put("../rest/baskets/"+this.id,this.basketClone).subscribe(()=>{this.notify.success(this.translate.instant("lang.basketUpdated"))},t=>{this.notify.error(t.error.errors)})}unlinkAction(t,e){confirm(this.translate.instant("lang.unlinkAction")+" ?")&&(e.checked=!1,this.http.put("../rest/baskets/"+this.id+"/groups/"+t.group_id+"/actions",{groupActions:t.groupActions}).subscribe(()=>{this.notify.success(this.translate.instant("lang.actionsGroupBasketUpdated"))},t=>{this.notify.error(t.error.errors)}))}updateGroupInfo(t,e){}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(q.b),n.Qb(y.a),n.Qb(w.a),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(IB,!0),n.Kc(PB,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:98,vars:59,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["fixedTopGap","56","position","end",3,"mode","fixedInViewport","opened"],["snav2",""],["mat-subheader",""],["role","list",2,"width","300px","padding","5px"],[2,"font-size","10px"],[2,"border","1px black solid","padding","3px","font-size","10px"],["mat-line","",2,"font-weight","bold","font-size","10px"],["mat-line","",2,"font-size","10px"],[4,"ngIf"],["mat-list-item","",3,"click"],["color","primary","mat-list-icon","",1,"fa","fa-link"],["mat-line",""],["mat-list-item","","disableRipple","true",3,"matTooltip"],["color","primary","mat-list-icon",""],["color","primary",3,"checked","change"],["mat-line","",3,"ngStyle","click"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[3,"selectedIndex","selectedIndexChange"],[3,"label"],[1,"form-horizontal",3,"ngSubmit"],["basketForm","ngForm"],["matInput","","name","identifier","maxlength","32","pattern","^[\\w.-]*$","required","",3,"placeholder","ngModel","ngModelChange","blur",4,"ngIf"],["matInput","","name","identifier","required","","disabled","",3,"placeholder","title","ngModel","ngModelChange",4,"ngIf"],[1,"row"],[1,"col-md-11","col-xs-10"],["matInput","","name","label","maxlength","255","required","",3,"title","placeholder","ngModel","ngStyle","ngModelChange"],[1,"col-md-1","col-xs-2"],["matInput","","type","color","name","color",3,"matTooltip","ngModel","ngModelChange"],["matInput","","name","description","maxlength","255","required","",3,"title","placeholder","ngModel","ngModelChange"],["matInput","","name","clause","matTextareaAutosize","","matAutosizeMinRows","1","required","",3,"title","placeholder","ngModel","ngModelChange"],["color","primary","matSuffix","",1,"fa","fa-info-circle",2,"cursor","pointer",3,"matTooltip","click"],["id","listOrder"],["class","row",4,"ngFor","ngForOf"],[1,"col-md-12","text-center",2,"padding","10px"],["mat-raised-button","","color","primary",3,"disabled"],[3,"label",4,"ngFor","ngForOf"],["matInput","","name","identifier","maxlength","32","pattern","^[\\w.-]*$","required","",3,"placeholder","ngModel","ngModelChange","blur"],["matInput","","name","identifier","required","","disabled","",3,"placeholder","title","ngModel","ngModelChange"],[1,"col-md-5","col-xs-5","text-center"],["required","",3,"placeholder","ngModel","name","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"col-md-2","col-xs-2","text-left"],["color","warn","mat-icon-button","","type","button",3,"disabled","click"],[1,"fa","fa-minus-square","fa-2x"],["color","primary","mat-icon-button","","type","button",3,"disabled","click",4,"ngIf"],[3,"value"],["color","primary","mat-icon-button","","type","button",3,"disabled","click"],[1,"fa","fa-plus-square","fa-2x"],["mat-tab-label",""],["color","warn",1,"fa","fa-times",3,"matTooltip","click"],[1,"col-md-6"],[1,"mat-chip-list-stacked"],["chipList",""],["style","width:100%;",4,"ngFor","ngForOf"],[1,"basketActionsList"],[3,"opened"],["matInput","",3,"placeholder","keyup"],[3,"dataSource"],["table",""],["matColumnDef","label_action"],[4,"matHeaderCellDef"],["style","flex:6;",3,"matTooltip",4,"matCellDef"],["matColumnDef","actions"],["style","text-align:right",3,"matTooltip",4,"matCellDef"],[4,"matRowDef","matRowDefColumns"],[3,"currentBasketGroup","refreshBasketGroup"],[2,"width","100%"],["color","primary","style","cursor:pointer;margin:5px;border-radius:0px;display:flex;","selectable","true","removable","true",3,"matTooltip","ngStyle","click","removed",4,"ngIf"],["color","primary","selectable","true","removable","true",2,"cursor","pointer","margin","5px","border-radius","0px","display","flex",3,"matTooltip","ngStyle","click","removed"],[2,"flex","1 1 auto"],["mat-raised-button","",3,"disabled","click"],["matChipRemove","","color","warn","class","fa fa-times",3,"matTooltip","click",4,"ngIf"],["matChipRemove","","color","warn",1,"fa","fa-times",3,"matTooltip","click"],[2,"flex","6",3,"matTooltip"],["color","primary",3,"disabled","ngModel","change","ngModelChange"],[2,"text-align","right",3,"matTooltip"],["mat-icon-button","",3,"matMenuTriggerFor","disabled"],[1,"fa","fa-bars"],["menu","matMenu"],["mat-menu-item","",3,"disabled","click"],[1,"fa","fa-check-circle"],["mat-menu-item","",3,"click"],[1,"fa","fa-cogs"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,jB,1,1,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,AB,2,0,"div",9),n.Oc(14,eU,36,43,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Wb(15,"mat-sidenav",11,12),n.Wb(17,"mat-nav-list"),n.Wb(18,"h3",13),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Vb(),n.Wb(21,"mat-list",14),n.Wb(22,"p",15),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Wb(25,"div",16),n.Wb(26,"b"),n.Qc(27,"DESTINATION = @my_primary_entity or DESTINATION in (@subentities[@my_primary_entity])"),n.Vb(),n.Vb(),n.Wb(28,"h4",17),n.Qc(29,"@user :"),n.Vb(),n.Wb(30,"p",18),n.Qc(31),n.ic(32,"translate"),n.Vb(),n.Wb(33,"h4",17),n.Qc(34,"@user_id :"),n.Vb(),n.Wb(35,"p",18),n.Qc(36),n.ic(37,"translate"),n.Vb(),n.Wb(38,"h4",17),n.Qc(39,"@email :"),n.Vb(),n.Wb(40,"p",18),n.Qc(41),n.ic(42,"translate"),n.Vb(),n.Wb(43,"h4",17),n.Qc(44,"@my_entities :"),n.Vb(),n.Wb(45,"p",18),n.Qc(46),n.ic(47,"translate"),n.Vb(),n.Wb(48,"h4",17),n.Qc(49,"@my_entities_id :"),n.Vb(),n.Wb(50,"p",18),n.Qc(51),n.ic(52,"translate"),n.Vb(),n.Wb(53,"h4",17),n.Qc(54,"@my_primary_entity :"),n.Vb(),n.Wb(55,"p",18),n.Qc(56),n.ic(57,"translate"),n.Vb(),n.Wb(58,"h4",17),n.Qc(59,"@my_primary_entity_id :"),n.Vb(),n.Wb(60,"p",18),n.Qc(61),n.ic(62,"translate"),n.Vb(),n.Wb(63,"h4",17),n.Qc(64,"@subentities[('entity_1',...,'entity_n')] :"),n.Vb(),n.Wb(65,"p",18),n.Qc(66),n.ic(67,"translate"),n.Vb(),n.Wb(68,"h4",17),n.Qc(69,"@subentities_id[(1, 2, ...)] :"),n.Vb(),n.Wb(70,"p",18),n.Qc(71),n.ic(72,"translate"),n.Vb(),n.Wb(73,"h4",17),n.Qc(74,"@parent_entity['entity_id'] :"),n.Vb(),n.Wb(75,"p",18),n.Qc(76),n.ic(77,"translate"),n.Vb(),n.Wb(78,"h4",17),n.Qc(79,"@sisters_entities['entity_id'] :"),n.Vb(),n.Wb(80,"p",18),n.Qc(81),n.ic(82,"translate"),n.Vb(),n.Wb(83,"h4",17),n.Qc(84,"@entity_type['type'] :"),n.Vb(),n.Wb(85,"p",18),n.Qc(86),n.ic(87,"translate"),n.Vb(),n.Wb(88,"h4",17),n.Qc(89,"@all_entities :"),n.Vb(),n.Wb(90,"p",18),n.Qc(91),n.ic(92,"translate"),n.Vb(),n.Wb(93,"h4",17),n.Qc(94,"@immediate_children['entity_1',..., 'entity_id'] :"),n.Vb(),n.Wb(95,"p",18),n.Qc(96),n.ic(97,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",(e.appService.getViewMode(),!1)),n.Db(4),n.Rc(n.jc(20,27,"lang.keywordHelp")),n.Db(4),n.Rc(n.jc(24,29,"lang.keywordHelpDesc_11")),n.Db(8),n.Rc(n.jc(32,31,"lang.keywordHelpDesc_1")),n.Db(5),n.Rc(n.jc(37,33,"lang.keywordHelpDesc_12")),n.Db(5),n.Rc(n.jc(42,35,"lang.keywordHelpDesc_2")),n.Db(5),n.Rc(n.jc(47,37,"lang.keywordHelpDesc_3")),n.Db(5),n.Rc(n.jc(52,39,"lang.keywordHelpDesc_13")),n.Db(5),n.Rc(n.jc(57,41,"lang.keywordHelpDesc_4")),n.Db(5),n.Rc(n.jc(62,43,"lang.keywordHelpDesc_14")),n.Db(5),n.Rc(n.jc(67,45,"lang.keywordHelpDesc_5")),n.Db(5),n.Rc(n.jc(72,47,"lang.keywordHelpDesc_15")),n.Db(5),n.Rc(n.jc(77,49,"lang.keywordHelpDesc_6")),n.Db(5),n.Rc(n.jc(82,51,"lang.keywordHelpDesc_7")),n.Db(5),n.Rc(n.jc(87,53,"lang.keywordHelpDesc_8")),n.Db(5),n.Rc(n.jc(92,55,"lang.keywordHelpDesc_9")),n.Db(5),n.Rc(n.jc(97,57,"lang.keywordHelpDesc_10")))},directives:[I.e,I.f,Ot,We,P.t,I.d,R.h,R.g,R.a,W.l,R.d,S.a,R.c,T.a,A.b,te.a,P.w,V.c,K.a,Te.c,Te.a,X.K,X.v,X.w,Y.c,J.b,X.d,X.p,X.F,X.u,X.x,J.d,Y.j,P.s,k.b,X.B,ee.a,W.p,Te.d,ze.d,gt.a,gt.c,gt.g,gt.h,vt.o,vt.c,vt.i,vt.b,vt.n,SB,ze.a,ze.e,vt.h,vt.a,j.a,ne.d,ne.e,ne.b,vt.m],pipes:[g.d,Wt.a],styles:[".basketActionsList[_ngcontent-%COMP%] .mat-expansion-panel-body{height:400px;overflow:auto}.mat-chip[_ngcontent-%COMP%]{padding:25px!important}textarea.mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0}"]}),t})(),dU=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.data=n,this.dialogRef=a,this.allEntities=[]}ngOnInit(){this.http.get("../rest/entities").subscribe(t=>{[{id:"ALL_ENTITIES",keyword:"ALL_ENTITIES",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:this.translate.instant("lang.allEntities")},{id:"ENTITIES_JUST_BELOW",keyword:"ENTITIES_JUST_BELOW",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:this.translate.instant("lang.immediatelyBelowMyPrimaryEntity")},{id:"ENTITIES_BELOW",keyword:"ENTITIES_BELOW",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:this.translate.instant("lang.belowAllMyEntities")},{id:"ALL_ENTITIES_BELOW",keyword:"ALL_ENTITIES_BELOW",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:this.translate.instant("lang.belowMyPrimaryEntity")},{id:"MY_ENTITIES",keyword:"MY_ENTITIES",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:this.translate.instant("lang.myEntities")},{id:"MY_PRIMARY_ENTITY",keyword:"MY_PRIMARY_ENTITY",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:this.translate.instant("lang.myPrimaryEntity")},{id:"SAME_LEVEL_ENTITIES",keyword:"SAME_LEVEL_ENTITIES",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:this.translate.instant("lang.sameLevelMyPrimaryEntity")},{id:"ENTITIES_JUST_UP",keyword:"ENTITIES_JUST_UP",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:this.translate.instant("lang.immediatelySuperiorMyPrimaryEntity")}].forEach(t=>{this.allEntities.push(t)}),t.entities.forEach(t=>{this.allEntities.push(t)})},t=>{this.notify.handleErrors(t)})}initService(){this.allEntities.forEach(t=>{t.state={opened:!1,selected:!1},this.data.action.redirects.forEach(e=>{(t.id===e.keyword&&"ENTITY"===e.redirect_mode||t.id===e.entity_id&&"ENTITY"===e.redirect_mode)&&(t.state={opened:!0,selected:!0})})}),$("#jstree").jstree({checkbox:{three_state:!1},core:{force_text:!0,themes:{name:"proton",responsive:!0},data:this.allEntities},plugins:["checkbox","search"]}),$("#jstree").on("select_node.jstree",(t,e)=>{this.data.action.redirects.push(e.node.original.keyword?{action_id:this.data.action.id,entity_id:"",keyword:e.node.id,redirect_mode:"ENTITY"}:{action_id:this.data.action.id,entity_id:e.node.id,keyword:"",redirect_mode:"ENTITY"})}).on("deselect_node.jstree",(t,e)=>{this.data.action.redirects.forEach(t=>{if(e.node.original.keyword){if(t.keyword===e.node.original.keyword){const e=this.data.action.redirects.indexOf(t);this.data.action.redirects.splice(e,1)}}else if(t.entity_id===e.node.id){const e=this.data.action.redirects.indexOf(t);this.data.action.redirects.splice(e,1)}})}).jstree();let t=!1;$("#jstree_search").keyup((function(){t&&clearTimeout(t),t=setTimeout((function(){const t=$("#jstree_search").val();$("#jstree").jstree(!0).search(t)}),250)}))}initService2(){this.allEntities.forEach(t=>{t.state={opened:!1,selected:!1},this.data.action.redirects.forEach(e=>{(t.id===e.keyword&&"USERS"===e.redirect_mode||t.id===e.entity_id&&"USERS"===e.redirect_mode)&&(t.state={opened:!0,selected:!0})})}),$("#jstree2").jstree({checkbox:{three_state:!1},core:{force_text:!0,themes:{name:"proton",responsive:!0},data:this.allEntities},plugins:["checkbox","search"]}),$("#jstree2").on("select_node.jstree",(t,e)=>{this.data.action.redirects.push(e.node.original.keyword?{action_id:this.data.action.id,entity_id:"",keyword:e.node.id,redirect_mode:"USERS"}:{action_id:this.data.action.id,entity_id:e.node.id,keyword:"",redirect_mode:"USERS"})}).on("deselect_node.jstree",(t,e)=>{this.data.action.redirects.forEach(t=>{if(e.node.original.keyword){if(t.keyword===e.node.original.keyword){const e=this.data.action.redirects.indexOf(t);this.data.action.redirects.splice(e,1)}}else if(t.entity_id===e.node.id){const e=this.data.action.redirects.indexOf(t);this.data.action.redirects.splice(e,1)}})}).jstree();let t=!1;$("#jstree_search2").keyup((function(){t&&clearTimeout(t),t=setTimeout((function(){const t=$("#jstree_search2").val();$("#jstree2").jstree(!0).search(t)}),250)}))}saveSettings(){this.dialogRef.close(this.data)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.a),n.Qb(q.h))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(iU,!0),2&t&&n.yc(i=n.ec())&&(e.statusInput=i.first)},decls:114,vars:75,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["settingGroupsBasket","ngForm"],[1,"container-fluid"],[1,"col-md-6"],["id","usedInActionPage","name","usedInActionPage","color","primary",3,"ngModel","ngModelChange"],["id","usedInBasketlist","name","usedInBasketlist","color","primary",3,"ngModel","ngModelChange"],[4,"ngIf"],[3,"label"],["matInput","","name","clause","matTextareaAutosize","","matAutosizeMinRows","1",3,"title","placeholder","ngModel","ngModelChange"],["role","list",2,"width","400px","padding","5px"],[2,"font-size","10px"],[2,"border","1px black solid","padding","3px","font-size","10px"],["mat-line","",2,"font-weight","bold","font-size","10px"],["mat-line","",2,"font-size","10px"],[1,"divider-modal"],["mat-raised-button","","type","submit","color","primary",2,"margin","auto",3,"disabled","click"],[3,"opened"],["matInput","","id","jstree_search","name","jstree_search","type","text",3,"placeholder"],["id","jstree"],[3,"opened",4,"ngIf"],["mat-tab-label",""],["matInput","","id","jstree_search2","name","jstree_search2","type","text",3,"placeholder"],["id","jstree2"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h2",1),n.Qc(2),n.ic(3,"translate"),n.Wb(4,"small"),n.Qc(5),n.Vb(),n.Vb(),n.Wb(6,"mat-dialog-content"),n.Wb(7,"form",null,2),n.Wb(9,"div",3),n.Wb(10,"div",4),n.Wb(11,"mat-checkbox",5),n.dc("ngModelChange",(function(t){return e.data.action.used_in_action_page=t})),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Wb(14,"div",4),n.Wb(15,"mat-checkbox",6),n.dc("ngModelChange",(function(t){return e.data.action.used_in_basketlist=t})),n.Qc(16),n.ic(17,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(18,"mat-tab-group"),n.Oc(19,oU,13,8,"mat-tab",7),n.Wb(20,"mat-tab",8),n.ic(21,"translate"),n.Wb(22,"mat-form-field"),n.Wb(23,"textarea",9),n.dc("ngModelChange",(function(t){return e.data.action.where_clause=t})),n.ic(24,"translate"),n.ic(25,"translate"),n.Vb(),n.Vb(),n.Wb(26,"mat-accordion"),n.Wb(27,"mat-expansion-panel"),n.Wb(28,"mat-expansion-panel-header"),n.Wb(29,"mat-panel-title"),n.Qc(30),n.ic(31,"translate"),n.Vb(),n.Vb(),n.Wb(32,"mat-list",10),n.Wb(33,"p",11),n.Qc(34),n.ic(35,"translate"),n.Vb(),n.Wb(36,"div",12),n.Wb(37,"b"),n.Qc(38,"DESTINATION = @my_primary_entity or DESTINATION in (@subentities[@my_primary_entity])"),n.Vb(),n.Vb(),n.Wb(39,"h4",13),n.Qc(40,"@user :"),n.Vb(),n.Wb(41,"p",14),n.Qc(42),n.ic(43,"translate"),n.Vb(),n.Wb(44,"h4",13),n.Qc(45,"@user_id :"),n.Vb(),n.Wb(46,"p",14),n.Qc(47),n.ic(48,"translate"),n.Vb(),n.Wb(49,"h4",13),n.Qc(50,"@email :"),n.Vb(),n.Wb(51,"p",14),n.Qc(52),n.ic(53,"translate"),n.Vb(),n.Wb(54,"h4",13),n.Qc(55,"@my_entities :"),n.Vb(),n.Wb(56,"p",14),n.Qc(57),n.ic(58,"translate"),n.Vb(),n.Wb(59,"h4",13),n.Qc(60,"@my_entities_id :"),n.Vb(),n.Wb(61,"p",14),n.Qc(62),n.ic(63,"translate"),n.Vb(),n.Wb(64,"h4",13),n.Qc(65,"@my_primary_entity :"),n.Vb(),n.Wb(66,"p",14),n.Qc(67),n.ic(68,"translate"),n.Vb(),n.Wb(69,"h4",13),n.Qc(70,"@my_primary_entity_id :"),n.Vb(),n.Wb(71,"p",14),n.Qc(72),n.ic(73,"translate"),n.Vb(),n.Wb(74,"h4",13),n.Qc(75," @subentities[('entity_1',...,'entity_n')] :"),n.Vb(),n.Wb(76,"p",14),n.Qc(77),n.ic(78,"translate"),n.Vb(),n.Wb(79,"h4",13),n.Qc(80,"@subentities_id[(1, 2, ...)] :"),n.Vb(),n.Wb(81,"p",14),n.Qc(82),n.ic(83,"translate"),n.Vb(),n.Wb(84,"h4",13),n.Qc(85,"@parent_entity['entity_id'] :"),n.Vb(),n.Wb(86,"p",14),n.Qc(87),n.ic(88,"translate"),n.Vb(),n.Wb(89,"h4",13),n.Qc(90,"@sisters_entities['entity_id'] : "),n.Vb(),n.Wb(91,"p",14),n.Qc(92),n.ic(93,"translate"),n.Vb(),n.Wb(94,"h4",13),n.Qc(95,"@entity_type['type'] :"),n.Vb(),n.Wb(96,"p",14),n.Qc(97),n.ic(98,"translate"),n.Vb(),n.Wb(99,"h4",13),n.Qc(100,"@all_entities :"),n.Vb(),n.Wb(101,"p",14),n.Qc(102),n.ic(103,"translate"),n.Vb(),n.Wb(104,"h4",13),n.Qc(105," @immediate_children['entity_1',..., 'entity_id'] :"),n.Vb(),n.Wb(106,"p",14),n.Qc(107),n.ic(108,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Rb(109,"span",15),n.Wb(110,"mat-dialog-actions"),n.Wb(111,"button",16),n.dc("click",(function(){return e.saveSettings()})),n.Qc(112),n.ic(113,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Sc("",n.jc(3,29,"lang.actionParameters")," "),n.Db(3),n.Rc(e.data.action.label_action),n.Db(6),n.oc("ngModel",e.data.action.used_in_action_page),n.Db(1),n.Sc(" ",n.jc(13,31,"lang.usedInActionPage"),""),n.Db(3),n.oc("ngModel",e.data.action.used_in_basketlist),n.Db(1),n.Sc(" ",n.jc(17,33,"lang.usedInBasketlist"),""),n.Db(3),n.oc("ngIf","redirect"==e.data.action.keyword),n.Db(1),n.pc("label",n.jc(21,35,"lang.otherParameters")),n.Db(3),n.pc("title",n.jc(24,37,"lang.whereClauseAction")),n.pc("placeholder",n.jc(25,39,"lang.whereClauseAction")),n.oc("ngModel",e.data.action.where_clause),n.Db(7),n.Sc(" ",n.jc(31,41,"lang.keywordHelp")," "),n.Db(4),n.Rc(n.jc(35,43,"lang.keywordHelpDesc_11")),n.Db(8),n.Rc(n.jc(43,45,"lang.keywordHelpDesc_1")),n.Db(5),n.Rc(n.jc(48,47,"lang.keywordHelpDesc_12")),n.Db(5),n.Rc(n.jc(53,49,"lang.keywordHelpDesc_2")),n.Db(5),n.Rc(n.jc(58,51,"lang.keywordHelpDesc_3")),n.Db(5),n.Rc(n.jc(63,53,"lang.keywordHelpDesc_13")),n.Db(5),n.Rc(n.jc(68,55,"lang.keywordHelpDesc_4")),n.Db(5),n.Rc(n.jc(73,57,"lang.keywordHelpDesc_14")),n.Db(5),n.Rc(n.jc(78,59,"lang.keywordHelpDesc_5")),n.Db(5),n.Rc(n.jc(83,61,"lang.keywordHelpDesc_15")),n.Db(5),n.Rc(n.jc(88,63,"lang.keywordHelpDesc_6")),n.Db(5),n.Rc(n.jc(93,65,"lang.keywordHelpDesc_7")),n.Db(5),n.Rc(n.jc(98,67,"lang.keywordHelpDesc_8")),n.Db(5),n.Rc(n.jc(103,69,"lang.keywordHelpDesc_9")),n.Db(5),n.Rc(n.jc(108,71,"lang.keywordHelpDesc_10")),n.Db(4),n.oc("disabled",!e.data.action.used_in_basketlist&&!e.data.action.used_in_action_page),n.Db(1),n.Rc(n.jc(113,73,"lang.validate")))},directives:[q.i,q.f,X.K,X.v,X.w,j.a,X.u,X.x,Te.c,P.t,Te.a,Y.c,J.b,J.d,X.d,gt.a,gt.c,gt.g,gt.h,R.a,W.l,q.c,k.b,Te.d],pipes:[g.d],styles:[".mat-dialog-content[_ngcontent-%COMP%]{height: 65vh;}"]}),t})(),hU=(()=>{class t{constructor(t,e,i,n){this.http=t,this.notify=e,this.data=i,this.dialogRef=n,this.actionAll=[],this.newBasketGroup={}}ngOnInit(){this.http.get("../rest/actions").subscribe(t=>{t.actions.forEach(t=>{t.where_clause="",t.used_in_basketlist=!1,t.default_action_list=!1,t.used_in_action_page=!0,t.statuses=[],t.redirects=[],t.checked=!1,this.actionAll.push(t)})},t=>{this.notify.handleErrors(t)}),this.data.groups.forEach(t=>{this.data.linkedGroups.forEach(e=>{if(t.group_id===e.group_id){const e=this.data.groups.indexOf(t);this.data.groups.splice(e,1)}})})}validateForm(t){0===this.data.linkedGroups.length?(this.actionAll[0].used_in_action_page=!0,this.actionAll[0].default_action_list=!0,this.actionAll[0].used_in_basketlist=!0,this.actionAll[0].checked=!0,this.newBasketGroup.groupActions=this.actionAll):this.newBasketGroup=JSON.parse(JSON.stringify(this.data.linkedGroups[this.data.linkedGroups.length-1])),this.newBasketGroup.basket_id=this.data.basketId,this.newBasketGroup.group_id=t.group_id,this.newBasketGroup.group_desc=t.group_desc,this.dialogRef.close(this.newBasketGroup)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(v.b),n.Qb(D.a),n.Qb(q.a),n.Qb(q.h))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:7,vars:4,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title","","color","primary"],[4,"ngFor","ngForOf"],[3,"click",4,"ngIf"],[3,"click"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h2",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-dialog-content"),n.Wb(5,"mat-nav-list"),n.Oc(6,cU,2,1,"span",2),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,2,"lang.linkGroup")),n.Db(4),n.oc("ngForOf",e.data.groups))},directives:[q.i,q.f,R.h,P.s,P.t,R.d],pipes:[g.d],styles:[".mat-dialog-content[_ngcontent-%COMP%]{height: 65vh;}"]}),t})();const uU=["snav2"],pU=["adminMenuTemplate"];function bU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",14),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",15),n.dc("click",(function(){return n.Dc(t),n.hc().prepareDoctypeAdd("firstLevel")})),n.Wb(5,"mat-icon",16),n.Rb(6,"i",17),n.Rb(7,"i",18),n.Vb(),n.Wb(8,"p",19),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Wb(11,"a",15),n.dc("click",(function(){return n.Dc(t),n.hc().prepareDoctypeAdd("secondLevel")})),n.Wb(12,"mat-icon",16),n.Rb(13,"i",17),n.Rb(14,"i",18),n.Vb(),n.Wb(15,"p",19),n.Qc(16),n.ic(17,"translate"),n.Vb(),n.Vb(),n.Wb(18,"a",15),n.dc("click",(function(){return n.Dc(t),n.hc().prepareDoctypeAdd("doctype")})),n.Wb(19,"mat-icon",16),n.Rb(20,"i",20),n.Rb(21,"i",18),n.Vb(),n.Wb(22,"p",19),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Vb(),n.Vb()}2&t&&(n.Db(2),n.Rc(n.jc(3,4,"lang.actions")),n.Db(7),n.Sc(" ",n.jc(10,6,"lang.addFirstLevel")," "),n.Db(7),n.Sc(" ",n.jc(17,8,"lang.addSecondLevel")," "),n.Db(7),n.Sc(" ",n.jc(24,10,"lang.addDoctype")," "))}function fU(t,e){1&t&&(n.Wb(0,"div",21),n.Rb(1,"mat-spinner",22),n.Vb())}function mU(t,e){if(1&t&&(n.Wb(0,"mat-card",23),n.Wb(1,"mat-form-field"),n.Rb(2,"input",24),n.ic(3,"translate"),n.Vb(),n.Rb(4,"div",25),n.Wb(5,"div",26),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.pc("placeholder",n.jc(3,3,"lang.searchDoctypes")),n.Db(4),n.Tc(" ",t.doctypes.length," ",n.jc(7,5,"lang.documentTypesAlt"),"")}}function gU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",31),n.Wb(1,"div",32),n.Wb(2,"mat-form-field"),n.Wb(3,"input",38),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).currentFirstLevel.doctypes_first_level_id=e})),n.ic(4,"translate"),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(3),n.pc("title",n.jc(4,4,"lang.id")),n.pc("placeholder",n.jc(5,6,"lang.id")),n.oc("ngModel",t.currentFirstLevel.doctypes_first_level_id)("disabled",!t.creationMode)}}function vU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",39),n.dc("click",(function(){return n.Dc(t),n.hc(2).removeFirstLevel()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){n.hc();const t=n.zc(3),e=n.hc();n.oc("disabled",!t.form.valid||e.currentFirstLevel.hasChildren),n.Db(1),n.Rc(n.jc(2,2,"lang.delete"))}}function _U(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",40),n.dc("click",(function(){return n.Dc(t),n.hc(2).readMode()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.cancel")))}function yU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab",27),n.ic(1,"translate"),n.Wb(2,"form",28,29),n.Oc(4,gU,6,8,"div",30),n.Wb(5,"div",31),n.Wb(6,"div",32),n.Wb(7,"mat-form-field"),n.Wb(8,"input",33),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().currentFirstLevel.doctypes_first_level_label=e})),n.ic(9,"translate"),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(11,"div",31),n.Wb(12,"div",34),n.Wb(13,"button",35),n.dc("click",(function(){return n.Dc(t),n.hc().saveFirstLevel()})),n.Qc(14),n.ic(15,"translate"),n.Vb(),n.Oc(16,vU,3,4,"button",36),n.Oc(17,_U,3,3,"button",37),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(3),e=n.hc();n.pc("label",n.jc(1,9,"lang.firstLevelDoctype")),n.Db(4),n.oc("ngIf",!e.creationMode),n.Db(4),n.pc("title",n.jc(9,11,"lang.label")),n.pc("placeholder",n.jc(10,13,"lang.label")),n.oc("ngModel",e.currentFirstLevel.doctypes_first_level_label),n.Db(5),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(15,15,"lang.save")),n.Db(2),n.oc("ngIf",!e.creationMode),n.Db(1),n.oc("ngIf",e.creationMode)}}function xU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",31),n.Wb(1,"div",32),n.Wb(2,"mat-form-field"),n.Wb(3,"input",47),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).currentSecondLevel.doctypes_second_level_id=e})),n.ic(4,"translate"),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(3),n.pc("title",n.jc(4,4,"lang.id")),n.pc("placeholder",n.jc(5,6,"lang.id")),n.oc("ngModel",t.currentSecondLevel.doctypes_second_level_id)("disabled",!t.creationMode)}}function CU(t,e){if(1&t&&(n.Wb(0,"mat-option",48),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.doctypes_first_level_id),n.Db(1),n.Sc(" ",t.doctypes_first_level_label," ")}}function OU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",49),n.dc("click",(function(){return n.Dc(t),n.hc(2).removeSecondLevel()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){n.hc();const t=n.zc(3),e=n.hc();n.oc("disabled",!t.form.valid||e.currentSecondLevel.hasChildren),n.Db(1),n.Rc(n.jc(2,2,"lang.delete"))}}function DU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",50),n.dc("click",(function(){return n.Dc(t),n.hc(2).readMode()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.cancel")))}function wU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab",27),n.ic(1,"translate"),n.Wb(2,"form",28,41),n.Oc(4,xU,6,8,"div",30),n.Wb(5,"div",31),n.Wb(6,"div",32),n.Wb(7,"mat-form-field"),n.Wb(8,"input",42),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().currentSecondLevel.doctypes_second_level_label=e})),n.ic(9,"translate"),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(11,"div",31),n.Wb(12,"div",32),n.Wb(13,"mat-form-field"),n.Wb(14,"mat-select",43),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().currentSecondLevel.doctypes_first_level_id=e})),n.ic(15,"translate"),n.ic(16,"translate"),n.Oc(17,CU,2,2,"mat-option",44),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(18,"div",31),n.Wb(19,"div",34),n.Wb(20,"button",35),n.dc("click",(function(){return n.Dc(t),n.hc().saveSecondLevel()})),n.Qc(21),n.ic(22,"translate"),n.Vb(),n.Oc(23,OU,3,4,"button",45),n.Oc(24,DU,3,3,"button",46),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(3),e=n.hc();n.pc("label",n.jc(1,13,"lang.secondLevelDoctype")),n.Db(4),n.oc("ngIf",!e.creationMode),n.Db(4),n.pc("title",n.jc(9,15,"lang.label")),n.pc("placeholder",n.jc(10,17,"lang.label")),n.oc("ngModel",e.currentSecondLevel.doctypes_second_level_label),n.Db(6),n.pc("title",n.jc(15,19,"lang.firstLevelAttached")),n.pc("placeholder",n.jc(16,21,"lang.firstLevelAttached")),n.oc("ngModel",e.currentSecondLevel.doctypes_first_level_id),n.Db(3),n.oc("ngForOf",e.firstLevels),n.Db(3),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(22,23,"lang.save")),n.Db(2),n.oc("ngIf",!e.creationMode),n.Db(1),n.oc("ngIf",e.creationMode)}}function MU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",31),n.Wb(1,"div",32),n.Wb(2,"mat-form-field"),n.Wb(3,"input",70),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).currentType.type_id=e})),n.ic(4,"translate"),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(3),n.pc("title",n.jc(4,4,"lang.id")),n.pc("placeholder",n.jc(5,6,"lang.id")),n.oc("ngModel",t.currentType.type_id)("disabled",!t.creationMode)}}function kU(t,e){if(1&t&&(n.Wb(0,"mat-option",48),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.doctypes_second_level_id),n.Db(1),n.Sc(" ",t.doctypes_second_level_label," ")}}function SU(t,e){if(1&t&&(n.Wb(0,"mat-option",48),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}function IU(t,e){if(1&t&&(n.Wb(0,"mat-option",48),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function PU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-select",71),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).currentType.retention_rule=e})),n.ic(1,"translate"),n.Oc(2,IU,2,2,"mat-option",44),n.ic(3,"sortBy"),n.Vb()}if(2&t){const t=n.hc(2);n.pc("title",n.jc(1,3,"lang.retentionRule")),n.oc("ngModel",t.currentType.retention_rule),n.Db(2),n.oc("ngForOf",n.kc(3,5,t.conservationRules,"label"))}}function VU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"input",72),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).currentType.retention_rule=e})),n.ic(1,"translate"),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(2);n.pc("title",n.jc(1,3,"lang.retentionRule")),n.pc("placeholder",n.jc(2,5,"lang.retentionRule")),n.oc("ngModel",t.currentType.retention_rule)}}function RU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",73),n.dc("click",(function(){return n.Dc(t),n.hc(2).removeType()})),n.ic(1,"translate"),n.Qc(2),n.ic(3,"translate"),n.Vb()}if(2&t){n.hc();const t=n.zc(3);n.pc("matTooltip",n.jc(1,3,"lang.toolTipDeleteDoctype")),n.oc("disabled",!t.form.valid),n.Db(2),n.Rc(n.jc(3,5,"lang.delete"))}}function jU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",50),n.dc("click",(function(){return n.Dc(t),n.hc(2).readMode()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.cancel")))}function AU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab",27),n.ic(1,"translate"),n.Wb(2,"form",28,51),n.Oc(4,MU,6,8,"div",30),n.Wb(5,"div",31),n.Wb(6,"div",32),n.Wb(7,"mat-form-field"),n.Wb(8,"input",52),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().currentType.description=e})),n.ic(9,"translate"),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(11,"div",31),n.Wb(12,"div",32),n.Wb(13,"mat-form-field"),n.Wb(14,"mat-select",53),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().currentType.doctypes_second_level_id=e})),n.ic(15,"translate"),n.ic(16,"translate"),n.Oc(17,kU,2,2,"mat-option",44),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(18,"div",31),n.Wb(19,"div",32),n.Wb(20,"mat-form-field"),n.Wb(21,"input",54),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().currentType.process_delay=e})),n.ic(22,"translate"),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(24,"div",31),n.Wb(25,"div",32),n.Wb(26,"mat-form-field"),n.Wb(27,"input",55),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().currentType.delay1=e})),n.ic(28,"translate"),n.ic(29,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(30,"div",31),n.Wb(31,"div",32),n.Wb(32,"mat-form-field"),n.Wb(33,"input",56),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().currentType.delay2=e})),n.ic(34,"translate"),n.ic(35,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(36,"div",31),n.Wb(37,"div",32),n.Wb(38,"mat-form-field"),n.Wb(39,"mat-select",57),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().currentType.process_mode=e})),n.ic(40,"translate"),n.ic(41,"translate"),n.Oc(42,SU,2,2,"mat-option",44),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(43,"mat-accordion",58),n.Wb(44,"mat-expansion-panel"),n.Wb(45,"mat-expansion-panel-header"),n.Wb(46,"mat-panel-title"),n.Qc(47),n.ic(48,"translate"),n.Vb(),n.Vb(),n.Wb(49,"div",31),n.Wb(50,"div",32),n.Wb(51,"mat-form-field"),n.Wb(52,"input",59),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().currentType.duration_current_use=e})),n.ic(53,"translate"),n.ic(54,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(55,"div",32),n.Wb(56,"mat-form-field"),n.Wb(57,"mat-select",60),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().currentType.action_current_use=e})),n.ic(58,"translate"),n.ic(59,"translate"),n.Rb(60,"mat-option",61),n.Wb(61,"mat-option",62),n.Qc(62),n.ic(63,"translate"),n.Vb(),n.Wb(64,"mat-option",63),n.Qc(65),n.ic(66,"translate"),n.Vb(),n.Wb(67,"mat-option",64),n.Qc(68),n.ic(69,"translate"),n.Vb(),n.Wb(70,"mat-option",65),n.Qc(71),n.ic(72,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(73,"mat-expansion-panel"),n.Wb(74,"mat-expansion-panel-header"),n.Wb(75,"mat-panel-title"),n.Qc(76),n.ic(77,"translate"),n.Vb(),n.Vb(),n.Wb(78,"div",31),n.Wb(79,"div",32),n.Wb(80,"mat-form-field"),n.Wb(81,"mat-label"),n.Qc(82),n.ic(83,"translate"),n.Vb(),n.Oc(84,PU,4,8,"mat-select",66),n.Oc(85,VU,3,7,"ng-template",null,67,n.Pc),n.Vb(),n.Vb(),n.Wb(87,"div",32),n.Wb(88,"mat-form-field"),n.Wb(89,"mat-select",68),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().currentType.retention_final_disposition=e})),n.ic(90,"translate"),n.ic(91,"translate"),n.Rb(92,"mat-option",61),n.Wb(93,"mat-option",65),n.Qc(94),n.ic(95,"translate"),n.Vb(),n.Wb(96,"mat-option",64),n.Qc(97),n.ic(98,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(99,"div",31),n.Wb(100,"div",34),n.Wb(101,"button",35),n.dc("click",(function(){return n.Dc(t),n.hc().saveType()})),n.Qc(102),n.ic(103,"translate"),n.Vb(),n.Oc(104,RU,4,7,"button",69),n.Oc(105,jU,3,3,"button",46),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(3),e=n.zc(86),i=n.hc();n.pc("label",n.jc(1,46,"lang.doctype")),n.Db(4),n.oc("ngIf",!i.creationMode),n.Db(4),n.pc("title",n.jc(9,48,"lang.label")),n.pc("placeholder",n.jc(10,50,"lang.label")),n.oc("ngModel",i.currentType.description),n.Db(6),n.pc("title",n.jc(15,52,"lang.secondLevelAttached")),n.pc("placeholder",n.jc(16,54,"lang.secondLevelAttached")),n.oc("ngModel",i.currentType.doctypes_second_level_id),n.Db(3),n.oc("ngForOf",i.secondLevels),n.Db(4),n.pc("title",n.jc(22,56,"lang.processDelayDay")),n.pc("placeholder",n.jc(23,58,"lang.processDelayDay")),n.oc("ngModel",i.currentType.process_delay),n.Db(6),n.pc("title",n.jc(28,60,"lang.delay1")),n.pc("placeholder",n.jc(29,62,"lang.delay1")),n.oc("ngModel",i.currentType.delay1),n.Db(6),n.pc("title",n.jc(34,64,"lang.delay2")),n.pc("placeholder",n.jc(35,66,"lang.delay2")),n.oc("ngModel",i.currentType.delay2),n.Db(6),n.pc("title",n.jc(40,68,"lang.processMode")),n.pc("placeholder",n.jc(41,70,"lang.processMode")),n.oc("ngModel",i.currentType.process_mode),n.Db(3),n.oc("ngForOf",i.processModes),n.Db(5),n.Sc(" ",n.jc(48,72,"lang.currentUseRule")," "),n.Db(5),n.pc("title",n.jc(53,74,"lang.durationCurrentUse")),n.pc("placeholder",n.jc(54,76,"lang.durationCurrentUse")),n.oc("ngModel",i.currentType.duration_current_use),n.Db(5),n.pc("title",n.jc(58,78,"lang.finalAction")),n.pc("placeholder",n.jc(59,80,"lang.finalAction")),n.oc("ngModel",i.currentType.action_current_use),n.Db(5),n.Rc(n.jc(63,82,"lang.currentUseTransfer")),n.Db(3),n.Rc(n.jc(66,84,"lang.currentUseCopy")),n.Db(3),n.Rc(n.jc(69,86,"lang.currentUseCnservation")),n.Db(3),n.Rc(n.jc(72,88,"lang.destruction")),n.Db(5),n.Sc(" ",n.jc(77,90,"lang.archival")," "),n.Db(6),n.Rc(n.jc(83,92,"lang.retentionRule")),n.Db(2),n.oc("ngIf",i.conservationRules.length>0)("ngIfElse",e),n.Db(5),n.pc("title",n.jc(90,94,"lang.retentionFinalDisposition")),n.pc("placeholder",n.jc(91,96,"lang.retentionFinalDisposition")),n.oc("ngModel",i.currentType.retention_final_disposition),n.Db(5),n.Rc(n.jc(95,98,"lang.destruction")),n.Db(3),n.Rc(n.jc(98,100,"lang.conservation")),n.Db(4),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(103,102,"lang.save")),n.Db(2),n.oc("ngIf",!i.creationMode),n.Db(1),n.oc("ngIf",i.creationMode)}}function WU(t,e){if(1&t&&(n.Wb(0,"mat-option",9),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("disabled",t.disabled)("value",t.type_id),n.Db(1),n.Sc(" ",t.description," ")}}let TU=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.notify=i,this.dialog=n,this.headerService=a,this.appService=s,this.viewContainerRef=o,this.config={},this.doctypes=[],this.currentType=!1,this.currentSecondLevel=!1,this.currentFirstLevel=!1,this.firstLevels=!1,this.types=!1,this.secondLevels=!1,this.processModes=!1,this.loading=!1,this.creationMode=!1,this.newSecondLevel=!1,this.newFirstLevel=!1,this.conservationRules=[],this.displayedColumns=["label","use","mandatory","column"]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.documentTypes")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,this.http.get("../rest/doctypes").subscribe(t=>{this.doctypes=t.structure,setTimeout(()=>{$("#jstree").jstree({checkbox:{three_state:!1},core:{force_text:!0,themes:{name:"proton",responsive:!0},multiple:!1,data:this.doctypes,check_callback:function(t,e,i,n,a){if("move_node"===t)return void 0===a.ref||(!isNaN(parseFloat(e.id))&&isFinite(e.id)&&0===a.ref.id.indexOf("secondlevel_")||0===e.id.indexOf("secondlevel_")&&0===a.ref.id.indexOf("firstlevel_"))&&!(a.ref.children.indexOf(e.id)>-1)}},dnd:{is_draggable:function(t){return this.secondLevelSelected=t[0].id.replace("secondlevel_",""),!!(!isNaN(parseFloat(this.secondLevelSelected))&&isFinite(this.secondLevelSelected)||!isNaN(parseFloat(t[0].id))&&isFinite(t[0].id))}},plugins:["search","dnd","contextmenu"]});let t=!1;$("#jstree_search").keyup((function(){t&&clearTimeout(t),t=setTimeout((function(){const t=$("#jstree_search").val();$("#jstree").jstree(!0).search(t)}),250)})),$("#jstree").on("select_node.jstree",(t,e)=>{!1===this.sidenavRight.opened&&this.sidenavRight.open(),this.loadDoctype(e,!1)}).on("move_node.jstree",(t,e)=>{this.loadDoctype(e,!0)}).jstree()},0),$("#jstree").jstree("select_node",this.doctypes[0]),this.loading=!1},t=>{this.notify.handleErrors(t)})}getRules(){return new Promise((t,e)=>{this.http.get("../rest/archival/retentionRules").pipe(Object(mt.a)(e=>{this.conservationRules=0!=e.retentionRules.length?e.retentionRules:[],t(!0)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()})}loadDoctype(t,e){this.creationMode=!1,t.node.original.type_id?(this.currentFirstLevel=!1,this.currentSecondLevel=!1,this.http.get("../rest/doctypes/types/"+t.node.original.type_id).subscribe(i=>{this.currentType=i.doctype,this.secondLevels=i.secondLevel,this.processModes=["NORMAL","SVA","SVR"],this.getRules(),e&&(this.currentType?(this.newSecondLevel=t.parent.replace("secondlevel_",""),!isNaN(parseFloat(this.newSecondLevel))&&isFinite(this.newSecondLevel)?this.currentType.doctypes_second_level_id!==this.newSecondLevel&&(this.currentType.doctypes_second_level_id=this.newSecondLevel,this.saveType()):alert(this.translate.instant("lang.cantMoveDoctype"))):alert(this.translate.instant("lang.noDoctypeSelected")))},t=>{this.notify.error(t.error.errors)})):t.node.original.doctypes_second_level_id?(this.currentFirstLevel=!1,this.currentType=!1,this.http.get("../rest/doctypes/secondLevel/"+t.node.original.doctypes_second_level_id).subscribe(i=>{this.currentSecondLevel=i.secondLevel,this.firstLevels=i.firstLevel,e&&(this.currentSecondLevel?(this.newFirstLevel=t.parent.replace("firstlevel_",""),!isNaN(parseFloat(this.newFirstLevel))&&isFinite(this.newFirstLevel)?this.currentSecondLevel.doctypes_first_level_id!==this.newFirstLevel&&(this.currentSecondLevel.doctypes_first_level_id=this.newFirstLevel,this.saveSecondLevel()):alert(this.translate.instant("lang.cantMoveFirstLevel"))):alert(this.translate.instant("lang.noFirstLevelSelected")))},t=>{this.notify.error(t.error.errors)})):(this.currentSecondLevel=!1,this.currentType=!1,this.http.get("../rest/doctypes/firstLevel/"+t.node.original.doctypes_first_level_id).subscribe(t=>{this.currentFirstLevel=t.firstLevel},t=>{this.notify.error(t.error.errors)}))}resetDatas(){this.currentFirstLevel=!1,this.currentSecondLevel=!1,this.currentType=!1}refreshTree(){$("#jstree").jstree(!0).settings.core.data=this.doctypes,$("#jstree").jstree("refresh")}saveFirstLevel(){this.creationMode?this.http.post("../rest/doctypes/firstLevel",this.currentFirstLevel).subscribe(t=>{this.resetDatas(),this.readMode(),this.doctypes=t.doctypeTree,this.refreshTree(),this.notify.success(this.translate.instant("lang.firstLevelAdded"))},t=>{this.notify.error(t.error.errors)}):this.http.put("../rest/doctypes/firstLevel/"+this.currentFirstLevel.doctypes_first_level_id,this.currentFirstLevel).subscribe(t=>{this.doctypes=t.doctypeTree,this.refreshTree(),this.notify.success(this.translate.instant("lang.firstLevelUpdated"))},t=>{this.notify.error(t.error.errors)})}saveSecondLevel(){this.creationMode?this.http.post("../rest/doctypes/secondLevel",this.currentSecondLevel).subscribe(t=>{this.resetDatas(),this.readMode(),this.doctypes=t.doctypeTree,this.refreshTree(),this.notify.success(this.translate.instant("lang.secondLevelAdded"))},t=>{this.notify.error(t.error.errors)}):this.http.put("../rest/doctypes/secondLevel/"+this.currentSecondLevel.doctypes_second_level_id,this.currentSecondLevel).subscribe(t=>{this.doctypes=t.doctypeTree,this.refreshTree(),this.notify.success(this.translate.instant("lang.secondLevelUpdated"))},t=>{this.notify.error(t.error.errors)})}saveType(){this.creationMode?this.http.post("../rest/doctypes/types",this.currentType).subscribe(t=>{this.resetDatas(),this.readMode(),this.doctypes=t.doctypeTree,this.refreshTree(),this.notify.success(this.translate.instant("lang.documentTypeAdded"))},t=>{this.notify.error(t.error.errors)}):this.http.put("../rest/doctypes/types/"+this.currentType.type_id,this.currentType).subscribe(t=>{this.doctypes=t.doctypeTree,this.refreshTree(),this.notify.success(this.translate.instant("lang.documentTypeUpdated"))},t=>{this.notify.error(t.error.errors)})}readMode(){this.creationMode=!1,$("#jstree").jstree("deselect_all"),$("#jstree").jstree("select_node",this.doctypes[0])}removeFirstLevel(){confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.delete")+" \xab "+this.currentFirstLevel.doctypes_first_level_label+" \xbb")&&this.http.delete("../rest/doctypes/firstLevel/"+this.currentFirstLevel.doctypes_first_level_id).subscribe(t=>{this.resetDatas(),this.readMode(),this.doctypes=t.doctypeTree,this.refreshTree(),this.doctypes[0]?$("#jstree").jstree("select_node",this.doctypes[0]):!0===this.sidenavRight.opened&&this.sidenavRight.close(),this.notify.success(this.translate.instant("lang.firstLevelDeleted"))},t=>{this.notify.error(t.error.errors)})}removeSecondLevel(){confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.delete")+" \xab "+this.currentSecondLevel.doctypes_second_level_label+" \xbb")&&this.http.delete("../rest/doctypes/secondLevel/"+this.currentSecondLevel.doctypes_second_level_id).subscribe(t=>{this.resetDatas(),this.readMode(),this.doctypes=t.doctypeTree,this.refreshTree(),$("#jstree").jstree("select_node",this.doctypes[0]),this.notify.success(this.translate.instant("lang.secondLevelDeleted"))},t=>{this.notify.error(t.error.errors)})}removeType(){confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.delete")+" \xab "+this.currentType.description+" \xbb")&&this.http.delete("../rest/doctypes/types/"+this.currentType.type_id).subscribe(t=>{0===t.deleted?(this.resetDatas(),this.readMode(),this.doctypes=t.doctypeTree,this.refreshTree(),$("#jstree").jstree("select_node",this.doctypes[0]),this.notify.success(this.translate.instant("lang.documentTypeDeleted"))):(this.config={panelClass:"maarch-modal",data:{count:t.deleted,types:t.doctypes}},this.dialogRef=this.dialog.open(EU,this.config),this.dialogRef.afterClosed().subscribe(t=>{t&&this.http.put("../rest/doctypes/types/"+this.currentType.type_id+"/redirect",t).subscribe(t=>{this.resetDatas(),this.readMode(),this.doctypes=t.doctypeTree,this.refreshTree(),$("#jstree").jstree("select_node",this.doctypes[0]),this.notify.success(this.translate.instant("lang.documentTypeDeleted"))},t=>{this.notify.error(t.error.errors)}),this.dialogRef=null}))},t=>{this.notify.error(t.error.errors)})}prepareDoctypeAdd(t){this.currentFirstLevel=!1,this.currentSecondLevel=!1,this.currentType=!1,"firstLevel"===t&&(this.currentFirstLevel={}),"secondLevel"===t&&(this.currentSecondLevel={}),"doctype"===t&&(this.currentType={}),!1===this.sidenavRight.opened&&this.sidenavRight.open(),$("#jstree").jstree("deselect_all"),this.http.get("../rest/administration/doctypes/new").subscribe(t=>{this.firstLevels=t.firstLevel,this.secondLevels=t.secondLevel,this.processModes=["NORMAL","SVA","SVR"]},t=>{this.notify.error(t.error.errors)}),this.creationMode=t}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(y.a),n.Qb(w.a),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(uU,!0),n.Kc(pU,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:22,vars:14,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["fixedTopGap","56","position","end",1,"col-md-4","col-sm-12",3,"mode","fixedInViewport","opened"],["snav2",""],[3,"label",4,"ngIf"],["mat-subheader",""],["mat-list-item","",3,"click"],["color","primary","mat-list-icon","",1,"fa-stack","fa-fw",2,"margin-left","-3px","font-size","18px"],[1,"fa","fa-folder"],[1,"fa","fa-plus",2,"position","absolute"],["mat-line",""],[1,"fa","fa-file"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],["matInput","","id","jstree_search","name","jstree_search","type","text",3,"placeholder"],["id","jstree"],[1,"mat-paginator",2,"min-height","48px","min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],[3,"label"],[1,"form-horizontal",2,"overflow","hidden"],["firstLevelForm","ngForm"],["class","form-group",4,"ngIf"],[1,"form-group"],[1,"col-sm-12"],["matInput","","required","","name","doctypes_first_level_label","id","doctypes_first_level_label","type","text","maxlength","255",3,"ngModel","title","placeholder","ngModelChange"],[1,"col-md-12","text-center",2,"padding","10px"],["mat-raised-button","","color","primary",3,"disabled","click"],["type","button","mat-raised-button","","color","warn",3,"disabled","click",4,"ngIf"],["type","button","mat-raised-button","","color","default",3,"click",4,"ngIf"],["matInput","","required","","name","doctypes_first_level_id","id","doctypes_first_level_id","type","text","maxlength","255",3,"ngModel","title","placeholder","disabled","ngModelChange"],["type","button","mat-raised-button","","color","warn",3,"disabled","click"],["type","button","mat-raised-button","","color","default",3,"click"],["secondLevelForm","ngForm"],["matInput","","required","","name","doctypes_second_level_label","id","doctypes_second_level_label","type","text","maxlength","255",3,"ngModel","title","placeholder","ngModelChange"],["id","doctypes_first_level_id","name","doctypes_first_level_id","required","",3,"title","placeholder","ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["mat-raised-button","","color","warn",3,"disabled","click",4,"ngIf"],["mat-raised-button","","color","default",3,"click",4,"ngIf"],["matInput","","required","","name","doctypes_second_level_id","id","doctypes_second_level_id","type","text","maxlength","255",3,"ngModel","title","placeholder","disabled","ngModelChange"],[3,"value"],["mat-raised-button","","color","warn",3,"disabled","click"],["mat-raised-button","","color","default",3,"click"],["typeForm","ngForm"],["matInput","","required","","name","description","id","description","type","text","maxlength","255",3,"ngModel","title","placeholder","ngModelChange"],["id","doctypes_second_level_id","name","doctypes_second_level_id","required","",3,"title","placeholder","ngModel","ngModelChange"],["matInput","","required","","name","process_delay","id","process_delay","type","number","pattern","^[0-9]*$",3,"ngModel","title","placeholder","ngModelChange"],["matInput","","required","","name","delay1","id","delay1","type","number","pattern","^[0-9]*$",3,"ngModel","title","placeholder","ngModelChange"],["matInput","","required","","name","delay2","id","delay2","type","number","maxlength","255","pattern","^[0-9]*$",3,"ngModel","title","placeholder","ngModelChange"],["id","process_mode","name","process_mode","required","",3,"title","placeholder","ngModel","ngModelChange"],["multi",""],["matInput","","type","number","name","duration_current_use","id","duration_current_use",3,"ngModel","title","placeholder","ngModelChange"],["id","action_current_use","name","action_current_use",3,"title","placeholder","ngModel","ngModelChange"],["value",""],["value","transfer"],["value","copy"],["value","conservation"],["value","destruction"],["name","retention_rule",3,"title","ngModel","ngModelChange",4,"ngIf","ngIfElse"],["elseBlock",""],["id","retention_final_disposition","name","retention_final_disposition",3,"title","placeholder","ngModel","ngModelChange"],["mat-raised-button","","color","warn",3,"disabled","matTooltip","click",4,"ngIf"],["matInput","","required","","name","type_id","id","type_id","type","text","maxlength","255",3,"ngModel","title","placeholder","disabled","ngModelChange"],["name","retention_rule",3,"title","ngModel","ngModelChange"],["matInput","","name","retention_rule","type","text","maxlength","15",3,"ngModel","title","placeholder","ngModelChange"],["mat-raised-button","","color","warn",3,"disabled","matTooltip","click"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,bU,25,12,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,fU,2,0,"div",9),n.Oc(14,mU,8,7,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Wb(15,"mat-sidenav",11,12),n.Wb(17,"mat-nav-list"),n.Wb(18,"mat-tab-group"),n.Oc(19,yU,18,17,"mat-tab",13),n.Oc(20,wU,25,25,"mat-tab",13),n.Oc(21,AU,106,104,"mat-tab",13),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",!1),n.Db(4),n.oc("ngIf",e.currentFirstLevel||"firstLevel"==e.creationMode),n.Db(1),n.oc("ngIf",e.currentSecondLevel||"secondeLevel"==e.creationMode),n.Db(1),n.oc("ngIf",e.currentType||"doctype"==e.creationMode))},directives:[I.e,I.f,Ot,We,P.t,I.d,R.h,Te.c,R.g,R.d,S.a,R.c,W.l,V.c,K.a,Y.c,J.b,Te.a,X.K,X.v,X.w,X.d,X.F,X.p,X.u,X.x,k.b,ee.a,P.s,W.p,X.A,X.B,gt.a,gt.c,gt.g,gt.h,Y.g,A.b],pipes:[g.d,Wt.a],encapsulation:2}),t})(),EU=(()=>{class t{constructor(t,e,i){this.http=t,this.data=e,this.dialogRef=i}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(v.b),n.Qb(q.a),n.Qb(q.h))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:25,vars:19,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["changeDoctypeForm","ngForm"],["role","alert",1,"alert-message","alert-message-info"],["color","primary","mat-list-icon","",1,"fa","fa-file","fa-2x"],["mat-line",""],["id","new_type_id","name","new_type_id","required","",3,"title","placeholder","ngModel","ngModelChange"],[3,"disabled","value",4,"ngFor","ngForOf"],["mat-raised-button","","color","warn","type","submit",3,"disabled","click"],[3,"disabled","value"]],template:function(t,e){if(1&t&&(n.Wb(0,"div",0),n.Wb(1,"h2",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-dialog-content"),n.Wb(5,"form",null,2),n.Wb(7,"div",3),n.Wb(8,"mat-list"),n.Wb(9,"mat-list-item"),n.Rb(10,"mat-icon",4),n.Wb(11,"p",5),n.Wb(12,"b"),n.Qc(13),n.Vb(),n.Qc(14),n.ic(15,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(16,"mat-form-field"),n.Wb(17,"mat-select",6),n.dc("ngModelChange",(function(t){return e.data.new_type_id=t})),n.ic(18,"translate"),n.ic(19,"translate"),n.Oc(20,WU,2,3,"mat-option",7),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(21,"mat-dialog-actions"),n.Wb(22,"button",8),n.dc("click",(function(){return e.dialogRef.close(e.data)})),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.zc(6);n.Db(2),n.Rc(n.jc(3,9,"lang.documentTypeReplacement")),n.Db(11),n.Rc(e.data.count),n.Db(1),n.Sc(" ",n.jc(15,11,"lang.documents")," "),n.Db(3),n.pc("title",n.jc(18,13,"lang.transferToDoctype")),n.pc("placeholder",n.jc(19,15,"lang.transferToDoctype")),n.oc("ngModel",e.data.new_type_id),n.Db(3),n.oc("ngForOf",e.data.types),n.Db(2),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(24,17,"lang.delete"))}},directives:[q.i,q.f,X.K,X.v,X.w,R.a,R.d,S.a,R.c,W.l,Y.c,ee.a,X.F,X.u,X.x,P.s,q.c,k.b,W.p],pipes:[g.d],encapsulation:2}),t})();const FU=["adminMenuTemplate"];function LU(t,e){1&t&&(n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",11),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",12),n.Rb(5,"mat-icon",13),n.Wb(6,"p",14),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,2,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,4,"lang.add")," "))}function QU(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Vb())}function NU(t,e){1&t&&(n.Wb(0,"mat-header-cell",38),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.label")))}function zU(t,e){if(1&t&&(n.Wb(0,"mat-cell",39),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.title," ")}}function BU(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",38),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Rc(n.jc(2,3,"lang.description"))}}function UU(t,e){if(1&t&&(n.Wb(0,"mat-cell",39),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",t.description," ")}}function $U(t,e){1&t&&(n.Wb(0,"mat-header-cell",38),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.type")))}function HU(t,e){if(1&t&&(n.Wb(0,"mat-cell",39),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.typeLabel," ")}}function GU(t,e){1&t&&n.Rb(0,"mat-header-cell",40)}function XU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",41),n.Wb(1,"button",42),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.delete(a)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",43),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.pc("matTooltip",n.jc(2,1,"lang.delete")))}function qU(t,e){1&t&&n.Rb(0,"mat-header-row")}function KU(t,e){1&t&&(n.Rb(0,"mat-row",44),n.ic(1,"translate")),2&t&&(n.qc("routerLink","/administration/diffusionModels/",e.$implicit.id,""),n.pc("matTooltip",n.jc(1,2,"lang.view")))}function YU(t,e){if(1&t&&(n.Wb(0,"mat-card",17),n.Wb(1,"div",18),n.Wb(2,"div",19),n.Wb(3,"mat-form-field"),n.Rb(4,"input",20),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Wb(6,"div",19),n.Rb(7,"mat-paginator",21,22),n.Vb(),n.Vb(),n.Wb(9,"mat-table",23,24),n.Ub(11,25),n.Oc(12,NU,3,3,"mat-header-cell",26),n.Oc(13,zU,2,1,"mat-cell",27),n.Tb(),n.Ub(14,28),n.Oc(15,BU,3,5,"mat-header-cell",29),n.Oc(16,UU,2,3,"mat-cell",30),n.Tb(),n.Ub(17,31),n.Oc(18,$U,3,3,"mat-header-cell",26),n.Oc(19,HU,2,1,"mat-cell",27),n.Tb(),n.Ub(20,32),n.Oc(21,GU,1,0,"mat-header-cell",33),n.Oc(22,XU,4,3,"mat-cell",34),n.Tb(),n.Oc(23,qU,1,0,"mat-header-row",35),n.Oc(24,KU,2,4,"mat-row",36),n.Vb(),n.Wb(25,"div",37),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.pc("placeholder",n.jc(5,10,"lang.filterBy")),n.oc("formControl",t.adminService.getFilterField()),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.adminService.getDataSource()),n.Db(14),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns),n.Db(2),n.Tc("",t.listTemplates.length," ",n.jc(27,12,"lang.workflowModels"),"")}}let JU=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this.translate=t,this.http=e,this.notify=i,this.dialog=n,this.headerService=a,this.appService=s,this.functions=o,this.adminService=r,this.viewContainerRef=c,this.loading=!1,this.listTemplates=[],this.listTemplatesForAssign=[],this.displayedColumns=["title","description","typeLabel","actions"],this.filterColumns=["title","description","typeLabel"]}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.workflowModels")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,yield this.getListemplates(),this.loadList(),this.loading=!1}))}getListemplates(){return new Promise((t,e)=>{this.http.get("../rest/listTemplates").pipe(Object(l.a)(t=>(t.listTemplates=t.listTemplates.filter(t=>null===t.entityId&&["visaCircuit","opinionCircuit"].indexOf(t.type)>-1).map(t=>Object.assign(Object.assign({},t),{typeLabel:this.translate.instant("lang."+t.type)})),t.listTemplates)),Object(mt.a)(e=>{this.listTemplates=e,t(!0)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()})}loadList(){setTimeout(()=>{this.adminService.setDataSource("admin_listmodels",this.listTemplates,this.sort,this.paginator,this.filterColumns)},0)}delete(t){this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete("../rest/listTemplates/"+t.id)),Object(mt.a)(()=>{this.listTemplates=this.listTemplates.filter(e=>e.id!==t.id),this.notify.success(this.translate.instant("lang.diffusionModelDeleted")),this.loadList()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a),n.Qb(OL),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(FU,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:15,vars:8,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["mat-subheader",""],["mat-list-item","","routerLink","/administration/diffusionModels/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"row",2,"margin","0px"],[1,"col-md-6","col-xs-6"],["matInput","",3,"formControl","placeholder"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSortDisableClear","","matSort","",3,"dataSource"],["table",""],["matColumnDef","title"],["mat-sort-header","","style","flex:2;",4,"matHeaderCellDef"],["style","flex:2;",4,"matCellDef"],["matColumnDef","description"],["mat-sort-header","","style","flex:2;",3,"hide-for-mobile",4,"matHeaderCellDef"],["style","flex:2;",3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","typeLabel"],["matColumnDef","actions"],["style","flex:1;",4,"matHeaderCellDef"],["style","justify-content: flex-end;flex:1;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"routerLink","matTooltip",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["mat-sort-header","",2,"flex","2"],[2,"flex","2"],[2,"flex","1"],[2,"justify-content","flex-end","flex","1"],["mat-icon-button","","color","warn",3,"matTooltip","click"],["aria-hidden","true",1,"fa","fa-trash-alt","fa-2x"],[2,"cursor","pointer",3,"routerLink","matTooltip"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,LU,9,6,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,QU,2,0,"div",9),n.Oc(14,YU,28,14,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,R.h,R.g,R.d,o.f,S.a,R.c,W.l,V.c,K.a,Y.c,J.b,X.d,X.u,X.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,vt.h,Fe.b,vt.a,k.b,A.b,vt.j,vt.m,o.d],pipes:[g.d],encapsulation:2}),t})();const ZU=["snav2"],t$=["appVisaWorkflow"],e$=["appAvisWorkflow"];function i$(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Vb())}function n$(t,e){if(1&t&&(n.Wb(0,"mat-option",27),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function a$(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",28),n.dc("click",(function(){return n.Dc(t),n.hc(2).cancelModification()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.cancel")))}function s$(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",17),n.Wb(1,"mat-tab-group"),n.Wb(2,"mat-tab",12),n.ic(3,"translate"),n.Wb(4,"form",18,19),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Wb(6,"mat-form-field"),n.Wb(7,"mat-select",20),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().diffusionModel.type=e})),n.ic(8,"translate"),n.Oc(9,n$,2,2,"mat-option",21),n.Vb(),n.Vb(),n.Wb(10,"mat-form-field"),n.Wb(11,"input",22),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().diffusionModel.title=e})),n.ic(12,"translate"),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Wb(14,"mat-form-field"),n.Wb(15,"textarea",23),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().diffusionModel.description=e})),n.ic(16,"translate"),n.ic(17,"translate"),n.Vb(),n.Vb(),n.Wb(18,"div",24),n.Wb(19,"button",25),n.Qc(20),n.ic(21,"translate"),n.Vb(),n.Oc(22,a$,3,3,"button",26),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(2),n.pc("label",n.jc(3,14,"lang.informations")),n.Db(5),n.pc("placeholder",n.jc(8,16,"lang.diffusionType")),n.oc("ngModel",t.diffusionModel.type)("disabled",!t.creationMode),n.Db(2),n.oc("ngForOf",t.itemTypeList),n.Db(2),n.pc("title",n.jc(12,18,"lang.label")),n.pc("placeholder",n.jc(13,20,"lang.label")),n.oc("ngModel",t.diffusionModel.title),n.Db(4),n.pc("title",n.jc(16,22,"lang.description")),n.pc("placeholder",n.jc(17,24,"lang.description")),n.oc("ngModel",t.diffusionModel.description),n.Db(4),n.oc("disabled",!t.isValidForm()),n.Db(1),n.Rc(n.jc(21,26,"lang.save")),n.Db(2),n.oc("ngIf",!t.creationMode)}}function o$(t,e){1&t&&n.Rb(0,"app-visa-workflow",29,30),2&t&&n.oc("showListModels",!1)("showComment",!1)("adminMode",!0)}function r$(t,e){1&t&&n.Rb(0,"app-avis-workflow",31,32),2&t&&n.oc("showListModels",!1)("adminMode",!0)}let c$=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.route=i,this.router=n,this.notify=a,this.headerService=s,this.appService=o,this.loading=!0,this.diffusionModel={title:"",description:"",type:"opinionCircuit",items:[]},this.diffusionModelClone={},this.itemTypeList=[{id:"visaCircuit",label:this.translate.instant("lang.visaCircuit")},{id:"opinionCircuit",label:this.translate.instant("lang.opinionCircuit")}],this.listDiffModified=!1}ngOnInit(){this.loading=!0,this.route.params.subscribe(t=>Object(r.a)(this,void 0,void 0,(function*(){void 0===t.id?(this.headerService.setHeader(this.translate.instant("lang.diffusionModelCreation")),this.creationMode=!0,this.loading=!1):(this.creationMode=!1,yield this.getTemplate(t.id),"visaCircuit"===this.diffusionModel.type?this.loadVisaCircuit():this.loadOpinionCircuit())})))}getTemplate(t){return new Promise((e,i)=>{this.http.get("../rest/listTemplates/"+t).pipe(Object(mt.a)(i=>{this.diffusionModel=i.listTemplate,this.diffusionModel.id=t,e(!0)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()})}loadVisaCircuit(){const t={id:this.diffusionModel.id,type:"entity"};setTimeout(()=>Object(r.a)(this,void 0,void 0,(function*(){this.appVisaWorkflow.resetWorkflow(),yield this.appVisaWorkflow.addItemToWorkflow(t,!1),this.diffusionModel.items=this.appVisaWorkflow.getWorkflow(),this.diffusionModelClone=JSON.parse(JSON.stringify(this.diffusionModel))})),0)}loadOpinionCircuit(){const t={id:this.diffusionModel.id,type:"entity"};setTimeout(()=>Object(r.a)(this,void 0,void 0,(function*(){this.appAvisWorkflow.resetWorkflow(),yield this.appAvisWorkflow.addItemToWorkflow(t),this.diffusionModel.items=this.appAvisWorkflow.getWorkflow(),this.diffusionModelClone=JSON.parse(JSON.stringify(this.diffusionModel))})),0)}onSubmit(){this.creationMode?this.createTemplate():this.updateTemplate()}createTemplate(){this.http.post("../rest/listTemplates?admin=true",this.formatCircuit()).pipe(Object(mt.a)(()=>{this.router.navigate(["/administration/diffusionModels"]),this.notify.success(this.translate.instant("lang.diffusionModelAdded"))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}updateTemplate(){this.http.put("../rest/listTemplates/"+this.diffusionModel.id,this.formatCircuit()).pipe(Object(mt.a)(()=>{this.router.navigate(["/administration/diffusionModels"]),this.notify.success(this.translate.instant("lang.diffusionModelUpdated"))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}formatCircuit(){return"visaCircuit"===this.diffusionModel.type?(this.diffusionModel.items=this.appVisaWorkflow.getWorkflow().map((t,e)=>({id:t.item_id,type:"user",mode:t.requested_signature?"sign":"visa",sequence:e})),this.diffusionModel):(this.diffusionModel.items=this.appAvisWorkflow.getWorkflow().map((t,e)=>({id:t.item_id,type:"user",mode:"avis",sequence:e})),this.diffusionModel)}checkValidUsers(t){let e=!0;return t.forEach(t=>{t.hasPrivilege&&t.isValid||(e=!1)}),e}isValidForm(){return"visaCircuit"===this.diffusionModel.type?void 0!==this.appVisaWorkflow&&this.appVisaWorkflow.getWorkflow().length>0&&""!==this.diffusionModel.title&&this.checkValidUsers(this.appVisaWorkflow.getWorkflow()):void 0!==this.appAvisWorkflow&&this.appAvisWorkflow.getWorkflow().length>0&&""!==this.diffusionModel.title&&this.checkValidUsers(this.appAvisWorkflow.getWorkflow())}cancelModification(){this.diffusionModel=JSON.parse(JSON.stringify(this.diffusionModelClone)),"visaCircuit"===this.diffusionModel.type?this.loadVisaCircuit():this.loadOpinionCircuit()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(ZU,!0),n.Xc(t$,!0),n.Xc(e$,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.appVisaWorkflow=i.first),n.yc(i=n.ec())&&(e.appAvisWorkflow=i.first))},decls:21,vars:16,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["fixedTopGap","56","position","end",1,"col-md-4","col-xs-11",3,"mode","fixedInViewport","opened"],["snav2",""],[3,"label"],[3,"showListModels","showComment","adminMode",4,"ngIf"],[3,"showListModels","adminMode",4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[3,"ngSubmit"],["diffusionModelForm","ngForm"],["id","type","name","type",3,"placeholder","ngModel","disabled","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["matInput","","name","title","maxlength","255","required","",3,"title","placeholder","ngModel","ngModelChange"],["matInput","","name","description","matTextareaAutosize","","matAutosizeMinRows","1","matAutosizeMaxRows","5","maxlength","255",3,"title","placeholder","ngModel","ngModelChange"],[1,"col-md-12","text-center",2,"padding","10px"],["mat-raised-button","","color","primary",3,"disabled"],["mat-raised-button","","type","button","color","default",3,"click",4,"ngIf"],[3,"value"],["mat-raised-button","","type","button","color","default",3,"click"],[3,"showListModels","showComment","adminMode"],["appVisaWorkflow",""],[3,"showListModels","adminMode"],["appAvisWorkflow",""]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,i$,2,0,"div",8),n.Oc(12,s$,23,28,"mat-card",9),n.Vb(),n.Vb(),n.Vb(),n.Wb(13,"mat-sidenav",10,11),n.Wb(15,"mat-nav-list"),n.Wb(16,"mat-tab-group"),n.Wb(17,"mat-tab",12),n.ic(18,"translate"),n.Oc(19,o$,2,3,"app-visa-workflow",13),n.Oc(20,r$,2,2,"app-avis-workflow",14),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",!e.appService.getViewMode()),n.Db(4),n.pc("label",n.jc(18,14,"lang."+e.diffusionModel.type)),n.Db(2),n.oc("ngIf","visaCircuit"===e.diffusionModel.type),n.Db(1),n.oc("ngIf","opinionCircuit"===e.diffusionModel.type))},directives:[I.e,I.f,Ot,We,P.t,I.d,R.h,Te.c,Te.a,V.c,K.a,X.K,X.v,X.w,Y.c,ee.a,X.u,X.x,P.s,J.b,X.d,X.p,X.F,J.d,k.b,W.p,Ko,Qv],pipes:[g.d],styles:[".mat-list-item[draggable=false][_ngcontent-%COMP%]:hover{background:inherit}.mat-list-item[draggable=false][_ngcontent-%COMP%]{cursor:not-allowed!important}.mat-list-item[draggable=true][_ngcontent-%COMP%]{cursor:pointer}.mat-list-item[draggable=true][_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{cursor:move}.primaryColor[_ngcontent-%COMP%]{color:#135f7f}.redColor[_ngcontent-%COMP%]{color:#e4342b}"]}),t})();function l$(t,e){1&t&&(n.Wb(0,"div",14),n.Rb(1,"mat-spinner"),n.Vb())}function d$(t,e){if(1&t&&(n.Wb(0,"mat-option",15),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}function h$(t,e){if(1&t&&(n.Wb(0,"mat-option",15),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}function u$(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",5),n.Wb(1,"mat-form-field",6),n.Wb(2,"mat-label"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"mat-select",16),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().exportModel.delimiter=e})),n.ic(6,"translate"),n.Oc(7,h$,2,2,"mat-option",8),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(3),n.Rc(n.jc(4,5,"lang.delimiter")),n.Db(2),n.pc("placeholder",n.jc(6,7,"lang.delimiter")),n.oc("ngModel",t.exportModel.delimiter)("disabled","csv"!=t.exportModel.format),n.Db(2),n.oc("ngForOf",t.delimiters)}}let p$=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.localStorage=s,this.headerService=o,this.loading=!1,this.loadingExport=!1,this.delimiters=[";",",","TAB"],this.formats=["csv"],this.exportModel={delimiter:";",format:"csv"}}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.setConfiguration()}))}exportData(){this.localStorage.save("exportEntities_"+this.headerService.user.id,JSON.stringify(this.exportModel)),this.loadingExport=!0,this.http.put("../rest/entities/export",this.exportModel,{responseType:"blob"}).pipe(Object(mt.a)(t=>{if("text/html"!==t.type){const e=document.createElement("a");let i,n,a,s;e.href=window.URL.createObjectURL(t),i=new Date,n=i.getDate(),a=i.getMonth()+1,s=i.getFullYear(),n<10&&(n="0"+n),a<10&&(a="0"+a),i=n+"-"+a+"-"+s,e.setAttribute("download","export_entities_maarch_"+i+"."+this.exportModel.format.toLowerCase()),document.body.appendChild(e),e.click(),this.dialogRef.close()}else alert(this.translate.instant("lang.tooMuchDatas"))}),Object(Xt.a)(()=>this.loadingExport=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}setConfiguration(){null!==this.localStorage.get("exportEntitiesFields_"+this.headerService.user.id)&&(this.exportModel.delimiter=JSON.parse(this.localStorage.get("exportEntitiesFields_"+this.headerService.user.id)).delimiter)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(Ut.a),n.Qb(y.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:24,vars:19,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loader",4,"ngIf"],[1,"row"],[1,"col-md-6"],["appearance","outline"],[3,"placeholder","ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["class","col-md-6",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"click"],["mat-raised-button","","mat-button","",3,"mat-dialog-close"],[1,"loader"],[3,"value"],[3,"placeholder","ngModel","disabled","ngModelChange"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"div",2),n.Oc(5,l$,2,0,"div",3),n.Wb(6,"div",4),n.Wb(7,"div",5),n.Wb(8,"mat-form-field",6),n.Wb(9,"mat-label"),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Wb(12,"mat-select",7),n.dc("ngModelChange",(function(t){return e.exportModel.format=t})),n.ic(13,"translate"),n.Oc(14,d$,2,2,"mat-option",8),n.Vb(),n.Vb(),n.Vb(),n.Oc(15,u$,8,9,"div",9),n.Vb(),n.Vb(),n.Rb(16,"span",10),n.Wb(17,"div",11),n.Wb(18,"button",12),n.dc("click",(function(){return e.exportData()})),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"button",13),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,9,"lang.exportDatas")),n.Db(3),n.oc("ngIf",e.loadingExport),n.Db(5),n.Rc(n.jc(11,11,"lang.format")),n.Db(2),n.pc("placeholder",n.jc(13,13,"lang.format")),n.oc("ngModel",e.exportModel.format),n.Db(2),n.oc("ngForOf",e.formats),n.Db(1),n.oc("ngIf","csv"==e.exportModel.format),n.Db(4),n.Rc(n.jc(20,15,"lang.toExport")),n.Db(3),n.Rc(n.jc(23,17,"lang.cancel")))},directives:[q.i,q.f,P.t,Y.c,Y.g,ee.a,X.u,X.x,P.s,q.c,k.b,q.d,V.c,W.p],pipes:[g.d],styles:[".mat-dialog-container{position:relative}.mat-dialog-content[_ngcontent-%COMP%]{min-height:150px;padding-bottom:10px;overflow-x:hidden}.actions[_ngcontent-%COMP%], .loader[_ngcontent-%COMP%]{justify-content:center}.loader[_ngcontent-%COMP%]{position:absolute;display:flex;width:100%;left:0;top:0;height:100%;background:hsla(0,0%,100%,.6);z-index:1;align-items:center}"]}),t})();const b$=["snav2"],f$=["adminMenuTemplate"],m$=["paginatorUsers"],g$=["paginatorTemplates"],v$=["tableUsers"],_$=["tableTemplates"],y$=["appDiffusionsList"],x$=["appVisaWorkflow"],C$=["appAvisWorkflow"];function O$(t,e){if(1&t){const t=n.Xb();n.Wb(0,"a",45),n.dc("click",(function(){n.Dc(t);const e=n.hc(2);return n.zc(16).open(),e.prepareEntityAdd()})),n.Rb(1,"mat-icon",48),n.Wb(2,"p",47),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(3),n.Sc(" ",n.jc(4,1,"lang.add")," "))}const D$=function(t){return{opacity:t}};function w$(t,e){if(1&t){const t=n.Xb();n.Wb(0,"a",50),n.Wb(1,"mat-icon",51),n.Wb(2,"mat-slide-toggle",52),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).toggleRole(e),!1})),n.Vb(),n.Vb(),n.Wb(3,"p",53),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).toggleRole(e),!1})),n.Qc(4),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(2),n.oc("checked",t.available),n.Db(1),n.oc("ngStyle",n.vc(3,D$,t.available?"":"0.5")),n.Db(1),n.Sc(" ",t.label," ")}}function M$(t,e){if(1&t&&(n.Ub(0),n.Oc(1,w$,5,5,"a",49),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf","dest"!=t.id&&"cc"!=t.id)}}function k$(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",43),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Oc(4,O$,5,3,"a",44),n.Wb(5,"a",45),n.dc("click",(function(){return n.Dc(t),n.hc().openExportModal()})),n.Rb(6,"mat-icon",46),n.Wb(7,"p",47),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Rb(10,"mat-divider"),n.Wb(11,"mat-nav-list"),n.Wb(12,"h3",43),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Oc(15,M$,2,1,"ng-container",21),n.Vb()}if(2&t){const t=n.hc();n.Db(2),n.Rc(n.jc(3,5,"lang.actions")),n.Db(2),n.oc("ngIf",!t.creationMode),n.Db(4),n.Sc(" ",n.jc(9,7,"lang.toExport")," "),n.Db(5),n.Rc(n.jc(14,9,"lang.additionalRoles")),n.Db(2),n.oc("ngForOf",t.listTemplateRoles)}}function S$(t,e){1&t&&(n.Wb(0,"div",54),n.Rb(1,"mat-spinner",55),n.Vb())}function I$(t,e){1&t&&(n.Wb(0,"mat-hint"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.entityTreeInfo")))}function P$(t,e){1&t&&(n.Wb(0,"mat-hint"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.entityTreeInfoCreation")))}function V$(t,e){if(1&t&&(n.Wb(0,"mat-card",56),n.Wb(1,"mat-form-field"),n.Rb(2,"input",57),n.ic(3,"translate"),n.Oc(4,I$,3,3,"mat-hint",58),n.Oc(5,P$,3,3,"mat-hint",58),n.Vb(),n.Rb(6,"div",59),n.Wb(7,"div",60),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.pc("placeholder",n.jc(3,5,"lang.searchEntities")),n.Db(2),n.oc("ngIf",!t.creationMode),n.Db(1),n.oc("ngIf",t.creationMode),n.Db(3),n.Tc(" ",t.entities.length," ",n.jc(9,7,"lang.entities"),"")}}function R$(t,e){if(1&t&&(n.Wb(0,"mat-option",62),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.oc("value",t.entity_id),n.Db(1),n.Sc(" ",t.entity_label," ")}}function j$(t,e){if(1&t&&(n.Ub(0),n.Oc(1,R$,2,2,"mat-option",61),n.Tb()),2&t){const t=e.$implicit,i=n.hc();n.Db(1),n.oc("ngIf",!t.state.disabled&&t.entity_id!=i.currentEntity.entity_id||i.currentEntity.parent_entity_id==t.entity_id)}}function A$(t,e){if(1&t&&(n.Wb(0,"mat-option",62),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function W$(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",16),n.Wb(1,"div",17),n.Wb(2,"mat-form-field"),n.Wb(3,"input",63),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().currentEntity.id=e})),n.ic(4,"translate"),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(3),n.pc("title",n.jc(4,3,"lang.technicalId")),n.pc("placeholder",n.jc(5,5,"lang.technicalId")),n.oc("ngModel",t.currentEntity.id)}}function T$(t,e){1&t&&(n.Rb(0,"input",67),n.ic(1,"translate"),n.ic(2,"translate")),2&t&&(n.pc("title",n.jc(1,2,"lang.siretCode")),n.pc("placeholder",n.jc(2,4,"lang.siretCode")))}function E$(t,e){if(1&t){const t=n.Xb();n.Wb(0,"input",68),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).currentEntity.business_id=e})),n.ic(1,"translate"),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(2);n.pc("title",n.jc(1,3,"lang.siretCode")),n.pc("placeholder",n.jc(2,5,"lang.siretCode")),n.oc("ngModel",t.currentEntity.business_id)}}function F$(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",69),n.dc("click",(function(){return n.Dc(t),n.hc(2).addEntityToAnnuary()})),n.Rb(1,"mat-icon",70),n.Vb()}}function L$(t,e){if(1&t&&(n.Wb(0,"div",16),n.Wb(1,"div",17),n.Wb(2,"mat-form-field"),n.Oc(3,T$,3,6,"input",64),n.Oc(4,E$,3,7,"input",65),n.Oc(5,F$,2,0,"button",66),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(3),n.oc("ngIf",!t.currentEntity.canSynchronizeSiret),n.Db(1),n.oc("ngIf",t.currentEntity.canSynchronizeSiret),n.Db(1),n.oc("ngIf",t.currentEntity.canSynchronizeSiret)}}function Q$(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",71),n.dc("click",(function(){return n.Dc(t),n.hc().removeEntity()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(),e=n.zc(23);n.oc("disabled",!e.form.valid||t.currentEntity.hasChildren),n.Db(1),n.Rc(n.jc(2,2,"lang.delete"))}}function N$(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",72),n.dc("click",(function(){return n.Dc(t),n.hc().readMode()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.cancel")))}function z$(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",79),n.dc("click",(function(){return n.Dc(t),n.hc(3).deleteDiffList()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.delete")))}function B$(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",16),n.Wb(1,"div",38),n.Wb(2,"button",39),n.dc("click",(function(){return n.Dc(t),n.hc(2).saveDiffList()})),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"button",77),n.dc("click",(function(){n.Dc(t),n.hc();const e=n.zc(5),i=n.hc();return e.loadListModel(i.currentEntity.id)})),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Oc(8,z$,3,3,"button",78),n.Vb(),n.Vb()}if(2&t){n.hc();const t=n.zc(5),e=n.hc();n.Db(2),n.oc("disabled",t.hasEmptyDest()||!t.isModified()),n.Db(1),n.Rc(n.jc(4,5,"lang.save")),n.Db(2),n.oc("disabled",!t.isModified()),n.Db(1),n.Rc(n.jc(7,7,"lang.cancel")),n.Db(2),n.oc("ngIf",!t.isEmptyList()&&e.currentEntity.listTemplate.id)}}function U$(t,e){if(1&t&&(n.Wb(0,"mat-tab",13),n.ic(1,"translate"),n.Wb(2,"div",73),n.Wb(3,"div",74),n.Rb(4,"app-diffusions-list",75,76),n.Vb(),n.Oc(6,B$,9,9,"div",24),n.Vb(),n.Vb()),2&t){const t=n.hc();n.pc("label",n.jc(1,4,"lang.diffusionList")),n.Db(4),n.oc("adminMode",!0)("target","redirect"),n.Db(2),n.oc("ngIf",t.currentEntity.entity_id)}}function $$(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",16),n.Wb(1,"div",38),n.Wb(2,"button",39),n.dc("click",(function(){return n.Dc(t),n.hc(2).saveDiffListVisa()})),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"button",77),n.dc("click",(function(){n.Dc(t),n.hc();const e=n.zc(5),i=n.hc();return e.loadListModel(i.currentEntity.id)})),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){n.hc();const t=n.zc(5);n.Db(2),n.oc("disabled",!t.isModified()),n.Db(1),n.Rc(n.jc(4,4,"lang.save")),n.Db(2),n.oc("disabled",!t.isModified()),n.Db(1),n.Rc(n.jc(7,6,"lang.cancel"))}}function H$(t,e){if(1&t&&(n.Wb(0,"mat-tab",13),n.ic(1,"translate"),n.Wb(2,"div",80),n.Wb(3,"div",74),n.Rb(4,"app-visa-workflow",81,82),n.Vb(),n.Oc(6,$$,8,8,"div",24),n.Vb(),n.Vb()),2&t){const t=n.hc();n.pc("label",n.jc(1,5,"lang.visaWorkflow")),n.Db(4),n.oc("adminMode",!0)("showListModels",!1)("showComment",!1),n.Db(2),n.oc("ngIf",t.currentEntity.entity_id)}}function G$(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",16),n.Wb(1,"div",38),n.Wb(2,"button",39),n.dc("click",(function(){return n.Dc(t),n.hc(2).saveDiffListOpinion()})),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"button",77),n.dc("click",(function(){n.Dc(t),n.hc();const e=n.zc(5),i=n.hc();return e.loadListModel(i.currentEntity.id)})),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){n.hc();const t=n.zc(5);n.Db(2),n.oc("disabled",!t.isModified()),n.Db(1),n.Rc(n.jc(4,4,"lang.save")),n.Db(2),n.oc("disabled",!t.isModified()),n.Db(1),n.Rc(n.jc(7,6,"lang.cancel"))}}function X$(t,e){if(1&t&&(n.Wb(0,"mat-tab",13),n.ic(1,"translate"),n.Wb(2,"div",83),n.Wb(3,"div",74),n.Rb(4,"app-avis-workflow",84,85),n.Vb(),n.Oc(6,G$,8,8,"div",24),n.Vb(),n.Vb()),2&t){const t=n.hc();n.pc("label",n.jc(1,4,"lang.avis")),n.Db(4),n.oc("adminMode",!0)("showListModels",!1),n.Db(2),n.oc("ngIf",t.currentEntity.entity_id)}}const q$=function(){return["/rest/autocomplete/users/administration"]};function K$(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",99),n.Wb(1,"plugin-autocomplete",100),n.dc("triggerEvent",(function(e){return n.Dc(t),n.hc(2).linkUser(e)})),n.ic(2,"translate"),n.ic(3,"translate"),n.Vb(),n.Rb(4,"hr"),n.Vb()}2&t&&(n.Db(1),n.oc("labelPlaceholder",n.jc(2,5,"lang.linkUser"))("labelList",n.jc(3,7,"lang.availableUsers"))("routeDatas",n.uc(9,q$))("targetSearchKey","idToDisplay")("subInfoKey","descriptionToDisplay"))}function Y$(t,e){1&t&&(n.Wb(0,"mat-header-cell",101),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.firstname")))}function J$(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.firstname," ")}}function Z$(t,e){1&t&&(n.Wb(0,"mat-header-cell",101),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.lastname")))}function tH(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.lastname," ")}}function eH(t,e){1&t&&n.Rb(0,"mat-header-row")}function iH(t,e){1&t&&(n.Rb(0,"mat-row",102),n.ic(1,"translate")),2&t&&(n.qc("routerLink","/administration/users/",e.$implicit.id,""),n.pc("matTooltip",n.jc(1,2,"lang.view")))}function nH(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab",13),n.ic(1,"translate"),n.Wb(2,"div",73),n.Oc(3,K$,5,10,"div",86),n.Wb(4,"div",87),n.Wb(5,"mat-form-field"),n.Wb(6,"input",88),n.dc("keyup",(function(e){return n.Dc(t),n.hc().applyFilterUsers(e.target.value)})),n.ic(7,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(8,"div",87),n.Rb(9,"mat-paginator",89,90),n.Vb(),n.Vb(),n.Wb(11,"mat-table",91,92),n.Ub(13,93),n.Oc(14,Y$,3,3,"mat-header-cell",94),n.Oc(15,J$,2,1,"mat-cell",95),n.Tb(),n.Ub(16,96),n.Oc(17,Z$,3,3,"mat-header-cell",94),n.Oc(18,tH,2,1,"mat-cell",95),n.Tb(),n.Oc(19,eH,1,0,"mat-header-row",97),n.Oc(20,iH,2,4,"mat-row",98),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.pc("label",n.jc(1,9,"lang.users")),n.Db(3),n.oc("ngIf",t.currentEntity.canAdminUsers),n.Db(3),n.pc("placeholder",n.jc(7,11,"lang.filterBy")),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.dataSourceUsers),n.Db(8),n.oc("matHeaderRowDef",t.displayedColumnsUsers),n.Db(1),n.oc("matRowDefColumns",t.displayedColumnsUsers)}}function aH(t,e){1&t&&(n.Wb(0,"mat-header-cell",113),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.templateName")," "))}function sH(t,e){if(1&t&&(n.Wb(0,"mat-cell",114),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.pc("matTooltip",t.template_comment),n.Db(1),n.Sc(" ",t.template_label," ")}}function oH(t,e){1&t&&(n.Wb(0,"mat-header-cell",115),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.templateTarget")," "))}function rH(t,e){if(1&t&&(n.Wb(0,"mat-cell",116),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",n.jc(2,1,"lang."+t.template_target)," ")}}function cH(t,e){1&t&&n.Rb(0,"mat-header-row")}const lH=function(t){return{cursor:t}};function dH(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-row",117),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).showTemplate(i.template_id)})),n.Vb()}if(2&t){const t=n.hc(2);n.oc("ngStyle",n.vc(1,lH,t.currentEntity.canAdminTemplates?"pointer":"position"))}}function hH(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab",13),n.ic(1,"translate"),n.Wb(2,"div",73),n.Wb(3,"div",87),n.Wb(4,"mat-form-field"),n.Wb(5,"input",88),n.dc("keyup",(function(e){return n.Dc(t),n.hc().applyFilterTemplates(e.target.value)})),n.ic(6,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(7,"div",87),n.Rb(8,"mat-paginator",89,103),n.Vb(),n.Vb(),n.Wb(10,"mat-table",104,105),n.Ub(12,106),n.Oc(13,aH,3,3,"mat-header-cell",107),n.Oc(14,sH,2,2,"mat-cell",108),n.Tb(),n.Ub(15,109),n.Oc(16,oH,3,3,"mat-header-cell",110),n.Oc(17,rH,3,3,"mat-cell",111),n.Tb(),n.Oc(18,cH,1,0,"mat-header-row",97),n.Oc(19,dH,1,3,"mat-row",112),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.pc("label",n.jc(1,8,"lang.templates")),n.Db(5),n.pc("placeholder",n.jc(6,10,"lang.filterBy")),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.dataSourceTemplates),n.Db(8),n.oc("matHeaderRowDef",t.displayedColumnsTemplates),n.Db(1),n.oc("matRowDefColumns",t.displayedColumnsTemplates)}}function uH(t,e){if(1&t&&(n.Wb(0,"mat-list-item"),n.Rb(1,"mat-icon",7),n.Wb(2,"p",8),n.Wb(3,"b"),n.Qc(4),n.Vb(),n.Qc(5),n.ic(6,"translate"),n.Wb(7,"b"),n.Qc(8),n.Vb(),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.Rc(t.data.entity.entity_label),n.Db(1),n.Sc(" ",n.jc(6,4,"lang.isDestTo")," "),n.Db(3),n.Rc(t.data.entity.documents),n.Db(1),n.Sc(" ",n.jc(10,6,"lang.documents"),"")}}function pH(t,e){if(1&t&&(n.Wb(0,"mat-list-item"),n.Rb(1,"mat-icon",9),n.Wb(2,"p",8),n.Wb(3,"b"),n.Qc(4),n.Vb(),n.Qc(5),n.ic(6,"translate"),n.Wb(7,"b"),n.Qc(8),n.Vb(),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.Rc(t.data.entity.entity_label),n.Db(1),n.Sc(" ",n.jc(6,4,"lang.isCopyTo")," "),n.Db(3),n.Rc(t.data.entity.instances),n.Db(1),n.Sc(" ",n.jc(10,6,"lang.documents"),"")}}function bH(t,e){if(1&t&&(n.Wb(0,"mat-list-item"),n.Rb(1,"mat-icon",10),n.Wb(2,"p",8),n.Wb(3,"b"),n.Qc(4),n.Vb(),n.Qc(5),n.ic(6,"lowercase"),n.ic(7,"translate"),n.Wb(8,"b"),n.Qc(9),n.Vb(),n.Qc(10),n.ic(11,"lowercase"),n.ic(12,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.Rc(t.data.entity.entity_label),n.Db(1),n.Sc(" ",n.jc(6,4,n.jc(7,6,"lang.isLinkedTo"))," "),n.Db(4),n.Rc(t.data.entity.users.length),n.Db(1),n.Sc(" ",n.jc(11,8,n.jc(12,10,"lang.usersAlt")),"")}}function fH(t,e){if(1&t&&(n.Wb(0,"mat-list-item"),n.Rb(1,"mat-icon",11),n.Wb(2,"p",8),n.Wb(3,"b"),n.Qc(4),n.Vb(),n.Qc(5),n.ic(6,"lowercase"),n.ic(7,"translate"),n.Wb(8,"b"),n.Qc(9),n.Vb(),n.Qc(10),n.ic(11,"lowercase"),n.ic(12,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.Rc(t.data.entity.entity_label),n.Db(1),n.Sc(" ",n.jc(6,4,n.jc(7,6,"lang.isLinkedTo"))," "),n.Db(4),n.Rc(t.data.entity.templates.length),n.Db(1),n.Sc(" ",n.jc(11,8,n.jc(12,10,"lang.templates")),"")}}const mH=function(){return["/rest/autocomplete/entities"]};let gH=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this.translate=t,this.http=e,this.notify=i,this.dialog=n,this.headerService=a,this.router=s,this.appService=o,this.functions=r,this.viewContainerRef=c,this.loading=!1,this.entities=[],this.listTemplateRoles=[],this.entityTypeList=[],this.currentEntity={},this.isDraggable=!0,this.newEntity=!1,this.creationMode=!1,this.visaCircuitModified=!1,this.opinionCircuitModified=!1,this.config={},this.dataSourceUsers=new vt.p(this.currentEntity.users),this.dataSourceTemplates=new vt.p(this.currentEntity.templates),this.displayedColumnsUsers=["firstname","lastname"],this.displayedColumnsTemplates=["template_label","template_target"]}applyFilterUsers(t){t=(t=t.trim()).toLowerCase(),this.dataSourceUsers.filter=t}applyFilterTemplates(t){t=(t=t.trim()).toLowerCase(),this.dataSourceTemplates.filter=t}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.entities")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,yield this.getEntityTypes(),yield this.getRoles(),yield this.getEntities(),this.loading=!1,this.initEntitiesTree()}))}initEntitiesTree(){setTimeout(()=>{$("#jstree").jstree({checkbox:{deselect_all:!0,three_state:!1},core:{force_text:!0,themes:{name:"proton",responsive:!0},multiple:!1,data:this.entities,check_callback:function(t,e,i,n,a){if("move_node"===t)return"#"!==i.id&&!!i.original.allowed}},dnd:{is_draggable:function(t){let e=0;const i=t.length;for(;e<i;e++)if(!t[e].original.allowed)return!1;return!0}},plugins:["checkbox","search","dnd","sort"]}),$("#jstree").jstree("select_node",this.entities[0]);let t=!1;$("#jstree_search").keyup((function(){t&&clearTimeout(t),t=setTimeout((function(){const t=$("#jstree_search").val();$("#jstree").jstree(!0).search(t)}),250)})),$("#jstree").on("select_node.jstree",(t,e)=>{!1===this.sidenavRight.opened&&this.sidenavRight.open(),!0===this.creationMode?this.currentEntity.parent_entity_id=e.node.id:!0===this.newEntity?(this.loadEntity(this.currentEntity.entity_id),this.newEntity=!1):this.loadEntity(e.node.id)}).on("deselect_node.jstree",(t,e)=>{this.sidenavRight.close()}).on("move_node.jstree",(t,e)=>{this.currentEntity.parent_entity_id!==this.currentEntity.entity_id&&(this.currentEntity.parent_entity_id=e.parent),this.moveEntity()}).jstree(),$(document).on("dnd_start.vakata",(t,e)=>{$("#jstree").jstree("deselect_all"),$("#jstree").jstree("select_node",e.data.nodes[0])})},0)}getEntityTypes(){return new Promise((t,e)=>{this.http.get("../rest/entityTypes").pipe(Object(mt.a)(e=>{this.entityTypeList=e.types,t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}getRoles(){return new Promise((t,e)=>{this.http.get("../rest/listTemplates/types/entity_id/roles").pipe(Object(mt.a)(e=>{this.listTemplateRoles=e.roles,t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}getEntities(){return new Promise((t,e)=>{this.http.get("../rest/entities").pipe(Object(mt.a)(e=>{this.entities=e.entities,t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}loadEntity(t){this.visaCircuitModified=!1,this.opinionCircuitModified=!1,this.http.get("../rest/entities/"+t+"/details").subscribe(t=>{this.currentEntity=t.entity,this.appDiffusionsList.loadListModel(this.currentEntity.id),this.appVisaWorkflow.loadListModel(this.currentEntity.id),this.appAvisWorkflow.loadListModel(this.currentEntity.id),this.idVisaCircuit=this.currentEntity.visaCircuit?this.currentEntity.visaCircuit.id:null,this.idOpinionCircuit=this.currentEntity.opinionCircuit?this.currentEntity.opinionCircuit.id:null,this.dataSourceUsers=new vt.p(this.currentEntity.users),this.dataSourceUsers.paginator=this.paginatorUsers,this.dataSourceUsers.sort=this.sortUsers,this.dataSourceTemplates=new vt.p(this.currentEntity.templates),this.dataSourceTemplates.paginator=this.paginatorTemplates,this.dataSourceTemplates.sort=this.sortTemplates,this.currentEntity.listTemplate.items||(this.currentEntity.listTemplate.items=[]),this.listTemplateRoles.forEach(t=>{t.available&&!this.currentEntity.listTemplate.items[t.id]&&(this.currentEntity.listTemplate.items[t.id]=[])})},t=>{this.notify.error(t.error.errors)})}addElemListModelVisa(t){this.visaCircuitModified=!0;const e={id:t.id,type:"user",mode:"sign",idToDisplay:t.idToDisplay,descriptionToDisplay:t.otherInfo};this.currentEntity.visaCircuit.items||(this.currentEntity.visaCircuit.items=[]),this.currentEntity.visaCircuit.items.push(e),this.currentEntity.visaCircuit.items.length>1&&(this.currentEntity.visaCircuit.items[this.currentEntity.visaCircuit.items.length-2].mode="visa")}addElemListModelOpinion(t){this.opinionCircuitModified=!0;const e={id:t.id,type:"user",mode:"avis",idToDisplay:t.idToDisplay,descriptionToDisplay:t.otherInfo};this.currentEntity.opinionCircuit.items||(this.currentEntity.opinionCircuit.items=[]),this.currentEntity.opinionCircuit.items.push(e)}saveEntity(){"#"===this.currentEntity.parent_entity_id&&(this.currentEntity.parent_entity_id="");let t=!0;""===this.currentEntity.parent_entity_id&&(t=confirm(this.translate.instant("lang.entityWithoutParentMessage"))),t&&(this.creationMode?(this.functions.empty(this.currentEntity.producerService)&&(this.currentEntity.producerService=this.currentEntity.entity_id),this.http.post("../rest/entities",this.currentEntity).subscribe(t=>{this.currentEntity.listTemplate=[],this.entities=t.entities,this.creationMode=!1,this.newEntity=!0,$("#jstree").jstree(!0).settings.core.data=this.entities,$("#jstree").jstree(!0).refresh(),$("#jstree").on("refresh.jstree",t=>{$("#jstree").jstree("deselect_all"),$("#jstree").jstree("select_node",this.currentEntity.entity_id)}),this.notify.success(this.translate.instant("lang.entityAdded"))},t=>{this.notify.error(t.error.errors)})):this.http.put("../rest/entities/"+this.currentEntity.entity_id,this.currentEntity).subscribe(t=>{this.entities=t.entities,$("#jstree").jstree(!0).settings.core.data=this.entities,$("#jstree").jstree("refresh"),this.notify.success(this.translate.instant("lang.entityUpdated"))},t=>{this.notify.error(t.error.errors)}))}moveEntity(){this.http.put("../rest/entities/"+this.currentEntity.entity_id,this.currentEntity).subscribe(()=>{this.notify.success(this.translate.instant("lang.entityUpdated"))},t=>{this.notify.error(t.error.errors)})}readMode(){if(this.creationMode=!1,this.isDraggable=!0,$("#jstree").jstree("deselect_all"),this.currentEntity.parent_entity_id){for(let t=0;t<this.entities.length;t++)if(this.entities[t].entity_id===this.currentEntity.parent_entity_id){$("#jstree").jstree("select_node",this.entities[t]);break}}else this.sidenavRight.close()}selectParentEntity(t){this.creationMode&&($("#jstree").jstree("deselect_all"),$("#jstree").jstree("select_node",t))}removeEntity(){this.currentEntity.documents>0||this.currentEntity.redirects>0||this.currentEntity.instances>0||this.currentEntity.users.length>0||this.currentEntity.templates.length>0?(this.config={panelClass:"maarch-modal",data:{entity:this.currentEntity}},this.dialogRef=this.dialog.open(vH,this.config),this.dialogRef.afterClosed().subscribe(t=>{t&&(this.currentEntity.listTemplate.id&&this.http.delete("../rest/listTemplates/"+this.currentEntity.listTemplate.id).subscribe(t=>{this.currentEntity.listTemplate.id=t.id,this.http.get("../rest/listTemplates/types/entity_id/roles").subscribe(t=>{this.listTemplateRoles=t.roles},t=>{this.notify.error(t.error.errors)})},t=>{this.notify.error(t.error.errors)}),this.idVisaCircuit&&this.http.delete("../rest/listTemplates/"+this.idVisaCircuit).subscribe(()=>{this.idVisaCircuit=null},t=>{this.notify.error(t.error.errors)}),this.http.put("../rest/entities/"+t.entity_id+"/reassign/"+t.redirectEntity,{}).subscribe(t=>{this.entities=t.entities,$("#jstree").jstree(!0).settings.core.data=this.entities,$("#jstree").jstree("refresh"),this.sidenavRight.close(),this.notify.success(this.translate.instant(void 0===t.deleted||t.deleted?"lang.entityDeleted":"lang.entityDeletedButAnnuaryUnreachable"))},t=>{this.notify.error(t.error.errors)})),this.dialogRef=null})):confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.delete")+" \xab "+this.currentEntity.entity_label+" \xbb")&&(this.currentEntity.listTemplate.id&&this.http.delete("../rest/listTemplates/"+this.currentEntity.listTemplate.id).subscribe(t=>{this.currentEntity.listTemplate.id=t.id,this.http.get("../rest/listTemplates/types/entity_id/roles").subscribe(t=>{this.listTemplateRoles=t.roles},t=>{this.notify.error(t.error.errors)})},t=>{this.notify.error(t.error.errors)}),this.idVisaCircuit&&this.http.delete("../rest/listTemplates/"+this.idVisaCircuit).subscribe(()=>{this.idVisaCircuit=null},t=>{this.notify.error(t.error.errors)}),this.http.delete("../rest/entities/"+this.currentEntity.entity_id).subscribe(t=>{this.entities=t.entities,$("#jstree").jstree(!0).settings.core.data=this.entities,$("#jstree").jstree("refresh"),this.sidenavRight.close(),this.notify.success(this.translate.instant(void 0===t.deleted||t.deleted?"lang.entityDeleted":"lang.entityDeletedButAnnuaryUnreachable"))},t=>{this.notify.error(t.error.errors)}))}prepareEntityAdd(){if(this.creationMode=!0,this.isDraggable=!1,this.currentEntity.entity_id){for(let t=0;t<this.entities.length;t++)if(this.entities[t].entity_id===this.currentEntity.entity_id){this.currentEntity={entity_type:this.entityTypeList[0].id},this.currentEntity.parent_entity_id=this.entities[t].entity_id;break}}else this.currentEntity={entity_type:this.entityTypeList[0].id},$("#jstree").jstree("deselect_all"),this.sidenavRight.open()}updateStatus(t,e){this.http.put("../rest/entities/"+t.entity_id+"/status",{method:e}).subscribe(t=>{this.notify.success("")},t=>{this.notify.error(t.error.errors)})}saveDiffList(){const t={title:this.currentEntity.entity_id,description:this.currentEntity.entity_id,type:"diffusionList",entityId:this.currentEntity.id,items:this.appDiffusionsList.getCurrentListinstance().map(t=>({id:t.item_id,type:t.item_type,mode:t.item_mode}))};this.functions.empty(this.currentEntity.listTemplate.id)?this.http.post("../rest/listTemplates?admin=true",t).pipe(Object(mt.a)(t=>{this.currentEntity.listTemplate.id=t.id,this.notify.success(this.translate.instant("lang.diffusionModelUpdated")),this.appDiffusionsList.loadListModel(this.currentEntity.id)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe():this.http.put("../rest/listTemplates/"+this.currentEntity.listTemplate.id,t).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.diffusionModelUpdated")),this.appDiffusionsList.loadListModel(this.currentEntity.id)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}deleteDiffList(){this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete("../rest/listTemplates/"+this.currentEntity.listTemplate.id)),Object(mt.a)(()=>{this.currentEntity.listTemplate.id=null,this.notify.success(this.translate.instant("lang.diffusionModelDeleted")),this.appDiffusionsList.loadListModel(this.currentEntity.id)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}saveDiffListVisa(){const t={title:this.currentEntity.entity_id,description:this.currentEntity.entity_id,type:"visaCircuit",entityId:this.currentEntity.id,items:this.appVisaWorkflow.getWorkflow().map((t,e)=>({id:t.item_id,type:t.item_type,mode:t.requested_signature?"sign":"visa",sequence:e}))};this.appVisaWorkflow.isValidWorkflow()||this.functions.empty(t.items)?this.functions.empty(t.items)?this.http.delete("../rest/listTemplates/"+this.idVisaCircuit).pipe(Object(mt.a)(()=>{this.idVisaCircuit=null,this.notify.success(this.translate.instant("lang.diffusionModelDeleted")),this.appVisaWorkflow.loadListModel(this.currentEntity.id)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe():this.functions.empty(this.idVisaCircuit)?this.http.post("../rest/listTemplates?admin=true",t).pipe(Object(mt.a)(t=>{this.idVisaCircuit=t.id,this.notify.success(this.translate.instant("lang.diffusionModelUpdated")),this.appVisaWorkflow.loadListModel(this.currentEntity.id)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe():this.http.put("../rest/listTemplates/"+this.idVisaCircuit,t).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.diffusionModelUpdated")),this.appVisaWorkflow.loadListModel(this.currentEntity.id)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe():this.notify.error(this.appVisaWorkflow.getError())}saveDiffListOpinion(){const t={title:this.currentEntity.entity_id,description:this.currentEntity.entity_id,type:"opinionCircuit",entityId:this.currentEntity.id,items:this.appAvisWorkflow.getWorkflow().map((t,e)=>({id:t.item_id,type:t.item_type,mode:"avis",sequence:e}))};this.functions.empty(t.items)?this.http.delete("../rest/listTemplates/"+this.idOpinionCircuit).pipe(Object(mt.a)(()=>{this.idOpinionCircuit=null,this.notify.success(this.translate.instant("lang.diffusionModelDeleted")),this.appAvisWorkflow.loadListModel(this.currentEntity.id)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe():this.functions.empty(this.idOpinionCircuit)?this.http.post("../rest/listTemplates?admin=true",t).pipe(Object(mt.a)(t=>{this.idOpinionCircuit=t.id,this.notify.success(this.translate.instant("lang.diffusionModelUpdated")),this.appAvisWorkflow.loadListModel(this.currentEntity.id)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe():this.http.put("../rest/listTemplates/"+this.idOpinionCircuit,t).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.diffusionModelUpdated")),this.appAvisWorkflow.loadListModel(this.currentEntity.id)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}removeDiffListOpinion(t,e){this.opinionCircuitModified=!0,this.currentEntity.opinionCircuit.items.splice(e,1)}toggleRole(t){t.usedIn.length>0?this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,data:{title:this.translate.instant("lang.confirmAction"),msg:this.translate.instant("lang.roleUsedInTemplateInfo")+" : <b>"+t.usedIn.join(", ")+"</b><br/>"+this.translate.instant("lang.roleUsedInTemplateInfo2")}}).afterClosed().subscribe(e=>{"ok"===e&&(t.available=!t.available,this.http.put("../rest/listTemplates/types/entity_id/roles",{roles:this.listTemplateRoles}).subscribe(()=>{t.usedIn=[],this.currentEntity.listTemplate&&(this.currentEntity.listTemplate.items[t.id]=[]),this.notify.success(this.translate.instant("lang.listTemplatesRolesUpdated"))},t=>{this.notify.error(t.error.errors)}))}):(t.available=!t.available,this.http.put("../rest/listTemplates/types/entity_id/roles",{roles:this.listTemplateRoles}).subscribe(()=>{this.currentEntity.listTemplate&&(this.currentEntity.listTemplate.items[t.id]=[],this.http.get("../rest/listTemplates/types/entity_id/roles").subscribe(t=>{this.listTemplateRoles=t.roles},t=>{this.notify.error(t.error.errors)})),this.notify.success(this.translate.instant("lang.listTemplatesRolesUpdated"))},t=>{this.notify.error(t.error.errors)}))}linkUser(t){this.http.post("../rest/users/"+t.id+"/entities",{entityId:this.currentEntity.entity_id,role:""}).subscribe(e=>{const i=t.idToDisplay.split(" ");this.currentEntity.users.push({id:t.id,user_id:t.otherInfo,firstname:i[0],lastname:i[1]}),this.dataSourceUsers=new vt.p(this.currentEntity.users),this.dataSourceUsers.paginator=this.paginatorUsers,this.dataSourceUsers.sort=this.sortUsers,this.notify.success(this.translate.instant("lang.userAdded"))},t=>{this.notify.error(t.error.errors)})}showTemplate(t){this.currentEntity.canAdminTemplates&&this.router.navigate(["/administration/templates/"+t])}addEntityToAnnuary(){this.http.put("../rest/entities/"+this.currentEntity.id+"/annuaries",this.currentEntity).subscribe(t=>{this.currentEntity.business_id=t.entitySiret,this.notify.success(this.translate.instant(void 0===t.synchronized?"lang.siretGenerated":t.synchronized?"lang.siretGeneratedAndSynchronizationDone":"lang.siretGeneratedButAnnuaryUnreachable"))},t=>{this.notify.handleErrors(t)})}openExportModal(){this.dialog.open(p$,{panelClass:"maarch-modal",width:"400px",autoFocus:!1})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(y.a),n.Qb(o.c),n.Qb(w.a),n.Qb(_t.a),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(b$,!0),n.Kc(f$,!0),n.Xc(m$,!0),n.Xc(g$,!0),n.Xc(v$,!0),n.Xc(_$,!0),n.Xc(y$,!0),n.Xc(x$,!0),n.Xc(C$,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginatorUsers=i.first),n.yc(i=n.ec())&&(e.paginatorTemplates=i.first),n.yc(i=n.ec())&&(e.sortUsers=i.first),n.yc(i=n.ec())&&(e.sortTemplates=i.first),n.yc(i=n.ec())&&(e.appDiffusionsList=i.first),n.yc(i=n.ec())&&(e.appVisaWorkflow=i.first),n.yc(i=n.ec())&&(e.appAvisWorkflow=i.first))},decls:129,vars:139,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["fixedTopGap","56","position","end",1,"col-md-5","col-xs-11",3,"mode","fixedInViewport","opened"],["snav2",""],[3,"label"],[1,"form-horizontal",2,"overflow","hidden"],["entityForm","ngForm"],[1,"form-group"],[1,"col-sm-12"],["id","parent_entity_id","name","parent_entity_id",3,"title","placeholder","ngModel","ngModelChange","selectionChange"],["value",""],[2,"opacity","0.5","text-align","center"],[4,"ngFor","ngForOf"],["id","entity_type","name","entity_type","maxlength","32","required","",3,"title","placeholder","ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["class","form-group",4,"ngIf"],["matInput","","required","","name","entity_id","id","entity_id","type","text","maxlength","32","pattern","^[\\w-]*$",3,"ngModel","title","placeholder","disabled","ngModelChange"],["matInput","","required","","name","entity_label","id","entity_label","type","text","maxlength","255",3,"ngModel","title","placeholder","ngModelChange"],["matInput","","required","","name","short_label","id","short_label","type","text","maxlength","50",3,"ngModel","title","placeholder","ngModelChange"],["matInput","","name","email","id","email","type","text","maxlength","255","pattern","(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$)",3,"ngModel","title","placeholder","ngModelChange"],[1,"col-sm-4"],["matInput","","name","adrs_1","id","adrs_1","type","text","maxlength","255",3,"ngModel","title","placeholder","ngModelChange"],["matInput","","name","adrs_2","id","adrs_2","type","text","maxlength","255",3,"ngModel","title","placeholder","ngModelChange"],["matInput","","name","adrs_3","id","adrs_3","type","text","maxlength","255",3,"ngModel","title","placeholder","ngModelChange"],["matInput","","name","zipcode","id","zipcode","type","text","maxlength","32",3,"ngModel","title","placeholder","ngModelChange"],["matInput","","name","city","id","city","type","text","maxlength","255",3,"ngModel","title","placeholder","ngModelChange"],["matInput","","name","country","id","country","type","text","maxlength","255",3,"ngModel","title","placeholder","ngModelChange"],["matInput","","name","entity_full_name","id","entity_full_name","matTextareaAutosize","","matAutosizeMinRows","1","matAutosizeMaxRows","5",3,"ngModel","placeholder","title","ngModelChange"],["matInput","","name","producerService","id","producerService","type","text","maxlength","255","pattern","^[\\w-]*$",3,"ngModel","title","placeholder","ngModelChange"],[1,"col-md-12","text-center",2,"padding","10px"],["mat-raised-button","","color","primary",3,"disabled","click"],["mat-raised-button","","color","warn",3,"disabled","click",4,"ngIf"],["mat-raised-button","","color","default",3,"click",4,"ngIf"],[3,"label",4,"ngIf"],["mat-subheader",""],["mat-list-item","",3,"click",4,"ngIf"],["mat-list-item","",3,"click"],["color","primary","mat-list-icon","",1,"fas","fa-file-export"],["mat-line",""],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-list-item","","disableRipple","true",4,"ngIf"],["mat-list-item","","disableRipple","true"],["color","primary","mat-list-icon",""],["color","primary",3,"checked","click"],["mat-line","",3,"ngStyle","click"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],["matInput","","id","jstree_search","name","jstree_search","type","text",3,"placeholder"],[4,"ngIf"],["id","jstree"],[1,"mat-paginator",2,"min-height","48px","min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],[3,"value",4,"ngIf"],[3,"value"],["matInput","","name","id","id","id","type","text","disabled","",3,"ngModel","title","placeholder","ngModelChange"],["matInput","","value","Param\xe8tre SIRET manquant","type","text","maxlength","255","disabled","",3,"title","placeholder",4,"ngIf"],["matInput","","name","business_id","id","business_id","type","text","maxlength","255","disabled","",3,"ngModel","title","placeholder","ngModelChange",4,"ngIf"],["color","primary","mat-icon-button","","matSuffix","","title","G\xe9n\xe9rer un num\xe9ro SIRET",3,"click",4,"ngIf"],["matInput","","value","Param\xe8tre SIRET manquant","type","text","maxlength","255","disabled","",3,"title","placeholder"],["matInput","","name","business_id","id","business_id","type","text","maxlength","255","disabled","",3,"ngModel","title","placeholder","ngModelChange"],["color","primary","mat-icon-button","","matSuffix","","title","G\xe9n\xe9rer un num\xe9ro SIRET",3,"click"],[1,"fas","fa-compress-arrows-alt"],["mat-raised-button","","color","warn",3,"disabled","click"],["mat-raised-button","","color","default",3,"click"],[1,"row",2,"margin","0px"],[1,"col-md-12"],[3,"adminMode","target"],["appDiffusionsList",""],["mat-raised-button","","color","default",3,"disabled","click"],["mat-raised-button","","color","warn",3,"click",4,"ngIf"],["mat-raised-button","","color","warn",3,"click"],["id","visaCircuitContent",1,"row",2,"margin","0px"],[3,"adminMode","showListModels","showComment"],["appVisaWorkflow",""],["id","opinionCircuitContent",1,"row",2,"margin","0px"],[3,"adminMode","showListModels"],["appAvisWorkflow",""],["class","col-md-12","style","padding:5px;",4,"ngIf"],[1,"col-md-6","col-xs-6"],["matInput","",3,"placeholder","keyup"],[3,"length","hidePageSize","pageSize"],["paginatorUsers",""],["matSort","","matSortActive","lastname","matSortDirection","asc",3,"dataSource"],["tableUsers","matSort"],["matColumnDef","firstname"],["mat-sort-header","",4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","lastname"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"routerLink","matTooltip",4,"matRowDef","matRowDefColumns"],[1,"col-md-12",2,"padding","5px"],[3,"labelPlaceholder","labelList","routeDatas","targetSearchKey","subInfoKey","triggerEvent"],["mat-sort-header",""],[2,"cursor","pointer",3,"routerLink","matTooltip"],["paginatorTemplates",""],["matSort","","matSortActive","template_label","matSortDirection","asc",3,"dataSource"],["tableTemplates","matSort"],["matColumnDef","template_label"],["mat-sort-header","","style","flex:2;",4,"matHeaderCellDef"],["style","flex:2;",3,"matTooltip",4,"matCellDef"],["matColumnDef","template_target"],["mat-sort-header","","style","flex:1;",4,"matHeaderCellDef"],["style","flex:1;",4,"matCellDef"],[3,"ngStyle","click",4,"matRowDef","matRowDefColumns"],["mat-sort-header","",2,"flex","2"],[2,"flex","2",3,"matTooltip"],["mat-sort-header","",2,"flex","1"],[2,"flex","1"],[3,"ngStyle","click"]],template:function(t,e){if(1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,k$,16,11,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,S$,2,0,"div",9),n.Oc(14,V$,10,9,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Wb(15,"mat-sidenav",11,12),n.Wb(17,"mat-nav-list"),n.Wb(18,"mat-tab-group"),n.Wb(19,"mat-tab",13),n.ic(20,"translate"),n.ic(21,"translate"),n.Wb(22,"form",14,15),n.Wb(24,"div",16),n.Wb(25,"div",17),n.Wb(26,"mat-form-field"),n.Wb(27,"mat-select",18),n.dc("ngModelChange",(function(t){return e.currentEntity.parent_entity_id=t}))("selectionChange",(function(){return e.selectParentEntity(e.currentEntity.parent_entity_id)})),n.ic(28,"translate"),n.ic(29,"translate"),n.Wb(30,"mat-option",19),n.Wb(31,"i",20),n.Qc(32),n.ic(33,"translate"),n.Vb(),n.Vb(),n.Oc(34,j$,2,1,"ng-container",21),n.ic(35,"sortBy"),n.Vb(),n.Vb(),n.Wb(36,"mat-form-field"),n.Wb(37,"mat-select",22),n.dc("ngModelChange",(function(t){return e.currentEntity.entity_type=t})),n.ic(38,"translate"),n.ic(39,"translate"),n.Oc(40,A$,2,2,"mat-option",23),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Oc(41,W$,6,7,"div",24),n.Wb(42,"div",16),n.Wb(43,"div",17),n.Wb(44,"mat-form-field"),n.Wb(45,"input",25),n.dc("ngModelChange",(function(t){return e.currentEntity.entity_id=t})),n.ic(46,"translate"),n.ic(47,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(48,"div",16),n.Wb(49,"div",17),n.Wb(50,"mat-form-field"),n.Wb(51,"input",26),n.dc("ngModelChange",(function(t){return e.currentEntity.entity_label=t})),n.ic(52,"translate"),n.ic(53,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(54,"div",16),n.Wb(55,"div",17),n.Wb(56,"mat-form-field"),n.Wb(57,"input",27),n.dc("ngModelChange",(function(t){return e.currentEntity.short_label=t})),n.ic(58,"translate"),n.ic(59,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(60,"div",16),n.Wb(61,"div",17),n.Wb(62,"mat-form-field"),n.Wb(63,"input",28),n.dc("ngModelChange",(function(t){return e.currentEntity.email=t})),n.ic(64,"translate"),n.ic(65,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(66,"mat-accordion"),n.Wb(67,"mat-expansion-panel"),n.Wb(68,"mat-expansion-panel-header"),n.Wb(69,"mat-panel-title"),n.Qc(70),n.ic(71,"translate"),n.Vb(),n.Vb(),n.Wb(72,"div",16),n.Wb(73,"div",29),n.Wb(74,"mat-form-field"),n.Wb(75,"input",30),n.dc("ngModelChange",(function(t){return e.currentEntity.adrs_1=t})),n.ic(76,"translate"),n.ic(77,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(78,"div",29),n.Wb(79,"mat-form-field"),n.Wb(80,"input",31),n.dc("ngModelChange",(function(t){return e.currentEntity.adrs_2=t})),n.ic(81,"translate"),n.ic(82,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(83,"div",29),n.Wb(84,"mat-form-field"),n.Wb(85,"input",32),n.dc("ngModelChange",(function(t){return e.currentEntity.adrs_3=t})),n.ic(86,"translate"),n.ic(87,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(88,"div",16),n.Wb(89,"div",29),n.Wb(90,"mat-form-field"),n.Wb(91,"input",33),n.dc("ngModelChange",(function(t){return e.currentEntity.zipcode=t})),n.ic(92,"translate"),n.ic(93,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(94,"div",29),n.Wb(95,"mat-form-field"),n.Wb(96,"input",34),n.dc("ngModelChange",(function(t){return e.currentEntity.city=t})),n.ic(97,"translate"),n.ic(98,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(99,"div",29),n.Wb(100,"mat-form-field"),n.Wb(101,"input",35),n.dc("ngModelChange",(function(t){return e.currentEntity.country=t})),n.ic(102,"translate"),n.ic(103,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(104,"div",16),n.Wb(105,"div",17),n.Wb(106,"mat-form-field"),n.Wb(107,"textarea",36),n.dc("ngModelChange",(function(t){return e.currentEntity.entity_full_name=t})),n.ic(108,"translate"),n.ic(109,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Oc(110,L$,6,3,"div",24),n.Wb(111,"div",16),n.Wb(112,"div",17),n.Wb(113,"mat-form-field"),n.Wb(114,"input",37),n.dc("ngModelChange",(function(t){return e.currentEntity.producerService=t})),n.ic(115,"translate"),n.ic(116,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(117,"div",16),n.Wb(118,"div",38),n.Wb(119,"button",39),n.dc("click",(function(){return e.saveEntity()})),n.Qc(120),n.ic(121,"translate"),n.Vb(),n.Oc(122,Q$,3,4,"button",40),n.Oc(123,N$,3,3,"button",41),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Oc(124,U$,7,6,"mat-tab",42),n.Oc(125,H$,7,7,"mat-tab",42),n.Oc(126,X$,7,6,"mat-tab",42),n.Oc(127,nH,21,13,"mat-tab",42),n.Oc(128,hH,20,12,"mat-tab",42),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.zc(23);n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",!1),n.Db(4),n.oc("label",e.creationMode?n.jc(20,70,"lang.createNewEntity"):n.jc(21,72,"lang.informations")),n.Db(8),n.pc("title",n.jc(28,74,"lang.isLinkedTo")),n.pc("placeholder",n.jc(29,76,"lang.isLinkedTo")),n.oc("ngModel",e.currentEntity.parent_entity_id),n.Db(5),n.Sc("- ",n.jc(33,78,"lang.noEntity")," -"),n.Db(2),n.oc("ngForOf",n.kc(35,80,e.entities,"entity_label")),n.Db(3),n.pc("title",n.jc(38,83,"lang.entityType")),n.pc("placeholder",n.jc(39,85,"lang.entityType")),n.oc("ngModel",e.currentEntity.entity_type),n.Db(3),n.oc("ngForOf",e.entityTypeList),n.Db(1),n.oc("ngIf",!e.creationMode),n.Db(4),n.pc("title",n.jc(46,87,"lang.id")),n.pc("placeholder",n.jc(47,89,"lang.id")),n.oc("ngModel",e.currentEntity.entity_id)("disabled",!e.creationMode),n.Db(6),n.pc("title",n.jc(52,91,"lang.label")),n.pc("placeholder",n.jc(53,93,"lang.label")),n.oc("ngModel",e.currentEntity.entity_label),n.Db(6),n.pc("title",n.jc(58,95,"lang.shortLabel")),n.pc("placeholder",n.jc(59,97,"lang.shortLabel")),n.oc("ngModel",e.currentEntity.short_label),n.Db(6),n.pc("title",n.jc(64,99,"lang.email")),n.pc("placeholder",n.jc(65,101,"lang.email")),n.oc("ngModel",e.currentEntity.email),n.Db(7),n.Sc(" ",n.jc(71,103,"lang.otherInformations")," "),n.Db(5),n.qc("title","",n.jc(76,105,"lang.address"),"1"),n.qc("placeholder","",n.jc(77,107,"lang.address"),"1"),n.oc("ngModel",e.currentEntity.adrs_1),n.Db(5),n.qc("title","",n.jc(81,109,"lang.address"),"2"),n.qc("placeholder","",n.jc(82,111,"lang.address"),"2"),n.oc("ngModel",e.currentEntity.adrs_2),n.Db(5),n.qc("title","",n.jc(86,113,"lang.address"),"3"),n.qc("placeholder","",n.jc(87,115,"lang.address"),"3"),n.oc("ngModel",e.currentEntity.adrs_3),n.Db(6),n.pc("title",n.jc(92,117,"lang.zipcode")),n.pc("placeholder",n.jc(93,119,"lang.zipcode")),n.oc("ngModel",e.currentEntity.zipcode),n.Db(5),n.pc("title",n.jc(97,121,"lang.city")),n.pc("placeholder",n.jc(98,123,"lang.city")),n.oc("ngModel",e.currentEntity.city),n.Db(5),n.pc("title",n.jc(102,125,"lang.country")),n.pc("placeholder",n.jc(103,127,"lang.country")),n.oc("ngModel",e.currentEntity.country),n.Db(6),n.pc("placeholder",n.jc(108,129,"lang.entityFullName")),n.pc("title",n.jc(109,131,"lang.entityFullName")),n.oc("ngModel",e.currentEntity.entity_full_name),n.Db(3),n.oc("ngIf",!e.creationMode),n.Db(4),n.pc("title",n.jc(115,133,"lang.producerService")),n.pc("placeholder",n.jc(116,135,"lang.producerService")),n.oc("ngModel",e.currentEntity.producerService),n.Db(5),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(121,137,"lang.save")),n.Db(2),n.oc("ngIf",!e.creationMode),n.Db(1),n.oc("ngIf",e.creationMode),n.Db(1),n.oc("ngIf",!e.creationMode),n.Db(1),n.oc("ngIf",!e.creationMode),n.Db(1),n.oc("ngIf",!e.creationMode),n.Db(1),n.oc("ngIf",!e.creationMode),n.Db(1),n.oc("ngIf",!e.creationMode)}},directives:[I.e,I.f,Ot,We,P.t,I.d,R.h,Te.c,Te.a,X.K,X.v,X.w,Y.c,ee.a,X.u,X.x,W.p,P.s,X.p,X.F,J.b,X.d,X.B,gt.a,gt.c,gt.g,gt.h,J.d,k.b,R.g,R.d,S.a,R.c,W.l,T.a,te.a,P.w,V.c,K.a,Y.f,Y.j,im,Ko,Qv,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,ii,vt.h,Fe.b,vt.a,vt.j,vt.m,o.d,A.b],pipes:[g.d,Wt.a],styles:[".mat-list-item[draggable=false][_ngcontent-%COMP%]:hover{background:inherit}.mat-list-item[draggable=false][_ngcontent-%COMP%]{cursor:not-allowed!important}.mat-list-item[draggable=true][_ngcontent-%COMP%]{cursor:pointer}.mat-list-item[draggable=true][_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{cursor:move}"]}),t})(),vH=(()=>{class t{constructor(t,e,i,n){this.translate=t,this.http=e,this.data=i,this.dialogRef=n}setRedirectEntity(t){this.data.entity.redirectEntity=t.id}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.a),n.Qb(q.h))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:19,vars:21,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["role","alert",1,"alert-message","alert-message-info"],[4,"ngIf"],["singleMode","","required","",3,"labelPlaceholder","labelList","routeDatas","targetSearchKey","subInfoKey","triggerEvent"],[1,"divider-modal"],["mat-raised-button","","color","warn","type","submit",1,"btn","btn-danger",3,"disabled","click"],["color","primary","mat-list-icon","",1,"fa","fa-file","fa-2x"],["mat-line",""],["color","primary","mat-list-icon","",1,"fa","fa-sitemap","fa-2x"],["color","primary","mat-list-icon","",1,"fa","fa-user","fa-2x"],["color","primary","mat-list-icon","",1,"fa","fa-file-alt","fa-2x"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h2",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-dialog-content"),n.Wb(5,"div",2),n.Wb(6,"mat-list"),n.Oc(7,uH,11,8,"mat-list-item",3),n.Oc(8,pH,11,8,"mat-list-item",3),n.Oc(9,bH,13,12,"mat-list-item",3),n.Oc(10,fH,13,12,"mat-list-item",3),n.Vb(),n.Vb(),n.Wb(11,"plugin-autocomplete",4),n.dc("triggerEvent",(function(t){return e.setRedirectEntity(t)})),n.ic(12,"translate"),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Rb(14,"span",5),n.Wb(15,"mat-dialog-actions"),n.Wb(16,"button",6),n.dc("click",(function(){return e.dialogRef.close(e.data.entity)})),n.Qc(17),n.ic(18,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,12,"lang.entityReplacement")),n.Db(5),n.oc("ngIf",e.data.entity.documents>0),n.Db(1),n.oc("ngIf",e.data.entity.instances>0),n.Db(1),n.oc("ngIf",e.data.entity.users.length>0),n.Db(1),n.oc("ngIf",e.data.entity.templates.length>0),n.Db(1),n.oc("labelPlaceholder",n.jc(12,14,"lang.chooseEntity"))("labelList",n.jc(13,16,"lang.availableEntities"))("routeDatas",n.uc(20,mH))("targetSearchKey","idToDisplay")("subInfoKey","descriptionToDisplay"),n.Db(5),n.oc("disabled",void 0===e.data.entity.redirectEntity||e.data.entity.redirectEntity==e.data.entity.entity_id),n.Db(1),n.Rc(n.jc(18,18,"lang.delete")))},directives:[q.i,q.f,R.a,P.t,ii,q.c,k.b,R.d,S.a,R.c,W.l],pipes:[g.d,P.p],styles:[".alert-message[_ngcontent-%COMP%] { max-width: inherit; }"]}),t})();const _H=["adminMenuTemplate"];function yH(t,e){1&t&&(n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",11),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",12),n.Rb(5,"mat-icon",13),n.Wb(6,"p",14),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,2,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,4,"lang.add")," "))}function xH(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Vb())}function CH(t,e){1&t&&(n.Wb(0,"mat-header-cell"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.imgRelated")))}function OH(t,e){if(1&t&&n.Rb(0,"mat-icon",41),2&t){const t=n.hc().$implicit;n.Gb("fm ",t.img_filename," fm-2x")}}function DH(t,e){if(1&t&&n.Rb(0,"mat-icon",41),2&t){const t=n.hc().$implicit;n.Gb("fa ",t.img_filename," fa-2x")}}function wH(t,e){if(1&t&&(n.Wb(0,"mat-cell",39),n.Oc(1,OH,1,3,"mat-icon",40),n.Oc(2,DH,1,3,"mat-icon",40),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",0==t.img_filename.indexOf("fm")),n.Db(1),n.oc("ngIf",0==t.img_filename.indexOf("fa"))}}function MH(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",42),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Rc(n.jc(2,3,"lang.id"))}}function kH(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",t.id," ")}}function SH(t,e){1&t&&(n.Wb(0,"mat-header-cell",42),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.statusName")))}function IH(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.label_status," ")}}function PH(t,e){1&t&&n.Rb(0,"mat-header-cell")}function VH(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",43),n.Wb(1,"button",44),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.deleteStatus(a)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",45),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.pc("matTooltip",n.jc(2,1,"lang.delete")))}function RH(t,e){1&t&&n.Rb(0,"mat-header-row")}function jH(t,e){1&t&&(n.Rb(0,"mat-row",46),n.ic(1,"translate")),2&t&&(n.qc("routerLink","/administration/statuses/",e.$implicit.identifier,""),n.pc("matTooltip",n.jc(1,2,"lang.view")))}function AH(t,e){if(1&t&&(n.Wb(0,"mat-card",17),n.Wb(1,"div",18),n.Wb(2,"div",19),n.Wb(3,"mat-form-field"),n.Rb(4,"input",20),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Wb(6,"div",19),n.Rb(7,"mat-paginator",21,22),n.Vb(),n.Vb(),n.Wb(9,"mat-table",23,24),n.Ub(11,25),n.Oc(12,CH,3,3,"mat-header-cell",26),n.Oc(13,wH,3,2,"mat-cell",27),n.Tb(),n.Ub(14,28),n.Oc(15,MH,3,5,"mat-header-cell",29),n.Oc(16,kH,2,3,"mat-cell",30),n.Tb(),n.Ub(17,31),n.Oc(18,SH,3,3,"mat-header-cell",32),n.Oc(19,IH,2,1,"mat-cell",33),n.Tb(),n.Ub(20,34),n.Oc(21,PH,1,0,"mat-header-cell",26),n.Oc(22,VH,4,3,"mat-cell",35),n.Tb(),n.Oc(23,RH,1,0,"mat-header-row",36),n.Oc(24,jH,2,4,"mat-row",37),n.Vb(),n.Wb(25,"div",38),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.pc("placeholder",n.jc(5,10,"lang.filterBy")),n.oc("formControl",t.adminService.getFilterField()),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.adminService.getDataSource()),n.Db(14),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns),n.Db(2),n.Tc(" ",t.statuses.length," ",n.jc(27,12,"lang.statuses"),"")}}let WH=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.functions=s,this.adminService=o,this.viewContainerRef=r,this.loading=!1,this.statuses=[],this.displayedColumns=["img_filename","id","label_status","identifier"],this.filterColumns=["id","label_status"]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.statuses")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,this.http.get("../rest/statuses").subscribe(t=>{this.statuses=t.statuses,this.loading=!1,setTimeout(()=>{this.adminService.setDataSource("admin_status",this.statuses,this.sort,this.paginator,this.filterColumns)},0)},t=>{this.notify.error(t.error.errors)})}deleteStatus(t){confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.delete")+" \xab "+t.id+" \xbb")&&this.http.delete("../rest/statuses/"+t.identifier).subscribe(t=>{this.statuses=t.statuses,this.adminService.setDataSource("admin_status",this.statuses,this.sort,this.paginator,this.filterColumns),this.notify.success(this.translate.instant("lang.statusDeleted"))},t=>{this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a),n.Qb(OL),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(_H,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:15,vars:8,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["mat-subheader",""],["mat-list-item","","routerLink","/administration/statuses/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"row"],[1,"col-md-6","col-xs-6"],["matInput","",3,"formControl","placeholder"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSort","","matSortDisableClear","",3,"dataSource"],["table",""],["matColumnDef","img_filename"],[4,"matHeaderCellDef"],["color","primary",4,"matCellDef"],["matColumnDef","id"],["mat-sort-header","",3,"hide-for-mobile",4,"matHeaderCellDef"],[3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","label_status"],["mat-sort-header","",4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","identifier"],["style","justify-content: flex-end;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"routerLink","matTooltip",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["color","primary"],["aria-hidden","true",3,"class",4,"ngIf"],["aria-hidden","true"],["mat-sort-header",""],[2,"justify-content","flex-end"],["mat-icon-button","","color","warn",3,"matTooltip","click"],["aria-hidden","true",1,"fa","fa-trash-alt","fa-2x"],[2,"cursor","pointer",3,"routerLink","matTooltip"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,yH,9,6,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,xH,2,0,"div",9),n.Oc(14,AH,28,14,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,R.h,R.g,R.d,o.f,S.a,R.c,W.l,V.c,K.a,Y.c,J.b,X.d,X.u,X.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,vt.h,vt.a,Fe.b,k.b,A.b,vt.j,vt.m,o.d],pipes:[g.d],encapsulation:2}),t})();function TH(t,e){1&t&&(n.Wb(0,"div",10),n.Rb(1,"mat-spinner",11),n.Vb())}function EH(t,e){if(1&t){const t=n.Xb();n.Wb(0,"input",31),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).status.id=e}))("blur",(function(){return n.Dc(t),n.hc(2).isAvailable()})),n.ic(1,"translate"),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(2);n.pc("title",n.jc(1,4,"lang.id")),n.pc("placeholder",n.jc(2,6,"lang.id")),n.oc("formControl",t.statusId)("ngModel",t.status.id)}}function FH(t,e){if(1&t){const t=n.Xb();n.Wb(0,"input",32),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).status.id=e})),n.ic(1,"translate"),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(2);n.pc("title",n.jc(1,3,"lang.id")),n.pc("placeholder",n.jc(2,5,"lang.id")),n.oc("ngModel",t.status.id)}}function LH(t,e){if(1&t&&(n.Wb(0,"mat-error"),n.Qc(1),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Rc(t.getErrorMessage())}}const QH=function(t){return[t]};function NH(t,e){if(1&t&&(n.Wb(0,"mat-option",33),n.Rb(1,"i",34),n.Qc(2),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.image_name),n.Db(1),n.Fb(t.image_name),n.oc("ngClass",n.vc(6,QH,0==t.image_name.indexOf("fm")?"fm":"fa")),n.Db(1),n.Sc(" ",t.image_name," ")}}function zH(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",12),n.Wb(1,"form",13,14),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().submitStatus()})),n.Wb(3,"div",15),n.Wb(4,"div",16),n.Wb(5,"mat-form-field"),n.Oc(6,EH,3,8,"input",17),n.Oc(7,FH,3,7,"input",18),n.Oc(8,LH,2,1,"mat-error",19),n.Vb(),n.Vb(),n.Vb(),n.Wb(9,"div",15),n.Wb(10,"div",16),n.Wb(11,"mat-form-field"),n.Wb(12,"input",20),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().status.label_status=e})),n.ic(13,"translate"),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(15,"div",15),n.Wb(16,"div",21),n.Wb(17,"mat-slide-toggle",22),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().status.can_be_searched=e})),n.ic(18,"translate"),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Vb(),n.Wb(21,"div",21),n.Wb(22,"mat-slide-toggle",23),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().status.can_be_modified=e})),n.ic(23,"translate"),n.Qc(24),n.ic(25,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(26,"div",15),n.Wb(27,"div",24),n.Rb(28,"mat-icon",25),n.Vb(),n.Wb(29,"div",26),n.Wb(30,"mat-form-field"),n.Wb(31,"mat-select",27),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().status.img_filename=e})),n.ic(32,"translate"),n.Oc(33,NH,3,8,"mat-option",28),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(34,"div",15),n.Wb(35,"div",29),n.Wb(36,"button",30),n.Qc(37),n.ic(38,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(2),e=n.hc();n.Db(6),n.oc("ngIf",e.creationMode),n.Db(1),n.oc("ngIf",!e.creationMode),n.Db(1),n.oc("ngIf",e.statusId.invalid),n.Db(4),n.pc("title",n.jc(13,23,"lang.label")),n.pc("placeholder",n.jc(14,25,"lang.label")),n.oc("ngModel",e.status.label_status),n.Db(5),n.pc("matTooltip",n.jc(18,27,"lang.tooltipSearchStatus")),n.oc("ngModel",e.status.can_be_searched)("checked",1==e.status.can_be_searched),n.Db(2),n.Sc(" ",n.jc(20,29,"lang.canBeSearched")," "),n.Db(3),n.pc("matTooltip",n.jc(23,31,"lang.tooltipIndexStatus")),n.oc("ngModel",e.status.can_be_modified)("checked",1==e.status.can_be_modified),n.Db(2),n.Sc(" ",n.jc(25,33,"lang.canBeModified")," "),n.Db(4),n.Fb(e.status.img_filename),n.oc("ngClass",n.vc(39,QH,0==e.status.img_filename.indexOf("fm")?"fm fm-2x":"fa fa-2x")),n.Db(3),n.pc("placeholder",n.jc(32,35,"lang.imgRelated")),n.oc("ngModel",e.status.img_filename),n.Db(2),n.oc("ngForOf",e.statusImages),n.Db(3),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(38,37,"lang.save"))}}let BH=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.route=i,this.router=n,this.notify=a,this.headerService=s,this.appService=o,this.status={id:null,label_status:null,can_be_searched:null,can_be_modified:null,img_filename:"fm-letter"},this.statusImages="",this.loading=!1,this.statusId=new X.i("",[X.I.required,X.I.pattern(/^[\w.-]*$/)])}getErrorMessage(){return this.statusId.hasError("required")?this.translate.instant("lang.enterValue"):this.statusId.hasError("pattern")?this.translate.instant("lang.patternId"):""}ngOnInit(){this.loading=!0,this.route.params.subscribe(t=>{void 0===t.identifier?(this.headerService.setHeader(this.translate.instant("lang.statusCreation")),this.http.get("../rest/administration/statuses/new").subscribe(t=>{this.status.img_filename="fm-letter",this.status.can_be_searched=!0,this.status.can_be_modified=!0,this.statusImages=t.statusImages,this.creationMode=!0,this.loading=!1}),this.statusIdAvailable=!1):(this.creationMode=!1,this.statusIdentifier=t.identifier,this.http.get("../rest/statuses/"+t.identifier).subscribe(t=>{this.status=t.status[0],this.headerService.setHeader(this.translate.instant("lang.statusModification"),this.status.label_status),this.status.can_be_searched="Y"===this.status.can_be_searched,this.status.can_be_modified="Y"===this.status.can_be_modified,this.statusImages=t.statusImages,this.statusIdAvailable=!0,this.loading=!1},t=>{this.notify.error(t.error.errors)}))})}isAvailable(){this.status.id?this.http.get("../rest/status/"+this.status.id).subscribe(()=>{this.statusIdAvailable=!1},t=>{this.statusIdAvailable=!1,"id not found"===t.error.errors&&(this.statusIdAvailable=!0)}):this.statusIdAvailable=!1}submitStatus(){!0===this.creationMode?this.http.post("../rest/statuses",this.status).subscribe(()=>{this.notify.success(this.translate.instant("lang.statusAdded")),this.router.navigate(["administration/statuses"])},t=>{this.notify.error(t.error.errors)}):!1===this.creationMode&&this.http.put("../rest/statuses/"+this.statusIdentifier,this.status).subscribe(()=>{this.notify.success(this.translate.instant("lang.statusUpdated")),this.router.navigate(["administration/statuses"])},t=>{this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:13,vars:8,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"form-horizontal",3,"ngSubmit"],["statusFormUp","ngForm"],[1,"form-group"],[1,"col-sm-12"],["matInput","","maxlength","10","name","id","id","id","type","text","pattern","^[\\w.-]*$","required","",3,"formControl","ngModel","title","placeholder","ngModelChange","blur",4,"ngIf"],["matInput","","maxlength","10","name","id","id","id","required","","disabled","",3,"ngModel","title","placeholder","ngModelChange",4,"ngIf"],[4,"ngIf"],["matInput","","name","label_status","id","label_status","maxlength","50","type","text","required","",3,"ngModel","title","placeholder","ngModelChange"],[1,"col-sm-6",2,"white-space","nowrap","text-align","center"],["id","can_be_search","name","can_be_search","color","primary",3,"matTooltip","ngModel","checked","ngModelChange"],["id","can_be_modified","name","can_be_modified","color","primary",3,"matTooltip","ngModel","checked","ngModelChange"],[1,"col-sm-1",2,"text-align","right"],["aria-hidden","true","color","primary",3,"ngClass"],[1,"col-sm-11"],["id","status","name","status","required","",3,"ngModel","placeholder","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"col-sm-12",2,"text-align","center"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],["matInput","","maxlength","10","name","id","id","id","type","text","pattern","^[\\w.-]*$","required","",3,"formControl","ngModel","title","placeholder","ngModelChange","blur"],["matInput","","maxlength","10","name","id","id","id","required","","disabled","",3,"ngModel","title","placeholder","ngModelChange"],[3,"value"],["color","primary",3,"ngClass"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,TH,2,0,"div",8),n.Oc(12,zH,39,41,"mat-card",9),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,V.c,K.a,X.K,X.v,X.w,Y.c,J.b,X.d,X.p,X.F,X.u,X.x,te.a,A.b,S.a,P.q,ee.a,P.s,k.b,X.B,X.j,Y.b,W.p],pipes:[g.d],encapsulation:2}),t})();const UH=["snav2"],$H=["adminMenuTemplate"];function HH(t,e){1&t&&(n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",11),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",12),n.Rb(5,"mat-icon",13),n.Wb(6,"p",14),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,2,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,4,"lang.add")," "))}function GH(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Vb())}function XH(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",38),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Rc(n.jc(2,3,"lang.id"))}}function qH(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",t.id," ")}}function KH(t,e){1&t&&(n.Wb(0,"mat-header-cell",38),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.actionName")))}function YH(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.label_action," ")}}function JH(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",38),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Sc("",n.jc(2,3,"lang.actionHistory")," ")}}function ZH(t,e){1&t&&(n.Wb(0,"span"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.no")," "))}function tG(t,e){1&t&&(n.Wb(0,"span"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.yes")," "))}function eG(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Oc(1,ZH,3,3,"span",39),n.Oc(2,tG,3,3,"span",39),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.oc("ngIf","N"==t.history),n.Db(1),n.oc("ngIf","Y"==t.history)}}function iG(t,e){1&t&&n.Rb(0,"mat-header-cell")}function nG(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",40),n.Wb(1,"button",41),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.deleteAction(a)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",42),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.pc("matTooltip",n.jc(2,2,"lang.delete")),n.oc("disabled","Y"==t.is_system)}}function aG(t,e){1&t&&n.Rb(0,"mat-header-row")}function sG(t,e){1&t&&(n.Rb(0,"mat-row",43),n.ic(1,"translate")),2&t&&(n.qc("routerLink","/administration/actions/",e.$implicit.id,""),n.pc("matTooltip",n.jc(1,2,"lang.view")))}function oG(t,e){if(1&t&&(n.Wb(0,"mat-card",17),n.Wb(1,"div",18),n.Wb(2,"div",19),n.Wb(3,"mat-form-field"),n.Rb(4,"input",20),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Wb(6,"div",19),n.Rb(7,"mat-paginator",21,22),n.Vb(),n.Vb(),n.Wb(9,"mat-table",23,24),n.Ub(11,25),n.Oc(12,XH,3,5,"mat-header-cell",26),n.Oc(13,qH,2,3,"mat-cell",27),n.Tb(),n.Ub(14,28),n.Oc(15,KH,3,3,"mat-header-cell",29),n.Oc(16,YH,2,1,"mat-cell",30),n.Tb(),n.Ub(17,31),n.Oc(18,JH,3,5,"mat-header-cell",26),n.Oc(19,eG,3,4,"mat-cell",27),n.Tb(),n.Ub(20,32),n.Oc(21,iG,1,0,"mat-header-cell",33),n.Oc(22,nG,4,4,"mat-cell",34),n.Tb(),n.Oc(23,aG,1,0,"mat-header-row",35),n.Oc(24,sG,2,4,"mat-row",36),n.Vb(),n.Wb(25,"div",37),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.pc("placeholder",n.jc(5,10,"lang.filterBy")),n.oc("formControl",t.adminService.getFilterField()),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.adminService.getDataSource()),n.Db(14),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns),n.Db(2),n.Tc(" ",t.actions.length," ",n.jc(27,12,"lang.actions"),"")}}let rG=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.adminService=s,this.functions=o,this.viewContainerRef=r,this.search=null,this.actions=[],this.titles=[],this.loading=!1,this.displayedColumns=["id","label_action","history","actions"],this.filterColumns=["id","label_action"]}ngOnInit(){this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,this.http.get("../rest/actions").subscribe(t=>{this.actions=t.actions,this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.actions")),this.loading=!1,setTimeout(()=>{this.adminService.setDataSource("admin_actions",this.actions,this.sort,this.paginator,this.filterColumns)},0)},t=>{this.notify.handleErrors(t)})}deleteAction(t){confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.delete")+" \xab "+t.label_action+" \xbb")&&this.http.delete("../rest/actions/"+t.id).subscribe(t=>{this.actions=t.actions,this.adminService.setDataSource("admin_actions",this.actions,this.sort,this.paginator,this.filterColumns),this.notify.success(this.translate.instant("lang.actionDeleted"))},t=>{this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(OL),n.Qb(_t.a),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(UH,!0),n.Kc($H,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:15,vars:8,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["mat-subheader",""],["mat-list-item","","routerLink","/administration/actions/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"row"],[1,"col-md-6","col-xs-6"],["matInput","",3,"placeholder","formControl"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSort","","matSortDisableClear","",3,"dataSource"],["table",""],["matColumnDef","id"],["mat-sort-header","",3,"hide-for-mobile",4,"matHeaderCellDef"],[3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","label_action"],["mat-sort-header","",4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","history"],["matColumnDef","actions"],[4,"matHeaderCellDef"],["style","justify-content: flex-end;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"routerLink","matTooltip",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["mat-sort-header",""],[4,"ngIf"],[2,"justify-content","flex-end"],["mat-icon-button","","color","warn",3,"disabled","matTooltip","click"],["aria-hidden","true",1,"fa","fa-trash-alt","fa-2x"],[2,"cursor","pointer",3,"routerLink","matTooltip"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,HH,9,6,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,GH,2,0,"div",9),n.Oc(14,oG,28,14,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,R.h,R.g,R.d,o.f,S.a,R.c,W.l,V.c,K.a,Y.c,J.b,X.d,X.u,X.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,vt.h,Fe.b,vt.a,k.b,A.b,vt.j,vt.m,o.d],pipes:[g.d],encapsulation:2}),t})();const cG=["snav2"];function lG(t,e){1&t&&(n.Wb(0,"div",10),n.Rb(1,"mat-spinner",11),n.Vb())}function dG(t,e){1&t&&(n.Wb(0,"div",28),n.Wb(1,"b"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Qc(4),n.ic(5,"translate"),n.Vb()),2&t&&(n.Db(2),n.Sc("",n.jc(3,2,"lang.isSytemAction")," !"),n.Db(2),n.Sc(" ",n.jc(5,4,"lang.doNotModifyUnlessExpert")," "))}function hG(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",32),n.dc("removed",(function(){n.Dc(t);const i=e.index;return n.hc(3).removeSelectedFields(i)})),n.Qc(1),n.Rb(2,"mat-icon",33),n.Vb()}if(2&t){const t=e.$implicit;n.oc("removable",!0),n.Db(1),n.Sc(" ",t," ")}}function uG(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",16),n.Wb(1,"div",17),n.Wb(2,"plugin-select-search",29),n.dc("afterSelected",(function(){return n.Dc(t),n.hc(2).getSelectedFields()})),n.ic(3,"translate"),n.ic(4,"translate"),n.Vb(),n.Wb(5,"mat-chip-list",30),n.Oc(6,hG,3,2,"mat-chip",31),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(2),n.Fb(""),n.oc("showLabel",!0)("label",n.jc(3,8,"lang.checkEmptyFields"))("placeholderLabel",n.jc(4,10,"lang.checkEmptyFields"))("formControlSelect",t.customFieldsFormControl)("datas",t.availableCustomFields),n.Db(4),n.oc("ngForOf",t.selectedFieldsValue)}}function pG(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",16),n.Wb(1,"div",17),n.Wb(2,"mat-form-field"),n.Wb(3,"mat-select",34),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).arMode=e})),n.ic(4,"translate"),n.ic(5,"translate"),n.Wb(6,"mat-option",35),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Wb(9,"mat-option",36),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Wb(12,"mat-option",37),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(3),n.pc("title",n.jc(4,7,"lang.generateARMode")),n.pc("placeholder",n.jc(5,9,"lang.generateARMode")),n.oc("required","create_acknowledgement_receipt"==t.action.actionPageId)("ngModel",t.arMode),n.Db(4),n.Rc(n.jc(8,11,"lang.autoAR")),n.Db(3),n.Rc(n.jc(11,13,"lang.manualAR")),n.Db(3),n.Rc(n.jc(14,15,"lang.bothAR"))}}function bG(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",16),n.Wb(1,"div",17),n.Wb(2,"plugin-select-search",29),n.dc("afterSelected",(function(){n.Dc(t);const e=n.hc(2);return e.action.id_status=e.selectStatusId.value})),n.ic(3,"translate"),n.ic(4,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(2),n.Fb(""),n.oc("showLabel",!0)("label",n.jc(3,7,"lang.associatedStatus"))("placeholderLabel",n.jc(4,9,"lang.associatedStatus"))("formControlSelect",t.selectStatusId)("datas",t.statuses)}}function fG(t,e){if(1&t&&(n.Wb(0,"mat-option",38),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.value),n.Db(1),n.Sc(" ",t.label," ")}}function mG(t,e){if(1&t&&(n.Wb(0,"mat-option",39),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.oc("value",t.id)("disabled","registeredMail"!==t.id&&"registeredMail"===i.action.actionPageGroup),n.Db(1),n.Sc(" ",t.label," ")}}function gG(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",12),n.Oc(1,dG,6,6,"div",13),n.Wb(2,"form",14,15),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Wb(4,"div",16),n.Wb(5,"div",17),n.Wb(6,"mat-form-field"),n.Wb(7,"input",18),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().action.label_action=e})),n.ic(8,"translate"),n.ic(9,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(10,"div",16),n.Wb(11,"div",17),n.Wb(12,"plugin-select-search",19),n.dc("afterSelected",(function(){return n.Dc(t),n.hc().getCustomFields()})),n.ic(13,"translate"),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Oc(15,uG,7,12,"div",20),n.Oc(16,pG,15,17,"div",20),n.Oc(17,bG,5,11,"div",20),n.Wb(18,"div",16),n.Wb(19,"div",17),n.Wb(20,"mat-form-field"),n.Wb(21,"mat-select",21),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().action.keyword=e})),n.ic(22,"translate"),n.ic(23,"translate"),n.Oc(24,fG,2,2,"mat-option",22),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(25,"div",16),n.Wb(26,"div",23),n.Wb(27,"mat-slide-toggle",24),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().action.history=e})),n.ic(28,"translate"),n.Qc(29),n.ic(30,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(31,"div",16),n.Wb(32,"div",17),n.Wb(33,"mat-form-field"),n.Wb(34,"mat-select",25),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().action.actionCategories=e})),n.ic(35,"translate"),n.ic(36,"translate"),n.Oc(37,mG,2,3,"mat-option",26),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(38,"div",16),n.Wb(39,"div",23),n.Wb(40,"button",27),n.Qc(41),n.ic(42,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(3),e=n.hc();n.Db(1),n.oc("ngIf",1==e.action.is_system),n.Db(6),n.pc("title",n.jc(8,30,"lang.label")),n.pc("placeholder",n.jc(9,32,"lang.label")),n.oc("ngModel",e.action.label_action),n.Db(5),n.Fb(""),n.oc("showLabel",!0)("label",n.jc(13,34,"lang.actionCarriedOut"))("placeholderLabel",n.jc(14,36,"lang.actionCarriedOut"))("formControlSelect",e.selectActionPageId)("datas",e.actionPages)("optGroupList",e.group)("optGroupTarget","category"),n.Db(3),n.oc("ngIf",!e.functions.empty(e.availableCustomFields)&&"close_mail"==e.action.actionPageId),n.Db(1),n.oc("ngIf","create_acknowledgement_receipt"==e.action.actionPageId),n.Db(1),n.oc("ngIf","reconcile"!=e.action.actionPageId),n.Db(4),n.pc("title",n.jc(22,38,"lang.keyword")),n.pc("placeholder",n.jc(23,40,"lang.keyword")),n.oc("ngModel",e.action.keyword),n.Db(3),n.oc("ngForOf",e.keywordsList),n.Db(3),n.pc("title",n.jc(28,42,"lang.actionHistoryDesc")),n.oc("ngModel",e.action.history)("checked","Y"==e.action.history),n.Db(2),n.Sc(" ",n.jc(30,44,"lang.actionHistory"),""),n.Db(5),n.pc("title",n.jc(35,46,"lang.chooseCategoryAssociation")),n.pc("placeholder",n.jc(36,48,"lang.chooseCategoryAssociation")),n.oc("ngModel",e.action.actionCategories),n.Db(3),n.oc("ngForOf",e.categoriesList),n.Db(3),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(42,50,"lang.save"))}}let vG=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.route=i,this.router=n,this.notify=a,this.headerService=s,this.appService=o,this.functions=r,this.action={},this.statuses=[],this.actionPages=[],this.categoriesList=[],this.keywordsList=[],this.group=[],this.loading=!1,this.availableCustomFields=[],this.customFieldsFormControl=new X.i({value:"",disabled:!1}),this.selectedFieldsValue=[],this.selectedFieldsId=[],this.selectActionPageId=new X.i,this.selectStatusId=new X.i}ngOnInit(){this.loading=!0,this.route.params.subscribe(t=>{void 0===t.id?(this.creationMode=!0,this.http.get("../rest/initAction").subscribe(t=>{this.action=t.action,this.selectActionPageId.setValue(this.action.actionPageId),this.selectStatusId.setValue(this.action.id_status),this.categoriesList=t.categoriesList,this.statuses=t.statuses.map(t=>({id:t.id,label:t.label_status})),this.actionPages=t.actionPages,this.actionPages.map(t=>t.category).filter((t,e,i)=>i.indexOf(t)===e).forEach(t=>{this.group.push({id:t,label:this.translate.instant("lang."+t)})}),this.keywordsList=t.keywordsList,this.headerService.setHeader(this.translate.instant("lang.actionCreation")),this.loading=!1})):(this.creationMode=!1,this.http.get("../rest/actions/"+t.id).subscribe(t=>Object(r.a)(this,void 0,void 0,(function*(){this.action=t.action,this.selectActionPageId.setValue(this.action.actionPageId),this.selectStatusId.setValue(this.action.id_status),this.categoriesList=t.categoriesList,this.statuses=t.statuses.map(t=>({id:t.id,label:t.label_status})),this.actionPages=t.actionPages,this.actionPages.map(t=>t.category).filter((t,e,i)=>i.indexOf(t)===e).forEach(t=>{this.group.push({id:t,label:this.translate.instant("lang."+t)})}),this.keywordsList=t.keywordsList,this.headerService.setHeader(this.translate.instant("lang.actionCreation"),t.action.label_action),yield this.getCustomFields(),this.loading=!1,"close_mail"===this.action.actionPageId?(this.customFieldsFormControl=new X.i({value:this.action.parameters.requiredFields,disabled:!1}),this.selectedFieldsId=[],this.action.parameters.requiredFields&&(this.selectedFieldsId=this.action.parameters.requiredFields),this.selectedFieldsId.forEach(t=>{this.availableCustomFields.forEach(e=>{e.id===t&&this.selectedFieldsValue.push(e.label)})})):"create_acknowledgement_receipt"===this.action.actionPageId&&(this.arMode=this.action.parameters.mode)}))))})}getCustomFields(){return this.action.actionPageId=this.selectActionPageId.value,this.action.actionPageGroup=this.actionPages.filter(t=>t.id===this.action.actionPageId)[0].category,"registeredMail"===this.action.actionPageGroup&&(this.action.actionCategories=["registeredMail"]),new Promise((t,e)=>{"close_mail"===this.action.actionPageId&&this.functions.empty(this.availableCustomFields)?this.http.get("../rest/customFields").pipe(Object(mt.a)(e=>(this.availableCustomFields=e.customFields.map(t=>(t.id="indexingCustomField_"+t.id,t)),t(!0))),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe():t(!0)})}getSelectedFields(){this.availableCustomFields.forEach(t=>{t.id===this.customFieldsFormControl.value&&(this.selectedValue=t)}),this.selectedFieldsId.indexOf(this.customFieldsFormControl.value)<0&&(this.selectedFieldsValue.push(this.selectedValue.label),this.selectedFieldsId.push(this.customFieldsFormControl.value)),this.customFieldsFormControl.reset()}removeSelectedFields(t){this.selectedFieldsValue.splice(t,1),this.selectedFieldsId.splice(t,1)}onSubmit(){"close_mail"===this.action.actionPageId?this.action.parameters={requiredFields:this.selectedFieldsId}:"create_acknowledgement_receipt"===this.action.actionPageId&&(this.action.parameters={mode:this.arMode}),this.creationMode?this.http.post("../rest/actions",this.action).subscribe(()=>{this.router.navigate(["/administration/actions"]),this.notify.success(this.translate.instant("lang.actionAdded"))},t=>{this.notify.error(t.error.errors)}):this.http.put("../rest/actions/"+this.action.id,this.action).subscribe(()=>{this.router.navigate(["/administration/actions"]),this.notify.success(this.translate.instant("lang.actionUpdated"))},t=>{this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(cG,!0),2&t&&n.yc(i=n.ec())&&(e.sidenavRight=i.first)},decls:13,vars:8,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],["class","alert alert-danger","role","alert",4,"ngIf"],[1,"form-horizontal",3,"ngSubmit"],["actionsFormUp","ngForm"],[1,"form-group"],[1,"col-sm-12"],["matInput","","required","","name","action_name","id","action_name","type","text","maxlength","255",3,"ngModel","title","placeholder","ngModelChange"],[2,"width","100%",3,"showLabel","label","placeholderLabel","formControlSelect","datas","optGroupList","optGroupTarget","afterSelected"],["class","form-group",4,"ngIf"],["id","keyword","name","keyword",3,"title","placeholder","ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"col-sm-12",2,"text-align","center"],["name","history","id","history","color","primary",3,"title","ngModel","checked","ngModelChange"],["id","categorieslist","name","categorieslist","multiple","","required","",3,"title","placeholder","ngModel","ngModelChange"],[3,"value","disabled",4,"ngFor","ngForOf"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],["role","alert",1,"alert","alert-danger"],[2,"width","100%",3,"showLabel","label","placeholderLabel","formControlSelect","datas","afterSelected"],[1,"checkbox-selected-list"],["selected","",3,"removable","removed",4,"ngFor","ngForOf"],["selected","",3,"removable","removed"],["matChipRemove","",1,"fa","fa-times-circle"],["id","generateARmode","name","generateARmode",3,"required","title","placeholder","ngModel","ngModelChange"],["value","auto"],["value","manual"],["value","both"],[3,"value"],[3,"value","disabled"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,lG,2,0,"div",8),n.Oc(12,gG,43,52,"mat-card",9),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,V.c,K.a,X.K,X.v,X.w,Y.c,J.b,X.d,X.F,X.p,X.u,X.x,fr,ee.a,P.s,te.a,k.b,ze.d,ze.a,S.a,ze.e,W.p],pipes:[g.d],encapsulation:2}),t})();function _G(t,e){1&t&&(n.Wb(0,"div",10),n.Rb(1,"mat-spinner",11),n.Vb())}function yG(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"input",27),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).parameter.param_value_string=e})),n.ic(2,"translate"),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.pc("placeholder",n.jc(2,2,"lang.value")),n.oc("ngModel",t.parameter.param_value_string)}}function xG(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"input",28),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).parameter.param_value_int=e})),n.ic(2,"translate"),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.pc("placeholder",n.jc(2,2,"lang.value")),n.oc("ngModel",t.parameter.param_value_int)}}function CG(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"input",29),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).parameter.param_value_date=e})),n.ic(2,"translate"),n.Vb(),n.Rb(3,"mat-datepicker-toggle",30),n.Rb(4,"mat-datepicker",31,32),n.Vb()}if(2&t){const t=n.zc(5),e=n.hc(2);n.Db(1),n.pc("placeholder",n.jc(2,4,"lang.date")),n.oc("ngModel",e.parameter.param_value_date)("matDatepicker",t),n.Db(2),n.oc("for",t)}}function OG(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",12),n.Wb(1,"form",13,14),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Wb(3,"div",15),n.Wb(4,"div",16),n.Wb(5,"mat-form-field"),n.Wb(6,"input",17),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().parameter.id=e})),n.ic(7,"translate"),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(9,"div",15),n.Wb(10,"div",16),n.Wb(11,"mat-form-field"),n.Wb(12,"input",18),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().parameter.description=e})),n.ic(13,"translate"),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(15,"div",15),n.Wb(16,"div",19),n.Wb(17,"mat-form-field"),n.Wb(18,"mat-select",20),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().type=e})),n.ic(19,"translate"),n.Wb(20,"mat-option",21),n.Qc(21),n.ic(22,"translate"),n.Vb(),n.Wb(23,"mat-option",22),n.Qc(24),n.ic(25,"translate"),n.Vb(),n.Wb(26,"mat-option",23),n.Qc(27),n.ic(28,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(29,"div",19),n.Oc(30,yG,3,4,"mat-form-field",24),n.Oc(31,xG,3,4,"mat-form-field",24),n.Oc(32,CG,6,6,"mat-form-field",24),n.Vb(),n.Vb(),n.Wb(33,"div",15),n.Wb(34,"div",25),n.Wb(35,"button",26),n.Qc(36),n.ic(37,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(2),e=n.hc();n.Db(6),n.pc("title",n.jc(7,18,"lang.id")),n.pc("placeholder",n.jc(8,20,"lang.id")),n.oc("ngModel",e.parameter.id)("disabled",!e.creationMode),n.Db(6),n.pc("title",n.jc(13,22,"lang.description")),n.pc("placeholder",n.jc(14,24,"lang.description")),n.oc("ngModel",e.parameter.description),n.Db(6),n.pc("placeholder",n.jc(19,26,"lang.type")),n.oc("ngModel",e.type)("disabled",!e.creationMode),n.Db(3),n.Sc(" ",n.jc(22,28,"lang.stringInput")," "),n.Db(3),n.Sc(" ",n.jc(25,30,"lang.integer")," "),n.Db(3),n.Sc(" ",n.jc(28,32,"lang.date")," "),n.Db(3),n.oc("ngIf","string"==e.type),n.Db(1),n.oc("ngIf","int"==e.type),n.Db(1),n.oc("ngIf","date"==e.type),n.Db(3),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(37,34,"lang.save"))}}let DG=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.route=i,this.router=n,this.notify=a,this.headerService=s,this.appService=o,this.loading=!1,this.parameter={}}ngOnInit(){this.loading=!0,this.route.params.subscribe(t=>{void 0===t.id?(this.headerService.setHeader(this.translate.instant("lang.parameterCreation")),this.creationMode=!0,this.loading=!1):(this.creationMode=!1,this.http.get("../rest/parameters/"+t.id).subscribe(t=>{this.parameter=t.parameter,this.headerService.setHeader(this.translate.instant("lang.parameterModification"),this.parameter.id),this.type="number"==typeof this.parameter.param_value_int?"int":this.parameter.param_value_date?"date":"string",this.loading=!1},t=>{this.notify.handleErrors(t)}))})}onSubmit(){"date"===this.type?(this.parameter.param_value_int=null,this.parameter.param_value_string=null):"int"===this.type?(this.parameter.param_value_date=null,this.parameter.param_value_string=null):"string"===this.type&&(this.parameter.param_value_date=null,this.parameter.param_value_int=null),!0===this.creationMode?this.http.post("../rest/parameters",this.parameter).subscribe(()=>{this.router.navigate(["administration/parameters"]),this.notify.success(this.translate.instant("lang.parameterAdded"))},t=>{this.notify.error(t.error.errors)}):!1===this.creationMode&&this.http.put("../rest/parameters/"+this.parameter.id,this.parameter).subscribe(()=>{this.router.navigate(["administration/parameters"]),this.notify.success(this.translate.instant("lang.parameterUpdated"))},t=>{this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:13,vars:8,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"form-horizontal",3,"ngSubmit"],["parameterForm","ngForm"],[1,"form-group"],[1,"col-sm-12"],["matInput","","name","id","type","text","pattern","^[\\w-]*$","required","",3,"ngModel","disabled","title","placeholder","ngModelChange"],["matInput","","name","description","id","description","type","text",3,"ngModel","title","placeholder","ngModelChange"],[1,"col-sm-6"],["name","type","required","",3,"placeholder","ngModel","disabled","ngModelChange"],["value","string"],["value","int"],["value","date"],[4,"ngIf"],[1,"col-sm-12",2,"text-align","center"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],["matInput","","name","paramValueString","type","text","required","",3,"ngModel","placeholder","ngModelChange"],["matInput","","name","paramValueInt","type","number","pattern","^[0-9]*$","required","",3,"ngModel","placeholder","ngModelChange"],["matInput","","name","paramValueDate","required","",3,"ngModel","matDatepicker","placeholder","ngModelChange"],["matSuffix","",3,"for"],["startView","month"],["picker",""]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,_G,2,0,"div",8),n.Oc(12,OG,38,36,"mat-card",9),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,V.c,K.a,X.K,X.v,X.w,Y.c,J.b,X.d,X.B,X.F,X.u,X.x,ee.a,W.p,k.b,X.A,ae.h,ae.j,Y.j,ae.f],pipes:[g.d],encapsulation:2}),t})();function wG(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",17),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().selectBg(i.url)})),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc();n.Lc("background","url("+t.url+")"),n.Ib("selected",t.url===i.stepFormGroup.controls.bodyImage.value)("disabled",i.stepFormGroup.controls.bodyImage.disabled)}}function MG(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",18),n.dc("click",(function(){return n.Dc(t),n.zc(2).click()})),n.Wb(1,"input",19,20),n.dc("change",(function(e){return n.Dc(t),n.hc().uploadTrigger(e,"bg")})),n.Vb(),n.Rb(3,"i",21),n.Vb()}}let kG=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this._formBuilder=e,this.notify=i,this.sanitizer=n,this.scanPipe=a,this.http=s,this.readonlyState=!1,this.backgroundList=[],X.I.pattern(/^[a-zA-Z0-9_\-]*$/),this.stepFormGroup=this._formBuilder.group({applicationName:["",X.I.required],loginpage_message:[""],homepage_message:[""],traffic_record_summary_sheet:[""],bodyImage:["../rest/images?image=loginPage"],logo:["../rest/images?image=logo"]}),this.backgroundList=Array.from({length:16}).map((t,e)=>({filename:e+1+".jpg",url:`assets/${e+1}.jpg`}))}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){yield this.getParameters()}))}getParameters(){return new Promise(t=>{this.http.get("../rest/parameters").pipe(Object(mt.a)(t=>{this.stepFormGroup.controls.homepage_message.setValue(t.parameters.filter(t=>"homepage_message"===t.id)[0].value),this.stepFormGroup.controls.loginpage_message.setValue(t.parameters.filter(t=>"loginpage_message"===t.id)[0].value),this.stepFormGroup.controls.traffic_record_summary_sheet.setValue(t.parameters.filter(t=>"traffic_record_summary_sheet"===t.id)[0].value)}),p(()=>this.http.get("../rest/authenticationInformations")),Object(mt.a)(t=>{this.stepFormGroup.controls.applicationName.setValue(t.applicationName),setTimeout(()=>{this.stepFormGroup.controls.applicationName.valueChanges.pipe(Object(pt.a)(1e3),Object(mt.a)(()=>this.saveParameter("applicationName"))).subscribe(),this.stepFormGroup.controls.homepage_message.valueChanges.pipe(Object(pt.a)(100),Object(mt.a)(()=>this.saveParameter("homepage_message"))).subscribe(),this.stepFormGroup.controls.loginpage_message.valueChanges.pipe(Object(pt.a)(100),Object(mt.a)(()=>this.saveParameter("loginpage_message"))).subscribe(),this.stepFormGroup.controls.traffic_record_summary_sheet.valueChanges.pipe(Object(pt.a)(100),Object(mt.a)(()=>this.saveParameter("traffic_record_summary_sheet"))).subscribe(),this.initMce()},100)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}isValidStep(){return void 0!==this.stepFormGroup&&this.stepFormGroup.valid}initMce(t=!1){let e={selector:"#loginpage_message",setup:t=>{t.on("Blur",t=>{this.stepFormGroup.controls[t.target.id].setValue(tinymce.get(t.target.id).getContent())})},base_url:"../node_modules/tinymce/",height:"200",suffix:".min",language:this.translate.instant("lang.langISO").replace("-","_"),language_url:`../node_modules/tinymce-i18n/langs/${this.translate.instant("lang.langISO").replace("-","_")}.js`,menubar:!1,statusbar:!1,readonly:t,plugins:["autolink","table","code"],external_plugins:{maarch_b64image:"../../src/frontend/plugins/tinymce/maarch_b64image/plugin.min.js"},table_toolbar:"",table_sizing_mode:"relative",table_resize_bars:!1,toolbar_sticky:!0,toolbar_drawer:"floating",table_style_by_css:!0,content_style:"table td { padding: 1px; vertical-align: top; }",forced_root_block:!1,toolbar:t?"":"undo redo | fontselect fontsizeselect | bold italic underline strikethrough forecolor | table maarch_b64image | alignleft aligncenter alignright alignjustify bullist numlist outdent indent | removeformat code"};tinymce.init(e),e.selector="#homepage_message",tinymce.init(e),e.selector="#traffic_record_summary_sheet",e.height="500",tinymce.init(e)}uploadTrigger(t,e){if(t.target.files&&t.target.files[0]){const i=this.canUploadFile(t.target.files[0],e);if(!0===i){const i=new FileReader;i.readAsDataURL(t.target.files[0]),i.onload=t=>{if("logo"===e)this.stepFormGroup.controls.logo.setValue(t.target.result),this.saveParameter("logo");else{const e=new Image;e.onload=e=>{e.target.width<1920||e.target.height<1080?this.notify.error(this.translate.instant("lang.badImageResolution",{value1:"1920x1080"})):(this.backgroundList.push({filename:t.target.result,url:t.target.result}),this.stepFormGroup.controls.bodyImage.setValue(t.target.result),this.saveParameter("bodyImage"))},e.src=t.target.result}}}else this.notify.error(i)}}canUploadFile(t,e){const i="logo"!==e?["image/jpg","image/jpeg"]:["image/svg+xml"];if("logo"===e){if(t.size>5e6)return this.translate.instant("lang.maxFileSizeExceeded",{value1:"5mo"});if(-1===i.indexOf(t.type))return this.translate.instant("lang.onlyExtensionsAllowed",{value1:i.join(", ")})}else{if(t.size>1e7)return this.translate.instant("lang.maxFileSizeExceeded",{value1:"10mo"});if(-1===i.indexOf(t.type))return this.translate.instant("lang.onlyExtensionsAllowed",{value1:i.join(", ")})}return!0}selectBg(t){this.stepFormGroup.controls.bodyImage.disabled||(this.stepFormGroup.controls.bodyImage.setValue(t),this.saveParameter("bodyImage"))}clickLogoButton(t){this.stepFormGroup.controls.logo.disabled||t.click()}saveParameter(t){let e={};"logo"===t||"bodyImage"===t?e.image=this.stepFormGroup.controls[t].value:"applicationName"===t?e.applicationName=this.stepFormGroup.controls[t].value:e={param_value_string:this.stepFormGroup.controls[t].value},this.http.put("../rest/parameters/"+t,e).subscribe(()=>{this.notify.success(this.translate.instant("lang.parameterUpdated")),"logo"===t&&setTimeout(()=>{window.location.reload()},500)},t=>{this.notify.error(t.error.errors)})}ngOnDestroy(){tinymce.remove()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(X.h),n.Qb(D.a),n.Qb(ca.b),n.Qb(Tt.o),n.Qb(v.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-parameters-customization"]],features:[n.Cb([Tt.o])],decls:44,vars:29,consts:[[2,"display","contents",3,"formGroup"],[1,"col-md-6"],["appearance","outline"],["matInput","","formControlName","applicationName"],["name","loginpage_message","id","loginpage_message","formControlName","loginpage_message",2,"padding-top","10px"],["name","homepage_message","id","homepage_message","formControlName","homepage_message",2,"padding-top","10px"],["matRipple","",2,"width","350px","background-size","100%","cursor","pointer"],["svgIcon","maarchLogoFull",1,"maarchLogo",3,"click"],["type","file","name","files[]","accept","image/svg+xml",2,"display","none",3,"change"],["uploadLogo",""],[1,"backgroundList"],[1,"backgroundItem",2,"background","url(../rest/images?image=loginPage)","background-size","cover"],[1,"backgroundItem",2,"background","url(assets/bodylogin.jpg)","background-size","cover",3,"click"],["style","opacity: 0.3;","class","backgroundItem",3,"selected","disabled","background","click",4,"ngFor","ngForOf"],["style","opacity: 0.3;display: flex;align-items: center;justify-content: center;","class","backgroundItem",3,"click",4,"ngIf"],[1,"col-md-10",2,"margin-top","20px"],["name","traffic_record_summary_sheet","id","traffic_record_summary_sheet","formControlName","traffic_record_summary_sheet",2,"padding-top","10px"],[1,"backgroundItem",2,"opacity","0.3",3,"click"],[1,"backgroundItem",2,"opacity","0.3","display","flex","align-items","center","justify-content","center",3,"click"],["type","file","name","files[]","accept","image/jpeg",2,"display","none",3,"change"],["uploadFile",""],[1,"fa","fa-plus",2,"font-size","30px","color","#666"]],template:function(t,e){if(1&t){const t=n.Xb();n.Wb(0,"form",0),n.Wb(1,"div",1),n.Wb(2,"mat-form-field",2),n.Wb(3,"mat-label"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Rb(6,"input",3),n.Vb(),n.Wb(7,"div"),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Rb(10,"textarea",4),n.Rb(11,"br"),n.Rb(12,"br"),n.Wb(13,"div"),n.Qc(14),n.ic(15,"translate"),n.Vb(),n.Rb(16,"textarea",5),n.Rb(17,"br"),n.Rb(18,"br"),n.Vb(),n.Wb(19,"div",1),n.Wb(20,"div"),n.Qc(21),n.ic(22,"translate"),n.Vb(),n.Wb(23,"div"),n.Wb(24,"mat-card",6),n.Wb(25,"mat-icon",7),n.dc("click",(function(){n.Dc(t);const i=n.zc(27);return e.clickLogoButton(i)})),n.Vb(),n.Wb(26,"input",8,9),n.dc("change",(function(t){return e.uploadTrigger(t,"logo")})),n.Vb(),n.Vb(),n.Vb(),n.Rb(28,"br"),n.Wb(29,"div"),n.Qc(30),n.ic(31,"translate"),n.Vb(),n.Wb(32,"div",10),n.Rb(33,"mat-card",11),n.Wb(34,"mat-card",12),n.dc("click",(function(){return e.selectBg("assets/bodylogin.jpg")})),n.Vb(),n.Oc(35,wG,1,6,"mat-card",13),n.Oc(36,MG,4,0,"mat-card",14),n.Vb(),n.Vb(),n.Wb(37,"div",15),n.Wb(38,"div"),n.Qc(39),n.ic(40,"translate"),n.Vb(),n.Rb(41,"textarea",16),n.Rb(42,"br"),n.Rb(43,"br"),n.Vb(),n.Vb()}2&t&&(n.oc("formGroup",e.stepFormGroup),n.Db(4),n.Rc(n.jc(5,17,"lang.applicationName")),n.Db(4),n.Sc("",n.jc(9,19,"lang.loginMsg")," : "),n.Db(6),n.Sc("",n.jc(15,21,"lang.homeMsg")," : "),n.Db(7),n.Sc("",n.jc(22,23,"lang.chooseLogo")," : "),n.Db(9),n.Sc("",n.jc(31,25,"lang.chooseLoginBg")," : "),n.Db(3),n.Ib("disabled",e.stepFormGroup.controls.bodyImage.disabled)("selected","../rest/images?image=loginPage"===e.stepFormGroup.controls.bodyImage.value),n.Db(1),n.Ib("disabled",e.stepFormGroup.controls.bodyImage.disabled)("selected","assets/bodylogin.jpg"===e.stepFormGroup.controls.bodyImage.value),n.Db(1),n.oc("ngForOf",e.backgroundList),n.Db(1),n.oc("ngIf",!e.stepFormGroup.controls.bodyImage.disabled),n.Db(3),n.Sc("",n.jc(40,27,"lang.trafficRecordSummarySheetParameters")," : "))},directives:[X.K,X.v,X.m,Y.c,Y.g,J.b,X.d,X.u,X.k,K.a,W.u,S.a,P.s,P.t],pipes:[g.d],styles:[".backgroundList[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(5,1fr);grid-gap:10px}.selected[_ngcontent-%COMP%]{transition:all .3s;opacity:1!important;border:10px solid #f99830!important}.backgroundItem[_ngcontent-%COMP%]{border:0 solid #f99830;opacity:.5;transition:all .3s;cursor:pointer;height:120px;background-size:cover!important}.disabled[_ngcontent-%COMP%]{cursor:default!important}.backgroundItem[_ngcontent-%COMP%]:not(.disabled):hover{transition:all .3s;opacity:1!important}.maarchLogo[_ngcontent-%COMP%]{width:100%;height:50%}"]}),t})();function SG(t,e){if(1&t&&(n.Wb(0,"mat-option",5),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",n.jc(2,2,"lang."+t)," ")}}function IG(t,e){if(1&t&&(n.Wb(0,"mat-option",5),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",n.jc(2,2,"lang."+t)," ")}}let PG=(()=>{class t{constructor(t,e,i,n){this.translate=t,this.http=e,this._formBuilder=i,this.notify=n,this.finalActionValues=["restrictAccess","transfer","copy","delete"],this.documentFinalAction=this._formBuilder.group({bindingDocumentFinalAction:[""],nonBindingDocumentFinalAction:[""]})}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){yield this.getFinalAction()}))}getFinalAction(){return new Promise(t=>{this.http.get("../rest/parameters").pipe(Object(mt.a)(e=>{const i=e.parameters.filter(t=>"bindingDocumentFinalAction"===t.id)[0].param_value_string,n=e.parameters.filter(t=>"nonBindingDocumentFinalAction"===t.id)[0].param_value_string;this.documentFinalAction.controls.bindingDocumentFinalAction.setValue(i),this.documentFinalAction.controls.nonBindingDocumentFinalAction.setValue(n),setTimeout(()=>{this.documentFinalAction.controls.bindingDocumentFinalAction.valueChanges.pipe(Object(pt.a)(100),Object(mt.a)(()=>this.saveParameter("bindingDocumentFinalAction"))).subscribe(),this.documentFinalAction.controls.nonBindingDocumentFinalAction.valueChanges.pipe(Object(pt.a)(100),Object(mt.a)(()=>this.saveParameter("nonBindingDocumentFinalAction"))).subscribe()}),t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}saveParameter(t){let e={};e={param_value_string:this.documentFinalAction.controls[t].value},this.http.put("../rest/parameters/"+t,e).subscribe(()=>{this.notify.success(this.translate.instant("lang.parameterUpdated"))},t=>{this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(X.h),n.Qb(D.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-life-cyle"]],decls:16,vars:15,consts:[[2,"display","contents",3,"formGroup"],["appearance","outline"],["formControlName","bindingDocumentFinalAction","id","bindingDocumentFinalAction","name","bindingDocumentFinalAction",3,"title"],[3,"value",4,"ngFor","ngForOf"],["formControlName","nonBindingDocumentFinalAction","id","nonBindingDocumentFinalAction","name","nonBindingDocumentFinalAction",3,"title"],[3,"value"]],template:function(t,e){1&t&&(n.Wb(0,"form",0),n.Wb(1,"mat-form-field",1),n.Wb(2,"mat-label"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"mat-select",2),n.ic(6,"translate"),n.Oc(7,SG,3,4,"mat-option",3),n.Vb(),n.Vb(),n.Rb(8,"br"),n.Wb(9,"mat-form-field",1),n.Wb(10,"mat-label"),n.Qc(11),n.ic(12,"translate"),n.Vb(),n.Wb(13,"mat-select",4),n.ic(14,"translate"),n.Oc(15,IG,3,4,"mat-option",3),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.oc("formGroup",e.documentFinalAction),n.Db(3),n.Rc(n.jc(4,7,"lang.bindingDocumentFinalAction")),n.Db(2),n.pc("title",n.jc(6,9,"lang.bindingDocumentFinalAction")),n.Db(2),n.oc("ngForOf",e.finalActionValues),n.Db(4),n.Rc(n.jc(12,11,"lang.nonBindingDocumentFinalAction")),n.Db(2),n.pc("title",n.jc(14,13,"lang.nonBindingDocumentFinalAction")),n.Db(2),n.oc("ngForOf",e.finalActionValues))},directives:[X.K,X.v,X.m,Y.c,Y.g,ee.a,X.u,X.k,P.s,W.p],pipes:[g.d],encapsulation:2}),t})();const VG=["adminMenuTemplate"];function RG(t,e){1&t&&(n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",11),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",12),n.Rb(5,"mat-icon",13),n.Wb(6,"p",14),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,2,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,4,"lang.add")," "))}function jG(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Vb())}function AG(t,e){1&t&&(n.Wb(0,"mat-header-cell",40),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.id")," "))}function WG(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.id," ")}}function TG(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",40),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Sc(" ",n.jc(2,3,"lang.description")," ")}}function EG(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",t.description," ")}}function FG(t,e){1&t&&(n.Wb(0,"mat-header-cell",40),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.value")," "))}function LG(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.value," ")}}function QG(t,e){1&t&&n.Rb(0,"mat-header-cell")}function NG(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",41),n.Wb(1,"button",42),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.deleteParameter(a.id)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",43),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.pc("matTooltip",n.jc(2,1,"lang.delete")))}function zG(t,e){1&t&&n.Rb(0,"mat-header-row")}function BG(t,e){1&t&&(n.Rb(0,"mat-row",44),n.ic(1,"translate")),2&t&&(n.qc("routerLink","/administration/parameters/",e.$implicit.id,""),n.pc("matTooltip",n.jc(1,2,"lang.view")))}function UG(t,e){1&t&&n.Rb(0,"app-parameters-customization")}function $G(t,e){1&t&&n.Rb(0,"app-life-cyle")}function HG(t,e){if(1&t&&(n.Wb(0,"mat-card",17),n.Wb(1,"mat-tab-group"),n.Wb(2,"mat-tab",18),n.ic(3,"translate"),n.Wb(4,"div",19),n.Wb(5,"div",20),n.Wb(6,"mat-form-field"),n.Rb(7,"input",21),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Wb(9,"div",20),n.Rb(10,"mat-paginator",22,23),n.Vb(),n.Vb(),n.Wb(12,"mat-table",24,25),n.Ub(14,26),n.Oc(15,AG,3,3,"mat-header-cell",27),n.Oc(16,WG,2,1,"mat-cell",28),n.Tb(),n.Ub(17,29),n.Oc(18,TG,3,5,"mat-header-cell",30),n.Oc(19,EG,2,3,"mat-cell",31),n.Tb(),n.Ub(20,32),n.Oc(21,FG,3,3,"mat-header-cell",27),n.Oc(22,LG,2,1,"mat-cell",28),n.Tb(),n.Ub(23,33),n.Oc(24,QG,1,0,"mat-header-cell",34),n.Oc(25,NG,4,3,"mat-cell",35),n.Tb(),n.Oc(26,zG,1,0,"mat-header-row",36),n.Oc(27,BG,2,4,"mat-row",37),n.Vb(),n.Wb(28,"div",38),n.Qc(29),n.ic(30,"translate"),n.Vb(),n.Vb(),n.Wb(31,"mat-tab",18),n.ic(32,"translate"),n.Oc(33,UG,1,0,"ng-template",39),n.Vb(),n.Wb(34,"mat-tab",18),n.ic(35,"translate"),n.Oc(36,$G,1,0,"ng-template",39),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.oc("label",n.jc(3,13,"lang.technicalParameters")),n.Db(5),n.pc("placeholder",n.jc(8,15,"lang.filterBy")),n.oc("formControl",t.adminService.getFilterField()),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.adminService.getDataSource()),n.Db(14),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns),n.Db(2),n.Tc(" ",t.parameters.length," ",n.jc(30,17,"lang.parameters"),""),n.Db(2),n.oc("label",n.jc(32,19,"lang.customization")),n.Db(3),n.oc("label",n.jc(35,21,"lang.lifeCycle"))}}let GG=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.functions=s,this.adminService=o,this.viewContainerRef=r,this.parameters={},this.loading=!1,this.displayedColumns=["id","description","value","actions"],this.filterColumns=["id","description","value"]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.parameters")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,this.http.get("../rest/parameters").subscribe(t=>{this.parameters=t.parameters.filter(t=>-1===["homepage_message","loginpage_message","traffic_record_summary_sheet","bindingDocumentFinalAction","nonBindingDocumentFinalAction"].indexOf(t.id)),this.loading=!1,setTimeout(()=>{this.adminService.setDataSource("admin_parameters",this.parameters,this.sort,this.paginator,this.filterColumns)},0)})}deleteParameter(t){confirm(this.translate.instant("lang.deleteMsg"))&&this.http.delete("../rest/parameters/"+t).subscribe(t=>{this.parameters=t.parameters.filter(t=>-1===["homepage_message","loginpage_message","traffic_record_summary_sheet","bindingDocumentFinalAction","nonBindingDocumentFinalAction"].indexOf(t.id)),this.adminService.setDataSource("admin_parameters",this.parameters,this.sort,this.paginator,this.filterColumns),this.notify.success(this.translate.instant("lang.parameterDeleted"))},t=>{this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a),n.Qb(OL),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(VG,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:15,vars:8,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["mat-subheader",""],["mat-list-item","","routerLink","/administration/parameters/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[3,"label"],[1,"row"],[1,"col-md-6","col-xs-6"],["matInput","",3,"formControl","placeholder"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSort","","matSortDisableClear","",3,"dataSource"],["table",""],["matColumnDef","id"],["mat-sort-header","",4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","description"],["mat-sort-header","",3,"hide-for-mobile",4,"matHeaderCellDef"],[3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","value"],["matColumnDef","actions"],[4,"matHeaderCellDef"],["style","justify-content: flex-end;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"routerLink","matTooltip",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["matTabContent",""],["mat-sort-header",""],[2,"justify-content","flex-end"],["mat-icon-button","","color","warn",3,"matTooltip","click"],["aria-hidden","true",1,"fa","fa-trash-alt","fa-2x"],[2,"cursor","pointer",3,"routerLink","matTooltip"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,RG,9,6,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,jG,2,0,"div",9),n.Oc(14,HG,37,23,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,R.h,R.g,R.d,o.f,S.a,R.c,W.l,V.c,K.a,Te.c,Te.a,Y.c,J.b,X.d,X.u,X.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,Te.b,vt.h,Fe.b,vt.a,k.b,A.b,vt.j,vt.m,o.d,kG,PG],pipes:[g.d],encapsulation:2}),t})();const XG=["snav2"],qG=["adminMenuTemplate"];function KG(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",16),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",17),n.Rb(5,"mat-icon",18),n.Wb(6,"p",19),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Wb(9,"a",20),n.dc("click",(function(){return n.Dc(t),n.hc(),n.zc(16).toggle()})),n.Rb(10,"mat-icon",21),n.Wb(11,"p",19),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Vb()}2&t&&(n.Db(2),n.Rc(n.jc(3,3,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,5,"lang.add")," "),n.Db(5),n.Sc(" ",n.jc(13,7,"lang.prioritiesOrder")," "))}function YG(t,e){1&t&&(n.Wb(0,"div",22),n.Rb(1,"mat-spinner",23),n.Vb())}function JG(t,e){1&t&&(n.Wb(0,"mat-header-cell",45),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.technicalId")," "))}function ZG(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",46),n.Wb(1,"span",47),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.Qc(2),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(2),n.Sc(" ",t.id," ")}}function tX(t,e){1&t&&(n.Wb(0,"mat-header-cell",45),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.label")," "))}function eX(t,e){if(1&t&&(n.Wb(0,"mat-cell",46),n.Rb(1,"input",48),n.Qc(2),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.pc("value",t.color),n.Db(1),n.Sc(" ",t.label," ")}}function iX(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",45),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Sc(" ",n.jc(2,3,"lang.processDelayDay"),"")}}function nX(t,e){if(1&t&&(n.Wb(0,"mat-cell",46),n.Wb(1,"span"),n.Qc(2),n.Vb(),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(2),n.Sc(" ",t.delays," ")}}function aX(t,e){1&t&&n.Rb(0,"mat-header-cell")}function sX(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",49),n.Wb(1,"button",50),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.deletePriority(a.id)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",51),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.pc("matTooltip",n.jc(2,1,"lang.delete")))}function oX(t,e){1&t&&n.Rb(0,"mat-header-row")}function rX(t,e){1&t&&(n.Rb(0,"mat-row",52),n.ic(1,"translate")),2&t&&(n.qc("routerLink","/administration/priorities/",e.$implicit.id,""),n.pc("matTooltip",n.jc(1,2,"lang.view")))}function cX(t,e){if(1&t&&(n.Wb(0,"mat-card",24),n.Wb(1,"div",25),n.Wb(2,"div",26),n.Wb(3,"mat-form-field"),n.Rb(4,"input",27),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Wb(6,"div",26),n.Rb(7,"mat-paginator",28,29),n.Vb(),n.Vb(),n.Wb(9,"mat-table",30,31),n.Ub(11,32),n.Oc(12,JG,3,3,"mat-header-cell",33),n.Oc(13,ZG,3,1,"mat-cell",34),n.Tb(),n.Ub(14,35),n.Oc(15,tX,3,3,"mat-header-cell",33),n.Oc(16,eX,3,2,"mat-cell",34),n.Tb(),n.Ub(17,36),n.Oc(18,iX,3,5,"mat-header-cell",37),n.Oc(19,nX,3,3,"mat-cell",38),n.Tb(),n.Ub(20,39),n.Oc(21,aX,1,0,"mat-header-cell",40),n.Oc(22,sX,4,3,"mat-cell",41),n.Tb(),n.Oc(23,oX,1,0,"mat-header-row",42),n.Oc(24,rX,2,4,"mat-row",43),n.Vb(),n.Wb(25,"div",44),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.pc("placeholder",n.jc(5,10,"lang.filterBy")),n.oc("formControl",t.adminService.getFilterField()),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.adminService.getDataSource()),n.Db(14),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns),n.Db(2),n.Tc(" ",t.priorities.length," ",n.jc(27,12,"lang.priorities"),"")}}function lX(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item",53),n.dc("onDropSuccess",(function(){return n.Dc(t),n.hc().updatePrioritiesOrder()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",54),n.Wb(3,"p",19),n.Qc(4),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=e.index;n.pc("title",n.jc(1,4,"lang.move")),n.oc("sortableIndex",i),n.Db(4),n.Tc("",i+1," - ",t.label,"")}}const dX=function(){return["boxers-zone"]};let hX=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.functions=s,this.adminService=o,this.viewContainerRef=r,this.loading=!1,this.priorities=[],this.prioritiesOrder=[],this.displayedColumns=["id","label","delays","actions"],this.filterColumns=["id","label","delays"]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.priorities")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,this.http.get("../rest/priorities").subscribe(t=>{this.priorities=t.priorities,this.loading=!1,this.http.get("../rest/sortedPriorities").subscribe(t=>{this.prioritiesOrder=t.priorities},t=>{this.notify.handleErrors(t)}),setTimeout(()=>{this.adminService.setDataSource("admin_priorities",this.priorities,this.sort,this.paginator,this.filterColumns)},0)},t=>{this.notify.handleErrors(t)})}deletePriority(t){confirm(this.translate.instant("lang.deleteMsg"))&&this.http.delete("../rest/priorities/"+t).subscribe(t=>{this.priorities=t.priorities,this.adminService.setDataSource("admin_priorities",this.priorities,this.sort,this.paginator,this.filterColumns),this.notify.success(this.translate.instant("lang.priorityDeleted"))},t=>{this.notify.error(t.error.errors)})}updatePrioritiesOrder(){this.http.put("../rest/sortedPriorities",this.prioritiesOrder).subscribe(t=>{this.prioritiesOrder=t.priorities,this.notify.success(this.translate.instant("lang.modificationSaved"))},t=>{this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a),n.Qb(OL),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(XG,!0),n.Kc(qG,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:23,vars:18,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["fixedTopGap","56","position","end",3,"mode","fixedInViewport","opened"],["snav2",""],[2,"font-size","15px","padding","5px"],["dnd-sortable-container","",3,"dropZones","sortableData"],["disableRipple","true","dnd-sortable","",3,"title","sortableIndex","onDropSuccess",4,"ngFor","ngForOf"],["mat-subheader",""],["mat-list-item","","routerLink","/administration/priorities/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],["mat-list-item","",3,"click"],["color","primary","mat-list-icon","",1,"fa","fa-list-ol"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"row"],[1,"col-md-6","col-xs-6"],["matInput","",3,"formControl","placeholder"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSort","","matSortDisableClear","",3,"dataSource"],["table",""],["matColumnDef","id"],["mat-sort-header","","style","flex:2;",4,"matHeaderCellDef"],["style","flex:2;",4,"matCellDef"],["matColumnDef","label"],["matColumnDef","delays"],["mat-sort-header","","style","flex:2;",3,"hide-for-mobile",4,"matHeaderCellDef"],["style","flex:2;",3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","actions"],[4,"matHeaderCellDef"],["style","justify-content: flex-end;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"routerLink","matTooltip",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["mat-sort-header","",2,"flex","2"],[2,"flex","2"],[3,"click"],["type","color","disabled","",2,"background","none","border","none","width","45px",3,"value"],[2,"justify-content","flex-end"],["mat-icon-button","","color","warn",3,"matTooltip","click"],["aria-hidden","true",1,"fa","fa-trash-alt","fa-2x"],[2,"cursor","pointer",3,"routerLink","matTooltip"],["disableRipple","true","dnd-sortable","",3,"title","sortableIndex","onDropSuccess"],["color","primary","mat-list-icon","",1,"fa","fa-inbox"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,KG,14,9,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,YG,2,0,"div",9),n.Oc(14,cX,28,14,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Wb(15,"mat-sidenav",11,12),n.Wb(17,"p",13),n.Qc(18),n.ic(19,"translate"),n.Vb(),n.Wb(20,"mat-list"),n.Wb(21,"span",14),n.Oc(22,lX,5,6,"mat-list-item",15),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",(e.appService.getViewMode(),!1)),n.Db(3),n.Sc(" ",n.jc(19,15,"lang.prioritiesHelpDesc")," "),n.Db(3),n.oc("dropZones",n.uc(17,dX))("sortableData",e.prioritiesOrder),n.Db(1),n.oc("ngForOf",e.prioritiesOrder))},directives:[I.e,I.f,Ot,We,P.t,I.d,R.a,Ee.f,P.s,R.h,R.g,R.d,o.f,S.a,R.c,W.l,V.c,K.a,Y.c,J.b,X.d,X.u,X.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,vt.h,Fe.b,vt.a,k.b,A.b,vt.j,vt.m,o.d,Ee.e],pipes:[g.d],encapsulation:2}),t})();function uX(t,e){1&t&&(n.Wb(0,"div",10),n.Rb(1,"mat-spinner",11),n.Vb())}function pX(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",12),n.Wb(1,"form",13,14),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Wb(3,"div",15),n.Wb(4,"div",16),n.Wb(5,"div",17),n.Wb(6,"mat-form-field"),n.Wb(7,"input",18),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().priority.color=e})),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(9,"div",19),n.Wb(10,"mat-form-field"),n.Wb(11,"input",20),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().priority.label=e})),n.ic(12,"translate"),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(14,"div",15),n.Wb(15,"div",21),n.Wb(16,"mat-form-field"),n.Wb(17,"input",22),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().priority.delays=e})),n.ic(18,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(19,"div",15),n.Wb(20,"div",23),n.Wb(21,"button",24),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(2),e=n.hc();n.Db(7),n.pc("matTooltip",n.jc(8,9,"lang.chooseColor")),n.oc("ngModel",e.priority.color),n.Db(4),n.pc("title",n.jc(12,11,"lang.label")),n.pc("placeholder",n.jc(13,13,"lang.label")),n.oc("ngModel",e.priority.label),n.Db(6),n.pc("placeholder",n.jc(18,15,"lang.processDelayDay")),n.oc("ngModel",e.priority.delays),n.Db(4),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(23,17,"lang.save"))}}let bX=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.route=i,this.router=n,this.notify=a,this.headerService=s,this.appService=o,this.loading=!1,this.priority={color:"#135f7f",delays:"0"}}ngOnInit(){this.loading=!0,this.route.params.subscribe(t=>{void 0===t.id?(this.headerService.setHeader(this.translate.instant("lang.priorityCreation")),this.creationMode=!0,this.loading=!1):(this.creationMode=!1,this.id=t.id,this.http.get("../rest/priorities/"+this.id).subscribe(t=>{this.priority=t.priority,this.headerService.setHeader(this.translate.instant("lang.priorityModification"),this.priority.label),this.loading=!1},t=>{this.notify.handleErrors(t)}))})}onSubmit(){this.creationMode?this.http.post("../rest/priorities",this.priority).subscribe(()=>{this.notify.success(this.translate.instant("lang.priorityAdded")),this.router.navigate(["/administration/priorities"])},t=>{this.notify.error(t.error.errors)}):this.http.put("../rest/priorities/"+this.id,this.priority).subscribe(()=>{this.notify.success(this.translate.instant("lang.priorityUpdated")),this.router.navigate(["/administration/priorities"])},t=>{this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:13,vars:8,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"form-horizontal",3,"ngSubmit"],["priorityForm","ngForm"],[1,"form-group"],[1,"row",2,"margin","0px"],[1,"col-md-1","col-xs-2"],["matInput","","type","color","name","color","required","",3,"matTooltip","ngModel","ngModelChange"],[1,"col-md-11","col-xs-10"],["matInput","","type","text","name","label","maxlength","128","required","",3,"title","placeholder","ngModel","ngModelChange"],[1,"col-md-4"],["matInput","","type","number","name","delays","required","","pattern","^\\d+$",3,"placeholder","ngModel","ngModelChange"],[1,"col-md-12","text-center",2,"padding","10px"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,uX,2,0,"div",8),n.Oc(12,pX,24,19,"mat-card",9),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,V.c,K.a,X.K,X.v,X.w,Y.c,J.b,X.d,X.F,A.b,X.u,X.x,X.p,X.A,X.B,k.b],pipes:[g.d],encapsulation:2}),t})();const fX=["snav2"],mX=["adminMenuTemplate"];function gX(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",14),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",35),n.Rb(5,"mat-icon",36),n.Wb(6,"p",37),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Wb(9,"a",38),n.dc("click",(function(){n.Dc(t);const e=n.hc(),i=n.zc(16);return e.loadCron(),i.toggle()}))("next",(function(){n.Dc(t);const e=n.hc();return n.zc(16).open(),e.paramCron()})),n.Rb(10,"mat-icon",39),n.Wb(11,"p",37),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Vb()}2&t&&(n.Db(2),n.Rc(n.jc(3,3,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,5,"lang.add")," "),n.Db(5),n.Sc(" ",n.jc(13,7,"lang.toSchedule")," "))}function vX(t,e){1&t&&(n.Wb(0,"div",40),n.Rb(1,"mat-spinner",41),n.Vb())}function _X(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",64),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Rc(n.jc(2,3,"lang.id"))}}function yX(t,e){if(1&t&&(n.Wb(0,"mat-cell",65),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",t.notification_id," ")}}function xX(t,e){1&t&&(n.Wb(0,"mat-header-cell",66),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.description")," "))}function CX(t,e){if(1&t&&(n.Wb(0,"mat-cell",67),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.description," ")}}function OX(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",64),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Rc(n.jc(2,3,"lang.status"))}}function DX(t,e){1&t&&(n.Wb(0,"span",71),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.active")))}function wX(t,e){1&t&&(n.Wb(0,"span",72),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.suspended")))}function MX(t,e){if(1&t&&(n.Wb(0,"mat-cell",68),n.ic(1,"translate"),n.Oc(2,DX,3,3,"span",69),n.Oc(3,wX,3,3,"span",70),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.pc("matTooltip",n.jc(1,5,"lang.view")),n.Db(2),n.oc("ngIf","Y"==t.is_enabled),n.Db(1),n.oc("ngIf","N"==t.is_enabled)}}function kX(t,e){1&t&&n.Rb(0,"mat-header-cell",65)}function SX(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",73),n.Wb(1,"button",74),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.deleteNotification(a)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",75),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.pc("matTooltip",n.jc(2,1,"lang.delete")))}function IX(t,e){1&t&&n.Rb(0,"mat-header-row")}function PX(t,e){if(1&t&&(n.Rb(0,"mat-row",76),n.ic(1,"translate")),2&t){const t=e.$implicit;n.qc("routerLink","/administration/notifications/",t.notification_sid,""),n.pc("matTooltip",n.jc(1,3,"lang.view")),n.oc("joyrideStep",t.notification_id+"_Tour")}}function VX(t,e){if(1&t&&(n.Wb(0,"mat-card",42),n.Wb(1,"div",43),n.Wb(2,"div",44),n.Wb(3,"mat-form-field"),n.Rb(4,"input",45),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Wb(6,"div",44),n.Rb(7,"mat-paginator",46,47),n.Vb(),n.Vb(),n.Wb(9,"mat-table",48,49),n.Ub(11,50),n.Oc(12,_X,3,5,"mat-header-cell",51),n.Oc(13,yX,2,3,"mat-cell",52),n.Tb(),n.Ub(14,53),n.Oc(15,xX,3,3,"mat-header-cell",54),n.Oc(16,CX,2,1,"mat-cell",55),n.Tb(),n.Ub(17,56),n.Oc(18,OX,3,5,"mat-header-cell",51),n.Oc(19,MX,4,7,"mat-cell",57),n.Tb(),n.Ub(20,58),n.Oc(21,kX,1,0,"mat-header-cell",59),n.Oc(22,SX,4,3,"mat-cell",60),n.Tb(),n.Oc(23,IX,1,0,"mat-header-row",61),n.Oc(24,PX,2,5,"mat-row",62),n.Vb(),n.Wb(25,"div",63),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.pc("placeholder",n.jc(5,10,"lang.filterBy")),n.oc("formControl",t.adminService.getFilterField()),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.adminService.getDataSource()),n.Db(14),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns),n.Db(2),n.Tc(" ",t.notifications.length," ",n.jc(27,12,"lang.notifications"),"")}}function RX(t,e){if(1&t&&(n.Wb(0,"mat-option",77),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.value),n.Db(1),n.Sc(" ",t.label," ")}}function jX(t,e){if(1&t&&(n.Wb(0,"mat-option",77),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.value),n.Db(1),n.Sc(" ",t.label," ")}}function AX(t,e){if(1&t&&(n.Wb(0,"mat-option",77),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.value),n.Db(1),n.Sc(" ",t.label," ")}}function WX(t,e){if(1&t&&(n.Wb(0,"mat-option",77),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.value),n.Db(1),n.Sc(" ",t.label," ")}}function TX(t,e){if(1&t&&(n.Wb(0,"mat-option",77),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.value),n.Db(1),n.Sc(" ",t.label," ")}}function EX(t,e){if(1&t&&(n.Wb(0,"mat-option",77),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.path),n.Db(1),n.Sc(" ",t.description," ")}}function FX(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",79),n.dc("removed",(function(){n.Dc(t);const e=n.hc().index;return n.hc().deleteCron(e)})),n.Qc(1),n.Rb(2,"span",80),n.Wb(3,"b"),n.Qc(4),n.Vb(),n.Rb(5,"mat-icon",81),n.ic(6,"translate"),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(1),n.Sc(" ",t.description," "),n.Db(3),n.Wc("",t.m,"\xa0\xa0",t.h,"\xa0\xa0",t.dom,"\xa0\xa0",t.mon,"\xa0\xa0",t.dow,""),n.Db(1),n.pc("matTooltip",n.jc(6,7,"lang.delete"))}}function LX(t,e){if(1&t&&(n.Wb(0,"span"),n.Oc(1,FX,7,9,"mat-chip",78),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf","normal"==t.state)}}let QX=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.functions=s,this.adminService=o,this.viewContainerRef=r,this.notifications=[],this.loading=!1,this.months=[],this.dom=[],this.dow=[],this.newCron={m:"",h:"",dom:"",mon:"",cmd:"",state:"normal"},this.displayedColumns=["notification_id","description","is_enabled","notifications"],this.filterColumns=["notification_id","description"]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.notifications")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,this.http.get("../rest/notifications").subscribe(t=>{this.notifications=t.notifications,this.loading=!1,setTimeout(()=>{this.adminService.setDataSource("admin_notif",this.notifications,this.sort,this.paginator,this.filterColumns)},0)},t=>{this.notify.error(t.error.errors)})}deleteNotification(t){confirm(this.translate.instant("lang.deleteMsg"))&&this.http.delete("../rest/notifications/"+t.notification_sid).subscribe(t=>{this.notifications=t.notifications,setTimeout(()=>{this.adminService.setDataSource("admin_notif",this.notifications,this.sort,this.paginator,this.filterColumns)},0),this.sidenavRight.close(),this.notify.success(this.translate.instant("lang.notificationDeleted"))},t=>{this.notify.error(t.error.errors)})}loadCron(){return new Promise(t=>{this.hours=[{label:this.translate.instant("lang.eachHour"),value:"*"}],this.minutes=[{label:this.translate.instant("lang.eachMinute"),value:"*"}],this.months=[{label:this.translate.instant("lang.eachMonth"),value:"*"},{label:this.translate.instant("lang.january"),value:"1"},{label:this.translate.instant("lang.february"),value:"2"},{label:this.translate.instant("lang.march"),value:"3"},{label:this.translate.instant("lang.april"),value:"4"},{label:this.translate.instant("lang.may"),value:"5"},{label:this.translate.instant("lang.june"),value:"6"},{label:this.translate.instant("lang.july"),value:"7"},{label:this.translate.instant("lang.august"),value:"8"},{label:this.translate.instant("lang.september"),value:"9"},{label:this.translate.instant("lang.october"),value:"10"},{label:this.translate.instant("lang.november"),value:"11"},{label:this.translate.instant("lang.december"),value:"12"}],this.dom=[{label:this.translate.instant("lang.notUsed"),value:"*"}],this.dow=[{label:this.translate.instant("lang.eachDay"),value:"*"},{label:this.translate.instant("lang.monday"),value:"1"},{label:this.translate.instant("lang.tuesday"),value:"2"},{label:this.translate.instant("lang.wednesday"),value:"3"},{label:this.translate.instant("lang.thursday"),value:"4"},{label:this.translate.instant("lang.friday"),value:"5"},{label:this.translate.instant("lang.saturday"),value:"6"},{label:this.translate.instant("lang.sunday"),value:"7"}],this.newCron={m:"",h:"",dom:"",mon:"",cmd:"",state:"normal"};for(let e=0;e<=23;e++)this.hours.push({label:e,value:String(e)});for(let e=0;e<=59;e++)this.minutes.push({label:e,value:String(e)});for(let e=1;e<=31;e++)this.dom.push({label:e,value:String(e)});this.http.get("../rest/notifications/schedule").pipe(Object(mt.a)(t=>{this.crontab=t.crontab,this.authorizedNotification=t.authorizedNotification}),Object(Xt.a)(()=>t(!0)),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}saveCron(){const t=this.newCron.cmd.split("/");this.newCron.description=t[t.length-1],this.crontab.push(this.newCron),this.http.post("../rest/notifications/schedule",this.crontab).subscribe(t=>{this.newCron={m:"",h:"",dom:"",mon:"",cmd:"",description:"",state:"normal"},this.notify.success(this.translate.instant("lang.notificationScheduleUpdated"))},t=>{this.crontab.pop(),this.notify.error(t.error.errors)})}deleteCron(t){this.crontab[t].state="deleted",this.http.post("../rest/notifications/schedule",this.crontab).subscribe(e=>{this.crontab.splice(t,1),this.notify.success(this.translate.instant("lang.notificationScheduleUpdated"))},t=>{this.notify.error(t.error.errors)})}onNext(){return this.sidenavRight.open(),!1}paramCron(){return Object(r.a)(this,void 0,void 0,(function*(){yield this.loadCron();const t=this.authorizedNotification.filter(t=>t.path.indexOf("_BASKETS.sh")>-1)[0];this.newCron={m:"0",h:"8",dom:"*",dow:"*",mon:"*",cmd:t.path,description:t.description,state:"normal"}}))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a),n.Qb(OL),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(fX,!0),n.Kc(mX,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:76,vars:73,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["fixedTopGap","56","position","end",3,"mode","fixedInViewport","opened","next"],["snav2",""],["joyrideStep","notifTour3",3,"next"],["mat-subheader",""],[1,"form-horizontal",2,"overflow","hidden"],["notifForm","ngForm"],[1,"form-group",2,"padding-left","15px","padding-right","15px"],[1,"col-sm-4"],["name","hour","id","hour","required","",3,"title","placeholder","ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["name","minute","id","minute","required","",3,"title","placeholder","ngModel","ngModelChange"],["name","day","id","day","required","",3,"title","placeholder","ngModel","ngModelChange"],[1,"col-sm-6"],["name","month","id","month","required","",3,"title","placeholder","ngModel","ngModelChange"],["name","dayM","id","dayM","required","",3,"title","placeholder","ngModel","ngModelChange"],[1,"col-sm-12"],["name","script","id","script","required","",3,"title","placeholder","ngModel","ngModelChange"],[1,"col-sm-12","text-center",2,"padding","10px"],["mat-raised-button","","color","primary",3,"disabled","click"],["role","alert",1,"alert","alert-info",2,"margin","15px"],["joyrideStep","notifTour4"],[1,"mat-chip-list-stacked"],["chipList",""],[4,"ngFor","ngForOf"],["mat-list-item","","routerLink","/administration/notifications/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],["mat-list-item","","joyrideStep","notifTour",3,"click","next"],["color","primary","mat-list-icon","",1,"fa","fa-clock"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"row"],[1,"col-md-6","col-xs-6"],["matInput","",3,"formControl","placeholder"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSort","","matSortDisableClear","",3,"dataSource"],["table",""],["matColumnDef","notification_id"],["mat-sort-header","","style","flex:1;",3,"hide-for-mobile",4,"matHeaderCellDef"],["style","flex:1;",3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","description"],["mat-sort-header","","style","flex:2;",4,"matHeaderCellDef"],["style","flex:2;",4,"matCellDef"],["matColumnDef","is_enabled"],["style","flex:1;",3,"matTooltip","hide-for-mobile",4,"matCellDef"],["matColumnDef","notifications"],["style","flex:1;",4,"matHeaderCellDef"],["style","justify-content: flex-end;flex:1;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"routerLink","matTooltip","joyrideStep",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["mat-sort-header","",2,"flex","1"],[2,"flex","1"],["mat-sort-header","",2,"flex","2"],[2,"flex","2"],[2,"flex","1",3,"matTooltip"],["color","primary","class","label",4,"ngIf"],["color","warn","class","label",4,"ngIf"],["color","primary",1,"label"],["color","warn",1,"label"],[2,"justify-content","flex-end","flex","1"],["mat-icon-button","","color","warn",3,"matTooltip","click"],["aria-hidden","true",1,"fa","fa-trash-alt","fa-2x"],[2,"cursor","pointer",3,"routerLink","matTooltip","joyrideStep"],[3,"value"],["color","primary","style","margin:5px;border-radius:0px;display:flex;","selectable","false","removable","true",3,"removed",4,"ngIf"],["color","primary","selectable","false","removable","true",2,"margin","5px","border-radius","0px","display","flex",3,"removed"],[2,"flex","1 1 auto"],["matChipRemove","","color","warn",1,"fa","fa-times",3,"matTooltip"]],template:function(t,e){if(1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,gX,14,9,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,vX,2,0,"div",9),n.Oc(14,VX,28,14,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Wb(15,"mat-sidenav",11,12),n.dc("next",(function(){return e.paramCron()})),n.Wb(17,"mat-list",13),n.dc("next",(function(){return e.saveCron()})),n.Wb(18,"h3",14),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"form",15,16),n.Wb(23,"div",17),n.Wb(24,"div",18),n.Wb(25,"mat-form-field"),n.Wb(26,"mat-select",19),n.dc("ngModelChange",(function(t){return e.newCron.h=t})),n.ic(27,"translate"),n.ic(28,"translate"),n.Oc(29,RX,2,2,"mat-option",20),n.Vb(),n.Vb(),n.Vb(),n.Wb(30,"div",18),n.Wb(31,"mat-form-field"),n.Wb(32,"mat-select",21),n.dc("ngModelChange",(function(t){return e.newCron.m=t})),n.ic(33,"translate"),n.ic(34,"translate"),n.Oc(35,jX,2,2,"mat-option",20),n.Vb(),n.Vb(),n.Vb(),n.Wb(36,"div",18),n.Wb(37,"mat-form-field"),n.Wb(38,"mat-select",22),n.dc("ngModelChange",(function(t){return e.newCron.dow=t})),n.ic(39,"translate"),n.ic(40,"translate"),n.Oc(41,AX,2,2,"mat-option",20),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(42,"div",17),n.Wb(43,"div",23),n.Wb(44,"mat-form-field"),n.Wb(45,"mat-select",24),n.dc("ngModelChange",(function(t){return e.newCron.mon=t})),n.ic(46,"translate"),n.ic(47,"translate"),n.Oc(48,WX,2,2,"mat-option",20),n.Vb(),n.Vb(),n.Vb(),n.Wb(49,"div",23),n.Wb(50,"mat-form-field"),n.Wb(51,"mat-select",25),n.dc("ngModelChange",(function(t){return e.newCron.dom=t})),n.ic(52,"translate"),n.ic(53,"translate"),n.Oc(54,TX,2,2,"mat-option",20),n.Vb(),n.Vb(),n.Vb(),n.Wb(55,"div",26),n.Wb(56,"mat-form-field"),n.Wb(57,"mat-select",27),n.dc("ngModelChange",(function(t){return e.newCron.cmd=t})),n.ic(58,"translate"),n.ic(59,"translate"),n.Oc(60,EX,2,2,"mat-option",20),n.Vb(),n.Vb(),n.Vb(),n.Wb(61,"div",28),n.Wb(62,"button",29),n.dc("click",(function(){return e.saveCron()})),n.Qc(63),n.ic(64,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Rb(65,"mat-divider"),n.Wb(66,"div",30),n.Qc(67),n.ic(68,"translate"),n.Vb(),n.Wb(69,"mat-list",31),n.Wb(70,"h3",14),n.Qc(71),n.ic(72,"translate"),n.Vb(),n.Wb(73,"mat-chip-list",32,33),n.Oc(75,LX,2,1,"span",34),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.zc(22);n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",(e.appService.getViewMode(),!1)),n.Db(4),n.Rc(n.jc(20,41,"lang.notificationSchedule")),n.Db(7),n.pc("title",n.jc(27,43,"lang.hour")),n.pc("placeholder",n.jc(28,45,"lang.hour")),n.oc("ngModel",e.newCron.h),n.Db(3),n.oc("ngForOf",e.hours),n.Db(3),n.pc("title",n.jc(33,47,"lang.minute")),n.pc("placeholder",n.jc(34,49,"lang.minute")),n.oc("ngModel",e.newCron.m),n.Db(3),n.oc("ngForOf",e.minutes),n.Db(3),n.pc("title",n.jc(39,51,"lang.day")),n.pc("placeholder",n.jc(40,53,"lang.day")),n.oc("ngModel",e.newCron.dow),n.Db(3),n.oc("ngForOf",e.dow),n.Db(4),n.pc("title",n.jc(46,55,"lang.month")),n.pc("placeholder",n.jc(47,57,"lang.month")),n.oc("ngModel",e.newCron.mon),n.Db(3),n.oc("ngForOf",e.months),n.Db(3),n.pc("title",n.jc(52,59,"lang.dayOfMonth")),n.pc("placeholder",n.jc(53,61,"lang.dayOfMonth")),n.oc("ngModel",e.newCron.dom),n.Db(3),n.oc("ngForOf",e.dom),n.Db(3),n.pc("title",n.jc(58,63,"lang.script")),n.pc("placeholder",n.jc(59,65,"lang.script")),n.oc("ngModel",e.newCron.cmd),n.Db(3),n.oc("ngForOf",e.authorizedNotification),n.Db(2),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(64,67,"lang.save")),n.Db(4),n.Sc(" ",n.jc(68,69,"lang.NotificationScheduleInfo")," "),n.Db(4),n.Rc(n.jc(72,71,"lang.activeCron")),n.Db(4),n.oc("ngForOf",e.crontab)}},directives:[I.e,I.f,Ot,We,P.t,I.d,R.a,za,R.g,X.K,X.v,X.w,Y.c,ee.a,X.F,X.u,X.x,P.s,k.b,T.a,ze.d,R.h,R.d,o.f,S.a,R.c,W.l,V.c,K.a,J.b,X.d,X.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,vt.h,Fe.b,vt.a,A.b,vt.j,vt.m,o.d,W.p,ze.a,ze.e],pipes:[g.d],encapsulation:2}),t})();const NX=["adminMenuTemplate"];function zX(t,e){1&t&&(n.Wb(0,"h3",14),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.actions")))}function BX(t,e){if(1&t){const t=n.Xb();n.Wb(0,"a",15),n.dc("click",(function(){return n.Dc(t),n.hc(2).createScript()}))("next",(function(){return n.Dc(t),n.hc(2).createScript()})),n.Rb(1,"mat-icon",16),n.Wb(2,"p",17),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(3),n.Sc(" ",n.jc(4,1,"lang.createScriptNotification")," "))}function UX(t,e){if(1&t){const t=n.Xb();n.Wb(0,"a",18),n.dc("click",(function(){return n.Dc(t),n.hc(2).toggleNotif()})),n.Rb(1,"mat-icon",19),n.Wb(2,"p",17),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(3),n.Sc(" ",n.jc(4,1,"lang.activateNotification")," "))}function $X(t,e){if(1&t){const t=n.Xb();n.Wb(0,"a",18),n.dc("click",(function(){return n.Dc(t),n.hc(2).toggleNotif()})),n.Rb(1,"mat-icon",20),n.Wb(2,"p",17),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(3),n.Sc(" ",n.jc(4,1,"lang.suspendNotification")," "))}function HX(t,e){if(1&t&&(n.Wb(0,"mat-nav-list"),n.Oc(1,zX,3,3,"h3",11),n.Oc(2,BX,5,3,"a",12),n.Oc(3,UX,5,3,"a",13),n.Oc(4,$X,5,3,"a",13),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",!t.creationMode),n.Db(1),n.oc("ngIf",!t.creationMode&&!t.loading&&!t.notification.scriptcreated),n.Db(1),n.oc("ngIf",!t.creationMode&&!t.loading&&"N"==t.notification.is_enabled),n.Db(1),n.oc("ngIf",!t.creationMode&&!t.loading&&"Y"==t.notification.is_enabled)}}function GX(t,e){1&t&&(n.Wb(0,"div",21),n.Rb(1,"mat-spinner",22),n.Vb())}function XX(t,e){1&t&&(n.Wb(0,"div",46),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.suspended"),""))}function qX(t,e){if(1&t&&(n.Wb(0,"mat-option",48),n.Rb(1,"mat-icon",49),n.Qc(2),n.Vb()),2&t){const t=n.hc().$implicit;n.oc("value",t.id),n.Db(2),n.Sc(" ",t.label_action," ")}}function KX(t,e){if(1&t&&(n.Ub(0),n.Oc(1,qX,3,2,"mat-option",47),n.Tb()),2&t){const t=e.$implicit,i=n.hc(2);n.Db(1),n.oc("ngIf",!i.isNumber(t.id))}}function YX(t,e){if(1&t&&(n.Wb(0,"mat-option",48),n.Rb(1,"mat-icon",50),n.Qc(2),n.Vb()),2&t){const t=n.hc().$implicit;n.oc("value",t.id),n.Db(2),n.Sc(" ",t.label_action," ")}}function JX(t,e){if(1&t&&(n.Ub(0),n.Oc(1,YX,3,2,"mat-option",47),n.Tb()),2&t){const t=e.$implicit,i=n.hc(2);n.Db(1),n.oc("ngIf",i.isNumber(t.id))}}function ZX(t,e){if(1&t&&(n.Wb(0,"mat-option",48),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.template_id),n.Db(1),n.Sc(" ",t.template_label," ")}}function tq(t,e){if(1&t&&(n.Wb(0,"mat-option",48),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.oc("value",t.id),n.Db(1),n.Rc(t.label)}}function eq(t,e){if(1&t&&(n.Ub(0),n.Oc(1,tq,2,2,"mat-option",47),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf","dest_user"==t.id)}}function iq(t,e){if(1&t&&(n.Wb(0,"mat-optgroup",32),n.ic(1,"translate"),n.Oc(2,eq,2,1,"ng-container",33),n.Vb()),2&t){const t=n.hc(2);n.qc("label","",n.jc(1,2,"lang.memberUserDest")," :"),n.Db(2),n.oc("ngForOf",t.notification.data.diffusionType)}}function nq(t,e){if(1&t&&(n.Wb(0,"mat-option",48),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.oc("value",t.id),n.Db(1),n.Rc(t.label)}}function aq(t,e){if(1&t&&(n.Ub(0),n.Oc(1,nq,2,2,"mat-option",47),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf","copy_list"==t.id)}}function sq(t,e){if(1&t&&(n.Wb(0,"mat-optgroup",32),n.ic(1,"translate"),n.Oc(2,aq,2,1,"ng-container",33),n.Vb()),2&t){const t=n.hc(2);n.qc("label","",n.jc(1,2,"lang.memberUsersCopy")," :"),n.Db(2),n.oc("ngForOf",t.notification.data.diffusionType)}}function oq(t,e){if(1&t&&(n.Wb(0,"mat-option",48),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.oc("value",t.id),n.Db(1),n.Rc(t.label)}}function rq(t,e){if(1&t&&(n.Ub(0),n.Oc(1,oq,2,2,"mat-option",47),n.Tb()),2&t){const t=e.$implicit,i=n.hc(2);n.Db(1),n.oc("ngIf","group"==t.id||"entity"==t.id&&"baskets"!=i.notification.event_id||"user"==t.id&&"baskets"!=i.notification.event_id)}}function cq(t,e){if(1&t&&(n.Wb(0,"mat-option",48),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.oc("value",t.id),n.Db(1),n.Rc(t.label)}}function lq(t,e){if(1&t&&(n.Ub(0),n.Oc(1,cq,2,2,"mat-option",47),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf","group"!=t.id&&"entity"!=t.id&&"user"!=t.id&&"copy_list"!=t.id&&"group"!=t.id&&"dest_user"!=t.id)}}function dq(t,e){if(1&t&&(n.Wb(0,"mat-optgroup",32),n.ic(1,"translate"),n.Oc(2,lq,2,1,"ng-container",33),n.Vb()),2&t){const t=n.hc(2);n.qc("label","",n.jc(1,2,"lang.others")," :"),n.Db(2),n.oc("ngForOf",t.notification.data.diffusionType)}}function hq(t,e){if(1&t&&(n.Wb(0,"mat-option",48),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.group_id),n.Db(1),n.Sc(" ",t.group_desc," ")}}function uq(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"mat-select",51),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).notification.diffusion_properties=e})),n.ic(2,"translate"),n.ic(3,"translate"),n.Oc(4,hq,2,2,"mat-option",36),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.pc("title",n.jc(2,4,"lang.memberDiffTypeUsers")),n.pc("placeholder",n.jc(3,6,"lang.memberDiffTypeUsers")),n.oc("ngModel",t.notification.diffusion_properties),n.Db(3),n.oc("ngForOf",t.notification.data.groups)}}function pq(t,e){if(1&t&&(n.Wb(0,"mat-option",48),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function bq(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"mat-select",51),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).notification.diffusion_properties=e})),n.ic(2,"translate"),n.ic(3,"translate"),n.Oc(4,pq,2,2,"mat-option",36),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.pc("title",n.jc(2,4,"lang.memberDiffTypeUsers")),n.pc("placeholder",n.jc(3,6,"lang.memberDiffTypeUsers")),n.oc("ngModel",t.notification.diffusion_properties),n.Db(3),n.oc("ngForOf",t.notification.data.users)}}function fq(t,e){if(1&t&&(n.Wb(0,"mat-option",48),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.entity_id),n.Db(1),n.Sc(" ",t.entity_label," ")}}function mq(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"mat-select",51),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).notification.diffusion_properties=e})),n.ic(2,"translate"),n.ic(3,"translate"),n.Oc(4,fq,2,2,"mat-option",36),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.pc("title",n.jc(2,4,"lang.memberDiffTypeUsers")),n.pc("placeholder",n.jc(3,6,"lang.memberDiffTypeUsers")),n.oc("ngModel",t.notification.diffusion_properties),n.Db(3),n.oc("ngForOf",t.notification.data.entities)}}function gq(t,e){if(1&t&&(n.Wb(0,"mat-option",48),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label_status," ")}}function vq(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"mat-select",52),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).notification.diffusion_properties=e})),n.ic(2,"translate"),n.ic(3,"translate"),n.ic(4,"translate"),n.Oc(5,gq,2,2,"mat-option",36),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.qc("title","",n.jc(2,5,"lang.selectedDocumentStatus")," (optionnel)"),n.rc("placeholder","",n.jc(3,7,"lang.selectedDocumentStatus")," (",n.jc(4,9,"lang.optional"),")"),n.oc("ngModel",t.notification.diffusion_properties),n.Db(4),n.oc("ngForOf",t.notification.data.status)}}function _q(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",23),n.Oc(1,XX,3,3,"div",24),n.Wb(2,"form",25,26),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Wb(4,"div",27),n.Wb(5,"div",28),n.Wb(6,"mat-form-field"),n.Wb(7,"input",29),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().notification.notification_id=e})),n.ic(8,"translate"),n.ic(9,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(10,"div",27),n.Wb(11,"div",28),n.Wb(12,"mat-form-field"),n.Wb(13,"input",30),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().notification.description=e})),n.ic(14,"translate"),n.ic(15,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(16,"div",27),n.Wb(17,"div",28),n.Wb(18,"mat-form-field"),n.Wb(19,"mat-select",31),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().notification.event_id=e})),n.ic(20,"translate"),n.ic(21,"translate"),n.Wb(22,"mat-optgroup",32),n.ic(23,"translate"),n.Oc(24,KX,2,1,"ng-container",33),n.Vb(),n.Wb(25,"mat-optgroup",32),n.ic(26,"translate"),n.Oc(27,JX,2,1,"ng-container",33),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(28,"div",27),n.Wb(29,"div",34),n.Wb(30,"mat-form-field"),n.Wb(31,"mat-select",35),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().notification.template_id=e})),n.ic(32,"translate"),n.ic(33,"translate"),n.Oc(34,ZX,2,2,"mat-option",36),n.Vb(),n.Vb(),n.Vb(),n.Wb(35,"div",37),n.Wb(36,"mat-form-field"),n.Wb(37,"mat-select",38),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().notification.attachfor_type=e})),n.ic(38,"translate"),n.ic(39,"translate"),n.Wb(40,"mat-option",39),n.Qc(41),n.ic(42,"translate"),n.Vb(),n.Wb(43,"mat-option",40),n.Qc(44),n.ic(45,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(46,"div",27),n.Wb(47,"div",37),n.Wb(48,"mat-form-field"),n.Wb(49,"mat-select",41),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().notification.diffusion_type=e})),n.ic(50,"translate"),n.ic(51,"translate"),n.Oc(52,iq,3,4,"mat-optgroup",42),n.Oc(53,sq,3,4,"mat-optgroup",42),n.Wb(54,"mat-optgroup",32),n.ic(55,"translate"),n.Oc(56,rq,2,1,"ng-container",33),n.Vb(),n.Oc(57,dq,3,4,"mat-optgroup",42),n.Vb(),n.Vb(),n.Vb(),n.Wb(58,"div",34),n.Oc(59,uq,5,8,"mat-form-field",43),n.Oc(60,bq,5,8,"mat-form-field",43),n.Oc(61,mq,5,8,"mat-form-field",43),n.Oc(62,vq,6,11,"mat-form-field",43),n.Vb(),n.Vb(),n.Wb(63,"div",27),n.Wb(64,"div",44),n.Wb(65,"button",45),n.Qc(66),n.ic(67,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(3),e=n.hc();n.Db(1),n.oc("ngIf","N"==e.notification.is_enabled),n.Db(6),n.pc("title",n.jc(8,38,"lang.id")),n.pc("placeholder",n.jc(9,40,"lang.id")),n.oc("ngModel",e.notification.notification_id)("disabled",!e.creationMode),n.Db(6),n.pc("title",n.jc(14,42,"lang.description")),n.pc("placeholder",n.jc(15,44,"lang.description")),n.oc("ngModel",e.notification.description),n.Db(6),n.pc("title",n.jc(20,46,"lang.NotificationEvent")),n.pc("placeholder",n.jc(21,48,"lang.NotificationEvent")),n.oc("ngModel",e.notification.event_id),n.Db(3),n.qc("label","",n.jc(23,50,"lang.triggerSystem")," :"),n.Db(2),n.oc("ngForOf",e.notification.data.event),n.Db(1),n.qc("label","",n.jc(26,52,"lang.triggerAction")," :"),n.Db(2),n.oc("ngForOf",e.notification.data.event),n.Db(4),n.pc("title",n.jc(32,54,"lang.notificationModel")),n.pc("placeholder",n.jc(33,56,"lang.notificationModel")),n.oc("ngModel",e.notification.template_id),n.Db(3),n.oc("ngForOf",e.notification.data.template),n.Db(3),n.pc("title",n.jc(38,58,"lang.attachment")),n.pc("placeholder",n.jc(39,60,"lang.attachment")),n.oc("ngModel",e.notification.attachfor_type),n.Db(4),n.Sc(" ",n.jc(42,62,"lang.noAttachment")," "),n.Db(3),n.Sc(" ",n.jc(45,64,"lang.notificationJoinDocument")," "),n.Db(5),n.pc("title",n.jc(50,66,"lang.sendTo")),n.pc("placeholder",n.jc(51,68,"lang.sendTo")),n.oc("ngModel",e.notification.diffusion_type),n.Db(3),n.oc("ngIf","baskets"!=e.notification.event_id),n.Db(1),n.oc("ngIf","baskets"!=e.notification.event_id),n.Db(1),n.qc("label","",n.jc(55,70,"lang.memberAllUsers")," :"),n.Db(2),n.oc("ngForOf",e.notification.data.diffusionType),n.Db(1),n.oc("ngIf","baskets"!=e.notification.event_id),n.Db(2),n.oc("ngIf","group"==e.notification.diffusion_type),n.Db(1),n.oc("ngIf","user"==e.notification.diffusion_type),n.Db(1),n.oc("ngIf","entity"==e.notification.diffusion_type),n.Db(1),n.oc("ngIf","dest_user"==e.notification.diffusion_type||"copy_list"==e.notification.diffusion_type||"dest_entity"==e.notification.diffusion_type||"dest_user_visa"==e.notification.diffusion_type||"dest_user_sign"==e.notification.diffusion_type),n.Db(3),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(67,72,"lang.save"))}}let yq=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.route=i,this.router=n,this.notify=a,this.headerService=s,this.appService=o,this.viewContainerRef=r,this.notification={diffusionType_label:null},this.loading=!1}ngOnInit(){this.loading=!0,this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.route.params.subscribe(t=>{void 0===t.identifier?(this.headerService.setHeader(this.translate.instant("lang.notificationCreation")),this.creationMode=!0,this.http.get("../rest/administration/notifications/new").subscribe(t=>{this.notification=t.notification,this.notification.attachfor_properties=[],this.loading=!1},t=>{this.notify.error(t.error.errors)})):(this.creationMode=!1,this.http.get("../rest/notifications/"+t.identifier).subscribe(t=>{this.headerService.setHeader(this.translate.instant("lang.notificationModification"),t.notification.description),this.notification=t.notification,this.notification.attachfor_properties=[],this.loading=!1},t=>{this.notify.error(t.error.errors)}))})}createScript(){this.http.post("../rest/scriptNotification",this.notification).subscribe(t=>{this.notification.scriptcreated=t,this.notify.success(this.translate.instant("lang.scriptCreated"))},t=>{this.notify.error(t.error.errors)})}onSubmit(){this.creationMode?(this.notification.is_enabled="Y",this.http.post("../rest/notifications",this.notification).subscribe(t=>{this.router.navigate(["/administration/notifications"]),this.notify.success(this.translate.instant("lang.notificationAdded"))},t=>{this.notify.error(t.error.errors)})):this.http.put("../rest/notifications/"+this.notification.notification_sid,this.notification).subscribe(t=>{this.router.navigate(["/administration/notifications"]),this.notify.success(this.translate.instant("lang.notificationUpdated"))},t=>{this.notify.error(t.error.errors)})}toggleNotif(){this.notification.is_enabled="Y"===this.notification.is_enabled?"N":"Y",this.http.put("../rest/notifications/"+this.notification.notification_sid,this.notification).subscribe(t=>{this.notify.success(this.translate.instant("lang.notificationUpdated"))},t=>{this.notify.error(t.error.errors)})}isNumber(t){return $.isNumeric(t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(NX,!0),2&t&&n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first)},decls:15,vars:8,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["mat-subheader","",4,"ngIf"],["mat-list-item","","joyrideStep","createScriptTour",3,"click","next",4,"ngIf"],["mat-list-item","",3,"click",4,"ngIf"],["mat-subheader",""],["mat-list-item","","joyrideStep","createScriptTour",3,"click","next"],["color","primary","mat-list-icon","",1,"fa","fa-terminal"],["mat-line",""],["mat-list-item","",3,"click"],["color","accent","mat-list-icon","",1,"fa","fa-play"],["color","warn","mat-list-icon","",1,"fa","fa-pause"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],["class","text-warning","style","position: absolute;opacity: 0.1;font-size: 120px;transform: rotate(324deg);-webkit-transform: rotate(324deg);margin-left: 25%;margin-top: 90px;",4,"ngIf"],[1,"form-horizontal",3,"ngSubmit"],["notificationsFormUp","ngForm"],[1,"form-group"],[1,"col-md-12"],["matInput","","required","","name","notification_id","id","notification_id","type","text","pattern","^[\\w.-]*$","maxlength","50",3,"ngModel","title","placeholder","disabled","ngModelChange"],["matInput","","required","","name","description","id","description","type","text","maxlength","255",3,"ngModel","title","placeholder","ngModelChange"],["id","event_id","name","event_id","required","",3,"title","placeholder","ngModel","ngModelChange"],[3,"label"],[4,"ngFor","ngForOf"],[1,"col-md-8"],["id","template_id","name","template_id","required","",3,"title","placeholder","ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"col-md-4"],["id","attachfor_type","name","attachfor_type",3,"title","placeholder","ngModel","ngModelChange"],["value",""],["value","main_document"],["id","diffusion_type","name","diffusion_type","required","",3,"title","placeholder","ngModel","ngModelChange"],[3,"label",4,"ngIf"],[4,"ngIf"],[1,"col-sm-12",2,"text-align","center"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],[1,"text-warning",2,"position","absolute","opacity","0.1","font-size","120px","transform","rotate(324deg)","-webkit-transform","rotate(324deg)","margin-left","25%","margin-top","90px"],[3,"value",4,"ngIf"],[3,"value"],["color","primary",1,"fa","fa-cog",2,"height","auto"],["color","primary",1,"fa","fa-exchange-alt",2,"height","auto"],["id","diffusion_properties","name","diffusion_properties","required","","multiple","",3,"title","placeholder","ngModel","ngModelChange"],["id","diffusion_properties","name","diffusion_properties","multiple","",3,"title","placeholder","ngModel","ngModelChange"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,HX,5,4,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,GX,2,0,"div",9),n.Oc(14,_q,68,74,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,R.h,R.g,R.d,za,S.a,R.c,W.l,V.c,K.a,X.K,X.v,X.w,Y.c,J.b,X.d,X.F,X.B,X.p,X.u,X.x,ee.a,W.o,P.s,W.p,k.b],pipes:[g.d],encapsulation:2}),t})();const xq=["adminMenuTemplate"],Cq=["appHistoryList"];function Oq(t,e){if(1&t&&(n.Wb(0,"a",21),n.Rb(1,"mat-icon",22),n.Wb(2,"p",23),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Ib("active",t.current),n.oc("routerLink",t.route),n.Db(1),n.Fb(t.icon),n.Db(2),n.Sc(" ",t.label," ")}}function Dq(t,e){if(1&t&&(n.Wb(0,"mat-nav-list"),n.Oc(1,Oq,4,6,"a",20),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",t.subMenus)}}function wq(t,e){if(1&t&&n.Rb(0,"mat-datepicker-toggle",24),2&t){n.hc();const t=n.zc(20);n.oc("for",t)}}function Mq(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",25),n.dc("click",(function(e){n.Dc(t),n.hc();const i=n.zc(35);return e.stopPropagation(),i.startDateFilter="",i.filterStartDate()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",26),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.eraseValue"))}function kq(t,e){if(1&t&&n.Rb(0,"mat-datepicker-toggle",24),2&t){n.hc();const t=n.zc(30);n.oc("for",t)}}function Sq(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",25),n.dc("click",(function(e){n.Dc(t),n.hc();const i=n.zc(35);return e.stopPropagation(),i.endDateFilter="",i.filterEndDate()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",26),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.eraseValue"))}let Iq=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.appService=i,this.functions=n,this.privilegeService=a,this.headerService=s,this.viewContainerRef=o,this.startDateFilter="",this.endDateFilter="",this.subMenus=[{icon:"fa fa-history",route:"/administration/history",label:this.translate.instant("lang.history"),current:!0},{icon:"fa fa-history",route:"/administration/history-batch",label:this.translate.instant("lang.historyBatch"),current:!1}]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.history").toLowerCase(),"",""),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.subMenus=this.privilegeService.hasCurrentUserPrivilege("view_history_batch")?[{icon:"fa fa-history",route:"/administration/history",label:this.translate.instant("lang.history"),current:!0},{icon:"fa fa-history",route:"/administration/history-batch",label:this.translate.instant("lang.historyBatch"),current:!1}]:[{icon:"fa fa-history",route:"/administration/history",label:this.translate.instant("lang.history"),current:!0}]}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(w.a),n.Qb(_t.a),n.Qb(Dt.a),n.Qb(y.a),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["admin-history"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(xq,!0),n.Xc(Cq,!0)),2&t&&(n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.appHistoryList=i.first))},decls:36,vars:30,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[2,"display","grid","grid-template-columns","repeat(2, 1fr)","grid-gap","10px","width","100%"],[1,"dateFilter",2,"cursor","pointer",3,"click"],[2,"color","white"],["matInput","","readonly","",2,"cursor","pointer",3,"ngModel","matDatepicker","placeholder","max","ngModelChange","dateChange"],["matSuffix","",3,"for",4,"ngIf"],[3,"touchUi"],["startPicker",""],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click",4,"ngIf"],["matInput","","readonly","",2,"cursor","pointer",3,"ngModel","matDatepicker","placeholder","min","ngModelChange","dateChange"],["endPicker",""],[1,"container"],[1,"container-content"],["appHistoryList",""],["mat-list-item","",3,"active","routerLink",4,"ngFor","ngForOf"],["mat-list-item","",3,"routerLink"],["color","primary","mat-list-icon",""],["mat-line",""],["matSuffix","",3,"for"],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click"],["color","warn",1,"fa","fa-calendar-times"]],template:function(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-sidenav-container",0),n.Oc(1,Dq,2,1,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Wb(10,"div",6),n.Wb(11,"div",7),n.Wb(12,"mat-form-field",8),n.dc("click",(function(){return n.Dc(t),n.zc(20).open()})),n.Wb(13,"mat-label",9),n.Qc(14),n.ic(15,"translate"),n.Vb(),n.Wb(16,"input",10),n.dc("ngModelChange",(function(e){return n.Dc(t),n.zc(35).startDateFilter=e}))("dateChange",(function(){return n.Dc(t),n.zc(35).filterStartDate()})),n.ic(17,"translate"),n.Vb(),n.Oc(18,wq,1,1,"mat-datepicker-toggle",11),n.Rb(19,"mat-datepicker",12,13),n.Oc(21,Mq,3,3,"button",14),n.Vb(),n.Wb(22,"mat-form-field",8),n.dc("click",(function(){return n.Dc(t),n.zc(30).open()})),n.Wb(23,"mat-label",9),n.Qc(24),n.ic(25,"translate"),n.Vb(),n.Wb(26,"input",15),n.dc("ngModelChange",(function(e){return n.Dc(t),n.zc(35).endDateFilter=e}))("dateChange",(function(){return n.Dc(t),n.zc(35).filterEndDate()})),n.ic(27,"translate"),n.Vb(),n.Oc(28,kq,1,1,"mat-datepicker-toggle",11),n.Rb(29,"mat-datepicker",12,16),n.Oc(31,Sq,3,3,"button",14),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(32,"div",17),n.Wb(33,"div",18),n.Rb(34,"app-history-list",null,19),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(20),i=n.zc(30),a=n.zc(35);n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(4),n.Sc("",n.jc(15,22,"lang.since")," "),n.Db(2),n.oc("ngModel",a.startDateFilter)("matDatepicker",t)("placeholder",n.jc(17,24,"lang.since"))("max",a.endDateFilter),n.Db(2),n.oc("ngIf",!a.startDateFilter),n.Db(1),n.oc("touchUi",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",a.startDateFilter),n.Db(3),n.Sc("",n.jc(25,26,"lang.until")," "),n.Db(2),n.oc("ngModel",a.endDateFilter)("matDatepicker",i)("placeholder",n.jc(27,28,"lang.until"))("min",a.startDateFilter),n.Db(2),n.oc("ngIf",!a.endDateFilter),n.Db(1),n.oc("touchUi",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",a.endDateFilter),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode())}},directives:[I.e,I.f,Ot,We,Y.c,Y.g,J.b,X.d,ae.h,X.u,X.x,P.t,ae.f,iO,R.h,P.s,R.d,o.f,S.a,R.c,W.l,ae.j,Y.j,k.b],pipes:[g.d],styles:[".active[_ngcontent-%COMP%], .active[_ngcontent-%COMP%]:active, .active[_ngcontent-%COMP%]:focus, .active[_ngcontent-%COMP%]:hover{color:#135f7f;border-left:5px solid #135f7f;background:rgba(19,95,127,.14)}.paginatorResultList[_ngcontent-%COMP%] .mat-paginator-range-label{justify-content:flex-end;display:flex}.filterList[_ngcontent-%COMP%] .mat-optgroup-label{color:#135f7f;position:-webkit-sticky;position:sticky;top:0;background:#fff!important;z-index:1}.label[_ngcontent-%COMP%]{cursor:pointer;margin:5px}.bg-head-content[_ngcontent-%COMP%] .mat-focused .mat-form-field-label{color:#fff!important}.bg-head-content[_ngcontent-%COMP%] .mat-form-field-ripple, .bg-head-content[_ngcontent-%COMP%] .mat-form-field-underline{background-color:#fff!important}.bg-head-content[_ngcontent-%COMP%] .mat-datepicker-toggle[_ngcontent-%COMP%], .bg-head-content[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{color:#fff}"]}),t})();const Pq=["adminMenuTemplate"],Vq=["tableHistoryListSort"],Rq=["autoCompleteInput"];function jq(t,e){if(1&t&&(n.Wb(0,"a",56),n.Rb(1,"mat-icon",57),n.Wb(2,"p",58),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Ib("active",t.current),n.oc("routerLink",t.route),n.Db(1),n.Fb(t.icon),n.Db(2),n.Sc(" ",t.label," ")}}function Aq(t,e){if(1&t&&(n.Wb(0,"mat-nav-list"),n.Oc(1,jq,4,6,"a",55),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",t.subMenus)}}function Wq(t,e){if(1&t&&n.Rb(0,"mat-datepicker-toggle",59),2&t){n.hc();const t=n.zc(20);n.oc("for",t)}}function Tq(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",60),n.dc("click",(function(e){n.Dc(t);const i=n.hc();return e.stopPropagation(),i.startDateFilter="",i.filterStartDate()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",61),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.eraseValue"))}function Eq(t,e){if(1&t&&n.Rb(0,"mat-datepicker-toggle",59),2&t){n.hc();const t=n.zc(30);n.oc("for",t)}}function Fq(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",60),n.dc("click",(function(e){n.Dc(t);const i=n.hc();return e.stopPropagation(),i.endDateFilter="",i.filterEndDate()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",61),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.eraseValue"))}function Lq(t,e){1&t&&n.Rb(0,"mat-spinner")}function Qq(t,e){if(1&t&&(n.Wb(0,"div",62),n.Oc(1,Lq,1,0,"mat-spinner",29),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.isLoadingResults)}}function Nq(t,e){1&t&&(n.Wb(0,"mat-option",63),n.Wb(1,"div",64),n.Rb(2,"mat-spinner",65),n.Vb(),n.Vb())}function zq(t,e){if(1&t&&(n.Wb(0,"mat-option",69),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2).$implicit,a=n.hc(2);n.Lc("color",t.used?"":a.filterColor[i.key]),n.oc("id",i.key)("value",t)("disabled",t.used),n.Db(1),n.Sc(" ",t.label," ")}}function Bq(t,e){if(1&t&&(n.Wb(0,"mat-optgroup",67),n.ic(1,"translate"),n.Oc(2,zq,2,6,"mat-option",68),n.ic(3,"sortBy"),n.ic(4,"async"),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc(2);n.oc("label",n.jc(1,2,"lang."+t.key)),n.Db(2),n.oc("ngForOf",n.kc(3,4,n.jc(4,7,e.filteredList[t.key]),"label"))}}function Uq(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Bq,5,9,"mat-optgroup",66),n.ic(2,"async"),n.Tb()),2&t){const t=e.$implicit,a=n.hc(2);var i;n.Db(1),n.oc("ngIf",(null==(i=n.jc(2,1,a.filteredList[t.key]))?null:i.length)>0)}}function $q(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Uq,3,3,"ng-container",37),n.ic(2,"keyvalue"),n.Tb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",n.jc(2,1,t.filterList))}}function Hq(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",71),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=e.index,s=n.hc(2).$implicit;return n.hc().removeItemFilter(i,s.key,a)})),n.ic(1,"translate"),n.Qc(2),n.Rb(3,"i",72),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2).$implicit,a=n.hc();n.Lc("background",a.filterColor[i.key]),n.oc("title",n.jc(1,4,"lang."+i.key)),n.Db(2),n.Sc("",t.label," ")}}function Gq(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Hq,4,6,"span",70),n.Tb()),2&t){const t=n.hc().$implicit,e=n.hc();n.Db(1),n.oc("ngForOf",e.filterUsed[t.key])}}const Xq=function(){return["startDate","endDate"]};function qq(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Gq,2,1,"ng-container",29),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",-1===n.uc(1,Xq).indexOf(t.key))}}function Kq(t,e){1&t&&(n.Wb(0,"mat-header-cell",73),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.event")))}function Yq(t,e){if(1&t&&(n.Wb(0,"mat-cell",74),n.ic(1,"fullDate"),n.Qc(2),n.ic(3,"ucfirst"),n.ic(4,"timeAgo"),n.Vb()),2&t){const t=e.$implicit;n.oc("title",n.jc(1,2,t.event_date)),n.Db(2),n.Sc(" ",n.jc(3,4,n.kc(4,6,t.event_date,"full"))," ")}}function Jq(t,e){1&t&&(n.Wb(0,"mat-header-cell",73),n.Qc(1),n.ic(2,"ucfirst"),n.ic(3,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,n.jc(3,3,"lang.totalProcessed"))," "))}function Zq(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Ib("empty",0===t.total_processed),n.Db(1),n.Sc(" ",t.total_processed," ")}}function tK(t,e){1&t&&(n.Wb(0,"mat-header-cell",73),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.totalErrors")," "))}function eK(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Ib("empty",0===t.total_errors)("error",t.total_errors>0),n.Db(1),n.Sc(" ",t.total_errors," ")}}function iK(t,e){1&t&&(n.Wb(0,"mat-header-cell",75),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.information")," "))}function nK(t,e){if(1&t&&(n.Wb(0,"mat-cell",76),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.info," ")}}function aK(t,e){1&t&&(n.Wb(0,"mat-header-cell",73),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.module")," "))}function sK(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.module_name," ")}}function oK(t,e){1&t&&n.Rb(0,"mat-header-row")}function rK(t,e){1&t&&n.Rb(0,"mat-row")}let cK=(()=>{class t{constructor(t,e,i,a,s,o,r,c,l,d){this.translate=t,this.http=e,this.notify=i,this.headerService=a,this.appService=s,this.dialog=o,this.functions=r,this.latinisePipe=c,this.privilegeService=l,this.viewContainerRef=d,this.loading=!1,this.filtersChange=new n.o,this.displayedColumnsHistory=["event_date","total_processed","total_errors","info","module_name"],this.isLoadingResults=!0,this.routeUrl="../rest/batchHistory",this.resultsLength=0,this.searchHistory=new X.i,this.startDateFilter="",this.endDateFilter="",this.filterUrl="",this.filterList=null,this.filteredList={},this.filterUsed={},this.filterColor={startDate:"#b5cfd8",endDate:"#7393a7",totalErrors:"#fc6471",modules:"#009dc5"},this.loadingFilters=!0,this.destroy$=new da.a,this.subMenus=[]}ngOnInit(){this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.subMenus=this.privilegeService.hasCurrentUserPrivilege("view_history")?[{icon:"fa fa-history",route:"/administration/history",label:this.translate.instant("lang.history"),current:!1},{icon:"fa fa-history",route:"/administration/history-batch",label:this.translate.instant("lang.historyBatch"),current:!0}]:[{icon:"fa fa-history",route:"/administration/history-batch",label:this.translate.instant("lang.historyBatch"),current:!0}],this.loading=!0,this.initHistoryList()}initHistoryList(){this.resultListDatabase=new lK(this.http),this.paginator.pageIndex=0,this.sort.active="event_date",this.sort.direction="desc",this.sort.sortChange.subscribe(()=>this.paginator.pageIndex=0),Object(gy.a)(this.sort.sortChange,this.paginator.page,this.filtersChange).pipe(Object(Zo.a)(this.destroy$),Object(Qe.a)({}),Object(ft.a)(()=>{this.isLoadingResults=!0;let t="";return this.functions.empty(this.searchHistory.value)||(t="&search="+this.searchHistory.value),this.resultListDatabase.getRepoIssues(this.sort.active,this.sort.direction,this.paginator.pageIndex,this.routeUrl,this.filterUrl,t)}),Object(l.a)(t=>(this.isLoadingResults=!1,t=this.processPostData(t),this.resultsLength=t.count,this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.historyBatch").toLowerCase(),"",""),t.history)),Object(m.a)(t=>(this.notify.handleErrors(t),this.isLoadingResults=!1,Object(c.a)([])))).subscribe(t=>this.data=t)}processPostData(t){return t.history=t.history.map(t=>Object.assign(Object.assign({},t),{total_errors:null===t.total_errors?0:t.total_errors})),t}refreshDao(){this.paginator.pageIndex=0,this.filtersChange.emit()}initFilterListHistory(){null===this.filterList&&(this.filterList={},this.loadingFilters=!0,this.http.get("../rest/batchHistory/availableFilters").pipe(Object(l.a)(t=>{let e={modules:[{}],totalErrors:[{}]};return e.modules=t.modules,e.totalErrors=[{id:"errorElement",label:this.translate.instant("lang.totalErrors")}],e}),Object(mt.a)(t=>{Object.keys(t).forEach(e=>{this.functions.empty(this.filterList[e])&&(this.filterList[e]=[],this.filteredList[e]=[]),t[e].forEach(t=>{this.filterList[e].push(t)}),this.filteredList[e]=this.searchHistory.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>t?this.filter(t,e):this.filterList[e].slice()))})}),Object(Xt.a)(()=>this.loadingFilters=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe())}filterStartDate(){this.functions.empty(this.filterUsed.startDate)&&(this.filterUsed.startDate=[]),this.filterUsed.startDate[0]={id:this.functions.empty(this.startDateFilter)?"":this.functions.formatDateObjectToDateString(this.startDateFilter),label:this.functions.empty(this.startDateFilter)?"":this.functions.formatDateObjectToDateString(this.startDateFilter)},this.generateUrlFilter(),this.refreshDao()}filterEndDate(){this.functions.empty(this.filterUsed.endDate)&&(this.filterUsed.endDate=[]),this.filterUsed.endDate[0]={id:this.functions.empty(this.endDateFilter)?"":this.functions.formatDateObjectToDateString(this.endDateFilter,!0),label:this.functions.empty(this.endDateFilter)?"":this.functions.formatDateObjectToDateString(this.endDateFilter)},this.generateUrlFilter(),this.refreshDao()}addItemFilter(t){t.value.used=!0,this.functions.empty(this.filterUsed[t.id])&&(this.filterUsed[t.id]=[]),this.filterUsed[t.id].push(t.value),this.generateUrlFilter(),this.searchHistory.reset(),this.autoCompleteInput.nativeElement.blur(),this.refreshDao()}removeItemFilter(t,e,i){t.used=!1,this.filterUsed[e].splice(i,1),this.generateUrlFilter(),this.refreshDao()}generateUrlFilter(){this.filterUrl="";let t=[];Object.keys(this.filterUsed).forEach(e=>{this.filterUsed[e].forEach(i=>{this.functions.empty(i.id)||(["startDate","endDate"].indexOf(e)>-1?t.push(`${e}=${i.id}`):t.push(`${e}[]=${i.id}`))})}),t.length>0&&(this.filterUrl="&"+t.join("&"))}directSearchHistory(){this.refreshDao()}filter(t,e){if("string"==typeof t){const i=this.latinisePipe.transform(t.toLowerCase());return this.filterList[e].filter(t=>this.latinisePipe.transform(t.label.toLowerCase()).includes(i))}return this.filterList[e]}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(q.b),n.Qb(_t.a),n.Qb(Tt.c),n.Qb(Dt.a),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(Pq,!0),n.Kc(Kt.a,!0),n.Kc(Vq,!0),n.Kc(Rq,!0)),2&t&&(n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first),n.yc(i=n.ec())&&(e.autoCompleteInput=i.first))},decls:79,vars:54,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[2,"display","grid","grid-template-columns","repeat(2, 1fr)","grid-gap","10px","width","100%"],[1,"dateFilter",2,"cursor","pointer",3,"click"],[2,"color","white"],["matInput","","readonly","",2,"cursor","pointer",3,"ngModel","matDatepicker","placeholder","max","ngModelChange","dateChange"],["matSuffix","",3,"for",4,"ngIf"],[3,"touchUi"],["startPicker",""],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click",4,"ngIf"],["matInput","","readonly","",2,"cursor","pointer",3,"ngModel","matDatepicker","placeholder","min","ngModelChange","dateChange"],["endPicker",""],[1,"container"],[1,"container-content"],["class","example-loading-shade",4,"ngIf"],[1,"table-head"],[1,"table-head-result"],[3,"ngSubmit"],["floatLabel","never",2,"font-size","13px"],["type","text","matInput","","maxlength","128",3,"matAutocomplete","placeholder","formControl","click"],["autoCompleteInput",""],[3,"optionSelected","opened"],["auto","matAutocomplete"],["disabled","",4,"ngIf"],[4,"ngIf"],["mat-button","","matSuffix","","mat-icon-button","","type","submit",2,"float","right",3,"title","click"],["color","primary",1,"fa","fa-search"],[1,"table-head-tool"],[1,"paginatorResultList",3,"length","hidePageSize","pageSize"],["paginatorHistoryList",""],[2,"height","90%","overflow","auto","position","absolute","width","100%"],[1,"filterBadges"],[4,"ngFor","ngForOf"],["id","history-list","matSort","","matSortActive","event_date","matSortDirection","desc",2,"width","100%",3,"dataSource"],["tableHistoryListSort","matSort"],["matColumnDef","event_date"],["mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"title",4,"matCellDef"],["matColumnDef","total_processed"],[3,"empty",4,"matCellDef"],["matColumnDef","total_errors"],[3,"empty","error",4,"matCellDef"],["matColumnDef","info"],["mat-sort-header","","style","flex: 2;",4,"matHeaderCellDef"],["style","flex: 2;",4,"matCellDef"],["matColumnDef","module_name"],[4,"matCellDef"],[4,"matHeaderRowDef"],[4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["mat-list-item","",3,"active","routerLink",4,"ngFor","ngForOf"],["mat-list-item","",3,"routerLink"],["color","primary","mat-list-icon",""],["mat-line",""],["matSuffix","",3,"for"],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click"],["color","warn",1,"fa","fa-calendar-times"],[1,"example-loading-shade"],["disabled",""],[2,"display","flex","justify-content","center"],["diameter","35"],["class","filterList",3,"label",4,"ngIf"],[1,"filterList",3,"label"],[3,"id","color","value","disabled",4,"ngFor","ngForOf"],[3,"id","value","disabled"],["class","label",3,"background","title","click",4,"ngFor","ngForOf"],[1,"label",3,"title","click"],[1,"fa","fa-times-circle"],["mat-sort-header",""],["mat-cell","",3,"title"],["mat-sort-header","",2,"flex","2"],[2,"flex","2"]],template:function(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-sidenav-container",0),n.Oc(1,Aq,2,1,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Wb(10,"div",6),n.Wb(11,"div",7),n.Wb(12,"mat-form-field",8),n.dc("click",(function(){return n.Dc(t),n.zc(20).open()})),n.Wb(13,"mat-label",9),n.Qc(14),n.ic(15,"translate"),n.Vb(),n.Wb(16,"input",10),n.dc("ngModelChange",(function(t){return e.startDateFilter=t}))("dateChange",(function(){return e.filterStartDate()})),n.ic(17,"translate"),n.Vb(),n.Oc(18,Wq,1,1,"mat-datepicker-toggle",11),n.Rb(19,"mat-datepicker",12,13),n.Oc(21,Tq,3,3,"button",14),n.Vb(),n.Wb(22,"mat-form-field",8),n.dc("click",(function(){return n.Dc(t),n.zc(30).open()})),n.Wb(23,"mat-label",9),n.Qc(24),n.ic(25,"translate"),n.Vb(),n.Wb(26,"input",15),n.dc("ngModelChange",(function(t){return e.endDateFilter=t}))("dateChange",(function(){return e.filterEndDate()})),n.ic(27,"translate"),n.Vb(),n.Oc(28,Eq,1,1,"mat-datepicker-toggle",11),n.Rb(29,"mat-datepicker",12,16),n.Oc(31,Fq,3,3,"button",14),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(32,"div",17),n.Wb(33,"div",18),n.Oc(34,Qq,2,1,"div",19),n.Wb(35,"div",20),n.Wb(36,"div",21),n.Wb(37,"form",22),n.dc("ngSubmit",(function(){return e.directSearchHistory()})),n.Wb(38,"mat-form-field",23),n.Wb(39,"input",24,25),n.dc("click",(function(t){return t.stopPropagation()})),n.ic(41,"translate"),n.Vb(),n.Wb(42,"mat-autocomplete",26,27),n.dc("optionSelected",(function(t){return e.addItemFilter(t.option)}))("opened",(function(){return e.initFilterListHistory()})),n.Oc(44,Nq,3,0,"mat-option",28),n.Oc(45,$q,3,3,"ng-container",29),n.Vb(),n.Wb(46,"button",30),n.dc("click",(function(){return e.directSearchHistory()})),n.ic(47,"translate"),n.Rb(48,"mat-icon",31),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(49,"div",32),n.Rb(50,"mat-paginator",33,34),n.Vb(),n.Vb(),n.Wb(52,"div",35),n.Wb(53,"div",36),n.Oc(54,qq,2,2,"ng-container",37),n.ic(55,"keyvalue"),n.Vb(),n.Wb(56,"mat-table",38,39),n.Ub(58,40),n.Oc(59,Kq,3,3,"mat-header-cell",41),n.Oc(60,Yq,5,9,"mat-cell",42),n.Tb(),n.Ub(61,43),n.Oc(62,Jq,4,5,"mat-header-cell",41),n.Oc(63,Zq,2,3,"mat-cell",44),n.Tb(),n.Ub(64,45),n.Oc(65,tK,3,3,"mat-header-cell",41),n.Oc(66,eK,2,5,"mat-cell",46),n.Tb(),n.Ub(67,47),n.Oc(68,iK,3,3,"mat-header-cell",48),n.Oc(69,nK,2,1,"mat-cell",49),n.Tb(),n.Ub(70,50),n.Oc(71,aK,3,3,"mat-header-cell",41),n.Oc(72,sK,2,1,"mat-cell",51),n.Tb(),n.Oc(73,oK,1,0,"mat-header-row",52),n.Oc(74,rK,1,0,"mat-row",53),n.Vb(),n.Wb(75,"div",54),n.Qc(76),n.ic(77,"translate"),n.Vb(),n.Vb(),n.Rb(78,"div",20),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(20),i=n.zc(30),a=n.zc(43);n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(4),n.Sc("",n.jc(15,38,"lang.since")," "),n.Db(2),n.oc("ngModel",e.startDateFilter)("matDatepicker",t)("placeholder",n.jc(17,40,"lang.since"))("max",e.endDateFilter),n.Db(2),n.oc("ngIf",!e.startDateFilter),n.Db(1),n.oc("touchUi",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.startDateFilter),n.Db(3),n.Sc("",n.jc(25,42,"lang.until")," "),n.Db(2),n.oc("ngModel",e.endDateFilter)("matDatepicker",i)("placeholder",n.jc(27,44,"lang.until"))("min",e.startDateFilter),n.Db(2),n.oc("ngIf",!e.endDateFilter),n.Db(1),n.oc("touchUi",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.endDateFilter),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.isLoadingResults),n.Db(5),n.oc("matAutocomplete",a)("placeholder",n.jc(41,46,"lang.filterBy"))("formControl",e.searchHistory),n.Db(5),n.oc("ngIf",e.loadingFilters),n.Db(1),n.oc("ngIf",null!==e.filterList&&!e.loadingFilters),n.Db(1),n.oc("title",n.jc(47,48,"lang.search")),n.Db(4),n.oc("length",e.resultsLength)("hidePageSize",!0)("pageSize",10),n.Db(4),n.oc("ngForOf",n.jc(55,50,e.filterUsed)),n.Db(2),n.oc("dataSource",e.data),n.Db(17),n.oc("matHeaderRowDef",e.displayedColumnsHistory),n.Db(1),n.oc("matRowDefColumns",e.displayedColumnsHistory),n.Db(2),n.Tc(" ",e.resultsLength," ",n.jc(77,52,"lang.elements"),"")}},directives:[I.e,I.f,Ot,We,Y.c,Y.g,J.b,X.d,ae.h,X.u,X.x,P.t,ae.f,X.K,X.v,X.w,Ne.d,X.p,X.j,Ne.a,k.b,Y.j,S.a,Kt.a,P.s,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,R.h,R.d,o.f,R.c,W.l,ae.j,V.c,W.p,W.o,vt.h,Fe.b,vt.a,vt.j,vt.m],pipes:[g.d,P.l,P.b,Wt.a,uo,Tt.u,ps],styles:[".active[_ngcontent-%COMP%], .active[_ngcontent-%COMP%]:active, .active[_ngcontent-%COMP%]:focus, .active[_ngcontent-%COMP%]:hover{color:#135f7f;border-left:5px solid #135f7f;background:rgba(19,95,127,.14)}.paginatorResultList[_ngcontent-%COMP%] .mat-paginator-range-label{justify-content:flex-end;display:flex}.filterList[_ngcontent-%COMP%] .mat-optgroup-label{color:#135f7f;position:-webkit-sticky;position:sticky;top:0;background:#fff!important;z-index:1}.label[_ngcontent-%COMP%]{cursor:pointer;margin:5px}.bg-head-content[_ngcontent-%COMP%] .mat-focused .mat-form-field-label{color:#fff!important}.bg-head-content[_ngcontent-%COMP%] .mat-form-field-ripple, .bg-head-content[_ngcontent-%COMP%] .mat-form-field-underline{background-color:#fff!important}.bg-head-content[_ngcontent-%COMP%] .mat-datepicker-toggle[_ngcontent-%COMP%], .bg-head-content[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{color:#fff}.empty[_ngcontent-%COMP%]{opacity:.5}.error[_ngcontent-%COMP%]{color:#8e3e52;font-weight:700}"]}),t})();class lK{constructor(t){this.http=t}getRepoIssues(t,e,i,n,a,s){return this.http.get(`${n}?limit=10&offset=${10*i}&order=${e}&orderBy=${t}${a}${s}`)}}function dK(t,e){1&t&&(n.Wb(0,"div",10),n.Rb(1,"mat-spinner",11),n.Vb())}function hK(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",32),n.dc("removed",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).removeChrono(i)})),n.Wb(1,"span",33),n.Qc(2),n.Vb(),n.Qc(3),n.Rb(4,"mat-icon",34),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.oc("removable",!0),n.Db(2),n.Rc(i.chronoList.indexOf(t)+1),n.Db(1),n.Sc(" \xa0",t," ")}}function uK(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",32),n.dc("removed",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).removeResId(i)})),n.Wb(1,"span",33),n.Qc(2),n.Vb(),n.Qc(3),n.Rb(4,"mat-icon",34),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.oc("removable",!0),n.Db(2),n.Rc(i.resIdList.indexOf(t)+1),n.Db(1),n.Sc(" \xa0",t," ")}}function pK(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",12),n.Wb(1,"form",13,14),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Wb(3,"mat-tab-group",15),n.dc("selectedTabChange",(function(e){return n.Dc(t),n.hc().resetInput(e)})),n.Wb(4,"mat-tab",16),n.ic(5,"translate"),n.Wb(6,"div",17),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Wb(9,"mat-form-field"),n.Wb(10,"input",18),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().chrono=e})),n.ic(11,"translate"),n.ic(12,"translate"),n.Vb(),n.Vb(),n.Wb(13,"div",19),n.Wb(14,"div",20),n.Wb(15,"div",21),n.Wb(16,"button",22),n.dc("click",(function(){return n.Dc(t),n.hc().addChrono()})),n.Qc(17),n.ic(18,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(19,"mat-chip-list",23,24),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().chronoList=e})),n.Oc(21,hK,5,3,"mat-chip",25),n.Vb(),n.Vb(),n.Rb(22,"mat-divider"),n.Vb(),n.Wb(23,"mat-tab",16),n.ic(24,"translate"),n.Wb(25,"div",17),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Wb(28,"mat-form-field"),n.Wb(29,"input",26),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().resId=e})),n.ic(30,"translate"),n.ic(31,"translate"),n.Vb(),n.Vb(),n.Wb(32,"div",19),n.Wb(33,"div",20),n.Wb(34,"div",21),n.Wb(35,"button",27),n.dc("click",(function(){return n.Dc(t),n.hc().addResId()})),n.Qc(36),n.ic(37,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(38,"mat-chip-list",28,24),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().resIdList=e})),n.Oc(40,uK,5,3,"mat-chip",25),n.Vb(),n.Vb(),n.Rb(41,"mat-divider"),n.Vb(),n.Vb(),n.Wb(42,"plugin-autocomplete",29),n.dc("triggerEvent",(function(e){return n.Dc(t),n.hc().setStatus(e)})),n.ic(43,"translate"),n.ic(44,"translate"),n.Vb(),n.Wb(45,"div",20),n.Wb(46,"div",30),n.Wb(47,"button",31),n.Qc(48),n.ic(49,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(4),n.pc("label",n.jc(5,25,"lang.chronoNumber")),n.Db(3),n.Sc(" ",n.jc(8,27,"lang.updateStatusInformationsChrono")," "),n.Db(3),n.pc("title",n.jc(11,29,"lang.chronoNumber")),n.pc("placeholder",n.jc(12,31,"lang.chronoNumber")),n.oc("ngModel",t.chrono),n.Db(6),n.oc("disabled",!t.chrono),n.Db(1),n.Rc(n.jc(18,33,"lang.add")),n.Db(2),n.oc("ngModel",t.chronoList),n.Db(2),n.oc("ngForOf",t.chronoList),n.Db(2),n.pc("label",n.jc(24,35,"lang.resId")),n.Db(3),n.Sc(" ",n.jc(27,37,"lang.updateStatusInformationsGed")," "),n.Db(3),n.pc("title",n.jc(30,39,"lang.resId")),n.pc("placeholder",n.jc(31,41,"lang.resId")),n.oc("ngModel",t.resId),n.Db(6),n.oc("disabled",!t.resId),n.Db(1),n.Rc(n.jc(37,43,"lang.add")),n.Db(2),n.oc("ngModel",t.resIdList),n.Db(2),n.oc("ngForOf",t.resIdList),n.Db(2),n.oc("labelPlaceholder",n.jc(43,45,"lang.availableStatuses"))("labelList",n.jc(44,47,"lang.availableStatuses"))("datas",t.statuses)("targetSearchKey","idToDisplay")("subInfoKey","id"),n.Db(5),n.oc("disabled",0==t.resIdList.length&&0==t.chronoList.length||t.resIdList.length>0&&t.chronoList.length>0||!t.statusId),n.Db(1),n.Rc(n.jc(49,49,"lang.save"))}}let bK=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.loading=!1,this.statuses=[],this.statusId="",this.resId="",this.chrono="",this.resIdList=[],this.chronoList=[]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.updateStatus")),this.loading=!0,this.http.get("../rest/autocomplete/statuses").pipe(Object(mt.a)(t=>this.statuses=t),Object(mt.a)(()=>this.loading=!1)).subscribe()}onSubmit(){const t={status:this.statusId};this.resIdList.length>0?t.resId=this.resIdList:this.chronoList.length>0&&(t.chrono=this.chronoList),this.http.put("../rest/res/resource/status",t).subscribe(()=>{this.resId="",this.chrono="",this.statusId="",this.resIdList=[],this.chronoList=[],this.notify.success(this.translate.instant("lang.modificationSaved"))},t=>{this.notify.error(t.error.errors)})}addResId(){-1===this.resIdList.indexOf(this.resId)&&this.resIdList.push(this.resId),this.resId=""}addChrono(){-1===this.chronoList.indexOf(this.chrono)&&this.chronoList.push(this.chrono),this.chrono=""}setStatus(t){this.statusId=t.id}removeResId(t){const e=this.resIdList.indexOf(t);this.resIdList.splice(e,1)}removeChrono(t){const e=this.chronoList.indexOf(t);this.chronoList.splice(e,1)}resetInput(t){0===t.index?this.resId="":this.chrono=""}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:13,vars:8,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"form-horizontal",3,"ngSubmit"],["updateStatusForm","ngForm"],[3,"selectedTabChange"],[3,"label"],["role","alert",1,"alert","alert-info"],["matInput","","name","chrono",3,"title","placeholder","ngModel","ngModelChange"],[1,"row"],[1,"form-group"],[1,"col-md-12","text-left",2,"padding","10px"],["mat-raised-button","","type","button","color","primary",3,"disabled","click"],["name","chronoChips",3,"ngModel","ngModelChange"],["chipList",""],["color","primary",3,"removable","removed",4,"ngFor","ngForOf"],["type","number","id","","matInput","","name","resId",3,"title","placeholder","ngModel","ngModelChange"],["mat-raised-button","","color","primary","type","button",3,"disabled","click"],["name","resIdChips",3,"ngModel","ngModelChange"],["singleMode","","required","",3,"labelPlaceholder","labelList","datas","targetSearchKey","subInfoKey","triggerEvent"],[1,"col-md-12","text-center",2,"padding","10px"],["mat-raised-button","","color","primary",3,"disabled"],["color","primary",3,"removable","removed"],[1,"badge","badge-pill","badge-dark"],["matChipRemove","",1,"fa","fa-times-circle"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,dK,2,0,"div",8),n.Oc(12,pK,50,51,"mat-card",9),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,V.c,K.a,X.K,X.v,X.w,Te.c,Te.a,Y.c,J.b,X.d,X.u,X.x,k.b,ze.d,P.s,T.a,X.A,ii,ze.a,S.a,ze.e],pipes:[g.d],styles:[".mat-tab-body{overflow-y:hidden!important}.row[_ngcontent-%COMP%]{margin-left:0}"]}),t})();const fK=["snav2"],mK=["adminMenuTemplate"];function gK(t,e){if(1&t&&(n.Wb(0,"a",18),n.Rb(1,"mat-icon",19),n.Wb(2,"p",16),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Ib("active",t.current),n.oc("routerLink",t.route),n.Db(1),n.Fb(t.icon),n.Db(2),n.Sc(" ",t.label," ")}}function vK(t,e){if(1&t&&(n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",13),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",14),n.Rb(5,"mat-icon",15),n.Wb(6,"p",16),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Rb(9,"mat-divider"),n.Wb(10,"mat-nav-list"),n.Oc(11,gK,4,6,"a",17),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Rc(n.jc(3,3,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,5,"lang.add")," "),n.Db(4),n.oc("ngForOf",t.subMenus)}}function _K(t,e){1&t&&(n.Wb(0,"div",20),n.Rb(1,"mat-spinner",21),n.Vb())}function yK(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",49),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Sc("",n.jc(2,3,"lang.label")," ")}}function xK(t,e){if(1&t&&(n.Wb(0,"mat-cell",50),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Rc(t.label)}}function CK(t,e){1&t&&(n.Wb(0,"mat-header-cell",49),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.description")," "))}function OK(t,e){if(1&t&&(n.Wb(0,"mat-cell",50),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.description," ")}}function DK(t,e){1&t&&(n.Wb(0,"mat-header-cell",51),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.relatedContactNumber")," "))}function wK(t,e){if(1&t&&(n.Wb(0,"span"),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Rc(t.nbContacts)}}function MK(t,e){if(1&t&&(n.Wb(0,"span",55),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Rc(t.nbContacts)}}function kK(t,e){if(1&t&&(n.Wb(0,"mat-cell",52),n.Oc(1,wK,2,1,"span",53),n.Oc(2,MK,2,1,"span",54),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",0==t.nbContacts),n.Db(1),n.oc("ngIf",t.nbContacts>0)}}function SK(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",51),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Sc("",n.jc(2,3,"lang.public")," ")}}function IK(t,e){1&t&&(n.Wb(0,"span"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.no")," "))}function PK(t,e){1&t&&(n.Wb(0,"span"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.yes")," "))}function VK(t,e){if(1&t&&(n.Wb(0,"mat-cell",52),n.Oc(1,IK,3,3,"span",53),n.Oc(2,PK,3,3,"span",53),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.oc("ngIf",!t.public),n.Db(1),n.oc("ngIf",t.public)}}function RK(t,e){1&t&&(n.Wb(0,"mat-header-cell",51),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.createdBy")," "))}function jK(t,e){if(1&t&&(n.Wb(0,"mat-cell",52),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.labelledOwner," ")}}function AK(t,e){1&t&&n.Rb(0,"mat-header-cell")}function WK(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",56),n.Wb(1,"button",57),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.deleteContactsGroup(a.position)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",58),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.pc("matTooltip",n.jc(2,1,"lang.delete")))}function TK(t,e){1&t&&n.Rb(0,"mat-header-row")}function EK(t,e){1&t&&(n.Rb(0,"mat-row",59),n.ic(1,"translate")),2&t&&(n.qc("routerLink","/administration/contacts/contacts-groups/",e.$implicit.id,""),n.pc("matTooltip",n.jc(1,2,"lang.view")))}function FK(t,e){if(1&t&&(n.Wb(0,"mat-card",22),n.Wb(1,"div",23),n.Wb(2,"div",24),n.Wb(3,"mat-form-field"),n.Rb(4,"input",25),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Wb(6,"div",24),n.Rb(7,"mat-paginator",26,27),n.Vb(),n.Vb(),n.Wb(9,"mat-table",28,29),n.Ub(11,30),n.Oc(12,yK,3,5,"mat-header-cell",31),n.Oc(13,xK,2,3,"mat-cell",32),n.Tb(),n.Ub(14,33),n.Oc(15,CK,3,3,"mat-header-cell",34),n.Oc(16,OK,2,1,"mat-cell",35),n.Tb(),n.Ub(17,36),n.Oc(18,DK,3,3,"mat-header-cell",37),n.Oc(19,kK,3,2,"mat-cell",38),n.Tb(),n.Ub(20,39),n.Oc(21,SK,3,5,"mat-header-cell",40),n.Oc(22,VK,3,4,"mat-cell",41),n.Tb(),n.Ub(23,42),n.Oc(24,RK,3,3,"mat-header-cell",37),n.Oc(25,jK,2,1,"mat-cell",38),n.Tb(),n.Ub(26,43),n.Oc(27,AK,1,0,"mat-header-cell",44),n.Oc(28,WK,4,3,"mat-cell",45),n.Tb(),n.Oc(29,TK,1,0,"mat-header-row",46),n.Oc(30,EK,2,4,"mat-row",47),n.Vb(),n.Wb(31,"div",48),n.Qc(32),n.ic(33,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.pc("placeholder",n.jc(5,10,"lang.filterBy")),n.oc("formControl",t.adminService.getFilterField()),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.adminService.getDataSource()),n.Db(20),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns),n.Db(2),n.Tc(" ",t.contactsGroups.length," ",n.jc(33,12,"lang.contactsGroupsAlt"),"")}}let LK=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.functions=s,this.adminService=o,this.viewContainerRef=r,this.search=null,this.contactsGroups=[],this.titles=[],this.loading=!1,this.subMenus=[{icon:"fa fa-book",route:"/administration/contacts",label:this.translate.instant("lang.contactsList"),current:!1},{icon:"fa fa-code",route:"/administration/contacts/contactsCustomFields",label:this.translate.instant("lang.customFieldsAdmin"),current:!1},{icon:"fa fa-cog",route:"/administration/contacts/contacts-parameters",label:this.translate.instant("lang.contactsParameters"),current:!1},{icon:"fa fa-users",route:"/administration/contacts/contacts-groups",label:this.translate.instant("lang.contactsGroups"),current:!0},{icon:"fas fa-magic",route:"/administration/contacts/duplicates",label:this.translate.instant("lang.duplicatesContactsAdmin"),current:!1}],this.displayedColumns=["label","description","nbContacts","public","owner","actions"],this.filterColumns=["label","description"]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.contactsGroups")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,this.http.get("../rest/contactsGroups").subscribe(t=>{this.contactsGroups=t.contactsGroups,this.loading=!1,setTimeout(()=>{this.adminService.setDataSource("admin_contacts_groups",this.contactsGroups,this.sort,this.paginator,this.filterColumns)},0)},t=>{this.notify.handleErrors(t)})}deleteContactsGroup(t){const e=this.contactsGroups[t];confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.delete")+" \xab "+e.label+" \xbb")&&this.http.delete("../rest/contactsGroups/"+e.id).subscribe(()=>{const e=this.contactsGroups.length-1;this.contactsGroups[t]=this.contactsGroups[e],this.contactsGroups[t].position=t,this.contactsGroups.splice(e,1),this.adminService.setDataSource("admin_contacts_groups",this.contactsGroups,this.sort,this.paginator,this.filterColumns),this.notify.success(this.translate.instant("lang.contactsGroupDeleted"))},t=>{this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a),n.Qb(OL),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(fK,!0),n.Kc(mK,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:17,vars:10,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["position","end",3,"mode","fixedInViewport"],["snav2",""],["mat-subheader",""],["mat-list-item","","routerLink","/administration/contacts/contacts-groups/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],["mat-list-item","",3,"active","routerLink",4,"ngFor","ngForOf"],["mat-list-item","",3,"routerLink"],["color","primary","mat-list-icon",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"row"],[1,"col-md-6","col-xs-6"],["matInput","",3,"formControl","placeholder"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSortDisableClear","","matSort","",3,"dataSource"],["table",""],["matColumnDef","label"],["mat-sort-header","","style","flex:2;",3,"hide-for-mobile",4,"matHeaderCellDef"],["style","flex:2;",3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","description"],["mat-sort-header","","style","flex:2;",4,"matHeaderCellDef"],["style","flex:2;",4,"matCellDef"],["matColumnDef","nbContacts"],["mat-sort-header","","style","flex:1;",4,"matHeaderCellDef"],["style","flex:1;",4,"matCellDef"],["matColumnDef","public"],["mat-sort-header","","style","flex:1;",3,"hide-for-mobile",4,"matHeaderCellDef"],["style","flex:1;",3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","owner"],["matColumnDef","actions"],[4,"matHeaderCellDef"],["style","justify-content: flex-end;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"routerLink","matTooltip",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["mat-sort-header","",2,"flex","2"],[2,"flex","2"],["mat-sort-header","",2,"flex","1"],[2,"flex","1"],[4,"ngIf"],["color","primary","style","font-weight:bold;",4,"ngIf"],["color","primary",2,"font-weight","bold"],[2,"justify-content","flex-end"],["mat-icon-button","","color","warn",3,"matTooltip","click"],["aria-hidden","true",1,"fa","fa-trash-alt","fa-2x"],[2,"cursor","pointer",3,"routerLink","matTooltip"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,vK,12,7,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,_K,2,0,"div",9),n.Oc(14,FK,34,14,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Rb(15,"mat-sidenav",11,12),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode()))},directives:[I.e,I.f,Ot,We,P.t,I.d,R.h,R.g,R.d,o.f,S.a,R.c,W.l,T.a,P.s,V.c,K.a,Y.c,J.b,X.d,X.u,X.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,vt.h,Fe.b,vt.a,k.b,A.b,vt.j,vt.m,o.d],pipes:[g.d],styles:[".active[_ngcontent-%COMP%], .active[_ngcontent-%COMP%]:active, .active[_ngcontent-%COMP%]:focus, .active[_ngcontent-%COMP%]:hover{color:#135f7f;border-left:5px solid #135f7f;background:rgba(19,95,127,.14)}"]}),t})();const QK=["snav2"],NK=["adminMenuTemplate"],zK=["paginatorContactList"],BK=["paginatorAdded"],UK=["tableAdded"];function $K(t,e){if(1&t&&(n.Wb(0,"a",31),n.Rb(1,"mat-icon",32),n.Wb(2,"p",33),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Ib("active",t.current),n.oc("routerLink",t.route),n.Db(1),n.Fb(t.icon),n.Db(2),n.Sc(" ",t.label," ")}}function HK(t,e){if(1&t&&(n.Wb(0,"mat-nav-list"),n.Oc(1,$K,4,6,"a",30),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",t.subMenus)}}function GK(t,e){1&t&&(n.Wb(0,"div",34),n.Rb(1,"mat-spinner",35),n.Vb())}function XK(t,e){1&t&&(n.Rb(0,"div",60),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.limitDataReached_1000"),n.Ec)}function qK(t,e){1&t&&n.Rb(0,"mat-progress-bar",61)}function KK(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-header-cell",68),n.Wb(1,"mat-checkbox",69),n.dc("change",(function(e){n.Dc(t);const i=n.hc(4);return e?i.masterToggle(e):null})),n.Vb(),n.Vb()}if(2&t){const t=n.hc(4);n.Db(1),n.oc("checked",t.selection.hasValue())}}function YK(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",68),n.Wb(1,"mat-checkbox",70),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("change",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(4);return i?s.selection.toggle(a.id):null})),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(4);n.Db(1),n.qc("id","check_",t.id,""),n.oc("disabled",i.isInGrp(t))("checked",i.selection.isSelected(t.id))}}function JK(t,e){1&t&&(n.Wb(0,"mat-header-cell",71),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.contact")," "))}function ZK(t,e){if(1&t&&(n.Wb(0,"mat-cell",71),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.contact," ")}}function tY(t,e){1&t&&(n.Wb(0,"mat-header-cell",71),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.address")," "))}function eY(t,e){if(1&t&&(n.Wb(0,"mat-cell",71),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.address," ")}}function iY(t,e){1&t&&n.Rb(0,"mat-header-row")}const nY=function(t){return{opacity:t}};function aY(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-row",72),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(4).selectContact(i.id)})),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(4);n.oc("ngStyle",n.vc(1,nY,i.isInGrp(t)?"0.5":""))}}function sY(t,e){if(1&t&&(n.Wb(0,"mat-table",62,63),n.Ub(2,64),n.Oc(3,KK,2,1,"mat-header-cell",26),n.Oc(4,YK,2,3,"mat-cell",65),n.Tb(),n.Ub(5,21),n.Oc(6,JK,3,3,"mat-header-cell",66),n.Oc(7,ZK,2,1,"mat-cell",23),n.Tb(),n.Ub(8,24),n.Oc(9,tY,3,3,"mat-header-cell",66),n.Oc(10,eY,2,1,"mat-cell",23),n.Tb(),n.Oc(11,iY,1,0,"mat-header-row",28),n.Oc(12,aY,1,3,"mat-row",67),n.Vb()),2&t){const t=n.hc(3);n.oc("dataSource",t.dataSource),n.Db(11),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns)}}function oY(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab",37),n.ic(1,"translate"),n.Wb(2,"div",14),n.Wb(3,"div",49),n.Wb(4,"mat-form-field",50),n.Wb(5,"span",51),n.Rb(6,"mat-icon",52),n.Qc(7,"\xa0\xa0 "),n.Vb(),n.Wb(8,"input",53),n.dc("keyup",(function(){return n.Dc(t),n.hc(2).launchLoading()})),n.ic(9,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(10,"div",15),n.Oc(11,XK,2,3,"div",54),n.Vb(),n.Wb(12,"div",15),n.Rb(13,"mat-paginator",17,55),n.Vb(),n.Vb(),n.Oc(15,qK,1,0,"mat-progress-bar",56),n.Oc(16,sY,13,3,"mat-table",57),n.Wb(17,"div",40),n.Wb(18,"div",58),n.Wb(19,"button",59),n.dc("click",(function(e){return n.Dc(t),n.hc(2).saveContactsList(e.target)})),n.Qc(20),n.ic(21,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.pc("label",n.jc(1,11,"lang.addContacts")),n.Db(8),n.pc("placeholder",n.jc(9,13,"lang.linkContact")),n.oc("formControl",t.searchTerm),n.Db(3),n.oc("ngIf",t.dataSource&&1e3==t.dataSource.data.length),n.Db(2),n.oc("length",0)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("ngIf",!t.dataSource&&!t.initAutoCompleteContact),n.Db(1),n.oc("ngIf",t.dataSource),n.Db(3),n.oc("disabled",0==t.selection.selected.length),n.Db(1),n.Rc(n.jc(21,15,"lang.add"))}}function rY(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",36),n.Wb(1,"mat-tab-group"),n.Wb(2,"mat-tab",37),n.ic(3,"translate"),n.Wb(4,"form",38,39),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Wb(6,"div",40),n.Wb(7,"div",41),n.Wb(8,"mat-form-field"),n.Wb(9,"input",42),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().contactsGroup.label=e})),n.ic(10,"translate"),n.ic(11,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(12,"div",40),n.Wb(13,"div",41),n.Wb(14,"mat-form-field"),n.Wb(15,"input",43),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().contactsGroup.description=e})),n.ic(16,"translate"),n.ic(17,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(18,"div",40),n.Wb(19,"div",44),n.Wb(20,"mat-slide-toggle",45),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().contactsGroup.public=e})),n.ic(21,"translate"),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(24,"div",40),n.Wb(25,"div",46),n.Wb(26,"button",47),n.Qc(27),n.ic(28,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Oc(29,oY,22,17,"mat-tab",48),n.Vb(),n.Vb()}if(2&t){const t=n.zc(5),e=n.hc();n.Db(2),n.pc("label",n.jc(3,14,"lang.informations")),n.Db(7),n.pc("title",n.jc(10,16,"lang.label")),n.pc("placeholder",n.jc(11,18,"lang.label")),n.oc("ngModel",e.contactsGroup.label),n.Db(6),n.pc("title",n.jc(16,20,"lang.description")),n.pc("placeholder",n.jc(17,22,"lang.description")),n.oc("ngModel",e.contactsGroup.description),n.Db(5),n.pc("title",n.jc(21,24,"lang.contactsGroupDesc")),n.oc("ngModel",e.contactsGroup.public)("checked",e.contactsGroup.public),n.Db(2),n.Rc(n.jc(23,26,"lang.public")),n.Db(4),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(28,28,"lang.save")),n.Db(2),n.oc("ngIf",!e.creationMode)}}function cY(t,e){1&t&&(n.Wb(0,"mat-header-cell",73),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.contact")," "))}function lY(t,e){if(1&t&&(n.Wb(0,"mat-cell",71),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.contact," ")}}function dY(t,e){1&t&&(n.Wb(0,"mat-header-cell",73),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.address")," "))}function hY(t,e){if(1&t&&(n.Wb(0,"mat-cell",71),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.address," ")}}function uY(t,e){1&t&&n.Rb(0,"mat-header-cell",68)}function pY(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",74),n.Wb(1,"button",75),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc();return i.stopPropagation(),s.preDelete(a.position)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",76),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.pc("matTooltip",n.jc(2,1,"lang.delete")))}function bY(t,e){1&t&&n.Rb(0,"mat-header-row")}function fY(t,e){1&t&&n.Rb(0,"mat-row")}let mY=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.route=i,this.router=n,this.notify=a,this.headerService=s,this.appService=o,this.viewContainerRef=r,this.subMenus=[{icon:"fa fa-book",route:"/administration/contacts",label:this.translate.instant("lang.contactsList"),current:!1},{icon:"fa fa-code",route:"/administration/contacts/contactsCustomFields",label:this.translate.instant("lang.customFieldsAdmin"),current:!1},{icon:"fa fa-cog",route:"/administration/contacts/contacts-parameters",label:this.translate.instant("lang.contactsParameters"),current:!1},{icon:"fa fa-users",route:"/administration/contacts/contacts-groups",label:this.translate.instant("lang.contactsGroups"),current:!1},{icon:"fas fa-magic",route:"/administration/contacts/duplicates",label:this.translate.instant("lang.duplicatesContactsAdmin"),current:!1}],this.contactsGroup={},this.loading=!1,this.initAutoCompleteContact=!0,this.searchTerm=new X.i,this.searchResult=[],this.displayedColumns=["select","contact","address"],this.displayedColumnsAdded=["contact","address","actions"],this.selection=new O.c(!0,[]),this.searchTerm.valueChanges.pipe(Object(pt.a)(500),Object(d.a)(t=>t.length>2),Object(bt.a)(),Object(ft.a)(t=>this.http.get("../rest/autocomplete/contacts",{params:{search:t}}))).subscribe(t=>{this.searchResult=t,this.dataSource=new vt.p(this.searchResult),this.dataSource.paginator=this.paginator})}masterToggle(t){t.checked?this.dataSource.data.forEach(t=>{$("#check_"+t.id+"-input").is(":disabled")||this.selection.select(t.id)}):this.selection.clear()}applyFilter(t){t=(t=t.trim()).toLowerCase(),this.dataSourceAdded.filter=t}ngOnInit(){this.loading=!0,this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.route.params.subscribe(t=>{void 0===t.id?(this.headerService.setHeader(this.translate.instant("lang.contactGroupCreation")),this.creationMode=!0,this.contactsGroup.public=!1,this.loading=!1):(this.creationMode=!1,this.http.get("../rest/contactsGroups/"+t.id).subscribe(t=>{this.contactsGroup=t.contactsGroup,this.headerService.setHeader(this.translate.instant("lang.contactsGroupModification"),this.contactsGroup.label),this.nbContact=this.contactsGroup.nbContacts,setTimeout(()=>{this.dataSourceAdded=new vt.p(this.contactsGroup.contacts),this.dataSourceAdded.paginator=this.paginatorAdded,this.dataSourceAdded.sort=this.sortAdded},0),this.loading=!1}))})}saveContactsList(t){t.textContent=this.translate.instant("lang.loading")+"...",t.disabled=!0,this.http.post("../rest/contactsGroups/"+this.contactsGroup.id+"/contacts",{contacts:this.selection.selected}).subscribe(e=>{this.notify.success(this.translate.instant("lang.contactAdded")),this.nbContact=this.nbContact+this.selection.selected.length,this.selection.clear(),t.textContent=this.translate.instant("lang.add"),this.contactsGroup=e.contactsGroup,setTimeout(()=>{this.dataSourceAdded=new vt.p(this.contactsGroup.contacts),this.dataSourceAdded.paginator=this.paginatorAdded,this.dataSourceAdded.sort=this.sortAdded},0)},t=>{this.notify.error(t.error.errors)})}onSubmit(){this.creationMode?this.http.post("../rest/contactsGroups",this.contactsGroup).subscribe(t=>{this.router.navigate(["/administration/contacts/contacts-groups/"+t.contactsGroup]),this.notify.success(this.translate.instant("lang.contactsGroupAdded"))},t=>{this.notify.error(t.error.errors)}):this.http.put("../rest/contactsGroups/"+this.contactsGroup.id,this.contactsGroup).subscribe(()=>{this.router.navigate(["/administration/contacts-groups"]),this.notify.success(this.translate.instant("lang.contactsGroupUpdated"))},t=>{this.notify.error(t.error.errors)})}preDelete(t){confirm(this.translate.instant("lang.reallyWantToDeleteContactFromGroup"))&&this.removeContact(this.contactsGroup.contacts[t],t)}removeContact(t,e){this.http.delete("../rest/contactsGroups/"+this.contactsGroup.id+"/contacts/"+t.id).subscribe(()=>{const t=this.contactsGroup.contacts.length-1;this.contactsGroup.contacts[e]=this.contactsGroup.contacts[t],this.contactsGroup.contacts[e].position=e,this.contactsGroup.contacts.splice(t,1),this.nbContact=this.nbContact-1,this.dataSourceAdded=new vt.p(this.contactsGroup.contacts),this.dataSourceAdded.paginator=this.paginatorAdded,this.dataSourceAdded.sort=this.sortAdded,this.notify.success(this.translate.instant("lang.contactDeletedFromGroup"))},t=>{this.notify.error(t.error.errors)})}launchLoading(){this.searchTerm.value.length>2&&(this.dataSource=null,this.initAutoCompleteContact=!1)}isInGrp(t){let e=!1;return this.contactsGroup.contacts.forEach(i=>{i.id==t.id&&(e=!0)}),e}selectContact(t){$("#check_"+t+"-input").is(":disabled")||this.selection.toggle(t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(QK,!0),n.Kc(NK,!0),n.Kc(zK,!0),n.Kc(BK,!0),n.Kc(UK,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.paginatorAdded=i.first),n.yc(i=n.ec())&&(e.sortAdded=i.first))},decls:42,vars:24,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["position","end",2,"overflow-x","hidden","width","40%",3,"mode","fixedInViewport","opened"],["snav2",""],["mat-subheader",""],[1,"row",2,"margin","0px"],[1,"col-md-6","col-xs-6"],["matInput","",3,"placeholder","keyup"],[3,"length","hidePageSize","pageSize"],["paginatorAdded",""],["matSort","","matSortActive","contact","matSortDirection","asc",3,"dataSource"],["tableAdded","matSort"],["matColumnDef","contact"],["mat-sort-header","","style","flex:3;",4,"matHeaderCellDef"],["style","flex:3;",4,"matCellDef"],["matColumnDef","address"],["matColumnDef","actions"],["style","flex:1;",4,"matHeaderCellDef"],["style","justify-content: flex-end;flex:1;",4,"matCellDef"],[4,"matHeaderRowDef"],[4,"matRowDef","matRowDefColumns"],["mat-list-item","",3,"active","routerLink",4,"ngFor","ngForOf"],["mat-list-item","",3,"routerLink"],["color","primary","mat-list-icon",""],["mat-line",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[3,"label"],[1,"form-horizontal",3,"ngSubmit"],["contactsGroupFormUp","ngForm"],[1,"form-group"],[1,"col-sm-12"],["matInput","","required","","name","label","id","label","type","text","maxlength","32",3,"ngModel","title","placeholder","ngModelChange"],["matInput","","required","","name","description","id","description","type","text","maxlength","255",3,"ngModel","title","placeholder","ngModelChange"],[1,"col-sm-6",2,"text-align","center"],["name","public","id","public","color","primary",3,"title","ngModel","checked","ngModelChange"],[1,"col-sm-12",2,"text-align","center"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],[3,"label",4,"ngIf"],[1,"col-md-8",2,"padding","5px"],["hintLabel","3 caract\xe8res minium"],["matPrefix",""],["color","primary",1,"fa","fa-user-plus"],["type","text","matInput","","autocomplete","off","minlength","3",1,"autocompleteSearch",3,"placeholder","formControl","keyup"],["class","alert alert-danger",3,"innerHTML",4,"ngIf"],["paginatorContactList",""],["mode","indeterminate",4,"ngIf"],[3,"dataSource",4,"ngIf"],[1,"col-sm-12",2,"text-align","center","margin-top","30px"],["mat-raised-button","","color","primary","type","button",3,"disabled","click"],[1,"alert","alert-danger",3,"innerHTML"],["mode","indeterminate"],[3,"dataSource"],["tableContactList",""],["matColumnDef","select"],["style","flex:1;",4,"matCellDef"],["style","flex:3;",4,"matHeaderCellDef"],["style","cursor: pointer;",3,"ngStyle","click",4,"matRowDef","matRowDefColumns"],[2,"flex","1"],["color","primary",3,"checked","change"],["color","primary",3,"id","disabled","checked","click","change"],[2,"flex","3"],[2,"cursor","pointer",3,"ngStyle","click"],["mat-sort-header","",2,"flex","3"],[2,"justify-content","flex-end","flex","1"],["mat-icon-button","","color","warn",3,"matTooltip","click"],["aria-hidden","true",1,"fa","fa-trash-alt","fa-2x"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,HK,2,1,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,GK,2,0,"div",9),n.Oc(14,rY,30,30,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Wb(15,"mat-sidenav",11,12),n.Wb(17,"mat-list"),n.Wb(18,"h3",13),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Vb(),n.Wb(21,"div",14),n.Wb(22,"div",15),n.Wb(23,"mat-form-field"),n.Wb(24,"input",16),n.dc("keyup",(function(t){return e.applyFilter(t.target.value)})),n.ic(25,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(26,"div",15),n.Rb(27,"mat-paginator",17,18),n.Vb(),n.Vb(),n.Wb(29,"mat-table",19,20),n.Ub(31,21),n.Oc(32,cY,3,3,"mat-header-cell",22),n.Oc(33,lY,2,1,"mat-cell",23),n.Tb(),n.Ub(34,24),n.Oc(35,dY,3,3,"mat-header-cell",22),n.Oc(36,hY,2,1,"mat-cell",23),n.Tb(),n.Ub(37,25),n.Oc(38,uY,1,0,"mat-header-cell",26),n.Oc(39,pY,4,3,"mat-cell",27),n.Tb(),n.Oc(40,bY,1,0,"mat-header-row",28),n.Oc(41,fY,1,0,"mat-row",29),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",!e.appService.getViewMode()&&!e.creationMode),n.Db(4),n.Tc("",e.nbContact," ",n.jc(20,20,"lang.relatedContacts")," : "),n.Db(5),n.pc("placeholder",n.jc(25,22,"lang.filterBy")),n.Db(3),n.oc("length",0)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",e.dataSourceAdded),n.Db(11),n.oc("matHeaderRowDef",e.displayedColumnsAdded),n.Db(1),n.oc("matRowDefColumns",e.displayedColumnsAdded))},directives:[I.e,I.f,Ot,We,P.t,I.d,R.a,R.g,Y.c,J.b,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,R.h,P.s,R.d,o.f,S.a,R.c,W.l,V.c,K.a,Te.c,Te.a,X.K,X.v,X.w,X.d,X.F,X.p,X.u,X.x,te.a,k.b,Y.i,X.q,X.j,ni.a,vt.h,j.a,vt.a,vt.j,vt.m,P.w,Fe.b,A.b],pipes:[g.d],styles:[".active[_ngcontent-%COMP%], .active[_ngcontent-%COMP%]:active, .active[_ngcontent-%COMP%]:focus, .active[_ngcontent-%COMP%]:hover{color:#135f7f;border-left:5px solid #135f7f;background:rgba(19,95,127,.14)}"]}),t})();var gY=i("5RNC");const vY=["adminMenuTemplate"];function _Y(t,e){1&t&&(n.Wb(0,"span"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.disabledContactsFilling")))}function yY(t,e){1&t&&(n.Wb(0,"span"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.enabledContactsFilling")))}function xY(t,e){if(1&t&&(n.Wb(0,"a",18),n.Rb(1,"mat-icon",13),n.Wb(2,"p",19),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Ib("active",t.current),n.oc("routerLink",t.route),n.Db(1),n.Fb(t.icon),n.Db(2),n.Sc(" ",t.label," ")}}const CY=function(t){return{opacity:t}};function OY(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",11),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",12),n.Wb(5,"mat-icon",13),n.Wb(6,"mat-slide-toggle",14),n.dc("change",(function(){return n.Dc(t),n.hc().toggleFillingContact()})),n.Vb(),n.Vb(),n.Wb(7,"p",15),n.dc("click",(function(){return n.Dc(t),n.hc().toggleFillingContact()})),n.Oc(8,_Y,3,3,"span",16),n.Oc(9,yY,3,3,"span",16),n.Vb(),n.Vb(),n.Vb(),n.Rb(10,"mat-divider"),n.Wb(11,"mat-nav-list"),n.Oc(12,xY,4,6,"a",17),n.Vb()}if(2&t){const t=n.hc();n.Db(2),n.Rc(n.jc(3,6,"lang.actions")),n.Db(4),n.oc("checked",t.contactsFilling.enable),n.Db(1),n.oc("ngStyle",n.vc(8,CY,t.contactsFilling.enable?"":"0.5")),n.Db(1),n.oc("ngIf",t.contactsFilling.enable),n.Db(1),n.oc("ngIf",!t.contactsFilling.enable),n.Db(3),n.oc("ngForOf",t.subMenus)}}function DY(t,e){1&t&&(n.Wb(0,"div",20),n.Rb(1,"mat-spinner",21),n.Vb())}function wY(t,e){1&t&&(n.Wb(0,"mat-header-cell",42),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.label")))}function MY(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Wb(1,"div"),n.Qc(2),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.label)}}function kY(t,e){1&t&&(n.Wb(0,"mat-header-cell",42),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.mandatory")))}function SY(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell"),n.Wb(1,"mat-slide-toggle",43),n.dc("change",(function(i){n.Dc(t);const a=e.$implicit;return n.hc(2).addCriteria(i,a,"mandatory")})),n.ic(2,"translate"),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.pc("title",n.jc(2,3,"lang.mandatory")),n.oc("disabled","lastname"==t.identifier||"company"==t.identifier)("checked",t.mandatory)}}function IY(t,e){1&t&&(n.Wb(0,"mat-header-cell",42),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.contactsFillingCriteria")," "))}function PY(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell"),n.Wb(1,"mat-slide-toggle",44),n.dc("change",(function(i){n.Dc(t);const a=e.$implicit;return n.hc(2).addCriteria(i,a,"filling")})),n.ic(2,"translate"),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.pc("title",n.jc(2,2,"lang.contactsFillingCriteria")),n.oc("checked",t.filling)}}function VY(t,e){1&t&&(n.Wb(0,"mat-header-cell",42),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.autocompletionSearchable")," "))}function RY(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell"),n.Wb(1,"mat-slide-toggle",43),n.dc("change",(function(i){n.Dc(t);const a=e.$implicit;return n.hc(2).addCriteria(i,a,"searchable")})),n.ic(2,"translate"),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.pc("title",n.jc(2,3,"lang.autocompletionSearchable")),n.oc("disabled","lastname"==t.identifier||"company"==t.identifier||"civility"==t.identifier)("checked",t.searchable)}}function jY(t,e){1&t&&(n.Wb(0,"mat-header-cell",42),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.autocompletionDisplayable")," "))}function AY(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell"),n.Wb(1,"mat-slide-toggle",43),n.dc("change",(function(i){n.Dc(t);const a=e.$implicit;return n.hc(2).addCriteria(i,a,"displayable")})),n.ic(2,"translate"),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.pc("title",n.jc(2,3,"lang.autocompletionDisplayable")),n.oc("disabled","lastname"==t.identifier||"company"==t.identifier)("checked",t.displayable)}}function WY(t,e){1&t&&n.Rb(0,"mat-header-row")}function TY(t,e){1&t&&n.Rb(0,"mat-row")}const EY=function(t){return{color:t}};function FY(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",22),n.Wb(1,"div",23),n.Wb(2,"div",24),n.Wb(3,"mat-card",25),n.Wb(4,"mat-card-header"),n.Wb(5,"mat-card-title"),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Vb(),n.Wb(8,"p"),n.Qc(9),n.ic(10,"translate"),n.Wb(11,"b",26),n.Qc(12,"0%"),n.Vb(),n.Qc(13),n.ic(14,"translate"),n.Wb(15,"b",26),n.Qc(16),n.Vb(),n.Qc(17),n.ic(18,"translate"),n.Vb(),n.Wb(19,"mat-slider",27),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().contactsFilling.first_threshold=e}))("change",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Vb(),n.Rb(20,"input",28),n.Vb(),n.Vb(),n.Wb(21,"div",24),n.Wb(22,"mat-card",25),n.Wb(23,"mat-card-header"),n.Wb(24,"mat-card-title"),n.Qc(25),n.ic(26,"translate"),n.Vb(),n.Vb(),n.Wb(27,"p"),n.Qc(28),n.ic(29,"translate"),n.Wb(30,"b",26),n.Qc(31),n.Vb(),n.Qc(32),n.ic(33,"translate"),n.Wb(34,"b",26),n.Qc(35),n.Vb(),n.Qc(36),n.ic(37,"translate"),n.Vb(),n.Wb(38,"mat-slider",29),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().contactsFilling.second_threshold=e}))("change",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Vb(),n.Rb(39,"input",28),n.Vb(),n.Vb(),n.Wb(40,"div",24),n.Wb(41,"mat-card",25),n.Wb(42,"mat-card-header"),n.Wb(43,"mat-card-title"),n.Qc(44),n.ic(45,"translate"),n.Vb(),n.Vb(),n.Wb(46,"p"),n.Qc(47),n.ic(48,"translate"),n.Wb(49,"b",26),n.Qc(50),n.Vb(),n.Qc(51),n.ic(52,"translate"),n.Wb(53,"b",26),n.Qc(54,"100%"),n.Vb(),n.Qc(55),n.ic(56,"translate"),n.Vb(),n.Rb(57,"mat-slider",30),n.Rb(58,"input",28),n.Vb(),n.Vb(),n.Vb(),n.Wb(59,"mat-table",31,32),n.Ub(61,33),n.Oc(62,wY,3,3,"mat-header-cell",34),n.Oc(63,MY,3,1,"mat-cell",35),n.Tb(),n.Ub(64,36),n.Oc(65,kY,3,3,"mat-header-cell",34),n.Oc(66,SY,3,5,"mat-cell",35),n.Tb(),n.Ub(67,37),n.Oc(68,IY,3,3,"mat-header-cell",34),n.Oc(69,PY,3,4,"mat-cell",35),n.Tb(),n.Ub(70,38),n.Oc(71,VY,3,3,"mat-header-cell",34),n.Oc(72,RY,3,5,"mat-cell",35),n.Tb(),n.Ub(73,39),n.Oc(74,jY,3,3,"mat-header-cell",34),n.Oc(75,AY,3,5,"mat-cell",35),n.Tb(),n.Oc(76,WY,1,0,"mat-header-row",40),n.Oc(77,TY,1,0,"mat-row",41),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(6),n.Rc(n.jc(7,31,"lang.contactsFillingStep1")),n.Db(3),n.Sc("",n.jc(10,33,"lang.fromRange")," "),n.Db(2),n.oc("ngStyle",n.vc(55,EY,t.fillingColor.first_threshold)),n.Db(2),n.Sc(" ",n.jc(14,35,"lang.toRange")," "),n.Db(2),n.oc("ngStyle",n.vc(57,EY,t.fillingColor.first_threshold)),n.Db(1),n.Sc("",t.contactsFilling.first_threshold,"%"),n.Db(1),n.Sc(" ",n.jc(18,37,"lang.contactsFillingStr"),""),n.Db(2),n.oc("ngModel",t.contactsFilling.first_threshold),n.Db(1),n.pc("value",t.fillingColor.first_threshold),n.Db(5),n.Rc(n.jc(26,39,"lang.contactsFillingStep2")),n.Db(3),n.Sc("",n.jc(29,41,"lang.fromRange")," "),n.Db(2),n.oc("ngStyle",n.vc(59,EY,t.fillingColor.second_threshold)),n.Db(1),n.Sc("",t.contactsFilling.first_threshold+1,"%"),n.Db(1),n.Sc(" ",n.jc(33,43,"lang.toRange")," "),n.Db(2),n.oc("ngStyle",n.vc(61,EY,t.fillingColor.second_threshold)),n.Db(1),n.Sc("",t.contactsFilling.second_threshold,"%"),n.Db(1),n.Sc(" ",n.jc(37,45,"lang.contactsFillingStr"),""),n.Db(2),n.oc("ngModel",t.contactsFilling.second_threshold)("min",t.contactsFilling.first_threshold+1),n.Db(1),n.pc("value",t.fillingColor.second_threshold),n.Db(5),n.Rc(n.jc(45,47,"lang.contactsFillingStep3")),n.Db(3),n.Sc("",n.jc(48,49,"lang.fromRange")," "),n.Db(2),n.oc("ngStyle",n.vc(63,EY,t.fillingColor.third_threshold)),n.Db(1),n.Sc("",t.contactsFilling.second_threshold+1,"%"),n.Db(1),n.Sc(" ",n.jc(52,51,"lang.toRange")," "),n.Db(2),n.oc("ngStyle",n.vc(65,EY,t.fillingColor.third_threshold)),n.Db(2),n.Sc(" ",n.jc(56,53,"lang.contactsFillingStr"),""),n.Db(3),n.pc("value",t.fillingColor.third_threshold),n.Db(1),n.oc("dataSource",t.dataSource),n.Db(17),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns)}}let LY=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.functionsService=s,this.viewContainerRef=o,this.subMenus=[{icon:"fa fa-book",route:"/administration/contacts",label:this.translate.instant("lang.contactsList"),current:!1},{icon:"fa fa-code",route:"/administration/contacts/contactsCustomFields",label:this.translate.instant("lang.customFieldsAdmin"),current:!1},{icon:"fa fa-cog",route:"/administration/contacts/contacts-parameters",label:this.translate.instant("lang.contactsParameters"),current:!0},{icon:"fa fa-users",route:"/administration/contacts/contacts-groups",label:this.translate.instant("lang.contactsGroups"),current:!1},{icon:"fas fa-magic",route:"/administration/contacts/duplicates",label:this.translate.instant("lang.duplicatesContactsAdmin"),current:!1}],this.contactsFilling={enable:!1,first_threshold:"33",second_threshold:"66"},this.contactsParameters=[],this.arrRatingColumns=[],this.fillingColor={first_threshold:"#E81C2B",second_threshold:"#F4891E",third_threshold:"#0AA34F"},this.loading=!1,this.dataSource=new vt.p(this.contactsParameters),this.displayedColumns=["label","mandatory","filling","searchable","displayable"]}ngOnInit(){this.loading=!0,this.headerService.setHeader(this.translate.instant("lang.contactsParameters")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.http.get("../rest/contactsParameters").subscribe(t=>{this.contactsFilling=t.contactsFilling,this.contactsParameters=t.contactsParameters.map(t=>Object.assign(Object.assign({},t),{label:this.functionsService.empty(t.label)?this.translate.instant("lang.contactsParameters_"+t.identifier):t.label})),this.loading=!1,setTimeout(()=>{this.dataSource=new vt.p(this.contactsParameters),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort},0)})}addCriteria(t,e,i){this.contactsParameters.forEach((n,a)=>{n.id==e.id&&(this.contactsParameters[a][i]=t.checked)}),this.onSubmit()}onSubmit(){this.contactsFilling.first_threshold>=this.contactsFilling.second_threshold&&(this.contactsFilling.second_threshold=this.contactsFilling.first_threshold+1),this.http.put("../rest/contactsParameters",{contactsFilling:this.contactsFilling,contactsParameters:this.contactsParameters}).subscribe(()=>{this.notify.success(this.translate.instant("lang.parameterUpdated"))},t=>{this.notify.error(t.error.errors)})}toggleFillingContact(){this.contactsFilling.enable=!0!==this.contactsFilling.enable,this.onSubmit()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(vY,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:15,vars:8,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["mat-subheader",""],["mat-list-item","","disableRipple","true"],["color","primary","mat-list-icon",""],["color","primary",3,"checked","change"],["mat-line","",3,"ngStyle","click"],[4,"ngIf"],["mat-list-item","",3,"active","routerLink",4,"ngFor","ngForOf"],["mat-list-item","",3,"routerLink"],["mat-line",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"row"],[1,"col-md-4","col-xs-12"],[2,"margin-bottom","5px"],[3,"ngStyle"],["color","primary","max","98","min","1","step","1","thumbLabel","true",2,"width","100%",3,"ngModel","ngModelChange","change"],["disabled","","matInput","","type","color","name","color",3,"value"],["color","primary","max","99","step","1","thumbLabel","true",2,"width","100%",3,"ngModel","min","ngModelChange","change"],["color","primary","max","100","min","100","step","1","thumbLabel","true","disabled","",2,"width","100%"],["matSort","",3,"dataSource"],["table",""],["matColumnDef","label"],["mat-sort-header","",4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","mandatory"],["matColumnDef","filling"],["matColumnDef","searchable"],["matColumnDef","displayable"],[4,"matHeaderRowDef"],[4,"matRowDef","matRowDefColumns"],["mat-sort-header",""],["color","primary",2,"margin-left","11px",3,"disabled","title","checked","change"],["color","primary",2,"margin-left","11px",3,"title","checked","change"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,OY,13,10,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,DY,2,0,"div",9),n.Oc(14,FY,78,67,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,R.h,R.g,R.d,S.a,R.c,te.a,W.l,P.w,T.a,P.s,o.f,V.c,K.a,K.f,K.m,gY.a,X.u,X.x,J.b,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,vt.h,Fe.b,vt.a,vt.j,vt.m],pipes:[g.d],styles:[".active[_ngcontent-%COMP%], .active[_ngcontent-%COMP%]:active, .active[_ngcontent-%COMP%]:focus, .active[_ngcontent-%COMP%]:hover{color:#135f7f;border-left:5px solid #135f7f;background:rgba(19,95,127,.14)}"]}),t})();const QY=["snav2"];function NY(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Qc(2,"\xa0 "),n.Wb(3,"div"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb()),2&t&&(n.Db(4),n.Sc(" ",n.jc(5,1,"lang.updateInProgress")," "))}function zY(t,e){1&t&&(n.Wb(0,"div",17),n.Rb(1,"mat-spinner",18),n.Vb())}function BY(t,e){1&t&&(n.Wb(0,"div",24),n.Rb(1,"mat-icon",25),n.Wb(2,"span",26),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Rb(5,"mat-icon",27),n.Vb()),2&t&&(n.Db(3),n.Sc("",n.jc(4,1,"lang.appUpToDate")," !"))}function UY(t,e){if(1&t&&(n.Wb(0,"div",28),n.Rb(1,"mat-icon",29),n.Wb(2,"span",26),n.Qc(3),n.ic(4,"translate"),n.Wb(5,"a",30),n.Qc(6),n.Vb(),n.Vb(),n.Rb(7,"mat-icon",31),n.Vb()),2&t){const t=n.hc(2);n.Db(3),n.Sc(" ",n.jc(4,3,"lang.newVersionAvailable")," ! "),n.Db(2),n.qc("href","https://labs.maarch.org/maarch/MaarchCourrier/tags/",t.versions.lastAvailableMinorVersion,"",n.Gc),n.Db(1),n.Rc(t.versions.lastAvailableMinorVersion)}}function $Y(t,e){if(1&t&&(n.Rb(0,"div",32),n.ic(1,"translate")),2&t){const t=n.hc(2);n.oc("innerHTML",n.jc(1,1,"lang.updateWarn")+t.versions.diffOutput.join("<br/>"),n.Ec)}}function HY(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",33),n.Wb(1,"button",34),n.dc("click",(function(){return n.Dc(t),n.hc(2).updateVersionAccess()})),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.oc("disabled",!t.versions.canUpdate),n.Db(1),n.Rc(n.jc(3,2,"lang.makeUpdate"))}}function GY(t,e){if(1&t&&(n.Wb(0,"mat-card",19),n.Oc(1,BY,6,3,"div",20),n.Oc(2,UY,8,5,"div",21),n.Oc(3,$Y,2,3,"div",22),n.Oc(4,HY,4,4,"div",23),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",null==t.versions.lastAvailableMinorVersion),n.Db(1),n.oc("ngIf",null!=t.versions.lastAvailableMinorVersion),n.Db(1),n.oc("ngIf",!t.versions.canUpdate&&null!=t.versions.lastAvailableMinorVersion),n.Db(1),n.oc("ngIf",null!=t.versions.lastAvailableMinorVersion)}}function XY(t,e){if(1&t&&(n.Wb(0,"div",35),n.Qc(1," Maarch Courrier\xa0"),n.Wb(2,"a",30),n.Qc(3),n.Vb(),n.Qc(4),n.ic(5,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(2),n.qc("href","https://labs.maarch.org/maarch/MaarchCourrier/tags/",t.versions.lastAvailableMajorVersion,"",n.Gc),n.Db(1),n.Rc(t.versions.lastAvailableMajorVersion),n.Db(1),n.Sc("\xa0",n.jc(5,3,"lang.isAvailable")," ! ")}}let qY=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.headerService=i,this.notify=n,this.dialog=a,this.appService=s,this.loading=!1,this.updateInprogress=!1,this.versions={}}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.updateVersionControl")),this.loading=!0,this.http.get("../rest/versionsUpdate").pipe(Object(mt.a)(t=>{this.versions=t}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1))),Object(mt.a)(()=>{this.loading=!1})).subscribe()}updateVersionAccess(){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",data:{title:this.translate.instant("lang.confirm")+" ?",msg:this.translate.instant("lang.updateInfo")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>(this.dialogRef=null,"ok"===t?(this.updateInprogress=!0,!0):(this.updateInprogress=!1,!1))),p(()=>this.http.put("../rest/versionsUpdate",{})),Object(mt.a)(()=>{this.dialogRef=this.dialog.open(qt.a,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.updateOk"),msg:this.translate.instant("lang.saveInDocserversInfo")}})}),p(()=>this.dialogRef.afterClosed()),Object(mt.a)(()=>{this.dialogRef=null,window.location.reload(!0)}),Object(m.a)(t=>(this.dialogRef=this.dialog.open(qt.a,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.updateKO"),msg:this.translate.instant("lang.saveInDocserversInfo")}}),this.notify.handleErrors(t),Object(c.a)(!1))),Object(mt.a)(()=>{this.updateInprogress=!1})).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(y.a),n.Qb(D.a),n.Qb(q.b),n.Qb(w.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(QY,!0),2&t&&n.yc(i=n.ec())&&(e.sidenavRight=i.first)},decls:24,vars:17,consts:[["class","updateInProgress",4,"ngIf"],["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["fixedTopGap","56","position","end",2,"overflow-x","hidden",3,"mode","fixedInViewport","opened"],["snav2",""],["class","alert-message alert-message-info","style","display: flex;",4,"ngIf"],["mat-subheader",""],[1,"updateInProgress"],["diameter","30"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],["class","alert alert-info","style","display: flex;",4,"ngIf"],["class","alert alert-success","style","display: flex;",4,"ngIf"],["class","alert-message alert-message-danger",3,"innerHTML",4,"ngIf"],["class","col-sm-12","style","text-align:center;",4,"ngIf"],[1,"alert","alert-info",2,"display","flex"],[1,"fa","fa-check","fa-2x",2,"flex","1","text-align","left"],[2,"flex","1","text-align","center"],[1,"fa","fa-check","fa-2x",2,"flex","1","text-align","right"],[1,"alert","alert-success",2,"display","flex"],[1,"fa","fa-info-circle","fa-2x",2,"flex","1","text-align","left"],["target","_blank",2,"font-weight","bold",3,"href"],[1,"fa","fa-info-circle","fa-2x",2,"flex","1","text-align","right"],[1,"alert-message","alert-message-danger",3,"innerHTML"],[1,"col-sm-12",2,"text-align","center"],["mat-raised-button","","color","primary",3,"disabled","click"],[1,"alert-message","alert-message-info",2,"display","flex"]],template:function(t,e){1&t&&(n.Oc(0,NY,6,3,"div",0),n.Wb(1,"mat-sidenav-container",1),n.Wb(2,"mat-sidenav-content"),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Wb(5,"div",4),n.Rb(6,"header-left"),n.Vb(),n.Wb(7,"div",5),n.Rb(8,"header-right"),n.Vb(),n.Vb(),n.Rb(9,"div",6),n.Vb(),n.Wb(10,"div",7),n.Wb(11,"div",8),n.Oc(12,zY,2,0,"div",9),n.Oc(13,GY,5,4,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Wb(14,"mat-sidenav",11,12),n.Oc(16,XY,6,5,"div",13),n.Wb(17,"mat-list"),n.Wb(18,"h3",14),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"mat-list-item"),n.Wb(22,"b"),n.Qc(23),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.oc("ngIf",e.updateInprogress),n.Db(4),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",!e.appService.getViewMode()),n.Db(2),n.oc("ngIf",null!=e.versions.lastAvailableMajorVersion),n.Db(3),n.Rc(n.jc(20,15,"lang.currentVersion")),n.Db(4),n.Rc(e.versions.currentVersion))},directives:[P.t,I.e,I.f,Ot,We,I.d,R.a,R.g,R.d,V.c,K.a,S.a,k.b],pipes:[g.d],styles:[".updateInProgress[_ngcontent-%COMP%]{z-index:2;display:flex;position:fixed;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.9294117647058824);justify-content:center;align-items:center}.alert-message-danger[_ngcontent-%COMP%]{width:100%;max-width:100%}"]}),t})();const KY=["adminMenuTemplate"];function YY(t,e){1&t&&(n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",11),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",12),n.Rb(5,"mat-icon",13),n.Wb(6,"p",14),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,2,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,4,"lang.add")," "))}function JY(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Vb())}function ZY(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",42),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(3).toggleDocserver(e)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",43),n.Vb()}2&t&&n.pc("matTooltip",n.jc(1,1,"lang.lockDocserver"))}function tJ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",44),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(3).toggleDocserver(e)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",45),n.Vb()}2&t&&n.pc("matTooltip",n.jc(1,1,"lang.unlockDocserver"))}function eJ(t,e){if(1&t&&n.Rb(0,"mat-progress-spinner",46),2&t){const t=n.hc().$implicit;n.oc("value",t.percentage)}}function iJ(t,e){if(1&t&&n.Rb(0,"mat-progress-spinner",47),2&t){const t=n.hc().$implicit;n.oc("value",t.percentage)}}function nJ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",21),n.Wb(1,"mat-card"),n.Wb(2,"form",22,23),n.dc("ngSubmit",(function(){n.Dc(t);const i=e.$implicit,a=e.index;return n.hc(3).onSubmit(i,a)})),n.Oc(4,ZY,3,3,"button",24),n.Oc(5,tJ,3,3,"button",25),n.Wb(6,"div",26),n.Wb(7,"div",27),n.Wb(8,"mat-form-field"),n.Wb(9,"input",28),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.device_label=i})),n.ic(10,"translate"),n.ic(11,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(12,"div",21),n.Oc(13,eJ,1,1,"mat-progress-spinner",29),n.Oc(14,iJ,1,1,"mat-progress-spinner",30),n.Wb(15,"span",31),n.Qc(16),n.Vb(),n.Vb(),n.Wb(17,"div",32),n.Wb(18,"mat-form-field"),n.Wb(19,"input",33),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.coll_id=i})),n.ic(20,"translate"),n.ic(21,"translate"),n.Vb(),n.Vb(),n.Wb(22,"mat-form-field"),n.Wb(23,"input",34),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.docserver_id=i})),n.ic(24,"translate"),n.ic(25,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(26,"div",21),n.Wb(27,"mat-form-field"),n.Wb(28,"input",35),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.limitSizeFormatted=i})),n.ic(29,"translate"),n.ic(30,"translate"),n.Vb(),n.Wb(31,"span",36),n.Qc(32," Go"),n.Vb(),n.Vb(),n.Vb(),n.Rb(33,"div",32),n.Wb(34,"div",27),n.Wb(35,"mat-form-field"),n.Wb(36,"input",37),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.path_template=i})),n.ic(37,"translate"),n.ic(38,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(39,"div",38),n.Wb(40,"button",39),n.Qc(41),n.ic(42,"translate"),n.Vb(),n.Wb(43,"button",40),n.dc("click",(function(){n.Dc(t);const i=e.index,a=n.hc().$implicit;return n.hc(2).cancelModification(a.docserver_type_id,i)})),n.Qc(44),n.ic(45,"translate"),n.Vb(),n.Wb(46,"button",41),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=e.index;return n.hc(3).delete(i,a)})),n.Qc(47),n.ic(48,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=e.index,a=n.hc().$implicit,s=n.hc(2);n.Db(4),n.oc("ngIf",!t.is_readonly),n.Db(1),n.oc("ngIf",t.is_readonly),n.Db(4),n.pc("title",n.jc(10,29,"lang.label")),n.pc("placeholder",n.jc(11,31,"lang.label")),n.oc("ngModel",t.device_label)("disabled",t.is_readonly),n.Db(4),n.oc("ngIf",t.percentage<60),n.Db(1),n.oc("ngIf",t.percentage>=60),n.Db(1),n.pc("title",t.actualSizeFormatted),n.Db(1),n.Sc("",t.percentage,"%"),n.Db(3),n.pc("title",n.jc(20,33,"lang.collection")),n.pc("placeholder",n.jc(21,35,"lang.collection")),n.oc("ngModel",t.coll_id),n.Db(4),n.pc("title",n.jc(24,37,"lang.id")),n.pc("placeholder",n.jc(25,39,"lang.id")),n.oc("ngModel",t.docserver_id),n.Db(5),n.pc("title",n.jc(29,41,"lang.maxSize")),n.pc("placeholder",n.jc(30,43,"lang.maxSize")),n.oc("ngModel",t.limitSizeFormatted)("disabled",t.is_readonly),n.Db(8),n.pc("title",n.jc(37,45,"lang.path")),n.pc("placeholder",n.jc(38,47,"lang.path")),n.oc("ngModel",t.path_template)("disabled",t.is_readonly),n.Db(4),n.oc("disabled",s.checkModif(t,s.docserversClone[a.docserver_type_id][i])),n.Db(1),n.Rc(n.jc(42,49,"lang.update")),n.Db(2),n.oc("disabled",s.checkModif(t,s.docserversClone[a.docserver_type_id][i])),n.Db(1),n.Rc(n.jc(45,51,"lang.cancel")),n.Db(3),n.Rc(n.jc(48,53,"lang.delete"))}}function aJ(t,e){if(1&t&&(n.Wb(0,"mat-expansion-panel"),n.Wb(1,"mat-expansion-panel-header"),n.Wb(2,"mat-panel-title"),n.Qc(3),n.Vb(),n.Wb(4,"mat-panel-description"),n.Qc(5),n.Vb(),n.Vb(),n.Wb(6,"div",19),n.Oc(7,nJ,49,55,"div",20),n.Vb(),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Db(3),n.Sc(" ",t.docserver_type_label," "),n.Db(2),n.Sc(" ",t.docserver_type_id," "),n.Db(2),n.oc("ngForOf",i.docservers[t.docserver_type_id])}}function sJ(t,e){if(1&t&&(n.Wb(0,"mat-card",17),n.Wb(1,"mat-accordion"),n.Oc(2,aJ,8,3,"mat-expansion-panel",18),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.oc("ngForOf",t.docserversTypes)}}let oJ=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.viewContainerRef=s,this.loading=!1,this.docservers=[],this.docserversClone=[],this.docserversTypes={}}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.docservers")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,this.http.get("../rest/docservers").subscribe(t=>{this.docservers=t.docservers,this.docserversClone=JSON.parse(JSON.stringify(this.docservers)),this.docserversTypes=t.types,this.loading=!1})}toggleDocserver(t){t.is_readonly=!t.is_readonly}cancelModification(t,e){this.docservers[t][e]=JSON.parse(JSON.stringify(this.docserversClone[t][e]))}checkModif(t,e){return t.size_limit_number=1e9*t.limitSizeFormatted,JSON.stringify(t)===JSON.stringify(e)||!(t.size_limit_number>=t.actual_size_number&&t.limitSizeFormatted>0&&/^[\d]*$/.test(t.limitSizeFormatted))}onSubmit(t,e){t.size_limit_number=1e9*t.limitSizeFormatted,this.http.put("../rest/docservers/"+t.id,t).subscribe(i=>{this.docservers[t.docserver_type_id][e]=i.docserver,this.docserversClone[t.docserver_type_id][e]=JSON.parse(JSON.stringify(this.docservers[t.docserver_type_id][e])),this.notify.success(this.translate.instant("lang.docserverUpdated"))},t=>{this.notify.error(t.error.errors)})}delete(t,e){let i=null;i=0===t.actual_size_number?confirm(this.translate.instant("lang.delete")+" ?"):confirm(this.translate.instant("lang.docserverdeleteWarning")),i&&this.http.delete("../rest/docservers/"+t.id).subscribe(()=>{this.docservers[t.docserver_type_id].splice(e,1),this.notify.success(this.translate.instant("lang.docserverDeleted"))},t=>{this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(KY,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:15,vars:8,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["mat-subheader",""],["mat-list-item","","routerLink","/administration/docservers/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[4,"ngFor","ngForOf"],[1,"row"],["class","col-md-4",4,"ngFor","ngForOf"],[1,"col-md-4"],[1,"form-horizontal",3,"ngSubmit"],["docserverFormUp","ngForm"],["mat-icon-button","","color","accent","style","position: absolute;top: 5px;right:10px;",3,"matTooltip","click",4,"ngIf"],["mat-icon-button","","color","warn","style","position: absolute;top: 5px;right:10px;",3,"matTooltip","click",4,"ngIf"],[1,"row",2,"margin-top","10px"],[1,"col-md-12"],["matInput","","required","","name","label","id","label","type","text","maxlength","255",3,"title","placeholder","ngModel","disabled","ngModelChange"],["name","percent_val","id","percent_val","color","primary","mode","determinate","style","margin:auto;",3,"value",4,"ngIf"],["name","percent_val","id","percent_val","color","warn","mode","determinate","style","margin:auto;",3,"value",4,"ngIf"],[2,"position","absolute","font-weight","bold","left","50%","transform","translateX(-50%)","top","40%","font-weight","bold",3,"title"],[1,"col-md-8"],["matInput","","required","","name","collection","id","collection","type","text","disabled","",3,"title","placeholder","ngModel","ngModelChange"],["matInput","","required","","name","identifier","id","identifier","type","text","disabled","",3,"title","placeholder","ngModel","ngModelChange"],["matInput","","required","","name","max_size","id","max_size","type","number",3,"title","placeholder","ngModel","disabled","ngModelChange"],["matSuffix",""],["matInput","","required","","name","path","id","path","type","text",3,"title","placeholder","ngModel","disabled","ngModelChange"],[1,"col-md-12","text-center",2,"padding","10px"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],["mat-raised-button","","color","default",3,"disabled","click"],["mat-raised-button","","type","button","color","warn",3,"click"],["mat-icon-button","","color","accent",2,"position","absolute","top","5px","right","10px",3,"matTooltip","click"],[1,"fa","fa-lock-open"],["mat-icon-button","","color","warn",2,"position","absolute","top","5px","right","10px",3,"matTooltip","click"],[1,"fa","fa-lock"],["name","percent_val","id","percent_val","color","primary","mode","determinate",2,"margin","auto",3,"value"],["name","percent_val","id","percent_val","color","warn","mode","determinate",2,"margin","auto",3,"value"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,YY,9,6,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,JY,2,0,"div",9),n.Oc(14,sJ,3,1,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,R.h,R.g,R.d,o.f,S.a,R.c,W.l,V.c,K.a,gt.a,P.s,gt.c,gt.g,gt.h,gt.f,X.K,X.v,X.w,Y.c,J.b,X.d,X.F,X.p,X.u,X.x,X.A,Y.j,k.b,A.b,V.a],pipes:[g.d],encapsulation:2}),t})();function rJ(t,e){1&t&&(n.Wb(0,"div",10),n.Rb(1,"mat-spinner",11),n.Vb())}function cJ(t,e){if(1&t&&(n.Wb(0,"mat-option",30),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.docserver_type_id),n.Db(1),n.Sc(" ",t.docserver_type_label," ")}}function lJ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",12),n.Wb(1,"form",13,14),n.dc("ngSubmit",(function(){n.Dc(t);const e=n.hc();return e.onSubmit(e.docserver)})),n.Wb(3,"div",15),n.Wb(4,"div",16),n.Wb(5,"mat-form-field"),n.Wb(6,"mat-select",17),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().docserver.docserver_type_id=e})),n.ic(7,"translate"),n.ic(8,"translate"),n.Oc(9,cJ,2,2,"mat-option",18),n.Vb(),n.Vb(),n.Wb(10,"mat-form-field"),n.Wb(11,"input",19),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().docserver.docserver_id=e})),n.ic(12,"translate"),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Wb(14,"mat-form-field"),n.Wb(15,"input",20),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().docserver.device_label=e})),n.ic(16,"translate"),n.ic(17,"translate"),n.Vb(),n.Vb(),n.Wb(18,"mat-form-field"),n.Wb(19,"mat-select",21),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().docserver.coll_id=e})),n.ic(20,"translate"),n.ic(21,"translate"),n.Wb(22,"mat-option",22),n.Qc(23," letterbox_coll "),n.Vb(),n.Wb(24,"mat-option",23),n.Qc(25," attachments_coll "),n.Vb(),n.Wb(26,"mat-option",24),n.Qc(27," archive_transfer_coll "),n.Vb(),n.Vb(),n.Vb(),n.Wb(28,"mat-form-field"),n.Wb(29,"input",25),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().docserver.limitSizeFormatted=e})),n.ic(30,"translate"),n.ic(31,"translate"),n.Vb(),n.Wb(32,"span",26),n.Qc(33," Go"),n.Vb(),n.Vb(),n.Wb(34,"mat-form-field"),n.Wb(35,"input",27),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().docserver.path_template=e})),n.ic(36,"translate"),n.ic(37,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(38,"div",28),n.Wb(39,"button",29),n.Qc(40),n.ic(41,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(2),e=n.hc();n.Db(6),n.pc("title",n.jc(7,23,"lang.docserverType")),n.pc("placeholder",n.jc(8,25,"lang.docserverType")),n.oc("ngModel",e.docserver.docserver_type_id),n.Db(3),n.oc("ngForOf",e.docserversTypes),n.Db(2),n.pc("title",n.jc(12,27,"lang.id")),n.pc("placeholder",n.jc(13,29,"lang.id")),n.oc("ngModel",e.docserver.docserver_id),n.Db(4),n.pc("title",n.jc(16,31,"lang.label")),n.pc("placeholder",n.jc(17,33,"lang.label")),n.oc("ngModel",e.docserver.device_label),n.Db(4),n.pc("title",n.jc(20,35,"lang.collection")),n.pc("placeholder",n.jc(21,37,"lang.collection")),n.oc("ngModel",e.docserver.coll_id),n.Db(10),n.pc("title",n.jc(30,39,"lang.maxSize")),n.pc("placeholder",n.jc(31,41,"lang.maxSize")),n.oc("ngModel",e.docserver.limitSizeFormatted)("disabled",e.docserver.is_readonly),n.Db(6),n.pc("title",n.jc(36,43,"lang.path")),n.pc("placeholder",n.jc(37,45,"lang.path")),n.oc("ngModel",e.docserver.path_template)("disabled",e.docserver.is_readonly),n.Db(4),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(41,47,"lang.add"))}}let dJ=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.router=i,this.notify=n,this.headerService=a,this.appService=s,this.loading=!1,this.docserver={coll_id:"letterbox_coll",docserver_type_id:"DOC",limitSizeFormatted:"50"},this.docserversTypes=[]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.docserverCreation")),this.loading=!0,this.http.get("../rest/docserverTypes").subscribe(t=>{this.docserversTypes=t.docserverTypes,this.loading=!1})}onSubmit(t){t.size_limit_number=1e9*t.limitSizeFormatted,this.http.post("../rest/docservers",t).subscribe(t=>{this.notify.success(this.translate.instant("lang.docserverAdded")),this.router.navigate(["/administration/docservers/"])},t=>{this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:13,vars:8,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"form-horizontal",3,"ngSubmit"],["docserverForm","ngForm"],[1,"row",2,"margin-top","10px"],[1,"col-md-12"],["required","","name","docserver_type","id","docserver_type",3,"title","placeholder","ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["matInput","","required","","name","identifier","id","identifier","type","text","maxlength","32","pattern","^[\\w.-]*$",3,"title","placeholder","ngModel","ngModelChange"],["matInput","","required","","name","label","id","label","type","text","maxlength","255",3,"title","placeholder","ngModel","ngModelChange"],["required","","name","collection","id","collection",3,"title","placeholder","ngModel","ngModelChange"],["value","letterbox_coll","selected",""],["value","attachments_coll"],["value","archive_transfer_coll"],["matInput","","required","","name","max_size","id","max_size","type","number","pattern","^\\d+$",3,"title","placeholder","ngModel","disabled","ngModelChange"],["matSuffix",""],["matInput","","required","","name","path","id","path","type","text",3,"title","placeholder","ngModel","disabled","ngModelChange"],[1,"col-md-12","text-center",2,"padding","10px"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],[3,"value"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,rJ,2,0,"div",8),n.Oc(12,lJ,42,49,"mat-card",9),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,V.c,K.a,X.K,X.v,X.w,Y.c,ee.a,X.F,X.u,X.x,P.s,J.b,X.d,X.p,X.B,W.p,X.A,Y.j,k.b],pipes:[g.d],encapsulation:2}),t})();const hJ=["adminMenuTemplate"];function uJ(t,e){1&t&&(n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",11),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",12),n.Rb(5,"mat-icon",13),n.Wb(6,"p",14),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,2,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,4,"lang.add")," "))}function pJ(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Vb())}function bJ(t,e){1&t&&(n.Wb(0,"mat-header-cell",44),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.technicalId")," "))}function fJ(t,e){if(1&t&&(n.Wb(0,"mat-cell",45),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.template_id," ")}}function mJ(t,e){1&t&&(n.Wb(0,"mat-header-cell",46),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.templateName")," "))}function gJ(t,e){if(1&t&&(n.Wb(0,"mat-cell",47),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.template_label," ")}}function vJ(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",46),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Sc("",n.jc(2,3,"lang.description")," ")}}function _J(t,e){if(1&t&&(n.Wb(0,"mat-cell",47),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",t.template_comment," ")}}function yJ(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",44),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Sc(" ",n.jc(2,3,"lang.templateTarget"),"")}}function xJ(t,e){if(1&t&&(n.Wb(0,"mat-cell",45),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",n.jc(2,3,"lang."+t.template_target)," ")}}function CJ(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",44),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Sc("",n.jc(2,3,"lang.templateType")," ")}}function OJ(t,e){if(1&t&&(n.Wb(0,"mat-cell",45),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",t.template_type," ")}}function DJ(t,e){1&t&&n.Rb(0,"mat-header-cell")}function wJ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",48),n.Wb(1,"button",49),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.deleteTemplate(a)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",50),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.pc("matTooltip",n.jc(2,2,"lang.delete")),n.oc("disabled","Y"==t.is_system)}}function MJ(t,e){1&t&&n.Rb(0,"mat-header-row")}function kJ(t,e){1&t&&(n.Rb(0,"mat-row",51),n.ic(1,"translate")),2&t&&(n.qc("routerLink","/administration/templates/",e.$implicit.template_id,""),n.pc("matTooltip",n.jc(1,2,"lang.view")))}function SJ(t,e){if(1&t&&(n.Wb(0,"mat-card",17),n.Wb(1,"div",18),n.Wb(2,"div",19),n.Wb(3,"mat-form-field"),n.Rb(4,"input",20),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Wb(6,"div",19),n.Rb(7,"mat-paginator",21,22),n.Vb(),n.Vb(),n.Wb(9,"mat-table",23,24),n.Ub(11,25),n.Oc(12,bJ,3,3,"mat-header-cell",26),n.Oc(13,fJ,2,1,"mat-cell",27),n.Tb(),n.Ub(14,28),n.Oc(15,mJ,3,3,"mat-header-cell",29),n.Oc(16,gJ,2,1,"mat-cell",30),n.Tb(),n.Ub(17,31),n.Oc(18,vJ,3,5,"mat-header-cell",32),n.Oc(19,_J,2,3,"mat-cell",33),n.Tb(),n.Ub(20,34),n.Oc(21,yJ,3,5,"mat-header-cell",35),n.Oc(22,xJ,3,5,"mat-cell",36),n.Tb(),n.Ub(23,37),n.Oc(24,CJ,3,5,"mat-header-cell",35),n.Oc(25,OJ,2,3,"mat-cell",36),n.Tb(),n.Ub(26,38),n.Oc(27,DJ,1,0,"mat-header-cell",39),n.Oc(28,wJ,4,4,"mat-cell",40),n.Tb(),n.Oc(29,MJ,1,0,"mat-header-row",41),n.Oc(30,kJ,2,4,"mat-row",42),n.Vb(),n.Wb(31,"div",43),n.Qc(32),n.ic(33,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.pc("placeholder",n.jc(5,10,"lang.filterBy")),n.oc("formControl",t.adminService.getFilterField()),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.adminService.getDataSource()),n.Db(20),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns),n.Db(2),n.Tc(" ",t.templates.length," ",n.jc(33,12,"lang.templates"),"")}}let IJ=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.functions=s,this.adminService=o,this.viewContainerRef=r,this.search=null,this.templates=[],this.titles=[],this.loading=!1,this.displayedColumns=["template_id","template_label","template_comment","template_type","template_target","actions"],this.filterColumns=["template_label","template_comment","template_type","template_target"]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.templates")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,this.http.get("../rest/templates").subscribe(t=>{this.templates=t.templates,this.loading=!1,setTimeout(()=>{this.adminService.setDataSource("admin_templates",this.templates,this.sort,this.paginator,this.filterColumns)},0)},t=>{this.notify.handleErrors(t)})}deleteTemplate(t){confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.delete")+" \xab "+t.template_label+" \xbb")&&this.http.delete("../rest/templates/"+t.template_id).subscribe(()=>{for(const e in this.templates)this.templates[e].template_id===t.template_id&&this.templates.splice(Number(e),1);this.adminService.setDataSource("admin_templates",this.templates,this.sort,this.paginator,this.filterColumns),this.notify.success(this.translate.instant("lang.templateDeleted"))},t=>{this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a),n.Qb(OL),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(hJ,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:15,vars:8,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["mat-subheader",""],["mat-list-item","","routerLink","/administration/templates/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"row"],[1,"col-md-6","col-xs-6"],["matInput","",3,"formControl","placeholder"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSort","","matSortDisableClear","",3,"dataSource"],["table",""],["matColumnDef","template_id"],["mat-sort-header","","style","flex:1;",4,"matHeaderCellDef"],["style","flex:1;",4,"matCellDef"],["matColumnDef","template_label"],["mat-sort-header","","style","flex:2;",4,"matHeaderCellDef"],["style","flex:2;",4,"matCellDef"],["matColumnDef","template_comment"],["mat-sort-header","","style","flex:2;",3,"hide-for-mobile",4,"matHeaderCellDef"],["style","flex:2;",3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","template_target"],["mat-sort-header","","style","flex:1;",3,"hide-for-mobile",4,"matHeaderCellDef"],["style","flex:1;",3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","template_type"],["matColumnDef","actions"],[4,"matHeaderCellDef"],["style","justify-content: flex-end;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"routerLink","matTooltip",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["mat-sort-header","",2,"flex","1"],[2,"flex","1"],["mat-sort-header","",2,"flex","2"],[2,"flex","2"],[2,"justify-content","flex-end"],["mat-icon-button","","color","warn",3,"disabled","matTooltip","click"],["aria-hidden","true",1,"fa","fa-trash-alt","fa-2x"],[2,"cursor","pointer",3,"routerLink","matTooltip"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,uJ,9,6,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,pJ,2,0,"div",9),n.Oc(14,SJ,34,14,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,R.h,R.g,R.d,o.f,S.a,R.c,W.l,V.c,K.a,Y.c,J.b,X.d,X.u,X.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,vt.h,Fe.b,vt.a,k.b,A.b,vt.j,vt.m,o.d],pipes:[g.d],encapsulation:2}),t})();const PJ=["onlyofficeViewer"],VJ=["collaboraOnlineViewer"];function RJ(t,e){1&t&&(n.Wb(0,"div",9),n.Rb(1,"mat-spinner"),n.Vb())}function jJ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"onlyoffice-viewer",10,11),n.dc("triggerAfterUpdatedDoc",(function(){return n.Dc(t),n.hc().close()}))("triggerCloseEditor",(function(){return n.Dc(t),n.hc().dialogRef.close("")}))("triggerModifiedDocument",(function(){return n.Dc(t),n.hc().documentIsModified=!0})),n.Vb()}if(2&t){const t=n.hc();n.oc("hideCloseEditor",!0)("params",t.editorOptions)("file",t.file)("editMode",!0)}}function AJ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-collabora-online-viewer",12,13),n.dc("triggerAfterUpdatedDoc",(function(){return n.Dc(t),n.hc().close()}))("triggerCloseEditor",(function(){return n.Dc(t),n.hc().dialogRef.close("")}))("triggerModifiedDocument",(function(){return n.Dc(t),n.hc().documentIsModified=!0})),n.Vb()}if(2&t){const t=n.hc();n.oc("params",t.editorOptions)("file",t.file)("editMode",!0)}}let WJ=(()=>{class t{constructor(t,e,i){this.translate=t,this.dialogRef=e,this.data=i,this.loading=!1,this.editorOptions=null,this.file=null,this.editorType=null,this.documentIsModified=!1}ngOnInit(){this.editorOptions=this.data.editorOptions,this.file=this.data.file,this.editorType=this.data.editorType}close(){this.loading=!0,"onlyoffice"===this.editorType?this.onlyofficeViewer.getFile().pipe(Object(ro.a)(1),Object(mt.a)(t=>{this.loading=!1,this.dialogRef.close(t)})).subscribe():"collaboraonline"===this.editorType?this.collaboraOnlineViewer.getFile().pipe(Object(ro.a)(1),Object(mt.a)(t=>{this.loading=!1,this.dialogRef.close(t)})).subscribe():(this.loading=!1,this.dialogRef.close())}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(q.h),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Xc(PJ,!0),n.Xc(VJ,!0)),2&t&&(n.yc(i=n.ec())&&(e.onlyofficeViewer=i.first),n.yc(i=n.ec())&&(e.collaboraOnlineViewer=i.first))},decls:13,vars:11,consts:[[1,"mat-dialog-content-container"],[2,"padding","0px"],["class","example-loading-shade",4,"ngIf"],["style","height:100%;width:100%;",3,"hideCloseEditor","params","file","editMode","triggerAfterUpdatedDoc","triggerCloseEditor","triggerModifiedDocument",4,"ngIf"],["style","height:100%;width:100%;",3,"params","file","editMode","triggerAfterUpdatedDoc","triggerCloseEditor","triggerModifiedDocument",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"example-loading-shade"],[2,"height","100%","width","100%",3,"hideCloseEditor","params","file","editMode","triggerAfterUpdatedDoc","triggerCloseEditor","triggerModifiedDocument"],["onlyofficeViewer",""],[2,"height","100%","width","100%",3,"params","file","editMode","triggerAfterUpdatedDoc","triggerCloseEditor","triggerModifiedDocument"],["collaboraOnlineViewer",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"mat-dialog-content",1),n.Oc(2,RJ,2,0,"div",2),n.Oc(3,jJ,2,4,"onlyoffice-viewer",3),n.Oc(4,AJ,2,3,"app-collabora-online-viewer",4),n.Vb(),n.Rb(5,"span",5),n.Wb(6,"div",6),n.Wb(7,"button",7),n.dc("click",(function(){return e.close()})),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Wb(10,"button",8),n.Qc(11),n.ic(12,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf","onlyoffice"===e.editorType),n.Db(1),n.oc("ngIf","collaboraonline"===e.editorType),n.Db(3),n.oc("disabled",!e.documentIsModified||e.loading),n.Db(1),n.Rc(n.jc(9,7,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(12,9,"lang.cancel")))},directives:[q.f,P.t,q.c,k.b,q.d,V.c,vr,Cr],pipes:[g.d],styles:[""]}),t})();const TJ=["snav2"],EJ=["adminMenuTemplate"],FJ=["maarchTree"];function LJ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",13),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",17),n.dc("click",(function(){return n.Dc(t),n.hc(2).duplicateTemplate()})),n.Rb(5,"mat-icon",18),n.Wb(6,"p",19),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(2),n.Rc(n.jc(3,5,"lang.actions")),n.Db(2),n.Ib("disabled",t.lockFound||"acknowledgementReceipt"==t.template.target),n.oc("disableRipple",t.lockFound||"acknowledgementReceipt"==t.template.target),n.Db(3),n.Sc(" ",n.jc(8,7,"lang.duplicate")," ")}}function QJ(t,e){if(1&t&&n.Oc(0,LJ,9,9,"mat-nav-list",16),2&t){const t=n.hc();n.oc("ngIf",!t.creationMode&&!t.loading)}}function NJ(t,e){1&t&&(n.Wb(0,"div",20),n.Rb(1,"mat-spinner",21),n.Vb())}function zJ(t,e){if(1&t&&(n.Wb(0,"div",27),n.Wb(1,"div",25),n.Wb(2,"mat-form-field"),n.Rb(3,"input",34),n.ic(4,"translate"),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(3),n.pc("title",n.jc(4,3,"lang.technicalId")),n.pc("value",t.template.id),n.pc("placeholder",n.jc(5,5,"lang.technicalId"))}}function BJ(t,e){if(1&t&&(n.Wb(0,"mat-option",35),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",n.jc(2,2,"lang."+t),"")}}function UJ(t,e){if(1&t&&(n.Wb(0,"mat-option",35),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function $J(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",27),n.Wb(1,"div",25),n.Wb(2,"mat-form-field"),n.Wb(3,"mat-select",36),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).template.template_attachment_type=e})),n.ic(4,"translate"),n.ic(5,"translate"),n.Wb(6,"mat-option",37),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Oc(9,UJ,2,2,"mat-option",31),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(3),n.pc("title",n.jc(4,5,"lang.attachmentType")),n.pc("placeholder",n.jc(5,7,"lang.attachmentType")),n.oc("ngModel",t.template.template_attachment_type),n.Db(4),n.Rc(n.jc(8,9,"lang.allAttachments")),n.Db(2),n.oc("ngForOf",t.attachmentTypesList)}}function HJ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",27),n.Wb(1,"div",25),n.Wb(2,"mat-form-field"),n.Wb(3,"mat-select",38),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).template.template_attachment_type=e})),n.ic(4,"translate"),n.ic(5,"translate"),n.Wb(6,"mat-option",39),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Wb(9,"mat-option",40),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Wb(12,"mat-option",41),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(3),n.pc("title",n.jc(4,7,"lang.acknowledgementReceiptType")),n.pc("placeholder",n.jc(5,9,"lang.acknowledgementReceiptType")),n.oc("disabled",!t.creationMode)("ngModel",t.template.template_attachment_type),n.Db(4),n.Rc(n.jc(8,11,"lang.ARsimple")),n.Db(3),n.Rc(n.jc(11,13,"lang.ARsva")),n.Db(3),n.Rc(n.jc(14,15,"lang.ARsvr"))}}function GJ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",27),n.Wb(1,"div",25),n.Wb(2,"mat-form-field"),n.Wb(3,"input",42),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).template.subject=e})),n.ic(4,"translate"),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(3),n.pc("title",n.jc(4,3,"lang.emailSubject")),n.pc("placeholder",n.jc(5,5,"lang.emailSubject")),n.oc("ngModel",t.template.subject)}}function XJ(t,e){if(1&t&&(n.Wb(0,"mat-radio-button",45),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(3);n.oc("value",t)("checked",i.template.type===t),n.Db(1),n.Sc(" ",t,"")}}function qJ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",27),n.Wb(1,"div",25),n.Wb(2,"mat-radio-group",43),n.dc("change",(function(e){return n.Dc(t),n.hc(2).changeType(e)})),n.Oc(3,XJ,2,3,"mat-radio-button",44),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(2),n.oc("disabled",!t.creationMode),n.Db(1),n.oc("ngForOf",t.availableTypes)}}function KJ(t,e){if(1&t&&(n.Wb(0,"mat-option",35),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.rc("value","",t.fileExt,": ",t.fileName,""),n.Db(1),n.Tc(" ",t.fileExt,": ",t.fileName," ")}}function YJ(t,e){if(1&t&&(n.Ub(0),n.Oc(1,KJ,2,4,"mat-option",58),n.Tb()),2&t){const t=e.$implicit,i=n.hc().$implicit;n.Db(1),n.oc("ngIf",i==t.fileExt)}}function JJ(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-optgroup",54),n.Oc(2,YJ,2,1,"ng-container",57),n.Vb(),n.Tb()),2&t){const t=e.$implicit,i=n.hc(4);n.Db(1),n.qc("label","",t," :"),n.Db(1),n.oc("ngForOf",i.defaultTemplatesList)}}function ZJ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"mat-select",53),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(3).selectedModelFile=e}))("selectionChange",(function(){return n.Dc(t),n.hc(3).changeModel()})),n.ic(2,"translate"),n.ic(3,"translate"),n.Wb(4,"mat-optgroup",54),n.ic(5,"translate"),n.Wb(6,"mat-option",55),n.dc("click",(function(){return n.Dc(t),n.hc(),n.zc(5).click()})),n.Rb(7,"mat-icon",56),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Vb(),n.Oc(10,JJ,3,2,"ng-container",57),n.Vb(),n.Vb()}if(2&t){const t=n.hc(3);n.Db(1),n.pc("title",n.jc(2,9,"lang.defaultTemplate")),n.pc("placeholder",n.jc(3,11,"lang.chosenModel")),n.oc("disabled",!t.creationMode)("ngModel",t.selectedModelFile)("required","acknowledgementReceipt"!=t.template.target),n.Db(3),n.qc("label","",n.jc(5,13,"lang.loadedFile")," :"),n.Db(2),n.oc("value",t.template.file.name),n.Db(2),n.Sc(" ",t.functionsService.empty(t.template.file)||t.functionsService.empty(t.template.file.name)?n.jc(9,15,"lang.importFile"):t.template.file.name," "),n.Db(2),n.oc("ngForOf",t.extensionModels)}}function tZ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",51),n.dc("click",(function(e){n.Dc(t);const i=n.hc(3);return e.stopPropagation(),i.editFile()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(3);n.oc("disabled",t.lockFound),n.Db(1),n.Rc(n.jc(2,2,"lang.templateEdition"))}}function eZ(t,e){if(1&t&&n.Rb(0,"iframe",59),2&t){const t=n.hc(3);n.oc("src",t.templateDocView,n.Fc)}}function iZ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",27),n.Wb(1,"div",46),n.Wb(2,"div",47),n.Wb(3,"div",27),n.Wb(4,"input",48,49),n.dc("change",(function(e){return n.Dc(t),n.hc(2).uploadFileTrigger(e)})),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(6,"div",25),n.Oc(7,ZJ,11,17,"mat-form-field",16),n.Oc(8,tZ,3,4,"button",50),n.Wb(9,"button",51),n.dc("click",(function(e){n.Dc(t);const i=n.zc(5);return e.stopPropagation(),i.click()})),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Vb(),n.Oc(12,eZ,1,1,"iframe",52),n.Vb()}if(2&t){const t=n.hc(2);n.Db(7),n.oc("ngIf",t.creationMode||t.template.file.name),n.Db(1),n.oc("ngIf",t.creationMode&&t.selectedModelFile&&!t.documentImported||t.creationMode&&t.selectedModelFile&&t.documentImported&&"java"!==t.headerService.user.preferences.documentEdition||!t.creationMode&&!t.documentImported||!t.creationMode&&t.documentImported&&"java"!==t.headerService.user.preferences.documentEdition),n.Db(1),n.oc("disabled",t.lockFound),n.Db(1),n.Rc(n.jc(11,5,"lang.importFile")),n.Db(2),n.oc("ngIf",null!==t.templateDocView)}}function nZ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",27),n.Wb(1,"div",25),n.Wb(2,"mat-form-field"),n.Wb(3,"textarea",60),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).template.file.content=e})),n.ic(4,"translate"),n.ic(5,"translate"),n.Qc(6," "),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(3),n.pc("placeholder",n.jc(4,4,"lang.contentTxtTemplate")),n.pc("title",n.jc(5,6,"lang.contentTxtTemplate")),n.oc("ngModel",t.template.file.content)("required","acknowledgementReceipt"!=t.template.target)}}function aZ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",27),n.Wb(1,"div",25),n.Wb(2,"div",61),n.Wb(3,"textarea",62),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).template.file.content=e})),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(3),n.oc("ngModel",t.template.file.content)("required","acknowledgementReceipt"!=t.template.target)}}function sZ(t,e){if(1&t&&(n.Wb(0,"mat-option",35),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.oc("value",t.id),n.Db(1),n.Rc(t.label)}}function oZ(t,e){if(1&t&&(n.Ub(0),n.Oc(1,sZ,2,2,"mat-option",58),n.Tb()),2&t){const t=e.$implicit,i=n.hc(3);n.Db(1),n.oc("ngIf",i.displayDatasources(t))}}function rZ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",27),n.Wb(1,"div",25),n.Wb(2,"mat-form-field"),n.Wb(3,"mat-select",63),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).template.datasource=e})),n.ic(4,"translate"),n.ic(5,"translate"),n.Wb(6,"mat-option",64),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Oc(9,oZ,2,1,"ng-container",57),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(3),n.pc("title",n.jc(4,5,"lang.templateDatasource")),n.pc("placeholder",n.jc(5,7,"lang.templateDatasource")),n.oc("ngModel",t.template.datasource),n.Db(4),n.Rc(n.jc(8,9,"lang.noDatasource")),n.Db(2),n.oc("ngForOf",t.datasourcesList)}}function cZ(t,e){if(1&t&&(n.Wb(0,"mat-option",35),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.rc("value","",t.fileExt,": ",t.fileName,""),n.Db(1),n.Tc(" ",t.fileExt,": ",t.fileName," ")}}function lZ(t,e){if(1&t&&(n.Ub(0),n.Oc(1,cZ,2,4,"mat-option",58),n.Tb()),2&t){const t=e.$implicit,i=n.hc().$implicit;n.Db(1),n.oc("ngIf",i==t.fileExt)}}function dZ(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-optgroup",54),n.Oc(2,lZ,2,1,"ng-container",57),n.Vb(),n.Tb()),2&t){const t=e.$implicit,i=n.hc(3);n.Db(1),n.qc("label","",t," :"),n.Db(1),n.oc("ngForOf",i.defaultTemplatesList)}}function hZ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",51),n.dc("click",(function(e){n.Dc(t);const i=n.hc(3);return e.stopPropagation(),i.editFile()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(3);n.oc("disabled",t.lockFound),n.Db(1),n.Rc(n.jc(2,2,"lang.templateEdition"))}}function uZ(t,e){if(1&t&&n.Rb(0,"iframe",59),2&t){const t=n.hc(3);n.oc("src",t.templateDocView,n.Fc)}}function pZ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",27),n.Wb(1,"mat-tab-group",65),n.dc("selectedTabChange",(function(e){return n.Dc(t),n.hc(2).loadTab(e)})),n.Wb(2,"mat-tab",54),n.ic(3,"translate"),n.Wb(4,"div",25),n.Wb(5,"div",61),n.Wb(6,"textarea",66),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).template.file.electronic.content=e})),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(7,"mat-tab",54),n.ic(8,"translate"),n.Wb(9,"div",46),n.Wb(10,"div",47),n.Wb(11,"div",27),n.Wb(12,"input",48,67),n.dc("change",(function(e){return n.Dc(t),n.hc(2).uploadFileTrigger(e)})),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(14,"div",25),n.Wb(15,"mat-form-field"),n.Wb(16,"mat-select",68),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).selectedModelFile=e})),n.ic(17,"translate"),n.ic(18,"translate"),n.Wb(19,"mat-optgroup",54),n.ic(20,"translate"),n.Wb(21,"mat-option",69),n.dc("click",(function(){return n.Dc(t),n.zc(13).click()})),n.Rb(22,"mat-icon",56),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Vb(),n.Oc(25,dZ,3,2,"ng-container",57),n.Vb(),n.Vb(),n.Oc(26,hZ,3,4,"button",50),n.Wb(27,"button",51),n.dc("click",(function(e){n.Dc(t);const i=n.zc(13);return e.stopPropagation(),i.click()})),n.Qc(28),n.ic(29,"translate"),n.Vb(),n.Vb(),n.Oc(30,uZ,1,1,"iframe",52),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(2),n.pc("label",n.jc(3,17,"lang.electronicTemplate")),n.Db(4),n.oc("ngModel",t.template.file.electronic.content)("required","acknowledgementReceipt"!=t.template.target),n.Db(1),n.pc("label",n.jc(8,19,"lang.paperTemplate")),n.Db(9),n.pc("title",n.jc(17,21,"lang.defaultTemplate")),n.pc("placeholder",n.jc(18,23,"lang.chosenModel")),n.oc("disabled",!t.creationMode&&null!==t.template.file.paper.name)("ngModel",t.selectedModelFile)("required","acknowledgementReceipt"!=t.template.target),n.Db(3),n.qc("label","",n.jc(20,25,"lang.loadedFile")," :"),n.Db(2),n.oc("value",t.template.file.paper.name),n.Db(2),n.Sc(" ",t.functionsService.empty(t.template.file.paper)||t.functionsService.empty(t.template.file.paper.name)?n.jc(24,27,"lang.importFile"):t.template.file.paper.name," "),n.Db(2),n.oc("ngForOf",t.extensionModels),n.Db(1),n.oc("ngIf",t.creationMode&&t.selectedModelFile&&!t.documentImported||t.creationMode&&t.selectedModelFile&&t.documentImported&&"java"!==t.headerService.user.preferences.documentEdition||!t.creationMode&&!t.documentImported||!t.creationMode&&t.documentImported&&"java"!==t.headerService.user.preferences.documentEdition),n.Db(1),n.oc("disabled",t.lockFound),n.Db(1),n.Rc(n.jc(29,29,"lang.importFile")),n.Db(2),n.oc("ngIf",null!==t.templateDocView)}}function bZ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",22),n.Wb(1,"form",23,24),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Wb(3,"div",25),n.Oc(4,zJ,6,7,"div",26),n.Wb(5,"div",27),n.Wb(6,"div",25),n.Wb(7,"mat-form-field"),n.Wb(8,"input",28),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().template.label=e})),n.ic(9,"translate"),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(11,"div",27),n.Wb(12,"div",25),n.Wb(13,"mat-form-field"),n.Wb(14,"textarea",29),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().template.description=e})),n.ic(15,"translate"),n.ic(16,"translate"),n.Qc(17," "),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(18,"div",27),n.Wb(19,"div",25),n.Wb(20,"mat-form-field"),n.Wb(21,"mat-select",30),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().template.target=e}))("selectionChange",(function(){return n.Dc(t),n.hc().updateTemplateType()})),n.ic(22,"translate"),n.ic(23,"translate"),n.Oc(24,BJ,3,4,"mat-option",31),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Oc(25,$J,10,11,"div",26),n.Oc(26,HJ,15,17,"div",26),n.Oc(27,GJ,6,7,"div",26),n.Oc(28,qJ,4,2,"div",26),n.Oc(29,iZ,13,7,"div",26),n.Oc(30,nZ,7,8,"div",26),n.Oc(31,aZ,4,2,"div",26),n.Oc(32,rZ,10,11,"div",26),n.Oc(33,pZ,31,31,"div",26),n.Vb(),n.Wb(34,"div",32),n.Wb(35,"button",33),n.Qc(36),n.ic(37,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(2),e=n.hc();n.Db(4),n.oc("ngIf",!e.creationMode),n.Db(4),n.pc("title",n.jc(9,23,"lang.templateName")),n.pc("placeholder",n.jc(10,25,"lang.templateName")),n.oc("ngModel",e.template.label),n.Db(6),n.pc("placeholder",n.jc(15,27,"lang.description")),n.pc("title",n.jc(16,29,"lang.description")),n.oc("ngModel",e.template.description),n.Db(7),n.pc("title",n.jc(22,31,"lang.templateTarget")),n.pc("placeholder",n.jc(23,33,"lang.templateTarget")),n.oc("disabled",!e.creationMode)("ngModel",e.template.target),n.Db(3),n.oc("ngForOf",e.targetTypes),n.Db(1),n.oc("ngIf","attachments"==e.template.target),n.Db(1),n.oc("ngIf","acknowledgementReceipt"==e.template.target),n.Db(1),n.oc("ngIf","sendmail"==e.template.target),n.Db(1),n.oc("ngIf",e.availableTypes.length>1),n.Db(1),n.oc("ngIf","OFFICE"==e.template.type),n.Db(1),n.oc("ngIf","TXT"==e.template.type),n.Db(1),n.oc("ngIf","HTML"==e.template.type),n.Db(1),n.oc("ngIf","notifications"==e.template.target),n.Db(1),n.oc("ngIf","OFFICE_HTML"==e.template.type),n.Db(2),n.oc("disabled",!t.form.valid||e.lockFound),n.Db(1),n.Rc(n.jc(37,35,"lang.save"))}}function fZ(t,e){if(1&t&&(n.Wb(0,"mat-list-item"),n.Wb(1,"mat-icon",5),n.Rb(2,"i",6),n.Vb(),n.Wb(3,"span",7),n.Qc(4),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(4),n.Sc(" ",t.entity_label," ")}}let mZ=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c,l,d,h){this.http=t,this.sanitizer=e,this.route=i,this.router=n,this.notify=a,this.headerService=s,this.dialog=o,this.appService=r,this.viewContainerRef=c,this.functionsService=l,this.translate=d,this.authService=h,this.loading=!1,this.template={id:0,label:"",description:"",datasource:"letterbox_attachment",target:"",type:"",file:null},this.targetTypes=["acknowledgementReceipt","notes","sendmail","indexingFile","notifications","attachments"],this.allowedExtensions=["doc","docx","dotx","odt","ott","html","xlsl","xlsx","xltx","ods","ots","csv"],this.selectedModelFile=null,this.availableTypes=[],this.statuses=[],this.categoriesList=[],this.keywordsList=[],this.jnlpValue={},this.extensionModels=[],this.buttonFileName=this.translate.instant("lang.importFile"),this.lockFound=!1,this.templateDocView=null,this.data=[],this.config={},this.documentImported=!1}ngOnInit(){this.loading=!0,this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.route.params.subscribe(t=>{void 0===t.id?(this.headerService.setHeader(this.translate.instant("lang.templateCreation")),this.creationMode=!0,this.http.get("../rest/administration/templates/new").subscribe(t=>{this.setInitialValue(t),this.loading=!1})):(this.creationMode=!1,this.http.get("../rest/templates/"+t.id+"/details").subscribe(t=>{this.setInitialValue(t),this.template={id:t.template.template_id,label:t.template.template_label,description:t.template.template_comment,datasource:t.template.template_datasource,target:t.template.template_target,type:t.template.template_type,subject:t.template.subject,file:{}},this.updateTemplateType(),this.selectedModelFile=t.template.template_file_name,this.template.template_attachment_type=t.template.template_attachment_type,"HTML"===this.template.type||"TXT"===this.template.type?this.template.file.content=t.template.template_content:"OFFICE"===this.template.type?(this.template.file.format=t.template.template_file_name.split(".").pop(),this.template.file.name=t.template.template_file_name,this.getViewTemplateContent()):"acknowledgementReceipt"===this.template.target&&(this.functionsService.empty(t.template.template_file_name)||(this.template.file.paper.format=t.template.template_file_name.split(".").pop()),this.template.file.paper.name=t.template.template_file_name,this.template.file.electronic.content=t.template.template_content,this.getViewTemplateContent()),this.headerService.setHeader(this.translate.instant("lang.templateModification"),this.template.template_label),this.loading=!1})),this.template.template_attachment_type||(this.template.template_attachment_type="all")})}getViewTemplateContent(){this.http.get(`../rest/templates/${this.template.id}/content`).pipe(Object(mt.a)(t=>{this.templateDocView=this.sanitizer.bypassSecurityTrustResourceUrl("data:application/pdf;base64,"+t.encodedDocument)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}initMce(t){setTimeout(()=>{tinymce.remove("textarea"),tinymce.baseURL="../node_modules/tinymce",tinymce.suffix=".min",tinymce.init({selector:t,statusbar:!1,language:this.translate.instant("lang.langISO").replace("-","_"),language_url:`../node_modules/tinymce-i18n/langs/${this.translate.instant("lang.langISO").replace("-","_")}.js`,height:"200",plugins:["autoresize","code"],external_plugins:{maarch_b64image:"../../src/frontend/plugins/tinymce/maarch_b64image/plugin.min.js"},menubar:!1,toolbar:"undo | bold italic underline | alignleft aligncenter alignright | maarch_b64image | forecolor | code",theme_buttons1_add:"fontselect,fontsizeselect",theme_buttons2_add_before:"cut,copy,paste,pastetext,pasteword,separator,search,replace,separator",theme_buttons2_add:"separator,insertdate,inserttime,preview,separator,forecolor,backcolor",theme_buttons3_add_before:"tablecontrols,separator",theme_buttons3_add:"separator,print,separator,ltr,rtl,separator,fullscreen,separator,insertlayer,moveforward,movebackward,absolut",theme_toolbar_align:"left",theme_advanced_toolbar_location:"top",theme_styles:"Header 1=header1;Header 2=header2;Header 3=header3;Table Row=tableRow1",setup:t=>{t.on("keyup",t=>{"HTML"===this.template.type&&null!=tinymce.get("templateHtml")&&(this.template.file.content=tinymce.get("templateHtml").getContent()),"OFFICE_HTML"===this.template.type&&null!=tinymce.get("templateOfficeHtml")&&(this.template.file.electronic.content=tinymce.get("templateOfficeHtml").getContent())})}})},20)}setInitialValue(t){this.extensionModels=[],t.templatesModels.forEach(t=>{-1===this.extensionModels.indexOf(t.fileExt)&&this.extensionModels.push(t.fileExt)}),this.defaultTemplatesList=t.templatesModels,this.attachmentTypesList=t.attachmentTypes,this.datasourcesList=t.datasources,this.maarchTree.initData(t.entities.map(t=>Object.assign(Object.assign({},t),{id:t.serialId})))}getBase64Document(t){const e=new Uint8Array(t).reduce((t,e)=>t+String.fromCharCode(e),"");return btoa(e)}uploadFileTrigger(t){if(t.target.files&&t.target.files[0]&&this.isExtensionAllowed(t.target.files[0])){const e=new FileReader;"acknowledgementReceipt"===this.template.target?(this.template.file.paper={name:"",type:"",content:""},this.template.file.paper.name=t.target.files[0].name,this.selectedModelFile=this.template.file.paper.name,this.template.file.paper.type=t.target.files[0].type,this.template.file.paper.format=this.template.file.paper.name.split(".").pop()):(this.template.file={name:"",type:"",content:""},this.template.file.name=t.target.files[0].name,this.selectedModelFile=this.template.file.name,this.template.file.type=t.target.files[0].type,this.template.file.format=this.template.file.name.split(".").pop()),e.readAsArrayBuffer(t.target.files[0]),e.onload=t=>{"acknowledgementReceipt"===this.template.target?this.template.file.paper.content=this.getBase64Document(t.target.result):this.template.file.content=this.getBase64Document(t.target.result),this.documentImported=!0,this.getViewTemplateFile()}}}isExtensionAllowed(t){const e=t.name.toLowerCase().split(".").pop();return 0!==this.allowedExtensions.filter(t=>t.toLowerCase()===e.toLowerCase()).length||(this.dialog.open(qt.a,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.notAllowedExtension")+" !",msg:this.translate.instant("lang.file")+" : <b>"+t.name+"</b>, "+this.translate.instant("lang.type")+" : <b>"+t.type+"</b><br/><br/><u>"+this.translate.instant("lang.allowedExtensions")+"</u> : <br/>"+this.allowedExtensions.filter((t,e,i)=>e===i.indexOf(t)).join(", ")}}),!1)}editFile(){const t={docUrl:"rest/onlyOffice/mergedFile"};if(this.creationMode){if("acknowledgementReceipt"!==this.template.target)if(this.functionsService.empty(this.template.file.content)){t.objectType="templateCreation";for(const e of this.defaultTemplatesList)this.selectedModelFile===e.fileExt+": "+e.fileName&&(t.objectId=e.filePath);t.extension=t.objectId.toLowerCase().split(".").pop()}else t.objectType="encodedResource",t.objectId=this.template.file.content,t.extension=this.template.file.format;else if("acknowledgementReceipt"===this.template.target)if(this.functionsService.empty(this.template.file.paper.content)){t.objectType="templateCreation";for(const e of this.defaultTemplatesList)this.selectedModelFile===e.fileExt+": "+e.fileName&&(t.objectId=e.filePath);t.extension=t.objectId.toLowerCase().split(".").pop()}else t.objectType="encodedResource",t.objectId=this.template.file.paper.content,t.extension=this.template.file.paper.format}else"acknowledgementReceipt"!==this.template.target?this.functionsService.empty(this.template.file.content)?(t.objectType="templateModification",t.objectId=this.template.id,t.extension=this.template.file.name.toLowerCase().split(".").pop()):(t.objectType="encodedResource",t.objectId=this.template.file.content,t.extension=this.template.file.format):"acknowledgementReceipt"===this.template.target&&(this.functionsService.empty(this.template.file.paper.content)?(t.objectType="templateModification",t.objectId=this.template.id,t.extension=this.template.file.paper.name.toLowerCase().split(".").pop()):(t.objectType="encodedResource",t.objectId=this.template.file.paper.content,t.extension=this.template.file.paper.format));if("java"===this.headerService.user.preferences.documentEdition){if(this.creationMode){t.objectId="",t.objectType="templateCreation";for(const e of this.defaultTemplatesList)this.selectedModelFile===e.fileExt+": "+e.fileName&&(t.objectId=e.filePath);if(this.functionsService.empty(t.objectId))return alert(this.translate.instant("lang.canNotEditImportedDocumentWhenJava")),!1}else t.objectType="templateModification",t.objectId=this.template.id;t.authToken=this.authService.getToken(),this.launchJavaEditor(t)}else"java"!==this.headerService.user.preferences.documentEdition&&this.launchIntegratedEditor(t,this.headerService.user.preferences.documentEdition)}launchJavaEditor(t){this.http.post("../rest/jnlp",t).pipe(Object(mt.a)(e=>{window.location.href="../rest/jnlp/"+e.generatedJnlp,this.checkLockFile(e.jnlpUniqueId,t.extension)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}launchIntegratedEditor(t,e){this.dialogRef=this.dialog.open(WJ,{autoFocus:!1,panelClass:"maarch-full-height-modal",minWidth:"80%",disableClose:!0,data:{title:this.template.template_style,editorOptions:t,file:{format:t.extension},editorType:e}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>!this.functionsService.empty(t)),Object(mt.a)(e=>{"acknowledgementReceipt"===this.template.target?(this.template.file.paper.name=this.selectedModelFile,this.template.file.paper.format=t.extension,this.template.file.paper.content=e.content):(this.template.file.name=this.selectedModelFile,this.template.file.format=t.extension,this.template.file.content=e.content),this.getViewTemplateFile()}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}getViewTemplateFile(){this.http.post("../rest/convertedFile/encodedFile",{encodedFile:"acknowledgementReceipt"===this.template.target?this.template.file.paper.content:this.template.file.content,format:"acknowledgementReceipt"===this.template.target?this.template.file.paper.format:this.template.file.format}).pipe(Object(mt.a)(t=>{this.templateDocView=this.sanitizer.bypassSecurityTrustResourceUrl("data:application/pdf;base64,"+t.encodedResource)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}checkLockFile(t,e){this.intervalLockFile=setInterval(()=>{this.http.get("../rest/jnlp/lock/"+t).pipe(Object(mt.a)(t=>{this.lockFound=t.lockFileFound,this.lockFound||(clearInterval(this.intervalLockFile),this.loadTmpFile(`${t.fileTrunk}.${e}`))})).subscribe()},1e3)}loadTmpFile(t){this.http.get(`../rest/convertedFile/${t}?convert=true`).pipe(Object(mt.a)(e=>{"acknowledgementReceipt"===this.template.target?(this.template.file.paper.name=this.selectedModelFile,this.template.file.paper.format=t.toLowerCase().split(".").pop(),this.template.file.paper.content=e.encodedResource):(this.template.file.name=this.selectedModelFile,this.template.file.format=t.toLowerCase().split(".").pop(),this.template.file.content=e.encodedResource),this.templateDocView=this.sanitizer.bypassSecurityTrustResourceUrl("data:application/pdf;base64,"+e.encodedConvertedResource)})).subscribe()}duplicateTemplate(){this.lockFound||"acknowledgementReceipt"===this.template.target||confirm(this.translate.instant("lang.confirmDuplicate"))&&this.http.post("../rest/templates/"+this.template.id+"/duplicate",{id:this.template.id}).subscribe(t=>{this.notify.success(this.translate.instant("lang.templateDuplicated")),this.router.navigate(["/administration/templates/"+t.id])},t=>{this.notify.error(t.error.errors)})}onSubmit(){this.isValidTemplate()&&(this.creationMode?this.http.post("../rest/templates",this.formatTemplate()).pipe(Object(mt.a)(t=>{t.checkEntities?(this.config={panelClass:"maarch-modal",data:{entitiesList:t.checkEntities,template_attachment_type:this.template.template_attachment_type}},this.dialog.open(gZ,this.config)):(this.router.navigate(["/administration/templates"]),this.notify.success(this.translate.instant("lang.templateAdded")))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe():this.http.put("../rest/templates/"+this.template.id,this.formatTemplate()).pipe(Object(mt.a)(t=>{!this.functionsService.empty(t)&&t.checkEntities?(this.config={panelClass:"maarch-modal",data:{entitiesList:t.checkEntities,template_attachment_type:this.template.template_attachment_type}},this.dialogRef=this.dialog.open(gZ,this.config)):(this.router.navigate(["/administration/templates"]),this.notify.success(this.translate.instant("lang.templateUpdated")))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe())}formatTemplate(){const t=Object.assign({},this.template);return t.entities=this.maarchTree.getSelectedNodes().map(t=>t.entity_id),t}isValidTemplate(){return"acknowledgementReceipt"===this.template.target&&this.functionsService.empty(this.template.file.paper.name)&&this.functionsService.empty(this.template.file.electronic.content)?(alert(this.translate.instant("lang.mustCompleteAR")),!1):"acknowledgementReceipt"===this.template.target||"OFFICE"!==this.template.type||!this.functionsService.empty(this.template.file.name)||(alert(this.translate.instant("lang.editModelFirst")),!1)}displayDatasources(t){return"notification"===t.target&&"notifications"===this.template.target||"document"===t.target&&"notifications"!==this.template.target}updateTemplateType(){this.template.file={name:"",type:"",content:""},this.templateDocView=null,["attachments","indexingFile"].indexOf(this.template.target)>-1?(this.template.type="OFFICE",this.availableTypes=["OFFICE"]):["notifications","sendmail"].indexOf(this.template.target)>-1?(this.template.type="HTML",this.availableTypes=["HTML","TXT"],this.initMce("textarea#templateHtml")):"notes"===this.template.target?(this.template.type="TXT",this.availableTypes=["TXT"]):"acknowledgementReceipt"===this.template.target&&(this.template.file={electronic:{name:"",type:"",content:""},paper:{name:"",type:"",content:""}},this.template.type="OFFICE_HTML",this.availableTypes=[],this.template.template_attachment_type="",this.initMce("textarea#templateOfficeHtml"))}changeType(t){"HTML"===t.value?this.initMce("textarea#templateHtml"):tinymce.remove("textarea"),this.template.type=t.value}changeModel(){this.template.file={name:"",type:"",content:""},this.template.file={electronic:{name:"",type:"",content:""}},this.documentImported=!1}loadTab(t){0===t.index?this.initMce("textarea#templateOfficeHtml"):(tinymce.remove("textarea"),null==this.template.template_file_name&&null==this.template.template_style&&(this.buttonFileName=this.translate.instant("lang.importFile")))}ngOnDestroy(){tinymce.remove("textarea"),this.intervalLockFile&&clearInterval(this.intervalLockFile)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(v.b),n.Qb(ca.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a),n.Qb(q.b),n.Qb(w.a),n.Qb(n.T),n.Qb(_t.a),n.Qb(g.e),n.Qb(_.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(TJ,!0),n.Kc(EJ,!0),n.Kc(FJ,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.maarchTree=i.first))},decls:24,vars:14,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content",2,"padding","10px 10px 0px 10px"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content","style","display: contents;",4,"ngIf"],["fixedTopGap","56","position","end",2,"overflow-x","hidden","width","400px",3,"mode","fixedInViewport","opened"],["snav2",""],["mat-subheader",""],[2,"padding","10px"],["maarchTree",""],[4,"ngIf"],["mat-list-item","",3,"disableRipple","click"],["color","primary","mat-list-icon","",1,"fa","fa-copy"],["mat-line",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content",2,"display","contents"],[1,"form-horizontal",2,"display","contents",3,"ngSubmit"],["templatesFormUp","ngForm"],[1,"col-sm-12"],["class","form-group",4,"ngIf"],[1,"form-group"],["matInput","","name","label","type","text","maxlength","255","required","",3,"ngModel","title","placeholder","ngModelChange"],["matInput","","name","description","name","template_comment","matTextareaAutosize","","matAutosizeMinRows","2","matAutosizeMaxRows","5","required","",3,"ngModel","placeholder","title","ngModelChange"],["name","target","required","",3,"disabled","title","placeholder","ngModel","ngModelChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[1,"col-sm-12",2,"background","white","position","sticky","bottom","0px","text-align","center"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],["matInput","","type","number","disabled","",3,"title","value","placeholder"],[3,"value"],["id","template_attachment_type","name","template_attachment_type",3,"title","placeholder","ngModel","ngModelChange"],["value","all"],["id","template_attachment_type","name","template_attachment_type","required","",3,"disabled","title","placeholder","ngModel","ngModelChange"],["value","simple"],["value","sva"],["value","svr"],["matInput","","name","subject","type","text","maxlength","255",3,"ngModel","title","placeholder","ngModelChange"],["required","","name","type",3,"disabled","change"],["style","margin-left:10px","color","primary","name","type",3,"value","checked",4,"ngFor","ngForOf"],["color","primary","name","type",2,"margin-left","10px",3,"value","checked"],[1,"col-md-12",2,"display","none"],[1,"form-inline","hide"],["type","file","name","files[]","accept","application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel,application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml\u200c.slideshow,application/vnd.oasis.opendocument.text,application/vnd.oasis.opendocument.presentation,application/vnd.oasis.opendocument.spreadsheet",3,"change"],["uploadSignFileOffice",""],["mat-raised-button","","color","default","type","button",3,"disabled","click",4,"ngIf"],["mat-raised-button","","color","default","type","button",3,"disabled","click"],["style","width:100%;height:800px;",3,"src",4,"ngIf"],["id","template_style","name","template_style",3,"disabled","title","placeholder","ngModel","required","ngModelChange","selectionChange"],[3,"label"],[1,"selectFile",3,"value","click"],["color","primary",1,"fa","fa-paperclip",2,"height","auto"],[4,"ngFor","ngForOf"],[3,"value",4,"ngIf"],[2,"width","100%","height","800px",3,"src"],["matInput","","name","templateTxt","id","templateTxt","matTextareaAutosize","","matAutosizeMinRows","5","matAutosizeMaxRows","5",3,"ngModel","placeholder","title","required","ngModelChange"],["id","html_mode",2,"display","block","width","100%"],["name","templateHtml","id","templateHtml","rows","15","cols","60",2,"width","100%",3,"ngModel","required","ngModelChange"],["id","datasource","name","datasource",3,"title","placeholder","ngModel","ngModelChange"],["value",""],[3,"selectedTabChange"],["name","templateOfficeHtml","id","templateOfficeHtml","rows","15","cols","60",2,"width","100%",3,"ngModel","required","ngModelChange"],["uploadSignFileOfficeHtml",""],["id","template_style","name","template_style",3,"disabled","title","placeholder","ngModel","required","ngModelChange"],[2,"text-align","center",3,"value","click"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,QJ,1,1,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,NJ,2,0,"div",9),n.Oc(14,bZ,38,37,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Wb(15,"mat-sidenav",11,12),n.Wb(17,"mat-list"),n.Wb(18,"h3",13),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"div",14),n.Rb(22,"app-maarch-flat-tree",null,15),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",!e.appService.getViewMode()),n.Db(4),n.Rc(n.jc(20,12,"lang.chooseEntityAssociationModel")))},directives:[I.e,I.f,Ot,We,P.t,I.d,R.a,R.g,cQ,R.h,R.d,S.a,R.c,W.l,V.c,K.a,X.K,X.v,X.w,Y.c,J.b,X.d,X.p,X.F,X.u,X.x,J.d,ee.a,P.s,k.b,W.p,hc.b,hc.a,W.o,Te.c,Te.a],pipes:[g.d],styles:[".mat-list-item.disabled[_ngcontent-%COMP%]{opacity:.5;cursor:default}.mat-list-item.disabled[_ngcontent-%COMP%]:active, .mat-list-item.disabled[_ngcontent-%COMP%]:focus, .mat-list-item.disabled[_ngcontent-%COMP%]:hover{background:initial}.selectFile[_ngcontent-%COMP%]{text-align:center}.selectFile[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:flex!important;align-items:center;justify-content:center}"]}),t})(),gZ=(()=>{class t{constructor(t,e,i){this.http=t,this.data=e,this.dialogRef=i}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(v.b),n.Qb(q.a),n.Qb(q.h))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:18,vars:13,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["role","alert",1,"alert-message","alert-message-info"],[4,"ngFor","ngForOf"],["mat-raised-button","","color","primary","type","submit",3,"click"],["mat-list-icon",""],["color","primary",1,"fa","fa-share-alt"],["mat-line",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-dialog-content"),n.Wb(5,"div",2),n.Wb(6,"p"),n.Qc(7),n.ic(8,"translate"),n.Wb(9,"b"),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(12,"mat-list"),n.Oc(13,fZ,5,1,"mat-list-item",3),n.Vb(),n.Vb(),n.Wb(14,"mat-dialog-actions"),n.Wb(15,"button",4),n.dc("click",(function(){return e.dialogRef.close()})),n.Qc(16),n.ic(17,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,5,"lang.templateAssociateEntities")),n.Db(5),n.Rc(n.jc(8,7,"lang.templateCheckEntities")),n.Db(3),n.Rc(n.jc(11,9,"lang.AR"+e.data.template_attachment_type)),n.Db(3),n.oc("ngForOf",e.data.entitiesList),n.Db(3),n.Rc(n.jc(17,11,"lang.close")))},directives:[q.i,q.f,R.a,P.s,q.c,k.b,R.d,S.a,R.c,W.l],pipes:[g.d],styles:[".alert-message[_ngcontent-%COMP%]{max-width:inherit}"]}),t})();function vZ(t,e){1&t&&(n.Wb(0,"div",10),n.Rb(1,"mat-spinner",11),n.Vb())}function _Z(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",12),n.Wb(1,"mat-tab-group"),n.Wb(2,"mat-tab",13),n.ic(3,"translate"),n.Wb(4,"form",14,15),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Wb(6,"mat-list"),n.Wb(7,"p",16),n.Wb(8,"mat-slide-toggle",17),n.dc("change",(function(){n.Dc(t);const e=n.hc();return e.toggleRule(e.passwordRules.complexityUpper)})),n.Qc(9),n.Vb(),n.Wb(10,"mat-slide-toggle",17),n.dc("change",(function(){n.Dc(t);const e=n.hc();return e.toggleRule(e.passwordRules.complexityNumber)})),n.Qc(11),n.Vb(),n.Wb(12,"mat-slide-toggle",17),n.dc("change",(function(){n.Dc(t);const e=n.hc();return e.toggleRule(e.passwordRules.complexitySpecial)})),n.Qc(13),n.Vb(),n.Vb(),n.Wb(14,"mat-list-item",18),n.Wb(15,"mat-icon",19),n.Wb(16,"mat-slide-toggle",20),n.dc("change",(function(){n.Dc(t);const e=n.hc();return e.toggleRule(e.passwordRules.minLength)})),n.Vb(),n.Vb(),n.Wb(17,"p",21),n.Wb(18,"mat-form-field"),n.Wb(19,"input",22),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().passwordRules.minLength.value=e})),n.Vb(),n.Wb(20,"span",23),n.Qc(21),n.ic(22,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(23,"mat-list-item",18),n.Wb(24,"mat-icon",19),n.Wb(25,"mat-slide-toggle",20),n.dc("change",(function(){n.Dc(t);const e=n.hc();return e.toggleRule(e.passwordRules.lockAttempts)})),n.Vb(),n.Vb(),n.Wb(26,"p",24),n.Wb(27,"mat-form-field",25),n.Wb(28,"input",22),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().passwordRules.lockAttempts.value=e})),n.Vb(),n.Vb(),n.Wb(29,"mat-form-field",26),n.Wb(30,"input",22),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().passwordRules.lockTime.value=e})),n.Vb(),n.Wb(31,"span",23),n.Qc(32),n.ic(33,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(34,"mat-list-item",18),n.Wb(35,"mat-icon",19),n.Wb(36,"mat-slide-toggle",20),n.dc("change",(function(){n.Dc(t);const e=n.hc();return e.toggleRule(e.passwordRules.renewal)})),n.Vb(),n.Vb(),n.Wb(37,"p",21),n.Wb(38,"mat-form-field"),n.Wb(39,"input",22),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().passwordRules.renewal.value=e})),n.Vb(),n.Wb(40,"span",23),n.Qc(41),n.ic(42,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(43,"mat-list-item",18),n.Wb(44,"mat-icon",19),n.Wb(45,"mat-slide-toggle",20),n.dc("change",(function(){n.Dc(t);const e=n.hc();return e.toggleRule(e.passwordRules.historyLastUse)})),n.Vb(),n.Vb(),n.Wb(46,"p",21),n.Wb(47,"mat-form-field"),n.Wb(48,"input",22),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().passwordRules.historyLastUse.value=e})),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(49,"div",27),n.Wb(50,"button",28),n.Qc(51),n.ic(52,"translate"),n.Vb(),n.Wb(53,"button",29),n.dc("click",(function(){return n.Dc(t),n.hc().cancelModification()})),n.Qc(54),n.ic(55,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(5),e=n.hc();n.Db(2),n.pc("label",n.jc(3,41,"lang.password")),n.Db(6),n.oc("name",e.passwordRules.complexityUpper.label)("checked",e.passwordRules.complexityUpper.enabled),n.Db(1),n.Sc(" ",e.passwordRules.complexityUpper.label,""),n.Db(1),n.oc("name",e.passwordRules.complexityNumber.label)("checked",e.passwordRules.complexityNumber.enabled),n.Db(1),n.Sc(" ",e.passwordRules.complexityNumber.label,""),n.Db(1),n.oc("name",e.passwordRules.complexitySpecial.label)("checked",e.passwordRules.complexitySpecial.enabled),n.Db(1),n.Sc(" ",e.passwordRules.complexitySpecial.label,""),n.Db(3),n.oc("checked",e.passwordRules.minLength.enabled),n.Db(3),n.pc("placeholder",e.passwordRules.minLength.label),n.oc("disabled",!e.passwordRules.minLength.enabled)("name",e.passwordRules.minLength.label)("ngModel",e.passwordRules.minLength.value),n.Db(2),n.Sc("\xa0",n.jc(22,43,"lang.chars"),""),n.Db(4),n.oc("checked",e.passwordRules.lockAttempts.enabled),n.Db(3),n.pc("placeholder",e.passwordRules.lockAttempts.label),n.oc("disabled",!e.passwordRules.lockAttempts.enabled)("name",e.passwordRules.lockAttempts.label)("ngModel",e.passwordRules.lockAttempts.value),n.Db(2),n.pc("placeholder",e.passwordRules.lockTime.label),n.oc("disabled",!e.passwordRules.lockTime.enabled)("name",e.passwordRules.lockTime.label)("ngModel",e.passwordRules.lockTime.value),n.Db(2),n.Sc("\xa0",n.jc(33,45,"lang.minutes"),""),n.Db(4),n.oc("checked",e.passwordRules.renewal.enabled),n.Db(3),n.pc("placeholder",e.passwordRules.renewal.label),n.oc("disabled",!e.passwordRules.renewal.enabled)("name",e.passwordRules.renewal.label)("ngModel",e.passwordRules.renewal.value),n.Db(2),n.Sc("\xa0",n.jc(42,47,"lang.days"),""),n.Db(4),n.oc("checked",e.passwordRules.historyLastUse.enabled),n.Db(3),n.pc("placeholder",e.passwordRules.historyLastUse.label),n.oc("disabled",!e.passwordRules.historyLastUse.enabled)("name",e.passwordRules.historyLastUse.label)("ngModel",e.passwordRules.historyLastUse.value),n.Db(2),n.oc("disabled",!t.valid&&!e.disabledForm()||e.checkModif()),n.Db(1),n.Rc(n.jc(52,49,"lang.validate")),n.Db(2),n.oc("disabled",e.checkModif()),n.Db(1),n.Rc(n.jc(55,51,"lang.cancel"))}}let yZ=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.loading=!1,this.passwordRules={minLength:{enabled:!1,value:0},complexityUpper:{enabled:!1,value:0},complexityNumber:{enabled:!1,value:0},complexitySpecial:{enabled:!1,value:0},renewal:{enabled:!1,value:0},historyLastUse:{enabled:!1,value:0},lockTime:{enabled:!1,value:0},lockAttempts:{enabled:!1,value:0}},this.passwordRulesClone={},this.passwordRulesList=[]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.securitiesAdministration")),this.loading=!0,this.http.get("../rest/passwordRules").subscribe(t=>{this.passwordRulesList=t.rules,t.rules.forEach(t=>{this.passwordRules[t.label].enabled=t.enabled,this.passwordRules[t.label].value=t.value,this.passwordRules[t.label].label=this.translate.instant("lang.password"+t.label+"Required"),this.passwordRules[t.label].id=t.label,this.loading=!1}),this.passwordRulesClone=JSON.parse(JSON.stringify(this.passwordRules))},t=>{this.notify.error(t.error.errors)})}cancelModification(){this.passwordRules=JSON.parse(JSON.stringify(this.passwordRulesClone)),this.passwordRulesList.forEach(t=>{t.enabled=this.passwordRules[t.label].enabled,t.value=this.passwordRules[t.label].value})}checkModif(){return JSON.stringify(this.passwordRules)===JSON.stringify(this.passwordRulesClone)}disabledForm(){return!(this.passwordRules.lockTime.enabled||this.passwordRules.minLength.enabled||this.passwordRules.lockAttempts.enabled||this.passwordRules.renewal.enabled||this.passwordRules.historyLastUse.enabled)}toggleRule(t){t.enabled=!t.enabled,this.passwordRulesList.forEach(e=>{"lockAttempts"!==t.id||"lockTime"!==e.label&&"lockAttempts"!==e.label?t.id===e.label&&(e.enabled=t.enabled):(e.enabled=t.enabled,this.passwordRules.lockTime.enabled=t.enabled)})}onSubmit(){this.passwordRulesList.forEach(t=>{t.enabled=this.passwordRules[t.label].enabled,t.value=this.passwordRules[t.label].value}),this.http.put("../rest/passwordRules",{rules:this.passwordRulesList}).subscribe(t=>{this.passwordRulesClone=JSON.parse(JSON.stringify(this.passwordRules)),this.notify.success(this.translate.instant("lang.passwordRulesUpdated"))},t=>{this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:13,vars:8,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[3,"label"],[3,"ngSubmit"],["passwordForm","ngForm"],[2,"margin-bottom","40px","text-align","center"],["color","primary",2,"padding-left","10px","padding-right","10px",3,"name","checked","change"],[2,"margin-top","15px","margin-bottom","15px"],["mat-list-icon",""],["color","primary",2,"position","relative","top","-10px",3,"checked","change"],["mat-line",""],["type","number","min","1","pattern","^[1-9][0-9]*","matInput","","required","",3,"disabled","name","ngModel","placeholder","ngModelChange"],["matSuffix",""],["mat-line","",2,"display","flex"],[2,"flex","1","padding-right","10px"],[2,"flex","1"],[1,"col-md-12","text-center",2,"padding","10px"],["mat-raised-button","","type","submit","color","primary",3,"disabled"],["mat-raised-button","","type","button","color","default",3,"disabled","click"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,vZ,2,0,"div",8),n.Oc(12,_Z,56,53,"mat-card",9),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,V.c,K.a,Te.c,Te.a,X.K,X.v,X.w,R.a,te.a,R.d,S.a,R.c,W.l,Y.c,X.A,J.b,X.d,X.B,X.F,X.u,X.x,Y.j,k.b],pipes:[g.d],encapsulation:2}),t})();const xZ=["snav2"],CZ=["adminMenuTemplate"],OZ=["sendmailForm"];function DZ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",14),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",22),n.dc("click",(function(){return n.Dc(t),n.hc(),n.zc(16).toggle()})),n.Rb(5,"mat-icon",23),n.Wb(6,"p",24),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb()}2&t&&(n.Db(2),n.Rc(n.jc(3,2,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,4,"lang.checkSendmail")," "))}function wZ(t,e){1&t&&(n.Wb(0,"div",25),n.Rb(1,"mat-spinner",26),n.Vb())}function MZ(t,e){if(1&t&&(n.Wb(0,"mat-option",49),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function kZ(t,e){if(1&t&&(n.Wb(0,"mat-option",49),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}const SZ=function(){return["smtp","mail"]},IZ=function(t){return[t]};function PZ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",27),n.Wb(1,"mat-tab-group"),n.Wb(2,"mat-tab",28),n.ic(3,"translate"),n.Wb(4,"form",29,30),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Wb(6,"div",15),n.Wb(7,"div",31),n.Wb(8,"mat-form-field"),n.Wb(9,"mat-select",32,33),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().sendmail.type=e})),n.ic(11,"translate"),n.Oc(12,MZ,2,2,"mat-option",34),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(13,"div",15),n.Wb(14,"div",35),n.Wb(15,"mat-form-field"),n.Wb(16,"mat-select",36),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().sendmail.secure=e})),n.ic(17,"translate"),n.Oc(18,kZ,2,2,"mat-option",34),n.Vb(),n.Vb(),n.Vb(),n.Wb(19,"div",37),n.Wb(20,"mat-form-field"),n.Wb(21,"input",38),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().sendmail.host=e})),n.ic(22,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(23,"div",39),n.Wb(24,"mat-form-field"),n.Wb(25,"input",40),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().sendmail.port=e})),n.ic(26,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(27,"div",15),n.Wb(28,"div",16),n.Wb(29,"mat-slide-toggle",41),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().sendmail.auth=e}))("change",(function(e){return n.Dc(t),n.hc().cleanAuthInfo(e)})),n.Qc(30),n.ic(31,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(32,"div",15),n.Wb(33,"div",16),n.Wb(34,"mat-form-field"),n.Wb(35,"input",42),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().sendmail.user=e})),n.ic(36,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(37,"div",16),n.Wb(38,"mat-form-field"),n.Wb(39,"input",43),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().sendmail.password=e})),n.ic(40,"translate"),n.ic(41,"translate"),n.Vb(),n.Wb(42,"mat-icon",44),n.dc("click",(function(){n.Dc(t);const e=n.hc();return e.hidePassword=!e.hidePassword})),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(43,"div",15),n.Wb(44,"div",16),n.Wb(45,"mat-form-field"),n.Wb(46,"input",45),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().sendmail.from=e})),n.ic(47,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(48,"div",46),n.Wb(49,"button",47),n.Qc(50),n.ic(51,"translate"),n.Vb(),n.Wb(52,"button",48),n.dc("click",(function(){return n.Dc(t),n.hc().cancelModification()})),n.Qc(53),n.ic(54,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(5),e=n.hc();n.Db(2),n.pc("label",n.jc(3,38,"lang.informations")),n.Db(7),n.pc("placeholder",n.jc(11,40,"lang.configurationType")),n.oc("ngModel",e.sendmail.type),n.Db(3),n.oc("ngForOf",e.smtpTypeList),n.Db(1),n.Lc("opacity",n.uc(62,SZ).indexOf(e.sendmail.type)>-1?"1":"0.5"),n.Db(3),n.pc("placeholder",n.jc(17,42,"lang.smtpAuth")),n.oc("disabled",-1==n.uc(63,SZ).indexOf(e.sendmail.type))("ngModel",e.sendmail.secure),n.Db(2),n.oc("ngForOf",e.smtpSecList),n.Db(3),n.pc("placeholder",n.jc(22,44,"lang.host")),n.oc("disabled",-1==n.uc(64,SZ).indexOf(e.sendmail.type))("ngModel",e.sendmail.host),n.Db(4),n.pc("placeholder",n.jc(26,46,"lang.port")),n.oc("ngModel",e.sendmail.port)("disabled",-1==n.uc(65,SZ).indexOf(e.sendmail.type)),n.Db(2),n.Lc("opacity",n.uc(66,SZ).indexOf(e.sendmail.type)>-1?"1":"0.5"),n.Db(2),n.oc("ngModel",e.sendmail.auth)("disabled",-1==n.uc(67,SZ).indexOf(e.sendmail.type)),n.Db(1),n.Rc(n.jc(31,48,"lang.enableAuth")),n.Db(2),n.Lc("opacity",n.uc(68,SZ).indexOf(e.sendmail.type)>-1?"1":"0.5"),n.Db(3),n.pc("placeholder",n.jc(36,50,"lang.id")),n.oc("ngModel",e.sendmail.user)("disabled",!e.sendmail.auth||-1==n.uc(69,SZ).indexOf(e.sendmail.type)),n.Db(4),n.oc("type",e.hidePassword?"password":"text")("ngModel",e.sendmail.password)("disabled",!e.sendmail.auth||-1==n.uc(70,SZ).indexOf(e.sendmail.type))("placeholder",!0===e.sendmail.passwordAlreadyExists?n.jc(40,52,"lang.passwordModification"):n.jc(41,54,"lang.password"))("required",!e.sendmail.passwordAlreadyExists),n.Db(3),n.oc("ngClass",n.vc(71,IZ,e.hidePassword?"fa-eye-slash":"fa-eye")),n.Db(4),n.pc("placeholder",n.jc(47,56,"lang.mailFrom")),n.oc("ngModel",e.sendmail.from),n.Db(3),n.oc("disabled",e.checkModif()||!t.valid),n.Db(1),n.Rc(n.jc(51,58,"lang.validate")),n.Db(2),n.oc("disabled",e.checkModif()),n.Db(1),n.Rc(n.jc(54,60,"lang.cancel"))}}function VZ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-icon",50),n.dc("click",(function(){return n.Dc(t),n.hc().testEmailSend()})),n.ic(1,"translate"),n.Vb()}2&t&&n.pc("title",n.jc(1,1,"lang.beginSendTest"))}function RZ(t,e){if(1&t&&(n.Wb(0,"mat-list-item"),n.Rb(1,"mat-icon",51),n.Wb(2,"p",24),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Gb("fas ",t.emailSendResult.icon," fa-2x"),n.Db(2),n.Sc(" ",t.emailSendResult.msg," ")}}function jZ(t,e){if(1&t&&(n.Wb(0,"div",52),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Sc(" ",t.emailSendResult.debug," ")}}let AZ=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.viewContainerRef=s,this.loading=!1,this.sendmail={type:"smtp",host:"",auth:!0,user:"",password:"",secure:"ssl",port:"465",charset:"utf-8",from:""},this.smtpTypeList=[{id:"smtp",label:this.translate.instant("lang.smtpclient")},{id:"sendmail",label:this.translate.instant("lang.smtprelay")},{id:"qmail",label:this.translate.instant("lang.qmail")},{id:"mail",label:this.translate.instant("lang.phpmail")}],this.smtpSecList=[{id:"",label:this.translate.instant("lang.none")},{id:"ssl",label:"ssl"},{id:"tls",label:"tls"}],this.sendmailClone={},this.hidePassword=!0,this.serverConnectionLoading=!1,this.emailSendLoading=!1,this.emailSendResult={icon:"",msg:"",debug:""},this.currentUser={},this.recipientTest="",this.passwordLabel=""}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.sendmailShort")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,this.http.get("../rest/configurations/admin_email_server").subscribe(t=>{this.sendmail=t.configuration.value,this.sendmailClone=JSON.parse(JSON.stringify(this.sendmail)),this.loading=!1},t=>{this.notify.handleErrors(t)})}cancelModification(){this.sendmail=JSON.parse(JSON.stringify(this.sendmailClone))}onSubmit(){this.sendmailFormCpt.invalid?this.notify.handleErrors({error:{errors:this.translate.instant("lang.notSavedBecauseInvalid")}}):this.http.put("../rest/configurations/admin_email_server",this.sendmail).subscribe(t=>{this.sendmailClone=JSON.parse(JSON.stringify(this.sendmail)),this.notify.success(this.translate.instant("lang.configurationUpdated"))},t=>{this.notify.handleErrors(t)})}checkModif(){return JSON.stringify(this.sendmailClone)===JSON.stringify(this.sendmail)}initEmailSend(){this.emailSendResult={icon:"",msg:"",debug:""},void 0===this.currentUser.mail&&this.http.get("../rest/currentUser/profile").subscribe(t=>{this.currentUser=t,this.recipientTest=t.mail})}testEmailSend(){JSON.stringify(this.sendmailClone)!==JSON.stringify(this.sendmail)&&this.onSubmit(),this.emailSendResult={icon:"fa-paper-plane primary",msg:this.translate.instant("lang.emailSendInProgress"),debug:""};const t={sender:{email:this.currentUser.mail},recipients:[this.recipientTest],object:"["+this.translate.instant("lang.doNotReply")+"] "+this.translate.instant("lang.emailSendTest"),status:"EXPRESS",body:this.translate.instant("lang.emailSendTest"),isHtml:!1};this.emailSendLoading=!0,this.http.post("../rest/emails",t).subscribe(t=>{this.emailSendLoading=!1,this.emailSendResult={icon:"fa-check green",msg:this.translate.instant("lang.emailSendSuccess"),debug:""}},t=>{this.emailSendLoading=!1,this.emailSendResult={icon:"fa-times red",msg:this.translate.instant("lang.emailSendFailed"),debug:t.error.errors}})}cleanAuthInfo(t){this.sendmail.passwordAlreadyExists=!1,this.sendmail.user="",this.sendmail.password=""}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(xZ,!0),n.Kc(CZ,!0),n.Xc(OZ,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.sendmailFormCpt=i.first))},decls:32,vars:24,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],["joyrideStep","emailTour",1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["fixedTopGap","56","position","end",2,"overflow-x","hidden","width","500px",3,"mode","fixedInViewport","opened"],["snav2",""],["disableRipple","true",2,"display","flex","flex-direction","column"],["mat-subheader",""],[1,"form-group"],[1,"col-md-12"],["testSendmailForm","ngForm"],["name","recipientTest","matInput","","pattern","(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$)",3,"placeholder","ngModel","disabled","ngModelChange"],["color","primary","style","cursor: pointer;","matSuffix","","class","fa fa-paper-plane fa-2x",3,"title","click",4,"ngIf"],[4,"ngIf"],["class","bash",4,"ngIf"],["mat-list-item","","joyrideStep","emailTour2",3,"click"],["color","primary","mat-list-icon","",1,"fas","fa-signal"],["mat-line",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[3,"label"],[3,"ngSubmit"],["sendmailForm","ngForm"],[1,"col-md-12",2,"margin-bottom","20px"],["name","smtpType","required","",3,"placeholder","ngModel","ngModelChange"],["smtpType",""],[3,"value",4,"ngFor","ngForOf"],[1,"col-md-2"],["name","SMTPSecure",3,"placeholder","disabled","ngModel","ngModelChange"],[1,"col-md-9"],["matInput","","name","host","required","",3,"disabled","ngModel","placeholder","ngModelChange"],[1,"col-md-1"],["name","port","type","number","matInput","","required","",3,"ngModel","disabled","placeholder","ngModelChange"],["color","primary","name","SMTPAuth",3,"ngModel","disabled","ngModelChange","change"],["name","user","matInput","","required","",3,"ngModel","disabled","placeholder","ngModelChange"],["name","password","matInput","",3,"type","ngModel","disabled","placeholder","required","ngModelChange"],["color","primary","matSuffix","",1,"fa","fa-2x",2,"cursor","pointer",3,"ngClass","click"],["name","mailFrom","required","","matInput","","pattern","(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$)",3,"ngModel","placeholder","ngModelChange"],[1,"col-md-12","text-center",2,"padding","10px"],["mat-raised-button","","type","submit","color","primary",3,"disabled"],["mat-raised-button","","type","button","color","default",3,"disabled","click"],[3,"value"],["color","primary","matSuffix","",1,"fa","fa-paper-plane","fa-2x",2,"cursor","pointer",3,"title","click"],["mat-list-icon",""],[1,"bash"]],template:function(t,e){if(1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,DZ,9,6,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,wZ,2,0,"div",9),n.Oc(14,PZ,55,73,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Wb(15,"mat-sidenav",11,12),n.dc("opened",(function(){return e.onSubmit(),e.initEmailSend()})),n.Wb(17,"mat-nav-list",13),n.Wb(18,"h3",14),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"div",15),n.Wb(22,"div",16),n.Wb(23,"form",null,17),n.Wb(25,"mat-form-field"),n.Wb(26,"input",18),n.dc("ngModelChange",(function(t){return e.recipientTest=t})),n.ic(27,"translate"),n.Vb(),n.Oc(28,VZ,2,3,"mat-icon",19),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Oc(29,RZ,4,4,"mat-list-item",20),n.Vb(),n.Oc(30,jZ,2,1,"div",21),n.ic(31,"translate"),n.Vb(),n.Vb()),2&t){const t=n.zc(24);n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",(e.appService.getViewMode(),!1)),n.Db(4),n.Rc(n.jc(20,18,"lang.emailSendTest")),n.Db(7),n.pc("placeholder",n.jc(27,20,"lang.mailTo")),n.oc("ngModel",e.recipientTest)("disabled",e.emailSendLoading),n.Db(2),n.oc("ngIf",!e.emailSendLoading&&t.valid),n.Db(1),n.oc("ngIf",""!=e.emailSendResult.msg),n.Db(1),n.oc("ngIf",e.emailSendResult.msg===n.jc(31,22,"lang.emailSendFailed"))}},directives:[I.e,I.f,Ot,We,za,P.t,I.d,R.h,R.g,X.K,X.v,X.w,Y.c,J.b,X.d,X.B,X.u,X.x,R.d,S.a,R.c,W.l,V.c,K.a,Te.c,Te.a,ee.a,X.F,P.s,X.A,te.a,Y.j,P.q,k.b,W.p],pipes:[g.d],styles:[".mat-list-item[_ngcontent-%COMP%]:hover{background:inherit}.green[_ngcontent-%COMP%]{color:green}.primary[_ngcontent-%COMP%]{color:#135f7f}.red[_ngcontent-%COMP%]{color:red}.bash[_ngcontent-%COMP%]{background:#34495e;height:310px;border-radius:5px;top:40px;display:absolute;color:#fff;padding:10px;margin:10px}"]}),t})();const WZ=["adminMenuTemplate"];function TZ(t,e){1&t&&(n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",11),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",12),n.Rb(5,"mat-icon",13),n.Wb(6,"p",14),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,2,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,4,"lang.add")," "))}function EZ(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Vb())}function FZ(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",38),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Rc(n.jc(2,3,"lang.label"))}}function LZ(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",t.label," ")}}function QZ(t,e){1&t&&(n.Wb(0,"mat-header-cell",38),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.description")))}function NZ(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.description," ")}}function zZ(t,e){1&t&&(n.Wb(0,"mat-header-cell",38),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.mailevaAccount")))}function BZ(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.accountid," ")}}function UZ(t,e){1&t&&n.Rb(0,"mat-header-cell")}function $Z(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",39),n.Wb(1,"button",40),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.deleteShipping(a.id)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",41),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.pc("matTooltip",n.jc(2,1,"lang.delete")))}function HZ(t,e){1&t&&n.Rb(0,"mat-header-row")}function GZ(t,e){1&t&&(n.Rb(0,"mat-row",42),n.ic(1,"translate")),2&t&&(n.qc("routerLink","/administration/shippings/",e.$implicit.id,""),n.pc("matTooltip",n.jc(1,2,"lang.view")))}function XZ(t,e){if(1&t&&(n.Wb(0,"mat-card",17),n.Wb(1,"div",18),n.Wb(2,"div",19),n.Wb(3,"mat-form-field"),n.Rb(4,"input",20),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Wb(6,"div",19),n.Rb(7,"mat-paginator",21,22),n.Vb(),n.Vb(),n.Wb(9,"mat-table",23,24),n.Ub(11,25),n.Oc(12,FZ,3,5,"mat-header-cell",26),n.Oc(13,LZ,2,3,"mat-cell",27),n.Tb(),n.Ub(14,28),n.Oc(15,QZ,3,3,"mat-header-cell",29),n.Oc(16,NZ,2,1,"mat-cell",30),n.Tb(),n.Ub(17,31),n.Oc(18,zZ,3,3,"mat-header-cell",29),n.Oc(19,BZ,2,1,"mat-cell",30),n.Tb(),n.Ub(20,32),n.Oc(21,UZ,1,0,"mat-header-cell",33),n.Oc(22,$Z,4,3,"mat-cell",34),n.Tb(),n.Oc(23,HZ,1,0,"mat-header-row",35),n.Oc(24,GZ,2,4,"mat-row",36),n.Vb(),n.Wb(25,"div",37),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.pc("placeholder",n.jc(5,10,"lang.filterBy")),n.oc("formControl",t.adminService.getFilterField()),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.adminService.getDataSource()),n.Db(14),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns),n.Db(2),n.Tc(" ",t.shippings.length," ",n.jc(27,12,"lang.shippings"),"")}}let qZ=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.functions=s,this.adminService=o,this.viewContainerRef=r,this.shippings=[],this.loading=!1,this.displayedColumns=["label","description","accountid","actions"],this.filterColumns=["label","description","accountid"]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.shippings")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,this.http.get("../rest/administration/shippings").subscribe(t=>{this.shippings=t.shippings,setTimeout(()=>{this.adminService.setDataSource("admin_shippings",this.shippings,this.sort,this.paginator,this.filterColumns)},0),this.loading=!1})}deleteShipping(t){confirm(this.translate.instant("lang.deleteMsg"))&&this.http.delete("../rest/administration/shippings/"+t).subscribe(t=>{this.shippings=t.shippings,this.adminService.setDataSource("admin_shippings",this.shippings,this.sort,this.paginator,this.filterColumns),this.notify.success(this.translate.instant("lang.shippingDeleted"))},t=>{this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a),n.Qb(OL),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(WZ,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:15,vars:8,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["mat-subheader",""],["mat-list-item","","routerLink","/administration/shippings/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"row"],[1,"col-md-6","col-xs-6"],["matInput","",3,"formControl","placeholder"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSort","","matSortDisableClear","",3,"dataSource"],["table",""],["matColumnDef","label"],["mat-sort-header","",3,"hide-for-mobile",4,"matHeaderCellDef"],[3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","description"],["mat-sort-header","",4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","accountid"],["matColumnDef","actions"],[4,"matHeaderCellDef"],["style","justify-content: flex-end;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"routerLink","matTooltip",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["mat-sort-header",""],[2,"justify-content","flex-end"],["mat-icon-button","","color","warn",3,"matTooltip","click"],["aria-hidden","true",1,"fa","fa-trash-alt","fa-2x"],[2,"cursor","pointer",3,"routerLink","matTooltip"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,TZ,9,6,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,EZ,2,0,"div",9),n.Oc(14,XZ,28,14,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,R.h,R.g,R.d,o.f,S.a,R.c,W.l,V.c,K.a,Y.c,J.b,X.d,X.u,X.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,vt.h,Fe.b,vt.a,k.b,A.b,vt.j,vt.m,o.d],pipes:[g.d],encapsulation:2}),t})();const KZ=["snav2"],YZ=["maarchTree"];function JZ(t,e){1&t&&(n.Wb(0,"div",16),n.Rb(1,"mat-spinner",17),n.Vb())}function ZZ(t,e){1&t&&(n.Rb(0,"div",54),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.shippingUnavailable"),n.Ec)}function t1(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item",55),n.Wb(1,"mat-slide-toggle",56),n.dc("change",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).toggleShapingOption(i)})),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.Db(1),n.pc("name",t),n.oc("checked",i.shipping.options.shapingOptions.indexOf(t)>-1),n.Db(1),n.Rc(n.jc(3,3,"lang.maileva_"+t))}}function e1(t,e){1&t&&(n.Rb(0,"div",57),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.warnShapingOption"),n.Ec)}function i1(t,e){if(1&t&&(n.Wb(0,"mat-radio-button",58),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.pc("name",t),n.oc("value",t),n.Db(1),n.Sc(" ",n.jc(2,3,"lang.maileva_"+t)," ")}}const n1=function(t){return[t]};function a1(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",18),n.Oc(1,ZZ,2,3,"div",19),n.Wb(2,"form",20,21),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Wb(4,"div",22),n.Wb(5,"div",23),n.Wb(6,"mat-form-field"),n.Wb(7,"input",24),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().shipping.label=e})),n.ic(8,"translate"),n.ic(9,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(10,"div",22),n.Wb(11,"div",23),n.Wb(12,"mat-form-field"),n.Wb(13,"input",25),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().shipping.description=e})),n.ic(14,"translate"),n.ic(15,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(16,"div",26),n.Wb(17,"div",27),n.Wb(18,"div",28),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"mat-list",29),n.Oc(22,t1,4,5,"mat-list-item",30),n.Oc(23,e1,2,3,"div",31),n.Vb(),n.Vb(),n.Wb(24,"div",32),n.Wb(25,"div",28),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Wb(28,"mat-radio-group",33),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().shipping.options.sendMode=e})),n.Oc(29,i1,3,5,"mat-radio-button",34),n.Vb(),n.Vb(),n.Vb(),n.Wb(30,"div",26),n.Wb(31,"div",35),n.Wb(32,"div",28),n.Qc(33),n.ic(34,"translate"),n.Vb(),n.Wb(35,"div",36),n.Wb(36,"label",37),n.Qc(37),n.ic(38,"translate"),n.Vb(),n.Wb(39,"mat-form-field",38),n.Wb(40,"input",39),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().shipping.fee.firstPagePrice=e})),n.ic(41,"translate"),n.Vb(),n.Wb(42,"span",40),n.Qc(43,"\xa0\u20ac"),n.Vb(),n.Vb(),n.Vb(),n.Wb(44,"div",36),n.Wb(45,"label",41),n.Qc(46),n.ic(47,"translate"),n.Vb(),n.Wb(48,"mat-form-field",38),n.Wb(49,"input",42),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().shipping.fee.nextPagePrice=e})),n.ic(50,"translate"),n.Vb(),n.Wb(51,"span",40),n.Qc(52,"\xa0\u20ac"),n.Vb(),n.Vb(),n.Vb(),n.Wb(53,"div",36),n.Wb(54,"label",43),n.Qc(55),n.ic(56,"translate"),n.Vb(),n.Wb(57,"mat-form-field",38),n.Wb(58,"input",44),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().shipping.fee.postagePrice=e})),n.ic(59,"translate"),n.Vb(),n.Wb(60,"span",40),n.Qc(61,"\xa0\u20ac"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(62,"div",45),n.Wb(63,"div",28),n.Qc(64),n.ic(65,"translate"),n.Vb(),n.Wb(66,"div",46),n.Qc(67),n.ic(68,"translate"),n.Vb(),n.Wb(69,"div",23),n.Wb(70,"mat-form-field"),n.Wb(71,"input",47),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().shipping.account.id=e})),n.ic(72,"translate"),n.ic(73,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(74,"div",23),n.Wb(75,"mat-form-field"),n.Wb(76,"input",48),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().shipping.account.password=e})),n.ic(77,"translate"),n.ic(78,"translate"),n.Vb(),n.Wb(79,"mat-icon",49),n.dc("click",(function(){n.Dc(t);const e=n.hc();return e.hidePassword=!e.hidePassword})),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(80,"div",50),n.Wb(81,"div",51),n.Wb(82,"button",52),n.Qc(83),n.ic(84,"translate"),n.Vb(),n.Wb(85,"button",53),n.dc("click",(function(){return n.Dc(t),n.hc().cancelModification()})),n.Qc(86),n.ic(87,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(3),e=n.hc();n.Db(1),n.oc("ngIf",!e.shippingAvailable),n.Db(6),n.pc("title",n.jc(8,37,"lang.label")),n.pc("placeholder",n.jc(9,39,"lang.label")),n.oc("ngModel",e.shipping.label),n.Db(6),n.pc("title",n.jc(14,41,"lang.description")),n.pc("placeholder",n.jc(15,43,"lang.description")),n.oc("ngModel",e.shipping.description),n.Db(6),n.Sc(" ",n.jc(20,45,"lang.shapingOptions")," "),n.Db(3),n.oc("ngForOf",e.shapingOptions),n.Db(1),n.oc("ngIf",-1==e.shipping.options.shapingOptions.indexOf("addressPage")),n.Db(3),n.Sc(" ",n.jc(27,47,"lang.sendModes")," "),n.Db(2),n.oc("ngModel",e.shipping.options.sendMode),n.Db(1),n.oc("ngForOf",e.sendModes),n.Db(4),n.Sc(" ",n.jc(34,49,"lang.pricesInformations")," "),n.Db(4),n.Sc(" ",n.jc(38,51,"lang.maileva_firstPagePrice")," "),n.Db(3),n.pc("title",n.jc(41,53,"lang.maileva_firstPagePrice")),n.oc("ngModel",e.shipping.fee.firstPagePrice),n.Db(6),n.Sc(" ",n.jc(47,55,"lang.maileva_nextPagePrice")," "),n.Db(3),n.pc("title",n.jc(50,57,"lang.maileva_nextPagePrice")),n.oc("ngModel",e.shipping.fee.nextPagePrice),n.Db(6),n.Sc(" ",n.jc(56,59,"lang.maileva_postagePrice")," "),n.Db(3),n.pc("title",n.jc(59,61,"lang.maileva_postagePrice")),n.oc("ngModel",e.shipping.fee.postagePrice),n.Db(6),n.Sc(" ",n.jc(65,63,"lang.mailevaAccount")," "),n.Db(3),n.Rc(n.jc(68,65,"lang.infoMailevaAccount")),n.Db(4),n.pc("title",n.jc(72,67,"lang.login")),n.pc("placeholder",n.jc(73,69,"lang.id")),n.oc("ngModel",e.shipping.account.id),n.Db(5),n.oc("type",e.hidePassword?"password":"text")("ngModel",e.shipping.account.password)("placeholder",!1===e.creationMode?n.jc(77,71,"lang.passwordModification"):n.jc(78,73,"lang.password"))("required",e.creationMode),n.Db(3),n.oc("ngClass",n.vc(79,n1,e.hidePassword?"fa-eye-slash":"fa-eye")),n.Db(3),n.oc("disabled",e.checkModif()||!t.valid),n.Db(1),n.Rc(n.jc(84,75,"lang.validate")),n.Db(2),n.oc("disabled",e.checkModif()),n.Db(1),n.Rc(n.jc(87,77,"lang.cancel"))}}let s1=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.route=i,this.router=n,this.notify=a,this.headerService=s,this.appService=o,this.loading=!1,this.creationMode=!0,this.shipping={label:"",description:"",options:{shapingOptions:["addressPage"],sendMode:"fast"},fee:{firstPagePrice:0,nextPagePrice:0,postagePrice:0},account:{id:"",password:""},entities:[]},this.entities=[],this.entitiesClone=null,this.shippingClone=null,this.shapingOptions=["color","duplexPrinting","addressPage"],this.sendModes=["fast","economic"],this.hidePassword=!0,this.shippingAvailable=!1}ngOnInit(){this.http.get("../rest/externalConnectionsEnabled").pipe(Object(mt.a)(t=>{this.shippingAvailable=!0===t.connection.maileva}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe(),this.route.params.subscribe(t=>{void 0===t.id?(this.headerService.setHeader(this.translate.instant("lang.shippingCreation")),this.creationMode=!0,this.http.get("../rest/administration/shippings/new").subscribe(t=>{this.entities=t.entities.map(t=>Object.assign(Object.assign({},t),{id:parseInt(t.id)})),this.entitiesClone=JSON.parse(JSON.stringify(this.entities)),this.initEntitiesTree(this.entities),this.shippingClone=JSON.parse(JSON.stringify(this.shipping)),this.loading=!1},t=>{this.notify.handleErrors(t)}),this.loading=!1):(this.headerService.setHeader(this.translate.instant("lang.shippingModification")),this.creationMode=!1,this.http.get("../rest/administration/shippings/"+t.id).subscribe(t=>{this.shipping=t.shipping,this.entities=t.entities,this.entitiesClone=JSON.parse(JSON.stringify(this.entities)),this.initEntitiesTree(this.entities),this.shippingClone=JSON.parse(JSON.stringify(this.shipping)),this.loading=!1},t=>{this.notify.handleErrors(t)}))})}initEntitiesTree(t){this.maarchTree.initData(t)}updateSelectedEntities(){this.shipping.entities=this.maarchTree.getSelectedNodes().map(t=>t.id)}onSubmit(){this.creationMode?this.http.post("../rest/administration/shippings",this.shipping).subscribe(t=>{this.shippingClone=JSON.parse(JSON.stringify(this.shipping)),this.notify.success(this.translate.instant("lang.shippingAdded")),this.router.navigate(["/administration/shippings"])},t=>{this.notify.handleErrors(t)}):this.http.put("../rest/administration/shippings/"+this.shipping.id,this.shipping).subscribe(t=>{this.shippingClone=JSON.parse(JSON.stringify(this.shipping)),this.notify.success(this.translate.instant("lang.shippingUpdated")),this.router.navigate(["/administration/shippings"])},t=>{this.notify.handleErrors(t)})}checkModif(){return JSON.stringify(this.shippingClone)===JSON.stringify(this.shipping)}toggleShapingOption(t){const e=this.shipping.options.shapingOptions.indexOf(t);e>-1?this.shipping.options.shapingOptions.splice(e,1):this.shipping.options.shapingOptions.push(t)}cancelModification(){this.shipping=JSON.parse(JSON.stringify(this.shippingClone)),this.entities=JSON.parse(JSON.stringify(this.entitiesClone)),this.initEntitiesTree(this.entities)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(KZ,!0),n.Kc(YZ,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.maarchTree=i.first))},decls:22,vars:14,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["fixedTopGap","56","position","end",2,"overflow-x","hidden","width","400px",3,"mode","fixedInViewport","opened"],["snav2",""],["mat-subheader",""],[2,"padding","10px"],[3,"afterSelectNode","afterDeselectNode"],["maarchTree",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],["class","alert-message alert-message-danger","role","alert","style","max-width: 100%",3,"innerHTML",4,"ngIf"],[1,"form-horizontal",3,"ngSubmit"],["shippingForm","ngForm"],[1,"form-group"],[1,"col-sm-12"],["matInput","","required","","name","label","id","label","type","text","maxlength","64",3,"ngModel","title","placeholder","ngModelChange"],["matInput","","required","","name","description","id","description","type","text","maxlength","255",3,"ngModel","title","placeholder","ngModelChange"],[1,"form-group",2,"flex-direction","row","flex-wrap","wrap"],[1,"formType","ratio-2","col-sm-12"],[1,"formType-title"],["role","list"],["role","listitem",4,"ngFor","ngForOf"],["class","alert-message alert-message-danger","role","alert","style","margin-top: 30px;max-width: none;",3,"innerHTML",4,"ngIf"],[1,"formType","ratio-1","col-sm-12"],["name","sendMode",1,"radio-group",3,"ngModel","ngModelChange"],["color","primary",3,"name","value",4,"ngFor","ngForOf"],[1,"formType","ratio-2",2,"flex-direction","column"],[1,"priceContent"],["for","firstPagePrice",1,"priceContent-label"],["appearance","outline"],["matInput","","required","","name","firstPagePrice","id","firstPagePrice","type","number","maxlength","255","min","0","step","0.1","pattern","^(?=.+)(?:[1-9]\\d*|0)?(?:\\.\\d+)?$",3,"ngModel","title","ngModelChange"],["matSuffix",""],["for","nextPagePrice",1,"priceContent-label"],["matInput","","required","","name","nextPagePrice","id","nextPagePrice","type","number","maxlength","255","min","0","step","0.1","pattern","^(?=.+)(?:[1-9]\\d*|0)?(?:\\.\\d+)?$",3,"ngModel","title","ngModelChange"],["for","postagePrice",1,"priceContent-label"],["matInput","","required","","name","postagePrice","id","postagePrice","type","number","maxlength","255","min","0","step","0.1","pattern","^(?=.+)(?:[1-9]\\d*|0)?(?:\\.\\d+)?$",3,"ngModel","title","ngModelChange"],[1,"formType","ratio-1",2,"flex-direction","column","justify-content","center"],[1,"alert-message","alert-message-info",2,"max-width","none"],["matInput","","required","","name","login","id","login","type","text","maxlength","255",3,"ngModel","title","placeholder","ngModelChange"],["name","password","matInput","",3,"type","ngModel","placeholder","required","ngModelChange"],["color","primary","matSuffix","","maxlength","255",1,"fa","fa-2x",2,"cursor","pointer",3,"ngClass","click"],[1,"form-group",2,"flex-direction","row","align-items","center"],[1,"col-sm-12","text-center",2,"padding","10px"],["mat-raised-button","","type","submit","color","primary",3,"disabled"],["mat-raised-button","","type","button","color","default",3,"disabled","click"],["role","alert",1,"alert-message","alert-message-danger",2,"max-width","100%",3,"innerHTML"],["role","listitem"],["color","primary",3,"name","checked","change"],["role","alert",1,"alert-message","alert-message-danger",2,"margin-top","30px","max-width","none",3,"innerHTML"],["color","primary",3,"name","value"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,JZ,2,0,"div",8),n.Oc(12,a1,88,81,"mat-card",9),n.Vb(),n.Vb(),n.Vb(),n.Wb(13,"mat-sidenav",10,11),n.Wb(15,"mat-list"),n.Wb(16,"h3",12),n.Qc(17),n.ic(18,"translate"),n.Vb(),n.Wb(19,"div",13),n.Wb(20,"app-maarch-flat-tree",14,15),n.dc("afterSelectNode",(function(){return e.updateSelectedEntities()}))("afterDeselectNode",(function(){return e.updateSelectedEntities()})),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",!e.appService.getViewMode()),n.Db(4),n.Rc(n.jc(18,12,"lang.chooseEntityAssociationModel")))},directives:[I.e,I.f,Ot,We,P.t,I.d,R.a,R.g,cQ,V.c,K.a,X.K,X.v,X.w,Y.c,J.b,X.d,X.F,X.p,X.u,X.x,P.s,hc.b,X.A,X.B,Y.j,S.a,P.q,k.b,R.d,te.a,hc.a],pipes:[g.d],styles:[".radio-group[_ngcontent-%COMP%]{display:inline-flex;flex-direction:column}.radio-group[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{padding:10px}.form-group[_ngcontent-%COMP%], .formType[_ngcontent-%COMP%]{display:flex}.formType[_ngcontent-%COMP%]{align-items:center;margin:10px;border-radius:4px;border:1px solid #ccc;position:relative;padding:10px}.formType-title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:-7px;left:10px;padding:0;margin:0;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-slide-toggle-label{color:#666;font-weight:700}.formType[_ngcontent-%COMP%] .mat-radio-button, .formType[_ngcontent-%COMP%] .mat-slide-toggle{opacity:.5;color:#666;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.formType[_ngcontent-%COMP%] .mat-checked, .formType[_ngcontent-%COMP%] .mat-radio-checked{opacity:1;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-checked .mat-slide-toggle-label{color:#135f7f}.formType[_ngcontent-%COMP%] .mat-form-field-suffix{color:#f99830;font-size:15px;top:0}.ratio-1[_ngcontent-%COMP%], .ratio-2[_ngcontent-%COMP%]{flex:1}.priceContent[_ngcontent-%COMP%]{display:flex;align-items:first baseline;width:100%}.priceContent-label[_ngcontent-%COMP%]{text-align:right;color:#135f7f;flex:1;justify-content:flex-end;display:flex;padding-right:10px}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:90px!important}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.priceInfo[_ngcontent-%COMP%]{font-size:10px;font-weight:700;opacity:.5}label[_ngcontent-%COMP%]{cursor:pointer}"]}),t})();const o1=["snav2"];function r1(t,e){1&t&&(n.Wb(0,"div",14),n.Rb(1,"mat-spinner",15),n.Vb())}function c1(t,e){1&t&&(n.Rb(0,"div",19),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.noCustomFieldInfo"),n.Ec)}function l1(t,e){if(1&t&&(n.Wb(0,"mat-option",33),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.value),n.Db(1),n.Sc(" ",n.jc(2,2,"lang."+t.label)," ")}}function d1(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",34),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).switchSQLMode(e)})),n.Rb(1,"mat-icon",35),n.Vb()}}function h1(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",44),n.dc("click",(function(){n.Dc(t);const e=n.hc(3).$implicit;return n.hc(2).sortValues(e)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",45),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.orderValues"))}function u1(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field",46),n.Wb(1,"input",47),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.label=i})),n.ic(2,"translate"),n.Vb(),n.Wb(3,"button",48),n.dc("click",(function(){n.Dc(t);const i=e.index,a=n.hc(3).$implicit;return n.hc(2).removeValue(a,i)})),n.ic(4,"translate"),n.Rb(5,"mat-icon",49),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.oc("ngModel",t.label)("placeholder",n.jc(2,3,"lang.newValue")),n.Db(2),n.oc("title",n.jc(4,5,"lang.delete"))}}function p1(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-expansion-panel",38),n.Wb(1,"mat-expansion-panel-header"),n.Wb(2,"mat-panel-title",39),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb(),n.Wb(5,"div",40),n.Wb(6,"div",36),n.Wb(7,"button",41),n.dc("click",(function(){n.Dc(t);const e=n.hc(2).index;return n.hc(2).addValue(e)})),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Vb(),n.Wb(10,"div"),n.Oc(11,h1,3,3,"button",42),n.Vb(),n.Vb(),n.Wb(12,"div",21),n.Oc(13,u1,6,7,"mat-form-field",43),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2).$implicit;n.Db(2),n.oc("matBadge",t.values.length),n.Db(1),n.Sc(" ",n.jc(4,5,"lang.valuesList")," "),n.Db(5),n.Sc(" ",n.jc(9,7,"lang.addValue"),""),n.Db(3),n.oc("ngIf",t.values.length>0),n.Db(2),n.oc("ngForOf",t.values)}}function b1(t,e){if(1&t&&(n.Wb(0,"div",36),n.Oc(1,p1,14,9,"mat-expansion-panel",37),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",!t.SQLMode)}}function f1(t,e){if(1&t&&(n.Ub(0),n.Qc(1),n.ic(2,"translate"),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Sc(" (",n.jc(2,1,"lang."+t.key),") ")}}function m1(t,e){if(1&t&&(n.Wb(0,"mat-option",33),n.Qc(1),n.Oc(2,f1,3,3,"ng-container",54),n.ic(3,"translate"),n.Vb()),2&t){const t=e.$implicit,i=n.hc(5);n.oc("value",t.key),n.Db(1),n.Sc(" ",t.key," "),n.Db(1),n.oc("ngIf",!i.functionsService.empty(n.jc(3,3,"lang."+t.key)))}}function g1(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span"),n.Wb(1,"input",62),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.delimiterStart=i})),n.Vb(),n.Wb(2,"mat-chip",63),n.dc("removed",(function(){n.Dc(t);const i=e.index,a=n.hc(4).$implicit;return n.hc(2).removeColumnLabel(a.values.label,i)})),n.Qc(3),n.Rb(4,"mat-icon",64),n.Vb(),n.Wb(5,"input",62),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.delimiterEnd=i})),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.Lc("width",8*(t.delimiterStart.length+1),"px"),n.oc("ngModel",t.delimiterStart),n.Db(2),n.Sc(" ",t.column," "),n.Db(2),n.Lc("width",8*(t.delimiterEnd.length+1),"px"),n.oc("ngModel",t.delimiterEnd)}}function v1(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",65),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc(4).$implicit;return n.hc(2).addColumnLabel(a.values.label,i)})),n.Qc(1),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.Rc(t)}}function _1(t,e){if(1&t&&(n.Wb(0,"div",56),n.Wb(1,"mat-label",57),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Oc(4,g1,6,7,"span",18),n.Wb(5,"button",58),n.Rb(6,"i",59),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Wb(9,"mat-menu",null,60),n.Oc(11,v1,2,1,"button",61),n.Vb(),n.Vb()),2&t){const t=n.zc(10),e=n.hc(3).$implicit,i=n.hc(2);n.Db(2),n.Sc(" ",n.jc(3,5,"lang.targetLabel")," *"),n.Db(2),n.oc("ngForOf",e.values.label),n.Db(1),n.oc("matMenuTriggerFor",t),n.Db(2),n.Sc(" ",n.jc(8,7,"lang.addColumn")," "),n.Db(4),n.oc("ngForOf",i.availaibleTables[e.values.table])}}function y1(t,e){if(1&t&&(n.Wb(0,"mat-option",33),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}function x1(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"mat-label"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-select",52),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(3).$implicit.values.key=e})),n.Oc(5,y1,2,2,"mat-option",25),n.Vb(),n.Vb()}if(2&t){const t=n.hc(3).$implicit,e=n.hc(2);n.Db(2),n.Rc(n.jc(3,3,"lang.targetIdentifier")),n.Db(2),n.oc("ngModel",t.values.key),n.Db(1),n.oc("ngForOf",e.availaibleTables[t.values.table])}}const C1=function(){return["string","integer","date"]};function O1(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-expansion-panel",38),n.Wb(1,"mat-expansion-panel-header"),n.Wb(2,"mat-panel-title"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb(),n.Wb(5,"div",21),n.Wb(6,"div",51),n.Wb(7,"mat-form-field"),n.Wb(8,"mat-label"),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Wb(11,"mat-select",52),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).$implicit.values.table=e})),n.Oc(12,m1,4,5,"mat-option",25),n.ic(13,"keyvalue"),n.Vb(),n.Vb(),n.Oc(14,_1,12,9,"div",53),n.Oc(15,x1,6,5,"mat-form-field",54),n.Vb(),n.Wb(16,"mat-form-field"),n.Wb(17,"mat-label"),n.Qc(18),n.ic(19,"translate"),n.Vb(),n.Wb(20,"textarea",55),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).$implicit.values.clause=e})),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2).$implicit,e=n.hc(2);n.Db(3),n.Sc(" ",n.jc(4,8,"lang.database")," "),n.Db(6),n.Rc(n.jc(10,10,"lang.targetTable")),n.Db(2),n.oc("ngModel",t.values.table),n.Db(1),n.oc("ngForOf",n.jc(13,12,e.availaibleTables)),n.Db(2),n.oc("ngIf",-1===n.uc(16,C1).indexOf(t.type)&&t.values.table),n.Db(1),n.oc("ngIf",t.values.table),n.Db(3),n.Rc(n.jc(19,14,"lang.clause")),n.Db(2),n.oc("ngModel",t.values.clause)}}function D1(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",26),n.Wb(1,"div"),n.Wb(2,"button",34),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).switchSQLMode(e)})),n.Rb(3,"mat-icon",50),n.Vb(),n.Vb(),n.Wb(4,"div",36),n.Oc(5,O1,21,17,"mat-expansion-panel",37),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(5),n.oc("ngIf",t.SQLMode)}}const w1=function(){return["banAutocomplete","contact"]},M1=function(){return["select","radio","checkbox"]};function k1(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-expansion-panel"),n.Wb(1,"mat-expansion-panel-header"),n.Wb(2,"mat-panel-title",20),n.Qc(3),n.Vb(),n.Wb(4,"mat-panel-description"),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Vb(),n.Wb(7,"div",21),n.Wb(8,"mat-form-field"),n.Wb(9,"input",22),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.id=i})),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Wb(11,"mat-form-field"),n.Wb(12,"input",23),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.label=i})),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Wb(14,"mat-form-field"),n.Wb(15,"mat-label"),n.Qc(16),n.ic(17,"translate"),n.Vb(),n.Wb(18,"mat-select",24),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.mode=i})),n.ic(19,"translate"),n.Oc(20,l1,3,4,"mat-option",25),n.Vb(),n.Wb(21,"mat-hint"),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(24,"div",26),n.Wb(25,"div"),n.Oc(26,d1,2,0,"button",27),n.Vb(),n.Oc(27,b1,2,1,"div",28),n.Vb(),n.Oc(28,D1,6,1,"div",29),n.Wb(29,"div",30),n.Wb(30,"button",31),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=e.index;return n.hc(2).updateCustomField(i,a)})),n.Qc(31),n.ic(32,"translate"),n.Vb(),n.Wb(33,"button",32),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc(2).removeCustomField(i)})),n.Qc(34),n.ic(35,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=e.index,a=n.hc(2);n.Db(3),n.Sc(" ",t.label," "),n.Db(2),n.Sc(" ",n.jc(6,19,"lang."+t.type+"Input")," "),n.Db(4),n.oc("ngModel",t.id)("placeholder",n.jc(10,21,"lang.technicalId"))("value",t.id),n.Db(3),n.oc("ngModel",t.label)("placeholder",n.jc(13,23,"lang.label"))("value",t.label),n.Db(4),n.Rc(n.jc(17,25,"lang.displayMode")),n.Db(2),n.pc("title",n.jc(19,27,"lang.displayMode")),n.oc("ngModel",t.mode),n.Db(2),n.oc("ngForOf",a.mode),n.Db(2),n.Sc(" ",n.jc(23,29,"lang."+t.mode+"Description")," "),n.Db(4),n.oc("ngIf",!t.SQLMode&&-1===n.uc(35,w1).indexOf(t.type)),n.Db(1),n.oc("ngIf",n.uc(36,M1).indexOf(t.type)>-1),n.Db(1),n.oc("ngIf",t.SQLMode),n.Db(2),n.oc("disabled",a.isModified(t,i)||!a.isValidField(t)),n.Db(1),n.Rc(n.jc(32,31,"lang.update")),n.Db(3),n.Rc(n.jc(35,33,"lang.delete"))}}function S1(t,e){if(1&t&&(n.Wb(0,"mat-card",16),n.Wb(1,"mat-tab-group"),n.Wb(2,"mat-tab",12),n.ic(3,"translate"),n.Oc(4,c1,2,3,"div",17),n.Wb(5,"mat-accordion"),n.Oc(6,k1,36,37,"mat-expansion-panel",18),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.oc("label",n.jc(3,3,"lang.usableFields")),n.Db(2),n.oc("ngIf",0===t.customFields.length),n.Db(2),n.oc("ngForOf",t.customFields)}}function I1(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-form-field",71),n.Rb(2,"textarea",72),n.ic(3,"translate"),n.Vb(),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(2),n.oc("placeholder",n.jc(3,1,"lang."+t.type+"Input"))}}function P1(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-form-field",71),n.Rb(2,"input",73),n.ic(3,"translate"),n.Vb(),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(2),n.oc("placeholder",n.jc(3,1,"lang."+t.type+"Input"))}}function V1(t,e){if(1&t&&(n.Wb(0,"mat-option",33),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Tc(" ",n.jc(2,3,"lang.choice")," ",t," ")}}function R1(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-form-field",71),n.Wb(2,"mat-select",74),n.ic(3,"translate"),n.Oc(4,V1,3,5,"mat-option",25),n.Vb(),n.Vb(),n.Tb()),2&t){const t=n.hc().$implicit,e=n.hc();n.Db(2),n.oc("placeholder",n.jc(3,2,"lang."+t.type+"Input")),n.Db(2),n.oc("ngForOf",e.sampleIncrement)}}function j1(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"mat-form-field",71),n.Wb(2,"input",75),n.dc("click",(function(){return n.Dc(t),n.zc(6).open()})),n.ic(3,"translate"),n.Vb(),n.Rb(4,"mat-datepicker-toggle",76),n.Rb(5,"mat-datepicker",null,77),n.Vb(),n.Tb()}if(2&t){const t=n.zc(6),e=n.hc().$implicit;n.Db(2),n.oc("matDatepicker",t)("placeholder",n.jc(3,3,"lang."+e.type+"Input")),n.Db(2),n.oc("for",t)}}function A1(t,e){if(1&t&&(n.Wb(0,"mat-radio-button",33),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Tc(" ",n.jc(2,3,"lang.choice")," ",t," ")}}function W1(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-radio-group",78),n.Oc(2,A1,3,5,"mat-radio-button",25),n.Vb(),n.Tb()),2&t){const t=n.hc(2);n.Db(2),n.oc("ngForOf",t.sampleIncrement)}}function T1(t,e){if(1&t&&(n.Wb(0,"mat-list-option",84),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Tc(" ",n.jc(2,3,"lang.choice")," ",t," ")}}function E1(t,e){1&t&&(n.Wb(0,"mat-chip"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.selectedValue")," "))}function F1(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div",79),n.Wb(2,"mat-selection-list",80,81),n.Oc(4,T1,3,5,"mat-list-option",82),n.Vb(),n.Vb(),n.Wb(5,"mat-chip-list",83),n.Oc(6,E1,3,3,"mat-chip",18),n.Vb(),n.Tb()),2&t){const t=n.zc(3),e=n.hc(2);n.Db(4),n.oc("ngForOf",e.sampleIncrement),n.Db(2),n.oc("ngForOf",t.selectedOptions.selected)}}const L1=function(){return["string","banAutocomplete","contact"]};function Q1(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",66),n.Wb(1,"div",67),n.Wb(2,"button",68),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().addCustomField(i)})),n.ic(3,"translate"),n.Rb(4,"mat-icon",69),n.Vb(),n.Vb(),n.Wb(5,"div",36),n.Wb(6,"div",70),n.Qc(7),n.Vb(),n.Oc(8,I1,4,3,"ng-container",54),n.Oc(9,P1,4,3,"ng-container",54),n.Oc(10,R1,5,4,"ng-container",54),n.Oc(11,j1,7,5,"ng-container",54),n.Oc(12,W1,3,1,"ng-container",54),n.Oc(13,F1,7,2,"ng-container",54),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(2),n.oc("title",n.jc(3,8,"lang.add")),n.Db(5),n.Sc("",t.label," :"),n.Db(1),n.oc("ngIf",n.uc(10,L1).indexOf(t.type)>-1),n.Db(1),n.oc("ngIf","integer"===t.type),n.Db(1),n.oc("ngIf","select"===t.type),n.Db(1),n.oc("ngIf","date"===t.type),n.Db(1),n.oc("ngIf","radio"===t.type),n.Db(1),n.oc("ngIf","checkbox"===t.type)}}let N1=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.dialog=n,this.headerService=a,this.appService=s,this.sortPipe=o,this.functionsService=r,this.loading=!0,this.idTable=[],this.customFieldsTypes=[{label:this.translate.instant("lang.stringInput"),type:"string"},{label:this.translate.instant("lang.integerInput"),type:"integer"},{label:this.translate.instant("lang.selectInput"),type:"select"},{label:this.translate.instant("lang.dateInput"),type:"date"},{label:this.translate.instant("lang.radioInput"),type:"radio"},{label:this.translate.instant("lang.checkboxInput"),type:"checkbox"},{label:this.translate.instant("lang.banAutocompleteInput"),type:"banAutocomplete"},{label:this.translate.instant("lang.contactInput"),type:"contact"}],this.customFields=[],this.customFieldsClone=[],this.mode=[{label:"displayInForm",value:"form"},{label:"displayAsTechnicalData",value:"technical"}],this.incrementCreation=1,this.sampleIncrement=[1,2,3,4],this.SQLMode=!1,this.availaibleTables={}}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.customFieldsAdmin")),this.getTables(),this.http.get("../rest/customFields?admin=true").pipe(Object(l.a)(t=>(t.customFields.forEach(t=>{this.functionsService.empty(t.values.key)?(t.SQLMode=!1,t.values=Object.values(t.values).map(t=>({label:t}))):t.SQLMode=!0;const e=t.label;if(e.includes(this.translate.instant("lang.newField"))){let t=e.substr(this.translate.instant("lang.newField").length+1);isNaN(Number(t))||(this.idTable.push(t),this.incrementCreation=Math.max(...this.idTable)+1)}}),t)),Object(mt.a)(t=>{this.customFields=t.customFields,this.customFieldsClone=JSON.parse(JSON.stringify(this.customFields))}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}addCustomField(t){let e={};this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.add"),msg:this.translate.instant("lang.confirmAction")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{e={label:this.translate.instant("lang.newField")+" "+this.incrementCreation,type:t.type,values:[],mode:"form"}}),p(t=>this.http.post("../rest/customFields",e)),Object(mt.a)(t=>{e.id=t.customFieldId,this.customFields.push(e),this.notify.success(this.translate.instant("lang.customFieldAdded")),this.incrementCreation++}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}addValue(t){this.customFields[t].values.push({label:""})}removeValue(t,e){t.values.splice(e,1)}removeCustomField(t){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete")+' "'+this.customFields[t].label+'"',msg:this.translate.instant("lang.confirmAction")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete("../rest/customFields/"+this.customFields[t].id)),Object(mt.a)(()=>{this.customFields.splice(t,1),this.notify.success(this.translate.instant("lang.customFieldDeleted"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}updateCustomField(t,e){const i=Object.assign({},t);if(t.SQLMode)["string","integer","date"].indexOf(t.type)>-1&&(t.values.label=[{column:t.values.key,delimiterEnd:"",delimiterStart:""}]);else if(t.values=t.values.filter((t,e,i)=>i.map(t=>t.label).indexOf(t.label)===e),i.values=t.values.map(t=>t.label),this.customFields.filter(t=>t.label===i.label).length>1)return this.notify.handleErrors(this.translate.instant("lang.customFieldAlreadyExists")),Object(c.a)(!1);this.http.put("../rest/customFields/"+t.id,i).pipe(Object(mt.a)(()=>{this.customFieldsClone[e]=JSON.parse(JSON.stringify(t)),this.notify.success(this.translate.instant("lang.customFieldUpdated"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}sortValues(t){t.values=this.sortPipe.transform(t.values,"label")}isModified(t,e){return!(JSON.stringify(t)!==JSON.stringify(this.customFieldsClone[e])&&""!==t.label&&!this.SQLMode&&""!==t.mode)}switchSQLMode(t){t.SQLMode=!t.SQLMode,t.values=t.SQLMode?{key:"id",label:[{column:"id",delimiterEnd:"",delimiterStart:""}],table:"users",clause:"1=1"}:[]}getTables(){this.http.get("../rest/customFieldsWhiteList").pipe(Object(mt.a)(t=>{t.allowedTables.forEach(t=>{this.availaibleTables[t.name]=t.columns})}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}addColumnLabel(t,e){t.push({delimiterStart:"",delimiterEnd:"",column:e})}removeColumnLabel(t,e){t.splice(e,1)}isValidField(t){return!t.SQLMode||!(this.functionsService.empty(t.values.key)||this.functionsService.empty(t.values.label)||this.functionsService.empty(t.values.table)||this.functionsService.empty(t.values.clause))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(y.a),n.Qb(w.a),n.Qb(Wt.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(o1,!0),2&t&&n.yc(i=n.ec())&&(e.sidenavRight=i.first)},features:[n.Cb([Wt.a])],decls:19,vars:14,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["fixedTopGap","56","position","end","opened","",1,"col-md-4","col-sm-12","customFielsdPanel",3,"mode","fixedInViewport"],["snav2",""],[3,"label"],["class","customFieldsTypesItem",4,"ngFor","ngForOf"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],["class","alert-message alert-message-info","role","alert",3,"innerHTML",4,"ngIf"],[4,"ngFor","ngForOf"],["role","alert",1,"alert-message","alert-message-info",3,"innerHTML"],["color","primary"],[1,"col-md-12"],["matInput","","name","id","disabled","",3,"ngModel","placeholder","value","ngModelChange"],["matInput","","name","label",3,"ngModel","placeholder","value","ngModelChange"],["name","mode",3,"title","ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"col-md-12",2,"display","flex","align-items","center"],["mat-mini-fab","","color","primary",3,"click",4,"ngIf"],["style","flex:1;",4,"ngIf"],["class","col-md-12","style","display: flex;align-items: center;",4,"ngIf"],[1,"col-md-12","text-center"],["mat-raised-button","","color","primary",3,"disabled","click"],["mat-raised-button","","color","warn",3,"click"],[3,"value"],["mat-mini-fab","","color","primary",3,"click"],[1,"fas","fa-database",2,"height","auto"],[2,"flex","1"],["class","customFieldValues","opened","",4,"ngIf"],["opened","",1,"customFieldValues"],["matBadgeSize","small",3,"matBadge"],[1,"actionValuesCustom"],["mat-raised-button","","color","primary",3,"click"],["mat-mini-fab","","color","default",3,"title","click",4,"ngIf"],["floatLabel","never",4,"ngFor","ngForOf"],["mat-mini-fab","","color","default",3,"title","click"],["color","primary",1,"fas","fa-sort-alpha-down",2,"height","auto"],["floatLabel","never"],["matInput","",3,"ngModel","placeholder","ngModelChange"],["color","warn","mat-icon-button","","matSuffix","",3,"title","click"],[1,"fa","fa-trash"],[1,"fas","fa-list-ol",2,"height","auto"],[2,"display","flex","flex-direction","column"],["required","",3,"ngModel","ngModelChange"],["style","width:100%;padding-bottom: 20px;",4,"ngIf"],[4,"ngIf"],["matInput","","placeholder","Ex. status='OK'","required","",3,"ngModel","ngModelChange"],[2,"width","100%","padding-bottom","20px"],[2,"font-size","75%","color","rgba(0,0,0,0.54)","width","100%","display","block"],["mat-button","","color","primary",3,"matMenuTriggerFor"],[1,"fa","fa-plus-circle"],["menu","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],[2,"min-width","8px",3,"ngModel","ngModelChange"],[3,"removed"],["matChipRemove","",1,"fa","fa-times-circle"],["mat-menu-item","",3,"click"],[1,"customFieldsTypesItem"],[1,"addCustomFieldTypeContainer"],["mat-icon-button","","color","primary",3,"title","click"],[1,"fas","fa-plus-circle","fa-2x"],[2,"color","rgba(0,0,0,0.54)"],["floatLabel","never",1,"input-form"],["matInput","","matTextareaAutosize","","matAutosizeMinRows","1","cdkAutosizeMaxRows","6","disabled","",3,"placeholder"],["type","number","matInput","","disabled","",3,"placeholder"],["disabled","",3,"placeholder"],["matInput","","disabled","",3,"matDatepicker","placeholder","click"],["matSuffix","",3,"for"],["picker",""],["color","primary","disabled","",1,"radio-form"],[1,"input-form","checkbox-form"],["disabled","",1,"div-list"],["sampleList",""],["checkboxPosition","before",3,"value",4,"ngFor","ngForOf"],[1,"checkbox-selected-list"],["checkboxPosition","before",3,"value"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,r1,2,0,"div",8),n.Oc(12,S1,7,5,"mat-card",9),n.Vb(),n.Vb(),n.Vb(),n.Wb(13,"mat-sidenav",10,11),n.Wb(15,"mat-tab-group"),n.Wb(16,"mat-tab",12),n.ic(17,"translate"),n.Oc(18,Q1,14,11,"div",13),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode()),n.Db(3),n.oc("label",n.jc(17,12,"lang.customFieldsTypesAvailable")),n.Db(2),n.oc("ngForOf",e.customFieldsTypes))},directives:[I.e,I.f,Ot,We,P.t,I.d,Te.c,Te.a,P.s,V.c,K.a,gt.a,gt.c,gt.g,gt.h,gt.f,Y.c,J.b,X.d,X.u,X.x,Y.g,ee.a,Y.f,k.b,W.p,S.a,wt.a,Y.j,X.F,ne.d,ne.e,ze.a,ze.e,ne.b,J.d,ae.h,ae.j,ae.f,hc.b,hc.a,R.i,ze.d,R.f],pipes:[g.d,P.l],styles:[".mat-divider[_ngcontent-%COMP%]{padding-top:10px;padding-bottom:10px}.customFielsdPanel[_ngcontent-%COMP%], .customFielsdPanel[_ngcontent-%COMP%] .mat-tab-body-wrapper{padding-left:0}.mat-expansion-panel-header-description[_ngcontent-%COMP%]{flex-direction:row-reverse}.customFieldValues[_ngcontent-%COMP%]{box-shadow:none;border:1px solid rgba(0,0,0,.12)}.mat-expansion-panel[_ngcontent-%COMP%]{margin:5px}.mat-accordion[_ngcontent-%COMP%]{padding:5px}.mat-tab-body-content[_ngcontent-%COMP%], .mat-tab-body-wrapper[_ngcontent-%COMP%], .mat-tab-group[_ngcontent-%COMP%]{height:100%}.actionsCustomFields[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.actionValuesCustom[_ngcontent-%COMP%]{display:flex}.alert-message-info[_ngcontent-%COMP%]{margin-top:30px;max-width:100%}.addCustomFieldTypeContainer[_ngcontent-%COMP%]{justify-content:center;display:flex;align-items:center;width:60px}.customFieldsTypesItem[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.mat-badge-content[_ngcontent-%COMP%]{top:2px!important}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();function z1(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-form-field",13),n.Rb(2,"textarea",14),n.ic(3,"translate"),n.Vb(),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(2),n.oc("placeholder",n.jc(3,1,"lang."+t.type+"Input"))}}function B1(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-form-field",13),n.Rb(2,"input",15),n.ic(3,"translate"),n.Vb(),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(2),n.oc("placeholder",n.jc(3,1,"lang."+t.type+"Input"))}}function U1(t,e){if(1&t&&(n.Wb(0,"mat-option",18),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}function $1(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-form-field",13),n.Wb(2,"mat-select",16),n.ic(3,"translate"),n.Oc(4,U1,2,2,"mat-option",17),n.Vb(),n.Vb(),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(2),n.oc("placeholder",n.jc(3,2,"lang."+t.type+"Input")),n.Db(2),n.oc("ngForOf",t.values)}}function H1(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"mat-form-field",13),n.Wb(2,"input",19),n.dc("click",(function(){return n.Dc(t),n.zc(6).open()})),n.ic(3,"translate"),n.Vb(),n.Rb(4,"mat-datepicker-toggle",20),n.Rb(5,"mat-datepicker",null,21),n.Vb(),n.Tb()}if(2&t){const t=n.zc(6),e=n.hc().$implicit;n.Db(2),n.oc("matDatepicker",t)("placeholder",n.jc(3,3,"lang."+e.type+"Input")),n.Db(2),n.oc("for",t)}}function G1(t,e){if(1&t&&(n.Wb(0,"mat-radio-button",18),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function X1(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-radio-group",22),n.Oc(2,G1,2,2,"mat-radio-button",17),n.Vb(),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(2),n.oc("ngForOf",t.values)}}function q1(t,e){if(1&t&&(n.Wb(0,"mat-list-option",29),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function K1(t,e){1&t&&(n.Wb(0,"mat-chip",30),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.selectedValue")," "))}function Y1(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div",23),n.Wb(2,"mat-selection-list",24,25),n.Oc(4,q1,2,2,"mat-list-option",26),n.Vb(),n.Vb(),n.Wb(5,"mat-chip-list",27),n.Oc(6,K1,3,3,"mat-chip",28),n.Vb(),n.Tb()),2&t){const t=n.zc(3),e=n.hc().$implicit;n.Db(4),n.oc("ngForOf",e.values),n.Db(2),n.oc("ngForOf",t.selectedOptions.selected)}}const J1=function(){return["string","autocomplete","banAutocomplete","contact"]};function Z1(t,e){if(1&t&&(n.Wb(0,"div",4),n.Wb(1,"div",5),n.Rb(2,"i",6),n.Vb(),n.Wb(3,"div",7),n.Wb(4,"div",8),n.Qc(5),n.Vb(),n.Wb(6,"div",9),n.Oc(7,z1,4,3,"ng-container",10),n.Oc(8,B1,4,3,"ng-container",10),n.Oc(9,$1,5,4,"ng-container",10),n.Oc(10,H1,7,5,"ng-container",10),n.Oc(11,X1,3,1,"ng-container",10),n.Oc(12,Y1,7,2,"ng-container",10),n.Vb(),n.Wb(13,"div",11),n.Rb(14,"i",12),n.Vb(),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.oc("cdkDragData",t),n.Db(4),n.oc("id",t.identifier),n.Db(1),n.Sc(" ",t.label," "),n.Db(1),n.Ib("advancedInput","checkbox"===t.type),n.Db(1),n.oc("ngIf",n.uc(13,J1).indexOf(t.type)>-1),n.Db(1),n.oc("ngIf","integer"===t.type),n.Db(1),n.oc("ngIf","select"===t.type),n.Db(1),n.oc("ngIf","date"===t.type),n.Db(1),n.oc("ngIf","radio"===t.type),n.Db(1),n.oc("ngIf","checkbox"===t.type),n.Db(2),n.Ib("noMandatory",!t.mandatory)}}const t0=function(){return["indexingModelsCustomFieldsList_mail","indexingModelsCustomFieldsList_contact","indexingModelsCustomFieldsList_process","indexingModelsCustomFieldsList_classifying"]};function e0(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",2),n.dc("cdkDropListDropped",(function(e){return n.Dc(t),n.hc().drop(e)})),n.Oc(1,Z1,15,14,"div",3),n.ic(2,"sortBy"),n.Vb()}if(2&t){const t=n.hc();n.oc("cdkDropListConnectedTo",n.uc(6,t0))("cdkDropListData",t.dataCustomFields),n.Db(1),n.oc("ngForOf",n.kc(2,3,t.dataCustomFields,"label"))}}function i0(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-form-field",13),n.Rb(2,"textarea",14),n.ic(3,"translate"),n.Vb(),n.Tb()),2&t){const t=n.hc(2).$implicit;n.Db(2),n.oc("placeholder",n.jc(3,1,"lang."+t.type+"Input"))}}function n0(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-form-field",13),n.Rb(2,"input",15),n.ic(3,"translate"),n.Vb(),n.Tb()),2&t){const t=n.hc(2).$implicit;n.Db(2),n.oc("placeholder",n.jc(3,1,"lang."+t.type+"Input"))}}function a0(t,e){if(1&t&&(n.Wb(0,"mat-option",18),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}function s0(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-form-field",13),n.Wb(2,"mat-select",16),n.ic(3,"translate"),n.Oc(4,a0,2,2,"mat-option",17),n.Vb(),n.Vb(),n.Tb()),2&t){const t=n.hc(2).$implicit;n.Db(2),n.oc("placeholder",n.jc(3,2,"lang."+t.type+"Input")),n.Db(2),n.oc("ngForOf",t.values)}}function o0(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"mat-form-field",13),n.Wb(2,"input",19),n.dc("click",(function(){return n.Dc(t),n.zc(6).open()})),n.ic(3,"translate"),n.Vb(),n.Rb(4,"mat-datepicker-toggle",20),n.Rb(5,"mat-datepicker",null,21),n.Vb(),n.Tb()}if(2&t){const t=n.zc(6),e=n.hc(2).$implicit;n.Db(2),n.oc("matDatepicker",t)("placeholder",n.jc(3,3,"lang."+e.type+"Input")),n.Db(2),n.oc("for",t)}}function r0(t,e){if(1&t&&(n.Wb(0,"mat-radio-button",18),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function c0(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-radio-group",22),n.Oc(2,r0,2,2,"mat-radio-button",17),n.Vb(),n.Tb()),2&t){const t=n.hc(2).$implicit;n.Db(2),n.oc("ngForOf",t.values)}}function l0(t,e){if(1&t&&(n.Wb(0,"mat-list-option",29),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function d0(t,e){1&t&&(n.Wb(0,"mat-chip",30),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.selectedValue")," "))}function h0(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div",23),n.Wb(2,"mat-selection-list",24,38),n.Oc(4,l0,2,2,"mat-list-option",26),n.Vb(),n.Vb(),n.Wb(5,"mat-chip-list",27),n.Oc(6,d0,3,3,"mat-chip",28),n.Vb(),n.Tb()),2&t){const t=n.zc(3),e=n.hc(2).$implicit;n.Db(4),n.oc("ngForOf",e.values),n.Db(2),n.oc("ngForOf",t.selectedOptions.selected)}}function u0(t,e){if(1&t&&(n.Wb(0,"div",35),n.Wb(1,"div",36),n.Rb(2,"i",37),n.Vb(),n.Wb(3,"div",7),n.Wb(4,"div",8),n.Qc(5),n.Vb(),n.Wb(6,"div",9),n.Oc(7,i0,4,3,"ng-container",10),n.Oc(8,n0,4,3,"ng-container",10),n.Oc(9,s0,5,4,"ng-container",10),n.Oc(10,o0,7,5,"ng-container",10),n.Oc(11,c0,3,1,"ng-container",10),n.Oc(12,h0,7,2,"ng-container",10),n.Vb(),n.Wb(13,"div",11),n.Rb(14,"i",12),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(4),n.oc("id",t.identifier),n.Db(1),n.Sc(" ",t.label," "),n.Db(2),n.oc("ngIf","string"===t.type||"autocomplete"===t.type),n.Db(1),n.oc("ngIf","integer"===t.type),n.Db(1),n.oc("ngIf","select"===t.type),n.Db(1),n.oc("ngIf","date"===t.type),n.Db(1),n.oc("ngIf","radio"===t.type),n.Db(1),n.oc("ngIf","checkbox"===t.type),n.Db(2),n.Ib("noMandatory",!t.mandatory)}}function p0(t,e){if(1&t&&(n.Wb(0,"div",33),n.Oc(1,u0,15,10,"div",34),n.Vb()),2&t){const t=e.$implicit;n.oc("cdkDragData",t),n.Db(1),n.oc("ngIf",-1===t.identifier.indexOf("registeredMail_"))}}function b0(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",31),n.dc("cdkDropListDropped",(function(e){return n.Dc(t),n.hc().drop(e)})),n.Oc(1,p0,2,2,"div",32),n.ic(2,"sortBy"),n.Vb()}if(2&t){const t=n.hc();n.oc("cdkDropListConnectedTo",n.uc(6,t0))("cdkDropListData",t.dataFields),n.Db(1),n.oc("ngForOf",n.kc(2,3,t.dataFields,"label"))}}let f0=(()=>{class t{constructor(t,e,i,n){this.translate=t,this.http=e,this.dialog=i,this.appService=n,this.loading=!1}ngOnInit(){}drop(t){t.item.data.unit=t.container.id.split("_")[1],t.previousContainer===t.container?Object(lo.h)(t.container.data,t.previousIndex,t.currentIndex):Object(lo.i)(t.previousContainer.data,t.container.data,t.previousIndex,t.currentIndex)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.b),n.Qb(w.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-field-list"]],inputs:{dataCustomFields:"dataCustomFields",dataFields:"dataFields"},features:[n.Cb([Wt.a])],decls:2,vars:2,consts:[["class","content","cdkDropList","","id","customFieldsList",3,"cdkDropListConnectedTo","cdkDropListData","cdkDropListDropped",4,"ngIf"],["class","content","cdkDropList","","id","fieldsList",3,"cdkDropListConnectedTo","cdkDropListData","cdkDropListDropped",4,"ngIf"],["cdkDropList","","id","customFieldsList",1,"content",3,"cdkDropListConnectedTo","cdkDropListData","cdkDropListDropped"],["class","customFieldRow","cdkDrag","",3,"cdkDragData",4,"ngFor","ngForOf"],["cdkDrag","",1,"customFieldRow",3,"cdkDragData"],[1,"customFieldDrag"],["color","primary","cdkDragHandle","",1,"fas","fa-arrows-alt","fa-2x"],[2,"flex","1","display","flex"],[1,"fieldLabel",3,"id"],[1,"fieldInput"],[4,"ngIf"],[1,"fieldState"],[1,"fas","fa-asterisk"],["floatLabel","never",1,"input-form"],["matInput","","matTextareaAutosize","","matAutosizeMinRows","1","cdkAutosizeMaxRows","6","disabled","",3,"placeholder"],["type","number","matInput","","disabled","",3,"placeholder"],["disabled","",3,"placeholder"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["matInput","","disabled","",3,"matDatepicker","placeholder","click"],["matSuffix","",3,"for"],["picker",""],["color","primary","disabled","",1,"radio-form"],[1,"input-form","checkbox-form"],["disabled","",1,"div-list"],["checkboxCustomElement",""],["checkboxPosition","before",3,"value",4,"ngFor","ngForOf"],[1,"checkbox-selected-list"],["selected","",4,"ngFor","ngForOf"],["checkboxPosition","before",3,"value"],["selected",""],["cdkDropList","","id","fieldsList",1,"content",3,"cdkDropListConnectedTo","cdkDropListData","cdkDropListDropped"],["cdkDrag","",3,"cdkDragData",4,"ngFor","ngForOf"],["cdkDrag","",3,"cdkDragData"],["class","customFieldRow",4,"ngIf"],[1,"customFieldRow"],["cdkDragHandle","",1,"customFieldDrag"],["color","primary",1,"fas","fa-arrows-alt","fa-2x"],["checkboxElement",""]],template:function(t,e){1&t&&(n.Oc(0,e0,3,7,"div",0),n.Oc(1,b0,3,7,"div",1)),2&t&&(n.oc("ngIf",void 0!==e.dataCustomFields),n.Db(1),n.oc("ngIf",void 0!==e.dataFields))},directives:[P.t,lo.e,P.s,lo.a,lo.b,Y.c,J.b,J.d,ee.a,W.p,ae.h,ae.j,Y.j,ae.f,hc.b,hc.a,R.i,ze.d,R.f,ze.a],pipes:[Wt.a,g.d],styles:["div[id^=registeredMail_][_ngcontent-%COMP%]{color:orange}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();const m0=["snav2"],g0=["indexingForm"];function v0(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Vb())}function _0(t,e){if(1&t&&(n.Wb(0,"mat-option",30),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function y0(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",17),n.Wb(1,"div",18),n.Wb(2,"mat-form-field"),n.Wb(3,"mat-label"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Wb(6,"mat-select",19),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().indexingModel.category=e}))("selectionChange",(function(e){return n.Dc(t),n.hc().changeCategory(e)})),n.ic(7,"translate"),n.Oc(8,_0,2,2,"mat-option",20),n.Vb(),n.Vb(),n.Vb(),n.Wb(9,"div",18),n.Wb(10,"div",21),n.Wb(11,"mat-form-field",22),n.Wb(12,"mat-label"),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Wb(15,"input",23),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().indexingModel.label=e})),n.Vb(),n.Vb(),n.Vb(),n.Wb(16,"div",24),n.Wb(17,"mat-slide-toggle",25),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().indexingModel.default=e})),n.Qc(18),n.ic(19,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(20,"mat-tab-group"),n.Wb(21,"mat-tab",12),n.ic(22,"translate"),n.Rb(23,"app-indexing-form",26,27),n.Wb(25,"div",28),n.Wb(26,"button",29),n.dc("click",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Qc(27),n.ic(28,"translate"),n.ic(29,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(24),e=n.hc();n.Db(4),n.Rc(n.jc(5,13,"lang.category_id")),n.Db(2),n.oc("ngModel",e.indexingModel.category)("placeholder",n.jc(7,15,"lang.category_id")),n.Db(2),n.oc("ngForOf",e.categoriesList),n.Db(5),n.Rc(n.jc(14,17,"lang.modelName")),n.Db(2),n.oc("ngModel",e.indexingModel.label),n.Db(2),n.oc("ngModel",e.indexingModel.default),n.Db(1),n.Sc(" ",n.jc(19,19,"lang.defaultModel")," "),n.Db(3),n.oc("label",n.jc(22,21,"lang.indexingForm")),n.Db(2),n.oc("indexingFormId",e.indexingModel.id)("admin",!0),n.Db(3),n.oc("disabled",!t.isModified()&&!e.isModified()||""===e.indexingModel.label),n.Db(1),n.Rc(e.creationMode?n.jc(28,23,"lang.save"):n.jc(29,25,"lang.update"))}}function x0(t,e){if(1&t&&n.Rb(0,"app-field-list",31),2&t){const t=n.hc();n.oc("dataFields",t.indexingForm.getAvailableFields())}}function C0(t,e){if(1&t&&n.Rb(0,"app-field-list",32),2&t){const t=n.hc();n.oc("dataCustomFields",t.indexingForm.getAvailableCustomFields())}}let O0=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.route=i,this.router=n,this.notify=a,this.dialog=s,this.headerService=o,this.appService=r,this.loading=!0,this.indexingModel={id:0,label:"",category:"incoming",default:!1,owner:0,private:!1},this.indexingModelsCustomFields=[],this.creationMode=!0}ngOnInit(){this.route.params.subscribe(t=>{void 0===t.id?(this.creationMode=!0,this.headerService.setHeader(this.translate.instant("lang.indexingModelCreation")),this.http.get("../rest/categories").pipe(Object(mt.a)(t=>{this.categoriesList=t.categories}),Object(mt.a)(t=>{this.loading=!1,setTimeout(()=>{this.indexingForm.changeCategory(this.indexingModel.category)},0)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe(),this.indexingModelClone=JSON.parse(JSON.stringify(this.indexingModel))):(this.creationMode=!1,this.http.get("../rest/indexingModels/"+t.id).pipe(Object(mt.a)(t=>{this.indexingModel=t.indexingModel,this.headerService.setHeader(this.translate.instant("lang.indexingModelModification"),this.indexingModel.label),this.indexingModelClone=JSON.parse(JSON.stringify(this.indexingModel))}),p(()=>this.http.get("../rest/categories")),Object(mt.a)(t=>{this.categoriesList=t.categories}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe())})}onSubmit(){const t=this.indexingForm.getDatas();t.forEach((e,i)=>{t[i].default_value=["string","integer","date"].indexOf(t[i].type)>-1&&t[i].SQLMode?null:t[i].default_value,delete t[i].event,delete t[i].label,delete t[i].system,delete t[i].type,delete t[i].values}),this.indexingModel.fields=t,this.creationMode?this.http.post("../rest/indexingModels",this.indexingModel).pipe(Object(mt.a)(t=>{this.indexingForm.setModification(),this.setModification(),this.router.navigate(["/administration/indexingModels"]),this.notify.success(this.translate.instant("lang.indexingModelAdded"))}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe():this.http.put("../rest/indexingModels/"+this.indexingModel.id,this.indexingModel).pipe(Object(mt.a)(t=>{this.indexingForm.setModification(),this.setModification(),this.router.navigate(["/administration/indexingModels"]),this.notify.success(this.translate.instant("lang.indexingModelUpdated"))}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}isModified(){let t="",e="";return t=JSON.stringify(this.indexingModel),e=JSON.stringify(this.indexingModelClone),t!==e}setModification(){this.indexingModelClone=JSON.parse(JSON.stringify(this.indexingModel))}changeCategory(t){this.indexingForm.changeCategory(t.value)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(q.b),n.Qb(y.a),n.Qb(w.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(m0,!0),n.Xc(g0,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.indexingForm=i.first))},features:[n.Cb([w.a,Wt.a])],decls:22,vars:18,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["fixedTopGap","56","position","end","opened","",1,"col-md-4","col-sm-12",3,"mode","fixedInViewport"],["snav2",""],[3,"label"],[3,"dataFields",4,"ngIf"],[3,"dataCustomFields",4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[2,"display","flex"],["name","category","required","",3,"ngModel","placeholder","ngModelChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[2,"flex","1"],["appearance","outline",1,"indexingModelLabel"],["matInput","","name","label",3,"ngModel","ngModelChange"],[1,"defaultModel"],["color","primary","name","default",3,"ngModel","ngModelChange"],[3,"indexingFormId","admin"],["indexingForm",""],[1,"col-md-12","text-center"],["mat-raised-button","","color","primary",3,"disabled","click"],[3,"value"],[3,"dataFields"],[3,"dataCustomFields"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,v0,2,0,"div",8),n.Oc(12,y0,30,27,"mat-card",9),n.Vb(),n.Vb(),n.Vb(),n.Wb(13,"mat-sidenav",10,11),n.Wb(15,"mat-tab-group"),n.Wb(16,"mat-tab",12),n.ic(17,"translate"),n.Oc(18,x0,1,1,"app-field-list",13),n.Vb(),n.Wb(19,"mat-tab",12),n.ic(20,"translate"),n.Oc(21,C0,1,1,"app-field-list",14),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode()),n.Db(3),n.oc("label",n.jc(17,14,"lang.availableFields")),n.Db(2),n.oc("ngIf",void 0!==e.indexingForm),n.Db(1),n.oc("label",n.jc(20,16,"lang.availableCustomFields")),n.Db(2),n.oc("ngIf",void 0!==e.indexingForm))},directives:[I.e,I.f,Ot,We,P.t,I.d,Te.c,Te.a,V.c,K.a,Y.c,Y.g,ee.a,X.F,X.u,X.x,P.s,J.b,X.d,te.a,qT,k.b,W.p,f0],pipes:[g.d],styles:[".indexingModelLabel[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.defaultModel[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding-left:10px}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();function D0(t,e){1&t&&(n.Ub(0),n.Rb(1,"mat-spinner",9),n.Tb())}function w0(t,e){1&t&&(n.Ub(0),n.Rb(1,"div",11),n.ic(2,"translate"),n.Tb()),2&t&&(n.Db(1),n.oc("innerHTML",n.jc(2,1,"lang.confirmAction"),n.Ec))}function M0(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Wb(5,"b"),n.Qc(6),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.count),n.Db(1),n.Sc(" ",n.jc(4,3,"lang.mailsWithStatus")," "),n.Db(3),n.Rc(t.status)}}function k0(t,e){if(1&t&&(n.Wb(0,"mat-option",18),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(3);n.oc("value",t.id)("disabled",t.id===i.mainIndexingModel.id),n.Db(1),n.Sc(" ",t.label," ")}}function S0(t,e){if(1&t&&(n.Wb(0,"li"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.label," ")}}function I0(t,e){if(1&t&&(n.Wb(0,"div",19),n.Qc(1),n.ic(2,"translate"),n.Wb(3,"ul"),n.Oc(4,S0,2,1,"li",13),n.Vb(),n.Qc(5),n.ic(6,"translate"),n.Vb()),2&t){const t=n.hc(3);n.Db(1),n.Sc(" ",n.jc(2,3,"lang.indexingModelFieldsReset")," "),n.Db(3),n.oc("ngForOf",t.resetFields),n.Db(1),n.Sc(" ",n.jc(6,5,"lang.confirmAction")," ")}}function P0(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",12),n.Qc(1),n.ic(2,"translate"),n.Wb(3,"ul"),n.Oc(4,M0,7,5,"li",13),n.Vb(),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Wb(7,"div"),n.Wb(8,"mat-form-field",14),n.Wb(9,"mat-select",15),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).modelIds=e}))("selectionChange",(function(e){return n.Dc(t),n.hc(2).changeModel(e)})),n.ic(10,"translate"),n.Oc(11,k0,2,3,"mat-option",16),n.Vb(),n.Vb(),n.Vb(),n.Oc(12,I0,7,7,"div",17)}if(2&t){const t=n.hc(2);n.Db(1),n.Sc(" ",n.jc(2,7,"lang.indexingModelUsedBy")," "),n.Db(3),n.oc("ngForOf",t.mainIndexingModel.used),n.Db(1),n.Sc(" ",n.jc(6,9,"lang.indexingModelReplaceToDelete")," "),n.Db(4),n.oc("ngModel",t.modelIds)("placeholder",n.jc(10,11,"lang.indexingModel")),n.Db(2),n.oc("ngForOf",t.indexingModels),n.Db(1),n.oc("ngIf",0!==t.resetFields.length)}}function V0(t,e){if(1&t&&(n.Oc(0,w0,3,3,"ng-container",3),n.Oc(1,P0,13,13,"ng-template",null,10,n.Pc)),2&t){const t=n.zc(2),e=n.hc();n.oc("ngIf",0===e.mainIndexingModel.used.length)("ngIfElse",t)}}let R0=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.data=e,this.dialogRef=i,this.http=n,this.notify=a,this.sortPipe=s,this.title="lang.delete",this.indexingModels=[],this.modelIds=[],this.mainIndexingModel={used:[]},this.resetFields=[],this.statuses=[],this.customFields=[],this.availableFields=[{identifier:"doctype",label:this.translate.instant("lang.doctype")},{identifier:"subject",label:this.translate.instant("lang.subject")},{identifier:"recipients",label:this.translate.instant("lang.getRecipients")},{identifier:"priority",label:this.translate.instant("lang.priority")},{identifier:"confidentiality",label:this.translate.instant("lang.confidential")},{identifier:"initiator",label:this.translate.instant("lang.initiatorEntityAlt")},{identifier:"departureDate",label:this.translate.instant("lang.departureDate")},{identifier:"processLimitDate",label:this.translate.instant("lang.processLimitDate")},{identifier:"tags",label:this.translate.instant("lang.tags")},{identifier:"senders",label:this.translate.instant("lang.getSenders")},{identifier:"destination",label:this.translate.instant("lang.destination")},{identifier:"folders",label:this.translate.instant("lang.folders")},{identifier:"documentDate",label:this.translate.instant("lang.docDate")},{identifier:"arrivalDate",label:this.translate.instant("lang.arrivalDate")}],this.loading=!0,this.mainIndexingModel.id=e.indexingModel.id}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){yield this.loadIndexingModelFields(),this.mainIndexingModel.used.length>0&&(this.title="lang.indexingModelReassign",yield this.loadIndexingModels(),yield this.loadStatuses(),yield this.loadCustomFields(),this.formatFields()),this.loading=!1}))}loadIndexingModels(){return new Promise(t=>{this.http.get("../rest/indexingModels").pipe(Object(l.a)(t=>t.indexingModels.filter(t=>!1===t.private)),Object(mt.a)(t=>{this.indexingModels=t,this.sortPipe.transform(this.indexingModels,"label"),this.modelIds=this.indexingModels.map(t=>t.id)}),Object(Xt.a)(()=>t(!0)),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()})}loadIndexingModelFields(){return new Promise(t=>{this.http.get("../rest/indexingModels/"+this.mainIndexingModel.id+"?used=true").pipe(Object(mt.a)(t=>{this.mainIndexingModel.used=t.indexingModel.used,this.mainIndexingModelFields=t.indexingModel.fields}),Object(mt.a)(()=>t(!0)),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()})}formatFields(){this.mainIndexingModelFields=this.mainIndexingModelFields.map(t=>{const e=this.availableFields.find(e=>e.identifier===t.identifier);return t.label=void 0===e?this.translate.instant("lang.undefined"):e.label,t})}loadStatuses(){return new Promise(t=>{this.http.get("../rest/statuses").pipe(Object(mt.a)(t=>{this.statuses=t.statuses,this.mainIndexingModel.used.forEach(t=>{const e=this.statuses.find(e=>e.id===t.status);void 0!==e&&(t.status=e.label_status)})}),Object(Xt.a)(()=>t(!0)),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()})}loadCustomFields(){return new Promise(t=>{this.http.get("../rest/customFields").pipe(Object(mt.a)(t=>{t.customFields=t.customFields.map(t=>({identifier:"indexingCustomField_"+t.id,label:t.label})),t.customFields.forEach(t=>{this.availableFields.push(t)}),this.sortPipe.transform(this.availableFields,"label")}),Object(Xt.a)(()=>t(!0)),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()})}changeModel(t){this.selectedModelId=t.value,this.http.get("../rest/indexingModels/"+this.selectedModelId).pipe(Object(mt.a)(t=>{this.selectedModelFields=t.indexingModel.fields,this.resetFields=this.mainIndexingModelFields.filter(t=>void 0===this.selectedModelFields.find(e=>e.identifier===t.identifier)),this.sortPipe.transform(this.resetFields,"label")}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}isValid(){return!this.loading&&(0===this.mainIndexingModel.used.length||void 0!==this.selectedModelId)}onSubmit(){0===this.mainIndexingModel.used.length?this.http.delete("../rest/indexingModels/"+this.mainIndexingModel.id).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.indexingModelDeleted")),this.dialogRef.close("ok")}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe():this.http.request("DELETE","../rest/indexingModels/"+this.mainIndexingModel.id,{body:{targetId:this.selectedModelId}}).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.indexingModelDeleted")),this.dialogRef.close("ok")}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(q.a),n.Qb(q.h),n.Qb(v.b),n.Qb(D.a),n.Qb(Wt.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],features:[n.Cb([Wt.a])],decls:16,vars:12,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],[4,"ngIf","ngIfElse"],["elseLoading",""],[1,"divider-modal"],["mat-dialog-actions",""],["color","primary","mat-raised-button","",1,"actions",3,"disabled","click"],["color","","mat-raised-button","",1,"actions",3,"click"],[2,"margin","auto"],["elseTemplate",""],["role","alert",1,"alert-message","alert-message-info",2,"margin","20px 0",3,"innerHTML"],[1,"alert-message","alert-message-info"],[4,"ngFor","ngForOf"],[2,"padding","10px","margin-top","15px"],["name","model","required","",3,"ngModel","placeholder","ngModelChange","selectionChange"],[3,"value","disabled",4,"ngFor","ngForOf"],["class","alert-message alert-message-danger",4,"ngIf"],[3,"value","disabled"],[1,"alert-message","alert-message-danger"]],template:function(t,e){if(1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"div",2),n.Oc(5,D0,2,0,"ng-container",3),n.Oc(6,V0,3,2,"ng-template",null,4,n.Pc),n.Rb(8,"span",5),n.Wb(9,"div",6),n.Wb(10,"button",7),n.dc("click",(function(){return e.onSubmit()})),n.Qc(11),n.ic(12,"translate"),n.Vb(),n.Wb(13,"button",8),n.dc("click",(function(){return e.dialogRef.close("")})),n.Qc(14),n.ic(15,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.zc(7);n.Db(2),n.Rc(n.jc(3,6,e.title)),n.Db(3),n.oc("ngIf",e.loading)("ngIfElse",t),n.Db(5),n.oc("disabled",!e.isValid()),n.Db(1),n.Rc(n.jc(12,8,"lang.validate")),n.Db(3),n.Rc(n.jc(15,10,"lang.cancel"))}},directives:[q.i,q.f,P.t,q.c,k.b,V.c,P.s,Y.c,ee.a,X.F,X.u,X.x,W.p],pipes:[g.d],styles:[".alert-message-info[_ngcontent-%COMP%]{margin:0;font-size:16px}"]}),t})();const j0=["adminMenuTemplate"];function A0(t,e){1&t&&(n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",11),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",12),n.Rb(5,"mat-icon",13),n.Wb(6,"p",14),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,2,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,4,"lang.add")," "))}function W0(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Vb())}function T0(t,e){1&t&&(n.Wb(0,"mat-header-cell",41),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.technicalId")))}function E0(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.id," ")}}function F0(t,e){1&t&&(n.Wb(0,"mat-header-cell",41),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.category_id")))}function L0(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",n.jc(2,1,"lang."+t.category)," ")}}function Q0(t,e){1&t&&(n.Wb(0,"mat-header-cell",42),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.label")))}function N0(t,e){if(1&t&&(n.Wb(0,"mat-cell",43),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.label," ")}}function z0(t,e){1&t&&(n.Wb(0,"mat-header-cell",41),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.perimeter")))}const B0=function(t,e){return{dataLabelWarn:t,dataLabelPrimary:e}};function U0(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Wb(1,"span",44),n.Qc(2),n.ic(3,"translate"),n.ic(4,"translate"),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngClass",n.wc(6,B0,t.private,!t.private)),n.Db(1),n.Rc(t.private?n.jc(3,2,"lang.private"):n.jc(4,4,"lang.public"))}}function $0(t,e){1&t&&(n.Wb(0,"mat-header-cell",41),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.default")))}function H0(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Wb(1,"span",44),n.Qc(2),n.ic(3,"translate"),n.ic(4,"translate"),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngClass",n.wc(6,B0,!t.default,t.default)),n.Db(1),n.Rc(t.default?n.jc(3,2,"lang.yes"):n.jc(4,4,"lang.no"))}}function G0(t,e){1&t&&(n.Wb(0,"mat-header-cell",41),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.status")))}function X0(t,e){1&t&&(n.Wb(0,"span",47),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.active")))}function q0(t,e){1&t&&(n.Wb(0,"span",48),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.inactive")))}function K0(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Oc(1,X0,3,3,"span",45),n.Oc(2,q0,3,3,"span",46),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",t.enabled),n.Db(1),n.oc("ngIf",!t.enabled)}}function Y0(t,e){1&t&&n.Rb(0,"mat-header-cell")}function J0(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",54),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc(2);return e.stopPropagation(),a.disableIndexingModel(i)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",55),n.Vb()}if(2&t){const t=n.hc().$implicit;n.pc("matTooltip",n.jc(1,2,"lang.suspend")),n.oc("disabled",t.default)}}function Z0(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",56),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc(2);return e.stopPropagation(),a.enableIndexingModel(i)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",57),n.Vb()}2&t&&n.pc("matTooltip",n.jc(1,1,"lang.authorize"))}function t2(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",49),n.Oc(1,J0,3,4,"button",50),n.Oc(2,Z0,3,3,"button",51),n.Wb(3,"button",52),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.delete(a)})),n.ic(4,"translate"),n.Rb(5,"mat-icon",53),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",t.enabled),n.Db(1),n.oc("ngIf",!t.enabled),n.Db(1),n.pc("matTooltip",n.jc(4,4,"lang.delete")),n.oc("disabled",t.default)}}function e2(t,e){1&t&&n.Rb(0,"mat-header-row")}function i2(t,e){1&t&&(n.Rb(0,"mat-row",58),n.ic(1,"translate")),2&t&&(n.qc("routerLink","/administration/indexingModels/",e.$implicit.id,""),n.pc("matTooltip",n.jc(1,2,"lang.view")))}function n2(t,e){if(1&t&&(n.Wb(0,"mat-card",17),n.Wb(1,"div",18),n.Wb(2,"div",19),n.Wb(3,"mat-form-field"),n.Rb(4,"input",20),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Wb(6,"div",19),n.Rb(7,"mat-paginator",21,22),n.Vb(),n.Vb(),n.Wb(9,"mat-table",23,24),n.Ub(11,25),n.Oc(12,T0,3,3,"mat-header-cell",26),n.Oc(13,E0,2,1,"mat-cell",27),n.Tb(),n.Ub(14,28),n.Oc(15,F0,3,3,"mat-header-cell",26),n.Oc(16,L0,3,3,"mat-cell",27),n.Tb(),n.Ub(17,29),n.Oc(18,Q0,3,3,"mat-header-cell",30),n.Oc(19,N0,2,1,"mat-cell",31),n.Tb(),n.Ub(20,32),n.Oc(21,z0,3,3,"mat-header-cell",26),n.Oc(22,U0,5,9,"mat-cell",27),n.Tb(),n.Ub(23,33),n.Oc(24,$0,3,3,"mat-header-cell",26),n.Oc(25,H0,5,9,"mat-cell",27),n.Tb(),n.Ub(26,34),n.Oc(27,G0,3,3,"mat-header-cell",26),n.Oc(28,K0,3,2,"mat-cell",27),n.Tb(),n.Ub(29,35),n.Oc(30,Y0,1,0,"mat-header-cell",36),n.Oc(31,t2,6,6,"mat-cell",37),n.Tb(),n.Oc(32,e2,1,0,"mat-header-row",38),n.Oc(33,i2,2,4,"mat-row",39),n.Vb(),n.Wb(34,"div",40),n.Qc(35),n.ic(36,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.pc("placeholder",n.jc(5,10,"lang.filterBy")),n.oc("formControl",t.adminService.getFilterField()),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.adminService.getDataSource()),n.Db(23),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns),n.Db(2),n.Tc(" ",t.indexingModels.length," ",n.jc(36,12,"lang.indexingModels"),"")}}let a2=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.dialog=s,this.functions=o,this.adminService=r,this.viewContainerRef=c,this.search=null,this.indexingModels=[],this.loading=!1,this.displayedColumns=["id","category","label","private","default","enabled","actions"],this.filterColumns=["id","label"]}ngOnInit(){this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,this.http.get("../rest/indexingModels?showDisabled=true").pipe(Object(l.a)(t=>t.indexingModels.filter(t=>!1===t.private)),Object(mt.a)(t=>{this.indexingModels=t,this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.indexingModels")),setTimeout(()=>{this.adminService.setDataSource("admin_indexing_models",this.indexingModels,this.sort,this.paginator,this.filterColumns)},0)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}delete(t){this.dialogRef=this.dialog.open(R0,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{indexingModel:t}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{for(const e in this.indexingModels)this.indexingModels[e].id===t.id&&this.indexingModels.splice(Number(e),1);this.adminService.setDataSource("admin_indexing_models",this.indexingModels,this.sort,this.paginator,this.filterColumns)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}disableIndexingModel(t){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.disable"),msg:this.translate.instant("lang.confirmAction")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.request("PUT","../rest/indexingModels/"+t.id+"/disable")),Object(mt.a)(e=>{for(const i in this.indexingModels)this.indexingModels[i].id===t.id&&(this.indexingModels[i].enabled=!1);this.notify.success(this.translate.instant("lang.indexingModelDisabled"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}enableIndexingModel(t){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.enable"),msg:this.translate.instant("lang.confirmAction")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.request("PUT","../rest/indexingModels/"+t.id+"/enable")),Object(mt.a)(e=>{for(let i in this.indexingModels)this.indexingModels[i].id===t.id&&(this.indexingModels[i].enabled=!0);this.notify.success(this.translate.instant("lang.indexingModelEnabled"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(q.b),n.Qb(_t.a),n.Qb(OL),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(j0,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:15,vars:8,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["mat-subheader",""],["mat-list-item","","routerLink","/administration/indexingModels/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"row"],[1,"col-md-6","col-xs-6"],["matInput","",3,"formControl","placeholder"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSortDisableClear","","matSort","",3,"dataSource"],["table",""],["matColumnDef","id"],["mat-sort-header","",4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","category"],["matColumnDef","label"],["mat-sort-header","","style","flex:2",4,"matHeaderCellDef"],["style","flex:2",4,"matCellDef"],["matColumnDef","private"],["matColumnDef","default"],["matColumnDef","enabled"],["matColumnDef","actions"],[4,"matHeaderCellDef"],["style","justify-content: flex-end;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"routerLink","matTooltip",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["mat-sort-header",""],["mat-sort-header","",2,"flex","2"],[2,"flex","2"],[1,"label",3,"ngClass"],["class","label dataLabelPrimary",4,"ngIf"],["class","label dataLabelWarn",4,"ngIf"],[1,"label","dataLabelPrimary"],[1,"label","dataLabelWarn"],[2,"justify-content","flex-end"],["mat-icon-button","","color","primary",3,"matTooltip","disabled","click",4,"ngIf"],["mat-icon-button","","color","accent",3,"matTooltip","click",4,"ngIf"],["mat-icon-button","","color","warn",3,"matTooltip","disabled","click"],["aria-hidden","true",1,"fa","fa-trash-alt","fa-2x"],["mat-icon-button","","color","primary",3,"matTooltip","disabled","click"],["aria-hidden","true",1,"fa","fa-pause","fa-2x"],["mat-icon-button","","color","accent",3,"matTooltip","click"],["aria-hidden","true",1,"fa","fa-check","fa-2x"],[2,"cursor","pointer",3,"routerLink","matTooltip"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,A0,9,6,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,W0,2,0,"div",9),n.Oc(14,n2,37,14,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,R.h,R.g,R.d,o.f,S.a,R.c,W.l,V.c,K.a,Y.c,J.b,X.d,X.u,X.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,vt.h,Fe.b,vt.a,P.q,k.b,A.b,vt.j,vt.m,o.d],pipes:[g.d],styles:[".dataLabelWarn[_ngcontent-%COMP%]{color:#8e3e52}.dataLabelPrimary[_ngcontent-%COMP%]{color:#135f7f}.label[_ngcontent-%COMP%]{font-size:75%;font-weight:700}"]}),t})();const s2=["listFilter"];function o2(t,e){1&t&&(n.Wb(0,"div",32),n.Rb(1,"mat-spinner"),n.Vb())}function r2(t,e){if(1&t&&(n.Wb(0,"mat-option",33),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}function c2(t,e){if(1&t&&(n.Wb(0,"mat-option",33),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}function l2(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",34),n.Wb(1,"mat-form-field",5),n.Wb(2,"mat-label"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"mat-select",35),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().exportModel.delimiter=e})),n.ic(6,"translate"),n.Oc(7,c2,2,2,"mat-option",7),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(3),n.Rc(n.jc(4,5,"lang.delimiter")),n.Db(2),n.pc("placeholder",n.jc(6,7,"lang.delimiter")),n.oc("ngModel",t.exportModel.delimiter)("disabled","csv"!=t.exportModel.format),n.Db(2),n.oc("ngForOf",t.delimiters)}}function d2(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",36),n.Qc(1),n.Wb(2,"i",37),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().addData(i)})),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.pc("id",t.value),n.Db(1),n.Sc("",t.label," ")}}function h2(t,e){1&t&&(n.Wb(0,"div",38),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.noDataAvailable")))}function u2(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",36),n.Qc(1),n.Wb(2,"i",39),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc().removeData(i)})),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.pc("id",t.value),n.Db(1),n.Sc("",t.label," ")}}function p2(t,e){1&t&&(n.Wb(0,"div",38),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.noDataAvailable")))}const b2=function(t){return[t]};let f2=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.notify=i,this.data=n,this.sortPipe=a,this.localStorage=s,this.headerService=o,this.loading=!1,this.loadingExport=!1,this.delimiters=[";",",","TAB"],this.formats=["csv"],this.exportModel={delimiter:";",format:"csv",data:[]},this.dataAvailable=[{value:"id",label:this.translate.instant("lang.id")},{value:"externalId",label:"External Id"},{value:"enabled",label:this.translate.instant("lang.status")},{value:"communicationMeans",label:this.translate.instant("lang.communicationMean")}]}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){yield this.getContactFields(),this.setConfiguration()}))}getContactFields(){return new Promise((t,e)=>{this.http.get("../rest/contactsParameters").pipe(Object(l.a)(t=>{const e=/contactCustomField_[.]*/g;return t.contactsParameters=t.contactsParameters.filter(t=>null===t.identifier.match(e)).map(t=>({value:t.identifier,label:this.translate.instant("lang.contactsParameters_"+t.identifier)})),t.contactsParameters}),Object(mt.a)(t=>{this.dataAvailable=this.dataAvailable.concat(t)}),p(()=>this.http.get("../rest/contactsCustomFields")),Object(l.a)(t=>(t.customFields=t.customFields.map(t=>({value:"contactCustomField_"+t.id,label:t.label})),t.customFields)),Object(mt.a)(e=>{this.dataAvailable=this.dataAvailable.concat(e),this.dataAvailable=this.sortPipe.transform(this.dataAvailable,"label"),t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}drop(t){if(t.previousContainer===t.container)Object(lo.h)(t.container.data,t.previousIndex,t.currentIndex);else{let e=t.previousIndex;if("selectedElements"===t.container.id&&(e=0,void 0!==$(".available-data .columns")[t.previousIndex])){const i=$(".available-data .columns")[t.previousIndex].id;e=this.dataAvailable.map(t=>t.value).indexOf(i)}Object(lo.i)(t.previousContainer.data,t.container.data,e,t.currentIndex);const i=this.listFilter.nativeElement.value;this.listFilter.nativeElement.value="",setTimeout(()=>{this.listFilter.nativeElement.value=i},10)}}exportData(){this.localStorage.save("exportContactFields_"+this.headerService.user.id,JSON.stringify(this.exportModel)),this.loadingExport=!0,this.http.put("../rest/contacts/export",this.exportModel,{responseType:"blob"}).pipe(Object(mt.a)(t=>{if("text/html"!==t.type){const e=document.createElement("a");let i,n,a,s;e.href=window.URL.createObjectURL(t),i=new Date,n=i.getDate(),a=i.getMonth()+1,s=i.getFullYear(),n<10&&(n="0"+n),a<10&&(a="0"+a),i=n+"-"+a+"-"+s,e.setAttribute("download","export_contact_maarch_"+i+"."+this.exportModel.format.toLowerCase()),document.body.appendChild(e),e.click()}else alert(this.translate.instant("lang.tooMuchDatas"))}),Object(Xt.a)(()=>this.loadingExport=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}addData(t){let e=0;this.dataAvailable.forEach((i,n)=>{i.value===t.value&&(e=n)}),Object(lo.i)(this.dataAvailable,this.exportModel.data,e,this.exportModel.data.length);const i=this.listFilter.nativeElement.value;this.listFilter.nativeElement.value="",setTimeout(()=>{this.listFilter.nativeElement.value=i},10)}removeData(t){Object(lo.i)(this.exportModel.data,this.dataAvailable,t,this.dataAvailable.length),this.sortPipe.transform(this.dataAvailable,"label")}removeAllData(){this.dataAvailable=this.dataAvailable.concat(this.exportModel.data),this.exportModel.data=[]}addAllData(){for(this.exportModel.data=this.exportModel.data.concat(this.dataAvailable);this.dataAvailable.length>0;)this.dataAvailable.pop();this.listFilter.nativeElement.value=""}setConfiguration(){null!==this.localStorage.get("exportContactFields_"+this.headerService.user.id)&&(JSON.parse(this.localStorage.get("exportContactFields_"+this.headerService.user.id)).data.forEach(t=>{this.addData(t)}),this.exportModel.delimiter=JSON.parse(this.localStorage.get("exportContactFields_"+this.headerService.user.id)).delimiter)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.a),n.Qb(Wt.a),n.Qb(Ut.a),n.Qb(y.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(s2,!0),2&t&&n.yc(i=n.ec())&&(e.listFilter=i.first)},features:[n.Cb([Wt.a])],decls:63,vars:62,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loader",4,"ngIf"],[1,"row"],["appearance","outline"],[3,"placeholder","ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["class","col-md-9",4,"ngIf"],[3,"expanded"],[1,"col-md-12"],["appearance","outline",1,"listFilter"],["matInput","","cdkFocusInitial","",3,"placeholder"],["listFilter",""],[1,"row","exportList"],[1,"col-md-6","available-data"],[1,"title"],["color","primary",1,"fa","fa-plus-circle","removeAllDatas",3,"title","click"],["id","availableElements","cdkDropList","",1,"cdk-list",3,"cdkDropListData","cdkDropListConnectedTo","cdkDropListDropped"],["dataAvailableList","cdkDropList"],["class","columns","cdkDrag","",3,"id",4,"ngFor","ngForOf"],["class","noData",4,"ngIf"],[2,"display","flex","align-items","center"],[1,"fas","fa-arrow-right"],[1,"col-md-6","active-data"],["color","warn",1,"fa","fa-minus-circle","removeAllDatas",3,"title","click"],["id","selectedElements","cdkDropList","",1,"cdk-list",3,"cdkDropListData","cdkDropListConnectedTo","cdkDropListDropped"],["dataExportList","cdkDropList"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"mat-dialog-close"],[1,"loader"],[3,"value"],[1,"col-md-9"],[3,"placeholder","ngModel","disabled","ngModelChange"],["cdkDrag","",1,"columns",3,"id"],["color","primary",1,"fa","fa-plus",2,"cursor","pointer",3,"click"],[1,"noData"],["color","warn",1,"fa","fa-minus",2,"cursor","pointer",3,"click"]],template:function(t,e){if(1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"div",2),n.Oc(5,o2,2,0,"div",3),n.Wb(6,"div",4),n.Wb(7,"div"),n.Wb(8,"mat-form-field",5),n.Wb(9,"mat-label"),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Wb(12,"mat-select",6),n.dc("ngModelChange",(function(t){return e.exportModel.format=t})),n.ic(13,"translate"),n.Oc(14,r2,2,2,"mat-option",7),n.Vb(),n.Vb(),n.Vb(),n.Oc(15,l2,8,9,"div",8),n.Vb(),n.Wb(16,"mat-accordion"),n.Wb(17,"mat-expansion-panel",9),n.Wb(18,"mat-expansion-panel-header"),n.Wb(19,"mat-panel-title"),n.Qc(20),n.ic(21,"translate"),n.Vb(),n.Vb(),n.Wb(22,"div",4),n.Wb(23,"div",10),n.Wb(24,"mat-form-field",11),n.Rb(25,"input",12,13),n.ic(27,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(28,"div",14),n.Wb(29,"div",15),n.Wb(30,"h2"),n.Wb(31,"span",16),n.Qc(32),n.ic(33,"translate"),n.Vb(),n.Wb(34,"i",17),n.dc("click",(function(){return e.addAllData()})),n.ic(35,"translate"),n.Vb(),n.Vb(),n.Wb(36,"div",18,19),n.dc("cdkDropListDropped",(function(t){return e.drop(t)})),n.Oc(38,d2,3,2,"div",20),n.ic(39,"filterList"),n.ic(40,"sortBy"),n.Oc(41,h2,3,3,"div",21),n.Vb(),n.Vb(),n.Wb(42,"div",22),n.Rb(43,"i",23),n.Vb(),n.Wb(44,"div",24),n.Wb(45,"h2"),n.Wb(46,"span",16),n.Qc(47),n.ic(48,"translate"),n.Vb(),n.Wb(49,"i",25),n.dc("click",(function(){return e.removeAllData()})),n.ic(50,"translate"),n.Vb(),n.Vb(),n.Wb(51,"div",26,27),n.dc("cdkDropListDropped",(function(t){return e.drop(t)})),n.Oc(53,u2,3,2,"div",20),n.Oc(54,p2,3,3,"div",21),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Rb(55,"span",28),n.Wb(56,"div",29),n.Wb(57,"button",30),n.dc("click",(function(){return e.exportData()})),n.Qc(58),n.ic(59,"translate"),n.Vb(),n.Wb(60,"button",31),n.Qc(61),n.ic(62,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.zc(26),i=n.zc(37),a=n.zc(52);n.Db(2),n.Rc(n.jc(3,29,"lang.exportDatas")),n.Db(3),n.oc("ngIf",e.loadingExport),n.Db(2),n.Ib("col-md-12","csv"!=e.exportModel.format)("col-md-3","csv"==e.exportModel.format),n.Db(3),n.Rc(n.jc(11,31,"lang.format")),n.Db(2),n.pc("placeholder",n.jc(13,33,"lang.format")),n.oc("ngModel",e.exportModel.format),n.Db(2),n.oc("ngForOf",e.formats),n.Db(1),n.oc("ngIf","csv"==e.exportModel.format),n.Db(2),n.oc("expanded",!0),n.Db(3),n.Sc(" ",n.jc(21,35,"lang.datasToExport")," "),n.Db(5),n.pc("placeholder",n.jc(27,37,"lang.searchDatas")),n.Db(7),n.Rc(n.jc(33,39,"lang.availableDatas")),n.Db(2),n.pc("title",n.jc(35,41,"lang.addAllData")),n.Db(2),n.oc("cdkDropListData",e.dataAvailable)("cdkDropListConnectedTo",n.vc(58,b2,a)),n.Db(2),n.oc("ngForOf",n.lc(39,43,n.kc(40,47,e.dataAvailable,"label"),t.value,"label")),n.Db(3),n.oc("ngIf",0==e.dataAvailable.length),n.Db(6),n.Rc(n.jc(48,50,"lang.chosenDatas")),n.Db(2),n.pc("title",n.jc(50,52,"lang.removeAllDatas")),n.Db(2),n.oc("cdkDropListData",e.exportModel.data)("cdkDropListConnectedTo",n.vc(60,b2,i)),n.Db(2),n.oc("ngForOf",e.exportModel.data),n.Db(1),n.oc("ngIf",0==e.exportModel.data.length),n.Db(3),n.oc("disabled",0==e.exportModel.data.length),n.Db(1),n.Rc(n.jc(59,54,"lang.toExport")),n.Db(3),n.Rc(n.jc(62,56,"lang.cancel"))}},directives:[q.i,q.f,P.t,Y.c,Y.g,ee.a,X.u,X.x,P.s,gt.a,gt.c,gt.g,gt.h,J.b,lo.e,q.c,k.b,q.d,V.c,W.p,lo.a],pipes:[g.d,rg,Wt.a],styles:[".mat-dialog-container{position:relative}.mat-dialog-content[_ngcontent-%COMP%]{padding-bottom:10px;overflow-x:hidden} .mat-expansion-panel-body{padding-bottom:50px}.mat-expansion-panel-header[_ngcontent-%COMP%], .noData[_ngcontent-%COMP%]{opacity:.5}.noData[_ngcontent-%COMP%]{text-align:center}.removeAllDatas[_ngcontent-%COMP%]{float:right;font-size:14px;opacity:1;cursor:pointer;margin-right:10px}.listFilter[_ngcontent-%COMP%]{font-size:10px;margin-bottom:-20px}.exportList[_ngcontent-%COMP%]{display:flex}.exportList[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{float:left;height:20px;font-size:10px;font-weight:700;opacity:.5}.exportList[_ngcontent-%COMP%] .cdk-list[_ngcontent-%COMP%]{height:100%}.cdk-list[_ngcontent-%COMP%]{max-width:100%;border:1px solid #ccc;display:block;border-radius:4px;max-height:310px;min-height:310px;overflow:auto}.cdk-list[_ngcontent-%COMP%], .columns[_ngcontent-%COMP%]{width:100%;background:#fff}.columns[_ngcontent-%COMP%]{height:50px;padding:20px 10px;border-bottom:1px solid #ccc;color:rgba(0,0,0,.87);display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;cursor:move;font-size:14px}.cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.columns[_ngcontent-%COMP%]:last-child{border:none}.cdk-list.cdk-drop-list-dragging[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.actions[_ngcontent-%COMP%], .loader[_ngcontent-%COMP%]{justify-content:center}.loader[_ngcontent-%COMP%]{position:absolute;display:flex;width:100%;left:0;top:0;height:100%;background:hsla(0,0%,100%,.6);z-index:1;align-items:center}"]}),t})();function m2(t,e){1&t&&(n.Ub(0),n.Wb(1,"div",18),n.Rb(2,"mat-spinner"),n.Vb(),n.Tb())}function g2(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",26),n.dc("click",(function(){return n.Dc(t),n.hc(),n.zc(1).click()}))("onFileDropped",(function(e){return n.Dc(t),n.hc(2).dndUploadFile(e)})),n.Wb(1,"div"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(2),n.Sc(" ",n.jc(3,1,"lang.dndFileCsvDesc")," "))}function v2(t,e){1&t&&(n.Wb(0,"div",27),n.Rb(1,"mat-paginator",28,29),n.Vb()),2&t&&(n.Db(1),n.oc("length",100)("hidePageSize",!0)("pageSize",8))}function _2(t,e){if(1&t&&(n.Wb(0,"mat-option",51),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}function y2(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-header-cell",41),n.Rb(1,"i",42),n.ic(2,"translate"),n.Qc(3,"\xa0"),n.Wb(4,"b",43),n.ic(5,"translate"),n.Qc(6),n.Vb(),n.Qc(7," \xa0"),n.Rb(8,"i",44),n.Qc(9,"\xa0 "),n.Rb(10,"i",45),n.ic(11,"translate"),n.Qc(12,"\xa0 "),n.Wb(13,"mat-form-field",46),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.ic(14,"translate"),n.Wb(15,"mat-select",47),n.dc("ngModelChange",(function(e){n.Dc(t);const i=n.hc().$implicit;return n.hc(4).associatedColmuns[i.id]=e}))("selectionChange",(function(e){n.Dc(t);const i=n.hc().$implicit;return n.hc(4).changeColumn(i,e.value)})),n.Rb(16,"mat-option",48),n.Oc(17,_2,2,2,"mat-option",49),n.Vb(),n.Vb(),n.Wb(18,"mat-checkbox",50),n.dc("change",(function(e){n.Dc(t);const i=n.hc().$implicit;return n.hc(4).toggleEmptyMode(i.id,e.checked)})),n.ic(19,"translate"),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc(4);n.Db(1),n.oc("title",n.jc(2,8,"lang.dbColumn")),n.Db(3),n.oc("title",n.jc(5,10,"lang.dbColumn")),n.Db(2),n.Rc(t.label),n.Db(4),n.oc("title",n.jc(11,12,"lang.csvColumn")),n.Db(3),n.oc("title",n.jc(14,14,"lang.csvColumn")),n.Db(2),n.oc("ngModel",e.associatedColmuns[t.id]),n.Db(2),n.oc("ngForOf",e.csvColumns),n.Db(1),n.oc("title",n.jc(19,16,"lang.toggleEmptyValues"))}}function x2(t,e){1&t&&(n.Ub(0),n.Wb(1,"i",52),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Tb()),2&t&&(n.Db(2),n.Rc(n.jc(3,1,"lang.emptyValue")))}function C2(t,e){if(1&t&&n.Qc(0),2&t){const t=n.hc().$implicit,e=n.hc().$implicit;n.Sc(" ",t[e.id]," ")}}function O2(t,e){if(1&t&&(n.Wb(0,"mat-cell",41),n.Oc(1,x2,4,3,"ng-container",12),n.Oc(2,C2,1,1,"ng-template",null,13,n.Pc),n.Vb()),2&t){const t=e.$implicit,i=n.zc(3),a=n.hc().$implicit,s=n.hc(4);n.Db(1),n.oc("ngIf",a.emptyValueMode&&s.functionsService.empty(t[a.id]))("ngIfElse",i)}}function D2(t,e){if(1&t&&(n.Ub(0),n.Ub(1,38),n.Oc(2,y2,20,18,"mat-header-cell",39),n.Oc(3,O2,4,2,"mat-cell",40),n.Tb(),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("matColumnDef",t.id)}}function w2(t,e){1&t&&n.Rb(0,"mat-header-row")}function M2(t,e){1&t&&n.Rb(0,"mat-row")}function k2(t,e){if(1&t&&(n.Wb(0,"mat-table",33,34),n.Oc(2,D2,4,1,"ng-container",35),n.Oc(3,w2,1,0,"mat-header-row",36),n.Oc(4,M2,1,0,"mat-row",37),n.Vb()),2&t){const t=n.hc(3);n.Lc("width",300*t.contactColumns.length,"px"),n.oc("dataSource",t.dataSource),n.Db(2),n.oc("ngForOf",t.contactColumns),n.Db(1),n.oc("matHeaderRowDef",t.getcontactColumnsIds()),n.Db(1),n.oc("matRowDefColumns",t.getcontactColumnsIds())}}function S2(t,e){if(1&t&&(n.Wb(0,"div",30),n.Wb(1,"div",31),n.Oc(2,k2,5,6,"mat-table",32),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.oc("ngIf",t.csvData.length>0)}}function I2(t,e){if(1&t){const t=n.Xb();n.Wb(0,"input",19,20),n.dc("change",(function(e){return n.Dc(t),n.hc().uploadCsv(e)})),n.Vb(),n.Oc(2,g2,4,3,"div",21),n.Wb(3,"div",22),n.Oc(4,v2,3,3,"div",23),n.Vb(),n.Oc(5,S2,3,1,"div",24),n.Rb(6,"div",25),n.ic(7,"translate"),n.Rb(8,"div",25),n.ic(9,"translate")}if(2&t){const t=n.hc();n.Db(2),n.oc("ngIf",0===t.csvData.length),n.Db(2),n.oc("ngIf",0!==t.csvData.length),n.Db(1),n.oc("ngIf",0!==t.csvData.length),n.Db(1),n.oc("innerHTML",n.jc(7,5,"lang.infoImportNoIdToCreate"),n.Ec),n.Db(2),n.oc("innerHTML",n.jc(9,7,"lang.infoImportcontacts2"),n.Ec)}}function P2(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",53),n.dc("click",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc();n.oc("disabled",t.loading),n.Db(1),n.Rc(n.jc(2,2,"lang.validate"))}}let V2=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c,l){this.translate=t,this.http=e,this.notify=i,this.functionsService=n,this.localStorage=a,this.headerService=s,this.dialog=o,this.dialogRef=r,this.papa=c,this.data=l,this.loading=!1,this.contactColumns=[{id:"id",label:this.translate.instant("lang.id"),emptyValueMode:!1},{id:"company",label:this.translate.instant("lang.contactsParameters_company"),emptyValueMode:!1},{id:"civility",label:this.translate.instant("lang.contactsParameters_civility"),emptyValueMode:!1},{id:"firstname",label:this.translate.instant("lang.contactsParameters_firstname"),emptyValueMode:!1},{id:"lastname",label:this.translate.instant("lang.contactsParameters_lastname"),emptyValueMode:!1},{id:"function",label:this.translate.instant("lang.contactsParameters_function"),emptyValueMode:!1},{id:"department",label:this.translate.instant("lang.contactsParameters_department"),emptyValueMode:!1},{id:"email",label:this.translate.instant("lang.contactsParameters_email"),emptyValueMode:!1},{id:"phone",label:this.translate.instant("lang.contactsParameters_phone"),emptyValueMode:!1},{id:"addressAdditional1",label:this.translate.instant("lang.contactsParameters_addressAdditional1"),emptyValueMode:!1},{id:"addressNumber",label:this.translate.instant("lang.contactsParameters_addressNumber"),emptyValueMode:!1},{id:"addressStreet",label:this.translate.instant("lang.contactsParameters_addressStreet"),emptyValueMode:!1},{id:"addressAdditional2",label:this.translate.instant("lang.contactsParameters_addressAdditional2"),emptyValueMode:!1},{id:"addressPostcode",label:this.translate.instant("lang.contactsParameters_addressPostcode"),emptyValueMode:!1},{id:"addressTown",label:this.translate.instant("lang.contactsParameters_addressTown"),emptyValueMode:!1},{id:"addressCountry",label:this.translate.instant("lang.contactsParameters_addressCountry"),emptyValueMode:!1}],this.csvColumns=[],this.associatedColmuns={},this.dataSource=new vt.p(null),this.hasHeader=!0,this.csvData=[],this.contactData=[],this.countAll=0,this.countAdd=0,this.countUp=0}ngOnInit(){this.initCustomFields()}getcontactColumnsIds(){return this.contactColumns.map(t=>t.id)}initCustomFields(){this.http.get("../rest/contactsCustomFields").pipe(Object(l.a)(t=>t.customFields.map(t=>({id:"contactCustomField_"+t.id,label:t.label,type:t.type}))),Object(mt.a)(t=>{this.contactColumns=this.contactColumns.concat(t)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}toggleEmptyMode(t,e){this.contactColumns.filter(e=>e.id===t)[0].emptyValueMode=e}changeColumn(t,e){this.contactData=[];for(let i=this.hasHeader?1:0;i<this.csvData.length;i++){const n=this.csvData[i],a={};this.contactColumns.forEach(i=>{a[i.id]=t===i.id?n[this.csvColumns.filter(t=>t===e)[0]]:n[this.associatedColmuns[i.id]]}),this.contactData.push(a)}this.countAdd=this.csvData.filter((t,e)=>e>0&&this.functionsService.empty(t[this.associatedColmuns.id])).length,this.countUp=this.csvData.filter((t,e)=>e>0&&!this.functionsService.empty(t[this.associatedColmuns.id])).length,setTimeout(()=>{this.dataSource=new vt.p(this.contactData),this.dataSource.paginator=this.paginator},0)}uploadCsv(t){if(t.target.files&&t.target.files[0]&&("text/csv"===t.target.files[0].type||"application/vnd.ms-excel"===t.target.files[0].type)){this.loading=!0;let e=[];const i=new FileReader;i.readAsText(t.target.files[0]),i.onload=t=>{this.papa.parse(t.target.result,{complete:t=>{e=t.data,e=e.filter(t=>t.length===e[0].length);let i=[],n={};this.setCsvColumns(e[0]),this.countAll=this.hasHeader?e.length-1:e.length;for(let a=0;a<e.length;a++)n={},i=e[a],i.forEach((t,e)=>{n[this.csvColumns[e]]=t}),this.csvData.push(n);this.initData(),this.countAdd=this.csvData.filter((t,e)=>e>0&&this.functionsService.empty(t[this.associatedColmuns.id])).length,this.countUp=this.csvData.filter((t,e)=>e>0&&!this.functionsService.empty(t[this.associatedColmuns.id])).length,this.loading=!1}})}}else this.dialog.open(qt.a,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.notAllowedExtension")+" !",msg:this.translate.instant("lang.file")+" : <b>"+t.target.files[0].name+"</b>, "+this.translate.instant("lang.type")+" : <b>"+t.target.files[0].type+"</b><br/><br/><u>"+this.translate.instant("lang.allowedExtensions")+"</u> : <br/>text/csv"}})}setCsvColumns(t=null){this.csvColumns=t.filter(t=>this.functionsService.empty(t)).length>0?Object.keys(t).map((t,e)=>""+e):t}toggleHeader(){this.hasHeader=!this.hasHeader,this.countAll=this.hasHeader?this.csvData.length-1:this.csvData.length,this.hasHeader?(this.countAdd=this.csvData.filter((t,e)=>e>0&&this.functionsService.empty(t[this.associatedColmuns.id])).length,this.countUp=this.csvData.filter((t,e)=>e>0&&!this.functionsService.empty(t[this.associatedColmuns.id])).length):(this.countAdd=this.csvData.filter((t,e)=>this.functionsService.empty(t[this.associatedColmuns.id])).length,this.countUp=this.csvData.filter((t,e)=>!this.functionsService.empty(t[this.associatedColmuns.id])).length),this.initData()}initData(){this.contactData=[];for(let t=this.hasHeader?1:0;t<this.csvData.length;t++){const e=this.csvData[t],i={};this.contactColumns.forEach((t,n)=>{const a=this.csvColumns.indexOf(t.label);this.associatedColmuns[t.id]=a>-1?this.csvColumns[a]:"",i[t.id]=a>-1?e[this.csvColumns[a]]:""}),this.contactData.push(i)}setTimeout(()=>{this.dataSource=new vt.p(this.contactData),this.dataSource.paginator=this.paginator},0)}dndUploadFile(t){this.uploadCsv({target:{files:[t[0]]}})}onSubmit(){let t=null;const e=[];let i="";this.translate.get("lang.confirmImportContacts",{0:this.countAll}).subscribe(t=>{i=t+" ?<br/><br/>",i+=`<ul><li><b>${this.countAdd}</b> ${this.translate.instant("lang.additions")}</li><li><b>${this.countUp}</b> ${this.translate.instant("lang.modifications")}</li></ul>`}),t=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.import"),msg:i}}),t.afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.loading=!0,this.csvData.forEach((t,i)=>{if(this.hasHeader&&i>0||!this.hasHeader){const i={};this.contactColumns.forEach(e=>{i[e.id]=(!e.emptyValueMode||void 0!==t[this.associatedColmuns[e.id]]&&!this.functionsService.empty(t[this.associatedColmuns[e.id]]))&&(void 0===t[this.associatedColmuns[e.id]]?"":"checkbox"===e.type?this.functionsService.empty(t[this.associatedColmuns[e.id]])?[]:t[this.associatedColmuns[e.id]].split("\n"):t[this.associatedColmuns[e.id]])}),e.push(i)}})}),p(()=>this.http.put("../rest/contacts/import",{contacts:e})),Object(mt.a)(e=>{let i="";e.errors.count>0&&(i+=`<br/>${e.errors.count} ${this.translate.instant("lang.withErrors")} : <ul>`,e.errors.details.forEach(t=>{i+=`<li> ${this.translate.instant("lang."+t.lang,{0:t.langParam})} (${this.translate.instant("lang.line")} : ${this.hasHeader?t.index+2:t.index+1})</li>`}),i+="</ul>"),t=this.dialog.open(qt.a,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.import"),msg:"<b>"+e.success+"</b> / <b>"+this.countAll+"</b> "+this.translate.instant("lang.importedContacts")+"."+i}})}),p(()=>t.afterClosed()),Object(mt.a)(()=>{this.dialogRef.close("success")}),Object(m.a)(t=>(this.loading=!1,this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(_t.a),n.Qb(Ut.a),n.Qb(y.a),n.Qb(q.b),n.Qb(q.h),n.Qb(Jt),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Xc(Kt.a,!0),2&t&&n.yc(i=n.ec())&&(e.paginator=i.first)},decls:37,vars:28,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],[1,"import-tool"],[2,"flex","1"],["color","primary",3,"checked","change"],[2,"flex","1","text-align","center"],["color","primary",1,"fa","fa-users"],["color","primary"],["color","primary",1,"fa","fa-user-plus"],[2,"flex","1","text-align","right"],["color","primary",1,"fa","fa-user-edit"],[4,"ngIf","ngIfElse"],["elseTemplate",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click",4,"ngIf"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loader"],["type","file","name","files[]","id","uploadFile","accept",".csv",2,"display","none",3,"change"],["uploadFile",""],["appUploadFileDragDrop","","class","dndFile",3,"click","onFileDropped",4,"ngIf"],[1,"row",2,"margin","0px"],["class","col-md-12",4,"ngIf"],["style","width:100%;box-shadow: inset 0px 0px 5px 0px rgba(0,0,0,0.75);padding:10px;",4,"ngIf"],[1,"alert-message","alert-message-info",2,"min-width","100%",3,"innerHTML"],["appUploadFileDragDrop","",1,"dndFile",3,"click","onFileDropped"],[1,"col-md-12"],[3,"length","hidePageSize","pageSize"],["paginator",""],[2,"width","100%","box-shadow","inset 0px 0px 5px 0px rgba(0,0,0,0.75)","padding","10px"],[2,"overflow","auto"],[3,"dataSource","width",4,"ngIf"],[3,"dataSource"],["table",""],[4,"ngFor","ngForOf"],[4,"matHeaderRowDef"],[4,"matRowDef","matRowDefColumns"],[3,"matColumnDef"],["style","padding-left: 5px;padding-right: 5px;",4,"matHeaderCellDef"],["style","padding-left: 5px;padding-right: 5px;",4,"matCellDef"],[2,"padding-left","5px","padding-right","5px"],["color","primary",1,"fas","fa-database",3,"title"],["color","primary",3,"title"],[1,"fas","fa-arrows-alt-h"],[1,"fas","fa-file-csv",3,"title"],[2,"width","80px !important",3,"title","click"],[3,"ngModel","ngModelChange","selectionChange"],["value",""],[3,"value",4,"ngFor","ngForOf"],["color","primary",3,"title","change"],[3,"value"],[2,"opacity","0.5"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"]],template:function(t,e){if(1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"div",2),n.Wb(5,"mat-toolbar",3),n.Wb(6,"span",4),n.Wb(7,"mat-slide-toggle",5),n.dc("change",(function(){return e.toggleHeader()})),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Vb(),n.Wb(10,"span",6),n.Rb(11,"i",7),n.Qc(12),n.ic(13,"translate"),n.Wb(14,"b",8),n.Qc(15),n.Vb(),n.Vb(),n.Wb(16,"span",6),n.Rb(17,"i",9),n.Qc(18),n.ic(19,"translate"),n.Wb(20,"b",8),n.Qc(21),n.Vb(),n.Vb(),n.Wb(22,"span",10),n.Rb(23,"i",11),n.Qc(24),n.ic(25,"translate"),n.Wb(26,"b",8),n.Qc(27),n.Vb(),n.Vb(),n.Vb(),n.Oc(28,m2,3,0,"ng-container",12),n.Oc(29,I2,10,9,"ng-template",null,13,n.Pc),n.Vb(),n.Rb(31,"span",14),n.Wb(32,"div",15),n.Oc(33,P2,3,4,"button",16),n.Wb(34,"button",17),n.Qc(35),n.ic(36,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.zc(30);n.Db(2),n.Rc(n.jc(3,16,"lang.importContacts")),n.Db(3),n.Ib("hide",0===e.csvData.length||e.loading),n.Db(2),n.oc("checked",e.hasHeader),n.Db(1),n.Sc(" ",n.jc(9,18,"lang.csvHeader")," "),n.Db(4),n.Sc("\xa0",n.jc(13,20,"lang.contactsOfFile")," : "),n.Db(3),n.Rc(e.countAll),n.Db(3),n.Sc("\xa0",n.jc(19,22,"lang.additions")," : "),n.Db(3),n.Rc(e.countAdd),n.Db(3),n.Sc("\xa0",n.jc(25,24,"lang.modifications")," : "),n.Db(3),n.Rc(e.countUp),n.Db(1),n.oc("ngIf",e.loading)("ngIfElse",t),n.Db(5),n.oc("ngIf",e.csvData.length>0),n.Db(1),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(36,26,"lang.cancel"))}},directives:[q.i,q.f,M.a,te.a,P.t,q.c,k.b,q.d,V.c,ie,Kt.a,vt.o,P.s,vt.k,vt.n,vt.c,vt.i,vt.b,vt.h,Y.c,ee.a,X.u,X.x,W.p,j.a,vt.a,vt.j,vt.m],pipes:[g.d],styles:[".mat-dialog-content[_ngcontent-%COMP%]{display:flex;flex-direction:column}.loader[_ngcontent-%COMP%]{display:flex;height:100%;align-items:center;justify-content:center}.hide[_ngcontent-%COMP%]{display:none}.import-tool[_ngcontent-%COMP%]{font-size:14px}.dndFile[_ngcontent-%COMP%]{flex:1;display:flex;align-items:center;margin:0;justify-content:center;font-size:30px;opacity:.5!important;cursor:pointer}"]}),t})();const R2=["snav2"],j2=["adminMenuTemplate"],A2=["tableContactListSort"];function W2(t,e){if(1&t&&(n.Wb(0,"a",47),n.Rb(1,"mat-icon",48),n.Wb(2,"p",42),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Ib("active",t.current),n.oc("routerLink",t.route),n.Db(1),n.Fb(t.icon),n.Db(2),n.Sc(" ",t.label," ")}}function T2(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",39),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",40),n.Rb(5,"mat-icon",41),n.Wb(6,"p",42),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Wb(9,"a",43),n.dc("click",(function(){return n.Dc(t),n.hc().openContactExport()})),n.Rb(10,"mat-icon",44),n.Wb(11,"p",42),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Wb(14,"a",43),n.dc("click",(function(){return n.Dc(t),n.hc().openContactImportModal()})),n.Rb(15,"mat-icon",45),n.Wb(16,"p",42),n.Qc(17),n.ic(18,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Rb(19,"mat-divider"),n.Wb(20,"mat-nav-list"),n.Oc(21,W2,4,6,"a",46),n.Vb()}if(2&t){const t=n.hc();n.Db(2),n.Rc(n.jc(3,5,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,7,"lang.add")," "),n.Db(5),n.Sc(" ",n.jc(13,9,"lang.exportContacts")," "),n.Db(5),n.Sc(" ",n.jc(18,11,"lang.importContacts")," "),n.Db(4),n.oc("ngForOf",t.subMenus)}}function E2(t,e){1&t&&n.Rb(0,"mat-spinner")}function F2(t,e){if(1&t&&(n.Wb(0,"div",49),n.Oc(1,E2,1,0,"mat-spinner",50),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.isLoadingResults)}}function L2(t,e){if(1&t&&n.Rb(0,"mat-header-cell",51),2&t){const t=n.hc();n.Ib("hide-for-mobile",t.appService.getViewMode())}}function Q2(t,e){if(1&t&&(n.Wb(0,"mat-cell",52),n.Rb(1,"i",53),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit,i=n.hc();n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Gb("fas fa-circle threshold_",t.filling.thresholdLevel,""),n.oc("title",n.jc(2,6,"lang.contactFilledTo")+" "+t.filling.rate+"%")}}function N2(t,e){1&t&&(n.Wb(0,"mat-header-cell",54),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.firstname")))}function z2(t,e){if(1&t&&(n.Wb(0,"mat-cell",55),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.firstname," ")}}function B2(t,e){1&t&&(n.Wb(0,"mat-header-cell",54),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.lastname")))}function U2(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.lastname," ")}}function $2(t,e){1&t&&(n.Wb(0,"mat-header-cell",54),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.contactsParameters_company")," "))}function H2(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.company," ")}}function G2(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",56),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Sc(" ",n.jc(2,3,"lang.address"),"")}}function X2(t,e){if(1&t&&(n.Wb(0,"mat-cell",56),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc();n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",t.formatedAddress," ")}}function q2(t,e){1&t&&n.Rb(0,"mat-header-cell")}function K2(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",62),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc();return e.stopPropagation(),a.toggleContact(i)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",63),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.suspend"))}function Y2(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",64),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc();return e.stopPropagation(),a.toggleContact(i)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",65),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.authorize"))}function J2(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",57),n.Oc(1,K2,3,3,"button",58),n.Oc(2,Y2,3,3,"button",59),n.Wb(3,"button",60),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc();return i.stopPropagation(),s.deleteContact(a)})),n.ic(4,"translate"),n.Rb(5,"mat-icon",61),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",t.enabled),n.Db(1),n.oc("ngIf",!t.enabled),n.Db(1),n.oc("title",n.jc(4,3,"lang.delete"))}}function Z2(t,e){1&t&&n.Rb(0,"mat-header-row")}function t3(t,e){1&t&&n.Rb(0,"mat-row",66),2&t&&n.qc("routerLink","/administration/contacts/list/",e.$implicit.id,"")}const e3=function(){return["/rest/autocomplete/contacts"]};function i3(t,e){if(1&t){const t=n.Xb();n.Wb(0,"plugin-autocomplete",14),n.dc("triggerEvent",(function(e){return n.Dc(t),n.hc().setRedirectUser(e)})),n.ic(1,"translate"),n.ic(2,"translate"),n.Vb()}2&t&&n.oc("labelPlaceholder",n.jc(1,4,"lang.contactReplacement"))("labelList",n.jc(2,6,"lang.availableContacts"))("routeDatas",n.uc(8,e3))("targetSearchKey","contact")}function n3(t,e){1&t&&(n.Wb(0,"span"),n.Wb(1,"em"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,1,"lang.deleteContactInformations")))}function a3(t,e){1&t&&(n.Wb(0,"span"),n.Wb(1,"em"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,1,"lang.reaffectContactInformations")))}function s3(t,e){if(1&t&&(n.Wb(0,"div",15),n.Oc(1,n3,4,3,"span",16),n.Oc(2,a3,4,3,"span",16),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf","delete"==t.processMode),n.Db(1),n.oc("ngIf","reaffect"==t.processMode)}}let o3=(()=>{class t{constructor(t,e,i,a,s,o,r,c,l){this.translate=t,this.http=e,this.notify=i,this.headerService=a,this.appService=s,this.dialog=o,this.functions=r,this.adminService=c,this.viewContainerRef=l,this.loading=!1,this.filtersChange=new n.o,this.displayedColumnsContact=["filling","firstname","lastname","company","formatedAddress","actions"],this.isLoadingResults=!0,this.routeUrl="../rest/contacts",this.resultsLength=0,this.searchContact=new X.i,this.search="",this.destroy$=new da.a,this.subMenus=[{icon:"fa fa-book",route:"/administration/contacts",label:this.translate.instant("lang.contactsList"),current:!0},{icon:"fa fa-code",route:"/administration/contacts/contactsCustomFields",label:this.translate.instant("lang.customFieldsAdmin"),current:!1},{icon:"fa fa-cog",route:"/administration/contacts/contacts-parameters",label:this.translate.instant("lang.contactsParameters"),current:!1},{icon:"fa fa-users",route:"/administration/contacts/contacts-groups",label:this.translate.instant("lang.contactsGroups"),current:!1},{icon:"fas fa-magic",route:"/administration/contacts/duplicates",label:this.translate.instant("lang.duplicatesContactsAdmin"),current:!1}]}ngOnInit(){this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,this.adminService.setAdminId("admin_contacts_list"),this.functions.empty(this.adminService.getFilter())&&this.adminService.saveDefaultFilter(),this.initContactList(),this.initAutocompleteContacts()}initContactList(){this.resultListDatabase=new r3(this.http),this.paginator.pageIndex=this.adminService.getFilter("page"),this.sort.active=this.adminService.getFilter("sort"),this.sort.direction=this.adminService.getFilter("sortDirection"),this.sort.sortChange.subscribe(()=>this.paginator.pageIndex=0),Object(gy.a)(this.sort.sortChange,this.paginator.page,this.filtersChange).pipe(Object(Zo.a)(this.destroy$),Object(Qe.a)({}),Object(ft.a)(()=>(this.adminService.saveFilter({sort:this.sort.active,sortDirection:this.sort.direction,page:this.paginator.pageIndex,field:this.adminService.getFilter("field")}),this.search=this.adminService.getFilter("field"),this.isLoadingResults=!0,this.resultListDatabase.getRepoIssues(this.sort.active,this.sort.direction,this.paginator.pageIndex,this.routeUrl,this.search))),Object(l.a)(t=>(this.isLoadingResults=!1,t=this.processPostData(t),this.resultsLength=t.count,this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.contacts").toLowerCase(),"",""),t.contacts)),Object(m.a)(t=>(this.notify.handleErrors(t),this.isLoadingResults=!1,Object(c.a)([])))).subscribe(t=>this.data=t)}processPostData(t){return t.contacts.forEach(t=>{let e=[];e.push(t.addressNumber),e.push(t.addressStreet),e.push(t.addressPostcode),e.push(t.addressTown),e.push(t.addressCountry),t.formatedAddress=e.filter(t=>!this.isEmptyValue(t)).join(" ")}),this.displayedColumnsContact=this.functions.empty(t.contacts[0])||this.functions.empty(t.contacts[0].filling)?["firstname","lastname","company","formatedAddress","actions"]:["filling","firstname","lastname","company","formatedAddress","actions"],t}deleteContact(t){t.isUsed?(this.dialogRef=this.dialog.open(c3,{panelClass:"maarch-modal",autoFocus:!1}),this.dialogRef.afterClosed().subscribe(e=>{if(void 0!==e&&""!=e){var i="";"reaffect"==e.processMode&&(i="?redirect="+e.contactId),this.http.request("DELETE",`../rest/contacts/${t.id}${i}`).subscribe(()=>{this.refreshDao(),this.notify.success(this.translate.instant("lang.contactDeleted"))},t=>{this.notify.error(t.error.errors)})}this.dialogRef=null})):this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete("../rest/contacts/"+t.id)),Object(mt.a)(t=>{this.refreshDao(),this.notify.success(this.translate.instant("lang.contactDeleted"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}toggleContact(t){this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.suspend"),msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.put(`../rest/contacts/${t.id}/activation`,{enabled:!t.enabled})),Object(mt.a)(e=>{this.refreshDao(),this.notify.success(this.translate.instant(1==!t.enabled?"lang.contactEnabled":"lang.contactDisabled"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}openContactExport(){this.dialog.open(f2,{panelClass:"maarch-modal",width:"800px",autoFocus:!1})}openContactImportModal(){this.dialog.open(V2,{disableClose:!0,width:"99vw",maxWidth:"99vw",panelClass:"maarch-full-height-modal"}).afterClosed().pipe(Object(d.a)(t=>"success"===t),Object(mt.a)(()=>{this.refreshDao()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}refreshDao(){this.filtersChange.emit()}initAutocompleteContacts(){this.searchContact=new X.i(this.adminService.getFilter("field")),this.searchContact.valueChanges.pipe(Object(mt.a)(t=>{this.adminService.setFilter("field",t),this.adminService.saveFilter(this.adminService.getFilter()),0===t.length&&(this.search="",this.paginator.pageIndex=0,this.refreshDao())}),Object(pt.a)(300),Object(d.a)(t=>t.length>2),Object(bt.a)(),Object(mt.a)(t=>{this.search=t,this.paginator.pageIndex=0,this.refreshDao()})).subscribe()}isEmptyValue(t){return null===t||(Array.isArray(t)?!(t.length>0):""===String(t))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(q.b),n.Qb(_t.a),n.Qb(OL),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["contact-list"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(R2,!0),n.Kc(j2,!0),n.Kc(Kt.a,!0),n.Kc(A2,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:50,vars:21,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["class","example-loading-shade",4,"ngIf"],[1,"table-head"],[1,"table-head-result"],["floatLabel","never",2,"font-size","13px"],["type","text","matInput","","maxlength","128",3,"placeholder","formControl","click"],["autoCompleteInput",""],[1,"table-head-tool"],[1,"paginatorResultList",3,"length","hidePageSize","pageSize"],["paginatorContactList",""],[2,"height","90%","overflow","auto","position","absolute","width","100%"],["id","contact-list","matSort","","matSortDisableClear","",2,"width","100%",3,"dataSource"],["tableContactListSort","matSort"],["matColumnDef","filling"],["style","flex: initial;width: 60px;",3,"hide-for-mobile",4,"matHeaderCellDef"],["mat-cell","","style","flex: initial;width: 60px;",3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","firstname"],["mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","lastname"],[4,"matCellDef"],["matColumnDef","company"],["matColumnDef","formatedAddress"],["style","flex: 2;",3,"hide-for-mobile",4,"matHeaderCellDef"],["style","flex: 2;",3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","actions"],[4,"matHeaderCellDef"],["style","justify-content: flex-end;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor: pointer;",3,"routerLink",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["mat-subheader",""],["mat-list-item","","routerLink","/administration/contacts/list/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],["mat-list-item","",3,"click"],["color","primary","mat-list-icon","",1,"fa","fa-file-export"],["color","primary","mat-list-icon","",1,"fas","fa-file-import"],["mat-list-item","",3,"active","routerLink",4,"ngFor","ngForOf"],["mat-list-item","",3,"routerLink"],["color","primary","mat-list-icon",""],[1,"example-loading-shade"],[4,"ngIf"],[2,"flex","initial","width","60px"],["mat-cell","",2,"flex","initial","width","60px"],[3,"title"],["mat-sort-header",""],["mat-cell",""],[2,"flex","2"],[2,"justify-content","flex-end"],["mat-icon-button","","color","primary",3,"title","click",4,"ngIf"],["mat-icon-button","","color","accent",3,"title","click",4,"ngIf"],["mat-icon-button","","color","warn","data-toggle","modal","data-target","#changeDiffListDest",3,"title","click"],[1,"fa","fa-trash-alt","fa-2x"],["mat-icon-button","","color","primary",3,"title","click"],["aria-hidden","true",1,"fa","fa-pause","fa-2x"],["mat-icon-button","","color","accent",3,"title","click"],["aria-hidden","true",1,"fa","fa-check","fa-2x"],[2,"cursor","pointer",3,"routerLink"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,T2,22,13,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,F2,2,1,"div",9),n.Wb(14,"div",10),n.Wb(15,"div",11),n.Wb(16,"mat-form-field",12),n.Wb(17,"input",13,14),n.dc("click",(function(t){return t.stopPropagation()})),n.ic(19,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(20,"div",15),n.Rb(21,"mat-paginator",16,17),n.Vb(),n.Vb(),n.Wb(23,"div",18),n.Wb(24,"mat-table",19,20),n.Ub(26,21),n.Oc(27,L2,1,2,"mat-header-cell",22),n.Oc(28,Q2,3,8,"mat-cell",23),n.Tb(),n.Ub(29,24),n.Oc(30,N2,3,3,"mat-header-cell",25),n.Oc(31,z2,2,1,"mat-cell",26),n.Tb(),n.Ub(32,27),n.Oc(33,B2,3,3,"mat-header-cell",25),n.Oc(34,U2,2,1,"mat-cell",28),n.Tb(),n.Ub(35,29),n.Oc(36,$2,3,3,"mat-header-cell",25),n.Oc(37,H2,2,1,"mat-cell",28),n.Tb(),n.Ub(38,30),n.Oc(39,G2,3,5,"mat-header-cell",31),n.Oc(40,X2,2,3,"mat-cell",32),n.Tb(),n.Ub(41,33),n.Oc(42,q2,1,0,"mat-header-cell",34),n.Oc(43,J2,6,5,"mat-cell",35),n.Tb(),n.Oc(44,Z2,1,0,"mat-header-row",36),n.Oc(45,t3,1,1,"mat-row",37),n.Vb(),n.Wb(46,"div",38),n.Qc(47),n.ic(48,"translate"),n.Vb(),n.Vb(),n.Rb(49,"div",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.isLoadingResults),n.Db(4),n.oc("placeholder",n.jc(19,17,"lang.filterBy"))("formControl",e.searchContact),n.Db(4),n.oc("length",e.resultsLength)("hidePageSize",!0)("pageSize",10),n.Db(3),n.oc("dataSource",e.data),n.Db(20),n.oc("matHeaderRowDef",e.displayedColumnsContact),n.Db(1),n.oc("matRowDefColumns",e.displayedColumnsContact),n.Db(2),n.Tc(" ",e.resultsLength," ",n.jc(48,19,"lang.contactsAlt"),""))},directives:[I.e,I.f,Ot,We,P.t,Y.c,J.b,X.d,X.p,X.u,X.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,R.h,R.g,R.d,o.f,S.a,R.c,W.l,T.a,P.s,V.c,vt.h,vt.a,Fe.b,k.b,vt.j,vt.m,o.d],pipes:[g.d],styles:[".active[_ngcontent-%COMP%], .active[_ngcontent-%COMP%]:active, .active[_ngcontent-%COMP%]:focus, .active[_ngcontent-%COMP%]:hover{color:#135f7f;border-left:5px solid #135f7f;background:rgba(19,95,127,.14)}.paginatorResultList[_ngcontent-%COMP%] .mat-paginator-range-label{justify-content:flex-end;display:flex}.threshold_first[_ngcontent-%COMP%]{color:#e81c2b}.threshold_second[_ngcontent-%COMP%]{color:#f4891e}.threshold_third[_ngcontent-%COMP%]{color:#0aa34f}"]}),t})();class r3{constructor(t){this.http=t}getRepoIssues(t,e,i,n,a){return this.http.get(`${n}?limit=10&offset=${10*i}&order=${e}&orderBy=${t}&search=${a}`)}}let c3=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.data=i,this.dialogRef=n,this.notify=a,this.modalTitle=this.translate.instant("lang.confirmAction"),this.processMode="delete"}ngOnInit(){}setRedirectUser(t){this.redirectContact=t.id}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.a),n.Qb(q.h),n.Qb(D.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:29,vars:22,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["redirectConfForm","ngForm"],[1,"modal-body"],["role","alert",1,"alert-message","alert-message-danger"],[1,"input-group"],["id","processMode","name","processMode","color","primary","required","",2,"display","inline-flex","flex-direction","column",3,"ngModel","ngModelChange"],["value","delete","color","primary"],["value","reaffect","color","primary"],["singleMode","","required","",3,"labelPlaceholder","labelList","routeDatas","targetSearchKey","triggerEvent",4,"ngIf"],["class","alert-message alert-message-info","role","alert",4,"ngIf"],[1,"divider-modal"],["mat-raised-button","","color","primary","type","submit",3,"disabled","click"],["color","","mat-raised-button","",1,"actions",3,"click"],["singleMode","","required","",3,"labelPlaceholder","labelList","routeDatas","targetSearchKey","triggerEvent"],["role","alert",1,"alert-message","alert-message-info"],[4,"ngIf"]],template:function(t,e){if(1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-dialog-content"),n.Wb(5,"form",null,2),n.Wb(7,"div",3),n.Wb(8,"div",4),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Wb(11,"div",5),n.Wb(12,"mat-radio-group",6),n.dc("ngModelChange",(function(t){return e.processMode=t})),n.Wb(13,"mat-radio-button",7),n.Qc(14),n.ic(15,"translate"),n.Vb(),n.Wb(16,"mat-radio-button",8),n.Qc(17),n.ic(18,"translate"),n.Vb(),n.Vb(),n.Oc(19,i3,3,9,"plugin-autocomplete",9),n.Oc(20,s3,3,2,"div",10),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Rb(21,"span",11),n.Wb(22,"mat-dialog-actions"),n.Wb(23,"button",12),n.dc("click",(function(){return e.dialogRef.close({contactId:e.redirectContact,processMode:e.processMode})})),n.Qc(24),n.ic(25,"translate"),n.Vb(),n.Wb(26,"button",13),n.dc("click",(function(){return e.dialogRef.close("")})),n.Qc(27),n.ic(28,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.zc(6);n.Db(2),n.Rc(n.jc(3,10,"lang.contactsReassign")),n.Db(7),n.Sc(" ",n.jc(10,12,"lang.contactLinkedToMails")," "),n.Db(3),n.oc("ngModel",e.processMode),n.Db(2),n.Sc(" ",n.jc(15,14,"lang.deleteContactwithtoutReassign")," "),n.Db(3),n.Sc(" ",n.jc(18,16,"lang.reaffectContactRedirect")," "),n.Db(2),n.oc("ngIf","reaffect"==e.processMode),n.Db(1),n.oc("ngIf",e.processMode),n.Db(3),n.oc("disabled",!t.form.valid||!e.redirectContact&&"reaffect"==e.processMode),n.Db(1),n.Rc(n.jc(25,18,"lang.delete")),n.Db(3),n.Rc(n.jc(28,20,"lang.cancel"))}},directives:[q.i,q.f,X.K,X.v,X.w,hc.b,X.F,X.u,X.x,hc.a,P.t,q.c,k.b,ii],pipes:[g.d],encapsulation:2}),t})();const l3=["snav2"],d3=["adminMenuTemplate"];function h3(t,e){if(1&t&&(n.Wb(0,"a",16),n.Rb(1,"mat-icon",17),n.Wb(2,"p",18),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Ib("active",t.current),n.oc("routerLink",t.route),n.Db(1),n.Fb(t.icon),n.Db(2),n.Sc(" ",t.label," ")}}function u3(t,e){if(1&t&&(n.Wb(0,"mat-nav-list"),n.Oc(1,h3,4,6,"a",15),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",t.subMenus)}}function p3(t,e){1&t&&(n.Rb(0,"div",19),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.noCustomFieldInfo"),n.Ec)}function b3(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",35),n.dc("click",(function(){n.Dc(t);const e=n.hc(2).$implicit;return n.hc().sortValues(e)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",36),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.orderValues"))}function f3(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field",37),n.Wb(1,"input",38),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.label=i})),n.ic(2,"translate"),n.Vb(),n.Wb(3,"button",39),n.dc("click",(function(){n.Dc(t);const i=e.index,a=n.hc(2).$implicit;return n.hc().removeValue(a,i)})),n.ic(4,"translate"),n.Rb(5,"mat-icon",40),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.oc("ngModel",t.label)("placeholder",n.jc(2,3,"lang.newValue")),n.Db(2),n.oc("title",n.jc(4,5,"lang.delete"))}}function m3(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",21),n.Wb(1,"mat-expansion-panel",28),n.Wb(2,"mat-expansion-panel-header"),n.Wb(3,"mat-panel-title",29),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Wb(6,"div",30),n.Wb(7,"div",31),n.Wb(8,"button",32),n.dc("click",(function(){n.Dc(t);const e=n.hc().index;return n.hc().addValue(e)})),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Wb(11,"div"),n.Oc(12,b3,3,3,"button",33),n.Vb(),n.Vb(),n.Wb(13,"div",21),n.Oc(14,f3,6,7,"mat-form-field",34),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(3),n.oc("matBadge",t.values.length),n.Db(1),n.Sc(" ",n.jc(5,5,"lang.valuesList")," "),n.Db(5),n.Sc(" ",n.jc(10,7,"lang.addValue"),""),n.Db(3),n.oc("ngIf",t.values.length>0),n.Db(2),n.oc("ngForOf",t.values)}}const g3=function(){return["select","radio","checkbox"]};function v3(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-expansion-panel"),n.Wb(1,"mat-expansion-panel-header"),n.Wb(2,"mat-panel-title",20),n.Qc(3),n.Vb(),n.Wb(4,"mat-panel-description"),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Vb(),n.Wb(7,"div",21),n.Wb(8,"mat-form-field"),n.Wb(9,"input",22),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.id=i})),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Wb(11,"mat-form-field"),n.Wb(12,"input",23),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.label=i})),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Oc(14,m3,15,9,"div",24),n.Wb(15,"div",25),n.Wb(16,"button",26),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=e.index;return n.hc().updateCustomField(i,a)})),n.Qc(17),n.ic(18,"translate"),n.Vb(),n.Wb(19,"button",27),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc().removeCustomField(i)})),n.Qc(20),n.ic(21,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=e.index,a=n.hc();n.Db(3),n.Sc(" ",t.label," "),n.Db(2),n.Sc(" ",n.jc(6,12,"lang."+t.type+"Input")," "),n.Db(4),n.oc("ngModel",t.id)("placeholder",n.jc(10,14,"lang.technicalId"))("value",t.id),n.Db(3),n.oc("ngModel",t.label)("placeholder",n.jc(13,16,"lang.label"))("value",t.label),n.Db(2),n.oc("ngIf",n.uc(22,g3).indexOf(t.type)>-1),n.Db(2),n.oc("disabled",a.isModified(t,i)),n.Db(1),n.Rc(n.jc(18,18,"lang.update")),n.Db(3),n.Rc(n.jc(21,20,"lang.delete"))}}function _3(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-form-field",47),n.Rb(2,"textarea",48),n.ic(3,"translate"),n.Vb(),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(2),n.oc("placeholder",n.jc(3,1,"lang."+t.type+"Input"))}}function y3(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-form-field",47),n.Rb(2,"input",49),n.ic(3,"translate"),n.Vb(),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(2),n.oc("placeholder",n.jc(3,1,"lang."+t.type+"Input"))}}function x3(t,e){if(1&t&&(n.Wb(0,"mat-option",52),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Tc(" ",n.jc(2,3,"lang.choice")," ",t," ")}}function C3(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-form-field",47),n.Wb(2,"mat-select",50),n.ic(3,"translate"),n.Oc(4,x3,3,5,"mat-option",51),n.Vb(),n.Vb(),n.Tb()),2&t){const t=n.hc().$implicit,e=n.hc();n.Db(2),n.oc("placeholder",n.jc(3,2,"lang."+t.type+"Input")),n.Db(2),n.oc("ngForOf",e.sampleIncrement)}}function O3(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"mat-form-field",47),n.Wb(2,"input",53),n.dc("click",(function(){return n.Dc(t),n.zc(6).open()})),n.ic(3,"translate"),n.Vb(),n.Rb(4,"mat-datepicker-toggle",54),n.Rb(5,"mat-datepicker",null,55),n.Vb(),n.Tb()}if(2&t){const t=n.zc(6),e=n.hc().$implicit;n.Db(2),n.oc("matDatepicker",t)("placeholder",n.jc(3,3,"lang."+e.type+"Input")),n.Db(2),n.oc("for",t)}}function D3(t,e){if(1&t&&(n.Wb(0,"mat-radio-button",52),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Tc(" ",n.jc(2,3,"lang.choice")," ",t," ")}}function w3(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-radio-group",56),n.Oc(2,D3,3,5,"mat-radio-button",51),n.Vb(),n.Tb()),2&t){const t=n.hc(2);n.Db(2),n.oc("ngForOf",t.sampleIncrement)}}function M3(t,e){if(1&t&&(n.Wb(0,"mat-list-option",62),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Tc(" ",n.jc(2,3,"lang.choice")," ",t," ")}}function k3(t,e){1&t&&(n.Wb(0,"mat-chip"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.selectedValue")," "))}function S3(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div",57),n.Wb(2,"mat-selection-list",58,59),n.Oc(4,M3,3,5,"mat-list-option",60),n.Vb(),n.Vb(),n.Wb(5,"mat-chip-list",61),n.Oc(6,k3,3,3,"mat-chip",11),n.Vb(),n.Tb()),2&t){const t=n.zc(3),e=n.hc(2);n.Db(4),n.oc("ngForOf",e.sampleIncrement),n.Db(2),n.oc("ngForOf",t.selectedOptions.selected)}}function I3(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",41),n.Wb(1,"div",42),n.Wb(2,"button",43),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().addCustomField(i)})),n.ic(3,"translate"),n.Rb(4,"mat-icon",44),n.Vb(),n.Vb(),n.Wb(5,"div",31),n.Wb(6,"div",45),n.Qc(7),n.Vb(),n.Oc(8,_3,4,3,"ng-container",46),n.Oc(9,y3,4,3,"ng-container",46),n.Oc(10,C3,5,4,"ng-container",46),n.Oc(11,O3,7,5,"ng-container",46),n.Oc(12,w3,3,1,"ng-container",46),n.Oc(13,S3,7,2,"ng-container",46),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(2),n.oc("title",n.jc(3,8,"lang.add")),n.Db(5),n.Sc("",t.label," :"),n.Db(1),n.oc("ngIf","string"===t.type),n.Db(1),n.oc("ngIf","integer"===t.type),n.Db(1),n.oc("ngIf","select"===t.type),n.Db(1),n.oc("ngIf","date"===t.type),n.Db(1),n.oc("ngIf","radio"===t.type),n.Db(1),n.oc("ngIf","checkbox"===t.type)}}let P3=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.dialog=n,this.headerService=a,this.appService=s,this.sortPipe=o,this.viewContainerRef=r,this.loading=!0,this.subMenus=[{icon:"fa fa-book",route:"/administration/contacts",label:this.translate.instant("lang.contactsList"),current:!1},{icon:"fa fa-code",route:"/administration/contacts/contactsCustomFields",label:this.translate.instant("lang.customFieldsAdmin"),current:!0},{icon:"fa fa-cog",route:"/administration/contacts/contacts-parameters",label:this.translate.instant("lang.contactsParameters"),current:!1},{icon:"fa fa-users",route:"/administration/contacts/contacts-groups",label:this.translate.instant("lang.contactsGroups"),current:!1},{icon:"fas fa-magic",route:"/administration/contacts/duplicates",label:this.translate.instant("lang.duplicatesContactsAdmin"),current:!1}],this.customFieldsTypes=[{label:this.translate.instant("lang.stringInput"),type:"string"},{label:this.translate.instant("lang.integerInput"),type:"integer"},{label:this.translate.instant("lang.selectInput"),type:"select"},{label:this.translate.instant("lang.dateInput"),type:"date"},{label:this.translate.instant("lang.radioInput"),type:"radio"},{label:this.translate.instant("lang.checkboxInput"),type:"checkbox"}],this.customFields=[],this.customFieldsClone=[],this.incrementCreation=1,this.sampleIncrement=[1,2,3,4]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.customFields")+" "+this.translate.instant("lang.contacts")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.http.get("../rest/contactsCustomFields").pipe(Object(l.a)(t=>(t.customFields.forEach(t=>{t.values=t.values.map(t=>({label:t}))}),t)),Object(mt.a)(t=>{this.customFields=t.customFields,this.customFieldsClone=JSON.parse(JSON.stringify(this.customFields))}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}addCustomField(t){let e={};this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.add"),msg:this.translate.instant("lang.confirmAction")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{e={label:this.translate.instant("lang.newField")+" "+this.incrementCreation,type:t.type,values:[]}}),p(t=>this.http.post("../rest/contactsCustomFields",e)),Object(mt.a)(t=>{e.id=t.id,this.customFields.push(e),this.notify.success(this.translate.instant("lang.customFieldAdded")),this.incrementCreation++}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}addValue(t){this.customFields[t].values.push({label:""})}removeValue(t,e){t.values.splice(e,1)}removeCustomField(t){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete")+' "'+this.customFields[t].label+'"',msg:this.translate.instant("lang.confirmAction")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete("../rest/contactsCustomFields/"+this.customFields[t].id)),Object(mt.a)(()=>{this.customFields.splice(t,1),this.notify.success(this.translate.instant("lang.customFieldDeleted"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}updateCustomField(t,e){t.values=t.values.filter((t,e,i)=>i.map(t=>t.label).indexOf(t.label)===e);const i=Object.assign({},t);if(i.values=t.values.map(t=>t.label),this.customFields.filter(t=>t.label===i.label).length>1)return this.notify.handleErrors(this.translate.instant("lang.customFieldAlreadyExists")),Object(c.a)(!1);this.http.put("../rest/contactsCustomFields/"+t.id,i).pipe(Object(mt.a)(()=>{this.customFieldsClone[e]=JSON.parse(JSON.stringify(t)),this.notify.success(this.translate.instant("lang.customFieldUpdated"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}sortValues(t){t.values=this.sortPipe.transform(t.values,"label")}isModified(t,e){return JSON.stringify(t)===JSON.stringify(this.customFieldsClone[e])||""===t.label}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(y.a),n.Qb(w.a),n.Qb(Wt.a),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(l3,!0),n.Kc(d3,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first))},features:[n.Cb([Wt.a])],decls:25,vars:17,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],[3,"label"],["class","alert-message alert-message-info","role","alert",3,"innerHTML",4,"ngIf"],[4,"ngFor","ngForOf"],["position","end","opened","",1,"col-md-4","col-sm-12","customFielsdPanel",3,"mode","fixedInViewport"],["snav2",""],["class","customFieldsTypesItem",4,"ngFor","ngForOf"],["mat-list-item","",3,"active","routerLink",4,"ngFor","ngForOf"],["mat-list-item","",3,"routerLink"],["color","primary","mat-list-icon",""],["mat-line",""],["role","alert",1,"alert-message","alert-message-info",3,"innerHTML"],["color","primary"],[1,"col-md-12"],["matInput","","name","id","disabled","",3,"ngModel","placeholder","value","ngModelChange"],["matInput","","name","label",3,"ngModel","placeholder","value","ngModelChange"],["class","col-md-12",4,"ngIf"],[1,"col-md-12","text-center"],["mat-raised-button","","color","primary",3,"disabled","click"],["mat-raised-button","","color","warn",3,"click"],["opened","",1,"customFieldValues"],["matBadgeSize","small",3,"matBadge"],[1,"actionValuesCustom"],[2,"flex","1"],["mat-raised-button","","color","primary",3,"click"],["mat-mini-fab","","color","default",3,"title","click",4,"ngIf"],["floatLabel","never",4,"ngFor","ngForOf"],["mat-mini-fab","","color","default",3,"title","click"],["color","primary",1,"fas","fa-sort-alpha-down",2,"height","auto"],["floatLabel","never"],["matInput","",3,"ngModel","placeholder","ngModelChange"],["color","warn","mat-icon-button","","matSuffix","",3,"title","click"],[1,"fa","fa-trash"],[1,"customFieldsTypesItem"],[1,"addCustomFieldTypeContainer"],["mat-icon-button","","color","primary",3,"title","click"],[1,"fas","fa-plus-circle","fa-2x"],[2,"color","rgba(0,0,0,0.54)"],[4,"ngIf"],["floatLabel","never",1,"input-form"],["matInput","","matTextareaAutosize","","matAutosizeMinRows","1","cdkAutosizeMaxRows","6","disabled","",3,"placeholder"],["type","number","matInput","","disabled","",3,"placeholder"],["disabled","",3,"placeholder"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["matInput","","disabled","",3,"matDatepicker","placeholder","click"],["matSuffix","",3,"for"],["picker",""],["color","primary","disabled","",1,"radio-form"],[1,"input-form","checkbox-form"],["disabled","",1,"div-list"],["sampleList",""],["checkboxPosition","before",3,"value",4,"ngFor","ngForOf"],[1,"checkbox-selected-list"],["checkboxPosition","before",3,"value"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,u3,2,1,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Wb(13,"mat-tab-group"),n.Wb(14,"mat-tab",9),n.ic(15,"translate"),n.Oc(16,p3,2,3,"div",10),n.Wb(17,"mat-accordion"),n.Oc(18,v3,22,23,"mat-expansion-panel",11),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(19,"mat-sidenav",12,13),n.Wb(21,"mat-tab-group"),n.Wb(22,"mat-tab",9),n.ic(23,"translate"),n.Oc(24,I3,14,10,"div",14),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(3),n.oc("label",n.jc(15,13,"lang.usableFields")),n.Db(2),n.oc("ngIf",0===e.customFields.length),n.Db(2),n.oc("ngForOf",e.customFields),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode()),n.Db(3),n.oc("label",n.jc(23,15,"lang.customFieldsTypesAvailable")),n.Db(2),n.oc("ngForOf",e.customFieldsTypes))},directives:[I.e,I.f,Ot,We,Te.c,Te.a,P.t,gt.a,P.s,I.d,R.h,R.d,o.f,S.a,R.c,W.l,gt.c,gt.g,gt.h,gt.f,Y.c,J.b,X.d,X.u,X.x,k.b,wt.a,Y.j,J.d,ee.a,W.p,ae.h,ae.j,ae.f,hc.b,hc.a,R.i,ze.d,R.f,ze.a],pipes:[g.d],styles:[".active[_ngcontent-%COMP%], .active[_ngcontent-%COMP%]:active, .active[_ngcontent-%COMP%]:focus, .active[_ngcontent-%COMP%]:hover{color:#135f7f;border-left:5px solid #135f7f;background:rgba(19,95,127,.14)}.mat-divider[_ngcontent-%COMP%]{padding-top:10px;padding-bottom:10px}.customFielsdPanel[_ngcontent-%COMP%], .customFielsdPanel[_ngcontent-%COMP%] .mat-tab-body-wrapper{padding-left:0}.mat-expansion-panel-header-description[_ngcontent-%COMP%]{flex-direction:row-reverse}.customFieldValues[_ngcontent-%COMP%]{box-shadow:none;border:1px solid rgba(0,0,0,.12)}.mat-expansion-panel[_ngcontent-%COMP%]{margin:5px}.mat-accordion[_ngcontent-%COMP%]{padding:5px}.mat-tab-body-content[_ngcontent-%COMP%], .mat-tab-body-wrapper[_ngcontent-%COMP%], .mat-tab-group[_ngcontent-%COMP%]{height:100%}.actionsCustomFields[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.actionValuesCustom[_ngcontent-%COMP%]{display:flex}.alert-message-info[_ngcontent-%COMP%]{margin-top:30px;max-width:100%}.addCustomFieldTypeContainer[_ngcontent-%COMP%]{justify-content:center;display:flex;align-items:center;width:60px}.customFieldsTypesItem[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.mat-badge-content[_ngcontent-%COMP%]{top:2px!important}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();const V3=["adminMenuTemplate"];function R3(t,e){if(1&t&&(n.Wb(0,"a",11),n.Rb(1,"mat-icon",12),n.Wb(2,"p",13),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Ib("active",t.current),n.oc("routerLink",t.route),n.Db(1),n.Fb(t.icon),n.Db(2),n.Sc(" ",t.label," ")}}function j3(t,e){if(1&t&&(n.Wb(0,"mat-nav-list"),n.Oc(1,R3,4,6,"a",10),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",t.subMenus)}}function A3(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-contact-form",14),n.dc("onSubmitEvent",(function(){return n.Dc(t),n.hc().goToList()})),n.Vb()}if(2&t){const t=n.hc();n.oc("creationMode",t.creationMode)("contactId",t.contactId)}}let W3=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.route=i,this.router=n,this.headerService=a,this.appService=s,this.dialog=o,this.viewContainerRef=r,this.loading=!1,this.creationMode=!0,this.subMenus=[{icon:"fa fa-book",route:"/administration/contacts",label:this.translate.instant("lang.contactsList"),current:!1},{icon:"fa fa-code",route:"/administration/contacts/contactsCustomFields",label:this.translate.instant("lang.customFieldsAdmin"),current:!1},{icon:"fa fa-cog",route:"/administration/contacts/contacts-parameters",label:this.translate.instant("lang.contactsParameters"),current:!1},{icon:"fa fa-users",route:"/administration/contacts/contacts-groups",label:this.translate.instant("lang.contactsGroups"),current:!1},{icon:"fas fa-magic",route:"/administration/contacts/duplicates",label:this.translate.instant("lang.duplicatesContactsAdmin"),current:!1}],this.contactId=null}ngOnInit(){this.loading=!0,this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.route.params.subscribe(t=>{void 0===t.id?(this.headerService.setHeader(this.translate.instant("lang.contactCreation")),this.creationMode=!0,this.loading=!1):(this.headerService.setHeader(this.translate.instant("lang.contactModification")),this.creationMode=!1,this.contactId=t.id,this.loading=!1)})}goToList(){this.router.navigate(["/administration/contacts"])}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(y.a),n.Qb(w.a),n.Qb(q.b),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(V3,!0),2&t&&n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first)},decls:14,vars:7,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],[3,"creationMode","contactId","onSubmitEvent",4,"ngIf"],["mat-list-item","",3,"active","routerLink",4,"ngFor","ngForOf"],["mat-list-item","",3,"routerLink"],["color","primary","mat-list-icon",""],["mat-line",""],[3,"creationMode","contactId","onSubmitEvent"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,j3,2,1,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,A3,1,2,"app-contact-form",9),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,R.h,P.s,R.d,o.f,S.a,R.c,W.l,El],styles:[".active[_ngcontent-%COMP%], .active[_ngcontent-%COMP%]:active, .active[_ngcontent-%COMP%]:focus, .active[_ngcontent-%COMP%]:hover{color:#135f7f;border-left:5px solid #135f7f;background:rgba(19,95,127,.14)}"]}),t})();const T3=["adminMenuTemplate"];function E3(t,e){1&t&&(n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",29),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",30),n.Rb(5,"mat-icon",31),n.Wb(6,"p",32),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,2,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,4,"lang.add")," "))}function F3(t,e){1&t&&(n.Wb(0,"mat-header-cell",33),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.label")))}function L3(t,e){if(1&t&&(n.Wb(0,"mat-cell",34),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.label," ")}}function Q3(t,e){1&t&&(n.Wb(0,"mat-header-cell",33),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.description")))}function N3(t,e){if(1&t&&(n.Wb(0,"mat-cell",34),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.description," ")}}function z3(t,e){1&t&&n.Rb(0,"mat-header-cell")}function B3(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",35),n.Wb(1,"button",36),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc();return i.stopPropagation(),s.deleteTag(a)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",37),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.oc("title",n.jc(2,1,"lang.delete")))}function U3(t,e){1&t&&n.Rb(0,"mat-header-row")}function $3(t,e){1&t&&n.Rb(0,"mat-row",38),2&t&&n.qc("routerLink","/administration/tags/",e.$implicit.id,"")}let H3=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.dialog=s,this.functions=o,this.adminService=r,this.viewContainerRef=c,this.loading=!0,this.resultsLength=0,this.displayedColumns=["label","description","actions"],this.filterColumns=["label","description"]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.tags")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loadList()}loadList(){this.loading=!0,this.http.get("../rest/tags").pipe(Object(mt.a)(t=>{this.resultsLength=t.tags.length,setTimeout(()=>{this.adminService.setDataSource("admin_tag",t.tags,this.sort,this.paginator,this.filterColumns)},0)}),Object(Xt.a)(()=>this.loading=!1)).subscribe()}deleteTag(t){this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:`${this.translate.instant("lang.delete")} "${t.label}"`,msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete("../rest/tags/"+t.id)),Object(mt.a)(()=>{this.loadList(),this.notify.success(this.translate.instant("lang.tagDeleted"))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(q.b),n.Qb(_t.a),n.Qb(OL),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(T3,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:38,vars:20,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],[1,"table-head"],[1,"table-head-result"],[2,"font-size","13px"],["matInput","",3,"formControl","placeholder"],[1,"table-head-tool"],[3,"length","hidePageSize","pageSize"],["paginator",""],[2,"height","90%","overflow","auto","position","absolute","width","100%"],["id","contact-list","matSort","","matSortDisableClear","",2,"width","100%",3,"dataSource"],["tableContactListSort","matSort"],["matColumnDef","label"],["mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","description"],["matColumnDef","actions"],[4,"matHeaderCellDef"],["style","justify-content: flex-end;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor: pointer;",3,"routerLink",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","display","flex","justify-content","end","align-items","center","padding-left","20px"],["mat-subheader",""],["mat-list-item","","routerLink","/administration/tags/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],["mat-sort-header",""],["mat-cell",""],[2,"justify-content","flex-end"],["mat-icon-button","","color","warn",3,"title","click"],[1,"fa","fa-trash-alt","fa-2x"],[2,"cursor","pointer",3,"routerLink"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,E3,9,6,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Wb(13,"div",9),n.Wb(14,"div",10),n.Wb(15,"mat-form-field",11),n.Rb(16,"input",12),n.ic(17,"translate"),n.Vb(),n.Vb(),n.Wb(18,"div",13),n.Rb(19,"mat-paginator",14,15),n.Vb(),n.Vb(),n.Wb(21,"div",16),n.Wb(22,"mat-table",17,18),n.Ub(24,19),n.Oc(25,F3,3,3,"mat-header-cell",20),n.Oc(26,L3,2,1,"mat-cell",21),n.Tb(),n.Ub(27,22),n.Oc(28,Q3,3,3,"mat-header-cell",20),n.Oc(29,N3,2,1,"mat-cell",21),n.Tb(),n.Ub(30,23),n.Oc(31,z3,1,0,"mat-header-cell",24),n.Oc(32,B3,4,3,"mat-cell",25),n.Tb(),n.Oc(33,U3,1,0,"mat-header-row",26),n.Oc(34,$3,1,1,"mat-row",27),n.Vb(),n.Wb(35,"div",28),n.Qc(36),n.ic(37,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(5),n.pc("placeholder",n.jc(17,16,"lang.filterBy")),n.oc("formControl",e.adminService.getFilterField()),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(3),n.oc("dataSource",e.adminService.getDataSource()),n.Db(11),n.oc("matHeaderRowDef",e.displayedColumns),n.Db(1),n.oc("matRowDefColumns",e.displayedColumns),n.Db(2),n.Tc(" ",e.resultsLength," ",n.jc(37,18,"lang.tags"),""))},directives:[I.e,I.f,Ot,We,Y.c,J.b,X.d,X.u,X.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,R.h,R.g,R.d,o.f,S.a,R.c,W.l,vt.h,Fe.b,vt.a,k.b,vt.j,vt.m,o.d],pipes:[g.d],encapsulation:2}),t})();const G3=["linkedTagInput"];function X3(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",31),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).remove(i)}))("removed",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).remove(i)})),n.Qc(1),n.Rb(2,"mat-icon",32),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.Db(1),n.Sc(" ",i.getTagLabel(t)," ")}}function q3(t,e){if(1&t&&(n.Wb(0,"mat-option",33),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.oc("value",t)("disabled",i.isSelected(t)||t.id==i.id),n.Db(1),n.Sc(" ",t.label," ")}}function K3(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"mat-chip-list",null,24),n.Oc(3,X3,3,1,"mat-chip",25),n.Rb(4,"input",26,27),n.ic(6,"translate"),n.Vb(),n.Wb(7,"mat-autocomplete",28,29),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc().selected(e)})),n.Oc(9,q3,2,3,"mat-option",30),n.ic(10,"async"),n.Vb(),n.Vb()}if(2&t){const t=n.zc(2),e=n.zc(8),i=n.hc();n.Db(3),n.oc("ngForOf",i.tag.links.value),n.Db(1),n.oc("placeholder",n.jc(6,6,"lang.linkedTags"))("formControl",i.myControl)("matAutocomplete",e)("matChipInputFor",t),n.Db(5),n.oc("ngForOf",n.jc(10,8,i.filteredOptions))}}function Y3(t,e){1&t&&(n.Wb(0,"div",34),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.cannotMergeTags")," "))}function J3(t,e){if(1&t){const t=n.Xb();n.Wb(0,"plugin-select-search",35),n.dc("afterOpened",(function(){return n.Dc(t),n.hc().getTags()}))("afterSelected",(function(e){return n.Dc(t),n.hc().mergeTag(e)})),n.ic(1,"translate"),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc();n.oc("label",n.jc(1,4,"lang.mergeTagWith"))("placeholderLabel",n.jc(2,6,"lang.mergeTagWith"))("formControlSelect",t.selectMergeTag)("datas",t.tags)}}let Z3=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this.translate=t,this.http=e,this.route=i,this.router=n,this.notify=a,this.headerService=s,this.appService=o,this.functions=r,this.dialog=c,this.loading=!1,this.loadingTags=!0,this.advancedMode=!1,this.tags=[],this.tag={label:new X.i({value:"",disabled:!1},[X.I.required]),description:new X.i({value:"",disabled:!1}),parentId:new X.i({value:"",disabled:!1}),links:new X.i({value:[],disabled:!1}),usage:new X.i({value:"",disabled:!1}),canMerge:new X.i({value:!0,disabled:!1}),countResources:new X.i({value:0,disabled:!1})},this.myControl=new X.i,this.selectMergeTag=new X.i({value:"",disabled:!1}),this.tagFormGroup=new X.l(this.tag),this.currTagChildren=[]}ngOnInit(){this.loading=!0,this.route.params.subscribe(t=>Object(r.a)(this,void 0,void 0,(function*(){this.id=t.id,yield this.getTags(),void 0===t.id?(this.headerService.setHeader(this.translate.instant("lang.tagCreation")),this.creationMode=!0,this.loading=!1):(this.creationMode=!1,this.http.get("../rest/tags/"+this.id).pipe(Object(mt.a)(t=>{Object.keys(this.tag).forEach(e=>{this.functions.empty(t[e])||this.tag[e].setValue(t[e])}),this.functions.empty(this.tag.parentId.value)||this.toggleAdvancedTag(),this.headerService.setHeader(this.translate.instant("lang.tagModification"),this.tag.label.value)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe())})))}onSubmit(){this.creationMode?this.createTag():this.updateTag()}formatTag(){const t={};return Object.keys(this.tag).forEach(e=>{t[e]=this.tag[e].value}),t}createTag(){this.http.post("../rest/tags",this.formatTag()).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.tagAdded")),this.router.navigate(["/administration/tags"])}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}updateTag(){this.http.put("../rest/tags/"+this.id,this.formatTag()).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.tagUpdated")),this.router.navigate(["/administration/tags"])}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}getTags(){return new Promise(t=>{this.http.get("../rest/tags").pipe(Object(mt.a)(e=>{this.tags=e.tags.map(t=>({id:t.id,label:t.label,parentId:t.parentId,countResources:t.countResources,disabled:t.id==this.id})),t(!0)}),Object(Xt.a)(()=>this.loadingTags=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}mergeTag(t){this.selectMergeTag.reset();const e=this.tags.filter(e=>e.id===t)[0],i=`${this.translate.instant("lang.confirmAction")}<br/><br/>${this.translate.instant("lang.theTag")}<b> "${this.tag.label.value}" </b>${this.translate.instant("lang.willBeDeletedAndMerged")}<b> "${e.label}"</b><br/><br/>${this.translate.instant("lang.willBeTransferredToNewTag")}<b> "${e.label}"</b> : <b>${this.tag.countResources.value}</b>`;this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:`${this.translate.instant("lang.mergeWith")} "${e.label}"`,msg:i}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.put("../rest/mergeTags",{idMaster:e.id,idMerge:this.id})),Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.tagMerged")),this.router.navigate(["/administration/tags/"+e.id])}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}toggleAdvancedTag(){return Object(r.a)(this,void 0,void 0,(function*(){this.advancedMode=!this.advancedMode,this.getTagsTree(),this.filteredOptions=this.myControl.valueChanges.pipe(Object(Qe.a)(null),Object(l.a)(t=>t?this._filter(t):this.tags.slice()))}))}_filter(t){let e=t;return"string"==typeof t&&(e=t.toLowerCase()),this.tags.filter(t=>t.label.toLowerCase().indexOf(e)>-1)}isSelected(t){return this.tag.links.value.filter(e=>e==t.id).length>0}remove(t){const e=this.tag.links.value.indexOf(t);e>=0&&this.tag.links.value.splice(e,1)}selected(t){const e=this.tag.links.value;e.push(t.option.value.id),this.tag.links.setValue(e),this.linkedTagInput.nativeElement.value="",this.myControl.setValue(null)}getTagsTree(){this.functions.empty(this.id)||this.getChildrens(this.id);const t=this.tags.map(t=>({id:t.id,text:t.label,parent:this.functions.empty(t.parentId)?"#":t.parentId,state:{opened:this.tag.parentId.value==t.id,selected:this.tag.parentId.value==t.id,disabled:this.currTagChildren.indexOf(t.id.toString())>-1}}));setTimeout(()=>{$("#jstree").on("select_node.jstree",(t,e)=>{this.tag.parentId.setValue(parseInt(e.node.id))}).on("deselect_node.jstree",(t,e)=>{this.tag.parentId.setValue(null)}).jstree({checkbox:{deselect_all:!0,three_state:!1},core:{force_text:!0,themes:{name:"proton",responsive:!0},multiple:!1,data:t},plugins:["checkbox","search","sort"]});let e=!1;$("#jstree_search").keyup((function(){e&&clearTimeout(e),e=setTimeout((function(){const t=$("#jstree_search").val();$("#jstree").jstree(!0).search(t)}),250)}))},0)}getChildrens(t){this.currTagChildren.push(t.toString()),this.tags.filter(e=>e.parentId==t).forEach(t=>{this.getChildrens(t.id)})}getTagLabel(t){return this.tags.filter(e=>e.id==t)[0].label}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a),n.Qb(q.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Xc(G3,!0),2&t&&n.yc(i=n.ec())&&(e.linkedTagInput=i.first)},decls:44,vars:39,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],[2,"height","90%","overflow","auto","position","absolute","width","100%"],[2,"padding","20px",3,"ngSubmit"],["matInput","","type","text","maxlength","128","required","",3,"formControl","placeholder"],["matInput","","type","text",3,"formControl","placeholder"],[4,"ngIf"],["class","alert-message alert-message-danger","style","min-width: 100%;",4,"ngIf"],["style","width:100%;",3,"label","placeholderLabel","formControlSelect","datas","afterOpened","afterSelected",4,"ngIf"],[1,"text-center"],["mat-raised-button","","color","primary",3,"disabled"],["type","button","mat-raised-button","","color","default",3,"click"],["fixedTopGap","56","position","end",2,"overflow-x","hidden","width","450px",3,"mode","fixedInViewport","opened"],["snav2",""],["mat-subheader",""],[2,"padding","10px"],["matInput","","id","jstree_search","name","jstree_search","type","text",3,"placeholder"],["id","jstree"],["chipList",""],["style","cursor: pointer;",3,"click","removed",4,"ngFor","ngForOf"],[3,"placeholder","formControl","matAutocomplete","matChipInputFor"],["linkedTagInput",""],[3,"optionSelected"],["auto","matAutocomplete"],[3,"value","disabled",4,"ngFor","ngForOf"],[2,"cursor","pointer",3,"click","removed"],["matChipRemove","",1,"fa","fa-times-circle"],[3,"value","disabled"],[1,"alert-message","alert-message-danger",2,"min-width","100%"],[2,"width","100%",3,"label","placeholderLabel","formControlSelect","datas","afterOpened","afterSelected"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Wb(11,"div",8),n.Wb(12,"form",9),n.dc("ngSubmit",(function(){return e.onSubmit()})),n.Wb(13,"mat-form-field"),n.Rb(14,"input",10),n.ic(15,"translate"),n.Vb(),n.Wb(16,"mat-form-field"),n.Rb(17,"textarea",11),n.ic(18,"translate"),n.Vb(),n.Wb(19,"mat-form-field"),n.Rb(20,"input",11),n.ic(21,"translate"),n.Vb(),n.Oc(22,K3,11,10,"mat-form-field",12),n.Oc(23,Y3,3,3,"div",13),n.Oc(24,J3,3,8,"plugin-select-search",14),n.Wb(25,"div",15),n.Wb(26,"button",16),n.Qc(27),n.ic(28,"translate"),n.Vb(),n.Wb(29,"button",17),n.dc("click",(function(){return e.toggleAdvancedTag()})),n.Qc(30),n.ic(31,"translate"),n.ic(32,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(33,"mat-sidenav",18,19),n.Wb(35,"mat-list"),n.Wb(36,"h3",20),n.Qc(37),n.ic(38,"translate"),n.Vb(),n.Wb(39,"div",21),n.Wb(40,"mat-form-field"),n.Rb(41,"input",22),n.ic(42,"translate"),n.Vb(),n.Rb(43,"div",23),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(5),n.oc("formControl",e.tag.label)("placeholder",n.jc(15,23,"lang.label")),n.Db(3),n.oc("formControl",e.tag.description)("placeholder",n.jc(18,25,"lang.description")),n.Db(3),n.oc("formControl",e.tag.usage)("placeholder",n.jc(21,27,"lang.usage")),n.Db(2),n.oc("ngIf",e.advancedMode),n.Db(1),n.oc("ngIf",!e.creationMode&&!e.tag.canMerge.value),n.Db(1),n.oc("ngIf",!e.loadingTags&&e.tag.canMerge.value&&!e.creationMode),n.Db(2),n.oc("disabled",!e.tagFormGroup.valid),n.Db(1),n.Rc(n.jc(28,29,"lang.validate")),n.Db(3),n.Sc(" ",e.advancedMode?n.jc(31,31,"lang.defaultMode"):n.jc(32,33,"lang.advancedMode")," "),n.Db(3),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",e.advancedMode),n.Db(4),n.Sc("",n.jc(38,35,"lang.selectParentTag")," :"),n.Db(4),n.pc("placeholder",n.jc(42,37,"lang.searchTag")))},directives:[I.e,I.f,Ot,We,X.K,X.v,X.w,Y.c,J.b,X.d,X.p,X.F,X.u,X.j,P.t,k.b,I.d,R.a,R.g,ze.d,P.s,Ne.d,ze.c,Ne.a,ze.a,S.a,ze.e,W.p,fr],pipes:[g.d,P.b],encapsulation:2}),t})();const t4=["snav2"],e4=["maarchTree"];function i4(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Vb())}const n4=function(t){return[t]};function a4(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",17),n.Wb(1,"form",18,19),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Wb(3,"mat-form-field"),n.Wb(4,"input",20),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().alfresco.label=e})),n.ic(5,"translate"),n.ic(6,"translate"),n.Vb(),n.Vb(),n.Wb(7,"div",21),n.Wb(8,"div",22),n.Wb(9,"div",23),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Wb(12,"div",24),n.Wb(13,"mat-form-field"),n.Wb(14,"input",25),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().alfresco.account.id=e})),n.ic(15,"translate"),n.ic(16,"translate"),n.Vb(),n.Vb(),n.Wb(17,"mat-form-field"),n.Wb(18,"input",26),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().alfresco.account.password=e})),n.ic(19,"translate"),n.ic(20,"translate"),n.ic(21,"translate"),n.ic(22,"translate"),n.Vb(),n.Wb(23,"mat-icon",27),n.dc("click",(function(){n.Dc(t);const e=n.hc();return e.hidePassword=!e.hidePassword})),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(24,"div",28),n.Wb(25,"div",23),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Wb(28,"mat-form-field"),n.Wb(29,"input",29),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().alfresco.rootFolder=e})),n.ic(30,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(31,"div",30),n.Wb(32,"button",31),n.dc("click",(function(){return n.Dc(t),n.hc().checkAccount()})),n.Qc(33),n.ic(34,"translate"),n.Vb(),n.Wb(35,"button",32),n.Qc(36),n.ic(37,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(2),e=n.hc();n.Db(4),n.pc("title",n.jc(5,20,"lang.label")),n.pc("placeholder",n.jc(6,22,"lang.label")),n.oc("ngModel",e.alfresco.label),n.Db(6),n.Sc(" ",n.jc(11,24,"lang.alfrescoAccount")," "),n.Db(4),n.pc("title",n.jc(15,26,"lang.id")),n.pc("placeholder",n.jc(16,28,"lang.id")),n.oc("ngModel",e.alfresco.account.id),n.Db(4),n.oc("ngModel",e.alfresco.account.password)("required",e.creationMode)("title",e.creationMode?n.jc(19,30,"lang.password"):n.jc(20,32,"lang.changePassword"))("type",e.hidePassword?"password":"text")("placeholder",e.creationMode?n.jc(21,34,"lang.password"):n.jc(22,36,"lang.changePassword")),n.Db(5),n.oc("ngClass",n.vc(46,n4,e.hidePassword?"fa-eye-slash":"fa-eye")),n.Db(3),n.Sc(" ",n.jc(27,38,"lang.rootFolder")," "),n.Db(3),n.oc("ngModel",e.alfresco.rootFolder)("title",n.jc(30,40,"lang.id")),n.Db(3),n.oc("disabled",e.functionsService.empty(e.alfresco.account.id)||e.functionsService.empty(e.alfresco.account.password)&&e.creationMode),n.Db(1),n.Rc(n.jc(34,42,"lang.test")),n.Db(2),n.oc("disabled",!t.valid||!e.validAccount()),n.Db(1),n.Rc(n.jc(37,44,"lang.validate"))}}let s4=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.route=i,this.router=n,this.notify=a,this.headerService=s,this.appService=o,this.functionsService=r,this.loading=!1,this.creationMode=!0,this.entities=[],this.availableEntities=[],this.alfresco={id:0,label:"",account:{id:"",password:""},rootFolder:null,linkedEntities:[]},this.hidePassword=!0,this.alfrescoTreeLoaded=!1}ngOnInit(){this.loading=!1,this.route.params.subscribe(t=>Object(r.a)(this,void 0,void 0,(function*(){void 0===t.id?(this.headerService.setHeader(this.translate.instant("lang.alfrescoCreation")),this.creationMode=!0):(this.headerService.setHeader(this.translate.instant("lang.alfrescoModification")),this.alfresco.id=t.id,this.creationMode=!1),yield this.getEntities(),yield this.getAvailableEntities(),yield this.initAccount(),this.loading=!1})))}onSubmit(){this.creationMode?this.createAccount():this.updateAccount()}createAccount(){this.http.post("../rest/alfresco/accounts",this.formatData()).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.accountAdded")),this.router.navigate(["/administration/alfresco"])}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}updateAccount(){this.http.put("../rest/alfresco/accounts/"+this.alfresco.id,this.formatData()).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.accountUpdated")),this.router.navigate(["/administration/alfresco"])}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}formatData(){const t={label:this.alfresco.label,login:this.alfresco.account.id,nodeId:this.alfresco.rootFolder,entities:this.maarchTree.getSelectedNodes().map(t=>t.id)};return this.functionsService.empty(this.alfresco.account.password)||(t.password=this.alfresco.account.password),t}getAvailableEntities(){return new Promise((t,e)=>{this.http.get("../rest/alfresco/availableEntities").pipe(Object(mt.a)(e=>{this.availableEntities=e.availableEntities,t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}getEntities(){return new Promise((t,e)=>{this.http.get("../rest/entities").pipe(Object(l.a)(t=>(t.entities=t.entities.map(t=>({text:t.entity_label,icon:t.icon,parent_id:t.parentSerialId,id:t.serialId,state:{opened:!0}})),t.entities)),Object(mt.a)(e=>{this.entities=e,t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}initAccount(){return new Promise((t,e)=>{this.creationMode?this.http.get("../rest/entities").pipe(Object(l.a)(t=>(t.entities=t.entities.map(t=>({text:t.entity_label,icon:t.icon,parent_id:t.parentSerialId,id:t.serialId,state:{opened:!0}})),t.entities)),Object(mt.a)(e=>{this.entities=e,this.entities.forEach(t=>{t.state.disabled=!(this.availableEntities.indexOf(+t.id)>-1)}),setTimeout(()=>{this.initEntitiesTree(this.entities)},0),t(!0)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe():this.http.get("../rest/alfresco/accounts/"+this.alfresco.id).pipe(Object(mt.a)(e=>{this.alfresco={id:e.id,label:e.label,account:{id:e.login},rootFolder:e.nodeId,linkedEntities:e.entities},this.entities.forEach(t=>{t.state.disabled=!(this.availableEntities.indexOf(+t.id)>-1),this.alfresco.linkedEntities.indexOf(+t.id)>-1&&(t.state.disabled=!1,t.state.selected=!0)}),setTimeout(()=>{this.initEntitiesTree(this.entities)},0),t(!0)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()})}initEntitiesTree(t){this.maarchTree.initData(t)}validAccount(){return!this.functionsService.empty(this.alfresco.rootFolder)&&0!==this.maarchTree.getSelectedNodes().length}checkAccount(){let t={};t=this.creationMode?{login:this.alfresco.account.id,password:this.alfresco.account.password,nodeId:this.alfresco.rootFolder}:{accountId:this.alfresco.id,login:this.alfresco.account.id,password:this.alfresco.account.password,nodeId:this.alfresco.rootFolder},this.http.post("../rest/alfresco/checkAccounts",t).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.testSucceeded"))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-alfresco"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(t4,!0),n.Kc(e4,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.maarchTree=i.first))},decls:22,vars:14,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["fixedTopGap","56","position","end",2,"overflow-x","hidden","width","400px",3,"mode","fixedInViewport","opened"],["snav2",""],["mat-subheader",""],[2,"padding","10px"],["maarchTree",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[3,"ngSubmit"],["alfrescoForm","ngForm"],["matInput","","required","","name","label","id","label","type","text","maxlength","64",3,"ngModel","title","placeholder","ngModelChange"],[1,"form-group",2,"flex-direction","row","flex-wrap","wrap"],[1,"formType","ratio-2","col-sm-12"],[1,"formType-title"],[2,"width","100%","text-align","center"],["matInput","","required","","name","accountId","id","accountId","type","text",3,"ngModel","title","placeholder","ngModelChange"],["matInput","","name","password","id","password",3,"ngModel","required","title","type","placeholder","ngModelChange"],["color","primary","matSuffix","",1,"fa","fa-2x",2,"cursor","pointer",3,"ngClass","click"],[1,"formType","ratio-1","col-sm-12"],["matInput","","required","","name","rootFolder","id","rootFolder","type","text","placeholder","D\xe9p\xf4t racine",3,"ngModel","title","ngModelChange"],[1,"col-sm-12","text-center",2,"padding","10px"],["mat-raised-button","","type","button","color","primary",3,"disabled","click"],["mat-raised-button","","type","submit","color","primary",3,"disabled"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,i4,2,0,"div",8),n.Oc(12,a4,38,48,"mat-card",9),n.Vb(),n.Vb(),n.Vb(),n.Wb(13,"mat-sidenav",10,11),n.Wb(15,"mat-list"),n.Wb(16,"h3",12),n.Qc(17),n.ic(18,"translate"),n.Vb(),n.Wb(19,"div",13),n.Rb(20,"app-maarch-flat-tree",null,14),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",!e.appService.getViewMode()),n.Db(4),n.Rc(n.jc(18,12,"lang.chooseEntityAssociationAccount")))},directives:[I.e,I.f,Ot,We,P.t,I.d,R.a,R.g,cQ,V.c,K.a,X.K,X.v,X.w,Y.c,J.b,X.d,X.F,X.p,X.u,X.x,S.a,Y.j,P.q,k.b],pipes:[g.d],styles:[".form-group[_ngcontent-%COMP%], .formType[_ngcontent-%COMP%]{display:flex}.formType[_ngcontent-%COMP%]{align-items:center;margin:10px;border-radius:4px;border:1px solid #ccc;position:relative;padding:10px}.formType-title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:-7px;left:10px;padding:0;margin:0;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-slide-toggle-label{color:#666;font-weight:700}.formType[_ngcontent-%COMP%] .mat-radio-button, .formType[_ngcontent-%COMP%] .mat-slide-toggle{opacity:.5;color:#666;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.formType[_ngcontent-%COMP%] .mat-checked, .formType[_ngcontent-%COMP%] .mat-radio-checked{opacity:1;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-checked .mat-slide-toggle-label{color:#135f7f}.formType[_ngcontent-%COMP%] .mat-form-field-suffix{color:#f99830;font-size:15px;top:0}.ratio-1[_ngcontent-%COMP%]{flex:1}.ratio-2[_ngcontent-%COMP%]{flex:1;align-items:baseline}"]}),t})();const o4=["adminMenuTemplate"];function r4(t,e){1&t&&(n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",11),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",12),n.Rb(5,"mat-icon",13),n.Wb(6,"p",14),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,2,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,4,"lang.add")," "))}function c4(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Vb())}function l4(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",40),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Rc(n.jc(2,3,"lang.label"))}}function d4(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",t.label," ")}}function h4(t,e){1&t&&(n.Wb(0,"mat-header-cell",41),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.linkedEntities")))}function u4(t,e){if(1&t&&(n.Wb(0,"span",44),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Rc(t)}}function p4(t,e){if(1&t&&(n.Wb(0,"mat-cell",42),n.Wb(1,"div"),n.Oc(2,u4,2,1,"span",43),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.oc("ngForOf",t.entitiesLabel)}}function b4(t,e){1&t&&n.Rb(0,"mat-header-cell",45)}function f4(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",46),n.Wb(1,"button",47),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.deleteAccount(a.id)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",48),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.pc("matTooltip",n.jc(2,1,"lang.delete")))}function m4(t,e){1&t&&n.Rb(0,"mat-header-row")}function g4(t,e){1&t&&(n.Rb(0,"mat-row",49),n.ic(1,"translate")),2&t&&(n.qc("routerLink","/administration/alfresco/",e.$implicit.id,""),n.pc("matTooltip",n.jc(1,2,"lang.view")))}function v4(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",17),n.Wb(1,"div",18),n.Wb(2,"div",19),n.Wb(3,"mat-form-field",20),n.Wb(4,"mat-label"),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Wb(7,"input",21),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().alfrescoUrl=e}))("blur",(function(){return n.Dc(t),n.hc().saveUrl()})),n.Vb(),n.Vb(),n.Vb(),n.Wb(8,"div",22),n.Wb(9,"mat-form-field"),n.Rb(10,"input",23),n.ic(11,"translate"),n.Vb(),n.Vb(),n.Wb(12,"div",22),n.Rb(13,"mat-paginator",24,25),n.Vb(),n.Vb(),n.Wb(15,"mat-table",26,27),n.Ub(17,28),n.Oc(18,l4,3,5,"mat-header-cell",29),n.Oc(19,d4,2,3,"mat-cell",30),n.Tb(),n.Ub(20,31),n.Oc(21,h4,3,3,"mat-header-cell",32),n.Oc(22,p4,3,1,"mat-cell",33),n.Tb(),n.Ub(23,34),n.Oc(24,b4,1,0,"mat-header-cell",35),n.Oc(25,f4,4,3,"mat-cell",36),n.Tb(),n.Oc(26,m4,1,0,"mat-header-row",37),n.Oc(27,g4,2,4,"mat-row",38),n.Vb(),n.Wb(28,"div",39),n.Qc(29),n.ic(30,"translate"),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(5),n.Rc(n.jc(6,13,"lang.alfrescoAPI")),n.Db(2),n.oc("ngModel",t.alfrescoUrl)("title",t.alfrescoUrl),n.Db(3),n.pc("placeholder",n.jc(11,15,"lang.filterBy")),n.oc("formControl",t.adminService.getFilterField()),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.adminService.getDataSource()),n.Db(11),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns),n.Db(2),n.Tc(" ",t.accounts.length," ",n.jc(30,17,"lang.accounts"),"")}}let _4=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.dialog=s,this.functions=o,this.adminService=r,this.viewContainerRef=c,this.alfrescoUrl="",this.accounts=[],this.loading=!1,this.displayedColumns=["label","entitiesLabel","actions"],this.filterColumns=["label","entitiesLabel"]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.alfresco")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,this.http.get("../rest/alfresco/configuration").pipe(Object(d.a)(t=>!this.functions.empty(t.configuration)),Object(mt.a)(t=>{this.alfrescoUrl=t.configuration.uri})).subscribe(),this.http.get("../rest/alfresco/accounts").subscribe(t=>{this.accounts=t.accounts,this.loading=!1,setTimeout(()=>{this.adminService.setDataSource("admin_alfresco",this.accounts,this.sort,this.paginator,this.filterColumns)},0)})}deleteAccount(t){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.confirmAction")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete("../rest/alfresco/accounts/"+t)),Object(mt.a)(()=>{this.accounts=this.accounts.filter(e=>e.id!==t),setTimeout(()=>{this.adminService.setDataSource("admin_alfresco",this.accounts,this.sort,this.paginator,this.filterColumns)},0),this.notify.success(this.translate.instant("lang.accountDeleted"))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}saveUrl(){this.http.put("../rest/alfresco/configuration",{uri:this.alfrescoUrl}).pipe(Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(q.b),n.Qb(_t.a),n.Qb(OL),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(o4,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:15,vars:8,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["mat-subheader",""],["mat-list-item","","routerLink","/administration/alfresco/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"row"],[1,"col-md-12"],["appearance","outline"],["matInput","","required","","name","accountId","id","accountId","type","text","placeholder","https://alfresco/api/",3,"ngModel","title","ngModelChange","blur"],[1,"col-md-6","col-xs-6"],["matInput","",3,"formControl","placeholder"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSortDisableClear","","matSort","",3,"dataSource"],["table",""],["matColumnDef","label"],["mat-sort-header","",3,"hide-for-mobile",4,"matHeaderCellDef"],[3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","entitiesLabel"],["mat-sort-header","","style","flex: 2",4,"matHeaderCellDef"],["style","flex: 2",4,"matCellDef"],["matColumnDef","actions"],["style","flex:none",4,"matHeaderCellDef"],["style","flex:none;justify-content: flex-end;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"routerLink","matTooltip",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["mat-sort-header",""],["mat-sort-header","",2,"flex","2"],[2,"flex","2"],["class","label",4,"ngFor","ngForOf"],[1,"label"],[2,"flex","none"],[2,"flex","none","justify-content","flex-end"],["mat-icon-button","","color","warn",3,"matTooltip","click"],["aria-hidden","true",1,"fa","fa-trash-alt","fa-2x"],[2,"cursor","pointer",3,"routerLink","matTooltip"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,r4,9,6,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,c4,2,0,"div",9),n.Oc(14,v4,31,19,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,R.h,R.g,R.d,o.f,S.a,R.c,W.l,V.c,K.a,Y.c,Y.g,J.b,X.d,X.F,X.u,X.x,X.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,vt.h,Fe.b,vt.a,P.s,k.b,A.b,vt.j,vt.m,o.d],pipes:[g.d],styles:[".label[_ngcontent-%COMP%]{white-space:break-spaces;background:#135f7f;margin:5px}"]}),t})();const y4=["appContactDetail"];function x4(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",13),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit,i=n.hc();return i.toggleExcludeContact(e),i.mergeContact()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.exludeContact")))}function C4(t,e){1&t&&n.Rb(0,"i",14)}function O4(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",15),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit,i=n.hc();return i.toggleExcludeContact(e),i.mergeContact()})),n.Rb(1,"i",16),n.Qc(2),n.ic(3,"translate"),n.Vb()}2&t&&(n.Db(2),n.Sc("\xa0",n.jc(3,1,"lang.contactExcluded"),""))}function D4(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",7),n.Wb(1,"app-contact-detail",8,9),n.dc("afterSelectedEvent",(function(){n.Dc(t);const i=e.index;return n.hc().mergeContact(i)}))("afterDeselectedEvent",(function(i){n.Dc(t);const a=e.index;return n.hc().resetContact(i,a)})),n.Vb(),n.Oc(3,x4,3,3,"button",10),n.Oc(4,C4,1,0,"i",11),n.Oc(5,O4,4,3,"button",12),n.Vb()}if(2&t){const t=e.$implicit,i=e.index,a=n.hc();n.Db(1),n.Ib("merged",a.contactSelected!==i&&null!==a.contactSelected&&-1===a.contactsExcluded.indexOf(t.id)),n.oc("contact",t)("selectable",a.contactSelected===i||null===a.contactSelected),n.Db(2),n.oc("ngIf",a.contactSelected!==i&&null!==a.contactSelected&&-1===a.contactsExcluded.indexOf(t.id)),n.Db(1),n.oc("ngIf",a.contactSelected!==i&&null!==a.contactSelected&&a.contactsExcluded.indexOf(t.id)>-1),n.Db(1),n.oc("ngIf",a.contactSelected!==i&&null!==a.contactSelected&&a.contactsExcluded.indexOf(t.id)>-1)}}let w4=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.notify=i,this.data=n,this.dialogRef=a,this.headerService=s,this.functionsService=o,this.loading=!1,this.contactSelected=null,this.contactsExcluded=[]}ngOnInit(){}mergeContact(t=this.contactSelected){this.appContactDetail.toArray()[t].resetContact(),this.appContactDetail.toArray()[t].contact.selected=!0,this.functionsService.empty(t)||(this.contactSelected=t),this.data.duplicate.forEach((e,i)=>{-1===this.contactsExcluded.indexOf(this.appContactDetail.toArray()[i].getContactInfo().id)&&Object.keys(this.appContactDetail.toArray()[i].getContactInfo()).forEach(e=>{"customFields"!==e||this.functionsService.empty(this.appContactDetail.toArray()[i].getContactInfo()[e])?"civility"!==e||this.functionsService.empty(this.appContactDetail.toArray()[i].getContactInfo()[e].id)?this.functionsService.empty(this.appContactDetail.toArray()[t].getContactInfo()[e])&&this.appContactDetail.toArray()[t].getContactInfo()[e]!==this.appContactDetail.toArray()[i].getContactInfo()[e]&&this.appContactDetail.toArray()[t].setContactInfo(e,this.appContactDetail.toArray()[i].getContactInfo()[e]):this.appContactDetail.toArray()[t].setContactInfo(e,this.appContactDetail.toArray()[i].getContactInfo()[e]):this.appContactDetail.toArray()[i].getContactInfo()[e].forEach(i=>{0===this.appContactDetail.toArray()[t].getContactInfo()[e].filter(t=>t.label===i.label).length&&this.appContactDetail.toArray()[t].setContactInfo(e,i)})})})}toggleExcludeContact(t){const e=this.contactsExcluded.indexOf(t.id);-1===e?this.contactsExcluded.push(t.id):this.contactsExcluded.splice(e,1)}resetContact(t,e){this.contactSelected=null,this.appContactDetail.toArray()[e].resetContact()}onSubmit(){this.loading=!0;const t=this.data.duplicate.filter((t,e)=>e===this.contactSelected).map(t=>t.id)[0],e=this.data.duplicate.filter((t,e)=>e!==this.contactSelected).filter((t,e)=>-1===this.contactsExcluded.indexOf(t.id)).map(t=>t.id);this.http.put(`../rest/contacts/${t}/merge`,{duplicates:e}).pipe(Object(mt.a)(()=>{this.dialogRef.close(e.length===this.data.duplicate.length-1?"removeAll":e)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.a),n.Qb(q.h),n.Qb(y.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-manage-duplicate"]],viewQuery:function(t,e){var i;1&t&&n.Xc(y4,!0),2&t&&n.yc(i=n.ec())&&(e.appContactDetail=i)},decls:11,vars:12,consts:[[1,"mat-dialog-content-container"],["mat-dialog-content","",1,"contact-list-container"],["style","position: relative;",4,"ngFor","ngForOf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"mat-dialog-close"],[2,"position","relative"],[2,"height","100%",3,"contact","selectable","afterSelectedEvent","afterDeselectedEvent"],["appContactDetail",""],["mat-raised-button","","mat-button","","style","position: absolute;bottom: 0px;left: 50%;transform: translateX(-50%);",3,"click",4,"ngIf"],["class","fas fa-ban excludeLogo",4,"ngIf"],["mat-raised-button","","mat-button","","color","primary","style","position: absolute;bottom: 0px;left: 50%;transform: translateX(-50%);",3,"click",4,"ngIf"],["mat-raised-button","","mat-button","",2,"position","absolute","bottom","0px","left","50%","transform","translateX(-50%)",3,"click"],[1,"fas","fa-ban","excludeLogo"],["mat-raised-button","","mat-button","","color","primary",2,"position","absolute","bottom","0px","left","50%","transform","translateX(-50%)",3,"click"],[1,"fas","fa-ban"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"div",1),n.Oc(2,D4,6,7,"div",2),n.Vb(),n.Rb(3,"span",3),n.Wb(4,"div",4),n.Wb(5,"button",5),n.dc("click",(function(){return e.onSubmit()})),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Wb(8,"button",6),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(1),n.Ib("contact-list-container-1",1==e.data.duplicate.length)("contact-list-container-2",2==e.data.duplicate.length),n.Db(1),n.oc("ngForOf",e.data.duplicate),n.Db(3),n.oc("disabled",null===e.contactSelected||e.loading||e.contactsExcluded.length===e.data.duplicate.length-1),n.Db(1),n.Rc(n.jc(7,8,"lang.merge")),n.Db(3),n.Rc(n.jc(10,10,"lang.cancel")))},directives:[q.f,P.s,q.c,k.b,q.d,hd,P.t],pipes:[g.d],styles:[".merged[_ngcontent-%COMP%]{opacity:.5}.contact-list-container[_ngcontent-%COMP%]{padding:20px;display:grid;grid-template-columns:repeat(3,33%);grid-gap:10px}.contact-list-container-1[_ngcontent-%COMP%]{grid-template-columns:1fr}.contact-list-container-2[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}.excludeLogo[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:80px;color:#8e3e52}"]}),t})();var M4=i("vxfF");const k4=["adminMenuTemplate"];function S4(t,e){if(1&t&&(n.Wb(0,"a",19),n.Rb(1,"mat-icon",20),n.Wb(2,"p",21),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Ib("active",t.current),n.oc("routerLink",t.route),n.Db(1),n.Fb(t.icon),n.Db(2),n.Sc(" ",t.label," ")}}function I4(t,e){if(1&t&&(n.Wb(0,"mat-nav-list"),n.Oc(1,S4,4,6,"a",18),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",t.subMenus)}}function P4(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",31),n.dc("removed",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).removeCriteria(i)}))("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).removeCriteria(i)})),n.Qc(1),n.Rb(2,"mat-icon",32),n.Vb()}if(2&t){const t=e.$implicit;n.oc("removable",!0),n.Db(1),n.Sc(" ",t.label," ")}}function V4(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",22),n.Wb(1,"mat-accordion",23),n.Wb(2,"mat-expansion-panel",24),n.Wb(3,"mat-expansion-panel-header"),n.Wb(4,"mat-panel-title"),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Vb(),n.Wb(7,"plugin-select-search",25),n.dc("afterSelected",(function(e){return n.Dc(t),n.hc().addCriteria(e)})),n.ic(8,"translate"),n.ic(9,"translate"),n.Vb(),n.Rb(10,"mat-divider",26),n.Wb(11,"mat-chip-list",27),n.Oc(12,P4,3,2,"mat-chip",28),n.Vb(),n.Wb(13,"div",29),n.Wb(14,"button",30),n.dc("click",(function(){return n.Dc(t),n.hc().searchDuplicates()})),n.Qc(15),n.ic(16,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(2),n.oc("expanded",t.openedSearchTool),n.Db(3),n.Sc(" ",n.jc(6,9,"lang.criteriaSearch")," "),n.Db(2),n.oc("label",n.jc(8,11,"lang.addCriteria"))("formControlSelect",t.addCriteriaSelect)("placeholderLabel",n.jc(9,13,"lang.addCriteria"))("datas",t.contactFields),n.Db(5),n.oc("ngForOf",t.currentFieldsSearch),n.Db(2),n.oc("disabled",0===t.currentFieldsSearch.length||t.isLoadingResults),n.Db(1),n.Rc(n.jc(16,15,"lang.launchSearch"))}}function R4(t,e){1&t&&(n.Wb(0,"div",33),n.Wb(1,"em"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,1,"lang.noDuplicatesFound")))}const j4=function(t,e){return{value1:t,value2:e}};function A4(t,e){if(1&t&&(n.Wb(0,"div",34),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Sc(" ",n.kc(2,1,"lang.duplicatesContactDisplayed",n.wc(4,j4,t.duplicatesContactsRealCount,t.duplicatesContactsCount))," ")}}function W4(t,e){if(1&t&&(n.Wb(0,"span",38),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Db(1),n.Sc(" ",i.getLabel(t)," ")}}function T4(t,e){if(1&t&&(n.Wb(0,"mat-list",15),n.Wb(1,"mat-list-item",35),n.Wb(2,"p",36),n.Oc(3,W4,2,1,"span",37),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Gb("contact-list-container-",t.displayedColumns.length,""),n.Db(1),n.oc("ngForOf",t.displayedColumns)}}function E4(t,e){if(1&t&&(n.Wb(0,"span",42),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc().$implicit;n.Db(1),n.Sc(" ",i[t]," ")}}function F4(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"mat-list-item",39),n.dc("mouseover",(function(){n.Dc(t);const i=e.$implicit;return n.hc().selectDuplicates(i.duplicateId)}))("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().manageDuplicate(i.duplicateId)})),n.Wb(2,"p",40),n.Oc(3,E4,2,1,"span",41),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=e.$implicit,i=e.index,a=n.hc();n.Db(1),n.Ib("odd",void 0!==a.duplicatesContacts[i+1]&&t.odd!==a.duplicatesContacts[i+1].odd)("hovered",t.duplicateId===a.currentDuplicateId),n.Db(1),n.Gb("contact-list-container-",a.displayedColumns.length,""),n.Db(1),n.oc("ngForOf",a.displayedColumns)}}function L4(t,e){1&t&&(n.Wb(0,"div",43),n.Rb(1,"mat-spinner"),n.Vb())}let Q4=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c,l){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.dialog=s,this.functions=o,this.sortPipe=r,this.viewContainerRef=c,this.functionsService=l,this.loading=!0,this.subMenus=[{icon:"fa fa-book",route:"/administration/contacts",label:this.translate.instant("lang.contactsList"),current:!1},{icon:"fa fa-code",route:"/administration/contacts/contactsCustomFields",label:this.translate.instant("lang.customFieldsAdmin"),current:!1},{icon:"fa fa-cog",route:"/administration/contacts/contacts-parameters",label:this.translate.instant("lang.contactsParameters"),current:!1},{icon:"fa fa-users",route:"/administration/contacts/contacts-groups",label:this.translate.instant("lang.contactsGroups"),current:!1},{icon:"fas fa-magic",route:"/administration/contacts/duplicates",label:this.translate.instant("lang.duplicatesContactsAdmin"),current:!0}],this.contactFields=[],this.addCriteriaSelect=new X.i,this.currentFieldsSearch=[],this.currentDuplicateId=null,this.duplicatesContacts=[],this.duplicatesContactsCount=-1,this.duplicatesContactsRealCount=0,this.displayedColumns=["companyLastname","lastname","company"],this.isLoadingResults=!1,this.openedSearchTool=!0}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.headerService.setHeader(this.translate.instant("lang.contactsDuplicates"),"",""),yield this.getContactFields(),this.setDefaultSearchCriteria(),this.loading=!1}))}getContactFields(){return new Promise((t,e)=>{this.http.get("../rest/contactsParameters").pipe(Object(l.a)(t=>{const e=/contactCustomField_[.]*/g;return t.contactsParameters=t.contactsParameters.filter(t=>null===t.identifier.match(e)).map(t=>Object.assign(Object.assign({},t),{label:this.translate.instant("lang.contactsParameters_"+t.identifier)})),t.contactsParameters}),Object(mt.a)(t=>{this.contactFields=t}),p(()=>this.http.get("../rest/contactsCustomFields")),Object(l.a)(t=>(t.customFields=t.customFields.map(t=>Object.assign(Object.assign({},t),{id:"contactCustomField_"+t.id,identifier:"contactCustomField_"+t.id})),t.customFields)),Object(mt.a)(e=>{this.contactFields=this.contactFields.concat(e),this.contactFields=this.sortPipe.transform(this.contactFields,"label"),t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}setDefaultSearchCriteria(t=["lastname","company"]){this.contactFields.filter(e=>t.indexOf(e.identifier)>-1).forEach(t=>{t.disabled=!0,this.currentFieldsSearch.push(t)})}addCriteria(t){this.contactFields.filter(e=>e.id===t).forEach(t=>{t.disabled=!0,this.currentFieldsSearch.push(t)}),this.addCriteriaSelect.reset()}removeCriteria(t){this.contactFields.forEach((e,i)=>{e.id===t.id&&(this.currentFieldsSearch=this.currentFieldsSearch.filter(e=>e.id!==t.id),e.disabled=!1)})}searchDuplicates(){this.duplicatesContacts=[],this.isLoadingResults=!0;const t="?criteria[]="+this.currentFieldsSearch.map(t=>t.identifier).join("&criteria[]=");this.http.get("../rest/duplicatedContacts"+t).pipe(Object(l.a)(t=>(this.duplicatesContactsRealCount=t.realCount,this.duplicatesContactsCount=t.returnedCount,t.contacts.forEach((e,i)=>{e.odd=0===i||(void 0!==t.contacts[i-1]&&t.contacts[i-1].duplicateId===e.duplicateId?t.contacts[i-1].odd:!t.contacts[i-1].odd);const n=[];n.push(e.company),n.push(e.lastname),e.companyLastname=n.filter(t=>!this.functions.empty(t)).join(" / "),this.functionsService.empty(e.customFields)||Object.keys(e.customFields).forEach(t=>{e[t]=e.customFields[t]})}),t.contacts)),Object(mt.a)(t=>{this.duplicatesContacts=t,setTimeout(()=>{const t=/contactCustomField_[.]*/g;this.displayedColumns=this.currentFieldsSearch.filter(e=>null===e.identifier.match(t)).map(t=>t.identifier).concat(this.currentFieldsSearch.filter(e=>null!==e.identifier.match(t)).map(t=>t.identifier.replace("contactCustomField_",""))),this.displayedColumns.unshift("companyLastname"),this.openedSearchTool=!1},0)}),Object(Xt.a)(()=>this.isLoadingResults=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}selectDuplicates(t){this.currentDuplicateId=t}manageDuplicate(t){this.dialog.open(w4,{panelClass:"maarch-modal",data:{duplicate:this.duplicatesContacts.filter(e=>e.duplicateId===t).map(t=>({id:t.id,type:"contact"}))}}).afterClosed().pipe(Object(d.a)(t=>!this.functionsService.empty(t)),Object(mt.a)(e=>{this.notify.success(this.translate.instant("lang.contactsMerged")),this.duplicatesContactsCount--,this.duplicatesContactsRealCount--,this.duplicatesContacts=this.duplicatesContacts.filter("removeAll"!==e?t=>-1===e.indexOf(t.id):e=>e.duplicateId!==t)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}getLabel(t){return void 0!==this.translate.instant("lang.contactsParameters_"+t)?this.translate.instant("lang.contactsParameters_"+t):void 0!==this.translate.instant("lang."+t)?this.translate.instant("lang."+t):this.contactFields.filter(e=>e.id==="contactCustomField_"+t)[0].label}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(q.b),n.Qb(_t.a),n.Qb(Wt.a),n.Qb(n.T),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-contact-duplicate"]],viewQuery:function(t,e){var i;1&t&&n.Kc(k4,!0),2&t&&n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first)},features:[n.Cb([Wt.a])],decls:22,vars:12,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content",2,"display","flex","flex-direction","column","overflow","hidden"],["class","criteria-container",4,"ngIf"],["style","padding: 10px;text-align: center;color: rgba(0,0,0,0.54);",4,"ngIf"],["style","padding: 10px;text-align: right;color: rgba(0,0,0,0.54);",4,"ngIf"],["role","list",4,"ngIf"],[2,"position","relative","height","100%","overflow","auto"],["itemSize","48",1,"example-viewport"],["role","list"],[4,"cdkVirtualFor","cdkVirtualForOf"],["class","example-loading-shade",4,"ngIf"],["mat-list-item","",3,"active","routerLink",4,"ngFor","ngForOf"],["mat-list-item","",3,"routerLink"],["color","primary","mat-list-icon",""],["mat-line",""],[1,"criteria-container"],[2,"margin-bottom","10px"],[3,"expanded"],[3,"label","formControlSelect","placeholderLabel","datas","afterSelected"],[2,"margin-top","20px","margin-bottom","20px"],[1,"checkbox-selected-list"],["selected","",3,"removable","removed","click",4,"ngFor","ngForOf"],[1,"col-md-12","text-center"],["mat-raised-button","","color","primary","type","button",3,"disabled","click"],["selected","",3,"removable","removed","click"],["matChipRemove","",1,"fa","fa-times-circle"],[2,"padding","10px","text-align","center","color","rgba(0,0,0,0.54)"],[2,"padding","10px","text-align","right","color","rgba(0,0,0,0.54)"],["role","listitem"],["mat-line","",2,"font-size","80%","display","grid","grid-gap","10px"],["class","primary","style","overflow: hidden;text-overflow: ellipsis;",4,"ngFor","ngForOf"],[1,"primary",2,"overflow","hidden","text-overflow","ellipsis"],["role","listitem",2,"cursor","pointer","font-size","14px",3,"mouseover","click"],["mat-line","",2,"display","grid","grid-gap","10px","align-items","center"],["style","overflow: hidden;text-overflow: ellipsis;",4,"ngFor","ngForOf"],[2,"overflow","hidden","text-overflow","ellipsis"],[1,"example-loading-shade"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,I4,2,1,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,V4,17,17,"div",9),n.Oc(14,R4,4,3,"div",10),n.Oc(15,A4,3,7,"div",11),n.Oc(16,T4,4,4,"mat-list",12),n.Wb(17,"div",13),n.Wb(18,"cdk-virtual-scroll-viewport",14),n.Wb(19,"mat-list",15),n.Oc(20,F4,4,8,"ng-container",16),n.Vb(),n.Vb(),n.Oc(21,L4,2,0,"div",17),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",!e.loading),n.Db(1),n.oc("ngIf",0===e.duplicatesContactsCount),n.Db(1),n.oc("ngIf",e.duplicatesContacts.length>0),n.Db(1),n.oc("ngIf",e.duplicatesContacts.length>0),n.Db(4),n.oc("cdkVirtualForOf",e.duplicatesContacts),n.Db(1),n.oc("ngIf",e.isLoadingResults))},directives:[I.e,I.f,Ot,We,P.t,M4.e,M4.a,R.a,M4.d,R.h,P.s,R.d,o.f,S.a,R.c,W.l,gt.a,gt.c,gt.g,gt.h,fr,T.a,ze.d,k.b,ze.a,ze.e,V.c],pipes:[g.d],styles:[".example-viewport[_ngcontent-%COMP%]{flex:1;width:100%;background:#fff;height:100%}.example-viewport[_ngcontent-%COMP%] .cdk-virtual-scroll-content-wrapper{overflow:hidden;text-overflow:ellipsis;width:100%}.active[_ngcontent-%COMP%], .active[_ngcontent-%COMP%]:active, .active[_ngcontent-%COMP%]:focus, .active[_ngcontent-%COMP%]:hover{color:#135f7f;border-left:5px solid #135f7f;background:rgba(19,95,127,.14)}.criteria-container[_ngcontent-%COMP%]{margin:20px}.hovered[_ngcontent-%COMP%]{background:rgba(0,0,0,.04)!important;transition:all .3s}.odd[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.12)}.contact-list-container-1[_ngcontent-%COMP%]{grid-template-columns:1fr}.contact-list-container-2[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}.contact-list-container-3[_ngcontent-%COMP%]{grid-template-columns:repeat(3,1fr)}.contact-list-container-4[_ngcontent-%COMP%]{grid-template-columns:repeat(4,1fr)}.contact-list-container-5[_ngcontent-%COMP%]{grid-template-columns:repeat(5,1fr)}"]}),t})();const N4=["adminMenuTemplate"];function z4(t,e){if(1&t&&(n.Wb(0,"a",16),n.Rb(1,"mat-icon",17),n.Wb(2,"p",14),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Ib("active",t.current),n.oc("routerLink",t.route),n.Db(1),n.Fb(t.icon),n.Db(2),n.Sc(" ",t.label," ")}}function B4(t,e){if(1&t&&(n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",11),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",12),n.Rb(5,"mat-icon",13),n.Wb(6,"p",14),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Rb(9,"mat-divider"),n.Wb(10,"mat-nav-list"),n.Oc(11,z4,4,6,"a",15),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Rc(n.jc(3,3,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,5,"lang.add")," "),n.Db(4),n.oc("ngForOf",t.subMenus)}}function U4(t,e){1&t&&(n.Wb(0,"div",18),n.Rb(1,"mat-spinner",19),n.Vb())}function $4(t,e){1&t&&(n.Wb(0,"mat-header-cell",39),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.coclicoNumber")," "))}function H4(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.accountNumber," ")}}function G4(t,e){1&t&&(n.Wb(0,"mat-header-cell",39),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.label")," "))}function X4(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.label," ")}}function q4(t,e){1&t&&(n.Wb(0,"mat-header-cell",39),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.postOffice")," "))}function K4(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.postOfficeLabel," ")}}function Y4(t,e){1&t&&n.Rb(0,"mat-header-cell")}function J4(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",40),n.Wb(1,"button",41),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.delete(a)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",42),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.pc("matTooltip",n.jc(2,1,"lang.delete")))}function Z4(t,e){1&t&&n.Rb(0,"mat-header-row")}function t5(t,e){1&t&&(n.Rb(0,"mat-row",43),n.ic(1,"translate")),2&t&&(n.qc("routerLink","/administration/issuingSites/",e.$implicit.id,""),n.pc("matTooltip",n.jc(1,2,"lang.view")))}function e5(t,e){if(1&t&&(n.Wb(0,"mat-card",20),n.Wb(1,"div",21),n.Wb(2,"div",22),n.Wb(3,"mat-form-field"),n.Rb(4,"input",23),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Wb(6,"div",22),n.Rb(7,"mat-paginator",24,25),n.Vb(),n.Vb(),n.Wb(9,"mat-table",26,27),n.Ub(11,28),n.Oc(12,$4,3,3,"mat-header-cell",29),n.Oc(13,H4,2,1,"mat-cell",30),n.Tb(),n.Ub(14,31),n.Oc(15,G4,3,3,"mat-header-cell",29),n.Oc(16,X4,2,1,"mat-cell",30),n.Tb(),n.Ub(17,32),n.Oc(18,q4,3,3,"mat-header-cell",29),n.Oc(19,K4,2,1,"mat-cell",30),n.Tb(),n.Ub(20,33),n.Oc(21,Y4,1,0,"mat-header-cell",34),n.Oc(22,J4,4,3,"mat-cell",35),n.Tb(),n.Oc(23,Z4,1,0,"mat-header-row",36),n.Oc(24,t5,2,4,"mat-row",37),n.Vb(),n.Wb(25,"div",38),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.pc("placeholder",n.jc(5,10,"lang.filterBy")),n.oc("formControl",t.adminService.getFilterField()),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.adminService.getDataSource()),n.Db(14),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns),n.Db(2),n.Tc(" ",t.data.length," ",n.jc(27,12,"lang.issuingSites"),"")}}let i5=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.functions=s,this.adminService=o,this.viewContainerRef=r,this.dialog=c,this.subMenus=[{icon:"fas fa-dolly-flatbed",route:"/administration/registeredMails",label:this.translate.instant("lang.registeredMailNumberRanges"),current:!1},{icon:"fas fa-warehouse",route:"/administration/issuingSites",label:this.translate.instant("lang.issuingSites"),current:!0}],this.parameters={},this.loading=!0,this.data=[],this.displayedColumns=["accountNumber","label","postOfficeLabel","actions"],this.filterColumns=["accountNumber","label","postOfficeLabel"]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.issuingSites")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!1,this.getData()}getData(){this.data=[],this.http.get("../rest/registeredMail/sites").pipe(Object(mt.a)(t=>{this.data=t.sites,this.loading=!1,setTimeout(()=>{this.adminService.setDataSource("admin_regitered_mail_issuing_site",this.data,this.sort,this.paginator,this.filterColumns)},0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}delete(t){this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete("../rest/registeredMail/sites/"+t.id)),Object(mt.a)(()=>{this.data=this.data.filter(e=>e.id!==t.id),setTimeout(()=>{this.adminService.setDataSource("admin_regitered_mail_issuing_site",this.data,this.sort,this.paginator,this.filterColumns)},0),this.notify.success(this.translate.instant("lang.issuingSiteDeleted"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a),n.Qb(OL),n.Qb(n.T),n.Qb(q.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-issuing-site-list"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(N4,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:15,vars:8,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["mat-subheader",""],["mat-list-item","","routerLink","/administration/issuingSites/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],["mat-list-item","",3,"active","routerLink",4,"ngFor","ngForOf"],["mat-list-item","",3,"routerLink"],["color","primary","mat-list-icon",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"row"],[1,"col-md-6","col-xs-6"],["matInput","",3,"formControl","placeholder"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSort","","matSortDisableClear","",3,"dataSource"],["table",""],["matColumnDef","accountNumber"],["mat-sort-header","",4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","label"],["matColumnDef","postOfficeLabel"],["matColumnDef","actions"],[4,"matHeaderCellDef"],["style","justify-content: flex-end;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"routerLink","matTooltip",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["mat-sort-header",""],[2,"justify-content","flex-end"],["mat-icon-button","","color","warn",3,"matTooltip","click"],["aria-hidden","true",1,"fa","fa-trash-alt","fa-2x"],[2,"cursor","pointer",3,"routerLink","matTooltip"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,B4,12,7,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,U4,2,0,"div",9),n.Oc(14,e5,28,14,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,R.h,R.g,R.d,o.f,S.a,R.c,W.l,T.a,P.s,V.c,K.a,Y.c,J.b,X.d,X.u,X.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,vt.h,Fe.b,vt.a,k.b,A.b,vt.j,vt.m,o.d],pipes:[g.d],styles:[".active[_ngcontent-%COMP%], .active[_ngcontent-%COMP%]:active, .active[_ngcontent-%COMP%]:focus, .active[_ngcontent-%COMP%]:hover{color:#135f7f;border-left:5px solid #135f7f;background:rgba(19,95,127,.14)}"]}),t})();const n5=["maarchTree"];function a5(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Vb())}function s5(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",49),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).addressBANCurrentDepartment=i})),n.Qc(1),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.Rc(t)}}function o5(t,e){if(1&t&&(n.Wb(0,"mat-option",50),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t.address," ")}}function r5(t,e){if(1&t&&(n.Ub(0),n.Oc(1,o5,2,2,"mat-option",46),n.ic(2,"async"),n.Tb()),2&t){const t=n.hc(2);n.Db(1),n.oc("ngForOf",n.jc(2,1,t.addressBANFilteredResult))}}function c5(t,e){if(1&t&&n.Rb(0,"mat-option",51),2&t){const t=n.hc(2);n.oc("innerHTML",t.addressBANInfo,n.Ec)}}function l5(t,e){1&t&&(n.Wb(0,"mat-option",52),n.Rb(1,"mat-spinner",53),n.Vb())}function d5(t,e){if(1&t&&(n.Wb(0,"mat-option",50),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}function h5(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",17),n.Wb(1,"form",18),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Wb(2,"div"),n.Wb(3,"mat-form-field"),n.Wb(4,"mat-label"),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Rb(7,"input",19),n.Vb(),n.Wb(8,"mat-form-field"),n.Wb(9,"mat-label"),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Rb(12,"input",20),n.Vb(),n.Wb(13,"mat-form-field"),n.Wb(14,"mat-label"),n.Qc(15),n.ic(16,"translate"),n.Vb(),n.Rb(17,"input",21),n.Vb(),n.Wb(18,"div",22),n.Wb(19,"div",23),n.Qc(20),n.ic(21,"translate"),n.Vb(),n.Wb(22,"mat-form-field",24),n.Wb(23,"button",25),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.ic(24,"translate"),n.Qc(25),n.Rb(26,"i",26),n.Vb(),n.Wb(27,"mat-menu",null,27),n.Oc(29,s5,2,1,"button",28),n.Vb(),n.Rb(30,"mat-icon",29),n.Wb(31,"input",30,31),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("focus",(function(){return n.Dc(t),n.hc().resetAutocompleteAddressBan()})),n.ic(33,"translate"),n.Vb(),n.Wb(34,"mat-autocomplete",32,33),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc().selectAddressBan(e)})),n.Oc(36,r5,3,3,"ng-container",34),n.Oc(37,c5,1,1,"mat-option",35),n.Oc(38,l5,2,0,"mat-option",36),n.Vb(),n.Vb(),n.Wb(39,"mat-form-field"),n.Wb(40,"mat-label"),n.Qc(41),n.ic(42,"translate"),n.Vb(),n.Rb(43,"input",37),n.Vb(),n.Wb(44,"mat-form-field"),n.Wb(45,"mat-label"),n.Qc(46),n.ic(47,"translate"),n.Vb(),n.Rb(48,"input",38),n.Vb(),n.Wb(49,"mat-form-field"),n.Wb(50,"mat-label"),n.Qc(51),n.ic(52,"translate"),n.Vb(),n.Rb(53,"input",39),n.Vb(),n.Wb(54,"mat-form-field"),n.Wb(55,"mat-label"),n.Qc(56),n.ic(57,"translate"),n.Vb(),n.Rb(58,"input",40),n.Vb(),n.Wb(59,"mat-form-field"),n.Wb(60,"mat-label"),n.Qc(61),n.ic(62,"translate"),n.Vb(),n.Rb(63,"input",41),n.Vb(),n.Wb(64,"mat-form-field"),n.Wb(65,"mat-label"),n.Qc(66),n.ic(67,"translate"),n.Vb(),n.Rb(68,"input",42),n.Vb(),n.Wb(69,"mat-form-field"),n.Wb(70,"mat-label"),n.Qc(71),n.ic(72,"translate"),n.Vb(),n.Rb(73,"input",43,31),n.Wb(75,"mat-autocomplete",44,45),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc().adminFormGroup.controls.addressCountry.setValue(e.option.value)})),n.Oc(77,d5,2,2,"mat-option",46),n.ic(78,"async"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(79,"div",47),n.Wb(80,"button",48),n.Qc(81),n.ic(82,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(28),e=n.zc(35),i=n.zc(76),a=n.hc();n.Db(1),n.oc("formGroup",a.adminFormGroup),n.Db(4),n.Rc(n.jc(6,26,"lang.siteName")),n.Db(5),n.Rc(n.jc(11,28,"lang.coclicoNumber")),n.Db(5),n.Rc(n.jc(16,30,"lang.postOffice")),n.Db(5),n.Sc(" ",n.jc(21,32,"lang.address")," "),n.Db(3),n.oc("matMenuTriggerFor",t)("title",n.jc(24,34,"lang.targetDepartment")),n.Db(2),n.Sc(" ",a.addressBANCurrentDepartment,"\xa0"),n.Db(4),n.oc("ngForOf",a.departmentList),n.Db(2),n.oc("placeholder",n.jc(33,36,"lang.searchAddressBan"))("formControl",a.addressBANControl)("matAutocomplete",e),n.Db(5),n.oc("ngIf",a.addressBANResult.length>0&&!a.addressBANLoading),n.Db(1),n.oc("ngIf",0===a.addressBANResult.length&&!a.addressBANLoading),n.Db(1),n.oc("ngIf",a.addressBANLoading),n.Db(3),n.Rc(n.jc(42,38,"lang.contactsParameters_addressAdditional1")),n.Db(5),n.Rc(n.jc(47,40,"lang.contactsParameters_addressNumber")),n.Db(5),n.Rc(n.jc(52,42,"lang.contactsParameters_addressStreet")),n.Db(5),n.Rc(n.jc(57,44,"lang.contactsParameters_addressAdditional2")),n.Db(5),n.Rc(n.jc(62,46,"lang.contactsParameters_addressPostcode")),n.Db(5),n.Rc(n.jc(67,48,"lang.contactsParameters_addressTown")),n.Db(5),n.Rc(n.jc(72,50,"lang.contactsParameters_addressCountry")),n.Db(2),n.oc("matAutocomplete",i),n.Db(4),n.oc("ngForOf",n.jc(78,52,a.countriesFilteredResult)),n.Db(3),n.oc("disabled",!a.adminFormGroup.valid),n.Db(1),n.Rc(n.jc(82,54,"lang.save"))}}let u5=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this.translate=t,this.http=e,this.route=i,this.router=n,this.notify=a,this.headerService=s,this.appService=o,this._formBuilder=r,this.latinisePipe=c,this.loading=!0,this.entities=[],this.countries=[],this.id=null,this.addressBANInfo="",this.addressBANMode=!0,this.addressBANControl=new X.i,this.addressBANLoading=!1,this.addressBANResult=[],this.addressBANCurrentDepartment="75",this.departmentList=[]}ngOnInit(){this.route.params.subscribe(t=>Object(r.a)(this,void 0,void 0,(function*(){void 0===t.id?(this.creationMode=!0,this.headerService.setHeader(this.translate.instant("lang.issuingSiteCreation")),this.initBanSearch(),this.initAutocompleteAddressBan(),this.adminFormGroup=this._formBuilder.group({id:[null],label:["",X.I.required],postOfficeLabel:["",X.I.required],accountNumber:["",X.I.required],addressNumber:["",X.I.required],addressStreet:["",X.I.required],addressAdditional1:[""],addressAdditional2:[""],addressPostcode:["",X.I.required],addressTown:["",X.I.required],addressCountry:[""]}),this.getCountries(),this.initAutocompleteCountries(),this.loading=!1,yield this.getEntities(),this.maarchTree.initData(this.entities)):(this.id=t.id,this.creationMode=!1,this.headerService.setHeader(this.translate.instant("lang.issuingSiteModification")),this.initBanSearch(),this.initAutocompleteAddressBan(),yield this.getEntities(),yield this.getData(),this.getCountries(),this.initAutocompleteCountries(),this.maarchTree.initData(this.entities))})))}getData(){return new Promise(t=>{this.http.get("../rest/registeredMail/sites/"+this.id).pipe(Object(mt.a)(e=>{this.adminFormGroup=this._formBuilder.group({id:[this.id],label:[e.site.label,X.I.required],postOfficeLabel:[e.site.postOfficeLabel,X.I.required],accountNumber:[e.site.accountNumber,X.I.required],addressNumber:[e.site.addressNumber,X.I.required],addressStreet:[e.site.addressStreet,X.I.required],addressAdditional1:[e.site.addressAdditional1],addressAdditional2:[e.site.addressAdditional2],addressPostcode:[e.site.addressPostcode,X.I.required],addressTown:[e.site.addressTown,X.I.required],addressCountry:[e.site.addressCountry],entities:[e.site.entities]}),this.entities=this.entities.map(t=>Object.assign(Object.assign({},t),{state:{opened:!0,selected:e.site.entities.indexOf(t.id)>-1}})),t(!0),this.loading=!1}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}initBanSearch(){this.http.get("../rest/ban/availableDepartments").pipe(Object(mt.a)(t=>{null!==t.default&&-1!==t.departments.indexOf(t.default.toString())&&(this.addressBANCurrentDepartment=t.default),this.departmentList=t.departments}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}initAutocompleteCountries(){this.countriesFilteredResult=this.adminFormGroup.controls.addressCountry.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>this._filter(t)))}_filter(t){const e=t.toLowerCase();return this.countries.filter(t=>t.toLowerCase().includes(e))}initAutocompleteAddressBan(){this.addressBANInfo=this.translate.instant("lang.autocompleteInfo"),this.addressBANResult=[],this.addressBANControl.valueChanges.pipe(Object(pt.a)(300),Object(d.a)(t=>t.length>2),Object(bt.a)(),Object(mt.a)(()=>this.addressBANLoading=!0),Object(ft.a)(t=>this.http.get("../rest/autocomplete/banAddresses",{params:{address:t,department:this.addressBANCurrentDepartment}})),Object(mt.a)(t=>{this.addressBANInfo=0===t.length?this.translate.instant("lang.noAvailableValue"):"",this.addressBANResult=t,this.addressBANFilteredResult=Object(c.a)(this.addressBANResult),this.addressBANLoading=!1})).subscribe()}resetAutocompleteAddressBan(){this.addressBANResult=[],this.addressBANInfo=this.translate.instant("lang.autocompleteInfo")}selectAddressBan(t){this.adminFormGroup.controls.addressNumber.setValue(t.option.value.number),this.adminFormGroup.controls.addressStreet.setValue(t.option.value.afnorName),this.adminFormGroup.controls.addressPostcode.setValue(t.option.value.postalCode),this.adminFormGroup.controls.addressTown.setValue(t.option.value.city),this.adminFormGroup.controls.addressCountry.setValue("FRANCE"),this.addressBANControl.setValue("")}getEntities(){return new Promise(t=>{this.http.get("../rest/entities").pipe(Object(l.a)(t=>(t.entities=t.entities.map(t=>({text:t.entity_label,icon:t.icon,parent_id:t.parentSerialId,id:t.serialId,state:{opened:!0}})),t.entities)),Object(mt.a)(e=>{this.entities=e,t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}getCountries(){this.http.get("../rest/registeredMail/countries").pipe(Object(mt.a)(t=>{this.countries=t.countries.map(t=>this.latinisePipe.transform(t.toUpperCase()))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}onSubmit(){const t={};Object.keys(this.adminFormGroup.controls).forEach(e=>{t[e]=this.adminFormGroup.controls[e].value}),t.entities=this.maarchTree.getSelectedNodes().map(t=>t.id),this.creationMode?this.http.post("../rest/registeredMail/sites",t).subscribe(()=>{this.notify.success(this.translate.instant("lang.issuingSiteAdded")),this.router.navigate(["/administration/issuingSites"])},t=>{this.notify.handleSoftErrors(t)}):this.http.put("../rest/registeredMail/sites/"+this.id,t).subscribe(()=>{this.notify.success(this.translate.instant("lang.issuingSiteUpdated")),this.router.navigate(["/administration/issuingSites"])},t=>{this.notify.handleSoftErrors(t)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(X.h),n.Qb(Tt.c))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-issuing-site"]],viewQuery:function(t,e){var i;1&t&&n.Kc(n5,!0),2&t&&n.yc(i=n.ec())&&(e.maarchTree=i.first)},decls:22,vars:14,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["fixedTopGap","56","position","end",2,"overflow-x","hidden","width","400px",3,"mode","fixedInViewport","opened"],["snav2",""],["mat-subheader",""],[2,"padding","10px"],["maarchTree",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[2,"display","contents",3,"formGroup","ngSubmit"],["matInput","","formControlName","label"],["type","text","pattern","[0-9]+","maxlength","10","matInput","","formControlName","accountNumber"],["matInput","","formControlName","postOfficeLabel"],[1,"formType","ratio-1","col-sm-12"],[1,"formType-title"],["appearance","outline",1,"smallInput"],["type","button","mat-button","","matSuffix","",3,"matMenuTriggerFor","title","click"],[1,"fa","fa-chevron-down"],["menuDep","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["color","primary","matPrefix","",1,"fa","fa-search",2,"font-size","15px"],["type","text","matInput","","maxlength","128",3,"placeholder","formControl","matAutocomplete","click","focus"],["autoCompleteInput",""],[3,"optionSelected"],["auto","matAutocomplete"],[4,"ngIf"],["class","autoCompleteInfoResult smallInputInfo","disabled","",3,"innerHTML",4,"ngIf"],["disabled","",4,"ngIf"],["matInput","","formControlName","addressAdditional1"],["matInput","","formControlName","addressNumber"],["matInput","","formControlName","addressStreet"],["matInput","","formControlName","addressAdditional2"],["matInput","","formControlName","addressPostcode"],["matInput","","formControlName","addressTown"],["matInput","","formControlName","addressCountry",3,"matAutocomplete"],["isOpen","true",3,"optionSelected"],["matAutocompleteCountries","matAutocomplete"],[3,"value",4,"ngFor","ngForOf"],[2,"text-align","center"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],["mat-menu-item","",3,"click"],[3,"value"],["disabled","",1,"autoCompleteInfoResult","smallInputInfo",3,"innerHTML"],["disabled",""],["diameter","20"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,a5,2,0,"div",8),n.Oc(12,h5,83,56,"mat-card",9),n.Vb(),n.Vb(),n.Vb(),n.Wb(13,"mat-sidenav",10,11),n.Wb(15,"mat-list"),n.Wb(16,"h3",12),n.Qc(17),n.ic(18,"translate"),n.Vb(),n.Wb(19,"div",13),n.Rb(20,"app-maarch-flat-tree",null,14),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",!e.appService.getViewMode()),n.Db(4),n.Rc(n.jc(18,12,"lang.chooseEntityAssociationModel")))},directives:[I.e,I.f,Ot,We,P.t,I.d,R.a,R.g,cQ,V.c,K.a,X.K,X.v,X.m,Y.c,Y.g,J.b,X.d,X.u,X.k,X.B,X.p,k.b,Y.j,ne.d,ne.e,P.s,S.a,Y.i,Ne.d,X.j,Ne.a,ne.b,W.p],pipes:[g.d,P.b],styles:[".formType[_ngcontent-%COMP%]{align-items:center;display:flex;border-radius:4px;border:1px solid #ccc;position:relative;padding:10px 20px;flex-direction:column}.formType-title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:-7px;left:10px;padding:0;margin:0;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-slide-toggle-label{color:#666;font-weight:700}.formType[_ngcontent-%COMP%] .mat-radio-button, .formType[_ngcontent-%COMP%] .mat-slide-toggle{opacity:.5;color:#666;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.formType[_ngcontent-%COMP%] .mat-checked, .formType[_ngcontent-%COMP%] .mat-radio-checked{opacity:1;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-checked .mat-slide-toggle-label{color:#135f7f}.formType[_ngcontent-%COMP%] .mat-form-field-suffix{color:#f99830;font-size:15px;top:0}.ratio-1[_ngcontent-%COMP%], .ratio-2[_ngcontent-%COMP%]{flex:1}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-button[_ngcontent-%COMP%]{width:30px;height:25px;color:#135f7f}.smallInput[_ngcontent-%COMP%] .mat-button[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;line-height:normal;align-items:center}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}"]}),t})();const p5=["adminMenuTemplate"];function b5(t,e){if(1&t&&(n.Wb(0,"a",16),n.Rb(1,"mat-icon",17),n.Wb(2,"p",14),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Ib("active",t.current),n.oc("routerLink",t.route),n.Db(1),n.Fb(t.icon),n.Db(2),n.Sc(" ",t.label," ")}}function f5(t,e){if(1&t&&(n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",11),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",12),n.Rb(5,"mat-icon",13),n.Wb(6,"p",14),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Rb(9,"mat-divider"),n.Wb(10,"mat-nav-list"),n.Oc(11,b5,4,6,"a",15),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Rc(n.jc(3,3,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,5,"lang.add")," "),n.Db(4),n.oc("ngForOf",t.subMenus)}}function m5(t,e){1&t&&(n.Wb(0,"div",18),n.Rb(1,"mat-spinner",19),n.Vb())}function g5(t,e){1&t&&(n.Wb(0,"mat-header-cell",44),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.trackerNumber")," "))}function v5(t,e){if(1&t&&(n.Wb(0,"mat-cell",45),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.trackerNumber," ")}}function _5(t,e){1&t&&(n.Wb(0,"mat-header-cell",44),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.type")," "))}function y5(t,e){if(1&t&&(n.Wb(0,"mat-cell",45),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.typeLabel," ")}}function x5(t,e){1&t&&(n.Wb(0,"mat-header-cell",46),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.rangeNumber")," "))}function C5(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.rangeNumber," ")}}function O5(t,e){1&t&&(n.Wb(0,"mat-header-cell",46),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.currentNumber")," "))}function D5(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.currentNumber," ")}}function w5(t,e){1&t&&(n.Wb(0,"mat-header-cell",46),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.status")," "))}const M5=function(){return["OK"]},k5=function(){return["SPD"]},S5=function(){return["END"]},I5=function(t,e,i){return{statusLabelPrimary:t,statusLabelWarn:e,statusLabelDanger:i}};function P5(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Wb(1,"span",47),n.Qc(2),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngClass",n.xc(5,I5,n.uc(2,M5).indexOf(t.status)>-1,n.uc(3,k5).indexOf(t.status)>-1,n.uc(4,S5).indexOf(t.status)>-1)),n.Db(1),n.Rc(t.statusLabel)}}function V5(t,e){1&t&&(n.Wb(0,"mat-header-cell",46),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.fullness")," "))}function R5(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Wb(1,"div",48),n.Rb(2,"mat-progress-spinner",49),n.Wb(3,"div",50),n.Qc(4),n.Vb(),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Ib("fullness-ok",t.fullness<50)("fullness-warning",t.fullness>=50&&t.fullness<80)("fullness-danger",t.fullness>=80),n.Db(1),n.oc("value",t.fullness),n.Db(2),n.Sc("",t.fullness,"%")}}function j5(t,e){1&t&&n.Rb(0,"mat-header-cell")}function A5(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",56),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc(2);return e.stopPropagation(),a.activate(i)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",57),n.Vb()}if(2&t){const t=n.hc().$implicit;n.pc("matTooltip",n.jc(1,2,"Activer la plage")),n.oc("disabled",100===t.fullness)}}function W5(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",58),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc(2);return e.stopPropagation(),a.stop(i)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",59),n.Vb()}2&t&&n.pc("matTooltip",n.jc(1,1,"Cl\xf4turer la plage"))}function T5(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",51),n.Oc(1,A5,3,4,"button",52),n.Oc(2,W5,3,3,"button",53),n.Wb(3,"button",54),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.delete(a)})),n.ic(4,"translate"),n.Rb(5,"mat-icon",55),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf","SPD"===t.status),n.Db(1),n.oc("ngIf","OK"===t.status),n.Db(1),n.pc("matTooltip",n.jc(4,4,"lang.delete")),n.oc("disabled","OK"===t.status)}}function E5(t,e){1&t&&n.Rb(0,"mat-header-row")}function F5(t,e){1&t&&(n.Rb(0,"mat-row",60),n.ic(1,"translate")),2&t&&(n.qc("routerLink","/administration/registeredMails/",e.$implicit.id,""),n.pc("matTooltip",n.jc(1,2,"lang.view")))}function L5(t,e){if(1&t&&(n.Wb(0,"mat-card",20),n.Wb(1,"div",21),n.Wb(2,"div",22),n.Wb(3,"mat-form-field"),n.Rb(4,"input",23),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Wb(6,"div",22),n.Rb(7,"mat-paginator",24,25),n.Vb(),n.Vb(),n.Wb(9,"mat-table",26,27),n.Ub(11,28),n.Oc(12,g5,3,3,"mat-header-cell",29),n.Oc(13,v5,2,1,"mat-cell",30),n.Tb(),n.Ub(14,31),n.Oc(15,_5,3,3,"mat-header-cell",29),n.Oc(16,y5,2,1,"mat-cell",30),n.Tb(),n.Ub(17,32),n.Oc(18,x5,3,3,"mat-header-cell",33),n.Oc(19,C5,2,1,"mat-cell",34),n.Tb(),n.Ub(20,35),n.Oc(21,O5,3,3,"mat-header-cell",33),n.Oc(22,D5,2,1,"mat-cell",34),n.Tb(),n.Ub(23,36),n.Oc(24,w5,3,3,"mat-header-cell",33),n.Oc(25,P5,3,9,"mat-cell",34),n.Tb(),n.Ub(26,37),n.Oc(27,V5,3,3,"mat-header-cell",33),n.Oc(28,R5,5,8,"mat-cell",34),n.Tb(),n.Ub(29,38),n.Oc(30,j5,1,0,"mat-header-cell",39),n.Oc(31,T5,6,6,"mat-cell",40),n.Tb(),n.Oc(32,E5,1,0,"mat-header-row",41),n.Oc(33,F5,2,4,"mat-row",42),n.Vb(),n.Wb(34,"div",43),n.Qc(35),n.ic(36,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.pc("placeholder",n.jc(5,10,"lang.filterBy")),n.oc("formControl",t.adminService.getFilterField()),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.adminService.getDataSource()),n.Db(23),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns),n.Db(2),n.Tc(" ",t.data.length," ",n.jc(36,12,"lang.registeredMailNumberRanges"),"")}}let Q5=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.functions=s,this.adminService=o,this.viewContainerRef=r,this.dialog=c,this.subMenus=[{icon:"fas fa-dolly-flatbed",route:"/administration/registeredMails",label:this.translate.instant("lang.registeredMailNumberRanges"),current:!0},{icon:"fas fa-warehouse",route:"/administration/issuingSites",label:this.translate.instant("lang.issuingSites"),current:!1}],this.parameters={},this.loading=!0,this.data=[],this.displayedColumns=["trackerNumber","typeLabel","rangeNumber","currentNumber","status","fullness","actions"],this.filterColumns=["trackerNumber","typeLabel","rangeNumber","currentNumber","fullness","statusLabel"]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.registeredMailNumberRanges")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!1,this.getData()}getData(){this.data=[],this.http.get("../rest/registeredMail/ranges").pipe(Object(mt.a)(t=>{this.data=t.ranges.map(t=>Object.assign(Object.assign({},t),{statusLabel:this.translate.instant("lang.registeredMail_"+t.status),typeLabel:this.translate.instant("lang.registeredMail_"+t.registeredMailType),rangeNumber:`${t.rangeStart} - ${t.rangeEnd}`})),this.loading=!1,setTimeout(()=>{this.adminService.setDataSource("admin_regitered_mail",this.data,this.sort,this.paginator,this.filterColumns)},0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}activate(t){const e=JSON.parse(JSON.stringify(t));e.status="OK",this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.activateRegisteredMailNumberRange"),msg:this.translate.instant("lang.registeredMailMsgActivate")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.put("../rest/registeredMail/ranges/"+t.id,e)),Object(mt.a)(()=>{this.data.forEach(e=>{"OK"===e.status&&e.registeredMailType===t.registeredMailType&&e.siteId===t.siteId?(e.status="END",e.currentNumber=null,e.statusLabel=this.translate.instant("lang.registeredMail_"+e.status)):e.id===t.id&&(e.status="OK",e.currentNumber=e.rangeStart,e.statusLabel=this.translate.instant("lang.registeredMail_"+e.status))}),setTimeout(()=>{this.adminService.setDataSource("admin_regitered_mail",this.data,this.sort,this.paginator,this.filterColumns)},0),this.notify.success(this.translate.instant("lang.registeredMailNumberRangesActivated"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}stop(t){const e=JSON.parse(JSON.stringify(t));e.status="END",this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.suspend"),msg:"En cl\xf4turant la plage, vous ne pourrez plus utiliser de recommand\xe9 de ce type tant que vous n'en n'aurez pas activ\xe9 une autre."}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.put("../rest/registeredMail/ranges/"+t.id,e)),Object(mt.a)(()=>{t.status="END",t.statusLabel=this.translate.instant("lang.registeredMail_"+t.status),setTimeout(()=>{this.adminService.setDataSource("admin_regitered_mail",this.data,this.sort,this.paginator,this.filterColumns)},0),this.notify.success(this.translate.instant("lang.registeredMailNumberRangesClosed"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}delete(t){this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete("../rest/registeredMail/ranges/"+t.id)),Object(mt.a)(()=>{this.data=this.data.filter(e=>e.id!==t.id),setTimeout(()=>{this.adminService.setDataSource("admin_regitered_mail",this.data,this.sort,this.paginator,this.filterColumns)},0),this.notify.success(this.translate.instant("lang.registeredMailNumberRangesRemoved"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a),n.Qb(OL),n.Qb(n.T),n.Qb(q.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-registered-mail-list"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(p5,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:15,vars:8,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["mat-subheader",""],["mat-list-item","","routerLink","/administration/registeredMails/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],["mat-list-item","",3,"active","routerLink",4,"ngFor","ngForOf"],["mat-list-item","",3,"routerLink"],["color","primary","mat-list-icon",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"row"],[1,"col-md-6","col-xs-6"],["matInput","",3,"formControl","placeholder"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSort","","matSortDisableClear","",3,"dataSource"],["table",""],["matColumnDef","trackerNumber"],["mat-sort-header","","style","flex:2",4,"matHeaderCellDef"],["style","flex:2",4,"matCellDef"],["matColumnDef","typeLabel"],["matColumnDef","rangeNumber"],["mat-sort-header","",4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","currentNumber"],["matColumnDef","status"],["matColumnDef","fullness"],["matColumnDef","actions"],[4,"matHeaderCellDef"],["style","justify-content: flex-end;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"routerLink","matTooltip",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["mat-sort-header","",2,"flex","2"],[2,"flex","2"],["mat-sort-header",""],[1,"label",3,"ngClass"],[1,"fullness","full"],["color","primay","mode","determinate","diameter","54",3,"value"],[1,"percent"],[2,"justify-content","flex-end"],["mat-icon-button","","color","accent",3,"matTooltip","disabled","click",4,"ngIf"],["mat-icon-button","","color","warn",3,"matTooltip","click",4,"ngIf"],["mat-icon-button","","color","warn",3,"matTooltip","disabled","click"],["aria-hidden","true",1,"fa","fa-trash-alt","fa-2x"],["mat-icon-button","","color","accent",3,"matTooltip","disabled","click"],["aria-hidden","true",1,"fa","fas","fa-play","fa-2x"],["mat-icon-button","","color","warn",3,"matTooltip","click"],["aria-hidden","true",1,"fa","fas","fa-stop-circle","fa-2x"],[2,"cursor","pointer",3,"routerLink","matTooltip"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,f5,12,7,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,m5,2,0,"div",9),n.Oc(14,L5,37,14,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,R.h,R.g,R.d,o.f,S.a,R.c,W.l,T.a,P.s,V.c,K.a,Y.c,J.b,X.d,X.u,X.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,vt.h,Fe.b,vt.a,P.q,V.a,k.b,A.b,vt.j,vt.m,o.d],pipes:[g.d],styles:[".active[_ngcontent-%COMP%], .active[_ngcontent-%COMP%]:active, .active[_ngcontent-%COMP%]:focus, .active[_ngcontent-%COMP%]:hover{color:#135f7f;border-left:5px solid #135f7f;background:rgba(19,95,127,.14)}.fullness[_ngcontent-%COMP%]{position:relative}.percent[_ngcontent-%COMP%]{position:absolute;top:50%;transform:translate(-50%,-50%);left:50%;font-size:10px;font-weight:700;color:#888}.fullness-ok[_ngcontent-%COMP%] .mat-progress-spinner circle, .mat-spinner[_ngcontent-%COMP%] circle[_ngcontent-%COMP%]{stroke:green}.fullness-warning[_ngcontent-%COMP%] .mat-progress-spinner circle, .mat-spinner[_ngcontent-%COMP%] circle[_ngcontent-%COMP%]{stroke:orange}.fullness-danger[_ngcontent-%COMP%] .mat-progress-spinner circle, .mat-spinner[_ngcontent-%COMP%] circle[_ngcontent-%COMP%]{stroke:red}.statusLabelDanger[_ngcontent-%COMP%]{color:#8e3e52}.statusLabelWarn[_ngcontent-%COMP%]{color:#f99830}.statusLabelPrimary[_ngcontent-%COMP%]{color:#135f7f}"]}),t})();function N5(t,e){1&t&&(n.Wb(0,"div",10),n.Rb(1,"mat-spinner",11),n.Vb())}function z5(t,e){1&t&&(n.Rb(0,"div",22),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.registeredMailNumberRangeModificationMsg"),n.Ec)}function B5(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",12),n.Oc(1,z5,2,3,"div",13),n.Wb(2,"form",14),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Wb(3,"div"),n.Wb(4,"mat-form-field"),n.Wb(5,"mat-label"),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Rb(8,"input",15),n.Vb(),n.Rb(9,"plugin-select-search",16),n.ic(10,"translate"),n.ic(11,"translate"),n.Wb(12,"div",17),n.Wb(13,"mat-form-field"),n.Wb(14,"mat-label"),n.Qc(15),n.ic(16,"translate"),n.Vb(),n.Wb(17,"input",18),n.dc("keypress",(function(e){return n.Dc(t),n.hc().onlyNumbers(e)})),n.Vb(),n.Vb(),n.Wb(18,"mat-form-field"),n.Wb(19,"mat-label"),n.Qc(20),n.ic(21,"translate"),n.Vb(),n.Wb(22,"input",19),n.dc("keypress",(function(e){return n.Dc(t),n.hc().onlyNumbers(e)})),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(23,"div",20),n.Wb(24,"button",21),n.Qc(25),n.ic(26,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(1),n.oc("ngIf","OK"===t.adminFormGroup.controls.status.value||"END"===t.adminFormGroup.controls.status.value),n.Db(1),n.oc("formGroup",t.adminFormGroup),n.Db(4),n.Rc(n.jc(7,16,"lang.trackerNumber")),n.Db(3),n.Fb(""),n.oc("showLabel",!0)("label",n.jc(10,18,"lang.registeredMailType"))("placeholderLabel",n.jc(11,20,"lang.registeredMailType"))("datas",t.registeredMailType)("formControlSelect",t.adminFormGroup.controls.registeredMailType),n.Db(6),n.Rc(n.jc(16,22,"lang.registeredMailStart")),n.Db(2),n.oc("min",t.minRange),n.Db(3),n.Rc(n.jc(21,24,"lang.registeredMailEnd")),n.Db(2),n.oc("min",t.adminFormGroup.controls.rangeStart.value),n.Db(2),n.oc("disabled",!t.adminFormGroup.valid),n.Db(1),n.Rc(n.jc(26,26,"lang.save"))}}let U5=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.route=i,this.router=n,this.notify=a,this.headerService=s,this.appService=o,this._formBuilder=r,this.loading=!0,this.id=null,this.minRange=1,this.registeredMailType=[{id:"2D",label:this.translate.instant("lang.registeredMail_2D")},{id:"2C",label:this.translate.instant("lang.registeredMail_2C")},{id:"RW",label:this.translate.instant("lang.registeredMail_RW")}]}ngOnInit(){this.route.params.subscribe(t=>Object(r.a)(this,void 0,void 0,(function*(){void 0===t.id?(this.creationMode=!0,this.headerService.setHeader(this.translate.instant("lang.registeredMailNumberRangeCreation")),this.adminFormGroup=this._formBuilder.group({id:[null],trackerNumber:[null,X.I.required],registeredMailType:[null,X.I.required],rangeStart:[1,X.I.required],rangeEnd:[2,X.I.required],status:["SPD"]}),this.loading=!1):(this.headerService.setHeader(this.translate.instant("lang.registeredMailNumberRangeModification")),this.id=t.id,this.creationMode=!1,yield this.getData()),this.adminFormGroup.controls.registeredMailType.valueChanges.pipe(Object(mt.a)(()=>{this.creationMode&&this.getMinRange()})).subscribe(),this.adminFormGroup.controls.rangeStart.valueChanges.pipe(Object(mt.a)(t=>{t>this.adminFormGroup.controls.rangeEnd.value?this.adminFormGroup.controls.rangeStart.setErrors({rangeError:!0}):(this.adminFormGroup.controls.rangeStart.setErrors(null),this.adminFormGroup.controls.rangeEnd.setErrors(null))})).subscribe(),this.adminFormGroup.controls.rangeEnd.valueChanges.pipe(Object(mt.a)(t=>{t<this.adminFormGroup.controls.rangeStart.value?this.adminFormGroup.controls.rangeEnd.setErrors({rangeError:!0}):(this.adminFormGroup.controls.rangeStart.setErrors(null),this.adminFormGroup.controls.rangeEnd.setErrors(null))})).subscribe()})))}getData(){return new Promise(t=>{this.http.get("../rest/registeredMail/ranges/"+this.id).pipe(Object(mt.a)(e=>{this.adminFormGroup=this._formBuilder.group({id:[this.id],trackerNumber:[e.range.trackerNumber],registeredMailType:[e.range.registeredMailType],rangeStart:[e.range.rangeStart],rangeEnd:[e.range.rangeEnd],status:[e.range.status]}),"OK"!==e.range.status&&"END"!==e.range.status||this.adminFormGroup.disable(),t(!0),this.loading=!1}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}onlyNumbers(t){let e;return e=t.charCode,(null!==this.adminFormGroup.controls.rangeStart.value||48!==e)&&e>=48&&e<=57}getMinRange(){this.http.get(`../rest/registeredMail/ranges/type/${this.adminFormGroup.controls.registeredMailType.value}/last`).pipe(Object(mt.a)(t=>{this.minRange=1===t.lastNumber?t.lastNumber:t.lastNumber+1,this.adminFormGroup.controls.rangeStart.setValue(this.minRange),this.adminFormGroup.controls.rangeEnd.value<this.adminFormGroup.controls.rangeStart.value&&this.adminFormGroup.controls.rangeEnd.setValue(this.adminFormGroup.controls.rangeStart.value+1)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}onSubmit(){const t={};Object.keys(this.adminFormGroup.controls).forEach(e=>{t[e]=this.adminFormGroup.controls[e].value}),this.creationMode?this.http.post("../rest/registeredMail/ranges",t).subscribe(()=>{this.notify.success(this.translate.instant("lang.registeredMailNumberRangesAdded")),this.router.navigate(["/administration/registeredMails"])},t=>{this.notify.handleSoftErrors(t)}):this.http.put("../rest/registeredMail/ranges/"+this.id,t).subscribe(()=>{this.notify.success(this.translate.instant("lang.registeredMailNumberRangesUpdated")),this.router.navigate(["/administration/registeredMails"])},t=>{this.notify.handleSoftErrors(t)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(X.h))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-registered-mail"]],decls:13,vars:8,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],["class","alert-message alert-message-danger","style","min-width: 100%;",3,"innerHTML",4,"ngIf"],[2,"display","contents",3,"formGroup","ngSubmit"],["matInput","","formControlName","trackerNumber"],[3,"showLabel","label","placeholderLabel","datas","formControlSelect"],[2,"display","grid","grid-template-columns","1fr 1fr","grid-gap","20px"],["matInput","","type","number","formControlName","rangeStart",3,"min","keypress"],["matInput","","type","number","formControlName","rangeEnd",3,"min","keypress"],[2,"text-align","center"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],[1,"alert-message","alert-message-danger",2,"min-width","100%",3,"innerHTML"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,N5,2,0,"div",8),n.Oc(12,B5,27,28,"mat-card",9),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,V.c,K.a,X.K,X.v,X.m,Y.c,Y.g,J.b,X.d,X.u,X.k,fr,X.A,k.b],pipes:[g.d],styles:[""]}),t})();function $5(t,e){if(1&t&&(n.Wb(0,"mat-option",40),n.Wb(1,"span",41),n.Wb(2,"span",42),n.Rb(3,"i",43),n.Vb(),n.Wb(4,"span",44),n.Qc(5),n.Vb(),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(3),n.Gb("fa ",t.icon," fa-1x"),n.Db(2),n.Sc(" ",t.label," ")}}function H5(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",45),n.dc("click",(function(){return n.Dc(t),n.hc(2).toggleData()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",46),n.Vb()}2&t&&n.pc("title",n.jc(1,1,"lang.preview"))}function G5(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",45),n.dc("click",(function(){return n.Dc(t),n.hc(2).toggleData()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",47),n.Vb()}2&t&&n.pc("title",n.jc(1,1,"lang.edition"))}function X5(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",48),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).selectedTemplateDisplayedSecondaryData=i})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.Tc("",t," ",n.jc(2,2,"lang.columns"),"")}}function q5(t,e){if(1&t&&(n.Wb(0,"mat-option",49),n.Wb(1,"span",41),n.Wb(2,"span",42),n.Rb(3,"i",43),n.Vb(),n.Wb(4,"span",44),n.Qc(5),n.Vb(),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.value),n.Db(3),n.Gb("fa ",t.icon," fa-2x"),n.Db(2),n.Sc(" ",t.label," ")}}function K5(t,e){if(1&t&&(n.Wb(0,"button",63),n.Rb(1,"mat-icon",64),n.Vb()),2&t){n.hc();const t=n.zc(3);n.oc("matMenuTriggerFor",t)}}function Y5(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",53),n.Oc(1,K5,2,1,"button",54),n.Wb(2,"mat-menu",null,17),n.Wb(4,"button",48),n.dc("click",(function(){n.Dc(t);const e=n.hc(),i=e.$implicit,a=e.index;return n.hc(3).removeData(i,a)})),n.Rb(5,"mat-icon",55),n.Wb(6,"span"),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Rb(9,"mat-divider"),n.Wb(10,"button",48),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(3).setStyle(e,"boldFontData")})),n.Rb(11,"mat-icon",56),n.Wb(12,"span"),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Wb(15,"button",48),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(3).setStyle(e,"align_leftData")})),n.Rb(16,"mat-icon",57),n.Wb(17,"span"),n.Qc(18),n.ic(19,"translate"),n.Vb(),n.Vb(),n.Wb(20,"button",48),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(3).setStyle(e,"align_centerData")})),n.Rb(21,"mat-icon",58),n.Wb(22,"span"),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Vb(),n.Wb(25,"button",48),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(3).setStyle(e,"align_rightData")})),n.Rb(26,"mat-icon",59),n.Wb(27,"span"),n.Qc(28),n.ic(29,"translate"),n.Vb(),n.Vb(),n.Wb(30,"button",48),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(3).setStyle(e,"bigFontData")})),n.Rb(31,"mat-icon",60),n.Wb(32,"span"),n.Qc(33),n.ic(34,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(35,"span",61),n.Rb(36,"i"),n.Qc(37,"\xa0 "),n.Rb(38,"span",62),n.Vb(),n.Vb()}if(2&t){const t=n.hc(),e=t.index,i=t.$implicit,a=n.hc(3);n.oc("sortableIndex",e),n.Db(1),n.oc("ngIf","label"==a.displayMode),n.Db(6),n.Rc(n.jc(8,24,"lang.delete")),n.Db(3),n.Ib("isSelectedMenu",i.cssClasses.indexOf("boldFontData")>-1),n.Db(3),n.Rc(n.jc(14,26,"lang.fontBold")),n.Db(2),n.Ib("isSelectedMenu",i.cssClasses.indexOf("align_leftData")>-1),n.Db(3),n.Rc(n.jc(19,28,"lang.alignLeft")),n.Db(2),n.Ib("isSelectedMenu",i.cssClasses.indexOf("align_centerData")>-1),n.Db(3),n.Rc(n.jc(24,30,"lang.alignCenter")),n.Db(2),n.Ib("isSelectedMenu",i.cssClasses.indexOf("align_rightData")>-1),n.Db(3),n.Rc(n.jc(29,32,"lang.alignRight")),n.Db(2),n.Ib("isSelectedMenu",i.cssClasses.indexOf("bigFontData")>-1),n.Db(3),n.Rc(n.jc(34,34,"lang.fontBig")),n.Db(2),n.Fb(i.cssClasses.join(" ")),n.Db(1),n.Gb("fa ",i.icon,""),n.Db(2),n.oc("innerHTML",i[a.displayMode],n.Ec)}}function J5(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Y5,39,36,"span",52),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf","getFolders"!=t.value)}}const Z5=function(){return["boxers-zone"]};function t6(t,e){if(1&t&&(n.Wb(0,"div",50),n.Wb(1,"mat-toolbar"),n.Oc(2,J5,2,1,"ng-container",51),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.oc("dropZones",n.uc(6,Z5))("sortableData",t.displayedSecondaryData),n.Db(1),n.Gb("secondaryInformations example-list column-",t.selectedTemplateDisplayedSecondaryData,"-list"),n.Db(1),n.oc("ngForOf",t.displayedSecondaryData)}}function e6(t,e){1&t&&n.Rb(0,"mat-icon",70)}function i6(t,e){1&t&&n.Rb(0,"mat-icon",71)}function n6(t,e){if(1&t&&(n.Wb(0,"span"),n.Oc(1,e6,1,0,"mat-icon",67),n.Oc(2,i6,1,0,"mat-icon",68),n.Rb(3,"br"),n.Wb(4,"span",69),n.Qc(5),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(1),n.oc("ngIf","label"==e.displayMode),n.Db(1),n.oc("ngIf","sample"==e.displayMode),n.Db(3),n.Rc(t[e.displayMode])}}function a6(t,e){if(1&t&&(n.Wb(0,"span"),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(1),n.Sc(" ",t[e.displayMode]," ")}}function s6(t,e){if(1&t&&(n.Wb(0,"span",65),n.Oc(1,n6,6,3,"span",66),n.Oc(2,a6,2,1,"span",66),n.Vb()),2&t){const t=e.index;n.Fb(e.$implicit.cssClasses.join(" ")),n.Db(1),n.oc("ngIf",0==t),n.Db(1),n.oc("ngIf",1==t)}}function o6(t,e){if(1&t&&(n.Wb(0,"button",63),n.Rb(1,"mat-icon",64),n.Vb()),2&t){n.hc();const t=n.zc(3);n.oc("matMenuTriggerFor",t)}}function r6(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Oc(1,o6,2,1,"button",54),n.Wb(2,"mat-menu",null,17),n.Wb(4,"button",48),n.dc("click",(function(){n.Dc(t);const e=n.hc(),i=e.$implicit,a=e.index;return n.hc(2).removeData(i,a)})),n.Rb(5,"mat-icon",55),n.Wb(6,"span"),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(9,"span",73),n.Rb(10,"i",74),n.Qc(11),n.Vb(),n.Tb()}if(2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(1),n.oc("ngIf","label"==e.displayMode),n.Db(6),n.Rc(n.jc(8,3,"lang.delete")),n.Db(4),n.Sc(" ",t[e.displayMode],"")}}function c6(t,e){if(1&t&&(n.Wb(0,"div",72),n.Oc(1,r6,12,5,"ng-container",66),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf","getFolders"==t.value)}}function l6(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",9),n.Wb(1,"mat-form-field",10),n.Wb(2,"mat-label"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"mat-select",11),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().selectedProcessTool.defaultTab=e})),n.Oc(6,$5,6,5,"mat-option",12),n.ic(7,"sortBy"),n.Vb(),n.Vb(),n.Rb(8,"hr"),n.Wb(9,"mat-toolbar",13),n.Wb(10,"span"),n.Oc(11,H5,3,3,"button",14),n.Oc(12,G5,3,3,"button",14),n.Wb(13,"button",15),n.ic(14,"translate"),n.Qc(15),n.Rb(16,"i",16),n.Vb(),n.Wb(17,"mat-menu",null,17),n.Oc(19,X5,3,4,"button",18),n.Vb(),n.Vb(),n.Wb(20,"span",19),n.Wb(21,"form"),n.Wb(22,"mat-form-field",20),n.Rb(23,"input",21),n.ic(24,"translate"),n.Wb(25,"mat-autocomplete",22,23),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc().addData(e.option.value)})),n.Oc(27,q5,6,5,"mat-option",24),n.ic(28,"async"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(29,"span"),n.Wb(30,"button",25),n.dc("click",(function(){return n.Dc(t),n.hc().removeAllData()})),n.Qc(31),n.ic(32,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(33,"mat-card"),n.Oc(34,t6,3,7,"div",26),n.Wb(35,"div",27),n.Oc(36,s6,3,4,"span",28),n.Wb(37,"mat-button-toggle-group",29),n.Wb(38,"button",30),n.ic(39,"translate"),n.Rb(40,"mat-icon",31),n.Vb(),n.Wb(41,"button",30),n.ic(42,"translate"),n.Rb(43,"mat-icon",32),n.Vb(),n.Wb(44,"button",30),n.ic(45,"translate"),n.Rb(46,"mat-icon",33),n.Vb(),n.Wb(47,"button",30),n.ic(48,"translate"),n.Rb(49,"mat-icon",34),n.Vb(),n.Vb(),n.Vb(),n.Oc(50,c6,2,1,"div",35),n.Vb(),n.Wb(51,"div",36),n.Wb(52,"div",37),n.Wb(53,"button",38),n.dc("click",(function(){return n.Dc(t),n.hc().saveTemplate()})),n.Qc(54),n.ic(55,"translate"),n.Vb(),n.Wb(56,"button",39),n.dc("click",(function(){return n.Dc(t),n.hc().cancelModification()})),n.Qc(57),n.ic(58,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(18),e=n.zc(26),i=n.hc();n.Db(3),n.Rc(n.jc(4,32,"lang.tabProcessPosition")),n.Db(2),n.oc("ngModel",i.selectedProcessTool.defaultTab),n.Db(1),n.oc("ngForOf",n.kc(7,34,i.processTool,"label")),n.Db(5),n.oc("ngIf","label"==i.displayMode),n.Db(1),n.oc("ngIf","sample"==i.displayMode),n.Db(1),n.oc("title",n.jc(14,37,"lang.templateUsed"))("matMenuTriggerFor",t),n.Db(2),n.Sc(" ",i.selectedTemplateDisplayedSecondaryData," "),n.Db(4),n.oc("ngForOf",i.templateDisplayedSecondaryData),n.Db(4),n.pc("placeholder",n.jc(24,39,"lang.availableDatas")),n.oc("formControl",i.dataControl)("matAutocomplete",e),n.Db(4),n.oc("ngForOf",n.jc(28,41,i.filteredDataOptions)),n.Db(3),n.oc("disabled","sample"==i.displayMode),n.Db(1),n.Sc(" ",n.jc(32,43,"lang.eraseAll")," "),n.Db(3),n.oc("ngIf",i.displayedSecondaryData.length>0),n.Db(2),n.oc("ngForOf",i.displayedMainData),n.Db(2),n.pc("title",n.jc(39,45,"lang.notes")),n.oc("disabled","label"==i.displayMode),n.Db(2),n.oc("matBadgeHidden","label"==i.displayMode),n.Db(1),n.pc("title",n.jc(42,47,"lang.attachments")),n.oc("disabled","label"==i.displayMode),n.Db(2),n.oc("matBadgeHidden","label"==i.displayMode),n.Db(1),n.pc("title",n.jc(45,49,"lang.diffusionList")),n.oc("disabled","label"==i.displayMode),n.Db(3),n.pc("title",n.jc(48,51,"lang.linkDetails")),n.oc("disabled","label"==i.displayMode),n.Db(3),n.oc("ngForOf",i.displayedSecondaryData),n.Db(3),n.oc("disabled",i.checkModif()),n.Db(1),n.Sc(" ",n.jc(55,53,"lang.validate")," "),n.Db(2),n.oc("disabled",i.checkModif()),n.Db(1),n.Sc(" ",n.jc(58,55,"lang.cancel")," ")}}let d6=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.appService=n,this.headerService=a,this.functions=s,this.loading=!0,this.customFieldsFormControl=new X.i({value:"",disabled:!1}),this.displayedMainData=[{value:"chronoNumberShort",label:this.translate.instant("lang.chronoNumberShort"),sample:"MAARCH/2019A/1",cssClasses:["align_centerData","normalData"],icon:""},{value:"object",label:this.translate.instant("lang.object"),sample:this.translate.instant("lang.objectSample"),cssClasses:["longData"],icon:""}],this.availableData=[{value:"getPriority",label:this.translate.instant("lang.getPriority"),sample:this.translate.instant("lang.getPrioritySample"),cssClasses:["align_leftData"],icon:"fa-traffic-light"},{value:"getCategory",label:this.translate.instant("lang.getCategory"),sample:this.translate.instant("lang.incoming"),cssClasses:["align_leftData"],icon:"fa-exchange-alt"},{value:"getDoctype",label:this.translate.instant("lang.getDoctype"),sample:this.translate.instant("lang.getDoctypeSample"),cssClasses:["align_leftData"],icon:"fa-suitcase"},{value:"getAssignee",label:this.translate.instant("lang.getAssignee"),sample:this.translate.instant("lang.getAssigneeSample"),cssClasses:["align_leftData"],icon:"fa-sitemap"},{value:"getRecipients",label:this.translate.instant("lang.getRecipients"),sample:"Patricia PETIT",cssClasses:["align_leftData"],icon:"fa-user"},{value:"getSenders",label:this.translate.instant("lang.getSenders"),sample:"Alain DUBOIS (MAARCH)",cssClasses:["align_leftData"],icon:"fa-book"},{value:"getCreationAndProcessLimitDates",label:this.translate.instant("lang.getCreationAndProcessLimitDates"),sample:this.translate.instant("lang.getCreationAndProcessLimitDatesSample"),cssClasses:["align_leftData"],icon:"fa-calendar"},{value:"getVisaWorkflow",label:this.translate.instant("lang.getVisaWorkflow"),sample:'<i color="accent" class="fa fa-check"></i> Barbara BAIN -> <i class="fa fa-hourglass-half"></i> <b>Bruno BOULE</b> -> <i class="fa fa-hourglass-half"></i> Patricia PETIT',cssClasses:["align_leftData"],icon:"fa-list-ol"},{value:"getSignatories",label:this.translate.instant("lang.getSignatories"),sample:"Denis DAULL, Patricia PETIT",cssClasses:["align_leftData"],icon:"fa-certificate"},{value:"getModificationDate",label:this.translate.instant("lang.getModificationDate"),sample:"01-01-2019",cssClasses:["align_leftData"],icon:"fa-calendar-check"},{value:"getOpinionLimitDate",label:this.translate.instant("lang.getOpinionLimitDate"),sample:"01-01-2019",cssClasses:["align_leftData"],icon:"fa-stopwatch"},{value:"getParallelOpinionsNumber",label:this.translate.instant("lang.getParallelOpinionsNumber"),sample:this.translate.instant("lang.getParallelOpinionsNumberSample"),cssClasses:["align_leftData"],icon:"fa-comment-alt"},{value:"getFolders",label:this.translate.instant("lang.getFolders"),sample:this.translate.instant("lang.getFoldersSample"),cssClasses:["align_leftData"],icon:"fa-folder"},{value:"getResId",label:this.translate.instant("lang.getResId"),sample:this.translate.instant("lang.getResIdSample"),cssClasses:["align_leftData"],icon:"fa-envelope"},{value:"getBarcode",label:this.translate.instant("lang.getBarcode"),sample:this.translate.instant("lang.getBarcodeSample"),cssClasses:["align_leftData"],icon:"fa-barcode"}],this.availableDataClone=[],this.displayedSecondaryData=[],this.displayedSecondaryDataClone=[],this.displayMode="label",this.dataControl=new X.i,this.listEvent=[{id:"detailDoc",value:"documentDetails"},{id:"eventVisaMail",value:"signatureBookAction"},{id:"eventProcessDoc",value:"processDocument"},{id:"eventViewDoc",value:"viewDoc"}],this.templateDisplayedSecondaryData=[2,3,4,5,6,7],this.selectedTemplateDisplayedSecondaryData=7,this.selectedTemplateDisplayedSecondaryDataClone=7,this.selectedListEvent=null,this.selectedListEventClone=null,this.processTool=[{id:"dashboard",icon:"fas fa-columns",label:this.translate.instant("lang.newsFeed")},{id:"history",icon:"fas fa-history",label:this.translate.instant("lang.history")},{id:"notes",icon:"fas fa-pen-square",label:this.translate.instant("lang.notesAlt")},{id:"attachments",icon:"fas fa-paperclip",label:this.translate.instant("lang.attachments")},{id:"linkedResources",icon:"fas fa-link",label:this.translate.instant("lang.links")},{id:"diffusionList",icon:"fas fa-share-alt",label:this.translate.instant("lang.diffusionList")},{id:"emails",icon:"fas fa-envelope",label:this.translate.instant("lang.mailsSentAlt")},{id:"visaCircuit",icon:"fas fa-list-ol",label:this.translate.instant("lang.visaWorkflow")},{id:"opinionCircuit",icon:"fas fa-comment-alt",label:this.translate.instant("lang.avis")},{id:"info",icon:"fas fa-info-circle",label:this.translate.instant("lang.informations")}],this.selectedProcessTool={defaultTab:null,canUpdateData:!1,canUpdateModel:!1,canUpdateDocuments:!1},this.selectedProcessToolClone=null,this.searchAdv={listEvent:{},listDisplay:{},list_event_data:{}}}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.headerService.setHeader(this.translate.instant("lang.searchAdministration")),yield this.initCustomFields(),yield this.getTemplate(),this.availableDataClone=JSON.parse(JSON.stringify(this.availableData)),this.selectedTemplateDisplayedSecondaryDataClone=this.selectedTemplateDisplayedSecondaryData,this.selectedListEvent=this.searchAdv.listEvent,this.selectedListEventClone=this.selectedListEvent,this.selectedProcessToolClone=JSON.parse(JSON.stringify(this.selectedProcessTool)),this.displayedSecondaryDataClone=JSON.parse(JSON.stringify(this.displayedSecondaryData)),setTimeout(()=>{this.filteredDataOptions=this.dataControl.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>this._filterData(t)))},0),this.loading=!1}))}initCustomFields(){return new Promise((t,e)=>{this.http.get("../rest/customFields").pipe(Object(l.a)(t=>(t.customFields=t.customFields.map(t=>({value:"indexingCustomField_"+t.id,label:t.label,sample:this.translate.instant("lang.customField")+t.id,cssClasses:["align_leftData"],icon:"fa-hashtag"})),t.customFields)),Object(mt.a)(e=>{this.availableData=this.availableData.concat(e),t(!0)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()})}toggleData(){this.dataControl.disabled?this.dataControl.enable():this.dataControl.disable(),this.displayMode="label"===this.displayMode?"sample":"label"}setStyle(t,e){const i=e.split("_");2===i.length&&t.cssClasses.forEach((n,a)=>{n.includes(i[0])&&n!==e&&t.cssClasses.splice(a,1)});const n=t.cssClasses.indexOf(e);-1===n?t.cssClasses.push(e):t.cssClasses.splice(n,1)}addData(t){const e=this.availableData.map(t=>t.value).indexOf(t);this.displayedSecondaryData.push(this.availableData.filter(e=>e.value===t)[0]),this.availableData.splice(e,1),$("#availableData").blur(),this.dataControl.setValue("")}removeData(t,e){this.availableData.push(t),this.displayedSecondaryData.splice(e,1),this.dataControl.setValue("")}removeAllData(){this.displayedSecondaryData=this.displayedSecondaryData.concat(),this.availableData=this.availableData.concat(this.displayedSecondaryData),this.dataControl.setValue(""),this.displayedSecondaryData=[]}drop(t){t.previousContainer===t.container?Object(lo.h)(t.container.data,t.previousIndex,t.currentIndex):(Object(lo.i)(t.previousContainer.data,t.container.data,t.previousIndex,t.currentIndex-1),this.displayedSecondaryData.forEach((t,e)=>{t.length>this.selectedTemplateDisplayedSecondaryData?Object(lo.i)(t,this.displayedSecondaryData[e+1],t.length,0):t.length<this.selectedTemplateDisplayedSecondaryData&&!this.functions.empty(this.displayedSecondaryData[e+1])&&Object(lo.i)(this.displayedSecondaryData[e+1],t,0,t.length)}))}getTemplate(){return this.displayedSecondaryData=[],new Promise((t,e)=>{this.http.get("../rest/search/configuration").pipe(Object(mt.a)(e=>{this.selectedTemplateDisplayedSecondaryData=e.configuration.listDisplay.templateColumns,this.selectedProcessTool.defaultTab=e.configuration.listEvent.defaultTab,e.configuration.listDisplay.subInfos.forEach(t=>{this.addData(t.value),this.displayedSecondaryData[this.displayedSecondaryData.length-1].cssClasses=t.cssClasses}),t(!0)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()})}saveTemplate(){const t={templateColumns:this.selectedTemplateDisplayedSecondaryData,subInfos:this.displayedSecondaryData};this.selectedListEvent=JSON.parse(JSON.stringify({defaultTab:this.selectedProcessTool.defaultTab})),this.http.put("../rest/configurations/admin_search ",{listDisplay:t,listEvent:this.selectedListEvent,list_event_data:this.selectedProcessTool}).subscribe(()=>{this.displayedSecondaryDataClone=JSON.parse(JSON.stringify(this.displayedSecondaryData)),this.searchAdv.listDisplay=this.displayedSecondaryData,this.searchAdv.listEvent=this.selectedListEvent,this.selectedListEventClone=this.selectedListEvent,this.searchAdv.list_event_data=this.selectedProcessTool,this.selectedProcessToolClone=JSON.parse(JSON.stringify(this.selectedProcessTool)),this.selectedTemplateDisplayedSecondaryDataClone=JSON.parse(JSON.stringify(this.selectedTemplateDisplayedSecondaryData)),this.notify.success(this.translate.instant("lang.modificationsProcessed"))},t=>{this.notify.error(t.error.errors)})}_filterData(t){let e="";return"string"==typeof t?e=t.toLowerCase():null!==t&&(e=t.label.toLowerCase()),this.availableData.filter(t=>t.label.toLowerCase().includes(e))}checkModif(){return JSON.stringify(this.displayedSecondaryData)===JSON.stringify(this.displayedSecondaryDataClone)&&this.selectedListEvent===this.selectedListEventClone&&JSON.stringify(this.selectedProcessTool)===JSON.stringify(this.selectedProcessToolClone)&&JSON.stringify(this.selectedTemplateDisplayedSecondaryData)===JSON.stringify(this.selectedTemplateDisplayedSecondaryDataClone)}cancelModification(){this.displayedSecondaryData=JSON.parse(JSON.stringify(this.displayedSecondaryDataClone)),this.selectedListEvent=this.selectedListEventClone,this.selectedProcessTool=JSON.parse(JSON.stringify(this.selectedProcessToolClone)),this.availableData=JSON.parse(JSON.stringify(this.availableDataClone)),this.selectedTemplateDisplayedSecondaryData=JSON.parse(JSON.stringify(this.selectedTemplateDisplayedSecondaryDataClone)),this.dataControl.setValue("")}hasFolder(){return this.displayedSecondaryData.map(t=>t.value).indexOf("getFolders")>-1}changeEventList(t){this.selectedProcessTool="processDocument"===t.value?{defaultTab:"dashboard"}:{}}toggleCanUpdate(t){t||(this.selectedProcessTool.canUpdateModel=t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(w.a),n.Qb(y.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:12,vars:7,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["class","card-app-content",4,"ngIf"],[1,"card-app-content"],["appearance","outline"],[3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"editorTool"],["color","primary","mat-icon-button","",3,"title","click",4,"ngIf"],["color","primary","mat-button","",3,"title","matMenuTriggerFor"],[1,"fas","fa-columns"],["menu","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],[1,"area"],["appearance","outline","floatLabel","never"],["id","availableData","name","availableData","type","text","matInput","",3,"formControl","placeholder","matAutocomplete"],[3,"optionSelected"],["auto","matAutocomplete"],["class","dataList",3,"value",4,"ngFor","ngForOf"],["color","warn","mat-button","",2,"float","right",3,"disabled","click"],["dnd-sortable-container","","style","border: solid 1px #F9983066;border-radius: 4px;",3,"dropZones","sortableData",4,"ngIf"],[1,"resultRow","newRow"],["class","resultCol",3,"class",4,"ngFor","ngForOf"],["multiple","",1,"actions"],["color","primary","mat-icon-button","",3,"title","disabled"],["fontSet","fas","matBadge","2","fontIcon","fa-comments fa-2x",3,"matBadgeHidden"],["fontSet","fas","matBadge","7","fontIcon","fa-paperclip fa-2x",3,"matBadgeHidden"],["fontSet","fas","fontIcon","fa-sitemap fa-2x"],["fontSet","fas","fontIcon","fa-info-circle fa-2x"],["class","folder-info",4,"ngFor","ngForOf"],[1,"row"],[1,"col-md-12","text-center",2,"margin-top","30px"],["color","primary","mat-raised-button","",3,"disabled","click"],["color","default","mat-raised-button","",3,"disabled","click"],[3,"value"],[1,"optionContent"],[1,"dataIcon"],["color","primary"],[1,"dataLabel"],["color","primary","mat-icon-button","",3,"title","click"],["fontSet","fas","fontIcon","fa-eye"],["fontSet","fas","fontIcon","fa-edit"],["mat-menu-item","",3,"click"],[1,"dataList",3,"value"],["dnd-sortable-container","",2,"border","solid 1px #F9983066","border-radius","4px",3,"dropZones","sortableData"],[4,"ngFor","ngForOf"],["class","example-box","dnd-sortable","",3,"sortableIndex",4,"ngIf"],["dnd-sortable","",1,"example-box",3,"sortableIndex"],["color","primary","mat-icon-button","",3,"matMenuTriggerFor",4,"ngIf"],["color","warn","fontSet","fas","fontIcon","fa-trash fa-2x",1,"secondaryInformations_icon"],["fontSet","fas","fontIcon","fa-bold fa-2x",1,"secondaryInformations_icon"],["fontSet","fas","fontIcon","fa-align-left fa-2x",1,"secondaryInformations_icon"],["fontSet","fas","fontIcon","fa-align-center fa-2x",1,"secondaryInformations_icon"],["fontSet","fas","fontIcon","fa-align-right fa-2x",1,"secondaryInformations_icon"],["fontSet","fas","fontIcon","fa-text-height fa-2x",1,"secondaryInformations_icon"],[2,"width","100%"],[1,"secondaryInformations_label",3,"innerHTML"],["color","primary","mat-icon-button","",3,"matMenuTriggerFor"],["fontSet","fas","fontIcon","fa-ellipsis-v fa-2x"],[1,"resultCol"],[4,"ngIf"],["color","primary","class","fm fm-letter fm-2x",4,"ngIf"],["color","warn","class","fm fm-letter-status-inprogress fm-2x",4,"ngIf"],[1,"resultCol_chrono"],["color","primary",1,"fm","fm-letter","fm-2x"],["color","warn",1,"fm","fm-letter-status-inprogress","fm-2x"],[1,"folder-info"],[1,"badge","badge-folder"],[1,"fa","fa-folder"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,l6,59,57,"mat-card",8),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,K.a,Y.c,Y.g,ee.a,X.u,X.x,P.s,M.a,k.b,ne.d,ne.e,X.K,X.v,X.w,J.b,X.d,Ne.d,X.j,Ne.a,og.b,S.a,wt.a,W.p,ne.b,Ee.f,Ee.e,T.a],pipes:[g.d,Wt.a,P.b],styles:[".availableData[_ngcontent-%COMP%]{margin:10px;display:flex}.secondaryInformations[_ngcontent-%COMP%]{font-size:10px;height:30px;color:#666}.secondaryInformations_icon[_ngcontent-%COMP%]{height:auto}.secondaryInformations_label[_ngcontent-%COMP%]{width:100%}.resultRow[_ngcontent-%COMP%]{align-items:center;display:flex;padding:5px}.resultRow-mobile[_ngcontent-%COMP%]{font-size:80%}.resultCol[_ngcontent-%COMP%]{flex:1;overflow:hidden;text-overflow:ellipsis}.resultCol-mobile[_ngcontent-%COMP%]{overflow:inherit;text-overflow:inherit;word-break:break-all}.resultCol_chrono[_ngcontent-%COMP%]{color:rgba(0,0,0,.4);font-size:90%}.actions[_ngcontent-%COMP%]{text-align:right;box-shadow:none;border:none;flex:1;justify-content:flex-end;overflow:inherit}.elemToDrag[_ngcontent-%COMP%]{flex:1;border:1px dashed;padding:10px;height:10px;line-height:0;cursor:move;margin-right:5px;margin-left:5px}.columns[_ngcontent-%COMP%]{width:100%;height:90px;padding:20px 10px;border-bottom:1px solid #ccc;color:rgba(0,0,0,.87);display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;background:#fff;font-size:14px}.mat-badge-content[_ngcontent-%COMP%]{background:#f99830}.example-list[_ngcontent-%COMP%]{display:grid;gap:10px;height:auto;max-width:100%;font-size:10px;background:#f5f5f5}.example-box[_ngcontent-%COMP%]{color:#666;display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;cursor:move;background:#f5f5f5;flex-grow:1;flex-basis:0;height:20px}.cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.example-box[_ngcontent-%COMP%]:last-child{border:none}.example-list.cdk-drop-list-dragging[_ngcontent-%COMP%] .example-box[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.editorTool[_ngcontent-%COMP%]{display:flex;height:44px;font-size:10px;margin-bottom:30px}.editorTool[_ngcontent-%COMP%] .area[_ngcontent-%COMP%]{flex:1}.editorTool[_ngcontent-%COMP%] .area[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{width:100%}.editorTool[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{border-left:1px solid #666;height:70%;margin-left:10px;margin-right:10px}.editorTool[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{height:35px}.editorTool[_ngcontent-%COMP%] .mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline{background:inherit}.editorTool[_ngcontent-%COMP%] .mat-form-field-outline{background:#fff}.optionContent[_ngcontent-%COMP%]{display:flex!important}.optionContent[_ngcontent-%COMP%] .dataIcon[_ngcontent-%COMP%]{width:30px}.optionContent[_ngcontent-%COMP%] .dataIcon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:14px}.optionContent[_ngcontent-%COMP%] .dataLabel[_ngcontent-%COMP%]{flex:1}.isSelectedMenu[_ngcontent-%COMP%]{background:rgba(249,152,48,.14)}.align_leftData[_ngcontent-%COMP%]{text-align:left}.align_centerData[_ngcontent-%COMP%]{text-align:center}.align_rightData[_ngcontent-%COMP%]{text-align:right}.boldFontData[_ngcontent-%COMP%]{font-weight:700}.bigFontData[_ngcontent-%COMP%]{font-size:14px}.smallFontData[_ngcontent-%COMP%]{font-size:10px}.normalData[_ngcontent-%COMP%]{flex:1}.longData[_ngcontent-%COMP%]{flex:3}.badge-folder[_ngcontent-%COMP%]{cursor:default;background:#135f7f;margin:5px;font-size:8px;max-width:250px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),t})();const h6=["adminMenuTemplate"];function u6(t,e){if(1&t&&(n.Wb(0,"a",12),n.Rb(1,"mat-icon",13),n.Wb(2,"p",14),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Ib("active",t.current),n.oc("routerLink",t.route),n.Db(1),n.Fb(t.icon),n.Db(2),n.Sc(" ",t.label," ")}}function p6(t,e){if(1&t&&(n.Wb(0,"mat-nav-list"),n.Oc(1,u6,4,6,"a",11),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",t.subMenus)}}function b6(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Vb())}function f6(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"input",28),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.ssoId=i})),n.Vb(),n.Wb(2,"mat-hint"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=e.index;n.Db(1),n.qc("name","input_",i,""),n.oc("ngModel",t.ssoId)("placeholder",t.maarchId),n.Db(2),n.Rc(n.jc(4,4,t.desc))}}function m6(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",17),n.Wb(1,"form",18,19),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Wb(3,"mat-form-field",20),n.Wb(4,"mat-label"),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Wb(7,"input",21),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().sso.url=e})),n.Vb(),n.Wb(8,"mat-hint"),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Wb(11,"mat-expansion-panel",22),n.Wb(12,"mat-expansion-panel-header"),n.Wb(13,"mat-panel-title",23),n.Qc(14),n.ic(15,"translate"),n.Vb(),n.Vb(),n.Oc(16,f6,5,6,"mat-form-field",24),n.Vb(),n.Wb(17,"div",25),n.Wb(18,"button",26),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"button",27),n.dc("click",(function(){return n.Dc(t),n.hc().cancel()})),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(2),e=n.hc();n.Db(5),n.Rc(n.jc(6,9,"lang.ssoUrl")),n.Db(2),n.oc("ngModel",e.sso.url),n.Db(2),n.Rc(n.jc(10,11,"lang.ssoUrlDesc")),n.Db(5),n.Sc(" ",n.jc(15,13,"lang.mappingHeaders")," "),n.Db(2),n.oc("ngForOf",e.sso.mapping),n.Db(2),n.oc("disabled",!e.isValid(t)),n.Db(1),n.Rc(n.jc(20,15,"lang.validate")),n.Db(2),n.oc("disabled",!e.isValid(t)),n.Db(1),n.Rc(n.jc(23,17,"lang.cancel"))}}let g6=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this.translate=t,this.http=e,this.notify=i,this.appService=n,this.headerService=a,this.viewContainerRef=s,this.adminService=o,this.dialog=r,this.authService=c,this.loading=!0,this.subMenus=[{icon:"fas fa-users-cog",route:"/administration/connections/sso",label:this.translate.instant("lang.sso"),current:!0}],this.sso={url:"",mapping:[{maarchId:"login",ssoId:"id",desc:"lang.fieldUserIdDescSso"}]}}ngOnInit(){this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.ssoConnections")),this.getConnection()}getConnection(){this.http.get("../rest/configurations/admin_sso").pipe(Object(mt.a)(t=>{this.sso=t.configuration.value,this.ssoClone=JSON.parse(JSON.stringify(this.sso)),this.loading=!1}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isValid(t){return t.form.valid&&JSON.stringify(this.sso)!==JSON.stringify(this.ssoClone)}cancel(){this.sso=JSON.parse(JSON.stringify(this.ssoClone))}formatData(){const t=JSON.parse(JSON.stringify(this.sso));return t.mapping=t.mapping.map(t=>(delete t.desc,t)),t}onSubmit(){this.formatData(),"sso"!==this.authService.authMode?this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.warning")+" !",msg:this.translate.instant("lang.warningConnectionMsg")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.put("../rest/configurations/admin_sso",this.formatData())),Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.dataUpdated")),this.ssoClone=JSON.parse(JSON.stringify(this.sso))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe():this.http.put("../rest/configurations/admin_sso",this.formatData()).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.dataUpdated")),this.ssoClone=JSON.parse(JSON.stringify(this.sso))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(w.a),n.Qb(y.a),n.Qb(n.T),n.Qb(OL),n.Qb(q.b),n.Qb(_.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-sso-administration"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(h6,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:15,vars:8,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["mat-list-item","",3,"active","routerLink",4,"ngFor","ngForOf"],["mat-list-item","",3,"routerLink"],["color","primary","mat-list-icon",""],["mat-line",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[2,"display","contents",3,"ngSubmit"],["ssoForm","ngForm"],["appearance","outline"],["matInput","","name","ssoUrl",3,"ngModel","ngModelChange"],["expanded","",2,"margin-top","10px"],["color","primary"],[4,"ngFor","ngForOf"],[1,"text-center",2,"padding","10px"],["mat-raised-button","","color","primary",3,"disabled"],["mat-raised-button","","type","button","color","default",3,"disabled","click"],["matInput","","required","",3,"name","ngModel","placeholder","ngModelChange"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,p6,2,1,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,b6,2,0,"div",9),n.Oc(14,m6,24,19,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,R.h,P.s,R.d,o.f,S.a,R.c,W.l,V.c,K.a,X.K,X.v,X.w,Y.c,Y.g,J.b,X.d,X.u,X.x,Y.f,gt.c,gt.g,gt.h,k.b,X.F],pipes:[g.d],styles:[".active[_ngcontent-%COMP%], .active[_ngcontent-%COMP%]:active, .active[_ngcontent-%COMP%]:focus, .active[_ngcontent-%COMP%]:hover{color:#135f7f;border-left:5px solid #135f7f;background:rgba(19,95,127,.14)}"]}),t})(),v6=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[o.g.forChild([{path:"administration",canActivate:[x],component:NF},{path:"administration/users",canActivate:[x],component:YL},{path:"administration/users/new",canActivate:[x],component:kN},{path:"administration/users/:id",canActivate:[x],component:kN},{path:"administration/groups",canActivate:[x],component:UN},{path:"administration/groups/new",canActivate:[x],component:zz},{path:"administration/groups/:id",canActivate:[x],component:zz},{path:"administration/baskets",canActivate:[x],component:oB},{path:"administration/baskets/new",canActivate:[x],component:lU},{path:"administration/baskets/:id",canActivate:[x],component:lU},{path:"administration/doctypes",canActivate:[x],component:TU},{path:"administration/diffusionModels",canActivate:[x],component:JU},{path:"administration/diffusionModels/new",canActivate:[x],component:c$},{path:"administration/diffusionModels/:id",canActivate:[x],component:c$},{path:"administration/entities",canActivate:[x],component:gH},{path:"administration/statuses",canActivate:[x],component:WH},{path:"administration/statuses/new",canActivate:[x],component:BH},{path:"administration/statuses/:identifier",canActivate:[x],component:BH},{path:"administration/parameters",canActivate:[x],component:GG},{path:"administration/parameters/new",canActivate:[x],component:DG},{path:"administration/parameters/:id",canActivate:[x],component:DG},{path:"administration/priorities",canActivate:[x],component:hX},{path:"administration/priorities/new",canActivate:[x],component:bX},{path:"administration/priorities/:id",canActivate:[x],component:bX},{path:"administration/actions",canActivate:[x],component:rG},{path:"administration/actions/new",canActivate:[x],component:vG},{path:"administration/actions/:id",canActivate:[x],component:vG},{path:"administration/notifications",canActivate:[x],component:QX},{path:"administration/notifications/new",canActivate:[x],component:yq},{path:"administration/notifications/:identifier",canActivate:[x],component:yq},{path:"administration/history",canActivate:[x],component:Iq},{path:"administration/history-batch",canActivate:[x],component:cK},{path:"administration/update-status",canActivate:[x],component:bK},{path:"administration/contacts",canActivate:[x],component:o3},{path:"administration/contacts/duplicates",canActivate:[x],component:Q4},{path:"administration/contacts/list",redirectTo:"contacts",pathMatch:"full"},{path:"administration/contacts/list/new",canActivate:[x],component:W3},{path:"administration/contacts/list/:id",canActivate:[x],component:W3},{path:"administration/contacts/contactsCustomFields",canActivate:[x],component:P3},{path:"administration/contacts/contacts-groups",canActivate:[x],component:LK},{path:"administration/contacts/contacts-groups/new",canActivate:[x],component:mY},{path:"administration/contacts/contacts-groups/:id",canActivate:[x],component:mY},{path:"administration/contacts/contacts-parameters",canActivate:[x],component:LY},{path:"administration/versions-update",canActivate:[x],component:qY},{path:"administration/docservers",canActivate:[x],component:oJ},{path:"administration/docservers/new",canActivate:[x],component:dJ},{path:"administration/templates",canActivate:[x],component:IJ},{path:"administration/templates/new",canActivate:[x],component:mZ},{path:"administration/templates/:id",canActivate:[x],component:mZ},{path:"administration/securities",canActivate:[x],component:yZ},{path:"administration/sendmail",canActivate:[x],component:AZ},{path:"administration/shippings",canActivate:[x],component:qZ},{path:"administration/shippings/new",canActivate:[x],component:s1},{path:"administration/shippings/:id",canActivate:[x],component:s1},{path:"administration/customFields",canActivate:[x],component:N1},{path:"administration/indexingModels",canActivate:[x],component:a2},{path:"administration/indexingModels/new",canActivate:[x],component:O0},{path:"administration/indexingModels/:id",canActivate:[x],component:O0},{path:"administration/tags",canActivate:[x],component:H3},{path:"administration/tags/new",canActivate:[x],component:Z3},{path:"administration/tags/:id",canActivate:[x],component:Z3},{path:"administration/alfresco",canActivate:[x],component:_4},{path:"administration/alfresco/new",canActivate:[x],component:s4},{path:"administration/alfresco/:id",canActivate:[x],component:s4},{path:"administration/registeredMails",canActivate:[x],component:Q5},{path:"administration/registeredMails/new",canActivate:[x],component:U5},{path:"administration/registeredMails/:id",canActivate:[x],component:U5},{path:"administration/issuingSites",canActivate:[x],component:i5},{path:"administration/issuingSites/new",canActivate:[x],component:u5},{path:"administration/issuingSites/:id",canActivate:[x],component:u5},{path:"administration/search",canActivate:[x],component:d6},{path:"administration/connections/sso",canActivate:[x],component:g6}])],o.g]}),t})();function _6(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-nav-list"),n.Wb(1,"a",1),n.dc("click",(function(){return n.Dc(t),n.hc().backClicked()})),n.Rb(2,"mat-icon",2),n.Wb(3,"p",3),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Vb()}2&t&&(n.Db(4),n.Sc(" ",n.jc(5,1,"lang.back")," "))}function y6(t,e){1&t&&n.Rb(0,"mat-divider")}let x6=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this._router=i,this.activatedRoute=n,this._location=a,this.user={},this.router=i}ngOnInit(){}backClicked(){this._location.back()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.c),n.Qb(o.a),n.Qb(P.n))},t.\u0275cmp=n.Kb({type:t,selectors:[["menu-nav"]],decls:2,vars:2,consts:[[4,"ngIf"],["mat-list-item","",3,"click"],["color","primary","mat-list-icon","",1,"fa","fa-chevron-left"],["mat-line",""]],template:function(t,e){1&t&&(n.Oc(0,_6,6,3,"mat-nav-list",0),n.Oc(1,y6,1,0,"mat-divider",0)),2&t&&(n.oc("ngIf","/home"!=e.router.url&&"/profile"!=e.router.url&&"/about-us"!=e.router.url&&"/administration"!=e.router.url&&-1==e.router.url.indexOf("/basketList")&&-1==e.router.url.indexOf("/folders")&&"/followed"!=e.router.url),n.Db(1),n.oc("ngIf","/home"!=e.router.url&&"/about-us"!=e.router.url&&"/administration"!=e.router.url&&-1==e.router.url.indexOf("/basketList")&&-1==e.router.url.indexOf("/folders")))},directives:[P.t,R.h,R.d,S.a,R.c,W.l,T.a],pipes:[g.d],encapsulation:2}),t})();function C6(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",8),n.Wb(1,"button",9),n.dc("click",(function(){return n.Dc(t),n.hc().goTo()})),n.Rb(2,"i",10),n.Qc(3,"\xa0 "),n.Wb(4,"span"),n.Qc(5),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(2),n.Fb(t.headerService.sideBarButton.icon),n.Db(3),n.Rc(t.headerService.sideBarButton.label)}}let O6=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.headerService=e,this.appService=i,this.router=n,this._location=a,this.config={},this.navButton=null}ngOnInit(){}goTo(){"__GOBACK"===this.headerService.sideBarButton.route?this._location.back():this.router.navigate([this.headerService.sideBarButton.route])}goToHome(){this.router.navigate(["/home"])}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(y.a),n.Qb(w.a),n.Qb(o.c),n.Qb(P.n))},t.\u0275cmp=n.Kb({type:t,selectors:[["header-panel"]],inputs:{navButton:"navButton",snavLeft:"snavLeft"},decls:11,vars:9,consts:[[1,"panelHeader"],["class","panelHeader-backHome",4,"ngIf"],[1,"panelHeader-logo"],["mat-button","",2,"margin-right","30px",3,"title","click"],["svgIcon","maarchLogoFull",1,"maarchLogo"],[1,"panelHeader-button"],["mat-icon-button","",3,"title","click"],["fontSet","fas","fontIcon","fa-stream",2,"transform","rotate(180deg)"],[1,"panelHeader-backHome"],["mat-button","",2,"padding-top","5px","padding-bottom","5px",3,"click"],[2,"height","auto"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Oc(1,C6,6,4,"div",1),n.Wb(2,"div",2),n.Wb(3,"button",3),n.dc("click",(function(){return e.goToHome()})),n.ic(4,"translate"),n.Rb(5,"mat-icon",4),n.Vb(),n.Vb(),n.Wb(6,"div",5),n.Wb(7,"button",6),n.dc("click",(function(){return e.headerService.sideNavLeft.close()})),n.ic(8,"translate"),n.Rb(9,"mat-icon",7),n.Vb(),n.Vb(),n.Vb(),n.Rb(10,"mat-divider")),2&t&&(n.Db(1),n.oc("ngIf",null!==e.headerService.sideBarButton),n.Db(1),n.Ib("text-center",null!==e.headerService.sideBarButton),n.Db(1),n.pc("title",n.jc(4,5,"lang.home")),n.Db(4),n.pc("title",n.jc(8,7,"lang.closeSidePanel")))},directives:[P.t,k.b,S.a,T.a],pipes:[g.d],styles:[".panelHeader[_ngcontent-%COMP%]{display:flex;align-items:center}.panelHeader-logo[_ngcontent-%COMP%]{flex:1}.panelHeader-button[_ngcontent-%COMP%]{display:flex;align-items:center}.panelHeader-button[_ngcontent-%COMP%] .mat-icon-button[_ngcontent-%COMP%]{font-size:25px;color:#666}.panelHeader-backHome[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{height:auto;color:#666;background:#d8d8d8;padding:10px;border-radius:20px;font-size:18px}.panelHeader-backHome[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:13px;color:#666}.maarchLogo[_ngcontent-%COMP%]{height:80px;width:auto;padding:20px}"]}),t})();const D6=["basketPanel"];function w6(t,e){1&t&&(n.Wb(0,"div",13),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noticeGroupeOrder")," "))}function M6(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item",16),n.dc("onDropSuccess",(function(){return n.Dc(t),n.hc(4).updateGroupsOrder()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",17),n.Wb(3,"span",18),n.Qc(4),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=e.index;n.pc("title",n.jc(1,3,"lang.move")),n.oc("sortableIndex",i),n.Db(4),n.Rc(t.groupDesc)}}const k6=function(){return["boxers-zone"]};function S6(t,e){if(1&t&&(n.Wb(0,"mat-list"),n.Wb(1,"span",14),n.Oc(2,M6,5,5,"mat-list-item",15),n.Vb(),n.Vb()),2&t){const t=n.hc(3);n.Db(1),n.oc("dropZones",n.uc(3,k6))("sortableData",t.homeData.regroupedBaskets),n.Db(1),n.oc("ngForOf",t.homeData.regroupedBaskets)}}function I6(t,e){if(1&t&&(n.Wb(0,"span",18),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Rc(t.groupDesc)}}function P6(t,e){1&t&&n.Rb(0,"mat-divider",22)}const V6=function(t){return{color:t}};function R6(t,e){if(1&t&&n.Rb(0,"mat-icon",32),2&t){const t=n.hc(2).$implicit;n.oc("ngStyle",n.vc(1,V6,t.color))}}function j6(t,e){if(1&t&&(n.Wb(0,"span",33),n.Qc(1),n.Vb()),2&t){const t=n.hc(2).$implicit;n.Db(1),n.Rc(t.resourceNumber)}}function A6(t,e){if(1&t&&(n.Wb(0,"span",34),n.Qc(1),n.Vb()),2&t){const t=n.hc(2).$implicit;n.Db(1),n.Rc(t.resourceNumber)}}function W6(t,e){if(1&t&&(n.Wb(0,"a",26),n.Oc(1,R6,1,3,"mat-icon",27),n.Oc(2,j6,2,1,"span",28),n.Oc(3,A6,2,1,"span",29),n.Wb(4,"p",30),n.Qc(5),n.Rb(6,"br"),n.Wb(7,"small",31),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc(5);n.Db(1),n.oc("ngIf",t.redirected&&!e.appService.getViewMode()),n.Db(1),n.oc("ngIf",0==t.resourceNumber),n.Db(1),n.oc("ngIf",0!=t.resourceNumber),n.Db(1),n.pc("title",t.basket_name),n.oc("ngStyle",n.vc(10,V6,t.color)),n.Db(1),n.Sc(" ",t.basket_name,""),n.Db(3),n.Tc("(",n.jc(9,8,"lang.redirectedTo")," ",t.redirectedUser,")")}}function T6(t,e){if(1&t&&(n.Wb(0,"span",33),n.Qc(1),n.Vb()),2&t){const t=n.hc(2).$implicit;n.Db(1),n.Rc(t.resourceNumber)}}function E6(t,e){if(1&t&&(n.Wb(0,"span",34),n.Qc(1),n.Vb()),2&t){const t=n.hc(2).$implicit;n.Db(1),n.Rc(t.resourceNumber)}}const F6=function(t){return{selectedBasket:t}},L6=function(t,e){return{opacity:t,height:e}};function Q6(t,e){if(1&t){const t=n.Xb();n.Wb(0,"a",35),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit,i=n.hc(5);return i.refreshDatas(e),i.closePanelLeft()})),n.Oc(1,T6,2,1,"span",28),n.Oc(2,E6,2,1,"span",29),n.Wb(3,"p",30),n.Qc(4),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc(2).$implicit,i=n.hc(3);n.sc("routerLink","/basketList/users/",t.owner_user_id,"/groups/",e.groupSerialId,"/baskets/",t.id,""),n.oc("ngClass",n.vc(10,F6,i.headerService.currentBasketInfo.basketId==t.id&&i.headerService.currentBasketInfo.ownerId==t.owner_user_id&&i.headerService.currentBasketInfo.groupId==e.groupSerialId))("ngStyle",n.wc(12,L6,0==t.resourceNumber?"0.5":"1",i.appService.getViewMode()?"50px":"38px")),n.Db(1),n.oc("ngIf",0==t.resourceNumber),n.Db(1),n.oc("ngIf",0!=t.resourceNumber),n.Db(1),n.pc("title",t.basket_name),n.oc("ngStyle",n.vc(15,V6,t.color)),n.Db(1),n.Sc(" ",t.basket_name," ")}}function N6(t,e){if(1&t&&(n.Ub(0),n.Oc(1,W6,10,12,"a",24),n.Oc(2,Q6,5,17,"a",25),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",t.redirected),n.Db(1),n.oc("ngIf",!t.redirected)}}function z6(t,e){if(1&t&&(n.Wb(0,"mat-nav-list",23),n.Oc(1,N6,3,2,"ng-container",11),n.ic(2,"filterList"),n.Vb()),2&t){const t=n.hc().$implicit;n.hc();const e=n.zc(3);n.Db(1),n.oc("ngForOf",n.lc(2,1,t.baskets,e.value,"basket_name"))}}function B6(t,e){if(1&t&&(n.Ub(0),n.Oc(1,I6,2,1,"span",19),n.Oc(2,P6,1,0,"mat-divider",20),n.Oc(3,z6,3,5,"mat-nav-list",21),n.Tb()),2&t){const t=e.$implicit,i=n.hc(3);n.Db(1),n.oc("ngIf",t.baskets[0]&&!i.editOrderGroups),n.Db(1),n.oc("ngIf",t.baskets[0]&&!i.editOrderGroups),n.Db(1),n.oc("ngIf",!i.editOrderGroups)}}function U6(t,e){1&t&&n.Rb(0,"mat-icon",41)}function $6(t,e){if(1&t&&(n.Wb(0,"span",33),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Rc(t.resourceNumber)}}function H6(t,e){if(1&t&&(n.Wb(0,"span",34),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Rc(t.resourceNumber)}}function G6(t,e){if(1&t&&(n.Wb(0,"a",38),n.Oc(1,U6,1,0,"mat-icon",39),n.Oc(2,$6,2,1,"span",28),n.Oc(3,H6,2,1,"span",29),n.Wb(4,"p",40),n.Qc(5),n.Rb(6,"br"),n.Wb(7,"small",31),n.Qc(8),n.Vb(),n.Vb(),n.Vb()),2&t){const t=e.$implicit,i=n.hc(4);n.sc("routerLink","/basketList/users/",t.owner_user_id,"/groups/",t.group_id,"/baskets/",t.id,""),n.oc("ngClass",n.vc(11,F6,i.headerService.currentBasketInfo.basketId==t.id&&i.headerService.currentBasketInfo.ownerId==t.owner_user_id&&i.headerService.currentBasketInfo.groupId==t.group_id)),n.Db(1),n.oc("ngIf",!i.appService.getViewMode()),n.Db(1),n.oc("ngIf",0==t.resourceNumber),n.Db(1),n.oc("ngIf",0!=t.resourceNumber),n.Db(1),n.pc("title",t.basket_name),n.Db(1),n.Sc(" ",t.basket_name,""),n.Db(3),n.Tc("(",t.userToDisplay," - ",t.group_desc,")")}}function X6(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"span",36),n.ic(2,"translate"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Rb(5,"mat-divider"),n.Wb(6,"mat-nav-list"),n.Oc(7,G6,9,13,"a",37),n.ic(8,"filterList"),n.Vb(),n.Tb()),2&t){n.hc();const t=n.zc(3),e=n.hc(2);n.Db(1),n.pc("title",n.jc(2,3,"lang.basketsAssigned")),n.Db(2),n.Rc(n.jc(4,5,"lang.basketsAssignedShort")),n.Db(4),n.oc("ngForOf",n.lc(8,7,e.homeData.assignedBaskets,t.value,"basket_name"))}}function q6(t,e){1&t&&(n.Wb(0,"div",42),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noAvailableBasket")," "))}function K6(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-form-field",7),n.Rb(2,"input",8,9),n.ic(4,"translate"),n.Vb(),n.Oc(5,w6,3,3,"div",10),n.Oc(6,S6,3,4,"mat-list",6),n.Oc(7,B6,4,3,"ng-container",11),n.Oc(8,X6,9,11,"ng-container",6),n.Oc(9,q6,3,3,"div",12),n.Tb()),2&t){const t=n.hc(2);n.Db(1),n.Lc("display",(t.homeData.assignedBaskets.length>0||t.homeData.regroupedBaskets.length>0)&&!t.editOrderGroups?"inline-block":"none"),n.Db(1),n.pc("placeholder",n.jc(4,8,"lang.filterBy")),n.Db(3),n.oc("ngIf",t.editOrderGroups),n.Db(1),n.oc("ngIf",t.editOrderGroups),n.Db(1),n.oc("ngForOf",t.homeData.regroupedBaskets),n.Db(1),n.oc("ngIf",t.homeData.assignedBaskets.length>0&&!t.editOrderGroups),n.Db(1),n.oc("ngIf",0===t.homeData.assignedBaskets.length&&0===t.homeData.regroupedBaskets.length)}}const Y6=function(t,e){return{color:t,opacity:e}};function J6(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-expansion-panel",1,2),n.Wb(2,"mat-expansion-panel-header"),n.Wb(3,"mat-panel-title"),n.Rb(4,"i",3),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Wb(7,"div",4),n.dc("click",(function(e){n.Dc(t);const i=n.hc();return e.stopPropagation(),i.editGroupOrder()}))("mouseover",(function(){return n.Dc(t),n.hc().hoverEditGroupOrder=!0}))("mouseleave",(function(){return n.Dc(t),n.hc().hoverEditGroupOrder=!1})),n.ic(8,"translate"),n.Rb(9,"mat-icon",5),n.Vb(),n.Vb(),n.Oc(10,K6,10,10,"ng-container",6),n.Vb()}if(2&t){const t=n.hc();n.Db(5),n.Sc("\xa0",n.jc(6,4,"lang.myBaskets")," "),n.Db(2),n.pc("title",n.jc(8,6,"lang.listConfiguration")),n.Db(2),n.oc("ngStyle",n.wc(8,Y6,t.editOrderGroups?"orange":"#135F7F",t.editOrderGroups||t.hoverEditGroupOrder?"1":"0.4")),n.Db(1),n.oc("ngIf",!t.loading)}}let Z6=(()=>{class t{constructor(t,e,i,a,s,o){this.translate=t,this.http=e,this.appService=i,this.headerService=a,this.notify=s,this.actionService=o,this.loading=!0,this.hoverEditGroupOrder=!1,this.homeData=null,this.currentBasketInfo={ownerId:0,groupId:0,basketId:""},this.refreshEvent=new n.o,this.editOrderGroups=!1,this.subscription=this.actionService.catchAction().subscribe(t=>{this.refreshBasketHome()})}ngOnInit(){this.getMyBaskets()}ngOnDestroy(){this.subscription.unsubscribe()}getMyBaskets(){this.loading=!0,this.http.get("../rest/home").pipe(Object(mt.a)(t=>{this.homeData=t,this.loading=!1})).subscribe()}closePanelLeft(){this.appService.getViewMode()&&this.snavL.close()}refreshDatas(t){this.refreshBasketHome(),this.headerService.headerMessage===t.basket_name&&this.actionService.emitAction()}refreshBasketHome(){this.http.get("../rest/home").subscribe(t=>{this.homeData=t})}togglePanel(t){t?this.basketPanel.open():this.basketPanel.close()}editGroupOrder(){this.editOrderGroups=!this.editOrderGroups}updateGroupsOrder(){const t=this.homeData.regroupedBaskets.map(t=>t.groupSerialId);this.http.put("../rest/currentUser/profile/preferences",{homeGroups:t}).pipe(Object(mt.a)(()=>this.notify.success(this.translate.instant("lang.parameterUpdated"))),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(w.a),n.Qb(y.a),n.Qb(D.a),n.Qb(bC))},t.\u0275cmp=n.Kb({type:t,selectors:[["basket-home"]],viewQuery:function(t,e){var i;1&t&&n.Kc(D6,!0),2&t&&n.yc(i=n.ec())&&(e.basketPanel=i.first)},inputs:{currentBasketInfo:"currentBasketInfo",snavL:"snavL"},outputs:{refreshEvent:"refreshEvent"},decls:1,vars:1,consts:[["class","basketList","expanded","",4,"ngIf"],["expanded","",1,"basketList"],["basketPanel",""],[1,"fa","fa-inbox","panelIconMenu"],[3,"title","click","mouseover","mouseleave"],["mat-list-icon","",1,"fa","fa-cog",2,"height","auto",3,"ngStyle"],[4,"ngIf"],["floatLabel","never","appearance","outline",1,"basketsFilter",2,"padding-left","20px","padding-right","20px","font-size","11px"],["matInput","",3,"placeholder"],["listFilter",""],["style","color: rgba(0,0,0,0.25);text-align:center;",4,"ngIf"],[4,"ngFor","ngForOf"],["class","noBasket",4,"ngIf"],[2,"color","rgba(0,0,0,0.25)","text-align","center"],["dnd-sortable-container","",3,"dropZones","sortableData"],["disableRipple","true","dnd-sortable","",3,"title","sortableIndex","onDropSuccess",4,"ngFor","ngForOf"],["disableRipple","true","dnd-sortable","",3,"title","sortableIndex","onDropSuccess"],["color","primary","mat-list-icon","",1,"fa","fa-arrows-alt",2,"font-size","19px"],[1,"basketGroupTitle"],["class","basketGroupTitle",4,"ngIf"],["style","width: 80%;",4,"ngIf"],["style","padding-bottom: 10px;",4,"ngIf"],[2,"width","80%"],[2,"padding-bottom","10px"],["mat-list-item","","disableRipple","true","style","cursor:not-allowed;",4,"ngIf"],["mat-list-item","","style","cursor:pointer;",3,"ngClass","routerLink","ngStyle","click",4,"ngIf"],["mat-list-item","","disableRipple","true",2,"cursor","not-allowed"],["mat-list-icon","","class","fa fa-share",3,"ngStyle",4,"ngIf"],["class","nbResZero",4,"ngIf"],["class","nbRes",4,"ngIf"],["mat-line","",3,"title","ngStyle"],["color","primary"],["mat-list-icon","",1,"fa","fa-share",3,"ngStyle"],[1,"nbResZero"],[1,"nbRes"],["mat-list-item","",2,"cursor","pointer",3,"ngClass","routerLink","ngStyle","click"],["color","primary",2,"font-weight","bold",3,"title"],["mat-list-item","",3,"ngClass","routerLink",4,"ngFor","ngForOf"],["mat-list-item","",3,"ngClass","routerLink"],["style","color:#666","mat-list-icon","","class","fa fa-paper-plane",4,"ngIf"],["mat-line","",2,"color","#666",3,"title"],["mat-list-icon","",1,"fa","fa-paper-plane",2,"color","#666"],[1,"noBasket"]],template:function(t,e){1&t&&n.Oc(0,J6,11,11,"mat-expansion-panel",0),2&t&&n.oc("ngIf",!e.loading)},directives:[P.t,gt.c,gt.g,gt.h,S.a,R.c,P.w,Y.c,J.b,P.s,R.a,Ee.f,R.d,Ee.e,T.a,R.h,W.l,o.f,P.q],pipes:[g.d,rg],styles:[".basketList[_ngcontent-%COMP%]{border-radius:0;box-shadow:none}.basketList[_ngcontent-%COMP%] .mat-expansion-panel-body{padding:0}.basketList[_ngcontent-%COMP%] .mat-expansion-panel-header-title[_ngcontent-%COMP%]{color:#135f7f;display:flex;align-items:center;font-size:14px;font-weight:500}.basketList[_ngcontent-%COMP%] .mat-line[_ngcontent-%COMP%]{font-size:12px;font-weight:700}.selectedBasket[_ngcontent-%COMP%]{border-left:5px solid #135f7f}.selectedBasket[_ngcontent-%COMP%], .selectedBasket[_ngcontent-%COMP%]:focus{background:rgba(19,95,127,.14)}.nbRes[_ngcontent-%COMP%]{color:#135f7f;font-size:14px}.nbRes[_ngcontent-%COMP%], .nbResZero[_ngcontent-%COMP%]{font-weight:700;min-width:auto}.nbResZero[_ngcontent-%COMP%]{color:#666;font-size:12px}.basketGroupTitle[_ngcontent-%COMP%]{color:#135f7f;font-size:14px;font-weight:500;padding-left:10px}.basketsFilter[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.panelIconMenu[_ngcontent-%COMP%]{font-size:22px}.noBasket[_ngcontent-%COMP%]{text-align:center;font-size:13px;opacity:.5;font-style:italic}"]}),t})();var t7=i("cH1L"),e7=i("ihCf"),i7=i("zkoq"),n7=i("dNgK"),a7=i("xHqg"),s7=i("2ChS");const o7=["acInput"],r7=["auto"];function c7(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",7),n.dc("removed",(function(){n.Dc(t);const i=e.$implicit;return n.hc().remove(i)})),n.Qc(1),n.Rb(2,"mat-icon",8),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t," ")}}function l7(t,e){if(1&t&&(n.Wb(0,"mat-option",9),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc();n.oc("value",t)("disabled",i.datasFormControl.value.indexOf(t)>-1),n.Db(1),n.Sc(" ",t," ")}}let d7=(()=>{class t{constructor(t,e,i,a,s){this.translate=t,this.http=e,this.notify=i,this.dialog=a,this.latinisePipe=s,this.inputFormControl=new X.i,this.loading=!1,this.appearance="legacy",this.required=!1,this.options=[],this.inputLabel="Mon champ",this.targetSearchKey=null,this.datasFormControl=new X.i({value:[],disabled:!1}),this.afterSelected=new n.o,this.valuesToDisplay={}}ngOnInit(){}getLabel(t){return this.options.length>0&&Object.keys(2===this.options[0].length)?t[this.targetSearchKey]:t}initAutocompleteData(){this.filteredOptions=this.inputFormControl.valueChanges.pipe(Object(Qe.a)(null),Object(l.a)(t=>t?this._filter(t):this.options.slice()))}add(t){const e=t.input,i=t.value;(i||"").trim()&&this.datasFormControl.value.push(i.trim()),e&&(e.value=""),this.inputFormControl.setValue(null)}remove(t){const e=this.datasFormControl.value.indexOf(t);if(e>=0){let t=[];t=this.datasFormControl.value,t.splice(e,1),this.datasFormControl.setValue(t)}}selected(t){this.datasFormControl.value.push(t.option.viewValue),this.acInput.nativeElement.value="",this.inputFormControl.setValue(null)}_filter(t){const e=t.toLowerCase();return this.datasFormControl.value.filter(t=>t.toLowerCase().indexOf(e)>-1)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(Tt.c))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-autocomplete-list"]],viewQuery:function(t,e){var i;1&t&&(n.Xc(o7,!0),n.Xc(r7,!0)),2&t&&(n.yc(i=n.ec())&&(e.acInput=i.first),n.yc(i=n.ec())&&(e.matAutocomplete=i.first))},inputs:{appearance:"appearance",required:"required",options:"options",inputLabel:"inputLabel",targetSearchKey:"targetSearchKey",datasFormControl:"datasFormControl"},outputs:{afterSelected:"afterSelected"},decls:10,vars:8,consts:[["chipList",""],[3,"removed",4,"ngFor","ngForOf"],[3,"placeholder","formControl","matAutocomplete","matChipInputFor"],["acInput",""],[3,"optionSelected"],["auto","matAutocomplete"],[3,"value","disabled",4,"ngFor","ngForOf"],[3,"removed"],["matChipRemove","",1,"fa","fa-times-circle"],[3,"value","disabled"]],template:function(t,e){if(1&t&&(n.Wb(0,"mat-form-field"),n.Wb(1,"mat-chip-list",null,0),n.Oc(3,c7,3,1,"mat-chip",1),n.Rb(4,"input",2,3),n.Vb(),n.Wb(6,"mat-autocomplete",4,5),n.dc("optionSelected",(function(t){return e.selected(t)})),n.Oc(8,l7,2,3,"mat-option",6),n.ic(9,"async"),n.Vb(),n.Vb()),2&t){const t=n.zc(2),i=n.zc(7);n.Db(3),n.oc("ngForOf",e.datasFormControl.value),n.Db(1),n.oc("placeholder",e.inputLabel)("formControl",e.inputFormControl)("matAutocomplete",i)("matChipInputFor",t),n.Db(4),n.oc("ngForOf",n.jc(9,6,e.filteredOptions))}},directives:[Y.c,ze.d,P.s,X.d,Ne.d,ze.c,X.u,X.j,Ne.a,ze.a,S.a,ze.e,W.p],pipes:[P.b],styles:[".mat-form-field-appearance-outline[_ngcontent-%COMP%]{font-size:11px} .mat-form-field-appearance-outline .mat-form-field-outline-thick{color:#135f7f} .mat-form-field-prefix{top:0!important}.mat-option[_ngcontent-%COMP%] .mat-option-text{display:flex}.mat-option[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:110%;font-weight:700}.autcompleteIcon[_ngcontent-%COMP%]{width:20px;display:flex;align-items:center}.smallInput[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.smallInputInfo[_ngcontent-%COMP%]{font-size:9px;white-space:normal;line-height:13px;display:table-cell;vertical-align:middle}.input-form[_ngcontent-%COMP%] .mat-form-field-prefix{left:15px}.activeListAutocomplete[_ngcontent-%COMP%]{font-size:13px;height:auto}.noResult[_ngcontent-%COMP%]{text-align:center;font-style:italic;opacity:.5}.autoCompleteInfoResult[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center}"]}),t})(),h7=(()=>{class t{constructor(t){t.setDefaultLang("fr")}}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)(n.ac(g.e))},imports:[[s.a,Xs,AF.a],Xs]}),t})();n.Hc(co,[P.q,P.r,P.s,P.t,P.A,P.w,P.x,P.y,P.z,P.u,P.v,x6,zt,We,Ot,O6,Z6,X.K,X.z,X.J,X.d,X.A,X.D,X.a,X.G,X.H,X.C,X.u,X.v,X.F,X.q,X.p,X.B,X.b,X.e,X.x,X.y,X.w,X.j,X.m,X.k,X.n,X.g,o.h,o.d,o.f,o.e,o.i,j.a,t7.b,j.c,M4.b,Y.b,Y.c,Y.f,Y.g,Y.h,Y.i,Y.j,ee.a,ee.c,W.p,W.o,te.c,te.a,e7.b,e7.c,J.b,J.d,A.b,A.d,Te.c,Te.d,Te.a,Te.f,Te.e,Te.b,I.a,I.b,I.c,I.d,I.e,I.f,k.b,k.a,K.a,K.f,K.n,K.d,K.m,K.l,K.b,K.e,K.k,K.i,K.h,K.g,K.o,K.c,og.b,og.a,V.a,V.c,ni.a,M.a,M.c,ne.e,ne.b,ne.d,ne.a,i7.b,i7.d,i7.g,W.l,i7.f,i7.e,i7.a,vt.o,vt.i,vt.k,vt.c,vt.b,vt.n,vt.e,vt.g,vt.h,vt.a,vt.d,vt.j,vt.m,vt.f,vt.l,vt.r,Kt.a,Fe.a,Fe.b,ae.a,ae.b,ae.f,ae.g,ae.h,ae.j,ae.k,ae.m,ae.p,ae.n,ae.c,ae.d,ae.o,ae.l,ae.e,gt.a,gt.c,gt.d,gt.g,gt.h,gt.f,gt.e,Ne.a,Ne.d,Ne.c,n7.c,S.a,q.e,q.d,q.i,q.f,q.c,R.a,R.h,R.d,R.b,R.c,R.g,W.s,R.i,R.f,T.a,ze.d,ze.a,ze.c,ze.e,ze.b,ze.f,a7.a,a7.j,a7.b,a7.d,a7.e,a7.h,a7.i,a7.c,a7.f,hc.b,hc.a,gY.a,wt.a,s7.a,W.u,vy.a,vy.h,vy.j,vy.k,vy.b,vy.g,vy.i,M4.a,M4.d,M4.e,Ee.b,Ee.c,Ee.d,Ee.f,Ee.e,Ee.g,At,Rt,jt,lo.e,lo.f,lo.a,lo.b,lo.d,lo.c,ii,f0,fr,vO,im,Ef,ie,Zd,El,iO,nD,Ko,go,Qv,My,cQ,KD,hd,d7,Sg,Uw,uP,Fk,kC,Du,qT,$O,IO,wW,LW,$D,Gs,g.a,Jr,vr,co,Cr],[P.b,P.G,P.p,P.k,P.E,P.g,P.C,P.F,P.d,P.f,P.i,P.j,P.l,Tt.a,Tt.e,Tt.k,Tt.n,Tt.o,Tt.p,Tt.r,Tt.t,Tt.u,Tt.v,Tt.q,Tt.b,Tt.c,Tt.f,Tt.w,Tt.h,Tt.s,Tt.d,Tt.m,Tt.g,Tt.x,rg,uo,ec,si,Wt.a,ps,bs,HD,g.d]);let u7=(()=>{class t{constructor(t){t.setDefaultLang("fr")}}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)(n.ac(g.e))},providers:[OL],imports:[[s.a,AF.a,as.forChild(),v6,h7]]}),t})();var p7=i("R1ws");let b7=(()=>{class t{constructor(t){t.setDefaultLang("fr")}}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)(n.ac(g.e))},imports:[[s.a,Tt.i,AF.a],s.a]}),t})(),f7=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.router=i,this.notificationService=n,this.authService=a,this.byPassToken=[{route:"../rest/prerequisites",method:["GET"]},{route:"../rest/authenticate",method:["POST"]},{route:"../rest/authenticate/token",method:["GET"]},{route:"../rest/authenticationInformation",method:["GET"]},{route:"../rest/passwordRules",method:["GET"]},{route:"../rest/languages",method:["GET"]}],this.byPassHandleErrors=[{route:"/password",method:["PUT"]}]}addAuthHeader(t){const e=this.authService.getToken();return t.clone({setHeaders:{Authorization:"Bearer "+e}})}logout(){this.authService.logout(!1,!0),this.notificationService.error(this.translate.instant("lang.sessionExpired"))}intercept(t,e){return this.byPassToken.filter(e=>t.url.indexOf(e.route)>-1&&e.method.indexOf(t.method)>-1).length>0?e.handle(t):(t=this.addAuthHeader(t),e.handle(t).pipe(Object(m.a)(i=>{if(this.byPassHandleErrors.filter(e=>t.url.indexOf(e.route)>-1&&e.method.indexOf(t.method)>-1).length>0)return e.handle(t);if(401===i.status)return console.debug("Auth error",t.url),this.http.get("../rest/authenticate/token",{params:{refreshToken:this.authService.getRefreshToken()}}).pipe(Object(ft.a)(i=>(console.debug("Attempt get token ... !",t.url),this.authService.setToken(i.token),this.authService.updateUserInfo(i.token),t=this.addAuthHeader(t),e.handle(t).pipe(Object(m.a)(t=>{if(401===t.status)return this.logout(),Object(c.a)(!1)})))),Object(m.a)(e=>(401===e.status&&(console.debug("Refresh token failed !",t.url,this.router.url),this.logout()),Object(c.a)(!1))));if("User must change his password"===i.error.errors)return this.router.navigate(["/password-modification"]);{const t=new v.d({error:i.error,status:i.status,statusText:i.statusText,headers:i.headers,url:i.url});return Promise.reject(t)}})))}}return t.\u0275fac=function(e){return new(e||t)(n.ac(g.e),n.ac(v.b),n.ac(o.c),n.ac(D.a),n.ac(_.a))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();function m7(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item",4),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).gotToFolder(i)}))("cdkDropListDropped",(function(i){n.Dc(t);const a=e.$implicit;return n.hc(2).drop(i,a)}))("cdkDropListEntered",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).dragEnter(i)}))("cdkDropListExited",(function(){return e.$implicit.drag=!1})),n.Wb(1,"mat-icon",5),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.foldersService.unpinFolder(a)})),n.ic(2,"translate"),n.Rb(3,"i",6),n.Vb(),n.Wb(4,"span",7),n.Wb(5,"span",8),n.Qc(6),n.Vb(),n.Vb(),n.Wb(7,"span",9),n.Qc(8),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.Ib("selectedFolder",i.foldersService.getCurrentFolder().id==t.id),n.oc("id","folder-list-"+t.id),n.Db(1),n.oc("title",n.jc(2,11,"lang.unpinFolder")),n.Db(4),n.Ib("drag",t.drag),n.oc("title",t.label),n.Db(1),n.Sc(" ",t.label," "),n.Db(1),n.Ib("empty",0===t.countResources),n.Db(1),n.Sc(" ",t.countResources," ")}}function g7(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-list",2),n.Oc(2,m7,9,13,"mat-list-item",3),n.Vb(),n.Tb()),2&t){const t=n.hc();n.Db(2),n.oc("ngForOf",t.foldersService.getPinnedList())}}function v7(t,e){1&t&&(n.Wb(0,"div",10),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noPinnedFolder")," "))}let _7=(()=>{class t{constructor(t,e,i){this.translate=t,this.http=e,this.foldersService=i,this.noInit=!1,this.subscription=this.foldersService.catchEvent().subscribe(t=>{})}ngOnInit(){this.foldersService.initFolder(),this.noInit||this.foldersService.getPinnedFolders()}gotToFolder(t){this.foldersService.goToFolder(t)}dragEnter(t){t.drag=!0}drop(t,e){this.foldersService.classifyDocument(t,e)}ngOnDestroy(){this.subscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(tw.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["folder-pinned"]],inputs:{noInit:"noInit"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["elseTemplate",""],[1,"pinnedFolderList"],["cdkDropList","","cdkDropListConnectedTo","['document-list','folder-list']",3,"selectedFolder","id","click","cdkDropListDropped","cdkDropListEntered","cdkDropListExited",4,"ngFor","ngForOf"],["cdkDropList","","cdkDropListConnectedTo","['document-list','folder-list']",3,"id","click","cdkDropListDropped","cdkDropListEntered","cdkDropListExited"],["mat-list-icon","",1,"pinnedIcon",3,"title","click"],[1,"fa","fa-thumbtack"],[1,"pinnedFolderItem"],[1,"treeLabel",3,"title"],[1,"countResources"],[1,"noPinnedFolder"]],template:function(t,e){if(1&t&&(n.Oc(0,g7,3,1,"ng-container",0),n.Oc(1,v7,3,3,"ng-template",null,1,n.Pc)),2&t){const t=n.zc(2);n.oc("ngIf",e.foldersService.getPinnedList().length>0)("ngIfElse",t)}},directives:[P.t,R.a,P.s,R.d,lo.e,S.a,R.c],pipes:[g.d],styles:[".pinnedFolderList[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{cursor:pointer;height:45px}.pinnedFolderList[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]:hover{background:rgba(0,0,0,.04)}.pinnedFolderList[_ngcontent-%COMP%] .mat-list-text{padding-left:0!important}.pinnedFolderList[_ngcontent-%COMP%] .pinnedFolderItem[_ngcontent-%COMP%]{font-weight:700;font-size:12px;width:90%;overflow:hidden;text-overflow:ellipsis}.pinnedFolderList[_ngcontent-%COMP%] .folderAction[_ngcontent-%COMP%]{color:#666}.pinnedIcon[_ngcontent-%COMP%]{cursor:pointer;color:#135f7f;text-align:center}.pinnedIcon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:13px;transition:all .3s}.pinnedIcon[_ngcontent-%COMP%]:hover{color:#8e3e52}.pinnedIcon[_ngcontent-%COMP%]:hover i[_ngcontent-%COMP%]{transition:all .3s;transform:rotate(45deg) translateY(-50%)}.countResources[_ngcontent-%COMP%]{color:#135f7f;font-weight:700;font-size:14px}.empty[_ngcontent-%COMP%]{opacity:.5;font-size:12px;color:#666}button[_ngcontent-%COMP%]:disabled{opacity:1}.selectedFolder[_ngcontent-%COMP%]{border-left:5px solid #135f7f;background:rgba(19,95,127,.14)}.public[_ngcontent-%COMP%]{color:#f99830}.drag[_ngcontent-%COMP%]{color:#f99830!important}.noPinnedFolder[_ngcontent-%COMP%]{text-align:center;font-size:13px;opacity:.5;font-style:italic}.treeLabel[_ngcontent-%COMP%]{white-space:pre;color:#666}"]}),t})();function y7(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-expansion-panel",22),n.Wb(1,"mat-expansion-panel-header"),n.Wb(2,"mat-panel-title"),n.Qc(3),n.Vb(),n.Vb(),n.Wb(4,"mat-slide-toggle",23),n.dc("change",(function(e){n.Dc(t);const i=n.hc().$implicit;return n.hc(2).toggleAdmin(i,e)})),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(3),n.Sc(" ",t.entity_label," "),n.Db(1),n.oc("checked",e.isAdminEnabled(t)),n.Db(1),n.Sc("",n.jc(6,3,"lang.canManageFolder")," ")}}function x7(t,e){if(1&t&&(n.Ub(0),n.Oc(1,y7,7,5,"mat-expansion-panel",21),n.Tb()),2&t){const t=e.$implicit,i=n.hc(2);n.Db(1),n.oc("ngIf",i.checkSelectedFolder(t))}}function C7(t,e){if(1&t&&(n.Wb(0,"div",17),n.Wb(1,"div",18),n.Wb(2,"div",19),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Oc(5,x7,2,1,"ng-container",20),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(3),n.Sc(" ",n.jc(4,2,"lang.parameters")," "),n.Db(2),n.oc("ngForOf",t.entities)}}let O7=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.functions=a,this.data=s,this.folder={id:0,label:"",public:!0,user_id:0,parent_id:null,level:0,sharing:{entities:[]}},this.sharingFolderCLone=[],this.holdShift=!1,this.entities=[]}onKeydownHandler(t){this.holdShift=!0}onKeyupHandler(t){this.holdShift=!1}ngOnInit(){this.getFolder()}getFolder(){this.http.get("../rest/folders/"+this.data.folderId).pipe(Object(mt.a)(t=>this.folder=t.folder),p(()=>this.http.get("../rest/entities")),Object(l.a)(t=>{const e={serialId:"ALL_ENTITIES",keyword:"ALL_ENTITIES",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:this.translate.instant("lang.allEntities"),state:{opened:!1,selected:!1},parent_entity_id:"",id:"ALL_ENTITIES",entity_label:this.translate.instant("lang.allEntities")};return t.entities.unshift(e),this.entities=t.entities,t.entities.forEach(t=>{(this.folder.sharing.entities.map(t=>t.entity_id).indexOf(t.serialId)>-1||this.folder.sharing.entities.map(t=>t.keyword).indexOf(t.serialId)>-1)&&(t.state.selected=!0),t.state.allowed=!0,t.state.disabled=!1}),t}),Object(mt.a)(t=>{this.initEntitiesTree(t.entities)}),p(()=>this.http.get("../rest/folders")),Object(l.a)(t=>{let e=0;return t.folders.forEach(t=>{t.state={opened:!0},null===t.parent_id&&(t.parent_id="#"),t.id===this.folder.parent_id&&(t.state.selected=!0),t.id!==this.folder.id&&e!==t.parent_id&&t.canEdit||(e=t.id,t.state.opened=!1,t.state.disabled=!0),t.parent=t.parent_id,t.text=t.label}),t}),Object(mt.a)(t=>{this.initFoldersTree(t.folders)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1))),Object(Xt.a)(()=>this.sharingFolderCLone=JSON.parse(JSON.stringify(this.folder.sharing.entities)))).subscribe()}initFoldersTree(t){$("#jstreeFolders").jstree({checkbox:{deselect_all:!0,three_state:!1},core:{force_text:!0,themes:{name:"proton",responsive:!0},multiple:!1,data:t},plugins:["checkbox","search"]}),$("#jstreeFolders").on("select_node.jstree",(t,e)=>{this.folder.parent_id=e.node.original.id}).on("deselect_node.jstree",(t,e)=>{this.folder.parent_id=""}).jstree();let e=!1;$("#jstree_searchFolders").keyup((function(){e&&clearTimeout(e),e=setTimeout((function(){const t=$("#jstree_searchFolders").val();$("#jstreeFolders").jstree(!0).search(t)}),250)}))}initEntitiesTree(t){$("#jstree").jstree({checkbox:{three_state:!1},core:{force_text:!0,themes:{name:"proton",responsive:!0},data:t},plugins:["checkbox","search"]}),$("#jstree").on("select_node.jstree",(t,e)=>{this.selectEntity(e.node.original)}).on("deselect_node.jstree",(t,e)=>{this.deselectEntity(e.node.original)}).jstree();let e=!1;$("#jstree_search").keyup((function(){e&&clearTimeout(e),e=setTimeout((function(){const t=$("#jstree_search").val();$("#jstree").jstree(!0).search(t)}),250)}))}selectEntity(t){this.holdShift?($("#jstree").jstree("deselect_all"),this.folder.sharing.entities=[]):this.functions.empty(t.keyword)?this.folder.sharing.entities.push({entity_id:t.serialId,edition:!1}):this.folder.sharing.entities.push({keyword:t.keyword,edition:!1})}deselectEntity(t){let e=this.folder.sharing.entities.map(t=>t.entity_id).indexOf(t.serialId);e>-1?this.folder.sharing.entities.splice(e,1):(e=this.folder.sharing.entities.map(t=>t.keyword).indexOf(t.serialId),e>-1&&this.folder.sharing.entities.splice(e,1))}onSubmit(){this.http.put("../rest/folders/"+this.folder.id,this.folder).pipe(p(()=>JSON.stringify(this.sharingFolderCLone)!==JSON.stringify(this.folder.sharing.entities)?this.http.put("../rest/folders/"+this.folder.id+"/sharing",{public:this.folder.sharing.entities.length>0,sharing:this.folder.sharing}):Object(c.a)(!1)),Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.folderUpdated")),this.dialogRef.close("success")}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}checkSelectedFolder(t){return this.folder.sharing.entities.map(t=>t.entity_id).indexOf(t.serialId)>-1||this.folder.sharing.entities.map(t=>t.keyword).indexOf(t.serialId)>-1}initService(t){1===t.index&&this.initEntitiesTree(this.entities)}toggleAdmin(t,e){let i=this.folder.sharing.entities.map(t=>t.entity_id).indexOf(t.serialId);i>-1?this.folder.sharing.entities[i].edition=e.checked:(i=this.folder.sharing.entities.map(t=>t.keyword).indexOf(t.serialId),i>-1&&(this.folder.sharing.entities[i].edition=e.checked))}isAdminEnabled(t){let e=this.folder.sharing.entities.map(t=>t.entity_id).indexOf(t.serialId);return e>-1?this.folder.sharing.entities[e].edition:(e=this.folder.sharing.entities.map(t=>t.keyword).indexOf(t.serialId),e>-1&&this.folder.sharing.entities[e].edition)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(_t.a),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],hostBindings:function(t,e){1&t&&n.dc("keydown.Shift",(function(t){return e.onKeydownHandler(t)}),!1,n.Bc)("keyup",(function(t){return e.onKeyupHandler(t)}),!1,n.Bc)},decls:35,vars:31,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],[3,"ngSubmit"],["submitForm","ngForm"],[1,"col-md-12"],["matInput","","name","label",3,"placeholder","ngModel","ngModelChange"],[3,"selectedTabChange"],[3,"label"],["appearance","outline"],["matInput","","id","jstree_searchFolders","type","text",3,"placeholder"],["id","jstreeFolders",1,"entitiesList"],["matInput","","id","jstree_search","type","text",3,"placeholder"],["id","jstree",1,"entitiesList"],["class","col-md-6",4,"ngIf"],[1,"divider-modal"],["mat-raised-button","","color","primary","type","submit",3,"click"],["mat-raised-button","","type","button","color","default",3,"click"],[1,"col-md-6"],[1,"formType","jstreeEntities"],[1,"formType-title"],[4,"ngFor","ngForOf"],["class","selectedEntities","opened","",4,"ngIf"],["opened","",1,"selectedEntities"],["color","primary",3,"checked","change"]],template:function(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-dialog-content"),n.Wb(5,"form",2,3),n.dc("ngSubmit",(function(){return e.onSubmit()})),n.Wb(7,"div",4),n.Wb(8,"mat-form-field"),n.Wb(9,"input",5),n.dc("ngModelChange",(function(t){return e.folder.label=t})),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(11,"div",4),n.Wb(12,"mat-tab-group",6),n.dc("selectedTabChange",(function(t){return e.initService(t)})),n.Wb(13,"mat-tab",7),n.ic(14,"translate"),n.Wb(15,"mat-form-field",8),n.Rb(16,"input",9),n.ic(17,"translate"),n.Vb(),n.Rb(18,"div",10),n.Vb(),n.Wb(19,"mat-tab",7),n.ic(20,"translate"),n.Wb(21,"div"),n.Wb(22,"mat-form-field",8),n.Rb(23,"input",11),n.ic(24,"translate"),n.Vb(),n.Rb(25,"div",12),n.Vb(),n.Oc(26,C7,6,4,"div",13),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Rb(27,"span",14),n.Wb(28,"mat-dialog-actions"),n.Wb(29,"button",15),n.dc("click",(function(){return n.Dc(t),n.zc(6).ngSubmit.emit()})),n.Qc(30),n.ic(31,"translate"),n.Vb(),n.Wb(32,"button",16),n.dc("click",(function(){return e.dialogRef.close()})),n.Qc(33),n.ic(34,"translate"),n.Vb(),n.Vb(),n.Vb()}2&t&&(n.Db(2),n.Tc("",n.jc(3,15,"lang.folder")," : ",e.folder.label,""),n.Db(7),n.pc("placeholder",n.jc(10,17,"lang.label")),n.oc("ngModel",e.folder.label),n.Db(4),n.pc("label",n.jc(14,19,"lang.setInParentFolder")),n.Db(3),n.pc("placeholder",n.jc(17,21,"lang.searchFolder")),n.Db(3),n.pc("label",n.jc(20,23,"lang.shareToEntities")),n.Db(2),n.Ib("col-md-12",0===e.folder.sharing.entities.length)("col-md-6",e.folder.sharing.entities.length>0),n.Db(2),n.pc("placeholder",n.jc(24,25,"lang.searchEntities")),n.Db(3),n.oc("ngIf",e.folder.sharing.entities.length>0),n.Db(4),n.Rc(n.jc(31,27,"lang.validate")),n.Db(3),n.Rc(n.jc(34,29,"lang.cancel")))},directives:[q.i,q.f,X.K,X.v,X.w,Y.c,J.b,X.d,X.u,X.x,Te.c,Te.a,P.t,q.c,k.b,P.s,gt.c,gt.g,gt.h,te.a],pipes:[g.d],styles:[".mat-form-field-appearance-outline[_ngcontent-%COMP%]{font-size:11px}.formType[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:10px;border-radius:4px;border:1px solid #ccc;position:relative;padding:10px}.formType-title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;background:#fff;position:absolute;top:-18px;left:10px;padding:0;margin:0;color:#135f7f}.entitiesList[_ngcontent-%COMP%]{overflow:auto}.selectedEntities[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}"]}),t})();const D7=["itemValue"],w7=["autocomplete"],M7=["tree"];function k7(t,e){1&t&&(n.Wb(0,"div",10),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noAvailableFolder")," "))}function S7(t,e){1&t&&(n.Rb(0,"i",31),n.ic(1,"translate")),2&t&&n.pc("title",n.jc(1,1,"lang.sharedFolder"))}function I7(t,e){1&t&&n.Rb(0,"mat-icon",32)}function P7(t,e){if(1&t&&(n.Wb(0,"span",33),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Ib("empty",0===t.countResources),n.Db(1),n.Sc(" ",t.countResources," ")}}function V7(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tree-node",15),n.dc("cdkDropListDropped",(function(i){n.Dc(t);const a=e.$implicit;return n.hc(3).drop(i,a)}))("cdkDropListEntered",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).dragEnter(i)}))("cdkDropListExited",(function(){return e.$implicit.drag=!1})),n.Rb(1,"button",16),n.Wb(2,"a",17),n.dc("mouseenter",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).showAction(i)}))("mouseleave",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).hideAction(i)}))("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).foldersService.goToFolder(i)})),n.Wb(3,"span",18),n.Wb(4,"span",19),n.Oc(5,S7,2,3,"i",20),n.Qc(6),n.Vb(),n.Vb(),n.Wb(7,"button",21),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(3);return i.stopPropagation(),s.showAction(a),s.checkRights(a)})),n.Oc(8,I7,1,0,"mat-icon",22),n.Oc(9,P7,2,3,"span",23),n.Vb(),n.Wb(10,"mat-menu",null,24),n.Wb(12,"button",25),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).togglePinFolder(i)})),n.Wb(13,"mat-icon"),n.Rb(14,"i",26),n.Vb(),n.Wb(15,"span"),n.Qc(16),n.ic(17,"translate"),n.ic(18,"translate"),n.Vb(),n.Vb(),n.Wb(19,"button",27),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).addNewItem(i)})),n.Wb(20,"mat-icon",28),n.Rb(21,"i",7),n.Vb(),n.Wb(22,"span"),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Vb(),n.Wb(25,"button",27),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).deleteNode(i)})),n.Wb(26,"mat-icon",28),n.Rb(27,"i",29),n.Vb(),n.Wb(28,"span"),n.Qc(29),n.ic(30,"translate"),n.Vb(),n.Vb(),n.Wb(31,"button",27),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).openFolderAdmin(i)})),n.Wb(32,"mat-icon",28),n.Rb(33,"i",30),n.Vb(),n.Wb(34,"span"),n.Qc(35),n.ic(36,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.zc(11),a=n.hc(3);n.oc("id","treefolder-list-"+t.id)("@hideShow",void 0),n.Db(2),n.Ib("selectedFolder",a.foldersService.getCurrentFolder().id==t.id),n.Db(2),n.Ib("drag",t.drag),n.oc("title",t.label),n.Db(1),n.oc("ngIf",t.public),n.Db(1),n.Sc(" ",t.label," "),n.Db(1),n.oc("matMenuTriggerFor",i)("disabled",!t.showAction),n.Db(1),n.oc("ngIf",t.showAction),n.Db(1),n.oc("ngIf",!t.showAction),n.Db(1),n.Fb("folderListMenu"),n.Db(3),n.Ib("pinnedActionIcon",!t.pinned)("revertPinnedActionIcon",t.pinned),n.Db(3),n.Rc(t.pinned?n.jc(17,26,"lang.unpinFolder"):n.jc(18,28,"lang.pinFolder")),n.Db(3),n.oc("disabled",a.createItemNode||!t.canAdd||t.level>6),n.Db(4),n.Rc(n.jc(24,30,"lang.addSubFolder")),n.Db(2),n.oc("disabled",!t.canDelete),n.Db(4),n.Sc(" ",n.jc(30,32,"lang.delete")," "),n.Db(2),n.oc("disabled",!t.edition),n.Db(4),n.Sc(" ",n.jc(36,34,"lang.properties")," ")}}function R7(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tree-node",34),n.Wb(1,"form"),n.Wb(2,"mat-form-field",35),n.Rb(3,"input",36,37),n.ic(5,"translate"),n.Wb(6,"button",38),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.zc(4);return n.hc(3).saveNode(i,a.value)})),n.Rb(7,"mat-icon",39),n.ic(8,"translate"),n.Vb(),n.Wb(9,"button",40),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).removeTemporaryNode(i)})),n.Rb(10,"mat-icon",41),n.ic(11,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(4);n.Db(3),n.qc("placeholder","",n.jc(5,4,"lang.addFolder"),"..."),n.Db(3),n.oc("disabled",""===t.value),n.Db(1),n.oc("title",n.jc(8,6,"lang.add")),n.Db(3),n.oc("title",n.jc(11,8,"lang.delete"))}}function j7(t,e){1&t&&(n.Rb(0,"i",31),n.ic(1,"translate")),2&t&&n.pc("title",n.jc(1,1,"lang.sharedFolder"))}function A7(t,e){1&t&&n.Rb(0,"mat-icon",32)}function W7(t,e){if(1&t&&(n.Wb(0,"span",33),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Ib("empty",0===t.countResources),n.Db(1),n.Sc(" ",t.countResources," ")}}function T7(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tree-node",42),n.dc("cdkDropListDropped",(function(i){n.Dc(t);const a=e.$implicit;return n.hc(3).drop(i,a)}))("cdkDropListEntered",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).dragEnter(i)}))("cdkDropListExited",(function(){return e.$implicit.drag=!1})),n.Wb(1,"button",43),n.Rb(2,"mat-icon"),n.Vb(),n.Wb(3,"a",44),n.dc("mouseleave",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).hideAction(i)}))("mouseenter",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).showAction(i)}))("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).foldersService.goToFolder(i)})),n.Wb(4,"span",18),n.Wb(5,"span",19),n.Oc(6,j7,2,3,"i",20),n.Qc(7),n.Vb(),n.Vb(),n.Wb(8,"button",21),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(3);return i.stopPropagation(),s.checkRights(a)})),n.Oc(9,A7,1,0,"mat-icon",22),n.Oc(10,W7,2,3,"span",23),n.Vb(),n.Wb(11,"mat-menu",null,24),n.Wb(13,"button",25),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).togglePinFolder(i)})),n.Wb(14,"mat-icon"),n.Rb(15,"i",26),n.Vb(),n.Wb(16,"span"),n.Qc(17),n.ic(18,"translate"),n.ic(19,"translate"),n.Vb(),n.Vb(),n.Wb(20,"button",27),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).addNewItem(i)})),n.Wb(21,"mat-icon",28),n.Rb(22,"i",7),n.Vb(),n.Wb(23,"span"),n.Qc(24),n.ic(25,"translate"),n.Vb(),n.Vb(),n.Wb(26,"button",27),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).deleteNode(i)})),n.Wb(27,"mat-icon",28),n.Rb(28,"i",29),n.Vb(),n.Wb(29,"span"),n.Qc(30),n.ic(31,"translate"),n.Vb(),n.Vb(),n.Wb(32,"button",27),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).openFolderAdmin(i)})),n.Wb(33,"mat-icon",28),n.Rb(34,"i",30),n.Vb(),n.Wb(35,"span"),n.Qc(36),n.ic(37,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.zc(12),a=n.hc(3);n.oc("id","treefolder-list-"+t.id)("@hideShow",void 0),n.Db(1),n.Eb("aria-label","toggle "+t.name),n.Db(1),n.Gb("mat-icon-rtl-mirror fa ",a.treeControl.isExpanded(t)?"fa-chevron-down":"fa-chevron-right",""),n.Db(1),n.Ib("selectedFolder",a.foldersService.getCurrentFolder().id==t.id),n.Db(2),n.Ib("drag",t.drag),n.oc("title",t.label),n.Db(1),n.oc("ngIf",t.public),n.Db(1),n.Sc(" ",t.label," "),n.Db(1),n.oc("matMenuTriggerFor",i)("disabled",!t.showAction),n.Db(1),n.oc("ngIf",t.showAction),n.Db(1),n.oc("ngIf",!t.showAction),n.Db(1),n.Fb("folderListMenu"),n.Db(3),n.Ib("pinnedActionIcon",!t.pinned)("revertPinnedActionIcon",t.pinned),n.Db(3),n.Rc(t.pinned?n.jc(18,30,"lang.unpinFolder"):n.jc(19,32,"lang.pinFolder")),n.Db(3),n.oc("disabled",a.createItemNode||!t.canAdd||t.level>6),n.Db(4),n.Rc(n.jc(25,34,"lang.addSubFolder")),n.Db(2),n.oc("disabled",!t.canDelete),n.Db(4),n.Sc(" ",n.jc(31,36,"lang.delete")," "),n.Db(2),n.oc("disabled",!t.edition),n.Db(4),n.Sc(" ",n.jc(37,38,"lang.properties")," ")}}function E7(t,e){if(1&t&&(n.Wb(0,"mat-nav-list"),n.Wb(1,"mat-tree",11),n.Oc(2,V7,37,36,"mat-tree-node",12),n.Oc(3,R7,12,10,"mat-tree-node",13),n.Oc(4,T7,38,40,"mat-tree-node",14),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("dataSource",t.dataSource)("treeControl",t.treeControl),n.Db(2),n.oc("matTreeNodeDefWhen",t.hasNoContent),n.Db(1),n.oc("matTreeNodeDefWhen",t.hasChild)}}const F7=function(){return["/rest/autocomplete/folders"]};function L7(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"div",2),n.Wb(2,"div",3),n.Wb(3,"plugin-autocomplete",4,5),n.dc("triggerEvent",(function(e){return n.Dc(t),n.hc().goTo(e)})),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Wb(6,"div"),n.Wb(7,"button",6),n.dc("click",(function(){return n.Dc(t),n.hc().openCreateFolderModal()})),n.ic(8,"translate"),n.Rb(9,"mat-icon",7),n.Vb(),n.Vb(),n.Vb(),n.Oc(10,k7,3,3,"div",8),n.Oc(11,E7,5,4,"mat-nav-list",9),n.Tb()}if(2&t){const t=n.hc();n.Db(3),n.oc("size","small")("labelPlaceholder",n.jc(5,7,"lang.searchFolder"))("routeDatas",n.uc(11,F7))("targetSearchKey","idToDisplay"),n.Db(4),n.pc("title",n.jc(8,9,"lang.addRootFolder")),n.Db(3),n.oc("ngIf",0===t.dataSource.data.length),n.Db(1),n.oc("ngIf",t.dataSource.data.length>0)}}function Q7(t,e){1&t&&(n.Wb(0,"div",45),n.Rb(1,"mat-spinner"),n.Vb())}class N7{}let z7=(()=>{class t{constructor(t,e,i,a,s,o,r,c,l){this.translate=t,this.http=e,this.notify=i,this.dialog=a,this.router=s,this.renderer=o,this.headerService=r,this.foldersService=c,this.functions=l,this.loading=!0,this.searchTerm=new X.i,this.TREE_DATA=[],this.createRootNode=!1,this.createItemNode=!1,this.dataChange=new my.a([]),this.refreshDocList=new n.o,this.refreshFolderList=new n.o,this.flatNodeMap=new Map,this.nestedNodeMap=new Map,this.transformer=(t,e)=>{const i=this.nestedNodeMap.get(t),n=i&&i.label===t.label?i:new N7;return n.label=t.label,n.countResources=t.countResources,n.public=t.public,n.pinned=t.pinned,n.parent_id=t.parent_id,n.id=t.id,n.level=e,n.expandable=!!t.children,this.flatNodeMap.set(n,t),this.nestedNodeMap.set(t,n),n},this.treeControl=new fy.j(t=>t.level,t=>t.expandable),this.treeFlattener=new vy.d(this.transformer,t=>t.level,t=>t.expandable,t=>t.children),this.dataSource=new vy.c(this.treeControl,this.treeFlattener),this.hasChild=(t,e)=>e.expandable,this.hasNoContent=(t,e)=>""===e.label,this.subscription=this.foldersService.catchEvent().subscribe(t=>{if("initTree"===t.type){const t=this.flatToNestedObject(this.foldersService.getList());t.length>0&&(this.initTree(t),this.openTree(this.foldersService.getCurrentFolder().id)),this.loading=!1}else"refreshFolderCount"===t.type?this.treeControl.dataNodes.filter(e=>e.id===t.content.id)[0].countResources=t.content.countResources:"refreshFolderPinned"===t.type?this.treeControl.dataNodes.filter(e=>e.id===t.content.id)[0].pinned=t.content.pinned:void 0!==this.treeControl.dataNodes&&this.openTree(this.foldersService.getCurrentFolder().id)})}get data(){return this.dataChange.value}ngOnInit(){this.getFolders()}getFolders(){this.loading=!0,this.foldersService.getFolders()}initTree(t){this.dataChange.next(t),this.dataChange.subscribe(t=>{this.dataSource.data=t})}openTree(t){let e=this.treeControl.dataNodes.map(t=>t.id).indexOf(parseInt(t));for(;-1!==e;)e=this.treeControl.dataNodes.map(t=>t.id).indexOf(this.treeControl.dataNodes[e].parent_id),-1!==e&&this.treeControl.expand(this.treeControl.dataNodes[e])}showAction(t){this.treeControl.dataNodes.forEach(t=>{t.showAction=!1}),t.showAction=!0}hideAction(t){t.showAction=!1}flatToNestedObject(t){return t.reduce((t,e,i,n)=>(null===e.parent_id?(t.left.length&&this.checkLeftOvers(t.left,e),delete e.parent_id,e.root=!0,t.nested.push(e)):this.findParent(t.nested,e)?this.checkLeftOvers(t.left,e):t.left.push(e),i<n.length-1?t:t.nested),{nested:[],left:[]})}checkLeftOvers(t,e){for(let i=0;i<t.length;i++)if(t[i].parent_id===e.id){e.children?e.children.push(t[i]):e.children=[t[i]],e.count=e.children.length;const n=t.splice(i,1);this.checkLeftOvers(t,n[0])}}findParent(t,e){let i=!1;for(let n=0;n<t.length;n++){if(t[n].id===e.parent_id)return i=!0,t[n].children?t[n].children.push(e):t[n].children=[e],t[n].count=t[n].children.length,!0;t[n].children&&(i=this.findParent(t[n].children,e))}return i}addNewItem(t){this.createItemNode=!0;const e=this.flatNodeMap.get(t);void 0===e.children&&(e.children=[]),e.children.push({label:"",parent_id:e.id,public:e.public}),this.dataChange.next(this.data),this.treeControl.expand(t),this.renderer.selectRootElement("#itemValue").focus()}saveNode(t,e){this.http.post("../rest/folders",{label:e,parent_id:t.parent_id}).pipe(Object(mt.a)(i=>{const n=this.flatNodeMap.get(t);n.label=e,n.id=i.folder,n.countResources=0,this.dataChange.next(this.data),this.treeControl.collapseAll(),this.openTree(n.id),this.createItemNode=!1,this.foldersService.getPinnedFolders()}),Object(mt.a)(()=>this.notify.success(this.translate.instant("lang.folderAdded"))),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}removeTemporaryNode(t){const e=this.getParentNode(t),i=e.children.map(t=>t.id).indexOf(t.id);-1!==i&&e.children.splice(i,1),this.flatNodeMap.delete(t),this.dataChange.next(this.data),this.createItemNode=!1}openCreateFolderModal(){this.dialogRef=this.dialog.open(Vw,{panelClass:"maarch-modal",data:{folderName:this.autocomplete.getValue()}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(()=>{this.autocomplete.resetValue(),this.getFolders(),this.foldersService.getPinnedFolders()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}deleteNode(t){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.confirmAction")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete("../rest/folders/"+t.id)),Object(mt.a)(()=>{const e=this.getParentNode(t);if(null!==e){const i=e.children.map(t=>t.id).indexOf(t.id);-1!==i&&e.children.splice(i,1)}else{const e=this.data.map(t=>t.id).indexOf(t.id);-1!==e&&this.data.splice(e,1)}this.flatNodeMap.delete(t),this.dataChange.next(this.data)}),Object(mt.a)(()=>{this.foldersService.getPinnedFolders(),this.notify.success(this.translate.instant("lang.folderDeleted"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}getParentNode(t){const e=t.level;if(e<1)return null;for(let i=this.treeControl.dataNodes.indexOf(t)-1;i>=0;i--){const t=this.treeControl.dataNodes[i];if(t.level<e)return this.flatNodeMap.get(t)}return null}drop(t,e){this.foldersService.classifyDocument(t,e)}dragEnter(t){t.drag=!0}openFolderAdmin(t){this.dialogRef=this.dialog.open(O7,{panelClass:"maarch-modal",autoFocus:!1,data:{folderId:t.id}}),this.dialogRef.afterClosed().pipe(Object(mt.a)(e=>{void 0!==e&&(this.getFolders(),this.foldersService.getPinnedFolders(),this.foldersService.setEvent({type:"refreshFolderInformations",content:t}))})).subscribe()}checkRights(t){let e=[],i=0;this.http.get("../rest/folders/"+t.id).pipe(Object(mt.a)(n=>{e=this.headerService.user.entities.map(t=>t.id),i=this.headerService.user.id;let a=!1,s=!1;const o=n.folder.sharing.entities.filter(t=>e.indexOf(t)>-1);n.folder.sharing.entities.filter(t=>o.indexOf(t.id)).forEach(t=>{!0===t.edition&&(a=!0),!0===t.canDelete&&(s=!0)}),t.edition=!(!a&&n.folder.user_id!==i),t.canAdd=t.edition,t.canDelete=s||n.folder.user_id===i})).subscribe()}goTo(t){this.selectedId=t.id,this.getFolders(),this.router.navigate(["/folders/"+t.id])}togglePinFolder(t){t.pinned?this.foldersService.unpinFolder(t):this.foldersService.pinFolder(t)}ngOnDestroy(){this.subscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(o.c),n.Qb(n.I),n.Qb(y.a),n.Qb(tw.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["folder-tree"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(D7,!0),n.Xc(w7,!0),n.Kc(M7,!0)),2&t&&(n.yc(i=n.ec())&&(e.itemValue=i.first),n.yc(i=n.ec())&&(e.autocomplete=i.first),n.yc(i=n.ec())&&(e.tree=i.first))},inputs:{selectedId:"selectedId"},outputs:{refreshDocList:"refreshDocList",refreshFolderList:"refreshFolderList"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["elseTemplate",""],[1,"folderTools"],[1,"filter"],["appearance","outline",3,"size","labelPlaceholder","routeDatas","targetSearchKey","triggerEvent"],["autocomplete",""],["mat-icon-button","","color","primary",3,"title","click"],[1,"fas","fa-folder-plus"],["class","noFolder",4,"ngIf"],[4,"ngIf"],[1,"noFolder"],[3,"dataSource","treeControl"],["cdkDropList","","cdkDropListConnectedTo","['document-list','folder-list']","matTreeNodePadding","","matTreeNodePaddingIndent","20px",3,"id","cdkDropListDropped","cdkDropListEntered","cdkDropListExited",4,"matTreeNodeDef"],["matTreeNodePadding","","matTreeNodePaddingIndent","0px",4,"matTreeNodeDef","matTreeNodeDefWhen"],["cdkDropList","","cdkDropListConnectedTo","list-1","matTreeNodePadding","","matTreeNodePaddingIndent","20px",3,"id","cdkDropListDropped","cdkDropListEntered","cdkDropListExited",4,"matTreeNodeDef","matTreeNodeDefWhen"],["cdkDropList","","cdkDropListConnectedTo","['document-list','folder-list']","matTreeNodePadding","","matTreeNodePaddingIndent","20px",3,"id","cdkDropListDropped","cdkDropListEntered","cdkDropListExited"],["mat-icon-button","","disabled","",1,"expandButton"],["mat-list-item","","disableRipple","",1,"folderTreeItem",3,"mouseenter","mouseleave","click"],[2,"width","90%","overflow","hidden","text-overflow","ellipsis"],[1,"treeLabel",3,"title"],["class","fa fa-users private",3,"title",4,"ngIf"],["mat-icon-button","",2,"position","absolute","right","0px",3,"matMenuTriggerFor","disabled","click"],["class","folderAction fa fa-ellipsis-v",4,"ngIf"],["class","countResources",3,"empty",4,"ngIf"],["menu","matMenu"],["mat-menu-item","",3,"click"],[1,"fas","fa-thumbtack"],["mat-menu-item","",3,"disabled","click"],[2,"width","auto","height","auto"],[1,"far","fa-trash-alt"],[1,"fas","fa-sliders-h"],[1,"fa","fa-users","private",3,"title"],[1,"folderAction","fa","fa-ellipsis-v"],[1,"countResources"],["matTreeNodePadding","","matTreeNodePaddingIndent","0px"],["floatLabel","never",2,"width","100%","padding-left","10px","padding-right","10px"],["matInput","","id","itemValue",3,"placeholder"],["itemValue",""],["type","submit","matSuffix","","mat-icon-button","",3,"disabled","click"],["color","accent",1,"fa","fa-check",3,"title"],["type","button","matSuffix","","mat-icon-button","",3,"click"],[1,"fa","fa-times",2,"color","#8e3e52",3,"title"],["cdkDropList","","cdkDropListConnectedTo","list-1","matTreeNodePadding","","matTreeNodePaddingIndent","20px",3,"id","cdkDropListDropped","cdkDropListEntered","cdkDropListExited"],["mat-icon-button","","matTreeNodeToggle","",1,"expandButton"],["mat-list-item","","disableRipple","",1,"folderTreeItem",3,"mouseleave","mouseenter","click"],[1,"loading"]],template:function(t,e){if(1&t&&(n.Oc(0,L7,12,12,"ng-container",0),n.Oc(1,Q7,2,0,"ng-template",null,1,n.Pc)),2&t){const t=n.zc(2);n.oc("ngIf",!e.loading)("ngIfElse",t)}},directives:[P.t,ii,k.b,S.a,R.h,vy.b,vy.h,vy.g,lo.e,vy.j,R.d,ne.d,ne.e,ne.b,X.K,X.v,X.w,Y.c,J.b,Y.j,vy.k,V.c],pipes:[g.d],styles:[".selectedFolder[_ngcontent-%COMP%]{border-left:5px solid #135f7f;background:rgba(19,95,127,.14)}.mat-icon-rtl-mirror[_ngcontent-%COMP%]{opacity:.5}.folderAction[_ngcontent-%COMP%]{color:#666}.mat-form-field-appearance-outline[_ngcontent-%COMP%]{font-size:11px} .mat-form-field-appearance-outline .mat-form-field-outline-thick{color:#135f7f}.example-tree-invisible[_ngcontent-%COMP%]{display:none}.example-tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%], .example-tree[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0;list-style-type:none}.example-tree-node[_ngcontent-%COMP%]{display:block}.example-tree-node[_ngcontent-%COMP%] .example-tree-node[_ngcontent-%COMP%]{padding-left:40px}.expandButton[_ngcontent-%COMP%]{width:20px;height:20px;line-height:20px}.mat-list-item[_ngcontent-%COMP%]{color:#666;font-size:12px;font-weight:700;height:40px;width:90%}.mat-tree-node[_ngcontent-%COMP%]{min-height:0;height:40px}.mat-tree-node[_ngcontent-%COMP%] .mat-list-item-content{padding-left:0}form[_ngcontent-%COMP%]{display:flex;width:100%;align-items:center}.treeLabel[_ngcontent-%COMP%]{white-space:pre;color:#666}.drag[_ngcontent-%COMP%]{color:#f99830!important}.more[_ngcontent-%COMP%]{width:100%;opacity:.6}.more[_ngcontent-%COMP%] .mat-list-item-content{justify-content:center}.rootFolder[_ngcontent-%COMP%]{width:100%}.private[_ngcontent-%COMP%]{margin-left:5px;color:#f99830}button[_ngcontent-%COMP%]:disabled{opacity:1}.countResources[_ngcontent-%COMP%]{font-weight:700;color:#135f7f}.empty[_ngcontent-%COMP%]{opacity:.5;font-size:12px;color:#666}.folderTools[_ngcontent-%COMP%]{padding-right:15px;display:flex;justify-content:center;align-items:baseline}.folderTools[_ngcontent-%COMP%] .filter[_ngcontent-%COMP%]{flex:1}.noFolder[_ngcontent-%COMP%]{font-size:12px;color:#666;text-align:center;font-style:italic}.noFolder[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer} .folderListMenu .mat-menu-content{padding-top:0;padding-bottom:0} .folderListMenu .mat-menu-content .mat-menu-item .pinnedActionIcon{color:#8e3e52;height:auto} .folderListMenu .mat-menu-content .mat-menu-item .pinnedActionIcon i{font-size:13px;transition:all .3s;transform:rotate(15deg) translateY(-50%)} .folderListMenu .mat-menu-content .mat-menu-item .revertPinnedActionIcon{color:#135f7f;height:auto} .folderListMenu .mat-menu-content .mat-menu-item .revertPinnedActionIcon i{font-size:13px;transition:all .3s;transform:rotate(0deg) translate(0)} .folderListMenu .mat-menu-content .mat-menu-item:hover .pinnedActionIcon{color:#135f7f} .folderListMenu .mat-menu-content .mat-menu-item:hover .pinnedActionIcon i{transition:all .3s;transform:rotate(0deg) translate(0)} .folderListMenu .mat-menu-content .mat-menu-item:hover .revertPinnedActionIcon{color:#8e3e52} .folderListMenu .mat-menu-content .mat-menu-item:hover .revertPinnedActionIcon i{transition:all .3s;transform:rotate(15deg) translateY(-50%)}.loading[_ngcontent-%COMP%]{display:flex;justify-content:center}"],data:{animation:[Object(dc.n)("hideShow",[Object(dc.m)(":enter",[Object(dc.l)({height:"0px"}),Object(dc.e)("200ms",Object(dc.l)({height:"30px"}))]),Object(dc.m)(":leave",[Object(dc.l)({height:"30px"}),Object(dc.e)("200ms",Object(dc.l)({height:"0px"}))])])]}}),t})();const B7=["folderTree"];function U7(t,e){1&t&&(n.Wb(0,"mat-expansion-panel",4),n.Wb(1,"mat-expansion-panel-header"),n.Wb(2,"mat-panel-title"),n.Rb(3,"i",5),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Rb(6,"folder-pinned",6),n.Vb()),2&t&&(n.Db(4),n.Sc("\xa0",n.jc(5,2,"lang.myPinnedFolder")," "),n.Db(2),n.oc("noInit",!0))}function $7(t,e){if(1&t){const t=n.Xb();n.Wb(0,"folder-tree",7,8),n.dc("refreshDocList",(function(){return n.Dc(t),n.hc().refreshDocList()})),n.Vb()}}let H7=(()=>{class t{constructor(t,e,i){this.translate=t,this.foldersService=e,this.actionService=i,this.refreshEvent=new n.o,this.subscription=this.actionService.catchAction().subscribe(t=>{this.refreshFoldersTree()})}ngOnInit(){this.foldersService.getPinnedFolders()}ngOnDestroy(){this.subscription.unsubscribe()}initTree(){this.folderTree.openTree(this.selectedId)}refreshDocList(){this.refreshEvent.emit()}refreshFoldersTree(){void 0!==this.folderTree&&this.folderTree.getFolders()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(tw.a),n.Qb(bC))},t.\u0275cmp=n.Kb({type:t,selectors:[["panel-folder"]],viewQuery:function(t,e){var i;1&t&&n.Xc(B7,!0),2&t&&n.yc(i=n.ec())&&(e.folderTree=i.first)},inputs:{selectedId:"selectedId"},outputs:{refreshEvent:"refreshEvent"},decls:9,vars:5,consts:[["class","folderList","expanded","",4,"ngIf"],[1,"folderList",3,"expanded"],[1,"fa","fa-folder","panelIconMenu"],["matExpansionPanelContent",""],["expanded","",1,"folderList"],[1,"fa","fa-thumbtack","panelIconMenu"],[3,"noInit"],[3,"refreshDocList"],["folderTree",""]],template:function(t,e){1&t&&(n.Oc(0,U7,7,4,"mat-expansion-panel",0),n.Rb(1,"mat-divider"),n.Wb(2,"mat-expansion-panel",1),n.Wb(3,"mat-expansion-panel-header"),n.Wb(4,"mat-panel-title"),n.Rb(5,"i",2),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Vb(),n.Oc(8,$7,2,0,"ng-template",3),n.Vb()),2&t&&(n.oc("ngIf",e.foldersService.getPinnedList().length>0),n.Db(2),n.oc("expanded",!1),n.Db(4),n.Sc("\xa0",n.jc(7,3,"lang.folders")," "))},directives:[P.t,T.a,gt.c,gt.g,gt.h,gt.e,_7,z7],pipes:[g.d],styles:[".folderList[_ngcontent-%COMP%]{box-shadow:none}.folderList[_ngcontent-%COMP%] .mat-expansion-panel-body{padding:0}.folderList[_ngcontent-%COMP%] .mat-expansion-panel-header-title[_ngcontent-%COMP%]{color:#135f7f;display:flex;align-items:center;font-size:14px;font-weight:500}.folderList[_ngcontent-%COMP%] .mat-expansion-panel-body[_ngcontent-%COMP%]{padding:0}.folderList[_ngcontent-%COMP%] .mat-line[_ngcontent-%COMP%]{font-size:12px;font-weight:700}.panelIconMenu[_ngcontent-%COMP%]{font-size:22px}.showFolderTree[_ngcontent-%COMP%]{font-size:13px;opacity:.8;font-weight:700;color:#666;width:100%}"]}),t})();function G7(t,e){if(1&t&&(n.Qc(0),n.Wb(1,"p",13),n.Qc(2,"\xa0"),n.Vb()),2&t){const t=n.hc(2).$implicit,e=n.hc();n.Sc(" ",t.key,"\xa0"),n.Db(1),n.oc("matBadge",e.missingLang[t.key].length)}}function X7(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"mat-form-field",14),n.Wb(2,"mat-label"),n.Qc(3),n.Vb(),n.Wb(4,"input",15,16),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.value=i})),n.Vb(),n.Wb(6,"button",17),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.zc(5),s=n.hc(3);return a.select(),s.openTranslation(i.value)})),n.Rb(7,"mat-icon",18),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=e.$implicit;n.Db(3),n.Rc(t.id),n.Db(1),n.oc("ngModel",t.value)}}function q7(t,e){if(1&t&&(n.Wb(0,"mat-tab",10),n.Oc(1,G7,3,2,"ng-template",11),n.Wb(2,"div",12),n.Oc(3,X7,8,2,"ng-container",4),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc();n.oc("label",t.key),n.Db(3),n.oc("ngForOf",e.missingLang[t.key])}}function K7(t,e){if(1&t&&(n.Ub(0),n.Oc(1,q7,4,2,"mat-tab",9),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf","fr"!==t.key)}}let Y7=(()=>{class t{constructor(t,e,i,n){this.data=t,this.dialogRef=e,this.http=i,this.notify=n,this.missingLang=[],this.currentLang="en"}ngOnInit(){this.getLangs()}getLangs(){this.http.get("../rest/dev/lang").pipe(Object(mt.a)(t=>{this.allLang=t.langs,Object.keys(this.allLang).forEach(t=>{this.missingLang[t]=Object.keys(this.allLang.fr).filter(e=>-1===Object.keys(this.allLang[t]).indexOf(e)).map(t=>({id:t,value:this.allLang.fr[t]+"__TO_TRANSLATE"}))})}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}openTranslation(t){window.open("https://translate.google.fr/?hl=fr#view=home&op=translate&sl=fr&tl="+this.currentLang+"&text="+t.replace("__TO_TRANSLATE",""),"_blank")}setActiveLang(t){this.currentLang=t.tab.textLabel}generateMissingLang(t=!1){let e={},i=this.allLang[this.currentLang];const n=/__TO_TRANSLATE$/g;this.missingLang[this.currentLang].forEach(i=>{null===i.value.match(n)&&t?e[i.id]=i.value:t||(e[i.id]=i.value)}),i=Object.assign(Object.assign({},i),e),this.http.put("../rest/dev/lang",{langId:this.currentLang,jsonContent:i}).pipe(Object(mt.a)(t=>{Object.keys(e).forEach(t=>{delete this.allLang[this.currentLang][t],this.missingLang[this.currentLang]=this.missingLang[this.currentLang].filter(e=>e.id!==t),this.data.countMissingLang--}),this.dialogRef.close(this.data.countMissingLang)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),console.log(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(q.a),n.Qb(q.h),n.Qb(v.b),n.Qb(D.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:15,vars:3,consts:[[1,"mat-dialog-content-container","lang-container"],["mat-dialog-title",""],["mat-dialog-content",""],[3,"selectedTabChange"],[4,"ngFor","ngForOf"],[1,"divider-modal"],["mat-dialog-actions",""],["mat-raised-button","","color","primary",1,"actions",3,"click"],["mat-raised-button","","color","","mat-dialog-close","","cdkFocusInitial","",1,"actions"],[3,"label",4,"ngIf"],[3,"label"],["mat-tab-label",""],[2,"display","grid"],[3,"matBadge"],["appearance","fill"],["matInput","",3,"ngModel","ngModelChange"],["toto",""],["mat-button","","color","primary","matSuffix","","mat-icon-button","",3,"click"],[1,"fas","fa-language"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2,"Lang checking"),n.Vb(),n.Wb(3,"div",2),n.Wb(4,"mat-tab-group",3),n.dc("selectedTabChange",(function(t){return e.setActiveLang(t)})),n.Oc(5,K7,2,1,"ng-container",4),n.ic(6,"keyvalue"),n.Vb(),n.Vb(),n.Rb(7,"span",5),n.Wb(8,"div",6),n.Wb(9,"button",7),n.dc("click",(function(){return e.generateMissingLang(!1)})),n.Qc(10,"Generate lang variables"),n.Vb(),n.Wb(11,"button",7),n.dc("click",(function(){return e.generateMissingLang(!0)})),n.Qc(12,"Generate lang variables (IGNORE __TO_TRANSLATE)"),n.Vb(),n.Wb(13,"button",8),n.Qc(14,"Close"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.oc("ngForOf",n.jc(6,1,e.allLang)))},directives:[q.i,q.f,Te.c,P.s,q.c,k.b,q.d,P.t,Te.a,Te.d,wt.a,Y.c,Y.g,J.b,X.d,X.u,X.x,Y.j,S.a],pipes:[P.l],styles:[".mat-dialog-content[_ngcontent-%COMP%]{padding-top:0}.lang-container[_ngcontent-%COMP%] .mat-tab-header{position:-webkit-sticky;position:sticky;top:0;z-index:2}.lang-container[_ngcontent-%COMP%] .mat-tab-label-container{background:#fff}"]}),t})(),J7=(()=>{class t{constructor(t,e,i,n){this.notify=t,this.dialog=e,this.http=i,this.functionsService=n,this.countMissingLang=0}ngOnInit(){this.getLangs()}openLangTool(){this.dialog.open(Y7,{panelClass:"maarch-modal",height:"99%",width:"80%",data:{countMissingLang:this.countMissingLang}}).afterClosed().pipe(Object(d.a)(t=>!this.functionsService.empty(t)),Object(mt.a)(t=>{this.countMissingLang=t}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}getLangs(){this.http.get("../rest/dev/lang").pipe(Object(mt.a)(t=>{this.allLang=t.langs,Object.keys(this.allLang).forEach(t=>{this.countMissingLang+=Object.keys(this.allLang.fr).filter(e=>-1===Object.keys(this.allLang[t]).indexOf(e)).length})}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(D.a),n.Qb(q.b),n.Qb(v.b),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-dev-tool"]],decls:11,vars:5,consts:[["mat-fab","","cdkDrag","","color","warn",2,"position","fixed","right","50px","top","50px","z-index","1",3,"matBadge","matMenuTriggerFor"],[1,"fas","fa-toolbox",2,"height","auto","font-size","23px"],["menu","matMenu"],["mat-menu-item","",3,"click"],["color","primary",1,"fas","fa-language",2,"height","auto"],[3,"matBadge"]],template:function(t,e){if(1&t&&(n.Wb(0,"button",0),n.Rb(1,"mat-icon",1),n.Vb(),n.Wb(2,"mat-menu",null,2),n.Wb(4,"button",3),n.dc("click",(function(){return e.openLangTool()})),n.Rb(5,"mat-icon",4),n.Wb(6,"span"),n.Qc(7,"Missing lang"),n.Vb(),n.Qc(8,"\xa0\xa0"),n.Wb(9,"span",5),n.Qc(10,"\xa0"),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.zc(3);n.oc("matBadge",e.countMissingLang)("matMenuTriggerFor",t),n.Db(2),n.Fb("devToolListMenu"),n.Db(7),n.oc("matBadge",e.countMissingLang)}},directives:[k.b,lo.a,wt.a,ne.d,S.a,ne.e,ne.b],styles:[".devToolListMenu{min-height:auto!important;width:250px}"]}),t})();const Z7=["snavLeft"];function t8(t,e){1&t&&n.Rb(0,"header-panel")}function e8(t,e){1&t&&n.Rb(0,"menu-shortcut")}function i8(t,e){1&t&&n.Rb(0,"menu-nav")}function n8(t,e){1&t&&(n.Ub(0),n.Rb(1,"basket-home",null,6),n.Rb(3,"mat-divider"),n.Rb(4,"panel-folder",null,7),n.Tb())}function a8(t,e){1&t&&n.Rb(0,"div",8)}const s8=function(t){return{width:t}};function o8(t,e){if(1&t&&(n.Wb(0,"mat-sidenav-container",2),n.Wb(1,"mat-sidenav",3,4),n.Oc(3,t8,1,0,"header-panel",1),n.Oc(4,e8,1,0,"menu-shortcut",1),n.Oc(5,i8,1,0,"menu-nav",1),n.Oc(6,n8,6,0,"ng-container",1),n.Oc(7,a8,1,0,"div",5),n.Vb(),n.Wb(8,"mat-sidenav-content"),n.Rb(9,"router-outlet"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Ib("sideBarForm",t.headerService.sideBarForm&&!t.appService.getViewMode())("sideBarFormMobile",t.appService.getViewMode()&&t.headerService.sideBarForm),n.oc("mode",t.appService.getViewMode()?"over":"side")("fixedInViewport",t.appService.getViewMode())("opened",!t.appService.getViewMode()&&!t.headerService.hideSideBar)("ngStyle",n.vc(13,s8,t.appService.getViewMode()?"80%":"350px")),n.Db(2),n.oc("ngIf",t.headerService.showhHeaderPanel&&!t.headerService.hideSideBar),n.Db(1),n.oc("ngIf",t.headerService.showMenuShortcut&&!t.headerService.hideSideBar),n.Db(1),n.oc("ngIf",t.headerService.showMenuShortcut&&!t.headerService.hideSideBar),n.Db(1),n.oc("ngIf",!t.headerService.sideBarAdmin&&!t.headerService.hideSideBar),n.Db(1),n.oc("ngIf",!t.headerService.hideSideBar)}}function r8(t,e){1&t&&n.Rb(0,"app-dev-tool")}const c8={showDelay:500,hideDelay:0,touchendHideDelay:0};let l8=(()=>{class t{constructor(t,e,i,n,s,o,r,c,l){this.translate=t,this.http=e,this.appService=s,this.headerService=o,this.authService=r,this.adapter=c,this.dialog=l,this.debugMode=!1,this.loading=!0,t.setDefaultLang("fr"),i.addSvgIcon("maarchLogo",n.bypassSecurityTrustResourceUrl("../rest/images?image=onlyLogo")),i.addSvgIcon("maarchLogoFull",n.bypassSecurityTrustResourceUrl("../rest/images?image=logo")),i.addSvgIcon("maarchLogoWhite",n.bypassSecurityTrustResourceUrl("assets/logo_only_white.svg")),i.addSvgIcon("maarchLogoWhiteFull",n.bypassSecurityTrustResourceUrl("assets/logo_white.svg")),i.addSvgIcon("maarchBox",n.bypassSecurityTrustResourceUrl("assets/maarch_box.svg")),i.addSvgIcon("alfresco",n.bypassSecurityTrustResourceUrl("assets/alfresco.svg")),a.a.production||(this.debugMode=!0)}onResize(){this.appService.setScreenWidth(window.innerWidth)}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.loading=!1,this.headerService.hideSideBar=!0,setTimeout(()=>{this.headerService.sideNavLeft=this.snavLeft},0),this.translate.get("lang.langISO").subscribe(t=>{this.adapter.setLocale(t)})}))}ngAfterViewInit(){this.appService.setScreenWidth(window.innerWidth)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(S.c),n.Qb(ca.b),n.Qb(w.a),n.Qb(y.a),n.Qb(_.a),n.Qb(W.c),n.Qb(q.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-root"]],viewQuery:function(t,e){var i;1&t&&n.Xc(Z7,!0),2&t&&n.yc(i=n.ec())&&(e.snavLeft=i.first)},hostBindings:function(t,e){1&t&&n.dc("resize",(function(t){return e.onResize(t)}),!1,n.Cc)},features:[n.Cb([w.a,{provide:A.a,useValue:c8}],[S.c])],decls:2,vars:2,consts:[["class","maarch-container","autosize","",4,"ngIf"],[4,"ngIf"],["autosize","",1,"maarch-container"],["autoFocus","false",1,"panel-left",2,"overflow-x","hidden",3,"mode","fixedInViewport","opened","ngStyle"],["snavLeft",""],["id","adminMenu","style","display: contents;",4,"ngIf"],["basketHome",""],["panelFolder",""],["id","adminMenu",2,"display","contents"]],template:function(t,e){1&t&&(n.Oc(0,o8,10,15,"mat-sidenav-container",0),n.Oc(1,r8,1,0,"app-dev-tool",1)),2&t&&(n.oc("ngIf",!e.loading),n.Db(1),n.oc("ngIf",e.debugMode&&e.authService.isAuth()))},directives:[P.t,I.e,I.d,P.w,I.f,o.h,O6,zt,x6,Z6,T.a,H7,J7],encapsulation:2}),t})(),d8=(()=>{class t extends ca.d{constructor(){super(...arguments),this.overrides={pinch:{enable:!1},rotate:{enable:!1}}}}return t.\u0275fac=function(e){return h8(e||t)},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();const h8=n.Yb(d8);let u8=(()=>{class t{}return t.\u0275mod=n.Ob({type:t,bootstrap:[l8]}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},providers:[{provide:v.a,useClass:f7,multi:!0},P.f,sI,JD,tw.a,bC,Dt.a,{provide:ca.c,useClass:d8}],imports:[[ca.a,p7.b,v.c,AF.a,as.forRoot(),s.a,jF,u7,h7,b7],s.a]}),t})();n.Hc(by,[P.q,P.r,P.s,P.t,P.A,P.w,P.x,P.y,P.z,P.u,P.v,g.a,za,x6,zt,We,Ot,O6,Z6,X.K,X.z,X.J,X.d,X.A,X.D,X.a,X.G,X.H,X.C,X.u,X.v,X.F,X.q,X.p,X.B,X.b,X.e,X.x,X.y,X.w,X.j,X.m,X.k,X.n,X.g,o.h,o.d,o.f,o.e,o.i,j.a,t7.b,j.c,M4.b,Y.b,Y.c,Y.f,Y.g,Y.h,Y.i,Y.j,ee.a,ee.c,W.p,W.o,te.c,te.a,e7.b,e7.c,J.b,J.d,A.b,A.d,Te.c,Te.d,Te.a,Te.f,Te.e,Te.b,I.a,I.b,I.c,I.d,I.e,I.f,k.b,k.a,K.a,K.f,K.n,K.d,K.m,K.l,K.b,K.e,K.k,K.i,K.h,K.g,K.o,K.c,og.b,og.a,V.a,V.c,ni.a,M.a,M.c,ne.e,ne.b,ne.d,ne.a,i7.b,i7.d,i7.g,W.l,i7.f,i7.e,i7.a,vt.o,vt.i,vt.k,vt.c,vt.b,vt.n,vt.e,vt.g,vt.h,vt.a,vt.d,vt.j,vt.m,vt.f,vt.l,vt.r,Kt.a,Fe.a,Fe.b,ae.a,ae.b,ae.f,ae.g,ae.h,ae.j,ae.k,ae.m,ae.p,ae.n,ae.c,ae.d,ae.o,ae.l,ae.e,gt.a,gt.c,gt.d,gt.g,gt.h,gt.f,gt.e,Ne.a,Ne.d,Ne.c,n7.c,S.a,q.e,q.d,q.i,q.f,q.c,R.a,R.h,R.d,R.b,R.c,R.g,W.s,R.i,R.f,T.a,ze.d,ze.a,ze.c,ze.e,ze.b,ze.f,a7.a,a7.j,a7.b,a7.d,a7.e,a7.h,a7.i,a7.c,a7.f,hc.b,hc.a,gY.a,wt.a,s7.a,W.u,vy.a,vy.h,vy.j,vy.k,vy.b,vy.g,vy.i,M4.a,M4.d,M4.e,Ee.b,Ee.c,Ee.d,Ee.f,Ee.e,Ee.g,At,Rt,jt,lo.e,lo.f,lo.a,lo.b,lo.d,lo.c,ii,f0,fr,vO,im,Ef,ie,Zd,El,iO,nD,Ko,go,Qv,My,cQ,KD,hd,d7,Sg,Uw,uP,Fk,kC,Du,qT,$O,IO,wW,LW,$D,Gs,vr,Jr,Cr,OI,Cw,hw,Ow,jR,eV,eM,l8,pF,PF,kk,GR,ZR,rj,mj,uW,pA,$A,AO,yW,Pw,pM,gR,Ok,ra,G,bv,pW,aO,ho,Ph,pu,NV,gd,YD,tc,Vw,GP,_7,z7,O7,tP,io,Ws,ut,cc,us,H7,ht,eo,aa,R0,oo,Ls,aI,Jo,Y7,J7,dR,Pu,Mb,yb,bb,Sp,Ap,ib,Nu,tp,up,Cp,cb,_f,If,Kb,Qb,Wb,Ab,Sb,kb,Om,zm,Ym,sg,Yg,pv,b_,Jv,M_,L_,ey,Ty,zy,Xy,tx,ox,px,by,Vx,Bx,eC,pC,LR],[P.b,P.G,P.p,P.k,P.E,P.g,P.C,P.F,P.d,P.f,P.i,P.j,P.l,g.d,Tt.a,Tt.e,Tt.k,Tt.n,Tt.o,Tt.p,Tt.r,Tt.t,Tt.u,Tt.v,Tt.q,Tt.b,Tt.c,Tt.f,Tt.w,Tt.h,Tt.s,Tt.d,Tt.m,Tt.g,Tt.x,rg,uo,ec,si,Wt.a,ps,bs,HD]),a.a.production&&(window.console.debug=function(){},Object(n.W)()),ca.e().bootstrapModule(u8)},jtHE:function(t,e,i){"use strict";i.d(e,"a",(function(){return m}));var n=i("XNiG"),a=i("3N8a");class s extends a.a{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}schedule(t,e=0){return e>0?super.schedule(t,e):(this.delay=e,this.state=t,this.scheduler.flush(this),this)}execute(t,e){return e>0||this.closed?super.execute(t,e):this._execute(t,e)}requestAsyncId(t,e,i=0){return null!==i&&i>0||null===i&&this.delay>0?super.requestAsyncId(t,e,i):t.flush(this)}}var o=i("IjjT");class r extends o.a{}const c=new r(s);var l=i("quSY"),d=i("7o/Q"),h=i("WMd4");class u extends d.a{constructor(t,e,i=0){super(t),this.scheduler=e,this.delay=i}static dispatch(t){const{notification:e,destination:i}=t;e.observe(i),this.unsubscribe()}scheduleMessage(t){this.destination.add(this.scheduler.schedule(u.dispatch,this.delay,new p(t,this.destination)))}_next(t){this.scheduleMessage(h.a.createNext(t))}_error(t){this.scheduleMessage(h.a.createError(t)),this.unsubscribe()}_complete(){this.scheduleMessage(h.a.createComplete()),this.unsubscribe()}}class p{constructor(t,e){this.notification=t,this.destination=e}}var b=i("9ppp"),f=i("Ylt2");class m extends n.a{constructor(t=Number.POSITIVE_INFINITY,e=Number.POSITIVE_INFINITY,i){super(),this.scheduler=i,this._events=[],this._infiniteTimeWindow=!1,this._bufferSize=t<1?1:t,this._windowTime=e<1?1:e,e===Number.POSITIVE_INFINITY?(this._infiniteTimeWindow=!0,this.next=this.nextInfiniteTimeWindow):this.next=this.nextTimeWindow}nextInfiniteTimeWindow(t){if(!this.isStopped){const e=this._events;e.push(t),e.length>this._bufferSize&&e.shift()}super.next(t)}nextTimeWindow(t){this.isStopped||(this._events.push(new g(this._getNow(),t)),this._trimBufferThenGetEvents()),super.next(t)}_subscribe(t){const e=this._infiniteTimeWindow,i=e?this._events:this._trimBufferThenGetEvents(),n=this.scheduler,a=i.length;let s;if(this.closed)throw new b.a;if(this.isStopped||this.hasError?s=l.a.EMPTY:(this.observers.push(t),s=new f.a(this,t)),n&&t.add(t=new u(t,n)),e)for(let o=0;o<a&&!t.closed;o++)t.next(i[o]);else for(let o=0;o<a&&!t.closed;o++)t.next(i[o].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),s}_getNow(){return(this.scheduler||c).now()}_trimBufferThenGetEvents(){const t=this._getNow(),e=this._bufferSize,i=this._windowTime,n=this._events,a=n.length;let s=0;for(;s<a&&!(t-n[s].time<i);)s++;return a>e&&(s=Math.max(s,a-e)),s>0&&n.splice(0,s),n}}class g{constructor(t,e){this.time=t,this.value=e}}},kJWO:function(t,e,i){"use strict";i.d(e,"a",(function(){return n}));const n=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")()},kiQV:function(t){t.exports=JSON.parse('{"name":"MaarchCourrier","version":"20.10.5","description":"MaarchCourrier","scripts":{"build-css":"node-sass --include-path scss src/frontend/css/maarch-material.scss src/frontend/css/maarch-material.css --output-style compressed","build-prod":"ng build --prod && npm run build-css","build-watch":"ng build --watch","build":"ng build","check-update":"ncu","dep-list":"npm list --depth=0","upgrade":"ncu -u","create-component":"echo Component name ?\xa0&& read varname && ng g c $varname --module app --style=scss","create-component-admin":"echo Component name ?\xa0&& read varname && ng g c administration/$varname --module administration --style=scss","ee-launch":"webdriver-manager update && webdriver-manager start --detach && protractor test/e2e/conf.js && webdriver-manager shutdown && fuser -k 4444/tcp","ee-update":"webdriver-manager update","ee-start-server":"webdriver-manager start","ee-test":"protractor test/e2e/conf.js"},"keywords":[],"author":"Maarch","license":"GPL-3.0","dependencies":{"core-js":"3.6.5","pdfjs-dist":"2.5.207","tinymce-i18n":"20.4.4","tinymce":"5.5.0","zone.js":"0.11.2"},"devDependencies":{"@angular-devkit/build-angular":"0.1002.0","@angular/animations":"10.2.0","@angular/cdk":"10.2.7","@angular/cli":"10.2.0","@angular/common":"10.2.0","@angular/compiler-cli":"10.2.0","@angular/compiler":"10.2.0","@angular/core":"10.2.0","@angular/forms":"10.2.0","@angular/material":"10.2.7","@angular/platform-browser-dynamic":"10.2.0","@angular/platform-browser":"10.2.0","@angular/platform-server":"10.2.0","@angular/router":"10.2.0","@fortawesome/fontawesome-free":"5.15.1","@ngx-translate/core":"13.0.0","@ngx-translate/http-loader":"6.0.0","@swimlane/ngx-charts":"16.0.0","@types/datatables.net":"1.10.19","@types/jquery.nicescroll":"3.7.1","@types/jquery":"3.5.3","@types/jstree":"3.3.40","@types/tooltipster":"0.0.30","ajv":"6.12.6","bootstrap":"3.4.1","chosen-js":"1.8.7","codelyzer":"6.0.0","flat-to-nested":"1.1.0","hammerjs":"2.0.8","html-minifier":"4.0.0","jquery-typeahead":"2.11.1","jquery.nicescroll":"3.7.6","jquery":"3.5.1","jstree-bootstrap-theme":"1.0.1","ng2-dnd":"5.0.2","ng2-pdf-viewer":"6.3.2","ngx-cookie-service":"10.0.1","ngx-joyride":"2.3.1","ngx-papaparse":"5.0.0","ngx-pipes":"2.7.5","node-sass":"4.14.1","nodemon":"2.0.6","npm-check-updates":"9.1.2","photoswipe":"4.1.3","protractor":"7.0.0","rxjs":"6.6.3","tooltipster":"4.2.8","tslib":"2.0.3","tslint":"6.1.3","typescript":"4.0.3","url-loader":"4.1.1"},"repository":{}}')},kmnG:function(t,e,i){"use strict";i.d(e,"a",(function(){return Z})),i.d(e,"b",(function(){return E})),i.d(e,"c",(function(){return tt})),i.d(e,"d",(function(){return L})),i.d(e,"e",(function(){return et})),i.d(e,"f",(function(){return z})),i.d(e,"g",(function(){return B})),i.d(e,"h",(function(){return U})),i.d(e,"i",(function(){return H})),i.d(e,"j",(function(){return X}));var n=i("GU7r"),a=i("ofXK"),s=i("fXoL"),o=i("FKr1"),r=i("8LU1"),c=i("XNiG"),l=i("VRyK"),d=i("xgIS"),h=i("JX91"),u=i("1G5W"),p=i("IzEk"),b=i("R0Ic"),f=i("R1ws"),m=i("cH1L"),g=i("nLfN");const v=["underline"],_=["connectionContainer"],y=["inputContainer"],x=["label"];function C(t,e){1&t&&(s.Ub(0),s.Wb(1,"div",14),s.Rb(2,"div",15),s.Rb(3,"div",16),s.Rb(4,"div",17),s.Vb(),s.Wb(5,"div",18),s.Rb(6,"div",15),s.Rb(7,"div",16),s.Rb(8,"div",17),s.Vb(),s.Tb())}function O(t,e){1&t&&(s.Wb(0,"div",19),s.mc(1,1),s.Vb())}function D(t,e){if(1&t&&(s.Ub(0),s.mc(1,2),s.Wb(2,"span"),s.Qc(3),s.Vb(),s.Tb()),2&t){const t=s.hc(2);s.Db(3),s.Rc(t._control.placeholder)}}function w(t,e){1&t&&s.mc(0,3,["*ngSwitchCase","true"])}function M(t,e){1&t&&(s.Wb(0,"span",23),s.Qc(1," *"),s.Vb())}function k(t,e){if(1&t){const t=s.Xb();s.Wb(0,"label",20,21),s.dc("cdkObserveContent",(function(){return s.Dc(t),s.hc().updateOutlineGap()})),s.Oc(2,D,4,1,"ng-container",12),s.Oc(3,w,1,0,"ng-content",12),s.Oc(4,M,2,0,"span",22),s.Vb()}if(2&t){const t=s.hc();s.Ib("mat-empty",t._control.empty&&!t._shouldAlwaysFloat())("mat-form-field-empty",t._control.empty&&!t._shouldAlwaysFloat())("mat-accent","accent"==t.color)("mat-warn","warn"==t.color),s.oc("cdkObserveContentDisabled","outline"!=t.appearance)("id",t._labelId)("ngSwitch",t._hasLabel()),s.Eb("for",t._control.id)("aria-owns",t._control.id),s.Db(2),s.oc("ngSwitchCase",!1),s.Db(1),s.oc("ngSwitchCase",!0),s.Db(1),s.oc("ngIf",!t.hideRequiredMarker&&t._control.required&&!t._control.disabled)}}function S(t,e){1&t&&(s.Wb(0,"div",24),s.mc(1,4),s.Vb())}function I(t,e){if(1&t&&(s.Wb(0,"div",25,26),s.Rb(2,"span",27),s.Vb()),2&t){const t=s.hc();s.Db(2),s.Ib("mat-accent","accent"==t.color)("mat-warn","warn"==t.color)}}function P(t,e){if(1&t&&(s.Wb(0,"div"),s.mc(1,5),s.Vb()),2&t){const t=s.hc();s.oc("@transitionMessages",t._subscriptAnimationState)}}function V(t,e){if(1&t&&(s.Wb(0,"div",31),s.Qc(1),s.Vb()),2&t){const t=s.hc(2);s.oc("id",t._hintLabelId),s.Db(1),s.Rc(t.hintLabel)}}function R(t,e){if(1&t&&(s.Wb(0,"div",28),s.Oc(1,V,2,2,"div",29),s.mc(2,6),s.Rb(3,"div",30),s.mc(4,7),s.Vb()),2&t){const t=s.hc();s.oc("@transitionMessages",t._subscriptAnimationState),s.Db(1),s.oc("ngIf",t.hintLabel)}}const j=["*",[["","matPrefix",""]],[["mat-placeholder"]],[["mat-label"]],[["","matSuffix",""]],[["mat-error"]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],A=["*","[matPrefix]","mat-placeholder","mat-label","[matSuffix]","mat-error","mat-hint:not([align='end'])","mat-hint[align='end']"];let W=0;const T=new s.s("MatError");let E=(()=>{class t{constructor(){this.id="mat-error-"+W++}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["mat-error"]],hostAttrs:["role","alert",1,"mat-error"],hostVars:1,hostBindings:function(t,e){2&t&&s.Eb("id",e.id)},inputs:{id:"id"},features:[s.Cb([{provide:T,useExisting:t}])]}),t})();const F={transitionMessages:Object(b.n)("transitionMessages",[Object(b.k)("enter",Object(b.l)({opacity:1,transform:"translateY(0%)"})),Object(b.m)("void => enter",[Object(b.l)({opacity:0,transform:"translateY(-100%)"}),Object(b.e)("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let L=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t}),t})(),Q=0;const N=new s.s("MatHint");let z=(()=>{class t{constructor(){this.align="start",this.id="mat-hint-"+Q++}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["mat-hint"]],hostAttrs:[1,"mat-hint"],hostVars:4,hostBindings:function(t,e){2&t&&(s.Eb("id",e.id)("align",null),s.Ib("mat-form-field-hint-end","end"===e.align))},inputs:{align:"align",id:"id"},features:[s.Cb([{provide:N,useExisting:t}])]}),t})(),B=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["mat-label"]]}),t})(),U=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["mat-placeholder"]]}),t})();const $=new s.s("MatPrefix");let H=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","matPrefix",""]],features:[s.Cb([{provide:$,useExisting:t}])]}),t})();const G=new s.s("MatSuffix");let X=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","matSuffix",""]],features:[s.Cb([{provide:G,useExisting:t}])]}),t})(),q=0;class K{constructor(t){this._elementRef=t}}const Y=Object(o.A)(K,"primary"),J=new s.s("MAT_FORM_FIELD_DEFAULT_OPTIONS"),Z=new s.s("MatFormField");let tt=(()=>{class t extends Y{constructor(t,e,i,n,a,s,o,r){super(t),this._elementRef=t,this._changeDetectorRef=e,this._dir=n,this._defaults=a,this._platform=s,this._ngZone=o,this._outlineGapCalculationNeededImmediately=!1,this._outlineGapCalculationNeededOnStable=!1,this._destroyed=new c.a,this._showAlwaysAnimate=!1,this._subscriptAnimationState="",this._hintLabel="",this._hintLabelId="mat-hint-"+q++,this._labelId="mat-form-field-label-"+q++,this._labelOptions=i||{},this.floatLabel=this._getDefaultFloatLabelState(),this._animationsEnabled="NoopAnimations"!==r,this.appearance=a&&a.appearance?a.appearance:"legacy",this._hideRequiredMarker=!(!a||null==a.hideRequiredMarker)&&a.hideRequiredMarker}get appearance(){return this._appearance}set appearance(t){const e=this._appearance;this._appearance=t||this._defaults&&this._defaults.appearance||"legacy","outline"===this._appearance&&e!==t&&(this._outlineGapCalculationNeededOnStable=!0)}get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(t){this._hideRequiredMarker=Object(r.c)(t)}_shouldAlwaysFloat(){return"always"===this.floatLabel&&!this._showAlwaysAnimate}_canLabelFloat(){return"never"!==this.floatLabel}get hintLabel(){return this._hintLabel}set hintLabel(t){this._hintLabel=t,this._processHints()}get floatLabel(){return"legacy"!==this.appearance&&"never"===this._floatLabel?"auto":this._floatLabel}set floatLabel(t){t!==this._floatLabel&&(this._floatLabel=t||this._getDefaultFloatLabelState(),this._changeDetectorRef.markForCheck())}get _control(){return this._explicitFormFieldControl||this._controlNonStatic||this._controlStatic}set _control(t){this._explicitFormFieldControl=t}getLabelId(){return this._hasFloatingLabel()?this._labelId:null}getConnectedOverlayOrigin(){return this._connectionContainerRef||this._elementRef}ngAfterContentInit(){this._validateControlChild();const t=this._control;t.controlType&&this._elementRef.nativeElement.classList.add("mat-form-field-type-"+t.controlType),t.stateChanges.pipe(Object(h.a)(null)).subscribe(()=>{this._validatePlaceholders(),this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),t.ngControl&&t.ngControl.valueChanges&&t.ngControl.valueChanges.pipe(Object(u.a)(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck()),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe(Object(u.a)(this._destroyed)).subscribe(()=>{this._outlineGapCalculationNeededOnStable&&this.updateOutlineGap()})}),Object(l.a)(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._outlineGapCalculationNeededOnStable=!0,this._changeDetectorRef.markForCheck()}),this._hintChildren.changes.pipe(Object(h.a)(null)).subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.pipe(Object(h.a)(null)).subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._dir&&this._dir.change.pipe(Object(u.a)(this._destroyed)).subscribe(()=>{"function"==typeof requestAnimationFrame?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this.updateOutlineGap())}):this.updateOutlineGap()})}ngAfterContentChecked(){this._validateControlChild(),this._outlineGapCalculationNeededImmediately&&this.updateOutlineGap()}ngAfterViewInit(){this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_shouldForward(t){const e=this._control?this._control.ngControl:null;return e&&e[t]}_hasPlaceholder(){return!!(this._control&&this._control.placeholder||this._placeholderChild)}_hasLabel(){return!(!this._labelChildNonStatic&&!this._labelChildStatic)}_shouldLabelFloat(){return this._canLabelFloat()&&(this._control&&this._control.shouldLabelFloat||this._shouldAlwaysFloat())}_hideControlPlaceholder(){return"legacy"===this.appearance&&!this._hasLabel()||this._hasLabel()&&!this._shouldLabelFloat()}_hasFloatingLabel(){return this._hasLabel()||"legacy"===this.appearance&&this._hasPlaceholder()}_getDisplayedMessages(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_animateAndLockLabel(){this._hasFloatingLabel()&&this._canLabelFloat()&&(this._animationsEnabled&&this._label&&(this._showAlwaysAnimate=!0,Object(d.a)(this._label.nativeElement,"transitionend").pipe(Object(p.a)(1)).subscribe(()=>{this._showAlwaysAnimate=!1})),this.floatLabel="always",this._changeDetectorRef.markForCheck())}_validatePlaceholders(){}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){}_getDefaultFloatLabelState(){return this._defaults&&this._defaults.floatLabel||this._labelOptions.float||"auto"}_syncDescribedByIds(){if(this._control){let t=[];if(this._control.userAriaDescribedBy&&"string"==typeof this._control.userAriaDescribedBy&&t.push(...this._control.userAriaDescribedBy.split(" ")),"hint"===this._getDisplayedMessages()){const e=this._hintChildren?this._hintChildren.find(t=>"start"===t.align):null,i=this._hintChildren?this._hintChildren.find(t=>"end"===t.align):null;e?t.push(e.id):this._hintLabel&&t.push(this._hintLabelId),i&&t.push(i.id)}else this._errorChildren&&t.push(...this._errorChildren.map(t=>t.id));this._control.setDescribedByIds(t)}}_validateControlChild(){}updateOutlineGap(){const t=this._label?this._label.nativeElement:null;if("outline"!==this.appearance||!t||!t.children.length||!t.textContent.trim())return;if(!this._platform.isBrowser)return;if(!this._isAttachedToDOM())return void(this._outlineGapCalculationNeededImmediately=!0);let e=0,i=0;const n=this._connectionContainerRef.nativeElement,a=n.querySelectorAll(".mat-form-field-outline-start"),s=n.querySelectorAll(".mat-form-field-outline-gap");if(this._label&&this._label.nativeElement.children.length){const a=n.getBoundingClientRect();if(0===a.width&&0===a.height)return this._outlineGapCalculationNeededOnStable=!0,void(this._outlineGapCalculationNeededImmediately=!1);const s=this._getStartEnd(a),o=t.children,r=this._getStartEnd(o[0].getBoundingClientRect());let c=0;for(let t=0;t<o.length;t++)c+=o[t].offsetWidth;e=Math.abs(r-s)-5,i=c>0?.75*c+10:0}for(let o=0;o<a.length;o++)a[o].style.width=e+"px";for(let o=0;o<s.length;o++)s[o].style.width=i+"px";this._outlineGapCalculationNeededOnStable=this._outlineGapCalculationNeededImmediately=!1}_getStartEnd(t){return this._dir&&"rtl"===this._dir.value?t.right:t.left}_isAttachedToDOM(){const t=this._elementRef.nativeElement;if(t.getRootNode){const e=t.getRootNode();return e&&e!==t}return document.documentElement.contains(t)}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.l),s.Qb(s.h),s.Qb(o.g,8),s.Qb(m.c,8),s.Qb(J,8),s.Qb(g.a),s.Qb(s.C),s.Qb(f.a,8))},t.\u0275cmp=s.Kb({type:t,selectors:[["mat-form-field"]],contentQueries:function(t,e,i){var n;1&t&&(s.Jb(i,L,!0),s.Jc(i,L,!0),s.Jb(i,B,!0),s.Jc(i,B,!0),s.Jb(i,U,!0),s.Jb(i,T,!0),s.Jb(i,N,!0),s.Jb(i,$,!0),s.Jb(i,G,!0)),2&t&&(s.yc(n=s.ec())&&(e._controlNonStatic=n.first),s.yc(n=s.ec())&&(e._controlStatic=n.first),s.yc(n=s.ec())&&(e._labelChildNonStatic=n.first),s.yc(n=s.ec())&&(e._labelChildStatic=n.first),s.yc(n=s.ec())&&(e._placeholderChild=n.first),s.yc(n=s.ec())&&(e._errorChildren=n),s.yc(n=s.ec())&&(e._hintChildren=n),s.yc(n=s.ec())&&(e._prefixChildren=n),s.yc(n=s.ec())&&(e._suffixChildren=n))},viewQuery:function(t,e){var i;1&t&&(s.Xc(v,!0),s.Kc(_,!0),s.Xc(y,!0),s.Xc(x,!0)),2&t&&(s.yc(i=s.ec())&&(e.underlineRef=i.first),s.yc(i=s.ec())&&(e._connectionContainerRef=i.first),s.yc(i=s.ec())&&(e._inputContainerRef=i.first),s.yc(i=s.ec())&&(e._label=i.first))},hostAttrs:[1,"mat-form-field"],hostVars:44,hostBindings:function(t,e){2&t&&s.Ib("mat-form-field-appearance-standard","standard"==e.appearance)("mat-form-field-appearance-fill","fill"==e.appearance)("mat-form-field-appearance-outline","outline"==e.appearance)("mat-form-field-appearance-legacy","legacy"==e.appearance)("mat-form-field-invalid",e._control.errorState)("mat-form-field-can-float",e._canLabelFloat())("mat-form-field-should-float",e._shouldLabelFloat())("mat-form-field-has-label",e._hasFloatingLabel())("mat-form-field-hide-placeholder",e._hideControlPlaceholder())("mat-form-field-disabled",e._control.disabled)("mat-form-field-autofilled",e._control.autofilled)("mat-focused",e._control.focused)("mat-accent","accent"==e.color)("mat-warn","warn"==e.color)("ng-untouched",e._shouldForward("untouched"))("ng-touched",e._shouldForward("touched"))("ng-pristine",e._shouldForward("pristine"))("ng-dirty",e._shouldForward("dirty"))("ng-valid",e._shouldForward("valid"))("ng-invalid",e._shouldForward("invalid"))("ng-pending",e._shouldForward("pending"))("_mat-animation-noopable",!e._animationsEnabled)},inputs:{color:"color",floatLabel:"floatLabel",appearance:"appearance",hideRequiredMarker:"hideRequiredMarker",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[s.Cb([{provide:Z,useExisting:t}]),s.Ab],ngContentSelectors:A,decls:15,vars:8,consts:[[1,"mat-form-field-wrapper"],[1,"mat-form-field-flex",3,"click"],["connectionContainer",""],[4,"ngIf"],["class","mat-form-field-prefix",4,"ngIf"],[1,"mat-form-field-infix"],["inputContainer",""],[1,"mat-form-field-label-wrapper"],["class","mat-form-field-label",3,"cdkObserveContentDisabled","id","mat-empty","mat-form-field-empty","mat-accent","mat-warn","ngSwitch","cdkObserveContent",4,"ngIf"],["class","mat-form-field-suffix",4,"ngIf"],["class","mat-form-field-underline",4,"ngIf"],[1,"mat-form-field-subscript-wrapper",3,"ngSwitch"],[4,"ngSwitchCase"],["class","mat-form-field-hint-wrapper",4,"ngSwitchCase"],[1,"mat-form-field-outline"],[1,"mat-form-field-outline-start"],[1,"mat-form-field-outline-gap"],[1,"mat-form-field-outline-end"],[1,"mat-form-field-outline","mat-form-field-outline-thick"],[1,"mat-form-field-prefix"],[1,"mat-form-field-label",3,"cdkObserveContentDisabled","id","ngSwitch","cdkObserveContent"],["label",""],["class","mat-placeholder-required mat-form-field-required-marker","aria-hidden","true",4,"ngIf"],["aria-hidden","true",1,"mat-placeholder-required","mat-form-field-required-marker"],[1,"mat-form-field-suffix"],[1,"mat-form-field-underline"],["underline",""],[1,"mat-form-field-ripple"],[1,"mat-form-field-hint-wrapper"],["class","mat-hint",3,"id",4,"ngIf"],[1,"mat-form-field-hint-spacer"],[1,"mat-hint",3,"id"]],template:function(t,e){1&t&&(s.nc(j),s.Wb(0,"div",0),s.Wb(1,"div",1,2),s.dc("click",(function(t){return e._control.onContainerClick&&e._control.onContainerClick(t)})),s.Oc(3,C,9,0,"ng-container",3),s.Oc(4,O,2,0,"div",4),s.Wb(5,"div",5,6),s.mc(7),s.Wb(8,"span",7),s.Oc(9,k,5,16,"label",8),s.Vb(),s.Vb(),s.Oc(10,S,2,0,"div",9),s.Vb(),s.Oc(11,I,3,4,"div",10),s.Wb(12,"div",11),s.Oc(13,P,2,1,"div",12),s.Oc(14,R,5,2,"div",13),s.Vb(),s.Vb()),2&t&&(s.Db(3),s.oc("ngIf","outline"==e.appearance),s.Db(1),s.oc("ngIf",e._prefixChildren.length),s.Db(5),s.oc("ngIf",e._hasFloatingLabel()),s.Db(1),s.oc("ngIf",e._suffixChildren.length),s.Db(1),s.oc("ngIf","outline"!=e.appearance),s.Db(1),s.oc("ngSwitch",e._getDisplayedMessages()),s.Db(1),s.oc("ngSwitchCase","error"),s.Db(1),s.oc("ngSwitchCase","hint"))},directives:[a.t,a.x,a.y,n.a],styles:[".mat-form-field{display:inline-block;position:relative;text-align:left}[dir=rtl] .mat-form-field{text-align:right}.mat-form-field-wrapper{position:relative}.mat-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-form-field-prefix,.mat-form-field-suffix{white-space:nowrap;flex:none;position:relative}.mat-form-field-infix{display:block;position:relative;flex:auto;min-width:0;width:180px}.cdk-high-contrast-active .mat-form-field-infix{border-image:linear-gradient(transparent, transparent)}.mat-form-field-label-wrapper{position:absolute;left:0;box-sizing:content-box;width:100%;height:100%;overflow:hidden;pointer-events:none}[dir=rtl] .mat-form-field-label-wrapper{left:auto;right:0}.mat-form-field-label{position:absolute;left:0;font:inherit;pointer-events:none;width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;transform-origin:0 0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),width 400ms cubic-bezier(0.25, 0.8, 0.25, 1);display:none}[dir=rtl] .mat-form-field-label{transform-origin:100% 0;left:auto;right:0}.mat-form-field-empty.mat-form-field-label,.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label{display:block}.mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:block;transition:none}.mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-form-field-can-float .mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:block}.mat-form-field-label:not(.mat-form-field-empty){transition:none}.mat-form-field-underline{position:absolute;width:100%;pointer-events:none;transform:scale3d(1, 1.0001, 1)}.mat-form-field-ripple{position:absolute;left:0;width:100%;transform-origin:50%;transform:scaleX(0.5);opacity:0;transition:background-color 300ms cubic-bezier(0.55, 0, 0.55, 0.2)}.mat-form-field.mat-focused .mat-form-field-ripple,.mat-form-field.mat-form-field-invalid .mat-form-field-ripple{opacity:1;transform:scaleX(1);transition:transform 300ms cubic-bezier(0.25, 0.8, 0.25, 1),opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 300ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-subscript-wrapper{position:absolute;box-sizing:border-box;width:100%;overflow:hidden}.mat-form-field-subscript-wrapper .mat-icon,.mat-form-field-label-wrapper .mat-icon{width:1em;height:1em;font-size:inherit;vertical-align:baseline}.mat-form-field-hint-wrapper{display:flex}.mat-form-field-hint-spacer{flex:1 0 1em}.mat-error{display:block}.mat-form-field-control-wrapper{position:relative}.mat-form-field-hint-end{order:1}.mat-form-field._mat-animation-noopable .mat-form-field-label,.mat-form-field._mat-animation-noopable .mat-form-field-ripple{transition:none}\n",'.mat-form-field-appearance-fill .mat-form-field-flex{border-radius:4px 4px 0 0;padding:.75em .75em 0 .75em}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-flex{outline:solid 1px}.mat-form-field-appearance-fill .mat-form-field-underline::before{content:"";display:block;position:absolute;bottom:0;height:1px;width:100%}.mat-form-field-appearance-fill .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-fill:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-fill._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}.mat-form-field-appearance-fill .mat-form-field-subscript-wrapper{padding:0 1em}\n','.mat-input-element{font:inherit;background:transparent;color:currentColor;border:none;outline:none;padding:0;margin:0;width:100%;max-width:100%;vertical-align:bottom;text-align:inherit}.mat-input-element:-moz-ui-invalid{box-shadow:none}.mat-input-element::-ms-clear,.mat-input-element::-ms-reveal{display:none}.mat-input-element,.mat-input-element::-webkit-search-cancel-button,.mat-input-element::-webkit-search-decoration,.mat-input-element::-webkit-search-results-button,.mat-input-element::-webkit-search-results-decoration{-webkit-appearance:none}.mat-input-element::-webkit-contacts-auto-fill-button,.mat-input-element::-webkit-caps-lock-indicator,.mat-input-element::-webkit-credentials-auto-fill-button{visibility:hidden}.mat-input-element[type=date],.mat-input-element[type=datetime],.mat-input-element[type=datetime-local],.mat-input-element[type=month],.mat-input-element[type=week],.mat-input-element[type=time]{line-height:1}.mat-input-element[type=date]::after,.mat-input-element[type=datetime]::after,.mat-input-element[type=datetime-local]::after,.mat-input-element[type=month]::after,.mat-input-element[type=week]::after,.mat-input-element[type=time]::after{content:" ";white-space:pre;width:1px}.mat-input-element::-webkit-inner-spin-button,.mat-input-element::-webkit-calendar-picker-indicator,.mat-input-element::-webkit-clear-button{font-size:.75em}.mat-input-element::placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element::-moz-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-moz-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element::-webkit-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-webkit-input-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element:-ms-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element:-ms-input-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-form-field-hide-placeholder .mat-input-element::placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element::-moz-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element::-webkit-input-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element:-ms-input-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}textarea.mat-input-element{resize:vertical;overflow:auto}textarea.mat-input-element.cdk-textarea-autosize{resize:none}textarea.mat-input-element{padding:2px 0;margin:-2px 0}select.mat-input-element{-moz-appearance:none;-webkit-appearance:none;position:relative;background-color:transparent;display:inline-flex;box-sizing:border-box;padding-top:1em;top:-1em;margin-bottom:-1em}select.mat-input-element::-ms-expand{display:none}select.mat-input-element::-moz-focus-inner{border:0}select.mat-input-element:not(:disabled){cursor:pointer}select.mat-input-element::-ms-value{color:inherit;background:none}.mat-focused .cdk-high-contrast-active select.mat-input-element::-ms-value{color:inherit}.mat-form-field-type-mat-native-select .mat-form-field-infix::after{content:"";width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;position:absolute;top:50%;right:0;margin-top:-2.5px;pointer-events:none}[dir=rtl] .mat-form-field-type-mat-native-select .mat-form-field-infix::after{right:auto;left:0}.mat-form-field-type-mat-native-select .mat-input-element{padding-right:15px}[dir=rtl] .mat-form-field-type-mat-native-select .mat-input-element{padding-right:0;padding-left:15px}.mat-form-field-type-mat-native-select .mat-form-field-label-wrapper{max-width:calc(100% - 10px)}.mat-form-field-type-mat-native-select.mat-form-field-appearance-outline .mat-form-field-infix::after{margin-top:-5px}.mat-form-field-type-mat-native-select.mat-form-field-appearance-fill .mat-form-field-infix::after{margin-top:-10px}\n',".mat-form-field-appearance-legacy .mat-form-field-label{transform:perspective(100px);-ms-transform:none}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon{width:1em}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button{font:inherit;vertical-align:baseline}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button .mat-icon{font-size:inherit}.mat-form-field-appearance-legacy .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-legacy .mat-form-field-ripple{top:0;height:2px;overflow:hidden}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}.cdk-high-contrast-active .mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-legacy.mat-form-field-invalid:not(.mat-focused) .mat-form-field-ripple{height:1px}\n",".mat-form-field-appearance-outline .mat-form-field-wrapper{margin:.25em 0}.mat-form-field-appearance-outline .mat-form-field-flex{padding:0 .75em 0 .75em;margin-top:-0.25em;position:relative}.mat-form-field-appearance-outline .mat-form-field-prefix,.mat-form-field-appearance-outline .mat-form-field-suffix{top:.25em}.mat-form-field-appearance-outline .mat-form-field-outline{display:flex;position:absolute;top:.25em;left:0;right:0;bottom:0;pointer-events:none}.mat-form-field-appearance-outline .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-end{border:1px solid currentColor;min-width:5px}.mat-form-field-appearance-outline .mat-form-field-outline-start{border-radius:5px 0 0 5px;border-right-style:none}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-start{border-right-style:solid;border-left-style:none;border-radius:0 5px 5px 0}.mat-form-field-appearance-outline .mat-form-field-outline-end{border-radius:0 5px 5px 0;border-left-style:none;flex-grow:1}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-end{border-left-style:solid;border-right-style:none;border-radius:5px 0 0 5px}.mat-form-field-appearance-outline .mat-form-field-outline-gap{border-radius:.000001px;border:1px solid currentColor;border-left-style:none;border-right-style:none}.mat-form-field-appearance-outline.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-outline-gap{border-top-color:transparent}.mat-form-field-appearance-outline .mat-form-field-outline-thick{opacity:0}.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-end,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-gap{border-width:2px}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline{opacity:0;transition:opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline{opacity:0;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline .mat-form-field-subscript-wrapper{padding:0 1em}.mat-form-field-appearance-outline._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-start,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-end,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-gap{transition:none}\n",".mat-form-field-appearance-standard .mat-form-field-flex{padding-top:.75em}.mat-form-field-appearance-standard .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-standard .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-ripple{height:0;border-top:2px}.mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}.cdk-high-contrast-active .mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-standard:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-standard._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}\n"],encapsulation:2,data:{animation:[F.transitionMessages]},changeDetection:0}),t})(),et=(()=>{class t{}return t.\u0275mod=s.Ob({type:t}),t.\u0275inj=s.Nb({factory:function(e){return new(e||t)},imports:[[a.c,o.k,n.c],o.k]}),t})()},lJEt:function(t,e,i){"use strict";i.d(e,"a",(function(){return I})),i.d(e,"b",(function(){return m})),i.d(e,"c",(function(){return g})),i.d(e,"d",(function(){return y})),i.d(e,"f",(function(){return O})),i.d(e,"e",(function(){return M})),i.d(e,"g",(function(){return k}));var n=i("fXoL"),a=i("3Pt+");function s(t){return null!=t}let o=(()=>{class t{constructor(t){this.name=t}}return t.COPY=new t("copy"),t.LINK=new t("link"),t.MOVE=new t("move"),t.NONE=new t("none"),t})();class r{constructor(){this.onDragStartClass="dnd-drag-start",this.onDragEnterClass="dnd-drag-enter",this.onDragOverClass="dnd-drag-over",this.onSortableDragClass="dnd-sortable-drag",this.dragEffect=o.MOVE,this.dropEffect=o.MOVE,this.dragCursor="move",this.defaultCursor="pointer"}}var c=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let l=(()=>{let t=class{constructor(){this.allowedDropZones=[]}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=n.Mb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})(),d=(()=>{let t=class{constructor(t){this._config=t}get elem(){return this._elem}markSortable(t){s(this._elem)&&this._elem.classList.remove(this._config.onSortableDragClass),s(t)&&(this._elem=t,this._elem.classList.add(this._config.onSortableDragClass))}};return t.\u0275fac=function(e){return new(e||t)(n.ac(r))},t.\u0275prov=n.Mb({token:t,factory:function(e){return t.\u0275fac(e)}}),t=function(t,e,i,n){var a,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(o=(s<3?a(o):s>3?a(e,i,o):a(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o}([c("design:paramtypes",[r])],t),t})();var h=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let u=(()=>{let t=class{constructor(t,e,i,n){this._dragDropService=e,this._config=i,this._cdr=n,this._dragEnabled=!1,this.dropEnabled=!1,this.dropZones=[],this.cloneItem=!1,this._defaultCursor=i.defaultCursor,this._elem=t.nativeElement,this._elem.style.cursor=this._defaultCursor,this._elem.ondragenter=t=>{this._onDragEnter(t)},this._elem.ondragover=t=>(this._onDragOver(t),null!=t.dataTransfer&&(t.dataTransfer.dropEffect=this._config.dropEffect.name),!1),this._elem.ondragleave=t=>{this._onDragLeave(t)},this._elem.ondrop=t=>{this._onDrop(t)},this._elem.onmousedown=t=>{this._target=t.target},this._elem.ondragstart=t=>{if(!this._dragHandle||this._dragHandle.contains(this._target)){if(this._onDragStart(t),null!=t.dataTransfer){if(t.dataTransfer.setData("text",""),t.dataTransfer.effectAllowed=this.effectAllowed||this._config.dragEffect.name,s(this.dragImage))if("string"==typeof this.dragImage)t.dataTransfer.setDragImage(function(t){let e=new HTMLImageElement;return e.src=t,e}(this.dragImage));else if("function"==typeof this.dragImage)t.dataTransfer.setDragImage((0,this.dragImage)());else{let e=this.dragImage;t.dataTransfer.setDragImage(e.imageElement,e.x_offset,e.y_offset)}else if(s(this._config.dragImage)){let e=this._config.dragImage;t.dataTransfer.setDragImage(e.imageElement,e.x_offset,e.y_offset)}else this.cloneItem&&(this._dragHelper=this._elem.cloneNode(!0),this._dragHelper.classList.add("dnd-drag-item"),this._dragHelper.style.position="absolute",this._dragHelper.style.top="0px",this._dragHelper.style.left="-1000px",this._elem.parentElement.appendChild(this._dragHelper),t.dataTransfer.setDragImage(this._dragHelper,t.offsetX,t.offsetY));(this._dragHandle?this._dragHandle:this._elem).style.cursor=this._dragEnabled?this.effectCursor?this.effectCursor:this._config.dragCursor:this._defaultCursor}}else t.preventDefault()},this._elem.ondragend=t=>{this._elem.parentElement&&this._dragHelper&&this._elem.parentElement.removeChild(this._dragHelper),this._onDragEnd(t),(this._dragHandle?this._dragHandle:this._elem).style.cursor=this._defaultCursor}}set dragEnabled(t){this._dragEnabled=!!t,this._elem.draggable=this._dragEnabled}get dragEnabled(){return this._dragEnabled}setDragHandle(t){this._dragHandle=t}detectChanges(){setTimeout(()=>{this._cdr&&!this._cdr.destroyed&&this._cdr.detectChanges()},250)}_onDragEnter(t){this._isDropAllowed(t)&&this._onDragEnterCallback(t)}_onDragOver(t){this._isDropAllowed(t)&&(t.preventDefault&&t.preventDefault(),this._onDragOverCallback(t))}_onDragLeave(t){this._isDropAllowed(t)&&this._onDragLeaveCallback(t)}_onDrop(t){this._isDropAllowed(t)&&(this._preventAndStop(t),this._onDropCallback(t),this.detectChanges())}_isDropAllowed(t){if((this._dragDropService.isDragged||t.dataTransfer&&t.dataTransfer.files)&&this.dropEnabled){if(this.allowDrop)return this.allowDrop(this._dragDropService.dragData);if(0===this.dropZones.length&&0===this._dragDropService.allowedDropZones.length)return!0;for(let t=0;t<this._dragDropService.allowedDropZones.length;t++)if(-1!==this.dropZones.indexOf(this._dragDropService.allowedDropZones[t]))return!0}return!1}_preventAndStop(t){t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation()}_onDragStart(t){this._dragEnabled&&(this._dragDropService.allowedDropZones=this.dropZones,this._onDragStartCallback(t))}_onDragEnd(t){this._dragDropService.allowedDropZones=[],this._onDragEndCallback(t)}_onDragEnterCallback(t){}_onDragOverCallback(t){}_onDragLeaveCallback(t){}_onDropCallback(t){}_onDragStartCallback(t){}_onDragEndCallback(t){}};return t.\u0275fac=function(e){return new(e||t)(n.ac(n.l),n.ac(l),n.ac(r),n.ac(n.h))},t.\u0275prov=n.Mb({token:t,factory:function(e){return t.\u0275fac(e)}}),t=function(t,e,i,n){var a,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(o=(s<3?a(o):s>3?a(e,i,o):a(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o}([h("design:paramtypes",[n.l,l,r,n.h])],t),t})();class p{constructor(t,e,i,n,a){this._dragDropService=e,this._config=i,this._Component=n,this._cdr=a,this._elem=t.nativeElement,this._Component.setDragHandle(this._elem)}}var b=function(t,e,i,n){var a,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(o=(s<3?a(o):s>3?a(e,i,o):a(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o},f=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let m=(()=>{let t=class extends u{constructor(t,e,i,a){super(t,e,i,a),this.onDragStart=new n.o,this.onDragEnd=new n.o,this.onDragSuccessCallback=new n.o,this._defaultCursor=this._elem.style.cursor,this.dragEnabled=!0}set draggable(t){this.dragEnabled=!!t}set dropzones(t){this.dropZones=t}set effectallowed(t){this.effectAllowed=t}set effectcursor(t){this.effectCursor=t}_onDragStartCallback(t){this._dragDropService.isDragged=!0,this._dragDropService.dragData=this.dragData,this._dragDropService.onDragSuccessCallback=this.onDragSuccessCallback,this._elem.classList.add(this._config.onDragStartClass),this.onDragStart.emit({dragData:this.dragData,mouseEvent:t})}_onDragEndCallback(t){this._dragDropService.isDragged=!1,this._dragDropService.dragData=null,this._dragDropService.onDragSuccessCallback=null,this._elem.classList.remove(this._config.onDragStartClass),this.onDragEnd.emit({dragData:this.dragData,mouseEvent:t})}};return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(l),n.Qb(r),n.Qb(n.h))},t.\u0275dir=n.Lb({type:t,selectors:[["","dnd-draggable",""]],inputs:{draggable:["dragEnabled","draggable"],dropzones:["dropZones","dropzones"],effectallowed:["effectAllowed","effectallowed"],effectcursor:["effectCursor","effectcursor"],dragData:"dragData",dragImage:"dragImage",cloneItem:"cloneItem"},outputs:{onDragStart:"onDragStart",onDragEnd:"onDragEnd",onDragSuccessCallback:"onDragSuccess"},features:[n.Ab]}),b([Object(n.u)("dragEnabled"),f("design:type",Boolean),f("design:paramtypes",[Boolean])],t.prototype,"draggable",null),b([Object(n.E)(),f("design:type",n.o)],t.prototype,"onDragStart",void 0),b([Object(n.E)(),f("design:type",n.o)],t.prototype,"onDragEnd",void 0),b([Object(n.u)(),f("design:type",Object)],t.prototype,"dragData",void 0),b([Object(n.E)("onDragSuccess"),f("design:type",n.o)],t.prototype,"onDragSuccessCallback",void 0),b([Object(n.u)("dropZones"),f("design:type",Array),f("design:paramtypes",[Array])],t.prototype,"dropzones",null),b([Object(n.u)("effectAllowed"),f("design:type",String),f("design:paramtypes",[String])],t.prototype,"effectallowed",null),b([Object(n.u)("effectCursor"),f("design:type",String),f("design:paramtypes",[String])],t.prototype,"effectcursor",null),b([Object(n.u)(),f("design:type",Object)],t.prototype,"dragImage",void 0),b([Object(n.u)(),f("design:type",Boolean)],t.prototype,"cloneItem",void 0),t=b([f("design:paramtypes",[n.l,l,r,n.h])],t),t})(),g=(()=>{let t=class extends p{constructor(t,e,i,n,a){super(t,e,i,n,a)}};return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(l),n.Qb(r),n.Qb(m),n.Qb(n.h))},t.\u0275dir=n.Lb({type:t,selectors:[["","dnd-draggable-handle",""]],features:[n.Ab]}),t=b([f("design:paramtypes",[n.l,l,r,m,n.h])],t),t})();var v=function(t,e,i,n){var a,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(o=(s<3?a(o):s>3?a(e,i,o):a(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o},_=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let y=(()=>{let t=class extends u{constructor(t,e,i,a){super(t,e,i,a),this.onDropSuccess=new n.o,this.onDragEnter=new n.o,this.onDragOver=new n.o,this.onDragLeave=new n.o,this.dropEnabled=!0}set droppable(t){this.dropEnabled=!!t}set allowdrop(t){this.allowDrop=t}set dropzones(t){this.dropZones=t}set effectallowed(t){this.effectAllowed=t}set effectcursor(t){this.effectCursor=t}_onDragEnterCallback(t){this._dragDropService.isDragged&&(this._elem.classList.add(this._config.onDragEnterClass),this.onDragEnter.emit({dragData:this._dragDropService.dragData,mouseEvent:t}))}_onDragOverCallback(t){this._dragDropService.isDragged&&(this._elem.classList.add(this._config.onDragOverClass),this.onDragOver.emit({dragData:this._dragDropService.dragData,mouseEvent:t}))}_onDragLeaveCallback(t){this._dragDropService.isDragged&&(this._elem.classList.remove(this._config.onDragOverClass),this._elem.classList.remove(this._config.onDragEnterClass),this.onDragLeave.emit({dragData:this._dragDropService.dragData,mouseEvent:t}))}_onDropCallback(t){let e=t.dataTransfer;(this._dragDropService.isDragged||e&&e.files)&&(this.onDropSuccess.emit({dragData:this._dragDropService.dragData,mouseEvent:t}),this._dragDropService.onDragSuccessCallback&&this._dragDropService.onDragSuccessCallback.emit({dragData:this._dragDropService.dragData,mouseEvent:t}),this._elem.classList.remove(this._config.onDragOverClass),this._elem.classList.remove(this._config.onDragEnterClass))}};return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(l),n.Qb(r),n.Qb(n.h))},t.\u0275dir=n.Lb({type:t,selectors:[["","dnd-droppable",""]],inputs:{droppable:["dropEnabled","droppable"],allowdrop:["allowDrop","allowdrop"],dropzones:["dropZones","dropzones"],effectallowed:["effectAllowed","effectallowed"],effectcursor:["effectCursor","effectcursor"]},outputs:{onDropSuccess:"onDropSuccess",onDragEnter:"onDragEnter",onDragOver:"onDragOver",onDragLeave:"onDragLeave"},features:[n.Ab]}),v([Object(n.u)("dropEnabled"),_("design:type",Boolean),_("design:paramtypes",[Boolean])],t.prototype,"droppable",null),v([Object(n.E)(),_("design:type",n.o)],t.prototype,"onDropSuccess",void 0),v([Object(n.E)(),_("design:type",n.o)],t.prototype,"onDragEnter",void 0),v([Object(n.E)(),_("design:type",n.o)],t.prototype,"onDragOver",void 0),v([Object(n.E)(),_("design:type",n.o)],t.prototype,"onDragLeave",void 0),v([Object(n.u)("allowDrop"),_("design:type",Function),_("design:paramtypes",[Function])],t.prototype,"allowdrop",null),v([Object(n.u)("dropZones"),_("design:type",Array),_("design:paramtypes",[Array])],t.prototype,"dropzones",null),v([Object(n.u)("effectAllowed"),_("design:type",String),_("design:paramtypes",[String])],t.prototype,"effectallowed",null),v([Object(n.u)("effectCursor"),_("design:type",String),_("design:paramtypes",[String])],t.prototype,"effectcursor",null),t=v([_("design:paramtypes",[n.l,l,r,n.h])],t),t})();var x=function(t,e,i,n){var a,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(o=(s<3?a(o):s>3?a(e,i,o):a(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o},C=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let O=(()=>{let t=class extends u{constructor(t,e,i,n,a){super(t,e,i,n),this._sortableDataService=a,this._sortableData=[],this.dragEnabled=!1}set draggable(t){this.dragEnabled=!!t}set sortableData(t){this._sortableData=t,this.sortableHandler=t instanceof a.f?new w:new D,this.dropEnabled=!!this._sortableData}get sortableData(){return this._sortableData}set dropzones(t){this.dropZones=t}_onDragEnterCallback(t){if(this._sortableDataService.isDragged){let t=this._sortableDataService.sortableContainer.getItemAt(this._sortableDataService.index);-1===this.indexOf(t)&&(this._sortableDataService.sortableContainer.removeItemAt(this._sortableDataService.index),0===this._sortableDataService.sortableContainer._sortableData.length&&(this._sortableDataService.sortableContainer.dropEnabled=!0),this.insertItemAt(t,0),this._sortableDataService.sortableContainer=this,this._sortableDataService.index=0),this.detectChanges()}}getItemAt(t){return this.sortableHandler.getItemAt(this._sortableData,t)}indexOf(t){return this.sortableHandler.indexOf(this._sortableData,t)}removeItemAt(t){this.sortableHandler.removeItemAt(this._sortableData,t)}insertItemAt(t,e){this.sortableHandler.insertItemAt(this._sortableData,t,e)}};return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(l),n.Qb(r),n.Qb(n.h),n.Qb(d))},t.\u0275dir=n.Lb({type:t,selectors:[["","dnd-sortable-container",""]],inputs:{draggable:["dragEnabled","draggable"],sortableData:"sortableData",dropzones:["dropZones","dropzones"]},features:[n.Ab]}),x([Object(n.u)("dragEnabled"),C("design:type",Boolean),C("design:paramtypes",[Boolean])],t.prototype,"draggable",null),x([Object(n.u)(),C("design:type",Object),C("design:paramtypes",[Object])],t.prototype,"sortableData",null),x([Object(n.u)("dropZones"),C("design:type",Array),C("design:paramtypes",[Array])],t.prototype,"dropzones",null),t=x([C("design:paramtypes",[n.l,l,r,n.h,d])],t),t})();class D{getItemAt(t,e){return t[e]}indexOf(t,e){return t.indexOf(e)}removeItemAt(t,e){t.splice(e,1)}insertItemAt(t,e,i){t.splice(i,0,e)}}class w{getItemAt(t,e){return t.at(e)}indexOf(t,e){return t.controls.indexOf(e)}removeItemAt(t,e){t.removeAt(e)}insertItemAt(t,e,i){t.insert(i,e)}}let M=(()=>{let t=class extends u{constructor(t,e,i,a,s,o){super(t,e,i,o),this._sortableContainer=a,this._sortableDataService=s,this.onDragSuccessCallback=new n.o,this.onDragStartCallback=new n.o,this.onDragOverCallback=new n.o,this.onDragEndCallback=new n.o,this.onDropSuccessCallback=new n.o,this.dropZones=this._sortableContainer.dropZones,this.dragEnabled=!0,this.dropEnabled=!0}set draggable(t){this.dragEnabled=!!t}set droppable(t){this.dropEnabled=!!t}set effectallowed(t){this.effectAllowed=t}set effectcursor(t){this.effectCursor=t}_onDragStartCallback(t){this._sortableDataService.isDragged=!0,this._sortableDataService.sortableContainer=this._sortableContainer,this._sortableDataService.index=this.index,this._sortableDataService.markSortable(this._elem),this._dragDropService.isDragged=!0,this._dragDropService.dragData=this.dragData,this._dragDropService.onDragSuccessCallback=this.onDragSuccessCallback,this.onDragStartCallback.emit(this._dragDropService.dragData)}_onDragOverCallback(t){this._sortableDataService.isDragged&&this._elem!==this._sortableDataService.elem&&(this._sortableDataService.sortableContainer=this._sortableContainer,this._sortableDataService.index=this.index,this._sortableDataService.markSortable(this._elem),this.onDragOverCallback.emit(this._dragDropService.dragData))}_onDragEndCallback(t){this._sortableDataService.isDragged=!1,this._sortableDataService.sortableContainer=null,this._sortableDataService.index=null,this._sortableDataService.markSortable(null),this._dragDropService.isDragged=!1,this._dragDropService.dragData=null,this._dragDropService.onDragSuccessCallback=null,this.onDragEndCallback.emit(this._dragDropService.dragData)}_onDragEnterCallback(t){if(this._sortableDataService.isDragged&&(this._sortableDataService.markSortable(this._elem),this.index!==this._sortableDataService.index||this._sortableDataService.sortableContainer.sortableData!==this._sortableContainer.sortableData)){let t=this._sortableDataService.sortableContainer.getItemAt(this._sortableDataService.index);this._sortableDataService.sortableContainer.removeItemAt(this._sortableDataService.index),0===this._sortableDataService.sortableContainer.sortableData.length&&(this._sortableDataService.sortableContainer.dropEnabled=!0),this._sortableContainer.insertItemAt(t,this.index),this._sortableContainer.dropEnabled&&(this._sortableContainer.dropEnabled=!1),this._sortableDataService.sortableContainer=this._sortableContainer,this._sortableDataService.index=this.index,this.detectChanges()}}_onDropCallback(t){this._sortableDataService.isDragged&&(this.onDropSuccessCallback.emit(this._dragDropService.dragData),this._dragDropService.onDragSuccessCallback&&this._dragDropService.onDragSuccessCallback.emit(this._dragDropService.dragData),this._sortableContainer.detectChanges())}};return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(l),n.Qb(r),n.Qb(O),n.Qb(d),n.Qb(n.h))},t.\u0275dir=n.Lb({type:t,selectors:[["","dnd-sortable",""]],inputs:{draggable:["dragEnabled","draggable"],droppable:["dropEnabled","droppable"],effectallowed:["effectAllowed","effectallowed"],effectcursor:["effectCursor","effectcursor"],index:["sortableIndex","index"],dragData:"dragData"},outputs:{onDragSuccessCallback:"onDragSuccess",onDragStartCallback:"onDragStart",onDragOverCallback:"onDragOver",onDragEndCallback:"onDragEnd",onDropSuccessCallback:"onDropSuccess"},features:[n.Ab]}),x([Object(n.u)("sortableIndex"),C("design:type",Number)],t.prototype,"index",void 0),x([Object(n.u)("dragEnabled"),C("design:type",Boolean),C("design:paramtypes",[Boolean])],t.prototype,"draggable",null),x([Object(n.u)("dropEnabled"),C("design:type",Boolean),C("design:paramtypes",[Boolean])],t.prototype,"droppable",null),x([Object(n.u)(),C("design:type",Object)],t.prototype,"dragData",void 0),x([Object(n.u)("effectAllowed"),C("design:type",String),C("design:paramtypes",[String])],t.prototype,"effectallowed",null),x([Object(n.u)("effectCursor"),C("design:type",String),C("design:paramtypes",[String])],t.prototype,"effectcursor",null),x([Object(n.E)("onDragSuccess"),C("design:type",n.o)],t.prototype,"onDragSuccessCallback",void 0),x([Object(n.E)("onDragStart"),C("design:type",n.o)],t.prototype,"onDragStartCallback",void 0),x([Object(n.E)("onDragOver"),C("design:type",n.o)],t.prototype,"onDragOverCallback",void 0),x([Object(n.E)("onDragEnd"),C("design:type",n.o)],t.prototype,"onDragEndCallback",void 0),x([Object(n.E)("onDropSuccess"),C("design:type",n.o)],t.prototype,"onDropSuccessCallback",void 0),t=x([C("design:paramtypes",[n.l,l,r,O,d,n.h])],t),t})(),k=(()=>{let t=class extends p{constructor(t,e,i,n,a){super(t,e,i,n,a)}};return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(l),n.Qb(r),n.Qb(M),n.Qb(n.h))},t.\u0275dir=n.Lb({type:t,selectors:[["","dnd-sortable-handle",""]],features:[n.Ab]}),t=x([C("design:paramtypes",[n.l,l,r,M,n.h])],t),t})(),S=[r,{provide:l,useFactory:function(){return new l}},{provide:d,useFactory:function(t){return new d(t)},deps:[r]}],I=(()=>{let t=P=class{static forRoot(){return{ngModule:P,providers:S}}};return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)}}),t})();var P},lJxs:function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var n=i("7o/Q");function a(t,e){return function(i){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return i.lift(new s(t,e))}}class s{constructor(t,e){this.project=t,this.thisArg=e}call(t,e){return e.subscribe(new o(t,this.project,this.thisArg))}}class o extends n.a{constructor(t,e,i){super(t),this.project=e,this.count=0,this.thisArg=i||this}_next(t){let e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(i){return void this.destination.error(i)}this.destination.next(e)}}},lRFz:function(module,exports,__webpack_require__){var factory;factory=function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var a=e[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,i),a.l=!0,a.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)i.d(n,a,(function(e){return t[e]}).bind(null,a));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=0)}([function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addLinkAttributes",{enumerable:!0,get:function(){return n.addLinkAttributes}}),Object.defineProperty(e,"getFilenameFromUrl",{enumerable:!0,get:function(){return n.getFilenameFromUrl}}),Object.defineProperty(e,"LinkTarget",{enumerable:!0,get:function(){return n.LinkTarget}}),Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return n.loadScript}}),Object.defineProperty(e,"PDFDateString",{enumerable:!0,get:function(){return n.PDFDateString}}),Object.defineProperty(e,"RenderingCancelledException",{enumerable:!0,get:function(){return n.RenderingCancelledException}}),Object.defineProperty(e,"build",{enumerable:!0,get:function(){return a.build}}),Object.defineProperty(e,"getDocument",{enumerable:!0,get:function(){return a.getDocument}}),Object.defineProperty(e,"LoopbackPort",{enumerable:!0,get:function(){return a.LoopbackPort}}),Object.defineProperty(e,"PDFDataRangeTransport",{enumerable:!0,get:function(){return a.PDFDataRangeTransport}}),Object.defineProperty(e,"PDFWorker",{enumerable:!0,get:function(){return a.PDFWorker}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return a.version}}),Object.defineProperty(e,"CMapCompressionType",{enumerable:!0,get:function(){return s.CMapCompressionType}}),Object.defineProperty(e,"createObjectURL",{enumerable:!0,get:function(){return s.createObjectURL}}),Object.defineProperty(e,"createPromiseCapability",{enumerable:!0,get:function(){return s.createPromiseCapability}}),Object.defineProperty(e,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return s.createValidAbsoluteUrl}}),Object.defineProperty(e,"InvalidPDFException",{enumerable:!0,get:function(){return s.InvalidPDFException}}),Object.defineProperty(e,"MissingPDFException",{enumerable:!0,get:function(){return s.MissingPDFException}}),Object.defineProperty(e,"OPS",{enumerable:!0,get:function(){return s.OPS}}),Object.defineProperty(e,"PasswordResponses",{enumerable:!0,get:function(){return s.PasswordResponses}}),Object.defineProperty(e,"PermissionFlag",{enumerable:!0,get:function(){return s.PermissionFlag}}),Object.defineProperty(e,"removeNullCharacters",{enumerable:!0,get:function(){return s.removeNullCharacters}}),Object.defineProperty(e,"shadow",{enumerable:!0,get:function(){return s.shadow}}),Object.defineProperty(e,"UnexpectedResponseException",{enumerable:!0,get:function(){return s.UnexpectedResponseException}}),Object.defineProperty(e,"UNSUPPORTED_FEATURES",{enumerable:!0,get:function(){return s.UNSUPPORTED_FEATURES}}),Object.defineProperty(e,"Util",{enumerable:!0,get:function(){return s.Util}}),Object.defineProperty(e,"VerbosityLevel",{enumerable:!0,get:function(){return s.VerbosityLevel}}),Object.defineProperty(e,"AnnotationLayer",{enumerable:!0,get:function(){return o.AnnotationLayer}}),Object.defineProperty(e,"apiCompatibilityParams",{enumerable:!0,get:function(){return r.apiCompatibilityParams}}),Object.defineProperty(e,"GlobalWorkerOptions",{enumerable:!0,get:function(){return c.GlobalWorkerOptions}}),Object.defineProperty(e,"renderTextLayer",{enumerable:!0,get:function(){return l.renderTextLayer}}),Object.defineProperty(e,"SVGGraphics",{enumerable:!0,get:function(){return d.SVGGraphics}});var n=i(1),a=i(5),s=i(2),o=i(16),r=i(7),c=i(10),l=i(17),d=i(18);{const{isNodeJS:t}=i(4);if(t){const t=i(19).PDFNodeStream;(0,a.setPDFNetworkStreamFactory)(e=>new t(e))}else{const t=i(22).PDFNetworkStream;let e;(0,n.isFetchSupported)()&&(e=i(23).PDFFetchStream),(0,a.setPDFNetworkStreamFactory)(i=>e&&(0,n.isValidFetchUrl)(i.url)?new e(i):new t(i))}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addLinkAttributes=function(t,{url:e,target:i,rel:a,enabled:s=!0}={}){(0,n.assert)(e&&"string"==typeof e,'addLinkAttributes: A valid "url" parameter must provided.');const r=(0,n.removeNullCharacters)(e);s?t.href=t.title=r:(t.href="",t.title="Disabled: "+r,t.onclick=()=>!1);let c="";switch(i){case o.NONE:break;case o.SELF:c="_self";break;case o.BLANK:c="_blank";break;case o.PARENT:c="_parent";break;case o.TOP:c="_top"}t.target=c,t.rel="string"==typeof a?a:"noopener noreferrer nofollow"},e.getFilenameFromUrl=function(t){const e=t.indexOf("#"),i=t.indexOf("?"),n=Math.min(e>0?e:t.length,i>0?i:t.length);return t.substring(t.lastIndexOf("/",n)+1,n)},e.isFetchSupported=r,e.isValidFetchUrl=c,e.loadScript=function(t){return new Promise((e,i)=>{const n=document.createElement("script");n.src=t,n.onload=e,n.onerror=function(){i(new Error("Cannot load script at: "+n.src))},(document.head||document.documentElement).appendChild(n)})},e.deprecated=function(t){console.log("Deprecated API usage: "+t)},e.PDFDateString=e.StatTimer=e.DOMSVGFactory=e.DOMCMapReaderFactory=e.DOMCanvasFactory=e.DEFAULT_LINK_REL=e.LinkTarget=e.RenderingCancelledException=e.PageViewport=void 0;var n=i(2);e.DEFAULT_LINK_REL="noopener noreferrer nofollow";const a="http://www.w3.org/2000/svg";e.DOMCanvasFactory=class{create(t,e){if(t<=0||e<=0)throw new Error("Invalid canvas size");const i=document.createElement("canvas"),n=i.getContext("2d");return i.width=t,i.height=e,{canvas:i,context:n}}reset(t,e,i){if(!t.canvas)throw new Error("Canvas is not specified");if(e<=0||i<=0)throw new Error("Invalid canvas size");t.canvas.width=e,t.canvas.height=i}destroy(t){if(!t.canvas)throw new Error("Canvas is not specified");t.canvas.width=0,t.canvas.height=0,t.canvas=null,t.context=null}},e.DOMCMapReaderFactory=class{constructor({baseUrl:t=null,isCompressed:e=!1}){this.baseUrl=t,this.isCompressed=e}async fetch({name:t}){if(!this.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!t)throw new Error("CMap name must be specified.");const e=this.baseUrl+t+(this.isCompressed?".bcmap":""),i=this.isCompressed?n.CMapCompressionType.BINARY:n.CMapCompressionType.NONE;return r()&&c(e,document.baseURI)?fetch(e).then(async t=>{if(!t.ok)throw new Error(t.statusText);let e;return e=this.isCompressed?new Uint8Array(await t.arrayBuffer()):(0,n.stringToBytes)(await t.text()),{cMapData:e,compressionType:i}}).catch(t=>{throw new Error("Unable to load "+(this.isCompressed?"binary ":"")+"CMap at: "+e)}):new Promise((t,a)=>{const s=new XMLHttpRequest;s.open("GET",e,!0),this.isCompressed&&(s.responseType="arraybuffer"),s.onreadystatechange=()=>{if(s.readyState===XMLHttpRequest.DONE){if(200===s.status||0===s.status){let e;if(this.isCompressed&&s.response?e=new Uint8Array(s.response):!this.isCompressed&&s.responseText&&(e=(0,n.stringToBytes)(s.responseText)),e)return void t({cMapData:e,compressionType:i})}a(new Error(s.statusText))}},s.send(null)}).catch(t=>{throw new Error("Unable to load "+(this.isCompressed?"binary ":"")+"CMap at: "+e)})}},e.DOMSVGFactory=class{create(t,e){(0,n.assert)(t>0&&e>0,"Invalid SVG dimensions");const i=document.createElementNS(a,"svg:svg");return i.setAttribute("version","1.1"),i.setAttribute("width",t+"px"),i.setAttribute("height",e+"px"),i.setAttribute("preserveAspectRatio","none"),i.setAttribute("viewBox","0 0 "+t+" "+e),i}createElement(t){return(0,n.assert)("string"==typeof t,"Invalid SVG element type"),document.createElementNS(a,t)}};class s{constructor({viewBox:t,scale:e,rotation:i,offsetX:n=0,offsetY:a=0,dontFlip:s=!1}){this.viewBox=t,this.scale=e,this.rotation=i,this.offsetX=n,this.offsetY=a;const o=(t[2]+t[0])/2,r=(t[3]+t[1])/2;let c,l,d,h,u,p,b,f;switch(i=(i%=360)<0?i+360:i){case 180:c=-1,l=0,d=0,h=1;break;case 90:c=0,l=1,d=1,h=0;break;case 270:c=0,l=-1,d=-1,h=0;break;case 0:c=1,l=0,d=0,h=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}s&&(d=-d,h=-h),0===c?(u=Math.abs(r-t[1])*e+n,p=Math.abs(o-t[0])*e+a,b=Math.abs(t[3]-t[1])*e,f=Math.abs(t[2]-t[0])*e):(u=Math.abs(o-t[0])*e+n,p=Math.abs(r-t[1])*e+a,b=Math.abs(t[2]-t[0])*e,f=Math.abs(t[3]-t[1])*e),this.transform=[c*e,l*e,d*e,h*e,u-c*e*o-d*e*r,p-l*e*o-h*e*r],this.width=b,this.height=f}clone({scale:t=this.scale,rotation:e=this.rotation,offsetX:i=this.offsetX,offsetY:n=this.offsetY,dontFlip:a=!1}={}){return new s({viewBox:this.viewBox.slice(),scale:t,rotation:e,offsetX:i,offsetY:n,dontFlip:a})}convertToViewportPoint(t,e){return n.Util.applyTransform([t,e],this.transform)}convertToViewportRectangle(t){const e=n.Util.applyTransform([t[0],t[1]],this.transform),i=n.Util.applyTransform([t[2],t[3]],this.transform);return[e[0],e[1],i[0],i[1]]}convertToPdfPoint(t,e){return n.Util.applyInverseTransform([t,e],this.transform)}}e.PageViewport=s,e.RenderingCancelledException=class extends n.BaseException{constructor(t,e){super(t),this.type=e}};const o={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};function r(){return"undefined"!=typeof fetch&&"undefined"!=typeof Response&&"body"in Response.prototype&&"undefined"!=typeof ReadableStream}function c(t,e){try{const{protocol:i}=e?new URL(t,e):new URL(t);return"http:"===i||"https:"===i}catch(i){return!1}}let l;e.LinkTarget=o,e.StatTimer=class{constructor(){this.started=Object.create(null),this.times=[]}time(t){t in this.started&&(0,n.warn)("Timer is already running for "+t),this.started[t]=Date.now()}timeEnd(t){t in this.started||(0,n.warn)("Timer has not been started for "+t),this.times.push({name:t,start:this.started[t],end:Date.now()}),delete this.started[t]}toString(){const t=[];let e=0;for(const i of this.times){const t=i.name;t.length>e&&(e=t.length)}for(const i of this.times){const n=i.end-i.start;t.push(`${i.name.padEnd(e)} ${n}ms\n`)}return t.join("")}},e.PDFDateString=class{static toDateObject(t){if(!t||!(0,n.isString)(t))return null;l||(l=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const e=l.exec(t);if(!e)return null;const i=parseInt(e[1],10);let a=parseInt(e[2],10);a=a>=1&&a<=12?a-1:0;let s=parseInt(e[3],10);s=s>=1&&s<=31?s:1;let o=parseInt(e[4],10);o=o>=0&&o<=23?o:0;let r=parseInt(e[5],10);r=r>=0&&r<=59?r:0;let c=parseInt(e[6],10);c=c>=0&&c<=59?c:0;const d=e[7]||"Z";let h=parseInt(e[8],10);h=h>=0&&h<=23?h:0;let u=parseInt(e[9],10)||0;return u=u>=0&&u<=59?u:0,"-"===d?(o+=h,r+=u):"+"===d&&(o-=h,r-=u),new Date(Date.UTC(i,a,s,o,r,c))}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.arrayByteLength=u,e.arraysToBytes=function(t){const e=t.length;if(1===e&&t[0]instanceof Uint8Array)return t[0];let i=0;for(let s=0;s<e;s++)i+=u(t[s]);let n=0;const a=new Uint8Array(i);for(let s=0;s<e;s++){let e=t[s];e instanceof Uint8Array||(e="string"==typeof e?h(e):new Uint8Array(e));const i=e.byteLength;a.set(e,n),n+=i}return a},e.assert=r,e.bytesToString=function(t){r(null!==t&&"object"==typeof t&&void 0!==t.length,"Invalid argument for bytesToString");const e=t.length;if(e<8192)return String.fromCharCode.apply(null,t);const i=[];for(let n=0;n<e;n+=8192){const a=Math.min(n+8192,e),s=t.subarray(n,a);i.push(String.fromCharCode.apply(null,s))}return i.join("")},e.createPromiseCapability=function(){const t=Object.create(null);let e=!1;return Object.defineProperty(t,"settled",{get:()=>e}),t.promise=new Promise((function(i,n){t.resolve=function(t){e=!0,i(t)},t.reject=function(t){e=!0,n(t)}})),t},e.getVerbosityLevel=function(){return a},e.info=function(t){a>=n.INFOS&&console.log("Info: "+t)},e.isArrayBuffer=function(t){return"object"==typeof t&&null!==t&&void 0!==t.byteLength},e.isArrayEqual=function(t,e){return t.length===e.length&&t.every((function(t,i){return t===e[i]}))},e.isBool=function(t){return"boolean"==typeof t},e.isEmptyObj=function(t){for(const e in t)return!1;return!0},e.isNum=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSameOrigin=function(t,e){let i;try{if(i=new URL(t),!i.origin||"null"===i.origin)return!1}catch(a){return!1}const n=new URL(e,i);return i.origin===n.origin},e.createValidAbsoluteUrl=function(t,e){if(!t)return null;try{const i=e?new URL(t,e):new URL(t);if(function(t){if(!t)return!1;switch(t.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(i))return i}catch(i){}return null},e.removeNullCharacters=function(t){return"string"!=typeof t?(s("The argument for removeNullCharacters must be a string."),t):t.replace(d,"")},e.setVerbosityLevel=function(t){Number.isInteger(t)&&(a=t)},e.shadow=c,e.string32=function(t){return String.fromCharCode(t>>24&255,t>>16&255,t>>8&255,255&t)},e.stringToBytes=h,e.stringToPDFString=function(t){const e=t.length,i=[];if("\xfe"===t[0]&&"\xff"===t[1])for(let n=2;n<e;n+=2)i.push(String.fromCharCode(t.charCodeAt(n)<<8|t.charCodeAt(n+1)));else if("\xff"===t[0]&&"\xfe"===t[1])for(let n=2;n<e;n+=2)i.push(String.fromCharCode(t.charCodeAt(n+1)<<8|t.charCodeAt(n)));else for(let n=0;n<e;++n){const e=f[t.charCodeAt(n)];i.push(e?String.fromCharCode(e):t.charAt(n))}return i.join("")},e.stringToUTF8String=function(t){return decodeURIComponent(escape(t))},e.utf8StringToString=function(t){return unescape(encodeURIComponent(t))},e.warn=s,e.unreachable=o,e.IsEvalSupportedCached=e.IsLittleEndianCached=e.createObjectURL=e.FormatError=e.Util=e.UnknownErrorException=e.UnexpectedResponseException=e.TextRenderingMode=e.StreamType=e.PermissionFlag=e.PasswordResponses=e.PasswordException=e.MissingPDFException=e.InvalidPDFException=e.AbortException=e.CMapCompressionType=e.ImageKind=e.FontType=e.AnnotationType=e.AnnotationStateModelType=e.AnnotationReviewState=e.AnnotationReplyType=e.AnnotationMarkedState=e.AnnotationFlag=e.AnnotationFieldFlag=e.AnnotationBorderStyleType=e.UNSUPPORTED_FEATURES=e.VerbosityLevel=e.OPS=e.IDENTITY_MATRIX=e.FONT_IDENTITY_MATRIX=e.BaseException=void 0,i(3),e.IDENTITY_MATRIX=[1,0,0,1,0,0],e.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],e.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},e.TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},e.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},e.AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},e.AnnotationStateModelType={MARKED:"Marked",REVIEW:"Review"},e.AnnotationMarkedState={MARKED:"Marked",UNMARKED:"Unmarked"},e.AnnotationReviewState={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"},e.AnnotationReplyType={GROUP:"Group",REPLY:"R"},e.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},e.AnnotationFieldFlag={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864},e.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},e.StreamType={UNKNOWN:"UNKNOWN",FLATE:"FLATE",LZW:"LZW",DCT:"DCT",JPX:"JPX",JBIG:"JBIG",A85:"A85",AHX:"AHX",CCF:"CCF",RLX:"RLX"},e.FontType={UNKNOWN:"UNKNOWN",TYPE1:"TYPE1",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"};const n={ERRORS:0,WARNINGS:1,INFOS:5};e.VerbosityLevel=n,e.CMapCompressionType={NONE:0,BINARY:1,STREAM:2},e.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},e.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font",errorTilingPattern:"errorTilingPattern",errorExtGState:"errorExtGState",errorXObject:"errorXObject",errorFontLoadType3:"errorFontLoadType3",errorFontState:"errorFontState",errorFontMissing:"errorFontMissing",errorFontTranslate:"errorFontTranslate",errorColorSpace:"errorColorSpace",errorOperatorList:"errorOperatorList",errorFontToUnicode:"errorFontToUnicode",errorFontLoadNative:"errorFontLoadNative",errorFontGetPath:"errorFontGetPath"},e.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let a=n.WARNINGS;function s(t){a>=n.WARNINGS&&console.log("Warning: "+t)}function o(t){throw new Error(t)}function r(t,e){t||o(e)}function c(t,e,i){return Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!1}),i}const l=function(){function t(e){this.constructor===t&&o("Cannot initialize BaseException."),this.message=e,this.name=this.constructor.name}return t.prototype=new Error,t.constructor=t,t}();e.BaseException=l,e.PasswordException=class extends l{constructor(t,e){super(t),this.code=e}},e.UnknownErrorException=class extends l{constructor(t,e){super(t),this.details=e}},e.InvalidPDFException=class extends l{},e.MissingPDFException=class extends l{},e.UnexpectedResponseException=class extends l{constructor(t,e){super(t),this.status=e}},e.FormatError=class extends l{},e.AbortException=class extends l{};const d=/\x00/g;function h(t){r("string"==typeof t,"Invalid argument for stringToBytes");const e=t.length,i=new Uint8Array(e);for(let n=0;n<e;++n)i[n]=255&t.charCodeAt(n);return i}function u(t){return void 0!==t.length?t.length:(r(void 0!==t.byteLength,"arrayByteLength - invalid argument."),t.byteLength)}e.IsLittleEndianCached={get value(){return c(this,"value",function(){const t=new Uint8Array(4);return t[0]=1,1===new Uint32Array(t.buffer,0,1)[0]}())}},e.IsEvalSupportedCached={get value(){return c(this,"value",function(){try{return new Function(""),!0}catch(t){return!1}}())}};const p=["rgb(",0,",",0,",",0,")"];class b{static makeCssRgb(t,e,i){return p[1]=t,p[3]=e,p[5]=i,p.join("")}static transform(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}static applyTransform(t,e){return[t[0]*e[0]+t[1]*e[2]+e[4],t[0]*e[1]+t[1]*e[3]+e[5]]}static applyInverseTransform(t,e){const i=e[0]*e[3]-e[1]*e[2];return[(t[0]*e[3]-t[1]*e[2]+e[2]*e[5]-e[4]*e[3])/i,(-t[0]*e[1]+t[1]*e[0]+e[4]*e[1]-e[5]*e[0])/i]}static getAxialAlignedBoundingBox(t,e){const i=b.applyTransform(t,e),n=b.applyTransform(t.slice(2,4),e),a=b.applyTransform([t[0],t[3]],e),s=b.applyTransform([t[2],t[1]],e);return[Math.min(i[0],n[0],a[0],s[0]),Math.min(i[1],n[1],a[1],s[1]),Math.max(i[0],n[0],a[0],s[0]),Math.max(i[1],n[1],a[1],s[1])]}static inverseTransform(t){const e=t[0]*t[3]-t[1]*t[2];return[t[3]/e,-t[1]/e,-t[2]/e,t[0]/e,(t[2]*t[5]-t[4]*t[3])/e,(t[4]*t[1]-t[5]*t[0])/e]}static apply3dTransform(t,e){return[t[0]*e[0]+t[1]*e[1]+t[2]*e[2],t[3]*e[0]+t[4]*e[1]+t[5]*e[2],t[6]*e[0]+t[7]*e[1]+t[8]*e[2]]}static singularValueDecompose2dScale(t){const e=[t[0],t[2],t[1],t[3]],i=t[0]*e[0]+t[1]*e[2],n=t[2]*e[1]+t[3]*e[3],a=(i+n)/2,s=Math.sqrt((i+n)*(i+n)-4*(i*n-(t[2]*e[0]+t[3]*e[2])*(t[0]*e[1]+t[1]*e[3])))/2,o=a-s||1;return[Math.sqrt(a+s||1),Math.sqrt(o)]}static normalizeRect(t){const e=t.slice(0);return t[0]>t[2]&&(e[0]=t[2],e[2]=t[0]),t[1]>t[3]&&(e[1]=t[3],e[3]=t[1]),e}static intersect(t,e){function i(t,e){return t-e}const n=[t[0],t[2],e[0],e[2]].sort(i),a=[t[1],t[3],e[1],e[3]].sort(i),s=[];return t=b.normalizeRect(t),e=b.normalizeRect(e),n[0]===t[0]&&n[1]===e[0]||n[0]===e[0]&&n[1]===t[0]?(s[0]=n[1],s[2]=n[2],a[0]===t[1]&&a[1]===e[1]||a[0]===e[1]&&a[1]===t[1]?(s[1]=a[1],s[3]=a[2],s):null):null}}e.Util=b;const f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364],m=function(){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return function(e,i,n=!1){if(!n&&URL.createObjectURL){const t=new Blob([e],{type:i});return URL.createObjectURL(t)}let a=`data:${i};base64,`;for(let s=0,o=e.length;s<o;s+=3){const i=255&e[s],n=255&e[s+1],r=255&e[s+2];a+=t[i>>2]+t[(3&i)<<4|n>>4]+t[s+1<o?(15&n)<<2|r>>6:64]+t[s+2<o?63&r:64]}return a}}();e.createObjectURL=m},function(t,e,i){"use strict";i(4)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isNodeJS=void 0;const n="object"==typeof process&&process+""=="[object process]"&&!process.versions.nw&&!process.versions.electron;e.isNodeJS=n},function(module,exports,__w_pdfjs_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getDocument=getDocument,exports.setPDFNetworkStreamFactory=setPDFNetworkStreamFactory,exports.build=exports.version=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFWorker=exports.PDFDataRangeTransport=exports.LoopbackPort=void 0;var _util=__w_pdfjs_require__(2),_display_utils=__w_pdfjs_require__(1),_font_loader=__w_pdfjs_require__(6),_api_compatibility=__w_pdfjs_require__(7),_canvas=__w_pdfjs_require__(8),_worker_options=__w_pdfjs_require__(10),_is_node=__w_pdfjs_require__(4),_message_handler=__w_pdfjs_require__(11),_metadata=__w_pdfjs_require__(12),_transport_stream=__w_pdfjs_require__(14),_webgl=__w_pdfjs_require__(15);const DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100;let createPDFNetworkStream;function setPDFNetworkStreamFactory(t){createPDFNetworkStream=t}function getDocument(t){const e=new PDFDocumentLoadingTask;let i;if("string"==typeof t)i={url:t};else if((0,_util.isArrayBuffer)(t))i={data:t};else if(t instanceof PDFDataRangeTransport)i={range:t};else{if("object"!=typeof t)throw new Error("Invalid parameter in getDocument, need either Uint8Array, string or a parameter object");if(!t.url&&!t.data&&!t.range)throw new Error("Invalid parameter object: need either .data, .range or .url");i=t}const n=Object.create(null);let a=null,s=null;for(const r in i)if("url"!==r||"undefined"==typeof window)if("range"!==r)if("worker"!==r)if("data"!==r||i[r]instanceof Uint8Array)n[r]=i[r];else{const t=i[r];if("string"==typeof t)n[r]=(0,_util.stringToBytes)(t);else if("object"!=typeof t||null===t||isNaN(t.length)){if(!(0,_util.isArrayBuffer)(t))throw new Error("Invalid PDF binary data: either typed array, string or array-like object is expected in the data property.");n[r]=new Uint8Array(t)}else n[r]=new Uint8Array(t)}else s=i[r];else a=i[r];else n[r]=new URL(i[r],window.location).href;if(n.rangeChunkSize=n.rangeChunkSize||DEFAULT_RANGE_CHUNK_SIZE,n.CMapReaderFactory=n.CMapReaderFactory||_display_utils.DOMCMapReaderFactory,n.ignoreErrors=!0!==n.stopAtErrors,n.fontExtraProperties=!0===n.fontExtraProperties,n.pdfBug=!0===n.pdfBug,Number.isInteger(n.maxImageSize)||(n.maxImageSize=-1),"boolean"!=typeof n.isEvalSupported&&(n.isEvalSupported=!0),"boolean"!=typeof n.disableFontFace&&(n.disableFontFace=_api_compatibility.apiCompatibilityParams.disableFontFace||!1),"boolean"!=typeof n.disableRange&&(n.disableRange=!1),"boolean"!=typeof n.disableStream&&(n.disableStream=!1),"boolean"!=typeof n.disableAutoFetch&&(n.disableAutoFetch=!1),(0,_util.setVerbosityLevel)(n.verbosity),!s){const t={verbosity:n.verbosity,port:_worker_options.GlobalWorkerOptions.workerPort};s=t.port?PDFWorker.fromPort(t):new PDFWorker(t),e._worker=s}const o=e.docId;return s.promise.then((function(){if(e.destroyed)throw new Error("Loading aborted");const t=_fetchDocument(s,n,a,o),i=new Promise((function(t){let e;a?e=new _transport_stream.PDFDataTransportStream({length:n.length,initialData:n.initialData,progressiveDone:n.progressiveDone,disableRange:n.disableRange,disableStream:n.disableStream},a):n.data||(e=createPDFNetworkStream({url:n.url,length:n.length,httpHeaders:n.httpHeaders,withCredentials:n.withCredentials,rangeChunkSize:n.rangeChunkSize,disableRange:n.disableRange,disableStream:n.disableStream})),t(e)}));return Promise.all([t,i]).then((function([t,i]){if(e.destroyed)throw new Error("Loading aborted");const a=new _message_handler.MessageHandler(o,t,s.port);a.postMessageTransfers=s.postMessageTransfers;const r=new WorkerTransport(a,e,i,n);e._transport=r,a.send("Ready",null)}))})).catch(e._capability.reject),e}function _fetchDocument(t,e,i,n){return t.destroyed?Promise.reject(new Error("Worker was destroyed")):(i&&(e.length=i.length,e.initialData=i.initialData,e.progressiveDone=i.progressiveDone),t.messageHandler.sendWithPromise("GetDocRequest",{docId:n,apiVersion:"2.5.207",source:{data:e.data,url:e.url,password:e.password,disableAutoFetch:e.disableAutoFetch,rangeChunkSize:e.rangeChunkSize,length:e.length},maxImageSize:e.maxImageSize,disableFontFace:e.disableFontFace,postMessageTransfers:t.postMessageTransfers,docBaseUrl:e.docBaseUrl,ignoreErrors:e.ignoreErrors,isEvalSupported:e.isEvalSupported,fontExtraProperties:e.fontExtraProperties}).then((function(e){if(t.destroyed)throw new Error("Worker was destroyed");return e})))}const PDFDocumentLoadingTask=function(){let t=0;return class{constructor(){this._capability=(0,_util.createPromiseCapability)(),this._transport=null,this._worker=null,this.docId="d"+t++,this.destroyed=!1,this.onPassword=null,this.onProgress=null,this.onUnsupportedFeature=null}get promise(){return this._capability.promise}destroy(){return this.destroyed=!0,(this._transport?this._transport.destroy():Promise.resolve()).then(()=>{this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)})}}}();class PDFDataRangeTransport{constructor(t,e,i=!1){this.length=t,this.initialData=e,this.progressiveDone=i,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=(0,_util.createPromiseCapability)()}addRangeListener(t){this._rangeListeners.push(t)}addProgressListener(t){this._progressListeners.push(t)}addProgressiveReadListener(t){this._progressiveReadListeners.push(t)}addProgressiveDoneListener(t){this._progressiveDoneListeners.push(t)}onDataRange(t,e){for(const i of this._rangeListeners)i(t,e)}onDataProgress(t,e){this._readyCapability.promise.then(()=>{for(const i of this._progressListeners)i(t,e)})}onDataProgressiveRead(t){this._readyCapability.promise.then(()=>{for(const e of this._progressiveReadListeners)e(t)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(const t of this._progressiveDoneListeners)t()})}transportReady(){this._readyCapability.resolve()}requestDataRange(t,e){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}exports.PDFDataRangeTransport=PDFDataRangeTransport;class PDFDocumentProxy{constructor(t,e){this._pdfInfo=t,this._transport=e}get numPages(){return this._pdfInfo.numPages}get fingerprint(){return this._pdfInfo.fingerprint}getPage(t){return this._transport.getPage(t)}getPageIndex(t){return this._transport.getPageIndex(t)}getDestinations(){return this._transport.getDestinations()}getDestination(t){return this._transport.getDestination(t)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getOpenActionDestination(){return(0,_display_utils.deprecated)("getOpenActionDestination, use getOpenAction instead."),this.getOpenAction().then((function(t){return t&&t.dest?t.dest:null}))}getAttachments(){return this._transport.getAttachments()}getJavaScript(){return this._transport.getJavaScript()}getOutline(){return this._transport.getOutline()}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getData(){return this._transport.getData()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}getStats(){return this._transport.getStats()}cleanup(){return this._transport.startCleanup()}destroy(){return this.loadingTask.destroy()}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}}exports.PDFDocumentProxy=PDFDocumentProxy;class PDFPageProxy{constructor(t,e,i,n=!1){this._pageIndex=t,this._pageInfo=e,this._transport=i,this._stats=n?new _display_utils.StatTimer:null,this._pdfBug=n,this.commonObjs=i.commonObjs,this.objs=new PDFObjects,this.cleanupAfterRender=!1,this.pendingCleanup=!1,this.intentStates=Object.create(null),this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:t,rotation:e=this.rotate,offsetX:i=0,offsetY:n=0,dontFlip:a=!1}={}){return new _display_utils.PageViewport({viewBox:this.view,scale:t,rotation:e,offsetX:i,offsetY:n,dontFlip:a})}getAnnotations({intent:t=null}={}){return this.annotationsPromise&&this.annotationsIntent===t||(this.annotationsPromise=this._transport.getAnnotations(this._pageIndex,t),this.annotationsIntent=t),this.annotationsPromise}render({canvasContext:t,viewport:e,intent:i="display",enableWebGL:n=!1,renderInteractiveForms:a=!1,transform:s=null,imageLayer:o=null,canvasFactory:r=null,background:c=null}){this._stats&&this._stats.time("Overall");const l="print"===i?"print":"display";this.pendingCleanup=!1,this.intentStates[l]||(this.intentStates[l]=Object.create(null));const d=this.intentStates[l];d.streamReaderCancelTimeout&&(clearTimeout(d.streamReaderCancelTimeout),d.streamReaderCancelTimeout=null);const h=r||new _display_utils.DOMCanvasFactory,u=new _webgl.WebGLContext({enable:n});d.displayReadyCapability||(d.displayReadyCapability=(0,_util.createPromiseCapability)(),d.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList({pageIndex:this._pageIndex,intent:l,renderInteractiveForms:!0===a}));const p=t=>{const e=d.renderTasks.indexOf(b);e>=0&&d.renderTasks.splice(e,1),(this.cleanupAfterRender||"print"===l)&&(this.pendingCleanup=!0),this._tryCleanup(),t?(b.capability.reject(t),this._abortOperatorList({intentState:d,reason:t})):b.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"))},b=new InternalRenderTask({callback:p,params:{canvasContext:t,viewport:e,transform:s,imageLayer:o,background:c},objs:this.objs,commonObjs:this.commonObjs,operatorList:d.operatorList,pageIndex:this._pageIndex,canvasFactory:h,webGLContext:u,useRequestAnimationFrame:"print"!==l,pdfBug:this._pdfBug});d.renderTasks||(d.renderTasks=[]),d.renderTasks.push(b);const f=b.task;return d.displayReadyCapability.promise.then(t=>{this.pendingCleanup?p():(this._stats&&this._stats.time("Rendering"),b.initializeGraphics(t),b.operatorListChanged())}).catch(p),f}getOperatorList(){this.intentStates.oplist||(this.intentStates.oplist=Object.create(null));const t=this.intentStates.oplist;let e;return t.opListReadCapability||(e={},e.operatorListChanged=function(){if(t.operatorList.lastChunk){t.opListReadCapability.resolve(t.operatorList);const i=t.renderTasks.indexOf(e);i>=0&&t.renderTasks.splice(i,1)}},t.opListReadCapability=(0,_util.createPromiseCapability)(),t.renderTasks=[],t.renderTasks.push(e),t.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList({pageIndex:this._pageIndex,intent:"oplist"})),t.opListReadCapability.promise}streamTextContent({normalizeWhitespace:t=!1,disableCombineTextItems:e=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,normalizeWhitespace:!0===t,combineTextItems:!0!==e},{highWaterMark:100,size:t=>t.items.length})}getTextContent(t={}){const e=this.streamTextContent(t);return new Promise((function(t,i){const n=e.getReader(),a={items:[],styles:Object.create(null)};!function e(){n.read().then((function({value:i,done:n}){n?t(a):(Object.assign(a.styles,i.styles),a.items.push(...i.items),e())}),i)}()}))}_destroy(){this.destroyed=!0,this._transport.pageCache[this._pageIndex]=null;const t=[];return Object.keys(this.intentStates).forEach(e=>{const i=this.intentStates[e];this._abortOperatorList({intentState:i,reason:new Error("Page was destroyed."),force:!0}),"oplist"!==e&&i.renderTasks.forEach((function(e){const i=e.capability.promise.catch((function(){}));t.push(i),e.cancel()}))}),this.objs.clear(),this.annotationsPromise=null,this.pendingCleanup=!1,Promise.all(t)}cleanup(t=!1){return this.pendingCleanup=!0,this._tryCleanup(t)}_tryCleanup(t=!1){return!(!this.pendingCleanup||Object.keys(this.intentStates).some(t=>{const e=this.intentStates[t];return 0!==e.renderTasks.length||!e.operatorList.lastChunk})||(Object.keys(this.intentStates).forEach(t=>{delete this.intentStates[t]}),this.objs.clear(),this.annotationsPromise=null,t&&this._stats&&(this._stats=new _display_utils.StatTimer),this.pendingCleanup=!1,0))}_startRenderPage(t,e){const i=this.intentStates[e];i&&(this._stats&&this._stats.timeEnd("Page Request"),i.displayReadyCapability&&i.displayReadyCapability.resolve(t))}_renderPageChunk(t,e){for(let i=0,n=t.length;i<n;i++)e.operatorList.fnArray.push(t.fnArray[i]),e.operatorList.argsArray.push(t.argsArray[i]);e.operatorList.lastChunk=t.lastChunk;for(let i=0;i<e.renderTasks.length;i++)e.renderTasks[i].operatorListChanged();t.lastChunk&&this._tryCleanup()}_pumpOperatorList(t){(0,_util.assert)(t.intent,'PDFPageProxy._pumpOperatorList: Expected "intent" argument.');const e=this._transport.messageHandler.sendWithStream("GetOperatorList",t).getReader(),i=this.intentStates[t.intent];i.streamReader=e;const n=()=>{e.read().then(({value:t,done:e})=>{e?i.streamReader=null:this._transport.destroyed||(this._renderPageChunk(t,i),n())},t=>{if(i.streamReader=null,!this._transport.destroyed){if(i.operatorList){i.operatorList.lastChunk=!0;for(let t=0;t<i.renderTasks.length;t++)i.renderTasks[t].operatorListChanged();this._tryCleanup()}if(i.displayReadyCapability)i.displayReadyCapability.reject(t);else{if(!i.opListReadCapability)throw t;i.opListReadCapability.reject(t)}}})};n()}_abortOperatorList({intentState:t,reason:e,force:i=!1}){if((0,_util.assert)(e instanceof Error||"object"==typeof e&&null!==e,'PDFPageProxy._abortOperatorList: Expected "reason" argument.'),t.streamReader){if(!i){if(0!==t.renderTasks.length)return;if(e instanceof _display_utils.RenderingCancelledException)return void(t.streamReaderCancelTimeout=setTimeout(()=>{this._abortOperatorList({intentState:t,reason:e,force:!0}),t.streamReaderCancelTimeout=null},RENDERING_CANCELLED_TIMEOUT))}t.streamReader.cancel(new _util.AbortException(e&&e.message)),t.streamReader=null,this._transport.destroyed||(Object.keys(this.intentStates).some(e=>this.intentStates[e]===t&&(delete this.intentStates[e],!0)),this.cleanup())}}get stats(){return this._stats}}exports.PDFPageProxy=PDFPageProxy;class LoopbackPort{constructor(t=!0){this._listeners=[],this._defer=t,this._deferred=Promise.resolve(void 0)}postMessage(t,e){if(!this._defer)return void this._listeners.forEach(e=>{e.call(this,{data:t})});const i=new WeakMap,n={data:function t(n){if("object"!=typeof n||null===n)return n;if(i.has(n))return i.get(n);let a,s;if((a=n.buffer)&&(0,_util.isArrayBuffer)(a))return s=e&&e.includes(a)?new n.constructor(a,n.byteOffset,n.byteLength):new n.constructor(n),i.set(n,s),s;s=Array.isArray(n)?[]:{},i.set(n,s);for(const e in n){let i,a=n;for(;!(i=Object.getOwnPropertyDescriptor(a,e));)a=Object.getPrototypeOf(a);if(void 0!==i.value)if("function"!=typeof i.value)s[e]=t(i.value);else if(n.hasOwnProperty&&n.hasOwnProperty(e))throw new Error("LoopbackPort.postMessage - cannot clone: "+n[e])}return s}(t)};this._deferred.then(()=>{this._listeners.forEach(t=>{t.call(this,n)})})}addEventListener(t,e){this._listeners.push(e)}removeEventListener(t,e){const i=this._listeners.indexOf(e);this._listeners.splice(i,1)}terminate(){this._listeners.length=0}}exports.LoopbackPort=LoopbackPort;const PDFWorker=function PDFWorkerClosure(){const pdfWorkerPorts=new WeakMap;let isWorkerDisabled=!1,fallbackWorkerSrc,nextFakeWorkerId=0,fakeWorkerCapability;if(_is_node.isNodeJS)isWorkerDisabled=!0,fallbackWorkerSrc="./pdf.worker.js";else if("object"==typeof document&&"currentScript"in document){const t=document.currentScript&&document.currentScript.src;t&&(fallbackWorkerSrc=t.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}function getWorkerSrc(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(void 0!==fallbackWorkerSrc)return _is_node.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),fallbackWorkerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}function getMainThreadWorkerMessageHandler(){let t;try{t=globalThis.pdfjsWorker&&globalThis.pdfjsWorker.WorkerMessageHandler}catch(e){}return t||null}function setupFakeWorkerGlobal(){if(fakeWorkerCapability)return fakeWorkerCapability.promise;fakeWorkerCapability=(0,_util.createPromiseCapability)();const loader=async function(){const mainWorkerMessageHandler=getMainThreadWorkerMessageHandler();if(mainWorkerMessageHandler)return mainWorkerMessageHandler;if(_is_node.isNodeJS){const worker=eval("require")(getWorkerSrc());return worker.WorkerMessageHandler}return await(0,_display_utils.loadScript)(getWorkerSrc()),window.pdfjsWorker.WorkerMessageHandler};return loader().then(fakeWorkerCapability.resolve,fakeWorkerCapability.reject),fakeWorkerCapability.promise}function createCDNWrapper(t){return URL.createObjectURL(new Blob(["importScripts('"+t+"');"]))}class PDFWorker{constructor({name:t=null,port:e=null,verbosity:i=(0,_util.getVerbosityLevel)()}={}){if(e&&pdfWorkerPorts.has(e))throw new Error("Cannot use more than one PDFWorker per port");if(this.name=t,this.destroyed=!1,this.postMessageTransfers=!0,this.verbosity=i,this._readyCapability=(0,_util.createPromiseCapability)(),this._port=null,this._webWorker=null,this._messageHandler=null,e)return pdfWorkerPorts.set(e,this),void this._initializeFromPort(e);this._initialize()}get promise(){return this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(t){this._port=t,this._messageHandler=new _message_handler.MessageHandler("main","worker",t),this._messageHandler.on("ready",(function(){})),this._readyCapability.resolve()}_initialize(){if("undefined"!=typeof Worker&&!isWorkerDisabled&&!getMainThreadWorkerMessageHandler()){let e=getWorkerSrc();try{(0,_util.isSameOrigin)(window.location.href,e)||(e=createCDNWrapper(new URL(e,window.location).href));const t=new Worker(e),i=new _message_handler.MessageHandler("main","worker",t),n=()=>{t.removeEventListener("error",a),i.destroy(),t.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},a=()=>{this._webWorker||n()};t.addEventListener("error",a),i.on("test",e=>{t.removeEventListener("error",a),this.destroyed?n():e?(this._messageHandler=i,this._port=t,this._webWorker=t,e.supportTransfers||(this.postMessageTransfers=!1),this._readyCapability.resolve(),i.send("configure",{verbosity:this.verbosity})):(this._setupFakeWorker(),i.destroy(),t.terminate())}),i.on("ready",e=>{if(t.removeEventListener("error",a),this.destroyed)n();else try{s()}catch(i){this._setupFakeWorker()}});const s=()=>{const t=new Uint8Array([this.postMessageTransfers?255:0]);try{i.send("test",t,[t.buffer])}catch(e){(0,_util.warn)("Cannot use postMessage transfers."),t[0]=0,i.send("test",t)}};return void s()}catch(t){(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}_setupFakeWorker(){isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),isWorkerDisabled=!0),setupFakeWorkerGlobal().then(t=>{if(this.destroyed)return void this._readyCapability.reject(new Error("Worker was destroyed"));const e=new LoopbackPort;this._port=e;const i="fake"+nextFakeWorkerId++,n=new _message_handler.MessageHandler(i+"_worker",i,e);t.setup(n,e);const a=new _message_handler.MessageHandler(i,i+"_worker",e);this._messageHandler=a,this._readyCapability.resolve(),a.send("configure",{verbosity:this.verbosity})}).catch(t=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${t.message}".`))})}destroy(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),pdfWorkerPorts.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(t){if(!t||!t.port)throw new Error("PDFWorker.fromPort - invalid method signature.");return pdfWorkerPorts.has(t.port)?pdfWorkerPorts.get(t.port):new PDFWorker(t)}static getWorkerSrc(){return getWorkerSrc()}}return PDFWorker}();exports.PDFWorker=PDFWorker;class WorkerTransport{constructor(t,e,i,n){this.messageHandler=t,this.loadingTask=e,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({docId:e.docId,onUnsupportedFeature:this._onUnsupportedFeature.bind(this)}),this._params=n,this.CMapReaderFactory=new n.CMapReaderFactory({baseUrl:n.cMapUrl,isCompressed:n.cMapPacked}),this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=i,this._fullReader=null,this._lastProgress=null,this.pageCache=[],this.pagePromises=[],this.downloadInfoCapability=(0,_util.createPromiseCapability)(),this.setupMessageHandler()}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=(0,_util.createPromiseCapability)(),this._passwordCapability&&this._passwordCapability.reject(new Error("Worker was destroyed during onPassword callback"));const t=[];this.pageCache.forEach((function(e){e&&t.push(e._destroy())})),this.pageCache.length=0,this.pagePromises.length=0;const e=this.messageHandler.sendWithPromise("Terminate",null);return t.push(e),Promise.all(t).then(()=>{this.fontLoader.clear(),this._networkStream&&this._networkStream.cancelAllRequests(new _util.AbortException("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:t,loadingTask:e}=this;t.on("GetReader",(t,e)=>{(0,_util.assert)(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=t=>{this._lastProgress={loaded:t.loaded,total:t.total}},e.onPull=()=>{this._fullReader.read().then((function({value:t,done:i}){i?e.close():((0,_util.assert)((0,_util.isArrayBuffer)(t),"GetReader - expected an ArrayBuffer."),e.enqueue(new Uint8Array(t),1,[t]))})).catch(t=>{e.error(t)})},e.onCancel=t=>{this._fullReader.cancel(t)}}),t.on("ReaderHeadersReady",t=>{const i=(0,_util.createPromiseCapability)(),n=this._fullReader;return n.headersReady.then(()=>{n.isStreamingSupported&&n.isRangeSupported||(this._lastProgress&&e.onProgress&&e.onProgress(this._lastProgress),n.onProgress=t=>{e.onProgress&&e.onProgress({loaded:t.loaded,total:t.total})}),i.resolve({isStreamingSupported:n.isStreamingSupported,isRangeSupported:n.isRangeSupported,contentLength:n.contentLength})},i.reject),i.promise}),t.on("GetRangeReader",(t,e)=>{(0,_util.assert)(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const i=this._networkStream.getRangeReader(t.begin,t.end);i?(e.onPull=()=>{i.read().then((function({value:t,done:i}){i?e.close():((0,_util.assert)((0,_util.isArrayBuffer)(t),"GetRangeReader - expected an ArrayBuffer."),e.enqueue(new Uint8Array(t),1,[t]))})).catch(t=>{e.error(t)})},e.onCancel=t=>{i.cancel(t)}):e.close()}),t.on("GetDoc",({pdfInfo:t})=>{this._numPages=t.numPages,e._capability.resolve(new PDFDocumentProxy(t,this))}),t.on("DocException",(function(t){let i;switch(t.name){case"PasswordException":i=new _util.PasswordException(t.message,t.code);break;case"InvalidPDFException":i=new _util.InvalidPDFException(t.message);break;case"MissingPDFException":i=new _util.MissingPDFException(t.message);break;case"UnexpectedResponseException":i=new _util.UnexpectedResponseException(t.message,t.status);break;case"UnknownErrorException":i=new _util.UnknownErrorException(t.message,t.details)}e._capability.reject(i)})),t.on("PasswordRequest",t=>{if(this._passwordCapability=(0,_util.createPromiseCapability)(),e.onPassword){const n=t=>{this._passwordCapability.resolve({password:t})};try{e.onPassword(n,t.code)}catch(i){this._passwordCapability.reject(i)}}else this._passwordCapability.reject(new _util.PasswordException(t.message,t.code));return this._passwordCapability.promise}),t.on("DataLoaded",t=>{e.onProgress&&e.onProgress({loaded:t.length,total:t.length}),this.downloadInfoCapability.resolve(t)}),t.on("StartRenderPage",t=>{this.destroyed||this.pageCache[t.pageIndex]._startRenderPage(t.transparency,t.intent)}),t.on("commonobj",e=>{if(this.destroyed)return;const[i,n,a]=e;if(!this.commonObjs.has(i))switch(n){case"Font":const e=this._params;if("error"in a){const t=a.error;(0,_util.warn)("Error during font loading: "+t),this.commonObjs.resolve(i,t);break}let s=null;e.pdfBug&&globalThis.FontInspector&&globalThis.FontInspector.enabled&&(s={registerFont(t,e){globalThis.FontInspector.fontAdded(t,e)}});const o=new _font_loader.FontFaceObject(a,{isEvalSupported:e.isEvalSupported,disableFontFace:e.disableFontFace,ignoreErrors:e.ignoreErrors,onUnsupportedFeature:this._onUnsupportedFeature.bind(this),fontRegistry:s});this.fontLoader.bind(o).catch(e=>t.sendWithPromise("FontFallback",{id:i})).finally(()=>{!e.fontExtraProperties&&o.data&&(o.data=null),this.commonObjs.resolve(i,o)});break;case"FontPath":case"FontType3Res":case"Image":this.commonObjs.resolve(i,a);break;default:throw new Error("Got unknown common object type "+n)}}),t.on("obj",t=>{if(this.destroyed)return;const[e,i,n,a]=t,s=this.pageCache[i];if(!s.objs.has(e))switch(n){case"Image":s.objs.resolve(e,a);const t=8e6;a&&"data"in a&&a.data.length>t&&(s.cleanupAfterRender=!0);break;default:throw new Error("Got unknown object type "+n)}}),t.on("DocProgress",t=>{this.destroyed||e.onProgress&&e.onProgress({loaded:t.loaded,total:t.total})}),t.on("UnsupportedFeature",this._onUnsupportedFeature.bind(this)),t.on("FetchBuiltInCMap",(t,e)=>{if(this.destroyed)return void e.error(new Error("Worker was destroyed"));let i=!1;e.onPull=()=>{i?e.close():(i=!0,this.CMapReaderFactory.fetch(t).then((function(t){e.enqueue(t,1,[t.cMapData.buffer])})).catch((function(t){e.error(t)})))}})}_onUnsupportedFeature({featureId:t}){this.destroyed||this.loadingTask.onUnsupportedFeature&&this.loadingTask.onUnsupportedFeature(t)}getData(){return this.messageHandler.sendWithPromise("GetData",null)}getPage(t){if(!Number.isInteger(t)||t<=0||t>this._numPages)return Promise.reject(new Error("Invalid page request"));const e=t-1;if(e in this.pagePromises)return this.pagePromises[e];const i=this.messageHandler.sendWithPromise("GetPage",{pageIndex:e}).then(t=>{if(this.destroyed)throw new Error("Transport destroyed");const i=new PDFPageProxy(e,t,this,this._params.pdfBug);return this.pageCache[e]=i,i});return this.pagePromises[e]=i,i}getPageIndex(t){return this.messageHandler.sendWithPromise("GetPageIndex",{ref:t}).catch((function(t){return Promise.reject(new Error(t))}))}getAnnotations(t,e){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:t,intent:e})}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(t){return"string"!=typeof t?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:t})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getJavaScript(){return this.messageHandler.sendWithPromise("GetJavaScript",null)}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){return this.messageHandler.sendWithPromise("GetMetadata",null).then(t=>({info:t[0],metadata:t[1]?new _metadata.Metadata(t[1]):null,contentDispositionFilename:this._fullReader?this._fullReader.filename:null}))}getStats(){return this.messageHandler.sendWithPromise("GetStats",null)}startCleanup(){return this.messageHandler.sendWithPromise("Cleanup",null).then(()=>{for(let t=0,e=this.pageCache.length;t<e;t++){const e=this.pageCache[t];if(e&&!e.cleanup())throw new Error(`startCleanup: Page ${t+1} is currently rendering.`)}this.commonObjs.clear(),this.fontLoader.clear()})}get loadingParams(){const t=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:t.disableAutoFetch,disableFontFace:t.disableFontFace})}}class PDFObjects{constructor(){this._objs=Object.create(null)}_ensureObj(t){return this._objs[t]?this._objs[t]:this._objs[t]={capability:(0,_util.createPromiseCapability)(),data:null,resolved:!1}}get(t,e=null){if(e)return this._ensureObj(t).capability.promise.then(e),null;const i=this._objs[t];if(!i||!i.resolved)throw new Error(`Requesting object that isn't resolved yet ${t}.`);return i.data}has(t){const e=this._objs[t];return!!e&&e.resolved}resolve(t,e){const i=this._ensureObj(t);i.resolved=!0,i.data=e,i.capability.resolve(e)}clear(){this._objs=Object.create(null)}}class RenderTask{constructor(t){this._internalRenderTask=t,this.onContinue=null}get promise(){return this._internalRenderTask.capability.promise}cancel(){this._internalRenderTask.cancel()}}const InternalRenderTask=function(){const t=new WeakSet;return class{constructor({callback:t,params:e,objs:i,commonObjs:n,operatorList:a,pageIndex:s,canvasFactory:o,webGLContext:r,useRequestAnimationFrame:c=!1,pdfBug:l=!1}){this.callback=t,this.params=e,this.objs=i,this.commonObjs=n,this.operatorListIdx=null,this.operatorList=a,this._pageIndex=s,this.canvasFactory=o,this.webGLContext=r,this._pdfBug=l,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===c&&"undefined"!=typeof window,this.cancelled=!1,this.capability=(0,_util.createPromiseCapability)(),this.task=new RenderTask(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=e.canvasContext.canvas}initializeGraphics(e=!1){if(this.cancelled)return;if(this._canvas){if(t.has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");t.add(this._canvas)}this._pdfBug&&globalThis.StepperManager&&globalThis.StepperManager.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:i,viewport:n,transform:a,imageLayer:s,background:o}=this.params;this.gfx=new _canvas.CanvasGraphics(i,this.commonObjs,this.objs,this.canvasFactory,this.webGLContext,s),this.gfx.beginDrawing({transform:a,viewport:n,transparency:e,background:o}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback&&this.graphicsReadyCallback()}cancel(e=null){this.running=!1,this.cancelled=!0,this.gfx&&this.gfx.endDrawing(),this._canvas&&t.delete(this._canvas),this.callback(e||new _display_utils.RenderingCancelledException("Rendering cancelled, page "+(this._pageIndex+1),"canvas"))}operatorListChanged(){this.graphicsReady?(this.stepper&&this.stepper.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}_continue(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?window.requestAnimationFrame(()=>{this._nextBound().catch(this.cancel.bind(this))}):Promise.resolve().then(this._nextBound).catch(this.cancel.bind(this))}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),this._canvas&&t.delete(this._canvas),this.callback())))}}}(),version="2.5.207";exports.version=version;const build="0974d605";exports.build=build},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FontLoader=e.FontFaceObject=void 0;var n=i(2);class a{constructor({docId:t,onUnsupportedFeature:e}){this.constructor===a&&(0,n.unreachable)("Cannot initialize BaseFontLoader."),this.docId=t,this._onUnsupportedFeature=e,this.nativeFontFaces=[],this.styleElement=null}addNativeFontFace(t){this.nativeFontFaces.push(t),document.fonts.add(t)}insertRule(t){let e=this.styleElement;e||(e=this.styleElement=document.createElement("style"),e.id="PDFJS_FONT_STYLE_TAG_"+this.docId,document.documentElement.getElementsByTagName("head")[0].appendChild(e));const i=e.sheet;i.insertRule(t,i.cssRules.length)}clear(){this.nativeFontFaces.forEach((function(t){document.fonts.delete(t)})),this.nativeFontFaces.length=0,this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async bind(t){if(t.attached||t.missingFile)return;if(t.attached=!0,this.isFontLoadingAPISupported){const e=t.createNativeFontFace();if(e){this.addNativeFontFace(e);try{await e.loaded}catch(i){throw this._onUnsupportedFeature({featureId:n.UNSUPPORTED_FEATURES.errorFontLoadNative}),(0,n.warn)(`Failed to load font '${e.family}': '${i}'.`),t.disableFontFace=!0,i}}return}const e=t.createFontFaceRule();if(e){if(this.insertRule(e),this.isSyncFontLoadingSupported)return;await new Promise(i=>{const n=this._queueLoadingCallback(i);this._prepareFontLoadEvent([e],[t],n)})}}_queueLoadingCallback(t){(0,n.unreachable)("Abstract method `_queueLoadingCallback`.")}get isFontLoadingAPISupported(){const t="undefined"!=typeof document&&!!document.fonts;return(0,n.shadow)(this,"isFontLoadingAPISupported",t)}get isSyncFontLoadingSupported(){(0,n.unreachable)("Abstract method `isSyncFontLoadingSupported`.")}get _loadTestFont(){(0,n.unreachable)("Abstract method `_loadTestFont`.")}_prepareFontLoadEvent(t,e,i){(0,n.unreachable)("Abstract method `_prepareFontLoadEvent`.")}}let s;e.FontLoader=s,e.FontLoader=s=class extends a{constructor(t){super(t),this.loadingContext={requests:[],nextRequestId:0},this.loadTestFontId=0}get isSyncFontLoadingSupported(){let t=!1;if("undefined"==typeof navigator)t=!0;else{const e=/Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent);e&&e[1]>=14&&(t=!0)}return(0,n.shadow)(this,"isSyncFontLoadingSupported",t)}_queueLoadingCallback(t){const e=this.loadingContext,i={id:"pdfjs-font-loading-"+e.nextRequestId++,done:!1,complete:function(){for((0,n.assert)(!i.done,"completeRequest() cannot be called twice."),i.done=!0;e.requests.length>0&&e.requests[0].done;){const t=e.requests.shift();setTimeout(t.callback,0)}},callback:t};return e.requests.push(i),i}get _loadTestFont(){return(0,n.shadow)(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}_prepareFontLoadEvent(t,e,i){function a(t,e){return t.charCodeAt(e)<<24|t.charCodeAt(e+1)<<16|t.charCodeAt(e+2)<<8|255&t.charCodeAt(e+3)}function s(t,e,i,n){return t.substring(0,e)+n+t.substring(e+i)}let o,r;const c=document.createElement("canvas");c.width=1,c.height=1;const l=c.getContext("2d");let d=0;const h=`lt${Date.now()}${this.loadTestFontId++}`;let u=this._loadTestFont;u=s(u,976,h.length,h);let p=a(u,16);for(o=0,r=h.length-3;o<r;o+=4)p=p-1482184792+a(h,o)|0;o<h.length&&(p=p-1482184792+a(h+"XXX",o)|0),u=s(u,16,4,(0,n.string32)(p));const b=`url(data:font/opentype;base64,${btoa(u)});`;this.insertRule(`@font-face {font-family:"${h}";src:${b}}`);const f=[];for(o=0,r=e.length;o<r;o++)f.push(e[o].loadedName);f.push(h);const m=document.createElement("div");for(m.style.visibility="hidden",m.style.width=m.style.height="10px",m.style.position="absolute",m.style.top=m.style.left="0px",o=0,r=f.length;o<r;++o){const t=document.createElement("span");t.textContent="Hi",t.style.fontFamily=f[o],m.appendChild(t)}document.body.appendChild(m),function t(e,i){if(d++,d>30)return(0,n.warn)("Load test font never loaded."),void i();l.font="30px "+e,l.fillText(".",0,20),l.getImageData(0,0,1,1).data[3]>0?i():setTimeout(t.bind(null,e,i))}(h,(function(){document.body.removeChild(m),i.complete()}))}},e.FontFaceObject=class{constructor(t,{isEvalSupported:e=!0,disableFontFace:i=!1,ignoreErrors:n=!1,onUnsupportedFeature:a=null,fontRegistry:s=null}){this.compiledGlyphs=Object.create(null);for(const o in t)this[o]=t[o];this.isEvalSupported=!1!==e,this.disableFontFace=!0===i,this.ignoreErrors=!0===n,this._onUnsupportedFeature=a,this.fontRegistry=s}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;const t=new FontFace(this.loadedName,this.data,{});return this.fontRegistry&&this.fontRegistry.registerFont(this),t}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;const t=(0,n.bytesToString)(new Uint8Array(this.data)),e=`url(data:${this.mimetype};base64,${btoa(t)});`,i=`@font-face {font-family:"${this.loadedName}";src:${e}}`;return this.fontRegistry&&this.fontRegistry.registerFont(this,e),i}getPathGenerator(t,e){if(void 0!==this.compiledGlyphs[e])return this.compiledGlyphs[e];let i,a;try{i=t.get(this.loadedName+"_path_"+e)}catch(s){if(!this.ignoreErrors)throw s;return this._onUnsupportedFeature&&this._onUnsupportedFeature({featureId:n.UNSUPPORTED_FEATURES.errorFontGetPath}),(0,n.warn)(`getPathGenerator - ignoring character: "${s}".`),this.compiledGlyphs[e]=function(t,e){}}if(this.isEvalSupported&&n.IsEvalSupportedCached.value){let t,n="";for(let e=0,s=i.length;e<s;e++)a=i[e],t=void 0!==a.args?a.args.join(","):"",n+="c."+a.cmd+"("+t+");\n";return this.compiledGlyphs[e]=new Function("c","size",n)}return this.compiledGlyphs[e]=function(t,e){for(let n=0,s=i.length;n<s;n++)a=i[n],"scale"===a.cmd&&(a.args=[e,-e]),t[a.cmd].apply(t,a.args)}}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.apiCompatibilityParams=void 0;var n=i(4);const a=Object.create(null);n.isNodeJS&&(a.disableFontFace=!0);const s=Object.freeze(a);e.apiCompatibilityParams=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CanvasGraphics=void 0;var n=i(2),a=i(9);function s(t){t.mozCurrentTransform||(t._originalSave=t.save,t._originalRestore=t.restore,t._originalRotate=t.rotate,t._originalScale=t.scale,t._originalTranslate=t.translate,t._originalTransform=t.transform,t._originalSetTransform=t.setTransform,t._transformMatrix=t._transformMatrix||[1,0,0,1,0,0],t._transformStack=[],Object.defineProperty(t,"mozCurrentTransform",{get:function(){return this._transformMatrix}}),Object.defineProperty(t,"mozCurrentTransformInverse",{get:function(){var t=this._transformMatrix,e=t[0],i=t[1],n=t[2],a=t[3],s=t[4],o=t[5],r=e*a-i*n,c=i*n-e*a;return[a/r,i/c,n/c,e/r,(a*s-n*o)/c,(i*s-e*o)/r]}}),t.save=function(){var t=this._transformMatrix;this._transformStack.push(t),this._transformMatrix=t.slice(0,6),this._originalSave()},t.restore=function(){var t=this._transformStack.pop();t&&(this._transformMatrix=t,this._originalRestore())},t.translate=function(t,e){var i=this._transformMatrix;i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this._originalTranslate(t,e)},t.scale=function(t,e){var i=this._transformMatrix;i[0]=i[0]*t,i[1]=i[1]*t,i[2]=i[2]*e,i[3]=i[3]*e,this._originalScale(t,e)},t.transform=function(e,i,n,a,s,o){var r=this._transformMatrix;this._transformMatrix=[r[0]*e+r[2]*i,r[1]*e+r[3]*i,r[0]*n+r[2]*a,r[1]*n+r[3]*a,r[0]*s+r[2]*o+r[4],r[1]*s+r[3]*o+r[5]],t._originalTransform(e,i,n,a,s,o)},t.setTransform=function(e,i,n,a,s,o){this._transformMatrix=[e,i,n,a,s,o],t._originalSetTransform(e,i,n,a,s,o)},t.rotate=function(t){var e=Math.cos(t),i=Math.sin(t),n=this._transformMatrix;this._transformMatrix=[n[0]*e+n[2]*i,n[1]*e+n[3]*i,n[0]*-i+n[2]*e,n[1]*-i+n[3]*e,n[4],n[5]],this._originalRotate(t)})}var o=function(){function t(t){this.canvasFactory=t,this.cache=Object.create(null)}return t.prototype={getCanvas:function(t,e,i,n){var a;return void 0!==this.cache[t]?(this.canvasFactory.reset(a=this.cache[t],e,i),a.context.setTransform(1,0,0,1,0,0)):(a=this.canvasFactory.create(e,i),this.cache[t]=a),n&&s(a.context),a},clear(){for(var t in this.cache)this.canvasFactory.destroy(this.cache[t]),delete this.cache[t]}},t}(),r=function(){function t(){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=n.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=n.FONT_IDENTITY_MATRIX,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=n.TextRenderingMode.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.resumeSMaskCtx=null}return t.prototype={clone:function(){return Object.create(this)},setCurrentPoint:function(t,e){this.x=t,this.y=e}},t}(),c=function(){function t(t,e,i,n,a,c){this.ctx=t,this.current=new r,this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=e,this.objs=i,this.canvasFactory=n,this.webGLContext=a,this.imageLayer=c,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.cachedCanvases=new o(this.canvasFactory),t&&s(t),this._cachedGetSinglePixelWidth=null}function e(t,e){if("undefined"!=typeof ImageData&&e instanceof ImageData)t.putImageData(e,0,0);else{var i,a,s,o,r,c=e.height,l=e.width,d=c%16,h=(c-d)/16,u=0===d?h:h+1,p=t.createImageData(l,16),b=0,f=e.data,m=p.data;if(e.kind===n.ImageKind.GRAYSCALE_1BPP){var g=f.byteLength,v=new Uint32Array(m.buffer,0,m.byteLength>>2),_=v.length,y=l+7>>3,x=4294967295,C=n.IsLittleEndianCached.value?4278190080:255;for(a=0;a<u;a++){for(o=a<h?16:d,i=0,s=0;s<o;s++){for(var O=g-b,D=0,w=O>y?l:8*O-7,M=-8&w,k=0,S=0;D<M;D+=8)S=f[b++],v[i++]=128&S?x:C,v[i++]=64&S?x:C,v[i++]=32&S?x:C,v[i++]=16&S?x:C,v[i++]=8&S?x:C,v[i++]=4&S?x:C,v[i++]=2&S?x:C,v[i++]=1&S?x:C;for(;D<w;D++)0===k&&(S=f[b++],k=128),v[i++]=S&k?x:C,k>>=1}for(;i<_;)v[i++]=0;t.putImageData(p,0,16*a)}}else if(e.kind===n.ImageKind.RGBA_32BPP){for(s=0,r=16*l*4,a=0;a<h;a++)m.set(f.subarray(b,b+r)),b+=r,t.putImageData(p,0,s),s+=16;a<u&&(m.set(f.subarray(b,b+(r=l*d*4))),t.putImageData(p,0,s))}else{if(e.kind!==n.ImageKind.RGB_24BPP)throw new Error("bad image kind: "+e.kind);for(r=l*(o=16),a=0;a<u;a++){for(a>=h&&(r=l*(o=d)),i=0,s=r;s--;)m[i++]=f[b++],m[i++]=f[b++],m[i++]=f[b++],m[i++]=255;t.putImageData(p,0,16*a)}}}}function i(t,e){for(var i=e.height,n=e.width,a=i%16,s=(i-a)/16,o=0===a?s:s+1,r=t.createImageData(n,16),c=0,l=e.data,d=r.data,h=0;h<o;h++){for(var u=h<s?16:a,p=3,b=0;b<u;b++)for(var f=0,m=0;m<n;m++){if(!f){var g=l[c++];f=128}d[p]=g&f?0:255,p+=4,f>>=1}t.putImageData(r,0,16*h)}}function c(t,e){for(var i=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font"],n=0,a=i.length;n<a;n++){var s=i[n];void 0!==t[s]&&(e[s]=t[s])}void 0!==t.setLineDash&&(e.setLineDash(t.getLineDash()),e.lineDashOffset=t.lineDashOffset)}function l(t){t.strokeStyle="#000000",t.fillStyle="#000000",t.fillRule="nonzero",t.globalAlpha=1,t.lineWidth=1,t.lineCap="butt",t.lineJoin="miter",t.miterLimit=10,t.globalCompositeOperation="source-over",t.font="10px sans-serif",void 0!==t.setLineDash&&(t.setLineDash([]),t.lineDashOffset=0)}function d(t,e,i,n){for(var a=t.length,s=3;s<a;s+=4){var o=t[s];if(0===o)t[s-3]=e,t[s-2]=i,t[s-1]=n;else if(o<255){var r=255-o;t[s-3]=t[s-3]*o+e*r>>8,t[s-2]=t[s-2]*o+i*r>>8,t[s-1]=t[s-1]*o+n*r>>8}}}function h(t,e,i){for(var n=t.length,a=3;a<n;a+=4)e[a]=e[a]*(i?i[t[a]]:t[a])*.00392156862745098|0}function u(t,e,i){for(var n=t.length,a=3;a<n;a+=4){var s=77*t[a-3]+152*t[a-2]+28*t[a-1];e[a]=i?e[a]*i[s>>8]>>8:e[a]*s>>16}}function p(t,e,i,n){var a=e.canvas,s=e.context;t.setTransform(e.scaleX,0,0,e.scaleY,e.offsetX,e.offsetY);var o=e.backdrop||null;if(!e.transferMap&&n.isEnabled){const s=n.composeSMask({layer:i.canvas,mask:a,properties:{subtype:e.subtype,backdrop:o}});return t.setTransform(1,0,0,1,0,0),void t.drawImage(s,e.offsetX,e.offsetY)}!function(t,e,i,n,a,s,o){var r,c=!!s,l=c?s[0]:0,p=c?s[1]:0,b=c?s[2]:0;r="Luminosity"===a?u:h;for(var f=Math.min(n,Math.ceil(1048576/i)),m=0;m<n;m+=f){var g=Math.min(f,n-m),v=t.getImageData(0,m,i,g),_=e.getImageData(0,m,i,g);c&&d(v.data,l,p,b),r(v.data,_.data,o),t.putImageData(_,0,m)}}(s,i,a.width,a.height,e.subtype,o,e.transferMap),t.drawImage(a,0,0)}var b=["butt","round","square"],f=["miter","round","bevel"],m={},g={};for(var v in t.prototype={beginDrawing({transform:t,viewport:e,transparency:i=!1,background:n=null}){var a=this.ctx.canvas.width,s=this.ctx.canvas.height;if(this.ctx.save(),this.ctx.fillStyle=n||"rgb(255, 255, 255)",this.ctx.fillRect(0,0,a,s),this.ctx.restore(),i){var o=this.cachedCanvases.getCanvas("transparent",a,s,!0);this.compositeCtx=this.ctx,this.transparentCanvas=o.canvas,this.ctx=o.context,this.ctx.save(),this.ctx.transform.apply(this.ctx,this.compositeCtx.mozCurrentTransform)}this.ctx.save(),l(this.ctx),t&&this.ctx.transform.apply(this.ctx,t),this.ctx.transform.apply(this.ctx,e.transform),this.baseTransform=this.ctx.mozCurrentTransform.slice(),this.imageLayer&&this.imageLayer.beginLayout()},executeOperatorList:function(t,e,i,a){var s=t.argsArray,o=t.fnArray,r=e||0,c=s.length;if(c===r)return r;for(var l,d=c-r>10&&"function"==typeof i,h=d?Date.now()+15:0,u=0,p=this.commonObjs,b=this.objs;;){if(void 0!==a&&r===a.nextBreakPoint)return a.breakIt(r,i),r;if((l=o[r])!==n.OPS.dependency)this[l].apply(this,s[r]);else for(const t of s[r]){const e=t.startsWith("g_")?p:b;if(!e.has(t))return e.get(t,i),r}if(++r===c)return r;if(d&&++u>10){if(Date.now()>h)return i(),r;u=0}}},endDrawing:function(){null!==this.current.activeSMask&&this.endSMaskGroup(),this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null),this.cachedCanvases.clear(),this.webGLContext.clear(),this.imageLayer&&this.imageLayer.endLayout()},setLineWidth:function(t){this.current.lineWidth=t,this.ctx.lineWidth=t},setLineCap:function(t){this.ctx.lineCap=b[t]},setLineJoin:function(t){this.ctx.lineJoin=f[t]},setMiterLimit:function(t){this.ctx.miterLimit=t},setDash:function(t,e){var i=this.ctx;void 0!==i.setLineDash&&(i.setLineDash(t),i.lineDashOffset=e)},setRenderingIntent(t){},setFlatness(t){},setGState:function(t){for(var e=0,i=t.length;e<i;e++){var n=t[e],a=n[1];switch(n[0]){case"LW":this.setLineWidth(a);break;case"LC":this.setLineCap(a);break;case"LJ":this.setLineJoin(a);break;case"ML":this.setMiterLimit(a);break;case"D":this.setDash(a[0],a[1]);break;case"RI":this.setRenderingIntent(a);break;case"FL":this.setFlatness(a);break;case"Font":this.setFont(a[0],a[1]);break;case"CA":this.current.strokeAlpha=n[1];break;case"ca":this.current.fillAlpha=n[1],this.ctx.globalAlpha=n[1];break;case"BM":this.ctx.globalCompositeOperation=a;break;case"SMask":this.current.activeSMask&&(this.stateStack.length>0&&this.stateStack[this.stateStack.length-1].activeSMask===this.current.activeSMask?this.suspendSMaskGroup():this.endSMaskGroup()),this.current.activeSMask=a?this.tempSMask:null,this.current.activeSMask&&this.beginSMaskGroup(),this.tempSMask=null}}},beginSMaskGroup:function(){var t=this.current.activeSMask,e=this.cachedCanvases.getCanvas("smaskGroupAt"+this.groupLevel,t.canvas.width,t.canvas.height,!0),i=this.ctx,n=i.mozCurrentTransform;this.ctx.save();var a=e.context;a.scale(1/t.scaleX,1/t.scaleY),a.translate(-t.offsetX,-t.offsetY),a.transform.apply(a,n),t.startTransformInverse=a.mozCurrentTransformInverse,c(i,a),this.ctx=a,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(i),this.groupLevel++},suspendSMaskGroup:function(){var t=this.ctx;this.groupLevel--,this.ctx=this.groupStack.pop(),p(this.ctx,this.current.activeSMask,t,this.webGLContext),this.ctx.restore(),this.ctx.save(),c(t,this.ctx),this.current.resumeSMaskCtx=t;var e=n.Util.transform(this.current.activeSMask.startTransformInverse,t.mozCurrentTransform);this.ctx.transform.apply(this.ctx,e),t.save(),t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,t.canvas.width,t.canvas.height),t.restore()},resumeSMaskGroup:function(){var t=this.ctx;this.ctx=this.current.resumeSMaskCtx,this.groupStack.push(t),this.groupLevel++},endSMaskGroup:function(){var t=this.ctx;this.groupLevel--,this.ctx=this.groupStack.pop(),p(this.ctx,this.current.activeSMask,t,this.webGLContext),this.ctx.restore(),c(t,this.ctx);var e=n.Util.transform(this.current.activeSMask.startTransformInverse,t.mozCurrentTransform);this.ctx.transform.apply(this.ctx,e)},save:function(){this.ctx.save();var t=this.current;this.stateStack.push(t),this.current=t.clone(),this.current.resumeSMaskCtx=null},restore:function(){this.current.resumeSMaskCtx&&this.resumeSMaskGroup(),null===this.current.activeSMask||0!==this.stateStack.length&&this.stateStack[this.stateStack.length-1].activeSMask===this.current.activeSMask||this.endSMaskGroup(),0!==this.stateStack.length&&(this.current=this.stateStack.pop(),this.ctx.restore(),this.pendingClip=null,this._cachedGetSinglePixelWidth=null)},transform:function(t,e,i,n,a,s){this.ctx.transform(t,e,i,n,a,s),this._cachedGetSinglePixelWidth=null},constructPath:function(t,e){for(var i=this.ctx,a=this.current,s=a.x,o=a.y,r=0,c=0,l=t.length;r<l;r++)switch(0|t[r]){case n.OPS.rectangle:s=e[c++],o=e[c++];var d=e[c++],h=e[c++];0===d&&(d=this.getSinglePixelWidth()),0===h&&(h=this.getSinglePixelWidth());var u=s+d,p=o+h;this.ctx.moveTo(s,o),this.ctx.lineTo(u,o),this.ctx.lineTo(u,p),this.ctx.lineTo(s,p),this.ctx.lineTo(s,o),this.ctx.closePath();break;case n.OPS.moveTo:s=e[c++],o=e[c++],i.moveTo(s,o);break;case n.OPS.lineTo:s=e[c++],o=e[c++],i.lineTo(s,o);break;case n.OPS.curveTo:i.bezierCurveTo(e[c],e[c+1],e[c+2],e[c+3],s=e[c+4],o=e[c+5]),c+=6;break;case n.OPS.curveTo2:i.bezierCurveTo(s,o,e[c],e[c+1],e[c+2],e[c+3]),s=e[c+2],o=e[c+3],c+=4;break;case n.OPS.curveTo3:i.bezierCurveTo(e[c],e[c+1],s=e[c+2],o=e[c+3],s,o),c+=4;break;case n.OPS.closePath:i.closePath()}a.setCurrentPoint(s,o)},closePath:function(){this.ctx.closePath()},stroke:function(t){t=void 0===t||t;var e=this.ctx,i=this.current.strokeColor;if(e.globalAlpha=this.current.strokeAlpha,i&&i.hasOwnProperty("type")&&"Pattern"===i.type){e.save();const t=n.Util.singularValueDecompose2dScale(e.mozCurrentTransform)[0];e.strokeStyle=i.getPattern(e,this),e.lineWidth=Math.max(.65*this.getSinglePixelWidth(),this.current.lineWidth*t),e.stroke(),e.restore()}else e.lineWidth=Math.max(.65*this.getSinglePixelWidth(),this.current.lineWidth),e.stroke();t&&this.consumePath(),e.globalAlpha=this.current.fillAlpha},closeStroke:function(){this.closePath(),this.stroke()},fill:function(t){t=void 0===t||t;var e=this.ctx,i=this.current.fillColor,n=!1;this.current.patternFill&&(e.save(),this.baseTransform&&e.setTransform.apply(e,this.baseTransform),e.fillStyle=i.getPattern(e,this),n=!0),this.pendingEOFill?(e.fill("evenodd"),this.pendingEOFill=!1):e.fill(),n&&e.restore(),t&&this.consumePath()},eoFill:function(){this.pendingEOFill=!0,this.fill()},fillStroke:function(){this.fill(!1),this.stroke(!1),this.consumePath()},eoFillStroke:function(){this.pendingEOFill=!0,this.fillStroke()},closeFillStroke:function(){this.closePath(),this.fillStroke()},closeEOFillStroke:function(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()},endPath:function(){this.consumePath()},clip:function(){this.pendingClip=m},eoClip:function(){this.pendingClip=g},beginText:function(){this.current.textMatrix=n.IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0},endText:function(){var t=this.pendingTextPaths,e=this.ctx;if(void 0!==t){e.save(),e.beginPath();for(var i=0;i<t.length;i++){var n=t[i];e.setTransform.apply(e,n.transform),e.translate(n.x,n.y),n.addToPath(e,n.fontSize)}e.restore(),e.clip(),e.beginPath(),delete this.pendingTextPaths}else e.beginPath()},setCharSpacing:function(t){this.current.charSpacing=t},setWordSpacing:function(t){this.current.wordSpacing=t},setHScale:function(t){this.current.textHScale=t/100},setLeading:function(t){this.current.leading=-t},setFont:function(t,e){var i=this.commonObjs.get(t),a=this.current;if(!i)throw new Error("Can't find font for "+t);if(a.fontMatrix=i.fontMatrix?i.fontMatrix:n.FONT_IDENTITY_MATRIX,0!==a.fontMatrix[0]&&0!==a.fontMatrix[3]||(0,n.warn)("Invalid font matrix for font "+t),e<0?(e=-e,a.fontDirection=-1):a.fontDirection=1,this.current.font=i,this.current.fontSize=e,i.isType3Font)return;let s="normal";i.black?s="900":i.bold&&(s="bold");var o=i.italic?"italic":"normal",r=`"${i.loadedName||"sans-serif"}", ${i.fallbackName}`;let c=e;e<16?c=16:e>100&&(c=100),this.current.fontSizeScale=e/c,this.ctx.font=`${o} ${s} ${c}px ${r}`},setTextRenderingMode:function(t){this.current.textRenderingMode=t},setTextRise:function(t){this.current.textRise=t},moveText:function(t,e){this.current.x=this.current.lineX+=t,this.current.y=this.current.lineY+=e},setLeadingMoveText:function(t,e){this.setLeading(-e),this.moveText(t,e)},setTextMatrix:function(t,e,i,n,a,s){this.current.textMatrix=[t,e,i,n,a,s],this.current.textMatrixScale=Math.sqrt(t*t+e*e),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0},nextLine:function(){this.moveText(0,this.current.leading)},paintChar(t,e,i,a){var s=this.ctx,o=this.current,r=o.font,c=o.textRenderingMode,l=o.fontSize/o.fontSizeScale,d=c&n.TextRenderingMode.FILL_STROKE_MASK,h=!!(c&n.TextRenderingMode.ADD_TO_PATH_FLAG);const u=o.patternFill&&!r.missingFile;var p;(r.disableFontFace||h||u)&&(p=r.getPathGenerator(this.commonObjs,t)),r.disableFontFace||u?(s.save(),s.translate(e,i),s.beginPath(),p(s,l),a&&s.setTransform.apply(s,a),d!==n.TextRenderingMode.FILL&&d!==n.TextRenderingMode.FILL_STROKE||s.fill(),d!==n.TextRenderingMode.STROKE&&d!==n.TextRenderingMode.FILL_STROKE||s.stroke(),s.restore()):(d!==n.TextRenderingMode.FILL&&d!==n.TextRenderingMode.FILL_STROKE||s.fillText(t,e,i),d!==n.TextRenderingMode.STROKE&&d!==n.TextRenderingMode.FILL_STROKE||s.strokeText(t,e,i)),h&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:s.mozCurrentTransform,x:e,y:i,fontSize:l,addToPath:p})},get isFontSubpixelAAEnabled(){const{context:t}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);t.scale(1.5,1),t.fillText("I",0,10);for(var e=t.getImageData(0,0,10,10).data,i=!1,a=3;a<e.length;a+=4)if(e[a]>0&&e[a]<255){i=!0;break}return(0,n.shadow)(this,"isFontSubpixelAAEnabled",i)},showText:function(t){var e=this.current,i=e.font;if(i.isType3Font)return this.showType3Text(t);var a=e.fontSize;if(0===a)return;var s=this.ctx,o=e.fontSizeScale,r=e.charSpacing,c=e.wordSpacing,l=e.fontDirection,d=e.textHScale*l,h=t.length,u=i.vertical,p=u?1:-1,b=i.defaultVMetrics,f=a*e.fontMatrix[0],m=e.textRenderingMode===n.TextRenderingMode.FILL&&!i.disableFontFace&&!e.patternFill;let g;if(s.save(),e.patternFill){s.save();const t=e.fillColor.getPattern(s,this);g=s.mozCurrentTransform,s.restore(),s.fillStyle=t}s.transform.apply(s,e.textMatrix),s.translate(e.x,e.y+e.textRise),s.scale(d,l>0?-1:1);var v=e.lineWidth,_=e.textMatrixScale;if(0===_||0===v){var y=e.textRenderingMode&n.TextRenderingMode.FILL_STROKE_MASK;y!==n.TextRenderingMode.STROKE&&y!==n.TextRenderingMode.FILL_STROKE||(this._cachedGetSinglePixelWidth=null,v=.65*this.getSinglePixelWidth())}else v/=_;1!==o&&(s.scale(o,o),v/=o),s.lineWidth=v;var x,C=0;for(x=0;x<h;++x){var O=t[x];if((0,n.isNum)(O))C+=p*O*a/1e3;else{var D,w,M,k,S=!1,I=(O.isSpace?c:0)+r,P=O.fontChar,V=O.accent,R=O.width;if(u?(M=O.vmetric||b,k=O.vmetric?M[1]:.5*R,R=M?-M[0]:R,D=(k=-k*f)/o,w=(C+M[2]*f)/o):(D=C/o,w=0),i.remeasure&&R>0){var j=1e3*s.measureText(P).width/a*o;if(R<j&&this.isFontSubpixelAAEnabled){var A=R/j;S=!0,s.save(),s.scale(A,1),D/=A}else R!==j&&(D+=(R-j)/2e3*a/o)}(O.isInFont||i.missingFile)&&(m&&!V?s.fillText(P,D,w):(this.paintChar(P,D,w,g),V&&this.paintChar(V.fontChar,D+V.offset.x/o,w-V.offset.y/o,g))),C+=u?R*f-I*l:R*f+I*l,S&&s.restore()}}u?e.y-=C:e.x+=C*d,s.restore()},showType3Text:function(t){var e,i,a,s,o=this.ctx,r=this.current,c=r.font,l=r.fontSize,d=r.fontDirection,h=c.vertical?1:-1,u=r.charSpacing,p=r.wordSpacing,b=r.textHScale*d,f=r.fontMatrix||n.FONT_IDENTITY_MATRIX,m=t.length;if(r.textRenderingMode!==n.TextRenderingMode.INVISIBLE&&0!==l){for(this._cachedGetSinglePixelWidth=null,o.save(),o.transform.apply(o,r.textMatrix),o.translate(r.x,r.y),o.scale(b,d),e=0;e<m;++e)if((0,n.isNum)(i=t[e]))this.ctx.translate(s=h*i*l/1e3,0),r.x+=s*b;else{var g=(i.isSpace?p:0)+u,v=c.charProcOperatorList[i.operatorListId];if(v){this.processingType3=i,this.save(),o.scale(l,l),o.transform.apply(o,f),this.executeOperatorList(v),this.restore();var _=n.Util.applyTransform([i.width,0],f);o.translate(a=_[0]*l+g,0),r.x+=a*b}else(0,n.warn)(`Type3 character "${i.operatorListId}" is not available.`)}o.restore(),this.processingType3=null}},setCharWidth:function(t,e){},setCharWidthAndBounds:function(t,e,i,n,a,s){this.ctx.rect(i,n,a-i,s-n),this.clip(),this.endPath()},getColorN_Pattern:function(e){var i;if("TilingPattern"===e[0]){var n=e[1],s=this.baseTransform||this.ctx.mozCurrentTransform.slice();i=new a.TilingPattern(e,n,this.ctx,{createCanvasGraphics:e=>new t(e,this.commonObjs,this.objs,this.canvasFactory,this.webGLContext)},s)}else i=(0,a.getShadingPatternFromIR)(e);return i},setStrokeColorN:function(){this.current.strokeColor=this.getColorN_Pattern(arguments)},setFillColorN:function(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0},setStrokeRGBColor:function(t,e,i){var a=n.Util.makeCssRgb(t,e,i);this.ctx.strokeStyle=a,this.current.strokeColor=a},setFillRGBColor:function(t,e,i){var a=n.Util.makeCssRgb(t,e,i);this.ctx.fillStyle=a,this.current.fillColor=a,this.current.patternFill=!1},shadingFill:function(t){var e=this.ctx;this.save();var i=(0,a.getShadingPatternFromIR)(t);e.fillStyle=i.getPattern(e,this,!0);var s=e.mozCurrentTransformInverse;if(s){var o=e.canvas,r=o.width,c=o.height,l=n.Util.applyTransform([0,0],s),d=n.Util.applyTransform([0,c],s),h=n.Util.applyTransform([r,0],s),u=n.Util.applyTransform([r,c],s),p=Math.min(l[0],d[0],h[0],u[0]),b=Math.min(l[1],d[1],h[1],u[1]),f=Math.max(l[0],d[0],h[0],u[0]),m=Math.max(l[1],d[1],h[1],u[1]);this.ctx.fillRect(p,b,f-p,m-b)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.restore()},beginInlineImage:function(){(0,n.unreachable)("Should not call beginInlineImage")},beginImageData:function(){(0,n.unreachable)("Should not call beginImageData")},paintFormXObjectBegin:function(t,e){this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(t)&&6===t.length&&this.transform.apply(this,t),this.baseTransform=this.ctx.mozCurrentTransform,e&&(this.ctx.rect(e[0],e[1],e[2]-e[0],e[3]-e[1]),this.clip(),this.endPath())},paintFormXObjectEnd:function(){this.restore(),this.baseTransform=this.baseTransformStack.pop()},beginGroup:function(t){this.save();var e=this.ctx;t.isolated||(0,n.info)("TODO: Support non-isolated groups."),t.knockout&&(0,n.warn)("Knockout groups not supported.");var i=e.mozCurrentTransform;if(t.matrix&&e.transform.apply(e,t.matrix),!t.bbox)throw new Error("Bounding box is required.");var a=n.Util.getAxialAlignedBoundingBox(t.bbox,e.mozCurrentTransform);a=n.Util.intersect(a,[0,0,e.canvas.width,e.canvas.height])||[0,0,0,0];var s=Math.floor(a[0]),o=Math.floor(a[1]),r=Math.max(Math.ceil(a[2])-s,1),l=Math.max(Math.ceil(a[3])-o,1),d=1,h=1;r>4096&&(d=r/4096,r=4096),l>4096&&(h=l/4096,l=4096);var u="groupAt"+this.groupLevel;t.smask&&(u+="_smask_"+this.smaskCounter++%2);var p=this.cachedCanvases.getCanvas(u,r,l,!0),b=p.context;b.scale(1/d,1/h),b.translate(-s,-o),b.transform.apply(b,i),t.smask?this.smaskStack.push({canvas:p.canvas,context:b,offsetX:s,offsetY:o,scaleX:d,scaleY:h,subtype:t.smask.subtype,backdrop:t.smask.backdrop,transferMap:t.smask.transferMap||null,startTransformInverse:null}):(e.setTransform(1,0,0,1,0,0),e.translate(s,o),e.scale(d,h)),c(e,b),this.ctx=b,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(e),this.groupLevel++,this.current.activeSMask=null},endGroup:function(t){this.groupLevel--;var e=this.ctx;this.ctx=this.groupStack.pop(),void 0!==this.ctx.imageSmoothingEnabled?this.ctx.imageSmoothingEnabled=!1:this.ctx.mozImageSmoothingEnabled=!1,t.smask?this.tempSMask=this.smaskStack.pop():this.ctx.drawImage(e.canvas,0,0),this.restore()},beginAnnotations:function(){this.save(),this.baseTransform&&this.ctx.setTransform.apply(this.ctx,this.baseTransform)},endAnnotations:function(){this.restore()},beginAnnotation:function(t,e,i){this.save(),l(this.ctx),this.current=new r,Array.isArray(t)&&4===t.length&&(this.ctx.rect(t[0],t[1],t[2]-t[0],t[3]-t[1]),this.clip(),this.endPath()),this.transform.apply(this,e),this.transform.apply(this,i)},endAnnotation:function(){this.restore()},paintImageMaskXObject:function(t){var e=this.ctx,n=t.width,a=t.height,s=this.current.fillColor,o=this.current.patternFill,r=this.processingType3;if(r&&void 0===r.compiled&&(r.compiled=n<=1e3&&a<=1e3?function(t){var e,i,n,a,s=t.width,o=t.height,r=s+1,c=new Uint8Array(r*(o+1)),l=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),d=s+7&-8,h=t.data,u=new Uint8Array(d*o),p=0;for(e=0,a=h.length;e<a;e++)for(var b=128,f=h[e];b>0;)u[p++]=f&b?0:255,b>>=1;var m=0;for(0!==u[p=0]&&(c[0]=1,++m),i=1;i<s;i++)u[p]!==u[p+1]&&(c[i]=u[p]?2:1,++m),p++;for(0!==u[p]&&(c[i]=2,++m),e=1;e<o;e++){n=e*r,u[(p=e*d)-d]!==u[p]&&(c[n]=u[p]?1:8,++m);var g=(u[p]?4:0)+(u[p-d]?8:0);for(i=1;i<s;i++)l[g=(g>>2)+(u[p+1]?4:0)+(u[p-d+1]?8:0)]&&(c[n+i]=l[g],++m),p++;if(u[p-d]!==u[p]&&(c[n+i]=u[p]?2:4,++m),m>1e3)return null}for(n=e*r,0!==u[p=d*(o-1)]&&(c[n]=8,++m),i=1;i<s;i++)u[p]!==u[p+1]&&(c[n+i]=u[p]?4:8,++m),p++;if(0!==u[p]&&(c[n+i]=4,++m),m>1e3)return null;var v=new Int32Array([0,r,-1,0,-r,0,0,0,1]),_=[];for(e=0;m&&e<=o;e++){for(var y=e*r,x=y+s;y<x&&!c[y];)y++;if(y!==x){var C,O=[y%r,e],D=c[y],w=y;do{var M=v[D];do{y+=M}while(!c[y]);5!==(C=c[y])&&10!==C?(D=C,c[y]=0):c[y]&=(D=C&51*D>>4)>>2|D<<2,O.push(y%r),O.push(y/r|0),c[y]||--m}while(w!==y);_.push(O),--e}}return function(t){t.save(),t.scale(1/s,-1/o),t.translate(0,-o),t.beginPath();for(let i=0,n=_.length;i<n;i++){var e=_[i];t.moveTo(e[0],e[1]);for(let i=2,n=e.length;i<n;i+=2)t.lineTo(e[i],e[i+1])}t.fill(),t.beginPath(),t.restore()}}({data:t.data,width:n,height:a}):null),r&&r.compiled)r.compiled(e);else{var c=this.cachedCanvases.getCanvas("maskCanvas",n,a),l=c.context;l.save(),i(l,t),l.globalCompositeOperation="source-in",l.fillStyle=o?s.getPattern(l,this):s,l.fillRect(0,0,n,a),l.restore(),this.paintInlineImageXObject(c.canvas)}},paintImageMaskXObjectRepeat:function(t,e,n,a){var s=t.width,o=t.height,r=this.current.fillColor,c=this.current.patternFill,l=this.cachedCanvases.getCanvas("maskCanvas",s,o),d=l.context;d.save(),i(d,t),d.globalCompositeOperation="source-in",d.fillStyle=c?r.getPattern(d,this):r,d.fillRect(0,0,s,o),d.restore();for(var h=this.ctx,u=0,p=a.length;u<p;u+=2)h.save(),h.transform(e,0,0,n,a[u],a[u+1]),h.scale(1,-1),h.drawImage(l.canvas,0,0,s,o,0,-1,1,1),h.restore()},paintImageMaskXObjectGroup:function(t){for(var e=this.ctx,n=this.current.fillColor,a=this.current.patternFill,s=0,o=t.length;s<o;s++){var r=t[s],c=r.width,l=r.height,d=this.cachedCanvases.getCanvas("maskCanvas",c,l),h=d.context;h.save(),i(h,r),h.globalCompositeOperation="source-in",h.fillStyle=a?n.getPattern(h,this):n,h.fillRect(0,0,c,l),h.restore(),e.save(),e.transform.apply(e,r.transform),e.scale(1,-1),e.drawImage(d.canvas,0,0,c,l,0,-1,1,1),e.restore()}},paintImageXObject:function(t){const e=t.startsWith("g_")?this.commonObjs.get(t):this.objs.get(t);e?this.paintInlineImageXObject(e):(0,n.warn)("Dependent image isn't ready yet")},paintImageXObjectRepeat:function(t,e,i,a){const s=t.startsWith("g_")?this.commonObjs.get(t):this.objs.get(t);if(s){for(var o=s.width,r=s.height,c=[],l=0,d=a.length;l<d;l+=2)c.push({transform:[e,0,0,i,a[l],a[l+1]],x:0,y:0,w:o,h:r});this.paintInlineImageXObjectGroup(s,c)}else(0,n.warn)("Dependent image isn't ready yet")},paintInlineImageXObject:function(t){var i=t.width,n=t.height,a=this.ctx;this.save(),a.scale(1/i,-1/n);var s,o,r=a.mozCurrentTransformInverse,c=r[0],l=r[1],d=Math.max(Math.sqrt(c*c+l*l),1),h=r[2],u=r[3],p=Math.max(Math.sqrt(h*h+u*u),1);if("function"==typeof HTMLElement&&t instanceof HTMLElement||!t.data)s=t;else{var b=(o=this.cachedCanvases.getCanvas("inlineImage",i,n)).context;e(b,t),s=o.canvas}for(var f=i,m=n,g="prescale1";d>2&&f>1||p>2&&m>1;){var v=f,_=m;d>2&&f>1&&(d/=f/(v=Math.ceil(f/2))),p>2&&m>1&&(p/=m/(_=Math.ceil(m/2))),(b=(o=this.cachedCanvases.getCanvas(g,v,_)).context).clearRect(0,0,v,_),b.drawImage(s,0,0,f,m,0,0,v,_),s=o.canvas,f=v,m=_,g="prescale1"===g?"prescale2":"prescale1"}if(a.drawImage(s,0,0,f,m,0,-n,i,n),this.imageLayer){var y=this.getCanvasPosition(0,-n);this.imageLayer.appendImage({imgData:t,left:y[0],top:y[1],width:i/r[0],height:n/r[3]})}this.restore()},paintInlineImageXObjectGroup:function(t,i){var n=this.ctx,a=t.width,s=t.height,o=this.cachedCanvases.getCanvas("inlineImage",a,s);e(o.context,t);for(var r=0,c=i.length;r<c;r++){var l=i[r];if(n.save(),n.transform.apply(n,l.transform),n.scale(1,-1),n.drawImage(o.canvas,l.x,l.y,l.w,l.h,0,-1,1,1),this.imageLayer){var d=this.getCanvasPosition(l.x,l.y);this.imageLayer.appendImage({imgData:t,left:d[0],top:d[1],width:a,height:s})}n.restore()}},paintSolidColorImageMask:function(){this.ctx.fillRect(0,0,1,1)},paintXObject:function(){(0,n.warn)("Unsupported 'paintXObject' command.")},markPoint:function(t){},markPointProps:function(t,e){},beginMarkedContent:function(t){},beginMarkedContentProps:function(t,e){},endMarkedContent:function(){},beginCompat:function(){},endCompat:function(){},consumePath:function(){var t=this.ctx;this.pendingClip&&(this.pendingClip===g?t.clip("evenodd"):t.clip(),this.pendingClip=null),t.beginPath()},getSinglePixelWidth(t){if(null===this._cachedGetSinglePixelWidth){const t=this.ctx.mozCurrentTransformInverse;this._cachedGetSinglePixelWidth=Math.sqrt(Math.max(t[0]*t[0]+t[1]*t[1],t[2]*t[2]+t[3]*t[3]))}return this._cachedGetSinglePixelWidth},getCanvasPosition:function(t,e){var i=this.ctx.mozCurrentTransform;return[i[0]*t+i[2]*e+i[4],i[1]*t+i[3]*e+i[5]]}},n.OPS)t.prototype[n.OPS[v]]=t.prototype[v];return t}();e.CanvasGraphics=c},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getShadingPatternFromIR=function(t){var e=a[t[0]];if(!e)throw new Error("Unknown IR type: "+t[0]);return e.fromIR(t)},e.TilingPattern=void 0;var n=i(2),a={};function s(t,e){if(!e||"undefined"==typeof Path2D)return;const i=e[2]-e[0],n=e[3]-e[1],a=new Path2D;a.rect(e[0],e[1],i,n),t.clip(a)}a.RadialAxial={fromIR:function(t){var e=t[1],i=t[2],n=t[3],a=t[4],o=t[5],r=t[6],c=t[7];return{type:"Pattern",getPattern:function(t){var l;s(t,i),"axial"===e?l=t.createLinearGradient(a[0],a[1],o[0],o[1]):"radial"===e&&(l=t.createRadialGradient(a[0],a[1],r,o[0],o[1],c));for(var d=0,h=n.length;d<h;++d){var u=n[d];l.addColorStop(u[0],u[1])}return l}}}};var o=function(){function t(t,e,i,n,a,s,o,r){var c,l=e.coords,d=e.colors,h=t.data,u=4*t.width;l[i+1]>l[n+1]&&(c=i,i=n,n=c,c=s,s=o,o=c),l[n+1]>l[a+1]&&(c=n,n=a,a=c,c=o,o=r,r=c),l[i+1]>l[n+1]&&(c=i,i=n,n=c,c=s,s=o,o=c);var p=(l[i]+e.offsetX)*e.scaleX,b=(l[i+1]+e.offsetY)*e.scaleY,f=(l[n]+e.offsetX)*e.scaleX,m=(l[n+1]+e.offsetY)*e.scaleY,g=(l[a]+e.offsetX)*e.scaleX,v=(l[a+1]+e.offsetY)*e.scaleY;if(!(b>=v))for(var _,y,x,C,O,D,w,M,k=d[s],S=d[s+1],I=d[s+2],P=d[o],V=d[o+1],R=d[o+2],j=d[r],A=d[r+1],W=d[r+2],T=Math.round(b),E=Math.round(v),F=T;F<=E;F++){if(F<m){let t;t=F<b?0:b===m?1:(b-F)/(b-m),_=p-(p-f)*t,y=k-(k-P)*t,x=S-(S-V)*t,C=I-(I-R)*t}else{let t;t=F>v?1:m===v?0:(m-F)/(m-v),_=f-(f-g)*t,y=P-(P-j)*t,x=V-(V-A)*t,C=R-(R-W)*t}let t;t=F<b?0:F>v?1:(b-F)/(b-v),O=p-(p-g)*t,D=k-(k-j)*t,w=S-(S-A)*t,M=I-(I-W)*t;for(var L=Math.round(Math.min(_,O)),Q=Math.round(Math.max(_,O)),N=u*F+4*L,z=L;z<=Q;z++)t=(_-z)/(_-O),t<0?t=0:t>1&&(t=1),h[N++]=y-(y-D)*t|0,h[N++]=x-(x-w)*t|0,h[N++]=C-(C-M)*t|0,h[N++]=255}}function e(e,i,n){var a,s,o=i.coords,r=i.colors;switch(i.type){case"lattice":var c=i.verticesPerRow,l=Math.floor(o.length/c)-1,d=c-1;for(a=0;a<l;a++)for(var h=a*c,u=0;u<d;u++,h++)t(e,n,o[h],o[h+1],o[h+c],r[h],r[h+1],r[h+c]),t(e,n,o[h+c+1],o[h+1],o[h+c],r[h+c+1],r[h+1],r[h+c]);break;case"triangles":for(a=0,s=o.length;a<s;a+=3)t(e,n,o[a],o[a+1],o[a+2],r[a],r[a+1],r[a+2]);break;default:throw new Error("illegal figure")}}return function(t,i,n,a,s,o,r,c){var l,d,h,u,p=Math.floor(t[0]),b=Math.floor(t[1]),f=Math.ceil(t[2])-p,m=Math.ceil(t[3])-b,g=Math.min(Math.ceil(Math.abs(f*i[0]*1.1)),3e3),v=Math.min(Math.ceil(Math.abs(m*i[1]*1.1)),3e3),_=f/g,y=m/v,x={coords:n,colors:a,offsetX:-p,offsetY:-b,scaleX:1/_,scaleY:1/y},C=g+4,O=v+4;if(c.isEnabled)l=c.drawFigures({width:g,height:v,backgroundColor:o,figures:s,context:x}),(d=r.getCanvas("mesh",C,O,!1)).context.drawImage(l,2,2),l=d.canvas;else{var D=(d=r.getCanvas("mesh",C,O,!1)).context,w=D.createImageData(g,v);if(o){var M=w.data;for(h=0,u=M.length;h<u;h+=4)M[h]=o[0],M[h+1]=o[1],M[h+2]=o[2],M[h+3]=255}for(h=0;h<s.length;h++)e(w,s[h],x);D.putImageData(w,2,2),l=d.canvas}return{canvas:l,offsetX:p-2*_,offsetY:b-2*y,scaleX:_,scaleY:y}}}();a.Mesh={fromIR:function(t){var e=t[2],i=t[3],a=t[4],r=t[5],c=t[6],l=t[7],d=t[8];return{type:"Pattern",getPattern:function(t,h,u){var p;if(s(t,l),u)p=n.Util.singularValueDecompose2dScale(t.mozCurrentTransform);else if(p=n.Util.singularValueDecompose2dScale(h.baseTransform),c){var b=n.Util.singularValueDecompose2dScale(c);p=[p[0]*b[0],p[1]*b[1]]}var f=o(r,p,e,i,a,u?null:d,h.cachedCanvases,h.webGLContext);return u||(t.setTransform.apply(t,h.baseTransform),c&&t.transform.apply(t,c)),t.translate(f.offsetX,f.offsetY),t.scale(f.scaleX,f.scaleY),t.createPattern(f.canvas,"no-repeat")}}}},a.Dummy={fromIR:function(){return{type:"Pattern",getPattern:function(){return"hotpink"}}}};var r=function(){function t(t,e,i,n,a){this.operatorList=t[2],this.matrix=t[3]||[1,0,0,1,0,0],this.bbox=t[4],this.xstep=t[5],this.ystep=t[6],this.paintType=t[7],this.tilingType=t[8],this.color=e,this.canvasGraphicsFactory=n,this.baseTransform=a,this.type="Pattern",this.ctx=i}return t.prototype={createPatternCanvas:function(t){var e=this.operatorList,i=this.bbox,a=this.xstep,s=this.ystep,o=this.paintType,r=this.color,c=this.canvasGraphicsFactory;(0,n.info)("TilingType: "+this.tilingType);var l=i[0],d=i[1],h=i[2],u=i[3],p=n.Util.singularValueDecompose2dScale(this.matrix),b=n.Util.singularValueDecompose2dScale(this.baseTransform),f=[p[0]*b[0],p[1]*b[1]],m=this.getSizeAndScale(a,this.ctx.canvas.width,f[0]),g=this.getSizeAndScale(s,this.ctx.canvas.height,f[1]),v=t.cachedCanvases.getCanvas("pattern",m.size,g.size,!0),_=c.createCanvasGraphics(v.context);return _.groupLevel=t.groupLevel,this.setFillAndStrokeStyleToContext(_,o,r),_.transform(m.scale,0,0,g.scale,0,0),_.transform(1,0,0,1,-l,-d),this.clipBbox(_,i,l,d,h,u),_.executeOperatorList(e),this.ctx.transform(1,0,0,1,l,d),this.ctx.scale(1/m.scale,1/g.scale),v.canvas},getSizeAndScale:function(t,e,i){t=Math.abs(t);var n=Math.max(3e3,e),a=Math.ceil(t*i);return a>=n?a=n:i=a/t,{scale:i,size:a}},clipBbox:function(t,e,i,n,a,s){Array.isArray(e)&&4===e.length&&(t.ctx.rect(i,n,a-i,s-n),t.clip(),t.endPath())},setFillAndStrokeStyleToContext:function(t,e,i){const a=t.ctx,s=t.current;switch(e){case 1:var o=this.ctx;a.fillStyle=o.fillStyle,a.strokeStyle=o.strokeStyle,s.fillColor=o.fillStyle,s.strokeColor=o.strokeStyle;break;case 2:var r=n.Util.makeCssRgb(i[0],i[1],i[2]);a.fillStyle=r,a.strokeStyle=r,s.fillColor=r,s.strokeColor=r;break;default:throw new n.FormatError("Unsupported paint type: "+e)}},getPattern:function(t,e){(t=this.ctx).setTransform.apply(t,this.baseTransform),t.transform.apply(t,this.matrix);var i=this.createPatternCanvas(e);return t.createPattern(i,"repeat")}},t}();e.TilingPattern=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlobalWorkerOptions=void 0;const n=Object.create(null);e.GlobalWorkerOptions=n,n.workerPort=void 0===n.workerPort?null:n.workerPort,n.workerSrc=void 0===n.workerSrc?"":n.workerSrc},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MessageHandler=void 0;var n=i(2);function a(t){if("object"!=typeof t||null===t)return t;switch(t.name){case"AbortException":return new n.AbortException(t.message);case"MissingPDFException":return new n.MissingPDFException(t.message);case"UnexpectedResponseException":return new n.UnexpectedResponseException(t.message,t.status);case"UnknownErrorException":return new n.UnknownErrorException(t.message,t.details);default:return new n.UnknownErrorException(t.message,t.toString())}}e.MessageHandler=class{constructor(t,e,i){this.sourceName=t,this.targetName=e,this.comObj=i,this.callbackId=1,this.streamId=1,this.postMessageTransfers=!0,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=t=>{const e=t.data;if(e.targetName!==this.sourceName)return;if(e.stream)return void this._processStreamMessage(e);if(e.callback){const t=e.callbackId,i=this.callbackCapabilities[t];if(!i)throw new Error("Cannot resolve callback "+t);if(delete this.callbackCapabilities[t],1===e.callback)i.resolve(e.data);else{if(2!==e.callback)throw new Error("Unexpected callback case");i.reject(a(e.reason))}return}const n=this.actionHandler[e.action];if(!n)throw new Error("Unknown action from worker: "+e.action);if(e.callbackId){const t=this.sourceName,s=e.sourceName;new Promise((function(t){t(n(e.data))})).then((function(n){i.postMessage({sourceName:t,targetName:s,callback:1,callbackId:e.callbackId,data:n})}),(function(n){i.postMessage({sourceName:t,targetName:s,callback:2,callbackId:e.callbackId,reason:a(n)})}))}else e.streamId?this._createStreamSink(e):n(e.data)},i.addEventListener("message",this._onComObjOnMessage)}on(t,e){const i=this.actionHandler;if(i[t])throw new Error(`There is already an actionName called "${t}"`);i[t]=e}send(t,e,i){this._postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,data:e},i)}sendWithPromise(t,e,i){const a=this.callbackId++,s=(0,n.createPromiseCapability)();this.callbackCapabilities[a]=s;try{this._postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,callbackId:a,data:e},i)}catch(o){s.reject(o)}return s.promise}sendWithStream(t,e,i,s){const o=this.streamId++,r=this.sourceName,c=this.targetName,l=this.comObj;return new ReadableStream({start:i=>{const a=(0,n.createPromiseCapability)();return this.streamControllers[o]={controller:i,startCall:a,pullCall:null,cancelCall:null,isClosed:!1},this._postMessage({sourceName:r,targetName:c,action:t,streamId:o,data:e,desiredSize:i.desiredSize},s),a.promise},pull:t=>{const e=(0,n.createPromiseCapability)();return this.streamControllers[o].pullCall=e,l.postMessage({sourceName:r,targetName:c,stream:6,streamId:o,desiredSize:t.desiredSize}),e.promise},cancel:t=>{(0,n.assert)(t instanceof Error,"cancel must have a valid reason");const e=(0,n.createPromiseCapability)();return this.streamControllers[o].cancelCall=e,this.streamControllers[o].isClosed=!0,l.postMessage({sourceName:r,targetName:c,stream:1,streamId:o,reason:a(t)}),e.promise}},i)}_createStreamSink(t){const e=this,i=this.actionHandler[t.action],s=t.streamId,o=this.sourceName,r=t.sourceName,c=this.comObj,l={enqueue(t,i=1,a){if(this.isCancelled)return;const c=this.desiredSize;this.desiredSize-=i,c>0&&this.desiredSize<=0&&(this.sinkCapability=(0,n.createPromiseCapability)(),this.ready=this.sinkCapability.promise),e._postMessage({sourceName:o,targetName:r,stream:4,streamId:s,chunk:t},a)},close(){this.isCancelled||(this.isCancelled=!0,c.postMessage({sourceName:o,targetName:r,stream:3,streamId:s}),delete e.streamSinks[s])},error(t){(0,n.assert)(t instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,c.postMessage({sourceName:o,targetName:r,stream:5,streamId:s,reason:a(t)}))},sinkCapability:(0,n.createPromiseCapability)(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:t.desiredSize,ready:null};l.sinkCapability.resolve(),l.ready=l.sinkCapability.promise,this.streamSinks[s]=l,new Promise((function(e){e(i(t.data,l))})).then((function(){c.postMessage({sourceName:o,targetName:r,stream:8,streamId:s,success:!0})}),(function(t){c.postMessage({sourceName:o,targetName:r,stream:8,streamId:s,reason:a(t)})}))}_processStreamMessage(t){const e=t.streamId,i=this.sourceName,s=t.sourceName,o=this.comObj;switch(t.stream){case 8:t.success?this.streamControllers[e].startCall.resolve():this.streamControllers[e].startCall.reject(a(t.reason));break;case 7:t.success?this.streamControllers[e].pullCall.resolve():this.streamControllers[e].pullCall.reject(a(t.reason));break;case 6:if(!this.streamSinks[e]){o.postMessage({sourceName:i,targetName:s,stream:7,streamId:e,success:!0});break}this.streamSinks[e].desiredSize<=0&&t.desiredSize>0&&this.streamSinks[e].sinkCapability.resolve(),this.streamSinks[e].desiredSize=t.desiredSize;const{onPull:r}=this.streamSinks[t.streamId];new Promise((function(t){t(r&&r())})).then((function(){o.postMessage({sourceName:i,targetName:s,stream:7,streamId:e,success:!0})}),(function(t){o.postMessage({sourceName:i,targetName:s,stream:7,streamId:e,reason:a(t)})}));break;case 4:if((0,n.assert)(this.streamControllers[e],"enqueue should have stream controller"),this.streamControllers[e].isClosed)break;this.streamControllers[e].controller.enqueue(t.chunk);break;case 3:if((0,n.assert)(this.streamControllers[e],"close should have stream controller"),this.streamControllers[e].isClosed)break;this.streamControllers[e].isClosed=!0,this.streamControllers[e].controller.close(),this._deleteStreamController(e);break;case 5:(0,n.assert)(this.streamControllers[e],"error should have stream controller"),this.streamControllers[e].controller.error(a(t.reason)),this._deleteStreamController(e);break;case 2:t.success?this.streamControllers[e].cancelCall.resolve():this.streamControllers[e].cancelCall.reject(a(t.reason)),this._deleteStreamController(e);break;case 1:if(!this.streamSinks[e])break;const{onCancel:c}=this.streamSinks[t.streamId];new Promise((function(e){e(c&&c(a(t.reason)))})).then((function(){o.postMessage({sourceName:i,targetName:s,stream:2,streamId:e,success:!0})}),(function(t){o.postMessage({sourceName:i,targetName:s,stream:2,streamId:e,reason:a(t)})})),this.streamSinks[e].sinkCapability.reject(a(t.reason)),this.streamSinks[e].isCancelled=!0,delete this.streamSinks[e];break;default:throw new Error("Unexpected stream case")}}async _deleteStreamController(t){await Promise.allSettled([this.streamControllers[t].startCall,this.streamControllers[t].pullCall,this.streamControllers[t].cancelCall].map((function(t){return t&&t.promise}))),delete this.streamControllers[t]}_postMessage(t,e){e&&this.postMessageTransfers?this.comObj.postMessage(t,e):this.comObj.postMessage(t)}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Metadata=void 0;var n=i(2),a=i(13);e.Metadata=class{constructor(t){(0,n.assert)("string"==typeof t,"Metadata: input is not a string"),t=this._repair(t);const e=(new a.SimpleXMLParser).parseFromString(t);this._metadataMap=new Map,e&&this._parse(e)}_repair(t){return t.replace(/^[^<]+/,"").replace(/>\\376\\377([^<]+)/g,(function(t,e){const i=e.replace(/\\([0-3])([0-7])([0-7])/g,(function(t,e,i,n){return String.fromCharCode(64*e+8*i+1*n)})).replace(/&(amp|apos|gt|lt|quot);/g,(function(t,e){switch(e){case"amp":return"&";case"apos":return"'";case"gt":return">";case"lt":return"<";case"quot":return'"'}throw new Error(`_repair: ${e} isn't defined.`)}));let n="";for(let a=0,s=i.length;a<s;a+=2){const t=256*i.charCodeAt(a)+i.charCodeAt(a+1);n+=t>=32&&t<127&&60!==t&&62!==t&&38!==t?String.fromCharCode(t):"&#x"+(65536+t).toString(16).substring(1)+";"}return">"+n}))}_parse(t){let e=t.documentElement;if("rdf:rdf"!==e.nodeName.toLowerCase())for(e=e.firstChild;e&&"rdf:rdf"!==e.nodeName.toLowerCase();)e=e.nextSibling;const i=e?e.nodeName.toLowerCase():null;if(!e||"rdf:rdf"!==i||!e.hasChildNodes())return;const n=e.childNodes;for(let a=0,s=n.length;a<s;a++){const t=n[a];if("rdf:description"===t.nodeName.toLowerCase())for(let e=0,i=t.childNodes.length;e<i;e++)if("#text"!==t.childNodes[e].nodeName.toLowerCase()){const i=t.childNodes[e],n=i.nodeName.toLowerCase();this._metadataMap.set(n,i.textContent.trim())}}}get(t){return this._metadataMap.has(t)?this._metadataMap.get(t):null}getAll(){const t=Object.create(null);for(const[e,i]of this._metadataMap)t[e]=i;return t}has(t){return this._metadataMap.has(t)}}},function(t,e,i){"use strict";function n(t,e){const i=t[e];return" "===i||"\n"===i||"\r"===i||"\t"===i}Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleXMLParser=void 0;class a{constructor(t,e){this.nodeName=t,this.nodeValue=e,Object.defineProperty(this,"parentNode",{value:null,writable:!0})}get firstChild(){return this.childNodes&&this.childNodes[0]}get nextSibling(){const t=this.parentNode.childNodes;if(!t)return;const e=t.indexOf(this);return-1!==e?t[e+1]:void 0}get textContent(){return this.childNodes?this.childNodes.map((function(t){return t.textContent})).join(""):this.nodeValue||""}hasChildNodes(){return this.childNodes&&this.childNodes.length>0}}e.SimpleXMLParser=class extends class{_resolveEntities(t){return t.replace(/&([^;]+);/g,(t,e)=>{if("#x"===e.substring(0,2))return String.fromCharCode(parseInt(e.substring(2),16));if("#"===e.substring(0,1))return String.fromCharCode(parseInt(e.substring(1),10));switch(e){case"lt":return"<";case"gt":return">";case"amp":return"&";case"quot":return'"'}return this.onResolveEntity(e)})}_parseContent(t,e){const i=[];let a=e;function s(){for(;a<t.length&&n(t,a);)++a}for(;a<t.length&&!n(t,a)&&">"!==t[a]&&"/"!==t[a];)++a;const o=t.substring(e,a);for(s();a<t.length&&">"!==t[a]&&"/"!==t[a]&&"?"!==t[a];){s();let e="",o="";for(;a<t.length&&!n(t,a)&&"="!==t[a];)e+=t[a],++a;if(s(),"="!==t[a])return null;++a,s();const r=t[a];if('"'!==r&&"'"!==r)return null;const c=t.indexOf(r,++a);if(c<0)return null;o=t.substring(a,c),i.push({name:e,value:this._resolveEntities(o)}),a=c+1,s()}return{name:o,attributes:i,parsed:a-e}}_parseProcessingInstruction(t,e){let i=e;for(;i<t.length&&!n(t,i)&&">"!==t[i]&&"/"!==t[i];)++i;const a=t.substring(e,i);!function(){for(;i<t.length&&n(t,i);)++i}();const s=i;for(;i<t.length&&("?"!==t[i]||">"!==t[i+1]);)++i;return{name:a,value:t.substring(s,i),parsed:i-e}}parseXml(t){let e=0;for(;e<t.length;){let i=e;if("<"===t[e]){let e;switch(++i,t[i]){case"/":if(++i,e=t.indexOf(">",i),e<0)return void this.onError(-9);this.onEndElement(t.substring(i,e)),i=e+1;break;case"?":++i;const n=this._parseProcessingInstruction(t,i);if("?>"!==t.substring(i+n.parsed,i+n.parsed+2))return void this.onError(-3);this.onPi(n.name,n.value),i+=n.parsed+2;break;case"!":if("--"===t.substring(i+1,i+3)){if(e=t.indexOf("--\x3e",i+3),e<0)return void this.onError(-5);this.onComment(t.substring(i+3,e)),i=e+3}else if("[CDATA["===t.substring(i+1,i+8)){if(e=t.indexOf("]]>",i+8),e<0)return void this.onError(-2);this.onCdata(t.substring(i+8,e)),i=e+3}else{if("DOCTYPE"!==t.substring(i+1,i+8))return void this.onError(-6);{const n=t.indexOf("[",i+8);let a=!1;if(e=t.indexOf(">",i+8),e<0)return void this.onError(-4);if(n>0&&e>n){if(e=t.indexOf("]>",i+8),e<0)return void this.onError(-4);a=!0}const s=t.substring(i+8,e+(a?1:0));this.onDoctype(s),i=e+(a?2:1)}}break;default:const a=this._parseContent(t,i);if(null===a)return void this.onError(-6);let s=!1;if("/>"===t.substring(i+a.parsed,i+a.parsed+2))s=!0;else if(">"!==t.substring(i+a.parsed,i+a.parsed+1))return void this.onError(-9);this.onBeginElement(a.name,a.attributes,s),i+=a.parsed+(s?2:1)}}else{for(;i<t.length&&"<"!==t[i];)i++;const n=t.substring(e,i);this.onText(this._resolveEntities(n))}e=i}}onResolveEntity(t){return`&${t};`}onPi(t,e){}onComment(t){}onCdata(t){}onDoctype(t){}onText(t){}onBeginElement(t,e,i){}onEndElement(t){}onError(t){}}{constructor(){super(),this._currentFragment=null,this._stack=null,this._errorCode=0}parseFromString(t){if(this._currentFragment=[],this._stack=[],this._errorCode=0,this.parseXml(t),0!==this._errorCode)return;const[e]=this._currentFragment;return e?{documentElement:e}:void 0}onResolveEntity(t){switch(t){case"apos":return"'"}return super.onResolveEntity(t)}onText(t){if(function(t){for(let e=0,i=t.length;e<i;e++)if(!n(t,e))return!1;return!0}(t))return;const e=new a("#text",t);this._currentFragment.push(e)}onCdata(t){const e=new a("#text",t);this._currentFragment.push(e)}onBeginElement(t,e,i){const n=new a(t);n.childNodes=[],this._currentFragment.push(n),i||(this._stack.push(this._currentFragment),this._currentFragment=n.childNodes)}onEndElement(t){this._currentFragment=this._stack.pop()||[];const e=this._currentFragment[this._currentFragment.length-1];if(e)for(let i=0,n=e.childNodes.length;i<n;i++)e.childNodes[i].parentNode=e}onError(t){this._errorCode=t}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PDFDataTransportStream=void 0;var n=i(2);e.PDFDataTransportStream=class{constructor(t,e){(0,n.assert)(e,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=t.progressiveDone||!1;const i=t.initialData;if(i&&i.length>0){const t=new Uint8Array(i).buffer;this._queuedChunks.push(t)}this._pdfDataRangeTransport=e,this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._contentLength=t.length,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener((t,e)=>{this._onReceiveData({begin:t,chunk:e})}),this._pdfDataRangeTransport.addProgressListener((t,e)=>{this._onProgress({loaded:t,total:e})}),this._pdfDataRangeTransport.addProgressiveReadListener(t=>{this._onReceiveData({chunk:t})}),this._pdfDataRangeTransport.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),this._pdfDataRangeTransport.transportReady()}_onReceiveData(t){const e=new Uint8Array(t.chunk).buffer;if(void 0===t.begin)this._fullRequestReader?this._fullRequestReader._enqueue(e):this._queuedChunks.push(e);else{const i=this._rangeReaders.some((function(i){return i._begin===t.begin&&(i._enqueue(e),!0)}));(0,n.assert)(i,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){return this._fullRequestReader?this._fullRequestReader._loaded:0}_onProgress(t){if(void 0===t.total){const e=this._rangeReaders[0];e&&e.onProgress&&e.onProgress({loaded:t.loaded})}else{const e=this._fullRequestReader;e&&e.onProgress&&e.onProgress({loaded:t.loaded,total:t.total})}}_onProgressiveDone(){this._fullRequestReader&&this._fullRequestReader.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(t){const e=this._rangeReaders.indexOf(t);e>=0&&this._rangeReaders.splice(e,1)}getFullReader(){(0,n.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const t=this._queuedChunks;return this._queuedChunks=null,new a(this,t,this._progressiveDone)}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;const i=new s(this,t,e);return this._pdfDataRangeTransport.requestDataRange(t,e),this._rangeReaders.push(i),i}cancelAllRequests(t){this._fullRequestReader&&this._fullRequestReader.cancel(t),this._rangeReaders.slice(0).forEach((function(e){e.cancel(t)})),this._pdfDataRangeTransport.abort()}};class a{constructor(t,e,i=!1){this._stream=t,this._done=i||!1,this._filename=null,this._queuedChunks=e||[],this._loaded=0;for(const n of this._queuedChunks)this._loaded+=n.byteLength;this._requests=[],this._headersReady=Promise.resolve(),t._fullRequestReader=this,this.onProgress=null}_enqueue(t){this._done||(this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunks.push(t),this._loaded+=t.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const t=(0,n.createPromiseCapability)();return this._requests.push(t),t.promise}cancel(t){this._done=!0,this._requests.forEach((function(t){t.resolve({value:void 0,done:!0})})),this._requests=[]}progressiveDone(){this._done||(this._done=!0)}}class s{constructor(t,e,i){this._stream=t,this._begin=e,this._end=i,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(t){this._done||(0===this._requests.length?this._queuedChunk=t:(this._requests.shift().resolve({value:t,done:!1}),this._requests.forEach((function(t){t.resolve({value:void 0,done:!0})})),this._requests=[]),this._done=!0,this._stream._removeRangeReader(this))}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const t=this._queuedChunk;return this._queuedChunk=null,{value:t,done:!1}}if(this._done)return{value:void 0,done:!0};const t=(0,n.createPromiseCapability)();return this._requests.push(t),t.promise}cancel(t){this._done=!0,this._requests.forEach((function(t){t.resolve({value:void 0,done:!0})})),this._requests=[],this._stream._removeRangeReader(this)}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebGLContext=void 0;var n=i(2);e.WebGLContext=class{constructor({enable:t=!1}){this._enabled=!0===t}get isEnabled(){let t=this._enabled;return t&&(t=a.tryInitGL()),(0,n.shadow)(this,"isEnabled",t)}composeSMask({layer:t,mask:e,properties:i}){return a.composeSMask(t,e,i)}drawFigures({width:t,height:e,backgroundColor:i,figures:n,context:s}){return a.drawFigures(t,e,i,n,s)}clear(){a.cleanup()}};var a=function(){function t(t,e,i){var n=t.createShader(i);if(t.shaderSource(n,e),t.compileShader(n),!t.getShaderParameter(n,t.COMPILE_STATUS)){var a=t.getShaderInfoLog(n);throw new Error("Error during shader compilation: "+a)}return n}function e(e,i){return t(e,i,e.VERTEX_SHADER)}function i(e,i){return t(e,i,e.FRAGMENT_SHADER)}function n(t,e){for(var i=t.createProgram(),n=0,a=e.length;n<a;++n)t.attachShader(i,e[n]);if(t.linkProgram(i),!t.getProgramParameter(i,t.LINK_STATUS)){var s=t.getProgramInfoLog(i);throw new Error("Error during program linking: "+s)}return i}function a(t,e,i){t.activeTexture(i);var n=t.createTexture();return t.bindTexture(t.TEXTURE_2D,n),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e),n}var s,o;function r(){s||(o=document.createElement("canvas"),s=o.getContext("webgl",{premultipliedalpha:!1}))}var c=null,l=null;return{tryInitGL(){try{return r(),!!s}catch(t){}return!1},composeSMask:function(t,l,d){var h=t.width,u=t.height;c||function(){var t,a;r(),t=o,o=null,a=s,s=null;var l=n(a,[e(a," attribute vec2 a_position; attribute vec2 a_texCoord; uniform vec2 u_resolution; varying vec2 v_texCoord; void main() { vec2 clipSpace = (a_position / u_resolution) * 2.0 - 1.0; gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); v_texCoord = a_texCoord; } "),i(a," precision mediump float; uniform vec4 u_backdrop; uniform int u_subtype; uniform sampler2D u_image; uniform sampler2D u_mask; varying vec2 v_texCoord; void main() { vec4 imageColor = texture2D(u_image, v_texCoord); vec4 maskColor = texture2D(u_mask, v_texCoord); if (u_backdrop.a > 0.0) { maskColor.rgb = maskColor.rgb * maskColor.a + u_backdrop.rgb * (1.0 - maskColor.a); } float lum; if (u_subtype == 0) { lum = maskColor.a; } else { lum = maskColor.r * 0.3 + maskColor.g * 0.59 + maskColor.b * 0.11; } imageColor.a *= lum; imageColor.rgb *= imageColor.a; gl_FragColor = imageColor; } ")]);a.useProgram(l);var d={};d.gl=a,d.canvas=t,d.resolutionLocation=a.getUniformLocation(l,"u_resolution"),d.positionLocation=a.getAttribLocation(l,"a_position"),d.backdropLocation=a.getUniformLocation(l,"u_backdrop"),d.subtypeLocation=a.getUniformLocation(l,"u_subtype");var h=a.getAttribLocation(l,"a_texCoord"),u=a.getUniformLocation(l,"u_image"),p=a.getUniformLocation(l,"u_mask"),b=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,b),a.bufferData(a.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1]),a.STATIC_DRAW),a.enableVertexAttribArray(h),a.vertexAttribPointer(h,2,a.FLOAT,!1,0,0),a.uniform1i(u,0),a.uniform1i(p,1),c=d}();var p=c,b=p.canvas,f=p.gl;b.width=h,b.height=u,f.viewport(0,0,f.drawingBufferWidth,f.drawingBufferHeight),f.uniform2f(p.resolutionLocation,h,u),d.backdrop?f.uniform4f(p.resolutionLocation,d.backdrop[0],d.backdrop[1],d.backdrop[2],1):f.uniform4f(p.resolutionLocation,0,0,0,0),f.uniform1i(p.subtypeLocation,"Luminosity"===d.subtype?1:0);var m=a(f,t,f.TEXTURE0),g=a(f,l,f.TEXTURE1),v=f.createBuffer();return f.bindBuffer(f.ARRAY_BUFFER,v),f.bufferData(f.ARRAY_BUFFER,new Float32Array([0,0,h,0,0,u,0,u,h,0,h,u]),f.STATIC_DRAW),f.enableVertexAttribArray(p.positionLocation),f.vertexAttribPointer(p.positionLocation,2,f.FLOAT,!1,0,0),f.clearColor(0,0,0,0),f.enable(f.BLEND),f.blendFunc(f.ONE,f.ONE_MINUS_SRC_ALPHA),f.clear(f.COLOR_BUFFER_BIT),f.drawArrays(f.TRIANGLES,0,6),f.flush(),f.deleteTexture(m),f.deleteTexture(g),f.deleteBuffer(v),b},drawFigures:function(t,a,c,d,h){l||function(){var t,a;r(),t=o,o=null,a=s,s=null;var c=n(a,[e(a," attribute vec2 a_position; attribute vec3 a_color; uniform vec2 u_resolution; uniform vec2 u_scale; uniform vec2 u_offset; varying vec4 v_color; void main() { vec2 position = (a_position + u_offset) * u_scale; vec2 clipSpace = (position / u_resolution) * 2.0 - 1.0; gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); v_color = vec4(a_color / 255.0, 1.0); } "),i(a," precision mediump float; varying vec4 v_color; void main() { gl_FragColor = v_color; } ")]);a.useProgram(c);var d={};d.gl=a,d.canvas=t,d.resolutionLocation=a.getUniformLocation(c,"u_resolution"),d.scaleLocation=a.getUniformLocation(c,"u_scale"),d.offsetLocation=a.getUniformLocation(c,"u_offset"),d.positionLocation=a.getAttribLocation(c,"a_position"),d.colorLocation=a.getAttribLocation(c,"a_color"),l=d}();var u=l,p=u.canvas,b=u.gl;p.width=t,p.height=a,b.viewport(0,0,b.drawingBufferWidth,b.drawingBufferHeight),b.uniform2f(u.resolutionLocation,t,a);var f,m,g,v=0;for(f=0,m=d.length;f<m;f++)switch(d[f].type){case"lattice":v+=((g=d[f].coords.length/d[f].verticesPerRow|0)-1)*(d[f].verticesPerRow-1)*6;break;case"triangles":v+=d[f].coords.length}var _=new Float32Array(2*v),y=new Uint8Array(3*v),x=h.coords,C=h.colors,O=0,D=0;for(f=0,m=d.length;f<m;f++){var w=d[f],M=w.coords,k=w.colors;switch(w.type){case"lattice":var S=w.verticesPerRow;g=M.length/S|0;for(var I=1;I<g;I++)for(var P=I*S+1,V=1;V<S;V++,P++)_[O]=x[M[P-S-1]],_[O+1]=x[M[P-S-1]+1],_[O+2]=x[M[P-S]],_[O+3]=x[M[P-S]+1],_[O+4]=x[M[P-1]],_[O+5]=x[M[P-1]+1],y[D]=C[k[P-S-1]],y[D+1]=C[k[P-S-1]+1],y[D+2]=C[k[P-S-1]+2],y[D+3]=C[k[P-S]],y[D+4]=C[k[P-S]+1],y[D+5]=C[k[P-S]+2],y[D+6]=C[k[P-1]],y[D+7]=C[k[P-1]+1],y[D+8]=C[k[P-1]+2],_[O+6]=_[O+2],_[O+7]=_[O+3],_[O+8]=_[O+4],_[O+9]=_[O+5],_[O+10]=x[M[P]],_[O+11]=x[M[P]+1],y[D+9]=y[D+3],y[D+10]=y[D+4],y[D+11]=y[D+5],y[D+12]=y[D+6],y[D+13]=y[D+7],y[D+14]=y[D+8],y[D+15]=C[k[P]],y[D+16]=C[k[P]+1],y[D+17]=C[k[P]+2],O+=12,D+=18;break;case"triangles":for(var R=0,j=M.length;R<j;R++)_[O]=x[M[R]],_[O+1]=x[M[R]+1],y[D]=C[k[R]],y[D+1]=C[k[R]+1],y[D+2]=C[k[R]+2],O+=2,D+=3}}c?b.clearColor(c[0]/255,c[1]/255,c[2]/255,1):b.clearColor(0,0,0,0),b.clear(b.COLOR_BUFFER_BIT);var A=b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER,A),b.bufferData(b.ARRAY_BUFFER,_,b.STATIC_DRAW),b.enableVertexAttribArray(u.positionLocation),b.vertexAttribPointer(u.positionLocation,2,b.FLOAT,!1,0,0);var W=b.createBuffer();return b.bindBuffer(b.ARRAY_BUFFER,W),b.bufferData(b.ARRAY_BUFFER,y,b.STATIC_DRAW),b.enableVertexAttribArray(u.colorLocation),b.vertexAttribPointer(u.colorLocation,3,b.UNSIGNED_BYTE,!1,0,0),b.uniform2f(u.scaleLocation,h.scaleX,h.scaleY),b.uniform2f(u.offsetLocation,h.offsetX,h.offsetY),b.drawArrays(b.TRIANGLES,0,v),b.flush(),b.deleteBuffer(A),b.deleteBuffer(W),p},cleanup(){c&&c.canvas&&(c.canvas.width=0,c.canvas.height=0),l&&l.canvas&&(l.canvas.width=0,l.canvas.height=0),c=null,l=null}}}()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AnnotationLayer=void 0;var n=i(1),a=i(2);class s{static create(t){switch(t.data.annotationType){case a.AnnotationType.LINK:return new r(t);case a.AnnotationType.TEXT:return new c(t);case a.AnnotationType.WIDGET:switch(t.data.fieldType){case"Tx":return new d(t);case"Btn":return t.data.radioButton?new u(t):t.data.checkBox?new h(t):new p(t);case"Ch":return new b(t)}return new l(t);case a.AnnotationType.POPUP:return new f(t);case a.AnnotationType.FREETEXT:return new g(t);case a.AnnotationType.LINE:return new v(t);case a.AnnotationType.SQUARE:return new _(t);case a.AnnotationType.CIRCLE:return new y(t);case a.AnnotationType.POLYLINE:return new x(t);case a.AnnotationType.CARET:return new O(t);case a.AnnotationType.INK:return new D(t);case a.AnnotationType.POLYGON:return new C(t);case a.AnnotationType.HIGHLIGHT:return new w(t);case a.AnnotationType.UNDERLINE:return new M(t);case a.AnnotationType.SQUIGGLY:return new k(t);case a.AnnotationType.STRIKEOUT:return new S(t);case a.AnnotationType.STAMP:return new I(t);case a.AnnotationType.FILEATTACHMENT:return new P(t);default:return new o(t)}}}class o{constructor(t,e=!1,i=!1){this.isRenderable=e,this.data=t.data,this.layer=t.layer,this.page=t.page,this.viewport=t.viewport,this.linkService=t.linkService,this.downloadManager=t.downloadManager,this.imageResourcesPath=t.imageResourcesPath,this.renderInteractiveForms=t.renderInteractiveForms,this.svgFactory=t.svgFactory,e&&(this.container=this._createContainer(i))}_createContainer(t=!1){const e=this.data,i=this.page,n=this.viewport,s=document.createElement("section");let o=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1];s.setAttribute("data-annotation-id",e.id);const c=a.Util.normalizeRect([e.rect[0],i.view[3]-e.rect[1]+i.view[1],e.rect[2],i.view[3]-e.rect[3]+i.view[1]]);if(s.style.transform=`matrix(${n.transform.join(",")})`,s.style.transformOrigin=`-${c[0]}px -${c[1]}px`,!t&&e.borderStyle.width>0){s.style.borderWidth=e.borderStyle.width+"px",e.borderStyle.style!==a.AnnotationBorderStyleType.UNDERLINE&&(o-=2*e.borderStyle.width,r-=2*e.borderStyle.width);const t=e.borderStyle.horizontalCornerRadius,i=e.borderStyle.verticalCornerRadius;switch((t>0||i>0)&&(s.style.borderRadius=`${t}px / ${i}px`),e.borderStyle.style){case a.AnnotationBorderStyleType.SOLID:s.style.borderStyle="solid";break;case a.AnnotationBorderStyleType.DASHED:s.style.borderStyle="dashed";break;case a.AnnotationBorderStyleType.BEVELED:(0,a.warn)("Unimplemented border style: beveled");break;case a.AnnotationBorderStyleType.INSET:(0,a.warn)("Unimplemented border style: inset");break;case a.AnnotationBorderStyleType.UNDERLINE:s.style.borderBottomStyle="solid"}e.color?s.style.borderColor=a.Util.makeCssRgb(0|e.color[0],0|e.color[1],0|e.color[2]):s.style.borderWidth=0}return s.style.left=c[0]+"px",s.style.top=c[1]+"px",s.style.width=o+"px",s.style.height=r+"px",s}_createPopup(t,e,i){e||((e=document.createElement("div")).style.height=t.style.height,e.style.width=t.style.width,t.appendChild(e));const n=new m({container:t,trigger:e,color:i.color,title:i.title,modificationDate:i.modificationDate,contents:i.contents,hideWrapper:!0}).render();n.style.left=t.style.width,t.appendChild(n)}render(){(0,a.unreachable)("Abstract method `AnnotationElement.render` called")}}class r extends o{constructor(t){super(t,!!(t.data.url||t.data.dest||t.data.action))}render(){this.container.className="linkAnnotation";const{data:t,linkService:e}=this,i=document.createElement("a");return t.url?(0,n.addLinkAttributes)(i,{url:t.url,target:t.newWindow?n.LinkTarget.BLANK:e.externalLinkTarget,rel:e.externalLinkRel,enabled:e.externalLinkEnabled}):t.action?this._bindNamedAction(i,t.action):this._bindLink(i,t.dest),this.container.appendChild(i),this.container}_bindLink(t,e){t.href=this.linkService.getDestinationHash(e),t.onclick=()=>(e&&this.linkService.navigateTo(e),!1),e&&(t.className="internalLink")}_bindNamedAction(t,e){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeNamedAction(e),!1),t.className="internalLink"}}class c extends o{constructor(t){super(t,!!(t.data.hasPopup||t.data.title||t.data.contents))}render(){this.container.className="textAnnotation";const t=document.createElement("img");return t.style.height=this.container.style.height,t.style.width=this.container.style.width,t.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",t.alt="[{{type}} Annotation]",t.dataset.l10nId="text_annotation_type",t.dataset.l10nArgs=JSON.stringify({type:this.data.name}),this.data.hasPopup||this._createPopup(this.container,t,this.data),this.container.appendChild(t),this.container}}class l extends o{render(){return this.container}}class d extends l{constructor(t){super(t,t.renderInteractiveForms||!t.data.hasAppearance&&!!t.data.fieldValue)}render(){this.container.className="textWidgetAnnotation";let t=null;if(this.renderInteractiveForms){if(this.data.multiLine?(t=document.createElement("textarea"),t.textContent=this.data.fieldValue):(t=document.createElement("input"),t.type="text",t.setAttribute("value",this.data.fieldValue)),t.disabled=this.data.readOnly,t.name=this.data.fieldName,null!==this.data.maxLen&&(t.maxLength=this.data.maxLen),this.data.comb){const e=(this.data.rect[2]-this.data.rect[0])/this.data.maxLen;t.classList.add("comb"),t.style.letterSpacing=`calc(${e}px - 1ch)`}}else{t=document.createElement("div"),t.textContent=this.data.fieldValue,t.style.verticalAlign="middle",t.style.display="table-cell";let e=null;this.data.fontRefName&&this.page.commonObjs.has(this.data.fontRefName)&&(e=this.page.commonObjs.get(this.data.fontRefName)),this._setTextStyle(t,e)}return null!==this.data.textAlignment&&(t.style.textAlign=["left","center","right"][this.data.textAlignment]),this.container.appendChild(t),this.container}_setTextStyle(t,e){const i=t.style;if(i.fontSize=this.data.fontSize+"px",i.direction=this.data.fontDirection<0?"rtl":"ltr",!e)return;let n="normal";e.black?n="900":e.bold&&(n="bold"),i.fontWeight=n,i.fontStyle=e.italic?"italic":"normal",i.fontFamily=(e.loadedName?`"${e.loadedName}", `:"")+(e.fallbackName||"Helvetica, sans-serif")}}class h extends l{constructor(t){super(t,t.renderInteractiveForms)}render(){this.container.className="buttonWidgetAnnotation checkBox";const t=document.createElement("input");return t.disabled=this.data.readOnly,t.type="checkbox",t.name=this.data.fieldName,this.data.fieldValue&&"Off"!==this.data.fieldValue&&t.setAttribute("checked",!0),this.container.appendChild(t),this.container}}class u extends l{constructor(t){super(t,t.renderInteractiveForms)}render(){this.container.className="buttonWidgetAnnotation radioButton";const t=document.createElement("input");return t.disabled=this.data.readOnly,t.type="radio",t.name=this.data.fieldName,this.data.fieldValue===this.data.buttonValue&&t.setAttribute("checked",!0),this.container.appendChild(t),this.container}}class p extends r{render(){const t=super.render();return t.className="buttonWidgetAnnotation pushButton",t}}class b extends l{constructor(t){super(t,t.renderInteractiveForms)}render(){this.container.className="choiceWidgetAnnotation";const t=document.createElement("select");t.disabled=this.data.readOnly,t.name=this.data.fieldName,this.data.combo||(t.size=this.data.options.length,this.data.multiSelect&&(t.multiple=!0));for(const e of this.data.options){const i=document.createElement("option");i.textContent=e.displayValue,i.value=e.exportValue,this.data.fieldValue.includes(e.displayValue)&&i.setAttribute("selected",!0),t.appendChild(i)}return this.container.appendChild(t),this.container}}class f extends o{constructor(t){super(t,!(!t.data.title&&!t.data.contents))}render(){if(this.container.className="popupAnnotation",["Line","Square","Circle","PolyLine","Polygon","Ink"].includes(this.data.parentType))return this.container;const t=this.layer.querySelector(`[data-annotation-id="${this.data.parentId}"]`);if(!t)return this.container;const e=new m({container:this.container,trigger:t,color:this.data.color,title:this.data.title,modificationDate:this.data.modificationDate,contents:this.data.contents}),i=parseFloat(t.style.left),n=parseFloat(t.style.width);return this.container.style.transformOrigin=`-${i+n}px -${t.style.top}`,this.container.style.left=i+n+"px",this.container.appendChild(e.render()),this.container}}class m{constructor(t){this.container=t.container,this.trigger=t.trigger,this.color=t.color,this.title=t.title,this.modificationDate=t.modificationDate,this.contents=t.contents,this.hideWrapper=t.hideWrapper||!1,this.pinned=!1}render(){const t=document.createElement("div");t.className="popupWrapper",this.hideElement=this.hideWrapper?t:this.container,this.hideElement.setAttribute("hidden",!0);const e=document.createElement("div");e.className="popup";const i=this.color;i&&(e.style.backgroundColor=a.Util.makeCssRgb(0|.7*(255-i[0])+i[0],0|.7*(255-i[1])+i[1],0|.7*(255-i[2])+i[2]));const s=document.createElement("h1");s.textContent=this.title,e.appendChild(s);const o=n.PDFDateString.toDateObject(this.modificationDate);if(o){const t=document.createElement("span");t.textContent="{{date}}, {{time}}",t.dataset.l10nId="annotation_date_string",t.dataset.l10nArgs=JSON.stringify({date:o.toLocaleDateString(),time:o.toLocaleTimeString()}),e.appendChild(t)}const r=this._formatContents(this.contents);return e.appendChild(r),this.trigger.addEventListener("click",this._toggle.bind(this)),this.trigger.addEventListener("mouseover",this._show.bind(this,!1)),this.trigger.addEventListener("mouseout",this._hide.bind(this,!1)),e.addEventListener("click",this._hide.bind(this,!0)),t.appendChild(e),t}_formatContents(t){const e=document.createElement("p"),i=t.split(/(?:\r\n?|\n)/);for(let n=0,a=i.length;n<a;++n)e.appendChild(document.createTextNode(i[n])),n<a-1&&e.appendChild(document.createElement("br"));return e}_toggle(){this.pinned?this._hide(!0):this._show(!0)}_show(t=!1){t&&(this.pinned=!0),this.hideElement.hasAttribute("hidden")&&(this.hideElement.removeAttribute("hidden"),this.container.style.zIndex+=1)}_hide(t=!0){t&&(this.pinned=!1),this.hideElement.hasAttribute("hidden")||this.pinned||(this.hideElement.setAttribute("hidden",!0),this.container.style.zIndex-=1)}}class g extends o{constructor(t){super(t,!!(t.data.hasPopup||t.data.title||t.data.contents),!0)}render(){return this.container.className="freeTextAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class v extends o{constructor(t){super(t,!!(t.data.hasPopup||t.data.title||t.data.contents),!0)}render(){this.container.className="lineAnnotation";const t=this.data,e=this.svgFactory.create(t.rect[2]-t.rect[0],t.rect[3]-t.rect[1]),i=this.svgFactory.createElement("svg:line");return i.setAttribute("x1",t.rect[2]-t.lineCoordinates[0]),i.setAttribute("y1",t.rect[3]-t.lineCoordinates[1]),i.setAttribute("x2",t.rect[2]-t.lineCoordinates[2]),i.setAttribute("y2",t.rect[3]-t.lineCoordinates[3]),i.setAttribute("stroke-width",t.borderStyle.width||1),i.setAttribute("stroke","transparent"),e.appendChild(i),this.container.append(e),this._createPopup(this.container,i,t),this.container}}class _ extends o{constructor(t){super(t,!!(t.data.hasPopup||t.data.title||t.data.contents),!0)}render(){this.container.className="squareAnnotation";const t=this.data,e=t.rect[2]-t.rect[0],i=t.rect[3]-t.rect[1],n=this.svgFactory.create(e,i),a=t.borderStyle.width,s=this.svgFactory.createElement("svg:rect");return s.setAttribute("x",a/2),s.setAttribute("y",a/2),s.setAttribute("width",e-a),s.setAttribute("height",i-a),s.setAttribute("stroke-width",a||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","none"),n.appendChild(s),this.container.append(n),this._createPopup(this.container,s,t),this.container}}class y extends o{constructor(t){super(t,!!(t.data.hasPopup||t.data.title||t.data.contents),!0)}render(){this.container.className="circleAnnotation";const t=this.data,e=t.rect[2]-t.rect[0],i=t.rect[3]-t.rect[1],n=this.svgFactory.create(e,i),a=t.borderStyle.width,s=this.svgFactory.createElement("svg:ellipse");return s.setAttribute("cx",e/2),s.setAttribute("cy",i/2),s.setAttribute("rx",e/2-a/2),s.setAttribute("ry",i/2-a/2),s.setAttribute("stroke-width",a||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","none"),n.appendChild(s),this.container.append(n),this._createPopup(this.container,s,t),this.container}}class x extends o{constructor(t){super(t,!!(t.data.hasPopup||t.data.title||t.data.contents),!0),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.className=this.containerClassName;const t=this.data,e=this.svgFactory.create(t.rect[2]-t.rect[0],t.rect[3]-t.rect[1]);let i=[];for(const a of t.vertices)i.push(a.x-t.rect[0]+","+(t.rect[3]-a.y));i=i.join(" ");const n=this.svgFactory.createElement(this.svgElementName);return n.setAttribute("points",i),n.setAttribute("stroke-width",t.borderStyle.width||1),n.setAttribute("stroke","transparent"),n.setAttribute("fill","none"),e.appendChild(n),this.container.append(e),this._createPopup(this.container,n,t),this.container}}class C extends x{constructor(t){super(t),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class O extends o{constructor(t){super(t,!!(t.data.hasPopup||t.data.title||t.data.contents),!0)}render(){return this.container.className="caretAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class D extends o{constructor(t){super(t,!!(t.data.hasPopup||t.data.title||t.data.contents),!0),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline"}render(){this.container.className=this.containerClassName;const t=this.data,e=this.svgFactory.create(t.rect[2]-t.rect[0],t.rect[3]-t.rect[1]);for(const i of t.inkLists){let n=[];for(const e of i)n.push(`${e.x-t.rect[0]},${t.rect[3]-e.y}`);n=n.join(" ");const a=this.svgFactory.createElement(this.svgElementName);a.setAttribute("points",n),a.setAttribute("stroke-width",t.borderStyle.width||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","none"),this._createPopup(this.container,a,t),e.appendChild(a)}return this.container.append(e),this.container}}class w extends o{constructor(t){super(t,!!(t.data.hasPopup||t.data.title||t.data.contents),!0)}render(){return this.container.className="highlightAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class M extends o{constructor(t){super(t,!!(t.data.hasPopup||t.data.title||t.data.contents),!0)}render(){return this.container.className="underlineAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class k extends o{constructor(t){super(t,!!(t.data.hasPopup||t.data.title||t.data.contents),!0)}render(){return this.container.className="squigglyAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class S extends o{constructor(t){super(t,!!(t.data.hasPopup||t.data.title||t.data.contents),!0)}render(){return this.container.className="strikeoutAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class I extends o{constructor(t){super(t,!!(t.data.hasPopup||t.data.title||t.data.contents),!0)}render(){return this.container.className="stampAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class P extends o{constructor(t){super(t,!0);const{filename:e,content:i}=this.data.file;this.filename=(0,n.getFilenameFromUrl)(e),this.content=i,this.linkService.eventBus&&this.linkService.eventBus.dispatch("fileattachmentannotation",{source:this,id:(0,a.stringToPDFString)(e),filename:e,content:i})}render(){this.container.className="fileAttachmentAnnotation";const t=document.createElement("div");return t.style.height=this.container.style.height,t.style.width=this.container.style.width,t.addEventListener("dblclick",this._download.bind(this)),this.data.hasPopup||!this.data.title&&!this.data.contents||this._createPopup(this.container,t,this.data),this.container.appendChild(t),this.container}_download(){this.downloadManager?this.downloadManager.downloadData(this.content,this.filename,""):(0,a.warn)("Download cannot be started due to unavailable download manager")}}e.AnnotationLayer=class{static render(t){const e=[],i=[];for(const n of t.annotations)n&&(n.annotationType!==a.AnnotationType.POPUP?e.push(n):i.push(n));i.length&&e.push(...i);for(const a of e){const e=s.create({data:a,layer:t.div,page:t.page,viewport:t.viewport,linkService:t.linkService,downloadManager:t.downloadManager,imageResourcesPath:t.imageResourcesPath||"",renderInteractiveForms:t.renderInteractiveForms||!1,svgFactory:new n.DOMSVGFactory});e.isRenderable&&t.div.appendChild(e.render())}}static update(t){for(const e of t.annotations){const i=t.div.querySelector(`[data-annotation-id="${e.id}"]`);i&&(i.style.transform=`matrix(${t.viewport.transform.join(",")})`)}t.div.removeAttribute("hidden")}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderTextLayer=void 0;var n=i(2),a=function(){var t=/\S/;function e(e,i,a){var s=document.createElement("span"),o={angle:0,canvasWidth:0,isWhitespace:!1,originalTransform:null,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,scale:1};if(e._textDivs.push(s),!t.test(i.str))return o.isWhitespace=!0,void e._textDivProperties.set(s,o);var r=n.Util.transform(e._viewport.transform,i.transform),c=Math.atan2(r[1],r[0]),l=a[i.fontName];l.vertical&&(c+=Math.PI/2);var d=Math.sqrt(r[2]*r[2]+r[3]*r[3]),h=d;let u,p;l.ascent?h*=l.ascent:l.descent&&(h*=1+l.descent),0===c?(u=r[4],p=r[5]-h):(u=r[4]+h*Math.sin(c),p=r[5]-h*Math.cos(c)),s.style.left=u+"px",s.style.top=p+"px",s.style.fontSize=d+"px",s.style.fontFamily=l.fontFamily,s.textContent=i.str,e._fontInspectorEnabled&&(s.dataset.fontName=i.fontName),0!==c&&(o.angle=c*(180/Math.PI));let b=!1;if(i.str.length>1)b=!0;else if(i.transform[0]!==i.transform[3]){const t=Math.abs(i.transform[0]),e=Math.abs(i.transform[3]);t!==e&&Math.max(t,e)/Math.min(t,e)>1.5&&(b=!0)}if(b&&(o.canvasWidth=l.vertical?i.height*e._viewport.scale:i.width*e._viewport.scale),e._textDivProperties.set(s,o),e._textContentStream&&e._layoutText(s),e._enhanceTextSelection){var f=1,m=0;0!==c&&(f=Math.cos(c),m=Math.sin(c));var g,v,_=(l.vertical?i.height:i.width)*e._viewport.scale,y=d;v=0!==c?n.Util.getAxialAlignedBoundingBox([0,0,_,y],g=[f,m,-m,f,u,p]):[u,p,u+_,p+y],e._bounds.push({left:v[0],top:v[1],right:v[2],bottom:v[3],div:s,size:[_,y],m:g})}}function i(t){if(!t._canceled){var e=t._textDivs,i=t._capability,n=e.length;if(n>1e5)return t._renderingDone=!0,void i.resolve();if(!t._textContentStream)for(var a=0;a<n;a++)t._layoutText(e[a]);t._renderingDone=!0,i.resolve()}}function a(t,e,i){let n=0;for(let a=0;a<i;a++){const i=t[e++];i>0&&(n=n?Math.min(i,n):i)}return n}function s(t,e){e.sort((function(t,e){return t.x1-e.x1||t.index-e.index}));var i=[{start:-1/0,end:1/0,boundary:{x1:-1/0,y1:-1/0,x2:0,y2:1/0,index:-1,x1New:0,x2New:0}}];e.forEach((function(t){for(var e=0;e<i.length&&i[e].end<=t.y1;)e++;for(var n,a,s=i.length-1;s>=0&&i[s].start>=t.y2;)s--;var o,r,c=-1/0;for(o=e;o<=s;o++){var l;(l=(a=(n=i[o]).boundary).x2>t.x1?a.index>t.index?a.x1New:t.x1:void 0===a.x2New?(a.x2+t.x1)/2:a.x2New)>c&&(c=l)}for(t.x1New=c,o=e;o<=s;o++)void 0===(a=(n=i[o]).boundary).x2New?a.x2>t.x1?a.index>t.index&&(a.x2New=a.x2):a.x2New=c:a.x2New>c&&(a.x2New=Math.max(c,a.x2));var d=[],h=null;for(o=e;o<=s;o++){var u=(a=(n=i[o]).boundary).x2>t.x2?a:t;h===u?d[d.length-1].end=n.end:(d.push({start:n.start,end:n.end,boundary:u}),h=u)}for(i[e].start<t.y1&&(d[0].start=t.y1,d.unshift({start:i[e].start,end:t.y1,boundary:i[e].boundary})),t.y2<i[s].end&&(d[d.length-1].end=t.y2,d.push({start:t.y2,end:i[s].end,boundary:i[s].boundary})),o=e;o<=s;o++)if(void 0===(a=(n=i[o]).boundary).x2New){var p=!1;for(r=e-1;!p&&r>=0&&i[r].start>=a.y1;r--)p=i[r].boundary===a;for(r=s+1;!p&&r<i.length&&i[r].end<=a.y2;r++)p=i[r].boundary===a;for(r=0;!p&&r<d.length;r++)p=d[r].boundary===a;p||(a.x2New=c)}Array.prototype.splice.apply(i,[e,s-e+1].concat(d))})),i.forEach((function(e){var i=e.boundary;void 0===i.x2New&&(i.x2New=Math.max(t,i.x2))}))}function o({textContent:t,textContentStream:e,container:i,viewport:a,textDivs:s,textContentItemsStr:o,enhanceTextSelection:r}){this._textContent=t,this._textContentStream=e,this._container=i,this._viewport=a,this._textDivs=s||[],this._textContentItemsStr=o||[],this._enhanceTextSelection=!!r,this._fontInspectorEnabled=!(!globalThis.FontInspector||!globalThis.FontInspector.enabled),this._reader=null,this._layoutTextLastFontSize=null,this._layoutTextLastFontFamily=null,this._layoutTextCtx=null,this._textDivProperties=new WeakMap,this._renderingDone=!1,this._canceled=!1,this._capability=(0,n.createPromiseCapability)(),this._renderTimer=null,this._bounds=[],this._capability.promise.finally(()=>{this._layoutTextCtx&&(this._layoutTextCtx.canvas.width=0,this._layoutTextCtx.canvas.height=0,this._layoutTextCtx=null)}).catch(()=>{})}return o.prototype={get promise(){return this._capability.promise},cancel:function(){this._canceled=!0,this._reader&&(this._reader.cancel(new n.AbortException("TextLayer task cancelled.")),this._reader=null),null!==this._renderTimer&&(clearTimeout(this._renderTimer),this._renderTimer=null),this._capability.reject(new Error("TextLayer task cancelled."))},_processItems(t,i){for(let n=0,a=t.length;n<a;n++)this._textContentItemsStr.push(t[n].str),e(this,t[n],i)},_layoutText(t){const e=this._textDivProperties.get(t);if(e.isWhitespace)return;let i="";if(0!==e.canvasWidth){const{fontSize:n,fontFamily:a}=t.style;n===this._layoutTextLastFontSize&&a===this._layoutTextLastFontFamily||(this._layoutTextCtx.font=`${n} ${a}`,this._layoutTextLastFontSize=n,this._layoutTextLastFontFamily=a);const{width:s}=this._layoutTextCtx.measureText(t.textContent);s>0&&(e.scale=e.canvasWidth/s,i=`scaleX(${e.scale})`)}0!==e.angle&&(i=`rotate(${e.angle}deg) ${i}`),i.length>0&&(this._enhanceTextSelection&&(e.originalTransform=i),t.style.transform=i),this._textDivProperties.set(t,e),this._container.appendChild(t)},_render:function(t){const e=(0,n.createPromiseCapability)();let a=Object.create(null);const s=document.createElement("canvas");if(s.mozOpaque=!0,this._layoutTextCtx=s.getContext("2d",{alpha:!1}),this._textContent)this._processItems(this._textContent.items,this._textContent.styles),e.resolve();else{if(!this._textContentStream)throw new Error('Neither "textContent" nor "textContentStream" parameters specified.');{const t=()=>{this._reader.read().then(({value:i,done:n})=>{n?e.resolve():(Object.assign(a,i.styles),this._processItems(i.items,a),t())},e.reject)};this._reader=this._textContentStream.getReader(),t()}}e.promise.then(()=>{a=null,t?this._renderTimer=setTimeout(()=>{i(this),this._renderTimer=null},t):i(this)},this._capability.reject)},expandTextDivs:function(t){if(!this._enhanceTextSelection||!this._renderingDone)return;null!==this._bounds&&(function(t){for(var e=t._bounds,i=t._viewport,o=function(t,e,i){var n=i.map((function(t,e){return{x1:t.left,y1:t.top,x2:t.right,y2:t.bottom,index:e,x1New:void 0,x2New:void 0}}));s(t,n);var a=new Array(i.length);return n.forEach((function(t){a[t.index]={left:t.x1New,top:0,right:t.x2New,bottom:0}})),i.map((function(e,i){var s=a[i],o=n[i];o.x1=e.top,o.y1=t-s.right,o.x2=e.bottom,o.y2=t-s.left,o.index=i,o.x1New=void 0,o.x2New=void 0})),s(e,n),n.forEach((function(t){var e=t.index;a[e].top=t.x1New,a[e].bottom=t.x2New})),a}(i.width,i.height,e),r=0;r<o.length;r++){var c=e[r].div,l=t._textDivProperties.get(c);if(0!==l.angle){var d=o[r],h=e[r],u=h.m,p=u[0],b=u[1],f=[[0,0],[0,h.size[1]],[h.size[0],0],h.size],m=new Float64Array(64);f.forEach((function(t,e){var i=n.Util.applyTransform(t,u);m[e+0]=p&&(d.left-i[0])/p,m[e+4]=b&&(d.top-i[1])/b,m[e+8]=p&&(d.right-i[0])/p,m[e+12]=b&&(d.bottom-i[1])/b,m[e+16]=b&&(d.left-i[0])/-b,m[e+20]=p&&(d.top-i[1])/p,m[e+24]=b&&(d.right-i[0])/-b,m[e+28]=p&&(d.bottom-i[1])/p,m[e+32]=p&&(d.left-i[0])/-p,m[e+36]=b&&(d.top-i[1])/-b,m[e+40]=p&&(d.right-i[0])/-p,m[e+44]=b&&(d.bottom-i[1])/-b,m[e+48]=b&&(d.left-i[0])/b,m[e+52]=p&&(d.top-i[1])/-p,m[e+56]=b&&(d.right-i[0])/b,m[e+60]=p&&(d.bottom-i[1])/-p}));var g=1+Math.min(Math.abs(p),Math.abs(b));l.paddingLeft=a(m,32,16)/g,l.paddingTop=a(m,48,16)/g,l.paddingRight=a(m,0,16)/g,l.paddingBottom=a(m,16,16)/g,t._textDivProperties.set(c,l)}else l.paddingLeft=e[r].left-o[r].left,l.paddingTop=e[r].top-o[r].top,l.paddingRight=o[r].right-e[r].right,l.paddingBottom=o[r].bottom-e[r].bottom,t._textDivProperties.set(c,l)}}(this),this._bounds=null);const e=[],i=[];for(var o=0,r=this._textDivs.length;o<r;o++){const n=this._textDivs[o],a=this._textDivProperties.get(n);a.isWhitespace||(t?(e.length=0,i.length=0,a.originalTransform&&e.push(a.originalTransform),a.paddingTop>0?(i.push(a.paddingTop+"px"),e.push(`translateY(${-a.paddingTop}px)`)):i.push(0),i.push(a.paddingRight>0?a.paddingRight/a.scale+"px":0),i.push(a.paddingBottom>0?a.paddingBottom+"px":0),a.paddingLeft>0?(i.push(a.paddingLeft/a.scale+"px"),e.push(`translateX(${-a.paddingLeft/a.scale}px)`)):i.push(0),n.style.padding=i.join(" "),e.length&&(n.style.transform=e.join(" "))):(n.style.padding=null,n.style.transform=a.originalTransform))}}},function(t){var e=new o({textContent:t.textContent,textContentStream:t.textContentStream,container:t.container,viewport:t.viewport,textDivs:t.textDivs,textContentItemsStr:t.textContentItemsStr,enhanceTextSelection:t.enhanceTextSelection});return e._render(t.timeout),e}}();e.renderTextLayer=a},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SVGGraphics=void 0;var n=i(2),a=i(1),s=i(4);let o=function(){throw new Error("Not implemented: SVGGraphics")};e.SVGGraphics=o;{const t={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},i="http://www.w3.org/XML/1998/namespace",l="http://www.w3.org/1999/xlink",d=["butt","round","square"],h=["miter","round","bevel"],u=function(){const t=new Uint8Array([137,80,78,71,13,10,26,10]),e=new Int32Array(256);for(let n=0;n<256;n++){let t=n;for(let e=0;e<8;e++)t=1&t?3988292384^t>>1&2147483647:t>>1&2147483647;e[n]=t}function i(t,i,n,a){let s=a;const o=i.length;n[s]=o>>24&255,n[s+1]=o>>16&255,n[s+2]=o>>8&255,n[s+3]=255&o,s+=4,n[s]=255&t.charCodeAt(0),n[s+1]=255&t.charCodeAt(1),n[s+2]=255&t.charCodeAt(2),n[s+3]=255&t.charCodeAt(3),s+=4,n.set(i,s),s+=i.length;const r=function(t,i,n){let a=-1;for(let s=i;s<n;s++)a=a>>>8^e[255&(a^t[s])];return-1^a}(n,a+4,s);n[s]=r>>24&255,n[s+1]=r>>16&255,n[s+2]=r>>8&255,n[s+3]=255&r}function a(t){let e=t.length;const i=Math.ceil(e/65535),n=new Uint8Array(2+e+5*i+4);let a=0;n[a++]=120,n[a++]=156;let s=0;for(;e>65535;)n[a++]=0,n[a++]=255,n[a++]=255,n[a++]=0,n[a++]=0,n.set(t.subarray(s,s+65535),a),a+=65535,s+=65535,e-=65535;n[a++]=1,n[a++]=255&e,n[a++]=e>>8&255,n[a++]=255&~e,n[a++]=(65535&~e)>>8&255,n.set(t.subarray(s),a),a+=t.length-s;const o=function(t,e,i){let n=1,a=0;for(let s=0;s<i;++s)n=(n+(255&t[s]))%65521,a=(a+n)%65521;return a<<16|n}(t,0,t.length);return n[a++]=o>>24&255,n[a++]=o>>16&255,n[a++]=o>>8&255,n[a++]=255&o,n}return function(e,o,r){return function(e,o,r,c){const l=e.width,d=e.height;let h,u,p;const b=e.data;switch(o){case n.ImageKind.GRAYSCALE_1BPP:u=0,h=1,p=l+7>>3;break;case n.ImageKind.RGB_24BPP:u=2,h=8,p=3*l;break;case n.ImageKind.RGBA_32BPP:u=6,h=8,p=4*l;break;default:throw new Error("invalid format")}const f=new Uint8Array((1+p)*d);let m=0,g=0;for(let t=0;t<d;++t)f[m++]=0,f.set(b.subarray(g,g+p),m),g+=p,m+=p;if(o===n.ImageKind.GRAYSCALE_1BPP&&c){m=0;for(let t=0;t<d;t++){m++;for(let t=0;t<p;t++)f[m++]^=255}}const v=new Uint8Array([l>>24&255,l>>16&255,l>>8&255,255&l,d>>24&255,d>>16&255,d>>8&255,255&d,h,u,0,0,0]),_=function(t){if(!s.isNodeJS)return a(t);try{let e;e=parseInt(process.versions.node)>=8?t:Buffer.from(t);const i=__webpack_require__(1).deflateSync(e,{level:9});return i instanceof Uint8Array?i:new Uint8Array(i)}catch(e){(0,n.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+e)}return a(t)}(f),y=new Uint8Array(t.length+36+v.length+_.length);let x=0;return y.set(t,x),x+=t.length,i("IHDR",v,y,x),x+=12+v.length,i("IDATA",_,y,x),x+=12+_.length,i("IEND",new Uint8Array(0),y,x),(0,n.createObjectURL)(y,"image/png",r)}(e,void 0===e.kind?n.ImageKind.GRAYSCALE_1BPP:e.kind,o,r)}}();class p{constructor(){this.fontSizeScale=1,this.fontWeight=t.fontWeight,this.fontSize=0,this.textMatrix=n.IDENTITY_MATRIX,this.fontMatrix=n.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=n.TextRenderingMode.FILL,this.textMatrixScale=1,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRise=0,this.fillColor=t.fillColor,this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.lineJoin="",this.lineCap="",this.miterLimit=0,this.dashArray=[],this.dashPhase=0,this.dependencies=[],this.activeClipUrl=null,this.clipGroup=null,this.maskId=""}clone(){return Object.create(this)}setCurrentPoint(t,e){this.x=t,this.y=e}}function r(t){if(Number.isInteger(t))return t.toString();const e=t.toFixed(10);let i=e.length-1;if("0"!==e[i])return e;do{i--}while("0"===e[i]);return e.substring(0,"."===e[i]?i:i+1)}function c(t){if(0===t[4]&&0===t[5]){if(0===t[1]&&0===t[2])return 1===t[0]&&1===t[3]?"":`scale(${r(t[0])} ${r(t[3])})`;if(t[0]===t[3]&&t[1]===-t[2])return`rotate(${r(180*Math.acos(t[0])/Math.PI)})`}else if(1===t[0]&&0===t[1]&&0===t[2]&&1===t[3])return`translate(${r(t[4])} ${r(t[5])})`;return`matrix(${r(t[0])} ${r(t[1])} ${r(t[2])} ${r(t[3])} ${r(t[4])} `+r(t[5])+")"}let b=0,f=0,m=0;e.SVGGraphics=o=class{constructor(t,e,i=!1){this.svgFactory=new a.DOMSVGFactory,this.current=new p,this.transformMatrix=n.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=t,this.objs=e,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!i,this._operatorIdMapping=[];for(const a in n.OPS)this._operatorIdMapping[n.OPS[a]]=a}save(){this.transformStack.push(this.transformMatrix);const t=this.current;this.extraStack.push(t),this.current=t.clone()}restore(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}group(t){this.save(),this.executeOpTree(t),this.restore()}loadDependencies(t){const e=t.fnArray,i=t.argsArray;for(let a=0,s=e.length;a<s;a++)if(e[a]===n.OPS.dependency)for(const t of i[a]){const e=t.startsWith("g_")?this.commonObjs:this.objs,i=new Promise(i=>{e.get(t,i)});this.current.dependencies.push(i)}return Promise.all(this.current.dependencies)}transform(t,e,i,a,s,o){this.transformMatrix=n.Util.transform(this.transformMatrix,[t,e,i,a,s,o]),this.tgrp=null}getSVG(t,e){this.viewport=e;const i=this._initialize(e);return this.loadDependencies(t).then(()=>(this.transformMatrix=n.IDENTITY_MATRIX,this.executeOpTree(this.convertOpList(t)),i))}convertOpList(t){const e=this._operatorIdMapping,i=t.argsArray,n=t.fnArray,a=[];for(let s=0,o=n.length;s<o;s++){const t=n[s];a.push({fnId:t,fn:e[t],args:i[s]})}return function(t){let e=[];const i=[];for(const n of t)"save"!==n.fn?"restore"===n.fn?e=i.pop():e.push(n):(e.push({fnId:92,fn:"group",items:[]}),i.push(e),e=e[e.length-1].items);return e}(a)}executeOpTree(t){for(const e of t){const t=e.fn,i=e.args;switch(0|e.fnId){case n.OPS.beginText:this.beginText();break;case n.OPS.dependency:break;case n.OPS.setLeading:this.setLeading(i);break;case n.OPS.setLeadingMoveText:this.setLeadingMoveText(i[0],i[1]);break;case n.OPS.setFont:this.setFont(i);break;case n.OPS.showText:case n.OPS.showSpacedText:this.showText(i[0]);break;case n.OPS.endText:this.endText();break;case n.OPS.moveText:this.moveText(i[0],i[1]);break;case n.OPS.setCharSpacing:this.setCharSpacing(i[0]);break;case n.OPS.setWordSpacing:this.setWordSpacing(i[0]);break;case n.OPS.setHScale:this.setHScale(i[0]);break;case n.OPS.setTextMatrix:this.setTextMatrix(i[0],i[1],i[2],i[3],i[4],i[5]);break;case n.OPS.setTextRise:this.setTextRise(i[0]);break;case n.OPS.setTextRenderingMode:this.setTextRenderingMode(i[0]);break;case n.OPS.setLineWidth:this.setLineWidth(i[0]);break;case n.OPS.setLineJoin:this.setLineJoin(i[0]);break;case n.OPS.setLineCap:this.setLineCap(i[0]);break;case n.OPS.setMiterLimit:this.setMiterLimit(i[0]);break;case n.OPS.setFillRGBColor:this.setFillRGBColor(i[0],i[1],i[2]);break;case n.OPS.setStrokeRGBColor:this.setStrokeRGBColor(i[0],i[1],i[2]);break;case n.OPS.setStrokeColorN:this.setStrokeColorN(i);break;case n.OPS.setFillColorN:this.setFillColorN(i);break;case n.OPS.shadingFill:this.shadingFill(i[0]);break;case n.OPS.setDash:this.setDash(i[0],i[1]);break;case n.OPS.setRenderingIntent:this.setRenderingIntent(i[0]);break;case n.OPS.setFlatness:this.setFlatness(i[0]);break;case n.OPS.setGState:this.setGState(i[0]);break;case n.OPS.fill:this.fill();break;case n.OPS.eoFill:this.eoFill();break;case n.OPS.stroke:this.stroke();break;case n.OPS.fillStroke:this.fillStroke();break;case n.OPS.eoFillStroke:this.eoFillStroke();break;case n.OPS.clip:this.clip("nonzero");break;case n.OPS.eoClip:this.clip("evenodd");break;case n.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case n.OPS.paintImageXObject:this.paintImageXObject(i[0]);break;case n.OPS.paintInlineImageXObject:this.paintInlineImageXObject(i[0]);break;case n.OPS.paintImageMaskXObject:this.paintImageMaskXObject(i[0]);break;case n.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(i[0],i[1]);break;case n.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case n.OPS.closePath:this.closePath();break;case n.OPS.closeStroke:this.closeStroke();break;case n.OPS.closeFillStroke:this.closeFillStroke();break;case n.OPS.closeEOFillStroke:this.closeEOFillStroke();break;case n.OPS.nextLine:this.nextLine();break;case n.OPS.transform:this.transform(i[0],i[1],i[2],i[3],i[4],i[5]);break;case n.OPS.constructPath:this.constructPath(i[0],i[1]);break;case n.OPS.endPath:this.endPath();break;case 92:this.group(e.items);break;default:(0,n.warn)("Unimplemented operator "+t)}}}setWordSpacing(t){this.current.wordSpacing=t}setCharSpacing(t){this.current.charSpacing=t}nextLine(){this.moveText(0,this.current.leading)}setTextMatrix(t,e,i,n,a,s){const o=this.current;o.textMatrix=o.lineMatrix=[t,e,i,n,a,s],o.textMatrixScale=Math.sqrt(t*t+e*e),o.x=o.lineX=0,o.y=o.lineY=0,o.xcoords=[],o.ycoords=[],o.tspan=this.svgFactory.createElement("svg:tspan"),o.tspan.setAttributeNS(null,"font-family",o.fontFamily),o.tspan.setAttributeNS(null,"font-size",r(o.fontSize)+"px"),o.tspan.setAttributeNS(null,"y",r(-o.y)),o.txtElement=this.svgFactory.createElement("svg:text"),o.txtElement.appendChild(o.tspan)}beginText(){const t=this.current;t.x=t.lineX=0,t.y=t.lineY=0,t.textMatrix=n.IDENTITY_MATRIX,t.lineMatrix=n.IDENTITY_MATRIX,t.textMatrixScale=1,t.tspan=this.svgFactory.createElement("svg:tspan"),t.txtElement=this.svgFactory.createElement("svg:text"),t.txtgrp=this.svgFactory.createElement("svg:g"),t.xcoords=[],t.ycoords=[]}moveText(t,e){const i=this.current;i.x=i.lineX+=t,i.y=i.lineY+=e,i.xcoords=[],i.ycoords=[],i.tspan=this.svgFactory.createElement("svg:tspan"),i.tspan.setAttributeNS(null,"font-family",i.fontFamily),i.tspan.setAttributeNS(null,"font-size",r(i.fontSize)+"px"),i.tspan.setAttributeNS(null,"y",r(-i.y))}showText(e){const a=this.current,s=a.font,o=a.fontSize;if(0===o)return;const l=a.fontSizeScale,d=a.charSpacing,h=a.wordSpacing,u=a.fontDirection,p=a.textHScale*u,b=s.vertical,f=b?1:-1,m=s.defaultVMetrics,g=o*a.fontMatrix[0];let v=0;for(const t of e){if(null===t){v+=u*h;continue}if((0,n.isNum)(t)){v+=f*t*o/1e3;continue}const e=(t.isSpace?h:0)+d,i=t.fontChar;let r,c,p,_=t.width;if(b){let e;const i=t.vmetric||m;e=t.vmetric?i[1]:.5*_,e=-e*g,_=i?-i[0]:_,r=e/l,c=(v+i[2]*g)/l}else r=v/l,c=0;(t.isInFont||s.missingFile)&&(a.xcoords.push(a.x+r),b&&a.ycoords.push(-a.y+c),a.tspan.textContent+=i),p=b?_*g-e*u:_*g+e*u,v+=p}a.tspan.setAttributeNS(null,"x",a.xcoords.map(r).join(" ")),a.tspan.setAttributeNS(null,"y",b?a.ycoords.map(r).join(" "):r(-a.y)),b?a.y-=v:a.x+=v*p,a.tspan.setAttributeNS(null,"font-family",a.fontFamily),a.tspan.setAttributeNS(null,"font-size",r(a.fontSize)+"px"),a.fontStyle!==t.fontStyle&&a.tspan.setAttributeNS(null,"font-style",a.fontStyle),a.fontWeight!==t.fontWeight&&a.tspan.setAttributeNS(null,"font-weight",a.fontWeight);const _=a.textRenderingMode&n.TextRenderingMode.FILL_STROKE_MASK;_===n.TextRenderingMode.FILL||_===n.TextRenderingMode.FILL_STROKE?(a.fillColor!==t.fillColor&&a.tspan.setAttributeNS(null,"fill",a.fillColor),a.fillAlpha<1&&a.tspan.setAttributeNS(null,"fill-opacity",a.fillAlpha)):a.tspan.setAttributeNS(null,"fill",a.textRenderingMode===n.TextRenderingMode.ADD_TO_PATH?"transparent":"none"),(_===n.TextRenderingMode.STROKE||_===n.TextRenderingMode.FILL_STROKE)&&this._setStrokeAttributes(a.tspan,1/(a.textMatrixScale||1));let y=a.textMatrix;0!==a.textRise&&(y=y.slice(),y[5]+=a.textRise),a.txtElement.setAttributeNS(null,"transform",`${c(y)} scale(${r(p)}, -1)`),a.txtElement.setAttributeNS(i,"xml:space","preserve"),a.txtElement.appendChild(a.tspan),a.txtgrp.appendChild(a.txtElement),this._ensureTransformGroup().appendChild(a.txtElement)}setLeadingMoveText(t,e){this.setLeading(-e),this.moveText(t,e)}addFontStyle(t){if(!t.data)throw new Error('addFontStyle: No font data available, ensure that the "fontExtraProperties" API parameter is set.');this.cssStyle||(this.cssStyle=this.svgFactory.createElement("svg:style"),this.cssStyle.setAttributeNS(null,"type","text/css"),this.defs.appendChild(this.cssStyle));const e=(0,n.createObjectURL)(t.data,t.mimetype,this.forceDataSchema);this.cssStyle.textContent+=`@font-face { font-family: "${t.loadedName}"; src: url(${e}); }\n`}setFont(t){const e=this.current,i=this.commonObjs.get(t[0]);let a=t[1];e.font=i,!this.embedFonts||i.missingFile||this.embeddedFonts[i.loadedName]||(this.addFontStyle(i),this.embeddedFonts[i.loadedName]=i),e.fontMatrix=i.fontMatrix?i.fontMatrix:n.FONT_IDENTITY_MATRIX;let s="normal";i.black?s="900":i.bold&&(s="bold");const o=i.italic?"italic":"normal";a<0?(a=-a,e.fontDirection=-1):e.fontDirection=1,e.fontSize=a,e.fontFamily=i.loadedName,e.fontWeight=s,e.fontStyle=o,e.tspan=this.svgFactory.createElement("svg:tspan"),e.tspan.setAttributeNS(null,"y",r(-e.y)),e.xcoords=[],e.ycoords=[]}endText(){const t=this.current;t.textRenderingMode&n.TextRenderingMode.ADD_TO_PATH_FLAG&&t.txtElement&&t.txtElement.hasChildNodes()&&(t.element=t.txtElement,this.clip("nonzero"),this.endPath())}setLineWidth(t){t>0&&(this.current.lineWidth=t)}setLineCap(t){this.current.lineCap=d[t]}setLineJoin(t){this.current.lineJoin=h[t]}setMiterLimit(t){this.current.miterLimit=t}setStrokeAlpha(t){this.current.strokeAlpha=t}setStrokeRGBColor(t,e,i){this.current.strokeColor=n.Util.makeCssRgb(t,e,i)}setFillAlpha(t){this.current.fillAlpha=t}setFillRGBColor(t,e,i){this.current.fillColor=n.Util.makeCssRgb(t,e,i),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(t){this.current.strokeColor=this._makeColorN_Pattern(t)}setFillColorN(t){this.current.fillColor=this._makeColorN_Pattern(t)}shadingFill(t){const e=this.viewport.width,i=this.viewport.height,a=n.Util.inverseTransform(this.transformMatrix),s=n.Util.applyTransform([0,0],a),o=n.Util.applyTransform([0,i],a),r=n.Util.applyTransform([e,0],a),c=n.Util.applyTransform([e,i],a),l=Math.min(s[0],o[0],r[0],c[0]),d=Math.min(s[1],o[1],r[1],c[1]),h=Math.max(s[0],o[0],r[0],c[0]),u=Math.max(s[1],o[1],r[1],c[1]),p=this.svgFactory.createElement("svg:rect");p.setAttributeNS(null,"x",l),p.setAttributeNS(null,"y",d),p.setAttributeNS(null,"width",h-l),p.setAttributeNS(null,"height",u-d),p.setAttributeNS(null,"fill",this._makeShadingPattern(t)),this.current.fillAlpha<1&&p.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().appendChild(p)}_makeColorN_Pattern(t){return"TilingPattern"===t[0]?this._makeTilingPattern(t):this._makeShadingPattern(t)}_makeTilingPattern(t){const e=t[1],i=t[2],a=t[3]||n.IDENTITY_MATRIX,[s,o,r,c]=t[4],l=t[5],d=t[6],h=t[7],u="shading"+m++,[p,b]=n.Util.applyTransform([s,o],a),[f,g]=n.Util.applyTransform([r,c],a),[v,_]=n.Util.singularValueDecompose2dScale(a),y=l*v,x=d*_,C=this.svgFactory.createElement("svg:pattern");C.setAttributeNS(null,"id",u),C.setAttributeNS(null,"patternUnits","userSpaceOnUse"),C.setAttributeNS(null,"width",y),C.setAttributeNS(null,"height",x),C.setAttributeNS(null,"x",""+p),C.setAttributeNS(null,"y",""+b);const O=this.svg,D=this.transformMatrix,w=this.current.fillColor,M=this.current.strokeColor,k=this.svgFactory.create(f-p,g-b);if(this.svg=k,this.transformMatrix=a,2===h){const t=n.Util.makeCssRgb(...e);this.current.fillColor=t,this.current.strokeColor=t}return this.executeOpTree(this.convertOpList(i)),this.svg=O,this.transformMatrix=D,this.current.fillColor=w,this.current.strokeColor=M,C.appendChild(k.childNodes[0]),this.defs.appendChild(C),`url(#${u})`}_makeShadingPattern(t){switch(t[0]){case"RadialAxial":const e="shading"+m++,i=t[3];let a;switch(t[1]){case"axial":const i=t[4],n=t[5];a=this.svgFactory.createElement("svg:linearGradient"),a.setAttributeNS(null,"id",e),a.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),a.setAttributeNS(null,"x1",i[0]),a.setAttributeNS(null,"y1",i[1]),a.setAttributeNS(null,"x2",n[0]),a.setAttributeNS(null,"y2",n[1]);break;case"radial":const s=t[4],o=t[5],r=t[6],c=t[7];a=this.svgFactory.createElement("svg:radialGradient"),a.setAttributeNS(null,"id",e),a.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),a.setAttributeNS(null,"cx",o[0]),a.setAttributeNS(null,"cy",o[1]),a.setAttributeNS(null,"r",c),a.setAttributeNS(null,"fx",s[0]),a.setAttributeNS(null,"fy",s[1]),a.setAttributeNS(null,"fr",r);break;default:throw new Error("Unknown RadialAxial type: "+t[1])}for(const t of i){const e=this.svgFactory.createElement("svg:stop");e.setAttributeNS(null,"offset",t[0]),e.setAttributeNS(null,"stop-color",t[1]),a.appendChild(e)}return this.defs.appendChild(a),`url(#${e})`;case"Mesh":return(0,n.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error("Unknown IR type: "+t[0])}}setDash(t,e){this.current.dashArray=t,this.current.dashPhase=e}constructPath(t,e){const i=this.current;let a=i.x,s=i.y,o=[],c=0;for(const l of t)switch(0|l){case n.OPS.rectangle:a=e[c++],s=e[c++];const t=a+e[c++],i=s+e[c++];o.push("M",r(a),r(s),"L",r(t),r(s),"L",r(t),r(i),"L",r(a),r(i),"Z");break;case n.OPS.moveTo:a=e[c++],s=e[c++],o.push("M",r(a),r(s));break;case n.OPS.lineTo:a=e[c++],s=e[c++],o.push("L",r(a),r(s));break;case n.OPS.curveTo:a=e[c+4],s=e[c+5],o.push("C",r(e[c]),r(e[c+1]),r(e[c+2]),r(e[c+3]),r(a),r(s)),c+=6;break;case n.OPS.curveTo2:o.push("C",r(a),r(s),r(e[c]),r(e[c+1]),r(e[c+2]),r(e[c+3])),a=e[c+2],s=e[c+3],c+=4;break;case n.OPS.curveTo3:a=e[c+2],s=e[c+3],o.push("C",r(e[c]),r(e[c+1]),r(a),r(s),r(a),r(s)),c+=4;break;case n.OPS.closePath:o.push("Z")}o=o.join(" "),i.path&&t.length>0&&t[0]!==n.OPS.rectangle&&t[0]!==n.OPS.moveTo?o=i.path.getAttributeNS(null,"d")+o:(i.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().appendChild(i.path)),i.path.setAttributeNS(null,"d",o),i.path.setAttributeNS(null,"fill","none"),i.element=i.path,i.setCurrentPoint(a,s)}endPath(){const t=this.current;if(t.path=null,!this.pendingClip)return;if(!t.element)return void(this.pendingClip=null);const e="clippath"+b++,i=this.svgFactory.createElement("svg:clipPath");i.setAttributeNS(null,"id",e),i.setAttributeNS(null,"transform",c(this.transformMatrix));const n=t.element.cloneNode(!0);n.setAttributeNS(null,"clip-rule","evenodd"===this.pendingClip?"evenodd":"nonzero"),this.pendingClip=null,i.appendChild(n),this.defs.appendChild(i),t.activeClipUrl&&(t.clipGroup=null,this.extraStack.forEach((function(t){t.clipGroup=null})),i.setAttributeNS(null,"clip-path",t.activeClipUrl)),t.activeClipUrl=`url(#${e})`,this.tgrp=null}clip(t){this.pendingClip=t}closePath(){const t=this.current;if(t.path){const e=t.path.getAttributeNS(null,"d")+"Z";t.path.setAttributeNS(null,"d",e)}}setLeading(t){this.current.leading=-t}setTextRise(t){this.current.textRise=t}setTextRenderingMode(t){this.current.textRenderingMode=t}setHScale(t){this.current.textHScale=t/100}setRenderingIntent(t){}setFlatness(t){}setGState(t){for(const[e,i]of t)switch(e){case"LW":this.setLineWidth(i);break;case"LC":this.setLineCap(i);break;case"LJ":this.setLineJoin(i);break;case"ML":this.setMiterLimit(i);break;case"D":this.setDash(i[0],i[1]);break;case"RI":this.setRenderingIntent(i);break;case"FL":this.setFlatness(i);break;case"Font":this.setFont(i);break;case"CA":this.setStrokeAlpha(i);break;case"ca":this.setFillAlpha(i);break;default:(0,n.warn)("Unimplemented graphic state operator "+e)}}fill(){const t=this.current;t.element&&(t.element.setAttributeNS(null,"fill",t.fillColor),t.element.setAttributeNS(null,"fill-opacity",t.fillAlpha),this.endPath())}stroke(){const t=this.current;t.element&&(this._setStrokeAttributes(t.element),t.element.setAttributeNS(null,"fill","none"),this.endPath())}_setStrokeAttributes(t,e=1){const i=this.current;let n=i.dashArray;1!==e&&n.length>0&&(n=n.map((function(t){return e*t}))),t.setAttributeNS(null,"stroke",i.strokeColor),t.setAttributeNS(null,"stroke-opacity",i.strokeAlpha),t.setAttributeNS(null,"stroke-miterlimit",r(i.miterLimit)),t.setAttributeNS(null,"stroke-linecap",i.lineCap),t.setAttributeNS(null,"stroke-linejoin",i.lineJoin),t.setAttributeNS(null,"stroke-width",r(e*i.lineWidth)+"px"),t.setAttributeNS(null,"stroke-dasharray",n.map(r).join(" ")),t.setAttributeNS(null,"stroke-dashoffset",r(e*i.dashPhase)+"px")}eoFill(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}fillStroke(){this.stroke(),this.fill()}eoFillStroke(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}closeStroke(){this.closePath(),this.stroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.closePath(),this.eoFillStroke()}paintSolidColorImageMask(){const t=this.svgFactory.createElement("svg:rect");t.setAttributeNS(null,"x","0"),t.setAttributeNS(null,"y","0"),t.setAttributeNS(null,"width","1px"),t.setAttributeNS(null,"height","1px"),t.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().appendChild(t)}paintImageXObject(t){const e=this.objs.get(t);e?this.paintInlineImageXObject(e):(0,n.warn)(`Dependent image with object ID ${t} is not ready yet`)}paintInlineImageXObject(t,e){const i=t.width,n=t.height,a=u(t,this.forceDataSchema,!!e),s=this.svgFactory.createElement("svg:rect");s.setAttributeNS(null,"x","0"),s.setAttributeNS(null,"y","0"),s.setAttributeNS(null,"width",r(i)),s.setAttributeNS(null,"height",r(n)),this.current.element=s,this.clip("nonzero");const o=this.svgFactory.createElement("svg:image");o.setAttributeNS(l,"xlink:href",a),o.setAttributeNS(null,"x","0"),o.setAttributeNS(null,"y",r(-n)),o.setAttributeNS(null,"width",r(i)+"px"),o.setAttributeNS(null,"height",r(n)+"px"),o.setAttributeNS(null,"transform",`scale(${r(1/i)} ${r(-1/n)})`),e?e.appendChild(o):this._ensureTransformGroup().appendChild(o)}paintImageMaskXObject(t){const e=this.current,i=t.width,n=t.height,a=e.fillColor;e.maskId="mask"+f++;const s=this.svgFactory.createElement("svg:mask");s.setAttributeNS(null,"id",e.maskId);const o=this.svgFactory.createElement("svg:rect");o.setAttributeNS(null,"x","0"),o.setAttributeNS(null,"y","0"),o.setAttributeNS(null,"width",r(i)),o.setAttributeNS(null,"height",r(n)),o.setAttributeNS(null,"fill",a),o.setAttributeNS(null,"mask",`url(#${e.maskId})`),this.defs.appendChild(s),this._ensureTransformGroup().appendChild(o),this.paintInlineImageXObject(t,s)}paintFormXObjectBegin(t,e){if(Array.isArray(t)&&6===t.length&&this.transform(t[0],t[1],t[2],t[3],t[4],t[5]),e){const t=e[2]-e[0],i=e[3]-e[1],n=this.svgFactory.createElement("svg:rect");n.setAttributeNS(null,"x",e[0]),n.setAttributeNS(null,"y",e[1]),n.setAttributeNS(null,"width",r(t)),n.setAttributeNS(null,"height",r(i)),this.current.element=n,this.clip("nonzero"),this.endPath()}}paintFormXObjectEnd(){}_initialize(t){const e=this.svgFactory.create(t.width,t.height),i=this.svgFactory.createElement("svg:defs");e.appendChild(i),this.defs=i;const n=this.svgFactory.createElement("svg:g");return n.setAttributeNS(null,"transform",c(t.transform)),e.appendChild(n),this.svg=n,e}_ensureClipGroup(){if(!this.current.clipGroup){const t=this.svgFactory.createElement("svg:g");t.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.appendChild(t),this.current.clipGroup=t}return this.current.clipGroup}_ensureTransformGroup(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",c(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().appendChild(this.tgrp):this.svg.appendChild(this.tgrp)),this.tgrp}}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PDFNodeStream=void 0;var n=i(2),a=i(20);const s=__webpack_require__(2),o=__webpack_require__(3),r=__webpack_require__(4),c=__webpack_require__(5),l=/^file:\/\/\/[a-zA-Z]:\//;e.PDFNodeStream=class{constructor(t){this.source=t,this.url=function(t){const e=c.parse(t);return"file:"===e.protocol||e.host?e:/^[a-z]:[/\\]/i.test(t)?c.parse("file:///"+t):(e.host||(e.protocol="file:"),e)}(t.url),this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol,this.isFsUrl="file:"===this.url.protocol,this.httpHeaders=this.isHttp&&t.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?this._fullRequestReader._loaded:0}getFullReader(){return(0,n.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new f(this):new p(this),this._fullRequestReader}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;const i=this.isFsUrl?new m(this,t,e):new b(this,t,e);return this._rangeRequestReaders.push(i),i}cancelAllRequests(t){this._fullRequestReader&&this._fullRequestReader.cancel(t),this._rangeRequestReaders.slice(0).forEach((function(e){e.cancel(t)}))}};class d{constructor(t){this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null;const e=t.source;this._contentLength=e.length,this._loaded=0,this._filename=null,this._disableRange=e.disableRange||!1,this._rangeChunkSize=e.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!e.disableStream,this._isRangeSupported=!e.disableRange,this._readableStream=null,this._readCapability=(0,n.createPromiseCapability)(),this._headersCapability=(0,n.createPromiseCapability)()}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();return null===t?(this._readCapability=(0,n.createPromiseCapability)(),this.read()):(this._loaded+=t.length,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(t).buffer,done:!1})}cancel(t){this._readableStream?this._readableStream.destroy(t):this._error(t)}_error(t){this._storedError=t,this._readCapability.resolve()}_setReadableStream(t){this._readableStream=t,t.on("readable",()=>{this._readCapability.resolve()}),t.on("end",()=>{t.destroy(),this._done=!0,this._readCapability.resolve()}),t.on("error",t=>{this._error(t)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new n.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class h{constructor(t){this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=(0,n.createPromiseCapability)(),this._isStreamingSupported=!t.source.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();return null===t?(this._readCapability=(0,n.createPromiseCapability)(),this.read()):(this._loaded+=t.length,this.onProgress&&this.onProgress({loaded:this._loaded}),{value:new Uint8Array(t).buffer,done:!1})}cancel(t){this._readableStream?this._readableStream.destroy(t):this._error(t)}_error(t){this._storedError=t,this._readCapability.resolve()}_setReadableStream(t){this._readableStream=t,t.on("readable",()=>{this._readCapability.resolve()}),t.on("end",()=>{t.destroy(),this._done=!0,this._readCapability.resolve()}),t.on("error",t=>{this._error(t)}),this._storedError&&this._readableStream.destroy(this._storedError)}}function u(t,e){return{protocol:t.protocol,auth:t.auth,host:t.hostname,port:t.port,path:t.path,method:"GET",headers:e}}class p extends d{constructor(t){super(t);const e=e=>{if(404===e.statusCode){const t=new n.MissingPDFException(`Missing PDF "${this._url}".`);return this._storedError=t,void this._headersCapability.reject(t)}this._headersCapability.resolve(),this._setReadableStream(e);const i=t=>this._readableStream.headers[t.toLowerCase()],{allowRangeRequests:s,suggestedLength:o}=(0,a.validateRangeRequestCapabilities)({getResponseHeader:i,isHttp:t.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=s,this._contentLength=o||this._contentLength,this._filename=(0,a.extractFilenameFromHeader)(i)};this._request=null,this._request="http:"===this._url.protocol?o.request(u(this._url,t.httpHeaders),e):r.request(u(this._url,t.httpHeaders),e),this._request.on("error",t=>{this._storedError=t,this._headersCapability.reject(t)}),this._request.end()}}class b extends h{constructor(t,e,i){super(t),this._httpHeaders={};for(const n in t.httpHeaders){const e=t.httpHeaders[n];void 0!==e&&(this._httpHeaders[n]=e)}this._httpHeaders.Range=`bytes=${e}-${i-1}`;const a=t=>{if(404!==t.statusCode)this._setReadableStream(t);else{const t=new n.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=t}};this._request=null,this._request="http:"===this._url.protocol?o.request(u(this._url,this._httpHeaders),a):r.request(u(this._url,this._httpHeaders),a),this._request.on("error",t=>{this._storedError=t}),this._request.end()}}class f extends d{constructor(t){super(t);let e=decodeURIComponent(this._url.path);l.test(this._url.href)&&(e=e.replace(/^\//,"")),s.lstat(e,(t,i)=>{if(t)return"ENOENT"===t.code&&(t=new n.MissingPDFException(`Missing PDF "${e}".`)),this._storedError=t,void this._headersCapability.reject(t);this._contentLength=i.size,this._setReadableStream(s.createReadStream(e)),this._headersCapability.resolve()})}}class m extends h{constructor(t,e,i){super(t);let n=decodeURIComponent(this._url.path);l.test(this._url.href)&&(n=n.replace(/^\//,"")),this._setReadableStream(s.createReadStream(n,{start:e,end:i-1}))}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createResponseStatusError=function(t,e){return 404===t||0===t&&e.startsWith("file:")?new n.MissingPDFException('Missing PDF "'+e+'".'):new n.UnexpectedResponseException("Unexpected server response ("+t+') while retrieving PDF "'+e+'".',t)},e.extractFilenameFromHeader=function(t){const e=t("Content-Disposition");if(e){let t=(0,a.getFilenameFromContentDispositionHeader)(e);if(t.includes("%"))try{t=decodeURIComponent(t)}catch(i){}if(/\.pdf$/i.test(t))return t}return null},e.validateRangeRequestCapabilities=function({getResponseHeader:t,isHttp:e,rangeChunkSize:i,disableRange:a}){(0,n.assert)(i>0,"Range chunk size must be larger than zero");const s={allowRangeRequests:!1,suggestedLength:void 0},o=parseInt(t("Content-Length"),10);return Number.isInteger(o)?(s.suggestedLength=o,o<=2*i||a||!e||"bytes"!==t("Accept-Ranges")||"identity"!==(t("Content-Encoding")||"identity")||(s.allowRangeRequests=!0),s):s},e.validateResponseStatus=function(t){return 200===t||206===t};var n=i(2),a=i(21)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getFilenameFromContentDispositionHeader=function(t){let e=!0,i=n("filename\\*","i").exec(t);if(i){i=i[1];let t=o(i);return t=unescape(t),t=r(t),t=c(t),s(t)}if(i=function(t){const e=[];let i;const a=n("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;null!==(i=a.exec(t));){let[,t,n,a]=i;if(t=parseInt(t,10),t in e){if(0===t)break}else e[t]=[n,a]}const s=[];for(let n=0;n<e.length&&n in e;++n){let[t,i]=e[n];i=o(i),t&&(i=unescape(i),0===n&&(i=r(i))),s.push(i)}return s.join("")}(t),i)return s(c(i));if(i=n("filename","i").exec(t),i){i=i[1];let t=o(i);return t=c(t),s(t)}function n(t,e){return new RegExp("(?:^|;)\\s*"+t+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',e)}function a(t,i){if(t){if(!/^[\x00-\xFF]+$/.test(i))return i;try{const n=new TextDecoder(t,{fatal:!0}),a=Array.from(i,(function(t){return 255&t.charCodeAt(0)}));i=n.decode(new Uint8Array(a)),e=!1}catch(n){if(/^utf-?8$/i.test(t))try{i=decodeURIComponent(escape(i)),e=!1}catch(a){}}}return i}function s(t){return e&&/[\x80-\xff]/.test(t)&&(t=a("utf-8",t),e&&(t=a("iso-8859-1",t))),t}function o(t){if(t.startsWith('"')){const e=t.slice(1).split('\\"');for(let t=0;t<e.length;++t){const i=e[t].indexOf('"');-1!==i&&(e[t]=e[t].slice(0,i),e.length=t+1),e[t]=e[t].replace(/\\(.)/g,"$1")}t=e.join('"')}return t}function r(t){const e=t.indexOf("'");return-1===e?t:a(t.slice(0,e),t.slice(e+1).replace(/^[^']*'/,""))}function c(t){return!t.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(t)?t:t.replace(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,(function(t,e,i,n){if("q"===i||"Q"===i)return a(e,n=(n=n.replace(/_/g," ")).replace(/=([0-9a-fA-F]{2})/g,(function(t,e){return String.fromCharCode(parseInt(e,16))})));try{n=atob(n)}catch(s){}return a(e,n)}))}return""}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PDFNetworkStream=void 0;var n=i(2),a=i(20);class s{constructor(t,e){this.url=t,e=e||{},this.isHttp=/^https?:/i.test(t),this.httpHeaders=this.isHttp&&e.httpHeaders||{},this.withCredentials=e.withCredentials||!1,this.getXhr=e.getXhr||function(){return new XMLHttpRequest},this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(t,e,i){const n={begin:t,end:e};for(const a in i)n[a]=i[a];return this.request(n)}requestFull(t){return this.request(t)}request(t){const e=this.getXhr(),i=this.currXhrId++,n=this.pendingRequests[i]={xhr:e};e.open("GET",this.url),e.withCredentials=this.withCredentials;for(const a in this.httpHeaders){const t=this.httpHeaders[a];void 0!==t&&e.setRequestHeader(a,t)}return this.isHttp&&"begin"in t&&"end"in t?(e.setRequestHeader("Range",`bytes=${t.begin}-${t.end-1}`),n.expectedStatus=206):n.expectedStatus=200,e.responseType="arraybuffer",t.onError&&(e.onerror=function(i){t.onError(e.status)}),e.onreadystatechange=this.onStateChange.bind(this,i),e.onprogress=this.onProgress.bind(this,i),n.onHeadersReceived=t.onHeadersReceived,n.onDone=t.onDone,n.onError=t.onError,n.onProgress=t.onProgress,e.send(null),i}onProgress(t,e){const i=this.pendingRequests[t];i&&i.onProgress&&i.onProgress(e)}onStateChange(t,e){const i=this.pendingRequests[t];if(!i)return;const a=i.xhr;if(a.readyState>=2&&i.onHeadersReceived&&(i.onHeadersReceived(),delete i.onHeadersReceived),4!==a.readyState)return;if(!(t in this.pendingRequests))return;if(delete this.pendingRequests[t],0===a.status&&this.isHttp)return void(i.onError&&i.onError(a.status));const s=a.status||200;if((200!==s||206!==i.expectedStatus)&&s!==i.expectedStatus)return void(i.onError&&i.onError(a.status));const o=function(t){const e=t.response;return"string"!=typeof e?e:(0,n.stringToBytes)(e).buffer}(a);if(206===s){const t=a.getResponseHeader("Content-Range"),e=/bytes (\d+)-(\d+)\/(\d+)/.exec(t);i.onDone({begin:parseInt(e[1],10),chunk:o})}else o?i.onDone({begin:0,chunk:o}):i.onError&&i.onError(a.status)}hasPendingRequests(){for(const t in this.pendingRequests)return!0;return!1}getRequestXhr(t){return this.pendingRequests[t].xhr}isPendingRequest(t){return t in this.pendingRequests}abortAllRequests(){for(const t in this.pendingRequests)this.abortRequest(0|t)}abortRequest(t){const e=this.pendingRequests[t].xhr;delete this.pendingRequests[t],e.abort()}}e.PDFNetworkStream=class{constructor(t){this._source=t,this._manager=new s(t.url,{httpHeaders:t.httpHeaders,withCredentials:t.withCredentials}),this._rangeChunkSize=t.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(t){const e=this._rangeRequestReaders.indexOf(t);e>=0&&this._rangeRequestReaders.splice(e,1)}getFullReader(){return(0,n.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new o(this._manager,this._source),this._fullRequestReader}getRangeReader(t,e){const i=new r(this._manager,t,e);return i.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(i),i}cancelAllRequests(t){this._fullRequestReader&&this._fullRequestReader.cancel(t),this._rangeRequestReaders.slice(0).forEach((function(e){e.cancel(t)}))}};class o{constructor(t,e){this._manager=t;const i={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=e.url,this._fullRequestId=t.requestFull(i),this._headersReceivedCapability=(0,n.createPromiseCapability)(),this._disableRange=e.disableRange||!1,this._contentLength=e.length,this._rangeChunkSize=e.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const t=this._fullRequestId,e=this._manager.getRequestXhr(t),i=t=>e.getResponseHeader(t),{allowRangeRequests:n,suggestedLength:s}=(0,a.validateRangeRequestCapabilities)({getResponseHeader:i,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});n&&(this._isRangeSupported=!0),this._contentLength=s||this._contentLength,this._filename=(0,a.extractFilenameFromHeader)(i),this._isRangeSupported&&this._manager.abortRequest(t),this._headersReceivedCapability.resolve()}_onDone(t){t&&(this._requests.length>0?this._requests.shift().resolve({value:t.chunk,done:!1}):this._cachedChunks.push(t.chunk)),this._done=!0,this._cachedChunks.length>0||(this._requests.forEach((function(t){t.resolve({value:void 0,done:!0})})),this._requests=[])}_onError(t){const e=(0,a.createResponseStatusError)(t,this._url);this._storedError=e,this._headersReceivedCapability.reject(e),this._requests.forEach((function(t){t.reject(e)})),this._requests=[],this._cachedChunks=[]}_onProgress(t){this.onProgress&&this.onProgress({loaded:t.loaded,total:t.lengthComputable?t.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersReceivedCapability.promise}async read(){if(this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const t=(0,n.createPromiseCapability)();return this._requests.push(t),t.promise}cancel(t){this._done=!0,this._headersReceivedCapability.reject(t),this._requests.forEach((function(t){t.resolve({value:void 0,done:!0})})),this._requests=[],this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class r{constructor(t,e,i){this._manager=t;const n={onDone:this._onDone.bind(this),onProgress:this._onProgress.bind(this)};this._requestId=t.requestRange(e,i,n),this._requests=[],this._queuedChunk=null,this._done=!1,this.onProgress=null,this.onClosed=null}_close(){this.onClosed&&this.onClosed(this)}_onDone(t){const e=t.chunk;this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunk=e,this._done=!0,this._requests.forEach((function(t){t.resolve({value:void 0,done:!0})})),this._requests=[],this._close()}_onProgress(t){!this.isStreamingSupported&&this.onProgress&&this.onProgress({loaded:t.loaded})}get isStreamingSupported(){return!1}async read(){if(null!==this._queuedChunk){const t=this._queuedChunk;return this._queuedChunk=null,{value:t,done:!1}}if(this._done)return{value:void 0,done:!0};const t=(0,n.createPromiseCapability)();return this._requests.push(t),t.promise}cancel(t){this._done=!0,this._requests.forEach((function(t){t.resolve({value:void 0,done:!0})})),this._requests=[],this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PDFFetchStream=void 0;var n=i(2),a=i(20);function s(t,e,i){return{method:"GET",headers:t,signal:i&&i.signal,mode:"cors",credentials:e?"include":"same-origin",redirect:"follow"}}function o(t){const e=new Headers;for(const i in t){const n=t[i];void 0!==n&&e.append(i,n)}return e}e.PDFFetchStream=class{constructor(t){this.source=t,this.isHttp=/^https?:/i.test(t.url),this.httpHeaders=this.isHttp&&t.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?this._fullRequestReader._loaded:0}getFullReader(){return(0,n.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new r(this),this._fullRequestReader}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;const i=new c(this,t,e);return this._rangeRequestReaders.push(i),i}cancelAllRequests(t){this._fullRequestReader&&this._fullRequestReader.cancel(t),this._rangeRequestReaders.slice(0).forEach((function(e){e.cancel(t)}))}};class r{constructor(t){this._stream=t,this._reader=null,this._loaded=0,this._filename=null;const e=t.source;this._withCredentials=e.withCredentials||!1,this._contentLength=e.length,this._headersCapability=(0,n.createPromiseCapability)(),this._disableRange=e.disableRange||!1,this._rangeChunkSize=e.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),"undefined"!=typeof AbortController&&(this._abortController=new AbortController),this._isStreamingSupported=!e.disableStream,this._isRangeSupported=!e.disableRange,this._headers=o(this._stream.httpHeaders);const i=e.url;fetch(i,s(this._headers,this._withCredentials,this._abortController)).then(t=>{if(!(0,a.validateResponseStatus)(t.status))throw(0,a.createResponseStatusError)(t.status,i);this._reader=t.body.getReader(),this._headersCapability.resolve();const e=e=>t.headers.get(e),{allowRangeRequests:s,suggestedLength:o}=(0,a.validateRangeRequestCapabilities)({getResponseHeader:e,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=s,this._contentLength=o||this._contentLength,this._filename=(0,a.extractFilenameFromHeader)(e),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new n.AbortException("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._headersCapability.promise;const{value:t,done:e}=await this._reader.read();return e?{value:t,done:e}:(this._loaded+=t.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(t).buffer,done:!1})}cancel(t){this._reader&&this._reader.cancel(t),this._abortController&&this._abortController.abort()}}class c{constructor(t,e,i){this._stream=t,this._reader=null,this._loaded=0;const r=t.source;this._withCredentials=r.withCredentials||!1,this._readCapability=(0,n.createPromiseCapability)(),this._isStreamingSupported=!r.disableStream,"undefined"!=typeof AbortController&&(this._abortController=new AbortController),this._headers=o(this._stream.httpHeaders),this._headers.append("Range",`bytes=${e}-${i-1}`);const c=r.url;fetch(c,s(this._headers,this._withCredentials,this._abortController)).then(t=>{if(!(0,a.validateResponseStatus)(t.status))throw(0,a.createResponseStatusError)(t.status,c);this._readCapability.resolve(),this._reader=t.body.getReader()}),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;const{value:t,done:e}=await this._reader.read();return e?{value:t,done:e}:(this._loaded+=t.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded}),{value:new Uint8Array(t).buffer,done:!1})}cancel(t){this._reader&&this._reader.cancel(t),this._abortController&&this._abortController.abort()}}}])},module.exports=factory()},louq:function(t,e,i){var n;n=function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var a=e[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,i),a.l=!0,a.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)i.d(n,a,(function(e){return t[e]}).bind(null,a));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=0)}([function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"AnnotationLayerBuilder",{enumerable:!0,get:function(){return n.AnnotationLayerBuilder}}),Object.defineProperty(e,"DefaultAnnotationLayerFactory",{enumerable:!0,get:function(){return n.DefaultAnnotationLayerFactory}}),Object.defineProperty(e,"DefaultTextLayerFactory",{enumerable:!0,get:function(){return a.DefaultTextLayerFactory}}),Object.defineProperty(e,"TextLayerBuilder",{enumerable:!0,get:function(){return a.TextLayerBuilder}}),Object.defineProperty(e,"EventBus",{enumerable:!0,get:function(){return s.EventBus}}),Object.defineProperty(e,"NullL10n",{enumerable:!0,get:function(){return s.NullL10n}}),Object.defineProperty(e,"ProgressBar",{enumerable:!0,get:function(){return s.ProgressBar}}),Object.defineProperty(e,"PDFLinkService",{enumerable:!0,get:function(){return o.PDFLinkService}}),Object.defineProperty(e,"SimpleLinkService",{enumerable:!0,get:function(){return o.SimpleLinkService}}),Object.defineProperty(e,"DownloadManager",{enumerable:!0,get:function(){return r.DownloadManager}}),Object.defineProperty(e,"GenericL10n",{enumerable:!0,get:function(){return c.GenericL10n}}),Object.defineProperty(e,"PDFFindController",{enumerable:!0,get:function(){return l.PDFFindController}}),Object.defineProperty(e,"PDFHistory",{enumerable:!0,get:function(){return d.PDFHistory}}),Object.defineProperty(e,"PDFPageView",{enumerable:!0,get:function(){return h.PDFPageView}}),Object.defineProperty(e,"PDFSinglePageViewer",{enumerable:!0,get:function(){return u.PDFSinglePageViewer}}),Object.defineProperty(e,"PDFViewer",{enumerable:!0,get:function(){return p.PDFViewer}});var n=i(1),a=i(5),s=i(3),o=i(4),r=i(6),c=i(8),l=i(10),d=i(12),h=i(13),u=i(15),p=i(17)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultAnnotationLayerFactory=e.AnnotationLayerBuilder=void 0;var n=i(2),a=i(3),s=i(4);class o{constructor({pageDiv:t,pdfPage:e,linkService:i,downloadManager:n,imageResourcesPath:s="",renderInteractiveForms:o=!1,l10n:r=a.NullL10n}){this.pageDiv=t,this.pdfPage=e,this.linkService=i,this.downloadManager=n,this.imageResourcesPath=s,this.renderInteractiveForms=o,this.l10n=r,this.div=null,this._cancelled=!1}render(t,e="display"){this.pdfPage.getAnnotations({intent:e}).then(e=>{if(this._cancelled)return;const i={viewport:t.clone({dontFlip:!0}),div:this.div,annotations:e,page:this.pdfPage,imageResourcesPath:this.imageResourcesPath,renderInteractiveForms:this.renderInteractiveForms,linkService:this.linkService,downloadManager:this.downloadManager};if(this.div)n.AnnotationLayer.update(i);else{if(0===e.length)return;this.div=document.createElement("div"),this.div.className="annotationLayer",this.pageDiv.appendChild(this.div),i.div=this.div,n.AnnotationLayer.render(i),this.l10n.translate(this.div)}})}cancel(){this._cancelled=!0}hide(){this.div&&this.div.setAttribute("hidden","true")}}e.AnnotationLayerBuilder=o,e.DefaultAnnotationLayerFactory=class{createAnnotationLayerBuilder(t,e,i="",n=!1,r=a.NullL10n){return new o({pageDiv:t,pdfPage:e,imageResourcesPath:i,renderInteractiveForms:n,linkService:new s.SimpleLinkService,l10n:r})}}},function(t,e,n){"use strict";let a;a="undefined"!=typeof window&&window["pdfjs-dist/build/pdf"]?window["pdfjs-dist/build/pdf"]:i("lRFz"),t.exports=a},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isValidRotation=function(t){return Number.isInteger(t)&&t%90==0},e.isValidScrollMode=function(t){return Number.isInteger(t)&&Object.values(n).includes(t)&&t!==n.UNKNOWN},e.isValidSpreadMode=function(t){return Number.isInteger(t)&&Object.values(a).includes(t)&&t!==a.UNKNOWN},e.isPortraitOrientation=function(t){return t.width<=t.height},e.clamp=d,e.getPDFFileNameFromURL=function(t,e="document.pdf"){if("string"!=typeof t)return e;if(function(t){let e=0;const i=t.length;for(;e<i&&""===t[e].trim();)e++;return"data:"===t.substring(e,e+5).toLowerCase()}(t))return console.warn('getPDFFileNameFromURL: ignoring "data:" URL for performance reasons.'),e;const i=/[^\/?#=]+\.pdf\b(?!.*\.pdf\b)/i,n=/^(?:(?:[^:]+:)?\/\/[^\/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(t);let a=i.exec(n[1])||i.exec(n[2])||i.exec(n[3]);if(a&&(a=a[0],a.includes("%")))try{a=i.exec(decodeURIComponent(a))[0]}catch(s){}return a||e},e.noContextMenuHandler=function(t){t.preventDefault()},e.parseQueryString=function(t){const e=t.split("&"),i=Object.create(null);for(let n=0,a=e.length;n<a;++n){const t=e[n].split("="),a=t[0].toLowerCase(),s=t.length>1?t[1]:null;i[decodeURIComponent(a)]=decodeURIComponent(s)}return i},e.backtrackBeforeAllVisibleElements=o,e.getVisibleElements=function(t,e,i=!1,n=!1){const a=t.scrollTop,r=a+t.clientHeight,c=t.scrollLeft,l=c+t.clientWidth,d=[],h=e.length;let u=0===h?0:s(e,n?function(t){const e=t.div;return e.offsetLeft+e.clientLeft+e.clientWidth>c}:function(t){const e=t.div;return e.offsetTop+e.clientTop+e.clientHeight>a});u>0&&u<h&&!n&&(u=o(u,e,a));let p=n?l:-1;for(let s=u;s<h;s++){const t=e[s],i=t.div,o=i.offsetLeft+i.clientLeft,h=i.offsetTop+i.clientTop,u=i.clientWidth,b=i.clientHeight,f=o+u,m=h+b;if(-1===p)m>=r&&(p=m);else if((n?o:h)>p)break;if(m<=a||h>=r||f<=c||o>=l)continue;const g=Math.max(0,a-h)+Math.max(0,m-r),v=Math.max(0,c-o)+Math.max(0,f-l);d.push({id:t.id,x:o,y:h,view:t,percent:(b-g)*(u-v)*100/b/u|0})}const b=d[0],f=d[d.length-1];return i&&d.sort((function(t,e){const i=t.percent-e.percent;return Math.abs(i)>.001?-i:t.id-e.id})),{first:b,last:f,views:d}},e.roundToDivide=function(t,e){const i=t%e;return 0===i?t:Math.round(t-i+e)},e.getPageSizeInches=function({view:t,userUnit:e,rotate:i}){const[n,a,s,o]=t,r=i%180!=0,c=(s-n)/72*e,l=(o-a)/72*e;return{width:r?l:c,height:r?c:l}},e.approximateFraction=function(t){if(Math.floor(t)===t)return[t,1];const e=1/t;if(e>8)return[1,8];if(Math.floor(e)===e)return[1,e];const i=t>1?e:t;let n,a=0,s=1,o=1,r=1;for(;;){const t=a+o,e=s+r;if(e>8)break;i<=t/e?(o=t,r=e):(a=t,s=e)}return n=i-a/s<o/r-i?i===t?[a,s]:[s,a]:i===t?[o,r]:[r,o],n},e.getOutputScale=function(t){const e=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1);return{sx:e,sy:e,scaled:1!==e}},e.scrollIntoView=function(t,e,i=!1){let n=t.offsetParent;if(!n)return void console.error("offsetParent is not set -- cannot scroll");let a=t.offsetTop+t.clientTop,s=t.offsetLeft+t.clientLeft;for(;n.clientHeight===n.scrollHeight&&n.clientWidth===n.scrollWidth||i&&"hidden"===getComputedStyle(n).overflow;)if(n.dataset._scaleY&&(a/=n.dataset._scaleY,s/=n.dataset._scaleX),a+=n.offsetTop,s+=n.offsetLeft,n=n.offsetParent,!n)return;e&&(void 0!==e.top&&(a+=e.top),void 0!==e.left&&(s+=e.left,n.scrollLeft=s)),n.scrollTop=a},e.watchScroll=function(t,e){const i=function(i){a||(a=window.requestAnimationFrame((function(){a=null;const i=t.scrollLeft,s=n.lastX;i!==s&&(n.right=i>s),n.lastX=i;const o=t.scrollTop,r=n.lastY;o!==r&&(n.down=o>r),n.lastY=o,e(n)})))},n={right:!0,down:!0,lastX:t.scrollLeft,lastY:t.scrollTop,_eventHandler:i};let a=null;return t.addEventListener("scroll",i,!0),n},e.binarySearchFirstItem=s,e.normalizeWheelEventDelta=function(t){let e=Math.sqrt(t.deltaX*t.deltaX+t.deltaY*t.deltaY);const i=Math.atan2(t.deltaY,t.deltaX);return-.25*Math.PI<i&&i<.75*Math.PI&&(e=-e),0===t.deltaMode?e/=900:1===t.deltaMode&&(e/=30),e},e.waitOnEventOrTimeout=function({target:t,name:e,delay:i=0}){return new Promise((function(n,a){if("object"!=typeof t||!e||"string"!=typeof e||!(Number.isInteger(i)&&i>=0))throw new Error("waitOnEventOrTimeout - invalid parameters.");function s(i){t instanceof l?t._off(e,o):t.removeEventListener(e,o),d&&clearTimeout(d),n(i)}const o=s.bind(null,r.EVENT);t instanceof l?t._on(e,o):t.addEventListener(e,o);const c=s.bind(null,r.TIMEOUT),d=setTimeout(c,i)}))},e.moveToEndOfArray=function(t,e){const i=[],n=t.length;let a=0;for(let s=0;s<n;++s)e(t[s])?i.push(t[s]):(t[a]=t[s],++a);for(let s=0;a<n;++s,++a)t[a]=i[s]},e.WaitOnType=e.animationStarted=e.ProgressBar=e.EventBus=e.NullL10n=e.SpreadMode=e.ScrollMode=e.TextLayerMode=e.RendererType=e.PresentationModeState=e.VERTICAL_PADDING=e.SCROLLBAR_PADDING=e.MAX_AUTO_SCALE=e.UNKNOWN_SCALE=e.MAX_SCALE=e.MIN_SCALE=e.DEFAULT_SCALE=e.DEFAULT_SCALE_VALUE=e.CSS_UNITS=e.AutoPrintRegExp=void 0,e.CSS_UNITS=96/72,e.DEFAULT_SCALE_VALUE="auto",e.DEFAULT_SCALE=1,e.MIN_SCALE=.1,e.MAX_SCALE=10,e.UNKNOWN_SCALE=0,e.MAX_AUTO_SCALE=1.25,e.SCROLLBAR_PADDING=40,e.VERTICAL_PADDING=5,e.PresentationModeState={UNKNOWN:0,NORMAL:1,CHANGING:2,FULLSCREEN:3},e.RendererType={CANVAS:"canvas",SVG:"svg"},e.TextLayerMode={DISABLE:0,ENABLE:1,ENABLE_ENHANCE:2};const n={UNKNOWN:-1,VERTICAL:0,HORIZONTAL:1,WRAPPED:2};e.ScrollMode=n;const a={UNKNOWN:-1,NONE:0,ODD:1,EVEN:2};function s(t,e){let i=0,n=t.length-1;if(n<0||!e(t[n]))return t.length;if(e(t[i]))return i;for(;i<n;){const a=i+n>>1;e(t[a])?n=a:i=a+1}return i}function o(t,e,i){if(t<2)return t;let n=e[t].div,a=n.offsetTop+n.clientTop;a>=i&&(n=e[t-1].div,a=n.offsetTop+n.clientTop);for(let s=t-2;s>=0&&(n=e[s].div,!(n.offsetTop+n.clientTop+n.clientHeight<=a));--s)t=s;return t}e.SpreadMode=a,e.AutoPrintRegExp=/\bprint\s*\(/,e.NullL10n={getLanguage:async()=>"en-us",getDirection:async()=>"ltr",get:async(t,e,i)=>function(t,e){return e?t.replace(/\{\{\s*(\w+)\s*\}\}/g,(t,i)=>i in e?e[i]:"{{"+i+"}}"):t}(i,e),async translate(t){}};const r={EVENT:"event",TIMEOUT:"timeout"};e.WaitOnType=r;const c=new Promise((function(t){window.requestAnimationFrame(t)}));e.animationStarted=c;class l{constructor(t){this._listeners=Object.create(null)}on(t,e){this._on(t,e,{external:!0})}off(t,e){this._off(t,e,{external:!0})}dispatch(t){const e=this._listeners[t];if(!e||0===e.length)return;const i=Array.prototype.slice.call(arguments,1);let n;e.slice(0).forEach((function({listener:t,external:e}){if(e)return n||(n=[]),void n.push(t);t.apply(null,i)})),n&&(n.forEach((function(t){t.apply(null,i)})),n=null)}_on(t,e,i=null){let n=this._listeners[t];n||(this._listeners[t]=n=[]),n.push({listener:e,external:!0===(i&&i.external)})}_off(t,e,i=null){const n=this._listeners[t];if(n)for(let a=0,s=n.length;a<s;a++)if(n[a].listener===e)return void n.splice(a,1)}}function d(t,e,i){return Math.min(Math.max(t,e),i)}e.EventBus=l,e.ProgressBar=class{constructor(t,{height:e,width:i,units:n}={}){this.visible=!0,this.div=document.querySelector(t+" .progress"),this.bar=this.div.parentNode,this.height=e||100,this.width=i||100,this.units=n||"%",this.div.style.height=this.height+this.units,this.percent=0}_updateBar(){if(this._indeterminate)return this.div.classList.add("indeterminate"),void(this.div.style.width=this.width+this.units);this.div.classList.remove("indeterminate"),this.div.style.width=this.width*this._percent/100+this.units}get percent(){return this._percent}set percent(t){this._indeterminate=isNaN(t),this._percent=d(t,0,100),this._updateBar()}setWidth(t){if(!t)return;const e=t.parentNode.offsetWidth-t.offsetWidth;e>0&&(this.bar.style.width=`calc(100% - ${e}px)`)}hide(){this.visible&&(this.visible=!1,this.bar.classList.add("hidden"),document.body.classList.remove("loadingInProgress"))}show(){this.visible||(this.visible=!0,document.body.classList.add("loadingInProgress"),this.bar.classList.remove("hidden"))}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleLinkService=e.PDFLinkService=void 0;var n=i(3);e.PDFLinkService=class{constructor({eventBus:t,externalLinkTarget:e=null,externalLinkRel:i=null,externalLinkEnabled:n=!0,ignoreDestinationZoom:a=!1}={}){this.eventBus=t,this.externalLinkTarget=e,this.externalLinkRel=i,this.externalLinkEnabled=n,this._ignoreDestinationZoom=a,this.baseUrl=null,this.pdfDocument=null,this.pdfViewer=null,this.pdfHistory=null,this._pagesRefCache=null}setDocument(t,e=null){this.baseUrl=e,this.pdfDocument=t,this._pagesRefCache=Object.create(null)}setViewer(t){this.pdfViewer=t}setHistory(t){this.pdfHistory=t}get pagesCount(){return this.pdfDocument?this.pdfDocument.numPages:0}get page(){return this.pdfViewer.currentPageNumber}set page(t){this.pdfViewer.currentPageNumber=t}get rotation(){return this.pdfViewer.pagesRotation}set rotation(t){this.pdfViewer.pagesRotation=t}navigateTo(t){const e=({namedDest:i,explicitDest:n})=>{const a=n[0];let s;if(a instanceof Object){if(s=this._cachedPageNumber(a),null===s)return void this.pdfDocument.getPageIndex(a).then(t=>{this.cachePageRef(t+1,a),e({namedDest:i,explicitDest:n})}).catch(()=>{console.error(`PDFLinkService.navigateTo: "${a}" is not a valid page reference, for dest="${t}".`)})}else{if(!Number.isInteger(a))return void console.error(`PDFLinkService.navigateTo: "${a}" is not a valid destination reference, for dest="${t}".`);s=a+1}!s||s<1||s>this.pagesCount?console.error(`PDFLinkService.navigateTo: "${s}" is not a valid page number, for dest="${t}".`):(this.pdfHistory&&(this.pdfHistory.pushCurrentPosition(),this.pdfHistory.push({namedDest:i,explicitDest:n,pageNumber:s})),this.pdfViewer.scrollPageIntoView({pageNumber:s,destArray:n,ignoreDestinationZoom:this._ignoreDestinationZoom}))};new Promise((e,i)=>{"string"!=typeof t?e({namedDest:"",explicitDest:t}):this.pdfDocument.getDestination(t).then(i=>{e({namedDest:t,explicitDest:i})})}).then(i=>{Array.isArray(i.explicitDest)?e(i):console.error(`PDFLinkService.navigateTo: "${i.explicitDest}" is not a valid destination array, for dest="${t}".`)})}getDestinationHash(t){if("string"==typeof t)return this.getAnchorUrl("#"+escape(t));if(Array.isArray(t)){const e=JSON.stringify(t);return this.getAnchorUrl("#"+escape(e))}return this.getAnchorUrl("")}getAnchorUrl(t){return(this.baseUrl||"")+t}setHash(t){let e,i;if(t.includes("=")){const a=(0,n.parseQueryString)(t);if("search"in a&&this.eventBus.dispatch("findfromurlhash",{source:this,query:a.search.replace(/"/g,""),phraseSearch:"true"===a.phrase}),"page"in a&&(e=0|a.page||1),"zoom"in a){const t=a.zoom.split(","),e=t[0],n=parseFloat(e);e.includes("Fit")?"Fit"===e||"FitB"===e?i=[null,{name:e}]:"FitH"===e||"FitBH"===e||"FitV"===e||"FitBV"===e?i=[null,{name:e},t.length>1?0|t[1]:null]:"FitR"===e?5!==t.length?console.error('PDFLinkService.setHash: Not enough parameters for "FitR".'):i=[null,{name:e},0|t[1],0|t[2],0|t[3],0|t[4]]:console.error(`PDFLinkService.setHash: "${e}" is not a valid zoom value.`):i=[null,{name:"XYZ"},t.length>1?0|t[1]:null,t.length>2?0|t[2]:null,n?n/100:e]}i?this.pdfViewer.scrollPageIntoView({pageNumber:e||this.page,destArray:i,allowNegativeOffset:!0}):e&&(this.page=e),"pagemode"in a&&this.eventBus.dispatch("pagemode",{source:this,mode:a.pagemode}),"nameddest"in a&&this.navigateTo(a.nameddest)}else{i=unescape(t);try{i=JSON.parse(i),Array.isArray(i)||(i=i.toString())}catch(a){}if("string"==typeof i||function(t){if(!Array.isArray(t))return!1;const e=t.length;if(e<2)return!1;const i=t[0];if(!("object"==typeof i&&Number.isInteger(i.num)&&Number.isInteger(i.gen)||Number.isInteger(i)&&i>=0))return!1;const n=t[1];if("object"!=typeof n||"string"!=typeof n.name)return!1;let a=!0;switch(n.name){case"XYZ":if(5!==e)return!1;break;case"Fit":case"FitB":return 2===e;case"FitH":case"FitBH":case"FitV":case"FitBV":if(3!==e)return!1;break;case"FitR":if(6!==e)return!1;a=!1;break;default:return!1}for(let s=2;s<e;s++){const e=t[s];if(!("number"==typeof e||a&&null===e))return!1}return!0}(i))return void this.navigateTo(i);console.error(`PDFLinkService.setHash: "${unescape(t)}" is not a valid destination.`)}}executeNamedAction(t){switch(t){case"GoBack":this.pdfHistory&&this.pdfHistory.back();break;case"GoForward":this.pdfHistory&&this.pdfHistory.forward();break;case"NextPage":this.page<this.pagesCount&&this.page++;break;case"PrevPage":this.page>1&&this.page--;break;case"LastPage":this.page=this.pagesCount;break;case"FirstPage":this.page=1}this.eventBus.dispatch("namedaction",{source:this,action:t})}cachePageRef(t,e){e&&(this._pagesRefCache[0===e.gen?e.num+"R":`${e.num}R${e.gen}`]=t)}_cachedPageNumber(t){return this._pagesRefCache&&this._pagesRefCache[0===t.gen?t.num+"R":`${t.num}R${t.gen}`]||null}isPageVisible(t){return this.pdfViewer.isPageVisible(t)}},e.SimpleLinkService=class{constructor(){this.externalLinkTarget=null,this.externalLinkRel=null,this.externalLinkEnabled=!0,this._ignoreDestinationZoom=!1}get pagesCount(){return 0}get page(){return 0}set page(t){}get rotation(){return 0}set rotation(t){}navigateTo(t){}getDestinationHash(t){return"#"}getAnchorUrl(t){return"#"}setHash(t){}executeNamedAction(t){}cachePageRef(t,e){}isPageVisible(t){return!0}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultTextLayerFactory=e.TextLayerBuilder=void 0;var n=i(2);class a{constructor({textLayerDiv:t,eventBus:e,pageIndex:i,viewport:n,findController:a=null,enhanceTextSelection:s=!1}){this.textLayerDiv=t,this.eventBus=e,this.textContent=null,this.textContentItemsStr=[],this.textContentStream=null,this.renderingDone=!1,this.pageIdx=i,this.pageNumber=this.pageIdx+1,this.matches=[],this.viewport=n,this.textDivs=[],this.findController=a,this.textLayerRenderTask=null,this.enhanceTextSelection=s,this._onUpdateTextLayerMatches=null,this._bindMouse()}_finishRendering(){if(this.renderingDone=!0,!this.enhanceTextSelection){const t=document.createElement("div");t.className="endOfContent",this.textLayerDiv.appendChild(t)}this.eventBus.dispatch("textlayerrendered",{source:this,pageNumber:this.pageNumber,numTextDivs:this.textDivs.length})}render(t=0){if(!this.textContent&&!this.textContentStream||this.renderingDone)return;this.cancel(),this.textDivs=[];const e=document.createDocumentFragment();this.textLayerRenderTask=(0,n.renderTextLayer)({textContent:this.textContent,textContentStream:this.textContentStream,container:e,viewport:this.viewport,textDivs:this.textDivs,textContentItemsStr:this.textContentItemsStr,timeout:t,enhanceTextSelection:this.enhanceTextSelection}),this.textLayerRenderTask.promise.then(()=>{this.textLayerDiv.appendChild(e),this._finishRendering(),this._updateMatches()},(function(t){})),this._onUpdateTextLayerMatches||(this._onUpdateTextLayerMatches=t=>{t.pageIndex!==this.pageIdx&&-1!==t.pageIndex||this._updateMatches()},this.eventBus._on("updatetextlayermatches",this._onUpdateTextLayerMatches))}cancel(){this.textLayerRenderTask&&(this.textLayerRenderTask.cancel(),this.textLayerRenderTask=null),this._onUpdateTextLayerMatches&&(this.eventBus._off("updatetextlayermatches",this._onUpdateTextLayerMatches),this._onUpdateTextLayerMatches=null)}setTextContentStream(t){this.cancel(),this.textContentStream=t}setTextContent(t){this.cancel(),this.textContent=t}_convertMatches(t,e){if(!t)return[];const{findController:i,textContentItemsStr:n}=this;let a=0,s=0;const o=n.length-1,r=i.state.query.length,c=[];for(let l=0,d=t.length;l<d;l++){let i=t[l];for(;a!==o&&i>=s+n[a].length;)s+=n[a].length,a++;a===n.length&&console.error("Could not find a matching mapping");const d={begin:{divIdx:a,offset:i-s}};for(i+=e?e[l]:r;a!==o&&i>s+n[a].length;)s+=n[a].length,a++;d.end={divIdx:a,offset:i-s},c.push(d)}return c}_renderMatches(t){if(0===t.length)return;const{findController:e,pageIdx:i,textContentItemsStr:n,textDivs:a}=this,s=i===e.selected.pageIdx,o=e.selected.matchIdx;let r=null;function c(t,e){const i=t.divIdx;a[i].textContent="",l(i,0,t.offset,e)}function l(t,e,i,s){const o=a[t],r=n[t].substring(e,i),c=document.createTextNode(r);if(s){const t=document.createElement("span");return t.className=s,t.appendChild(c),void o.appendChild(t)}o.appendChild(c)}let d=o,h=d+1;if(e.state.highlightAll)d=0,h=t.length;else if(!s)return;for(let u=d;u<h;u++){const n=t[u],d=n.begin,h=n.end,p=s&&u===o,b=p?" selected":"";if(p&&e.scrollMatchIntoView({element:a[d.divIdx],pageIndex:i,matchIndex:o}),r&&d.divIdx===r.divIdx?l(r.divIdx,r.offset,d.offset):(null!==r&&l(r.divIdx,r.offset,undefined),c(d)),d.divIdx===h.divIdx)l(d.divIdx,d.offset,h.offset,"highlight"+b);else{l(d.divIdx,d.offset,undefined,"highlight begin"+b);for(let t=d.divIdx+1,e=h.divIdx;t<e;t++)a[t].className="highlight middle"+b;c(h,"highlight end"+b)}r=h}r&&l(r.divIdx,r.offset,undefined)}_updateMatches(){if(!this.renderingDone)return;const{findController:t,matches:e,pageIdx:i,textContentItemsStr:n,textDivs:a}=this;let s=-1;for(let o=0,r=e.length;o<r;o++){const t=e[o];for(let e=Math.max(s,t.begin.divIdx),i=t.end.divIdx;e<=i;e++){const t=a[e];t.textContent=n[e],t.className=""}s=t.end.divIdx+1}t&&t.highlightMatches&&(this.matches=this._convertMatches(t.pageMatches[i]||null,t.pageMatchesLength[i]||null),this._renderMatches(this.matches))}_bindMouse(){const t=this.textLayerDiv;let e=null;t.addEventListener("mousedown",i=>{if(this.enhanceTextSelection&&this.textLayerRenderTask)return this.textLayerRenderTask.expandTextDivs(!0),void(e&&(clearTimeout(e),e=null));const n=t.querySelector(".endOfContent");if(!n)return;let a=i.target!==t;if(a=a&&"none"!==window.getComputedStyle(n).getPropertyValue("-moz-user-select"),a){const e=t.getBoundingClientRect(),a=Math.max(0,(i.pageY-e.top)/e.height);n.style.top=(100*a).toFixed(2)+"%"}n.classList.add("active")}),t.addEventListener("mouseup",()=>{if(this.enhanceTextSelection&&this.textLayerRenderTask)return void(e=setTimeout(()=>{this.textLayerRenderTask&&this.textLayerRenderTask.expandTextDivs(!1),e=null},300));const i=t.querySelector(".endOfContent");i&&(i.style.top="",i.classList.remove("active"))})}}e.TextLayerBuilder=a,e.DefaultTextLayerFactory=class{createTextLayerBuilder(t,e,i,n=!1,s){return new a({textLayerDiv:t,pageIndex:e,viewport:i,enhanceTextSelection:n,eventBus:s})}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DownloadManager=void 0;var n=i(2);const a=i(7).viewerCompatibilityParams.disableCreateObjectURL||!1;function s(t,e){const i=document.createElement("a");if(!i.click)throw new Error('DownloadManager: "a.click()" is not supported.');i.href=t,i.target="_parent","download"in i&&(i.download=e),(document.body||document.documentElement).appendChild(i),i.click(),i.remove()}e.DownloadManager=class{constructor({disableCreateObjectURL:t=a}){this.disableCreateObjectURL=t}downloadUrl(t,e){(0,n.createValidAbsoluteUrl)(t,"http://example.com")&&s(t+"#pdfjs.action=download",e)}downloadData(t,e,i){navigator.msSaveBlob?navigator.msSaveBlob(new Blob([t],{type:i}),e):s((0,n.createObjectURL)(t,i,this.disableCreateObjectURL),e)}download(t,e,i){navigator.msSaveBlob?navigator.msSaveBlob(t,i)||this.downloadUrl(e,i):this.disableCreateObjectURL?this.downloadUrl(e,i):s(URL.createObjectURL(t),i)}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.viewerCompatibilityParams=void 0;const n=Object.create(null);{const t="undefined"!=typeof navigator&&navigator.userAgent||"",e="undefined"!=typeof navigator&&navigator.platform||"",i="undefined"!=typeof navigator&&navigator.maxTouchPoints||1,a=/Android/.test(t),s=/Trident/.test(t),o=/\b(iPad|iPhone|iPod)(?=;)/.test(t)||"MacIntel"===e&&i>1,r=/CriOS/.test(t);(s||r)&&(n.disableCreateObjectURL=!0),(o||a)&&(n.maxCanvasPixels=5242880)}const a=Object.freeze(n);e.viewerCompatibilityParams=a},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GenericL10n=void 0,i(9);const n=document.webL10n;e.GenericL10n=class{constructor(t){this._lang=t,this._ready=new Promise((e,i)=>{n.setLanguage(t,()=>{e(n)})})}async getLanguage(){return(await this._ready).getLanguage()}async getDirection(){return(await this._ready).getDirection()}async get(t,e,i){return(await this._ready).get(t,e,i)}async translate(t){return(await this._ready).translate(t)}}},function(t,e,i){"use strict";document.webL10n=function(t,e,i){var n={},a="",s="textContent",o="",r={},c="loading";function l(t,e,i){e=e||function(t){},i=i||function(){};var n=new XMLHttpRequest;n.open("GET",t,!0),n.overrideMimeType&&n.overrideMimeType("text/plain; charset=utf-8"),n.onreadystatechange=function(){4==n.readyState&&(200==n.status||0===n.status?e(n.responseText):i())},n.onerror=i,n.ontimeout=i;try{n.send(null)}catch(a){i()}}function d(t,e,i){var a=n[t];if(!a){if(console.warn("#"+t+" is undefined."),!i)return null;a=i}var s={};for(var o in a){var r=a[o];r=u(r=h(r,e,t,o),e,t),s[o]=r}return s}function h(t,e,i,a){var s=/\{\[\s*([a-zA-Z]+)\(([a-zA-Z]+)\)\s*\]\}/.exec(t);if(!s||!s.length)return t;var o,c=s[1],l=s[2];return e&&l in e?o=e[l]:l in n&&(o=n[l]),c in r&&(t=(0,r[c])(t,o,i,a)),t}function u(t,e,i){return t.replace(/\{\{\s*(.+?)\s*\}\}/g,(function(t,a){return e&&a in e?e[a]:a in n?n[a]:(console.log("argument {{"+a+"}} for #"+i+" is undefined."),t)}))}function p(t){var i=function(t){if(!t)return{};var e=t.getAttribute("data-l10n-id"),i=t.getAttribute("data-l10n-args"),n={};if(i)try{n=JSON.parse(i)}catch(a){console.warn("could not parse arguments for #"+e)}return{id:e,args:n}}(t);if(i.id){var n=d(i.id,i.args);if(n){if(n[s]){if(0===function(t){if(t.children)return t.children.length;if(void 0!==t.childElementCount)return t.childElementCount;for(var e=0,i=0;i<t.childNodes.length;i++)e+=1===t.nodeType?1:0;return e}(t))t[s]=n[s];else{for(var a=t.childNodes,o=!1,r=0,c=a.length;r<c;r++)3===a[r].nodeType&&/\S/.test(a[r].nodeValue)&&(o?a[r].nodeValue="":(a[r].nodeValue=n[s],o=!0));if(!o){var l=e.createTextNode(n[s]);t.insertBefore(l,t.firstChild)}}delete n[s]}for(var h in n)t[h]=n[h]}else console.warn("#"+i.id+" is undefined.")}}return r.plural=function(t,e,i,a){var c=parseFloat(e);if(isNaN(c))return t;if(a!=s)return t;r._pluralRules||(r._pluralRules=function(t){function e(t,e){return-1!==e.indexOf(t)}function i(t,e,i){return e<=t&&t<=i}var n={0:function(t){return"other"},1:function(t){return i(t%100,3,10)?"few":0===t?"zero":i(t%100,11,99)?"many":2==t?"two":1==t?"one":"other"},2:function(t){return 0!==t&&t%10==0?"many":2==t?"two":1==t?"one":"other"},3:function(t){return 1==t?"one":"other"},4:function(t){return i(t,0,1)?"one":"other"},5:function(t){return i(t,0,2)&&2!=t?"one":"other"},6:function(t){return 0===t?"zero":t%10==1&&t%100!=11?"one":"other"},7:function(t){return 2==t?"two":1==t?"one":"other"},8:function(t){return i(t,3,6)?"few":i(t,7,10)?"many":2==t?"two":1==t?"one":"other"},9:function(t){return 0===t||1!=t&&i(t%100,1,19)?"few":1==t?"one":"other"},10:function(t){return i(t%10,2,9)&&!i(t%100,11,19)?"few":t%10!=1||i(t%100,11,19)?"other":"one"},11:function(t){return i(t%10,2,4)&&!i(t%100,12,14)?"few":t%10==0||i(t%10,5,9)||i(t%100,11,14)?"many":t%10==1&&t%100!=11?"one":"other"},12:function(t){return i(t,2,4)?"few":1==t?"one":"other"},13:function(t){return i(t%10,2,4)&&!i(t%100,12,14)?"few":1!=t&&i(t%10,0,1)||i(t%10,5,9)||i(t%100,12,14)?"many":1==t?"one":"other"},14:function(t){return i(t%100,3,4)?"few":t%100==2?"two":t%100==1?"one":"other"},15:function(t){return 0===t||i(t%100,2,10)?"few":i(t%100,11,19)?"many":1==t?"one":"other"},16:function(t){return t%10==1&&11!=t?"one":"other"},17:function(t){return 3==t?"few":0===t?"zero":6==t?"many":2==t?"two":1==t?"one":"other"},18:function(t){return 0===t?"zero":i(t,0,2)&&0!==t&&2!=t?"one":"other"},19:function(t){return i(t,2,10)?"few":i(t,0,1)?"one":"other"},20:function(t){return!i(t%10,3,4)&&t%10!=9||i(t%100,10,19)||i(t%100,70,79)||i(t%100,90,99)?t%1e6==0&&0!==t?"many":t%10!=2||e(t%100,[12,72,92])?t%10!=1||e(t%100,[11,71,91])?"other":"one":"two":"few"},21:function(t){return 0===t?"zero":1==t?"one":"other"},22:function(t){return i(t,0,1)||i(t,11,99)?"one":"other"},23:function(t){return i(t%10,1,2)||t%20==0?"one":"other"},24:function(t){return i(t,3,10)||i(t,13,19)?"few":e(t,[2,12])?"two":e(t,[1,11])?"one":"other"}},a={af:3,ak:4,am:4,ar:1,asa:3,az:0,be:11,bem:3,bez:3,bg:3,bh:4,bm:0,bn:3,bo:0,br:20,brx:3,bs:11,ca:3,cgg:3,chr:3,cs:12,cy:17,da:3,de:3,dv:3,dz:0,ee:3,el:3,en:3,eo:3,es:3,et:3,eu:3,fa:0,ff:5,fi:3,fil:4,fo:3,fr:5,fur:3,fy:3,ga:8,gd:24,gl:3,gsw:3,gu:3,guw:4,gv:23,ha:3,haw:3,he:2,hi:4,hr:11,hu:0,id:0,ig:0,ii:0,is:3,it:3,iu:7,ja:0,jmc:3,jv:0,ka:0,kab:5,kaj:3,kcg:3,kde:0,kea:0,kk:3,kl:3,km:0,kn:0,ko:0,ksb:3,ksh:21,ku:3,kw:7,lag:18,lb:3,lg:3,ln:4,lo:0,lt:10,lv:6,mas:3,mg:4,mk:16,ml:3,mn:3,mo:9,mr:3,ms:0,mt:15,my:0,nah:3,naq:7,nb:3,nd:3,ne:3,nl:3,nn:3,no:3,nr:3,nso:4,ny:3,nyn:3,om:3,or:3,pa:3,pap:3,pl:13,ps:3,pt:3,rm:3,ro:9,rof:3,ru:11,rwk:3,sah:0,saq:3,se:7,seh:3,ses:0,sg:0,sh:11,shi:19,sk:12,sl:14,sma:7,smi:7,smj:7,smn:7,sms:7,sn:3,so:3,sq:3,sr:11,ss:3,ssy:3,st:3,sv:3,sw:3,syr:3,ta:3,te:3,teo:3,th:0,ti:4,tig:3,tk:3,tl:4,tn:3,to:0,tr:0,ts:3,tzm:22,uk:11,ur:3,ve:3,vi:0,vun:3,wa:4,wae:3,wo:0,xh:3,xog:3,yo:0,zh:0,zu:3}[t.replace(/-.*$/,"")];return a in n?n[a]:(console.warn("plural form unknown for ["+t+"]"),function(){return"other"})}(o));var l="["+r._pluralRules(c)+"]";return 0===c&&i+"[zero]"in n?t=n[i+"[zero]"][a]:1==c&&i+"[one]"in n?t=n[i+"[one]"][a]:2==c&&i+"[two]"in n?t=n[i+"[two]"][a]:i+l in n?t=n[i+l][a]:i+"[other]"in n&&(t=n[i+"[other]"][a]),t},{get:function(t,e,i){var n,a=t.lastIndexOf("."),o=s;a>0&&(o=t.substring(a+1),t=t.substring(0,a)),i&&((n={})[o]=i);var r=d(t,e,n);return r&&o in r?r[o]:"{{"+t+"}}"},getData:function(){return n},getText:function(){return a},getLanguage:function(){return o},setLanguage:function(t,i){!function(t,i){t&&(t=t.toLowerCase()),i=i||function(){},n={},a="",o="",o=t;var r=e.querySelectorAll('link[type="application/l10n"]'),d=r.length;if(0!==d){var h,u,p=0;u=function(){++p>=d&&(i(),c="complete")};for(var b=0;b<d;b++)new v(r[b]).load(t,u)}else{var f=(h=e.querySelector('script[type="application/l10n"]'))?JSON.parse(h.innerHTML):null;if(f&&f.locales&&f.default_locale){if(console.log("using the embedded JSON directory, early way out"),!(n=f.locales[t])){var m=f.default_locale.toLowerCase();for(var g in f.locales){if((g=g.toLowerCase())===t){n=f.locales[t];break}g===m&&(n=f.locales[m])}}i()}else console.log("no resource to load, early way out");c="complete"}function v(t){var e=t.href;this.load=function(t,i){!function(t,e,i,o){var r=t.replace(/[^\/]*$/,"")||"./";function c(t){return t.lastIndexOf("\\")<0?t:t.replace(/\\\\/g,"\\").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\b/g,"\b").replace(/\\f/g,"\f").replace(/\\{/g,"{").replace(/\\}/g,"}").replace(/\\"/g,'"').replace(/\\'/g,"'")}l(t,(function(t){a+=t,function(t,a){var o={},d=/^\s*|\s*$/,h=/^\s*#|^\s*$/,u=/^\s*\[(.*)\]\s*$/,p=/^\s*@import\s+url\((.*)\)\s*$/i,b=/^([^=\s]*)\s*=\s*(.+)$/;function f(t,i,n){var a=t.replace(d,"").split(/[\r\n]+/),s="*",l=e.split("-",1)[0],f=!1,g="";!function t(){for(;;){if(!a.length)return void n();var d=a.shift();if(!h.test(d)){if(i){if(g=u.exec(d)){s=g[1].toLowerCase(),f="*"!==s&&s!==e&&s!==l;continue}if(f)continue;if(g=p.exec(d))return void m(r+g[1],t)}var v=d.match(b);v&&3==v.length&&(o[v[1]]=c(v[2]))}}}()}function m(t,e){l(t,(function(t){f(t,!1,e)}),(function(){console.warn(t+" not found."),e()}))}f(t,!0,(function(){!function(t){for(var e in t){var a,o,r=e.lastIndexOf(".");r>0?(a=e.substring(0,r),o=e.substring(r+1)):(a=e,o=s),n[a]||(n[a]={}),n[a][o]=t[e]}i&&i()}(o)}))}(t)}),o)}(e,t,i,(function(){console.warn(e+" not found."),console.warn('"'+t+'" resource not found'),o="",i()}))}}}(t,(function(){i&&i()}))},getDirection:function(){var t=o.split("-",1)[0];return["ar","he","fa","ps","ur"].indexOf(t)>=0?"rtl":"ltr"},translate:function(t){for(var i=function(t){return t?t.querySelectorAll("*[data-l10n-id]"):[]}(t=t||e.documentElement),n=i.length,a=0;a<n;a++)p(i[a]);p(t)},getReadyState:function(){return c},ready:function(i){i&&("complete"==c||"interactive"==c?t.setTimeout((function(){i()})):e.addEventListener&&e.addEventListener("localized",(function t(){e.removeEventListener("localized",t),i()})))}}}(window,document)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PDFFindController=e.FindState=void 0;var n=i(2),a=i(11),s=i(3);const o={FOUND:0,NOT_FOUND:1,WRAPPED:2,PENDING:3};e.FindState=o;const r={"\u2018":"'","\u2019":"'","\u201a":"'","\u201b":"'","\u201c":'"',"\u201d":'"',"\u201e":'"',"\u201f":'"',"\xbc":"1/4","\xbd":"1/2","\xbe":"3/4"};let c=null;function l(t){if(!c){const t=Object.keys(r).join("");c=new RegExp(`[${t}]`,"g")}return t.replace(c,(function(t){return r[t]}))}e.PDFFindController=class{constructor({linkService:t,eventBus:e}){this._linkService=t,this._eventBus=e,this._reset(),e._on("findbarclose",this._onFindBarClose.bind(this))}get highlightMatches(){return this._highlightMatches}get pageMatches(){return this._pageMatches}get pageMatchesLength(){return this._pageMatchesLength}get selected(){return this._selected}get state(){return this._state}setDocument(t){this._pdfDocument&&this._reset(),t&&(this._pdfDocument=t,this._firstPageCapability.resolve())}executeCommand(t,e){if(!e)return;const i=this._pdfDocument;(null===this._state||this._shouldDirtyMatch(t,e))&&(this._dirtyMatch=!0),this._state=e,"findhighlightallchange"!==t&&this._updateUIState(o.PENDING),this._firstPageCapability.promise.then(()=>{if(!this._pdfDocument||i&&this._pdfDocument!==i)return;this._extractText();const e=!this._highlightMatches,n=!!this._findTimeout;this._findTimeout&&(clearTimeout(this._findTimeout),this._findTimeout=null),"find"===t?this._findTimeout=setTimeout(()=>{this._nextMatch(),this._findTimeout=null},250):this._dirtyMatch?this._nextMatch():"findagain"===t?(this._nextMatch(),e&&this._state.highlightAll&&this._updateAllPages()):"findhighlightallchange"===t?(n?this._nextMatch():this._highlightMatches=!0,this._updateAllPages()):this._nextMatch()})}scrollMatchIntoView({element:t=null,pageIndex:e=-1,matchIndex:i=-1}){this._scrollMatches&&t&&-1!==i&&i===this._selected.matchIdx&&-1!==e&&e===this._selected.pageIdx&&(this._scrollMatches=!1,(0,s.scrollIntoView)(t,{top:-50,left:-400},!0))}_reset(){this._highlightMatches=!1,this._scrollMatches=!1,this._pdfDocument=null,this._pageMatches=[],this._pageMatchesLength=[],this._state=null,this._selected={pageIdx:-1,matchIdx:-1},this._offset={pageIdx:null,matchIdx:null,wrapped:!1},this._extractTextPromises=[],this._pageContents=[],this._matchesCountTotal=0,this._pagesToSearch=null,this._pendingFindMatches=Object.create(null),this._resumePageIdx=null,this._dirtyMatch=!1,clearTimeout(this._findTimeout),this._findTimeout=null,this._firstPageCapability=(0,n.createPromiseCapability)()}get _query(){return this._state.query!==this._rawQuery&&(this._rawQuery=this._state.query,this._normalizedQuery=l(this._state.query)),this._normalizedQuery}_shouldDirtyMatch(t,e){if(e.query!==this._state.query)return!0;switch(t){case"findagain":const t=this._selected.pageIdx+1,e=this._linkService;return t>=1&&t<=e.pagesCount&&t!==e.page&&!e.isPageVisible(t);case"findhighlightallchange":return!1}return!0}_prepareMatches(t,e,i){function n(e){const i=t[e];if(e<t.length-1&&i.match===t[e+1].match)return i.skipped=!0,!0;for(let n=e-1;n>=0;n--){const e=t[n];if(!e.skipped){if(e.match+e.matchLength<i.match)break;if(e.match+e.matchLength>=i.match+i.matchLength)return i.skipped=!0,!0}}return!1}t.sort((function(t,e){return t.match===e.match?t.matchLength-e.matchLength:t.match-e.match}));for(let a=0,s=t.length;a<s;a++)n(a)||(e.push(t[a].match),i.push(t[a].matchLength))}_isEntireWord(t,e,i){if(e>0){const i=t.charCodeAt(e),n=t.charCodeAt(e-1);if((0,a.getCharacterType)(i)===(0,a.getCharacterType)(n))return!1}const n=e+i-1;if(n<t.length-1){const e=t.charCodeAt(n),i=t.charCodeAt(n+1);if((0,a.getCharacterType)(e)===(0,a.getCharacterType)(i))return!1}return!0}_calculatePhraseMatch(t,e,i,n){const a=[],s=t.length;let o=-s;for(;o=i.indexOf(t,o+s),-1!==o;)n&&!this._isEntireWord(i,o,s)||a.push(o);this._pageMatches[e]=a}_calculateWordMatch(t,e,i,n){const a=[],s=t.match(/\S+/g);for(let o=0,r=s.length;o<r;o++){const t=s[o],e=t.length;let r=-e;for(;r=i.indexOf(t,r+e),-1!==r;)n&&!this._isEntireWord(i,r,e)||a.push({match:r,matchLength:e,skipped:!1})}this._pageMatchesLength[e]=[],this._pageMatches[e]=[],this._prepareMatches(a,this._pageMatches[e],this._pageMatchesLength[e])}_calculateMatch(t){let e=this._pageContents[t],i=this._query;const{caseSensitive:n,entireWord:a,phraseSearch:s}=this._state;if(0===i.length)return;n||(e=e.toLowerCase(),i=i.toLowerCase()),s?this._calculatePhraseMatch(i,t,e,a):this._calculateWordMatch(i,t,e,a),this._state.highlightAll&&this._updatePage(t),this._resumePageIdx===t&&(this._resumePageIdx=null,this._nextPageMatch());const o=this._pageMatches[t].length;o>0&&(this._matchesCountTotal+=o,this._updateUIResultsCount())}_extractText(){if(this._extractTextPromises.length>0)return;let t=Promise.resolve();for(let e=0,i=this._linkService.pagesCount;e<i;e++){const i=(0,n.createPromiseCapability)();this._extractTextPromises[e]=i.promise,t=t.then(()=>this._pdfDocument.getPage(e+1).then(t=>t.getTextContent({normalizeWhitespace:!0})).then(t=>{const n=t.items,a=[];for(let e=0,i=n.length;e<i;e++)a.push(n[e].str);this._pageContents[e]=l(a.join("")),i.resolve(e)},t=>{console.error("Unable to get text content for page "+(e+1),t),this._pageContents[e]="",i.resolve(e)}))}}_updatePage(t){this._scrollMatches&&this._selected.pageIdx===t&&(this._linkService.page=t+1),this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:t})}_updateAllPages(){this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:-1})}_nextMatch(){const t=this._state.findPrevious,e=this._linkService.page-1,i=this._linkService.pagesCount;if(this._highlightMatches=!0,this._dirtyMatch){this._dirtyMatch=!1,this._selected.pageIdx=this._selected.matchIdx=-1,this._offset.pageIdx=e,this._offset.matchIdx=null,this._offset.wrapped=!1,this._resumePageIdx=null,this._pageMatches.length=0,this._pageMatchesLength.length=0,this._matchesCountTotal=0,this._updateAllPages();for(let t=0;t<i;t++)!0!==this._pendingFindMatches[t]&&(this._pendingFindMatches[t]=!0,this._extractTextPromises[t].then(t=>{delete this._pendingFindMatches[t],this._calculateMatch(t)}))}if(""===this._query)return void this._updateUIState(o.FOUND);if(this._resumePageIdx)return;const n=this._offset;if(this._pagesToSearch=i,null!==n.matchIdx){const e=this._pageMatches[n.pageIdx].length;if(!t&&n.matchIdx+1<e||t&&n.matchIdx>0)return n.matchIdx=t?n.matchIdx-1:n.matchIdx+1,void this._updateMatch(!0);this._advanceOffsetPage(t)}this._nextPageMatch()}_matchesReady(t){const e=this._offset,i=t.length,n=this._state.findPrevious;return i?(e.matchIdx=n?i-1:0,this._updateMatch(!0),!0):(this._advanceOffsetPage(n),!!(e.wrapped&&(e.matchIdx=null,this._pagesToSearch<0))&&(this._updateMatch(!1),!0))}_nextPageMatch(){null!==this._resumePageIdx&&console.error("There can only be one pending page.");let t=null;do{const e=this._offset.pageIdx;if(t=this._pageMatches[e],!t){this._resumePageIdx=e;break}}while(!this._matchesReady(t))}_advanceOffsetPage(t){const e=this._offset,i=this._linkService.pagesCount;e.pageIdx=t?e.pageIdx-1:e.pageIdx+1,e.matchIdx=null,this._pagesToSearch--,(e.pageIdx>=i||e.pageIdx<0)&&(e.pageIdx=t?i-1:0,e.wrapped=!0)}_updateMatch(t=!1){let e=o.NOT_FOUND;const i=this._offset.wrapped;if(this._offset.wrapped=!1,t){const t=this._selected.pageIdx;this._selected.pageIdx=this._offset.pageIdx,this._selected.matchIdx=this._offset.matchIdx,e=i?o.WRAPPED:o.FOUND,-1!==t&&t!==this._selected.pageIdx&&this._updatePage(t)}this._updateUIState(e,this._state.findPrevious),-1!==this._selected.pageIdx&&(this._scrollMatches=!0,this._updatePage(this._selected.pageIdx))}_onFindBarClose(t){const e=this._pdfDocument;this._firstPageCapability.promise.then(()=>{!this._pdfDocument||e&&this._pdfDocument!==e||(this._findTimeout&&(clearTimeout(this._findTimeout),this._findTimeout=null),this._resumePageIdx&&(this._resumePageIdx=null,this._dirtyMatch=!0),this._updateUIState(o.FOUND),this._highlightMatches=!1,this._updateAllPages())})}_requestMatchesCount(){const{pageIdx:t,matchIdx:e}=this._selected;let i=0,n=this._matchesCountTotal;if(-1!==e){for(let e=0;e<t;e++)i+=this._pageMatches[e]&&this._pageMatches[e].length||0;i+=e+1}return(i<1||i>n)&&(i=n=0),{current:i,total:n}}_updateUIResultsCount(){this._eventBus.dispatch("updatefindmatchescount",{source:this,matchesCount:this._requestMatchesCount()})}_updateUIState(t,e){this._eventBus.dispatch("updatefindcontrolstate",{source:this,state:t,previous:e,matchesCount:this._requestMatchesCount()})}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCharacterType=function(t){return function(t){return t<11904}(t)?function(t){return 0==(65408&t)}(t)?function(t){return 32===t||9===t||13===t||10===t}(t)?n.SPACE:function(t){return t>=97&&t<=122||t>=65&&t<=90}(t)||function(t){return t>=48&&t<=57}(t)||95===t?n.ALPHA_LETTER:n.PUNCT:function(t){return 3584==(65408&t)}(t)?n.THAI_LETTER:160===t?n.SPACE:n.ALPHA_LETTER:function(t){return t>=13312&&t<=40959||t>=63744&&t<=64255}(t)?n.HAN_LETTER:function(t){return t>=12448&&t<=12543}(t)?n.KATAKANA_LETTER:function(t){return t>=12352&&t<=12447}(t)?n.HIRAGANA_LETTER:function(t){return t>=65376&&t<=65439}(t)?n.HALFWIDTH_KATAKANA_LETTER:n.ALPHA_LETTER},e.CharacterType=void 0;const n={SPACE:0,ALPHA_LETTER:1,PUNCT:2,HAN_LETTER:3,KATAKANA_LETTER:4,HIRAGANA_LETTER:5,HALFWIDTH_KATAKANA_LETTER:6,THAI_LETTER:7};e.CharacterType=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isDestHashesEqual=s,e.isDestArraysEqual=o,e.PDFHistory=void 0;var n=i(3);function a(){return document.location.hash}function s(t,e){if("string"!=typeof t||"string"!=typeof e)return!1;if(t===e)return!0;const{nameddest:i}=(0,n.parseQueryString)(t);return i===e}function o(t,e){function i(t,e){if(typeof t!=typeof e)return!1;if(Array.isArray(t)||Array.isArray(e))return!1;if(null!==t&&"object"==typeof t&&null!==e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!i(t[n],e[n]))return!1;return!0}return t===e||Number.isNaN(t)&&Number.isNaN(e)}if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t.length!==e.length)return!1;for(let n=0,a=t.length;n<a;n++)if(!i(t[n],e[n]))return!1;return!0}e.PDFHistory=class{constructor({linkService:t,eventBus:e}){this.linkService=t,this.eventBus=e,this._initialized=!1,this._fingerprint="",this.reset(),this._boundEvents=null,this._isViewerInPresentationMode=!1,this.eventBus._on("presentationmodechanged",t=>{this._isViewerInPresentationMode=t.active||t.switchInProgress}),this.eventBus._on("pagesinit",()=>{this._isPagesLoaded=!1;const t=e=>{this.eventBus._off("pagesloaded",t),this._isPagesLoaded=!!e.pagesCount};this.eventBus._on("pagesloaded",t)})}initialize({fingerprint:t,resetHistory:e=!1,updateUrl:i=!1}){if(!t||"string"!=typeof t)return void console.error('PDFHistory.initialize: The "fingerprint" must be a non-empty string.');this._initialized&&this.reset();const n=""!==this._fingerprint&&this._fingerprint!==t;this._fingerprint=t,this._updateUrl=!0===i,this._initialized=!0,this._bindEvents();const s=window.history.state;if(this._popStateInProgress=!1,this._blockHashChange=0,this._currentHash=a(),this._numPositionUpdates=0,this._uid=this._maxUid=0,this._destination=null,this._position=null,!this._isValidState(s,!0)||e){const{hash:t,page:i,rotation:a}=this._parseCurrentHash(!0);return!t||n||e?void this._pushOrReplaceState(null,!0):void this._pushOrReplaceState({hash:t,page:i,rotation:a},!0)}const o=s.destination;this._updateInternalState(o,s.uid,!0),this._uid>this._maxUid&&(this._maxUid=this._uid),void 0!==o.rotation&&(this._initialRotation=o.rotation),o.dest?(this._initialBookmark=JSON.stringify(o.dest),this._destination.page=null):o.hash?this._initialBookmark=o.hash:o.page&&(this._initialBookmark="page="+o.page)}reset(){this._initialized&&(this._pageHide(),this._initialized=!1,this._unbindEvents()),this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),this._initialBookmark=null,this._initialRotation=null}push({namedDest:t=null,explicitDest:e,pageNumber:i}){if(!this._initialized)return;if(t&&"string"!=typeof t)return void console.error(`PDFHistory.push: "${t}" is not a valid namedDest parameter.`);if(!Array.isArray(e))return void console.error(`PDFHistory.push: "${e}" is not a valid explicitDest parameter.`);if(!(Number.isInteger(i)&&i>0&&i<=this.linkService.pagesCount)&&(null!==i||this._destination))return void console.error(`PDFHistory.push: "${i}" is not a valid pageNumber parameter.`);const n=t||JSON.stringify(e);if(!n)return;let a=!1;if(this._destination&&(s(this._destination.hash,n)||o(this._destination.dest,e))){if(this._destination.page)return;a=!0}this._popStateInProgress&&!a||(this._pushOrReplaceState({dest:e,hash:n,page:i,rotation:this.linkService.rotation},a),this._popStateInProgress||(this._popStateInProgress=!0,Promise.resolve().then(()=>{this._popStateInProgress=!1})))}pushCurrentPosition(){this._initialized&&!this._popStateInProgress&&this._tryPushCurrentPosition()}back(){if(!this._initialized||this._popStateInProgress)return;const t=window.history.state;this._isValidState(t)&&t.uid>0&&window.history.back()}forward(){if(!this._initialized||this._popStateInProgress)return;const t=window.history.state;this._isValidState(t)&&t.uid<this._maxUid&&window.history.forward()}get popStateInProgress(){return this._initialized&&(this._popStateInProgress||this._blockHashChange>0)}get initialBookmark(){return this._initialized?this._initialBookmark:null}get initialRotation(){return this._initialized?this._initialRotation:null}_pushOrReplaceState(t,e=!1){const i=e||!this._destination,n={fingerprint:this._fingerprint,uid:i?this._uid:this._uid+1,destination:t};let a;if(this._updateInternalState(t,n.uid),this._updateUrl&&t&&t.hash){const e=document.location.href.split("#")[0];e.startsWith("file://")||(a=`${e}#${t.hash}`)}i?window.history.replaceState(n,"",a):(this._maxUid=this._uid,window.history.pushState(n,"",a))}_tryPushCurrentPosition(t=!1){if(!this._position)return;let e=this._position;if(t&&(e=Object.assign(Object.create(null),this._position),e.temporary=!0),!this._destination)return void this._pushOrReplaceState(e);if(this._destination.temporary)return void this._pushOrReplaceState(e,!0);if(this._destination.hash===e.hash)return;if(!this._destination.page&&this._numPositionUpdates<=50)return;let i=!1;if(this._destination.page>=e.first&&this._destination.page<=e.page){if(this._destination.dest||!this._destination.first)return;i=!0}this._pushOrReplaceState(e,i)}_isValidState(t,e=!1){if(!t)return!1;if(t.fingerprint!==this._fingerprint){if(!e)return!1;{if("string"!=typeof t.fingerprint||t.fingerprint.length!==this._fingerprint.length)return!1;const[e]=performance.getEntriesByType("navigation");if(!e||"reload"!==e.type)return!1}}return!(!Number.isInteger(t.uid)||t.uid<0)&&null!==t.destination&&"object"==typeof t.destination}_updateInternalState(t,e,i=!1){this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),i&&t&&t.temporary&&delete t.temporary,this._destination=t,this._uid=e,this._numPositionUpdates=0}_parseCurrentHash(t=!1){const e=unescape(a()).substring(1),i=(0,n.parseQueryString)(e),s=i.nameddest||"";let o=0|i.page;return Number.isInteger(o)&&o>0&&o<=this.linkService.pagesCount&&!(t&&s.length>0)||(o=null),{hash:e,page:o,rotation:this.linkService.rotation}}_updateViewarea({location:t}){this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),this._position={hash:this._isViewerInPresentationMode?"page="+t.pageNumber:t.pdfOpenParams.substring(1),page:this.linkService.page,first:t.pageNumber,rotation:t.rotation},this._popStateInProgress||(this._isPagesLoaded&&this._destination&&!this._destination.page&&this._numPositionUpdates++,this._updateViewareaTimeout=setTimeout(()=>{this._popStateInProgress||this._tryPushCurrentPosition(!0),this._updateViewareaTimeout=null},1e3))}_popState({state:t}){const e=a(),i=this._currentHash!==e;if(this._currentHash=e,!t){this._uid++;const{hash:t,page:e,rotation:i}=this._parseCurrentHash();return void this._pushOrReplaceState({hash:t,page:e,rotation:i},!0)}if(!this._isValidState(t))return;this._popStateInProgress=!0,i&&(this._blockHashChange++,(0,n.waitOnEventOrTimeout)({target:window,name:"hashchange",delay:1e3}).then(()=>{this._blockHashChange--}));const s=t.destination;this._updateInternalState(s,t.uid,!0),this._uid>this._maxUid&&(this._maxUid=this._uid),(0,n.isValidRotation)(s.rotation)&&(this.linkService.rotation=s.rotation),s.dest?this.linkService.navigateTo(s.dest):s.hash?this.linkService.setHash(s.hash):s.page&&(this.linkService.page=s.page),Promise.resolve().then(()=>{this._popStateInProgress=!1})}_pageHide(){this._destination&&!this._destination.temporary||this._tryPushCurrentPosition()}_bindEvents(){this._boundEvents||(this._boundEvents={updateViewarea:this._updateViewarea.bind(this),popState:this._popState.bind(this),pageHide:this._pageHide.bind(this)},this.eventBus._on("updateviewarea",this._boundEvents.updateViewarea),window.addEventListener("popstate",this._boundEvents.popState),window.addEventListener("pagehide",this._boundEvents.pageHide))}_unbindEvents(){this._boundEvents&&(this.eventBus._off("updateviewarea",this._boundEvents.updateViewarea),window.removeEventListener("popstate",this._boundEvents.popState),window.removeEventListener("pagehide",this._boundEvents.pageHide),this._boundEvents=null)}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PDFPageView=void 0;var n=i(3),a=i(2),s=i(14);const o=i(7).viewerCompatibilityParams.maxCanvasPixels||16777216;e.PDFPageView=class{constructor(t){const e=t.container,i=t.defaultViewport;this.id=t.id,this.renderingId="page"+this.id,this.pdfPage=null,this.pageLabel=null,this.rotation=0,this.scale=t.scale||n.DEFAULT_SCALE,this.viewport=i,this.pdfPageRotate=i.rotation,this.hasRestrictedScaling=!1,this.textLayerMode=Number.isInteger(t.textLayerMode)?t.textLayerMode:n.TextLayerMode.ENABLE,this.imageResourcesPath=t.imageResourcesPath||"",this.renderInteractiveForms=t.renderInteractiveForms||!1,this.useOnlyCssZoom=t.useOnlyCssZoom||!1,this.maxCanvasPixels=t.maxCanvasPixels||o,this.eventBus=t.eventBus,this.renderingQueue=t.renderingQueue,this.textLayerFactory=t.textLayerFactory,this.annotationLayerFactory=t.annotationLayerFactory,this.renderer=t.renderer||n.RendererType.CANVAS,this.enableWebGL=t.enableWebGL||!1,this.l10n=t.l10n||n.NullL10n,this.paintTask=null,this.paintedViewportMap=new WeakMap,this.renderingState=s.RenderingStates.INITIAL,this.resume=null,this.error=null,this.annotationLayer=null,this.textLayer=null,this.zoomLayer=null;const a=document.createElement("div");a.className="page",a.style.width=Math.floor(this.viewport.width)+"px",a.style.height=Math.floor(this.viewport.height)+"px",a.setAttribute("data-page-number",this.id),this.div=a,e.appendChild(a)}setPdfPage(t){this.pdfPage=t,this.pdfPageRotate=t.rotate,this.viewport=t.getViewport({scale:this.scale*n.CSS_UNITS,rotation:(this.rotation+this.pdfPageRotate)%360}),this.stats=t.stats,this.reset()}destroy(){this.reset(),this.pdfPage&&this.pdfPage.cleanup()}_resetZoomLayer(t=!1){if(!this.zoomLayer)return;const e=this.zoomLayer.firstChild;this.paintedViewportMap.delete(e),e.width=0,e.height=0,t&&this.zoomLayer.remove(),this.zoomLayer=null}reset(t=!1,e=!1){this.cancelRendering(e),this.renderingState=s.RenderingStates.INITIAL;const i=this.div;i.style.width=Math.floor(this.viewport.width)+"px",i.style.height=Math.floor(this.viewport.height)+"px";const n=i.childNodes,a=t&&this.zoomLayer||null,o=e&&this.annotationLayer&&this.annotationLayer.div||null;for(let s=n.length-1;s>=0;s--){const t=n[s];a!==t&&o!==t&&i.removeChild(t)}i.removeAttribute("data-loaded"),o?this.annotationLayer.hide():this.annotationLayer&&(this.annotationLayer.cancel(),this.annotationLayer=null),a||(this.canvas&&(this.paintedViewportMap.delete(this.canvas),this.canvas.width=0,this.canvas.height=0,delete this.canvas),this._resetZoomLayer()),this.svg&&(this.paintedViewportMap.delete(this.svg),delete this.svg),this.loadingIconDiv=document.createElement("div"),this.loadingIconDiv.className="loadingIcon",i.appendChild(this.loadingIconDiv)}update(t,e){if(this.scale=t||this.scale,void 0!==e&&(this.rotation=e),this.viewport=this.viewport.clone({scale:this.scale*n.CSS_UNITS,rotation:(this.rotation+this.pdfPageRotate)%360}),this.svg)return this.cssTransform(this.svg,!0),void this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!0,timestamp:performance.now()});let i=!1;if(this.canvas&&this.maxCanvasPixels>0){const t=this.outputScale;(Math.floor(this.viewport.width)*t.sx|0)*(Math.floor(this.viewport.height)*t.sy|0)>this.maxCanvasPixels&&(i=!0)}if(this.canvas){if(this.useOnlyCssZoom||this.hasRestrictedScaling&&i)return this.cssTransform(this.canvas,!0),void this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!0,timestamp:performance.now()});this.zoomLayer||this.canvas.hasAttribute("hidden")||(this.zoomLayer=this.canvas.parentNode,this.zoomLayer.style.position="absolute")}this.zoomLayer&&this.cssTransform(this.zoomLayer.firstChild),this.reset(!0,!0)}cancelRendering(t=!1){this.paintTask&&(this.paintTask.cancel(),this.paintTask=null),this.resume=null,this.textLayer&&(this.textLayer.cancel(),this.textLayer=null),!t&&this.annotationLayer&&(this.annotationLayer.cancel(),this.annotationLayer=null)}cssTransform(t,e=!1){const i=this.viewport.width,n=this.viewport.height,a=this.div;t.style.width=t.parentNode.style.width=a.style.width=Math.floor(i)+"px",t.style.height=t.parentNode.style.height=a.style.height=Math.floor(n)+"px";const s=this.viewport.rotation-this.paintedViewportMap.get(t).rotation,o=Math.abs(s);let r=1,c=1;if(90!==o&&270!==o||(r=n/i,c=i/n),t.style.transform="rotate("+s+"deg) scale("+r+","+c+")",this.textLayer){const t=this.textLayer.viewport,e=Math.abs(this.viewport.rotation-t.rotation);let n=i/t.width;90!==e&&270!==e||(n=i/t.height);const a=this.textLayer.textLayerDiv;let s,o;switch(e){case 0:s=o=0;break;case 90:s=0,o="-"+a.style.height;break;case 180:s="-"+a.style.width,o="-"+a.style.height;break;case 270:s="-"+a.style.width,o=0;break;default:console.error("Bad rotation value.")}a.style.transform="rotate("+e+"deg) scale("+n+", "+n+") translate("+s+", "+o+")",a.style.transformOrigin="0% 0%"}e&&this.annotationLayer&&this.annotationLayer.render(this.viewport,"display")}get width(){return this.viewport.width}get height(){return this.viewport.height}getPagePoint(t,e){return this.viewport.convertToPdfPoint(t,e)}draw(){this.renderingState!==s.RenderingStates.INITIAL&&(console.error("Must be in new state before drawing"),this.reset());const{div:t,pdfPage:e}=this;if(!e)return this.renderingState=s.RenderingStates.FINISHED,this.loadingIconDiv&&(t.removeChild(this.loadingIconDiv),delete this.loadingIconDiv),Promise.reject(new Error("pdfPage is not loaded"));this.renderingState=s.RenderingStates.RUNNING;const i=document.createElement("div");i.style.width=t.style.width,i.style.height=t.style.height,i.classList.add("canvasWrapper"),this.annotationLayer&&this.annotationLayer.div?t.insertBefore(i,this.annotationLayer.div):t.appendChild(i);let o=null;if(this.textLayerMode!==n.TextLayerMode.DISABLE&&this.textLayerFactory){const e=document.createElement("div");e.className="textLayer",e.style.width=i.style.width,e.style.height=i.style.height,this.annotationLayer&&this.annotationLayer.div?t.insertBefore(e,this.annotationLayer.div):t.appendChild(e),o=this.textLayerFactory.createTextLayerBuilder(e,this.id-1,this.viewport,this.textLayerMode===n.TextLayerMode.ENABLE_ENHANCE,this.eventBus)}this.textLayer=o;let r=null;this.renderingQueue&&(r=t=>{if(!this.renderingQueue.isHighestPriority(this))return this.renderingState=s.RenderingStates.PAUSED,void(this.resume=()=>{this.renderingState=s.RenderingStates.RUNNING,t()});t()});const c=async i=>{if(l===this.paintTask&&(this.paintTask=null),i instanceof a.RenderingCancelledException)this.error=null;else if(this.renderingState=s.RenderingStates.FINISHED,this.loadingIconDiv&&(t.removeChild(this.loadingIconDiv),delete this.loadingIconDiv),this._resetZoomLayer(!0),this.error=i,this.stats=e.stats,this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!1,timestamp:performance.now()}),i)throw i},l=this.renderer===n.RendererType.SVG?this.paintOnSvg(i):this.paintOnCanvas(i);l.onRenderContinue=r,this.paintTask=l;const d=l.promise.then((function(){return c(null).then((function(){if(o){const t=e.streamTextContent({normalizeWhitespace:!0});o.setTextContentStream(t),o.render()}}))}),(function(t){return c(t)}));return this.annotationLayerFactory&&(this.annotationLayer||(this.annotationLayer=this.annotationLayerFactory.createAnnotationLayerBuilder(t,e,this.imageResourcesPath,this.renderInteractiveForms,this.l10n)),this.annotationLayer.render(this.viewport,"display")),t.setAttribute("data-loaded",!0),this.eventBus.dispatch("pagerender",{source:this,pageNumber:this.id}),d}paintOnCanvas(t){const e=(0,a.createPromiseCapability)(),i={promise:e.promise,onRenderContinue(t){t()},cancel(){p.cancel()}},s=this.viewport,o=document.createElement("canvas");this.l10n.get("page_canvas",{page:this.id},"Page {{page}}").then(t=>{o.setAttribute("aria-label",t)}),o.setAttribute("hidden","hidden");let r=!0;const c=function(){r&&(o.removeAttribute("hidden"),r=!1)};t.appendChild(o),this.canvas=o,o.mozOpaque=!0;const l=o.getContext("2d",{alpha:!1}),d=(0,n.getOutputScale)(l);if(this.outputScale=d,this.useOnlyCssZoom){const t=s.clone({scale:n.CSS_UNITS});d.sx*=t.width/s.width,d.sy*=t.height/s.height,d.scaled=!0}if(this.maxCanvasPixels>0){const t=Math.sqrt(this.maxCanvasPixels/(s.width*s.height));d.sx>t||d.sy>t?(d.sx=t,d.sy=t,d.scaled=!0,this.hasRestrictedScaling=!0):this.hasRestrictedScaling=!1}const h=(0,n.approximateFraction)(d.sx),u=(0,n.approximateFraction)(d.sy);o.width=(0,n.roundToDivide)(s.width*d.sx,h[0]),o.height=(0,n.roundToDivide)(s.height*d.sy,u[0]),o.style.width=(0,n.roundToDivide)(s.width,h[1])+"px",o.style.height=(0,n.roundToDivide)(s.height,u[1])+"px",this.paintedViewportMap.set(o,s);const p=this.pdfPage.render({canvasContext:l,transform:d.scaled?[d.sx,0,0,d.sy,0,0]:null,viewport:this.viewport,enableWebGL:this.enableWebGL,renderInteractiveForms:this.renderInteractiveForms});return p.onContinue=function(t){c(),i.onRenderContinue?i.onRenderContinue(t):t()},p.promise.then((function(){c(),e.resolve(void 0)}),(function(t){c(),e.reject(t)})),i}paintOnSvg(t){let e=!1;const i=()=>{if(e)throw new a.RenderingCancelledException("Rendering cancelled, page "+this.id,"svg")},o=this.pdfPage,r=this.viewport.clone({scale:n.CSS_UNITS});return{promise:o.getOperatorList().then(e=>(i(),new a.SVGGraphics(o.commonObjs,o.objs).getSVG(e,r).then(e=>{i(),this.svg=e,this.paintedViewportMap.set(e,r),e.style.width=t.style.width,e.style.height=t.style.height,this.renderingState=s.RenderingStates.FINISHED,t.appendChild(e)}))),onRenderContinue(t){t()},cancel(){e=!0}}}setPageLabel(t){this.pageLabel="string"==typeof t?t:null,null!==this.pageLabel?this.div.setAttribute("data-page-label",this.pageLabel):this.div.removeAttribute("data-page-label")}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PDFRenderingQueue=e.RenderingStates=void 0;const n={INITIAL:0,RUNNING:1,PAUSED:2,FINISHED:3};e.RenderingStates=n,e.PDFRenderingQueue=class{constructor(){this.pdfViewer=null,this.pdfThumbnailViewer=null,this.onIdle=null,this.highestPriorityPage=null,this.idleTimeout=null,this.printing=!1,this.isThumbnailViewEnabled=!1}setViewer(t){this.pdfViewer=t}setThumbnailViewer(t){this.pdfThumbnailViewer=t}isHighestPriority(t){return this.highestPriorityPage===t.renderingId}renderHighestPriority(t){this.idleTimeout&&(clearTimeout(this.idleTimeout),this.idleTimeout=null),this.pdfViewer.forceRendering(t)||this.pdfThumbnailViewer&&this.isThumbnailViewEnabled&&this.pdfThumbnailViewer.forceRendering()||this.printing||this.onIdle&&(this.idleTimeout=setTimeout(this.onIdle.bind(this),3e4))}getHighestPriority(t,e,i){const n=t.views,a=n.length;if(0===a)return null;for(let s=0;s<a;++s){const t=n[s].view;if(!this.isViewFinished(t))return t}if(i){const i=t.last.id;if(e[i]&&!this.isViewFinished(e[i]))return e[i]}else{const i=t.first.id-2;if(e[i]&&!this.isViewFinished(e[i]))return e[i]}return null}isViewFinished(t){return t.renderingState===n.FINISHED}renderView(t){switch(t.renderingState){case n.FINISHED:return!1;case n.PAUSED:this.highestPriorityPage=t.renderingId,t.resume();break;case n.RUNNING:this.highestPriorityPage=t.renderingId;break;case n.INITIAL:this.highestPriorityPage=t.renderingId,t.draw().finally(()=>{this.renderHighestPriority()}).catch(t=>{console.error(`renderView: "${t}"`)})}return!0}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PDFSinglePageViewer=void 0;var n=i(16),a=i(2);e.PDFSinglePageViewer=class extends n.BaseViewer{constructor(t){super(t),this.eventBus._on("pagesinit",t=>{this._ensurePageViewVisible()})}get _viewerElement(){return(0,a.shadow)(this,"_viewerElement",this._shadowViewer)}_resetView(){super._resetView(),this._previousPageNumber=1,this._shadowViewer=document.createDocumentFragment(),this._updateScrollDown=null}_ensurePageViewVisible(){const t=this._pages[this._currentPageNumber-1],e=this._pages[this._previousPageNumber-1],i=this.viewer.childNodes;switch(i.length){case 0:this.viewer.appendChild(t.div);break;case 1:if(i[0]!==e.div)throw new Error("_ensurePageViewVisible: Unexpected previously visible page.");if(t===e)break;this._shadowViewer.appendChild(e.div),this.viewer.appendChild(t.div),this.container.scrollTop=0;break;default:throw new Error("_ensurePageViewVisible: Only one page should be visible at a time.")}this._previousPageNumber=this._currentPageNumber}_scrollUpdate(){this._updateScrollDown&&this._updateScrollDown(),super._scrollUpdate()}_scrollIntoView({pageDiv:t,pageSpot:e=null,pageNumber:i=null}){i&&this._setCurrentPageNumber(i);const n=this._currentPageNumber>=this._previousPageNumber;this._ensurePageViewVisible(),this.update(),super._scrollIntoView({pageDiv:t,pageSpot:e,pageNumber:i}),this._updateScrollDown=()=>{this.scroll.down=n,this._updateScrollDown=null}}_getVisiblePages(){return this._getCurrentVisiblePage()}_updateHelper(t){}get _isScrollModeHorizontal(){return(0,a.shadow)(this,"_isScrollModeHorizontal",!1)}_updateScrollMode(){}_updateSpreadMode(){}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseViewer=void 0;var n=i(3),a=i(14),s=i(1),o=i(2),r=i(13),c=i(4),l=i(5);function d(t){const e=[];this.push=function(i){const n=e.indexOf(i);n>=0&&e.splice(n,1),e.push(i),e.length>t&&e.shift().destroy()},this.resize=function(i,a){if(t=i,a){const t=new Set;for(let e=0,i=a.length;e<i;++e)t.add(a[e].id);(0,n.moveToEndOfArray)(e,(function(e){return t.has(e.id)}))}for(;e.length>t;)e.shift().destroy()}}class h{constructor(t){if(this.constructor===h)throw new Error("Cannot initialize BaseViewer.");this._name=this.constructor.name,this.container=t.container,this.viewer=t.viewer||t.container.firstElementChild,this.eventBus=t.eventBus,this.linkService=t.linkService||new c.SimpleLinkService,this.downloadManager=t.downloadManager||null,this.findController=t.findController||null,this.removePageBorders=t.removePageBorders||!1,this.textLayerMode=Number.isInteger(t.textLayerMode)?t.textLayerMode:n.TextLayerMode.ENABLE,this.imageResourcesPath=t.imageResourcesPath||"",this.renderInteractiveForms=t.renderInteractiveForms||!1,this.enablePrintAutoRotate=t.enablePrintAutoRotate||!1,this.renderer=t.renderer||n.RendererType.CANVAS,this.enableWebGL=t.enableWebGL||!1,this.useOnlyCssZoom=t.useOnlyCssZoom||!1,this.maxCanvasPixels=t.maxCanvasPixels,this.l10n=t.l10n||n.NullL10n,this.defaultRenderingQueue=!t.renderingQueue,this.defaultRenderingQueue?(this.renderingQueue=new a.PDFRenderingQueue,this.renderingQueue.setViewer(this)):this.renderingQueue=t.renderingQueue,this.scroll=(0,n.watchScroll)(this.container,this._scrollUpdate.bind(this)),this.presentationModeState=n.PresentationModeState.UNKNOWN,this._onBeforeDraw=this._onAfterDraw=null,this._resetView(),this.removePageBorders&&this.viewer.classList.add("removePageBorders"),Promise.resolve().then(()=>{this.eventBus.dispatch("baseviewerinit",{source:this})})}get pagesCount(){return this._pages.length}getPageView(t){return this._pages[t]}get pageViewsReady(){return!!this._pagesCapability.settled&&this._pages.every((function(t){return t&&t.pdfPage}))}get currentPageNumber(){return this._currentPageNumber}set currentPageNumber(t){if(!Number.isInteger(t))throw new Error("Invalid page number.");this.pdfDocument&&(this._setCurrentPageNumber(t,!0)||console.error(`${this._name}.currentPageNumber: "${t}" is not a valid page.`))}_setCurrentPageNumber(t,e=!1){return this._currentPageNumber===t?(e&&this._resetCurrentPageView(),!0):0<t&&t<=this.pagesCount&&(this._currentPageNumber=t,this.eventBus.dispatch("pagechanging",{source:this,pageNumber:t,pageLabel:this._pageLabels&&this._pageLabels[t-1]}),e&&this._resetCurrentPageView(),!0)}get currentPageLabel(){return this._pageLabels&&this._pageLabels[this._currentPageNumber-1]}set currentPageLabel(t){if(!this.pdfDocument)return;let e=0|t;if(this._pageLabels){const i=this._pageLabels.indexOf(t);i>=0&&(e=i+1)}this._setCurrentPageNumber(e,!0)||console.error(`${this._name}.currentPageLabel: "${t}" is not a valid page.`)}get currentScale(){return this._currentScale!==n.UNKNOWN_SCALE?this._currentScale:n.DEFAULT_SCALE}set currentScale(t){if(isNaN(t))throw new Error("Invalid numeric scale.");this.pdfDocument&&this._setScale(t,!1)}get currentScaleValue(){return this._currentScaleValue}set currentScaleValue(t){this.pdfDocument&&this._setScale(t,!1)}get pagesRotation(){return this._pagesRotation}set pagesRotation(t){if(!(0,n.isValidRotation)(t))throw new Error("Invalid pages rotation angle.");if(!this.pdfDocument)return;if(this._pagesRotation===t)return;this._pagesRotation=t;const e=this._currentPageNumber;for(let i=0,n=this._pages.length;i<n;i++){const e=this._pages[i];e.update(e.scale,t)}this._currentScaleValue&&this._setScale(this._currentScaleValue,!0),this.eventBus.dispatch("rotationchanging",{source:this,pagesRotation:t,pageNumber:e}),this.defaultRenderingQueue&&this.update()}get firstPagePromise(){return this.pdfDocument?this._firstPageCapability.promise:null}get onePageRendered(){return this.pdfDocument?this._onePageRenderedCapability.promise:null}get pagesPromise(){return this.pdfDocument?this._pagesCapability.promise:null}get _viewerElement(){throw new Error("Not implemented: _viewerElement")}_onePageRenderedOrForceFetch(){return this.container.offsetParent&&0!==this._getVisiblePages().views.length?this._onePageRenderedCapability.promise:Promise.resolve()}setDocument(t){if(this.pdfDocument&&(this._cancelRendering(),this._resetView(),this.findController&&this.findController.setDocument(null)),this.pdfDocument=t,!t)return;const e=t.numPages,i=t.getPage(1);this._pagesCapability.promise.then(()=>{this.eventBus.dispatch("pagesloaded",{source:this,pagesCount:e})}),this._onBeforeDraw=t=>{const e=this._pages[t.pageNumber-1];e&&this._buffer.push(e)},this.eventBus._on("pagerender",this._onBeforeDraw),this._onAfterDraw=t=>{t.cssTransform||this._onePageRenderedCapability.settled||(this._onePageRenderedCapability.resolve(),this.eventBus._off("pagerendered",this._onAfterDraw),this._onAfterDraw=null)},this.eventBus._on("pagerendered",this._onAfterDraw),i.then(i=>{this._firstPageCapability.resolve(i);const a=this.currentScale,s=i.getViewport({scale:a*n.CSS_UNITS}),o=this.textLayerMode!==n.TextLayerMode.DISABLE?this:null;for(let t=1;t<=e;++t){const e=new r.PDFPageView({container:this._viewerElement,eventBus:this.eventBus,id:t,scale:a,defaultViewport:s.clone(),renderingQueue:this.renderingQueue,textLayerFactory:o,textLayerMode:this.textLayerMode,annotationLayerFactory:this,imageResourcesPath:this.imageResourcesPath,renderInteractiveForms:this.renderInteractiveForms,renderer:this.renderer,enableWebGL:this.enableWebGL,useOnlyCssZoom:this.useOnlyCssZoom,maxCanvasPixels:this.maxCanvasPixels,l10n:this.l10n});this._pages.push(e)}const c=this._pages[0];c&&(c.setPdfPage(i),this.linkService.cachePageRef(1,i.ref)),this._spreadMode!==n.SpreadMode.NONE&&this._updateSpreadMode(),this._onePageRenderedOrForceFetch().then(()=>{if(this.findController&&this.findController.setDocument(t),t.loadingParams.disableAutoFetch||e>7500)return void this._pagesCapability.resolve();let i=e-1;if(i<=0)this._pagesCapability.resolve();else for(let n=2;n<=e;++n)t.getPage(n).then(t=>{const e=this._pages[n-1];e.pdfPage||e.setPdfPage(t),this.linkService.cachePageRef(n,t.ref),0==--i&&this._pagesCapability.resolve()},t=>{console.error(`Unable to get page ${n} to initialize viewer`,t),0==--i&&this._pagesCapability.resolve()})}),this.eventBus.dispatch("pagesinit",{source:this}),this.defaultRenderingQueue&&this.update()}).catch(t=>{console.error("Unable to initialize viewer",t)})}setPageLabels(t){if(this.pdfDocument){t?Array.isArray(t)&&this.pdfDocument.numPages===t.length?this._pageLabels=t:(this._pageLabels=null,console.error(this._name+".setPageLabels: Invalid page labels.")):this._pageLabels=null;for(let t=0,e=this._pages.length;t<e;t++)this._pages[t].setPageLabel(this._pageLabels&&this._pageLabels[t])}}_resetView(){this._pages=[],this._currentPageNumber=1,this._currentScale=n.UNKNOWN_SCALE,this._currentScaleValue=null,this._pageLabels=null,this._buffer=new d(10),this._location=null,this._pagesRotation=0,this._pagesRequests=new WeakMap,this._firstPageCapability=(0,o.createPromiseCapability)(),this._onePageRenderedCapability=(0,o.createPromiseCapability)(),this._pagesCapability=(0,o.createPromiseCapability)(),this._scrollMode=n.ScrollMode.VERTICAL,this._spreadMode=n.SpreadMode.NONE,this._onBeforeDraw&&(this.eventBus._off("pagerender",this._onBeforeDraw),this._onBeforeDraw=null),this._onAfterDraw&&(this.eventBus._off("pagerendered",this._onAfterDraw),this._onAfterDraw=null),this.viewer.textContent="",this._updateScrollMode()}_scrollUpdate(){0!==this.pagesCount&&this.update()}_scrollIntoView({pageDiv:t,pageSpot:e=null,pageNumber:i=null}){(0,n.scrollIntoView)(t,e)}_setScaleUpdatePages(t,e,i=!1,n=!1){if(this._currentScaleValue=e.toString(),function(t,e){return e===t||Math.abs(e-t)<1e-15}(this._currentScale,t))n&&this.eventBus.dispatch("scalechanging",{source:this,scale:t,presetValue:e});else{for(let e=0,i=this._pages.length;e<i;e++)this._pages[e].update(t);if(this._currentScale=t,!i){let t,e=this._currentPageNumber;!this._location||this.isInPresentationMode||this.isChangingPresentationMode||(e=this._location.pageNumber,t=[null,{name:"XYZ"},this._location.left,this._location.top,null]),this.scrollPageIntoView({pageNumber:e,destArray:t,allowNegativeOffset:!0})}this.eventBus.dispatch("scalechanging",{source:this,scale:t,presetValue:n?e:void 0}),this.defaultRenderingQueue&&this.update()}}_setScale(t,e=!1){let i=parseFloat(t);if(i>0)this._setScaleUpdatePages(i,t,e,!1);else{const a=this._pages[this._currentPageNumber-1];if(!a)return;const s=this.isInPresentationMode||this.removePageBorders;let o=s?0:n.SCROLLBAR_PADDING,r=s?0:n.VERTICAL_PADDING;!s&&this._isScrollModeHorizontal&&([o,r]=[r,o]);const c=(this.container.clientWidth-o)/a.width*a.scale,l=(this.container.clientHeight-r)/a.height*a.scale;switch(t){case"page-actual":i=1;break;case"page-width":i=c;break;case"page-height":i=l;break;case"page-fit":i=Math.min(c,l);break;case"auto":const e=(0,n.isPortraitOrientation)(a)?c:Math.min(l,c);i=Math.min(n.MAX_AUTO_SCALE,e);break;default:return void console.error(`${this._name}._setScale: "${t}" is an unknown zoom value.`)}this._setScaleUpdatePages(i,t,e,!0)}}_resetCurrentPageView(){this.isInPresentationMode&&this._setScale(this._currentScaleValue,!0),this._scrollIntoView({pageDiv:this._pages[this._currentPageNumber-1].div})}scrollPageIntoView({pageNumber:t,destArray:e=null,allowNegativeOffset:i=!1,ignoreDestinationZoom:a=!1}){if(!this.pdfDocument)return;const s=Number.isInteger(t)&&this._pages[t-1];if(!s)return void console.error(this._name+".scrollPageIntoView: "+`"${t}" is not a valid pageNumber parameter.`);if(this.isInPresentationMode||!e)return void this._setCurrentPageNumber(t,!0);let o,r,c=0,l=0,d=0,h=0;const u=s.rotation%180!=0,p=(u?s.height:s.width)/s.scale/n.CSS_UNITS,b=(u?s.width:s.height)/s.scale/n.CSS_UNITS;let f=0;switch(e[1].name){case"XYZ":c=e[2],l=e[3],f=e[4],c=null!==c?c:0,l=null!==l?l:b;break;case"Fit":case"FitB":f="page-fit";break;case"FitH":case"FitBH":l=e[2],f="page-width",null===l&&this._location&&(c=this._location.left,l=this._location.top);break;case"FitV":case"FitBV":c=e[2],d=p,h=b,f="page-height";break;case"FitR":c=e[2],l=e[3],d=e[4]-c,h=e[5]-l,o=(this.container.clientWidth-(this.removePageBorders?0:n.SCROLLBAR_PADDING))/d/n.CSS_UNITS,r=(this.container.clientHeight-(this.removePageBorders?0:n.VERTICAL_PADDING))/h/n.CSS_UNITS,f=Math.min(Math.abs(o),Math.abs(r));break;default:return void console.error(this._name+".scrollPageIntoView: "+`"${e[1].name}" is not a valid destination type.`)}if(a||(f&&f!==this._currentScale?this.currentScaleValue=f:this._currentScale===n.UNKNOWN_SCALE&&(this.currentScaleValue=n.DEFAULT_SCALE_VALUE)),"page-fit"===f&&!e[4])return void this._scrollIntoView({pageDiv:s.div,pageNumber:t});const m=[s.viewport.convertToViewportPoint(c,l),s.viewport.convertToViewportPoint(c+d,l+h)];let g=Math.min(m[0][0],m[1][0]),v=Math.min(m[0][1],m[1][1]);i||(g=Math.max(g,0),v=Math.max(v,0)),this._scrollIntoView({pageDiv:s.div,pageSpot:{left:g,top:v},pageNumber:t})}_updateLocation(t){const e=this._currentScale,i=this._currentScaleValue,n=parseFloat(i)===e?Math.round(1e4*e)/100:i,a=t.id;let s="#page="+a;s+="&zoom="+n;const o=this.container,r=this._pages[a-1].getPagePoint(o.scrollLeft-t.x,o.scrollTop-t.y),c=Math.round(r[0]),l=Math.round(r[1]);s+=","+c+","+l,this._location={pageNumber:a,scale:n,top:l,left:c,rotation:this._pagesRotation,pdfOpenParams:s}}_updateHelper(t){throw new Error("Not implemented: _updateHelper")}update(){const t=this._getVisiblePages(),e=t.views,i=e.length;if(0===i)return;const n=Math.max(10,2*i+1);this._buffer.resize(n,e),this.renderingQueue.renderHighestPriority(t),this._updateHelper(e),this._updateLocation(t.first),this.eventBus.dispatch("updateviewarea",{source:this,location:this._location})}containsElement(t){return this.container.contains(t)}focus(){this.container.focus()}get _isScrollModeHorizontal(){return!this.isInPresentationMode&&this._scrollMode===n.ScrollMode.HORIZONTAL}get isInPresentationMode(){return this.presentationModeState===n.PresentationModeState.FULLSCREEN}get isChangingPresentationMode(){return this.presentationModeState===n.PresentationModeState.CHANGING}get isHorizontalScrollbarEnabled(){return!this.isInPresentationMode&&this.container.scrollWidth>this.container.clientWidth}get isVerticalScrollbarEnabled(){return!this.isInPresentationMode&&this.container.scrollHeight>this.container.clientHeight}_getCurrentVisiblePage(){if(!this.pagesCount)return{views:[]};const t=this._pages[this._currentPageNumber-1],e=t.div,i={id:t.id,x:e.offsetLeft+e.clientLeft,y:e.offsetTop+e.clientTop,view:t};return{first:i,last:i,views:[i]}}_getVisiblePages(){return(0,n.getVisibleElements)(this.container,this._pages,!0,this._isScrollModeHorizontal)}isPageVisible(t){return!!this.pdfDocument&&(t<1||t>this.pagesCount?(console.error(`${this._name}.isPageVisible: "${t}" is out of bounds.`),!1):this._getVisiblePages().views.some((function(e){return e.id===t})))}cleanup(){for(let t=0,e=this._pages.length;t<e;t++)this._pages[t]&&this._pages[t].renderingState!==a.RenderingStates.FINISHED&&this._pages[t].reset()}_cancelRendering(){for(let t=0,e=this._pages.length;t<e;t++)this._pages[t]&&this._pages[t].cancelRendering()}_ensurePdfPageLoaded(t){if(t.pdfPage)return Promise.resolve(t.pdfPage);if(this._pagesRequests.has(t))return this._pagesRequests.get(t);const e=this.pdfDocument.getPage(t.id).then(e=>(t.pdfPage||t.setPdfPage(e),this._pagesRequests.delete(t),e)).catch(e=>{console.error("Unable to get page for page view",e),this._pagesRequests.delete(t)});return this._pagesRequests.set(t,e),e}forceRendering(t){const e=t||this._getVisiblePages(),i=this.renderingQueue.getHighestPriority(e,this._pages,this._isScrollModeHorizontal?this.scroll.right:this.scroll.down);return!!i&&(this._ensurePdfPageLoaded(i).then(()=>{this.renderingQueue.renderView(i)}),!0)}createTextLayerBuilder(t,e,i,n=!1,a){return new l.TextLayerBuilder({textLayerDiv:t,eventBus:a,pageIndex:e,viewport:i,findController:this.isInPresentationMode?null:this.findController,enhanceTextSelection:!this.isInPresentationMode&&n})}createAnnotationLayerBuilder(t,e,i="",a=!1,o=n.NullL10n){return new s.AnnotationLayerBuilder({pageDiv:t,pdfPage:e,imageResourcesPath:i,renderInteractiveForms:a,linkService:this.linkService,downloadManager:this.downloadManager,l10n:o})}get hasEqualPageSizes(){const t=this._pages[0];for(let e=1,i=this._pages.length;e<i;++e){const i=this._pages[e];if(i.width!==t.width||i.height!==t.height)return!1}return!0}getPagesOverview(){const t=this._pages.map((function(t){const e=t.pdfPage.getViewport({scale:1});return{width:e.width,height:e.height,rotation:e.rotation}}));if(!this.enablePrintAutoRotate)return t;const e=(0,n.isPortraitOrientation)(t[0]);return t.map((function(t){return e===(0,n.isPortraitOrientation)(t)?t:{width:t.height,height:t.width,rotation:(t.rotation+90)%360}}))}get scrollMode(){return this._scrollMode}set scrollMode(t){if(this._scrollMode!==t){if(!(0,n.isValidScrollMode)(t))throw new Error("Invalid scroll mode: "+t);this._scrollMode=t,this.eventBus.dispatch("scrollmodechanged",{source:this,mode:t}),this._updateScrollMode(this._currentPageNumber)}}_updateScrollMode(t=null){const e=this._scrollMode,i=this.viewer;i.classList.toggle("scrollHorizontal",e===n.ScrollMode.HORIZONTAL),i.classList.toggle("scrollWrapped",e===n.ScrollMode.WRAPPED),this.pdfDocument&&t&&(this._currentScaleValue&&isNaN(this._currentScaleValue)&&this._setScale(this._currentScaleValue,!0),this._setCurrentPageNumber(t,!0),this.update())}get spreadMode(){return this._spreadMode}set spreadMode(t){if(this._spreadMode!==t){if(!(0,n.isValidSpreadMode)(t))throw new Error("Invalid spread mode: "+t);this._spreadMode=t,this.eventBus.dispatch("spreadmodechanged",{source:this,mode:t}),this._updateSpreadMode(this._currentPageNumber)}}_updateSpreadMode(t=null){if(!this.pdfDocument)return;const e=this.viewer,i=this._pages;if(e.textContent="",this._spreadMode===n.SpreadMode.NONE)for(let n=0,a=i.length;n<a;++n)e.appendChild(i[n].div);else{const t=this._spreadMode-1;let n=null;for(let a=0,s=i.length;a<s;++a)null===n?(n=document.createElement("div"),n.className="spread",e.appendChild(n)):a%2===t&&(n=n.cloneNode(!1),e.appendChild(n)),n.appendChild(i[a].div)}t&&(this._setCurrentPageNumber(t,!0),this.update())}}e.BaseViewer=h},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PDFViewer=void 0;var n=i(16),a=i(2);e.PDFViewer=class extends n.BaseViewer{get _viewerElement(){return(0,a.shadow)(this,"_viewerElement",this.viewer)}_scrollIntoView({pageDiv:t,pageSpot:e=null,pageNumber:i=null}){if(!e&&!this.isInPresentationMode){const i=t.offsetLeft+t.clientLeft,n=i+t.clientWidth,{scrollLeft:a,clientWidth:s}=this.container;(this._isScrollModeHorizontal||i<a||n>a+s)&&(e={left:0,top:0})}super._scrollIntoView({pageDiv:t,pageSpot:e,pageNumber:i})}_getVisiblePages(){return this.isInPresentationMode?this._getCurrentVisiblePage():super._getVisiblePages()}_updateHelper(t){if(this.isInPresentationMode)return;let e=this._currentPageNumber,i=!1;for(const n of t){if(n.percent<100)break;if(n.id===e){i=!0;break}}i||(e=t[0].id),this._setCurrentPageNumber(e)}}}])},t.exports=n()},mrSG:function(t,e,i){"use strict";function n(t,e,i,n){return new(i||(i=Promise))((function(a,s){function o(t){try{c(n.next(t))}catch(e){s(e)}}function r(t){try{c(n.throw(t))}catch(e){s(e)}}function c(t){var e;t.done?a(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,r)}c((n=n.apply(t,e||[])).next())}))}i.d(e,"a",(function(){return n}))},n6bG:function(t,e,i){"use strict";function n(t){return"function"==typeof t}i.d(e,"a",(function(){return n}))},nLfN:function(t,e,i){"use strict";i.d(e,"a",(function(){return r})),i.d(e,"b",(function(){return c})),i.d(e,"c",(function(){return v})),i.d(e,"d",(function(){return g})),i.d(e,"e",(function(){return d})),i.d(e,"f",(function(){return f})),i.d(e,"g",(function(){return m}));var n=i("fXoL"),a=i("ofXK");let s;try{s="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(_){s=!1}let o,r=(()=>{class t{constructor(t){this._platformId=t,this.isBrowser=this._platformId?Object(a.I)(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&&!s)&&"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)(n.ac(n.F))},t.\u0275prov=Object(n.Mb)({factory:function(){return new t(Object(n.ac)(n.F))},token:t,providedIn:"root"}),t})(),c=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)}}),t})();const l=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function d(){if(o)return o;if("object"!=typeof document||!document)return o=new Set(l),o;let t=document.createElement("input");return o=new Set(l.filter(e=>(t.setAttribute("type",e),t.type===e))),o}let h,u,p,b;function f(t){return function(){if(null==h&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>h=!0}))}finally{h=h||!1}return h}()?t:!!t.capture}function m(){if(null==p)if("object"==typeof document&&document||(p=!1),"scrollBehavior"in document.documentElement.style)p=!0;else{const t=Element.prototype.scrollTo;p=!!t&&!/\{\s*\[native code\]\s*\}/.test(t.toString())}return p}function g(){if("object"!=typeof document||!document)return 0;if(null==u){const t=document.createElement("div"),e=t.style;t.dir="rtl",e.width="1px",e.overflow="auto",e.visibility="hidden",e.pointerEvents="none",e.position="absolute";const i=document.createElement("div"),n=i.style;n.width="2px",n.height="1px",t.appendChild(i),document.body.appendChild(t),u=0,0===t.scrollLeft&&(t.scrollLeft=1,u=0===t.scrollLeft?1:2),t.parentNode.removeChild(t)}return u}function v(t){if(function(){if(null==b){const t="undefined"!=typeof document?document.head:null;b=!(!t||!t.createShadowRoot&&!t.attachShadow)}return b}()){const e=t.getRootNode?t.getRootNode():null;if("undefined"!=typeof ShadowRoot&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}},nYR2:function(t,e,i){"use strict";i.d(e,"a",(function(){return s}));var n=i("7o/Q"),a=i("quSY");function s(t){return e=>e.lift(new o(t))}class o{constructor(t){this.callback=t}call(t,e){return e.subscribe(new r(t,this.callback))}}class r extends n.a{constructor(t,e){super(t),this.add(new a.a(e))}}},ngJS:function(t,e,i){"use strict";i.d(e,"a",(function(){return n}));const n=t=>e=>{for(let i=0,n=t.length;i<n&&!e.closed;i++)e.next(t[i]);e.complete()}},ofXK:function(t,e,i){"use strict";i.d(e,"a",(function(){return y})),i.d(e,"b",(function(){return Rt})),i.d(e,"c",(function(){return Kt})),i.d(e,"d",(function(){return Ht})),i.d(e,"e",(function(){return c})),i.d(e,"f",(function(){return Et})),i.d(e,"g",(function(){return Ut})),i.d(e,"h",(function(){return C})),i.d(e,"i",(function(){return Lt})),i.d(e,"j",(function(){return Qt})),i.d(e,"k",(function(){return Nt})),i.d(e,"l",(function(){return zt})),i.d(e,"m",(function(){return h})),i.d(e,"n",(function(){return O})),i.d(e,"o",(function(){return v})),i.d(e,"p",(function(){return jt})),i.d(e,"q",(function(){return ht})),i.d(e,"r",(function(){return ut})),i.d(e,"s",(function(){return bt})),i.d(e,"t",(function(){return mt})),i.d(e,"u",(function(){return Ot})),i.d(e,"v",(function(){return Dt})),i.d(e,"w",(function(){return wt})),i.d(e,"x",(function(){return yt})),i.d(e,"y",(function(){return xt})),i.d(e,"z",(function(){return Ct})),i.d(e,"A",(function(){return Mt})),i.d(e,"B",(function(){return x})),i.d(e,"C",(function(){return $t})),i.d(e,"D",(function(){return l})),i.d(e,"E",(function(){return qt})),i.d(e,"F",(function(){return Wt})),i.d(e,"G",(function(){return Tt})),i.d(e,"H",(function(){return Zt})),i.d(e,"I",(function(){return Jt})),i.d(e,"J",(function(){return r})),i.d(e,"K",(function(){return Yt})),i.d(e,"L",(function(){return s})),i.d(e,"M",(function(){return dt})),i.d(e,"N",(function(){return o}));var n=i("fXoL");let a=null;function s(){return a}function o(t){a||(a=t)}class r{}const c=new n.s("DocumentToken");let l=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(n.Mb)({factory:d,token:t,providedIn:"platform"}),t})();function d(){return Object(n.ac)(u)}const h=new n.s("Location Initialized");let u=(()=>{class t extends l{constructor(t){super(),this._doc=t,this._init()}_init(){this.location=s().getLocation(),this._history=s().getHistory()}getBaseHrefFromDOM(){return s().getBaseHref(this._doc)}onPopState(t){s().getGlobalEventTarget(this._doc,"window").addEventListener("popstate",t,!1)}onHashChange(t){s().getGlobalEventTarget(this._doc,"window").addEventListener("hashchange",t,!1)}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(t){this.location.pathname=t}pushState(t,e,i){p()?this._history.pushState(t,e,i):this.location.hash=i}replaceState(t,e,i){p()?this._history.replaceState(t,e,i):this.location.hash=i}forward(){this._history.forward()}back(){this._history.back()}getState(){return this._history.state}}return t.\u0275fac=function(e){return new(e||t)(n.ac(c))},t.\u0275prov=Object(n.Mb)({factory:b,token:t,providedIn:"platform"}),t})();function p(){return!!window.history.pushState}function b(){return new u(Object(n.ac)(c))}function f(t,e){if(0==t.length)return e;if(0==e.length)return t;let i=0;return t.endsWith("/")&&i++,e.startsWith("/")&&i++,2==i?t+e.substring(1):1==i?t+e:t+"/"+e}function m(t){const e=t.match(/#|\?|$/),i=e&&e.index||t.length;return t.slice(0,i-("/"===t[i-1]?1:0))+t.slice(i)}function g(t){return t&&"?"!==t[0]?"?"+t:t}let v=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(n.Mb)({factory:_,token:t,providedIn:"root"}),t})();function _(t){const e=Object(n.ac)(c).location;return new x(Object(n.ac)(l),e&&e.origin||"")}const y=new n.s("appBaseHref");let x=(()=>{class t extends v{constructor(t,e){if(super(),this._platformLocation=t,null==e&&(e=this._platformLocation.getBaseHrefFromDOM()),null==e)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=e}onPopState(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)}getBaseHref(){return this._baseHref}prepareExternalUrl(t){return f(this._baseHref,t)}path(t=!1){const e=this._platformLocation.pathname+g(this._platformLocation.search),i=this._platformLocation.hash;return i&&t?`${e}${i}`:e}pushState(t,e,i,n){const a=this.prepareExternalUrl(i+g(n));this._platformLocation.pushState(t,e,a)}replaceState(t,e,i,n){const a=this.prepareExternalUrl(i+g(n));this._platformLocation.replaceState(t,e,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}}return t.\u0275fac=function(e){return new(e||t)(n.ac(l),n.ac(y,8))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})(),C=(()=>{class t extends v{constructor(t,e){super(),this._platformLocation=t,this._baseHref="",null!=e&&(this._baseHref=e)}onPopState(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)}getBaseHref(){return this._baseHref}path(t=!1){let e=this._platformLocation.hash;return null==e&&(e="#"),e.length>0?e.substring(1):e}prepareExternalUrl(t){const e=f(this._baseHref,t);return e.length>0?"#"+e:e}pushState(t,e,i,n){let a=this.prepareExternalUrl(i+g(n));0==a.length&&(a=this._platformLocation.pathname),this._platformLocation.pushState(t,e,a)}replaceState(t,e,i,n){let a=this.prepareExternalUrl(i+g(n));0==a.length&&(a=this._platformLocation.pathname),this._platformLocation.replaceState(t,e,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}}return t.\u0275fac=function(e){return new(e||t)(n.ac(l),n.ac(y,8))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})(),O=(()=>{class t{constructor(t,e){this._subject=new n.o,this._urlChangeListeners=[],this._platformStrategy=t;const i=this._platformStrategy.getBaseHref();this._platformLocation=e,this._baseHref=m(w(i)),this._platformStrategy.onPopState(t=>{this._subject.emit({url:this.path(!0),pop:!0,state:t.state,type:t.type})})}path(t=!1){return this.normalize(this._platformStrategy.path(t))}getState(){return this._platformLocation.getState()}isCurrentPathEqualTo(t,e=""){return this.path()==this.normalize(t+g(e))}normalize(e){return t.stripTrailingSlash(function(t,e){return t&&e.startsWith(t)?e.substring(t.length):e}(this._baseHref,w(e)))}prepareExternalUrl(t){return t&&"/"!==t[0]&&(t="/"+t),this._platformStrategy.prepareExternalUrl(t)}go(t,e="",i=null){this._platformStrategy.pushState(i,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+g(e)),i)}replaceState(t,e="",i=null){this._platformStrategy.replaceState(i,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+g(e)),i)}forward(){this._platformStrategy.forward()}back(){this._platformStrategy.back()}onUrlChange(t){this._urlChangeListeners.push(t),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(t=>{this._notifyUrlChangeListeners(t.url,t.state)}))}_notifyUrlChangeListeners(t="",e){this._urlChangeListeners.forEach(i=>i(t,e))}subscribe(t,e,i){return this._subject.subscribe({next:t,error:e,complete:i})}}return t.\u0275fac=function(e){return new(e||t)(n.ac(v),n.ac(l))},t.normalizeQueryParams=g,t.joinWithSlash=f,t.stripTrailingSlash=m,t.\u0275prov=Object(n.Mb)({factory:D,token:t,providedIn:"root"}),t})();function D(){return new O(Object(n.ac)(v),Object(n.ac)(l))}function w(t){return t.replace(/\/index.html$/,"")}const M={ADP:[void 0,void 0,0],AFN:[void 0,void 0,0],ALL:[void 0,void 0,0],AMD:[void 0,void 0,2],AOA:[void 0,"Kz"],ARS:[void 0,"$"],AUD:["A$","$"],BAM:[void 0,"KM"],BBD:[void 0,"$"],BDT:[void 0,"\u09f3"],BHD:[void 0,void 0,3],BIF:[void 0,void 0,0],BMD:[void 0,"$"],BND:[void 0,"$"],BOB:[void 0,"Bs"],BRL:["R$"],BSD:[void 0,"$"],BWP:[void 0,"P"],BYN:[void 0,"\u0440.",2],BYR:[void 0,void 0,0],BZD:[void 0,"$"],CAD:["CA$","$",2],CHF:[void 0,void 0,2],CLF:[void 0,void 0,4],CLP:[void 0,"$",0],CNY:["CN\xa5","\xa5"],COP:[void 0,"$",2],CRC:[void 0,"\u20a1",2],CUC:[void 0,"$"],CUP:[void 0,"$"],CZK:[void 0,"K\u010d",2],DJF:[void 0,void 0,0],DKK:[void 0,"kr",2],DOP:[void 0,"$"],EGP:[void 0,"E\xa3"],ESP:[void 0,"\u20a7",0],EUR:["\u20ac"],FJD:[void 0,"$"],FKP:[void 0,"\xa3"],GBP:["\xa3"],GEL:[void 0,"\u20be"],GIP:[void 0,"\xa3"],GNF:[void 0,"FG",0],GTQ:[void 0,"Q"],GYD:[void 0,"$",2],HKD:["HK$","$"],HNL:[void 0,"L"],HRK:[void 0,"kn"],HUF:[void 0,"Ft",2],IDR:[void 0,"Rp",2],ILS:["\u20aa"],INR:["\u20b9"],IQD:[void 0,void 0,0],IRR:[void 0,void 0,0],ISK:[void 0,"kr",0],ITL:[void 0,void 0,0],JMD:[void 0,"$"],JOD:[void 0,void 0,3],JPY:["\xa5",void 0,0],KHR:[void 0,"\u17db"],KMF:[void 0,"CF",0],KPW:[void 0,"\u20a9",0],KRW:["\u20a9",void 0,0],KWD:[void 0,void 0,3],KYD:[void 0,"$"],KZT:[void 0,"\u20b8"],LAK:[void 0,"\u20ad",0],LBP:[void 0,"L\xa3",0],LKR:[void 0,"Rs"],LRD:[void 0,"$"],LTL:[void 0,"Lt"],LUF:[void 0,void 0,0],LVL:[void 0,"Ls"],LYD:[void 0,void 0,3],MGA:[void 0,"Ar",0],MGF:[void 0,void 0,0],MMK:[void 0,"K",0],MNT:[void 0,"\u20ae",2],MRO:[void 0,void 0,0],MUR:[void 0,"Rs",2],MXN:["MX$","$"],MYR:[void 0,"RM"],NAD:[void 0,"$"],NGN:[void 0,"\u20a6"],NIO:[void 0,"C$"],NOK:[void 0,"kr",2],NPR:[void 0,"Rs"],NZD:["NZ$","$"],OMR:[void 0,void 0,3],PHP:[void 0,"\u20b1"],PKR:[void 0,"Rs",2],PLN:[void 0,"z\u0142"],PYG:[void 0,"\u20b2",0],RON:[void 0,"lei"],RSD:[void 0,void 0,0],RUB:[void 0,"\u20bd"],RUR:[void 0,"\u0440."],RWF:[void 0,"RF",0],SBD:[void 0,"$"],SEK:[void 0,"kr",2],SGD:[void 0,"$"],SHP:[void 0,"\xa3"],SLL:[void 0,void 0,0],SOS:[void 0,void 0,0],SRD:[void 0,"$"],SSP:[void 0,"\xa3"],STD:[void 0,void 0,0],STN:[void 0,"Db"],SYP:[void 0,"\xa3",0],THB:[void 0,"\u0e3f"],TMM:[void 0,void 0,0],TND:[void 0,void 0,3],TOP:[void 0,"T$"],TRL:[void 0,void 0,0],TRY:[void 0,"\u20ba"],TTD:[void 0,"$"],TWD:["NT$","$",2],TZS:[void 0,void 0,2],UAH:[void 0,"\u20b4"],UGX:[void 0,void 0,0],USD:["$"],UYI:[void 0,void 0,0],UYU:[void 0,"$"],UYW:[void 0,void 0,4],UZS:[void 0,void 0,2],VEF:[void 0,"Bs",2],VND:["\u20ab",void 0,0],VUV:[void 0,void 0,0],XAF:["FCFA",void 0,0],XCD:["EC$","$"],XOF:["CFA",void 0,0],XPF:["CFPF",void 0,0],XXX:["\xa4"],YER:[void 0,void 0,0],ZAR:[void 0,"R"],ZMK:[void 0,void 0,0],ZMW:[void 0,"ZK"],ZWD:[void 0,void 0,0]};var k=function(t){return t[t.Decimal=0]="Decimal",t[t.Percent=1]="Percent",t[t.Currency=2]="Currency",t[t.Scientific=3]="Scientific",t}({}),S=function(t){return t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t[t.Few=3]="Few",t[t.Many=4]="Many",t[t.Other=5]="Other",t}({}),I=function(t){return t[t.Format=0]="Format",t[t.Standalone=1]="Standalone",t}({}),P=function(t){return t[t.Narrow=0]="Narrow",t[t.Abbreviated=1]="Abbreviated",t[t.Wide=2]="Wide",t[t.Short=3]="Short",t}({}),V=function(t){return t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t[t.Full=3]="Full",t}({}),R=function(t){return t[t.Decimal=0]="Decimal",t[t.Group=1]="Group",t[t.List=2]="List",t[t.PercentSign=3]="PercentSign",t[t.PlusSign=4]="PlusSign",t[t.MinusSign=5]="MinusSign",t[t.Exponential=6]="Exponential",t[t.SuperscriptingExponent=7]="SuperscriptingExponent",t[t.PerMille=8]="PerMille",t[t[1/0]=9]="Infinity",t[t.NaN=10]="NaN",t[t.TimeSeparator=11]="TimeSeparator",t[t.CurrencyDecimal=12]="CurrencyDecimal",t[t.CurrencyGroup=13]="CurrencyGroup",t}({});function j(t,e){return Q(Object(n.nb)(t)[n.eb.DateFormat],e)}function A(t,e){return Q(Object(n.nb)(t)[n.eb.TimeFormat],e)}function W(t,e){return Q(Object(n.nb)(t)[n.eb.DateTimeFormat],e)}function T(t,e){const i=Object(n.nb)(t),a=i[n.eb.NumberSymbols][e];if(void 0===a){if(e===R.CurrencyDecimal)return i[n.eb.NumberSymbols][R.Decimal];if(e===R.CurrencyGroup)return i[n.eb.NumberSymbols][R.Group]}return a}function E(t,e){return Object(n.nb)(t)[n.eb.NumberFormats][e]}const F=n.qb;function L(t){if(!t[n.eb.ExtraData])throw new Error(`Missing extra locale data for the locale "${t[n.eb.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function Q(t,e){for(let i=e;i>-1;i--)if(void 0!==t[i])return t[i];throw new Error("Locale data API: locale data undefined")}function N(t){const[e,i]=t.split(":");return{hours:+e,minutes:+i}}const z=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,B={},U=/((?:[^GyMLwWdEabBhHmsSzZO']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;var $=function(t){return t[t.Short=0]="Short",t[t.ShortGMT=1]="ShortGMT",t[t.Long=2]="Long",t[t.Extended=3]="Extended",t}({}),H=function(t){return t[t.FullYear=0]="FullYear",t[t.Month=1]="Month",t[t.Date=2]="Date",t[t.Hours=3]="Hours",t[t.Minutes=4]="Minutes",t[t.Seconds=5]="Seconds",t[t.FractionalSeconds=6]="FractionalSeconds",t[t.Day=7]="Day",t}({}),G=function(t){return t[t.DayPeriods=0]="DayPeriods",t[t.Days=1]="Days",t[t.Months=2]="Months",t[t.Eras=3]="Eras",t}({});function X(t,e){return e&&(t=t.replace(/\{([^}]+)}/g,(function(t,i){return null!=e&&i in e?e[i]:t}))),t}function q(t,e,i="-",n,a){let s="";(t<0||a&&t<=0)&&(a?t=1-t:(t=-t,s=i));let o=String(t);for(;o.length<e;)o="0"+o;return n&&(o=o.substr(o.length-e)),s+o}function K(t,e,i=0,n=!1,a=!1){return function(s,o){let r=function(t,e){switch(t){case H.FullYear:return e.getFullYear();case H.Month:return e.getMonth();case H.Date:return e.getDate();case H.Hours:return e.getHours();case H.Minutes:return e.getMinutes();case H.Seconds:return e.getSeconds();case H.FractionalSeconds:return e.getMilliseconds();case H.Day:return e.getDay();default:throw new Error(`Unknown DateType value "${t}".`)}}(t,s);if((i>0||r>-i)&&(r+=i),t===H.Hours)0===r&&-12===i&&(r=12);else if(t===H.FractionalSeconds)return c=e,q(r,3).substr(0,c);var c;const l=T(o,R.MinusSign);return q(r,e,l,n,a)}}function Y(t,e,i=I.Format,a=!1){return function(s,o){return function(t,e,i,a,s,o){switch(i){case G.Months:return function(t,e,i){const a=Object(n.nb)(t),s=Q([a[n.eb.MonthsFormat],a[n.eb.MonthsStandalone]],e);return Q(s,i)}(e,s,a)[t.getMonth()];case G.Days:return function(t,e,i){const a=Object(n.nb)(t),s=Q([a[n.eb.DaysFormat],a[n.eb.DaysStandalone]],e);return Q(s,i)}(e,s,a)[t.getDay()];case G.DayPeriods:const r=t.getHours(),c=t.getMinutes();if(o){const t=function(t){const e=Object(n.nb)(t);return L(e),(e[n.eb.ExtraData][2]||[]).map(t=>"string"==typeof t?N(t):[N(t[0]),N(t[1])])}(e),i=function(t,e,i){const a=Object(n.nb)(t);L(a);const s=Q([a[n.eb.ExtraData][0],a[n.eb.ExtraData][1]],e)||[];return Q(s,i)||[]}(e,s,a),o=t.findIndex(t=>{if(Array.isArray(t)){const[e,i]=t,n=r>=e.hours&&c>=e.minutes,a=r<i.hours||r===i.hours&&c<i.minutes;if(e.hours<i.hours){if(n&&a)return!0}else if(n||a)return!0}else if(t.hours===r&&t.minutes===c)return!0;return!1});if(-1!==o)return i[o]}return function(t,e,i){const a=Object(n.nb)(t),s=Q([a[n.eb.DayPeriodsFormat],a[n.eb.DayPeriodsStandalone]],e);return Q(s,i)}(e,s,a)[r<12?0:1];case G.Eras:return function(t,e){return Q(Object(n.nb)(t)[n.eb.Eras],e)}(e,a)[t.getFullYear()<=0?0:1];default:throw new Error("unexpected translation type "+i)}}(s,o,t,e,i,a)}}function J(t){return function(e,i,n){const a=-1*n,s=T(i,R.MinusSign),o=a>0?Math.floor(a/60):Math.ceil(a/60);switch(t){case $.Short:return(a>=0?"+":"")+q(o,2,s)+q(Math.abs(a%60),2,s);case $.ShortGMT:return"GMT"+(a>=0?"+":"")+q(o,1,s);case $.Long:return"GMT"+(a>=0?"+":"")+q(o,2,s)+":"+q(Math.abs(a%60),2,s);case $.Extended:return 0===n?"Z":(a>=0?"+":"")+q(o,2,s)+":"+q(Math.abs(a%60),2,s);default:throw new Error(`Unknown zone width "${t}"`)}}}function Z(t,e=!1){return function(i,n){let a;if(e){const t=new Date(i.getFullYear(),i.getMonth(),1).getDay()-1,e=i.getDate();a=1+Math.floor((e+t)/7)}else{const t=(s=i,new Date(s.getFullYear(),s.getMonth(),s.getDate()+(4-s.getDay()))),e=function(t){const e=new Date(t,0,1).getDay();return new Date(t,0,1+(e<=4?4:11)-e)}(t.getFullYear()),n=t.getTime()-e.getTime();a=1+Math.round(n/6048e5)}var s;return q(a,t,T(n,R.MinusSign))}}const tt={};function et(t,e){t=t.replace(/:/g,"");const i=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(i)?e:i}function it(t){return t instanceof Date&&!isNaN(t.valueOf())}const nt=/^(\d+)?\.((\d+)(-(\d+))?)?$/;function at(t,e,i,n,a,s,o=!1){let r="",c=!1;if(isFinite(t)){let l=function(t){let e,i,n,a,s,o=Math.abs(t)+"",r=0;for((i=o.indexOf("."))>-1&&(o=o.replace(".","")),(n=o.search(/e/i))>0?(i<0&&(i=n),i+=+o.slice(n+1),o=o.substring(0,n)):i<0&&(i=o.length),n=0;"0"===o.charAt(n);n++);if(n===(s=o.length))e=[0],i=1;else{for(s--;"0"===o.charAt(s);)s--;for(i-=n,e=[],a=0;n<=s;n++,a++)e[a]=Number(o.charAt(n))}return i>22&&(e=e.splice(0,21),r=i-1,i=1),{digits:e,exponent:r,integerLen:i}}(t);o&&(l=function(t){if(0===t.digits[0])return t;const e=t.digits.length-t.integerLen;return t.exponent?t.exponent+=2:(0===e?t.digits.push(0,0):1===e&&t.digits.push(0),t.integerLen+=2),t}(l));let d=e.minInt,h=e.minFrac,u=e.maxFrac;if(s){const t=s.match(nt);if(null===t)throw new Error(s+" is not a valid digit info");const e=t[1],i=t[3],n=t[5];null!=e&&(d=ot(e)),null!=i&&(h=ot(i)),null!=n?u=ot(n):null!=i&&h>u&&(u=h)}!function(t,e,i){if(e>i)throw new Error(`The minimum number of digits after fraction (${e}) is higher than the maximum (${i}).`);let n=t.digits,a=n.length-t.integerLen;const s=Math.min(Math.max(e,a),i);let o=s+t.integerLen,r=n[o];if(o>0){n.splice(Math.max(t.integerLen,o));for(let t=o;t<n.length;t++)n[t]=0}else{a=Math.max(0,a),t.integerLen=1,n.length=Math.max(1,o=s+1),n[0]=0;for(let t=1;t<o;t++)n[t]=0}if(r>=5)if(o-1<0){for(let e=0;e>o;e--)n.unshift(0),t.integerLen++;n.unshift(1),t.integerLen++}else n[o-1]++;for(;a<Math.max(0,s);a++)n.push(0);let c=0!==s;const l=e+t.integerLen,d=n.reduceRight((function(t,e,i,n){return n[i]=(e+=t)<10?e:e-10,c&&(0===n[i]&&i>=l?n.pop():c=!1),e>=10?1:0}),0);d&&(n.unshift(d),t.integerLen++)}(l,h,u);let p=l.digits,b=l.integerLen;const f=l.exponent;let m=[];for(c=p.every(t=>!t);b<d;b++)p.unshift(0);for(;b<0;b++)p.unshift(0);b>0?m=p.splice(b,p.length):(m=p,p=[0]);const g=[];for(p.length>=e.lgSize&&g.unshift(p.splice(-e.lgSize,p.length).join(""));p.length>e.gSize;)g.unshift(p.splice(-e.gSize,p.length).join(""));p.length&&g.unshift(p.join("")),r=g.join(T(i,n)),m.length&&(r+=T(i,a)+m.join("")),f&&(r+=T(i,R.Exponential)+"+"+f)}else r=T(i,R.Infinity);return r=t<0&&!c?e.negPre+r+e.negSuf:e.posPre+r+e.posSuf,r}function st(t,e="-"){const i={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=t.split(";"),a=n[0],s=n[1],o=-1!==a.indexOf(".")?a.split("."):[a.substring(0,a.lastIndexOf("0")+1),a.substring(a.lastIndexOf("0")+1)],r=o[0],c=o[1]||"";i.posPre=r.substr(0,r.indexOf("#"));for(let d=0;d<c.length;d++){const t=c.charAt(d);"0"===t?i.minFrac=i.maxFrac=d+1:"#"===t?i.maxFrac=d+1:i.posSuf+=t}const l=r.split(",");if(i.gSize=l[1]?l[1].length:0,i.lgSize=l[2]||l[1]?(l[2]||l[1]).length:0,s){const t=a.length-i.posPre.length-i.posSuf.length,e=s.indexOf("#");i.negPre=s.substr(0,e).replace(/'/g,""),i.negSuf=s.substr(e+t).replace(/'/g,"")}else i.negPre=e+i.posPre,i.negSuf=i.posSuf;return i}function ot(t){const e=parseInt(t);if(isNaN(e))throw new Error("Invalid integer literal when parsing "+t);return e}class rt{}function ct(t,e,i,n){let a="="+t;if(e.indexOf(a)>-1)return a;if(a=i.getPluralCategory(t,n),e.indexOf(a)>-1)return a;if(e.indexOf("other")>-1)return"other";throw new Error(`No plural message found for value "${t}"`)}let lt=(()=>{class t extends rt{constructor(t){super(),this.locale=t}getPluralCategory(t,e){switch(F(e||this.locale)(t)){case S.Zero:return"zero";case S.One:return"one";case S.Two:return"two";case S.Few:return"few";case S.Many:return"many";default:return"other"}}}return t.\u0275fac=function(e){return new(e||t)(n.ac(n.x))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();function dt(t,e){e=encodeURIComponent(e);for(const i of t.split(";")){const t=i.indexOf("="),[n,a]=-1==t?[i,""]:[i.slice(0,t),i.slice(t+1)];if(n.trim()===e)return decodeURIComponent(a)}return null}let ht=(()=>{class t{constructor(t,e,i,n){this._iterableDiffers=t,this._keyValueDiffers=e,this._ngEl=i,this._renderer=n,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}set klass(t){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof t?t.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}set ngClass(t){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof t?t.split(/\s+/):t,this._rawClass&&(Object(n.tb)(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}ngDoCheck(){if(this._iterableDiffer){const t=this._iterableDiffer.diff(this._rawClass);t&&this._applyIterableChanges(t)}else if(this._keyValueDiffer){const t=this._keyValueDiffer.diff(this._rawClass);t&&this._applyKeyValueChanges(t)}}_applyKeyValueChanges(t){t.forEachAddedItem(t=>this._toggleClass(t.key,t.currentValue)),t.forEachChangedItem(t=>this._toggleClass(t.key,t.currentValue)),t.forEachRemovedItem(t=>{t.previousValue&&this._toggleClass(t.key,!1)})}_applyIterableChanges(t){t.forEachAddedItem(t=>{if("string"!=typeof t.item)throw new Error("NgClass can only toggle CSS classes expressed as strings, got "+Object(n.yb)(t.item));this._toggleClass(t.item,!0)}),t.forEachRemovedItem(t=>this._toggleClass(t.item,!1))}_applyClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(t=>this._toggleClass(t,!0)):Object.keys(t).forEach(e=>this._toggleClass(e,!!t[e])))}_removeClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(t=>this._toggleClass(t,!1)):Object.keys(t).forEach(t=>this._toggleClass(t,!1)))}_toggleClass(t,e){(t=t.trim())&&t.split(/\s+/g).forEach(t=>{e?this._renderer.addClass(this._ngEl.nativeElement,t):this._renderer.removeClass(this._ngEl.nativeElement,t)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.v),n.Qb(n.w),n.Qb(n.l),n.Qb(n.I))},t.\u0275dir=n.Lb({type:t,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),t})(),ut=(()=>{class t{constructor(t){this._viewContainerRef=t,this._componentRef=null,this._moduleRef=null}ngOnChanges(t){if(this._viewContainerRef.clear(),this._componentRef=null,this.ngComponentOutlet){const e=this.ngComponentOutletInjector||this._viewContainerRef.parentInjector;if(t.ngComponentOutletNgModuleFactory)if(this._moduleRef&&this._moduleRef.destroy(),this.ngComponentOutletNgModuleFactory){const t=e.get(n.A);this._moduleRef=this.ngComponentOutletNgModuleFactory.create(t.injector)}else this._moduleRef=null;const i=(this._moduleRef?this._moduleRef.componentFactoryResolver:e.get(n.j)).resolveComponentFactory(this.ngComponentOutlet);this._componentRef=this._viewContainerRef.createComponent(i,this._viewContainerRef.length,e,this.ngComponentOutletContent)}}ngOnDestroy(){this._moduleRef&&this._moduleRef.destroy()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.T))},t.\u0275dir=n.Lb({type:t,selectors:[["","ngComponentOutlet",""]],inputs:{ngComponentOutlet:"ngComponentOutlet",ngComponentOutletInjector:"ngComponentOutletInjector",ngComponentOutletContent:"ngComponentOutletContent",ngComponentOutletNgModuleFactory:"ngComponentOutletNgModuleFactory"},features:[n.Bb]}),t})();class pt{constructor(t,e,i,n){this.$implicit=t,this.ngForOf=e,this.index=i,this.count=n}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 bt=(()=>{class t{constructor(t,e,i){this._viewContainer=t,this._template=e,this._differs=i,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){Object(n.Z)()&&null!=t&&"function"!=typeof t&&console&&console.warn&&console.warn(`trackBy must be a function, but received ${JSON.stringify(t)}. See https://angular.io/api/common/NgForOf#change-propagation for more information.`),this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const i=this._ngForOf;if(!this._differ&&i)try{this._differ=this._differs.find(i).create(this.ngForTrackBy)}catch(e){throw new Error(`Cannot find a differ supporting object '${i}' of type '${t=i,t.name||typeof t}'. NgFor only supports binding to Iterables such as Arrays.`)}}var t;if(this._differ){const t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const e=[];t.forEachOperation((t,i,n)=>{if(null==t.previousIndex){const i=this._viewContainer.createEmbeddedView(this._template,new pt(null,this._ngForOf,-1,-1),null===n?void 0:n),a=new ft(t,i);e.push(a)}else if(null==n)this._viewContainer.remove(null===i?void 0:i);else if(null!==i){const a=this._viewContainer.get(i);this._viewContainer.move(a,n);const s=new ft(t,a);e.push(s)}});for(let i=0;i<e.length;i++)this._perViewChange(e[i].view,e[i].record);for(let i=0,n=this._viewContainer.length;i<n;i++){const t=this._viewContainer.get(i);t.context.index=i,t.context.count=n,t.context.ngForOf=this._ngForOf}t.forEachIdentityChange(t=>{this._viewContainer.get(t.currentIndex).context.$implicit=t.item})}_perViewChange(t,e){t.context.$implicit=e.item}static ngTemplateContextGuard(t,e){return!0}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.T),n.Qb(n.P),n.Qb(n.v))},t.\u0275dir=n.Lb({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),t})();class ft{constructor(t,e){this.record=t,this.view=e}}let mt=(()=>{class t{constructor(t,e){this._viewContainer=t,this._context=new gt,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=e}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){vt("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){vt("ngIfElse",t),this._elseTemplateRef=t,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(t,e){return!0}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.T),n.Qb(n.P))},t.\u0275dir=n.Lb({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),t})();class gt{constructor(){this.$implicit=null,this.ngIf=null}}function vt(t,e){if(e&&!e.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${Object(n.yb)(e)}'.`)}class _t{constructor(t,e){this._viewContainerRef=t,this._templateRef=e,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(t){t&&!this._created?this.create():!t&&this._created&&this.destroy()}}let yt=(()=>{class t{constructor(){this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(t){this._ngSwitch=t,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(t){this._defaultViews||(this._defaultViews=[]),this._defaultViews.push(t)}_matchCase(t){const e=t==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||e,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),e}_updateDefaultCases(t){if(this._defaultViews&&t!==this._defaultUsed){this._defaultUsed=t;for(let e=0;e<this._defaultViews.length;e++)this._defaultViews[e].enforceState(t)}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"}}),t})(),xt=(()=>{class t{constructor(t,e,i){this.ngSwitch=i,i._addCase(),this._view=new _t(t,e)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.T),n.Qb(n.P),n.Qb(yt,1))},t.\u0275dir=n.Lb({type:t,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"}}),t})(),Ct=(()=>{class t{constructor(t,e,i){i._addDefault(new _t(t,e))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.T),n.Qb(n.P),n.Qb(yt,1))},t.\u0275dir=n.Lb({type:t,selectors:[["","ngSwitchDefault",""]]}),t})(),Ot=(()=>{class t{constructor(t){this._localization=t,this._caseViews={}}set ngPlural(t){this._switchValue=t,this._updateView()}addCase(t,e){this._caseViews[t]=e}_updateView(){this._clearViews();const t=Object.keys(this._caseViews),e=ct(this._switchValue,t,this._localization);this._activateView(this._caseViews[e])}_clearViews(){this._activeView&&this._activeView.destroy()}_activateView(t){t&&(this._activeView=t,this._activeView.create())}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(rt))},t.\u0275dir=n.Lb({type:t,selectors:[["","ngPlural",""]],inputs:{ngPlural:"ngPlural"}}),t})(),Dt=(()=>{class t{constructor(t,e,i,n){this.value=t;const a=!isNaN(Number(t));n.addCase(a?"="+t:t,new _t(i,e))}}return t.\u0275fac=function(e){return new(e||t)(n.bc("ngPluralCase"),n.Qb(n.P),n.Qb(n.T),n.Qb(Ot,1))},t.\u0275dir=n.Lb({type:t,selectors:[["","ngPluralCase",""]]}),t})(),wt=(()=>{class t{constructor(t,e,i){this._ngEl=t,this._differs=e,this._renderer=i,this._ngStyle=null,this._differ=null}set ngStyle(t){this._ngStyle=t,!this._differ&&t&&(this._differ=this._differs.find(t).create())}ngDoCheck(){if(this._differ){const t=this._differ.diff(this._ngStyle);t&&this._applyChanges(t)}}_setStyle(t,e){const[i,n]=t.split(".");null!=(e=null!=e&&n?`${e}${n}`:e)?this._renderer.setStyle(this._ngEl.nativeElement,i,e):this._renderer.removeStyle(this._ngEl.nativeElement,i)}_applyChanges(t){t.forEachRemovedItem(t=>this._setStyle(t.key,null)),t.forEachAddedItem(t=>this._setStyle(t.key,t.currentValue)),t.forEachChangedItem(t=>this._setStyle(t.key,t.currentValue))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(n.w),n.Qb(n.I))},t.\u0275dir=n.Lb({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}}),t})(),Mt=(()=>{class t{constructor(t){this._viewContainerRef=t,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null}ngOnChanges(t){if(this._shouldRecreateView(t)){const t=this._viewContainerRef;this._viewRef&&t.remove(t.indexOf(this._viewRef)),this._viewRef=this.ngTemplateOutlet?t.createEmbeddedView(this.ngTemplateOutlet,this.ngTemplateOutletContext):null}else this._viewRef&&this.ngTemplateOutletContext&&this._updateExistingContext(this.ngTemplateOutletContext)}_shouldRecreateView(t){const e=t.ngTemplateOutletContext;return!!t.ngTemplateOutlet||e&&this._hasContextShapeChanged(e)}_hasContextShapeChanged(t){const e=Object.keys(t.previousValue||{}),i=Object.keys(t.currentValue||{});if(e.length===i.length){for(let t of i)if(-1===e.indexOf(t))return!0;return!1}return!0}_updateExistingContext(t){for(let e of Object.keys(t))this._viewRef.context[e]=this.ngTemplateOutletContext[e]}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.T))},t.\u0275dir=n.Lb({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet"},features:[n.Bb]}),t})();function kt(t,e){return Error(`InvalidPipeArgument: '${e}' for pipe '${Object(n.yb)(t)}'`)}class St{createSubscription(t,e){return t.subscribe({next:e,error:t=>{throw t}})}dispose(t){t.unsubscribe()}onDestroy(t){t.unsubscribe()}}class It{createSubscription(t,e){return t.then(e,t=>{throw t})}dispose(t){}onDestroy(t){}}const Pt=new It,Vt=new St;let Rt=(()=>{class t{constructor(t){this._ref=t,this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null}ngOnDestroy(){this._subscription&&this._dispose()}transform(t){return this._obj?t!==this._obj?(this._dispose(),this.transform(t)):this._latestValue:(t&&this._subscribe(t),this._latestValue)}_subscribe(t){this._obj=t,this._strategy=this._selectStrategy(t),this._subscription=this._strategy.createSubscription(t,e=>this._updateLatestValue(t,e))}_selectStrategy(e){if(Object(n.vb)(e))return Pt;if(Object(n.ub)(e))return Vt;throw kt(t,e)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(t,e){t===this._obj&&(this._latestValue=e,this._ref.markForCheck())}}return t.\u0275fac=function(e){return new(e||t)(n.cc())},t.\u0275pipe=n.Pb({name:"async",type:t,pure:!1}),t})(),jt=(()=>{class t{transform(e){if(!e)return e;if("string"!=typeof e)throw kt(t,e);return e.toLowerCase()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"lowercase",type:t,pure:!0}),t})();const At=/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D])\S*/g;let Wt=(()=>{class t{transform(e){if(!e)return e;if("string"!=typeof e)throw kt(t,e);return e.replace(At,t=>t[0].toUpperCase()+t.substr(1).toLowerCase())}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"titlecase",type:t,pure:!0}),t})(),Tt=(()=>{class t{transform(e){if(!e)return e;if("string"!=typeof e)throw kt(t,e);return e.toUpperCase()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"uppercase",type:t,pure:!0}),t})(),Et=(()=>{class t{constructor(t){this.locale=t}transform(e,i="mediumDate",a,s){if(null==e||""===e||e!=e)return null;try{return function(t,e,i,a){let s=function(t){if(it(t))return t;if("number"==typeof t&&!isNaN(t))return new Date(t);if("string"==typeof t){t=t.trim();const e=parseFloat(t);if(!isNaN(t-e))return new Date(e);if(/^(\d{4}-\d{1,2}-\d{1,2})$/.test(t)){const[e,i,n]=t.split("-").map(t=>+t);return new Date(e,i-1,n)}let i;if(i=t.match(z))return function(t){const e=new Date(0);let i=0,n=0;const a=t[8]?e.setUTCFullYear:e.setFullYear,s=t[8]?e.setUTCHours:e.setHours;t[9]&&(i=Number(t[9]+t[10]),n=Number(t[9]+t[11])),a.call(e,Number(t[1]),Number(t[2])-1,Number(t[3]));const o=Number(t[4]||0)-i,r=Number(t[5]||0)-n,c=Number(t[6]||0),l=Math.round(1e3*parseFloat("0."+(t[7]||0)));return s.call(e,o,r,c,l),e}(i)}const e=new Date(t);if(!it(e))throw new Error(`Unable to convert "${t}" into a date`);return e}(t);e=function t(e,i){const a=function(t){return Object(n.nb)(t)[n.eb.LocaleId]}(e);if(B[a]=B[a]||{},B[a][i])return B[a][i];let s="";switch(i){case"shortDate":s=j(e,V.Short);break;case"mediumDate":s=j(e,V.Medium);break;case"longDate":s=j(e,V.Long);break;case"fullDate":s=j(e,V.Full);break;case"shortTime":s=A(e,V.Short);break;case"mediumTime":s=A(e,V.Medium);break;case"longTime":s=A(e,V.Long);break;case"fullTime":s=A(e,V.Full);break;case"short":const i=t(e,"shortTime"),n=t(e,"shortDate");s=X(W(e,V.Short),[i,n]);break;case"medium":const a=t(e,"mediumTime"),o=t(e,"mediumDate");s=X(W(e,V.Medium),[a,o]);break;case"long":const r=t(e,"longTime"),c=t(e,"longDate");s=X(W(e,V.Long),[r,c]);break;case"full":const l=t(e,"fullTime"),d=t(e,"fullDate");s=X(W(e,V.Full),[l,d])}return s&&(B[a][i]=s),s}(i,e)||e;let o,r=[];for(;e;){if(o=U.exec(e),!o){r.push(e);break}{r=r.concat(o.slice(1));const t=r.pop();if(!t)break;e=t}}let c=s.getTimezoneOffset();a&&(c=et(a,c),s=function(t,e,i){const n=t.getTimezoneOffset();return function(t,e){return(t=new Date(t.getTime())).setMinutes(t.getMinutes()+e),t}(t,-1*(et(e,n)-n))}(s,a));let l="";return r.forEach(t=>{const e=function(t){if(tt[t])return tt[t];let e;switch(t){case"G":case"GG":case"GGG":e=Y(G.Eras,P.Abbreviated);break;case"GGGG":e=Y(G.Eras,P.Wide);break;case"GGGGG":e=Y(G.Eras,P.Narrow);break;case"y":e=K(H.FullYear,1,0,!1,!0);break;case"yy":e=K(H.FullYear,2,0,!0,!0);break;case"yyy":e=K(H.FullYear,3,0,!1,!0);break;case"yyyy":e=K(H.FullYear,4,0,!1,!0);break;case"M":case"L":e=K(H.Month,1,1);break;case"MM":case"LL":e=K(H.Month,2,1);break;case"MMM":e=Y(G.Months,P.Abbreviated);break;case"MMMM":e=Y(G.Months,P.Wide);break;case"MMMMM":e=Y(G.Months,P.Narrow);break;case"LLL":e=Y(G.Months,P.Abbreviated,I.Standalone);break;case"LLLL":e=Y(G.Months,P.Wide,I.Standalone);break;case"LLLLL":e=Y(G.Months,P.Narrow,I.Standalone);break;case"w":e=Z(1);break;case"ww":e=Z(2);break;case"W":e=Z(1,!0);break;case"d":e=K(H.Date,1);break;case"dd":e=K(H.Date,2);break;case"E":case"EE":case"EEE":e=Y(G.Days,P.Abbreviated);break;case"EEEE":e=Y(G.Days,P.Wide);break;case"EEEEE":e=Y(G.Days,P.Narrow);break;case"EEEEEE":e=Y(G.Days,P.Short);break;case"a":case"aa":case"aaa":e=Y(G.DayPeriods,P.Abbreviated);break;case"aaaa":e=Y(G.DayPeriods,P.Wide);break;case"aaaaa":e=Y(G.DayPeriods,P.Narrow);break;case"b":case"bb":case"bbb":e=Y(G.DayPeriods,P.Abbreviated,I.Standalone,!0);break;case"bbbb":e=Y(G.DayPeriods,P.Wide,I.Standalone,!0);break;case"bbbbb":e=Y(G.DayPeriods,P.Narrow,I.Standalone,!0);break;case"B":case"BB":case"BBB":e=Y(G.DayPeriods,P.Abbreviated,I.Format,!0);break;case"BBBB":e=Y(G.DayPeriods,P.Wide,I.Format,!0);break;case"BBBBB":e=Y(G.DayPeriods,P.Narrow,I.Format,!0);break;case"h":e=K(H.Hours,1,-12);break;case"hh":e=K(H.Hours,2,-12);break;case"H":e=K(H.Hours,1);break;case"HH":e=K(H.Hours,2);break;case"m":e=K(H.Minutes,1);break;case"mm":e=K(H.Minutes,2);break;case"s":e=K(H.Seconds,1);break;case"ss":e=K(H.Seconds,2);break;case"S":e=K(H.FractionalSeconds,1);break;case"SS":e=K(H.FractionalSeconds,2);break;case"SSS":e=K(H.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":e=J($.Short);break;case"ZZZZZ":e=J($.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":e=J($.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":e=J($.Long);break;default:return null}return tt[t]=e,e}(t);l+=e?e(s,i,c):"''"===t?"'":t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}(e,i,s||this.locale,a)}catch(o){throw kt(t,o.message)}}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.x))},t.\u0275pipe=n.Pb({name:"date",type:t,pure:!0}),t})();const Ft=/#/g;let Lt=(()=>{class t{constructor(t){this._localization=t}transform(e,i,n){if(null==e)return"";if("object"!=typeof i||null===i)throw kt(t,i);return i[ct(e,Object.keys(i),this._localization,n)].replace(Ft,e.toString())}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(rt))},t.\u0275pipe=n.Pb({name:"i18nPlural",type:t,pure:!0}),t})(),Qt=(()=>{class t{transform(e,i){if(null==e)return"";if("object"!=typeof i||"string"!=typeof e)throw kt(t,i);return i.hasOwnProperty(e)?i[e]:i.hasOwnProperty("other")?i.other:""}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"i18nSelect",type:t,pure:!0}),t})(),Nt=(()=>{class t{transform(t){return JSON.stringify(t,null,2)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"json",type:t,pure:!1}),t})(),zt=(()=>{class t{constructor(t){this.differs=t,this.keyValues=[]}transform(t,e=Bt){if(!t||!(t instanceof Map)&&"object"!=typeof t)return null;this.differ||(this.differ=this.differs.find(t).create());const i=this.differ.diff(t);return i&&(this.keyValues=[],i.forEachItem(t=>{this.keyValues.push({key:t.key,value:t.currentValue})}),this.keyValues.sort(e)),this.keyValues}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.w))},t.\u0275pipe=n.Pb({name:"keyvalue",type:t,pure:!1}),t})();function Bt(t,e){const i=t.key,n=e.key;if(i===n)return 0;if(void 0===i)return 1;if(void 0===n)return-1;if(null===i)return 1;if(null===n)return-1;if("string"==typeof i&&"string"==typeof n)return i<n?-1:1;if("number"==typeof i&&"number"==typeof n)return i-n;if("boolean"==typeof i&&"boolean"==typeof n)return i<n?-1:1;const a=String(i),s=String(n);return a==s?0:a<s?-1:1}let Ut=(()=>{class t{constructor(t){this._locale=t}transform(e,i,n){if(Gt(e))return null;n=n||this._locale;try{return function(t,e,i){return at(t,st(E(e,k.Decimal),T(e,R.MinusSign)),e,R.Group,R.Decimal,i)}(Xt(e),n,i)}catch(a){throw kt(t,a.message)}}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.x))},t.\u0275pipe=n.Pb({name:"number",type:t,pure:!0}),t})(),$t=(()=>{class t{constructor(t){this._locale=t}transform(e,i,n){if(Gt(e))return null;n=n||this._locale;try{return function(t,e,i){return at(t,st(E(e,k.Percent),T(e,R.MinusSign)),e,R.Group,R.Decimal,i,!0).replace(new RegExp("%","g"),T(e,R.PercentSign))}(Xt(e),n,i)}catch(a){throw kt(t,a.message)}}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.x))},t.\u0275pipe=n.Pb({name:"percent",type:t,pure:!0}),t})(),Ht=(()=>{class t{constructor(t,e="USD"){this._locale=t,this._defaultCurrencyCode=e}transform(e,i,a="symbol",s,o){if(Gt(e))return null;o=o||this._locale,"boolean"==typeof a&&(console&&console.warn&&console.warn('Warning: the currency pipe has been changed in Angular v5. The symbolDisplay option (third parameter) is now a string instead of a boolean. The accepted values are "code", "symbol" or "symbol-narrow".'),a=a?"symbol":"code");let r=i||this._defaultCurrencyCode;"code"!==a&&(r="symbol"===a||"symbol-narrow"===a?function(t,e,i="en"){const a=function(t){return Object(n.nb)(t)[n.eb.Currencies]}(i)[t]||M[t]||[],s=a[1];return"narrow"===e&&"string"==typeof s?s:a[0]||t}(r,"symbol"===a?"wide":"narrow",o):a);try{return function(t,e,i,n,a){const s=st(E(e,k.Currency),T(e,R.MinusSign));return s.minFrac=function(t){let e;const i=M[t];return i&&(e=i[2]),"number"==typeof e?e:2}(n),s.maxFrac=s.minFrac,at(t,s,e,R.CurrencyGroup,R.CurrencyDecimal,a).replace("\xa4",i).replace("\xa4","").trim()}(Xt(e),o,r,i,s)}catch(c){throw kt(t,c.message)}}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.x),n.Qb(n.k))},t.\u0275pipe=n.Pb({name:"currency",type:t,pure:!0}),t})();function Gt(t){return null==t||""===t||t!=t}function Xt(t){if("string"==typeof t&&!isNaN(Number(t)-parseFloat(t)))return Number(t);if("number"!=typeof t)throw new Error(t+" is not a number");return t}let qt=(()=>{class t{transform(e,i,n){if(null==e)return e;if(!this.supports(e))throw kt(t,e);return e.slice(i,n)}supports(t){return"string"==typeof t||Array.isArray(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"slice",type:t,pure:!1}),t})(),Kt=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},providers:[{provide:rt,useClass:lt}]}),t})();const Yt="browser";function Jt(t){return t===Yt}let Zt=(()=>{class t{}return t.\u0275prov=Object(n.Mb)({token:t,providedIn:"root",factory:()=>new te(Object(n.ac)(c),window,Object(n.ac)(n.n))}),t})();class te{constructor(t,e,i){this.document=t,this.window=e,this.errorHandler=i,this.offset=()=>[0,0]}setOffset(t){this.offset=Array.isArray(t)?()=>t:t}getScrollPosition(){return this.supportsScrolling()?[this.window.scrollX,this.window.scrollY]:[0,0]}scrollToPosition(t){this.supportsScrolling()&&this.window.scrollTo(t[0],t[1])}scrollToAnchor(t){if(this.supportsScrolling()){const e=this.document.getElementById(t)||this.document.getElementsByName(t)[0];e&&this.scrollToElement(e)}}setHistoryScrollRestoration(t){if(this.supportScrollRestoration()){const e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=t)}}scrollToElement(t){const e=t.getBoundingClientRect(),i=e.left+this.window.pageXOffset,n=e.top+this.window.pageYOffset,a=this.offset();this.window.scrollTo(i-a[0],n-a[1])}supportScrollRestoration(){try{if(!this.window||!this.window.scrollTo)return!1;const t=ee(this.window.history)||ee(Object.getPrototypeOf(this.window.history));return!(!t||!t.writable&&!t.set)}catch(t){return!1}}supportsScrolling(){try{return!!this.window.scrollTo}catch(t){return!1}}}function ee(t){return Object.getOwnPropertyDescriptor(t,"scrollRestoration")}},pLZG:function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var n=i("7o/Q");function a(t,e){return function(i){return i.lift(new s(t,e))}}class s{constructor(t,e){this.predicate=t,this.thisArg=e}call(t,e){return e.subscribe(new o(t,this.predicate,this.thisArg))}}class o extends n.a{constructor(t,e,i){super(t),this.predicate=e,this.thisArg=i,this.count=0}_next(t){let e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(i){return void this.destination.error(i)}e&&this.destination.next(t)}}},qFsG:function(t,e,i){"use strict";i.d(e,"a",(function(){return p})),i.d(e,"b",(function(){return v})),i.d(e,"c",(function(){return _})),i.d(e,"d",(function(){return h}));var n=i("ihCf"),a=i("fXoL"),s=i("8LU1"),o=i("nLfN"),r=i("FKr1"),c=i("kmnG"),l=i("XNiG"),d=i("3Pt+");let h=(()=>{class t extends n.c{get matAutosizeMinRows(){return this.minRows}set matAutosizeMinRows(t){this.minRows=t}get matAutosizeMaxRows(){return this.maxRows}set matAutosizeMaxRows(t){this.maxRows=t}get matAutosize(){return this.enabled}set matAutosize(t){this.enabled=t}get matTextareaAutosize(){return this.enabled}set matTextareaAutosize(t){this.enabled=t}}return t.\u0275fac=function(e){return u(e||t)},t.\u0275dir=a.Lb({type:t,selectors:[["textarea","mat-autosize",""],["textarea","matTextareaAutosize",""]],hostAttrs:["rows","1",1,"cdk-textarea-autosize","mat-autosize"],inputs:{cdkAutosizeMinRows:"cdkAutosizeMinRows",cdkAutosizeMaxRows:"cdkAutosizeMaxRows",matAutosizeMinRows:"matAutosizeMinRows",matAutosizeMaxRows:"matAutosizeMaxRows",matAutosize:["mat-autosize","matAutosize"],matTextareaAutosize:"matTextareaAutosize"},exportAs:["matTextareaAutosize"],features:[a.Ab]}),t})();const u=a.Yb(h),p=new a.s("MAT_INPUT_VALUE_ACCESSOR"),b=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let f=0;class m{constructor(t,e,i,n){this._defaultErrorStateMatcher=t,this._parentForm=e,this._parentFormGroup=i,this.ngControl=n}}const g=Object(r.D)(m);let v=(()=>{class t extends g{constructor(t,e,i,n,a,s,r,c,d,h){super(s,n,a,i),this._elementRef=t,this._platform=e,this.ngControl=i,this._autofillMonitor=c,this._formField=h,this._uid="mat-input-"+f++,this.focused=!1,this.stateChanges=new l.a,this.controlType="mat-input",this.autofilled=!1,this._disabled=!1,this._required=!1,this._type="text",this._readonly=!1,this._neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(t=>Object(o.e)().has(t));const u=this._elementRef.nativeElement,p=u.nodeName.toLowerCase();this._inputValueAccessor=r||u,this._previousNativeValue=this.value,this.id=this.id,e.IOS&&d.runOutsideAngular(()=>{t.nativeElement.addEventListener("keyup",t=>{let e=t.target;e.value||e.selectionStart||e.selectionEnd||(e.setSelectionRange(1,1),e.setSelectionRange(0,0))})}),this._isServer=!this._platform.isBrowser,this._isNativeSelect="select"===p,this._isTextarea="textarea"===p,this._isNativeSelect&&(this.controlType=u.multiple?"mat-native-select-multiple":"mat-native-select")}get disabled(){return this.ngControl&&null!==this.ngControl.disabled?this.ngControl.disabled:this._disabled}set disabled(t){this._disabled=Object(s.c)(t),this.focused&&(this.focused=!1,this.stateChanges.next())}get id(){return this._id}set id(t){this._id=t||this._uid}get required(){return this._required}set required(t){this._required=Object(s.c)(t)}get type(){return this._type}set type(t){this._type=t||"text",this._validateType(),!this._isTextarea&&Object(o.e)().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}get value(){return this._inputValueAccessor.value}set value(t){t!==this.value&&(this._inputValueAccessor.value=t,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(t){this._readonly=Object(s.c)(t)}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(t=>{this.autofilled=t.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement)}ngDoCheck(){this.ngControl&&this.updateErrorState(),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(t){this._elementRef.nativeElement.focus(t)}_focusChanged(t){t===this.focused||this.readonly&&t||(this.focused=t,this.stateChanges.next())}_onInput(){}_dirtyCheckPlaceholder(){var t,e;const i=(null===(e=null===(t=this._formField)||void 0===t?void 0:t._hideControlPlaceholder)||void 0===e?void 0:e.call(t))?null:this.placeholder;if(i!==this._previousPlaceholder){const t=this._elementRef.nativeElement;this._previousPlaceholder=i,i?t.setAttribute("placeholder",i):t.removeAttribute("placeholder")}}_dirtyCheckNativeValue(){const t=this._elementRef.nativeElement.value;this._previousNativeValue!==t&&(this._previousNativeValue=t,this.stateChanges.next())}_validateType(){b.indexOf(this._type)}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let t=this._elementRef.nativeElement.validity;return t&&t.badInput}get empty(){return!(this._isNeverEmpty()||this._elementRef.nativeElement.value||this._isBadInput()||this.autofilled)}get shouldLabelFloat(){if(this._isNativeSelect){const t=this._elementRef.nativeElement,e=t.options[0];return this.focused||t.multiple||!this.empty||!!(t.selectedIndex>-1&&e&&e.label)}return this.focused||!this.empty}setDescribedByIds(t){t.length?this._elementRef.nativeElement.setAttribute("aria-describedby",t.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(o.a),a.Qb(d.t,10),a.Qb(d.w,8),a.Qb(d.m,8),a.Qb(r.d),a.Qb(p,10),a.Qb(n.a),a.Qb(a.C),a.Qb(c.a,8))},t.\u0275dir=a.Lb({type:t,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-input-element","mat-form-field-autofill-control"],hostVars:9,hostBindings:function(t,e){1&t&&a.dc("focus",(function(){return e._focusChanged(!0)}))("blur",(function(){return e._focusChanged(!1)}))("input",(function(){return e._onInput()})),2&t&&(a.Zb("disabled",e.disabled)("required",e.required),a.Eb("id",e.id)("data-placeholder",e.placeholder)("readonly",e.readonly&&!e._isNativeSelect||null)("aria-invalid",e.errorState)("aria-required",e.required.toString()),a.Ib("mat-input-server",e._isServer))},inputs:{id:"id",disabled:"disabled",required:"required",type:"type",value:"value",readonly:"readonly",placeholder:"placeholder",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"]},exportAs:["matInput"],features:[a.Cb([{provide:c.d,useExisting:t}]),a.Ab,a.Bb]}),t})(),_=(()=>{class t{}return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)},providers:[r.d],imports:[[n.d,c.e],n.d,c.e]}),t})()},quSY:function(t,e,i){"use strict";i.d(e,"a",(function(){return r}));var n=i("DH7j"),a=i("XoHu"),s=i("n6bG");const o=(()=>{function t(t){return Error.call(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((t,e)=>`${e+1}) ${t.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t})();let r=(()=>{class t{constructor(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}unsubscribe(){let e;if(this.closed)return;let{_parentOrParents:i,_ctorUnsubscribe:r,_unsubscribe:l,_subscriptions:d}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,i instanceof t)i.remove(this);else if(null!==i)for(let t=0;t<i.length;++t)i[t].remove(this);if(Object(s.a)(l)){r&&(this._unsubscribe=void 0);try{l.call(this)}catch(h){e=h instanceof o?c(h.errors):[h]}}if(Object(n.a)(d)){let t=-1,i=d.length;for(;++t<i;){const i=d[t];if(Object(a.a)(i))try{i.unsubscribe()}catch(h){e=e||[],h instanceof o?e=e.concat(c(h.errors)):e.push(h)}}}if(e)throw new o(e)}add(e){let i=e;if(!e)return t.EMPTY;switch(typeof e){case"function":i=new t(e);case"object":if(i===this||i.closed||"function"!=typeof i.unsubscribe)return i;if(this.closed)return i.unsubscribe(),i;if(!(i instanceof t)){const e=i;i=new t,i._subscriptions=[e]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}let{_parentOrParents:n}=i;if(null===n)i._parentOrParents=this;else if(n instanceof t){if(n===this)return i;i._parentOrParents=[n,this]}else{if(-1!==n.indexOf(this))return i;n.push(this)}const a=this._subscriptions;return null===a?this._subscriptions=[i]:a.push(i),i}remove(t){const e=this._subscriptions;if(e){const i=e.indexOf(t);-1!==i&&e.splice(i,1)}}}var e;return t.EMPTY=((e=new t).closed=!0,e),t})();function c(t){return t.reduce((t,e)=>t.concat(e instanceof o?e.errors:e),[])}},rDax:function(t,e,i){"use strict";i.d(e,"a",(function(){return G})),i.d(e,"b",(function(){return H})),i.d(e,"c",(function(){return B})),i.d(e,"d",(function(){return M})),i.d(e,"e",(function(){return j})),i.d(e,"f",(function(){return q}));var n=i("vxfF"),a=i("fXoL"),s=i("nLfN"),o=i("cH1L"),r=i("ofXK"),c=i("8LU1"),l=i("+rOU"),d=i("XNiG"),h=i("quSY"),u=i("VRyK"),p=i("IzEk"),b=i("1G5W"),f=i("7o/Q");class m{constructor(t,e){this.predicate=t,this.inclusive=e}call(t,e){return e.subscribe(new g(t,this.predicate,this.inclusive))}}class g extends f.a{constructor(t,e,i){super(t),this.predicate=e,this.inclusive=i,this.index=0}_next(t){const e=this.destination;let i;try{i=this.predicate(t,this.index++)}catch(n){return void e.error(n)}this.nextOrComplete(t,i)}nextOrComplete(t,e){const i=this.destination;Boolean(e)?i.next(t):(this.inclusive&&i.next(t),i.complete())}}var v=i("FtGj");class _{constructor(t,e){this._viewportRuler=t,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=e}attach(){}enable(){if(this._canBeEnabled()){const t=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=t.style.left||"",this._previousHTMLStyles.top=t.style.top||"",t.style.left=Object(c.d)(-this._previousScrollPosition.left),t.style.top=Object(c.d)(-this._previousScrollPosition.top),t.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){const t=this._document.documentElement,e=t.style,i=this._document.body.style,n=e.scrollBehavior||"",a=i.scrollBehavior||"";this._isEnabled=!1,e.left=this._previousHTMLStyles.left,e.top=this._previousHTMLStyles.top,t.classList.remove("cdk-global-scrollblock"),e.scrollBehavior=i.scrollBehavior="auto",window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),e.scrollBehavior=n,i.scrollBehavior=a}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;const t=this._document.body,e=this._viewportRuler.getViewportSize();return t.scrollHeight>e.height||t.scrollWidth>e.width}}class y{constructor(t,e,i,n){this._scrollDispatcher=t,this._ngZone=e,this._viewportRuler=i,this._config=n,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(t){this._overlayRef=t}enable(){if(this._scrollSubscription)return;const t=this._scrollDispatcher.scrolled(0);this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=t.subscribe(()=>{const t=this._viewportRuler.getViewportScrollPosition().top;Math.abs(t-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=t.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}class x{enable(){}disable(){}attach(){}}function C(t,e){return e.some(e=>t.bottom<e.top||t.top>e.bottom||t.right<e.left||t.left>e.right)}function O(t,e){return e.some(e=>t.top<e.top||t.bottom>e.bottom||t.left<e.left||t.right>e.right)}class D{constructor(t,e,i,n){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=i,this._config=n,this._scrollSubscription=null}attach(t){this._overlayRef=t}enable(){this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){const t=this._overlayRef.overlayElement.getBoundingClientRect(),{width:e,height:i}=this._viewportRuler.getViewportSize();C(t,[{width:e,height:i,bottom:i,right:e,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}}))}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}let w=(()=>{class t{constructor(t,e,i,n){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=i,this.noop=()=>new x,this.close=t=>new y(this._scrollDispatcher,this._ngZone,this._viewportRuler,t),this.block=()=>new _(this._viewportRuler,this._document),this.reposition=t=>new D(this._scrollDispatcher,this._viewportRuler,this._ngZone,t),this._document=n}}return t.\u0275fac=function(e){return new(e||t)(a.ac(n.f),a.ac(n.h),a.ac(a.C),a.ac(r.e))},t.\u0275prov=Object(a.Mb)({factory:function(){return new t(Object(a.ac)(n.f),Object(a.ac)(n.h),Object(a.ac)(a.C),Object(a.ac)(r.e))},token:t,providedIn:"root"}),t})();class M{constructor(t){if(this.scrollStrategy=new x,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,t){const e=Object.keys(t);for(const i of e)void 0!==t[i]&&(this[i]=t[i])}}}class k{constructor(t,e,i,n,a){this.offsetX=i,this.offsetY=n,this.panelClass=a,this.originX=t.originX,this.originY=t.originY,this.overlayX=e.overlayX,this.overlayY=e.overlayY}}class S{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}let I=(()=>{class t{constructor(t){this._attachedOverlays=[],this._document=t}ngOnDestroy(){this.detach()}add(t){this.remove(t),this._attachedOverlays.push(t)}remove(t){const e=this._attachedOverlays.indexOf(t);e>-1&&this._attachedOverlays.splice(e,1),0===this._attachedOverlays.length&&this.detach()}}return t.\u0275fac=function(e){return new(e||t)(a.ac(r.e))},t.\u0275prov=Object(a.Mb)({factory:function(){return new t(Object(a.ac)(r.e))},token:t,providedIn:"root"}),t})(),P=(()=>{class t extends I{constructor(t){super(t),this._keydownListener=t=>{const e=this._attachedOverlays;for(let i=e.length-1;i>-1;i--)if(e[i]._keydownEvents.observers.length>0){e[i]._keydownEvents.next(t);break}}}add(t){super.add(t),this._isAttached||(this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}}return t.\u0275fac=function(e){return new(e||t)(a.ac(r.e))},t.\u0275prov=Object(a.Mb)({factory:function(){return new t(Object(a.ac)(r.e))},token:t,providedIn:"root"}),t})(),V=(()=>{class t extends I{constructor(t,e){super(t),this._platform=e,this._cursorStyleIsSet=!1,this._clickListener=t=>{const e=t.composedPath?t.composedPath()[0]:t.target,i=this._attachedOverlays.slice();for(let n=i.length-1;n>-1;n--){const a=i[n];if(!(a._outsidePointerEvents.observers.length<1)&&a.hasAttached()){if(a.overlayElement.contains(e))break;a._outsidePointerEvents.next(t)}}}}add(t){super.add(t),this._isAttached||(this._document.body.addEventListener("click",this._clickListener,!0),this._document.body.addEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=this._document.body.style.cursor,this._document.body.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("click",this._clickListener,!0),this._document.body.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}}return t.\u0275fac=function(e){return new(e||t)(a.ac(r.e),a.ac(s.a))},t.\u0275prov=Object(a.Mb)({factory:function(){return new t(Object(a.ac)(r.e),Object(a.ac)(s.a))},token:t,providedIn:"root"}),t})();const R=!("undefined"==typeof window||!window||!window.__karma__&&!window.jasmine);let j=(()=>{class t{constructor(t,e){this._platform=e,this._document=t}ngOnDestroy(){const t=this._containerElement;t&&t.parentNode&&t.parentNode.removeChild(t)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){const t=this._platform?this._platform.isBrowser:"undefined"!=typeof window;if(t||R){const t=this._document.querySelectorAll('.cdk-overlay-container[platform="server"], .cdk-overlay-container[platform="test"]');for(let e=0;e<t.length;e++)t[e].parentNode.removeChild(t[e])}const e=this._document.createElement("div");e.classList.add("cdk-overlay-container"),R?e.setAttribute("platform","test"):t||e.setAttribute("platform","server"),this._document.body.appendChild(e),this._containerElement=e}}return t.\u0275fac=function(e){return new(e||t)(a.ac(r.e),a.ac(s.a))},t.\u0275prov=Object(a.Mb)({factory:function(){return new t(Object(a.ac)(r.e),Object(a.ac)(s.a))},token:t,providedIn:"root"}),t})();class A{constructor(t,e,i,n,a,s,o,r,c){this._portalOutlet=t,this._host=e,this._pane=i,this._config=n,this._ngZone=a,this._keyboardDispatcher=s,this._document=o,this._location=r,this._outsideClickDispatcher=c,this._backdropElement=null,this._backdropClick=new d.a,this._attachments=new d.a,this._detachments=new d.a,this._locationChanges=h.a.EMPTY,this._backdropClickHandler=t=>this._backdropClick.next(t),this._keydownEvents=new d.a,this._outsidePointerEvents=new d.a,n.scrollStrategy&&(this._scrollStrategy=n.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=n.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(t){let e=this._portalOutlet.attach(t);return!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host),this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._ngZone.onStable.pipe(Object(p.a)(1)).subscribe(()=>{this.hasAttached()&&this.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&this._location&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher&&this._outsideClickDispatcher.add(this),e}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();const t=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenStable(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher&&this._outsideClickDispatcher.remove(this),t}dispose(){const t=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this.detachBackdrop(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher&&this._outsideClickDispatcher.remove(this),this._host&&this._host.parentNode&&(this._host.parentNode.removeChild(this._host),this._host=null),this._previousHostParent=this._pane=null,t&&this._detachments.next(),this._detachments.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(t){t!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=t,this.hasAttached()&&(t.attach(this),this.updatePosition()))}updateSize(t){this._config=Object.assign(Object.assign({},this._config),t),this._updateElementSize()}setDirection(t){this._config=Object.assign(Object.assign({},this._config),{direction:t}),this._updateElementDirection()}addPanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!0)}removePanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!1)}getDirection(){const t=this._config.direction;return t?"string"==typeof t?t:t.value:"ltr"}updateScrollStrategy(t){t!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=t,this.hasAttached()&&(t.attach(this),t.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;const t=this._pane.style;t.width=Object(c.d)(this._config.width),t.height=Object(c.d)(this._config.height),t.minWidth=Object(c.d)(this._config.minWidth),t.minHeight=Object(c.d)(this._config.minHeight),t.maxWidth=Object(c.d)(this._config.maxWidth),t.maxHeight=Object(c.d)(this._config.maxHeight)}_togglePointerEvents(t){this._pane.style.pointerEvents=t?"auto":"none"}_attachBackdrop(){this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),"undefined"!=typeof requestAnimationFrame?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add("cdk-overlay-backdrop-showing")})}):this._backdropElement.classList.add("cdk-overlay-backdrop-showing")}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){let t,e=this._backdropElement;if(!e)return;let i=()=>{e&&(e.removeEventListener("click",this._backdropClickHandler),e.removeEventListener("transitionend",i),e.parentNode&&e.parentNode.removeChild(e)),this._backdropElement==e&&(this._backdropElement=null),this._config.backdropClass&&this._toggleClasses(e,this._config.backdropClass,!1),clearTimeout(t)};e.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{e.addEventListener("transitionend",i)}),e.style.pointerEvents="none",t=this._ngZone.runOutsideAngular(()=>setTimeout(i,500))}_toggleClasses(t,e,i){const n=t.classList;Object(c.b)(e).forEach(t=>{t&&(i?n.add(t):n.remove(t))})}_detachContentWhenStable(){this._ngZone.runOutsideAngular(()=>{const t=this._ngZone.onStable.pipe(Object(b.a)(Object(u.a)(this._attachments,this._detachments))).subscribe(()=>{this._pane&&this._host&&0!==this._pane.children.length||(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._previousHostParent.removeChild(this._host)),t.unsubscribe())})})}_disposeScrollStrategy(){const t=this._scrollStrategy;t&&(t.disable(),t.detach&&t.detach())}}const W=/([A-Za-z%]+)$/;class T{constructor(t,e,i,n,a){this._viewportRuler=e,this._document=i,this._platform=n,this._overlayContainer=a,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new d.a,this._resizeSubscription=h.a.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}get positions(){return this._preferredPositions}attach(t){this._validatePositions(),t.hostElement.classList.add("cdk-overlay-connected-position-bounding-box"),this._overlayRef=t,this._boundingBox=t.hostElement,this._pane=t.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition)return void this.reapplyLastPosition();this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect();const t=this._originRect,e=this._overlayRect,i=this._viewportRect,n=[];let a;for(let s of this._preferredPositions){let o=this._getOriginPoint(t,s),r=this._getOverlayPoint(o,e,s),c=this._getOverlayFit(r,e,i,s);if(c.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(s,o);this._canFitWithFlexibleDimensions(c,r,i)?n.push({position:s,origin:o,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(o,s)}):(!a||a.overlayFit.visibleArea<c.visibleArea)&&(a={overlayFit:c,overlayPoint:r,originPoint:o,position:s,overlayRect:e})}if(n.length){let t=null,e=-1;for(const i of n){const n=i.boundingBoxRect.width*i.boundingBoxRect.height*(i.position.weight||1);n>e&&(e=n,t=i)}return this._isPushed=!1,void this._applyPosition(t.position,t.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(a.position,a.originPoint);this._applyPosition(a.position,a.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&E(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove("cdk-overlay-connected-position-bounding-box"),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(!this._isDisposed&&(!this._platform||this._platform.isBrowser)){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect();const t=this._lastPosition||this._preferredPositions[0],e=this._getOriginPoint(this._originRect,t);this._applyPosition(t,e)}}withScrollableContainers(t){return this._scrollables=t,this}withPositions(t){return this._preferredPositions=t,-1===t.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(t){return this._viewportMargin=t,this}withFlexibleDimensions(t=!0){return this._hasFlexibleDimensions=t,this}withGrowAfterOpen(t=!0){return this._growAfterOpen=t,this}withPush(t=!0){return this._canPush=t,this}withLockedPosition(t=!0){return this._positionLocked=t,this}setOrigin(t){return this._origin=t,this}withDefaultOffsetX(t){return this._offsetX=t,this}withDefaultOffsetY(t){return this._offsetY=t,this}withTransformOriginOn(t){return this._transformOriginSelector=t,this}_getOriginPoint(t,e){let i,n;if("center"==e.originX)i=t.left+t.width/2;else{const n=this._isRtl()?t.right:t.left,a=this._isRtl()?t.left:t.right;i="start"==e.originX?n:a}return n="center"==e.originY?t.top+t.height/2:"top"==e.originY?t.top:t.bottom,{x:i,y:n}}_getOverlayPoint(t,e,i){let n,a;return n="center"==i.overlayX?-e.width/2:"start"===i.overlayX?this._isRtl()?-e.width:0:this._isRtl()?0:-e.width,a="center"==i.overlayY?-e.height/2:"top"==i.overlayY?0:-e.height,{x:t.x+n,y:t.y+a}}_getOverlayFit(t,e,i,n){let{x:a,y:s}=t,o=this._getOffset(n,"x"),r=this._getOffset(n,"y");o&&(a+=o),r&&(s+=r);let c=0-s,l=s+e.height-i.height,d=this._subtractOverflows(e.width,0-a,a+e.width-i.width),h=this._subtractOverflows(e.height,c,l),u=d*h;return{visibleArea:u,isCompletelyWithinViewport:e.width*e.height===u,fitsInViewportVertically:h===e.height,fitsInViewportHorizontally:d==e.width}}_canFitWithFlexibleDimensions(t,e,i){if(this._hasFlexibleDimensions){const n=i.bottom-e.y,a=i.right-e.x,s=F(this._overlayRef.getConfig().minHeight),o=F(this._overlayRef.getConfig().minWidth),r=t.fitsInViewportHorizontally||null!=o&&o<=a;return(t.fitsInViewportVertically||null!=s&&s<=n)&&r}return!1}_pushOverlayOnScreen(t,e,i){if(this._previousPushAmount&&this._positionLocked)return{x:t.x+this._previousPushAmount.x,y:t.y+this._previousPushAmount.y};const n=this._viewportRect,a=Math.max(t.x+e.width-n.width,0),s=Math.max(t.y+e.height-n.height,0),o=Math.max(n.top-i.top-t.y,0),r=Math.max(n.left-i.left-t.x,0);let c=0,l=0;return c=e.width<=n.width?r||-a:t.x<this._viewportMargin?n.left-i.left-t.x:0,l=e.height<=n.height?o||-s:t.y<this._viewportMargin?n.top-i.top-t.y:0,this._previousPushAmount={x:c,y:l},{x:t.x+c,y:t.y+l}}_applyPosition(t,e){if(this._setTransformOrigin(t),this._setOverlayElementStyles(e,t),this._setBoundingBoxStyles(e,t),t.panelClass&&this._addPanelClasses(t.panelClass),this._lastPosition=t,this._positionChanges.observers.length){const e=this._getScrollVisibility(),i=new S(t,e);this._positionChanges.next(i)}this._isInitialRender=!1}_setTransformOrigin(t){if(!this._transformOriginSelector)return;const e=this._boundingBox.querySelectorAll(this._transformOriginSelector);let i,n=t.overlayY;i="center"===t.overlayX?"center":this._isRtl()?"start"===t.overlayX?"right":"left":"start"===t.overlayX?"left":"right";for(let a=0;a<e.length;a++)e[a].style.transformOrigin=`${i} ${n}`}_calculateBoundingBoxRect(t,e){const i=this._viewportRect,n=this._isRtl();let a,s,o,r,c,l;if("top"===e.overlayY)s=t.y,a=i.height-s+this._viewportMargin;else if("bottom"===e.overlayY)o=i.height-t.y+2*this._viewportMargin,a=i.height-o+this._viewportMargin;else{const e=Math.min(i.bottom-t.y+i.top,t.y),n=this._lastBoundingBoxSize.height;a=2*e,s=t.y-e,a>n&&!this._isInitialRender&&!this._growAfterOpen&&(s=t.y-n/2)}if("end"===e.overlayX&&!n||"start"===e.overlayX&&n)l=i.width-t.x+this._viewportMargin,r=t.x-this._viewportMargin;else if("start"===e.overlayX&&!n||"end"===e.overlayX&&n)c=t.x,r=i.right-t.x;else{const e=Math.min(i.right-t.x+i.left,t.x),n=this._lastBoundingBoxSize.width;r=2*e,c=t.x-e,r>n&&!this._isInitialRender&&!this._growAfterOpen&&(c=t.x-n/2)}return{top:s,left:c,bottom:o,right:l,width:r,height:a}}_setBoundingBoxStyles(t,e){const i=this._calculateBoundingBoxRect(t,e);this._isInitialRender||this._growAfterOpen||(i.height=Math.min(i.height,this._lastBoundingBoxSize.height),i.width=Math.min(i.width,this._lastBoundingBoxSize.width));const n={};if(this._hasExactPosition())n.top=n.left="0",n.bottom=n.right=n.maxHeight=n.maxWidth="",n.width=n.height="100%";else{const t=this._overlayRef.getConfig().maxHeight,a=this._overlayRef.getConfig().maxWidth;n.height=Object(c.d)(i.height),n.top=Object(c.d)(i.top),n.bottom=Object(c.d)(i.bottom),n.width=Object(c.d)(i.width),n.left=Object(c.d)(i.left),n.right=Object(c.d)(i.right),n.alignItems="center"===e.overlayX?"center":"end"===e.overlayX?"flex-end":"flex-start",n.justifyContent="center"===e.overlayY?"center":"bottom"===e.overlayY?"flex-end":"flex-start",t&&(n.maxHeight=Object(c.d)(t)),a&&(n.maxWidth=Object(c.d)(a))}this._lastBoundingBoxSize=i,E(this._boundingBox.style,n)}_resetBoundingBoxStyles(){E(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){E(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(t,e){const i={},n=this._hasExactPosition(),a=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(n){const n=this._viewportRuler.getViewportScrollPosition();E(i,this._getExactOverlayY(e,t,n)),E(i,this._getExactOverlayX(e,t,n))}else i.position="static";let o="",r=this._getOffset(e,"x"),l=this._getOffset(e,"y");r&&(o+=`translateX(${r}px) `),l&&(o+=`translateY(${l}px)`),i.transform=o.trim(),s.maxHeight&&(n?i.maxHeight=Object(c.d)(s.maxHeight):a&&(i.maxHeight="")),s.maxWidth&&(n?i.maxWidth=Object(c.d)(s.maxWidth):a&&(i.maxWidth="")),E(this._pane.style,i)}_getExactOverlayY(t,e,i){let n={top:"",bottom:""},a=this._getOverlayPoint(e,this._overlayRect,t);this._isPushed&&(a=this._pushOverlayOnScreen(a,this._overlayRect,i));let s=this._overlayContainer.getContainerElement().getBoundingClientRect().top;return a.y-=s,"bottom"===t.overlayY?n.bottom=this._document.documentElement.clientHeight-(a.y+this._overlayRect.height)+"px":n.top=Object(c.d)(a.y),n}_getExactOverlayX(t,e,i){let n,a={left:"",right:""},s=this._getOverlayPoint(e,this._overlayRect,t);return this._isPushed&&(s=this._pushOverlayOnScreen(s,this._overlayRect,i)),n=this._isRtl()?"end"===t.overlayX?"left":"right":"end"===t.overlayX?"right":"left","right"===n?a.right=this._document.documentElement.clientWidth-(s.x+this._overlayRect.width)+"px":a.left=Object(c.d)(s.x),a}_getScrollVisibility(){const t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),i=this._scrollables.map(t=>t.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:O(t,i),isOriginOutsideView:C(t,i),isOverlayClipped:O(e,i),isOverlayOutsideView:C(e,i)}}_subtractOverflows(t,...e){return e.reduce((t,e)=>t-Math.max(e,0),t)}_getNarrowedViewportRect(){const t=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,i=this._viewportRuler.getViewportScrollPosition();return{top:i.top+this._viewportMargin,left:i.left+this._viewportMargin,right:i.left+t-this._viewportMargin,bottom:i.top+e-this._viewportMargin,width:t-2*this._viewportMargin,height:e-2*this._viewportMargin}}_isRtl(){return"rtl"===this._overlayRef.getDirection()}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(t,e){return"x"===e?null==t.offsetX?this._offsetX:t.offsetX:null==t.offsetY?this._offsetY:t.offsetY}_validatePositions(){}_addPanelClasses(t){this._pane&&Object(c.b)(t).forEach(t=>{""!==t&&-1===this._appliedPanelClasses.indexOf(t)&&(this._appliedPanelClasses.push(t),this._pane.classList.add(t))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(t=>{this._pane.classList.remove(t)}),this._appliedPanelClasses=[])}_getOriginRect(){const t=this._origin;if(t instanceof a.l)return t.nativeElement.getBoundingClientRect();if(t instanceof Element)return t.getBoundingClientRect();const e=t.width||0,i=t.height||0;return{top:t.y,bottom:t.y+i,left:t.x,right:t.x+e,height:i,width:e}}}function E(t,e){for(let i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function F(t){if("number"!=typeof t&&null!=t){const[e,i]=t.split(W);return i&&"px"!==i?null:parseFloat(e)}return t||null}class L{constructor(t,e,i,n,a,s,o){this._preferredPositions=[],this._positionStrategy=new T(i,n,a,s,o).withFlexibleDimensions(!1).withPush(!1).withViewportMargin(0),this.withFallbackPosition(t,e),this.onPositionChange=this._positionStrategy.positionChanges}get positions(){return this._preferredPositions}attach(t){this._overlayRef=t,this._positionStrategy.attach(t),this._direction&&(t.setDirection(this._direction),this._direction=null)}dispose(){this._positionStrategy.dispose()}detach(){this._positionStrategy.detach()}apply(){this._positionStrategy.apply()}recalculateLastPosition(){this._positionStrategy.reapplyLastPosition()}withScrollableContainers(t){this._positionStrategy.withScrollableContainers(t)}withFallbackPosition(t,e,i,n){const a=new k(t,e,i,n);return this._preferredPositions.push(a),this._positionStrategy.withPositions(this._preferredPositions),this}withDirection(t){return this._overlayRef?this._overlayRef.setDirection(t):this._direction=t,this}withOffsetX(t){return this._positionStrategy.withDefaultOffsetX(t),this}withOffsetY(t){return this._positionStrategy.withDefaultOffsetY(t),this}withLockedPosition(t){return this._positionStrategy.withLockedPosition(t),this}withPositions(t){return this._preferredPositions=t.slice(),this._positionStrategy.withPositions(this._preferredPositions),this}setOrigin(t){return this._positionStrategy.setOrigin(t),this}}class Q{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._leftOffset="",this._rightOffset="",this._alignItems="",this._justifyContent="",this._width="",this._height=""}attach(t){const e=t.getConfig();this._overlayRef=t,this._width&&!e.width&&t.updateSize({width:this._width}),this._height&&!e.height&&t.updateSize({height:this._height}),t.hostElement.classList.add("cdk-global-overlay-wrapper"),this._isDisposed=!1}top(t=""){return this._bottomOffset="",this._topOffset=t,this._alignItems="flex-start",this}left(t=""){return this._rightOffset="",this._leftOffset=t,this._justifyContent="flex-start",this}bottom(t=""){return this._topOffset="",this._bottomOffset=t,this._alignItems="flex-end",this}right(t=""){return this._leftOffset="",this._rightOffset=t,this._justifyContent="flex-end",this}width(t=""){return this._overlayRef?this._overlayRef.updateSize({width:t}):this._width=t,this}height(t=""){return this._overlayRef?this._overlayRef.updateSize({height:t}):this._height=t,this}centerHorizontally(t=""){return this.left(t),this._justifyContent="center",this}centerVertically(t=""){return this.top(t),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;const t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,i=this._overlayRef.getConfig(),{width:n,height:a,maxWidth:s,maxHeight:o}=i,r=!("100%"!==n&&"100vw"!==n||s&&"100%"!==s&&"100vw"!==s),c=!("100%"!==a&&"100vh"!==a||o&&"100%"!==o&&"100vh"!==o);t.position=this._cssPosition,t.marginLeft=r?"0":this._leftOffset,t.marginTop=c?"0":this._topOffset,t.marginBottom=this._bottomOffset,t.marginRight=this._rightOffset,r?e.justifyContent="flex-start":"center"===this._justifyContent?e.justifyContent="center":"rtl"===this._overlayRef.getConfig().direction?"flex-start"===this._justifyContent?e.justifyContent="flex-end":"flex-end"===this._justifyContent&&(e.justifyContent="flex-start"):e.justifyContent=this._justifyContent,e.alignItems=c?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;const t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,i=e.style;e.classList.remove("cdk-global-overlay-wrapper"),i.justifyContent=i.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}let N=(()=>{class t{constructor(t,e,i,n){this._viewportRuler=t,this._document=e,this._platform=i,this._overlayContainer=n}global(){return new Q}connectedTo(t,e,i){return new L(e,i,t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}flexibleConnectedTo(t){return new T(t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return t.\u0275fac=function(e){return new(e||t)(a.ac(n.h),a.ac(r.e),a.ac(s.a),a.ac(j))},t.\u0275prov=Object(a.Mb)({factory:function(){return new t(Object(a.ac)(n.h),Object(a.ac)(r.e),Object(a.ac)(s.a),Object(a.ac)(j))},token:t,providedIn:"root"}),t})(),z=0,B=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c,l,d){this.scrollStrategies=t,this._overlayContainer=e,this._componentFactoryResolver=i,this._positionBuilder=n,this._keyboardDispatcher=a,this._injector=s,this._ngZone=o,this._document=r,this._directionality=c,this._location=l,this._outsideClickDispatcher=d}create(t){const e=this._createHostElement(),i=this._createPaneElement(e),n=this._createPortalOutlet(i),a=new M(t);return a.direction=a.direction||this._directionality.value,new A(n,e,i,a,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher)}position(){return this._positionBuilder}_createPaneElement(t){const e=this._document.createElement("div");return e.id="cdk-overlay-"+z++,e.classList.add("cdk-overlay-pane"),t.appendChild(e),e}_createHostElement(){const t=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(t),t}_createPortalOutlet(t){return this._appRef||(this._appRef=this._injector.get(a.g)),new l.f(t,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return t.\u0275fac=function(e){return new(e||t)(a.ac(w),a.ac(j),a.ac(a.j),a.ac(N),a.ac(P),a.ac(a.t),a.ac(a.C),a.ac(r.e),a.ac(o.c),a.ac(r.n),a.ac(V))},t.\u0275prov=a.Mb({token:t,factory:t.\u0275fac}),t})();const U=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],$=new a.s("cdk-connected-overlay-scroll-strategy");let H=(()=>{class t{constructor(t){this.elementRef=t}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l))},t.\u0275dir=a.Lb({type:t,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"]}),t})(),G=(()=>{class t{constructor(t,e,i,n,s){this._overlay=t,this._dir=s,this._hasBackdrop=!1,this._lockPosition=!1,this._growAfterOpen=!1,this._flexibleDimensions=!1,this._push=!1,this._backdropSubscription=h.a.EMPTY,this._attachSubscription=h.a.EMPTY,this._detachSubscription=h.a.EMPTY,this._positionSubscription=h.a.EMPTY,this.viewportMargin=0,this.open=!1,this.backdropClick=new a.o,this.positionChange=new a.o,this.attach=new a.o,this.detach=new a.o,this.overlayKeydown=new a.o,this.overlayOutsideClick=new a.o,this._templatePortal=new l.i(e,i),this._scrollStrategyFactory=n,this.scrollStrategy=this._scrollStrategyFactory()}get offsetX(){return this._offsetX}set offsetX(t){this._offsetX=t,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(t){this._offsetY=t,this._position&&this._updatePositionStrategy(this._position)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(t){this._hasBackdrop=Object(c.c)(t)}get lockPosition(){return this._lockPosition}set lockPosition(t){this._lockPosition=Object(c.c)(t)}get flexibleDimensions(){return this._flexibleDimensions}set flexibleDimensions(t){this._flexibleDimensions=Object(c.c)(t)}get growAfterOpen(){return this._growAfterOpen}set growAfterOpen(t){this._growAfterOpen=Object(c.c)(t)}get push(){return this._push}set push(t){this._push=Object(c.c)(t)}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef&&this._overlayRef.dispose()}ngOnChanges(t){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),t.origin&&this.open&&this._position.apply()),t.open&&(this.open?this._attachOverlay():this._detachOverlay())}_createOverlay(){this.positions&&this.positions.length||(this.positions=U);const t=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=t.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=t.detachments().subscribe(()=>this.detach.emit()),t.keydownEvents().subscribe(t=>{this.overlayKeydown.next(t),t.keyCode!==v.h||Object(v.v)(t)||(t.preventDefault(),this._detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(t=>{this.overlayOutsideClick.next(t)})}_buildConfig(){const t=this._position=this.positionStrategy||this._createPositionStrategy(),e=new M({direction:this._dir,positionStrategy:t,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop});return(this.width||0===this.width)&&(e.width=this.width),(this.height||0===this.height)&&(e.height=this.height),(this.minWidth||0===this.minWidth)&&(e.minWidth=this.minWidth),(this.minHeight||0===this.minHeight)&&(e.minHeight=this.minHeight),this.backdropClass&&(e.backdropClass=this.backdropClass),this.panelClass&&(e.panelClass=this.panelClass),e}_updatePositionStrategy(t){const e=this.positions.map(t=>({originX:t.originX,originY:t.originY,overlayX:t.overlayX,overlayY:t.overlayY,offsetX:t.offsetX||this.offsetX,offsetY:t.offsetY||this.offsetY,panelClass:t.panelClass||void 0}));return t.setOrigin(this.origin.elementRef).withPositions(e).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){const t=this._overlay.position().flexibleConnectedTo(this.origin.elementRef);return this._updatePositionStrategy(t),t}_attachOverlay(){this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(t=>{this.backdropClick.emit(t)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(function(t,e=!1){return i=>i.lift(new m(t,e))}(()=>this.positionChange.observers.length>0)).subscribe(t=>{this.positionChange.emit(t),0===this.positionChange.observers.length&&this._positionSubscription.unsubscribe()}))}_detachOverlay(){this._overlayRef&&this._overlayRef.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(B),a.Qb(a.P),a.Qb(a.T),a.Qb($),a.Qb(o.c,8))},t.\u0275dir=a.Lb({type:t,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{viewportMargin:["cdkConnectedOverlayViewportMargin","viewportMargin"],open:["cdkConnectedOverlayOpen","open"],scrollStrategy:["cdkConnectedOverlayScrollStrategy","scrollStrategy"],offsetX:["cdkConnectedOverlayOffsetX","offsetX"],offsetY:["cdkConnectedOverlayOffsetY","offsetY"],hasBackdrop:["cdkConnectedOverlayHasBackdrop","hasBackdrop"],lockPosition:["cdkConnectedOverlayLockPosition","lockPosition"],flexibleDimensions:["cdkConnectedOverlayFlexibleDimensions","flexibleDimensions"],growAfterOpen:["cdkConnectedOverlayGrowAfterOpen","growAfterOpen"],push:["cdkConnectedOverlayPush","push"],positions:["cdkConnectedOverlayPositions","positions"],origin:["cdkConnectedOverlayOrigin","origin"],positionStrategy:["cdkConnectedOverlayPositionStrategy","positionStrategy"],width:["cdkConnectedOverlayWidth","width"],height:["cdkConnectedOverlayHeight","height"],minWidth:["cdkConnectedOverlayMinWidth","minWidth"],minHeight:["cdkConnectedOverlayMinHeight","minHeight"],backdropClass:["cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:["cdkConnectedOverlayPanelClass","panelClass"],transformOriginSelector:["cdkConnectedOverlayTransformOriginOn","transformOriginSelector"]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],features:[a.Bb]}),t})();const X={provide:$,deps:[B],useFactory:function(t){return()=>t.scrollStrategies.reposition()}};let q=(()=>{class t{}return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)},providers:[B,X],imports:[[o.a,l.h,n.g],n.g]}),t})()},"rH+9":function(t,e,i){"use strict";i.d(e,"a",(function(){return r}));var n=i("fXoL"),a=i("sYmb"),s=i("4zkx"),o=i("aEDk");let r=(()=>{class t{constructor(t,e,i){this.translate=t,this.headerService=e,this.latinisePipe=i}empty(t){return null==t||(Array.isArray(t)?!(t.length>0):""===String(t))}isDate(t){return t instanceof Date&&!isNaN(t.valueOf())}formatFrenchDateToTechnicalDate(t){if(this.empty(t))return t;{let e=t.split("-");return e=e.concat(e[e.length-1].split(" ")),e.splice(2,1),this.empty(e[3])&&(e[3]="00:00:00"),`${e[2]}-${e[1]}-${e[0]} ${e[3]}`}}formatFrenchDateToObjectDate(t,e="-"){if(this.empty(t))return t;{let i=t.split(e);return i=i.concat(i[i.length-1].split(" ")),i.splice(2,1),this.empty(i[3])&&(i[3]="00:00:00"),new Date(`${i[2]}-${i[1]}-${i[0]} ${i[3]}`)}}formatDateObjectToDateString(t,e=!1,i="dd-mm-yyyy"){if(null!==t){let n=[];i.split("-").forEach(e=>{if("dd"===e){let e=t.getDate();e=("00"+e).slice(-2),n.push(e)}else if("mm"===e){let e=t.getMonth()+1;e=("00"+e).slice(-2),n.push(e)}else if("yyyy"===e){let e=t.getFullYear();n.push(e)}});let a="";return e&&(a=" 23:59:59"),`${n.join("-")}${a}`}return t}formatSerializedDateToDateString(t){return this.formatDateObjectToDateString(new Date(t))}listSortingDataAccessor(t,e){return"string"==typeof t[e]?t[e].toLowerCase():t[e]}filterUnSensitive(t,e,i){let n=!1;return e=this.latinisePipe.transform(e),i.forEach(i=>{let a=t[i];"string"!=typeof t[i]&&(a=void 0===a?"":JSON.stringify(a)),n=n||this.latinisePipe.transform(a.toLowerCase()).includes(e)}),n}formatBytes(t,e=2){if("number"==typeof t){if(0===t)return"0 Octet";const i=1024,n=e<0?0:e,a=["Octets","KO","MO","GO","TO","PO","EO","ZO","YO"],s=Math.floor(Math.log(t)/Math.log(i));return parseFloat((t/Math.pow(i,s)).toFixed(n))+" "+a[s]}return t}}return t.\u0275fac=function(e){return new(e||t)(n.ac(a.e),n.ac(s.a),n.ac(o.c))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()},sYmb:function(t,e,i){"use strict";i.d(e,"a",(function(){return A})),i.d(e,"b",(function(){return b})),i.d(e,"c",(function(){return T})),i.d(e,"d",(function(){return W})),i.d(e,"e",(function(){return j}));var n=i("fXoL"),a=i("LRne"),s=i("7+OI"),o=i("cp0P"),r=i("GyhO"),c=i("NXyV"),l=i("IzEk"),d=i("UXun"),h=i("lJxs"),u=i("bOdf"),p=i("eIep");class b{}let f=(()=>{class t extends b{getTranslation(t){return Object(a.a)({})}}return t.\u0275fac=function(e){return m(e||t)},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();const m=n.Yb(f);class g{}let v=(()=>{class t{handle(t){return t.key}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();function _(t,e){if(t===e)return!0;if(null===t||null===e)return!1;if(t!=t&&e!=e)return!0;let i,n,a,s=typeof t;if(s==typeof e&&"object"==s){if(!Array.isArray(t)){if(Array.isArray(e))return!1;for(n in a=Object.create(null),t){if(!_(t[n],e[n]))return!1;a[n]=!0}for(n in e)if(!(n in a)&&void 0!==e[n])return!1;return!0}if(!Array.isArray(e))return!1;if((i=t.length)==e.length){for(n=0;n<i;n++)if(!_(t[n],e[n]))return!1;return!0}}return!1}function y(t){return null!=t}function x(t){return t&&"object"==typeof t&&!Array.isArray(t)}class C{}let O=(()=>{class t extends C{constructor(){super(...arguments),this.templateMatcher=/{{\s?([^{}\s]*)\s?}}/g}interpolate(t,e){let i;return i="string"==typeof t?this.interpolateString(t,e):"function"==typeof t?this.interpolateFunction(t,e):t,i}getValue(t,e){let i="string"==typeof e?e.split("."):[e];e="";do{e+=i.shift(),!y(t)||!y(t[e])||"object"!=typeof t[e]&&i.length?i.length?e+=".":t=void 0:(t=t[e],e="")}while(i.length);return t}interpolateFunction(t,e){return t(e)}interpolateString(t,e){return e?t.replace(this.templateMatcher,(t,i)=>{let n=this.getValue(e,i);return y(n)?n:t}):t}}return t.\u0275fac=function(e){return D(e||t)},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();const D=n.Yb(O);class w{}let M=(()=>{class t extends w{compile(t,e){return t}compileTranslations(t,e){return t}}return t.\u0275fac=function(e){return k(e||t)},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();const k=n.Yb(M);class S{constructor(){this.currentLang=this.defaultLang,this.translations={},this.langs=[],this.onTranslationChange=new n.o,this.onLangChange=new n.o,this.onDefaultLangChange=new n.o}}const I=new n.s("USE_STORE"),P=new n.s("USE_DEFAULT_LANG"),V=new n.s("DEFAULT_LANGUAGE"),R=new n.s("USE_EXTEND");let j=(()=>{class t{constructor(t,e,i,a,s,o=!0,r=!1,c=!1,l){this.store=t,this.currentLoader=e,this.compiler=i,this.parser=a,this.missingTranslationHandler=s,this.useDefaultLang=o,this.isolate=r,this.extend=c,this.pending=!1,this._onTranslationChange=new n.o,this._onLangChange=new n.o,this._onDefaultLangChange=new n.o,this._langs=[],this._translations={},this._translationRequests={},l&&this.setDefaultLang(l)}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(t){this.isolate?this._defaultLang=t:this.store.defaultLang=t}get currentLang(){return this.isolate?this._currentLang:this.store.currentLang}set currentLang(t){this.isolate?this._currentLang=t:this.store.currentLang=t}get langs(){return this.isolate?this._langs:this.store.langs}set langs(t){this.isolate?this._langs=t:this.store.langs=t}get translations(){return this.isolate?this._translations:this.store.translations}set translations(t){this.isolate?this._translations=t:this.store.translations=t}setDefaultLang(t){if(t===this.defaultLang)return;let e=this.retrieveTranslations(t);void 0!==e?(null==this.defaultLang&&(this.defaultLang=t),e.pipe(Object(l.a)(1)).subscribe(e=>{this.changeDefaultLang(t)})):this.changeDefaultLang(t)}getDefaultLang(){return this.defaultLang}use(t){if(t===this.currentLang)return Object(a.a)(this.translations[t]);let e=this.retrieveTranslations(t);return void 0!==e?(this.currentLang||(this.currentLang=t),e.pipe(Object(l.a)(1)).subscribe(e=>{this.changeLang(t)}),e):(this.changeLang(t),Object(a.a)(this.translations[t]))}retrieveTranslations(t){let e;return(void 0===this.translations[t]||this.extend)&&(this._translationRequests[t]=this._translationRequests[t]||this.getTranslation(t),e=this._translationRequests[t]),e}getTranslation(t){this.pending=!0;const e=this.currentLoader.getTranslation(t).pipe(Object(d.a)(1),Object(l.a)(1));return this.loadingTranslations=e.pipe(Object(h.a)(e=>this.compiler.compileTranslations(e,t)),Object(d.a)(1),Object(l.a)(1)),this.loadingTranslations.subscribe({next:e=>{this.translations[t]=this.extend&&this.translations[t]?Object.assign(Object.assign({},e),this.translations[t]):e,this.updateLangs(),this.pending=!1},error:t=>{this.pending=!1}}),e}setTranslation(t,e,i=!1){e=this.compiler.compileTranslations(e,t),this.translations[t]=(i||this.extend)&&this.translations[t]?function t(e,i){let n=Object.assign({},e);return x(e)&&x(i)&&Object.keys(i).forEach(a=>{x(i[a])?a in e?n[a]=t(e[a],i[a]):Object.assign(n,{[a]:i[a]}):Object.assign(n,{[a]:i[a]})}),n}(this.translations[t],e):e,this.updateLangs(),this.onTranslationChange.emit({lang:t,translations:this.translations[t]})}getLangs(){return this.langs}addLangs(t){t.forEach(t=>{-1===this.langs.indexOf(t)&&this.langs.push(t)})}updateLangs(){this.addLangs(Object.keys(this.translations))}getParsedResult(t,e,i){let n;if(e instanceof Array){let n={},r=!1;for(let a of e)n[a]=this.getParsedResult(t,a,i),Object(s.a)(n[a])&&(r=!0);if(r){const t=e.map(t=>Object(s.a)(n[t])?n[t]:Object(a.a)(n[t]));return Object(o.a)(t).pipe(Object(h.a)(t=>{let i={};return t.forEach((t,n)=>{i[e[n]]=t}),i}))}return n}if(t&&(n=this.parser.interpolate(this.parser.getValue(t,e),i)),void 0===n&&null!=this.defaultLang&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(n=this.parser.interpolate(this.parser.getValue(this.translations[this.defaultLang],e),i)),void 0===n){let t={key:e,translateService:this};void 0!==i&&(t.interpolateParams=i),n=this.missingTranslationHandler.handle(t)}return void 0!==n?n:e}get(t,e){if(!y(t)||!t.length)throw new Error('Parameter "key" required');if(this.pending)return this.loadingTranslations.pipe(Object(u.a)(i=>(i=this.getParsedResult(i,t,e),Object(s.a)(i)?i:Object(a.a)(i))));{let i=this.getParsedResult(this.translations[this.currentLang],t,e);return Object(s.a)(i)?i:Object(a.a)(i)}}getStreamOnTranslationChange(t,e){if(!y(t)||!t.length)throw new Error('Parameter "key" required');return Object(r.a)(Object(c.a)(()=>this.get(t,e)),this.onTranslationChange.pipe(Object(p.a)(i=>{const n=this.getParsedResult(i.translations,t,e);return"function"==typeof n.subscribe?n:Object(a.a)(n)})))}stream(t,e){if(!y(t)||!t.length)throw new Error('Parameter "key" required');return Object(r.a)(Object(c.a)(()=>this.get(t,e)),this.onLangChange.pipe(Object(p.a)(i=>{const n=this.getParsedResult(i.translations,t,e);return Object(s.a)(n)?n:Object(a.a)(n)})))}instant(t,e){if(!y(t)||!t.length)throw new Error('Parameter "key" required');let i=this.getParsedResult(this.translations[this.currentLang],t,e);if(Object(s.a)(i)){if(t instanceof Array){let e={};return t.forEach((i,n)=>{e[t[n]]=t[n]}),e}return t}return i}set(t,e,i=this.currentLang){this.translations[i][t]=this.compiler.compile(e,i),this.updateLangs(),this.onTranslationChange.emit({lang:i,translations:this.translations[i]})}changeLang(t){this.currentLang=t,this.onLangChange.emit({lang:t,translations:this.translations[t]}),null==this.defaultLang&&this.changeDefaultLang(t)}changeDefaultLang(t){this.defaultLang=t,this.onDefaultLangChange.emit({lang:t,translations:this.translations[t]})}reloadLang(t){return this.resetLang(t),this.getTranslation(t)}resetLang(t){this._translationRequests[t]=void 0,this.translations[t]=void 0}getBrowserLang(){if("undefined"==typeof window||void 0===window.navigator)return;let t=window.navigator.languages?window.navigator.languages[0]:null;return t=t||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,void 0!==t?(-1!==t.indexOf("-")&&(t=t.split("-")[0]),-1!==t.indexOf("_")&&(t=t.split("_")[0]),t):void 0}getBrowserCultureLang(){if("undefined"==typeof window||void 0===window.navigator)return;let t=window.navigator.languages?window.navigator.languages[0]:null;return t=t||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,t}}return t.\u0275fac=function(e){return new(e||t)(n.ac(S),n.ac(b),n.ac(w),n.ac(C),n.ac(g),n.ac(P),n.ac(I),n.ac(R),n.ac(V))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})(),A=(()=>{class t{constructor(t,e,i){this.translateService=t,this.element=e,this._ref=i,this.onTranslationChangeSub||(this.onTranslationChangeSub=this.translateService.onTranslationChange.subscribe(t=>{t.lang===this.translateService.currentLang&&this.checkNodes(!0,t.translations)})),this.onLangChangeSub||(this.onLangChangeSub=this.translateService.onLangChange.subscribe(t=>{this.checkNodes(!0,t.translations)})),this.onDefaultLangChangeSub||(this.onDefaultLangChangeSub=this.translateService.onDefaultLangChange.subscribe(t=>{this.checkNodes(!0)}))}set translate(t){t&&(this.key=t,this.checkNodes())}set translateParams(t){_(this.currentParams,t)||(this.currentParams=t,this.checkNodes(!0))}ngAfterViewChecked(){this.checkNodes()}checkNodes(t=!1,e){let i=this.element.nativeElement.childNodes;i.length||(this.setContent(this.element.nativeElement,this.key),i=this.element.nativeElement.childNodes);for(let n=0;n<i.length;++n){let a=i[n];if(3===a.nodeType){let i;if(t&&(a.lastKey=null),y(a.lookupKey))i=a.lookupKey;else if(this.key)i=this.key;else{let t=this.getContent(a),e=t.trim();e.length&&(a.lookupKey=e,t!==a.currentValue?(i=e,a.originalContent=t||a.originalContent):a.originalContent?i=a.originalContent.trim():t!==a.currentValue&&(i=e,a.originalContent=t||a.originalContent))}this.updateValue(i,a,e)}}}updateValue(t,e,i){if(t){if(e.lastKey===t&&this.lastParams===this.currentParams)return;this.lastParams=this.currentParams;let n=i=>{i!==t&&(e.lastKey=t),e.originalContent||(e.originalContent=this.getContent(e)),e.currentValue=y(i)?i:e.originalContent||t,this.setContent(e,this.key?e.currentValue:e.originalContent.replace(t,e.currentValue)),this._ref.markForCheck()};if(y(i)){let e=this.translateService.getParsedResult(i,t,this.currentParams);Object(s.a)(e)?e.subscribe(n):n(e)}else this.translateService.get(t,this.currentParams).subscribe(n)}}getContent(t){return y(t.textContent)?t.textContent:t.data}setContent(t,e){y(t.textContent)?t.textContent=e:t.data=e}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)(n.Qb(j),n.Qb(n.l),n.Qb(n.h))},t.\u0275dir=n.Lb({type:t,selectors:[["","translate",""],["","ngx-translate",""]],inputs:{translate:"translate",translateParams:"translateParams"}}),t})(),W=(()=>{class t{constructor(t,e){this.translate=t,this._ref=e,this.value=""}updateValue(t,e,i){let n=e=>{this.value=void 0!==e?e:t,this.lastKey=t,this._ref.markForCheck()};if(i){let a=this.translate.getParsedResult(i,t,e);Object(s.a)(a.subscribe)?a.subscribe(n):n(a)}this.translate.get(t,e).subscribe(n)}transform(t,...e){if(!t||!t.length)return t;if(_(t,this.lastKey)&&_(e,this.lastParams))return this.value;let i;if(y(e[0])&&e.length)if("string"==typeof e[0]&&e[0].length){let t=e[0].replace(/(\')?([a-zA-Z0-9_]+)(\')?(\s)?:/g,'"$2":').replace(/:(\s)?(\')(.*?)(\')/g,':"$3"');try{i=JSON.parse(t)}catch(n){throw new SyntaxError("Wrong parameter in TranslatePipe. Expected a valid Object, received: "+e[0])}}else"object"!=typeof e[0]||Array.isArray(e[0])||(i=e[0]);return this.lastKey=t,this.lastParams=e,this.updateValue(t,i),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(e=>{this.lastKey&&e.lang===this.translate.currentLang&&(this.lastKey=null,this.updateValue(t,i,e.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(e=>{this.lastKey&&(this.lastKey=null,this.updateValue(t,i,e.translations))})),this.onDefaultLangChange||(this.onDefaultLangChange=this.translate.onDefaultLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(t,i))})),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)(n.Qb(j),n.cc())},t.\u0275pipe=n.Pb({name:"translate",type:t,pure:!1}),t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})(),T=(()=>{class t{static forRoot(e={}){return{ngModule:t,providers:[e.loader||{provide:b,useClass:f},e.compiler||{provide:w,useClass:M},e.parser||{provide:C,useClass:O},e.missingTranslationHandler||{provide:g,useClass:v},S,{provide:I,useValue:e.isolate},{provide:P,useValue:e.useDefaultLang},{provide:R,useValue:e.extend},{provide:V,useValue:e.defaultLanguage},j]}}static forChild(e={}){return{ngModule:t,providers:[e.loader||{provide:b,useClass:f},e.compiler||{provide:w,useClass:M},e.parser||{provide:C,useClass:O},e.missingTranslationHandler||{provide:g,useClass:v},{provide:I,useValue:e.isolate},{provide:P,useValue:e.useDefaultLang},{provide:R,useValue:e.extend},{provide:V,useValue:e.defaultLanguage},j]}}}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)}}),t})()},"tk/3":function(t,e,i){"use strict";i.d(e,"a",(function(){return S})),i.d(e,"b",(function(){return M})),i.d(e,"c",(function(){return N})),i.d(e,"d",(function(){return D})),i.d(e,"e",(function(){return y})),i.d(e,"f",(function(){return u}));var n=i("fXoL"),a=i("LRne"),s=i("HDdC"),o=i("bOdf"),r=i("pLZG"),c=i("lJxs"),l=i("ofXK");class d{}class h{}class u{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?this.lazyInit="string"==typeof t?()=>{this.headers=new Map,t.split("\n").forEach(t=>{const e=t.indexOf(":");if(e>0){const i=t.slice(0,e),n=i.toLowerCase(),a=t.slice(e+1).trim();this.maybeSetNormalizedName(i,n),this.headers.has(n)?this.headers.get(n).push(a):this.headers.set(n,[a])}})}:()=>{this.headers=new Map,Object.keys(t).forEach(e=>{let i=t[e];const n=e.toLowerCase();"string"==typeof i&&(i=[i]),i.length>0&&(this.headers.set(n,i),this.maybeSetNormalizedName(e,n))})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();const e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof u?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){const e=new u;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof u?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){const e=t.name.toLowerCase();switch(t.op){case"a":case"s":let i=t.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(t.name,e);const n=("a"===t.op?this.headers.get(e):void 0)||[];n.push(...i),this.headers.set(e,n);break;case"d":const a=t.value;if(a){let t=this.headers.get(e);if(!t)return;t=t.filter(t=>-1===a.indexOf(t)),0===t.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,t)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}}class p{encodeKey(t){return b(t)}encodeValue(t){return b(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}function b(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}class f{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new p,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function(t,e){const i=new Map;return t.length>0&&t.split("&").forEach(t=>{const n=t.indexOf("="),[a,s]=-1==n?[e.decodeKey(t),""]:[e.decodeKey(t.slice(0,n)),e.decodeValue(t.slice(n+1))],o=i.get(a)||[];o.push(s),i.set(a,o)}),i}(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{const i=t.fromObject[e];this.map.set(e,Array.isArray(i)?i:[i])})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();const e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{const e=this.encoder.encodeKey(t);return this.map.get(t).map(t=>e+"="+this.encoder.encodeValue(t)).join("&")}).filter(t=>""!==t).join("&")}clone(t){const e=new f({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat([t]),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":const e=("a"===t.op?this.map.get(t.param):void 0)||[];e.push(t.value),this.map.set(t.param,e);break;case"d":if(void 0===t.value){this.map.delete(t.param);break}{let e=this.map.get(t.param)||[];const i=e.indexOf(t.value);-1!==i&&e.splice(i,1),e.length>0?this.map.set(t.param,e):this.map.delete(t.param)}}}),this.cloneFrom=this.updates=null)}}function m(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer}function g(t){return"undefined"!=typeof Blob&&t instanceof Blob}function v(t){return"undefined"!=typeof FormData&&t instanceof FormData}class _{constructor(t,e,i,n){let a;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||n?(this.body=void 0!==i?i:null,a=n):a=i,a&&(this.reportProgress=!!a.reportProgress,this.withCredentials=!!a.withCredentials,a.responseType&&(this.responseType=a.responseType),a.headers&&(this.headers=a.headers),a.params&&(this.params=a.params)),this.headers||(this.headers=new u),this.params){const t=this.params.toString();if(0===t.length)this.urlWithParams=e;else{const i=e.indexOf("?");this.urlWithParams=e+(-1===i?"?":i<e.length-1?"&":"")+t}}else this.params=new f,this.urlWithParams=e}serializeBody(){return null===this.body?null:m(this.body)||g(this.body)||v(this.body)||"string"==typeof this.body?this.body:this.body instanceof f?this.body.toString():"object"==typeof this.body||"boolean"==typeof this.body||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return null===this.body||v(this.body)?null:g(this.body)?this.body.type||null:m(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof f?"application/x-www-form-urlencoded;charset=UTF-8":"object"==typeof this.body||"number"==typeof this.body||Array.isArray(this.body)?"application/json":null}clone(t={}){const e=t.method||this.method,i=t.url||this.url,n=t.responseType||this.responseType,a=void 0!==t.body?t.body:this.body,s=void 0!==t.withCredentials?t.withCredentials:this.withCredentials,o=void 0!==t.reportProgress?t.reportProgress:this.reportProgress;let r=t.headers||this.headers,c=t.params||this.params;return void 0!==t.setHeaders&&(r=Object.keys(t.setHeaders).reduce((e,i)=>e.set(i,t.setHeaders[i]),r)),t.setParams&&(c=Object.keys(t.setParams).reduce((e,i)=>e.set(i,t.setParams[i]),c)),new _(e,i,a,{params:c,headers:r,reportProgress:o,responseType:n,withCredentials:s})}}var y=function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t}({});class x{constructor(t,e=200,i="OK"){this.headers=t.headers||new u,this.status=void 0!==t.status?t.status:e,this.statusText=t.statusText||i,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}}class C extends x{constructor(t={}){super(t),this.type=y.ResponseHeader}clone(t={}){return new C({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class O extends x{constructor(t={}){super(t),this.type=y.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new O({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class D extends x{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?"Http failure during parsing for "+(t.url||"(unknown url)"):`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}}function w(t,e){return{body:e,headers:t.headers,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}let M=(()=>{class t{constructor(t){this.handler=t}request(t,e,i={}){let n;if(t instanceof _)n=t;else{let a=void 0;a=i.headers instanceof u?i.headers:new u(i.headers);let s=void 0;i.params&&(s=i.params instanceof f?i.params:new f({fromObject:i.params})),n=new _(t,e,void 0!==i.body?i.body:null,{headers:a,params:s,reportProgress:i.reportProgress,responseType:i.responseType||"json",withCredentials:i.withCredentials})}const s=Object(a.a)(n).pipe(Object(o.a)(t=>this.handler.handle(t)));if(t instanceof _||"events"===i.observe)return s;const l=s.pipe(Object(r.a)(t=>t instanceof O));switch(i.observe||"body"){case"body":switch(n.responseType){case"arraybuffer":return l.pipe(Object(c.a)(t=>{if(null!==t.body&&!(t.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return t.body}));case"blob":return l.pipe(Object(c.a)(t=>{if(null!==t.body&&!(t.body instanceof Blob))throw new Error("Response is not a Blob.");return t.body}));case"text":return l.pipe(Object(c.a)(t=>{if(null!==t.body&&"string"!=typeof t.body)throw new Error("Response is not a string.");return t.body}));case"json":default:return l.pipe(Object(c.a)(t=>t.body))}case"response":return l;default:throw new Error(`Unreachable: unhandled observe type ${i.observe}}`)}}delete(t,e={}){return this.request("DELETE",t,e)}get(t,e={}){return this.request("GET",t,e)}head(t,e={}){return this.request("HEAD",t,e)}jsonp(t,e){return this.request("JSONP",t,{params:(new f).append(e,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,e={}){return this.request("OPTIONS",t,e)}patch(t,e,i={}){return this.request("PATCH",t,w(i,e))}post(t,e,i={}){return this.request("POST",t,w(i,e))}put(t,e,i={}){return this.request("PUT",t,w(i,e))}}return t.\u0275fac=function(e){return new(e||t)(n.ac(d))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();class k{constructor(t,e){this.next=t,this.interceptor=e}handle(t){return this.interceptor.intercept(t,this.next)}}const S=new n.s("HTTP_INTERCEPTORS");let I=(()=>{class t{intercept(t,e){return e.handle(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();const P=/^\)\]\}',?\n/;class V{}let R=(()=>{class t{constructor(){}build(){return new XMLHttpRequest}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})(),j=(()=>{class t{constructor(t){this.xhrFactory=t}handle(t){if("JSONP"===t.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new s.a(e=>{const i=this.xhrFactory.build();if(i.open(t.method,t.urlWithParams),t.withCredentials&&(i.withCredentials=!0),t.headers.forEach((t,e)=>i.setRequestHeader(t,e.join(","))),t.headers.has("Accept")||i.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){const e=t.detectContentTypeHeader();null!==e&&i.setRequestHeader("Content-Type",e)}if(t.responseType){const e=t.responseType.toLowerCase();i.responseType="json"!==e?e:"text"}const n=t.serializeBody();let a=null;const s=()=>{if(null!==a)return a;const e=1223===i.status?204:i.status,n=i.statusText||"OK",s=new u(i.getAllResponseHeaders()),o=function(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(i)||t.url;return a=new C({headers:s,status:e,statusText:n,url:o}),a},o=()=>{let{headers:n,status:a,statusText:o,url:r}=s(),c=null;204!==a&&(c=void 0===i.response?i.responseText:i.response),0===a&&(a=c?200:0);let l=a>=200&&a<300;if("json"===t.responseType&&"string"==typeof c){const t=c;c=c.replace(P,"");try{c=""!==c?JSON.parse(c):null}catch(d){c=t,l&&(l=!1,c={error:d,text:c})}}l?(e.next(new O({body:c,headers:n,status:a,statusText:o,url:r||void 0})),e.complete()):e.error(new D({error:c,headers:n,status:a,statusText:o,url:r||void 0}))},r=t=>{const{url:n}=s(),a=new D({error:t,status:i.status||0,statusText:i.statusText||"Unknown Error",url:n||void 0});e.error(a)};let c=!1;const l=n=>{c||(e.next(s()),c=!0);let a={type:y.DownloadProgress,loaded:n.loaded};n.lengthComputable&&(a.total=n.total),"text"===t.responseType&&i.responseText&&(a.partialText=i.responseText),e.next(a)},d=t=>{let i={type:y.UploadProgress,loaded:t.loaded};t.lengthComputable&&(i.total=t.total),e.next(i)};return i.addEventListener("load",o),i.addEventListener("error",r),t.reportProgress&&(i.addEventListener("progress",l),null!==n&&i.upload&&i.upload.addEventListener("progress",d)),i.send(n),e.next({type:y.Sent}),()=>{i.removeEventListener("error",r),i.removeEventListener("load",o),t.reportProgress&&(i.removeEventListener("progress",l),null!==n&&i.upload&&i.upload.removeEventListener("progress",d)),i.readyState!==i.DONE&&i.abort()}})}}return t.\u0275fac=function(e){return new(e||t)(n.ac(V))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();const A=new n.s("XSRF_COOKIE_NAME"),W=new n.s("XSRF_HEADER_NAME");class T{}let E=(()=>{class t{constructor(t,e,i){this.doc=t,this.platform=e,this.cookieName=i,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=Object(l.M)(t,this.cookieName),this.lastCookieString=t),this.lastToken}}return t.\u0275fac=function(e){return new(e||t)(n.ac(l.e),n.ac(n.F),n.ac(A))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})(),F=(()=>{class t{constructor(t,e){this.tokenService=t,this.headerName=e}intercept(t,e){const i=t.url.toLowerCase();if("GET"===t.method||"HEAD"===t.method||i.startsWith("http://")||i.startsWith("https://"))return e.handle(t);const n=this.tokenService.getToken();return null===n||t.headers.has(this.headerName)||(t=t.clone({headers:t.headers.set(this.headerName,n)})),e.handle(t)}}return t.\u0275fac=function(e){return new(e||t)(n.ac(T),n.ac(W))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})(),L=(()=>{class t{constructor(t,e){this.backend=t,this.injector=e,this.chain=null}handle(t){if(null===this.chain){const t=this.injector.get(S,[]);this.chain=t.reduceRight((t,e)=>new k(t,e),this.backend)}return this.chain.handle(t)}}return t.\u0275fac=function(e){return new(e||t)(n.ac(h),n.ac(n.t))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})(),Q=(()=>{class t{static disable(){return{ngModule:t,providers:[{provide:F,useClass:I}]}}static withOptions(e={}){return{ngModule:t,providers:[e.cookieName?{provide:A,useValue:e.cookieName}:[],e.headerName?{provide:W,useValue:e.headerName}:[]]}}}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},providers:[F,{provide:S,useExisting:F,multi:!0},{provide:T,useClass:E},{provide:A,useValue:"XSRF-TOKEN"},{provide:W,useValue:"X-XSRF-TOKEN"}]}),t})(),N=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},providers:[M,{provide:d,useClass:L},j,{provide:h,useExisting:j},R,{provide:V,useExisting:R}],imports:[[Q.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),t})()},tyNb:function(t,e,i){"use strict";i.d(e,"a",(function(){return Bt})),i.d(e,"b",(function(){return ui})),i.d(e,"c",(function(){return ai})),i.d(e,"d",(function(){return si})),i.d(e,"e",(function(){return ci})),i.d(e,"f",(function(){return oi})),i.d(e,"g",(function(){return yi})),i.d(e,"h",(function(){return li})),i.d(e,"i",(function(){return $e}));var n=i("ofXK"),a=i("fXoL"),s=i("LRne"),o=i("Cfvw"),r=i("2Vo4"),c=i("itXk"),l=i("HDdC");const d=(()=>{function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t})();var h=i("NXyV"),u=i("EY2u"),p=i("XNiG"),b=i("lJxs"),f=i("0EUg"),m=i("pLZG"),g=i("7o/Q"),v=i("4I5i");function _(t){return function(e){return 0===t?Object(u.b)():e.lift(new y(t))}}class y{constructor(t){if(this.total=t,this.total<0)throw new v.a}call(t,e){return e.subscribe(new x(t,this.total))}}class x extends g.a{constructor(t,e){super(t),this.total=e,this.ring=new Array,this.count=0}_next(t){const e=this.ring,i=this.total,n=this.count++;e.length<i?e.push(t):e[n%i]=t}_complete(){const t=this.destination;let e=this.count;if(e>0){const i=this.count>=this.total?this.total:this.count,n=this.ring;for(let a=0;a<i;a++){const a=e++%i;t.next(n[a])}}t.complete()}}function C(t=w){return e=>e.lift(new O(t))}class O{constructor(t){this.errorFactory=t}call(t,e){return e.subscribe(new D(t,this.errorFactory))}}class D extends g.a{constructor(t,e){super(t),this.errorFactory=e,this.hasValue=!1}_next(t){this.hasValue=!0,this.destination.next(t)}_complete(){if(this.hasValue)return this.destination.complete();{let e;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)}}}function w(){return new d}function M(t=null){return e=>e.lift(new k(t))}class k{constructor(t){this.defaultValue=t}call(t,e){return e.subscribe(new S(t,this.defaultValue))}}class S extends g.a{constructor(t,e){super(t),this.defaultValue=e,this.isEmpty=!0}_next(t){this.isEmpty=!1,this.destination.next(t)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}var I=i("SpAZ"),P=i("eIep"),V=i("IzEk"),R=i("JX91");class j{constructor(t,e,i=!1){this.accumulator=t,this.seed=e,this.hasSeed=i}call(t,e){return e.subscribe(new A(t,this.accumulator,this.seed,this.hasSeed))}}class A extends g.a{constructor(t,e,i,n){super(t),this.accumulator=e,this._seed=i,this.hasSeed=n,this.index=0}get seed(){return this._seed}set seed(t){this.hasSeed=!0,this._seed=t}_next(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)}_tryNext(t){const e=this.index++;let i;try{i=this.accumulator(this.seed,t,e)}catch(n){this.destination.error(n)}this.seed=i,this.destination.next(i)}}var W=i("JIr8"),T=i("bOdf");function E(t,e){const i=arguments.length>=2;return n=>n.pipe(t?Object(m.a)((e,i)=>t(e,i,n)):I.a,Object(V.a)(1),i?M(e):C(()=>new d))}var F=i("5+tZ"),L=i("vkgz"),Q=i("nYR2"),N=i("bHdf");class z{constructor(t,e){this.id=t,this.url=e}}class B extends z{constructor(t,e,i="imperative",n=null){super(t,e),this.navigationTrigger=i,this.restoredState=n}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class U extends z{constructor(t,e,i){super(t,e),this.urlAfterRedirects=i}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class $ extends z{constructor(t,e,i){super(t,e),this.reason=i}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class H extends z{constructor(t,e,i){super(t,e),this.error=i}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class G extends z{constructor(t,e,i,n){super(t,e),this.urlAfterRedirects=i,this.state=n}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class X extends z{constructor(t,e,i,n){super(t,e),this.urlAfterRedirects=i,this.state=n}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class q extends z{constructor(t,e,i,n,a){super(t,e),this.urlAfterRedirects=i,this.state=n,this.shouldActivate=a}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class K extends z{constructor(t,e,i,n){super(t,e),this.urlAfterRedirects=i,this.state=n}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Y extends z{constructor(t,e,i,n){super(t,e),this.urlAfterRedirects=i,this.state=n}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class J{constructor(t){this.route=t}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class Z{constructor(t){this.route=t}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class tt{constructor(t){this.snapshot=t}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class et{constructor(t){this.snapshot=t}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class it{constructor(t){this.snapshot=t}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class nt{constructor(t){this.snapshot=t}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class at{constructor(t,e,i){this.routerEvent=t,this.position=e,this.anchor=i}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}class st{constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e[0]:e}return null}getAll(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}}function ot(t){return new st(t)}function rt(t){const e=Error("NavigationCancelingError: "+t);return e.ngNavigationCancelingError=!0,e}function ct(t,e,i){const n=i.path.split("/");if(n.length>t.length)return null;if("full"===i.pathMatch&&(e.hasChildren()||n.length<t.length))return null;const a={};for(let s=0;s<n.length;s++){const e=n[s],i=t[s];if(e.startsWith(":"))a[e.substring(1)]=i;else if(e!==i.path)return null}return{consumed:t.slice(0,n.length),posParams:a}}function lt(t,e){const i=Object.keys(t),n=Object.keys(e);if(!i||!n||i.length!=n.length)return!1;let a;for(let s=0;s<i.length;s++)if(a=i[s],!dt(t[a],e[a]))return!1;return!0}function dt(t,e){if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;const i=[...t].sort(),n=[...e].sort();return i.every((t,e)=>n[e]===t)}return t===e}function ht(t){return Array.prototype.concat.apply([],t)}function ut(t){return t.length>0?t[t.length-1]:null}function pt(t,e){for(const i in t)t.hasOwnProperty(i)&&e(t[i],i)}function bt(t){return Object(a.ub)(t)?t:Object(a.vb)(t)?Object(o.a)(Promise.resolve(t)):Object(s.a)(t)}function ft(t,e,i){return i?function(t,e){return lt(t,e)}(t.queryParams,e.queryParams)&&function t(e,i){if(!_t(e.segments,i.segments))return!1;if(e.numberOfChildren!==i.numberOfChildren)return!1;for(const n in i.children){if(!e.children[n])return!1;if(!t(e.children[n],i.children[n]))return!1}return!0}(t.root,e.root):function(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every(i=>dt(t[i],e[i]))}(t.queryParams,e.queryParams)&&function t(e,i){return function e(i,n,a){if(i.segments.length>a.length)return!!_t(i.segments.slice(0,a.length),a)&&!n.hasChildren();if(i.segments.length===a.length){if(!_t(i.segments,a))return!1;for(const e in n.children){if(!i.children[e])return!1;if(!t(i.children[e],n.children[e]))return!1}return!0}{const t=a.slice(0,i.segments.length),s=a.slice(i.segments.length);return!!_t(i.segments,t)&&!!i.children.primary&&e(i.children.primary,n,s)}}(e,i,i.segments)}(t.root,e.root)}class mt{constructor(t,e,i){this.root=t,this.queryParams=e,this.fragment=i}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=ot(this.queryParams)),this._queryParamMap}toString(){return Ot.serialize(this)}}class gt{constructor(t,e){this.segments=t,this.children=e,this.parent=null,pt(e,(t,e)=>t.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Dt(this)}}class vt{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=ot(this.parameters)),this._parameterMap}toString(){return Pt(this)}}function _t(t,e){return t.length===e.length&&t.every((t,i)=>t.path===e[i].path)}function yt(t,e){let i=[];return pt(t.children,(t,n)=>{"primary"===n&&(i=i.concat(e(t,n)))}),pt(t.children,(t,n)=>{"primary"!==n&&(i=i.concat(e(t,n)))}),i}class xt{}class Ct{parse(t){const e=new Wt(t);return new mt(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){return`${"/"+function t(e,i){if(!e.hasChildren())return Dt(e);if(i){const i=e.children.primary?t(e.children.primary,!1):"",n=[];return pt(e.children,(e,i)=>{"primary"!==i&&n.push(`${i}:${t(e,!1)}`)}),n.length>0?`${i}(${n.join("//")})`:i}{const i=yt(e,(i,n)=>"primary"===n?[t(e.children.primary,!1)]:[`${n}:${t(i,!1)}`]);return 1===Object.keys(e.children).length&&null!=e.children.primary?`${Dt(e)}/${i[0]}`:`${Dt(e)}/(${i.join("//")})`}}(t.root,!0)}${function(t){const e=Object.keys(t).map(e=>{const i=t[e];return Array.isArray(i)?i.map(t=>`${Mt(e)}=${Mt(t)}`).join("&"):`${Mt(e)}=${Mt(i)}`});return e.length?"?"+e.join("&"):""}(t.queryParams)}${"string"==typeof t.fragment?"#"+encodeURI(t.fragment):""}`}}const Ot=new Ct;function Dt(t){return t.segments.map(t=>Pt(t)).join("/")}function wt(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Mt(t){return wt(t).replace(/%3B/gi,";")}function kt(t){return wt(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function St(t){return decodeURIComponent(t)}function It(t){return St(t.replace(/\+/g,"%20"))}function Pt(t){return`${kt(t.path)}${e=t.parameters,Object.keys(e).map(t=>`;${kt(t)}=${kt(e[t])}`).join("")}`;var e}const Vt=/^[^\/()?;=#]+/;function Rt(t){const e=t.match(Vt);return e?e[0]:""}const jt=/^[^=?&#]+/,At=/^[^?&#]+/;class Wt{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new gt([],{}):new gt([],this.parseChildren())}parseQueryParams(){const t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(i.primary=new gt(t,e)),i}parseSegment(){const t=Rt(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);return this.capture(t),new vt(St(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=Rt(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const t=Rt(this.remaining);t&&(i=t,this.capture(i))}t[St(e)]=St(i)}parseQueryParam(t){const e=function(t){const e=t.match(jt);return e?e[0]:""}(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const t=function(t){const e=t.match(At);return e?e[0]:""}(this.remaining);t&&(i=t,this.capture(i))}const n=It(e),a=It(i);if(t.hasOwnProperty(n)){let e=t[n];Array.isArray(e)||(e=[e],t[n]=e),e.push(a)}else t[n]=a}parseParens(t){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const i=Rt(this.remaining),n=this.remaining[i.length];if("/"!==n&&")"!==n&&";"!==n)throw new Error(`Cannot parse url '${this.url}'`);let a=void 0;i.indexOf(":")>-1?(a=i.substr(0,i.indexOf(":")),this.capture(a),this.capture(":")):t&&(a="primary");const s=this.parseChildren();e[a]=1===Object.keys(s).length?s.primary:new gt([],s),this.consumeOptional("//")}return e}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)}capture(t){if(!this.consumeOptional(t))throw new Error(`Expected "${t}".`)}}class Tt{constructor(t){this._root=t}get root(){return this._root.value}parent(t){const e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}children(t){const e=Et(t,this._root);return e?e.children.map(t=>t.value):[]}firstChild(t){const e=Et(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=Ft(t,this._root);return e.length<2?[]:e[e.length-2].children.map(t=>t.value).filter(e=>e!==t)}pathFromRoot(t){return Ft(t,this._root).map(t=>t.value)}}function Et(t,e){if(t===e.value)return e;for(const i of e.children){const e=Et(t,i);if(e)return e}return null}function Ft(t,e){if(t===e.value)return[e];for(const i of e.children){const n=Ft(t,i);if(n.length)return n.unshift(e),n}return[]}class Lt{constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}}function Qt(t){const e={};return t&&t.children.forEach(t=>e[t.value.outlet]=t),e}class Nt extends Tt{constructor(t,e){super(t),this.snapshot=e,Gt(this,t)}toString(){return this.snapshot.toString()}}function zt(t,e){const i=function(t,e){const i=new $t([],{},{},"",{},"primary",e,null,t.root,-1,{});return new Ht("",new Lt(i,[]))}(t,e),n=new r.a([new vt("",{})]),a=new r.a({}),s=new r.a({}),o=new r.a({}),c=new r.a(""),l=new Bt(n,a,o,c,s,"primary",e,i.root);return l.snapshot=i.root,new Nt(new Lt(l,[]),i)}class Bt{constructor(t,e,i,n,a,s,o,r){this.url=t,this.params=e,this.queryParams=i,this.fragment=n,this.data=a,this.outlet=s,this.component=o,this._futureSnapshot=r}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(Object(b.a)(t=>ot(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(Object(b.a)(t=>ot(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function Ut(t,e="emptyOnly"){const i=t.pathFromRoot;let n=0;if("always"!==e)for(n=i.length-1;n>=1;){const t=i[n],e=i[n-1];if(t.routeConfig&&""===t.routeConfig.path)n--;else{if(e.component)break;n--}}return function(t){return t.reduce((t,e)=>({params:Object.assign(Object.assign({},t.params),e.params),data:Object.assign(Object.assign({},t.data),e.data),resolve:Object.assign(Object.assign({},t.resolve),e._resolvedData)}),{params:{},data:{},resolve:{}})}(i.slice(n))}class $t{constructor(t,e,i,n,a,s,o,r,c,l,d){this.url=t,this.params=e,this.queryParams=i,this.fragment=n,this.data=a,this.outlet=s,this.component=o,this.routeConfig=r,this._urlSegment=c,this._lastPathIndex=l,this._resolve=d}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=ot(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=ot(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(t=>t.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class Ht extends Tt{constructor(t,e){super(e),this.url=t,Gt(this,e)}toString(){return Xt(this._root)}}function Gt(t,e){e.value._routerState=t,e.children.forEach(e=>Gt(t,e))}function Xt(t){const e=t.children.length>0?` { ${t.children.map(Xt).join(", ")} } `:"";return`${t.value}${e}`}function qt(t){if(t.snapshot){const e=t.snapshot,i=t._futureSnapshot;t.snapshot=i,lt(e.queryParams,i.queryParams)||t.queryParams.next(i.queryParams),e.fragment!==i.fragment&&t.fragment.next(i.fragment),lt(e.params,i.params)||t.params.next(i.params),function(t,e){if(t.length!==e.length)return!1;for(let i=0;i<t.length;++i)if(!lt(t[i],e[i]))return!1;return!0}(e.url,i.url)||t.url.next(i.url),lt(e.data,i.data)||t.data.next(i.data)}else t.snapshot=t._futureSnapshot,t.data.next(t._futureSnapshot.data)}function Kt(t,e){var i,n;return lt(t.params,e.params)&&_t(i=t.url,n=e.url)&&i.every((t,e)=>lt(t.parameters,n[e].parameters))&&!(!t.parent!=!e.parent)&&(!t.parent||Kt(t.parent,e.parent))}function Yt(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function Jt(t,e,i,n,a){let s={};return n&&pt(n,(t,e)=>{s[e]=Array.isArray(t)?t.map(t=>""+t):""+t}),new mt(i.root===t?e:function t(e,i,n){const a={};return pt(e.children,(e,s)=>{a[s]=e===i?n:t(e,i,n)}),new gt(e.segments,a)}(i.root,t,e),s,a)}class Zt{constructor(t,e,i){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=i,t&&i.length>0&&Yt(i[0]))throw new Error("Root segment cannot have matrix parameters");const n=i.find(t=>"object"==typeof t&&null!=t&&t.outlets);if(n&&n!==ut(i))throw new Error("{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class te{constructor(t,e,i){this.segmentGroup=t,this.processChildren=e,this.index=i}}function ee(t){return"object"==typeof t&&null!=t&&t.outlets?t.outlets.primary:""+t}function ie(t,e,i){if(t||(t=new gt([],{})),0===t.segments.length&&t.hasChildren())return ne(t,e,i);const n=function(t,e,i){let n=0,a=e;const s={match:!1,pathIndex:0,commandIndex:0};for(;a<t.segments.length;){if(n>=i.length)return s;const e=t.segments[a],o=ee(i[n]),r=n<i.length-1?i[n+1]:null;if(a>0&&void 0===o)break;if(o&&r&&"object"==typeof r&&void 0===r.outlets){if(!re(o,r,e))return s;n+=2}else{if(!re(o,{},e))return s;n++}a++}return{match:!0,pathIndex:a,commandIndex:n}}(t,e,i),a=i.slice(n.commandIndex);if(n.match&&n.pathIndex<t.segments.length){const e=new gt(t.segments.slice(0,n.pathIndex),{});return e.children.primary=new gt(t.segments.slice(n.pathIndex),t.children),ne(e,0,a)}return n.match&&0===a.length?new gt(t.segments,{}):n.match&&!t.hasChildren()?ae(t,e,i):n.match?ne(t,0,a):ae(t,e,i)}function ne(t,e,i){if(0===i.length)return new gt(t.segments,{});{const n=function(t){return"object"==typeof t[0]&&null!==t[0]&&t[0].outlets?t[0].outlets:{primary:t}}(i),a={};return pt(n,(i,n)=>{null!==i&&(a[n]=ie(t.children[n],e,i))}),pt(t.children,(t,e)=>{void 0===n[e]&&(a[e]=t)}),new gt(t.segments,a)}}function ae(t,e,i){const n=t.segments.slice(0,e);let a=0;for(;a<i.length;){if("object"==typeof i[a]&&null!==i[a]&&void 0!==i[a].outlets){const t=se(i[a].outlets);return new gt(n,t)}if(0===a&&Yt(i[0])){n.push(new vt(t.segments[e].path,i[0])),a++;continue}const s=ee(i[a]),o=a<i.length-1?i[a+1]:null;s&&o&&Yt(o)?(n.push(new vt(s,oe(o))),a+=2):(n.push(new vt(s,{})),a++)}return new gt(n,{})}function se(t){const e={};return pt(t,(t,i)=>{null!==t&&(e[i]=ae(new gt([],{}),0,t))}),e}function oe(t){const e={};return pt(t,(t,i)=>e[i]=""+t),e}function re(t,e,i){return t==i.path&<(e,i.parameters)}class ce{constructor(t,e,i,n){this.routeReuseStrategy=t,this.futureState=e,this.currState=i,this.forwardEvent=n}activate(t){const e=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,i,t),qt(this.futureState.root),this.activateChildRoutes(e,i,t)}deactivateChildRoutes(t,e,i){const n=Qt(e);t.children.forEach(t=>{const e=t.value.outlet;this.deactivateRoutes(t,n[e],i),delete n[e]}),pt(n,(t,e)=>{this.deactivateRouteAndItsChildren(t,i)})}deactivateRoutes(t,e,i){const n=t.value,a=e?e.value:null;if(n===a)if(n.component){const a=i.getContext(n.outlet);a&&this.deactivateChildRoutes(t,e,a.children)}else this.deactivateChildRoutes(t,e,i);else a&&this.deactivateRouteAndItsChildren(e,i)}deactivateRouteAndItsChildren(t,e){this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)}detachAndStoreRouteSubtree(t,e){const i=e.getContext(t.value.outlet);if(i&&i.outlet){const e=i.outlet.detach(),n=i.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:e,route:t,contexts:n})}}deactivateRouteAndOutlet(t,e){const i=e.getContext(t.value.outlet);if(i){const n=Qt(t),a=t.value.component?i.children:e;pt(n,(t,e)=>this.deactivateRouteAndItsChildren(t,a)),i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated())}}activateChildRoutes(t,e,i){const n=Qt(e);t.children.forEach(t=>{this.activateRoutes(t,n[t.value.outlet],i),this.forwardEvent(new nt(t.value.snapshot))}),t.children.length&&this.forwardEvent(new et(t.value.snapshot))}activateRoutes(t,e,i){const n=t.value,a=e?e.value:null;if(qt(n),n===a)if(n.component){const a=i.getOrCreateContext(n.outlet);this.activateChildRoutes(t,e,a.children)}else this.activateChildRoutes(t,e,i);else if(n.component){const e=i.getOrCreateContext(n.outlet);if(this.routeReuseStrategy.shouldAttach(n.snapshot)){const t=this.routeReuseStrategy.retrieve(n.snapshot);this.routeReuseStrategy.store(n.snapshot,null),e.children.onOutletReAttached(t.contexts),e.attachRef=t.componentRef,e.route=t.route.value,e.outlet&&e.outlet.attach(t.componentRef,t.route.value),le(t.route)}else{const i=function(t){for(let e=t.parent;e;e=e.parent){const t=e.routeConfig;if(t&&t._loadedConfig)return t._loadedConfig;if(t&&t.component)return null}return null}(n.snapshot),a=i?i.module.componentFactoryResolver:null;e.attachRef=null,e.route=n,e.resolver=a,e.outlet&&e.outlet.activateWith(n,a),this.activateChildRoutes(t,null,e.children)}}else this.activateChildRoutes(t,null,i)}}function le(t){qt(t.value),t.children.forEach(le)}class de{constructor(t,e){this.routes=t,this.module=e}}function he(t){return"function"==typeof t}function ue(t){return t instanceof mt}const pe=Symbol("INITIAL_VALUE");function be(){return Object(P.a)(t=>Object(c.a)(...t.map(t=>t.pipe(Object(V.a)(1),Object(R.a)(pe)))).pipe(function(t,e){let i=!1;return arguments.length>=2&&(i=!0),function(n){return n.lift(new j(t,e,i))}}((t,e)=>{let i=!1;return e.reduce((t,n,a)=>{if(t!==pe)return t;if(n===pe&&(i=!0),!i){if(!1===n)return n;if(a===e.length-1||ue(n))return n}return t},t)},pe),Object(m.a)(t=>t!==pe),Object(b.a)(t=>ue(t)?t:!0===t),Object(V.a)(1)))}class fe{constructor(t){this.segmentGroup=t||null}}class me{constructor(t){this.urlTree=t}}function ge(t){return new l.a(e=>e.error(new fe(t)))}function ve(t){return new l.a(e=>e.error(new me(t)))}function _e(t){return new l.a(e=>e.error(new Error(`Only absolute redirects can have named outlets. redirectTo: '${t}'`)))}class ye{constructor(t,e,i,n,s){this.configLoader=e,this.urlSerializer=i,this.urlTree=n,this.config=s,this.allowRedirects=!0,this.ngModule=t.get(a.A)}apply(){return this.expandSegmentGroup(this.ngModule,this.config,this.urlTree.root,"primary").pipe(Object(b.a)(t=>this.createUrlTree(t,this.urlTree.queryParams,this.urlTree.fragment))).pipe(Object(W.a)(t=>{if(t instanceof me)return this.allowRedirects=!1,this.match(t.urlTree);if(t instanceof fe)throw this.noMatchError(t);throw t}))}match(t){return this.expandSegmentGroup(this.ngModule,this.config,t.root,"primary").pipe(Object(b.a)(e=>this.createUrlTree(e,t.queryParams,t.fragment))).pipe(Object(W.a)(t=>{if(t instanceof fe)throw this.noMatchError(t);throw t}))}noMatchError(t){return new Error(`Cannot match any routes. URL Segment: '${t.segmentGroup}'`)}createUrlTree(t,e,i){const n=t.segments.length>0?new gt([],{primary:t}):t;return new mt(n,e,i)}expandSegmentGroup(t,e,i,n){return 0===i.segments.length&&i.hasChildren()?this.expandChildren(t,e,i).pipe(Object(b.a)(t=>new gt([],t))):this.expandSegment(t,i,e,i.segments,n,!0)}expandChildren(t,e,i){return function(t,e){if(0===Object.keys(t).length)return Object(s.a)({});const i=[],n=[],a={};return pt(t,(t,s)=>{const o=e(s,t).pipe(Object(b.a)(t=>a[s]=t));"primary"===s?i.push(o):n.push(o)}),s.a.apply(null,i.concat(n)).pipe(Object(f.a)(),function(t,e){const i=arguments.length>=2;return n=>n.pipe(t?Object(m.a)((e,i)=>t(e,i,n)):I.a,_(1),i?M(e):C(()=>new d))}(),Object(b.a)(()=>a))}(i.children,(i,n)=>this.expandSegmentGroup(t,e,n,i))}expandSegment(t,e,i,n,a,o){return Object(s.a)(...i).pipe(Object(T.a)(r=>this.expandSegmentAgainstRoute(t,e,i,r,n,a,o).pipe(Object(W.a)(t=>{if(t instanceof fe)return Object(s.a)(null);throw t}))),E(t=>!!t),Object(W.a)((t,i)=>{if(t instanceof d||"EmptyError"===t.name){if(this.noLeftoversInUrl(e,n,a))return Object(s.a)(new gt([],{}));throw new fe(e)}throw t}))}noLeftoversInUrl(t,e,i){return 0===e.length&&!t.children[i]}expandSegmentAgainstRoute(t,e,i,n,a,s,o){return De(n)!==s?ge(e):void 0===n.redirectTo?this.matchSegmentAgainstRoute(t,e,n,a):o&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,i,n,a,s):ge(e)}expandSegmentAgainstRouteUsingRedirect(t,e,i,n,a,s){return"**"===n.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,i,n,s):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,i,n,a,s)}expandWildCardWithParamsAgainstRouteUsingRedirect(t,e,i,n){const a=this.applyRedirectCommands([],i.redirectTo,{});return i.redirectTo.startsWith("/")?ve(a):this.lineralizeSegments(i,a).pipe(Object(F.a)(i=>{const a=new gt(i,{});return this.expandSegment(t,a,e,i,n,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(t,e,i,n,a,s){const{matched:o,consumedSegments:r,lastChild:c,positionalParamSegments:l}=xe(e,n,a);if(!o)return ge(e);const d=this.applyRedirectCommands(r,n.redirectTo,l);return n.redirectTo.startsWith("/")?ve(d):this.lineralizeSegments(n,d).pipe(Object(F.a)(n=>this.expandSegment(t,e,i,n.concat(a.slice(c)),s,!1)))}matchSegmentAgainstRoute(t,e,i,n){if("**"===i.path)return i.loadChildren?this.configLoader.load(t.injector,i).pipe(Object(b.a)(t=>(i._loadedConfig=t,new gt(n,{})))):Object(s.a)(new gt(n,{}));const{matched:a,consumedSegments:o,lastChild:r}=xe(e,i,n);if(!a)return ge(e);const c=n.slice(r);return this.getChildConfig(t,i,n).pipe(Object(F.a)(t=>{const i=t.module,n=t.routes,{segmentGroup:a,slicedSegments:r}=function(t,e,i,n){return i.length>0&&function(t,e,i){return i.some(i=>Oe(t,e,i)&&"primary"!==De(i))}(t,i,n)?{segmentGroup:Ce(new gt(e,function(t,e){const i={};i.primary=e;for(const n of t)""===n.path&&"primary"!==De(n)&&(i[De(n)]=new gt([],{}));return i}(n,new gt(i,t.children)))),slicedSegments:[]}:0===i.length&&function(t,e,i){return i.some(i=>Oe(t,e,i))}(t,i,n)?{segmentGroup:Ce(new gt(t.segments,function(t,e,i,n){const a={};for(const s of i)Oe(t,e,s)&&!n[De(s)]&&(a[De(s)]=new gt([],{}));return Object.assign(Object.assign({},n),a)}(t,i,n,t.children))),slicedSegments:i}:{segmentGroup:t,slicedSegments:i}}(e,o,c,n);return 0===r.length&&a.hasChildren()?this.expandChildren(i,n,a).pipe(Object(b.a)(t=>new gt(o,t))):0===n.length&&0===r.length?Object(s.a)(new gt(o,{})):this.expandSegment(i,a,n,r,"primary",!0).pipe(Object(b.a)(t=>new gt(o.concat(t.segments),t.children)))}))}getChildConfig(t,e,i){return e.children?Object(s.a)(new de(e.children,t)):e.loadChildren?void 0!==e._loadedConfig?Object(s.a)(e._loadedConfig):this.runCanLoadGuards(t.injector,e,i).pipe(Object(F.a)(i=>i?this.configLoader.load(t.injector,e).pipe(Object(b.a)(t=>(e._loadedConfig=t,t))):function(t){return new l.a(e=>e.error(rt(`Cannot load children because the guard of the route "path: '${t.path}'" returned false`)))}(e))):Object(s.a)(new de([],t))}runCanLoadGuards(t,e,i){const n=e.canLoad;if(!n||0===n.length)return Object(s.a)(!0);const a=n.map(n=>{const a=t.get(n);let s;if(function(t){return t&&he(t.canLoad)}(a))s=a.canLoad(e,i);else{if(!he(a))throw new Error("Invalid CanLoad guard");s=a(e,i)}return bt(s)});return Object(s.a)(a).pipe(be(),Object(L.a)(t=>{if(!ue(t))return;const e=rt(`Redirecting to "${this.urlSerializer.serialize(t)}"`);throw e.url=t,e}),Object(b.a)(t=>!0===t))}lineralizeSegments(t,e){let i=[],n=e.root;for(;;){if(i=i.concat(n.segments),0===n.numberOfChildren)return Object(s.a)(i);if(n.numberOfChildren>1||!n.children.primary)return _e(t.redirectTo);n=n.children.primary}}applyRedirectCommands(t,e,i){return this.applyRedirectCreatreUrlTree(e,this.urlSerializer.parse(e),t,i)}applyRedirectCreatreUrlTree(t,e,i,n){const a=this.createSegmentGroup(t,e.root,i,n);return new mt(a,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const i={};return pt(t,(t,n)=>{if("string"==typeof t&&t.startsWith(":")){const a=t.substring(1);i[n]=e[a]}else i[n]=t}),i}createSegmentGroup(t,e,i,n){const a=this.createSegments(t,e.segments,i,n);let s={};return pt(e.children,(e,a)=>{s[a]=this.createSegmentGroup(t,e,i,n)}),new gt(a,s)}createSegments(t,e,i,n){return e.map(e=>e.path.startsWith(":")?this.findPosParam(t,e,n):this.findOrReturn(e,i))}findPosParam(t,e,i){const n=i[e.path.substring(1)];if(!n)throw new Error(`Cannot redirect to '${t}'. Cannot find '${e.path}'.`);return n}findOrReturn(t,e){let i=0;for(const n of e){if(n.path===t.path)return e.splice(i),n;i++}return t}}function xe(t,e,i){if(""===e.path)return"full"===e.pathMatch&&(t.hasChildren()||i.length>0)?{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}:{matched:!0,consumedSegments:[],lastChild:0,positionalParamSegments:{}};const n=(e.matcher||ct)(i,t,e);return n?{matched:!0,consumedSegments:n.consumed,lastChild:n.consumed.length,positionalParamSegments:n.posParams}:{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}}function Ce(t){if(1===t.numberOfChildren&&t.children.primary){const e=t.children.primary;return new gt(t.segments.concat(e.segments),e.children)}return t}function Oe(t,e,i){return(!(t.hasChildren()||e.length>0)||"full"!==i.pathMatch)&&""===i.path&&void 0!==i.redirectTo}function De(t){return t.outlet||"primary"}class we{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class Me{constructor(t,e){this.component=t,this.route=e}}function ke(t,e,i){const n=t._root;return function t(e,i,n,a,s={canDeactivateChecks:[],canActivateChecks:[]}){const o=Qt(i);return e.children.forEach(e=>{!function(e,i,n,a,s={canDeactivateChecks:[],canActivateChecks:[]}){const o=e.value,r=i?i.value:null,c=n?n.getContext(e.value.outlet):null;if(r&&o.routeConfig===r.routeConfig){const l=function(t,e,i){if("function"==typeof i)return i(t,e);switch(i){case"pathParamsChange":return!_t(t.url,e.url);case"pathParamsOrQueryParamsChange":return!_t(t.url,e.url)||!lt(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Kt(t,e)||!lt(t.queryParams,e.queryParams);case"paramsChange":default:return!Kt(t,e)}}(r,o,o.routeConfig.runGuardsAndResolvers);l?s.canActivateChecks.push(new we(a)):(o.data=r.data,o._resolvedData=r._resolvedData),t(e,i,o.component?c?c.children:null:n,a,s),l&&c&&c.outlet&&c.outlet.isActivated&&s.canDeactivateChecks.push(new Me(c.outlet.component,r))}else r&&Ie(i,c,s),s.canActivateChecks.push(new we(a)),t(e,null,o.component?c?c.children:null:n,a,s)}(e,o[e.value.outlet],n,a.concat([e.value]),s),delete o[e.value.outlet]}),pt(o,(t,e)=>Ie(t,n.getContext(e),s)),s}(n,e?e._root:null,i,[n.value])}function Se(t,e,i){const n=function(t){if(!t)return null;for(let e=t.parent;e;e=e.parent){const t=e.routeConfig;if(t&&t._loadedConfig)return t._loadedConfig}return null}(e);return(n?n.module.injector:i).get(t)}function Ie(t,e,i){const n=Qt(t),a=t.value;pt(n,(t,n)=>{Ie(t,a.component?e?e.children.getContext(n):null:e,i)}),i.canDeactivateChecks.push(new Me(a.component&&e&&e.outlet&&e.outlet.isActivated?e.outlet.component:null,a))}function Pe(t,e){return null!==t&&e&&e(new it(t)),Object(s.a)(!0)}function Ve(t,e){return null!==t&&e&&e(new tt(t)),Object(s.a)(!0)}function Re(t,e,i){const n=e.routeConfig?e.routeConfig.canActivate:null;if(!n||0===n.length)return Object(s.a)(!0);const a=n.map(n=>Object(h.a)(()=>{const a=Se(n,e,i);let s;if(function(t){return t&&he(t.canActivate)}(a))s=bt(a.canActivate(e,t));else{if(!he(a))throw new Error("Invalid CanActivate guard");s=bt(a(e,t))}return s.pipe(E())}));return Object(s.a)(a).pipe(be())}function je(t,e,i){const n=e[e.length-1],a=e.slice(0,e.length-1).reverse().map(t=>function(t){const e=t.routeConfig?t.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:t,guards:e}:null}(t)).filter(t=>null!==t).map(e=>Object(h.a)(()=>{const a=e.guards.map(a=>{const s=Se(a,e.node,i);let o;if(function(t){return t&&he(t.canActivateChild)}(s))o=bt(s.canActivateChild(n,t));else{if(!he(s))throw new Error("Invalid CanActivateChild guard");o=bt(s(n,t))}return o.pipe(E())});return Object(s.a)(a).pipe(be())}));return Object(s.a)(a).pipe(be())}class Ae{}class We{constructor(t,e,i,n,a,s){this.rootComponentType=t,this.config=e,this.urlTree=i,this.url=n,this.paramsInheritanceStrategy=a,this.relativeLinkResolution=s}recognize(){try{const t=Fe(this.urlTree.root,[],[],this.config,this.relativeLinkResolution).segmentGroup,e=this.processSegmentGroup(this.config,t,"primary"),i=new $t([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},"primary",this.rootComponentType,null,this.urlTree.root,-1,{}),n=new Lt(i,e),a=new Ht(this.url,n);return this.inheritParamsAndData(a._root),Object(s.a)(a)}catch(t){return new l.a(e=>e.error(t))}}inheritParamsAndData(t){const e=t.value,i=Ut(e,this.paramsInheritanceStrategy);e.params=Object.freeze(i.params),e.data=Object.freeze(i.data),t.children.forEach(t=>this.inheritParamsAndData(t))}processSegmentGroup(t,e,i){return 0===e.segments.length&&e.hasChildren()?this.processChildren(t,e):this.processSegment(t,e,e.segments,i)}processChildren(t,e){const i=yt(e,(e,i)=>this.processSegmentGroup(t,e,i));return function(t){const e={};t.forEach(t=>{const i=e[t.value.outlet];if(i){const e=i.url.map(t=>t.toString()).join("/"),n=t.value.url.map(t=>t.toString()).join("/");throw new Error(`Two segments cannot have the same outlet name: '${e}' and '${n}'.`)}e[t.value.outlet]=t.value})}(i),i.sort((t,e)=>"primary"===t.value.outlet?-1:"primary"===e.value.outlet?1:t.value.outlet.localeCompare(e.value.outlet)),i}processSegment(t,e,i,n){for(const s of t)try{return this.processSegmentAgainstRoute(s,e,i,n)}catch(a){if(!(a instanceof Ae))throw a}if(this.noLeftoversInUrl(e,i,n))return[];throw new Ae}noLeftoversInUrl(t,e,i){return 0===e.length&&!t.children[i]}processSegmentAgainstRoute(t,e,i,n){if(t.redirectTo)throw new Ae;if((t.outlet||"primary")!==n)throw new Ae;let a,s=[],o=[];if("**"===t.path){const s=i.length>0?ut(i).parameters:{};a=new $t(i,s,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,Ne(t),n,t.component,t,Te(e),Ee(e)+i.length,ze(t))}else{const r=function(t,e,i){if(""===e.path){if("full"===e.pathMatch&&(t.hasChildren()||i.length>0))throw new Ae;return{consumedSegments:[],lastChild:0,parameters:{}}}const n=(e.matcher||ct)(i,t,e);if(!n)throw new Ae;const a={};pt(n.posParams,(t,e)=>{a[e]=t.path});const s=n.consumed.length>0?Object.assign(Object.assign({},a),n.consumed[n.consumed.length-1].parameters):a;return{consumedSegments:n.consumed,lastChild:n.consumed.length,parameters:s}}(e,t,i);s=r.consumedSegments,o=i.slice(r.lastChild),a=new $t(s,r.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,Ne(t),n,t.component,t,Te(e),Ee(e)+s.length,ze(t))}const r=function(t){return t.children?t.children:t.loadChildren?t._loadedConfig.routes:[]}(t),{segmentGroup:c,slicedSegments:l}=Fe(e,s,o,r,this.relativeLinkResolution);if(0===l.length&&c.hasChildren()){const t=this.processChildren(r,c);return[new Lt(a,t)]}if(0===r.length&&0===l.length)return[new Lt(a,[])];const d=this.processSegment(r,c,l,"primary");return[new Lt(a,d)]}}function Te(t){let e=t;for(;e._sourceSegment;)e=e._sourceSegment;return e}function Ee(t){let e=t,i=e._segmentIndexShift?e._segmentIndexShift:0;for(;e._sourceSegment;)e=e._sourceSegment,i+=e._segmentIndexShift?e._segmentIndexShift:0;return i-1}function Fe(t,e,i,n,a){if(i.length>0&&function(t,e,i){return i.some(i=>Le(t,e,i)&&"primary"!==Qe(i))}(t,i,n)){const a=new gt(e,function(t,e,i,n){const a={};a.primary=n,n._sourceSegment=t,n._segmentIndexShift=e.length;for(const s of i)if(""===s.path&&"primary"!==Qe(s)){const i=new gt([],{});i._sourceSegment=t,i._segmentIndexShift=e.length,a[Qe(s)]=i}return a}(t,e,n,new gt(i,t.children)));return a._sourceSegment=t,a._segmentIndexShift=e.length,{segmentGroup:a,slicedSegments:[]}}if(0===i.length&&function(t,e,i){return i.some(i=>Le(t,e,i))}(t,i,n)){const s=new gt(t.segments,function(t,e,i,n,a,s){const o={};for(const r of n)if(Le(t,i,r)&&!a[Qe(r)]){const i=new gt([],{});i._sourceSegment=t,i._segmentIndexShift="legacy"===s?t.segments.length:e.length,o[Qe(r)]=i}return Object.assign(Object.assign({},a),o)}(t,e,i,n,t.children,a));return s._sourceSegment=t,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:i}}const s=new gt(t.segments,t.children);return s._sourceSegment=t,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:i}}function Le(t,e,i){return(!(t.hasChildren()||e.length>0)||"full"!==i.pathMatch)&&""===i.path&&void 0===i.redirectTo}function Qe(t){return t.outlet||"primary"}function Ne(t){return t.data||{}}function ze(t){return t.resolve||{}}function Be(t){return function(e){return e.pipe(Object(P.a)(e=>{const i=t(e);return i?Object(o.a)(i).pipe(Object(b.a)(()=>e)):Object(o.a)([e])}))}}class Ue extends class{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}{}let $e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=a.Kb({type:t,selectors:[["ng-component"]],decls:1,vars:0,template:function(t,e){1&t&&a.Rb(0,"router-outlet")},directives:function(){return[li]},encapsulation:2}),t})();function He(t,e=""){for(let i=0;i<t.length;i++){const n=t[i];Ge(n,Xe(e,n))}}function Ge(t,e){if(!t)throw new Error(`\n Invalid configuration of route '${e}': Encountered undefined route.\n The reason might be an extra comma.\n\n Example:\n const routes: Routes = [\n { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n { path: 'dashboard', component: DashboardComponent },, << two commas\n { path: 'detail/:id', component: HeroDetailComponent }\n ];\n `);if(Array.isArray(t))throw new Error(`Invalid configuration of route '${e}': Array cannot be specified`);if(!t.component&&!t.children&&!t.loadChildren&&t.outlet&&"primary"!==t.outlet)throw new Error(`Invalid configuration of route '${e}': a componentless route without children or loadChildren cannot have a named outlet set`);if(t.redirectTo&&t.children)throw new Error(`Invalid configuration of route '${e}': redirectTo and children cannot be used together`);if(t.redirectTo&&t.loadChildren)throw new Error(`Invalid configuration of route '${e}': redirectTo and loadChildren cannot be used together`);if(t.children&&t.loadChildren)throw new Error(`Invalid configuration of route '${e}': children and loadChildren cannot be used together`);if(t.redirectTo&&t.component)throw new Error(`Invalid configuration of route '${e}': redirectTo and component cannot be used together`);if(t.path&&t.matcher)throw new Error(`Invalid configuration of route '${e}': path and matcher cannot be used together`);if(void 0===t.redirectTo&&!t.component&&!t.children&&!t.loadChildren)throw new Error(`Invalid configuration of route '${e}'. One of the following must be provided: component, redirectTo, children or loadChildren`);if(void 0===t.path&&void 0===t.matcher)throw new Error(`Invalid configuration of route '${e}': routes must have either a path or a matcher specified`);if("string"==typeof t.path&&"/"===t.path.charAt(0))throw new Error(`Invalid configuration of route '${e}': path cannot start with a slash`);if(""===t.path&&void 0!==t.redirectTo&&void 0===t.pathMatch)throw new Error(`Invalid configuration of route '{path: "${e}", redirectTo: "${t.redirectTo}"}': please provide 'pathMatch'. The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`);if(void 0!==t.pathMatch&&"full"!==t.pathMatch&&"prefix"!==t.pathMatch)throw new Error(`Invalid configuration of route '${e}': pathMatch can only be set to 'prefix' or 'full'`);t.children&&He(t.children,e)}function Xe(t,e){return e?t||e.path?t&&!e.path?t+"/":!t&&e.path?e.path:`${t}/${e.path}`:"":t}function qe(t){const e=t.children&&t.children.map(qe),i=e?Object.assign(Object.assign({},t),{children:e}):Object.assign({},t);return!i.component&&(e||i.loadChildren)&&i.outlet&&"primary"!==i.outlet&&(i.component=$e),i}const Ke=new a.s("ROUTES");class Ye{constructor(t,e,i,n){this.loader=t,this.compiler=e,this.onLoadStartListener=i,this.onLoadEndListener=n}load(t,e){return this.onLoadStartListener&&this.onLoadStartListener(e),this.loadModuleFactory(e.loadChildren).pipe(Object(b.a)(i=>{this.onLoadEndListener&&this.onLoadEndListener(e);const n=i.create(t);return new de(ht(n.injector.get(Ke)).map(qe),n)}))}loadModuleFactory(t){return"string"==typeof t?Object(o.a)(this.loader.load(t)):bt(t()).pipe(Object(F.a)(t=>t instanceof a.y?Object(s.a)(t):Object(o.a)(this.compiler.compileModuleAsync(t))))}}class Je{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.children=new Ze,this.attachRef=null}}class Ze{constructor(){this.contexts=new Map}onChildOutletCreated(t,e){const i=this.getOrCreateContext(t);i.outlet=e,this.contexts.set(t,i)}onChildOutletDestroyed(t){const e=this.getContext(t);e&&(e.outlet=null)}onOutletDeactivated(){const t=this.contexts;return this.contexts=new Map,t}onOutletReAttached(t){this.contexts=t}getOrCreateContext(t){let e=this.getContext(t);return e||(e=new Je,this.contexts.set(t,e)),e}getContext(t){return this.contexts.get(t)||null}}class ti{shouldProcessUrl(t){return!0}extract(t){return t}merge(t,e){return t}}function ei(t){throw t}function ii(t,e,i){return e.parse("/")}function ni(t,e){return Object(s.a)(null)}let ai=(()=>{class t{constructor(t,e,i,n,s,o,c,l){this.rootComponentType=t,this.urlSerializer=e,this.rootContexts=i,this.location=n,this.config=l,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.lastLocationChangeInfo=null,this.navigationId=0,this.isNgZoneEnabled=!1,this.events=new p.a,this.errorHandler=ei,this.malformedUriErrorHandler=ii,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:ni,afterPreactivation:ni},this.urlHandlingStrategy=new ti,this.routeReuseStrategy=new Ue,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="legacy",this.ngModule=s.get(a.A),this.console=s.get(a.cb);const d=s.get(a.C);this.isNgZoneEnabled=d instanceof a.C,this.resetConfig(l),this.currentUrlTree=new mt(new gt([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new Ye(o,c,t=>this.triggerEvent(new J(t)),t=>this.triggerEvent(new Z(t))),this.routerState=zt(this.currentUrlTree,this.rootComponentType),this.transitions=new r.a({id: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()}setupNavigations(t){const e=this.events;return t.pipe(Object(m.a)(t=>0!==t.id),Object(b.a)(t=>Object.assign(Object.assign({},t),{extractedUrl:this.urlHandlingStrategy.extract(t.rawUrl)})),Object(P.a)(t=>{let i=!1,n=!1;return Object(s.a)(t).pipe(Object(L.a)(t=>{this.currentNavigation={id:t.id,initialUrl:t.currentRawUrl,extractedUrl:t.extractedUrl,trigger:t.source,extras:t.extras,previousNavigation:this.lastSuccessfulNavigation?Object.assign(Object.assign({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),Object(P.a)(t=>{const i=!this.navigated||t.extractedUrl.toString()!==this.browserUrlTree.toString();if(("reload"===this.onSameUrlNavigation||i)&&this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl))return Object(s.a)(t).pipe(Object(P.a)(t=>{const i=this.transitions.getValue();return e.next(new B(t.id,this.serializeUrl(t.extractedUrl),t.source,t.restoredState)),i!==this.transitions.getValue()?u.a:[t]}),Object(P.a)(t=>Promise.resolve(t)),(n=this.ngModule.injector,a=this.configLoader,o=this.urlSerializer,r=this.config,function(t){return t.pipe(Object(P.a)(t=>function(t,e,i,n,a){return new ye(t,e,i,n,a).apply()}(n,a,o,t.extractedUrl,r).pipe(Object(b.a)(e=>Object.assign(Object.assign({},t),{urlAfterRedirects:e})))))}),Object(L.a)(t=>{this.currentNavigation=Object.assign(Object.assign({},this.currentNavigation),{finalUrl:t.urlAfterRedirects})}),function(t,e,i,n,a){return function(s){return s.pipe(Object(F.a)(s=>function(t,e,i,n,a="emptyOnly",s="legacy"){return new We(t,e,i,n,a,s).recognize()}(t,e,s.urlAfterRedirects,i(s.urlAfterRedirects),n,a).pipe(Object(b.a)(t=>Object.assign(Object.assign({},s),{targetSnapshot:t})))))}}(this.rootComponentType,this.config,t=>this.serializeUrl(t),this.paramsInheritanceStrategy,this.relativeLinkResolution),Object(L.a)(t=>{"eager"===this.urlUpdateStrategy&&(t.extras.skipLocationChange||this.setBrowserUrl(t.urlAfterRedirects,!!t.extras.replaceUrl,t.id,t.extras.state),this.browserUrlTree=t.urlAfterRedirects)}),Object(L.a)(t=>{const i=new G(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.next(i)}));var n,a,o,r;if(i&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)){const{id:i,extractedUrl:n,source:a,restoredState:o,extras:r}=t,c=new B(i,this.serializeUrl(n),a,o);e.next(c);const l=zt(n,this.rootComponentType).snapshot;return Object(s.a)(Object.assign(Object.assign({},t),{targetSnapshot:l,urlAfterRedirects:n,extras:Object.assign(Object.assign({},r),{skipLocationChange:!1,replaceUrl:!1})}))}return this.rawUrlTree=t.rawUrl,this.browserUrlTree=t.urlAfterRedirects,t.resolve(null),u.a}),Be(t=>{const{targetSnapshot:e,id:i,extractedUrl:n,rawUrl:a,extras:{skipLocationChange:s,replaceUrl:o}}=t;return this.hooks.beforePreactivation(e,{navigationId:i,appliedUrlTree:n,rawUrlTree:a,skipLocationChange:!!s,replaceUrl:!!o})}),Object(L.a)(t=>{const e=new X(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}),Object(b.a)(t=>Object.assign(Object.assign({},t),{guards:ke(t.targetSnapshot,t.currentSnapshot,this.rootContexts)})),function(t,e){return function(i){return i.pipe(Object(F.a)(i=>{const{targetSnapshot:n,currentSnapshot:a,guards:{canActivateChecks:r,canDeactivateChecks:c}}=i;return 0===c.length&&0===r.length?Object(s.a)(Object.assign(Object.assign({},i),{guardsResult:!0})):function(t,e,i,n){return Object(o.a)(t).pipe(Object(F.a)(t=>function(t,e,i,n,a){const o=e&&e.routeConfig?e.routeConfig.canDeactivate:null;if(!o||0===o.length)return Object(s.a)(!0);const r=o.map(s=>{const o=Se(s,e,a);let r;if(function(t){return t&&he(t.canDeactivate)}(o))r=bt(o.canDeactivate(t,e,i,n));else{if(!he(o))throw new Error("Invalid CanDeactivate guard");r=bt(o(t,e,i,n))}return r.pipe(E())});return Object(s.a)(r).pipe(be())}(t.component,t.route,i,e,n)),E(t=>!0!==t,!0))}(c,n,a,t).pipe(Object(F.a)(i=>i&&"boolean"==typeof i?function(t,e,i,n){return Object(o.a)(e).pipe(Object(T.a)(e=>Object(o.a)([Ve(e.route.parent,n),Pe(e.route,n),je(t,e.path,i),Re(t,e.route,i)]).pipe(Object(f.a)(),E(t=>!0!==t,!0))),E(t=>!0!==t,!0))}(n,r,t,e):Object(s.a)(i)),Object(b.a)(t=>Object.assign(Object.assign({},i),{guardsResult:t})))}))}}(this.ngModule.injector,t=>this.triggerEvent(t)),Object(L.a)(t=>{if(ue(t.guardsResult)){const e=rt(`Redirecting to "${this.serializeUrl(t.guardsResult)}"`);throw e.url=t.guardsResult,e}}),Object(L.a)(t=>{const e=new q(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot,!!t.guardsResult);this.triggerEvent(e)}),Object(m.a)(t=>{if(!t.guardsResult){this.resetUrlToCurrentUrlTree();const i=new $(t.id,this.serializeUrl(t.extractedUrl),"");return e.next(i),t.resolve(!1),!1}return!0}),Be(t=>{if(t.guards.canActivateChecks.length)return Object(s.a)(t).pipe(Object(L.a)(t=>{const e=new K(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}),Object(P.a)(t=>{let i=!1;return Object(s.a)(t).pipe((n=this.paramsInheritanceStrategy,a=this.ngModule.injector,function(t){return t.pipe(Object(F.a)(t=>{const{targetSnapshot:e,guards:{canActivateChecks:i}}=t;if(!i.length)return Object(s.a)(t);let r=0;return Object(o.a)(i).pipe(Object(T.a)(t=>function(t,e,i,n){return function(t,e,i,n){const a=Object.keys(t);if(0===a.length)return Object(s.a)({});const r={};return Object(o.a)(a).pipe(Object(F.a)(a=>function(t,e,i,n){const a=Se(t,e,n);return bt(a.resolve?a.resolve(e,i):a(e,i))}(t[a],e,i,n).pipe(Object(L.a)(t=>{r[a]=t}))),_(1),Object(F.a)(()=>Object.keys(r).length===a.length?Object(s.a)(r):u.a))}(t._resolve,t,e,n).pipe(Object(b.a)(e=>(t._resolvedData=e,t.data=Object.assign(Object.assign({},t.data),Ut(t,i).resolve),null)))}(t.route,e,n,a)),Object(L.a)(()=>r++),_(1),Object(F.a)(e=>r===i.length?Object(s.a)(t):u.a))}))}),Object(L.a)({next:()=>i=!0,complete:()=>{if(!i){const i=new $(t.id,this.serializeUrl(t.extractedUrl),"At least one route resolver didn't emit any value.");e.next(i),t.resolve(!1)}}}));var n,a}),Object(L.a)(t=>{const e=new Y(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}))}),Be(t=>{const{targetSnapshot:e,id:i,extractedUrl:n,rawUrl:a,extras:{skipLocationChange:s,replaceUrl:o}}=t;return this.hooks.afterPreactivation(e,{navigationId:i,appliedUrlTree:n,rawUrlTree:a,skipLocationChange:!!s,replaceUrl:!!o})}),Object(b.a)(t=>{const e=function(t,e,i){const n=function t(e,i,n){if(n&&e.shouldReuseRoute(i.value,n.value.snapshot)){const a=n.value;a._futureSnapshot=i.value;const s=function(e,i,n){return i.children.map(i=>{for(const a of n.children)if(e.shouldReuseRoute(a.value.snapshot,i.value))return t(e,i,a);return t(e,i)})}(e,i,n);return new Lt(a,s)}{const n=e.retrieve(i.value);if(n){const t=n.route;return function t(e,i){if(e.value.routeConfig!==i.value.routeConfig)throw new Error("Cannot reattach ActivatedRouteSnapshot created from a different route");if(e.children.length!==i.children.length)throw new Error("Cannot reattach ActivatedRouteSnapshot with a different number of children");i.value._futureSnapshot=e.value;for(let n=0;n<e.children.length;++n)t(e.children[n],i.children[n])}(i,t),t}{const n=new Bt(new r.a((a=i.value).url),new r.a(a.params),new r.a(a.queryParams),new r.a(a.fragment),new r.a(a.data),a.outlet,a.component,a),s=i.children.map(i=>t(e,i));return new Lt(n,s)}}var a}(t,e._root,i?i._root:void 0);return new Nt(n,e)}(this.routeReuseStrategy,t.targetSnapshot,t.currentRouterState);return Object.assign(Object.assign({},t),{targetRouterState:e})}),Object(L.a)(t=>{this.currentUrlTree=t.urlAfterRedirects,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,t.rawUrl),this.routerState=t.targetRouterState,"deferred"===this.urlUpdateStrategy&&(t.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,!!t.extras.replaceUrl,t.id,t.extras.state),this.browserUrlTree=t.urlAfterRedirects)}),(a=this.rootContexts,c=this.routeReuseStrategy,l=t=>this.triggerEvent(t),Object(b.a)(t=>(new ce(c,t.targetRouterState,t.currentRouterState,l).activate(a),t))),Object(L.a)({next(){i=!0},complete(){i=!0}}),Object(Q.a)(()=>{if(!i&&!n){this.resetUrlToCurrentUrlTree();const i=new $(t.id,this.serializeUrl(t.extractedUrl),`Navigation ID ${t.id} is not equal to the current navigation id ${this.navigationId}`);e.next(i),t.resolve(!1)}this.currentNavigation=null}),Object(W.a)(i=>{if(n=!0,(a=i)&&a.ngNavigationCancelingError){const n=ue(i.url);n||(this.navigated=!0,this.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl));const a=new $(t.id,this.serializeUrl(t.extractedUrl),i.message);e.next(a),n?setTimeout(()=>{const e=this.urlHandlingStrategy.merge(i.url,this.rawUrlTree);return this.scheduleNavigation(e,"imperative",null,{skipLocationChange:t.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy},{resolve:t.resolve,reject:t.reject,promise:t.promise})},0):t.resolve(!1)}else{this.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl);const n=new H(t.id,this.serializeUrl(t.extractedUrl),i);e.next(n);try{t.resolve(this.errorHandler(i))}catch(s){t.reject(s)}}var a;return u.a}));var a,c,l}))}resetRootComponentType(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType}getTransition(){const t=this.transitions.value;return t.urlAfterRedirects=this.browserUrlTree,t}setTransition(t){this.transitions.next(Object.assign(Object.assign({},this.getTransition()),t))}initialNavigation(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(t=>{const e=this.extractLocationChangeInfoFromEvent(t);this.shouldScheduleNavigation(this.lastLocationChangeInfo,e)&&setTimeout(()=>{const{source:t,state:i,urlTree:n}=e,a={replaceUrl:!0};if(i){const t=Object.assign({},i);delete t.navigationId,0!==Object.keys(t).length&&(a.state=t)}this.scheduleNavigation(n,t,i,a)},0),this.lastLocationChangeInfo=e}))}extractLocationChangeInfoFromEvent(t){var e;return{source:"popstate"===t.type?"popstate":"hashchange",urlTree:this.parseUrl(t.url),state:(null===(e=t.state)||void 0===e?void 0:e.navigationId)?t.state:null,transitionId:this.getTransition().id}}shouldScheduleNavigation(t,e){if(!t)return!0;const i=e.urlTree.toString()===t.urlTree.toString();return!(e.transitionId===t.transitionId&&i&&("hashchange"===e.source&&"popstate"===t.source||"popstate"===e.source&&"hashchange"===t.source))}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.currentNavigation}triggerEvent(t){this.events.next(t)}resetConfig(t){He(t),this.config=t.map(qe),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0)}createUrlTree(t,e={}){const{relativeTo:i,queryParams:n,fragment:s,preserveQueryParams:o,queryParamsHandling:r,preserveFragment:c}=e;Object(a.Z)()&&o&&console&&console.warn&&console.warn("preserveQueryParams is deprecated, use queryParamsHandling instead.");const l=i||this.routerState.root,d=c?this.currentUrlTree.fragment:s;let h=null;if(r)switch(r){case"merge":h=Object.assign(Object.assign({},this.currentUrlTree.queryParams),n);break;case"preserve":h=this.currentUrlTree.queryParams;break;default:h=n||null}else h=o?this.currentUrlTree.queryParams:n||null;return null!==h&&(h=this.removeEmptyProps(h)),function(t,e,i,n,a){if(0===i.length)return Jt(e.root,e.root,e,n,a);const s=function(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new Zt(!0,0,t);let e=0,i=!1;const n=t.reduce((t,n,a)=>{if("object"==typeof n&&null!=n){if(n.outlets){const e={};return pt(n.outlets,(t,i)=>{e[i]="string"==typeof t?t.split("/"):t}),[...t,{outlets:e}]}if(n.segmentPath)return[...t,n.segmentPath]}return"string"!=typeof n?[...t,n]:0===a?(n.split("/").forEach((n,a)=>{0==a&&"."===n||(0==a&&""===n?i=!0:".."===n?e++:""!=n&&t.push(n))}),t):[...t,n]},[]);return new Zt(i,e,n)}(i);if(s.toRoot())return Jt(e.root,new gt([],{}),e,n,a);const o=function(t,e,i){if(t.isAbsolute)return new te(e.root,!0,0);if(-1===i.snapshot._lastPathIndex){const t=i.snapshot._urlSegment;return new te(t,t===e.root,0)}const n=Yt(t.commands[0])?0:1;return function(t,e,i){let n=t,a=e,s=i;for(;s>a;){if(s-=a,n=n.parent,!n)throw new Error("Invalid number of '../'");a=n.segments.length}return new te(n,!1,a-s)}(i.snapshot._urlSegment,i.snapshot._lastPathIndex+n,t.numberOfDoubleDots)}(s,e,t),r=o.processChildren?ne(o.segmentGroup,o.index,s.commands):ie(o.segmentGroup,o.index,s.commands);return Jt(o.segmentGroup,r,e,n,a)}(l,this.currentUrlTree,t,h,d)}navigateByUrl(t,e={skipLocationChange:!1}){Object(a.Z)()&&this.isNgZoneEnabled&&!a.C.isInAngularZone()&&this.console.warn("Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?");const i=ue(t)?t:this.parseUrl(t),n=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(n,"imperative",null,e)}navigate(t,e={skipLocationChange:!1}){return function(t){for(let e=0;e<t.length;e++){const i=t[e];if(null==i)throw new Error(`The requested path contains ${i} segment at index ${e}`)}}(t),this.navigateByUrl(this.createUrlTree(t,e),e)}serializeUrl(t){return this.urlSerializer.serialize(t)}parseUrl(t){let e;try{e=this.urlSerializer.parse(t)}catch(i){e=this.malformedUriErrorHandler(i,this.urlSerializer,t)}return e}isActive(t,e){if(ue(t))return ft(this.currentUrlTree,t,e);const i=this.parseUrl(t);return ft(this.currentUrlTree,i,e)}removeEmptyProps(t){return Object.keys(t).reduce((e,i)=>{const n=t[i];return null!=n&&(e[i]=n),e},{})}processNavigations(){this.navigations.subscribe(t=>{this.navigated=!0,this.lastSuccessfulId=t.id,this.events.next(new U(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(this.currentUrlTree))),this.lastSuccessfulNavigation=this.currentNavigation,this.currentNavigation=null,t.resolve(!0)},t=>{this.console.warn("Unhandled Navigation Error: ")})}scheduleNavigation(t,e,i,n,a){const s=this.getTransition(),o="imperative"!==e&&"imperative"===(null==s?void 0:s.source),r=(this.lastSuccessfulId===s.id||this.currentNavigation?s.rawUrl:s.urlAfterRedirects).toString()===t.toString();if(o&&r)return Promise.resolve(!0);let c,l,d;a?(c=a.resolve,l=a.reject,d=a.promise):d=new Promise((t,e)=>{c=t,l=e});const h=++this.navigationId;return this.setTransition({id:h,source:e,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:t,extras:n,resolve:c,reject:l,promise:d,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),d.catch(t=>Promise.reject(t))}setBrowserUrl(t,e,i,n){const a=this.urlSerializer.serialize(t);n=n||{},this.location.isCurrentPathEqualTo(a)||e?this.location.replaceState(a,"",Object.assign(Object.assign({},n),{navigationId:i})):this.location.go(a,"",Object.assign(Object.assign({},n),{navigationId:i}))}resetStateAndUrl(t,e,i){this.routerState=t,this.currentUrlTree=e,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,i),this.resetUrlToCurrentUrlTree()}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",{navigationId:this.lastSuccessfulId})}}return t.\u0275fac=function(e){return new(e||t)(a.ac(a.R),a.ac(xt),a.ac(Ze),a.ac(n.n),a.ac(a.t),a.ac(a.z),a.ac(a.i),a.ac(void 0))},t.\u0275prov=a.Mb({token:t,factory:t.\u0275fac}),t})(),si=(()=>{class t{constructor(t,e,i,n,a){this.router=t,this.route=e,this.commands=[],this.onChanges=new p.a,null==i&&n.setAttribute(a.nativeElement,"tabindex","0")}ngOnChanges(t){this.onChanges.next(this)}set routerLink(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]}set preserveQueryParams(t){Object(a.Z)()&&console&&console.warn&&console.warn("preserveQueryParams is deprecated!, use queryParamsHandling instead."),this.preserve=t}onClick(){const t={skipLocationChange:ri(this.skipLocationChange),replaceUrl:ri(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,t),!0}get urlTree(){return this.router.createUrlTree(this.commands,{relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,preserveQueryParams:ri(this.preserve),queryParamsHandling:this.queryParamsHandling,preserveFragment:ri(this.preserveFragment)})}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(ai),a.Qb(Bt),a.bc("tabindex"),a.Qb(a.I),a.Qb(a.l))},t.\u0275dir=a.Lb({type:t,selectors:[["","routerLink","",5,"a",5,"area"]],hostBindings:function(t,e){1&t&&a.dc("click",(function(){return e.onClick()}))},inputs:{routerLink:"routerLink",preserveQueryParams:"preserveQueryParams",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state"},features:[a.Bb]}),t})(),oi=(()=>{class t{constructor(t,e,i){this.router=t,this.route=e,this.locationStrategy=i,this.commands=[],this.onChanges=new p.a,this.subscription=t.events.subscribe(t=>{t instanceof U&&this.updateTargetUrlAndHref()})}set routerLink(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]}set preserveQueryParams(t){Object(a.Z)()&&console&&console.warn&&console.warn("preserveQueryParams is deprecated, use queryParamsHandling instead."),this.preserve=t}ngOnChanges(t){this.updateTargetUrlAndHref(),this.onChanges.next(this)}ngOnDestroy(){this.subscription.unsubscribe()}onClick(t,e,i,n,a){if(0!==t||e||i||n||a)return!0;if("string"==typeof this.target&&"_self"!=this.target)return!0;const s={skipLocationChange:ri(this.skipLocationChange),replaceUrl:ri(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,s),!1}updateTargetUrlAndHref(){this.href=this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree))}get urlTree(){return this.router.createUrlTree(this.commands,{relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,preserveQueryParams:ri(this.preserve),queryParamsHandling:this.queryParamsHandling,preserveFragment:ri(this.preserveFragment)})}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(ai),a.Qb(Bt),a.Qb(n.o))},t.\u0275dir=a.Lb({type:t,selectors:[["a","routerLink",""],["area","routerLink",""]],hostVars:2,hostBindings:function(t,e){1&t&&a.dc("click",(function(t){return e.onClick(t.button,t.ctrlKey,t.shiftKey,t.altKey,t.metaKey)})),2&t&&(a.Zb("href",e.href,a.Gc),a.Eb("target",e.target))},inputs:{routerLink:"routerLink",preserveQueryParams:"preserveQueryParams",target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state"},features:[a.Bb]}),t})();function ri(t){return""===t||!!t}let ci=(()=>{class t{constructor(t,e,i,n,a,s){this.router=t,this.element=e,this.renderer=i,this.cdr=n,this.link=a,this.linkWithHref=s,this.classes=[],this.isActive=!1,this.routerLinkActiveOptions={exact:!1},this.routerEventsSubscription=t.events.subscribe(t=>{t instanceof U&&this.update()})}ngAfterContentInit(){Object(o.a)([this.links.changes,this.linksWithHrefs.changes,Object(s.a)(null)]).pipe(Object(N.a)()).subscribe(t=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){var t;null===(t=this.linkInputChangesSubscription)||void 0===t||t.unsubscribe();const e=[...this.links.toArray(),...this.linksWithHrefs.toArray(),this.link,this.linkWithHref].filter(t=>!!t).map(t=>t.onChanges);this.linkInputChangesSubscription=Object(o.a)(e).pipe(Object(N.a)()).subscribe(t=>{this.isActive!==this.isLinkActive(this.router)(t)&&this.update()})}set routerLinkActive(t){const e=Array.isArray(t)?t:t.split(" ");this.classes=e.filter(t=>!!t)}ngOnChanges(t){this.update()}ngOnDestroy(){var t;this.routerEventsSubscription.unsubscribe(),null===(t=this.linkInputChangesSubscription)||void 0===t||t.unsubscribe()}update(){this.links&&this.linksWithHrefs&&this.router.navigated&&Promise.resolve().then(()=>{const t=this.hasActiveLinks();this.isActive!==t&&(this.isActive=t,this.cdr.markForCheck(),this.classes.forEach(e=>{t?this.renderer.addClass(this.element.nativeElement,e):this.renderer.removeClass(this.element.nativeElement,e)}))})}isLinkActive(t){return e=>t.isActive(e.urlTree,this.routerLinkActiveOptions.exact)}hasActiveLinks(){const t=this.isLinkActive(this.router);return this.link&&t(this.link)||this.linkWithHref&&t(this.linkWithHref)||this.links.some(t)||this.linksWithHrefs.some(t)}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(ai),a.Qb(a.l),a.Qb(a.I),a.Qb(a.h),a.Qb(si,8),a.Qb(oi,8))},t.\u0275dir=a.Lb({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(t,e,i){var n;1&t&&(a.Jb(i,si,!0),a.Jb(i,oi,!0)),2&t&&(a.yc(n=a.ec())&&(e.links=n),a.yc(n=a.ec())&&(e.linksWithHrefs=n))},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",routerLinkActive:"routerLinkActive"},exportAs:["routerLinkActive"],features:[a.Bb]}),t})(),li=(()=>{class t{constructor(t,e,i,n,s){this.parentContexts=t,this.location=e,this.resolver=i,this.changeDetector=s,this.activated=null,this._activatedRoute=null,this.activateEvents=new a.o,this.deactivateEvents=new a.o,this.name=n||"primary",t.onChildOutletCreated(this.name,this)}ngOnDestroy(){this.parentContexts.onChildOutletDestroyed(this.name)}ngOnInit(){if(!this.activated){const t=this.parentContexts.getContext(this.name);t&&t.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.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 t=this.activated;return this.activated=null,this._activatedRoute=null,t}attach(t,e){this.activated=t,this._activatedRoute=e,this.location.insert(t.hostView)}deactivate(){if(this.activated){const t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}}activateWith(t,e){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=t;const i=(e=e||this.resolver).resolveComponentFactory(t._futureSnapshot.routeConfig.component),n=this.parentContexts.getOrCreateContext(this.name).children,a=new di(t,n,this.location.injector);this.activated=this.location.createComponent(i,this.location.length,a),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(Ze),a.Qb(a.T),a.Qb(a.j),a.bc("name"),a.Qb(a.h))},t.\u0275dir=a.Lb({type:t,selectors:[["router-outlet"]],outputs:{activateEvents:"activate",deactivateEvents:"deactivate"},exportAs:["outlet"]}),t})();class di{constructor(t,e,i){this.route=t,this.childContexts=e,this.parent=i}get(t,e){return t===Bt?this.route:t===Ze?this.childContexts:this.parent.get(t,e)}}class hi{}class ui{preload(t,e){return e().pipe(Object(W.a)(()=>Object(s.a)(null)))}}class pi{preload(t,e){return Object(s.a)(null)}}let bi=(()=>{class t{constructor(t,e,i,n,a){this.router=t,this.injector=n,this.preloadingStrategy=a,this.loader=new Ye(e,i,e=>t.triggerEvent(new J(e)),e=>t.triggerEvent(new Z(e)))}setUpPreloading(){this.subscription=this.router.events.pipe(Object(m.a)(t=>t instanceof U),Object(T.a)(()=>this.preload())).subscribe(()=>{})}preload(){const t=this.injector.get(a.A);return this.processRoutes(t,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(t,e){const i=[];for(const n of e)if(n.loadChildren&&!n.canLoad&&n._loadedConfig){const t=n._loadedConfig;i.push(this.processRoutes(t.module,t.routes))}else n.loadChildren&&!n.canLoad?i.push(this.preloadConfig(t,n)):n.children&&i.push(this.processRoutes(t,n.children));return Object(o.a)(i).pipe(Object(N.a)(),Object(b.a)(t=>{}))}preloadConfig(t,e){return this.preloadingStrategy.preload(e,()=>this.loader.load(t.injector,e).pipe(Object(F.a)(t=>(e._loadedConfig=t,this.processRoutes(t.module,t.routes)))))}}return t.\u0275fac=function(e){return new(e||t)(a.ac(ai),a.ac(a.z),a.ac(a.i),a.ac(a.t),a.ac(hi))},t.\u0275prov=a.Mb({token:t,factory:t.\u0275fac}),t})(),fi=(()=>{class t{constructor(t,e,i={}){this.router=t,this.viewportScroller=e,this.options=i,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},i.scrollPositionRestoration=i.scrollPositionRestoration||"disabled",i.anchorScrolling=i.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(t=>{t instanceof B?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=t.navigationTrigger,this.restoredId=t.restoredState?t.restoredState.navigationId:0):t instanceof U&&(this.lastId=t.id,this.scheduleScrollEvent(t,this.router.parseUrl(t.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.router.events.subscribe(t=>{t instanceof at&&(t.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(t.position):t.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(t.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(t,e){this.router.triggerEvent(new at(t,"popstate"===this.lastSource?this.store[this.restoredId]:null,e))}ngOnDestroy(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(a.ac(ai),a.ac(n.H),a.ac(void 0))},t.\u0275prov=a.Mb({token:t,factory:t.\u0275fac}),t})();const mi=new a.s("ROUTER_CONFIGURATION"),gi=new a.s("ROUTER_FORROOT_GUARD"),vi=[n.n,{provide:xt,useClass:Ct},{provide:ai,useFactory:function(t,e,i,a,s,o,r,c={},l,d){const h=new ai(null,t,e,i,a,s,o,ht(r));if(l&&(h.urlHandlingStrategy=l),d&&(h.routeReuseStrategy=d),c.errorHandler&&(h.errorHandler=c.errorHandler),c.malformedUriErrorHandler&&(h.malformedUriErrorHandler=c.malformedUriErrorHandler),c.enableTracing){const t=Object(n.L)();h.events.subscribe(e=>{t.logGroup("Router Event: "+e.constructor.name),t.log(e.toString()),t.log(e),t.logGroupEnd()})}return c.onSameUrlNavigation&&(h.onSameUrlNavigation=c.onSameUrlNavigation),c.paramsInheritanceStrategy&&(h.paramsInheritanceStrategy=c.paramsInheritanceStrategy),c.urlUpdateStrategy&&(h.urlUpdateStrategy=c.urlUpdateStrategy),c.relativeLinkResolution&&(h.relativeLinkResolution=c.relativeLinkResolution),h},deps:[xt,Ze,n.n,a.t,a.z,a.i,Ke,mi,[class{},new a.D],[class{},new a.D]]},Ze,{provide:Bt,useFactory:function(t){return t.routerState.root},deps:[ai]},{provide:a.z,useClass:a.O},bi,pi,ui,{provide:mi,useValue:{enableTracing:!1}}];function _i(){return new a.B("Router",ai)}let yi=(()=>{class t{constructor(t,e){}static forRoot(e,i){return{ngModule:t,providers:[vi,Di(e),{provide:gi,useFactory:Oi,deps:[[ai,new a.D,new a.N]]},{provide:mi,useValue:i||{}},{provide:n.o,useFactory:Ci,deps:[n.D,[new a.q(n.a),new a.D],mi]},{provide:fi,useFactory:xi,deps:[ai,n.H,mi]},{provide:hi,useExisting:i&&i.preloadingStrategy?i.preloadingStrategy:pi},{provide:a.B,multi:!0,useFactory:_i},[wi,{provide:a.d,multi:!0,useFactory:Mi,deps:[wi]},{provide:Si,useFactory:ki,deps:[wi]},{provide:a.b,multi:!0,useExisting:Si}]]}}static forChild(e){return{ngModule:t,providers:[Di(e)]}}}return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)(a.ac(gi,8),a.ac(ai,8))}}),t})();function xi(t,e,i){return i.scrollOffset&&e.setOffset(i.scrollOffset),new fi(t,e,i)}function Ci(t,e,i={}){return i.useHash?new n.h(t,e):new n.B(t,e)}function Oi(t){if(t)throw new Error("RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function Di(t){return[{provide:a.a,multi:!0,useValue:t},{provide:Ke,multi:!0,useValue:t}]}let wi=(()=>{class t{constructor(t){this.injector=t,this.initNavigation=!1,this.resultOfPreactivationDone=new p.a}appInitializer(){return this.injector.get(n.m,Promise.resolve(null)).then(()=>{let t=null;const e=new Promise(e=>t=e),i=this.injector.get(ai),n=this.injector.get(mi);if(this.isLegacyDisabled(n)||this.isLegacyEnabled(n))t(!0);else if("disabled"===n.initialNavigation)i.setUpLocationChangeListener(),t(!0);else{if("enabled"!==n.initialNavigation)throw new Error(`Invalid initialNavigation options: '${n.initialNavigation}'`);i.hooks.afterPreactivation=()=>this.initNavigation?Object(s.a)(null):(this.initNavigation=!0,t(!0),this.resultOfPreactivationDone),i.initialNavigation()}return e})}bootstrapListener(t){const e=this.injector.get(mi),i=this.injector.get(bi),n=this.injector.get(fi),s=this.injector.get(ai),o=this.injector.get(a.g);t===o.components[0]&&(this.isLegacyEnabled(e)?s.initialNavigation():this.isLegacyDisabled(e)&&s.setUpLocationChangeListener(),i.setUpPreloading(),n.init(),s.resetRootComponentType(o.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}isLegacyEnabled(t){return"legacy_enabled"===t.initialNavigation||!0===t.initialNavigation||void 0===t.initialNavigation}isLegacyDisabled(t){return"legacy_disabled"===t.initialNavigation||!1===t.initialNavigation}}return t.\u0275fac=function(e){return new(e||t)(a.ac(a.t))},t.\u0275prov=a.Mb({token:t,factory:t.\u0275fac}),t})();function Mi(t){return t.appInitializer.bind(t)}function ki(t){return t.bootstrapListener.bind(t)}const Si=new a.s("Router Initializer")},u47x:function(t,e,i){"use strict";i.d(e,"a",(function(){return z})),i.d(e,"b",(function(){return O})),i.d(e,"c",(function(){return x})),i.d(e,"d",(function(){return A})),i.d(e,"e",(function(){return Q})),i.d(e,"f",(function(){return P})),i.d(e,"g",(function(){return D})),i.d(e,"h",(function(){return F})),i.d(e,"i",(function(){return I})),i.d(e,"j",(function(){return N})),i.d(e,"k",(function(){return j})),i.d(e,"l",(function(){return W}));var n=i("ofXK"),a=i("fXoL"),s=i("nLfN"),o=i("XNiG"),r=i("quSY"),c=i("LRne"),l=i("FtGj"),d=i("vkgz"),h=i("Kj3r"),u=i("pLZG"),p=i("lJxs"),b=i("IzEk"),f=i("8LU1"),m=i("GU7r");function g(t,e){return(t.getAttribute(e)||"").match(/\S+/g)||[]}let v=0;const _=new Map;let y=null,x=(()=>{class t{constructor(t,e){this._platform=e,this._document=t}describe(t,e){this._canBeDescribed(t,e)&&("string"!=typeof e?(this._setMessageId(e),_.set(e,{messageElement:e,referenceCount:0})):_.has(e)||this._createMessageElement(e),this._isElementDescribedByMessage(t,e)||this._addMessageReference(t,e))}removeDescription(t,e){if(e&&this._isElementNode(t)){if(this._isElementDescribedByMessage(t,e)&&this._removeMessageReference(t,e),"string"==typeof e){const t=_.get(e);t&&0===t.referenceCount&&this._deleteMessageElement(e)}y&&0===y.childNodes.length&&this._deleteMessagesContainer()}}ngOnDestroy(){const t=this._document.querySelectorAll("[cdk-describedby-host]");for(let e=0;e<t.length;e++)this._removeCdkDescribedByReferenceIds(t[e]),t[e].removeAttribute("cdk-describedby-host");y&&this._deleteMessagesContainer(),_.clear()}_createMessageElement(t){const e=this._document.createElement("div");this._setMessageId(e),e.textContent=t,this._createMessagesContainer(),y.appendChild(e),_.set(t,{messageElement:e,referenceCount:0})}_setMessageId(t){t.id||(t.id="cdk-describedby-message-"+v++)}_deleteMessageElement(t){const e=_.get(t),i=e&&e.messageElement;y&&i&&y.removeChild(i),_.delete(t)}_createMessagesContainer(){if(!y){const t=!this._platform||!this._platform.EDGE&&!this._platform.TRIDENT,e=this._document.getElementById("cdk-describedby-message-container");e&&e.parentNode&&e.parentNode.removeChild(e),y=this._document.createElement("div"),y.id="cdk-describedby-message-container",y.classList.add("cdk-visually-hidden"),y.setAttribute("aria-hidden",t+""),this._document.body.appendChild(y)}}_deleteMessagesContainer(){y&&y.parentNode&&(y.parentNode.removeChild(y),y=null)}_removeCdkDescribedByReferenceIds(t){const e=g(t,"aria-describedby").filter(t=>0!=t.indexOf("cdk-describedby-message"));t.setAttribute("aria-describedby",e.join(" "))}_addMessageReference(t,e){const i=_.get(e);!function(t,e,i){const n=g(t,e);n.some(t=>t.trim()==i.trim())||(n.push(i.trim()),t.setAttribute(e,n.join(" ")))}(t,"aria-describedby",i.messageElement.id),t.setAttribute("cdk-describedby-host",""),i.referenceCount++}_removeMessageReference(t,e){const i=_.get(e);i.referenceCount--,function(t,e,i){const n=g(t,e).filter(t=>t!=i.trim());n.length?t.setAttribute(e,n.join(" ")):t.removeAttribute(e)}(t,"aria-describedby",i.messageElement.id),t.removeAttribute("cdk-describedby-host")}_isElementDescribedByMessage(t,e){const i=g(t,"aria-describedby"),n=_.get(e),a=n&&n.messageElement.id;return!!a&&-1!=i.indexOf(a)}_canBeDescribed(t,e){if(!this._isElementNode(t))return!1;if(e&&"object"==typeof e)return!0;const i=null==e?"":(""+e).trim(),n=t.getAttribute("aria-label");return!(!i||n&&n.trim()===i)}_isElementNode(t){return t.nodeType===this._document.ELEMENT_NODE}}return t.\u0275fac=function(e){return new(e||t)(a.ac(n.e),a.ac(s.a))},t.\u0275prov=Object(a.Mb)({factory:function(){return new t(Object(a.ac)(n.e),Object(a.ac)(s.a))},token:t,providedIn:"root"}),t})();class C{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new o.a,this._typeaheadSubscription=r.a.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._skipPredicateFn=t=>t.disabled,this._pressedLetters=[],this.tabOut=new o.a,this.change=new o.a,t instanceof a.H&&t.changes.subscribe(t=>{if(this._activeItem){const e=t.toArray().indexOf(this._activeItem);e>-1&&e!==this._activeItemIndex&&(this._activeItemIndex=e)}})}skipPredicate(t){return this._skipPredicateFn=t,this}withWrap(t=!0){return this._wrap=t,this}withVerticalOrientation(t=!0){return this._vertical=t,this}withHorizontalOrientation(t){return this._horizontal=t,this}withAllowedModifierKeys(t){return this._allowedModifierKeys=t,this}withTypeAhead(t=200){return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(Object(d.a)(t=>this._pressedLetters.push(t)),Object(h.a)(t),Object(u.a)(()=>this._pressedLetters.length>0),Object(p.a)(()=>this._pressedLetters.join(""))).subscribe(t=>{const e=this._getItemsArray();for(let i=1;i<e.length+1;i++){const n=(this._activeItemIndex+i)%e.length,a=e[n];if(!this._skipPredicateFn(a)&&0===a.getLabel().toUpperCase().trim().indexOf(t)){this.setActiveItem(n);break}}this._pressedLetters=[]}),this}withHomeAndEnd(t=!0){return this._homeAndEnd=t,this}setActiveItem(t){const e=this._activeItem;this.updateActiveItem(t),this._activeItem!==e&&this.change.next(this._activeItemIndex)}onKeydown(t){const e=t.keyCode,i=["altKey","ctrlKey","metaKey","shiftKey"].every(e=>!t[e]||this._allowedModifierKeys.indexOf(e)>-1);switch(e){case l.r:return void this.tabOut.next();case l.e:if(this._vertical&&i){this.setNextItemActive();break}return;case l.s:if(this._vertical&&i){this.setPreviousItemActive();break}return;case l.o:if(this._horizontal&&i){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case l.k:if(this._horizontal&&i){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case l.j:if(this._homeAndEnd&&i){this.setFirstItemActive();break}return;case l.f:if(this._homeAndEnd&&i){this.setLastItemActive();break}return;default:return void((i||Object(l.v)(t,"shiftKey"))&&(t.key&&1===t.key.length?this._letterKeyStream.next(t.key.toLocaleUpperCase()):(e>=l.a&&e<=l.t||e>=l.u&&e<=l.l)&&this._letterKeyStream.next(String.fromCharCode(e))))}this._pressedLetters=[],t.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}isTyping(){return this._pressedLetters.length>0}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._items.length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(t){const e=this._getItemsArray(),i="number"==typeof t?t:e.indexOf(t),n=e[i];this._activeItem=null==n?null:n,this._activeItemIndex=i}_setActiveItemByDelta(t){this._wrap?this._setActiveInWrapMode(t):this._setActiveInDefaultMode(t)}_setActiveInWrapMode(t){const e=this._getItemsArray();for(let i=1;i<=e.length;i++){const n=(this._activeItemIndex+t*i+e.length)%e.length;if(!this._skipPredicateFn(e[n]))return void this.setActiveItem(n)}}_setActiveInDefaultMode(t){this._setActiveItemByIndex(this._activeItemIndex+t,t)}_setActiveItemByIndex(t,e){const i=this._getItemsArray();if(i[t]){for(;this._skipPredicateFn(i[t]);)if(!i[t+=e])return;this.setActiveItem(t)}}_getItemsArray(){return this._items instanceof a.H?this._items.toArray():this._items}}class O extends C{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}}class D extends C{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(t){return this._origin=t,this}setActiveItem(t){super.setActiveItem(t),this.activeItem&&this.activeItem.focus(this._origin)}}let w=(()=>{class t{constructor(t){this._platform=t}isDisabled(t){return t.hasAttribute("disabled")}isVisible(t){return function(t){return!!(t.offsetWidth||t.offsetHeight||"function"==typeof t.getClientRects&&t.getClientRects().length)}(t)&&"visible"===getComputedStyle(t).visibility}isTabbable(t){if(!this._platform.isBrowser)return!1;const e=function(t){try{return t.frameElement}catch(e){return null}}((i=t).ownerDocument&&i.ownerDocument.defaultView||window);var i;if(e){if(-1===k(e))return!1;if(!this.isVisible(e))return!1}let n=t.nodeName.toLowerCase(),a=k(t);return t.hasAttribute("contenteditable")?-1!==a:"iframe"!==n&&"object"!==n&&!(this._platform.WEBKIT&&this._platform.IOS&&!function(t){let e=t.nodeName.toLowerCase(),i="input"===e&&t.type;return"text"===i||"password"===i||"select"===e||"textarea"===e}(t))&&("audio"===n?!!t.hasAttribute("controls")&&-1!==a:"video"===n?-1!==a&&(null!==a||this._platform.FIREFOX||t.hasAttribute("controls")):t.tabIndex>=0)}isFocusable(t,e){return function(t){return!function(t){return function(t){return"input"==t.nodeName.toLowerCase()}(t)&&"hidden"==t.type}(t)&&(function(t){let e=t.nodeName.toLowerCase();return"input"===e||"select"===e||"button"===e||"textarea"===e}(t)||function(t){return function(t){return"a"==t.nodeName.toLowerCase()}(t)&&t.hasAttribute("href")}(t)||t.hasAttribute("contenteditable")||M(t))}(t)&&!this.isDisabled(t)&&((null==e?void 0:e.ignoreVisibility)||this.isVisible(t))}}return t.\u0275fac=function(e){return new(e||t)(a.ac(s.a))},t.\u0275prov=Object(a.Mb)({factory:function(){return new t(Object(a.ac)(s.a))},token:t,providedIn:"root"}),t})();function M(t){if(!t.hasAttribute("tabindex")||void 0===t.tabIndex)return!1;let e=t.getAttribute("tabindex");return"-32768"!=e&&!(!e||isNaN(parseInt(e,10)))}function k(t){if(!M(t))return null;const e=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}class S{constructor(t,e,i,n,a=!1){this._element=t,this._checker=e,this._ngZone=i,this._document=n,this._hasAttached=!1,this.startAnchorListener=()=>this.focusLastTabbableElement(),this.endAnchorListener=()=>this.focusFirstTabbableElement(),this._enabled=!0,a||this.attachAnchors()}get enabled(){return this._enabled}set enabled(t){this._enabled=t,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}destroy(){const t=this._startAnchor,e=this._endAnchor;t&&(t.removeEventListener("focus",this.startAnchorListener),t.parentNode&&t.parentNode.removeChild(t)),e&&(e.removeEventListener("focus",this.endAnchorListener),e.parentNode&&e.parentNode.removeChild(e)),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return!!this._hasAttached||(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(){return new Promise(t=>{this._executeOnStable(()=>t(this.focusInitialElement()))})}focusFirstTabbableElementWhenReady(){return new Promise(t=>{this._executeOnStable(()=>t(this.focusFirstTabbableElement()))})}focusLastTabbableElementWhenReady(){return new Promise(t=>{this._executeOnStable(()=>t(this.focusLastTabbableElement()))})}_getRegionBoundary(t){let e=this._element.querySelectorAll(`[cdk-focus-region-${t}], [cdkFocusRegion${t}], [cdk-focus-${t}]`);for(let i=0;i<e.length;i++)e[i].hasAttribute("cdk-focus-"+t)?console.warn(`Found use of deprecated attribute 'cdk-focus-${t}', use 'cdkFocusRegion${t}' instead. The deprecated attribute will be removed in 8.0.0.`,e[i]):e[i].hasAttribute("cdk-focus-region-"+t)&&console.warn(`Found use of deprecated attribute 'cdk-focus-region-${t}', use 'cdkFocusRegion${t}' instead. The deprecated attribute will be removed in 8.0.0.`,e[i]);return"start"==t?e.length?e[0]:this._getFirstTabbableElement(this._element):e.length?e[e.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(){const t=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");return t?(t.hasAttribute("cdk-focus-initial")&&console.warn("Found use of deprecated attribute 'cdk-focus-initial', use 'cdkFocusInitial' instead. The deprecated attribute will be removed in 8.0.0",t),t.focus(),!0):this.focusFirstTabbableElement()}focusFirstTabbableElement(){const t=this._getRegionBoundary("start");return t&&t.focus(),!!t}focusLastTabbableElement(){const t=this._getRegionBoundary("end");return t&&t.focus(),!!t}hasAttached(){return this._hasAttached}_getFirstTabbableElement(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;let e=t.children||t.childNodes;for(let i=0;i<e.length;i++){let t=e[i].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(e[i]):null;if(t)return t}return null}_getLastTabbableElement(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;let e=t.children||t.childNodes;for(let i=e.length-1;i>=0;i--){let t=e[i].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[i]):null;if(t)return t}return null}_createAnchor(){const t=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,t),t.classList.add("cdk-visually-hidden"),t.classList.add("cdk-focus-trap-anchor"),t.setAttribute("aria-hidden","true"),t}_toggleAnchorTabIndex(t,e){t?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}toggleAnchors(t){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}_executeOnStable(t){this._ngZone.isStable?t():this._ngZone.onStable.pipe(Object(b.a)(1)).subscribe(t)}}let I=(()=>{class t{constructor(t,e,i){this._checker=t,this._ngZone=e,this._document=i}create(t,e=!1){return new S(t,this._checker,this._ngZone,this._document,e)}}return t.\u0275fac=function(e){return new(e||t)(a.ac(w),a.ac(a.C),a.ac(n.e))},t.\u0275prov=Object(a.Mb)({factory:function(){return new t(Object(a.ac)(w),Object(a.ac)(a.C),Object(a.ac)(n.e))},token:t,providedIn:"root"}),t})(),P=(()=>{class t{constructor(t,e,i){this._elementRef=t,this._focusTrapFactory=e,this._previouslyFocusedElement=null,this._document=i,this.focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement,!0)}get enabled(){return this.focusTrap.enabled}set enabled(t){this.focusTrap.enabled=Object(f.c)(t)}get autoCapture(){return this._autoCapture}set autoCapture(t){this._autoCapture=Object(f.c)(t)}ngOnDestroy(){this.focusTrap.destroy(),this._previouslyFocusedElement&&(this._previouslyFocusedElement.focus(),this._previouslyFocusedElement=null)}ngAfterContentInit(){this.focusTrap.attachAnchors(),this.autoCapture&&this._captureFocus()}ngDoCheck(){this.focusTrap.hasAttached()||this.focusTrap.attachAnchors()}ngOnChanges(t){const e=t.autoCapture;e&&!e.firstChange&&this.autoCapture&&this.focusTrap.hasAttached()&&this._captureFocus()}_captureFocus(){this._previouslyFocusedElement=this._document.activeElement,this.focusTrap.focusInitialElementWhenReady()}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(I),a.Qb(n.e))},t.\u0275dir=a.Lb({type:t,selectors:[["","cdkTrapFocus",""]],inputs:{enabled:["cdkTrapFocus","enabled"],autoCapture:["cdkTrapFocusAutoCapture","autoCapture"]},exportAs:["cdkTrapFocus"],features:[a.Bb]}),t})();"undefined"!=typeof Element&∈const V=new a.s("liveAnnouncerElement",{providedIn:"root",factory:function(){return null}}),R=new a.s("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let j=(()=>{class t{constructor(t,e,i,n){this._ngZone=e,this._defaultOptions=n,this._document=i,this._liveElement=t||this._createLiveElement()}announce(t,...e){const i=this._defaultOptions;let n,a;return 1===e.length&&"number"==typeof e[0]?a=e[0]:[n,a]=e,this.clear(),clearTimeout(this._previousTimeout),n||(n=i&&i.politeness?i.politeness:"polite"),null==a&&i&&(a=i.duration),this._liveElement.setAttribute("aria-live",n),this._ngZone.runOutsideAngular(()=>new Promise(e=>{clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=t,e(),"number"==typeof a&&(this._previousTimeout=setTimeout(()=>this.clear(),a))},100)}))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement&&this._liveElement.parentNode&&(this._liveElement.parentNode.removeChild(this._liveElement),this._liveElement=null)}_createLiveElement(){const t=this._document.getElementsByClassName("cdk-live-announcer-element"),e=this._document.createElement("div");for(let i=0;i<t.length;i++)t[i].parentNode.removeChild(t[i]);return e.classList.add("cdk-live-announcer-element"),e.classList.add("cdk-visually-hidden"),e.setAttribute("aria-atomic","true"),e.setAttribute("aria-live","polite"),this._document.body.appendChild(e),e}}return t.\u0275fac=function(e){return new(e||t)(a.ac(V,8),a.ac(a.C),a.ac(n.e),a.ac(R,8))},t.\u0275prov=Object(a.Mb)({factory:function(){return new t(Object(a.ac)(V,8),Object(a.ac)(a.C),Object(a.ac)(n.e),Object(a.ac)(R,8))},token:t,providedIn:"root"}),t})(),A=(()=>{class t{constructor(t,e,i,n){this._elementRef=t,this._liveAnnouncer=e,this._contentObserver=i,this._ngZone=n,this._politeness="polite"}get politeness(){return this._politeness}set politeness(t){this._politeness="off"===t||"assertive"===t?t:"polite","off"===this._politeness?this._subscription&&(this._subscription.unsubscribe(),this._subscription=null):this._subscription||(this._subscription=this._ngZone.runOutsideAngular(()=>this._contentObserver.observe(this._elementRef).subscribe(()=>{const t=this._elementRef.nativeElement.textContent;t!==this._previousAnnouncedText&&(this._liveAnnouncer.announce(t,this._politeness),this._previousAnnouncedText=t)})))}ngOnDestroy(){this._subscription&&this._subscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(j),a.Qb(m.b),a.Qb(a.C))},t.\u0275dir=a.Lb({type:t,selectors:[["","cdkAriaLive",""]],inputs:{politeness:["cdkAriaLive","politeness"]},exportAs:["cdkAriaLive"]}),t})();function W(t){return 0===t.buttons}const T=new a.s("cdk-focus-monitor-default-options"),E=Object(s.f)({passive:!0,capture:!0});let F=(()=>{class t{constructor(t,e,i,n){this._ngZone=t,this._platform=e,this._origin=null,this._windowFocused=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._documentKeydownListener=()=>{this._lastTouchTarget=null,this._setOriginForCurrentEventQueue("keyboard")},this._documentMousedownListener=t=>{if(!this._lastTouchTarget){const e=W(t)?"keyboard":"mouse";this._setOriginForCurrentEventQueue(e)}},this._documentTouchstartListener=t=>{null!=this._touchTimeoutId&&clearTimeout(this._touchTimeoutId),this._lastTouchTarget=L(t),this._touchTimeoutId=setTimeout(()=>this._lastTouchTarget=null,650)},this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)},this._rootNodeFocusAndBlurListener=t=>{const e=L(t),i="focus"===t.type?this._onFocus:this._onBlur;for(let n=e;n;n=n.parentElement)i.call(this,t,n)},this._document=i,this._detectionMode=(null==n?void 0:n.detectionMode)||0}monitor(t,e=!1){const i=Object(f.e)(t);if(!this._platform.isBrowser||1!==i.nodeType)return Object(c.a)(null);const n=Object(s.c)(i)||this._getDocument(),a=this._elementInfo.get(i);if(a)return e&&(a.checkChildren=!0),a.subject;const r={checkChildren:e,subject:new o.a,rootNode:n};return this._elementInfo.set(i,r),this._registerGlobalListeners(r),r.subject}stopMonitoring(t){const e=Object(f.e)(t),i=this._elementInfo.get(e);i&&(i.subject.complete(),this._setClasses(e),this._elementInfo.delete(e),this._removeGlobalListeners(i))}focusVia(t,e,i){const n=Object(f.e)(t);this._setOriginForCurrentEventQueue(e),"function"==typeof n.focus&&n.focus(i)}ngOnDestroy(){this._elementInfo.forEach((t,e)=>this.stopMonitoring(e))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_toggleClass(t,e,i){i?t.classList.add(e):t.classList.remove(e)}_getFocusOrigin(t){return this._origin?this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:this._wasCausedByTouch(t)?"touch":"program"}_setClasses(t,e){this._toggleClass(t,"cdk-focused",!!e),this._toggleClass(t,"cdk-touch-focused","touch"===e),this._toggleClass(t,"cdk-keyboard-focused","keyboard"===e),this._toggleClass(t,"cdk-mouse-focused","mouse"===e),this._toggleClass(t,"cdk-program-focused","program"===e)}_setOriginForCurrentEventQueue(t){this._ngZone.runOutsideAngular(()=>{this._origin=t,0===this._detectionMode&&(this._originTimeoutId=setTimeout(()=>this._origin=null,1))})}_wasCausedByTouch(t){const e=L(t);return this._lastTouchTarget instanceof Node&&e instanceof Node&&(e===this._lastTouchTarget||e.contains(this._lastTouchTarget))}_onFocus(t,e){const i=this._elementInfo.get(e);if(!i||!i.checkChildren&&e!==L(t))return;const n=this._getFocusOrigin(t);this._setClasses(e,n),this._emitOrigin(i.subject,n),this._lastFocusOrigin=n}_onBlur(t,e){const i=this._elementInfo.get(e);!i||i.checkChildren&&t.relatedTarget instanceof Node&&e.contains(t.relatedTarget)||(this._setClasses(e),this._emitOrigin(i.subject,null))}_emitOrigin(t,e){this._ngZone.run(()=>t.next(e))}_registerGlobalListeners(t){if(!this._platform.isBrowser)return;const e=t.rootNode,i=this._rootNodeFocusListenerCount.get(e)||0;i||this._ngZone.runOutsideAngular(()=>{e.addEventListener("focus",this._rootNodeFocusAndBlurListener,E),e.addEventListener("blur",this._rootNodeFocusAndBlurListener,E)}),this._rootNodeFocusListenerCount.set(e,i+1),1==++this._monitoredElementCount&&this._ngZone.runOutsideAngular(()=>{const t=this._getDocument(),e=this._getWindow();t.addEventListener("keydown",this._documentKeydownListener,E),t.addEventListener("mousedown",this._documentMousedownListener,E),t.addEventListener("touchstart",this._documentTouchstartListener,E),e.addEventListener("focus",this._windowFocusListener)})}_removeGlobalListeners(t){const e=t.rootNode;if(this._rootNodeFocusListenerCount.has(e)){const t=this._rootNodeFocusListenerCount.get(e);t>1?this._rootNodeFocusListenerCount.set(e,t-1):(e.removeEventListener("focus",this._rootNodeFocusAndBlurListener,E),e.removeEventListener("blur",this._rootNodeFocusAndBlurListener,E),this._rootNodeFocusListenerCount.delete(e))}if(!--this._monitoredElementCount){const t=this._getDocument(),e=this._getWindow();t.removeEventListener("keydown",this._documentKeydownListener,E),t.removeEventListener("mousedown",this._documentMousedownListener,E),t.removeEventListener("touchstart",this._documentTouchstartListener,E),e.removeEventListener("focus",this._windowFocusListener),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._touchTimeoutId),clearTimeout(this._originTimeoutId)}}}return t.\u0275fac=function(e){return new(e||t)(a.ac(a.C),a.ac(s.a),a.ac(n.e,8),a.ac(T,8))},t.\u0275prov=Object(a.Mb)({factory:function(){return new t(Object(a.ac)(a.C),Object(a.ac)(s.a),Object(a.ac)(n.e,8),Object(a.ac)(T,8))},token:t,providedIn:"root"}),t})();function L(t){return t.composedPath?t.composedPath()[0]:t.target}let Q=(()=>{class t{constructor(t,e){this._elementRef=t,this._focusMonitor=e,this.cdkFocusChange=new a.o}ngAfterViewInit(){const t=this._elementRef.nativeElement;this._monitorSubscription=this._focusMonitor.monitor(t,1===t.nodeType&&t.hasAttribute("cdkMonitorSubtreeFocus")).subscribe(t=>this.cdkFocusChange.emit(t))}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._monitorSubscription&&this._monitorSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(F))},t.\u0275dir=a.Lb({type:t,selectors:[["","cdkMonitorElementFocus",""],["","cdkMonitorSubtreeFocus",""]],outputs:{cdkFocusChange:"cdkFocusChange"}}),t})(),N=(()=>{class t{constructor(t,e){this._platform=t,this._document=e}getHighContrastMode(){if(!this._platform.isBrowser)return 0;const t=this._document.createElement("div");t.style.backgroundColor="rgb(1,2,3)",t.style.position="absolute",this._document.body.appendChild(t);const e=this._document.defaultView||window,i=e&&e.getComputedStyle?e.getComputedStyle(t):null,n=(i&&i.backgroundColor||"").replace(/ /g,"");switch(this._document.body.removeChild(t),n){case"rgb(0,0,0)":return 2;case"rgb(255,255,255)":return 1}return 0}_applyBodyHighContrastModeCssClasses(){if(this._platform.isBrowser&&this._document.body){const t=this._document.body.classList;t.remove("cdk-high-contrast-active"),t.remove("cdk-high-contrast-black-on-white"),t.remove("cdk-high-contrast-white-on-black");const e=this.getHighContrastMode();1===e?(t.add("cdk-high-contrast-active"),t.add("cdk-high-contrast-black-on-white")):2===e&&(t.add("cdk-high-contrast-active"),t.add("cdk-high-contrast-white-on-black"))}}}return t.\u0275fac=function(e){return new(e||t)(a.ac(s.a),a.ac(n.e))},t.\u0275prov=Object(a.Mb)({factory:function(){return new t(Object(a.ac)(s.a),Object(a.ac)(n.e))},token:t,providedIn:"root"}),t})(),z=(()=>{class t{constructor(t){t._applyBodyHighContrastModeCssClasses()}}return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)(a.ac(N))},imports:[[s.b,m.c]]}),t})()},uqn4:function(t,e,i){"use strict";i.d(e,"a",(function(){return x}));var n=i("mrSG"),a=i("XNiG"),s=i("LRne"),o=i("vkgz"),r=i("nYR2"),c=i("JIr8"),l=i("lJxs"),d=i("SIQe"),h=i("fXoL"),u=i("tk/3"),p=i("tyNb"),b=i("4zkx"),f=i("AXEc"),m=i("5cI5"),g=i("eiH7"),v=i("rH+9"),_=i("0IaG"),y=i("sYmb");let x=(()=>{class t{constructor(t,e,i,n,s,o,r,c,l){this.http=t,this.router=e,this.headerService=i,this.notify=n,this.localStorage=s,this.privilegeService=o,this.functionsService=r,this.dialog=c,this.translate=l,this.applicationName="",this.loginMessage="",this.authMode="standard",this.authUri="",this.changeKey=null,this.user={},this.noInstall=!1,this.eventAction=new a.a}catchEvent(){return this.eventAction.asObservable()}setEvent(t){return this.eventAction.next(t)}getToken(){return this.localStorage.get("MaarchCourrierToken")}getAppSession(){return this.localStorage.getAppSession()}setAppSession(t){this.localStorage.setAppSession(t)}setCachedUrl(t){this.localStorage.save("MaarchCourrierCachedUrl",t)}getCachedUrl(){return this.localStorage.get("MaarchCourrierCachedUrl")}cleanCachedUrl(){return this.localStorage.remove("MaarchCourrierCachedUrl")}getUrl(t){return this.localStorage.get("MaarchCourrierUrl_"+t)}setUrl(t){const e=t.split("/");-1===e.indexOf("resources")&&-1===e.indexOf("content")&&this.localStorage.save("MaarchCourrierUrl_"+JSON.parse(atob(this.getToken().split(".")[1])).user.id,t)}cleanUrl(t){return this.localStorage.remove("MaarchCourrierUrl_"+t)}setToken(t){this.localStorage.save("MaarchCourrierToken",t)}getRefreshToken(){return this.localStorage.get("MaarchCourrierRefreshToken")}setRefreshToken(t){this.localStorage.save("MaarchCourrierRefreshToken",t)}clearTokens(){this.localStorage.remove("MaarchCourrierToken"),this.localStorage.remove("MaarchCourrierRefreshToken")}logout(t=!0,e=!1){return Object(n.a)(this,void 0,void 0,(function*(){["cas","keycloak","azure_saml"].indexOf(this.authMode)>-1&&!e?this.SsoLogout(t):["process","signatureBook"].indexOf(this.router.url.split("/")[1])>-1?(this.router.navigate(["/home"]),setTimeout(()=>{this.redirectAfterLogout(t),this.router.navigate(["/login"])},500)):(this.redirectAfterLogout(t),yield this.router.navigate(["/login"]))}))}SsoLogout(t=!0){this.http.get("../rest/authenticate/logout").pipe(Object(o.a)(e=>Object(n.a)(this,void 0,void 0,(function*(){this.redirectAfterLogout(t),window.location.href=e.logoutUrl})))).subscribe()}redirectAfterLogout(t=!0){null!==this.getToken()&&t&&this.cleanUrl(JSON.parse(atob(this.getToken().split(".")[1])).user.id),this.headerService.setUser(),this.clearTokens()}saveTokens(t,e){this.setToken(t),this.setRefreshToken(e)}isAuth(){return void 0!==this.headerService.user.id}updateUserInfo(t){const e=this.user.picture;this.user=JSON.parse(atob(t.split(".")[1])).user,this.user.picture=e}updateUserInfoWithTokenRefresh(){this.http.get("../rest/authenticate/token",{params:{refreshToken:this.getRefreshToken()}}).subscribe({next:t=>{this.setToken(t.token),this.updateUserInfo(this.getToken())},error:t=>{this.notify.handleSoftErrors(t)}})}setUser(t){this.user=t}applyMinorUpdate(){console.debug("applyMinorUpdate"),$("body").append('<div id="updateLoading" style="position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width: 200px;text-align: center;"><img src="assets/spinner.gif"></div>'),this.http.put("../rest/versionsUpdateSQL",{}).pipe(Object(r.a)(()=>$("#updateLoading").remove()),Object(c.a)(t=>(this.notify.handleSoftErrors(t),Object(s.a)(!1)))).subscribe()}checkAppSecurity(){console.debug("checkAppSecurity"),this.changeKey&&setTimeout(()=>{this.dialog.open(d.a,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{mode:"danger",title:this.translate.instant("lang.warnPrivateKeyTitle"),msg:this.translate.instant("lang.warnPrivateKey")}})},1e3)}getLoginInformations(t){return this.noInstall?"/install"===t?Object(s.a)(!0):(this.router.navigate(["/install"]),Object(s.a)(!1)):null!==this.getAppSession()?Object(s.a)(!0):this.http.get("../rest/authenticationInformations").pipe(Object(o.a)(t=>{if(console.debug("getLoginInformations"),this.setAppSession(t.instanceId),this.localStorage.save("lang",t.lang),this.translate.use(t.lang),this.changeKey=t.changeKey,this.applicationName=t.applicationName,this.loginMessage=t.loginMessage,this.setEvent("authenticationInformations"),this.authMode=t.authMode,this.authUri=t.authUri,"keycloak"===this.authMode){const e=this.localStorage.get("keycloakState");null!==e&&"null"!==e||this.localStorage.save("keycloakState",t.keycloakState)}this.applyMinorUpdate(),this.checkAppSecurity()}),Object(c.a)(e=>(console.log(e),this.http.get("../rest/validUrl").pipe(Object(l.a)(e=>this.functionsService.empty(e.url)?"moreOneCustom"===e.lang?(this.dialog.open(d.a,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.accessNotFound"),msg:this.translate.instant("lang.moreOneCustom"),hideButton:!0}}),!1):"noConfiguration"===e.lang?(this.noInstall=!0,"/install"===t||(console.log(this.router.url,"navigate to install"),this.router.navigate(["/install"]),!1)):void 0:(window.location.href=e.url,!1))))))}getCurrentUserInfo(){return this.isAuth()?Object(s.a)(!0):this.http.get("../rest/currentUser/profile").pipe(Object(o.a)(t=>{console.debug("getCurrentUserInfo"),this.headerService.user={mode:t.mode,id:t.id,status:t.status,userId:t.user_id,firstname:t.firstname,lastname:t.lastname,entities:t.entities,groups:t.groups,preferences:t.preferences,privileges:"ALL_PRIVILEGES"===t.privileges[0]?this.privilegeService.getAllPrivileges(!t.lockAdvancedPrivileges,this.authMode):t.privileges,featureTour:t.featureTour},this.headerService.nbResourcesFollowed=t.nbFollowedResources,this.privilegeService.resfreshUserShortcuts()}))}}return t.\u0275fac=function(e){return new(e||t)(h.ac(u.b),h.ac(p.c),h.ac(b.a),h.ac(f.a),h.ac(m.a),h.ac(g.a),h.ac(v.a),h.ac(_.b),h.ac(y.e))},t.\u0275prov=h.Mb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()},vWc3:function(t,e,i){"use strict";i.d(e,"a",(function(){return et}));var n=i("ofXK"),a=i("3Pt+"),s=i("tyNb"),o=i("5+WD"),r=i("aEDk"),c=i("fXoL");let l=(()=>{class t{constructor(t,e){this.document=t,this.platformId=e,this.documentIsAccessible=Object(n.I)(this.platformId)}check(t){return!!this.documentIsAccessible&&(t=encodeURIComponent(t),this.getCookieRegExp(t).test(this.document.cookie))}get(t){if(this.documentIsAccessible&&this.check(t)){t=encodeURIComponent(t);const e=this.getCookieRegExp(t).exec(this.document.cookie);return this.safeDecodeURIComponent(e[1])}return""}getAll(){if(!this.documentIsAccessible)return{};const t={},e=this.document;return e.cookie&&""!==e.cookie&&e.cookie.split(";").forEach(e=>{const[i,n]=e.split("=");t[this.safeDecodeURIComponent(i.replace(/^ /,""))]=this.safeDecodeURIComponent(n)}),t}set(t,e,i,n,a,s,o="Lax"){if(!this.documentIsAccessible)return;let r=encodeURIComponent(t)+"="+encodeURIComponent(e)+";";i&&(r+="number"==typeof i?"expires="+new Date((new Date).getTime()+1e3*i*60*60*24).toUTCString()+";":"expires="+i.toUTCString()+";"),n&&(r+="path="+n+";"),a&&(r+="domain="+a+";"),!1===s&&"None"===o&&(s=!0,console.warn(`[ngx-cookie-service] Cookie ${t} was forced with secure flag because sameSite=None.More details : https://github.com/stevermeister/ngx-cookie-service/issues/86#issuecomment-597720130`)),s&&(r+="secure;"),r+="sameSite="+o+";",this.document.cookie=r}delete(t,e,i,n,a="Lax"){this.documentIsAccessible&&this.set(t,"",new Date("Thu, 01 Jan 1970 00:00:01 GMT"),e,i,n,a)}deleteAll(t,e,i,n="Lax"){if(!this.documentIsAccessible)return;const a=this.getAll();for(const s in a)a.hasOwnProperty(s)&&this.delete(s,t,e,i,n)}getCookieRegExp(t){const e=t.replace(/([\[\]\{\}\(\)\|\=\;\+\?\,\.\*\^\$])/gi,"\\$1");return new RegExp("(?:^"+e+"|;\\s*"+e+")=(.*?)(?:;|$)","g")}safeDecodeURIComponent(t){try{return decodeURIComponent(t)}catch(e){return t}}}return t.\u0275fac=function(e){return new(e||t)(c.ac(n.e),c.ac(c.F))},t.\u0275prov=Object(c.Mb)({factory:function(){return new t(Object(c.ac)(n.e),Object(c.ac)(c.F))},token:t,providedIn:"root"}),t})(),d=(()=>{class t{}return t.\u0275mod=c.Ob({type:t}),t.\u0275inj=c.Nb({factory:function(e){return new(e||t)},providers:[r.c,l],imports:[[r.j],r.j]}),t})();var h=i("FKr1"),u=i("lJEt"),p=i("/1cH"),b=i("TU8p"),f=i("2ChS"),m=i("bTqV"),g=i("jaxi"),v=i("Wp6s"),_=i("bSwM"),y=i("A5z7"),x=i("iadO"),C=i("0IaG"),O=i("7EHt"),D=i("zkoq"),w=i("NFeN"),M=i("qFsG"),k=i("MutI"),S=i("STbY"),I=i("M9IT"),P=i("bv9b"),V=i("Xa2L"),R=i("QibW"),j=i("d3UM"),A=i("XhcP"),W=i("1jcm"),T=i("5RNC"),E=i("dNgK"),F=i("Dh3D"),L=i("xHqg"),Q=i("+0xr"),N=i("wZkO"),z=i("/t3+"),B=i("Qu3c"),U=i("vxfF"),$=i("8yBR"),H=i("sYmb");let G=(()=>{class t extends I.b{constructor(t){super(),this.translate=t,this.getRangeLabel=(t,e,i)=>{if(0===i||0===e)return"0 / "+i;i=Math.max(i,0);const n=Math.ceil(i/e);return`${this.translate.instant("lang.page")} ${t+1} / ${n}`},this.getAndInitTranslations()}getAndInitTranslations(){this.itemsPerPageLabel="",this.nextPageLabel=this.translate.instant("lang.nextPage"),this.previousPageLabel=this.translate.instant("lang.prevPage"),this.changes.next()}}return t.\u0275fac=function(e){return new(e||t)(c.ac(H.e))},t.\u0275prov=c.Mb({token:t,factory:t.\u0275fac}),t})(),X=(()=>{class t extends h.w{parse(t){if("string"==typeof t&&t.indexOf("/")>-1){const e=t.split("/"),i=Number(e[2]),n=Number(e[1])-1,a=Number(e[0]);return new Date(i,n,a)}const e="number"==typeof t?t:Date.parse(t);return isNaN(e)?null:new Date(e)}format(t,e){if("input"===e){const e=t.getDate(),i=t.getMonth()+1,n=t.getFullYear();return this._to2digit(e)+"/"+this._to2digit(i)+"/"+n}return t.toLocaleDateString(this.locale,{weekday:"short",year:"numeric",month:"short",day:"numeric"})}_to2digit(t){return("00"+t).slice(-2)}getFirstDayOfWeek(){return 1}}return t.\u0275fac=function(e){return q(e||t)},t.\u0275prov=c.Mb({token:t,factory:t.\u0275fac}),t})();const q=c.Yb(X),K={parse:{dateInput:{month:"short",year:"numeric",day:"numeric"}},display:{dateInput:"input",monthYearLabel:{month:"short",year:"numeric",day:"numeric"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"}}};let Y=(()=>{class t{}return t.\u0275mod=c.Ob({type:t}),t.\u0275inj=c.Nb({factory:function(e){return new(e||t)},providers:[{provide:I.b,useClass:G},{provide:h.f,useValue:"FR-fr"},{provide:h.c,useClass:X},{provide:h.e,useValue:K}],imports:[[_.b,j.b,W.b,M.c,B.c,N.g,A.g,m.c,v.j,g.c,V.b,P.b,z.b,S.c,D.c,Q.q,I.c,F.c,x.i,h.n,O.b,p.b,E.d,w.b,C.g,k.e,y.g,L.g,R.c,T.b,b.b,f.b,$.e,h.v,U.g,u.a.forRoot()],_.b,j.b,W.b,M.c,B.c,N.g,A.g,m.c,v.j,g.c,V.b,P.b,z.b,S.c,D.c,Q.q,I.c,F.c,x.i,h.n,O.b,p.b,E.d,w.b,C.g,k.e,y.g,L.g,R.c,T.b,b.b,f.b,h.v,$.e,U.g,u.a]}),t})();var J=i("AXEc");let Z=(()=>{class t{}return t.\u0275mod=c.Ob({type:t}),t.\u0275inj=c.Nb({factory:function(e){return new(e||t)},providers:[J.a],imports:[[Y,n.c]]}),t})();var tt=i("cMWS");let et=(()=>{class t{constructor(t){t.setDefaultLang("fr")}}return t.\u0275mod=c.Ob({type:t}),t.\u0275inj=c.Nb({factory:function(e){return new(e||t)(c.ac(H.e))},providers:[],imports:[[n.c,s.g,a.o,a.E,Y,o.g,d,Z,tt.a],n.c,a.o,a.E,s.g,Y,d,Z,o.g]}),t})()},vkgz:function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var n=i("7o/Q");function a(){}var s=i("n6bG");function o(t,e,i){return function(n){return n.lift(new r(t,e,i))}}class r{constructor(t,e,i){this.nextOrObserver=t,this.error=e,this.complete=i}call(t,e){return e.subscribe(new c(t,this.nextOrObserver,this.error,this.complete))}}class c extends n.a{constructor(t,e,i,n){super(t),this._tapNext=a,this._tapError=a,this._tapComplete=a,this._tapError=i||a,this._tapComplete=n||a,Object(s.a)(e)?(this._context=this,this._tapNext=e):e&&(this._context=e,this._tapNext=e.next||a,this._tapError=e.error||a,this._tapComplete=e.complete||a)}_next(t){try{this._tapNext.call(this._context,t)}catch(e){return void this.destination.error(e)}this.destination.next(t)}_error(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)}_complete(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()}}},vxfF:function(t,e,i){"use strict";i.d(e,"a",(function(){return R})),i.d(e,"b",(function(){return A})),i.d(e,"c",(function(){return Q})),i.d(e,"d",(function(){return L})),i.d(e,"e",(function(){return E})),i.d(e,"f",(function(){return j})),i.d(e,"g",(function(){return N})),i.d(e,"h",(function(){return W}));var n=i("8LU1"),a=i("fXoL"),s=i("XNiG"),o=i("LRne"),r=i("HDdC"),c=i("xgIS"),l=i("eNwd"),d=i("7Hc7"),h=i("quSY"),u=i("7+OI"),p=i("/uUt"),b=i("3UWI"),f=i("pLZG"),m=i("1G5W"),g=i("JX91"),v=i("7o/Q");class _{call(t,e){return e.subscribe(new y(t))}}class y extends v.a{constructor(t){super(t),this.hasPrev=!1}_next(t){let e;this.hasPrev?e=[this.prev,t]:this.hasPrev=!0,this.prev=t,e&&this.destination.next(e)}}var x=i("eIep"),C=i("UXun"),O=i("nLfN"),D=i("ofXK"),w=i("cH1L"),M=i("0EQZ");const k=["contentWrapper"],S=["*"],I=new a.s("VIRTUAL_SCROLL_STRATEGY");class P{constructor(t,e,i){this._scrolledIndexChange=new s.a,this.scrolledIndexChange=this._scrolledIndexChange.pipe(Object(p.a)()),this._viewport=null,this._itemSize=t,this._minBufferPx=e,this._maxBufferPx=i}attach(t){this._viewport=t,this._updateTotalContentSize(),this._updateRenderedRange()}detach(){this._scrolledIndexChange.complete(),this._viewport=null}updateItemAndBufferSize(t,e,i){this._itemSize=t,this._minBufferPx=e,this._maxBufferPx=i,this._updateTotalContentSize(),this._updateRenderedRange()}onContentScrolled(){this._updateRenderedRange()}onDataLengthChanged(){this._updateTotalContentSize(),this._updateRenderedRange()}onContentRendered(){}onRenderedOffsetChanged(){}scrollToIndex(t,e){this._viewport&&this._viewport.scrollToOffset(t*this._itemSize,e)}_updateTotalContentSize(){this._viewport&&this._viewport.setTotalContentSize(this._viewport.getDataLength()*this._itemSize)}_updateRenderedRange(){if(!this._viewport)return;const t=this._viewport.getRenderedRange(),e={start:t.start,end:t.end},i=this._viewport.getViewportSize(),n=this._viewport.getDataLength();let a=this._viewport.measureScrollOffset(),s=a/this._itemSize;if(e.end>n){const t=Math.ceil(i/this._itemSize),o=Math.max(0,Math.min(s,n-t));s!=o&&(s=o,a=o*this._itemSize,e.start=Math.floor(s)),e.end=Math.max(0,Math.min(n,e.start+t))}const o=a-e.start*this._itemSize;if(o<this._minBufferPx&&0!=e.start){const t=Math.ceil((this._maxBufferPx-o)/this._itemSize);e.start=Math.max(0,e.start-t),e.end=Math.min(n,Math.ceil(s+(i+this._minBufferPx)/this._itemSize))}else{const t=e.end*this._itemSize-(a+i);if(t<this._minBufferPx&&e.end!=n){const i=Math.ceil((this._maxBufferPx-t)/this._itemSize);i>0&&(e.end=Math.min(n,e.end+i),e.start=Math.max(0,Math.floor(s-this._minBufferPx/this._itemSize)))}}this._viewport.setRenderedRange(e),this._viewport.setRenderedContentOffset(this._itemSize*e.start),this._scrolledIndexChange.next(Math.floor(s))}}function V(t){return t._scrollStrategy}let R=(()=>{class t{constructor(){this._itemSize=20,this._minBufferPx=100,this._maxBufferPx=200,this._scrollStrategy=new P(this.itemSize,this.minBufferPx,this.maxBufferPx)}get itemSize(){return this._itemSize}set itemSize(t){this._itemSize=Object(n.f)(t)}get minBufferPx(){return this._minBufferPx}set minBufferPx(t){this._minBufferPx=Object(n.f)(t)}get maxBufferPx(){return this._maxBufferPx}set maxBufferPx(t){this._maxBufferPx=Object(n.f)(t)}ngOnChanges(){this._scrollStrategy.updateItemAndBufferSize(this.itemSize,this.minBufferPx,this.maxBufferPx)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=a.Lb({type:t,selectors:[["cdk-virtual-scroll-viewport","itemSize",""]],inputs:{itemSize:"itemSize",minBufferPx:"minBufferPx",maxBufferPx:"maxBufferPx"},features:[a.Cb([{provide:I,useFactory:V,deps:[Object(a.X)(()=>t)]}]),a.Bb]}),t})(),j=(()=>{class t{constructor(t,e,i){this._ngZone=t,this._platform=e,this._scrolled=new s.a,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=i}register(t){this.scrollContainers.has(t)||this.scrollContainers.set(t,t.elementScrolled().subscribe(()=>this._scrolled.next(t)))}deregister(t){const e=this.scrollContainers.get(t);e&&(e.unsubscribe(),this.scrollContainers.delete(t))}scrolled(t=20){return this._platform.isBrowser?new r.a(e=>{this._globalSubscription||this._addGlobalListener();const i=t>0?this._scrolled.pipe(Object(b.a)(t)).subscribe(e):this._scrolled.subscribe(e);return this._scrolledCount++,()=>{i.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):Object(o.a)()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((t,e)=>this.deregister(e)),this._scrolled.complete()}ancestorScrolled(t,e){const i=this.getAncestorScrollContainers(t);return this.scrolled(e).pipe(Object(f.a)(t=>!t||i.indexOf(t)>-1))}getAncestorScrollContainers(t){const e=[];return this.scrollContainers.forEach((i,n)=>{this._scrollableContainsElement(n,t)&&e.push(n)}),e}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_scrollableContainsElement(t,e){let i=e.nativeElement,n=t.getElementRef().nativeElement;do{if(i==n)return!0}while(i=i.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>{const t=this._getWindow();return Object(c.a)(t.document,"scroll").subscribe(()=>this._scrolled.next())})}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}return t.\u0275fac=function(e){return new(e||t)(a.ac(a.C),a.ac(O.a),a.ac(D.e,8))},t.\u0275prov=Object(a.Mb)({factory:function(){return new t(Object(a.ac)(a.C),Object(a.ac)(O.a),Object(a.ac)(D.e,8))},token:t,providedIn:"root"}),t})(),A=(()=>{class t{constructor(t,e,i,n){this.elementRef=t,this.scrollDispatcher=e,this.ngZone=i,this.dir=n,this._destroyed=new s.a,this._elementScrolled=new r.a(t=>this.ngZone.runOutsideAngular(()=>Object(c.a)(this.elementRef.nativeElement,"scroll").pipe(Object(m.a)(this._destroyed)).subscribe(t)))}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(t){const e=this.elementRef.nativeElement,i=this.dir&&"rtl"==this.dir.value;null==t.left&&(t.left=i?t.end:t.start),null==t.right&&(t.right=i?t.start:t.end),null!=t.bottom&&(t.top=e.scrollHeight-e.clientHeight-t.bottom),i&&0!=Object(O.d)()?(null!=t.left&&(t.right=e.scrollWidth-e.clientWidth-t.left),2==Object(O.d)()?t.left=t.right:1==Object(O.d)()&&(t.left=t.right?-t.right:t.right)):null!=t.right&&(t.left=e.scrollWidth-e.clientWidth-t.right),this._applyScrollToOptions(t)}_applyScrollToOptions(t){const e=this.elementRef.nativeElement;Object(O.g)()?e.scrollTo(t):(null!=t.top&&(e.scrollTop=t.top),null!=t.left&&(e.scrollLeft=t.left))}measureScrollOffset(t){const e=this.elementRef.nativeElement;if("top"==t)return e.scrollTop;if("bottom"==t)return e.scrollHeight-e.clientHeight-e.scrollTop;const i=this.dir&&"rtl"==this.dir.value;return"start"==t?t=i?"right":"left":"end"==t&&(t=i?"left":"right"),i&&2==Object(O.d)()?"left"==t?e.scrollWidth-e.clientWidth-e.scrollLeft:e.scrollLeft:i&&1==Object(O.d)()?"left"==t?e.scrollLeft+e.scrollWidth-e.clientWidth:-e.scrollLeft:"left"==t?e.scrollLeft:e.scrollWidth-e.clientWidth-e.scrollLeft}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(j),a.Qb(a.C),a.Qb(w.c,8))},t.\u0275dir=a.Lb({type:t,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]}),t})(),W=(()=>{class t{constructor(t,e,i){this._platform=t,this._change=new s.a,this._changeListener=t=>{this._change.next(t)},this._document=i,e.runOutsideAngular(()=>{if(t.isBrowser){const t=this._getWindow();t.addEventListener("resize",this._changeListener),t.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._updateViewportSize())})}ngOnDestroy(){if(this._platform.isBrowser){const t=this._getWindow();t.removeEventListener("resize",this._changeListener),t.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}getViewportRect(){const t=this.getViewportScrollPosition(),{width:e,height:i}=this.getViewportSize();return{top:t.top,left:t.left,bottom:t.top+i,right:t.left+e,height:i,width:e}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const t=this._getDocument(),e=this._getWindow(),i=t.documentElement,n=i.getBoundingClientRect();return{top:-n.top||t.body.scrollTop||e.scrollY||i.scrollTop||0,left:-n.left||t.body.scrollLeft||e.scrollX||i.scrollLeft||0}}change(t=20){return t>0?this._change.pipe(Object(b.a)(t)):this._change}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_updateViewportSize(){const t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}}return t.\u0275fac=function(e){return new(e||t)(a.ac(O.a),a.ac(a.C),a.ac(D.e,8))},t.\u0275prov=Object(a.Mb)({factory:function(){return new t(Object(a.ac)(O.a),Object(a.ac)(a.C),Object(a.ac)(D.e,8))},token:t,providedIn:"root"}),t})();const T="undefined"!=typeof requestAnimationFrame?l.a:d.a;let E=(()=>{class t extends A{constructor(t,e,i,n,a,o,c){super(t,o,i,a),this.elementRef=t,this._changeDetectorRef=e,this._scrollStrategy=n,this._detachedSubject=new s.a,this._renderedRangeSubject=new s.a,this._orientation="vertical",this.scrolledIndexChange=new r.a(t=>this._scrollStrategy.scrolledIndexChange.subscribe(e=>Promise.resolve().then(()=>this.ngZone.run(()=>t.next(e))))),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=h.a.EMPTY,c&&(this._viewportChanges=c.change().subscribe(()=>{this.checkViewportSize()}))}get orientation(){return this._orientation}set orientation(t){this._orientation!==t&&(this._orientation=t,this._calculateSpacerSize())}ngOnInit(){super.ngOnInit(),this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._measureViewportSize(),this._scrollStrategy.attach(this),this.elementScrolled().pipe(Object(g.a)(null),Object(b.a)(0,T)).subscribe(()=>this._scrollStrategy.onContentScrolled()),this._markChangeDetectionNeeded()}))}ngOnDestroy(){this.detach(),this._scrollStrategy.detach(),this._renderedRangeSubject.complete(),this._detachedSubject.complete(),this._viewportChanges.unsubscribe(),super.ngOnDestroy()}attach(t){this.ngZone.runOutsideAngular(()=>{this._forOf=t,this._forOf.dataStream.pipe(Object(m.a)(this._detachedSubject)).subscribe(t=>{const e=t.length;e!==this._dataLength&&(this._dataLength=e,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(t){this._totalContentSize!==t&&(this._totalContentSize=t,this._calculateSpacerSize(),this._markChangeDetectionNeeded())}setRenderedRange(t){var e,i;((e=this._renderedRange).start!=(i=t).start||e.end!=i.end)&&(this._renderedRangeSubject.next(this._renderedRange=t),this._markChangeDetectionNeeded(()=>this._scrollStrategy.onContentRendered()))}getOffsetToRenderedContentStart(){return this._renderedContentOffsetNeedsRewrite?null:this._renderedContentOffset}setRenderedContentOffset(t,e="to-start"){const i="horizontal"==this.orientation,n=i?"X":"Y";let a=`translate${n}(${Number((i&&this.dir&&"rtl"==this.dir.value?-1:1)*t)}px)`;this._renderedContentOffset=t,"to-end"===e&&(a+=` translate${n}(-100%)`,this._renderedContentOffsetNeedsRewrite=!0),this._renderedContentTransform!=a&&(this._renderedContentTransform=a,this._markChangeDetectionNeeded(()=>{this._renderedContentOffsetNeedsRewrite?(this._renderedContentOffset-=this.measureRenderedContentSize(),this._renderedContentOffsetNeedsRewrite=!1,this.setRenderedContentOffset(this._renderedContentOffset)):this._scrollStrategy.onRenderedOffsetChanged()}))}scrollToOffset(t,e="auto"){const i={behavior:e};"horizontal"===this.orientation?i.start=t:i.top=t,this.scrollTo(i)}scrollToIndex(t,e="auto"){this._scrollStrategy.scrollToIndex(t,e)}measureScrollOffset(t){return super.measureScrollOffset(t||("horizontal"===this.orientation?"start":"top"))}measureRenderedContentSize(){const t=this._contentWrapper.nativeElement;return"horizontal"===this.orientation?t.offsetWidth:t.offsetHeight}measureRangeSize(t){return this._forOf?this._forOf.measureRangeSize(t,this.orientation):0}checkViewportSize(){this._measureViewportSize(),this._scrollStrategy.onDataLengthChanged()}_measureViewportSize(){const t=this.elementRef.nativeElement;this._viewportSize="horizontal"===this.orientation?t.clientWidth:t.clientHeight}_markChangeDetectionNeeded(t){t&&this._runAfterChangeDetection.push(t),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 t=this._runAfterChangeDetection;this._runAfterChangeDetection=[];for(const e of t)e()}_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)(a.Qb(a.l),a.Qb(a.h),a.Qb(a.C),a.Qb(I,8),a.Qb(w.c,8),a.Qb(j),a.Qb(W))},t.\u0275cmp=a.Kb({type:t,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(t,e){var i;1&t&&a.Kc(k,!0),2&t&&a.yc(i=a.ec())&&(e._contentWrapper=i.first)},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(t,e){2&t&&a.Ib("cdk-virtual-scroll-orientation-horizontal","horizontal"===e.orientation)("cdk-virtual-scroll-orientation-vertical","horizontal"!==e.orientation)},inputs:{orientation:"orientation"},outputs:{scrolledIndexChange:"scrolledIndexChange"},features:[a.Cb([{provide:A,useExisting:t}]),a.Ab],ngContentSelectors:S,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(t,e){1&t&&(a.nc(),a.Wb(0,"div",0,1),a.mc(2),a.Vb(),a.Rb(3,"div",2)),2&t&&(a.Db(3),a.Lc("width",e._totalContentWidth)("height",e._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 F(t,e,i){if(!i.getBoundingClientRect)return 0;const n=i.getBoundingClientRect();return"horizontal"===t?"start"===e?n.left:n.right:"start"===e?n.top:n.bottom}let L=(()=>{class t{constructor(t,e,i,n,a,o){this._viewContainerRef=t,this._template=e,this._differs=i,this._viewRepeater=n,this._viewport=a,this.viewChange=new s.a,this._dataSourceChanges=new s.a,this.dataStream=this._dataSourceChanges.pipe(Object(g.a)(null),t=>t.lift(new _),Object(x.a)(([t,e])=>this._changeDataSource(t,e)),Object(C.a)(1)),this._differ=null,this._needsUpdate=!1,this._destroyed=new s.a,this.dataStream.subscribe(t=>{this._data=t,this._onRenderedDataChange()}),this._viewport.renderedRangeStream.pipe(Object(m.a)(this._destroyed)).subscribe(t=>{this._renderedRange=t,o.run(()=>this.viewChange.next(this._renderedRange)),this._onRenderedDataChange()}),this._viewport.attach(this)}get cdkVirtualForOf(){return this._cdkVirtualForOf}set cdkVirtualForOf(t){this._cdkVirtualForOf=t,Object(M.h)(t)?this._dataSourceChanges.next(t):this._dataSourceChanges.next(new M.a(Object(u.a)(t)?t:Array.from(t||[])))}get cdkVirtualForTrackBy(){return this._cdkVirtualForTrackBy}set cdkVirtualForTrackBy(t){this._needsUpdate=!0,this._cdkVirtualForTrackBy=t?(e,i)=>t(e+(this._renderedRange?this._renderedRange.start:0),i):void 0}set cdkVirtualForTemplate(t){t&&(this._needsUpdate=!0,this._template=t)}get cdkVirtualForTemplateCacheSize(){return this._viewRepeater.viewCacheSize}set cdkVirtualForTemplateCacheSize(t){this._viewRepeater.viewCacheSize=Object(n.f)(t)}measureRangeSize(t,e){if(t.start>=t.end)return 0;const i=t.start-this._renderedRange.start,n=t.end-t.start;let a,s;for(let o=0;o<n;o++){const t=this._viewContainerRef.get(o+i);if(t&&t.rootNodes.length){a=s=t.rootNodes[0];break}}for(let o=n-1;o>-1;o--){const t=this._viewContainerRef.get(o+i);if(t&&t.rootNodes.length){s=t.rootNodes[t.rootNodes.length-1];break}}return a&&s?F(e,"end",s)-F(e,"start",a):0}ngDoCheck(){if(this._differ&&this._needsUpdate){const t=this._differ.diff(this._renderedItems);t?this._applyChanges(t):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(this.cdkVirtualForTrackBy)),this._needsUpdate=!0)}_changeDataSource(t,e){return t&&t.disconnect(this),this._needsUpdate=!0,e?e.connect(this):Object(o.a)()}_updateContext(){const t=this._data.length;let e=this._viewContainerRef.length;for(;e--;){let i=this._viewContainerRef.get(e);i.context.index=this._renderedRange.start+e,i.context.count=t,this._updateComputedContextProperties(i.context),i.detectChanges()}}_applyChanges(t){this._viewRepeater.applyChanges(t,this._viewContainerRef,(t,e,i)=>this._getEmbeddedViewArgs(t,i),t=>t.item),t.forEachIdentityChange(t=>{this._viewContainerRef.get(t.currentIndex).context.$implicit=t.item});const e=this._data.length;let i=this._viewContainerRef.length;for(;i--;){const t=this._viewContainerRef.get(i);t.context.index=this._renderedRange.start+i,t.context.count=e,this._updateComputedContextProperties(t.context)}}_updateComputedContextProperties(t){t.first=0===t.index,t.last=t.index===t.count-1,t.even=t.index%2==0,t.odd=!t.even}_getEmbeddedViewArgs(t,e){return{templateRef:this._template,context:{$implicit:t.item,cdkVirtualForOf:this._cdkVirtualForOf,index:-1,count:-1,first:!1,last:!1,odd:!1,even:!1},index:e}}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.T),a.Qb(a.P),a.Qb(a.v),a.Qb(M.g),a.Qb(E,4),a.Qb(a.C))},t.\u0275dir=a.Lb({type:t,selectors:[["","cdkVirtualFor","","cdkVirtualForOf",""]],inputs:{cdkVirtualForOf:"cdkVirtualForOf",cdkVirtualForTrackBy:"cdkVirtualForTrackBy",cdkVirtualForTemplate:"cdkVirtualForTemplate",cdkVirtualForTemplateCacheSize:"cdkVirtualForTemplateCacheSize"},features:[a.Cb([{provide:M.g,useClass:M.f}])]}),t})(),Q=(()=>{class t{}return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)}}),t})(),N=(()=>{class t{}return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)},imports:[[w.a,O.b,Q],w.a,Q]}),t})()},w1tV:function(t,e,i){"use strict";i.d(e,"a",(function(){return b}));var n=i("XNiG"),a=i("HDdC"),s=i("7o/Q"),o=i("quSY");function r(){return function(t){return t.lift(new c(t))}}class c{constructor(t){this.connectable=t}call(t,e){const{connectable:i}=this;i._refCount++;const n=new l(t,i),a=e.subscribe(n);return n.closed||(n.connection=i.connect()),a}}class l extends s.a{constructor(t,e){super(t),this.connectable=e}_unsubscribe(){const{connectable:t}=this;if(!t)return void(this.connection=null);this.connectable=null;const e=t._refCount;if(e<=0)return void(this.connection=null);if(t._refCount=e-1,e>1)return void(this.connection=null);const{connection:i}=this,n=t._connection;this.connection=null,!n||i&&n!==i||n.unsubscribe()}}class d extends a.a{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._refCount=0,this._isComplete=!1}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){const t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject}connect(){let t=this._connection;return t||(this._isComplete=!1,t=this._connection=new o.a,t.add(this.source.subscribe(new u(this.getSubject(),this))),t.closed&&(this._connection=null,t=o.a.EMPTY)),t}refCount(){return r()(this)}}const h=(()=>{const t=d.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 u extends n.b{constructor(t,e){super(t),this.connectable=e}_error(t){this._unsubscribe(),super._error(t)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const t=this.connectable;if(t){this.connectable=null;const e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}}}function p(){return new n.a}function b(){return t=>{return r()((e=p,function(t){let i;i="function"==typeof e?e:function(){return e};const n=Object.create(t,h);return n.source=t,n.subjectFactory=i,n})(t));var e}}},wZkO:function(t,e,i){"use strict";i.d(e,"a",(function(){return J})),i.d(e,"b",(function(){return $})),i.d(e,"c",(function(){return lt})),i.d(e,"d",(function(){return G})),i.d(e,"e",(function(){return Ct})),i.d(e,"f",(function(){return vt})),i.d(e,"g",(function(){return Ot}));var n=i("u47x"),a=i("GU7r"),s=i("+rOU"),o=i("ofXK"),r=i("fXoL"),c=i("FKr1"),l=i("R1ws"),d=i("XNiG"),h=i("quSY"),u=i("VRyK"),p=i("xgIS"),b=i("LRne"),f=i("PqYM"),m=i("R0Ic"),g=i("JX91"),v=i("/uUt"),_=i("1G5W"),y=i("8LU1"),x=i("nLfN"),C=i("FtGj"),O=i("cH1L"),D=i("vxfF");function w(t,e){1&t&&r.mc(0)}const M=["*"];function k(t,e){}const S=function(t){return{animationDuration:t}},I=function(t,e){return{value:t,params:e}},P=["tabBodyWrapper"],V=["tabHeader"];function R(t,e){}function j(t,e){if(1&t&&r.Oc(0,R,0,0,"ng-template",9),2&t){const t=r.hc().$implicit;r.oc("cdkPortalOutlet",t.templateLabel)}}function A(t,e){if(1&t&&r.Qc(0),2&t){const t=r.hc().$implicit;r.Rc(t.textLabel)}}function W(t,e){if(1&t){const t=r.Xb();r.Wb(0,"div",6),r.dc("click",(function(){r.Dc(t);const i=e.$implicit,n=e.index,a=r.hc(),s=r.zc(1);return a._handleClick(i,s,n)})),r.Wb(1,"div",7),r.Oc(2,j,1,1,"ng-template",8),r.Oc(3,A,1,1,"ng-template",8),r.Vb(),r.Vb()}if(2&t){const t=e.$implicit,i=e.index,n=r.hc();r.Ib("mat-tab-label-active",n.selectedIndex==i),r.oc("id",n._getTabLabelId(i))("disabled",t.disabled)("matRippleDisabled",t.disabled||n.disableRipple),r.Eb("tabIndex",n._getTabIndex(t,i))("aria-posinset",i+1)("aria-setsize",n._tabs.length)("aria-controls",n._getTabContentId(i))("aria-selected",n.selectedIndex==i)("aria-label",t.ariaLabel||null)("aria-labelledby",!t.ariaLabel&&t.ariaLabelledby?t.ariaLabelledby:null),r.Db(2),r.oc("ngIf",t.templateLabel),r.Db(1),r.oc("ngIf",!t.templateLabel)}}function T(t,e){if(1&t){const t=r.Xb();r.Wb(0,"mat-tab-body",10),r.dc("_onCentered",(function(){return r.Dc(t),r.hc()._removeTabBodyWrapperHeight()}))("_onCentering",(function(e){return r.Dc(t),r.hc()._setTabBodyWrapperHeight(e)})),r.Vb()}if(2&t){const t=e.$implicit,i=e.index,n=r.hc();r.Ib("mat-tab-body-active",n.selectedIndex==i),r.oc("id",n._getTabContentId(i))("content",t.content)("position",t.position)("origin",t.origin)("animationDuration",n.animationDuration),r.Eb("aria-labelledby",n._getTabLabelId(i))}}const E=["tabListContainer"],F=["tabList"],L=["nextPaginator"],Q=["previousPaginator"],N=["mat-tab-nav-bar",""],z=new r.s("MatInkBarPositioner",{providedIn:"root",factory:function(){return t=>({left:t?(t.offsetLeft||0)+"px":"0",width:t?(t.offsetWidth||0)+"px":"0"})}});let B=(()=>{class t{constructor(t,e,i,n){this._elementRef=t,this._ngZone=e,this._inkBarPositioner=i,this._animationMode=n}alignToElement(t){this.show(),"undefined"!=typeof requestAnimationFrame?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this._setStyles(t))}):this._setStyles(t)}show(){this._elementRef.nativeElement.style.visibility="visible"}hide(){this._elementRef.nativeElement.style.visibility="hidden"}_setStyles(t){const e=this._inkBarPositioner(t),i=this._elementRef.nativeElement;i.style.left=e.left,i.style.width=e.width}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l),r.Qb(r.C),r.Qb(z),r.Qb(l.a,8))},t.\u0275dir=r.Lb({type:t,selectors:[["mat-ink-bar"]],hostAttrs:[1,"mat-ink-bar"],hostVars:2,hostBindings:function(t,e){2&t&&r.Ib("_mat-animation-noopable","NoopAnimations"===e._animationMode)}}),t})();const U=new r.s("MatTabContent");let $=(()=>{class t{constructor(t){this.template=t}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.P))},t.\u0275dir=r.Lb({type:t,selectors:[["","matTabContent",""]],features:[r.Cb([{provide:U,useExisting:t}])]}),t})();const H=new r.s("MatTabLabel");let G=(()=>{class t extends s.b{}return t.\u0275fac=function(e){return X(e||t)},t.\u0275dir=r.Lb({type:t,selectors:[["","mat-tab-label",""],["","matTabLabel",""]],features:[r.Cb([{provide:H,useExisting:t}]),r.Ab]}),t})();const X=r.Yb(G);class q{}const K=Object(c.C)(q),Y=new r.s("MAT_TAB_GROUP");let J=(()=>{class t extends K{constructor(t,e){super(),this._viewContainerRef=t,this._closestTabGroup=e,this.textLabel="",this._contentPortal=null,this._stateChanges=new d.a,this.position=null,this.origin=null,this.isActive=!1}get templateLabel(){return this._templateLabel}set templateLabel(t){this._setTemplateLabelInput(t)}get content(){return this._contentPortal}ngOnChanges(t){(t.hasOwnProperty("textLabel")||t.hasOwnProperty("disabled"))&&this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}ngOnInit(){this._contentPortal=new s.i(this._explicitContent||this._implicitContent,this._viewContainerRef)}_setTemplateLabelInput(t){t&&(this._templateLabel=t)}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.T),r.Qb(Y,8))},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-tab"]],contentQueries:function(t,e,i){var n;1&t&&(r.Jb(i,H,!0),r.Jc(i,U,!0,r.P)),2&t&&(r.yc(n=r.ec())&&(e.templateLabel=n.first),r.yc(n=r.ec())&&(e._explicitContent=n.first))},viewQuery:function(t,e){var i;1&t&&r.Kc(r.P,!0),2&t&&r.yc(i=r.ec())&&(e._implicitContent=i.first)},inputs:{disabled:"disabled",textLabel:["label","textLabel"],ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"]},exportAs:["matTab"],features:[r.Ab,r.Bb],ngContentSelectors:M,decls:1,vars:0,template:function(t,e){1&t&&(r.nc(),r.Oc(0,w,1,0,"ng-template"))},encapsulation:2}),t})();const Z={translateTab:Object(m.n)("translateTab",[Object(m.k)("center, void, left-origin-center, right-origin-center",Object(m.l)({transform:"none"})),Object(m.k)("left",Object(m.l)({transform:"translate3d(-100%, 0, 0)",minHeight:"1px"})),Object(m.k)("right",Object(m.l)({transform:"translate3d(100%, 0, 0)",minHeight:"1px"})),Object(m.m)("* => left, * => right, left => center, right => center",Object(m.e)("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")),Object(m.m)("void => left-origin-center",[Object(m.l)({transform:"translate3d(-100%, 0, 0)"}),Object(m.e)("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")]),Object(m.m)("void => right-origin-center",[Object(m.l)({transform:"translate3d(100%, 0, 0)"}),Object(m.e)("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")])])};let tt=(()=>{class t extends s.c{constructor(t,e,i,n){super(t,e,n),this._host=i,this._centeringSub=h.a.EMPTY,this._leavingSub=h.a.EMPTY}ngOnInit(){super.ngOnInit(),this._centeringSub=this._host._beforeCentering.pipe(Object(g.a)(this._host._isCenterPosition(this._host._position))).subscribe(t=>{t&&!this.hasAttached()&&this.attach(this._host._content)}),this._leavingSub=this._host._afterLeavingCenter.subscribe(()=>{this.detach()})}ngOnDestroy(){super.ngOnDestroy(),this._centeringSub.unsubscribe(),this._leavingSub.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.j),r.Qb(r.T),r.Qb(Object(r.X)(()=>it)),r.Qb(o.e))},t.\u0275dir=r.Lb({type:t,selectors:[["","matTabBodyHost",""]],features:[r.Ab]}),t})(),et=(()=>{class t{constructor(t,e,i){this._elementRef=t,this._dir=e,this._dirChangeSubscription=h.a.EMPTY,this._translateTabComplete=new d.a,this._onCentering=new r.o,this._beforeCentering=new r.o,this._afterLeavingCenter=new r.o,this._onCentered=new r.o(!0),this.animationDuration="500ms",e&&(this._dirChangeSubscription=e.change.subscribe(t=>{this._computePositionAnimationState(t),i.markForCheck()})),this._translateTabComplete.pipe(Object(v.a)((t,e)=>t.fromState===e.fromState&&t.toState===e.toState)).subscribe(t=>{this._isCenterPosition(t.toState)&&this._isCenterPosition(this._position)&&this._onCentered.emit(),this._isCenterPosition(t.fromState)&&!this._isCenterPosition(this._position)&&this._afterLeavingCenter.emit()})}set position(t){this._positionIndex=t,this._computePositionAnimationState()}ngOnInit(){"center"==this._position&&null!=this.origin&&(this._position=this._computePositionFromOrigin(this.origin))}ngOnDestroy(){this._dirChangeSubscription.unsubscribe(),this._translateTabComplete.complete()}_onTranslateTabStarted(t){const e=this._isCenterPosition(t.toState);this._beforeCentering.emit(e),e&&this._onCentering.emit(this._elementRef.nativeElement.clientHeight)}_getLayoutDirection(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}_isCenterPosition(t){return"center"==t||"left-origin-center"==t||"right-origin-center"==t}_computePositionAnimationState(t=this._getLayoutDirection()){this._position=this._positionIndex<0?"ltr"==t?"left":"right":this._positionIndex>0?"ltr"==t?"right":"left":"center"}_computePositionFromOrigin(t){const e=this._getLayoutDirection();return"ltr"==e&&t<=0||"rtl"==e&&t>0?"left-origin-center":"right-origin-center"}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l),r.Qb(O.c,8),r.Qb(r.h))},t.\u0275dir=r.Lb({type:t,inputs:{animationDuration:"animationDuration",position:"position",_content:["content","_content"],origin:"origin"},outputs:{_onCentering:"_onCentering",_beforeCentering:"_beforeCentering",_afterLeavingCenter:"_afterLeavingCenter",_onCentered:"_onCentered"}}),t})(),it=(()=>{class t extends et{constructor(t,e,i){super(t,e,i)}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l),r.Qb(O.c,8),r.Qb(r.h))},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-tab-body"]],viewQuery:function(t,e){var i;1&t&&r.Xc(s.g,!0),2&t&&r.yc(i=r.ec())&&(e._portalHost=i.first)},hostAttrs:[1,"mat-tab-body"],features:[r.Ab],decls:3,vars:6,consts:[[1,"mat-tab-body-content"],["content",""],["matTabBodyHost",""]],template:function(t,e){1&t&&(r.Wb(0,"div",0,1),r.dc("@translateTab.start",(function(t){return e._onTranslateTabStarted(t)}))("@translateTab.done",(function(t){return e._translateTabComplete.next(t)})),r.Oc(2,k,0,0,"ng-template",2),r.Vb()),2&t&&r.oc("@translateTab",r.wc(3,I,e._position,r.vc(1,S,e.animationDuration)))},directives:[tt],styles:[".mat-tab-body-content{height:100%;overflow:auto}.mat-tab-group-dynamic-height .mat-tab-body-content{overflow:hidden}\n"],encapsulation:2,data:{animation:[Z.translateTab]}}),t})();const nt=new r.s("MAT_TABS_CONFIG");let at=0;class st{}class ot{constructor(t){this._elementRef=t}}const rt=Object(c.A)(Object(c.B)(ot),"primary");let ct=(()=>{class t extends rt{constructor(t,e,i,n){super(t),this._changeDetectorRef=e,this._animationMode=n,this._tabs=new r.H,this._indexToSelect=0,this._tabBodyWrapperHeight=0,this._tabsSubscription=h.a.EMPTY,this._tabLabelSubscription=h.a.EMPTY,this._dynamicHeight=!1,this._selectedIndex=null,this.headerPosition="above",this.selectedIndexChange=new r.o,this.focusChange=new r.o,this.animationDone=new r.o,this.selectedTabChange=new r.o(!0),this._groupId=at++,this.animationDuration=i&&i.animationDuration?i.animationDuration:"500ms",this.disablePagination=!(!i||null==i.disablePagination)&&i.disablePagination}get dynamicHeight(){return this._dynamicHeight}set dynamicHeight(t){this._dynamicHeight=Object(y.c)(t)}get selectedIndex(){return this._selectedIndex}set selectedIndex(t){this._indexToSelect=Object(y.f)(t,null)}get animationDuration(){return this._animationDuration}set animationDuration(t){this._animationDuration=/^\d+$/.test(t)?t+"ms":t}get backgroundColor(){return this._backgroundColor}set backgroundColor(t){const e=this._elementRef.nativeElement;e.classList.remove("mat-background-"+this.backgroundColor),t&&e.classList.add("mat-background-"+t),this._backgroundColor=t}ngAfterContentChecked(){const t=this._indexToSelect=this._clampTabIndex(this._indexToSelect);if(this._selectedIndex!=t){const e=null==this._selectedIndex;e||this.selectedTabChange.emit(this._createChangeEvent(t)),Promise.resolve().then(()=>{this._tabs.forEach((e,i)=>e.isActive=i===t),e||this.selectedIndexChange.emit(t)})}this._tabs.forEach((e,i)=>{e.position=i-t,null==this._selectedIndex||0!=e.position||e.origin||(e.origin=t-this._selectedIndex)}),this._selectedIndex!==t&&(this._selectedIndex=t,this._changeDetectorRef.markForCheck())}ngAfterContentInit(){this._subscribeToAllTabChanges(),this._subscribeToTabLabels(),this._tabsSubscription=this._tabs.changes.subscribe(()=>{if(this._clampTabIndex(this._indexToSelect)===this._selectedIndex){const t=this._tabs.toArray();for(let e=0;e<t.length;e++)if(t[e].isActive){this._indexToSelect=this._selectedIndex=e;break}}this._changeDetectorRef.markForCheck()})}_subscribeToAllTabChanges(){this._allTabs.changes.pipe(Object(g.a)(this._allTabs)).subscribe(t=>{this._tabs.reset(t.filter(t=>!t._closestTabGroup||t._closestTabGroup===this)),this._tabs.notifyOnChanges()})}ngOnDestroy(){this._tabs.destroy(),this._tabsSubscription.unsubscribe(),this._tabLabelSubscription.unsubscribe()}realignInkBar(){this._tabHeader&&this._tabHeader._alignInkBarToSelectedTab()}_focusChanged(t){this.focusChange.emit(this._createChangeEvent(t))}_createChangeEvent(t){const e=new st;return e.index=t,this._tabs&&this._tabs.length&&(e.tab=this._tabs.toArray()[t]),e}_subscribeToTabLabels(){this._tabLabelSubscription&&this._tabLabelSubscription.unsubscribe(),this._tabLabelSubscription=Object(u.a)(...this._tabs.map(t=>t._stateChanges)).subscribe(()=>this._changeDetectorRef.markForCheck())}_clampTabIndex(t){return Math.min(this._tabs.length-1,Math.max(t||0,0))}_getTabLabelId(t){return`mat-tab-label-${this._groupId}-${t}`}_getTabContentId(t){return`mat-tab-content-${this._groupId}-${t}`}_setTabBodyWrapperHeight(t){if(!this._dynamicHeight||!this._tabBodyWrapperHeight)return;const e=this._tabBodyWrapper.nativeElement;e.style.height=this._tabBodyWrapperHeight+"px",this._tabBodyWrapper.nativeElement.offsetHeight&&(e.style.height=t+"px")}_removeTabBodyWrapperHeight(){const t=this._tabBodyWrapper.nativeElement;this._tabBodyWrapperHeight=t.clientHeight,t.style.height="",this.animationDone.emit()}_handleClick(t,e,i){t.disabled||(this.selectedIndex=e.focusIndex=i)}_getTabIndex(t,e){return t.disabled?null:this.selectedIndex===e?0:-1}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l),r.Qb(r.h),r.Qb(nt,8),r.Qb(l.a,8))},t.\u0275dir=r.Lb({type:t,inputs:{headerPosition:"headerPosition",animationDuration:"animationDuration",disablePagination:"disablePagination",dynamicHeight:"dynamicHeight",selectedIndex:"selectedIndex",backgroundColor:"backgroundColor"},outputs:{selectedIndexChange:"selectedIndexChange",focusChange:"focusChange",animationDone:"animationDone",selectedTabChange:"selectedTabChange"},features:[r.Ab]}),t})(),lt=(()=>{class t extends ct{constructor(t,e,i,n){super(t,e,i,n)}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l),r.Qb(r.h),r.Qb(nt,8),r.Qb(l.a,8))},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-tab-group"]],contentQueries:function(t,e,i){var n;1&t&&r.Jb(i,J,!0),2&t&&r.yc(n=r.ec())&&(e._allTabs=n)},viewQuery:function(t,e){var i;1&t&&(r.Xc(P,!0),r.Xc(V,!0)),2&t&&(r.yc(i=r.ec())&&(e._tabBodyWrapper=i.first),r.yc(i=r.ec())&&(e._tabHeader=i.first))},hostAttrs:[1,"mat-tab-group"],hostVars:4,hostBindings:function(t,e){2&t&&r.Ib("mat-tab-group-dynamic-height",e.dynamicHeight)("mat-tab-group-inverted-header","below"===e.headerPosition)},inputs:{color:"color",disableRipple:"disableRipple"},exportAs:["matTabGroup"],features:[r.Cb([{provide:Y,useExisting:t}]),r.Ab],decls:6,vars:7,consts:[[3,"selectedIndex","disableRipple","disablePagination","indexFocused","selectFocusedIndex"],["tabHeader",""],["class","mat-tab-label mat-focus-indicator","role","tab","matTabLabelWrapper","","mat-ripple","","cdkMonitorElementFocus","",3,"id","mat-tab-label-active","disabled","matRippleDisabled","click",4,"ngFor","ngForOf"],[1,"mat-tab-body-wrapper"],["tabBodyWrapper",""],["role","tabpanel",3,"id","mat-tab-body-active","content","position","origin","animationDuration","_onCentered","_onCentering",4,"ngFor","ngForOf"],["role","tab","matTabLabelWrapper","","mat-ripple","","cdkMonitorElementFocus","",1,"mat-tab-label","mat-focus-indicator",3,"id","disabled","matRippleDisabled","click"],[1,"mat-tab-label-content"],[3,"ngIf"],[3,"cdkPortalOutlet"],["role","tabpanel",3,"id","content","position","origin","animationDuration","_onCentered","_onCentering"]],template:function(t,e){1&t&&(r.Wb(0,"mat-tab-header",0,1),r.dc("indexFocused",(function(t){return e._focusChanged(t)}))("selectFocusedIndex",(function(t){return e.selectedIndex=t})),r.Oc(2,W,4,14,"div",2),r.Vb(),r.Wb(3,"div",3,4),r.Oc(5,T,1,8,"mat-tab-body",5),r.Vb()),2&t&&(r.oc("selectedIndex",e.selectedIndex||0)("disableRipple",e.disableRipple)("disablePagination",e.disablePagination),r.Db(2),r.oc("ngForOf",e._tabs),r.Db(1),r.Ib("_mat-animation-noopable","NoopAnimations"===e._animationMode),r.Db(2),r.oc("ngForOf",e._tabs))},directives:function(){return[mt,o.s,ut,c.u,n.e,o.t,s.c,it]},styles:[".mat-tab-group{display:flex;flex-direction:column}.mat-tab-group.mat-tab-group-inverted-header{flex-direction:column-reverse}.mat-tab-label{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;position:relative}.mat-tab-label:focus{outline:none}.mat-tab-label:focus:not(.mat-tab-disabled){opacity:1}.cdk-high-contrast-active .mat-tab-label:focus{outline:dotted 2px;outline-offset:-2px}.mat-tab-label.mat-tab-disabled{cursor:default}.cdk-high-contrast-active .mat-tab-label.mat-tab-disabled{opacity:.5}.mat-tab-label .mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}.cdk-high-contrast-active .mat-tab-label{opacity:1}@media(max-width: 599px){.mat-tab-label{padding:0 12px}}@media(max-width: 959px){.mat-tab-label{padding:0 12px}}.mat-tab-group[mat-stretch-tabs]>.mat-tab-header .mat-tab-label{flex-basis:0;flex-grow:1}.mat-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable.mat-tab-body-wrapper{transition:none;animation:none}.mat-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;flex-basis:100%}.mat-tab-body.mat-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-tab-group.mat-tab-group-dynamic-height .mat-tab-body.mat-tab-body-active{overflow-y:hidden}\n"],encapsulation:2}),t})();class dt{}const ht=Object(c.C)(dt);let ut=(()=>{class t extends ht{constructor(t){super(),this.elementRef=t}focus(){this.elementRef.nativeElement.focus()}getOffsetLeft(){return this.elementRef.nativeElement.offsetLeft}getOffsetWidth(){return this.elementRef.nativeElement.offsetWidth}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l))},t.\u0275dir=r.Lb({type:t,selectors:[["","matTabLabelWrapper",""]],hostVars:3,hostBindings:function(t,e){2&t&&(r.Eb("aria-disabled",!!e.disabled),r.Ib("mat-tab-disabled",e.disabled))},inputs:{disabled:"disabled"},features:[r.Ab]}),t})();const pt=Object(x.f)({passive:!0});let bt=(()=>{class t{constructor(t,e,i,n,a,s,o){this._elementRef=t,this._changeDetectorRef=e,this._viewportRuler=i,this._dir=n,this._ngZone=a,this._platform=s,this._animationMode=o,this._scrollDistance=0,this._selectedIndexChanged=!1,this._destroyed=new d.a,this._showPaginationControls=!1,this._disableScrollAfter=!0,this._disableScrollBefore=!0,this._stopScrolling=new d.a,this.disablePagination=!1,this._selectedIndex=0,this.selectFocusedIndex=new r.o,this.indexFocused=new r.o,a.runOutsideAngular(()=>{Object(p.a)(t.nativeElement,"mouseleave").pipe(Object(_.a)(this._destroyed)).subscribe(()=>{this._stopInterval()})})}get selectedIndex(){return this._selectedIndex}set selectedIndex(t){t=Object(y.f)(t),this._selectedIndex!=t&&(this._selectedIndexChanged=!0,this._selectedIndex=t,this._keyManager&&this._keyManager.updateActiveItem(t))}ngAfterViewInit(){Object(p.a)(this._previousPaginator.nativeElement,"touchstart",pt).pipe(Object(_.a)(this._destroyed)).subscribe(()=>{this._handlePaginatorPress("before")}),Object(p.a)(this._nextPaginator.nativeElement,"touchstart",pt).pipe(Object(_.a)(this._destroyed)).subscribe(()=>{this._handlePaginatorPress("after")})}ngAfterContentInit(){const t=this._dir?this._dir.change:Object(b.a)(null),e=this._viewportRuler.change(150),i=()=>{this.updatePagination(),this._alignInkBarToSelectedTab()};this._keyManager=new n.g(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap(),this._keyManager.updateActiveItem(this._selectedIndex),"undefined"!=typeof requestAnimationFrame?requestAnimationFrame(i):i(),Object(u.a)(t,e,this._items.changes).pipe(Object(_.a)(this._destroyed)).subscribe(()=>{Promise.resolve().then(i),this._keyManager.withHorizontalOrientation(this._getLayoutDirection())}),this._keyManager.change.pipe(Object(_.a)(this._destroyed)).subscribe(t=>{this.indexFocused.emit(t),this._setTabFocus(t)})}ngAfterContentChecked(){this._tabLabelCount!=this._items.length&&(this.updatePagination(),this._tabLabelCount=this._items.length,this._changeDetectorRef.markForCheck()),this._selectedIndexChanged&&(this._scrollToLabel(this._selectedIndex),this._checkScrollingControls(),this._alignInkBarToSelectedTab(),this._selectedIndexChanged=!1,this._changeDetectorRef.markForCheck()),this._scrollDistanceChanged&&(this._updateTabScrollPosition(),this._scrollDistanceChanged=!1,this._changeDetectorRef.markForCheck())}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete(),this._stopScrolling.complete()}_handleKeydown(t){if(!Object(C.v)(t))switch(t.keyCode){case C.g:case C.q:this.focusIndex!==this.selectedIndex&&(this.selectFocusedIndex.emit(this.focusIndex),this._itemSelected(t));break;default:this._keyManager.onKeydown(t)}}_onContentChanges(){const t=this._elementRef.nativeElement.textContent;t!==this._currentTextContent&&(this._currentTextContent=t||"",this._ngZone.run(()=>{this.updatePagination(),this._alignInkBarToSelectedTab(),this._changeDetectorRef.markForCheck()}))}updatePagination(){this._checkPaginationEnabled(),this._checkScrollingControls(),this._updateTabScrollPosition()}get focusIndex(){return this._keyManager?this._keyManager.activeItemIndex:0}set focusIndex(t){this._isValidIndex(t)&&this.focusIndex!==t&&this._keyManager&&this._keyManager.setActiveItem(t)}_isValidIndex(t){if(!this._items)return!0;const e=this._items?this._items.toArray()[t]:null;return!!e&&!e.disabled}_setTabFocus(t){if(this._showPaginationControls&&this._scrollToLabel(t),this._items&&this._items.length){this._items.toArray()[t].focus();const e=this._tabListContainer.nativeElement,i=this._getLayoutDirection();e.scrollLeft="ltr"==i?0:e.scrollWidth-e.offsetWidth}}_getLayoutDirection(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}_updateTabScrollPosition(){if(this.disablePagination)return;const t=this.scrollDistance,e=this._platform,i="ltr"===this._getLayoutDirection()?-t:t;this._tabList.nativeElement.style.transform=`translateX(${Math.round(i)}px)`,e&&(e.TRIDENT||e.EDGE)&&(this._tabListContainer.nativeElement.scrollLeft=0)}get scrollDistance(){return this._scrollDistance}set scrollDistance(t){this._scrollTo(t)}_scrollHeader(t){return this._scrollTo(this._scrollDistance+("before"==t?-1:1)*this._tabListContainer.nativeElement.offsetWidth/3)}_handlePaginatorClick(t){this._stopInterval(),this._scrollHeader(t)}_scrollToLabel(t){if(this.disablePagination)return;const e=this._items?this._items.toArray()[t]:null;if(!e)return;const i=this._tabListContainer.nativeElement.offsetWidth,{offsetLeft:n,offsetWidth:a}=e.elementRef.nativeElement;let s,o;"ltr"==this._getLayoutDirection()?(s=n,o=s+a):(o=this._tabList.nativeElement.offsetWidth-n,s=o-a);const r=this.scrollDistance,c=this.scrollDistance+i;s<r?this.scrollDistance-=r-s+60:o>c&&(this.scrollDistance+=o-c+60)}_checkPaginationEnabled(){if(this.disablePagination)this._showPaginationControls=!1;else{const t=this._tabList.nativeElement.scrollWidth>this._elementRef.nativeElement.offsetWidth;t||(this.scrollDistance=0),t!==this._showPaginationControls&&this._changeDetectorRef.markForCheck(),this._showPaginationControls=t}}_checkScrollingControls(){this.disablePagination?this._disableScrollAfter=this._disableScrollBefore=!0:(this._disableScrollBefore=0==this.scrollDistance,this._disableScrollAfter=this.scrollDistance==this._getMaxScrollDistance(),this._changeDetectorRef.markForCheck())}_getMaxScrollDistance(){return this._tabList.nativeElement.scrollWidth-this._tabListContainer.nativeElement.offsetWidth||0}_alignInkBarToSelectedTab(){const t=this._items&&this._items.length?this._items.toArray()[this.selectedIndex]:null,e=t?t.elementRef.nativeElement:null;e?this._inkBar.alignToElement(e):this._inkBar.hide()}_stopInterval(){this._stopScrolling.next()}_handlePaginatorPress(t,e){e&&null!=e.button&&0!==e.button||(this._stopInterval(),Object(f.a)(650,100).pipe(Object(_.a)(Object(u.a)(this._stopScrolling,this._destroyed))).subscribe(()=>{const{maxScrollDistance:e,distance:i}=this._scrollHeader(t);(0===i||i>=e)&&this._stopInterval()}))}_scrollTo(t){if(this.disablePagination)return{maxScrollDistance:0,distance:0};const e=this._getMaxScrollDistance();return this._scrollDistance=Math.max(0,Math.min(e,t)),this._scrollDistanceChanged=!0,this._checkScrollingControls(),{maxScrollDistance:e,distance:this._scrollDistance}}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l),r.Qb(r.h),r.Qb(D.h),r.Qb(O.c,8),r.Qb(r.C),r.Qb(x.a),r.Qb(l.a,8))},t.\u0275dir=r.Lb({type:t,inputs:{disablePagination:"disablePagination"}}),t})(),ft=(()=>{class t extends bt{constructor(t,e,i,n,a,s,o){super(t,e,i,n,a,s,o),this._disableRipple=!1}get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=Object(y.c)(t)}_itemSelected(t){t.preventDefault()}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l),r.Qb(r.h),r.Qb(D.h),r.Qb(O.c,8),r.Qb(r.C),r.Qb(x.a),r.Qb(l.a,8))},t.\u0275dir=r.Lb({type:t,inputs:{disableRipple:"disableRipple"},features:[r.Ab]}),t})(),mt=(()=>{class t extends ft{constructor(t,e,i,n,a,s,o){super(t,e,i,n,a,s,o)}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l),r.Qb(r.h),r.Qb(D.h),r.Qb(O.c,8),r.Qb(r.C),r.Qb(x.a),r.Qb(l.a,8))},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-tab-header"]],contentQueries:function(t,e,i){var n;1&t&&r.Jb(i,ut,!1),2&t&&r.yc(n=r.ec())&&(e._items=n)},viewQuery:function(t,e){var i;1&t&&(r.Kc(B,!0),r.Kc(E,!0),r.Kc(F,!0),r.Xc(L,!0),r.Xc(Q,!0)),2&t&&(r.yc(i=r.ec())&&(e._inkBar=i.first),r.yc(i=r.ec())&&(e._tabListContainer=i.first),r.yc(i=r.ec())&&(e._tabList=i.first),r.yc(i=r.ec())&&(e._nextPaginator=i.first),r.yc(i=r.ec())&&(e._previousPaginator=i.first))},hostAttrs:[1,"mat-tab-header"],hostVars:4,hostBindings:function(t,e){2&t&&r.Ib("mat-tab-header-pagination-controls-enabled",e._showPaginationControls)("mat-tab-header-rtl","rtl"==e._getLayoutDirection())},inputs:{selectedIndex:"selectedIndex"},outputs:{selectFocusedIndex:"selectFocusedIndex",indexFocused:"indexFocused"},features:[r.Ab],ngContentSelectors:M,decls:13,vars:8,consts:[["aria-hidden","true","mat-ripple","",1,"mat-tab-header-pagination","mat-tab-header-pagination-before","mat-elevation-z4",3,"matRippleDisabled","click","mousedown","touchend"],["previousPaginator",""],[1,"mat-tab-header-pagination-chevron"],[1,"mat-tab-label-container",3,"keydown"],["tabListContainer",""],["role","tablist",1,"mat-tab-list",3,"cdkObserveContent"],["tabList",""],[1,"mat-tab-labels"],["aria-hidden","true","mat-ripple","",1,"mat-tab-header-pagination","mat-tab-header-pagination-after","mat-elevation-z4",3,"matRippleDisabled","mousedown","click","touchend"],["nextPaginator",""]],template:function(t,e){1&t&&(r.nc(),r.Wb(0,"div",0,1),r.dc("click",(function(){return e._handlePaginatorClick("before")}))("mousedown",(function(t){return e._handlePaginatorPress("before",t)}))("touchend",(function(){return e._stopInterval()})),r.Rb(2,"div",2),r.Vb(),r.Wb(3,"div",3,4),r.dc("keydown",(function(t){return e._handleKeydown(t)})),r.Wb(5,"div",5,6),r.dc("cdkObserveContent",(function(){return e._onContentChanges()})),r.Wb(7,"div",7),r.mc(8),r.Vb(),r.Rb(9,"mat-ink-bar"),r.Vb(),r.Vb(),r.Wb(10,"div",8,9),r.dc("mousedown",(function(t){return e._handlePaginatorPress("after",t)}))("click",(function(){return e._handlePaginatorClick("after")}))("touchend",(function(){return e._stopInterval()})),r.Rb(12,"div",2),r.Vb()),2&t&&(r.Ib("mat-tab-header-pagination-disabled",e._disableScrollBefore),r.oc("matRippleDisabled",e._disableScrollBefore||e.disableRipple),r.Db(5),r.Ib("_mat-animation-noopable","NoopAnimations"===e._animationMode),r.Db(5),r.Ib("mat-tab-header-pagination-disabled",e._disableScrollAfter),r.oc("matRippleDisabled",e._disableScrollAfter||e.disableRipple))},directives:[c.u,a.a,B],styles:['.mat-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mat-tab-header-pagination{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:transparent;touch-action:none}.mat-tab-header-pagination-controls-enabled .mat-tab-header-pagination{display:flex}.mat-tab-header-pagination-before,.mat-tab-header-rtl .mat-tab-header-pagination-after{padding-left:4px}.mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-rtl .mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-tab-header-rtl .mat-tab-header-pagination-before,.mat-tab-header-pagination-after{padding-right:4px}.mat-tab-header-rtl .mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;content:"";height:8px;width:8px}.mat-tab-header-pagination-disabled{box-shadow:none;cursor:default}.mat-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-ink-bar{position:absolute;bottom:0;height:2px;transition:500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable.mat-ink-bar{transition:none;animation:none}.mat-tab-group-inverted-header .mat-ink-bar{bottom:auto;top:0}.cdk-high-contrast-active .mat-ink-bar{outline:solid 2px;height:0}.mat-tab-labels{display:flex}[mat-align-tabs=center]>.mat-tab-header .mat-tab-labels{justify-content:center}[mat-align-tabs=end]>.mat-tab-header .mat-tab-labels{justify-content:flex-end}.mat-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1}._mat-animation-noopable.mat-tab-list{transition:none;animation:none}.mat-tab-label{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;position:relative}.mat-tab-label:focus{outline:none}.mat-tab-label:focus:not(.mat-tab-disabled){opacity:1}.cdk-high-contrast-active .mat-tab-label:focus{outline:dotted 2px;outline-offset:-2px}.mat-tab-label.mat-tab-disabled{cursor:default}.cdk-high-contrast-active .mat-tab-label.mat-tab-disabled{opacity:.5}.mat-tab-label .mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}.cdk-high-contrast-active .mat-tab-label{opacity:1}@media(max-width: 599px){.mat-tab-label{min-width:72px}}\n'],encapsulation:2}),t})(),gt=(()=>{class t extends bt{constructor(t,e,i,n,a,s,o){super(t,n,a,e,i,s,o),this._disableRipple=!1,this.color="primary"}get backgroundColor(){return this._backgroundColor}set backgroundColor(t){const e=this._elementRef.nativeElement.classList;e.remove("mat-background-"+this.backgroundColor),t&&e.add("mat-background-"+t),this._backgroundColor=t}get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=Object(y.c)(t)}_itemSelected(){}ngAfterContentInit(){this._items.changes.pipe(Object(g.a)(null),Object(_.a)(this._destroyed)).subscribe(()=>{this.updateActiveLink()}),super.ngAfterContentInit()}updateActiveLink(t){if(!this._items)return;const e=this._items.toArray();for(let i=0;i<e.length;i++)if(e[i].active)return this.selectedIndex=i,void this._changeDetectorRef.markForCheck();this.selectedIndex=-1,this._inkBar.hide()}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l),r.Qb(O.c,8),r.Qb(r.C),r.Qb(r.h),r.Qb(D.h),r.Qb(x.a),r.Qb(l.a,8))},t.\u0275dir=r.Lb({type:t,inputs:{color:"color",backgroundColor:"backgroundColor",disableRipple:"disableRipple"},features:[r.Ab]}),t})(),vt=(()=>{class t extends gt{constructor(t,e,i,n,a,s,o){super(t,e,i,n,a,s,o)}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l),r.Qb(O.c,8),r.Qb(r.C),r.Qb(r.h),r.Qb(D.h),r.Qb(x.a),r.Qb(l.a,8))},t.\u0275cmp=r.Kb({type:t,selectors:[["","mat-tab-nav-bar",""]],contentQueries:function(t,e,i){var n;1&t&&r.Jb(i,Ct,!0),2&t&&r.yc(n=r.ec())&&(e._items=n)},viewQuery:function(t,e){var i;1&t&&(r.Kc(B,!0),r.Kc(E,!0),r.Kc(F,!0),r.Xc(L,!0),r.Xc(Q,!0)),2&t&&(r.yc(i=r.ec())&&(e._inkBar=i.first),r.yc(i=r.ec())&&(e._tabListContainer=i.first),r.yc(i=r.ec())&&(e._tabList=i.first),r.yc(i=r.ec())&&(e._nextPaginator=i.first),r.yc(i=r.ec())&&(e._previousPaginator=i.first))},hostAttrs:[1,"mat-tab-nav-bar","mat-tab-header"],hostVars:10,hostBindings:function(t,e){2&t&&r.Ib("mat-tab-header-pagination-controls-enabled",e._showPaginationControls)("mat-tab-header-rtl","rtl"==e._getLayoutDirection())("mat-primary","warn"!==e.color&&"accent"!==e.color)("mat-accent","accent"===e.color)("mat-warn","warn"===e.color)},inputs:{color:"color"},exportAs:["matTabNavBar","matTabNav"],features:[r.Ab],attrs:N,ngContentSelectors:M,decls:13,vars:8,consts:[["aria-hidden","true","mat-ripple","",1,"mat-tab-header-pagination","mat-tab-header-pagination-before","mat-elevation-z4",3,"matRippleDisabled","click","mousedown","touchend"],["previousPaginator",""],[1,"mat-tab-header-pagination-chevron"],[1,"mat-tab-link-container",3,"keydown"],["tabListContainer",""],[1,"mat-tab-list",3,"cdkObserveContent"],["tabList",""],[1,"mat-tab-links"],["aria-hidden","true","mat-ripple","",1,"mat-tab-header-pagination","mat-tab-header-pagination-after","mat-elevation-z4",3,"matRippleDisabled","mousedown","click","touchend"],["nextPaginator",""]],template:function(t,e){1&t&&(r.nc(),r.Wb(0,"div",0,1),r.dc("click",(function(){return e._handlePaginatorClick("before")}))("mousedown",(function(t){return e._handlePaginatorPress("before",t)}))("touchend",(function(){return e._stopInterval()})),r.Rb(2,"div",2),r.Vb(),r.Wb(3,"div",3,4),r.dc("keydown",(function(t){return e._handleKeydown(t)})),r.Wb(5,"div",5,6),r.dc("cdkObserveContent",(function(){return e._onContentChanges()})),r.Wb(7,"div",7),r.mc(8),r.Vb(),r.Rb(9,"mat-ink-bar"),r.Vb(),r.Vb(),r.Wb(10,"div",8,9),r.dc("mousedown",(function(t){return e._handlePaginatorPress("after",t)}))("click",(function(){return e._handlePaginatorClick("after")}))("touchend",(function(){return e._stopInterval()})),r.Rb(12,"div",2),r.Vb()),2&t&&(r.Ib("mat-tab-header-pagination-disabled",e._disableScrollBefore),r.oc("matRippleDisabled",e._disableScrollBefore||e.disableRipple),r.Db(5),r.Ib("_mat-animation-noopable","NoopAnimations"===e._animationMode),r.Db(5),r.Ib("mat-tab-header-pagination-disabled",e._disableScrollAfter),r.oc("matRippleDisabled",e._disableScrollAfter||e.disableRipple))},directives:[c.u,a.a,B],styles:['.mat-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mat-tab-header-pagination{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:transparent;touch-action:none}.mat-tab-header-pagination-controls-enabled .mat-tab-header-pagination{display:flex}.mat-tab-header-pagination-before,.mat-tab-header-rtl .mat-tab-header-pagination-after{padding-left:4px}.mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-rtl .mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-tab-header-rtl .mat-tab-header-pagination-before,.mat-tab-header-pagination-after{padding-right:4px}.mat-tab-header-rtl .mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;content:"";height:8px;width:8px}.mat-tab-header-pagination-disabled{box-shadow:none;cursor:default}.mat-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-tab-links{display:flex}[mat-align-tabs=center]>.mat-tab-link-container .mat-tab-links{justify-content:center}[mat-align-tabs=end]>.mat-tab-link-container .mat-tab-links{justify-content:flex-end}.mat-ink-bar{position:absolute;bottom:0;height:2px;transition:500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable.mat-ink-bar{transition:none;animation:none}.mat-tab-group-inverted-header .mat-ink-bar{bottom:auto;top:0}.cdk-high-contrast-active .mat-ink-bar{outline:solid 2px;height:0}.mat-tab-link-container{display:flex;flex-grow:1;overflow:hidden;z-index:1}.mat-tab-link{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;vertical-align:top;text-decoration:none;position:relative;overflow:hidden;-webkit-tap-highlight-color:transparent}.mat-tab-link:focus{outline:none}.mat-tab-link:focus:not(.mat-tab-disabled){opacity:1}.cdk-high-contrast-active .mat-tab-link:focus{outline:dotted 2px;outline-offset:-2px}.mat-tab-link.mat-tab-disabled{cursor:default}.cdk-high-contrast-active .mat-tab-link.mat-tab-disabled{opacity:.5}.mat-tab-link .mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}.cdk-high-contrast-active .mat-tab-link{opacity:1}[mat-stretch-tabs] .mat-tab-link{flex-basis:0;flex-grow:1}.mat-tab-link.mat-tab-disabled{pointer-events:none}@media(max-width: 599px){.mat-tab-link{min-width:72px}}\n'],encapsulation:2}),t})();class _t{}const yt=Object(c.F)(Object(c.B)(Object(c.C)(_t)));let xt=(()=>{class t extends yt{constructor(t,e,i,n,a,s){super(),this._tabNavBar=t,this.elementRef=e,this._focusMonitor=a,this._isActive=!1,this.rippleConfig=i||{},this.tabIndex=parseInt(n)||0,"NoopAnimations"===s&&(this.rippleConfig.animation={enterDuration:0,exitDuration:0})}get active(){return this._isActive}set active(t){Object(y.c)(t)!==this._isActive&&(this._isActive=t,this._tabNavBar.updateActiveLink(this.elementRef))}get rippleDisabled(){return this.disabled||this.disableRipple||this._tabNavBar.disableRipple||!!this.rippleConfig.disabled}focus(){this.elementRef.nativeElement.focus()}ngAfterViewInit(){this._focusMonitor.monitor(this.elementRef)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this.elementRef)}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(gt),r.Qb(r.l),r.Qb(c.j,8),r.bc("tabindex"),r.Qb(n.h),r.Qb(l.a,8))},t.\u0275dir=r.Lb({type:t,inputs:{active:"active"},features:[r.Ab]}),t})(),Ct=(()=>{class t extends xt{constructor(t,e,i,n,a,s,o,r){super(t,e,a,s,o,r),this._tabLinkRipple=new c.x(this,i,e,n),this._tabLinkRipple.setupTriggerEvents(e.nativeElement)}ngOnDestroy(){super.ngOnDestroy(),this._tabLinkRipple._removeTriggerEvents()}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(vt),r.Qb(r.l),r.Qb(r.C),r.Qb(x.a),r.Qb(c.j,8),r.bc("tabindex"),r.Qb(n.h),r.Qb(l.a,8))},t.\u0275dir=r.Lb({type:t,selectors:[["","mat-tab-link",""],["","matTabLink",""]],hostAttrs:[1,"mat-tab-link","mat-focus-indicator"],hostVars:7,hostBindings:function(t,e){2&t&&(r.Eb("aria-current",e.active?"page":null)("aria-disabled",e.disabled)("tabIndex",e.tabIndex),r.Ib("mat-tab-disabled",e.disabled)("mat-tab-label-active",e.active))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex"},exportAs:["matTabLink"],features:[r.Ab]}),t})(),Ot=(()=>{class t{}return t.\u0275mod=r.Ob({type:t}),t.\u0275inj=r.Nb({factory:function(e){return new(e||t)},imports:[[o.c,c.k,s.h,c.v,a.c,n.a],c.k]}),t})()},xHqg:function(t,e,i){"use strict";i.d(e,"a",(function(){return N})),i.d(e,"b",(function(){return F})),i.d(e,"c",(function(){return W})),i.d(e,"d",(function(){return V})),i.d(e,"e",(function(){return L})),i.d(e,"f",(function(){return E})),i.d(e,"g",(function(){return X})),i.d(e,"h",(function(){return U})),i.d(e,"i",(function(){return H})),i.d(e,"j",(function(){return B}));var n=i("+rOU"),a=i("B/XX"),s=i("ofXK"),o=i("fXoL"),r=i("bTqV"),c=i("FKr1"),l=i("NFeN"),d=i("XNiG"),h=i("1G5W"),u=i("/uUt"),p=i("R0Ic"),b=i("u47x"),f=i("cH1L");function m(t,e){if(1&t&&o.Sb(0,8),2&t){const t=o.hc();o.oc("ngTemplateOutlet",t.iconOverrides[t.state])("ngTemplateOutletContext",t._getIconContext())}}function g(t,e){if(1&t&&(o.Wb(0,"span"),o.Qc(1),o.Vb()),2&t){const t=o.hc(2);o.Db(1),o.Rc(t._getDefaultTextForState(t.state))}}function v(t,e){if(1&t&&(o.Wb(0,"mat-icon"),o.Qc(1),o.Vb()),2&t){const t=o.hc(2);o.Db(1),o.Rc(t._getDefaultTextForState(t.state))}}function _(t,e){if(1&t&&(o.Ub(0,9),o.Oc(1,g,2,1,"span",10),o.Oc(2,v,2,1,"mat-icon",11),o.Tb()),2&t){const t=o.hc();o.oc("ngSwitch",t.state),o.Db(1),o.oc("ngSwitchCase","number")}}function y(t,e){if(1&t&&(o.Wb(0,"div",12),o.Sb(1,13),o.Vb()),2&t){const t=o.hc();o.Db(1),o.oc("ngTemplateOutlet",t._templateLabel().template)}}function x(t,e){if(1&t&&(o.Wb(0,"div",12),o.Qc(1),o.Vb()),2&t){const t=o.hc();o.Db(1),o.Rc(t.label)}}function C(t,e){if(1&t&&(o.Wb(0,"div",14),o.Qc(1),o.Vb()),2&t){const t=o.hc();o.Db(1),o.Rc(t._intl.optionalLabel)}}function O(t,e){if(1&t&&(o.Wb(0,"div",15),o.Qc(1),o.Vb()),2&t){const t=o.hc();o.Db(1),o.Rc(t.errorMessage)}}function D(t,e){1&t&&o.mc(0)}const w=["*"];function M(t,e){1&t&&o.Rb(0,"div",6)}function k(t,e){if(1&t){const t=o.Xb();o.Ub(0),o.Wb(1,"mat-step-header",4),o.dc("click",(function(){return e.$implicit.select()}))("keydown",(function(e){return o.Dc(t),o.hc()._onKeydown(e)})),o.Vb(),o.Oc(2,M,1,0,"div",5),o.Tb()}if(2&t){const t=e.$implicit,i=e.index,n=e.last,a=o.hc();o.Db(1),o.oc("tabIndex",a._getFocusIndex()===i?0:-1)("id",a._getStepLabelId(i))("index",i)("state",a._getIndicatorType(i,t.state))("label",t.stepLabel||t.label)("selected",a.selectedIndex===i)("active",t.completed||a.selectedIndex===i||!a.linear)("optional",t.optional)("errorMessage",t.errorMessage)("iconOverrides",a._iconOverrides)("disableRipple",a.disableRipple),o.Eb("aria-posinset",i+1)("aria-setsize",a.steps.length)("aria-controls",a._getStepContentId(i))("aria-selected",a.selectedIndex==i)("aria-label",t.ariaLabel||null)("aria-labelledby",!t.ariaLabel&&t.ariaLabelledby?t.ariaLabelledby:null),o.Db(1),o.oc("ngIf",!n)}}function S(t,e){if(1&t){const t=o.Xb();o.Wb(0,"div",7),o.dc("@stepTransition.done",(function(e){return o.Dc(t),o.hc()._animationDone.next(e)})),o.Sb(1,8),o.Vb()}if(2&t){const t=e.$implicit,i=e.index,n=o.hc();o.oc("@stepTransition",n._getAnimationDirection(i))("id",n._getStepContentId(i)),o.Eb("aria-labelledby",n._getStepLabelId(i))("aria-expanded",n.selectedIndex===i),o.Db(1),o.oc("ngTemplateOutlet",t.content)}}function I(t,e){if(1&t){const t=o.Xb();o.Wb(0,"div",1),o.Wb(1,"mat-step-header",2),o.dc("click",(function(){return e.$implicit.select()}))("keydown",(function(e){return o.Dc(t),o.hc()._onKeydown(e)})),o.Vb(),o.Wb(2,"div",3),o.Wb(3,"div",4),o.dc("@stepTransition.done",(function(e){return o.Dc(t),o.hc()._animationDone.next(e)})),o.Wb(4,"div",5),o.Sb(5,6),o.Vb(),o.Vb(),o.Vb(),o.Vb()}if(2&t){const t=e.$implicit,i=e.index,n=e.last,a=o.hc();o.Db(1),o.oc("tabIndex",a._getFocusIndex()==i?0:-1)("id",a._getStepLabelId(i))("index",i)("state",a._getIndicatorType(i,t.state))("label",t.stepLabel||t.label)("selected",a.selectedIndex===i)("active",t.completed||a.selectedIndex===i||!a.linear)("optional",t.optional)("errorMessage",t.errorMessage)("iconOverrides",a._iconOverrides)("disableRipple",a.disableRipple),o.Eb("aria-posinset",i+1)("aria-setsize",a.steps.length)("aria-controls",a._getStepContentId(i))("aria-selected",a.selectedIndex===i)("aria-label",t.ariaLabel||null)("aria-labelledby",!t.ariaLabel&&t.ariaLabelledby?t.ariaLabelledby:null),o.Db(1),o.Ib("mat-stepper-vertical-line",!n),o.Db(1),o.oc("@stepTransition",a._getAnimationDirection(i))("id",a._getStepContentId(i)),o.Eb("aria-labelledby",a._getStepLabelId(i))("aria-expanded",a.selectedIndex===i),o.Db(2),o.oc("ngTemplateOutlet",t.content)}}const P='.mat-stepper-vertical,.mat-stepper-horizontal{display:block}.mat-horizontal-stepper-header-container{white-space:nowrap;display:flex;align-items:center}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header-container{align-items:flex-start}.mat-stepper-horizontal-line{border-top-width:1px;border-top-style:solid;flex:auto;height:0;margin:0 -16px;min-width:32px}.mat-stepper-label-position-bottom .mat-stepper-horizontal-line{margin:0;min-width:0;position:relative}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before,.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after{border-top-width:1px;border-top-style:solid;content:"";display:inline-block;height:0;position:absolute;width:calc(50% - 20px)}.mat-horizontal-stepper-header{display:flex;height:72px;overflow:hidden;align-items:center;padding:0 24px}.mat-horizontal-stepper-header .mat-step-icon{margin-right:8px;flex:none}[dir=rtl] .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:8px}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header{box-sizing:border-box;flex-direction:column;height:auto}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after{right:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before{left:0}[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:last-child::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:first-child::after{display:none}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-label{padding:16px 0 0 0;text-align:center;width:100%}.mat-vertical-stepper-header{display:flex;align-items:center;height:24px}.mat-vertical-stepper-header .mat-step-icon{margin-right:12px}[dir=rtl] .mat-vertical-stepper-header .mat-step-icon{margin-right:0;margin-left:12px}.mat-horizontal-stepper-content{outline:0}.mat-horizontal-stepper-content[aria-expanded=false]{height:0;overflow:hidden}.mat-horizontal-content-container{overflow:hidden;padding:0 24px 24px 24px}.mat-vertical-content-container{margin-left:36px;border:0;position:relative}[dir=rtl] .mat-vertical-content-container{margin-left:0;margin-right:36px}.mat-stepper-vertical-line::before{content:"";position:absolute;left:0;border-left-width:1px;border-left-style:solid}[dir=rtl] .mat-stepper-vertical-line::before{left:auto;right:0}.mat-vertical-stepper-content{overflow:hidden;outline:0}.mat-vertical-content{padding:0 24px 24px 24px}.mat-step:last-child .mat-vertical-content-container{border:none}\n';let V=(()=>{class t extends a.c{}return t.\u0275fac=function(e){return R(e||t)},t.\u0275dir=o.Lb({type:t,selectors:[["","matStepLabel",""]],features:[o.Ab]}),t})();const R=o.Yb(V);let j=(()=>{class t{constructor(){this.changes=new d.a,this.optionalLabel="Optional"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(o.Mb)({factory:function(){return new t},token:t,providedIn:"root"}),t})();const A={provide:j,deps:[[new o.D,new o.N,j]],useFactory:function(t){return t||new j}};let W=(()=>{class t extends a.b{constructor(t,e,i,n){super(i),this._intl=t,this._focusMonitor=e,this._intlSubscription=t.changes.subscribe(()=>n.markForCheck())}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._intlSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._elementRef)}focus(){this._focusMonitor.focusVia(this._elementRef,"program")}_stringLabel(){return this.label instanceof V?null:this.label}_templateLabel(){return this.label instanceof V?this.label:null}_getHostElement(){return this._elementRef.nativeElement}_getIconContext(){return{index:this.index,active:this.active,optional:this.optional}}_getDefaultTextForState(t){return"number"==t?""+(this.index+1):"edit"==t?"create":"error"==t?"warning":t}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(j),o.Qb(b.h),o.Qb(o.l),o.Qb(o.h))},t.\u0275cmp=o.Kb({type:t,selectors:[["mat-step-header"]],hostAttrs:["role","tab",1,"mat-step-header","mat-focus-indicator"],inputs:{state:"state",label:"label",errorMessage:"errorMessage",iconOverrides:"iconOverrides",index:"index",selected:"selected",active:"active",optional:"optional",disableRipple:"disableRipple"},features:[o.Ab],decls:10,vars:19,consts:[["matRipple","",1,"mat-step-header-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-step-icon-content",3,"ngSwitch"],[3,"ngTemplateOutlet","ngTemplateOutletContext",4,"ngSwitchCase"],[3,"ngSwitch",4,"ngSwitchDefault"],[1,"mat-step-label"],["class","mat-step-text-label",4,"ngIf"],["class","mat-step-optional",4,"ngIf"],["class","mat-step-sub-label-error",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[1,"mat-step-text-label"],[3,"ngTemplateOutlet"],[1,"mat-step-optional"],[1,"mat-step-sub-label-error"]],template:function(t,e){1&t&&(o.Rb(0,"div",0),o.Wb(1,"div"),o.Wb(2,"div",1),o.Oc(3,m,1,2,"ng-container",2),o.Oc(4,_,3,2,"ng-container",3),o.Vb(),o.Vb(),o.Wb(5,"div",4),o.Oc(6,y,2,1,"div",5),o.Oc(7,x,2,1,"div",5),o.Oc(8,C,2,1,"div",6),o.Oc(9,O,2,1,"div",7),o.Vb()),2&t&&(o.oc("matRippleTrigger",e._getHostElement())("matRippleDisabled",e.disableRipple),o.Db(1),o.Gb("mat-step-icon-state-",e.state," mat-step-icon"),o.Ib("mat-step-icon-selected",e.selected),o.Db(1),o.oc("ngSwitch",!(!e.iconOverrides||!e.iconOverrides[e.state])),o.Db(1),o.oc("ngSwitchCase",!0),o.Db(2),o.Ib("mat-step-label-active",e.active)("mat-step-label-selected",e.selected)("mat-step-label-error","error"==e.state),o.Db(1),o.oc("ngIf",e._templateLabel()),o.Db(1),o.oc("ngIf",e._stringLabel()),o.Db(1),o.oc("ngIf",e.optional&&"error"!=e.state),o.Db(1),o.oc("ngIf","error"==e.state))},directives:[c.u,s.x,s.y,s.z,s.t,s.A,l.a],styles:[".mat-step-header{overflow:hidden;outline:none;cursor:pointer;position:relative;box-sizing:content-box;-webkit-tap-highlight-color:transparent}.mat-step-optional,.mat-step-sub-label-error{font-size:12px}.mat-step-icon{border-radius:50%;height:24px;width:24px;flex-shrink:0;position:relative}.mat-step-icon-content,.mat-step-icon .mat-icon{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.mat-step-icon .mat-icon{font-size:16px;height:16px;width:16px}.mat-step-icon-state-error .mat-icon{font-size:24px;height:24px;width:24px}.mat-step-label{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:50px;vertical-align:middle}.mat-step-text-label{text-overflow:ellipsis;overflow:hidden}.mat-step-header .mat-step-header-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}\n"],encapsulation:2,changeDetection:0}),t})();const T={horizontalStepTransition:Object(p.n)("stepTransition",[Object(p.k)("previous",Object(p.l)({transform:"translate3d(-100%, 0, 0)",visibility:"hidden"})),Object(p.k)("current",Object(p.l)({transform:"none",visibility:"visible"})),Object(p.k)("next",Object(p.l)({transform:"translate3d(100%, 0, 0)",visibility:"hidden"})),Object(p.m)("* => *",Object(p.e)("500ms cubic-bezier(0.35, 0, 0.25, 1)"))]),verticalStepTransition:Object(p.n)("stepTransition",[Object(p.k)("previous",Object(p.l)({height:"0px",visibility:"hidden"})),Object(p.k)("next",Object(p.l)({height:"0px",visibility:"hidden"})),Object(p.k)("current",Object(p.l)({height:"*",visibility:"visible"})),Object(p.m)("* <=> current",Object(p.e)("225ms cubic-bezier(0.4, 0.0, 0.2, 1)"))])};let E=(()=>{class t{constructor(t){this.templateRef=t}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(o.P))},t.\u0275dir=o.Lb({type:t,selectors:[["ng-template","matStepperIcon",""]],inputs:{name:["matStepperIcon","name"]}}),t})(),F=(()=>{class t extends a.a{constructor(t,e,i){super(t,i),this._errorStateMatcher=e}isErrorState(t,e){return this._errorStateMatcher.isErrorState(t,e)||!!(t&&t.invalid&&this.interacted)}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(Object(o.X)(()=>L)),o.Qb(c.d,4),o.Qb(a.h,8))},t.\u0275cmp=o.Kb({type:t,selectors:[["mat-step"]],contentQueries:function(t,e,i){var n;1&t&&o.Jb(i,V,!0),2&t&&o.yc(n=o.ec())&&(e.stepLabel=n.first)},exportAs:["matStep"],features:[o.Cb([{provide:c.d,useExisting:t},{provide:a.a,useExisting:t}]),o.Ab],ngContentSelectors:w,decls:1,vars:0,template:function(t,e){1&t&&(o.nc(),o.Oc(0,D,1,0,"ng-template"))},encapsulation:2,changeDetection:0}),t})(),L=(()=>{class t extends a.d{constructor(){super(...arguments),this.steps=new o.H,this.animationDone=new o.o,this._iconOverrides={},this._animationDone=new d.a}ngAfterContentInit(){super.ngAfterContentInit(),this._icons.forEach(({name:t,templateRef:e})=>this._iconOverrides[t]=e),this.steps.changes.pipe(Object(h.a)(this._destroyed)).subscribe(()=>{this._stateChanged()}),this._animationDone.pipe(Object(u.a)((t,e)=>t.fromState===e.fromState&&t.toState===e.toState),Object(h.a)(this._destroyed)).subscribe(t=>{"current"===t.toState&&this.animationDone.emit()})}}return t.\u0275fac=function(e){return Q(e||t)},t.\u0275dir=o.Lb({type:t,selectors:[["","matStepper",""]],contentQueries:function(t,e,i){var n;1&t&&(o.Jb(i,F,!0),o.Jb(i,E,!0)),2&t&&(o.yc(n=o.ec())&&(e._steps=n),o.yc(n=o.ec())&&(e._icons=n))},viewQuery:function(t,e){var i;1&t&&o.Xc(W,!0),2&t&&o.yc(i=o.ec())&&(e._stepHeader=i)},inputs:{disableRipple:"disableRipple"},outputs:{animationDone:"animationDone"},features:[o.Cb([{provide:a.d,useExisting:t}]),o.Ab]}),t})();const Q=o.Yb(L);let N=(()=>{class t extends L{constructor(){super(...arguments),this.labelPosition="end"}}return t.\u0275fac=function(e){return z(e||t)},t.\u0275cmp=o.Kb({type:t,selectors:[["mat-horizontal-stepper"]],hostAttrs:["aria-orientation","horizontal","role","tablist",1,"mat-stepper-horizontal"],hostVars:4,hostBindings:function(t,e){2&t&&o.Ib("mat-stepper-label-position-end","end"==e.labelPosition)("mat-stepper-label-position-bottom","bottom"==e.labelPosition)},inputs:{selectedIndex:"selectedIndex",labelPosition:"labelPosition"},exportAs:["matHorizontalStepper"],features:[o.Cb([{provide:L,useExisting:t},{provide:a.d,useExisting:t}]),o.Ab],decls:4,vars:2,consts:[[1,"mat-horizontal-stepper-header-container"],[4,"ngFor","ngForOf"],[1,"mat-horizontal-content-container"],["class","mat-horizontal-stepper-content","role","tabpanel",3,"id",4,"ngFor","ngForOf"],[1,"mat-horizontal-stepper-header",3,"tabIndex","id","index","state","label","selected","active","optional","errorMessage","iconOverrides","disableRipple","click","keydown"],["class","mat-stepper-horizontal-line",4,"ngIf"],[1,"mat-stepper-horizontal-line"],["role","tabpanel",1,"mat-horizontal-stepper-content",3,"id"],[3,"ngTemplateOutlet"]],template:function(t,e){1&t&&(o.Wb(0,"div",0),o.Oc(1,k,3,18,"ng-container",1),o.Vb(),o.Wb(2,"div",2),o.Oc(3,S,2,5,"div",3),o.Vb()),2&t&&(o.Db(1),o.oc("ngForOf",e.steps),o.Db(2),o.oc("ngForOf",e.steps))},directives:[s.s,W,s.t,s.A],styles:[P],encapsulation:2,data:{animation:[T.horizontalStepTransition]},changeDetection:0}),t})();const z=o.Yb(N);let B=(()=>{class t extends L{constructor(t,e,i,n){super(t,e,i,n),this._orientation="vertical"}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(f.c,8),o.Qb(o.h),o.Qb(o.l),o.Qb(s.e))},t.\u0275cmp=o.Kb({type:t,selectors:[["mat-vertical-stepper"]],hostAttrs:["aria-orientation","vertical","role","tablist",1,"mat-stepper-vertical"],inputs:{selectedIndex:"selectedIndex"},exportAs:["matVerticalStepper"],features:[o.Cb([{provide:L,useExisting:t},{provide:a.d,useExisting:t}]),o.Ab],decls:1,vars:1,consts:[["class","mat-step",4,"ngFor","ngForOf"],[1,"mat-step"],[1,"mat-vertical-stepper-header",3,"tabIndex","id","index","state","label","selected","active","optional","errorMessage","iconOverrides","disableRipple","click","keydown"],[1,"mat-vertical-content-container"],["role","tabpanel",1,"mat-vertical-stepper-content",3,"id"],[1,"mat-vertical-content"],[3,"ngTemplateOutlet"]],template:function(t,e){1&t&&o.Oc(0,I,6,24,"div",0),2&t&&o.oc("ngForOf",e.steps)},directives:[s.s,W,s.A],styles:[P],encapsulation:2,data:{animation:[T.verticalStepTransition]},changeDetection:0}),t})(),U=(()=>{class t extends a.f{}return t.\u0275fac=function(e){return $(e||t)},t.\u0275dir=o.Lb({type:t,selectors:[["button","matStepperNext",""]],hostAttrs:[1,"mat-stepper-next"],hostVars:1,hostBindings:function(t,e){2&t&&o.Zb("type",e.type)},inputs:{type:"type"},features:[o.Ab]}),t})();const $=o.Yb(U);let H=(()=>{class t extends a.g{}return t.\u0275fac=function(e){return G(e||t)},t.\u0275dir=o.Lb({type:t,selectors:[["button","matStepperPrevious",""]],hostAttrs:[1,"mat-stepper-previous"],hostVars:1,hostBindings:function(t,e){2&t&&o.Zb("type",e.type)},inputs:{type:"type"},features:[o.Ab]}),t})();const G=o.Yb(H);let X=(()=>{class t{}return t.\u0275mod=o.Ob({type:t}),t.\u0275inj=o.Nb({factory:function(e){return new(e||t)},providers:[A,c.d],imports:[[c.k,s.c,n.h,r.c,a.e,l.b,c.v],c.k]}),t})()},xgIS:function(t,e,i){"use strict";i.d(e,"a",(function(){return r}));var n=i("HDdC"),a=i("DH7j"),s=i("n6bG"),o=i("lJxs");function r(t,e,i,c){return Object(s.a)(i)&&(c=i,i=void 0),c?r(t,e,i).pipe(Object(o.a)(t=>Object(a.a)(t)?c(...t):c(t))):new n.a(n=>{!function t(e,i,n,a,s){let o;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(e)){const t=e;e.addEventListener(i,n,s),o=()=>t.removeEventListener(i,n,s)}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(e)){const t=e;e.on(i,n),o=()=>t.off(i,n)}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(e)){const t=e;e.addListener(i,n),o=()=>t.removeListener(i,n)}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(let o=0,r=e.length;o<r;o++)t(e[o],i,n,a,s)}a.add(o)}(t,e,(function(t){n.next(arguments.length>1?Array.prototype.slice.call(arguments):t)}),n,i)})}},yCtX:function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var n=i("HDdC"),a=i("ngJS"),s=i("jZKg");function o(t,e){return e?Object(s.a)(t,e):new n.a(Object(a.a)(t))}},"z+Ro":function(t,e,i){"use strict";function n(t){return t&&"function"==typeof t.schedule}i.d(e,"a",(function(){return n}))},z6cu:function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var n=i("HDdC");function a(t,e){return new n.a(e?i=>e.schedule(s,0,{error:t,subscriber:i}):e=>e.error(t))}function s({error:t,subscriber:e}){e.error(t)}},zkoq:function(t,e,i){"use strict";i.d(e,"a",(function(){return b})),i.d(e,"b",(function(){return M})),i.d(e,"c",(function(){return k})),i.d(e,"d",(function(){return u})),i.d(e,"e",(function(){return m})),i.d(e,"f",(function(){return f})),i.d(e,"g",(function(){return p}));var n=i("fXoL"),a=i("FKr1"),s=i("8LU1"),o=i("cH1L");const r=["*"],c=[[["","mat-grid-avatar",""],["","matGridAvatar",""]],[["","mat-line",""],["","matLine",""]],"*"],l=["[mat-grid-avatar], [matGridAvatar]","[mat-line], [matLine]","*"],d=".mat-grid-list{display:block;position:relative}.mat-grid-tile{display:block;position:absolute;overflow:hidden}.mat-grid-tile .mat-figure{top:0;left:0;right:0;bottom:0;position:absolute;display:flex;align-items:center;justify-content:center;height:100%;padding:0;margin:0}.mat-grid-tile .mat-grid-tile-header,.mat-grid-tile .mat-grid-tile-footer{display:flex;align-items:center;height:48px;color:#fff;background:rgba(0,0,0,.38);overflow:hidden;padding:0 16px;position:absolute;left:0;right:0}.mat-grid-tile .mat-grid-tile-header>*,.mat-grid-tile .mat-grid-tile-footer>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-grid-tile .mat-grid-tile-header.mat-2-line,.mat-grid-tile .mat-grid-tile-footer.mat-2-line{height:68px}.mat-grid-tile .mat-grid-list-text{display:flex;flex-direction:column;flex:auto;box-sizing:border-box;overflow:hidden}.mat-grid-tile .mat-grid-list-text>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-grid-tile .mat-grid-list-text:empty{display:none}.mat-grid-tile .mat-grid-tile-header{top:0}.mat-grid-tile .mat-grid-tile-footer{bottom:0}.mat-grid-tile .mat-grid-avatar{padding-right:16px}[dir=rtl] .mat-grid-tile .mat-grid-avatar{padding-right:0;padding-left:16px}.mat-grid-tile .mat-grid-avatar:empty{display:none}\n",h=new n.s("MAT_GRID_LIST");let u=(()=>{class t{constructor(t,e){this._element=t,this._gridList=e,this._rowspan=1,this._colspan=1}get rowspan(){return this._rowspan}set rowspan(t){this._rowspan=Math.round(Object(s.f)(t))}get colspan(){return this._colspan}set colspan(t){this._colspan=Math.round(Object(s.f)(t))}_setStyle(t,e){this._element.nativeElement.style[t]=e}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(h,8))},t.\u0275cmp=n.Kb({type:t,selectors:[["mat-grid-tile"]],hostAttrs:[1,"mat-grid-tile"],hostVars:2,hostBindings:function(t,e){2&t&&n.Eb("rowspan",e.rowspan)("colspan",e.colspan)},inputs:{rowspan:"rowspan",colspan:"colspan"},exportAs:["matGridTile"],ngContentSelectors:r,decls:2,vars:0,consts:[[1,"mat-figure"]],template:function(t,e){1&t&&(n.nc(),n.Wb(0,"figure",0),n.mc(1),n.Vb())},styles:[d],encapsulation:2,changeDetection:0}),t})(),p=(()=>{class t{constructor(t){this._element=t}ngAfterContentInit(){Object(a.G)(this._lines,this._element)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l))},t.\u0275cmp=n.Kb({type:t,selectors:[["mat-grid-tile-header"],["mat-grid-tile-footer"]],contentQueries:function(t,e,i){var s;1&t&&n.Jb(i,a.l,!0),2&t&&n.yc(s=n.ec())&&(e._lines=s)},ngContentSelectors:l,decls:4,vars:0,consts:[[1,"mat-grid-list-text"]],template:function(t,e){1&t&&(n.nc(c),n.mc(0),n.Wb(1,"div",0),n.mc(2,1),n.Vb(),n.mc(3,2))},encapsulation:2,changeDetection:0}),t})(),b=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["","mat-grid-avatar",""],["","matGridAvatar",""]],hostAttrs:[1,"mat-grid-avatar"]}),t})(),f=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["mat-grid-tile-header"]],hostAttrs:[1,"mat-grid-tile-header"]}),t})(),m=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["mat-grid-tile-footer"]],hostAttrs:[1,"mat-grid-tile-footer"]}),t})();class g{constructor(){this.columnIndex=0,this.rowIndex=0}get rowCount(){return this.rowIndex+1}get rowspan(){const t=Math.max(...this.tracker);return t>1?this.rowCount+t-1:this.rowCount}update(t,e){this.columnIndex=0,this.rowIndex=0,this.tracker=new Array(t),this.tracker.fill(0,0,this.tracker.length),this.positions=e.map(t=>this._trackTile(t))}_trackTile(t){const e=this._findMatchingGap(t.colspan);return this._markTilePosition(e,t),this.columnIndex=e+t.colspan,new v(this.rowIndex,e)}_findMatchingGap(t){let e=-1,i=-1;do{this.columnIndex+t>this.tracker.length?(this._nextRow(),e=this.tracker.indexOf(0,this.columnIndex),i=this._findGapEndIndex(e)):(e=this.tracker.indexOf(0,this.columnIndex),-1!=e?(i=this._findGapEndIndex(e),this.columnIndex=e+1):(this._nextRow(),e=this.tracker.indexOf(0,this.columnIndex),i=this._findGapEndIndex(e)))}while(i-e<t||0==i);return Math.max(e,0)}_nextRow(){this.columnIndex=0,this.rowIndex++;for(let t=0;t<this.tracker.length;t++)this.tracker[t]=Math.max(0,this.tracker[t]-1)}_findGapEndIndex(t){for(let e=t+1;e<this.tracker.length;e++)if(0!=this.tracker[e])return e;return this.tracker.length}_markTilePosition(t,e){for(let i=0;i<e.colspan;i++)this.tracker[t+i]=e.rowspan}}class v{constructor(t,e){this.row=t,this.col=e}}const _=/^-?\d+((\.\d+)?[A-Za-z%$]?)+$/;class y{constructor(){this._rows=0,this._rowspan=0}init(t,e,i,n){this._gutterSize=w(t),this._rows=e.rowCount,this._rowspan=e.rowspan,this._cols=i,this._direction=n}getBaseTileSize(t,e){return`(${t}% - (${this._gutterSize} * ${e}))`}getTilePosition(t,e){return 0===e?"0":D(`(${t} + ${this._gutterSize}) * ${e}`)}getTileSize(t,e){return`(${t} * ${e}) + (${e-1} * ${this._gutterSize})`}setStyle(t,e,i){let n=100/this._cols,a=(this._cols-1)/this._cols;this.setColStyles(t,i,n,a),this.setRowStyles(t,e,n,a)}setColStyles(t,e,i,n){let a=this.getBaseTileSize(i,n);t._setStyle("rtl"===this._direction?"right":"left",this.getTilePosition(a,e)),t._setStyle("width",D(this.getTileSize(a,t.colspan)))}getGutterSpan(){return`${this._gutterSize} * (${this._rowspan} - 1)`}getTileSpan(t){return`${this._rowspan} * ${this.getTileSize(t,1)}`}getComputedHeight(){return null}}class x extends y{constructor(t){super(),this.fixedRowHeight=t}init(t,e,i,n){super.init(t,e,i,n),this.fixedRowHeight=w(this.fixedRowHeight),_.test(this.fixedRowHeight)}setRowStyles(t,e){t._setStyle("top",this.getTilePosition(this.fixedRowHeight,e)),t._setStyle("height",D(this.getTileSize(this.fixedRowHeight,t.rowspan)))}getComputedHeight(){return["height",D(`${this.getTileSpan(this.fixedRowHeight)} + ${this.getGutterSpan()}`)]}reset(t){t._setListStyle(["height",null]),t._tiles&&t._tiles.forEach(t=>{t._setStyle("top",null),t._setStyle("height",null)})}}class C extends y{constructor(t){super(),this._parseRatio(t)}setRowStyles(t,e,i,n){this.baseTileHeight=this.getBaseTileSize(i/this.rowHeightRatio,n),t._setStyle("marginTop",this.getTilePosition(this.baseTileHeight,e)),t._setStyle("paddingTop",D(this.getTileSize(this.baseTileHeight,t.rowspan)))}getComputedHeight(){return["paddingBottom",D(`${this.getTileSpan(this.baseTileHeight)} + ${this.getGutterSpan()}`)]}reset(t){t._setListStyle(["paddingBottom",null]),t._tiles.forEach(t=>{t._setStyle("marginTop",null),t._setStyle("paddingTop",null)})}_parseRatio(t){const e=t.split(":");this.rowHeightRatio=parseFloat(e[0])/parseFloat(e[1])}}class O extends y{setRowStyles(t,e){let i=this.getBaseTileSize(100/this._rowspan,(this._rows-1)/this._rows);t._setStyle("top",this.getTilePosition(i,e)),t._setStyle("height",D(this.getTileSize(i,t.rowspan)))}reset(t){t._tiles&&t._tiles.forEach(t=>{t._setStyle("top",null),t._setStyle("height",null)})}}function D(t){return`calc(${t})`}function w(t){return t.match(/([A-Za-z%]+)$/)?t:t+"px"}let M=(()=>{class t{constructor(t,e){this._element=t,this._dir=e,this._gutter="1px"}get cols(){return this._cols}set cols(t){this._cols=Math.max(1,Math.round(Object(s.f)(t)))}get gutterSize(){return this._gutter}set gutterSize(t){this._gutter=""+(null==t?"":t)}get rowHeight(){return this._rowHeight}set rowHeight(t){const e=""+(null==t?"":t);e!==this._rowHeight&&(this._rowHeight=e,this._setTileStyler(this._rowHeight))}ngOnInit(){this._checkCols(),this._checkRowHeight()}ngAfterContentChecked(){this._layoutTiles()}_checkCols(){}_checkRowHeight(){this._rowHeight||this._setTileStyler("1:1")}_setTileStyler(t){this._tileStyler&&this._tileStyler.reset(this),this._tileStyler="fit"===t?new O:t&&t.indexOf(":")>-1?new C(t):new x(t)}_layoutTiles(){this._tileCoordinator||(this._tileCoordinator=new g);const t=this._tileCoordinator,e=this._tiles.filter(t=>!t._gridList||t._gridList===this),i=this._dir?this._dir.value:"ltr";this._tileCoordinator.update(this.cols,e),this._tileStyler.init(this.gutterSize,t,this.cols,i),e.forEach((e,i)=>{const n=t.positions[i];this._tileStyler.setStyle(e,n.row,n.col)}),this._setListStyle(this._tileStyler.getComputedHeight())}_setListStyle(t){t&&(this._element.nativeElement.style[t[0]]=t[1])}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(o.c,8))},t.\u0275cmp=n.Kb({type:t,selectors:[["mat-grid-list"]],contentQueries:function(t,e,i){var a;1&t&&n.Jb(i,u,!0),2&t&&n.yc(a=n.ec())&&(e._tiles=a)},hostAttrs:[1,"mat-grid-list"],hostVars:1,hostBindings:function(t,e){2&t&&n.Eb("cols",e.cols)},inputs:{cols:"cols",gutterSize:"gutterSize",rowHeight:"rowHeight"},exportAs:["matGridList"],features:[n.Cb([{provide:h,useExisting:t}])],ngContentSelectors:r,decls:2,vars:0,template:function(t,e){1&t&&(n.nc(),n.Wb(0,"div"),n.mc(1),n.Vb())},styles:[d],encapsulation:2,changeDetection:0}),t})(),k=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[a.m,a.k],a.m,a.k]}),t})()},zx2A:function(t,e,i){"use strict";i.d(e,"a",(function(){return o})),i.d(e,"b",(function(){return r})),i.d(e,"c",(function(){return c}));var n=i("7o/Q"),a=i("HDdC"),s=i("SeVD");class o extends n.a{constructor(t){super(),this.parent=t}_next(t){this.parent.notifyNext(t)}_error(t){this.parent.notifyError(t),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class r extends n.a{notifyNext(t){this.destination.next(t)}notifyError(t){this.destination.error(t)}notifyComplete(){this.destination.complete()}}function c(t,e){if(!e.closed)return t instanceof a.a?t.subscribe(e):Object(s.a)(t)(e)}}},[[0,0]]]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{"+0xr":function(t,e,i){"use strict";i.d(e,"a",(function(){return It})),i.d(e,"b",(function(){return gt})),i.d(e,"c",(function(){return Ot})),i.d(e,"d",(function(){return kt})),i.d(e,"e",(function(){return xt})),i.d(e,"f",(function(){return Lt})),i.d(e,"g",(function(){return jt})),i.d(e,"h",(function(){return wt})),i.d(e,"i",(function(){return _t})),i.d(e,"j",(function(){return Et})),i.d(e,"k",(function(){return Vt})),i.d(e,"l",(function(){return Bt})),i.d(e,"m",(function(){return Nt})),i.d(e,"n",(function(){return Wt})),i.d(e,"o",(function(){return ft})),i.d(e,"p",(function(){return Xt})),i.d(e,"q",(function(){return Gt})),i.d(e,"r",(function(){return $t}));var n=i("8LU1"),a=i("0EQZ"),s=i("fXoL"),o=i("cH1L"),r=i("nLfN"),c=i("ofXK"),l=i("XNiG"),d=i("Cfvw"),h=i("2Vo4"),u=i("7+OI"),p=i("LRne"),b=i("1G5W"),f=i("IzEk"),m=i("vxfF");const g=[[["caption"]],[["colgroup"],["col"]]],v=["caption","colgroup, col"];function _(t,e){if(1&t&&(s.Wb(0,"th",3),s.Qc(1),s.Vb()),2&t){const t=s.hc();s.Lc("text-align",t.justify),s.Db(1),s.Sc(" ",t.headerText," ")}}function y(t,e){if(1&t&&(s.Wb(0,"td",4),s.Qc(1),s.Vb()),2&t){const t=e.$implicit,i=s.hc();s.Lc("text-align",i.justify),s.Db(1),s.Sc(" ",i.dataAccessor(t,i.name)," ")}}function x(t){return class extends t{constructor(...t){super(...t),this._sticky=!1,this._hasStickyChanged=!1}get sticky(){return this._sticky}set sticky(t){const e=this._sticky;this._sticky=Object(n.c)(t),this._hasStickyChanged=e!==this._sticky}hasStickyChanged(){const t=this._hasStickyChanged;return this._hasStickyChanged=!1,t}resetStickyChanged(){this._hasStickyChanged=!1}}}const C=new s.s("CDK_TABLE"),O=new s.s("text-column-options");let D=(()=>{class t{constructor(t){this.template=t}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.P))},t.\u0275dir=s.Lb({type:t,selectors:[["","cdkCellDef",""]]}),t})(),w=(()=>{class t{constructor(t){this.template=t}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.P))},t.\u0275dir=s.Lb({type:t,selectors:[["","cdkHeaderCellDef",""]]}),t})(),M=(()=>{class t{constructor(t){this.template=t}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.P))},t.\u0275dir=s.Lb({type:t,selectors:[["","cdkFooterCellDef",""]]}),t})();class k{}const S=x(k);let I=(()=>{class t extends S{constructor(t){super(),this._table=t,this._stickyEnd=!1}get name(){return this._name}set name(t){this._setNameInput(t)}get stickyEnd(){return this._stickyEnd}set stickyEnd(t){const e=this._stickyEnd;this._stickyEnd=Object(n.c)(t),this._hasStickyChanged=e!==this._stickyEnd}_updateColumnCssClassName(){this._columnCssClassName=["cdk-column-"+this.cssClassFriendlyName]}_setNameInput(t){t&&(this._name=t,this.cssClassFriendlyName=t.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName())}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(C,8))},t.\u0275dir=s.Lb({type:t,selectors:[["","cdkColumnDef",""]],contentQueries:function(t,e,i){var n;1&t&&(s.Jb(i,D,!0),s.Jb(i,w,!0),s.Jb(i,M,!0)),2&t&&(s.yc(n=s.ec())&&(e.cell=n.first),s.yc(n=s.ec())&&(e.headerCell=n.first),s.yc(n=s.ec())&&(e.footerCell=n.first))},inputs:{sticky:"sticky",name:["cdkColumnDef","name"],stickyEnd:"stickyEnd"},features:[s.Cb([{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:t}]),s.Ab]}),t})();class P{constructor(t,e){const i=e.nativeElement.classList;for(const n of t._columnCssClassName)i.add(n)}}let V=(()=>{class t extends P{constructor(t,e){super(t,e)}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(I),s.Qb(s.l))},t.\u0275dir=s.Lb({type:t,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],features:[s.Ab]}),t})(),R=(()=>{class t extends P{constructor(t,e){super(t,e)}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(I),s.Qb(s.l))},t.\u0275dir=s.Lb({type:t,selectors:[["cdk-footer-cell"],["td","cdk-footer-cell",""]],hostAttrs:["role","gridcell",1,"cdk-footer-cell"],features:[s.Ab]}),t})(),j=(()=>{class t extends P{constructor(t,e){super(t,e)}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(I),s.Qb(s.l))},t.\u0275dir=s.Lb({type:t,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:["role","gridcell",1,"cdk-cell"],features:[s.Ab]}),t})();class A{constructor(){this.tasks=[],this.endTasks=[]}}const W=new s.s("_COALESCED_STYLE_SCHEDULER");let T=(()=>{class t{constructor(t){this._ngZone=t,this._currentSchedule=null,this._destroyed=new l.a}schedule(t){this._createScheduleIfNeeded(),this._currentSchedule.tasks.push(t)}scheduleEnd(t){this._createScheduleIfNeeded(),this._currentSchedule.endTasks.push(t)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_createScheduleIfNeeded(){this._currentSchedule||(this._currentSchedule=new A,this._getScheduleObservable().pipe(Object(b.a)(this._destroyed)).subscribe(()=>{for(;this._currentSchedule.tasks.length||this._currentSchedule.endTasks.length;){const t=this._currentSchedule;this._currentSchedule=new A;for(const e of t.tasks)e();for(const e of t.endTasks)e()}this._currentSchedule=null}))}_getScheduleObservable(){return this._ngZone.isStable?Object(d.a)(Promise.resolve(void 0)):this._ngZone.onStable.pipe(Object(f.a)(1))}}return t.\u0275fac=function(e){return new(e||t)(s.ac(s.C))},t.\u0275prov=s.Mb({token:t,factory:t.\u0275fac}),t})(),E=(()=>{class t{constructor(t,e){this.template=t,this._differs=e}ngOnChanges(t){if(!this._columnsDiffer){const e=t.columns&&t.columns.currentValue||[];this._columnsDiffer=this._differs.find(e).create(),this._columnsDiffer.diff(e)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(t){return this instanceof Q?t.headerCell.template:this instanceof B?t.footerCell.template:t.cell.template}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.P),s.Qb(s.v))},t.\u0275dir=s.Lb({type:t,features:[s.Bb]}),t})();class F extends E{}const L=x(F);let Q=(()=>{class t extends L{constructor(t,e,i){super(t,e),this._table=i}ngOnChanges(t){super.ngOnChanges(t)}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.P),s.Qb(s.v),s.Qb(C,8))},t.\u0275dir=s.Lb({type:t,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:["cdkHeaderRowDef","columns"],sticky:["cdkHeaderRowDefSticky","sticky"]},features:[s.Ab,s.Bb]}),t})();class N extends E{}const z=x(N);let B=(()=>{class t extends z{constructor(t,e,i){super(t,e),this._table=i}ngOnChanges(t){super.ngOnChanges(t)}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.P),s.Qb(s.v),s.Qb(C,8))},t.\u0275dir=s.Lb({type:t,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:["cdkFooterRowDef","columns"],sticky:["cdkFooterRowDefSticky","sticky"]},features:[s.Ab,s.Bb]}),t})(),U=(()=>{class t extends E{constructor(t,e,i){super(t,e),this._table=i}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.P),s.Qb(s.v),s.Qb(C,8))},t.\u0275dir=s.Lb({type:t,selectors:[["","cdkRowDef",""]],inputs:{columns:["cdkRowDefColumns","columns"],when:["cdkRowDefWhen","when"]},features:[s.Ab]}),t})(),$=(()=>{class t{constructor(e){this._viewContainer=e,t.mostRecentCellOutlet=this}ngOnDestroy(){t.mostRecentCellOutlet===this&&(t.mostRecentCellOutlet=null)}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.T))},t.\u0275dir=s.Lb({type:t,selectors:[["","cdkCellOutlet",""]]}),t.mostRecentCellOutlet=null,t})(),H=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=s.Kb({type:t,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,e){1&t&&s.Sb(0,0)},directives:[$],encapsulation:2}),t})(),G=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=s.Kb({type:t,selectors:[["cdk-footer-row"],["tr","cdk-footer-row",""]],hostAttrs:["role","row",1,"cdk-footer-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,e){1&t&&s.Sb(0,0)},directives:[$],encapsulation:2}),t})(),X=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=s.Kb({type:t,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,e){1&t&&s.Sb(0,0)},directives:[$],encapsulation:2}),t})(),q=(()=>{class t{constructor(t){this.templateRef=t}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.P))},t.\u0275dir=s.Lb({type:t,selectors:[["ng-template","cdkNoDataRow",""]]}),t})();const K=["top","bottom","left","right"];class Y{constructor(t,e,i,n,a=!0,s=!0){this._isNativeHtmlTable=t,this._stickCellCss=e,this.direction=i,this._coalescedStyleScheduler=n,this._isBrowser=a,this._needsPositionStickyOnElement=s}clearStickyPositioning(t,e){const i=[];for(const n of t)if(n.nodeType===n.ELEMENT_NODE){i.push(n);for(let t=0;t<n.children.length;t++)i.push(n.children[t])}this._scheduleStyleChanges(()=>{for(const t of i)this._removeStickyStyle(t,e)})}updateStickyColumns(t,e,i){if(!t.length||!this._isBrowser||!e.some(t=>t)&&!i.some(t=>t))return;const n=t[0],a=n.children.length,s=this._getCellWidths(n),o=this._getStickyStartColumnPositions(s,e),r=this._getStickyEndColumnPositions(s,i);this._scheduleStyleChanges(()=>{const n="rtl"===this.direction,s=n?"right":"left",c=n?"left":"right";for(const l of t)for(let t=0;t<a;t++){const n=l.children[t];e[t]&&this._addStickyStyle(n,s,o[t]),i[t]&&this._addStickyStyle(n,c,r[t])}})}stickRows(t,e,i){if(!this._isBrowser)return;const n="bottom"===i?t.slice().reverse():t,a="bottom"===i?e.slice().reverse():e,s=[],o=[];for(let r=0,c=0;r<n.length;r++){if(s[r]=c,!a[r])continue;const t=n[r];o[r]=this._isNativeHtmlTable?Array.from(t.children):[t],r!==n.length-1&&(c+=t.getBoundingClientRect().height)}this._scheduleStyleChanges(()=>{for(let t=0;t<n.length;t++){if(!a[t])continue;const e=s[t];for(const n of o[t])this._addStickyStyle(n,i,e)}})}updateStickyFooterContainer(t,e){if(!this._isNativeHtmlTable)return;const i=t.querySelector("tfoot");this._scheduleStyleChanges(()=>{e.some(t=>!t)?this._removeStickyStyle(i,["bottom"]):this._addStickyStyle(i,"bottom",0)})}_removeStickyStyle(t,e){for(const i of e)t.style[i]="";K.some(i=>-1===e.indexOf(i)&&t.style[i])?t.style.zIndex=this._getCalculatedZIndex(t):(t.style.zIndex="",this._needsPositionStickyOnElement&&(t.style.position=""),t.classList.remove(this._stickCellCss))}_addStickyStyle(t,e,i){t.classList.add(this._stickCellCss),t.style[e]=i+"px",t.style.zIndex=this._getCalculatedZIndex(t),this._needsPositionStickyOnElement&&(t.style.cssText+="position: -webkit-sticky; position: sticky; ")}_getCalculatedZIndex(t){const e={top:100,bottom:10,left:1,right:1};let i=0;for(const n of K)t.style[n]&&(i+=e[n]);return i?""+i:""}_getCellWidths(t){const e=[],i=t.children;for(let n=0;n<i.length;n++)e.push(i[n].getBoundingClientRect().width);return e}_getStickyStartColumnPositions(t,e){const i=[];let n=0;for(let a=0;a<t.length;a++)e[a]&&(i[a]=n,n+=t[a]);return i}_getStickyEndColumnPositions(t,e){const i=[];let n=0;for(let a=t.length;a>0;a--)e[a]&&(i[a]=n,n+=t[a]);return i}_scheduleStyleChanges(t){this._coalescedStyleScheduler?this._coalescedStyleScheduler.schedule(t):t()}}let J=(()=>{class t{constructor(t,e){this.viewContainer=t,this.elementRef=e}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.T),s.Qb(s.l))},t.\u0275dir=s.Lb({type:t,selectors:[["","rowOutlet",""]]}),t})(),Z=(()=>{class t{constructor(t,e){this.viewContainer=t,this.elementRef=e}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.T),s.Qb(s.l))},t.\u0275dir=s.Lb({type:t,selectors:[["","headerRowOutlet",""]]}),t})(),tt=(()=>{class t{constructor(t,e){this.viewContainer=t,this.elementRef=e}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.T),s.Qb(s.l))},t.\u0275dir=s.Lb({type:t,selectors:[["","footerRowOutlet",""]]}),t})(),et=(()=>{class t{constructor(t,e){this.viewContainer=t,this.elementRef=e}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.T),s.Qb(s.l))},t.\u0275dir=s.Lb({type:t,selectors:[["","noDataRowOutlet",""]]}),t})(),it=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this._differs=t,this._changeDetectorRef=e,this._elementRef=i,this._dir=a,this._platform=o,this._viewRepeater=r,this._coalescedStyleScheduler=c,this._onDestroy=new l.a,this._columnDefsByName=new Map,this._customColumnDefs=new Set,this._customRowDefs=new Set,this._customHeaderRowDefs=new Set,this._customFooterRowDefs=new Set,this._headerRowDefChanged=!0,this._footerRowDefChanged=!0,this._cachedRenderRowsMap=new Map,this.stickyCssClass="cdk-table-sticky",this.needsPositionStickyOnElement=!0,this._isShowingNoDataRow=!1,this._multiTemplateDataRows=!1,this.viewChange=new h.a({start:0,end:Number.MAX_VALUE}),n||this._elementRef.nativeElement.setAttribute("role","grid"),this._document=s,this._isNativeHtmlTable="TABLE"===this._elementRef.nativeElement.nodeName}get trackBy(){return this._trackByFn}set trackBy(t){this._trackByFn=t}get dataSource(){return this._dataSource}set dataSource(t){this._dataSource!==t&&this._switchDataSource(t)}get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(t){this._multiTemplateDataRows=Object(n.c)(t),this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles())}ngOnInit(){this._setupStickyStyler(),this._isNativeHtmlTable&&this._applyNativeTableSections(),this._dataDiffer=this._differs.find([]).create((t,e)=>this.trackBy?this.trackBy(e.dataIndex,e.data):e)}ngAfterContentChecked(){this._cacheRowDefs(),this._cacheColumnDefs();const t=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():t&&this.updateStickyColumnStyles(),this._checkStickyStates()}ngOnDestroy(){this._rowOutlet.viewContainer.clear(),this._noDataRowOutlet.viewContainer.clear(),this._headerRowOutlet.viewContainer.clear(),this._footerRowOutlet.viewContainer.clear(),this._cachedRenderRowsMap.clear(),this._onDestroy.next(),this._onDestroy.complete(),Object(a.h)(this.dataSource)&&this.dataSource.disconnect(this)}renderRows(){this._renderRows=this._getAllRenderRows();const t=this._dataDiffer.diff(this._renderRows);if(!t)return void this._updateNoDataRow();const e=this._rowOutlet.viewContainer;this._viewRepeater?this._viewRepeater.applyChanges(t,e,(t,e,i)=>this._getEmbeddedViewArgs(t.item,i),t=>t.item.data,t=>{1===t.operation&&t.context&&this._renderCellTemplateForItem(t.record.item.rowDef,t.context)}):t.forEachOperation((t,i,n)=>{if(null==t.previousIndex){const e=t.item;this._renderRow(this._rowOutlet,e.rowDef,n,{$implicit:e.data})}else if(null==n)e.remove(i);else{const t=e.get(i);e.move(t,n)}}),this._updateRowIndexContext(),t.forEachIdentityChange(t=>{e.get(t.currentIndex).context.$implicit=t.item.data}),this._updateNoDataRow(),this.updateStickyColumnStyles()}addColumnDef(t){this._customColumnDefs.add(t)}removeColumnDef(t){this._customColumnDefs.delete(t)}addRowDef(t){this._customRowDefs.add(t)}removeRowDef(t){this._customRowDefs.delete(t)}addHeaderRowDef(t){this._customHeaderRowDefs.add(t),this._headerRowDefChanged=!0}removeHeaderRowDef(t){this._customHeaderRowDefs.delete(t),this._headerRowDefChanged=!0}addFooterRowDef(t){this._customFooterRowDefs.add(t),this._footerRowDefChanged=!0}removeFooterRowDef(t){this._customFooterRowDefs.delete(t),this._footerRowDefChanged=!0}updateStickyHeaderRowStyles(){const t=this._getRenderedRows(this._headerRowOutlet),e=this._elementRef.nativeElement.querySelector("thead");e&&(e.style.display=t.length?"":"none");const i=this._headerRowDefs.map(t=>t.sticky);this._stickyStyler.clearStickyPositioning(t,["top"]),this._stickyStyler.stickRows(t,i,"top"),this._headerRowDefs.forEach(t=>t.resetStickyChanged())}updateStickyFooterRowStyles(){const t=this._getRenderedRows(this._footerRowOutlet),e=this._elementRef.nativeElement.querySelector("tfoot");e&&(e.style.display=t.length?"":"none");const i=this._footerRowDefs.map(t=>t.sticky);this._stickyStyler.clearStickyPositioning(t,["bottom"]),this._stickyStyler.stickRows(t,i,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,i),this._footerRowDefs.forEach(t=>t.resetStickyChanged())}updateStickyColumnStyles(){const t=this._getRenderedRows(this._headerRowOutlet),e=this._getRenderedRows(this._rowOutlet),i=this._getRenderedRows(this._footerRowOutlet);this._stickyStyler.clearStickyPositioning([...t,...e,...i],["left","right"]),t.forEach((t,e)=>{this._addStickyColumnStyles([t],this._headerRowDefs[e])}),this._rowDefs.forEach(t=>{const i=[];for(let n=0;n<e.length;n++)this._renderRows[n].rowDef===t&&i.push(e[n]);this._addStickyColumnStyles(i,t)}),i.forEach((t,e)=>{this._addStickyColumnStyles([t],this._footerRowDefs[e])}),Array.from(this._columnDefsByName.values()).forEach(t=>t.resetStickyChanged())}_getAllRenderRows(){const t=[],e=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let i=0;i<this._data.length;i++){let n=this._data[i];const a=this._getRenderRowsForData(n,i,e.get(n));this._cachedRenderRowsMap.has(n)||this._cachedRenderRowsMap.set(n,new WeakMap);for(let e=0;e<a.length;e++){let i=a[e];const n=this._cachedRenderRowsMap.get(i.data);n.has(i.rowDef)?n.get(i.rowDef).push(i):n.set(i.rowDef,[i]),t.push(i)}}return t}_getRenderRowsForData(t,e,i){return this._getRowDefs(t,e).map(n=>{const a=i&&i.has(n)?i.get(n):[];if(a.length){const t=a.shift();return t.dataIndex=e,t}return{data:t,rowDef:n,dataIndex:e}})}_cacheColumnDefs(){this._columnDefsByName.clear(),nt(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(t=>{this._columnDefsByName.has(t.name),this._columnDefsByName.set(t.name,t)})}_cacheRowDefs(){this._headerRowDefs=nt(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=nt(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=nt(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);const t=this._rowDefs.filter(t=>!t.when);this._defaultRowDef=t[0]}_renderUpdatedColumns(){const t=(t,e)=>t||!!e.getColumnsDiff(),e=this._rowDefs.reduce(t,!1);e&&this._forceRenderDataRows();const i=this._headerRowDefs.reduce(t,!1);i&&this._forceRenderHeaderRows();const n=this._footerRowDefs.reduce(t,!1);return n&&this._forceRenderFooterRows(),e||i||n}_switchDataSource(t){this._data=[],Object(a.h)(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),t||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear()),this._dataSource=t}_observeRenderChanges(){if(!this.dataSource)return;let t;Object(a.h)(this.dataSource)?t=this.dataSource.connect(this):Object(u.a)(this.dataSource)?t=this.dataSource:Array.isArray(this.dataSource)&&(t=Object(p.a)(this.dataSource)),this._renderChangeSubscription=t.pipe(Object(b.a)(this._onDestroy)).subscribe(t=>{this._data=t||[],this.renderRows()})}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((t,e)=>this._renderRow(this._headerRowOutlet,t,e)),this.updateStickyHeaderRowStyles()}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((t,e)=>this._renderRow(this._footerRowOutlet,t,e)),this.updateStickyFooterRowStyles()}_addStickyColumnStyles(t,e){const i=Array.from(e.columns||[]).map(t=>this._columnDefsByName.get(t)),n=i.map(t=>t.sticky),a=i.map(t=>t.stickyEnd);this._stickyStyler.updateStickyColumns(t,n,a)}_getRenderedRows(t){const e=[];for(let i=0;i<t.viewContainer.length;i++){const n=t.viewContainer.get(i);e.push(n.rootNodes[0])}return e}_getRowDefs(t,e){if(1==this._rowDefs.length)return[this._rowDefs[0]];let i=[];if(this.multiTemplateDataRows)i=this._rowDefs.filter(i=>!i.when||i.when(e,t));else{let n=this._rowDefs.find(i=>i.when&&i.when(e,t))||this._defaultRowDef;n&&i.push(n)}return i}_getEmbeddedViewArgs(t,e){return{templateRef:t.rowDef.template,context:{$implicit:t.data},index:e}}_renderRow(t,e,i,n={}){const a=t.viewContainer.createEmbeddedView(e.template,n,i);return this._renderCellTemplateForItem(e,n),a}_renderCellTemplateForItem(t,e){for(let i of this._getCellTemplates(t))$.mostRecentCellOutlet&&$.mostRecentCellOutlet._viewContainer.createEmbeddedView(i,e);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){const t=this._rowOutlet.viewContainer;for(let e=0,i=t.length;e<i;e++){const n=t.get(e).context;n.count=i,n.first=0===e,n.last=e===i-1,n.even=e%2==0,n.odd=!n.even,this.multiTemplateDataRows?(n.dataIndex=this._renderRows[e].dataIndex,n.renderIndex=e):n.index=this._renderRows[e].dataIndex}}_getCellTemplates(t){return t&&t.columns?Array.from(t.columns,e=>{const i=this._columnDefsByName.get(e);return t.extractCellTemplate(i)}):[]}_applyNativeTableSections(){const t=this._document.createDocumentFragment(),e=[{tag:"thead",outlets:[this._headerRowOutlet]},{tag:"tbody",outlets:[this._rowOutlet,this._noDataRowOutlet]},{tag:"tfoot",outlets:[this._footerRowOutlet]}];for(const i of e){const e=this._document.createElement(i.tag);e.setAttribute("role","rowgroup");for(const t of i.outlets)e.appendChild(t.elementRef.nativeElement);t.appendChild(e)}this._elementRef.nativeElement.appendChild(t)}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){const t=(t,e)=>t||e.hasStickyChanged();this._headerRowDefs.reduce(t,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(t,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(t,!1)&&this.updateStickyColumnStyles()}_setupStickyStyler(){this._stickyStyler=new Y(this._isNativeHtmlTable,this.stickyCssClass,this._dir?this._dir.value:"ltr",this._coalescedStyleScheduler,this._platform.isBrowser,this.needsPositionStickyOnElement),(this._dir?this._dir.change:Object(p.a)()).pipe(Object(b.a)(this._onDestroy)).subscribe(t=>{this._stickyStyler.direction=t,this.updateStickyColumnStyles()})}_getOwnDefs(t){return t.filter(t=>!t._table||t._table===this)}_updateNoDataRow(){if(this._noDataRow){const t=0===this._rowOutlet.viewContainer.length;if(t!==this._isShowingNoDataRow){const e=this._noDataRowOutlet.viewContainer;t?e.createEmbeddedView(this._noDataRow.templateRef):e.clear(),this._isShowingNoDataRow=t}}}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.v),s.Qb(s.h),s.Qb(s.l),s.bc("role"),s.Qb(o.c,8),s.Qb(c.e),s.Qb(r.a),s.Qb(a.g,8),s.Qb(W,8))},t.\u0275cmp=s.Kb({type:t,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(t,e,i){var n;1&t&&(s.Jb(i,q,!0),s.Jb(i,I,!0),s.Jb(i,U,!0),s.Jb(i,Q,!0),s.Jb(i,B,!0)),2&t&&(s.yc(n=s.ec())&&(e._noDataRow=n.first),s.yc(n=s.ec())&&(e._contentColumnDefs=n),s.yc(n=s.ec())&&(e._contentRowDefs=n),s.yc(n=s.ec())&&(e._contentHeaderRowDefs=n),s.yc(n=s.ec())&&(e._contentFooterRowDefs=n))},viewQuery:function(t,e){var i;1&t&&(s.Kc(J,!0),s.Kc(Z,!0),s.Kc(tt,!0),s.Kc(et,!0)),2&t&&(s.yc(i=s.ec())&&(e._rowOutlet=i.first),s.yc(i=s.ec())&&(e._headerRowOutlet=i.first),s.yc(i=s.ec())&&(e._footerRowOutlet=i.first),s.yc(i=s.ec())&&(e._noDataRowOutlet=i.first))},hostAttrs:[1,"cdk-table"],inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:"multiTemplateDataRows"},exportAs:["cdkTable"],features:[s.Cb([{provide:C,useExisting:t},{provide:a.g,useClass:a.e},{provide:W,useClass:T}])],ngContentSelectors:v,decls:6,vars:0,consts:[["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,e){1&t&&(s.nc(g),s.mc(0),s.mc(1,1),s.Sb(2,0),s.Sb(3,1),s.Sb(4,2),s.Sb(5,3))},directives:[Z,J,et,tt],encapsulation:2}),t})();function nt(t,e){return t.concat(Array.from(e))}let at=(()=>{class t{constructor(t,e){this._table=t,this._options=e,this.justify="start",this._options=e||{}}get name(){return this._name}set name(t){this._name=t,this._syncColumnDefName()}ngOnInit(){this._syncColumnDefName(),void 0===this.headerText&&(this.headerText=this._createDefaultHeaderText()),this.dataAccessor||(this.dataAccessor=this._options.defaultDataAccessor||((t,e)=>t[e])),this._table&&(this.columnDef.cell=this.cell,this.columnDef.headerCell=this.headerCell,this._table.addColumnDef(this.columnDef))}ngOnDestroy(){this._table&&this._table.removeColumnDef(this.columnDef)}_createDefaultHeaderText(){const t=this.name;return this._options&&this._options.defaultHeaderTextTransform?this._options.defaultHeaderTextTransform(t):t[0].toUpperCase()+t.slice(1)}_syncColumnDefName(){this.columnDef&&(this.columnDef.name=this.name)}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(it,8),s.Qb(O,8))},t.\u0275cmp=s.Kb({type:t,selectors:[["cdk-text-column"]],viewQuery:function(t,e){var i;1&t&&(s.Kc(I,!0),s.Kc(D,!0),s.Kc(w,!0)),2&t&&(s.yc(i=s.ec())&&(e.columnDef=i.first),s.yc(i=s.ec())&&(e.cell=i.first),s.yc(i=s.ec())&&(e.headerCell=i.first))},inputs:{justify:"justify",name:"name",headerText:"headerText",dataAccessor:"dataAccessor"},decls:3,vars:0,consts:[["cdkColumnDef",""],["cdk-header-cell","",3,"text-align",4,"cdkHeaderCellDef"],["cdk-cell","",3,"text-align",4,"cdkCellDef"],["cdk-header-cell",""],["cdk-cell",""]],template:function(t,e){1&t&&(s.Ub(0,0),s.Oc(1,_,2,3,"th",1),s.Oc(2,y,2,3,"td",2),s.Tb())},directives:[I,w,D,V,j],encapsulation:2}),t})(),st=(()=>{class t{}return t.\u0275mod=s.Ob({type:t}),t.\u0275inj=s.Nb({factory:function(e){return new(e||t)},imports:[[m.g]]}),t})();var ot=i("FKr1"),rt=i("quSY"),ct=i("VRyK"),lt=i("itXk"),dt=i("lJxs");const ht=[[["caption"]],[["colgroup"],["col"]]],ut=["caption","colgroup, col"];function pt(t,e){if(1&t&&(s.Wb(0,"th",3),s.Qc(1),s.Vb()),2&t){const t=s.hc();s.Lc("text-align",t.justify),s.Db(1),s.Sc(" ",t.headerText," ")}}function bt(t,e){if(1&t&&(s.Wb(0,"td",4),s.Qc(1),s.Vb()),2&t){const t=e.$implicit,i=s.hc();s.Lc("text-align",i.justify),s.Db(1),s.Sc(" ",i.dataAccessor(t,i.name)," ")}}let ft=(()=>{class t extends it{constructor(){super(...arguments),this.stickyCssClass="mat-table-sticky",this.needsPositionStickyOnElement=!1}}return t.\u0275fac=function(e){return mt(e||t)},t.\u0275cmp=s.Kb({type:t,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-table"],exportAs:["matTable"],features:[s.Cb([{provide:a.g,useClass:a.e},{provide:it,useExisting:t},{provide:C,useExisting:t},{provide:W,useClass:T}]),s.Ab],ngContentSelectors:ut,decls:6,vars:0,consts:[["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,e){1&t&&(s.nc(ht),s.mc(0),s.mc(1,1),s.Sb(2,0),s.Sb(3,1),s.Sb(4,2),s.Sb(5,3))},directives:[Z,J,et,tt],styles:['mat-table{display:block}mat-header-row{min-height:56px}mat-row,mat-footer-row{min-height:48px}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-row::after,mat-header-row::after,mat-footer-row::after{display:inline-block;min-height:inherit;content:""}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}table.mat-table{border-spacing:0}tr.mat-header-row{height:56px}tr.mat-row,tr.mat-footer-row{height:48px}th.mat-header-cell{text-align:left}[dir=rtl] th.mat-header-cell{text-align:right}th.mat-header-cell,td.mat-cell,td.mat-footer-cell{padding:0;border-bottom-width:1px;border-bottom-style:solid}th.mat-header-cell:first-of-type,td.mat-cell:first-of-type,td.mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] th.mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] td.mat-cell:first-of-type:not(:only-of-type),[dir=rtl] td.mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}th.mat-header-cell:last-of-type,td.mat-cell:last-of-type,td.mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] th.mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] td.mat-cell:last-of-type:not(:only-of-type),[dir=rtl] td.mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}.mat-table-sticky{position:-webkit-sticky;position:sticky}\n'],encapsulation:2}),t})();const mt=s.Yb(ft);let gt=(()=>{class t extends D{}return t.\u0275fac=function(e){return vt(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","matCellDef",""]],features:[s.Cb([{provide:D,useExisting:t}]),s.Ab]}),t})();const vt=s.Yb(gt);let _t=(()=>{class t extends w{}return t.\u0275fac=function(e){return yt(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","matHeaderCellDef",""]],features:[s.Cb([{provide:w,useExisting:t}]),s.Ab]}),t})();const yt=s.Yb(_t);let xt=(()=>{class t extends M{}return t.\u0275fac=function(e){return Ct(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","matFooterCellDef",""]],features:[s.Cb([{provide:M,useExisting:t}]),s.Ab]}),t})();const Ct=s.Yb(xt);let Ot=(()=>{class t extends I{get name(){return this._name}set name(t){this._setNameInput(t)}_updateColumnCssClassName(){super._updateColumnCssClassName(),this._columnCssClassName.push("mat-column-"+this.cssClassFriendlyName)}}return t.\u0275fac=function(e){return Dt(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","matColumnDef",""]],inputs:{sticky:"sticky",name:["matColumnDef","name"]},features:[s.Cb([{provide:I,useExisting:t},{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:t}]),s.Ab]}),t})();const Dt=s.Yb(Ot);let wt=(()=>{class t extends V{}return t.\u0275fac=function(e){return Mt(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-header-cell"],features:[s.Ab]}),t})();const Mt=s.Yb(wt);let kt=(()=>{class t extends R{}return t.\u0275fac=function(e){return St(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["mat-footer-cell"],["td","mat-footer-cell",""]],hostAttrs:["role","gridcell",1,"mat-footer-cell"],features:[s.Ab]}),t})();const St=s.Yb(kt);let It=(()=>{class t extends j{}return t.\u0275fac=function(e){return Pt(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:["role","gridcell",1,"mat-cell"],features:[s.Ab]}),t})();const Pt=s.Yb(It);let Vt=(()=>{class t extends Q{}return t.\u0275fac=function(e){return Rt(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","matHeaderRowDef",""]],inputs:{columns:["matHeaderRowDef","columns"],sticky:["matHeaderRowDefSticky","sticky"]},features:[s.Cb([{provide:Q,useExisting:t}]),s.Ab]}),t})();const Rt=s.Yb(Vt);let jt=(()=>{class t extends B{}return t.\u0275fac=function(e){return At(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","matFooterRowDef",""]],inputs:{columns:["matFooterRowDef","columns"],sticky:["matFooterRowDefSticky","sticky"]},features:[s.Cb([{provide:B,useExisting:t}]),s.Ab]}),t})();const At=s.Yb(jt);let Wt=(()=>{class t extends U{}return t.\u0275fac=function(e){return Tt(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","matRowDef",""]],inputs:{columns:["matRowDefColumns","columns"],when:["matRowDefWhen","when"]},features:[s.Cb([{provide:U,useExisting:t}]),s.Ab]}),t})();const Tt=s.Yb(Wt);let Et=(()=>{class t extends H{}return t.\u0275fac=function(e){return Ft(e||t)},t.\u0275cmp=s.Kb({type:t,selectors:[["mat-header-row"],["tr","mat-header-row",""]],hostAttrs:["role","row",1,"mat-header-row"],exportAs:["matHeaderRow"],features:[s.Cb([{provide:H,useExisting:t}]),s.Ab],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,e){1&t&&s.Sb(0,0)},directives:[$],encapsulation:2}),t})();const Ft=s.Yb(Et);let Lt=(()=>{class t extends G{}return t.\u0275fac=function(e){return Qt(e||t)},t.\u0275cmp=s.Kb({type:t,selectors:[["mat-footer-row"],["tr","mat-footer-row",""]],hostAttrs:["role","row",1,"mat-footer-row"],exportAs:["matFooterRow"],features:[s.Cb([{provide:G,useExisting:t}]),s.Ab],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,e){1&t&&s.Sb(0,0)},directives:[$],encapsulation:2}),t})();const Qt=s.Yb(Lt);let Nt=(()=>{class t extends X{}return t.\u0275fac=function(e){return zt(e||t)},t.\u0275cmp=s.Kb({type:t,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-row"],exportAs:["matRow"],features:[s.Cb([{provide:X,useExisting:t}]),s.Ab],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,e){1&t&&s.Sb(0,0)},directives:[$],encapsulation:2}),t})();const zt=s.Yb(Nt);let Bt=(()=>{class t extends q{}return t.\u0275fac=function(e){return Ut(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["ng-template","matNoDataRow",""]],features:[s.Cb([{provide:q,useExisting:t}]),s.Ab]}),t})();const Ut=s.Yb(Bt);let $t=(()=>{class t extends at{}return t.\u0275fac=function(e){return Ht(e||t)},t.\u0275cmp=s.Kb({type:t,selectors:[["mat-text-column"]],features:[s.Ab],decls:3,vars:0,consts:[["matColumnDef",""],["mat-header-cell","",3,"text-align",4,"matHeaderCellDef"],["mat-cell","",3,"text-align",4,"matCellDef"],["mat-header-cell",""],["mat-cell",""]],template:function(t,e){1&t&&(s.Ub(0,0),s.Oc(1,pt,2,3,"th",1),s.Oc(2,bt,2,3,"td",2),s.Tb())},directives:[Ot,_t,gt,wt,It],encapsulation:2}),t})();const Ht=s.Yb($t);let Gt=(()=>{class t{}return t.\u0275mod=s.Ob({type:t}),t.\u0275inj=s.Nb({factory:function(e){return new(e||t)},imports:[[st,ot.k],ot.k]}),t})();class Xt extends a.b{constructor(t=[]){super(),this._renderData=new h.a([]),this._filter=new h.a(""),this._internalPageChanges=new l.a,this._renderChangesSubscription=rt.a.EMPTY,this.sortingDataAccessor=(t,e)=>{const i=t[e];if(Object(n.a)(i)){const t=Number(i);return t<9007199254740991?t:i}return i},this.sortData=(t,e)=>{const i=e.active,n=e.direction;return i&&""!=n?t.sort((t,e)=>{let a=this.sortingDataAccessor(t,i),s=this.sortingDataAccessor(e,i);const o=typeof a,r=typeof s;o!==r&&("number"===o&&(a+=""),"number"===r&&(s+=""));let c=0;return null!=a&&null!=s?a>s?c=1:a<s&&(c=-1):null!=a?c=1:null!=s&&(c=-1),c*("asc"==n?1:-1)}):t},this.filterPredicate=(t,e)=>{const i=Object.keys(t).reduce((e,i)=>e+t[i]+"\u25ec","").toLowerCase(),n=e.trim().toLowerCase();return-1!=i.indexOf(n)},this._data=new h.a(t),this._updateChangeSubscription()}get data(){return this._data.value}set data(t){this._data.next(t)}get filter(){return this._filter.value}set filter(t){this._filter.next(t)}get sort(){return this._sort}set sort(t){this._sort=t,this._updateChangeSubscription()}get paginator(){return this._paginator}set paginator(t){this._paginator=t,this._updateChangeSubscription()}_updateChangeSubscription(){const t=this._sort?Object(ct.a)(this._sort.sortChange,this._sort.initialized):Object(p.a)(null),e=this._paginator?Object(ct.a)(this._paginator.page,this._internalPageChanges,this._paginator.initialized):Object(p.a)(null),i=this._data,n=Object(lt.a)([i,this._filter]).pipe(Object(dt.a)(([t])=>this._filterData(t))),a=Object(lt.a)([n,t]).pipe(Object(dt.a)(([t])=>this._orderData(t))),s=Object(lt.a)([a,e]).pipe(Object(dt.a)(([t])=>this._pageData(t)));this._renderChangesSubscription.unsubscribe(),this._renderChangesSubscription=s.subscribe(t=>this._renderData.next(t))}_filterData(t){return this.filteredData=this.filter?t.filter(t=>this.filterPredicate(t,this.filter)):t,this.paginator&&this._updatePaginator(this.filteredData.length),this.filteredData}_orderData(t){return this.sort?this.sortData(t.slice(),this.sort):t}_pageData(t){if(!this.paginator)return t;const e=this.paginator.pageIndex*this.paginator.pageSize;return t.slice(e,e+this.paginator.pageSize)}_updatePaginator(t){Promise.resolve().then(()=>{const e=this.paginator;if(e&&(e.length=t,e.pageIndex>0)){const t=Math.ceil(e.length/e.pageSize)-1||0,i=Math.min(e.pageIndex,t);i!==e.pageIndex&&(e.pageIndex=i,this._internalPageChanges.next())}})}connect(){return this._renderData}disconnect(){}}},"+rOU":function(t,e,i){"use strict";i.d(e,"a",(function(){return l})),i.d(e,"b",(function(){return u})),i.d(e,"c",(function(){return p})),i.d(e,"d",(function(){return o})),i.d(e,"e",(function(){return h})),i.d(e,"f",(function(){return d})),i.d(e,"g",(function(){return b})),i.d(e,"h",(function(){return m})),i.d(e,"i",(function(){return r}));var n=i("fXoL"),a=i("ofXK");class s{attach(t){return this._attachedHost=t,t.attach(this)}detach(){let t=this._attachedHost;null!=t&&(this._attachedHost=null,t.detach())}get isAttached(){return null!=this._attachedHost}setAttachedHost(t){this._attachedHost=t}}class o extends s{constructor(t,e,i,n){super(),this.component=t,this.viewContainerRef=e,this.injector=i,this.componentFactoryResolver=n}}class r extends s{constructor(t,e,i){super(),this.templateRef=t,this.viewContainerRef=e,this.context=i}get origin(){return this.templateRef.elementRef}attach(t,e=this.context){return this.context=e,super.attach(t)}detach(){return this.context=void 0,super.detach()}}class c extends s{constructor(t){super(),this.element=t instanceof n.l?t.nativeElement:t}}class l{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(t){return t instanceof o?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof r?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof c?(this._attachedPortal=t,this.attachDomPortal(t)):void 0}detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(t){this._disposeFn=t}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}}class d extends l{constructor(t,e,i,n,a){super(),this.outletElement=t,this._componentFactoryResolver=e,this._appRef=i,this._defaultInjector=n,this.attachDomPortal=t=>{const e=t.element,i=this._document.createComment("dom-portal");e.parentNode.insertBefore(i,e),this.outletElement.appendChild(e),super.setDisposeFn(()=>{i.parentNode&&i.parentNode.replaceChild(e,i)})},this._document=a}attachComponentPortal(t){const e=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component);let i;return t.viewContainerRef?(i=t.viewContainerRef.createComponent(e,t.viewContainerRef.length,t.injector||t.viewContainerRef.injector),this.setDisposeFn(()=>i.destroy())):(i=e.create(t.injector||this._defaultInjector),this._appRef.attachView(i.hostView),this.setDisposeFn(()=>{this._appRef.detachView(i.hostView),i.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(i)),i}attachTemplatePortal(t){let e=t.viewContainerRef,i=e.createEmbeddedView(t.templateRef,t.context);return i.rootNodes.forEach(t=>this.outletElement.appendChild(t)),i.detectChanges(),this.setDisposeFn(()=>{let t=e.indexOf(i);-1!==t&&e.remove(t)}),i}dispose(){super.dispose(),null!=this.outletElement.parentNode&&this.outletElement.parentNode.removeChild(this.outletElement)}_getComponentRootNode(t){return t.hostView.rootNodes[0]}}class h extends d{}let u=(()=>{class t extends r{constructor(t,e){super(t,e)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.P),n.Qb(n.T))},t.\u0275dir=n.Lb({type:t,selectors:[["","cdkPortal",""]],exportAs:["cdkPortal"],features:[n.Ab]}),t})(),p=(()=>{class t extends l{constructor(t,e,i){super(),this._componentFactoryResolver=t,this._viewContainerRef=e,this._isInitialized=!1,this.attached=new n.o,this.attachDomPortal=t=>{const e=t.element,i=this._document.createComment("dom-portal");t.setAttachedHost(this),e.parentNode.insertBefore(i,e),this._getRootNode().appendChild(e),super.setDisposeFn(()=>{i.parentNode&&i.parentNode.replaceChild(e,i)})},this._document=i}get portal(){return this._attachedPortal}set portal(t){(!this.hasAttached()||t||this._isInitialized)&&(this.hasAttached()&&super.detach(),t&&super.attach(t),this._attachedPortal=t)}get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedPortal=null,this._attachedRef=null}attachComponentPortal(t){t.setAttachedHost(this);const e=null!=t.viewContainerRef?t.viewContainerRef:this._viewContainerRef,i=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component),n=e.createComponent(i,e.length,t.injector||e.injector);return e!==this._viewContainerRef&&this._getRootNode().appendChild(n.hostView.rootNodes[0]),super.setDisposeFn(()=>n.destroy()),this._attachedPortal=t,this._attachedRef=n,this.attached.emit(n),n}attachTemplatePortal(t){t.setAttachedHost(this);const e=this._viewContainerRef.createEmbeddedView(t.templateRef,t.context);return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=t,this._attachedRef=e,this.attached.emit(e),e}_getRootNode(){const t=this._viewContainerRef.element.nativeElement;return t.nodeType===t.ELEMENT_NODE?t:t.parentNode}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.j),n.Qb(n.T),n.Qb(a.e))},t.\u0275dir=n.Lb({type:t,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[n.Ab]}),t})(),b=(()=>{class t extends p{}return t.\u0275fac=function(e){return f(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["","cdkPortalHost",""],["","portalHost",""]],inputs:{portal:["cdkPortalHost","portal"]},exportAs:["cdkPortalHost"],features:[n.Cb([{provide:p,useExisting:t}]),n.Ab]}),t})();const f=n.Yb(b);let m=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)}}),t})()},"/1cH":function(t,e,i){"use strict";i.d(e,"a",(function(){return E})),i.d(e,"b",(function(){return X})),i.d(e,"c",(function(){return Q})),i.d(e,"d",(function(){return H}));var n=i("u47x"),a=i("8LU1"),s=i("fXoL"),o=i("FKr1"),r=i("quSY"),c=i("XNiG"),l=i("NXyV"),d=i("VRyK"),h=i("LRne"),u=i("xgIS"),p=i("ofXK"),b=i("rDax"),f=i("vxfF"),m=i("FtGj"),g=i("nLfN"),v=i("+rOU"),_=i("3Pt+"),y=i("kmnG"),x=i("IzEk"),C=i("eIep"),O=i("pLZG"),D=i("lJxs"),w=i("vkgz"),M=i("3E0/"),k=i("cH1L");const S=["panel"];function I(t,e){if(1&t&&(s.Wb(0,"div",0,1),s.mc(2),s.Vb()),2&t){const t=s.hc();s.oc("id",t.id)("ngClass",t._classList)}}const P=["*"];let V=0;class R{constructor(t,e){this.source=t,this.option=e}}class j{}const A=Object(o.B)(j),W=new s.s("mat-autocomplete-default-options",{providedIn:"root",factory:function(){return{autoActiveFirstOption:!1}}});let T=(()=>{class t extends A{constructor(t,e,i){super(),this._changeDetectorRef=t,this._elementRef=e,this._activeOptionChanges=r.a.EMPTY,this.showPanel=!1,this._isOpen=!1,this.displayWith=null,this.optionSelected=new s.o,this.opened=new s.o,this.closed=new s.o,this.optionActivated=new s.o,this._classList={},this.id="mat-autocomplete-"+V++,this._autoActiveFirstOption=!!i.autoActiveFirstOption}get isOpen(){return this._isOpen&&this.showPanel}get autoActiveFirstOption(){return this._autoActiveFirstOption}set autoActiveFirstOption(t){this._autoActiveFirstOption=Object(a.c)(t)}set classList(t){this._classList=t&&t.length?t.split(" ").reduce((t,e)=>(t[e.trim()]=!0,t),{}):{},this._setVisibilityClasses(this._classList),this._elementRef.nativeElement.className=""}ngAfterContentInit(){this._keyManager=new n.b(this.options).withWrap(),this._activeOptionChanges=this._keyManager.change.subscribe(t=>{this.optionActivated.emit({source:this,option:this.options.toArray()[t]||null})}),this._setVisibility()}ngOnDestroy(){this._activeOptionChanges.unsubscribe()}_setScrollTop(t){this.panel&&(this.panel.nativeElement.scrollTop=t)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options.length,this._setVisibilityClasses(this._classList),this._changeDetectorRef.markForCheck()}_emitSelectEvent(t){const e=new R(this,t);this.optionSelected.emit(e)}_setVisibilityClasses(t){t[this._visibleClass]=this.showPanel,t[this._hiddenClass]=!this.showPanel}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.h),s.Qb(s.l),s.Qb(W))},t.\u0275dir=s.Lb({type:t,viewQuery:function(t,e){var i;1&t&&(s.Kc(s.P,!0),s.Xc(S,!0)),2&t&&(s.yc(i=s.ec())&&(e.template=i.first),s.yc(i=s.ec())&&(e.panel=i.first))},inputs:{displayWith:"displayWith",autoActiveFirstOption:"autoActiveFirstOption",classList:["class","classList"],panelWidth:"panelWidth"},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},features:[s.Ab]}),t})(),E=(()=>{class t extends T{constructor(){super(...arguments),this._visibleClass="mat-autocomplete-visible",this._hiddenClass="mat-autocomplete-hidden"}}return t.\u0275fac=function(e){return F(e||t)},t.\u0275cmp=s.Kb({type:t,selectors:[["mat-autocomplete"]],contentQueries:function(t,e,i){var n;1&t&&(s.Jb(i,o.h,!0),s.Jb(i,o.p,!0)),2&t&&(s.yc(n=s.ec())&&(e.optionGroups=n),s.yc(n=s.ec())&&(e.options=n))},hostAttrs:[1,"mat-autocomplete"],inputs:{disableRipple:"disableRipple"},exportAs:["matAutocomplete"],features:[s.Cb([{provide:o.i,useExisting:t}]),s.Ab],ngContentSelectors:P,decls:1,vars:0,consts:[["role","listbox",1,"mat-autocomplete-panel",3,"id","ngClass"],["panel",""]],template:function(t,e){1&t&&(s.nc(),s.Oc(0,I,3,2,"ng-template"))},directives:[p.q],styles:[".mat-autocomplete-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;visibility:hidden;max-width:none;max-height:256px;position:relative;width:100%;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.mat-autocomplete-panel.mat-autocomplete-visible{visibility:visible}.mat-autocomplete-panel.mat-autocomplete-hidden{visibility:hidden}.mat-autocomplete-panel-above .mat-autocomplete-panel{border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px}.mat-autocomplete-panel .mat-divider-horizontal{margin-top:-1px}.cdk-high-contrast-active .mat-autocomplete-panel{outline:solid 1px}\n"],encapsulation:2,changeDetection:0}),t})();const F=s.Yb(E);let L=(()=>{class t{constructor(t){this.elementRef=t}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.l))},t.\u0275dir=s.Lb({type:t}),t})(),Q=(()=>{class t extends L{}return t.\u0275fac=function(e){return N(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","matAutocompleteOrigin",""]],exportAs:["matAutocompleteOrigin"],features:[s.Ab]}),t})();const N=s.Yb(Q),z=new s.s("mat-autocomplete-scroll-strategy"),B={provide:z,deps:[b.c],useFactory:function(t){return()=>t.scrollStrategies.reposition()}},U={provide:_.s,useExisting:Object(s.X)(()=>H),multi:!0};let $=(()=>{class t{constructor(t,e,i,n,a,s,o,h,u,p){this._element=t,this._overlay=e,this._viewContainerRef=i,this._zone=n,this._changeDetectorRef=a,this._dir=o,this._formField=h,this._document=u,this._viewportRuler=p,this._componentDestroyed=!1,this._autocompleteDisabled=!1,this._manuallyFloatingLabel=!1,this._viewportSubscription=r.a.EMPTY,this._canOpenOnNextFocus=!0,this._closeKeyEventStream=new c.a,this._windowBlurHandler=()=>{this._canOpenOnNextFocus=this._document.activeElement!==this._element.nativeElement||this.panelOpen},this._onChange=()=>{},this._onTouched=()=>{},this.position="auto",this.autocompleteAttribute="off",this._overlayAttached=!1,this.optionSelections=Object(l.a)(()=>this.autocomplete&&this.autocomplete.options?Object(d.a)(...this.autocomplete.options.map(t=>t.onSelectionChange)):this._zone.onStable.pipe(Object(x.a)(1),Object(C.a)(()=>this.optionSelections))),this._scrollStrategy=s}get autocompleteDisabled(){return this._autocompleteDisabled}set autocompleteDisabled(t){this._autocompleteDisabled=Object(a.c)(t)}ngAfterViewInit(){const t=this._getWindow();void 0!==t&&this._zone.runOutsideAngular(()=>t.addEventListener("blur",this._windowBlurHandler))}ngOnChanges(t){t.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){const t=this._getWindow();void 0!==t&&t.removeEventListener("blur",this._windowBlurHandler),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}openPanel(){this._attachOverlay(),this._floatLabel()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this.autocomplete.closed.emit(),this.autocomplete._isOpen=this._overlayAttached=!1,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._componentDestroyed||this._changeDetectorRef.detectChanges())}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return Object(d.a)(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(Object(O.a)(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(Object(O.a)(()=>this._overlayAttached)):Object(h.a)()).pipe(Object(D.a)(t=>t instanceof o.r?t:null))}get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return Object(d.a)(Object(u.a)(this._document,"click"),Object(u.a)(this._document,"touchend")).pipe(Object(O.a)(t=>{const e=this._isInsideShadowRoot&&t.composedPath?t.composedPath()[0]:t.target,i=this._formField?this._formField._elementRef.nativeElement:null,n=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;return this._overlayAttached&&e!==this._element.nativeElement&&(!i||!i.contains(e))&&(!n||!n.contains(e))&&!!this._overlayRef&&!this._overlayRef.overlayElement.contains(e)}))}writeValue(t){Promise.resolve(null).then(()=>this._setTriggerValue(t))}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this._element.nativeElement.disabled=t}_handleKeydown(t){const e=t.keyCode;if(e!==m.h||Object(m.v)(t)||t.preventDefault(),this.activeOption&&e===m.g&&this.panelOpen)this.activeOption._selectViaInteraction(),this._resetActiveItem(),t.preventDefault();else if(this.autocomplete){const i=this.autocomplete._keyManager.activeItem,n=e===m.s||e===m.e;this.panelOpen||e===m.r?this.autocomplete._keyManager.onKeydown(t):n&&this._canOpen()&&this.openPanel(),(n||this.autocomplete._keyManager.activeItem!==i)&&this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0)}}_handleInput(t){let e=t.target,i=e.value;"number"===e.type&&(i=""==i?null:parseFloat(i)),this._previousValue!==i&&(this._previousValue=i,this._onChange(i),this._canOpen()&&this._document.activeElement===t.target&&this.openPanel())}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_floatLabel(t=!1){this._formField&&"auto"===this._formField.floatLabel&&(t?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField.floatLabel="auto",this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){const t=this._zone.onStable.pipe(Object(x.a)(1)),e=this.autocomplete.options.changes.pipe(Object(w.a)(()=>this._positionStrategy.reapplyLastPosition()),Object(M.a)(0));return Object(d.a)(t,e).pipe(Object(C.a)(()=>{const t=this.panelOpen;return this._resetActiveItem(),this.autocomplete._setVisibility(),this.panelOpen&&(this._overlayRef.updatePosition(),t!==this.panelOpen&&this.autocomplete.opened.emit()),this.panelClosingActions}),Object(x.a)(1)).subscribe(t=>this._setValueAndClose(t))}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_setTriggerValue(t){const e=this.autocomplete&&this.autocomplete.displayWith?this.autocomplete.displayWith(t):t,i=null!=e?e:"";this._formField?this._formField._control.value=i:this._element.nativeElement.value=i,this._previousValue=i}_setValueAndClose(t){t&&t.source&&(this._clearPreviousSelectedOption(t.source),this._setTriggerValue(t.source.value),this._onChange(t.source.value),this._element.nativeElement.focus(),this.autocomplete._emitSelectEvent(t.source)),this.closePanel()}_clearPreviousSelectedOption(t){this.autocomplete.options.forEach(e=>{e!==t&&e.selected&&e.deselect()})}_attachOverlay(){null==this._isInsideShadowRoot&&(this._isInsideShadowRoot=!!Object(g.c)(this._element.nativeElement));let t=this._overlayRef;t?(this._positionStrategy.setOrigin(this._getConnectedElement()),t.updateSize({width:this._getPanelWidth()})):(this._portal=new v.i(this.autocomplete.template,this._viewContainerRef),t=this._overlay.create(this._getOverlayConfig()),this._overlayRef=t,t.keydownEvents().subscribe(t=>{(t.keyCode===m.h&&!Object(m.v)(t)||t.keyCode===m.s&&Object(m.v)(t,"altKey"))&&(this._resetActiveItem(),this._closeKeyEventStream.next(),t.stopPropagation(),t.preventDefault())}),this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&t&&t.updateSize({width:this._getPanelWidth()})})),t&&!t.hasAttached()&&(t.attach(this._portal),this._closingActionsSubscription=this._subscribeToClosingActions());const e=this.panelOpen;this.autocomplete._setVisibility(),this.autocomplete._isOpen=this._overlayAttached=!0,this.panelOpen&&e!==this.panelOpen&&this.autocomplete.opened.emit()}_getOverlayConfig(){return new b.d({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir})}_getOverlayPosition(){const t=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(t),this._positionStrategy=t,t}_setStrategyPositions(t){const e=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],i=this._aboveClass,n=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:i},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:i}];let a;a="above"===this.position?n:"below"===this.position?e:[...e,...n],t.withPositions(a)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){this.autocomplete._keyManager.setActiveItem(this.autocomplete.autoActiveFirstOption?0:-1)}_canOpen(){const t=this._element.nativeElement;return!t.readOnly&&!t.disabled&&!this._autocompleteDisabled}_getWindow(){var t;return(null===(t=this._document)||void 0===t?void 0:t.defaultView)||window}_scrollToOption(t){const e=this.autocomplete,i=Object(o.y)(t,e.options,e.optionGroups);if(0===t&&1===i)e._setScrollTop(0);else{const i=e.options.toArray()[t];if(i){const t=i._getHostElement(),n=Object(o.z)(t.offsetTop,t.offsetHeight,e._getScrollTop(),e.panel.nativeElement.offsetHeight);e._setScrollTop(n)}}}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.l),s.Qb(b.c),s.Qb(s.T),s.Qb(s.C),s.Qb(s.h),s.Qb(z),s.Qb(k.c,8),s.Qb(y.a,9),s.Qb(p.e,8),s.Qb(f.h))},t.\u0275dir=s.Lb({type:t,inputs:{position:["matAutocompletePosition","position"],autocompleteAttribute:["autocomplete","autocompleteAttribute"],autocompleteDisabled:["matAutocompleteDisabled","autocompleteDisabled"],autocomplete:["matAutocomplete","autocomplete"],connectedTo:["matAutocompleteConnectedTo","connectedTo"]},features:[s.Bb]}),t})(),H=(()=>{class t extends ${constructor(){super(...arguments),this._aboveClass="mat-autocomplete-panel-above"}}return t.\u0275fac=function(e){return G(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-autocomplete-trigger"],hostVars:7,hostBindings:function(t,e){1&t&&s.dc("focusin",(function(){return e._handleFocus()}))("blur",(function(){return e._onTouched()}))("input",(function(t){return e._handleInput(t)}))("keydown",(function(t){return e._handleKeydown(t)})),2&t&&s.Eb("autocomplete",e.autocompleteAttribute)("role",e.autocompleteDisabled?null:"combobox")("aria-autocomplete",e.autocompleteDisabled?null:"list")("aria-activedescendant",e.panelOpen&&e.activeOption?e.activeOption.id:null)("aria-expanded",e.autocompleteDisabled?null:e.panelOpen.toString())("aria-owns",e.autocompleteDisabled||!e.panelOpen||null==e.autocomplete?null:e.autocomplete.id)("aria-haspopup",!e.autocompleteDisabled)},exportAs:["matAutocompleteTrigger"],features:[s.Cb([U]),s.Ab]}),t})();const G=s.Yb(H);let X=(()=>{class t{}return t.\u0275mod=s.Ob({type:t}),t.\u0275inj=s.Nb({factory:function(e){return new(e||t)},providers:[B],imports:[[b.f,o.q,o.k,p.c],f.c,o.q,o.k]}),t})()},"/t3+":function(t,e,i){"use strict";i.d(e,"a",(function(){return u})),i.d(e,"b",(function(){return p})),i.d(e,"c",(function(){return h}));var n=i("FKr1"),a=i("ofXK"),s=i("fXoL"),o=i("nLfN");const r=["*",[["mat-toolbar-row"]]],c=["*","mat-toolbar-row"];class l{constructor(t){this._elementRef=t}}const d=Object(n.A)(l);let h=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),t})(),u=(()=>{class t extends d{constructor(t,e,i){super(t),this._platform=e,this._document=i}ngAfterViewInit(){this._platform.isBrowser&&(this._checkToolbarMixedModes(),this._toolbarRows.changes.subscribe(()=>this._checkToolbarMixedModes()))}_checkToolbarMixedModes(){}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.l),s.Qb(o.a),s.Qb(a.e))},t.\u0275cmp=s.Kb({type:t,selectors:[["mat-toolbar"]],contentQueries:function(t,e,i){var n;1&t&&s.Jb(i,h,!0),2&t&&s.yc(n=s.ec())&&(e._toolbarRows=n)},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(t,e){2&t&&s.Ib("mat-toolbar-multiple-rows",e._toolbarRows.length>0)("mat-toolbar-single-row",0===e._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[s.Ab],ngContentSelectors:c,decls:2,vars:0,template:function(t,e){1&t&&(s.nc(r),s.mc(0),s.mc(1,1))},styles:[".cdk-high-contrast-active .mat-toolbar{outline:solid 1px}.mat-toolbar-row,.mat-toolbar-single-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap}.mat-toolbar-multiple-rows{display:flex;box-sizing:border-box;flex-direction:column;width:100%}\n"],encapsulation:2,changeDetection:0}),t})(),p=(()=>{class t{}return t.\u0275mod=s.Ob({type:t}),t.\u0275inj=s.Nb({factory:function(e){return new(e||t)},imports:[[n.k],n.k]}),t})()},"/uUt":function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var n=i("7o/Q");function a(t,e){return i=>i.lift(new s(t,e))}class s{constructor(t,e){this.compare=t,this.keySelector=e}call(t,e){return e.subscribe(new o(t,this.compare,this.keySelector))}}class o extends n.a{constructor(t,e,i){super(t),this.keySelector=i,this.hasKey=!1,"function"==typeof e&&(this.compare=e)}compare(t,e){return t===e}_next(t){let e;try{const{keySelector:i}=this;e=i?i(t):t}catch(n){return this.destination.error(n)}let i=!1;if(this.hasKey)try{const{compare:t}=this;i=t(this.key,e)}catch(n){return this.destination.error(n)}else this.hasKey=!0;i||(this.key=e,this.destination.next(t))}}},0:function(t,e,i){t.exports=i("jj9e")},"0EQZ":function(t,e,i){"use strict";i.d(e,"a",(function(){return l})),i.d(e,"b",(function(){return r})),i.d(e,"c",(function(){return u})),i.d(e,"d",(function(){return p})),i.d(e,"e",(function(){return d})),i.d(e,"f",(function(){return h})),i.d(e,"g",(function(){return b})),i.d(e,"h",(function(){return c}));var n=i("7+OI"),a=i("LRne"),s=i("XNiG"),o=i("fXoL");class r{}function c(t){return t&&"function"==typeof t.connect}class l extends r{constructor(t){super(),this._data=t}connect(){return Object(n.a)(this._data)?this._data:Object(a.a)(this._data)}disconnect(){}}class d{applyChanges(t,e,i,n,a){t.forEachOperation((t,n,s)=>{let o,r;if(null==t.previousIndex){const a=i(t,n,s);o=e.createEmbeddedView(a.templateRef,a.context,a.index),r=1}else null==s?(e.remove(n),r=3):(o=e.get(n),e.move(o,s),r=2);a&&a({context:null==o?void 0:o.context,operation:r,record:t})})}detach(){}}class h{constructor(){this.viewCacheSize=20,this._viewCache=[]}applyChanges(t,e,i,n,a){t.forEachOperation((t,s,o)=>{let r,c;null==t.previousIndex?(r=this._insertView(()=>i(t,s,o),o,e,n(t)),c=r?1:0):null==o?(this._detachAndCacheView(s,e),c=3):(r=this._moveView(s,o,e,n(t)),c=2),a&&a({context:null==r?void 0:r.context,operation:c,record:t})})}detach(){for(const t of this._viewCache)t.destroy()}_insertView(t,e,i,n){let a=this._insertViewFromCache(e,i);if(a)return void(a.context.$implicit=n);const s=t();return i.createEmbeddedView(s.templateRef,s.context,s.index)}_detachAndCacheView(t,e){const i=this._detachView(t,e);this._maybeCacheView(i,e)}_moveView(t,e,i,n){const a=i.get(t);return i.move(a,e),a.context.$implicit=n,a}_maybeCacheView(t,e){if(this._viewCache.length<this.viewCacheSize)this._viewCache.push(t);else{const i=e.indexOf(t);-1===i?t.destroy():e.remove(i)}}_insertViewFromCache(t,e){const i=this._viewCache.pop();return i&&e.insert(i,t),i||null}_detachView(t,e){return e.detach(t)}}class u{constructor(t=!1,e,i=!0){this._multiple=t,this._emitChanges=i,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new s.a,e&&e.length&&(t?e.forEach(t=>this._markSelected(t)):this._markSelected(e[0]),this._selectedToEmit.length=0)}get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}select(...t){this._verifyValueAssignment(t),t.forEach(t=>this._markSelected(t)),this._emitChangeEvent()}deselect(...t){this._verifyValueAssignment(t),t.forEach(t=>this._unmarkSelected(t)),this._emitChangeEvent()}toggle(t){this.isSelected(t)?this.deselect(t):this.select(t)}clear(){this._unmarkAll(),this._emitChangeEvent()}isSelected(t){return this._selection.has(t)}isEmpty(){return 0===this._selection.size}hasValue(){return!this.isEmpty()}sort(t){this._multiple&&this.selected&&this._selected.sort(t)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(t){this.isSelected(t)||(this._multiple||this._unmarkAll(),this._selection.add(t),this._emitChanges&&this._selectedToEmit.push(t))}_unmarkSelected(t){this.isSelected(t)&&(this._selection.delete(t),this._emitChanges&&this._deselectedToEmit.push(t))}_unmarkAll(){this.isEmpty()||this._selection.forEach(t=>this._unmarkSelected(t))}_verifyValueAssignment(t){}}let p=(()=>{class t{constructor(){this._listeners=[]}notify(t,e){for(let i of this._listeners)i(t,e)}listen(t){return this._listeners.push(t),()=>{this._listeners=this._listeners.filter(e=>t!==e)}}ngOnDestroy(){this._listeners=[]}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(o.Mb)({factory:function(){return new t},token:t,providedIn:"root"}),t})();const b=new o.s("_ViewRepeater")},"0EUg":function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var n=i("bHdf");function a(){return Object(n.a)(1)}},"0IaG":function(t,e,i){"use strict";i.d(e,"a",(function(){return k})),i.d(e,"b",(function(){return R})),i.d(e,"c",(function(){return E})),i.d(e,"d",(function(){return A})),i.d(e,"e",(function(){return C})),i.d(e,"f",(function(){return T})),i.d(e,"g",(function(){return L})),i.d(e,"h",(function(){return w})),i.d(e,"i",(function(){return W}));var n=i("rDax"),a=i("+rOU"),s=i("fXoL"),o=i("FKr1"),r=i("cH1L"),c=i("ofXK"),l=i("XNiG"),d=i("NXyV"),h=i("LRne"),u=i("pLZG"),p=i("IzEk"),b=i("JX91"),f=i("R0Ic"),m=i("FtGj"),g=i("u47x");function v(t,e){}class _{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.maxWidth="80vw",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.autoFocus=!0,this.restoreFocus=!0,this.closeOnNavigation=!0}}const y={dialogContainer:Object(f.n)("dialogContainer",[Object(f.k)("void, exit",Object(f.l)({opacity:0,transform:"scale(0.7)"})),Object(f.k)("enter",Object(f.l)({transform:"none"})),Object(f.m)("* => enter",Object(f.e)("150ms cubic-bezier(0, 0, 0.2, 1)",Object(f.l)({transform:"none",opacity:1}))),Object(f.m)("* => void, * => exit",Object(f.e)("75ms cubic-bezier(0.4, 0.0, 0.2, 1)",Object(f.l)({opacity:0})))])};let x=(()=>{class t extends a.a{constructor(t,e,i,n,a,o){super(),this._elementRef=t,this._focusTrapFactory=e,this._changeDetectorRef=i,this._config=a,this._focusMonitor=o,this._animationStateChanged=new s.o,this._elementFocusedBeforeDialogWasOpened=null,this._closeInteractionType=null,this.attachDomPortal=t=>(this._portalOutlet.hasAttached(),this._portalOutlet.attachDomPortal(t)),this._ariaLabelledBy=a.ariaLabelledBy||null,this._document=n}_initializeWithAttachedContent(){this._setupFocusTrap(),this._capturePreviouslyFocusedElement(),this._focusDialogContainer()}attachComponentPortal(t){return this._portalOutlet.hasAttached(),this._portalOutlet.attachComponentPortal(t)}attachTemplatePortal(t){return this._portalOutlet.hasAttached(),this._portalOutlet.attachTemplatePortal(t)}_recaptureFocus(){this._containsFocus()||(!this._config.autoFocus||!this._focusTrap.focusInitialElement())&&this._elementRef.nativeElement.focus()}_trapFocus(){this._config.autoFocus?this._focusTrap.focusInitialElementWhenReady():this._containsFocus()||this._elementRef.nativeElement.focus()}_restoreFocus(){const t=this._elementFocusedBeforeDialogWasOpened;if(this._config.restoreFocus&&t&&"function"==typeof t.focus){const e=this._document.activeElement,i=this._elementRef.nativeElement;e&&e!==this._document.body&&e!==i&&!i.contains(e)||(this._focusMonitor?(this._focusMonitor.focusVia(t,this._closeInteractionType),this._closeInteractionType=null):t.focus())}this._focusTrap&&this._focusTrap.destroy()}_setupFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement)}_capturePreviouslyFocusedElement(){this._document&&(this._elementFocusedBeforeDialogWasOpened=this._document.activeElement)}_focusDialogContainer(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}_containsFocus(){const t=this._elementRef.nativeElement,e=this._document.activeElement;return t===e||t.contains(e)}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.l),s.Qb(g.i),s.Qb(s.h),s.Qb(c.e,8),s.Qb(_),s.Qb(g.h))},t.\u0275dir=s.Lb({type:t,viewQuery:function(t,e){var i;1&t&&s.Kc(a.c,!0),2&t&&s.yc(i=s.ec())&&(e._portalOutlet=i.first)},features:[s.Ab]}),t})(),C=(()=>{class t extends x{constructor(){super(...arguments),this._state="enter"}_onAnimationDone({toState:t,totalTime:e}){"enter"===t?(this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:e})):"exit"===t&&(this._restoreFocus(),this._animationStateChanged.next({state:"closed",totalTime:e}))}_onAnimationStart({toState:t,totalTime:e}){"enter"===t?this._animationStateChanged.next({state:"opening",totalTime:e}):"exit"!==t&&"void"!==t||this._animationStateChanged.next({state:"closing",totalTime:e})}_startExitAnimation(){this._state="exit",this._changeDetectorRef.markForCheck()}}return t.\u0275fac=function(e){return O(e||t)},t.\u0275cmp=s.Kb({type:t,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1","aria-modal","true",1,"mat-dialog-container"],hostVars:6,hostBindings:function(t,e){1&t&&s.Mc("@dialogContainer.start",(function(t){return e._onAnimationStart(t)}))("@dialogContainer.done",(function(t){return e._onAnimationDone(t)})),2&t&&(s.Zb("id",e._id),s.Eb("role",e._config.role)("aria-labelledby",e._config.ariaLabel?null:e._ariaLabelledBy)("aria-label",e._config.ariaLabel)("aria-describedby",e._config.ariaDescribedBy||null),s.Nc("@dialogContainer",e._state))},features:[s.Ab],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,e){1&t&&s.Oc(0,v,0,0,"ng-template",0)},directives:[a.c],styles:[".mat-dialog-container{display:block;padding:24px;border-radius:4px;box-sizing:border-box;overflow:auto;outline:0;width:100%;height:100%;min-height:inherit;max-height:inherit}.cdk-high-contrast-active .mat-dialog-container{outline:solid 1px}.mat-dialog-content{display:block;margin:0 -24px;padding:0 24px;max-height:65vh;overflow:auto;-webkit-overflow-scrolling:touch}.mat-dialog-title{margin:0 0 20px;display:block}.mat-dialog-actions{padding:8px 0;display:flex;flex-wrap:wrap;min-height:52px;align-items:center;margin-bottom:-24px}.mat-dialog-actions[align=end]{justify-content:flex-end}.mat-dialog-actions[align=center]{justify-content:center}.mat-dialog-actions .mat-button-base+.mat-button-base,.mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}\n"],encapsulation:2,data:{animation:[y.dialogContainer]}}),t})();const O=s.Yb(C);let D=0;class w{constructor(t,e,i="mat-dialog-"+D++){this._overlayRef=t,this._containerInstance=e,this.id=i,this.disableClose=this._containerInstance._config.disableClose,this._afterOpened=new l.a,this._afterClosed=new l.a,this._beforeClosed=new l.a,this._state=0,e._id=i,e._animationStateChanged.pipe(Object(u.a)(t=>"opened"===t.state),Object(p.a)(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),e._animationStateChanged.pipe(Object(u.a)(t=>"closed"===t.state),Object(p.a)(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._afterClosed.next(this._result),this._afterClosed.complete(),this.componentInstance=null,this._overlayRef.dispose()}),t.keydownEvents().pipe(Object(u.a)(t=>t.keyCode===m.h&&!this.disableClose&&!Object(m.v)(t))).subscribe(t=>{t.preventDefault(),M(this,"keyboard")}),t.backdropClick().subscribe(()=>{this.disableClose?this._containerInstance._recaptureFocus():M(this,"mouse")})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(Object(u.a)(t=>"closing"===t.state),Object(p.a)(1)).subscribe(e=>{this._beforeClosed.next(t),this._beforeClosed.complete(),this._overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),e.totalTime+100)}),this._state=1,this._containerInstance._startExitAnimation()}afterOpened(){return this._afterOpened}afterClosed(){return this._afterClosed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._overlayRef.backdropClick()}keydownEvents(){return this._overlayRef.keydownEvents()}updatePosition(t){let e=this._getPositionStrategy();return t&&(t.left||t.right)?t.left?e.left(t.left):e.right(t.right):e.centerHorizontally(),t&&(t.top||t.bottom)?t.top?e.top(t.top):e.bottom(t.bottom):e.centerVertically(),this._overlayRef.updatePosition(),this}updateSize(t="",e=""){return this._getPositionStrategy().width(t).height(e),this._overlayRef.updatePosition(),this}addPanelClass(t){return this._overlayRef.addPanelClass(t),this}removePanelClass(t){return this._overlayRef.removePanelClass(t),this}getState(){return this._state}_finishDialogClose(){this._state=2,this._overlayRef.dispose()}_getPositionStrategy(){return this._overlayRef.getConfig().positionStrategy}}function M(t,e,i){return void 0!==t._containerInstance&&(t._containerInstance._closeInteractionType=e),t.close(i)}const k=new s.s("MatDialogData"),S=new s.s("mat-dialog-default-options"),I=new s.s("mat-dialog-scroll-strategy"),P={provide:I,deps:[n.c],useFactory:function(t){return()=>t.scrollStrategies.block()}};let V=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this._overlay=t,this._injector=e,this._defaultOptions=i,this._parentDialog=n,this._overlayContainer=a,this._dialogRefConstructor=o,this._dialogContainerType=r,this._dialogDataToken=c,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new l.a,this._afterOpenedAtThisLevel=new l.a,this._ariaHiddenElements=new Map,this.afterAllClosed=Object(d.a)(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Object(b.a)(void 0))),this._scrollStrategy=s}get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){const t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}open(t,e){(e=function(t,e){return Object.assign(Object.assign({},e),t)}(e,this._defaultOptions||new _)).id&&this.getDialogById(e.id);const i=this._createOverlay(e),n=this._attachDialogContainer(i,e),a=this._attachDialogContent(t,n,i,e);return this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(a),a.afterClosed().subscribe(()=>this._removeOpenDialog(a)),this.afterOpened.next(a),n._initializeWithAttachedContent(),a}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(t){return this.openDialogs.find(e=>e.id===t)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_createOverlay(t){const e=this._getOverlayConfig(t);return this._overlay.create(e)}_getOverlayConfig(t){const e=new n.d({positionStrategy:this._overlay.position().global(),scrollStrategy:t.scrollStrategy||this._scrollStrategy(),panelClass:t.panelClass,hasBackdrop:t.hasBackdrop,direction:t.direction,minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight,disposeOnNavigation:t.closeOnNavigation});return t.backdropClass&&(e.backdropClass=t.backdropClass),e}_attachDialogContainer(t,e){const i=s.t.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:_,useValue:e}]}),n=new a.d(this._dialogContainerType,e.viewContainerRef,i,e.componentFactoryResolver);return t.attach(n).instance}_attachDialogContent(t,e,i,n){const o=new this._dialogRefConstructor(i,e,n.id);if(t instanceof s.P)e.attachTemplatePortal(new a.i(t,null,{$implicit:n.data,dialogRef:o}));else{const i=this._createInjector(n,o,e),s=e.attachComponentPortal(new a.d(t,n.viewContainerRef,i));o.componentInstance=s.instance}return o.updateSize(n.width,n.height).updatePosition(n.position),o}_createInjector(t,e,i){const n=t&&t.viewContainerRef&&t.viewContainerRef.injector,a=[{provide:this._dialogContainerType,useValue:i},{provide:this._dialogDataToken,useValue:t.data},{provide:this._dialogRefConstructor,useValue:e}];return!t.direction||n&&n.get(r.c,null)||a.push({provide:r.c,useValue:{value:t.direction,change:Object(h.a)()}}),s.t.create({parent:n||this._injector,providers:a})}_removeOpenDialog(t){const e=this.openDialogs.indexOf(t);e>-1&&(this.openDialogs.splice(e,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((t,e)=>{t?e.setAttribute("aria-hidden",t):e.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){const t=this._overlayContainer.getContainerElement();if(t.parentElement){const e=t.parentElement.children;for(let i=e.length-1;i>-1;i--){let n=e[i];n===t||"SCRIPT"===n.nodeName||"STYLE"===n.nodeName||n.hasAttribute("aria-live")||(this._ariaHiddenElements.set(n,n.getAttribute("aria-hidden")),n.setAttribute("aria-hidden","true"))}}}_closeDialogs(t){let e=t.length;for(;e--;)t[e].close()}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(n.c),s.Qb(s.t),s.Qb(void 0),s.Qb(void 0),s.Qb(n.e),s.Qb(void 0),s.Qb(s.R),s.Qb(s.R),s.Qb(s.s))},t.\u0275dir=s.Lb({type:t}),t})(),R=(()=>{class t extends V{constructor(t,e,i,n,a,s,o){super(t,e,n,s,o,a,w,C,k)}}return t.\u0275fac=function(e){return new(e||t)(s.ac(n.c),s.ac(s.t),s.ac(c.n,8),s.ac(S,8),s.ac(I),s.ac(t,12),s.ac(n.e))},t.\u0275prov=s.Mb({token:t,factory:t.\u0275fac}),t})(),j=0,A=(()=>{class t{constructor(t,e,i){this.dialogRef=t,this._elementRef=e,this._dialog=i,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=F(this._elementRef,this._dialog.openDialogs))}ngOnChanges(t){const e=t._matDialogClose||t._matDialogCloseResult;e&&(this.dialogResult=e.currentValue)}_onButtonClick(t){M(this.dialogRef,0===t.screenX&&0===t.screenY?"keyboard":"mouse",this.dialogResult)}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(w,8),s.Qb(s.l),s.Qb(R))},t.\u0275dir=s.Lb({type:t,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(t,e){1&t&&s.dc("click",(function(t){return e._onButtonClick(t)})),2&t&&s.Eb("aria-label",e.ariaLabel||null)("type",e.type)},inputs:{type:"type",dialogResult:["mat-dialog-close","dialogResult"],ariaLabel:["aria-label","ariaLabel"],_matDialogClose:["matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],features:[s.Bb]}),t})(),W=(()=>{class t{constructor(t,e,i){this._dialogRef=t,this._elementRef=e,this._dialog=i,this.id="mat-dialog-title-"+j++}ngOnInit(){this._dialogRef||(this._dialogRef=F(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{const t=this._dialogRef._containerInstance;t&&!t._ariaLabelledBy&&(t._ariaLabelledBy=this.id)})}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(w,8),s.Qb(s.l),s.Qb(R))},t.\u0275dir=s.Lb({type:t,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-dialog-title"],hostVars:1,hostBindings:function(t,e){2&t&&s.Zb("id",e.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),t})(),T=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-dialog-content"]}),t})(),E=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-dialog-actions"]}),t})();function F(t,e){let i=t.nativeElement.parentElement;for(;i&&!i.classList.contains("mat-dialog-container");)i=i.parentElement;return i?e.find(t=>t.id===i.id):null}let L=(()=>{class t{}return t.\u0275mod=s.Ob({type:t}),t.\u0275inj=s.Nb({factory:function(e){return new(e||t)},providers:[R,P],imports:[[n.f,a.h,o.k],o.k]}),t})()},"0MNC":function(t,e,i){"use strict";i.d(e,"a",(function(){return C})),i.d(e,"b",(function(){return D}));var n=i("fXoL"),a=i("8LU1"),s=i("XNiG"),o=i("itXk"),r=i("GyhO"),c=i("HDdC"),l=i("IzEk"),d=i("7o/Q");class h{constructor(t){this.total=t}call(t,e){return e.subscribe(new u(t,this.total))}}class u extends d.a{constructor(t,e){super(t),this.total=e,this.count=0}_next(t){++this.count>this.total&&this.destination.next(t)}}var p=i("Kj3r"),b=i("lJxs"),f=i("JX91"),m=i("1G5W"),g=i("nLfN");const v=new Set;let _,y=(()=>{class t{constructor(t){this._platform=t,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):x}matchMedia(t){return this._platform.WEBKIT&&function(t){if(!v.has(t))try{_||(_=document.createElement("style"),_.setAttribute("type","text/css"),document.head.appendChild(_)),_.sheet&&(_.sheet.insertRule(`@media ${t} {.fx-query-test{ }}`,0),v.add(t))}catch(e){console.error(e)}}(t),this._matchMedia(t)}}return t.\u0275fac=function(e){return new(e||t)(n.ac(g.a))},t.\u0275prov=Object(n.Mb)({factory:function(){return new t(Object(n.ac)(g.a))},token:t,providedIn:"root"}),t})();function x(t){return{matches:"all"===t||""===t,media:t,addListener:()=>{},removeListener:()=>{}}}let C=(()=>{class t{constructor(t,e){this._mediaMatcher=t,this._zone=e,this._queries=new Map,this._destroySubject=new s.a}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(t){return O(Object(a.b)(t)).some(t=>this._registerQuery(t).mql.matches)}observe(t){const e=O(Object(a.b)(t)).map(t=>this._registerQuery(t).observable);let i=Object(o.a)(e);return i=Object(r.a)(i.pipe(Object(l.a)(1)),i.pipe(t=>t.lift(new h(1)),Object(p.a)(0))),i.pipe(Object(b.a)(t=>{const e={matches:!1,breakpoints:{}};return t.forEach(({matches:t,query:i})=>{e.matches=e.matches||t,e.breakpoints[i]=t}),e}))}_registerQuery(t){if(this._queries.has(t))return this._queries.get(t);const e=this._mediaMatcher.matchMedia(t),i={observable:new c.a(t=>{const i=e=>this._zone.run(()=>t.next(e));return e.addListener(i),()=>{e.removeListener(i)}}).pipe(Object(f.a)(e),Object(b.a)(({matches:e})=>({query:t,matches:e})),Object(m.a)(this._destroySubject)),mql:e};return this._queries.set(t,i),i}}return t.\u0275fac=function(e){return new(e||t)(n.ac(y),n.ac(n.C))},t.\u0275prov=Object(n.Mb)({factory:function(){return new t(Object(n.ac)(y),Object(n.ac)(n.C))},token:t,providedIn:"root"}),t})();function O(t){return t.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}const D={XSmall:"(max-width: 599.99px)",Small:"(min-width: 600px) and (max-width: 959.99px)",Medium:"(min-width: 960px) and (max-width: 1279.99px)",Large:"(min-width: 1280px) and (max-width: 1919.99px)",XLarge:"(min-width: 1920px)",Handset:"(max-width: 599.99px) and (orientation: portrait), (max-width: 959.99px) and (orientation: landscape)",Tablet:"(min-width: 600px) and (max-width: 839.99px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279.99px) and (orientation: landscape)",Web:"(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)",HandsetPortrait:"(max-width: 599.99px) and (orientation: portrait)",TabletPortrait:"(min-width: 600px) and (max-width: 839.99px) and (orientation: portrait)",WebPortrait:"(min-width: 840px) and (orientation: portrait)",HandsetLandscape:"(max-width: 959.99px) and (orientation: landscape)",TabletLandscape:"(min-width: 960px) and (max-width: 1279.99px) and (orientation: landscape)",WebLandscape:"(min-width: 1280px) and (orientation: landscape)"}},1:function(t,e){},"1G5W":function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var n=i("zx2A");function a(t){return e=>e.lift(new s(t))}class s{constructor(t){this.notifier=t}call(t,e){const i=new o(t),a=Object(n.c)(this.notifier,new n.a(i));return a&&!i.seenValue?(i.add(a),e.subscribe(i)):i}}class o extends n.b{constructor(t){super(t),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}},"1YbM":function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var n=i("fXoL"),a=i("aEDk"),s=i("rH+9");let o=(()=>{class t{constructor(t,e){this.latinisePipe=t,this.functions=e}transform(t,e=""){let i="",n="";return this.functions.empty(t)?[]:(t.sort((t,a)=>(void 0===e?(i=this.latinisePipe.transform(t).toLocaleLowerCase(),n=this.latinisePipe.transform(a).toLocaleLowerCase()):(t[e]=null!==t[e]?t[e]:"",a[e]=null!==a[e]?a[e]:"",i="number"!=typeof t[e]?this.latinisePipe.transform(t[e]).toLocaleLowerCase():t[e],n="number"!=typeof a[e]?this.latinisePipe.transform(a[e]).toLocaleLowerCase():a[e]),i<n?-1:i>n?1:0)),t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(a.c),n.Qb(s.a))},t.\u0275pipe=n.Pb({name:"sortBy",type:t,pure:!0}),t})()},"1jcm":function(t,e,i){"use strict";i.d(e,"a",(function(){return x})),i.d(e,"b",(function(){return M})),i.d(e,"c",(function(){return O}));var n=i("GU7r"),a=i("fXoL"),s=i("FKr1"),o=i("8LU1"),r=i("3Pt+"),c=i("R1ws"),l=i("u47x");const d=["thumbContainer"],h=["toggleBar"],u=["input"],p=function(){return{enterDuration:150}},b=["*"],f=new a.s("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:!1})});let m=0;const g={provide:r.s,useExisting:Object(a.X)(()=>x),multi:!0};class v{constructor(t,e){this.source=t,this.checked=e}}class _{constructor(t){this._elementRef=t}}const y=Object(s.F)(Object(s.A)(Object(s.B)(Object(s.C)(_)),"accent"));let x=(()=>{class t extends y{constructor(t,e,i,n,s,o){super(t),this._focusMonitor=e,this._changeDetectorRef=i,this.defaults=s,this._animationMode=o,this._onChange=t=>{},this._onTouched=()=>{},this._uniqueId="mat-slide-toggle-"+ ++m,this._required=!1,this._checked=!1,this.name=null,this.id=this._uniqueId,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.change=new a.o,this.toggleChange=new a.o,this.tabIndex=parseInt(n)||0}get required(){return this._required}set required(t){this._required=Object(o.c)(t)}get checked(){return this._checked}set checked(t){this._checked=Object(o.c)(t),this._changeDetectorRef.markForCheck()}get inputId(){return(this.id||this._uniqueId)+"-input"}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{"keyboard"===t||"program"===t?this._inputElement.nativeElement.focus():t||Promise.resolve().then(()=>this._onTouched())})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}_onChangeEvent(t){t.stopPropagation(),this.toggleChange.emit(),this.defaults.disableToggleValue?this._inputElement.nativeElement.checked=this.checked:(this.checked=this._inputElement.nativeElement.checked,this._emitChangeEvent())}_onInputClick(t){t.stopPropagation()}writeValue(t){this.checked=!!t}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t,this._changeDetectorRef.markForCheck()}focus(t){this._focusMonitor.focusVia(this._inputElement,"keyboard",t)}toggle(){this.checked=!this.checked,this._onChange(this.checked)}_emitChangeEvent(){this._onChange(this.checked),this.change.emit(new v(this,this.checked))}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(l.h),a.Qb(a.h),a.bc("tabindex"),a.Qb(f),a.Qb(c.a,8))},t.\u0275cmp=a.Kb({type:t,selectors:[["mat-slide-toggle"]],viewQuery:function(t,e){var i;1&t&&(a.Xc(d,!0),a.Xc(h,!0),a.Xc(u,!0)),2&t&&(a.yc(i=a.ec())&&(e._thumbEl=i.first),a.yc(i=a.ec())&&(e._thumbBarEl=i.first),a.yc(i=a.ec())&&(e._inputElement=i.first))},hostAttrs:[1,"mat-slide-toggle"],hostVars:12,hostBindings:function(t,e){2&t&&(a.Zb("id",e.id),a.Eb("tabindex",e.disabled?null:-1)("aria-label",null)("aria-labelledby",null),a.Ib("mat-checked",e.checked)("mat-disabled",e.disabled)("mat-slide-toggle-label-before","before"==e.labelPosition)("_mat-animation-noopable","NoopAnimations"===e._animationMode))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex",name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],required:"required",checked:"checked"},outputs:{change:"change",toggleChange:"toggleChange"},exportAs:["matSlideToggle"],features:[a.Cb([g]),a.Ab],ngContentSelectors:b,decls:16,vars:18,consts:[[1,"mat-slide-toggle-label"],["label",""],[1,"mat-slide-toggle-bar"],["toggleBar",""],["type","checkbox","role","switch",1,"mat-slide-toggle-input","cdk-visually-hidden",3,"id","required","tabIndex","checked","disabled","change","click"],["input",""],[1,"mat-slide-toggle-thumb-container"],["thumbContainer",""],[1,"mat-slide-toggle-thumb"],["mat-ripple","",1,"mat-slide-toggle-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered","matRippleRadius","matRippleAnimation"],[1,"mat-ripple-element","mat-slide-toggle-persistent-ripple"],[1,"mat-slide-toggle-content",3,"cdkObserveContent"],["labelContent",""],[2,"display","none"]],template:function(t,e){if(1&t&&(a.nc(),a.Wb(0,"label",0,1),a.Wb(2,"div",2,3),a.Wb(4,"input",4,5),a.dc("change",(function(t){return e._onChangeEvent(t)}))("click",(function(t){return e._onInputClick(t)})),a.Vb(),a.Wb(6,"div",6,7),a.Rb(8,"div",8),a.Wb(9,"div",9),a.Rb(10,"div",10),a.Vb(),a.Vb(),a.Vb(),a.Wb(11,"span",11,12),a.dc("cdkObserveContent",(function(){return e._onLabelTextChange()})),a.Wb(13,"span",13),a.Qc(14,"\xa0"),a.Vb(),a.mc(15),a.Vb(),a.Vb()),2&t){const t=a.zc(1),i=a.zc(12);a.Eb("for",e.inputId),a.Db(2),a.Ib("mat-slide-toggle-bar-no-side-margin",!i.textContent||!i.textContent.trim()),a.Db(2),a.oc("id",e.inputId)("required",e.required)("tabIndex",e.tabIndex)("checked",e.checked)("disabled",e.disabled),a.Eb("name",e.name)("aria-checked",e.checked.toString())("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby),a.Db(5),a.oc("matRippleTrigger",t)("matRippleDisabled",e.disableRipple||e.disabled)("matRippleCentered",!0)("matRippleRadius",20)("matRippleAnimation",a.uc(17,p))}},directives:[s.u,n.a],styles:[".mat-slide-toggle{display:inline-block;height:24px;max-width:100%;line-height:24px;white-space:nowrap;outline:none;-webkit-tap-highlight-color:transparent}.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(16px, 0, 0)}[dir=rtl] .mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(-16px, 0, 0)}.mat-slide-toggle.mat-disabled{opacity:.38}.mat-slide-toggle.mat-disabled .mat-slide-toggle-label,.mat-slide-toggle.mat-disabled .mat-slide-toggle-thumb-container{cursor:default}.mat-slide-toggle-label{display:flex;flex:1;flex-direction:row;align-items:center;height:inherit;cursor:pointer}.mat-slide-toggle-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-slide-toggle-label-before .mat-slide-toggle-label{order:1}.mat-slide-toggle-label-before .mat-slide-toggle-bar{order:2}[dir=rtl] .mat-slide-toggle-label-before .mat-slide-toggle-bar,.mat-slide-toggle-bar{margin-right:8px;margin-left:0}[dir=rtl] .mat-slide-toggle-bar,.mat-slide-toggle-label-before .mat-slide-toggle-bar{margin-left:8px;margin-right:0}.mat-slide-toggle-bar-no-side-margin{margin-left:0;margin-right:0}.mat-slide-toggle-thumb-container{position:absolute;z-index:1;width:20px;height:20px;top:-3px;left:0;transform:translate3d(0, 0, 0);transition:all 80ms linear;transition-property:transform}._mat-animation-noopable .mat-slide-toggle-thumb-container{transition:none}[dir=rtl] .mat-slide-toggle-thumb-container{left:auto;right:0}.mat-slide-toggle-thumb{height:20px;width:20px;border-radius:50%}.mat-slide-toggle-bar{position:relative;width:36px;height:14px;flex-shrink:0;border-radius:8px}.mat-slide-toggle-input{bottom:0;left:10px}[dir=rtl] .mat-slide-toggle-input{left:auto;right:10px}.mat-slide-toggle-bar,.mat-slide-toggle-thumb{transition:all 80ms linear;transition-property:background-color;transition-delay:50ms}._mat-animation-noopable .mat-slide-toggle-bar,._mat-animation-noopable .mat-slide-toggle-thumb{transition:none}.mat-slide-toggle .mat-slide-toggle-ripple{position:absolute;top:calc(50% - 20px);left:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-slide-toggle .mat-slide-toggle-ripple .mat-ripple-element:not(.mat-slide-toggle-persistent-ripple){opacity:.12}.mat-slide-toggle-persistent-ripple{width:100%;height:100%;transform:none}.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:.04}.mat-slide-toggle:not(.mat-disabled).cdk-keyboard-focused .mat-slide-toggle-persistent-ripple{opacity:.12}.mat-slide-toggle-persistent-ripple,.mat-slide-toggle.mat-disabled .mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:0}@media(hover: none){.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{display:none}}.cdk-high-contrast-active .mat-slide-toggle-thumb,.cdk-high-contrast-active .mat-slide-toggle-bar{border:1px solid}.cdk-high-contrast-active .mat-slide-toggle.cdk-keyboard-focused .mat-slide-toggle-bar{outline:2px dotted;outline-offset:5px}\n"],encapsulation:2,changeDetection:0}),t})();const C={provide:r.r,useExisting:Object(a.X)(()=>O),multi:!0};let O=(()=>{class t extends r.b{}return t.\u0275fac=function(e){return D(e||t)},t.\u0275dir=a.Lb({type:t,selectors:[["mat-slide-toggle","required","","formControlName",""],["mat-slide-toggle","required","","formControl",""],["mat-slide-toggle","required","","ngModel",""]],features:[a.Cb([C]),a.Ab]}),t})();const D=a.Yb(O);let w=(()=>{class t{}return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)}}),t})(),M=(()=>{class t{}return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)},imports:[[w,s.v,s.k,n.c],w,s.k]}),t})()},2:function(t,e){},"2ChS":function(t,e,i){"use strict";i.d(e,"a",(function(){return b})),i.d(e,"b",(function(){return f}));var n=i("rDax"),a=i("+rOU"),s=i("fXoL"),o=i("FKr1"),r=i("0MNC"),c=i("R0Ic"),l=i("ofXK"),d=(i("cH1L"),i("XNiG"),i("VRyK"),i("LRne"),i("FtGj"),i("pLZG"),i("IzEk"),i("u47x"));function h(t,e){}class u{constructor(){this.data=null,this.hasBackdrop=!0,this.disableClose=!1,this.ariaLabel=null,this.closeOnNavigation=!0,this.autoFocus=!1,this.restoreFocus=!0}}const p={bottomSheetState:Object(c.n)("state",[Object(c.k)("void, hidden",Object(c.l)({transform:"translateY(100%)"})),Object(c.k)("visible",Object(c.l)({transform:"translateY(0%)"})),Object(c.m)("visible => void, visible => hidden",Object(c.e)(`${o.b.COMPLEX} ${o.a.ACCELERATION_CURVE}`)),Object(c.m)("void => visible",Object(c.e)(`${o.b.EXITING} ${o.a.DECELERATION_CURVE}`))])};let b=(()=>{class t extends a.a{constructor(t,e,i,n,a,o){super(),this._elementRef=t,this._changeDetectorRef=e,this._focusTrapFactory=i,this.bottomSheetConfig=o,this._animationState="void",this._animationStateChanged=new s.o,this._elementFocusedBeforeOpened=null,this.attachDomPortal=t=>(this._validatePortalAttached(),this._setPanelClass(),this._savePreviouslyFocusedElement(),this._portalOutlet.attachDomPortal(t)),this._document=a,this._breakpointSubscription=n.observe([r.b.Medium,r.b.Large,r.b.XLarge]).subscribe(()=>{this._toggleClass("mat-bottom-sheet-container-medium",n.isMatched(r.b.Medium)),this._toggleClass("mat-bottom-sheet-container-large",n.isMatched(r.b.Large)),this._toggleClass("mat-bottom-sheet-container-xlarge",n.isMatched(r.b.XLarge))})}attachComponentPortal(t){return this._validatePortalAttached(),this._setPanelClass(),this._savePreviouslyFocusedElement(),this._portalOutlet.attachComponentPortal(t)}attachTemplatePortal(t){return this._validatePortalAttached(),this._setPanelClass(),this._savePreviouslyFocusedElement(),this._portalOutlet.attachTemplatePortal(t)}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.detectChanges())}exit(){this._destroyed||(this._animationState="hidden",this._changeDetectorRef.markForCheck())}ngOnDestroy(){this._breakpointSubscription.unsubscribe(),this._destroyed=!0}_onAnimationDone(t){"hidden"===t.toState?this._restoreFocus():"visible"===t.toState&&this._trapFocus(),this._animationStateChanged.emit(t)}_onAnimationStart(t){this._animationStateChanged.emit(t)}_toggleClass(t,e){const i=this._elementRef.nativeElement.classList;e?i.add(t):i.remove(t)}_validatePortalAttached(){this._portalOutlet.hasAttached()}_setPanelClass(){const t=this._elementRef.nativeElement,e=this.bottomSheetConfig.panelClass;Array.isArray(e)?e.forEach(e=>t.classList.add(e)):e&&t.classList.add(e)}_trapFocus(){const t=this._elementRef.nativeElement;if(this._focusTrap||(this._focusTrap=this._focusTrapFactory.create(t)),this.bottomSheetConfig.autoFocus)this._focusTrap.focusInitialElementWhenReady();else{const e=this._document.activeElement;e===t||t.contains(e)||t.focus()}}_restoreFocus(){const t=this._elementFocusedBeforeOpened;if(this.bottomSheetConfig.restoreFocus&&t&&"function"==typeof t.focus){const e=this._document.activeElement,i=this._elementRef.nativeElement;e&&e!==this._document.body&&e!==i&&!i.contains(e)||t.focus()}this._focusTrap&&this._focusTrap.destroy()}_savePreviouslyFocusedElement(){this._elementFocusedBeforeOpened=this._document.activeElement,this._elementRef.nativeElement.focus&&Promise.resolve().then(()=>this._elementRef.nativeElement.focus())}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.l),s.Qb(s.h),s.Qb(d.i),s.Qb(r.a),s.Qb(l.e,8),s.Qb(u))},t.\u0275cmp=s.Kb({type:t,selectors:[["mat-bottom-sheet-container"]],viewQuery:function(t,e){var i;1&t&&s.Kc(a.c,!0),2&t&&s.yc(i=s.ec())&&(e._portalOutlet=i.first)},hostAttrs:["tabindex","-1","role","dialog","aria-modal","true",1,"mat-bottom-sheet-container"],hostVars:2,hostBindings:function(t,e){1&t&&s.Mc("@state.start",(function(t){return e._onAnimationStart(t)}))("@state.done",(function(t){return e._onAnimationDone(t)})),2&t&&(s.Eb("aria-label",null==e.bottomSheetConfig?null:e.bottomSheetConfig.ariaLabel),s.Nc("@state",e._animationState))},features:[s.Ab],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,e){1&t&&s.Oc(0,h,0,0,"ng-template",0)},directives:[a.c],styles:[".mat-bottom-sheet-container{padding:8px 16px;min-width:100vw;box-sizing:border-box;display:block;outline:0;max-height:80vh;overflow:auto}.cdk-high-contrast-active .mat-bottom-sheet-container{outline:1px solid}.mat-bottom-sheet-container-xlarge,.mat-bottom-sheet-container-large,.mat-bottom-sheet-container-medium{border-top-left-radius:4px;border-top-right-radius:4px}.mat-bottom-sheet-container-medium{min-width:384px;max-width:calc(100vw - 128px)}.mat-bottom-sheet-container-large{min-width:512px;max-width:calc(100vw - 256px)}.mat-bottom-sheet-container-xlarge{min-width:576px;max-width:calc(100vw - 384px)}\n"],encapsulation:2,data:{animation:[p.bottomSheetState]},changeDetection:0}),t})(),f=(()=>{class t{}return t.\u0275mod=s.Ob({type:t}),t.\u0275inj=s.Nb({factory:function(e){return new(e||t)},imports:[[n.f,o.k,a.h],o.k]}),t})()},"2QA8":function(t,e,i){"use strict";i.d(e,"a",(function(){return n}));const n=(()=>"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random())()},"2Vo4":function(t,e,i){"use strict";i.d(e,"a",(function(){return s}));var n=i("XNiG"),a=i("9ppp");class s extends n.a{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const e=super._subscribe(t);return e&&!e.closed&&t.next(this._value),e}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new a.a;return this._value}next(t){super.next(this._value=t)}}},"2fFW":function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));let n=!1;const a={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){const t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}else n&&console.log("RxJS: Back to a better error behavior. Thank you. <3");n=t},get useDeprecatedSynchronousErrorHandling(){return n}}},3:function(t,e){},"3E0/":function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var n=i("D0XW"),a=i("7o/Q"),s=i("WMd4");function o(t,e=n.a){var i;const a=(i=t)instanceof Date&&!isNaN(+i)?+t-e.now():Math.abs(t);return t=>t.lift(new r(a,e))}class r{constructor(t,e){this.delay=t,this.scheduler=e}call(t,e){return e.subscribe(new c(t,this.delay,this.scheduler))}}class c extends a.a{constructor(t,e,i){super(t),this.delay=e,this.scheduler=i,this.queue=[],this.active=!1,this.errored=!1}static dispatch(t){const e=t.source,i=e.queue,n=t.scheduler,a=t.destination;for(;i.length>0&&i[0].time-n.now()<=0;)i.shift().notification.observe(a);if(i.length>0){const e=Math.max(0,i[0].time-n.now());this.schedule(t,e)}else this.unsubscribe(),e.active=!1}_schedule(t){this.active=!0,this.destination.add(t.schedule(c.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))}scheduleNotification(t){if(!0===this.errored)return;const e=this.scheduler,i=new l(e.now()+this.delay,t);this.queue.push(i),!1===this.active&&this._schedule(e)}_next(t){this.scheduleNotification(s.a.createNext(t))}_error(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()}_complete(){this.scheduleNotification(s.a.createComplete()),this.unsubscribe()}}class l{constructor(t,e){this.time=t,this.notification=e}}},"3N8a":function(t,e,i){"use strict";i.d(e,"a",(function(){return s}));var n=i("quSY");class a extends n.a{constructor(t,e){super()}schedule(t,e=0){return this}}class s extends a{constructor(t,e){super(t,e),this.scheduler=t,this.work=e,this.pending=!1}schedule(t,e=0){if(this.closed)return this;this.state=t;const i=this.id,n=this.scheduler;return null!=i&&(this.id=this.recycleAsyncId(n,i,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(n,this.id,e),this}requestAsyncId(t,e,i=0){return setInterval(t.flush.bind(t,this),i)}recycleAsyncId(t,e,i=0){if(null!==i&&this.delay===i&&!1===this.pending)return e;clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(t,e);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let i=!1,n=void 0;try{this.work(t)}catch(a){i=!0,n=!!a&&a||new Error(a)}if(i)return this.unsubscribe(),n}_unsubscribe(){const t=this.id,e=this.scheduler,i=e.actions,n=i.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==n&&i.splice(n,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null}}},"3Pt+":function(t,e,i){"use strict";i.d(e,"a",(function(){return d})),i.d(e,"b",(function(){return Qt})),i.d(e,"c",(function(){return f})),i.d(e,"d",(function(){return p})),i.d(e,"e",(function(){return Bt})),i.d(e,"f",(function(){return pt})),i.d(e,"g",(function(){return jt})),i.d(e,"h",(function(){return Yt})),i.d(e,"i",(function(){return ht})),i.d(e,"j",(function(){return kt})),i.d(e,"k",(function(){return Tt})),i.d(e,"l",(function(){return ut})),i.d(e,"m",(function(){return It})),i.d(e,"n",(function(){return Vt})),i.d(e,"o",(function(){return Jt})),i.d(e,"p",(function(){return Gt})),i.d(e,"q",(function(){return $t})),i.d(e,"r",(function(){return O})),i.d(e,"s",(function(){return c})),i.d(e,"t",(function(){return g})),i.d(e,"u",(function(){return _})),i.d(e,"v",(function(){return y})),i.d(e,"w",(function(){return mt})),i.d(e,"x",(function(){return Ot})),i.d(e,"y",(function(){return yt})),i.d(e,"z",(function(){return z})),i.d(e,"A",(function(){return j})),i.d(e,"B",(function(){return qt})),i.d(e,"C",(function(){return T})),i.d(e,"D",(function(){return F})),i.d(e,"E",(function(){return Zt})),i.d(e,"F",(function(){return Lt})),i.d(e,"G",(function(){return N})),i.d(e,"H",(function(){return $})),i.d(e,"I",(function(){return M})),i.d(e,"J",(function(){return H})),i.d(e,"K",(function(){return Dt}));var n=i("fXoL"),a=i("ofXK"),s=i("cp0P"),o=i("Cfvw"),r=i("lJxs");const c=new n.s("NgValueAccessor"),l={provide:c,useExisting:Object(n.X)(()=>d),multi:!0};let d=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"checked",t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.I),n.Qb(n.l))},t.\u0275dir=n.Lb({type:t,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(t,e){1&t&&n.dc("change",(function(t){return e.onChange(t.target.checked)}))("blur",(function(){return e.onTouched()}))},features:[n.Cb([l])]}),t})();const h={provide:c,useExisting:Object(n.X)(()=>p),multi:!0},u=new n.s("CompositionEventMode");let p=(()=>{class t{constructor(t,e,i){this._renderer=t,this._elementRef=e,this._compositionMode=i,this.onChange=t=>{},this.onTouched=()=>{},this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function(){const t=Object(a.L)()?Object(a.L)().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.I),n.Qb(n.l),n.Qb(u,8))},t.\u0275dir=n.Lb({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(t,e){1&t&&n.dc("input",(function(t){return e._handleInput(t.target.value)}))("blur",(function(){return e.onTouched()}))("compositionstart",(function(){return e._compositionStart()}))("compositionend",(function(t){return e._compositionEnd(t.target.value)}))},features:[n.Cb([h])]}),t})(),b=(()=>{class t{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}reset(t){this.control&&this.control.reset(t)}hasError(t,e){return!!this.control&&this.control.hasError(t,e)}getError(t,e){return this.control?this.control.getError(t,e):null}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t}),t})(),f=(()=>{class t extends b{get formDirective(){return null}get path(){return null}}return t.\u0275fac=function(e){return m(e||t)},t.\u0275dir=n.Lb({type:t,features:[n.Ab]}),t})();const m=n.Yb(f);class g extends b{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null,this._rawValidators=[],this._rawAsyncValidators=[]}get validator(){}get asyncValidator(){}}class v{constructor(t){this._cd=t}get ngClassUntouched(){return!!this._cd.control&&this._cd.control.untouched}get ngClassTouched(){return!!this._cd.control&&this._cd.control.touched}get ngClassPristine(){return!!this._cd.control&&this._cd.control.pristine}get ngClassDirty(){return!!this._cd.control&&this._cd.control.dirty}get ngClassValid(){return!!this._cd.control&&this._cd.control.valid}get ngClassInvalid(){return!!this._cd.control&&this._cd.control.invalid}get ngClassPending(){return!!this._cd.control&&this._cd.control.pending}}let _=(()=>{class t extends v{constructor(t){super(t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g,2))},t.\u0275dir=n.Lb({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,e){2&t&&n.Ib("ng-untouched",e.ngClassUntouched)("ng-touched",e.ngClassTouched)("ng-pristine",e.ngClassPristine)("ng-dirty",e.ngClassDirty)("ng-valid",e.ngClassValid)("ng-invalid",e.ngClassInvalid)("ng-pending",e.ngClassPending)},features:[n.Ab]}),t})(),y=(()=>{class t extends v{constructor(t){super(t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(f,2))},t.\u0275dir=n.Lb({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:14,hostBindings:function(t,e){2&t&&n.Ib("ng-untouched",e.ngClassUntouched)("ng-touched",e.ngClassTouched)("ng-pristine",e.ngClassPristine)("ng-dirty",e.ngClassDirty)("ng-valid",e.ngClassValid)("ng-invalid",e.ngClassInvalid)("ng-pending",e.ngClassPending)},features:[n.Ab]}),t})();function x(t){return null==t||0===t.length}function C(t){return null!=t&&"number"==typeof t.length}const O=new n.s("NgValidators"),D=new n.s("NgAsyncValidators"),w=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class M{static min(t){return e=>{if(x(e.value)||x(t))return null;const i=parseFloat(e.value);return!isNaN(i)&&i<t?{min:{min:t,actual:e.value}}:null}}static max(t){return e=>{if(x(e.value)||x(t))return null;const i=parseFloat(e.value);return!isNaN(i)&&i>t?{max:{max:t,actual:e.value}}:null}}static required(t){return x(t.value)?{required:!0}:null}static requiredTrue(t){return!0===t.value?null:{required:!0}}static email(t){return x(t.value)||w.test(t.value)?null:{email:!0}}static minLength(t){return e=>x(e.value)||!C(e.value)?null:e.value.length<t?{minlength:{requiredLength:t,actualLength:e.value.length}}:null}static maxLength(t){return e=>C(e.value)&&e.value.length>t?{maxlength:{requiredLength:t,actualLength:e.value.length}}:null}static pattern(t){if(!t)return M.nullValidator;let e,i;return"string"==typeof t?(i="","^"!==t.charAt(0)&&(i+="^"),i+=t,"$"!==t.charAt(t.length-1)&&(i+="$"),e=new RegExp(i)):(i=t.toString(),e=t),t=>{if(x(t.value))return null;const n=t.value;return e.test(n)?null:{pattern:{requiredPattern:i,actualValue:n}}}}static nullValidator(t){return null}static compose(t){if(!t)return null;const e=t.filter(k);return 0==e.length?null:function(t){return I(P(t,e))}}static composeAsync(t){if(!t)return null;const e=t.filter(k);return 0==e.length?null:function(t){const i=P(t,e).map(S);return Object(s.a)(i).pipe(Object(r.a)(I))}}}function k(t){return null!=t}function S(t){const e=Object(n.vb)(t)?Object(o.a)(t):t;return Object(n.ub)(e),e}function I(t){let e={};return t.forEach(t=>{e=null!=t?Object.assign(Object.assign({},e),t):e}),0===Object.keys(e).length?null:e}function P(t,e){return e.map(e=>e(t))}function V(t){return t.map(t=>function(t){return!t.validate}(t)?t:e=>t.validate(e))}const R={provide:c,useExisting:Object(n.X)(()=>j),multi:!0};let j=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}registerOnChange(t){this.onChange=e=>{t(""==e?null:parseFloat(e))}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.I),n.Qb(n.l))},t.\u0275dir=n.Lb({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(t,e){1&t&&n.dc("input",(function(t){return e.onChange(t.target.value)}))("blur",(function(){return e.onTouched()}))},features:[n.Cb([R])]}),t})();const A={provide:c,useExisting:Object(n.X)(()=>T),multi:!0};let W=(()=>{class t{constructor(){this._accessors=[]}add(t,e){this._accessors.push([t,e])}remove(t){for(let e=this._accessors.length-1;e>=0;--e)if(this._accessors[e][1]===t)return void this._accessors.splice(e,1)}select(t){this._accessors.forEach(e=>{this._isSameGroup(e,t)&&e[1]!==t&&e[1].fireUncheck(t.value)})}_isSameGroup(t,e){return!!t[0].control&&t[0]._parent===e._control._parent&&t[1].name===e.name}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})(),T=(()=>{class t{constructor(t,e,i,n){this._renderer=t,this._elementRef=e,this._registry=i,this._injector=n,this.onChange=()=>{},this.onTouched=()=>{}}ngOnInit(){this._control=this._injector.get(g),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(t){this._state=t===this.value,this._renderer.setProperty(this._elementRef.nativeElement,"checked",this._state)}registerOnChange(t){this._fn=t,this.onChange=()=>{t(this.value),this._registry.select(this)}}fireUncheck(t){this.writeValue(t)}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_checkName(){!this.name&&this.formControlName&&(this.name=this.formControlName)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.I),n.Qb(n.l),n.Qb(W),n.Qb(n.t))},t.\u0275dir=n.Lb({type:t,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(t,e){1&t&&n.dc("change",(function(){return e.onChange()}))("blur",(function(){return e.onTouched()}))},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[n.Cb([A])]}),t})();const E={provide:c,useExisting:Object(n.X)(()=>F),multi:!0};let F=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",parseFloat(t))}registerOnChange(t){this.onChange=e=>{t(""==e?null:parseFloat(e))}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.I),n.Qb(n.l))},t.\u0275dir=n.Lb({type:t,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(t,e){1&t&&n.dc("change",(function(t){return e.onChange(t.target.value)}))("input",(function(t){return e.onChange(t.target.value)}))("blur",(function(){return e.onTouched()}))},features:[n.Cb([E])]}),t})();const L={provide:c,useExisting:Object(n.X)(()=>N),multi:!0};function Q(t,e){return null==t?""+e:(e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}let N=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=t=>{},this.onTouched=()=>{},this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){this.value=t;const e=this._getOptionId(t);null==e&&this._renderer.setProperty(this._elementRef.nativeElement,"selectedIndex",-1);const i=Q(e,t);this._renderer.setProperty(this._elementRef.nativeElement,"value",i)}registerOnChange(t){this.onChange=e=>{this.value=this._getOptionValue(e),t(this.value)}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(const e of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(e),t))return e;return null}_getOptionValue(t){const e=function(t){return t.split(":")[0]}(t);return this._optionMap.has(e)?this._optionMap.get(e):t}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.I),n.Qb(n.l))},t.\u0275dir=n.Lb({type:t,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(t,e){1&t&&n.dc("change",(function(t){return e.onChange(t.target.value)}))("blur",(function(){return e.onTouched()}))},inputs:{compareWith:"compareWith"},features:[n.Cb([L])]}),t})(),z=(()=>{class t{constructor(t,e,i){this._element=t,this._renderer=e,this._select=i,this._select&&(this.id=this._select._registerOption())}set ngValue(t){null!=this._select&&(this._select._optionMap.set(this.id,t),this._setElementValue(Q(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._setElementValue(t),this._select&&this._select.writeValue(this._select.value)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(n.I),n.Qb(N,9))},t.\u0275dir=n.Lb({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();const B={provide:c,useExisting:Object(n.X)(()=>$),multi:!0};function U(t,e){return null==t?""+e:("string"==typeof e&&(e=`'${e}'`),e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}let $=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=t=>{},this.onTouched=()=>{},this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){let e;if(this.value=t,Array.isArray(t)){const i=t.map(t=>this._getOptionId(t));e=(t,e)=>{t._setSelected(i.indexOf(e.toString())>-1)}}else e=(t,e)=>{t._setSelected(!1)};this._optionMap.forEach(e)}registerOnChange(t){this.onChange=e=>{const i=[];if(void 0!==e.selectedOptions){const t=e.selectedOptions;for(let e=0;e<t.length;e++){const n=t.item(e),a=this._getOptionValue(n.value);i.push(a)}}else{const t=e.options;for(let e=0;e<t.length;e++){const n=t.item(e);if(n.selected){const t=this._getOptionValue(n.value);i.push(t)}}}this.value=i,t(i)}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_registerOption(t){const e=(this._idCounter++).toString();return this._optionMap.set(e,t),e}_getOptionId(t){for(const e of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(e)._value,t))return e;return null}_getOptionValue(t){const e=function(t){return t.split(":")[0]}(t);return this._optionMap.has(e)?this._optionMap.get(e)._value:t}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.I),n.Qb(n.l))},t.\u0275dir=n.Lb({type:t,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(t,e){1&t&&n.dc("change",(function(t){return e.onChange(t.target)}))("blur",(function(){return e.onTouched()}))},inputs:{compareWith:"compareWith"},features:[n.Cb([B])]}),t})(),H=(()=>{class t{constructor(t,e,i){this._element=t,this._renderer=e,this._select=i,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){null!=this._select&&(this._value=t,this._setElementValue(U(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(U(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(n.I),n.Qb($,9))},t.\u0275dir=n.Lb({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();function G(t,e){return[...e.path,t]}function X(t,e){t.validator=M.compose([t.validator,e.validator]),t.asyncValidator=M.composeAsync([t.asyncValidator,e.asyncValidator]),e.valueAccessor.writeValue(t.value),function(t,e){e.valueAccessor.registerOnChange(i=>{t._pendingValue=i,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&q(t,e)})}(t,e),function(t,e){t.registerOnChange((t,i)=>{e.valueAccessor.writeValue(t),i&&e.viewToModelUpdate(t)})}(t,e),function(t,e){e.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&q(t,e),"submit"!==t.updateOn&&t.markAsTouched()})}(t,e),e.valueAccessor.setDisabledState&&t.registerOnDisabledChange(t=>{e.valueAccessor.setDisabledState(t)}),e._rawValidators.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(()=>t.updateValueAndValidity())}),e._rawAsyncValidators.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(()=>t.updateValueAndValidity())})}function q(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function K(t,e){t.validator=M.compose([t.validator,e.validator]),t.asyncValidator=M.composeAsync([t.asyncValidator,e.asyncValidator])}function Y(t){return null!=t?M.compose(V(t)):null}function J(t){return null!=t?M.composeAsync(V(t)):null}function Z(t,e){if(!t.hasOwnProperty("model"))return!1;const i=t.model;return!!i.isFirstChange()||!Object.is(e,i.currentValue)}const tt=[d,F,j,N,$,T];function et(t,e){t._syncPendingControls(),e.forEach(t=>{const e=t.control;"submit"===e.updateOn&&e._pendingChange&&(t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1)})}function it(t,e){if(!e)return null;Array.isArray(e);let i=void 0,n=void 0,a=void 0;return e.forEach(t=>{var e;t.constructor===p?i=t:(e=t,tt.some(t=>e.constructor===t)?n=t:a=t)}),a||n||i||null}function nt(t,e){const i=t.indexOf(e);i>-1&&t.splice(i,1)}function at(t,e,i,a){Object(n.Z)()&&"never"!==a&&((null!==a&&"once"!==a||e._ngModelWarningSentOnce)&&("always"!==a||i._ngModelWarningSent)||(e._ngModelWarningSentOnce=!0,i._ngModelWarningSent=!0))}function st(t){return(lt(t)?t.validators:t)||null}function ot(t){return Array.isArray(t)?Y(t):t||null}function rt(t,e){return(lt(e)?e.asyncValidators:t)||null}function ct(t){return Array.isArray(t)?J(t):t||null}function lt(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}class dt{constructor(t,e){this._hasOwnPendingAsyncValidator=!1,this._onCollectionChange=()=>{},this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=t,this._rawAsyncValidators=e,this._composedValidatorFn=ot(this._rawValidators),this._composedAsyncValidatorFn=ct(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get valid(){return"VALID"===this.status}get invalid(){return"INVALID"===this.status}get pending(){return"PENDING"==this.status}get disabled(){return"DISABLED"===this.status}get enabled(){return"DISABLED"!==this.status}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._rawValidators=t,this._composedValidatorFn=ot(t)}setAsyncValidators(t){this._rawAsyncValidators=t,this._composedAsyncValidatorFn=ct(t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(t=>t.markAllAsTouched())}markAsUntouched(t={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}markAsDirty(t={}){this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}markAsPristine(t={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(t=>{t.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}markAsPending(t={}){this.status="PENDING",!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}disable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status="DISABLED",this.errors=null,this._forEachChild(e=>{e.disable(Object.assign(Object.assign({},t),{onlySelf:!0}))}),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(t=>t(!0))}enable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status="VALID",this._forEachChild(e=>{e.enable(Object.assign(Object.assign({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(t=>t(!1))}_updateAncestors(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(t){this._parent=t}updateValueAndValidity(t={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),"VALID"!==this.status&&"PENDING"!==this.status||this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?"DISABLED":"VALID"}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status="PENDING",this._hasOwnPendingAsyncValidator=!0;const e=S(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(e=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(e,{emitEvent:t})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)}get(t){return function(t,e,i){if(null==e)return null;if(Array.isArray(e)||(e=e.split(".")),Array.isArray(e)&&0===e.length)return null;let n=t;return e.forEach(t=>{n=n instanceof ut?n.controls.hasOwnProperty(t)?n.controls[t]:null:n instanceof pt&&n.at(t)||null}),n}(this,t)}getError(t,e){const i=e?this.get(e):this;return i&&i.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}_initObservables(){this.valueChanges=new n.o,this.statusChanges=new n.o}_calculateStatus(){return this._allControlsDisabled()?"DISABLED":this.errors?"INVALID":this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus("PENDING")?"PENDING":this._anyControlsHaveStatus("INVALID")?"INVALID":"VALID"}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t={}){this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}_updateTouched(t={}){this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}_isBoxedValue(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){lt(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&this._parent&&this._parent.dirty&&!this._parent._anyControlsDirty()}}class ht extends dt{constructor(t=null,e,i){super(st(e),rt(i,e)),this._onChange=[],this._applyFormState(t),this._setUpdateStrategy(e),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),this._initObservables()}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(t=>t(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=null,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_clearChangeFns(){this._onChange=[],this._onDisabledChange=[],this._onCollectionChange=()=>{}}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_forEachChild(t){}_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(t){this._isBoxedValue(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}}class ut extends dt{constructor(t,e,i){super(st(e),rt(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e){this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}removeControl(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity(),this._onCollectionChange()}setControl(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){this._checkAllValuesPresent(t),Object.keys(t).forEach(i=>{this._throwIfControlMissing(i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){Object.keys(t).forEach(i=>{this.controls[i]&&this.controls[i].patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}reset(t={},e={}){this._forEachChild((i,n)=>{i.reset(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e instanceof ht?e.value:e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(t,e)=>!!e._syncPendingControls()||t);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_throwIfControlMissing(t){if(!Object.keys(this.controls).length)throw new Error("\n There are no form controls registered with this group yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.controls[t])throw new Error(`Cannot find form control with name: ${t}.`)}_forEachChild(t){Object.keys(this.controls).forEach(e=>t(this.controls[e],e))}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(const e of Object.keys(this.controls)){const i=this.controls[e];if(this.contains(e)&&t(i))return!0}return!1}_reduceValue(){return this._reduceChildren({},(t,e,i)=>((e.enabled||this.disabled)&&(t[i]=e.value),t))}_reduceChildren(t,e){let i=t;return this._forEachChild((t,n)=>{i=e(i,t,n)}),i}_allControlsDisabled(){for(const t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_checkAllValuesPresent(t){this._forEachChild((e,i)=>{if(void 0===t[i])throw new Error(`Must supply a value for form control with name: '${i}'.`)})}}class pt extends dt{constructor(t,e,i){super(st(e),rt(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}at(t){return this.controls[t]}push(t){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity(),this._onCollectionChange()}insert(t,e){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity()}removeAt(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),this.updateValueAndValidity()}setControl(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),e&&(this.controls.splice(t,0,e),this._registerControl(e)),this.updateValueAndValidity(),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){this._checkAllValuesPresent(t),t.forEach((t,i)=>{this._throwIfControlMissing(i),this.at(i).setValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t.forEach((t,i)=>{this.at(i)&&this.at(i).patchValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}reset(t=[],e={}){this._forEachChild((i,n)=>{i.reset(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t instanceof ht?t.value:t.getRawValue())}clear(){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity())}_syncPendingControls(){let t=this.controls.reduce((t,e)=>!!e._syncPendingControls()||t,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_throwIfControlMissing(t){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(t))throw new Error("Cannot find form control at index "+t)}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_checkAllValuesPresent(t){this._forEachChild((e,i)=>{if(void 0===t[i])throw new Error(`Must supply a value for form control at index: ${i}.`)})}_allControlsDisabled(){for(const t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}}const bt={provide:f,useExisting:Object(n.X)(()=>mt)},ft=(()=>Promise.resolve(null))();let mt=(()=>{class t extends f{constructor(t,e){super(),this.submitted=!1,this._directives=[],this.ngSubmit=new n.o,this.form=new ut({},Y(t),J(e))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){ft.then(()=>{const e=this._findContainer(t.path);t.control=e.registerControl(t.name,t.control),X(t.control,t),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.push(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){ft.then(()=>{const e=this._findContainer(t.path);e&&e.removeControl(t.name),nt(this._directives,t)})}addFormGroup(t){ft.then(()=>{const e=this._findContainer(t.path),i=new ut({});K(i,t),e.registerControl(t.name,i),i.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){ft.then(()=>{const e=this._findContainer(t.path);e&&e.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,e){ft.then(()=>{this.form.get(t.path).setValue(e)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submitted=!0,et(this.form,this._directives),this.ngSubmit.emit(t),!1}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(O,10),n.Qb(D,10))},t.\u0275dir=n.Lb({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(t,e){1&t&&n.dc("submit",(function(t){return e.onSubmit(t)}))("reset",(function(){return e.onReset()}))},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[n.Cb([bt]),n.Ab]}),t})(),gt=(()=>{class t extends f{ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return G(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}get validator(){return Y(this._validators)}get asyncValidator(){return J(this._asyncValidators)}_checkParentType(){}}return t.\u0275fac=function(e){return vt(e||t)},t.\u0275dir=n.Lb({type:t,features:[n.Ab]}),t})();const vt=n.Yb(gt),_t={provide:f,useExisting:Object(n.X)(()=>yt)};let yt=(()=>{class t extends gt{constructor(t,e,i){super(),this._parent=t,this._validators=e,this._asyncValidators=i}_checkParentType(){}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(f,5),n.Qb(O,10),n.Qb(D,10))},t.\u0275dir=n.Lb({type:t,selectors:[["","ngModelGroup",""]],inputs:{name:["ngModelGroup","name"]},exportAs:["ngModelGroup"],features:[n.Cb([_t]),n.Ab]}),t})();const xt={provide:g,useExisting:Object(n.X)(()=>Ot)},Ct=(()=>Promise.resolve(null))();let Ot=(()=>{class t extends g{constructor(t,e,i,a){super(),this.control=new ht,this._registered=!1,this.update=new n.o,this._parent=t,this._rawValidators=e||[],this._rawAsyncValidators=i||[],this.valueAccessor=it(0,a)}ngOnChanges(t){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in t&&this._updateDisabled(t),Z(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._parent?G(this.name,this._parent):[this.name]}get formDirective(){return this._parent?this._parent.formDirective:null}get validator(){return Y(this._rawValidators)}get asyncValidator(){return J(this._rawAsyncValidators)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_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(){X(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(t){Ct.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1})})}_updateDisabled(t){const e=t.isDisabled.currentValue,i=""===e||e&&"false"!==e;Ct.then(()=>{i&&!this.control.disabled?this.control.disable():!i&&this.control.disabled&&this.control.enable()})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(f,9),n.Qb(O,10),n.Qb(D,10),n.Qb(c,10))},t.\u0275dir=n.Lb({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:[n.Cb([xt]),n.Ab,n.Bb]}),t})(),Dt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),t})();const wt=new n.s("NgModelWithFormControlWarning"),Mt={provide:g,useExisting:Object(n.X)(()=>kt)};let kt=(()=>{class t extends g{constructor(t,e,i,a){super(),this._ngModelWarningConfig=a,this.update=new n.o,this._ngModelWarningSent=!1,this._rawValidators=t||[],this._rawAsyncValidators=e||[],this.valueAccessor=it(0,i)}set isDisabled(t){}ngOnChanges(e){this._isControlChanged(e)&&(X(this.form,this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this.form.updateValueAndValidity({emitEvent:!1})),Z(e,this.viewModel)&&(at(0,t,this,this._ngModelWarningConfig),this.form.setValue(this.model),this.viewModel=this.model)}get path(){return[]}get validator(){return Y(this._rawValidators)}get asyncValidator(){return J(this._rawAsyncValidators)}get control(){return this.form}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_isControlChanged(t){return t.hasOwnProperty("form")}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(O,10),n.Qb(D,10),n.Qb(c,10),n.Qb(wt,8))},t.\u0275dir=n.Lb({type:t,selectors:[["","formControl",""]],inputs:{isDisabled:["disabled","isDisabled"],form:["formControl","form"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[n.Cb([Mt]),n.Ab,n.Bb]}),t._ngModelWarningSentOnce=!1,t})();const St={provide:f,useExisting:Object(n.X)(()=>It)};let It=(()=>{class t extends f{constructor(t,e){super(),this._validators=t,this._asyncValidators=e,this.submitted=!1,this.directives=[],this.form=null,this.ngSubmit=new n.o}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations())}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){const e=this.form.get(t.path);return X(e,t),e.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),e}getControl(t){return this.form.get(t.path)}removeControl(t){nt(this.directives,t)}addFormGroup(t){const e=this.form.get(t.path);K(e,t),e.updateValueAndValidity({emitEvent:!1})}removeFormGroup(t){}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){const e=this.form.get(t.path);K(e,t),e.updateValueAndValidity({emitEvent:!1})}removeFormArray(t){}getFormArray(t){return this.form.get(t.path)}updateModel(t,e){this.form.get(t.path).setValue(e)}onSubmit(t){return this.submitted=!0,et(this.form,this.directives),this.ngSubmit.emit(t),!1}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_updateDomValue(){this.directives.forEach(t=>{const e=this.form.get(t.path);t.control!==e&&(function(t,e){const i=()=>{};e.valueAccessor.registerOnChange(i),e.valueAccessor.registerOnTouched(i),e._rawValidators.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(null)}),e._rawAsyncValidators.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(null)}),t&&t._clearChangeFns()}(t.control,t),e&&X(e,t),t.control=e)}),this.form._updateTreeValidity({emitEvent:!1})}_updateRegistrations(){this.form._registerOnCollectionChange(()=>this._updateDomValue()),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{}),this._oldForm=this.form}_updateValidators(){const t=Y(this._validators);this.form.validator=M.compose([this.form.validator,t]);const e=J(this._asyncValidators);this.form.asyncValidator=M.composeAsync([this.form.asyncValidator,e])}_checkFormPresent(){}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(O,10),n.Qb(D,10))},t.\u0275dir=n.Lb({type:t,selectors:[["","formGroup",""]],hostBindings:function(t,e){1&t&&n.dc("submit",(function(t){return e.onSubmit(t)}))("reset",(function(){return e.onReset()}))},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[n.Cb([St]),n.Ab,n.Bb]}),t})();const Pt={provide:f,useExisting:Object(n.X)(()=>Vt)};let Vt=(()=>{class t extends gt{constructor(t,e,i){super(),this._parent=t,this._validators=e,this._asyncValidators=i}_checkParentType(){At(this._parent)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(f,13),n.Qb(O,10),n.Qb(D,10))},t.\u0275dir=n.Lb({type:t,selectors:[["","formGroupName",""]],inputs:{name:["formGroupName","name"]},features:[n.Cb([Pt]),n.Ab]}),t})();const Rt={provide:f,useExisting:Object(n.X)(()=>jt)};let jt=(()=>{class t extends f{constructor(t,e,i){super(),this._parent=t,this._validators=e,this._asyncValidators=i}ngOnInit(){this._checkParentType(),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return G(null==this.name?this.name:this.name.toString(),this._parent)}get validator(){return Y(this._validators)}get asyncValidator(){return J(this._asyncValidators)}_checkParentType(){At(this._parent)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(f,13),n.Qb(O,10),n.Qb(D,10))},t.\u0275dir=n.Lb({type:t,selectors:[["","formArrayName",""]],inputs:{name:["formArrayName","name"]},features:[n.Cb([Rt]),n.Ab]}),t})();function At(t){return!(t instanceof Vt||t instanceof It||t instanceof jt)}const Wt={provide:g,useExisting:Object(n.X)(()=>Tt)};let Tt=(()=>{class t extends g{constructor(t,e,i,a,s){super(),this._ngModelWarningConfig=s,this._added=!1,this.update=new n.o,this._ngModelWarningSent=!1,this._parent=t,this._rawValidators=e||[],this._rawAsyncValidators=i||[],this.valueAccessor=it(0,a)}set isDisabled(t){}ngOnChanges(e){this._added||this._setUpControl(),Z(e,this.viewModel)&&(at(0,t,this,this._ngModelWarningConfig),this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}get path(){return G(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}get validator(){return Y(this._rawValidators)}get asyncValidator(){return J(this._rawAsyncValidators)}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this._added=!0}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(f,13),n.Qb(O,10),n.Qb(D,10),n.Qb(c,10),n.Qb(wt,8))},t.\u0275dir=n.Lb({type:t,selectors:[["","formControlName",""]],inputs:{isDisabled:["disabled","isDisabled"],name:["formControlName","name"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[n.Cb([Wt]),n.Ab,n.Bb]}),t._ngModelWarningSentOnce=!1,t})();const Et={provide:O,useExisting:Object(n.X)(()=>Lt),multi:!0},Ft={provide:O,useExisting:Object(n.X)(()=>Qt),multi:!0};let Lt=(()=>{class t{constructor(){this._required=!1}get required(){return this._required}set required(t){this._required=null!=t&&!1!==t&&""+t!="false",this._onChange&&this._onChange()}validate(t){return this.required?M.required(t):null}registerOnValidatorChange(t){this._onChange=t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(t,e){2&t&&n.Eb("required",e.required?"":null)},inputs:{required:"required"},features:[n.Cb([Et])]}),t})(),Qt=(()=>{class t extends Lt{validate(t){return this.required?M.requiredTrue(t):null}}return t.\u0275fac=function(e){return Nt(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["input","type","checkbox","required","","formControlName",""],["input","type","checkbox","required","","formControl",""],["input","type","checkbox","required","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&n.Eb("required",e.required?"":null)},features:[n.Cb([Ft]),n.Ab]}),t})();const Nt=n.Yb(Qt),zt={provide:O,useExisting:Object(n.X)(()=>Bt),multi:!0};let Bt=(()=>{class t{constructor(){this._enabled=!1}set email(t){this._enabled=""===t||!0===t||"true"===t,this._onChange&&this._onChange()}validate(t){return this._enabled?M.email(t):null}registerOnValidatorChange(t){this._onChange=t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["","email","","formControlName",""],["","email","","formControl",""],["","email","","ngModel",""]],inputs:{email:"email"},features:[n.Cb([zt])]}),t})();const Ut={provide:O,useExisting:Object(n.X)(()=>$t),multi:!0};let $t=(()=>{class t{constructor(){this._validator=M.nullValidator}ngOnChanges(t){"minlength"in t&&(this._createValidator(),this._onChange&&this._onChange())}validate(t){return null==this.minlength?null:this._validator(t)}registerOnValidatorChange(t){this._onChange=t}_createValidator(){this._validator=M.minLength("number"==typeof this.minlength?this.minlength:parseInt(this.minlength,10))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&n.Eb("minlength",e.minlength?e.minlength:null)},inputs:{minlength:"minlength"},features:[n.Cb([Ut]),n.Bb]}),t})();const Ht={provide:O,useExisting:Object(n.X)(()=>Gt),multi:!0};let Gt=(()=>{class t{constructor(){this._validator=M.nullValidator}ngOnChanges(t){"maxlength"in t&&(this._createValidator(),this._onChange&&this._onChange())}validate(t){return null!=this.maxlength?this._validator(t):null}registerOnValidatorChange(t){this._onChange=t}_createValidator(){this._validator=M.maxLength("number"==typeof this.maxlength?this.maxlength:parseInt(this.maxlength,10))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&n.Eb("maxlength",e.maxlength?e.maxlength:null)},inputs:{maxlength:"maxlength"},features:[n.Cb([Ht]),n.Bb]}),t})();const Xt={provide:O,useExisting:Object(n.X)(()=>qt),multi:!0};let qt=(()=>{class t{constructor(){this._validator=M.nullValidator}ngOnChanges(t){"pattern"in t&&(this._createValidator(),this._onChange&&this._onChange())}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}_createValidator(){this._validator=M.pattern(this.pattern)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&n.Eb("pattern",e.pattern?e.pattern:null)},inputs:{pattern:"pattern"},features:[n.Cb([Xt]),n.Bb]}),t})(),Kt=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)}}),t})(),Yt=(()=>{class t{group(t,e=null){const i=this._reduceControls(t);let n=null,a=null,s=void 0;return null!=e&&(function(t){return void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn}(e)?(n=null!=e.validators?e.validators:null,a=null!=e.asyncValidators?e.asyncValidators:null,s=null!=e.updateOn?e.updateOn:void 0):(n=null!=e.validator?e.validator:null,a=null!=e.asyncValidator?e.asyncValidator:null)),new ut(i,{asyncValidators:a,updateOn:s,validators:n})}control(t,e,i){return new ht(t,e,i)}array(t,e,i){const n=t.map(t=>this._createControl(t));return new pt(n,e,i)}_reduceControls(t){const e={};return Object.keys(t).forEach(i=>{e[i]=this._createControl(t[i])}),e}_createControl(t){return t instanceof ht||t instanceof ut||t instanceof pt?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})(),Jt=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},providers:[W],imports:[Kt]}),t})(),Zt=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:wt,useValue:e.warnOnNgModelWithFormControl}]}}}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},providers:[Yt,W],imports:[Kt]}),t})()},"3UWI":function(t,e,i){"use strict";i.d(e,"a",(function(){return c}));var n=i("D0XW"),a=i("zx2A");class s{constructor(t){this.durationSelector=t}call(t,e){return e.subscribe(new o(t,this.durationSelector))}}class o extends a.b{constructor(t,e){super(t),this.durationSelector=e,this.hasValue=!1}_next(t){if(this.value=t,this.hasValue=!0,!this.throttled){let i;try{const{durationSelector:e}=this;i=e(t)}catch(e){return this.destination.error(e)}const n=Object(a.c)(i,new a.a(this));!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}}clearThrottle(){const{value:t,hasValue:e,throttled:i}=this;i&&(this.remove(i),this.throttled=void 0,i.unsubscribe()),e&&(this.value=void 0,this.hasValue=!1,this.destination.next(t))}notifyNext(){this.clearThrottle()}notifyComplete(){this.clearThrottle()}}var r=i("PqYM");function c(t,e=n.a){return i=()=>Object(r.a)(t,e),function(t){return t.lift(new s(i))};var i}},4:function(t,e){},"4I5i":function(t,e,i){"use strict";i.d(e,"a",(function(){return n}));const n=(()=>{function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t})()},"4zkx":function(t,e,i){"use strict";i.d(e,"a",(function(){return u}));var n=i("vkgz"),a=i("JIr8"),s=i("lJxs"),o=i("LRne"),r=i("+rOU"),c=i("fXoL"),l=i("sYmb"),d=i("tk/3"),h=i("6Psc");let u=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.foldersService=i,this.componentFactoryResolver=n,this.injector=a,this.appRef=s,this.sideBarForm=!1,this.sideBarAdmin=!1,this.hideSideBar=!1,this.showhHeaderPanel=!0,this.showMenuShortcut=!0,this.showMenuNav=!0,this.sideNavLeft=null,this.sideBarButton=null,this.currentBasketInfo={ownerId:0,groupId:0,basketId:""},this.folderId=0,this.headerMessageIcon="",this.headerMessage="",this.subHeaderMessage="",this.user={firstname:"",lastname:"",groups:[],privileges:[],preferences:[],featureTour:[]},this.nbResourcesFollowed=0,this.base64=null}loadHeader(){return new Promise((t,e)=>{this.http.get("../rest/header").pipe(Object(n.a)(e=>{this.setUser(e.user),t(!0)}),Object(a.a)(e=>(console.log(e),t(!1),Object(o.a)(!1)))).subscribe()})}resfreshCurrentUser(){return new Promise((t,e)=>{this.http.get("../rest/currentUser/profile").pipe(Object(s.a)(e=>{this.user={mode:e.mode,id:e.id,userId:e.user_id,firstname:e.firstname,lastname:e.lastname,entities:e.entities,groups:e.groups,preferences:e.preferences,privileges:"ALL_PRIVILEGES"===e.privileges[0]?this.user.privileges:e.privileges,featureTour:e.featureTour},this.nbResourcesFollowed=e.nbFollowedResources,t(!0)})).subscribe()})}setUser(t={firstname:"",lastname:"",groups:[],privileges:[]}){this.user=t}getLastLoadedFile(){return this.base64}setLoadedFile(t){this.base64=t}setHeader(t,e="",i=""){this.headerMessage=t,this.subHeaderMessage=e,this.headerMessageIcon=i}resetSideNavSelection(){this.currentBasketInfo={ownerId:0,groupId:0,basketId:""},this.foldersService.setFolder({id:0}),this.sideBarForm=!1,this.showhHeaderPanel=!0,this.showMenuShortcut=!0,this.showMenuNav=!0,this.sideBarAdmin=!1,this.sideBarButton=null,this.hideSideBar=!0}injectInSideBarLeft(t,e,i="adminMenu",n=""){"form"===n?(this.sideBarForm=!0,this.showhHeaderPanel=!0,this.showMenuShortcut=!1,this.showMenuNav=!1,this.sideBarAdmin=!0):(this.showhHeaderPanel=!0,this.showMenuShortcut=!0,this.showMenuNav=!0),this.portalHost=new r.e(document.querySelector("#"+i),this.componentFactoryResolver,this.appRef,this.injector);const a=new r.i(t,e);this.portalHost.attach(a)}initTemplate(t,e,i="adminMenu",n=""){this.portalHost=new r.e(document.querySelector("#"+i),this.componentFactoryResolver,this.appRef,this.injector);const a=new r.i(t,e);this.portalHost.attach(a)}}return t.\u0275fac=function(e){return new(e||t)(c.ac(l.e),c.ac(d.b),c.ac(h.a),c.ac(c.j),c.ac(c.t),c.ac(c.g))},t.\u0275prov=c.Mb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()},5:function(t,e){},"5+WD":function(t,e,i){"use strict";i.d(e,"a",(function(){return _t})),i.d(e,"b",(function(){return bt})),i.d(e,"c",(function(){return mt})),i.d(e,"d",(function(){return vt})),i.d(e,"e",(function(){return ut})),i.d(e,"f",(function(){return ct})),i.d(e,"g",(function(){return xt})),i.d(e,"h",(function(){return G})),i.d(e,"i",(function(){return X}));var n=i("fXoL"),a=i("ofXK"),s=i("vxfF"),o=i("nLfN"),r=i("8LU1"),c=i("XNiG"),l=i("quSY"),d=i("HDdC"),h=i("D0XW"),u=i("Y7HM");function p(t){const{subscriber:e,counter:i,period:n}=t;e.next(i),this.schedule({subscriber:e,counter:i+1,period:n},n)}var b=i("eNwd"),f=i("VRyK"),m=i("1G5W"),g=i("JX91"),v=i("lJxs"),_=i("IzEk"),y=i("vkgz"),x=i("eIep"),C=i("cH1L");function O(t,e){for(let i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function D(t,e){const i=e?"":"none";O(t.style,{touchAction:e?"":"none",webkitUserDrag:e?"":"none",webkitTapHighlightColor:e?"":"transparent",userSelect:i,msUserSelect:i,webkitUserSelect:i,MozUserSelect:i})}function w(t,e){const i=t.style;i.position=e?"":"fixed",i.top=i.opacity=e?"":"0",i.left=e?"":"-999em"}function M(t){const e=t.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(t)*e}function k(t,e){return t.getPropertyValue(e).split(",").map(t=>t.trim())}function S(t){const e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}}function I(t,e,i){const{top:n,bottom:a,left:s,right:o}=t;return i>=n&&i<=a&&e>=s&&e<=o}function P(t,e,i){t.top+=e,t.bottom=t.top+t.height,t.left+=i,t.right=t.left+t.width}function V(t,e,i,n){const{top:a,right:s,bottom:o,left:r,width:c,height:l}=t,d=c*e,h=l*e;return n>a-h&&n<o+h&&i>r-d&&i<s+d}class R{constructor(t,e){this._document=t,this._viewportRuler=e,this.positions=new Map}clear(){this.positions.clear()}cache(t){this.clear(),this.positions.set(this._document,{scrollPosition:this._viewportRuler.getViewportScrollPosition()}),t.forEach(t=>{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:S(t)})})}handleScroll(t){const e=t.target,i=this.positions.get(e);if(!i)return null;const n=e===this._document?e.documentElement:e,a=i.scrollPosition;let s,o;if(e===this._document){const t=this._viewportRuler.getViewportScrollPosition();s=t.top,o=t.left}else s=e.scrollTop,o=e.scrollLeft;const r=a.top-s,c=a.left-o;return this.positions.forEach((t,i)=>{t.clientRect&&e!==i&&n.contains(i)&&P(t.clientRect,r,c)}),a.top=s,a.left=o,{top:r,left:c}}}function j(t){const e=t.cloneNode(!0),i=e.querySelectorAll("[id]"),n=t.nodeName.toLowerCase();e.removeAttribute("id");for(let a=0;a<i.length;a++)i[a].removeAttribute("id");return"canvas"===n?E(t,e):"input"!==n&&"select"!==n&&"textarea"!==n||T(t,e),A("canvas",t,e,E),A("input, textarea, select",t,e,T),e}function A(t,e,i,n){const a=e.querySelectorAll(t);if(a.length){const e=i.querySelectorAll(t);for(let t=0;t<a.length;t++)n(a[t],e[t])}}let W=0;function T(t,e){"file"!==e.type&&(e.value=t.value),"radio"===e.type&&e.name&&(e.name=`mat-clone-${e.name}-${W++}`)}function E(t,e){const i=e.getContext("2d");if(i)try{i.drawImage(t,0,0)}catch(n){}}const F=Object(o.f)({passive:!0}),L=Object(o.f)({passive:!1});class Q{constructor(t,e,i,n,a,s){this._config=e,this._document=i,this._ngZone=n,this._viewportRuler=a,this._dragDropRegistry=s,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._moveEvents=new c.a,this._pointerMoveSubscription=l.a.EMPTY,this._pointerUpSubscription=l.a.EMPTY,this._scrollSubscription=l.a.EMPTY,this._resizeSubscription=l.a.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this._disabled=!1,this.beforeStarted=new c.a,this.started=new c.a,this.released=new c.a,this.ended=new c.a,this.entered=new c.a,this.exited=new c.a,this.dropped=new c.a,this.moved=this._moveEvents,this._pointerDown=t=>{if(this.beforeStarted.next(),this._handles.length){const e=this._handles.find(e=>{const i=t.target;return!!i&&(i===e||e.contains(i))});!e||this._disabledHandles.has(e)||this.disabled||this._initializeDragSequence(e,t)}else this.disabled||this._initializeDragSequence(this._rootElement,t)},this._pointerMove=t=>{t.preventDefault();const e=this._getPointerPositionOnPage(t);if(!this._hasStartedDragging){if(Math.abs(e.x-this._pickupPositionOnPage.x)+Math.abs(e.y-this._pickupPositionOnPage.y)>=this._config.dragStartThreshold){const e=Date.now()>=this._dragStartTime+this._getDragStartDelay(t),i=this._dropContainer;if(!e)return void this._endDragSequence(t);i&&(i.isDragging()||i.isReceiving())||(this._hasStartedDragging=!0,this._ngZone.run(()=>this._startDragSequence(t)))}return}this._boundaryElement&&(this._previewRect&&(this._previewRect.width||this._previewRect.height)||(this._previewRect=(this._preview||this._rootElement).getBoundingClientRect()));const i=this._getConstrainedPointerPosition(e);if(this._hasMoved=!0,this._lastKnownPointerPosition=e,this._updatePointerDirectionDelta(i),this._dropContainer)this._updateActiveDropContainer(i,e);else{const t=this._activeTransform;t.x=i.x-this._pickupPositionOnPage.x+this._passiveTransform.x,t.y=i.y-this._pickupPositionOnPage.y+this._passiveTransform.y,this._applyRootElementTransform(t.x,t.y),"undefined"!=typeof SVGElement&&this._rootElement instanceof SVGElement&&this._rootElement.setAttribute("transform",`translate(${t.x} ${t.y})`)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:i,event:t,distance:this._getDragDistance(i),delta:this._pointerDirectionDelta})})},this._pointerUp=t=>{this._endDragSequence(t)},this.withRootElement(t),this._parentPositions=new R(i,a),s.registerDragItem(this)}get disabled(){return this._disabled||!(!this._dropContainer||!this._dropContainer.disabled)}set disabled(t){const e=Object(r.c)(t);e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions())}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(t){return this._handles=t.map(t=>Object(r.e)(t)),this._handles.forEach(t=>D(t,!1)),this._toggleNativeDragInteractions(),this}withPreviewTemplate(t){return this._previewTemplate=t,this}withPlaceholderTemplate(t){return this._placeholderTemplate=t,this}withRootElement(t){const e=Object(r.e)(t);return e!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{e.addEventListener("mousedown",this._pointerDown,L),e.addEventListener("touchstart",this._pointerDown,F)}),this._initialTransform=void 0,this._rootElement=e),"undefined"!=typeof SVGElement&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(t){return this._boundaryElement=t?Object(r.e)(t):null,this._resizeSubscription.unsubscribe(),t&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}dispose(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&B(this._rootElement),B(this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=null}isDragging(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(t){this._handles.indexOf(t)>-1&&this._disabledHandles.add(t)}enableHandle(t){this._disabledHandles.delete(t)}withDirection(t){return this._direction=t,this}_withDropContainer(t){this._dropContainer=t}getFreeDragPosition(){const t=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:t.x,y:t.y}}setFreeDragPosition(t){return this._activeTransform={x:0,y:0},this._passiveTransform.x=t.x,this._passiveTransform.y=t.y,this._dropContainer||this._applyRootElementTransform(t.x,t.y),this}_sortFromLastPointerPosition(){const t=this._lastKnownPointerPosition;t&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(t),t)}_removeSubscriptions(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe()}_destroyPreview(){this._preview&&B(this._preview),this._previewRef&&this._previewRef.destroy(),this._preview=this._previewRef=null}_destroyPlaceholder(){this._placeholder&&B(this._placeholder),this._placeholderRef&&this._placeholderRef.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(t){this._dragDropRegistry.isDragging(this)&&(this._removeSubscriptions(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging&&(this.released.next({source:this}),this._dropContainer?(this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(t),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)})):(this._passiveTransform.x=this._activeTransform.x,this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(this._getPointerPositionOnPage(t))})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this))))}_startDragSequence(t){U(t)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();const e=this._dropContainer;if(e){const t=this._rootElement,n=t.parentNode,a=this._preview=this._createPreviewElement(),s=this._placeholder=this._createPlaceholderElement(),o=this._anchor=this._anchor||this._document.createComment("");n.insertBefore(o,t),w(t,!1),this._document.body.appendChild(n.replaceChild(s,t)),(i=this._document,i.fullscreenElement||i.webkitFullscreenElement||i.mozFullScreenElement||i.msFullscreenElement||i.body).appendChild(a),this.started.next({source:this}),e.start(),this._initialContainer=e,this._initialIndex=e.getItemIndex(this)}else this.started.next({source:this}),this._initialContainer=this._initialIndex=void 0;var i;this._parentPositions.cache(e?e.getScrollableParents():[])}_initializeDragSequence(t,e){e.stopPropagation();const i=this.isDragging(),n=U(e),a=!n&&0!==e.button,s=this._rootElement,o=!n&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now();if(e.target&&e.target.draggable&&"mousedown"===e.type&&e.preventDefault(),i||a||o)return;this._handles.length&&(this._rootElementTapHighlight=s.style.webkitTapHighlightColor||"",s.style.webkitTapHighlightColor="transparent"),this._hasStartedDragging=this._hasMoved=!1,this._removeSubscriptions(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scroll.subscribe(t=>{this._updateOnScroll(t)}),this._boundaryElement&&(this._boundaryRect=S(this._boundaryElement));const r=this._previewTemplate;this._pickupPositionInElement=r&&r.template&&!r.matchSize?{x:0,y:0}:this._getPointerPositionInElement(t,e);const c=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:c.x,y:c.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(t){w(this._rootElement,!0),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._boundaryRect=this._previewRect=void 0,this._ngZone.run(()=>{const e=this._dropContainer,i=e.getItemIndex(this),n=this._getPointerPositionOnPage(t),a=this._getDragDistance(this._getPointerPositionOnPage(t)),s=e._isOverContainer(n.x,n.y);this.ended.next({source:this,distance:a}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:a}),e.drop(this,i,this._initialContainer,s,a,this._initialIndex),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:t,y:e},{x:i,y:n}){let a=this._initialContainer._getSiblingContainerFromPosition(this,t,e);!a&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(t,e)&&(a=this._initialContainer),a&&a!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=a,this._dropContainer.enter(this,t,e,a===this._initialContainer&&a.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:a,currentIndex:a.getItemIndex(this)})}),this._dropContainer._startScrollingIfNecessary(i,n),this._dropContainer._sortItem(this,t,e,this._pointerDirectionDelta),this._preview.style.transform=N(t-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y)}_createPreviewElement(){const t=this._previewTemplate,e=this.previewClass,i=t?t.template:null;let n;if(i&&t){const e=t.matchSize?this._rootElement.getBoundingClientRect():null,a=t.viewContainer.createEmbeddedView(i,t.context);a.detectChanges(),n=$(a,this._document),this._previewRef=a,t.matchSize?H(n,e):n.style.transform=N(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else{const t=this._rootElement;n=j(t),H(n,t.getBoundingClientRect())}return O(n.style,{pointerEvents:"none",margin:"0",position:"fixed",top:"0",left:"0",zIndex:""+(this._config.zIndex||1e3)}),D(n,!1),n.classList.add("cdk-drag-preview"),n.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(t=>n.classList.add(t)):n.classList.add(e)),n}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();const t=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._preview.style.transform=N(t.left,t.top);const e=function(t){const e=getComputedStyle(t),i=k(e,"transition-property"),n=i.find(t=>"transform"===t||"all"===t);if(!n)return 0;const a=i.indexOf(n),s=k(e,"transition-duration"),o=k(e,"transition-delay");return M(s[a])+M(o[a])}(this._preview);return 0===e?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(t=>{const i=e=>{(!e||e.target===this._preview&&"transform"===e.propertyName)&&(this._preview.removeEventListener("transitionend",i),t(),clearTimeout(n))},n=setTimeout(i,1.5*e);this._preview.addEventListener("transitionend",i)}))}_createPlaceholderElement(){const t=this._placeholderTemplate,e=t?t.template:null;let i;return e?(this._placeholderRef=t.viewContainer.createEmbeddedView(e,t.context),this._placeholderRef.detectChanges(),i=$(this._placeholderRef,this._document)):i=j(this._rootElement),i.classList.add("cdk-drag-placeholder"),i}_getPointerPositionInElement(t,e){const i=this._rootElement.getBoundingClientRect(),n=t===this._rootElement?null:t,a=n?n.getBoundingClientRect():i,s=U(e)?e.targetTouches[0]:e,o=this._getViewportScrollPosition();return{x:a.left-i.left+(s.pageX-a.left-o.left),y:a.top-i.top+(s.pageY-a.top-o.top)}}_getPointerPositionOnPage(t){const e=this._getViewportScrollPosition(),i=U(t)?t.touches[0]||t.changedTouches[0]||{pageX:0,pageY:0}:t,n=i.pageX-e.left,a=i.pageY-e.top;if(this._ownerSVGElement){const t=this._ownerSVGElement.getScreenCTM();if(t){const e=this._ownerSVGElement.createSVGPoint();return e.x=n,e.y=a,e.matrixTransform(t.inverse())}}return{x:n,y:a}}_getConstrainedPointerPosition(t){const e=this._dropContainer?this._dropContainer.lockAxis:null;let{x:i,y:n}=this.constrainPosition?this.constrainPosition(t,this):t;if("x"===this.lockAxis||"x"===e?n=this._pickupPositionOnPage.y:"y"!==this.lockAxis&&"y"!==e||(i=this._pickupPositionOnPage.x),this._boundaryRect){const{x:t,y:e}=this._pickupPositionInElement,a=this._boundaryRect,s=this._previewRect,o=a.top+e,r=a.bottom-(s.height-e);i=z(i,a.left+t,a.right-(s.width-t)),n=z(n,o,r)}return{x:i,y:n}}_updatePointerDirectionDelta(t){const{x:e,y:i}=t,n=this._pointerDirectionDelta,a=this._pointerPositionAtLastDirectionChange,s=Math.abs(e-a.x),o=Math.abs(i-a.y);return s>this._config.pointerDirectionChangeThreshold&&(n.x=e>a.x?1:-1,a.x=e),o>this._config.pointerDirectionChangeThreshold&&(n.y=i>a.y?1:-1,a.y=i),n}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;const t=this._handles.length>0||!this.isDragging();t!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=t,D(this._rootElement,t))}_removeRootElementListeners(t){t.removeEventListener("mousedown",this._pointerDown,L),t.removeEventListener("touchstart",this._pointerDown,F)}_applyRootElementTransform(t,e){const i=N(t,e);null==this._initialTransform&&(this._initialTransform=this._rootElement.style.transform||""),this._rootElement.style.transform=this._initialTransform?i+" "+this._initialTransform:i}_getDragDistance(t){const e=this._pickupPositionOnPage;return e?{x:t.x-e.x,y:t.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:t,y:e}=this._passiveTransform;if(0===t&&0===e||this.isDragging()||!this._boundaryElement)return;const i=this._boundaryElement.getBoundingClientRect(),n=this._rootElement.getBoundingClientRect();if(0===i.width&&0===i.height||0===n.width&&0===n.height)return;const a=i.left-n.left,s=n.right-i.right,o=i.top-n.top,r=n.bottom-i.bottom;i.width>n.width?(a>0&&(t+=a),s>0&&(t-=s)):t=0,i.height>n.height?(o>0&&(e+=o),r>0&&(e-=r)):e=0,t===this._passiveTransform.x&&e===this._passiveTransform.y||this.setFreeDragPosition({y:e,x:t})}_getDragStartDelay(t){const e=this.dragStartDelay;return"number"==typeof e?e:U(t)?e.touch:e?e.mouse:0}_updateOnScroll(t){const e=this._parentPositions.handleScroll(t);if(e){const i=t.target;this._boundaryRect&&(i===this._document||i!==this._boundaryElement&&i.contains(this._boundaryElement))&&P(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){const t=this._parentPositions.positions.get(this._document);return t?t.scrollPosition:this._viewportRuler.getViewportScrollPosition()}}function N(t,e){return`translate3d(${Math.round(t)}px, ${Math.round(e)}px, 0)`}function z(t,e,i){return Math.max(e,Math.min(i,t))}function B(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function U(t){return"t"===t.type[0]}function $(t,e){const i=t.rootNodes;if(1===i.length&&i[0].nodeType===e.ELEMENT_NODE)return i[0];const n=e.createElement("div");return i.forEach(t=>n.appendChild(t)),n}function H(t,e){t.style.width=e.width+"px",t.style.height=e.height+"px",t.style.transform=N(e.left,e.top)}function G(t,e,i){const n=q(e,t.length-1),a=q(i,t.length-1);if(n===a)return;const s=t[n],o=a<n?-1:1;for(let r=n;r!==a;r+=o)t[r]=t[r+o];t[a]=s}function X(t,e,i,n){const a=q(i,t.length-1),s=q(n,e.length);t.length&&e.splice(s,0,t.splice(a,1)[0])}function q(t,e){return Math.max(0,Math.min(e,t))}class K{constructor(t,e,i,n,a){this._dragDropRegistry=e,this._ngZone=n,this._viewportRuler=a,this.disabled=!1,this.sortingDisabled=!1,this.autoScrollDisabled=!1,this.enterPredicate=()=>!0,this.beforeStarted=new c.a,this.entered=new c.a,this.exited=new c.a,this.dropped=new c.a,this.sorted=new c.a,this._isDragging=!1,this._itemPositions=[],this._previousSwap={drag:null,delta:0,overlaps:!1},this._siblings=[],this._orientation="vertical",this._activeSiblings=new Set,this._direction="ltr",this._viewportScrollSubscription=l.a.EMPTY,this._verticalScrollDirection=0,this._horizontalScrollDirection=0,this._stopScrollTimers=new c.a,this._cachedShadowRoot=null,this._startScrollInterval=()=>{this._stopScrolling(),function(t=0,e=h.a){return(!Object(u.a)(t)||t<0)&&(t=0),e&&"function"==typeof e.schedule||(e=h.a),new d.a(i=>(i.add(e.schedule(p,t,{subscriber:i,counter:0,period:t})),i))}(0,b.a).pipe(Object(m.a)(this._stopScrollTimers)).subscribe(()=>{const t=this._scrollNode;1===this._verticalScrollDirection?J(t,-2):2===this._verticalScrollDirection&&J(t,2),1===this._horizontalScrollDirection?Z(t,-2):2===this._horizontalScrollDirection&&Z(t,2)})},this.element=Object(r.e)(t),this._document=i,this.withScrollableParents([this.element]),e.registerDropContainer(this),this._parentPositions=new R(i,a)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){const t=Object(r.e)(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=t.msScrollSnapType||t.scrollSnapType||"",t.scrollSnapType=t.msScrollSnapType="none",this._cacheItems(),this._siblings.forEach(t=>t._startReceiving(this)),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}enter(t,e,i,n){let a;this.start(),null==n?(a=this.sortingDisabled?this._draggables.indexOf(t):-1,-1===a&&(a=this._getItemIndexFromPointerPosition(t,e,i))):a=n;const s=this._activeDraggables,o=s.indexOf(t),c=t.getPlaceholderElement();let l=s[a];if(l===t&&(l=s[a+1]),o>-1&&s.splice(o,1),l&&!this._dragDropRegistry.isDragging(l)){const e=l.getRootElement();e.parentElement.insertBefore(c,e),s.splice(a,0,t)}else if(this._shouldEnterAsFirstChild(e,i)){const e=s[0].getRootElement();e.parentNode.insertBefore(c,e),s.unshift(t)}else Object(r.e)(this.element).appendChild(c),s.push(t);c.style.transform="",this._cacheItemPositions(),this._cacheParentPositions(),this.entered.next({item:t,container:this,currentIndex:this.getItemIndex(t)})}exit(t){this._reset(),this.exited.next({item:t,container:this})}drop(t,e,i,n,a,s){this._reset(),null==s&&(s=i.getItemIndex(t)),this.dropped.next({item:t,currentIndex:e,previousIndex:s,container:this,previousContainer:i,isPointerOverContainer:n,distance:a})}withItems(t){const e=this._draggables;return this._draggables=t,t.forEach(t=>t._withDropContainer(this)),this.isDragging()&&(e.filter(t=>t.isDragging()).every(e=>-1===t.indexOf(e))?this._reset():this._cacheItems()),this}withDirection(t){return this._direction=t,this}connectedTo(t){return this._siblings=t.slice(),this}withOrientation(t){return this._orientation=t,this}withScrollableParents(t){const e=Object(r.e)(this.element);return this._scrollableElements=-1===t.indexOf(e)?[e,...t]:t.slice(),this}getScrollableParents(){return this._scrollableElements}getItemIndex(t){return this._isDragging?Y("horizontal"===this._orientation&&"rtl"===this._direction?this._itemPositions.slice().reverse():this._itemPositions,e=>e.drag===t):this._draggables.indexOf(t)}isReceiving(){return this._activeSiblings.size>0}_sortItem(t,e,i,n){if(this.sortingDisabled||!V(this._clientRect,.05,e,i))return;const a=this._itemPositions,s=this._getItemIndexFromPointerPosition(t,e,i,n);if(-1===s&&a.length>0)return;const o="horizontal"===this._orientation,r=Y(a,e=>e.drag===t),c=a[s],l=c.clientRect,d=r>s?1:-1,h=this._getItemOffsetPx(a[r].clientRect,l,d),u=this._getSiblingOffsetPx(r,a,d),p=a.slice();G(a,r,s),this.sorted.next({previousIndex:r,currentIndex:s,container:this,item:t}),a.forEach((e,i)=>{if(p[i]===e)return;const n=e.drag===t,a=n?h:u,s=n?t.getPlaceholderElement():e.drag.getRootElement();e.offset+=a,o?(s.style.transform=`translate3d(${Math.round(e.offset)}px, 0, 0)`,P(e.clientRect,0,a)):(s.style.transform=`translate3d(0, ${Math.round(e.offset)}px, 0)`,P(e.clientRect,a,0))}),this._previousSwap.overlaps=I(l,e,i),this._previousSwap.drag=c.drag,this._previousSwap.delta=o?n.x:n.y}_startScrollingIfNecessary(t,e){if(this.autoScrollDisabled)return;let i,n=0,a=0;if(this._parentPositions.positions.forEach((s,o)=>{o!==this._document&&s.clientRect&&!i&&V(s.clientRect,.05,t,e)&&([n,a]=function(t,e,i,n){const a=tt(e,n),s=et(e,i);let o=0,r=0;if(a){const e=t.scrollTop;1===a?e>0&&(o=1):t.scrollHeight-e>t.clientHeight&&(o=2)}if(s){const e=t.scrollLeft;1===s?e>0&&(r=1):t.scrollWidth-e>t.clientWidth&&(r=2)}return[o,r]}(o,s.clientRect,t,e),(n||a)&&(i=o))}),!n&&!a){const{width:s,height:o}=this._viewportRuler.getViewportSize(),r={width:s,height:o,top:0,right:s,bottom:o,left:0};n=tt(r,e),a=et(r,t),i=window}!i||n===this._verticalScrollDirection&&a===this._horizontalScrollDirection&&i===this._scrollNode||(this._verticalScrollDirection=n,this._horizontalScrollDirection=a,this._scrollNode=i,(n||a)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_cacheParentPositions(){const t=Object(r.e)(this.element);this._parentPositions.cache(this._scrollableElements),this._clientRect=this._parentPositions.positions.get(t).clientRect}_cacheItemPositions(){const t="horizontal"===this._orientation;this._itemPositions=this._activeDraggables.map(t=>{const e=t.getVisibleElement();return{drag:t,offset:0,clientRect:S(e)}}).sort((e,i)=>t?e.clientRect.left-i.clientRect.left:e.clientRect.top-i.clientRect.top)}_reset(){this._isDragging=!1;const t=Object(r.e)(this.element).style;t.scrollSnapType=t.msScrollSnapType=this._initialScrollSnap,this._activeDraggables.forEach(t=>{const e=t.getRootElement();e&&(e.style.transform="")}),this._siblings.forEach(t=>t._stopReceiving(this)),this._activeDraggables=[],this._itemPositions=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1,this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_getSiblingOffsetPx(t,e,i){const n="horizontal"===this._orientation,a=e[t].clientRect,s=e[t+-1*i];let o=a[n?"width":"height"]*i;if(s){const t=n?"left":"top",e=n?"right":"bottom";-1===i?o-=s.clientRect[t]-a[e]:o+=a[t]-s.clientRect[e]}return o}_getItemOffsetPx(t,e,i){const n="horizontal"===this._orientation;let a=n?e.left-t.left:e.top-t.top;return-1===i&&(a+=n?e.width-t.width:e.height-t.height),a}_shouldEnterAsFirstChild(t,e){if(!this._activeDraggables.length)return!1;const i=this._itemPositions,n="horizontal"===this._orientation;if(i[0].drag!==this._activeDraggables[0]){const a=i[i.length-1].clientRect;return n?t>=a.right:e>=a.bottom}{const a=i[0].clientRect;return n?t<=a.left:e<=a.top}}_getItemIndexFromPointerPosition(t,e,i,n){const a="horizontal"===this._orientation;return Y(this._itemPositions,({drag:s,clientRect:o},r,c)=>{if(s===t)return c.length<2;if(n){const t=a?n.x:n.y;if(s===this._previousSwap.drag&&this._previousSwap.overlaps&&t===this._previousSwap.delta)return!1}return a?e>=Math.floor(o.left)&&e<Math.floor(o.right):i>=Math.floor(o.top)&&i<Math.floor(o.bottom)})}_cacheItems(){this._activeDraggables=this._draggables.slice(),this._cacheItemPositions(),this._cacheParentPositions()}_isOverContainer(t,e){return I(this._clientRect,t,e)}_getSiblingContainerFromPosition(t,e,i){return this._siblings.find(n=>n._canReceive(t,e,i))}_canReceive(t,e,i){if(!I(this._clientRect,e,i)||!this.enterPredicate(t,this))return!1;const n=this._getShadowRoot().elementFromPoint(e,i);if(!n)return!1;const a=Object(r.e)(this.element);return n===a||a.contains(n)}_startReceiving(t){const e=this._activeSiblings;e.has(t)||(e.add(t),this._cacheParentPositions(),this._listenToScrollEvents())}_stopReceiving(t){this._activeSiblings.delete(t),this._viewportScrollSubscription.unsubscribe()}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scroll.subscribe(t=>{if(this.isDragging()){const e=this._parentPositions.handleScroll(t);e&&(this._itemPositions.forEach(({clientRect:t})=>{P(t,e.top,e.left)}),this._itemPositions.forEach(({drag:t})=>{this._dragDropRegistry.isDragging(t)&&t._sortFromLastPointerPosition()}))}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){const t=Object(o.c)(Object(r.e)(this.element));this._cachedShadowRoot=t||this._document}return this._cachedShadowRoot}}function Y(t,e){for(let i=0;i<t.length;i++)if(e(t[i],i,t))return i;return-1}function J(t,e){t===window?t.scrollBy(0,e):t.scrollTop+=e}function Z(t,e){t===window?t.scrollBy(e,0):t.scrollLeft+=e}function tt(t,e){const{top:i,bottom:n,height:a}=t,s=.05*a;return e>=i-s&&e<=i+s?1:e>=n-s&&e<=n+s?2:0}function et(t,e){const{left:i,right:n,width:a}=t,s=.05*a;return e>=i-s&&e<=i+s?1:e>=n-s&&e<=n+s?2:0}const it=Object(o.f)({passive:!1,capture:!0});let nt=(()=>{class t{constructor(t,e){this._ngZone=t,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=new Set,this._globalListeners=new Map,this.pointerMove=new c.a,this.pointerUp=new c.a,this.scroll=new c.a,this._preventDefaultWhileDragging=t=>{this._activeDragInstances.size&&t.preventDefault()},this._persistentTouchmoveListener=t=>{this._activeDragInstances.size&&(t.preventDefault(),this.pointerMove.next(t))},this._document=e}registerDropContainer(t){this._dropInstances.has(t)||this._dropInstances.add(t)}registerDragItem(t){this._dragInstances.add(t),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,it)})}removeDropContainer(t){this._dropInstances.delete(t)}removeDragItem(t){this._dragInstances.delete(t),this.stopDragging(t),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,it)}startDragging(t,e){if(!this._activeDragInstances.has(t)&&(this._activeDragInstances.add(t),1===this._activeDragInstances.size)){const t=e.type.startsWith("touch");this._globalListeners.set(t?"touchend":"mouseup",{handler:t=>this.pointerUp.next(t),options:!0}).set("scroll",{handler:t=>this.scroll.next(t),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:it}),t||this._globalListeners.set("mousemove",{handler:t=>this.pointerMove.next(t),options:it}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((t,e)=>{this._document.addEventListener(e,t.handler,t.options)})})}}stopDragging(t){this._activeDragInstances.delete(t),0===this._activeDragInstances.size&&this._clearGlobalListeners()}isDragging(t){return this._activeDragInstances.has(t)}ngOnDestroy(){this._dragInstances.forEach(t=>this.removeDragItem(t)),this._dropInstances.forEach(t=>this.removeDropContainer(t)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((t,e)=>{this._document.removeEventListener(e,t.handler,t.options)}),this._globalListeners.clear()}}return t.\u0275fac=function(e){return new(e||t)(n.ac(n.C),n.ac(a.e))},t.\u0275prov=Object(n.Mb)({factory:function(){return new t(Object(n.ac)(n.C),Object(n.ac)(a.e))},token:t,providedIn:"root"}),t})();const at={dragStartThreshold:5,pointerDirectionChangeThreshold:5};let st=(()=>{class t{constructor(t,e,i,n){this._document=t,this._ngZone=e,this._viewportRuler=i,this._dragDropRegistry=n}createDrag(t,e=at){return new Q(t,e,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(t){return new K(t,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}}return t.\u0275fac=function(e){return new(e||t)(n.ac(a.e),n.ac(n.C),n.ac(s.h),n.ac(nt))},t.\u0275prov=Object(n.Mb)({factory:function(){return new t(Object(n.ac)(a.e),Object(n.ac)(n.C),Object(n.ac)(s.h),Object(n.ac)(nt))},token:t,providedIn:"root"}),t})();const ot=new n.s("CDK_DRAG_PARENT"),rt=new n.s("CdkDropListGroup");let ct=(()=>{class t{constructor(){this._items=new Set,this._disabled=!1}get disabled(){return this._disabled}set disabled(t){this._disabled=Object(r.c)(t)}ngOnDestroy(){this._items.clear()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["","cdkDropListGroup",""]],inputs:{disabled:["cdkDropListGroupDisabled","disabled"]},exportAs:["cdkDropListGroup"],features:[n.Cb([{provide:rt,useExisting:t}])]}),t})();const lt=new n.s("CDK_DRAG_CONFIG");let dt=0;const ht=new n.s("CdkDropList");let ut=(()=>{class t{constructor(e,i,a,s,o,r,l){this.element=e,this._changeDetectorRef=a,this._dir=s,this._group=o,this._scrollDispatcher=r,this._destroyed=new c.a,this.connectedTo=[],this.id="cdk-drop-list-"+dt++,this.enterPredicate=()=>!0,this.dropped=new n.o,this.entered=new n.o,this.exited=new n.o,this.sorted=new n.o,this._unsortedItems=new Set,this._dropListRef=i.createDropList(e),this._dropListRef.data=this,l&&this._assignDefaults(l),this._dropListRef.enterPredicate=(t,e)=>this.enterPredicate(t.data,e.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),t._dropLists.push(this),o&&o._items.add(this)}get disabled(){return this._disabled||!!this._group&&this._group.disabled}set disabled(t){this._dropListRef.disabled=this._disabled=Object(r.c)(t)}addItem(t){this._unsortedItems.add(t),this._dropListRef.isDragging()&&this._syncItemsWithRef()}removeItem(t){this._unsortedItems.delete(t),this._dropListRef.isDragging()&&this._syncItemsWithRef()}getSortedItems(){return Array.from(this._unsortedItems).sort((t,e)=>t._dragRef.getVisibleElement().compareDocumentPosition(e._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){const e=t._dropLists.indexOf(this);e>-1&&t._dropLists.splice(e,1),this._group&&this._group._items.delete(this),this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}_setupInputSyncSubscription(e){this._dir&&this._dir.change.pipe(Object(g.a)(this._dir.value),Object(m.a)(this._destroyed)).subscribe(t=>e.withDirection(t)),e.beforeStarted.subscribe(()=>{const i=Object(r.b)(this.connectedTo).map(e=>"string"==typeof e?t._dropLists.find(t=>t.id===e):e);if(this._group&&this._group._items.forEach(t=>{-1===i.indexOf(t)&&i.push(t)}),!this._scrollableParentsResolved&&this._scrollDispatcher){const t=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(t=>t.getElementRef().nativeElement);this._dropListRef.withScrollableParents(t),this._scrollableParentsResolved=!0}e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.sortingDisabled=Object(r.c)(this.sortingDisabled),e.autoScrollDisabled=Object(r.c)(this.autoScrollDisabled),e.connectedTo(i.filter(t=>t&&t!==this).map(t=>t._dropListRef)).withOrientation(this.orientation)})}_handleEvents(t){t.beforeStarted.subscribe(()=>{this._syncItemsWithRef(),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(t=>{this.entered.emit({container:this,item:t.item.data,currentIndex:t.currentIndex})}),t.exited.subscribe(t=>{this.exited.emit({container:this,item:t.item.data}),this._changeDetectorRef.markForCheck()}),t.sorted.subscribe(t=>{this.sorted.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,container:this,item:t.item.data})}),t.dropped.subscribe(t=>{this.dropped.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,previousContainer:t.previousContainer.data,container:t.container.data,item:t.item.data,isPointerOverContainer:t.isPointerOverContainer,distance:t.distance}),this._changeDetectorRef.markForCheck()})}_assignDefaults(t){const{lockAxis:e,draggingDisabled:i,sortingDisabled:n,listAutoScrollDisabled:a,listOrientation:s}=t;this.disabled=null!=i&&i,this.sortingDisabled=null!=n&&n,this.autoScrollDisabled=null!=a&&a,this.orientation=s||"vertical",e&&(this.lockAxis=e)}_syncItemsWithRef(){this._dropListRef.withItems(this.getSortedItems().map(t=>t._dragRef))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(st),n.Qb(n.h),n.Qb(C.c,8),n.Qb(rt,12),n.Qb(s.f),n.Qb(lt,8))},t.\u0275dir=n.Lb({type:t,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(t,e){2&t&&(n.Zb("id",e.id),n.Ib("cdk-drop-list-disabled",e.disabled)("cdk-drop-list-dragging",e._dropListRef.isDragging())("cdk-drop-list-receiving",e._dropListRef.isReceiving()))},inputs:{connectedTo:["cdkDropListConnectedTo","connectedTo"],id:"id",enterPredicate:["cdkDropListEnterPredicate","enterPredicate"],disabled:["cdkDropListDisabled","disabled"],sortingDisabled:["cdkDropListSortingDisabled","sortingDisabled"],autoScrollDisabled:["cdkDropListAutoScrollDisabled","autoScrollDisabled"],orientation:["cdkDropListOrientation","orientation"],lockAxis:["cdkDropListLockAxis","lockAxis"],data:["cdkDropListData","data"]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],features:[n.Cb([{provide:rt,useValue:void 0},{provide:ht,useExisting:t}])]}),t._dropLists=[],t})();const pt=new n.s("CdkDragHandle");let bt=(()=>{class t{constructor(t,e){this.element=t,this._stateChanges=new c.a,this._disabled=!1,this._parentDrag=e}get disabled(){return this._disabled}set disabled(t){this._disabled=Object(r.c)(t),this._stateChanges.next(this)}ngOnDestroy(){this._stateChanges.complete()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(ot,12))},t.\u0275dir=n.Lb({type:t,selectors:[["","cdkDragHandle",""]],hostAttrs:[1,"cdk-drag-handle"],inputs:{disabled:["cdkDragHandleDisabled","disabled"]},features:[n.Cb([{provide:pt,useExisting:t}])]}),t})();const ft=new n.s("CdkDragPlaceholder");let mt=(()=>{class t{constructor(t){this.templateRef=t}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.P))},t.\u0275dir=n.Lb({type:t,selectors:[["ng-template","cdkDragPlaceholder",""]],inputs:{data:"data"},features:[n.Cb([{provide:ft,useExisting:t}])]}),t})();const gt=new n.s("CdkDragPreview");let vt=(()=>{class t{constructor(t){this.templateRef=t,this._matchSize=!1}get matchSize(){return this._matchSize}set matchSize(t){this._matchSize=Object(r.c)(t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.P))},t.\u0275dir=n.Lb({type:t,selectors:[["ng-template","cdkDragPreview",""]],inputs:{matchSize:"matchSize",data:"data"},features:[n.Cb([{provide:gt,useExisting:t}])]}),t})(),_t=(()=>{class t{constructor(t,e,i,a,s,o,r,l,h,u){this.element=t,this.dropContainer=e,this._document=i,this._ngZone=a,this._viewContainerRef=s,this._dir=r,this._changeDetectorRef=h,this._selfHandle=u,this._destroyed=new c.a,this.started=new n.o,this.released=new n.o,this.ended=new n.o,this.entered=new n.o,this.exited=new n.o,this.dropped=new n.o,this.moved=new d.a(t=>{const e=this._dragRef.moved.pipe(Object(v.a)(t=>({source:this,pointerPosition:t.pointerPosition,event:t.event,delta:t.delta,distance:t.distance}))).subscribe(t);return()=>{e.unsubscribe()}}),this._dragRef=l.createDrag(t,{dragStartThreshold:o&&null!=o.dragStartThreshold?o.dragStartThreshold:5,pointerDirectionChangeThreshold:o&&null!=o.pointerDirectionChangeThreshold?o.pointerDirectionChangeThreshold:5,zIndex:null==o?void 0:o.zIndex}),this._dragRef.data=this,o&&this._assignDefaults(o),e&&(this._dragRef._withDropContainer(e._dropListRef),e.addItem(this)),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}get disabled(){return this._disabled||this.dropContainer&&this.dropContainer.disabled}set disabled(t){this._disabled=Object(r.c)(t),this._dragRef.disabled=this._disabled}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}ngAfterViewInit(){this._ngZone.onStable.pipe(Object(_.a)(1),Object(m.a)(this._destroyed)).subscribe(()=>{this._updateRootElement(),this._handles.changes.pipe(Object(g.a)(this._handles),Object(y.a)(t=>{const e=t.filter(t=>t._parentDrag===this).map(t=>t.element);this._selfHandle&&this.rootElementSelector&&e.push(this.element),this._dragRef.withHandles(e)}),Object(x.a)(t=>Object(f.a)(...t.map(t=>t._stateChanges.pipe(Object(g.a)(t))))),Object(m.a)(this._destroyed)).subscribe(t=>{const e=this._dragRef,i=t.element.nativeElement;t.disabled?e.disableHandle(i):e.enableHandle(i)}),this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)})}ngOnChanges(t){const e=t.rootElementSelector,i=t.freeDragPosition;e&&!e.firstChange&&this._updateRootElement(),i&&!i.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()}_updateRootElement(){const t=this.element.nativeElement,e=this.rootElementSelector?yt(t,this.rootElementSelector):t;this._dragRef.withRootElement(e||t)}_getBoundaryElement(){const t=this.boundaryElement;return t?"string"==typeof t?yt(this.element.nativeElement,t):Object(r.e)(t):null}_syncInputs(t){t.beforeStarted.subscribe(()=>{if(!t.isDragging()){const e=this._dir,i=this.dragStartDelay,n=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,a=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;t.disabled=this.disabled,t.lockAxis=this.lockAxis,t.dragStartDelay="object"==typeof i&&i?i:Object(r.f)(i),t.constrainPosition=this.constrainPosition,t.previewClass=this.previewClass,t.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(n).withPreviewTemplate(a),e&&t.withDirection(e.value)}})}_handleEvents(t){t.started.subscribe(()=>{this.started.emit({source:this}),this._changeDetectorRef.markForCheck()}),t.released.subscribe(()=>{this.released.emit({source:this})}),t.ended.subscribe(t=>{this.ended.emit({source:this,distance:t.distance}),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(t=>{this.entered.emit({container:t.container.data,item:this,currentIndex:t.currentIndex})}),t.exited.subscribe(t=>{this.exited.emit({container:t.container.data,item:this})}),t.dropped.subscribe(t=>{this.dropped.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,previousContainer:t.previousContainer.data,container:t.container.data,isPointerOverContainer:t.isPointerOverContainer,item:this,distance:t.distance})})}_assignDefaults(t){const{lockAxis:e,dragStartDelay:i,constrainPosition:n,previewClass:a,boundaryElement:s,draggingDisabled:o,rootElementSelector:r}=t;this.disabled=null!=o&&o,this.dragStartDelay=i||0,e&&(this.lockAxis=e),n&&(this.constrainPosition=n),a&&(this.previewClass=a),s&&(this.boundaryElement=s),r&&(this.rootElementSelector=r)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(ht,12),n.Qb(a.e),n.Qb(n.C),n.Qb(n.T),n.Qb(lt,8),n.Qb(C.c,8),n.Qb(st),n.Qb(n.h),n.Qb(pt,10))},t.\u0275dir=n.Lb({type:t,selectors:[["","cdkDrag",""]],contentQueries:function(t,e,i){var a;1&t&&(n.Jb(i,gt,!0),n.Jb(i,ft,!0),n.Jb(i,pt,!0)),2&t&&(n.yc(a=n.ec())&&(e._previewTemplate=a.first),n.yc(a=n.ec())&&(e._placeholderTemplate=a.first),n.yc(a=n.ec())&&(e._handles=a))},hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(t,e){2&t&&n.Ib("cdk-drag-disabled",e.disabled)("cdk-drag-dragging",e._dragRef.isDragging())},inputs:{disabled:["cdkDragDisabled","disabled"],dragStartDelay:["cdkDragStartDelay","dragStartDelay"],lockAxis:["cdkDragLockAxis","lockAxis"],constrainPosition:["cdkDragConstrainPosition","constrainPosition"],previewClass:["cdkDragPreviewClass","previewClass"],boundaryElement:["cdkDragBoundary","boundaryElement"],rootElementSelector:["cdkDragRootElement","rootElementSelector"],data:["cdkDragData","data"],freeDragPosition:["cdkDragFreeDragPosition","freeDragPosition"]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[n.Cb([{provide:ot,useExisting:t}]),n.Bb]}),t})();function yt(t,e){let i=t.parentElement;for(;i;){if(i.matches?i.matches(e):i.msMatchesSelector(e))return i;i=i.parentElement}return null}let xt=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},providers:[st],imports:[s.c]}),t})()},"5+tZ":function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var n=i("lJxs"),a=i("Cfvw"),s=i("zx2A");function o(t,e,i=Number.POSITIVE_INFINITY){return"function"==typeof e?s=>s.pipe(o((i,s)=>Object(a.a)(t(i,s)).pipe(Object(n.a)((t,n)=>e(i,t,s,n))),i)):("number"==typeof e&&(i=e),e=>e.lift(new r(t,i)))}class r{constructor(t,e=Number.POSITIVE_INFINITY){this.project=t,this.concurrent=e}call(t,e){return e.subscribe(new c(t,this.project,this.concurrent))}}class c extends s.b{constructor(t,e,i=Number.POSITIVE_INFINITY){super(t),this.project=e,this.concurrent=i,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)}_tryNext(t){let e;const i=this.index++;try{e=this.project(t,i)}catch(n){return void this.destination.error(n)}this.active++,this._innerSub(e)}_innerSub(t){const e=new s.a(this),i=this.destination;i.add(e);const n=Object(s.c)(t,e);n!==e&&i.add(n)}_complete(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()}notifyNext(t){this.destination.next(t)}notifyComplete(){const t=this.buffer;this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}},"5RNC":function(t,e,i){"use strict";i.d(e,"a",(function(){return y})),i.d(e,"b",(function(){return O}));var n=i("ofXK"),a=i("fXoL"),s=i("FKr1"),o=i("8LU1"),r=i("FtGj"),c=i("3Pt+"),l=i("R1ws"),d=i("nLfN"),h=i("quSY"),u=i("u47x"),p=i("cH1L");const b=["sliderWrapper"],f=Object(d.f)({passive:!1}),m={provide:c.s,useExisting:Object(a.X)(()=>y),multi:!0};class g{}class v{constructor(t){this._elementRef=t}}const _=Object(s.F)(Object(s.A)(Object(s.C)(v),"accent"));let y=(()=>{class t extends _{constructor(t,e,i,n,s,o,r,c){super(t),this._focusMonitor=e,this._changeDetectorRef=i,this._dir=n,this._ngZone=o,this._animationMode=c,this._invert=!1,this._max=100,this._min=0,this._step=1,this._thumbLabel=!1,this._tickInterval=0,this._value=null,this._vertical=!1,this.change=new a.o,this.input=new a.o,this.valueChange=new a.o,this.onTouched=()=>{},this._percent=0,this._isSliding=!1,this._isActive=!1,this._tickIntervalPercent=0,this._sliderDimensions=null,this._controlValueAccessorChangeFn=()=>{},this._dirChangeSubscription=h.a.EMPTY,this._pointerDown=t=>{this.disabled||this._isSliding||!x(t)&&0!==t.button||this._ngZone.run(()=>{const e=this.value,i=C(t);this._isSliding=!0,this._lastPointerEvent=t,t.preventDefault(),this._focusHostElement(),this._onMouseenter(),this._bindGlobalEvents(t),this._focusHostElement(),this._updateValueFromPosition(i),this._valueOnSlideStart=e,e!=this.value&&this._emitInputEvent()})},this._pointerMove=t=>{if(this._isSliding){t.preventDefault();const e=this.value;this._lastPointerEvent=t,this._updateValueFromPosition(C(t)),e!=this.value&&this._emitInputEvent()}},this._pointerUp=t=>{this._isSliding&&(t.preventDefault(),this._removeGlobalEvents(),this._isSliding=!1,this._valueOnSlideStart==this.value||this.disabled||this._emitChangeEvent(),this._valueOnSlideStart=this._lastPointerEvent=null)},this._windowBlur=()=>{this._lastPointerEvent&&this._pointerUp(this._lastPointerEvent)},this._document=r,this.tabIndex=parseInt(s)||0,o.runOutsideAngular(()=>{const e=t.nativeElement;e.addEventListener("mousedown",this._pointerDown,f),e.addEventListener("touchstart",this._pointerDown,f)})}get invert(){return this._invert}set invert(t){this._invert=Object(o.c)(t)}get max(){return this._max}set max(t){this._max=Object(o.f)(t,this._max),this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()}get min(){return this._min}set min(t){this._min=Object(o.f)(t,this._min),null===this._value&&(this.value=this._min),this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()}get step(){return this._step}set step(t){this._step=Object(o.f)(t,this._step),this._step%1!=0&&(this._roundToDecimal=this._step.toString().split(".").pop().length),this._changeDetectorRef.markForCheck()}get thumbLabel(){return this._thumbLabel}set thumbLabel(t){this._thumbLabel=Object(o.c)(t)}get tickInterval(){return this._tickInterval}set tickInterval(t){this._tickInterval="auto"===t?"auto":"number"==typeof t||"string"==typeof t?Object(o.f)(t,this._tickInterval):0}get value(){return null===this._value&&(this.value=this._min),this._value}set value(t){if(t!==this._value){let e=Object(o.f)(t);this._roundToDecimal&&(e=parseFloat(e.toFixed(this._roundToDecimal))),this._value=e,this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()}}get vertical(){return this._vertical}set vertical(t){this._vertical=Object(o.c)(t)}get displayValue(){return this.displayWith?this.displayWith(this.value):this._roundToDecimal&&this.value&&this.value%1!=0?this.value.toFixed(this._roundToDecimal):this.value||0}focus(t){this._focusHostElement(t)}blur(){this._blurHostElement()}get percent(){return this._clamp(this._percent)}_shouldInvertAxis(){return this.vertical?!this.invert:this.invert}_isMinValue(){return 0===this.percent}_getThumbGap(){return this.disabled?7:this._isMinValue()&&!this.thumbLabel?this._isActive?10:7:0}_getTrackBackgroundStyles(){const t=this.vertical?`1, ${1-this.percent}, 1`:1-this.percent+", 1, 1";return{transform:`translate${this.vertical?"Y":"X"}(${this._shouldInvertMouseCoords()?"-":""}${this._getThumbGap()}px) scale3d(${t})`}}_getTrackFillStyles(){const t=this.percent,e=this.vertical?`1, ${t}, 1`:t+", 1, 1";return{transform:`translate${this.vertical?"Y":"X"}(${this._shouldInvertMouseCoords()?"":"-"}${this._getThumbGap()}px) scale3d(${e})`,display:0===t?"none":""}}_getTicksContainerStyles(){return{transform:`translate${this.vertical?"Y":"X"}(${this.vertical||"rtl"!=this._getDirection()?"-":""}${this._tickIntervalPercent/2*100}%)`}}_getTicksStyles(){let t=100*this._tickIntervalPercent,e={backgroundSize:this.vertical?`2px ${t}%`:t+"% 2px",transform:`translateZ(0) translate${this.vertical?"Y":"X"}(${this.vertical||"rtl"!=this._getDirection()?"":"-"}${t/2}%)${this.vertical||"rtl"!=this._getDirection()?"":" rotate(180deg)"}`};if(this._isMinValue()&&this._getThumbGap()){const t=this._shouldInvertAxis();let i;i=this.vertical?t?"Bottom":"Top":t?"Right":"Left",e["padding"+i]=this._getThumbGap()+"px"}return e}_getThumbContainerStyles(){const t=this._shouldInvertAxis();return{transform:`translate${this.vertical?"Y":"X"}(-${100*(("rtl"!=this._getDirection()||this.vertical?t:!t)?this.percent:1-this.percent)}%)`}}_shouldInvertMouseCoords(){const t=this._shouldInvertAxis();return"rtl"!=this._getDirection()||this.vertical?t:!t}_getDirection(){return this._dir&&"rtl"==this._dir.value?"rtl":"ltr"}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{this._isActive=!!t&&"keyboard"!==t,this._changeDetectorRef.detectChanges()}),this._dir&&(this._dirChangeSubscription=this._dir.change.subscribe(()=>{this._changeDetectorRef.markForCheck()}))}ngOnDestroy(){const t=this._elementRef.nativeElement;t.removeEventListener("mousedown",this._pointerDown,f),t.removeEventListener("touchstart",this._pointerDown,f),this._lastPointerEvent=null,this._removeGlobalEvents(),this._focusMonitor.stopMonitoring(this._elementRef),this._dirChangeSubscription.unsubscribe()}_onMouseenter(){this.disabled||(this._sliderDimensions=this._getSliderDimensions(),this._updateTickIntervalPercent())}_onFocus(){this._sliderDimensions=this._getSliderDimensions(),this._updateTickIntervalPercent()}_onBlur(){this.onTouched()}_onKeydown(t){if(this.disabled||Object(r.v)(t))return;const e=this.value;switch(t.keyCode){case r.n:this._increment(10);break;case r.m:this._increment(-10);break;case r.f:this.value=this.max;break;case r.j:this.value=this.min;break;case r.k:this._increment("rtl"==this._getDirection()?1:-1);break;case r.s:this._increment(1);break;case r.o:this._increment("rtl"==this._getDirection()?-1:1);break;case r.e:this._increment(-1);break;default:return}e!=this.value&&(this._emitInputEvent(),this._emitChangeEvent()),this._isSliding=!0,t.preventDefault()}_onKeyup(){this._isSliding=!1}_getWindow(){return this._document.defaultView||window}_bindGlobalEvents(t){const e=this._document,i=x(t),n=i?"touchend":"mouseup";e.addEventListener(i?"touchmove":"mousemove",this._pointerMove,f),e.addEventListener(n,this._pointerUp,f),i&&e.addEventListener("touchcancel",this._pointerUp,f);const a=this._getWindow();void 0!==a&&a&&a.addEventListener("blur",this._windowBlur)}_removeGlobalEvents(){const t=this._document;t.removeEventListener("mousemove",this._pointerMove,f),t.removeEventListener("mouseup",this._pointerUp,f),t.removeEventListener("touchmove",this._pointerMove,f),t.removeEventListener("touchend",this._pointerUp,f),t.removeEventListener("touchcancel",this._pointerUp,f);const e=this._getWindow();void 0!==e&&e&&e.removeEventListener("blur",this._windowBlur)}_increment(t){this.value=this._clamp((this.value||0)+this.step*t,this.min,this.max)}_updateValueFromPosition(t){if(!this._sliderDimensions)return;let e=this._clamp(((this.vertical?t.y:t.x)-(this.vertical?this._sliderDimensions.top:this._sliderDimensions.left))/(this.vertical?this._sliderDimensions.height:this._sliderDimensions.width));if(this._shouldInvertMouseCoords()&&(e=1-e),0===e)this.value=this.min;else if(1===e)this.value=this.max;else{const t=this._calculateValue(e),i=Math.round((t-this.min)/this.step)*this.step+this.min;this.value=this._clamp(i,this.min,this.max)}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.value),this.valueChange.emit(this.value),this.change.emit(this._createChangeEvent())}_emitInputEvent(){this.input.emit(this._createChangeEvent())}_updateTickIntervalPercent(){if(this.tickInterval&&this._sliderDimensions)if("auto"==this.tickInterval){let t=this.vertical?this._sliderDimensions.height:this._sliderDimensions.width,e=Math.ceil(30/(t*this.step/(this.max-this.min)));this._tickIntervalPercent=e*this.step/t}else this._tickIntervalPercent=this.tickInterval*this.step/(this.max-this.min)}_createChangeEvent(t=this.value){let e=new g;return e.source=this,e.value=t,e}_calculatePercentage(t){return((t||0)-this.min)/(this.max-this.min)}_calculateValue(t){return this.min+t*(this.max-this.min)}_clamp(t,e=0,i=1){return Math.max(e,Math.min(t,i))}_getSliderDimensions(){return this._sliderWrapper?this._sliderWrapper.nativeElement.getBoundingClientRect():null}_focusHostElement(t){this._elementRef.nativeElement.focus(t)}_blurHostElement(){this._elementRef.nativeElement.blur()}writeValue(t){this.value=t}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(u.h),a.Qb(a.h),a.Qb(p.c,8),a.bc("tabindex"),a.Qb(a.C),a.Qb(n.e),a.Qb(l.a,8))},t.\u0275cmp=a.Kb({type:t,selectors:[["mat-slider"]],viewQuery:function(t,e){var i;1&t&&a.Xc(b,!0),2&t&&a.yc(i=a.ec())&&(e._sliderWrapper=i.first)},hostAttrs:["role","slider",1,"mat-slider","mat-focus-indicator"],hostVars:28,hostBindings:function(t,e){1&t&&a.dc("focus",(function(){return e._onFocus()}))("blur",(function(){return e._onBlur()}))("keydown",(function(t){return e._onKeydown(t)}))("keyup",(function(){return e._onKeyup()}))("mouseenter",(function(){return e._onMouseenter()}))("selectstart",(function(t){return t.preventDefault()})),2&t&&(a.Zb("tabIndex",e.tabIndex),a.Eb("aria-disabled",e.disabled)("aria-valuemax",e.max)("aria-valuemin",e.min)("aria-valuenow",e.value)("aria-orientation",e.vertical?"vertical":"horizontal"),a.Ib("mat-slider-disabled",e.disabled)("mat-slider-has-ticks",e.tickInterval)("mat-slider-horizontal",!e.vertical)("mat-slider-axis-inverted",e._shouldInvertAxis())("mat-slider-invert-mouse-coords",e._shouldInvertMouseCoords())("mat-slider-sliding",e._isSliding)("mat-slider-thumb-label-showing",e.thumbLabel)("mat-slider-vertical",e.vertical)("mat-slider-min-value",e._isMinValue())("mat-slider-hide-last-tick",e.disabled||e._isMinValue()&&e._getThumbGap()&&e._shouldInvertAxis())("_mat-animation-noopable","NoopAnimations"===e._animationMode))},inputs:{disabled:"disabled",color:"color",tabIndex:"tabIndex",invert:"invert",max:"max",min:"min",value:"value",step:"step",thumbLabel:"thumbLabel",tickInterval:"tickInterval",vertical:"vertical",displayWith:"displayWith"},outputs:{change:"change",input:"input",valueChange:"valueChange"},exportAs:["matSlider"],features:[a.Cb([m]),a.Ab],decls:13,vars:6,consts:[[1,"mat-slider-wrapper"],["sliderWrapper",""],[1,"mat-slider-track-wrapper"],[1,"mat-slider-track-background",3,"ngStyle"],[1,"mat-slider-track-fill",3,"ngStyle"],[1,"mat-slider-ticks-container",3,"ngStyle"],[1,"mat-slider-ticks",3,"ngStyle"],[1,"mat-slider-thumb-container",3,"ngStyle"],[1,"mat-slider-focus-ring"],[1,"mat-slider-thumb"],[1,"mat-slider-thumb-label"],[1,"mat-slider-thumb-label-text"]],template:function(t,e){1&t&&(a.Wb(0,"div",0,1),a.Wb(2,"div",2),a.Rb(3,"div",3),a.Rb(4,"div",4),a.Vb(),a.Wb(5,"div",5),a.Rb(6,"div",6),a.Vb(),a.Wb(7,"div",7),a.Rb(8,"div",8),a.Rb(9,"div",9),a.Wb(10,"div",10),a.Wb(11,"span",11),a.Qc(12),a.Vb(),a.Vb(),a.Vb(),a.Vb()),2&t&&(a.Db(3),a.oc("ngStyle",e._getTrackBackgroundStyles()),a.Db(1),a.oc("ngStyle",e._getTrackFillStyles()),a.Db(1),a.oc("ngStyle",e._getTicksContainerStyles()),a.Db(1),a.oc("ngStyle",e._getTicksStyles()),a.Db(1),a.oc("ngStyle",e._getThumbContainerStyles()),a.Db(5),a.Rc(e.displayValue))},directives:[n.w],styles:['.mat-slider{display:inline-block;position:relative;box-sizing:border-box;padding:8px;outline:none;vertical-align:middle}.mat-slider:not(.mat-slider-disabled):active,.mat-slider.mat-slider-sliding:not(.mat-slider-disabled){cursor:-webkit-grabbing;cursor:grabbing}.mat-slider-wrapper{position:absolute}.mat-slider-track-wrapper{position:absolute;top:0;left:0;overflow:hidden}.mat-slider-track-fill{position:absolute;transform-origin:0 0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-track-background{position:absolute;transform-origin:100% 100%;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-ticks-container{position:absolute;left:0;top:0;overflow:hidden}.mat-slider-ticks{background-repeat:repeat;background-clip:content-box;box-sizing:border-box;opacity:0;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-thumb-container{position:absolute;z-index:1;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-focus-ring{position:absolute;width:30px;height:30px;border-radius:50%;transform:scale(0);opacity:0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider.cdk-keyboard-focused .mat-slider-focus-ring,.mat-slider.cdk-program-focused .mat-slider-focus-ring{transform:scale(1);opacity:1}.mat-slider:not(.mat-slider-disabled):not(.mat-slider-sliding) .mat-slider-thumb-label,.mat-slider:not(.mat-slider-disabled):not(.mat-slider-sliding) .mat-slider-thumb{cursor:-webkit-grab;cursor:grab}.mat-slider-thumb{position:absolute;right:-10px;bottom:-10px;box-sizing:border-box;width:20px;height:20px;border:3px solid transparent;border-radius:50%;transform:scale(0.7);transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),border-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-thumb-label{display:none;align-items:center;justify-content:center;position:absolute;width:28px;height:28px;border-radius:50%;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),border-radius 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.cdk-high-contrast-active .mat-slider-thumb-label{outline:solid 1px}.mat-slider-thumb-label-text{z-index:1;opacity:0;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-sliding .mat-slider-track-fill,.mat-slider-sliding .mat-slider-track-background,.mat-slider-sliding .mat-slider-thumb-container{transition-duration:0ms}.mat-slider-has-ticks .mat-slider-wrapper::after{content:"";position:absolute;border-width:0;border-style:solid;opacity:0;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-has-ticks.cdk-focused:not(.mat-slider-hide-last-tick) .mat-slider-wrapper::after,.mat-slider-has-ticks:hover:not(.mat-slider-hide-last-tick) .mat-slider-wrapper::after{opacity:1}.mat-slider-has-ticks.cdk-focused:not(.mat-slider-disabled) .mat-slider-ticks,.mat-slider-has-ticks:hover:not(.mat-slider-disabled) .mat-slider-ticks{opacity:1}.mat-slider-thumb-label-showing .mat-slider-focus-ring{display:none}.mat-slider-thumb-label-showing .mat-slider-thumb-label{display:flex}.mat-slider-axis-inverted .mat-slider-track-fill{transform-origin:100% 100%}.mat-slider-axis-inverted .mat-slider-track-background{transform-origin:0 0}.mat-slider:not(.mat-slider-disabled).cdk-focused.mat-slider-thumb-label-showing .mat-slider-thumb{transform:scale(0)}.mat-slider:not(.mat-slider-disabled).cdk-focused .mat-slider-thumb-label{border-radius:50% 50% 0}.mat-slider:not(.mat-slider-disabled).cdk-focused .mat-slider-thumb-label-text{opacity:1}.mat-slider:not(.mat-slider-disabled).cdk-mouse-focused .mat-slider-thumb,.mat-slider:not(.mat-slider-disabled).cdk-touch-focused .mat-slider-thumb,.mat-slider:not(.mat-slider-disabled).cdk-program-focused .mat-slider-thumb{border-width:2px;transform:scale(1)}.mat-slider-disabled .mat-slider-focus-ring{transform:scale(0);opacity:0}.mat-slider-disabled .mat-slider-thumb{border-width:4px;transform:scale(0.5)}.mat-slider-disabled .mat-slider-thumb-label{display:none}.mat-slider-horizontal{height:48px;min-width:128px}.mat-slider-horizontal .mat-slider-wrapper{height:2px;top:23px;left:8px;right:8px}.mat-slider-horizontal .mat-slider-wrapper::after{height:2px;border-left-width:2px;right:0;top:0}.mat-slider-horizontal .mat-slider-track-wrapper{height:2px;width:100%}.mat-slider-horizontal .mat-slider-track-fill{height:2px;width:100%;transform:scaleX(0)}.mat-slider-horizontal .mat-slider-track-background{height:2px;width:100%;transform:scaleX(1)}.mat-slider-horizontal .mat-slider-ticks-container{height:2px;width:100%}.cdk-high-contrast-active .mat-slider-horizontal .mat-slider-ticks-container{height:0;outline:solid 2px;top:1px}.mat-slider-horizontal .mat-slider-ticks{height:2px;width:100%}.mat-slider-horizontal .mat-slider-thumb-container{width:100%;height:0;top:50%}.mat-slider-horizontal .mat-slider-focus-ring{top:-15px;right:-15px}.mat-slider-horizontal .mat-slider-thumb-label{right:-14px;top:-40px;transform:translateY(26px) scale(0.01) rotate(45deg)}.mat-slider-horizontal .mat-slider-thumb-label-text{transform:rotate(-45deg)}.mat-slider-horizontal.cdk-focused .mat-slider-thumb-label{transform:rotate(45deg)}.cdk-high-contrast-active .mat-slider-horizontal.cdk-focused .mat-slider-thumb-label,.cdk-high-contrast-active .mat-slider-horizontal.cdk-focused .mat-slider-thumb-label-text{transform:none}.mat-slider-vertical{width:48px;min-height:128px}.mat-slider-vertical .mat-slider-wrapper{width:2px;top:8px;bottom:8px;left:23px}.mat-slider-vertical .mat-slider-wrapper::after{width:2px;border-top-width:2px;bottom:0;left:0}.mat-slider-vertical .mat-slider-track-wrapper{height:100%;width:2px}.mat-slider-vertical .mat-slider-track-fill{height:100%;width:2px;transform:scaleY(0)}.mat-slider-vertical .mat-slider-track-background{height:100%;width:2px;transform:scaleY(1)}.mat-slider-vertical .mat-slider-ticks-container{width:2px;height:100%}.cdk-high-contrast-active .mat-slider-vertical .mat-slider-ticks-container{width:0;outline:solid 2px;left:1px}.mat-slider-vertical .mat-slider-focus-ring{bottom:-15px;left:-15px}.mat-slider-vertical .mat-slider-ticks{width:2px;height:100%}.mat-slider-vertical .mat-slider-thumb-container{height:100%;width:0;left:50%}.mat-slider-vertical .mat-slider-thumb{-webkit-backface-visibility:hidden;backface-visibility:hidden}.mat-slider-vertical .mat-slider-thumb-label{bottom:-14px;left:-40px;transform:translateX(26px) scale(0.01) rotate(-45deg)}.mat-slider-vertical .mat-slider-thumb-label-text{transform:rotate(45deg)}.mat-slider-vertical.cdk-focused .mat-slider-thumb-label{transform:rotate(-45deg)}[dir=rtl] .mat-slider-wrapper::after{left:0;right:auto}[dir=rtl] .mat-slider-horizontal .mat-slider-track-fill{transform-origin:100% 100%}[dir=rtl] .mat-slider-horizontal .mat-slider-track-background{transform-origin:0 0}[dir=rtl] .mat-slider-horizontal.mat-slider-axis-inverted .mat-slider-track-fill{transform-origin:0 0}[dir=rtl] .mat-slider-horizontal.mat-slider-axis-inverted .mat-slider-track-background{transform-origin:100% 100%}.mat-slider._mat-animation-noopable .mat-slider-track-fill,.mat-slider._mat-animation-noopable .mat-slider-track-background,.mat-slider._mat-animation-noopable .mat-slider-ticks,.mat-slider._mat-animation-noopable .mat-slider-thumb-container,.mat-slider._mat-animation-noopable .mat-slider-focus-ring,.mat-slider._mat-animation-noopable .mat-slider-thumb,.mat-slider._mat-animation-noopable .mat-slider-thumb-label,.mat-slider._mat-animation-noopable .mat-slider-thumb-label-text,.mat-slider._mat-animation-noopable .mat-slider-has-ticks .mat-slider-wrapper::after{transition:none}\n'],encapsulation:2,changeDetection:0}),t})();function x(t){return"t"===t.type[0]}function C(t){const e=x(t)?t.touches[0]||t.changedTouches[0]:t;return{x:e.clientX,y:e.clientY}}let O=(()=>{class t{}return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)},imports:[[n.c,s.k],s.k]}),t})()},"5cI5":function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var n=i("fXoL");let a=(()=>{class t{constructor(){this.appSession=null}setAppSession(t){this.appSession=t}getAppSession(){return this.appSession}save(t,e){localStorage.setItem(t+"_"+this.getAppSession(),e)}get(t){return localStorage.getItem(t+"_"+this.getAppSession())}remove(t){localStorage.removeItem(t+"_"+this.getAppSession())}resetLocal(){const t=[];for(let e=0;e<localStorage.length;e++)"filtersAdmin_"===localStorage.key(e).substring(0,13)&&t.push(localStorage.key(e));for(let e=0;e<t.length;e++)localStorage.removeItem(t[e])}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()},"6Psc":function(t,e,i){"use strict";i.d(e,"a",(function(){return b}));var n=i("XNiG"),a=i("LRne"),s=i("vkgz"),o=i("nYR2"),r=i("JIr8"),c=i("fXoL"),l=i("sYmb"),d=i("tk/3"),h=i("0IaG"),u=i("AXEc"),p=i("tyNb");let b=(()=>{class t{constructor(t,e,i,a,s){this.translate=t,this.http=e,this.dialog=i,this.notify=a,this.router=s,this.loading=!0,this.pinnedFolders=[],this.folders=[],this.currentFolder={id:0},this.eventAction=new n.a}ngOnInit(){}initFolder(){this.currentFolder={id:0}}catchEvent(){return this.eventAction.asObservable()}setEvent(t){return this.eventAction.next(t)}goToFolder(t){this.setFolder(t),this.router.navigate(["/folders/"+t.id])}setFolder(t){this.currentFolder=t,this.eventAction.next(t)}getCurrentFolder(){return this.currentFolder}getFolders(){this.http.get("../rest/folders").pipe(Object(s.a)(t=>{this.folders=t.folders,this.eventAction.next({type:"initTree",content:""})}),Object(o.a)(()=>this.loading=!1),Object(r.a)(t=>(this.notify.handleErrors(t),Object(a.a)(!1)))).subscribe()}getList(){return this.folders}getPinnedFolders(){this.loading=!0,this.http.get("../rest/pinnedFolders").pipe(Object(s.a)(t=>{this.pinnedFolders=t.folders}),Object(o.a)(()=>this.loading=!1),Object(r.a)(t=>(this.notify.handleErrors(t),Object(a.a)(!1)))).subscribe()}setFolders(t){this.folders=t}getPinnedList(){return this.pinnedFolders}pinFolder(t){this.http.post(`../rest/folders/${t.id}/pin`,{}).pipe(Object(s.a)(()=>{this.getPinnedFolders(),this.eventAction.next({type:"refreshFolderPinned",content:{id:t.id,pinned:!0}}),this.notify.success(this.translate.instant("lang.folderPinned"))}),Object(r.a)(t=>(this.notify.handleErrors(t),Object(a.a)(!1)))).subscribe()}unpinFolder(t){this.http.delete(`../rest/folders/${t.id}/unpin`).pipe(Object(s.a)(()=>{this.getPinnedFolders(),this.eventAction.next({type:"refreshFolderPinned",content:{id:t.id,pinned:!1}}),this.notify.success(this.translate.instant("lang.folderUnpinned"))}),Object(r.a)(t=>(this.notify.handleErrors(t),Object(a.a)(!1)))).subscribe()}getDragIds(){const t=this.folders.map(t=>"treefolder-list-"+t.id);return this.pinnedFolders.map(t=>"folder-list-"+t.id).concat(t)}classifyDocument(t,e){this.http.post(`../rest/folders/${e.id}/resources`,{resources:[t.item.data.resId]}).pipe(Object(s.a)(t=>{void 0!==this.pinnedFolders.filter(t=>t.id===e.id)[0]&&(this.pinnedFolders.filter(t=>t.id===e.id)[0].countResources=t.countResources),this.eventAction.next({type:"refreshFolderCount",content:{id:e.id,countResources:t.countResources}})}),Object(s.a)(()=>{this.notify.success(this.translate.instant("lang.mailClassified")),this.eventAction.next({type:"function",content:"refreshDao"})}),Object(o.a)(()=>e.drag=!1),Object(r.a)(t=>(this.notify.handleErrors(t),Object(a.a)(!1)))).subscribe()}getLoader(){return this.loading}}return t.\u0275fac=function(e){return new(e||t)(c.ac(l.e),c.ac(d.b),c.ac(h.b),c.ac(u.a),c.ac(p.c))},t.\u0275prov=c.Mb({token:t,factory:t.\u0275fac}),t})()},"7+OI":function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var n=i("HDdC");function a(t){return!!t&&(t instanceof n.a||"function"==typeof t.lift&&"function"==typeof t.subscribe)}},"7EHt":function(t,e,i){"use strict";i.d(e,"a",(function(){return B})),i.d(e,"b",(function(){return $})),i.d(e,"c",(function(){return F})),i.d(e,"d",(function(){return L})),i.d(e,"e",(function(){return W})),i.d(e,"f",(function(){return N})),i.d(e,"g",(function(){return Q})),i.d(e,"h",(function(){return z}));var n=i("fXoL"),a=i("8LU1"),s=i("XNiG"),o=i("quSY"),r=i("0EQZ");let c=0;const l=new n.s("CdkAccordion");let d=(()=>{class t{constructor(){this._stateChanges=new s.a,this._openCloseAllActions=new s.a,this.id="cdk-accordion-"+c++,this._multi=!1}get multi(){return this._multi}set multi(t){this._multi=Object(a.c)(t)}openAll(){this._openCloseAll(!0)}closeAll(){this._openCloseAll(!1)}ngOnChanges(t){this._stateChanges.next(t)}ngOnDestroy(){this._stateChanges.complete()}_openCloseAll(t){this.multi&&this._openCloseAllActions.next(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["cdk-accordion"],["","cdkAccordion",""]],inputs:{multi:"multi"},exportAs:["cdkAccordion"],features:[n.Cb([{provide:l,useExisting:t}]),n.Bb]}),t})(),h=0,u=(()=>{class t{constructor(t,e,i){this.accordion=t,this._changeDetectorRef=e,this._expansionDispatcher=i,this._openCloseAllSubscription=o.a.EMPTY,this.closed=new n.o,this.opened=new n.o,this.destroyed=new n.o,this.expandedChange=new n.o,this.id="cdk-accordion-child-"+h++,this._expanded=!1,this._disabled=!1,this._removeUniqueSelectionListener=()=>{},this._removeUniqueSelectionListener=i.listen((t,e)=>{this.accordion&&!this.accordion.multi&&this.accordion.id===e&&this.id!==t&&(this.expanded=!1)}),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions())}get expanded(){return this._expanded}set expanded(t){t=Object(a.c)(t),this._expanded!==t&&(this._expanded=t,this.expandedChange.emit(t),t?(this.opened.emit(),this._expansionDispatcher.notify(this.id,this.accordion?this.accordion.id:this.id)):this.closed.emit(),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(t){this._disabled=Object(a.c)(t)}ngOnDestroy(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe()}toggle(){this.disabled||(this.expanded=!this.expanded)}close(){this.disabled||(this.expanded=!1)}open(){this.disabled||(this.expanded=!0)}_subscribeToOpenCloseAllActions(){return this.accordion._openCloseAllActions.subscribe(t=>{this.disabled||(this.expanded=t)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(l,12),n.Qb(n.h),n.Qb(r.d))},t.\u0275dir=n.Lb({type:t,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:"expanded",disabled:"disabled"},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[n.Cb([{provide:l,useValue:void 0}])]}),t})(),p=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)}}),t})();var b=i("+rOU"),f=i("ofXK"),m=i("u47x"),g=i("/uUt"),v=i("JX91"),_=i("pLZG"),y=i("IzEk"),x=i("FtGj"),C=i("R1ws"),O=i("EY2u"),D=i("VRyK"),w=i("R0Ic");const M=["body"];function k(t,e){}const S=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],I=["mat-expansion-panel-header","*","mat-action-row"];function P(t,e){if(1&t&&n.Rb(0,"span",2),2&t){const t=n.hc();n.oc("@indicatorRotate",t._getExpandedState())}}const V=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],R=["mat-panel-title","mat-panel-description","*"],j=new n.s("MAT_ACCORDION"),A={indicatorRotate:Object(w.n)("indicatorRotate",[Object(w.k)("collapsed, void",Object(w.l)({transform:"rotate(0deg)"})),Object(w.k)("expanded",Object(w.l)({transform:"rotate(180deg)"})),Object(w.m)("expanded <=> collapsed, void => collapsed",Object(w.e)("225ms cubic-bezier(0.4,0.0,0.2,1)"))]),bodyExpansion:Object(w.n)("bodyExpansion",[Object(w.k)("collapsed, void",Object(w.l)({height:"0px",visibility:"hidden"})),Object(w.k)("expanded",Object(w.l)({height:"*",visibility:"visible"})),Object(w.m)("expanded <=> collapsed, void => collapsed",Object(w.e)("225ms cubic-bezier(0.4,0.0,0.2,1)"))])};let W=(()=>{class t{constructor(t){this._template=t}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.P))},t.\u0275dir=n.Lb({type:t,selectors:[["ng-template","matExpansionPanelContent",""]]}),t})(),T=0;const E=new n.s("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let F=(()=>{class t extends u{constructor(t,e,i,a,o,r,c){super(t,e,i),this._viewContainerRef=a,this._animationMode=r,this._hideToggle=!1,this.afterExpand=new n.o,this.afterCollapse=new n.o,this._inputChanges=new s.a,this._headerId="mat-expansion-panel-header-"+T++,this._bodyAnimationDone=new s.a,this.accordion=t,this._document=o,this._bodyAnimationDone.pipe(Object(g.a)((t,e)=>t.fromState===e.fromState&&t.toState===e.toState)).subscribe(t=>{"void"!==t.fromState&&("expanded"===t.toState?this.afterExpand.emit():"collapsed"===t.toState&&this.afterCollapse.emit())}),c&&(this.hideToggle=c.hideToggle)}get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(t){this._hideToggle=Object(a.c)(t)}get togglePosition(){return this._togglePosition||this.accordion&&this.accordion.togglePosition}set togglePosition(t){this._togglePosition=t}_hasSpacing(){return!!this.accordion&&this.expanded&&"default"===this.accordion.displayMode}_getExpandedState(){return this.expanded?"expanded":"collapsed"}toggle(){this.expanded=!this.expanded}close(){this.expanded=!1}open(){this.expanded=!0}ngAfterContentInit(){this._lazyContent&&this.opened.pipe(Object(v.a)(null),Object(_.a)(()=>this.expanded&&!this._portal),Object(y.a)(1)).subscribe(()=>{this._portal=new b.i(this._lazyContent._template,this._viewContainerRef)})}ngOnChanges(t){this._inputChanges.next(t)}ngOnDestroy(){super.ngOnDestroy(),this._bodyAnimationDone.complete(),this._inputChanges.complete()}_containsFocus(){if(this._body){const t=this._document.activeElement,e=this._body.nativeElement;return t===e||e.contains(t)}return!1}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(j,12),n.Qb(n.h),n.Qb(r.d),n.Qb(n.T),n.Qb(f.e),n.Qb(C.a,8),n.Qb(E,8))},t.\u0275cmp=n.Kb({type:t,selectors:[["mat-expansion-panel"]],contentQueries:function(t,e,i){var a;1&t&&n.Jb(i,W,!0),2&t&&n.yc(a=n.ec())&&(e._lazyContent=a.first)},viewQuery:function(t,e){var i;1&t&&n.Xc(M,!0),2&t&&n.yc(i=n.ec())&&(e._body=i.first)},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(t,e){2&t&&n.Ib("mat-expanded",e.expanded)("_mat-animation-noopable","NoopAnimations"===e._animationMode)("mat-expansion-panel-spacing",e._hasSpacing())},inputs:{disabled:"disabled",expanded:"expanded",hideToggle:"hideToggle",togglePosition:"togglePosition"},outputs:{opened:"opened",closed:"closed",expandedChange:"expandedChange",afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],features:[n.Cb([{provide:j,useValue:void 0}]),n.Ab,n.Bb],ngContentSelectors:I,decls:7,vars:4,consts:[["role","region",1,"mat-expansion-panel-content",3,"id"],["body",""],[1,"mat-expansion-panel-body"],[3,"cdkPortalOutlet"]],template:function(t,e){1&t&&(n.nc(S),n.mc(0),n.Wb(1,"div",0,1),n.dc("@bodyExpansion.done",(function(t){return e._bodyAnimationDone.next(t)})),n.Wb(3,"div",2),n.mc(4,1),n.Oc(5,k,0,0,"ng-template",3),n.Vb(),n.mc(6,2),n.Vb()),2&t&&(n.Db(1),n.oc("@bodyExpansion",e._getExpandedState())("id",e.id),n.Eb("aria-labelledby",e._headerId),n.Db(4),n.oc("cdkPortalOutlet",e._portal))},directives:[b.c],styles:[".mat-expansion-panel{box-sizing:content-box;display:block;margin:0;border-radius:4px;overflow:hidden;transition:margin 225ms cubic-bezier(0.4, 0, 0.2, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);position:relative}.mat-accordion .mat-expansion-panel:not(.mat-expanded),.mat-accordion .mat-expansion-panel:not(.mat-expansion-panel-spacing){border-radius:0}.mat-accordion .mat-expansion-panel:first-of-type{border-top-right-radius:4px;border-top-left-radius:4px}.mat-accordion .mat-expansion-panel:last-of-type{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.cdk-high-contrast-active .mat-expansion-panel{outline:solid 1px}.mat-expansion-panel.ng-animate-disabled,.ng-animate-disabled .mat-expansion-panel,.mat-expansion-panel._mat-animation-noopable{transition:none}.mat-expansion-panel-content{display:flex;flex-direction:column;overflow:visible}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion>.mat-expansion-panel-spacing:first-child,.mat-accordion>*:first-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-top:0}.mat-accordion>.mat-expansion-panel-spacing:last-child,.mat-accordion>*:last-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px}.mat-action-row button.mat-button-base,.mat-action-row button.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-action-row button.mat-button-base,[dir=rtl] .mat-action-row button.mat-mdc-button-base{margin-left:0;margin-right:8px}\n"],encapsulation:2,data:{animation:[A.bodyExpansion]},changeDetection:0}),t})(),L=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["mat-action-row"]],hostAttrs:[1,"mat-action-row"]}),t})(),Q=(()=>{class t{constructor(t,e,i,n,a,s){this.panel=t,this._element=e,this._focusMonitor=i,this._changeDetectorRef=n,this._animationMode=s,this._parentChangeSubscription=o.a.EMPTY;const r=t.accordion?t.accordion._stateChanges.pipe(Object(_.a)(t=>!(!t.hideToggle&&!t.togglePosition))):O.a;this._parentChangeSubscription=Object(D.a)(t.opened,t.closed,r,t._inputChanges.pipe(Object(_.a)(t=>!!(t.hideToggle||t.disabled||t.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),t.closed.pipe(Object(_.a)(()=>t._containsFocus())).subscribe(()=>i.focusVia(e,"program")),a&&(this.expandedHeight=a.expandedHeight,this.collapsedHeight=a.collapsedHeight)}get disabled(){return this.panel.disabled}_toggle(){this.disabled||this.panel.toggle()}_isExpanded(){return this.panel.expanded}_getExpandedState(){return this.panel._getExpandedState()}_getPanelId(){return this.panel.id}_getTogglePosition(){return this.panel.togglePosition}_showToggle(){return!this.panel.hideToggle&&!this.panel.disabled}_getHeaderHeight(){const t=this._isExpanded();return t&&this.expandedHeight?this.expandedHeight:!t&&this.collapsedHeight?this.collapsedHeight:null}_keydown(t){switch(t.keyCode){case x.q:case x.g:Object(x.v)(t)||(t.preventDefault(),this._toggle());break;default:return void(this.panel.accordion&&this.panel.accordion._handleHeaderKeydown(t))}}focus(t="program",e){this._focusMonitor.focusVia(this._element,t,e)}ngAfterViewInit(){this._focusMonitor.monitor(this._element).subscribe(t=>{t&&this.panel.accordion&&this.panel.accordion._handleHeaderFocus(this)})}ngOnDestroy(){this._parentChangeSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._element)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(F,1),n.Qb(n.l),n.Qb(m.h),n.Qb(n.h),n.Qb(E,8),n.Qb(C.a,8))},t.\u0275cmp=n.Kb({type:t,selectors:[["mat-expansion-panel-header"]],hostAttrs:["role","button",1,"mat-expansion-panel-header","mat-focus-indicator"],hostVars:15,hostBindings:function(t,e){1&t&&n.dc("click",(function(){return e._toggle()}))("keydown",(function(t){return e._keydown(t)})),2&t&&(n.Eb("id",e.panel._headerId)("tabindex",e.disabled?-1:0)("aria-controls",e._getPanelId())("aria-expanded",e._isExpanded())("aria-disabled",e.panel.disabled),n.Lc("height",e._getHeaderHeight()),n.Ib("mat-expanded",e._isExpanded())("mat-expansion-toggle-indicator-after","after"===e._getTogglePosition())("mat-expansion-toggle-indicator-before","before"===e._getTogglePosition())("_mat-animation-noopable","NoopAnimations"===e._animationMode))},inputs:{expandedHeight:"expandedHeight",collapsedHeight:"collapsedHeight"},ngContentSelectors:R,decls:5,vars:1,consts:[[1,"mat-content"],["class","mat-expansion-indicator",4,"ngIf"],[1,"mat-expansion-indicator"]],template:function(t,e){1&t&&(n.nc(V),n.Wb(0,"span",0),n.mc(1),n.mc(2,1),n.mc(3,2),n.Vb(),n.Oc(4,P,1,1,"span",1)),2&t&&(n.Db(4),n.oc("ngIf",e._showToggle()))},directives:[f.t],styles:['.mat-expansion-panel-header{display:flex;flex-direction:row;align-items:center;padding:0 24px;border-radius:inherit;transition:height 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel-header._mat-animation-noopable{transition:none}.mat-expansion-panel-header:focus,.mat-expansion-panel-header:hover{outline:none}.mat-expansion-panel-header.mat-expanded:focus,.mat-expansion-panel-header.mat-expanded:hover{background:inherit}.mat-expansion-panel-header:not([aria-disabled=true]){cursor:pointer}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before{flex-direction:row-reverse}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 16px 0 0}[dir=rtl] .mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 0 0 16px}.mat-content{display:flex;flex:1;flex-direction:row;overflow:hidden}.mat-expansion-panel-header-title,.mat-expansion-panel-header-description{display:flex;flex-grow:1;margin-right:16px}[dir=rtl] .mat-expansion-panel-header-title,[dir=rtl] .mat-expansion-panel-header-description{margin-right:0;margin-left:16px}.mat-expansion-panel-header-description{flex-grow:2}.mat-expansion-indicator::after{border-style:solid;border-width:0 2px 2px 0;content:"";display:inline-block;padding:3px;transform:rotate(45deg);vertical-align:middle}\n'],encapsulation:2,data:{animation:[A.indicatorRotate]},changeDetection:0}),t})(),N=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]}),t})(),z=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),t})(),B=(()=>{class t extends d{constructor(){super(...arguments),this._ownHeaders=new n.H,this._hideToggle=!1,this.displayMode="default",this.togglePosition="after"}get hideToggle(){return this._hideToggle}set hideToggle(t){this._hideToggle=Object(a.c)(t)}ngAfterContentInit(){this._headers.changes.pipe(Object(v.a)(this._headers)).subscribe(t=>{this._ownHeaders.reset(t.filter(t=>t.panel.accordion===this)),this._ownHeaders.notifyOnChanges()}),this._keyManager=new m.g(this._ownHeaders).withWrap().withHomeAndEnd()}_handleHeaderKeydown(t){this._keyManager.onKeydown(t)}_handleHeaderFocus(t){this._keyManager.updateActiveItem(t)}}return t.\u0275fac=function(e){return U(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["mat-accordion"]],contentQueries:function(t,e,i){var a;1&t&&n.Jb(i,Q,!0),2&t&&n.yc(a=n.ec())&&(e._headers=a)},hostAttrs:[1,"mat-accordion"],hostVars:2,hostBindings:function(t,e){2&t&&n.Ib("mat-accordion-multi",e.multi)},inputs:{multi:"multi",displayMode:"displayMode",togglePosition:"togglePosition",hideToggle:"hideToggle"},exportAs:["matAccordion"],features:[n.Cb([{provide:j,useExisting:t}]),n.Ab]}),t})();const U=n.Yb(B);let $=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[f.c,p,b.h]]}),t})()},"7Hc7":function(t,e,i){"use strict";i.d(e,"a",(function(){return u}));let n=1;const a=(()=>Promise.resolve())(),s={};function o(t){return t in s&&(delete s[t],!0)}const r={setImmediate(t){const e=n++;return s[e]=!0,a.then(()=>o(e)&&t()),e},clearImmediate(t){o(t)}};var c=i("3N8a");class l extends c.a{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,i=0){return null!==i&&i>0?super.requestAsyncId(t,e,i):(t.actions.push(this),t.scheduled||(t.scheduled=r.setImmediate(t.flush.bind(t,null))))}recycleAsyncId(t,e,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(t,e,i);0===t.actions.length&&(r.clearImmediate(e),t.scheduled=void 0)}}var d=i("IjjT");class h extends d.a{flush(t){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let i,n=-1,a=e.length;t=t||e.shift();do{if(i=t.execute(t.state,t.delay))break}while(++n<a&&(t=e.shift()));if(this.active=!1,i){for(;++n<a&&(t=e.shift());)t.unsubscribe();throw i}}}const u=new h(l)},"7o/Q":function(t,e,i){"use strict";i.d(e,"a",(function(){return l}));var n=i("n6bG"),a=i("gRHU"),s=i("quSY"),o=i("2QA8"),r=i("2fFW"),c=i("NJ4a");class l extends s.a{constructor(t,e,i){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=a.a;break;case 1:if(!t){this.destination=a.a;break}if("object"==typeof t){t instanceof l?(this.syncErrorThrowable=t.syncErrorThrowable,this.destination=t,t.add(this)):(this.syncErrorThrowable=!0,this.destination=new d(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new d(this,t,e,i)}}[o.a](){return this}static create(t,e,i){const n=new l(t,e,i);return n.syncErrorThrowable=!1,n}next(t){this.isStopped||this._next(t)}error(t){this.isStopped||(this.isStopped=!0,this._error(t))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(t){this.destination.next(t)}_error(t){this.destination.error(t),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:t}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this}}class d extends l{constructor(t,e,i,s){let o;super(),this._parentSubscriber=t;let r=this;Object(n.a)(e)?o=e:e&&(o=e.next,i=e.error,s=e.complete,e!==a.a&&(r=Object.create(e),Object(n.a)(r.unsubscribe)&&this.add(r.unsubscribe.bind(r)),r.unsubscribe=this.unsubscribe.bind(this))),this._context=r,this._next=o,this._error=i,this._complete=s}next(t){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;r.a.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}}error(t){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:i}=r.a;if(this._error)i&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)i?(e.syncErrorValue=t,e.syncErrorThrown=!0):Object(c.a)(t),this.unsubscribe();else{if(this.unsubscribe(),i)throw t;Object(c.a)(t)}}}complete(){if(!this.isStopped){const{_parentSubscriber:t}=this;if(this._complete){const e=()=>this._complete.call(this._context);r.a.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(t,e){try{t.call(this._context,e)}catch(i){if(this.unsubscribe(),r.a.useDeprecatedSynchronousErrorHandling)throw i;Object(c.a)(i)}}__tryOrSetError(t,e,i){if(!r.a.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,i)}catch(n){return r.a.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=n,t.syncErrorThrown=!0,!0):(Object(c.a)(n),!0)}return!1}_unsubscribe(){const{_parentSubscriber:t}=this;this._context=null,this._parentSubscriber=null,t.unsubscribe()}}},"8LU1":function(t,e,i){"use strict";i.d(e,"a",(function(){return o})),i.d(e,"b",(function(){return r})),i.d(e,"c",(function(){return a})),i.d(e,"d",(function(){return c})),i.d(e,"e",(function(){return l})),i.d(e,"f",(function(){return s}));var n=i("fXoL");function a(t){return null!=t&&""+t!="false"}function s(t,e=0){return o(t)?Number(t):e}function o(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}function r(t){return Array.isArray(t)?t:[t]}function c(t){return null==t?"":"string"==typeof t?t:t+"px"}function l(t){return t instanceof n.l?t.nativeElement:t}},"8yBR":function(t,e,i){"use strict";i.d(e,"a",(function(){return m})),i.d(e,"b",(function(){return y})),i.d(e,"c",(function(){return M})),i.d(e,"d",(function(){return w})),i.d(e,"e",(function(){return D})),i.d(e,"f",(function(){return k})),i.d(e,"g",(function(){return p})),i.d(e,"h",(function(){return b})),i.d(e,"i",(function(){return _})),i.d(e,"j",(function(){return g})),i.d(e,"k",(function(){return C}));var n=i("FvrZ"),a=i("FKr1"),s=i("8LU1"),o=i("0EQZ"),r=i("2Vo4"),c=i("VRyK"),l=i("IzEk"),d=i("lJxs"),h=i("fXoL");const u=Object(a.F)(Object(a.C)(n.e));let p=(()=>{class t extends u{constructor(t,e,i){super(t,e),this._elementRef=t,this._tree=e,this.role="treeitem",this.tabIndex=Number(i)||0}}return t.\u0275fac=function(e){return new(e||t)(h.Qb(h.l),h.Qb(n.c),h.bc("tabindex"))},t.\u0275dir=h.Lb({type:t,selectors:[["mat-tree-node"]],hostAttrs:[1,"mat-tree-node"],hostVars:3,hostBindings:function(t,e){2&t&&h.Eb("aria-expanded",e.isExpanded)("aria-level",e.level+1)("role",e.role)},inputs:{disabled:"disabled",tabIndex:"tabIndex",role:"role"},exportAs:["matTreeNode"],features:[h.Cb([{provide:n.e,useExisting:t}]),h.Ab]}),t})(),b=(()=>{class t extends n.f{}return t.\u0275fac=function(e){return f(e||t)},t.\u0275dir=h.Lb({type:t,selectors:[["","matTreeNodeDef",""]],inputs:{when:["matTreeNodeDefWhen","when"],data:["matTreeNode","data"]},features:[h.Cb([{provide:n.f,useExisting:t}]),h.Ab]}),t})();const f=h.Yb(b);let m=(()=>{class t extends n.b{constructor(t,e,i,n){super(t,e,i),this._elementRef=t,this._tree=e,this._differs=i,this._disabled=!1,this.tabIndex=Number(n)||0}get disabled(){return this._disabled}set disabled(t){this._disabled=Object(s.c)(t)}get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(t){this._tabIndex=null!=t?t:0}ngAfterContentInit(){super.ngAfterContentInit()}ngOnDestroy(){super.ngOnDestroy()}}return t.\u0275fac=function(e){return new(e||t)(h.Qb(h.l),h.Qb(n.c),h.Qb(h.v),h.bc("tabindex"))},t.\u0275dir=h.Lb({type:t,selectors:[["mat-nested-tree-node"]],hostAttrs:[1,"mat-nested-tree-node"],hostVars:2,hostBindings:function(t,e){2&t&&h.Eb("aria-expanded",e.isExpanded)("role",e.role)},inputs:{tabIndex:"tabIndex",disabled:"disabled",node:["matNestedTreeNode","node"]},exportAs:["matNestedTreeNode"],features:[h.Cb([{provide:n.b,useExisting:t},{provide:n.e,useExisting:t},{provide:n.a,useExisting:t}]),h.Ab]}),t})(),g=(()=>{class t extends n.h{get level(){return this._level}set level(t){this._setLevelInput(t)}get indent(){return this._indent}set indent(t){this._setIndentInput(t)}}return t.\u0275fac=function(e){return v(e||t)},t.\u0275dir=h.Lb({type:t,selectors:[["","matTreeNodePadding",""]],inputs:{level:["matTreeNodePadding","level"],indent:["matTreeNodePaddingIndent","indent"]},features:[h.Cb([{provide:n.h,useExisting:t}]),h.Ab]}),t})();const v=h.Yb(g);let _=(()=>{class t{constructor(t,e){this.viewContainer=t,this._node=e}}return t.\u0275fac=function(e){return new(e||t)(h.Qb(h.T),h.Qb(n.a,8))},t.\u0275dir=h.Lb({type:t,selectors:[["","matTreeNodeOutlet",""]],features:[h.Cb([{provide:n.g,useExisting:t}])]}),t})(),y=(()=>{class t extends n.c{}return t.\u0275fac=function(e){return x(e||t)},t.\u0275cmp=h.Kb({type:t,selectors:[["mat-tree"]],viewQuery:function(t,e){var i;1&t&&h.Kc(_,!0),2&t&&h.yc(i=h.ec())&&(e._nodeOutlet=i.first)},hostAttrs:["role","tree",1,"mat-tree"],exportAs:["matTree"],features:[h.Cb([{provide:n.c,useExisting:t}]),h.Ab],decls:1,vars:0,consts:[["matTreeNodeOutlet",""]],template:function(t,e){1&t&&h.Sb(0,0)},directives:[_],styles:[".mat-tree{display:block}.mat-tree-node{display:flex;align-items:center;flex:1;word-wrap:break-word}.mat-nested-tree-node{border-bottom-width:0}\n"],encapsulation:2}),t})();const x=h.Yb(y);let C=(()=>{class t extends n.i{get recursive(){return this._recursive}set recursive(t){this._recursive=Object(s.c)(t)}}return t.\u0275fac=function(e){return O(e||t)},t.\u0275dir=h.Lb({type:t,selectors:[["","matTreeNodeToggle",""]],inputs:{recursive:["matTreeNodeToggleRecursive","recursive"]},features:[h.Cb([{provide:n.i,useExisting:t}]),h.Ab]}),t})();const O=h.Yb(C);let D=(()=>{class t{}return t.\u0275mod=h.Ob({type:t}),t.\u0275inj=h.Nb({factory:function(e){return new(e||t)},imports:[[n.d,a.k],a.k]}),t})();class w{constructor(t,e,i,n){this.transformFunction=t,this.getLevel=e,this.isExpandable=i,this.getChildren=n}_flattenNode(t,e,i,n){const a=this.transformFunction(t,e);if(i.push(a),this.isExpandable(a)){const a=this.getChildren(t);a&&(Array.isArray(a)?this._flattenChildren(a,e,i,n):a.pipe(Object(l.a)(1)).subscribe(t=>{this._flattenChildren(t,e,i,n)}))}return i}_flattenChildren(t,e,i,n){t.forEach((a,s)=>{let o=n.slice();o.push(s!=t.length-1),this._flattenNode(a,e+1,i,o)})}flattenNodes(t){let e=[];return t.forEach(t=>this._flattenNode(t,0,e,[])),e}expandFlattenedNodes(t,e){let i=[],n=[];return n[0]=!0,t.forEach(t=>{let a=!0;for(let e=0;e<=this.getLevel(t);e++)a=a&&n[e];a&&i.push(t),this.isExpandable(t)&&(n[this.getLevel(t)+1]=e.isExpanded(t))}),i}}class M extends o.b{constructor(t,e,i=[]){super(),this._treeControl=t,this._treeFlattener=e,this._flattenedData=new r.a([]),this._expandedData=new r.a([]),this._data=new r.a(i)}get data(){return this._data.value}set data(t){this._data.next(t),this._flattenedData.next(this._treeFlattener.flattenNodes(this.data)),this._treeControl.dataNodes=this._flattenedData.value}connect(t){const e=[t.viewChange,this._treeControl.expansionModel.changed,this._flattenedData];return Object(c.a)(...e).pipe(Object(d.a)(()=>(this._expandedData.next(this._treeFlattener.expandFlattenedNodes(this._flattenedData.value,this._treeControl)),this._expandedData.value)))}disconnect(){}}class k extends o.b{constructor(){super(...arguments),this._data=new r.a([])}get data(){return this._data.value}set data(t){this._data.next(t)}connect(t){return Object(c.a)(t.viewChange,this._data).pipe(Object(d.a)(()=>this.data))}disconnect(){}}},"9ppp":function(t,e,i){"use strict";i.d(e,"a",(function(){return n}));const n=(()=>{function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t})()},A5z7:function(t,e,i){"use strict";i.d(e,"a",(function(){return S})),i.d(e,"b",(function(){return M})),i.d(e,"c",(function(){return E})),i.d(e,"d",(function(){return W})),i.d(e,"e",(function(){return I})),i.d(e,"f",(function(){return k})),i.d(e,"g",(function(){return L}));var n=i("FtGj"),a=i("fXoL"),s=i("FKr1"),o=i("8LU1"),r=i("ofXK"),c=i("R1ws"),l=i("XNiG"),d=i("VRyK"),h=i("IzEk"),u=i("1G5W"),p=i("JX91"),b=i("u47x"),f=i("0EQZ"),m=i("kmnG"),g=i("nLfN"),v=i("cH1L"),_=i("3Pt+");const y=["*"],x=new a.s("MatChipRemove"),C=new a.s("MatChipAvatar"),O=new a.s("MatChipTrailingIcon");class D{constructor(t){this._elementRef=t}}const w=Object(s.F)(Object(s.A)(Object(s.B)(D),"primary"),-1);let M=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=a.Lb({type:t,selectors:[["mat-chip-avatar"],["","matChipAvatar",""]],hostAttrs:[1,"mat-chip-avatar"],features:[a.Cb([{provide:C,useExisting:t}])]}),t})(),k=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=a.Lb({type:t,selectors:[["mat-chip-trailing-icon"],["","matChipTrailingIcon",""]],hostAttrs:[1,"mat-chip-trailing-icon"],features:[a.Cb([{provide:O,useExisting:t}])]}),t})(),S=(()=>{class t extends w{constructor(t,e,i,n,o,r,c,d){super(t),this._elementRef=t,this._ngZone=e,this._changeDetectorRef=r,this._hasFocus=!1,this.chipListSelectable=!0,this._chipListMultiple=!1,this._chipListDisabled=!1,this._selected=!1,this._selectable=!0,this._disabled=!1,this._removable=!0,this._onFocus=new l.a,this._onBlur=new l.a,this.selectionChange=new a.o,this.destroyed=new a.o,this.removed=new a.o,this._addHostClassName(),this._chipRippleTarget=(d||document).createElement("div"),this._chipRippleTarget.classList.add("mat-chip-ripple"),this._elementRef.nativeElement.appendChild(this._chipRippleTarget),this._chipRipple=new s.x(this,e,this._chipRippleTarget,i),this._chipRipple.setupTriggerEvents(t),this.rippleConfig=n||{},this._animationsDisabled="NoopAnimations"===o,this.tabIndex=null!=c&&parseInt(c)||-1}get rippleDisabled(){return this.disabled||this.disableRipple||!!this.rippleConfig.disabled}get selected(){return this._selected}set selected(t){const e=Object(o.c)(t);e!==this._selected&&(this._selected=e,this._dispatchSelectionChange())}get value(){return void 0!==this._value?this._value:this._elementRef.nativeElement.textContent}set value(t){this._value=t}get selectable(){return this._selectable&&this.chipListSelectable}set selectable(t){this._selectable=Object(o.c)(t)}get disabled(){return this._chipListDisabled||this._disabled}set disabled(t){this._disabled=Object(o.c)(t)}get removable(){return this._removable}set removable(t){this._removable=Object(o.c)(t)}get ariaSelected(){return this.selectable&&(this._chipListMultiple||this.selected)?this.selected.toString():null}_addHostClassName(){const t=this._elementRef.nativeElement;t.hasAttribute("mat-basic-chip")||"mat-basic-chip"===t.tagName.toLowerCase()?t.classList.add("mat-basic-chip"):t.classList.add("mat-standard-chip")}ngOnDestroy(){this.destroyed.emit({chip:this}),this._chipRipple._removeTriggerEvents()}select(){this._selected||(this._selected=!0,this._dispatchSelectionChange(),this._markForCheck())}deselect(){this._selected&&(this._selected=!1,this._dispatchSelectionChange(),this._markForCheck())}selectViaInteraction(){this._selected||(this._selected=!0,this._dispatchSelectionChange(!0),this._markForCheck())}toggleSelected(t=!1){return this._selected=!this.selected,this._dispatchSelectionChange(t),this._markForCheck(),this.selected}focus(){this._hasFocus||(this._elementRef.nativeElement.focus(),this._onFocus.next({chip:this})),this._hasFocus=!0}remove(){this.removable&&this.removed.emit({chip:this})}_handleClick(t){this.disabled?t.preventDefault():t.stopPropagation()}_handleKeydown(t){if(!this.disabled)switch(t.keyCode){case n.d:case n.b:this.remove(),t.preventDefault();break;case n.q:this.selectable&&this.toggleSelected(!0),t.preventDefault()}}_blur(){this._ngZone.onStable.pipe(Object(h.a)(1)).subscribe(()=>{this._ngZone.run(()=>{this._hasFocus=!1,this._onBlur.next({chip:this})})})}_dispatchSelectionChange(t=!1){this.selectionChange.emit({source:this,isUserInput:t,selected:this._selected})}_markForCheck(){this._changeDetectorRef&&this._changeDetectorRef.markForCheck()}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(a.C),a.Qb(g.a),a.Qb(s.j,8),a.Qb(c.a,8),a.Qb(a.h),a.bc("tabindex"),a.Qb(r.e,8))},t.\u0275dir=a.Lb({type:t,selectors:[["mat-basic-chip"],["","mat-basic-chip",""],["mat-chip"],["","mat-chip",""]],contentQueries:function(t,e,i){var n;1&t&&(a.Jb(i,C,!0),a.Jb(i,O,!0),a.Jb(i,x,!0)),2&t&&(a.yc(n=a.ec())&&(e.avatar=n.first),a.yc(n=a.ec())&&(e.trailingIcon=n.first),a.yc(n=a.ec())&&(e.removeIcon=n.first))},hostAttrs:["role","option",1,"mat-chip","mat-focus-indicator"],hostVars:14,hostBindings:function(t,e){1&t&&a.dc("click",(function(t){return e._handleClick(t)}))("keydown",(function(t){return e._handleKeydown(t)}))("focus",(function(){return e.focus()}))("blur",(function(){return e._blur()})),2&t&&(a.Eb("tabindex",e.disabled?null:e.tabIndex)("disabled",e.disabled||null)("aria-disabled",e.disabled.toString())("aria-selected",e.ariaSelected),a.Ib("mat-chip-selected",e.selected)("mat-chip-with-avatar",e.avatar)("mat-chip-with-trailing-icon",e.trailingIcon||e.removeIcon)("mat-chip-disabled",e.disabled)("_mat-animation-noopable",e._animationsDisabled))},inputs:{color:"color",disableRipple:"disableRipple",tabIndex:"tabIndex",selected:"selected",value:"value",selectable:"selectable",disabled:"disabled",removable:"removable"},outputs:{selectionChange:"selectionChange",destroyed:"destroyed",removed:"removed"},exportAs:["matChip"],features:[a.Ab]}),t})(),I=(()=>{class t{constructor(t,e){this._parentChip=t,e&&"BUTTON"===e.nativeElement.nodeName&&e.nativeElement.setAttribute("type","button")}_handleClick(t){const e=this._parentChip;e.removable&&!e.disabled&&e.remove(),t.stopPropagation()}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(S),a.Qb(a.l))},t.\u0275dir=a.Lb({type:t,selectors:[["","matChipRemove",""]],hostAttrs:[1,"mat-chip-remove","mat-chip-trailing-icon"],hostBindings:function(t,e){1&t&&a.dc("click",(function(t){return e._handleClick(t)}))},features:[a.Cb([{provide:x,useExisting:t}])]}),t})();const P=new a.s("mat-chips-default-options");class V{constructor(t,e,i,n){this._defaultErrorStateMatcher=t,this._parentForm=e,this._parentFormGroup=i,this.ngControl=n}}const R=Object(s.D)(V);let j=0;class A{constructor(t,e){this.source=t,this.value=e}}let W=(()=>{class t extends R{constructor(t,e,i,n,s,o,r){super(o,n,s,r),this._elementRef=t,this._changeDetectorRef=e,this._dir=i,this.ngControl=r,this.controlType="mat-chip-list",this._lastDestroyedChipIndex=null,this._destroyed=new l.a,this._uid="mat-chip-list-"+j++,this._tabIndex=0,this._userTabIndex=null,this._onTouched=()=>{},this._onChange=()=>{},this._multiple=!1,this._compareWith=(t,e)=>t===e,this._required=!1,this._disabled=!1,this.ariaOrientation="horizontal",this._selectable=!0,this.change=new a.o,this.valueChange=new a.o,this.ngControl&&(this.ngControl.valueAccessor=this)}get selected(){return this.multiple?this._selectionModel.selected:this._selectionModel.selected[0]}get role(){return this.empty?null:"listbox"}get multiple(){return this._multiple}set multiple(t){this._multiple=Object(o.c)(t),this._syncChipsState()}get compareWith(){return this._compareWith}set compareWith(t){this._compareWith=t,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(t){this.writeValue(t),this._value=t}get id(){return this._chipInput?this._chipInput.id:this._uid}get required(){return this._required}set required(t){this._required=Object(o.c)(t),this.stateChanges.next()}get placeholder(){return this._chipInput?this._chipInput.placeholder:this._placeholder}set placeholder(t){this._placeholder=t,this.stateChanges.next()}get focused(){return this._chipInput&&this._chipInput.focused||this._hasFocusedChip()}get empty(){return(!this._chipInput||this._chipInput.empty)&&(!this.chips||0===this.chips.length)}get shouldLabelFloat(){return!this.empty||this.focused}get disabled(){return this.ngControl?!!this.ngControl.disabled:this._disabled}set disabled(t){this._disabled=Object(o.c)(t),this._syncChipsState()}get selectable(){return this._selectable}set selectable(t){this._selectable=Object(o.c)(t),this.chips&&this.chips.forEach(t=>t.chipListSelectable=this._selectable)}set tabIndex(t){this._userTabIndex=t,this._tabIndex=t}get chipSelectionChanges(){return Object(d.a)(...this.chips.map(t=>t.selectionChange))}get chipFocusChanges(){return Object(d.a)(...this.chips.map(t=>t._onFocus))}get chipBlurChanges(){return Object(d.a)(...this.chips.map(t=>t._onBlur))}get chipRemoveChanges(){return Object(d.a)(...this.chips.map(t=>t.destroyed))}ngAfterContentInit(){this._keyManager=new b.g(this.chips).withWrap().withVerticalOrientation().withHomeAndEnd().withHorizontalOrientation(this._dir?this._dir.value:"ltr"),this._dir&&this._dir.change.pipe(Object(u.a)(this._destroyed)).subscribe(t=>this._keyManager.withHorizontalOrientation(t)),this._keyManager.tabOut.pipe(Object(u.a)(this._destroyed)).subscribe(()=>{this._allowFocusEscape()}),this.chips.changes.pipe(Object(p.a)(null),Object(u.a)(this._destroyed)).subscribe(()=>{this.disabled&&Promise.resolve().then(()=>{this._syncChipsState()}),this._resetChips(),this._initializeSelection(),this._updateTabIndex(),this._updateFocusForDestroyedChips(),this.stateChanges.next()})}ngOnInit(){this._selectionModel=new f.c(this.multiple,void 0,!1),this.stateChanges.next()}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==this._disabled&&(this.disabled=!!this.ngControl.disabled))}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete(),this.stateChanges.complete(),this._dropSubscriptions()}registerInput(t){this._chipInput=t,this._elementRef.nativeElement.setAttribute("data-mat-chip-input",t.id)}setDescribedByIds(t){this._ariaDescribedby=t.join(" ")}writeValue(t){this.chips&&this._setSelectionByValue(t,!1)}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t,this.stateChanges.next()}onContainerClick(t){this._originatesFromChip(t)||this.focus()}focus(t){this.disabled||this._chipInput&&this._chipInput.focused||(this.chips.length>0?(this._keyManager.setFirstItemActive(),this.stateChanges.next()):(this._focusInput(t),this.stateChanges.next()))}_focusInput(t){this._chipInput&&this._chipInput.focus(t)}_keydown(t){const e=t.target;t.keyCode===n.b&&this._isInputEmpty(e)?(this._keyManager.setLastItemActive(),t.preventDefault()):e&&e.classList.contains("mat-chip")&&(this._keyManager.onKeydown(t),this.stateChanges.next())}_updateTabIndex(){this._tabIndex=this._userTabIndex||(0===this.chips.length?-1:0)}_updateFocusForDestroyedChips(){if(null!=this._lastDestroyedChipIndex)if(this.chips.length){const t=Math.min(this._lastDestroyedChipIndex,this.chips.length-1);this._keyManager.setActiveItem(t)}else this.focus();this._lastDestroyedChipIndex=null}_isValidIndex(t){return t>=0&&t<this.chips.length}_isInputEmpty(t){return!(!t||"input"!==t.nodeName.toLowerCase()||t.value)}_setSelectionByValue(t,e=!0){if(this._clearSelection(),this.chips.forEach(t=>t.deselect()),Array.isArray(t))t.forEach(t=>this._selectValue(t,e)),this._sortValues();else{const i=this._selectValue(t,e);i&&e&&this._keyManager.setActiveItem(i)}}_selectValue(t,e=!0){const i=this.chips.find(e=>null!=e.value&&this._compareWith(e.value,t));return i&&(e?i.selectViaInteraction():i.select(),this._selectionModel.select(i)),i}_initializeSelection(){Promise.resolve().then(()=>{(this.ngControl||this._value)&&(this._setSelectionByValue(this.ngControl?this.ngControl.value:this._value,!1),this.stateChanges.next())})}_clearSelection(t){this._selectionModel.clear(),this.chips.forEach(e=>{e!==t&&e.deselect()}),this.stateChanges.next()}_sortValues(){this._multiple&&(this._selectionModel.clear(),this.chips.forEach(t=>{t.selected&&this._selectionModel.select(t)}),this.stateChanges.next())}_propagateChanges(t){let e=null;e=Array.isArray(this.selected)?this.selected.map(t=>t.value):this.selected?this.selected.value:t,this._value=e,this.change.emit(new A(this,e)),this.valueChange.emit(e),this._onChange(e),this._changeDetectorRef.markForCheck()}_blur(){this._hasFocusedChip()||this._keyManager.setActiveItem(-1),this.disabled||(this._chipInput?setTimeout(()=>{this.focused||this._markAsTouched()}):this._markAsTouched())}_markAsTouched(){this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next()}_allowFocusEscape(){-1!==this._tabIndex&&(this._tabIndex=-1,setTimeout(()=>{this._tabIndex=this._userTabIndex||0,this._changeDetectorRef.markForCheck()}))}_resetChips(){this._dropSubscriptions(),this._listenToChipsFocus(),this._listenToChipsSelection(),this._listenToChipsRemoved()}_dropSubscriptions(){this._chipFocusSubscription&&(this._chipFocusSubscription.unsubscribe(),this._chipFocusSubscription=null),this._chipBlurSubscription&&(this._chipBlurSubscription.unsubscribe(),this._chipBlurSubscription=null),this._chipSelectionSubscription&&(this._chipSelectionSubscription.unsubscribe(),this._chipSelectionSubscription=null),this._chipRemoveSubscription&&(this._chipRemoveSubscription.unsubscribe(),this._chipRemoveSubscription=null)}_listenToChipsSelection(){this._chipSelectionSubscription=this.chipSelectionChanges.subscribe(t=>{t.source.selected?this._selectionModel.select(t.source):this._selectionModel.deselect(t.source),this.multiple||this.chips.forEach(t=>{!this._selectionModel.isSelected(t)&&t.selected&&t.deselect()}),t.isUserInput&&this._propagateChanges()})}_listenToChipsFocus(){this._chipFocusSubscription=this.chipFocusChanges.subscribe(t=>{let e=this.chips.toArray().indexOf(t.chip);this._isValidIndex(e)&&this._keyManager.updateActiveItem(e),this.stateChanges.next()}),this._chipBlurSubscription=this.chipBlurChanges.subscribe(()=>{this._blur(),this.stateChanges.next()})}_listenToChipsRemoved(){this._chipRemoveSubscription=this.chipRemoveChanges.subscribe(t=>{const e=t.chip,i=this.chips.toArray().indexOf(t.chip);this._isValidIndex(i)&&e._hasFocus&&(this._lastDestroyedChipIndex=i)})}_originatesFromChip(t){let e=t.target;for(;e&&e!==this._elementRef.nativeElement;){if(e.classList.contains("mat-chip"))return!0;e=e.parentElement}return!1}_hasFocusedChip(){return this.chips&&this.chips.some(t=>t._hasFocus)}_syncChipsState(){this.chips&&this.chips.forEach(t=>{t._chipListDisabled=this._disabled,t._chipListMultiple=this.multiple})}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(a.h),a.Qb(v.c,8),a.Qb(_.w,8),a.Qb(_.m,8),a.Qb(s.d),a.Qb(_.t,10))},t.\u0275cmp=a.Kb({type:t,selectors:[["mat-chip-list"]],contentQueries:function(t,e,i){var n;1&t&&a.Jb(i,S,!0),2&t&&a.yc(n=a.ec())&&(e.chips=n)},hostAttrs:[1,"mat-chip-list"],hostVars:15,hostBindings:function(t,e){1&t&&a.dc("focus",(function(){return e.focus()}))("blur",(function(){return e._blur()}))("keydown",(function(t){return e._keydown(t)})),2&t&&(a.Zb("id",e._uid),a.Eb("tabindex",e.disabled?null:e._tabIndex)("aria-describedby",e._ariaDescribedby||null)("aria-required",e.role?e.required:null)("aria-disabled",e.disabled.toString())("aria-invalid",e.errorState)("aria-multiselectable",e.multiple)("role",e.role)("aria-orientation",e.ariaOrientation),a.Ib("mat-chip-list-disabled",e.disabled)("mat-chip-list-invalid",e.errorState)("mat-chip-list-required",e.required))},inputs:{ariaOrientation:["aria-orientation","ariaOrientation"],multiple:"multiple",compareWith:"compareWith",value:"value",required:"required",placeholder:"placeholder",disabled:"disabled",selectable:"selectable",tabIndex:"tabIndex",errorStateMatcher:"errorStateMatcher"},outputs:{change:"change",valueChange:"valueChange"},exportAs:["matChipList"],features:[a.Cb([{provide:m.d,useExisting:t}]),a.Ab],ngContentSelectors:y,decls:2,vars:0,consts:[[1,"mat-chip-list-wrapper"]],template:function(t,e){1&t&&(a.nc(),a.Wb(0,"div",0),a.mc(1),a.Vb())},styles:['.mat-chip{position:relative;box-sizing:border-box;-webkit-tap-highlight-color:transparent;transform:translateZ(0);border:none;-webkit-appearance:none;-moz-appearance:none}.mat-standard-chip{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);display:inline-flex;padding:7px 12px;border-radius:16px;align-items:center;cursor:default;min-height:32px;height:1px}._mat-animation-noopable.mat-standard-chip{transition:none;animation:none}.mat-standard-chip .mat-chip-remove.mat-icon{width:18px;height:18px}.mat-standard-chip::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;opacity:0;content:"";pointer-events:none;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-standard-chip:hover::after{opacity:.12}.mat-standard-chip:focus{outline:none}.mat-standard-chip:focus::after{opacity:.16}.cdk-high-contrast-active .mat-standard-chip{outline:solid 1px}.cdk-high-contrast-active .mat-standard-chip:focus{outline:dotted 2px}.mat-standard-chip.mat-chip-disabled::after{opacity:0}.mat-standard-chip.mat-chip-disabled .mat-chip-remove,.mat-standard-chip.mat-chip-disabled .mat-chip-trailing-icon{cursor:default}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar,.mat-standard-chip.mat-chip-with-avatar{padding-top:0;padding-bottom:0}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-right:8px;padding-left:0}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-left:8px;padding-right:0}.mat-standard-chip.mat-chip-with-trailing-icon{padding-top:7px;padding-bottom:7px;padding-right:8px;padding-left:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon{padding-left:8px;padding-right:12px}.mat-standard-chip.mat-chip-with-avatar{padding-left:0;padding-right:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-avatar{padding-right:0;padding-left:12px}.mat-standard-chip .mat-chip-avatar{width:24px;height:24px;margin-right:8px;margin-left:4px}[dir=rtl] .mat-standard-chip .mat-chip-avatar{margin-left:8px;margin-right:4px}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{width:18px;height:18px;cursor:pointer}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-standard-chip .mat-chip-remove,[dir=rtl] .mat-standard-chip .mat-chip-trailing-icon{margin-right:8px;margin-left:0}.mat-chip-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit;overflow:hidden}.mat-chip-list-wrapper{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;margin:-4px}.mat-chip-list-wrapper input.mat-input-element,.mat-chip-list-wrapper .mat-standard-chip{margin:4px}.mat-chip-list-stacked .mat-chip-list-wrapper{flex-direction:column;align-items:flex-start}.mat-chip-list-stacked .mat-chip-list-wrapper .mat-standard-chip{width:100%}.mat-chip-avatar{border-radius:50%;justify-content:center;align-items:center;display:flex;overflow:hidden;object-fit:cover}input.mat-chip-input{width:150px;margin:4px;flex:1 0 150px}\n'],encapsulation:2,changeDetection:0}),t})(),T=0,E=(()=>{class t{constructor(t,e){this._elementRef=t,this._defaultOptions=e,this.focused=!1,this._addOnBlur=!1,this.separatorKeyCodes=this._defaultOptions.separatorKeyCodes,this.chipEnd=new a.o,this.placeholder="",this.id="mat-chip-list-input-"+T++,this._disabled=!1,this._inputElement=this._elementRef.nativeElement}set chipList(t){t&&(this._chipList=t,this._chipList.registerInput(this))}get addOnBlur(){return this._addOnBlur}set addOnBlur(t){this._addOnBlur=Object(o.c)(t)}get disabled(){return this._disabled||this._chipList&&this._chipList.disabled}set disabled(t){this._disabled=Object(o.c)(t)}get empty(){return!this._inputElement.value}ngOnChanges(){this._chipList.stateChanges.next()}_keydown(t){t&&t.keyCode===n.r&&!Object(n.v)(t,"shiftKey")&&this._chipList._allowFocusEscape(),this._emitChipEnd(t)}_blur(){this.addOnBlur&&this._emitChipEnd(),this.focused=!1,this._chipList.focused||this._chipList._blur(),this._chipList.stateChanges.next()}_focus(){this.focused=!0,this._chipList.stateChanges.next()}_emitChipEnd(t){!this._inputElement.value&&t&&this._chipList._keydown(t),t&&!this._isSeparatorKey(t)||(this.chipEnd.emit({input:this._inputElement,value:this._inputElement.value}),t&&t.preventDefault())}_onInput(){this._chipList.stateChanges.next()}focus(t){this._inputElement.focus(t)}_isSeparatorKey(t){return!Object(n.v)(t)&&new Set(this.separatorKeyCodes).has(t.keyCode)}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(P))},t.\u0275dir=a.Lb({type:t,selectors:[["input","matChipInputFor",""]],hostAttrs:[1,"mat-chip-input","mat-input-element"],hostVars:5,hostBindings:function(t,e){1&t&&a.dc("keydown",(function(t){return e._keydown(t)}))("blur",(function(){return e._blur()}))("focus",(function(){return e._focus()}))("input",(function(){return e._onInput()})),2&t&&(a.Zb("id",e.id),a.Eb("disabled",e.disabled||null)("placeholder",e.placeholder||null)("aria-invalid",e._chipList&&e._chipList.ngControl?e._chipList.ngControl.invalid:null)("aria-required",e._chipList&&e._chipList.required||null))},inputs:{separatorKeyCodes:["matChipInputSeparatorKeyCodes","separatorKeyCodes"],placeholder:"placeholder",id:"id",chipList:["matChipInputFor","chipList"],addOnBlur:["matChipInputAddOnBlur","addOnBlur"],disabled:"disabled"},outputs:{chipEnd:"matChipInputTokenEnd"},exportAs:["matChipInput","matChipInputFor"],features:[a.Bb]}),t})();const F={separatorKeyCodes:[n.g]};let L=(()=>{class t{}return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)},providers:[s.d,{provide:P,useValue:F}]}),t})()},A6w4:function(t,e,i){"use strict";i.d(e,"a",(function(){return l}));var n=i("fXoL"),a=i("sYmb"),s=i("tk/3"),o=i("AXEc"),r=i("uqn4"),c=i("0IaG");let l=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.authService=n,this.dialog=a,this.screenWidth=1920}getViewMode(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||this.screenWidth<=768}setScreenWidth(t){this.screenWidth=t}}return t.\u0275fac=function(e){return new(e||t)(n.ac(a.e),n.ac(s.b),n.ac(o.a),n.ac(r.a),n.ac(c.b))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()},AXEc:function(t,e,i){"use strict";i.d(e,"a",(function(){return c}));var n=i("dNgK"),a=i("fXoL"),s=i("sYmb"),o=i("tyNb");let r=(()=>{class t{constructor(t){this.data=t}dismiss(){this.data.close()}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(n.a))},t.\u0275cmp=a.Kb({type:t,selectors:[["custom-snackbar"]],decls:7,vars:5,consts:[[1,"notif-container",3,"click"],[1,"notif-container-icon"],[1,"notif-container-content"],[1,"notif-container-content-msg"],[3,"innerHTML"]],template:function(t,e){1&t&&(a.Wb(0,"div",0),a.dc("click",(function(){return e.dismiss()})),a.Wb(1,"div",1),a.Rb(2,"i"),a.Vb(),a.Wb(3,"div",2),a.Wb(4,"div",3),a.Rb(5,"div",4),a.Rb(6,"div",4),a.Vb(),a.Vb(),a.Vb()),2&t&&(a.Db(2),a.Gb("fa fa-",e.data.icon," fa-2x"),a.Db(3),a.oc("innerHTML",e.data.url,a.Ec),a.Db(1),a.oc("innerHTML",e.data.message,a.Ec))},styles:[".notif-container[_ngcontent-%COMP%]{display:flex;align-items:center;padding-top:25px;padding-bottom:25px;cursor:pointer}.notif-container-icon[_ngcontent-%COMP%]{display:flex;width:50px;justify-content:center}.notif-container-content[_ngcontent-%COMP%]{display:flex;flex:1;justify-content:center}.notif-container-content-msg[_ngcontent-%COMP%]{display:flex;flex-direction:column} .mat-snack-bar-container.error-snackbar{color:#8e3e52;background:#fff;border:1px solid #8e3e52} .mat-snack-bar-container.success-snackbar{color:#135f7f;background:#fff;border:1px solid #135f7f}"]}),t})(),c=(()=>{class t{constructor(t,e,i){this.translate=t,this.router=e,this.snackBar=i}success(t){const e=this.getMessageDuration(t,2e3),i=this.snackBar.openFromComponent(r,{duration:e,panelClass:"success-snackbar",verticalPosition:"top",data:{message:t,icon:"info-circle",close:()=>{i.dismiss()}}})}error(t,e=null){const i=this.getMessageDuration(t,4e3),n=this.snackBar.openFromComponent(r,{duration:i,panelClass:"error-snackbar",verticalPosition:"top",data:{url:e,message:t,icon:"exclamation-triangle",close:()=>{n.dismiss()}}})}handleErrors(t){console.log(t),0===t.status&&"Unknown Error"===t.statusText?this.error(this.translate.instant("lang.connectionFailed")):void 0!==t.error?void 0!==t.error.errors?(void 0!==t.error.lang?this.error(this.translate.instant("lang."+t.error.lang)):"Document out of perimeter"===t.error.errors||"Resource out of perimeter"===t.error.errors?this.error(this.translate.instant("lang.documentOutOfPerimeter")):"Resources out of perimeter"===t.error.errors?this.error(this.translate.instant("lang.documentsOutOfPerimeter")):this.error(t.error.errors,t.url),403!==t.status&&404!==t.status||this.router.navigate(["/home"])):this.error(void 0!==t.error.exception?t.error.exception[0].message:void 0!==t.error.error?void 0!==t.error.error[0]?t.error.error[0].message:t.error.error.message:`${t.status} : ${t.statusText}`,t.url):this.error(t)}handleSoftErrors(t){console.log(t),void 0!==t.error?void 0!==t.error.errors?void 0!==t.error.lang?this.error(this.translate.instant("lang."+t.error.lang)):"Document out of perimeter"===t.error.errors||"Resource out of perimeter"===t.error.errors?this.error(this.translate.instant("lang.documentOutOfPerimeter")):"Resources out of perimeter"===t.error.errors?this.error(this.translate.instant("lang.documentsOutOfPerimeter")):this.error(t.error.errors,t.url):this.error(void 0!==t.error.exception?t.error.exception[0].message:void 0!==t.error.error?void 0!==t.error.error[0]?t.error.error[0].message:t.error.error.message:`${t.status} : ${t.statusText}`,t.url):this.error(t)}getMessageDuration(t,e){const i=t.length/25*1e3;return i<e?e:i>1e4?1e4:i}}return t.\u0275fac=function(e){return new(e||t)(a.ac(s.e),a.ac(o.c),a.ac(n.b))},t.\u0275prov=a.Mb({token:t,factory:t.\u0275fac}),t})()},"B/XX":function(t,e,i){"use strict";i.d(e,"a",(function(){return _})),i.d(e,"b",(function(){return f})),i.d(e,"c",(function(){return m})),i.d(e,"d",(function(){return y})),i.d(e,"e",(function(){return O})),i.d(e,"f",(function(){return x})),i.d(e,"g",(function(){return C})),i.d(e,"h",(function(){return v}));var n=i("u47x"),a=i("cH1L"),s=i("8LU1"),o=i("FtGj"),r=i("ofXK"),c=i("fXoL"),l=i("XNiG"),d=i("LRne"),h=i("JX91"),u=i("1G5W");function p(t,e){1&t&&c.mc(0)}const b=["*"];let f=(()=>{class t{constructor(t){this._elementRef=t}focus(){this._elementRef.nativeElement.focus()}}return t.\u0275fac=function(e){return new(e||t)(c.Qb(c.l))},t.\u0275dir=c.Lb({type:t,selectors:[["","cdkStepHeader",""]],hostAttrs:["role","tab"]}),t})(),m=(()=>{class t{constructor(t){this.template=t}}return t.\u0275fac=function(e){return new(e||t)(c.Qb(c.P))},t.\u0275dir=c.Lb({type:t,selectors:[["","cdkStepLabel",""]]}),t})(),g=0;const v=new c.s("STEPPER_GLOBAL_OPTIONS");let _=(()=>{class t{constructor(t,e){this._stepper=t,this.interacted=!1,this._editable=!0,this._optional=!1,this._completedOverride=null,this._customError=null,this._stepperOptions=e||{},this._displayDefaultIndicatorType=!1!==this._stepperOptions.displayDefaultIndicatorType,this._showError=!!this._stepperOptions.showError}get editable(){return this._editable}set editable(t){this._editable=Object(s.c)(t)}get optional(){return this._optional}set optional(t){this._optional=Object(s.c)(t)}get completed(){return null==this._completedOverride?this._getDefaultCompleted():this._completedOverride}set completed(t){this._completedOverride=Object(s.c)(t)}_getDefaultCompleted(){return this.stepControl?this.stepControl.valid&&this.interacted:this.interacted}get hasError(){return null==this._customError?this._getDefaultError():this._customError}set hasError(t){this._customError=Object(s.c)(t)}_getDefaultError(){return this.stepControl&&this.stepControl.invalid&&this.interacted}select(){this._stepper.selected=this}reset(){this.interacted=!1,null!=this._completedOverride&&(this._completedOverride=!1),null!=this._customError&&(this._customError=!1),this.stepControl&&this.stepControl.reset()}ngOnChanges(){this._stepper._stateChanged()}}return t.\u0275fac=function(e){return new(e||t)(c.Qb(Object(c.X)(()=>y)),c.Qb(v,8))},t.\u0275cmp=c.Kb({type:t,selectors:[["cdk-step"]],contentQueries:function(t,e,i){var n;1&t&&c.Jb(i,m,!0),2&t&&c.yc(n=c.ec())&&(e.stepLabel=n.first)},viewQuery:function(t,e){var i;1&t&&c.Kc(c.P,!0),2&t&&c.yc(i=c.ec())&&(e.content=i.first)},inputs:{editable:"editable",optional:"optional",completed:"completed",hasError:"hasError",stepControl:"stepControl",label:"label",errorMessage:"errorMessage",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],state:"state"},exportAs:["cdkStep"],features:[c.Bb],ngContentSelectors:b,decls:1,vars:0,template:function(t,e){1&t&&(c.nc(),c.Oc(0,p,1,0,"ng-template"))},encapsulation:2,changeDetection:0}),t})(),y=(()=>{class t{constructor(t,e,i,n){this._dir=t,this._changeDetectorRef=e,this._elementRef=i,this._destroyed=new l.a,this.steps=new c.H,this._linear=!1,this._selectedIndex=0,this.selectionChange=new c.o,this._orientation="horizontal",this._groupId=g++,this._document=n}get linear(){return this._linear}set linear(t){this._linear=Object(s.c)(t)}get selectedIndex(){return this._selectedIndex}set selectedIndex(t){const e=Object(s.f)(t);this.steps&&this._steps?this._selectedIndex!=e&&!this._anyControlsInvalidOrPending(e)&&(e>=this._selectedIndex||this.steps.toArray()[e].editable)&&this._updateSelectedItemIndex(t):this._selectedIndex=e}get selected(){return this.steps?this.steps.toArray()[this.selectedIndex]:void 0}set selected(t){this.selectedIndex=this.steps?this.steps.toArray().indexOf(t):-1}ngAfterContentInit(){this._steps.changes.pipe(Object(h.a)(this._steps),Object(u.a)(this._destroyed)).subscribe(t=>{this.steps.reset(t.filter(t=>t._stepper===this)),this.steps.notifyOnChanges()})}ngAfterViewInit(){this._keyManager=new n.g(this._stepHeader).withWrap().withHomeAndEnd().withVerticalOrientation("vertical"===this._orientation),(this._dir?this._dir.change:Object(d.a)()).pipe(Object(h.a)(this._layoutDirection()),Object(u.a)(this._destroyed)).subscribe(t=>this._keyManager.withHorizontalOrientation(t)),this._keyManager.updateActiveItem(this._selectedIndex),this.steps.changes.subscribe(()=>{this.selected||(this._selectedIndex=Math.max(this._selectedIndex-1,0))})}ngOnDestroy(){this.steps.destroy(),this._destroyed.next(),this._destroyed.complete()}next(){this.selectedIndex=Math.min(this._selectedIndex+1,this.steps.length-1)}previous(){this.selectedIndex=Math.max(this._selectedIndex-1,0)}reset(){this._updateSelectedItemIndex(0),this.steps.forEach(t=>t.reset()),this._stateChanged()}_getStepLabelId(t){return`cdk-step-label-${this._groupId}-${t}`}_getStepContentId(t){return`cdk-step-content-${this._groupId}-${t}`}_stateChanged(){this._changeDetectorRef.markForCheck()}_getAnimationDirection(t){const e=t-this._selectedIndex;return e<0?"rtl"===this._layoutDirection()?"next":"previous":e>0?"rtl"===this._layoutDirection()?"previous":"next":"current"}_getIndicatorType(t,e="number"){const i=this.steps.toArray()[t],n=this._isCurrentStep(t);return i._displayDefaultIndicatorType?this._getDefaultIndicatorLogic(i,n):this._getGuidelineLogic(i,n,e)}_getDefaultIndicatorLogic(t,e){return t._showError&&t.hasError&&!e?"error":!t.completed||e?"number":t.editable?"edit":"done"}_getGuidelineLogic(t,e,i="number"){return t._showError&&t.hasError&&!e?"error":t.completed&&!e?"done":t.completed&&e?i:t.editable&&e?"edit":i}_isCurrentStep(t){return this._selectedIndex===t}_getFocusIndex(){return this._keyManager?this._keyManager.activeItemIndex:this._selectedIndex}_updateSelectedItemIndex(t){const e=this.steps.toArray();this.selectionChange.emit({selectedIndex:t,previouslySelectedIndex:this._selectedIndex,selectedStep:e[t],previouslySelectedStep:e[this._selectedIndex]}),this._containsFocus()?this._keyManager.setActiveItem(t):this._keyManager.updateActiveItem(t),this._selectedIndex=t,this._stateChanged()}_onKeydown(t){const e=Object(o.v)(t),i=t.keyCode,n=this._keyManager;null==n.activeItemIndex||e||i!==o.q&&i!==o.g?n.onKeydown(t):(this.selectedIndex=n.activeItemIndex,t.preventDefault())}_anyControlsInvalidOrPending(t){const e=this.steps.toArray();return e[this._selectedIndex].interacted=!0,!!(this._linear&&t>=0)&&e.slice(0,t).some(t=>{const e=t.stepControl;return(e?e.invalid||e.pending||!t.interacted:!t.completed)&&!t.optional&&!t._completedOverride})}_layoutDirection(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}_containsFocus(){if(!this._document||!this._elementRef)return!1;const t=this._elementRef.nativeElement,e=this._document.activeElement;return t===e||t.contains(e)}}return t.\u0275fac=function(e){return new(e||t)(c.Qb(a.c,8),c.Qb(c.h),c.Qb(c.l),c.Qb(r.e))},t.\u0275dir=c.Lb({type:t,selectors:[["","cdkStepper",""]],contentQueries:function(t,e,i){var n;1&t&&(c.Jb(i,_,!0),c.Jb(i,f,!0)),2&t&&(c.yc(n=c.ec())&&(e._steps=n),c.yc(n=c.ec())&&(e._stepHeader=n))},inputs:{linear:"linear",selectedIndex:"selectedIndex",selected:"selected"},outputs:{selectionChange:"selectionChange"},exportAs:["cdkStepper"]}),t})(),x=(()=>{class t{constructor(t){this._stepper=t,this.type="submit"}_handleClick(){this._stepper.next()}}return t.\u0275fac=function(e){return new(e||t)(c.Qb(y))},t.\u0275dir=c.Lb({type:t,selectors:[["button","cdkStepperNext",""]],hostVars:1,hostBindings:function(t,e){1&t&&c.dc("click",(function(){return e._handleClick()})),2&t&&c.Zb("type",e.type)},inputs:{type:"type"}}),t})(),C=(()=>{class t{constructor(t){this._stepper=t,this.type="button"}_handleClick(){this._stepper.previous()}}return t.\u0275fac=function(e){return new(e||t)(c.Qb(y))},t.\u0275dir=c.Lb({type:t,selectors:[["button","cdkStepperPrevious",""]],hostVars:1,hostBindings:function(t,e){1&t&&c.dc("click",(function(){return e._handleClick()})),2&t&&c.Zb("type",e.type)},inputs:{type:"type"}}),t})(),O=(()=>{class t{}return t.\u0275mod=c.Ob({type:t}),t.\u0275inj=c.Nb({factory:function(e){return new(e||t)},imports:[[a.a]]}),t})()},Cfvw:function(t,e,i){"use strict";i.d(e,"a",(function(){return h}));var n=i("HDdC"),a=i("SeVD"),s=i("quSY"),o=i("kJWO"),r=i("jZKg"),c=i("Lhse"),l=i("c2HN"),d=i("I55L");function h(t,e){return e?function(t,e){if(null!=t){if(function(t){return t&&"function"==typeof t[o.a]}(t))return function(t,e){return new n.a(i=>{const n=new s.a;return n.add(e.schedule(()=>{const a=t[o.a]();n.add(a.subscribe({next(t){n.add(e.schedule(()=>i.next(t)))},error(t){n.add(e.schedule(()=>i.error(t)))},complete(){n.add(e.schedule(()=>i.complete()))}}))})),n})}(t,e);if(Object(l.a)(t))return function(t,e){return new n.a(i=>{const n=new s.a;return n.add(e.schedule(()=>t.then(t=>{n.add(e.schedule(()=>{i.next(t),n.add(e.schedule(()=>i.complete()))}))},t=>{n.add(e.schedule(()=>i.error(t)))}))),n})}(t,e);if(Object(d.a)(t))return Object(r.a)(t,e);if(function(t){return t&&"function"==typeof t[c.a]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new n.a(i=>{const n=new s.a;let a;return n.add(()=>{a&&"function"==typeof a.return&&a.return()}),n.add(e.schedule(()=>{a=t[c.a](),n.add(e.schedule((function(){if(i.closed)return;let t,e;try{const i=a.next();t=i.value,e=i.done}catch(n){return void i.error(n)}e?i.complete():(i.next(t),this.schedule())})))})),n})}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}(t,e):t instanceof n.a?t:new n.a(Object(a.a)(t))}},D0XW:function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var n=i("3N8a");const a=new(i("IjjT").a)(n.a)},DH7j:function(t,e,i){"use strict";i.d(e,"a",(function(){return n}));const n=(()=>Array.isArray||(t=>t&&"number"==typeof t.length))()},Dh3D:function(t,e,i){"use strict";i.d(e,"a",(function(){return g})),i.d(e,"b",(function(){return w})),i.d(e,"c",(function(){return M}));var n=i("fXoL"),a=i("8LU1"),s=i("FKr1"),o=i("FtGj"),r=i("XNiG"),c=i("VRyK"),l=i("R0Ic"),d=i("ofXK"),h=i("u47x");const u=["mat-sort-header",""];function p(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",3),n.dc("@arrowPosition.start",(function(){return n.Dc(t),n.hc()._disableViewStateAnimation=!0}))("@arrowPosition.done",(function(){return n.Dc(t),n.hc()._disableViewStateAnimation=!1})),n.Rb(1,"div",4),n.Wb(2,"div",5),n.Rb(3,"div",6),n.Rb(4,"div",7),n.Rb(5,"div",8),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.oc("@arrowOpacity",t._getArrowViewState())("@arrowPosition",t._getArrowViewState())("@allowChildren",t._getArrowDirectionState()),n.Db(2),n.oc("@indicator",t._getArrowDirectionState()),n.Db(1),n.oc("@leftPointer",t._getArrowDirectionState()),n.Db(1),n.oc("@rightPointer",t._getArrowDirectionState())}}const b=["*"];class f{}const m=Object(s.E)(Object(s.C)(f));let g=(()=>{class t extends m{constructor(){super(...arguments),this.sortables=new Map,this._stateChanges=new r.a,this.start="asc",this._direction="",this.sortChange=new n.o}get direction(){return this._direction}set direction(t){this._direction=t}get disableClear(){return this._disableClear}set disableClear(t){this._disableClear=Object(a.c)(t)}register(t){this.sortables.set(t.id,t)}deregister(t){this.sortables.delete(t.id)}sort(t){this.active!=t.id?(this.active=t.id,this.direction=t.start?t.start:this.start):this.direction=this.getNextSortDirection(t),this.sortChange.emit({active:this.active,direction:this.direction})}getNextSortDirection(t){if(!t)return"";let e=function(t,e){let i=["asc","desc"];return"desc"==t&&i.reverse(),e||i.push(""),i}(t.start||this.start,null!=t.disableClear?t.disableClear:this.disableClear),i=e.indexOf(this.direction)+1;return i>=e.length&&(i=0),e[i]}ngOnInit(){this._markInitialized()}ngOnChanges(){this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}}return t.\u0275fac=function(e){return v(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["","matSort",""]],hostAttrs:[1,"mat-sort"],inputs:{disabled:["matSortDisabled","disabled"],start:["matSortStart","start"],direction:["matSortDirection","direction"],disableClear:["matSortDisableClear","disableClear"],active:["matSortActive","active"]},outputs:{sortChange:"matSortChange"},exportAs:["matSort"],features:[n.Ab,n.Bb]}),t})();const v=n.Yb(g),_=s.b.ENTERING+" "+s.a.STANDARD_CURVE,y={indicator:Object(l.n)("indicator",[Object(l.k)("active-asc, asc",Object(l.l)({transform:"translateY(0px)"})),Object(l.k)("active-desc, desc",Object(l.l)({transform:"translateY(10px)"})),Object(l.m)("active-asc <=> active-desc",Object(l.e)(_))]),leftPointer:Object(l.n)("leftPointer",[Object(l.k)("active-asc, asc",Object(l.l)({transform:"rotate(-45deg)"})),Object(l.k)("active-desc, desc",Object(l.l)({transform:"rotate(45deg)"})),Object(l.m)("active-asc <=> active-desc",Object(l.e)(_))]),rightPointer:Object(l.n)("rightPointer",[Object(l.k)("active-asc, asc",Object(l.l)({transform:"rotate(45deg)"})),Object(l.k)("active-desc, desc",Object(l.l)({transform:"rotate(-45deg)"})),Object(l.m)("active-asc <=> active-desc",Object(l.e)(_))]),arrowOpacity:Object(l.n)("arrowOpacity",[Object(l.k)("desc-to-active, asc-to-active, active",Object(l.l)({opacity:1})),Object(l.k)("desc-to-hint, asc-to-hint, hint",Object(l.l)({opacity:.54})),Object(l.k)("hint-to-desc, active-to-desc, desc, hint-to-asc, active-to-asc, asc, void",Object(l.l)({opacity:0})),Object(l.m)("* => asc, * => desc, * => active, * => hint, * => void",Object(l.e)("0ms")),Object(l.m)("* <=> *",Object(l.e)(_))]),arrowPosition:Object(l.n)("arrowPosition",[Object(l.m)("* => desc-to-hint, * => desc-to-active",Object(l.e)(_,Object(l.h)([Object(l.l)({transform:"translateY(-25%)"}),Object(l.l)({transform:"translateY(0)"})]))),Object(l.m)("* => hint-to-desc, * => active-to-desc",Object(l.e)(_,Object(l.h)([Object(l.l)({transform:"translateY(0)"}),Object(l.l)({transform:"translateY(25%)"})]))),Object(l.m)("* => asc-to-hint, * => asc-to-active",Object(l.e)(_,Object(l.h)([Object(l.l)({transform:"translateY(25%)"}),Object(l.l)({transform:"translateY(0)"})]))),Object(l.m)("* => hint-to-asc, * => active-to-asc",Object(l.e)(_,Object(l.h)([Object(l.l)({transform:"translateY(0)"}),Object(l.l)({transform:"translateY(-25%)"})]))),Object(l.k)("desc-to-hint, asc-to-hint, hint, desc-to-active, asc-to-active, active",Object(l.l)({transform:"translateY(0)"})),Object(l.k)("hint-to-desc, active-to-desc, desc",Object(l.l)({transform:"translateY(-25%)"})),Object(l.k)("hint-to-asc, active-to-asc, asc",Object(l.l)({transform:"translateY(25%)"}))]),allowChildren:Object(l.n)("allowChildren",[Object(l.m)("* <=> *",[Object(l.i)("@*",Object(l.f)(),{optional:!0})])])};let x=(()=>{class t{constructor(){this.changes=new r.a,this.sortButtonLabel=t=>"Change sorting for "+t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(n.Mb)({factory:function(){return new t},token:t,providedIn:"root"}),t})();const C={provide:x,deps:[[new n.D,new n.N,x]],useFactory:function(t){return t||new x}};class O{}const D=Object(s.C)(O);let w=(()=>{class t extends D{constructor(t,e,i,n,a,s){super(),this._intl=t,this._sort=i,this._columnDef=n,this._focusMonitor=a,this._elementRef=s,this._showIndicatorHint=!1,this._arrowDirection="",this._disableViewStateAnimation=!1,this.arrowPosition="after",this._rerenderSubscription=Object(c.a)(i.sortChange,i._stateChanges,t.changes).subscribe(()=>{this._isSorted()&&this._updateArrowDirection(),!this._isSorted()&&this._viewState&&"active"===this._viewState.toState&&(this._disableViewStateAnimation=!1,this._setAnimationTransitionState({fromState:"active",toState:this._arrowDirection})),e.markForCheck()})}get disableClear(){return this._disableClear}set disableClear(t){this._disableClear=Object(a.c)(t)}ngOnInit(){!this.id&&this._columnDef&&(this.id=this._columnDef.name),this._updateArrowDirection(),this._setAnimationTransitionState({toState:this._isSorted()?"active":this._arrowDirection}),this._sort.register(this)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>this._setIndicatorHintVisible(!!t))}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._sort.deregister(this),this._rerenderSubscription.unsubscribe()}_setIndicatorHintVisible(t){this._isDisabled()&&t||(this._showIndicatorHint=t,this._isSorted()||(this._updateArrowDirection(),this._setAnimationTransitionState(this._showIndicatorHint?{fromState:this._arrowDirection,toState:"hint"}:{fromState:"hint",toState:this._arrowDirection})))}_setAnimationTransitionState(t){this._viewState=t,this._disableViewStateAnimation&&(this._viewState={toState:t.toState})}_toggleOnInteraction(){this._sort.sort(this),"hint"!==this._viewState.toState&&"active"!==this._viewState.toState||(this._disableViewStateAnimation=!0);const t=this._isSorted()?{fromState:this._arrowDirection,toState:"active"}:{fromState:"active",toState:this._arrowDirection};this._setAnimationTransitionState(t),this._showIndicatorHint=!1}_handleClick(){this._isDisabled()||this._toggleOnInteraction()}_handleKeydown(t){this._isDisabled()||t.keyCode!==o.q&&t.keyCode!==o.g||(t.preventDefault(),this._toggleOnInteraction())}_isSorted(){return this._sort.active==this.id&&("asc"===this._sort.direction||"desc"===this._sort.direction)}_getArrowDirectionState(){return`${this._isSorted()?"active-":""}${this._arrowDirection}`}_getArrowViewState(){const t=this._viewState.fromState;return(t?t+"-to-":"")+this._viewState.toState}_updateArrowDirection(){this._arrowDirection=this._isSorted()?this._sort.direction:this.start||this._sort.start}_isDisabled(){return this._sort.disabled||this.disabled}_getAriaSortAttribute(){return this._isSorted()?"asc"==this._sort.direction?"ascending":"descending":"none"}_renderArrow(){return!this._isDisabled()||this._isSorted()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(x),n.Qb(n.h),n.Qb(g,8),n.Qb("MAT_SORT_HEADER_COLUMN_DEF",8),n.Qb(h.h),n.Qb(n.l))},t.\u0275cmp=n.Kb({type:t,selectors:[["","mat-sort-header",""]],hostAttrs:[1,"mat-sort-header"],hostVars:3,hostBindings:function(t,e){1&t&&n.dc("click",(function(){return e._handleClick()}))("keydown",(function(t){return e._handleKeydown(t)}))("mouseenter",(function(){return e._setIndicatorHintVisible(!0)}))("mouseleave",(function(){return e._setIndicatorHintVisible(!1)})),2&t&&(n.Eb("aria-sort",e._getAriaSortAttribute()),n.Ib("mat-sort-header-disabled",e._isDisabled()))},inputs:{disabled:"disabled",arrowPosition:"arrowPosition",disableClear:"disableClear",id:["mat-sort-header","id"],start:"start"},exportAs:["matSortHeader"],features:[n.Ab],attrs:u,ngContentSelectors:b,decls:4,vars:6,consts:[["role","button",1,"mat-sort-header-container","mat-focus-indicator"],[1,"mat-sort-header-content"],["class","mat-sort-header-arrow",4,"ngIf"],[1,"mat-sort-header-arrow"],[1,"mat-sort-header-stem"],[1,"mat-sort-header-indicator"],[1,"mat-sort-header-pointer-left"],[1,"mat-sort-header-pointer-right"],[1,"mat-sort-header-pointer-middle"]],template:function(t,e){1&t&&(n.nc(),n.Wb(0,"div",0),n.Wb(1,"div",1),n.mc(2),n.Vb(),n.Oc(3,p,6,6,"div",2),n.Vb()),2&t&&(n.Ib("mat-sort-header-sorted",e._isSorted())("mat-sort-header-position-before","before"==e.arrowPosition),n.Eb("tabindex",e._isDisabled()?null:0),n.Db(3),n.oc("ngIf",e._renderArrow()))},directives:[d.t],styles:[".mat-sort-header-container{display:flex;cursor:pointer;align-items:center;letter-spacing:normal;outline:0}[mat-sort-header].cdk-keyboard-focused .mat-sort-header-container,[mat-sort-header].cdk-program-focused .mat-sort-header-container{border-bottom:solid 1px currentColor}.mat-sort-header-disabled .mat-sort-header-container{cursor:default}.mat-sort-header-content{text-align:center;display:flex;align-items:center}.mat-sort-header-position-before{flex-direction:row-reverse}.mat-sort-header-arrow{height:12px;width:12px;min-width:12px;position:relative;display:flex;opacity:0}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .mat-sort-header-arrow{margin:0 6px 0 0}.mat-sort-header-stem{background:currentColor;height:10px;width:2px;margin:auto;display:flex;align-items:center}.cdk-high-contrast-active .mat-sort-header-stem{width:0;border-left:solid 2px}.mat-sort-header-indicator{width:100%;height:2px;display:flex;align-items:center;position:absolute;top:0;left:0}.mat-sort-header-pointer-middle{margin:auto;height:2px;width:2px;background:currentColor;transform:rotate(45deg)}.cdk-high-contrast-active .mat-sort-header-pointer-middle{width:0;height:0;border-top:solid 2px;border-left:solid 2px}.mat-sort-header-pointer-left,.mat-sort-header-pointer-right{background:currentColor;width:6px;height:2px;position:absolute;top:0}.cdk-high-contrast-active .mat-sort-header-pointer-left,.cdk-high-contrast-active .mat-sort-header-pointer-right{width:0;height:0;border-left:solid 6px;border-top:solid 2px}.mat-sort-header-pointer-left{transform-origin:right;left:0}.mat-sort-header-pointer-right{transform-origin:left;right:0}\n"],encapsulation:2,data:{animation:[y.indicator,y.leftPointer,y.rightPointer,y.arrowOpacity,y.arrowPosition,y.allowChildren]},changeDetection:0}),t})(),M=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},providers:[C],imports:[[d.c]]}),t})()},EY2u:function(t,e,i){"use strict";i.d(e,"a",(function(){return a})),i.d(e,"b",(function(){return s}));var n=i("HDdC");const a=new n.a(t=>t.complete());function s(t){return t?function(t){return new n.a(e=>t.schedule(()=>e.complete()))}(t):a}},FKr1:function(t,e,i){"use strict";i.d(e,"a",(function(){return _})),i.d(e,"b",(function(){return y})),i.d(e,"c",(function(){return V})),i.d(e,"d",(function(){return B})),i.d(e,"e",(function(){return R})),i.d(e,"f",(function(){return P})),i.d(e,"g",(function(){return xt})),i.d(e,"h",(function(){return dt})),i.d(e,"i",(function(){return ft})),i.d(e,"j",(function(){return tt})),i.d(e,"k",(function(){return O})),i.d(e,"l",(function(){return U})),i.d(e,"m",(function(){return G})),i.d(e,"n",(function(){return z})),i.d(e,"o",(function(){return ht})),i.d(e,"p",(function(){return gt})),i.d(e,"q",(function(){return yt})),i.d(e,"r",(function(){return bt})),i.d(e,"s",(function(){return nt})),i.d(e,"t",(function(){return at})),i.d(e,"u",(function(){return et})),i.d(e,"v",(function(){return it})),i.d(e,"w",(function(){return L})),i.d(e,"x",(function(){return Z})),i.d(e,"y",(function(){return vt})),i.d(e,"z",(function(){return _t})),i.d(e,"A",(function(){return w})),i.d(e,"B",(function(){return M})),i.d(e,"C",(function(){return D})),i.d(e,"D",(function(){return S})),i.d(e,"E",(function(){return I})),i.d(e,"F",(function(){return k})),i.d(e,"G",(function(){return $}));var n=i("fXoL"),a=i("u47x"),s=i("cH1L");const o=new n.S("10.2.7");var r=i("ofXK"),c=i("8LU1"),l=i("XNiG"),d=i("HDdC"),h=i("nLfN"),u=i("JX91"),p=i("R1ws"),b=i("FtGj");const f=["*",[["mat-option"],["ng-container"]]],m=["*","mat-option, ng-container"];function g(t,e){if(1&t&&n.Rb(0,"mat-pseudo-checkbox",3),2&t){const t=n.hc();n.oc("state",t.selected?"checked":"unchecked")("disabled",t.disabled)}}const v=["*"];let _=(()=>{class t{}return t.STANDARD_CURVE="cubic-bezier(0.4,0.0,0.2,1)",t.DECELERATION_CURVE="cubic-bezier(0.0,0.0,0.2,1)",t.ACCELERATION_CURVE="cubic-bezier(0.4,0.0,1,1)",t.SHARP_CURVE="cubic-bezier(0.4,0.0,0.6,1)",t})(),y=(()=>{class t{}return t.COMPLEX="375ms",t.ENTERING="225ms",t.EXITING="195ms",t})();const x=new n.S("10.2.7"),C=new n.s("mat-sanity-checks",{providedIn:"root",factory:function(){return!0}});let O=(()=>{class t{constructor(t,e,i){this._hasDoneGlobalChecks=!1,this._document=i,t._applyBodyHighContrastModeCssClasses(),this._sanityChecks=e,this._hasDoneGlobalChecks||(this._checkDoctypeIsDefined(),this._checkThemeIsPresent(),this._checkCdkVersionMatch(),this._hasDoneGlobalChecks=!0)}_getDocument(){const t=this._document||document;return"object"==typeof t&&t?t:null}_getWindow(){const t=this._getDocument(),e=(null==t?void 0:t.defaultView)||window;return"object"==typeof e&&e?e:null}_checksAreEnabled(){return Object(n.Z)()&&!this._isTestEnv()}_isTestEnv(){const t=this._getWindow();return t&&(t.__karma__||t.jasmine)}_checkDoctypeIsDefined(){const t=this._checksAreEnabled()&&(!0===this._sanityChecks||this._sanityChecks.doctype),e=this._getDocument();t&&e&&!e.doctype&&console.warn("Current document does not have a doctype. This may cause some Angular Material components not to behave as expected.")}_checkThemeIsPresent(){const t=!this._checksAreEnabled()||!1===this._sanityChecks||!this._sanityChecks.theme,e=this._getDocument();if(t||!e||!e.body||"function"!=typeof getComputedStyle)return;const i=e.createElement("div");i.classList.add("mat-theme-loaded-marker"),e.body.appendChild(i);const n=getComputedStyle(i);n&&"none"!==n.display&&console.warn("Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming"),e.body.removeChild(i)}_checkCdkVersionMatch(){this._checksAreEnabled()&&(!0===this._sanityChecks||this._sanityChecks.version)&&x.full!==o.full&&console.warn("The Angular Material version ("+x.full+") does not match the Angular CDK version ("+o.full+").\nPlease ensure the versions of these two packages exactly match.")}}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)(n.ac(a.j),n.ac(C,8),n.ac(r.e,8))},imports:[[s.a],s.a]}),t})();function D(t){return class extends t{constructor(...t){super(...t),this._disabled=!1}get disabled(){return this._disabled}set disabled(t){this._disabled=Object(c.c)(t)}}}function w(t,e){return class extends t{constructor(...t){super(...t),this.defaultColor=e,this.color=e}get color(){return this._color}set color(t){const e=t||this.defaultColor;e!==this._color&&(this._color&&this._elementRef.nativeElement.classList.remove("mat-"+this._color),e&&this._elementRef.nativeElement.classList.add("mat-"+e),this._color=e)}}}function M(t){return class extends t{constructor(...t){super(...t),this._disableRipple=!1}get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=Object(c.c)(t)}}}function k(t,e=0){return class extends t{constructor(...t){super(...t),this._tabIndex=e,this.defaultTabIndex=e}get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(t){this._tabIndex=null!=t?Object(c.f)(t):this.defaultTabIndex}}}function S(t){return class extends t{constructor(...t){super(...t),this.errorState=!1,this.stateChanges=new l.a}updateErrorState(){const t=this.errorState,e=(this.errorStateMatcher||this._defaultErrorStateMatcher).isErrorState(this.ngControl?this.ngControl.control:null,this._parentFormGroup||this._parentForm);e!==t&&(this.errorState=e,this.stateChanges.next())}}}function I(t){return class extends t{constructor(...t){super(...t),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new d.a(t=>{this._isInitialized?this._notifySubscriber(t):this._pendingSubscribers.push(t)})}_markInitialized(){this._isInitialized=!0,this._pendingSubscribers.forEach(this._notifySubscriber),this._pendingSubscribers=null}_notifySubscriber(t){t.next(),t.complete()}}}const P=new n.s("MAT_DATE_LOCALE",{providedIn:"root",factory:function(){return Object(n.Y)(n.x)}});class V{constructor(){this._localeChanges=new l.a,this.localeChanges=this._localeChanges}getValidDateOrNull(t){return this.isDateInstance(t)&&this.isValid(t)?t:null}deserialize(t){return null==t||this.isDateInstance(t)&&this.isValid(t)?t:this.invalid()}setLocale(t){this.locale=t,this._localeChanges.next()}compareDate(t,e){return this.getYear(t)-this.getYear(e)||this.getMonth(t)-this.getMonth(e)||this.getDate(t)-this.getDate(e)}sameDate(t,e){if(t&&e){let i=this.isValid(t),n=this.isValid(e);return i&&n?!this.compareDate(t,e):i==n}return t==e}clampDate(t,e,i){return e&&this.compareDate(t,e)<0?e:i&&this.compareDate(t,i)>0?i:t}}const R=new n.s("mat-date-formats");let j;try{j="undefined"!=typeof Intl}catch(Ct){j=!1}const A={long:["January","February","March","April","May","June","July","August","September","October","November","December"],short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],narrow:["J","F","M","A","M","J","J","A","S","O","N","D"]},W=F(31,t=>String(t+1)),T={long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],narrow:["S","M","T","W","T","F","S"]},E=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;function F(t,e){const i=Array(t);for(let n=0;n<t;n++)i[n]=e(n);return i}let L=(()=>{class t extends V{constructor(t,e){super(),this.useUtcForDisplay=!0,super.setLocale(t),this.useUtcForDisplay=!e.TRIDENT,this._clampDate=e.TRIDENT||e.EDGE}getYear(t){return t.getFullYear()}getMonth(t){return t.getMonth()}getDate(t){return t.getDate()}getDayOfWeek(t){return t.getDay()}getMonthNames(t){if(j){const e=new Intl.DateTimeFormat(this.locale,{month:t,timeZone:"utc"});return F(12,t=>this._stripDirectionalityCharacters(this._format(e,new Date(2017,t,1))))}return A[t]}getDateNames(){if(j){const t=new Intl.DateTimeFormat(this.locale,{day:"numeric",timeZone:"utc"});return F(31,e=>this._stripDirectionalityCharacters(this._format(t,new Date(2017,0,e+1))))}return W}getDayOfWeekNames(t){if(j){const e=new Intl.DateTimeFormat(this.locale,{weekday:t,timeZone:"utc"});return F(7,t=>this._stripDirectionalityCharacters(this._format(e,new Date(2017,0,t+1))))}return T[t]}getYearName(t){if(j){const e=new Intl.DateTimeFormat(this.locale,{year:"numeric",timeZone:"utc"});return this._stripDirectionalityCharacters(this._format(e,t))}return String(this.getYear(t))}getFirstDayOfWeek(){return 0}getNumDaysInMonth(t){return this.getDate(this._createDateWithOverflow(this.getYear(t),this.getMonth(t)+1,0))}clone(t){return new Date(t.getTime())}createDate(t,e,i){let n=this._createDateWithOverflow(t,e,i);return n.getMonth(),n}today(){return new Date}parse(t){return"number"==typeof t?new Date(t):t?new Date(Date.parse(t)):null}format(t,e){if(!this.isValid(t))throw Error("NativeDateAdapter: Cannot format invalid date.");if(j){this._clampDate&&(t.getFullYear()<1||t.getFullYear()>9999)&&(t=this.clone(t)).setFullYear(Math.max(1,Math.min(9999,t.getFullYear()))),e=Object.assign(Object.assign({},e),{timeZone:"utc"});const i=new Intl.DateTimeFormat(this.locale,e);return this._stripDirectionalityCharacters(this._format(i,t))}return this._stripDirectionalityCharacters(t.toDateString())}addCalendarYears(t,e){return this.addCalendarMonths(t,12*e)}addCalendarMonths(t,e){let i=this._createDateWithOverflow(this.getYear(t),this.getMonth(t)+e,this.getDate(t));return this.getMonth(i)!=((this.getMonth(t)+e)%12+12)%12&&(i=this._createDateWithOverflow(this.getYear(i),this.getMonth(i),0)),i}addCalendarDays(t,e){return this._createDateWithOverflow(this.getYear(t),this.getMonth(t),this.getDate(t)+e)}toIso8601(t){return[t.getUTCFullYear(),this._2digit(t.getUTCMonth()+1),this._2digit(t.getUTCDate())].join("-")}deserialize(t){if("string"==typeof t){if(!t)return null;if(E.test(t)){let e=new Date(t);if(this.isValid(e))return e}}return super.deserialize(t)}isDateInstance(t){return t instanceof Date}isValid(t){return!isNaN(t.getTime())}invalid(){return new Date(NaN)}_createDateWithOverflow(t,e,i){const n=new Date;return n.setFullYear(t,e,i),n.setHours(0,0,0,0),n}_2digit(t){return("00"+t).slice(-2)}_stripDirectionalityCharacters(t){return t.replace(/[\u200e\u200f]/g,"")}_format(t,e){const i=new Date;return i.setUTCFullYear(e.getFullYear(),e.getMonth(),e.getDate()),i.setUTCHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),t.format(i)}}return t.\u0275fac=function(e){return new(e||t)(n.ac(P,8),n.ac(h.a))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})(),Q=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},providers:[{provide:V,useClass:L}],imports:[[h.b]]}),t})();const N={parse:{dateInput:null},display:{dateInput:{year:"numeric",month:"numeric",day:"numeric"},monthYearLabel:{year:"numeric",month:"short"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"}}};let z=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},providers:[{provide:R,useValue:N}],imports:[[Q]]}),t})(),B=(()=>{class t{isErrorState(t,e){return!!(t&&t.invalid&&(t.touched||e&&e.submitted))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(n.Mb)({factory:function(){return new t},token:t,providedIn:"root"}),t})(),U=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["","mat-line",""],["","matLine",""]],hostAttrs:[1,"mat-line"]}),t})();function $(t,e,i="mat"){t.changes.pipe(Object(u.a)(t)).subscribe(({length:t})=>{H(e,i+"-2-line",!1),H(e,i+"-3-line",!1),H(e,i+"-multi-line",!1),2===t||3===t?H(e,`${i}-${t}-line`,!0):t>3&&H(e,i+"-multi-line",!0)})}function H(t,e,i){const n=t.nativeElement.classList;i?n.add(e):n.remove(e)}let G=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[O],O]}),t})();class X{constructor(t,e,i){this._renderer=t,this.element=e,this.config=i,this.state=3}fadeOut(){this._renderer.fadeOutRipple(this)}}const q={enterDuration:450,exitDuration:400},K=Object(h.f)({passive:!0}),Y=["mousedown","touchstart"],J=["mouseup","mouseleave","touchend","touchcancel"];class Z{constructor(t,e,i,n){this._target=t,this._ngZone=e,this._isPointerDown=!1,this._activeRipples=new Set,this._pointerUpEventsRegistered=!1,n.isBrowser&&(this._containerElement=Object(c.e)(i))}fadeInRipple(t,e,i={}){const n=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),a=Object.assign(Object.assign({},q),i.animation);i.centered&&(t=n.left+n.width/2,e=n.top+n.height/2);const s=i.radius||function(t,e,i){const n=Math.max(Math.abs(t-i.left),Math.abs(t-i.right)),a=Math.max(Math.abs(e-i.top),Math.abs(e-i.bottom));return Math.sqrt(n*n+a*a)}(t,e,n),o=t-n.left,r=e-n.top,c=a.enterDuration,l=document.createElement("div");l.classList.add("mat-ripple-element"),l.style.left=o-s+"px",l.style.top=r-s+"px",l.style.height=2*s+"px",l.style.width=2*s+"px",null!=i.color&&(l.style.backgroundColor=i.color),l.style.transitionDuration=c+"ms",this._containerElement.appendChild(l),window.getComputedStyle(l).getPropertyValue("opacity"),l.style.transform="scale(1)";const d=new X(this,l,i);return d.state=0,this._activeRipples.add(d),i.persistent||(this._mostRecentTransientRipple=d),this._runTimeoutOutsideZone(()=>{const t=d===this._mostRecentTransientRipple;d.state=1,i.persistent||t&&this._isPointerDown||d.fadeOut()},c),d}fadeOutRipple(t){const e=this._activeRipples.delete(t);if(t===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),this._activeRipples.size||(this._containerRect=null),!e)return;const i=t.element,n=Object.assign(Object.assign({},q),t.config.animation);i.style.transitionDuration=n.exitDuration+"ms",i.style.opacity="0",t.state=2,this._runTimeoutOutsideZone(()=>{t.state=3,i.parentNode.removeChild(i)},n.exitDuration)}fadeOutAll(){this._activeRipples.forEach(t=>t.fadeOut())}setupTriggerEvents(t){const e=Object(c.e)(t);e&&e!==this._triggerElement&&(this._removeTriggerEvents(),this._triggerElement=e,this._registerEvents(Y))}handleEvent(t){"mousedown"===t.type?this._onMousedown(t):"touchstart"===t.type?this._onTouchStart(t):this._onPointerUp(),this._pointerUpEventsRegistered||(this._registerEvents(J),this._pointerUpEventsRegistered=!0)}_onMousedown(t){const e=Object(a.l)(t),i=this._lastTouchStartEvent&&Date.now()<this._lastTouchStartEvent+800;this._target.rippleDisabled||e||i||(this._isPointerDown=!0,this.fadeInRipple(t.clientX,t.clientY,this._target.rippleConfig))}_onTouchStart(t){if(!this._target.rippleDisabled){this._lastTouchStartEvent=Date.now(),this._isPointerDown=!0;const e=t.changedTouches;for(let t=0;t<e.length;t++)this.fadeInRipple(e[t].clientX,e[t].clientY,this._target.rippleConfig)}}_onPointerUp(){this._isPointerDown&&(this._isPointerDown=!1,this._activeRipples.forEach(t=>{!t.config.persistent&&(1===t.state||t.config.terminateOnPointerUp&&0===t.state)&&t.fadeOut()}))}_runTimeoutOutsideZone(t,e=0){this._ngZone.runOutsideAngular(()=>setTimeout(t,e))}_registerEvents(t){this._ngZone.runOutsideAngular(()=>{t.forEach(t=>{this._triggerElement.addEventListener(t,this,K)})})}_removeTriggerEvents(){this._triggerElement&&(Y.forEach(t=>{this._triggerElement.removeEventListener(t,this,K)}),this._pointerUpEventsRegistered&&J.forEach(t=>{this._triggerElement.removeEventListener(t,this,K)}))}}const tt=new n.s("mat-ripple-global-options");let et=(()=>{class t{constructor(t,e,i,n,a){this._elementRef=t,this._animationMode=a,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=n||{},this._rippleRenderer=new Z(this,e,t,i)}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._setupTriggerEventsIfEnabled()}get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(t){this._trigger=t,this._setupTriggerEventsIfEnabled()}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:Object.assign(Object.assign(Object.assign({},this._globalOptions.animation),"NoopAnimations"===this._animationMode?{enterDuration:0,exitDuration:0}:{}),this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(t,e=0,i){return"number"==typeof t?this._rippleRenderer.fadeInRipple(t,e,Object.assign(Object.assign({},this.rippleConfig),i)):this._rippleRenderer.fadeInRipple(0,0,Object.assign(Object.assign({},this.rippleConfig),t))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(n.C),n.Qb(h.a),n.Qb(tt,8),n.Qb(p.a,8))},t.\u0275dir=n.Lb({type:t,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(t,e){2&t&&n.Ib("mat-ripple-unbounded",e.unbounded)},inputs:{radius:["matRippleRadius","radius"],disabled:["matRippleDisabled","disabled"],trigger:["matRippleTrigger","trigger"],color:["matRippleColor","color"],unbounded:["matRippleUnbounded","unbounded"],centered:["matRippleCentered","centered"],animation:["matRippleAnimation","animation"]},exportAs:["matRipple"]}),t})(),it=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[O,h.b],O]}),t})(),nt=(()=>{class t{constructor(t){this._animationMode=t,this.state="unchecked",this.disabled=!1}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(p.a,8))},t.\u0275cmp=n.Kb({type:t,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:8,hostBindings:function(t,e){2&t&&n.Ib("mat-pseudo-checkbox-indeterminate","indeterminate"===e.state)("mat-pseudo-checkbox-checked","checked"===e.state)("mat-pseudo-checkbox-disabled",e.disabled)("_mat-animation-noopable","NoopAnimations"===e._animationMode)},inputs:{state:"state",disabled:"disabled"},decls:0,vars:0,template:function(t,e){},styles:['.mat-pseudo-checkbox{width:16px;height:16px;border:2px solid;border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate{border-color:transparent}._mat-animation-noopable.mat-pseudo-checkbox{transition:none;animation:none}._mat-animation-noopable.mat-pseudo-checkbox::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{top:5px;left:1px;width:10px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{top:2.4px;left:1px;width:8px;height:3px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}\n'],encapsulation:2,changeDetection:0}),t})(),at=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)}}),t})();class st{}const ot=D(st);let rt=0,ct=(()=>{class t extends ot{constructor(){super(...arguments),this._labelId="mat-optgroup-label-"+rt++}}return t.\u0275fac=function(e){return lt(e||t)},t.\u0275dir=n.Lb({type:t,inputs:{label:"label"},features:[n.Ab]}),t})();const lt=n.Yb(ct),dt=new n.s("MatOptgroup");let ht=(()=>{class t extends ct{}return t.\u0275fac=function(e){return ut(e||t)},t.\u0275cmp=n.Kb({type:t,selectors:[["mat-optgroup"]],hostAttrs:["role","group",1,"mat-optgroup"],hostVars:4,hostBindings:function(t,e){2&t&&(n.Eb("aria-disabled",e.disabled.toString())("aria-labelledby",e._labelId),n.Ib("mat-optgroup-disabled",e.disabled))},inputs:{disabled:"disabled"},exportAs:["matOptgroup"],features:[n.Cb([{provide:dt,useExisting:t}]),n.Ab],ngContentSelectors:m,decls:4,vars:2,consts:[[1,"mat-optgroup-label",3,"id"]],template:function(t,e){1&t&&(n.nc(f),n.Wb(0,"label",0),n.Qc(1),n.mc(2),n.Vb(),n.mc(3,1)),2&t&&(n.oc("id",e._labelId),n.Db(1),n.Sc("",e.label," "))},styles:[".mat-optgroup-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-optgroup-label[disabled]{cursor:default}[dir=rtl] .mat-optgroup-label{text-align:right}.mat-optgroup-label .mat-icon{margin-right:16px;vertical-align:middle}.mat-optgroup-label .mat-icon svg{vertical-align:top}[dir=rtl] .mat-optgroup-label .mat-icon{margin-left:16px;margin-right:0}\n"],encapsulation:2,changeDetection:0}),t})();const ut=n.Yb(ht);let pt=0;class bt{constructor(t,e=!1){this.source=t,this.isUserInput=e}}const ft=new n.s("MAT_OPTION_PARENT_COMPONENT");let mt=(()=>{class t{constructor(t,e,i,a){this._element=t,this._changeDetectorRef=e,this._parent=i,this.group=a,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id="mat-option-"+pt++,this.onSelectionChange=new n.o,this._stateChanges=new l.a}get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}get disabled(){return this.group&&this.group.disabled||this._disabled}set disabled(t){this._disabled=Object(c.c)(t)}get disableRipple(){return this._parent&&this._parent.disableRipple}get active(){return this._active}get viewValue(){return(this._getHostElement().textContent||"").trim()}select(){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}deselect(){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}focus(t,e){const i=this._getHostElement();"function"==typeof i.focus&&i.focus(e)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(t){t.keyCode!==b.g&&t.keyCode!==b.q||Object(b.v)(t)||(this._selectViaInteraction(),t.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getAriaSelected(){return this.selected||!this.multiple&&null}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){const t=this.viewValue;t!==this._mostRecentViewValue&&(this._mostRecentViewValue=t,this._stateChanges.next())}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(t=!1){this.onSelectionChange.emit(new bt(this,t))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(n.h),n.Qb(void 0),n.Qb(ct))},t.\u0275dir=n.Lb({type:t,inputs:{id:"id",disabled:"disabled",value:"value"},outputs:{onSelectionChange:"onSelectionChange"}}),t})(),gt=(()=>{class t extends mt{constructor(t,e,i,n){super(t,e,i,n)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(n.h),n.Qb(ft,8),n.Qb(dt,8))},t.\u0275cmp=n.Kb({type:t,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-option","mat-focus-indicator"],hostVars:12,hostBindings:function(t,e){1&t&&n.dc("click",(function(){return e._selectViaInteraction()}))("keydown",(function(t){return e._handleKeydown(t)})),2&t&&(n.Zb("id",e.id),n.Eb("tabindex",e._getTabIndex())("aria-selected",e._getAriaSelected())("aria-disabled",e.disabled.toString()),n.Ib("mat-selected",e.selected)("mat-option-multiple",e.multiple)("mat-active",e.active)("mat-option-disabled",e.disabled))},exportAs:["matOption"],features:[n.Ab],ngContentSelectors:v,decls:4,vars:3,consts:[["class","mat-option-pseudo-checkbox",3,"state","disabled",4,"ngIf"],[1,"mat-option-text"],["mat-ripple","",1,"mat-option-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-option-pseudo-checkbox",3,"state","disabled"]],template:function(t,e){1&t&&(n.nc(),n.Oc(0,g,1,2,"mat-pseudo-checkbox",0),n.Wb(1,"span",1),n.mc(2),n.Vb(),n.Rb(3,"div",2)),2&t&&(n.oc("ngIf",e.multiple),n.Db(3),n.oc("matRippleTrigger",e._getHostElement())("matRippleDisabled",e.disabled||e.disableRipple))},directives:[r.t,et,nt],styles:[".mat-option{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative;cursor:pointer;outline:none;display:flex;flex-direction:row;max-width:100%;box-sizing:border-box;align-items:center;-webkit-tap-highlight-color:transparent}.mat-option[disabled]{cursor:default}[dir=rtl] .mat-option{text-align:right}.mat-option .mat-icon{margin-right:16px;vertical-align:middle}.mat-option .mat-icon svg{vertical-align:top}[dir=rtl] .mat-option .mat-icon{margin-left:16px;margin-right:0}.mat-option[aria-disabled=true]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:32px}[dir=rtl] .mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:16px;padding-right:32px}.cdk-high-contrast-active .mat-option{margin:0 1px}.cdk-high-contrast-active .mat-option.mat-active{border:solid 1px currentColor;margin:0}.mat-option-text{display:inline-block;flex-grow:1;overflow:hidden;text-overflow:ellipsis}.mat-option .mat-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.cdk-high-contrast-active .mat-option .mat-option-ripple{opacity:.5}.mat-option-pseudo-checkbox{margin-right:8px}[dir=rtl] .mat-option-pseudo-checkbox{margin-left:8px;margin-right:0}\n"],encapsulation:2,changeDetection:0}),t})();function vt(t,e,i){if(i.length){let n=e.toArray(),a=i.toArray(),s=0;for(let e=0;e<t+1;e++)n[e].group&&n[e].group===a[s]&&s++;return s}return 0}function _t(t,e,i,n){return t<i?t:t+e>i+n?Math.max(0,t-n+e):i}let yt=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[it,r.c,at]]}),t})();const xt=new n.s("mat-label-global-options")},FtGj:function(t,e,i){"use strict";i.d(e,"a",(function(){return y})),i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return O})),i.d(e,"d",(function(){return m})),i.d(e,"e",(function(){return f})),i.d(e,"f",(function(){return d})),i.d(e,"g",(function(){return s})),i.d(e,"h",(function(){return o})),i.d(e,"i",(function(){return _})),i.d(e,"j",(function(){return h})),i.d(e,"k",(function(){return u})),i.d(e,"l",(function(){return v})),i.d(e,"m",(function(){return l})),i.d(e,"n",(function(){return c})),i.d(e,"o",(function(){return b})),i.d(e,"p",(function(){return C})),i.d(e,"q",(function(){return r})),i.d(e,"r",(function(){return a})),i.d(e,"s",(function(){return p})),i.d(e,"t",(function(){return x})),i.d(e,"u",(function(){return g})),i.d(e,"v",(function(){return D}));const n=8,a=9,s=13,o=27,r=32,c=33,l=34,d=35,h=36,u=37,p=38,b=39,f=40,m=46,g=48,v=57,_=59,y=65,x=90,C=186,O=188;function D(t,...e){return e.length?e.some(e=>t[e]):t.altKey||t.shiftKey||t.ctrlKey||t.metaKey}},FvrZ:function(t,e,i){"use strict";i.d(e,"a",(function(){return g})),i.d(e,"b",(function(){return O})),i.d(e,"c",(function(){return x})),i.d(e,"d",(function(){return k})),i.d(e,"e",(function(){return C})),i.d(e,"f",(function(){return y})),i.d(e,"g",(function(){return v})),i.d(e,"h",(function(){return w})),i.d(e,"i",(function(){return M})),i.d(e,"j",(function(){return f})),i.d(e,"k",(function(){return m}));var n=i("0EQZ"),a=i("7+OI"),s=i("XNiG"),o=i("2Vo4"),r=i("LRne"),c=i("IzEk"),l=i("pLZG"),d=i("1G5W"),h=i("fXoL"),u=i("8LU1"),p=i("cH1L");class b{constructor(){this.expansionModel=new n.c(!0)}toggle(t){this.expansionModel.toggle(this._trackByValue(t))}expand(t){this.expansionModel.select(this._trackByValue(t))}collapse(t){this.expansionModel.deselect(this._trackByValue(t))}isExpanded(t){return this.expansionModel.isSelected(this._trackByValue(t))}toggleDescendants(t){this.expansionModel.isSelected(this._trackByValue(t))?this.collapseDescendants(t):this.expandDescendants(t)}collapseAll(){this.expansionModel.clear()}expandDescendants(t){let e=[t];e.push(...this.getDescendants(t)),this.expansionModel.select(...e.map(t=>this._trackByValue(t)))}collapseDescendants(t){let e=[t];e.push(...this.getDescendants(t)),this.expansionModel.deselect(...e.map(t=>this._trackByValue(t)))}_trackByValue(t){return this.trackBy?this.trackBy(t):t}}class f extends b{constructor(t,e,i){super(),this.getLevel=t,this.isExpandable=e,this.options=i,this.options&&(this.trackBy=this.options.trackBy)}getDescendants(t){const e=[];for(let i=this.dataNodes.indexOf(t)+1;i<this.dataNodes.length&&this.getLevel(t)<this.getLevel(this.dataNodes[i]);i++)e.push(this.dataNodes[i]);return e}expandAll(){this.expansionModel.select(...this.dataNodes.map(t=>this._trackByValue(t)))}}class m extends b{constructor(t,e){super(),this.getChildren=t,this.options=e,this.options&&(this.trackBy=this.options.trackBy)}expandAll(){this.expansionModel.clear();const t=this.dataNodes.reduce((t,e)=>[...t,...this.getDescendants(e),e],[]);this.expansionModel.select(...t.map(t=>this._trackByValue(t)))}getDescendants(t){const e=[];return this._getDescendants(e,t),e.splice(1)}_getDescendants(t,e){t.push(e);const i=this.getChildren(e);Array.isArray(i)?i.forEach(e=>this._getDescendants(t,e)):Object(a.a)(i)&&i.pipe(Object(c.a)(1),Object(l.a)(Boolean)).subscribe(e=>{for(const i of e)this._getDescendants(t,i)})}}const g=new h.s("CDK_TREE_NODE_OUTLET_NODE");let v=(()=>{class t{constructor(t,e){this.viewContainer=t,this._node=e}}return t.\u0275fac=function(e){return new(e||t)(h.Qb(h.T),h.Qb(g,8))},t.\u0275dir=h.Lb({type:t,selectors:[["","cdkTreeNodeOutlet",""]]}),t})();class _{constructor(t){this.$implicit=t}}let y=(()=>{class t{constructor(t){this.template=t}}return t.\u0275fac=function(e){return new(e||t)(h.Qb(h.P))},t.\u0275dir=h.Lb({type:t,selectors:[["","cdkTreeNodeDef",""]],inputs:{when:["cdkTreeNodeDefWhen","when"]}}),t})(),x=(()=>{class t{constructor(t,e){this._differs=t,this._changeDetectorRef=e,this._onDestroy=new s.a,this._levels=new Map,this.viewChange=new o.a({start:0,end:Number.MAX_VALUE})}get dataSource(){return this._dataSource}set dataSource(t){this._dataSource!==t&&this._switchDataSource(t)}ngOnInit(){this._dataDiffer=this._differs.find([]).create(this.trackBy)}ngOnDestroy(){this._nodeOutlet.viewContainer.clear(),this.viewChange.complete(),this._onDestroy.next(),this._onDestroy.complete(),this._dataSource&&"function"==typeof this._dataSource.disconnect&&this.dataSource.disconnect(this),this._dataSubscription&&(this._dataSubscription.unsubscribe(),this._dataSubscription=null)}ngAfterContentChecked(){const t=this._nodeDefs.filter(t=>!t.when);this._defaultNodeDef=t[0],this.dataSource&&this._nodeDefs&&!this._dataSubscription&&this._observeRenderChanges()}_switchDataSource(t){this._dataSource&&"function"==typeof this._dataSource.disconnect&&this.dataSource.disconnect(this),this._dataSubscription&&(this._dataSubscription.unsubscribe(),this._dataSubscription=null),t||this._nodeOutlet.viewContainer.clear(),this._dataSource=t,this._nodeDefs&&this._observeRenderChanges()}_observeRenderChanges(){let t;Object(n.h)(this._dataSource)?t=this._dataSource.connect(this):Object(a.a)(this._dataSource)?t=this._dataSource:Array.isArray(this._dataSource)&&(t=Object(r.a)(this._dataSource)),t&&(this._dataSubscription=t.pipe(Object(d.a)(this._onDestroy)).subscribe(t=>this.renderNodeChanges(t)))}renderNodeChanges(t,e=this._dataDiffer,i=this._nodeOutlet.viewContainer,n){const a=e.diff(t);a&&(a.forEachOperation((e,a,s)=>{if(null==e.previousIndex)this.insertNode(t[s],s,i,n);else if(null==s)i.remove(a),this._levels.delete(e.item);else{const t=i.get(a);i.move(t,s)}}),this._changeDetectorRef.detectChanges())}_getNodeDef(t,e){return 1===this._nodeDefs.length?this._nodeDefs.first:this._nodeDefs.find(i=>i.when&&i.when(e,t))||this._defaultNodeDef}insertNode(t,e,i,n){const a=this._getNodeDef(t,e),s=new _(t);s.level=this.treeControl.getLevel?this.treeControl.getLevel(t):void 0!==n&&this._levels.has(n)?this._levels.get(n)+1:0,this._levels.set(t,s.level),(i||this._nodeOutlet.viewContainer).createEmbeddedView(a.template,s,e),C.mostRecentTreeNode&&(C.mostRecentTreeNode.data=t)}}return t.\u0275fac=function(e){return new(e||t)(h.Qb(h.v),h.Qb(h.h))},t.\u0275cmp=h.Kb({type:t,selectors:[["cdk-tree"]],contentQueries:function(t,e,i){var n;1&t&&h.Jb(i,y,!0),2&t&&h.yc(n=h.ec())&&(e._nodeDefs=n)},viewQuery:function(t,e){var i;1&t&&h.Kc(v,!0),2&t&&h.yc(i=h.ec())&&(e._nodeOutlet=i.first)},hostAttrs:["role","tree",1,"cdk-tree"],inputs:{dataSource:"dataSource",treeControl:"treeControl",trackBy:"trackBy"},exportAs:["cdkTree"],decls:1,vars:0,consts:[["cdkTreeNodeOutlet",""]],template:function(t,e){1&t&&h.Sb(0,0)},directives:[v],encapsulation:2}),t})(),C=(()=>{class t{constructor(e,i){this._elementRef=e,this._tree=i,this._destroyed=new s.a,this._dataChanges=new s.a,this.role="treeitem",t.mostRecentTreeNode=this}get data(){return this._data}set data(t){t!==this._data&&(this._data=t,this._setRoleFromData(),this._dataChanges.next())}get isExpanded(){return this._tree.treeControl.isExpanded(this._data)}get level(){return this._tree.treeControl.getLevel?this._tree.treeControl.getLevel(this._data):0}ngOnDestroy(){t.mostRecentTreeNode===this&&(t.mostRecentTreeNode=null),this._dataChanges.complete(),this._destroyed.next(),this._destroyed.complete()}focus(){this._elementRef.nativeElement.focus()}_setRoleFromData(){this.role="treeitem"}}return t.\u0275fac=function(e){return new(e||t)(h.Qb(h.l),h.Qb(x))},t.\u0275dir=h.Lb({type:t,selectors:[["cdk-tree-node"]],hostAttrs:[1,"cdk-tree-node"],hostVars:3,hostBindings:function(t,e){2&t&&h.Eb("aria-expanded",e.isExpanded)("aria-level",e.level+1)("role",e.role)},inputs:{role:"role"},exportAs:["cdkTreeNode"]}),t.mostRecentTreeNode=null,t})(),O=(()=>{class t extends C{constructor(t,e,i){super(t,e),this._elementRef=t,this._tree=e,this._differs=i}ngAfterContentInit(){this._dataDiffer=this._differs.find([]).create(this._tree.trackBy);const t=this._tree.treeControl.getChildren(this.data);Array.isArray(t)?this.updateChildrenNodes(t):Object(a.a)(t)&&t.pipe(Object(d.a)(this._destroyed)).subscribe(t=>this.updateChildrenNodes(t)),this.nodeOutlet.changes.pipe(Object(d.a)(this._destroyed)).subscribe(()=>this.updateChildrenNodes())}ngOnDestroy(){this._clear(),super.ngOnDestroy()}updateChildrenNodes(t){const e=this._getNodeOutlet();t&&(this._children=t),e&&this._children?this._tree.renderNodeChanges(this._children,this._dataDiffer,e.viewContainer,this._data):this._dataDiffer.diff([])}_clear(){const t=this._getNodeOutlet();t&&(t.viewContainer.clear(),this._dataDiffer.diff([]))}_getNodeOutlet(){const t=this.nodeOutlet;return t&&t.find(t=>!t._node||t._node===this)}}return t.\u0275fac=function(e){return new(e||t)(h.Qb(h.l),h.Qb(x),h.Qb(h.v))},t.\u0275dir=h.Lb({type:t,selectors:[["cdk-nested-tree-node"]],contentQueries:function(t,e,i){var n;1&t&&h.Jb(i,v,!0),2&t&&h.yc(n=h.ec())&&(e.nodeOutlet=n)},hostAttrs:[1,"cdk-tree-node","cdk-nested-tree-node"],hostVars:2,hostBindings:function(t,e){2&t&&h.Eb("aria-expanded",e.isExpanded)("role",e.role)},exportAs:["cdkNestedTreeNode"],features:[h.Cb([{provide:C,useExisting:t},{provide:g,useExisting:t}]),h.Ab]}),t})();const D=/([A-Za-z%]+)$/;let w=(()=>{class t{constructor(t,e,i,n,a){this._treeNode=t,this._tree=e,this._element=n,this._dir=a,this._destroyed=new s.a,this.indentUnits="px",this._indent=40,this._setPadding(),a&&a.change.pipe(Object(d.a)(this._destroyed)).subscribe(()=>this._setPadding(!0)),t._dataChanges.subscribe(()=>this._setPadding())}get level(){return this._level}set level(t){this._setLevelInput(t)}get indent(){return this._indent}set indent(t){this._setIndentInput(t)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_paddingIndent(){const t=this._treeNode.data&&this._tree.treeControl.getLevel?this._tree.treeControl.getLevel(this._treeNode.data):null,e=null==this._level?t:this._level;return"number"==typeof e?`${e*this._indent}${this.indentUnits}`:null}_setPadding(t=!1){const e=this._paddingIndent();if(e!==this._currentPadding||t){const t=this._element.nativeElement,i=this._dir&&"rtl"===this._dir.value?"paddingRight":"paddingLeft",n="paddingLeft"===i?"paddingRight":"paddingLeft";t.style[i]=e||"",t.style[n]="",this._currentPadding=e}}_setLevelInput(t){this._level=Object(u.f)(t,null),this._setPadding()}_setIndentInput(t){let e=t,i="px";if("string"==typeof t){const n=t.split(D);e=n[0],i=n[1]||i}this.indentUnits=i,this._indent=Object(u.f)(e),this._setPadding()}}return t.\u0275fac=function(e){return new(e||t)(h.Qb(C),h.Qb(x),h.Qb(h.I),h.Qb(h.l),h.Qb(p.c,8))},t.\u0275dir=h.Lb({type:t,selectors:[["","cdkTreeNodePadding",""]],inputs:{level:["cdkTreeNodePadding","level"],indent:["cdkTreeNodePaddingIndent","indent"]}}),t})(),M=(()=>{class t{constructor(t,e){this._tree=t,this._treeNode=e,this._recursive=!1}get recursive(){return this._recursive}set recursive(t){this._recursive=Object(u.c)(t)}_toggle(t){this.recursive?this._tree.treeControl.toggleDescendants(this._treeNode.data):this._tree.treeControl.toggle(this._treeNode.data),t.stopPropagation()}}return t.\u0275fac=function(e){return new(e||t)(h.Qb(x),h.Qb(C))},t.\u0275dir=h.Lb({type:t,selectors:[["","cdkTreeNodeToggle",""]],hostBindings:function(t,e){1&t&&h.dc("click",(function(t){return e._toggle(t)}))},inputs:{recursive:["cdkTreeNodeToggleRecursive","recursive"]}}),t})(),k=(()=>{class t{}return t.\u0275mod=h.Ob({type:t}),t.\u0275inj=h.Nb({factory:function(e){return new(e||t)}}),t})()},GU7r:function(t,e,i){"use strict";i.d(e,"a",(function(){return d})),i.d(e,"b",(function(){return l})),i.d(e,"c",(function(){return h}));var n=i("8LU1"),a=i("fXoL"),s=i("HDdC"),o=i("XNiG"),r=i("Kj3r");let c=(()=>{class t{create(t){return"undefined"==typeof MutationObserver?null:new MutationObserver(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(a.Mb)({factory:function(){return new t},token:t,providedIn:"root"}),t})(),l=(()=>{class t{constructor(t){this._mutationObserverFactory=t,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((t,e)=>this._cleanupObserver(e))}observe(t){const e=Object(n.e)(t);return new s.a(t=>{const i=this._observeElement(e).subscribe(t);return()=>{i.unsubscribe(),this._unobserveElement(e)}})}_observeElement(t){if(this._observedElements.has(t))this._observedElements.get(t).count++;else{const e=new o.a,i=this._mutationObserverFactory.create(t=>e.next(t));i&&i.observe(t,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(t,{observer:i,stream:e,count:1})}return this._observedElements.get(t).stream}_unobserveElement(t){this._observedElements.has(t)&&(this._observedElements.get(t).count--,this._observedElements.get(t).count||this._cleanupObserver(t))}_cleanupObserver(t){if(this._observedElements.has(t)){const{observer:e,stream:i}=this._observedElements.get(t);e&&e.disconnect(),i.complete(),this._observedElements.delete(t)}}}return t.\u0275fac=function(e){return new(e||t)(a.ac(c))},t.\u0275prov=Object(a.Mb)({factory:function(){return new t(Object(a.ac)(c))},token:t,providedIn:"root"}),t})(),d=(()=>{class t{constructor(t,e,i){this._contentObserver=t,this._elementRef=e,this._ngZone=i,this.event=new a.o,this._disabled=!1,this._currentSubscription=null}get disabled(){return this._disabled}set disabled(t){this._disabled=Object(n.c)(t),this._disabled?this._unsubscribe():this._subscribe()}get debounce(){return this._debounce}set debounce(t){this._debounce=Object(n.f)(t),this._subscribe()}ngAfterContentInit(){this._currentSubscription||this.disabled||this._subscribe()}ngOnDestroy(){this._unsubscribe()}_subscribe(){this._unsubscribe();const t=this._contentObserver.observe(this._elementRef);this._ngZone.runOutsideAngular(()=>{this._currentSubscription=(this.debounce?t.pipe(Object(r.a)(this.debounce)):t).subscribe(this.event)})}_unsubscribe(){this._currentSubscription&&this._currentSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(l),a.Qb(a.l),a.Qb(a.C))},t.\u0275dir=a.Lb({type:t,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),t})(),h=(()=>{class t{}return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)},providers:[c]}),t})()},GyhO:function(t,e,i){"use strict";i.d(e,"a",(function(){return s}));var n=i("LRne"),a=i("0EUg");function s(...t){return Object(a.a)()(Object(n.a)(...t))}},HDdC:function(t,e,i){"use strict";i.d(e,"a",(function(){return l}));var n=i("7o/Q"),a=i("2QA8"),s=i("gRHU"),o=i("kJWO"),r=i("SpAZ"),c=i("2fFW");let l=(()=>{class t{constructor(t){this._isScalar=!1,t&&(this._subscribe=t)}lift(e){const i=new t;return i.source=this,i.operator=e,i}subscribe(t,e,i){const{operator:o}=this,r=function(t,e,i){if(t){if(t instanceof n.a)return t;if(t[a.a])return t[a.a]()}return t||e||i?new n.a(t,e,i):new n.a(s.a)}(t,e,i);if(r.add(o?o.call(r,this.source):this.source||c.a.useDeprecatedSynchronousErrorHandling&&!r.syncErrorThrowable?this._subscribe(r):this._trySubscribe(r)),c.a.useDeprecatedSynchronousErrorHandling&&r.syncErrorThrowable&&(r.syncErrorThrowable=!1,r.syncErrorThrown))throw r.syncErrorValue;return r}_trySubscribe(t){try{return this._subscribe(t)}catch(e){c.a.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function(t){for(;t;){const{closed:e,destination:i,isStopped:a}=t;if(e||a)return!1;t=i&&i instanceof n.a?i:null}return!0}(t)?t.error(e):console.warn(e)}}forEach(t,e){return new(e=d(e))((e,i)=>{let n;n=this.subscribe(e=>{try{t(e)}catch(a){i(a),n&&n.unsubscribe()}},i,e)})}_subscribe(t){const{source:e}=this;return e&&e.subscribe(t)}[o.a](){return this}pipe(...t){return 0===t.length?this:(0===(e=t).length?r.a:1===e.length?e[0]:function(t){return e.reduce((t,e)=>e(t),t)})(this);var e}toPromise(t){return new(t=d(t))((t,e)=>{let i;this.subscribe(t=>i=t,t=>e(t),()=>t(i))})}}return t.create=e=>new t(e),t})();function d(t){if(t||(t=c.a.Promise||Promise),!t)throw new Error("no Promise impl found");return t}},I55L:function(t,e,i){"use strict";i.d(e,"a",(function(){return n}));const n=t=>t&&"number"==typeof t.length&&"function"!=typeof t},IjjT:function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));let n=(()=>{class t{constructor(e,i=t.now){this.SchedulerAction=e,this.now=i}schedule(t,e=0,i){return new this.SchedulerAction(this,t).schedule(i,e)}}return t.now=()=>Date.now(),t})();class a extends n{constructor(t,e=n.now){super(t,()=>a.delegate&&a.delegate!==this?a.delegate.now():e()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(t,e=0,i){return a.delegate&&a.delegate!==this?a.delegate.schedule(t,e,i):super.schedule(t,e,i)}flush(t){const{actions:e}=this;if(this.active)return void e.push(t);let i;this.active=!0;do{if(i=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,i){for(;t=e.shift();)t.unsubscribe();throw i}}}},IzEk:function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var n=i("7o/Q"),a=i("4I5i"),s=i("EY2u");function o(t){return e=>0===t?Object(s.b)():e.lift(new r(t))}class r{constructor(t){if(this.total=t,this.total<0)throw new a.a}call(t,e){return e.subscribe(new c(t,this.total))}}class c extends n.a{constructor(t,e){super(t),this.total=e,this.count=0}_next(t){const e=this.total,i=++this.count;i<=e&&(this.destination.next(t),i===e&&(this.destination.complete(),this.unsubscribe()))}}},JIr8:function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var n=i("zx2A");function a(t){return function(e){const i=new s(t),n=e.lift(i);return i.caught=n}}class s{constructor(t){this.selector=t}call(t,e){return e.subscribe(new o(t,this.selector,this.caught))}}class o extends n.b{constructor(t,e,i){super(t),this.selector=e,this.caught=i}error(t){if(!this.isStopped){let i;try{i=this.selector(t,this.caught)}catch(e){return void super.error(e)}this._unsubscribeAndRecycle();const a=new n.a(this);this.add(a);const s=Object(n.c)(i,a);s!==a&&this.add(s)}}}},JX91:function(t,e,i){"use strict";i.d(e,"a",(function(){return s}));var n=i("GyhO"),a=i("z+Ro");function s(...t){const e=t[t.length-1];return Object(a.a)(e)?(t.pop(),i=>Object(n.a)(t,i,e)):e=>Object(n.a)(t,e)}},Kj3r:function(t,e,i){"use strict";i.d(e,"a",(function(){return s}));var n=i("7o/Q"),a=i("D0XW");function s(t,e=a.a){return i=>i.lift(new o(t,e))}class o{constructor(t,e){this.dueTime=t,this.scheduler=e}call(t,e){return e.subscribe(new r(t,this.dueTime,this.scheduler))}}class r extends n.a{constructor(t,e,i){super(t),this.dueTime=e,this.scheduler=i,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(c,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:t}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}}clearDebounce(){const t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)}}function c(t){t.debouncedNext()}},LRne:function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var n=i("z+Ro"),a=i("yCtX"),s=i("jZKg");function o(...t){let e=t[t.length-1];return Object(n.a)(e)?(t.pop(),Object(s.a)(t,e)):Object(a.a)(t)}},Lhse:function(t,e,i){"use strict";function n(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}i.d(e,"a",(function(){return a}));const a=n()},M9IT:function(t,e,i){"use strict";i.d(e,"a",(function(){return O})),i.d(e,"b",(function(){return v})),i.d(e,"c",(function(){return D}));var n=i("ofXK"),a=i("fXoL"),s=i("bTqV"),o=i("d3UM"),r=i("Qu3c"),c=i("8LU1"),l=i("XNiG"),d=i("FKr1"),h=i("kmnG");function u(t,e){if(1&t&&(a.Wb(0,"mat-option",19),a.Qc(1),a.Vb()),2&t){const t=e.$implicit;a.oc("value",t),a.Db(1),a.Sc(" ",t," ")}}function p(t,e){if(1&t){const t=a.Xb();a.Wb(0,"mat-form-field",16),a.Wb(1,"mat-select",17),a.dc("selectionChange",(function(e){return a.Dc(t),a.hc(2)._changePageSize(e.value)})),a.Oc(2,u,2,2,"mat-option",18),a.Vb(),a.Vb()}if(2&t){const t=a.hc(2);a.oc("appearance",t._formFieldAppearance)("color",t.color),a.Db(1),a.oc("value",t.pageSize)("disabled",t.disabled)("aria-label",t._intl.itemsPerPageLabel),a.Db(1),a.oc("ngForOf",t._displayedPageSizeOptions)}}function b(t,e){if(1&t&&(a.Wb(0,"div",20),a.Qc(1),a.Vb()),2&t){const t=a.hc(2);a.Db(1),a.Rc(t.pageSize)}}function f(t,e){if(1&t&&(a.Wb(0,"div",12),a.Wb(1,"div",13),a.Qc(2),a.Vb(),a.Oc(3,p,3,6,"mat-form-field",14),a.Oc(4,b,2,1,"div",15),a.Vb()),2&t){const t=a.hc();a.Db(2),a.Sc(" ",t._intl.itemsPerPageLabel," "),a.Db(1),a.oc("ngIf",t._displayedPageSizeOptions.length>1),a.Db(1),a.oc("ngIf",t._displayedPageSizeOptions.length<=1)}}function m(t,e){if(1&t){const t=a.Xb();a.Wb(0,"button",21),a.dc("click",(function(){return a.Dc(t),a.hc().firstPage()})),a.gc(),a.Wb(1,"svg",7),a.Rb(2,"path",22),a.Vb(),a.Vb()}if(2&t){const t=a.hc();a.oc("matTooltip",t._intl.firstPageLabel)("matTooltipDisabled",t._previousButtonsDisabled())("matTooltipPosition","above")("disabled",t._previousButtonsDisabled()),a.Eb("aria-label",t._intl.firstPageLabel)}}function g(t,e){if(1&t){const t=a.Xb();a.gc(),a.fc(),a.Wb(0,"button",23),a.dc("click",(function(){return a.Dc(t),a.hc().lastPage()})),a.gc(),a.Wb(1,"svg",7),a.Rb(2,"path",24),a.Vb(),a.Vb()}if(2&t){const t=a.hc();a.oc("matTooltip",t._intl.lastPageLabel)("matTooltipDisabled",t._nextButtonsDisabled())("matTooltipPosition","above")("disabled",t._nextButtonsDisabled()),a.Eb("aria-label",t._intl.lastPageLabel)}}let v=(()=>{class t{constructor(){this.changes=new l.a,this.itemsPerPageLabel="Items per page:",this.nextPageLabel="Next page",this.previousPageLabel="Previous page",this.firstPageLabel="First page",this.lastPageLabel="Last page",this.getRangeLabel=(t,e,i)=>{if(0==i||0==e)return"0 of "+i;const n=t*e;return`${n+1} \u2013 ${n<(i=Math.max(i,0))?Math.min(n+e,i):n+e} of ${i}`}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(a.Mb)({factory:function(){return new t},token:t,providedIn:"root"}),t})();const _={provide:v,deps:[[new a.D,new a.N,v]],useFactory:function(t){return t||new v}},y=new a.s("MAT_PAGINATOR_DEFAULT_OPTIONS");class x{}const C=Object(d.C)(Object(d.E)(x));let O=(()=>{class t extends C{constructor(t,e,i){if(super(),this._intl=t,this._changeDetectorRef=e,this._pageIndex=0,this._length=0,this._pageSizeOptions=[],this._hidePageSize=!1,this._showFirstLastButtons=!1,this.page=new a.o,this._intlChanges=t.changes.subscribe(()=>this._changeDetectorRef.markForCheck()),i){const{pageSize:t,pageSizeOptions:e,hidePageSize:n,showFirstLastButtons:a,formFieldAppearance:s}=i;null!=t&&(this._pageSize=t),null!=e&&(this._pageSizeOptions=e),null!=n&&(this._hidePageSize=n),null!=a&&(this._showFirstLastButtons=a),null!=s&&(this._formFieldAppearance=s)}}get pageIndex(){return this._pageIndex}set pageIndex(t){this._pageIndex=Math.max(Object(c.f)(t),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(t){this._length=Object(c.f)(t),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(t){this._pageSize=Math.max(Object(c.f)(t),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(t){this._pageSizeOptions=(t||[]).map(t=>Object(c.f)(t)),this._updateDisplayedPageSizeOptions()}get hidePageSize(){return this._hidePageSize}set hidePageSize(t){this._hidePageSize=Object(c.c)(t)}get showFirstLastButtons(){return this._showFirstLastButtons}set showFirstLastButtons(t){this._showFirstLastButtons=Object(c.c)(t)}ngOnInit(){this._initialized=!0,this._updateDisplayedPageSizeOptions(),this._markInitialized()}ngOnDestroy(){this._intlChanges.unsubscribe()}nextPage(){if(!this.hasNextPage())return;const t=this.pageIndex;this.pageIndex++,this._emitPageEvent(t)}previousPage(){if(!this.hasPreviousPage())return;const t=this.pageIndex;this.pageIndex--,this._emitPageEvent(t)}firstPage(){if(!this.hasPreviousPage())return;const t=this.pageIndex;this.pageIndex=0,this._emitPageEvent(t)}lastPage(){if(!this.hasNextPage())return;const t=this.pageIndex;this.pageIndex=this.getNumberOfPages()-1,this._emitPageEvent(t)}hasPreviousPage(){return this.pageIndex>=1&&0!=this.pageSize}hasNextPage(){const t=this.getNumberOfPages()-1;return this.pageIndex<t&&0!=this.pageSize}getNumberOfPages(){return this.pageSize?Math.ceil(this.length/this.pageSize):0}_changePageSize(t){const e=this.pageIndex;this.pageIndex=Math.floor(this.pageIndex*this.pageSize/t)||0,this.pageSize=t,this._emitPageEvent(e)}_nextButtonsDisabled(){return this.disabled||!this.hasNextPage()}_previousButtonsDisabled(){return this.disabled||!this.hasPreviousPage()}_updateDisplayedPageSizeOptions(){this._initialized&&(this.pageSize||(this._pageSize=0!=this.pageSizeOptions.length?this.pageSizeOptions[0]:50),this._displayedPageSizeOptions=this.pageSizeOptions.slice(),-1===this._displayedPageSizeOptions.indexOf(this.pageSize)&&this._displayedPageSizeOptions.push(this.pageSize),this._displayedPageSizeOptions.sort((t,e)=>t-e),this._changeDetectorRef.markForCheck())}_emitPageEvent(t){this.page.emit({previousPageIndex:t,pageIndex:this.pageIndex,pageSize:this.pageSize,length:this.length})}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(v),a.Qb(a.h),a.Qb(y,8))},t.\u0275cmp=a.Kb({type:t,selectors:[["mat-paginator"]],hostAttrs:[1,"mat-paginator"],inputs:{disabled:"disabled",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",color:"color"},outputs:{page:"page"},exportAs:["matPaginator"],features:[a.Ab],decls:14,vars:14,consts:[[1,"mat-paginator-outer-container"],[1,"mat-paginator-container"],["class","mat-paginator-page-size",4,"ngIf"],[1,"mat-paginator-range-actions"],[1,"mat-paginator-range-label"],["mat-icon-button","","type","button","class","mat-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click",4,"ngIf"],["mat-icon-button","","type","button",1,"mat-paginator-navigation-previous",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["viewBox","0 0 24 24","focusable","false",1,"mat-paginator-icon"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],["mat-icon-button","","type","button",1,"mat-paginator-navigation-next",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"],["mat-icon-button","","type","button","class","mat-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click",4,"ngIf"],[1,"mat-paginator-page-size"],[1,"mat-paginator-page-size-label"],["class","mat-paginator-page-size-select",3,"appearance","color",4,"ngIf"],["class","mat-paginator-page-size-value",4,"ngIf"],[1,"mat-paginator-page-size-select",3,"appearance","color"],[3,"value","disabled","aria-label","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"mat-paginator-page-size-value"],["mat-icon-button","","type","button",1,"mat-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"],["mat-icon-button","","type","button",1,"mat-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"]],template:function(t,e){1&t&&(a.Wb(0,"div",0),a.Wb(1,"div",1),a.Oc(2,f,5,3,"div",2),a.Wb(3,"div",3),a.Wb(4,"div",4),a.Qc(5),a.Vb(),a.Oc(6,m,3,5,"button",5),a.Wb(7,"button",6),a.dc("click",(function(){return e.previousPage()})),a.gc(),a.Wb(8,"svg",7),a.Rb(9,"path",8),a.Vb(),a.Vb(),a.fc(),a.Wb(10,"button",9),a.dc("click",(function(){return e.nextPage()})),a.gc(),a.Wb(11,"svg",7),a.Rb(12,"path",10),a.Vb(),a.Vb(),a.Oc(13,g,3,5,"button",11),a.Vb(),a.Vb(),a.Vb()),2&t&&(a.Db(2),a.oc("ngIf",!e.hidePageSize),a.Db(3),a.Sc(" ",e._intl.getRangeLabel(e.pageIndex,e.pageSize,e.length)," "),a.Db(1),a.oc("ngIf",e.showFirstLastButtons),a.Db(1),a.oc("matTooltip",e._intl.previousPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),a.Eb("aria-label",e._intl.previousPageLabel),a.Db(3),a.oc("matTooltip",e._intl.nextPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),a.Eb("aria-label",e._intl.nextPageLabel),a.Db(3),a.oc("ngIf",e.showFirstLastButtons))},directives:[n.t,s.b,r.b,h.c,o.a,n.s,d.p],styles:[".mat-paginator{display:block}.mat-paginator-outer-container{display:flex}.mat-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap-reverse;width:100%}.mat-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-paginator-page-size{margin-right:0;margin-left:8px}.mat-paginator-page-size-label{margin:0 4px}.mat-paginator-page-size-select{margin:6px 4px 0 4px;width:56px}.mat-paginator-page-size-select.mat-form-field-appearance-outline{width:64px}.mat-paginator-page-size-select.mat-form-field-appearance-fill{width:64px}.mat-paginator-range-label{margin:0 32px 0 24px}.mat-paginator-range-actions{display:flex;align-items:center}.mat-paginator-icon{width:28px;fill:currentColor}[dir=rtl] .mat-paginator-icon{transform:rotate(180deg)}\n"],encapsulation:2,changeDetection:0}),t})(),D=(()=>{class t{}return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)},providers:[_],imports:[[n.c,s.c,o.b,r.c]]}),t})()},MJ5r:function(t,e,i){"use strict";i.d(e,"a",(function(){return n}));const n={production:!0,VERSION:i("kiQV").version,AUTHOR:i("kiQV").author}},MutI:function(t,e,i){"use strict";i.d(e,"a",(function(){return V})),i.d(e,"b",(function(){return R})),i.d(e,"c",(function(){return j})),i.d(e,"d",(function(){return W})),i.d(e,"e",(function(){return U})),i.d(e,"f",(function(){return z})),i.d(e,"g",(function(){return A})),i.d(e,"h",(function(){return I})),i.d(e,"i",(function(){return B}));var n=i("ofXK"),a=i("fXoL"),s=i("FKr1"),o=i("8LU1"),r=i("XNiG"),c=i("1G5W"),l=i("JX91"),d=i("u47x"),h=i("0EQZ"),u=i("FtGj"),p=i("3Pt+"),b=i("f0Cb");const f=["*"],m='.mat-subheader{display:flex;box-sizing:border-box;padding:16px;align-items:center}.mat-list-base .mat-subheader{margin:0}.mat-list-base{padding-top:8px;display:block;-webkit-tap-highlight-color:transparent}.mat-list-base .mat-subheader{height:48px;line-height:16px}.mat-list-base .mat-subheader:first-child{margin-top:-8px}.mat-list-base .mat-list-item,.mat-list-base .mat-list-option{display:block;height:48px;-webkit-tap-highlight-color:transparent;width:100%;padding:0}.mat-list-base .mat-list-item .mat-list-item-content,.mat-list-base .mat-list-option .mat-list-item-content{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:0 16px;position:relative;height:inherit}.mat-list-base .mat-list-item .mat-list-item-content-reverse,.mat-list-base .mat-list-option .mat-list-item-content-reverse{display:flex;align-items:center;padding:0 16px;flex-direction:row-reverse;justify-content:space-around}.mat-list-base .mat-list-item .mat-list-item-ripple,.mat-list-base .mat-list-option .mat-list-item-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-list-base .mat-list-item.mat-list-item-with-avatar,.mat-list-base .mat-list-option.mat-list-item-with-avatar{height:56px}.mat-list-base .mat-list-item.mat-2-line,.mat-list-base .mat-list-option.mat-2-line{height:72px}.mat-list-base .mat-list-item.mat-3-line,.mat-list-base .mat-list-option.mat-3-line{height:88px}.mat-list-base .mat-list-item.mat-multi-line,.mat-list-base .mat-list-option.mat-multi-line{height:auto}.mat-list-base .mat-list-item.mat-multi-line .mat-list-item-content,.mat-list-base .mat-list-option.mat-multi-line .mat-list-item-content{padding-top:16px;padding-bottom:16px}.mat-list-base .mat-list-item .mat-list-text,.mat-list-base .mat-list-option .mat-list-text{display:flex;flex-direction:column;flex:auto;box-sizing:border-box;overflow:hidden;padding:0}.mat-list-base .mat-list-item .mat-list-text>*,.mat-list-base .mat-list-option .mat-list-text>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-list-base .mat-list-item .mat-list-text:empty,.mat-list-base .mat-list-option .mat-list-text:empty{display:none}.mat-list-base .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list-base .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,.mat-list-base .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list-base .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:0;padding-left:16px}[dir=rtl] .mat-list-base .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:0}.mat-list-base .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-left:0;padding-right:16px}[dir=rtl] .mat-list-base .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-right:0;padding-left:16px}.mat-list-base .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-list-base .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:16px}.mat-list-base .mat-list-item .mat-list-avatar,.mat-list-base .mat-list-option .mat-list-avatar{flex-shrink:0;width:40px;height:40px;border-radius:50%;object-fit:cover}.mat-list-base .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-list-base .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:72px;width:calc(100% - 72px)}[dir=rtl] .mat-list-base .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-list-base .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:auto;margin-right:72px}.mat-list-base .mat-list-item .mat-list-icon,.mat-list-base .mat-list-option .mat-list-icon{flex-shrink:0;width:24px;height:24px;font-size:24px;box-sizing:content-box;border-radius:50%;padding:4px}.mat-list-base .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-list-base .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:64px;width:calc(100% - 64px)}[dir=rtl] .mat-list-base .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-list-base .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:auto;margin-right:64px}.mat-list-base .mat-list-item .mat-divider,.mat-list-base .mat-list-option .mat-divider{position:absolute;bottom:0;left:0;width:100%;margin:0}[dir=rtl] .mat-list-base .mat-list-item .mat-divider,[dir=rtl] .mat-list-base .mat-list-option .mat-divider{margin-left:auto;margin-right:0}.mat-list-base .mat-list-item .mat-divider.mat-divider-inset,.mat-list-base .mat-list-option .mat-divider.mat-divider-inset{position:absolute}.mat-list-base[dense]{padding-top:4px;display:block}.mat-list-base[dense] .mat-subheader{height:40px;line-height:8px}.mat-list-base[dense] .mat-subheader:first-child{margin-top:-4px}.mat-list-base[dense] .mat-list-item,.mat-list-base[dense] .mat-list-option{display:block;height:40px;-webkit-tap-highlight-color:transparent;width:100%;padding:0}.mat-list-base[dense] .mat-list-item .mat-list-item-content,.mat-list-base[dense] .mat-list-option .mat-list-item-content{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:0 16px;position:relative;height:inherit}.mat-list-base[dense] .mat-list-item .mat-list-item-content-reverse,.mat-list-base[dense] .mat-list-option .mat-list-item-content-reverse{display:flex;align-items:center;padding:0 16px;flex-direction:row-reverse;justify-content:space-around}.mat-list-base[dense] .mat-list-item .mat-list-item-ripple,.mat-list-base[dense] .mat-list-option .mat-list-item-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar{height:48px}.mat-list-base[dense] .mat-list-item.mat-2-line,.mat-list-base[dense] .mat-list-option.mat-2-line{height:60px}.mat-list-base[dense] .mat-list-item.mat-3-line,.mat-list-base[dense] .mat-list-option.mat-3-line{height:76px}.mat-list-base[dense] .mat-list-item.mat-multi-line,.mat-list-base[dense] .mat-list-option.mat-multi-line{height:auto}.mat-list-base[dense] .mat-list-item.mat-multi-line .mat-list-item-content,.mat-list-base[dense] .mat-list-option.mat-multi-line .mat-list-item-content{padding-top:16px;padding-bottom:16px}.mat-list-base[dense] .mat-list-item .mat-list-text,.mat-list-base[dense] .mat-list-option .mat-list-text{display:flex;flex-direction:column;flex:auto;box-sizing:border-box;overflow:hidden;padding:0}.mat-list-base[dense] .mat-list-item .mat-list-text>*,.mat-list-base[dense] .mat-list-option .mat-list-text>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-list-base[dense] .mat-list-item .mat-list-text:empty,.mat-list-base[dense] .mat-list-option .mat-list-text:empty{display:none}.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list-base[dense] .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:0;padding-left:16px}[dir=rtl] .mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:0}.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-left:0;padding-right:16px}[dir=rtl] .mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-right:0;padding-left:16px}.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:16px}.mat-list-base[dense] .mat-list-item .mat-list-avatar,.mat-list-base[dense] .mat-list-option .mat-list-avatar{flex-shrink:0;width:36px;height:36px;border-radius:50%;object-fit:cover}.mat-list-base[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-list-base[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:68px;width:calc(100% - 68px)}[dir=rtl] .mat-list-base[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-list-base[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:auto;margin-right:68px}.mat-list-base[dense] .mat-list-item .mat-list-icon,.mat-list-base[dense] .mat-list-option .mat-list-icon{flex-shrink:0;width:20px;height:20px;font-size:20px;box-sizing:content-box;border-radius:50%;padding:4px}.mat-list-base[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-list-base[dense] .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:60px;width:calc(100% - 60px)}[dir=rtl] .mat-list-base[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-list-base[dense] .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:auto;margin-right:60px}.mat-list-base[dense] .mat-list-item .mat-divider,.mat-list-base[dense] .mat-list-option .mat-divider{position:absolute;bottom:0;left:0;width:100%;margin:0}[dir=rtl] .mat-list-base[dense] .mat-list-item .mat-divider,[dir=rtl] .mat-list-base[dense] .mat-list-option .mat-divider{margin-left:auto;margin-right:0}.mat-list-base[dense] .mat-list-item .mat-divider.mat-divider-inset,.mat-list-base[dense] .mat-list-option .mat-divider.mat-divider-inset{position:absolute}.mat-nav-list a{text-decoration:none;color:inherit}.mat-nav-list .mat-list-item{cursor:pointer;outline:none}mat-action-list button{background:none;color:inherit;border:none;font:inherit;outline:inherit;-webkit-tap-highlight-color:transparent;text-align:left}[dir=rtl] mat-action-list button{text-align:right}mat-action-list button::-moz-focus-inner{border:0}mat-action-list .mat-list-item{cursor:pointer;outline:inherit}.mat-list-option:not(.mat-list-item-disabled){cursor:pointer;outline:none}.mat-list-item-disabled{pointer-events:none}.cdk-high-contrast-active .mat-list-item-disabled{opacity:.5}.cdk-high-contrast-active :host .mat-list-item-disabled{opacity:.5}.cdk-high-contrast-active .mat-selection-list:focus{outline-style:dotted}.cdk-high-contrast-active .mat-list-option:hover,.cdk-high-contrast-active .mat-list-option:focus,.cdk-high-contrast-active .mat-nav-list .mat-list-item:hover,.cdk-high-contrast-active .mat-nav-list .mat-list-item:focus,.cdk-high-contrast-active mat-action-list .mat-list-item:hover,.cdk-high-contrast-active mat-action-list .mat-list-item:focus{outline:dotted 1px}.cdk-high-contrast-active .mat-list-single-selected-option::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}.cdk-high-contrast-active [dir=rtl] .mat-list-single-selected-option::after{right:auto;left:16px}@media(hover: none){.mat-list-option:not(.mat-list-single-selected-option):not(.mat-list-item-disabled):hover,.mat-nav-list .mat-list-item:not(.mat-list-item-disabled):hover,.mat-action-list .mat-list-item:not(.mat-list-item-disabled):hover{background:none}}\n',g=[[["","mat-list-avatar",""],["","mat-list-icon",""],["","matListAvatar",""],["","matListIcon",""]],[["","mat-line",""],["","matLine",""]],"*"],v=["[mat-list-avatar], [mat-list-icon], [matListAvatar], [matListIcon]","[mat-line], [matLine]","*"],_=["text"];function y(t,e){if(1&t&&a.Rb(0,"mat-pseudo-checkbox",5),2&t){const t=a.hc();a.oc("state",t.selected?"checked":"unchecked")("disabled",t.disabled)}}const x=["*",[["","mat-list-avatar",""],["","mat-list-icon",""],["","matListAvatar",""],["","matListIcon",""]]],C=["*","[mat-list-avatar], [mat-list-icon], [matListAvatar], [matListIcon]"];class O{}const D=Object(s.C)(Object(s.B)(O));class w{}const M=Object(s.B)(w),k=new a.s("MatList"),S=new a.s("MatNavList");let I=(()=>{class t extends D{constructor(){super(...arguments),this._stateChanges=new r.a}ngOnChanges(){this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}}return t.\u0275fac=function(e){return P(e||t)},t.\u0275cmp=a.Kb({type:t,selectors:[["mat-nav-list"]],hostAttrs:["role","navigation",1,"mat-nav-list","mat-list-base"],inputs:{disableRipple:"disableRipple",disabled:"disabled"},exportAs:["matNavList"],features:[a.Cb([{provide:S,useExisting:t}]),a.Ab,a.Bb],ngContentSelectors:f,decls:1,vars:0,template:function(t,e){1&t&&(a.nc(),a.mc(0))},styles:[m],encapsulation:2,changeDetection:0}),t})();const P=a.Yb(I);let V=(()=>{class t extends D{constructor(t){super(),this._elementRef=t,this._stateChanges=new r.a,"action-list"===this._getListType()&&t.nativeElement.classList.add("mat-action-list")}_getListType(){const t=this._elementRef.nativeElement.nodeName.toLowerCase();return"mat-list"===t?"list":"mat-action-list"===t?"action-list":null}ngOnChanges(){this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l))},t.\u0275cmp=a.Kb({type:t,selectors:[["mat-list"],["mat-action-list"]],hostAttrs:[1,"mat-list","mat-list-base"],inputs:{disableRipple:"disableRipple",disabled:"disabled"},exportAs:["matList"],features:[a.Cb([{provide:k,useExisting:t}]),a.Ab,a.Bb],ngContentSelectors:f,decls:1,vars:0,template:function(t,e){1&t&&(a.nc(),a.mc(0))},styles:[m],encapsulation:2,changeDetection:0}),t})(),R=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=a.Lb({type:t,selectors:[["","mat-list-avatar",""],["","matListAvatar",""]],hostAttrs:[1,"mat-list-avatar"]}),t})(),j=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=a.Lb({type:t,selectors:[["","mat-list-icon",""],["","matListIcon",""]],hostAttrs:[1,"mat-list-icon"]}),t})(),A=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=a.Lb({type:t,selectors:[["","mat-subheader",""],["","matSubheader",""]],hostAttrs:[1,"mat-subheader"]}),t})(),W=(()=>{class t extends M{constructor(t,e,i,n){super(),this._element=t,this._isInteractiveList=!1,this._destroyed=new r.a,this._disabled=!1,this._isInteractiveList=!!(i||n&&"action-list"===n._getListType()),this._list=i||n;const a=this._getHostElement();"button"!==a.nodeName.toLowerCase()||a.hasAttribute("type")||a.setAttribute("type","button"),this._list&&this._list._stateChanges.pipe(Object(c.a)(this._destroyed)).subscribe(()=>{e.markForCheck()})}get disabled(){return this._disabled||!(!this._list||!this._list.disabled)}set disabled(t){this._disabled=Object(o.c)(t)}ngAfterContentInit(){Object(s.G)(this._lines,this._element)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_isRippleDisabled(){return!this._isInteractiveList||this.disableRipple||!(!this._list||!this._list.disableRipple)}_getHostElement(){return this._element.nativeElement}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(a.h),a.Qb(S,8),a.Qb(k,8))},t.\u0275cmp=a.Kb({type:t,selectors:[["mat-list-item"],["a","mat-list-item",""],["button","mat-list-item",""]],contentQueries:function(t,e,i){var n;1&t&&(a.Jb(i,R,!0),a.Jb(i,j,!0),a.Jb(i,s.l,!0)),2&t&&(a.yc(n=a.ec())&&(e._avatar=n.first),a.yc(n=a.ec())&&(e._icon=n.first),a.yc(n=a.ec())&&(e._lines=n))},hostAttrs:[1,"mat-list-item","mat-focus-indicator"],hostVars:6,hostBindings:function(t,e){2&t&&a.Ib("mat-list-item-disabled",e.disabled)("mat-list-item-avatar",e._avatar||e._icon)("mat-list-item-with-avatar",e._avatar||e._icon)},inputs:{disableRipple:"disableRipple",disabled:"disabled"},exportAs:["matListItem"],features:[a.Ab],ngContentSelectors:v,decls:6,vars:2,consts:[[1,"mat-list-item-content"],["mat-ripple","",1,"mat-list-item-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-list-text"]],template:function(t,e){1&t&&(a.nc(g),a.Wb(0,"div",0),a.Rb(1,"div",1),a.mc(2),a.Wb(3,"div",2),a.mc(4,1),a.Vb(),a.mc(5,2),a.Vb()),2&t&&(a.Db(1),a.oc("matRippleTrigger",e._getHostElement())("matRippleDisabled",e._isRippleDisabled()))},directives:[s.u],encapsulation:2,changeDetection:0}),t})();class T{}const E=Object(s.B)(T);class F{}const L=Object(s.B)(F),Q={provide:p.s,useExisting:Object(a.X)(()=>B),multi:!0};class N{constructor(t,e,i){this.source=t,this.option=e,this.options=i}}let z=(()=>{class t extends L{constructor(t,e,i){super(),this._element=t,this._changeDetector=e,this.selectionList=i,this._selected=!1,this._disabled=!1,this._hasFocus=!1,this.checkboxPosition="after",this._inputsInitialized=!1}get color(){return this._color||this.selectionList.color}set color(t){this._color=t}get value(){return this._value}set value(t){this.selected&&!this.selectionList.compareWith(t,this.value)&&this._inputsInitialized&&(this.selected=!1),this._value=t}get disabled(){return this._disabled||this.selectionList&&this.selectionList.disabled}set disabled(t){const e=Object(o.c)(t);e!==this._disabled&&(this._disabled=e,this._changeDetector.markForCheck())}get selected(){return this.selectionList.selectedOptions.isSelected(this)}set selected(t){const e=Object(o.c)(t);e!==this._selected&&(this._setSelected(e),this.selectionList._reportValueChange())}ngOnInit(){const t=this.selectionList;t._value&&t._value.some(e=>t.compareWith(e,this._value))&&this._setSelected(!0);const e=this._selected;Promise.resolve().then(()=>{(this._selected||e)&&(this.selected=!0,this._changeDetector.markForCheck())}),this._inputsInitialized=!0}ngAfterContentInit(){Object(s.G)(this._lines,this._element)}ngOnDestroy(){this.selected&&Promise.resolve().then(()=>{this.selected=!1});const t=this._hasFocus,e=this.selectionList._removeOptionFromList(this);t&&e&&e.focus()}toggle(){this.selected=!this.selected}focus(){this._element.nativeElement.focus()}getLabel(){return this._text&&this._text.nativeElement.textContent||""}_isRippleDisabled(){return this.disabled||this.disableRipple||this.selectionList.disableRipple}_handleClick(){this.disabled||!this.selectionList.multiple&&this.selected||(this.toggle(),this.selectionList._emitChangeEvent([this]))}_handleFocus(){this.selectionList._setFocusedOption(this),this._hasFocus=!0}_handleBlur(){this.selectionList._onTouched(),this._hasFocus=!1}_getHostElement(){return this._element.nativeElement}_setSelected(t){return t!==this._selected&&(this._selected=t,t?this.selectionList.selectedOptions.select(this):this.selectionList.selectedOptions.deselect(this),this._changeDetector.markForCheck(),!0)}_markForCheck(){this._changeDetector.markForCheck()}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(a.h),a.Qb(Object(a.X)(()=>B)))},t.\u0275cmp=a.Kb({type:t,selectors:[["mat-list-option"]],contentQueries:function(t,e,i){var n;1&t&&(a.Jb(i,R,!0),a.Jb(i,j,!0),a.Jb(i,s.l,!0)),2&t&&(a.yc(n=a.ec())&&(e._avatar=n.first),a.yc(n=a.ec())&&(e._icon=n.first),a.yc(n=a.ec())&&(e._lines=n))},viewQuery:function(t,e){var i;1&t&&a.Xc(_,!0),2&t&&a.yc(i=a.ec())&&(e._text=i.first)},hostAttrs:["role","option",1,"mat-list-item","mat-list-option","mat-focus-indicator"],hostVars:15,hostBindings:function(t,e){1&t&&a.dc("focus",(function(){return e._handleFocus()}))("blur",(function(){return e._handleBlur()}))("click",(function(){return e._handleClick()})),2&t&&(a.Eb("aria-selected",e.selected)("aria-disabled",e.disabled)("tabindex",-1),a.Ib("mat-list-item-disabled",e.disabled)("mat-list-item-with-avatar",e._avatar||e._icon)("mat-primary","primary"===e.color)("mat-accent","primary"!==e.color&&"warn"!==e.color)("mat-warn","warn"===e.color)("mat-list-single-selected-option",e.selected&&!e.selectionList.multiple))},inputs:{disableRipple:"disableRipple",checkboxPosition:"checkboxPosition",color:"color",value:"value",selected:"selected",disabled:"disabled"},exportAs:["matListOption"],features:[a.Ab],ngContentSelectors:C,decls:7,vars:5,consts:[[1,"mat-list-item-content"],["mat-ripple","",1,"mat-list-item-ripple",3,"matRippleTrigger","matRippleDisabled"],[3,"state","disabled",4,"ngIf"],[1,"mat-list-text"],["text",""],[3,"state","disabled"]],template:function(t,e){1&t&&(a.nc(x),a.Wb(0,"div",0),a.Rb(1,"div",1),a.Oc(2,y,1,2,"mat-pseudo-checkbox",2),a.Wb(3,"div",3,4),a.mc(5),a.Vb(),a.mc(6,1),a.Vb()),2&t&&(a.Ib("mat-list-item-content-reverse","after"==e.checkboxPosition),a.Db(1),a.oc("matRippleTrigger",e._getHostElement())("matRippleDisabled",e._isRippleDisabled()),a.Db(1),a.oc("ngIf",e.selectionList.multiple))},directives:[s.u,n.t,s.s],encapsulation:2,changeDetection:0}),t})(),B=(()=>{class t extends E{constructor(t,e,i,n){super(),this._element=t,this._changeDetector=i,this._focusMonitor=n,this._multiple=!0,this._contentInitialized=!1,this.selectionChange=new a.o,this.tabIndex=0,this.color="accent",this.compareWith=(t,e)=>t===e,this._disabled=!1,this.selectedOptions=new h.c(this._multiple),this._tabIndex=-1,this._onChange=t=>{},this._destroyed=new r.a,this._onTouched=()=>{}}get disabled(){return this._disabled}set disabled(t){this._disabled=Object(o.c)(t),this._markOptionsForCheck()}get multiple(){return this._multiple}set multiple(t){const e=Object(o.c)(t);e!==this._multiple&&(this._multiple=e,this.selectedOptions=new h.c(this._multiple,this.selectedOptions.selected))}ngAfterContentInit(){var t;this._contentInitialized=!0,this._keyManager=new d.g(this.options).withWrap().withTypeAhead().withHomeAndEnd().skipPredicate(()=>!1).withAllowedModifierKeys(["shiftKey"]),this._value&&this._setOptionsFromValues(this._value),this._keyManager.tabOut.pipe(Object(c.a)(this._destroyed)).subscribe(()=>{this._allowFocusEscape()}),this.options.changes.pipe(Object(l.a)(null),Object(c.a)(this._destroyed)).subscribe(()=>{this._updateTabIndex()}),this.selectedOptions.changed.pipe(Object(c.a)(this._destroyed)).subscribe(t=>{if(t.added)for(let e of t.added)e.selected=!0;if(t.removed)for(let e of t.removed)e.selected=!1}),null===(t=this._focusMonitor)||void 0===t||t.monitor(this._element).pipe(Object(c.a)(this._destroyed)).subscribe(t=>{if("keyboard"===t||"program"===t){const t=this._keyManager.activeItemIndex;t&&-1!==t?this._keyManager.setActiveItem(t):this._keyManager.setFirstItemActive()}})}ngOnChanges(t){const e=t.disableRipple,i=t.color;(e&&!e.firstChange||i&&!i.firstChange)&&this._markOptionsForCheck()}ngOnDestroy(){var t;null===(t=this._focusMonitor)||void 0===t||t.stopMonitoring(this._element),this._destroyed.next(),this._destroyed.complete(),this._isDestroyed=!0}focus(t){this._element.nativeElement.focus(t)}selectAll(){this._setAllOptionsSelected(!0)}deselectAll(){this._setAllOptionsSelected(!1)}_setFocusedOption(t){this._keyManager.updateActiveItem(t)}_removeOptionFromList(t){const e=this._getOptionIndex(t);return e>-1&&this._keyManager.activeItemIndex===e&&(e>0?this._keyManager.updateActiveItem(e-1):0===e&&this.options.length>1&&this._keyManager.updateActiveItem(Math.min(e+1,this.options.length-1))),this._keyManager.activeItem}_keydown(t){const e=t.keyCode,i=this._keyManager,n=i.activeItemIndex,a=Object(u.v)(t);switch(e){case u.q:case u.g:a||i.isTyping()||(this._toggleFocusedOption(),t.preventDefault());break;default:if(e===u.a&&this.multiple&&Object(u.v)(t,"ctrlKey")&&!i.isTyping()){const e=this.options.some(t=>!t.disabled&&!t.selected);this._setAllOptionsSelected(e,!0,!0),t.preventDefault()}else i.onKeydown(t)}this.multiple&&(e===u.s||e===u.e)&&t.shiftKey&&i.activeItemIndex!==n&&this._toggleFocusedOption()}_reportValueChange(){if(this.options&&!this._isDestroyed){const t=this._getSelectedOptionValues();this._onChange(t),this._value=t}}_emitChangeEvent(t){this.selectionChange.emit(new N(this,t[0],t))}writeValue(t){this._value=t,this.options&&this._setOptionsFromValues(t||[])}setDisabledState(t){this.disabled=t}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}_setOptionsFromValues(t){this.options.forEach(t=>t._setSelected(!1)),t.forEach(t=>{const e=this.options.find(e=>!e.selected&&this.compareWith(e.value,t));e&&e._setSelected(!0)})}_getSelectedOptionValues(){return this.options.filter(t=>t.selected).map(t=>t.value)}_toggleFocusedOption(){let t=this._keyManager.activeItemIndex;if(null!=t&&this._isValidIndex(t)){let e=this.options.toArray()[t];!e||e.disabled||!this._multiple&&e.selected||(e.toggle(),this._emitChangeEvent([e]))}}_setAllOptionsSelected(t,e,i){const n=[];this.options.forEach(i=>{e&&i.disabled||!i._setSelected(t)||n.push(i)}),n.length&&(this._reportValueChange(),i&&this._emitChangeEvent(n))}_isValidIndex(t){return t>=0&&t<this.options.length}_getOptionIndex(t){return this.options.toArray().indexOf(t)}_markOptionsForCheck(){this.options&&this.options.forEach(t=>t._markForCheck())}_allowFocusEscape(){this._tabIndex=-1,setTimeout(()=>{this._tabIndex=0,this._changeDetector.markForCheck()})}_updateTabIndex(){this._tabIndex=0===this.options.length?-1:0}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.bc("tabindex"),a.Qb(a.h),a.Qb(d.h))},t.\u0275cmp=a.Kb({type:t,selectors:[["mat-selection-list"]],contentQueries:function(t,e,i){var n;1&t&&a.Jb(i,z,!0),2&t&&a.yc(n=a.ec())&&(e.options=n)},hostAttrs:["role","listbox",1,"mat-selection-list","mat-list-base"],hostVars:3,hostBindings:function(t,e){1&t&&a.dc("keydown",(function(t){return e._keydown(t)})),2&t&&a.Eb("aria-multiselectable",e.multiple)("aria-disabled",e.disabled.toString())("tabindex",e._tabIndex)},inputs:{disableRipple:"disableRipple",tabIndex:"tabIndex",color:"color",compareWith:"compareWith",disabled:"disabled",multiple:"multiple"},outputs:{selectionChange:"selectionChange"},exportAs:["matSelectionList"],features:[a.Cb([Q]),a.Ab,a.Bb],ngContentSelectors:f,decls:1,vars:0,template:function(t,e){1&t&&(a.nc(),a.mc(0))},styles:[m],encapsulation:2,changeDetection:0}),t})(),U=(()=>{class t{}return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)},imports:[[s.m,s.v,s.k,s.t,n.c],s.m,s.k,s.t,b.b]}),t})()},NFeN:function(t,e,i){"use strict";i.d(e,"a",(function(){return j})),i.d(e,"b",(function(){return A})),i.d(e,"c",(function(){return D}));var n=i("fXoL"),a=i("FKr1"),s=i("8LU1"),o=i("ofXK"),r=i("LRne"),c=i("z6cu"),l=i("cp0P"),d=i("quSY"),h=i("vkgz"),u=i("lJxs"),p=i("JIr8"),b=i("nYR2"),f=i("w1tV"),m=i("IzEk"),g=i("tk/3"),v=i("jhN1");const _=["*"];function y(t){return Error(`Unable to find icon with the name "${t}"`)}function x(t){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${t}".`)}function C(t){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${t}".`)}class O{constructor(t,e,i){this.url=t,this.svgText=e,this.options=i}}let D=(()=>{class t{constructor(t,e,i,n){this._httpClient=t,this._sanitizer=e,this._errorHandler=n,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._defaultFontSetClass="material-icons",this._document=i}addSvgIcon(t,e,i){return this.addSvgIconInNamespace("",t,e,i)}addSvgIconLiteral(t,e,i){return this.addSvgIconLiteralInNamespace("",t,e,i)}addSvgIconInNamespace(t,e,i,n){return this._addSvgIconConfig(t,e,new O(i,null,n))}addSvgIconLiteralInNamespace(t,e,i,a){const s=this._sanitizer.sanitize(n.M.HTML,i);if(!s)throw C(i);return this._addSvgIconConfig(t,e,new O("",s,a))}addSvgIconSet(t,e){return this.addSvgIconSetInNamespace("",t,e)}addSvgIconSetLiteral(t,e){return this.addSvgIconSetLiteralInNamespace("",t,e)}addSvgIconSetInNamespace(t,e,i){return this._addSvgIconSetConfig(t,new O(e,null,i))}addSvgIconSetLiteralInNamespace(t,e,i){const a=this._sanitizer.sanitize(n.M.HTML,e);if(!a)throw C(e);return this._addSvgIconSetConfig(t,new O("",a,i))}registerFontClassAlias(t,e=t){return this._fontCssClassesByAlias.set(t,e),this}classNameForFontAlias(t){return this._fontCssClassesByAlias.get(t)||t}setDefaultFontSetClass(t){return this._defaultFontSetClass=t,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(t){const e=this._sanitizer.sanitize(n.M.RESOURCE_URL,t);if(!e)throw x(t);const i=this._cachedIconsByUrl.get(e);return i?Object(r.a)(w(i)):this._loadSvgIconFromConfig(new O(t,null)).pipe(Object(h.a)(t=>this._cachedIconsByUrl.set(e,t)),Object(u.a)(t=>w(t)))}getNamedSvgIcon(t,e=""){const i=M(e,t),n=this._svgIconConfigs.get(i);if(n)return this._getSvgFromConfig(n);const a=this._iconSetConfigs.get(e);return a?this._getSvgFromIconSetConfigs(t,a):Object(c.a)(y(i))}ngOnDestroy(){this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(t){return t.svgText?Object(r.a)(w(this._svgElementFromConfig(t))):this._loadSvgIconFromConfig(t).pipe(Object(u.a)(t=>w(t)))}_getSvgFromIconSetConfigs(t,e){const i=this._extractIconWithNameFromAnySet(t,e);if(i)return Object(r.a)(i);const a=e.filter(t=>!t.svgText).map(t=>this._loadSvgIconSetFromConfig(t).pipe(Object(p.a)(e=>{const i=this._sanitizer.sanitize(n.M.RESOURCE_URL,t.url);return this._errorHandler.handleError(new Error(`Loading icon set URL: ${i} failed: ${e.message}`)),Object(r.a)(null)})));return Object(l.a)(a).pipe(Object(u.a)(()=>{const i=this._extractIconWithNameFromAnySet(t,e);if(!i)throw y(t);return i}))}_extractIconWithNameFromAnySet(t,e){for(let i=e.length-1;i>=0;i--){const n=e[i];if(n.svgText&&n.svgText.indexOf(t)>-1){const e=this._svgElementFromConfig(n),i=this._extractSvgIconFromSet(e,t,n.options);if(i)return i}}return null}_loadSvgIconFromConfig(t){return this._fetchIcon(t).pipe(Object(h.a)(e=>t.svgText=e),Object(u.a)(()=>this._svgElementFromConfig(t)))}_loadSvgIconSetFromConfig(t){return t.svgText?Object(r.a)(null):this._fetchIcon(t).pipe(Object(h.a)(e=>t.svgText=e))}_extractSvgIconFromSet(t,e,i){const n=t.querySelector(`[id="${e}"]`);if(!n)return null;const a=n.cloneNode(!0);if(a.removeAttribute("id"),"svg"===a.nodeName.toLowerCase())return this._setSvgAttributes(a,i);if("symbol"===a.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(a),i);const s=this._svgElementFromString("<svg></svg>");return s.appendChild(a),this._setSvgAttributes(s,i)}_svgElementFromString(t){const e=this._document.createElement("DIV");e.innerHTML=t;const i=e.querySelector("svg");if(!i)throw Error("<svg> tag not found");return i}_toSvgElement(t){const e=this._svgElementFromString("<svg></svg>"),i=t.attributes;for(let n=0;n<i.length;n++){const{name:t,value:a}=i[n];"id"!==t&&e.setAttribute(t,a)}for(let n=0;n<t.childNodes.length;n++)t.childNodes[n].nodeType===this._document.ELEMENT_NODE&&e.appendChild(t.childNodes[n].cloneNode(!0));return e}_setSvgAttributes(t,e){return t.setAttribute("fit",""),t.setAttribute("height","100%"),t.setAttribute("width","100%"),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.setAttribute("focusable","false"),e&&e.viewBox&&t.setAttribute("viewBox",e.viewBox),t}_fetchIcon(t){var e;const{url:i,options:a}=t,s=null!==(e=null==a?void 0:a.withCredentials)&&void 0!==e&&e;if(!this._httpClient)throw Error("Could not find HttpClient provider for use with Angular Material icons. Please include the HttpClientModule from @angular/common/http in your app imports.");if(null==i)throw Error(`Cannot fetch icon from URL "${i}".`);const o=this._sanitizer.sanitize(n.M.RESOURCE_URL,i);if(!o)throw x(i);const r=this._inProgressUrlFetches.get(o);if(r)return r;const c=this._httpClient.get(o,{responseType:"text",withCredentials:s}).pipe(Object(b.a)(()=>this._inProgressUrlFetches.delete(o)),Object(f.a)());return this._inProgressUrlFetches.set(o,c),c}_addSvgIconConfig(t,e,i){return this._svgIconConfigs.set(M(t,e),i),this}_addSvgIconSetConfig(t,e){const i=this._iconSetConfigs.get(t);return i?i.push(e):this._iconSetConfigs.set(t,[e]),this}_svgElementFromConfig(t){if(!t.svgElement){const e=this._svgElementFromString(t.svgText);this._setSvgAttributes(e,t.options),t.svgElement=e}return t.svgElement}}return t.\u0275fac=function(e){return new(e||t)(n.ac(g.b,8),n.ac(v.b),n.ac(o.e,8),n.ac(n.n))},t.\u0275prov=Object(n.Mb)({factory:function(){return new t(Object(n.ac)(g.b,8),Object(n.ac)(v.b),Object(n.ac)(o.e,8),Object(n.ac)(n.n))},token:t,providedIn:"root"}),t})();function w(t){return t.cloneNode(!0)}function M(t,e){return t+":"+e}class k{constructor(t){this._elementRef=t}}const S=Object(a.A)(k),I=new n.s("mat-icon-location",{providedIn:"root",factory:function(){const t=Object(n.Y)(o.e),e=t?t.location:null;return{getPathname:()=>e?e.pathname+e.search:""}}}),P=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],V=P.map(t=>`[${t}]`).join(", "),R=/^url\(['"]?#(.*?)['"]?\)$/;let j=(()=>{class t extends S{constructor(t,e,i,n,a){super(t),this._iconRegistry=e,this._location=n,this._errorHandler=a,this._inline=!1,this._currentIconFetch=d.a.EMPTY,i||t.nativeElement.setAttribute("aria-hidden","true")}get inline(){return this._inline}set inline(t){this._inline=Object(s.c)(t)}get svgIcon(){return this._svgIcon}set svgIcon(t){t!==this._svgIcon&&(t?this._updateSvgIcon(t):this._svgIcon&&this._clearSvgElement(),this._svgIcon=t)}get fontSet(){return this._fontSet}set fontSet(t){const e=this._cleanupFontValue(t);e!==this._fontSet&&(this._fontSet=e,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(t){const e=this._cleanupFontValue(t);e!==this._fontIcon&&(this._fontIcon=e,this._updateFontIconClasses())}_splitIconName(t){if(!t)return["",""];const e=t.split(":");switch(e.length){case 1:return["",e[0]];case 2:return e;default:throw Error(`Invalid icon name: "${t}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){const t=this._elementsWithExternalReferences;if(t&&t.size){const t=this._location.getPathname();t!==this._previousPath&&(this._previousPath=t,this._prependPathToReferences(t))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(t){this._clearSvgElement();const e=t.querySelectorAll("style");for(let n=0;n<e.length;n++)e[n].textContent+=" ";const i=this._location.getPathname();this._previousPath=i,this._cacheChildrenWithExternalReferences(t),this._prependPathToReferences(i),this._elementRef.nativeElement.appendChild(t)}_clearSvgElement(){const t=this._elementRef.nativeElement;let e=t.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();e--;){const i=t.childNodes[e];1===i.nodeType&&"svg"!==i.nodeName.toLowerCase()||t.removeChild(i)}}_updateFontIconClasses(){if(!this._usingFontIcon())return;const t=this._elementRef.nativeElement,e=this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet):this._iconRegistry.getDefaultFontSetClass();e!=this._previousFontSetClass&&(this._previousFontSetClass&&t.classList.remove(this._previousFontSetClass),e&&t.classList.add(e),this._previousFontSetClass=e),this.fontIcon!=this._previousFontIconClass&&(this._previousFontIconClass&&t.classList.remove(this._previousFontIconClass),this.fontIcon&&t.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(t){return"string"==typeof t?t.trim().split(" ")[0]:t}_prependPathToReferences(t){const e=this._elementsWithExternalReferences;e&&e.forEach((e,i)=>{e.forEach(e=>{i.setAttribute(e.name,`url('${t}#${e.value}')`)})})}_cacheChildrenWithExternalReferences(t){const e=t.querySelectorAll(V),i=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let n=0;n<e.length;n++)P.forEach(t=>{const a=e[n],s=a.getAttribute(t),o=s?s.match(R):null;if(o){let e=i.get(a);e||(e=[],i.set(a,e)),e.push({name:t,value:o[1]})}})}_updateSvgIcon(t){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),t){const[e,i]=this._splitIconName(t);e&&(this._svgNamespace=e),i&&(this._svgName=i),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(i,e).pipe(Object(m.a)(1)).subscribe(t=>this._setSvgElement(t),t=>{this._errorHandler.handleError(new Error(`Error retrieving icon ${e}:${i}! ${t.message}`))})}}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(D),n.bc("aria-hidden"),n.Qb(I),n.Qb(n.n))},t.\u0275cmp=n.Kb({type:t,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:7,hostBindings:function(t,e){2&t&&(n.Eb("data-mat-icon-type",e._usingFontIcon()?"font":"svg")("data-mat-icon-name",e._svgName||e.fontIcon)("data-mat-icon-namespace",e._svgNamespace||e.fontSet),n.Ib("mat-icon-inline",e.inline)("mat-icon-no-color","primary"!==e.color&&"accent"!==e.color&&"warn"!==e.color))},inputs:{color:"color",inline:"inline",svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],features:[n.Ab],ngContentSelectors:_,decls:1,vars:0,template:function(t,e){1&t&&(n.nc(),n.mc(0))},styles:[".mat-icon{background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}\n"],encapsulation:2,changeDetection:0}),t})(),A=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[a.k],a.k]}),t})()},NJ4a:function(t,e,i){"use strict";function n(t){setTimeout(()=>{throw t},0)}i.d(e,"a",(function(){return n}))},NXyV:function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var n=i("HDdC"),a=i("Cfvw"),s=i("EY2u");function o(t){return new n.a(e=>{let i;try{i=t()}catch(n){return void e.error(n)}return(i?Object(a.a)(i):Object(s.b)()).subscribe(e)})}},NpuA:function(t,e,i){var n,a;void 0===(a="function"==typeof(n=function t(){"use strict";var e="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:{},i=!e.document&&!!e.postMessage,n=i&&/blob:/i.test((e.location||{}).protocol),a={},s=0,o={parse:function(i,n){var r=(n=n||{}).dynamicTyping||!1;if(x(r)&&(n.dynamicTypingFunction=r,r={}),n.dynamicTyping=r,n.transform=!!x(n.transform)&&n.transform,n.worker&&o.WORKERS_SUPPORTED){var c=function(){if(!o.WORKERS_SUPPORTED)return!1;var i,n,r=(i=e.URL||e.webkitURL||null,n=t.toString(),o.BLOB_URL||(o.BLOB_URL=i.createObjectURL(new Blob(["(",n,")();"],{type:"text/javascript"})))),c=new e.Worker(r);return c.onmessage=m,c.id=s++,a[c.id]=c}();return c.userStep=n.step,c.userChunk=n.chunk,c.userComplete=n.complete,c.userError=n.error,n.step=x(n.step),n.chunk=x(n.chunk),n.complete=x(n.complete),n.error=x(n.error),delete n.worker,void c.postMessage({input:i,config:n,workerId:c.id})}var p=null;return"string"==typeof i?p=n.download?new l(n):new h(n):!0===i.readable&&x(i.read)&&x(i.on)?p=new u(n):(e.File&&i instanceof File||i instanceof Object)&&(p=new d(n)),p.stream(i)},unparse:function(t,e){var i=!1,n=!0,a=",",s="\r\n",r='"',c=r+r,l=!1,d=null,h=!1;!function(){if("object"==typeof e){if("string"!=typeof e.delimiter||o.BAD_DELIMITERS.filter((function(t){return-1!==e.delimiter.indexOf(t)})).length||(a=e.delimiter),("boolean"==typeof e.quotes||"function"==typeof e.quotes||Array.isArray(e.quotes))&&(i=e.quotes),"boolean"!=typeof e.skipEmptyLines&&"string"!=typeof e.skipEmptyLines||(l=e.skipEmptyLines),"string"==typeof e.newline&&(s=e.newline),"string"==typeof e.quoteChar&&(r=e.quoteChar),"boolean"==typeof e.header&&(n=e.header),Array.isArray(e.columns)){if(0===e.columns.length)throw new Error("Option columns is empty");d=e.columns}void 0!==e.escapeChar&&(c=e.escapeChar+r),"boolean"==typeof e.escapeFormulae&&(h=e.escapeFormulae)}}();var u=new RegExp(b(r),"g");if("string"==typeof t&&(t=JSON.parse(t)),Array.isArray(t)){if(!t.length||Array.isArray(t[0]))return f(null,t,l);if("object"==typeof t[0])return f(d||p(t[0]),t,l)}else if("object"==typeof t)return"string"==typeof t.data&&(t.data=JSON.parse(t.data)),Array.isArray(t.data)&&(t.fields||(t.fields=t.meta&&t.meta.fields),t.fields||(t.fields=Array.isArray(t.data[0])?t.fields:p(t.data[0])),Array.isArray(t.data[0])||"object"==typeof t.data[0]||(t.data=[t.data])),f(t.fields||[],t.data||[],l);throw new Error("Unable to serialize unrecognized input");function p(t){if("object"!=typeof t)return[];var e=[];for(var i in t)e.push(i);return e}function f(t,e,i){var o="";"string"==typeof t&&(t=JSON.parse(t)),"string"==typeof e&&(e=JSON.parse(e));var r=Array.isArray(t)&&0<t.length,c=!Array.isArray(e[0]);if(r&&n){for(var l=0;l<t.length;l++)0<l&&(o+=a),o+=m(t[l],l);0<e.length&&(o+=s)}for(var d=0;d<e.length;d++){var h=r?t.length:e[d].length,u=!1,p=r?0===Object.keys(e[d]).length:0===e[d].length;if(i&&!r&&(u="greedy"===i?""===e[d].join("").trim():1===e[d].length&&0===e[d][0].length),"greedy"===i&&r){for(var b=[],f=0;f<h;f++)b.push(e[d][c?t[f]:f]);u=""===b.join("").trim()}if(!u){for(var g=0;g<h;g++)0<g&&!p&&(o+=a),o+=m(e[d][r&&c?t[g]:g],g);d<e.length-1&&(!i||0<h&&!p)&&(o+=s)}}return o}function m(t,e){if(null==t)return"";if(t.constructor===Date)return JSON.stringify(t).slice(1,25);!0===h&&"string"==typeof t&&null!==t.match(/^[=+\-@].*$/)&&(t="'"+t);var n=t.toString().replace(u,c);return"boolean"==typeof i&&i||"function"==typeof i&&i(t,e)||Array.isArray(i)&&i[e]||function(t,e){for(var i=0;i<e.length;i++)if(-1<t.indexOf(e[i]))return!0;return!1}(n,o.BAD_DELIMITERS)||-1<n.indexOf(a)||" "===n.charAt(0)||" "===n.charAt(n.length-1)?r+n+r:n}}};if(o.RECORD_SEP=String.fromCharCode(30),o.UNIT_SEP=String.fromCharCode(31),o.BYTE_ORDER_MARK="\ufeff",o.BAD_DELIMITERS=["\r","\n",'"',o.BYTE_ORDER_MARK],o.WORKERS_SUPPORTED=!i&&!!e.Worker,o.NODE_STREAM_INPUT=1,o.LocalChunkSize=10485760,o.RemoteChunkSize=5242880,o.DefaultDelimiter=",",o.Parser=f,o.ParserHandle=p,o.NetworkStreamer=l,o.FileStreamer=d,o.StringStreamer=h,o.ReadableStreamStreamer=u,e.jQuery){var r=e.jQuery;r.fn.parse=function(t){var i=t.config||{},n=[];return this.each((function(t){if("INPUT"!==r(this).prop("tagName").toUpperCase()||"file"!==r(this).attr("type").toLowerCase()||!e.FileReader||!this.files||0===this.files.length)return!0;for(var a=0;a<this.files.length;a++)n.push({file:this.files[a],inputElem:this,instanceConfig:r.extend({},i)})})),a(),this;function a(){if(0!==n.length){var e,i,a,c=n[0];if(x(t.before)){var l=t.before(c.file,c.inputElem);if("object"==typeof l){if("abort"===l.action)return e=c.file,i=c.inputElem,a=l.reason,void(x(t.error)&&t.error({name:"AbortError"},e,i,a));if("skip"===l.action)return void s();"object"==typeof l.config&&(c.instanceConfig=r.extend(c.instanceConfig,l.config))}else if("skip"===l)return void s()}var d=c.instanceConfig.complete;c.instanceConfig.complete=function(t){x(d)&&d(t,c.file,c.inputElem),s()},o.parse(c.file,c.instanceConfig)}else x(t.complete)&&t.complete()}function s(){n.splice(0,1),a()}}}function c(t){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(t){var e=_(t);e.chunkSize=parseInt(e.chunkSize),t.step||t.chunk||(e.chunkSize=null),this._handle=new p(e),(this._handle.streamer=this)._config=e}).call(this,t),this.parseChunk=function(t,i){if(this.isFirstChunk&&x(this._config.beforeFirstChunk)){var a=this._config.beforeFirstChunk(t);void 0!==a&&(t=a)}this.isFirstChunk=!1,this._halted=!1;var s=this._partialLine+t;this._partialLine="";var r=this._handle.parse(s,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var c=r.meta.cursor;this._finished||(this._partialLine=s.substring(c-this._baseIndex),this._baseIndex=c),r&&r.data&&(this._rowCount+=r.data.length);var l=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(n)e.postMessage({results:r,workerId:o.WORKER_ID,finished:l});else if(x(this._config.chunk)&&!i){if(this._config.chunk(r,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);r=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(r.data),this._completeResults.errors=this._completeResults.errors.concat(r.errors),this._completeResults.meta=r.meta),this._completed||!l||!x(this._config.complete)||r&&r.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),l||r&&r.meta.paused||this._nextChunk(),r}this._halted=!0},this._sendError=function(t){x(this._config.error)?this._config.error(t):n&&this._config.error&&e.postMessage({workerId:o.WORKER_ID,error:t,finished:!1})}}function l(t){var e;(t=t||{}).chunkSize||(t.chunkSize=o.RemoteChunkSize),c.call(this,t),this._nextChunk=i?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(t){this._input=t,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(e=new XMLHttpRequest,this._config.withCredentials&&(e.withCredentials=this._config.withCredentials),i||(e.onload=y(this._chunkLoaded,this),e.onerror=y(this._chunkError,this)),e.open(this._config.downloadRequestBody?"POST":"GET",this._input,!i),this._config.downloadRequestHeaders){var t=this._config.downloadRequestHeaders;for(var n in t)e.setRequestHeader(n,t[n])}this._config.chunkSize&&e.setRequestHeader("Range","bytes="+this._start+"-"+(this._start+this._config.chunkSize-1));try{e.send(this._config.downloadRequestBody)}catch(t){this._chunkError(t.message)}i&&0===e.status&&this._chunkError()}},this._chunkLoaded=function(){4===e.readyState&&(e.status<200||400<=e.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:e.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(t){var e=t.getResponseHeader("Content-Range");return null===e?-1:parseInt(e.substring(e.lastIndexOf("/")+1))}(e),this.parseChunk(e.responseText)))},this._chunkError=function(t){this._sendError(new Error(e.statusText||t))}}function d(t){var e,i;(t=t||{}).chunkSize||(t.chunkSize=o.LocalChunkSize),c.call(this,t);var n="undefined"!=typeof FileReader;this.stream=function(t){this._input=t,i=t.slice||t.webkitSlice||t.mozSlice,n?((e=new FileReader).onload=y(this._chunkLoaded,this),e.onerror=y(this._chunkError,this)):e=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var t=this._input;if(this._config.chunkSize){var a=Math.min(this._start+this._config.chunkSize,this._input.size);t=i.call(t,this._start,a)}var s=e.readAsText(t,this._config.encoding);n||this._chunkLoaded({target:{result:s}})},this._chunkLoaded=function(t){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(t.target.result)},this._chunkError=function(){this._sendError(e.error)}}function h(t){var e;c.call(this,t=t||{}),this.stream=function(t){return e=t,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var t,i=this._config.chunkSize;return i?(t=e.substring(0,i),e=e.substring(i)):(t=e,e=""),this._finished=!e,this.parseChunk(t)}}}function u(t){c.call(this,t=t||{});var e=[],i=!0,n=!1;this.pause=function(){c.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){c.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(t){this._input=t,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){n&&1===e.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),e.length?this.parseChunk(e.shift()):i=!0},this._streamData=y((function(t){try{e.push("string"==typeof t?t:t.toString(this._config.encoding)),i&&(i=!1,this._checkIsFinished(),this.parseChunk(e.shift()))}catch(t){this._streamError(t)}}),this),this._streamError=y((function(t){this._streamCleanUp(),this._sendError(t)}),this),this._streamEnd=y((function(){this._streamCleanUp(),n=!0,this._streamData("")}),this),this._streamCleanUp=y((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function p(t){var e,i,n,a=Math.pow(2,53),s=-a,r=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)(e[-+]?\d+)?\s*$/,c=/(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))/,l=this,d=0,h=0,u=!1,p=!1,m=[],g={data:[],errors:[],meta:{}};if(x(t.step)){var v=t.step;t.step=function(e){if(g=e,O())C();else{if(C(),0===g.data.length)return;d+=e.data.length,t.preview&&d>t.preview?i.abort():(g.data=g.data[0],v(g,l))}}}function y(e){return"greedy"===t.skipEmptyLines?""===e.join("").trim():1===e.length&&0===e[0].length}function C(){if(g&&n&&(w("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),n=!1),t.skipEmptyLines)for(var e=0;e<g.data.length;e++)y(g.data[e])&&g.data.splice(e--,1);return O()&&function(){if(g)if(Array.isArray(g.data[0])){for(var e=0;O()&&e<g.data.length;e++)g.data[e].forEach(i);g.data.splice(0,1)}else g.data.forEach(i);function i(e,i){x(t.transformHeader)&&(e=t.transformHeader(e,i)),m.push(e)}}(),function(){if(!g||!t.header&&!t.dynamicTyping&&!t.transform)return g;function e(e,i){var n,a=t.header?{}:[];for(n=0;n<e.length;n++){var s=n,o=e[n];t.header&&(s=n>=m.length?"__parsed_extra":m[n]),t.transform&&(o=t.transform(o,s)),o=D(s,o),"__parsed_extra"===s?(a[s]=a[s]||[],a[s].push(o)):a[s]=o}return t.header&&(n>m.length?w("FieldMismatch","TooManyFields","Too many fields: expected "+m.length+" fields but parsed "+n,h+i):n<m.length&&w("FieldMismatch","TooFewFields","Too few fields: expected "+m.length+" fields but parsed "+n,h+i)),a}var i=1;return!g.data.length||Array.isArray(g.data[0])?(g.data=g.data.map(e),i=g.data.length):g.data=e(g.data,0),t.header&&g.meta&&(g.meta.fields=m),h+=i,g}()}function O(){return t.header&&0===m.length}function D(e,i){return n=e,t.dynamicTypingFunction&&void 0===t.dynamicTyping[n]&&(t.dynamicTyping[n]=t.dynamicTypingFunction(n)),!0===(t.dynamicTyping[n]||t.dynamicTyping)?"true"===i||"TRUE"===i||"false"!==i&&"FALSE"!==i&&(function(t){if(r.test(t)){var e=parseFloat(t);if(s<e&&e<a)return!0}return!1}(i)?parseFloat(i):c.test(i)?new Date(i):""===i?null:i):i;var n}function w(t,e,i,n){var a={type:t,code:e,message:i};void 0!==n&&(a.row=n),g.errors.push(a)}this.parse=function(a,s,r){if(t.newline||(t.newline=function(t,e){t=t.substring(0,1048576);var i=new RegExp(b(e)+"([^]*?)"+b(e),"gm"),n=(t=t.replace(i,"")).split("\r"),a=t.split("\n");if(1===n.length||1<a.length&&a[0].length<n[0].length)return"\n";for(var s=0,o=0;o<n.length;o++)"\n"===n[o][0]&&s++;return s>=n.length/2?"\r\n":"\r"}(a,t.quoteChar||'"')),n=!1,t.delimiter)x(t.delimiter)&&(t.delimiter=t.delimiter(a),g.meta.delimiter=t.delimiter);else{var c=function(e,i,n,a,s){var r,c,l,d;s=s||[",","\t","|",";",o.RECORD_SEP,o.UNIT_SEP];for(var h=0;h<s.length;h++){var u=s[h],p=0,b=0,m=0;l=void 0;for(var g=new f({comments:a,delimiter:u,newline:i,preview:10}).parse(e),v=0;v<g.data.length;v++)if(n&&y(g.data[v]))m++;else{var _=g.data[v].length;b+=_,void 0!==l?0<_&&(p+=Math.abs(_-l),l=_):l=_}0<g.data.length&&(b/=g.data.length-m),(void 0===c||p<=c)&&(void 0===d||d<b)&&1.99<b&&(c=p,r=u,d=b)}return{successful:!!(t.delimiter=r),bestDelimiter:r}}(a,t.newline,t.skipEmptyLines,t.comments,t.delimitersToGuess);c.successful?t.delimiter=c.bestDelimiter:(n=!0,t.delimiter=o.DefaultDelimiter),g.meta.delimiter=t.delimiter}var l=_(t);return t.preview&&t.header&&l.preview++,e=a,i=new f(l),g=i.parse(e,s,r),C(),u?{meta:{paused:!0}}:g||{meta:{paused:!1}}},this.paused=function(){return u},this.pause=function(){u=!0,i.abort(),e=x(t.chunk)?"":e.substring(i.getCharIndex())},this.resume=function(){l.streamer._halted?(u=!1,l.streamer.parseChunk(e,!0)):setTimeout(l.resume,3)},this.aborted=function(){return p},this.abort=function(){p=!0,i.abort(),g.meta.aborted=!0,x(t.complete)&&t.complete(g),e=""}}function b(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function f(t){var e,i=(t=t||{}).delimiter,n=t.newline,a=t.comments,s=t.step,r=t.preview,c=t.fastMode,l=e=void 0===t.quoteChar?'"':t.quoteChar;if(void 0!==t.escapeChar&&(l=t.escapeChar),("string"!=typeof i||-1<o.BAD_DELIMITERS.indexOf(i))&&(i=","),a===i)throw new Error("Comment character same as delimiter");!0===a?a="#":("string"!=typeof a||-1<o.BAD_DELIMITERS.indexOf(a))&&(a=!1),"\n"!==n&&"\r"!==n&&"\r\n"!==n&&(n="\n");var d=0,h=!1;this.parse=function(t,o,u){if("string"!=typeof t)throw new Error("Input must be a string");var p=t.length,f=i.length,m=n.length,g=a.length,v=x(s),_=[],y=[],C=[],O=d=0;if(!t)return E();if(c||!1!==c&&-1===t.indexOf(e)){for(var D=t.split(n),w=0;w<D.length;w++){if(d+=(C=D[w]).length,w!==D.length-1)d+=n.length;else if(u)return E();if(!a||C.substring(0,g)!==a){if(v){if(_=[],j(C.split(i)),F(),h)return E()}else j(C.split(i));if(r&&r<=w)return _=_.slice(0,r),E(!0)}}return E()}for(var M=t.indexOf(i,d),k=t.indexOf(n,d),S=new RegExp(b(l)+b(e),"g"),I=t.indexOf(e,d);;)if(t[d]!==e)if(a&&0===C.length&&t.substring(d,d+g)===a){if(-1===k)return E();k=t.indexOf(n,d=k+m),M=t.indexOf(i,d)}else{if(-1!==M&&(M<k||-1===k)){if(!(M<I)){C.push(t.substring(d,M)),M=t.indexOf(i,d=M+f);continue}var P=L(M,I,k);if(P&&void 0!==P.nextDelim){I=P.quoteSearch,C.push(t.substring(d,M=P.nextDelim)),M=t.indexOf(i,d=M+f);continue}}if(-1===k)break;if(C.push(t.substring(d,k)),T(k+m),v&&(F(),h))return E();if(r&&_.length>=r)return E(!0)}else for(I=d,d++;;){if(-1===(I=t.indexOf(e,I+1)))return u||y.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:_.length,index:d}),W();if(I===p-1)return W(t.substring(d,I).replace(S,e));if(e!==l||t[I+1]!==l){if(e===l||0===I||t[I-1]!==l){-1!==M&&M<I+1&&(M=t.indexOf(i,I+1)),-1!==k&&k<I+1&&(k=t.indexOf(n,I+1));var V=A(-1===k?M:Math.min(M,k));if(t[I+1+V]===i){C.push(t.substring(d,I).replace(S,e)),t[d=I+1+V+f]!==e&&(I=t.indexOf(e,d)),M=t.indexOf(i,d),k=t.indexOf(n,d);break}var R=A(k);if(t.substring(I+1+R,I+1+R+m)===n){if(C.push(t.substring(d,I).replace(S,e)),T(I+1+R+m),M=t.indexOf(i,d),I=t.indexOf(e,d),v&&(F(),h))return E();if(r&&_.length>=r)return E(!0);break}y.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:_.length,index:d}),I++}}else I++}return W();function j(t){_.push(t),O=d}function A(e){var i=0;if(-1!==e){var n=t.substring(I+1,e);n&&""===n.trim()&&(i=n.length)}return i}function W(e){return u||(void 0===e&&(e=t.substring(d)),C.push(e),d=p,j(C),v&&F()),E()}function T(e){d=e,j(C),C=[],k=t.indexOf(n,d)}function E(t){return{data:_,errors:y,meta:{delimiter:i,linebreak:n,aborted:h,truncated:!!t,cursor:O+(o||0)}}}function F(){s(E()),_=[],y=[]}function L(n,a,s){var o={nextDelim:void 0,quoteSearch:void 0},r=t.indexOf(e,a+1);if(a<n&&n<r&&(r<s||-1===s)){var c=t.indexOf(i,r);if(-1===c)return o;r<c&&(r=t.indexOf(e,r+1)),o=L(c,r,s)}else o={nextDelim:n,quoteSearch:a};return o}},this.abort=function(){h=!0},this.getCharIndex=function(){return d}}function m(t){var e=t.data,i=a[e.workerId],n=!1;if(e.error)i.userError(e.error,e.file);else if(e.results&&e.results.data){var s={abort:function(){n=!0,g(e.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:v,resume:v};if(x(i.userStep)){for(var o=0;o<e.results.data.length&&(i.userStep({data:e.results.data[o],errors:e.results.errors,meta:e.results.meta},s),!n);o++);delete e.results}else x(i.userChunk)&&(i.userChunk(e.results,s,e.file),delete e.results)}e.finished&&!n&&g(e.workerId,e.results)}function g(t,e){var i=a[t];x(i.userComplete)&&i.userComplete(e),i.terminate(),delete a[t]}function v(){throw new Error("Not implemented.")}function _(t){if("object"!=typeof t||null===t)return t;var e=Array.isArray(t)?[]:{};for(var i in t)e[i]=_(t[i]);return e}function y(t,e){return function(){t.apply(e,arguments)}}function x(t){return"function"==typeof t}return n&&(e.onmessage=function(t){var i=t.data;if(void 0===o.WORKER_ID&&i&&(o.WORKER_ID=i.workerId),"string"==typeof i.input)e.postMessage({workerId:o.WORKER_ID,results:o.parse(i.input,i.config),finished:!0});else if(e.File&&i.input instanceof File||i.input instanceof Object){var n=o.parse(i.input,i.config);n&&e.postMessage({workerId:o.WORKER_ID,results:n,finished:!0})}}),(l.prototype=Object.create(c.prototype)).constructor=l,(d.prototype=Object.create(c.prototype)).constructor=d,(h.prototype=Object.create(h.prototype)).constructor=h,(u.prototype=Object.create(c.prototype)).constructor=u,o})?n.apply(e,[]):n)||(t.exports=a)},PqYM:function(t,e,i){"use strict";i.d(e,"a",(function(){return r}));var n=i("HDdC"),a=i("D0XW"),s=i("Y7HM"),o=i("z+Ro");function r(t=0,e,i){let r=-1;return Object(s.a)(e)?r=Number(e)<1?1:Number(e):Object(o.a)(e)&&(i=e),Object(o.a)(i)||(i=a.a),new n.a(e=>{const n=Object(s.a)(t)?t:+t-i.now();return i.schedule(c,n,{index:0,period:r,subscriber:e})})}function c(t){const{index:e,period:i,subscriber:n}=t;if(n.next(e),!n.closed){if(-1===i)return n.complete();t.index=e+1,this.schedule(t,i)}}},QibW:function(t,e,i){"use strict";i.d(e,"a",(function(){return D})),i.d(e,"b",(function(){return _})),i.d(e,"c",(function(){return w}));var n=i("fXoL"),a=i("FKr1"),s=i("8LU1"),o=i("3Pt+"),r=i("R1ws"),c=i("u47x"),l=i("0EQZ");const d=["input"],h=function(){return{enterDuration:150}},u=["*"],p=new n.s("mat-radio-default-options",{providedIn:"root",factory:function(){return{color:"accent"}}});let b=0;const f={provide:o.s,useExisting:Object(n.X)(()=>_),multi:!0};class m{constructor(t,e){this.source=t,this.value=e}}const g=new n.s("MatRadioGroup");let v=(()=>{class t{constructor(t){this._changeDetector=t,this._value=null,this._name="mat-radio-group-"+b++,this._selected=null,this._isInitialized=!1,this._labelPosition="after",this._disabled=!1,this._required=!1,this._controlValueAccessorChangeFn=()=>{},this.onTouched=()=>{},this.change=new n.o}get name(){return this._name}set name(t){this._name=t,this._updateRadioButtonNames()}get labelPosition(){return this._labelPosition}set labelPosition(t){this._labelPosition="before"===t?"before":"after",this._markRadiosForCheck()}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,this._updateSelectedRadioFromValue(),this._checkSelectedRadioButton())}_checkSelectedRadioButton(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)}get selected(){return this._selected}set selected(t){this._selected=t,this.value=t?t.value:null,this._checkSelectedRadioButton()}get disabled(){return this._disabled}set disabled(t){this._disabled=Object(s.c)(t),this._markRadiosForCheck()}get required(){return this._required}set required(t){this._required=Object(s.c)(t),this._markRadiosForCheck()}ngAfterContentInit(){this._isInitialized=!0}_touch(){this.onTouched&&this.onTouched()}_updateRadioButtonNames(){this._radios&&this._radios.forEach(t=>{t.name=this.name,t._markForCheck()})}_updateSelectedRadioFromValue(){this._radios&&(null===this._selected||this._selected.value!==this._value)&&(this._selected=null,this._radios.forEach(t=>{t.checked=this.value===t.value,t.checked&&(this._selected=t)}))}_emitChangeEvent(){this._isInitialized&&this.change.emit(new m(this._selected,this._value))}_markRadiosForCheck(){this._radios&&this._radios.forEach(t=>t._markForCheck())}writeValue(t){this.value=t,this._changeDetector.markForCheck()}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t,this._changeDetector.markForCheck()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.h))},t.\u0275dir=n.Lb({type:t,inputs:{name:"name",labelPosition:"labelPosition",value:"value",selected:"selected",disabled:"disabled",required:"required",color:"color"},outputs:{change:"change"}}),t})(),_=(()=>{class t extends v{}return t.\u0275fac=function(e){return y(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["mat-radio-group"]],contentQueries:function(t,e,i){var a;1&t&&n.Jb(i,D,!0),2&t&&n.yc(a=n.ec())&&(e._radios=a)},hostAttrs:["role","radiogroup",1,"mat-radio-group"],exportAs:["matRadioGroup"],features:[n.Cb([f,{provide:g,useExisting:t}]),n.Ab]}),t})();const y=n.Yb(_);class x{constructor(t){this._elementRef=t}}const C=Object(a.B)(Object(a.F)(x));let O=(()=>{class t extends C{constructor(t,e,i,a,o,r,c,l){super(e),this._changeDetector=i,this._focusMonitor=a,this._radioDispatcher=o,this._animationMode=r,this._providerOverride=c,this._uniqueId="mat-radio-"+ ++b,this.id=this._uniqueId,this.change=new n.o,this._checked=!1,this._value=null,this._removeUniqueSelectionListener=()=>{},this.radioGroup=t,l&&(this.tabIndex=Object(s.f)(l,0)),this._removeUniqueSelectionListener=o.listen((t,e)=>{t!==this.id&&e===this.name&&(this.checked=!1)})}get checked(){return this._checked}set checked(t){const e=Object(s.c)(t);this._checked!==e&&(this._checked=e,e&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!e&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),e&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,null!==this.radioGroup&&(this.checked||(this.checked=this.radioGroup.value===t),this.checked&&(this.radioGroup.selected=this)))}get labelPosition(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"}set labelPosition(t){this._labelPosition=t}get disabled(){return this._disabled||null!==this.radioGroup&&this.radioGroup.disabled}set disabled(t){this._setDisabled(Object(s.c)(t))}get required(){return this._required||this.radioGroup&&this.radioGroup.required}set required(t){this._required=Object(s.c)(t)}get color(){return this._color||this.radioGroup&&this.radioGroup.color||this._providerOverride&&this._providerOverride.color||"accent"}set color(t){this._color=t}get inputId(){return(this.id||this._uniqueId)+"-input"}focus(t){this._focusMonitor.focusVia(this._inputElement,"keyboard",t)}_markForCheck(){this._changeDetector.markForCheck()}ngOnInit(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.name=this.radioGroup.name)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{!t&&this.radioGroup&&this.radioGroup._touch()})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()}_emitChangeEvent(){this.change.emit(new m(this,this._value))}_isRippleDisabled(){return this.disableRipple||this.disabled}_onInputClick(t){t.stopPropagation()}_onInputChange(t){t.stopPropagation();const e=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),e&&this.radioGroup._emitChangeEvent())}_setDisabled(t){this._disabled!==t&&(this._disabled=t,this._changeDetector.markForCheck())}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(v),n.Qb(n.l),n.Qb(n.h),n.Qb(c.h),n.Qb(l.d),n.Qb(String),n.Qb(void 0),n.Qb(String))},t.\u0275dir=n.Lb({type:t,viewQuery:function(t,e){var i;1&t&&n.Xc(d,!0),2&t&&n.yc(i=n.ec())&&(e._inputElement=i.first)},inputs:{id:"id",checked:"checked",value:"value",labelPosition:"labelPosition",disabled:"disabled",required:"required",color:"color",name:"name",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"]},outputs:{change:"change"},features:[n.Ab]}),t})(),D=(()=>{class t extends O{constructor(t,e,i,n,a,s,o,r){super(t,e,i,n,a,s,o,r)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g,8),n.Qb(n.l),n.Qb(n.h),n.Qb(c.h),n.Qb(l.d),n.Qb(r.a,8),n.Qb(p,8),n.bc("tabindex"))},t.\u0275cmp=n.Kb({type:t,selectors:[["mat-radio-button"]],hostAttrs:[1,"mat-radio-button"],hostVars:17,hostBindings:function(t,e){1&t&&n.dc("focus",(function(){return e._inputElement.nativeElement.focus()})),2&t&&(n.Eb("tabindex",-1)("id",e.id)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),n.Ib("mat-radio-checked",e.checked)("mat-radio-disabled",e.disabled)("_mat-animation-noopable","NoopAnimations"===e._animationMode)("mat-primary","primary"===e.color)("mat-accent","accent"===e.color)("mat-warn","warn"===e.color))},inputs:{disableRipple:"disableRipple",tabIndex:"tabIndex"},exportAs:["matRadioButton"],features:[n.Ab],ngContentSelectors:u,decls:13,vars:19,consts:[[1,"mat-radio-label"],["label",""],[1,"mat-radio-container"],[1,"mat-radio-outer-circle"],[1,"mat-radio-inner-circle"],["type","radio",1,"mat-radio-input","cdk-visually-hidden",3,"id","checked","disabled","tabIndex","required","change","click"],["input",""],["mat-ripple","",1,"mat-radio-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered","matRippleRadius","matRippleAnimation"],[1,"mat-ripple-element","mat-radio-persistent-ripple"],[1,"mat-radio-label-content"],[2,"display","none"]],template:function(t,e){if(1&t&&(n.nc(),n.Wb(0,"label",0,1),n.Wb(2,"div",2),n.Rb(3,"div",3),n.Rb(4,"div",4),n.Wb(5,"input",5,6),n.dc("change",(function(t){return e._onInputChange(t)}))("click",(function(t){return e._onInputClick(t)})),n.Vb(),n.Wb(7,"div",7),n.Rb(8,"div",8),n.Vb(),n.Vb(),n.Wb(9,"div",9),n.Wb(10,"span",10),n.Qc(11,"\xa0"),n.Vb(),n.mc(12),n.Vb(),n.Vb()),2&t){const t=n.zc(1);n.Eb("for",e.inputId),n.Db(5),n.oc("id",e.inputId)("checked",e.checked)("disabled",e.disabled)("tabIndex",e.tabIndex)("required",e.required),n.Eb("name",e.name)("value",e.value)("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby)("aria-describedby",e.ariaDescribedby),n.Db(2),n.oc("matRippleTrigger",t)("matRippleDisabled",e._isRippleDisabled())("matRippleCentered",!0)("matRippleRadius",20)("matRippleAnimation",n.uc(18,h)),n.Db(2),n.Ib("mat-radio-label-before","before"==e.labelPosition)}},directives:[a.u],styles:[".mat-radio-button{display:inline-block;-webkit-tap-highlight-color:transparent;outline:0}.mat-radio-label{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;display:inline-flex;align-items:center;white-space:nowrap;vertical-align:middle;width:100%}.mat-radio-container{box-sizing:border-box;display:inline-block;position:relative;width:20px;height:20px;flex-shrink:0}.mat-radio-outer-circle{box-sizing:border-box;height:20px;left:0;position:absolute;top:0;transition:border-color ease 280ms;width:20px;border-width:2px;border-style:solid;border-radius:50%}._mat-animation-noopable .mat-radio-outer-circle{transition:none}.mat-radio-inner-circle{border-radius:50%;box-sizing:border-box;height:20px;left:0;position:absolute;top:0;transition:transform ease 280ms,background-color ease 280ms;width:20px;transform:scale(0.001)}._mat-animation-noopable .mat-radio-inner-circle{transition:none}.mat-radio-checked .mat-radio-inner-circle{transform:scale(0.5)}.cdk-high-contrast-active .mat-radio-checked .mat-radio-inner-circle{border:solid 10px}.mat-radio-label-content{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto;display:inline-block;order:0;line-height:inherit;padding-left:8px;padding-right:0}[dir=rtl] .mat-radio-label-content{padding-right:8px;padding-left:0}.mat-radio-label-content.mat-radio-label-before{order:-1;padding-left:0;padding-right:8px}[dir=rtl] .mat-radio-label-content.mat-radio-label-before{padding-right:0;padding-left:8px}.mat-radio-disabled,.mat-radio-disabled .mat-radio-label{cursor:default}.mat-radio-button .mat-radio-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-radio-button .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple){opacity:.16}.mat-radio-persistent-ripple{width:100%;height:100%;transform:none}.mat-radio-container:hover .mat-radio-persistent-ripple{opacity:.04}.mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-persistent-ripple,.mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-persistent-ripple{opacity:.12}.mat-radio-persistent-ripple,.mat-radio-disabled .mat-radio-container:hover .mat-radio-persistent-ripple{opacity:0}@media(hover: none){.mat-radio-container:hover .mat-radio-persistent-ripple{display:none}}.mat-radio-input{bottom:0;left:50%}.cdk-high-contrast-active .mat-radio-disabled{opacity:.5}\n"],encapsulation:2,changeDetection:0}),t})(),w=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[a.v,a.k],a.k]}),t})()},Qu3c:function(t,e,i){"use strict";i.d(e,"a",(function(){return O})),i.d(e,"b",(function(){return D})),i.d(e,"c",(function(){return M})),i.d(e,"d",(function(){return w}));var n=i("rDax"),a=i("u47x"),s=i("ofXK"),o=i("fXoL"),r=i("FKr1"),c=i("vxfF"),l=i("8LU1"),d=i("FtGj"),h=i("0MNC"),u=i("nLfN"),p=i("+rOU"),b=i("XNiG"),f=i("1G5W"),m=i("IzEk"),g=i("R0Ic"),v=i("cH1L");const _={tooltipState:Object(g.n)("state",[Object(g.k)("initial, void, hidden",Object(g.l)({opacity:0,transform:"scale(0)"})),Object(g.k)("visible",Object(g.l)({transform:"scale(1)"})),Object(g.m)("* => visible",Object(g.e)("200ms cubic-bezier(0, 0, 0.2, 1)",Object(g.h)([Object(g.l)({opacity:0,transform:"scale(0)",offset:0}),Object(g.l)({opacity:.5,transform:"scale(0.99)",offset:.5}),Object(g.l)({opacity:1,transform:"scale(1)",offset:1})]))),Object(g.m)("* => hidden",Object(g.e)("100ms cubic-bezier(0, 0, 0.2, 1)",Object(g.l)({opacity:0})))])},y=Object(u.f)({passive:!0}),x=new o.s("mat-tooltip-scroll-strategy"),C={provide:x,deps:[n.c],useFactory:function(t){return()=>t.scrollStrategies.reposition({scrollThrottle:20})}},O=new o.s("mat-tooltip-default-options",{providedIn:"root",factory:function(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}});let D=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c,l,h){this._overlay=t,this._elementRef=e,this._scrollDispatcher=i,this._viewContainerRef=n,this._ngZone=a,this._platform=s,this._ariaDescriber=o,this._focusMonitor=r,this._dir=l,this._defaultOptions=h,this._position="below",this._disabled=!1,this._viewInitialized=!1,this._pointerExitEventsInitialized=!1,this.showDelay=this._defaultOptions.showDelay,this.hideDelay=this._defaultOptions.hideDelay,this.touchGestures="auto",this._message="",this._passiveListeners=[],this._destroyed=new b.a,this._handleKeydown=t=>{this._isTooltipVisible()&&t.keyCode===d.h&&!Object(d.v)(t)&&(t.preventDefault(),t.stopPropagation(),this._ngZone.run(()=>this.hide(0)))},this._scrollStrategy=c,h&&(h.position&&(this.position=h.position),h.touchGestures&&(this.touchGestures=h.touchGestures)),a.runOutsideAngular(()=>{e.nativeElement.addEventListener("keydown",this._handleKeydown)})}get position(){return this._position}set position(t){t!==this._position&&(this._position=t,this._overlayRef&&(this._updatePosition(),this._tooltipInstance&&this._tooltipInstance.show(0),this._overlayRef.updatePosition()))}get disabled(){return this._disabled}set disabled(t){this._disabled=Object(l.c)(t),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}get message(){return this._message}set message(t){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message),this._message=null!=t?String(t).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage(),this._ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this._ariaDescriber.describe(this._elementRef.nativeElement,this.message)})}))}get tooltipClass(){return this._tooltipClass}set tooltipClass(t){this._tooltipClass=t,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Object(f.a)(this._destroyed)).subscribe(t=>{t?"keyboard"===t&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0))})}ngOnDestroy(){const t=this._elementRef.nativeElement;clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),t.removeEventListener("keydown",this._handleKeydown),this._passiveListeners.forEach(([e,i])=>{t.removeEventListener(e,i,y)}),this._passiveListeners.length=0,this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(t,this.message),this._focusMonitor.stopMonitoring(t)}show(t=this.showDelay){if(this.disabled||!this.message||this._isTooltipVisible()&&!this._tooltipInstance._showTimeoutId&&!this._tooltipInstance._hideTimeoutId)return;const e=this._createOverlay();this._detach(),this._portal=this._portal||new p.d(w,this._viewContainerRef),this._tooltipInstance=e.attach(this._portal).instance,this._tooltipInstance.afterHidden().pipe(Object(f.a)(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),this._tooltipInstance.show(t)}hide(t=this.hideDelay){this._tooltipInstance&&this._tooltipInstance.hide(t)}toggle(){this._isTooltipVisible()?this.hide():this.show()}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(){if(this._overlayRef)return this._overlayRef;const t=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef),e=this._overlay.position().flexibleConnectedTo(this._elementRef).withTransformOriginOn(".mat-tooltip").withFlexibleDimensions(!1).withViewportMargin(8).withScrollableContainers(t);return e.positionChanges.pipe(Object(f.a)(this._destroyed)).subscribe(t=>{this._tooltipInstance&&t.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:e,panelClass:"mat-tooltip-panel",scrollStrategy:this._scrollStrategy()}),this._updatePosition(),this._overlayRef.detachments().pipe(Object(f.a)(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(){const t=this._overlayRef.getConfig().positionStrategy,e=this._getOrigin(),i=this._getOverlayPosition();t.withPositions([Object.assign(Object.assign({},e.main),i.main),Object.assign(Object.assign({},e.fallback),i.fallback)])}_getOrigin(){const t=!this._dir||"ltr"==this._dir.value,e=this.position;let i;"above"==e||"below"==e?i={originX:"center",originY:"above"==e?"top":"bottom"}:"before"==e||"left"==e&&t||"right"==e&&!t?i={originX:"start",originY:"center"}:("after"==e||"right"==e&&t||"left"==e&&!t)&&(i={originX:"end",originY:"center"});const{x:n,y:a}=this._invertPosition(i.originX,i.originY);return{main:i,fallback:{originX:n,originY:a}}}_getOverlayPosition(){const t=!this._dir||"ltr"==this._dir.value,e=this.position;let i;"above"==e?i={overlayX:"center",overlayY:"bottom"}:"below"==e?i={overlayX:"center",overlayY:"top"}:"before"==e||"left"==e&&t||"right"==e&&!t?i={overlayX:"end",overlayY:"center"}:("after"==e||"right"==e&&t||"left"==e&&!t)&&(i={overlayX:"start",overlayY:"center"});const{x:n,y:a}=this._invertPosition(i.overlayX,i.overlayY);return{main:i,fallback:{overlayX:n,overlayY:a}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),this._ngZone.onMicrotaskEmpty.pipe(Object(m.a)(1),Object(f.a)(this._destroyed)).subscribe(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()}))}_setTooltipClass(t){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=t,this._tooltipInstance._markForCheck())}_invertPosition(t,e){return"above"===this.position||"below"===this.position?"top"===e?e="bottom":"bottom"===e&&(e="top"):"end"===t?t="start":"start"===t&&(t="end"),{x:t,y:e}}_setupPointerEnterEventsIfNeeded(){!this._disabled&&this.message&&this._viewInitialized&&!this._passiveListeners.length&&(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",()=>{this._setupPointerExitEventsIfNeeded(),this.show()}]):"off"!==this.touchGestures&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",()=>{this._setupPointerExitEventsIfNeeded(),clearTimeout(this._touchstartTimeout),this._touchstartTimeout=setTimeout(()=>this.show(),500)}])),this._addListeners(this._passiveListeners))}_setupPointerExitEventsIfNeeded(){if(this._pointerExitEventsInitialized)return;this._pointerExitEventsInitialized=!0;const t=[];if(this._platformSupportsMouseEvents())t.push(["mouseleave",()=>this.hide()]);else if("off"!==this.touchGestures){this._disableNativeGesturesIfNecessary();const e=()=>{clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions.touchendHideDelay)};t.push(["touchend",e],["touchcancel",e])}this._addListeners(t),this._passiveListeners.push(...t)}_addListeners(t){t.forEach(([t,e])=>{this._elementRef.nativeElement.addEventListener(t,e,y)})}_platformSupportsMouseEvents(){return!this._platform.IOS&&!this._platform.ANDROID}_disableNativeGesturesIfNecessary(){const t=this.touchGestures;if("off"!==t){const e=this._elementRef.nativeElement,i=e.style;("on"===t||"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName)&&(i.userSelect=i.msUserSelect=i.webkitUserSelect=i.MozUserSelect="none"),"on"!==t&&e.draggable||(i.webkitUserDrag="none"),i.touchAction="none",i.webkitTapHighlightColor="transparent"}}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(n.c),o.Qb(o.l),o.Qb(c.f),o.Qb(o.T),o.Qb(o.C),o.Qb(u.a),o.Qb(a.c),o.Qb(a.h),o.Qb(x),o.Qb(v.c,8),o.Qb(O,8))},t.\u0275dir=o.Lb({type:t,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-tooltip-trigger"],inputs:{showDelay:["matTooltipShowDelay","showDelay"],hideDelay:["matTooltipHideDelay","hideDelay"],touchGestures:["matTooltipTouchGestures","touchGestures"],position:["matTooltipPosition","position"],disabled:["matTooltipDisabled","disabled"],message:["matTooltip","message"],tooltipClass:["matTooltipClass","tooltipClass"]},exportAs:["matTooltip"]}),t})(),w=(()=>{class t{constructor(t,e){this._changeDetectorRef=t,this._breakpointObserver=e,this._visibility="initial",this._closeOnInteraction=!1,this._onHide=new b.a,this._isHandset=this._breakpointObserver.observe(h.b.Handset)}show(t){this._hideTimeoutId&&(clearTimeout(this._hideTimeoutId),this._hideTimeoutId=null),this._closeOnInteraction=!0,this._showTimeoutId=setTimeout(()=>{this._visibility="visible",this._showTimeoutId=null,this._markForCheck()},t)}hide(t){this._showTimeoutId&&(clearTimeout(this._showTimeoutId),this._showTimeoutId=null),this._hideTimeoutId=setTimeout(()=>{this._visibility="hidden",this._hideTimeoutId=null,this._markForCheck()},t)}afterHidden(){return this._onHide}isVisible(){return"visible"===this._visibility}ngOnDestroy(){this._onHide.complete()}_animationStart(){this._closeOnInteraction=!1}_animationDone(t){const e=t.toState;"hidden"!==e||this.isVisible()||this._onHide.next(),"visible"!==e&&"hidden"!==e||(this._closeOnInteraction=!0)}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0)}_markForCheck(){this._changeDetectorRef.markForCheck()}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(o.h),o.Qb(h.a))},t.\u0275cmp=o.Kb({type:t,selectors:[["mat-tooltip-component"]],hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(t,e){1&t&&o.dc("click",(function(){return e._handleBodyInteraction()}),!1,o.Ac),2&t&&o.Lc("zoom","visible"===e._visibility?1:null)},decls:3,vars:7,consts:[[1,"mat-tooltip",3,"ngClass"]],template:function(t,e){var i;1&t&&(o.Wb(0,"div",0),o.dc("@state.start",(function(){return e._animationStart()}))("@state.done",(function(t){return e._animationDone(t)})),o.ic(1,"async"),o.Qc(2),o.Vb()),2&t&&(o.Ib("mat-tooltip-handset",null==(i=o.jc(1,5,e._isHandset))?null:i.matches),o.oc("ngClass",e.tooltipClass)("@state",e._visibility),o.Db(2),o.Rc(e.message))},directives:[s.q],pipes:[s.b],styles:[".mat-tooltip-panel{pointer-events:none !important}.mat-tooltip{color:#fff;border-radius:4px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis}.cdk-high-contrast-active .mat-tooltip{outline:solid 1px}.mat-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}\n"],encapsulation:2,data:{animation:[_.tooltipState]},changeDetection:0}),t})(),M=(()=>{class t{}return t.\u0275mod=o.Ob({type:t}),t.\u0275inj=o.Nb({factory:function(e){return new(e||t)},providers:[C],imports:[[a.a,s.c,n.f,r.k],r.k,c.c]}),t})()},R0Ic:function(t,e,i){"use strict";i.d(e,"a",(function(){return s})),i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return a})),i.d(e,"d",(function(){return g})),i.d(e,"e",(function(){return r})),i.d(e,"f",(function(){return b})),i.d(e,"g",(function(){return c})),i.d(e,"h",(function(){return u})),i.d(e,"i",(function(){return f})),i.d(e,"j",(function(){return l})),i.d(e,"k",(function(){return h})),i.d(e,"l",(function(){return d})),i.d(e,"m",(function(){return p})),i.d(e,"n",(function(){return o})),i.d(e,"o",(function(){return v})),i.d(e,"p",(function(){return _}));class n{}class a{}const s="*";function o(t,e){return{type:7,name:t,definitions:e,options:{}}}function r(t,e=null){return{type:4,styles:e,timings:t}}function c(t,e=null){return{type:3,steps:t,options:e}}function l(t,e=null){return{type:2,steps:t,options:e}}function d(t){return{type:6,styles:t,offset:null}}function h(t,e,i){return{type:0,name:t,styles:e,options:i}}function u(t){return{type:5,steps:t}}function p(t,e,i=null){return{type:1,expr:t,animation:e,options:i}}function b(t=null){return{type:9,options:t}}function f(t,e,i=null){return{type:11,selector:t,animation:e,options:i}}function m(t){Promise.resolve(null).then(t)}class g{constructor(t=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this.parentPlayer=null,this.totalTime=t+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){m(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){}setPosition(t){}getPosition(){return 0}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}class v{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let e=0,i=0,n=0;const a=this.players.length;0==a?m(()=>this._onFinish()):this.players.forEach(t=>{t.onDone(()=>{++e==a&&this._onFinish()}),t.onDestroy(()=>{++i==a&&this._onDestroy()}),t.onStart(()=>{++n==a&&this._onStart()})}),this.totalTime=this.players.reduce((t,e)=>Math.max(t,e.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){const e=t*this.totalTime;this.players.forEach(t=>{const i=t.totalTime?Math.min(1,e/t.totalTime):1;t.setPosition(i)})}getPosition(){let t=0;return this.players.forEach(e=>{const i=e.getPosition();t=Math.min(i,t)}),t}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}const _="!"},R1ws:function(t,e,i){"use strict";i.d(e,"a",(function(){return fe})),i.d(e,"b",(function(){return ge}));var n=i("fXoL"),a=i("jhN1"),s=i("R0Ic");function o(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function r(t){switch(t.length){case 0:return new s.d;case 1:return t[0];default:return new s.o(t)}}function c(t,e,i,n,a={},o={}){const r=[],c=[];let l=-1,d=null;if(n.forEach(t=>{const i=t.offset,n=i==l,h=n&&d||{};Object.keys(t).forEach(i=>{let n=i,c=t[i];if("offset"!==i)switch(n=e.normalizePropertyName(n,r),c){case s.p:c=a[i];break;case s.a:c=o[i];break;default:c=e.normalizeStyleValue(i,n,c,r)}h[n]=c}),n||c.push(h),d=h,l=i}),r.length){const t="\n - ";throw new Error(`Unable to animate due to the following errors:${t}${r.join(t)}`)}return c}function l(t,e,i,n){switch(e){case"start":t.onStart(()=>n(i&&d(i,"start",t)));break;case"done":t.onDone(()=>n(i&&d(i,"done",t)));break;case"destroy":t.onDestroy(()=>n(i&&d(i,"destroy",t)))}}function d(t,e,i){const n=i.totalTime,a=h(t.element,t.triggerName,t.fromState,t.toState,e||t.phaseName,null==n?t.totalTime:n,!!i.disabled),s=t._data;return null!=s&&(a._data=s),a}function h(t,e,i,n,a="",s=0,o){return{element:t,triggerName:e,fromState:i,toState:n,phaseName:a,totalTime:s,disabled:!!o}}function u(t,e,i){let n;return t instanceof Map?(n=t.get(e),n||t.set(e,n=i)):(n=t[e],n||(n=t[e]=i)),n}function p(t){const e=t.indexOf(":");return[t.substring(1,e),t.substr(e+1)]}let b=(t,e)=>!1,f=(t,e)=>!1,m=(t,e,i)=>[];const g=o();(g||"undefined"!=typeof Element)&&(b=(t,e)=>t.contains(e),f=(()=>{if(g||Element.prototype.matches)return(t,e)=>t.matches(e);{const t=Element.prototype,e=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector;return e?(t,i)=>e.apply(t,[i]):f}})(),m=(t,e,i)=>{let n=[];if(i)n.push(...t.querySelectorAll(e));else{const i=t.querySelector(e);i&&n.push(i)}return n});let v=null,_=!1;function y(t){v||(v=("undefined"!=typeof document?document.body:null)||{},_=!!v.style&&"WebkitAppearance"in v.style);let e=!0;return v.style&&!function(t){return"ebkit"==t.substring(1,6)}(t)&&(e=t in v.style,!e&&_)&&(e="Webkit"+t.charAt(0).toUpperCase()+t.substr(1)in v.style),e}const x=f,C=b,O=m;function D(t){const e={};return Object.keys(t).forEach(i=>{const n=i.replace(/([a-z])([A-Z])/g,"$1-$2");e[n]=t[i]}),e}let w=(()=>{class t{validateStyleProperty(t){return y(t)}matchesElement(t,e){return x(t,e)}containsElement(t,e){return C(t,e)}query(t,e,i){return O(t,e,i)}computeStyle(t,e,i){return i||""}animate(t,e,i,n,a,o=[],r){return new s.d(i,n)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})(),M=(()=>{class t{}return t.NOOP=new w,t})();function k(t){if("number"==typeof t)return t;const e=t.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:S(parseFloat(e[1]),e[2])}function S(t,e){switch(e){case"s":return 1e3*t;default:return t}}function I(t,e,i){return t.hasOwnProperty("duration")?t:function(t,e,i){let n,a=0,s="";if("string"==typeof t){const i=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===i)return e.push(`The provided timing value "${t}" is invalid.`),{duration:0,delay:0,easing:""};n=S(parseFloat(i[1]),i[2]);const o=i[3];null!=o&&(a=S(parseFloat(o),i[4]));const r=i[5];r&&(s=r)}else n=t;if(!i){let i=!1,s=e.length;n<0&&(e.push("Duration values below 0 are not allowed for this animation step."),i=!0),a<0&&(e.push("Delay values below 0 are not allowed for this animation step."),i=!0),i&&e.splice(s,0,`The provided timing value "${t}" is invalid.`)}return{duration:n,delay:a,easing:s}}(t,e,i)}function P(t,e={}){return Object.keys(t).forEach(i=>{e[i]=t[i]}),e}function V(t,e,i={}){if(e)for(let n in t)i[n]=t[n];else P(t,i);return i}function R(t,e,i){return i?e+":"+i+";":""}function j(t){let e="";for(let i=0;i<t.style.length;i++){const n=t.style.item(i);e+=R(0,n,t.style.getPropertyValue(n))}for(const i in t.style)t.style.hasOwnProperty(i)&&!i.startsWith("_")&&(e+=R(0,i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),t.style[i]));t.setAttribute("style",e)}function A(t,e,i){t.style&&(Object.keys(e).forEach(n=>{const a=z(n);i&&!i.hasOwnProperty(n)&&(i[n]=t.style[a]),t.style[a]=e[n]}),o()&&j(t))}function W(t,e){t.style&&(Object.keys(e).forEach(e=>{const i=z(e);t.style[i]=""}),o()&&j(t))}function T(t){return Array.isArray(t)?1==t.length?t[0]:Object(s.j)(t):t}const E=new RegExp("{{\\s*(.+?)\\s*}}","g");function F(t){let e=[];if("string"==typeof t){let i;for(;i=E.exec(t);)e.push(i[1]);E.lastIndex=0}return e}function L(t,e,i){const n=t.toString(),a=n.replace(E,(t,n)=>{let a=e[n];return e.hasOwnProperty(n)||(i.push("Please provide a value for the animation param "+n),a=""),a.toString()});return a==n?t:a}function Q(t){const e=[];let i=t.next();for(;!i.done;)e.push(i.value),i=t.next();return e}const N=/-+([a-z0-9])/g;function z(t){return t.replace(N,(...t)=>t[1].toUpperCase())}function B(t,e){return 0===t||0===e}function U(t,e,i){const n=Object.keys(i);if(n.length&&e.length){let s=e[0],o=[];if(n.forEach(t=>{s.hasOwnProperty(t)||o.push(t),s[t]=i[t]}),o.length)for(var a=1;a<e.length;a++){let i=e[a];o.forEach((function(e){i[e]=H(t,e)}))}}return e}function $(t,e,i){switch(e.type){case 7:return t.visitTrigger(e,i);case 0:return t.visitState(e,i);case 1:return t.visitTransition(e,i);case 2:return t.visitSequence(e,i);case 3:return t.visitGroup(e,i);case 4:return t.visitAnimate(e,i);case 5:return t.visitKeyframes(e,i);case 6:return t.visitStyle(e,i);case 8:return t.visitReference(e,i);case 9:return t.visitAnimateChild(e,i);case 10:return t.visitAnimateRef(e,i);case 11:return t.visitQuery(e,i);case 12:return t.visitStagger(e,i);default:throw new Error("Unable to resolve animation metadata node #"+e.type)}}function H(t,e){return window.getComputedStyle(t)[e]}function G(t,e){const i=[];return"string"==typeof t?t.split(/\s*,\s*/).forEach(t=>function(t,e,i){if(":"==t[0]){const n=function(t,e){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,e)=>parseFloat(e)>parseFloat(t);case":decrement":return(t,e)=>parseFloat(e)<parseFloat(t);default:return e.push(`The transition alias value "${t}" is not supported`),"* => *"}}(t,i);if("function"==typeof n)return void e.push(n);t=n}const n=t.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==n||n.length<4)return i.push(`The provided transition expression "${t}" is not supported`),e;const a=n[1],s=n[2],o=n[3];e.push(K(a,o)),"<"!=s[0]||"*"==a&&"*"==o||e.push(K(o,a))}(t,i,e)):i.push(t),i}const X=new Set(["true","1"]),q=new Set(["false","0"]);function K(t,e){const i=X.has(t)||q.has(t),n=X.has(e)||q.has(e);return(a,s)=>{let o="*"==t||t==a,r="*"==e||e==s;return!o&&i&&"boolean"==typeof a&&(o=a?X.has(t):q.has(t)),!r&&n&&"boolean"==typeof s&&(r=s?X.has(e):q.has(e)),o&&r}}const Y=new RegExp("s*:selfs*,?","g");function J(t,e,i){return new Z(t).build(e,i)}class Z{constructor(t){this._driver=t}build(t,e){const i=new tt(e);return this._resetContextStyleTimingState(i),$(this,T(t),i)}_resetContextStyleTimingState(t){t.currentQuerySelector="",t.collectedStyles={},t.collectedStyles[""]={},t.currentTime=0}visitTrigger(t,e){let i=e.queryCount=0,n=e.depCount=0;const a=[],s=[];return"@"==t.name.charAt(0)&&e.errors.push("animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"),t.definitions.forEach(t=>{if(this._resetContextStyleTimingState(e),0==t.type){const i=t,n=i.name;n.toString().split(/\s*,\s*/).forEach(t=>{i.name=t,a.push(this.visitState(i,e))}),i.name=n}else if(1==t.type){const a=this.visitTransition(t,e);i+=a.queryCount,n+=a.depCount,s.push(a)}else e.errors.push("only state() and transition() definitions can sit inside of a trigger()")}),{type:7,name:t.name,states:a,transitions:s,queryCount:i,depCount:n,options:null}}visitState(t,e){const i=this.visitStyle(t.styles,e),n=t.options&&t.options.params||null;if(i.containsDynamicStyles){const a=new Set,s=n||{};if(i.styles.forEach(t=>{if(et(t)){const e=t;Object.keys(e).forEach(t=>{F(e[t]).forEach(t=>{s.hasOwnProperty(t)||a.add(t)})})}}),a.size){const i=Q(a.values());e.errors.push(`state("${t.name}", ...) must define default values for all the following style substitutions: ${i.join(", ")}`)}}return{type:0,name:t.name,style:i,options:n?{params:n}:null}}visitTransition(t,e){e.queryCount=0,e.depCount=0;const i=$(this,T(t.animation),e);return{type:1,matchers:G(t.expr,e.errors),animation:i,queryCount:e.queryCount,depCount:e.depCount,options:it(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(t=>$(this,t,e)),options:it(t.options)}}visitGroup(t,e){const i=e.currentTime;let n=0;const a=t.steps.map(t=>{e.currentTime=i;const a=$(this,t,e);return n=Math.max(n,e.currentTime),a});return e.currentTime=n,{type:3,steps:a,options:it(t.options)}}visitAnimate(t,e){const i=function(t,e){let i=null;if(t.hasOwnProperty("duration"))i=t;else if("number"==typeof t)return nt(I(t,e).duration,0,"");const n=t;if(n.split(/\s+/).some(t=>"{"==t.charAt(0)&&"{"==t.charAt(1))){const t=nt(0,0,"");return t.dynamic=!0,t.strValue=n,t}return i=i||I(n,e),nt(i.duration,i.delay,i.easing)}(t.timings,e.errors);let n;e.currentAnimateTimings=i;let a=t.styles?t.styles:Object(s.l)({});if(5==a.type)n=this.visitKeyframes(a,e);else{let a=t.styles,o=!1;if(!a){o=!0;const t={};i.easing&&(t.easing=i.easing),a=Object(s.l)(t)}e.currentTime+=i.duration+i.delay;const r=this.visitStyle(a,e);r.isEmptyStep=o,n=r}return e.currentAnimateTimings=null,{type:4,timings:i,style:n,options:null}}visitStyle(t,e){const i=this._makeStyleAst(t,e);return this._validateStyleAst(i,e),i}_makeStyleAst(t,e){const i=[];Array.isArray(t.styles)?t.styles.forEach(t=>{"string"==typeof t?t==s.a?i.push(t):e.errors.push(`The provided style string value ${t} is not allowed.`):i.push(t)}):i.push(t.styles);let n=!1,a=null;return i.forEach(t=>{if(et(t)){const e=t,i=e.easing;if(i&&(a=i,delete e.easing),!n)for(let t in e)if(e[t].toString().indexOf("{{")>=0){n=!0;break}}}),{type:6,styles:i,easing:a,offset:t.offset,containsDynamicStyles:n,options:null}}_validateStyleAst(t,e){const i=e.currentAnimateTimings;let n=e.currentTime,a=e.currentTime;i&&a>0&&(a-=i.duration+i.delay),t.styles.forEach(t=>{"string"!=typeof t&&Object.keys(t).forEach(i=>{if(!this._driver.validateStyleProperty(i))return void e.errors.push(`The provided animation property "${i}" is not a supported CSS property for animations`);const s=e.collectedStyles[e.currentQuerySelector],o=s[i];let r=!0;o&&(a!=n&&a>=o.startTime&&n<=o.endTime&&(e.errors.push(`The CSS property "${i}" that exists between the times of "${o.startTime}ms" and "${o.endTime}ms" is also being animated in a parallel animation between the times of "${a}ms" and "${n}ms"`),r=!1),a=o.startTime),r&&(s[i]={startTime:a,endTime:n}),e.options&&function(t,e,i){const n=e.params||{},a=F(t);a.length&&a.forEach(t=>{n.hasOwnProperty(t)||i.push(`Unable to resolve the local animation param ${t} in the given list of values`)})}(t[i],e.options,e.errors)})})}visitKeyframes(t,e){const i={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push("keyframes() must be placed inside of a call to animate()"),i;let n=0;const a=[];let s=!1,o=!1,r=0;const c=t.steps.map(t=>{const i=this._makeStyleAst(t,e);let c=null!=i.offset?i.offset:function(t){if("string"==typeof t)return null;let e=null;if(Array.isArray(t))t.forEach(t=>{if(et(t)&&t.hasOwnProperty("offset")){const i=t;e=parseFloat(i.offset),delete i.offset}});else if(et(t)&&t.hasOwnProperty("offset")){const i=t;e=parseFloat(i.offset),delete i.offset}return e}(i.styles),l=0;return null!=c&&(n++,l=i.offset=c),o=o||l<0||l>1,s=s||l<r,r=l,a.push(l),i});o&&e.errors.push("Please ensure that all keyframe offsets are between 0 and 1"),s&&e.errors.push("Please ensure that all keyframe offsets are in order");const l=t.steps.length;let d=0;n>0&&n<l?e.errors.push("Not all style() steps within the declared keyframes() contain offsets"):0==n&&(d=1/(l-1));const h=l-1,u=e.currentTime,p=e.currentAnimateTimings,b=p.duration;return c.forEach((t,n)=>{const s=d>0?n==h?1:d*n:a[n],o=s*b;e.currentTime=u+p.delay+o,p.duration=o,this._validateStyleAst(t,e),t.offset=s,i.styles.push(t)}),i}visitReference(t,e){return{type:8,animation:$(this,T(t.animation),e),options:it(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:it(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:it(t.options)}}visitQuery(t,e){const i=e.currentQuerySelector,n=t.options||{};e.queryCount++,e.currentQuery=t;const[a,s]=function(t){const e=!!t.split(/\s*,\s*/).find(t=>":self"==t);return e&&(t=t.replace(Y,"")),[t=t.replace(/@\*/g,".ng-trigger").replace(/@\w+/g,t=>".ng-trigger-"+t.substr(1)).replace(/:animating/g,".ng-animating"),e]}(t.selector);e.currentQuerySelector=i.length?i+" "+a:a,u(e.collectedStyles,e.currentQuerySelector,{});const o=$(this,T(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=i,{type:11,selector:a,limit:n.limit||0,optional:!!n.optional,includeSelf:s,animation:o,originalSelector:t.selector,options:it(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push("stagger() can only be used inside of query()");const i="full"===t.timings?{duration:0,delay:0,easing:"full"}:I(t.timings,e.errors,!0);return{type:12,animation:$(this,T(t.animation),e),timings:i,options:null}}}class tt{constructor(t){this.errors=t,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}}function et(t){return!Array.isArray(t)&&"object"==typeof t}function it(t){var e;return t?(t=P(t)).params&&(t.params=(e=t.params)?P(e):null):t={},t}function nt(t,e,i){return{duration:t,delay:e,easing:i}}function at(t,e,i,n,a,s,o=null,r=!1){return{type:1,element:t,keyframes:e,preStyleProps:i,postStyleProps:n,duration:a,delay:s,totalTime:a+s,easing:o,subTimeline:r}}class st{constructor(){this._map=new Map}consume(t){let e=this._map.get(t);return e?this._map.delete(t):e=[],e}append(t,e){let i=this._map.get(t);i||this._map.set(t,i=[]),i.push(...e)}has(t){return this._map.has(t)}clear(){this._map.clear()}}const ot=new RegExp(":enter","g"),rt=new RegExp(":leave","g");function ct(t,e,i,n,a,s={},o={},r,c,l=[]){return(new lt).buildKeyframes(t,e,i,n,a,s,o,r,c,l)}class lt{buildKeyframes(t,e,i,n,a,s,o,r,c,l=[]){c=c||new st;const d=new ht(t,e,c,n,a,l,[]);d.options=r,d.currentTimeline.setStyles([s],null,d.errors,r),$(this,i,d);const h=d.timelines.filter(t=>t.containsAnimation());if(h.length&&Object.keys(o).length){const t=h[h.length-1];t.allowOnlyTimelineStyles()||t.setStyles([o],null,d.errors,r)}return h.length?h.map(t=>t.buildKeyframes()):[at(e,[],[],[],0,0,"",!1)]}visitTrigger(t,e){}visitState(t,e){}visitTransition(t,e){}visitAnimateChild(t,e){const i=e.subInstructions.consume(e.element);if(i){const n=e.createSubContext(t.options),a=e.currentTimeline.currentTime,s=this._visitSubInstructions(i,n,n.options);a!=s&&e.transformIntoNewTimeline(s)}e.previousNode=t}visitAnimateRef(t,e){const i=e.createSubContext(t.options);i.transformIntoNewTimeline(),this.visitReference(t.animation,i),e.transformIntoNewTimeline(i.currentTimeline.currentTime),e.previousNode=t}_visitSubInstructions(t,e,i){let n=e.currentTimeline.currentTime;const a=null!=i.duration?k(i.duration):null,s=null!=i.delay?k(i.delay):null;return 0!==a&&t.forEach(t=>{const i=e.appendInstructionToTimeline(t,a,s);n=Math.max(n,i.duration+i.delay)}),n}visitReference(t,e){e.updateOptions(t.options,!0),$(this,t.animation,e),e.previousNode=t}visitSequence(t,e){const i=e.subContextCount;let n=e;const a=t.options;if(a&&(a.params||a.delay)&&(n=e.createSubContext(a),n.transformIntoNewTimeline(),null!=a.delay)){6==n.previousNode.type&&(n.currentTimeline.snapshotCurrentStyles(),n.previousNode=dt);const t=k(a.delay);n.delayNextStep(t)}t.steps.length&&(t.steps.forEach(t=>$(this,t,n)),n.currentTimeline.applyStylesToKeyframe(),n.subContextCount>i&&n.transformIntoNewTimeline()),e.previousNode=t}visitGroup(t,e){const i=[];let n=e.currentTimeline.currentTime;const a=t.options&&t.options.delay?k(t.options.delay):0;t.steps.forEach(s=>{const o=e.createSubContext(t.options);a&&o.delayNextStep(a),$(this,s,o),n=Math.max(n,o.currentTimeline.currentTime),i.push(o.currentTimeline)}),i.forEach(t=>e.currentTimeline.mergeTimelineCollectedStyles(t)),e.transformIntoNewTimeline(n),e.previousNode=t}_visitTiming(t,e){if(t.dynamic){const i=t.strValue;return I(e.params?L(i,e.params,e.errors):i,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,e){const i=e.currentAnimateTimings=this._visitTiming(t.timings,e),n=e.currentTimeline;i.delay&&(e.incrementTime(i.delay),n.snapshotCurrentStyles());const a=t.style;5==a.type?this.visitKeyframes(a,e):(e.incrementTime(i.duration),this.visitStyle(a,e),n.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}visitStyle(t,e){const i=e.currentTimeline,n=e.currentAnimateTimings;!n&&i.getCurrentStyleProperties().length&&i.forwardFrame();const a=n&&n.easing||t.easing;t.isEmptyStep?i.applyEmptyStep(a):i.setStyles(t.styles,a,e.errors,e.options),e.previousNode=t}visitKeyframes(t,e){const i=e.currentAnimateTimings,n=e.currentTimeline.duration,a=i.duration,s=e.createSubContext().currentTimeline;s.easing=i.easing,t.styles.forEach(t=>{s.forwardTime((t.offset||0)*a),s.setStyles(t.styles,t.easing,e.errors,e.options),s.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(s),e.transformIntoNewTimeline(n+a),e.previousNode=t}visitQuery(t,e){const i=e.currentTimeline.currentTime,n=t.options||{},a=n.delay?k(n.delay):0;a&&(6===e.previousNode.type||0==i&&e.currentTimeline.getCurrentStyleProperties().length)&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=dt);let s=i;const o=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!n.optional,e.errors);e.currentQueryTotal=o.length;let r=null;o.forEach((i,n)=>{e.currentQueryIndex=n;const o=e.createSubContext(t.options,i);a&&o.delayNextStep(a),i===e.element&&(r=o.currentTimeline),$(this,t.animation,o),o.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,o.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),r&&(e.currentTimeline.mergeTimelineCollectedStyles(r),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}visitStagger(t,e){const i=e.parentContext,n=e.currentTimeline,a=t.timings,s=Math.abs(a.duration),o=s*(e.currentQueryTotal-1);let r=s*e.currentQueryIndex;switch(a.duration<0?"reverse":a.easing){case"reverse":r=o-r;break;case"full":r=i.currentStaggerTime}const c=e.currentTimeline;r&&c.delayNextStep(r);const l=c.currentTime;$(this,t.animation,e),e.previousNode=t,i.currentStaggerTime=n.currentTime-l+(n.startTime-i.currentTimeline.startTime)}}const dt={};class ht{constructor(t,e,i,n,a,s,o,r){this._driver=t,this.element=e,this.subInstructions=i,this._enterClassName=n,this._leaveClassName=a,this.errors=s,this.timelines=o,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=dt,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=r||new ut(this._driver,e,0),o.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,e){if(!t)return;const i=t;let n=this.options;null!=i.duration&&(n.duration=k(i.duration)),null!=i.delay&&(n.delay=k(i.delay));const a=i.params;if(a){let t=n.params;t||(t=this.options.params={}),Object.keys(a).forEach(i=>{e&&t.hasOwnProperty(i)||(t[i]=L(a[i],t,this.errors))})}}_copyOptions(){const t={};if(this.options){const e=this.options.params;if(e){const i=t.params={};Object.keys(e).forEach(t=>{i[t]=e[t]})}}return t}createSubContext(t=null,e,i){const n=e||this.element,a=new ht(this._driver,n,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(n,i||0));return a.previousNode=this.previousNode,a.currentAnimateTimings=this.currentAnimateTimings,a.options=this._copyOptions(),a.updateOptions(t),a.currentQueryIndex=this.currentQueryIndex,a.currentQueryTotal=this.currentQueryTotal,a.parentContext=this,this.subContextCount++,a}transformIntoNewTimeline(t){return this.previousNode=dt,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,e,i){const n={duration:null!=e?e:t.duration,delay:this.currentTimeline.currentTime+(null!=i?i:0)+t.delay,easing:""},a=new pt(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,n,t.stretchStartingKeyframe);return this.timelines.push(a),n}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,e,i,n,a,s){let o=[];if(n&&o.push(this.element),t.length>0){t=(t=t.replace(ot,"."+this._enterClassName)).replace(rt,"."+this._leaveClassName);let e=this._driver.query(this.element,t,1!=i);0!==i&&(e=i<0?e.slice(e.length+i,e.length):e.slice(0,i)),o.push(...e)}return a||0!=o.length||s.push(`\`query("${e}")\` returned zero elements. (Use \`query("${e}", { optional: true })\` if you wish to allow this.)`),o}}class ut{constructor(t,e,i,n){this._driver=t,this.element=e,this.startTime=i,this._elementTimelineStylesLookup=n,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(t){const e=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,e){return this.applyStylesToKeyframe(),new ut(this._driver,t,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(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,e){this._localTimelineStyles[t]=e,this._globalTimelineStyles[t]=e,this._styleSummary[t]={time:this.currentTime,value:e}}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&(this._previousKeyframe.easing=t),Object.keys(this._globalTimelineStyles).forEach(t=>{this._backFill[t]=this._globalTimelineStyles[t]||s.a,this._currentKeyframe[t]=s.a}),this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,i,n){e&&(this._previousKeyframe.easing=e);const a=n&&n.params||{},o=function(t,e){const i={};let n;return t.forEach(t=>{"*"===t?(n=n||Object.keys(e),n.forEach(t=>{i[t]=s.a})):V(t,!1,i)}),i}(t,this._globalTimelineStyles);Object.keys(o).forEach(t=>{const e=L(o[t],a,i);this._pendingStyles[t]=e,this._localTimelineStyles.hasOwnProperty(t)||(this._backFill[t]=this._globalTimelineStyles.hasOwnProperty(t)?this._globalTimelineStyles[t]:s.a),this._updateStyle(t,e)})}applyStylesToKeyframe(){const t=this._pendingStyles,e=Object.keys(t);0!=e.length&&(this._pendingStyles={},e.forEach(e=>{this._currentKeyframe[e]=t[e]}),Object.keys(this._localTimelineStyles).forEach(t=>{this._currentKeyframe.hasOwnProperty(t)||(this._currentKeyframe[t]=this._localTimelineStyles[t])}))}snapshotCurrentStyles(){Object.keys(this._localTimelineStyles).forEach(t=>{const e=this._localTimelineStyles[t];this._pendingStyles[t]=e,this._updateStyle(t,e)})}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const t=[];for(let e in this._currentKeyframe)t.push(e);return t}mergeTimelineCollectedStyles(t){Object.keys(t._styleSummary).forEach(e=>{const i=this._styleSummary[e],n=t._styleSummary[e];(!i||n.time>i.time)&&this._updateStyle(e,n.value)})}buildKeyframes(){this.applyStylesToKeyframe();const t=new Set,e=new Set,i=1===this._keyframes.size&&0===this.duration;let n=[];this._keyframes.forEach((a,o)=>{const r=V(a,!0);Object.keys(r).forEach(i=>{const n=r[i];n==s.p?t.add(i):n==s.a&&e.add(i)}),i||(r.offset=o/this.duration),n.push(r)});const a=t.size?Q(t.values()):[],o=e.size?Q(e.values()):[];if(i){const t=n[0],e=P(t);t.offset=0,e.offset=1,n=[t,e]}return at(this.element,n,a,o,this.duration,this.startTime,this.easing,!1)}}class pt extends ut{constructor(t,e,i,n,a,s,o=!1){super(t,e,s.delay),this.element=e,this.keyframes=i,this.preStyleProps=n,this.postStyleProps=a,this._stretchStartingKeyframe=o,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:e,duration:i,easing:n}=this.timings;if(this._stretchStartingKeyframe&&e){const a=[],s=i+e,o=e/s,r=V(t[0],!1);r.offset=0,a.push(r);const c=V(t[0],!1);c.offset=bt(o),a.push(c);const l=t.length-1;for(let n=1;n<=l;n++){let o=V(t[n],!1);o.offset=bt((e+o.offset*i)/s),a.push(o)}i=s,e=0,n="",t=a}return at(this.element,t,this.preStyleProps,this.postStyleProps,i,e,n,!0)}}function bt(t,e=3){const i=Math.pow(10,e-1);return Math.round(t*i)/i}class ft{}class mt extends ft{normalizePropertyName(t,e){return z(t)}normalizeStyleValue(t,e,i,n){let a="";const s=i.toString().trim();if(gt[e]&&0!==i&&"0"!==i)if("number"==typeof i)a="px";else{const e=i.match(/^[+-]?[\d\.]+([a-z]*)$/);e&&0==e[1].length&&n.push(`Please provide a CSS unit value for ${t}:${i}`)}return s+a}}const gt=(()=>function(t){const e={};return t.forEach(t=>e[t]=!0),e}("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 vt(t,e,i,n,a,s,o,r,c,l,d,h,u){return{type:0,element:t,triggerName:e,isRemovalTransition:a,fromState:i,fromStyles:s,toState:n,toStyles:o,timelines:r,queriedElements:c,preStyleProps:l,postStyleProps:d,totalTime:h,errors:u}}const _t={};class yt{constructor(t,e,i){this._triggerName=t,this.ast=e,this._stateStyles=i}match(t,e,i,n){return function(t,e,i,n,a){return t.some(t=>t(e,i,n,a))}(this.ast.matchers,t,e,i,n)}buildStyles(t,e,i){const n=this._stateStyles["*"],a=this._stateStyles[t],s=n?n.buildStyles(e,i):{};return a?a.buildStyles(e,i):s}build(t,e,i,n,a,s,o,r,c,l){const d=[],h=this.ast.options&&this.ast.options.params||_t,p=this.buildStyles(i,o&&o.params||_t,d),b=r&&r.params||_t,f=this.buildStyles(n,b,d),m=new Set,g=new Map,v=new Map,_="void"===n,y={params:Object.assign(Object.assign({},h),b)},x=l?[]:ct(t,e,this.ast.animation,a,s,p,f,y,c,d);let C=0;if(x.forEach(t=>{C=Math.max(t.duration+t.delay,C)}),d.length)return vt(e,this._triggerName,i,n,_,p,f,[],[],g,v,C,d);x.forEach(t=>{const i=t.element,n=u(g,i,{});t.preStyleProps.forEach(t=>n[t]=!0);const a=u(v,i,{});t.postStyleProps.forEach(t=>a[t]=!0),i!==e&&m.add(i)});const O=Q(m.values());return vt(e,this._triggerName,i,n,_,p,f,x,O,g,v,C)}}class xt{constructor(t,e){this.styles=t,this.defaultParams=e}buildStyles(t,e){const i={},n=P(this.defaultParams);return Object.keys(t).forEach(e=>{const i=t[e];null!=i&&(n[e]=i)}),this.styles.styles.forEach(t=>{if("string"!=typeof t){const a=t;Object.keys(a).forEach(t=>{let s=a[t];s.length>1&&(s=L(s,n,e)),i[t]=s})}}),i}}class Ct{constructor(t,e){this.name=t,this.ast=e,this.transitionFactories=[],this.states={},e.states.forEach(t=>{this.states[t.name]=new xt(t.style,t.options&&t.options.params||{})}),Ot(this.states,"true","1"),Ot(this.states,"false","0"),e.transitions.forEach(e=>{this.transitionFactories.push(new yt(t,e,this.states))}),this.fallbackTransition=new yt(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[(t,e)=>!0],options:null,queryCount:0,depCount:0},this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,e,i,n){return this.transitionFactories.find(a=>a.match(t,e,i,n))||null}matchStyles(t,e,i){return this.fallbackTransition.buildStyles(t,e,i)}}function Ot(t,e,i){t.hasOwnProperty(e)?t.hasOwnProperty(i)||(t[i]=t[e]):t.hasOwnProperty(i)&&(t[e]=t[i])}const Dt=new st;class wt{constructor(t,e,i){this.bodyNode=t,this._driver=e,this._normalizer=i,this._animations={},this._playersById={},this.players=[]}register(t,e){const i=[],n=J(this._driver,e,i);if(i.length)throw new Error("Unable to build the animation due to the following errors: "+i.join("\n"));this._animations[t]=n}_buildPlayer(t,e,i){const n=t.element,a=c(0,this._normalizer,0,t.keyframes,e,i);return this._driver.animate(n,a,t.duration,t.delay,t.easing,[],!0)}create(t,e,i={}){const n=[],a=this._animations[t];let o;const c=new Map;if(a?(o=ct(this._driver,e,a,"ng-enter","ng-leave",{},{},i,Dt,n),o.forEach(t=>{const e=u(c,t.element,{});t.postStyleProps.forEach(t=>e[t]=null)})):(n.push("The requested animation doesn't exist or has already been destroyed"),o=[]),n.length)throw new Error("Unable to create the animation due to the following errors: "+n.join("\n"));c.forEach((t,e)=>{Object.keys(t).forEach(i=>{t[i]=this._driver.computeStyle(e,i,s.a)})});const l=r(o.map(t=>{const e=c.get(t.element);return this._buildPlayer(t,{},e)}));return this._playersById[t]=l,l.onDestroy(()=>this.destroy(t)),this.players.push(l),l}destroy(t){const e=this._getPlayer(t);e.destroy(),delete this._playersById[t];const i=this.players.indexOf(e);i>=0&&this.players.splice(i,1)}_getPlayer(t){const e=this._playersById[t];if(!e)throw new Error("Unable to find the timeline player referenced by "+t);return e}listen(t,e,i,n){const a=h(e,"","","");return l(this._getPlayer(t),i,a,n),()=>{}}command(t,e,i,n){if("register"==i)return void this.register(t,n[0]);if("create"==i)return void this.create(t,e,n[0]||{});const a=this._getPlayer(t);switch(i){case"play":a.play();break;case"pause":a.pause();break;case"reset":a.reset();break;case"restart":a.restart();break;case"finish":a.finish();break;case"init":a.init();break;case"setPosition":a.setPosition(parseFloat(n[0]));break;case"destroy":this.destroy(t)}}}const Mt=[],kt={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},St={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0};class It{constructor(t,e=""){this.namespaceId=e;const i=t&&t.hasOwnProperty("value");if(this.value=null!=(n=i?t.value:t)?n:null,i){const e=P(t);delete e.value,this.options=e}else this.options={};var n;this.options.params||(this.options.params={})}get params(){return this.options.params}absorbOptions(t){const e=t.params;if(e){const t=this.options.params;Object.keys(e).forEach(i=>{null==t[i]&&(t[i]=e[i])})}}}const Pt=new It("void");class Vt{constructor(t,e,i){this.id=t,this.hostElement=e,this._engine=i,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,Ft(e,this._hostClassName)}listen(t,e,i,n){if(!this._triggers.hasOwnProperty(e))throw new Error(`Unable to listen on the animation trigger event "${i}" because the animation trigger "${e}" doesn't exist!`);if(null==i||0==i.length)throw new Error(`Unable to listen on the animation trigger "${e}" because the provided event is undefined!`);if("start"!=(a=i)&&"done"!=a)throw new Error(`The provided animation trigger event "${i}" for the animation trigger "${e}" is not supported!`);var a;const s=u(this._elementListeners,t,[]),o={name:e,phase:i,callback:n};s.push(o);const r=u(this._engine.statesByElement,t,{});return r.hasOwnProperty(e)||(Ft(t,"ng-trigger"),Ft(t,"ng-trigger-"+e),r[e]=Pt),()=>{this._engine.afterFlush(()=>{const t=s.indexOf(o);t>=0&&s.splice(t,1),this._triggers[e]||delete r[e]})}}register(t,e){return!this._triggers[t]&&(this._triggers[t]=e,!0)}_getTrigger(t){const e=this._triggers[t];if(!e)throw new Error(`The provided animation trigger "${t}" has not been registered!`);return e}trigger(t,e,i,n=!0){const a=this._getTrigger(e),s=new jt(this.id,e,t);let o=this._engine.statesByElement.get(t);o||(Ft(t,"ng-trigger"),Ft(t,"ng-trigger-"+e),this._engine.statesByElement.set(t,o={}));let r=o[e];const c=new It(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&r&&c.absorbOptions(r.options),o[e]=c,r||(r=Pt),"void"!==c.value&&r.value===c.value){if(!function(t,e){const i=Object.keys(t),n=Object.keys(e);if(i.length!=n.length)return!1;for(let a=0;a<i.length;a++){const n=i[a];if(!e.hasOwnProperty(n)||t[n]!==e[n])return!1}return!0}(r.params,c.params)){const e=[],i=a.matchStyles(r.value,r.params,e),n=a.matchStyles(c.value,c.params,e);e.length?this._engine.reportError(e):this._engine.afterFlush(()=>{W(t,i),A(t,n)})}return}const l=u(this._engine.playersByElement,t,[]);l.forEach(t=>{t.namespaceId==this.id&&t.triggerName==e&&t.queued&&t.destroy()});let d=a.matchTransition(r.value,c.value,t,c.params),h=!1;if(!d){if(!n)return;d=a.fallbackTransition,h=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:d,fromState:r,toState:c,player:s,isFallbackTransition:h}),h||(Ft(t,"ng-animate-queued"),s.onStart(()=>{Lt(t,"ng-animate-queued")})),s.onDone(()=>{let e=this.players.indexOf(s);e>=0&&this.players.splice(e,1);const i=this._engine.playersByElement.get(t);if(i){let t=i.indexOf(s);t>=0&&i.splice(t,1)}}),this.players.push(s),l.push(s),s}deregister(t){delete this._triggers[t],this._engine.statesByElement.forEach((e,i)=>{delete e[t]}),this._elementListeners.forEach((e,i)=>{this._elementListeners.set(i,e.filter(e=>e.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);const e=this._engine.playersByElement.get(t);e&&(e.forEach(t=>t.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,e){const i=this._engine.driver.query(t,".ng-trigger",!0);i.forEach(t=>{if(t.__ng_removed)return;const i=this._engine.fetchNamespacesByElement(t);i.size?i.forEach(i=>i.triggerLeaveAnimation(t,e,!1,!0)):this.clearElementCache(t)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(t=>this.clearElementCache(t)))}triggerLeaveAnimation(t,e,i,n){const a=this._engine.statesByElement.get(t);if(a){const s=[];if(Object.keys(a).forEach(e=>{if(this._triggers[e]){const i=this.trigger(t,e,"void",n);i&&s.push(i)}}),s.length)return this._engine.markElementAsRemoved(this.id,t,!0,e),i&&r(s).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){const e=this._elementListeners.get(t);if(e){const i=new Set;e.forEach(e=>{const n=e.name;if(i.has(n))return;i.add(n);const a=this._triggers[n].fallbackTransition,s=this._engine.statesByElement.get(t)[n]||Pt,o=new It("void"),r=new jt(this.id,n,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:n,transition:a,fromState:s,toState:o,player:r,isFallbackTransition:!0})})}}removeNode(t,e){const i=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),this.triggerLeaveAnimation(t,e,!0))return;let n=!1;if(i.totalAnimations){const e=i.players.length?i.playersByQueriedElement.get(t):[];if(e&&e.length)n=!0;else{let e=t;for(;e=e.parentNode;)if(i.statesByElement.get(e)){n=!0;break}}}if(this.prepareLeaveAnimationListeners(t),n)i.markElementAsRemoved(this.id,t,!1,e);else{const n=t.__ng_removed;n&&n!==kt||(i.afterFlush(()=>this.clearElementCache(t)),i.destroyInnerAnimations(t),i._onRemovalComplete(t,e))}}insertNode(t,e){Ft(t,this._hostClassName)}drainQueuedTransitions(t){const e=[];return this._queue.forEach(i=>{const n=i.player;if(n.destroyed)return;const a=i.element,s=this._elementListeners.get(a);s&&s.forEach(e=>{if(e.name==i.triggerName){const n=h(a,i.triggerName,i.fromState.value,i.toState.value);n._data=t,l(i.player,e.phase,n,e.callback)}}),n.markedForDestroy?this._engine.afterFlush(()=>{n.destroy()}):e.push(i)}),this._queue=[],e.sort((t,e)=>{const i=t.transition.ast.depCount,n=e.transition.ast.depCount;return 0==i||0==n?i-n:this._engine.driver.containsElement(t.element,e.element)?1:-1})}destroy(t){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}elementContainsData(t){let e=!1;return this._elementListeners.has(t)&&(e=!0),e=!!this._queue.find(e=>e.element===t)||e,e}}class Rt{constructor(t,e,i){this.bodyNode=t,this.driver=e,this._normalizer=i,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=(t,e)=>{}}_onRemovalComplete(t,e){this.onRemovalComplete(t,e)}get queuedPlayers(){const t=[];return this._namespaceList.forEach(e=>{e.players.forEach(e=>{e.queued&&t.push(e)})}),t}createNamespace(t,e){const i=new Vt(t,e,this);return e.parentNode?this._balanceNamespaceList(i,e):(this.newHostElements.set(e,i),this.collectEnterElement(e)),this._namespaceLookup[t]=i}_balanceNamespaceList(t,e){const i=this._namespaceList.length-1;if(i>=0){let n=!1;for(let a=i;a>=0;a--)if(this.driver.containsElement(this._namespaceList[a].hostElement,e)){this._namespaceList.splice(a+1,0,t),n=!0;break}n||this._namespaceList.splice(0,0,t)}else this._namespaceList.push(t);return this.namespacesByHostElement.set(e,t),t}register(t,e){let i=this._namespaceLookup[t];return i||(i=this.createNamespace(t,e)),i}registerTrigger(t,e,i){let n=this._namespaceLookup[t];n&&n.register(e,i)&&this.totalAnimations++}destroy(t,e){if(!t)return;const i=this._fetchNamespace(t);this.afterFlush(()=>{this.namespacesByHostElement.delete(i.hostElement),delete this._namespaceLookup[t];const e=this._namespaceList.indexOf(i);e>=0&&this._namespaceList.splice(e,1)}),this.afterFlushAnimationsDone(()=>i.destroy(e))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){const e=new Set,i=this.statesByElement.get(t);if(i){const t=Object.keys(i);for(let n=0;n<t.length;n++){const a=i[t[n]].namespaceId;if(a){const t=this._fetchNamespace(a);t&&e.add(t)}}}return e}trigger(t,e,i,n){if(At(e)){const a=this._fetchNamespace(t);if(a)return a.trigger(e,i,n),!0}return!1}insertNode(t,e,i,n){if(!At(e))return;const a=e.__ng_removed;if(a&&a.setForRemoval){a.setForRemoval=!1,a.setForMove=!0;const t=this.collectedLeaveElements.indexOf(e);t>=0&&this.collectedLeaveElements.splice(t,1)}if(t){const n=this._fetchNamespace(t);n&&n.insertNode(e,i)}n&&this.collectEnterElement(e)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),Ft(t,"ng-animate-disabled")):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Lt(t,"ng-animate-disabled"))}removeNode(t,e,i,n){if(At(e)){const a=t?this._fetchNamespace(t):null;if(a?a.removeNode(e,n):this.markElementAsRemoved(t,e,!1,n),i){const i=this.namespacesByHostElement.get(e);i&&i.id!==t&&i.removeNode(e,n)}}else this._onRemovalComplete(e,n)}markElementAsRemoved(t,e,i,n){this.collectedLeaveElements.push(e),e.__ng_removed={namespaceId:t,setForRemoval:n,hasAnimation:i,removedBeforeQueried:!1}}listen(t,e,i,n,a){return At(e)?this._fetchNamespace(t).listen(e,i,n,a):()=>{}}_buildInstruction(t,e,i,n,a){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,i,n,t.fromState.options,t.toState.options,e,a)}destroyInnerAnimations(t){let e=this.driver.query(t,".ng-trigger",!0);e.forEach(t=>this.destroyActiveAnimationsForElement(t)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,".ng-animating",!0),e.forEach(t=>this.finishActiveQueriedAnimationOnElement(t)))}destroyActiveAnimationsForElement(t){const e=this.playersByElement.get(t);e&&e.forEach(t=>{t.queued?t.markedForDestroy=!0:t.destroy()})}finishActiveQueriedAnimationOnElement(t){const e=this.playersByQueriedElement.get(t);e&&e.forEach(t=>t.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return r(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t.__ng_removed;if(e&&e.setForRemoval){if(t.__ng_removed=kt,e.namespaceId){this.destroyInnerAnimations(t);const i=this._fetchNamespace(e.namespaceId);i&&i.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}this.driver.matchesElement(t,".ng-animate-disabled")&&this.markElementAsDisabled(t,!1),this.driver.query(t,".ng-animate-disabled",!0).forEach(t=>{this.markElementAsDisabled(t,!1)})}flush(t=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((t,e)=>this._balanceNamespaceList(t,e)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;i<this.collectedEnterElements.length;i++)Ft(this.collectedEnterElements[i],"ng-star-inserted");if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){const i=[];try{e=this._flushAnimations(i,t)}finally{for(let t=0;t<i.length;t++)i[t]()}}else for(let i=0;i<this.collectedLeaveElements.length;i++)this.processLeaveNode(this.collectedLeaveElements[i]);if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(t=>t()),this._flushFns=[],this._whenQuietFns.length){const t=this._whenQuietFns;this._whenQuietFns=[],e.length?r(e).onDone(()=>{t.forEach(t=>t())}):t.forEach(t=>t())}}reportError(t){throw new Error("Unable to process animations due to the following failed trigger transitions\n "+t.join("\n"))}_flushAnimations(t,e){const i=new st,n=[],a=new Map,o=[],c=new Map,l=new Map,d=new Map,h=new Set;this.disabledNodes.forEach(t=>{h.add(t);const e=this.driver.query(t,".ng-animate-queued",!0);for(let i=0;i<e.length;i++)h.add(e[i])});const p=this.bodyNode,b=Array.from(this.statesByElement.keys()),f=Et(b,this.collectedEnterElements),m=new Map;let g=0;f.forEach((t,e)=>{const i="ng-enter"+g++;m.set(e,i),t.forEach(t=>Ft(t,i))});const v=[],_=new Set,y=new Set;for(let s=0;s<this.collectedLeaveElements.length;s++){const t=this.collectedLeaveElements[s],e=t.__ng_removed;e&&e.setForRemoval&&(v.push(t),_.add(t),e.hasAnimation?this.driver.query(t,".ng-star-inserted",!0).forEach(t=>_.add(t)):y.add(t))}const x=new Map,C=Et(b,Array.from(_));C.forEach((t,e)=>{const i="ng-leave"+g++;x.set(e,i),t.forEach(t=>Ft(t,i))}),t.push(()=>{f.forEach((t,e)=>{const i=m.get(e);t.forEach(t=>Lt(t,i))}),C.forEach((t,e)=>{const i=x.get(e);t.forEach(t=>Lt(t,i))}),v.forEach(t=>{this.processLeaveNode(t)})});const O=[],D=[];for(let s=this._namespaceList.length-1;s>=0;s--)this._namespaceList[s].drainQueuedTransitions(e).forEach(t=>{const e=t.player,a=t.element;if(O.push(e),this.collectedEnterElements.length){const t=a.__ng_removed;if(t&&t.setForMove)return void e.destroy()}const s=!p||!this.driver.containsElement(p,a),r=x.get(a),h=m.get(a),b=this._buildInstruction(t,i,h,r,s);if(b.errors&&b.errors.length)D.push(b);else{if(s)return e.onStart(()=>W(a,b.fromStyles)),e.onDestroy(()=>A(a,b.toStyles)),void n.push(e);if(t.isFallbackTransition)return e.onStart(()=>W(a,b.fromStyles)),e.onDestroy(()=>A(a,b.toStyles)),void n.push(e);b.timelines.forEach(t=>t.stretchStartingKeyframe=!0),i.append(a,b.timelines),o.push({instruction:b,player:e,element:a}),b.queriedElements.forEach(t=>u(c,t,[]).push(e)),b.preStyleProps.forEach((t,e)=>{const i=Object.keys(t);if(i.length){let t=l.get(e);t||l.set(e,t=new Set),i.forEach(e=>t.add(e))}}),b.postStyleProps.forEach((t,e)=>{const i=Object.keys(t);let n=d.get(e);n||d.set(e,n=new Set),i.forEach(t=>n.add(t))})}});if(D.length){const t=[];D.forEach(e=>{t.push(`@${e.triggerName} has failed due to:\n`),e.errors.forEach(e=>t.push(`- ${e}\n`))}),O.forEach(t=>t.destroy()),this.reportError(t)}const w=new Map,M=new Map;o.forEach(t=>{const e=t.element;i.has(e)&&(M.set(e,e),this._beforeAnimationBuild(t.player.namespaceId,t.instruction,w))}),n.forEach(t=>{const e=t.element;this._getPreviousPlayers(e,!1,t.namespaceId,t.triggerName,null).forEach(t=>{u(w,e,[]).push(t),t.destroy()})});const k=v.filter(t=>Nt(t,l,d)),S=new Map;Tt(S,this.driver,y,d,s.a).forEach(t=>{Nt(t,l,d)&&k.push(t)});const I=new Map;f.forEach((t,e)=>{Tt(I,this.driver,new Set(t),l,s.p)}),k.forEach(t=>{const e=S.get(t),i=I.get(t);S.set(t,Object.assign(Object.assign({},e),i))});const P=[],V=[],R={};o.forEach(t=>{const{element:e,player:s,instruction:o}=t;if(i.has(e)){if(h.has(e))return s.onDestroy(()=>A(e,o.toStyles)),s.disabled=!0,s.overrideTotalTime(o.totalTime),void n.push(s);let t=R;if(M.size>1){let i=e;const n=[];for(;i=i.parentNode;){const e=M.get(i);if(e){t=e;break}n.push(i)}n.forEach(e=>M.set(e,t))}const i=this._buildAnimation(s.namespaceId,o,w,a,I,S);if(s.setRealPlayer(i),t===R)P.push(s);else{const e=this.playersByElement.get(t);e&&e.length&&(s.parentPlayer=r(e)),n.push(s)}}else W(e,o.fromStyles),s.onDestroy(()=>A(e,o.toStyles)),V.push(s),h.has(e)&&n.push(s)}),V.forEach(t=>{const e=a.get(t.element);if(e&&e.length){const i=r(e);t.setRealPlayer(i)}}),n.forEach(t=>{t.parentPlayer?t.syncPlayerEvents(t.parentPlayer):t.destroy()});for(let s=0;s<v.length;s++){const t=v[s],e=t.__ng_removed;if(Lt(t,"ng-leave"),e&&e.hasAnimation)continue;let i=[];if(c.size){let e=c.get(t);e&&e.length&&i.push(...e);let n=this.driver.query(t,".ng-animating",!0);for(let t=0;t<n.length;t++){let e=c.get(n[t]);e&&e.length&&i.push(...e)}}const n=i.filter(t=>!t.destroyed);n.length?Qt(this,t,n):this.processLeaveNode(t)}return v.length=0,P.forEach(t=>{this.players.push(t),t.onDone(()=>{t.destroy();const e=this.players.indexOf(t);this.players.splice(e,1)}),t.play()}),P}elementContainsData(t,e){let i=!1;const n=e.__ng_removed;return n&&n.setForRemoval&&(i=!0),this.playersByElement.has(e)&&(i=!0),this.playersByQueriedElement.has(e)&&(i=!0),this.statesByElement.has(e)&&(i=!0),this._fetchNamespace(t).elementContainsData(e)||i}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,e,i,n,a){let s=[];if(e){const e=this.playersByQueriedElement.get(t);e&&(s=e)}else{const e=this.playersByElement.get(t);if(e){const t=!a||"void"==a;e.forEach(e=>{e.queued||(t||e.triggerName==n)&&s.push(e)})}}return(i||n)&&(s=s.filter(t=>!(i&&i!=t.namespaceId||n&&n!=t.triggerName))),s}_beforeAnimationBuild(t,e,i){const n=e.element,a=e.isRemovalTransition?void 0:t,s=e.isRemovalTransition?void 0:e.triggerName;for(const o of e.timelines){const t=o.element,r=t!==n,c=u(i,t,[]);this._getPreviousPlayers(t,r,a,s,e.toState).forEach(t=>{const e=t.getRealPlayer();e.beforeDestroy&&e.beforeDestroy(),t.destroy(),c.push(t)})}W(n,e.fromStyles)}_buildAnimation(t,e,i,n,a,o){const l=e.triggerName,d=e.element,h=[],p=new Set,b=new Set,f=e.timelines.map(e=>{const r=e.element;p.add(r);const u=r.__ng_removed;if(u&&u.removedBeforeQueried)return new s.d(e.duration,e.delay);const f=r!==d,m=function(t){const e=[];return function t(e,i){for(let n=0;n<e.length;n++){const a=e[n];a instanceof s.o?t(a.players,i):i.push(a)}}(t,e),e}((i.get(r)||Mt).map(t=>t.getRealPlayer())).filter(t=>!!t.element&&t.element===r),g=a.get(r),v=o.get(r),_=c(0,this._normalizer,0,e.keyframes,g,v),y=this._buildPlayer(e,_,m);if(e.subTimeline&&n&&b.add(r),f){const e=new jt(t,l,r);e.setRealPlayer(y),h.push(e)}return y});h.forEach(t=>{u(this.playersByQueriedElement,t.element,[]).push(t),t.onDone(()=>function(t,e,i){let n;if(t instanceof Map){if(n=t.get(e),n){if(n.length){const t=n.indexOf(i);n.splice(t,1)}0==n.length&&t.delete(e)}}else if(n=t[e],n){if(n.length){const t=n.indexOf(i);n.splice(t,1)}0==n.length&&delete t[e]}return n}(this.playersByQueriedElement,t.element,t))}),p.forEach(t=>Ft(t,"ng-animating"));const m=r(f);return m.onDestroy(()=>{p.forEach(t=>Lt(t,"ng-animating")),A(d,e.toStyles)}),b.forEach(t=>{u(n,t,[]).push(m)}),m}_buildPlayer(t,e,i){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,i):new s.d(t.duration,t.delay)}}class jt{constructor(t,e,i){this.namespaceId=t,this.triggerName=e,this.element=i,this._player=new s.d,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,Object.keys(this._queuedCallbacks).forEach(e=>{this._queuedCallbacks[e].forEach(i=>l(t,e,void 0,i))}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){const e=this._player;e.triggerCallback&&t.onStart(()=>e.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,e){u(this._queuedCallbacks,t,[]).push(e)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}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(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){const e=this._player;e.triggerCallback&&e.triggerCallback(t)}}function At(t){return t&&1===t.nodeType}function Wt(t,e){const i=t.style.display;return t.style.display=null!=e?e:"none",i}function Tt(t,e,i,n,a){const s=[];i.forEach(t=>s.push(Wt(t)));const o=[];n.forEach((i,n)=>{const s={};i.forEach(t=>{const i=s[t]=e.computeStyle(n,t,a);i&&0!=i.length||(n.__ng_removed=St,o.push(n))}),t.set(n,s)});let r=0;return i.forEach(t=>Wt(t,s[r++])),o}function Et(t,e){const i=new Map;if(t.forEach(t=>i.set(t,[])),0==e.length)return i;const n=new Set(e),a=new Map;return e.forEach(t=>{const e=function t(e){if(!e)return 1;let s=a.get(e);if(s)return s;const o=e.parentNode;return s=i.has(o)?o:n.has(o)?1:t(o),a.set(e,s),s}(t);1!==e&&i.get(e).push(t)}),i}function Ft(t,e){if(t.classList)t.classList.add(e);else{let i=t.$$classes;i||(i=t.$$classes={}),i[e]=!0}}function Lt(t,e){if(t.classList)t.classList.remove(e);else{let i=t.$$classes;i&&delete i[e]}}function Qt(t,e,i){r(i).onDone(()=>t.processLeaveNode(e))}function Nt(t,e,i){const n=i.get(t);if(!n)return!1;let a=e.get(t);return a?n.forEach(t=>a.add(t)):e.set(t,n),i.delete(t),!0}class zt{constructor(t,e,i){this.bodyNode=t,this._driver=e,this._triggerCache={},this.onRemovalComplete=(t,e)=>{},this._transitionEngine=new Rt(t,e,i),this._timelineEngine=new wt(t,e,i),this._transitionEngine.onRemovalComplete=(t,e)=>this.onRemovalComplete(t,e)}registerTrigger(t,e,i,n,a){const s=t+"-"+n;let o=this._triggerCache[s];if(!o){const t=[],e=J(this._driver,a,t);if(t.length)throw new Error(`The animation trigger "${n}" has failed to build due to the following errors:\n - ${t.join("\n - ")}`);o=function(t,e){return new Ct(t,e)}(n,e),this._triggerCache[s]=o}this._transitionEngine.registerTrigger(e,n,o)}register(t,e){this._transitionEngine.register(t,e)}destroy(t,e){this._transitionEngine.destroy(t,e)}onInsert(t,e,i,n){this._transitionEngine.insertNode(t,e,i,n)}onRemove(t,e,i,n){this._transitionEngine.removeNode(t,e,n||!1,i)}disableAnimations(t,e){this._transitionEngine.markElementAsDisabled(t,e)}process(t,e,i,n){if("@"==i.charAt(0)){const[t,a]=p(i);this._timelineEngine.command(t,e,a,n)}else this._transitionEngine.trigger(t,e,i,n)}listen(t,e,i,n,a){if("@"==i.charAt(0)){const[t,n]=p(i);return this._timelineEngine.listen(t,e,n,a)}return this._transitionEngine.listen(t,e,i,n,a)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}function Bt(t,e){let i=null,n=null;return Array.isArray(e)&&e.length?(i=$t(e[0]),e.length>1&&(n=$t(e[e.length-1]))):e&&(i=$t(e)),i||n?new Ut(t,i,n):null}let Ut=(()=>{class t{constructor(e,i,n){this._element=e,this._startStyles=i,this._endStyles=n,this._state=0;let a=t.initialStylesByElement.get(e);a||t.initialStylesByElement.set(e,a={}),this._initialStyles=a}start(){this._state<1&&(this._startStyles&&A(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(A(this._element,this._initialStyles),this._endStyles&&(A(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(W(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(W(this._element,this._endStyles),this._endStyles=null),A(this._element,this._initialStyles),this._state=3)}}return t.initialStylesByElement=new WeakMap,t})();function $t(t){let e=null;const i=Object.keys(t);for(let n=0;n<i.length;n++){const a=i[n];Ht(a)&&(e=e||{},e[a]=t[a])}return e}function Ht(t){return"display"===t||"position"===t}class Gt{constructor(t,e,i,n,a,s,o){this._element=t,this._name=e,this._duration=i,this._delay=n,this._easing=a,this._fillMode=s,this._onDoneFn=o,this._finished=!1,this._destroyed=!1,this._startTime=0,this._position=0,this._eventFn=t=>this._handleCallback(t)}apply(){!function(t,e){const i=Zt(t,"").trim();i.length&&(function(t,e){let i=0;for(let n=0;n<t.length;n++)","===t.charAt(n)&&i++}(i),e=`${i}, ${e}`),Jt(t,"",e)}(this._element,`${this._duration}ms ${this._easing} ${this._delay}ms 1 normal ${this._fillMode} ${this._name}`),Yt(this._element,this._eventFn,!1),this._startTime=Date.now()}pause(){Xt(this._element,this._name,"paused")}resume(){Xt(this._element,this._name,"running")}setPosition(t){const e=qt(this._element,this._name);this._position=t*this._duration,Jt(this._element,"Delay",`-${this._position}ms`,e)}getPosition(){return this._position}_handleCallback(t){const e=t._ngTestManualTimestamp||Date.now(),i=1e3*parseFloat(t.elapsedTime.toFixed(3));t.animationName==this._name&&Math.max(e-this._startTime,0)>=this._delay&&i>=this._duration&&this.finish()}finish(){this._finished||(this._finished=!0,this._onDoneFn(),Yt(this._element,this._eventFn,!0))}destroy(){this._destroyed||(this._destroyed=!0,this.finish(),function(t,e){const i=Zt(t,"").split(","),n=Kt(i,e);n>=0&&(i.splice(n,1),Jt(t,"",i.join(",")))}(this._element,this._name))}}function Xt(t,e,i){Jt(t,"PlayState",i,qt(t,e))}function qt(t,e){const i=Zt(t,"");return i.indexOf(",")>0?Kt(i.split(","),e):Kt([i],e)}function Kt(t,e){for(let i=0;i<t.length;i++)if(t[i].indexOf(e)>=0)return i;return-1}function Yt(t,e,i){i?t.removeEventListener("animationend",e):t.addEventListener("animationend",e)}function Jt(t,e,i,n){const a="animation"+e;if(null!=n){const e=t.style[a];if(e.length){const t=e.split(",");t[n]=i,i=t.join(",")}}t.style[a]=i}function Zt(t,e){return t.style["animation"+e]}class te{constructor(t,e,i,n,a,s,o,r){this.element=t,this.keyframes=e,this.animationName=i,this._duration=n,this._delay=a,this._finalStyles=o,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this._state=0,this.easing=s||"linear",this.totalTime=n+a,this._buildStyler()}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}destroy(){this.init(),this._state>=4||(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}_flushDoneFns(){this._onDoneFns.forEach(t=>t()),this._onDoneFns=[]}_flushStartFns(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}finish(){this.init(),this._state>=3||(this._state=3,this._styler.finish(),this._flushStartFns(),this._specialStyles&&this._specialStyles.finish(),this._flushDoneFns())}setPosition(t){this._styler.setPosition(t)}getPosition(){return this._styler.getPosition()}hasStarted(){return this._state>=2}init(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())}play(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2,this._specialStyles&&this._specialStyles.start()),this._styler.resume()}pause(){this.init(),this._styler.pause()}restart(){this.reset(),this.play()}reset(){this._styler.destroy(),this._buildStyler(),this._styler.apply()}_buildStyler(){this._styler=new Gt(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",()=>this.finish())}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}beforeDestroy(){this.init();const t={};if(this.hasStarted()){const e=this._state>=3;Object.keys(this._finalStyles).forEach(i=>{"offset"!=i&&(t[i]=e?this._finalStyles[i]:H(this.element,i))})}this.currentSnapshot=t}}class ee extends s.d{constructor(t,e){super(),this.element=t,this._startingStyles={},this.__initialized=!1,this._styles=D(e)}init(){!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach(t=>{this._startingStyles[t]=this.element.style[t]}),super.init())}play(){this._startingStyles&&(this.init(),Object.keys(this._styles).forEach(t=>this.element.style.setProperty(t,this._styles[t])),super.play())}destroy(){this._startingStyles&&(Object.keys(this._startingStyles).forEach(t=>{const e=this._startingStyles[t];e?this.element.style.setProperty(t,e):this.element.style.removeProperty(t)}),this._startingStyles=null,super.destroy())}}class ie{constructor(){this._count=0,this._head=document.querySelector("head"),this._warningIssued=!1}validateStyleProperty(t){return y(t)}matchesElement(t,e){return x(t,e)}containsElement(t,e){return C(t,e)}query(t,e,i){return O(t,e,i)}computeStyle(t,e,i){return window.getComputedStyle(t)[e]}buildKeyframeElement(t,e,i){i=i.map(t=>D(t));let n=`@keyframes ${e} {\n`,a="";i.forEach(t=>{a=" ";const e=parseFloat(t.offset);n+=`${a}${100*e}% {\n`,a+=" ",Object.keys(t).forEach(e=>{const i=t[e];switch(e){case"offset":return;case"easing":return void(i&&(n+=`${a}animation-timing-function: ${i};\n`));default:return void(n+=`${a}${e}: ${i};\n`)}}),n+=a+"}\n"}),n+="}\n";const s=document.createElement("style");return s.textContent=n,s}animate(t,e,i,n,a,s=[],o){o&&this._notifyFaultyScrubber();const r=s.filter(t=>t instanceof te),c={};B(i,n)&&r.forEach(t=>{let e=t.currentSnapshot;Object.keys(e).forEach(t=>c[t]=e[t])});const l=function(t){let e={};return t&&(Array.isArray(t)?t:[t]).forEach(t=>{Object.keys(t).forEach(i=>{"offset"!=i&&"easing"!=i&&(e[i]=t[i])})}),e}(e=U(t,e,c));if(0==i)return new ee(t,l);const d="gen_css_kf_"+this._count++,h=this.buildKeyframeElement(t,d,e);document.querySelector("head").appendChild(h);const u=Bt(t,e),p=new te(t,e,d,i,n,a,l,u);return p.onDestroy(()=>{var t;(t=h).parentNode.removeChild(t)}),p}_notifyFaultyScrubber(){this._warningIssued||(console.warn("@angular/animations: please load the web-animations.js polyfill to allow programmatic access...\n"," visit http://bit.ly/IWukam to learn more about using the web-animation-js polyfill."),this._warningIssued=!0)}}class ne{constructor(t,e,i,n){this.element=t,this.keyframes=e,this.options=i,this._specialStyles=n,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:{},this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_triggerWebAnimation(t,e,i){return t.animate(e,i)}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),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(t=>t()),this._onDestroyFns=[])}setPosition(t){this.domPlayer.currentTime=t*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const t={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(e=>{"offset"!=e&&(t[e]=this._finished?this._finalKeyframe[e]:H(this.element,e))}),this.currentSnapshot=t}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}class ae{constructor(){this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(se().toString()),this._cssKeyframesDriver=new ie}validateStyleProperty(t){return y(t)}matchesElement(t,e){return x(t,e)}containsElement(t,e){return C(t,e)}query(t,e,i){return O(t,e,i)}computeStyle(t,e,i){return window.getComputedStyle(t)[e]}overrideWebAnimationsSupport(t){this._isNativeImpl=t}animate(t,e,i,n,a,s=[],o){if(!o&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(t,e,i,n,a,s);const r={duration:i,delay:n,fill:0==n?"both":"forwards"};a&&(r.easing=a);const c={},l=s.filter(t=>t instanceof ne);B(i,n)&&l.forEach(t=>{let e=t.currentSnapshot;Object.keys(e).forEach(t=>c[t]=e[t])});const d=Bt(t,e=U(t,e=e.map(t=>V(t,!1)),c));return new ne(t,e,r,d)}}function se(){return"undefined"!=typeof window&&void 0!==window.document&&Element.prototype.animate||{}}var oe=i("ofXK");let re=(()=>{class t extends s.b{constructor(t,e){super(),this._nextAnimationId=0,this._renderer=t.createRenderer(e.body,{id:"0",encapsulation:n.U.None,styles:[],data:{animation:[]}})}build(t){const e=this._nextAnimationId.toString();this._nextAnimationId++;const i=Array.isArray(t)?Object(s.j)(t):t;return de(this._renderer,null,e,"register",[i]),new ce(e,this._renderer)}}return t.\u0275fac=function(e){return new(e||t)(n.ac(n.J),n.ac(oe.e))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();class ce extends s.c{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new le(this._id,t,e||{},this._renderer)}}class le{constructor(t,e,i,n){this.id=t,this.element=e,this._renderer=n,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}_listen(t,e){return this._renderer.listen(this.element,`@@${this.id}:${t}`,e)}_command(t,...e){return de(this._renderer,this.element,this.id,t,e)}onDone(t){this._listen("done",t)}onStart(t){this._listen("start",t)}onDestroy(t){this._listen("destroy",t)}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")}setPosition(t){this._command("setPosition",t)}getPosition(){return 0}}function de(t,e,i,n,a){return t.setProperty(e,`@@${i}:${n}`,a)}let he=(()=>{class t{constructor(t,e,i){this.delegate=t,this.engine=e,this._zone=i,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),e.onRemovalComplete=(t,e)=>{e&&e.parentNode(t)&&e.removeChild(t.parentNode,t)}}createRenderer(t,e){const i=this.delegate.createRenderer(t,e);if(!(t&&e&&e.data&&e.data.animation)){let t=this._rendererCache.get(i);return t||(t=new ue("",i,this.engine),this._rendererCache.set(i,t)),t}const n=e.id,a=e.id+"-"+this._currentId;this._currentId++,this.engine.register(a,t);const s=e=>{Array.isArray(e)?e.forEach(s):this.engine.registerTrigger(n,a,t,e.name,e)};return e.data.animation.forEach(s),new pe(this,a,i,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(t,e,i){t>=0&&t<this._microtaskId?this._zone.run(()=>e(i)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(t=>{const[e,i]=t;e(i)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([e,i]))}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)(n.ac(n.J),n.ac(zt),n.ac(n.C))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();class ue{constructor(t,e,i){this.namespaceId=t,this.delegate=e,this.engine=i,this.destroyNode=this.delegate.destroyNode?t=>e.destroyNode(t):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)}insertBefore(t,e,i){this.delegate.insertBefore(t,e,i),this.engine.onInsert(this.namespaceId,e,t,!0)}removeChild(t,e,i){this.engine.onRemove(this.namespaceId,e,this.delegate,i)}selectRootElement(t,e){return this.delegate.selectRootElement(t,e)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,e,i,n){this.delegate.setAttribute(t,e,i,n)}removeAttribute(t,e,i){this.delegate.removeAttribute(t,e,i)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,i,n){this.delegate.setStyle(t,e,i,n)}removeStyle(t,e,i){this.delegate.removeStyle(t,e,i)}setProperty(t,e,i){"@"==e.charAt(0)&&"@.disabled"==e?this.disableAnimations(t,!!i):this.delegate.setProperty(t,e,i)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,i){return this.delegate.listen(t,e,i)}disableAnimations(t,e){this.engine.disableAnimations(t,e)}}class pe extends ue{constructor(t,e,i,n){super(e,i,n),this.factory=t,this.namespaceId=e}setProperty(t,e,i){"@"==e.charAt(0)?"."==e.charAt(1)&&"@.disabled"==e?this.disableAnimations(t,i=void 0===i||!!i):this.engine.process(this.namespaceId,t,e.substr(1),i):this.delegate.setProperty(t,e,i)}listen(t,e,i){if("@"==e.charAt(0)){const n=function(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(t);let a=e.substr(1),s="";return"@"!=a.charAt(0)&&([a,s]=function(t){const e=t.indexOf(".");return[t.substring(0,e),t.substr(e+1)]}(a)),this.engine.listen(this.namespaceId,n,a,s,t=>{this.factory.scheduleListenerCallback(t._data||-1,i,t)})}return this.delegate.listen(t,e,i)}}let be=(()=>{class t extends zt{constructor(t,e,i){super(t.body,e,i)}}return t.\u0275fac=function(e){return new(e||t)(n.ac(oe.e),n.ac(M),n.ac(ft))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();const fe=new n.s("AnimationModuleType"),me=[{provide:M,useFactory:function(){return"function"==typeof se()?new ae:new ie}},{provide:fe,useValue:"BrowserAnimations"},{provide:s.b,useClass:re},{provide:ft,useFactory:function(){return new mt}},{provide:zt,useClass:be},{provide:n.J,useFactory:function(t,e,i){return new he(t,e,i)},deps:[a.f,zt,n.C]}];let ge=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},providers:me,imports:[a.a]}),t})()},SIQe:function(t,e,i){"use strict";i.d(e,"a",(function(){return h}));var n=i("0IaG"),a=i("fXoL"),s=i("sYmb"),o=i("ofXK"),r=i("bTqV");function c(t,e){if(1&t&&(a.Wb(0,"h1",5),a.Qc(1),a.Vb()),2&t){const t=a.hc();a.Db(1),a.Rc(t.data.title)}}function l(t,e){if(1&t&&(a.Wb(0,"div",6),a.Rb(1,"div",7),a.Vb()),2&t){const t=a.hc();a.Db(1),a.Gb("alert-message ",t.data.mode,""),a.oc("innerHTML",t.data.msg,a.Ec)}}function d(t,e){if(1&t){const t=a.Xb();a.Wb(0,"div",8),a.Wb(1,"button",9),a.dc("click",(function(){return a.Dc(t),a.hc().dialogRef.close()})),a.Qc(2),a.ic(3,"translate"),a.Vb(),a.Vb()}2&t&&(a.Db(2),a.Rc(a.jc(3,1,"lang.ok")))}let h=(()=>{class t{constructor(t,e,i){this.translate=t,this.data=e,this.dialogRef=i,null==this.data.mode&&(this.data.mode="info"),this.data.mode="alert-message-"+this.data.mode,null===this.data.msg&&(this.data.msg="")}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(s.e),a.Qb(n.a),a.Qb(n.h))},t.\u0275cmp=a.Kb({type:t,selectors:[["ng-component"]],decls:5,vars:3,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title","",4,"ngIf"],["mat-dialog-content","",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",4,"ngIf"],["mat-dialog-title",""],["mat-dialog-content",""],[3,"innerHTML"],["mat-dialog-actions",""],["id","alertComponentClose","color","primary","mat-raised-button","",1,"actions",3,"click"]],template:function(t,e){1&t&&(a.Wb(0,"div",0),a.Oc(1,c,2,1,"h1",1),a.Oc(2,l,2,4,"div",2),a.Rb(3,"span",3),a.Oc(4,d,4,3,"div",4),a.Vb()),2&t&&(a.Db(1),a.oc("ngIf",""!==e.data.title),a.Db(1),a.oc("ngIf",""!==e.data.msg),a.Db(2),a.oc("ngIf",!e.data.hideButton))},directives:[o.t,n.i,n.f,n.c,r.b],pipes:[s.d],styles:[".alert-message-info[_ngcontent-%COMP%]{margin:0;font-size:16px}"]}),t})()},STbY:function(t,e,i){"use strict";i.d(e,"a",(function(){return V})),i.d(e,"b",(function(){return W})),i.d(e,"c",(function(){return G})),i.d(e,"d",(function(){return $})),i.d(e,"e",(function(){return N}));var n=i("u47x"),a=i("8LU1"),s=i("FtGj"),o=i("fXoL"),r=i("XNiG"),c=i("quSY"),l=i("VRyK"),d=i("LRne"),h=i("7Hc7"),u=i("JX91"),p=i("eIep"),b=i("IzEk"),f=i("pLZG"),m=i("1G5W"),g=i("3E0/"),v=i("R0Ic"),_=i("+rOU"),y=i("ofXK"),x=i("FKr1"),C=i("rDax"),O=i("nLfN"),D=i("vxfF"),w=i("cH1L");const M=["mat-menu-item",""],k=["*"];function S(t,e){if(1&t){const t=o.Xb();o.Wb(0,"div",0),o.dc("keydown",(function(e){return o.Dc(t),o.hc()._handleKeydown(e)}))("click",(function(){return o.Dc(t),o.hc().closed.emit("click")}))("@transformMenu.start",(function(e){return o.Dc(t),o.hc()._onAnimationStart(e)}))("@transformMenu.done",(function(e){return o.Dc(t),o.hc()._onAnimationDone(e)})),o.Wb(1,"div",1),o.mc(2),o.Vb(),o.Vb()}if(2&t){const t=o.hc();o.oc("id",t.panelId)("ngClass",t._classList)("@transformMenu",t._panelAnimationState),o.Eb("aria-label",t.ariaLabel||null)("aria-labelledby",t.ariaLabelledby||null)("aria-describedby",t.ariaDescribedby||null)}}const I={transformMenu:Object(v.n)("transformMenu",[Object(v.k)("void",Object(v.l)({opacity:0,transform:"scale(0.8)"})),Object(v.m)("void => enter",Object(v.g)([Object(v.i)(".mat-menu-content, .mat-mdc-menu-content",Object(v.e)("100ms linear",Object(v.l)({opacity:1}))),Object(v.e)("120ms cubic-bezier(0, 0, 0.2, 1)",Object(v.l)({transform:"scale(1)"}))])),Object(v.m)("* => void",Object(v.e)("100ms 25ms linear",Object(v.l)({opacity:0})))]),fadeInItems:Object(v.n)("fadeInItems",[Object(v.k)("showing",Object(v.l)({opacity:1})),Object(v.m)("void => *",[Object(v.l)({opacity:0}),Object(v.e)("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},P=new o.s("MatMenuContent");let V=(()=>{class t{constructor(t,e,i,n,a,s,o){this._template=t,this._componentFactoryResolver=e,this._appRef=i,this._injector=n,this._viewContainerRef=a,this._document=s,this._changeDetectorRef=o,this._attached=new r.a}attach(t={}){this._portal||(this._portal=new _.i(this._template,this._viewContainerRef)),this.detach(),this._outlet||(this._outlet=new _.f(this._document.createElement("div"),this._componentFactoryResolver,this._appRef,this._injector));const e=this._template.elementRef.nativeElement;e.parentNode.insertBefore(this._outlet.outletElement,e),this._changeDetectorRef&&this._changeDetectorRef.markForCheck(),this._portal.attach(this._outlet,t),this._attached.next()}detach(){this._portal.isAttached&&this._portal.detach()}ngOnDestroy(){this._outlet&&this._outlet.dispose()}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(o.P),o.Qb(o.j),o.Qb(o.g),o.Qb(o.t),o.Qb(o.T),o.Qb(y.e),o.Qb(o.h))},t.\u0275dir=o.Lb({type:t,selectors:[["ng-template","matMenuContent",""]],features:[o.Cb([{provide:P,useExisting:t}])]}),t})();const R=new o.s("MAT_MENU_PANEL");class j{}const A=Object(x.B)(Object(x.C)(j));let W=(()=>{class t extends A{constructor(t,e,i,n){super(),this._elementRef=t,this._focusMonitor=i,this._parentMenu=n,this.role="menuitem",this._hovered=new r.a,this._focused=new r.a,this._highlighted=!1,this._triggersSubmenu=!1,n&&n.addItem&&n.addItem(this)}focus(t="program",e){this._focusMonitor?this._focusMonitor.focusVia(this._getHostElement(),t,e):this._getHostElement().focus(e),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){var t,e;const i=this._elementRef.nativeElement.cloneNode(!0),n=i.querySelectorAll("mat-icon, .material-icons");for(let a=0;a<n.length;a++){const e=n[a];null===(t=e.parentNode)||void 0===t||t.removeChild(e)}return(null===(e=i.textContent)||void 0===e?void 0:e.trim())||""}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(o.l),o.Qb(y.e),o.Qb(n.h),o.Qb(R,8))},t.\u0275cmp=o.Kb({type:t,selectors:[["","mat-menu-item",""]],hostAttrs:[1,"mat-focus-indicator"],hostVars:10,hostBindings:function(t,e){1&t&&o.dc("click",(function(t){return e._checkDisabled(t)}))("mouseenter",(function(){return e._handleMouseEnter()})),2&t&&(o.Eb("role",e.role)("tabindex",e._getTabIndex())("aria-disabled",e.disabled.toString())("disabled",e.disabled||null),o.Ib("mat-menu-item",!0)("mat-menu-item-highlighted",e._highlighted)("mat-menu-item-submenu-trigger",e._triggersSubmenu))},inputs:{disabled:"disabled",disableRipple:"disableRipple",role:"role"},exportAs:["matMenuItem"],features:[o.Ab],attrs:M,ngContentSelectors:k,decls:2,vars:2,consts:[["matRipple","",1,"mat-menu-ripple",3,"matRippleDisabled","matRippleTrigger"]],template:function(t,e){1&t&&(o.nc(),o.mc(0),o.Rb(1,"div",0)),2&t&&(o.Db(1),o.oc("matRippleDisabled",e.disableRipple||e.disabled)("matRippleTrigger",e._getHostElement()))},directives:[x.u],encapsulation:2,changeDetection:0}),t})();const T=new o.s("mat-menu-default-options",{providedIn:"root",factory:function(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}});let E=0,F=(()=>{class t{constructor(t,e,i){this._elementRef=t,this._ngZone=e,this._defaultOptions=i,this._xPosition=this._defaultOptions.xPosition,this._yPosition=this._defaultOptions.yPosition,this._directDescendantItems=new o.H,this._tabSubscription=c.a.EMPTY,this._classList={},this._panelAnimationState="void",this._animationDone=new r.a,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new o.o,this.close=this.closed,this.panelId="mat-menu-panel-"+E++}get xPosition(){return this._xPosition}set xPosition(t){this._xPosition=t,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(t){this._yPosition=t,this.setPositionClasses()}get overlapTrigger(){return this._overlapTrigger}set overlapTrigger(t){this._overlapTrigger=Object(a.c)(t)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(t){this._hasBackdrop=Object(a.c)(t)}set panelClass(t){const e=this._previousPanelClass;e&&e.length&&e.split(" ").forEach(t=>{this._classList[t]=!1}),this._previousPanelClass=t,t&&t.length&&(t.split(" ").forEach(t=>{this._classList[t]=!0}),this._elementRef.nativeElement.className="")}get classList(){return this.panelClass}set classList(t){this.panelClass=t}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new n.g(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._tabSubscription=this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Object(u.a)(this._directDescendantItems),Object(p.a)(t=>Object(l.a)(...t.map(t=>t._focused)))).subscribe(t=>this._keyManager.updateActiveItem(t))}ngOnDestroy(){this._directDescendantItems.destroy(),this._tabSubscription.unsubscribe(),this.closed.complete()}_hovered(){return this._directDescendantItems.changes.pipe(Object(u.a)(this._directDescendantItems),Object(p.a)(t=>Object(l.a)(...t.map(t=>t._hovered))))}addItem(t){}removeItem(t){}_handleKeydown(t){const e=t.keyCode,i=this._keyManager;switch(e){case s.h:Object(s.v)(t)||(t.preventDefault(),this.closed.emit("keydown"));break;case s.k:this.parentMenu&&"ltr"===this.direction&&this.closed.emit("keydown");break;case s.o:this.parentMenu&&"rtl"===this.direction&&this.closed.emit("keydown");break;default:e!==s.s&&e!==s.e||i.setFocusOrigin("keyboard"),i.onKeydown(t)}}focusFirstItem(t="program"){this.lazyContent?this._ngZone.onStable.pipe(Object(b.a)(1)).subscribe(()=>this._focusFirstItem(t)):this._focusFirstItem(t)}_focusFirstItem(t){const e=this._keyManager;if(e.setFocusOrigin(t).setFirstItemActive(),!e.activeItem&&this._directDescendantItems.length){let t=this._directDescendantItems.first._getHostElement().parentElement;for(;t;){if("menu"===t.getAttribute("role")){t.focus();break}t=t.parentElement}}}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(t){const e="mat-elevation-z"+Math.min(4+t,24),i=Object.keys(this._classList).find(t=>t.startsWith("mat-elevation-z"));i&&i!==this._previousElevation||(this._previousElevation&&(this._classList[this._previousElevation]=!1),this._classList[e]=!0,this._previousElevation=e)}setPositionClasses(t=this.xPosition,e=this.yPosition){const i=this._classList;i["mat-menu-before"]="before"===t,i["mat-menu-after"]="after"===t,i["mat-menu-above"]="above"===e,i["mat-menu-below"]="below"===e}_startAnimation(){this._panelAnimationState="enter"}_resetAnimation(){this._panelAnimationState="void"}_onAnimationDone(t){this._animationDone.next(t),this._isAnimating=!1}_onAnimationStart(t){this._isAnimating=!0,"enter"===t.toState&&0===this._keyManager.activeItemIndex&&(t.element.scrollTop=0)}_updateDirectDescendants(){this._allItems.changes.pipe(Object(u.a)(this._allItems)).subscribe(t=>{this._directDescendantItems.reset(t.filter(t=>t._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(o.l),o.Qb(o.C),o.Qb(T))},t.\u0275dir=o.Lb({type:t,contentQueries:function(t,e,i){var n;1&t&&(o.Jb(i,P,!0),o.Jb(i,W,!0),o.Jb(i,W,!1)),2&t&&(o.yc(n=o.ec())&&(e.lazyContent=n.first),o.yc(n=o.ec())&&(e._allItems=n),o.yc(n=o.ec())&&(e.items=n))},viewQuery:function(t,e){var i;1&t&&o.Xc(o.P,!0),2&t&&o.yc(i=o.ec())&&(e.templateRef=i.first)},inputs:{backdropClass:"backdropClass",xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:"overlapTrigger",hasBackdrop:"hasBackdrop",panelClass:["class","panelClass"],classList:"classList",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"]},outputs:{closed:"closed",close:"close"}}),t})(),L=(()=>{class t extends F{}return t.\u0275fac=function(e){return Q(e||t)},t.\u0275dir=o.Lb({type:t,features:[o.Ab]}),t})();const Q=o.Yb(L);let N=(()=>{class t extends L{constructor(t,e,i){super(t,e,i)}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(o.l),o.Qb(o.C),o.Qb(T))},t.\u0275cmp=o.Kb({type:t,selectors:[["mat-menu"]],exportAs:["matMenu"],features:[o.Cb([{provide:R,useExisting:L},{provide:L,useExisting:t}]),o.Ab],ngContentSelectors:k,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-menu-panel",3,"id","ngClass","keydown","click"],[1,"mat-menu-content"]],template:function(t,e){1&t&&(o.nc(),o.Oc(0,S,3,6,"ng-template"))},directives:[y.q],styles:['.mat-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(100vh - 48px);border-radius:4px;outline:0;min-height:64px}.mat-menu-panel.ng-animating{pointer-events:none}.cdk-high-contrast-active .mat-menu-panel{outline:solid 1px}.mat-menu-content:not(:empty){padding-top:8px;padding-bottom:8px}.mat-menu-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative}.mat-menu-item::-moz-focus-inner{border:0}.mat-menu-item[disabled]{cursor:default}[dir=rtl] .mat-menu-item{text-align:right}.mat-menu-item .mat-icon{margin-right:16px;vertical-align:middle}.mat-menu-item .mat-icon svg{vertical-align:top}[dir=rtl] .mat-menu-item .mat-icon{margin-left:16px;margin-right:0}.mat-menu-item[disabled]{pointer-events:none}.cdk-high-contrast-active .mat-menu-item.cdk-program-focused,.cdk-high-contrast-active .mat-menu-item.cdk-keyboard-focused,.cdk-high-contrast-active .mat-menu-item-highlighted{outline:dotted 1px}.mat-menu-item-submenu-trigger{padding-right:32px}.mat-menu-item-submenu-trigger::after{width:0;height:0;border-style:solid;border-width:5px 0 5px 5px;border-color:transparent transparent transparent currentColor;content:"";display:inline-block;position:absolute;top:50%;right:16px;transform:translateY(-50%)}[dir=rtl] .mat-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}[dir=rtl] .mat-menu-item-submenu-trigger::after{right:auto;left:16px;transform:rotateY(180deg) translateY(-50%)}button.mat-menu-item{width:100%}.mat-menu-item .mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}\n'],encapsulation:2,data:{animation:[I.transformMenu,I.fadeInItems]},changeDetection:0}),t})();const z=new o.s("mat-menu-scroll-strategy"),B={provide:z,deps:[C.c],useFactory:function(t){return()=>t.scrollStrategies.reposition()}},U=Object(O.f)({passive:!0});let $=(()=>{class t{constructor(t,e,i,n,a,s,r,l){this._overlay=t,this._element=e,this._viewContainerRef=i,this._parentMenu=a,this._menuItemInstance=s,this._dir=r,this._focusMonitor=l,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=c.a.EMPTY,this._hoverSubscription=c.a.EMPTY,this._menuCloseSubscription=c.a.EMPTY,this._handleTouchStart=()=>this._openedBy="touch",this._openedBy=null,this.restoreFocus=!0,this.menuOpened=new o.o,this.onMenuOpen=this.menuOpened,this.menuClosed=new o.o,this.onMenuClose=this.menuClosed,e.nativeElement.addEventListener("touchstart",this._handleTouchStart,U),s&&(s._triggersSubmenu=this.triggersSubmenu()),this._scrollStrategy=n}get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(t){this.menu=t}get menu(){return this._menu}set menu(t){t!==this._menu&&(this._menu=t,this._menuCloseSubscription.unsubscribe(),t&&(this._menuCloseSubscription=t.close.subscribe(t=>{this._destroyMenu(),"click"!==t&&"tab"!==t||!this._parentMenu||this._parentMenu.closed.emit(t)})))}ngAfterContentInit(){this._checkMenu(),this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,U),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}triggersSubmenu(){return!(!this._menuItemInstance||!this._parentMenu)}toggleMenu(){return this._menuOpen?this.closeMenu():this.openMenu()}openMenu(){if(this._menuOpen)return;this._checkMenu();const t=this._createOverlay(),e=t.getConfig();this._setPosition(e.positionStrategy),e.hasBackdrop=null==this.menu.hasBackdrop?!this.triggersSubmenu():this.menu.hasBackdrop,t.attach(this._getPortal()),this.menu.lazyContent&&this.menu.lazyContent.attach(this.menuData),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this.closeMenu()),this._initMenu(),this.menu instanceof L&&this.menu._startAnimation()}closeMenu(){this.menu.close.emit()}focus(t="program",e){this._focusMonitor?this._focusMonitor.focusVia(this._element,t,e):this._element.nativeElement.focus(e)}_destroyMenu(){if(!this._overlayRef||!this.menuOpen)return;const t=this.menu;this._closingActionsSubscription.unsubscribe(),this._overlayRef.detach(),this._restoreFocus(),t instanceof L?(t._resetAnimation(),t.lazyContent?t._animationDone.pipe(Object(f.a)(t=>"void"===t.toState),Object(b.a)(1),Object(m.a)(t.lazyContent._attached)).subscribe({next:()=>t.lazyContent.detach(),complete:()=>this._setIsMenuOpen(!1)}):this._setIsMenuOpen(!1)):(this._setIsMenuOpen(!1),t.lazyContent&&t.lazyContent.detach())}_initMenu(){this.menu.parentMenu=this.triggersSubmenu()?this._parentMenu:void 0,this.menu.direction=this.dir,this._setMenuElevation(),this._setIsMenuOpen(!0),this.menu.focusFirstItem(this._openedBy||"program")}_setMenuElevation(){if(this.menu.setElevation){let t=0,e=this.menu.parentMenu;for(;e;)t++,e=e.parentMenu;this.menu.setElevation(t)}}_restoreFocus(){this.restoreFocus&&(this._openedBy?this.triggersSubmenu()||this.focus(this._openedBy):this.focus()),this._openedBy=null}_setIsMenuOpen(t){this._menuOpen=t,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&(this._menuItemInstance._highlighted=t)}_checkMenu(){}_createOverlay(){if(!this._overlayRef){const t=this._getOverlayConfig();this._subscribeToPositions(t.positionStrategy),this._overlayRef=this._overlay.create(t),this._overlayRef.keydownEvents().subscribe()}return this._overlayRef}_getOverlayConfig(){return new C.d({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:this.menu.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:this.menu.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir})}_subscribeToPositions(t){this.menu.setPositionClasses&&t.positionChanges.subscribe(t=>{this.menu.setPositionClasses("start"===t.connectionPair.overlayX?"after":"before","top"===t.connectionPair.overlayY?"below":"above")})}_setPosition(t){let[e,i]="before"===this.menu.xPosition?["end","start"]:["start","end"],[n,a]="above"===this.menu.yPosition?["bottom","top"]:["top","bottom"],[s,o]=[n,a],[r,c]=[e,i],l=0;this.triggersSubmenu()?(c=e="before"===this.menu.xPosition?"start":"end",i=r="end"===e?"start":"end",l="bottom"===n?8:-8):this.menu.overlapTrigger||(s="top"===n?"bottom":"top",o="top"===a?"bottom":"top"),t.withPositions([{originX:e,originY:s,overlayX:r,overlayY:n,offsetY:l},{originX:i,originY:s,overlayX:c,overlayY:n,offsetY:l},{originX:e,originY:o,overlayX:r,overlayY:a,offsetY:-l},{originX:i,originY:o,overlayX:c,overlayY:a,offsetY:-l}])}_menuClosingActions(){const t=this._overlayRef.backdropClick(),e=this._overlayRef.detachments(),i=this._parentMenu?this._parentMenu.closed:Object(d.a)(),n=this._parentMenu?this._parentMenu._hovered().pipe(Object(f.a)(t=>t!==this._menuItemInstance),Object(f.a)(()=>this._menuOpen)):Object(d.a)();return Object(l.a)(t,i,n,e)}_handleMousedown(t){Object(n.l)(t)||(this._openedBy=0===t.button?"mouse":null,this.triggersSubmenu()&&t.preventDefault())}_handleKeydown(t){const e=t.keyCode;this.triggersSubmenu()&&(e===s.o&&"ltr"===this.dir||e===s.k&&"rtl"===this.dir)&&this.openMenu()}_handleClick(t){this.triggersSubmenu()?(t.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){this.triggersSubmenu()&&(this._hoverSubscription=this._parentMenu._hovered().pipe(Object(f.a)(t=>t===this._menuItemInstance&&!t.disabled),Object(g.a)(0,h.a)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof L&&this.menu._isAnimating?this.menu._animationDone.pipe(Object(b.a)(1),Object(g.a)(0,h.a),Object(m.a)(this._parentMenu._hovered())).subscribe(()=>this.openMenu()):this.openMenu()}))}_getPortal(){return this._portal&&this._portal.templateRef===this.menu.templateRef||(this._portal=new _.i(this.menu.templateRef,this._viewContainerRef)),this._portal}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(C.c),o.Qb(o.l),o.Qb(o.T),o.Qb(z),o.Qb(L,8),o.Qb(W,10),o.Qb(w.c,8),o.Qb(n.h))},t.\u0275dir=o.Lb({type:t,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:["aria-haspopup","true",1,"mat-menu-trigger"],hostVars:2,hostBindings:function(t,e){1&t&&o.dc("mousedown",(function(t){return e._handleMousedown(t)}))("keydown",(function(t){return e._handleKeydown(t)}))("click",(function(t){return e._handleClick(t)})),2&t&&o.Eb("aria-expanded",e.menuOpen||null)("aria-controls",e.menuOpen?e.menu.panelId:null)},inputs:{restoreFocus:["matMenuTriggerRestoreFocus","restoreFocus"],_deprecatedMatMenuTriggerFor:["mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:["matMenuTriggerFor","menu"],menuData:["matMenuTriggerData","menuData"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"]}),t})(),H=(()=>{class t{}return t.\u0275mod=o.Ob({type:t}),t.\u0275inj=o.Nb({factory:function(e){return new(e||t)},providers:[B],imports:[x.k]}),t})(),G=(()=>{class t{}return t.\u0275mod=o.Ob({type:t}),t.\u0275inj=o.Nb({factory:function(e){return new(e||t)},providers:[B],imports:[[y.c,x.k,x.v,C.f,H],D.c,x.k,H]}),t})()},SeVD:function(t,e,i){"use strict";i.d(e,"a",(function(){return d}));var n=i("ngJS"),a=i("NJ4a"),s=i("Lhse"),o=i("kJWO"),r=i("I55L"),c=i("c2HN"),l=i("XoHu");const d=t=>{if(t&&"function"==typeof t[o.a])return d=t,t=>{const e=d[o.a]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if(Object(r.a)(t))return Object(n.a)(t);if(Object(c.a)(t))return i=t,t=>(i.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,a.a),t);if(t&&"function"==typeof t[s.a])return e=t,t=>{const i=e[s.a]();for(;;){let e;try{e=i.next()}catch(n){return t.error(n),t}if(e.done){t.complete();break}if(t.next(e.value),t.closed)break}return"function"==typeof i.return&&t.add(()=>{i.return&&i.return()}),t};{const e=Object(l.a)(t)?"an invalid object":`'${t}'`;throw new TypeError(`You provided ${e} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`)}var e,i,d}},SpAZ:function(t,e,i){"use strict";function n(t){return t}i.d(e,"a",(function(){return n}))},TCaw:function(t,e){function i(t){return Promise.resolve().then((function(){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}))}i.keys=function(){return[]},i.resolve=i,t.exports=i,i.id="TCaw"},TU8p:function(t,e,i){"use strict";i.d(e,"a",(function(){return h})),i.d(e,"b",(function(){return u}));var n=i("FKr1"),a=i("u47x"),s=i("8LU1"),o=i("R1ws"),r=i("fXoL");let c=0;class l{}const d=Object(n.C)(l);let h=(()=>{class t extends d{constructor(t,e,i,n,a){super(),this._ngZone=t,this._elementRef=e,this._ariaDescriber=i,this._renderer=n,this._animationMode=a,this._hasContent=!1,this._color="primary",this._overlap=!0,this.position="above after",this.size="medium",this._id=c++}get color(){return this._color}set color(t){this._setColor(t),this._color=t}get overlap(){return this._overlap}set overlap(t){this._overlap=Object(s.c)(t)}get description(){return this._description}set description(t){if(t!==this._description){const e=this._badgeElement;this._updateHostAriaDescription(t,this._description),this._description=t,e&&(t?e.setAttribute("aria-label",t):e.removeAttribute("aria-label"))}}get hidden(){return this._hidden}set hidden(t){this._hidden=Object(s.c)(t)}isAbove(){return-1===this.position.indexOf("below")}isAfter(){return-1===this.position.indexOf("before")}ngOnChanges(t){const e=t.content;if(e){const t=e.currentValue;this._hasContent=null!=t&&(""+t).trim().length>0,this._updateTextContent()}}ngOnDestroy(){const t=this._badgeElement;t&&(this.description&&this._ariaDescriber.removeDescription(t,this.description),this._renderer.destroyNode&&this._renderer.destroyNode(t))}getBadgeElement(){return this._badgeElement}_updateTextContent(){return this._badgeElement?this._badgeElement.textContent=this._stringifyContent():this._badgeElement=this._createBadgeElement(),this._badgeElement}_createBadgeElement(){const t=this._renderer.createElement("span");return this._clearExistingBadges("mat-badge-content"),t.setAttribute("id","mat-badge-content-"+this._id),t.classList.add("mat-badge-content"),t.textContent=this._stringifyContent(),"NoopAnimations"===this._animationMode&&t.classList.add("_mat-animation-noopable"),this.description&&t.setAttribute("aria-label",this.description),this._elementRef.nativeElement.appendChild(t),"function"==typeof requestAnimationFrame&&"NoopAnimations"!==this._animationMode?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{t.classList.add("mat-badge-active")})}):t.classList.add("mat-badge-active"),t}_updateHostAriaDescription(t,e){const i=this._updateTextContent();e&&this._ariaDescriber.removeDescription(i,e),t&&this._ariaDescriber.describe(i,t)}_setColor(t){if(t!==this._color){const e=this._elementRef.nativeElement.classList;this._color&&e.remove("mat-badge-"+this._color),t&&e.add("mat-badge-"+t)}}_clearExistingBadges(t){const e=this._elementRef.nativeElement;let i=e.children.length;for(;i--;){const n=e.children[i];n.classList.contains(t)&&e.removeChild(n)}}_stringifyContent(){const t=this.content;return null==t?"":""+t}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.C),r.Qb(r.l),r.Qb(a.c),r.Qb(r.I),r.Qb(o.a,8))},t.\u0275dir=r.Lb({type:t,selectors:[["","matBadge",""]],hostAttrs:[1,"mat-badge"],hostVars:20,hostBindings:function(t,e){2&t&&r.Ib("mat-badge-overlap",e.overlap)("mat-badge-above",e.isAbove())("mat-badge-below",!e.isAbove())("mat-badge-before",!e.isAfter())("mat-badge-after",e.isAfter())("mat-badge-small","small"===e.size)("mat-badge-medium","medium"===e.size)("mat-badge-large","large"===e.size)("mat-badge-hidden",e.hidden||!e._hasContent)("mat-badge-disabled",e.disabled)},inputs:{disabled:["matBadgeDisabled","disabled"],position:["matBadgePosition","position"],size:["matBadgeSize","size"],color:["matBadgeColor","color"],overlap:["matBadgeOverlap","overlap"],description:["matBadgeDescription","description"],hidden:["matBadgeHidden","hidden"],content:["matBadge","content"]},features:[r.Ab,r.Bb]}),t})(),u=(()=>{class t{}return t.\u0275mod=r.Ob({type:t}),t.\u0275inj=r.Nb({factory:function(e){return new(e||t)},imports:[[a.a,n.k],n.k]}),t})()},UXun:function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var n=i("jtHE");function a(t,e,i){let a;return a=t&&"object"==typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:i},t=>t.lift(function({bufferSize:t=Number.POSITIVE_INFINITY,windowTime:e=Number.POSITIVE_INFINITY,refCount:i,scheduler:a}){let s,o,r=0,c=!1,l=!1;return function(d){let h;r++,!s||c?(c=!1,s=new n.a(t,e,a),h=s.subscribe(this),o=d.subscribe({next(t){s.next(t)},error(t){c=!0,s.error(t)},complete(){l=!0,o=void 0,s.complete()}})):h=s.subscribe(this),this.add(()=>{r--,h.unsubscribe(),o&&!l&&i&&0===r&&(o.unsubscribe(),o=void 0,s=void 0)})}}(a))}},VRyK:function(t,e,i){"use strict";i.d(e,"a",(function(){return r}));var n=i("HDdC"),a=i("z+Ro"),s=i("bHdf"),o=i("yCtX");function r(...t){let e=Number.POSITIVE_INFINITY,i=null,r=t[t.length-1];return Object(a.a)(r)?(i=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(e=t.pop())):"number"==typeof r&&(e=t.pop()),null===i&&1===t.length&&t[0]instanceof n.a?t[0]:Object(s.a)(e)(Object(o.a)(t,i))}},WMd4:function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var n=i("EY2u"),a=i("LRne"),s=i("z6cu");let o=(()=>{class t{constructor(t,e,i){this.kind=t,this.value=e,this.error=i,this.hasValue="N"===t}observe(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}}do(t,e,i){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return i&&i()}}accept(t,e,i){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,i)}toObservable(){switch(this.kind){case"N":return Object(a.a)(this.value);case"E":return Object(s.a)(this.error);case"C":return Object(n.b)()}throw new Error("unexpected notification kind value")}static createNext(e){return void 0!==e?new t("N",e):t.undefinedValueNotification}static createError(e){return new t("E",void 0,e)}static createComplete(){return t.completeNotification}}return t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t})()},Wp6s:function(t,e,i){"use strict";i.d(e,"a",(function(){return O})),i.d(e,"b",(function(){return f})),i.d(e,"c",(function(){return C})),i.d(e,"d",(function(){return u})),i.d(e,"e",(function(){return m})),i.d(e,"f",(function(){return D})),i.d(e,"g",(function(){return g})),i.d(e,"h",(function(){return y})),i.d(e,"i",(function(){return _})),i.d(e,"j",(function(){return M})),i.d(e,"k",(function(){return v})),i.d(e,"l",(function(){return b})),i.d(e,"m",(function(){return p})),i.d(e,"n",(function(){return w})),i.d(e,"o",(function(){return x}));var n=i("R1ws"),a=i("FKr1"),s=i("fXoL");const o=["*",[["mat-card-footer"]]],r=["*","mat-card-footer"],c=[[["","mat-card-avatar",""],["","matCardAvatar",""]],[["mat-card-title"],["mat-card-subtitle"],["","mat-card-title",""],["","mat-card-subtitle",""],["","matCardTitle",""],["","matCardSubtitle",""]],"*"],l=["[mat-card-avatar], [matCardAvatar]","mat-card-title, mat-card-subtitle,\n [mat-card-title], [mat-card-subtitle],\n [matCardTitle], [matCardSubtitle]","*"],d=[[["mat-card-title"],["mat-card-subtitle"],["","mat-card-title",""],["","mat-card-subtitle",""],["","matCardTitle",""],["","matCardSubtitle",""]],[["img"]],"*"],h=["mat-card-title, mat-card-subtitle,\n [mat-card-title], [mat-card-subtitle],\n [matCardTitle], [matCardSubtitle]","img","*"];let u=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["mat-card-content"],["","mat-card-content",""],["","matCardContent",""]],hostAttrs:[1,"mat-card-content"]}),t})(),p=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["mat-card-title"],["","mat-card-title",""],["","matCardTitle",""]],hostAttrs:[1,"mat-card-title"]}),t})(),b=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["mat-card-subtitle"],["","mat-card-subtitle",""],["","matCardSubtitle",""]],hostAttrs:[1,"mat-card-subtitle"]}),t})(),f=(()=>{class t{constructor(){this.align="start"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["mat-card-actions"]],hostAttrs:[1,"mat-card-actions"],hostVars:2,hostBindings:function(t,e){2&t&&s.Ib("mat-card-actions-align-end","end"===e.align)},inputs:{align:"align"},exportAs:["matCardActions"]}),t})(),m=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["mat-card-footer"]],hostAttrs:[1,"mat-card-footer"]}),t})(),g=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","mat-card-image",""],["","matCardImage",""]],hostAttrs:[1,"mat-card-image"]}),t})(),v=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","mat-card-sm-image",""],["","matCardImageSmall",""]],hostAttrs:[1,"mat-card-sm-image"]}),t})(),_=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","mat-card-md-image",""],["","matCardImageMedium",""]],hostAttrs:[1,"mat-card-md-image"]}),t})(),y=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","mat-card-lg-image",""],["","matCardImageLarge",""]],hostAttrs:[1,"mat-card-lg-image"]}),t})(),x=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","mat-card-xl-image",""],["","matCardImageXLarge",""]],hostAttrs:[1,"mat-card-xl-image"]}),t})(),C=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","mat-card-avatar",""],["","matCardAvatar",""]],hostAttrs:[1,"mat-card-avatar"]}),t})(),O=(()=>{class t{constructor(t){this._animationMode=t}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(n.a,8))},t.\u0275cmp=s.Kb({type:t,selectors:[["mat-card"]],hostAttrs:[1,"mat-card","mat-focus-indicator"],hostVars:2,hostBindings:function(t,e){2&t&&s.Ib("_mat-animation-noopable","NoopAnimations"===e._animationMode)},exportAs:["matCard"],ngContentSelectors:r,decls:2,vars:0,template:function(t,e){1&t&&(s.nc(o),s.mc(0),s.mc(1,1))},styles:[".mat-card{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);display:block;position:relative;padding:16px;border-radius:4px}._mat-animation-noopable.mat-card{transition:none;animation:none}.mat-card .mat-divider-horizontal{position:absolute;left:0;width:100%}[dir=rtl] .mat-card .mat-divider-horizontal{left:auto;right:0}.mat-card .mat-divider-horizontal.mat-divider-inset{position:static;margin:0}[dir=rtl] .mat-card .mat-divider-horizontal.mat-divider-inset{margin-right:0}.cdk-high-contrast-active .mat-card{outline:solid 1px}.mat-card-actions,.mat-card-subtitle,.mat-card-content{display:block;margin-bottom:16px}.mat-card-title{display:block;margin-bottom:8px}.mat-card-actions{margin-left:-8px;margin-right:-8px;padding:8px 0}.mat-card-actions-align-end{display:flex;justify-content:flex-end}.mat-card-image{width:calc(100% + 32px);margin:0 -16px 16px -16px}.mat-card-footer{display:block;margin:0 -16px -16px -16px}.mat-card-actions .mat-button,.mat-card-actions .mat-raised-button,.mat-card-actions .mat-stroked-button{margin:0 8px}.mat-card-header{display:flex;flex-direction:row}.mat-card-header .mat-card-title{margin-bottom:12px}.mat-card-header-text{margin:0 16px}.mat-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0;object-fit:cover}.mat-card-title-group{display:flex;justify-content:space-between}.mat-card-sm-image{width:80px;height:80px}.mat-card-md-image{width:112px;height:112px}.mat-card-lg-image{width:152px;height:152px}.mat-card-xl-image{width:240px;height:240px;margin:-8px}.mat-card-title-group>.mat-card-xl-image{margin:-8px 0 8px}@media(max-width: 599px){.mat-card-title-group{margin:0}.mat-card-xl-image{margin-left:0;margin-right:0}}.mat-card>:first-child,.mat-card-content>:first-child{margin-top:0}.mat-card>:last-child:not(.mat-card-footer),.mat-card-content>:last-child:not(.mat-card-footer){margin-bottom:0}.mat-card-image:first-child{margin-top:-16px;border-top-left-radius:inherit;border-top-right-radius:inherit}.mat-card>.mat-card-actions:last-child{margin-bottom:-8px;padding-bottom:0}.mat-card-actions .mat-button:first-child,.mat-card-actions .mat-raised-button:first-child,.mat-card-actions .mat-stroked-button:first-child{margin-left:0;margin-right:0}.mat-card-title:not(:first-child),.mat-card-subtitle:not(:first-child){margin-top:-4px}.mat-card-header .mat-card-subtitle:not(:first-child){margin-top:-8px}.mat-card>.mat-card-xl-image:first-child{margin-top:-8px}.mat-card>.mat-card-xl-image:last-child{margin-bottom:-8px}\n"],encapsulation:2,changeDetection:0}),t})(),D=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=s.Kb({type:t,selectors:[["mat-card-header"]],hostAttrs:[1,"mat-card-header"],ngContentSelectors:l,decls:4,vars:0,consts:[[1,"mat-card-header-text"]],template:function(t,e){1&t&&(s.nc(c),s.mc(0),s.Wb(1,"div",0),s.mc(2,1),s.Vb(),s.mc(3,2))},encapsulation:2,changeDetection:0}),t})(),w=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=s.Kb({type:t,selectors:[["mat-card-title-group"]],hostAttrs:[1,"mat-card-title-group"],ngContentSelectors:h,decls:4,vars:0,template:function(t,e){1&t&&(s.nc(d),s.Wb(0,"div"),s.mc(1),s.Vb(),s.mc(2,1),s.mc(3,2))},encapsulation:2,changeDetection:0}),t})(),M=(()=>{class t{}return t.\u0275mod=s.Ob({type:t}),t.\u0275inj=s.Nb({factory:function(e){return new(e||t)},imports:[[a.k],a.k]}),t})()},XNiG:function(t,e,i){"use strict";i.d(e,"b",(function(){return l})),i.d(e,"a",(function(){return d}));var n=i("HDdC"),a=i("7o/Q"),s=i("quSY"),o=i("9ppp"),r=i("Ylt2"),c=i("2QA8");class l extends a.a{constructor(t){super(t),this.destination=t}}let d=(()=>{class t extends n.a{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[c.a](){return new l(this)}lift(t){const e=new h(this,this);return e.operator=t,e}next(t){if(this.closed)throw new o.a;if(!this.isStopped){const{observers:e}=this,i=e.length,n=e.slice();for(let a=0;a<i;a++)n[a].next(t)}}error(t){if(this.closed)throw new o.a;this.hasError=!0,this.thrownError=t,this.isStopped=!0;const{observers:e}=this,i=e.length,n=e.slice();for(let a=0;a<i;a++)n[a].error(t);this.observers.length=0}complete(){if(this.closed)throw new o.a;this.isStopped=!0;const{observers:t}=this,e=t.length,i=t.slice();for(let n=0;n<e;n++)i[n].complete();this.observers.length=0}unsubscribe(){this.isStopped=!0,this.closed=!0,this.observers=null}_trySubscribe(t){if(this.closed)throw new o.a;return super._trySubscribe(t)}_subscribe(t){if(this.closed)throw new o.a;return this.hasError?(t.error(this.thrownError),s.a.EMPTY):this.isStopped?(t.complete(),s.a.EMPTY):(this.observers.push(t),new r.a(this,t))}asObservable(){const t=new n.a;return t.source=this,t}}return t.create=(t,e)=>new h(t,e),t})();class h extends d{constructor(t,e){super(),this.destination=t,this.source=e}next(t){const{destination:e}=this;e&&e.next&&e.next(t)}error(t){const{destination:e}=this;e&&e.error&&this.destination.error(t)}complete(){const{destination:t}=this;t&&t.complete&&this.destination.complete()}_subscribe(t){const{source:e}=this;return e?this.source.subscribe(t):s.a.EMPTY}}},Xa2L:function(t,e,i){"use strict";i.d(e,"a",(function(){return g})),i.d(e,"b",(function(){return _})),i.d(e,"c",(function(){return v}));var n=i("fXoL"),a=i("ofXK"),s=i("FKr1"),o=i("8LU1"),r=i("nLfN"),c=i("R1ws");function l(t,e){if(1&t&&(n.gc(),n.Rb(0,"circle",3)),2&t){const t=n.hc();n.Lc("animation-name","mat-progress-spinner-stroke-rotate-"+t._spinnerAnimationLabel)("stroke-dashoffset",t._getStrokeDashOffset(),"px")("stroke-dasharray",t._getStrokeCircumference(),"px")("stroke-width",t._getCircleStrokeWidth(),"%"),n.Eb("r",t._getCircleRadius())}}function d(t,e){if(1&t&&(n.gc(),n.Rb(0,"circle",3)),2&t){const t=n.hc();n.Lc("stroke-dashoffset",t._getStrokeDashOffset(),"px")("stroke-dasharray",t._getStrokeCircumference(),"px")("stroke-width",t._getCircleStrokeWidth(),"%"),n.Eb("r",t._getCircleRadius())}}function h(t,e){if(1&t&&(n.gc(),n.Rb(0,"circle",3)),2&t){const t=n.hc();n.Lc("animation-name","mat-progress-spinner-stroke-rotate-"+t._spinnerAnimationLabel)("stroke-dashoffset",t._getStrokeDashOffset(),"px")("stroke-dasharray",t._getStrokeCircumference(),"px")("stroke-width",t._getCircleStrokeWidth(),"%"),n.Eb("r",t._getCircleRadius())}}function u(t,e){if(1&t&&(n.gc(),n.Rb(0,"circle",3)),2&t){const t=n.hc();n.Lc("stroke-dashoffset",t._getStrokeDashOffset(),"px")("stroke-dasharray",t._getStrokeCircumference(),"px")("stroke-width",t._getCircleStrokeWidth(),"%"),n.Eb("r",t._getCircleRadius())}}const p=".mat-progress-spinner{display:block;position:relative}.mat-progress-spinner svg{position:absolute;transform:rotate(-90deg);top:0;left:0;transform-origin:center;overflow:visible}.mat-progress-spinner circle{fill:transparent;transform-origin:center;transition:stroke-dashoffset 225ms linear}._mat-animation-noopable.mat-progress-spinner circle{transition:none;animation:none}.cdk-high-contrast-active .mat-progress-spinner circle{stroke:currentColor}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate]{animation:mat-progress-spinner-linear-rotate 2000ms linear infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate]{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition-property:stroke;animation-duration:4000ms;animation-timing-function:cubic-bezier(0.35, 0, 0.25, 1);animation-iteration-count:infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate]{animation:mat-progress-spinner-stroke-rotate-fallback 10000ms cubic-bezier(0.87, 0.03, 0.33, 1) infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate]{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] circle{transition-property:stroke}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] circle{transition:none;animation:none}@keyframes mat-progress-spinner-linear-rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes mat-progress-spinner-stroke-rotate-100{0%{stroke-dashoffset:268.606171575px;transform:rotate(0)}12.5%{stroke-dashoffset:56.5486677px;transform:rotate(0)}12.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(72.5deg)}25%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(72.5deg)}25.0001%{stroke-dashoffset:268.606171575px;transform:rotate(270deg)}37.5%{stroke-dashoffset:56.5486677px;transform:rotate(270deg)}37.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(161.5deg)}50%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(161.5deg)}50.0001%{stroke-dashoffset:268.606171575px;transform:rotate(180deg)}62.5%{stroke-dashoffset:56.5486677px;transform:rotate(180deg)}62.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(251.5deg)}75%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(251.5deg)}75.0001%{stroke-dashoffset:268.606171575px;transform:rotate(90deg)}87.5%{stroke-dashoffset:56.5486677px;transform:rotate(90deg)}87.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(341.5deg)}100%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(341.5deg)}}@keyframes mat-progress-spinner-stroke-rotate-fallback{0%{transform:rotate(0deg)}25%{transform:rotate(1170deg)}50%{transform:rotate(2340deg)}75%{transform:rotate(3510deg)}100%{transform:rotate(4680deg)}}\n";class b{constructor(t){this._elementRef=t}}const f=Object(s.A)(b,"primary"),m=new n.s("mat-progress-spinner-default-options",{providedIn:"root",factory:function(){return{diameter:100}}});let g=(()=>{class t extends f{constructor(e,i,n,a,s){super(e),this._elementRef=e,this._document=n,this._diameter=100,this._value=0,this._fallbackAnimation=!1,this.mode="determinate";const o=t._diameters;this._spinnerAnimationLabel=this._getSpinnerAnimationLabel(),o.has(n.head)||o.set(n.head,new Set([100])),this._fallbackAnimation=i.EDGE||i.TRIDENT,this._noopAnimations="NoopAnimations"===a&&!!s&&!s._forceAnimations,s&&(s.diameter&&(this.diameter=s.diameter),s.strokeWidth&&(this.strokeWidth=s.strokeWidth))}get diameter(){return this._diameter}set diameter(t){this._diameter=Object(o.f)(t),this._spinnerAnimationLabel=this._getSpinnerAnimationLabel(),!this._fallbackAnimation&&this._styleRoot&&this._attachStyleNode()}get strokeWidth(){return this._strokeWidth||this.diameter/10}set strokeWidth(t){this._strokeWidth=Object(o.f)(t)}get value(){return"determinate"===this.mode?this._value:0}set value(t){this._value=Math.max(0,Math.min(100,Object(o.f)(t)))}ngOnInit(){const t=this._elementRef.nativeElement;this._styleRoot=Object(r.c)(t)||this._document.head,this._attachStyleNode(),t.classList.add(`mat-progress-spinner-indeterminate${this._fallbackAnimation?"-fallback":""}-animation`)}_getCircleRadius(){return(this.diameter-10)/2}_getViewBox(){const t=2*this._getCircleRadius()+this.strokeWidth;return`0 0 ${t} ${t}`}_getStrokeCircumference(){return 2*Math.PI*this._getCircleRadius()}_getStrokeDashOffset(){return"determinate"===this.mode?this._getStrokeCircumference()*(100-this._value)/100:this._fallbackAnimation&&"indeterminate"===this.mode?.2*this._getStrokeCircumference():null}_getCircleStrokeWidth(){return this.strokeWidth/this.diameter*100}_attachStyleNode(){const e=this._styleRoot,i=this._diameter,n=t._diameters;let a=n.get(e);if(!a||!a.has(i)){const t=this._document.createElement("style");t.setAttribute("mat-spinner-animation",this._spinnerAnimationLabel),t.textContent=this._getAnimationText(),e.appendChild(t),a||(a=new Set,n.set(e,a)),a.add(i)}}_getAnimationText(){const t=this._getStrokeCircumference();return"\n @keyframes mat-progress-spinner-stroke-rotate-DIAMETER {\n 0% { stroke-dashoffset: START_VALUE; transform: rotate(0); }\n 12.5% { stroke-dashoffset: END_VALUE; transform: rotate(0); }\n 12.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n 25% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n\n 25.0001% { stroke-dashoffset: START_VALUE; transform: rotate(270deg); }\n 37.5% { stroke-dashoffset: END_VALUE; transform: rotate(270deg); }\n 37.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n 50% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n\n 50.0001% { stroke-dashoffset: START_VALUE; transform: rotate(180deg); }\n 62.5% { stroke-dashoffset: END_VALUE; transform: rotate(180deg); }\n 62.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n 75% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n\n 75.0001% { stroke-dashoffset: START_VALUE; transform: rotate(90deg); }\n 87.5% { stroke-dashoffset: END_VALUE; transform: rotate(90deg); }\n 87.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n 100% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n }\n".replace(/START_VALUE/g,""+.95*t).replace(/END_VALUE/g,""+.2*t).replace(/DIAMETER/g,""+this._spinnerAnimationLabel)}_getSpinnerAnimationLabel(){return this.diameter.toString().replace(".","_")}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(r.a),n.Qb(a.e,8),n.Qb(c.a,8),n.Qb(m))},t.\u0275cmp=n.Kb({type:t,selectors:[["mat-progress-spinner"]],hostAttrs:["role","progressbar",1,"mat-progress-spinner"],hostVars:10,hostBindings:function(t,e){2&t&&(n.Eb("aria-valuemin","determinate"===e.mode?0:null)("aria-valuemax","determinate"===e.mode?100:null)("aria-valuenow","determinate"===e.mode?e.value:null)("mode",e.mode),n.Lc("width",e.diameter,"px")("height",e.diameter,"px"),n.Ib("_mat-animation-noopable",e._noopAnimations))},inputs:{color:"color",mode:"mode",diameter:"diameter",strokeWidth:"strokeWidth",value:"value"},exportAs:["matProgressSpinner"],features:[n.Ab],decls:3,vars:8,consts:[["preserveAspectRatio","xMidYMid meet","focusable","false",3,"ngSwitch"],["cx","50%","cy","50%",3,"animation-name","stroke-dashoffset","stroke-dasharray","stroke-width",4,"ngSwitchCase"],["cx","50%","cy","50%",3,"stroke-dashoffset","stroke-dasharray","stroke-width",4,"ngSwitchCase"],["cx","50%","cy","50%"]],template:function(t,e){1&t&&(n.gc(),n.Wb(0,"svg",0),n.Oc(1,l,1,9,"circle",1),n.Oc(2,d,1,7,"circle",2),n.Vb()),2&t&&(n.Lc("width",e.diameter,"px")("height",e.diameter,"px"),n.oc("ngSwitch","indeterminate"===e.mode),n.Eb("viewBox",e._getViewBox()),n.Db(1),n.oc("ngSwitchCase",!0),n.Db(1),n.oc("ngSwitchCase",!1))},directives:[a.x,a.y],styles:[p],encapsulation:2,changeDetection:0}),t._diameters=new WeakMap,t})(),v=(()=>{class t extends g{constructor(t,e,i,n,a){super(t,e,i,n,a),this.mode="indeterminate"}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(r.a),n.Qb(a.e,8),n.Qb(c.a,8),n.Qb(m))},t.\u0275cmp=n.Kb({type:t,selectors:[["mat-spinner"]],hostAttrs:["role","progressbar","mode","indeterminate",1,"mat-spinner","mat-progress-spinner"],hostVars:6,hostBindings:function(t,e){2&t&&(n.Lc("width",e.diameter,"px")("height",e.diameter,"px"),n.Ib("_mat-animation-noopable",e._noopAnimations))},inputs:{color:"color"},features:[n.Ab],decls:3,vars:8,consts:[["preserveAspectRatio","xMidYMid meet","focusable","false",3,"ngSwitch"],["cx","50%","cy","50%",3,"animation-name","stroke-dashoffset","stroke-dasharray","stroke-width",4,"ngSwitchCase"],["cx","50%","cy","50%",3,"stroke-dashoffset","stroke-dasharray","stroke-width",4,"ngSwitchCase"],["cx","50%","cy","50%"]],template:function(t,e){1&t&&(n.gc(),n.Wb(0,"svg",0),n.Oc(1,h,1,9,"circle",1),n.Oc(2,u,1,7,"circle",2),n.Vb()),2&t&&(n.Lc("width",e.diameter,"px")("height",e.diameter,"px"),n.oc("ngSwitch","indeterminate"===e.mode),n.Eb("viewBox",e._getViewBox()),n.Db(1),n.oc("ngSwitchCase",!0),n.Db(1),n.oc("ngSwitchCase",!1))},directives:[a.x,a.y],styles:[p],encapsulation:2,changeDetection:0}),t})(),_=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[s.k,a.c],s.k]}),t})()},XhcP:function(t,e,i){"use strict";i.d(e,"a",(function(){return z})),i.d(e,"b",(function(){return B})),i.d(e,"c",(function(){return N})),i.d(e,"d",(function(){return $})),i.d(e,"e",(function(){return G})),i.d(e,"f",(function(){return U})),i.d(e,"g",(function(){return q}));var n=i("nLfN"),a=i("vxfF"),s=i("ofXK"),o=i("fXoL"),r=i("FKr1"),c=i("8LU1"),l=i("FtGj"),d=i("XNiG"),h=i("xgIS"),u=i("VRyK"),p=i("pLZG"),b=i("lJxs"),f=i("7o/Q");function m(t){return e=>e.lift(new g(t))}class g{constructor(t){this.value=t}call(t,e){return e.subscribe(new v(t,this.value))}}class v extends f.a{constructor(t,e){super(t),this.value=e}_next(t){this.destination.next(this.value)}}var _=i("1G5W"),y=i("/uUt"),x=i("IzEk"),C=i("JX91"),O=i("Kj3r"),D=i("R0Ic"),w=i("R1ws"),M=i("u47x"),k=i("cH1L");const S=["*"];function I(t,e){if(1&t){const t=o.Xb();o.Wb(0,"div",2),o.dc("click",(function(){return o.Dc(t),o.hc()._onBackdropClicked()})),o.Vb()}if(2&t){const t=o.hc();o.Ib("mat-drawer-shown",t._isShowingBackdrop())}}function P(t,e){1&t&&(o.Wb(0,"mat-drawer-content"),o.mc(1,2),o.Vb())}const V=[[["mat-drawer"]],[["mat-drawer-content"]],"*"],R=["mat-drawer","mat-drawer-content","*"];function j(t,e){if(1&t){const t=o.Xb();o.Wb(0,"div",2),o.dc("click",(function(){return o.Dc(t),o.hc()._onBackdropClicked()})),o.Vb()}if(2&t){const t=o.hc();o.Ib("mat-drawer-shown",t._isShowingBackdrop())}}function A(t,e){1&t&&(o.Wb(0,"mat-sidenav-content",3),o.mc(1,2),o.Vb())}const W=[[["mat-sidenav"]],[["mat-sidenav-content"]],"*"],T=["mat-sidenav","mat-sidenav-content","*"],E=".mat-drawer-container{position:relative;z-index:1;box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}.cdk-high-contrast-active .mat-drawer-backdrop{opacity:.5}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}.cdk-high-contrast-active .mat-drawer,.cdk-high-contrast-active [dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}.cdk-high-contrast-active [dir=rtl] .mat-drawer,.cdk-high-contrast-active .mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer{transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto;-webkit-overflow-scrolling:touch}.mat-sidenav-fixed{position:fixed}\n",F={transformDrawer:Object(D.n)("transform",[Object(D.k)("open, open-instant",Object(D.l)({transform:"none",visibility:"visible"})),Object(D.k)("void",Object(D.l)({"box-shadow":"none",visibility:"hidden"})),Object(D.m)("void => open-instant",Object(D.e)("0ms")),Object(D.m)("void <=> open, open-instant => void",Object(D.e)("400ms cubic-bezier(0.25, 0.8, 0.25, 1)"))])},L=new o.s("MAT_DRAWER_DEFAULT_AUTOSIZE",{providedIn:"root",factory:function(){return!1}}),Q=new o.s("MAT_DRAWER_CONTAINER");let N=(()=>{class t extends a.b{constructor(t,e,i,n,a){super(i,n,a),this._changeDetectorRef=t,this._container=e}ngAfterContentInit(){this._container._contentMarginChanges.subscribe(()=>{this._changeDetectorRef.markForCheck()})}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(o.h),o.Qb(Object(o.X)(()=>B)),o.Qb(o.l),o.Qb(a.f),o.Qb(o.C))},t.\u0275cmp=o.Kb({type:t,selectors:[["mat-drawer-content"]],hostAttrs:[1,"mat-drawer-content"],hostVars:4,hostBindings:function(t,e){2&t&&o.Lc("margin-left",e._container._contentMargins.left,"px")("margin-right",e._container._contentMargins.right,"px")},features:[o.Ab],ngContentSelectors:S,decls:1,vars:0,template:function(t,e){1&t&&(o.nc(),o.mc(0))},encapsulation:2,changeDetection:0}),t})(),z=(()=>{class t{constructor(t,e,i,n,a,s,r){this._elementRef=t,this._focusTrapFactory=e,this._focusMonitor=i,this._platform=n,this._ngZone=a,this._doc=s,this._container=r,this._elementFocusedBeforeDrawerWasOpened=null,this._enableAnimations=!1,this._position="start",this._mode="over",this._disableClose=!1,this._opened=!1,this._animationStarted=new d.a,this._animationEnd=new d.a,this._animationState="void",this.openedChange=new o.o(!0),this._openedStream=this.openedChange.pipe(Object(p.a)(t=>t),Object(b.a)(()=>{})),this.openedStart=this._animationStarted.pipe(Object(p.a)(t=>t.fromState!==t.toState&&0===t.toState.indexOf("open")),m(void 0)),this._closedStream=this.openedChange.pipe(Object(p.a)(t=>!t),Object(b.a)(()=>{})),this.closedStart=this._animationStarted.pipe(Object(p.a)(t=>t.fromState!==t.toState&&"void"===t.toState),m(void 0)),this._destroyed=new d.a,this.onPositionChanged=new o.o,this._modeChanged=new d.a,this.openedChange.subscribe(t=>{t?(this._doc&&(this._elementFocusedBeforeDrawerWasOpened=this._doc.activeElement),this._takeFocus()):this._isFocusWithinDrawer()&&this._restoreFocus()}),this._ngZone.runOutsideAngular(()=>{Object(h.a)(this._elementRef.nativeElement,"keydown").pipe(Object(p.a)(t=>t.keyCode===l.h&&!this.disableClose&&!Object(l.v)(t)),Object(_.a)(this._destroyed)).subscribe(t=>this._ngZone.run(()=>{this.close(),t.stopPropagation(),t.preventDefault()}))}),this._animationEnd.pipe(Object(y.a)((t,e)=>t.fromState===e.fromState&&t.toState===e.toState)).subscribe(t=>{const{fromState:e,toState:i}=t;(0===i.indexOf("open")&&"void"===e||"void"===i&&0===e.indexOf("open"))&&this.openedChange.emit(this._opened)})}get position(){return this._position}set position(t){(t="end"===t?"end":"start")!=this._position&&(this._position=t,this.onPositionChanged.emit())}get mode(){return this._mode}set mode(t){this._mode=t,this._updateFocusTrapState(),this._modeChanged.next()}get disableClose(){return this._disableClose}set disableClose(t){this._disableClose=Object(c.c)(t)}get autoFocus(){const t=this._autoFocus;return null==t?"side"!==this.mode:t}set autoFocus(t){this._autoFocus=Object(c.c)(t)}get opened(){return this._opened}set opened(t){this.toggle(Object(c.c)(t))}_takeFocus(){this.autoFocus&&this._focusTrap&&this._focusTrap.focusInitialElementWhenReady().then(t=>{t||"function"!=typeof this._elementRef.nativeElement.focus||this._elementRef.nativeElement.focus()})}_restoreFocus(){this.autoFocus&&(this._elementFocusedBeforeDrawerWasOpened?this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened,this._openedVia):this._elementRef.nativeElement.blur(),this._elementFocusedBeforeDrawerWasOpened=null,this._openedVia=null)}_isFocusWithinDrawer(){var t;const e=null===(t=this._doc)||void 0===t?void 0:t.activeElement;return!!e&&this._elementRef.nativeElement.contains(e)}ngAfterContentInit(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._updateFocusTrapState()}ngAfterContentChecked(){this._platform.isBrowser&&(this._enableAnimations=!0)}ngOnDestroy(){this._focusTrap&&this._focusTrap.destroy(),this._animationStarted.complete(),this._animationEnd.complete(),this._modeChanged.complete(),this._destroyed.next(),this._destroyed.complete()}open(t){return this.toggle(!0,t)}close(){return this.toggle(!1)}_closeViaBackdropClick(){return this._setOpen(!1,!0)}toggle(t=!this.opened,e){return this._setOpen(t,!t&&this._isFocusWithinDrawer(),e)}_setOpen(t,e,i="program"){return this._opened=t,t?(this._animationState=this._enableAnimations?"open":"open-instant",this._openedVia=i):(this._animationState="void",e&&this._restoreFocus()),this._updateFocusTrapState(),new Promise(t=>{this.openedChange.pipe(Object(x.a)(1)).subscribe(e=>t(e?"open":"close"))})}_getWidth(){return this._elementRef.nativeElement&&this._elementRef.nativeElement.offsetWidth||0}_updateFocusTrapState(){this._focusTrap&&(this._focusTrap.enabled=this.opened&&"side"!==this.mode)}_animationStartListener(t){this._animationStarted.next(t)}_animationDoneListener(t){this._animationEnd.next(t)}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(o.l),o.Qb(M.i),o.Qb(M.h),o.Qb(n.a),o.Qb(o.C),o.Qb(s.e,8),o.Qb(Q,8))},t.\u0275cmp=o.Kb({type:t,selectors:[["mat-drawer"]],hostAttrs:["tabIndex","-1",1,"mat-drawer"],hostVars:12,hostBindings:function(t,e){1&t&&o.Mc("@transform.start",(function(t){return e._animationStartListener(t)}))("@transform.done",(function(t){return e._animationDoneListener(t)})),2&t&&(o.Eb("align",null),o.Nc("@transform",e._animationState),o.Ib("mat-drawer-end","end"===e.position)("mat-drawer-over","over"===e.mode)("mat-drawer-push","push"===e.mode)("mat-drawer-side","side"===e.mode)("mat-drawer-opened",e.opened))},inputs:{position:"position",mode:"mode",disableClose:"disableClose",autoFocus:"autoFocus",opened:"opened"},outputs:{openedChange:"openedChange",_openedStream:"opened",openedStart:"openedStart",_closedStream:"closed",closedStart:"closedStart",onPositionChanged:"positionChanged"},exportAs:["matDrawer"],ngContentSelectors:S,decls:2,vars:0,consts:[[1,"mat-drawer-inner-container"]],template:function(t,e){1&t&&(o.nc(),o.Wb(0,"div",0),o.mc(1),o.Vb())},encapsulation:2,data:{animation:[F.transformDrawer]},changeDetection:0}),t})(),B=(()=>{class t{constructor(t,e,i,n,a,s=!1,r){this._dir=t,this._element=e,this._ngZone=i,this._changeDetectorRef=n,this._animationMode=r,this._drawers=new o.H,this.backdropClick=new o.o,this._destroyed=new d.a,this._doCheckSubject=new d.a,this._contentMargins={left:null,right:null},this._contentMarginChanges=new d.a,t&&t.change.pipe(Object(_.a)(this._destroyed)).subscribe(()=>{this._validateDrawers(),this.updateContentMargins()}),a.change().pipe(Object(_.a)(this._destroyed)).subscribe(()=>this.updateContentMargins()),this._autosize=s}get start(){return this._start}get end(){return this._end}get autosize(){return this._autosize}set autosize(t){this._autosize=Object(c.c)(t)}get hasBackdrop(){return null==this._backdropOverride?!this._start||"side"!==this._start.mode||!this._end||"side"!==this._end.mode:this._backdropOverride}set hasBackdrop(t){this._backdropOverride=null==t?null:Object(c.c)(t)}get scrollable(){return this._userContent||this._content}ngAfterContentInit(){this._allDrawers.changes.pipe(Object(C.a)(this._allDrawers),Object(_.a)(this._destroyed)).subscribe(t=>{this._drawers.reset(t.filter(t=>!t._container||t._container===this)),this._drawers.notifyOnChanges()}),this._drawers.changes.pipe(Object(C.a)(null)).subscribe(()=>{this._validateDrawers(),this._drawers.forEach(t=>{this._watchDrawerToggle(t),this._watchDrawerPosition(t),this._watchDrawerMode(t)}),(!this._drawers.length||this._isDrawerOpen(this._start)||this._isDrawerOpen(this._end))&&this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),this._ngZone.runOutsideAngular(()=>{this._doCheckSubject.pipe(Object(O.a)(10),Object(_.a)(this._destroyed)).subscribe(()=>this.updateContentMargins())})}ngOnDestroy(){this._contentMarginChanges.complete(),this._doCheckSubject.complete(),this._drawers.destroy(),this._destroyed.next(),this._destroyed.complete()}open(){this._drawers.forEach(t=>t.open())}close(){this._drawers.forEach(t=>t.close())}updateContentMargins(){let t=0,e=0;if(this._left&&this._left.opened)if("side"==this._left.mode)t+=this._left._getWidth();else if("push"==this._left.mode){const i=this._left._getWidth();t+=i,e-=i}if(this._right&&this._right.opened)if("side"==this._right.mode)e+=this._right._getWidth();else if("push"==this._right.mode){const i=this._right._getWidth();e+=i,t-=i}t=t||null,e=e||null,t===this._contentMargins.left&&e===this._contentMargins.right||(this._contentMargins={left:t,right:e},this._ngZone.run(()=>this._contentMarginChanges.next(this._contentMargins)))}ngDoCheck(){this._autosize&&this._isPushed()&&this._ngZone.runOutsideAngular(()=>this._doCheckSubject.next())}_watchDrawerToggle(t){t._animationStarted.pipe(Object(p.a)(t=>t.fromState!==t.toState),Object(_.a)(this._drawers.changes)).subscribe(t=>{"open-instant"!==t.toState&&"NoopAnimations"!==this._animationMode&&this._element.nativeElement.classList.add("mat-drawer-transition"),this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),"side"!==t.mode&&t.openedChange.pipe(Object(_.a)(this._drawers.changes)).subscribe(()=>this._setContainerClass(t.opened))}_watchDrawerPosition(t){t&&t.onPositionChanged.pipe(Object(_.a)(this._drawers.changes)).subscribe(()=>{this._ngZone.onMicrotaskEmpty.pipe(Object(x.a)(1)).subscribe(()=>{this._validateDrawers()})})}_watchDrawerMode(t){t&&t._modeChanged.pipe(Object(_.a)(Object(u.a)(this._drawers.changes,this._destroyed))).subscribe(()=>{this.updateContentMargins(),this._changeDetectorRef.markForCheck()})}_setContainerClass(t){const e=this._element.nativeElement.classList,i="mat-drawer-container-has-open";t?e.add(i):e.remove(i)}_validateDrawers(){this._start=this._end=null,this._drawers.forEach(t=>{"end"==t.position?this._end=t:this._start=t}),this._right=this._left=null,this._dir&&"rtl"===this._dir.value?(this._left=this._end,this._right=this._start):(this._left=this._start,this._right=this._end)}_isPushed(){return this._isDrawerOpen(this._start)&&"over"!=this._start.mode||this._isDrawerOpen(this._end)&&"over"!=this._end.mode}_onBackdropClicked(){this.backdropClick.emit(),this._closeModalDrawersViaBackdrop()}_closeModalDrawersViaBackdrop(){[this._start,this._end].filter(t=>t&&!t.disableClose&&this._canHaveBackdrop(t)).forEach(t=>t._closeViaBackdropClick())}_isShowingBackdrop(){return this._isDrawerOpen(this._start)&&this._canHaveBackdrop(this._start)||this._isDrawerOpen(this._end)&&this._canHaveBackdrop(this._end)}_canHaveBackdrop(t){return"side"!==t.mode||!!this._backdropOverride}_isDrawerOpen(t){return null!=t&&t.opened}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(k.c,8),o.Qb(o.l),o.Qb(o.C),o.Qb(o.h),o.Qb(a.h),o.Qb(L),o.Qb(w.a,8))},t.\u0275cmp=o.Kb({type:t,selectors:[["mat-drawer-container"]],contentQueries:function(t,e,i){var n;1&t&&(o.Jb(i,N,!0),o.Jb(i,z,!0)),2&t&&(o.yc(n=o.ec())&&(e._content=n.first),o.yc(n=o.ec())&&(e._allDrawers=n))},viewQuery:function(t,e){var i;1&t&&o.Xc(N,!0),2&t&&o.yc(i=o.ec())&&(e._userContent=i.first)},hostAttrs:[1,"mat-drawer-container"],hostVars:2,hostBindings:function(t,e){2&t&&o.Ib("mat-drawer-container-explicit-backdrop",e._backdropOverride)},inputs:{autosize:"autosize",hasBackdrop:"hasBackdrop"},outputs:{backdropClick:"backdropClick"},exportAs:["matDrawerContainer"],features:[o.Cb([{provide:Q,useExisting:t}])],ngContentSelectors:R,decls:4,vars:2,consts:[["class","mat-drawer-backdrop",3,"mat-drawer-shown","click",4,"ngIf"],[4,"ngIf"],[1,"mat-drawer-backdrop",3,"click"]],template:function(t,e){1&t&&(o.nc(V),o.Oc(0,I,1,2,"div",0),o.mc(1),o.mc(2,1),o.Oc(3,P,2,0,"mat-drawer-content",1)),2&t&&(o.oc("ngIf",e.hasBackdrop),o.Db(3),o.oc("ngIf",!e._content))},directives:[s.t,N],styles:[E],encapsulation:2,changeDetection:0}),t})(),U=(()=>{class t extends N{constructor(t,e,i,n,a){super(t,e,i,n,a)}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(o.h),o.Qb(Object(o.X)(()=>G)),o.Qb(o.l),o.Qb(a.f),o.Qb(o.C))},t.\u0275cmp=o.Kb({type:t,selectors:[["mat-sidenav-content"]],hostAttrs:[1,"mat-drawer-content","mat-sidenav-content"],hostVars:4,hostBindings:function(t,e){2&t&&o.Lc("margin-left",e._container._contentMargins.left,"px")("margin-right",e._container._contentMargins.right,"px")},features:[o.Ab],ngContentSelectors:S,decls:1,vars:0,template:function(t,e){1&t&&(o.nc(),o.mc(0))},encapsulation:2,changeDetection:0}),t})(),$=(()=>{class t extends z{constructor(){super(...arguments),this._fixedInViewport=!1,this._fixedTopGap=0,this._fixedBottomGap=0}get fixedInViewport(){return this._fixedInViewport}set fixedInViewport(t){this._fixedInViewport=Object(c.c)(t)}get fixedTopGap(){return this._fixedTopGap}set fixedTopGap(t){this._fixedTopGap=Object(c.f)(t)}get fixedBottomGap(){return this._fixedBottomGap}set fixedBottomGap(t){this._fixedBottomGap=Object(c.f)(t)}}return t.\u0275fac=function(e){return H(e||t)},t.\u0275cmp=o.Kb({type:t,selectors:[["mat-sidenav"]],hostAttrs:["tabIndex","-1",1,"mat-drawer","mat-sidenav"],hostVars:17,hostBindings:function(t,e){2&t&&(o.Eb("align",null),o.Lc("top",e.fixedInViewport?e.fixedTopGap:null,"px")("bottom",e.fixedInViewport?e.fixedBottomGap:null,"px"),o.Ib("mat-drawer-end","end"===e.position)("mat-drawer-over","over"===e.mode)("mat-drawer-push","push"===e.mode)("mat-drawer-side","side"===e.mode)("mat-drawer-opened",e.opened)("mat-sidenav-fixed",e.fixedInViewport))},inputs:{fixedInViewport:"fixedInViewport",fixedTopGap:"fixedTopGap",fixedBottomGap:"fixedBottomGap"},exportAs:["matSidenav"],features:[o.Ab],ngContentSelectors:S,decls:2,vars:0,consts:[[1,"mat-drawer-inner-container"]],template:function(t,e){1&t&&(o.nc(),o.Wb(0,"div",0),o.mc(1),o.Vb())},encapsulation:2,data:{animation:[F.transformDrawer]},changeDetection:0}),t})();const H=o.Yb($);let G=(()=>{class t extends B{}return t.\u0275fac=function(e){return X(e||t)},t.\u0275cmp=o.Kb({type:t,selectors:[["mat-sidenav-container"]],contentQueries:function(t,e,i){var n;1&t&&(o.Jb(i,U,!0),o.Jb(i,$,!0)),2&t&&(o.yc(n=o.ec())&&(e._content=n.first),o.yc(n=o.ec())&&(e._allDrawers=n))},hostAttrs:[1,"mat-drawer-container","mat-sidenav-container"],hostVars:2,hostBindings:function(t,e){2&t&&o.Ib("mat-drawer-container-explicit-backdrop",e._backdropOverride)},exportAs:["matSidenavContainer"],features:[o.Cb([{provide:Q,useExisting:t}]),o.Ab],ngContentSelectors:T,decls:4,vars:2,consts:[["class","mat-drawer-backdrop",3,"mat-drawer-shown","click",4,"ngIf"],["cdkScrollable","",4,"ngIf"],[1,"mat-drawer-backdrop",3,"click"],["cdkScrollable",""]],template:function(t,e){1&t&&(o.nc(W),o.Oc(0,j,1,2,"div",0),o.mc(1),o.mc(2,1),o.Oc(3,A,2,0,"mat-sidenav-content",1)),2&t&&(o.oc("ngIf",e.hasBackdrop),o.Db(3),o.oc("ngIf",!e._content))},directives:[s.t,U,a.b],styles:[E],encapsulation:2,changeDetection:0}),t})();const X=o.Yb(G);let q=(()=>{class t{}return t.\u0275mod=o.Ob({type:t}),t.\u0275inj=o.Nb({factory:function(e){return new(e||t)},imports:[[s.c,r.k,n.b,a.c],a.c,r.k]}),t})()},XoHu:function(t,e,i){"use strict";function n(t){return null!==t&&"object"==typeof t}i.d(e,"a",(function(){return n}))},XxY3:function(t,e){!function(t,e,i,n){t.DocEditor=function(n,s,o){var r=this,c=s||{};!function t(e,i){for(var n in i)i.hasOwnProperty(n)&&(void 0===e[n]?e[n]=i[n]:"object"==typeof e[n]&&"object"==typeof i[n]&&t(e[n],i[n]));return e}(c,t.DocEditor.defaultConfig),c.editorConfig.canUseHistory=c.events&&!!c.events.onRequestHistory,c.editorConfig.canHistoryClose=c.events&&!!c.events.onRequestHistoryClose,c.editorConfig.canHistoryRestore=c.events&&!!c.events.onRequestRestore,c.editorConfig.canSendEmailAddresses=c.events&&!!c.events.onRequestEmailAddresses,c.editorConfig.canRequestEditRights=c.events&&!!c.events.onRequestEditRights,c.editorConfig.canRequestClose=c.events&&!!c.events.onRequestClose,c.editorConfig.canRename=c.events&&!!c.events.onRequestRename,c.editorConfig.canMakeActionLink=c.events&&!!c.events.onMakeActionLink,c.editorConfig.canRequestUsers=c.events&&!!c.events.onRequestUsers,c.editorConfig.canRequestSendNotify=c.events&&!!c.events.onRequestSendNotify,c.editorConfig.mergeFolderUrl=c.editorConfig.mergeFolderUrl||c.editorConfig.saveAsUrl,c.editorConfig.canRequestSaveAs=c.events&&!!c.events.onRequestSaveAs,c.editorConfig.canRequestInsertImage=c.events&&!!c.events.onRequestInsertImage,c.editorConfig.canRequestMailMergeRecipients=c.events&&!!c.events.onRequestMailMergeRecipients,c.editorConfig.canRequestCompareFile=c.events&&!!c.events.onRequestCompareFile,c.editorConfig.canRequestSharingSettings=c.events&&!!c.events.onRequestSharingSettings,c.editorConfig.canRequestCreateNew=c.events&&!!c.events.onRequestCreateNew,c.frameEditorId=n,c.parentOrigin=e.location.origin,c.onlyOfficeIp=o;var l,d=function(t){x(t)},h=function(){e.addEventListener?e.addEventListener("mouseup",d,!1):e.attachEvent&&e.attachEvent("onmouseup",d)},u=function(){e.removeEventListener?e.removeEventListener("mouseup",d,!1):e.detachEvent&&e.detachEvent("onmouseup",d)};(l=/[\?\&]placement=(\w+)&?/.exec(e.location.search))&&l.length&&"desktop"==l[1]&&(c.editorConfig.targetApp=l[1],c.editorConfig.customization||(c.editorConfig.customization={}),c.editorConfig.customization.about=!1,c.editorConfig.customization.compactHeader=!1);var p,b=i.getElementById(n);if(b&&function(){if(c.document){if(!c.document.url||("string"!=typeof c.document.fileType||""==c.document.fileType)&&("string"!=typeof c.documentType||""==c.documentType))return e.alert("One or more required parameter for the config object is not set"),!1;var t;if("string"==typeof c.documentType&&""!=c.documentType){if(!(t={text:"docx","text-pdf":"pdf",spreadsheet:"xlsx",presentation:"pptx"}[c.documentType.toLowerCase()]))return e.alert('The "documentType" parameter for the config object is invalid. Please correct it.'),!1;"string"==typeof c.document.fileType&&""!=c.document.fileType||(c.document.fileType=t)}if("string"==typeof c.document.fileType&&""!=c.document.fileType){var i;if(c.document.fileType=c.document.fileType.toLowerCase(),!(i=/^(?:(xls|xlsx|ods|csv|xlst|xlsy|gsheet|xlsm|xlt|xltm|xltx|fods|ots)|(pps|ppsx|ppt|pptx|odp|pptt|ppty|gslides|pot|potm|potx|ppsm|pptm|fodp|otp)|(doc|docx|doct|odt|gdoc|txt|rtf|pdf|mht|htm|html|epub|djvu|xps|docm|dot|dotm|dotx|fodt|ott))$/.exec(c.document.fileType)))return e.alert('The "document.fileType" parameter for the config object is invalid. Please correct it.'),!1;"string"==typeof c.documentType&&""!=c.documentType||("string"==typeof i[1]?c.documentType="spreadsheet":"string"==typeof i[2]?c.documentType="presentation":"string"==typeof i[3]&&(c.documentType="text"))}if((i=/^(?:(pdf|djvu|xps))$/.exec(c.document.fileType))&&"string"==typeof i[1]&&(c.editorConfig.canUseHistory=!1),c.document.title&&""!=c.document.title||(c.document.title="Unnamed."+c.document.fileType),c.document.key){if("string"!=typeof c.document.key)return e.alert('The "document.key" parameter for the config object must be string. Please correct it.'),!1}else c.document.key="xxxxxxxxxxxxxxxxxxxx".replace(/[x]/g,(function(t){return(16*Math.random()|0).toString(16)}));c.document.token=c.token}return!0}()){if((p=function(t){var e=i.createElement("iframe");return e.src=function(t){var e=("undefined"==typeof extensionParams||null==extensionParams.url?null:extensionParams.url+"apps/")||function(t){return t.onlyOfficeIp+"/web-apps/apps/"}(t),i={text:"documenteditor","text-pdf":"documenteditor",spreadsheet:"spreadsheeteditor",presentation:"presentationeditor"},n=i.text;if("string"==typeof t.documentType)n=i[t.documentType.toLowerCase()];else if(t.document&&"string"==typeof t.document.fileType){var a=/^(?:(xls|xlsx|ods|csv|xlst|xlsy|gsheet|xlsm|xlt|xltm|xltx|fods|ots)|(pps|ppsx|ppt|pptx|odp|pptt|ppty|gslides|pot|potm|potx|ppsm|pptm|fodp|otp))$/.exec(t.document.fileType);a&&("string"==typeof a[1]?n=i.spreadsheet:"string"==typeof a[2]&&(n=i.presentation))}var s=navigator.userAgent.toLowerCase(),o=function(t){return t.test(s)},r=!o(/opera/)&&(o(/msie/)||o(/trident/)||o(/edge/)),c=!r&&o(/\bchrome\b/),l=!r&&!c&&o(/safari/)&&navigator.maxTouchPoints>0;e+=n+"/";var d="/index.html";if(t.editorConfig){var h=t.editorConfig.customization;"object"==typeof h&&(h.toolbarNoTabs||"desktop"!==t.editorConfig.targetApp&&(h.loaderName||h.loaderLogo))?d="/index_loader.html":"editdiagram"!=t.editorConfig.mode&&"editmerge"!=t.editorConfig.mode||(d="/index_internal.html")}return(e+="mobile"===t.type||l?"mobile":"embedded"===t.type?"embed":"main")+d}(t)+function(t){var e="?_dc=6.0.2-5";return t.editorConfig&&t.editorConfig.lang&&(e+="&lang="+t.editorConfig.lang),t.editorConfig&&"desktop"!==t.editorConfig.targetApp&&("object"==typeof t.editorConfig.customization&&t.editorConfig.customization.loaderName?"none"!==t.editorConfig.customization.loaderName&&(e+="&customer="+t.editorConfig.customization.loaderName):e+="&customer=ONLYOFFICE","object"==typeof t.editorConfig.customization&&t.editorConfig.customization.loaderLogo?""!==t.editorConfig.customization.loaderLogo&&(e+="&logo="+t.editorConfig.customization.loaderLogo):"object"==typeof t.editorConfig.customization&&t.editorConfig.customization.logo&&("embedded"==t.type&&t.editorConfig.customization.logo.imageEmbedded?e+="&headerlogo="+t.editorConfig.customization.logo.imageEmbedded:"embedded"!=t.type&&t.editorConfig.customization.logo.image&&(e+="&headerlogo="+t.editorConfig.customization.logo.image))),!t.editorConfig||"editdiagram"!=t.editorConfig.mode&&"editmerge"!=t.editorConfig.mode||(e+="&internal=true"),t.frameEditorId&&(e+="&frameEditorId="+t.frameEditorId),(t.editorConfig&&"view"==t.editorConfig.mode||t.document&&t.document.permissions&&!1===t.document.permissions.edit&&!t.document.permissions.review)&&(e+="&mode=view"),t.editorConfig&&t.editorConfig.customization&&t.editorConfig.customization.compactHeader&&(e+="&compact=true"),t.editorConfig&&t.editorConfig.customization&&!1===t.editorConfig.customization.toolbar&&(e+="&toolbar=false"),t.parentOrigin&&(e+="&parentOrigin="+t.parentOrigin),e}(t),e.width=t.width,e.height=t.height,e.align="top",e.frameBorder=0,e.name="frameEditor",e.allowFullscreen=!0,e.setAttribute("allowfullscreen",""),e.setAttribute("onmousewheel",""),e.setAttribute("allow","autoplay"),"mobile"==t.type&&(e.style.position="fixed",e.style.overflow="hidden",i.body.style.overscrollBehaviorY="contain"),e}(c)).src){var f=p.src.split("/");this.frameOrigin=f[0]+"//"+f[2]}b.parentNode&&b.parentNode.replaceChild(p,b);var m=new a((function(t){if(t)if("onExternalPluginMessage"===t.type)g(t);else if(t.frameEditorId==n){var e=(c.events||{})[t.event];"onRequestEditRights"!==t.event||e?"onInternalMessage"===t.event&&t.data&&"localstorage"==t.data.type?function(t){if("get"==t.cmd){if(t.keys&&t.keys.length){var e=t.keys.split(","),i=e[0];for(n=0;++n<e.length;)i+="|"+e[n];for(n in i=new RegExp(i),a={},localStorage)i.test(n)&&(a[n]=localStorage[n])}else a=localStorage;g({command:"internalCommand",data:{type:"localstorage",keys:a}})}else if("set"==t.cmd){var n,a=t.keys;for(n in a)localStorage.setItem(n,a[n])}}(t.data.data):("onAppReady"===t.event&&("mobile"===c.type&&(i.body.onfocus=function(t){setTimeout((function(){p.contentWindow.focus(),g({command:"resetFocus",data:{}})}),10)}),h(),c.editorConfig&&v(c.editorConfig),c.document&&_(c.document)),e&&"function"==typeof e&&e.call(r,{target:r,data:t.data})):y(!1,"handler isn't defined")}}),this)}var g=function(t){var i;p&&p.contentWindow&&(i=p.contentWindow)&&i.postMessage&&e.JSON&&i.postMessage(e.JSON.stringify(t),"*")},v=function(t){g({command:"init",data:{config:t}})},_=function(t){g({command:"openDocument",data:{doc:t}})},y=function(t,e){g({command:"applyEditRights",data:{allowed:t,message:e}})},x=function(t){var e=p.getBoundingClientRect();g({command:"processMouse",data:{type:t.type,x:t.x-e.left,y:t.y-e.top,event:t}})};return{showMessage:function(t,e){g({command:"showMessage",data:{msg:e=e||t}})},processSaveResult:function(t,e){g({command:"processSaveResult",data:{result:t,message:e}})},processRightsChange:function(t,e){g({command:"processRightsChange",data:{enabled:t,message:e}})},denyEditingRights:function(t){g({command:"processRightsChange",data:{enabled:!1,message:t}})},refreshHistory:function(t,e){g({command:"refreshHistory",data:{data:t,message:e}})},setHistoryData:function(t,e){g({command:"setHistoryData",data:{data:t,message:e}})},setEmailAddresses:function(t){g({command:"setEmailAddresses",data:{data:t}})},setActionLink:function(t){g({command:"setActionLink",data:{url:t}})},processMailMerge:function(t,e){g({command:"processMailMerge",data:{enabled:t,message:e}})},downloadAs:function(t){g({command:"downloadAs",data:t})},serviceCommand:function(t,e){g({command:"internalCommand",data:{command:t,data:e}})},attachMouseEvents:h,detachMouseEvents:u,destroyEditor:function(t){var e=i.createElement("div");e.setAttribute("id",n),p&&(m&&m.unbindEvents(),u(),p.parentNode&&p.parentNode.replaceChild(e,p))},setUsers:function(t){g({command:"setUsers",data:t})},showSharingSettings:function(t){g({command:"showSharingSettings",data:t})},setSharingSettings:function(t){g({command:"setSharingSettings",data:t})},insertImage:function(t){g({command:"insertImage",data:t})},setMailMergeRecipients:function(t){g({command:"setMailMergeRecipients",data:t})},setRevisedFile:function(t){g({command:"setRevisedFile",data:t})}}},t.DocEditor.defaultConfig={type:"desktop",width:"100%",height:"100%",editorConfig:{lang:"en",canCoAuthoring:!0,customization:{about:!0,feedback:!1}}},t.DocEditor.version=function(){return"6.0.2"};var a=function(t,i){var n=t,a=i||e,s=function(t){o(t)},o=function(t){if(t&&e.JSON&&a.frameOrigin==t.origin)try{t=e.JSON.parse(t.data),n&&n.call(a,t)}catch(i){}};return(function(){e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent&&e.attachEvent("onmessage",s)}).call(this),{unbindEvents:function(){e.removeEventListener?e.removeEventListener("message",s,!1):e.detachEvent&&e.detachEvent("onmessage",s)}}}}(window.DocsAPI=window.DocsAPI||{},window,document)},Y7HM:function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var n=i("DH7j");function a(t){return!Object(n.a)(t)&&t-parseFloat(t)+1>=0}},Ylt2:function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var n=i("quSY");class a extends n.a{constructor(t,e){super(),this.subject=t,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const t=this.subject,e=t.observers;if(this.subject=null,!e||0===e.length||t.isStopped||t.closed)return;const i=e.indexOf(this.subscriber);-1!==i&&e.splice(i,1)}}},aEDk:function(t,e,i){"use strict";i.d(e,"a",(function(){return d})),i.d(e,"b",(function(){return x})),i.d(e,"c",(function(){return C})),i.d(e,"d",(function(){return k})),i.d(e,"e",(function(){return u})),i.d(e,"f",(function(){return O})),i.d(e,"g",(function(){return I})),i.d(e,"h",(function(){return w})),i.d(e,"i",(function(){return W})),i.d(e,"j",(function(){return V})),i.d(e,"k",(function(){return p})),i.d(e,"l",(function(){return r})),i.d(e,"m",(function(){return S})),i.d(e,"n",(function(){return b})),i.d(e,"o",(function(){return f})),i.d(e,"p",(function(){return m})),i.d(e,"q",(function(){return y})),i.d(e,"r",(function(){return g})),i.d(e,"s",(function(){return M})),i.d(e,"t",(function(){return v})),i.d(e,"u",(function(){return _})),i.d(e,"v",(function(){return h})),i.d(e,"w",(function(){return D})),i.d(e,"x",(function(){return P}));var n=i("fXoL");function a(t){return"string"==typeof t}function s(t){return-1!==["a","e","i","o","u"].indexOf(t)}function o(t){const[e,...i]=t.split(/\s/g);return[e.toLowerCase().split(/(?=['|-])/g).map(t=>t.indexOf("-")+t.indexOf("'")>-2?t.slice(0,2).toUpperCase()+t.slice(2):t.slice(0,1).toUpperCase()+t.slice(1)).join(""),...i].join(" ")}let r=(()=>{class t{transform(t){return a(t)?t.split("").reverse().join(""):Array.isArray(t)?t.slice().reverse():t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"reverse",type:t,pure:!0}),t})(),c=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[]]}),t})(),l=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[]]}),t})(),d=(()=>{class t{constructor(){this.irregularMap={herb:"an",honor:"an",honorable:"an",hour:"an",mba:"an",msc:"an","m.sc.":"an",unicorn:"a"}}transform(t){if(t&&""!==t){const e=t.trim().split(" ")[0];return this.irregularMap[e.toLocaleLowerCase()]?`${this.irregularMap[e.toLocaleLowerCase()]} ${t}`:s(t[0])?"an "+t:"a "+t}return""}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"aOrAn",type:t,pure:!0}),t})(),h=(()=>{class t{transform(t){return a(t)?t.split(" ").map(t=>o(t)).join(" "):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"ucwords",type:t,pure:!0}),t})(),u=(()=>{class t{transform(t,e="\\s"){return a(t)?t.replace(new RegExp(`^[${e}]+`),""):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"ltrim",type:t,pure:!0}),t})(),p=(()=>{class t{transform(t,e=1,i=""){if(e<=0)throw new RangeError;return 1===e?t:this.repeat(t,e-1,i)}repeat(t,e,i){return a(t)?0===e?t:t+i+this.repeat(t,e-1,i):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"repeat",type:t,pure:!0}),t})(),b=(()=>{class t{transform(t,e="\\s"){return a(t)?t.replace(new RegExp(`[${e}]+$`),""):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"rtrim",type:t,pure:!0}),t})(),f=(()=>{class t{transform(t,e=[]){return a(t)?t.replace(/\{(\d+)}/g,(t,i)=>void 0===e[i]?t:e[i]):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"scan",type:t,pure:!0}),t})(),m=(()=>{class t{transform(t,e=0,i="",n=!0){if(!a(t))return t;if(t.length>e){if(n)return t.slice(0,e)+i;if(~t.indexOf(" ",e))return t.slice(0,t.indexOf(" ",e))+i}return t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"shorten",type:t,pure:!0}),t})(),g=(()=>{class t{transform(t,...e){return t.replace(e.length>0?new RegExp(`<(?!/?(${e.join("|")})s*/?)[^>]+>`,"g"):/<(?:.|\s)*?>/g,"")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"stripTags",type:t,pure:!0}),t})(),v=(()=>{class t{transform(t,e="\\s"){return a(t)?t.replace(new RegExp(`^[${e}]+|[${e}]+$`,"g"),""):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"trim",type:t,pure:!0}),t})(),_=(()=>{class t{transform(t){return a(t)?o(t):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"ucfirst",type:t,pure:!0}),t})(),y=(()=>{class t{transform(t){return a(t)?t.toLowerCase().trim().replace(/[^\w\-]+/g," ").replace(/\s+/g,"-"):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"slugify",type:t,pure:!0}),t})(),x=(()=>{class t{transform(t,e="\\s"){return a(t)?t.toLowerCase().split(/[-_\s]/g).filter(t=>!!t).map((t,e)=>e?t.slice(0,1).toUpperCase()+t.slice(1):t).join(""):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"camelize",type:t,pure:!0}),t})(),C=(()=>{class t{constructor(){this.latinMap={\u00c1:"A",\u0102:"A",\u1eae:"A",\u1eb6:"A",\u1eb0:"A",\u1eb2:"A",\u1eb4:"A",\u01cd:"A",\u00c2:"A",\u1ea4:"A",\u1eac:"A",\u1ea6:"A",\u1ea8:"A",\u1eaa:"A",\u00c4:"A",\u01de:"A",\u0226:"A",\u01e0:"A",\u1ea0:"A",\u0200:"A",\u00c0:"A",\u1ea2:"A",\u0202:"A",\u0100:"A",\u0104:"A",\u00c5:"A",\u01fa:"A",\u1e00:"A",\u023a:"A",\u00c3:"A",\ua732:"AA",\u00c6:"AE",\u01fc:"AE",\u01e2:"AE",\ua734:"AO",\ua736:"AU",\ua738:"AV",\ua73a:"AV",\ua73c:"AY",\u1e02:"B",\u1e04:"B",\u0181:"B",\u1e06:"B",\u0243:"B",\u0182:"B",\u0106:"C",\u010c:"C",\u00c7:"C",\u1e08:"C",\u0108:"C",\u010a:"C",\u0187:"C",\u023b:"C",\u010e:"D",\u1e10:"D",\u1e12:"D",\u1e0a:"D",\u1e0c:"D",\u018a:"D",\u1e0e:"D",\u01f2:"D",\u01c5:"D",\u0110:"D",\u018b:"D",\u01f1:"DZ",\u01c4:"DZ",\u00c9:"E",\u0114:"E",\u011a:"E",\u0228:"E",\u1e1c:"E",\u00ca:"E",\u1ebe:"E",\u1ec6:"E",\u1ec0:"E",\u1ec2:"E",\u1ec4:"E",\u1e18:"E",\u00cb:"E",\u0116:"E",\u1eb8:"E",\u0204:"E",\u00c8:"E",\u1eba:"E",\u0206:"E",\u0112:"E",\u1e16:"E",\u1e14:"E",\u0118:"E",\u0246:"E",\u1ebc:"E",\u1e1a:"E",\ua76a:"ET",\u1e1e:"F",\u0191:"F",\u01f4:"G",\u011e:"G",\u01e6:"G",\u0122:"G",\u011c:"G",\u0120:"G",\u0193:"G",\u1e20:"G",\u01e4:"G",\u1e2a:"H",\u021e:"H",\u1e28:"H",\u0124:"H",\u2c67:"H",\u1e26:"H",\u1e22:"H",\u1e24:"H",\u0126:"H",\u00cd:"I",\u012c:"I",\u01cf:"I",\u00ce:"I",\u00cf:"I",\u1e2e:"I",\u0130:"I",\u1eca:"I",\u0208:"I",\u00cc:"I",\u1ec8:"I",\u020a:"I",\u012a:"I",\u012e:"I",\u0197:"I",\u0128:"I",\u1e2c:"I",\ua779:"D",\ua77b:"F",\ua77d:"G",\ua782:"R",\ua784:"S",\ua786:"T",\ua76c:"IS",\u0134:"J",\u0248:"J",\u1e30:"K",\u01e8:"K",\u0136:"K",\u2c69:"K",\ua742:"K",\u1e32:"K",\u0198:"K",\u1e34:"K",\ua740:"K",\ua744:"K",\u0139:"L",\u023d:"L",\u013d:"L",\u013b:"L",\u1e3c:"L",\u1e36:"L",\u1e38:"L",\u2c60:"L",\ua748:"L",\u1e3a:"L",\u013f:"L",\u2c62:"L",\u01c8:"L",\u0141:"L",\u01c7:"LJ",\u1e3e:"M",\u1e40:"M",\u1e42:"M",\u2c6e:"M",\u0143:"N",\u0147:"N",\u0145:"N",\u1e4a:"N",\u1e44:"N",\u1e46:"N",\u01f8:"N",\u019d:"N",\u1e48:"N",\u0220:"N",\u01cb:"N",\u00d1:"N",\u01ca:"NJ",\u00d3:"O",\u014e:"O",\u01d1:"O",\u00d4:"O",\u1ed0:"O",\u1ed8:"O",\u1ed2:"O",\u1ed4:"O",\u1ed6:"O",\u00d6:"O",\u022a:"O",\u022e:"O",\u0230:"O",\u1ecc:"O",\u0150:"O",\u020c:"O",\u00d2:"O",\u1ece:"O",\u01a0:"O",\u1eda:"O",\u1ee2:"O",\u1edc:"O",\u1ede:"O",\u1ee0:"O",\u020e:"O",\ua74a:"O",\ua74c:"O",\u014c:"O",\u1e52:"O",\u1e50:"O",\u019f:"O",\u01ea:"O",\u01ec:"O",\u00d8:"O",\u01fe:"O",\u00d5:"O",\u1e4c:"O",\u1e4e:"O",\u022c:"O",\u01a2:"OI",\ua74e:"OO",\u0190:"E",\u0186:"O",\u0222:"OU",\u1e54:"P",\u1e56:"P",\ua752:"P",\u01a4:"P",\ua754:"P",\u2c63:"P",\ua750:"P",\ua758:"Q",\ua756:"Q",\u0154:"R",\u0158:"R",\u0156:"R",\u1e58:"R",\u1e5a:"R",\u1e5c:"R",\u0210:"R",\u0212:"R",\u1e5e:"R",\u024c:"R",\u2c64:"R",\ua73e:"C",\u018e:"E",\u015a:"S",\u1e64:"S",\u0160:"S",\u1e66:"S",\u015e:"S",\u015c:"S",\u0218:"S",\u1e60:"S",\u1e62:"S",\u1e68:"S",\u1e9e:"SS",\u0164:"T",\u0162:"T",\u1e70:"T",\u021a:"T",\u023e:"T",\u1e6a:"T",\u1e6c:"T",\u01ac:"T",\u1e6e:"T",\u01ae:"T",\u0166:"T",\u2c6f:"A",\ua780:"L",\u019c:"M",\u0245:"V",\ua728:"TZ",\u00da:"U",\u016c:"U",\u01d3:"U",\u00db:"U",\u1e76:"U",\u00dc:"U",\u01d7:"U",\u01d9:"U",\u01db:"U",\u01d5:"U",\u1e72:"U",\u1ee4:"U",\u0170:"U",\u0214:"U",\u00d9:"U",\u1ee6:"U",\u01af:"U",\u1ee8:"U",\u1ef0:"U",\u1eea:"U",\u1eec:"U",\u1eee:"U",\u0216:"U",\u016a:"U",\u1e7a:"U",\u0172:"U",\u016e:"U",\u0168:"U",\u1e78:"U",\u1e74:"U",\ua75e:"V",\u1e7e:"V",\u01b2:"V",\u1e7c:"V",\ua760:"VY",\u1e82:"W",\u0174:"W",\u1e84:"W",\u1e86:"W",\u1e88:"W",\u1e80:"W",\u2c72:"W",\u1e8c:"X",\u1e8a:"X",\u00dd:"Y",\u0176:"Y",\u0178:"Y",\u1e8e:"Y",\u1ef4:"Y",\u1ef2:"Y",\u01b3:"Y",\u1ef6:"Y",\u1efe:"Y",\u0232:"Y",\u024e:"Y",\u1ef8:"Y",\u0179:"Z",\u017d:"Z",\u1e90:"Z",\u2c6b:"Z",\u017b:"Z",\u1e92:"Z",\u0224:"Z",\u1e94:"Z",\u01b5:"Z",\u0132:"IJ",\u0152:"OE",\u1d00:"A",\u1d01:"AE",\u0299:"B",\u1d03:"B",\u1d04:"C",\u1d05:"D",\u1d07:"E",\ua730:"F",\u0262:"G",\u029b:"G",\u029c:"H",\u026a:"I",\u0281:"R",\u1d0a:"J",\u1d0b:"K",\u029f:"L",\u1d0c:"L",\u1d0d:"M",\u0274:"N",\u1d0f:"O",\u0276:"OE",\u1d10:"O",\u1d15:"OU",\u1d18:"P",\u0280:"R",\u1d0e:"N",\u1d19:"R",\ua731:"S",\u1d1b:"T",\u2c7b:"E",\u1d1a:"R",\u1d1c:"U",\u1d20:"V",\u1d21:"W",\u028f:"Y",\u1d22:"Z",\u00e1:"a",\u0103:"a",\u1eaf:"a",\u1eb7:"a",\u1eb1:"a",\u1eb3:"a",\u1eb5:"a",\u01ce:"a",\u00e2:"a",\u1ea5:"a",\u1ead:"a",\u1ea7:"a",\u1ea9:"a",\u1eab:"a",\u00e4:"a",\u01df:"a",\u0227:"a",\u01e1:"a",\u1ea1:"a",\u0201:"a",\u00e0:"a",\u1ea3:"a",\u0203:"a",\u0101:"a",\u0105:"a",\u1d8f:"a",\u1e9a:"a",\u00e5:"a",\u01fb:"a",\u1e01:"a",\u2c65:"a",\u00e3:"a",\ua733:"aa",\u00e6:"ae",\u01fd:"ae",\u01e3:"ae",\ua735:"ao",\ua737:"au",\ua739:"av",\ua73b:"av",\ua73d:"ay",\u1e03:"b",\u1e05:"b",\u0253:"b",\u1e07:"b",\u1d6c:"b",\u1d80:"b",\u0180:"b",\u0183:"b",\u0275:"o",\u0107:"c",\u010d:"c",\u00e7:"c",\u1e09:"c",\u0109:"c",\u0255:"c",\u010b:"c",\u0188:"c",\u023c:"c",\u010f:"d",\u1e11:"d",\u1e13:"d",\u0221:"d",\u1e0b:"d",\u1e0d:"d",\u0257:"d",\u1d91:"d",\u1e0f:"d",\u1d6d:"d",\u1d81:"d",\u0111:"d",\u0256:"d",\u018c:"d",\u0131:"i",\u0237:"j",\u025f:"j",\u0284:"j",\u01f3:"dz",\u01c6:"dz",\u00e9:"e",\u0115:"e",\u011b:"e",\u0229:"e",\u1e1d:"e",\u00ea:"e",\u1ebf:"e",\u1ec7:"e",\u1ec1:"e",\u1ec3:"e",\u1ec5:"e",\u1e19:"e",\u00eb:"e",\u0117:"e",\u1eb9:"e",\u0205:"e",\u00e8:"e",\u1ebb:"e",\u0207:"e",\u0113:"e",\u1e17:"e",\u1e15:"e",\u2c78:"e",\u0119:"e",\u1d92:"e",\u0247:"e",\u1ebd:"e",\u1e1b:"e",\ua76b:"et",\u1e1f:"f",\u0192:"f",\u1d6e:"f",\u1d82:"f",\u01f5:"g",\u011f:"g",\u01e7:"g",\u0123:"g",\u011d:"g",\u0121:"g",\u0260:"g",\u1e21:"g",\u1d83:"g",\u01e5:"g",\u1e2b:"h",\u021f:"h",\u1e29:"h",\u0125:"h",\u2c68:"h",\u1e27:"h",\u1e23:"h",\u1e25:"h",\u0266:"h",\u1e96:"h",\u0127:"h",\u0195:"hv",\u00ed:"i",\u012d:"i",\u01d0:"i",\u00ee:"i",\u00ef:"i",\u1e2f:"i",\u1ecb:"i",\u0209:"i",\u00ec:"i",\u1ec9:"i",\u020b:"i",\u012b:"i",\u012f:"i",\u1d96:"i",\u0268:"i",\u0129:"i",\u1e2d:"i",\ua77a:"d",\ua77c:"f",\u1d79:"g",\ua783:"r",\ua785:"s",\ua787:"t",\ua76d:"is",\u01f0:"j",\u0135:"j",\u029d:"j",\u0249:"j",\u1e31:"k",\u01e9:"k",\u0137:"k",\u2c6a:"k",\ua743:"k",\u1e33:"k",\u0199:"k",\u1e35:"k",\u1d84:"k",\ua741:"k",\ua745:"k",\u013a:"l",\u019a:"l",\u026c:"l",\u013e:"l",\u013c:"l",\u1e3d:"l",\u0234:"l",\u1e37:"l",\u1e39:"l",\u2c61:"l",\ua749:"l",\u1e3b:"l",\u0140:"l",\u026b:"l",\u1d85:"l",\u026d:"l",\u0142:"l",\u01c9:"lj",\u017f:"s",\u1e9c:"s",\u1e9b:"s",\u1e9d:"s",\u1e3f:"m",\u1e41:"m",\u1e43:"m",\u0271:"m",\u1d6f:"m",\u1d86:"m",\u0144:"n",\u0148:"n",\u0146:"n",\u1e4b:"n",\u0235:"n",\u1e45:"n",\u1e47:"n",\u01f9:"n",\u0272:"n",\u1e49:"n",\u019e:"n",\u1d70:"n",\u1d87:"n",\u0273:"n",\u00f1:"n",\u01cc:"nj",\u00f3:"o",\u014f:"o",\u01d2:"o",\u00f4:"o",\u1ed1:"o",\u1ed9:"o",\u1ed3:"o",\u1ed5:"o",\u1ed7:"o",\u00f6:"o",\u022b:"o",\u022f:"o",\u0231:"o",\u1ecd:"o",\u0151:"o",\u020d:"o",\u00f2:"o",\u1ecf:"o",\u01a1:"o",\u1edb:"o",\u1ee3:"o",\u1edd:"o",\u1edf:"o",\u1ee1:"o",\u020f:"o",\ua74b:"o",\ua74d:"o",\u2c7a:"o",\u014d:"o",\u1e53:"o",\u1e51:"o",\u01eb:"o",\u01ed:"o",\u00f8:"o",\u01ff:"o",\u00f5:"o",\u1e4d:"o",\u1e4f:"o",\u022d:"o",\u01a3:"oi",\ua74f:"oo",\u025b:"e",\u1d93:"e",\u0254:"o",\u1d97:"o",\u0223:"ou",\u1e55:"p",\u1e57:"p",\ua753:"p",\u01a5:"p",\u1d71:"p",\u1d88:"p",\ua755:"p",\u1d7d:"p",\ua751:"p",\ua759:"q",\u02a0:"q",\u024b:"q",\ua757:"q",\u0155:"r",\u0159:"r",\u0157:"r",\u1e59:"r",\u1e5b:"r",\u1e5d:"r",\u0211:"r",\u027e:"r",\u1d73:"r",\u0213:"r",\u1e5f:"r",\u027c:"r",\u1d72:"r",\u1d89:"r",\u024d:"r",\u027d:"r",\u2184:"c",\ua73f:"c",\u0258:"e",\u027f:"r",\u015b:"s",\u1e65:"s",\u0161:"s",\u1e67:"s",\u015f:"s",\u015d:"s",\u0219:"s",\u1e61:"s",\u1e63:"s",\u1e69:"s",\u0282:"s",\u1d74:"s",\u1d8a:"s",\u023f:"s",\u0261:"g",\u00df:"ss",\u1d11:"o",\u1d13:"o",\u1d1d:"u",\u0165:"t",\u0163:"t",\u1e71:"t",\u021b:"t",\u0236:"t",\u1e97:"t",\u2c66:"t",\u1e6b:"t",\u1e6d:"t",\u01ad:"t",\u1e6f:"t",\u1d75:"t",\u01ab:"t",\u0288:"t",\u0167:"t",\u1d7a:"th",\u0250:"a",\u1d02:"ae",\u01dd:"e",\u1d77:"g",\u0265:"h",\u02ae:"h",\u02af:"h",\u1d09:"i",\u029e:"k",\ua781:"l",\u026f:"m",\u0270:"m",\u1d14:"oe",\u0279:"r",\u027b:"r",\u027a:"r",\u2c79:"r",\u0287:"t",\u028c:"v",\u028d:"w",\u028e:"y",\ua729:"tz",\u00fa:"u",\u016d:"u",\u01d4:"u",\u00fb:"u",\u1e77:"u",\u00fc:"u",\u01d8:"u",\u01da:"u",\u01dc:"u",\u01d6:"u",\u1e73:"u",\u1ee5:"u",\u0171:"u",\u0215:"u",\u00f9:"u",\u1ee7:"u",\u01b0:"u",\u1ee9:"u",\u1ef1:"u",\u1eeb:"u",\u1eed:"u",\u1eef:"u",\u0217:"u",\u016b:"u",\u1e7b:"u",\u0173:"u",\u1d99:"u",\u016f:"u",\u0169:"u",\u1e79:"u",\u1e75:"u",\u1d6b:"ue",\ua778:"um",\u2c74:"v",\ua75f:"v",\u1e7f:"v",\u028b:"v",\u1d8c:"v",\u2c71:"v",\u1e7d:"v",\ua761:"vy",\u1e83:"w",\u0175:"w",\u1e85:"w",\u1e87:"w",\u1e89:"w",\u1e81:"w",\u2c73:"w",\u1e98:"w",\u1e8d:"x",\u1e8b:"x",\u1d8d:"x",\u00fd:"y",\u0177:"y",\u00ff:"y",\u1e8f:"y",\u1ef5:"y",\u1ef3:"y",\u01b4:"y",\u1ef7:"y",\u1eff:"y",\u0233:"y",\u1e99:"y",\u024f:"y",\u1ef9:"y",\u017a:"z",\u017e:"z",\u1e91:"z",\u0291:"z",\u2c6c:"z",\u017c:"z",\u1e93:"z",\u0225:"z",\u1e95:"z",\u1d76:"z",\u1d8e:"z",\u0290:"z",\u01b6:"z",\u0240:"z",\ufb00:"ff",\ufb03:"ffi",\ufb04:"ffl",\ufb01:"fi",\ufb02:"fl",\u0133:"ij",\u0153:"oe",\ufb06:"st",\u2090:"a",\u2091:"e",\u1d62:"i",\u2c7c:"j",\u2092:"o",\u1d63:"r",\u1d64:"u",\u1d65:"v",\u2093:"x"}}transform(t,e="\\s"){return a(t)?t.replace(/[^A-Za-z0-9]/g,t=>this.latinMap[t]||t):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"latinise",type:t,pure:!0}),t})(),O=(()=>{class t{transform(t,e="\\s"){return a(t)?t.replace(/\r\n/g,"\n").split("\n"):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"lines",type:t,pure:!0}),t})(),D=(()=>{class t{transform(t,e="\\s"){return a(t)?t.trim().replace(/\s+/g,"").replace(/[A-Z]/g,(t,e)=>e?"_"+t.toLowerCase():t.toLowerCase()):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"underscore",type:t,pure:!0}),t})(),w=(()=>{class t{transform(t,e,i){return a(t)?t.match(new RegExp(e,i)):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"match",type:t,pure:!0}),t})(),M=(()=>{class t{transform(t,e,i){return a(t)?new RegExp(e,i).test(t):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"test",type:t,pure:!0}),t})(),k=(()=>{class t{transform(t,e,i=" "){if(!a(t)||t.length>=e)return t;for(;t.length<e;)t=i+t;return t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"lpad",type:t,pure:!0}),t})(),S=(()=>{class t{transform(t,e=1,i=" "){if(!a(t)||t.length>=e)return t;for(;t.length<e;)t+=i;return t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"rpad",type:t,pure:!0}),t})(),I=(()=>{class t{constructor(){this.irregularMap={addendum:"addenda",alga:"algae",alumna:"alumnae",alumnus:"alumni",analysis:"analyses",antenna:"antennae",appendix:"appendices",aquarium:"aquaria",arch:"arches",axe:"axes",axis:"axes",bacillus:"bacilli",bacterium:"bacteria",basis:"bases",batch:"batches",beach:"beaches",beau:"beaux",bison:"bison",brush:"brushes",buffalo:"buffaloes",bureau:"bureaus",bus:"busses",cactus:"cacti",calf:"calves",chateau:"chateaux",cherry:"cherries",child:"children",church:"churches",circus:"circuses",cod:"cod",corps:"corps",corpus:"corpora",crisis:"crises",criterion:"criteria",curriculum:"curricula",datum:"data",deer:"deer",diagnosis:"diagnoses",die:"dice",domino:"dominoes",dwarf:"dwarves",echo:"echoes",elf:"elves",ellipsis:"ellipses",embargo:"embargoes",emphasis:"emphases",erratum:"errata",fax:"faxes",fireman:"firemen",fish:"fish",flush:"flushes",focus:"foci",foot:"feet",formula:"formulas",fungus:"fungi",genus:"genera",goose:"geese",grafito:"grafiti",half:"halves",hero:"heroes",hoax:"hoaxes",hoof:"hooves",hypothesis:"hypotheses",index:"indices",kiss:"kisses",knife:"knives",leaf:"leaves",life:"lives",loaf:"loaves",louse:"lice",man:"men",mango:"mangoes",matrix:"matrices",means:"means",medium:"media",memorandum:"memoranda",millennium:"milennia",moose:"moose",mosquito:"mosquitoes",motto:"mottoes",mouse:"mice",nebula:"nebulae",neurosis:"neuroses",nucleus:"nuclei",oasis:"oases",octopus:"octopodes",ovum:"ova",ox:"oxen",paralysis:"paralyses",parenthesis:"parentheses",person:"people",phenomenon:"phenomena",plateau:"plateaux",potato:"potatoes",quiz:"quizzes",radius:"radii",reflex:"reflexes","runner-up":"runners-up",scampo:"scampi",scarf:"scarves",scissors:"scissors",scratch:"scratches",self:"selves",series:"series",sheaf:"sheaves",sheep:"sheep",shelf:"shelves","son-in-law":"sons-in-law",species:"species",splash:"splashes",stimulus:"stimuli",stitch:"stitches",stratum:"strata",syllabus:"syllabi",symposium:"symposia",synopsis:"synopses",synthesis:"syntheses",tableau:"tableaux",tax:"taxes",that:"those",thesis:"theses",thief:"thieves",this:"these",tomato:"tomatoes",tooth:"teeth",tornado:"tornadoes",torpedo:"torpedoes",vertebra:"vertebrae",veto:"vetoes",vita:"vitae",volcano:"volcanoes",waltz:"waltzes",wash:"washes",watch:"watches",wharf:"wharves",wife:"wives",wolf:"wolves",woman:"women",zero:"zeroes"}}transform(t,e=0){if(!t||""===t)return"";if(1===e)return t;{const e=t.trim().split(" ")[t.trim().split(" ").length-1];return this.irregularMap[e.toLocaleLowerCase()]?e[0]===e[0].toLocaleUpperCase()?t.replace(e,this.irregularMap[e.toLocaleLowerCase()].replace(this.irregularMap[e.toLocaleLowerCase()][0],this.irregularMap[e.toLocaleLowerCase()][0].toLocaleUpperCase())):t.replace(e,this.irregularMap[e.toLocaleLowerCase()]):"y"===e[e.length-1]?s(e[e.length-2])?t+"s":t.replace(e,e.slice(0,-1)+"ies"):"s"===e[e.length-1]?t+"es":t+"s"}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"makePluralString",type:t,pure:!0}),t})(),P=(()=>{class t{transform(t,e="",i=""){return a(t)?(e&&a(e)?e:"")+t+(i&&a(i)?i:""):t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"wrap",type:t,pure:!0}),t})(),V=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[]]}),t})(),R=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[]]}),t})(),j=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[]]}),t})(),A=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[]]}),t})(),W=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[c,V,R,j,l,A]}),t})()},bHdf:function(t,e,i){"use strict";i.d(e,"a",(function(){return s}));var n=i("5+tZ"),a=i("SpAZ");function s(t=Number.POSITIVE_INFINITY){return Object(n.a)(a.a,t)}},bOdf:function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var n=i("5+tZ");function a(t,e){return Object(n.a)(t,e,1)}},bSwM:function(t,e,i){"use strict";i.d(e,"a",(function(){return y})),i.d(e,"b",(function(){return w})),i.d(e,"c",(function(){return C}));var n=i("8LU1"),a=i("fXoL"),s=i("3Pt+"),o=i("FKr1"),r=i("R1ws"),c=i("GU7r"),l=i("u47x");const d=["input"],h=function(){return{enterDuration:150}},u=["*"],p=new a.s("mat-checkbox-default-options",{providedIn:"root",factory:function(){return{color:"accent",clickAction:"check-indeterminate"}}}),b=new a.s("mat-checkbox-click-action");let f=0;const m={provide:s.s,useExisting:Object(a.X)(()=>y),multi:!0};class g{}class v{constructor(t){this._elementRef=t}}const _=Object(o.F)(Object(o.A)(Object(o.B)(Object(o.C)(v))));let y=(()=>{class t extends _{constructor(t,e,i,n,s,o,r,c){super(t),this._changeDetectorRef=e,this._focusMonitor=i,this._ngZone=n,this._clickAction=o,this._animationMode=r,this._options=c,this.ariaLabel="",this.ariaLabelledby=null,this._uniqueId="mat-checkbox-"+ ++f,this.id=this._uniqueId,this.labelPosition="after",this.name=null,this.change=new a.o,this.indeterminateChange=new a.o,this._onTouched=()=>{},this._currentAnimationClass="",this._currentCheckState=0,this._controlValueAccessorChangeFn=()=>{},this._checked=!1,this._disabled=!1,this._indeterminate=!1,this._options=this._options||{},this._options.color&&(this.color=this.defaultColor=this._options.color),this.tabIndex=parseInt(s)||0,this._clickAction=this._clickAction||this._options.clickAction}get inputId(){return(this.id||this._uniqueId)+"-input"}get required(){return this._required}set required(t){this._required=Object(n.c)(t)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{t||Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}),this._syncIndeterminate(this._indeterminate)}ngAfterViewChecked(){}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}get checked(){return this._checked}set checked(t){t!=this.checked&&(this._checked=t,this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(t){const e=Object(n.c)(t);e!==this.disabled&&(this._disabled=e,this._changeDetectorRef.markForCheck())}get indeterminate(){return this._indeterminate}set indeterminate(t){const e=t!=this._indeterminate;this._indeterminate=Object(n.c)(t),e&&(this._transitionCheckState(this._indeterminate?3:this.checked?1:2),this.indeterminateChange.emit(this._indeterminate)),this._syncIndeterminate(this._indeterminate)}_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(t){this.checked=!!t}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t}_getAriaChecked(){return this.checked?"true":this.indeterminate?"mixed":"false"}_transitionCheckState(t){let e=this._currentCheckState,i=this._elementRef.nativeElement;if(e!==t&&(this._currentAnimationClass.length>0&&i.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(e,t),this._currentCheckState=t,this._currentAnimationClass.length>0)){i.classList.add(this._currentAnimationClass);const t=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{i.classList.remove(t)},1e3)})}}_emitChangeEvent(){const t=new g;t.source=this,t.checked=this.checked,this._controlValueAccessorChangeFn(this.checked),this.change.emit(t)}toggle(){this.checked=!this.checked}_onInputClick(t){t.stopPropagation(),this.disabled||"noop"===this._clickAction?this.disabled||"noop"!==this._clickAction||(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate):(this.indeterminate&&"check"!==this._clickAction&&Promise.resolve().then(()=>{this._indeterminate=!1,this.indeterminateChange.emit(this._indeterminate)}),this.toggle(),this._transitionCheckState(this._checked?1:2),this._emitChangeEvent())}focus(t="keyboard",e){this._focusMonitor.focusVia(this._inputElement,t,e)}_onInteractionEvent(t){t.stopPropagation()}_getAnimationClassForCheckStateTransition(t,e){if("NoopAnimations"===this._animationMode)return"";let i="";switch(t){case 0:if(1===e)i="unchecked-checked";else{if(3!=e)return"";i="unchecked-indeterminate"}break;case 2:i=1===e?"unchecked-checked":"unchecked-indeterminate";break;case 1:i=2===e?"checked-unchecked":"checked-indeterminate";break;case 3:i=1===e?"indeterminate-checked":"indeterminate-unchecked"}return"mat-checkbox-anim-"+i}_syncIndeterminate(t){const e=this._inputElement;e&&(e.nativeElement.indeterminate=t)}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(a.h),a.Qb(l.h),a.Qb(a.C),a.bc("tabindex"),a.Qb(b,8),a.Qb(r.a,8),a.Qb(p,8))},t.\u0275cmp=a.Kb({type:t,selectors:[["mat-checkbox"]],viewQuery:function(t,e){var i;1&t&&(a.Xc(d,!0),a.Xc(o.u,!0)),2&t&&(a.yc(i=a.ec())&&(e._inputElement=i.first),a.yc(i=a.ec())&&(e.ripple=i.first))},hostAttrs:[1,"mat-checkbox"],hostVars:12,hostBindings:function(t,e){2&t&&(a.Zb("id",e.id),a.Eb("tabindex",null),a.Ib("mat-checkbox-indeterminate",e.indeterminate)("mat-checkbox-checked",e.checked)("mat-checkbox-disabled",e.disabled)("mat-checkbox-label-before","before"==e.labelPosition)("_mat-animation-noopable","NoopAnimations"===e._animationMode))},inputs:{disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],id:"id",labelPosition:"labelPosition",name:"name",required:"required",checked:"checked",disabled:"disabled",indeterminate:"indeterminate",ariaDescribedby:["aria-describedby","ariaDescribedby"],value:"value"},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],features:[a.Cb([m]),a.Ab],ngContentSelectors:u,decls:17,vars:20,consts:[[1,"mat-checkbox-layout"],["label",""],[1,"mat-checkbox-inner-container"],["type","checkbox",1,"mat-checkbox-input","cdk-visually-hidden",3,"id","required","checked","disabled","tabIndex","change","click"],["input",""],["matRipple","",1,"mat-checkbox-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleRadius","matRippleCentered","matRippleAnimation"],[1,"mat-ripple-element","mat-checkbox-persistent-ripple"],[1,"mat-checkbox-frame"],[1,"mat-checkbox-background"],["version","1.1","focusable","false","viewBox","0 0 24 24",0,"xml","space","preserve",1,"mat-checkbox-checkmark"],["fill","none","stroke","white","d","M4.1,12.7 9,17.6 20.3,6.3",1,"mat-checkbox-checkmark-path"],[1,"mat-checkbox-mixedmark"],[1,"mat-checkbox-label",3,"cdkObserveContent"],["checkboxLabel",""],[2,"display","none"]],template:function(t,e){if(1&t&&(a.nc(),a.Wb(0,"label",0,1),a.Wb(2,"div",2),a.Wb(3,"input",3,4),a.dc("change",(function(t){return e._onInteractionEvent(t)}))("click",(function(t){return e._onInputClick(t)})),a.Vb(),a.Wb(5,"div",5),a.Rb(6,"div",6),a.Vb(),a.Rb(7,"div",7),a.Wb(8,"div",8),a.gc(),a.Wb(9,"svg",9),a.Rb(10,"path",10),a.Vb(),a.fc(),a.Rb(11,"div",11),a.Vb(),a.Vb(),a.Wb(12,"span",12,13),a.dc("cdkObserveContent",(function(){return e._onLabelTextChange()})),a.Wb(14,"span",14),a.Qc(15,"\xa0"),a.Vb(),a.mc(16),a.Vb(),a.Vb()),2&t){const t=a.zc(1),i=a.zc(13);a.Eb("for",e.inputId),a.Db(2),a.Ib("mat-checkbox-inner-container-no-side-margin",!i.textContent||!i.textContent.trim()),a.Db(1),a.oc("id",e.inputId)("required",e.required)("checked",e.checked)("disabled",e.disabled)("tabIndex",e.tabIndex),a.Eb("value",e.value)("name",e.name)("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby)("aria-checked",e._getAriaChecked())("aria-describedby",e.ariaDescribedby),a.Db(2),a.oc("matRippleTrigger",t)("matRippleDisabled",e._isRippleDisabled())("matRippleRadius",20)("matRippleCentered",!0)("matRippleAnimation",a.uc(19,h))}},directives:[o.u,c.a],styles:["@keyframes mat-checkbox-fade-in-background{0%{opacity:0}50%{opacity:1}}@keyframes mat-checkbox-fade-out-background{0%,50%{opacity:1}100%{opacity:0}}@keyframes mat-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:22.910259}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1)}100%{stroke-dashoffset:0}}@keyframes mat-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mat-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);stroke-dashoffset:0}to{stroke-dashoffset:-22.910259}}@keyframes mat-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(45deg)}}@keyframes mat-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:0;transform:rotate(45deg)}to{opacity:1;transform:rotate(360deg)}}@keyframes mat-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:0;transform:rotate(-45deg)}to{opacity:1;transform:rotate(0deg)}}@keyframes mat-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(315deg)}}@keyframes mat-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;opacity:1;transform:scaleX(1)}32.8%,100%{opacity:0;transform:scaleX(0)}}.mat-checkbox-background,.mat-checkbox-frame{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:2px;box-sizing:border-box;pointer-events:none}.mat-checkbox{transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);cursor:pointer;-webkit-tap-highlight-color:transparent}._mat-animation-noopable.mat-checkbox{transition:none;animation:none}.mat-checkbox .mat-ripple-element:not(.mat-checkbox-persistent-ripple){opacity:.16}.mat-checkbox-layout{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:inherit;align-items:baseline;vertical-align:middle;display:inline-flex;white-space:nowrap}.mat-checkbox-label{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.mat-checkbox-inner-container{display:inline-block;height:16px;line-height:0;margin:auto;margin-right:8px;order:0;position:relative;vertical-align:middle;white-space:nowrap;width:16px;flex-shrink:0}[dir=rtl] .mat-checkbox-inner-container{margin-left:8px;margin-right:auto}.mat-checkbox-inner-container-no-side-margin{margin-left:0;margin-right:0}.mat-checkbox-frame{background-color:transparent;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1);border-width:2px;border-style:solid}._mat-animation-noopable .mat-checkbox-frame{transition:none}.cdk-high-contrast-active .mat-checkbox.cdk-keyboard-focused .mat-checkbox-frame{border-style:dotted}.mat-checkbox-background{align-items:center;display:inline-flex;justify-content:center;transition:background-color 90ms cubic-bezier(0, 0, 0.2, 0.1),opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}._mat-animation-noopable .mat-checkbox-background{transition:none}.cdk-high-contrast-active .mat-checkbox .mat-checkbox-background{background:none}.mat-checkbox-persistent-ripple{width:100%;height:100%;transform:none}.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:.04}.mat-checkbox.cdk-keyboard-focused .mat-checkbox-persistent-ripple{opacity:.12}.mat-checkbox-persistent-ripple,.mat-checkbox.mat-checkbox-disabled .mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:0}@media(hover: none){.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{display:none}}.mat-checkbox-checkmark{top:0;left:0;right:0;bottom:0;position:absolute;width:100%}.mat-checkbox-checkmark-path{stroke-dashoffset:22.910259;stroke-dasharray:22.910259;stroke-width:2.1333333333px}.cdk-high-contrast-black-on-white .mat-checkbox-checkmark-path{stroke:#000 !important}.mat-checkbox-mixedmark{width:calc(100% - 6px);height:2px;opacity:0;transform:scaleX(0) rotate(0deg);border-radius:2px}.cdk-high-contrast-active .mat-checkbox-mixedmark{height:0;border-top:solid 2px;margin-top:2px}.mat-checkbox-label-before .mat-checkbox-inner-container{order:1;margin-left:8px;margin-right:auto}[dir=rtl] .mat-checkbox-label-before .mat-checkbox-inner-container{margin-left:auto;margin-right:8px}.mat-checkbox-checked .mat-checkbox-checkmark{opacity:1}.mat-checkbox-checked .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-checked .mat-checkbox-mixedmark{transform:scaleX(1) rotate(-45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark{opacity:0;transform:rotate(45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-indeterminate .mat-checkbox-mixedmark{opacity:1;transform:scaleX(1) rotate(0deg)}.mat-checkbox-unchecked .mat-checkbox-background{background-color:transparent}.mat-checkbox-disabled{cursor:default}.cdk-high-contrast-active .mat-checkbox-disabled{opacity:.5}.mat-checkbox-anim-unchecked-checked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-checked .mat-checkbox-checkmark-path{animation:180ms linear 0ms mat-checkbox-unchecked-checked-checkmark-path}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-unchecked-indeterminate-mixedmark}.mat-checkbox-anim-checked-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-checked-unchecked .mat-checkbox-checkmark-path{animation:90ms linear 0ms mat-checkbox-checked-unchecked-checkmark-path}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-checkmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-checkmark}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-mixedmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-checkmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-checkmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-mixedmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-mixedmark}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-mixedmark{animation:300ms linear 0ms mat-checkbox-indeterminate-unchecked-mixedmark}.mat-checkbox-input{bottom:0;left:50%}.mat-checkbox .mat-checkbox-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}\n"],encapsulation:2,changeDetection:0}),t})();const x={provide:s.r,useExisting:Object(a.X)(()=>C),multi:!0};let C=(()=>{class t extends s.b{}return t.\u0275fac=function(e){return O(e||t)},t.\u0275dir=a.Lb({type:t,selectors:[["mat-checkbox","required","","formControlName",""],["mat-checkbox","required","","formControl",""],["mat-checkbox","required","","ngModel",""]],features:[a.Cb([x]),a.Ab]}),t})();const O=a.Yb(C);let D=(()=>{class t{}return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)}}),t})(),w=(()=>{class t{}return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)},imports:[[o.v,o.k,c.c,D],o.k,D]}),t})()},bTqV:function(t,e,i){"use strict";i.d(e,"a",(function(){return b})),i.d(e,"b",(function(){return p})),i.d(e,"c",(function(){return f}));var n=i("FKr1"),a=i("R1ws"),s=i("fXoL"),o=i("u47x");const r=["mat-button",""],c=["*"],l=".mat-button .mat-button-focus-overlay,.mat-icon-button .mat-button-focus-overlay{opacity:0}.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:.04}@media(hover: none){.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:0}}.mat-button,.mat-icon-button,.mat-stroked-button,.mat-flat-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-button.mat-button-disabled,.mat-icon-button.mat-button-disabled,.mat-stroked-button.mat-button-disabled,.mat-flat-button.mat-button-disabled{cursor:default}.mat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-button.cdk-program-focused .mat-button-focus-overlay,.mat-icon-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-icon-button.cdk-program-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-program-focused .mat-button-focus-overlay,.mat-flat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-flat-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-raised-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button.mat-button-disabled{cursor:default}.mat-raised-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-raised-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-raised-button::-moz-focus-inner{border:0}._mat-animation-noopable.mat-raised-button{transition:none;animation:none}.mat-stroked-button{border:1px solid currentColor;padding:0 15px;line-height:34px}.mat-stroked-button .mat-button-ripple.mat-ripple,.mat-stroked-button .mat-button-focus-overlay{top:-1px;left:-1px;right:-1px;bottom:-1px}.mat-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:56px;height:56px;padding:0;flex-shrink:0}.mat-fab::-moz-focus-inner{border:0}.mat-fab.mat-button-disabled{cursor:default}.mat-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-fab::-moz-focus-inner{border:0}._mat-animation-noopable.mat-fab{transition:none;animation:none}.mat-fab .mat-button-wrapper{padding:16px 0;display:inline-block;line-height:24px}.mat-mini-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:40px;height:40px;padding:0;flex-shrink:0}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab.mat-button-disabled{cursor:default}.mat-mini-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-mini-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-mini-fab::-moz-focus-inner{border:0}._mat-animation-noopable.mat-mini-fab{transition:none;animation:none}.mat-mini-fab .mat-button-wrapper{padding:8px 0;display:inline-block;line-height:24px}.mat-icon-button{padding:0;min-width:0;width:40px;height:40px;flex-shrink:0;line-height:40px;border-radius:50%}.mat-icon-button i,.mat-icon-button .mat-icon{line-height:24px}.mat-button-ripple.mat-ripple,.mat-button-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-button-ripple.mat-ripple:not(:empty){transform:translateZ(0)}.mat-button-focus-overlay{opacity:0;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1),background-color 200ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-button-focus-overlay{transition:none}.mat-button-ripple-round{border-radius:50%;z-index:1}.mat-button .mat-button-wrapper>*,.mat-flat-button .mat-button-wrapper>*,.mat-stroked-button .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-fab .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*{vertical-align:middle}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button{display:block;font-size:inherit;width:2.5em;height:2.5em}.cdk-high-contrast-active .mat-button,.cdk-high-contrast-active .mat-flat-button,.cdk-high-contrast-active .mat-raised-button,.cdk-high-contrast-active .mat-icon-button,.cdk-high-contrast-active .mat-fab,.cdk-high-contrast-active .mat-mini-fab{outline:solid 1px}.cdk-high-contrast-active .mat-button-base.cdk-keyboard-focused,.cdk-high-contrast-active .mat-button-base.cdk-program-focused{outline:solid 3px}\n",d=["mat-button","mat-flat-button","mat-icon-button","mat-raised-button","mat-stroked-button","mat-mini-fab","mat-fab"];class h{constructor(t){this._elementRef=t}}const u=Object(n.A)(Object(n.C)(Object(n.B)(h)));let p=(()=>{class t extends u{constructor(t,e,i){super(t),this._focusMonitor=e,this._animationMode=i,this.isRoundButton=this._hasHostAttributes("mat-fab","mat-mini-fab"),this.isIconButton=this._hasHostAttributes("mat-icon-button");for(const n of d)this._hasHostAttributes(n)&&this._getHostElement().classList.add(n);t.nativeElement.classList.add("mat-button-base"),this.isRoundButton&&(this.color="accent")}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}focus(t="program",e){this._focusMonitor.focusVia(this._getHostElement(),t,e)}_getHostElement(){return this._elementRef.nativeElement}_isRippleDisabled(){return this.disableRipple||this.disabled}_hasHostAttributes(...t){return t.some(t=>this._getHostElement().hasAttribute(t))}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.l),s.Qb(o.h),s.Qb(a.a,8))},t.\u0275cmp=s.Kb({type:t,selectors:[["button","mat-button",""],["button","mat-raised-button",""],["button","mat-icon-button",""],["button","mat-fab",""],["button","mat-mini-fab",""],["button","mat-stroked-button",""],["button","mat-flat-button",""]],viewQuery:function(t,e){var i;1&t&&s.Xc(n.u,!0),2&t&&s.yc(i=s.ec())&&(e.ripple=i.first)},hostAttrs:[1,"mat-focus-indicator"],hostVars:5,hostBindings:function(t,e){2&t&&(s.Eb("disabled",e.disabled||null),s.Ib("_mat-animation-noopable","NoopAnimations"===e._animationMode)("mat-button-disabled",e.disabled))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color"},exportAs:["matButton"],features:[s.Ab],attrs:r,ngContentSelectors:c,decls:4,vars:5,consts:[[1,"mat-button-wrapper"],["matRipple","",1,"mat-button-ripple",3,"matRippleDisabled","matRippleCentered","matRippleTrigger"],[1,"mat-button-focus-overlay"]],template:function(t,e){1&t&&(s.nc(),s.Wb(0,"span",0),s.mc(1),s.Vb(),s.Rb(2,"span",1),s.Rb(3,"span",2)),2&t&&(s.Db(2),s.Ib("mat-button-ripple-round",e.isRoundButton||e.isIconButton),s.oc("matRippleDisabled",e._isRippleDisabled())("matRippleCentered",e.isIconButton)("matRippleTrigger",e._getHostElement()))},directives:[n.u],styles:[l],encapsulation:2,changeDetection:0}),t})(),b=(()=>{class t extends p{constructor(t,e,i){super(e,t,i)}_haltDisabledEvents(t){this.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(o.h),s.Qb(s.l),s.Qb(a.a,8))},t.\u0275cmp=s.Kb({type:t,selectors:[["a","mat-button",""],["a","mat-raised-button",""],["a","mat-icon-button",""],["a","mat-fab",""],["a","mat-mini-fab",""],["a","mat-stroked-button",""],["a","mat-flat-button",""]],hostAttrs:[1,"mat-focus-indicator"],hostVars:7,hostBindings:function(t,e){1&t&&s.dc("click",(function(t){return e._haltDisabledEvents(t)})),2&t&&(s.Eb("tabindex",e.disabled?-1:e.tabIndex||0)("disabled",e.disabled||null)("aria-disabled",e.disabled.toString()),s.Ib("_mat-animation-noopable","NoopAnimations"===e._animationMode)("mat-button-disabled",e.disabled))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex"},exportAs:["matButton","matAnchor"],features:[s.Ab],attrs:r,ngContentSelectors:c,decls:4,vars:5,consts:[[1,"mat-button-wrapper"],["matRipple","",1,"mat-button-ripple",3,"matRippleDisabled","matRippleCentered","matRippleTrigger"],[1,"mat-button-focus-overlay"]],template:function(t,e){1&t&&(s.nc(),s.Wb(0,"span",0),s.mc(1),s.Vb(),s.Rb(2,"span",1),s.Rb(3,"span",2)),2&t&&(s.Db(2),s.Ib("mat-button-ripple-round",e.isRoundButton||e.isIconButton),s.oc("matRippleDisabled",e._isRippleDisabled())("matRippleCentered",e.isIconButton)("matRippleTrigger",e._getHostElement()))},directives:[n.u],styles:[l],encapsulation:2,changeDetection:0}),t})(),f=(()=>{class t{}return t.\u0275mod=s.Ob({type:t}),t.\u0275inj=s.Nb({factory:function(e){return new(e||t)},imports:[[n.v,n.k],n.k]}),t})()},bv9b:function(t,e,i){"use strict";i.d(e,"a",(function(){return m})),i.d(e,"b",(function(){return v}));var n=i("fXoL"),a=i("ofXK"),s=i("FKr1"),o=i("8LU1"),r=i("R1ws"),c=i("quSY"),l=i("xgIS"),d=i("pLZG");const h=["primaryValueBar"];class u{constructor(t){this._elementRef=t}}const p=Object(s.A)(u,"primary"),b=new n.s("mat-progress-bar-location",{providedIn:"root",factory:function(){const t=Object(n.Y)(a.e),e=t?t.location:null;return{getPathname:()=>e?e.pathname+e.search:""}}});let f=0,m=(()=>{class t extends p{constructor(t,e,i,a){super(t),this._elementRef=t,this._ngZone=e,this._animationMode=i,this._isNoopAnimation=!1,this._value=0,this._bufferValue=0,this.animationEnd=new n.o,this._animationEndSubscription=c.a.EMPTY,this.mode="determinate",this.progressbarId="mat-progress-bar-"+f++;const s=a?a.getPathname().split("#")[0]:"";this._rectangleFillValue=`url('${s}#${this.progressbarId}')`,this._isNoopAnimation="NoopAnimations"===i}get value(){return this._value}set value(t){this._value=g(Object(o.f)(t)||0)}get bufferValue(){return this._bufferValue}set bufferValue(t){this._bufferValue=g(t||0)}_primaryTransform(){return{transform:`scaleX(${this.value/100})`}}_bufferTransform(){return"buffer"===this.mode?{transform:`scaleX(${this.bufferValue/100})`}:null}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{const t=this._primaryValueBar.nativeElement;this._animationEndSubscription=Object(l.a)(t,"transitionend").pipe(Object(d.a)(e=>e.target===t)).subscribe(()=>{"determinate"!==this.mode&&"buffer"!==this.mode||this._ngZone.run(()=>this.animationEnd.next({value:this.value}))})})}ngOnDestroy(){this._animationEndSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(n.C),n.Qb(r.a,8),n.Qb(b,8))},t.\u0275cmp=n.Kb({type:t,selectors:[["mat-progress-bar"]],viewQuery:function(t,e){var i;1&t&&n.Xc(h,!0),2&t&&n.yc(i=n.ec())&&(e._primaryValueBar=i.first)},hostAttrs:["role","progressbar","aria-valuemin","0","aria-valuemax","100",1,"mat-progress-bar"],hostVars:4,hostBindings:function(t,e){2&t&&(n.Eb("aria-valuenow","indeterminate"===e.mode||"query"===e.mode?null:e.value)("mode",e.mode),n.Ib("_mat-animation-noopable",e._isNoopAnimation))},inputs:{color:"color",mode:"mode",value:"value",bufferValue:"bufferValue"},outputs:{animationEnd:"animationEnd"},exportAs:["matProgressBar"],features:[n.Ab],decls:9,vars:4,consts:[["width","100%","height","4","focusable","false",1,"mat-progress-bar-background","mat-progress-bar-element"],["x","4","y","0","width","8","height","4","patternUnits","userSpaceOnUse",3,"id"],["cx","2","cy","2","r","2"],["width","100%","height","100%"],[1,"mat-progress-bar-buffer","mat-progress-bar-element",3,"ngStyle"],[1,"mat-progress-bar-primary","mat-progress-bar-fill","mat-progress-bar-element",3,"ngStyle"],["primaryValueBar",""],[1,"mat-progress-bar-secondary","mat-progress-bar-fill","mat-progress-bar-element"]],template:function(t,e){1&t&&(n.gc(),n.Wb(0,"svg",0),n.Wb(1,"defs"),n.Wb(2,"pattern",1),n.Rb(3,"circle",2),n.Vb(),n.Vb(),n.Rb(4,"rect",3),n.Vb(),n.fc(),n.Rb(5,"div",4),n.Rb(6,"div",5,6),n.Rb(8,"div",7)),2&t&&(n.Db(2),n.oc("id",e.progressbarId),n.Db(2),n.Eb("fill",e._rectangleFillValue),n.Db(1),n.oc("ngStyle",e._bufferTransform()),n.Db(1),n.oc("ngStyle",e._primaryTransform()))},directives:[a.w],styles:['.mat-progress-bar{display:block;height:4px;overflow:hidden;position:relative;transition:opacity 250ms linear;width:100%}._mat-animation-noopable.mat-progress-bar{transition:none;animation:none}.mat-progress-bar .mat-progress-bar-element,.mat-progress-bar .mat-progress-bar-fill::after{height:100%;position:absolute;width:100%}.mat-progress-bar .mat-progress-bar-background{width:calc(100% + 10px)}.cdk-high-contrast-active .mat-progress-bar .mat-progress-bar-background{display:none}.mat-progress-bar .mat-progress-bar-buffer{transform-origin:top left;transition:transform 250ms ease}.cdk-high-contrast-active .mat-progress-bar .mat-progress-bar-buffer{border-top:solid 5px;opacity:.5}.mat-progress-bar .mat-progress-bar-secondary{display:none}.mat-progress-bar .mat-progress-bar-fill{animation:none;transform-origin:top left;transition:transform 250ms ease}.cdk-high-contrast-active .mat-progress-bar .mat-progress-bar-fill{border-top:solid 4px}.mat-progress-bar .mat-progress-bar-fill::after{animation:none;content:"";display:inline-block;left:0}.mat-progress-bar[dir=rtl],[dir=rtl] .mat-progress-bar{transform:rotateY(180deg)}.mat-progress-bar[mode=query]{transform:rotateZ(180deg)}.mat-progress-bar[mode=query][dir=rtl],[dir=rtl] .mat-progress-bar[mode=query]{transform:rotateZ(180deg) rotateY(180deg)}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-fill,.mat-progress-bar[mode=query] .mat-progress-bar-fill{transition:none}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-primary,.mat-progress-bar[mode=query] .mat-progress-bar-primary{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-primary-indeterminate-translate 2000ms infinite linear;left:-145.166611%}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-primary.mat-progress-bar-fill::after,.mat-progress-bar[mode=query] .mat-progress-bar-primary.mat-progress-bar-fill::after{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-primary-indeterminate-scale 2000ms infinite linear}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-secondary,.mat-progress-bar[mode=query] .mat-progress-bar-secondary{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-secondary-indeterminate-translate 2000ms infinite linear;left:-54.888891%;display:block}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-secondary.mat-progress-bar-fill::after,.mat-progress-bar[mode=query] .mat-progress-bar-secondary.mat-progress-bar-fill::after{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-secondary-indeterminate-scale 2000ms infinite linear}.mat-progress-bar[mode=buffer] .mat-progress-bar-background{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-background-scroll 250ms infinite linear;display:block}.mat-progress-bar._mat-animation-noopable .mat-progress-bar-fill,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-fill::after,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-buffer,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-primary,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-primary.mat-progress-bar-fill::after,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-secondary,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-secondary.mat-progress-bar-fill::after,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-background{animation:none;transition-duration:1ms}@keyframes mat-progress-bar-primary-indeterminate-translate{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(83.67142%)}100%{transform:translateX(200.611057%)}}@keyframes mat-progress-bar-primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes mat-progress-bar-secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(37.651913%)}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(84.386165%)}100%{transform:translateX(160.277782%)}}@keyframes mat-progress-bar-secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes mat-progress-bar-background-scroll{to{transform:translateX(-8px)}}\n'],encapsulation:2,changeDetection:0}),t})();function g(t,e=0,i=100){return Math.max(e,Math.min(i,t))}let v=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[a.c,s.k],s.k]}),t})()},c2HN:function(t,e,i){"use strict";function n(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}i.d(e,"a",(function(){return n}))},cH1L:function(t,e,i){"use strict";i.d(e,"a",(function(){return c})),i.d(e,"b",(function(){return r})),i.d(e,"c",(function(){return o}));var n=i("fXoL"),a=i("ofXK");const s=new n.s("cdk-dir-doc",{providedIn:"root",factory:function(){return Object(n.Y)(a.e)}});let o=(()=>{class t{constructor(t){if(this.value="ltr",this.change=new n.o,t){const e=t.documentElement?t.documentElement.dir:null,i=(t.body?t.body.dir:null)||e;this.value="ltr"===i||"rtl"===i?i:"ltr"}}ngOnDestroy(){this.change.complete()}}return t.\u0275fac=function(e){return new(e||t)(n.ac(s,8))},t.\u0275prov=Object(n.Mb)({factory:function(){return new t(Object(n.ac)(s,8))},token:t,providedIn:"root"}),t})(),r=(()=>{class t{constructor(){this._dir="ltr",this._isInitialized=!1,this.change=new n.o}get dir(){return this._dir}set dir(t){const e=this._dir,i=t?t.toLowerCase():t;this._rawDir=t,this._dir="ltr"===i||"rtl"===i?i:"ltr",e!==this._dir&&this._isInitialized&&this.change.emit(this._dir)}get value(){return this.dir}ngAfterContentInit(){this._isInitialized=!0}ngOnDestroy(){this.change.complete()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["","dir",""]],hostVars:1,hostBindings:function(t,e){2&t&&n.Eb("dir",e._rawDir)},inputs:{dir:"dir"},outputs:{change:"dirChange"},exportAs:["dir"],features:[n.Cb([{provide:o,useExisting:t}])]}),t})(),c=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)}}),t})()},cMWS:function(t,e,i){"use strict";i.d(e,"a",(function(){return r}));var n=i("tk/3"),a=i("ofXK"),s=i("sYmb"),o=i("fXoL");let r=(()=>{class t{}return t.\u0275mod=o.Ob({type:t}),t.\u0275inj=o.Nb({factory:function(e){return new(e||t)},providers:[],imports:[[a.c,s.c.forRoot({loader:{provide:s.b,useFactory:l,deps:[n.b]}})],s.c]}),t})();class c{constructor(t){this.http=t}getTranslation(t){return this.http.get("../rest/languages/"+t)}}function l(t){return new c(t)}},cp0P:function(t,e,i){"use strict";i.d(e,"a",(function(){return c}));var n=i("HDdC"),a=i("DH7j"),s=i("lJxs"),o=i("XoHu"),r=i("Cfvw");function c(...t){if(1===t.length){const e=t[0];if(Object(a.a)(e))return l(e,null);if(Object(o.a)(e)&&Object.getPrototypeOf(e)===Object.prototype){const t=Object.keys(e);return l(t.map(t=>e[t]),t)}}if("function"==typeof t[t.length-1]){const e=t.pop();return l(t=1===t.length&&Object(a.a)(t[0])?t[0]:t,null).pipe(Object(s.a)(t=>e(...t)))}return l(t,null)}function l(t,e){return new n.a(i=>{const n=t.length;if(0===n)return void i.complete();const a=new Array(n);let s=0,o=0;for(let c=0;c<n;c++){const l=Object(r.a)(t[c]);let d=!1;i.add(l.subscribe({next:t=>{d||(d=!0,o++),a[c]=t},error:t=>i.error(t),complete:()=>{s++,s!==n&&d||(o===n&&i.next(e?e.reduce((t,e,i)=>(t[e]=a[i],t),{}):a),i.complete())}}))}})}},d3UM:function(t,e,i){"use strict";i.d(e,"a",(function(){return $})),i.d(e,"b",(function(){return H})),i.d(e,"c",(function(){return U}));var n=i("rDax"),a=i("ofXK"),s=i("fXoL"),o=i("FKr1"),r=i("kmnG"),c=i("vxfF"),l=i("u47x"),d=i("8LU1"),h=i("0EQZ"),u=i("FtGj"),p=i("XNiG"),b=i("NXyV"),f=i("VRyK"),m=i("JX91"),g=i("eIep"),v=i("IzEk"),_=i("pLZG"),y=i("lJxs"),x=i("/uUt"),C=i("1G5W"),O=i("R0Ic"),D=i("cH1L"),w=i("3Pt+");const M=["trigger"],k=["panel"];function S(t,e){if(1&t&&(s.Wb(0,"span",8),s.Qc(1),s.Vb()),2&t){const t=s.hc();s.Db(1),s.Rc(t.placeholder||"\xa0")}}function I(t,e){if(1&t&&(s.Wb(0,"span"),s.Qc(1),s.Vb()),2&t){const t=s.hc(2);s.Db(1),s.Rc(t.triggerValue||"\xa0")}}function P(t,e){1&t&&s.mc(0,0,["*ngSwitchCase","true"])}function V(t,e){if(1&t&&(s.Wb(0,"span",9),s.Oc(1,I,2,1,"span",10),s.Oc(2,P,1,0,"ng-content",11),s.Vb()),2&t){const t=s.hc();s.oc("ngSwitch",!!t.customTrigger),s.Db(2),s.oc("ngSwitchCase",!0)}}function R(t,e){if(1&t){const t=s.Xb();s.Wb(0,"div",12),s.Wb(1,"div",13,14),s.dc("@transformPanel.done",(function(e){return s.Dc(t),s.hc()._panelDoneAnimatingStream.next(e.toState)}))("keydown",(function(e){return s.Dc(t),s.hc()._handleKeydown(e)})),s.mc(3,1),s.Vb(),s.Vb()}if(2&t){const t=s.hc();s.oc("@transformPanelWrap",void 0),s.Db(1),s.Gb("mat-select-panel ",t._getPanelTheme(),""),s.Lc("transform-origin",t._transformOrigin)("font-size",t._triggerFontSize,"px"),s.oc("ngClass",t.panelClass)("@transformPanel",t.multiple?"showing-multiple":"showing"),s.Eb("id",t.id+"-panel")("aria-multiselectable",t.multiple)("aria-label",t.ariaLabel||null)("aria-labelledby",t._getPanelAriaLabelledby())}}const j=[[["mat-select-trigger"]],"*"],A=["mat-select-trigger","*"],W={transformPanelWrap:Object(O.n)("transformPanelWrap",[Object(O.m)("* => void",Object(O.i)("@transformPanel",[Object(O.f)()],{optional:!0}))]),transformPanel:Object(O.n)("transformPanel",[Object(O.k)("void",Object(O.l)({transform:"scaleY(0.8)",minWidth:"100%",opacity:0})),Object(O.k)("showing",Object(O.l)({opacity:1,minWidth:"calc(100% + 32px)",transform:"scaleY(1)"})),Object(O.k)("showing-multiple",Object(O.l)({opacity:1,minWidth:"calc(100% + 64px)",transform:"scaleY(1)"})),Object(O.m)("void => *",Object(O.e)("120ms cubic-bezier(0, 0, 0.2, 1)")),Object(O.m)("* => void",Object(O.e)("100ms 25ms linear",Object(O.l)({opacity:0})))])};let T=0;const E=new s.s("mat-select-scroll-strategy"),F=new s.s("MAT_SELECT_CONFIG"),L={provide:E,deps:[n.c],useFactory:function(t){return()=>t.scrollStrategies.reposition()}};class Q{constructor(t,e){this.source=t,this.value=e}}class N{constructor(t,e,i,n,a){this._elementRef=t,this._defaultErrorStateMatcher=e,this._parentForm=i,this._parentFormGroup=n,this.ngControl=a}}const z=Object(o.B)(Object(o.F)(Object(o.C)(Object(o.D)(N)))),B=new s.s("MatSelectTrigger");let U=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["mat-select-trigger"]],features:[s.Cb([{provide:B,useExisting:t}])]}),t})(),$=(()=>{class t extends z{constructor(t,e,i,n,a,o,r,c,l,d,h,u,x,C){super(a,n,r,c,d),this._viewportRuler=t,this._changeDetectorRef=e,this._ngZone=i,this._dir=o,this._parentFormField=l,this.ngControl=d,this._liveAnnouncer=x,this._panelOpen=!1,this._required=!1,this._scrollTop=0,this._multiple=!1,this._compareWith=(t,e)=>t===e,this._uid="mat-select-"+T++,this._triggerAriaLabelledBy=null,this._destroy=new p.a,this._triggerFontSize=0,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+T++,this._transformOrigin="top",this._panelDoneAnimatingStream=new p.a,this._offsetY=0,this._positions=[{originX:"start",originY:"top",overlayX:"start",overlayY:"top"},{originX:"start",originY:"bottom",overlayX:"start",overlayY:"bottom"}],this._disableOptionCentering=!1,this._focused=!1,this.controlType="mat-select",this.ariaLabel="",this.optionSelectionChanges=Object(b.a)(()=>{const t=this.options;return t?t.changes.pipe(Object(m.a)(t),Object(g.a)(()=>Object(f.a)(...t.map(t=>t.onSelectionChange)))):this._ngZone.onStable.pipe(Object(v.a)(1),Object(g.a)(()=>this.optionSelectionChanges))}),this.openedChange=new s.o,this._openedStream=this.openedChange.pipe(Object(_.a)(t=>t),Object(y.a)(()=>{})),this._closedStream=this.openedChange.pipe(Object(_.a)(t=>!t),Object(y.a)(()=>{})),this.selectionChange=new s.o,this.valueChange=new s.o,this.ngControl&&(this.ngControl.valueAccessor=this),this._scrollStrategyFactory=u,this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=parseInt(h)||0,this.id=this.id,C&&(null!=C.disableOptionCentering&&(this.disableOptionCentering=C.disableOptionCentering),null!=C.typeaheadDebounceInterval&&(this.typeaheadDebounceInterval=C.typeaheadDebounceInterval))}get focused(){return this._focused||this._panelOpen}get placeholder(){return this._placeholder}set placeholder(t){this._placeholder=t,this.stateChanges.next()}get required(){return this._required}set required(t){this._required=Object(d.c)(t),this.stateChanges.next()}get multiple(){return this._multiple}set multiple(t){this._multiple=Object(d.c)(t)}get disableOptionCentering(){return this._disableOptionCentering}set disableOptionCentering(t){this._disableOptionCentering=Object(d.c)(t)}get compareWith(){return this._compareWith}set compareWith(t){this._compareWith=t,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(t){t!==this._value&&(this.options&&this._setSelectionByValue(t),this._value=t)}get typeaheadDebounceInterval(){return this._typeaheadDebounceInterval}set typeaheadDebounceInterval(t){this._typeaheadDebounceInterval=Object(d.f)(t)}get id(){return this._id}set id(t){this._id=t||this._uid,this.stateChanges.next()}ngOnInit(){this._selectionModel=new h.c(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(Object(x.a)(),Object(C.a)(this._destroy)).subscribe(()=>{this.panelOpen?(this._scrollTop=0,this.openedChange.emit(!0)):(this.openedChange.emit(!1),this.overlayDir.offsetX=0,this._changeDetectorRef.markForCheck())}),this._viewportRuler.change().pipe(Object(C.a)(this._destroy)).subscribe(()=>{this._panelOpen&&(this._triggerRect=this.trigger.nativeElement.getBoundingClientRect(),this._changeDetectorRef.markForCheck())})}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(Object(C.a)(this._destroy)).subscribe(t=>{t.added.forEach(t=>t.select()),t.removed.forEach(t=>t.deselect())}),this.options.changes.pipe(Object(m.a)(null),Object(C.a)(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){const t=this._getTriggerAriaLabelledby();if(t!==this._triggerAriaLabelledBy){const e=this._elementRef.nativeElement;this._triggerAriaLabelledBy=t,t?e.setAttribute("aria-labelledby",t):e.removeAttribute("aria-labelledby")}this.ngControl&&this.updateErrorState()}ngOnChanges(t){t.disabled&&this.stateChanges.next(),t.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this._typeaheadDebounceInterval)}ngOnDestroy(){this._destroy.next(),this._destroy.complete(),this.stateChanges.complete()}toggle(){this.panelOpen?this.close():this.open()}open(){!this.disabled&&this.options&&this.options.length&&!this._panelOpen&&(this._triggerRect=this.trigger.nativeElement.getBoundingClientRect(),this._triggerFontSize=parseInt(getComputedStyle(this.trigger.nativeElement).fontSize||"0"),this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._calculateOverlayPosition(),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this._ngZone.onStable.pipe(Object(v.a)(1)).subscribe(()=>{this._triggerFontSize&&this.overlayDir.overlayRef&&this.overlayDir.overlayRef.overlayElement&&(this.overlayDir.overlayRef.overlayElement.style.fontSize=this._triggerFontSize+"px")}))}close(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched())}writeValue(t){this.value=t}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel.selected:this._selectionModel.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){const t=this._selectionModel.selected.map(t=>t.viewValue);return this._isRtl()&&t.reverse(),t.join(", ")}return this._selectionModel.selected[0].viewValue}_isRtl(){return!!this._dir&&"rtl"===this._dir.value}_handleKeydown(t){this.disabled||(this.panelOpen?this._handleOpenKeydown(t):this._handleClosedKeydown(t))}_handleClosedKeydown(t){const e=t.keyCode,i=e===u.e||e===u.s||e===u.k||e===u.o,n=e===u.g||e===u.q,a=this._keyManager;if(!a.isTyping()&&n&&!Object(u.v)(t)||(this.multiple||t.altKey)&&i)t.preventDefault(),this.open();else if(!this.multiple){const e=this.selected;a.onKeydown(t);const i=this.selected;i&&e!==i&&this._liveAnnouncer.announce(i.viewValue,1e4)}}_handleOpenKeydown(t){const e=this._keyManager,i=t.keyCode,n=i===u.e||i===u.s,a=e.isTyping();if(n&&t.altKey)t.preventDefault(),this.close();else if(a||i!==u.g&&i!==u.q||!e.activeItem||Object(u.v)(t))if(!a&&this._multiple&&i===u.a&&t.ctrlKey){t.preventDefault();const e=this.options.some(t=>!t.disabled&&!t.selected);this.options.forEach(t=>{t.disabled||(e?t.select():t.deselect())})}else{const i=e.activeItemIndex;e.onKeydown(t),this._multiple&&n&&t.shiftKey&&e.activeItem&&e.activeItemIndex!==i&&e.activeItem._selectViaInteraction()}else t.preventDefault(),e.activeItem._selectViaInteraction()}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this.disabled||this.panelOpen||(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_onAttached(){this.overlayDir.positionChange.pipe(Object(v.a)(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._calculateOverlayOffsetX(),this.panel.nativeElement.scrollTop=this._scrollTop})}_getPanelTheme(){return this._parentFormField?"mat-"+this._parentFormField.color:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this._setSelectionByValue(this.ngControl?this.ngControl.value:this._value),this.stateChanges.next()})}_setSelectionByValue(t){if(this.multiple&&t)Array.isArray(t),this._selectionModel.clear(),t.forEach(t=>this._selectValue(t)),this._sortValues();else{this._selectionModel.clear();const e=this._selectValue(t);e?this._keyManager.updateActiveItem(e):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectValue(t){const e=this.options.find(e=>{try{return null!=e.value&&this._compareWith(e.value,t)}catch(i){return!1}});return e&&this._selectionModel.select(e),e}_initKeyManager(){this._keyManager=new l.b(this.options).withTypeAhead(this._typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withAllowedModifierKeys(["shiftKey"]),this._keyManager.tabOut.pipe(Object(C.a)(this._destroy)).subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.pipe(Object(C.a)(this._destroy)).subscribe(()=>{this._panelOpen&&this.panel?this._scrollActiveOptionIntoView():this._panelOpen||this.multiple||!this._keyManager.activeItem||this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){const t=Object(f.a)(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Object(C.a)(t)).subscribe(t=>{this._onSelect(t.source,t.isUserInput),t.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Object(f.a)(...this.options.map(t=>t._stateChanges)).pipe(Object(C.a)(t)).subscribe(()=>{this._changeDetectorRef.markForCheck(),this.stateChanges.next()})}_onSelect(t,e){const i=this._selectionModel.isSelected(t);null!=t.value||this._multiple?(i!==t.selected&&(t.selected?this._selectionModel.select(t):this._selectionModel.deselect(t)),e&&this._keyManager.setActiveItem(t),this.multiple&&(this._sortValues(),e&&this.focus())):(t.deselect(),this._selectionModel.clear(),null!=this.value&&this._propagateChanges(t.value)),i!==this._selectionModel.isSelected(t)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){const t=this.options.toArray();this._selectionModel.sort((e,i)=>this.sortComparator?this.sortComparator(e,i,t):t.indexOf(e)-t.indexOf(i)),this.stateChanges.next()}}_propagateChanges(t){let e=null;e=this.multiple?this.selected.map(t=>t.value):this.selected?this.selected.value:t,this._value=e,this.valueChange.emit(e),this._onChange(e),this.selectionChange.emit(new Q(this,e)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){this._keyManager&&(this.empty?this._keyManager.setFirstItemActive():this._keyManager.setActiveItem(this._selectionModel.selected[0]))}_scrollActiveOptionIntoView(){const t=this._keyManager.activeItemIndex||0,e=Object(o.y)(t,this.options,this.optionGroups),i=this._getItemHeight();this.panel.nativeElement.scrollTop=Object(o.z)((t+e)*i,i,this.panel.nativeElement.scrollTop,256)}focus(t){this._elementRef.nativeElement.focus(t)}_getOptionIndex(t){return this.options.reduce((e,i,n)=>void 0!==e?e:t===i?n:void 0,void 0)}_calculateOverlayPosition(){const t=this._getItemHeight(),e=this._getItemCount(),i=Math.min(e*t,256),n=e*t-i;let a=this.empty?0:this._getOptionIndex(this._selectionModel.selected[0]);a+=Object(o.y)(a,this.options,this.optionGroups);const s=i/2;this._scrollTop=this._calculateOverlayScroll(a,s,n),this._offsetY=this._calculateOverlayOffsetY(a,s,n),this._checkOverlayWithinViewport(n)}_calculateOverlayScroll(t,e,i){const n=this._getItemHeight();return Math.min(Math.max(0,n*t-e+n/2),i)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;const t=this._getLabelId();return this.ariaLabelledby?t+" "+this.ariaLabelledby:t}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getLabelId(){var t;return(null===(t=this._parentFormField)||void 0===t?void 0:t.getLabelId())||""}_calculateOverlayOffsetX(){const t=this.overlayDir.overlayRef.overlayElement.getBoundingClientRect(),e=this._viewportRuler.getViewportSize(),i=this._isRtl(),n=this.multiple?56:32;let a;if(this.multiple)a=40;else{let t=this._selectionModel.selected[0]||this.options.first;a=t&&t.group?32:16}i||(a*=-1);const s=0-(t.left+a-(i?n:0)),o=t.right+a-e.width+(i?0:n);s>0?a+=s+8:o>0&&(a-=o+8),this.overlayDir.offsetX=Math.round(a),this.overlayDir.overlayRef.updatePosition()}_calculateOverlayOffsetY(t,e,i){const n=this._getItemHeight(),a=(n-this._triggerRect.height)/2,s=Math.floor(256/n);let o;return this._disableOptionCentering?0:(o=0===this._scrollTop?t*n:this._scrollTop===i?(t-(this._getItemCount()-s))*n+(n-(this._getItemCount()*n-256)%n):e-n/2,Math.round(-1*o-a))}_checkOverlayWithinViewport(t){const e=this._getItemHeight(),i=this._viewportRuler.getViewportSize(),n=this._triggerRect.top-8,a=i.height-this._triggerRect.bottom-8,s=Math.abs(this._offsetY),o=Math.min(this._getItemCount()*e,256)-s-this._triggerRect.height;o>a?this._adjustPanelUp(o,a):s>n?this._adjustPanelDown(s,n,t):this._transformOrigin=this._getOriginBasedOnOption()}_adjustPanelUp(t,e){const i=Math.round(t-e);this._scrollTop-=i,this._offsetY-=i,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop<=0&&(this._scrollTop=0,this._offsetY=0,this._transformOrigin="50% bottom 0px")}_adjustPanelDown(t,e,i){const n=Math.round(t-e);if(this._scrollTop+=n,this._offsetY+=n,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop>=i)return this._scrollTop=i,this._offsetY=0,void(this._transformOrigin="50% top 0px")}_getOriginBasedOnOption(){const t=this._getItemHeight(),e=(t-this._triggerRect.height)/2;return`50% ${Math.abs(this._offsetY)-e+t/2}px 0px`}_getItemCount(){return this.options.length+this.optionGroups.length}_getItemHeight(){return 3*this._triggerFontSize}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;let t=this._getLabelId()+" "+this._valueId;return this.ariaLabelledby&&(t+=" "+this.ariaLabelledby),t}setDescribedByIds(t){this._ariaDescribedby=t.join(" ")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this._panelOpen||!this.empty}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(c.h),s.Qb(s.h),s.Qb(s.C),s.Qb(o.d),s.Qb(s.l),s.Qb(D.c,8),s.Qb(w.w,8),s.Qb(w.m,8),s.Qb(r.a,8),s.Qb(w.t,10),s.bc("tabindex"),s.Qb(E),s.Qb(l.k),s.Qb(F,8))},t.\u0275cmp=s.Kb({type:t,selectors:[["mat-select"]],contentQueries:function(t,e,i){var n;1&t&&(s.Jb(i,B,!0),s.Jb(i,o.p,!0),s.Jb(i,o.h,!0)),2&t&&(s.yc(n=s.ec())&&(e.customTrigger=n.first),s.yc(n=s.ec())&&(e.options=n),s.yc(n=s.ec())&&(e.optionGroups=n))},viewQuery:function(t,e){var i;1&t&&(s.Xc(M,!0),s.Xc(k,!0),s.Xc(n.a,!0)),2&t&&(s.yc(i=s.ec())&&(e.trigger=i.first),s.yc(i=s.ec())&&(e.panel=i.first),s.yc(i=s.ec())&&(e.overlayDir=i.first))},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","true",1,"mat-select"],hostVars:20,hostBindings:function(t,e){1&t&&s.dc("keydown",(function(t){return e._handleKeydown(t)}))("focus",(function(){return e._onFocus()}))("blur",(function(){return e._onBlur()})),2&t&&(s.Eb("id",e.id)("tabindex",e.tabIndex)("aria-controls",e.panelOpen?e.id+"-panel":null)("aria-expanded",e.panelOpen)("aria-label",e.ariaLabel||null)("aria-required",e.required.toString())("aria-disabled",e.disabled.toString())("aria-invalid",e.errorState)("aria-describedby",e._ariaDescribedby||null)("aria-activedescendant",e._getAriaActiveDescendant()),s.Ib("mat-select-disabled",e.disabled)("mat-select-invalid",e.errorState)("mat-select-required",e.required)("mat-select-empty",e.empty)("mat-select-multiple",e.multiple))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex",ariaLabel:["aria-label","ariaLabel"],id:"id",disableOptionCentering:"disableOptionCentering",typeaheadDebounceInterval:"typeaheadDebounceInterval",placeholder:"placeholder",required:"required",multiple:"multiple",compareWith:"compareWith",value:"value",panelClass:"panelClass",ariaLabelledby:["aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",sortComparator:"sortComparator"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],features:[s.Cb([{provide:r.d,useExisting:t},{provide:o.i,useExisting:t}]),s.Ab,s.Bb],ngContentSelectors:A,decls:9,vars:10,consts:[["cdk-overlay-origin","",1,"mat-select-trigger",3,"click"],["origin","cdkOverlayOrigin","trigger",""],[1,"mat-select-value",3,"ngSwitch"],["class","mat-select-placeholder",4,"ngSwitchCase"],["class","mat-select-value-text",3,"ngSwitch",4,"ngSwitchCase"],[1,"mat-select-arrow-wrapper"],[1,"mat-select-arrow"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayMinWidth","cdkConnectedOverlayOffsetY","backdropClick","attach","detach"],[1,"mat-select-placeholder"],[1,"mat-select-value-text",3,"ngSwitch"],[4,"ngSwitchDefault"],[4,"ngSwitchCase"],[1,"mat-select-panel-wrap"],["role","listbox","tabindex","-1",3,"ngClass","keydown"],["panel",""]],template:function(t,e){if(1&t&&(s.nc(j),s.Wb(0,"div",0,1),s.dc("click",(function(){return e.toggle()})),s.Wb(3,"div",2),s.Oc(4,S,2,1,"span",3),s.Oc(5,V,3,2,"span",4),s.Vb(),s.Wb(6,"div",5),s.Rb(7,"div",6),s.Vb(),s.Vb(),s.Oc(8,R,4,14,"ng-template",7),s.dc("backdropClick",(function(){return e.close()}))("attach",(function(){return e._onAttached()}))("detach",(function(){return e.close()}))),2&t){const t=s.zc(1);s.Db(3),s.oc("ngSwitch",e.empty),s.Eb("id",e._valueId),s.Db(1),s.oc("ngSwitchCase",!0),s.Db(1),s.oc("ngSwitchCase",!1),s.Db(3),s.oc("cdkConnectedOverlayScrollStrategy",e._scrollStrategy)("cdkConnectedOverlayOrigin",t)("cdkConnectedOverlayOpen",e.panelOpen)("cdkConnectedOverlayPositions",e._positions)("cdkConnectedOverlayMinWidth",null==e._triggerRect?null:e._triggerRect.width)("cdkConnectedOverlayOffsetY",e._offsetY)}},directives:[n.b,a.x,a.y,n.a,a.z,a.q],styles:[".mat-select{display:inline-block;width:100%;outline:none}.mat-select-trigger{display:inline-table;cursor:pointer;position:relative;box-sizing:border-box}.mat-select-disabled .mat-select-trigger{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-select-value{display:table-cell;max-width:0;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-select-arrow-wrapper{display:table-cell;vertical-align:middle}.mat-form-field-appearance-fill .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-outline .mat-select-arrow-wrapper{transform:translateY(-25%)}.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:none}.mat-select-arrow{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;margin:0 4px}.mat-select-panel-wrap{flex-basis:100%}.mat-select-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;padding-top:0;padding-bottom:0;max-height:256px;min-width:100%;border-radius:4px}.cdk-high-contrast-active .mat-select-panel{outline:solid 1px}.mat-select-panel .mat-optgroup-label,.mat-select-panel .mat-option{font-size:inherit;line-height:3em;height:3em}.mat-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-form-field-flex{cursor:pointer}.mat-form-field-type-mat-select .mat-form-field-label{width:calc(100% - 18px)}.mat-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable .mat-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-select-placeholder{color:transparent;-webkit-text-fill-color:transparent;transition:none;display:block}\n"],encapsulation:2,data:{animation:[W.transformPanelWrap,W.transformPanel]},changeDetection:0}),t})(),H=(()=>{class t{}return t.\u0275mod=s.Ob({type:t}),t.\u0275inj=s.Nb({factory:function(e){return new(e||t)},providers:[L],imports:[[a.c,n.f,o.q,o.k],c.c,r.e,o.q,o.k]}),t})()},dNgK:function(t,e,i){"use strict";i.d(e,"a",(function(){return g})),i.d(e,"b",(function(){return M})),i.d(e,"c",(function(){return O})),i.d(e,"d",(function(){return D}));var n=i("rDax"),a=i("+rOU"),s=i("ofXK"),o=i("fXoL"),r=i("FKr1"),c=i("bTqV"),l=i("XNiG"),d=i("IzEk"),h=i("1G5W"),u=i("R0Ic"),p=i("u47x"),b=i("0MNC");function f(t,e){if(1&t){const t=o.Xb();o.Wb(0,"div",1),o.Wb(1,"button",2),o.dc("click",(function(){return o.Dc(t),o.hc().action()})),o.Qc(2),o.Vb(),o.Vb()}if(2&t){const t=o.hc();o.Db(2),o.Rc(t.data.action)}}function m(t,e){}const g=new o.s("MatSnackBarData");class v{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}const _=Math.pow(2,31)-1;class y{constructor(t,e){this._overlayRef=e,this._afterDismissed=new l.a,this._afterOpened=new l.a,this._onAction=new l.a,this._dismissedByAction=!1,this.containerInstance=t,this.onAction().subscribe(()=>this.dismiss()),t._onExit.subscribe(()=>this._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete())}closeWithAction(){this.dismissWithAction()}_dismissAfter(t){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(t,_))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}}let x=(()=>{class t{constructor(t,e){this.snackBarRef=t,this.data=e}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(y),o.Qb(g))},t.\u0275cmp=o.Kb({type:t,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-simple-snackbar"],decls:3,vars:2,consts:[["class","mat-simple-snackbar-action",4,"ngIf"],[1,"mat-simple-snackbar-action"],["mat-button","",3,"click"]],template:function(t,e){1&t&&(o.Wb(0,"span"),o.Qc(1),o.Vb(),o.Oc(2,f,3,1,"div",0)),2&t&&(o.Db(1),o.Rc(e.data.message),o.Db(1),o.oc("ngIf",e.hasAction))},directives:[s.t,c.b],styles:[".mat-simple-snackbar{display:flex;justify-content:space-between;align-items:center;line-height:20px;opacity:1}.mat-simple-snackbar-action{flex-shrink:0;margin:-8px -8px -8px 8px}.mat-simple-snackbar-action button{max-height:36px;min-width:0}[dir=rtl] .mat-simple-snackbar-action{margin-left:-8px;margin-right:8px}\n"],encapsulation:2,changeDetection:0}),t})();const C={snackBarState:Object(u.n)("state",[Object(u.k)("void, hidden",Object(u.l)({transform:"scale(0.8)",opacity:0})),Object(u.k)("visible",Object(u.l)({transform:"scale(1)",opacity:1})),Object(u.m)("* => visible",Object(u.e)("150ms cubic-bezier(0, 0, 0.2, 1)")),Object(u.m)("* => void, * => hidden",Object(u.e)("75ms cubic-bezier(0.4, 0.0, 1, 1)",Object(u.l)({opacity:0})))])};let O=(()=>{class t extends a.a{constructor(t,e,i,n){super(),this._ngZone=t,this._elementRef=e,this._changeDetectorRef=i,this.snackBarConfig=n,this._destroyed=!1,this._onExit=new l.a,this._onEnter=new l.a,this._animationState="void",this.attachDomPortal=t=>(this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachDomPortal(t)),this._role="assertive"!==n.politeness||n.announcementMessage?"off"===n.politeness?null:"status":"alert"}attachComponentPortal(t){return this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachComponentPortal(t)}attachTemplatePortal(t){return this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachTemplatePortal(t)}onAnimationEnd(t){const{fromState:e,toState:i}=t;if(("void"===i&&"void"!==e||"hidden"===i)&&this._completeExit(),"visible"===i){const t=this._onEnter;this._ngZone.run(()=>{t.next(),t.complete()})}}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.detectChanges())}exit(){return this._animationState="hidden",this._elementRef.nativeElement.setAttribute("mat-exit",""),this._onExit}ngOnDestroy(){this._destroyed=!0,this._completeExit()}_completeExit(){this._ngZone.onMicrotaskEmpty.pipe(Object(d.a)(1)).subscribe(()=>{this._onExit.next(),this._onExit.complete()})}_applySnackBarClasses(){const t=this._elementRef.nativeElement,e=this.snackBarConfig.panelClass;e&&(Array.isArray(e)?e.forEach(e=>t.classList.add(e)):t.classList.add(e)),"center"===this.snackBarConfig.horizontalPosition&&t.classList.add("mat-snack-bar-center"),"top"===this.snackBarConfig.verticalPosition&&t.classList.add("mat-snack-bar-top")}_assertNotAttached(){this._portalOutlet.hasAttached()}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(o.C),o.Qb(o.l),o.Qb(o.h),o.Qb(v))},t.\u0275cmp=o.Kb({type:t,selectors:[["snack-bar-container"]],viewQuery:function(t,e){var i;1&t&&o.Kc(a.c,!0),2&t&&o.yc(i=o.ec())&&(e._portalOutlet=i.first)},hostAttrs:[1,"mat-snack-bar-container"],hostVars:2,hostBindings:function(t,e){1&t&&o.Mc("@state.done",(function(t){return e.onAnimationEnd(t)})),2&t&&(o.Eb("role",e._role),o.Nc("@state",e._animationState))},features:[o.Ab],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,e){1&t&&o.Oc(0,m,0,0,"ng-template",0)},directives:[a.c],styles:[".mat-snack-bar-container{border-radius:4px;box-sizing:border-box;display:block;margin:24px;max-width:33vw;min-width:344px;padding:14px 16px;min-height:48px;transform-origin:center}.cdk-high-contrast-active .mat-snack-bar-container{border:solid 1px}.mat-snack-bar-handset{width:100%}.mat-snack-bar-handset .mat-snack-bar-container{margin:8px;max-width:100%;min-width:0;width:100%}\n"],encapsulation:2,data:{animation:[C.snackBarState]}}),t})(),D=(()=>{class t{}return t.\u0275mod=o.Ob({type:t}),t.\u0275inj=o.Nb({factory:function(e){return new(e||t)},imports:[[n.f,a.h,s.c,c.c,r.k],r.k]}),t})();const w=new o.s("mat-snack-bar-default-options",{providedIn:"root",factory:function(){return new v}});let M=(()=>{class t{constructor(t,e,i,n,a,s){this._overlay=t,this._live=e,this._injector=i,this._breakpointObserver=n,this._parentSnackBar=a,this._defaultConfig=s,this._snackBarRefAtThisLevel=null,this.simpleSnackBarComponent=x,this.snackBarContainerComponent=O,this.handsetCssClass="mat-snack-bar-handset"}get _openedSnackBarRef(){const t=this._parentSnackBar;return t?t._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(t){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=t:this._snackBarRefAtThisLevel=t}openFromComponent(t,e){return this._attach(t,e)}openFromTemplate(t,e){return this._attach(t,e)}open(t,e="",i){const n=Object.assign(Object.assign({},this._defaultConfig),i);return n.data={message:t,action:e},n.announcementMessage===t&&(n.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,n)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(t,e){const i=o.t.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:v,useValue:e}]}),n=new a.d(this.snackBarContainerComponent,e.viewContainerRef,i),s=t.attach(n);return s.instance.snackBarConfig=e,s.instance}_attach(t,e){const i=Object.assign(Object.assign(Object.assign({},new v),this._defaultConfig),e),n=this._createOverlay(i),s=this._attachSnackBarContainer(n,i),r=new y(s,n);if(t instanceof o.P){const e=new a.i(t,null,{$implicit:i.data,snackBarRef:r});r.instance=s.attachTemplatePortal(e)}else{const e=this._createInjector(i,r),n=new a.d(t,void 0,e),o=s.attachComponentPortal(n);r.instance=o.instance}return this._breakpointObserver.observe(b.b.HandsetPortrait).pipe(Object(h.a)(n.detachments())).subscribe(t=>{const e=n.overlayElement.classList;t.matches?e.add(this.handsetCssClass):e.remove(this.handsetCssClass)}),this._animateSnackBar(r,i),this._openedSnackBarRef=r,this._openedSnackBarRef}_animateSnackBar(t,e){t.afterDismissed().subscribe(()=>{this._openedSnackBarRef==t&&(this._openedSnackBarRef=null),e.announcementMessage&&this._live.clear()}),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{t.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):t.containerInstance.enter(),e.duration&&e.duration>0&&t.afterOpened().subscribe(()=>t._dismissAfter(e.duration)),e.announcementMessage&&this._live.announce(e.announcementMessage,e.politeness)}_createOverlay(t){const e=new n.d;e.direction=t.direction;let i=this._overlay.position().global();const a="rtl"===t.direction,s="left"===t.horizontalPosition||"start"===t.horizontalPosition&&!a||"end"===t.horizontalPosition&&a,o=!s&&"center"!==t.horizontalPosition;return s?i.left("0"):o?i.right("0"):i.centerHorizontally(),"top"===t.verticalPosition?i.top("0"):i.bottom("0"),e.positionStrategy=i,this._overlay.create(e)}_createInjector(t,e){return o.t.create({parent:t&&t.viewContainerRef&&t.viewContainerRef.injector||this._injector,providers:[{provide:y,useValue:e},{provide:g,useValue:t.data}]})}}return t.\u0275fac=function(e){return new(e||t)(o.ac(n.c),o.ac(p.k),o.ac(o.t),o.ac(b.a),o.ac(t,12),o.ac(w))},t.\u0275prov=Object(o.Mb)({factory:function(){return new t(Object(o.ac)(n.c),Object(o.ac)(p.k),Object(o.ac)(o.p),Object(o.ac)(b.a),Object(o.ac)(t,12),Object(o.ac)(w))},token:t,providedIn:D}),t})()},eIep:function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var n=i("lJxs"),a=i("Cfvw"),s=i("zx2A");function o(t,e){return"function"==typeof e?i=>i.pipe(o((i,s)=>Object(a.a)(t(i,s)).pipe(Object(n.a)((t,n)=>e(i,t,s,n))))):e=>e.lift(new r(t))}class r{constructor(t){this.project=t}call(t,e){return e.subscribe(new c(t,this.project))}}class c extends s.b{constructor(t,e){super(t),this.project=e,this.index=0}_next(t){let e;const i=this.index++;try{e=this.project(t,i)}catch(n){return void this.destination.error(n)}this._innerSub(e)}_innerSub(t){const e=this.innerSubscription;e&&e.unsubscribe();const i=new s.a(this),n=this.destination;n.add(i),this.innerSubscription=Object(s.c)(t,i),this.innerSubscription!==i&&n.add(this.innerSubscription)}_complete(){const{innerSubscription:t}=this;t&&!t.closed||super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(t){this.destination.next(t)}}},eNwd:function(t,e,i){"use strict";i.d(e,"a",(function(){return r}));var n=i("3N8a");class a extends n.a{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,i=0){return null!==i&&i>0?super.requestAsyncId(t,e,i):(t.actions.push(this),t.scheduled||(t.scheduled=requestAnimationFrame(()=>t.flush(null))))}recycleAsyncId(t,e,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(t,e,i);0===t.actions.length&&(cancelAnimationFrame(e),t.scheduled=void 0)}}var s=i("IjjT");class o extends s.a{flush(t){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let i,n=-1,a=e.length;t=t||e.shift();do{if(i=t.execute(t.state,t.delay))break}while(++n<a&&(t=e.shift()));if(this.active=!1,i){for(;++n<a&&(t=e.shift());)t.unsubscribe();throw i}}}const r=new o(a)},eiH7:function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var n=i("fXoL"),a=i("sYmb"),s=i("4zkx");let o=(()=>{class t{constructor(t,e){this.translate=t,this.headerService=e,this.administrations=[{id:"admin_users",label:"lang.users",comment:"lang.adminUsersDesc",route:"/administration/users",unit:"organisation",style:"fa fa-user",angular:!0,hasParams:!0},{id:"admin_groups",label:"lang.groups",comment:"lang.adminGroupsDesc",route:"/administration/groups",unit:"organisation",style:"fa fa-users",angular:!0,hasParams:!1},{id:"manage_entities",label:"lang.entities",comment:"lang.adminEntitiesDesc",route:"/administration/entities",unit:"organisation",style:"fa fa-sitemap",angular:!0,hasParams:!1},{id:"admin_listmodels",label:"lang.workflowModels",comment:"lang.adminWorkflowModelsDesc",route:"/administration/diffusionModels",unit:"organisation",style:"fa fa-th-list",angular:!0,hasParams:!1},{id:"admin_architecture",label:"lang.documentTypes",comment:"lang.adminDocumentTypesDesc",route:"/administration/doctypes",unit:"classement",style:"fa fa-suitcase",angular:!0,hasParams:!1},{id:"admin_tag",label:"lang.tags",comment:"lang.adminTagsDesc",route:"/administration/tags",unit:"classement",style:"fa fa-tags",angular:!0,hasParams:!1},{id:"admin_baskets",label:"lang.baskets",comment:"lang.adminBasketsDesc",route:"/administration/baskets",unit:"production",style:"fa fa-inbox",angular:!0,hasParams:!1},{id:"admin_status",label:"lang.statuses",comment:"lang.statusesAdmin",route:"/administration/statuses",unit:"production",style:"fa fa-check-circle",angular:!0,hasParams:!1},{id:"admin_actions",label:"lang.actions",comment:"lang.actionsAdmin",route:"/administration/actions",unit:"production",style:"fa fa-exchange-alt",angular:!0,hasParams:!1},{id:"admin_contacts",label:"lang.contacts",comment:"lang.contactsAdmin",route:"/administration/contacts",unit:"production",style:"fa fa-address-book",angular:!0,hasParams:!1},{id:"admin_priorities",label:"lang.priorities",comment:"lang.priorities",route:"/administration/priorities",unit:"production",style:"fa fa-clock",angular:!0,hasParams:!1},{id:"admin_templates",label:"lang.templates",comment:"lang.templatesAdmin",route:"/administration/templates",unit:"production",style:"fa fa-file-alt",angular:!0,hasParams:!1},{id:"admin_indexing_models",label:"lang.indexingModels",comment:"lang.indexingModels",route:"/administration/indexingModels",unit:"production",style:"fab fa-wpforms",angular:!0,hasParams:!1},{id:"admin_custom_fields",label:"lang.customFieldsAdmin",comment:"lang.customFieldsAdmin",route:"/administration/customFields",unit:"production",style:"fa fa-code",angular:!0,hasParams:!1},{id:"admin_notif",label:"lang.notifications",comment:"lang.notificationsAdmin",route:"/administration/notifications",unit:"production",style:"fa fa-bell",angular:!0,hasParams:!1},{id:"update_status_mail",label:"lang.updateStatus",comment:"lang.updateStatus",route:"/administration/update-status",unit:"supervision",style:"fa fa-envelope-square",angular:!0,hasParams:!1},{id:"admin_docservers",label:"lang.docservers",comment:"lang.docserversAdmin",route:"/administration/docservers",unit:"supervision",style:"fa fa-hdd",angular:!0,hasParams:!1},{id:"admin_parameters",label:"lang.parameters",comment:"lang.parameters",route:"/administration/parameters",unit:"supervision",style:"fa fa-wrench",angular:!0,hasParams:!1},{id:"admin_password_rules",label:"lang.securities",comment:"lang.securities",route:"/administration/securities",unit:"supervision",style:"fa fa-lock",angular:!0,hasParams:!1},{id:"admin_email_server",label:"lang.emailServerParam",comment:"lang.emailServerParamDesc",route:"/administration/sendmail",unit:"supervision",style:"fa fa-mail-bulk",angular:!0,hasParams:!1},{id:"admin_shippings",label:"lang.mailevaAdmin",comment:"lang.mailevaAdminDesc",route:"/administration/shippings",unit:"supervision",style:"fa fa-shipping-fast",angular:!0,hasParams:!1},{id:"view_history",label:"lang.history",comment:"lang.viewHistoryDesc",route:"/administration/history",unit:"supervision",style:"fa fa-history",angular:!0,hasParams:!1},{id:"view_history_batch",label:"lang.historyBatch",comment:"lang.historyBatchAdmin",route:"/administration/history-batch",unit:"supervision",style:"fa fa-history",angular:!0,hasParams:!1},{id:"admin_update_control",label:"lang.updateControl",comment:"lang.updateControlDesc",route:"/administration/versions-update",unit:"supervision",style:"fa fa-sync",angular:!0,hasParams:!1},{id:"admin_alfresco",label:"lang.alfresco",comment:"lang.adminAlfrescoDesc",route:"/administration/alfresco",unit:"supervision",style:"alfresco",angular:!0,hasParams:!1},{id:"admin_registered_mail",label:"lang.registeredMails",comment:"lang.adminRegisteredMailDesc",route:"/administration/registeredMails",unit:"supervision",style:"fas fa-dolly-flatbed",angular:!0,hasParams:!1},{id:"admin_search",label:"lang.search",comment:"lang.searchAdministration",route:"/administration/search",unit:"supervision",style:"fas fa-search",angular:!0,hasParams:!1},{id:"admin_connections",label:"lang.connections",comment:"lang.connectionsDesc",route:"/administration/connections/sso",unit:"supervision",style:"fas fa-plug",angular:!0,hasParams:!1}],this.privileges=[{id:"view_doc_history",label:"lang.viewDocHistory",comment:"lang.viewHistoryDesc",unit:"history"},{id:"view_full_history",label:"lang.viewFullHistory",comment:"lang.viewFullHistoryDesc",unit:"history"},{id:"edit_resource",label:"lang.editResource",comment:"lang.editResourceDesc",unit:"application"},{id:"add_links",label:"lang.addLinks",comment:"lang.addLinks",unit:"application"},{id:"manage_tags_application",label:"lang.manageTagsInApplication",comment:"lang.manageTagsInApplicationDesc",unit:"application"},{id:"create_contacts",label:"lang.manageCreateContacts",comment:"lang.manageCreateContactsDesc",unit:"application"},{id:"update_contacts",label:"lang.manageUpdateContacts",comment:"lang.manageUpdateContactsDesc",unit:"application"},{id:"update_diffusion_indexing",label:"lang.allRoles",comment:"lang.updateDiffusionWhileIndexing",unit:"diffusionList"},{id:"update_diffusion_except_recipient_indexing",label:"lang.rolesExceptAssignee",comment:"lang.updateDiffusionExceptRecipientWhileIndexing",unit:"diffusionList"},{id:"update_diffusion_process",label:"lang.allRoles",comment:"lang.updateDiffusionWhileProcess",unit:"diffusionList"},{id:"update_diffusion_except_recipient_process",label:"lang.rolesExceptAssignee",comment:"lang.updateDiffusionExceptRecipientWhileProcess",unit:"diffusionList"},{id:"update_diffusion_details",label:"lang.allRoles",comment:"lang.updateDiffusionWhileDetails",unit:"diffusionList"},{id:"update_diffusion_except_recipient_details",label:"lang.rolesExceptAssignee",comment:"lang.updateDiffusionExceptRecipientWhileDetails",unit:"diffusionList"},{id:"sendmail",label:"lang.sendmail",comment:"lang.sendmail",unit:"sendmail"},{id:"use_mail_services",label:"lang.useMailServices",comment:"lang.useMailServices",unit:"sendmail"},{id:"view_documents_with_notes",label:"lang.viewDocumentsWithNotes",comment:"lang.viewDocumentsWithNotesDesc",unit:"application"},{id:"view_technical_infos",label:"lang.showTechnicalInformations",comment:"lang.showTechnicalInformations",unit:"application"},{id:"config_avis_workflow",label:"lang.configAvisWorkflow",comment:"lang.configAvisWorkflowDesc",unit:"avis"},{id:"config_avis_workflow_in_detail",label:"lang.configAvisWorkflowInDetail",comment:"lang.configAvisWorkflowInDetailDesc",unit:"avis"},{id:"avis_documents",label:"lang.avisAnswer",comment:"lang.avisAnswerDesc",unit:"avis"},{id:"config_visa_workflow",label:"lang.configVisaWorkflow",comment:"lang.configVisaWorkflowDesc",unit:"visaWorkflow"},{id:"config_visa_workflow_in_detail",label:"lang.configVisaWorkflowInDetail",comment:"lang.configVisaWorkflowInDetailDesc",unit:"visaWorkflow"},{id:"visa_documents",label:"lang.visaAnswers",comment:"lang.visaAnswersDesc",unit:"visaWorkflow"},{id:"sign_document",label:"lang.signDocs",comment:"lang.signDocs",unit:"visaWorkflow"},{id:"modify_visa_in_signatureBook",label:"lang.modifyVisaInSignatureBook",comment:"lang.modifyVisaInSignatureBookDesc",unit:"visaWorkflow"},{id:"print_folder_doc",label:"lang.printFolderDoc",comment:"lang.printFolderDoc",unit:"application"},{id:"manage_attachments",label:"lang.manageAttachments",comment:"lang.manageAttachments",unit:"application"},{id:"view_personal_data",label:"lang.viewPersonalData",comment:"lang.viewPersonalData",unit:"confidentialityAndSecurity"},{id:"manage_personal_data",label:"lang.managePersonalData",comment:"lang.managePersonalData",unit:"confidentialityAndSecurity"},{id:"include_folders_and_followed_resources_perimeter",label:"lang.includeFolderPerimeter",comment:"lang.includeFolderPerimeter",unit:"application"},{id:"set_binding_document",label:"lang.setBindingDocument",comment:"lang.setBindingDocument",unit:"lifeCycle"},{id:"freeze_retention_rule",label:"lang.freezeRetentionRule",comment:"lang.freezeRetentionRule",unit:"lifeCycle"}],this.menus=[{id:"admin",label:"lang.administration",comment:"lang.administration",route:"/administration",style:"fa fa-cogs",unit:"application",angular:!0,shortcut:!0},{id:"adv_search_mlb",label:"lang.search",comment:"lang.search",route:"/search",style:"fa fa-search",unit:"application",angular:!0,shortcut:!0},{id:"entities_print_sep_mlb",label:"lang.entitiesSeparator",comment:"lang.entitiesSeparator",route:"/separators/print",style:"fa fa-print",unit:"entities",angular:!0,shortcut:!1},{id:"manage_numeric_package",label:"lang.manageNumericPackage",comment:"lang.manageNumericPackage",route:"/saveNumericPackage",style:"fa fa-file-archive",unit:"sendmail",angular:!0,shortcut:!1},{id:"registered_mail_receive_ar",label:"lang.arReception",comment:"lang.arReception",route:"/registeredMail/acknowledgement",style:"fa fa-barcode",unit:"registeredMails",angular:!0,shortcut:!1},{id:"registered_mail_mass_import",label:"lang.importRegisteredMails",comment:"lang.importRegisteredMails",route:"RegisteredMailImportComponent__modal",style:"fas fa-dolly-flatbed",unit:"registeredMails",angular:!0,shortcut:!1},{id:"create_custom",label:"lang.installNewCustom",comment:"lang.installNewCustom",route:"/install",style:"far fa-window-restore",unit:"application",angular:!0,shortcut:!1}],this.shortcuts=[{id:"followed",label:"lang.followedMail",comment:"lang.followedMail",route:"/followed",style:"fas fa-star",unit:"application",angular:!0,shortcut:!0}]}getAllPrivileges(t,e="standard"){let i=[];return i=i.concat(this.privileges.map(t=>t.id)),i=i.concat(this.administrations.map(t=>t.id)),i=i.concat(this.menus.map(t=>t.id)),i=i.filter(i=>-1===this.getExcludePrivilege(t,e).indexOf(i)),i}getPrivileges(t=null){return null!==t?this.privileges.filter(e=>t.indexOf(e.id)>-1):this.privileges}getUnitsPrivileges(){return this.privileges.map(t=>t.unit).filter((t,e,i)=>i.indexOf(t)===e)}getPrivilegesByUnit(t){return this.privileges.filter(e=>e.unit===t)}getMenus(){return this.menus}getCurrentUserMenus(){let t=this.menus.filter(t=>this.headerService.user.privileges.indexOf(t.id)>-1);if(this.headerService.user.groups.filter(t=>!0===t.can_index).length>0){const e=[];this.headerService.user.groups.filter(t=>!0===t.can_index).forEach(t=>{e.push({id:t.id,label:t.group_desc})}),t.push({id:"indexing",label:"lang.recordMail",comment:"lang.recordMail",route:"/indexing/"+e[0].id,style:"fa fa-file-medical",unit:"application",angular:!0,shortcut:!0,groups:e})}return t}getMenusByUnit(t){return this.menus.filter(e=>e.unit===t)}getUnitsMenus(){return this.menus.map(t=>t.unit).filter((t,e,i)=>i.indexOf(t)===e)}resfreshUserShortcuts(){if(this.shortcuts=[{id:"followed",label:"lang.followedMail",comment:"lang.followedMail",route:"/followed",style:"fas fa-star",unit:"application",angular:!0,shortcut:!0}],this.shortcuts=this.shortcuts.concat(this.menus.filter(t=>!0===t.shortcut).filter(t=>this.headerService.user.privileges.indexOf(t.id)>-1)),this.headerService.user.groups.filter(t=>!0===t.can_index).length>0){const t=[];this.headerService.user.groups.filter(t=>!0===t.can_index).forEach(e=>{t.push({id:e.id,label:e.group_desc})}),this.shortcuts.push({id:"indexing",label:"lang.recordMail",comment:"lang.recordMail",route:"/indexing",style:"fa fa-file-medical",unit:"application",angular:!0,shortcut:!0,groups:t})}}getAdministrations(){return this.administrations}getCurrentUserAdministrationsByUnit(t){return this.hasCurrentUserPrivilege("view_history")&&this.hasCurrentUserPrivilege("view_history_batch")?this.administrations.filter(e=>e.unit===t).filter(t=>this.headerService.user.privileges.indexOf(t.id)>-1).filter(t=>"view_history_batch"!==t.id):this.administrations.filter(e=>e.unit===t).filter(t=>this.headerService.user.privileges.indexOf(t.id)>-1)}hasCurrentUserPrivilege(t){return this.headerService.user.privileges.indexOf(t)>-1}getExcludePrivilege(t,e){let i=[];return t||(i=["create_custom","admin_update_control"]),"standard"!==e&&i.push("admin_password_rules"),i}}return t.\u0275fac=function(e){return new(e||t)(n.ac(a.e),n.ac(s.a))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})()},f0Cb:function(t,e,i){"use strict";i.d(e,"a",(function(){return o})),i.d(e,"b",(function(){return r}));var n=i("8LU1"),a=i("FKr1"),s=i("fXoL");let o=(()=>{class t{constructor(){this._vertical=!1,this._inset=!1}get vertical(){return this._vertical}set vertical(t){this._vertical=Object(n.c)(t)}get inset(){return this._inset}set inset(t){this._inset=Object(n.c)(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=s.Kb({type:t,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(t,e){2&t&&(s.Eb("aria-orientation",e.vertical?"vertical":"horizontal"),s.Ib("mat-divider-vertical",e.vertical)("mat-divider-horizontal",!e.vertical)("mat-divider-inset",e.inset))},inputs:{vertical:"vertical",inset:"inset"},decls:0,vars:0,template:function(t,e){},styles:[".mat-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mat-divider.mat-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mat-divider.mat-divider-inset{margin-left:80px}[dir=rtl] .mat-divider.mat-divider-inset{margin-left:auto;margin-right:80px}\n"],encapsulation:2,changeDetection:0}),t})(),r=(()=>{class t{}return t.\u0275mod=s.Ob({type:t}),t.\u0275inj=s.Nb({factory:function(e){return new(e||t)},imports:[[a.k],a.k]}),t})()},fXoL:function(t,e,i){"use strict";i.d(e,"a",(function(){return Is})),i.d(e,"b",(function(){return sl})),i.d(e,"c",(function(){return tl})),i.d(e,"d",(function(){return Jc})),i.d(e,"e",(function(){return Zc})),i.d(e,"f",(function(){return Yl})),i.d(e,"g",(function(){return Ll})),i.d(e,"h",(function(){return hs})),i.d(e,"i",(function(){return ml})),i.d(e,"j",(function(){return Sr})),i.d(e,"k",(function(){return cl})),i.d(e,"l",(function(){return Ir})),i.d(e,"m",(function(){return Gl})),i.d(e,"n",(function(){return Ri})),i.d(e,"o",(function(){return Mc})),i.d(e,"p",(function(){return X})),i.d(e,"q",(function(){return u})),i.d(e,"r",(function(){return m})),i.d(e,"s",(function(){return G})),i.d(e,"t",(function(){return Ss})),i.d(e,"u",(function(){return Kc})),i.d(e,"v",(function(){return Xr})),i.d(e,"w",(function(){return qr})),i.d(e,"x",(function(){return rl})),i.d(e,"y",(function(){return lt})),i.d(e,"z",(function(){return Nl})),i.d(e,"A",(function(){return ct})),i.d(e,"B",(function(){return Al})),i.d(e,"C",(function(){return _l})),i.d(e,"D",(function(){return p})),i.d(e,"E",(function(){return Yc})),i.d(e,"F",(function(){return al})),i.d(e,"G",(function(){return nl})),i.d(e,"H",(function(){return Sc})),i.d(e,"I",(function(){return jr})),i.d(e,"J",(function(){return Vr})),i.d(e,"K",(function(){return Rr})),i.d(e,"L",(function(){return Wr})),i.d(e,"M",(function(){return xn})),i.d(e,"N",(function(){return f})),i.d(e,"O",(function(){return Ul})),i.d(e,"P",(function(){return Zr})),i.d(e,"Q",(function(){return kl})),i.d(e,"R",(function(){return ps})),i.d(e,"S",(function(){return Tr})),i.d(e,"T",(function(){return ec})),i.d(e,"U",(function(){return vt})),i.d(e,"V",(function(){return Wl})),i.d(e,"W",(function(){return Ki})),i.d(e,"X",(function(){return R})),i.d(e,"Y",(function(){return at})),i.d(e,"Z",(function(){return qi})),i.d(e,"ab",(function(){return ql})),i.d(e,"bb",(function(){return Pl})),i.d(e,"cb",(function(){return ol})),i.d(e,"db",(function(){return bs})),i.d(e,"eb",(function(){return fr})),i.d(e,"fb",(function(){return _n})),i.d(e,"gb",(function(){return en})),i.d(e,"hb",(function(){return Qi})),i.d(e,"ib",(function(){return zi})),i.d(e,"jb",(function(){return Hi})),i.d(e,"kb",(function(){return Ui})),i.d(e,"lb",(function(){return Bi})),i.d(e,"mb",(function(){return $i})),i.d(e,"nb",(function(){return hr})),i.d(e,"ob",(function(){return Xl})),i.d(e,"pb",(function(){return ur})),i.d(e,"qb",(function(){return pr})),i.d(e,"rb",(function(){return Ni})),i.d(e,"sb",(function(){return L})),i.d(e,"tb",(function(){return Qs})),i.d(e,"ub",(function(){return bo})),i.d(e,"vb",(function(){return po})),i.d(e,"wb",(function(){return dr})),i.d(e,"xb",(function(){return qt})),i.d(e,"yb",(function(){return I})),i.d(e,"zb",(function(){return Li})),i.d(e,"Ab",(function(){return Rs})),i.d(e,"Bb",(function(){return Bt})),i.d(e,"Cb",(function(){return wr})),i.d(e,"Db",(function(){return Bn})),i.d(e,"Eb",(function(){return Gs})),i.d(e,"Fb",(function(){return Fo})),i.d(e,"Gb",(function(){return nr})),i.d(e,"Hb",(function(){return ar})),i.d(e,"Ib",(function(){return Eo})),i.d(e,"Jb",(function(){return Nc})),i.d(e,"Kb",(function(){return Ct})),i.d(e,"Lb",(function(){return Pt})),i.d(e,"Mb",(function(){return _})),i.d(e,"Nb",(function(){return y})),i.d(e,"Ob",(function(){return kt})),i.d(e,"Pb",(function(){return Vt})),i.d(e,"Qb",(function(){return eo})),i.d(e,"Rb",(function(){return ro})),i.d(e,"Sb",(function(){return ho})),i.d(e,"Tb",(function(){return lo})),i.d(e,"Ub",(function(){return co})),i.d(e,"Vb",(function(){return oo})),i.d(e,"Wb",(function(){return so})),i.d(e,"Xb",(function(){return uo})),i.d(e,"Yb",(function(){return Si})),i.d(e,"Zb",(function(){return sr})),i.d(e,"ac",(function(){return nt})),i.d(e,"bc",(function(){return io})),i.d(e,"cc",(function(){return qc})),i.d(e,"dc",(function(){return fo})),i.d(e,"ec",(function(){return Uc})),i.d(e,"fc",(function(){return ze})),i.d(e,"gc",(function(){return Ne})),i.d(e,"hc",(function(){return yo})),i.d(e,"ic",(function(){return yc})),i.d(e,"jc",(function(){return xc})),i.d(e,"kc",(function(){return Cc})),i.d(e,"lc",(function(){return Oc})),i.d(e,"mc",(function(){return Oo})),i.d(e,"nc",(function(){return Co})),i.d(e,"oc",(function(){return no})),i.d(e,"pc",(function(){return Do})),i.d(e,"qc",(function(){return wo})),i.d(e,"rc",(function(){return Mo})),i.d(e,"sc",(function(){return ko})),i.d(e,"tc",(function(){return So})),i.d(e,"uc",(function(){return uc})),i.d(e,"vc",(function(){return pc})),i.d(e,"wc",(function(){return bc})),i.d(e,"xc",(function(){return fc})),i.d(e,"yc",(function(){return Ec})),i.d(e,"zc",(function(){return to})),i.d(e,"Ac",(function(){return li})),i.d(e,"Bc",(function(){return ci})),i.d(e,"Cc",(function(){return ri})),i.d(e,"Dc",(function(){return fe})),i.d(e,"Ec",(function(){return Cn})),i.d(e,"Fc",(function(){return Dn})),i.d(e,"Gc",(function(){return On})),i.d(e,"Hc",(function(){return Ot})),i.d(e,"Ic",(function(){return St})),i.d(e,"Jc",(function(){return zc})),i.d(e,"Kc",(function(){return Fc})),i.d(e,"Lc",(function(){return To})),i.d(e,"Mc",(function(){return mo})),i.d(e,"Nc",(function(){return or})),i.d(e,"Oc",(function(){return Zs})),i.d(e,"Pc",(function(){return Xc})),i.d(e,"Qc",(function(){return Ko})),i.d(e,"Rc",(function(){return Yo})),i.d(e,"Sc",(function(){return Jo})),i.d(e,"Tc",(function(){return Zo})),i.d(e,"Uc",(function(){return tr})),i.d(e,"Vc",(function(){return er})),i.d(e,"Wc",(function(){return ir})),i.d(e,"Xc",(function(){return Lc}));var n=i("XNiG"),a=i("quSY"),s=i("HDdC"),o=i("VRyK"),r=i("w1tV");function c(t){return{toString:t}.toString()}function l(t){return function(...e){if(t){const i=t(...e);for(const t in i)this[t]=i[t]}}}function d(t,e,i){return c(()=>{const n=l(e);function a(...t){if(this instanceof a)return n.apply(this,t),this;const e=new a(...t);return i.annotation=e,i;function i(t,i,n){const a=t.hasOwnProperty("__parameters__")?t.__parameters__:Object.defineProperty(t,"__parameters__",{value:[]}).__parameters__;for(;a.length<=n;)a.push(null);return(a[n]=a[n]||[]).push(e),t}}return i&&(a.prototype=Object.create(i.prototype)),a.prototype.ngMetadataName=t,a.annotationCls=a,a})}function h(t,e,i,n){return c(()=>{const a=l(e);function s(...t){if(this instanceof s)return a.apply(this,t),this;const e=new s(...t);return function(i,a){const s=i.constructor,o=s.hasOwnProperty("__prop__metadata__")?s.__prop__metadata__:Object.defineProperty(s,"__prop__metadata__",{value:{}}).__prop__metadata__;o[a]=o.hasOwnProperty(a)&&o[a]||[],o[a].unshift(e),n&&n(i,a,...t)}}return i&&(s.prototype=Object.create(i.prototype)),s.prototype.ngMetadataName=t,s.annotationCls=s,s})}const u=d("Inject",t=>({token:t})),p=d("Optional"),b=d("Self"),f=d("SkipSelf");var m=function(t){return t[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional",t}({});function g(t){for(let e in t)if(t[e]===g)return e;throw Error("Could not find renamed property on target object.")}function v(t,e){for(const i in e)e.hasOwnProperty(i)&&!t.hasOwnProperty(i)&&(t[i]=e[i])}function _(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function y(t){return{factory:t.factory,providers:t.providers||[],imports:t.imports||[]}}function x(t){return C(t,t[D])||C(t,t[k])}function C(t,e){return e&&e.token===t?e:null}function O(t){return t&&(t.hasOwnProperty(w)||t.hasOwnProperty(S))?t[w]:null}const D=g({\u0275prov:g}),w=g({\u0275inj:g}),M=g({\u0275provFallback:g}),k=g({ngInjectableDef:g}),S=g({ngInjectorDef:g});function I(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(I).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return""+t.overriddenName;if(t.name)return""+t.name;const e=t.toString();if(null==e)return""+e;const i=e.indexOf("\n");return-1===i?e:e.substring(0,i)}function P(t,e){return null==t||""===t?null===e?"":e:null==e||""===e?t:t+" "+e}const V=g({__forward_ref__:g});function R(t){return t.__forward_ref__=R,t.toString=function(){return I(this())},t}function j(t){return A(t)?t():t}function A(t){return"function"==typeof t&&t.hasOwnProperty(V)&&t.__forward_ref__===R}const W="undefined"!=typeof globalThis&&globalThis,T="undefined"!=typeof window&&window,E="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,F="undefined"!=typeof global&&global,L=W||F||T||E,Q=g({\u0275cmp:g}),N=g({\u0275dir:g}),z=g({\u0275pipe:g}),B=g({\u0275mod:g}),U=g({\u0275loc:g}),$=g({\u0275fac:g}),H=g({__NG_ELEMENT_ID__:g});class G{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=_({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}toString(){return"InjectionToken "+this._desc}}const X=new G("INJECTOR",-1),q={},K=/\n/gm,Y=g({provide:String,useValue:g});let J,Z=void 0;function tt(t){const e=Z;return Z=t,e}function et(t){const e=J;return J=t,e}function it(t,e=m.Default){if(void 0===Z)throw new Error("inject() must be called from an injection context");return null===Z?st(t,void 0,e):Z.get(t,e&m.Optional?null:void 0,e)}function nt(t,e=m.Default){return(J||it)(j(t),e)}const at=nt;function st(t,e,i){const n=x(t);if(n&&"root"==n.providedIn)return void 0===n.value?n.value=n.factory():n.value;if(i&m.Optional)return null;if(void 0!==e)return e;throw new Error(`Injector: NOT_FOUND [${I(t)}]`)}function ot(t){const e=[];for(let i=0;i<t.length;i++){const n=j(t[i]);if(Array.isArray(n)){if(0===n.length)throw new Error("Arguments array must have arguments.");let t=void 0,i=m.Default;for(let e=0;e<n.length;e++){const a=n[e];a instanceof p||"Optional"===a.ngMetadataName||a===p?i|=m.Optional:a instanceof f||"SkipSelf"===a.ngMetadataName||a===f?i|=m.SkipSelf:a instanceof b||"Self"===a.ngMetadataName||a===b?i|=m.Self:t=a instanceof u||a===u?a.token:a}e.push(nt(t,i))}else e.push(nt(n))}return e}class rt{get(t,e=q){if(e===q){const e=new Error(`NullInjectorError: No provider for ${I(t)}!`);throw e.name="NullInjectorError",e}return e}}class ct{}class lt{}function dt(t,e){t.forEach(t=>Array.isArray(t)?dt(t,e):e(t))}function ht(t,e,i){e>=t.length?t.push(i):t.splice(e,0,i)}function ut(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function pt(t,e){const i=[];for(let n=0;n<t;n++)i.push(e);return i}function bt(t,e,i){let n=mt(t,e);return n>=0?t[1|n]=i:(n=~n,function(t,e,i,n){let a=t.length;if(a==e)t.push(i,n);else if(1===a)t.push(n,t[0]),t[0]=i;else{for(a--,t.push(t[a-1],t[a]);a>e;)t[a]=t[a-2],a--;t[e]=i,t[e+1]=n}}(t,n,e,i)),n}function ft(t,e){const i=mt(t,e);if(i>=0)return t[1|i]}function mt(t,e){return function(t,e,i){let n=0,a=t.length>>1;for(;a!==n;){const i=n+(a-n>>1),s=t[i<<1];if(e===s)return i<<1;s>e?a=i:n=i+1}return~(a<<1)}(t,e)}var gt=function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t}({}),vt=function(t){return t[t.Emulated=0]="Emulated",t[t.Native=1]="Native",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t}({});const _t={},yt=[];let xt=0;function Ct(t){return c(()=>{const e={},i={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===gt.OnPush,directiveDefs:null,pipeDefs:null,selectors:t.selectors||yt,viewQuery:t.viewQuery||null,features:t.features||null,data:t.data||{},encapsulation:t.encapsulation||vt.Emulated,id:"c",styles:t.styles||yt,_:null,setInput:null,schemas:t.schemas||null,tView:null},n=t.directives,a=t.features,s=t.pipes;return i.id+=xt++,i.inputs=It(t.inputs,e),i.outputs=It(t.outputs),a&&a.forEach(t=>t(i)),i.directiveDefs=n?()=>("function"==typeof n?n():n).map(Dt):null,i.pipeDefs=s?()=>("function"==typeof s?s():s).map(wt):null,i})}function Ot(t,e,i){const n=t.\u0275cmp;n.directiveDefs=()=>e.map(Dt),n.pipeDefs=()=>i.map(wt)}function Dt(t){return Rt(t)||function(t){return t[N]||null}(t)}function wt(t){return function(t){return t[z]||null}(t)}const Mt={};function kt(t){const e={type:t.type,bootstrap:t.bootstrap||yt,declarations:t.declarations||yt,imports:t.imports||yt,exports:t.exports||yt,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null};return null!=t.id&&c(()=>{Mt[t.id]=t.type}),e}function St(t,e){return c(()=>{const i=At(t,!0);i.declarations=e.declarations||yt,i.imports=e.imports||yt,i.exports=e.exports||yt})}function It(t,e){if(null==t)return _t;const i={};for(const n in t)if(t.hasOwnProperty(n)){let a=t[n],s=a;Array.isArray(a)&&(s=a[1],a=a[0]),i[a]=n,e&&(e[a]=s)}return i}const Pt=Ct;function Vt(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,onDestroy:t.type.prototype.ngOnDestroy||null}}function Rt(t){return t[Q]||null}function jt(t,e){return t.hasOwnProperty($)?t[$]:null}function At(t,e){const i=t[B]||null;if(!i&&!0===e)throw new Error(`Type ${I(t)} does not have '\u0275mod' property.`);return i}function Wt(t){return Array.isArray(t)&&"object"==typeof t[1]}function Tt(t){return Array.isArray(t)&&!0===t[1]}function Et(t){return 0!=(8&t.flags)}function Ft(t){return 2==(2&t.flags)}function Lt(t){return 1==(1&t.flags)}function Qt(t){return null!==t.template}function Nt(t){return 0!=(512&t[2])}class zt{constructor(t,e,i){this.previousValue=t,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}}function Bt(){return Ut}function Ut(t){return t.type.prototype.ngOnChanges&&(t.setInput=Ht),$t}function $t(){const t=Gt(this),e=null==t?void 0:t.current;if(e){const i=t.previous;if(i===_t)t.previous=e;else for(let t in e)i[t]=e[t];t.current=null,this.ngOnChanges(e)}}function Ht(t,e,i,n){const a=Gt(t)||function(t,e){return t.__ngSimpleChanges__=e}(t,{previous:_t,current:null}),s=a.current||(a.current={}),o=a.previous,r=this.declaredInputs[i],c=o[r];s[r]=new zt(c&&c.currentValue,e,o===_t),t[n]=e}function Gt(t){return t.__ngSimpleChanges__||null}Bt.ngInherit=!0;let Xt=void 0;function qt(t){Xt=t}function Kt(){return void 0!==Xt?Xt:"undefined"!=typeof document?document:void 0}function Yt(t){return!!t.listen}const Jt={createRenderer:(t,e)=>Kt()};function Zt(t){for(;Array.isArray(t);)t=t[0];return t}function te(t,e){return Zt(e[t+20])}function ee(t,e){return Zt(e[t.index])}function ie(t,e){return t.data[e+20]}function ne(t,e){return t[e+20]}function ae(t,e){const i=e[t];return Wt(i)?i:i[0]}function se(t){const e=function(t){return t.__ngContext__||null}(t);return e?Array.isArray(e)?e:e.lView:null}function oe(t){return 4==(4&t[2])}function re(t){return 128==(128&t[2])}function ce(t,e){return null===t||null==e?null:t[e]}function le(t){t[18]=0}function de(t,e){t[5]+=e;let i=t,n=t[3];for(;null!==n&&(1===e&&1===i[5]||-1===e&&0===i[5]);)n[5]+=e,i=n,n=n[3]}const he={lFrame:Ae(null),bindingsEnabled:!0,isInCheckNoChangesMode:!1};function ue(){return he.bindingsEnabled}function pe(){return he.lFrame.lView}function be(){return he.lFrame.tView}function fe(t){he.lFrame.contextLView=t}function me(){return he.lFrame.currentTNode}function ge(t,e){he.lFrame.currentTNode=t,he.lFrame.isParent=e}function ve(){return he.lFrame.isParent}function _e(){he.lFrame.isParent=!1}function ye(){return he.isInCheckNoChangesMode}function xe(t){he.isInCheckNoChangesMode=t}function Ce(){const t=he.lFrame;let e=t.bindingRootIndex;return-1===e&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function Oe(){return he.lFrame.bindingIndex}function De(){return he.lFrame.bindingIndex++}function we(t){const e=he.lFrame,i=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,i}function Me(t,e){const i=he.lFrame;i.bindingIndex=i.bindingRootIndex=t,ke(e)}function ke(t){he.lFrame.currentDirectiveIndex=t}function Se(t){const e=he.lFrame.currentDirectiveIndex;return-1===e?null:t[e]}function Ie(){return he.lFrame.currentQueryIndex}function Pe(t){he.lFrame.currentQueryIndex=t}function Ve(t,e){const i=je();he.lFrame=i,i.currentTNode=e,i.lView=t}function Re(t){const e=je(),i=t[1];he.lFrame=e,e.currentTNode=i.firstChild,e.lView=t,e.tView=i,e.contextLView=t,e.bindingIndex=i.bindingStartIndex}function je(){const t=he.lFrame,e=null===t?null:t.child;return null===e?Ae(t):e}function Ae(t){const e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:0,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null};return null!==t&&(t.child=e),e}function We(){const t=he.lFrame;return he.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const Te=We;function Ee(){const t=We();t.isParent=!0,t.tView=null,t.selectedIndex=0,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function Fe(){return he.lFrame.selectedIndex}function Le(t){he.lFrame.selectedIndex=t}function Qe(){const t=he.lFrame;return ie(t.tView,t.selectedIndex)}function Ne(){he.lFrame.currentNamespace="http://www.w3.org/2000/svg"}function ze(){he.lFrame.currentNamespace=null}function Be(t,e){for(let i=e.directiveStart,n=e.directiveEnd;i<n;i++){const e=t.data[i].type.prototype,{ngAfterContentInit:n,ngAfterContentChecked:a,ngAfterViewInit:s,ngAfterViewChecked:o,ngOnDestroy:r}=e;n&&(t.contentHooks||(t.contentHooks=[])).push(-i,n),a&&((t.contentHooks||(t.contentHooks=[])).push(i,a),(t.contentCheckHooks||(t.contentCheckHooks=[])).push(i,a)),s&&(t.viewHooks||(t.viewHooks=[])).push(-i,s),o&&((t.viewHooks||(t.viewHooks=[])).push(i,o),(t.viewCheckHooks||(t.viewCheckHooks=[])).push(i,o)),null!=r&&(t.destroyHooks||(t.destroyHooks=[])).push(i,r)}}function Ue(t,e,i){Ge(t,e,3,i)}function $e(t,e,i,n){(3&t[2])===i&&Ge(t,e,i,n)}function He(t,e){let i=t[2];(3&i)===e&&(i&=2047,i+=1,t[2]=i)}function Ge(t,e,i,n){const a=null!=n?n:-1;let s=0;for(let o=void 0!==n?65535&t[18]:0;o<e.length;o++)if("number"==typeof e[o+1]){if(s=e[o],null!=n&&s>=n)break}else e[o]<0&&(t[18]+=65536),(s<a||-1==a)&&(Xe(t,i,e,o),t[18]=(4294901760&t[18])+o+2),o++}function Xe(t,e,i,n){const a=i[n]<0,s=i[n+1],o=t[a?-i[n]:i[n]];a?t[2]>>11<t[18]>>16&&(3&t[2])===e&&(t[2]+=2048,s.call(o)):s.call(o)}class qe{constructor(t,e,i){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=i}}function Ke(t,e,i){const n=Yt(t);let a=0;for(;a<i.length;){const s=i[a];if("number"==typeof s){if(0!==s)break;a++;const o=i[a++],r=i[a++],c=i[a++];n?t.setAttribute(e,r,c,o):e.setAttributeNS(o,r,c)}else{const o=s,r=i[++a];Je(o)?n&&t.setProperty(e,o,r):n?t.setAttribute(e,o,r):e.setAttribute(o,r),a++}}return a}function Ye(t){return 3===t||4===t||6===t}function Je(t){return 64===t.charCodeAt(0)}function Ze(t,e){if(null===e||0===e.length);else if(null===t||0===t.length)t=e.slice();else{let i=-1;for(let n=0;n<e.length;n++){const a=e[n];"number"==typeof a?i=a:0===i||ti(t,i,a,null,-1===i||2===i?e[++n]:null)}}return t}function ti(t,e,i,n,a){let s=0,o=t.length;if(-1===e)o=-1;else for(;s<t.length;){const i=t[s++];if("number"==typeof i){if(i===e){o=-1;break}if(i>e){o=s-1;break}}}for(;s<t.length;){const e=t[s];if("number"==typeof e)break;if(e===i){if(null===n)return void(null!==a&&(t[s+1]=a));if(n===t[s+1])return void(t[s+2]=a)}s++,null!==n&&s++,null!==a&&s++}-1!==o&&(t.splice(o,0,e),s=o+1),t.splice(s++,0,i),null!==n&&t.splice(s++,0,n),null!==a&&t.splice(s++,0,a)}function ei(t){return-1!==t}function ii(t){return 32767&t}function ni(t,e){let i=t>>16,n=e;for(;i>0;)n=n[15],i--;return n}function ai(t){return"string"==typeof t?t:null==t?"":""+t}function si(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():ai(t)}const oi=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(L))();function ri(t){return{name:"window",target:t.ownerDocument.defaultView}}function ci(t){return{name:"document",target:t.ownerDocument}}function li(t){return{name:"body",target:t.ownerDocument.body}}function di(t){return t instanceof Function?t():t}let hi=!0;function ui(t){const e=hi;return hi=t,e}let pi=0;function bi(t,e){const i=mi(t,e);if(-1!==i)return i;const n=e[1];n.firstCreatePass&&(t.injectorIndex=e.length,fi(n.data,t),fi(e,null),fi(n.blueprint,null));const a=gi(t,e),s=t.injectorIndex;if(ei(a)){const t=ii(a),i=ni(a,e),n=i[1].data;for(let a=0;a<8;a++)e[s+a]=i[t+a]|n[t+a]}return e[s+8]=a,s}function fi(t,e){t.push(0,0,0,0,0,0,0,0,e)}function mi(t,e){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===e[t.injectorIndex+8]?-1:t.injectorIndex}function gi(t,e){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let i=0,n=null,a=e;for(;null!==a;){const t=a[1],e=t.type;if(n=2===e?t.declTNode:1===e?a[6]:null,null===n)return-1;if(i++,a=a[15],-1!==n.injectorIndex)return n.injectorIndex|i<<16}return-1}function vi(t,e,i){!function(t,e,i){let n;"string"==typeof i?n=i.charCodeAt(0)||0:i.hasOwnProperty(H)&&(n=i[H]),null==n&&(n=i[H]=pi++);const a=255&n,s=1<<a,o=64&a,r=32&a,c=e.data;128&a?o?r?c[t+7]|=s:c[t+6]|=s:r?c[t+5]|=s:c[t+4]|=s:o?r?c[t+3]|=s:c[t+2]|=s:r?c[t+1]|=s:c[t]|=s}(t,e,i)}function _i(t,e,i,n=m.Default,a){if(null!==t){const a=function(t){if("string"==typeof t)return t.charCodeAt(0)||0;const e=t.hasOwnProperty(H)?t[H]:void 0;return"number"==typeof e&&e>0?255&e:e}(i);if("function"==typeof a){Ve(e,t);try{const t=a();if(null!=t||n&m.Optional)return t;throw new Error(`No provider for ${si(i)}!`)}finally{Te()}}else if("number"==typeof a){if(-1===a)return new Mi(t,e);let s=null,o=mi(t,e),r=-1,c=n&m.Host?e[16][6]:null;for((-1===o||n&m.SkipSelf)&&(r=-1===o?gi(t,e):e[o+8],-1!==r&&wi(n,!1)?(s=e[1],o=ii(r),e=ni(r,e)):o=-1);-1!==o;){const t=e[1];if(Di(a,o,t.data)){const t=xi(o,e,i,s,n,c);if(t!==yi)return t}r=e[o+8],-1!==r&&wi(n,e[1].data[o+8]===c)&&Di(a,o,e)?(s=t,o=ii(r),e=ni(r,e)):o=-1}}}if(n&m.Optional&&void 0===a&&(a=null),0==(n&(m.Self|m.Host))){const t=e[9],s=et(void 0);try{return t?t.get(i,a,n&m.Optional):st(i,a,n&m.Optional)}finally{et(s)}}if(n&m.Optional)return a;throw new Error(`NodeInjector: NOT_FOUND [${si(i)}]`)}const yi={};function xi(t,e,i,n,a,s){const o=e[1],r=o.data[t+8],c=Ci(r,o,i,null==n?Ft(r)&&hi:n!=o&&2===r.type,a&m.Host&&s===r);return null!==c?Oi(e,o,c,r):yi}function Ci(t,e,i,n,a){const s=t.providerIndexes,o=e.data,r=1048575&s,c=t.directiveStart,l=s>>20,d=a?r+l:t.directiveEnd;for(let h=n?r:r+l;h<d;h++){const t=o[h];if(h<c&&i===t||h>=c&&t.type===i)return h}if(a){const t=o[c];if(t&&Qt(t)&&t.type===i)return c}return null}function Oi(t,e,i,n){let a=t[i];const s=e.data;if(a instanceof qe){const o=a;if(o.resolving)throw new Error("Circular dep for "+si(s[i]));const r=ui(o.canSeeViewProviders);o.resolving=!0;const c=o.injectImpl?et(o.injectImpl):null;Ve(t,n);try{a=t[i]=o.factory(void 0,s,t,n),e.firstCreatePass&&i>=n.directiveStart&&function(t,e,i){const{ngOnChanges:n,ngOnInit:a,ngDoCheck:s}=e.type.prototype;if(n){const n=Ut(e);(i.preOrderHooks||(i.preOrderHooks=[])).push(t,n),(i.preOrderCheckHooks||(i.preOrderCheckHooks=[])).push(t,n)}a&&(i.preOrderHooks||(i.preOrderHooks=[])).push(0-t,a),s&&((i.preOrderHooks||(i.preOrderHooks=[])).push(t,s),(i.preOrderCheckHooks||(i.preOrderCheckHooks=[])).push(t,s))}(i,s[i],e)}finally{null!==c&&et(c),ui(r),o.resolving=!1,Te()}}return a}function Di(t,e,i){const n=64&t,a=32&t;let s;return s=128&t?n?a?i[e+7]:i[e+6]:a?i[e+5]:i[e+4]:n?a?i[e+3]:i[e+2]:a?i[e+1]:i[e],!!(s&1<<t)}function wi(t,e){return!(t&m.Self||t&m.Host&&e)}class Mi{constructor(t,e){this._tNode=t,this._lView=e}get(t,e){return _i(this._tNode,this._lView,t,void 0,e)}}function ki(t){const e=t;if(A(t))return()=>{const t=ki(j(e));return t?t():null};let i=jt(e);if(null===i){const t=O(e);i=t&&t.factory}return i||null}function Si(t){return c(()=>{const e=t.prototype.constructor,i=e[$]||ki(e),n=Object.prototype;let a=Object.getPrototypeOf(t.prototype).constructor;for(;a&&a!==n;){const t=a[$]||ki(a);if(t&&t!==i)return t;a=Object.getPrototypeOf(a)}return t=>new t})}function Ii(t){return t.ngDebugContext}function Pi(t){return t.ngOriginalError}function Vi(t,...e){t.error(...e)}class Ri{constructor(){this._console=console}handleError(t){const e=this._findOriginalError(t),i=this._findContext(t),n=function(t){return t.ngErrorLogger||Vi}(t);n(this._console,"ERROR",t),e&&n(this._console,"ORIGINAL ERROR",e),i&&n(this._console,"ERROR CONTEXT",i)}_findContext(t){return t?Ii(t)?Ii(t):this._findContext(Pi(t)):null}_findOriginalError(t){let e=Pi(t);for(;e&&Pi(e);)e=Pi(e);return e}}class ji{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return"SafeValue must use [property]=binding: "+this.changingThisBreaksApplicationSecurity+" (see http://g.co/ng/security#xss)"}}class Ai extends ji{getTypeName(){return"HTML"}}class Wi extends ji{getTypeName(){return"Style"}}class Ti extends ji{getTypeName(){return"Script"}}class Ei extends ji{getTypeName(){return"URL"}}class Fi extends ji{getTypeName(){return"ResourceURL"}}function Li(t){return t instanceof ji?t.changingThisBreaksApplicationSecurity:t}function Qi(t,e){const i=Ni(t);if(null!=i&&i!==e){if("ResourceURL"===i&&"URL"===e)return!0;throw new Error(`Required a safe ${e}, got a ${i} (see http://g.co/ng/security#xss)`)}return i===e}function Ni(t){return t instanceof ji&&t.getTypeName()||null}function zi(t){return new Ai(t)}function Bi(t){return new Wi(t)}function Ui(t){return new Ti(t)}function $i(t){return new Ei(t)}function Hi(t){return new Fi(t)}let Gi=!0,Xi=!1;function qi(){return Xi=!0,Gi}function Ki(){if(Xi)throw new Error("Cannot enable prod mode after platform setup.");Gi=!1}class Yi{getInertBodyElement(t){t="<body><remove></remove>"+t;try{const e=(new window.DOMParser).parseFromString(t,"text/html").body;return e.removeChild(e.firstChild),e}catch(e){return null}}}class Ji{constructor(t){if(this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const t=this.inertDocument.createElement("html");this.inertDocument.appendChild(t);const e=this.inertDocument.createElement("body");t.appendChild(e)}}getInertBodyElement(t){const e=this.inertDocument.createElement("template");if("content"in e)return e.innerHTML=t,e;const i=this.inertDocument.createElement("body");return i.innerHTML=t,this.defaultDoc.documentMode&&this.stripCustomNsAttrs(i),i}stripCustomNsAttrs(t){const e=t.attributes;for(let n=e.length-1;0<n;n--){const i=e.item(n).name;"xmlns:ns1"!==i&&0!==i.indexOf("ns1:")||t.removeAttribute(i)}let i=t.firstChild;for(;i;)i.nodeType===Node.ELEMENT_NODE&&this.stripCustomNsAttrs(i),i=i.nextSibling}}const Zi=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi,tn=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;function en(t){return(t=String(t)).match(Zi)||t.match(tn)?t:(qi()&&console.warn(`WARNING: sanitizing unsafe URL value ${t} (see http://g.co/ng/security#xss)`),"unsafe:"+t)}function nn(t){const e={};for(const i of t.split(","))e[i]=!0;return e}function an(...t){const e={};for(const i of t)for(const t in i)i.hasOwnProperty(t)&&(e[t]=!0);return e}const sn=nn("area,br,col,hr,img,wbr"),on=nn("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),rn=nn("rp,rt"),cn=an(rn,on),ln=an(sn,an(on,nn("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")),an(rn,nn("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")),cn),dn=nn("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),hn=nn("srcset"),un=an(dn,hn,nn("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"),nn("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")),pn=nn("script,style,template");class bn{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(t){let e=t.firstChild,i=!0;for(;e;)if(e.nodeType===Node.ELEMENT_NODE?i=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,i&&e.firstChild)e=e.firstChild;else for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let t=this.checkClobberedElement(e,e.nextSibling);if(t){e=t;break}e=this.checkClobberedElement(e,e.parentNode)}return this.buf.join("")}startElement(t){const e=t.nodeName.toLowerCase();if(!ln.hasOwnProperty(e))return this.sanitizedSomething=!0,!pn.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);const i=t.attributes;for(let a=0;a<i.length;a++){const t=i.item(a),e=t.name,s=e.toLowerCase();if(!un.hasOwnProperty(s)){this.sanitizedSomething=!0;continue}let o=t.value;dn[s]&&(o=en(o)),hn[s]&&(n=o,o=(n=String(n)).split(",").map(t=>en(t.trim())).join(", ")),this.buf.push(" ",e,'="',gn(o),'"')}var n;return this.buf.push(">"),!0}endElement(t){const e=t.nodeName.toLowerCase();ln.hasOwnProperty(e)&&!sn.hasOwnProperty(e)&&(this.buf.push("</"),this.buf.push(e),this.buf.push(">"))}chars(t){this.buf.push(gn(t))}checkClobberedElement(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error("Failed to sanitize html because the element is clobbered: "+t.outerHTML);return e}}const fn=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,mn=/([^\#-~ |!])/g;function gn(t){return t.replace(/&/g,"&").replace(fn,(function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"})).replace(mn,(function(t){return"&#"+t.charCodeAt(0)+";"})).replace(/</g,"<").replace(/>/g,">")}let vn;function _n(t,e){let i=null;try{vn=vn||function(t){return function(){try{return!!(new window.DOMParser).parseFromString("","text/html")}catch(t){return!1}}()?new Yi:new Ji(t)}(t);let n=e?String(e):"";i=vn.getInertBodyElement(n);let a=5,s=n;do{if(0===a)throw new Error("Failed to sanitize html because the input is unstable");a--,n=s,s=i.innerHTML,i=vn.getInertBodyElement(n)}while(n!==s);const o=new bn,r=o.sanitizeChildren(yn(i)||i);return qi()&&o.sanitizedSomething&&console.warn("WARNING: sanitizing HTML stripped some content, see http://g.co/ng/security#xss"),r}finally{if(i){const t=yn(i)||i;for(;t.firstChild;)t.removeChild(t.firstChild)}}}function yn(t){return"content"in t&&function(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var xn=function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t}({});function Cn(t){const e=wn();return e?e.sanitize(xn.HTML,t)||"":Qi(t,"HTML")?Li(t):_n(Kt(),ai(t))}function On(t){const e=wn();return e?e.sanitize(xn.URL,t)||"":Qi(t,"URL")?Li(t):en(ai(t))}function Dn(t){const e=wn();if(e)return e.sanitize(xn.RESOURCE_URL,t)||"";if(Qi(t,"ResourceURL"))return Li(t);throw new Error("unsafe value used in a resource URL context (see http://g.co/ng/security#xss)")}function wn(){const t=pe();return t&&t[12]}function Mn(t,e){t.__ngContext__=e}function kn(t,e,i){let n=t.length;for(;;){const a=t.indexOf(e,i);if(-1===a)return a;if(0===a||t.charCodeAt(a-1)<=32){const i=e.length;if(a+i===n||t.charCodeAt(a+i)<=32)return a}i=a+1}}function Sn(t,e,i){let n=0;for(;n<t.length;){let a=t[n++];if(i&&"class"===a){if(a=t[n],-1!==kn(a.toLowerCase(),e,0))return!0}else if(1===a){for(;n<t.length&&"string"==typeof(a=t[n++]);)if(a.toLowerCase()===e)return!0;return!1}}return!1}function In(t){return 0===t.type&&"ng-template"!==t.tagName}function Pn(t,e,i){return e===(0!==t.type||i?t.tagName:"ng-template")}function Vn(t,e,i){let n=4;const a=t.attrs||[],s=function(t){for(let e=0;e<t.length;e++)if(Ye(t[e]))return e;return t.length}(a);let o=!1;for(let r=0;r<e.length;r++){const c=e[r];if("number"!=typeof c){if(!o)if(4&n){if(n=2|1&n,""!==c&&!Pn(t,c,i)||""===c&&1===e.length){if(Rn(n))return!1;o=!0}}else{const l=8&n?c:e[++r];if(8&n&&null!==t.attrs){if(!Sn(t.attrs,l,i)){if(Rn(n))return!1;o=!0}continue}const d=jn(8&n?"class":c,a,In(t),i);if(-1===d){if(Rn(n))return!1;o=!0;continue}if(""!==l){let t;t=d>s?"":a[d+1].toLowerCase();const e=8&n?t:null;if(e&&-1!==kn(e,l,0)||2&n&&l!==t){if(Rn(n))return!1;o=!0}}}}else{if(!o&&!Rn(n)&&!Rn(c))return!1;if(o&&Rn(c))continue;o=!1,n=c|1&n}}return Rn(n)||o}function Rn(t){return 0==(1&t)}function jn(t,e,i,n){if(null===e)return-1;let a=0;if(n||!i){let i=!1;for(;a<e.length;){const n=e[a];if(n===t)return a;if(3===n||6===n)i=!0;else{if(1===n||2===n){let t=e[++a];for(;"string"==typeof t;)t=e[++a];continue}if(4===n)break;if(0===n){a+=4;continue}}a+=i?1:2}return-1}return function(t,e){let i=t.indexOf(4);if(i>-1)for(i++;i<t.length;){const n=t[i];if("number"==typeof n)return-1;if(n===e)return i;i++}return-1}(e,t)}function An(t,e,i=!1){for(let n=0;n<e.length;n++)if(Vn(t,e[n],i))return!0;return!1}function Wn(t,e){t:for(let i=0;i<e.length;i++){const n=e[i];if(t.length===n.length){for(let e=0;e<t.length;e++)if(t[e]!==n[e])continue t;return!0}}return!1}function Tn(t,e){return t?":not("+e.trim()+")":e}function En(t){let e=t[0],i=1,n=2,a="",s=!1;for(;i<t.length;){let o=t[i];if("string"==typeof o)if(2&n){const e=t[++i];a+="["+o+(e.length>0?'="'+e+'"':"")+"]"}else 8&n?a+="."+o:4&n&&(a+=" "+o);else""===a||Rn(o)||(e+=Tn(s,a),a=""),n=o,s=s||!Rn(n);i++}return""!==a&&(e+=Tn(s,a)),e}const Fn={};function Ln(t){const e=t[3];return Tt(e)?e[3]:e}function Qn(t){return zn(t[13])}function Nn(t){return zn(t[4])}function zn(t){for(;null!==t&&!Tt(t);)t=t[4];return t}function Bn(t){Un(be(),pe(),Fe()+t,ye())}function Un(t,e,i,n){if(!n)if(3==(3&e[2])){const n=t.preOrderCheckHooks;null!==n&&Ue(e,n,i)}else{const n=t.preOrderHooks;null!==n&&$e(e,n,0,i)}Le(i)}function $n(t,e){return t<<17|e<<2}function Hn(t){return t>>17&32767}function Gn(t){return 2|t}function Xn(t){return(131068&t)>>2}function qn(t,e){return-131069&t|e<<2}function Kn(t){return 1|t}function Yn(t,e){const i=t.contentQueries;if(null!==i)for(let n=0;n<i.length;n+=2){const a=i[n],s=i[n+1];if(-1!==s){const i=t.data[s];Pe(a),i.contentQueries(2,e[s],s)}}}function Jn(t,e,i){return Yt(e)?e.createElement(t,i):null===i?e.createElement(t):e.createElementNS(i,t)}function Zn(t,e,i,n,a,s,o,r,c,l){const d=e.blueprint.slice();return d[0]=a,d[2]=140|n,le(d),d[3]=d[15]=t,d[8]=i,d[10]=o||t&&t[10],d[11]=r||t&&t[11],d[12]=c||t&&t[12]||null,d[9]=l||t&&t[9]||null,d[6]=s,d[16]=2==e.type?t[16]:d,d}function ta(t,e,i,n,a){const s=e+20,o=t.data[s]||function(t,e,i,n,a){const s=me(),o=ve(),r=t.data[e]=function(t,e,i,n,a,s){return{type:i,index:n,injectorIndex:e?e.injectorIndex:-1,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,propertyBindings:null,flags:0,providerIndexes:0,tagName:a,attrs:s,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tViews:null,next:null,projectionNext:null,child:null,parent:e,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}(0,o?s:s&&s.parent,i,e,n,a);return null===t.firstChild&&(t.firstChild=r),null!==s&&(o&&null==s.child&&null!==r.parent?s.child=r:o||(s.next=r)),r}(t,s,i,n,a);return ge(o,!0),o}function ea(t,e,i){Re(e);try{const n=t.viewQuery;null!==n&&Ra(1,n,i);const a=t.template;null!==a&&aa(t,e,a,1,i),t.firstCreatePass&&(t.firstCreatePass=!1),t.staticContentQueries&&Yn(t,e),t.staticViewQueries&&Ra(2,t.viewQuery,i);const s=t.components;null!==s&&function(t,e){for(let i=0;i<e.length;i++)ka(t,e[i])}(e,s)}catch(n){throw t.firstCreatePass&&(t.incompleteFirstPass=!0),n}finally{e[2]&=-5,Ee()}}function ia(t,e,i,n){const a=e[2];if(256==(256&a))return;Re(e);const s=ye();try{le(e),he.lFrame.bindingIndex=t.bindingStartIndex,null!==i&&aa(t,e,i,2,n);const o=3==(3&a);if(!s)if(o){const i=t.preOrderCheckHooks;null!==i&&Ue(e,i,null)}else{const i=t.preOrderHooks;null!==i&&$e(e,i,0,null),He(e,0)}if(function(t){for(let e=Qn(t);null!==e;e=Nn(e)){if(!e[2])continue;const t=e[9];for(let e=0;e<t.length;e++){const i=t[e],n=i[3];0==(1024&i[2])&&de(n,1),i[2]|=1024}}}(e),function(t){for(let e=Qn(t);null!==e;e=Nn(e))for(let t=10;t<e.length;t++){const i=e[t],n=i[1];re(i)&&ia(n,i,n.template,i[8])}}(e),null!==t.contentQueries&&Yn(t,e),!s)if(o){const i=t.contentCheckHooks;null!==i&&Ue(e,i)}else{const i=t.contentHooks;null!==i&&$e(e,i,1),He(e,1)}!function(t,e){try{const i=t.expandoInstructions;if(null!==i){let n=t.expandoStartIndex,a=-1,s=-1;for(let t=0;t<i.length;t++){const o=i[t];"number"==typeof o?o<=0?(s=0-o,Le(s),n+=9+i[++t],a=n):n+=o:(null!==o&&(Me(n,a),o(2,e[a])),a++)}}}finally{Le(-1)}}(t,e);const r=t.components;null!==r&&function(t,e){for(let i=0;i<e.length;i++)Ma(t,e[i])}(e,r);const c=t.viewQuery;if(null!==c&&Ra(2,c,n),!s)if(o){const i=t.viewCheckHooks;null!==i&&Ue(e,i)}else{const i=t.viewHooks;null!==i&&$e(e,i,2),He(e,2)}!0===t.firstUpdatePass&&(t.firstUpdatePass=!1),s||(e[2]&=-73),1024&e[2]&&(e[2]&=-1025,de(e[3],-1))}finally{Ee()}}function na(t,e,i,n){const a=e[10],s=!ye(),o=oe(e);try{s&&!o&&a.begin&&a.begin(),o&&ea(t,e,n),ia(t,e,i,n)}finally{s&&!o&&a.end&&a.end()}}function aa(t,e,i,n,a){const s=Fe();try{Le(-1),2&n&&e.length>20&&Un(t,e,0,ye()),i(n,a)}finally{Le(s)}}function sa(t,e,i){if(Et(e)){const n=e.directiveEnd;for(let a=e.directiveStart;a<n;a++){const e=t.data[a];e.contentQueries&&e.contentQueries(1,i[a],a)}}}function oa(t,e,i){ue()&&(function(t,e,i,n){const a=i.directiveStart,s=i.directiveEnd;t.firstCreatePass||bi(i,e),Mn(n,e);const o=i.initialInputs;for(let r=a;r<s;r++){const n=t.data[r],s=Qt(n);s&&Ca(e,i,n);const c=Oi(e,t,r,i);Mn(c,e),null!==o&&Oa(0,r-a,c,n,0,o),s&&(ae(i.index,e)[8]=c)}}(t,e,i,ee(i,e)),128==(128&i.flags)&&function(t,e,i){const n=i.directiveStart,a=i.directiveEnd,s=t.expandoInstructions,o=t.firstCreatePass,r=i.index-20,c=he.lFrame.currentDirectiveIndex;try{Le(r);for(let i=n;i<a;i++){const n=t.data[i],a=e[i];ke(i),null!==n.hostBindings||0!==n.hostVars||null!==n.hostAttrs?ma(n,a):o&&s.push(null)}}finally{Le(-1),ke(c)}}(t,e,i))}function ra(t,e,i=ee){const n=e.localNames;if(null!==n){let a=e.index+1;for(let s=0;s<n.length;s+=2){const o=n[s+1],r=-1===o?i(e,t):t[o];t[a++]=r}}}function ca(t){const e=t.tView;return null===e||e.incompleteFirstPass?t.tView=la(1,null,t.template,t.decls,t.vars,t.directiveDefs,t.pipeDefs,t.viewQuery,t.schemas,t.consts):e}function la(t,e,i,n,a,s,o,r,c,l){const d=20+n,h=d+a,u=function(t,e){const i=[];for(let n=0;n<e;n++)i.push(n<t?null:Fn);return i}(d,h),p="function"==typeof l?l():l;return u[1]={type:t,blueprint:u,template:i,queries:null,viewQuery:r,declTNode:e,data:u.slice().fill(null,d),bindingStartIndex:d,expandoStartIndex:h,expandoInstructions:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:"function"==typeof s?s():s,pipeRegistry:"function"==typeof o?o():o,firstChild:null,schemas:c,consts:p,incompleteFirstPass:!1}}function da(t,e,i,n){const a=Aa(e);a.push(i),t.firstCreatePass&&function(t){return t.cleanup||(t.cleanup=[])}(t).push(n,a.length-1)}function ha(t,e,i){for(let n in t)if(t.hasOwnProperty(n)){const a=t[n];(i=null===i?{}:i).hasOwnProperty(n)?i[n].push(e,a):i[n]=[e,a]}return i}function ua(t,e,i,n,a,s,o,r){const c=ee(e,i);let l,d=e.inputs;var h;!r&&null!=d&&(l=d[n])?(Ea(t,i,l,n,a),Ft(e)&&function(t,e){const i=ae(e,t);16&i[2]||(i[2]|=64)}(i,e.index)):2===e.type&&(n="class"===(h=n)?"className":"for"===h?"htmlFor":"formaction"===h?"formAction":"innerHtml"===h?"innerHTML":"readonly"===h?"readOnly":"tabindex"===h?"tabIndex":h,a=null!=o?o(a,e.tagName||"",n):a,Yt(s)?s.setProperty(c,n,a):Je(n)||(c.setProperty?c.setProperty(n,a):c[n]=a))}function pa(t,e,i,n){let a=!1;if(ue()){const s=function(t,e,i){const n=t.directiveRegistry;let a=null;if(n)for(let s=0;s<n.length;s++){const o=n[s];An(i,o.selectors,!1)&&(a||(a=[]),vi(bi(i,e),t,o.type),Qt(o)?(va(t,i),a.unshift(o)):a.push(o))}return a}(t,e,i),o=null===n?null:{"":-1};if(null!==s){let n=0;a=!0,ya(i,t.data.length,s.length);for(let t=0;t<s.length;t++){const e=s[t];e.providersResolver&&e.providersResolver(e)}ga(t,i,s.length);let r=!1,c=!1;for(let a=0;a<s.length;a++){const l=s[a];i.mergedAttrs=Ze(i.mergedAttrs,l.hostAttrs),xa(t,e,l),_a(t.data.length-1,l,o),null!==l.contentQueries&&(i.flags|=8),null===l.hostBindings&&null===l.hostAttrs&&0===l.hostVars||(i.flags|=128);const d=l.type.prototype;!r&&(d.ngOnChanges||d.ngOnInit||d.ngDoCheck)&&((t.preOrderHooks||(t.preOrderHooks=[])).push(i.index-20),r=!0),c||!d.ngOnChanges&&!d.ngDoCheck||((t.preOrderCheckHooks||(t.preOrderCheckHooks=[])).push(i.index-20),c=!0),ba(t,l),n+=l.hostVars}!function(t,e){const i=e.directiveEnd,n=t.data,a=e.attrs,s=[];let o=null,r=null;for(let c=e.directiveStart;c<i;c++){const t=n[c],i=t.inputs,l=null===a||In(e)?null:Da(i,a);s.push(l),o=ha(i,c,o),r=ha(t.outputs,c,r)}null!==o&&(o.hasOwnProperty("class")&&(e.flags|=16),o.hasOwnProperty("style")&&(e.flags|=32)),e.initialInputs=s,e.inputs=o,e.outputs=r}(t,i),fa(t,e,n)}o&&function(t,e,i){if(e){const n=t.localNames=[];for(let t=0;t<e.length;t+=2){const a=i[e[t+1]];if(null==a)throw new Error(`Export of name '${e[t+1]}' not found!`);n.push(e[t],a)}}}(i,n,o)}return i.mergedAttrs=Ze(i.mergedAttrs,i.attrs),a}function ba(t,e){const i=t.expandoInstructions;i.push(e.hostBindings),0!==e.hostVars&&i.push(e.hostVars)}function fa(t,e,i){for(let n=0;n<i;n++)e.push(Fn),t.blueprint.push(Fn),t.data.push(null)}function ma(t,e){null!==t.hostBindings&&t.hostBindings(1,e)}function ga(t,e,i){const n=20-e.index,a=t.data.length-(1048575&e.providerIndexes);(t.expandoInstructions||(t.expandoInstructions=[])).push(n,a,i)}function va(t,e){e.flags|=2,(t.components||(t.components=[])).push(e.index)}function _a(t,e,i){if(i){if(e.exportAs)for(let n=0;n<e.exportAs.length;n++)i[e.exportAs[n]]=t;Qt(e)&&(i[""]=t)}}function ya(t,e,i){t.flags|=1,t.directiveStart=e,t.directiveEnd=e+i,t.providerIndexes=e}function xa(t,e,i){t.data.push(i);const n=i.factory||(i.factory=jt(i.type)),a=new qe(n,Qt(i),null);t.blueprint.push(a),e.push(a)}function Ca(t,e,i){const n=ee(e,t),a=ca(i),s=t[10],o=Sa(t,Zn(t,a,null,i.onPush?64:16,n,e,s,s.createRenderer(n,i),null,null));t[e.index]=o}function Oa(t,e,i,n,a,s){const o=s[e];if(null!==o){const t=n.setInput;for(let e=0;e<o.length;){const a=o[e++],s=o[e++],r=o[e++];null!==t?n.setInput(i,r,a,s):i[s]=r}}}function Da(t,e){let i=null,n=0;for(;n<e.length;){const a=e[n];if(0!==a)if(5!==a){if("number"==typeof a)break;t.hasOwnProperty(a)&&(null===i&&(i=[]),i.push(a,t[a],e[n+1])),n+=2}else n+=2;else n+=4}return i}function wa(t,e,i,n){return new Array(t,!0,!1,e,null,0,n,i,null,null)}function Ma(t,e){const i=ae(e,t);if(re(i)){const t=i[1];80&i[2]?ia(t,i,t.template,i[8]):i[5]>0&&function t(e){for(let n=Qn(e);null!==n;n=Nn(n))for(let e=10;e<n.length;e++){const i=n[e];if(1024&i[2]){const t=i[1];ia(t,i,t.template,i[8])}else i[5]>0&&t(i)}const i=e[1].components;if(null!==i)for(let n=0;n<i.length;n++){const a=ae(i[n],e);re(a)&&a[5]>0&&t(a)}}(i)}}function ka(t,e){const i=ae(e,t),n=i[1];!function(t,e){for(let i=e.length;i<t.blueprint.length;i++)e.push(t.blueprint[i])}(n,i),ea(n,i,i[8])}function Sa(t,e){return t[13]?t[14][4]=e:t[13]=e,t[14]=e,e}function Ia(t){for(;t;){t[2]|=64;const e=Ln(t);if(Nt(t)&&!e)return t;t=e}return null}function Pa(t,e,i){const n=e[10];n.begin&&n.begin();try{ia(t,e,t.template,i)}catch(a){throw Ta(e,a),a}finally{n.end&&n.end()}}function Va(t){!function(t){for(let e=0;e<t.components.length;e++){const i=t.components[e],n=se(i),a=n[1];na(a,n,a.template,i)}}(t[8])}function Ra(t,e,i){Pe(0),e(t,i)}const ja=(()=>Promise.resolve(null))();function Aa(t){return t[7]||(t[7]=[])}function Wa(t,e,i){return(null===t||Qt(t))&&(i=function(t){for(;Array.isArray(t);){if("object"==typeof t[1])return t;t=t[0]}return null}(i[e.index])),i[11]}function Ta(t,e){const i=t[9],n=i?i.get(Ri,null):null;n&&n.handleError(e)}function Ea(t,e,i,n,a){for(let s=0;s<i.length;){const o=i[s++],r=i[s++],c=e[o],l=t.data[o];null!==l.setInput?l.setInput(c,a,n,r):c[r]=a}}function Fa(t,e,i){const n=te(e,t),a=t[11];Yt(a)?a.setValue(n,i):n.textContent=i}function La(t,e,i,n,a){if(null!=n){let s,o=!1;Tt(n)?s=n:Wt(n)&&(o=!0,n=n[0]);const r=Zt(n);0===t&&null!==i?null==a?Ha(e,i,r):$a(e,i,r,a||null):1===t&&null!==i?$a(e,i,r,a||null):2===t?function(t,e,i){const n=Xa(t,e);n&&function(t,e,i,n){Yt(t)?t.removeChild(e,i,n):e.removeChild(i)}(t,n,e,i)}(e,r,o):3===t&&e.destroyNode(r),null!=s&&function(t,e,i,n,a){const s=i[7];s!==Zt(i)&&La(e,t,n,s,a);for(let o=10;o<i.length;o++){const a=i[o];Ja(a[1],a,t,e,n,s)}}(e,t,s,i,a)}}function Qa(t,e){const i=t[9],n=i.indexOf(e),a=e[3];1024&e[2]&&(e[2]&=-1025,de(a,-1)),i.splice(n,1)}function Na(t,e){if(t.length<=10)return;const i=10+e,n=t[i];if(n){const s=n[17];null!==s&&s!==t&&Qa(s,n),e>0&&(t[i-1][4]=n[4]);const o=ut(t,10+e);Ja(n[1],a=n,a[11],2,null,null),a[0]=null,a[6]=null;const r=o[19];null!==r&&r.detachView(o[1]),n[3]=null,n[4]=null,n[2]&=-129}var a;return n}function za(t,e){if(!(256&e[2])){const i=e[11];Yt(i)&&i.destroyNode&&Ja(t,e,i,3,null,null),function(t){let e=t[13];if(!e)return Ba(t[1],t);for(;e;){let i=null;if(Wt(e))i=e[13];else{const t=e[10];t&&(i=t)}if(!i){for(;e&&!e[4]&&e!==t;)Wt(e)&&Ba(e[1],e),e=e[3];null===e&&(e=t),Wt(e)&&Ba(e[1],e),i=e&&e[4]}e=i}}(e)}}function Ba(t,e){if(!(256&e[2])){e[2]&=-129,e[2]|=256,function(t,e){let i;if(null!=t&&null!=(i=t.destroyHooks))for(let n=0;n<i.length;n+=2){const t=e[i[n]];if(!(t instanceof qe)){const e=i[n+1];if(Array.isArray(e))for(let i=0;i<e.length;i+=2)e[i+1].call(t[e[i]]);else e.call(t)}}}(t,e),function(t,e){const i=t.cleanup;if(null!==i){const t=e[7];for(let n=0;n<i.length-1;n+=2)if("string"==typeof i[n]){const a=i[n+1],s="function"==typeof a?a(e):Zt(e[a]),o=t[i[n+2]],r=i[n+3];"boolean"==typeof r?s.removeEventListener(i[n],o,r):r>=0?t[r]():t[-r].unsubscribe(),n+=2}else i[n].call(t[i[n+1]]);e[7]=null}}(t,e),1===e[1].type&&Yt(e[11])&&e[11].destroy();const i=e[17];if(null!==i&&Tt(e[3])){i!==e[3]&&Qa(i,e);const n=e[19];null!==n&&n.detachView(t)}}}function Ua(t,e,i){let n=e.parent;for(;null!=n&&(3===n.type||4===n.type);)n=(e=n).parent;if(null===n)return i[0];if(e&&4===e.type&&4&e.flags)return ee(e,i).parentNode;if(2&n.flags){const e=t.data,i=e[e[n.index].directiveStart].encapsulation;if(i!==vt.ShadowDom&&i!==vt.Native)return null}return ee(n,i)}function $a(t,e,i,n){Yt(t)?t.insertBefore(e,i,n):e.insertBefore(i,n,!0)}function Ha(t,e,i){Yt(t)?t.appendChild(e,i):e.appendChild(i)}function Ga(t,e,i,n){null!==n?$a(t,e,i,n):Ha(t,e,i)}function Xa(t,e){return Yt(t)?t.parentNode(e):e.parentNode}function qa(t,e){return 3===t.type||4===t.type?ee(t,e):null}function Ka(t,e,i,n){const a=Ua(t,n,e);if(null!=a){const t=e[11],s=qa(n.parent||e[6],e);if(Array.isArray(i))for(let e=0;e<i.length;e++)Ga(t,a,i[e],s);else Ga(t,a,i,s)}}function Ya(t,e,i,n,a,s,o){for(;null!=i;){const r=n[i.index],c=i.type;o&&0===e&&(r&&Mn(Zt(r),n),i.flags|=4),64!=(64&i.flags)&&(3===c||4===c?(Ya(t,e,i.child,n,a,s,!1),La(e,t,a,r,s)):1===c?Za(t,e,n,i,a,s):La(e,t,a,r,s)),i=o?i.projectionNext:i.next}}function Ja(t,e,i,n,a,s){Ya(i,n,t.firstChild,e,a,s,!1)}function Za(t,e,i,n,a,s){const o=i[16],r=o[6].projection[n.projection];if(Array.isArray(r))for(let c=0;c<r.length;c++)La(e,t,a,r[c],s);else Ya(t,e,r,o[3],a,s,!0)}function ts(t,e,i){Yt(t)?t.setAttribute(e,"style",i):e.style.cssText=i}function es(t,e,i){Yt(t)?""===i?t.removeAttribute(e,"class"):t.setAttribute(e,"class",i):e.className=i}class is{constructor(t,e){this._lView=t,this._cdRefInjectingView=e,this._appRef=null,this._viewContainerRef=null}get rootNodes(){const t=this._lView,e=t[1];return function t(e,i,n,a,s=!1){for(;null!==n;){const o=i[n.index];if(null!==o&&a.push(Zt(o)),Tt(o))for(let e=10;e<o.length;e++){const i=o[e],n=i[1].firstChild;null!==n&&t(i[1],i,n,a)}const r=n.type;if(3===r||4===r)t(e,i,n.child,a);else if(1===r){const e=i[16],s=e[6].projection[n.projection];if(Array.isArray(s))a.push(...s);else{const i=Ln(e);t(i[1],i,s,a,!0)}}n=s?n.projectionNext:n.next}return a}(e,t,e.firstChild,[])}get context(){return this._lView[8]}get destroyed(){return 256==(256&this._lView[2])}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._viewContainerRef){const t=this._viewContainerRef.indexOf(this);t>-1&&this._viewContainerRef.detach(t),this._viewContainerRef=null}za(this._lView[1],this._lView)}onDestroy(t){da(this._lView[1],this._lView,null,t)}markForCheck(){Ia(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-129}reattach(){this._lView[2]|=128}detectChanges(){Pa(this._lView[1],this._lView,this.context)}checkNoChanges(){!function(t,e,i){xe(!0);try{Pa(t,e,i)}finally{xe(!1)}}(this._lView[1],this._lView,this.context)}attachToViewContainerRef(t){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=t}detachFromAppRef(){var t;this._appRef=null,Ja(this._lView[1],t=this._lView,t[11],2,null,null)}attachToAppRef(t){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t}}class ns extends is{constructor(t){super(t),this._view=t}detectChanges(){Va(this._view)}checkNoChanges(){!function(t){xe(!0);try{Va(t)}finally{xe(!1)}}(this._view)}get context(){return null}}let as,ss,os;function rs(t,e,i){return as||(as=class extends t{}),new as(ee(e,i))}function cs(t,e,i,n){return ss||(ss=class extends t{constructor(t,e,i){super(),this._declarationView=t,this._declarationTContainer=e,this.elementRef=i}createEmbeddedView(t){const e=this._declarationTContainer.tViews,i=Zn(this._declarationView,e,t,16,null,e.declTNode,null,null,null,null);i[17]=this._declarationView[this._declarationTContainer.index];const n=this._declarationView[19];return null!==n&&(i[19]=n.createEmbeddedView(e)),ea(e,i,t),new is(i)}}),0===i.type?new ss(n,i,rs(e,i,n)):null}function ls(t,e,i,n){let a;os||(os=class extends t{constructor(t,e,i){super(),this._lContainer=t,this._hostTNode=e,this._hostView=i}get element(){return rs(e,this._hostTNode,this._hostView)}get injector(){return new Mi(this._hostTNode,this._hostView)}get parentInjector(){const t=gi(this._hostTNode,this._hostView);if(ei(t)){const e=ni(t,this._hostView),i=ii(t);return new Mi(e[1].data[i+8],e)}return new Mi(null,this._hostView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){return null!==this._lContainer[8]&&this._lContainer[8][t]||null}get length(){return this._lContainer.length-10}createEmbeddedView(t,e,i){const n=t.createEmbeddedView(e||{});return this.insert(n,i),n}createComponent(t,e,i,n,a){const s=i||this.parentInjector;if(!a&&null==t.ngModule&&s){const t=s.get(ct,null);t&&(a=t)}const o=t.create(s,n,void 0,a);return this.insert(o.hostView,e),o}insert(t,e){const i=t._lView,n=i[1];if(t.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");if(this.allocateContainerIfNeeded(),Tt(i[3])){const e=this.indexOf(t);if(-1!==e)this.detach(e);else{const e=i[3],n=new os(e,e[6],e[3]);n.detach(n.indexOf(t))}}const a=this._adjustIndex(e),s=this._lContainer;!function(t,e,i,n){const a=10+n,s=i.length;n>0&&(i[a-1][4]=e),n<s-10?(e[4]=i[a],ht(i,10+n,e)):(i.push(e),e[4]=null),e[3]=i;const o=e[17];null!==o&&i!==o&&function(t,e){const i=t[9];e[16]!==e[3][3][16]&&(t[2]=!0),null===i?t[9]=[e]:i.push(e)}(o,e);const r=e[19];null!==r&&r.insertView(t),e[2]|=128}(n,i,s,a);const o=function t(e,i){const n=10+e+1;if(n<i.length){const e=i[n],a=e[1].firstChild;if(null!==a)return function e(i,n){if(null!==n){const a=n.type;if(2===a)return ee(n,i);if(0===a)return t(-1,i[n.index]);if(3===a||4===a){const a=n.child;if(null!==a)return e(i,a);{const e=i[n.index];return Tt(e)?t(-1,e):Zt(e)}}{const t=i[16],a=t[6],s=Ln(t),o=a.projection[n.projection];return null!=o?e(s,o):e(i,n.next)}}return null}(e,a)}return i[7]}(a,s),r=i[11],c=Xa(r,s[7]);return null!==c&&function(t,e,i,n,a,s){n[0]=a,n[6]=e,Ja(t,n,i,1,a,s)}(n,s[6],r,i,c,o),t.attachToViewContainerRef(this),ht(s[8],a,t),t}move(t,e){if(t.destroyed)throw new Error("Cannot move a destroyed View in a ViewContainer!");return this.insert(t,e)}indexOf(t){const e=this._lContainer[8];return null!==e?e.indexOf(t):-1}remove(t){this.allocateContainerIfNeeded();const e=this._adjustIndex(t,-1),i=Na(this._lContainer,e);i&&(ut(this._lContainer[8],e),za(i[1],i))}detach(t){this.allocateContainerIfNeeded();const e=this._adjustIndex(t,-1),i=Na(this._lContainer,e);return i&&null!=ut(this._lContainer[8],e)?new is(i):null}_adjustIndex(t,e=0){return null==t?this.length+e:t}allocateContainerIfNeeded(){null===this._lContainer[8]&&(this._lContainer[8]=[])}});const s=n[i.index];if(Tt(s))a=s;else{let t;if(3===i.type)t=Zt(s);else if(t=n[11].createComment(""),Nt(n)){const e=n[11],a=ee(i,n);$a(e,Xa(e,a),t,function(t,e){return Yt(t)?t.nextSibling(e):e.nextSibling}(e,a))}else Ka(n[1],n,t,i);n[i.index]=a=wa(s,n,t,i),Sa(n,a)}return new os(a,i,n)}function ds(t=!1){return function(t,e,i){if(!i&&Ft(t)){const i=ae(t.index,e);return new is(i,i)}return 2===t.type||0===t.type||3===t.type||4===t.type?new is(e[16],e):null}(me(),pe(),t)}let hs=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>us(),t})();const us=ds,ps=Function,bs=new G("Set Injector scope."),fs={},ms={},gs=[];let vs=void 0;function _s(){return void 0===vs&&(vs=new rt),vs}function ys(t,e=null,i=null,n){return new xs(t,i,e||_s(),n)}class xs{constructor(t,e,i,n=null){this.parent=i,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;const a=[];e&&dt(e,i=>this.processProvider(i,t,e)),dt([t],t=>this.processInjectorType(t,[],a)),this.records.set(X,Ds(void 0,this));const s=this.records.get(bs);this.scope=null!=s?s.value:null,this.source=n||("object"==typeof t?null:I(t))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(t=>t.ngOnDestroy())}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}get(t,e=q,i=m.Default){this.assertNotDestroyed();const n=tt(this);try{if(!(i&m.SkipSelf)){let e=this.records.get(t);if(void 0===e){const i=("function"==typeof(a=t)||"object"==typeof a&&a instanceof G)&&x(t);e=i&&this.injectableDefInScope(i)?Ds(Cs(t),fs):null,this.records.set(t,e)}if(null!=e)return this.hydrate(t,e)}return(i&m.Self?_s():this.parent).get(t,e=i&m.Optional&&e===q?null:e)}catch(s){if("NullInjectorError"===s.name){if((s.ngTempTokenPath=s.ngTempTokenPath||[]).unshift(I(t)),n)throw s;return function(t,e,i,n){const a=t.ngTempTokenPath;throw e.__source&&a.unshift(e.__source),t.message=function(t,e,i,n=null){t=t&&"\n"===t.charAt(0)&&"\u0275"==t.charAt(1)?t.substr(2):t;let a=I(e);if(Array.isArray(e))a=e.map(I).join(" -> ");else if("object"==typeof e){let t=[];for(let i in e)if(e.hasOwnProperty(i)){let n=e[i];t.push(i+":"+("string"==typeof n?JSON.stringify(n):I(n)))}a=`{${t.join(", ")}}`}return`${i}${n?"("+n+")":""}[${a}]: ${t.replace(K,"\n ")}`}("\n"+t.message,a,i,n),t.ngTokenPath=a,t.ngTempTokenPath=null,t}(s,t,"R3InjectorError",this.source)}throw s}finally{tt(n)}var a}_resolveInjectorDefTypes(){this.injectorDefTypes.forEach(t=>this.get(t))}toString(){const t=[];return this.records.forEach((e,i)=>t.push(I(i))),`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}processInjectorType(t,e,i){if(!(t=j(t)))return!1;let n=O(t);const a=null==n&&t.ngModule||void 0,s=void 0===a?t:a,o=-1!==i.indexOf(s);if(void 0!==a&&(n=O(a)),null==n)return!1;if(null!=n.imports&&!o){let t;i.push(s);try{dt(n.imports,n=>{this.processInjectorType(n,e,i)&&(void 0===t&&(t=[]),t.push(n))})}finally{}if(void 0!==t)for(let e=0;e<t.length;e++){const{ngModule:i,providers:n}=t[e];dt(n,t=>this.processProvider(t,i,n||gs))}}this.injectorDefTypes.add(s),this.records.set(s,Ds(n.factory,fs));const r=n.providers;if(null!=r&&!o){const e=t;dt(r,t=>this.processProvider(t,e,r))}return void 0!==a&&void 0!==t.providers}processProvider(t,e,i){let n=Ms(t=j(t))?t:j(t&&t.provide);const a=function(t,e,i){return ws(t)?Ds(void 0,t.useValue):Ds(Os(t),fs)}(t);if(Ms(t)||!0!==t.multi)this.records.get(n);else{let e=this.records.get(n);e||(e=Ds(void 0,fs,!0),e.factory=()=>ot(e.multi),this.records.set(n,e)),n=t,e.multi.push(t)}this.records.set(n,a)}hydrate(t,e){var i;return e.value===fs&&(e.value=ms,e.value=e.factory()),"object"==typeof e.value&&e.value&&null!==(i=e.value)&&"object"==typeof i&&"function"==typeof i.ngOnDestroy&&this.onDestroy.add(e.value),e.value}injectableDefInScope(t){return!!t.providedIn&&("string"==typeof t.providedIn?"any"===t.providedIn||t.providedIn===this.scope:this.injectorDefTypes.has(t.providedIn))}}function Cs(t){const e=x(t),i=null!==e?e.factory:jt(t);if(null!==i)return i;const n=O(t);if(null!==n)return n.factory;if(t instanceof G)throw new Error(`Token ${I(t)} is missing a \u0275prov definition.`);if(t instanceof Function)return function(t){const e=t.length;if(e>0){const i=pt(e,"?");throw new Error(`Can't resolve all parameters for ${I(t)}: (${i.join(", ")}).`)}const i=function(t){const e=t&&(t[D]||t[k]||t[M]&&t[M]());if(e){const i=function(t){if(t.hasOwnProperty("name"))return t.name;const e=(""+t).match(/^function\s*([^\s(]+)/);return null===e?"":e[1]}(t);return console.warn(`DEPRECATED: DI is instantiating a token "${i}" 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 "${i}" class.`),e}return null}(t);return null!==i?()=>i.factory(t):()=>new t}(t);throw new Error("unreachable")}function Os(t,e,i){let n=void 0;if(Ms(t)){const e=j(t);return jt(e)||Cs(e)}if(ws(t))n=()=>j(t.useValue);else if((a=t)&&a.useFactory)n=()=>t.useFactory(...ot(t.deps||[]));else if(function(t){return!(!t||!t.useExisting)}(t))n=()=>nt(j(t.useExisting));else{const e=j(t&&(t.useClass||t.provide));if(!function(t){return!!t.deps}(t))return jt(e)||Cs(e);n=()=>new e(...ot(t.deps))}var a;return n}function Ds(t,e,i=!1){return{factory:t,value:e,multi:i?[]:void 0}}function ws(t){return null!==t&&"object"==typeof t&&Y in t}function Ms(t){return"function"==typeof t}const ks=function(t,e,i){return function(t,e=null,i=null,n){const a=ys(t,e,i,n);return a._resolveInjectorDefTypes(),a}({name:i},e,t,i)};let Ss=(()=>{class t{static create(t,e){return Array.isArray(t)?ks(t,e,""):ks(t.providers,t.parent,t.name||"")}}return t.THROW_IF_NOT_FOUND=q,t.NULL=new rt,t.\u0275prov=_({token:t,providedIn:"any",factory:()=>nt(X)}),t.__NG_ELEMENT_ID__=-1,t})();const Is=new G("AnalyzeForEntryComponents");function Ps(t,e,i){let n=i?t.styles:null,a=i?t.classes:null,s=0;if(null!==e)for(let o=0;o<e.length;o++){const t=e[o];"number"==typeof t?s=t:1==s?a=P(a,t):2==s&&(n=P(n,t+": "+e[++o]+";"))}i?t.styles=n:t.stylesWithoutHost=n,i?t.classes=a:t.classesWithoutHost=a}function Vs(t,e){const i=se(t)[1],n=i.data.length-1;Be(i,{directiveStart:n,directiveEnd:n+1})}function Rs(t){let e=Object.getPrototypeOf(t.type.prototype).constructor,i=!0;const n=[t];for(;e;){let a=void 0;if(Qt(t))a=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new Error("Directives cannot inherit Components");a=e.\u0275dir}if(a){if(i){n.push(a);const e=t;e.inputs=js(t.inputs),e.declaredInputs=js(t.declaredInputs),e.outputs=js(t.outputs);const i=a.hostBindings;i&&Ts(t,i);const s=a.viewQuery,o=a.contentQueries;if(s&&As(t,s),o&&Ws(t,o),v(t.inputs,a.inputs),v(t.declaredInputs,a.declaredInputs),v(t.outputs,a.outputs),Qt(a)&&a.data.animation){const e=t.data;e.animation=(e.animation||[]).concat(a.data.animation)}}const e=a.features;if(e)for(let n=0;n<e.length;n++){const a=e[n];a&&a.ngInherit&&a(t),a===Rs&&(i=!1)}}e=Object.getPrototypeOf(e)}!function(t){let e=0,i=null;for(let n=t.length-1;n>=0;n--){const a=t[n];a.hostVars=e+=a.hostVars,a.hostAttrs=Ze(a.hostAttrs,i=Ze(i,a.hostAttrs))}}(n)}function js(t){return t===_t?{}:t===yt?[]:t}function As(t,e){const i=t.viewQuery;t.viewQuery=i?(t,n)=>{e(t,n),i(t,n)}:e}function Ws(t,e){const i=t.contentQueries;t.contentQueries=i?(t,n,a)=>{e(t,n,a),i(t,n,a)}:e}function Ts(t,e){const i=t.hostBindings;t.hostBindings=i?(t,n)=>{e(t,n),i(t,n)}:e}let Es=null;function Fs(){if(!Es){const t=L.Symbol;if(t&&t.iterator)Es=t.iterator;else{const t=Object.getOwnPropertyNames(Map.prototype);for(let e=0;e<t.length;++e){const i=t[e];"entries"!==i&&"size"!==i&&Map.prototype[i]===Map.prototype.entries&&(Es=i)}}}return Es}class Ls{constructor(t){this.wrapped=t}static wrap(t){return new Ls(t)}static unwrap(t){return Ls.isWrapped(t)?t.wrapped:t}static isWrapped(t){return t instanceof Ls}}function Qs(t){return!!Ns(t)&&(Array.isArray(t)||!(t instanceof Map)&&Fs()in t)}function Ns(t){return null!==t&&("function"==typeof t||"object"==typeof t)}function zs(t,e,i){return t[e]=i}function Bs(t,e,i){return!Object.is(t[e],i)&&(t[e]=i,!0)}function Us(t,e,i,n){const a=Bs(t,e,i);return Bs(t,e+1,n)||a}function $s(t,e,i,n,a){const s=Us(t,e,i,n);return Bs(t,e+2,a)||s}function Hs(t,e,i,n,a,s){const o=Us(t,e,i,n);return Us(t,e+2,a,s)||o}function Gs(t,e,i,n){const a=pe();return Bs(a,De(),e)&&(be(),function(t,e,i,n,a,s){const o=ee(t,e),r=e[11];if(null==n)Yt(r)?r.removeAttribute(o,i,s):o.removeAttribute(i);else{const e=null==a?ai(n):a(n,t.tagName||"",i);Yt(r)?r.setAttribute(o,i,e,s):s?o.setAttributeNS(s,i,e):o.setAttribute(i,e)}}(Qe(),a,t,e,i,n)),Gs}function Xs(t,e,i,n){return Bs(t,De(),i)?e+ai(i)+n:Fn}function qs(t,e,i,n,a,s){const o=Us(t,Oe(),i,a);return we(2),o?e+ai(i)+n+ai(a)+s:Fn}function Ks(t,e,i,n,a,s,o,r){const c=$s(t,Oe(),i,a,o);return we(3),c?e+ai(i)+n+ai(a)+s+ai(o)+r:Fn}function Ys(t,e,i,n,a,s,o,r,c,l){const d=Hs(t,Oe(),i,a,o,c);return we(4),d?e+ai(i)+n+ai(a)+s+ai(o)+r+ai(c)+l:Fn}function Js(t,e,i,n,a,s,o,r,c,l,d,h){const u=Oe();let p=Hs(t,u,i,a,o,c);return p=Bs(t,u+4,d)||p,we(5),p?e+ai(i)+n+ai(a)+s+ai(o)+r+ai(c)+l+ai(d)+h:Fn}function Zs(t,e,i,n,a,s,o,r){const c=pe(),l=be(),d=t+20,h=l.firstCreatePass?function(t,e,i,n,a,s,o,r,c){const l=e.consts,d=ta(e,t,0,o||null,ce(l,r));pa(e,i,d,ce(l,c)),Be(e,d);const h=d.tViews=la(2,d,n,a,s,e.directiveRegistry,e.pipeRegistry,null,e.schemas,l);return null!==e.queries&&(e.queries.template(e,d),h.queries=e.queries.embeddedTView(d)),d}(t,l,c,e,i,n,a,s,o):l.data[d];ge(h,!1);const u=c[11].createComment("");Ka(l,c,u,h),Mn(u,c),Sa(c,c[d]=wa(u,c,u,h)),Lt(h)&&oa(l,c,h),null!=o&&ra(c,h,r)}function to(t){return ne(he.lFrame.contextLView,t)}function eo(t,e=m.Default){const i=pe();return null===i?nt(t,e):_i(me(),i,j(t),e)}function io(t){return function(t,e){if("class"===e)return t.classes;if("style"===e)return t.styles;const i=t.attrs;if(i){const t=i.length;let n=0;for(;n<t;){const a=i[n];if(Ye(a))break;if(0===a)n+=2;else if("number"==typeof a)for(n++;n<t&&"string"==typeof i[n];)n++;else{if(a===e)return i[n+1];n+=2}}}return null}(me(),t)}function no(t,e,i){const n=pe();return Bs(n,De(),e)&&ua(be(),Qe(),n,t,e,n[11],i,!1),no}function ao(t,e,i,n,a){const s=a?"class":"style";Ea(t,i,e.inputs[s],s,n)}function so(t,e,i,n){const a=pe(),s=be(),o=20+t,r=a[11],c=a[o]=Jn(e,r,he.lFrame.currentNamespace),l=s.firstCreatePass?function(t,e,i,n,a,s,o){const r=e.consts,c=ta(e,t,2,a,ce(r,s));return pa(e,i,c,ce(r,o)),null!==c.attrs&&Ps(c,c.attrs,!1),null!==c.mergedAttrs&&Ps(c,c.mergedAttrs,!0),null!==e.queries&&e.queries.elementStart(e,c),c}(t,s,a,0,e,i,n):s.data[o];ge(l,!0);const d=l.mergedAttrs;null!==d&&Ke(r,c,d);const h=l.classes;null!==h&&es(r,c,h);const u=l.styles;null!==u&&ts(r,c,u),Ka(s,a,c,l),0===he.lFrame.elementDepthCount&&Mn(c,a),he.lFrame.elementDepthCount++,Lt(l)&&(oa(s,a,l),sa(s,l,a)),null!==n&&ra(a,l)}function oo(){let t=me();ve()?_e():(t=t.parent,ge(t,!1));const e=t;he.lFrame.elementDepthCount--;const i=be();i.firstCreatePass&&(Be(i,t),Et(t)&&i.queries.elementEnd(t)),null!=e.classesWithoutHost&&function(t){return 0!=(16&t.flags)}(e)&&ao(i,e,pe(),e.classesWithoutHost,!0),null!=e.stylesWithoutHost&&function(t){return 0!=(32&t.flags)}(e)&&ao(i,e,pe(),e.stylesWithoutHost,!1)}function ro(t,e,i,n){so(t,e,i,n),oo()}function co(t,e,i){const n=pe(),a=be(),s=t+20,o=a.firstCreatePass?function(t,e,i,n,a){const s=e.consts,o=ce(s,n),r=ta(e,t,3,"ng-container",o);return null!==o&&Ps(r,o,!0),pa(e,i,r,ce(s,a)),null!==e.queries&&e.queries.elementStart(e,r),r}(t,a,n,e,i):a.data[s];ge(o,!0);const r=n[s]=n[11].createComment("");Ka(a,n,r,o),Mn(r,n),Lt(o)&&(oa(a,n,o),sa(a,o,n)),null!=i&&ra(n,o)}function lo(){let t=me();const e=be();ve()?_e():(t=t.parent,ge(t,!1)),e.firstCreatePass&&(Be(e,t),Et(t)&&e.queries.elementEnd(t))}function ho(t,e,i){co(t,e,i),lo()}function uo(){return pe()}function po(t){return!!t&&"function"==typeof t.then}function bo(t){return!!t&&"function"==typeof t.subscribe}function fo(t,e,i=!1,n){const a=pe(),s=be(),o=me();return go(s,a,a[11],o,t,e,i,n),fo}function mo(t,e,i=!1,n){const a=me(),s=pe(),o=be();return go(o,s,Wa(Se(o.data),a,s),a,t,e,i,n),mo}function go(t,e,i,n,a,s,o=!1,r){const c=Lt(n),l=t.firstCreatePass&&(t.cleanup||(t.cleanup=[])),d=Aa(e);let h=!0;if(2===n.type){const u=ee(n,e),p=r?r(u):_t,b=p.target||u,f=d.length,m=r?t=>r(Zt(t[n.index])).target:n.index;if(Yt(i)){let o=null;if(!r&&c&&(o=function(t,e,i,n){const a=t.cleanup;if(null!=a)for(let s=0;s<a.length-1;s+=2){const t=a[s];if(t===i&&a[s+1]===n){const t=e[7],i=a[s+2];return t.length>i?t[i]:null}"string"==typeof t&&(s+=2)}return null}(t,e,a,n.index)),null!==o)(o.__ngLastListenerFn__||o).__ngNextListenerFn__=s,o.__ngLastListenerFn__=s,h=!1;else{s=_o(n,e,s,!1);const t=i.listen(p.name||b,a,s);d.push(s,t),l&&l.push(a,m,f,f+1)}}else s=_o(n,e,s,!0),b.addEventListener(a,s,o),d.push(s),l&&l.push(a,m,f,o)}const u=n.outputs;let p;if(h&&null!==u&&(p=u[a])){const t=p.length;if(t)for(let i=0;i<t;i+=2){const t=e[p[i]][p[i+1]].subscribe(s),o=d.length;d.push(s,t),l&&l.push(a,n.index,o,-(o+1))}}}function vo(t,e,i){try{return!1!==e(i)}catch(n){return Ta(t,n),!1}}function _o(t,e,i,n){return function a(s){if(s===Function)return i;const o=2&t.flags?ae(t.index,e):e;0==(32&e[2])&&Ia(o);let r=vo(e,i,s),c=a.__ngNextListenerFn__;for(;c;)r=vo(e,c,s)&&r,c=c.__ngNextListenerFn__;return n&&!1===r&&(s.preventDefault(),s.returnValue=!1),r}}function yo(t=1){return function(t){return(he.lFrame.contextLView=function(t,e){for(;t>0;)e=e[15],t--;return e}(t,he.lFrame.contextLView))[8]}(t)}function xo(t,e){let i=null;const n=function(t){const e=t.attrs;if(null!=e){const t=e.indexOf(5);if(0==(1&t))return e[t+1]}return null}(t);for(let a=0;a<e.length;a++){const s=e[a];if("*"!==s){if(null===n?An(t,s,!0):Wn(n,s))return a}else i=a}return i}function Co(t){const e=pe()[16][6];if(!e.projection){const i=e.projection=pt(t?t.length:1,null),n=i.slice();let a=e.child;for(;null!==a;){const e=t?xo(a,t):0;null!==e&&(n[e]?n[e].projectionNext=a:i[e]=a,n[e]=a),a=a.next}}}function Oo(t,e=0,i){const n=pe(),a=be(),s=ta(a,t,1,null,i||null);null===s.projection&&(s.projection=e),_e(),function(t,e,i){Za(e[11],0,e,i,Ua(t,i,e),qa(i.parent||e[6],e))}(a,n,s)}function Do(t,e,i){return wo(t,"",e,"",i),Do}function wo(t,e,i,n,a){const s=pe(),o=Xs(s,e,i,n);return o!==Fn&&ua(be(),Qe(),s,t,o,s[11],a,!1),wo}function Mo(t,e,i,n,a,s,o){const r=pe(),c=qs(r,e,i,n,a,s);return c!==Fn&&ua(be(),Qe(),r,t,c,r[11],o,!1),Mo}function ko(t,e,i,n,a,s,o,r,c){const l=pe(),d=Ks(l,e,i,n,a,s,o,r);return d!==Fn&&ua(be(),Qe(),l,t,d,l[11],c,!1),ko}function So(t,e,i,n,a,s,o,r,c,l,d){const h=pe(),u=Ys(h,e,i,n,a,s,o,r,c,l);return u!==Fn&&ua(be(),Qe(),h,t,u,h[11],d,!1),So}const Io=[];function Po(t,e,i,n,a){const s=t[i+1],o=null===e;let r=n?Hn(s):Xn(s),c=!1;for(;0!==r&&(!1===c||o);){const i=t[r+1];Vo(t[r],e)&&(c=!0,t[r+1]=n?Kn(i):Gn(i)),r=n?Hn(i):Xn(i)}c&&(t[i+1]=n?Gn(s):Kn(s))}function Vo(t,e){return null===t||null==e||(Array.isArray(t)?t[1]:t)===e||!(!Array.isArray(t)||"string"!=typeof e)&&mt(t,e)>=0}const Ro={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function jo(t){return t.substring(Ro.key,Ro.keyEnd)}function Ao(t,e){const i=Ro.textEnd;return i===e?-1:(e=Ro.keyEnd=function(t,e,i){for(;e<i&&t.charCodeAt(e)>32;)e++;return e}(t,Ro.key=e,i),Wo(t,e,i))}function Wo(t,e,i){for(;e<i&&t.charCodeAt(e)<=32;)e++;return e}function To(t,e,i){return Qo(t,e,i,!1),To}function Eo(t,e){return Qo(t,e,null,!0),Eo}function Fo(t){No(bt,Lo,t,!0)}function Lo(t,e){for(let i=function(t){return function(t){Ro.key=0,Ro.keyEnd=0,Ro.value=0,Ro.valueEnd=0,Ro.textEnd=t.length}(t),Ao(t,Wo(t,0,Ro.textEnd))}(e);i>=0;i=Ao(e,i))bt(t,jo(e),!0)}function Qo(t,e,i,n){const a=pe(),s=be(),o=we(2);s.firstUpdatePass&&Bo(s,t,o,n),e!==Fn&&Bs(a,o,e)&&Ho(s,s.data[Fe()+20],a,a[11],t,a[o+1]=function(t,e){return null==t||("string"==typeof e?t+=e:"object"==typeof t&&(t=I(Li(t)))),t}(e,i),n,o)}function No(t,e,i,n){const a=be(),s=we(2);a.firstUpdatePass&&Bo(a,null,s,n);const o=pe();if(i!==Fn&&Bs(o,s,i)){const r=a.data[Fe()+20];if(qo(r,n)&&!zo(a,s)){let t=n?r.classesWithoutHost:r.stylesWithoutHost;null!==t&&(i=P(t,i||"")),ao(a,r,o,i,n)}else!function(t,e,i,n,a,s,o,r){a===Fn&&(a=Io);let c=0,l=0,d=0<a.length?a[0]:null,h=0<s.length?s[0]:null;for(;null!==d||null!==h;){const u=c<a.length?a[c+1]:void 0,p=l<s.length?s[l+1]:void 0;let b=null,f=void 0;d===h?(c+=2,l+=2,u!==p&&(b=h,f=p)):null===h||null!==d&&d<h?(c+=2,b=d):(l+=2,b=h,f=p),null!==b&&Ho(t,e,i,n,b,f,o,r),d=c<a.length?a[c]:null,h=l<s.length?s[l]:null}}(a,r,o,o[11],o[s+1],o[s+1]=function(t,e,i){if(null==i||""===i)return Io;const n=[],a=Li(i);if(Array.isArray(a))for(let s=0;s<a.length;s++)t(n,a[s],!0);else if("object"==typeof a)for(const s in a)a.hasOwnProperty(s)&&t(n,s,a[s]);else"string"==typeof a&&e(n,a);return n}(t,e,i),n,s)}}function zo(t,e){return e>=t.expandoStartIndex}function Bo(t,e,i,n){const a=t.data;if(null===a[i+1]){const s=a[Fe()+20],o=zo(t,i);qo(s,n)&&null===e&&!o&&(e=!1),e=function(t,e,i,n){const a=Se(t);let s=n?e.residualClasses:e.residualStyles;if(null===a)0===(n?e.classBindings:e.styleBindings)&&(i=$o(i=Uo(null,t,e,i,n),e.attrs,n),s=null);else{const o=e.directiveStylingLast;if(-1===o||t[o]!==a)if(i=Uo(a,t,e,i,n),null===s){let i=function(t,e,i){const n=i?e.classBindings:e.styleBindings;if(0!==Xn(n))return t[Hn(n)]}(t,e,n);void 0!==i&&Array.isArray(i)&&(i=Uo(null,t,e,i[1],n),i=$o(i,e.attrs,n),function(t,e,i,n){t[Hn(i?e.classBindings:e.styleBindings)]=n}(t,e,n,i))}else s=function(t,e,i){let n=void 0;const a=e.directiveEnd;for(let s=1+e.directiveStylingLast;s<a;s++)n=$o(n,t[s].hostAttrs,i);return $o(n,e.attrs,i)}(t,e,n)}return void 0!==s&&(n?e.residualClasses=s:e.residualStyles=s),i}(a,s,e,n),function(t,e,i,n,a,s){let o=s?e.classBindings:e.styleBindings,r=Hn(o),c=Xn(o);t[n]=i;let l,d=!1;if(Array.isArray(i)){const t=i;l=t[1],(null===l||mt(t,l)>0)&&(d=!0)}else l=i;if(a)if(0!==c){const e=Hn(t[r+1]);t[n+1]=$n(e,r),0!==e&&(t[e+1]=qn(t[e+1],n)),t[r+1]=131071&t[r+1]|n<<17}else t[n+1]=$n(r,0),0!==r&&(t[r+1]=qn(t[r+1],n)),r=n;else t[n+1]=$n(c,0),0===r?r=n:t[c+1]=qn(t[c+1],n),c=n;d&&(t[n+1]=Gn(t[n+1])),Po(t,l,n,!0),Po(t,l,n,!1),function(t,e,i,n,a){const s=a?t.residualClasses:t.residualStyles;null!=s&&"string"==typeof e&&mt(s,e)>=0&&(i[n+1]=Kn(i[n+1]))}(e,l,t,n,s),o=$n(r,c),s?e.classBindings=o:e.styleBindings=o}(a,s,e,i,o,n)}}function Uo(t,e,i,n,a){let s=null;const o=i.directiveEnd;let r=i.directiveStylingLast;for(-1===r?r=i.directiveStart:r++;r<o&&(s=e[r],n=$o(n,s.hostAttrs,a),s!==t);)r++;return null!==t&&(i.directiveStylingLast=r),n}function $o(t,e,i){const n=i?1:2;let a=-1;if(null!==e)for(let s=0;s<e.length;s++){const o=e[s];"number"==typeof o?a=o:a===n&&(Array.isArray(t)||(t=void 0===t?[]:["",t]),bt(t,o,!!i||e[++s]))}return void 0===t?null:t}function Ho(t,e,i,n,a,s,o,r){if(2!==e.type)return;const c=t.data,l=c[r+1];Xo(1==(1&l)?Go(c,e,i,a,Xn(l),o):void 0)||(Xo(s)||2==(2&l)&&(s=Go(c,null,i,a,r,o)),function(t,e,i,n,a){const s=Yt(t);if(e)a?s?t.addClass(i,n):i.classList.add(n):s?t.removeClass(i,n):i.classList.remove(n);else{const e=-1==n.indexOf("-")?void 0:2;null==a?s?t.removeStyle(i,n,e):i.style.removeProperty(n):s?t.setStyle(i,n,a,e):i.style.setProperty(n,a)}}(n,o,te(Fe(),i),a,s))}function Go(t,e,i,n,a,s){const o=null===e;let r=void 0;for(;a>0;){const e=t[a],s=Array.isArray(e),c=s?e[1]:e,l=null===c;let d=i[a+1];d===Fn&&(d=l?Io:void 0);let h=l?ft(d,n):c===n?d:void 0;if(s&&!Xo(h)&&(h=ft(e,n)),Xo(h)&&(r=h,o))return r;const u=t[a+1];a=o?Hn(u):Xn(u)}if(null!==e){let t=s?e.residualClasses:e.residualStyles;null!=t&&(r=ft(t,n))}return r}function Xo(t){return void 0!==t}function qo(t,e){return 0!=(t.flags&(e?16:32))}function Ko(t,e=""){const i=pe(),n=be(),a=t+20,s=n.firstCreatePass?ta(n,t,2,null,null):n.data[a],o=i[a]=function(t,e){return Yt(e)?e.createText(t):e.createTextNode(t)}(e,i[11]);Ka(n,i,o,s),ge(s,!1)}function Yo(t){return Jo("",t,""),Yo}function Jo(t,e,i){const n=pe(),a=Xs(n,t,e,i);return a!==Fn&&Fa(n,Fe(),a),Jo}function Zo(t,e,i,n,a){const s=pe(),o=qs(s,t,e,i,n,a);return o!==Fn&&Fa(s,Fe(),o),Zo}function tr(t,e,i,n,a,s,o){const r=pe(),c=Ks(r,t,e,i,n,a,s,o);return c!==Fn&&Fa(r,Fe(),c),tr}function er(t,e,i,n,a,s,o,r,c){const l=pe(),d=Ys(l,t,e,i,n,a,s,o,r,c);return d!==Fn&&Fa(l,Fe(),d),er}function ir(t,e,i,n,a,s,o,r,c,l,d){const h=pe(),u=Js(h,t,e,i,n,a,s,o,r,c,l,d);return u!==Fn&&Fa(h,Fe(),u),ir}function nr(t,e,i){No(bt,Lo,Xs(pe(),t,e,i),!0)}function ar(t,e,i,n,a,s,o,r,c,l,d){No(bt,Lo,Js(pe(),t,e,i,n,a,s,o,r,c,l,d),!0)}function sr(t,e,i){const n=pe();return Bs(n,De(),e)&&ua(be(),Qe(),n,t,e,n[11],i,!0),sr}function or(t,e,i){const n=pe();if(Bs(n,De(),e)){const a=be(),s=Qe();ua(a,s,n,t,e,Wa(Se(a.data),s,n),i,!0)}return or}const rr=void 0;var cr=["en",[["a","p"],["AM","PM"],rr],[["AM","PM"],rr,rr],[["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"]],rr,[["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"]],rr,[["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}",rr,"{1} 'at' {0}",rr],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(t){let e=Math.floor(Math.abs(t)),i=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===i?1:5}];let lr={};function dr(t,e,i){"string"!=typeof e&&(i=e,e=t[fr.LocaleId]),e=e.toLowerCase().replace(/_/g,"-"),lr[e]=t,i&&(lr[e][fr.ExtraData]=i)}function hr(t){const e=function(t){return t.toLowerCase().replace(/_/g,"-")}(t);let i=br(e);if(i)return i;const n=e.split("-")[0];if(i=br(n),i)return i;if("en"===n)return cr;throw new Error(`Missing locale data for the locale "${t}".`)}function ur(t){return hr(t)[fr.CurrencyCode]||null}function pr(t){return hr(t)[fr.PluralCase]}function br(t){return t in lr||(lr[t]=L.ng&&L.ng.common&&L.ng.common.locales&&L.ng.common.locales[t]),lr[t]}var fr=function(t){return t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData",t}({});let mr="en-US";function gr(t){var e,i;i="Expected localeId to be defined",null==(e=t)&&function(t,e,i,n){throw new Error("ASSERTION ERROR: "+t+` [Expected=> null != ${e} <=Actual]`)}(i,e),"string"==typeof t&&(mr=t.toLowerCase().replace(/_/g,"-"))}function vr(t,e,i,n,a){if(t=j(t),Array.isArray(t))for(let s=0;s<t.length;s++)vr(t[s],e,i,n,a);else{const s=be(),o=pe();let r=Ms(t)?t:j(t.provide),c=Os(t);const l=me(),d=1048575&l.providerIndexes,h=l.directiveStart,u=l.providerIndexes>>20;if(Ms(t)||!t.multi){const n=new qe(c,a,eo),p=xr(r,e,a?d:d+u,h);-1===p?(vi(bi(l,o),s,r),_r(s,t,e.length),e.push(r),l.directiveStart++,l.directiveEnd++,a&&(l.providerIndexes+=1048576),i.push(n),o.push(n)):(i[p]=n,o[p]=n)}else{const p=xr(r,e,d+u,h),b=xr(r,e,d,d+u),f=p>=0&&i[p],m=b>=0&&i[b];if(a&&!m||!a&&!f){vi(bi(l,o),s,r);const d=function(t,e,i,n,a){const s=new qe(t,i,eo);return s.multi=[],s.index=e,s.componentProviders=0,yr(s,a,n&&!i),s}(a?Or:Cr,i.length,a,n,c);!a&&m&&(i[b].providerFactory=d),_r(s,t,e.length,0),e.push(r),l.directiveStart++,l.directiveEnd++,a&&(l.providerIndexes+=1048576),i.push(d),o.push(d)}else _r(s,t,p>-1?p:b,yr(i[a?b:p],c,!a&&n));!a&&n&&m&&i[b].componentProviders++}}}function _r(t,e,i,n){const a=Ms(e);if(a||e.useClass){const s=(e.useClass||e).prototype.ngOnDestroy;if(s){const o=t.destroyHooks||(t.destroyHooks=[]);if(!a&&e.multi){const t=o.indexOf(i);-1===t?o.push(i,[n,s]):o[t+1].push(n,s)}else o.push(i,s)}}}function yr(t,e,i){return i&&t.componentProviders++,t.multi.push(e)-1}function xr(t,e,i,n){for(let a=i;a<n;a++)if(e[a]===t)return a;return-1}function Cr(t,e,i,n){return Dr(this.multi,[])}function Or(t,e,i,n){const a=this.multi;let s;if(this.providerFactory){const t=this.providerFactory.componentProviders,e=Oi(i,i[1],this.providerFactory.index,n);s=e.slice(0,t),Dr(a,s);for(let i=t;i<e.length;i++)s.push(e[i])}else s=[],Dr(a,s);return s}function Dr(t,e){for(let i=0;i<t.length;i++)e.push((0,t[i])());return e}function wr(t,e=[]){return i=>{i.providersResolver=(i,n)=>function(t,e,i){const n=be();if(n.firstCreatePass){const a=Qt(t);vr(i,n.data,n.blueprint,a,!0),vr(e,n.data,n.blueprint,a,!1)}}(i,n?n(t):t,e)}}class Mr{}class kr{resolveComponentFactory(t){throw function(t){const e=Error(`No component factory found for ${I(t)}. Did you add it to @NgModule.entryComponents?`);return e.ngComponent=t,e}(t)}}let Sr=(()=>{class t{}return t.NULL=new kr,t})(),Ir=(()=>{class t{constructor(t){this.nativeElement=t}}return t.__NG_ELEMENT_ID__=()=>Pr(t),t})();const Pr=function(t){return rs(t,me(),pe())};class Vr{}var Rr=function(t){return t[t.Important=1]="Important",t[t.DashCase=2]="DashCase",t}({});let jr=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>Ar(),t})();const Ar=function(){const t=pe(),e=ae(me().index,t);return function(t){const e=t[11];if(Yt(e))return e;throw new Error("Cannot inject Renderer2 when the application uses Renderer3!")}(Wt(e)?e:t)};let Wr=(()=>{class t{}return t.\u0275prov=_({token:t,providedIn:"root",factory:()=>null}),t})();class Tr{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const Er=new Tr("10.2.0");class Fr{constructor(){}supports(t){return Qs(t)}create(t){return new Qr(t)}}const Lr=(t,e)=>e;class Qr{constructor(t){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=t||Lr}forEachItem(t){let e;for(e=this._itHead;null!==e;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,i=this._removalsHead,n=0,a=null;for(;e||i;){const s=!i||e&&e.currentIndex<Ur(i,n,a)?e:i,o=Ur(s,n,a),r=s.currentIndex;if(s===i)n--,i=i._nextRemoved;else if(e=e._next,null==s.previousIndex)n++;else{a||(a=[]);const t=o-n,e=r-n;if(t!=e){for(let i=0;i<t;i++){const n=i<a.length?a[i]:a[i]=0,s=n+i;e<=s&&s<t&&(a[i]=n+1)}a[s.previousIndex]=e-t}}o!==r&&t(s,o,r)}}forEachPreviousItem(t){let e;for(e=this._previousItHead;null!==e;e=e._nextPrevious)t(e)}forEachAddedItem(t){let e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)}forEachMovedItem(t){let e;for(e=this._movesHead;null!==e;e=e._nextMoved)t(e)}forEachRemovedItem(t){let e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)}forEachIdentityChange(t){let e;for(e=this._identityChangesHead;null!==e;e=e._nextIdentityChange)t(e)}diff(t){if(null==t&&(t=[]),!Qs(t))throw new Error(`Error trying to diff '${I(t)}'. Only arrays and iterables are allowed`);return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let e,i,n,a=this._itHead,s=!1;if(Array.isArray(t)){this.length=t.length;for(let e=0;e<this.length;e++)i=t[e],n=this._trackByFn(e,i),null!==a&&Object.is(a.trackById,n)?(s&&(a=this._verifyReinsertion(a,i,n,e)),Object.is(a.item,i)||this._addIdentityChange(a,i)):(a=this._mismatch(a,i,n,e),s=!0),a=a._next}else e=0,function(t,e){if(Array.isArray(t))for(let i=0;i<t.length;i++)e(t[i]);else{const i=t[Fs()]();let n;for(;!(n=i.next()).done;)e(n.value)}}(t,t=>{n=this._trackByFn(e,t),null!==a&&Object.is(a.trackById,n)?(s&&(a=this._verifyReinsertion(a,t,n,e)),Object.is(a.item,t)||this._addIdentityChange(a,t)):(a=this._mismatch(a,t,n,e),s=!0),a=a._next,e++}),this.length=e;return this._truncate(a),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,e,i,n){let a;return null===t?a=this._itTail:(a=t._prev,this._remove(t)),null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(i,n))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,a,n)):null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,a,n)):t=this._addAfter(new Nr(e,i),a,n),t}_verifyReinsertion(t,e,i,n){let a=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==a?t=this._reinsertAfter(a,t._prev,n):t.currentIndex!=n&&(t.currentIndex=n,this._addToMoves(t,n)),t}_truncate(t){for(;null!==t;){const e=t._next;this._addToRemovals(this._unlink(t)),t=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(t,e,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const n=t._prevRemoved,a=t._nextRemoved;return null===n?this._removalsHead=a:n._nextRemoved=a,null===a?this._removalsTail=n:a._prevRemoved=n,this._insertAfter(t,e,i),this._addToMoves(t,i),t}_moveAfter(t,e,i){return this._unlink(t),this._insertAfter(t,e,i),this._addToMoves(t,i),t}_addAfter(t,e,i){return this._insertAfter(t,e,i),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,e,i){const n=null===e?this._itHead:e._next;return t._next=n,t._prev=e,null===n?this._itTail=t:n._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new Br),this._linkedRecords.put(t),t.currentIndex=i,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const e=t._prev,i=t._next;return null===e?this._itHead=i:e._next=i,null===i?this._itTail=e:i._prev=e,t}_addToMoves(t,e){return t.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new Br),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,e){return t.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}}class Nr{constructor(t,e){this.item=t,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 zr{constructor(){this._head=null,this._tail=null}add(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,e){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===e||e<=i.currentIndex)&&Object.is(i.trackById,t))return i;return null}remove(t){const e=t._prevDup,i=t._nextDup;return null===e?this._head=i:e._nextDup=i,null===i?this._tail=e:i._prevDup=e,null===this._head}}class Br{constructor(){this.map=new Map}put(t){const e=t.trackById;let i=this.map.get(e);i||(i=new zr,this.map.set(e,i)),i.add(t)}get(t,e){const i=this.map.get(t);return i?i.get(t,e):null}remove(t){const e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function Ur(t,e,i){const n=t.previousIndex;if(null===n)return n;let a=0;return i&&n<i.length&&(a=i[n]),n+e+a}class $r{constructor(){}supports(t){return t instanceof Map||Ns(t)}create(){return new Hr}}class Hr{constructor(){this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}get isDirty(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead}forEachItem(t){let e;for(e=this._mapHead;null!==e;e=e._next)t(e)}forEachPreviousItem(t){let e;for(e=this._previousMapHead;null!==e;e=e._nextPrevious)t(e)}forEachChangedItem(t){let e;for(e=this._changesHead;null!==e;e=e._nextChanged)t(e)}forEachAddedItem(t){let e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)}forEachRemovedItem(t){let e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)}diff(t){if(t){if(!(t instanceof Map||Ns(t)))throw new Error(`Error trying to diff '${I(t)}'. Only maps and objects are allowed`)}else t=new Map;return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let e=this._mapHead;if(this._appendAfter=null,this._forEach(t,(t,i)=>{if(e&&e.key===i)this._maybeAddToChanges(e,t),this._appendAfter=e,e=e._next;else{const n=this._getOrCreateRecordForKey(i,t);e=this._insertBeforeOrAppend(e,n)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let t=e;null!==t;t=t._nextRemoved)t===this._mapHead&&(this._mapHead=null),this._records.delete(t.key),t._nextRemoved=t._next,t.previousValue=t.currentValue,t.currentValue=null,t._prev=null,t._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,e){if(t){const i=t._prev;return e._next=t,e._prev=i,t._prev=e,i&&(i._next=e),t===this._mapHead&&(this._mapHead=e),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(t,e){if(this._records.has(t)){const i=this._records.get(t);this._maybeAddToChanges(i,e);const n=i._prev,a=i._next;return n&&(n._next=a),a&&(a._prev=n),i._next=null,i._prev=null,i}const i=new Gr(t);return this._records.set(t,i),i.currentValue=e,this._addToAdditions(i),i}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,e){Object.is(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))}_addToAdditions(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(i=>e(t[i],i))}}class Gr{constructor(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}let Xr=(()=>{class t{constructor(t){this.factories=t}static create(e,i){if(null!=i){const t=i.factories.slice();e=e.concat(t)}return new t(e)}static extend(e){return{provide:t,useFactory:i=>{if(!i)throw new Error("Cannot extend IterableDiffers without a parent injector");return t.create(e,i)},deps:[[t,new f,new p]]}}find(t){const e=this.factories.find(e=>e.supports(t));if(null!=e)return e;throw new Error(`Cannot find a differ supporting object '${t}' of type '${i=t,i.name||typeof i}'`);var i}}return t.\u0275prov=_({token:t,providedIn:"root",factory:()=>new t([new Fr])}),t})(),qr=(()=>{class t{constructor(t){this.factories=t}static create(e,i){if(i){const t=i.factories.slice();e=e.concat(t)}return new t(e)}static extend(e){return{provide:t,useFactory:i=>{if(!i)throw new Error("Cannot extend KeyValueDiffers without a parent injector");return t.create(e,i)},deps:[[t,new f,new p]]}}find(t){const e=this.factories.find(e=>e.supports(t));if(e)return e;throw new Error(`Cannot find a differ supporting object '${t}'`)}}return t.\u0275prov=_({token:t,providedIn:"root",factory:()=>new t([new $r])}),t})();const Kr=[new $r],Yr=new Xr([new Fr]),Jr=new qr(Kr);let Zr=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>tc(t,Ir),t})();const tc=function(t,e){return cs(t,e,me(),pe())};let ec=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>ic(t,Ir),t})();const ic=function(t,e){return ls(t,e,me(),pe())},nc={};class ac extends Sr{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=Rt(t);return new rc(e,this.ngModule)}}function sc(t){const e=[];for(let i in t)t.hasOwnProperty(i)&&e.push({propName:t[i],templateName:i});return e}const oc=new G("SCHEDULER_TOKEN",{providedIn:"root",factory:()=>oi});class rc extends Mr{constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=t.selectors.map(En).join(","),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}get inputs(){return sc(this.componentDef.inputs)}get outputs(){return sc(this.componentDef.outputs)}create(t,e,i,n){const a=(n=n||this.ngModule)?function(t,e){return{get:(i,n,a)=>{const s=t.get(i,nc,a);return s!==nc||n===nc?s:e.get(i,n,a)}}}(t,n.injector):t,s=a.get(Vr,Jt),o=a.get(Wr,null),r=s.createRenderer(null,this.componentDef),c=this.componentDef.selectors[0][0]||"div",l=i?function(t,e,i){if(Yt(t))return t.selectRootElement(e,i===vt.ShadowDom);let n="string"==typeof e?t.querySelector(e):e;return n.textContent="",n}(r,i,this.componentDef.encapsulation):Jn(c,s.createRenderer(null,this.componentDef),function(t){const e=t.toLowerCase();return"svg"===e?"http://www.w3.org/2000/svg":"math"===e?"http://www.w3.org/1998/MathML/":null}(c)),d=this.componentDef.onPush?576:528,h={components:[],scheduler:oi,clean:ja,playerHandler:null,flags:0},u=la(0,null,null,1,0,null,null,null,null,null),p=Zn(null,u,h,d,null,null,s,r,o,a);let b,f;Re(p);try{const t=function(t,e,i,n,a,s){const o=i[1];i[20]=t;const r=ta(o,0,2,null,null),c=r.mergedAttrs=e.hostAttrs;null!==c&&(Ps(r,c,!0),null!==t&&(Ke(a,t,c),null!==r.classes&&es(a,t,r.classes),null!==r.styles&&ts(a,t,r.styles)));const l=n.createRenderer(t,e),d=Zn(i,ca(e),null,e.onPush?64:16,i[20],r,n,l,null,null);return o.firstCreatePass&&(vi(bi(r,i),o,e.type),va(o,r),ya(r,i.length,1)),Sa(i,d),i[20]=d}(l,this.componentDef,p,s,r);if(l)if(i)Ke(r,l,["ng-version",Er.full]);else{const{attrs:t,classes:e}=function(t){const e=[],i=[];let n=1,a=2;for(;n<t.length;){let s=t[n];if("string"==typeof s)2===a?""!==s&&e.push(s,t[++n]):8===a&&i.push(s);else{if(!Rn(a))break;a=s}n++}return{attrs:e,classes:i}}(this.componentDef.selectors[0]);t&&Ke(r,l,t),e&&e.length>0&&es(r,l,e.join(" "))}if(f=ie(u,0),void 0!==e){const t=f.projection=[];for(let i=0;i<this.ngContentSelectors.length;i++){const n=e[i];t.push(null!=n?Array.from(n):null)}}b=function(t,e,i,n,a){const s=i[1],o=function(t,e,i){const n=me();t.firstCreatePass&&(i.providersResolver&&i.providersResolver(i),ga(t,n,1),xa(t,e,i));const a=Oi(e,t,e.length-1,n);Mn(a,e);const s=ee(n,e);return s&&Mn(s,e),a}(s,i,e);n.components.push(o),t[8]=o,a&&a.forEach(t=>t(o,e)),e.contentQueries&&e.contentQueries(1,o,i.length-1);const r=me();if(s.firstCreatePass&&(null!==e.hostBindings||null!==e.hostAttrs)){Le(r.index-20);const t=i[1];ba(t,e),fa(t,i,e.hostVars),ma(e,o)}return o}(t,this.componentDef,p,h,[Vs]),ea(u,p,null)}finally{Ee()}return new cc(this.componentType,b,rs(Ir,f,p),p,f)}}class cc extends class{}{constructor(t,e,i,n,a){super(),this.location=i,this._rootLView=n,this._tNode=a,this.destroyCbs=[],this.instance=e,this.hostView=this.changeDetectorRef=new ns(n),this.componentType=t}get injector(){return new Mi(this._tNode,this._rootLView)}destroy(){this.destroyCbs&&(this.destroyCbs.forEach(t=>t()),this.destroyCbs=null,!this.hostView.destroyed&&this.hostView.destroy())}onDestroy(t){this.destroyCbs&&this.destroyCbs.push(t)}}const lc=new Map;class dc extends ct{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.injector=this,this.destroyCbs=[],this.componentFactoryResolver=new ac(this);const i=At(t),n=t[U]||null;n&&gr(n),this._bootstrapComponents=di(i.bootstrap),this._r3Injector=ys(t,e,[{provide:ct,useValue:this},{provide:Sr,useValue:this.componentFactoryResolver}],I(t)),this._r3Injector._resolveInjectorDefTypes(),this.instance=this.get(t)}get(t,e=Ss.THROW_IF_NOT_FOUND,i=m.Default){return t===Ss||t===ct||t===X?this:this._r3Injector.get(t,e,i)}destroy(){const t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}}class hc extends lt{constructor(t){super(),this.moduleType=t,null!==At(t)&&function t(e){if(null!==e.\u0275mod.id){const t=e.\u0275mod.id;(function(t,e,i){if(e&&e!==i)throw new Error(`Duplicate module registered for ${t} - ${I(e)} vs ${I(e.name)}`)})(t,lc.get(t),e),lc.set(t,e)}let i=e.\u0275mod.imports;i instanceof Function&&(i=i()),i&&i.forEach(e=>t(e))}(t)}create(t){return new dc(this.moduleType,t)}}function uc(t,e,i){const n=Ce()+t,a=pe();return a[n]===Fn?zs(a,n,i?e.call(i):e()):function(t,e){return t[e]}(a,n)}function pc(t,e,i,n){return gc(pe(),Ce(),t,e,i,n)}function bc(t,e,i,n,a){return vc(pe(),Ce(),t,e,i,n,a)}function fc(t,e,i,n,a,s){return _c(pe(),Ce(),t,e,i,n,a,s)}function mc(t,e){const i=t[e];return i===Fn?void 0:i}function gc(t,e,i,n,a,s){const o=e+i;return Bs(t,o,a)?zs(t,o+1,s?n.call(s,a):n(a)):mc(t,o+1)}function vc(t,e,i,n,a,s,o){const r=e+i;return Us(t,r,a,s)?zs(t,r+2,o?n.call(o,a,s):n(a,s)):mc(t,r+2)}function _c(t,e,i,n,a,s,o,r){const c=e+i;return $s(t,c,a,s,o)?zs(t,c+3,r?n.call(r,a,s,o):n(a,s,o)):mc(t,c+3)}function yc(t,e){const i=be();let n;const a=t+20;i.firstCreatePass?(n=function(t,e){if(e)for(let i=e.length-1;i>=0;i--){const n=e[i];if(t===n.name)return n}throw new Error(`The pipe '${t}' could not be found!`)}(e,i.pipeRegistry),i.data[a]=n,n.onDestroy&&(i.destroyHooks||(i.destroyHooks=[])).push(a,n.onDestroy)):n=i.data[a];const s=n.factory||(n.factory=jt(n.type)),o=et(eo);try{const e=ui(!1),n=s();return ui(e),function(t,e,i,n){const a=i+20;a>=t.data.length&&(t.data[a]=null,t.blueprint[a]=null),e[a]=n}(i,pe(),t,n),n}finally{et(o)}}function xc(t,e,i){const n=pe(),a=ne(n,t);return wc(n,Dc(n,t)?gc(n,Ce(),e,a.transform,i,a):a.transform(i))}function Cc(t,e,i,n){const a=pe(),s=ne(a,t);return wc(a,Dc(a,t)?vc(a,Ce(),e,s.transform,i,n,s):s.transform(i,n))}function Oc(t,e,i,n,a){const s=pe(),o=ne(s,t);return wc(s,Dc(s,t)?_c(s,Ce(),e,o.transform,i,n,a,o):o.transform(i,n,a))}function Dc(t,e){return t[1].data[e+20].pure}function wc(t,e){return Ls.isWrapped(e)&&(e=Ls.unwrap(e),t[Oe()]=Fn),e}const Mc=class extends n.a{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,e,i){let n,s=t=>null,o=()=>null;t&&"object"==typeof t?(n=this.__isAsync?e=>{setTimeout(()=>t.next(e))}:e=>{t.next(e)},t.error&&(s=this.__isAsync?e=>{setTimeout(()=>t.error(e))}:e=>{t.error(e)}),t.complete&&(o=this.__isAsync?()=>{setTimeout(()=>t.complete())}:()=>{t.complete()})):(n=this.__isAsync?e=>{setTimeout(()=>t(e))}:e=>{t(e)},e&&(s=this.__isAsync?t=>{setTimeout(()=>e(t))}:t=>{e(t)}),i&&(o=this.__isAsync?()=>{setTimeout(()=>i())}:()=>{i()}));const r=super.subscribe(n,s,o);return t instanceof a.a&&t.add(r),r}};function kc(){return this._results[Fs()]()}class Sc{constructor(){this.dirty=!0,this._results=[],this.changes=new Mc,this.length=0;const t=Fs(),e=Sc.prototype;e[t]||(e[t]=kc)}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,e){return this._results.reduce(t,e)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t){this._results=function t(e,i){void 0===i&&(i=e);for(let n=0;n<e.length;n++){let a=e[n];Array.isArray(a)?(i===e&&(i=e.slice(0,n)),t(a,i)):i!==e&&i.push(a)}return i}(t),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]}notifyOnChanges(){this.changes.emit(this)}setDirty(){this.dirty=!0}destroy(){this.changes.complete(),this.changes.unsubscribe()}}class Ic{constructor(t){this.queryList=t,this.matches=null}clone(){return new Ic(this.queryList)}setDirty(){this.queryList.setDirty()}}class Pc{constructor(t=[]){this.queries=t}createEmbeddedView(t){const e=t.queries;if(null!==e){const i=null!==t.contentQueries?t.contentQueries[0]:e.length,n=[];for(let t=0;t<i;t++){const i=e.getByIndex(t);n.push(this.queries[i.indexInDeclarationView].clone())}return new Pc(n)}return null}insertView(t){this.dirtyQueriesWithMatches(t)}detachView(t){this.dirtyQueriesWithMatches(t)}dirtyQueriesWithMatches(t){for(let e=0;e<this.queries.length;e++)null!==Gc(t,e).matches&&this.queries[e].setDirty()}}class Vc{constructor(t,e,i,n=null){this.predicate=t,this.descendants=e,this.isStatic=i,this.read=n}}class Rc{constructor(t=[]){this.queries=t}elementStart(t,e){for(let i=0;i<this.queries.length;i++)this.queries[i].elementStart(t,e)}elementEnd(t){for(let e=0;e<this.queries.length;e++)this.queries[e].elementEnd(t)}embeddedTView(t){let e=null;for(let i=0;i<this.length;i++){const n=null!==e?e.length:0,a=this.getByIndex(i).embeddedTView(t,n);a&&(a.indexInDeclarationView=i,null!==e?e.push(a):e=[a])}return null!==e?new Rc(e):null}template(t,e){for(let i=0;i<this.queries.length;i++)this.queries[i].template(t,e)}getByIndex(t){return this.queries[t]}get length(){return this.queries.length}track(t){this.queries.push(t)}}class jc{constructor(t,e=-1){this.metadata=t,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=e}elementStart(t,e){this.isApplyingToNode(e)&&this.matchTNode(t,e)}elementEnd(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}template(t,e){this.elementStart(t,e)}embeddedTView(t,e){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,e),new jc(this.metadata)):null}isApplyingToNode(t){if(this._appliesToNextNode&&!1===this.metadata.descendants){const e=this._declarationNodeIndex;let i=t.parent;for(;null!==i&&3===i.type&&i.index!==e;)i=i.parent;return e===(null!==i?i.index:-1)}return this._appliesToNextNode}matchTNode(t,e){const i=this.metadata.predicate;if(Array.isArray(i))for(let n=0;n<i.length;n++){const a=i[n];this.matchTNodeWithReadOption(t,e,Ac(e,a)),this.matchTNodeWithReadOption(t,e,Ci(e,t,a,!1,!1))}else i===Zr?0===e.type&&this.matchTNodeWithReadOption(t,e,-1):this.matchTNodeWithReadOption(t,e,Ci(e,t,i,!1,!1))}matchTNodeWithReadOption(t,e,i){if(null!==i){const n=this.metadata.read;if(null!==n)if(n===Ir||n===ec||n===Zr&&0===e.type)this.addMatch(e.index,-2);else{const i=Ci(e,t,n,!1,!1);null!==i&&this.addMatch(e.index,i)}else this.addMatch(e.index,i)}}addMatch(t,e){null===this.matches?this.matches=[t,e]:this.matches.push(t,e)}}function Ac(t,e){const i=t.localNames;if(null!==i)for(let n=0;n<i.length;n+=2)if(i[n]===e)return i[n+1];return null}function Wc(t,e,i,n){return-1===i?function(t,e){return 2===t.type||3===t.type?rs(Ir,t,e):0===t.type?cs(Zr,Ir,t,e):null}(e,t):-2===i?function(t,e,i){return i===Ir?rs(Ir,e,t):i===Zr?cs(Zr,Ir,e,t):i===ec?ls(ec,Ir,e,t):void 0}(t,e,n):Oi(t,t[1],i,e)}function Tc(t,e,i,n){const a=e[19].queries[n];if(null===a.matches){const n=t.data,s=i.matches,o=[];for(let t=0;t<s.length;t+=2){const a=s[t];o.push(a<0?null:Wc(e,n[a],s[t+1],i.metadata.read))}a.matches=o}return a.matches}function Ec(t){const e=pe(),i=be(),n=Ie();Pe(n+1);const a=Gc(i,n);if(t.dirty&&oe(e)===a.metadata.isStatic){if(null===a.matches)t.reset([]);else{const s=a.crossesNgTemplate?function t(e,i,n,a){const s=e.queries.getByIndex(n),o=s.matches;if(null!==o){const r=Tc(e,i,s,n);for(let e=0;e<o.length;e+=2){const n=o[e];if(n>0)a.push(r[e/2]);else{const s=o[e+1],r=i[-n];for(let e=10;e<r.length;e++){const i=r[e];i[17]===i[3]&&t(i[1],i,s,a)}if(null!==r[9]){const e=r[9];for(let i=0;i<e.length;i++){const n=e[i];t(n[1],n,s,a)}}}}}return a}(i,e,n,[]):Tc(i,e,a,n);t.reset(s),t.notifyOnChanges()}return!0}return!1}function Fc(t,e,i){Qc(be(),pe(),t,e,i,!0)}function Lc(t,e,i){Qc(be(),pe(),t,e,i,!1)}function Qc(t,e,i,n,a,s){t.firstCreatePass&&(Hc(t,new Vc(i,n,s,a),-1),s&&(t.staticViewQueries=!0)),$c(t,e)}function Nc(t,e,i,n){Bc(be(),pe(),e,i,n,!1,me(),t)}function zc(t,e,i,n){Bc(be(),pe(),e,i,n,!0,me(),t)}function Bc(t,e,i,n,a,s,o,r){t.firstCreatePass&&(Hc(t,new Vc(i,n,s,a),o.index),function(t,e){const i=t.contentQueries||(t.contentQueries=[]);e!==(t.contentQueries.length?i[i.length-1]:-1)&&i.push(t.queries.length-1,e)}(t,r),s&&(t.staticContentQueries=!0)),$c(t,e)}function Uc(){return t=pe(),e=Ie(),t[19].queries[e].queryList;var t,e}function $c(t,e){const i=new Sc;da(t,e,i,i.destroy),null===e[19]&&(e[19]=new Pc),e[19].queries.push(new Ic(i))}function Hc(t,e,i){null===t.queries&&(t.queries=new Rc),t.queries.track(new jc(e,i))}function Gc(t,e){return t.queries.getByIndex(e)}function Xc(t,e){return cs(Zr,Ir,t,e)}function qc(t=m.Default){const e=ds(!0);if(null!=e||t&m.Optional)return e;throw new Error("No provider for ChangeDetectorRef!")}const Kc=h("Input",t=>({bindingPropertyName:t})),Yc=h("Output",t=>({bindingPropertyName:t})),Jc=new G("Application Initializer");let Zc=(()=>{class t{constructor(t){this.appInits=t,this.initialized=!1,this.done=!1,this.donePromise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}runInitializers(){if(this.initialized)return;const t=[],e=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let i=0;i<this.appInits.length;i++){const e=this.appInits[i]();po(e)&&t.push(e)}Promise.all(t).then(()=>{e()}).catch(t=>{this.reject(t)}),0===t.length&&e(),this.initialized=!0}}return t.\u0275fac=function(e){return new(e||t)(nt(Jc,8))},t.\u0275prov=_({token:t,factory:t.\u0275fac}),t})();const tl=new G("AppId"),el={provide:tl,useFactory:function(){return`${il()}${il()}${il()}`},deps:[]};function il(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const nl=new G("Platform Initializer"),al=new G("Platform ID"),sl=new G("appBootstrapListener");let ol=(()=>{class t{log(t){console.log(t)}warn(t){console.warn(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=_({token:t,factory:t.\u0275fac}),t})();const rl=new G("LocaleId"),cl=new G("DefaultCurrencyCode");class ll{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}const dl=function(t){return new hc(t)},hl=dl,ul=function(t){return Promise.resolve(dl(t))},pl=function(t){const e=dl(t),i=di(At(t).declarations).reduce((t,e)=>{const i=Rt(e);return i&&t.push(new rc(i)),t},[]);return new ll(e,i)},bl=pl,fl=function(t){return Promise.resolve(pl(t))};let ml=(()=>{class t{constructor(){this.compileModuleSync=hl,this.compileModuleAsync=ul,this.compileModuleAndAllComponentsSync=bl,this.compileModuleAndAllComponentsAsync=fl}clearCache(){}clearCacheFor(t){}getModuleId(t){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=_({token:t,factory:t.\u0275fac}),t})();const gl=(()=>Promise.resolve(0))();function vl(t){"undefined"==typeof Zone?gl.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class _l{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Mc(!1),this.onMicrotaskEmpty=new Mc(!1),this.onStable=new Mc(!1),this.onError=new Mc(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched(),this._nesting=0,this._outer=this._inner=Zone.current,Zone.wtfZoneSpec&&(this._inner=this._inner.fork(Zone.wtfZoneSpec)),Zone.TaskTrackingZoneSpec&&(this._inner=this._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(this._inner=this._inner.fork(Zone.longStackTraceZoneSpec)),this.shouldCoalesceEventChangeDetection=e,this.lastRequestAnimationFrameId=-1,this.nativeRequestAnimationFrame=function(){let t=L.requestAnimationFrame,e=L.cancelAnimationFrame;if("undefined"!=typeof Zone&&t&&e){const i=t[Zone.__symbol__("OriginalDelegate")];i&&(t=i);const n=e[Zone.__symbol__("OriginalDelegate")];n&&(e=n)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function(t){const e=!!t.shouldCoalesceEventChangeDetection&&t.nativeRequestAnimationFrame&&(()=>{!function(t){-1===t.lastRequestAnimationFrameId&&(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(L,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,Ol(t),Cl(t)},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),Ol(t))}(t)});t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0,maybeDelayChangeDetection:e},onInvokeTask:(i,n,a,s,o,r)=>{try{return Dl(t),i.invokeTask(a,s,o,r)}finally{e&&"eventTask"===s.type&&e(),wl(t)}},onInvoke:(e,i,n,a,s,o,r)=>{try{return Dl(t),e.invoke(n,a,s,o,r)}finally{wl(t)}},onHasTask:(e,i,n,a)=>{e.hasTask(n,a),i===n&&("microTask"==a.change?(t._hasPendingMicrotasks=a.microTask,Ol(t),Cl(t)):"macroTask"==a.change&&(t.hasPendingMacrotasks=a.macroTask))},onHandleError:(e,i,n,a)=>(e.handleError(n,a),t.runOutsideAngular(()=>t.onError.emit(a)),!1)})}(this)}static isInAngularZone(){return!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!_l.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(_l.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(t,e,i){return this._inner.run(t,e,i)}runTask(t,e,i,n){const a=this._inner,s=a.scheduleEventTask("NgZoneEvent: "+n,t,xl,yl,yl);try{return a.runTask(s,e,i)}finally{a.cancelTask(s)}}runGuarded(t,e,i){return this._inner.runGuarded(t,e,i)}runOutsideAngular(t){return this._outer.run(t)}}function yl(){}const xl={};function Cl(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 Ol(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||t.shouldCoalesceEventChangeDetection&&-1!==t.lastRequestAnimationFrameId)}function Dl(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function wl(t){t._nesting--,Cl(t)}class Ml{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Mc,this.onMicrotaskEmpty=new Mc,this.onStable=new Mc,this.onError=new Mc}run(t,e,i){return t.apply(e,i)}runGuarded(t,e,i){return t.apply(e,i)}runOutsideAngular(t){return t()}runTask(t,e,i,n){return t.apply(e,i)}}let kl=(()=>{class t{constructor(t){this._ngZone=t,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),t.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:()=>{_l.assertNotInAngularZone(),vl(()=>{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())vl(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(this._didWork)}this._didWork=!1});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(e=>!e.updateCb||!e.updateCb(t)||(clearTimeout(e.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,e,i){let n=-1;e&&e>0&&(n=setTimeout(()=>{this._callbacks=this._callbacks.filter(t=>t.timeoutId!==n),t(this._didWork,this.getPendingTasks())},e)),this._callbacks.push({doneCb:t,timeoutId:n,updateCb:i})}whenStable(t,e,i){if(i&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(t,e,i),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(t,e,i){return[]}}return t.\u0275fac=function(e){return new(e||t)(nt(_l))},t.\u0275prov=_({token:t,factory:t.\u0275fac}),t})(),Sl=(()=>{class t{constructor(){this._applications=new Map,Rl.addToWindow(this)}registerApplication(t,e){this._applications.set(t,e)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,e=!0){return Rl.findTestabilityInTree(this,t,e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=_({token:t,factory:t.\u0275fac}),t})();class Il{addToWindow(t){}findTestabilityInTree(t,e,i){return null}}function Pl(t){Rl=t}let Vl,Rl=new Il;const jl=new G("AllowMultipleToken");class Al{constructor(t,e){this.name=t,this.token=e}}function Wl(t,e,i=[]){const n="Platform: "+e,a=new G(n);return(e=[])=>{let s=Tl();if(!s||s.injector.get(jl,!1))if(t)t(i.concat(e).concat({provide:a,useValue:!0}));else{const t=i.concat(e).concat({provide:a,useValue:!0},{provide:bs,useValue:"platform"});!function(t){if(Vl&&!Vl.destroyed&&!Vl.injector.get(jl,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");Vl=t.get(El);const e=t.get(nl,null);e&&e.forEach(t=>t())}(Ss.create({providers:t,name:n}))}return function(t){const e=Tl();if(!e)throw new Error("No platform exists!");if(!e.injector.get(t,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return e}(a)}}function Tl(){return Vl&&!Vl.destroyed?Vl:null}let El=(()=>{class t{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,e){const i=function(t,e){let i;return i="noop"===t?new Ml:("zone.js"===t?void 0:t)||new _l({enableLongStackTrace:qi(),shouldCoalesceEventChangeDetection:e}),i}(e?e.ngZone:void 0,e&&e.ngZoneEventCoalescing||!1),n=[{provide:_l,useValue:i}];return i.run(()=>{const e=Ss.create({providers:n,parent:this.injector,name:t.moduleType.name}),a=t.create(e),s=a.injector.get(Ri,null);if(!s)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return a.onDestroy(()=>Ql(this._modules,a)),i.runOutsideAngular(()=>i.onError.subscribe({next:t=>{s.handleError(t)}})),function(t,e,i){try{const n=i();return po(n)?n.catch(i=>{throw e.runOutsideAngular(()=>t.handleError(i)),i}):n}catch(n){throw e.runOutsideAngular(()=>t.handleError(n)),n}}(s,i,()=>{const t=a.injector.get(Zc);return t.runInitializers(),t.donePromise.then(()=>(gr(a.injector.get(rl,"en-US")||"en-US"),this._moduleDoBootstrap(a),a))})})}bootstrapModule(t,e=[]){const i=Fl({},e);return function(t,e,i){const n=new hc(i);return Promise.resolve(n)}(0,0,t).then(t=>this.bootstrapModuleFactory(t,i))}_moduleDoBootstrap(t){const e=t.injector.get(Ll);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(t=>e.bootstrap(t));else{if(!t.instance.ngDoBootstrap)throw new Error(`The module ${I(t.instance.constructor)} was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.`);t.instance.ngDoBootstrap(e)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(t=>t.destroy()),this._destroyListeners.forEach(t=>t()),this._destroyed=!0}get destroyed(){return this._destroyed}}return t.\u0275fac=function(e){return new(e||t)(nt(Ss))},t.\u0275prov=_({token:t,factory:t.\u0275fac}),t})();function Fl(t,e){return Array.isArray(e)?e.reduce(Fl,t):Object.assign(Object.assign({},t),e)}let Ll=(()=>{class t{constructor(t,e,i,n,a,c){this._zone=t,this._console=e,this._injector=i,this._exceptionHandler=n,this._componentFactoryResolver=a,this._initStatus=c,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=qi(),this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const l=new s.a(t=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{t.next(this._stable),t.complete()})}),d=new s.a(t=>{let e;this._zone.runOutsideAngular(()=>{e=this._zone.onStable.subscribe(()=>{_l.assertNotInAngularZone(),vl(()=>{this._stable||this._zone.hasPendingMacrotasks||this._zone.hasPendingMicrotasks||(this._stable=!0,t.next(!0))})})});const i=this._zone.onUnstable.subscribe(()=>{_l.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{t.next(!1)}))});return()=>{e.unsubscribe(),i.unsubscribe()}});this.isStable=Object(o.a)(l,d.pipe(Object(r.a)()))}bootstrap(t,e){if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");let i;i=t instanceof Mr?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(i.componentType);const n=i.isBoundToModule?void 0:this._injector.get(ct),a=i.create(Ss.NULL,[],e||i.selector,n);a.onDestroy(()=>{this._unloadComponent(a)});const s=a.injector.get(kl,null);return s&&a.injector.get(Sl).registerApplication(a.location.nativeElement,s),this._loadComponent(a),qi()&&this._console.log("Angular is running in development mode. Call enableProdMode() to enable production mode."),a}tick(){if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;for(let t of this._views)t.detectChanges();if(this._enforceNoNewChanges)for(let t of this._views)t.checkNoChanges()}catch(t){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(t))}finally{this._runningTick=!1}}attachView(t){const e=t;this._views.push(e),e.attachToAppRef(this)}detachView(t){const e=t;Ql(this._views,e),e.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(sl,[]).concat(this._bootstrapListeners).forEach(e=>e(t))}_unloadComponent(t){this.detachView(t.hostView),Ql(this.components,t)}ngOnDestroy(){this._views.slice().forEach(t=>t.destroy())}get viewCount(){return this._views.length}}return t.\u0275fac=function(e){return new(e||t)(nt(_l),nt(ol),nt(Ss),nt(Ri),nt(Sr),nt(Zc))},t.\u0275prov=_({token:t,factory:t.\u0275fac}),t})();function Ql(t,e){const i=t.indexOf(e);i>-1&&t.splice(i,1)}class Nl{}class zl{}const Bl={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"};let Ul=(()=>{class t{constructor(t,e){this._compiler=t,this._config=e||Bl}load(t){return this.loadAndCompile(t)}loadAndCompile(t){let[e,n]=t.split("#");return void 0===n&&(n="default"),i("TCaw")(e).then(t=>t[n]).then(t=>$l(t,e,n)).then(t=>this._compiler.compileModuleAsync(t))}loadFactory(t){let[e,n]=t.split("#"),a="NgFactory";return void 0===n&&(n="default",a=""),i("TCaw")(this._config.factoryPathPrefix+e+this._config.factoryPathSuffix).then(t=>t[n+a]).then(t=>$l(t,e,n))}}return t.\u0275fac=function(e){return new(e||t)(nt(ml),nt(zl,8))},t.\u0275prov=_({token:t,factory:t.\u0275fac}),t})();function $l(t,e,i){if(!t)throw new Error(`Cannot find '${i}' in '${e}'`);return t}class Hl extends hs{}class Gl extends Hl{}const Xl=function(t){return null},ql=Wl(null,"core",[{provide:al,useValue:"unknown"},{provide:El,deps:[Ss]},{provide:Sl,deps:[]},{provide:ol,deps:[]}]),Kl=[{provide:Ll,useClass:Ll,deps:[_l,ol,Ss,Ri,Sr,Zc]},{provide:oc,deps:[_l],useFactory:function(t){let e=[];return t.onStable.subscribe(()=>{for(;e.length;)e.pop()()}),function(t){e.push(t)}}},{provide:Zc,useClass:Zc,deps:[[new p,Jc]]},{provide:ml,useClass:ml,deps:[]},el,{provide:Xr,useFactory:function(){return Yr},deps:[]},{provide:qr,useFactory:function(){return Jr},deps:[]},{provide:rl,useFactory:function(t){return gr(t=t||"undefined"!=typeof $localize&&$localize.locale||"en-US"),t},deps:[[new u(rl),new p,new f]]},{provide:cl,useValue:"USD"}];let Yl=(()=>{class t{constructor(t){}}return t.\u0275mod=kt({type:t}),t.\u0275inj=y({factory:function(e){return new(e||t)(nt(Ll))},providers:Kl}),t})()},g9mw:function(t,e){t.exports=function(){"use strict";function t(t){this.config=t=t||{},this.config.id=t.id||"id",this.config.parent=t.parent||"parent",this.config.children=t.children||"children",this.config.options=t.options||{deleteParent:!0}}function e(t,e,i){void 0===e[t]&&(e[t]=[]),e[t].push(i)}function i(t,e,i){var n;for(n=i.length,void 0===e[t]&&(e[t]=[]);n-- >0;)e[t].push(i.shift())}return t.prototype.convert=function(t){var n,a,s,o,r,c,l,d,h;for(n=0,o=[],s={},d={},a=t.length;n<a;n++)c=(h=t[n])[this.config.parent],s[r=h[this.config.id]]=h,null==c?o.push(h):(void 0!==s[c]?e(this.config.children,s[c],h):e(c,d,h),this.config.options.deleteParent&&delete h[this.config.parent]),void 0!==d[r]&&i(this.config.children,h,d[r]);return 1===o.length?l=o[0]:o.length>1?(l={})[this.config.children]=o:l={},l},t}()},gRHU:function(t,e,i){"use strict";i.d(e,"a",(function(){return s}));var n=i("2fFW"),a=i("NJ4a");const s={closed:!0,next(t){},error(t){if(n.a.useDeprecatedSynchronousErrorHandling)throw t;Object(a.a)(t)},complete(){}}},iadO:function(t,e,i){"use strict";i.d(e,"a",(function(){return ut})),i.d(e,"b",(function(){return $})),i.d(e,"c",(function(){return ht})),i.d(e,"d",(function(){return Lt})),i.d(e,"e",(function(){return Tt})),i.d(e,"f",(function(){return xt})),i.d(e,"g",(function(){return _t})),i.d(e,"h",(function(){return St})),i.d(e,"i",(function(){return Qt})),i.d(e,"j",(function(){return Pt})),i.d(e,"k",(function(){return It})),i.d(e,"l",(function(){return Wt})),i.d(e,"m",(function(){return st})),i.d(e,"n",(function(){return ot})),i.d(e,"o",(function(){return At})),i.d(e,"p",(function(){return dt}));var n=i("u47x"),a=i("rDax"),s=i("+rOU"),o=i("ofXK"),r=i("fXoL"),c=i("bTqV"),l=i("0IaG"),d=i("vxfF"),h=i("FKr1"),u=i("XNiG"),p=i("quSY"),b=i("VRyK"),f=i("LRne"),m=i("FtGj"),g=i("IzEk"),v=i("JX91"),_=i("pLZG"),y=i("8LU1"),x=i("R0Ic"),C=i("3Pt+"),O=i("kmnG"),D=i("qFsG"),w=i("cH1L");const M=["mat-calendar-body",""];function k(t,e){if(1&t&&(r.Wb(0,"tr",2),r.Wb(1,"td",3),r.Qc(2),r.Vb(),r.Vb()),2&t){const t=r.hc();r.Db(1),r.Lc("padding-top",t._cellPadding)("padding-bottom",t._cellPadding),r.Eb("colspan",t.numCols),r.Db(1),r.Sc(" ",t.label," ")}}function S(t,e){if(1&t&&(r.Wb(0,"td",7),r.Qc(1),r.Vb()),2&t){const t=r.hc(2);r.Lc("padding-top",t._cellPadding)("padding-bottom",t._cellPadding),r.Eb("colspan",t._firstRowOffset),r.Db(1),r.Sc(" ",t._firstRowOffset>=t.labelMinRequiredCells?t.label:""," ")}}function I(t,e){if(1&t){const t=r.Xb();r.Wb(0,"td",8),r.dc("click",(function(i){r.Dc(t);const n=e.$implicit;return r.hc(2)._cellClicked(n,i)})),r.Wb(1,"div",9),r.Qc(2),r.Vb(),r.Rb(3,"div",10),r.Vb()}if(2&t){const t=e.$implicit,i=e.index,n=r.hc().index,a=r.hc();r.Lc("width",a._cellWidth)("padding-top",a._cellPadding)("padding-bottom",a._cellPadding),r.Ib("mat-calendar-body-disabled",!t.enabled)("mat-calendar-body-active",a._isActiveCell(n,i))("mat-calendar-body-range-start",a._isRangeStart(t.compareValue))("mat-calendar-body-range-end",a._isRangeEnd(t.compareValue))("mat-calendar-body-in-range",a._isInRange(t.compareValue))("mat-calendar-body-comparison-bridge-start",a._isComparisonBridgeStart(t.compareValue,n,i))("mat-calendar-body-comparison-bridge-end",a._isComparisonBridgeEnd(t.compareValue,n,i))("mat-calendar-body-comparison-start",a._isComparisonStart(t.compareValue))("mat-calendar-body-comparison-end",a._isComparisonEnd(t.compareValue))("mat-calendar-body-in-comparison-range",a._isInComparisonRange(t.compareValue))("mat-calendar-body-preview-start",a._isPreviewStart(t.compareValue))("mat-calendar-body-preview-end",a._isPreviewEnd(t.compareValue))("mat-calendar-body-in-preview",a._isInPreview(t.compareValue)),r.oc("ngClass",t.cssClasses)("tabindex",a._isActiveCell(n,i)?0:-1),r.Eb("data-mat-row",n)("data-mat-col",i)("aria-label",t.ariaLabel)("aria-disabled",!t.enabled||null)("aria-selected",a._isSelected(t.compareValue)),r.Db(1),r.Ib("mat-calendar-body-selected",a._isSelected(t.compareValue))("mat-calendar-body-comparison-identical",a._isComparisonIdentical(t.compareValue))("mat-calendar-body-today",a.todayValue===t.compareValue),r.Db(1),r.Sc(" ",t.displayValue," ")}}function P(t,e){if(1&t&&(r.Wb(0,"tr",4),r.Oc(1,S,2,6,"td",5),r.Oc(2,I,4,46,"td",6),r.Vb()),2&t){const t=e.$implicit,i=e.index,n=r.hc();r.Db(1),r.oc("ngIf",0===i&&n._firstRowOffset),r.Db(1),r.oc("ngForOf",t)}}function V(t,e){if(1&t&&(r.Wb(0,"th",5),r.Qc(1),r.Vb()),2&t){const t=e.$implicit;r.Eb("aria-label",t.long),r.Db(1),r.Rc(t.narrow)}}const R=["*"];function j(t,e){}function A(t,e){if(1&t){const t=r.Xb();r.Wb(0,"mat-month-view",5),r.dc("activeDateChange",(function(e){return r.Dc(t),r.hc().activeDate=e}))("_userSelection",(function(e){return r.Dc(t),r.hc()._dateSelected(e)})),r.Vb()}if(2&t){const t=r.hc();r.oc("activeDate",t.activeDate)("selected",t.selected)("dateFilter",t.dateFilter)("maxDate",t.maxDate)("minDate",t.minDate)("dateClass",t.dateClass)("comparisonStart",t.comparisonStart)("comparisonEnd",t.comparisonEnd)}}function W(t,e){if(1&t){const t=r.Xb();r.Wb(0,"mat-year-view",6),r.dc("activeDateChange",(function(e){return r.Dc(t),r.hc().activeDate=e}))("monthSelected",(function(e){return r.Dc(t),r.hc()._monthSelectedInYearView(e)}))("selectedChange",(function(e){return r.Dc(t),r.hc()._goToDateInView(e,"month")})),r.Vb()}if(2&t){const t=r.hc();r.oc("activeDate",t.activeDate)("selected",t.selected)("dateFilter",t.dateFilter)("maxDate",t.maxDate)("minDate",t.minDate)("dateClass",t.dateClass)}}function T(t,e){if(1&t){const t=r.Xb();r.Wb(0,"mat-multi-year-view",7),r.dc("activeDateChange",(function(e){return r.Dc(t),r.hc().activeDate=e}))("yearSelected",(function(e){return r.Dc(t),r.hc()._yearSelectedInMultiYearView(e)}))("selectedChange",(function(e){return r.Dc(t),r.hc()._goToDateInView(e,"year")})),r.Vb()}if(2&t){const t=r.hc();r.oc("activeDate",t.activeDate)("selected",t.selected)("dateFilter",t.dateFilter)("maxDate",t.maxDate)("minDate",t.minDate)("dateClass",t.dateClass)}}const E=["button"];function F(t,e){1&t&&(r.gc(),r.Wb(0,"svg",3),r.Rb(1,"path",4),r.Vb())}const L=[[["","matDatepickerToggleIcon",""]]],Q=["[matDatepickerToggleIcon]"],N=[[["input","matStartDate",""]],[["input","matEndDate",""]]],z=["input[matStartDate]","input[matEndDate]"];let B=(()=>{class t{constructor(){this.changes=new u.a,this.calendarLabel="Calendar",this.openCalendarLabel="Open calendar",this.prevMonthLabel="Previous month",this.nextMonthLabel="Next month",this.prevYearLabel="Previous year",this.nextYearLabel="Next year",this.prevMultiYearLabel="Previous 20 years",this.nextMultiYearLabel="Next 20 years",this.switchToMonthViewLabel="Choose date",this.switchToMultiYearViewLabel="Choose month and year"}formatYearRange(t,e){return`${t} \u2013 ${e}`}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(r.Mb)({factory:function(){return new t},token:t,providedIn:"root"}),t})();class U{constructor(t,e,i,n,a={},s=t,o){this.value=t,this.displayValue=e,this.ariaLabel=i,this.enabled=n,this.cssClasses=a,this.compareValue=s,this.rawValue=o}}let $=(()=>{class t{constructor(t,e){this._elementRef=t,this._ngZone=e,this.numCols=7,this.activeCell=0,this.isRange=!1,this.cellAspectRatio=1,this.previewStart=null,this.previewEnd=null,this.selectedValueChange=new r.o,this.previewChange=new r.o,this._enterHandler=t=>{if(this._skipNextFocus&&"focus"===t.type)this._skipNextFocus=!1;else if(t.target&&this.isRange){const e=this._getCellFromElement(t.target);e&&this._ngZone.run(()=>this.previewChange.emit({value:e.enabled?e:null,event:t}))}},this._leaveHandler=t=>{null!==this.previewEnd&&this.isRange&&t.target&&H(t.target)&&this._ngZone.run(()=>this.previewChange.emit({value:null,event:t}))},e.runOutsideAngular(()=>{const e=t.nativeElement;e.addEventListener("mouseenter",this._enterHandler,!0),e.addEventListener("focus",this._enterHandler,!0),e.addEventListener("mouseleave",this._leaveHandler,!0),e.addEventListener("blur",this._leaveHandler,!0)})}_cellClicked(t,e){t.enabled&&this.selectedValueChange.emit({value:t.value,event:e})}_isSelected(t){return this.startValue===t||this.endValue===t}ngOnChanges(t){const e=t.numCols,{rows:i,numCols:n}=this;(t.rows||e)&&(this._firstRowOffset=i&&i.length&&i[0].length?n-i[0].length:0),(t.cellAspectRatio||e||!this._cellPadding)&&(this._cellPadding=50*this.cellAspectRatio/n+"%"),!e&&this._cellWidth||(this._cellWidth=100/n+"%")}ngOnDestroy(){const t=this._elementRef.nativeElement;t.removeEventListener("mouseenter",this._enterHandler,!0),t.removeEventListener("focus",this._enterHandler,!0),t.removeEventListener("mouseleave",this._leaveHandler,!0),t.removeEventListener("blur",this._leaveHandler,!0)}_isActiveCell(t,e){let i=t*this.numCols+e;return t&&(i-=this._firstRowOffset),i==this.activeCell}_focusActiveCell(t=!0){this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe(Object(g.a)(1)).subscribe(()=>{const e=this._elementRef.nativeElement.querySelector(".mat-calendar-body-active");e&&(t||(this._skipNextFocus=!0),e.focus())})})}_isRangeStart(t){return G(t,this.startValue,this.endValue)}_isRangeEnd(t){return X(t,this.startValue,this.endValue)}_isInRange(t){return q(t,this.startValue,this.endValue,this.isRange)}_isComparisonStart(t){return G(t,this.comparisonStart,this.comparisonEnd)}_isComparisonBridgeStart(t,e,i){if(!this._isComparisonStart(t)||this._isRangeStart(t)||!this._isInRange(t))return!1;let n=this.rows[e][i-1];if(!n){const t=this.rows[e-1];n=t&&t[t.length-1]}return n&&!this._isRangeEnd(n.compareValue)}_isComparisonBridgeEnd(t,e,i){if(!this._isComparisonEnd(t)||this._isRangeEnd(t)||!this._isInRange(t))return!1;let n=this.rows[e][i+1];if(!n){const t=this.rows[e+1];n=t&&t[0]}return n&&!this._isRangeStart(n.compareValue)}_isComparisonEnd(t){return X(t,this.comparisonStart,this.comparisonEnd)}_isInComparisonRange(t){return q(t,this.comparisonStart,this.comparisonEnd,this.isRange)}_isComparisonIdentical(t){return this.comparisonStart===this.comparisonEnd&&t===this.comparisonStart}_isPreviewStart(t){return G(t,this.previewStart,this.previewEnd)}_isPreviewEnd(t){return X(t,this.previewStart,this.previewEnd)}_isInPreview(t){return q(t,this.previewStart,this.previewEnd,this.isRange)}_getCellFromElement(t){let e;if(H(t)?e=t:H(t.parentNode)&&(e=t.parentNode),e){const t=e.getAttribute("data-mat-row"),i=e.getAttribute("data-mat-col");if(t&&i)return this.rows[parseInt(t)][parseInt(i)]}return null}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l),r.Qb(r.C))},t.\u0275cmp=r.Kb({type:t,selectors:[["","mat-calendar-body",""]],hostAttrs:["role","grid","aria-readonly","true",1,"mat-calendar-body"],inputs:{numCols:"numCols",activeCell:"activeCell",isRange:"isRange",cellAspectRatio:"cellAspectRatio",previewStart:"previewStart",previewEnd:"previewEnd",label:"label",rows:"rows",todayValue:"todayValue",startValue:"startValue",endValue:"endValue",labelMinRequiredCells:"labelMinRequiredCells",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},outputs:{selectedValueChange:"selectedValueChange",previewChange:"previewChange"},exportAs:["matCalendarBody"],features:[r.Bb],attrs:M,decls:2,vars:2,consts:[["aria-hidden","true",4,"ngIf"],["role","row",4,"ngFor","ngForOf"],["aria-hidden","true"],[1,"mat-calendar-body-label"],["role","row"],["aria-hidden","true","class","mat-calendar-body-label",3,"paddingTop","paddingBottom",4,"ngIf"],["role","gridcell","class","mat-calendar-body-cell",3,"ngClass","tabindex","mat-calendar-body-disabled","mat-calendar-body-active","mat-calendar-body-range-start","mat-calendar-body-range-end","mat-calendar-body-in-range","mat-calendar-body-comparison-bridge-start","mat-calendar-body-comparison-bridge-end","mat-calendar-body-comparison-start","mat-calendar-body-comparison-end","mat-calendar-body-in-comparison-range","mat-calendar-body-preview-start","mat-calendar-body-preview-end","mat-calendar-body-in-preview","width","paddingTop","paddingBottom","click",4,"ngFor","ngForOf"],["aria-hidden","true",1,"mat-calendar-body-label"],["role","gridcell",1,"mat-calendar-body-cell",3,"ngClass","tabindex","click"],[1,"mat-calendar-body-cell-content","mat-focus-indicator"],[1,"mat-calendar-body-cell-preview"]],template:function(t,e){1&t&&(r.Oc(0,k,3,6,"tr",0),r.Oc(1,P,3,2,"tr",1)),2&t&&(r.oc("ngIf",e._firstRowOffset<e.labelMinRequiredCells),r.Db(1),r.oc("ngForOf",e.rows))},directives:[o.t,o.s,o.q],styles:['.mat-calendar-body{min-width:224px}.mat-calendar-body-label{height:0;line-height:0;text-align:left;padding-left:4.7142857143%;padding-right:4.7142857143%}.mat-calendar-body-cell{position:relative;height:0;line-height:0;text-align:center;outline:none;cursor:pointer}.mat-calendar-body-cell::before,.mat-calendar-body-cell::after,.mat-calendar-body-cell-preview{content:"";position:absolute;top:5%;left:0;z-index:0;box-sizing:border-box;height:90%;width:100%}.mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-start::after,.mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,.mat-calendar-body-comparison-start::after,.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:5%;width:95%;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-range-start:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-start:not(.mat-calendar-body-comparison-bridge-start)::before,[dir=rtl] .mat-calendar-body-comparison-start::after,[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{left:0;border-radius:0;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,.mat-calendar-body-comparison-end::after,.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}[dir=rtl] .mat-calendar-body-range-end:not(.mat-calendar-body-in-comparison-range)::before,[dir=rtl] .mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-end:not(.mat-calendar-body-comparison-bridge-end)::before,[dir=rtl] .mat-calendar-body-comparison-end::after,[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{left:5%;border-radius:0;border-top-left-radius:999px;border-bottom-left-radius:999px}[dir=rtl] .mat-calendar-body-comparison-bridge-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-bridge-end.mat-calendar-body-range-start::after{width:95%;border-top-right-radius:999px;border-bottom-right-radius:999px}.mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,[dir=rtl] .mat-calendar-body-comparison-start.mat-calendar-body-range-end::after,.mat-calendar-body-comparison-end.mat-calendar-body-range-start::after,[dir=rtl] .mat-calendar-body-comparison-end.mat-calendar-body-range-start::after{width:90%}.mat-calendar-body-in-preview .mat-calendar-body-cell-preview{border-top:dashed 1px;border-bottom:dashed 1px}.mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:dashed 1px}[dir=rtl] .mat-calendar-body-preview-start .mat-calendar-body-cell-preview{border-left:0;border-right:dashed 1px}.mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:dashed 1px}[dir=rtl] .mat-calendar-body-preview-end .mat-calendar-body-cell-preview{border-right:0;border-left:dashed 1px}.mat-calendar-body-disabled{cursor:default}.mat-calendar-body-cell-content{top:5%;left:5%;z-index:1;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:90%;height:90%;line-height:1;border-width:1px;border-style:solid;border-radius:999px}.mat-calendar-body-cell-content.mat-focus-indicator{position:absolute}.cdk-high-contrast-active .mat-calendar-body-cell-content{border:none}.cdk-high-contrast-active .mat-datepicker-popup:not(:empty),.cdk-high-contrast-active .mat-calendar-body-selected{outline:solid 1px}.cdk-high-contrast-active .mat-calendar-body-today{outline:dotted 1px}.cdk-high-contrast-active .cdk-keyboard-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected),.cdk-high-contrast-active .cdk-program-focused .mat-calendar-body-active>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){outline:dotted 2px}[dir=rtl] .mat-calendar-body-label{text-align:right}@media(hover: none){.mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected){background-color:transparent}}\n'],encapsulation:2,changeDetection:0}),t})();function H(t){return"TD"===t.nodeName}function G(t,e,i){return null!==i&&e!==i&&t<i&&t===e}function X(t,e,i){return null!==e&&e!==i&&t>=e&&t===i}function q(t,e,i,n){return n&&null!==e&&null!==i&&e!==i&&t>=e&&t<=i}class K{constructor(t,e){this.start=t,this.end=e}}let Y=(()=>{class t{constructor(t,e){this.selection=t,this._adapter=e,this._selectionChanged=new u.a,this.selectionChanged=this._selectionChanged,this.selection=t}updateSelection(t,e){this.selection=t,this._selectionChanged.next({selection:t,source:e})}ngOnDestroy(){this._selectionChanged.complete()}_isValidDateInstance(t){return this._adapter.isDateInstance(t)&&this._adapter.isValid(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(void 0),r.Qb(h.c))},t.\u0275dir=r.Lb({type:t}),t})(),J=(()=>{class t extends Y{constructor(t){super(null,t)}add(t){super.updateSelection(t,this)}isValid(){return null!=this.selection&&this._isValidDateInstance(this.selection)}isComplete(){return null!=this.selection}}return t.\u0275fac=function(e){return new(e||t)(r.ac(h.c))},t.\u0275prov=r.Mb({token:t,factory:t.\u0275fac}),t})(),Z=(()=>{class t extends Y{constructor(t){super(new K(null,null),t)}add(t){let{start:e,end:i}=this.selection;null==e?e=t:null==i?i=t:(e=t,i=null),super.updateSelection(new K(e,i),this)}isValid(){const{start:t,end:e}=this.selection;return null==t&&null==e||(null!=t&&null!=e?this._isValidDateInstance(t)&&this._isValidDateInstance(e)&&this._adapter.compareDate(t,e)<=0:(null==t||this._isValidDateInstance(t))&&(null==e||this._isValidDateInstance(e)))}isComplete(){return null!=this.selection.start&&null!=this.selection.end}}return t.\u0275fac=function(e){return new(e||t)(r.ac(h.c))},t.\u0275prov=r.Mb({token:t,factory:t.\u0275fac}),t})();const tt={provide:Y,deps:[[new r.D,new r.N,Y],h.c],useFactory:function(t,e){return t||new J(e)}},et={provide:Y,deps:[[new r.D,new r.N,Y],h.c],useFactory:function(t,e){return t||new Z(e)}},it=new r.s("MAT_DATE_RANGE_SELECTION_STRATEGY");let nt=(()=>{class t{constructor(t){this._dateAdapter=t}selectionFinished(t,e){let{start:i,end:n}=e;return null==i?i=t:null==n&&t&&this._dateAdapter.compareDate(t,i)>=0?n=t:(i=t,n=null),new K(i,n)}createPreview(t,e){let i=null,n=null;return e.start&&!e.end&&t&&(i=e.start,n=t),new K(i,n)}}return t.\u0275fac=function(e){return new(e||t)(r.ac(h.c))},t.\u0275prov=r.Mb({token:t,factory:t.\u0275fac}),t})();const at={provide:it,deps:[[new r.D,new r.N,it],h.c],useFactory:function(t,e){return t||new nt(e)}};let st=(()=>{class t{constructor(t,e,i,n,a){this._changeDetectorRef=t,this._dateFormats=e,this._dateAdapter=i,this._dir=n,this._rangeStrategy=a,this._rerenderSubscription=p.a.EMPTY,this.selectedChange=new r.o,this._userSelection=new r.o,this.activeDateChange=new r.o,this._activeDate=this._dateAdapter.today()}get activeDate(){return this._activeDate}set activeDate(t){const e=this._activeDate,i=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(i,this.minDate,this.maxDate),this._hasSameMonthAndYear(e,this._activeDate)||this._init()}get selected(){return this._selected}set selected(t){this._selected=t instanceof K?t:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t)),this._setRanges(this._selected)}get minDate(){return this._minDate}set minDate(t){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get maxDate(){return this._maxDate}set maxDate(t){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(Object(v.a)(null)).subscribe(()=>this._init())}ngOnChanges(t){const e=t.comparisonStart||t.comparisonEnd;e&&!e.firstChange&&this._setRanges(this.selected)}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_dateSelected(t){const e=t.value,i=this._dateAdapter.getYear(this.activeDate),n=this._dateAdapter.getMonth(this.activeDate),a=this._dateAdapter.createDate(i,n,e);let s,o;this._selected instanceof K?(s=this._getDateInCurrentMonth(this._selected.start),o=this._getDateInCurrentMonth(this._selected.end)):s=o=this._getDateInCurrentMonth(this._selected),s===e&&o===e||this.selectedChange.emit(a),this._userSelection.emit({value:a,event:t.event})}_handleCalendarBodyKeydown(t){const e=this._activeDate,i=this._isRtl();switch(t.keyCode){case m.k:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,i?1:-1);break;case m.o:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,i?-1:1);break;case m.s:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,-7);break;case m.e:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,7);break;case m.j:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,1-this._dateAdapter.getDate(this._activeDate));break;case m.f:this.activeDate=this._dateAdapter.addCalendarDays(this._activeDate,this._dateAdapter.getNumDaysInMonth(this._activeDate)-this._dateAdapter.getDate(this._activeDate));break;case m.n:this.activeDate=t.altKey?this._dateAdapter.addCalendarYears(this._activeDate,-1):this._dateAdapter.addCalendarMonths(this._activeDate,-1);break;case m.m:this.activeDate=t.altKey?this._dateAdapter.addCalendarYears(this._activeDate,1):this._dateAdapter.addCalendarMonths(this._activeDate,1);break;case m.g:case m.q:return void(this.dateFilter&&!this.dateFilter(this._activeDate)||(this._dateSelected({value:this._dateAdapter.getDate(this._activeDate),event:t}),t.preventDefault()));case m.h:return void(null!=this._previewEnd&&(this._previewStart=this._previewEnd=null,this.selectedChange.emit(null),this._userSelection.emit({value:null,event:t}),t.preventDefault(),t.stopPropagation()));default:return}this._dateAdapter.compareDate(e,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),t.preventDefault()}_init(){this._setRanges(this.selected),this._todayDate=this._getCellCompareValue(this._dateAdapter.today()),this._monthLabel=this._dateAdapter.getMonthNames("short")[this._dateAdapter.getMonth(this.activeDate)].toLocaleUpperCase();let t=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),1);this._firstWeekOffset=(7+this._dateAdapter.getDayOfWeek(t)-this._dateAdapter.getFirstDayOfWeek())%7,this._initWeekdays(),this._createWeekCells(),this._changeDetectorRef.markForCheck()}_focusActiveCell(t){this._matCalendarBody._focusActiveCell(t)}_previewChanged({event:t,value:e}){if(this._rangeStrategy){const i=this._rangeStrategy.createPreview(e?e.rawValue:null,this.selected,t);this._previewStart=this._getCellCompareValue(i.start),this._previewEnd=this._getCellCompareValue(i.end),this._changeDetectorRef.detectChanges()}}_initWeekdays(){const t=this._dateAdapter.getFirstDayOfWeek(),e=this._dateAdapter.getDayOfWeekNames("narrow");let i=this._dateAdapter.getDayOfWeekNames("long").map((t,i)=>({long:t,narrow:e[i]}));this._weekdays=i.slice(t).concat(i.slice(0,t))}_createWeekCells(){const t=this._dateAdapter.getNumDaysInMonth(this.activeDate),e=this._dateAdapter.getDateNames();this._weeks=[[]];for(let i=0,n=this._firstWeekOffset;i<t;i++,n++){7==n&&(this._weeks.push([]),n=0);const t=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),this._dateAdapter.getMonth(this.activeDate),i+1),a=this._shouldEnableDate(t),s=this._dateAdapter.format(t,this._dateFormats.display.dateA11yLabel),o=this.dateClass?this.dateClass(t,"month"):void 0;this._weeks[this._weeks.length-1].push(new U(i+1,e[i],s,a,o,this._getCellCompareValue(t),t))}}_shouldEnableDate(t){return!!t&&(!this.minDate||this._dateAdapter.compareDate(t,this.minDate)>=0)&&(!this.maxDate||this._dateAdapter.compareDate(t,this.maxDate)<=0)&&(!this.dateFilter||this.dateFilter(t))}_getDateInCurrentMonth(t){return t&&this._hasSameMonthAndYear(t,this.activeDate)?this._dateAdapter.getDate(t):null}_hasSameMonthAndYear(t,e){return!(!t||!e||this._dateAdapter.getMonth(t)!=this._dateAdapter.getMonth(e)||this._dateAdapter.getYear(t)!=this._dateAdapter.getYear(e))}_getCellCompareValue(t){if(t){const e=this._dateAdapter.getYear(t),i=this._dateAdapter.getMonth(t),n=this._dateAdapter.getDate(t);return new Date(e,i,n).getTime()}return null}_isRtl(){return this._dir&&"rtl"===this._dir.value}_setRanges(t){t instanceof K?(this._rangeStart=this._getCellCompareValue(t.start),this._rangeEnd=this._getCellCompareValue(t.end),this._isRange=!0):(this._rangeStart=this._rangeEnd=this._getCellCompareValue(t),this._isRange=!1),this._comparisonRangeStart=this._getCellCompareValue(this.comparisonStart),this._comparisonRangeEnd=this._getCellCompareValue(this.comparisonEnd)}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.h),r.Qb(h.e,8),r.Qb(h.c,8),r.Qb(w.c,8),r.Qb(it,8))},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-month-view"]],viewQuery:function(t,e){var i;1&t&&r.Xc($,!0),2&t&&r.yc(i=r.ec())&&(e._matCalendarBody=i.first)},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},outputs:{selectedChange:"selectedChange",_userSelection:"_userSelection",activeDateChange:"activeDateChange"},exportAs:["matMonthView"],features:[r.Bb],decls:7,vars:13,consts:[["role","presentation",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["scope","col",4,"ngFor","ngForOf"],["colspan","7","aria-hidden","true",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"label","rows","todayValue","startValue","endValue","comparisonStart","comparisonEnd","previewStart","previewEnd","isRange","labelMinRequiredCells","activeCell","selectedValueChange","previewChange","keydown"],["scope","col"]],template:function(t,e){1&t&&(r.Wb(0,"table",0),r.Wb(1,"thead",1),r.Wb(2,"tr"),r.Oc(3,V,2,2,"th",2),r.Vb(),r.Wb(4,"tr"),r.Rb(5,"th",3),r.Vb(),r.Vb(),r.Wb(6,"tbody",4),r.dc("selectedValueChange",(function(t){return e._dateSelected(t)}))("previewChange",(function(t){return e._previewChanged(t)}))("keydown",(function(t){return e._handleCalendarBodyKeydown(t)})),r.Vb(),r.Vb()),2&t&&(r.Db(3),r.oc("ngForOf",e._weekdays),r.Db(3),r.oc("label",e._monthLabel)("rows",e._weeks)("todayValue",e._todayDate)("startValue",e._rangeStart)("endValue",e._rangeEnd)("comparisonStart",e._comparisonRangeStart)("comparisonEnd",e._comparisonRangeEnd)("previewStart",e._previewStart)("previewEnd",e._previewEnd)("isRange",e._isRange)("labelMinRequiredCells",3)("activeCell",e._dateAdapter.getDate(e.activeDate)-1))},directives:[o.s,$],encapsulation:2,changeDetection:0}),t})(),ot=(()=>{class t{constructor(t,e,i){this._changeDetectorRef=t,this._dateAdapter=e,this._dir=i,this._rerenderSubscription=p.a.EMPTY,this.selectedChange=new r.o,this.yearSelected=new r.o,this.activeDateChange=new r.o,this._activeDate=this._dateAdapter.today()}get activeDate(){return this._activeDate}set activeDate(t){let e=this._activeDate;const i=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(i,this.minDate,this.maxDate),rt(this._dateAdapter,e,this._activeDate,this.minDate,this.maxDate)||this._init()}get selected(){return this._selected}set selected(t){this._selected=t instanceof K?t:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t)),this._setSelectedYear(t)}get minDate(){return this._minDate}set minDate(t){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get maxDate(){return this._maxDate}set maxDate(t){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(Object(v.a)(null)).subscribe(()=>this._init())}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_init(){this._todayYear=this._dateAdapter.getYear(this._dateAdapter.today());const t=this._dateAdapter.getYear(this._activeDate)-ct(this._dateAdapter,this.activeDate,this.minDate,this.maxDate);this._years=[];for(let e=0,i=[];e<24;e++)i.push(t+e),4==i.length&&(this._years.push(i.map(t=>this._createCellForYear(t))),i=[]);this._changeDetectorRef.markForCheck()}_yearSelected(t){const e=t.value;this.yearSelected.emit(this._dateAdapter.createDate(e,0,1));let i=this._dateAdapter.getMonth(this.activeDate),n=this._dateAdapter.getNumDaysInMonth(this._dateAdapter.createDate(e,i,1));this.selectedChange.emit(this._dateAdapter.createDate(e,i,Math.min(this._dateAdapter.getDate(this.activeDate),n)))}_handleCalendarBodyKeydown(t){const e=this._activeDate,i=this._isRtl();switch(t.keyCode){case m.k:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,i?1:-1);break;case m.o:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,i?-1:1);break;case m.s:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-4);break;case m.e:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,4);break;case m.j:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,-ct(this._dateAdapter,this.activeDate,this.minDate,this.maxDate));break;case m.f:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,24-ct(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)-1);break;case m.n:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?-240:-24);break;case m.m:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?240:24);break;case m.g:case m.q:this._yearSelected({value:this._dateAdapter.getYear(this._activeDate),event:t});break;default:return}this._dateAdapter.compareDate(e,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),t.preventDefault()}_getActiveCell(){return ct(this._dateAdapter,this.activeDate,this.minDate,this.maxDate)}_focusActiveCell(){this._matCalendarBody._focusActiveCell()}_createCellForYear(t){const e=this._dateAdapter.createDate(t,0,1),i=this._dateAdapter.getYearName(e),n=this.dateClass?this.dateClass(e,"multi-year"):void 0;return new U(t,i,i,this._shouldEnableYear(t),n)}_shouldEnableYear(t){if(null==t||this.maxDate&&t>this._dateAdapter.getYear(this.maxDate)||this.minDate&&t<this._dateAdapter.getYear(this.minDate))return!1;if(!this.dateFilter)return!0;for(let e=this._dateAdapter.createDate(t,0,1);this._dateAdapter.getYear(e)==t;e=this._dateAdapter.addCalendarDays(e,1))if(this.dateFilter(e))return!0;return!1}_isRtl(){return this._dir&&"rtl"===this._dir.value}_setSelectedYear(t){if(this._selectedYear=null,t instanceof K){const e=t.start||t.end;e&&(this._selectedYear=this._dateAdapter.getYear(e))}else t&&(this._selectedYear=this._dateAdapter.getYear(t))}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.h),r.Qb(h.c,8),r.Qb(w.c,8))},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-multi-year-view"]],viewQuery:function(t,e){var i;1&t&&r.Xc($,!0),2&t&&r.yc(i=r.ec())&&(e._matCalendarBody=i.first)},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass"},outputs:{selectedChange:"selectedChange",yearSelected:"yearSelected",activeDateChange:"activeDateChange"},exportAs:["matMultiYearView"],decls:5,vars:7,consts:[["role","presentation",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["colspan","4",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"rows","todayValue","startValue","endValue","numCols","cellAspectRatio","activeCell","selectedValueChange","keydown"]],template:function(t,e){1&t&&(r.Wb(0,"table",0),r.Wb(1,"thead",1),r.Wb(2,"tr"),r.Rb(3,"th",2),r.Vb(),r.Vb(),r.Wb(4,"tbody",3),r.dc("selectedValueChange",(function(t){return e._yearSelected(t)}))("keydown",(function(t){return e._handleCalendarBodyKeydown(t)})),r.Vb(),r.Vb()),2&t&&(r.Db(4),r.oc("rows",e._years)("todayValue",e._todayYear)("startValue",e._selectedYear)("endValue",e._selectedYear)("numCols",4)("cellAspectRatio",4/7)("activeCell",e._getActiveCell()))},directives:[$],encapsulation:2,changeDetection:0}),t})();function rt(t,e,i,n,a){const s=t.getYear(e),o=t.getYear(i),r=lt(t,n,a);return Math.floor((s-r)/24)===Math.floor((o-r)/24)}function ct(t,e,i,n){return((t.getYear(e)-lt(t,i,n))%24+24)%24}function lt(t,e,i){let n=0;return i?n=t.getYear(i)-24+1:e&&(n=t.getYear(e)),n}let dt=(()=>{class t{constructor(t,e,i,n){this._changeDetectorRef=t,this._dateFormats=e,this._dateAdapter=i,this._dir=n,this._rerenderSubscription=p.a.EMPTY,this.selectedChange=new r.o,this.monthSelected=new r.o,this.activeDateChange=new r.o,this._activeDate=this._dateAdapter.today()}get activeDate(){return this._activeDate}set activeDate(t){let e=this._activeDate;const i=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))||this._dateAdapter.today();this._activeDate=this._dateAdapter.clampDate(i,this.minDate,this.maxDate),this._dateAdapter.getYear(e)!==this._dateAdapter.getYear(this._activeDate)&&this._init()}get selected(){return this._selected}set selected(t){this._selected=t instanceof K?t:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t)),this._setSelectedMonth(t)}get minDate(){return this._minDate}set minDate(t){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get maxDate(){return this._maxDate}set maxDate(t){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}ngAfterContentInit(){this._rerenderSubscription=this._dateAdapter.localeChanges.pipe(Object(v.a)(null)).subscribe(()=>this._init())}ngOnDestroy(){this._rerenderSubscription.unsubscribe()}_monthSelected(t){const e=t.value,i=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),e,1);this.monthSelected.emit(i);const n=this._dateAdapter.getNumDaysInMonth(i);this.selectedChange.emit(this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),e,Math.min(this._dateAdapter.getDate(this.activeDate),n)))}_handleCalendarBodyKeydown(t){const e=this._activeDate,i=this._isRtl();switch(t.keyCode){case m.k:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,i?1:-1);break;case m.o:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,i?-1:1);break;case m.s:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-4);break;case m.e:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,4);break;case m.j:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,-this._dateAdapter.getMonth(this._activeDate));break;case m.f:this.activeDate=this._dateAdapter.addCalendarMonths(this._activeDate,11-this._dateAdapter.getMonth(this._activeDate));break;case m.n:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?-10:-1);break;case m.m:this.activeDate=this._dateAdapter.addCalendarYears(this._activeDate,t.altKey?10:1);break;case m.g:case m.q:this._monthSelected({value:this._dateAdapter.getMonth(this._activeDate),event:t});break;default:return}this._dateAdapter.compareDate(e,this.activeDate)&&this.activeDateChange.emit(this.activeDate),this._focusActiveCell(),t.preventDefault()}_init(){this._setSelectedMonth(this.selected),this._todayMonth=this._getMonthInCurrentYear(this._dateAdapter.today()),this._yearLabel=this._dateAdapter.getYearName(this.activeDate);let t=this._dateAdapter.getMonthNames("short");this._months=[[0,1,2,3],[4,5,6,7],[8,9,10,11]].map(e=>e.map(e=>this._createCellForMonth(e,t[e]))),this._changeDetectorRef.markForCheck()}_focusActiveCell(){this._matCalendarBody._focusActiveCell()}_getMonthInCurrentYear(t){return t&&this._dateAdapter.getYear(t)==this._dateAdapter.getYear(this.activeDate)?this._dateAdapter.getMonth(t):null}_createCellForMonth(t,e){const i=this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate),t,1),n=this._dateAdapter.format(i,this._dateFormats.display.monthYearA11yLabel),a=this.dateClass?this.dateClass(i,"year"):void 0;return new U(t,e.toLocaleUpperCase(),n,this._shouldEnableMonth(t),a)}_shouldEnableMonth(t){const e=this._dateAdapter.getYear(this.activeDate);if(null==t||this._isYearAndMonthAfterMaxDate(e,t)||this._isYearAndMonthBeforeMinDate(e,t))return!1;if(!this.dateFilter)return!0;for(let i=this._dateAdapter.createDate(e,t,1);this._dateAdapter.getMonth(i)==t;i=this._dateAdapter.addCalendarDays(i,1))if(this.dateFilter(i))return!0;return!1}_isYearAndMonthAfterMaxDate(t,e){if(this.maxDate){const i=this._dateAdapter.getYear(this.maxDate),n=this._dateAdapter.getMonth(this.maxDate);return t>i||t===i&&e>n}return!1}_isYearAndMonthBeforeMinDate(t,e){if(this.minDate){const i=this._dateAdapter.getYear(this.minDate),n=this._dateAdapter.getMonth(this.minDate);return t<i||t===i&&e<n}return!1}_isRtl(){return this._dir&&"rtl"===this._dir.value}_setSelectedMonth(t){this._selectedMonth=t instanceof K?this._getMonthInCurrentYear(t.start)||this._getMonthInCurrentYear(t.end):this._getMonthInCurrentYear(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.h),r.Qb(h.e,8),r.Qb(h.c,8),r.Qb(w.c,8))},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-year-view"]],viewQuery:function(t,e){var i;1&t&&r.Xc($,!0),2&t&&r.yc(i=r.ec())&&(e._matCalendarBody=i.first)},inputs:{activeDate:"activeDate",selected:"selected",minDate:"minDate",maxDate:"maxDate",dateFilter:"dateFilter",dateClass:"dateClass"},outputs:{selectedChange:"selectedChange",monthSelected:"monthSelected",activeDateChange:"activeDateChange"},exportAs:["matYearView"],decls:5,vars:9,consts:[["role","presentation",1,"mat-calendar-table"],[1,"mat-calendar-table-header"],["colspan","4",1,"mat-calendar-table-header-divider"],["mat-calendar-body","",3,"label","rows","todayValue","startValue","endValue","labelMinRequiredCells","numCols","cellAspectRatio","activeCell","selectedValueChange","keydown"]],template:function(t,e){1&t&&(r.Wb(0,"table",0),r.Wb(1,"thead",1),r.Wb(2,"tr"),r.Rb(3,"th",2),r.Vb(),r.Vb(),r.Wb(4,"tbody",3),r.dc("selectedValueChange",(function(t){return e._monthSelected(t)}))("keydown",(function(t){return e._handleCalendarBodyKeydown(t)})),r.Vb(),r.Vb()),2&t&&(r.Db(4),r.oc("label",e._yearLabel)("rows",e._months)("todayValue",e._todayMonth)("startValue",e._selectedMonth)("endValue",e._selectedMonth)("labelMinRequiredCells",2)("numCols",4)("cellAspectRatio",4/7)("activeCell",e._dateAdapter.getMonth(e.activeDate)))},directives:[$],encapsulation:2,changeDetection:0}),t})(),ht=(()=>{class t{constructor(t,e,i,n,a){this._intl=t,this.calendar=e,this._dateAdapter=i,this._dateFormats=n,this.calendar.stateChanges.subscribe(()=>a.markForCheck())}get periodButtonText(){if("month"==this.calendar.currentView)return this._dateAdapter.format(this.calendar.activeDate,this._dateFormats.display.monthYearLabel).toLocaleUpperCase();if("year"==this.calendar.currentView)return this._dateAdapter.getYearName(this.calendar.activeDate);const t=this._dateAdapter.getYear(this.calendar.activeDate)-ct(this._dateAdapter,this.calendar.activeDate,this.calendar.minDate,this.calendar.maxDate),e=t+24-1,i=this._dateAdapter.getYearName(this._dateAdapter.createDate(t,0,1)),n=this._dateAdapter.getYearName(this._dateAdapter.createDate(e,0,1));return this._intl.formatYearRange(i,n)}get periodButtonLabel(){return"month"==this.calendar.currentView?this._intl.switchToMultiYearViewLabel:this._intl.switchToMonthViewLabel}get prevButtonLabel(){return{month:this._intl.prevMonthLabel,year:this._intl.prevYearLabel,"multi-year":this._intl.prevMultiYearLabel}[this.calendar.currentView]}get nextButtonLabel(){return{month:this._intl.nextMonthLabel,year:this._intl.nextYearLabel,"multi-year":this._intl.nextMultiYearLabel}[this.calendar.currentView]}currentPeriodClicked(){this.calendar.currentView="month"==this.calendar.currentView?"multi-year":"month"}previousClicked(){this.calendar.activeDate="month"==this.calendar.currentView?this._dateAdapter.addCalendarMonths(this.calendar.activeDate,-1):this._dateAdapter.addCalendarYears(this.calendar.activeDate,"year"==this.calendar.currentView?-1:-24)}nextClicked(){this.calendar.activeDate="month"==this.calendar.currentView?this._dateAdapter.addCalendarMonths(this.calendar.activeDate,1):this._dateAdapter.addCalendarYears(this.calendar.activeDate,"year"==this.calendar.currentView?1:24)}previousEnabled(){return!this.calendar.minDate||!this.calendar.minDate||!this._isSameView(this.calendar.activeDate,this.calendar.minDate)}nextEnabled(){return!this.calendar.maxDate||!this._isSameView(this.calendar.activeDate,this.calendar.maxDate)}_isSameView(t,e){return"month"==this.calendar.currentView?this._dateAdapter.getYear(t)==this._dateAdapter.getYear(e)&&this._dateAdapter.getMonth(t)==this._dateAdapter.getMonth(e):"year"==this.calendar.currentView?this._dateAdapter.getYear(t)==this._dateAdapter.getYear(e):rt(this._dateAdapter,t,e,this.calendar.minDate,this.calendar.maxDate)}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(B),r.Qb(Object(r.X)(()=>ut)),r.Qb(h.c,8),r.Qb(h.e,8),r.Qb(r.h))},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-calendar-header"]],exportAs:["matCalendarHeader"],ngContentSelectors:R,decls:9,vars:8,consts:[[1,"mat-calendar-header"],[1,"mat-calendar-controls"],["mat-button","","type","button","cdkAriaLive","polite",1,"mat-calendar-period-button",3,"click"],[1,"mat-calendar-arrow"],[1,"mat-calendar-spacer"],["mat-icon-button","","type","button",1,"mat-calendar-previous-button",3,"disabled","click"],["mat-icon-button","","type","button",1,"mat-calendar-next-button",3,"disabled","click"]],template:function(t,e){1&t&&(r.nc(),r.Wb(0,"div",0),r.Wb(1,"div",1),r.Wb(2,"button",2),r.dc("click",(function(){return e.currentPeriodClicked()})),r.Qc(3),r.Rb(4,"div",3),r.Vb(),r.Rb(5,"div",4),r.mc(6),r.Wb(7,"button",5),r.dc("click",(function(){return e.previousClicked()})),r.Vb(),r.Wb(8,"button",6),r.dc("click",(function(){return e.nextClicked()})),r.Vb(),r.Vb(),r.Vb()),2&t&&(r.Db(2),r.Eb("aria-label",e.periodButtonLabel),r.Db(1),r.Sc(" ",e.periodButtonText," "),r.Db(1),r.Ib("mat-calendar-invert","month"!=e.calendar.currentView),r.Db(3),r.oc("disabled",!e.previousEnabled()),r.Eb("aria-label",e.prevButtonLabel),r.Db(1),r.oc("disabled",!e.nextEnabled()),r.Eb("aria-label",e.nextButtonLabel))},directives:[c.b,n.d],encapsulation:2,changeDetection:0}),t})(),ut=(()=>{class t{constructor(t,e,i,n){this._dateAdapter=e,this._dateFormats=i,this._changeDetectorRef=n,this._moveFocusOnNextTick=!1,this.startView="month",this.selectedChange=new r.o,this.yearSelected=new r.o,this.monthSelected=new r.o,this._userSelection=new r.o,this.stateChanges=new u.a,this._intlChanges=t.changes.subscribe(()=>{n.markForCheck(),this.stateChanges.next()})}get startAt(){return this._startAt}set startAt(t){this._startAt=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get selected(){return this._selected}set selected(t){this._selected=t instanceof K?t:this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get minDate(){return this._minDate}set minDate(t){this._minDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get maxDate(){return this._maxDate}set maxDate(t){this._maxDate=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get activeDate(){return this._clampedActiveDate}set activeDate(t){this._clampedActiveDate=this._dateAdapter.clampDate(t,this.minDate,this.maxDate),this.stateChanges.next(),this._changeDetectorRef.markForCheck()}get currentView(){return this._currentView}set currentView(t){this._currentView=t,this._moveFocusOnNextTick=!0,this._changeDetectorRef.markForCheck()}ngAfterContentInit(){this._calendarHeaderPortal=new s.d(this.headerComponent||ht),this.activeDate=this.startAt||this._dateAdapter.today(),this._currentView=this.startView}ngAfterViewChecked(){this._moveFocusOnNextTick&&(this._moveFocusOnNextTick=!1,this.focusActiveCell())}ngOnDestroy(){this._intlChanges.unsubscribe(),this.stateChanges.complete()}ngOnChanges(t){const e=t.minDate||t.maxDate||t.dateFilter;if(e&&!e.firstChange){const t=this._getCurrentViewComponent();t&&(this._changeDetectorRef.detectChanges(),t._init())}this.stateChanges.next()}focusActiveCell(){this._getCurrentViewComponent()._focusActiveCell(!1)}updateTodaysDate(){const t=this.currentView;let e;e="month"===t?this.monthView:"year"===t?this.yearView:this.multiYearView,e._init()}_dateSelected(t){const e=t.value;(this.selected instanceof K||e&&!this._dateAdapter.sameDate(e,this.selected))&&this.selectedChange.emit(e),this._userSelection.emit(t)}_yearSelectedInMultiYearView(t){this.yearSelected.emit(t)}_monthSelectedInYearView(t){this.monthSelected.emit(t)}_goToDateInView(t,e){this.activeDate=t,this.currentView=e}_getCurrentViewComponent(){return this.monthView||this.yearView||this.multiYearView}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(B),r.Qb(h.c,8),r.Qb(h.e,8),r.Qb(r.h))},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-calendar"]],viewQuery:function(t,e){var i;1&t&&(r.Xc(st,!0),r.Xc(dt,!0),r.Xc(ot,!0)),2&t&&(r.yc(i=r.ec())&&(e.monthView=i.first),r.yc(i=r.ec())&&(e.yearView=i.first),r.yc(i=r.ec())&&(e.multiYearView=i.first))},hostAttrs:[1,"mat-calendar"],inputs:{startView:"startView",startAt:"startAt",selected:"selected",minDate:"minDate",maxDate:"maxDate",headerComponent:"headerComponent",dateFilter:"dateFilter",dateClass:"dateClass",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd"},outputs:{selectedChange:"selectedChange",yearSelected:"yearSelected",monthSelected:"monthSelected",_userSelection:"_userSelection"},exportAs:["matCalendar"],features:[r.Cb([tt]),r.Bb],decls:5,vars:5,consts:[[3,"cdkPortalOutlet"],["cdkMonitorSubtreeFocus","","tabindex","-1",1,"mat-calendar-content",3,"ngSwitch"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","comparisonStart","comparisonEnd","activeDateChange","_userSelection",4,"ngSwitchCase"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","monthSelected","selectedChange",4,"ngSwitchCase"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","yearSelected","selectedChange",4,"ngSwitchCase"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","comparisonStart","comparisonEnd","activeDateChange","_userSelection"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","monthSelected","selectedChange"],[3,"activeDate","selected","dateFilter","maxDate","minDate","dateClass","activeDateChange","yearSelected","selectedChange"]],template:function(t,e){1&t&&(r.Oc(0,j,0,0,"ng-template",0),r.Wb(1,"div",1),r.Oc(2,A,1,8,"mat-month-view",2),r.Oc(3,W,1,6,"mat-year-view",3),r.Oc(4,T,1,6,"mat-multi-year-view",4),r.Vb()),2&t&&(r.oc("cdkPortalOutlet",e._calendarHeaderPortal),r.Db(1),r.oc("ngSwitch",e.currentView),r.Db(1),r.oc("ngSwitchCase","month"),r.Db(1),r.oc("ngSwitchCase","year"),r.Db(1),r.oc("ngSwitchCase","multi-year"))},directives:[s.c,n.e,o.x,o.y,st,dt,ot],styles:['.mat-calendar{display:block}.mat-calendar-header{padding:8px 8px 0 8px}.mat-calendar-content{padding:0 8px 8px 8px;outline:none}.mat-calendar-controls{display:flex;margin:5% calc(33% / 7 - 16px)}.mat-calendar-controls .mat-icon-button:hover .mat-button-focus-overlay{opacity:.04}.mat-calendar-spacer{flex:1 1 auto}.mat-calendar-period-button{min-width:0}.mat-calendar-arrow{display:inline-block;width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top-width:5px;border-top-style:solid;margin:0 0 0 5px;vertical-align:middle}.mat-calendar-arrow.mat-calendar-invert{transform:rotate(180deg)}[dir=rtl] .mat-calendar-arrow{margin:0 5px 0 0}.mat-calendar-previous-button,.mat-calendar-next-button{position:relative}.mat-calendar-previous-button::after,.mat-calendar-next-button::after{top:0;left:0;right:0;bottom:0;position:absolute;content:"";margin:15.5px;border:0 solid currentColor;border-top-width:2px}[dir=rtl] .mat-calendar-previous-button,[dir=rtl] .mat-calendar-next-button{transform:rotate(180deg)}.mat-calendar-previous-button::after{border-left-width:2px;transform:translateX(2px) rotate(-45deg)}.mat-calendar-next-button::after{border-right-width:2px;transform:translateX(-2px) rotate(45deg)}.mat-calendar-table{border-spacing:0;border-collapse:collapse;width:100%}.mat-calendar-table-header th{text-align:center;padding:0 0 8px 0}.mat-calendar-table-header-divider{position:relative;height:1px}.mat-calendar-table-header-divider::after{content:"";position:absolute;top:0;left:-8px;right:-8px;height:1px}\n'],encapsulation:2,changeDetection:0}),t})();const pt={transformPanel:Object(x.n)("transformPanel",[Object(x.k)("void",Object(x.l)({opacity:0,transform:"scale(1, 0.8)"})),Object(x.m)("void => enter",Object(x.e)("120ms cubic-bezier(0, 0, 0.2, 1)",Object(x.l)({opacity:1,transform:"scale(1, 1)"}))),Object(x.m)("* => void",Object(x.e)("100ms linear",Object(x.l)({opacity:0})))]),fadeInCalendar:Object(x.n)("fadeInCalendar",[Object(x.k)("void",Object(x.l)({opacity:0})),Object(x.k)("enter",Object(x.l)({opacity:1})),Object(x.m)("void => *",Object(x.e)("120ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"))])};let bt=0;const ft=new r.s("mat-datepicker-scroll-strategy"),mt={provide:ft,deps:[a.c],useFactory:function(t){return()=>t.scrollStrategies.reposition()}};class gt{constructor(t){this._elementRef=t}}const vt=Object(h.A)(gt);let _t=(()=>{class t extends vt{constructor(t,e,i,n,a){super(t),this._changeDetectorRef=e,this._model=i,this._dateAdapter=n,this._rangeSelectionStrategy=a,this._subscriptions=new p.a,this._animationState="enter",this._animationDone=new u.a}ngAfterViewInit(){this._changeDetectorRef&&this._subscriptions.add(this.datepicker._stateChanges.subscribe(()=>{this._changeDetectorRef.markForCheck()})),this._calendar.focusActiveCell()}ngOnDestroy(){this._subscriptions.unsubscribe(),this._animationDone.complete()}_handleUserSelection(t){if(this._model&&this._dateAdapter){const e=this._model.selection,i=t.value,n=e instanceof K;if(n&&this._rangeSelectionStrategy){const n=this._rangeSelectionStrategy.selectionFinished(i,e,t.event);this._model.updateSelection(n,this)}else!i||!n&&this._dateAdapter.sameDate(i,e)||this._model.add(i)}this._model&&!this._model.isComplete()||this.datepicker.close()}_startExitAnimation(){this._animationState="void",this._changeDetectorRef&&this._changeDetectorRef.markForCheck()}_getSelected(){return this._model?this._model.selection:null}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l),r.Qb(r.h),r.Qb(Y),r.Qb(h.c),r.Qb(it,8))},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-datepicker-content"]],viewQuery:function(t,e){var i;1&t&&r.Xc(ut,!0),2&t&&r.yc(i=r.ec())&&(e._calendar=i.first)},hostAttrs:[1,"mat-datepicker-content"],hostVars:3,hostBindings:function(t,e){1&t&&r.Mc("@transformPanel.done",(function(){return e._animationDone.next()})),2&t&&(r.Nc("@transformPanel",e._animationState),r.Ib("mat-datepicker-content-touch",e.datepicker.touchUi))},inputs:{color:"color"},exportAs:["matDatepickerContent"],features:[r.Ab],decls:1,vars:13,consts:[["cdkTrapFocus","",3,"id","ngClass","startAt","startView","minDate","maxDate","dateFilter","headerComponent","selected","dateClass","comparisonStart","comparisonEnd","yearSelected","monthSelected","_userSelection"]],template:function(t,e){1&t&&(r.Wb(0,"mat-calendar",0),r.dc("yearSelected",(function(t){return e.datepicker._selectYear(t)}))("monthSelected",(function(t){return e.datepicker._selectMonth(t)}))("_userSelection",(function(t){return e._handleUserSelection(t)})),r.Vb()),2&t&&r.oc("id",e.datepicker.id)("ngClass",e.datepicker.panelClass)("startAt",e.datepicker.startAt)("startView",e.datepicker.startView)("minDate",e.datepicker._getMinDate())("maxDate",e.datepicker._getMaxDate())("dateFilter",e.datepicker._getDateFilter())("headerComponent",e.datepicker.calendarHeaderComponent)("selected",e._getSelected())("dateClass",e.datepicker.dateClass)("comparisonStart",e.comparisonStart)("comparisonEnd",e.comparisonEnd)("@fadeInCalendar","enter")},directives:[ut,n.f,o.q],styles:[".mat-datepicker-content{display:block;border-radius:4px}.mat-datepicker-content .mat-calendar{width:296px;height:354px}.mat-datepicker-content-touch{display:block;max-height:80vh;overflow:auto;margin:-24px}.mat-datepicker-content-touch .mat-calendar{min-width:250px;min-height:312px;max-width:750px;max-height:788px}@media all and (orientation: landscape){.mat-datepicker-content-touch .mat-calendar{width:64vh;height:80vh}}@media all and (orientation: portrait){.mat-datepicker-content-touch .mat-calendar{width:80vw;height:100vw}}\n"],encapsulation:2,data:{animation:[pt.transformPanel,pt.fadeInCalendar]},changeDetection:0}),t})(),yt=(()=>{class t{constructor(t,e,i,n,a,s,o,c,l){this._dialog=t,this._overlay=e,this._ngZone=i,this._viewContainerRef=n,this._dateAdapter=s,this._dir=o,this._document=c,this._model=l,this._inputStateChanges=p.a.EMPTY,this.startView="month",this._touchUi=!1,this.xPosition="start",this.yPosition="below",this.yearSelected=new r.o,this.monthSelected=new r.o,this.openedStream=new r.o,this.closedStream=new r.o,this._opened=!1,this.id="mat-datepicker-"+bt++,this._focusedElementBeforeOpen=null,this._backdropHarnessClass=this.id+"-backdrop",this._stateChanges=new u.a,this._scrollStrategy=a}get startAt(){return this._startAt||(this._datepickerInput?this._datepickerInput.getStartValue():null)}set startAt(t){this._startAt=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t))}get color(){return this._color||(this._datepickerInput?this._datepickerInput.getThemePalette():void 0)}set color(t){this._color=t}get touchUi(){return this._touchUi}set touchUi(t){this._touchUi=Object(y.c)(t)}get disabled(){return void 0===this._disabled&&this._datepickerInput?this._datepickerInput.disabled:!!this._disabled}set disabled(t){const e=Object(y.c)(t);e!==this._disabled&&(this._disabled=e,this._stateChanges.next(void 0))}get opened(){return this._opened}set opened(t){Object(y.c)(t)?this.open():this.close()}_getMinDate(){return this._datepickerInput&&this._datepickerInput.min}_getMaxDate(){return this._datepickerInput&&this._datepickerInput.max}_getDateFilter(){return this._datepickerInput&&this._datepickerInput.dateFilter}ngOnChanges(t){const e=t.xPosition||t.yPosition;e&&!e.firstChange&&this._popupRef&&(this._setConnectedPositions(this._popupRef.getConfig().positionStrategy),this.opened&&this._popupRef.updatePosition()),this._stateChanges.next(void 0)}ngOnDestroy(){this._destroyPopup(),this.close(),this._inputStateChanges.unsubscribe(),this._stateChanges.complete()}select(t){this._model.add(t)}_selectYear(t){this.yearSelected.emit(t)}_selectMonth(t){this.monthSelected.emit(t)}_registerInput(t){return this._inputStateChanges.unsubscribe(),this._datepickerInput=t,this._inputStateChanges=t.stateChanges.subscribe(()=>this._stateChanges.next(void 0)),this._model}open(){this._opened||this.disabled||(this._document&&(this._focusedElementBeforeOpen=this._document.activeElement),this.touchUi?this._openAsDialog():this._openAsPopup(),this._opened=!0,this.openedStream.emit())}close(){if(!this._opened)return;if(this._popupComponentRef&&this._popupRef){const t=this._popupComponentRef.instance;t._startExitAnimation(),t._animationDone.pipe(Object(g.a)(1)).subscribe(()=>this._destroyPopup())}this._dialogRef&&(this._dialogRef.close(),this._dialogRef=null);const t=()=>{this._opened&&(this._opened=!1,this.closedStream.emit(),this._focusedElementBeforeOpen=null)};this._focusedElementBeforeOpen&&"function"==typeof this._focusedElementBeforeOpen.focus?(this._focusedElementBeforeOpen.focus(),setTimeout(t)):t()}_openAsDialog(){this._dialogRef&&this._dialogRef.close(),this._dialogRef=this._dialog.open(_t,{direction:this._dir?this._dir.value:"ltr",viewContainerRef:this._viewContainerRef,panelClass:"mat-datepicker-dialog",hasBackdrop:!0,disableClose:!1,backdropClass:["cdk-overlay-dark-backdrop",this._backdropHarnessClass],width:"",height:"",minWidth:"",minHeight:"",maxWidth:"80vw",maxHeight:"",position:{},autoFocus:!0,restoreFocus:!1}),this._dialogRef.afterClosed().subscribe(()=>this.close()),this._forwardContentValues(this._dialogRef.componentInstance)}_openAsPopup(){const t=new s.d(_t,this._viewContainerRef);this._destroyPopup(),this._createPopup(),this._popupComponentRef=this._popupRef.attach(t),this._forwardContentValues(this._popupComponentRef.instance),this._ngZone.onStable.pipe(Object(g.a)(1)).subscribe(()=>{this._popupRef.updatePosition()})}_forwardContentValues(t){t.datepicker=this,t.color=this.color}_createPopup(){const t=this._overlay.position().flexibleConnectedTo(this._datepickerInput.getConnectedOverlayOrigin()).withTransformOriginOn(".mat-datepicker-content").withFlexibleDimensions(!1).withViewportMargin(8).withLockedPosition(),e=new a.d({positionStrategy:this._setConnectedPositions(t),hasBackdrop:!0,backdropClass:["mat-overlay-transparent-backdrop",this._backdropHarnessClass],direction:this._dir,scrollStrategy:this._scrollStrategy(),panelClass:"mat-datepicker-popup"});this._popupRef=this._overlay.create(e),this._popupRef.overlayElement.setAttribute("role","dialog"),Object(b.a)(this._popupRef.backdropClick(),this._popupRef.detachments(),this._popupRef.keydownEvents().pipe(Object(_.a)(t=>t.keyCode===m.h||this._datepickerInput&&t.altKey&&t.keyCode===m.s))).subscribe(t=>{t&&t.preventDefault(),this.close()})}_destroyPopup(){this._popupRef&&(this._popupRef.dispose(),this._popupRef=this._popupComponentRef=null)}_setConnectedPositions(t){const e="end"===this.xPosition?"end":"start",i="start"===e?"end":"start",n="above"===this.yPosition?"bottom":"top",a="top"===n?"bottom":"top";return t.withPositions([{originX:e,originY:a,overlayX:e,overlayY:n},{originX:e,originY:n,overlayX:e,overlayY:a},{originX:i,originY:a,overlayX:i,overlayY:n},{originX:i,originY:n,overlayX:i,overlayY:a}])}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(l.b),r.Qb(a.c),r.Qb(r.C),r.Qb(r.T),r.Qb(ft),r.Qb(h.c,8),r.Qb(w.c,8),r.Qb(o.e,8),r.Qb(Y))},t.\u0275dir=r.Lb({type:t,inputs:{startView:"startView",xPosition:"xPosition",yPosition:"yPosition",startAt:"startAt",color:"color",touchUi:"touchUi",disabled:"disabled",opened:"opened",calendarHeaderComponent:"calendarHeaderComponent",panelClass:"panelClass",dateClass:"dateClass"},outputs:{yearSelected:"yearSelected",monthSelected:"monthSelected",openedStream:"opened",closedStream:"closed"},features:[r.Bb]}),t})(),xt=(()=>{class t extends yt{}return t.\u0275fac=function(e){return Ct(e||t)},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-datepicker"]],exportAs:["matDatepicker"],features:[r.Cb([tt]),r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();const Ct=r.Yb(xt);class Ot{constructor(t,e){this.target=t,this.targetElement=e,this.value=this.target.value}}let Dt=(()=>{class t{constructor(t,e,i){this._elementRef=t,this._dateAdapter=e,this._dateFormats=i,this.dateChange=new r.o,this.dateInput=new r.o,this._valueChange=new r.o,this.stateChanges=new u.a,this._onTouched=()=>{},this._validatorOnChange=()=>{},this._cvaOnChange=()=>{},this._valueChangesSubscription=p.a.EMPTY,this._localeSubscription=p.a.EMPTY,this._parseValidator=()=>this._lastValueValid?null:{matDatepickerParse:{text:this._elementRef.nativeElement.value}},this._filterValidator=t=>{const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t.value)),i=this._getDateFilter();return i&&e&&!i(e)?{matDatepickerFilter:!0}:null},this._minValidator=t=>{const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t.value)),i=this._getMinDate();return!i||!e||this._dateAdapter.compareDate(i,e)<=0?null:{matDatepickerMin:{min:i,actual:e}}},this._maxValidator=t=>{const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t.value)),i=this._getMaxDate();return!i||!e||this._dateAdapter.compareDate(i,e)>=0?null:{matDatepickerMax:{max:i,actual:e}}},this._lastValueValid=!1,this._localeSubscription=e.localeChanges.subscribe(()=>{this.value=this.value})}get value(){return this._model?this._getValueFromModel(this._model.selection):this._pendingValue}set value(t){t=this._dateAdapter.deserialize(t),this._lastValueValid=this._isValidValue(t),t=this._dateAdapter.getValidDateOrNull(t);const e=this.value;this._assignValue(t),this._formatValue(t),this._dateAdapter.sameDate(e,t)||this._valueChange.emit(t)}get disabled(){return!!this._disabled||this._parentDisabled()}set disabled(t){const e=Object(y.c)(t),i=this._elementRef.nativeElement;this._disabled!==e&&(this._disabled=e,this.stateChanges.next(void 0)),e&&this._isInitialized&&i.blur&&i.blur()}_getValidators(){return[this._parseValidator,this._minValidator,this._maxValidator,this._filterValidator]}_registerModel(t){this._model=t,this._valueChangesSubscription.unsubscribe(),this._pendingValue&&this._assignValue(this._pendingValue),this._valueChangesSubscription=this._model.selectionChanged.subscribe(t=>{if(t.source!==this){const e=this._getValueFromModel(t.selection);this._lastValueValid=this._isValidValue(e),this._cvaOnChange(e),this._onTouched(),this._formatValue(e),this._canEmitChangeEvent(t)&&(this.dateInput.emit(new Ot(this,this._elementRef.nativeElement)),this.dateChange.emit(new Ot(this,this._elementRef.nativeElement))),this._outsideValueChanged&&this._outsideValueChanged()}})}ngAfterViewInit(){this._isInitialized=!0}ngOnChanges(t){wt(t,this._dateAdapter)&&this.stateChanges.next(void 0)}ngOnDestroy(){this._valueChangesSubscription.unsubscribe(),this._localeSubscription.unsubscribe(),this._valueChange.complete(),this.stateChanges.complete()}registerOnValidatorChange(t){this._validatorOnChange=t}validate(t){return this._validator?this._validator(t):null}writeValue(t){this.value=t}registerOnChange(t){this._cvaOnChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t}_onKeydown(t){t.altKey&&t.keyCode===m.e&&!this._elementRef.nativeElement.readOnly&&(this._openPopup(),t.preventDefault())}_onInput(t){const e=this._lastValueValid;let i=this._dateAdapter.parse(t,this._dateFormats.parse.dateInput);this._lastValueValid=this._isValidValue(i),i=this._dateAdapter.getValidDateOrNull(i),this._dateAdapter.sameDate(i,this.value)?(t&&!this.value&&this._cvaOnChange(i),e!==this._lastValueValid&&this._validatorOnChange()):(this._assignValue(i),this._cvaOnChange(i),this._valueChange.emit(i),this.dateInput.emit(new Ot(this,this._elementRef.nativeElement)))}_onChange(){this.dateChange.emit(new Ot(this,this._elementRef.nativeElement))}_onBlur(){this.value&&this._formatValue(this.value),this._onTouched()}_formatValue(t){this._elementRef.nativeElement.value=t?this._dateAdapter.format(t,this._dateFormats.display.dateInput):""}_assignValue(t){this._model?(this._assignValueToModel(t),this._pendingValue=null):this._pendingValue=t}_isValidValue(t){return!t||this._dateAdapter.isValid(t)}_parentDisabled(){return!1}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l),r.Qb(h.c,8),r.Qb(h.e,8))},t.\u0275dir=r.Lb({type:t,inputs:{value:"value",disabled:"disabled"},outputs:{dateChange:"dateChange",dateInput:"dateInput"},features:[r.Bb]}),t})();function wt(t,e){const i=Object.keys(t);for(let n of i){const{previousValue:i,currentValue:a}=t[n];if(!e.isDateInstance(i)||!e.isDateInstance(a))return!0;if(!e.sameDate(i,a))return!0}return!1}const Mt={provide:C.s,useExisting:Object(r.X)(()=>St),multi:!0},kt={provide:C.r,useExisting:Object(r.X)(()=>St),multi:!0};let St=(()=>{class t extends Dt{constructor(t,e,i,n){super(t,e,i),this._formField=n,this._validator=C.I.compose(super._getValidators())}set matDatepicker(t){t&&(this._datepicker=t,this._registerModel(t._registerInput(this)))}get min(){return this._min}set min(t){const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t));this._dateAdapter.sameDate(e,this._min)||(this._min=e,this._validatorOnChange())}get max(){return this._max}set max(t){const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t));this._dateAdapter.sameDate(e,this._max)||(this._max=e,this._validatorOnChange())}get dateFilter(){return this._dateFilter}set dateFilter(t){this._dateFilter=t,this._validatorOnChange()}getConnectedOverlayOrigin(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef}getThemePalette(){return this._formField?this._formField.color:void 0}getStartValue(){return this.value}getPopupConnectionElementRef(){return this.getConnectedOverlayOrigin()}_openPopup(){this._datepicker&&this._datepicker.open()}_getValueFromModel(t){return t}_assignValueToModel(t){this._model&&this._model.updateSelection(t,this)}_getMinDate(){return this._min}_getMaxDate(){return this._max}_getDateFilter(){return this._dateFilter}_canEmitChangeEvent(){return!0}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l),r.Qb(h.c,8),r.Qb(h.e,8),r.Qb(O.a,8))},t.\u0275dir=r.Lb({type:t,selectors:[["input","matDatepicker",""]],hostAttrs:[1,"mat-datepicker-input"],hostVars:6,hostBindings:function(t,e){1&t&&r.dc("input",(function(t){return e._onInput(t.target.value)}))("change",(function(){return e._onChange()}))("blur",(function(){return e._onBlur()}))("keydown",(function(t){return e._onKeydown(t)})),2&t&&(r.Zb("disabled",e.disabled),r.Eb("aria-haspopup",e._datepicker?"dialog":null)("aria-owns",(null==e._datepicker?null:e._datepicker.opened)&&e._datepicker.id||null)("min",e.min?e._dateAdapter.toIso8601(e.min):null)("max",e.max?e._dateAdapter.toIso8601(e.max):null)("data-mat-calendar",e._datepicker?e._datepicker.id:null))},inputs:{matDatepicker:"matDatepicker",min:"min",max:"max",dateFilter:["matDatepickerFilter","dateFilter"]},exportAs:["matDatepickerInput"],features:[r.Cb([Mt,kt,{provide:D.a,useExisting:t}]),r.Ab]}),t})(),It=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Lb({type:t,selectors:[["","matDatepickerToggleIcon",""]]}),t})(),Pt=(()=>{class t{constructor(t,e,i){this._intl=t,this._changeDetectorRef=e,this._stateChanges=p.a.EMPTY;const n=Number(i);this.tabIndex=n||0===n?n:null}get disabled(){return void 0===this._disabled&&this.datepicker?this.datepicker.disabled:!!this._disabled}set disabled(t){this._disabled=Object(y.c)(t)}ngOnChanges(t){t.datepicker&&this._watchStateChanges()}ngOnDestroy(){this._stateChanges.unsubscribe()}ngAfterContentInit(){this._watchStateChanges()}_open(t){this.datepicker&&!this.disabled&&(this.datepicker.open(),t.stopPropagation())}_watchStateChanges(){const t=this.datepicker?this.datepicker._stateChanges:Object(f.a)(),e=this.datepicker&&this.datepicker._datepickerInput?this.datepicker._datepickerInput.stateChanges:Object(f.a)(),i=this.datepicker?Object(b.a)(this.datepicker.openedStream,this.datepicker.closedStream):Object(f.a)();this._stateChanges.unsubscribe(),this._stateChanges=Object(b.a)(this._intl.changes,t,e,i).subscribe(()=>this._changeDetectorRef.markForCheck())}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(B),r.Qb(r.h),r.bc("tabindex"))},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-datepicker-toggle"]],contentQueries:function(t,e,i){var n;1&t&&r.Jb(i,It,!0),2&t&&r.yc(n=r.ec())&&(e._customIcon=n.first)},viewQuery:function(t,e){var i;1&t&&r.Xc(E,!0),2&t&&r.yc(i=r.ec())&&(e._button=i.first)},hostAttrs:[1,"mat-datepicker-toggle"],hostVars:8,hostBindings:function(t,e){1&t&&r.dc("focus",(function(){return e._button.focus()})),2&t&&(r.Eb("tabindex",e.disabled?null:-1)("data-mat-calendar",e.datepicker?e.datepicker.id:null),r.Ib("mat-datepicker-toggle-active",e.datepicker&&e.datepicker.opened)("mat-accent",e.datepicker&&"accent"===e.datepicker.color)("mat-warn",e.datepicker&&"warn"===e.datepicker.color))},inputs:{tabIndex:"tabIndex",disabled:"disabled",datepicker:["for","datepicker"],disableRipple:"disableRipple"},exportAs:["matDatepickerToggle"],features:[r.Bb],ngContentSelectors:Q,decls:4,vars:6,consts:[["mat-icon-button","","type","button",3,"disabled","disableRipple","click"],["button",""],["class","mat-datepicker-toggle-default-icon","viewBox","0 0 24 24","width","24px","height","24px","fill","currentColor","focusable","false",4,"ngIf"],["viewBox","0 0 24 24","width","24px","height","24px","fill","currentColor","focusable","false",1,"mat-datepicker-toggle-default-icon"],["d","M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"]],template:function(t,e){1&t&&(r.nc(L),r.Wb(0,"button",0,1),r.dc("click",(function(t){return e._open(t)})),r.Oc(2,F,2,0,"svg",2),r.mc(3),r.Vb()),2&t&&(r.oc("disabled",e.disabled)("disableRipple",e.disableRipple),r.Eb("aria-haspopup",e.datepicker?"dialog":null)("aria-label",e._intl.openCalendarLabel)("tabindex",e.disabled?-1:e.tabIndex),r.Db(2),r.oc("ngIf",!e._customIcon))},directives:[c.b,o.t],styles:[".mat-form-field-appearance-legacy .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-datepicker-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-datepicker-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-datepicker-toggle-default-icon{margin:auto}\n"],encapsulation:2,changeDetection:0}),t})();const Vt=new r.s("MAT_DATE_RANGE_INPUT_PARENT");let Rt=(()=>{class t extends Dt{constructor(t,e,i,n,a,s,o,r){super(e,o,r),this._rangeInput=t,this._defaultErrorStateMatcher=i,this._injector=n,this._parentForm=a,this._parentFormGroup=s,this._outsideValueChanged=()=>{this._validatorOnChange()}}ngOnInit(){const t=this._injector.get(C.t,null,r.r.Self);t&&(this.ngControl=t)}ngDoCheck(){this.ngControl&&this.updateErrorState()}isEmpty(){return 0===this._elementRef.nativeElement.value.length}_getPlaceholder(){return this._elementRef.nativeElement.placeholder}focus(){this._elementRef.nativeElement.focus()}_onInput(t){super._onInput(t),this._rangeInput._handleChildValueChange()}_openPopup(){this._rangeInput._openDatepicker()}_getMinDate(){return this._rangeInput.min}_getMaxDate(){return this._rangeInput.max}_getDateFilter(){return this._rangeInput.dateFilter}_parentDisabled(){return this._rangeInput._groupDisabled}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(Vt),r.Qb(r.l),r.Qb(h.d),r.Qb(r.t),r.Qb(C.w,8),r.Qb(C.m,8),r.Qb(h.c,8),r.Qb(h.e,8))},t.\u0275dir=r.Lb({type:t,features:[r.Ab]}),t})();const jt=Object(h.D)(Rt);let At=(()=>{class t extends jt{constructor(t,e,i,n,a,s,o,r){super(t,e,i,n,a,s,o,r),this._startValidator=t=>{const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t.value)),i=this._model?this._model.selection.end:null;return!e||!i||this._dateAdapter.compareDate(e,i)<=0?null:{matStartDateInvalid:{end:i,actual:e}}},this._validator=C.I.compose([...super._getValidators(),this._startValidator]),this._canEmitChangeEvent=t=>t.source!==this._rangeInput._endInput}ngOnInit(){super.ngOnInit()}ngDoCheck(){super.ngDoCheck()}_getValueFromModel(t){return t.start}_assignValueToModel(t){if(this._model){const e=new K(t,this._model.selection.end);this._model.updateSelection(e,this),this._cvaOnChange(t)}}_formatValue(t){super._formatValue(t),this._rangeInput._handleChildValueChange()}getMirrorValue(){const t=this._elementRef.nativeElement,e=t.value;return e.length>0?e:t.placeholder}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(Vt),r.Qb(r.l),r.Qb(h.d),r.Qb(r.t),r.Qb(C.w,8),r.Qb(C.m,8),r.Qb(h.c,8),r.Qb(h.e,8))},t.\u0275dir=r.Lb({type:t,selectors:[["input","matStartDate",""]],hostAttrs:["type","text",1,"mat-start-date","mat-date-range-input-inner"],hostVars:6,hostBindings:function(t,e){1&t&&r.dc("input",(function(t){return e._onInput(t.target.value)}))("change",(function(){return e._onChange()}))("keydown",(function(t){return e._onKeydown(t)}))("blur",(function(){return e._onBlur()})),2&t&&(r.Zb("disabled",e.disabled),r.Eb("id",e._rangeInput.id)("aria-haspopup",e._rangeInput.rangePicker?"dialog":null)("aria-owns",(null==e._rangeInput.rangePicker?null:e._rangeInput.rangePicker.opened)&&e._rangeInput.rangePicker.id||null)("min",e._getMinDate()?e._dateAdapter.toIso8601(e._getMinDate()):null)("max",e._getMaxDate()?e._dateAdapter.toIso8601(e._getMaxDate()):null))},features:[r.Cb([{provide:C.s,useExisting:t,multi:!0},{provide:C.r,useExisting:t,multi:!0}]),r.Ab]}),t})(),Wt=(()=>{class t extends jt{constructor(t,e,i,n,a,s,o,r){super(t,e,i,n,a,s,o,r),this._endValidator=t=>{const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t.value)),i=this._model?this._model.selection.start:null;return!e||!i||this._dateAdapter.compareDate(e,i)>=0?null:{matEndDateInvalid:{start:i,actual:e}}},this._validator=C.I.compose([...super._getValidators(),this._endValidator]),this._canEmitChangeEvent=t=>t.source!==this._rangeInput._startInput}ngOnInit(){super.ngOnInit()}ngDoCheck(){super.ngDoCheck()}_getValueFromModel(t){return t.end}_assignValueToModel(t){if(this._model){const e=new K(this._model.selection.start,t);this._model.updateSelection(e,this),this._cvaOnChange(t)}}_onKeydown(t){t.keyCode!==m.b||this._elementRef.nativeElement.value||this._rangeInput._startInput.focus(),super._onKeydown(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(Vt),r.Qb(r.l),r.Qb(h.d),r.Qb(r.t),r.Qb(C.w,8),r.Qb(C.m,8),r.Qb(h.c,8),r.Qb(h.e,8))},t.\u0275dir=r.Lb({type:t,selectors:[["input","matEndDate",""]],hostAttrs:["type","text",1,"mat-end-date","mat-date-range-input-inner"],hostVars:5,hostBindings:function(t,e){1&t&&r.dc("input",(function(t){return e._onInput(t.target.value)}))("change",(function(){return e._onChange()}))("keydown",(function(t){return e._onKeydown(t)}))("blur",(function(){return e._onBlur()})),2&t&&(r.Zb("disabled",e.disabled),r.Eb("aria-haspopup",e._rangeInput.rangePicker?"dialog":null)("aria-owns",(null==e._rangeInput.rangePicker?null:e._rangeInput.rangePicker.opened)&&e._rangeInput.rangePicker.id||null)("min",e._getMinDate()?e._dateAdapter.toIso8601(e._getMinDate()):null)("max",e._getMaxDate()?e._dateAdapter.toIso8601(e._getMaxDate()):null))},features:[r.Cb([{provide:C.s,useExisting:t,multi:!0},{provide:C.r,useExisting:t,multi:!0}]),r.Ab]}),t})(),Tt=(()=>{class t extends yt{_forwardContentValues(t){super._forwardContentValues(t);const e=this._datepickerInput;e&&(t.comparisonStart=e.comparisonStart,t.comparisonEnd=e.comparisonEnd)}}return t.\u0275fac=function(e){return Et(e||t)},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-date-range-picker"]],exportAs:["matDateRangePicker"],features:[r.Cb([et,at]),r.Ab],decls:0,vars:0,template:function(t,e){},encapsulation:2,changeDetection:0}),t})();const Et=r.Yb(Tt);let Ft=0,Lt=(()=>{class t{constructor(t,e,i,n,a){this._changeDetectorRef=t,this._elementRef=e,this._dateAdapter=n,this._formField=a,this.id="mat-date-range-input-"+Ft++,this.focused=!1,this.controlType="mat-date-range-input",this._groupDisabled=!1,this._ariaDescribedBy=null,this.separator="\u2013",this.comparisonStart=null,this.comparisonEnd=null,this.stateChanges=new u.a,this.ngControl=i}get value(){return this._model?this._model.selection:null}get shouldLabelFloat(){return this.focused||!this.empty}get placeholder(){var t,e;const i=(null===(t=this._startInput)||void 0===t?void 0:t._getPlaceholder())||"",n=(null===(e=this._endInput)||void 0===e?void 0:e._getPlaceholder())||"";return i||n?`${i} ${this.separator} ${n}`:""}get rangePicker(){return this._rangePicker}set rangePicker(t){t&&(this._model=t._registerInput(this),this._rangePicker=t,this._registerModel(this._model))}get required(){return!!this._required}set required(t){this._required=Object(y.c)(t)}get dateFilter(){return this._dateFilter}set dateFilter(t){this._dateFilter=t,this._revalidate()}get min(){return this._min}set min(t){const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t));this._dateAdapter.sameDate(e,this._min)||(this._min=e,this._revalidate())}get max(){return this._max}set max(t){const e=this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t));this._dateAdapter.sameDate(e,this._max)||(this._max=e,this._revalidate())}get disabled(){return this._startInput&&this._endInput?this._startInput.disabled&&this._endInput.disabled:this._groupDisabled}set disabled(t){const e=Object(y.c)(t);e!==this._groupDisabled&&(this._groupDisabled=e,this.stateChanges.next(void 0))}get errorState(){return!(!this._startInput||!this._endInput)&&(this._startInput.errorState||this._endInput.errorState)}get empty(){const t=!!this._startInput&&this._startInput.isEmpty(),e=!!this._endInput&&this._endInput.isEmpty();return t&&e}setDescribedByIds(t){this._ariaDescribedBy=t.length?t.join(" "):null}onContainerClick(){this.focused||this.disabled||(this._model&&this._model.selection.start?this._endInput.focus():this._startInput.focus())}ngAfterContentInit(){this._model&&this._registerModel(this._model),Object(b.a)(this._startInput.stateChanges,this._endInput.stateChanges).subscribe(()=>{this.stateChanges.next(void 0)})}ngOnChanges(t){wt(t,this._dateAdapter)&&this.stateChanges.next(void 0)}ngOnDestroy(){this.stateChanges.complete()}getStartValue(){return this.value?this.value.start:null}getThemePalette(){return this._formField?this._formField.color:void 0}getConnectedOverlayOrigin(){return this._formField?this._formField.getConnectedOverlayOrigin():this._elementRef}_getInputMirrorValue(){return this._startInput?this._startInput.getMirrorValue():""}_shouldHidePlaceholders(){return!!this._startInput&&!this._startInput.isEmpty()}_handleChildValueChange(){this.stateChanges.next(void 0),this._changeDetectorRef.markForCheck()}_openDatepicker(){this._rangePicker&&this._rangePicker.open()}_shouldHideSeparator(){return(!this._formField||this._formField._hideControlPlaceholder())&&this.empty}_getAriaLabelledby(){const t=this._formField;return t&&t._hasFloatingLabel()?t._labelId:null}_revalidate(){this._startInput&&this._startInput._validatorOnChange(),this._endInput&&this._endInput._validatorOnChange()}_registerModel(t){this._startInput&&this._startInput._registerModel(t),this._endInput&&this._endInput._registerModel(t)}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.h),r.Qb(r.l),r.Qb(C.c,10),r.Qb(h.c,8),r.Qb(O.a,8))},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-date-range-input"]],contentQueries:function(t,e,i){var n;1&t&&(r.Jb(i,At,!0),r.Jb(i,Wt,!0)),2&t&&(r.yc(n=r.ec())&&(e._startInput=n.first),r.yc(n=r.ec())&&(e._endInput=n.first))},hostAttrs:["role","group",1,"mat-date-range-input"],hostVars:8,hostBindings:function(t,e){2&t&&(r.Eb("id",null)("aria-labelledby",e._getAriaLabelledby())("aria-describedby",e._ariaDescribedBy)("data-mat-calendar",e.rangePicker?e.rangePicker.id:null),r.Ib("mat-date-range-input-hide-placeholders",e._shouldHidePlaceholders())("mat-date-range-input-required",e.required))},inputs:{separator:"separator",comparisonStart:"comparisonStart",comparisonEnd:"comparisonEnd",rangePicker:"rangePicker",required:"required",dateFilter:"dateFilter",min:"min",max:"max",disabled:"disabled"},exportAs:["matDateRangeInput"],features:[r.Cb([{provide:O.d,useExisting:t},{provide:Vt,useExisting:t}]),r.Bb],ngContentSelectors:z,decls:9,vars:4,consts:[["cdkMonitorSubtreeFocus","",1,"mat-date-range-input-container",3,"cdkFocusChange"],[1,"mat-date-range-input-start-wrapper"],["aria-hidden","true",1,"mat-date-range-input-mirror"],[1,"mat-date-range-input-separator"],[1,"mat-date-range-input-end-wrapper"]],template:function(t,e){1&t&&(r.nc(N),r.Wb(0,"div",0),r.dc("cdkFocusChange",(function(t){return e.focused=null!==t})),r.Wb(1,"div",1),r.mc(2),r.Wb(3,"span",2),r.Qc(4),r.Vb(),r.Vb(),r.Wb(5,"span",3),r.Qc(6),r.Vb(),r.Wb(7,"div",4),r.mc(8,1),r.Vb(),r.Vb()),2&t&&(r.Db(4),r.Rc(e._getInputMirrorValue()),r.Db(1),r.Ib("mat-date-range-input-separator-hidden",e._shouldHideSeparator()),r.Db(1),r.Rc(e.separator))},directives:[n.e],styles:[".mat-date-range-input{display:block;width:100%}.mat-date-range-input-container{display:flex;align-items:center}.mat-date-range-input-separator{transition:opacity 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);margin:0 4px}.mat-date-range-input-separator-hidden{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;opacity:0;transition:none}.mat-date-range-input-inner{font:inherit;background:transparent;color:currentColor;border:none;outline:none;padding:0;margin:0;vertical-align:bottom;text-align:inherit;-webkit-appearance:none;width:100%}.mat-date-range-input-inner::-ms-clear,.mat-date-range-input-inner::-ms-reveal{display:none}.mat-date-range-input-inner:-moz-ui-invalid{box-shadow:none}.mat-date-range-input-inner::placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-moz-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner::-webkit-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-date-range-input-inner:-ms-input-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-hide-placeholder .mat-date-range-input-inner::placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-moz-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-moz-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-date-range-input-inner::-webkit-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner::-webkit-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-date-range-input-inner:-ms-input-placeholder,.mat-date-range-input-hide-placeholders .mat-date-range-input-inner:-ms-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-date-range-input-mirror{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;visibility:hidden;white-space:nowrap;display:inline-block;min-width:2px}.mat-date-range-input-start-wrapper{position:relative;overflow:hidden;max-width:calc(50% - 4px)}.mat-date-range-input-start-wrapper .mat-date-range-input-inner{position:absolute;top:0;left:0}.mat-date-range-input-end-wrapper{flex-grow:1;max-width:calc(50% - 4px)}.mat-form-field-type-mat-date-range-input .mat-form-field-infix{width:200px}\n"],encapsulation:2,changeDetection:0}),t})(),Qt=(()=>{class t{}return t.\u0275mod=r.Ob({type:t}),t.\u0275inj=r.Nb({factory:function(e){return new(e||t)},providers:[B,mt],imports:[[o.c,c.c,l.g,a.f,n.a,s.h],d.c]}),t})()},ihCf:function(t,e,i){"use strict";i.d(e,"a",(function(){return p})),i.d(e,"b",(function(){return b})),i.d(e,"c",(function(){return f})),i.d(e,"d",(function(){return m}));var n=i("nLfN"),a=i("fXoL"),s=i("8LU1"),o=i("EY2u"),r=i("XNiG"),c=i("xgIS"),l=i("3UWI"),d=i("1G5W"),h=i("ofXK");const u=Object(n.f)({passive:!0});let p=(()=>{class t{constructor(t,e){this._platform=t,this._ngZone=e,this._monitoredElements=new Map}monitor(t){if(!this._platform.isBrowser)return o.a;const e=Object(s.e)(t),i=this._monitoredElements.get(e);if(i)return i.subject;const n=new r.a,a="cdk-text-field-autofilled",c=t=>{"cdk-text-field-autofill-start"!==t.animationName||e.classList.contains(a)?"cdk-text-field-autofill-end"===t.animationName&&e.classList.contains(a)&&(e.classList.remove(a),this._ngZone.run(()=>n.next({target:t.target,isAutofilled:!1}))):(e.classList.add(a),this._ngZone.run(()=>n.next({target:t.target,isAutofilled:!0})))};return this._ngZone.runOutsideAngular(()=>{e.addEventListener("animationstart",c,u),e.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(e,{subject:n,unlisten:()=>{e.removeEventListener("animationstart",c,u)}}),n}stopMonitoring(t){const e=Object(s.e)(t),i=this._monitoredElements.get(e);i&&(i.unlisten(),i.subject.complete(),e.classList.remove("cdk-text-field-autofill-monitored"),e.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(e))}ngOnDestroy(){this._monitoredElements.forEach((t,e)=>this.stopMonitoring(e))}}return t.\u0275fac=function(e){return new(e||t)(a.ac(n.a),a.ac(a.C))},t.\u0275prov=Object(a.Mb)({factory:function(){return new t(Object(a.ac)(n.a),Object(a.ac)(a.C))},token:t,providedIn:"root"}),t})(),b=(()=>{class t{constructor(t,e){this._elementRef=t,this._autofillMonitor=e,this.cdkAutofill=new a.o}ngOnInit(){this._autofillMonitor.monitor(this._elementRef).subscribe(t=>this.cdkAutofill.emit(t))}ngOnDestroy(){this._autofillMonitor.stopMonitoring(this._elementRef)}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(p))},t.\u0275dir=a.Lb({type:t,selectors:[["","cdkAutofill",""]],outputs:{cdkAutofill:"cdkAutofill"}}),t})(),f=(()=>{class t{constructor(t,e,i,n){this._elementRef=t,this._platform=e,this._ngZone=i,this._destroyed=new r.a,this._enabled=!0,this._previousMinRows=-1,this._document=n,this._textareaElement=this._elementRef.nativeElement,this._measuringClass=e.FIREFOX?"cdk-textarea-autosize-measuring-firefox":"cdk-textarea-autosize-measuring"}get minRows(){return this._minRows}set minRows(t){this._minRows=Object(s.f)(t),this._setMinHeight()}get maxRows(){return this._maxRows}set maxRows(t){this._maxRows=Object(s.f)(t),this._setMaxHeight()}get enabled(){return this._enabled}set enabled(t){t=Object(s.c)(t),this._enabled!==t&&((this._enabled=t)?this.resizeToFitContent(!0):this.reset())}_setMinHeight(){const t=this.minRows&&this._cachedLineHeight?this.minRows*this._cachedLineHeight+"px":null;t&&(this._textareaElement.style.minHeight=t)}_setMaxHeight(){const t=this.maxRows&&this._cachedLineHeight?this.maxRows*this._cachedLineHeight+"px":null;t&&(this._textareaElement.style.maxHeight=t)}ngAfterViewInit(){this._platform.isBrowser&&(this._initialHeight=this._textareaElement.style.height,this.resizeToFitContent(),this._ngZone.runOutsideAngular(()=>{const t=this._getWindow();Object(c.a)(t,"resize").pipe(Object(l.a)(16),Object(d.a)(this._destroyed)).subscribe(()=>this.resizeToFitContent(!0))}))}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_cacheTextareaLineHeight(){if(this._cachedLineHeight)return;let t=this._textareaElement.cloneNode(!1);t.rows=1,t.style.position="absolute",t.style.visibility="hidden",t.style.border="none",t.style.padding="0",t.style.height="",t.style.minHeight="",t.style.maxHeight="",t.style.overflow="hidden",this._textareaElement.parentNode.appendChild(t),this._cachedLineHeight=t.clientHeight,this._textareaElement.parentNode.removeChild(t),this._setMinHeight(),this._setMaxHeight()}ngDoCheck(){this._platform.isBrowser&&this.resizeToFitContent()}resizeToFitContent(t=!1){if(!this._enabled)return;if(this._cacheTextareaLineHeight(),!this._cachedLineHeight)return;const e=this._elementRef.nativeElement,i=e.value;if(!t&&this._minRows===this._previousMinRows&&i===this._previousValue)return;const n=e.placeholder;e.classList.add(this._measuringClass),e.placeholder="",e.style.height=e.scrollHeight-4+"px",e.classList.remove(this._measuringClass),e.placeholder=n,this._ngZone.runOutsideAngular(()=>{"undefined"!=typeof requestAnimationFrame?requestAnimationFrame(()=>this._scrollToCaretPosition(e)):setTimeout(()=>this._scrollToCaretPosition(e))}),this._previousValue=i,this._previousMinRows=this._minRows}reset(){void 0!==this._initialHeight&&(this._textareaElement.style.height=this._initialHeight)}_noopInputHandler(){}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_scrollToCaretPosition(t){const{selectionStart:e,selectionEnd:i}=t,n=this._getDocument();this._destroyed.isStopped||n.activeElement!==t||t.setSelectionRange(e,i)}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(n.a),a.Qb(a.C),a.Qb(h.e,8))},t.\u0275dir=a.Lb({type:t,selectors:[["textarea","cdkTextareaAutosize",""]],hostAttrs:["rows","1",1,"cdk-textarea-autosize"],hostBindings:function(t,e){1&t&&a.dc("input",(function(){return e._noopInputHandler()}))},inputs:{minRows:["cdkAutosizeMinRows","minRows"],maxRows:["cdkAutosizeMaxRows","maxRows"],enabled:["cdkTextareaAutosize","enabled"]},exportAs:["cdkTextareaAutosize"]}),t})(),m=(()=>{class t{}return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)},imports:[[n.b]]}),t})()},itXk:function(t,e,i){"use strict";i.d(e,"a",(function(){return p}));var n=i("z+Ro"),a=i("DH7j"),s=i("7o/Q");class o extends s.a{notifyNext(t,e,i,n,a){this.destination.next(e)}notifyError(t,e){this.destination.error(t)}notifyComplete(t){this.destination.complete()}}class r extends s.a{constructor(t,e,i){super(),this.parent=t,this.outerValue=e,this.outerIndex=i,this.index=0}_next(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)}_error(t){this.parent.notifyError(t,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}var c=i("SeVD"),l=i("HDdC");function d(t,e,i,n,a=new r(t,i,n)){if(!a.closed)return e instanceof l.a?e.subscribe(a):Object(c.a)(e)(a)}var h=i("yCtX");const u={};function p(...t){let e=void 0,i=void 0;return Object(n.a)(t[t.length-1])&&(i=t.pop()),"function"==typeof t[t.length-1]&&(e=t.pop()),1===t.length&&Object(a.a)(t[0])&&(t=t[0]),Object(h.a)(t,i).lift(new b(e))}class b{constructor(t){this.resultSelector=t}call(t,e){return e.subscribe(new f(t,this.resultSelector))}}class f extends o{constructor(t,e){super(t),this.resultSelector=e,this.active=0,this.values=[],this.observables=[]}_next(t){this.values.push(u),this.observables.push(t)}_complete(){const t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(let i=0;i<e;i++)this.add(d(this,t[i],void 0,i))}}notifyComplete(t){0==(this.active-=1)&&this.destination.complete()}notifyNext(t,e,i){const n=this.values,a=this.toRespond?n[i]===u?--this.toRespond:this.toRespond:0;n[i]=e,0===a&&(this.resultSelector?this._tryResultSelector(n):this.destination.next(n.slice()))}_tryResultSelector(t){let e;try{e=this.resultSelector.apply(this,t)}catch(i){return void this.destination.error(i)}this.destination.next(e)}}},jZKg:function(t,e,i){"use strict";i.d(e,"a",(function(){return s}));var n=i("HDdC"),a=i("quSY");function s(t,e){return new n.a(i=>{const n=new a.a;let s=0;return n.add(e.schedule((function(){s!==t.length?(i.next(t[s++]),i.closed||n.add(this.schedule())):i.complete()}))),n})}},jaxi:function(t,e,i){"use strict";i.d(e,"a",(function(){return _})),i.d(e,"b",(function(){return m})),i.d(e,"c",(function(){return y}));var n=i("8LU1"),a=i("0EQZ"),s=i("fXoL"),o=i("3Pt+"),r=i("FKr1"),c=i("u47x");const l=["button"],d=["*"],h=new s.s("MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS"),u=new s.s("MatButtonToggleGroup"),p={provide:o.s,useExisting:Object(s.X)(()=>m),multi:!0};let b=0;class f{constructor(t,e){this.source=t,this.value=e}}let m=(()=>{class t{constructor(t,e){this._changeDetector=t,this._vertical=!1,this._multiple=!1,this._disabled=!1,this._controlValueAccessorChangeFn=()=>{},this._onTouched=()=>{},this._name="mat-button-toggle-group-"+b++,this.valueChange=new s.o,this.change=new s.o,this.appearance=e&&e.appearance?e.appearance:"standard"}get name(){return this._name}set name(t){this._name=t,this._buttonToggles&&this._buttonToggles.forEach(t=>{t.name=this._name,t._markForCheck()})}get vertical(){return this._vertical}set vertical(t){this._vertical=Object(n.c)(t)}get value(){const t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t.map(t=>t.value):t[0]?t[0].value:void 0}set value(t){this._setSelectionByValue(t),this.valueChange.emit(this.value)}get selected(){const t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t:t[0]||null}get multiple(){return this._multiple}set multiple(t){this._multiple=Object(n.c)(t)}get disabled(){return this._disabled}set disabled(t){this._disabled=Object(n.c)(t),this._buttonToggles&&this._buttonToggles.forEach(t=>t._markForCheck())}ngOnInit(){this._selectionModel=new a.c(this.multiple,void 0,!1)}ngAfterContentInit(){this._selectionModel.select(...this._buttonToggles.filter(t=>t.checked))}writeValue(t){this.value=t,this._changeDetector.markForCheck()}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t}_emitChangeEvent(){const t=this.selected,e=Array.isArray(t)?t[t.length-1]:t,i=new f(e,this.value);this._controlValueAccessorChangeFn(i.value),this.change.emit(i)}_syncButtonToggle(t,e,i=!1,n=!1){this.multiple||!this.selected||t.checked||(this.selected.checked=!1),this._selectionModel?e?this._selectionModel.select(t):this._selectionModel.deselect(t):n=!0,n?Promise.resolve().then(()=>this._updateModelValue(i)):this._updateModelValue(i)}_isSelected(t){return this._selectionModel&&this._selectionModel.isSelected(t)}_isPrechecked(t){return void 0!==this._rawValue&&(this.multiple&&Array.isArray(this._rawValue)?this._rawValue.some(e=>null!=t.value&&e===t.value):t.value===this._rawValue)}_setSelectionByValue(t){this._rawValue=t,this._buttonToggles&&(this.multiple&&t?(Array.isArray(t),this._clearSelection(),t.forEach(t=>this._selectValue(t))):(this._clearSelection(),this._selectValue(t)))}_clearSelection(){this._selectionModel.clear(),this._buttonToggles.forEach(t=>t.checked=!1)}_selectValue(t){const e=this._buttonToggles.find(e=>null!=e.value&&e.value===t);e&&(e.checked=!0,this._selectionModel.select(e))}_updateModelValue(t){t&&this._emitChangeEvent(),this.valueChange.emit(this.value)}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.h),s.Qb(h,8))},t.\u0275dir=s.Lb({type:t,selectors:[["mat-button-toggle-group"]],contentQueries:function(t,e,i){var n;1&t&&s.Jb(i,_,!0),2&t&&s.yc(n=s.ec())&&(e._buttonToggles=n)},hostAttrs:["role","group",1,"mat-button-toggle-group"],hostVars:5,hostBindings:function(t,e){2&t&&(s.Eb("aria-disabled",e.disabled),s.Ib("mat-button-toggle-vertical",e.vertical)("mat-button-toggle-group-appearance-standard","standard"===e.appearance))},inputs:{appearance:"appearance",name:"name",vertical:"vertical",value:"value",multiple:"multiple",disabled:"disabled"},outputs:{valueChange:"valueChange",change:"change"},exportAs:["matButtonToggleGroup"],features:[s.Cb([p,{provide:u,useExisting:t}])]}),t})();class g{}const v=Object(r.B)(g);let _=(()=>{class t extends v{constructor(t,e,i,n,a,o){super(),this._changeDetectorRef=e,this._elementRef=i,this._focusMonitor=n,this._isSingleSelector=!1,this._checked=!1,this.ariaLabelledby=null,this._disabled=!1,this.change=new s.o;const r=Number(a);this.tabIndex=r||0===r?r:null,this.buttonToggleGroup=t,this.appearance=o&&o.appearance?o.appearance:"standard"}get buttonId(){return this.id+"-button"}get appearance(){return this.buttonToggleGroup?this.buttonToggleGroup.appearance:this._appearance}set appearance(t){this._appearance=t}get checked(){return this.buttonToggleGroup?this.buttonToggleGroup._isSelected(this):this._checked}set checked(t){const e=Object(n.c)(t);e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&this.buttonToggleGroup._syncButtonToggle(this,this._checked),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled||this.buttonToggleGroup&&this.buttonToggleGroup.disabled}set disabled(t){this._disabled=Object(n.c)(t)}ngOnInit(){const t=this.buttonToggleGroup;this._isSingleSelector=t&&!t.multiple,this.id=this.id||"mat-button-toggle-"+b++,this._isSingleSelector&&(this.name=t.name),t&&(t._isPrechecked(this)?this.checked=!0:t._isSelected(this)!==this._checked&&t._syncButtonToggle(this,this._checked))}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){const t=this.buttonToggleGroup;this._focusMonitor.stopMonitoring(this._elementRef),t&&t._isSelected(this)&&t._syncButtonToggle(this,!1,!1,!0)}focus(t){this._buttonElement.nativeElement.focus(t)}_onButtonClick(){const t=!!this._isSingleSelector||!this._checked;t!==this._checked&&(this._checked=t,this.buttonToggleGroup&&(this.buttonToggleGroup._syncButtonToggle(this,this._checked,!0),this.buttonToggleGroup._onTouched())),this.change.emit(new f(this,this.value))}_markForCheck(){this._changeDetectorRef.markForCheck()}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(u,8),s.Qb(s.h),s.Qb(s.l),s.Qb(c.h),s.bc("tabindex"),s.Qb(h,8))},t.\u0275cmp=s.Kb({type:t,selectors:[["mat-button-toggle"]],viewQuery:function(t,e){var i;1&t&&s.Xc(l,!0),2&t&&s.yc(i=s.ec())&&(e._buttonElement=i.first)},hostAttrs:[1,"mat-button-toggle"],hostVars:11,hostBindings:function(t,e){1&t&&s.dc("focus",(function(){return e.focus()})),2&t&&(s.Eb("tabindex",-1)("id",e.id)("name",null),s.Ib("mat-button-toggle-standalone",!e.buttonToggleGroup)("mat-button-toggle-checked",e.checked)("mat-button-toggle-disabled",e.disabled)("mat-button-toggle-appearance-standard","standard"===e.appearance))},inputs:{disableRipple:"disableRipple",ariaLabelledby:["aria-labelledby","ariaLabelledby"],tabIndex:"tabIndex",appearance:"appearance",checked:"checked",disabled:"disabled",id:"id",name:"name",ariaLabel:["aria-label","ariaLabel"],value:"value"},outputs:{change:"change"},exportAs:["matButtonToggle"],features:[s.Ab],ngContentSelectors:d,decls:6,vars:9,consts:[["type","button",1,"mat-button-toggle-button","mat-focus-indicator",3,"id","disabled","click"],["button",""],[1,"mat-button-toggle-label-content"],[1,"mat-button-toggle-focus-overlay"],["matRipple","",1,"mat-button-toggle-ripple",3,"matRippleTrigger","matRippleDisabled"]],template:function(t,e){if(1&t&&(s.nc(),s.Wb(0,"button",0,1),s.dc("click",(function(){return e._onButtonClick()})),s.Wb(2,"span",2),s.mc(3),s.Vb(),s.Vb(),s.Rb(4,"span",3),s.Rb(5,"span",4)),2&t){const t=s.zc(1);s.oc("id",e.buttonId)("disabled",e.disabled||null),s.Eb("tabindex",e.disabled?-1:e.tabIndex)("aria-pressed",e.checked)("name",e.name||null)("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby),s.Db(5),s.oc("matRippleTrigger",t)("matRippleDisabled",e.disableRipple||e.disabled)}},directives:[r.u],styles:[".mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;border-radius:2px;-webkit-tap-highlight-color:transparent}.cdk-high-contrast-active .mat-button-toggle-standalone,.cdk-high-contrast-active .mat-button-toggle-group{outline:solid 1px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:4px}.cdk-high-contrast-active .mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.cdk-high-contrast-active .mat-button-toggle-group-appearance-standard{outline:0}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:1}.cdk-high-contrast-active .mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:.5}.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{opacity:.04}.mat-button-toggle-appearance-standard.cdk-keyboard-focused:not(.mat-button-toggle-disabled) .mat-button-toggle-focus-overlay{opacity:.12}.cdk-high-contrast-active .mat-button-toggle-appearance-standard.cdk-keyboard-focused:not(.mat-button-toggle-disabled) .mat-button-toggle-focus-overlay{opacity:.5}@media(hover: none){.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-block;line-height:36px;padding:0 16px;position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{border-radius:inherit;pointer-events:none;opacity:0;top:0;left:0;right:0;bottom:0;position:absolute}.mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 36px}.cdk-high-contrast-active .mat-button-toggle-checked .mat-button-toggle-focus-overlay{opacity:.5;height:0}.cdk-high-contrast-active .mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}\n"],encapsulation:2,changeDetection:0}),t})(),y=(()=>{class t{}return t.\u0275mod=s.Ob({type:t}),t.\u0275inj=s.Nb({factory:function(e){return new(e||t)},imports:[[r.k,r.v],r.k]}),t})()},jhN1:function(t,e,i){"use strict";i.d(e,"a",(function(){return L})),i.d(e,"b",(function(){return j})),i.d(e,"c",(function(){return M})),i.d(e,"d",(function(){return k})),i.d(e,"e",(function(){return E})),i.d(e,"f",(function(){return x}));var n=i("ofXK"),a=i("fXoL");class s extends n.J{constructor(){super()}supportsDOMEvents(){return!0}}class o extends s{static makeCurrent(){Object(n.N)(new o)}getProperty(t,e){return t[e]}log(t){window.console&&window.console.log&&window.console.log(t)}logGroup(t){window.console&&window.console.group&&window.console.group(t)}logGroupEnd(){window.console&&window.console.groupEnd&&window.console.groupEnd()}onAndCancel(t,e,i){return t.addEventListener(e,i,!1),()=>{t.removeEventListener(e,i,!1)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){return t.parentNode&&t.parentNode.removeChild(t),t}getValue(t){return t.value}createElement(t,e){return(e=e||this.getDefaultDocument()).createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null}getHistory(){return window.history}getLocation(){return window.location}getBaseHref(t){const e=c||(c=document.querySelector("base"),c)?c.getAttribute("href"):null;return null==e?null:(i=e,r||(r=document.createElement("a")),r.setAttribute("href",i),"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname);var i}resetBaseElement(){c=null}getUserAgent(){return window.navigator.userAgent}performanceNow(){return window.performance&&window.performance.now?window.performance.now():(new Date).getTime()}supportsCookies(){return!0}getCookie(t){return Object(n.M)(document.cookie,t)}}let r,c=null;const l=new a.s("TRANSITION_ID"),d=[{provide:a.d,useFactory:function(t,e,i){return()=>{i.get(a.e).donePromise.then(()=>{const i=Object(n.L)();Array.prototype.slice.apply(e.querySelectorAll("style[ng-transition]")).filter(e=>e.getAttribute("ng-transition")===t).forEach(t=>i.remove(t))})}},deps:[l,n.e,a.t],multi:!0}];class h{static init(){Object(a.bb)(new h)}addToWindow(t){a.sb.getAngularTestability=(e,i=!0)=>{const n=t.findTestabilityInTree(e,i);if(null==n)throw new Error("Could not find testability for element.");return n},a.sb.getAllAngularTestabilities=()=>t.getAllTestabilities(),a.sb.getAllAngularRootElements=()=>t.getAllRootElements(),a.sb.frameworkStabilizers||(a.sb.frameworkStabilizers=[]),a.sb.frameworkStabilizers.push(t=>{const e=a.sb.getAllAngularTestabilities();let i=e.length,n=!1;const s=function(e){n=n||e,i--,0==i&&t(n)};e.forEach((function(t){t.whenStable(s)}))})}findTestabilityInTree(t,e,i){if(null==e)return null;const a=t.getTestability(e);return null!=a?a:i?Object(n.L)().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null}}const u=new a.s("EventManagerPlugins");let p=(()=>{class t{constructor(t,e){this._zone=e,this._eventNameToPlugin=new Map,t.forEach(t=>t.manager=this),this._plugins=t.slice().reverse()}addEventListener(t,e,i){return this._findPluginFor(e).addEventListener(t,e,i)}addGlobalEventListener(t,e,i){return this._findPluginFor(e).addGlobalEventListener(t,e,i)}getZone(){return this._zone}_findPluginFor(t){const e=this._eventNameToPlugin.get(t);if(e)return e;const i=this._plugins;for(let n=0;n<i.length;n++){const e=i[n];if(e.supports(t))return this._eventNameToPlugin.set(t,e),e}throw new Error("No event manager plugin found for event "+t)}}return t.\u0275fac=function(e){return new(e||t)(a.ac(u),a.ac(a.C))},t.\u0275prov=a.Mb({token:t,factory:t.\u0275fac}),t})();class b{constructor(t){this._doc=t}addGlobalEventListener(t,e,i){const a=Object(n.L)().getGlobalEventTarget(this._doc,t);if(!a)throw new Error(`Unsupported event target ${a} for event ${e}`);return this.addEventListener(a,e,i)}}let f=(()=>{class t{constructor(){this._stylesSet=new Set}addStyles(t){const e=new Set;t.forEach(t=>{this._stylesSet.has(t)||(this._stylesSet.add(t),e.add(t))}),this.onStylesAdded(e)}onStylesAdded(t){}getAllStyles(){return Array.from(this._stylesSet)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=a.Mb({token:t,factory:t.\u0275fac}),t})(),m=(()=>{class t extends f{constructor(t){super(),this._doc=t,this._hostNodes=new Set,this._styleNodes=new Set,this._hostNodes.add(t.head)}_addStylesToHost(t,e){t.forEach(t=>{const i=this._doc.createElement("style");i.textContent=t,this._styleNodes.add(e.appendChild(i))})}addHost(t){this._addStylesToHost(this._stylesSet,t),this._hostNodes.add(t)}removeHost(t){this._hostNodes.delete(t)}onStylesAdded(t){this._hostNodes.forEach(e=>this._addStylesToHost(t,e))}ngOnDestroy(){this._styleNodes.forEach(t=>Object(n.L)().remove(t))}}return t.\u0275fac=function(e){return new(e||t)(a.ac(n.e))},t.\u0275prov=a.Mb({token:t,factory:t.\u0275fac}),t})();const g={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/"},v=/%COMP%/g;function _(t,e,i){for(let n=0;n<e.length;n++){let a=e[n];Array.isArray(a)?_(t,a,i):(a=a.replace(v,t),i.push(a))}return i}function y(t){return e=>{if("__ngUnwrap__"===e)return t;!1===t(e)&&(e.preventDefault(),e.returnValue=!1)}}let x=(()=>{class t{constructor(t,e,i){this.eventManager=t,this.sharedStylesHost=e,this.appId=i,this.rendererByCompId=new Map,this.defaultRenderer=new C(t)}createRenderer(t,e){if(!t||!e)return this.defaultRenderer;switch(e.encapsulation){case a.U.Emulated:{let i=this.rendererByCompId.get(e.id);return i||(i=new O(this.eventManager,this.sharedStylesHost,e,this.appId),this.rendererByCompId.set(e.id,i)),i.applyToHost(t),i}case a.U.Native:case a.U.ShadowDom:return new D(this.eventManager,this.sharedStylesHost,t,e);default:if(!this.rendererByCompId.has(e.id)){const t=_(e.id,e.styles,[]);this.sharedStylesHost.addStyles(t),this.rendererByCompId.set(e.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return t.\u0275fac=function(e){return new(e||t)(a.ac(p),a.ac(m),a.ac(a.c))},t.\u0275prov=a.Mb({token:t,factory:t.\u0275fac}),t})();class C{constructor(t){this.eventManager=t,this.data=Object.create(null)}destroy(){}createElement(t,e){return e?document.createElementNS(g[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){t.appendChild(e)}insertBefore(t,e,i){t&&t.insertBefore(e,i)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t,e){let i="string"==typeof t?document.querySelector(t):t;if(!i)throw new Error(`The selector "${t}" did not match any elements`);return e||(i.textContent=""),i}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,i,n){if(n){e=n+":"+e;const a=g[n];a?t.setAttributeNS(a,e,i):t.setAttribute(e,i)}else t.setAttribute(e,i)}removeAttribute(t,e,i){if(i){const n=g[i];n?t.removeAttributeNS(n,e):t.removeAttribute(`${i}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,i,n){n&a.K.DashCase?t.style.setProperty(e,i,n&a.K.Important?"important":""):t.style[e]=i}removeStyle(t,e,i){i&a.K.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,i){t[e]=i}setValue(t,e){t.nodeValue=e}listen(t,e,i){return"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,y(i)):this.eventManager.addEventListener(t,e,y(i))}}class O extends C{constructor(t,e,i,n){super(t),this.component=i;const a=_(n+"-"+i.id,i.styles,[]);e.addStyles(a),this.contentAttr="_ngcontent-%COMP%".replace(v,n+"-"+i.id),this.hostAttr="_nghost-%COMP%".replace(v,n+"-"+i.id)}applyToHost(t){super.setAttribute(t,this.hostAttr,"")}createElement(t,e){const i=super.createElement(t,e);return super.setAttribute(i,this.contentAttr,""),i}}class D extends C{constructor(t,e,i,n){super(t),this.sharedStylesHost=e,this.hostEl=i,this.component=n,this.shadowRoot=n.encapsulation===a.U.ShadowDom?i.attachShadow({mode:"open"}):i.createShadowRoot(),this.sharedStylesHost.addHost(this.shadowRoot);const s=_(n.id,n.styles,[]);for(let a=0;a<s.length;a++){const t=document.createElement("style");t.textContent=s[a],this.shadowRoot.appendChild(t)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,i){return super.insertBefore(this.nodeOrShadowRoot(t),e,i)}removeChild(t,e){return super.removeChild(this.nodeOrShadowRoot(t),e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}}let w=(()=>{class t extends b{constructor(t){super(t)}supports(t){return!0}addEventListener(t,e,i){return t.addEventListener(e,i,!1),()=>this.removeEventListener(t,e,i)}removeEventListener(t,e,i){return t.removeEventListener(e,i)}}return t.\u0275fac=function(e){return new(e||t)(a.ac(n.e))},t.\u0275prov=a.Mb({token:t,factory:t.\u0275fac}),t})();const M=new a.s("HammerGestureConfig");let k=(()=>{class t{constructor(){this.events=[],this.overrides={}}buildHammer(t){const e=new Hammer(t,this.options);e.get("pinch").set({enable:!0}),e.get("rotate").set({enable:!0});for(const i in this.overrides)e.get(i).set(this.overrides[i]);return e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=a.Mb({token:t,factory:t.\u0275fac}),t})();const S=["alt","control","meta","shift"],I={"\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"},P={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"},V={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};let R=(()=>{class t extends b{constructor(t){super(t)}supports(e){return null!=t.parseEventName(e)}addEventListener(e,i,a){const s=t.parseEventName(i),o=t.eventCallback(s.fullKey,a,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Object(n.L)().onAndCancel(e,s.domEventName,o))}static parseEventName(e){const i=e.toLowerCase().split("."),n=i.shift();if(0===i.length||"keydown"!==n&&"keyup"!==n)return null;const a=t._normalizeKey(i.pop());let s="";if(S.forEach(t=>{const e=i.indexOf(t);e>-1&&(i.splice(e,1),s+=t+".")}),s+=a,0!=i.length||0===a.length)return null;const o={};return o.domEventName=n,o.fullKey=s,o}static getEventFullKey(t){let e="",i=function(t){let e=t.key;if(null==e){if(e=t.keyIdentifier,null==e)return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),3===t.location&&P.hasOwnProperty(e)&&(e=P[e]))}return I[e]||e}(t);return i=i.toLowerCase()," "===i?i="space":"."===i&&(i="dot"),S.forEach(n=>{n!=i&&(0,V[n])(t)&&(e+=n+".")}),e+=i,e}static eventCallback(e,i,n){return a=>{t.getEventFullKey(a)===e&&n.runGuarded(()=>i(a))}}static _normalizeKey(t){switch(t){case"esc":return"escape";default:return t}}}return t.\u0275fac=function(e){return new(e||t)(a.ac(n.e))},t.\u0275prov=a.Mb({token:t,factory:t.\u0275fac}),t})(),j=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(a.Mb)({factory:function(){return Object(a.ac)(W)},token:t,providedIn:"root"}),t})();function A(t){return new W(t.get(n.e))}let W=(()=>{class t extends j{constructor(t){super(),this._doc=t}sanitize(t,e){if(null==e)return null;switch(t){case a.M.NONE:return e;case a.M.HTML:return Object(a.hb)(e,"HTML")?Object(a.zb)(e):Object(a.fb)(this._doc,String(e));case a.M.STYLE:return Object(a.hb)(e,"Style")?Object(a.zb)(e):e;case a.M.SCRIPT:if(Object(a.hb)(e,"Script"))return Object(a.zb)(e);throw new Error("unsafe value used in a script context");case a.M.URL:return Object(a.rb)(e),Object(a.hb)(e,"URL")?Object(a.zb)(e):Object(a.gb)(String(e));case a.M.RESOURCE_URL:if(Object(a.hb)(e,"ResourceURL"))return Object(a.zb)(e);throw new Error("unsafe value used in a resource URL context (see http://g.co/ng/security#xss)");default:throw new Error(`Unexpected SecurityContext ${t} (see http://g.co/ng/security#xss)`)}}bypassSecurityTrustHtml(t){return Object(a.ib)(t)}bypassSecurityTrustStyle(t){return Object(a.lb)(t)}bypassSecurityTrustScript(t){return Object(a.kb)(t)}bypassSecurityTrustUrl(t){return Object(a.mb)(t)}bypassSecurityTrustResourceUrl(t){return Object(a.jb)(t)}}return t.\u0275fac=function(e){return new(e||t)(a.ac(n.e))},t.\u0275prov=Object(a.Mb)({factory:function(){return A(Object(a.ac)(a.p))},token:t,providedIn:"root"}),t})();const T=[{provide:a.F,useValue:n.K},{provide:a.G,useValue:function(){o.makeCurrent(),h.init()},multi:!0},{provide:n.e,useFactory:function(){return Object(a.xb)(document),document},deps:[]}],E=Object(a.V)(a.ab,"browser",T),F=[[],{provide:a.db,useValue:"root"},{provide:a.n,useFactory:function(){return new a.n},deps:[]},{provide:u,useClass:w,multi:!0,deps:[n.e,a.C,a.F]},{provide:u,useClass:R,multi:!0,deps:[n.e]},[],{provide:x,useClass:x,deps:[p,m,a.c]},{provide:a.J,useExisting:x},{provide:f,useExisting:m},{provide:m,useClass:m,deps:[n.e]},{provide:a.Q,useClass:a.Q,deps:[a.C]},{provide:p,useClass:p,deps:[u,a.C]},[]];let L=(()=>{class t{constructor(t){if(t)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:a.c,useValue:e.appId},{provide:l,useExisting:a.c},d]}}}return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)(a.ac(t,12))},providers:F,imports:[n.c,a.f]}),t})();"undefined"!=typeof window&&window},jj9e:function(t,e,i){"use strict";i.r(e);var n=i("fXoL"),a=i("MJ5r"),s=i("vWc3"),o=i("tyNb"),r=i("mrSG"),c=i("LRne"),l=i("lJxs"),d=i("pLZG"),h=i("Cfvw"),u=i("zx2A");function p(t,e){return e?i=>i.pipe(p((i,n)=>Object(h.a)(t(i,n)).pipe(Object(l.a)((t,a)=>e(i,t,n,a))))):e=>e.lift(new b(t))}class b{constructor(t){this.project=t}call(t,e){return e.subscribe(new f(t,this.project))}}class f extends u.b{constructor(t,e){super(t),this.project=e,this.hasSubscription=!1,this.hasCompleted=!1,this.index=0}_next(t){this.hasSubscription||this.tryNext(t)}tryNext(t){let e;const i=this.index++;try{e=this.project(t,i)}catch(n){return void this.destination.error(n)}this.hasSubscription=!0,this._innerSub(e)}_innerSub(t){const e=new u.a(this),i=this.destination;i.add(e);const n=Object(u.c)(t,e);n!==e&&i.add(n)}_complete(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()}notifyNext(t){this.destination.next(t)}notifyError(t){this.destination.error(t)}notifyComplete(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()}}var m=i("JIr8"),g=i("sYmb"),v=i("tk/3"),_=i("uqn4"),y=i("4zkx");let x=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.router=i,this.authService=n,this.headerService=a}canActivate(t,e){const i=e.url.replace(/^\/+|\/+$/g,"").split("/");return console.debug("== ROUTE GUARD =="),console.debug(e.url),this.headerService.resetSideNavSelection(),this.authService.getLoginInformations(e.url).pipe(Object(l.a)(t=>!!t&&(null===this.authService.getToken()?(this.authService.setCachedUrl(e.url.replace(/^\//g,"")),console.debug("Aucun token trouv\xe9 ! Redirection sur login ..."),this.authService.logout(!1,!0),!1):void 0)),Object(d.a)(()=>null!==this.authService.getToken()),p(()=>this.authService.getCurrentUserInfo()),Object(l.a)(t=>"ABS"===this.headerService.user.status?(this.router.navigate(["/activate-user"]),!1):(this.headerService.hideSideBar=i.filter(t=>["signatureBook","content"].indexOf(t)>-1).length>0,this.headerService.sideBarAdmin=i.filter(t=>"administration"===t).length>0||i.filter(t=>"profile"===t).length>0,!0)),Object(m.a)(t=>(console.log(t),"User must change his password"===t.error.errors?this.router.navigate(["/password-modification"]):Object(c.a)(!1))))}}return t.\u0275fac=function(e){return new(e||t)(n.ac(g.e),n.ac(v.b),n.ac(o.c),n.ac(_.a),n.ac(y.a))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),C=(()=>{class t{constructor(t){this.translate=t}canDeactivate(t,e,i,n){return Object(r.a)(this,void 0,void 0,(function*(){return(t.isToolModified()&&!t.isModalOpen()||void 0!==t.appDocumentViewer&&t.appDocumentViewer.isEditingTemplate())&&confirm(this.translate.instant("lang.saveModifiedData"))&&(yield t.saveModificationBeforeClose()),!0}))}}return t.\u0275fac=function(e){return new(e||t)(n.ac(g.e))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();var O=i("0EQZ"),D=i("AXEc"),w=i("A6w4"),M=i("/t3+"),k=i("bTqV"),S=i("NFeN"),I=i("XhcP"),P=i("ofXK"),V=i("Xa2L"),R=i("MutI"),j=i("bSwM"),A=i("Qu3c"),W=i("FKr1"),T=i("f0Cb");function E(t,e){1&t&&(n.Wb(0,"div",9),n.Rb(1,"mat-spinner",10),n.Vb())}function F(t,e){1&t&&(n.Ub(0),n.Rb(1,"br"),n.Qc(2),n.ic(3,"translate"),n.Rb(4,"br"),n.Tb()),2&t&&(n.Db(2),n.Sc(" ",n.jc(3,1,"lang.missingBasket"),""))}function L(t,e){1&t&&(n.Wb(0,"span",23),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.selectAll")," "))}function Q(t,e){1&t&&(n.Wb(0,"span",24),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.selectAll")," "))}function N(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item",26),n.dc("mouseover",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(3).showActions(e)}))("mouseout",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(3).hideActions(e)})),n.Wb(1,"mat-icon",17),n.Wb(2,"mat-checkbox",27),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("change",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc(3);return e?a.selectionBaskets.toggle(i):null})),n.Vb(),n.Vb(),n.Wb(3,"h4",28),n.Wb(4,"span",29),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(3).selectionBaskets.toggle(e)})),n.ic(5,"translate"),n.Qc(6),n.Wb(7,"span",30),n.Qc(8),n.Vb(),n.Wb(9,"span",23),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc(3);n.Db(2),n.oc("checked",e.selectionBaskets.isSelected(t)),n.Db(2),n.tc("matTooltip","",t.basket_name," [",t.group_desc,"] ",n.jc(5,9,"lang.redirectedTo")," ",t.userToDisplay,""),n.Db(2),n.Sc(" ",t.basket_name," "),n.Db(2),n.Rc(t.group_desc),n.Db(2),n.Tc(" ",n.jc(11,11,"lang.redirectedTo")," ",t.userToDisplay,"")}}function z(t,e){if(1&t&&(n.Ub(0),n.Oc(1,N,12,13,"mat-list-item",25),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",null!=t.userToDisplay)}}function B(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list"),n.Wb(1,"mat-list-item"),n.Wb(2,"mat-icon",17),n.Wb(3,"mat-checkbox",18),n.dc("change",(function(e){n.Dc(t);const i=n.hc(2);return e?i.masterToggleBaskets(e):null})),n.ic(4,"translate"),n.Vb(),n.Vb(),n.Wb(5,"p",19),n.Oc(6,L,3,3,"span",20),n.Oc(7,Q,3,3,"span",21),n.Vb(),n.Vb(),n.Rb(8,"mat-divider"),n.Oc(9,z,2,1,"ng-container",22),n.Vb()}if(2&t){const t=n.hc(2);n.Db(3),n.pc("matTooltip",n.jc(4,5,"lang.selectAll")),n.oc("checked",t.selectionBaskets.hasValue()),n.Db(3),n.oc("ngIf",!t.selectionBaskets.hasValue()),n.Db(1),n.oc("ngIf",t.selectionBaskets.hasValue()),n.Db(2),n.oc("ngForOf",t.user.redirectedBaskets)}}function U(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",31),n.Qc(1),n.ic(2,"translate"),n.Rb(3,"br"),n.Rb(4,"br"),n.Wb(5,"button",32),n.dc("click",(function(){return n.Dc(t),n.hc(2).activateUser()})),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Wb(8,"button",32),n.dc("click",(function(){return n.Dc(t),n.hc(2).logout()})),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.Sc(" ",n.jc(2,3,"lang.missingChoose"),""),n.Db(5),n.Rc(n.jc(7,5,"lang.validate")),n.Db(3),n.Rc(n.jc(10,7,"lang.cancel")))}function H(t,e){if(1&t&&(n.Wb(0,"div",11),n.Wb(1,"div",12),n.Qc(2),n.ic(3,"translate"),n.Rb(4,"br"),n.Qc(5),n.ic(6,"translate"),n.Rb(7,"br"),n.Oc(8,F,5,3,"ng-container",13),n.Vb(),n.Rb(9,"div",14),n.Wb(10,"div",14),n.Oc(11,B,10,7,"mat-list",13),n.Vb(),n.Rb(12,"div",14),n.Rb(13,"div",15),n.Oc(14,U,11,9,"div",16),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Sc(" ",n.jc(3,5,"lang.missingAdvert"),""),n.Db(3),n.Sc(" ",n.jc(6,7,"lang.missingAdvert2"),""),n.Db(3),n.oc("ngIf",t.user.redirectedBaskets.length>0),n.Db(3),n.oc("ngIf",t.user.redirectedBaskets.length>0),n.Db(3),n.oc("ngIf",!t.loading)}}let G=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.authService=i,this.headerService=n,this.notify=a,this.router=s,this.appService=o,this.user={baskets:[]},this.userAbsenceModel=[],this.basketsToRedirect=[],this.loading=!1,this.selectedIndex=0,this.selectionBaskets=new O.c(!0,[]),this.myBasketExpansionPanel=!1}masterToggleBaskets(t){t.checked?this.user.redirectedBaskets.forEach(t=>{this.selectionBaskets.select(t)}):this.selectionBaskets.clear()}ngOnInit(){this.loading=!0,"ABS"===this.headerService.user.status?this.http.get("../rest/currentUser/profile").subscribe(t=>{this.user=t,this.user.baskets.forEach((t,e)=>{this.user.baskets[e].disabled=!1,this.user.redirectedBaskets.forEach(i=>{t.basket_id==i.basket_id&&t.basket_owner==i.basket_owner&&(this.user.baskets[e].disabled=!0)})}),this.loading=!1}):this.router.navigate(["/home"])}showActions(t){$("#"+t.basket_id+"_"+t.group_id).show()}hideActions(t){$("#"+t.basket_id+"_"+t.group_id).hide()}activateUser(){this.http.put("../rest/users/"+this.headerService.user.id+"/status",{status:"OK"}).subscribe(()=>{this.headerService.user.status="OK";let t="";this.user.redirectedBaskets.forEach(e=>{-1!==this.selectionBaskets.selected.map(t=>t.basket_id).indexOf(e.basket_id)&&-1!==this.selectionBaskets.selected.map(t=>t.group_id).indexOf(e.group_id)&&(""!==t&&(t+="&redirectedBasketIds[]="),t+=e.id)}),""!==t?this.http.delete("../rest/users/"+this.headerService.user.id+"/redirectedBaskets?redirectedBasketIds[]="+t).subscribe(t=>{this.router.navigate(["/home"]),this.notify.success(this.translate.instant("lang.absOff"))},t=>{this.notify.error(t.error.errors)}):(this.router.navigate(["/home"]),this.notify.success(this.translate.instant("lang.absOff")))},t=>{this.notify.error(t.error.errors)})}logout(){this.authService.logout()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(_.a),n.Qb(y.a),n.Qb(D.a),n.Qb(o.c),n.Qb(w.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:12,vars:8,consts:[[1,"admin-container",2,"margin-top","-63px"],["color","primary",1,"admin-toolbar"],["mat-button",""],[1,"maarchLogoWhiteFull",3,"svgIcon"],[1,"admin-toolbar-title","text-center"],[2,"flex","1 1 auto"],["autosize","",1,"admin-sidenav-container"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"text-center",2,"margin-top","50px"],[4,"ngIf"],[1,"col-sm-4",2,"overflow","hidden"],[2,"clear","both"],["class","text-center","style","position:relative; top:50px;",4,"ngIf"],["mat-list-icon","","color","primary"],["color","primary",3,"checked","matTooltip","change"],["mat-line",""],["style","opacity: 0.5;font-style: italic;font-size: 80%;",4,"ngIf"],["style","opacity: 1;font-style: normal;font-size: 100%;",4,"ngIf"],[4,"ngFor","ngForOf"],[2,"opacity","0.5","font-style","italic","font-size","80%"],[2,"opacity","1","font-style","normal","font-size","100%"],["style","cursor: pointer;",3,"mouseover","mouseout",4,"ngIf"],[2,"cursor","pointer",3,"mouseover","mouseout"],["color","primary",3,"checked","click","change"],["mat-line","","color","primary",2,"display","flex","align-items","center"],[2,"flex","2","overflow","hidden","text-overflow","ellipsis",3,"matTooltip","click"],[1,"label","label-primary",2,"font-weight","normal"],[1,"text-center",2,"position","relative","top","50px"],["mat-raised-button","","color","primary","type","button",3,"click"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"mat-toolbar",1),n.Wb(2,"button",2),n.Rb(3,"mat-icon",3),n.Vb(),n.Wb(4,"h1",4),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Rb(7,"span",5),n.Vb(),n.Wb(8,"mat-sidenav-container",6),n.Wb(9,"mat-sidenav-content"),n.Oc(10,E,2,0,"div",7),n.Oc(11,H,15,9,"div",8),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Ib("admin-is-mobile",e.appService.getViewMode()),n.Db(3),n.oc("svgIcon",e.appService.getViewMode()?"maarchLogoOnly":"maarchLogo"),n.Db(2),n.Rc(n.jc(6,6,"lang.missingAdvertTitle")),n.Db(5),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[M.a,k.b,S.a,I.e,I.f,P.t,V.c,R.a,R.d,R.c,j.a,A.b,W.l,T.a,P.s],pipes:[g.d],encapsulation:2}),t})();var X=i("3Pt+"),q=i("0IaG"),K=i("Wp6s"),Y=i("kmnG"),J=i("qFsG");function Z(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Vb())}function tt(t,e){1&t&&(n.Qc(0),n.ic(1,"translate")),2&t&&n.Rc(n.jc(1,1,"lang.passwordModification"))}function et(t,e){1&t&&(n.Wb(0,"mat-error"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.requiredField")))}function it(t,e){1&t&&(n.Wb(0,"mat-hint"),n.Rb(1,"i",32),n.Wb(2,"span",33),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Rc(n.jc(4,1,"lang.passwordValid")))}function nt(t,e){1&t&&(n.Wb(0,"mat-hint"),n.Rb(1,"i",32),n.Wb(2,"span",33),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Rc(n.jc(4,1,"lang.passwordMatch")))}function at(t,e){if(1&t&&n.Rb(0,"div",34),2&t){const t=n.hc(2);n.oc("innerHTML",t.otherRuleText,n.Ec)}}const st=function(t){return[t]};function ot(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",17),n.Wb(1,"form",18),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Oc(2,tt,2,3,"ng-template"),n.Wb(3,"mat-form-field",19),n.Rb(4,"input",20),n.ic(5,"translate"),n.Wb(6,"mat-icon",21),n.dc("click",(function(){n.Dc(t);const e=n.hc();return e.hidePassword=!e.hidePassword})),n.Vb(),n.Oc(7,et,3,3,"mat-error",22),n.Vb(),n.Wb(8,"div",23),n.Qc(9),n.Vb(),n.Wb(10,"mat-form-field",19),n.Rb(11,"input",24,25),n.ic(13,"translate"),n.Wb(14,"mat-icon",21),n.dc("click",(function(){n.Dc(t);const e=n.hc();return e.hidePassword=!e.hidePassword})),n.Vb(),n.Oc(15,it,5,3,"mat-hint",22),n.Wb(16,"mat-error"),n.Qc(17),n.Vb(),n.Vb(),n.Wb(18,"mat-form-field",19),n.Rb(19,"input",26,27),n.ic(21,"translate"),n.Wb(22,"mat-icon",21),n.dc("click",(function(){n.Dc(t);const e=n.hc();return e.hidePassword=!e.hidePassword})),n.Vb(),n.Oc(23,nt,5,3,"mat-hint",22),n.Wb(24,"mat-error"),n.Qc(25),n.ic(26,"translate"),n.Vb(),n.Vb(),n.Wb(27,"div",28),n.Wb(28,"button",29),n.Qc(29),n.ic(30,"translate"),n.Vb(),n.Wb(31,"button",30),n.dc("click",(function(){return n.Dc(t),n.hc().logout()})),n.Qc(32),n.ic(33,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Oc(34,at,1,1,"div",31),n.Vb()}if(2&t){const t=n.hc();n.Db(1),n.oc("formGroup",t.firstFormGroup),n.Db(3),n.pc("placeholder",n.jc(5,20,"lang.typeCurrentPassword")),n.oc("type",t.hidePassword?"password":"text"),n.Db(2),n.oc("ngClass",n.vc(32,st,t.hidePassword?"fa-eye-slash":"fa-eye")),n.Db(1),n.oc("ngIf",t.firstFormGroup.controls.currentPasswordCtrl.hasError("required")),n.Db(2),n.Rc(t.ruleText),n.Db(2),n.pc("placeholder",n.jc(13,22,"lang.typeNewPassword")),n.oc("type",t.hidePassword?"password":"text"),n.Db(3),n.oc("ngClass",n.vc(34,st,t.hidePassword?"fa-eye-slash":"fa-eye")),n.Db(1),n.oc("ngIf",t.validPassword),n.Db(2),n.Rc(t.getErrorMessage()),n.Db(2),n.pc("placeholder",n.jc(21,24,"lang.retypeNewPassword")),n.oc("type",t.hidePassword?"password":"text"),n.Db(3),n.oc("ngClass",n.vc(36,st,t.hidePassword?"fa-eye-slash":"fa-eye")),n.Db(1),n.oc("ngIf",!t.firstFormGroup.controls.retypePasswordCtrl.hasError("mismatch")&&""!=t.firstFormGroup.controls.retypePasswordCtrl.value),n.Db(2),n.Sc("",n.jc(26,26,"lang.passwordNotMatch")," !"),n.Db(3),n.oc("disabled",!t.firstFormGroup.valid),n.Db(1),n.Rc(n.jc(30,28,"lang.validate")),n.Db(3),n.Rc(n.jc(33,30,"lang.logout")),n.Db(2),n.oc("ngIf",t.passwordRules.renewal.enabled||t.passwordRules.historyLastUse.enabled)}}function rt(t,e){if(1&t&&(n.Wb(0,"p"),n.Qc(1),n.ic(2,"translate"),n.Wb(3,"b"),n.Qc(4),n.Vb(),n.Qc(5,", "),n.Rb(6,"br"),n.Qc(7),n.ic(8,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Sc(" ",n.jc(2,4,"lang.hello")," "),n.Db(3),n.Tc("",t.data.user.firstname," ",t.data.user.lastname,""),n.Db(3),n.Sc("",n.jc(8,6,"lang.changePasswordInfo"),". ")}}function ct(t,e){1&t&&(n.Wb(0,"p"),n.Rb(1,"mat-icon",4),n.Wb(2,"span",5),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Rc(n.jc(4,1,"lang.passwordChanged")))}function lt(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",6),n.dc("click",(function(){return n.Dc(t),n.hc().dialogRef.close()})),n.Qc(1,"Ok"),n.Vb()}}function dt(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",6),n.dc("click",(function(){return n.Dc(t),n.hc().redirect()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.homePage")))}let ht=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.authService=i,this.headerService=n,this.notify=a,this._formBuilder=s,this.dialog=o,this.appService=r,this.config={},this.loading=!1,this.user={},this.ruleText="",this.hidePassword=!0,this.passLength=!1,this.arrValidator=[],this.validPassword=!1,this.matchPassword=!1,this.isLinear=!1,this.passwordRules={minLength:{enabled:!1,value:0},complexityUpper:{enabled:!1,value:0},complexityNumber:{enabled:!1,value:0},complexitySpecial:{enabled:!1,value:0},renewal:{enabled:!1,value:0},historyLastUse:{enabled:!1,value:0}},this.passwordModel={currentPassword:"",newPassword:"",reNewPassword:""},this.user=JSON.parse(atob(this.authService.getToken().split(".")[1])).user}ngOnInit(){setTimeout(()=>{this.config={panelClass:"maarch-modal",data:{user:this.user,state:"BEGIN"},disableClose:!0},this.dialogRef=this.dialog.open(ut,this.config)},0),this.http.get("../rest/passwordRules").subscribe(t=>{const e=[],i=[],n=[];e.push(X.I.required),t.rules.forEach(t=>{"minLength"===t.label?(this.passwordRules.minLength.enabled=t.enabled,this.passwordRules.minLength.value=t.value,t.enabled&&(e.push(X.I.minLength(this.passwordRules.minLength.value)),i.push(t.value+" "+this.translate.instant("lang.password"+t.label)))):"complexityUpper"===t.label?(this.passwordRules.complexityUpper.enabled=t.enabled,this.passwordRules.complexityUpper.value=t.value,t.enabled&&(e.push(this.regexValidator(new RegExp("[A-Z]"),{complexityUpper:""})),i.push(this.translate.instant("lang.password"+t.label)))):"complexityNumber"===t.label?(this.passwordRules.complexityNumber.enabled=t.enabled,this.passwordRules.complexityNumber.value=t.value,t.enabled&&(e.push(this.regexValidator(new RegExp("[0-9]"),{complexityNumber:""})),i.push(this.translate.instant("lang.password"+t.label)))):"complexitySpecial"===t.label?(this.passwordRules.complexitySpecial.enabled=t.enabled,this.passwordRules.complexitySpecial.value=t.value,t.enabled&&(e.push(this.regexValidator(new RegExp("[^A-Za-z0-9]"),{complexitySpecial:""})),i.push(this.translate.instant("lang.password"+t.label)))):"renewal"===t.label?(this.passwordRules.renewal.enabled=t.enabled,this.passwordRules.renewal.value=t.value,t.enabled&&n.push(this.translate.instant("lang.password"+t.label)+" <b>"+t.value+" "+this.translate.instant("lang.days")+"</b>. "+this.translate.instant("lang.password2"+t.label)+".")):"historyLastUse"===t.label&&(this.passwordRules.historyLastUse.enabled=t.enabled,this.passwordRules.historyLastUse.value=t.value,t.enabled&&n.push(this.translate.instant("lang.passwordhistoryLastUseDesc")+" <b>"+t.value+"</b> "+this.translate.instant("lang.passwordhistoryLastUseDesc2")+"."))}),this.ruleText=i.join(", "),this.otherRuleText=n.join("<br/>"),this.firstFormGroup.controls.newPasswordCtrl.setValidators(e)},t=>{this.notify.error(t.error.errors)}),this.firstFormGroup=this._formBuilder.group({newPasswordCtrl:[""],retypePasswordCtrl:["",X.I.compose([X.I.required])],currentPasswordCtrl:["",X.I.compose([X.I.required])]},{validator:this.matchValidator})}regexValidator(t,e){return i=>i.value?t.test(i.value)?null:e:null}matchValidator(t){return t.controls.newPasswordCtrl.value!==t.controls.retypePasswordCtrl.value&&(t.controls.retypePasswordCtrl.setErrors({mismatch:!0}),{mismatch:!0})}getErrorMessage(){return this.firstFormGroup.controls.retypePasswordCtrl.setErrors(this.firstFormGroup.controls.newPasswordCtrl.value!==this.firstFormGroup.controls.retypePasswordCtrl.value?{mismatch:!0}:null),this.firstFormGroup.controls.newPasswordCtrl.hasError("required")?this.translate.instant("lang.requiredField")+" !":this.firstFormGroup.controls.newPasswordCtrl.hasError("minlength")&&this.passwordRules.minLength.enabled?this.passwordRules.minLength.value+" "+this.translate.instant("lang.passwordminLength")+" !":null!=this.firstFormGroup.controls.newPasswordCtrl.errors&&void 0!==this.firstFormGroup.controls.newPasswordCtrl.errors.complexityUpper&&this.passwordRules.complexityUpper.enabled?this.translate.instant("lang.passwordcomplexityUpper")+" !":null!=this.firstFormGroup.controls.newPasswordCtrl.errors&&void 0!==this.firstFormGroup.controls.newPasswordCtrl.errors.complexityNumber&&this.passwordRules.complexityNumber.enabled?this.translate.instant("lang.passwordcomplexityNumber")+" !":null!=this.firstFormGroup.controls.newPasswordCtrl.errors&&void 0!==this.firstFormGroup.controls.newPasswordCtrl.errors.complexitySpecial&&this.passwordRules.complexitySpecial.enabled?this.translate.instant("lang.passwordcomplexitySpecial")+" !":(this.firstFormGroup.controls.newPasswordCtrl.setErrors(null),this.validPassword=!0,"")}onSubmit(){this.passwordModel.currentPassword=this.firstFormGroup.controls.currentPasswordCtrl.value,this.passwordModel.newPassword=this.firstFormGroup.controls.newPasswordCtrl.value,this.passwordModel.reNewPassword=this.firstFormGroup.controls.retypePasswordCtrl.value,this.http.put("../rest/users/"+this.user.id+"/password",this.passwordModel).subscribe(()=>{this.config={panelClass:"maarch-modal",data:{state:"END"},disableClose:!0},this.dialogRef=this.dialog.open(ut,this.config)},t=>{this.notify.error(t.error.errors)})}logout(){this.authService.logout()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(_.a),n.Qb(y.a),n.Qb(D.a),n.Qb(X.h),n.Qb(q.b),n.Qb(w.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:21,vars:20,consts:[[1,"admin-container",2,"margin-top","-63px"],["color","primary",1,"admin-toolbar"],["mat-button","",3,"click"],[1,"maarchLogoFull",3,"svgIcon"],[1,"admin-toolbar-title"],[2,"flex","1 1 auto"],["mat-button",""],["mat-list-icon","",1,"fa","fa-user","fa-2x",2,"color","white","margin","0px 12px 8px 0px"],["autosize","",1,"admin-sidenav-container"],["fixedTopGap","56",3,"mode","fixedInViewport","opened"],["snav",""],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content","style","display: flex;justify-content: center;align-items: center;",4,"ngIf"],["fixedTopGap","56","position","end",3,"mode","fixedInViewport","opened"],["snav2",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content",2,"display","flex","justify-content","center","align-items","center"],[2,"max-width","700px",3,"formGroup","ngSubmit"],[2,"padding","10px"],["matInput","","formControlName","currentPasswordCtrl","required","",3,"placeholder","type"],["matSuffix","",1,"fa","fa-2x",3,"ngClass","click"],[4,"ngIf"],[2,"text-align","center","color","rgba(0,0,0,0.54)","font-size","75%"],["matInput","","formControlName","newPasswordCtrl","required","",3,"placeholder","type"],["inputPasswd",""],["matInput","","required","","formControlName","retypePasswordCtrl",3,"placeholder","type"],["inputPasswd2",""],[1,"col-md-12","text-center",2,"padding","10px"],["mat-raised-button","","type","submit","color","primary",3,"disabled"],["mat-raised-button","","type","button","color","default",3,"click"],["class","alert alert-warning","role","alert","style","text-align:center;left:0px;bottom: 0px;position: absolute;width: 100%;margin: 0;",3,"innerHTML",4,"ngIf"],["color","accent",1,"fa","fa-check"],["color","accent"],["role","alert",1,"alert","alert-warning",2,"text-align","center","left","0px","bottom","0px","position","absolute","width","100%","margin","0",3,"innerHTML"]],template:function(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",0),n.Wb(1,"mat-toolbar",1),n.Wb(2,"button",2),n.dc("click",(function(){return n.Dc(t),n.zc(15).toggle()})),n.Rb(3,"mat-icon",3),n.Vb(),n.Wb(4,"h1",4),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Rb(7,"span",5),n.Wb(8,"button",6),n.Rb(9,"mat-icon",7),n.Qc(10),n.ic(11,"uppercase"),n.ic(12,"uppercase"),n.Vb(),n.Vb(),n.Wb(13,"mat-sidenav-container",8),n.Rb(14,"mat-sidenav",9,10),n.Wb(16,"mat-sidenav-content"),n.Oc(17,Z,2,0,"div",11),n.Oc(18,ot,35,38,"mat-card",12),n.Vb(),n.Rb(19,"mat-sidenav",13,14),n.Vb(),n.Vb()}2&t&&(n.Ib("admin-is-mobile",e.appService.getViewMode()),n.Db(3),n.oc("svgIcon",e.appService.getViewMode()?"maarchLogoOnly":"maarchLogo"),n.Db(2),n.Sc("",n.jc(6,14,"lang.passwordModification")," "),n.Db(5),n.Tc("",n.jc(11,16,e.user.firstname.charAt(0)),". ",n.jc(12,18,e.user.lastname),""),n.Db(4),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",!e.appService.getViewMode()),n.Db(3),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",(e.appService.getViewMode(),!1)))},directives:[M.a,k.b,S.a,R.c,I.e,I.d,I.f,P.t,V.c,K.a,X.K,X.v,X.m,Y.c,J.b,X.d,X.u,X.k,X.F,Y.j,P.q,Y.b,Y.f],pipes:[g.d,P.G],encapsulation:2}),t})(),ut=(()=>{class t{constructor(t,e,i,n){this.http=t,this.router=e,this.data=i,this.dialogRef=n}redirect(){this.router.navigate(["/home"]),this.dialogRef.close()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(v.b),n.Qb(o.c),n.Qb(q.a),n.Qb(q.h))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:8,vars:4,consts:[[1,"mat-dialog-content-container"],[4,"ngIf"],[1,"divider-modal"],["mat-raised-button","","color","primary",3,"click",4,"ngIf"],["color","primary",1,"fa","fa-check-circle","fa-2x"],[2,"padding-left","10px"],["mat-raised-button","","color","primary",3,"click"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"mat-dialog-content"),n.Oc(2,rt,9,8,"p",1),n.Oc(3,ct,5,3,"p",1),n.Vb(),n.Rb(4,"span",2),n.Wb(5,"mat-dialog-actions"),n.Oc(6,lt,2,0,"button",3),n.Oc(7,dt,3,3,"button",3),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.oc("ngIf","BEGIN"==e.data.state),n.Db(1),n.oc("ngIf","END"==e.data.state),n.Db(3),n.oc("ngIf","BEGIN"==e.data.state),n.Db(1),n.oc("ngIf","END"==e.data.state))},directives:[q.f,P.t,q.c,S.a,k.b],pipes:[g.d],encapsulation:2}),t})();var pt=i("Kj3r"),bt=i("/uUt"),ft=i("eIep"),mt=i("vkgz"),gt=i("7EHt"),vt=i("+0xr"),_t=i("rH+9");function yt(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",5),n.dc("click",(function(){return n.Dc(t),n.hc(2).headerService.sideNavLeft.open()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",6),n.Vb()}2&t&&n.pc("title",n.jc(1,1,"lang.openSidePanel"))}function xt(t,e){if(1&t&&n.Rb(0,"i"),2&t){const t=n.hc(2);n.Gb("",t.headerService.headerMessageIcon," headerIcon")}}function Ct(t,e){if(1&t&&(n.Wb(0,"div",1),n.Oc(1,yt,3,3,"button",2),n.Oc(2,xt,1,3,"i",3),n.Qc(3),n.Wb(4,"span",4),n.Qc(5),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",!t.headerService.sideNavLeft.opened),n.Db(1),n.oc("ngIf",""!==t.headerService.headerMessageIcon),n.Db(1),n.Sc(" ",t.headerService.headerMessage," "),n.Db(2),n.Rc(t.headerService.subHeaderMessage)}}let Ot=(()=>{class t{constructor(t,e){this.translate=t,this.headerService=e,this.config={}}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(y.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["header-left"]],inputs:{snavLeft:"snavLeft"},decls:1,vars:1,consts:[["class","bg-head-title-label",4,"ngIf"],[1,"bg-head-title-label"],["mat-icon-button","","style","font-size:20px;",3,"title","click",4,"ngIf"],[3,"class",4,"ngIf"],[1,"admin-toolbar-title-small"],["mat-icon-button","",2,"font-size","20px",3,"title","click"],[1,"fa","fa-stream"]],template:function(t,e){1&t&&n.Oc(0,Ct,6,4,"div",0),2&t&&n.oc("ngIf",void 0!==e.headerService.sideNavLeft)},directives:[P.t,k.b,S.a],pipes:[g.d],styles:[".bg-head-title-label[_ngcontent-%COMP%] .mat-icon-button[_ngcontent-%COMP%]{position:absolute;margin-left:-35px;margin-top:-10px}.headerIcon[_ngcontent-%COMP%]{font-size:22px}"]}),t})();var Dt=i("eiH7"),wt=i("TU8p");const Mt=[[["","md-fab",""],["","mat-fab",""]]],kt=["[md-fab], [mat-fab]"],St=[[["","md-mini-fab",""],["","mat-mini-fab",""]]],It=["[md-mini-fab], [mat-mini-fab]"],Pt=[[["smd-fab-trigger"]],[["smd-fab-actions"]]],Vt=["smd-fab-trigger","smd-fab-actions"];let Rt=(()=>{class t{constructor(t){this._parent=t,this.spin=!1}_onClick(t){this._parent.fixed||(this._parent.toggle(),t.stopPropagation())}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(Object(n.X)(()=>At)))},t.\u0275cmp=n.Kb({type:t,selectors:[["smd-fab-trigger"]],hostVars:2,hostBindings:function(t,e){1&t&&n.dc("click",(function(t){return e._onClick(t)})),2&t&&n.Ib("smd-spin",e.spin)},inputs:{spin:"spin"},ngContentSelectors:kt,decls:1,vars:0,template:function(t,e){1&t&&(n.nc(Mt),n.mc(0))},encapsulation:2}),t})(),jt=(()=>{class t{constructor(t,e){this._parent=t,this.renderer=e}ngAfterContentInit(){this._buttons.changes.subscribe(()=>{this.initButtonStates(),this._parent.setActionsVisibility()}),this.initButtonStates()}initButtonStates(){this._buttons.toArray().forEach((t,e)=>{this.renderer.addClass(t._getHostElement(),"smd-fab-action-item"),this.changeElementStyle(t._getHostElement(),"z-index",""+(23-e))})}show(){this._buttons&&this._buttons.toArray().forEach((t,e)=>{let i,n=0;"scale"==this._parent.animationMode?(n=3+65*e,i="scale(1)"):i=this.getTranslateFunction("0"),this.changeElementStyle(t._getHostElement(),"transition-delay",n+"ms"),this.changeElementStyle(t._getHostElement(),"opacity","1"),this.changeElementStyle(t._getHostElement(),"transform",i)})}hide(){this._buttons&&this._buttons.toArray().forEach((t,e)=>{let i,n="1",a=0;"scale"==this._parent.animationMode?(a=3-65*e,i="scale(0)",n="0"):i=this.getTranslateFunction(55*(e+1)-5*e+"px"),this.changeElementStyle(t._getHostElement(),"transition-delay",a+"ms"),this.changeElementStyle(t._getHostElement(),"opacity",n),this.changeElementStyle(t._getHostElement(),"transform",i)})}getTranslateFunction(t){let e=this._parent.direction;return("up"==e||"down"==e?"translateY":"translateX")+"("+("down"==e||"right"==e?"-":"")+t+")"}changeElementStyle(t,e,i){this.renderer.setStyle(t,e,i)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(Object(n.X)(()=>At)),n.Qb(n.I))},t.\u0275cmp=n.Kb({type:t,selectors:[["smd-fab-actions"]],contentQueries:function(t,e,i){var a;1&t&&n.Jb(i,k.b,!1),2&t&&n.yc(a=n.ec())&&(e._buttons=a)},ngContentSelectors:It,decls:1,vars:0,template:function(t,e){1&t&&(n.nc(St),n.mc(0))},encapsulation:2}),t})(),At=(()=>{class t{constructor(t,e){this.elementRef=t,this.renderer=e,this.isInitialized=!1,this._direction="up",this._open=!1,this._animationMode="fling",this.fixed=!1,this.openChange=new n.o}get open(){return this._open}set open(t){let e=this._open;this._open=t,e!=this._open&&(this.openChange.emit(this._open),this.isInitialized&&this.setActionsVisibility())}get direction(){return this._direction}set direction(t){let e=this._direction;this._direction=t,e!=this.direction&&(this._setElementClass(e,!1),this._setElementClass(this.direction,!0),this.isInitialized&&this.setActionsVisibility())}get animationMode(){return this._animationMode}set animationMode(t){let e=this._animationMode;this._animationMode=t,e!=this._animationMode&&(this._setElementClass(e,!1),this._setElementClass(this.animationMode,!0),this.isInitialized&&Promise.resolve(null).then(()=>this.open=!1))}ngAfterContentInit(){this.isInitialized=!0,this.setActionsVisibility(),this._setElementClass(this.direction,!0),this._setElementClass(this.animationMode,!0)}toggle(){this.open=!this.open}_onClick(){!this.fixed&&this.open&&(this.open=!1)}setActionsVisibility(){this.open?this._childActions.show():this._childActions.hide()}_setElementClass(t,e){e?this.renderer.addClass(this.elementRef.nativeElement,"smd-"+t):this.renderer.removeClass(this.elementRef.nativeElement,"smd-"+t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(n.I))},t.\u0275cmp=n.Kb({type:t,selectors:[["smd-fab-speed-dial"]],contentQueries:function(t,e,i){var a;1&t&&n.Jc(i,jt,!0),2&t&&n.yc(a=n.ec())&&(e._childActions=a.first)},hostVars:2,hostBindings:function(t,e){1&t&&n.dc("click",(function(){return e._onClick()})),2&t&&n.Ib("smd-opened",e.open)},inputs:{fixed:"fixed",open:"open",direction:"direction",animationMode:"animationMode"},outputs:{openChange:"openChange"},ngContentSelectors:Vt,decls:3,vars:0,consts:[[1,"smd-fab-speed-dial-container"]],template:function(t,e){1&t&&(n.nc(Pt),n.Wb(0,"div",0),n.mc(1),n.mc(2,1),n.Vb())},styles:["smd-fab-speed-dial{position:absolute;display:inline-block}smd-fab-speed-dial.smd-opened .smd-fab-speed-dial-container{height:auto}smd-fab-speed-dial.smd-opened .smd-fab-speed-dial-container smd-fab-trigger.smd-spin{transform:rotate(1turn)}smd-fab-speed-dial.smd-opened .smd-fab-speed-dial-container smd-fab-actions{height:auto}smd-fab-speed-dial .smd-fab-speed-dial-container{height:0;position:relative;display:flex;align-items:center;z-index:20}smd-fab-speed-dial .smd-fab-speed-dial-container smd-fab-trigger{pointer-events:auto;z-index:24}smd-fab-speed-dial .smd-fab-speed-dial-container smd-fab-trigger.smd-spin{transition:all .6s cubic-bezier(.4,0,.2,1)}smd-fab-speed-dial .smd-fab-speed-dial-container smd-fab-actions{height:0;display:flex}smd-fab-speed-dial.smd-fling .smd-fab-speed-dial-container smd-fab-actions .smd-fab-action-item{display:block;opacity:1;transition:all .3s cubic-bezier(.55,0,.55,.2)}smd-fab-speed-dial.smd-scale .smd-fab-speed-dial-container smd-fab-actions .smd-fab-action-item{transform:scale(0);transition:all .3s cubic-bezier(.55,0,.55,.2);transition-duration:.14286s}smd-fab-speed-dial.smd-down .smd-fab-speed-dial-container{flex-direction:column}smd-fab-speed-dial.smd-down .smd-fab-speed-dial-container smd-fab-trigger{order:1}smd-fab-speed-dial.smd-down .smd-fab-speed-dial-container smd-fab-actions{flex-direction:column;order:2}smd-fab-speed-dial.smd-down .smd-fab-speed-dial-container smd-fab-actions .smd-fab-action-item{margin-top:10px}smd-fab-speed-dial.smd-up .smd-fab-speed-dial-container{flex-direction:column}smd-fab-speed-dial.smd-up .smd-fab-speed-dial-container smd-fab-trigger{order:2}smd-fab-speed-dial.smd-up .smd-fab-speed-dial-container smd-fab-actions{flex-direction:column-reverse;order:1}smd-fab-speed-dial.smd-up .smd-fab-speed-dial-container smd-fab-actions .smd-fab-action-item{margin-bottom:10px}smd-fab-speed-dial.smd-left .smd-fab-speed-dial-container{flex-direction:row}smd-fab-speed-dial.smd-left .smd-fab-speed-dial-container smd-fab-trigger{order:2}smd-fab-speed-dial.smd-left .smd-fab-speed-dial-container smd-fab-actions{flex-direction:row-reverse;order:1}smd-fab-speed-dial.smd-left .smd-fab-speed-dial-container smd-fab-actions .smd-fab-action-item{margin-right:10px}smd-fab-speed-dial.smd-right .smd-fab-speed-dial-container{flex-direction:row}smd-fab-speed-dial.smd-right .smd-fab-speed-dial-container smd-fab-trigger{order:1}smd-fab-speed-dial.smd-right .smd-fab-speed-dial-container smd-fab-actions{flex-direction:row;order:2}smd-fab-speed-dial.smd-right .smd-fab-speed-dial-container smd-fab-actions .smd-fab-action-item{margin-left:10px}"],encapsulation:2}),t})();var Wt=i("1YbM"),Tt=i("aEDk");function Et(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",5),n.Wb(1,"button",6),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc().gotToMenu(e)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",7),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc();n.Db(1),n.pc("matTooltip",n.jc(2,7,t.label)),n.oc("id",t.id),n.Db(2),n.Gb("fa ",t.style,""),n.pc("matBadge",e.headerService.nbResourcesFollowed),n.pc("matBadgeHidden","followed"!=t.id)}}function Ft(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",15),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc(2).$implicit;return n.hc().onSpeedDialFabClicked(i,a)})),n.Wb(1,"span",16),n.Qc(2),n.ic(3,"shorten"),n.Vb(),n.Rb(4,"mat-icon",17),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2).$implicit;n.oc("id",i.id),n.Db(2),n.Rc(n.lc(3,2,t.label,20,"..."))}}function Lt(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",8),n.Wb(1,"smd-fab-speed-dial",9,10),n.dc("mouseenter",(function(){return n.Dc(t),n.zc(2).open=!0}))("mouseleave",(function(){return n.Dc(t),n.zc(2).open=!1})),n.Wb(3,"smd-fab-trigger",11),n.Wb(4,"button",12),n.Rb(5,"mat-icon",13),n.Vb(),n.Vb(),n.Wb(6,"smd-fab-actions"),n.Oc(7,Ft,5,6,"button",14),n.ic(8,"sortBy"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(5),n.Gb("fa ",t.style," spin360"),n.Db(2),n.oc("ngForOf",n.kc(8,4,t.groups,"label"))}}function Qt(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Et,4,9,"span",3),n.Oc(2,Lt,9,7,"span",4),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf","indexing"==t.id&&t.groups.length<=1||"indexing"!=t.id),n.Db(1),n.oc("ngIf","indexing"==t.id&&t.groups.length>1)}}function Nt(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"a",3),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().goTo(i)})),n.Rb(2,"mat-icon",4),n.Wb(3,"p",5),n.Qc(4),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=e.$implicit;n.Db(4),n.Sc(" ",t.label," ")}}let zt=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this._router=i,this.dialog=n,this.appService=a,this.privilegeService=s,this.headerService=o,this.config={},this.speedDialFabButtons=[],this.speedDialFabColumnDirection="column",this.router=i}ngOnInit(){}onSpeedDialFabClicked(t,e){this.router.navigate(["/indexing/"+t.id])}gotToMenu(t){"indexing"===t.id?this.router.navigate([t.route+"/"+t.groups[0].id]):!0===t.angular?this.router.navigate([t.route]):location.href=t.route}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.c),n.Qb(q.b),n.Qb(w.a),n.Qb(Dt.a),n.Qb(y.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["menu-shortcut"]],decls:5,vars:1,consts:[[2,"position","relative"],[1,"button-row",2,"padding-left","10px","padding-right","10px","display","flex","width","300px","margin-top","-10px","margin-bottom","10px"],[4,"ngFor","ngForOf"],["style","flex:1;text-align: left;padding: 5px;",4,"ngIf"],["style","flex:1;text-align: left;padding: 5px;position: relative;",4,"ngIf"],[2,"flex","1","text-align","left","padding","5px"],["color","default","mat-fab","","matTooltipPosition","above",1,"followedShortcut",2,"z-index","9999",3,"id","matTooltip","click"],[2,"height","auto","font-size","22px",3,"matBadge","matBadgeHidden"],[2,"flex","1","text-align","left","padding","5px","position","relative"],["direction","down","animationMode","fling","fixed","false",3,"mouseenter","mouseleave"],["myFab",""],["spin","true"],["color","default","mat-fab",""],[2,"font-size","22px"],["color","primary","mat-mini-fab","",3,"id","click",4,"ngFor","ngForOf"],["color","primary","mat-mini-fab","",3,"id","click"],["color","primary",1,"speedDialLabel",2,"display","none","position","absolute","margin-left","20px","margin-top","-5px"],[1,"fa","fa-plus"]],template:function(t,e){1&t&&(n.Rb(0,"mat-nav-list",0),n.Wb(1,"mat-nav-list"),n.Wb(2,"div",1),n.Oc(3,Qt,3,2,"ng-container",2),n.Vb(),n.Vb(),n.Rb(4,"mat-divider")),2&t&&(n.Db(3),n.oc("ngForOf",e.privilegeService.shortcuts))},directives:[R.h,P.s,T.a,P.t,k.b,A.b,S.a,wt.a,At,Rt,jt],pipes:[g.d,Wt.a,Tt.p],styles:[".button-row[_ngcontent-%COMP%] .mat-fab[_ngcontent-%COMP%]{border:2px solid #135f7f;color:#135f7f}.mat-fab[_ngcontent-%COMP%] .mat-button-wrapper{padding:0}.speedDialLabel[_ngcontent-%COMP%]{margin-left:-220px!important;width:200px;text-align:right;z-index:0;font-weight:700}.smd-opened[_ngcontent-%COMP%] .speedDialLabel[_ngcontent-%COMP%]{transition:opacity 1s ease-in!important;display:block!important}.mat-icon[_ngcontent-%COMP%]{height:auto!important}.followedShortcut[_ngcontent-%COMP%] .mat-badge-content{width:auto;min-width:25px;min-height:25px;text-align:center;align-items:center;padding:2px;font-size:15px;top:-23px!important;right:-22px!important}"]}),t})(),Bt=(()=>{class t{constructor(t,e,i,n){this.http=t,this.router=e,this.data=i,this.dialogRef=n}goTo(t){this.router.navigate(["/indexing/"+t.id]),this.dialogRef.close()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(v.b),n.Qb(o.c),n.Qb(q.a),n.Qb(q.h))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:7,vars:4,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title","","color","primary"],[4,"ngFor","ngForOf"],["mat-list-item","",3,"click"],["color","primary","mat-list-icon","",1,"fa","fa-users"],["mat-line",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h2",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-dialog-content"),n.Wb(5,"mat-nav-list"),n.Oc(6,Nt,5,1,"ng-container",2),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,2,"lang.chooseIndexationProfil")),n.Db(4),n.oc("ngForOf",e.data.indexingGroups))},directives:[q.i,q.f,R.h,P.s,R.d,S.a,R.c,W.l],pipes:[g.d],styles:[".mat-dialog-content[_ngcontent-%COMP%]{max-height: 65vh;width:600px;}"]}),t})();var Ut=i("5cI5");function $t(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-checkbox",10),n.dc("change",(function(){return n.Dc(t),n.hc(2).hideModal()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.hideModal")))}function Ht(t,e){if(1&t&&(n.Wb(0,"div",7),n.Rb(1,"div",8),n.Oc(2,$t,3,3,"mat-checkbox",9),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("innerHTML",t.data.msg,n.Ec),n.Db(1),n.oc("ngIf",null!==t.idModal)}}let Gt=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.data=e,this.dialogRef=i,this.headerService=n,this.localStorage=a,this.idModal=null,void 0!==this.data.idModal&&(this.idModal=this.data.idModal),null===this.data.msg&&(this.data.msg=""),void 0===this.data.buttonCancel&&(this.data.buttonCancel=this.translate.instant("lang.cancel")),void 0===this.data.buttonValidate&&(this.data.buttonValidate=this.translate.instant("lang.ok"))}hideModal(){""!==this.idModal?this.localStorage.save(`modal_${this.idModal}_${this.headerService.user.id}`,!0):alert("No idModal provided!")}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(q.a),n.Qb(q.h),n.Qb(y.a),n.Qb(Ut.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:10,vars:4,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content","",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions",""],["color","primary","mat-raised-button","",1,"actions",3,"click"],["color","","mat-raised-button","","cdkFocusInitial","",1,"actions",3,"click"],["mat-dialog-content",""],[1,"alert-message","alert-message-info",3,"innerHTML"],["color","primary",3,"change",4,"ngIf"],["color","primary",3,"change"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Oc(3,Ht,3,2,"div",2),n.Rb(4,"span",3),n.Wb(5,"div",4),n.Wb(6,"button",5),n.dc("click",(function(){return e.dialogRef.close("ok")})),n.Qc(7),n.Vb(),n.Wb(8,"button",6),n.dc("click",(function(){return e.dialogRef.close("")})),n.Qc(9),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.title),n.Db(1),n.oc("ngIf",""!==e.data.msg),n.Db(4),n.Rc(e.data.buttonValidate),n.Db(2),n.Rc(e.data.buttonCancel))},directives:[q.i,P.t,q.c,k.b,q.f,j.a],pipes:[g.d],styles:[".alert-message-info[_ngcontent-%COMP%]{margin:0;font-size:16px}"]}),t})();var Xt=i("nYR2"),qt=i("SIQe"),Kt=i("M9IT"),Yt=i("NpuA");let Jt=(()=>{let t=class{constructor(){this._papa=Yt}parse(t,e){return this._papa.parse(t,e)}unparse(t,e){return this._papa.unparse(t,e)}setLocalChunkSize(t){this._papa.LocalChunkSize=t}setRemoteChunkSize(t){this._papa.RemoteChunkSize=t}setDefaultDelimiter(t){this._papa.DefaultDelimiter=t}get badDelimiters(){return this._papa.BAD_DELIMITERS}get recordSeparator(){return this._papa.RECORD_SEP}get unitSeparator(){return this._papa.UNIT_SEP}get workersSupported(){return this._papa.WORKERS_SUPPORTED}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(n.Mb)({factory:function(){return new t},token:t,providedIn:"root"}),t})(),Zt=(()=>{class t{constructor(t,e,i,n){this.http=t,this.translate=e,this.notify=i,this.functions=n,this.coreFields=[{identifier:"doctype",label:this.translate.instant("lang.doctype"),icon:"fa-suitcase",unit:"mail",type:"select",system:!0,mandatory:!0,enabled:!0,default_value:"",values:[]},{identifier:"subject",label:this.translate.instant("lang.subject"),icon:"fa-quote-left",unit:"mail",type:"string",system:!0,mandatory:!0,enabled:!0,default_value:"",values:[]}],this.fields=[{identifier:"resId",label:this.translate.instant("lang.getResId"),icon:"fa-envelope",type:"integer",default_value:[],values:[],enabled:!0},{identifier:"chrono",label:this.translate.instant("lang.chrono"),icon:"fa-compass",type:"string",default_value:[],values:[],enabled:!0,indexingHide:!0},{identifier:"status",label:this.translate.instant("lang.status"),icon:"fa-mail-bulk",type:"select",default_value:[],values:[],enabled:!0,indexingHide:!0},{identifier:"category",label:this.translate.instant("lang.category_id"),icon:"fa-map-signs",type:"select",default_value:[],values:[],enabled:!0,indexingHide:!0},{identifier:"creationDate",label:this.translate.instant("lang.creationDate"),icon:"fa-calendar-day",type:"date",default_value:[],values:[],enabled:!0,indexingHide:!0},{identifier:"recipients",label:this.translate.instant("lang.getRecipients"),icon:"fa-user",type:"autocomplete",default_value:[],values:[],enabled:!0},{identifier:"priority",label:this.translate.instant("lang.priority"),icon:"fa-traffic-light",type:"select",default_value:null,values:[],enabled:!0},{identifier:"confidentiality",label:this.translate.instant("lang.confidential"),icon:"fa-user-secret",type:"radio",default_value:null,values:[{id:!0,label:this.translate.instant("lang.yes")},{id:!1,label:this.translate.instant("lang.no")}],enabled:!0},{identifier:"initiator",label:this.translate.instant("lang.initiatorEntityAlt"),icon:"fa-user",type:"select",default_value:null,values:[],enabled:!0},{identifier:"departureDate",label:this.translate.instant("lang.departureDate"),icon:"fa-calendar-check",type:"date",default_value:null,values:[],enabled:!0},{identifier:"processLimitDate",label:this.translate.instant("lang.processLimitDate"),icon:"fa-stopwatch",type:"date",default_value:null,values:[],enabled:!0},{identifier:"tags",label:this.translate.instant("lang.tags"),icon:"fa-tags",type:"autocomplete",default_value:[],values:["/rest/autocomplete/tags","/rest/tags"],enabled:!0},{identifier:"senders",label:this.translate.instant("lang.getSenders"),icon:"fa-address-book",type:"autocomplete",default_value:[],values:["/rest/autocomplete/correspondents"],enabled:!0},{identifier:"destination",label:this.translate.instant("lang.destination"),icon:"fa-sitemap",type:"select",default_value:null,values:[],enabled:!0},{identifier:"folders",label:this.translate.instant("lang.folders"),icon:"fa-folder",type:"autocomplete",default_value:[],values:["/rest/autocomplete/folders","/rest/folders"],enabled:!0},{identifier:"documentDate",label:this.translate.instant("lang.docDate"),icon:"fa-calendar-day",unit:"mail",type:"date",default_value:null,values:[],enabled:!0},{identifier:"arrivalDate",label:this.translate.instant("lang.arrivalDate"),icon:"fa-calendar",unit:"mail",type:"date",default_value:null,values:[],enabled:!0},{identifier:"registeredMail_type",label:this.translate.instant("lang.registeredMailType"),icon:"fa-file",type:"select",default_value:null,values:[{id:"2D",label:this.translate.instant("lang.registeredMail_2D")},{id:"2C",label:this.translate.instant("lang.registeredMail_2C")},{id:"RW",label:this.translate.instant("lang.registeredMail_RW")}],enabled:!0,searchHide:!0},{identifier:"registeredMail_issuingSite",label:this.translate.instant("lang.issuingSite"),icon:"fa-warehouse",type:"issuingSite",default_value:null,values:[],enabled:!0},{identifier:"registeredMail_number",label:this.translate.instant("lang.registeredMailNumber"),icon:"fa-barcode",type:"string",default_value:null,values:[],enabled:!1,searchHide:!0},{identifier:"registeredMail_warranty",label:this.translate.instant("lang.warrantyLevel"),icon:"fa-shield-alt",type:"radio",default_value:null,values:[{id:"R1",label:"R1"},{id:"R2",label:"R2"},{id:"R3",label:"R3"}],enabled:!0,searchHide:!0},{identifier:"registeredMail_letter",label:this.translate.instant("lang.letter"),icon:"fa-envelope",type:"radio",default_value:null,values:[{id:!0,label:this.translate.instant("lang.yes")},{id:!1,label:this.translate.instant("lang.no")}],enabled:!0,searchHide:!0},{identifier:"registeredMail_recipient",label:this.translate.instant("lang.registeredMailRecipient"),icon:"fa-address-book",type:"contact",default_value:null,values:[],enabled:!0},{identifier:"registeredMail_reference",label:this.translate.instant("lang.registeredMailReference"),icon:"fa-dolly-flatbed",type:"string",default_value:null,values:[],enabled:!0},{identifier:"registeredMail_receivedDate",label:this.translate.instant("lang.registeredMailReceivedDate"),icon:"fa-calendar-check",type:"date",default_value:null,values:[],enabled:!0},{identifier:"fulltext",label:this.translate.instant("lang.fulltext"),icon:"fa-file-alt",type:"string",default_value:[],values:[],enabled:!0,indexingHide:!0},{identifier:"closingDate",label:this.translate.instant("lang.closingDate"),icon:"fa-stopwatch",type:"date",default_value:[],values:[],enabled:!0},{identifier:"notes",label:this.translate.instant("lang.note"),icon:"fa-comments",type:"string",default_value:[],values:[],enabled:!0,indexingHide:!0},{identifier:"barcode",label:this.translate.instant("lang.barcode"),icon:"fa-barcode",type:"string",default_value:[],values:[],enabled:!0,indexingHide:!0},{identifier:"attachment_type",label:this.translate.instant("lang.attachmentType"),icon:"fa-paperclip",type:"select",default_value:[],values:[],enabled:!0,indexingHide:!0},{identifier:"attachment_creationDate",label:`${this.translate.instant("lang.creationDate")} (${this.translate.instant("lang.attachmentShort")})`,icon:"fa-calendar-day",type:"date",default_value:[],values:[],enabled:!0,indexingHide:!0},{identifier:"groupSign",label:this.translate.instant("lang.groupSign"),icon:"fa-user-friends",type:"select",default_value:[],values:[],enabled:!0,indexingHide:!0},{identifier:"senderDepartment",label:this.translate.instant("lang.sendersDepartment"),icon:"fa-map",type:"select",default_value:[],values:[],enabled:!0,indexingHide:!0},{identifier:"retentionFrozen",label:this.translate.instant("lang.retentionRuleFrozen"),icon:"fa-snowflake",type:"select",default_value:[],values:[{id:!0,label:this.translate.instant("lang.yes")},{id:!1,label:this.translate.instant("lang.no")}],enabled:!0,indexingHide:!0},{identifier:"binding",label:this.translate.instant("lang.bindingMail"),icon:"fa-exclamation",type:"select",default_value:[],values:[{id:!0,label:this.translate.instant("lang.yes")},{id:!1,label:this.translate.instant("lang.no")}],enabled:!0,indexingHide:!0}],this.customFields=[],this.roleFields=[],this.mappingdata={getPriority:"priority",getCategory:"category",getDoctype:"doctype",getRecipients:"recipients",getSenders:"senders",getSignatories:"role_sign",getModificationDate:"modificationDate",getOpinionLimitDate:"role_visa",getFolders:"folders",getResId:"resId",getBarcode:"barcode",getRegisteredMailRecipient:"registeredMail_recipient",getRegisteredMailReference:"registeredMail_reference",getRegisteredMailIssuingSite:"registeredMail_issuingSite",chronoNumberShort:"chrono"}}getCoreFields(t=""){const e=JSON.parse(JSON.stringify(this.coreFields));return""===t?e:e.filter(e=>!e[t])}getFields(t=""){const e=JSON.parse(JSON.stringify(this.fields));return""===t?e:e.filter(e=>!e[t])}getCustomFields(){return new Promise((t,e)=>{this.http.get("../rest/customFields").pipe(Object(mt.a)(t=>{this.customFields=t.customFields.map(t=>(t.identifier="indexingCustomField_"+t.id,t.icon="fa-hashtag",t.system=!1,t.enabled=!0,t.SQLMode=t.SQLMode,t.default_value=["integer","string","date"].indexOf(t.type)>-1&&!this.functions.empty(t.values)?t.values[0].key:"banAutocomplete"===t.type?[]:null,t.values=t.values.length>0?t.values.map(t=>({id:t.key,label:t.label})):t.values,t))}),Object(Xt.a)(()=>t(this.customFields)),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}getField(t){let e=this.getCoreFields().concat(this.getFields());return e=e.concat(this.customFields),e=e.concat(this.roleFields),e.filter(e=>e.identifier===t)[0]}getAllFields(){return Object(r.a)(this,void 0,void 0,(function*(){const t=yield this.getCustomFields(),e=yield this.getRolesFields();let i=this.getCoreFields().concat(this.getFields());return i=i.concat(t),i=i.concat(e),i}))}getAllSearchFields(){return Object(r.a)(this,void 0,void 0,(function*(){const t=yield this.getCustomFields(),e=yield this.getRolesFields();let i=this.getCoreFields("searchHide").concat(this.getFields("searchHide"));return i=i.concat(t),i=i.concat(e),i}))}getRolesFields(){return new Promise((t,e)=>{this.http.get("../rest/roles").pipe(Object(mt.a)(t=>{const e=[];t.roles.forEach(t=>{e.push({identifier:"role_"+t.id,label:t.label,icon:"dest"===t.id?"fa-user-edit":"fa-users",type:"select",default_value:null,values:[],enabled:!0})}),e.push({identifier:"role_visa",label:this.translate.instant("lang.visaUser"),icon:"fa-user-check",type:"select",default_value:null,values:[],enabled:!0}),e.push({identifier:"role_sign",label:this.translate.instant("lang.signUser"),icon:"fa-user-tie",type:"select",default_value:null,values:[],enabled:!0}),this.roleFields=e}),Object(Xt.a)(()=>t(this.roleFields)),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}formatData(){}}return t.\u0275fac=function(e){return new(e||t)(n.ac(v.b),n.ac(g.e),n.ac(D.a),n.ac(_t.a))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();var te=i("1jcm"),ee=i("d3UM");let ie=(()=>{class t{constructor(){this.onFileDropped=new n.o,this.disabled=!1,this.background="none",this.opacity="1"}onDragOver(t){this.disabled||(t.preventDefault(),t.stopPropagation(),this.background="#9ecbec",this.opacity="0.8")}onDragLeave(t){this.disabled||(t.preventDefault(),t.stopPropagation(),this.background="rgba(255,255,255,0)",this.opacity="1")}ondrop(t){if(!this.disabled){t.preventDefault(),t.stopPropagation(),this.background="rgba(255,255,255,0)",this.opacity="1";let e=t.dataTransfer.files;e.length>0&&this.onFileDropped.emit(e)}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["","appUploadFileDragDrop",""]],hostVars:4,hostBindings:function(t,e){1&t&&n.dc("dragover",(function(t){return e.onDragOver(t)}))("dragleave",(function(t){return e.onDragLeave(t)}))("drop",(function(t){return e.ondrop(t)})),2&t&&n.Lc("background-color",e.background)("opacity",e.opacity)},inputs:{disabled:"disabled"},outputs:{onFileDropped:"onFileDropped"}}),t})();var ne=i("STbY"),ae=i("iadO");function se(t,e){1&t&&(n.Rb(0,"div",19),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.infoImportregisteredMails"),n.Ec)}function oe(t,e){if(1&t&&(n.Wb(0,"mat-option",20),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function re(t,e){1&t&&(n.Ub(0),n.Wb(1,"div",21),n.Rb(2,"mat-spinner"),n.Vb(),n.Tb())}function ce(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",27),n.dc("click",(function(){return n.Dc(t),n.hc(),n.zc(1).click()}))("onFileDropped",(function(e){return n.Dc(t),n.hc(2).dndUploadFile(e)})),n.Wb(1,"div"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(2),n.Sc(" ",n.jc(3,1,"lang.dndFileCsvDesc")," "))}function le(t,e){1&t&&(n.Wb(0,"div",28),n.Wb(1,"div",29),n.Rb(2,"mat-paginator",30,31),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.oc("length",100)("hidePageSize",!0)("pageSize",10))}function de(t,e){if(1&t&&(n.Wb(0,"mat-option",20),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}function he(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Rb(1,"i",44),n.ic(2,"translate"),n.Qc(3,"\xa0"),n.Wb(4,"b",45),n.ic(5,"translate"),n.Qc(6),n.Vb(),n.Qc(7," \xa0"),n.Rb(8,"i",46),n.Qc(9,"\xa0 "),n.Rb(10,"i",47),n.ic(11,"translate"),n.Qc(12,"\xa0 "),n.Wb(13,"mat-form-field",48),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.ic(14,"translate"),n.Wb(15,"mat-select",49),n.dc("ngModelChange",(function(e){n.Dc(t);const i=n.hc(2).$implicit;return n.hc(3).associatedColumns[i.id]=e}))("selectionChange",(function(e){n.Dc(t);const i=n.hc(2).$implicit;return n.hc(3).changeColumn(i,e.value)})),n.Rb(16,"mat-option",50),n.Oc(17,de,2,2,"mat-option",12),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=n.hc(2).$implicit,e=n.hc(3);n.Db(1),n.oc("title",n.jc(2,7,"lang.dbColumn")),n.Db(3),n.oc("title",n.jc(5,9,"lang.dbColumn")),n.Db(2),n.Rc(t.label),n.Db(4),n.oc("title",n.jc(11,11,"lang.csvColumn")),n.Db(3),n.oc("title",n.jc(14,13,"lang.csvColumn")),n.Db(2),n.oc("ngModel",e.associatedColumns[t.id]),n.Db(2),n.oc("ngForOf",e.csvColumns)}}function ue(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",57),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc(4).$implicit;return n.hc(3).changeColumn(a,i.id)})),n.Wb(1,"span"),n.Qc(2),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(2),n.Rc(t.label)}}function pe(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"button",52),n.Wb(2,"b",53),n.Qc(3),n.Vb(),n.Rb(4,"mat-icon",54),n.Vb(),n.Wb(5,"mat-menu",null,55),n.Oc(7,ue,3,1,"button",56),n.Vb(),n.Tb()),2&t){const t=n.zc(6),e=n.hc(3).$implicit;n.Db(1),n.oc("matMenuTriggerFor",t),n.Db(2),n.Rc(e.label),n.Db(4),n.oc("ngForOf",e.values)}}function be(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field",58),n.Wb(1,"input",59),n.dc("dateChange",(function(e){n.Dc(t);const i=n.hc(3).$implicit;return n.hc(3).changeColumn(i,e.value)})),n.Vb(),n.Rb(2,"mat-datepicker",null,60),n.Vb(),n.Wb(4,"button",61),n.dc("click",(function(){return n.Dc(t),n.zc(3).open()})),n.Wb(5,"b",9),n.Qc(6),n.Vb(),n.Rb(7,"mat-icon",54),n.Vb()}if(2&t){const t=n.zc(3),e=n.hc(3).$implicit;n.Db(1),n.oc("matDatepicker",t),n.Db(5),n.Rc(e.label)}}function fe(t,e){if(1&t&&(n.Oc(0,pe,8,3,"ng-container",13),n.Oc(1,be,8,2,"ng-template",null,51,n.Pc)),2&t){const t=n.zc(2),e=n.hc(2).$implicit;n.oc("ngIf","departureDate"!==e.id)("ngIfElse",t)}}function me(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",42),n.Oc(1,he,18,15,"ng-container",13),n.Oc(2,fe,3,2,"ng-template",null,43,n.Pc),n.Vb()),2&t){const t=n.zc(3),e=n.hc().$implicit;n.Db(1),n.oc("ngIf",!e.form)("ngIfElse",t)}}function ge(t,e){if(1&t&&(n.Wb(0,"mat-cell",42),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc().$implicit,a=n.hc(3);n.Db(1),n.Sc(" ",a.getLabel(i.id,t[i.id])," ")}}function ve(t,e){if(1&t&&(n.Ub(0),n.Ub(1,39),n.Oc(2,me,4,2,"mat-header-cell",40),n.Oc(3,ge,2,1,"mat-cell",41),n.Tb(),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("matColumnDef",t.id)}}function _e(t,e){1&t&&n.Rb(0,"mat-header-row")}function ye(t,e){1&t&&n.Rb(0,"mat-row")}function xe(t,e){if(1&t&&(n.Wb(0,"div",32),n.Wb(1,"div",33),n.Wb(2,"mat-table",34,35),n.Oc(4,ve,4,1,"ng-container",36),n.Oc(5,_e,1,0,"mat-header-row",37),n.Oc(6,ye,1,0,"mat-row",38),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.Lc("width",300*t.contactColumns.length,"px"),n.oc("dataSource",t.dataSource),n.Db(2),n.oc("ngForOf",t.contactColumns),n.Db(1),n.oc("matHeaderRowDef",t.getcontactColumnsIds()),n.Db(1),n.oc("matRowDefColumns",t.getcontactColumnsIds())}}function Ce(t,e){if(1&t){const t=n.Xb();n.Wb(0,"input",22,23),n.dc("change",(function(e){return n.Dc(t),n.hc().uploadCsv(e)})),n.Vb(),n.Oc(2,ce,4,3,"div",24),n.Oc(3,le,4,3,"div",25),n.Oc(4,xe,7,6,"div",26)}if(2&t){const t=n.hc();n.Db(2),n.oc("ngIf",0===t.csvData.length),n.Db(1),n.oc("ngIf",t.csvData.length>0),n.Db(1),n.oc("ngIf",t.csvData.length>0)}}function Oe(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",62),n.dc("click",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc();n.oc("disabled",t.loading),n.Db(1),n.Rc(n.jc(2,2,"lang.validate"))}}let De=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c,l,d){this.translate=t,this.http=e,this.notify=i,this.functionsService=n,this.localStorage=a,this.headerService=s,this.dialog=o,this.dialogRef=r,this.papa=c,this.indexingFields=l,this.data=d,this.loading=!1,this.registeredMailFields=["registeredMail_issuingSite","registeredMail_warranty","registeredMail_type","departureDate","registeredMail_letter"],this.contactColumns=[{id:"company",label:this.translate.instant("lang.contactsParameters_company")},{id:"civility",label:this.translate.instant("lang.contactsParameters_civility")},{id:"firstname",label:this.translate.instant("lang.contactsParameters_firstname")},{id:"lastname",label:this.translate.instant("lang.contactsParameters_lastname")},{id:"department",label:this.translate.instant("lang.contactsParameters_department")},{id:"addressAdditional1",label:this.translate.instant("lang.contactsParameters_addressAdditional1")},{id:"addressNumber",label:this.translate.instant("lang.contactsParameters_addressNumber")},{id:"addressStreet",label:this.translate.instant("lang.contactsParameters_addressStreet")},{id:"addressAdditional2",label:this.translate.instant("lang.contactsParameters_addressAdditional2")},{id:"addressPostcode",label:this.translate.instant("lang.contactsParameters_addressPostcode")},{id:"addressTown",label:this.translate.instant("lang.contactsParameters_addressTown")},{id:"registeredMail_reference",label:this.translate.instant("lang.registeredMailReference")}],this.csvColumns=[],this.indexingModels=[],this.delimiters=[";",",","\t"],this.currentDelimiter=";",this.associatedColumns={company:"0",civility:"1",firstname:"3",lastname:"2",addressAdditional1:"5",addressStreet:"4",addressAdditional2:"6",addressPostcode:"7",addressTown:"8",registeredMail_reference:"9"},this.dataSource=new vt.p(null),this.hasHeader=!1,this.csvData=[],this.contactData=[],this.countAll=0,this.countAdd=0,this.countUp=0}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.registeredMailFields.forEach(t=>{const e=this.indexingFields.getField(t);this.contactColumns.unshift({id:e.identifier,label:e.label,values:e.values,form:!0})}),yield this.getRegisteredMailIndexingModels(),yield this.getIssuingSites(),yield this.getDefaultValues()}))}getRegisteredMailIndexingModels(){return new Promise(t=>{this.http.get("../rest/indexingModels").pipe(Object(l.a)(t=>t.indexingModels.filter(t=>"registeredMail"===t.category&&null===t.master).map(t=>({id:t.id,label:t.label}))),Object(mt.a)(e=>{e.length>0?(this.indexingModels=e,this.currentIndexingModel=this.indexingModels[0].id,t(!0)):(this.dialogRef.close(),this.notify.error(this.translate.instant("lang.noRegisteredMailModelAvailaible")))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}getIssuingSites(){return new Promise(t=>{this.http.get("../rest/registeredMail/sites").pipe(Object(mt.a)(e=>{e.sites.length>0?(this.contactColumns.filter(t=>"registeredMail_issuingSite"===t.id)[0].values=e.sites.map(t=>({id:t.id,label:t.label})),t(!0)):(this.dialogRef.close(),this.notify.error(this.translate.instant("lang.noIssuingSitesAvailaible")))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}getLabel(t,e){return"registeredMail_issuingSite"!==t||this.functionsService.empty(e)?[!0,!1].indexOf(e)>-1?this.translate.instant("lang."+e):this.functionsService.isDate(e)?this.functionsService.formatDateObjectToDateString(e):e:this.contactColumns.filter(t=>"registeredMail_issuingSite"===t.id)[0].values.filter(t=>t.id===e)[0].label}getDefaultValues(){return new Promise(t=>{this.http.get("../rest/indexingModels/"+this.currentIndexingModel).pipe(Object(mt.a)(t=>{this.registeredMailFields.forEach(e=>{"departureDate"===e?"_TODAY"===this.contactColumns.filter(t=>t.id===e)[0].default_value?this.contactColumns.filter(t=>t.id===e)[0].default_value=new Date:this.contactColumns.filter(t=>t.id===e)[0].default_value=this.functionsService.empty(this.contactColumns.filter(t=>t.id===e)[0].default_value)?new Date:this.functionsService.formatFrenchDateToObjectDate(t.indexingModel.fields.filter(t=>t.identifier===e)[0].default_value):this.contactColumns.filter(t=>t.id===e)[0].default_value=t.indexingModel.fields.filter(t=>t.identifier===e)[0].default_value}),this.currentDoctype=t.indexingModel.fields.filter(t=>"doctype"===t.identifier)[0].default_value}),Object(Xt.a)(()=>t(!0)),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}getcontactColumnsIds(){return this.contactColumns.map(t=>t.id)}changeColumn(t,e){this.contactData=[];for(let i=this.hasHeader?1:0;i<this.csvData.length;i++){const n=this.csvData[i],a={};this.contactColumns.forEach(i=>{t.form?t.id===i.id?(n[t.id]=e,a[i.id]=e):a[i.id]=n[this.associatedColumns[i.id]]:a[i.id]=t.id===i.id?n[this.csvColumns.filter(t=>t===e)[0]]:n[this.associatedColumns[i.id]]}),this.contactData.push(a)}setTimeout(()=>{this.dataSource=new vt.p(this.contactData),this.dataSource.paginator=this.paginator},0)}uploadCsv(t){if(t.target.files&&t.target.files[0]&&("text/csv"===t.target.files[0].type||"application/vnd.ms-excel"===t.target.files[0].type)){this.loading=!0;let e=[];const i=new FileReader;i.readAsText(t.target.files[0]),i.onload=t=>{this.papa.parse(t.target.result,{complete:t=>{e=t.data,e=e.filter(t=>t.length===e[0].length);let i=[],n={};this.setCsvColumns(e[0]),this.countAll=this.hasHeader?e.length-1:e.length;for(let a=0;a<e.length;a++)n={},i=e[a],i.forEach((t,e)=>{n[this.csvColumns[e]]=t}),this.csvData.push(n);this.initData(),this.localStorage.save("importContactFields_"+this.headerService.user.id,this.currentDelimiter),this.loading=!1}})}}else this.dialog.open(qt.a,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.notAllowedExtension")+" !",msg:this.translate.instant("lang.file")+" : <b>"+t.target.files[0].name+"</b>, "+this.translate.instant("lang.type")+" : <b>"+t.target.files[0].type+"</b><br/><br/><u>"+this.translate.instant("lang.allowedExtensions")+"</u> : <br/>text/csv"}})}setCsvColumns(t=null){this.csvColumns=t.filter(t=>this.functionsService.empty(t)).length>0?Object.keys(t).map((t,e)=>""+e):t}toggleHeader(){this.hasHeader=!this.hasHeader,this.countAll=this.hasHeader?this.csvData.length-1:this.csvData.length,this.hasHeader?(this.countAdd=this.csvData.filter((t,e)=>e>0&&this.functionsService.empty(t[this.associatedColumns.id])).length,this.countUp=this.csvData.filter((t,e)=>e>0&&!this.functionsService.empty(t[this.associatedColumns.id])).length):(this.countAdd=this.csvData.filter((t,e)=>this.functionsService.empty(t[this.associatedColumns.id])).length,this.countUp=this.csvData.filter((t,e)=>!this.functionsService.empty(t[this.associatedColumns.id])).length),this.initData()}initData(){this.contactData=[];for(let t=this.hasHeader?1:0;t<this.csvData.length;t++){const e=this.csvData[t],i={};this.contactColumns.forEach((n,a)=>{const s=this.csvColumns.indexOf(n.label);n.form?(this.associatedColumns[n.id]=n.id,this.csvData[t][n.id]=n.default_value,i[n.id]=n.default_value):s>-1?(this.associatedColumns[n.id]=this.csvColumns[s],i[n.id]=e[this.csvColumns[s]]):this.functionsService.empty(this.associatedColumns[n.id])?(this.associatedColumns[n.id]=e[a],i[n.id]=e[a]):i[n.id]=e[this.associatedColumns[n.id]]}),this.contactData.push(i)}setTimeout(()=>{this.dataSource=new vt.p(this.contactData),this.dataSource.paginator=this.paginator},0)}dndUploadFile(t){this.uploadCsv({target:{files:[t[0]]}})}onSubmit(){let t=null;const e=[];let i="";this.translate.get("lang.confirmImportRegisteredMails",{0:this.countAll}).subscribe(t=>{i=t+" ?<br/><br/>"}),t=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.import"),msg:i}}),t.afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.loading=!0,this.csvData.forEach((t,i)=>{if(this.hasHeader&&i>0||!this.hasHeader){const i={};this.contactColumns.forEach(e=>{i[e.id]=void 0===t[this.associatedColumns[e.id]]?"":t[this.associatedColumns[e.id]]instanceof Date&&!isNaN(t[this.associatedColumns[e.id]].valueOf())?this.functionsService.formatDateObjectToDateString(t[this.associatedColumns[e.id]],!1,"yyyy-mm-dd"):t[this.associatedColumns[e.id]]}),i.doctype=this.currentDoctype,i.modelId=this.currentIndexingModel,e.push(i)}})}),p(()=>this.http.put("../rest/registeredMails/import",{registeredMails:e})),Object(mt.a)(e=>{let i="";e.errors.count>0&&(i+=`<br/>${e.errors.count} ${this.translate.instant("lang.withErrors")} : <ul>`,e.errors.details.forEach(t=>{i+=`<li> ${this.translate.instant("lang."+t.lang,{0:t.langParam})} (${this.translate.instant("lang.line")} : ${this.hasHeader?t.index+2:t.index+1})</li>`}),i+="</ul>"),t=this.dialog.open(qt.a,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.import"),msg:"<b>"+e.success+"</b> / <b>"+this.countAll+"</b> "+this.translate.instant("lang.importedRegisteredMails")+"."+i}})}),p(()=>t.afterClosed()),Object(mt.a)(()=>{this.dialogRef.close("success")}),Object(m.a)(t=>(this.loading=!1,this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(_t.a),n.Qb(Ut.a),n.Qb(y.a),n.Qb(q.b),n.Qb(q.h),n.Qb(Jt),n.Qb(Zt),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Xc(Kt.a,!0),2&t&&n.yc(i=n.ec())&&(e.paginator=i.first)},decls:33,vars:26,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","alert-message alert-message-info","style","min-width: 100%",3,"innerHTML",4,"ngIf"],[1,"import-tool"],[2,"flex","1"],["color","primary",3,"checked","change"],[2,"flex","1","text-align","right"],["color","primary",1,"fas","fa-dolly-flatbed"],["color","primary"],["appearance","outline",2,"width","250px !important","height","55px"],[3,"ngModel","ngModelChange","click"],[3,"value",4,"ngFor","ngForOf"],[4,"ngIf","ngIfElse"],["elseTemplate",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click",4,"ngIf"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"alert-message","alert-message-info",2,"min-width","100%",3,"innerHTML"],[3,"value"],[1,"loader"],["type","file","name","files[]","id","uploadFile","accept",".csv",2,"display","none",3,"change"],["uploadFile",""],["appUploadFileDragDrop","","class","dndFile",3,"click","onFileDropped",4,"ngIf"],["class","row","style","margin: 0px;",4,"ngIf"],["class","tableContent",4,"ngIf"],["appUploadFileDragDrop","",1,"dndFile",3,"click","onFileDropped"],[1,"row",2,"margin","0px"],[1,"col-md-12"],[3,"length","hidePageSize","pageSize"],["paginator",""],[1,"tableContent"],[2,"overflow","auto"],[3,"dataSource"],["table",""],[4,"ngFor","ngForOf"],[4,"matHeaderRowDef"],[4,"matRowDef","matRowDefColumns"],[3,"matColumnDef"],["style","padding-left: 5px;padding-right: 5px;",4,"matHeaderCellDef"],["style","padding-left: 5px;padding-right: 5px;",4,"matCellDef"],[2,"padding-left","5px","padding-right","5px"],["formTemplate",""],["color","primary",1,"fas","fa-database",3,"title"],["color","primary",1,"colLabel",3,"title"],[1,"fas","fa-arrows-alt-h"],[1,"fas","fa-file-csv",3,"title"],[2,"width","80px !important",3,"title","click"],[3,"ngModel","ngModelChange","selectionChange"],["value",""],["elseDateType",""],["mat-button","",2,"padding","0px",3,"matMenuTriggerFor"],["color","primary",1,"colLabel"],["matSuffix","",1,"fa","fa-caret-down"],["menu","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["mat-menu-item","",3,"click"],[2,"display","none"],["matInput","",3,"matDatepicker","dateChange"],["picker",""],["mat-button","",2,"padding","0px",3,"click"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"]],template:function(t,e){if(1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"div",2),n.Oc(5,se,2,3,"div",3),n.Wb(6,"mat-toolbar",4),n.Wb(7,"span",5),n.Wb(8,"mat-slide-toggle",6),n.dc("change",(function(){return e.toggleHeader()})),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Wb(11,"span",7),n.Rb(12,"i",8),n.Qc(13),n.ic(14,"translate"),n.Wb(15,"b",9),n.Qc(16),n.Vb(),n.Vb(),n.Wb(17,"span",7),n.Wb(18,"mat-form-field",10),n.Wb(19,"mat-label"),n.Qc(20),n.ic(21,"translate"),n.Vb(),n.Wb(22,"mat-select",11),n.dc("ngModelChange",(function(t){return e.currentIndexingModel=t}))("click",(function(t){return t.stopPropagation()})),n.Oc(23,oe,2,2,"mat-option",12),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Oc(24,re,3,0,"ng-container",13),n.Oc(25,Ce,5,3,"ng-template",null,14,n.Pc),n.Vb(),n.Rb(27,"span",15),n.Wb(28,"div",16),n.Oc(29,Oe,3,4,"button",17),n.Wb(30,"button",18),n.Qc(31),n.ic(32,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.zc(26);n.Db(2),n.Rc(n.jc(3,16,"lang.importRegisteredMails")),n.Db(3),n.oc("ngIf",e.csvData.length>0),n.Db(1),n.Ib("hide",0===e.csvData.length||e.loading),n.Db(2),n.oc("checked",e.hasHeader),n.Db(1),n.Sc(" ",n.jc(10,18,"lang.csvHeader")," "),n.Db(4),n.Sc("\xa0",n.jc(14,20,"lang.registeredMails")," : "),n.Db(3),n.Rc(e.countAll),n.Db(4),n.Rc(n.jc(21,22,"lang.indexingModel")),n.Db(2),n.oc("ngModel",e.currentIndexingModel),n.Db(1),n.oc("ngForOf",e.indexingModels),n.Db(1),n.oc("ngIf",e.loading)("ngIfElse",t),n.Db(5),n.oc("ngIf",e.csvData.length>0),n.Db(1),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(32,24,"lang.cancel"))}},directives:[q.i,q.f,P.t,M.a,te.a,Y.c,Y.g,ee.a,X.u,X.x,P.s,q.c,k.b,q.d,W.p,V.c,ie,Kt.a,vt.o,vt.k,vt.n,vt.c,vt.i,vt.b,vt.h,ne.d,S.a,Y.j,ne.e,ne.b,J.b,ae.h,ae.f,vt.a,vt.j,vt.m],pipes:[g.d],styles:[".loader[_ngcontent-%COMP%]{display:flex;height:100%;align-items:center;justify-content:center}.hide[_ngcontent-%COMP%]{display:none}.import-tool[_ngcontent-%COMP%]{font-size:14px}.dndFile[_ngcontent-%COMP%]{height:100%;display:flex;align-items:center;margin:0;justify-content:center;font-size:30px;opacity:.5!important;cursor:pointer}.colLabel[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;text-overflow:ellipsis}.tableContent[_ngcontent-%COMP%]{width:100%;box-shadow:inset 0 0 5px 0 rgba(0,0,0,.75);padding:10px}"]}),t})();const we=["searchInput"];function Me(t,e){if(1&t){const t=n.Xb();n.Wb(0,"form",21,22),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().goTo()})),n.Wb(2,"mat-form-field",23),n.Wb(3,"input",24),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().searchTarget=e})),n.ic(4,"translate"),n.Vb(),n.Wb(5,"button",25),n.ic(6,"translate"),n.Rb(7,"mat-icon",26),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(3),n.oc("placeholder",n.jc(4,3,"lang.searchMails"))("ngModel",t.searchTarget),n.Db(2),n.oc("title",n.jc(6,5,"lang.quickSearchTarget"))}}function ke(t,e){if(1&t&&(n.Wb(0,"button",27),n.ic(1,"translate"),n.Rb(2,"mat-icon",28),n.Vb()),2&t){n.hc();const t=n.zc(4);n.pc("matTooltip",n.jc(1,2,"lang.menu")),n.oc("matMenuTriggerFor",t)}}function Se(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"button",29),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().gotToMenu(i)})),n.ic(2,"translate"),n.Rb(3,"i"),n.Rb(4,"br"),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Tb()}if(2&t){const t=e.$implicit;n.Db(1),n.pc("matTooltip",n.jc(2,5,t.comment)),n.Db(2),n.Gb("",t.style," fa-2x"),n.Db(2),n.Sc("",n.jc(6,7,t.label)," ")}}function Ie(t,e){1&t&&(n.Wb(0,"div",30),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noAvailableMenu")," "))}function Pe(t,e){if(1&t&&(n.Wb(0,"button",31),n.Rb(1,"mat-icon",32),n.Wb(2,"span"),n.Qc(3),n.ic(4,"titlecase"),n.Vb(),n.Qc(5,"\xa0"),n.Wb(6,"b"),n.Qc(7),n.ic(8,"uppercase"),n.Vb(),n.Vb()),2&t){const t=n.hc(),e=n.zc(11);n.oc("matMenuTriggerFor",e),n.Db(3),n.Rc(n.jc(4,3,t.headerService.user.firstname)),n.Db(4),n.Rc(n.jc(8,5,t.headerService.user.lastname))}}function Ve(t,e){if(1&t&&(n.Wb(0,"button",33),n.Rb(1,"mat-icon",34),n.Vb()),2&t){n.hc();const t=n.zc(11);n.oc("matMenuTriggerFor",t)}}function Re(t,e){if(1&t&&(n.Wb(0,"mat-list-item"),n.Wb(1,"p",35),n.Qc(2),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Sc(" ",t.group_desc," ")}}function je(t,e){if(1&t&&(n.Wb(0,"mat-list-item"),n.Wb(1,"p",35),n.Qc(2),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Sc(" ",t.entity_label," ")}}function Ae(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",36),n.Wb(1,"a",37),n.dc("click",(function(){return n.Dc(t),n.hc().authService.logout()})),n.Wb(2,"span",19),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb(),n.Vb()}2&t&&(n.Db(3),n.Rc(n.jc(4,1,"lang.logout")))}let We=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this.translate=t,this.http=e,this.router=i,this.dialog=n,this.authService=a,this.appService=s,this.headerService=o,this.functions=r,this.privilegeService=c,this.config={},this.menus=[],this.searchTarget="",this.hideSearch=!0}ngOnInit(){this.menus=this.privilegeService.getCurrentUserMenus()}gotToMenu(t){if("indexing"===t.id&&t.groups.length>1)this.config={panelClass:"maarch-modal",data:{indexingGroups:t.groups,link:t.route}},this.dialogRef=this.dialog.open(Bt,this.config);else if(!0===t.angular){const e=t.route.split("__");2===e.length?"RegisteredMailImportComponent"===e[0]&&this.dialog.open(De,{disableClose:!0,width:"99vw",maxWidth:"99vw",panelClass:"maarch-full-height-modal"}):this.router.navigate([t.route])}else location.href=t.route}showSearchInput(){this.hideSearch=!this.hideSearch,setTimeout(()=>{this.searchInput.focus()},200)}hideSearchBar(){return"/search"!==this.router.url.split("?")[0]}showLogout(){return!(["sso"].indexOf(this.authService.authMode)>-1&&this.functions.empty(this.authService.authUri))}goTo(){this.router.navigate(["/search"],{queryParams:{value:this.searchTarget}})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.c),n.Qb(q.b),n.Qb(_.a),n.Qb(w.a),n.Qb(y.a),n.Qb(_t.a),n.Qb(Dt.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["header-right"]],viewQuery:function(t,e){var i;1&t&&n.Xc(we,!0),2&t&&n.yc(i=n.ec())&&(e.searchInput=i.first)},decls:37,vars:32,consts:[[1,"bg-head-title-tool"],[3,"ngSubmit",4,"ngIf"],["mat-icon-button","",3,"matMenuTriggerFor","matTooltip",4,"ngIf"],[1,"headerMaarchShortcut"],["applications","matMenu"],[4,"ngFor","ngForOf"],["class","noAvailableMenu",4,"ngIf"],["mat-button","",3,"matMenuTriggerFor",4,"ngIf"],["mat-icon-button","",3,"matMenuTriggerFor",4,"ngIf"],[1,"headerMaarch"],["menu","matMenu"],["width","250","height","70",1,"header-bg",2,"margin-top","-8px","background-size","cover","border-bottom","solid 1px white"],["routerLink","/profile",2,"cursor","pointer","z-index","1","color","white","position","absolute","left","85px","top","17px","width","70px","height","70px","background-size","cover","background-position","top center","border-radius","50%","border","solid white","background-color","white",3,"title"],[1,"content",2,"padding-top","20px","color","white","max-height","250px","overflow-y","auto","overflow-x","hidden"],["routerLink","/profile",1,"text-center",2,"cursor","pointer"],["mat-subheader","",2,"color","white"],[2,"display","flex","padding","5px"],[2,"text-align","left","flex","1"],["routerLink","/profile",2,"color","white","padding-left","10px"],["color","primary",1,"badge",2,"background","white"],["style","text-align:right;flex:2;",4,"ngIf"],[3,"ngSubmit"],["criteriaFormUp","ngForm"],["floatLabel","never",1,"basket-search"],["type","text","matInput","","name","searchTarget",1,"metaSearch",3,"placeholder","ngModel","ngModelChange"],["mat-icon-button","","type","submit","matPrefix","",3,"title"],[1,"fas","fa-search"],["mat-icon-button","",3,"matMenuTriggerFor","matTooltip"],[1,"fa","fa-th",2,"font-size","22px"],["mat-button","","color","primary",1,"col-md-4","col-xs-6",2,"white-space","inherit","height","100px","line-height","20px",3,"matTooltip","click"],[1,"noAvailableMenu"],["mat-button","",3,"matMenuTriggerFor"],["mat-list-icon","",1,"fa","fa-user","fa-2x",2,"color","white","margin","0px 12px 8px 0px"],["mat-icon-button","",3,"matMenuTriggerFor"],["mat-list-icon","",1,"fa","fa-user","fa-2x",2,"color","white","height","auto"],["mat-line","",2,"color","white","opacity","0.5"],[2,"text-align","right","flex","2"],[2,"cursor","pointer","color","white","padding-right","10px",3,"click"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Oc(1,Me,8,7,"form",1),n.Oc(2,ke,3,4,"button",2),n.Wb(3,"mat-menu",3,4),n.Oc(5,Se,7,9,"ng-container",5),n.ic(6,"sortBy"),n.Oc(7,Ie,3,3,"div",6),n.Vb(),n.Oc(8,Pe,9,7,"button",7),n.Oc(9,Ve,2,1,"button",8),n.Wb(10,"mat-menu",9,10),n.Rb(12,"canvas",11),n.Rb(13,"i",12),n.ic(14,"translate"),n.Wb(15,"div",13),n.Wb(16,"p",14),n.Qc(17),n.ic(18,"uppercase"),n.Vb(),n.Wb(19,"mat-list"),n.Wb(20,"h3",15),n.Qc(21),n.ic(22,"translate"),n.Vb(),n.Rb(23,"mat-divider"),n.Oc(24,Re,3,1,"mat-list-item",5),n.Wb(25,"h3",15),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Rb(28,"mat-divider"),n.Oc(29,je,3,1,"mat-list-item",5),n.Vb(),n.Vb(),n.Wb(30,"div",16),n.Wb(31,"div",17),n.Wb(32,"a",18),n.Wb(33,"span",19),n.Qc(34),n.ic(35,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Oc(36,Ae,5,3,"div",20),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(1),n.oc("ngIf",e.hideSearchBar()),n.Db(1),n.oc("ngIf",!e.appService.getViewMode()),n.Db(3),n.oc("ngForOf",n.kc(6,19,e.menus,"label")),n.Db(2),n.oc("ngIf",e.functions.empty(e.menus)),n.Db(1),n.oc("ngIf",!e.appService.getViewMode()),n.Db(1),n.oc("ngIf",e.appService.getViewMode()),n.Db(3),n.Lc("background-image","url(../rest/images?image=loginPage)"),n.Db(1),n.Lc("background-image","url(../rest/images?image=onlyLogo)"),n.pc("title",n.jc(14,22,"lang.myProfileAccess")),n.Db(4),n.Tc("",e.headerService.user.firstname," ",n.jc(18,24,e.headerService.user.lastname),""),n.Db(4),n.Rc(n.jc(22,26,"lang.groups")),n.Db(3),n.oc("ngForOf",e.headerService.user.groups),n.Db(2),n.Rc(n.jc(27,28,"lang.entities")),n.Db(3),n.oc("ngForOf",e.headerService.user.entities),n.Db(5),n.Rc(n.jc(35,30,"lang.myProfile")),n.Db(2),n.oc("ngIf",e.showLogout()))},directives:[P.t,ne.e,P.s,o.d,R.a,R.g,T.a,o.f,X.K,X.v,X.w,Y.c,J.b,X.d,X.u,X.x,k.b,Y.i,S.a,ne.d,A.b,R.c,R.d,W.l],pipes:[Wt.a,g.d,P.G,P.F],styles:[".bg-head-title-tool[_ngcontent-%COMP%]{display:flex}.bg-head-title-tool[_ngcontent-%COMP%] .mat-form-field-label-wrapper{font-style:italic}.bg-head-title-tool[_ngcontent-%COMP%] .mat-form-field-label{font-size:12px;opacity:.5}.noAvailableMenu[_ngcontent-%COMP%]{text-align:center;font-size:14px;opacity:.5;font-style:italic;padding:22px}.basket-search[_ngcontent-%COMP%]{color:#666;width:500px;padding-right:10px;font-size:12px;height:35px}.basket-search[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:20px}.basket-search[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.basket-search[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center;background:#fff;height:35px;border-radius:30px}.basket-search[_ngcontent-%COMP%] .mat-form-field-label-wrapper{font-style:italic}.basket-search[_ngcontent-%COMP%] .mat-form-field-underline{display:none}"]}),t})();var Te=i("wZkO"),Ee=i("lJEt"),Fe=i("Dh3D"),Le=i("cp0P"),Qe=i("JX91"),Ne=i("/1cH"),ze=i("A5z7");const Be=["autoCompleteInput"];function Ue(t,e){if(1&t&&n.Rb(0,"input",11),2&t){const t=n.hc();n.oc("formControl",t.controlAutocomplete)}}function $e(t,e){if(1&t&&(n.Wb(0,"mat-label"),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.placeholder)}}function He(t,e){1&t&&n.Rb(0,"mat-icon",12)}function Ge(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",13),n.dc("click",(function(){return n.Dc(t),n.hc().unsetValue()})),n.Rb(1,"mat-icon",14),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.oc("title",n.jc(2,1,"lang.delete")))}function Xe(t,e){if(1&t&&n.Rb(0,"mat-icon",18),2&t){const t=n.hc().$implicit,e=n.hc(2);n.Gb("autcompleteIcon fas ",e.type[t.type],"")}}function qe(t,e){if(1&t&&(n.Wb(0,"mat-option",16),n.Oc(1,Xe,1,3,"mat-icon",17),n.Qc(2,"\xa0"),n.Wb(3,"span",18),n.Qc(4),n.Vb(),n.Qc(5,"\xa0"),n.Wb(6,"small"),n.Qc(7),n.Vb(),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.oc("value",t)("disabled",i.disableItems.indexOf(t.serialId)>-1),n.Db(1),n.oc("ngIf",i.type[t.type]),n.Db(3),n.Rc(t[i.key]),n.Db(3),n.Rc(t[i.subInfoKey])}}function Ke(t,e){if(1&t&&(n.Ub(0),n.Oc(1,qe,8,5,"mat-option",15),n.ic(2,"sortBy"),n.ic(3,"async"),n.Tb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",n.kc(2,1,n.jc(3,4,t.filteredOptions),t.key))}}function Ye(t,e){if(1&t&&n.Rb(0,"mat-option",19),2&t){const t=n.hc();n.oc("innerHTML",t.listInfo,n.Ec)}}function Je(t,e){1&t&&(n.Wb(0,"mat-option",20),n.Rb(1,"mat-spinner",21),n.Vb())}function Ze(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",25),n.dc("removed",(function(){n.Dc(t);const i=e.index;return n.hc(2).removeItem(i)})),n.Rb(1,"span",26),n.Rb(2,"mat-icon",27),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.oc("removable",!0),n.Db(1),n.oc("innerHTML",i.valuesToDisplay[t],n.Ec)}}function ti(t,e){1&t&&(n.Wb(0,"div",28),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noSelectedValue")," "))}function ei(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-chip-list",22),n.Oc(2,Ze,3,2,"mat-chip",23),n.Vb(),n.Oc(3,ti,3,3,"div",24),n.Tb()),2&t){const t=n.hc();n.Db(2),n.oc("ngForOf",t.controlAutocomplete.value),n.Db(1),n.oc("ngIf",0===t.controlAutocomplete.value.length)}}let ii=(()=>{class t{constructor(t,e,i,a,s){this.translate=t,this.http=e,this.notify=i,this.dialog=a,this.latinisePipe=s,this.myControl=new X.i,this.loading=!1,this.type={user:"fa-user",entity:"fa-sitemap"},this.disableItems=[],this.styles=[],this.selectedOpt=new n.o,this.valuesToDisplay={}}ngOnInit(){this.appearance=void 0===this.appearance?"legacy":"outline",this.singleMode=void 0!==this.singleMode,this.optGroupLabel=void 0===this.optGroupLabel?this.translate.instant("lang.availableValues"):this.optGroupLabel,this.placeholder=void 0===this.placeholder?this.translate.instant("lang.chooseValue"):this.placeholder,void 0!==this.controlAutocomplete&&(this.controlAutocomplete.setValue(null===this.controlAutocomplete.value||""===this.controlAutocomplete.value?[]:this.controlAutocomplete.value),this.initFormValue()),this.size=void 0===this.size?"default":this.size,void 0!==this.routeDatas?this.initAutocompleteRoute():this.initAutocompleteData()}initAutocompleteData(){this.listInfo=this.translate.instant("lang.noAvailableValue"),this.filteredOptions=this.myControl.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>this._filter(t)))}initAutocompleteRoute(){this.listInfo=this.translate.instant("lang.autocompleteInfo"),this.options=[],this.myControl.valueChanges.pipe(Object(pt.a)(300),Object(d.a)(t=>t.length>2),Object(mt.a)(()=>this.loading=!0),Object(ft.a)(t=>this.getDatas(t)),Object(mt.a)(t=>{this.listInfo=0===t.length?void 0!==this.manageDatas?this.translate.instant("lang.noAvailableValue")+" <div>"+this.translate.instant("lang.typeEnterToCreate")+"</div>":this.translate.instant("lang.noAvailableValue"):"",this.options=t,this.filteredOptions=Object(c.a)(this.options),this.loading=!1})).subscribe()}getDatas(t){const e=[],i=[];return this.routeDatas.forEach(i=>{e.push(this.http.get(".."+i,{params:{search:t}}))}),Object(Le.a)(e).pipe(Object(l.a)(t=>(t.forEach(t=>{t.forEach(t=>{i.push(t)})}),i)))}selectOpt(t){this.singleMode||void 0!==this.controlAutocomplete&&this.setFormValue(t.option.value),void 0!==this.selectedOpt&&(this.resetAutocomplete(),this.autoCompleteInput.nativeElement.blur(),this.selectedOpt.emit(t.option.value))}initFormValue(){this.controlAutocomplete.value.forEach(t=>{this.http.get(".."+this.manageDatas+"/"+t).pipe(Object(mt.a)(t=>{for(var e in t)this.valuesToDisplay[t[e].id]=t[e].label})).subscribe()})}setFormValue(t){if(-1===this.controlAutocomplete.value.indexOf(t.id)){let e=[];null!==this.controlAutocomplete.value&&(e=this.controlAutocomplete.value),e.push(t.id),this.valuesToDisplay[t.id]=t[this.key],this.controlAutocomplete.setValue(e)}}resetAutocomplete(){!1===this.singleMode&&this.myControl.setValue(""),void 0!==this.routeDatas&&(this.options=[],this.listInfo=this.translate.instant("lang.autocompleteInfo"))}_filter(t){if("string"==typeof t){const e=this.latinisePipe.transform(t.toLowerCase());return this.options.filter(t=>this.latinisePipe.transform(t[this.key].toLowerCase()).includes(e))}return this.options}unsetValue(){this.controlAutocomplete.setValue(""),this.myControl.setValue(""),this.myControl.enable()}removeItem(t){const e=this.controlAutocomplete.value;e.splice(t,1),this.controlAutocomplete.setValue(e)}addItem(){if(void 0!==this.manageDatas){const t={};t[this.key]=this.myControl.value,this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.confirm"),msg:"Voulez-vous cr\xe9er cet \xe9l\xe9ment <b>"+t[this.key]+"</b> ?"}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.post(".."+this.manageDatas,{label:t[this.key]})),Object(mt.a)(e=>{for(var i in e)t.id=e[i];this.setFormValue(t),this.notify.success(this.translate.instant("lang.elementAdded"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}}getValue(){return this.myControl.value}resetValue(){return this.myControl.setValue("")}displayFn(t){return t?t[this.key]:t}displayFnWrapper(){return t=>this.displayFn(t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(Tt.c))},t.\u0275cmp=n.Kb({type:t,selectors:[["plugin-autocomplete"]],viewQuery:function(t,e){var i;1&t&&n.Kc(Be,!0),2&t&&n.yc(i=n.ec())&&(e.autoCompleteInput=i.first)},inputs:{size:"size",singleMode:"singleMode",appearance:"appearance",required:"required",options:["datas","options"],routeDatas:"routeDatas",placeholder:["labelPlaceholder","placeholder"],optGroupLabel:["labelList","optGroupLabel"],key:["targetSearchKey","key"],subInfoKey:"subInfoKey",controlAutocomplete:["control","controlAutocomplete"],manageDatas:"manageDatas",disableItems:"disableItems",styles:"styles"},outputs:{selectedOpt:"triggerEvent"},decls:14,vars:18,consts:[["type","hidden",3,"formControl",4,"ngIf"],["floatLabel","never",1,"maarch-autocomplete",3,"appearance","click"],[4,"ngIf"],["color","primary","class","fa fa-search","matPrefix","",4,"ngIf"],["type","text","id","autoCompleteInput","aria-label","Number","matInput","",3,"placeholder","formControl","matAutocomplete","required","click","focus","keyup.enter"],["autoCompleteInput",""],["type","button","matSuffix","","mat-icon-button","","color","warn",3,"click",4,"ngIf"],[3,"displayWith","optionSelected"],["auto","matAutocomplete"],["class","autoCompleteInfoResult smallInputInfo","disabled","",3,"innerHTML",4,"ngIf"],["disabled","",4,"ngIf"],["type","hidden",3,"formControl"],["color","primary","matPrefix","",1,"fa","fa-search"],["type","button","matSuffix","","mat-icon-button","","color","warn",3,"click"],["color","warn",1,"fa","fa-times",3,"title"],[3,"value","disabled",4,"ngFor","ngForOf"],[3,"value","disabled"],["color","primary",3,"class",4,"ngIf"],["color","primary"],["disabled","",1,"autoCompleteInfoResult","smallInputInfo",3,"innerHTML"],["disabled",""],["diameter","20"],["color","default",1,"mat-chip-list-stacked"],["class","activeListAutocomplete","color","default",3,"removable","removed",4,"ngFor","ngForOf"],["class","noResult",4,"ngIf"],["color","default",1,"activeListAutocomplete",3,"removable","removed"],[2,"display","flex","flex","1",3,"innerHTML"],["matChipRemove","",1,"fa","fa-times"],[1,"noResult"]],template:function(t,e){if(1&t&&(n.Wb(0,"form"),n.Oc(1,Ue,1,1,"input",0),n.Wb(2,"mat-form-field",1),n.dc("click",(function(t){return t.stopPropagation()})),n.Oc(3,$e,2,1,"mat-label",2),n.Oc(4,He,1,0,"mat-icon",3),n.Wb(5,"input",4,5),n.dc("click",(function(t){return t.stopPropagation()}))("focus",(function(){return e.resetAutocomplete()}))("keyup.enter",(function(){return e.addItem()})),n.Vb(),n.Oc(7,Ge,3,3,"button",6),n.Wb(8,"mat-autocomplete",7,8),n.dc("optionSelected",(function(t){return e.selectOpt(t)})),n.Oc(10,Ke,4,6,"ng-container",2),n.Oc(11,Ye,1,1,"mat-option",9),n.Oc(12,Je,2,0,"mat-option",10),n.Vb(),n.Vb(),n.Oc(13,ei,4,2,"ng-container",2),n.Vb()),2&t){const t=n.zc(9);n.Db(1),n.oc("ngIf",void 0!==e.controlAutocomplete),n.Db(1),n.Ib("no-margin",e.styles.indexOf("no-margin")>-1)("smallInput","small"===e.size),n.oc("appearance",e.appearance),n.Db(1),n.oc("ngIf",e.singleMode),n.Db(1),n.oc("ngIf","small"!==e.size&&e.myControl.enabled&&!e.singleMode),n.Db(1),n.oc("placeholder",e.singleMode?"":e.placeholder)("formControl",e.myControl)("matAutocomplete",t)("required",e.required),n.Db(2),n.oc("ngIf",e.myControl.disabled),n.Db(1),n.oc("displayWith",e.displayFnWrapper()),n.Db(2),n.oc("ngIf",e.options.length>0&&!e.loading),n.Db(1),n.oc("ngIf",0===e.options.length&&!e.loading),n.Db(1),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",void 0!==e.controlAutocomplete)}},directives:[X.K,X.v,X.w,P.t,Y.c,J.b,X.d,Ne.d,X.u,X.j,X.F,Ne.a,Y.g,S.a,Y.i,k.b,Y.j,P.s,W.p,V.c,ze.d,ze.a,ze.e],pipes:[g.d,Wt.a,P.b],styles:[".mat-form-field-appearance-outline[_ngcontent-%COMP%]{font-size:11px} .mat-form-field-appearance-outline .mat-form-field-outline-thick{color:#135f7f} .mat-form-field-prefix{top:0!important}.no-margin[_ngcontent-%COMP%] .mat-form-field-wrapper{margin:0;padding:0}.mat-option[_ngcontent-%COMP%] .mat-option-text{align-items:center;display:flex}.mat-option[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:110%;font-weight:700}.mat-option-disabled[_ngcontent-%COMP%]{opacity:.3!important}.autcompleteIcon[_ngcontent-%COMP%]{width:20px;display:flex;align-items:center}.smallInput[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.smallInputInfo[_ngcontent-%COMP%]{font-size:9px;white-space:normal;line-height:13px;display:table-cell;vertical-align:middle}.input-form[_ngcontent-%COMP%] .mat-form-field-prefix{left:15px}.activeListAutocomplete[_ngcontent-%COMP%]{font-size:13px;height:auto}.noResult[_ngcontent-%COMP%]{text-align:center;font-style:italic;opacity:.5}.autoCompleteInfoResult[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();var ni=i("bv9b"),ai=i("HDdC");let si=(()=>{class t{constructor(t,e){this.http=t,this.authService=e}transform(t){const e=new v.f({Authorization:"Bearer "+this.authService.getToken()});return new ai.a(i=>(i.next("data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),void 0!==t&&this.http.get(t,{headers:e,responseType:"blob"}).subscribe(t=>{const e=new FileReader;e.readAsDataURL(t),e.onloadend=()=>{i.next(e.result)}}),{unsubscribe(){}}))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(v.b),n.Qb(_.a))},t.\u0275pipe=n.Pb({name:"secureUrl",type:t,pure:!0}),t})();const oi=["snav2"],ri=["adminMenuTemplate"],ci=["paginatorGroupsList"],li=["tableGroupsListSort"],di=["paginatorGroupsListAutocomplete"],hi=["paginatorContactsList"],ui=["tableContactsListSort"],pi=["paginatorHistory"],bi=["tableHistorySort"];function fi(t,e){if(1&t){const t=n.Xb();n.Wb(0,"a",15),n.dc("click",(function(){return n.Dc(t),n.hc(2).changePasswd()})),n.Rb(1,"mat-icon",19),n.Wb(2,"p",17),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(3),n.Sc(" ",n.jc(4,1,"lang.changeMyPassword")," "))}function mi(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",13),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",15),n.dc("click",(function(){return n.Dc(t),n.hc().askRedirectBasket()})),n.Rb(5,"mat-icon",16),n.Wb(6,"p",17),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Oc(9,fi,5,3,"a",18),n.Vb()}if(2&t){const t=n.hc();n.Db(2),n.Rc(n.jc(3,3,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,5,"lang.activateMyAbs")," "),n.Db(2),n.oc("ngIf",t.user.canModifyPassword)}}function gi(t,e){1&t&&(n.Wb(0,"div",20),n.Rb(1,"mat-spinner",21),n.Vb())}function vi(t,e){1&t&&(n.Wb(0,"mat-error"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.requiredField"),""))}function _i(t,e){1&t&&(n.Wb(0,"mat-hint"),n.Rb(1,"i",131),n.Wb(2,"span",132),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Rc(n.jc(4,1,"lang.passwordValid")))}function yi(t,e){1&t&&(n.Wb(0,"mat-hint"),n.Rb(1,"i",131),n.Wb(2,"span",132),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Rc(n.jc(4,1,"lang.passwordMatch")))}function xi(t,e){if(1&t&&(n.Wb(0,"div",66),n.Wb(1,"div",133),n.Rb(2,"div",134),n.Vb(),n.Vb()),2&t){const t=n.hc(3);n.Db(2),n.oc("innerHTML",t.otherRuleText,n.Ec)}}const Ci=function(t){return[t]};function Oi(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",117),n.Wb(1,"form",118),n.Wb(2,"div",66),n.Wb(3,"mat-form-field",119),n.Rb(4,"input",120),n.ic(5,"translate"),n.Wb(6,"mat-icon",121),n.dc("click",(function(){n.Dc(t);const e=n.hc(2);return e.hidePassword=!e.hidePassword})),n.Vb(),n.Oc(7,vi,3,3,"mat-error",28),n.Vb(),n.Vb(),n.Wb(8,"div",66),n.Wb(9,"div",122),n.Qc(10),n.Vb(),n.Wb(11,"div",123),n.Wb(12,"mat-form-field",119),n.Rb(13,"input",124,125),n.ic(15,"translate"),n.Wb(16,"mat-icon",121),n.dc("click",(function(){n.Dc(t);const e=n.hc(2);return e.hidePassword=!e.hidePassword})),n.Vb(),n.Oc(17,_i,5,3,"mat-hint",28),n.Wb(18,"mat-error"),n.Qc(19),n.Vb(),n.Vb(),n.Vb(),n.Wb(20,"div",123),n.Wb(21,"mat-form-field",119),n.Rb(22,"input",126,127),n.ic(24,"translate"),n.Wb(25,"mat-icon",121),n.dc("click",(function(){n.Dc(t);const e=n.hc(2);return e.hidePassword=!e.hidePassword})),n.Vb(),n.Oc(26,yi,5,3,"mat-hint",28),n.Wb(27,"mat-error"),n.Qc(28),n.ic(29,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Oc(30,xi,3,1,"div",128),n.Wb(31,"div",66),n.Wb(32,"div",53),n.Wb(33,"button",129),n.dc("click",(function(){return n.Dc(t),n.hc(2).updatePassword()})),n.Qc(34),n.ic(35,"translate"),n.Vb(),n.Wb(36,"button",130),n.dc("click",(function(){return n.Dc(t),n.hc(2).showPassword=!1})),n.Qc(37),n.ic(38,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.oc("formGroup",t.firstFormGroup),n.Db(3),n.pc("placeholder",n.jc(5,20,"lang.typeCurrentPassword")),n.oc("type",t.hidePassword?"password":"text"),n.Db(2),n.oc("ngClass",n.vc(32,Ci,t.hidePassword?"fa-eye-slash":"fa-eye")),n.Db(1),n.oc("ngIf",t.firstFormGroup.controls.currentPasswordCtrl.hasError("required")),n.Db(3),n.Sc(" ",t.ruleText,""),n.Db(3),n.pc("placeholder",n.jc(15,22,"lang.typeNewPassword")),n.oc("type",t.hidePassword?"password":"text"),n.Db(3),n.oc("ngClass",n.vc(34,Ci,t.hidePassword?"fa-eye-slash":"fa-eye")),n.Db(1),n.oc("ngIf",t.validPassword),n.Db(2),n.Rc(t.getErrorMessage()),n.Db(3),n.pc("placeholder",n.jc(24,24,"lang.retypeNewPassword")),n.oc("type",t.hidePassword?"password":"text"),n.Db(3),n.oc("ngClass",n.vc(36,Ci,t.hidePassword?"fa-eye-slash":"fa-eye")),n.Db(1),n.oc("ngIf",!t.firstFormGroup.controls.retypePasswordCtrl.hasError("mismatch")&&""!=t.firstFormGroup.controls.retypePasswordCtrl.value),n.Db(2),n.Sc("",n.jc(29,26,"lang.passwordNotMatch")," !"),n.Db(2),n.oc("ngIf",t.passwordRules.renewal.enabled||t.passwordRules.historyLastUse.enabled),n.Db(3),n.oc("disabled",!t.firstFormGroup.valid),n.Db(1),n.Rc(n.jc(35,28,"lang.update")),n.Db(3),n.Rc(n.jc(38,30,"lang.cancel"))}}function Di(t,e){if(1&t){const t=n.Xb();n.Wb(0,"form",135,136),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc(2).onSubmit()})),n.Wb(2,"div",66),n.Wb(3,"div",84),n.Wb(4,"div",137),n.Wb(5,"div",138),n.Rb(6,"i",139),n.Vb(),n.Vb(),n.Wb(7,"div",140),n.Wb(8,"mat-form-field"),n.Rb(9,"input",141),n.ic(10,"translate"),n.ic(11,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(12,"div",66),n.Wb(13,"div",142),n.Wb(14,"mat-form-field"),n.Wb(15,"input",143),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).user.lastname=e})),n.ic(16,"translate"),n.ic(17,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(18,"div",142),n.Wb(19,"mat-form-field"),n.Wb(20,"input",144),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).user.firstname=e})),n.ic(21,"translate"),n.ic(22,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(23,"div",145),n.Wb(24,"mat-form-field"),n.Wb(25,"input",146),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).user.initials=e})),n.ic(26,"translate"),n.ic(27,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(28,"div",66),n.Wb(29,"div",84),n.Wb(30,"mat-form-field"),n.Wb(31,"input",147),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).user.phone=e})),n.ic(32,"translate"),n.ic(33,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(34,"div",66),n.Wb(35,"div",84),n.Wb(36,"mat-form-field"),n.Wb(37,"input",148),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).user.mail=e})),n.ic(38,"translate"),n.ic(39,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(40,"div",149),n.Wb(41,"div",53),n.Wb(42,"button",72),n.Qc(43),n.ic(44,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(1),e=n.hc(2);n.Db(9),n.pc("title",n.jc(10,20,"lang.id")),n.pc("value",e.user.user_id),n.pc("placeholder",n.jc(11,22,"lang.id")),n.Db(6),n.pc("title",n.jc(16,24,"lang.lastname")),n.pc("placeholder",n.jc(17,26,"lang.lastname")),n.oc("ngModel",e.user.lastname),n.Db(5),n.pc("title",n.jc(21,28,"lang.firstname")),n.pc("placeholder",n.jc(22,30,"lang.firstname")),n.oc("ngModel",e.user.firstname),n.Db(5),n.pc("title",n.jc(26,32,"lang.initials")),n.pc("placeholder",n.jc(27,34,"lang.initials")),n.oc("ngModel",e.user.initials),n.Db(6),n.pc("title",n.jc(32,36,"lang.phoneNumber")),n.pc("placeholder",n.jc(33,38,"lang.phoneNumber")),n.oc("ngModel",e.user.phone),n.Db(6),n.pc("title",n.jc(38,40,"lang.email")),n.pc("placeholder",n.jc(39,42,"lang.email")),n.oc("ngModel",e.user.mail),n.Db(5),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(44,44,"lang.update"))}}function wi(t,e){1&t&&(n.Wb(0,"mat-panel-description"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.editorOptionAdmin")," "))}function Mi(t,e){if(1&t&&(n.Wb(0,"mat-option",150),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t,"")}}function ki(t,e){1&t&&(n.Wb(0,"mat-panel-description"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.basketsColorAdmin")," "))}function Si(t,e){if(1&t&&(n.Wb(0,"h3"),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Rc(t.groupDesc)}}const Ii=function(t){return{color:t}};function Pi(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item"),n.Rb(1,"mat-icon",151),n.Wb(2,"h4",152),n.Qc(3),n.Vb(),n.Wb(4,"input",153),n.dc("ngModelChange",(function(i){n.Dc(t);const a=e.index,s=n.hc().index;return n.hc(2).user.regroupedBaskets[s].baskets[a].color=i}))("change",(function(){n.Dc(t);const i=e.index,a=n.hc().index;return n.hc(2).updateBasketColor(a,i)})),n.Vb(),n.Wb(5,"a",154),n.dc("click",(function(){n.Dc(t);const i=e.index,a=n.hc().index,s=n.hc(2);return s.user.regroupedBaskets[a].baskets[i].color="",s.updateBasketColor(a,i)})),n.ic(6,"translate"),n.Rb(7,"i",155),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=e.index,a=n.hc().index,s=n.hc(2);n.Db(1),n.oc("ngStyle",n.vc(7,Ii,s.user.regroupedBaskets[a].baskets[i].color)),n.Db(1),n.pc("title",t.basket_id),n.Db(1),n.Rc(t.basket_name),n.Db(1),n.oc("ngModel",s.user.regroupedBaskets[a].baskets[i].color),n.Db(1),n.pc("title",n.jc(6,5,"lang.resetColor"))}}function Vi(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Si,2,1,"h3",28),n.Oc(2,Pi,8,9,"mat-list-item",14),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",t.baskets[0]),n.Db(1),n.oc("ngForOf",t.baskets)}}function Ri(t,e){1&t&&(n.Wb(0,"mat-panel-description"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.myBasketsDesc")," "))}function ji(t,e){1&t&&(n.Wb(0,"span",156),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.selectAll")," "))}const Ai=function(){return["/rest/autocomplete/users"]};function Wi(t,e){if(1&t){const t=n.Xb();n.Wb(0,"plugin-autocomplete",157),n.dc("triggerEvent",(function(e){return n.Dc(t),n.hc(2).addBasketRedirection(e)})),n.ic(1,"translate"),n.Vb()}if(2&t){const t=n.hc(2);n.oc("labelPlaceholder",n.jc(1,5,"lang.redirectBaskets"))("routeDatas",n.uc(7,Ai))("targetSearchKey","idToDisplay")("subInfoKey","descriptionToDisplay")("disableItems",n.vc(8,Ci,t.headerService.user.id))}}function Ti(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-icon",38),n.Wb(1,"mat-checkbox",164),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("change",(function(e){n.Dc(t);const i=n.hc(2).$implicit,a=n.hc(2);return e?a.selectionBaskets.toggle(i):null})),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2).$implicit,e=n.hc(2);n.Db(1),n.oc("checked",e.selectionBaskets.isSelected(t))}}function Ei(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item",159),n.dc("mouseover",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).showActions(e)}))("mouseout",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).hideActions(e)})),n.Oc(1,Ti,2,1,"mat-icon",160),n.Wb(2,"h4",161),n.Wb(3,"span",162),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).selectionBaskets.toggle(e)})),n.Qc(4),n.Wb(5,"span",163),n.Qc(6),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",t.enabled),n.Db(2),n.rc("matTooltip","",t.basket_name," [",t.group_desc,"]"),n.Db(1),n.Sc(" ",t.basket_name," "),n.Db(2),n.Rc(t.group_desc)}}function Fi(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Ei,7,5,"mat-list-item",158),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",null==t.userToDisplay)}}function Li(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"mat-list-item"),n.Rb(2,"mat-icon",165),n.Wb(3,"h4",166),n.Qc(4),n.Wb(5,"span",163),n.Qc(6),n.Vb(),n.Vb(),n.Wb(7,"p",17),n.Wb(8,"mat-form-field"),n.Rb(9,"input",167),n.ic(10,"translate"),n.Wb(11,"button",168),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=e.index;return n.hc(2).delBasketRedirection(i,a)})),n.ic(12,"translate"),n.Rb(13,"mat-icon",169),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=e.$implicit;n.Db(4),n.Sc("",t.basket_name," "),n.Db(2),n.Rc(t.group_desc),n.Db(3),n.rc("value","",n.jc(10,5,"lang.redirectedTo")," ",t.userToDisplay,""),n.Db(2),n.pc("matTooltip",n.jc(12,7,"lang.deleteRedirection"))}}function Qi(t,e){if(1&t){const t=n.Xb();n.Wb(0,"plugin-autocomplete",157),n.dc("triggerEvent",(function(e){n.Dc(t);const i=n.hc(),a=i.$implicit,s=i.index;return n.hc(2).reassignBasketRedirection(e,a,s)})),n.ic(1,"translate"),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc(2);n.oc("labelPlaceholder",n.jc(1,5,"lang.redirectBasket")+": "+t.basket_name)("routeDatas",n.uc(7,Ai))("targetSearchKey","idToDisplay")("subInfoKey","descriptionToDisplay")("disableItems",n.vc(8,Ci,e.headerService.user.id))}}function Ni(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Rb(1,"input",167),n.ic(2,"translate"),n.Wb(3,"button",168),n.dc("click",(function(){return n.Dc(t),n.hc().$implicit.redirectMode=!0})),n.ic(4,"translate"),n.Rb(5,"mat-icon",172),n.Vb(),n.Wb(6,"button",168),n.dc("click",(function(){n.Dc(t);const e=n.hc(),i=e.$implicit,a=e.index;return n.hc(2).delBasketAssignRedirection(i,a)})),n.ic(7,"translate"),n.Rb(8,"mat-icon",169),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(1),n.rc("value","",n.jc(2,4,"lang.assignBy")," ",t.userToDisplay,""),n.Db(2),n.pc("matTooltip",n.jc(4,6,"lang.reassign")),n.Db(3),n.pc("matTooltip",n.jc(7,8,"lang.deleteAssignation"))}}function zi(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-list-item"),n.Rb(2,"mat-icon",170),n.Wb(3,"h4",171),n.dc("click",(function(){return e.$implicit.redirectMode=!1})),n.Qc(4),n.Wb(5,"span",163),n.Qc(6),n.Vb(),n.Vb(),n.Wb(7,"p",17),n.Oc(8,Qi,2,10,"plugin-autocomplete",41),n.Oc(9,Ni,9,10,"mat-form-field",28),n.Vb(),n.Vb(),n.Tb()),2&t){const t=e.$implicit;n.Db(4),n.Sc("",t.basket_name," "),n.Db(2),n.Rc(t.group_desc),n.Db(2),n.oc("ngIf",t.redirectMode),n.Db(1),n.oc("ngIf",!t.redirectMode)}}function Bi(t,e){1&t&&(n.Wb(0,"mat-panel-description"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.mySignMailDesc")," "))}function Ui(t,e){if(1&t&&(n.Wb(0,"button",72),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){n.hc();const t=n.zc(78);n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(2,2,"lang.save"))}}function $i(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",129),n.dc("click",(function(){return n.Dc(t),n.hc(2).updateEmailSignature()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){n.hc();const t=n.zc(78);n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(2,2,"lang.update"))}}function Hi(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",173),n.dc("click",(function(){return n.Dc(t),n.hc(2).deleteEmailSignature()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.delete")))}function Gi(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",130),n.dc("click",(function(){return n.Dc(t),n.hc(2).resetEmailSignature()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.cancel")))}function Xi(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",174),n.Wb(1,"mat-card",175),n.Wb(2,"mat-card-content",53),n.Wb(3,"mat-form-field",176),n.Wb(4,"input",177),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.title=i})),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Wb(6,"button",178),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc(2).changeEmailSignature(i)})),n.ic(7,"translate"),n.Rb(8,"mat-icon",179),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(4),n.pc("placeholder",n.jc(5,3,"lang.label")),n.oc("ngModel",t.title),n.Db(2),n.pc("matTooltip",n.jc(7,5,"lang.update"))}}function qi(t,e){1&t&&(n.Wb(0,"mat-panel-description"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.mySignSignatureBookDesc")," "))}function Ki(t,e){if(1&t&&(n.Wb(0,"div",180),n.Rb(1,"img",181),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("src",t.signatureModel.base64ForJs,n.Gc)}}function Yi(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",182),n.Wb(1,"mat-card",175),n.Wb(2,"mat-card-content",53),n.Wb(3,"mat-form-field",176),n.Wb(4,"input",183),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.signature_label=i}))("change",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).updateSignature(i)})),n.ic(5,"translate"),n.Vb(),n.Wb(6,"button",184),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).deleteSignature(i.id)})),n.ic(7,"translate"),n.Rb(8,"mat-icon",185),n.Vb(),n.Vb(),n.Rb(9,"img",186),n.ic(10,"async"),n.ic(11,"secureUrl"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.Db(4),n.pc("placeholder",n.jc(5,4,"lang.label")),n.oc("ngModel",t.signature_label),n.Db(2),n.pc("matTooltip",n.jc(7,6,"lang.delete")),n.Db(3),n.oc("src",n.jc(10,8,n.jc(11,10,"../rest/users/"+i.user.id+"/signatures/"+t.id+"/content")),n.Gc)}}function Ji(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",187),n.dc("click",(function(){return n.Dc(t),n.hc(2).syncMP()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",188),n.Vb()}if(2&t){const t=n.hc(2);n.pc("matTooltip",n.jc(1,4,"lang.syncSignsToMaarchParapheur")),n.oc("disabled",!t.user.external_id.maarchParapheur||t.loadingSign),n.Db(2),n.Ib("fa-spin",t.loadingSign)}}function Zi(t,e){1&t&&(n.Wb(0,"mat-panel-description"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.myContactsGroupsDesc")," "))}function tn(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",189),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Sc(" ",n.jc(2,3,"lang.label"),"")}}function en(t,e){if(1&t&&(n.Wb(0,"mat-cell",190),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",t.label," ")}}function nn(t,e){1&t&&(n.Wb(0,"mat-header-cell",189),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.description"),""))}function an(t,e){if(1&t&&(n.Wb(0,"mat-cell",190),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.description," ")}}function sn(t,e){1&t&&(n.Wb(0,"mat-header-cell",191),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.relatedContactNumber")," "))}function on(t,e){if(1&t&&(n.Wb(0,"span"),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Rc(t.nbContacts)}}function rn(t,e){if(1&t&&(n.Wb(0,"span",194),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Rc(t.nbContacts)}}function cn(t,e){if(1&t&&(n.Wb(0,"mat-cell",192),n.Oc(1,on,2,1,"span",28),n.Oc(2,rn,2,1,"span",193),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",0==t.nbContacts),n.Db(1),n.oc("ngIf",t.nbContacts>0)}}function ln(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",191),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Sc(" ",n.jc(2,3,"lang.public"),"")}}function dn(t,e){1&t&&(n.Wb(0,"span"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.no")," "))}function hn(t,e){1&t&&(n.Wb(0,"span"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.yes")," "))}function un(t,e){if(1&t&&(n.Wb(0,"mat-cell",192),n.Oc(1,dn,3,3,"span",28),n.Oc(2,hn,3,3,"span",28),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.oc("ngIf",!t.public),n.Db(1),n.oc("ngIf",t.public)}}function pn(t,e){1&t&&(n.Wb(0,"mat-header-cell",191),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.createdBy"),""))}function bn(t,e){if(1&t&&(n.Wb(0,"mat-cell",192),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.labelledOwner," ")}}function fn(t,e){1&t&&n.Rb(0,"mat-header-cell")}function mn(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",195),n.Wb(1,"button",196),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.deleteContactsGroup(a.position)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",197),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.pc("matTooltip",n.jc(2,1,"lang.delete")))}function gn(t,e){1&t&&n.Rb(0,"mat-header-row")}function vn(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-row",198),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).loadContactsGroup(i)})),n.ic(1,"translate"),n.Vb()}2&t&&n.pc("matTooltip",n.jc(1,1,"lang.view"))}function _n(t,e){1&t&&(n.Rb(0,"div",216),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.limitDataReached_1000"),n.Ec)}function yn(t,e){1&t&&n.Rb(0,"mat-progress-bar",217)}function xn(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-header-cell",192),n.Wb(1,"mat-checkbox",227),n.dc("change",(function(e){n.Dc(t);const i=n.hc(4);return e?i.masterToggle(e):null})),n.Vb(),n.Vb()}if(2&t){const t=n.hc(4);n.Db(1),n.oc("checked",t.selection.hasValue())}}function Cn(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",192),n.Wb(1,"mat-checkbox",228),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("change",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(4);return i?s.selection.toggle(a.id):null})),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(4);n.Db(1),n.qc("id","check_",t.id,""),n.oc("disabled",i.isInGrp(t))("checked",i.selection.isSelected(t.id))}}function On(t,e){1&t&&(n.Wb(0,"mat-header-cell",229),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.contact"),""))}function Dn(t,e){if(1&t&&(n.Wb(0,"mat-cell",229),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.contact," ")}}function wn(t,e){1&t&&(n.Wb(0,"mat-header-cell",229),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.address"),""))}function Mn(t,e){if(1&t&&(n.Wb(0,"mat-cell",229),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.address," ")}}function kn(t,e){1&t&&n.Rb(0,"mat-header-row")}const Sn=function(t){return{opacity:t}};function In(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-row",230),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(4).selectContact(i.id)})),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(4);n.oc("ngStyle",n.vc(1,Sn,i.isInGrp(t)?"0.5":""))}}function Pn(t,e){if(1&t&&(n.Wb(0,"mat-table",218,219),n.Ub(2,220),n.Oc(3,xn,2,1,"mat-header-cell",221),n.Oc(4,Cn,2,3,"mat-cell",105),n.Tb(),n.Ub(5,222),n.Oc(6,On,3,3,"mat-header-cell",223),n.Oc(7,Dn,2,1,"mat-cell",224),n.Tb(),n.Ub(8,225),n.Oc(9,wn,3,3,"mat-header-cell",223),n.Oc(10,Mn,2,1,"mat-cell",224),n.Tb(),n.Oc(11,kn,1,0,"mat-header-row",113),n.Oc(12,In,1,3,"mat-row",226),n.Vb()),2&t){const t=n.hc(3);n.oc("dataSource",t.dataSourceContactsListAutocomplete),n.Db(11),n.oc("matHeaderRowDef",t.displayedColumnsContactsListAutocomplete),n.Db(1),n.oc("matRowDefColumns",t.displayedColumnsContactsListAutocomplete)}}function Vn(t,e){1&t&&(n.Wb(0,"mat-header-cell",238),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.contact")," "))}function Rn(t,e){if(1&t&&(n.Wb(0,"mat-cell",229),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.contact," ")}}function jn(t,e){1&t&&(n.Wb(0,"mat-header-cell",238),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.address")," "))}function An(t,e){if(1&t&&(n.Wb(0,"mat-cell",229),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.address," ")}}function Wn(t,e){1&t&&n.Rb(0,"mat-header-cell",192)}function Tn(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",239),n.Wb(1,"button",196),n.dc("click",(function(i){n.Dc(t);const a=e.index,s=n.hc(5);return i.stopPropagation(),s.preDelete(a)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",197),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.pc("matTooltip",n.jc(2,1,"lang.delete")))}function En(t,e){1&t&&n.Rb(0,"mat-header-row")}function Fn(t,e){1&t&&n.Rb(0,"mat-row")}function Ln(t,e){if(1&t&&(n.Wb(0,"mat-table",233,234),n.Ub(2,222),n.Oc(3,Vn,3,3,"mat-header-cell",235),n.Oc(4,Rn,2,1,"mat-cell",224),n.Tb(),n.Ub(5,225),n.Oc(6,jn,3,3,"mat-header-cell",235),n.Oc(7,An,2,1,"mat-cell",224),n.Tb(),n.Ub(8,110),n.Oc(9,Wn,1,0,"mat-header-cell",221),n.Oc(10,Tn,4,3,"mat-cell",236),n.Tb(),n.Oc(11,En,1,0,"mat-header-row",113),n.Oc(12,Fn,1,0,"mat-row",237),n.Vb()),2&t){const t=n.hc(4);n.oc("dataSource",t.dataSourceContactsList),n.Db(11),n.oc("matHeaderRowDef",t.displayedColumnsContactsList),n.Db(1),n.oc("matRowDefColumns",t.displayedColumnsContactsList)}}function Qn(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",213),n.Wb(1,"mat-tab-group"),n.Wb(2,"mat-tab",24),n.ic(3,"translate"),n.Wb(4,"div",201),n.Wb(5,"div",91),n.Wb(6,"mat-form-field"),n.Wb(7,"input",92),n.dc("keyup",(function(e){return n.Dc(t),n.hc(3).applyFilterContactsList(e.target.value)})),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(9,"div",91),n.Rb(10,"mat-paginator",93,231),n.Vb(),n.Vb(),n.Oc(12,Ln,13,3,"mat-table",232),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(3);n.Db(2),n.rc("label","",t.contactsGroup.contacts.length," ",n.jc(3,7,"lang.relatedContacts"),""),n.Db(5),n.pc("placeholder",n.jc(8,9,"lang.filterBy")),n.Db(3),n.oc("length",0)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("ngIf",t.contactsListMode)}}function Nn(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab",24),n.ic(1,"translate"),n.Wb(2,"mat-accordion"),n.Wb(3,"mat-expansion-panel",null,199),n.Wb(5,"mat-expansion-panel-header"),n.Wb(6,"mat-panel-title",80),n.Wb(7,"span",81),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(10,"div",200),n.Wb(11,"div",201),n.Wb(12,"div",202),n.Wb(13,"mat-form-field",203),n.Wb(14,"span",204),n.Rb(15,"mat-icon",205),n.Qc(16,"\xa0\xa0 "),n.Vb(),n.Wb(17,"input",206),n.dc("keyup",(function(){return n.Dc(t),n.hc(2).launchLoading()})),n.ic(18,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(19,"div",91),n.Oc(20,_n,2,3,"div",207),n.Vb(),n.Wb(21,"div",91),n.Rb(22,"mat-paginator",93,208),n.Vb(),n.Vb(),n.Oc(24,yn,1,0,"mat-progress-bar",209),n.Oc(25,Pn,13,3,"mat-table",210),n.Wb(26,"div",66),n.Wb(27,"div",211),n.Wb(28,"button",129),n.dc("click",(function(e){return n.Dc(t),n.hc(2).saveContactsList(e.target)})),n.Qc(29),n.ic(30,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(31,"div",212),n.Wb(32,"div",213),n.Wb(33,"form",135,83),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc(2).updateGroupSubmit()})),n.Wb(35,"div",66),n.Wb(36,"div",84),n.Wb(37,"mat-form-field"),n.Wb(38,"input",85),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).contactsGroup.label=e})),n.ic(39,"translate"),n.ic(40,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(41,"div",66),n.Wb(42,"div",84),n.Wb(43,"mat-form-field"),n.Wb(44,"input",86),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).contactsGroup.description=e})),n.ic(45,"translate"),n.ic(46,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(47,"div",66),n.Wb(48,"div",84),n.Wb(49,"mat-slide-toggle",214),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).contactsGroup.public=e})),n.ic(50,"translate"),n.Qc(51),n.ic(52,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(53,"div",66),n.Wb(54,"div",88),n.Wb(55,"button",72),n.Qc(56),n.ic(57,"translate"),n.Vb(),n.Wb(58,"button",130),n.dc("click",(function(){return n.Dc(t),n.hc(2).initGroupsContact()})),n.Qc(59),n.ic(60,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Oc(61,Qn,13,11,"div",215),n.Vb(),n.Vb()}if(2&t){const t=n.zc(34),e=n.hc(2);n.rc("label","",n.jc(1,26,"lang.grouping")," : ",e.contactsGroup.label,""),n.Db(8),n.Rc(n.jc(9,28,"lang.linkContact")),n.Db(9),n.pc("placeholder",n.jc(18,30,"lang.linkContact")),n.oc("formControl",e.searchTerm),n.Db(3),n.oc("ngIf",e.dataSourceContactsListAutocomplete&&1e3==e.dataSourceContactsListAutocomplete.data.length),n.Db(2),n.oc("length",0)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("ngIf",!e.dataSourceContactsListAutocomplete&&!e.initAutoCompleteContact),n.Db(1),n.oc("ngIf",e.dataSourceContactsListAutocomplete),n.Db(3),n.oc("disabled",0==e.selection.selected.length),n.Db(1),n.Rc(n.jc(30,32,"lang.add")),n.Db(9),n.pc("title",n.jc(39,34,"lang.label")),n.pc("placeholder",n.jc(40,36,"lang.label")),n.oc("ngModel",e.contactsGroup.label),n.Db(6),n.pc("title",n.jc(45,38,"lang.description")),n.pc("placeholder",n.jc(46,40,"lang.description")),n.oc("ngModel",e.contactsGroup.description),n.Db(5),n.pc("title",n.jc(50,42,"lang.public")),n.oc("ngModel",e.contactsGroup.public),n.Db(2),n.Sc(" ",n.jc(52,44,"lang.public")," "),n.Db(4),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(57,46,"lang.update")),n.Db(3),n.Rc(n.jc(60,48,"lang.close")),n.Db(2),n.oc("ngIf",e.contactsListMode)}}function zn(t,e){1&t&&(n.Wb(0,"mat-header-cell",248),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.date")," "))}function Bn(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.ic(2,"date"),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",n.kc(2,1,t.event_date,"dd/MM/y HH:mm")," ")}}function Un(t,e){1&t&&(n.Wb(0,"mat-header-cell",248),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.technicalId"),""))}function $n(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Rc(t.record_id)}}function Hn(t,e){1&t&&(n.Wb(0,"mat-header-cell",248),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.description")," "))}function Gn(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.info," ")}}function Xn(t,e){1&t&&n.Rb(0,"mat-header-row")}function qn(t,e){1&t&&n.Rb(0,"mat-row")}function Kn(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",90),n.Wb(1,"div",91),n.Wb(2,"mat-form-field"),n.Wb(3,"input",92),n.dc("keyup",(function(e){return n.Dc(t),n.hc(2).applyFilter(e.target.value)})),n.ic(4,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(5,"div",91),n.Rb(6,"mat-paginator",93,240),n.Vb(),n.Vb(),n.Wb(8,"mat-table",241,242),n.Ub(10,243),n.Oc(11,zn,3,3,"mat-header-cell",244),n.Oc(12,Bn,3,4,"mat-cell",245),n.Tb(),n.Ub(13,246),n.Oc(14,Un,3,3,"mat-header-cell",244),n.Oc(15,$n,2,1,"mat-cell",245),n.Tb(),n.Ub(16,247),n.Oc(17,Hn,3,3,"mat-header-cell",244),n.Oc(18,Gn,2,1,"mat-cell",245),n.Tb(),n.Oc(19,Xn,1,0,"mat-header-row",113),n.Oc(20,qn,1,0,"mat-row",237),n.Vb()}if(2&t){const t=n.hc(2);n.Db(3),n.pc("placeholder",n.jc(4,7,"lang.filterBy")),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.dataSource),n.Db(11),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns)}}function Yn(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",22),n.Wb(1,"mat-tab-group",23),n.dc("selectedTabChange",(function(e){return n.Dc(t),n.hc().initComponents(e)})),n.Wb(2,"mat-tab",24),n.ic(3,"translate"),n.Oc(4,Oi,39,38,"div",25),n.Oc(5,Di,45,46,"form",26),n.Vb(),n.Wb(6,"mat-tab",24),n.ic(7,"translate"),n.Wb(8,"mat-accordion"),n.Wb(9,"mat-expansion-panel"),n.Wb(10,"mat-expansion-panel-header"),n.Wb(11,"mat-panel-title"),n.Rb(12,"mat-icon",27),n.Wb(13,"span"),n.Qc(14),n.ic(15,"translate"),n.Vb(),n.Vb(),n.Oc(16,wi,3,3,"mat-panel-description",28),n.Vb(),n.Wb(17,"div",29),n.Qc(18),n.ic(19,"translate"),n.Vb(),n.Wb(20,"div",30),n.Wb(21,"mat-form-field"),n.Wb(22,"mat-select",31),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().user.preferences.documentEdition=e}))("selectionChange",(function(){return n.Dc(t),n.hc().updateUserPreferences()})),n.Oc(23,Mi,2,2,"mat-option",32),n.Vb(),n.Wb(24,"mat-hint"),n.Qc(25),n.ic(26,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(27,"mat-expansion-panel"),n.Wb(28,"mat-expansion-panel-header"),n.Wb(29,"mat-panel-title"),n.Rb(30,"mat-icon",33),n.Rb(31,"mat-icon",34),n.Wb(32,"span"),n.Qc(33),n.ic(34,"translate"),n.Vb(),n.Vb(),n.Oc(35,ki,3,3,"mat-panel-description",28),n.Vb(),n.Wb(36,"mat-list"),n.Oc(37,Vi,3,2,"ng-container",14),n.Vb(),n.Vb(),n.Wb(38,"mat-expansion-panel",35),n.Wb(39,"mat-expansion-panel-header"),n.Wb(40,"mat-panel-title"),n.Rb(41,"mat-icon",33),n.Rb(42,"mat-icon",36),n.Qc(43),n.ic(44,"translate"),n.Vb(),n.Oc(45,Ri,3,3,"mat-panel-description",28),n.Vb(),n.Wb(46,"div",37),n.Wb(47,"mat-list"),n.Wb(48,"mat-list-item"),n.Wb(49,"mat-icon",38),n.Wb(50,"mat-checkbox",39),n.dc("change",(function(e){n.Dc(t);const i=n.hc();return e?i.masterToggleBaskets(e):null})),n.ic(51,"translate"),n.Vb(),n.Vb(),n.Wb(52,"p",17),n.Oc(53,ji,3,3,"span",40),n.Oc(54,Wi,2,10,"plugin-autocomplete",41),n.Vb(),n.Vb(),n.Rb(55,"mat-divider"),n.Oc(56,Fi,2,1,"ng-container",14),n.Vb(),n.Vb(),n.Wb(57,"div",37),n.Wb(58,"mat-tab-group"),n.Wb(59,"mat-tab",24),n.ic(60,"translate"),n.Wb(61,"mat-list"),n.Oc(62,Li,14,9,"ng-container",14),n.Vb(),n.Vb(),n.Vb(),n.Wb(63,"mat-tab-group"),n.Wb(64,"mat-tab",24),n.ic(65,"translate"),n.Wb(66,"mat-list"),n.Oc(67,zi,10,4,"ng-container",14),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Rb(68,"div",42),n.Vb(),n.Wb(69,"mat-expansion-panel",43),n.dc("opened",(function(){return n.Dc(t),n.hc().initMce()})),n.Wb(70,"mat-expansion-panel-header"),n.Wb(71,"mat-panel-title"),n.Rb(72,"mat-icon",44),n.Qc(73),n.ic(74,"translate"),n.Vb(),n.Oc(75,Bi,3,3,"mat-panel-description",28),n.Vb(),n.Wb(76,"div",37),n.Wb(77,"form",45,46),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().submitEmailSignature()})),n.Wb(79,"div",47),n.Wb(80,"div",48),n.Wb(81,"mat-form-field"),n.Wb(82,"input",49),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().mailSignatureModel.title=e})),n.ic(83,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(84,"div",47),n.Wb(85,"div",48),n.Wb(86,"div",50),n.Rb(87,"textarea",51),n.Vb(),n.Vb(),n.Vb(),n.Wb(88,"div",52),n.Wb(89,"div",53),n.Oc(90,Ui,3,4,"button",54),n.Oc(91,$i,3,4,"button",55),n.Oc(92,Hi,3,3,"button",56),n.Oc(93,Gi,3,3,"button",57),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(94,"div",37),n.Oc(95,Xi,9,7,"div",58),n.Vb(),n.Rb(96,"div",42),n.Vb(),n.Wb(97,"mat-expansion-panel"),n.Wb(98,"mat-expansion-panel-header"),n.Wb(99,"mat-panel-title"),n.Rb(100,"mat-icon",59),n.Qc(101),n.ic(102,"translate"),n.Vb(),n.Oc(103,qi,3,3,"mat-panel-description",28),n.Vb(),n.Wb(104,"div",60),n.Wb(105,"div",61),n.dc("click",(function(){return n.Dc(t),n.hc().clickOnUploader("uploadSignFile")}))("dragover",(function(){return n.Dc(t),n.hc().highlightMe=!0}))("dragleave",(function(){return n.Dc(t),n.hc().highlightMe=!1}))("onDropSuccess",(function(e){n.Dc(t);const i=n.hc();return i.dndUploadSignature(e),i.highlightMe=!1})),n.ic(106,"translate"),n.Qc(107),n.ic(108,"translate"),n.Vb(),n.Wb(109,"form",62,63),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().submitSignature()})),n.Wb(111,"div",48),n.Wb(112,"mat-form-field"),n.Wb(113,"input",64),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().signatureModel.label=e})),n.ic(114,"translate"),n.ic(115,"translate"),n.Vb(),n.Vb(),n.Wb(116,"div",65),n.Wb(117,"div",66),n.Wb(118,"input",67),n.dc("change",(function(e){return n.Dc(t),n.hc().uploadSignatureTrigger(e)})),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(119,"div",68),n.Wb(120,"div",69),n.dc("click",(function(){return n.Dc(t),n.hc().clickOnUploader("uploadSignFile")})),n.Qc(121),n.ic(122,"translate"),n.Rb(123,"i",70),n.Qc(124," ( < 2MB) "),n.Vb(),n.Vb(),n.Oc(125,Ki,2,1,"div",71),n.Wb(126,"div",52),n.Wb(127,"div",53),n.Wb(128,"button",72),n.Qc(129),n.ic(130,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(131,"div",73),n.Wb(132,"div",74),n.Oc(133,Yi,12,12,"div",75),n.Vb(),n.Wb(134,"div"),n.Oc(135,Ji,3,6,"button",76),n.Vb(),n.Vb(),n.Rb(136,"div",42),n.Vb(),n.Wb(137,"mat-expansion-panel",43),n.dc("opened",(function(){return n.Dc(t),n.hc().initGroupsContact()})),n.Wb(138,"mat-expansion-panel-header"),n.Wb(139,"mat-panel-title"),n.Rb(140,"mat-icon",77),n.Qc(141),n.ic(142,"translate"),n.Vb(),n.Oc(143,Zi,3,3,"mat-panel-description",28),n.Vb(),n.Wb(144,"mat-tab-group",78),n.dc("selectedIndexChange",(function(e){n.Dc(t);const i=n.zc(149);return n.hc().changeTabContactGrp(e),i.close()})),n.Wb(145,"mat-tab",24),n.ic(146,"translate"),n.Wb(147,"mat-accordion"),n.Wb(148,"mat-expansion-panel",43,79),n.dc("opened",(function(){return n.Dc(t),n.hc().initGroupsContact()})),n.Wb(150,"mat-expansion-panel-header"),n.Wb(151,"mat-panel-title",80),n.Wb(152,"span",81),n.Qc(153),n.ic(154,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(155,"form",82,83),n.dc("ngSubmit",(function(){n.Dc(t);const e=n.zc(149);return n.hc().contactsGroupSubmit(),e.close()})),n.Wb(157,"div",66),n.Wb(158,"div",84),n.Wb(159,"mat-form-field"),n.Wb(160,"input",85),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().contactsGroup.label=e})),n.ic(161,"translate"),n.ic(162,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(163,"div",66),n.Wb(164,"div",84),n.Wb(165,"mat-form-field"),n.Wb(166,"input",86),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().contactsGroup.description=e})),n.ic(167,"translate"),n.ic(168,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(169,"div",66),n.Wb(170,"div",84),n.Wb(171,"mat-slide-toggle",87),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().contactsGroup.public=e})),n.ic(172,"translate"),n.Qc(173),n.ic(174,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(175,"div",66),n.Wb(176,"div",88),n.Wb(177,"button",72),n.Qc(178),n.ic(179,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(180,"div",89),n.Wb(181,"div",90),n.Wb(182,"div",91),n.Wb(183,"mat-form-field"),n.Wb(184,"input",92),n.dc("keyup",(function(e){return n.Dc(t),n.hc().applyFilterGroupsList(e.target.value)})),n.ic(185,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(186,"div",91),n.Rb(187,"mat-paginator",93,94),n.Vb(),n.Vb(),n.Wb(189,"mat-table",95,96),n.Ub(191,97),n.Oc(192,tn,3,5,"mat-header-cell",98),n.Oc(193,en,2,3,"mat-cell",99),n.Tb(),n.Ub(194,100),n.Oc(195,nn,3,3,"mat-header-cell",101),n.Oc(196,an,2,1,"mat-cell",102),n.Tb(),n.Ub(197,103),n.Oc(198,sn,3,3,"mat-header-cell",104),n.Oc(199,cn,3,2,"mat-cell",105),n.Tb(),n.Ub(200,106),n.Oc(201,ln,3,5,"mat-header-cell",107),n.Oc(202,un,3,4,"mat-cell",108),n.Tb(),n.Ub(203,109),n.Oc(204,pn,3,3,"mat-header-cell",104),n.Oc(205,bn,2,1,"mat-cell",105),n.Tb(),n.Ub(206,110),n.Oc(207,fn,1,0,"mat-header-cell",111),n.Oc(208,mn,4,3,"mat-cell",112),n.Tb(),n.Oc(209,gn,1,0,"mat-header-row",113),n.Oc(210,vn,2,3,"mat-row",114),n.Vb(),n.Vb(),n.Vb(),n.Oc(211,Nn,62,50,"mat-tab",115),n.Vb(),n.Rb(212,"div",42),n.Vb(),n.Vb(),n.Vb(),n.Wb(213,"mat-tab",24),n.ic(214,"translate"),n.Oc(215,Kn,21,9,"ng-template",116),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(110),e=n.zc(156),i=n.hc();n.Db(1),n.oc("selectedIndex",i.selectedIndex),n.Db(1),n.pc("label",n.jc(3,76,"lang.myInformations")),n.Db(2),n.oc("ngIf",i.showPassword),n.Db(1),n.oc("ngIf",!i.showPassword),n.Db(1),n.pc("label",n.jc(7,78,"lang.myParameters")),n.Db(8),n.Rc(n.jc(15,80,"lang.editorOption")),n.Db(2),n.oc("ngIf",!i.appService.getViewMode()),n.Db(2),n.Sc(" ",n.jc(19,82,"lang.documentEditor"),""),n.Db(4),n.oc("ngModel",i.user.preferences.documentEdition),n.Db(1),n.oc("ngForOf",i.editorsList),n.Db(2),n.Sc(" ",n.jc(26,84,"lang.documentEditor_"+i.user.preferences.documentEdition)," "),n.Db(8),n.Rc(n.jc(34,86,"lang.basketsColor")),n.Db(2),n.oc("ngIf",!i.appService.getViewMode()),n.Db(2),n.oc("ngForOf",i.user.regroupedBaskets),n.Db(1),n.oc("expanded",i.myBasketExpansionPanel),n.Db(5),n.Sc(" ",n.jc(44,88,"lang.myBaskets")," "),n.Db(2),n.oc("ngIf",!i.appService.getViewMode()),n.Db(5),n.pc("matTooltip",n.jc(51,90,"lang.selectAll")),n.oc("checked",i.selectionBaskets.hasValue()),n.Db(3),n.oc("ngIf",!i.selectionBaskets.hasValue()),n.Db(1),n.oc("ngIf",i.selectionBaskets.hasValue()),n.Db(2),n.oc("ngForOf",i.user.baskets),n.Db(3),n.pc("label",n.jc(60,92,"lang.basketsRedirected")),n.Db(3),n.oc("ngForOf",i.user.redirectedBaskets),n.Db(2),n.pc("label",n.jc(65,94,"lang.basketsAssigned")),n.Db(3),n.oc("ngForOf",i.user.assignedBaskets),n.Db(6),n.Sc(" ",n.jc(74,96,"lang.mySignMail")," "),n.Db(2),n.oc("ngIf",!i.appService.getViewMode()),n.Db(7),n.pc("placeholder",n.jc(83,98,"lang.label")),n.oc("ngModel",i.mailSignatureModel.title),n.Db(8),n.oc("ngIf",-1==i.mailSignatureModel.selected),n.Db(1),n.oc("ngIf",-1!=i.mailSignatureModel.selected),n.Db(1),n.oc("ngIf",-1!=i.mailSignatureModel.selected),n.Db(1),n.oc("ngIf",-1!=i.mailSignatureModel.selected),n.Db(2),n.oc("ngForOf",i.user.emailSignatures),n.Db(6),n.Sc(" ",n.jc(102,100,"lang.mySignSignatureBook")," "),n.Db(2),n.oc("ngIf",!i.appService.getViewMode()),n.Db(2),n.Ib("dndFileHighlighted",i.highlightMe),n.pc("matTooltip",n.jc(106,102,"lang.uploadSignFileInfo")),n.Db(2),n.Sc(" ",n.jc(108,104,"lang.uploadSignFile")," "),n.Db(6),n.pc("title",n.jc(114,106,"lang.label")),n.pc("placeholder",n.jc(115,108,"lang.label")),n.oc("ngModel",i.signatureModel.label),n.Db(6),n.oc("ngClass",n.vc(138,Ci,""!=i.signatureModel.size?"col-md-10":"col-md-12")),n.Db(2),n.Sc(" ",n.jc(122,110,"lang.clickOn")," "),n.Db(4),n.oc("ngIf",i.signatureModel.size),n.Db(3),n.oc("disabled",!t.form.valid||!i.signatureModel.size),n.Db(1),n.Rc(n.jc(130,112,"lang.save")),n.Db(4),n.oc("ngForOf",i.user.signatures),n.Db(2),n.oc("ngIf",i.user.signatures.length>0),n.Db(6),n.Sc(" ",n.jc(142,114,"lang.myContactsGroups")," "),n.Db(2),n.oc("ngIf",!i.appService.getViewMode()),n.Db(1),n.oc("selectedIndex",i.selectedIndexContactsGrp),n.Db(1),n.pc("label",n.jc(146,116,"lang.contactGroupList")),n.Db(8),n.Rc(n.jc(154,118,"lang.contactGroupCreate")),n.Db(7),n.pc("title",n.jc(161,120,"lang.label")),n.pc("placeholder",n.jc(162,122,"lang.label")),n.oc("ngModel",i.contactsGroup.label),n.Db(6),n.pc("title",n.jc(167,124,"lang.description")),n.pc("placeholder",n.jc(168,126,"lang.description")),n.oc("ngModel",i.contactsGroup.description),n.Db(5),n.pc("title",n.jc(172,128,"lang.contactsGroupDesc")),n.oc("ngModel",i.contactsGroup.public),n.Db(2),n.Sc(" ",n.jc(174,130,"lang.public"),""),n.Db(4),n.oc("disabled",!e.form.valid),n.Db(1),n.Rc(n.jc(179,132,"lang.save")),n.Db(6),n.pc("placeholder",n.jc(185,134,"lang.filterBy")),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",5),n.Db(2),n.oc("dataSource",i.dataSourceGroupsList),n.Db(20),n.oc("matHeaderRowDef",i.displayedColumnsGroupsList),n.Db(1),n.oc("matRowDefColumns",i.displayedColumnsGroupsList),n.Db(1),n.oc("ngIf",i.contactsListMode),n.Db(2),n.pc("label",n.jc(214,136,"lang.myHistoric"))}}function Jn(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item"),n.Rb(1,"mat-icon",249),n.Wb(2,"h4",17),n.Qc(3),n.Vb(),n.Wb(4,"p",17),n.Wb(5,"mat-form-field",250),n.Wb(6,"input",251),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.role=i})),n.ic(7,"translate"),n.ic(8,"translate"),n.Vb(),n.Wb(9,"mat-hint",252),n.ic(10,"translate"),n.Qc(11),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(3),n.Rc(t.group_desc),n.Db(3),n.pc("title",n.jc(7,6,"lang.role")),n.pc("placeholder",n.jc(8,8,"lang.role")),n.oc("ngModel",t.role),n.Db(3),n.pc("matTooltip",n.jc(10,10,"lang.perimeter")),n.Db(2),n.Rc(t.maarch_comment)}}function Zn(t,e){1&t&&n.Rb(0,"mat-icon",257)}function ta(t,e){1&t&&n.Rb(0,"mat-icon",258)}function ea(t,e){1&t&&(n.Wb(0,"span",163),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.primary")))}const ia=function(t){return{"font-weight":t}};function na(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item"),n.Oc(1,Zn,1,0,"mat-icon",253),n.Oc(2,ta,1,0,"mat-icon",254),n.Wb(3,"h4",255),n.Qc(4),n.Oc(5,ea,3,3,"span",256),n.Vb(),n.Wb(6,"p",17),n.Wb(7,"mat-form-field",250),n.Wb(8,"input",251),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.user_role=i})),n.ic(9,"translate"),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf","Y"==t.primary_entity),n.Db(1),n.oc("ngIf","Y"!=t.primary_entity),n.Db(1),n.pc("matTooltip",t.entity_label),n.oc("ngStyle",n.vc(13,ia,"Y"==t.primary_entity?"bold":"normal")),n.Db(1),n.Sc(" ",t.entity_label," "),n.Db(1),n.oc("ngIf","Y"==t.primary_entity),n.Db(3),n.pc("title",n.jc(9,9,"lang.role")),n.pc("placeholder",n.jc(10,11,"lang.role")),n.oc("ngModel",t.user_role)}}let aa=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c,l,h){this.translate=t,this.http=e,this.zone=i,this.notify=n,this.dialog=a,this._formBuilder=s,this.authService=o,this.headerService=r,this.appService=c,this.viewContainerRef=l,this.functions=h,this.highlightMe=!1,this.user={baskets:[]},this.histories=[],this.passwordModel={currentPassword:"",newPassword:"",reNewPassword:""},this.ruleText="",this.validPassword=!1,this.matchPassword=!1,this.hidePassword=!0,this.passwordRules={minLength:{enabled:!1,value:0},complexityUpper:{enabled:!1,value:0},complexityNumber:{enabled:!1,value:0},complexitySpecial:{enabled:!1,value:0},renewal:{enabled:!1,value:0},historyLastUse:{enabled:!1,value:0}},this.signatureModel={base64:"",base64ForJs:"",name:"",type:"",size:0,label:""},this.mailSignatureModel={selected:-1,htmlBody:"",title:""},this.userAbsenceModel=[],this.basketsToRedirect=[],this.showPassword=!1,this.selectedSignature=-1,this.selectedSignatureLabel="",this.loading=!1,this.selectedIndex=0,this.selectedIndexContactsGrp=0,this.loadingSign=!1,this.selectionBaskets=new O.c(!0,[]),this.myBasketExpansionPanel=!1,this.contactsGroups=[],this.displayedColumnsGroupsList=["label","description","nbContacts","public","actions"],this.contactsGroup={public:!1},this.initAutoCompleteContact=!0,this.searchTerm=new X.i,this.searchResult=[],this.displayedColumnsContactsListAutocomplete=["select","contact","address"],this.selection=new O.c(!0,[]),this.contactsListMode=!1,this.contactsList=[],this.displayedColumnsContactsList=["contact","address","actions"],this.displayedColumns=["event_date","record_id","info"],window.angularProfileComponent={componentAfterUpload:t=>this.processAfterUpload(t)},this.searchTerm.valueChanges.pipe(Object(pt.a)(500),Object(d.a)(t=>t.length>2),Object(bt.a)(),Object(ft.a)(t=>this.http.get("../rest/autocomplete/contacts",{params:{search:t}}))).subscribe(t=>{this.searchResult=t,this.dataSourceContactsListAutocomplete=new vt.p(this.searchResult),this.dataSourceContactsListAutocomplete.paginator=this.paginatorGroupsListAutocomplete}),this.http.get("../rest/documentEditors").pipe(Object(mt.a)(t=>{this.editorsList=t})).subscribe()}masterToggleBaskets(t){t.checked?this.user.baskets.forEach(t=>{t.userToDisplay||this.selectionBaskets.select(t)}):this.selectionBaskets.clear()}applyFilterGroupsList(t){t=(t=t.trim()).toLowerCase(),this.dataSourceGroupsList.filter=t}masterToggle(t){t.checked?this.dataSourceContactsListAutocomplete.data.forEach(t=>{$("#check_"+t.id+"-input").is(":disabled")||this.selection.select(t.id)}):this.selection.clear()}applyFilterContactsList(t){t=(t=t.trim()).toLowerCase(),this.dataSourceContactsList.filter=t}applyFilter(t){t=(t=t.trim()).toLowerCase(),this.dataSource.filter=t}initComponents(t){this.selectedIndex=t.index,2==t.index?(this.appService.getViewMode()||this.sidenavRight.open(),this.http.get("../rest/history/users/"+this.user.id).subscribe(t=>{this.histories=t.histories,setTimeout(()=>{this.dataSource=new vt.p(this.histories),this.dataSource.sortingDataAccessor=this.functions.listSortingDataAccessor,this.dataSource.paginator=this.paginatorHistory,this.dataSource.sort=this.sortHistory},0)},t=>{this.notify.error(t.error.errors)})):1==t.index?this.sidenavRight.close():this.appService.getViewMode()||this.sidenavRight.open()}initMce(){tinymce.remove("textarea"),tinymce.baseURL="../node_modules/tinymce",tinymce.suffix=".min",tinymce.init({selector:"textarea#emailSignature",statusbar:!1,language:this.translate.instant("lang.langISO").replace("-","_"),language_url:`../node_modules/tinymce-i18n/langs/${this.translate.instant("lang.langISO").replace("-","_")}.js`,height:"200",plugins:["textcolor"],external_plugins:{maarch_b64image:"../../src/frontend/plugins/tinymce/maarch_b64image/plugin.min.js"},menubar:!1,toolbar:"undo | bold italic underline | alignleft aligncenter alignright | maarch_b64image | forecolor",theme_buttons1_add:"fontselect,fontsizeselect",theme_buttons2_add_before:"cut,copy,paste,pastetext,pasteword,separator,search,replace,separator",theme_buttons2_add:"separator,insertdate,inserttime,preview,separator,forecolor,backcolor",theme_buttons3_add_before:"tablecontrols,separator",theme_buttons3_add:"separator,print,separator,ltr,rtl,separator,fullscreen,separator,insertlayer,moveforward,movebackward,absolut",theme_toolbar_align:"left",theme_advanced_toolbar_location:"top",theme_styles:"Header 1=header1;Header 2=header2;Header 3=header3;Table Row=tableRow1"})}initGroupsContact(){this.contactsListMode=!1,this.selectedIndexContactsGrp=0,this.http.get("../rest/contactsGroups").subscribe(t=>{this.contactsGroups=[],this.contactsGroup={public:!1,contacts:[]};let e=0;t.contactsGroups.forEach(t=>{t.owner==this.headerService.user.id&&(t.position=e,this.contactsGroups.push(t),e++)}),setTimeout(()=>{this.dataSourceGroupsList=new vt.p(this.contactsGroups),this.dataSourceGroupsList.paginator=this.paginatorGroupsList,this.dataSourceGroupsList.sort=this.sortGroupsList},0)},t=>{this.notify.handleErrors(t)})}contactsGroupSubmit(){this.http.post("../rest/contactsGroups",this.contactsGroup).subscribe(t=>{this.initGroupsContact(),this.notify.success(this.translate.instant("lang.contactsGroupAdded"))},t=>{this.notify.error(t.error.errors)})}updateGroupSubmit(){this.http.put("../rest/contactsGroups/"+this.contactsGroup.id,this.contactsGroup).subscribe(()=>{this.notify.success(this.translate.instant("lang.contactsGroupUpdated")),this.initGroupsContact()},t=>{this.notify.error(t.error.errors)})}deleteContactsGroup(t){var e=this.contactsGroups[t];confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.delete")+" \xab "+e.label+" \xbb")&&this.http.delete("../rest/contactsGroups/"+e.id).subscribe(()=>{this.contactsListMode=!1;var e=this.contactsGroups.length-1;this.contactsGroups[t]=this.contactsGroups[e],this.contactsGroups[t].position=t,this.contactsGroups.splice(e,1),this.dataSourceGroupsList=new vt.p(this.contactsGroups),this.dataSourceGroupsList.paginator=this.paginatorGroupsList,this.notify.success(this.translate.instant("lang.contactsGroupDeleted"))},t=>{this.notify.error(t.error.errors)})}loadContactsGroup(t){this.contactsListMode=!0,this.http.get("../rest/contactsGroups/"+t.id).subscribe(t=>{this.contactsGroup=t.contactsGroup,setTimeout(()=>{this.dataSourceContactsList=new vt.p(this.contactsGroup.contacts),this.dataSourceContactsList.paginator=this.paginatorContactsList,this.dataSourceContactsList.sort=this.sortContactsList,this.selectedIndexContactsGrp=1},0)})}saveContactsList(t){t.textContent=this.translate.instant("lang.loading")+"...",t.disabled=!0,this.http.post("../rest/contactsGroups/"+this.contactsGroup.id+"/contacts",{contacts:this.selection.selected}).subscribe(e=>{this.notify.success(this.translate.instant("lang.contactAdded")),this.selection.clear(),t.textContent=this.translate.instant("lang.add"),this.contactsGroup=e.contactsGroup,setTimeout(()=>{this.dataSourceContactsList=new vt.p(this.contactsGroup.contacts),this.dataSourceContactsList.paginator=this.paginatorContactsList,this.dataSourceContactsList.sort=this.sortContactsList},0)},t=>{this.notify.error(t.error.errors)})}preDelete(t){confirm(this.translate.instant("lang.reallyWantToDeleteContactFromGroup"))&&this.removeContact(this.contactsGroup.contacts[t],t)}removeContact(t,e){this.http.delete("../rest/contactsGroups/"+this.contactsGroup.id+"/contacts/"+t.id).subscribe(()=>{var t=this.contactsGroup.contacts.length-1;this.contactsGroup.contacts[e]=this.contactsGroup.contacts[t],this.contactsGroup.contacts[e].position=e,this.contactsGroup.contacts.splice(t,1),this.dataSourceContactsList=new vt.p(this.contactsGroup.contacts),this.dataSourceContactsList.paginator=this.paginatorContactsList,this.dataSourceContactsList.sort=this.sortContactsList,this.notify.success(this.translate.instant("lang.contactDeletedFromGroup"))},t=>{this.notify.error(t.error.errors)})}launchLoading(){this.searchTerm.value.length>2&&(this.dataSourceContactsListAutocomplete=null,this.initAutoCompleteContact=!1)}isInGrp(t){let e=!1;return this.contactsGroup.contacts.forEach(i=>{i.id==t.id&&(e=!0)}),e}selectContact(t){$("#check_"+t+"-input").is(":disabled")||this.selection.toggle(t)}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.myProfile")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,this.http.get("../rest/currentUser/profile").subscribe(t=>{this.user=t,this.user.baskets.forEach((t,e)=>{this.user.baskets[e].disabled=!1,this.user.redirectedBaskets.forEach(i=>{t.basket_id==i.basket_id&&t.basket_owner==i.basket_owner&&(this.user.baskets[e].disabled=!0)})}),this.loading=!1})}processAfterUpload(t){this.zone.run(()=>this.resfreshUpload(t))}resfreshUpload(t){this.signatureModel.size<=2e6?(this.signatureModel.base64=t.replace(/^data:.*?;base64,/,""),this.signatureModel.base64ForJs=t):(this.signatureModel.name="",this.signatureModel.size=0,this.signatureModel.type="",this.signatureModel.base64="",this.signatureModel.base64ForJs="",this.notify.error("Taille maximum de fichier d\xe9pass\xe9e (2 MB)"))}displayPassword(){this.showPassword=!this.showPassword}clickOnUploader(t){$("#"+t).click()}uploadSignatureTrigger(t){if(t.target.files&&t.target.files[0]){var e=new FileReader;this.signatureModel.name=t.target.files[0].name,this.signatureModel.size=t.target.files[0].size,this.signatureModel.type=t.target.files[0].type,""==this.signatureModel.label&&(this.signatureModel.label=this.signatureModel.name),e.readAsDataURL(t.target.files[0]),e.onload=t=>{window.angularProfileComponent.componentAfterUpload(t.target.result),this.submitSignature()}}}dndUploadSignature(t){if(t.mouseEvent.dataTransfer.files&&t.mouseEvent.dataTransfer.files[0]){var e=new FileReader;this.signatureModel.name=t.mouseEvent.dataTransfer.files[0].name,this.signatureModel.size=t.mouseEvent.dataTransfer.files[0].size,this.signatureModel.type=t.mouseEvent.dataTransfer.files[0].type,""==this.signatureModel.label&&(this.signatureModel.label=this.signatureModel.name),e.readAsDataURL(t.mouseEvent.dataTransfer.files[0]),e.onload=t=>{window.angularProfileComponent.componentAfterUpload(t.target.result),this.submitSignature()}}}displaySignatureEditionForm(t){this.selectedSignature=t,this.selectedSignatureLabel=this.user.signatures[t].signature_label}changeEmailSignature(t){this.mailSignatureModel.selected=t,tinymce.get("emailSignature").setContent(this.user.emailSignatures[t].html_body),this.mailSignatureModel.title=this.user.emailSignatures[t].title}resetEmailSignature(){this.mailSignatureModel.selected=-1,tinymce.get("emailSignature").setContent(""),this.mailSignatureModel.title=""}addBasketRedirection(t){let e=[];this.selectionBaskets.selected.forEach(i=>{e.push({actual_user_id:t.serialId,basket_id:i.basket_id,group_id:i.groupSerialId,originalOwner:null})}),confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.redirectBasket"))&&this.http.post("../rest/users/"+this.user.id+"/redirectedBaskets",e).subscribe(t=>{this.user.baskets=t.baskets,this.user.redirectedBaskets=t.redirectedBaskets,this.selectionBaskets.clear(),this.notify.success(this.translate.instant("lang.basketUpdated"))},t=>{this.notify.error(t.error.errors)})}delBasketRedirection(t,e){confirm(this.translate.instant("lang.confirmAction"))&&this.http.delete("../rest/users/"+this.user.id+"/redirectedBaskets?redirectedBasketIds[]="+t.id).subscribe(t=>{this.user.baskets=t.baskets,this.user.redirectedBaskets.splice(e,1),this.notify.success(this.translate.instant("lang.basketUpdated"))},t=>{this.notify.error(t.error.errors)})}delBasketAssignRedirection(t,e){confirm(this.translate.instant("lang.confirmAction"))&&this.http.delete("../rest/users/"+this.user.id+"/redirectedBaskets?redirectedBasketIds[]="+t.id).subscribe(t=>{this.user.baskets=t.baskets,this.user.assignedBaskets.splice(e,1),this.notify.success(this.translate.instant("lang.basketUpdated"))},t=>{this.notify.error(t.error.errors)})}reassignBasketRedirection(t,e,i){confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.redirectBasket"))&&this.http.post("../rest/users/"+this.user.id+"/redirectedBaskets",[{actual_user_id:t.serialId,basket_id:e.basket_id,group_id:e.group_id,originalOwner:e.owner_user_id}]).subscribe(t=>{this.user.baskets=t.baskets,this.user.assignedBaskets.splice(i,1),this.notify.success(this.translate.instant("lang.basketUpdated"))},t=>{this.notify.error(t.error.errors)})}updateBasketColor(t,e){this.http.put("../rest/currentUser/groups/"+this.user.regroupedBaskets[t].groupSerialId+"/baskets/"+this.user.regroupedBaskets[t].baskets[e].basket_id,{color:this.user.regroupedBaskets[t].baskets[e].color}).subscribe(t=>{this.user.regroupedBaskets=t.userBaskets,this.notify.success(this.translate.instant("lang.modificationSaved"))},t=>{this.notify.error(t.error.errors)})}activateAbsence(){confirm(this.translate.instant("lang.confirmToBeAbsent"))&&this.http.put("../rest/users/"+this.user.id+"/status",{status:"ABS"}).subscribe(()=>{this.authService.logout()},t=>{this.notify.error(t.error.errors)})}askRedirectBasket(){this.myBasketExpansionPanel=!1,this.viewPanels.forEach(t=>t.close()),confirm(this.translate.instant("lang.askRedirectBasketBeforeAbsence"))?(this.selectedIndex=1,setTimeout(()=>{this.myBasketExpansionPanel=!0},0)):this.activateAbsence()}updatePassword(){this.passwordModel.currentPassword=this.firstFormGroup.controls.currentPasswordCtrl.value,this.passwordModel.newPassword=this.firstFormGroup.controls.newPasswordCtrl.value,this.passwordModel.reNewPassword=this.firstFormGroup.controls.retypePasswordCtrl.value,this.http.put("../rest/users/"+this.user.id+"/password",this.passwordModel).subscribe(t=>{this.showPassword=!1,this.passwordModel={currentPassword:"",newPassword:"",reNewPassword:""},this.notify.success(this.translate.instant("lang.passwordUpdated"))},t=>{this.notify.error(t.error.errors)})}submitEmailSignature(){this.mailSignatureModel.htmlBody=tinymce.get("emailSignature").getContent(),this.http.post("../rest/currentUser/emailSignature",this.mailSignatureModel).subscribe(t=>{t.errors?this.notify.error(t.errors):(this.user.emailSignatures=t.emailSignatures,this.mailSignatureModel={selected:-1,htmlBody:"",title:""},tinymce.get("emailSignature").setContent(""),this.notify.success(this.translate.instant("lang.emailSignatureAdded")))})}updateEmailSignature(){this.mailSignatureModel.htmlBody=tinymce.get("emailSignature").getContent(),this.http.put("../rest/currentUser/emailSignature/"+this.user.emailSignatures[this.mailSignatureModel.selected].id,this.mailSignatureModel).subscribe(t=>{t.errors?this.notify.error(t.errors):(this.user.emailSignatures[this.mailSignatureModel.selected].title=t.emailSignature.title,this.user.emailSignatures[this.mailSignatureModel.selected].html_body=t.emailSignature.html_body,this.notify.success(this.translate.instant("lang.emailSignatureUpdated")))})}deleteEmailSignature(){confirm(this.translate.instant("lang.confirmDeleteMailSignature"))&&this.http.delete("../rest/currentUser/emailSignature/"+this.user.emailSignatures[this.mailSignatureModel.selected].id).subscribe(t=>{t.errors?this.notify.error(t.errors):(this.user.emailSignatures=t.emailSignatures,this.mailSignatureModel={selected:-1,htmlBody:"",title:""},tinymce.get("emailSignature").setContent(""),this.notify.success(this.translate.instant("lang.emailSignatureDeleted")))})}submitSignature(){this.http.post("../rest/users/"+this.user.id+"/signatures",this.signatureModel).subscribe(t=>{this.user.signatures=t.signatures,this.signatureModel={base64:"",base64ForJs:"",name:"",type:"",size:0,label:""},this.notify.success(this.translate.instant("lang.signatureAdded"))},t=>{this.notify.error(t.error.errors)})}updateSignature(t){this.http.put("../rest/users/"+this.user.id+"/signatures/"+t.id,{label:t.signature_label}).subscribe(t=>{this.notify.success(this.translate.instant("lang.signatureUpdated"))},t=>{this.notify.error(t.error.errors)})}deleteSignature(t){confirm(this.translate.instant("lang.confirmDeleteSignature"))&&this.http.delete("../rest/users/"+this.user.id+"/signatures/"+t).subscribe(t=>{this.user.signatures=t.signatures,this.notify.success(this.translate.instant("lang.signatureDeleted"))},t=>{this.notify.error(t.error.errors)})}onSubmit(){this.http.put("../rest/currentUser/profile",this.user).subscribe(()=>{this.notify.success(this.translate.instant("lang.modificationSaved")),this.headerService.user.firstname=this.user.firstname,this.headerService.user.lastname=this.user.lastname},t=>{this.notify.error(t.error.errors)})}updateUserPreferences(){this.http.put("../rest/currentUser/profile/preferences",{documentEdition:this.user.preferences.documentEdition}).subscribe(()=>{this.notify.success(this.translate.instant("lang.modificationSaved")),this.headerService.resfreshCurrentUser()},t=>{this.notify.error(t.error.errors)})}regexValidator(t,e){return i=>i.value?t.test(i.value)?null:e:null}changePasswd(){this.http.get("../rest/passwordRules").subscribe(t=>{let e=[],i=[],n=[];e.push(X.I.required),t.rules.forEach(t=>{"minLength"==t.label?(this.passwordRules.minLength.enabled=t.enabled,this.passwordRules.minLength.value=t.value,t.enabled&&(e.push(X.I.minLength(this.passwordRules.minLength.value)),i.push(t.value+" "+this.translate.instant("lang.password"+t.label)))):"complexityUpper"==t.label?(this.passwordRules.complexityUpper.enabled=t.enabled,this.passwordRules.complexityUpper.value=t.value,t.enabled&&(e.push(this.regexValidator(new RegExp("[A-Z]"),{complexityUpper:""})),i.push(this.translate.instant("lang.password"+t.label)))):"complexityNumber"==t.label?(this.passwordRules.complexityNumber.enabled=t.enabled,this.passwordRules.complexityNumber.value=t.value,t.enabled&&(e.push(this.regexValidator(new RegExp("[0-9]"),{complexityNumber:""})),i.push(this.translate.instant("lang.password"+t.label)))):"complexitySpecial"==t.label?(this.passwordRules.complexitySpecial.enabled=t.enabled,this.passwordRules.complexitySpecial.value=t.value,t.enabled&&(e.push(this.regexValidator(new RegExp("[^A-Za-z0-9]"),{complexitySpecial:""})),i.push(this.translate.instant("lang.password"+t.label)))):"renewal"==t.label?(this.passwordRules.renewal.enabled=t.enabled,this.passwordRules.renewal.value=t.value,t.enabled&&n.push(this.translate.instant("lang.password"+t.label)+" <b>"+t.value+" "+this.translate.instant("lang.days")+"</b>. "+this.translate.instant("lang.password2"+t.label)+".")):"historyLastUse"==t.label&&(this.passwordRules.historyLastUse.enabled=t.enabled,this.passwordRules.historyLastUse.value=t.value,t.enabled&&n.push(this.translate.instant("lang.passwordhistoryLastUseDesc")+" <b>"+t.value+"</b> "+this.translate.instant("lang.passwordhistoryLastUseDesc2")+"."))}),this.ruleText=i.join(", "),this.otherRuleText=n.join("<br/>"),this.firstFormGroup.controls.newPasswordCtrl.setValidators(e)},t=>{this.notify.error(t.error.errors)}),this.firstFormGroup=this._formBuilder.group({newPasswordCtrl:[""],retypePasswordCtrl:["",X.I.compose([X.I.required])],currentPasswordCtrl:["",X.I.compose([X.I.required])]},{validator:this.matchValidator}),this.validPassword=!1,this.firstFormGroup.controls.currentPasswordCtrl.setErrors(null),this.firstFormGroup.controls.newPasswordCtrl.setErrors(null),this.firstFormGroup.controls.retypePasswordCtrl.setErrors(null),this.selectedIndex=0,this.showPassword=!0}matchValidator(t){return t.controls.newPasswordCtrl.value!=t.controls.retypePasswordCtrl.value&&(t.controls.retypePasswordCtrl.setErrors({mismatch:!0}),{mismatch:!0})}getErrorMessage(){return this.firstFormGroup.controls.retypePasswordCtrl.setErrors(this.firstFormGroup.controls.newPasswordCtrl.value!=this.firstFormGroup.controls.retypePasswordCtrl.value?{mismatch:!0}:null),this.firstFormGroup.controls.newPasswordCtrl.hasError("required")?this.translate.instant("lang.requiredField")+" !":this.firstFormGroup.controls.newPasswordCtrl.hasError("minlength")&&this.passwordRules.minLength.enabled?this.passwordRules.minLength.value+" "+this.translate.instant("lang.passwordminLength")+" !":null!=this.firstFormGroup.controls.newPasswordCtrl.errors&&void 0!==this.firstFormGroup.controls.newPasswordCtrl.errors.complexityUpper&&this.passwordRules.complexityUpper.enabled?this.translate.instant("lang.passwordcomplexityUpper")+" !":null!=this.firstFormGroup.controls.newPasswordCtrl.errors&&void 0!==this.firstFormGroup.controls.newPasswordCtrl.errors.complexityNumber&&this.passwordRules.complexityNumber.enabled?this.translate.instant("lang.passwordcomplexityNumber")+" !":null!=this.firstFormGroup.controls.newPasswordCtrl.errors&&void 0!==this.firstFormGroup.controls.newPasswordCtrl.errors.complexitySpecial&&this.passwordRules.complexitySpecial.enabled?this.translate.instant("lang.passwordcomplexitySpecial")+" !":(this.firstFormGroup.controls.newPasswordCtrl.setErrors(null),this.validPassword=!0,"")}showActions(t){$("#"+t.basket_id+"_"+t.group_id).show()}hideActions(t){$("#"+t.basket_id+"_"+t.group_id).hide()}toggleAddGrp(){this.initGroupsContact(),$("#contactsGroupFormUp").toggle(),$("#contactsGroupList").toggle()}toggleAddContactGrp(){$("#contactsGroupFormAdd").toggle()}changeTabContactGrp(t){this.selectedIndexContactsGrp=t,0==t&&this.initGroupsContact()}syncMP(){this.loadingSign=!0,this.http.put("../rest/users/"+this.user.id+"/externalSignatures",{}).subscribe(t=>{this.loadingSign=!1,this.notify.success(this.translate.instant("lang.signsSynchronized"))},t=>{this.loadingSign=!1,this.notify.handleErrors(t)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(n.C),n.Qb(D.a),n.Qb(q.b),n.Qb(X.h),n.Qb(_.a),n.Qb(y.a),n.Qb(w.a),n.Qb(n.T),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(oi,!0),n.Kc(ri,!0),n.Xc(ci,!0),n.Xc(li,!0),n.Xc(di,!0),n.Xc(hi,!0),n.Xc(ui,!0),n.Xc(pi,!0),n.Xc(bi,!0),n.Xc(gt.c,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginatorGroupsList=i.first),n.yc(i=n.ec())&&(e.sortGroupsList=i.first),n.yc(i=n.ec())&&(e.paginatorGroupsListAutocomplete=i.first),n.yc(i=n.ec())&&(e.paginatorContactsList=i.first),n.yc(i=n.ec())&&(e.sortContactsList=i.first),n.yc(i=n.ec())&&(e.paginatorHistory=i.first),n.yc(i=n.ec())&&(e.sortHistory=i.first),n.yc(i=n.ec())&&(e.viewPanels=i))},decls:27,vars:19,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["fixedTopGap","56","position","end",2,"overflow-x","hidden","max-width","500px",3,"mode","fixedInViewport","opened"],["snav2",""],["mat-subheader",""],[4,"ngFor","ngForOf"],["mat-list-item","",3,"click"],["color","warn","mat-list-icon","",1,"fa","fa-plane"],["mat-line",""],["mat-list-item","",3,"click",4,"ngIf"],["color","primary","mat-list-icon","",1,"fa","fa-key"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[3,"selectedIndex","selectedTabChange"],[3,"label"],["style","margin-bottom: 5%",4,"ngIf"],["class","form-horizontal",3,"ngSubmit",4,"ngIf"],["color","primary",1,"fa","fa-file-word",2,"font-size","25px","width","50px"],[4,"ngIf"],[1,"col-sm-12","col-md-4",2,"line-height","50px"],[1,"col-sm-12","col-md-8"],["name","documentEdition",3,"ngModel","ngModelChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["color","primary",1,"fa","fa-inbox",2,"font-size","25px","width","50px"],["color","primary",1,"fa","fa-magic",2,"position","absolute","margin-left","30px","margin-top","-10px"],[3,"expanded"],["color","primary",1,"fa","fa-reply",2,"position","absolute","margin-left","30px","margin-top","-10px"],[1,"col-sm-6",2,"overflow","hidden"],["mat-list-icon","","color","primary"],["color","primary",3,"checked","matTooltip","change"],["style","opacity: 0.5;font-style: italic;font-size: 80%;",4,"ngIf"],["appearance","outline",3,"labelPlaceholder","routeDatas","targetSearchKey","subInfoKey","disableItems","triggerEvent",4,"ngIf"],[2,"clear","both"],[3,"opened"],["color","primary",1,"fa","fa-envelope",2,"font-size","25px","width","50px"],[3,"ngSubmit"],["emailSignatureForm","ngForm"],[1,"row",2,"margin-top","5px"],[1,"col-md-12"],["matInput","","type","text","name","title","required","",3,"ngModel","placeholder","ngModelChange"],["id","html_mode",2,"display","block","width","100%"],["name","emailSignature","id","emailSignature","rows","15","cols","60",2,"width","100%"],[1,"col-md-12","form-group",2,"margin-top","10px"],[2,"text-align","center"],["mat-raised-button","","color","primary","type","submit",3,"disabled",4,"ngIf"],["mat-raised-button","","color","primary","type","button",3,"disabled","click",4,"ngIf"],["mat-raised-button","","color","warn","type","button",3,"click",4,"ngIf"],["mat-raised-button","","color","default","type","button",3,"click",4,"ngIf"],["class","col-md-6 col-sm-6 col-xm-12",4,"ngFor","ngForOf"],["color","primary",1,"fa","fa-certificate",2,"font-size","25px","width","50px"],[2,"overflow","hidden"],["dnd-droppable","",1,"dndFile",3,"matTooltip","click","dragover","dragleave","onDropSuccess"],[2,"display","none",3,"ngSubmit"],["signatureForm","ngForm"],["matInput","","type","text","id","signature_label","name","signature_label","required","",3,"title","placeholder","ngModel","ngModelChange"],[1,"form-inline","hide"],[1,"form-group"],["type","file","name","files[]","id","uploadSignFile","accept","image/*",3,"change"],[3,"ngClass"],[1,"upload-drop-zone",2,"cursor","pointer",3,"click"],[1,"fa","fa-upload","fa-2x"],["class","col-md-2",4,"ngIf"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],[2,"display","flex","align-items","flex-start"],[2,"flex","1","overflow","hidden"],["class","col-md-4 col-sm-4 col-xm-6",4,"ngFor","ngForOf"],["mat-icon-button","","color","primary",3,"matTooltip","disabled","click",4,"ngIf"],["color","primary",1,"fa","fa-users",2,"font-size","25px","width","50px"],[3,"selectedIndex","selectedIndexChange"],["createGrpContPan",""],["color","primary"],[2,"margin-top","5px"],["id","contactsGroupFormUp",1,"form-horizontal",3,"ngSubmit"],["contactsGroupFormUp","ngForm"],[1,"col-sm-12"],["matInput","","required","","name","label","id","label","type","text","maxlength","32",3,"ngModel","title","placeholder","ngModelChange"],["matInput","","required","","name","description","id","description","type","text","maxlength","255",3,"ngModel","title","placeholder","ngModelChange"],["name","plubic","id","plubic","color","primary",3,"title","ngModel","ngModelChange"],[1,"col-sm-12",2,"text-align","center"],["id","contactsGroupList",2,"margin-top","10px"],[1,"row"],[1,"col-md-6","col-xs-6"],["matInput","",3,"placeholder","keyup"],[3,"length","hidePageSize","pageSize"],["paginatorGroupsList",""],["matSort","","matSortActive","label","matSortDirection","asc",3,"dataSource"],["tableGroupsListSort","matSort"],["matColumnDef","label"],["mat-sort-header","","style","flex:2;",3,"hide-for-mobile",4,"matHeaderCellDef"],["style","flex:2;",3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","description"],["mat-sort-header","","style","flex:2;",4,"matHeaderCellDef"],["style","flex:2;",4,"matCellDef"],["matColumnDef","nbContacts"],["mat-sort-header","","style","flex:1;",4,"matHeaderCellDef"],["style","flex:1;",4,"matCellDef"],["matColumnDef","public"],["mat-sort-header","","style","flex:1;",3,"hide-for-mobile",4,"matHeaderCellDef"],["style","flex:1;",3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","owner"],["matColumnDef","actions"],[4,"matHeaderCellDef"],["style","justify-content: flex-end;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"matTooltip","click",4,"matRowDef","matRowDefColumns"],[3,"label",4,"ngIf"],["matTabContent",""],[2,"margin-bottom","5%"],[3,"formGroup"],[2,"padding","10px"],["matInput","","formControlName","currentPasswordCtrl","required","",3,"placeholder","type"],["matSuffix","",1,"fa","fa-2x",3,"ngClass","click"],[2,"text-align","center","color","rgba(0,0,0,0.54)","font-size","75%"],[1,"col-sm-6",2,"padding-left","0px","padding-right","0px"],["matInput","","formControlName","newPasswordCtrl","required","",3,"placeholder","type"],["inputPasswd",""],["matInput","","required","","formControlName","retypePasswordCtrl",3,"placeholder","type"],["inputPasswd2",""],["class","form-group",4,"ngIf"],["mat-raised-button","","color","primary","type","button",3,"disabled","click"],["mat-raised-button","","color","default","type","button",3,"click"],["color","accent",1,"fa","fa-check"],["color","accent"],[1,"col-sm-12",2,"padding-left","0px","padding-right","0px"],["role","alert",1,"alert","alert-warning",2,"text-align","center",3,"innerHTML"],[1,"form-horizontal",3,"ngSubmit"],["profileForm","ngForm"],[1,"pull-left"],[1,"avatar",2,"font-size","90px","text-align","center"],[1,"fa","fa-user",2,"font-size","90px","padding-top","5px"],[1,"input-group"],["matInput","","type","text","disabled","",3,"title","value","placeholder"],[1,"col-sm-5",2,"font-weight","bold"],["matInput","","type","text","id","lastname","name","lastname","required","",3,"title","placeholder","ngModel","ngModelChange"],["matInput","","type","text","id","firstname","name","firstname","required","",3,"title","placeholder","ngModel","ngModelChange"],[1,"col-sm-2",2,"font-style","italic"],["matInput","","type","text","id","initials","name","initials",3,"title","placeholder","ngModel","ngModelChange"],["matInput","","type","tel","id","phone","name","phone","pattern","\\+?((|\\ |\\.|\\(|\\)|\\-)?(\\d)*)*\\d$",3,"title","placeholder","ngModel","ngModelChange"],["matInput","","type","email","id","mail","name","mail","pattern","(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$)","required","",3,"title","placeholder","ngModel","ngModelChange"],[1,"form-group",2,"margin-top","10px"],[3,"value"],["mat-list-icon","",1,"fa","fa-inbox",3,"ngStyle"],["mat-line","",3,"title"],["name","color","type","color",2,"background","none","border","none","height","20px","width","20px","padding","0","margin-right","15px",3,"ngModel","ngModelChange","change"],[2,"cursor","pointer","color","#666666",3,"title","click"],[1,"fa","fa-magic"],[2,"opacity","0.5","font-style","italic","font-size","80%"],["appearance","outline",3,"labelPlaceholder","routeDatas","targetSearchKey","subInfoKey","disableItems","triggerEvent"],["style","cursor: pointer;",3,"mouseover","mouseout",4,"ngIf"],[2,"cursor","pointer",3,"mouseover","mouseout"],["mat-list-icon","","color","primary",4,"ngIf"],["mat-line","","color","primary",2,"display","flex","align-items","center"],[2,"flex","2","overflow","hidden","text-overflow","ellipsis",3,"matTooltip","click"],[1,"label","label-primary",2,"font-weight","normal"],["color","primary",3,"checked","click","change"],["mat-list-icon","","color","primary",1,"fa","fa-paper-plane",2,"margin-top","-60px"],["mat-line","","color","primary"],["type","text","color","warn","matInput","","disabled","",3,"value"],["mat-button","","color","warn","matSuffix","","mat-icon-button","","aria-label","Clear",3,"matTooltip","click"],["color","warn",1,"fa","fa-times","text-danger"],["mat-list-icon","","color","primary",1,"fa","fa-reply",2,"margin-top","-60px"],["mat-line","","color","primary",3,"click"],["color","primary",1,"fa","fa-edit"],["mat-raised-button","","color","warn","type","button",3,"click"],[1,"col-md-6","col-sm-6","col-xm-12"],[2,"margin-bottom","10px"],["floatLabel","never"],["matInput","","type","text","name","selectedEmailSignatureLabel","disabled","",3,"ngModel","placeholder","ngModelChange"],["mat-icon-button","","color","primary",3,"matTooltip","click"],[1,"fa","fa-edit","fa-2x"],[1,"col-md-2"],["id","signaturePreview","alt","Image non valide",2,"width","100%",3,"src"],[1,"col-md-4","col-sm-4","col-xm-6"],["matInput","","type","text","name","selectedSignatureLabel",3,"ngModel","placeholder","ngModelChange","change"],["mat-button","","matSuffix","","mat-icon-button","","color","warn",3,"matTooltip","click"],[1,"fa","fa-times"],["alt","Signature",2,"max-width","100%","height","60px",3,"src"],["mat-icon-button","","color","primary",3,"matTooltip","disabled","click"],[1,"fa","fa-sync-alt","fa-2x"],["mat-sort-header","",2,"flex","2"],[2,"flex","2"],["mat-sort-header","",2,"flex","1"],[2,"flex","1"],["color","primary","style","font-weight:bold;",4,"ngIf"],["color","primary",2,"font-weight","bold"],[2,"justify-content","flex-end"],["mat-icon-button","","color","warn",3,"matTooltip","click"],["aria-hidden","true",1,"fa","fa-trash-alt","fa-2x"],[2,"cursor","pointer",3,"matTooltip","click"],["linkContPan",""],["id","contactsGroupFormAdd"],[1,"row",2,"margin","0px"],[1,"col-md-8",2,"padding","5px"],["hintLabel","3 caract\xe8res minimum"],["matPrefix",""],["color","primary",1,"fa","fa-user-plus"],["type","text","matInput","","autocomplete","off","minlength","3",1,"autocompleteSearch",3,"placeholder","formControl","keyup"],["class","alert alert-danger",3,"innerHTML",4,"ngIf"],["paginatorGroupsListAutocomplete",""],["mode","indeterminate",4,"ngIf"],[3,"dataSource",4,"ngIf"],[2,"text-align","center","margin-top","30px"],["id","contactsGroup",2,"margin-top","20px"],[1,"col-sm-6"],["name","public","id","public","color","primary",3,"title","ngModel","ngModelChange"],["class","col-sm-6",4,"ngIf"],[1,"alert","alert-danger",3,"innerHTML"],["mode","indeterminate"],[3,"dataSource"],["tableContactList",""],["matColumnDef","select"],["style","flex:1;",4,"matHeaderCellDef"],["matColumnDef","contact"],["style","flex:3;",4,"matHeaderCellDef"],["style","flex:3;",4,"matCellDef"],["matColumnDef","address"],["style","cursor: pointer;",3,"ngStyle","click",4,"matRowDef","matRowDefColumns"],["color","primary",3,"checked","change"],["color","primary",3,"id","disabled","checked","click","change"],[2,"flex","3"],[2,"cursor","pointer",3,"ngStyle","click"],["paginatorContactsList",""],["matSort","","matSortActive","contact","matSortDirection","asc",3,"dataSource",4,"ngIf"],["matSort","","matSortActive","contact","matSortDirection","asc",3,"dataSource"],["tableContactsListSort","matSort"],["mat-sort-header","","style","flex:3;",4,"matHeaderCellDef"],["style","justify-content: flex-end;flex:1;",4,"matCellDef"],[4,"matRowDef","matRowDefColumns"],["mat-sort-header","",2,"flex","3"],[2,"justify-content","flex-end","flex","1"],["paginatorHistory",""],["matSort","","matSortActive","event_date","matSortDirection","desc",3,"dataSource"],["tableHistorySort","matSort"],["matColumnDef","event_date"],["mat-sort-header","",4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","record_id"],["matColumnDef","info"],["mat-sort-header",""],["color","primary","mat-list-icon","",1,"fa","fa-users"],[2,"font-size","10px"],["matInput","","type","text","id","role","name","role","disabled","",3,"title","placeholder","ngModel","ngModelChange"],[3,"matTooltip"],["color","primary","mat-list-icon","","class","fa fa-sitemap",4,"ngIf"],["color","primary","mat-list-icon","","class","fa fa-sitemap","style","position:relative;",4,"ngIf"],["mat-line","",3,"ngStyle","matTooltip"],["class","label label-primary","style","font-weight:normal",4,"ngIf"],["color","primary","mat-list-icon","",1,"fa","fa-sitemap"],["color","primary","mat-list-icon","",1,"fa","fa-sitemap",2,"position","relative"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,mi,10,7,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,gi,2,0,"div",9),n.Oc(14,Yn,216,140,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Wb(15,"mat-sidenav",11,12),n.Wb(17,"mat-list"),n.Wb(18,"h3",13),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Oc(21,Jn,12,12,"mat-list-item",14),n.Rb(22,"mat-divider"),n.Wb(23,"h3",13),n.Qc(24),n.ic(25,"translate"),n.Vb(),n.Oc(26,na,11,15,"mat-list-item",14),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",!e.appService.getViewMode()),n.Db(4),n.Rc(n.jc(20,15,"lang.groups")),n.Db(2),n.oc("ngForOf",e.user.groups),n.Db(3),n.Rc(n.jc(25,17,"lang.entities")),n.Db(2),n.oc("ngForOf",e.user.entities))},directives:[I.e,I.f,Ot,We,P.t,I.d,R.a,R.g,P.s,T.a,R.h,R.d,S.a,R.c,W.l,V.c,K.a,Te.c,Te.a,gt.a,gt.c,gt.g,gt.h,Y.c,ee.a,X.u,X.x,Y.f,j.a,A.b,X.K,X.v,X.w,J.b,X.d,X.F,Ee.d,P.q,k.b,X.p,te.a,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,Te.b,X.m,X.k,Y.j,Y.b,X.B,gt.f,W.p,P.w,ii,K.d,vt.h,Fe.b,vt.a,vt.j,vt.m,Y.i,X.q,X.j,ni.a],pipes:[g.d,P.b,si,P.f],styles:[".upload-drop-zone[_ngcontent-%COMP%]{font-size:16px;height:100px;border-width:2px;margin-bottom:20px;color:#ccc;border-style:dashed;border-color:#ccc;line-height:100px;text-align:center}.upload-drop-zone.drop[_ngcontent-%COMP%]{color:#222;border-color:#222}.avatar[_ngcontent-%COMP%]{text-decoration:none;background:#135f7f;color:#fff;width:100px;height:100px;border-radius:5px;display:block;overflow:hidden;margin:5px}"]}),t})();function sa(t,e){1&t&&(n.Wb(0,"div",10),n.Rb(1,"mat-spinner",11),n.Vb())}function oa(t,e){if(1&t&&(n.Wb(0,"mat-card",12),n.Wb(1,"div",13),n.Wb(2,"h3"),n.Qc(3),n.Vb(),n.Wb(4,"em"),n.Qc(5,"Version : "),n.Wb(6,"a",14),n.Qc(7),n.Vb(),n.Vb(),n.Rb(8,"hr"),n.Wb(9,"p"),n.Wb(10,"em"),n.Qc(11),n.ic(12,"translate"),n.Vb(),n.Vb(),n.Wb(13,"p"),n.Qc(14),n.ic(15,"translate"),n.Wb(16,"a",15),n.Qc(17,"licence GNU GPLv3"),n.Vb(),n.Qc(18,"."),n.Vb(),n.Wb(19,"div"),n.Wb(20,"ul"),n.Wb(21,"li"),n.Qc(22),n.ic(23,"translate"),n.Wb(24,"a",16),n.Qc(25,"https://maarch.com"),n.Vb(),n.Vb(),n.Wb(26,"li"),n.Qc(27),n.ic(28,"translate"),n.Wb(29,"a",17),n.Qc(30,"https://community.maarch.org"),n.Vb(),n.Vb(),n.Wb(31,"li"),n.Qc(32),n.ic(33,"translate"),n.Wb(34,"a",18),n.Qc(35,"https://docs.maarch.org"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(36,"p"),n.Qc(37,"\xa0"),n.Vb(),n.Wb(38,"h3"),n.Qc(39),n.ic(40,"translate"),n.Vb(),n.Rb(41,"hr"),n.Wb(42,"em"),n.Qc(43),n.ic(44,"translate"),n.Vb(),n.Wb(45,"p"),n.Qc(46,"\xa0"),n.Vb(),n.Wb(47,"ul"),n.Wb(48,"li"),n.Wb(49,"a",19),n.Qc(50,"Angular"),n.Vb(),n.Vb(),n.Wb(51,"li"),n.Wb(52,"a",20),n.Qc(53,"Angular Material"),n.Vb(),n.Vb(),n.Wb(54,"li"),n.Wb(55,"a",21),n.Qc(56,"Bootstrap"),n.Vb(),n.Vb(),n.Wb(57,"li"),n.Wb(58,"a",22),n.Qc(59,"Font Awesome"),n.Vb(),n.Vb(),n.Wb(60,"li"),n.Wb(61,"a",23),n.Qc(62,"Fpdf"),n.Vb(),n.Vb(),n.Wb(63,"li"),n.Wb(64,"a",24),n.Qc(65,"fpdi"),n.Vb(),n.Vb(),n.Wb(66,"li"),n.Wb(67,"a",25),n.Qc(68,"Jquery"),n.Vb(),n.Vb(),n.Wb(69,"li"),n.Wb(70,"a",26),n.Qc(71,"Jquery Typeahead"),n.Vb(),n.Vb(),n.Wb(72,"li"),n.Wb(73,"a",27),n.Qc(74,"log4php"),n.Vb(),n.Vb(),n.Wb(75,"li"),n.Wb(76,"a",28),n.Qc(77,"Pdfb"),n.Vb(),n.Vb(),n.Wb(78,"li"),n.Wb(79,"a",29),n.Qc(80,"Pdftotext"),n.Vb(),n.Vb(),n.Wb(81,"li"),n.Wb(82,"a",30),n.Qc(83,"Tiny But Strong"),n.Vb(),n.Vb(),n.Wb(84,"li"),n.Wb(85,"a",31),n.Qc(86,"TinyMCE"),n.Vb(),n.Vb(),n.Wb(87,"li"),n.Wb(88,"a",32),n.Qc(89,"Zend Lucene Search"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(90,"div",33),n.Wb(91,"h3"),n.Qc(92,"Cr\xe9dits"),n.Vb(),n.Rb(93,"hr"),n.Wb(94,"ul"),n.Wb(95,"li"),n.Qc(96,"Florian AZIZIAN, Damien BUREL, Bruno CARLIN, Carole COTIN, Prosper DE LAURE, Driss DEMIRAY, Ga\xebl DE VILLEBLANCHE, Emmanuel DILLARD, Mathieu DONZEL, Jean-Louis ERCOLANI, Claire FIGUERAS, Laurent GIOVANNONI, Guillaume HEURTIER, Henri QUENEAU, Kader KANE, Yves-Christian KPAKPO, Alexandre MORIN, S\xe9bastien NANABONDJA, Fod\xe9 NDIAYE, C\xe9dric NDOUMBA, Alex ORLUC, Alexis RAGOT, Alexandre STEFANOVIC, Serge THIERRY-MIEG, Cyril VAZQUEZ, Arnaud VEBER, Loic VINET"),n.Vb(),n.Rb(97,"br"),n.Wb(98,"li"),n.Wb(99,"em"),n.Qc(100),n.ic(101,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(102,"p"),n.Qc(103,"\xa0"),n.Vb(),n.Wb(104,"div",34),n.Rb(105,"mat-icon",35),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(3),n.Sc("Maarch Courrier ",t.applicationVersion," "),n.Db(3),n.qc("href","https://labs.maarch.org/maarch/MaarchCourrier/commit/",t.commitHash,"",n.Gc),n.Db(1),n.Rc(t.commitHash),n.Db(4),n.Sc("Copyright \xa9 2008-2020 Maarch SAS ",n.jc(12,11,"lang.groupeCompany"),""),n.Db(3),n.Sc("",n.jc(15,13,"lang.maarchLicence")," "),n.Db(8),n.Sc("",n.jc(23,15,"lang.officialWebsite")," : "),n.Db(5),n.Sc("",n.jc(28,17,"lang.community")," : "),n.Db(5),n.Sc("",n.jc(33,19,"lang.documentation")," : "),n.Db(7),n.Rc(n.jc(40,21,"lang.externalComponents")),n.Db(4),n.Rc(n.jc(44,23,"lang.thanksToExtDev")),n.Db(57),n.Rc(n.jc(101,25,"lang.thanksToCommunity"))}}let ra=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.loading=!1,this.commitHash=this.translate.instant("lang.undefined")}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.headerService.setHeader(this.translate.instant("lang.aboutUs")),this.applicationVersion=a.a.VERSION,this.loading=!1,yield this.loadCommitInformation()}))}loadCommitInformation(){return new Promise(t=>{this.http.get("../rest/commitInformation").pipe(Object(mt.a)(e=>{this.commitHash=null!==e.hash?e.hash:this.translate.instant("lang.undefined"),t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:13,vars:8,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"col-sm-8"],["target","blank",3,"href"],["target","blank","href","http://www.gnu.org/licenses/gpl-3.0-standalone.html"],["target","blank","href","https://maarch.com/"],["target","blank","href","https://community.maarch.org/"],["target","blank","href","https://docs.maarch.org/"],["target","blank","href","https://angular.io/"],["target","blank","href","https://material.angular.io/"],["target","blank","href","http://getbootstrap.com/"],["target","blank","href","http://fortawesome.github.io/Font-Awesome/"],["target","blank","href","http://www.fpdf.org/"],["target","blank","href","http://www.setasign.de/products/pdf-php-solutions/fpdi/"],["target","blank","href","https://jquery.com/"],["target","blank","href","https://github.com/running-coder/jquery-typeahead"],["target","blank","href","http://logging.apache.org/log4php/"],["target","blank","href","http://chir.ag/tech/download/pdfb"],["target","blank","href","http://www.foolabs.com/xpdf/"],["target","blank","href","http://www.tinybutstrong.com/"],["target","blank","href","http://www.tinymce.com/"],["target","blank","href","http://framework.zend.com/"],[1,"col-sm-4"],[1,"img_credits_maarch_box"],["svgIcon","maarchBox",2,"width","100%","height","auto"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,sa,2,0,"div",8),n.Oc(12,oa,106,27,"mat-card",9),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,V.c,K.a,S.a],pipes:[g.d],styles:[".img_credits_maarch_box[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%}"]}),t})();var ca=i("jhN1"),la=i("jtHE"),da=i("XNiG");const ha=["stepHolder"],ua=["stepContainer"];function pa(t,e){if(1&t&&n.Rb(0,"joyride-arrow",17),2&t){const t=n.hc();n.Lc("top",t.arrowTopPosition,"px")("left",t.arrowLeftPosition,"px"),n.oc("position",t.arrowPosition)}}function ba(t,e){1&t&&n.Sb(0)}function fa(t,e){if(1&t&&(n.Qc(0),n.ic(1,"async")),2&t){const t=n.hc();n.Sc(" ",n.jc(1,1,t.text)," ")}}function ma(t,e){1&t&&n.Sb(0)}function ga(t,e){if(1&t&&(n.Wb(0,"div",20),n.Qc(1),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Rc(t.counter)}}function va(t,e){if(1&t&&(n.Wb(0,"div",18),n.Oc(1,ma,1,0,"ng-container",9),n.Oc(2,ga,2,1,"ng-template",null,19,n.Pc),n.Vb()),2&t){const t=n.zc(3),e=n.hc();n.Db(1),n.oc("ngTemplateOutlet",e.customCounter?e.customCounter:t)("ngTemplateOutletContext",e.counterData)}}function _a(t,e){1&t&&n.Sb(0)}function ya(t,e){if(1&t&&(n.Wb(0,"joyride-button",24),n.Qc(1),n.ic(2,"async"),n.Vb()),2&t){const t=n.hc(2);n.oc("color",t.themeColor),n.Db(1),n.Rc(n.jc(2,2,t.prevText))}}function xa(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",21),n.dc("click",(function(){return n.Dc(t),n.hc().prev()})),n.Oc(1,_a,1,0,"ng-container",22),n.Oc(2,ya,3,4,"ng-template",null,23,n.Pc),n.Vb()}if(2&t){const t=n.zc(3),e=n.hc();n.Db(1),n.oc("ngTemplateOutlet",e.customPrevButton?e.customPrevButton:t)}}function Ca(t,e){1&t&&n.Sb(0)}function Oa(t,e){if(1&t&&(n.Wb(0,"joyride-button",27),n.Qc(1),n.ic(2,"async"),n.Vb()),2&t){const t=n.hc(2);n.oc("color",t.themeColor),n.Db(1),n.Rc(n.jc(2,2,t.nextText))}}function Da(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",25),n.dc("click",(function(){return n.Dc(t),n.hc().next()})),n.Oc(1,Ca,1,0,"ng-container",22),n.Oc(2,Oa,3,4,"ng-template",null,26,n.Pc),n.Vb()}if(2&t){const t=n.zc(3),e=n.hc();n.Db(1),n.oc("ngTemplateOutlet",e.customNextButton?e.customNextButton:t)}}function wa(t,e){1&t&&n.Sb(0)}function Ma(t,e){if(1&t&&(n.Wb(0,"joyride-button",30),n.Qc(1),n.ic(2,"async"),n.Vb()),2&t){const t=n.hc(2);n.oc("color",t.themeColor),n.Db(1),n.Rc(n.jc(2,2,t.doneText))}}function ka(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",28),n.dc("click",(function(){return n.Dc(t),n.hc().close()})),n.Oc(1,wa,1,0,"ng-container",22),n.Oc(2,Ma,3,4,"ng-template",null,29,n.Pc),n.Vb()}if(2&t){const t=n.zc(3),e=n.hc();n.Db(1),n.oc("ngTemplateOutlet",e.customDoneButton?e.customDoneButton:t)}}const Sa=function(t,e,i){return{"background-color":t,color:e,"border-color":i}},Ia=["*"];class Pa{constructor(){this.title=new la.a,this.text=new la.a}}const Va={prev:Object(c.a)("prev"),next:Object(c.a)("next"),done:Object(c.a)("done"),close:Object(c.a)(null)};let Ra=(()=>{let t=class{constructor(){this.themeColor="#3b5560",this.stepDefaultPosition="bottom",this.logsEnabled=!1,this.showCounter=!0,this.showPrevButton=!0,this.stepsOrder=[]}setOptions(t){this.stepsOrder=t.steps,this.stepDefaultPosition=t.stepDefaultPosition?t.stepDefaultPosition:this.stepDefaultPosition,this.logsEnabled=void 0!==t.logsEnabled?t.logsEnabled:this.logsEnabled,this.showCounter=void 0!==t.showCounter?t.showCounter:this.showCounter,this.showPrevButton=void 0!==t.showPrevButton?t.showPrevButton:this.showPrevButton,this.themeColor=t.themeColor?t.themeColor:this.themeColor,this.firstStep=t.startWith,this.waitingTime=void 0!==t.waitingTime?t.waitingTime:1,this.setCustomText(void 0!==t.customTexts?t.customTexts:Va)}getBackdropColor(){return this.hexToRgb(this.themeColor)}getThemeColor(){return this.themeColor}getStepDefaultPosition(){return this.stepDefaultPosition}getStepsOrder(){return this.stepsOrder}getFirstStep(){return this.firstStep}getWaitingTime(){return this.waitingTime}areLogsEnabled(){return this.logsEnabled}isCounterVisible(){return this.showCounter}isPrevButtonVisible(){return this.showPrevButton}getCustomTexts(){return this.customTexts}setCustomText(t){let e,i,n,a;e=t.prev?t.prev:Va.prev,i=t.next?t.next:Va.next,n=t.done?t.done:Va.done,a=t.close?t.close:Va.close,this.customTexts={prev:this.toObservable(e),next:this.toObservable(i),done:this.toObservable(n),close:this.toObservable(a)}}toObservable(t){return t instanceof ai.a?t:Object(c.a)(t)}hexToRgb(t){t=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(t,e,i,n)=>e+e+i+i+n+n);const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?`${parseInt(e[1],16)}, ${parseInt(e[2],16)}, ${parseInt(e[3],16)}`:null}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=n.Mb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})();const ja="ngx-joyride:::";let Aa=(()=>{let t=class{constructor(t){this.optionService=t}debug(t,e=""){this.optionService.areLogsEnabled()&&console.debug(ja+t,e)}info(t,e=""){this.optionService.areLogsEnabled()&&console.info(ja+t,e)}warn(t,e=""){this.optionService.areLogsEnabled()&&console.warn(ja+t,e)}error(t,e=""){this.optionService.areLogsEnabled()&&console.error(ja+t,e)}};return t.\u0275fac=function(e){return new(e||t)(n.ac(Ra))},t.\u0275prov=n.Mb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})();class Wa extends Error{constructor(t){super(t),Object.setPrototypeOf(this,Wa.prototype)}}class Ta extends Error{constructor(t){super(t),Object.setPrototypeOf(this,Ta.prototype)}}class Ea extends Error{constructor(t){super(t),Object.setPrototypeOf(this,Ea.prototype)}}var Fa=function(t){return t.NEXT="NEXT",t.PREV="PREV",t}({});let La=(()=>{let t=class{constructor(t,e){this.stepOptions=t,this.logger=e,this.tempSteps=[],this.currentStepIndex=-2,this.stepHasBeenModified=new da.a}getFirstStepIndex(){const t=this.stepOptions.getFirstStep();let e=this.stepOptions.getStepsOrder().indexOf(t);return e<0&&(e=0,void 0!==t&&this.logger.warn(`The step ${t} does not exist. Check in your step list if it's present.`)),e}init(){this.logger.info("Initializing the steps array."),this.steps=[],this.currentStepIndex=this.getFirstStepIndex()-1,this.stepOptions.getStepsOrder().forEach(t=>this.steps.push({id:t,step:null}))}addStep(t){if(this.tempSteps.filter(e=>e.name===t.name).length>0){let e=this.tempSteps.findIndex(e=>e.name===t.name);this.tempSteps[e]=t}else this.logger.info(`Adding step ${t.name} to the steps list.`),this.tempSteps.push(t)}get(t){if(t===Fa.NEXT?this.currentStepIndex++:this.currentStepIndex--,this.currentStepIndex<0||this.currentStepIndex>=this.steps.length)throw new Ea("The first or last step of the tour cannot be found!");const e=this.getStepName(this.steps[this.currentStepIndex].id),i=this.tempSteps.findIndex(t=>t.name===e);let n=this.tempSteps[i];return this.steps[this.currentStepIndex].step=n,null==n&&this.logger.warn(`Step ${this.steps[this.currentStepIndex].id} not found in the DOM. Check if it's hidden by *ngIf directive.`),n}getStepRoute(t){let e;return e=t===Fa.NEXT?this.steps[this.currentStepIndex+1]?this.steps[this.currentStepIndex+1].id:null:this.steps[this.currentStepIndex-1]?this.steps[this.currentStepIndex-1].id:null,e&&e.includes("@")?e.split("@")[1]:""}updatePosition(t,e){let i=this.getStepIndex(t);this.steps[i].step?(this.steps[i].step.position=e,this.stepHasBeenModified.next(this.steps[i].step)):this.logger.warn(`Trying to modify the position of ${t} to ${e}. Step not found!Is this step located in a different route?`)}getStepNumber(t){return this.getStepIndex(t)+1}getStepsCount(){return this.stepOptions.getStepsOrder().length}getStepIndex(t){const e=this.steps.map(t=>t.id.includes("@")?t.id.split("@")[0]:t.id).findIndex(e=>t===e);if(-1===e)throw new Wa(`The step with name: ${t} does not exist in the step list.`);return e}getStepName(t){return t&&t.includes("@")?t.split("@")[0]:t}};return t.\u0275fac=function(e){return new(e||t)(n.ac(Ra),n.ac(Aa))},t.\u0275prov=n.Mb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})(),Qa=(()=>{let t=class{constructor(t){this.platformId=t,this.fakeDocument={body:{},documentElement:{}},this.fakeWindow={document:this.fakeDocument,navigator:{}}}getNativeWindow(){return Object(P.I)(this.platformId)?window:this.fakeWindow}getNativeDocument(){return Object(P.I)(this.platformId)?document:this.fakeDocument}};return t.\u0275fac=function(e){return new(e||t)(n.ac(n.F))},t.\u0275prov=n.Mb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})(),Na=(()=>{let t=class{setPrevButton(t){this._prevButton=t}getPrevButton(){return this._prevButton}setNextButton(t){this._nextButton=t}getNextButton(){return this._nextButton}setDoneButton(t){this._doneButton=t}getDoneButton(){return this._doneButton}setCounter(t){this._counter=t}getCounter(){return this._counter}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=n.Mb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})(),za=(()=>{let t=class{constructor(t,e,i,a,s,o){this.joyrideStepsContainer=t,this.viewContainerRef=e,this.domService=i,this.router=a,this.templateService=s,this.platformId=o,this.stepPosition="NO_POSITION",this.prev=new n.o,this.next=new n.o,this.done=new n.o,this.subscriptions=[],this.windowRef=this.domService.getNativeWindow(),this.step=new Pa}ngAfterViewInit(){if(Object(P.I)(this.platformId)){if(this.prevTemplate&&this.templateService.setPrevButton(this.prevTemplate),this.nextTemplate&&this.templateService.setNextButton(this.nextTemplate),this.doneTemplate&&this.templateService.setDoneButton(this.doneTemplate),this.counterTemplate&&this.templateService.setCounter(this.counterTemplate),this.step.position=this.stepPosition,this.step.targetViewContainer=this.viewContainerRef,this.setAsyncFields(this.step),this.step.stepContent=this.stepContent,this.step.stepContentParams=this.stepContentParams,this.step.nextClicked=this.next,this.step.prevCliked=this.prev,this.step.tourDone=this.done,!this.name)throw new Wa("All the steps should have the 'joyrideStep' property set with a custom name.");this.step.name=this.name,this.step.route="/"===this.router.url.substr(0,1)?this.router.url.substr(1):this.router.url,this.step.transformCssStyle=this.windowRef.getComputedStyle(this.viewContainerRef.element.nativeElement).transform,this.step.isElementOrAncestorFixed=this.isElementFixed(this.viewContainerRef.element)||this.isAncestorsFixed(this.viewContainerRef.element.nativeElement.parentElement),this.joyrideStepsContainer.addStep(this.step)}}ngOnChanges(t){(t.title||t.text)&&this.setAsyncFields(this.step)}isElementFixed(t){return"fixed"===this.windowRef.getComputedStyle(t.nativeElement).position}setAsyncFields(t){this.title instanceof ai.a?this.subscriptions.push(this.title.subscribe(e=>{t.title.next(e)})):t.title.next(this.title),this.text instanceof ai.a?this.subscriptions.push(this.text.subscribe(e=>{t.text.next(e)})):t.text.next(this.text)}isAncestorsFixed(t){if(!t||!t.parentElement)return!1;let e="fixed"===this.windowRef.getComputedStyle(t.parentElement).position;return"BODY"===t.nodeName?e:!!e||this.isAncestorsFixed(t.parentElement)}ngOnDestroy(){this.subscriptions.forEach(t=>{t.unsubscribe()})}};return t.\u0275fac=function(e){return new(e||t)(n.Qb(La),n.Qb(n.T),n.Qb(Qa),n.Qb(o.c),n.Qb(Na),n.Qb(n.F))},t.\u0275dir=n.Lb({type:t,selectors:[["joyrideStep"],["","joyrideStep",""]],inputs:{stepPosition:"stepPosition",name:["joyrideStep","name"],nextStep:"nextStep",title:"title",text:"text",stepContent:"stepContent",stepContentParams:"stepContentParams",prevTemplate:"prevTemplate",nextTemplate:"nextTemplate",doneTemplate:"doneTemplate",counterTemplate:"counterTemplate"},outputs:{prev:"prev",next:"next",done:"done"},features:[n.Bb]}),t})(),Ba=(()=>{let t=class{constructor(t){this.DOMService=t,this.setDocumentHeight(),document.elementsFromPoint||(document.elementsFromPoint=this.elementsFromPoint.bind(this))}getElementFixedTop(t){return t.nativeElement.getBoundingClientRect().top}getElementFixedLeft(t){return t.nativeElement.getBoundingClientRect().left}getElementAbsoluteTop(t){const e=this.getScrollOffsets();return t.nativeElement.getBoundingClientRect().top+e.y}getElementAbsoluteLeft(t){const e=this.getScrollOffsets();return t.nativeElement.getBoundingClientRect().left+e.x}setDocumentHeight(){this.documentHeight=this.calculateDocumentHeight()}getDocumentHeight(){return this.documentHeight}isParentScrollable(t){return this.getFirstScrollableParent(t.nativeElement)!==this.DOMService.getNativeDocument().body}isElementBeyondOthers(t,e,i){const n=e?this.getElementFixedLeft(t):this.getElementAbsoluteLeft(t),a=e?this.getElementFixedTop(t):this.getElementAbsoluteTop(t),s=n+t.nativeElement.getBoundingClientRect().width-1,o=a+t.nativeElement.getBoundingClientRect().height-1,r=this.DOMService.getNativeDocument().elementsFromPoint(n,a),c=this.DOMService.getNativeDocument().elementsFromPoint(s,o);return 0===r.length&&0===c.length?1:this.getFirstElementWithoutKeyword(r,i)!==t.nativeElement||this.getFirstElementWithoutKeyword(c,i)!==t.nativeElement?2:3}scrollIntoView(t,e){const i=this.getFirstScrollableParent(t.nativeElement),n=e?this.getElementFixedTop(t):this.getElementAbsoluteTop(t);i!==this.DOMService.getNativeDocument().body?i.scrollTo?i.scrollTo(0,n-150):i.scrollTop=n-150:this.DOMService.getNativeWindow().scrollTo(0,n-150)}scrollToTheTop(t){const e=this.getFirstScrollableParent(t.nativeElement);e!==this.DOMService.getNativeDocument().body?e.scrollTo?e.scrollTo(0,0):e.scrollTop=0:this.DOMService.getNativeWindow().scrollTo(0,0)}scrollToTheBottom(t){const e=this.getFirstScrollableParent(t.nativeElement);e!==this.DOMService.getNativeDocument().body?e.scrollTo?e.scrollTo(0,this.DOMService.getNativeDocument().body.scrollHeight):e.scrollTop=e.scrollHeight-e.clientHeight:this.DOMService.getNativeWindow().scrollTo(0,this.DOMService.getNativeDocument().body.scrollHeight)}getFirstScrollableParent(t){const e=/(auto|scroll|overlay)/,i=(t,e)=>this.DOMService.getNativeWindow().getComputedStyle(t,null).getPropertyValue(e),n=t=>t&&t!==this.DOMService.getNativeDocument().body?(t=>e.test(i(t,"overflow")+i(t,"overflow-y")+i(t,"overflow-x")))(t)?t:n(t.parentNode):this.DOMService.getNativeDocument().body;return n(t)}calculateDocumentHeight(){const t=this.DOMService.getNativeDocument();return Math.max(t.body.scrollHeight,t.documentElement.scrollHeight,t.body.offsetHeight,t.documentElement.offsetHeight,t.body.clientHeight,t.documentElement.clientHeight)}getScrollOffsets(){const t=this.DOMService.getNativeWindow(),e=this.DOMService.getNativeDocument();return null!=t.pageXOffset?{x:t.pageXOffset,y:t.pageYOffset}:"CSS1Compat"==e.compatMode?{x:e.documentElement.scrollLeft,y:e.documentElement.scrollTop}:{x:e.body.scrollLeft,y:e.body.scrollTop}}elementsFromPoint(t,e){var i=[],n=void 0;do{const a=this.DOMService.getNativeDocument().elementFromPoint(t,e);a&&n!==a?(i.push(n=a),n.style.pointerEvents="none"):n=!1}while(n);return i.forEach((function(t){return t.style.pointerEvents="all"})),i}getFirstElementWithoutKeyword(t,e){for(;t[0]&&t[0].classList.toString().includes(e);)t.shift();return t[0]}};return t.\u0275fac=function(e){return new(e||t)(n.ac(Qa))},t.\u0275prov=n.Mb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})(),Ua=(()=>{let t=class{constructor(t,e,i){this.documentService=t,this.optionsService=e,this.rendererFactory=i,this.lastXScroll=0,this.lastYScroll=0,this.setRenderer()}setRenderer(){this.renderer=this.rendererFactory.createRenderer(null,null)}draw(t){this.elementRef=t.targetViewContainer,this.targetAbsoluteTop=this.getTargetTotalTop(t),this.targetAbsoluteLeft=this.getTargetTotalLeft(t),this.currentBackdropContainer=this.renderer.createElement("div"),this.renderer.addClass(this.currentBackdropContainer,"backdrop-container"),this.renderer.setStyle(this.currentBackdropContainer,"position","fixed"),this.renderer.setStyle(this.currentBackdropContainer,"top","0px"),this.renderer.setStyle(this.currentBackdropContainer,"left","0px"),this.renderer.setStyle(this.currentBackdropContainer,"width","100%"),this.renderer.setStyle(this.currentBackdropContainer,"height","100%"),this.renderer.setStyle(this.currentBackdropContainer,"z-index","1000"),this.renderer.setAttribute(this.currentBackdropContainer,"id","backdrop-"+t.name),this.backdropContent=this.renderer.createElement("div"),this.renderer.addClass(this.backdropContent,"backdrop-content"),this.renderer.setStyle(this.backdropContent,"position","relative"),this.renderer.setStyle(this.backdropContent,"height","100%"),this.renderer.setStyle(this.backdropContent,"display","flex"),this.renderer.setStyle(this.backdropContent,"flex-direction","column"),this.renderer.appendChild(this.currentBackdropContainer,this.backdropContent),this.backdropTop=this.renderer.createElement("div"),this.renderer.addClass(this.backdropTop,"joyride-backdrop"),this.renderer.addClass(this.backdropTop,"backdrop-top"),this.renderer.setStyle(this.backdropTop,"width","100%"),this.renderer.setStyle(this.backdropTop,"height",this.targetAbsoluteTop-this.lastYScroll+"px"),this.renderer.setStyle(this.backdropTop,"flex-shrink","0"),this.renderer.setStyle(this.backdropTop,"background-color",`rgba(${this.optionsService.getBackdropColor()}, 0.7)`),this.renderer.appendChild(this.backdropContent,this.backdropTop),this.backdropMiddleContainer=this.renderer.createElement("div"),this.renderer.addClass(this.backdropMiddleContainer,"backdrop-middle-container"),this.renderer.setStyle(this.backdropMiddleContainer,"height",this.elementRef.element.nativeElement.offsetHeight+"px"),this.renderer.setStyle(this.backdropMiddleContainer,"width","100%"),this.renderer.setStyle(this.backdropMiddleContainer,"flex-shrink","0"),this.renderer.appendChild(this.backdropContent,this.backdropMiddleContainer),this.backdropMiddleContent=this.renderer.createElement("div"),this.renderer.addClass(this.backdropMiddleContent,"backdrop-middle-content"),this.renderer.setStyle(this.backdropMiddleContent,"display","flex"),this.renderer.setStyle(this.backdropMiddleContent,"width","100%"),this.renderer.setStyle(this.backdropMiddleContent,"height","100%"),this.renderer.appendChild(this.backdropMiddleContainer,this.backdropMiddleContent),this.leftBackdrop=this.renderer.createElement("div"),this.renderer.addClass(this.leftBackdrop,"joyride-backdrop"),this.renderer.addClass(this.leftBackdrop,"backdrop-left"),this.renderer.setStyle(this.leftBackdrop,"flex-shrink","0"),this.renderer.setStyle(this.leftBackdrop,"width",this.targetAbsoluteLeft-this.lastXScroll+"px"),this.renderer.setStyle(this.leftBackdrop,"background-color",`rgba(${this.optionsService.getBackdropColor()}, 0.7)`),this.renderer.appendChild(this.backdropMiddleContent,this.leftBackdrop),this.targetBackdrop=this.renderer.createElement("div"),this.renderer.addClass(this.targetBackdrop,"backdrop-target"),this.renderer.setStyle(this.targetBackdrop,"flex-shrink","0"),this.renderer.setStyle(this.targetBackdrop,"width",this.elementRef.element.nativeElement.offsetWidth+"px"),this.renderer.appendChild(this.backdropMiddleContent,this.targetBackdrop),this.rightBackdrop=this.renderer.createElement("div"),this.renderer.addClass(this.rightBackdrop,"joyride-backdrop"),this.renderer.addClass(this.rightBackdrop,"backdrop-right"),this.renderer.setStyle(this.rightBackdrop,"width","100%"),this.renderer.setStyle(this.rightBackdrop,"background-color",`rgba(${this.optionsService.getBackdropColor()}, 0.7)`),this.renderer.appendChild(this.backdropMiddleContent,this.rightBackdrop),this.backdropBottom=this.renderer.createElement("div"),this.renderer.addClass(this.backdropBottom,"joyride-backdrop"),this.renderer.addClass(this.backdropBottom,"backdrop-bottom"),this.renderer.setStyle(this.backdropBottom,"width","100%"),this.renderer.setStyle(this.backdropBottom,"height","100%"),this.renderer.setStyle(this.backdropBottom,"background-color",`rgba(${this.optionsService.getBackdropColor()}, 0.7)`),this.renderer.appendChild(this.backdropContent,this.backdropBottom),this.removeLastBackdrop(),this.drawCurrentBackdrop(),this.lastBackdropContainer=this.currentBackdropContainer}remove(){this.removeLastBackdrop()}redrawTarget(t){this.targetAbsoluteLeft=this.getTargetTotalLeft(t),this.targetAbsoluteTop=this.getTargetTotalTop(t),this.handleVerticalScroll(t),this.handleHorizontalScroll(t)}getTargetTotalTop(t){let e=t.targetViewContainer;return t.isElementOrAncestorFixed?this.documentService.getElementFixedTop(e.element):this.documentService.getElementAbsoluteTop(e.element)}getTargetTotalLeft(t){let e=t.targetViewContainer;return t.isElementOrAncestorFixed?this.documentService.getElementFixedLeft(e.element):this.documentService.getElementAbsoluteLeft(e.element)}redraw(t,e){this.lastYScroll!==e.scrollY&&(this.lastYScroll=e.scrollY,this.elementRef&&this.handleVerticalScroll(t)),this.lastXScroll!==e.scrollX&&(this.lastXScroll=e.scrollX,this.elementRef&&this.handleHorizontalScroll(t))}handleHorizontalScroll(t){let e=t.isElementOrAncestorFixed?this.targetAbsoluteLeft:this.targetAbsoluteLeft-this.lastXScroll;e>=0?(this.renderer.setStyle(this.leftBackdrop,"width",e+"px"),this.renderer.setStyle(this.targetBackdrop,"width",this.elementRef.element.nativeElement.offsetWidth+"px")):this.handleTargetPartialWidth(e)}handleTargetPartialWidth(t){this.renderer.setStyle(this.leftBackdrop,"width","0px");let e=this.elementRef.element.nativeElement.offsetWidth+t;this.renderer.setStyle(this.targetBackdrop,"width",e>=0?e+"px":"0px")}handleVerticalScroll(t){let e=t.isElementOrAncestorFixed?this.targetAbsoluteTop:this.targetAbsoluteTop-this.lastYScroll;e>=0?(this.renderer.setStyle(this.backdropTop,"height",e+"px"),this.renderer.setStyle(this.backdropMiddleContainer,"height",this.elementRef.element.nativeElement.offsetHeight+"px")):this.handleTargetPartialHeight(e)}handleTargetPartialHeight(t){this.renderer.setStyle(this.backdropTop,"height","0px");let e=this.elementRef.element.nativeElement.offsetHeight+t;this.renderer.setStyle(this.backdropMiddleContainer,"height",e>=0?e+"px":"0px")}removeLastBackdrop(){this.lastBackdropContainer&&(this.renderer.removeChild(document.body,this.lastBackdropContainer),this.lastBackdropContainer=void 0)}drawCurrentBackdrop(){this.renderer.appendChild(document.body,this.currentBackdropContainer)}};return t.\u0275fac=function(e){return new(e||t)(n.ac(Ba),n.ac(Ra),n.ac(n.J))},t.\u0275prov=n.Mb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})(),$a=(()=>{let t=class{constructor(t,e){this.rendererFactory=t,this.DOMService=e,this.scrollEvent=new da.a,this.resizeEvent=new da.a,this.renderer=t.createRenderer(null,null)}startListeningScrollEvents(){this.scrollUnlisten=this.renderer.listen("document","scroll",t=>{this.scrollEvent.next({scrollX:this.DOMService.getNativeWindow().pageXOffset,scrollY:this.DOMService.getNativeWindow().pageYOffset})})}startListeningResizeEvents(){this.resizeUnlisten=this.renderer.listen("window","resize",t=>{this.resizeEvent.next(t)})}stopListeningScrollEvents(){this.scrollUnlisten()}stopListeningResizeEvents(){this.resizeUnlisten()}};return t.\u0275fac=function(e){return new(e||t)(n.ac(n.J),n.ac(Qa))},t.\u0275prov=n.Mb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})(),Ha=(()=>{let t=class{constructor(t,e,i,n,a,s,o,r){this.injector=t,this.stepsContainerService=e,this.eventListenerService=i,this.documentService=n,this.renderer=a,this.logger=s,this.optionsService=o,this.templateService=r,this.stepWidth=200,this.stepHeight=200,this.showArrow=!0,this.arrowSize=Ja,this.subscriptions=[]}ngOnInit(){this.joyrideStepService=this.injector.get(Za),this.documentHeight=this.documentService.getDocumentHeight(),this.subscriptions.push(this.subscribeToResizeEvents()),this.title=this.step.title.asObservable(),this.text=this.step.text.asObservable(),this.setCustomTemplates(),this.setCustomTexts(),this.counter=this.getCounter(),this.isCounterVisible=this.optionsService.isCounterVisible(),this.isPrevButtonVisible=this.optionsService.isPrevButtonVisible(),this.themeColor=this.optionsService.getThemeColor(),this.text&&this.text.subscribe(t=>this.checkRedraw(t)),this.title&&this.title.subscribe(t=>this.checkRedraw(t))}ngAfterViewInit(){if(this.isCustomized())this.renderer.setStyle(this.stepContainer.nativeElement,"max-width","90vw"),this.updateStepDimensions();else{this.renderer.setStyle(this.stepContainer.nativeElement,"max-width","400px");let t=this.getDimensionsByAspectRatio(this.stepContainer.nativeElement.clientWidth,this.stepContainer.nativeElement.clientHeight,1.212);t=this.adjustDimensions(t.width,t.height),this.stepWidth=t.width,this.stepHeight=t.height,this.renderer.setStyle(this.stepContainer.nativeElement,"width",this.stepWidth+"px"),this.renderer.setStyle(this.stepContainer.nativeElement,"height",this.stepHeight+"px")}this.drawStep()}checkRedraw(t){null!=t&&setTimeout(()=>{this.redrawStep()},2)}isCustomized(){return this.step.stepContent||this.templateService.getCounter()||this.templateService.getPrevButton()||this.templateService.getNextButton()||this.templateService.getDoneButton()}setCustomTexts(){const t=this.optionsService.getCustomTexts();this.prevText=t.prev,this.nextText=t.next,this.doneText=t.done}drawStep(){let t=this.step.isElementOrAncestorFixed?"fixed":"absolute";this.renderer.setStyle(this.stepHolder.nativeElement,"position",t),this.renderer.setStyle(this.stepHolder.nativeElement,"transform",this.step.transformCssStyle),this.targetWidth=this.step.targetViewContainer.element.nativeElement.getBoundingClientRect().width,this.targetHeight=this.step.targetViewContainer.element.nativeElement.getBoundingClientRect().height,this.targetAbsoluteLeft="fixed"===t?this.documentService.getElementFixedLeft(this.step.targetViewContainer.element):this.documentService.getElementAbsoluteLeft(this.step.targetViewContainer.element),this.targetAbsoluteTop="fixed"===t?this.documentService.getElementFixedTop(this.step.targetViewContainer.element):this.documentService.getElementAbsoluteTop(this.step.targetViewContainer.element),this.setStepStyle()}getCounter(){let t=this.stepsContainerService.getStepNumber(this.step.name),e=this.stepsContainerService.getStepsCount();return this.counterData={step:t,total:e},t+"/"+e}setCustomTemplates(){this.customContent=this.step.stepContent,this.ctx=this.step.stepContentParams,this.customPrevButton=this.templateService.getPrevButton(),this.customNextButton=this.templateService.getNextButton(),this.customDoneButton=this.templateService.getDoneButton(),this.customCounter=this.templateService.getCounter()}prev(){this.joyrideStepService.prev()}next(){this.joyrideStepService.next()}close(){this.joyrideStepService.close()}isFirstStep(){return 1===this.stepsContainerService.getStepNumber(this.step.name)}isLastStep(){return this.stepsContainerService.getStepNumber(this.step.name)===this.stepsContainerService.getStepsCount()}setStepStyle(){switch(this.step.position){case"top":this.setStyleTop();break;case"bottom":this.setStyleBottom();break;case"right":this.setStyleRight();break;case"left":this.setStyleLeft();break;case"center":this.setStyleCenter();break;default:this.setStyleBottom()}}setStyleTop(){this.stepsContainerService.updatePosition(this.step.name,"top"),this.topPosition=this.targetAbsoluteTop-Ya-this.stepHeight,this.stepAbsoluteTop=this.targetAbsoluteTop-Ya-this.stepHeight,this.arrowTopPosition=this.stepHeight,this.leftPosition=this.targetWidth/2-this.stepWidth/2+this.targetAbsoluteLeft,this.stepAbsoluteLeft=this.targetWidth/2-this.stepWidth/2+this.targetAbsoluteLeft,this.arrowLeftPosition=this.stepWidth/2-this.arrowSize,this.adjustLeftPosition(),this.adjustRightPosition(),this.arrowPosition="bottom",this.autofixTopPosition()}setStyleRight(){this.stepsContainerService.updatePosition(this.step.name,"right"),this.topPosition=this.targetAbsoluteTop+this.targetHeight/2-this.stepHeight/2,this.stepAbsoluteTop=this.targetAbsoluteTop+this.targetHeight/2-this.stepHeight/2,this.arrowTopPosition=this.stepHeight/2-this.arrowSize,this.leftPosition=this.targetAbsoluteLeft+this.targetWidth+Ya,this.stepAbsoluteLeft=this.targetAbsoluteLeft+this.targetWidth+Ya,this.arrowLeftPosition=-this.arrowSize,this.adjustTopPosition(),this.adjustBottomPosition(),this.arrowPosition="left",this.autofixRightPosition()}setStyleBottom(){this.stepsContainerService.updatePosition(this.step.name,"bottom"),this.topPosition=this.targetAbsoluteTop+this.targetHeight+Ya,this.stepAbsoluteTop=this.targetAbsoluteTop+this.targetHeight+Ya,this.arrowTopPosition=-this.arrowSize,this.arrowLeftPosition=this.stepWidth/2-this.arrowSize,this.leftPosition=this.targetWidth/2-this.stepWidth/2+this.targetAbsoluteLeft,this.stepAbsoluteLeft=this.targetWidth/2-this.stepWidth/2+this.targetAbsoluteLeft,this.adjustLeftPosition(),this.adjustRightPosition(),this.arrowPosition="top",this.autofixBottomPosition()}setStyleLeft(){this.stepsContainerService.updatePosition(this.step.name,"left"),this.topPosition=this.targetAbsoluteTop+this.targetHeight/2-this.stepHeight/2,this.stepAbsoluteTop=this.targetAbsoluteTop+this.targetHeight/2-this.stepHeight/2,this.arrowTopPosition=this.stepHeight/2-this.arrowSize,this.leftPosition=this.targetAbsoluteLeft-this.stepWidth-Ya,this.stepAbsoluteLeft=this.targetAbsoluteLeft-this.stepWidth-Ya,this.arrowLeftPosition=this.stepWidth,this.adjustTopPosition(),this.adjustBottomPosition(),this.arrowPosition="right",this.autofixLeftPosition()}setStyleCenter(){this.renderer.setStyle(this.stepHolder.nativeElement,"position","fixed"),this.renderer.setStyle(this.stepHolder.nativeElement,"top","50%"),this.renderer.setStyle(this.stepHolder.nativeElement,"left","50%"),this.updateStepDimensions(),this.renderer.setStyle(this.stepHolder.nativeElement,"transform",`translate(-${this.stepWidth/2}px, -${this.stepHeight/2}px)`),this.showArrow=!1}adjustLeftPosition(){this.leftPosition<0&&(this.arrowLeftPosition=this.arrowLeftPosition+this.leftPosition-2,this.leftPosition=2)}adjustRightPosition(){let t=document.body.clientWidth;if(this.stepAbsoluteLeft+this.stepWidth>t){let e=this.leftPosition-(this.stepAbsoluteLeft+this.stepWidth+5-t),i=e-this.leftPosition;this.leftPosition=e,this.arrowLeftPosition=this.arrowLeftPosition-i}}adjustTopPosition(){this.stepAbsoluteTop<0&&(this.arrowTopPosition=this.arrowTopPosition+this.topPosition-2,this.topPosition=2)}adjustBottomPosition(){if(this.stepAbsoluteTop+this.stepHeight>this.documentHeight){let t=this.topPosition-(this.stepAbsoluteTop+this.stepHeight+5-this.documentHeight),e=t-this.topPosition;this.topPosition=t,this.arrowTopPosition=this.arrowTopPosition-e}}autofixTopPosition(){this.positionAlreadyFixed?this.logger.warn("No step positions found for this step. The step will be centered."):this.targetAbsoluteTop-this.stepHeight-this.arrowSize<0&&(this.positionAlreadyFixed=!0,this.setStyleRight())}autofixRightPosition(){this.targetAbsoluteLeft+this.targetWidth+this.stepWidth+this.arrowSize>document.body.clientWidth&&this.setStyleBottom()}autofixBottomPosition(){this.targetAbsoluteTop+this.stepHeight+this.arrowSize+this.targetHeight>this.documentHeight&&this.setStyleLeft()}autofixLeftPosition(){this.targetAbsoluteLeft-this.stepWidth-this.arrowSize<0&&this.setStyleTop()}subscribeToResizeEvents(){return this.eventListenerService.resizeEvent.subscribe(()=>{this.redrawStep()})}redrawStep(){this.updateStepDimensions(),this.drawStep()}getDimensionsByAspectRatio(t,e,i){let n=(t+e)/(1+i);return{width:n*i,height:n}}adjustDimensions(t,e){let i=t,n=e;return t>400?(i=400,n=t*e/i):t<200&&(i=200,n=200/1.212),{width:i,height:n}}updateStepDimensions(){this.stepWidth=this.stepContainer.nativeElement.clientWidth,this.stepHeight=this.stepContainer.nativeElement.clientHeight}ngOnDestroy(){this.subscriptions.forEach(t=>{t.unsubscribe()})}};return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.t),n.Qb(La),n.Qb($a),n.Qb(Ba),n.Qb(n.I),n.Qb(Aa),n.Qb(Ra),n.Qb(Na))},t.\u0275cmp=n.Kb({type:t,selectors:[["joyride-step"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(ha,!0),n.Kc(ua,!0)),2&t&&(n.yc(i=n.ec())&&(e.stepHolder=i.first),n.yc(i=n.ec())&&(e.stepContainer=i.first))},inputs:{step:"step"},decls:21,vars:17,consts:[[1,"joyride-step__holder",3,"id"],["stepHolder",""],["class","joyride-step__arrow",3,"position","top","left",4,"ngIf"],[1,"joyride-step__container"],["stepContainer",""],[1,"joyride-step__close",3,"click"],[1,"joyride-step__header"],[1,"joyride-step__title"],[1,"joyride-step__body"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["defaultContent",""],[1,"joyride-step__footer"],["class","joyride-step__counter-container",4,"ngIf"],[1,"joyride-step__buttons-container"],["class","joyride-step__prev-container joyride-step__button",3,"click",4,"ngIf"],["class","joyride-step__next-container joyride-step__button",3,"click",4,"ngIf","ngIfElse"],["doneButton",""],[1,"joyride-step__arrow",3,"position"],[1,"joyride-step__counter-container"],["defaultCounter",""],[1,"joyride-step__counter"],[1,"joyride-step__prev-container","joyride-step__button",3,"click"],[4,"ngTemplateOutlet"],["defaultPrevButton",""],[1,"joyride-step__prev-button",3,"color"],[1,"joyride-step__next-container","joyride-step__button",3,"click"],["defaulNextButton",""],[3,"color"],[1,"joyride-step__done-container","joyride-step__button",3,"click"],["defaultDoneButton",""],[1,"joyride-step__done-button",3,"color"]],template:function(t,e){if(1&t&&(n.Wb(0,"div",0,1),n.Oc(2,pa,1,5,"joyride-arrow",2),n.Wb(3,"div",3,4),n.Wb(5,"joy-close-button",5),n.dc("click",(function(){return e.close()})),n.Vb(),n.Wb(6,"div",6),n.Wb(7,"div",7),n.Qc(8),n.ic(9,"async"),n.Vb(),n.Vb(),n.Wb(10,"div",8),n.Oc(11,ba,1,0,"ng-container",9),n.Oc(12,fa,2,3,"ng-template",null,10,n.Pc),n.Vb(),n.Wb(14,"div",11),n.Oc(15,va,4,2,"div",12),n.Wb(16,"div",13),n.Oc(17,xa,4,1,"div",14),n.Oc(18,Da,4,1,"div",15),n.Oc(19,ka,4,1,"ng-template",null,16,n.Pc),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.zc(13),i=n.zc(20);n.Lc("top",e.topPosition,"px")("left",e.leftPosition,"px"),n.oc("id","joyride-step-"+e.step.name),n.Db(2),n.oc("ngIf",e.showArrow),n.Db(5),n.Lc("color",e.themeColor),n.Db(1),n.Rc(n.jc(9,15,e.title)),n.Db(3),n.oc("ngTemplateOutlet",e.customContent?e.customContent:t)("ngTemplateOutletContext",e.ctx),n.Db(4),n.oc("ngIf",e.isCounterVisible),n.Db(2),n.oc("ngIf",e.isPrevButtonVisible&&!e.isFirstStep()),n.Db(1),n.oc("ngIf",!e.isLastStep())("ngIfElse",i)}},directives:function(){return[P.t,qa,P.A,Ga,Xa]},pipes:function(){return[P.b]},styles:[".joyride-step__holder{position:absolute;font-family:Arial,Helvetica,sans-serif;font-size:16px;z-index:1001}.joyride-step__arrow{position:absolute;left:40px;z-index:1002}.joyride-step__container{box-sizing:border-box;position:relative;color:#000;background-color:#fff;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;-webkit-box-pack:justify;justify-content:space-between;padding:10px;box-shadow:0 0 30px 1px #000}.joyride-step__header{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;padding:8px}.joyride-step__title{font-weight:700;font-size:20px}.joyride-step__close{position:absolute;right:10px;top:10px;width:14px;height:14px;cursor:pointer}.joyride-step__body{text-align:left;padding:10px 8px}.joyride-step__footer{display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row;-webkit-box-pack:justify;justify-content:space-between;-webkit-box-align:center;align-items:center;padding-left:8px}.joyride-step__buttons-container{display:-webkit-box;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-direction:row}.joyride-step__button:first-child{margin-right:2.5px}.joyride-step__button:last-child{margin-left:2.5px}.joyride-step__counter{font-weight:700;font-size:14px}.joyride-step__counter-container{margin-right:10px}"],encapsulation:2}),t})(),Ga=(()=>{let t=class{constructor(){this.position="top"}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=n.Kb({type:t,selectors:[["joyride-arrow"]],inputs:{position:"position"},decls:1,vars:8,template:function(t,e){1&t&&n.Rb(0,"div"),2&t&&n.Ib("joyride-arrow__top","top"==e.position)("joyride-arrow__bottom","bottom"==e.position)("joyride-arrow__left","left"==e.position)("joyride-arrow__right","right"==e.position)},styles:[".joyride-arrow__top{border-left:11px solid transparent;border-right:11px solid transparent;border-bottom:11px solid #fff}.joyride-arrow__bottom{border-left:11px solid transparent;border-right:11px solid transparent;border-top:11px solid #fff}.joyride-arrow__right{border-left:11px solid #fff;border-bottom:11px solid transparent;border-top:11px solid transparent}.joyride-arrow__left{border-right:11px solid #fff;border-top:11px solid transparent;border-bottom:11px solid transparent}"],encapsulation:2}),t})(),Xa=(()=>{let t=class{constructor(){this.clicked=new n.o}onClick(){this.clicked.emit()}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=n.Kb({type:t,selectors:[["joyride-button"]],inputs:{color:"color"},outputs:{clicked:"clicked"},ngContentSelectors:Ia,decls:2,vars:5,consts:[[1,"joyride-button",3,"ngStyle","mouseleave","mouseover","click"]],template:function(t,e){1&t&&(n.nc(),n.Wb(0,"button",0),n.dc("mouseleave",(function(){return e.hover=!1}))("mouseover",(function(){return e.hover=!0}))("click",(function(){return e.onClick()})),n.mc(1),n.Vb()),2&t&&n.oc("ngStyle",n.xc(1,Sa,e.hover?"#fff":e.color,e.hover?e.color:"#fff",e.hover?e.color:"transparent"))},directives:[P.w],styles:[".joyride-button[_ngcontent-%COMP%]{text-transform:uppercase;border:2px solid transparent;outline:0;padding:6px 12px;font-size:12px;font-weight:700;color:#fff;background-color:#3b5560;cursor:pointer}.joyride-button[_ngcontent-%COMP%]:hover{color:#3b5560;border:2px solid #3b5560;background-color:#fff}"]}),t})(),qa=(()=>{let t=class{};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=n.Kb({type:t,selectors:[["joy-close-button"]],decls:3,vars:0,consts:[["viewBox","0 0 25 25","xmlns","http://www.w3.org/2000/svg"],["x1","1","y1","24","x2","24","y2","1","stroke","black","stroke-width","3"],["x1","1","y1","1","x2","24","y2","24","stroke","black","stroke-width","3"]],template:function(t,e){1&t&&(n.gc(),n.Wb(0,"svg",0),n.Rb(1,"line",1),n.Rb(2,"line",2),n.Vb())},encapsulation:2}),t})(),Ka=(()=>{let t=class{constructor(t,e,i){this.componentFactoryResolver=t,this.appRef=e,this.injector=i,this.refMap={}}draw(t){const e=this.componentFactoryResolver.resolveComponentFactory(Ha).create(this.injector);this.appRef.attachView(e.hostView),document.body.appendChild(e.hostView.rootNodes[0]);const i=e.instance;i.step=t,e.changeDetectorRef.detectChanges(),t.stepInstance=i,this.refMap[t.name]=e}remove(t){this.appRef.detachView(this.refMap[t.name].hostView),this.refMap[t.name].destroy()}};return t.\u0275fac=function(e){return new(e||t)(n.ac(n.j),n.ac(n.g),n.ac(n.t))},t.\u0275prov=n.Mb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})();const Ya=15,Ja=10;let Za=(()=>{let t=class{constructor(t,e,i,n,a,s,o,r,c){this.backDropService=t,this.eventListener=e,this.stepsContainerService=i,this.documentService=n,this.DOMService=a,this.stepDrawerService=s,this.optionsService=o,this.router=r,this.logger=c,this.winTopPosition=0,this.winBottomPosition=0,this.stepsObserver=new la.a,this.initViewportPositions(),this.subscribeToScrollEvents(),this.subscribeToResizeEvents()}initViewportPositions(){this.winTopPosition=0,this.winBottomPosition=this.DOMService.getNativeWindow().innerHeight-20}subscribeToScrollEvents(){this.eventListener.startListeningScrollEvents(),this.eventListener.scrollEvent.subscribe(t=>{this.winTopPosition=t.scrollY,this.winBottomPosition=this.winTopPosition+this.DOMService.getNativeWindow().innerHeight-20,this.currentStep&&this.backDropService.redraw(this.currentStep,t)})}subscribeToResizeEvents(){this.eventListener.resizeEvent.subscribe(()=>{this.currentStep&&this.backDropService.redrawTarget(this.currentStep)})}drawStep(t){t.position="NO_POSITION"===t.position?this.optionsService.getStepDefaultPosition():t.position,this.stepDrawerService.draw(t)}startTour(){return this.stepsObserver=new la.a,this.stepsContainerService.init(),this.documentService.setDocumentHeight(),this.tryShowStep(Fa.NEXT),this.eventListener.startListeningResizeEvents(),this.subscribeToStepsUpdates(),this.stepsObserver.asObservable()}close(){this.removeCurrentStep(),this.notifyTourIsFinished(),this.DOMService.getNativeWindow().scrollTo(0,0),this.eventListener.stopListeningResizeEvents(),this.backDropService.remove()}prev(){this.removeCurrentStep(),this.currentStep.prevCliked.emit(),this.tryShowStep(Fa.PREV)}next(){this.removeCurrentStep(),this.currentStep.nextClicked.emit(),this.tryShowStep(Fa.NEXT)}navigateToStepPage(t){let e=this.stepsContainerService.getStepRoute(t);e&&this.router.navigate([e])}subscribeToStepsUpdates(){this.stepsContainerService.stepHasBeenModified.subscribe(t=>{this.currentStep&&this.currentStep.name===t.name&&(this.currentStep=t)})}tryShowStep(t){this.navigateToStepPage(t);const e=this.optionsService.getWaitingTime();e>100&&this.backDropService.remove(),setTimeout(()=>{try{this.showStep(t)}catch(e){if(e instanceof Ta)this.tryShowStep(t);else{if(!(e instanceof Ea))throw new Error(e);this.logger.error("Forcing the tour closure: First or Last step not found in the DOM."),this.close()}}},e)}showStep(t){if(this.currentStep=this.stepsContainerService.get(t),null==this.currentStep)throw new Ta("");this.scrollIfElementBeyondOtherElements(),this.backDropService.draw(this.currentStep),this.drawStep(this.currentStep),this.scrollIfStepAndTargetAreNotVisible(),this.notifyStepClicked(t)}notifyStepClicked(t){let e={number:this.stepsContainerService.getStepNumber(this.currentStep.name),name:this.currentStep.name,route:this.currentStep.route,actionType:t};this.stepsObserver.next(e)}notifyTourIsFinished(){this.currentStep&&this.currentStep.tourDone.emit(),this.stepsObserver.complete()}removeCurrentStep(){this.currentStep&&this.stepDrawerService.remove(this.currentStep)}scrollIfStepAndTargetAreNotVisible(){this.scrollWhenTargetOrStepAreHiddenBottom(),this.scrollWhenTargetOrStepAreHiddenTop()}scrollWhenTargetOrStepAreHiddenBottom(){let t=this.getMaxTargetAndStepBottomPosition();t>this.winBottomPosition&&this.DOMService.getNativeWindow().scrollBy(0,t-this.winBottomPosition)}scrollWhenTargetOrStepAreHiddenTop(){let t=this.getMaxTargetAndStepTopPosition();t<this.winTopPosition&&this.DOMService.getNativeWindow().scrollBy(0,t-this.winTopPosition)}getMaxTargetAndStepBottomPosition(){let t=this.documentService.getElementAbsoluteTop(this.currentStep.targetViewContainer.element);return"top"===this.currentStep.position?t+this.currentStep.stepInstance.targetHeight:"bottom"===this.currentStep.position?t+this.currentStep.stepInstance.targetHeight+this.currentStep.stepInstance.stepHeight+Ja+Ya:"right"===this.currentStep.position||"left"===this.currentStep.position?Math.max(t+this.currentStep.stepInstance.targetHeight,t+this.currentStep.stepInstance.targetHeight/2+this.currentStep.stepInstance.stepHeight/2):void 0}getMaxTargetAndStepTopPosition(){let t=this.documentService.getElementAbsoluteTop(this.currentStep.targetViewContainer.element);return"top"===this.currentStep.position?t-(this.currentStep.stepInstance.stepHeight+Ja+Ya):"bottom"===this.currentStep.position?t:"right"===this.currentStep.position||"left"===this.currentStep.position?Math.min(t,t+this.currentStep.stepInstance.targetHeight/2-this.currentStep.stepInstance.stepHeight/2):void 0}scrollIfElementBeyondOtherElements(){2===this.isElementBeyondOthers()&&this.documentService.scrollToTheTop(this.currentStep.targetViewContainer.element),2===this.isElementBeyondOthers()&&this.documentService.scrollToTheBottom(this.currentStep.targetViewContainer.element),1===this.isElementBeyondOthers()&&this.documentService.isParentScrollable(this.currentStep.targetViewContainer.element)&&this.documentService.scrollIntoView(this.currentStep.targetViewContainer.element,this.currentStep.isElementOrAncestorFixed),1===this.isElementBeyondOthers()&&this.documentService.isParentScrollable(this.currentStep.targetViewContainer.element)&&this.currentStep.targetViewContainer.element.nativeElement.scrollIntoView()}isElementBeyondOthers(){return this.documentService.isElementBeyondOthers(this.currentStep.targetViewContainer.element,this.currentStep.isElementOrAncestorFixed,"backdrop")}};return t.\u0275fac=function(e){return new(e||t)(n.ac(Ua),n.ac($a),n.ac(La),n.ac(Ba),n.ac(Qa),n.ac(Ka),n.ac(Ra),n.ac(o.c),n.ac(Aa))},t.\u0275prov=n.Mb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})();class ts{}let es=(()=>{let t=class{constructor(t,e,i){this.platformId=t,this.stepService=e,this.optionsService=i,this.tourInProgress=!1}startTour(t){return Object(P.I)(this.platformId)?(this.tourInProgress||(this.tourInProgress=!0,t&&this.optionsService.setOptions(t),this.tour$=this.stepService.startTour().pipe(Object(Xt.a)(()=>this.tourInProgress=!1)),this.tour$.subscribe()),this.tour$):Object(c.a)(new ts)}closeTour(){this.isTourInProgress()&&this.stepService.close()}isTourInProgress(){return this.tourInProgress}};return t.\u0275fac=function(e){return new(e||t)(n.ac(n.F),n.ac(Za),n.ac(Ra))},t.\u0275prov=n.Mb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})();var is;const ns=o.g.forChild([]);let as=(()=>{let t=is=class{static forRoot(){return{ngModule:is,providers:[es,Za,La,Ua,$a,Ba,Ra,Ka,Qa,Aa,Na]}}static forChild(){return{ngModule:is,providers:[]}}};return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[P.c,ns]]}),t})(),ss=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.joyrideService=e,this.headerService=i,this.functionService=n,this.router=a,this.http=s,this.notify=o,this.currentStepType="",this.currentTour=null,this.tour=[{type:"welcome",stepId:"welcome",title:`<i class="far fa-question-circle" color="primary"></i> <b color="primary">${this.translate.instant("lang.welcomeTourTitle")}</b>`,description:this.translate.instant("lang.welcomeTourDescription"),redirectToAdmin:!1},{type:"email",stepId:"admin_email_server@administration",title:`<i class="far fa-question-circle" color="primary"></i> <b color="primary">${this.translate.instant("lang.admin_email_serverTitle")}</b>`,description:this.translate.instant("lang.admin_email_serverTour"),redirectToAdmin:!1},{type:"email",stepId:"emailTour@administration/sendmail",title:`<i class="far fa-question-circle" color="primary"></i> <b color="primary">${this.translate.instant("lang.emailTourTitle")}</b>`,description:this.translate.instant("lang.emailTourDescription"),redirectToAdmin:!1},{type:"email",stepId:"emailTour2@administration/sendmail",title:`<i class="far fa-question-circle" color="primary"></i> <b color="primary">${this.translate.instant("lang.emailTour2Title")}</b>`,description:this.translate.instant("lang.emailTour2Description"),redirectToAdmin:!1},{type:"notification",stepId:"admin_notif@administration",title:`<i class="far fa-question-circle" color="primary"></i> <b color="primary">${this.translate.instant("lang.admin_notifTitle")}</b>`,description:this.translate.instant("lang.admin_notifTour"),redirectToAdmin:!1},{type:"notification",stepId:"BASKETS_Tour@administration/notifications",title:`<i class="far fa-question-circle" color="primary"></i> <b color="primary">${this.translate.instant("lang.notifTour2Title")}</b>`,description:this.translate.instant("lang.notifTour2Description"),redirectToAdmin:!1},{type:"notification",stepId:"createScriptTour@administration/notifications/4",title:`<i class="far fa-question-circle" color="primary"></i> <b color="primary">${this.translate.instant("lang.createScriptTourTitle")}</b>`,description:this.translate.instant("lang.createScriptTourDescription"),redirectToAdmin:!1},{type:"notification",stepId:"notifTour@administration/notifications",title:`<i class="far fa-question-circle" color="primary"></i> <b color="primary">${this.translate.instant("lang.notifTourTitle")}</b>`,description:this.translate.instant("lang.notifTourDescription"),redirectToAdmin:!1},{type:"notification",stepId:"notifTour3@administration/notifications",title:`<i class="far fa-question-circle" color="primary"></i> <b color="primary">${this.translate.instant("lang.notifTour3Title")}</b>`,description:this.translate.instant("lang.notifTour3Description"),redirectToAdmin:!1},{type:"notification",stepId:"notifTour4@administration/notifications",title:`<i class="far fa-question-circle" color="primary"></i> <b color="primary">${this.translate.instant("lang.notifTour4Title")}</b>`,description:this.translate.instant("lang.notifTour4Description"),redirectToAdmin:!0}],this.featureTourEnd=[]}init(){if(this.getCurrentStepType(),!this.functionService.empty(this.currentStepType)){const t=this.tour.filter(t=>t.type===this.currentStepType).map(t=>t.stepId);this.joyrideService.startTour({customTexts:{next:">>",prev:"<<",done:this.translate.instant("lang.getIt")},steps:t,waitingTime:500}).subscribe(t=>{this.currentTour=this.tour.filter(e=>e.stepId.split("@")[0]===t.name)[0];const e=document.getElementsByClassName("joyride-step__container");e[0].style.width="auto",e[0].style.height="auto",document.getElementsByClassName("joyride-step__header")[0].innerHTML=""+this.currentTour.title,document.getElementsByClassName("joyride-step__body")[0].innerHTML=""+this.currentTour.description},t=>{},()=>{null===this.currentTour?this.router.navigate(["/home"]):this.currentTour.redirectToAdmin?this.router.navigate(["/administration"]):this.endTour()})}}getCurrentStepType(){this.featureTourEnd=this.headerService.user.featureTour,this.currentStepType=this.getFeatureTourTypes().filter(t=>-1===this.featureTourEnd.indexOf(t))[0]}endTour(){void 0!==this.currentStepType&&(this.featureTourEnd.push(this.currentStepType),this.http.put("../rest/currentUser/profile/featureTour",{featureTour:this.featureTourEnd}).pipe(Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe(),this.getCurrentStepType())}getFeatureTourTypes(){return[...new Set(this.tour.map(t=>t.type))]}isComplete(){return"root_visible"!==this.headerService.user.mode&&"root_invisible"!==this.headerService.user.mode||this.headerService.user.featureTour.length===this.getFeatureTourTypes().length}}return t.\u0275fac=function(e){return new(e||t)(n.ac(g.e),n.ac(es),n.ac(y.a),n.ac(_t.a),n.ac(o.c),n.ac(v.b),n.ac(D.a))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function os(t,e){1&t&&(n.Wb(0,"div",8),n.Rb(1,"mat-spinner",9),n.Vb())}const rs=function(t,e,i){return{"fa-file-signature":t,"fa-thumbs-up":e,"fa-comment-dots":i}};function cs(t,e){if(1&t&&(n.Wb(0,"td",10),n.Wb(1,"div",11),n.Rb(2,"mat-icon",12),n.ic(3,"translate"),n.Vb(),n.Wb(4,"div",13),n.Qc(5),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.pc("title",n.jc(3,4,"lang.to_"+t.mode)),n.oc("ngClass",n.xc(6,rs,"sign"==t.mode,"visa"==t.mode,"note"==t.mode)),n.Db(2),n.pc("title",t.reference),n.Db(1),n.Sc(" ",t.reference," ")}}function ls(t,e){if(1&t&&(n.Wb(0,"td",14),n.Wb(1,"div",15),n.Wb(2,"span"),n.Qc(3),n.Vb(),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.pc("title",t.title),n.Db(2),n.Rc(t.title)}}function ds(t,e){if(1&t){const t=n.Xb();n.Wb(0,"tr",16),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().goTo(i)})),n.Vb()}}function hs(t,e){1&t&&(n.Wb(0,"div",17),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noResult"),"\n"))}let us=(()=>{class t{constructor(t,e,i,a,s){this.translate=t,this.http=e,this.dialog=i,this.notify=a,this.headerService=s,this.loading=!0,this.userList=[],this.displayedColumns=["id","title"],this.maarchParapheurUrl="",this.triggerEvent=new n.o,this.dataSource=new vt.p(this.userList)}ngOnInit(){this.loading=!0}ngAfterViewInit(){this.http.get("../rest/home/maarchParapheurDocuments").pipe(Object(Xt.a)(()=>this.loading=!1)).subscribe(t=>{setTimeout(()=>{this.dataSource=new vt.p(t.documents),this.maarchParapheurUrl=t.url,this.triggerEvent.emit(t.count.current)},0)},t=>{this.notify.handleErrors(t)})}goTo(t){window.open(this.maarchParapheurUrl+"/dist/index.html#/documents/"+t.id,"_blank")}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.b),n.Qb(D.a),n.Qb(y.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-maarch-parapheur-list"]],outputs:{triggerEvent:"triggerEvent"},decls:8,vars:4,consts:[["style","display:flex;height:100%;",4,"ngIf"],["mat-table","","matSort","","matSortActive","id","matSortDisableClear","","matSortDirection","asc",2,"width","100%","table-layout","fixed",3,"dataSource"],["matColumnDef","id"],["mat-cell","","style","width:15%;text-align:center;overflow:hidden;text-overflow: ellipsis;white-space: nowrap;padding: 5px;vertical-align: middle;",4,"matCellDef"],["matColumnDef","title"],["mat-cell","","style","width:45%;overflow:hidden;text-overflow: ellipsis;padding: 5px;vertical-align: middle;",4,"matCellDef"],["mat-row","","style","cursor:pointer;",3,"click",4,"matRowDef","matRowDefColumns"],["class","noResult",4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],["mat-cell","",2,"width","15%","text-align","center","overflow","hidden","text-overflow","ellipsis","white-space","nowrap","padding","5px","vertical-align","middle"],[2,"overflow","hidden","text-overflow","ellipsis"],["color","primary",1,"fas","fa-2x",3,"ngClass","title"],[2,"padding-top","5px","color","rgba(0,0,0,0.4)","font-size","90%","overflow","hidden","text-overflow","ellipsis",3,"title"],["mat-cell","",2,"width","45%","overflow","hidden","text-overflow","ellipsis","padding","5px","vertical-align","middle"],[2,"overflow","hidden","line-height","1.5em","height","3em","overflow","hidden",3,"title"],["mat-row","",2,"cursor","pointer",3,"click"],[1,"noResult"]],template:function(t,e){1&t&&(n.Oc(0,os,2,0,"div",0),n.Wb(1,"table",1),n.Ub(2,2),n.Oc(3,cs,6,10,"td",3),n.Tb(),n.Ub(4,4),n.Oc(5,ls,4,2,"td",5),n.Tb(),n.Oc(6,ds,1,0,"tr",6),n.Vb(),n.Oc(7,hs,3,3,"div",7)),2&t&&(n.oc("ngIf",e.loading),n.Db(1),n.oc("dataSource",e.dataSource),n.Db(5),n.oc("matRowDefColumns",e.displayedColumns),n.Db(1),n.oc("ngIf",0===e.dataSource.filteredData.length))},directives:[P.t,vt.o,Fe.a,vt.c,vt.b,vt.n,V.c,vt.a,S.a,P.q,vt.m],pipes:[g.d],styles:[".noResult[_ngcontent-%COMP%]{padding:10px;text-align:center;opacity:.5}"]}),t})(),ps=(()=>{class t{constructor(t,e,i){this.translate=t,this.changeDetectorRef=e,this.ngZone=i}transform(t,e=null){this.removeTimer();let i=new Date(t),n=("0"+i.getDate()).slice(-2),a=("0"+(i.getMonth()+1)).slice(-2),s=("0"+i.getHours()).slice(-2),o=("0"+i.getMinutes()).slice(-2),r=new Date,c=[];c[0]=this.translate.instant("lang.januaryShort"),c[1]=this.translate.instant("lang.februaryShort"),c[2]=this.translate.instant("lang.marchShort"),c[3]=this.translate.instant("lang.aprilShort"),c[4]=this.translate.instant("lang.mayShort"),c[5]=this.translate.instant("lang.juneShort"),c[6]=this.translate.instant("lang.julyShort"),c[7]=this.translate.instant("lang.augustShort"),c[8]=this.translate.instant("lang.septemberShort"),c[9]=this.translate.instant("lang.octoberShort"),c[10]=this.translate.instant("lang.novemberShort"),c[11]=this.translate.instant("lang.decemberShort");let l=Math.round(Math.abs((r.getTime()-i.getTime())/1e3)),d=("0"+r.getDate()).slice(-2),h=Number.isNaN(l)?1e3:1e3*this.getSecondsUntilUpdate(l);this.timer=this.ngZone.runOutsideAngular(()=>"undefined"!=typeof window?window.setTimeout(()=>{this.ngZone.run(()=>this.changeDetectorRef.markForCheck())},h):null);let u=Math.round(Math.abs(l/60)),p=Math.round(Math.abs(u/60)),b=Math.round(Math.abs(p/24));return Math.round(Math.abs(b/30.416)),Math.round(Math.abs(b/365)),t==this.translate.instant("lang.undefined")?this.translate.instant("lang.undefined"):Number.isNaN(l)?"":l<=45?this.getFormatedDate(this.translate.instant("lang.dateAgo").toLowerCase(),this.translate.instant("lang.fewSeconds"),e):l<=90?this.getFormatedDate(this.translate.instant("lang.dateAgo").toLowerCase(),this.translate.instant("lang.oneMinute"),e):u<=45?this.getFormatedDate(this.translate.instant("lang.dateAgo").toLowerCase(),u+" "+this.translate.instant("lang.minutes"),e):u<=90?this.getFormatedDate(this.translate.instant("lang.dateAgo").toLowerCase(),this.translate.instant("lang.oneHour"),e):p<=24&&n===d?this.getFormatedDate(this.translate.instant("lang.at").toLowerCase(),s+":"+o,e):p<=24||b<=5?this.getFormatedDate(this.translate.instant("lang.dateAgo").toLowerCase(),b+" "+this.translate.instant("lang.dayS"),e):this.getFormatedDate(this.translate.instant("lang.dateTo").toLowerCase(),b<=345?i.getDate()+" "+c[i.getMonth()]:n+"/"+a+"/"+i.getFullYear(),e)}ngOnDestroy(){this.removeTimer()}removeTimer(){this.timer&&(window.clearTimeout(this.timer),this.timer=null)}getSecondsUntilUpdate(t){return t<60?2:t<3600?30:t<86400?300:3600}getFormatedDate(t,e,i){return"full"===i?`${t} ${e}`:e}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.cc(),n.Qb(n.C))},t.\u0275pipe=n.Pb({name:"timeAgo",type:t,pure:!1}),t})(),bs=(()=>{class t{constructor(t,e,i){this.translate=t,this.changeDetectorRef=e,this.ngZone=i}transform(t,e=null){this.removeTimer();let i=new Date(t),n=("0"+i.getDate()).slice(-2),a=("0"+(i.getMonth()+1)).slice(-2),s=(("0"+i.getHours()).slice(-2),("0"+i.getMinutes()).slice(-2),new Date),o=[];o[0]=this.translate.instant("lang.januaryShort"),o[1]=this.translate.instant("lang.februaryShort"),o[2]=this.translate.instant("lang.marchShort"),o[3]=this.translate.instant("lang.aprilShort"),o[4]=this.translate.instant("lang.mayShort"),o[5]=this.translate.instant("lang.juneShort"),o[6]=this.translate.instant("lang.julyShort"),o[7]=this.translate.instant("lang.augustShort"),o[8]=this.translate.instant("lang.septemberShort"),o[9]=this.translate.instant("lang.octoberShort"),o[10]=this.translate.instant("lang.novemberShort"),o[11]=this.translate.instant("lang.decemberShort");let r=Math.round(Math.abs((s.getTime()-i.getTime())/1e3)),c=("0"+s.getDate()).slice(-2),l=Number.isNaN(r)?1e3:1e3*this.getSecondsUntilUpdate(r);this.timer=this.ngZone.runOutsideAngular(()=>"undefined"!=typeof window?window.setTimeout(()=>{this.ngZone.run(()=>this.changeDetectorRef.markForCheck())},l):null);let d=Math.round(Math.abs(r/60)),h=Math.round(Math.abs(d/60)),u=Math.round(Math.abs(h/24));return Math.round(Math.abs(u/30.416)),Math.round(Math.abs(u/365)),null==t?"<span>"+this.translate.instant("lang.undefined")+"</span>":s>i?this.getFormatedDate("","badge"===e?h<=24&&n===c||h<=24?"<b>"+this.translate.instant("lang.outdated")+" "+this.translate.instant("lang.fromRange").toLowerCase()+" "+h+" "+this.translate.instant("lang.hours")+" !</b>":"<b>"+this.translate.instant("lang.outdated")+" "+this.translate.instant("lang.fromRange").toLowerCase()+" "+u+" "+this.translate.instant("lang.dayS")+" !</b>":"<b>"+this.translate.instant("lang.outdated")+" !</b>","warn",e):Number.isNaN(r)?"":d<=59?this.getFormatedDate(this.translate.instant("lang.in")[0].toUpperCase()+this.translate.instant("lang.in").substr(1).toLowerCase(),d+" "+this.translate.instant("lang.minutes"),"warn",e):h<=23?this.getFormatedDate(this.translate.instant("lang.in")[0].toUpperCase()+this.translate.instant("lang.in").substr(1).toLowerCase(),h+" "+this.translate.instant("lang.hours"),"warn",e):u<=5?this.getFormatedDate(this.translate.instant("lang.in")[0].toUpperCase()+this.translate.instant("lang.in").substr(1).toLowerCase(),u+" "+this.translate.instant("lang.dayS"),"secondary",e):u<=345?this.getFormatedDate(this.translate.instant("lang.onRange")[0].toUpperCase()+this.translate.instant("lang.onRange").substr(1).toLowerCase(),i.getDate()+" "+o[i.getMonth()],"accent",e):n+"/"+a+"/"+i.getFullYear()}ngOnDestroy(){this.removeTimer()}removeTimer(){this.timer&&(window.clearTimeout(this.timer),this.timer=null)}getSecondsUntilUpdate(t){return t<60?2:t<3600?30:t<86400?300:3600}getFormatedDate(t,e,i,n){return"badge"===n?`${t} ${e} <i class="fas fa-circle badgePipe_${i}"></i>`:`<span color="${i}">${e}</span>`}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.cc(),n.Qb(n.C))},t.\u0275pipe=n.Pb({name:"timeLimit",type:t,pure:!1}),t})();function fs(t,e){if(1&t&&(n.Rb(0,"img",13),n.ic(1,"async"),n.ic(2,"secureUrl")),2&t){const t=n.hc();n.oc("src",n.jc(1,1,n.jc(2,3,t.thumbnailUrl)),n.Gc)}}function ms(t,e){if(1&t&&(n.Wb(0,"mat-card",14),n.Wb(1,"div",15),n.Wb(2,"div",16),n.Rb(3,"span",17),n.Vb(),n.Vb(),n.Wb(4,"div",18),n.Wb(5,"button",19),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(3),n.oc("innerHTML",t.homeMessage,n.Ec),n.Db(3),n.Rc(n.jc(7,2,"lang.aboutUs"))}}function gs(t,e){if(1&t&&(n.Wb(0,"span",22),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("noDoc",0===t.nbMpDocs),n.pc("matBadge",t.nbMpDocs),n.Db(1),n.Rc(n.jc(2,4,"lang.maarchParapheurDocuments"))}}function vs(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab"),n.Oc(1,gs,3,6,"ng-template",20),n.Wb(2,"app-maarch-parapheur-list",21),n.dc("triggerEvent",(function(e){return n.Dc(t),n.hc().updateNbMpDocs(e)})),n.Vb(),n.Vb()}}function _s(t,e){1&t&&(n.Wb(0,"div",26),n.Rb(1,"mat-spinner",27),n.Vb())}function ys(t,e){if(1&t&&(n.Wb(0,"div",42),n.ic(1,"date"),n.ic(2,"translate"),n.ic(3,"translate"),n.Rb(4,"i",43),n.ic(5,"translate"),n.Qc(6),n.ic(7,"timeAgo"),n.Vb()),2&t){const t=n.hc().$implicit;n.qc("id","",t.res_id,"_creation_date"),n.pc("title",n.kc(1,4,t.creation_date,n.jc(2,7,"lang.onRange")+" dd/MM/y "+n.jc(3,9,"lang.atRange")+" HH:mm")),n.Db(4),n.pc("title",n.jc(5,11,"lang.creationDate")),n.Db(2),n.Sc(" ",n.jc(7,13,t.creation_date)," ")}}function xs(t,e){1&t&&(n.Wb(0,"span",44),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.confidential")))}const Cs=function(t){return{width:t}},Os=function(t){return{color:t}};function Ds(t,e){if(1&t&&(n.Wb(0,"td",36),n.Oc(1,ys,8,15,"div",37),n.Wb(2,"div",38),n.Rb(3,"mat-icon",39),n.Oc(4,xs,3,3,"span",40),n.Vb(),n.Wb(5,"div",41),n.Qc(6),n.Vb(),n.Vb()),2&t){const t=e.$implicit,i=n.hc(3);n.oc("ngStyle",n.vc(16,Cs,i.appService.getViewMode()?"30%":"15%")),n.Db(1),n.oc("ngIf",null==t.closing_date&&i.appService.getViewMode()),n.Db(2),n.Hb("",t.status_icon.charAt(0),"",t.status_icon.charAt(1)," ",t.status_icon," ",t.status_icon.charAt(0),"",t.status_icon.charAt(1),"-2x"),n.rc("title","",t.status_label," (",t.status_id,")"),n.oc("ngStyle",n.vc(18,Os,t.priority_color)),n.Db(1),n.oc("ngIf","Y"===t.confidentiality),n.Db(1),n.rc("title","",t.alt_identifier," (n\xb0",t.res_id,")"),n.Db(1),n.Sc(" ",t.alt_identifier," ")}}function ws(t,e){if(1&t&&(n.Wb(0,"div",48),n.Rb(1,"i",49),n.ic(2,"translate"),n.Qc(3,"\xa0 "),n.Rb(4,"span",50),n.ic(5,"timeLimit"),n.ic(6,"date"),n.ic(7,"translate"),n.ic(8,"translate"),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.pc("title",n.jc(2,3,"lang.processLimitDate")),n.Db(3),n.pc("title",n.kc(6,7,t.process_limit_date,n.jc(7,10,"lang.onRange")+" dd/MM/y "+n.jc(8,12,"lang.atRange")+" HH:mm")),n.oc("innerHTML",n.jc(5,5,t.process_limit_date),n.Ec)}}function Ms(t,e){if(1&t&&(n.Wb(0,"td",45),n.Oc(1,ws,9,14,"div",46),n.Wb(2,"div",47),n.Wb(3,"span"),n.Qc(4),n.Vb(),n.Vb(),n.Vb()),2&t){const t=e.$implicit,i=n.hc(3);n.Db(1),n.oc("ngIf",null==t.closing_date&&i.appService.getViewMode()),n.Db(1),n.pc("title",t.subject),n.Db(2),n.Rc(t.subject)}}function ks(t,e){if(1&t&&(n.Wb(0,"div",42),n.ic(1,"date"),n.ic(2,"translate"),n.ic(3,"translate"),n.Rb(4,"i",43),n.ic(5,"translate"),n.Qc(6),n.ic(7,"timeAgo"),n.Vb()),2&t){const t=n.hc().$implicit;n.qc("id","",t.res_id,"_creation_date"),n.pc("title",n.kc(1,4,t.creation_date,n.jc(2,7,"lang.onRange")+" dd/MM/y "+n.jc(3,9,"lang.atRange")+" HH:mm")),n.Db(4),n.pc("title",n.jc(5,11,"lang.creationDate")),n.Db(2),n.Sc(" ",n.jc(7,13,t.creation_date)," ")}}function Ss(t,e){if(1&t&&(n.Wb(0,"div",55),n.Rb(1,"i",49),n.ic(2,"translate"),n.Qc(3,"\xa0 "),n.Rb(4,"span",50),n.ic(5,"timeLimit"),n.ic(6,"date"),n.ic(7,"translate"),n.ic(8,"translate"),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.pc("title",n.jc(2,3,"lang.processLimitDate")),n.Db(3),n.pc("title",n.kc(6,7,t.process_limit_date,n.jc(7,10,"lang.onRange")+" dd/MM/y "+n.jc(8,12,"lang.atRange")+" HH:mm")),n.oc("innerHTML",n.jc(5,5,t.process_limit_date),n.Ec)}}function Is(t,e){if(1&t&&(n.Wb(0,"div",55),n.Rb(1,"i",56),n.ic(2,"translate"),n.Qc(3,"\xa0 "),n.Wb(4,"span",57),n.ic(5,"date"),n.ic(6,"translate"),n.ic(7,"translate"),n.Qc(8),n.ic(9,"timeAgo"),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.pc("title",n.jc(2,3,"lang.closingDate")),n.Db(3),n.pc("title",n.kc(5,5,t.closing_date,n.jc(6,8,"lang.onRange")+" dd/MM/y "+n.jc(7,10,"lang.atRange")+" HH:mm")),n.Db(4),n.Rc(n.jc(9,12,t.closing_date))}}const Ps=function(t){return[t]};function Vs(t,e){if(1&t){const t=n.Xb();n.Wb(0,"td",51),n.Oc(1,ks,8,15,"div",37),n.Oc(2,Ss,9,14,"div",52),n.Oc(3,Is,10,14,"div",52),n.Wb(4,"div"),n.Wb(5,"button",53),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(3);return i.stopPropagation(),s.viewDocument(a)}))("mouseenter",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).viewThumbnail(i)}))("mouseleave",(function(){return n.Dc(t),n.hc(3).closeThumbnail()})),n.ic(6,"translate"),n.ic(7,"translate"),n.Rb(8,"mat-icon",54),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",null==t.closing_date),n.Db(1),n.oc("ngIf",null==t.closing_date),n.Db(1),n.oc("ngIf",null!=t.closing_date),n.Db(2),n.pc("title",t.hasDocument?n.jc(6,6,"lang.viewResource"):n.jc(7,8,"lang.noDocument")),n.oc("disabled",!t.hasDocument),n.Db(3),n.oc("ngClass",n.vc(10,Ps,t.hasDocument?"fa-eye":"fa-eye-slash"))}}function Rs(t,e){if(1&t){const t=n.Xb();n.Wb(0,"tr",58),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).goToDetail(i)})),n.Vb()}}function js(t,e){if(1&t&&(n.Wb(0,"table",28),n.Ub(1,29),n.Oc(2,Ds,7,20,"td",30),n.Tb(),n.Ub(3,31),n.Oc(4,Ms,5,3,"td",32),n.Tb(),n.Ub(5,33),n.Oc(6,Vs,9,12,"td",34),n.Tb(),n.Oc(7,Rs,1,0,"tr",35),n.Vb()),2&t){const t=n.hc(2);n.oc("dataSource",t.dataSource),n.Db(7),n.oc("matRowDefColumns",t.displayedColumns)}}function As(t,e){if(1&t&&(n.Wb(0,"mat-tab",23),n.ic(1,"translate"),n.Oc(2,_s,2,0,"div",24),n.Oc(3,js,8,2,"table",25),n.Vb()),2&t){const t=n.hc();n.pc("label",n.jc(1,3,"lang.myLastResources")),n.Db(2),n.oc("ngIf",t.loading),n.Db(1),n.oc("ngIf",!t.loading)}}let Ws=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this.translate=t,this.http=e,this.dialog=i,this.sanitizer=n,this.notify=a,this.headerService=s,this.appService=o,this.router=r,this.featureTourService=c,this.loading=!1,this.docUrl="",this.currentDate="",this.nbMpDocs=0,this.displayedColumns=["res_id","subject","creation_date"],window.pdfWorkerSrc="pdfjs/pdf.worker.min.js"}ngOnInit(){this.loading=!0,this.appService.getViewMode()&&(this.displayedColumns=["res_id","subject"]),this.headerService.setHeader(this.translate.instant("lang.home"));const t=new Date;this.currentDate=t.toLocaleDateString(this.translate.instant("lang.langISO"),{weekday:"long",year:"numeric",month:"long",day:"numeric"}),this.http.get("../rest/home").subscribe(t=>{this.homeData=t,this.homeMessage=t.homeMessage})}ngAfterViewInit(){this.featureTourService.isComplete()||this.featureTourService.init(),this.http.get("../rest/home/lastRessources").subscribe(t=>{setTimeout(()=>{this.dataSource=new vt.p(t.lastResources),this.loading=!1},0)})}viewDocument(t){this.http.get(`../rest/resources/${t.res_id}/content?mode=view`,{responseType:"blob"}).pipe(Object(mt.a)(e=>{const i=new Blob([e],{type:"application/pdf"}),n=URL.createObjectURL(i),a=window.open();a.document.write(`<iframe style="width: 100%;height: 100%;margin: 0;padding: 0;" src="${n}" frameborder="0" allowfullscreen></iframe>`),a.document.title=t.alt_identifier}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}viewThumbnail(t){const e=+new Date;this.thumbnailUrl="../rest/resources/"+t.res_id+"/thumbnail?tsp="+e,$("#viewThumbnail").show(),$("#listContent").css({overflow:"hidden"})}closeThumbnail(){$("#viewThumbnail").hide(),$("#listContent").css({overflow:"auto"})}goToDetail(t){this.http.get("../rest/resources/"+t.res_id+"/isAllowed").subscribe(e=>{e.isAllowed?this.router.navigate(["/resources/"+t.res_id]):this.notify.error(this.translate.instant("lang.documentOutOfPerimeter"))},()=>{this.notify.error(this.translate.instant("lang.errorOccured"))})}updateNbMpDocs(t){this.nbMpDocs=t}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.b),n.Qb(ca.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(o.c),n.Qb(ss))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Xc(gt.c,!0),2&t&&n.yc(i=n.ec())&&(e.viewPanels=i)},decls:17,vars:10,consts:[["autosize","","joyrideStep","welcome","stepPosition","center",1,"maarch-container"],["id","viewThumbnail",2,"display","none","position","fixed","z-index","2","margin-left","1px"],["style","max-height: 100vh;",3,"src",4,"ngIf"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],["style","background: #135F7F;color: white;box-shadow: none;border: solid 2px white;width: 100%;border-radius: 20px;padding-bottom: 40px;",4,"ngIf"],[1,"container"],[1,"container-content"],[4,"ngIf"],[3,"label",4,"ngIf"],[2,"max-height","100vh",3,"src"],[2,"background","#135F7F","color","white","box-shadow","none","border","solid 2px white","width","100%","border-radius","20px","padding-bottom","40px"],[2,"display","flex","max-height","250px","overflow","auto"],[2,"padding-left","10px"],[3,"innerHTML"],[2,"text-align","right","opacity","0.5"],["mat-button","","routerLink","/about-us",2,"position","absolute","font-size","10px","right","0px","bottom","0px"],["matTabLabel",""],[3,"triggerEvent"],["matBadgeOverlap","false",3,"matBadge"],[3,"label"],["style","display:flex;height:100%;",4,"ngIf"],["mat-table","","matSort","","matSortActive","res_id","matSortDisableClear","","matSortDirection","asc","style","width:100%;table-layout: fixed;",3,"dataSource",4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],["mat-table","","matSort","","matSortActive","res_id","matSortDisableClear","","matSortDirection","asc",2,"width","100%","table-layout","fixed",3,"dataSource"],["matColumnDef","res_id"],["class","first_col","mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","subject"],["mat-cell","","style","width:45%;overflow:hidden;text-overflow: ellipsis;padding: 5px;vertical-align: middle;",4,"matCellDef"],["matColumnDef","creation_date"],["mat-cell","","style","text-align: right;width:15%;overflow:hidden;text-overflow: ellipsis;white-space: nowrap;padding: 5px;vertical-align: middle;",4,"matCellDef"],["mat-row","","style","cursor:pointer;",3,"click",4,"matRowDef","matRowDefColumns"],["mat-cell","",1,"first_col",3,"ngStyle"],["style","color: rgba(0,0,0,0.4);font-size: 90%;overflow: hidden;text-overflow: ellipsis;",3,"id","title",4,"ngIf"],[2,"overflow","hidden","text-overflow","ellipsis"],["color","primary",3,"ngStyle","title"],["class","watermark",4,"ngIf"],[2,"padding-top","5px","color","rgba(0,0,0,0.4)","font-size","90%","overflow","hidden","text-overflow","ellipsis",3,"title"],[2,"color","rgba(0,0,0,0.4)","font-size","90%","overflow","hidden","text-overflow","ellipsis",3,"id","title"],[1,"fa","fa-calendar",3,"title"],[1,"watermark"],["mat-cell","",2,"width","45%","overflow","hidden","text-overflow","ellipsis","padding","5px","vertical-align","middle"],["style","color: rgba(0,0,0,0.4);font-size: 90%;overflow: hidden;text-overflow: ellipsis;text-align: right;",4,"ngIf"],[2,"overflow","hidden","line-height","1.5em","height","3em","overflow","hidden",3,"title"],[2,"color","rgba(0,0,0,0.4)","font-size","90%","overflow","hidden","text-overflow","ellipsis","text-align","right"],[1,"fa","fa-stopwatch",3,"title"],[3,"innerHTML","title"],["mat-cell","",2,"text-align","right","width","15%","overflow","hidden","text-overflow","ellipsis","white-space","nowrap","padding","5px","vertical-align","middle"],["style","color: rgba(0,0,0,0.4);font-size: 90%;overflow: hidden;text-overflow: ellipsis;",4,"ngIf"],["mat-icon-button","",3,"disabled","title","click","mouseenter","mouseleave"],["color","primary",1,"fa",3,"ngClass"],[2,"color","rgba(0,0,0,0.4)","font-size","90%","overflow","hidden","text-overflow","ellipsis"],[1,"fa","fa-lock",3,"title"],[3,"title"],["mat-row","",2,"cursor","pointer",3,"click"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"mat-card",1),n.Oc(3,fs,3,5,"img",2),n.Vb(),n.Wb(4,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",6),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Wb(10,"div",7),n.Oc(11,ms,8,4,"mat-card",8),n.Vb(),n.Vb(),n.Wb(12,"div",9),n.Wb(13,"div",10),n.Wb(14,"mat-tab-group"),n.Oc(15,vs,3,0,"mat-tab",11),n.Oc(16,As,4,5,"mat-tab",12),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.oc("ngIf",""!==e.thumbnailUrl),n.Db(2),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.oc("ngIf",e.homeMessage),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(3),n.oc("ngIf",void 0!==e.homeData&&e.homeData.isLinkedToMaarchParapheur),n.Db(1),n.oc("ngIf",void 0!==e.homeData))},directives:[I.e,za,I.f,K.a,P.t,Ot,We,Te.c,k.b,o.d,Te.a,Te.d,us,wt.a,V.c,vt.o,Fe.a,vt.c,vt.b,vt.n,vt.a,P.w,S.a,P.q,vt.m],pipes:[P.b,si,g.d,P.f,ps,bs],styles:[".first_col[_ngcontent-%COMP%]{position:relative;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:5px;vertical-align:middle}.noDoc[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{color:#666;opacity:.5}.watermark[_ngcontent-%COMP%]{position:absolute;left:50%;transform:translateX(-50%) rotate(-20deg);color:red;font-weight:700;opacity:.6}"]}),t})();const Ts=["snav"];function Es(t,e){1&t&&(n.Wb(0,"div"),n.Rb(1,"i",9),n.Vb())}function Fs(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div"),n.Wb(1,"div",10),n.Wb(2,"div",11),n.Wb(3,"h2"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Wb(6,"form",12,13),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().submitNumericPackage()})),n.Wb(8,"input",14),n.dc("change",(function(e){return n.Dc(t),n.hc().uploadNumericPackage(e)})),n.Vb(),n.Rb(9,"br"),n.Wb(10,"div",15),n.Wb(11,"div",16),n.Wb(12,"button",17),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(7);n.Db(4),n.Rc(n.jc(5,3,"lang.saveNumericPackage")),n.Db(8),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(14,5,"lang.save"))}}let Ls=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.zone=i,this.notify=n,this.headerService=a,this.appService=s,this.numericPackage={base64:"",name:"",type:"",size:0,label:"",extension:""},this.loading=!1,window.angularSaveNumericPackageComponent={componentAfterUpload:t=>this.processAfterUpload(t)}}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.saveNumericPackage")),this.loading=!1}processAfterUpload(t){this.zone.run(()=>this.resfreshUpload(t))}resfreshUpload(t){this.numericPackage.base64=t.replace(/^data:.*?;base64,/,"")}uploadNumericPackage(t){if(t.target.files&&t.target.files[0]){var e=new FileReader;this.numericPackage.name=t.target.files[0].name,this.numericPackage.size=t.target.files[0].size,this.numericPackage.type=t.target.files[0].type,this.numericPackage.extension=t.target.files[0].name.split(".").pop(),""==this.numericPackage.label&&(this.numericPackage.label=this.numericPackage.name),e.readAsDataURL(t.target.files[0]),e.onload=function(t){window.angularSaveNumericPackageComponent.componentAfterUpload(t.target.result)}}}submitNumericPackage(){0!=this.numericPackage.size?this.http.post("../rest/saveNumericPackage",this.numericPackage).subscribe(t=>{t.errors?this.notify.error(t.errors):(this.numericPackage={base64:"",name:"",type:"",size:0,label:"",extension:""},$("#numericPackageFilePath").val(null),this.notify.success(this.translate.instant("lang.numericPackageImported")),null!=t.basketRedirection&&(window.location.href=t.basketRedirection))},t=>{this.notify.error(t.error.errors)}):(this.numericPackage.name="",this.numericPackage.size=0,this.numericPackage.type="",this.numericPackage.base64="",this.numericPackage.extension="",this.notify.error(this.translate.instant("lang.noNumericPackageSelected")))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(n.C),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(Ts,!0),2&t&&n.yc(i=n.ec())&&(e.sidenavLeft=i.first)},decls:13,vars:8,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],[4,"ngIf"],[1,"fa","fa-spinner","fa-spin","fa-5x",2,"margin-left","50%","margin-top","16%","font-size","8em"],[1,"row","row-eq-height"],[1,"col-md-5","col-md-offset-3",2,"margin-top","50px","border-top","solid 2px #F99830","border-bottom","solid 2px #F99830","padding","10px"],[1,"form-horizontal",3,"ngSubmit"],["saveNumericPackageForm","ngForm"],["id","numericPackageFilePath","type","file","name","files[]",3,"change"],[1,"form-group"],[2,"text-align","center"],["mat-raised-button","","color","primary","type","submit",3,"disabled"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,Es,2,0,"div",8),n.Oc(12,Fs,15,7,"div",8),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,X.K,X.v,X.w,k.b],pipes:[g.d],styles:[".upload-drop-zone[_ngcontent-%COMP%]{font-size:16px;height:100px;border-width:2px;margin-bottom:20px;color:#ccc;border-style:dashed;border-color:#ccc;line-height:100px;text-align:center}.upload-drop-zone.drop[_ngcontent-%COMP%]{color:#222;border-color:#222}.avatar[_ngcontent-%COMP%]{text-decoration:none;background:#135f7f;color:#fff;width:100px;height:100px;border-radius:5px;display:block;overflow:hidden;margin:5px}"]}),t})();const Qs=["pdfViewerContainer"],Ns=function(t){const e=new t.EventBus(!0);var i;return(i=e).on("documentload",(function(){const t=document.createEvent("CustomEvent");t.initCustomEvent("documentload",!0,!0,{}),window.dispatchEvent(t)})),i.on("pagerendered",(function(t){const e=document.createEvent("CustomEvent");e.initCustomEvent("pagerendered",!0,!0,{pageNumber:t.pageNumber,cssTransform:t.cssTransform}),t.source.div.dispatchEvent(e)})),i.on("textlayerrendered",(function(t){const e=document.createEvent("CustomEvent");e.initCustomEvent("textlayerrendered",!0,!0,{pageNumber:t.pageNumber}),t.source.textLayerDiv.dispatchEvent(e)})),i.on("pagechanging",(function(t){const e=document.createEvent("UIEvents");e.initEvent("pagechanging",!0,!0),e.pageNumber=t.pageNumber,t.source.container.dispatchEvent(e)})),i.on("pagesinit",(function(t){const e=document.createEvent("CustomEvent");e.initCustomEvent("pagesinit",!0,!0,null),t.source.container.dispatchEvent(e)})),i.on("pagesloaded",(function(t){const e=document.createEvent("CustomEvent");e.initCustomEvent("pagesloaded",!0,!0,{pagesCount:t.pagesCount}),t.source.container.dispatchEvent(e)})),i.on("scalechange",(function(t){const e=document.createEvent("UIEvents");e.initEvent("scalechange",!0,!0),e.scale=t.scale,e.presetValue=t.presetValue,t.source.container.dispatchEvent(e)})),i.on("updateviewarea",(function(t){const e=document.createEvent("UIEvents");e.initEvent("updateviewarea",!0,!0),e.location=t.location,t.source.container.dispatchEvent(e)})),i.on("find",(function(t){if(t.source===window)return;const e=document.createEvent("CustomEvent");e.initCustomEvent("find"+t.type,!0,!0,{query:t.query,phraseSearch:t.phraseSearch,caseSensitive:t.caseSensitive,highlightAll:t.highlightAll,findPrevious:t.findPrevious}),window.dispatchEvent(e)})),i.on("attachmentsloaded",(function(t){const e=document.createEvent("CustomEvent");e.initCustomEvent("attachmentsloaded",!0,!0,{attachmentsCount:t.attachmentsCount}),t.source.container.dispatchEvent(e)})),i.on("sidebarviewchanged",(function(t){const e=document.createEvent("CustomEvent");e.initCustomEvent("sidebarviewchanged",!0,!0,{view:t.view}),t.source.outerContainer.dispatchEvent(e)})),i.on("pagemode",(function(t){const e=document.createEvent("CustomEvent");e.initCustomEvent("pagemode",!0,!0,{mode:t.mode}),t.source.pdfViewer.container.dispatchEvent(e)})),i.on("namedaction",(function(t){const e=document.createEvent("CustomEvent");e.initCustomEvent("namedaction",!0,!0,{action:t.action}),t.source.pdfViewer.container.dispatchEvent(e)})),i.on("presentationmodechanged",(function(t){const e=document.createEvent("CustomEvent");e.initCustomEvent("presentationmodechanged",!0,!0,{active:t.active,switchInProgress:t.switchInProgress}),window.dispatchEvent(e)})),i.on("outlineloaded",(function(t){const e=document.createEvent("CustomEvent");e.initCustomEvent("outlineloaded",!0,!0,{outlineCount:t.outlineCount}),t.source.container.dispatchEvent(e)})),e};var zs;let Bs,Us;function $s(){return"undefined"==typeof window}$s()||(Bs=i("lRFz"),Us=i("louq"),Bs.verbosity=Bs.VerbosityLevel.ERRORS);var Hs=function(t){return t[t.DISABLED=0]="DISABLED",t[t.ENABLED=1]="ENABLED",t[t.ENHANCED=2]="ENHANCED",t}({});let Gs=(()=>{let t=zs=class{constructor(t){if(this.element=t,this.isVisible=!1,this._cMapsUrl=void 0!==Bs?`https://unpkg.com/pdfjs-dist@${Bs.version}/cmaps/`:null,this._renderText=!0,this._renderTextMode=Hs.ENABLED,this._stickToPage=!1,this._originalSize=!0,this._page=1,this._zoom=1,this._zoomScale="page-width",this._rotation=0,this._showAll=!0,this._canAutoResize=!0,this._fitToPage=!1,this._externalLinkTarget="blank",this._showBorders=!1,this.isInitialized=!1,this.afterLoadComplete=new n.o,this.pageRendered=new n.o,this.textLayerRendered=new n.o,this.onError=new n.o,this.onProgress=new n.o,this.pageChange=new n.o(!0),$s())return;let e;e=window.hasOwnProperty("pdfWorkerSrc")&&"string"==typeof window.pdfWorkerSrc&&window.pdfWorkerSrc?window.pdfWorkerSrc:`https://cdnjs.cloudflare.com/ajax/libs/pdf.js/${Bs.version}/pdf.worker.min.js`,Bs.GlobalWorkerOptions.workerSrc=e}set cMapsUrl(t){this._cMapsUrl=t}set page(t){const e=t=parseInt(t,10)||1;this._pdf&&(t=this.getValidPageNumber(t)),this._page=t,e!==t&&this.pageChange.emit(t)}set renderText(t){this._renderText=t}set renderTextMode(t){this._renderTextMode=t}set originalSize(t){this._originalSize=t}set showAll(t){this._showAll=t}set stickToPage(t){this._stickToPage=t}set zoom(t){t<=0||(this._zoom=t)}get zoom(){return this._zoom}set zoomScale(t){this._zoomScale=t}get zoomScale(){return this._zoomScale}set rotation(t){"number"==typeof t&&t%90==0?this._rotation=t:console.warn("Invalid pages rotation angle.")}set externalLinkTarget(t){this._externalLinkTarget=t}set autoresize(t){this._canAutoResize=Boolean(t)}set fitToPage(t){this._fitToPage=Boolean(t)}set showBorders(t){this._showBorders=Boolean(t)}static getLinkTarget(t){switch(t){case"blank":return Bs.LinkTarget.BLANK;case"none":return Bs.LinkTarget.NONE;case"self":return Bs.LinkTarget.SELF;case"parent":return Bs.LinkTarget.PARENT;case"top":return Bs.LinkTarget.TOP}return null}static setExternalLinkTarget(t){const e=zs.getLinkTarget(t);null!==e&&(Bs.externalLinkTarget=e)}ngAfterViewChecked(){if(this.isInitialized)return;const t=this.pdfViewerContainer.nativeElement.offsetParent;!0!==this.isVisible||null!=t?!1===this.isVisible&&null!=t&&(this.isVisible=!0,setTimeout(()=>{this.ngOnInit(),this.ngOnChanges({src:this.src})})):this.isVisible=!1}ngOnInit(){!$s()&&this.isVisible&&(this.isInitialized=!0,this.setupMultiPageViewer(),this.setupSinglePageViewer())}ngOnDestroy(){this.clear()}onPageResize(){this._canAutoResize&&this._pdf&&(this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{this.updateSize()},100))}get pdfLinkService(){return this._showAll?this.pdfMultiPageLinkService:this.pdfSinglePageLinkService}get pdfViewer(){return this.getCurrentViewer()}get pdfFindController(){return this._showAll?this.pdfMultiPageFindController:this.pdfSinglePageFindController}ngOnChanges(t){if(!$s()&&this.isVisible)if("src"in t)this.loadPDF();else if(this._pdf){if("renderText"in t?(this.getCurrentViewer().textLayerMode=this._renderText?this._renderTextMode:Hs.DISABLED,this.resetPdfDocument()):"showAll"in t&&this.resetPdfDocument(),"page"in t){if(t.page.currentValue===this._latestScrolledPage)return;this.getCurrentViewer().scrollPageIntoView({pageNumber:this._page})}this.update()}}updateSize(){const t=this.getCurrentViewer();this._pdf.getPage(t.currentPageNumber).then(e=>{const i=this._rotation||e.rotate,n=e.getViewport({scale:this._zoom,rotation:i}).width*zs.CSS_UNITS;let a=this._zoom,s=!0;if(!this._originalSize||this._fitToPage&&n>this.pdfViewerContainer.nativeElement.clientWidth){const t=e.getViewport({scale:1,rotation:i});a=this.getScale(t.width,t.height),s=!this._stickToPage}t._setScale(a,s)})}clear(){this.loadingTask&&!this.loadingTask.destroyed&&this.loadingTask.destroy(),this._pdf&&(this._pdf.destroy(),this._pdf=null,this.pdfMultiPageViewer.setDocument(null),this.pdfSinglePageViewer.setDocument(null),this.pdfMultiPageLinkService.setDocument(null,null),this.pdfSinglePageLinkService.setDocument(null,null),this.pdfMultiPageFindController.setDocument(null),this.pdfSinglePageFindController.setDocument(null))}setupMultiPageViewer(){Bs.disableTextLayer=!this._renderText,zs.setExternalLinkTarget(this._externalLinkTarget);const t=Ns(Us);t.on("pagerendered",t=>{this.pageRendered.emit(t)}),t.on("pagechanging",t=>{this.pageScrollTimeout&&clearTimeout(this.pageScrollTimeout),this.pageScrollTimeout=setTimeout(()=>{this._latestScrolledPage=t.pageNumber,this.pageChange.emit(t.pageNumber)},100)}),t.on("textlayerrendered",t=>{this.textLayerRendered.emit(t)}),this.pdfMultiPageLinkService=new Us.PDFLinkService({eventBus:t}),this.pdfMultiPageFindController=new Us.PDFFindController({linkService:this.pdfMultiPageLinkService,eventBus:t});const e={eventBus:t,container:this.element.nativeElement.querySelector("div"),removePageBorders:!this._showBorders,linkService:this.pdfMultiPageLinkService,textLayerMode:this._renderText?this._renderTextMode:Hs.DISABLED,findController:this.pdfMultiPageFindController};this.pdfMultiPageViewer=new Us.PDFViewer(e),this.pdfMultiPageLinkService.setViewer(this.pdfMultiPageViewer),this.pdfMultiPageFindController.setDocument(this._pdf)}setupSinglePageViewer(){Bs.disableTextLayer=!this._renderText,zs.setExternalLinkTarget(this._externalLinkTarget);const t=Ns(Us);t.on("pagechanging",t=>{t.pageNumber!=this._page&&(this.page=t.pageNumber)}),t.on("pagerendered",t=>{this.pageRendered.emit(t)}),t.on("textlayerrendered",t=>{this.textLayerRendered.emit(t)}),this.pdfSinglePageLinkService=new Us.PDFLinkService({eventBus:t}),this.pdfSinglePageFindController=new Us.PDFFindController({linkService:this.pdfSinglePageLinkService,eventBus:t});const e={eventBus:t,container:this.element.nativeElement.querySelector("div"),removePageBorders:!this._showBorders,linkService:this.pdfSinglePageLinkService,textLayerMode:this._renderText?this._renderTextMode:Hs.DISABLED,findController:this.pdfSinglePageFindController};this.pdfSinglePageViewer=new Us.PDFSinglePageViewer(e),this.pdfSinglePageLinkService.setViewer(this.pdfSinglePageViewer),this.pdfSinglePageFindController.setDocument(this._pdf),this.pdfSinglePageViewer._currentPageNumber=this._page}getValidPageNumber(t){return t<1?1:t>this._pdf.numPages?this._pdf.numPages:t}getDocumentParams(){const t=typeof this.src;if(!this._cMapsUrl)return this.src;const e={cMapUrl:this._cMapsUrl,cMapPacked:!0};return"string"===t?e.url=this.src:"object"===t&&(void 0!==this.src.byteLength?e.data=this.src:Object.assign(e,this.src)),e}loadPDF(){if(!this.src)return;if(this.lastLoaded===this.src)return void this.update();this.clear(),this.loadingTask=Bs.getDocument(this.getDocumentParams()),this.loadingTask.onProgress=t=>{this.onProgress.emit(t)};const t=this.src;this.loadingTask.promise.then(e=>{this._pdf=e,this.lastLoaded=t,this.afterLoadComplete.emit(e),this.pdfMultiPageViewer||(this.setupMultiPageViewer(),this.setupSinglePageViewer()),this.resetPdfDocument(),this.update()},t=>{this.onError.emit(t)})}update(){this.page=this._page,this.render()}render(){this._page=this.getValidPageNumber(this._page);const t=this.getCurrentViewer();0===this._rotation&&t.pagesRotation===this._rotation||setTimeout(()=>{t.pagesRotation=this._rotation}),this._stickToPage&&setTimeout(()=>{t.currentPageNumber=this._page}),this.updateSize()}getScale(t,e){const i=this._showBorders?2*zs.BORDER_WIDTH:0,n=this.pdfViewerContainer.nativeElement.clientWidth-i,a=this.pdfViewerContainer.nativeElement.clientHeight-i;if(0===a||0===e||0===n||0===t)return 1;let s=1;switch(this._zoomScale){case"page-fit":s=Math.min(a/e,n/t);break;case"page-height":s=a/e;break;case"page-width":default:s=n/t}return this._zoom*s/zs.CSS_UNITS}getCurrentViewer(){return this._showAll?this.pdfMultiPageViewer:this.pdfSinglePageViewer}resetPdfDocument(){this.pdfFindController.setDocument(this._pdf),this._showAll?(this.pdfSinglePageViewer.setDocument(null),this.pdfSinglePageLinkService.setDocument(null),this.pdfMultiPageViewer.setDocument(this._pdf),this.pdfMultiPageLinkService.setDocument(this._pdf,null)):(this.pdfMultiPageViewer.setDocument(null),this.pdfMultiPageLinkService.setDocument(null),this.pdfSinglePageViewer.setDocument(this._pdf),this.pdfSinglePageLinkService.setDocument(this._pdf,null))}};return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l))},t.\u0275cmp=n.Kb({type:t,selectors:[["pdf-viewer"]],viewQuery:function(t,e){var i;1&t&&n.Xc(Qs,!0),2&t&&n.yc(i=n.ec())&&(e.pdfViewerContainer=i.first)},hostBindings:function(t,e){1&t&&n.dc("resize",(function(){return e.onPageResize()}),!1,n.Cc)},inputs:{cMapsUrl:["c-maps-url","cMapsUrl"],page:"page",renderText:["render-text","renderText"],renderTextMode:["render-text-mode","renderTextMode"],originalSize:["original-size","originalSize"],showAll:["show-all","showAll"],stickToPage:["stick-to-page","stickToPage"],zoom:"zoom",zoomScale:["zoom-scale","zoomScale"],rotation:"rotation",externalLinkTarget:["external-link-target","externalLinkTarget"],autoresize:"autoresize",fitToPage:["fit-to-page","fitToPage"],showBorders:["show-borders","showBorders"],src:"src"},outputs:{afterLoadComplete:"after-load-complete",pageRendered:"page-rendered",textLayerRendered:"text-layer-rendered",onError:"error",onProgress:"on-progress",pageChange:"pageChange"},features:[n.Bb],decls:3,vars:0,consts:[[1,"ng2-pdf-viewer-container"],["pdfViewerContainer",""],[1,"pdfViewer"]],template:function(t,e){1&t&&(n.Wb(0,"div",0,1),n.Rb(2,"div",2),n.Vb())},styles:['.ng2-pdf-viewer-container[_ngcontent-%COMP%]{overflow-x:auto;position:relative;height:100%;-webkit-overflow-scrolling:touch}[_nghost-%COMP%] .textLayer{position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;opacity:.2;line-height:1}[_nghost-%COMP%] .textLayer>span{color:transparent;position:absolute;white-space:pre;cursor:text;-webkit-transform-origin:0 0;transform-origin:0 0}[_nghost-%COMP%] .textLayer .highlight{margin:-1px;padding:1px;background-color:#b400aa;border-radius:4px}[_nghost-%COMP%] .textLayer .highlight.begin{border-radius:4px 0 0 4px}[_nghost-%COMP%] .textLayer .highlight.end{border-radius:0 4px 4px 0}[_nghost-%COMP%] .textLayer .highlight.middle{border-radius:0}[_nghost-%COMP%] .textLayer .highlight.selected{background-color:#006400}[_nghost-%COMP%] .textLayer ::-moz-selection{background:#00f}[_nghost-%COMP%] .textLayer ::selection{background:#00f}[_nghost-%COMP%] .textLayer .endOfContent{display:block;position:absolute;left:0;top:100%;right:0;bottom:0;z-index:-1;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[_nghost-%COMP%] .textLayer .endOfContent.active{top:0}[_nghost-%COMP%] .annotationLayer section{position:absolute}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.pushButton>a, [_nghost-%COMP%] .annotationLayer .linkAnnotation>a{position:absolute;font-size:1em;top:0;left:0;width:100%;height:100%}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.pushButton>a:hover, [_nghost-%COMP%] .annotationLayer .linkAnnotation>a:hover{opacity:.2;background:#ff0;box-shadow:0 2px 10px #ff0}[_nghost-%COMP%] .annotationLayer .textAnnotation img{position:absolute;cursor:pointer}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input, [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation textarea{background-color:rgba(0,54,255,.13);border:1px solid transparent;box-sizing:border-box;font-size:9px;height:100%;margin:0;padding:0 3px;vertical-align:top;width:100%}[_nghost-%COMP%] .annotationLayer .choiceWidgetAnnotation select{background-color:rgba(0,54,255,.13);border:1px solid transparent;box-sizing:border-box;font-size:9px;height:100%;margin:0;padding:0 3px;vertical-align:top;width:100%}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input{background-color:rgba(0,54,255,.13);border:1px solid transparent;box-sizing:border-box;font-size:9px;height:100%;margin:0;vertical-align:top;width:100%}[_nghost-%COMP%] .annotationLayer .choiceWidgetAnnotation select option{padding:0}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input{border-radius:50%}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation textarea{font:message-box;font-size:9px;resize:none}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input[disabled], [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation textarea[disabled]{background:0 0;border:1px solid transparent;cursor:not-allowed}[_nghost-%COMP%] .annotationLayer .choiceWidgetAnnotation select[disabled]{background:0 0;border:1px solid transparent;cursor:not-allowed}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input[disabled], [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input[disabled]{background:0 0;border:1px solid transparent;cursor:not-allowed}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input:hover, [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation textarea:hover{border:1px solid #000}[_nghost-%COMP%] .annotationLayer .choiceWidgetAnnotation select:hover{border:1px solid #000}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:hover, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input:hover{border:1px solid #000}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input:focus, [_nghost-%COMP%] .annotationLayer .textWidgetAnnotation textarea:focus{background:0 0;border:1px solid transparent}[_nghost-%COMP%] .annotationLayer .choiceWidgetAnnotation select:focus{background:0 0;border:1px solid transparent}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before{background-color:#000;content:"";display:block;position:absolute;height:80%;left:45%;width:1px}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{background-color:#000;content:"";display:block;position:absolute;border-radius:50%;height:50%;left:30%;top:20%;width:50%}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before{-webkit-transform:rotate(45deg);transform:rotate(45deg)}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input.comb{font-family:monospace;padding-left:2px;padding-right:0}[_nghost-%COMP%] .annotationLayer .textWidgetAnnotation input.comb:focus{width:115%}[_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.checkBox input, [_nghost-%COMP%] .annotationLayer .buttonWidgetAnnotation.radioButton input{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0}[_nghost-%COMP%] .annotationLayer .popupWrapper{position:absolute;width:20em}[_nghost-%COMP%] .annotationLayer .popup{position:absolute;z-index:200;max-width:20em;background-color:#ff9;box-shadow:0 2px 5px #888;border-radius:2px;padding:6px;margin-left:5px;cursor:pointer;font:message-box;font-size:9px;word-wrap:break-word}[_nghost-%COMP%] .annotationLayer .popup>*{font-size:9px}[_nghost-%COMP%] .annotationLayer .popup h1{display:inline-block}[_nghost-%COMP%] .annotationLayer .popup span{display:inline-block;margin-left:5px}[_nghost-%COMP%] .annotationLayer .popup p{border-top:1px solid #333;margin-top:2px;padding-top:2px}[_nghost-%COMP%] .annotationLayer .caretAnnotation, [_nghost-%COMP%] .annotationLayer .circleAnnotation svg ellipse, [_nghost-%COMP%] .annotationLayer .fileAttachmentAnnotation, [_nghost-%COMP%] .annotationLayer .freeTextAnnotation, [_nghost-%COMP%] .annotationLayer .highlightAnnotation, [_nghost-%COMP%] .annotationLayer .inkAnnotation svg polyline, [_nghost-%COMP%] .annotationLayer .lineAnnotation svg line, [_nghost-%COMP%] .annotationLayer .polygonAnnotation svg polygon, [_nghost-%COMP%] .annotationLayer .polylineAnnotation svg polyline, [_nghost-%COMP%] .annotationLayer .squareAnnotation svg rect, [_nghost-%COMP%] .annotationLayer .squigglyAnnotation, [_nghost-%COMP%] .annotationLayer .stampAnnotation, [_nghost-%COMP%] .annotationLayer .strikeoutAnnotation, [_nghost-%COMP%] .annotationLayer .underlineAnnotation{cursor:pointer}[_nghost-%COMP%] .pdfViewer{padding-bottom:10px}[_nghost-%COMP%] .pdfViewer .canvasWrapper{overflow:hidden}[_nghost-%COMP%] .pdfViewer .page{direction:ltr;width:816px;height:1056px;margin:1px auto -8px;position:relative;overflow:visible;border:9px solid rgba(0,0,0,.01);box-sizing:initial;background-clip:content-box;-webkit-border-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAA6UlEQVR4Xl2Pi2rEMAwE16fm1f7/r14v7w4rI0IzLAF7hLxNevBSEMEF5+OilNCsRd8ZMyn+a4NmsOT8WJw1lFbSYgGFzF2bLFoLjTClWjKKGRWpDYAGXUnZ4uhbBUzF3Oe/GG/ue2fn4GgsyXhNgysV2JnrhKEMg4fEZcALmiKbNhBBRFpSyDOj1G4QOVly6O1FV54ZZq8OVygrciDt6JazRgi1ljTPH0gbrPmHPXAbCiDd4GawIjip1TPh9tt2sz24qaCjr/jAb/GBFTbq9KZ7Ke/Cqt8nayUikZKsWZK7Fe6bg5dOUt8fZHWG2BHc+6EAAAAASUVORK5CYII=) 9 9 repeat;-o-border-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAA6UlEQVR4Xl2Pi2rEMAwE16fm1f7/r14v7w4rI0IzLAF7hLxNevBSEMEF5+OilNCsRd8ZMyn+a4NmsOT8WJw1lFbSYgGFzF2bLFoLjTClWjKKGRWpDYAGXUnZ4uhbBUzF3Oe/GG/ue2fn4GgsyXhNgysV2JnrhKEMg4fEZcALmiKbNhBBRFpSyDOj1G4QOVly6O1FV54ZZq8OVygrciDt6JazRgi1ljTPH0gbrPmHPXAbCiDd4GawIjip1TPh9tt2sz24qaCjr/jAb/GBFTbq9KZ7Ke/Cqt8nayUikZKsWZK7Fe6bg5dOUt8fZHWG2BHc+6EAAAAASUVORK5CYII=) 9 9 repeat;border-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAA6UlEQVR4Xl2Pi2rEMAwE16fm1f7/r14v7w4rI0IzLAF7hLxNevBSEMEF5+OilNCsRd8ZMyn+a4NmsOT8WJw1lFbSYgGFzF2bLFoLjTClWjKKGRWpDYAGXUnZ4uhbBUzF3Oe/GG/ue2fn4GgsyXhNgysV2JnrhKEMg4fEZcALmiKbNhBBRFpSyDOj1G4QOVly6O1FV54ZZq8OVygrciDt6JazRgi1ljTPH0gbrPmHPXAbCiDd4GawIjip1TPh9tt2sz24qaCjr/jAb/GBFTbq9KZ7Ke/Cqt8nayUikZKsWZK7Fe6bg5dOUt8fZHWG2BHc+6EAAAAASUVORK5CYII=) 9 9 repeat;background-color:#fff}[_nghost-%COMP%] .pdfViewer.removePageBorders .page{margin:0 auto 10px;border:none}[_nghost-%COMP%] .pdfViewer.removePageBorders{padding-bottom:0}[_nghost-%COMP%] .pdfViewer.singlePageView{display:inline-block}[_nghost-%COMP%] .pdfViewer.singlePageView .page{margin:0;border:none}[_nghost-%COMP%] .pdfViewer.scrollHorizontal, [_nghost-%COMP%] .pdfViewer.scrollWrapped{margin-left:3.5px;margin-right:3.5px;text-align:center}[_nghost-%COMP%] .spread{margin-left:3.5px;margin-right:3.5px;text-align:center}[_nghost-%COMP%] .pdfViewer.scrollHorizontal, [_nghost-%COMP%] .spread{white-space:nowrap}[_nghost-%COMP%] .pdfViewer.removePageBorders, [_nghost-%COMP%] .pdfViewer.scrollHorizontal .spread, [_nghost-%COMP%] .pdfViewer.scrollWrapped .spread{margin-left:0;margin-right:0}[_nghost-%COMP%] .spread .page{display:inline-block;vertical-align:middle;margin-left:-3.5px;margin-right:-3.5px}[_nghost-%COMP%] .pdfViewer.scrollHorizontal .page, [_nghost-%COMP%] .pdfViewer.scrollHorizontal .spread, [_nghost-%COMP%] .pdfViewer.scrollWrapped .page, [_nghost-%COMP%] .pdfViewer.scrollWrapped .spread{display:inline-block;vertical-align:middle}[_nghost-%COMP%] .pdfViewer.scrollHorizontal .page, [_nghost-%COMP%] .pdfViewer.scrollWrapped .page{margin-left:-3.5px;margin-right:-3.5px}[_nghost-%COMP%] .pdfViewer.removePageBorders .spread .page, [_nghost-%COMP%] .pdfViewer.removePageBorders.scrollHorizontal .page, [_nghost-%COMP%] .pdfViewer.removePageBorders.scrollWrapped .page{margin-left:5px;margin-right:5px}[_nghost-%COMP%] .pdfViewer .page canvas{margin:0;display:block}[_nghost-%COMP%] .pdfViewer .page canvas[hidden]{display:none}[_nghost-%COMP%] .pdfViewer .page .loadingIcon{position:absolute;display:block;left:0;top:0;right:0;bottom:0;background:url(data:image/gif;base64,R0lGODlhGAAYAPQAAP///wAAAM7Ozvr6+uDg4LCwsOjo6I6OjsjIyJycnNjY2KioqMDAwPLy8nZ2doaGhri4uGhoaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJBwAAACwAAAAAGAAYAAAFriAgjiQAQWVaDgr5POSgkoTDjFE0NoQ8iw8HQZQTDQjDn4jhSABhAAOhoTqSDg7qSUQwxEaEwwFhXHhHgzOA1xshxAnfTzotGRaHglJqkJcaVEqCgyoCBQkJBQKDDXQGDYaIioyOgYSXA36XIgYMBWRzXZoKBQUMmil0lgalLSIClgBpO0g+s26nUWddXyoEDIsACq5SsTMMDIECwUdJPw0Mzsu0qHYkw72bBmozIQAh+QQJBwAAACwAAAAAGAAYAAAFsCAgjiTAMGVaDgR5HKQwqKNxIKPjjFCk0KNXC6ATKSI7oAhxWIhezwhENTCQEoeGCdWIPEgzESGxEIgGBWstEW4QCGGAIJEoxGmGt5ZkgCRQQHkGd2CESoeIIwoMBQUMP4cNeQQGDYuNj4iSb5WJnmeGng0CDGaBlIQEJziHk3sABidDAHBgagButSKvAAoyuHuUYHgCkAZqebw0AgLBQyyzNKO3byNuoSS8x8OfwIchACH5BAkHAAAALAAAAAAYABgAAAW4ICCOJIAgZVoOBJkkpDKoo5EI43GMjNPSokXCINKJCI4HcCRIQEQvqIOhGhBHhUTDhGo4diOZyFAoKEQDxra2mAEgjghOpCgz3LTBIxJ5kgwMBShACREHZ1V4Kg1rS44pBAgMDAg/Sw0GBAQGDZGTlY+YmpyPpSQDiqYiDQoCliqZBqkGAgKIS5kEjQ21VwCyp76dBHiNvz+MR74AqSOdVwbQuo+abppo10ssjdkAnc0rf8vgl8YqIQAh+QQJBwAAACwAAAAAGAAYAAAFrCAgjiQgCGVaDgZZFCQxqKNRKGOSjMjR0qLXTyciHA7AkaLACMIAiwOC1iAxCrMToHHYjWQiA4NBEA0Q1RpWxHg4cMXxNDk4OBxNUkPAQAEXDgllKgMzQA1pSYopBgonCj9JEA8REQ8QjY+RQJOVl4ugoYssBJuMpYYjDQSliwasiQOwNakALKqsqbWvIohFm7V6rQAGP6+JQLlFg7KDQLKJrLjBKbvAor3IKiEAIfkECQcAAAAsAAAAABgAGAAABbUgII4koChlmhokw5DEoI4NQ4xFMQoJO4uuhignMiQWvxGBIQC+AJBEUyUcIRiyE6CR0CllW4HABxBURTUw4nC4FcWo5CDBRpQaCoF7VjgsyCUDYDMNZ0mHdwYEBAaGMwwHDg4HDA2KjI4qkJKUiJ6faJkiA4qAKQkRB3E0i6YpAw8RERAjA4tnBoMApCMQDhFTuySKoSKMJAq6rD4GzASiJYtgi6PUcs9Kew0xh7rNJMqIhYchACH5BAkHAAAALAAAAAAYABgAAAW0ICCOJEAQZZo2JIKQxqCOjWCMDDMqxT2LAgELkBMZCoXfyCBQiFwiRsGpku0EshNgUNAtrYPT0GQVNRBWwSKBMp98P24iISgNDAS4ipGA6JUpA2WAhDR4eWM/CAkHBwkIDYcGiTOLjY+FmZkNlCN3eUoLDmwlDW+AAwcODl5bYl8wCVYMDw5UWzBtnAANEQ8kBIM0oAAGPgcREIQnVloAChEOqARjzgAQEbczg8YkWJq8nSUhACH5BAkHAAAALAAAAAAYABgAAAWtICCOJGAYZZoOpKKQqDoORDMKwkgwtiwSBBYAJ2owGL5RgxBziQQMgkwoMkhNqAEDARPSaiMDFdDIiRSFQowMXE8Z6RdpYHWnEAWGPVkajPmARVZMPUkCBQkJBQINgwaFPoeJi4GVlQ2Qc3VJBQcLV0ptfAMJBwdcIl+FYjALQgimoGNWIhAQZA4HXSpLMQ8PIgkOSHxAQhERPw7ASTSFyCMMDqBTJL8tf3y2fCEAIfkECQcAAAAsAAAAABgAGAAABa8gII4k0DRlmg6kYZCoOg5EDBDEaAi2jLO3nEkgkMEIL4BLpBAkVy3hCTAQKGAznM0AFNFGBAbj2cA9jQixcGZAGgECBu/9HnTp+FGjjezJFAwFBQwKe2Z+KoCChHmNjVMqA21nKQwJEJRlbnUFCQlFXlpeCWcGBUACCwlrdw8RKGImBwktdyMQEQciB7oACwcIeA4RVwAODiIGvHQKERAjxyMIB5QlVSTLYLZ0sW8hACH5BAkHAAAALAAAAAAYABgAAAW0ICCOJNA0ZZoOpGGQrDoOBCoSxNgQsQzgMZyIlvOJdi+AS2SoyXrK4umWPM5wNiV0UDUIBNkdoepTfMkA7thIECiyRtUAGq8fm2O4jIBgMBA1eAZ6Knx+gHaJR4QwdCMKBxEJRggFDGgQEREPjjAMBQUKIwIRDhBDC2QNDDEKoEkDoiMHDigICGkJBS2dDA6TAAnAEAkCdQ8ORQcHTAkLcQQODLPMIgIJaCWxJMIkPIoAt3EhACH5BAkHAAAALAAAAAAYABgAAAWtICCOJNA0ZZoOpGGQrDoOBCoSxNgQsQzgMZyIlvOJdi+AS2SoyXrK4umWHM5wNiV0UN3xdLiqr+mENcWpM9TIbrsBkEck8oC0DQqBQGGIz+t3eXtob0ZTPgNrIwQJDgtGAgwCWSIMDg4HiiUIDAxFAAoODwxDBWINCEGdSTQkCQcoegADBaQ6MggHjwAFBZUFCm0HB0kJCUy9bAYHCCPGIwqmRq0jySMGmj6yRiEAIfkECQcAAAAsAAAAABgAGAAABbIgII4k0DRlmg6kYZCsOg4EKhLE2BCxDOAxnIiW84l2L4BLZKipBopW8XRLDkeCiAMyMvQAA+uON4JEIo+vqukkKQ6RhLHplVGN+LyKcXA4Dgx5DWwGDXx+gIKENnqNdzIDaiMECwcFRgQCCowiCAcHCZIlCgICVgSfCEMMnA0CXaU2YSQFoQAKUQMMqjoyAglcAAyBAAIMRUYLCUkFlybDeAYJryLNk6xGNCTQXY0juHghACH5BAkHAAAALAAAAAAYABgAAAWzICCOJNA0ZVoOAmkY5KCSSgSNBDE2hDyLjohClBMNij8RJHIQvZwEVOpIekRQJyJs5AMoHA+GMbE1lnm9EcPhOHRnhpwUl3AsknHDm5RN+v8qCAkHBwkIfw1xBAYNgoSGiIqMgJQifZUjBhAJYj95ewIJCQV7KYpzBAkLLQADCHOtOpY5PgNlAAykAEUsQ1wzCgWdCIdeArczBQVbDJ0NAqyeBb64nQAGArBTt8R8mLuyPyEAOwAAAAAAAAAAAA==) center no-repeat}[_nghost-%COMP%] .pdfPresentationMode .pdfViewer{margin-left:0;margin-right:0}[_nghost-%COMP%] .pdfPresentationMode .pdfViewer .page, [_nghost-%COMP%] .pdfPresentationMode .pdfViewer .spread{display:block}[_nghost-%COMP%] .pdfPresentationMode .pdfViewer .page, [_nghost-%COMP%] .pdfPresentationMode .pdfViewer.removePageBorders .page{margin-left:auto;margin-right:auto}[_nghost-%COMP%] .pdfPresentationMode:-ms-fullscreen .pdfViewer .page{margin-bottom:100%!important}[_nghost-%COMP%] .pdfPresentationMode:-webkit-full-screen .pdfViewer .page{margin-bottom:100%;border:0}[_nghost-%COMP%] .pdfPresentationMode:-moz-full-screen .pdfViewer .page, [_nghost-%COMP%] .pdfPresentationMode:-webkit-full-screen .pdfViewer .page, [_nghost-%COMP%] .pdfPresentationMode:fullscreen .pdfViewer .page{margin-bottom:100%;border:0}']}),t.CSS_UNITS=96/72,t.BORDER_WIDTH=9,t})(),Xs=(()=>{let t=class{};return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)}}),t})();const qs=["snav"],Ks=["snav2"];function Ys(t,e){if(1&t&&(n.Wb(0,"mat-option",25),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",n.jc(2,2,"lang."+t)," ")}}function Js(t,e){if(1&t&&(n.Wb(0,"mat-option",25),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",n.jc(2,2,"lang."+t)," ")}}function Zs(t,e){1&t&&(n.Wb(0,"div",26),n.Rb(1,"mat-spinner"),n.Vb())}const to=function(t){return{width:t}};let eo=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.entities=[],this.entitiesChosen=[],this.loading=!1,this.docUrl="",this.docData="",this.docBuffer=null,this.separatorTypes=["barcode","qrcode"],this.separatorTargets=["entities","generic"],this.separator={type:"qrcode",target:"entities",entities:[]},window.pdfWorkerSrc="pdfjs/pdf.worker.min.js"}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.printSeparators")),this.http.get("../rest/entities").subscribe(t=>{this.entities=t.entities,this.entities.forEach(t=>{t.state.disabled=!1}),this.loadEntities()},t=>{this.notify.handleErrors(t)})}loadEntities(){setTimeout(()=>{$("#jstree").on("select_node.jstree",(t,e)=>{this.separator.entities=$("#jstree").jstree("get_checked",null,!0)}).on("deselect_node.jstree",(t,e)=>{this.separator.entities=$("#jstree").jstree("get_checked",null,!0)}).jstree({checkbox:{three_state:!1},core:{force_text:!0,themes:{name:"proton",responsive:!0},data:this.entities},plugins:["checkbox","search","sort"]});let t=!1;$("#jstree_search").keyup((function(){t&&clearTimeout(t),t=setTimeout((function(){const t=$("#jstree_search").val();$("#jstree").jstree(!0).search(t)}),250)})),$("#jstree").jstree()},0)}generateSeparators(){this.loading=!0,this.separator.entities=$("#jstree").jstree("get_checked",null,!0),this.http.post("../rest/entitySeparators",this.separator).subscribe(t=>{this.docData=t,this.docBuffer=this.base64ToArrayBuffer(this.docData),this.downloadSeparators(),this.loading=!1},t=>{this.notify.handleErrors(t)})}base64ToArrayBuffer(t){const e=window.atob(t),i=e.length,n=new Uint8Array(i);for(let a=0;a<i;a++)n[a]=e.charCodeAt(a);return n.buffer}changeType(t){this.docBuffer=null,"entities"===t.value?(this.entities.forEach(t=>{t.state.disabled=!1}),$("#jstree").jstree(!0).settings.core.data=this.entities,$("#jstree").jstree("deselect_all"),$("#jstree").jstree("refresh")):(this.entities.forEach(t=>{t.state.disabled=!0}),$("#jstree").jstree(!0).settings.core.data=this.entities,$("#jstree").jstree("deselect_all"),$("#jstree").jstree("refresh"))}downloadSeparators(){const t=document.createElement("a");document.body.appendChild(t),t.style.display="none";const e="data:application/pdf;base64,"+this.docData;let i,n,a,s;t.href=e,i=new Date,n=i.getDate(),a=i.getMonth()+1,s=i.getFullYear(),n<10&&(n="0"+n),a<10&&(a="0"+a),i=n+"-"+a+"-"+s,t.download=this.translate.instant("lang.separators")+"_"+i+".pdf",t.click(),window.URL.revokeObjectURL(e)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(qs,!0),n.Kc(Ks,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavLeft=i.first),n.yc(i=n.ec())&&(e.sidenavRight=i.first))},decls:49,vars:44,consts:[[1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],[2,"height","90%","overflow","auto","position","absolute","width","100%"],["role","alert",1,"alert-message","alert-message-info",2,"max-width","100%","margin","30px",3,"innerHTML"],[1,"col-md-12"],[1,"col-md-6"],[3,"ngModel","ngModelChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["matInput","","id","jstree_search","name","jstree_search","type","text",3,"placeholder"],["id","jstree"],[1,"col-md-12","text-center",2,"bottom","0px","padding-top","10px","position","absolute","height","10%","width","100%"],["mat-raised-button","","color","primary",3,"disabled","click"],[1,"table-head"],["position","end","autoFocus","false",1,"panel-right",2,"overflow-x","hidden",3,"fixedInViewport","opened","mode","ngStyle"],["snav2",""],["class","example-loading-shade",4,"ngIf"],[1,"titlePanel"],["color","primary",2,"flex","1","font-size","20px","font-weight","bold","padding","10px"],[1,"viewSep",3,"src","render-text","autoresize","original-size","show-all"],[3,"value"],[1,"example-loading-shade"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Wb(11,"div",8),n.Rb(12,"div",9),n.ic(13,"translate"),n.Wb(14,"div",10),n.Wb(15,"div",11),n.Wb(16,"mat-form-field"),n.Wb(17,"mat-label"),n.Qc(18),n.ic(19,"translate"),n.Vb(),n.Wb(20,"mat-select",12),n.dc("ngModelChange",(function(t){return e.separator.type=t}))("selectionChange",(function(){return e.docBuffer=null})),n.Oc(21,Ys,3,4,"mat-option",13),n.Vb(),n.Vb(),n.Vb(),n.Wb(22,"div",11),n.Wb(23,"mat-form-field"),n.Wb(24,"mat-label"),n.Qc(25),n.ic(26,"translate"),n.Vb(),n.Wb(27,"mat-select",12),n.dc("ngModelChange",(function(t){return e.separator.target=t}))("selectionChange",(function(t){return e.changeType(t)})),n.Oc(28,Js,3,4,"mat-option",13),n.Vb(),n.Vb(),n.Vb(),n.Wb(29,"mat-form-field"),n.Rb(30,"input",14),n.ic(31,"translate"),n.Wb(32,"mat-hint"),n.Qc(33),n.ic(34,"translate"),n.Vb(),n.Vb(),n.Rb(35,"div",15),n.Vb(),n.Vb(),n.Wb(36,"div",16),n.Wb(37,"button",17),n.dc("click",(function(){return e.generateSeparators()})),n.Qc(38),n.ic(39,"translate"),n.Vb(),n.Vb(),n.Rb(40,"div",18),n.Vb(),n.Vb(),n.Vb(),n.Wb(41,"mat-sidenav",19,20),n.Oc(43,Zs,2,0,"div",21),n.Wb(44,"div",22),n.Wb(45,"span",23),n.Qc(46),n.ic(47,"translate"),n.Vb(),n.Vb(),n.Rb(48,"pdf-viewer",24),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(3),n.oc("innerHTML",n.jc(13,28,"lang.printSeparatorInfo"),n.Ec),n.Db(6),n.Rc(n.jc(19,30,"lang.separatorType")),n.Db(2),n.oc("ngModel",e.separator.type),n.Db(1),n.oc("ngForOf",e.separatorTypes),n.Db(4),n.Rc(n.jc(26,32,"lang.separatorTarget")),n.Db(2),n.oc("ngModel",e.separator.target),n.Db(1),n.oc("ngForOf",e.separatorTargets),n.Db(2),n.pc("placeholder",n.jc(31,34,"lang.searchEntities")),n.Db(3),n.Rc(n.jc(34,36,"lang.entityTreeInfoSeparator")),n.Db(4),n.oc("disabled",e.loading||"entities"==e.separator.target&&0==e.separator.entities.length),n.Db(1),n.Rc(n.jc(39,38,"lang.generateAndDownload")),n.Db(3),n.oc("fixedInViewport",e.appService.getViewMode())("opened",!e.appService.getViewMode()&&null!=e.docBuffer)("mode",e.appService.getViewMode()?"over":"side")("ngStyle",n.vc(42,to,e.appService.getViewMode()?"80%":"30%")),n.Db(2),n.oc("ngIf",e.loading),n.Db(3),n.Rc(n.jc(47,40,"lang.separators")),n.Db(2),n.oc("src",e.docBuffer)("render-text",!1)("autoresize",!0)("original-size",!1)("show-all",!0))},directives:[I.e,I.f,Ot,We,Y.c,Y.g,ee.a,X.u,X.x,P.s,J.b,Y.f,k.b,I.d,P.w,P.t,Gs,W.p,V.c],pipes:[g.d],styles:[".panel-right[_ngcontent-%COMP%] .mat-drawer-inner-container{display:flex;flex-direction:column}.panel-right[_ngcontent-%COMP%] .titlePanel[_ngcontent-%COMP%]{display:flex;align-items:center}.panel-right[_ngcontent-%COMP%] .viewSep[_ngcontent-%COMP%]{flex:1;display:flex;overflow:auto}"]}),t})(),io=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.router=i,this.notificationService=n,this.headerService=a,this.loadingForm=!1,this.loading=!1,this.newLogin={login:""},this.labelButton=this.translate.instant("lang.send")}ngOnInit(){this.headerService.hideSideBar=!0}generateLink(){this.labelButton=this.translate.instant("lang.generation"),this.loading=!0,this.http.post("../rest/password",{login:this.newLogin.login}).pipe(Object(Xt.a)(()=>{this.labelButton=this.translate.instant("lang.send"),this.loading=!1})).subscribe(t=>{this.loadingForm=!0,this.notificationService.success(this.translate.instant("lang.requestSentByEmail")),this.router.navigate(["/login"])},t=>{this.notificationService.handleErrors(t)})}cancel(){this.router.navigate(["/login"])}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:14,vars:12,consts:[[1,"login-content"],["svgIcon","maarchLogoWhiteFull",1,"maarchLogo"],[1,"login-form"],[3,"ngSubmit"],[1,"alert-message","alert-message-info",3,"innerHTML"],[1,"input-row"],["name","login","matInput","","type","text","oninput","this.value = this.value.toLowerCase()",3,"placeholder","ngModel","ngModelChange"],["type","submit","mat-button","",3,"disabled"],["type","button","mat-button","",3,"click"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Rb(1,"mat-icon",1),n.Wb(2,"mat-card",2),n.Wb(3,"form",3),n.dc("ngSubmit",(function(){return e.generateLink()})),n.Rb(4,"div",4),n.ic(5,"translate"),n.Wb(6,"mat-form-field",5),n.Wb(7,"input",6),n.dc("ngModelChange",(function(t){return e.newLogin.login=t})),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Wb(9,"button",7),n.Qc(10),n.Vb(),n.Wb(11,"button",8),n.dc("click",(function(){return e.cancel()})),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(4),n.oc("innerHTML",n.jc(5,6,"lang.afterClickingSendLinkChangePassword"),n.Ec),n.Db(3),n.pc("placeholder",n.jc(8,8,"lang.enterLogin")),n.oc("ngModel",e.newLogin.login),n.Db(2),n.oc("disabled",""==e.newLogin.login||e.loading),n.Db(1),n.Rc(e.labelButton),n.Db(2),n.Rc(n.jc(13,10,"lang.cancel")))},directives:[S.a,K.a,X.K,X.v,X.w,Y.c,J.b,X.d,X.u,X.x,k.b],pipes:[g.d],styles:[".login-content[_ngcontent-%COMP%]{background-color:#135f7f;height:100vh;width:100vw;display:flex;flex-direction:column;justify-content:center;align-items:center}.login-form[_ngcontent-%COMP%]{max-width:600px;text-align:center}.input-row[_ngcontent-%COMP%]{width:100%;padding-top:10px;padding-bottom:10px}.maarchLogo[_ngcontent-%COMP%]{position:absolute;transition:all 1s ease-in-out;width:250px;height:auto;padding-bottom:10px;transform:translateY(-200px)}footer[_ngcontent-%COMP%]{color:#fff;position:absolute;bottom:5px;font-size:10px;opacity:.5}"]}),t})();function no(t,e){1&t&&(n.Wb(0,"mat-hint",8),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.passwordNotMatch"),""))}function ao(t,e){1&t&&(n.Wb(0,"mat-hint",14),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.passwordMatch"),""))}const so=function(t){return[t]};let oo=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.router=e,this.route=i,this.http=n,this.notificationService=a,this.authService=s,this.loadingForm=!1,this.loading=!1,this.token="",this.password={newPassword:"",passwordConfirmation:""},this.labelButton=this.translate.instant("lang.update"),this.hideNewPassword=!0,this.hideNewPasswordConfirm=!0,this.passwordRules={minLength:{enabled:!1,value:0},complexityUpper:{enabled:!1,value:0},complexityNumber:{enabled:!1,value:0},complexitySpecial:{enabled:!1,value:0},renewal:{enabled:!1,value:0},historyLastUse:{enabled:!1,value:0}},this.handlePassword={error:!1,errorMsg:""},this.ruleText="",this.otherRuleText="",this.route.queryParams.subscribe(t=>{this.token=t.token})}ngOnInit(){this.getPassRules()}updatePassword(){this.labelButton=this.translate.instant("lang.emailSendInProgress"),this.loading=!0,this.http.put("../rest/password",{token:this.token,password:this.password.newPassword}).pipe(Object(Xt.a)(()=>{this.labelButton=this.translate.instant("lang.update"),this.loading=!1})).subscribe(t=>{this.loadingForm=!0,this.notificationService.success(this.translate.instant("lang.passwordChanged")),this.router.navigate(["/login"])},t=>{this.notificationService.handleSoftErrors(t)})}checkPasswordValidity(t){this.handlePassword.error=!0,!t.match(/[A-Z]/g)&&this.passwordRules.complexityUpper.enabled?this.handlePassword.errorMsg=this.translate.instant("lang.passwordcomplexityUpperRequired"):!t.match(/[0-9]/g)&&this.passwordRules.complexityNumber.enabled?this.handlePassword.errorMsg=this.translate.instant("lang.passwordcomplexityNumberRequired"):!t.match(/[^A-Za-z0-9]/g)&&this.passwordRules.complexitySpecial.enabled?this.handlePassword.errorMsg=this.translate.instant("lang.passwordcomplexitySpecialRequired"):t.length<this.passwordRules.minLength.value&&this.passwordRules.minLength.enabled?this.handlePassword.errorMsg=this.passwordRules.minLength.value+" "+this.translate.instant("lang.passwordminLength")+" !":(this.handlePassword.error=!1,this.handlePassword.errorMsg="")}getPassRules(){this.handlePassword.error=!1,this.handlePassword.errorMsg="",this.http.get("../rest/passwordRules").subscribe(t=>{const e=[],i=[];t.rules.forEach(t=>{"minLength"===t.label?(this.passwordRules.minLength.enabled=t.enabled,this.passwordRules.minLength.value=t.value,t.enabled&&e.push(t.value+" "+this.translate.instant("lang.password"+t.label))):"complexityUpper"===t.label?(this.passwordRules.complexityUpper.enabled=t.enabled,this.passwordRules.complexityUpper.value=t.value,t.enabled&&e.push(this.translate.instant("lang.password"+t.label))):"complexityNumber"===t.label?(this.passwordRules.complexityNumber.enabled=t.enabled,this.passwordRules.complexityNumber.value=t.value,t.enabled&&e.push(this.translate.instant("lang.password"+t.label))):"complexitySpecial"===t.label?(this.passwordRules.complexitySpecial.enabled=t.enabled,this.passwordRules.complexitySpecial.value=t.value,t.enabled&&e.push(this.translate.instant("lang.password"+t.label))):"renewal"===t.label?(this.passwordRules.renewal.enabled=t.enabled,this.passwordRules.renewal.value=t.value,t.enabled&&i.push(this.translate.instant("lang.password"+t.label)+" <b>"+t.value+" "+this.translate.instant("lang.days")+"</b>. "+this.translate.instant("lang.password2"+t.label)+".")):"historyLastUse"===t.label&&(this.passwordRules.historyLastUse.enabled=t.enabled,this.passwordRules.historyLastUse.value=t.value,t.enabled&&i.push(this.translate.instant("lang.passwordhistoryLastUseDesc")+" <b>"+t.value+"</b> "+this.translate.instant("lang.passwordhistoryLastUseDesc2")+"."))}),this.ruleText=e.join(", "),this.otherRuleText=i.join("<br/>")},t=>{this.notificationService.handleErrors(t)})}allowValidate(){return!(!this.handlePassword.error&&this.password.newPassword===this.password.passwordConfirmation&&0!==this.password.newPassword.length&&0!==this.password.passwordConfirmation.length)}cancel(){this.router.navigate(["/login"])}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(o.c),n.Qb(o.a),n.Qb(v.b),n.Qb(D.a),n.Qb(_.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:24,vars:27,consts:[[1,"login-content"],["svgIcon","maarchLogoWhiteFull",1,"maarchLogo"],[1,"login-form"],[3,"ngSubmit"],["role","alert",1,"alert-message","alert-message-info"],[1,"input-row"],["name","newPassword","matInput","",3,"ngModel","placeholder","type","ngModelChange","keyup"],["matSuffix","",1,"fa","fa-2x",3,"ngClass","click"],[2,"color","red"],["name","passwordConfirmation","matInput","",3,"ngModel","placeholder","type","ngModelChange"],["style","color:red;",4,"ngIf"],["style","color:green;",4,"ngIf"],["type","submit","mat-button","",3,"disabled"],["type","button","mat-button","",3,"click"],[2,"color","green"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Rb(1,"mat-icon",1),n.Wb(2,"mat-card",2),n.Wb(3,"form",3),n.dc("ngSubmit",(function(){return e.updatePassword()})),n.Wb(4,"div",4),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Wb(7,"mat-form-field",5),n.Wb(8,"input",6),n.dc("ngModelChange",(function(t){return e.password.newPassword=t}))("keyup",(function(){return e.checkPasswordValidity(e.password.newPassword)})),n.ic(9,"translate"),n.Vb(),n.Wb(10,"mat-icon",7),n.dc("click",(function(){return e.hideNewPassword=!e.hideNewPassword})),n.Vb(),n.Wb(11,"mat-hint",8),n.Qc(12),n.Vb(),n.Vb(),n.Wb(13,"mat-form-field",5),n.Wb(14,"input",9),n.dc("ngModelChange",(function(t){return e.password.passwordConfirmation=t})),n.ic(15,"translate"),n.Vb(),n.Wb(16,"mat-icon",7),n.dc("click",(function(){return e.hideNewPasswordConfirm=!e.hideNewPasswordConfirm})),n.Vb(),n.Oc(17,no,3,3,"mat-hint",10),n.Oc(18,ao,3,3,"mat-hint",11),n.Vb(),n.Wb(19,"button",12),n.Qc(20),n.Vb(),n.Wb(21,"button",13),n.dc("click",(function(){return e.cancel()})),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Sc(" ",n.jc(6,15,"lang.logInOncePasswordChanged")," "),n.Db(3),n.pc("placeholder",n.jc(9,17,"lang.typeNewPassword")),n.oc("ngModel",e.password.newPassword)("type",e.hideNewPassword?"password":"text"),n.Db(2),n.oc("ngClass",n.vc(23,so,e.hideNewPassword?"fa-eye-slash":"fa-eye")),n.Db(2),n.Rc(e.handlePassword.errorMsg),n.Db(2),n.pc("placeholder",n.jc(15,19,"lang.retypeNewPassword")),n.oc("ngModel",e.password.passwordConfirmation)("type",e.hideNewPasswordConfirm?"password":"text"),n.Db(2),n.oc("ngClass",n.vc(25,so,e.hideNewPasswordConfirm?"fa-eye-slash":"fa-eye")),n.Db(1),n.oc("ngIf",e.password.passwordConfirmation!==e.password.newPassword),n.Db(1),n.oc("ngIf",e.password.passwordConfirmation===e.password.newPassword&&e.password.newPassword.length>0&&e.password.passwordConfirmation.length>0),n.Db(1),n.oc("disabled",e.allowValidate()||e.loading),n.Db(1),n.Rc(e.labelButton),n.Db(2),n.Rc(n.jc(23,21,"lang.cancel")))},directives:[S.a,K.a,X.K,X.v,X.w,Y.c,J.b,X.d,X.u,X.x,Y.j,P.q,Y.f,P.t,k.b],pipes:[g.d],styles:[".login-content[_ngcontent-%COMP%]{background-color:#135f7f;height:100vh;width:100vw;display:flex;flex-direction:column;justify-content:center;align-items:center}.login-form[_ngcontent-%COMP%]{max-width:480px;text-align:center}.input-row[_ngcontent-%COMP%]{width:100%;padding-top:10px;padding-bottom:10px}.maarchLogo[_ngcontent-%COMP%]{position:absolute;transition:all 1s ease-in-out;width:250px;height:auto;padding-bottom:10px;transform:translateY(-230px)}footer[_ngcontent-%COMP%]{color:#fff;position:absolute;bottom:5px;font-size:10px;opacity:.5}"]}),t})();var ro=i("IzEk");let co=(()=>{class t{constructor(t,e,i){this.translate=t,this.dialogRef=e,this.data=i,this.loading=!1}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(q.h),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:11,vars:7,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],[1,"divider-modal"],["mat-icon-button","",3,"title","mat-dialog-close"],[1,"fa","fa-times-circle","fa-2x"],[2,"height","100%","width","100%",3,"editMode","base64","title"],["appDocumentViewer",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Wb(2,"span"),n.Qc(3),n.Vb(),n.Rb(4,"span",2),n.Wb(5,"button",3),n.ic(6,"translate"),n.Rb(7,"mat-icon",4),n.Vb(),n.Vb(),n.Wb(8,"mat-dialog-content"),n.Rb(9,"app-document-viewer",5,6),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Rc(e.data.title),n.Db(2),n.pc("title",n.jc(6,5,"lang.close")),n.Db(4),n.oc("editMode",!1)("base64",e.data.base64)("title",e.data.title))},styles:[""]}),t})();var lo=i("5+WD");let ho=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.data=i,this.dialogRef=n,this.notify=a,this.loading=!1,this.template={id:0,type:"visaCircuit",title:"",items:[]}}ngOnInit(){this.template.items=this.data.visaWorkflow.map(t=>({id:t.item_id,type:"user",mode:t.requested_signature?"sign":"visa"}))}onSubmit(){this.http.post("../rest/listTemplates",this.template).pipe(Object(mt.a)(t=>{this.template.id=t.id,this.notify.success(this.translate.instant("lang.modelSaved")),this.dialogRef.close(this.template)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.a),n.Qb(q.h),n.Qb(D.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:14,vars:9,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],[1,"modal-container"],["appearance","outline"],["type","text","matInput","","placeholder","Nom du mod\xe8le",3,"ngModel","ngModelChange"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2,"Ajouter un mod\xe8le"),n.Vb(),n.Wb(3,"mat-dialog-content",2),n.Wb(4,"mat-form-field",3),n.Wb(5,"input",4),n.dc("ngModelChange",(function(t){return e.template.title=t})),n.Vb(),n.Vb(),n.Vb(),n.Rb(6,"span",5),n.Wb(7,"div",6),n.Wb(8,"button",7),n.dc("click",(function(){return e.onSubmit()})),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Wb(11,"button",8),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.oc("ngModel",e.template.title),n.Db(3),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(10,5,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(13,7,"lang.cancel")))},directives:[q.i,q.f,Y.c,J.b,X.d,X.u,X.x,q.c,k.b,q.d],pipes:[g.d],styles:[".avatarAccount[_ngcontent-%COMP%]{border:3px solid #f99830;height:45px!important;width:45px!important;background-size:cover;background-repeat:no-repeat;background-position:50%}"]}),t})(),uo=(()=>{class t{constructor(t,e){this.translate=t,this.functions=e}transform(t){if(this.functions.empty(t))return"";{const e=new Date(t),i={weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric"};return this.translate.instant("lang.onRange")[0].toUpperCase()+this.translate.instant("lang.onRange").substr(1).toLowerCase()+" "+e.toLocaleDateString(this.translate.instant("lang.langISO"),i)}}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(_t.a))},t.\u0275pipe=n.Pb({name:"fullDate",type:t,pure:!1}),t})();function po(t,e){if(1&t&&(n.Wb(0,"mat-list-item",6),n.Rb(1,"mat-icon",7),n.Wb(2,"div",8),n.Wb(3,"div",9),n.Wb(4,"div",10),n.Qc(5),n.Vb(),n.Wb(6,"div",11),n.Qc(7),n.Vb(),n.Vb(),n.Wb(8,"div"),n.Wb(9,"button",12),n.ic(10,"translate"),n.ic(11,"translate"),n.ic(12,"translate"),n.ic(13,"translate"),n.Qc(14),n.ic(15,"translate"),n.ic(16,"translate"),n.ic(17,"translate"),n.ic(18,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(5),n.Sc(" ",t.itemLabel," "),n.Db(2),n.Sc(" ",t.itemSubLabel," "),n.Db(2),n.pc("title",null===t.process_date?t.requested_signature?n.jc(10,4,"lang.signUser"):n.jc(11,6,"lang.visaUser"):t.signatory?n.jc(12,8,"lang.signUser"):n.jc(13,10,"lang.visaUser")),n.Db(5),n.Sc(" ",null===t.process_date?t.requested_signature?n.jc(15,12,"lang.signUser"):n.jc(16,14,"lang.visaUser"):t.signatory?n.jc(17,16,"lang.signUser"):n.jc(18,18,"lang.visaUser")," ")}}function bo(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-list"),n.Wb(2,"div",3),n.Wb(3,"div",4),n.ic(4,"fullDate"),n.Qc(5),n.ic(6,"translate"),n.Wb(7,"b"),n.Qc(8),n.Vb(),n.Qc(9," \xa0"),n.Wb(10,"b"),n.Qc(11),n.ic(12,"timeAgo"),n.Vb(),n.Vb(),n.Rb(13,"mat-divider"),n.Vb(),n.Oc(14,po,19,20,"mat-list-item",5),n.Vb(),n.Tb()),2&t){const t=e.$implicit;n.Db(3),n.oc("title",n.jc(4,5,t.creationDate)),n.Db(2),n.Sc(" ",n.jc(6,7,"lang.createdBy"),"\xa0"),n.Db(3),n.Rc(t.user),n.Db(3),n.Rc(n.kc(12,9,t.creationDate,"full")),n.Db(3),n.oc("ngForOf",t.details)}}function fo(t,e){if(1&t&&(n.Ub(0),n.Oc(1,bo,15,12,"ng-container",2),n.Tb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",t.visaWorkflowHistory)}}function mo(t,e){1&t&&(n.Wb(0,"div",13),n.Rb(1,"mat-spinner",14),n.Vb())}let go=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.functions=n,this.dialog=a,this.visaWorkflowHistory=[],this.loading=!1,this.resId=null}ngOnInit(){this.functions.empty(this.resId)||this.loadWorkflowHistory(),this.loading=!1}loadWorkflowHistory(){return this.loading=!0,new Promise((t,e)=>{this.http.get(`../rest/resources/${this.resId}/circuitsHistory?type=visaCircuit`).pipe(Object(mt.a)(t=>{this.visaWorkflowHistory=t.listInstanceHistory}),Object(Xt.a)(()=>{this.loading=!1,t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(_t.a),n.Qb(q.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-history-visa-workflow"]],inputs:{resId:"resId"},decls:2,vars:2,consts:[[4,"ngIf"],["style","display:flex;padding: 10px;",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"dateTitle"],["mat-subheader","",1,"primary",3,"title"],["disableRipple","","class","workflow",4,"ngFor","ngForOf"],["disableRipple","",1,"workflow"],["mat-list-icon","","color","primary",1,"fa","fa-2x","fa-user"],["mat-line","",1,"workflowLine"],[1,"workflowLineContainer"],[1,"workflowLineLabel"],[1,"workflowLineSubLabel"],["color","primary","disabled","","mat-raised-button","",1,"currentRoleButton",3,"title"],[2,"display","flex","padding","10px"],[2,"margin","auto"]],template:function(t,e){1&t&&(n.Oc(0,fo,2,1,"ng-container",0),n.Oc(1,mo,2,0,"div",1)),2&t&&(n.oc("ngIf",!e.loading),n.Db(1),n.oc("ngIf",e.loading))},directives:[P.t,P.s,R.a,R.g,T.a,R.d,S.a,R.c,W.l,k.b,V.c],pipes:[uo,g.d,ps],styles:[".mat-form-field-appearance-outline[_ngcontent-%COMP%]{font-size:11px}.visaSignList[_ngcontent-%COMP%] .mat-optgroup-label{color:#135f7f;position:-webkit-sticky;position:sticky;top:0;background:#fff!important;z-index:1}.currentRoleButton[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;font-size:13px;width:120px;text-align:center}.emptyContent[_ngcontent-%COMP%]{opacity:.5;text-align:center;font-size:10px;padding:10px}.workflow[_ngcontent-%COMP%]{padding-top:10px;padding-bottom:10px;height:auto!important;margin-bottom:10px;background:hsla(0,0%,84.7%,.1);border-radius:10px;font-size:13px}.workflowLine[_ngcontent-%COMP%]{display:flex!important;align-items:center}.workflowLineContainer[_ngcontent-%COMP%]{flex:1}.workflowLineContainer[_ngcontent-%COMP%], .workflowLineLabel[_ngcontent-%COMP%], .workflowLineSubLabel[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis}.workflowLineSubLabel[_ngcontent-%COMP%]{font-size:80%;opacity:.5;flex:1}.workflowLineProcessDate[_ngcontent-%COMP%]{flex:1;text-align:left;font-size:80%}.workflowLine[_ngcontent-%COMP%] .mat-raised-button[disabled][_ngcontent-%COMP%]{background:none;color:#135f7f!important;opacity:1}.primary[_ngcontent-%COMP%]{color:#135f7f}"]}),t})();const vo=["searchVisaSignUserInput"];function _o(t,e){1&t&&(n.Wb(0,"mat-option",16),n.Wb(1,"div",17),n.Rb(2,"mat-spinner",18),n.Vb(),n.Vb())}function yo(t,e){if(1&t&&(n.Wb(0,"mat-option",21),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t.label," ")}}function xo(t,e){if(1&t&&(n.Wb(0,"mat-optgroup",19),n.ic(1,"translate"),n.Oc(2,yo,2,2,"mat-option",20),n.ic(3,"sortBy"),n.ic(4,"async"),n.Vb()),2&t){const t=n.hc(3);n.oc("label",n.jc(1,2,"lang.publicModel")),n.Db(2),n.oc("ngForOf",n.kc(3,4,n.jc(4,7,t.filteredPublicModels),"label"))}}function Co(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-option",21),n.Wb(1,"div",22),n.Wb(2,"div",23),n.Qc(3),n.Vb(),n.Wb(4,"button",24),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(4);return i.stopPropagation(),s.deletePrivateModel(a)})),n.Rb(5,"mat-icon",25),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.oc("value",t),n.Db(3),n.Sc(" ",t.label," ")}}function Oo(t,e){if(1&t&&(n.Wb(0,"mat-optgroup",19),n.ic(1,"translate"),n.Oc(2,Co,6,2,"mat-option",20),n.ic(3,"sortBy"),n.ic(4,"async"),n.Vb()),2&t){const t=n.hc(3);n.oc("label",n.jc(1,2,"lang.privateModel")),n.Db(2),n.oc("ngForOf",n.kc(3,4,n.jc(4,7,t.filteredPrivateModels),"label"))}}function Do(t,e){if(1&t&&(n.Wb(0,"mat-option",21),n.Qc(1),n.Wb(2,"small"),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t.label,"\xa0"),n.Db(2),n.Sc("(",t.entity,")")}}function wo(t,e){if(1&t&&(n.Wb(0,"mat-optgroup",19),n.ic(1,"translate"),n.ic(2,"translate"),n.Oc(3,Do,4,3,"mat-option",20),n.ic(4,"sortBy"),n.ic(5,"async"),n.Vb()),2&t){const t=n.hc(3);n.oc("label",n.jc(1,2,"lang.visaUser")+" / "+n.jc(2,4,"lang.signUser")),n.Db(3),n.oc("ngForOf",n.kc(4,6,n.jc(5,9,t.filteredSignVisaUsers),"label"))}}function Mo(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",26),n.dc("click",(function(e){n.Dc(t);const i=n.hc(3);return e.stopPropagation(),i.openPromptSaveModel()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",27),n.Vb()}2&t&&n.pc("title",n.jc(1,1,"lang.saveAsPrivateModel"))}function ko(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field",8),n.Rb(1,"input",9,10),n.ic(3,"translate"),n.Wb(4,"mat-autocomplete",11,12),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc(2).addItemToWorkflow(e.option.value)}))("opened",(function(){return n.Dc(t),n.hc(2).initFilterVisaModelList()})),n.Oc(6,_o,3,0,"mat-option",13),n.Oc(7,xo,5,9,"mat-optgroup",14),n.ic(8,"async"),n.Oc(9,Oo,5,9,"mat-optgroup",14),n.ic(10,"async"),n.Oc(11,wo,6,11,"mat-optgroup",14),n.ic(12,"async"),n.Vb(),n.Oc(13,Mo,3,3,"button",15),n.Vb()}if(2&t){const t=n.zc(5),e=n.hc(2);var i,a,s;n.Db(1),n.pc("placeholder",n.jc(3,8,"lang.addUsers")),n.oc("formControl",e.searchVisaSignUser)("matAutocomplete",t),n.Db(5),n.oc("ngIf",e.visaModelListNotLoaded),n.Db(1),n.oc("ngIf",(null==(i=n.jc(8,10,e.filteredPublicModels))?null:i.length)>0),n.Db(2),n.oc("ngIf",(null==(a=n.jc(10,12,e.filteredPrivateModels))?null:a.length)>0),n.Db(2),n.oc("ngIf",(null==(s=n.jc(12,14,e.filteredSignVisaUsers))?null:s.length)>0),n.Db(2),n.oc("ngIf",e.visaWorkflow.items.length>0&&e.showListModels)}}const So=function(){return["/rest/autocomplete/maarchParapheurUsers"]};function Io(t,e){if(1&t){const t=n.Xb();n.Wb(0,"plugin-autocomplete",28),n.dc("triggerEvent",(function(e){return n.Dc(t),n.hc(2).addItemToWorkflow(e,!0)})),n.ic(1,"translate"),n.Vb()}2&t&&n.oc("labelPlaceholder",n.jc(1,4,"lang.addPerson"))("routeDatas",n.uc(6,So))("targetSearchKey","idToDisplay")("subInfoKey","email")}function Po(t,e){1&t&&(n.Wb(0,"div",29),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noVisaWorkflow")," "))}function Vo(t,e){1&t&&(n.Wb(0,"div",29),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.cannotAddVisaCircuit")," "))}function Ro(t,e){1&t&&n.Rb(0,"mat-icon",44)}function jo(t,e){if(1&t&&n.Rb(0,"i",45),2&t){const t=n.hc().$implicit;n.oc("matTooltip",t.process_comment)}}const Ao=function(t,e){return[t,e]};function Wo(t,e){if(1&t&&(n.Ub(0),n.Rb(1,"mat-icon",46),n.ic(2,"translate"),n.ic(3,"translate"),n.ic(4,"translate"),n.ic(5,"translate"),n.ic(6,"translate"),n.ic(7,"translate"),n.ic(8,"translate"),n.ic(9,"translate"),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Ib("fa-hourglass",null==t.process_date)("fa-thumbs-up",null!=t.process_date&&-1===n.wc(29,Ao,n.jc(2,13,"lang.visaWorkflowInterrupted"),n.jc(3,15,"lang.hasInterruptedWorkflow")).indexOf(t.process_comment))("fa-hand-paper",null!=t.process_date&&t.process_comment===n.jc(4,17,"lang.hasInterruptedWorkflow"))("fa-times",null!=t.process_date&&t.process_comment===n.jc(5,19,"lang.visaWorkflowInterrupted"))("valid",null!=t.process_date&&-1===n.wc(32,Ao,n.jc(6,21,"lang.visaWorkflowInterrupted"),n.jc(7,23,"lang.hasInterruptedWorkflow")).indexOf(t.process_comment))("invalid",null!=t.process_date&&n.wc(35,Ao,n.jc(8,25,"lang.visaWorkflowInterrupted"),n.jc(9,27,"lang.hasInterruptedWorkflow")).indexOf(t.process_comment)>-1),n.oc("title",null!==t.process_comment?t.process_comment:"")}}function To(t,e){if(1&t&&(n.Ub(0),n.Rb(1,"mat-icon",47),n.ic(2,"translate"),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("title",n.jc(2,1,"lang.insteadOf")+" "+t.delegatedBy)}}function Eo(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",37),n.Wb(1,"mat-form-field"),n.Wb(2,"input",48),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().$implicit.process_comment=e})),n.ic(3,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(),e=t.$implicit,i=t.index,a=n.hc(2);n.Db(2),n.oc("disabled",!a.adminMode||null!=e.process_date||"signatureBook"===a.target&&a.getCurrentVisaUserIndex()===i)("placeholder",n.jc(3,3,"lang.visaNote"))("ngModel",e.process_comment)}}function Fo(t,e){if(1&t&&(n.Wb(0,"div",49),n.ic(1,"fullDate"),n.Qc(2),n.ic(3,"translate"),n.ic(4,"translate"),n.ic(5,"timeAgo"),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc(2);n.pc("title",n.jc(1,3,t.process_date)),n.Db(2),n.Tc("",e.functions.empty(t.process_date)&&t.requested_signature||t.signatory?n.jc(3,5,"lang.signedUserDate"):n.jc(4,7,"lang.approvedUserDate")," ",n.kc(5,9,t.process_date,"full"),"")}}function Lo(t,e){if(1&t&&(n.Wb(0,"div",50),n.ic(1,"fullDate"),n.Qc(2),n.ic(3,"translate"),n.ic(4,"timeAgo"),n.Vb()),2&t){const t=n.hc().$implicit;n.pc("title",n.jc(1,3,t.process_date)),n.Db(2),n.Tc("",n.jc(3,5,"lang.interrupted")," ",n.kc(4,7,t.process_date,"full"),"")}}function Qo(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div"),n.Wb(1,"button",51),n.dc("click",(function(){n.Dc(t);const e=n.hc().index;return n.hc(2).changeRole(e)})),n.ic(2,"translate"),n.Qc(3),n.ic(4,"translate"),n.ic(5,"translate"),n.Vb(),n.Vb()}if(2&t){const t=n.hc(),e=t.$implicit,i=t.index,a=n.hc(2);n.Db(1),n.pc("title",n.jc(2,4,"lang."+e.currentRole+"User")),n.oc("color",a.functions.empty(e.process_date)&&e.requested_signature||e.signatory?"primary":"")("disabled",!a.canManageUser(e,i)),n.Db(2),n.Rc(a.functions.empty(e.process_date)&&e.requested_signature||e.signatory?n.jc(4,6,"lang.signUser"):n.jc(5,8,"lang.visaUser"))}}function No(t,e){1&t&&(n.Wb(0,"div",52),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noPrivileges")," "))}function zo(t,e){1&t&&(n.Wb(0,"div",53),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.userNotValid")," "))}function Bo(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",54),n.dc("click",(function(){n.Dc(t);const e=n.hc().index;return n.hc(2).deleteItem(e)})),n.Rb(1,"mat-icon",55),n.Vb()}}const Uo=function(){return["A termin\xe9 le circuit"]};function $o(t,e){if(1&t&&(n.Wb(0,"mat-list-item",30),n.ic(1,"translate"),n.ic(2,"translate"),n.ic(3,"translate"),n.ic(4,"translate"),n.Oc(5,Ro,1,0,"mat-icon",31),n.Wb(6,"mat-icon",32),n.ic(7,"translate"),n.Oc(8,jo,1,1,"i",33),n.Vb(),n.Oc(9,Wo,10,38,"ng-container",0),n.Wb(10,"div",34),n.Wb(11,"div",35),n.Wb(12,"div",36),n.Qc(13),n.Oc(14,To,3,3,"ng-container",0),n.Vb(),n.Wb(15,"div",37),n.Qc(16),n.Vb(),n.Oc(17,Eo,4,5,"div",38),n.Oc(18,Fo,6,12,"div",39),n.ic(19,"translate"),n.ic(20,"translate"),n.Oc(21,Lo,5,10,"div",40),n.Vb(),n.Oc(22,Qo,6,10,"div",0),n.Oc(23,No,3,3,"div",41),n.Oc(24,zo,3,3,"div",42),n.Vb(),n.Oc(25,Bo,2,0,"button",43),n.Vb()),2&t){const t=e.$implicit,i=e.index,a=n.hc(2);n.Ib("notDraggable",!a.canManageUser(t,i))("notEditable",!a.adminMode)("processed",null!=t.process_date&&-1===n.wc(53,Ao,n.jc(1,39,"lang.visaWorkflowInterrupted"),n.jc(2,41,"lang.hasInterruptedWorkflow")).indexOf(t.process_comment))("interrupt",null!=t.process_date&&n.wc(56,Ao,n.jc(3,43,"lang.visaWorkflowInterrupted"),n.jc(4,45,"lang.hasInterruptedWorkflow")).indexOf(t.process_comment)>-1),n.oc("cdkDragDisabled",!a.canManageUser(t,i)),n.Db(5),n.oc("ngIf",a.getCurrentVisaUserIndex()===i&&(!a.adminMode||"signatureBook"===a.target)),n.Db(1),n.Lc("background-image",a.functions.empty(t.picture)?"":"url("+t.picture+")"),n.Ib("avatar",!a.functions.empty(t.picture))("fa-user",a.functions.empty(t.picture)&&t.isValid||null===t.process_date&&null===t.delegatedBy)("fa-user-friends",null!=t.process_date&&null!==t.delegatedBy)("fa-user-slash",!t.isValid)("invalid",!t.hasPrivilege||!t.isValid),n.oc("title",t.isValid?"":n.jc(7,47,"lang.userNotValid")),n.Db(2),n.oc("ngIf",!a.functions.empty(t.process_comment)),n.Db(1),n.oc("ngIf",(!a.adminMode||null!=t.process_date)&&t.isValid),n.Db(3),n.Ib("unauthorized",!t.hasPrivilege||!t.isValid),n.Db(1),n.Sc(" ",t.labelToDisplay," "),n.Db(1),n.oc("ngIf",null!=t.process_date&&null!==t.delegatedBy),n.Db(1),n.Ib("unauthorized",!t.hasPrivilege||!t.isValid),n.Db(1),n.Sc(" ",t.item_entity," "),n.Db(1),n.oc("ngIf",a.showComment&&(!a.linkedToMaarchParapheur&&a.adminMode&&a.functions.empty(t.process_date)||!a.linkedToMaarchParapheur&&a.getCurrentVisaUserIndex()===i&&!a.functions.empty(t.process_comment))&&t.hasPrivilege&&t.isValid),n.Db(1),n.oc("ngIf",t.requested_signature&&null!=t.process_date&&-1===n.wc(59,Ao,n.jc(19,49,"lang.visaWorkflowInterrupted"),n.jc(20,51,"lang.hasInterruptedWorkflow")).indexOf(t.process_comment)),n.Db(3),n.oc("ngIf",null!=t.process_date&&n.uc(62,Uo).indexOf(t.process_comment)>-1),n.Db(1),n.oc("ngIf",t.hasPrivilege&&t.isValid),n.Db(1),n.oc("ngIf",!t.hasPrivilege),n.Db(1),n.oc("ngIf",!t.isValid),n.Db(1),n.oc("ngIf",a.canManageUser(t,i))}}function Ho(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list"),n.Oc(1,ko,14,16,"mat-form-field",2),n.Oc(2,Io,2,7,"plugin-autocomplete",3),n.Wb(3,"div",4,5),n.dc("cdkDropListDropped",(function(e){return n.Dc(t),n.hc().drop(e)})),n.Oc(5,Po,3,3,"div",6),n.Oc(6,Vo,3,3,"div",6),n.Oc(7,$o,26,63,"mat-list-item",7),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.adminMode&&!t.linkedToMaarchParapheur),n.Db(1),n.oc("ngIf",t.linkedToMaarchParapheur&&t.adminMode),n.Db(1),n.oc("cdkDropListData",t.visaWorkflow.items)("cdkDropListDisabled",!t.adminMode),n.Db(2),n.oc("ngIf",t.adminMode&&0===t.visaWorkflow.items.length),n.Db(1),n.oc("ngIf",!t.adminMode&&0===t.visaWorkflow.items.length),n.Db(1),n.oc("ngForOf",t.visaWorkflow.items)}}function Go(t,e){1&t&&(n.Wb(0,"div",56),n.Rb(1,"mat-spinner",57),n.Vb())}function Xo(t,e){if(1&t&&n.Rb(0,"app-history-visa-workflow",61),2&t){const t=n.hc(2);n.oc("resId",t.resId)}}function qo(t,e){1&t&&(n.Ub(0),n.Rb(1,"mat-divider"),n.Wb(2,"mat-expansion-panel",58),n.Wb(3,"mat-expansion-panel-header"),n.Wb(4,"mat-panel-title",59),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Vb(),n.Oc(7,Xo,1,1,"ng-template",60),n.Vb(),n.Tb()),2&t&&(n.Db(5),n.Sc(" ",n.jc(6,1,"lang.showVisaWorkflowHistory")," "))}let Ko=(()=>{class t{constructor(t,e,i,a,s,o,r,c,l){this.translate=t,this.http=e,this.notify=i,this.functions=a,this.latinisePipe=s,this.dialog=o,this.scanPipe=r,this.route=c,this.privilegeService=l,this.visaWorkflow={roles:["sign","visa"],items:[]},this.visaWorkflowClone=[],this.visaTemplates={private:[],public:[]},this.signVisaUsers=[],this.loading=!1,this.hasHistory=!1,this.visaModelListNotLoaded=!0,this.target="",this.resId=null,this.showListModels=!0,this.showComment=!0,this.linkedToMaarchParapheur=!1,this.workflowUpdated=new n.o,this.searchVisaSignUser=new X.i,this.loadedInConstructor=!1,this.route.params.subscribe(t=>{this.loading=!0,this.resId=t.resId,this.functions.empty(this.resId)?this.loadedInConstructor=!1:(this.loadedInConstructor=!0,this.loadWorkflow(this.resId))},t=>{this.notify.handleErrors(t)})}ngOnInit(){this.functions.empty(this.resId)||this.loadedInConstructor?this.loading=!1:this.loadWorkflow(this.resId)}drop(t){t.previousContainer===t.container&&(this.canManageUser(this.visaWorkflow.items[t.currentIndex],t.currentIndex)?(Object(lo.h)(t.container.data,t.previousIndex,t.currentIndex),this.workflowUpdated.emit(t.container)):this.notify.error(this.translate.instant("lang.moveVisaUserErr",{value1:this.visaWorkflow.items[t.previousIndex].labelToDisplay})))}loadListModel(t){this.loading=!0,this.visaWorkflow.items=[];const e=!0===this.linkedToMaarchParapheur?`../rest/listTemplates/entities/${t}?type=visaCircuit&maarchParapheur=true`:`../rest/listTemplates/entities/${t}?type=visaCircuit`;return new Promise(t=>{this.http.get(e).subscribe(e=>{e.listTemplates[0]&&(this.visaWorkflow.items=e.listTemplates[0].items.map(t=>Object.assign(Object.assign({},t),{item_entity:t.descriptionToDisplay,requested_signature:"visa"!==t.item_mode,currentRole:t.item_mode}))),this.visaWorkflow.items.forEach((t,e)=>{this.functions.empty(t.externalId)||this.getMaarchParapheurUserAvatar(t.externalId.maarchParapheur,e)}),this.visaWorkflowClone=JSON.parse(JSON.stringify(this.visaWorkflow.items)),this.loading=!1,t(!0)})})}loadVisaSignUsersList(){return new Promise((t,e)=>{this.http.get("../rest/autocomplete/users/circuit").pipe(Object(l.a)(t=>t.map(t=>({id:t.id,title:`${t.idToDisplay} (${t.otherInfo})`,label:t.idToDisplay,entity:t.otherInfo,type:"user",hasPrivilege:!0,isValid:!0,currentRole:"visa"}))),Object(mt.a)(e=>{this.signVisaUsers=e,this.filteredSignVisaUsers=this.searchVisaSignUser.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>this._filter(t))),t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}loadVisaModelList(){return Object(r.a)(this,void 0,void 0,(function*(){return this.functions.empty(this.resId)||(yield this.loadDefaultModel()),new Promise((t,e)=>{this.http.get("../rest/availableCircuits?circuit=visa").pipe(Object(mt.a)(e=>{this.visaTemplates.public=this.visaTemplates.public.concat(e.circuits.filter(t=>!t.private).map(t=>({id:t.id,title:t.title,label:t.title,type:"entity"}))),this.visaTemplates.private=e.circuits.filter(t=>t.private).map(t=>({id:t.id,title:t.title,label:t.title,type:"entity"})),this.filteredPublicModels=this.searchVisaSignUser.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>this._filterPublicModel(t))),this.filteredPrivateModels=this.searchVisaSignUser.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>this._filterPrivateModel(t))),t(!0)})).subscribe()})}))}loadDefaultModel(){return this.visaTemplates.public=[],new Promise((t,e)=>{this.http.get(`../rest/resources/${this.resId}/defaultCircuit?circuit=visa`).pipe(Object(d.a)(t=>!this.functions.empty(t.circuit)),Object(mt.a)(t=>{this.functions.empty(t.circuit)||this.visaTemplates.public.push({id:t.circuit.id,title:t.circuit.title,label:t.circuit.title,type:"entity"})}),Object(Xt.a)(()=>t(!0)),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}initFilterVisaModelList(){return Object(r.a)(this,void 0,void 0,(function*(){this.linkedToMaarchParapheur||this.visaModelListNotLoaded&&(yield this.loadVisaSignUsersList(),this.showListModels&&(yield this.loadVisaModelList()),this.searchVisaSignUser.reset(),this.visaModelListNotLoaded=!1)}))}_filter(t){if("string"==typeof t){const e=this.latinisePipe.transform(t.toLowerCase());return this.signVisaUsers.filter(t=>this.latinisePipe.transform(t.title.toLowerCase()).includes(e))}return this.signVisaUsers}_filterPrivateModel(t){if("string"==typeof t){const e=this.latinisePipe.transform(t.toLowerCase());return this.visaTemplates.private.filter(t=>this.latinisePipe.transform(t.title.toLowerCase()).includes(e))}return this.visaTemplates.private}_filterPublicModel(t){if("string"==typeof t){const e=this.latinisePipe.transform(t.toLowerCase());return this.visaTemplates.public.filter(t=>this.latinisePipe.transform(t.title.toLowerCase()).includes(e))}return this.visaTemplates.public}loadWorkflow(t){return this.resId=t,this.loading=!0,this.visaWorkflow.items=[],new Promise(e=>{this.http.get("../rest/resources/"+t+"/visaCircuit").pipe(Object(mt.a)(t=>{this.functions.empty(t.circuit)||(t.circuit.forEach(t=>{this.visaWorkflow.items.push(Object.assign(Object.assign({},t),{difflist_type:"VISA_CIRCUIT",currentRole:t.requested_signature?"sign":"visa"}))}),this.visaWorkflowClone=JSON.parse(JSON.stringify(this.visaWorkflow.items))),this.hasHistory=t.hasHistory}),Object(Xt.a)(()=>{this.loading=!1,e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}loadDefaultWorkflow(t){this.loading=!0,this.visaWorkflow.items=[],this.http.get("../rest/resources/"+t+"/defaultCircuit?circuit=visaCircuit").pipe(Object(d.a)(t=>!this.functions.empty(t.circuit)),Object(mt.a)(t=>{t.circuit.items.forEach(t=>{this.visaWorkflow.items.push(Object.assign(Object.assign({},t),{requested_signature:"visa"!==t.item_mode,difflist_type:"VISA_CIRCUIT"}))}),this.visaWorkflowClone=JSON.parse(JSON.stringify(this.visaWorkflow.items))}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}loadWorkflowMaarchParapheur(t,e){this.loading=!0,this.visaWorkflow.items=[],this.http.get(`../rest/documents/${t}/maarchParapheurWorkflow?type=${e}`).subscribe(t=>{t.workflow.forEach((t,e)=>{const i={listinstance_id:e,id:t.userId,labelToDisplay:t.userDisplay,requested_signature:"visa"!==t.mode,process_date:this.functions.formatFrenchDateToTechnicalDate(t.processDate),picture:"",hasPrivilege:!0,isValid:!0};this.visaWorkflow.items.push(i),this.http.get("../rest/maarchParapheur/user/"+t.userId+"/picture").subscribe(e=>{this.visaWorkflow.items.filter(e=>e.id===t.userId)[0].picture=e.picture},t=>{this.notify.handleErrors(t)})}),this.loading=!1},t=>{this.notify.handleErrors(t)})}deleteItem(t){this.visaWorkflow.items.splice(t,1),this.workflowUpdated.emit(this.visaWorkflow.items)}getVisaCount(){return this.visaWorkflow.items.length}changeRole(t){this.visaWorkflow.items[t].requested_signature=!this.visaWorkflow.items[t].requested_signature,this.visaWorkflow.items[t].currentRole=this.visaWorkflow.items[t].requested_signature?"sign":"visa",this.workflowUpdated.emit(this.visaWorkflow.items)}getWorkflow(){return this.visaWorkflow.items}getCurrentVisaUserIndex(){if(void 0===this.getLastVisaUser().listinstance_id)return this.getRealIndex(0);{let t=this.visaWorkflow.items.map(t=>t.listinstance_id).indexOf(this.getLastVisaUser().listinstance_id);return t++,this.getRealIndex(t)}}getFirstVisaUser(){return!this.functions.empty(this.visaWorkflow.items[0])&&this.visaWorkflow.items[0].isValid?this.visaWorkflow.items[0]:""}getNextVisaUser(){let t=this.getCurrentVisaUserIndex();t+=1;const e=this.getRealIndex(t);return this.functions.empty(this.visaWorkflow.items[e])?"":this.visaWorkflow.items[e]}getLastVisaUser(){const t=this.visaWorkflow.items.filter(t=>!this.functions.empty(t.process_date)&&t.isValid);return this.functions.empty(t[t.length-1])?"":t[t.length-1]}getRealIndex(t){for(;t<this.visaWorkflow.items.length&&!this.visaWorkflow.items[t].isValid;)t++;return t}checkExternalSignatoryBook(){return this.visaWorkflow.items.filter(t=>this.functions.empty(t.externalId)).map(t=>t.labelToDisplay)}saveVisaWorkflow(t=[this.resId]){return new Promise((e,i)=>{if(0===this.visaWorkflow.items.length)this.http.delete(`../rest/resources/${t[0]}/circuits/visaCircuit`).pipe(Object(mt.a)(()=>{this.visaWorkflowClone=JSON.parse(JSON.stringify(this.visaWorkflow.items)),this.notify.success(this.translate.instant("lang.visaWorkflowDeleted")),e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),e(!1),Object(c.a)(!1)))).subscribe();else if(this.isValidWorkflow()){const i=t.map(t=>({resId:t,listInstances:this.visaWorkflow.items}));this.http.put("../rest/circuits/visaCircuit",{resources:i}).pipe(Object(mt.a)(t=>{this.visaWorkflowClone=JSON.parse(JSON.stringify(this.visaWorkflow.items)),this.notify.success(this.translate.instant("lang.visaWorkflowUpdated")),e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),e(!1),Object(c.a)(!1)))).subscribe()}else this.notify.error(this.getError()),e(!1)})}addItemToWorkflow(t,e=!1){return new Promise((i,n)=>{if(e){const e=!this.functions.empty(t.requested_signature)&&t.requested_signature;this.visaWorkflow.items.push({item_id:t.id,item_type:"user",item_entity:t.email,labelToDisplay:t.idToDisplay,externalId:t.externalId,difflist_type:"VISA_CIRCUIT",signatory:!this.functions.empty(t.signatory)&&t.signatory,requested_signature:e,hasPrivilege:!0,isValid:!0,currentRole:e?"sign":"visa"}),this.linkedToMaarchParapheur&&this.getMaarchParapheurUserAvatar(t.externalId.maarchParapheur,this.visaWorkflow.items.length-1),this.searchVisaSignUser.reset(),i(!0)}else if("user"===t.type){const e=!this.functions.empty(t.requested_signature)&&t.requested_signature;this.visaWorkflow.items.push({item_id:t.id,item_type:"user",item_entity:t.entity,labelToDisplay:t.label,externalId:this.functions.empty(t.externalId)?null:t.externalId,difflist_type:"VISA_CIRCUIT",signatory:!this.functions.empty(t.signatory)&&t.signatory,requested_signature:e,hasPrivilege:t.hasPrivilege,isValid:t.isValid,currentRole:e?"sign":"visa"}),this.linkedToMaarchParapheur&&this.getMaarchParapheurUserAvatar(t.externalId.maarchParapheur,this.visaWorkflow.items.length-1),this.searchVisaSignUser.reset(),this.searchVisaSignUserInput.nativeElement.blur(),this.workflowUpdated.emit(this.visaWorkflow.items),i(!0)}else"entity"===t.type&&this.http.get("../rest/listTemplates/"+t.id).pipe(Object(mt.a)(t=>{this.visaWorkflow.items=this.visaWorkflow.items.concat(t.listTemplate.items.map(t=>({item_id:t.item_id,item_type:"user",labelToDisplay:t.idToDisplay,item_entity:t.descriptionToDisplay,difflist_type:"VISA_CIRCUIT",signatory:!1,requested_signature:"sign"===t.item_mode,hasPrivilege:t.hasPrivilege,isValid:t.isValid,currentRole:t.item_mode}))),this.searchVisaSignUser.reset(),this.searchVisaSignUserInput.nativeElement.blur(),i(!0)})).subscribe()})}resetWorkflow(){this.visaWorkflow.items=[]}isValidWorkflow(){return this.visaWorkflow.items.filter(t=>t.requested_signature).length>0&&0===this.visaWorkflow.items.filter(t=>(!t.hasPrivilege||!t.isValid)&&(null===t.process_date||this.functions.empty(t.process_date))).length&&this.visaWorkflow.items.length>0}getError(){return 0===this.visaWorkflow.items.filter(t=>t.requested_signature).length?this.translate.instant("lang.signUserRequired"):this.visaWorkflow.items.filter(t=>!t.hasPrivilege).length>0?this.translate.instant("lang.mustDeleteUsersWithNoPrivileges"):this.visaWorkflow.items.filter(t=>!t.isValid&&(null===t.process_date||this.functions.empty(t.process_date))).length>0?this.translate.instant("lang.mustDeleteInvalidUsers"):void 0}emptyWorkflow(){return 0===this.visaWorkflow.items.length}workflowEnd(){return this.visaWorkflow.items.filter(t=>!this.functions.empty(t.process_date)).length===this.visaWorkflow.items.length}openPromptSaveModel(){this.dialog.open(ho,{panelClass:"maarch-modal",data:{visaWorkflow:this.visaWorkflow.items}}).afterClosed().pipe(Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.visaTemplates.private.push({id:t.id,title:t.title,label:t.title,type:"entity"}),this.searchVisaSignUser.reset()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}deletePrivateModel(t){this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete("../rest/listTemplates/"+t.id)),Object(mt.a)(()=>{this.visaTemplates.private=this.visaTemplates.private.filter(e=>e.id!==t.id),this.searchVisaSignUser.reset(),this.notify.success(this.translate.instant("lang.modelDeleted"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}getMaarchParapheurUserAvatar(t,e){this.functions.empty(t)||this.http.get("../rest/maarchParapheur/user/"+t+"/picture").subscribe(t=>{this.visaWorkflow.items[e].picture=t.picture},t=>{this.notify.handleErrors(t)})}isModified(){return!(this.loading||JSON.stringify(this.visaWorkflow.items)===JSON.stringify(this.visaWorkflowClone))}canManageUser(t,e){return!!this.adminMode&&!!this.functions.empty(t.process_date)&&("signatureBook"!==this.target||this.getCurrentVisaUserIndex()!==e||this.privilegeService.hasCurrentUserPrivilege("modify_visa_in_signatureBook"))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(_t.a),n.Qb(Tt.c),n.Qb(q.b),n.Qb(Tt.o),n.Qb(o.a),n.Qb(Dt.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-visa-workflow"]],viewQuery:function(t,e){var i;1&t&&n.Xc(vo,!0),2&t&&n.yc(i=n.ec())&&(e.searchVisaSignUserInput=i.first)},inputs:{injectDatas:"injectDatas",target:"target",adminMode:"adminMode",resId:"resId",showListModels:"showListModels",showComment:"showComment",linkedToMaarchParapheur:"linkedToMaarchParapheur"},outputs:{workflowUpdated:"workflowUpdated"},features:[n.Cb([Tt.o])],decls:3,vars:3,consts:[[4,"ngIf"],["style","display:flex;padding: 10px;",4,"ngIf"],["appearance","outline",4,"ngIf"],["appearance","outline",3,"labelPlaceholder","routeDatas","targetSearchKey","subInfoKey","triggerEvent",4,"ngIf"],["cdkDropList","",1,"cdk-list",3,"cdkDropListData","cdkDropListDisabled","cdkDropListDropped"],["dataAvailableList","cdkDropList"],["class","emptyContent",4,"ngIf"],["disableRipple","","cdkDrag","","class","columns workflow",3,"cdkDragDisabled","notDraggable","notEditable","processed","interrupt",4,"ngFor","ngForOf"],["appearance","outline"],["type","text","matInput","","id","searchVisaSignUserInput",3,"placeholder","formControl","matAutocomplete"],["searchVisaSignUserInput",""],[3,"optionSelected","opened"],["autoGroup","matAutocomplete"],["disabled","",4,"ngIf"],["class","visaSignList",3,"label",4,"ngIf"],["mat-icon-button","","matSuffix","","color","primary",3,"title","click",4,"ngIf"],["disabled",""],[2,"display","flex","justify-content","center"],["diameter","35"],[1,"visaSignList",3,"label"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[2,"display","flex","align-items","center"],[2,"flex","1"],["mat-icon-button","","color","warn",3,"click"],[1,"fa","fa-trash",2,"margin","0px"],["mat-icon-button","","matSuffix","","color","primary",3,"title","click"],[1,"fa","fa-plus"],["appearance","outline",3,"labelPlaceholder","routeDatas","targetSearchKey","subInfoKey","triggerEvent"],[1,"emptyContent"],["disableRipple","","cdkDrag","",1,"columns","workflow",3,"cdkDragDisabled"],["class","fa fa-chevron-right fa-2x","mat-list-icon","","color","accent",4,"ngIf"],["mat-list-icon","","color","primary",1,"fa","fa-2x",2,"position","relative",3,"title"],["class","far fa-comment-dots commentBubble",3,"matTooltip",4,"ngIf"],["mat-line","",1,"workflowLine"],[1,"workflowLineContainer"],[1,"workflowLineLabel"],[1,"workflowLineSubLabel"],["class","workflowLineSubLabel",4,"ngIf"],["class","workflowLineProcessDate","color","accent",3,"title",4,"ngIf"],["class","workflowLineProcessDate","color","warn",3,"title",4,"ngIf"],["class","invalid",4,"ngIf"],["class","invalid invalidMsg",4,"ngIf"],["mat-icon-button","",3,"click",4,"ngIf"],["mat-list-icon","","color","accent",1,"fa","fa-chevron-right","fa-2x"],[1,"far","fa-comment-dots","commentBubble",3,"matTooltip"],["mat-list-icon","",1,"fa-2x","fa",2,"opacity","0.5",3,"title"],["mat-list-icon","",1,"fas","fa-exclamation-circle",2,"opacity","0.5","font-size","125%","height","15px","color","red","cursor","help",3,"title"],["matInput","","maxlength","255",1,"comment",3,"disabled","placeholder","ngModel","ngModelChange"],["color","accent",1,"workflowLineProcessDate",3,"title"],["color","warn",1,"workflowLineProcessDate",3,"title"],["mat-raised-button","",1,"currentRoleButton",3,"color","disabled","title","click"],[1,"invalid"],[1,"invalid","invalidMsg"],["mat-icon-button","",3,"click"],["color","warn",1,"fa","fa-times"],[2,"display","flex","padding","10px"],[2,"margin","auto"],[2,"box-shadow","none"],["color","primary"],["matExpansionPanelContent",""],[2,"display","contents",3,"resId"]],template:function(t,e){1&t&&(n.Oc(0,Ho,8,7,"mat-list",0),n.Oc(1,Go,2,0,"div",1),n.Oc(2,qo,8,3,"ng-container",0)),2&t&&(n.oc("ngIf",!e.loading),n.Db(1),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading&&e.hasHistory))},directives:[P.t,R.a,lo.e,P.s,Y.c,J.b,X.d,Ne.d,X.u,X.j,Ne.a,W.p,V.c,W.o,k.b,S.a,Y.j,ii,R.d,lo.a,R.c,W.l,A.b,X.p,X.x,T.a,gt.c,gt.g,gt.h,gt.e,go],pipes:[g.d,P.b,Wt.a,uo,ps],styles:[".mat-form-field-appearance-outline[_ngcontent-%COMP%]{font-size:11px}.visaSignList[_ngcontent-%COMP%] .mat-optgroup-label{color:#135f7f;position:-webkit-sticky;position:sticky;top:0;background:#fff!important;z-index:1}.cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);background:#fff!important;padding:10px}.cdk-drag-preview[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%], .cdk-drag-preview[_ngcontent-%COMP%] .mat-icon-button[_ngcontent-%COMP%]{display:none}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.columns[_ngcontent-%COMP%]:last-child{border:none}.cdk-list.cdk-drop-list-dragging[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.columns[_ngcontent-%COMP%]{cursor:move}.notDraggable[_ngcontent-%COMP%]{cursor:not-allowed}.notEditable[_ngcontent-%COMP%]{cursor:auto}.currentContextButton[_ngcontent-%COMP%]{width:150px;text-align:left}.currentContextButton[_ngcontent-%COMP%], .currentRoleButton[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;font-size:13px}.currentRoleButton[_ngcontent-%COMP%]{width:120px;text-align:center}.emptyContent[_ngcontent-%COMP%]{opacity:.5;text-align:center;font-size:10px;padding:10px}.processed[_ngcontent-%COMP%]{background:rgba(0,104,65,.11)!important}.interrupt[_ngcontent-%COMP%]{background:rgba(142,62,82,.11)!important}.workflow[_ngcontent-%COMP%]{padding-top:10px;padding-bottom:10px;height:auto!important;margin-bottom:10px;background:hsla(0,0%,84.7%,.1);border-radius:10px;font-size:13px}.workflowLine[_ngcontent-%COMP%]{display:flex!important;align-items:center}.workflowLineContainer[_ngcontent-%COMP%]{flex:1}.workflowLineContainer[_ngcontent-%COMP%], .workflowLineLabel[_ngcontent-%COMP%], .workflowLineSubLabel[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis}.workflowLineSubLabel[_ngcontent-%COMP%]{font-size:80%;opacity:.5;flex:1}.workflowLineProcessDate[_ngcontent-%COMP%]{flex:1;text-align:left;font-size:80%}.workflowLine[_ngcontent-%COMP%] .mat-raised-button[disabled][_ngcontent-%COMP%]{background:none;color:#135f7f!important;opacity:1}.avatar[_ngcontent-%COMP%]{border:3px solid #f99830;height:45px!important;width:45px!important;background-size:cover;background-repeat:no-repeat;background-position:50%}.valid[_ngcontent-%COMP%]{color:#006841}.invalid[_ngcontent-%COMP%]{color:#8e3e52}.commentBubble[_ngcontent-%COMP%]{color:#f99830;position:absolute;top:-12px;right:-11px;font-size:20px;cursor:help}.comment[_ngcontent-%COMP%]:disabled{color:#000}.unauthorized[_ngcontent-%COMP%]{color:#8e3e52;text-decoration:line-through}.invalidMsg[_ngcontent-%COMP%]{opacity:.5;width:150px;white-space:break-spaces;text-align:center}"]}),t})();const Yo=["appVisaWorkflow"];let Jo=(()=>{class t{constructor(t,e,i,n){this.translate=t,this.http=e,this.data=i,this.dialogRef=n}ngOnInit(){this.appVisaWorkflow.loadWorkflowMaarchParapheur(this.data.id,this.data.type)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.a),n.Qb(q.h))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(Yo,!0),2&t&&n.yc(i=n.ec())&&(e.appVisaWorkflow=i.first)},decls:7,vars:4,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],[3,"adminMode"],["appVisaWorkflow",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-dialog-content"),n.Rb(5,"app-visa-workflow",2,3),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,2,"lang.externalVisaWorkflow")),n.Db(3),n.oc("adminMode",!1))},directives:[q.i,q.f,Ko],pipes:[g.d],styles:[".avatarAccount[_ngcontent-%COMP%]{border:3px solid #f99830;height:45px!important;width:45px!important;background-size:cover;background-repeat:no-repeat;background-position:50%}"]}),t})();var Zo=i("1G5W");const tr=["searchSelectInput"],er=["test"];function ir(t,e){if(1&t&&(n.Wb(0,"mat-label"),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.label)}}function nr(t,e){if(1&t&&(n.Wb(0,"span",11),n.Qc(1),n.ic(2,"lowercase"),n.ic(3,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Tc(" (+",t.formControlSelect.value.length-1," ",n.jc(2,2,n.jc(3,4,"lang.others")),") ")}}function ar(t,e){if(1&t&&(n.Wb(0,"mat-select-trigger"),n.Qc(1),n.Oc(2,nr,4,6,"span",10),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Sc(" ",t.formControlSelect.value.length>0?t.getFirstDataLabel():""," "),n.Db(1),n.oc("ngIf",(null==t.formControlSelect.value?null:t.formControlSelect.value.length)>1)}}function sr(t,e){1&t&&n.Rb(0,"input",12)}function or(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",18),n.dc("click",(function(){return n.Dc(t),n.hc(2)._reset(!0)})),n.Rb(1,"mat-icon",19),n.Vb()}}function rr(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",20),n.dc("click",(function(){return n.Dc(t),n.hc(2).formControlSearch.setValue("__SELECTED")})),n.ic(1,"translate"),n.Rb(2,"mat-icon",21),n.Vb()}if(2&t){const t=n.hc(2);n.oc("disabled",0===t.formControlSelect.value.length)("title",n.jc(1,2,"lang.displaySelectedValues"))}}const cr=function(t){return{"mat-select-search-inner-multiple":t}};function lr(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",13),n.Wb(1,"input",14,15),n.dc("keydown",(function(e){return n.Dc(t),n.hc()._handleKeydown(e)}))("input",(function(e){return n.Dc(t),n.hc().onInputChange(e.target.value)}))("blur",(function(e){return n.Dc(t),n.hc().onBlur(e.target.value)})),n.ic(3,"translate"),n.Vb(),n.Oc(4,or,2,0,"button",16),n.Oc(5,rr,3,4,"button",17),n.Vb()}if(2&t){const t=n.hc();n.oc("ngClass",n.vc(7,cr,t.matSelect.multiple)),n.Db(1),n.oc("formControl",t.formControlSearch)("placeholder",n.jc(3,5,"lang.filterBy")),n.Db(3),n.oc("ngIf",t.formControlSearch.value),n.Db(1),n.oc("ngIf",t.functions.empty(t.formControlSearch.value)&&t.multiple)}}function dr(t,e){1&t&&(n.Wb(0,"div",22),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noResult")," "))}function hr(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-option",23),n.dc("onSelectionChange",(function(e){return n.Dc(t),n.hc().selectChange(e)})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc();n.oc("value",t.emptyData()),n.Db(1),n.Sc("(",n.jc(2,2,"lang.emptyValue"),")")}}function ur(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-option",24),n.dc("onSelectionChange",(function(e){return n.Dc(t),n.hc().selectChange(e)})),n.Rb(1,"span",25),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc();n.Lc("color",t.color),n.Ib("opt-group",t.isTitle)("fixPos",t.isTitle&&i.datas.length>5),n.oc("value","id"===i.returnValue?t.id:t)("title",void 0!==t.title?t.title:t.label)("disabled",t.disabled),n.Db(1),n.oc("innerHTML",t.label,n.Ec)}}function pr(t,e){if(1&t&&(n.Wb(0,"mat-error"),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Sc(" ",t.getErrorMsg(t.formControlSelect.errors),"")}}function br(t,e){if(1&t&&n.Rb(0,"mat-icon",26),2&t){const t=n.hc();n.Lc("color",t.suffixIcon.color),n.oc("title",void 0!==t.suffixIcon.title?t.suffixIcon.title:"")}}let fr=(()=>{class t{constructor(t,e,i,a,s,o,r){this.translate=t,this.latinisePipe=e,this.changeDetectorRef=i,this.renderer=a,this.appService=s,this.functions=o,this.sortPipe=r,this.placeholderLabel=this.translate.instant("lang.chooseValue"),this.formControlSelect=new X.i,this.datas=[],this.returnValue="id",this.id="",this.showLabel=!1,this.required=!1,this.hideErrorDesc=!0,this.multiple=!1,this.optGroupTarget=null,this.optGroupList=null,this.suffixIcon=null,this.class="input-form",this.afterSelected=new n.o,this.afterOpened=new n.o,this.filteredDatasMulti=new la.a(1),this.datasClone=[],this.isModelModified=!1,this.overlayClassSet=!1,this.change=new n.o,this._onDestroy=new da.a,this.formControlSearch=new X.i,this.selected=[],this.onChange=t=>{},this.onTouched=t=>{}}get value(){return this._value}ngOnInit(){this.multiple&&(this.matSelect.compareWith=(t,e)=>t&&e?t.id===e.id:t===e),null!==this.optGroupList&&this.initOptGroups();const t="mat-select-search-panel";this.matSelect.panelClass?Array.isArray(this.matSelect.panelClass)?this.matSelect.panelClass.push(t):"string"==typeof this.matSelect.panelClass?this.matSelect.panelClass=[this.matSelect.panelClass,t]:"object"==typeof this.matSelect.panelClass&&(this.matSelect.panelClass[t]=!0):this.matSelect.panelClass=t,this.matSelect.openedChange.pipe(Object(Zo.a)(this._onDestroy)).subscribe(t=>{t?this.appService.getViewMode()||this._focus():this.formControlSearch.reset()}),this.matSelect.openedChange.pipe(Object(ro.a)(1)).pipe(Object(Zo.a)(this._onDestroy)).subscribe(()=>{this._options=this.matSelect.options,this._options.changes.pipe(Object(Zo.a)(this._onDestroy)).subscribe(()=>{const t=this.matSelect._keyManager;t&&this.matSelect.panelOpen&&setTimeout(()=>{t.setFirstItemActive()})})});let e="";this.datasClone=JSON.parse(JSON.stringify(this.datas)),this.datasClone.forEach((t,i)=>{t.isTitle?(e="group_"+i,t.id=e,i++):t.group=e}),this.filteredDatas=this.formControlSearch.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>this._filter(t)))}ngDoCheck(){if(this.datasClone.length!==this.datas.length||0===this.datasClone.length&&this.isModelModified){this.datasClone=JSON.parse(JSON.stringify(this.datas));let t="",e=1;this.datasClone.forEach(i=>{i.isTitle?(t="group_"+e,i.id=t,e++):i.group=t}),this.filteredDatas=this.formControlSearch.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>this._filter(t))),this.isModelModified=!1}}initOptGroups(){this.datas.unshift({id:0,label:"toto",disabled:!0});let t=[];this.optGroupList=this.sortPipe.transform(this.optGroupList,"label"),this.optGroupList.forEach(e=>{t.push({id:e.id,label:e.label,disabled:!0}),t=t.concat(this.datas.filter(t=>t[this.optGroupTarget]===e.id).map(t=>Object.assign(Object.assign({},t),{title:t.label,label:"  "+t.label})))}),this.datas=t}ngOnDestroy(){this._onDestroy.next(),this._onDestroy.complete()}ngAfterViewInit(){this.datas.length>5&&this.setOverlayClass()}_handleKeydown(t){32===t.keyCode&&t.stopPropagation()}writeValue(t){t!==this._value&&(this._value=t,this.change.emit(t))}onInputChange(t){t!==this._value&&(this._value=t,this.onChange(t),this.change.emit(t))}onBlur(t){this.writeValue(t),this.onTouched()}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}_focus(){const t=this.matSelect.panel.nativeElement,e=t.scrollTop;this.datas.length>5&&this.renderer.selectRootElement("#searchSelectInput").focus(),t.scrollTop=e}_reset(t){this.formControlSearch.reset(),this.renderer.selectRootElement("#searchSelectInput").focus()}setOverlayClass(){this.overlayClassSet||(this.matSelect.overlayDir.attach.pipe(Object(Zo.a)(this._onDestroy)).subscribe(()=>{void 0!==this.searchSelectInput&&this.searchSelectInput.nativeElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList.add("cdk-overlay-pane-select-search")}),this.overlayClassSet=!0)}initMultipleHandling(){this.matSelect.valueChange.pipe(Object(Zo.a)(this._onDestroy)).subscribe(t=>{if(this.matSelect.multiple){let e=!1;if(this._value&&this._value.length&&this.previousSelectedValues&&Array.isArray(this.previousSelectedValues)){t&&Array.isArray(t)||(t=[]);const i=this.matSelect.options.map(t=>t.value);this.previousSelectedValues.forEach(n=>{-1===t.indexOf(n)&&-1===i.indexOf(n)&&(t.push(n),e=!0)})}e&&this.matSelect._onChange(t),this.previousSelectedValues=t}})}_filter(t,e=!1){if("__SELECTED"===t)return this.datas.filter("id"===this.returnValue?t=>this.formControlSelect.value.indexOf(t.id)>-1:t=>this.formControlSelect.value.map(t=>t.id).indexOf(t.id)>-1);if("string"==typeof t&&""!==t){const e=this.latinisePipe.transform(t.toLowerCase()),i=this.datasClone.filter(t=>t.isTitle&&this.latinisePipe.transform(t.label.toLowerCase()).includes(e)).map(t=>t.id);return this.datasClone.filter(t=>t.isTitle&&i.indexOf(t.id)>-1||i.indexOf(t.group)>-1||this.latinisePipe.transform(t.label.toLowerCase()).includes(e))}return this.datas}launchEvent(t){if(this.selected.length>0){const t=new Set(this.formControlSelect.value.map(t=>t.id)),e=[...this.formControlSelect.value,...this.selected.filter(e=>!t.has(e.id))];this.formControlSelect.setValue(e)}void 0!==this.afterSelected&&this.afterSelected.emit(t.value)}selectChange(t){this.multiple&&t.isUserInput&&(this.selected=t.source._selected?this.formControlSelect.value:this.selected.length>0?this.selected.filter(e=>e.id!==t.source.value.id):[])}getErrorMsg(t){return void 0!==t.required?this.translate.instant("lang.requiredField"):void 0!==t.pattern||void 0!==t.email?this.translate.instant("lang.badFormat"):"unknow validator"}getFirstDataLabel(){return this.formControlSelect.value[0].label.replace(/ /g,"")}emptyData(){return"id"===this.returnValue?null:{id:null,label:this.translate.instant("lang.emptyValue")}}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(Tt.c),n.Qb(n.h),n.Qb(n.I),n.Qb(w.a),n.Qb(_t.a),n.Qb(Wt.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["plugin-select-search"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(tr,!0,n.l),n.Kc(er,!0)),2&t&&(n.yc(i=n.ec())&&(e.searchSelectInput=i.first),n.yc(i=n.ec())&&(e.matSelect=i.first))},inputs:{placeholderLabel:"placeholderLabel",formControlSelect:"formControlSelect",datas:"datas",returnValue:"returnValue",label:"label",id:"id",showResetOption:"showResetOption",showLabel:"showLabel",required:"required",hideErrorDesc:"hideErrorDesc",multiple:"multiple",optGroupTarget:"optGroupTarget",optGroupList:"optGroupList",suffixIcon:"suffixIcon",class:"class"},outputs:{afterSelected:"afterSelected",afterOpened:"afterOpened"},features:[n.Cb([Wt.a])],decls:13,vars:19,consts:[[3,"floatLabel"],[4,"ngIf"],[3,"id","formControl","placeholder","required","multiple","selectionChange"],["test",""],["matInput","","class","mat-select-search-input mat-select-search-hidden",4,"ngIf"],["class","mat-select-search-inner",3,"ngClass",4,"ngIf"],["class","mat-select-search-no-entries-found",4,"ngIf"],[3,"value","onSelectionChange",4,"ngIf"],[3,"value","title","disabled","opt-group","fixPos","color","onSelectionChange",4,"ngFor","ngForOf"],["style","height: auto;","matSuffix","","class","fas fa-circle selectSuffixIcon",3,"color","title",4,"ngIf"],["class","multipleLabels",4,"ngIf"],[1,"multipleLabels"],["matInput","",1,"mat-select-search-input","mat-select-search-hidden"],[1,"mat-select-search-inner",3,"ngClass"],["id","searchSelectInput",1,"mat-select-search-input",3,"formControl","placeholder","keydown","input","blur"],["searchSelectInput",""],["mat-button","","mat-icon-button","","aria-label","Clear","class","mat-select-search-clear",3,"click",4,"ngIf"],["color","primary","mat-icon-button","","class","mat-select-search-clear",3,"disabled","title","click",4,"ngIf"],["mat-button","","mat-icon-button","","aria-label","Clear",1,"mat-select-search-clear",3,"click"],[1,"fa","fa-times"],["color","primary","mat-icon-button","",1,"mat-select-search-clear",3,"disabled","title","click"],[1,"fas","fa-check-double"],[1,"mat-select-search-no-entries-found"],[3,"value","onSelectionChange"],[3,"value","title","disabled","onSelectionChange"],[3,"innerHTML"],["matSuffix","",1,"fas","fa-circle","selectSuffixIcon",2,"height","auto",3,"title"]],template:function(t,e){1&t&&(n.Wb(0,"mat-form-field",0),n.Oc(1,ir,2,1,"mat-label",1),n.Wb(2,"mat-select",2,3),n.dc("selectionChange",(function(t){return e.launchEvent(t)})),n.Oc(4,ar,3,2,"mat-select-trigger",1),n.Oc(5,sr,1,0,"input",4),n.Oc(6,lr,6,9,"div",5),n.Oc(7,dr,3,3,"div",6),n.Oc(8,hr,3,4,"mat-option",7),n.Oc(9,ur,2,10,"mat-option",8),n.ic(10,"async"),n.Vb(),n.Oc(11,pr,2,1,"mat-error",1),n.Oc(12,br,1,3,"mat-icon",9),n.Vb()),2&t&&(n.Fb(e.class+" search-select"),n.oc("floatLabel",e.appService.getViewMode()||e.showLabel?"":"never"),n.Db(1),n.oc("ngIf",e.appService.getViewMode()||e.showLabel),n.Db(1),n.oc("id",e.id)("formControl",e.formControlSelect)("placeholder",e.placeholderLabel)("required",e.required)("multiple",e.multiple),n.Db(2),n.oc("ngIf",e.multiple),n.Db(1),n.oc("ngIf",e.datas.length>5),n.Db(1),n.oc("ngIf",e.datas.length>5),n.Db(1),n.oc("ngIf",e.value&&0===(null==e._options?null:e._options.length)&&e.datas.length>5),n.Db(1),n.oc("ngIf",e.showResetOption),n.Db(1),n.oc("ngForOf",n.jc(10,17,e.filteredDatas)),n.Db(2),n.oc("ngIf","VALID"!==e.formControlSelect.status&&e.formControlSelect.touched&&!e.hideErrorDesc),n.Db(1),n.oc("ngIf",null!==e.suffixIcon))},directives:[Y.c,P.t,ee.a,X.u,X.j,X.F,P.s,Y.g,ee.c,J.b,P.q,X.d,k.b,S.a,W.p,Y.b,Y.j],pipes:[P.b,P.p,g.d],styles:[".mat-select-search-hidden[_ngcontent-%COMP%]{visibility:hidden}.mat-select-search-inner[_ngcontent-%COMP%]{position:absolute;top:0;width:calc(100% + 15px);border-bottom:1px solid #ccc;background:#fff;z-index:100}.mat-select-search-inner.mat-select-search-inner-multiple[_ngcontent-%COMP%]{width:calc(100% + 48px)} .mat-select-search-panel{transform:none!important;max-height:350px!important;max-width:inherit!important}.mat-select-search-input[_ngcontent-%COMP%]{padding:16px 36px 16px 16px;box-sizing:border-box;width:100%;border:none}.mat-select-search-no-entries-found[_ngcontent-%COMP%]{padding:16px}.mat-select-search-clear[_ngcontent-%COMP%]{position:absolute;right:0;top:4px} .cdk-overlay-pane-select-search{margin-top:-50px}.mat-error[_ngcontent-%COMP%]{font-weight:700}.mat-error[_ngcontent-%COMP%], .selectSuffixIcon[_ngcontent-%COMP%]{font-size:10px;text-align:right}.search-select[_ngcontent-%COMP%] .mat-selected:not(.mat-option-disabled){font-weight:700}.opt-group[_ngcontent-%COMP%]{position:-webkit-sticky;position:sticky;top:0;background:#fff;z-index:1}.opt-group[_ngcontent-%COMP%] .mat-pseudo-checkbox{display:none}.fixPos[_ngcontent-%COMP%]{top:50px!important}.multipleLabels[_ngcontent-%COMP%]{color:#f99830}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();function mr(t,e){1&t&&(n.Wb(0,"div",7),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.checkOnlyofficeServer"),"..."))}function gr(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",8),n.dc("click",(function(){return n.Dc(t),n.hc().quit()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",9),n.Vb()}if(2&t){const t=n.hc();n.Ib("buttonsHide",t.hideButtons)("fullScreen",t.fullscreenMode),n.oc("title",n.jc(1,5,"lang.closeEditor"))}}i("XxY3");let vr=(()=>{class t{constructor(t,e,i,a,s){this.translate=t,this.http=e,this.dialog=i,this.notify=a,this.headerService=s,this.loading=!0,this.editMode=!1,this.file={},this.params={},this.hideCloseEditor=!1,this.triggerAfterUpdatedDoc=new n.o,this.triggerCloseEditor=new n.o,this.triggerModifiedDocument=new n.o,this.key="",this.documentLoaded=!1,this.canUpdateDocument=!1,this.isSaving=!1,this.fullscreenMode=!1,this.tmpFilename="",this.appUrl="",this.onlyOfficeUrl="",this.hideButtons=!1,this.allowedExtension=["doc","docx","dotx","odt","ott","rtf","txt","html","xlsl","xlsx","xltx","ods","ots","csv"],this.eventAction=new da.a}onMessage(t){const e=JSON.parse(t.data);"onDownloadAs"===e.event?this.getEncodedDocument(e.data):"onDocumentReady"===e.event&&this.triggerModifiedDocument.emit()}quit(){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.close"),msg:this.translate.instant("lang.confirmCloseEditor")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.docEditor.destroyEditor(),this.closeEditor()})).subscribe()}closeEditor(){null===this.headerService.sideNavLeft||this.headerService.hideSideBar||this.headerService.sideNavLeft.open(),$("iframe[name='frameEditor']").css("position","initial"),this.fullscreenMode=!1,this.triggerAfterUpdatedDoc.emit(),this.triggerCloseEditor.emit()}getDocument(){this.isSaving=!0,this.docEditor.downloadAs(this.file.format)}getEncodedDocument(t){this.http.get("../rest/onlyOffice/encodedFile",{params:{url:t}}).pipe(Object(mt.a)(t=>{this.file.content=t.encodedFile,this.isSaving=!1,this.triggerAfterUpdatedDoc.emit(),this.eventAction.next(this.file)})).subscribe()}getEditorMode(t){return["csv","fods","ods","ots","xls","xlsm","xlsx","xlt","xltm","xltx"].indexOf(t)>-1?"spreadsheet":["fodp","odp","otp","pot","potm","potx","pps","ppsm","ppsx","ppt","pptm","pptx"].indexOf(t)>-1?"presentation":"text"}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.key=this.generateUniqueId(),this.canLaunchOnlyOffice()&&(yield this.getServerConfiguration(),yield this.checkServerStatus(),yield this.getMergedFileTemplate(),this.setEditorConfig(),yield this.getTokenOOServer(),this.initOfficeEditor(),this.loading=!1)}))}canLaunchOnlyOffice(){return!!this.isAllowedEditExtension(this.file.format)||(this.notify.error(this.translate.instant("lang.onlyofficeEditDenied")+" <b>"+this.file.format+"</b> "+this.translate.instant("lang.onlyofficeEditDenied2")),this.triggerCloseEditor.emit(),!1)}getServerConfiguration(){return new Promise((t,e)=>{this.http.get("../rest/onlyOffice/configuration").pipe(Object(mt.a)(e=>{if(e.enabled){const i=e.serverUri.split("/"),n=e.serverSsl?"https://":"http://",a=e.serverUri.split("/")[0],s=i.slice(1).join("/"),o=[a+(e.serverPort?":"+e.serverPort:":80"),s].join("/");this.onlyOfficeUrl=`${n}${o}`,this.appUrl=e.coreUrl,t(!0)}else this.triggerCloseEditor.emit()}),Object(m.a)(t=>(this.notify.handleErrors(t),this.triggerCloseEditor.emit(),Object(c.a)(!1)))).subscribe()})}checkServerStatus(){return new Promise((t,e)=>{null!==this.appUrl.match(/127\.0\.0\.1/g)||null!==this.appUrl.match(/localhost/g)?(this.notify.error(""+this.translate.instant("lang.errorOnlyoffice1")),this.triggerCloseEditor.emit()):this.http.get("../rest/onlyOffice/available").pipe(Object(mt.a)(e=>{e.isAvailable?t(!0):(this.notify.error(`${this.translate.instant("lang.errorOnlyoffice2")} ${this.onlyOfficeUrl}`),this.triggerCloseEditor.emit())}),Object(m.a)(t=>(this.notify.error(this.translate.instant("lang."+t.error.lang)),this.triggerCloseEditor.emit(),Object(c.a)(!1)))).subscribe()})}getMergedFileTemplate(){return new Promise((t,e)=>{this.http.post("../"+this.params.docUrl,{objectId:this.params.objectId,objectType:this.params.objectType,format:this.file.format,onlyOfficeKey:this.key,data:this.params.dataToMerge}).pipe(Object(mt.a)(e=>{this.tmpFilename=e.filename,this.file={name:this.key,format:e.filename.split(".").pop(),type:null,contentMode:"base64",content:null,src:null},t(!0)}),Object(m.a)(t=>(this.notify.handleErrors(t),this.triggerCloseEditor.emit(),Object(c.a)(!1)))).subscribe()})}generateUniqueId(t=5){let e="";const i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=i.length;for(let a=0;a<t;a++)e+=i.charAt(Math.floor(Math.random()*n));return e}ngAfterViewInit(){}initOfficeEditor(){this.docEditor=new DocsAPI.DocEditor("placeholder",this.editorConfig,this.onlyOfficeUrl)}getTokenOOServer(){return new Promise((t,e)=>{this.http.post("../rest/onlyOffice/token",{config:this.editorConfig}).pipe(Object(mt.a)(e=>{null!==e&&(this.editorConfig.token=e),t(!0)}),Object(m.a)(t=>(this.notify.handleErrors(t),this.triggerCloseEditor.emit(),Object(c.a)(!1)))).subscribe()})}setEditorConfig(){this.editorConfig={documentType:this.getEditorMode(this.file.format),document:{fileType:this.file.format,key:this.key,title:"Edition",url:`${this.appUrl}${this.params.docUrl}?filename=${this.tmpFilename}`,permissions:{comment:!1,download:!0,edit:this.editMode,print:!0,review:!1}},editorConfig:{callbackUrl:this.appUrl+"rest/onlyOfficeCallback",lang:this.translate.instant("lang.language"),region:this.translate.instant("lang.langISO"),mode:"edit",customization:{chat:!1,comments:!1,compactToolbar:!1,feedback:!1,forcesave:!1,goback:!1,hideRightMenu:!0,showReviewChanges:!1,zoom:-2},user:{id:"1",name:" "}}}}isLocked(){return!!this.isSaving}getFile(){return this.getDocument(),this.eventAction.asObservable()}ngOnDestroy(){this.eventAction.complete()}openFullscreen(){$("iframe[name='frameEditor']").css("top","0px"),$("iframe[name='frameEditor']").css("left","0px"),this.fullscreenMode?(null===this.headerService.sideNavLeft||this.headerService.hideSideBar||this.headerService.sideNavLeft.open(),$("iframe[name='frameEditor']").css("position","initial"),$("iframe[name='frameEditor']").css("z-index","1")):(null!==this.headerService.sideNavLeft&&this.headerService.sideNavLeft.close(),$("iframe[name='frameEditor']").css("position","fixed"),$("iframe[name='frameEditor']").css("z-index","2")),this.fullscreenMode=!this.fullscreenMode}isAllowedEditExtension(t){return this.allowedExtension.filter(e=>e.toLowerCase()===t.toLowerCase()).length>0}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.b),n.Qb(D.a),n.Qb(y.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["onlyoffice-viewer"]],hostBindings:function(t,e){1&t&&n.dc("message",(function(t){return e.onMessage(t)}),!1,n.Cc)},inputs:{editMode:"editMode",file:"file",params:"params",hideCloseEditor:"hideCloseEditor"},outputs:{triggerAfterUpdatedDoc:"triggerAfterUpdatedDoc",triggerCloseEditor:"triggerCloseEditor",triggerModifiedDocument:"triggerModifiedDocument"},decls:11,vars:24,consts:[["style","display:block;padding: 10px;",4,"ngIf"],["class","onlyofficeButton_fullscreen","mat-mini-fab","","color","warn",3,"buttonsHide","fullScreen","title","click",4,"ngIf"],["mat-mini-fab","","color","default",1,"onlyofficeButton_close",3,"title","click"],[1,"fas",2,"height","auto"],["mat-mini-fab","","color","default",1,"onlyofficeButton_hide",3,"title","click"],[1,"fa","fa-arrow-right",2,"height","auto"],["id","placeholder"],[2,"display","block","padding","10px"],["mat-mini-fab","","color","warn",1,"onlyofficeButton_fullscreen",3,"title","click"],[1,"fa","fa-times",2,"height","auto"]],template:function(t,e){1&t&&(n.Oc(0,mr,3,3,"div",0),n.Oc(1,gr,3,7,"button",1),n.Wb(2,"button",2),n.dc("click",(function(){return e.openFullscreen()})),n.ic(3,"translate"),n.ic(4,"translate"),n.Rb(5,"mat-icon",3),n.Vb(),n.Wb(6,"button",4),n.dc("click",(function(){return e.hideButtons=!e.hideButtons})),n.ic(7,"translate"),n.ic(8,"translate"),n.Rb(9,"mat-icon",5),n.Vb(),n.Rb(10,"div",6)),2&t&&(n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.hideCloseEditor),n.Db(1),n.Ib("buttonsHide",e.hideButtons)("fullScreen",e.fullscreenMode),n.oc("title",e.fullscreenMode?n.jc(3,16,"lang.closeFullscreen"):n.jc(4,18,"lang.openFullscreen")),n.Db(3),n.Ib("fa-expand",!e.fullscreenMode)("fa-compress",e.fullscreenMode),n.Db(1),n.Ib("fullScreen",e.fullscreenMode)("buttonsHide",e.hideButtons),n.oc("title",e.hideButtons?n.jc(8,22,"lang.showTool"):n.jc(7,20,"lang.hideTool")))},directives:[P.t,k.b,S.a],pipes:[g.d],styles:[".onlyofficeButton_close[_ngcontent-%COMP%], .onlyofficeButton_fullscreen[_ngcontent-%COMP%], .onlyofficeButton_hide[_ngcontent-%COMP%], .onlyofficeButton_show[_ngcontent-%COMP%]{position:absolute;top:12px;z-index:3;transition:all .5s}.onlyofficeButton_fullscreen[_ngcontent-%COMP%]{right:6px}.onlyofficeButton_close[_ngcontent-%COMP%]{right:56px}.onlyofficeButton_hide[_ngcontent-%COMP%]{right:106px}.onlyofficeButton_show[_ngcontent-%COMP%]{right:-15px}.fullScreen[_ngcontent-%COMP%]{position:fixed}.fullScreenEditor[_ngcontent-%COMP%]{top:0;left:0}.buttonsHide[_ngcontent-%COMP%]{top:-15px;right:-15px;transform:rotate(125deg);transition:all .5s}"]}),t})();const _r=["collaboraFrame"];function yr(t,e){1&t&&(n.Wb(0,"div",8),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.checkCollaboraOnlineServer"),"..."))}function xr(t,e){if(1&t&&n.Rb(0,"iframe",9,10),2&t){const t=n.hc();n.oc("src",t.editorUrl,n.Fc)}}let Cr=(()=>{class t{constructor(t,e,i,a,s,o){this.translate=t,this.http=e,this.dialog=i,this.notify=a,this.sanitizer=s,this.headerService=o,this.loading=!0,this.editMode=!1,this.file={},this.params={},this.triggerAfterUpdatedDoc=new n.o,this.triggerCloseEditor=new n.o,this.triggerModifiedDocument=new n.o,this.key=0,this.isSaving=!1,this.isModified=!1,this.fullscreenMode=!1,this.hideButtons=!1,this.allowedExtension=["doc","docx","dotx","odt","ott","rtf","txt","html","xlsl","xlsx","xltx","ods","ots","csv"],this.eventAction=new da.a,this.editorUrl="",this.token=""}onMessage(t){const e=JSON.parse(t.data);"Doc_ModifiedStatus"===e.MessageId&&!1===e.Values.Modified&&(this.isModified=!1),"Action_Save_Resp"!==e.MessageId||!0!==e.Values.success||this.isModified?"Doc_ModifiedStatus"===e.MessageId&&!1===e.Values.Modified&&this.isSaving?(this.triggerAfterUpdatedDoc.emit(),this.getTmpFile()):"Doc_ModifiedStatus"===e.MessageId&&!0===e.Values.Modified?(this.isModified=!0,this.triggerModifiedDocument.emit()):"App_LoadingStatus"===e.MessageId&&"Document_Loaded"===e.Values.Status&&this.collaboraFrame.nativeElement.contentWindow.postMessage(JSON.stringify({MessageId:"Host_PostmessageReady"}),"*"):setTimeout(()=>{this.triggerAfterUpdatedDoc.emit(),this.getTmpFile()},500)}quit(){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.close"),msg:this.translate.instant("lang.confirmCloseEditor")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.closeEditor()})).subscribe()}closeEditor(){null===this.headerService.sideNavLeft||this.headerService.hideSideBar||this.headerService.sideNavLeft.open(),$("iframe[name='frameEditor']").css("position","initial"),this.fullscreenMode=!1,this.collaboraFrame.nativeElement.contentWindow.postMessage(JSON.stringify({MessageId:"Action_Close",Values:null}),"*"),this.deleteTmpFile(),this.triggerAfterUpdatedDoc.emit(),this.triggerCloseEditor.emit()}saveDocument(){this.isSaving=!0,this.collaboraFrame.nativeElement.contentWindow.postMessage(JSON.stringify({MessageId:"Action_Save",Values:{Notify:!0,ExtendedData:"FinalSave=True",DontTerminateEdit:!0,DontSaveIfUnmodified:!1}}),"*")}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.key=this.generateUniqueId(10),this.canLaunchCollaboraOnline()&&(yield this.checkServerStatus(),this.params.objectPath=void 0,"string"!=typeof this.params.objectId||"templateModification"!==this.params.objectType&&"templateCreation"!==this.params.objectType?"string"==typeof this.params.objectId&&"encodedResource"===this.params.objectType&&(this.params.content=this.params.objectId,this.params.objectId=this.key,this.params.objectType="templateEncoded",yield this.saveEncodedFile()):(this.params.objectPath=this.params.objectId,this.params.objectId=this.key),yield this.getConfiguration(),this.loading=!1)}))}canLaunchCollaboraOnline(){return!!this.isAllowedEditExtension(this.file.format)||(this.notify.error(this.translate.instant("lang.onlyofficeEditDenied")+" <b>"+this.file.format+"</b> "+this.translate.instant("lang.collaboraOnlineEditDenied2")),this.triggerCloseEditor.emit(),!1)}checkServerStatus(){return new Promise(t=>{"127.0.0.1"===location.host||"localhost"===location.host?(this.notify.error(""+this.translate.instant("lang.errorCollaboraOnline1")),this.triggerCloseEditor.emit()):this.http.get("../rest/collaboraOnline/available").pipe(Object(mt.a)(e=>{e.isAvailable?t(!0):(this.notify.error(""+this.translate.instant("lang.errorCollaboraOnline2")),this.triggerCloseEditor.emit())}),Object(m.a)(t=>(this.notify.error(this.translate.instant("lang."+t.error.lang)),this.triggerCloseEditor.emit(),Object(c.a)(!1)))).subscribe()})}getTmpFile(){return new Promise(t=>{this.http.post("../rest/collaboraOnline/file",{token:this.token}).pipe(Object(mt.a)(e=>{this.file={name:this.key,format:e.format,type:null,contentMode:"base64",content:e.content,src:null},this.eventAction.next(this.file),t(!0)}),Object(m.a)(t=>(this.notify.handleErrors(t),this.triggerCloseEditor.emit(),Object(c.a)(!1)))).subscribe()})}deleteTmpFile(){return new Promise(t=>{this.http.delete("../rest/collaboraOnline/file?token="+this.token).pipe(Object(mt.a)(()=>{t(!0)}),Object(m.a)(t=>(this.notify.handleErrors(t),this.triggerCloseEditor.emit(),Object(c.a)(!1)))).subscribe()})}saveEncodedFile(){return new Promise(t=>{this.http.post("../rest/collaboraOnline/encodedFile",{content:this.params.content,format:this.file.format,key:this.key}).pipe(Object(mt.a)(()=>{t(!0)}),Object(m.a)(t=>(this.notify.handleErrors(t),this.triggerCloseEditor.emit(),Object(c.a)(!1)))).subscribe()})}generateUniqueId(t=5){let e="";const i="0123456789".length;for(let n=0;n<t;n++)e+="0123456789".charAt(Math.floor(Math.random()*i));return parseInt(e,10)}ngAfterViewInit(){}getConfiguration(){return new Promise(t=>{this.http.post("../rest/collaboraOnline/configuration",{resId:this.params.objectId,type:this.params.objectType,format:this.file.format,path:this.params.objectPath,data:this.params.dataToMerge,lang:this.translate.instant("lang.langISO")}).pipe(Object(mt.a)(e=>{this.editorUrl=e.url,this.editorUrl=this.sanitizer.bypassSecurityTrustResourceUrl(this.editorUrl),this.token=e.token,t(!0)}),Object(m.a)(t=>(this.notify.handleErrors(t),this.triggerCloseEditor.emit(),Object(c.a)(!1)))).subscribe()})}getFile(){return this.saveDocument(),this.eventAction.asObservable()}ngOnDestroy(){this.eventAction.complete()}openFullscreen(){const t=$("iframe[name='frameEditor']");t.css("top","0px"),t.css("left","0px"),this.fullscreenMode?(null===this.headerService.sideNavLeft||this.headerService.hideSideBar||this.headerService.sideNavLeft.open(),t.css("position","initial"),t.css("z-index","1")):(null!==this.headerService.sideNavLeft&&this.headerService.sideNavLeft.close(),t.css("position","fixed"),t.css("z-index","2")),this.fullscreenMode=!this.fullscreenMode}isAllowedEditExtension(t){return this.allowedExtension.filter(e=>e.toLowerCase()===t.toLowerCase()).length>0}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.b),n.Qb(D.a),n.Qb(ca.b),n.Qb(y.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-collabora-online-viewer"]],viewQuery:function(t,e){var i;1&t&&n.Xc(_r,!0),2&t&&n.yc(i=n.ec())&&(e.collaboraFrame=i.first)},hostBindings:function(t,e){1&t&&n.dc("message",(function(t){return e.onMessage(t)}),!1,n.Cc)},inputs:{editMode:"editMode",file:"file",params:"params"},outputs:{triggerAfterUpdatedDoc:"triggerAfterUpdatedDoc",triggerCloseEditor:"triggerCloseEditor",triggerModifiedDocument:"triggerModifiedDocument"},decls:13,vars:31,consts:[["style","display:block;padding: 10px;",4,"ngIf"],["mat-mini-fab","","color","warn",1,"collaboraOnlineButton_fullscreen",3,"title","click"],[1,"fa","fa-times",2,"height","auto"],["mat-mini-fab","","color","default",1,"collaboraOnlineButton_close",3,"title","click"],[1,"fas",2,"height","auto"],["mat-mini-fab","","color","default",1,"collaboraOnlineButton_hide",3,"title","click"],[1,"fa","fa-arrow-right",2,"height","auto"],["id","collabora","width","100%","height","100%","name","frameEditor",3,"src",4,"ngIf"],[2,"display","block","padding","10px"],["id","collabora","width","100%","height","100%","name","frameEditor",3,"src"],["collaboraFrame",""]],template:function(t,e){1&t&&(n.Oc(0,yr,3,3,"div",0),n.Wb(1,"button",1),n.dc("click",(function(){return e.quit()})),n.ic(2,"translate"),n.Rb(3,"mat-icon",2),n.Vb(),n.Wb(4,"button",3),n.dc("click",(function(){return e.openFullscreen()})),n.ic(5,"translate"),n.ic(6,"translate"),n.Rb(7,"mat-icon",4),n.Vb(),n.Wb(8,"button",5),n.dc("click",(function(){return e.hideButtons=!e.hideButtons})),n.ic(9,"translate"),n.ic(10,"translate"),n.Rb(11,"mat-icon",6),n.Vb(),n.Oc(12,xr,2,1,"iframe",7)),2&t&&(n.oc("ngIf",e.loading),n.Db(1),n.Ib("buttonsHide",e.hideButtons)("fullScreen",e.fullscreenMode),n.oc("title",n.jc(2,21,"lang.closeEditor")),n.Db(3),n.Ib("buttonsHide",e.hideButtons)("fullScreen",e.fullscreenMode),n.oc("title",e.fullscreenMode?n.jc(5,23,"lang.closeFullscreen"):n.jc(6,25,"lang.openFullscreen")),n.Db(3),n.Ib("fa-expand",!e.fullscreenMode)("fa-compress",e.fullscreenMode),n.Db(1),n.Ib("buttonsHide",e.hideButtons)("fullScreen",e.fullscreenMode),n.oc("title",e.hideButtons?n.jc(10,29,"lang.showTool"):n.jc(9,27,"lang.hideTool")),n.Db(4),n.oc("ngIf",""!==e.editorUrl))},directives:[P.t,k.b,S.a],pipes:[g.d],styles:[".collaboraOnlineButton_close[_ngcontent-%COMP%], .collaboraOnlineButton_fullscreen[_ngcontent-%COMP%], .collaboraOnlineButton_hide[_ngcontent-%COMP%], .collaboraOnlineButton_show[_ngcontent-%COMP%]{position:absolute;top:12px;z-index:3;transition:all .5s}.collaboraOnlineButton_fullscreen[_ngcontent-%COMP%]{right:6px}.collaboraOnlineButton_close[_ngcontent-%COMP%]{right:56px}.collaboraOnlineButton_hide[_ngcontent-%COMP%]{right:106px}.collaboraOnlineButton_show[_ngcontent-%COMP%]{right:-15px}.fullScreen[_ngcontent-%COMP%]{position:fixed}.fullScreenEditor[_ngcontent-%COMP%]{top:0;left:0}.buttonsHide[_ngcontent-%COMP%]{top:-15px;right:-15px;transform:rotate(125deg);transition:all .5s}"]}),t})();const Or=["templateList"],Dr=["onlyofficeViewer"],wr=["collaboraOnlineViewer"];function Mr(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"div",3),n.Rb(2,"i",4),n.Wb(3,"div"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Wb(6,"div"),n.Wb(7,"button",5),n.dc("click",(function(){return n.Dc(t),n.hc().cancelTemplateEdition()})),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Tb()}2&t&&(n.Db(4),n.Sc(" ",n.jc(5,2,"lang.editInProgress")," "),n.Db(4),n.Rc(n.jc(9,4,"lang.cancel")))}function kr(t,e){1&t&&(n.Ub(0),n.Wb(1,"div",8),n.Rb(2,"i",9),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Tb()),2&t&&(n.Db(3),n.Sc(" ",n.jc(4,1,"lang.noFile")," "))}function Sr(t,e){if(1&t&&(n.Wb(0,"div",18),n.Rb(1,"mat-progress-spinner",19),n.Wb(2,"div",20),n.Qc(3),n.Vb(),n.Wb(4,"div",21),n.Qc(5),n.Vb(),n.Vb()),2&t){const t=n.hc(3);n.Db(1),n.oc("mode",t.loadingInfo.mode)("value",t.loadingInfo.percent),n.Db(2),n.Sc("",t.loadingInfo.percent," %"),n.Db(2),n.Rc(t.loadingInfo.message)}}function Ir(t,e){if(1&t){const t=n.Xb();n.Wb(0,"plugin-select-search",28,29),n.dc("afterSelected",(function(e){return n.Dc(t),n.hc(4).editTemplate(e)})),n.ic(2,"translate"),n.ic(3,"translate"),n.Vb()}if(2&t){const t=n.hc(4);n.Fb("input-form-filled"),n.oc("label",n.jc(2,6,"lang.chooseModel"))("placeholderLabel",n.jc(3,8,"lang.chooseModel"))("datas",t.listTemplates)("formControlSelect",t.templateListForm)}}function Pr(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",22),n.dc("onFileDropped",(function(e){return n.Dc(t),n.hc(3).dndUploadFile(e)})),n.Rb(1,"i",23),n.Rb(2,"br"),n.Qc(3),n.ic(4,"translate"),n.Rb(5,"br"),n.Qc(6),n.ic(7,"translate"),n.Wb(8,"div",24),n.Wb(9,"div",25),n.Oc(10,Ir,4,10,"plugin-select-search",26),n.Vb(),n.Wb(11,"button",27),n.dc("click",(function(){return n.Dc(t),n.hc(),n.zc(3).click()})),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(3);n.oc("disabled",!t.editMode),n.Db(3),n.Sc(" ",n.jc(4,5,"lang.dragAndDrop"),""),n.Db(3),n.Sc("",n.jc(7,7,"lang.or")," "),n.Db(4),n.oc("ngIf",t.listTemplates.length>0),n.Db(2),n.Rc(n.jc(13,9,"lang.chooseFile"))}}function Vr(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",38),n.dc("click",(function(){return n.Dc(t),n.hc(4).editResource()})),n.ic(1,"translate"),n.ic(2,"translate"),n.Rb(3,"mat-icon",39),n.Vb()}if(2&t){const t=n.hc(4);n.Ib("disabledButton",!t.functions.empty(t.file.subinfos)&&t.file.subinfos.signedDocVersions),n.oc("disabled",!t.functions.empty(t.file.subinfos)&&t.file.subinfos.signedDocVersions)("matTooltip",t.functions.empty(t.file.subinfos)||!t.functions.empty(t.file.subinfos)&&!t.file.subinfos.signedDocVersions?n.jc(1,4,"lang.editDocument"):n.jc(2,6,"lang.documentSignedMsg"))}}function Rr(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",40),n.dc("click",(function(){return n.Dc(t),n.hc(4).openPdfInTab()})),n.Rb(1,"mat-icon",41),n.Wb(2,"span"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(3),n.Rc(n.jc(4,1,"lang.openInExternalModal")))}function jr(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",40),n.dc("click",(function(){return n.Dc(t),n.hc(4).openMaarchParapheurWorkflow()})),n.Rb(1,"mat-icon",42),n.Wb(2,"span"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(3),n.Rc(n.jc(4,1,"lang.externalVisaWorkflow")))}function Ar(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",40),n.dc("click",(function(){return n.Dc(t),n.hc(2),n.zc(3).click()})),n.Rb(1,"mat-icon",43),n.Wb(2,"span"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(3),n.Rc(n.jc(4,1,"lang.uploadAnOtherFile")))}function Wr(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",40),n.dc("click",(function(){return n.Dc(t),n.hc(4).cleanFile()})),n.Rb(1,"mat-icon",44),n.Wb(2,"span"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(3),n.Rc(n.jc(4,1,"lang.removeFile")))}function Tr(t,e){if(1&t&&(n.Wb(0,"button",49),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){n.hc();const t=n.zc(3),e=n.hc(4);n.oc("matBadge",e.file.subinfos.mainDocVersions.length)("matMenuTriggerFor",t),n.Db(1),n.Sc(" ",n.jc(2,3,"lang.versions")," ")}}function Er(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",40),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(5).openResourceVersion(i,"PDF")})),n.Wb(1,"span"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(2),n.Tc("",n.jc(3,2,"lang.version")," ",t,"")}}function Fr(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",5),n.dc("click",(function(){n.Dc(t);const e=n.hc(5);return e.openResourceVersion(e.file.subinfos.mainDocVersions[e.file.subinfos.mainDocVersions.length-1],"SIGN")})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.SIGN_version")," "))}function Lr(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",5),n.dc("click",(function(){n.Dc(t);const e=n.hc(5);return e.openResourceVersion(e.file.subinfos.mainDocVersions[e.file.subinfos.mainDocVersions.length-1],"NOTE")})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.NOTE_version")," "))}function Qr(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Tr,3,5,"button",45),n.Wb(2,"mat-menu",null,46),n.Oc(4,Er,4,4,"button",47),n.Vb(),n.Oc(5,Fr,3,3,"button",48),n.Oc(6,Lr,3,3,"button",48),n.Tb()),2&t){const t=n.hc(4);n.Db(1),n.oc("ngIf",t.file.subinfos.mainDocVersions.length>1&&!t.file.subinfos.signedDocVersions),n.Db(3),n.oc("ngForOf",t.file.subinfos.mainDocVersions),n.Db(1),n.oc("ngIf",t.file.subinfos.signedDocVersions),n.Db(1),n.oc("ngIf",t.file.subinfos.commentedDocVersions>0)}}function Nr(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",30),n.Wb(1,"button",31),n.dc("click",(function(){return n.Dc(t),n.hc(3).downloadOriginalFile()})),n.ic(2,"translate"),n.Rb(3,"mat-icon",32),n.Vb(),n.Oc(4,Vr,4,8,"button",33),n.Wb(5,"button",34),n.Rb(6,"mat-icon",35),n.Vb(),n.Wb(7,"mat-menu",null,36),n.Oc(9,Rr,5,3,"button",37),n.Oc(10,jr,5,3,"button",37),n.Oc(11,Ar,5,3,"button",37),n.Oc(12,Wr,5,3,"button",37),n.Vb(),n.Oc(13,Qr,7,4,"ng-container",0),n.Vb()}if(2&t){const t=n.zc(8),e=n.hc(3);n.Db(1),n.oc("matTooltip",n.jc(2,10,"lang.downloadOriginalFile")),n.Db(3),n.oc("ngIf",e.editMode&&null!==e.resId&&!e.noConvertedFound),n.Db(1),n.oc("matMenuTriggerFor",t),n.Db(2),n.Fb("optionsListMenu"),n.Db(2),n.oc("ngIf",void 0!==e.file.contentView||null!==e.base64),n.Db(1),n.oc("ngIf",(void 0!==e.file.contentView||null!==e.base64)&&null!=e.resId&&"attachment"!==e.mode&&e.externalId.signatureBookId),n.Db(1),n.oc("ngIf",e.editMode&&null===e.resId),n.Db(1),n.oc("ngIf",e.editMode&&null===e.resId),n.Db(1),n.oc("ngIf","mainDocument"===e.mode&&!e.functions.empty(e.file.subinfos))}}function zr(t,e){if(1&t){const t=n.Xb();n.Wb(0,"pdf-viewer",50),n.dc("error",(function(e){return n.Dc(t),n.hc(3).onError(e)})),n.Vb()}if(2&t){const t=n.hc(3);n.oc("src",t.file.src)("render-text",!0)("autoresize",!0)("original-size",!1)("show-all",!0)}}function Br(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",51),n.dc("onFileDropped",(function(e){return n.Dc(t),n.hc(3).dndUploadFile(e)})),n.Wb(1,"div",52),n.Rb(2,"i",53),n.Qc(3,"\xa0"),n.Wb(4,"a",54),n.dc("click",(function(){return n.Dc(t),n.hc(3).downloadOriginalFile()})),n.Qc(5),n.Vb(),n.Qc(6,"\xa0"),n.Wb(7,"b"),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Vb(),n.Wb(10,"div",55),n.Rb(11,"i",56),n.Rb(12,"br"),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Vb()}if(2&t){const t=n.hc(3);n.oc("disabled",!t.editMode),n.Db(5),n.Rc(t.file.name),n.Db(3),n.Rc(n.jc(9,4,"lang.loaded")),n.Db(5),n.Rc(n.jc(14,6,"lang.noAvailablePreview"))}}function Ur(t,e){if(1&t){const t=n.Xb();n.Oc(0,Sr,6,4,"div",10),n.Oc(1,Pr,14,11,"div",11),n.Wb(2,"input",12,13),n.dc("change",(function(e){return n.Dc(t),n.hc(2).uploadTrigger(e)})),n.Vb(),n.Wb(4,"div",14),n.dc("onFileDropped",(function(e){return n.Dc(t),n.hc(2).dndUploadFile(e)})),n.Oc(5,Nr,14,12,"div",15),n.Wb(6,"div"),n.Oc(7,zr,1,5,"pdf-viewer",16),n.Vb(),n.Vb(),n.Oc(8,Br,15,8,"div",17)}if(2&t){const t=n.hc(2);n.oc("ngIf",t.loading),n.Db(1),n.oc("ngIf",null===t.file.content&&!t.loading),n.Db(1),n.oc("ngModel",t.docToUploadValue),n.Db(2),n.oc("disabled",!t.editMode),n.Db(1),n.oc("ngIf",!t.loading&&null!==t.file.content&&!t.hideTools),n.Db(2),n.oc("ngIf",null!==t.file.src),n.Db(1),n.oc("ngIf",null!==t.file.content&&t.noConvertedFound)}}function $r(t,e){if(1&t&&(n.Ub(0),n.Oc(1,kr,5,3,"ng-container",6),n.Oc(2,Ur,9,7,"ng-template",null,7,n.Pc),n.Tb()),2&t){const t=n.zc(3),e=n.hc();n.Db(1),n.oc("ngIf",e.noFile)("ngIfElse",t)}}function Hr(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"onlyoffice-viewer",57,58),n.dc("triggerAfterUpdatedDoc",(function(){return n.Dc(t),n.hc().triggerEvent.emit()}))("triggerCloseEditor",(function(){return n.Dc(t),n.hc().closeEditor()}))("triggerModifiedDocument",(function(){return n.Dc(t),n.hc().isDocModified=!0})),n.Vb(),n.Tb()}if(2&t){const t=n.hc();n.Db(1),n.oc("params",t.editor.options)("file",t.file)("editMode",!0)}}function Gr(t,e){1&t&&(n.Wb(0,"div",18),n.Rb(1,"mat-spinner",60),n.Vb())}function Xr(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"app-collabora-online-viewer",57,59),n.dc("triggerAfterUpdatedDoc",(function(){return n.Dc(t),n.hc().triggerEvent.emit()}))("triggerCloseEditor",(function(){return n.Dc(t),n.hc().closeEditor()}))("triggerModifiedDocument",(function(){return n.Dc(t),n.hc().isDocModified=!0})),n.Vb(),n.Oc(3,Gr,2,0,"div",10),n.Tb()}if(2&t){const t=n.zc(2),e=n.hc();n.Db(1),n.oc("params",e.editor.options)("file",e.file)("editMode",!0),n.Db(2),n.oc("ngIf",t.isSaving)}}function qr(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",61),n.dc("click",(function(){return n.Dc(t),n.hc().saveMainDocument()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",62),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.saveModifications"))}function Kr(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",61),n.dc("click",(function(){return n.Dc(t),n.hc().saveTmpDocument()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",62),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.saveModifications"))}function Yr(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",63),n.dc("click",(function(){return n.Dc(t),n.hc().unsignMainDocument()})),n.ic(1,"translate"),n.Qc(2),n.ic(3,"translate"),n.Vb()}2&t&&(n.oc("title",n.jc(1,2,"lang.unsign")),n.Db(2),n.Sc(" ",n.jc(3,4,"lang.removeSignature"),"\n"))}let Jr=(()=>{class t{constructor(t,e,i,a,s,o,r,c,l,d,h){this.translate=t,this.http=e,this.notify=i,this.headerService=a,this.appService=s,this.dialog=o,this.sortPipe=r,this.functions=c,this.privilegeService=l,this.authService=d,this.localStorage=h,this.base64=null,this.format=null,this.mode="mainDocument",this.resId=null,this.resIdMaster=null,this.editMode=!1,this.hideTools=!1,this.title="",this.attachType=null,this.triggerEvent=new n.o,this.loading=!0,this.noConvertedFound=!1,this.noFile=!1,this.file={name:"",type:"",contentMode:"base64",content:null,src:null},this.allowedExtensions=[],this.maxFileSize=0,this.maxFileSizeLabel="",this.percentInProgress=0,this.editInProgress=!1,this.listTemplates=[],this.externalId={},this.templateListForm=new X.i,this.loadingInfo={mode:"indeterminate",percent:0,message:""},this.editor={mode:"",async:!0,options:{docUrl:null,dataToMerge:null}},this.isDocModified=!1,window.pdfWorkerSrc="pdfjs/pdf.worker.min.js"}ngOnInit(){this.setEditor(),this.http.get("../rest/indexing/fileInformations").pipe(Object(mt.a)(t=>{this.allowedExtensions=t.informations.allowedFiles.map(t=>({extension:"."+t.extension.toLowerCase(),mimeType:t.mimeType,canConvert:t.canConvert})),this.allowedExtensions=this.sortPipe.transform(this.allowedExtensions,"extension"),this.maxFileSize=t.informations.maximumSize,this.maxFileSizeLabel=t.informations.maximumSizeLabel,null!==this.resId?(this.loadRessource(this.resId,this.mode),this.editMode&&(null!==this.attachType&&"attachment"===this.mode?this.loadTemplatesByResId(this.resIdMaster,this.attachType):this.loadTemplates())):(this.loadTemplates(),this.loading=!1)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe(),this.functions.empty(this.base64)?""!==this.tmpFilename&&void 0!==this.tmpFilename&&this.http.get("../rest/convertedFile/"+this.tmpFilename).pipe(Object(mt.a)(t=>{this.file={name:this.tmpFilename,format:"pdf",type:"application/pdf",contentMode:"base64",content:this.getBase64Document(this.base64ToArrayBuffer(t.encodedResource)),src:this.base64ToArrayBuffer(t.encodedResource)},this.noConvertedFound=!1,this.loading=!1}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe():this.loadFileFromBase64()}ngOnDestroy(){this.intervalLockFile&&this.cancelTemplateEdition()}loadFileFromBase64(){this.loading=!0,this.file={name:"maarch",format:"pdf",type:"application/pdf",contentMode:"base64",content:this.base64,src:this.base64ToArrayBuffer(this.base64)},this.loading=!1}loadTmpFile(t){return new Promise((e,i)=>{this.loading=!0,this.loadingInfo.mode="determinate",this.requestWithLoader(`../rest/convertedFile/${t}?convert=true`).subscribe(i=>{i.encodedResource&&(this.file={name:t,format:i.extension,type:i.type,contentMode:"base64",content:i.encodedResource,src:void 0!==i.encodedConvertedResource?this.base64ToArrayBuffer(i.encodedConvertedResource):null},this.editMode=!0,this.triggerEvent.emit(),void 0!==i.encodedConvertedResource?this.noConvertedFound=!1:(this.noConvertedFound=!0,this.notify.error(i.convertedResourceErrors)),this.loading=!1,e(!0))},t=>(this.noConvertedFound=!0,this.notify.handleErrors(t),this.loading=!1,e(!0),Object(c.a)(!1)))})}uploadTrigger(t){if(t.target.files&&t.target.files[0]&&this.isExtensionAllowed(t.target.files[0])){this.initUpload();const e=new FileReader;this.file.name=t.target.files[0].name,this.file.type=t.target.files[0].type,this.file.format=this.file.name.split(".").pop(),e.readAsArrayBuffer(t.target.files[0]),e.onload=t=>{this.file.content=this.getBase64Document(t.target.result),this.triggerEvent.emit(),"application/pdf"!==this.file.type?this.convertDocument(this.file):(this.file.src=t.target.result,this.loading=!1)}}else this.loading=!1}initUpload(){this.loading=!0,this.file={name:"",type:"",contentMode:"base64",content:null,src:null},this.noConvertedFound=!1,this.loadingInfo.message=this.translate.instant("lang.loadingFile")+"...",this.loadingInfo.mode="indeterminate"}getBase64Document(t){const e=new Uint8Array(t).reduce((t,e)=>t+String.fromCharCode(e),"");return btoa(e)}base64ToArrayBuffer(t){const e=window.atob(t),i=e.length,n=new Uint8Array(i);for(let a=0;a<i;a++)n[a]=e.charCodeAt(a);return n.buffer}b64toBlob(t,e="",i=512){const n=atob(t),a=[];for(let s=0;s<n.length;s+=i){const t=n.slice(s,s+i),e=new Array(t.length);for(let i=0;i<t.length;i++)e[i]=t.charCodeAt(i);const o=new Uint8Array(e);a.push(o)}return new Blob(a,{type:e})}convertDocument(t){this.canBeConverted(t)?this.upload({name:t.name,base64:t.content}).subscribe(t=>{t.encodedResource&&(this.file.base64src=t.encodedResource,this.file.src=this.base64ToArrayBuffer(t.encodedResource),this.loading=!1)},t=>(this.noConvertedFound=!0,this.notify.handleErrors(t),this.loading=!1,Object(c.a)(!1))):(this.noConvertedFound=!0,this.loading=!1)}upload(t){return this.http.post("../rest/convertedFile",t,{reportProgress:!0,observe:"events"}).pipe(Object(l.a)(t=>{switch(t.type){case v.e.DownloadProgress:const e=Math.round(100*t.loaded/t.total);return this.loadingInfo.percent=e,this.loadingInfo.mode="determinate",this.loadingInfo.message=`3/3 ${this.translate.instant("lang.downloadConvertedFile")}...`,{status:"progress",message:e};case v.e.UploadProgress:const i=Math.round(100*t.loaded/t.total);return this.loadingInfo.percent=i,100===i?(this.loadingInfo.mode="indeterminate",this.loadingInfo.message=`2/3 ${this.translate.instant("lang.convertingFile")}...`):(this.loadingInfo.mode="determinate",this.loadingInfo.message=`1/3 ${this.translate.instant("lang.loadingFile")}...`),{status:"progress",message:i};case v.e.Response:return t.body;default:return"Unhandled event: "+t.type}}))}requestWithLoader(t){return this.loadingInfo.percent=0,this.http.get(t,{reportProgress:!0,observe:"events"}).pipe(Object(l.a)(t=>{switch(t.type){case v.e.DownloadProgress:const e=Math.round(100*t.loaded/t.total);return this.loadingInfo.percent=e,this.loadingInfo.mode="determinate",this.loadingInfo.message="",{status:"progressDownload",message:e};case v.e.Response:return t.body;default:return"Unhandled event: "+t.type}}))}onError(t){console.log(t)}cleanFile(){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.confirmAction")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.templateListForm.reset(),this.file={name:"",type:"",content:null,src:null},this.docToUploadValue="",this.triggerEvent.emit("cleanFile")}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}saveDocService(){return Object(r.a)(this,void 0,void 0,(function*(){const t=yield this.getFilePdf();this.headerService.setLoadedFile(t)}))}getFile(){if("onlyoffice"===this.editor.mode&&void 0!==this.onlyofficeViewer)return this.onlyofficeViewer.getFile();if("collaboraOnline"===this.editor.mode&&void 0!==this.collaboraOnlineViewer)return this.collaboraOnlineViewer.getFile();{const t=JSON.parse(JSON.stringify(this.file));return t.content="route"===t.contentMode?null:t.content,Object(c.a)(t)}}getFilePdf(){return new Promise((t,e)=>{this.functions.empty(this.file.src)?this.getFile().pipe(Object(ro.a)(1),Object(mt.a)(t=>("collaboraOnline"===this.editor.mode&&void 0!==this.collaboraOnlineViewer&&(this.collaboraOnlineViewer.isSaving=!1),t)),p(t=>this.http.post("../rest/convertedFile",{name:`${t.name}.${t.format}`,base64:""+t.content})),Object(mt.a)(e=>{t(e.encodedResource)})).subscribe():t(this.getBase64Document(this.file.src))})}dndUploadFile(t){this.uploadTrigger({target:{files:[t[0]]}})}canBeConverted(t){const e="."+t.name.toLowerCase().split(".").pop();return this.allowedExtensions.filter(i=>!0===i.canConvert&&i.mimeType===t.type&&i.extension===e).length>0}isExtensionAllowed(t){const e="."+t.name.toLowerCase().split(".").pop();return 0===this.allowedExtensions.filter(i=>i.mimeType===t.type&&i.extension===e).length?(this.dialog.open(qt.a,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.notAllowedExtension")+" !",msg:this.translate.instant("lang.file")+" : <b>"+t.name+"</b>, "+this.translate.instant("lang.type")+" : <b>"+t.type+"</b><br/><br/><u>"+this.translate.instant("lang.allowedExtensions")+"</u> : <br/>"+this.allowedExtensions.map(t=>t.extension).filter((t,e,i)=>e===i.indexOf(t)).join(", ")}}),!1):!(t.size>this.maxFileSize&&this.maxFileSize>0&&(this.dialog.open(qt.a,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.maxFileSizeReached")+" ! ",msg:this.translate.instant("lang.maxFileSize")+" : "+this.maxFileSizeLabel}}),1))}downloadOriginalFile(){const t=document.createElement("a");"base64"===this.file.contentMode?(t.href=`data:${this.file.type};base64,${this.file.content}`,t.setAttribute("download",this.file.name),document.body.appendChild(t),t.click()):this.http.get(this.file.content).pipe(Object(mt.a)(e=>{t.href=`data:${e.mimeType};base64,${e.encodedDocument}`,t.setAttribute("download",this.file.name),document.body.appendChild(t),t.click()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}openPdfInTab(){let t="";if("base64"===this.file.contentMode){t=`data:${this.file.type};base64,${this.file.content}`;const e=window.open();e.document.write(`<iframe style="width: 100%;height: 100%;margin: 0;padding: 0;" src="${t}" frameborder="0" allowfullscreen></iframe>`),e.document.title=this.title}else this.http.get(this.file.contentView).pipe(Object(mt.a)(e=>{t=`data:${e.mimeType};base64,${e.encodedDocument}`;const i=window.open();i.document.write(`<iframe style="width: 100%;height: 100%;margin: 0;padding: 0;" src="${t}" frameborder="0" allowfullscreen></iframe>`),i.document.title=this.title}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}loadRessource(t,e="mainDocument"){return Object(r.a)(this,void 0,void 0,(function*(){this.resId=t,this.mode=e,this.loading=!0,"attachment"===e?this.requestWithLoader(`../rest/attachments/${t}/content?mode=base64`).subscribe(e=>{e.encodedDocument&&(this.file.contentMode="route",this.file.name=`${t}.${e.originalFormat}`,this.file.format=e.originalFormat,this.file.creatorId=e.originalCreatorId,this.file.signatoryId=e.signatoryId,this.file.content=`../rest/attachments/${t}/originalContent?mode=base64`,this.file.contentView=`../rest/attachments/${t}/content?mode=base64`,this.file.src=this.base64ToArrayBuffer(e.encodedDocument),this.loading=!1,this.noFile=!1)},e=>("Document has no file"===e.error.errors?this.noFile=!0:"Converted Document not found"===e.error.errors||"Document can not be converted"===e.error.errors?(this.file.contentMode="route",this.file.content=`../rest/attachments/${t}/originalContent?mode=base64`,this.noConvertedFound=!0):(this.notify.error(e.error.errors),this.noFile=!0),this.loading=!1,Object(c.a)(!1))):(yield this.loadMainDocumentSubInformations(),0===this.file.subinfos.mainDocVersions.length?(this.noFile=!0,this.loading=!1):this.file.subinfos.canConvert?(this.requestWithLoader(`../rest/resources/${t}/content?mode=base64`).subscribe(e=>{e.encodedDocument&&(this.file.contentMode="route",this.file.name=`${t}.${e.originalFormat}`,this.file.format=e.originalFormat,this.file.signatoryId=e.signatoryId,this.file.content=`../rest/resources/${t}/originalContent?mode=base64`,this.file.contentView=`../rest/resources/${t}/content?mode=base64`,this.file.src=this.base64ToArrayBuffer(e.encodedDocument),this.loading=!1,this.noFile=!1)},t=>(this.notify.error(t.error.errors),this.noFile=!0,this.loading=!1,Object(c.a)(!1))),this.http.get(`../rest/resources/${this.resId}/fields/externalId`).pipe(Object(mt.a)(t=>{this.externalId=t.field}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()):(this.file.contentMode="route",this.file.content=`../rest/resources/${t}/originalContent?mode=base64`,this.noConvertedFound=!0,this.loading=!1))}))}loadMainDocumentSubInformations(){return new Promise((t,e)=>{this.http.get(`../rest/resources/${this.resId}/versionsInformations`).pipe(Object(mt.a)(t=>{const e=t.DOC;let i=!1,n=!1,a=!1;void 0!==t.DOC[t.DOC.length-1]&&(n=t.SIGN.indexOf(t.DOC[t.DOC.length-1])>-1,a=t.NOTE.indexOf(t.DOC[t.DOC.length-1])>-1,i=t.PDF.indexOf(t.DOC[t.DOC.length-1])>-1),this.file.subinfos={mainDocVersions:e,signedDocVersions:n,commentedDocVersions:a,mainDocPDFVersions:i}}),p(()=>this.http.get(`../rest/resources/${this.resId}/fileInformation`)),Object(mt.a)(e=>{this.file.subinfos.canConvert=e.information.canConvert,t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}editTemplate(t){null!==this.localStorage.get("modal_confirmEditTemplate_"+this.headerService.user.id)?this.launchEditTemplate(t):this.confirmEditTemplate(t)}confirmEditTemplate(t){let e="";e="attachment"===this.mode?this.translate.instant("lang.editionAttachmentConfirmFirst")+"<br><br>"+this.translate.instant("lang.editionAttachmentConfirmThird"):this.translate.instant("lang.editionAttachmentConfirmFirst")+"<br><br>"+this.translate.instant("lang.editionAttachmentConfirmSecond"),this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{idModal:"confirmEditTemplate",title:this.translate.instant("lang.templateEdition"),msg:e}}),this.dialogRef.afterClosed().pipe(Object(mt.a)(t=>{"ok"!==t&&this.templateListForm.reset()}),Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.launchEditTemplate(t)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}launchEditTemplate(t){this.triggerEvent.emit();const e=this.listTemplates.filter(e=>e.id===t)[0];this.file.format=e.extension,"onlyoffice"===this.editor.mode?(this.editor.async=!1,this.editor.options={objectType:"attachmentCreation",objectId:e.id,docUrl:"rest/onlyOffice/mergedFile",dataToMerge:this.resourceDatas},this.editInProgress=!0):"collaboraOnline"===this.editor.mode?(this.editor.async=!1,this.editInProgress=!0,this.editor.options={objectType:"attachment"===this.mode?"attachmentCreation":"resourceCreation",objectId:e.id,dataToMerge:this.resourceDatas}):(this.editor.async=!0,this.editor.options={objectType:"attachmentCreation",objectId:e.id,cookie:document.cookie,authToken:this.authService.getToken(),data:this.resourceDatas},this.editInProgress=!0,this.http.post("../rest/jnlp",this.editor.options).pipe(Object(mt.a)(t=>{window.location.href="../rest/jnlp/"+t.generatedJnlp,this.checkLockFile(t.jnlpUniqueId,e.extension)})).subscribe())}editResource(){"java"===this.editor.mode&&"pdf"===this.file.format.toLowerCase()?this.notify.error(this.translate.instant("lang.javaEditDenied")+" <b>PDF</b> "+this.translate.instant("lang.javaEditDenied2")):"attachment"===this.mode?this.editAttachment():this.editMainDocument()}editAttachment(){this.triggerEvent.emit("setData"),"onlyoffice"===this.editor.mode?(this.editor.async=!1,this.editor.options={objectType:"attachmentModification",objectId:this.resId,docUrl:"rest/onlyOffice/mergedFile",dataToMerge:this.resourceDatas},this.editInProgress=!0):"collaboraOnline"===this.editor.mode?(this.editor.async=!1,this.editInProgress=!0,this.editor.options={objectType:"attachmentModification",objectId:this.resId,dataToMerge:this.resourceDatas}):(this.editor.async=!0,this.editor.options={objectType:"attachmentModification",objectId:this.resId,cookie:document.cookie,authToken:this.authService.getToken(),data:this.resourceDatas},this.editInProgress=!0,this.http.post("../rest/jnlp",this.editor.options).pipe(Object(mt.a)(t=>{window.location.href="../rest/jnlp/"+t.generatedJnlp,this.checkLockFile(t.jnlpUniqueId,this.file.format)})).subscribe())}editMainDocument(){"onlyoffice"===this.editor.mode?(this.editor.async=!1,this.editor.options={objectType:"resourceModification",objectId:this.resId,docUrl:"rest/onlyOffice/mergedFile"},this.editInProgress=!0):"collaboraOnline"===this.editor.mode?(this.editor.async=!1,this.editor.options={objectType:"resourceModification",objectId:this.resId,dataToMerge:this.resourceDatas},this.editInProgress=!0):(this.editor.async=!0,this.editor.options={objectType:"resourceModification",objectId:this.resId,cookie:document.cookie},this.editInProgress=!0,this.http.post("../rest/jnlp",this.editor.options).pipe(Object(mt.a)(t=>{window.location.href="../rest/jnlp/"+t.generatedJnlp,this.checkLockFile(t.jnlpUniqueId,this.file.format)})).subscribe())}setDatas(t){this.resourceDatas=t}checkLockFile(t,e){this.intervalLockFile=setInterval(()=>{this.http.get("../rest/jnlp/lock/"+t).subscribe(t=>Object(r.a)(this,void 0,void 0,(function*(){t.lockFileFound||(this.editInProgress=!1,clearInterval(this.intervalLockFile),yield this.loadTmpFile(`${t.fileTrunk}.${e}`),"mainDocument"===this.mode&&null!==this.resId&&this.saveMainDocument())})))},1e3)}cancelTemplateEdition(){clearInterval(this.intervalLockFile),this.editInProgress=!1}isEditingTemplate(){return"onlyoffice"===this.editor.mode?void 0!==this.onlyofficeViewer:"collaboraOnline"===this.editor.mode?void 0!==this.collaboraOnlineViewer:this.editInProgress}loadTemplatesByResId(t,e){const i=[];let n=[];this.listTemplates=[],this.http.get("../rest/attachmentsTypes").pipe(Object(mt.a)(t=>{Object.keys(t.attachmentsTypes).forEach(e=>{n.push({id:e,label:t.attachmentsTypes[e].label})}),n=this.sortPipe.transform(n,"label"),n.push({id:"all",label:this.translate.instant("lang.others")})}),p(()=>this.http.get(`../rest/resources/${t}/templates?attachmentType=${e},all`)),Object(mt.a)(t=>{this.listTemplates=t.templates,n=n.filter(e=>t.templates.map(t=>t.attachmentType).indexOf(e.id)>-1),n.forEach(e=>{i.push({id:e.id,label:e.label,title:e.label,disabled:!0,isTitle:!0,color:"#135f7f"}),t.templates.filter(t=>t.attachmentType===e.id).forEach(t=>{i.push({id:t.id,label:" "+t.label,title:t.exists?t.label:this.translate.instant("lang.fileDoesNotExists"),extension:t.extension,disabled:!t.exists})})}),this.listTemplates=i})).subscribe()}loadTemplates(){if(0===this.listTemplates.length){const t=[];if("mainDocument"===this.mode)this.http.get("../rest/currentUser/templates?target=indexingFile").pipe(Object(mt.a)(e=>{this.listTemplates=e.templates,t.push({id:"all",label:this.translate.instant("lang.indexation"),title:this.translate.instant("lang.indexation"),disabled:!0,isTitle:!0,color:"#135f7f"}),e.templates.forEach(e=>{t.push({id:e.id,label:" "+e.label,title:e.exists?e.label:this.translate.instant("lang.fileDoesNotExists"),extension:e.extension,disabled:!e.exists})}),this.listTemplates=t})).subscribe();else{let e=[];this.http.get("../rest/attachmentsTypes").pipe(Object(mt.a)(t=>{e.push({id:"all",label:this.translate.instant("lang.others")}),Object.keys(t.attachmentsTypes).forEach(i=>{e.push({id:i,label:t.attachmentsTypes[i].label}),e=this.sortPipe.transform(e,"label")})}),p(()=>this.http.get("../rest/currentUser/templates?target=attachments&type=office")),Object(mt.a)(i=>{this.listTemplates=i.templates,e=e.filter(t=>i.templates.map(t=>t.attachmentType).indexOf(t.id)>-1),e.forEach(e=>{t.push({id:e.id,label:e.label,title:e.label,disabled:!0,isTitle:!0,color:"#135f7f"}),i.templates.filter(t=>t.attachmentType===e.id).forEach(e=>{t.push({id:e.id,label:" "+e.label,title:e.exists?e.label:this.translate.instant("lang.fileDoesNotExists"),extension:e.extension,disabled:!e.exists})})}),this.listTemplates=t})).subscribe()}}}closeEditor(){this.templateListForm.reset(),this.editInProgress=!1,this.isDocModified=!1}setEditor(){"java"===this.headerService.user.preferences.documentEdition?(this.editor.mode="java",this.editor.async=!0):"onlyoffice"===this.headerService.user.preferences.documentEdition?(this.editor.mode="onlyoffice",this.editor.async=!1):"collaboraonline"===this.headerService.user.preferences.documentEdition&&(this.editor.mode="collaboraOnline",this.editor.async=!1)}saveMainDocument(){return this.loading=!0,new Promise(t=>{this.getFile().pipe(Object(l.a)(t=>({encodedFile:t.content,format:t.format,resId:this.resId})),p(t=>this.http.put(`../rest/resources/${this.resId}?onlyDocument=true`,t)),Object(mt.a)(()=>{this.closeEditor(),this.loadRessource(this.resId),t(!0)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}loadTmpDocument(t,e){return new Promise((i,n)=>{this.http.post("../rest/convertedFile/encodedFile",{format:e,encodedFile:t}).pipe(Object(mt.a)(i=>{this.file={name:"maarch",format:e,type:"application/pdf",contentMode:"base64",content:t,src:this.base64ToArrayBuffer(i.encodedResource)}}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),i(!1),Object(c.a)(!1)))).subscribe()})}saveTmpDocument(){return new Promise((t,e)=>{this.getFile().pipe(Object(mt.a)(t=>{this.file={name:"maarch",format:t.format,type:"application/pdf",contentMode:"base64",content:t.content,src:null}}),p(t=>this.http.post("../rest/convertedFile/encodedFile",{format:t.format,encodedFile:t.content})),Object(mt.a)(e=>{this.file.src=this.base64ToArrayBuffer(e.encodedResource),this.closeEditor(),t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}openResourceVersion(t,e){const i="PDF"!==e?this.translate.instant("lang."+e+"_version"):`${this.translate.instant("lang.version")} ${t}`;this.http.get(`../rest/resources/${this.resId}/content/${t}?type=${e="SIGN"===e?"PDF":e}`).pipe(Object(mt.a)(t=>{this.dialog.open(co,{autoFocus:!1,panelClass:"maarch-full-height-modal",data:{title:""+i,base64:t.encodedDocument}})}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}unsignMainDocument(){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.UNSIGN"),msg:this.translate.instant("lang.confirmAction")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.put(`../rest/resources/${this.resId}/unsign`,{})),Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.documentUnsigned")),this.loadRessource(this.resId)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}isEditorLoaded(){return!this.isEditingTemplate()||this.isEditingTemplate()&&this.isDocModified}openMaarchParapheurWorkflow(){this.dialog.open(Jo,{panelClass:"maarch-modal",data:{id:this.resId,type:"resource"}})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(q.b),n.Qb(Wt.a),n.Qb(_t.a),n.Qb(Dt.a),n.Qb(_.a),n.Qb(Ut.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-document-viewer"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(Or,!0),n.Xc(Dr,!0),n.Xc(wr,!0)),2&t&&(n.yc(i=n.ec())&&(e.templateList=i.first),n.yc(i=n.ec())&&(e.onlyofficeViewer=i.first),n.yc(i=n.ec())&&(e.collaboraOnlineViewer=i.first))},inputs:{tmpFilename:"tmpFilename",base64:"base64",format:"format",mode:"mode",resId:"resId",resIdMaster:"resIdMaster",editMode:"editMode",hideTools:"hideTools",title:"title",attachType:"attachType"},outputs:{triggerEvent:"triggerEvent"},features:[n.Cb([Wt.a])],decls:7,vars:7,consts:[[4,"ngIf"],["mat-fab","","color","accent","style","position: absolute;z-index: 3;bottom: 40px;right: 60px;",3,"title","click",4,"ngIf"],["mat-raised-button","","color","warn","style","position: fixed;z-index: 1;bottom: 100px;right: 150px;",3,"title","click",4,"ngIf"],[1,"editInProgress"],[1,"fas","fa-file-word","bounce"],["mat-button","",3,"click"],[4,"ngIf","ngIfElse"],["elseHaveFile",""],[1,"noFile"],[1,"far","fa-times-circle"],["class","example-loading-shade",4,"ngIf"],["class","view-doc-container","appUploadFileDragDrop","",3,"disabled","onFileDropped",4,"ngIf"],["type","file","name","files[]",2,"display","none",3,"ngModel","change"],["docToUpload",""],["appUploadFileDragDrop","",2,"display","block","width","100%",3,"disabled","onFileDropped"],["class","viewer-tools",4,"ngIf"],["style","width:100%;",3,"src","render-text","autoresize","original-size","show-all","error",4,"ngIf"],["class","no-doc-container","appUploadFileDragDrop","",3,"disabled","onFileDropped",4,"ngIf"],[1,"example-loading-shade"],[3,"mode","value"],[1,"percent"],[2,"padding-top","10px"],["appUploadFileDragDrop","",1,"view-doc-container",3,"disabled","onFileDropped"],[1,"fa","fa-file-upload","upload-icon"],[2,"display","flex"],[2,"margin-right","20px","align-items","center","justify-content","center","text-align","center","display","flex"],["style","width: 240px;text-align: left;font-weight:normal;font-size: 13px;",3,"label","placeholderLabel","datas","class","formControlSelect","afterSelected",4,"ngIf"],["mat-button","",1,"button-form-primary-alt",2,"align-items","center","justify-content","center","text-align","center","display","flex",3,"click"],[2,"width","240px","text-align","left","font-weight","normal","font-size","13px",3,"label","placeholderLabel","datas","formControlSelect","afterSelected"],["templateList",""],[1,"viewer-tools"],["mat-icon-button","",3,"matTooltip","click"],[1,"fa","fa-download"],["mat-icon-button","",3,"disabled","disabledButton","matTooltip","click",4,"ngIf"],["mat-icon-button","",3,"matMenuTriggerFor"],[1,"fas","fa-chevron-down"],["menuOptions","matMenu"],["mat-menu-item","",3,"click",4,"ngIf"],["mat-icon-button","",3,"disabled","matTooltip","click"],[1,"fa","fa-edit"],["mat-menu-item","",3,"click"],["color","primary",1,"fas","fa-external-link-alt"],["color","primary",1,"fas","fa-list-ol"],["color","primary",1,"fa","fa-file-upload"],["color","warn",1,"fa","fa-trash"],["mat-button","",3,"matBadge","matMenuTriggerFor",4,"ngIf"],["menuVersionsDoc","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["mat-button","",3,"click",4,"ngIf"],["mat-button","",3,"matBadge","matMenuTriggerFor"],[2,"width","100%",3,"src","render-text","autoresize","original-size","show-all","error"],["appUploadFileDragDrop","",1,"no-doc-container",3,"disabled","onFileDropped"],[1,"loaded-file"],[1,"fa","fa-file"],[3,"click"],[1,"no-view"],[1,"far","fa-eye-slash","no-view-icon"],[2,"height","100%","width","100%",3,"params","file","editMode","triggerAfterUpdatedDoc","triggerCloseEditor","triggerModifiedDocument"],["onlyofficeViewer",""],["collaboraOnlineViewer",""],[2,"margin","auto"],["mat-fab","","color","accent",2,"position","absolute","z-index","3","bottom","40px","right","60px",3,"title","click"],[1,"fas","fa-check",2,"height","auto","font-size","20px"],["mat-raised-button","","color","warn",2,"position","fixed","z-index","1","bottom","100px","right","150px",3,"title","click"]],template:function(t,e){1&t&&(n.Oc(0,Mr,10,6,"ng-container",0),n.Oc(1,$r,4,2,"ng-container",0),n.Oc(2,Hr,3,3,"ng-container",0),n.Oc(3,Xr,4,4,"ng-container",0),n.Oc(4,qr,3,3,"button",1),n.Oc(5,Kr,3,3,"button",1),n.Oc(6,Yr,4,6,"button",2)),2&t&&(n.oc("ngIf",e.editInProgress&&"onlyoffice"!==e.editor.mode&&"collaboraOnline"!==e.editor.mode),n.Db(1),n.oc("ngIf",!e.editInProgress),n.Db(1),n.oc("ngIf",e.editInProgress&&"onlyoffice"===e.editor.mode),n.Db(1),n.oc("ngIf",e.editInProgress&&"collaboraOnline"===e.editor.mode),n.Db(1),n.oc("ngIf",e.isDocModified&&"mainDocument"===e.mode&&null!==e.resId),n.Db(1),n.oc("ngIf",e.isDocModified&&"attachment"===e.mode),n.Db(1),n.oc("ngIf",!e.isDocModified&&"mainDocument"===e.mode&&null!==e.resId&&!e.functions.empty(e.file.subinfos)&&e.file.subinfos.signedDocVersions&&e.headerService.user.id==e.file.signatoryId&&!e.hideTools&&e.editMode))},directives:[P.t,k.b,X.d,X.u,X.x,ie,V.a,fr,A.b,S.a,ne.d,ne.e,ne.b,P.s,wt.a,Gs,vr,Cr,V.c],pipes:[g.d],styles:[".upload-icon[_ngcontent-%COMP%]{font-size:180px;opacity:.4;margin-bottom:30px}.view-doc-container[_ngcontent-%COMP%]{width:100%;height:100%;align-items:center;display:flex;flex-direction:column;justify-content:center}.example-loading-shade[_ngcontent-%COMP%]{background:hsla(0,0%,100%,.7);display:flex;flex-direction:column}.example-loading-shade[_ngcontent-%COMP%] .percent[_ngcontent-%COMP%]{position:absolute;margin-top:-5px;color:#135f7f}.viewer-tools[_ngcontent-%COMP%]{position:fixed;margin-top:5px;z-index:1;background:#135f7f;margin-left:5px;border-radius:10px;color:#fff;display:flex;align-items:left;transition:all .5s}.viewer-tools[_ngcontent-%COMP%] .mat-button[_ngcontent-%COMP%]{font-size:10px} .optionsListMenu{min-height:auto} .optionsListMenu .mat-menu-content{font-size:13px;padding-top:0;padding-bottom:0} .optionsListMenu .mat-icon{height:auto}.viewer-tools[_ngcontent-%COMP%]:hover .mat-icon-button[_ngcontent-%COMP%]:hover .mat-icon[_ngcontent-%COMP%]{transition:all .5s;border-radius:5px;background:hsla(0,0%,100%,.2)}.no-doc-container[_ngcontent-%COMP%]{width:100%;height:100%;align-items:center;display:flex;flex-direction:column;justify-content:center;font-weight:400}.no-doc-container[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#fff;cursor:pointer;text-decoration:underline}.no-view[_ngcontent-%COMP%]{font-size:30px;opacity:.2}.no-view[_ngcontent-%COMP%] .no-view-icon[_ngcontent-%COMP%]{font-size:100px}.noFile[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;height:100%;font-size:30px;opacity:.2}.noFile[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:100px}.loaded-file[_ngcontent-%COMP%]{position:absolute;top:105px;padding:10px;border-radius:10px;background:hsla(0,0%,100%,.2784313725490196)}.extensionsList[_ngcontent-%COMP%]{height:200px;overflow:auto}.editInProgress[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;justify-content:center;opacity:.5}.editInProgress[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{font-size:20px;padding-top:20px}.editInProgress[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:150px}@-webkit-keyframes bounce{0%,20%,53%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);transform:translateZ(0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);transform:translate3d(0,-30px,0)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);transform:translate3d(0,-15px,0)}90%{transform:translate3d(0,-4px,0)}}@keyframes bounce{0%,20%,53%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);transform:translateZ(0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);transform:translate3d(0,-30px,0)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);transform:translate3d(0,-15px,0)}90%{transform:translate3d(0,-4px,0)}}.bounce[_ngcontent-%COMP%]{-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-name:bounce;animation-name:bounce;transform-origin:center bottom;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.disabledButton[_ngcontent-%COMP%]{cursor:not-allowed}.example-loading-shade[_ngcontent-%COMP%]{background:hsla(0,0%,100%,.7686274509803922);z-index:2}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();function Zr(t,e){if(1&t&&n.Rb(0,"app-document-viewer",2,3),2&t){const t=n.hc();n.oc("editMode",!1)("resId",t.resId)("title",t.resId)}}let tc=(()=>{class t{constructor(t,e,i,n,a){this.http=t,this.route=e,this.router=i,this.notify=n,this.headerService=a,this.loading=!0,this.resId=0}ngOnInit(){this.route.params.subscribe(t=>{void 0!==t.resId?(this.resId=t.resId,this.http.get(`../rest/resources/${this.resId}/fileInformation`).pipe(Object(mt.a)(t=>{this.loading=!1}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.router.navigate(["/home"]),Object(c.a)(!1)))).subscribe()):this.router.navigate(["/home"])})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-document-viewer-page"]],decls:2,vars:1,consts:[[1,"doc-container"],["style","display:block;height:100%;width:100%;max-width:800px;overflow: auto;",3,"editMode","resId","title",4,"ngIf"],[2,"display","block","height","100%","width","100%","max-width","800px","overflow","auto",3,"editMode","resId","title"],["appDocumentViewer",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Oc(1,Zr,2,3,"app-document-viewer",1),n.Vb()),2&t&&(n.Db(1),n.oc("ngIf",!e.loading))},directives:[P.t,Jr],styles:[".doc-container[_ngcontent-%COMP%]{background:#135f7f;display:flex;justify-content:center}"]}),t})(),ec=(()=>{class t{constructor(t){this.sanitizer=t}transform(t){return this.sanitizer.bypassSecurityTrustHtml(t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(ca.b))},t.\u0275pipe=n.Pb({name:"safeHtml",type:t,pure:!0}),t})();function ic(t,e){1&t&&(n.Wb(0,"mat-form-field",12),n.Rb(1,"input",13),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.oc("placeholder",n.jc(2,1,"lang.id")))}function nc(t,e){1&t&&(n.Wb(0,"mat-hint",17),n.Wb(1,"a",18),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Sc("",n.jc(3,1,"lang.forgotPassword")," ?"))}function ac(t,e){if(1&t&&(n.Wb(0,"mat-hint",17),n.Wb(1,"span",19),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.Rc(n.jc(3,1,"lang."+t.authService.authMode+"Enabled"))}}function sc(t,e){if(1&t&&(n.Wb(0,"mat-form-field",14),n.Rb(1,"input",15),n.ic(2,"translate"),n.Oc(3,nc,4,3,"mat-hint",16),n.Oc(4,ac,4,3,"mat-hint",16),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("placeholder",n.jc(2,3,"lang.password")),n.Db(2),n.oc("ngIf","standard"===t.authService.authMode),n.Db(1),n.oc("ngIf","ldap"===t.authService.authMode)}}function oc(t,e){if(1&t&&(n.Wb(0,"div",20),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Sc(" ",n.jc(2,1,"lang."+t.authService.authMode+"Enabled")," ")}}const rc=function(){return["cas","keycloak","sso","azure_saml"]};let cc=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c,l,d){this.translate=t,this.http=e,this.router=i,this.headerService=n,this.authService=a,this.localStorage=s,this.functionsService=o,this.notify=r,this.dialog=c,this.formBuilder=l,this.timeLimit=d,this.loading=!1,this.showForm=!0,this.applicationName="",this.loginMessage=""}ngOnInit(){this.headerService.hideSideBar=!0,this.loginForm=this.formBuilder.group({login:[null,X.I.required],password:[null,X.I.required]}),this.environment=a.a,null!==this.authService.getToken()?this.functionsService.empty(this.authService.getUrl(JSON.parse(atob(this.authService.getToken().split(".")[1])).user.id))?this.router.navigate(["/home"]):this.router.navigate([this.authService.getUrl(JSON.parse(atob(this.authService.getToken().split(".")[1])).user.id)]):this.initConnection()}onSubmit(t=null){this.loading=!0;let e="../rest/authenticate";null!==t&&(e+=t),this.http.post(e,{login:this.loginForm.get("login").value,password:this.loginForm.get("password").value},{observe:"response"}).pipe(Object(mt.a)(t=>{this.localStorage.resetLocal(),this.authService.saveTokens(t.headers.get("Token"),t.headers.get("Refresh-Token")),this.authService.setUser({}),this.authService.getCachedUrl()?(this.router.navigateByUrl(this.authService.getCachedUrl()),this.authService.cleanCachedUrl()):this.functionsService.empty(this.authService.getUrl(JSON.parse(atob(t.headers.get("Token").split(".")[1])).user.id))?this.router.navigate(["/home"]):this.router.navigate([this.authService.getUrl(JSON.parse(atob(t.headers.get("Token").split(".")[1])).user.id)])}),Object(m.a)(t=>(this.loading=!1,"Authentication Failed"===t.error.errors?this.notify.error(this.translate.instant("lang.wrongLoginPassword")):"Account Locked"===t.error.errors?this.notify.error(this.translate.instant("lang.accountLocked")+" "+this.timeLimit.transform(t.error.date)):"sso"===this.authService.authMode&&"Authentication Failed : login not present in header"===t.error.errors&&!this.functionsService.empty(this.authService.authUri)||"openam"===this.authService.authMode&&"Authentication Failed : User cookie is not set"===t.error.errors&&!this.functionsService.empty(this.authService.authUri)?window.location.href=this.authService.authUri:"azure_saml"===this.authService.authMode&&"Authentication Failed : not logged"===t.error.errors?window.location.href=t.error.authUri:this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}initConnection(){if(["sso","openam","azure_saml"].indexOf(this.authService.authMode)>-1)this.loginForm.disable(),this.loginForm.setValidators(null),this.onSubmit();else if(["cas","keycloak"].indexOf(this.authService.authMode)>-1){this.loginForm.disable(),this.loginForm.setValidators(null);const t=/code=[.]*/g;if(null!==window.location.search.match(/ticket=[.]*/g)||null!==window.location.search.match(t)){const t=window.location.search.substring(1,window.location.search.length);if(null!==t.match(/state=[.]*/g)){const t=new URLSearchParams(window.location.search.substring(1)),e=this.localStorage.get("keycloakState"),i=t.get("state");if(this.localStorage.save("keycloakState",null),e!==i&&null!==e)return void(window.location.href=this.authService.authUri)}window.history.replaceState({},document.title,window.location.pathname+window.location.hash),this.onSubmit("?"+t)}else window.location.href=this.authService.authUri}}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.c),n.Qb(y.a),n.Qb(_.a),n.Qb(Ut.a),n.Qb(_t.a),n.Qb(D.a),n.Qb(q.b),n.Qb(X.h),n.Qb(bs))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],features:[n.Cb([bs])],decls:18,vars:21,consts:[[1,"login-container"],[1,"login-content"],[1,"login-form"],[3,"formGroup","ngSubmit"],["svgIcon","maarchLogoFull",1,"maarchLogo"],[2,"color","white","font-size","14px",3,"innerHTML"],[2,"color","white","font-size","14px","font-weight","bold"],[2,"padding-left","30px","padding-right","30px"],["class","input-row login","appearance","outline","style","padding-bottom: 0px;",4,"ngIf"],["class","input-row","appearance","outline",4,"ngIf"],["class","alert-message alert-message-info","role","alert","style","max-width: 100%;",4,"ngIf"],["id","submit","type","submit","mat-stroked-button","",2,"color","white","border-color","#24b0ed","background","#24b0ed",3,"disabled"],["appearance","outline",1,"input-row","login",2,"padding-bottom","0px"],["id","login","name","login","matInput","","formControlName","login","type","text",3,"placeholder"],["appearance","outline",1,"input-row"],["id","password","name","password","matInput","","type","password","formControlName","password",3,"placeholder"],["align","end",4,"ngIf"],["align","end"],["routerLink","/forgot-password",1,"infoLogin"],[1,"infoLogin"],["role","alert",1,"alert-message","alert-message-info",2,"max-width","100%"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"div",1),n.Wb(2,"div",2),n.Wb(3,"form",3),n.dc("ngSubmit",(function(){return e.onSubmit()})),n.Rb(4,"mat-icon",4),n.Rb(5,"div",5),n.ic(6,"safeHtml"),n.Wb(7,"p",6),n.Qc(8),n.Vb(),n.Wb(9,"div",7),n.Oc(10,ic,3,3,"mat-form-field",8),n.Oc(11,sc,5,5,"mat-form-field",9),n.Vb(),n.Oc(12,oc,3,3,"div",10),n.Wb(13,"button",11),n.Qc(14),n.ic(15,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(16,"footer"),n.Qc(17),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(1),n.Lc("background-image","url(../rest/images?image=loginPage)"),n.Ib("showForm",e.showForm),n.Db(2),n.oc("formGroup",e.loginForm),n.Db(2),n.oc("innerHTML",n.jc(6,14,e.authService.loginMessage),n.Ec),n.Db(3),n.Rc(e.authService.applicationName),n.Db(2),n.oc("ngIf",-1===n.uc(18,rc).indexOf(e.authService.authMode)),n.Db(1),n.oc("ngIf",-1===n.uc(19,rc).indexOf(e.authService.authMode)),n.Db(1),n.oc("ngIf",n.uc(20,rc).indexOf(e.authService.authMode)>-1),n.Db(1),n.oc("disabled",e.loginForm.invalid||e.loading),n.Db(1),n.Rc(n.jc(15,16,"lang.LOGIN")),n.Db(3),n.Tc(" Maarch courrier ",e.environment.VERSION," Powered by ",e.environment.AUTHOR," "))},directives:[X.K,X.v,X.m,S.a,P.t,k.b,Y.c,J.b,X.d,X.u,X.k,Y.f,o.f],pipes:[ec,g.d],styles:['.login-container[_ngcontent-%COMP%], .login-content[_ngcontent-%COMP%]{background-color:#135f7f}.login-content[_ngcontent-%COMP%]{opacity:0;background-attachment:fixed;background-size:cover;display:grid;align-items:center;justify-content:center;height:100vh;transition:opacity 1s}.login-form[_ngcontent-%COMP%]{max-width:768px}.showForm[_ngcontent-%COMP%]{opacity:1;transition:opacity 1s}.input-row[_ngcontent-%COMP%]{padding-top:10px}.input-row[_ngcontent-%COMP%], .maarchLogo[_ngcontent-%COMP%]{width:100%;padding-bottom:10px}.maarchLogo[_ngcontent-%COMP%]{transition:all 1s ease-in-out;height:auto}footer[_ngcontent-%COMP%]{color:#fff;position:absolute;bottom:5px;font-size:10px;opacity:.5;left:10px}.infoLogin[_ngcontent-%COMP%]{font-weight:700;color:#fff;text-decoration:none}.login-form[_ngcontent-%COMP%]{text-align:center;padding:10px;max-width:550px;height:auto;box-shadow:0 0 1rem 0 rgba(0,0,0,.2);border-radius:5px;position:relative;z-index:1;background:inherit;overflow:hidden;border:2px solid #24b0ed}.login-form[_ngcontent-%COMP%] .mat-form-field-appearance-outline.mat-form-field-invalid.mat-form-field-invalid .mat-form-field-outline-thick{color:#fff!important}.login-form[_ngcontent-%COMP%] .mat-form-field-appearance-outline .mat-form-field-outline{color:#fff!important;background:#fff}.login-form[_ngcontent-%COMP%] .mat-form-field-ripple, .login-form[_ngcontent-%COMP%] .mat-form-field-underline{background-color:#fff!important}.login-form[_ngcontent-%COMP%]:before{content:"";position:absolute;background:inherit;z-index:-1;top:0;left:0;right:0;bottom:0;filter:blur(10px);margin:-20px}.login[_ngcontent-%COMP%] .mat-form-field-wrapper{padding-bottom:0!important}']}),t})(),lc=(()=>{class t{constructor(t,e,i){this.translate=t,this.http=e,this.functions=i}getFillingColor(t){return"first"===t?"#E81C2B":"second"===t?"#F4891E":"third"===t?"#0AA34F":""}formatCivilityObject(t){return this.empty(t)?{label:"",abbreviation:""}:t}formatFillingObject(t){return this.empty(t)?{rate:"",color:""}:{rate:t.rate,color:this.getFillingColor(t.thresholdLevel)}}empty(t){return null===t||""===t||void 0===t}formatContact(t){if(this.functions.empty(t.firstname)&&this.functions.empty(t.lastname))return t.company;{const e=[];return e.push(t.firstname),e.push(t.lastname),this.functions.empty(t.company)||e.push("("+t.company+")"),e.filter(t=>""!==t).join(" ")}}}return t.\u0275fac=function(e){return new(e||t)(n.ac(g.e),n.ac(v.b),n.ac(_t.a))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();var dc=i("R0Ic"),hc=i("QibW");const uc=["snav2"];function pc(t,e){1&t&&(n.Wb(0,"div",2),n.Rb(1,"mat-spinner",3),n.Vb())}function bc(t,e){if(1&t&&(n.Rb(0,"mat-icon",21),n.ic(1,"translate")),2&t){const t=n.hc(4);n.Lc("color",t.fillingRate.color),n.oc("title",n.jc(1,3,"lang.targetFillingField"))}}function fc(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",19),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return e.display=!e.display})),n.Oc(1,bc,2,5,"mat-icon",20),n.Wb(2,"span"),n.Qc(3),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",t.filling),n.Db(2),n.Rc(t.label)}}function mc(t,e){if(1&t&&(n.Ub(0),n.Oc(1,fc,4,2,"button",18),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",!t.display&&"mainInfo"===t.unit)}}function gc(t,e){if(1&t&&(n.Rb(0,"mat-icon",21),n.ic(1,"translate")),2&t){const t=n.hc(4);n.Lc("color",t.fillingRate.color),n.oc("title",n.jc(1,3,"lang.targetFillingField"))}}function vc(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",19),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return e.display=!e.display})),n.Oc(1,gc,2,5,"mat-icon",20),n.Wb(2,"span"),n.Qc(3),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",t.filling),n.Db(2),n.Rc(t.label)}}function _c(t,e){if(1&t&&(n.Ub(0),n.Oc(1,vc,4,2,"button",18),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",!t.display&&"address"===t.unit)}}function yc(t,e){if(1&t&&(n.Rb(0,"mat-icon",21),n.ic(1,"translate")),2&t){const t=n.hc(4);n.Lc("color",t.fillingRate.color),n.oc("title",n.jc(1,3,"lang.targetFillingField"))}}function xc(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",19),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return e.display=!e.display})),n.Oc(1,yc,2,5,"mat-icon",20),n.Wb(2,"span"),n.Qc(3),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",t.filling),n.Db(2),n.Rc(t.label)}}function Cc(t,e){if(1&t&&(n.Ub(0),n.Oc(1,xc,4,2,"button",18),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",!t.display&&"complement"===t.unit)}}function Oc(t,e){if(1&t&&(n.Rb(0,"mat-icon",21),n.ic(1,"translate")),2&t){const t=n.hc(4);n.Lc("color",t.fillingRate.color),n.oc("title",n.jc(1,3,"lang.targetFillingField"))}}function Dc(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",19),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return e.display=!e.display})),n.Oc(1,Oc,2,5,"mat-icon",20),n.Wb(2,"span"),n.Qc(3),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",t.filling),n.Db(2),n.Rc(t.label)}}function wc(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Dc,4,2,"button",18),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",!t.display&&"maarch2maarch"===t.unit)}}function Mc(t,e){if(1&t&&(n.Wb(0,"div",22),n.Wb(1,"div",23),n.Qc(2),n.ic(3,"translate"),n.Wb(4,"b"),n.Qc(5),n.Vb(),n.Vb(),n.Rb(6,"mat-progress-bar",24),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Lc("color",t.fillingRate.color),n.Db(1),n.Sc("",n.jc(3,6,"lang.contactFilledTo")," "),n.Db(3),n.Sc("",t.fillingRate.value," %"),n.Db(1),n.oc("color",t.fillingRate.class)("value",t.fillingRate.value)}}function kc(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",25),n.Wb(1,"div",22),n.Qc(2),n.ic(3,"translate"),n.Wb(4,"b"),n.Qc(5),n.Vb(),n.Qc(6),n.ic(7,"translate"),n.Wb(8,"a",26),n.dc("click",(function(){n.Dc(t);const e=n.hc(2);return e.setAddress(e.companyFound)})),n.Qc(9),n.ic(10,"translate"),n.ic(11,"translate"),n.Vb(),n.Qc(12),n.ic(13,"translate"),n.Rb(14,"br"),n.Wb(15,"q",27),n.Qc(16),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.oc("@hideShow",void 0),n.Db(2),n.Sc(" ",n.jc(3,12,"lang.contactsParameters_company")," "),n.Db(3),n.Rc(t.companyFound.company),n.Db(1),n.Sc(" ",n.jc(7,14,"lang.found")," ! "),n.Db(3),n.Tc("",n.jc(10,16,"lang.click")," ",n.jc(11,18,"lang.here"),""),n.Db(3),n.Sc(" ",n.jc(13,20,"lang.toCopyAddress")," :"),n.Db(4),n.Wc("",t.companyFound.addressNumber," ",t.companyFound.addressStreet,", ",t.companyFound.addressPostcode," ",t.companyFound.addressTown,", ",t.companyFound.addressCountry,"")}}function Sc(t,e){if(1&t){const t=n.Xb();n.Wb(0,"a",32),n.dc("click",(function(){n.Dc(t);const e=n.hc(4);return e.addressBANMode=!e.addressBANMode})),n.Qc(1),n.ic(2,"translate"),n.ic(3,"translate"),n.Vb()}if(2&t){const t=n.hc(4);n.Db(1),n.Rc(t.addressBANMode?n.jc(2,1,"lang.switchManualAddress"):n.jc(3,3,"lang.searchAddressDb"))}}function Ic(t,e){if(1&t&&n.Rb(0,"mat-hint",42),2&t){const t=n.hc(4).$implicit;n.oc("innerHTML",t.desc,n.Ec)}}function Pc(t,e){if(1&t&&(n.Wb(0,"mat-error"),n.Qc(1),n.Vb()),2&t){const t=n.hc(4).$implicit,e=n.hc(4);n.Db(1),n.Sc(" ",e.getErrorMsg(t.control.errors),"")}}function Vc(t,e){if(1&t&&(n.Rb(0,"mat-icon",43),n.ic(1,"translate")),2&t){const t=n.hc(8);n.Lc("color",t.fillingRate.color),n.oc("title",n.jc(1,3,"lang.targetFillingField"))}}function Rc(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"mat-form-field"),n.Wb(2,"input",39),n.dc("blur",(function(){n.Dc(t);const e=n.hc(3).$implicit,i=n.hc(4);return i.checkCompany(e),i.checkFilling()}))("ngModelChange",(function(e){n.Dc(t);const i=n.hc(3).$implicit;return n.hc(4).toUpperCase(i,e)})),n.Vb(),n.Oc(3,Ic,1,1,"mat-hint",40),n.Oc(4,Pc,2,1,"mat-error",34),n.Oc(5,Vc,2,5,"mat-icon",41),n.Vb(),n.Tb()}if(2&t){const t=n.hc(3).$implicit,e=n.hc(4);n.Db(2),n.oc("formControl",t.control)("placeholder",t.label)("required",t.required),n.Db(1),n.oc("ngIf",!e.isEmptyValue(t.desc)),n.Db(1),n.oc("ngIf","VALID"!==t.control.status&&t.control.touched),n.Db(1),n.oc("ngIf",t.filling)}}function jc(t,e){if(1&t&&(n.Wb(0,"mat-error"),n.Qc(1),n.Vb()),2&t){const t=n.hc(4).$implicit,e=n.hc(4);n.Db(1),n.Sc(" ",e.getErrorMsg(t.control.errors),"")}}function Ac(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-form-field"),n.Rb(2,"input",44),n.Oc(3,jc,2,1,"mat-error",34),n.Vb(),n.Tb()),2&t){const t=n.hc(3).$implicit;n.Db(2),n.oc("formControl",t.control)("placeholder",t.label)("required",t.required),n.Db(1),n.oc("ngIf","VALID"!==t.control.status&&t.control.touched)}}const Wc=function(t,e){return{class:"fa-circle",color:t,title:e}};function Tc(t,e){if(1&t&&(n.Ub(0),n.Rb(1,"plugin-select-search",45),n.ic(2,"translate"),n.Tb()),2&t){const t=n.hc(3).$implicit,e=n.hc(4);n.Db(1),n.Fb(""),n.oc("label",t.label)("required",t.required)("showLabel",!0)("formControlSelect",t.control)("placeholderLabel",t.label)("hideErrorDesc",!1)("datas",t.values)("suffixIcon",t.filling?n.wc(12,Wc,e.fillingRate.color,n.jc(2,10,"lang.targetFillingField")):null)}}function Ec(t,e){if(1&t&&n.Rb(0,"mat-datepicker-toggle",51),2&t){n.hc();const t=n.zc(7);n.oc("for",t)}}function Fc(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",52),n.dc("click",(function(e){n.Dc(t);const i=n.hc(4).$implicit;return e.stopPropagation(),i.control.reset()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",53),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.eraseValue"))}function Lc(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"mat-form-field",32),n.dc("click",(function(){return n.Dc(t),n.zc(7).open()})),n.Wb(2,"mat-label"),n.Qc(3),n.Vb(),n.Rb(4,"input",46),n.Oc(5,Ec,1,1,"mat-datepicker-toggle",47),n.Rb(6,"mat-datepicker",48,49),n.Oc(8,Fc,3,3,"button",50),n.Vb(),n.Tb()}if(2&t){const t=n.zc(7),e=n.hc(3).$implicit,i=n.hc(4);n.Db(3),n.Sc("",e.label," "),n.Db(1),n.oc("formControl",e.control)("matDatepicker",t)("placeholder",e.label),n.Db(1),n.oc("ngIf",!e.control.value),n.Db(1),n.oc("touchUi",i.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.control.value&&!e.control.disabled)}}function Qc(t,e){1&t&&(n.Ub(0),n.Qc(1,"* "),n.Tb())}function Nc(t,e){if(1&t&&(n.Wb(0,"mat-radio-button",58),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function zc(t,e){if(1&t&&(n.Rb(0,"i",59),n.ic(1,"translate")),2&t){const t=n.hc(8);n.Lc("color",t.fillingRate.color),n.oc("title",n.jc(1,3,"lang.targetFillingField"))}}function Bc(t,e){if(1&t&&(n.Wb(0,"mat-error"),n.Qc(1),n.Vb()),2&t){const t=n.hc(4).$implicit,e=n.hc(4);n.Db(1),n.Sc(" ",e.getErrorMsg(t.control.errors),"")}}function Uc(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"label",54),n.Qc(2),n.Oc(3,Qc,2,0,"ng-container",34),n.Vb(),n.Wb(4,"mat-radio-group",55),n.Oc(5,Nc,2,2,"mat-radio-button",56),n.Vb(),n.Oc(6,zc,2,5,"i",57),n.Oc(7,Bc,2,1,"mat-error",34),n.Tb()),2&t){const t=n.hc(3).$implicit;n.Db(2),n.Sc("",t.label," "),n.Db(1),n.oc("ngIf",t.required),n.Db(1),n.oc("formControl",t.control),n.Db(1),n.oc("ngForOf",t.values),n.Db(1),n.oc("ngIf",t.filling),n.Db(1),n.oc("ngIf","VALID"!==t.control.status&&t.control.touched)}}function $c(t,e){1&t&&(n.Ub(0),n.Qc(1,"* "),n.Tb())}function Hc(t,e){if(1&t&&(n.Wb(0,"mat-list-option",63),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function Gc(t,e){if(1&t&&(n.Rb(0,"i",59),n.ic(1,"translate")),2&t){const t=n.hc(8);n.Lc("color",t.fillingRate.color),n.oc("title",n.jc(1,3,"lang.targetFillingField"))}}function Xc(t,e){if(1&t&&(n.Wb(0,"mat-error"),n.Qc(1),n.Vb()),2&t){const t=n.hc(4).$implicit,e=n.hc(4);n.Db(1),n.Sc(" ",e.getErrorMsg(t.control.errors),"")}}function qc(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"label",54),n.Qc(2),n.Oc(3,$c,2,0,"ng-container",34),n.Vb(),n.Wb(4,"mat-selection-list",60,61),n.Oc(6,Hc,2,2,"mat-list-option",62),n.Vb(),n.Oc(7,Gc,2,5,"i",57),n.Oc(8,Xc,2,1,"mat-error",34),n.Tb()),2&t){const t=n.hc(3).$implicit;n.Db(2),n.Sc("",t.label," "),n.Db(1),n.oc("ngIf",t.required),n.Db(1),n.oc("formControl",t.control),n.Db(2),n.oc("ngForOf",t.values),n.Db(1),n.oc("ngIf",t.filling),n.Db(1),n.oc("ngIf","VALID"!==t.control.status&&t.control.touched)}}function Kc(t,e){if(1&t&&n.Rb(0,"mat-hint",42),2&t){const t=n.hc(5).$implicit;n.oc("innerHTML",t.desc,n.Ec)}}function Yc(t,e){if(1&t&&(n.Wb(0,"mat-option",58),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t.unitOrganization," ")}}function Jc(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Yc,2,2,"mat-option",56),n.ic(2,"async"),n.Tb()),2&t){const t=n.hc(9);n.Db(1),n.oc("ngForOf",n.jc(2,1,t.communicationMeanFilteredResult))}}function Zc(t,e){if(1&t&&n.Rb(0,"mat-option",70),2&t){const t=n.hc(9);n.oc("innerHTML",t.communicationMeanInfo,n.Ec)}}function tl(t,e){1&t&&(n.Wb(0,"mat-option",71),n.Rb(1,"mat-spinner",72),n.Vb())}function el(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"input",64,65),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("keyup",(function(){return n.Dc(t),n.hc(8).resetM2MFields()})),n.ic(3,"translate"),n.Vb(),n.Oc(4,Kc,1,1,"mat-hint",40),n.Wb(5,"mat-autocomplete",66,67),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc(8).selectCommunicationMean(e)})),n.Oc(7,Jc,3,3,"ng-container",34),n.Oc(8,Zc,1,1,"mat-option",68),n.Oc(9,tl,2,0,"mat-option",69),n.Vb(),n.Vb()}if(2&t){const t=n.zc(6),e=n.hc(4).$implicit,i=n.hc(4);n.Db(1),n.oc("placeholder",n.jc(3,7,"lang.searchCommunicationMean"))("formControl",e.control)("matAutocomplete",t),n.Db(3),n.oc("ngIf",!i.isEmptyValue(e.desc)),n.Db(3),n.oc("ngIf",i.communicationMeanResult.length>0&&!i.communicationMeanLoading),n.Db(1),n.oc("ngIf",0===i.communicationMeanResult.length&&!i.communicationMeanLoading),n.Db(1),n.oc("ngIf",i.communicationMeanLoading)}}function il(t,e){if(1&t&&n.Rb(0,"mat-hint",42),2&t){const t=n.hc(5).$implicit;n.oc("innerHTML",t.desc,n.Ec)}}function nl(t,e){if(1&t&&(n.Wb(0,"mat-form-field"),n.Rb(1,"input",73,65),n.ic(3,"translate"),n.Oc(4,il,1,1,"mat-hint",40),n.Vb()),2&t){const t=n.hc(4).$implicit,e=n.hc(4);n.Db(1),n.oc("placeholder",n.jc(3,3,"lang.communicationMean"))("formControl",t.control),n.Db(3),n.oc("ngIf",!e.isEmptyValue(t.desc))}}function al(t,e){if(1&t&&(n.Ub(0),n.Oc(1,el,10,9,"mat-form-field",34),n.Oc(2,nl,5,5,"mat-form-field",34),n.Tb()),2&t){const t=n.hc(7);n.Db(1),n.oc("ngIf",t.annuaryEnabled),n.Db(1),n.oc("ngIf",!t.annuaryEnabled)}}function sl(t,e){if(1&t&&n.Rb(0,"mat-hint",42),2&t){const t=n.hc(5).$implicit;n.oc("innerHTML",t.desc,n.Ec)}}function ol(t,e){if(1&t&&(n.Wb(0,"mat-option",58),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t.unitOrganization," ")}}function rl(t,e){if(1&t&&(n.Ub(0),n.Oc(1,ol,2,2,"mat-option",56),n.ic(2,"async"),n.Tb()),2&t){const t=n.hc(9);n.Db(1),n.oc("ngForOf",n.jc(2,1,t.externalId_m2mFilteredResult))}}function cl(t,e){if(1&t&&n.Rb(0,"mat-option",70),2&t){const t=n.hc(9);n.oc("innerHTML",t.externalId_m2mInfo,n.Ec)}}function ll(t,e){1&t&&(n.Wb(0,"mat-option",71),n.Rb(1,"mat-spinner",72),n.Vb())}function dl(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"input",64,74),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("keyup",(function(){return n.Dc(t),n.hc(8).resetAutocompleteExternalIdM2M()})),n.ic(3,"translate"),n.Vb(),n.Oc(4,sl,1,1,"mat-hint",40),n.Wb(5,"mat-autocomplete",66,67),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc(8).selectExternalIdM2M(e)})),n.Oc(7,rl,3,3,"ng-container",34),n.Oc(8,cl,1,1,"mat-option",68),n.Oc(9,ll,2,0,"mat-option",69),n.Vb(),n.Vb()}if(2&t){const t=n.zc(6),e=n.hc(4).$implicit,i=n.hc(4);n.Db(1),n.oc("placeholder",n.jc(3,7,"lang.searchExternalIdM2M"))("formControl",e.control)("matAutocomplete",t),n.Db(3),n.oc("ngIf",!i.isEmptyValue(e.desc)),n.Db(3),n.oc("ngIf",i.externalId_m2mResult.length>0&&!i.externalId_m2mLoading),n.Db(1),n.oc("ngIf",0===i.externalId_m2mResult.length&&!i.externalId_m2mLoading),n.Db(1),n.oc("ngIf",i.externalId_m2mLoading)}}function hl(t,e){if(1&t&&n.Rb(0,"mat-hint",42),2&t){const t=n.hc(5).$implicit;n.oc("innerHTML",t.desc,n.Ec)}}function ul(t,e){if(1&t&&(n.Wb(0,"mat-form-field"),n.Rb(1,"input",73,74),n.ic(3,"translate"),n.Oc(4,hl,1,1,"mat-hint",40),n.Vb()),2&t){const t=n.hc(4).$implicit,e=n.hc(4);n.Db(1),n.oc("placeholder",n.jc(3,3,"lang.IdMaarch2Maarch"))("formControl",t.control),n.Db(3),n.oc("ngIf",!e.isEmptyValue(t.desc))}}function pl(t,e){if(1&t&&(n.Ub(0),n.Oc(1,dl,10,9,"mat-form-field",34),n.Oc(2,ul,5,5,"mat-form-field",34),n.Tb()),2&t){const t=n.hc(7);n.Db(1),n.oc("ngIf",t.annuaryEnabled),n.Db(1),n.oc("ngIf",!t.annuaryEnabled)}}function bl(t,e){if(1&t&&(n.Wb(0,"mat-option",58),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}function fl(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"mat-form-field"),n.Rb(2,"input",75,76),n.Wb(4,"mat-autocomplete",77,78),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc(7).selectCountry(e)})),n.Oc(6,bl,2,2,"mat-option",56),n.ic(7,"async"),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=n.zc(5),e=n.hc(3).$implicit,i=n.hc(4);n.Db(2),n.oc("formControl",e.control)("placeholder",e.label)("matAutocomplete",t),n.Db(4),n.oc("ngForOf",n.jc(7,4,i.countriesFilteredResult))}}function ml(t,e){if(1&t&&(n.Wb(0,"p",38),n.Oc(1,Rc,6,6,"ng-container",34),n.Oc(2,Ac,4,4,"ng-container",34),n.Oc(3,Tc,3,15,"ng-container",34),n.Oc(4,Lc,9,7,"ng-container",34),n.Oc(5,Uc,8,6,"ng-container",34),n.Oc(6,qc,9,6,"ng-container",34),n.Oc(7,al,3,2,"ng-container",34),n.Oc(8,pl,3,2,"ng-container",34),n.Oc(9,fl,8,6,"ng-container",34),n.Vb()),2&t){const t=n.hc(2).$implicit;n.Db(1),n.oc("ngIf","string"===t.type&&"communicationMeans"!==t.id&&"externalId_m2m"!==t.id&&"addressCountry"!=t.id),n.Db(1),n.oc("ngIf","integer"===t.type),n.Db(1),n.oc("ngIf","select"===t.type),n.Db(1),n.oc("ngIf","date"===t.type),n.Db(1),n.oc("ngIf","radio"===t.type),n.Db(1),n.oc("ngIf","checkbox"===t.type),n.Db(1),n.oc("ngIf","communicationMeans"===t.id),n.Db(1),n.oc("ngIf","externalId_m2m"===t.id),n.Db(1),n.oc("ngIf","addressCountry"===t.id)}}function gl(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",79),n.dc("click",(function(){n.Dc(t);const e=n.hc(2).$implicit;return n.hc(4).removeField(e)})),n.Rb(1,"mat-icon",80),n.Vb()}if(2&t){const t=n.hc(2).$implicit,e=n.hc(4);n.oc("disabled",!e.canDelete(t))}}function vl(t,e){if(1&t&&(n.Wb(0,"mat-list-item",35),n.Oc(1,ml,10,9,"p",36),n.Oc(2,gl,2,1,"button",37),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",t.display),n.Db(1),n.oc("ngIf",t.display)}}function _l(t,e){1&t&&(n.Wb(0,"mat-error"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.requiredField"),""))}function yl(t,e){if(1&t&&(n.Wb(0,"p",38),n.Wb(1,"mat-form-field"),n.Rb(2,"input",81),n.Oc(3,_l,3,3,"mat-error",34),n.Vb(),n.Vb()),2&t){const t=n.hc(2).$implicit;n.Db(2),n.oc("formControl",t.control)("placeholder",t.label)("required",t.required),n.Db(1),n.oc("ngIf",t.control.hasError("required"))}}function xl(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",79),n.dc("click",(function(){n.Dc(t);const e=n.hc(2).$implicit;return n.hc(4).removeField(e)})),n.Rb(1,"mat-icon",80),n.Vb()}if(2&t){const t=n.hc(2).$implicit,e=n.hc(4);n.oc("disabled",!e.canDelete(t))}}function Cl(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-list-item",35),n.Oc(2,yl,4,4,"p",36),n.Oc(3,xl,2,1,"button",37),n.Vb(),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(2),n.oc("ngIf",t.display),n.Db(1),n.oc("ngIf",t.display)}}function Ol(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",19),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(6).addressBANCurrentDepartment=i})),n.Qc(1),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.Rc(t)}}function Dl(t,e){if(1&t&&(n.Wb(0,"mat-option",58),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t.address," ")}}function wl(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Dl,2,2,"mat-option",56),n.ic(2,"async"),n.Tb()),2&t){const t=n.hc(6);n.Db(1),n.oc("ngForOf",n.jc(2,1,t.addressBANFilteredResult))}}function Ml(t,e){if(1&t&&n.Rb(0,"mat-option",70),2&t){const t=n.hc(6);n.oc("innerHTML",t.addressBANInfo,n.Ec)}}function kl(t,e){1&t&&(n.Wb(0,"mat-option",71),n.Rb(1,"mat-spinner",72),n.Vb())}function Sl(t,e){if(1&t&&(n.Wb(0,"p",38),n.Qc(1),n.Vb()),2&t){const t=n.hc(7);n.Db(1),n.Sc(" ",t.getValue("addressAdditional1")," ")}}function Il(t,e){if(1&t&&(n.Wb(0,"p",38),n.Qc(1),n.Vb()),2&t){const t=n.hc(7);n.Db(1),n.Sc(" ",t.getValue("addressAdditional2")," ")}}function Pl(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",90),n.Wb(1,"mat-list-item",91),n.dc("click",(function(){return n.Dc(t),n.hc(6).goTo()})),n.ic(2,"translate"),n.Rb(3,"mat-icon",92),n.Oc(4,Sl,2,1,"p",36),n.Wb(5,"p",38),n.Qc(6),n.Vb(),n.Oc(7,Il,2,1,"p",36),n.Wb(8,"p",38),n.Qc(9),n.Vb(),n.Wb(10,"p",38),n.Qc(11),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(6);n.Db(1),n.oc("title",n.jc(2,8,"lang.address")),n.Db(3),n.oc("ngIf",!t.isEmptyValue(t.getValue("addressAdditional1"))),n.Db(2),n.Tc(" ",t.getValue("addressNumber")," ",t.getValue("addressStreet")," "),n.Db(1),n.oc("ngIf",!t.isEmptyValue(t.getValue("addressAdditional2"))),n.Db(2),n.Tc(" ",t.getValue("addressPostcode")," ",t.getValue("addressTown")," "),n.Db(2),n.Sc(" ",t.getValue("addressCountry")," ")}}function Vl(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"mat-list-item"),n.Wb(2,"p",38),n.Wb(3,"mat-form-field",82),n.Wb(4,"button",83),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.ic(5,"translate"),n.Qc(6),n.Rb(7,"i",84),n.Vb(),n.Wb(8,"mat-menu",null,85),n.Oc(10,Ol,2,1,"button",86),n.Vb(),n.Rb(11,"mat-icon",87),n.Wb(12,"input",88,76),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("focus",(function(){return n.Dc(t),n.hc(5).resetAutocompleteAddressBan()})),n.ic(14,"translate"),n.Vb(),n.Wb(15,"mat-autocomplete",66,67),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc(5).selectAddressBan(e)})),n.Oc(17,wl,3,3,"ng-container",34),n.Oc(18,Ml,1,1,"mat-option",68),n.Oc(19,kl,2,0,"mat-option",69),n.Vb(),n.Vb(),n.Oc(20,Pl,12,10,"mat-card",89),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=n.zc(9),e=n.zc(16),i=n.hc(5);n.Db(4),n.oc("matMenuTriggerFor",t)("title",n.jc(5,11,"lang.targetDepartment")),n.Db(2),n.Sc(" ",i.addressBANCurrentDepartment,"\xa0"),n.Db(4),n.oc("ngForOf",i.departmentList),n.Db(2),n.oc("placeholder",n.jc(14,13,"lang.searchAddressBan"))("formControl",i.addressBANControl)("matAutocomplete",e),n.Db(5),n.oc("ngIf",i.addressBANResult.length>0&&!i.addressBANLoading),n.Db(1),n.oc("ngIf",0===i.addressBANResult.length&&!i.addressBANLoading),n.Db(1),n.oc("ngIf",i.addressBANLoading),n.Db(1),n.oc("ngIf",!i.emptyAddress())}}const Rl=function(){return["addressAdditional1","addressAdditional2"]};function jl(t,e){if(1&t&&(n.Ub(0),n.Oc(1,vl,3,2,"mat-list-item",33),n.Oc(2,Cl,4,2,"ng-container",34),n.Oc(3,Vl,21,15,"ng-container",34),n.Tb()),2&t){const t=e.$implicit,i=e.index,a=n.hc(2).$implicit,s=n.hc(2);n.Db(1),n.oc("ngIf",t.unit===a.id&&"address"!==a.id||t.unit===a.id&&"address"===a.id&&!s.addressBANMode),n.Db(1),n.oc("ngIf","address"===a.id&&s.addressBANMode&&n.uc(3,Rl).indexOf(t.id)>-1),n.Db(1),n.oc("ngIf","address"===a.id&&s.addressBANMode&&0===i)}}function Al(t,e){if(1&t&&(n.Wb(0,"div"),n.Wb(1,"mat-list"),n.Wb(2,"h3",29),n.Wb(3,"span",30),n.Qc(4),n.Vb(),n.Oc(5,Sc,4,5,"a",31),n.Vb(),n.Oc(6,jl,4,4,"ng-container",8),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc(2);n.Ib("col-sm-12","maarch2maarch"!==t.id&&"complement"!==t.id&&!e.isEmptyUnit("mainInfo")&&!e.isEmptyUnit("address"))("col-md-6","maarch2maarch"!==t.id&&"complement"!==t.id&&!e.isEmptyUnit("mainInfo")&&!e.isEmptyUnit("address"))("col-md-12","complement"===t.id||"maarch2maarch"===t.id),n.Db(4),n.Rc(t.label),n.Db(1),n.oc("ngIf","address"===t.id),n.Db(1),n.oc("ngForOf",e.contactForm)}}function Wl(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Al,7,9,"div",28),n.Tb()),2&t){const t=e.$implicit,i=n.hc(2);n.Db(1),n.oc("ngIf",!i.isEmptyUnit(t.id))}}function Tl(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-menu",null,4),n.Wb(2,"button",5),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"button",5),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Wb(8,"button",5),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Wb(11,"button",5),n.Qc(12,"Maarch2Maarch"),n.Vb(),n.Vb(),n.Wb(13,"mat-menu",null,6),n.Wb(15,"button",7),n.dc("click",(function(){return n.Dc(t),n.hc().toogleAllFieldsUnit("mainInfo")})),n.Qc(16),n.ic(17,"translate"),n.Vb(),n.Rb(18,"mat-divider"),n.Oc(19,mc,2,1,"ng-container",8),n.Vb(),n.Wb(20,"mat-menu",null,9),n.Wb(22,"button",7),n.dc("click",(function(){return n.Dc(t),n.hc().toogleAllFieldsUnit("address")})),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Rb(25,"mat-divider"),n.Oc(26,_c,2,1,"ng-container",8),n.Vb(),n.Wb(27,"mat-menu",null,10),n.Wb(29,"button",7),n.dc("click",(function(){return n.Dc(t),n.hc().toogleAllFieldsUnit("complement")})),n.Qc(30),n.ic(31,"translate"),n.Vb(),n.Rb(32,"mat-divider"),n.Oc(33,Cc,2,1,"ng-container",8),n.Vb(),n.Wb(34,"mat-menu",null,11),n.Wb(36,"button",7),n.dc("click",(function(){return n.Dc(t),n.hc().toogleAllFieldsUnit("maarch2maarch")})),n.Qc(37),n.ic(38,"translate"),n.Vb(),n.Rb(39,"mat-divider"),n.Oc(40,wc,2,1,"ng-container",8),n.Vb(),n.Oc(41,Mc,7,8,"div",12),n.Oc(42,kc,17,22,"div",13),n.Wb(43,"div",14),n.Oc(44,Wl,2,1,"ng-container",8),n.Vb(),n.Wb(45,"div",15),n.Wb(46,"button",16),n.Qc(47),n.ic(48,"translate"),n.Vb(),n.Wb(49,"button",17),n.dc("click",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Qc(50),n.ic(51,"translate"),n.Vb(),n.Vb()}if(2&t){const t=n.zc(1),e=n.zc(14),i=n.zc(21),a=n.zc(28),s=n.zc(35),o=n.hc();n.Db(2),n.oc("matMenuTriggerFor",e)("disabled",o.noField("mainInfo")),n.Db(1),n.Rc(n.jc(4,25,"lang.denomination")),n.Db(2),n.oc("matMenuTriggerFor",i)("disabled",o.noField("address")),n.Db(1),n.Rc(n.jc(7,27,"lang.address")),n.Db(2),n.oc("matMenuTriggerFor",a)("disabled",o.noField("complement")),n.Db(1),n.Rc(n.jc(10,29,"lang.additionals")),n.Db(2),n.oc("matMenuTriggerFor",s)("disabled",o.noField("maarch2maarch")),n.Db(5),n.Rc(n.jc(17,31,"lang.addAll")),n.Db(3),n.oc("ngForOf",o.contactForm),n.Db(4),n.Rc(n.jc(24,33,"lang.addAll")),n.Db(3),n.oc("ngForOf",o.contactForm),n.Db(4),n.Rc(n.jc(31,35,"lang.addAll")),n.Db(3),n.oc("ngForOf",o.contactForm),n.Db(4),n.Rc(n.jc(38,37,"lang.addAll")),n.Db(3),n.oc("ngForOf",o.contactForm),n.Db(1),n.oc("ngIf",o.fillingParameters.enable),n.Db(1),n.oc("ngIf",null!==o.companyFound),n.Db(2),n.oc("ngForOf",o.contactUnit),n.Db(2),n.oc("matMenuTriggerFor",t),n.Db(1),n.Sc("",n.jc(48,39,"lang.moreInfos"),"..."),n.Db(3),n.Rc(n.jc(51,41,"lang.validate"))}}let El=(()=>{class t{constructor(t,e,i,s,o,r,c,l,d,h,u){this.translate=t,this.http=e,this.route=i,this.router=s,this.notify=o,this.headerService=r,this.appService=c,this.dialog=l,this.contactService=d,this.functions=h,this.latinisePipe=u,this.countries=[],this.countryControl=new X.i,this.loading=!1,this.creationMode=!0,this.contactId=null,this.onSubmitEvent=new n.o,this.maarch2maarchUrl=`https://docs.maarch.org/gitbook/html/MaarchCourrier/${a.a.VERSION.split(".")[0]+"."+a.a.VERSION.split(".")[1]}/guat/guat_exploitation/maarch2maarch.html`,this.contactUnit=[{id:"mainInfo",label:this.translate.instant("lang.denomination")},{id:"address",label:this.translate.instant("lang.address")},{id:"complement",label:this.translate.instant("lang.additionals")},{id:"maarch2maarch",label:"Maarch2Maarch"}],this.contactForm=[{id:"company",unit:"mainInfo",label:this.translate.instant("lang.contactsParameters_company"),type:"string",control:new X.i,required:!1,display:!0,filling:!1,values:[]},{id:"civility",unit:"mainInfo",label:this.translate.instant("lang.contactsParameters_civility"),type:"select",control:new X.i,required:!1,display:!1,filling:!1,values:[]},{id:"firstname",unit:"mainInfo",label:this.translate.instant("lang.contactsParameters_firstname"),type:"string",control:new X.i,required:!1,display:!1,filling:!1,values:[]},{id:"lastname",unit:"mainInfo",label:this.translate.instant("lang.contactsParameters_lastname"),type:"string",control:new X.i,required:!1,display:!1,filling:!1,values:[]},{id:"function",unit:"mainInfo",label:this.translate.instant("lang.contactsParameters_function"),type:"string",control:new X.i,required:!1,display:!1,filling:!1,values:[]},{id:"department",unit:"mainInfo",label:this.translate.instant("lang.contactsParameters_department"),type:"string",control:new X.i,required:!1,display:!1,filling:!1,values:[]},{id:"email",unit:"mainInfo",label:this.translate.instant("lang.email"),type:"string",control:new X.i,required:!1,display:!0,filling:!1,values:[]},{id:"phone",unit:"mainInfo",label:this.translate.instant("lang.phoneNumber"),type:"string",control:new X.i,required:!1,display:!0,filling:!1,values:[]},{id:"notes",unit:"mainInfo",label:this.translate.instant("lang.note"),type:"string",control:new X.i,required:!1,display:!1,filling:!1,values:[]},{id:"addressAdditional1",unit:"address",label:this.translate.instant("lang.contactsParameters_addressAdditional1"),type:"string",control:new X.i,required:!1,display:!1,filling:!1,values:[]},{id:"addressNumber",unit:"address",label:this.translate.instant("lang.contactsParameters_addressNumber"),type:"string",control:new X.i,required:!1,display:!1,filling:!1,values:[]},{id:"addressStreet",unit:"address",label:this.translate.instant("lang.contactsParameters_addressStreet"),type:"string",control:new X.i,required:!1,display:!1,filling:!1,values:[]},{id:"addressAdditional2",unit:"address",label:this.translate.instant("lang.contactsParameters_addressAdditional2"),type:"string",control:new X.i,required:!1,display:!1,filling:!1,values:[]},{id:"addressPostcode",unit:"address",label:this.translate.instant("lang.contactsParameters_addressPostcode"),type:"string",control:new X.i,required:!1,display:!1,filling:!1,values:[]},{id:"addressTown",unit:"address",label:this.translate.instant("lang.contactsParameters_addressTown"),type:"string",control:new X.i,required:!1,display:!1,filling:!1,values:[]},{id:"addressCountry",unit:"address",label:this.translate.instant("lang.contactsParameters_addressCountry"),type:"string",control:new X.i,required:!1,display:!1,filling:!1,values:[]},{id:"communicationMeans",unit:"maarch2maarch",label:this.translate.instant("lang.communicationMean"),desc:`${this.translate.instant("lang.communicationMeanDesc")} (${this.translate.instant("lang.see")} <a href="${this.maarch2maarchUrl}" target="_blank">MAARCH2MAARCH</a>)`,type:"string",control:new X.i,required:!1,display:!1,filling:!1,values:[]},{id:"externalId_m2m",unit:"maarch2maarch",label:this.translate.instant("lang.IdMaarch2Maarch"),desc:`${this.translate.instant("lang.m2mContactInfo")} (${this.translate.instant("lang.see")} <a href="${this.maarch2maarchUrl}" target="_blank">MAARCH2MAARCH</a>)`,type:"string",control:new X.i,required:!1,display:!1,filling:!1,values:[]}],this.addressBANInfo="",this.addressBANMode=!0,this.addressBANControl=new X.i,this.addressBANLoading=!1,this.addressBANResult=[],this.addressBANCurrentDepartment="75",this.departmentList=[],this.fillingParameters=null,this.fillingRate={class:"warn",color:this.contactService.getFillingColor("first"),value:0},this.companyFound=null,this.communicationMeanInfo="",this.communicationMeanResult=[],this.communicationMeanLoading=!1,this.externalId_m2mInfo="",this.externalId_m2mResult=[],this.externalId_m2mLoading=!1,this.annuaryM2MId=null,this.annuaryEnabled=!1}ngOnInit(){this.loading=!0,this.initBanSearch(),null===this.contactId?(this.creationMode=!0,this.http.get("../rest/contactsParameters").pipe(Object(mt.a)(t=>{this.fillingParameters=t.contactsFilling,this.initElemForm(t),this.annuaryEnabled=t.annuaryEnabled}),p(()=>this.http.get("../rest/civilities")),Object(mt.a)(t=>{this.initCivilities(t.civilities)}),p(()=>this.http.get("../rest/contactsCustomFields")),Object(mt.a)(t=>{this.initCustomElementForm(t),this.initAutocompleteAddressBan(),this.initAutocompleteCommunicationMeans(),this.initAutocompleteExternalIdM2M(),this.getCountries(),this.initAutocompleteCountries()}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()):(this.creationMode=!1,this.contactForm.forEach(t=>{t.display=!1}),this.http.get("../rest/contactsParameters").pipe(Object(mt.a)(t=>{this.fillingParameters=t.contactsFilling,this.initElemForm(t),this.annuaryEnabled=t.annuaryEnabled}),p(()=>this.http.get("../rest/civilities")),Object(mt.a)(t=>{this.initCivilities(t.civilities)}),p(()=>this.http.get("../rest/contactsCustomFields")),Object(mt.a)(t=>{this.initCustomElementForm(t),this.initAutocompleteAddressBan(),this.initAutocompleteCommunicationMeans(),this.initAutocompleteExternalIdM2M(),this.getCountries(),this.initAutocompleteCountries()}),p(()=>this.http.get("../rest/contacts/"+this.contactId)),Object(l.a)(t=>(t.fillingRate=this.contactService.formatFillingObject(t.fillingRate),t)),Object(mt.a)(t=>{this.setContactData(t),this.setContactDataExternal(t)}),Object(d.a)(t=>null!==t.customFields),Object(mt.a)(t=>{this.setContactCustomData(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe())}initElemForm(t){let e=[];t.contactsParameters.forEach(t=>{let i=this.contactForm.filter(e=>e.id===t.identifier)[0];if(e=[],void 0===i&&void 0!==t.identifier.split("_")[1]){let e={};e={id:"customField_"+t.identifier.split("_")[1],unit:"complement",label:null,type:null,control:new X.i,required:!1,display:!1,values:[]},this.contactForm.push(e),i=this.contactForm.filter(t=>t.id===e.id)[0]}void 0!==i&&((t.filling&&this.fillingParameters.enable&&this.creationMode||t.mandatory)&&(i.display=!0),t.filling&&this.fillingParameters.enable&&(i.filling=!0),"email"===t.identifier?e.push(X.I.email):"phone"===t.identifier&&e.push(X.I.pattern(/^\+?((|\ |\.|\(|\)|\-)?(\d)*)*\d$/)),t.mandatory&&(i.required=!0,e.push(X.I.required)),i.control.setValidators(e))})}initCivilities(t){const e=[];Object.keys(t).forEach(i=>{e.push({id:i,label:t[i].label})}),this.contactForm.filter(t=>"civility"===t.id)[0].values=e}getCountries(){this.http.get("../rest/registeredMail/countries").pipe(Object(mt.a)(t=>{this.countries=t.countries.map(t=>this.latinisePipe.transform(t.toUpperCase()))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}initAutocompleteCountries(){this.contactForm.map(t=>{"addressCountry"===t.id&&(this.countriesFilteredResult=t.control.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>this._filter(t))))})}_filter(t){const e=t.toLowerCase();return this.countries.filter(t=>t.toLowerCase().includes(e))}selectCountry(t){const e=this.contactForm.map(t=>t.id).indexOf("addressCountry");this.contactForm[e].control.setValue(t.option.value)}initCustomElementForm(t){let e=[],i={};t.customFields.forEach(t=>{e=[],i=this.contactForm.filter(e=>e.id==="customField_"+t.id)[0],void 0!==i&&(i.label=t.label,i.type=t.type,i.values=t.values.map(t=>({id:t,label:t})),"integer"===t.type&&(e.push(X.I.pattern(/^[+-]?([0-9]+([.][0-9]*)?|[.][0-9]+)$/)),i.control.setValidators(e)))})}setContactData(t){let e=-1;Object.keys(t).forEach(i=>{e=this.contactForm.map(t=>t.id).indexOf(i),!this.isEmptyValue(t[i])&&e>-1&&(this.contactForm[e].control.setValue("civility"===i?t[i].id:t[i]),"company"===i&&this.isEmptyValue(this.contactForm.filter(t=>"lastname"===t.id)[0].control.value)?this.contactForm.filter(t=>"lastname"===t.id)[0].display=!1:"lastname"===i&&this.isEmptyValue(this.contactForm.filter(t=>"company"===t.id)[0].control.value)&&(this.contactForm.filter(t=>"company"===t.id)[0].display=!1),this.contactForm[e].display=!0)}),this.isEmptyValue(this.contactForm.filter(t=>"company"===t.id)[0].control.value)&&!this.isEmptyValue(this.contactForm.filter(t=>"lastname"===t.id)[0].control.value)&&(this.contactForm.filter(t=>"company"===t.id)[0].display=!1),this.checkFilling()}setContactDataExternal(t){void 0!==t.externalId&&Object.keys(t.externalId).forEach(e=>{this.isEmptyValue(t.externalId[e])||("m2m"===e?(this.contactForm.filter(t=>"externalId_m2m"===t.id)[0].control.setValue(t.externalId[e]),this.contactForm.filter(t=>"externalId_m2m"===t.id)[0].display=!0):this.contactForm.push("m2m_annuary_id"===e?{id:"externalId_"+e,unit:"maarch2maarch",label:e,type:"string",control:new X.i({value:t.externalId[e],disabled:!0}),required:!1,display:!0,filling:!1,values:[]}:{id:"externalId_"+e,unit:"complement",label:e,type:"string",control:new X.i({value:t.externalId[e],disabled:!0}),required:!1,display:!0,filling:!1,values:[]}))})}setContactCustomData(t){let e=-1;Object.keys(t.customFields).forEach(i=>{if(e=this.contactForm.map(t=>t.id).indexOf("customField_"+i),!this.isEmptyValue(t.customFields[i])&&e>-1){if("date"===this.contactForm[e].type){const e=new Date(this.functions.formatFrenchDateToTechnicalDate(t.customFields[i]));t.customFields[i]=e}this.contactForm[e].control.setValue(t.customFields[i]),this.contactForm[e].display=!0}}),this.checkFilling()}initBanSearch(){this.http.get("../rest/ban/availableDepartments").pipe(Object(mt.a)(t=>{null!==t.default&&-1!==t.departments.indexOf(t.default.toString())&&(this.addressBANCurrentDepartment=t.default),this.departmentList=t.departments}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}isValidForm(){let t=!0;return this.contactForm.filter(t=>t.display).forEach(e=>{"DISABLED"!==e.control.status&&"VALID"!==e.control.status&&(t=!1),e.control.markAsTouched()}),t}onSubmit(){this.checkFilling(),this.addressBANMode&&this.emptyAddress()&&!this.noAddressRequired()?this.notify.error(this.translate.instant("lang.chooseBAN")):this.isValidForm()?null!==this.contactId?this.updateContact():this.createContact():this.notify.error(this.translate.instant("lang.mustFixErrors"))}createContact(){this.http.post("../rest/contacts",this.formatContact()).pipe(Object(mt.a)(t=>{this.onSubmitEvent.emit(t.id),this.notify.success(this.translate.instant("lang.contactAdded")),this.functions.empty(t.warning)||this.notify.error(t.warning)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}updateContact(){this.http.put("../rest/contacts/"+this.contactId,this.formatContact()).pipe(Object(mt.a)(t=>{this.onSubmitEvent.emit(this.contactId),this.notify.success(this.translate.instant("lang.contactUpdated")),this.functions.empty(t)||this.functions.empty(t.warning)||this.notify.error(t.warning)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}formatContact(){const t={customFields:{},externalId:{}},e=/customField_[.]*/g,i=/externalId_[.]*/g;return this.contactForm.filter(t=>t.display).forEach(n=>{if("date"===n.type&&!this.functions.empty(n.control.value)){const t=new Date(n.control.value);n.control.value=this.functions.formatDateObjectToDateString(t)}null!==n.id.match(e)?t.customFields[n.id.split(/_(.+)/)[1]]=n.control.value:null!==n.id.match(i)?t.externalId[n.id.split(/_(.+)/)[1]]=n.control.value:t[n.id]=n.control.value}),t}isEmptyUnit(t){return 0===this.contactForm.filter(e=>e.display&&e.unit===t).length}initForm(){this.contactForm.forEach(t=>{t.control=new X.i({value:"",disabled:!1})})}toogleAllFieldsUnit(t){this.contactForm.filter(e=>e.unit===t).forEach(t=>{t.display=!0})}noField(t){return 0===this.contactForm.filter(e=>!e.display&&e.unit===t).length}isEmptyValue(t){return null==t||(Array.isArray(t)?!(t.length>0):""===String(t))}checkCompany(t){"company"!==t.id||""===t.control.value||null!==this.companyFound&&this.companyFound.company===t.control.value?"company"===t.id&&""===t.control.value&&(this.companyFound=null):this.http.get("../rest/autocomplete/contacts/company?search="+t.control.value).pipe(Object(mt.a)(()=>this.companyFound=null),Object(d.a)(t=>t.length>0),Object(mt.a)(t=>{this.functions.empty(t[0].addressNumber)&&this.functions.empty(t[0].addressStreet)&&this.functions.empty(t[0].addressPostcode)&&this.functions.empty(t[0].addressTown)&&this.functions.empty(t[0].addressCountry)||(this.companyFound=t[0])}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}setAddress(t,e=!0){this.companyFound=null;let i=-1;Object.keys(t).forEach(e=>{i=this.contactForm.map(t=>t.id).indexOf(e),!this.isEmptyValue(t[e])&&i>-1&&["company","addressNumber","addressStreet","addressAdditional2","addressPostcode","addressTown","addressCountry"].indexOf(e)>-1&&(this.contactForm[i].control.setValue(t[e]),this.contactForm[i].display=!0)}),this.checkFilling(),this.addressBANMode=!e}canDelete(t){if("company"===t.id){const e=this.contactForm.filter(t=>"lastname"===t.id)[0];if(e.display&&!this.isEmptyValue(e.control.value))return t.control.setValidators([]),t.required=!1,!0;{const e=[];return e.push(X.I.required),t.control.setValidators(e),t.required=!0,!1}}if("lastname"===t.id){const e=this.contactForm.filter(t=>"company"===t.id)[0];if(e.display&&!this.isEmptyValue(e.control.value))return t.control.setValidators([]),t.required=!1,!0;{const e=[];return e.push(X.I.required),t.control.setValidators(e),t.required=!0,!1}}return!t.required&&!t.control.disabled}removeField(t){if(t.display=!t.display,t.control.reset(),("externalId_m2m"===t.id||"communicationMeans"===t.id)&&!t.display){const t=this.contactForm.map(t=>t.id).indexOf("externalId_m2m_annuary_id");t>-1&&this.contactForm.splice(t,1)}this.checkFilling()}initAutocompleteCommunicationMeans(){this.communicationMeanInfo=this.translate.instant("lang.autocompleteInfo"),this.communicationMeanResult=[];const t=this.contactForm.map(t=>t.id).indexOf("communicationMeans");this.contactForm[t].control.valueChanges.pipe(Object(pt.a)(300),Object(d.a)(t=>t.length>2),Object(bt.a)(),Object(mt.a)(()=>this.communicationMeanLoading=!0),Object(ft.a)(t=>this.http.get("../rest/autocomplete/ouM2MAnnuary",{params:{company:t}})),Object(mt.a)(t=>{this.communicationMeanInfo=this.isEmptyValue(t)?this.translate.instant("lang.noAvailableValue"):"",this.communicationMeanResult=t,this.communicationMeanFilteredResult=Object(c.a)(this.communicationMeanResult),this.communicationMeanLoading=!1}),Object(m.a)(t=>(this.communicationMeanInfo=t.error.errors,this.communicationMeanLoading=!1,Object(c.a)(!1)))).subscribe()}selectCommunicationMean(t){const e=this.contactForm.map(t=>t.id).indexOf("communicationMeans");this.contactForm[e].control.setValue(t.option.value.communicationValue);const i=this.contactForm.map(t=>t.id).indexOf("externalId_m2m");this.contactForm[i].control.setValue(t.option.value.businessIdValue+"/"),this.contactForm[i].display=!0;const n=this.contactForm.map(t=>t.id).indexOf("department");this.contactForm[n].display=!0}initAutocompleteExternalIdM2M(){this.externalId_m2mInfo=this.translate.instant("lang.autocompleteInfo"),this.externalId_m2mResult=[];const t=this.contactForm.map(t=>t.id).indexOf("communicationMeans"),e=this.contactForm.map(t=>t.id).indexOf("externalId_m2m");this.contactForm[e].control.valueChanges.pipe(Object(pt.a)(300),Object(bt.a)(),Object(mt.a)(()=>this.externalId_m2mLoading=!0),Object(ft.a)(e=>this.http.get("../rest/autocomplete/businessIdM2MAnnuary",{params:{query:e,communicationValue:this.contactForm[t].control.value}})),Object(mt.a)(t=>{this.externalId_m2mInfo=this.isEmptyValue(t)?this.translate.instant("lang.noAvailableValue"):"",this.externalId_m2mResult=t,this.externalId_m2mFilteredResult=Object(c.a)(this.externalId_m2mResult),this.externalId_m2mLoading=!1}),Object(m.a)(t=>(this.externalId_m2mInfo=t.error.errors,this.externalId_m2mLoading=!1,Object(c.a)(!1)))).subscribe()}selectExternalIdM2M(t){const e=this.contactForm.map(t=>t.id).indexOf("externalId_m2m");this.contactForm[e].control.setValue(t.option.value.businessIdValue);const i=this.contactForm.map(t=>t.id).indexOf("externalId_m2m_annuary_id");this.contactForm[i].control.setValue(t.option.value.entryuuid)}resetAutocompleteExternalIdM2M(){let t=-1;t=this.contactForm.map(t=>t.id).indexOf("externalId_m2m_annuary_id"),t>-1?this.contactForm[t].control.setValue(""):this.contactForm.push({id:"externalId_m2m_annuary_id",unit:"maarch2maarch",label:"m2m_annuary_id",type:"string",control:new X.i({value:"",disabled:!0}),required:!1,display:!0,filling:!1,values:[]})}resetM2MFields(){let t=-1;t=this.contactForm.map(t=>t.id).indexOf("externalId_m2m"),this.contactForm[t].control.setValue(""),this.resetAutocompleteExternalIdM2M()}initAutocompleteAddressBan(){this.addressBANInfo=this.translate.instant("lang.autocompleteInfo"),this.addressBANResult=[],this.addressBANControl.valueChanges.pipe(Object(pt.a)(300),Object(d.a)(t=>t.length>2),Object(bt.a)(),Object(mt.a)(()=>this.addressBANLoading=!0),Object(ft.a)(t=>this.http.get("../rest/autocomplete/banAddresses",{params:{address:t,department:this.addressBANCurrentDepartment}})),Object(mt.a)(t=>{this.addressBANInfo=0===t.length?this.translate.instant("lang.noAvailableValue"):"",this.addressBANResult=t,this.addressBANFilteredResult=Object(c.a)(this.addressBANResult),this.addressBANLoading=!1})).subscribe()}resetAutocompleteAddressBan(){this.addressBANResult=[],this.addressBANInfo=this.translate.instant("lang.autocompleteInfo")}selectAddressBan(t){this.setAddress({addressNumber:t.option.value.number,addressStreet:t.option.value.afnorName,addressPostcode:t.option.value.postalCode,addressTown:t.option.value.city,addressCountry:"FRANCE"},!1),this.addressBANControl.setValue("")}getValue(t){return this.contactForm.filter(e=>e.id===t)[0].control.value}emptyAddress(){return 5===this.contactForm.filter(t=>this.isEmptyValue(t.control.value)&&["addressNumber","addressStreet","addressPostcode","addressTown","addressCountry"].indexOf(t.id)>-1).length}noAddressRequired(){return 5===this.contactForm.filter(t=>!t.required&&["addressNumber","addressStreet","addressPostcode","addressTown","addressCountry"].indexOf(t.id)>-1).length}goTo(){const t=this.contactForm.filter(t=>"addressNumber"===t.id)[0].control.value,e=this.contactForm.filter(t=>"addressStreet"===t.id)[0].control.value,i=this.contactForm.filter(t=>"addressPostcode"===t.id)[0].control.value,n=this.contactForm.filter(t=>"addressTown"===t.id)[0].control.value,a=this.contactForm.filter(t=>"addressCountry"===t.id)[0].control.value;window.open(`https://www.google.com/maps/search/${t}+${e},+${i}+${n},+${a}`,"_blank")}switchAddressMode(){const t=[];this.addressBANMode?(t.push(X.I.required),this.contactForm.filter(t=>["addressNumber","addressStreet","addressPostcode","addressTown","addressCountry"].indexOf(t.id)>-1).forEach(e=>{e.mandatory&&e.control.setValidators(t)}),this.addressBANMode=!this.addressBANMode):(this.contactForm.filter(t=>["addressNumber","addressStreet","addressPostcode","addressTown","addressCountry"].indexOf(t.id)>-1).forEach(e=>{e.mandatory&&e.control.setValidators(t)}),this.addressBANMode=!this.addressBANMode)}getErrorMsg(t){if(!this.isEmptyValue(t))return void 0!==t.required?this.translate.instant("lang.requiredField"):void 0!==t.pattern||void 0!==t.email?this.translate.instant("lang.badFormat"):"unknow validator"}checkFilling(){const t=this.contactForm.filter(t=>t.filling).length,e=this.contactForm.filter(t=>!this.isEmptyValue(t.control.value)&&t.filling).length;this.fillingRate.value=Math.round(100*e/t),this.fillingRate.value<=this.fillingParameters.first_threshold?(this.fillingRate.color=this.contactService.getFillingColor("first"),this.fillingRate.class="warn"):this.fillingRate.value<=this.fillingParameters.second_threshold?(this.fillingRate.color=this.contactService.getFillingColor("second"),this.fillingRate.class="primary"):(this.fillingRate.color=this.contactService.getFillingColor("third"),this.fillingRate.class="accent")}toUpperCase(t,e){setTimeout(()=>{const e=t.control.value;if(["lastname"].indexOf(t.id)>-1)t.control.setValue(e.toUpperCase());else if(["firstname"].indexOf(t.id)>-1){let i=e.toLowerCase().split(" ");for(let t=0;t<i.length;t++)i[t]=i[t].charAt(0).toUpperCase()+i[t].substring(1);i=i.join(" "),i=i.split("-");for(let t=0;t<i.length;t++)i[t]=i[t].charAt(0).toUpperCase()+i[t].substring(1);t.control.setValue(i.join("-"))}},100)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(q.b),n.Qb(lc),n.Qb(_t.a),n.Qb(Tt.c))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-contact-form"]],viewQuery:function(t,e){var i;1&t&&n.Kc(uc,!0),2&t&&n.yc(i=n.ec())&&(e.sidenavRight=i.first)},inputs:{creationMode:"creationMode",contactId:"contactId"},outputs:{onSubmitEvent:"onSubmitEvent"},features:[n.Cb([lc])],decls:3,vars:2,consts:[["class","loading",4,"ngIf","ngIfElse"],["elseTemplate",""],[1,"loading"],[2,"margin","auto"],["menu","matMenu"],["mat-menu-item","",3,"matMenuTriggerFor","disabled"],["mainInfo","matMenu"],["mat-menu-item","",2,"text-align","center",3,"click"],[4,"ngFor","ngForOf"],["address","matMenu"],["complement","matMenu"],["maarch2maarch","matMenu"],["style","padding: 10px;",4,"ngIf"],["class","alert-message alert-message-info","role","alert",4,"ngIf"],[1,"row",2,"margin","0px"],[2,"text-align","center","padding-top","10px"],["mat-raised-button","","color","default","type","button",3,"matMenuTriggerFor"],["mat-raised-button","","color","primary","type","button",3,"click"],["mat-menu-item","",3,"click",4,"ngIf"],["mat-menu-item","",3,"click"],["style","height: auto;padding-right: 10px;","class","fas fa-circle rate",3,"title","color",4,"ngIf"],[1,"fas","fa-circle","rate",2,"height","auto","padding-right","10px",3,"title"],[2,"padding","10px"],[1,"rate"],["mode","determinate",1,"fillingBar",3,"color","value"],["role","alert",1,"alert-message","alert-message-info"],[2,"cursor","pointer","font-weight","bold","font-style","italic",3,"click"],[2,"font-weight","bold","width","100%","display","block","text-align","center"],[3,"col-sm-12","col-md-6","col-md-12",4,"ngIf"],["mat-subheader","",1,"unitTitle"],[2,"flex","1"],["style","cursor: pointer;",3,"click",4,"ngIf"],[2,"cursor","pointer",3,"click"],["class","contact-item",4,"ngIf"],[4,"ngIf"],[1,"contact-item"],["mat-line","","class","contact-content",4,"ngIf"],["mat-icon-button","","matSuffix","","color","warn",3,"disabled","click",4,"ngIf"],["mat-line","",1,"contact-content"],["matInput","",3,"formControl","placeholder","required","blur","ngModelChange"],["align","end",3,"innerHTML",4,"ngIf"],["style","height: auto;","matSuffix","","class","fas fa-circle rate",3,"title","color",4,"ngIf"],["align","end",3,"innerHTML"],["matSuffix","",1,"fas","fa-circle","rate",2,"height","auto",3,"title"],["type","text","matInput","","min","0","step","0.1",3,"formControl","placeholder","required"],[3,"label","required","showLabel","formControlSelect","placeholderLabel","hideErrorDesc","datas","suffixIcon"],["matInput","","readonly","",2,"cursor","pointer",3,"formControl","matDatepicker","placeholder"],["matSuffix","",3,"for",4,"ngIf"],[3,"touchUi"],["picker",""],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click",4,"ngIf"],["matSuffix","",3,"for"],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click"],["color","warn",1,"fa","fa-calendar-times"],[1,"labelCustom"],["color","primary",1,"radio-form",3,"formControl"],[3,"value",4,"ngFor","ngForOf"],["style","position:absolute;height: auto;padding-right: 10px;right: 0px;z-index: 1;top: 50%;transform: translateY(-50%);","class","fas fa-circle rate",3,"title","color",4,"ngIf"],[3,"value"],[1,"fas","fa-circle","rate",2,"position","absolute","height","auto","padding-right","10px","right","0px","z-index","1","top","50%","transform","translateY(-50%)",3,"title"],[1,"checkbox-form",3,"formControl"],["shoes",""],["color","primary","checkboxPosition","before",3,"value",4,"ngFor","ngForOf"],["color","primary","checkboxPosition","before",3,"value"],["type","text","matInput","",3,"placeholder","formControl","matAutocomplete","click","keyup"],["autoCompleteInputCommunicationMean",""],[3,"optionSelected"],["auto","matAutocomplete"],["class","autoCompleteInfoResult smallInputInfo","disabled","",3,"innerHTML",4,"ngIf"],["disabled","",4,"ngIf"],["disabled","",1,"autoCompleteInfoResult","smallInputInfo",3,"innerHTML"],["disabled",""],["diameter","20"],["type","text","matInput","",3,"placeholder","formControl"],["autoCompleteInputExternalIdM2M",""],["matInput","",3,"formControl","placeholder","matAutocomplete"],["autoCompleteInput",""],["isOpen","true",3,"optionSelected"],["matAutocompleteCountries","matAutocomplete"],["mat-icon-button","","matSuffix","","color","warn",3,"disabled","click"],[1,"fa","fa-trash"],["matInput","",3,"formControl","placeholder","required"],["appearance","outline",1,"smallInput"],["mat-button","","matSuffix","",3,"matMenuTriggerFor","title","click"],[1,"fa","fa-chevron-down"],["menuDep","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["color","primary","matPrefix","",1,"fa","fa-search",2,"font-size","15px"],["type","text","matInput","","maxlength","128",3,"placeholder","formControl","matAutocomplete","click","focus"],["style","margin:10px;",4,"ngIf"],[2,"margin","10px"],[1,"contact-address",3,"title","click"],["mat-list-icon","","color","primary",1,"contact-group","fas","fa-map-marker-alt"]],template:function(t,e){if(1&t&&(n.Oc(0,pc,2,0,"div",0),n.Oc(1,Tl,52,43,"ng-template",null,1,n.Pc)),2&t){const t=n.zc(2);n.oc("ngIf",e.loading)("ngIfElse",t)}},directives:[P.t,V.c,ne.e,ne.b,ne.d,T.a,P.s,k.b,S.a,ni.a,R.a,R.g,R.d,W.l,Y.c,J.b,X.d,X.u,X.j,X.F,Y.f,Y.b,Y.j,fr,Y.g,ae.h,ae.f,ae.j,hc.b,hc.a,R.i,R.f,Ne.d,Ne.a,W.p,Y.i,X.p,K.a,R.c],pipes:[g.d,P.b],styles:[".contact-item[_ngcontent-%COMP%]{height:auto!important}.unitTitle[_ngcontent-%COMP%]{display:flex;color:#135f7f}.contact-address[_ngcontent-%COMP%]{cursor:pointer;color:#337ab7}.contact-address[_ngcontent-%COMP%]:hover .contact-content[_ngcontent-%COMP%]{text-decoration:underline}.contact-content[_ngcontent-%COMP%]{position:relative}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-button[_ngcontent-%COMP%]{width:30px;height:25px;color:#135f7f}.smallInput[_ngcontent-%COMP%] .mat-button[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;line-height:normal;align-items:center}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.radio-form[_ngcontent-%COMP%]{display:flex}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1;max-width:250px}.checkbox-form[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr);overflow:auto;max-height:200px;border:1px solid rgba(0,0,0,.12);border-radius:5px}.loading[_ngcontent-%COMP%]{display:flex;height:100%}.fillingBar[_ngcontent-%COMP%] .mat-progress-bar-buffer{background:#e4e8eb}.rate[_ngcontent-%COMP%]{font-size:10px;text-align:right}.fillingBar.mat-warn[_ngcontent-%COMP%] .mat-progress-bar-fill:after{background-color:#e81c2b}.fillingBar.mat-primary[_ngcontent-%COMP%] .mat-progress-bar-fill:after{background-color:#f4891e}.fillingBar.mat-accent[_ngcontent-%COMP%] .mat-progress-bar-fill:after{background-color:#0aa34f}.mat-error[_ngcontent-%COMP%]{font-size:10px;text-align:right;font-weight:700}.labelCustom[_ngcontent-%COMP%]{color:rgba(0,0,0,.54);transform:scale(.75) translateX(-15%);font-weight:400}.alert-message-info[_ngcontent-%COMP%]{margin:10px auto auto;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content;padding:0;overflow:hidden}"],data:{animation:[Object(dc.n)("hideShow",[Object(dc.m)(":enter",[Object(dc.l)({height:"0px"}),Object(dc.e)("200ms",Object(dc.l)({height:"30px"}))]),Object(dc.m)(":leave",[Object(dc.l)({height:"30px"}),Object(dc.e)("200ms",Object(dc.l)({height:"0px"}))])])]}}),t})();function Fl(t,e){1&t&&(n.Ub(0),n.Wb(1,"div",2),n.Rb(2,"mat-spinner"),n.Vb(),n.Tb())}function Ll(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",17),n.dc("click",(function(){n.Dc(t);const e=n.hc(3);return e.toggleContact(e.contact)})),n.Wb(1,"span"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Rb(4,"br"),n.Wb(5,"small",18),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Vb()}if(2&t){const t=n.hc(3);n.Db(2),n.Rc(n.jc(3,3,"lang.selectDuplicatedContact")),n.Db(4),n.Tc("",t.contact.resourcesCount," ",n.jc(7,5,"lang.associatedElements"),"")}}function Ql(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",19),n.dc("click",(function(){n.Dc(t);const e=n.hc(3);return e.toggleContact(e.contact)})),n.Rb(1,"i",20),n.Qc(2),n.ic(3,"translate"),n.Vb()}2&t&&(n.Db(2),n.Sc(" ",n.jc(3,1,"lang.selectedContact"),""))}function Nl(t,e){if(1&t&&(n.Wb(0,"div",14),n.Oc(1,Ll,8,7,"button",15),n.Oc(2,Ql,4,3,"button",16),n.Vb()),2&t){const t=n.hc(2);n.Ib("selected",t.contact.selected),n.Db(1),n.oc("ngIf",!t.contact.selected),n.Db(1),n.oc("ngIf",t.contact.selected)}}function zl(t,e){1&t&&(n.Wb(0,"div",21),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.contactDisabled")))}function Bl(t,e){if(1&t&&(n.Wb(0,"sup",24),n.Qc(1),n.Vb()),2&t){const t=n.hc(3);n.Ib("newData",t.isNewValue("civility")),n.Db(1),n.Sc("",t.contact.civility.abbreviation,"\xa0")}}function Ul(t,e){if(1&t&&(n.Wb(0,"mat-card-title",22),n.Oc(1,Bl,2,3,"sup",23),n.Qc(2),n.Vb()),2&t){const t=n.hc(2);n.oc("title",t.contact.civility.label+" "+t.contact.firstname+" "+t.contact.lastname),n.Db(1),n.oc("ngIf",!t.functionsService.empty(t.contact.civility)),n.Db(1),n.Tc("",t.contact.firstname," ",t.contact.lastname," ")}}function $l(t,e){if(1&t&&(n.Wb(0,"mat-card-title",22),n.Qc(1),n.Vb()),2&t){const t=n.hc(2);n.Ib("newData",t.isNewValue("company")),n.oc("title",t.contact.company),n.Db(1),n.Sc(" ",t.contact.company,"")}}function Hl(t,e){if(1&t&&(n.Wb(0,"mat-card-subtitle",22),n.Qc(1),n.Vb()),2&t){const t=n.hc(2);n.Ib("newData",t.isNewValue("function")),n.oc("title",t.contact.function),n.Db(1),n.Sc(" ",t.contact.function,"\xa0 ")}}function Gl(t,e){if(1&t&&(n.Rb(0,"i",25),n.ic(1,"translate")),2&t){const t=n.hc(2);n.Lc("color",t.contact.fillingRate.color),n.oc("title",n.jc(1,3,"lang.contactsFillingRate"))}}function Xl(t,e){if(1&t&&(n.Wb(0,"mat-list-item",26),n.Rb(1,"mat-icon",27),n.ic(2,"translate"),n.Wb(3,"p",28),n.Qc(4),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("title",n.jc(2,4,"lang.contactsParameters_company")),n.Db(2),n.Ib("newData",t.isNewValue("company")),n.Db(1),n.Sc(" ",t.contact.company," ")}}function ql(t,e){if(1&t&&(n.Wb(0,"mat-list-item",26),n.Rb(1,"mat-icon",29),n.ic(2,"translate"),n.Wb(3,"p",28),n.Qc(4),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("title",n.jc(2,4,"lang.contactsParameters_department")),n.Db(2),n.Ib("newData",t.isNewValue("department")),n.Db(1),n.Sc(" ",t.contact.department," ")}}function Kl(t,e){if(1&t&&(n.Wb(0,"mat-list-item",26),n.Rb(1,"mat-icon",30),n.ic(2,"translate"),n.Wb(3,"a",31),n.Qc(4),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("title",n.jc(2,5,"lang.email")),n.Db(2),n.Ib("newData",t.isNewValue("email")),n.qc("href","mailto:",t.contact.email,"",n.Gc),n.Db(1),n.Sc(" ",t.contact.email," ")}}function Yl(t,e){if(1&t&&(n.Wb(0,"mat-list-item",26),n.Rb(1,"mat-icon",32),n.ic(2,"translate"),n.Wb(3,"p",28),n.Qc(4),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("title",n.jc(2,4,"lang.phoneNumber")),n.Db(2),n.Ib("newData",t.isNewValue("phone")),n.Db(1),n.Sc(" ",t.contact.phone," ")}}function Jl(t,e){if(1&t&&(n.Wb(0,"p",28),n.Qc(1),n.Vb()),2&t){const t=n.hc(3);n.Ib("newData",t.isNewValue("addressAdditional1")),n.Db(1),n.Sc(" ",t.contact.addressAdditional1,"")}}function Zl(t,e){if(1&t&&(n.Wb(0,"p",28),n.Wb(1,"span"),n.Qc(2),n.Vb(),n.Qc(3,"\xa0"),n.Wb(4,"span"),n.Qc(5),n.Vb(),n.Vb()),2&t){const t=n.hc(3);n.Db(1),n.Ib("newData",t.isNewValue("addressNumber")),n.Db(1),n.Rc(t.contact.addressNumber),n.Db(2),n.Ib("newData",t.isNewValue("addressStreet")),n.Db(1),n.Rc(t.contact.addressStreet)}}function td(t,e){if(1&t&&(n.Wb(0,"p",28),n.Qc(1),n.Vb()),2&t){const t=n.hc(3);n.Ib("newData",t.isNewValue("addressAdditional2")),n.Db(1),n.Sc("",t.contact.addressAdditional2," ")}}function ed(t,e){if(1&t&&(n.Wb(0,"p",28),n.Qc(1),n.Vb()),2&t){const t=n.hc(3);n.Db(1),n.Tc(" ",t.contact.addressPostcode," ",t.contact.addressTown," ")}}function id(t,e){if(1&t&&(n.Wb(0,"p",28),n.Qc(1),n.Vb()),2&t){const t=n.hc(3);n.Ib("newData",t.isNewValue("addressCountry")),n.Db(1),n.Sc(" ",t.contact.addressCountry," ")}}function nd(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item",33),n.dc("click",(function(){n.Dc(t);const e=n.hc(2);return e.goTo(e.contact)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",34),n.Oc(3,Jl,2,3,"p",35),n.Oc(4,Zl,6,6,"p",36),n.Oc(5,td,2,3,"p",35),n.Oc(6,ed,2,2,"p",36),n.Oc(7,id,2,3,"p",35),n.Vb()}if(2&t){const t=n.hc(2);n.oc("title",n.jc(1,6,"lang.address")),n.Db(3),n.oc("ngIf",!t.functionsService.empty(t.contact.addressAdditional1)),n.Db(1),n.oc("ngIf",!t.functionsService.empty(t.contact.addressNumber)||!t.functionsService.empty(t.contact.addressStreet)),n.Db(1),n.oc("ngIf",!t.functionsService.empty(t.contact.addressAdditional2)),n.Db(1),n.oc("ngIf",!t.functionsService.empty(t.contact.addressPostcode)||!t.functionsService.empty(t.contact.addressTown)),n.Db(1),n.oc("ngIf",!t.functionsService.empty(t.contact.addressCountry))}}function ad(t,e){if(1&t&&(n.Wb(0,"mat-list-item",40),n.ic(1,"translate"),n.Rb(2,"mat-icon",41),n.Wb(3,"p",42),n.Qc(4),n.Vb(),n.Vb()),2&t){const t=n.hc(3);n.oc("title",n.jc(1,5,"lang.note")),n.Db(3),n.Ib("newData",t.isNewValue("notes")),n.oc("title",t.contact.notes),n.Db(1),n.Sc(" ",t.contact.notes," ")}}function sd(t,e){if(1&t&&(n.Wb(0,"mat-list-item",40),n.ic(1,"translate"),n.Rb(2,"mat-icon",43),n.Wb(3,"p",42),n.Qc(4),n.Vb(),n.Vb()),2&t){const t=n.hc(3);n.oc("title",n.jc(1,5,"lang.communicationMean")),n.Db(3),n.Ib("newData",t.isNewValue("communicationMeans")),n.oc("title",t.contact.communicationMeans),n.Db(1),n.Sc(" ",t.contact.communicationMeans," ")}}function od(t,e){if(1&t&&(n.Wb(0,"mat-list-item",40),n.ic(1,"translate"),n.Rb(2,"mat-icon",43),n.Wb(3,"p",42),n.Qc(4),n.Vb(),n.Vb()),2&t){const t=n.hc(3);n.oc("title",n.jc(1,3,"lang.IdMaarch2Maarch")),n.Db(3),n.oc("title",t.contact.externalId.m2m),n.Db(1),n.Sc(" ",t.contact.externalId.m2m," ")}}function rd(t,e){if(1&t&&(n.Wb(0,"mat-list-item",26),n.Rb(1,"mat-icon",44),n.Wb(2,"p",42),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc(3);n.Db(1),n.oc("title",t.value.label),n.Db(1),n.Ib("newData",e.isNewValue(t)),n.oc("title",t.value.value),n.Db(1),n.Sc(" ",t.value.value," ")}}function cd(t,e){if(1&t&&(n.Ub(0),n.Oc(1,rd,4,5,"mat-list-item",11),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",null!==t.value.value)}}function ld(t,e){if(1&t&&(n.Wb(0,"mat-expansion-panel",37),n.Wb(1,"mat-expansion-panel-header"),n.Wb(2,"mat-panel-title"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb(),n.Wb(5,"mat-list"),n.Oc(6,ad,5,7,"mat-list-item",38),n.Oc(7,sd,5,7,"mat-list-item",38),n.Oc(8,od,5,5,"mat-list-item",38),n.Oc(9,cd,2,1,"ng-container",39),n.ic(10,"keyvalue"),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.oc("expanded",t.selectable),n.Db(3),n.Sc(" ",n.jc(4,6,"lang.othersInfos")," "),n.Db(3),n.oc("ngIf",!t.functionsService.empty(t.contact.notes)),n.Db(1),n.oc("ngIf",!t.functionsService.empty(t.contact.communicationMeans)),n.Db(1),n.oc("ngIf",!t.functionsService.empty(t.contact.externalId)&&!t.functionsService.empty(t.contact.externalId.m2m)),n.Db(1),n.oc("ngForOf",n.jc(10,8,t.contact.customFields))}}function dd(t,e){if(1&t&&(n.Wb(0,"mat-card",3),n.Oc(1,Nl,3,4,"div",4),n.Oc(2,zl,3,3,"div",5),n.Wb(3,"mat-card-header"),n.Rb(4,"div",6),n.ic(5,"translate"),n.Oc(6,Ul,3,4,"mat-card-title",7),n.Oc(7,$l,2,4,"mat-card-title",8),n.Oc(8,Hl,2,4,"mat-card-subtitle",8),n.Oc(9,Gl,2,5,"i",9),n.Vb(),n.Wb(10,"mat-card-content"),n.Wb(11,"mat-list"),n.Wb(12,"h3",10),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Oc(15,Xl,5,6,"mat-list-item",11),n.Oc(16,ql,5,6,"mat-list-item",11),n.Oc(17,Kl,5,7,"mat-list-item",11),n.Oc(18,Yl,5,6,"mat-list-item",11),n.Oc(19,nd,8,8,"mat-list-item",12),n.Vb(),n.Oc(20,ld,11,10,"mat-expansion-panel",13),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.selectable),n.Db(1),n.oc("ngIf",!t.contact.enabled),n.Db(2),n.Ib("fa-address-card","contact"===t.contact.type)("fa-users","contactGroup"===t.contact.type)("fa-sitemap","entity"===t.contact.type)("fa-user","user"===t.contact.type),n.oc("title",n.jc(5,22,"lang.contact_"+t.contact.type)),n.Db(2),n.oc("ngIf",!t.functionsService.empty(t.contact.firstname)||!t.functionsService.empty(t.contact.lastname)),n.Db(1),n.oc("ngIf",t.functionsService.empty(t.contact.firstname)&&t.functionsService.empty(t.contact.lastname)),n.Db(1),n.oc("ngIf",!t.functionsService.empty(t.contact.function)),n.Db(1),n.oc("ngIf","contact"===t.contact.type&&!t.functionsService.empty(t.contact.fillingRate.color)),n.Db(4),n.Rc(n.jc(14,24,"lang.contactDetails")),n.Db(2),n.oc("ngIf",!(t.functionsService.empty(t.contact.firstname)&&t.functionsService.empty(t.contact.lastname)||t.functionsService.empty(t.contact.company))),n.Db(1),n.oc("ngIf",!t.functionsService.empty(t.contact.department)),n.Db(1),n.oc("ngIf",!t.functionsService.empty(t.contact.email)),n.Db(1),n.oc("ngIf",!t.functionsService.empty(t.contact.phone)),n.Db(1),n.oc("ngIf",!(t.functionsService.empty(t.contact.addressNumber)&&t.functionsService.empty(t.contact.addressStreet)&&t.functionsService.empty(t.contact.addressAdditional2)&&t.functionsService.empty(t.contact.addressPostcode)&&t.functionsService.empty(t.contact.addressTown)&&t.functionsService.empty(t.contact.addressCountry))),n.Db(1),n.oc("ngIf",!t.emptyOtherInfo(t.contact))}}let hd=(()=>{class t{constructor(t,e,i,a,s){this.translate=t,this.http=e,this.notify=i,this.contactService=a,this.functionsService=s,this.contact={},this.selectable=!1,this.afterSelectedEvent=new n.o,this.afterDeselectedEvent=new n.o,this.loading=!0,this.contactClone={},this.customFields=[]}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){yield this.getCustomFields(),2===Object.keys(this.contact).length?this.loadContact(this.contact.id,this.contact.type):Object.keys(this.contact).length>2&&(this.contactClone=JSON.parse(JSON.stringify(this.contact)),this.loading=!1)}))}getCustomFields(){return new Promise((t,e)=>{this.http.get("../rest/contactsCustomFields").pipe(Object(mt.a)(e=>{this.customFields=e.customFields.map(t=>({id:t.id,label:t.label})),t(!0)})).subscribe()})}loadContact(t,e){"contact"===e?this.http.get("../rest/contacts/"+t+(this.selectable?"?resourcesCount=true":"")).pipe(Object(mt.a)(t=>{this.contact=Object.assign(Object.assign({},t),{civility:this.contactService.formatCivilityObject(t.civility),fillingRate:this.contactService.formatFillingObject(t.fillingRate),customFields:this.functionsService.empty(t.customFields)?[]:this.formatCustomField(t.customFields),type:"contact"}),this.contactClone=JSON.parse(JSON.stringify(this.contact))}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe():"user"===e?this.http.get("../rest/users/"+t).pipe(Object(mt.a)(t=>{this.contact={type:"user",civility:this.contactService.formatCivilityObject(null),fillingRate:this.contactService.formatFillingObject(null),customFields:[],firstname:t.firstname,lastname:t.lastname,email:t.mail,department:t.department,phone:t.phone,enabled:t.enabled},this.contactClone=JSON.parse(JSON.stringify(this.contact))}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe():"entity"===e&&this.http.get("../rest/entities/"+t).pipe(Object(mt.a)(t=>{this.contact={type:"entity",civility:this.contactService.formatCivilityObject(null),fillingRate:this.contactService.formatFillingObject(null),customFields:[],lastname:t.short_label,email:t.email,addressStreet:t.address,addressPostcode:t.addressPostcode,addressCountry:t.addressCountry,enabled:"Y"===t.enabled},this.contactClone=JSON.parse(JSON.stringify(this.contact))}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.error(t.error.errors),Object(c.a)(!1)))).subscribe()}formatCustomField(t){let e=[];return Object.keys(t).forEach(i=>{e.push({label:this.customFields.filter(t=>t.id==i).length>0?this.customFields.filter(t=>t.id==i)[0].label:i,value:t[i]})}),e}goTo(t){window.open(`https://www.google.com/maps/search/${t.addressNumber}+${t.addressStreet},+${t.addressPostcode}+${t.addressTown},+${t.addressCountry}`,"_blank")}emptyOtherInfo(t){return!!("contact"!==t.type||this.functionsService.empty(t.notes)&&this.functionsService.empty(t.communicationMeans)&&this.functionsService.empty(t.customFields))}toggleContact(t){t.selected=!t.selected,t.selected?this.afterSelectedEvent.emit(t):this.afterDeselectedEvent.emit(t)}getContactInfo(){return this.contact}resetContact(){this.contact=JSON.parse(JSON.stringify(this.contactClone))}setContactInfo(t,e){this.functionsService.empty(e)||("customFields"===t?this.contact[t].push(e):this.contact[t]=e)}isNewValue(t){return"object"==typeof t&&"civility"!==t?0===this.contactClone.customFields.filter(e=>e.label===t.value.label).length:"civility"===t?JSON.stringify(this.contact[t])!==JSON.stringify(this.contactClone[t]):this.contact[t]!==this.contactClone[t]}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(lc),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-contact-detail"]],inputs:{contact:"contact",selectable:"selectable"},outputs:{afterSelectedEvent:"afterSelectedEvent",afterDeselectedEvent:"afterDeselectedEvent"},features:[n.Cb([lc])],decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["elseTemplate",""],[1,"loading"],[1,"contact-card"],["class","selectable",3,"selected",4,"ngIf"],["class","disabledContact",4,"ngIf"],["mat-card-avatar","",1,"contact-header-image","fa",3,"title"],[3,"title",4,"ngIf"],[3,"newData","title",4,"ngIf"],["class","contact-filling fa fa-circle",3,"color","title",4,"ngIf"],["mat-subheader",""],["class","contact-item",4,"ngIf"],["class","contact-address",3,"title","click",4,"ngIf"],[3,"expanded",4,"ngIf"],[1,"selectable"],["style","line-height: 15px;padding: 5px;","mat-raised-button","","color","primary",3,"click",4,"ngIf"],["style","line-height: 15px;padding: 10px;","mat-raised-button","","color","primary",3,"click",4,"ngIf"],["mat-raised-button","","color","primary",2,"line-height","15px","padding","5px",3,"click"],[2,"font-size","80%"],["mat-raised-button","","color","primary",2,"line-height","15px","padding","10px",3,"click"],[1,"far","fa-check-circle"],[1,"disabledContact"],[3,"title"],["style","color: #666;",3,"newData",4,"ngIf"],[2,"color","#666"],[1,"contact-filling","fa","fa-circle",3,"title"],[1,"contact-item"],["mat-list-icon","",1,"contact-group","far","fa-building",3,"title"],["mat-line","",1,"contact-content"],["mat-list-icon","",1,"contact-group","fa","fa-sitemap",3,"title"],["mat-list-icon","",1,"contact-group","far","fa-envelope",3,"title"],["matLine","",1,"contact-content",3,"href"],["mat-list-icon","",1,"contact-group","fas","fa-phone",3,"title"],[1,"contact-address",3,"title","click"],["mat-list-icon","",1,"contact-group","fas","fa-map-marker-alt"],["mat-line","","class","contact-content",3,"newData",4,"ngIf"],["mat-line","","class","contact-content",4,"ngIf"],[3,"expanded"],["class","contact-item",3,"title",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"contact-item",3,"title"],["mat-list-icon","",1,"contact-group","far","fa-sticky-note"],["mat-line","",1,"contact-content",3,"title"],["mat-list-icon","",1,"contact-group","fas","fa-hashtag"],["mat-list-icon","",1,"contact-group","fas","fa-hashtag",3,"title"]],template:function(t,e){if(1&t&&(n.Oc(0,Fl,3,0,"ng-container",0),n.Oc(1,dd,21,26,"ng-template",null,1,n.Pc)),2&t){const t=n.zc(2);n.oc("ngIf",e.loading)("ngIfElse",t)}},directives:[P.t,V.c,K.a,K.f,K.c,K.d,R.a,R.g,k.b,K.m,K.l,R.d,S.a,R.c,W.l,gt.c,gt.g,gt.h,P.s],pipes:[g.d,P.l],styles:[".contact-list-container[_ngcontent-%COMP%]{padding:10px;display:grid;grid-template-columns:repeat(3,1fr);grid-gap:10px}.contact-list-container-1[_ngcontent-%COMP%]{grid-template-columns:1fr}.contact-list-container-2[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}.contact-card[_ngcontent-%COMP%]{padding:0;box-shadow:none;border:1px solid rgba(0,0,0,.12);height:100%}.contact-card[_ngcontent-%COMP%] .mat-expansion-panel-body{padding-left:0;padding-right:0}.mat-card-header[_ngcontent-%COMP%]{background:#f9f9f9;padding:10px 10px 5px}.mat-card-title[_ngcontent-%COMP%]{padding-right:15px}.contact-item[_ngcontent-%COMP%]{height:35px!important}.contact-header-image[_ngcontent-%COMP%]{background:#135f7f;display:flex;align-items:center;justify-content:center;font-size:18px;color:#fff}.contact-header-image[_ngcontent-%COMP%] .mat-checkbox-layout{margin:0}.contact-header-image[_ngcontent-%COMP%] [_ngcontent-%COMP%]:not( .mat-checkbox-checked) .mat-checkbox-frame{border-color:#e6dfdf!important}.contact-group[_ngcontent-%COMP%]{color:#135f7f;font-size:16px!important;display:flex;align-items:center;justify-content:center}.contact-content[_ngcontent-%COMP%]{font-size:13px!important}.contact-address[_ngcontent-%COMP%]{cursor:pointer;color:#337ab7}.contact-address[_ngcontent-%COMP%]:hover .contact-content[_ngcontent-%COMP%]{text-decoration:underline}.mat-expansion-panel[_ngcontent-%COMP%]{box-shadow:none!important}.mat-expansion-panel-header-title[_ngcontent-%COMP%]{font-size:14px;color:#666}.contact-filling[_ngcontent-%COMP%]{position:absolute;right:20px}.loading[_ngcontent-%COMP%]{display:flex;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:1;overflow:hidden;justify-content:center;align-items:center}.newData[_ngcontent-%COMP%]{color:#f99830!important}.selectable[_ngcontent-%COMP%]{z-index:1;background:rgba(0,0,0,.2);position:absolute;align-items:center;justify-content:center;display:flex;width:100%;height:100%;opacity:0;flex-direction:column;transition:opacity .2s}.contact-card[_ngcontent-%COMP%]:hover .selectable[_ngcontent-%COMP%]{opacity:1;transition:opacity .2s}.selected[_ngcontent-%COMP%]{opacity:1!important}.disabledContact[_ngcontent-%COMP%]{font-size:20px;color:red;text-align:center;opacity:.2;position:absolute;top:50%;left:50%;transform:translateX(-50%) translateY(-50%) rotate(-30deg);white-space:pre;font-weight:700}"]}),t})();const ud=["drawer"];function pd(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-contact-form",13),n.dc("onSubmitEvent",(function(e){return n.Dc(t),n.hc().dialogRef.close(e)})),n.Vb()}if(2&t){const t=n.hc();n.oc("creationMode",t.creationMode)("contactId",t.data.contactId)}}function bd(t,e){if(1&t&&n.Rb(0,"app-contact-detail",14),2&t){const t=n.hc();n.oc("contact",t.contact)}}function fd(t,e){if(1&t&&n.Rb(0,"app-document-viewer",15,16),2&t){const t=n.hc();n.oc("editMode",!1)("base64",t.headerService.getLastLoadedFile())}}function md(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",17),n.Wb(1,"button",18),n.dc("click",(function(){return n.Dc(t),n.hc().switchMode()})),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(2),n.Rc(n.jc(3,1,"lang.update")))}let gd=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.privilegeService=i,this.data=n,this.dialogRef=a,this.headerService=s,this.renderer=o,this.creationMode=!0,this.canUpdate=!1,this.contact=null,this.mode="read",this.loadedDocument=!1}ngOnInit(){null!==this.data.contactId?(this.contact={id:this.data.contactId,type:this.data.contactType},this.creationMode=!1):(this.creationMode=!0,this.mode="update","update"===this.mode&&($(".maarch-modal").css({height:"99vh"}),$(".maarch-modal").css({width:"99vw"})),null!==this.headerService.getLastLoadedFile()&&(this.drawer.toggle(),setTimeout(()=>{this.loadedDocument=!0},200))),this.canUpdate=this.privilegeService.hasCurrentUserPrivilege("update_contacts")}switchMode(){this.mode="read"===this.mode?"update":"read","update"===this.mode&&($(".maarch-modal").css({height:"99vh"}),$(".maarch-modal").css({width:"99vw"})),null!==this.headerService.getLastLoadedFile()&&(this.drawer.toggle(),setTimeout(()=>{this.loadedDocument=!0},200))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(Dt.a),n.Qb(q.a),n.Qb(q.h),n.Qb(y.a),n.Qb(n.I))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(ud,!0),2&t&&n.yc(i=n.ec())&&(e.drawer=i.first)},decls:19,vars:12,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],[2,"flex","1"],["mat-icon-button","",3,"title","click"],[1,"fa","fa-times"],[1,"modal-container"],[3,"creationMode","contactId","onSubmitEvent",4,"ngIf"],[3,"contact",4,"ngIf"],["position","end","mode","side","autoFocus","false",2,"overflow-x","hidden","width","50%"],["drawer",""],["style","height:100%;width:100%;position: relative;",3,"editMode","base64",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","","class","actions",4,"ngIf"],[3,"creationMode","contactId","onSubmitEvent"],[3,"contact"],[2,"height","100%","width","100%","position","relative",3,"editMode","base64"],["appDocumentViewer",""],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","color","primary",3,"click"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Wb(2,"span",2),n.Qc(3),n.ic(4,"translate"),n.ic(5,"translate"),n.Vb(),n.Wb(6,"button",3),n.dc("click",(function(){return e.dialogRef.close()})),n.ic(7,"translate"),n.Rb(8,"mat-icon",4),n.Vb(),n.Vb(),n.Wb(9,"mat-dialog-content",5),n.Wb(10,"mat-sidenav-container"),n.Wb(11,"mat-sidenav-content"),n.Oc(12,pd,1,2,"app-contact-form",6),n.Oc(13,bd,1,1,"app-contact-detail",7),n.Vb(),n.Wb(14,"mat-sidenav",8,9),n.Oc(16,fd,2,2,"app-document-viewer",10),n.Vb(),n.Vb(),n.Vb(),n.Rb(17,"span",11),n.Oc(18,md,4,3,"div",12),n.Vb()),2&t&&(n.Db(3),n.Sc(" ",e.creationMode?n.jc(4,6,"lang.contactCreation"):n.jc(5,8,"lang.contact")," "),n.Db(3),n.oc("title",n.jc(7,10,"lang.close")),n.Db(6),n.oc("ngIf","update"===e.mode),n.Db(1),n.oc("ngIf","read"===e.mode),n.Db(3),n.oc("ngIf",e.loadedDocument),n.Db(2),n.oc("ngIf",e.canUpdate&&"read"===e.mode&&"contact"===e.contact.type))},directives:[q.i,k.b,S.a,q.f,I.e,I.f,P.t,I.d,El,hd,Jr,q.c],pipes:[g.d],styles:[".admin-contact[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;width:90vw}.mat-sidenav-container[_ngcontent-%COMP%]{height:100%}"]}),t})();const vd=["autoCompleteInput"];function _d(t,e){if(1&t&&(n.Wb(0,"sup",25),n.Qc(1),n.Vb()),2&t){const t=n.hc(2).$implicit;n.Db(1),n.Sc("",t.civility.abbreviation,"\xa0")}}function yd(t,e){if(1&t&&(n.Wb(0,"mat-card-title",23),n.Oc(1,_d,2,1,"sup",24),n.Qc(2),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc(3);n.oc("title",t.civility.label+" "+t.firstname+" "+t.lastname),n.Db(1),n.oc("ngIf",!e.empty(t.civility.abbreviation)),n.Db(1),n.Tc("",t.firstname," ",t.lastname,"")}}function xd(t,e){if(1&t&&(n.Wb(0,"mat-card-title",23),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.oc("title",t.company),n.Db(1),n.Rc(t.company)}}function Cd(t,e){if(1&t&&(n.Wb(0,"mat-card-subtitle",23),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.oc("title",t.function),n.Db(1),n.Sc(" ",t.function,"\xa0 ")}}function Od(t,e){if(1&t&&(n.Rb(0,"i",26),n.ic(1,"translate")),2&t){const t=n.hc().$implicit;n.Lc("color",t.fillingRate.color),n.oc("title",n.jc(1,3,"lang.contactsFillingRate")+" : "+t.fillingRate.rate+"%")}}function Dd(t,e){if(1&t&&(n.Wb(0,"mat-list-item",27),n.Rb(1,"mat-icon",28),n.ic(2,"translate"),n.Wb(3,"p",29),n.Qc(4),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("title",n.jc(2,3,"lang.contactsParameters_company")),n.Db(2),n.oc("title",t.company),n.Db(1),n.Sc(" ",t.company," ")}}function wd(t,e){if(1&t&&(n.Wb(0,"p",29),n.Qc(1),n.Vb()),2&t){const t=n.hc(2).$implicit;n.oc("title",t.addressAdditional1),n.Db(1),n.Sc(" (",t.addressAdditional1,") ")}}function Md(t,e){if(1&t&&(n.Wb(0,"mat-list-item",27),n.Rb(1,"mat-icon",30),n.ic(2,"translate"),n.Wb(3,"p",29),n.Qc(4),n.Vb(),n.Oc(5,wd,2,2,"p",31),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc(3);n.Db(1),n.oc("title",n.jc(2,4,"lang.contactsParameters_department")),n.Db(2),n.oc("title",t.department),n.Db(1),n.Sc(" ",t.department," "),n.Db(1),n.oc("ngIf",!e.empty(t.addressAdditional1))}}function kd(t,e){if(1&t&&(n.Wb(0,"mat-list-item",27),n.Rb(1,"mat-icon",32),n.ic(2,"translate"),n.Wb(3,"p",29),n.Qc(4),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("title",n.jc(2,3,"lang.email")),n.Db(2),n.oc("title",t.email),n.Db(1),n.Sc(" ",t.email," ")}}function Sd(t,e){if(1&t&&(n.Wb(0,"mat-list-item",27),n.Rb(1,"mat-icon",33),n.ic(2,"translate"),n.Wb(3,"p",29),n.Qc(4),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("title",n.jc(2,3,"lang.phoneNumber")),n.Db(2),n.oc("title",t.phone),n.Db(1),n.Sc(" ",t.phone," ")}}function Id(t,e){if(1&t&&(n.Wb(0,"p",29),n.Qc(1),n.Vb()),2&t){const t=n.hc(2).$implicit;n.oc("title",t.addressStreet),n.Db(1),n.Tc(" ",t.addressNumber," ",t.addressStreet," ")}}function Pd(t,e){if(1&t&&(n.Wb(0,"p",29),n.Qc(1),n.Vb()),2&t){const t=n.hc(2).$implicit;n.oc("title",t.addressAdditional2),n.Db(1),n.Sc(" (",t.addressAdditional2,") ")}}function Vd(t,e){if(1&t&&(n.Wb(0,"p",29),n.Qc(1),n.Vb()),2&t){const t=n.hc(2).$implicit;n.oc("title",t.addressPostcode+" "+t.addressTown),n.Db(1),n.Tc(" ",t.addressPostcode," ",t.addressTown," ")}}function Rd(t,e){if(1&t&&(n.Wb(0,"p",29),n.Qc(1),n.Vb()),2&t){const t=n.hc(2).$implicit;n.oc("title",t.addressCountry),n.Db(1),n.Sc(" ",t.addressCountry," ")}}function jd(t,e){if(1&t&&(n.Wb(0,"mat-list-item",34),n.ic(1,"translate"),n.Rb(2,"mat-icon",35),n.Oc(3,Id,2,3,"p",31),n.Oc(4,Pd,2,2,"p",31),n.Oc(5,Vd,2,3,"p",31),n.Oc(6,Rd,2,2,"p",31),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc(3);n.oc("title",n.jc(1,5,"lang.address")),n.Db(3),n.oc("ngIf",!e.empty(t.addressNumber)||!e.empty(t.addressStreet)),n.Db(1),n.oc("ngIf",!e.empty(t.addressAdditional2)),n.Db(1),n.oc("ngIf",!e.empty(t.addressPostcode)||!e.empty(t.addressTown)),n.Db(1),n.oc("ngIf",!e.empty(t.addressCountry))}}function Ad(t,e){if(1&t&&(n.Wb(0,"mat-list-item",27),n.Rb(1,"mat-icon",36),n.ic(2,"translate"),n.Wb(3,"p",29),n.Qc(4),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("title",n.jc(2,3,"lang.note")),n.Db(2),n.oc("title",t.notes),n.Db(1),n.Sc(" ",t.notes," ")}}function Wd(t,e){if(1&t&&(n.Wb(0,"mat-list-item",27),n.Rb(1,"mat-icon",37),n.Wb(2,"p",29),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("title",t.label),n.Db(1),n.oc("title",t.value),n.Db(1),n.Sc(" ",t.value," ")}}function Td(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Wd,4,3,"mat-list-item",20),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",null!==t.value)}}function Ed(t,e){if(1&t&&(n.Wb(0,"mat-option",15),n.Wb(1,"mat-card"),n.Wb(2,"mat-card-header",16),n.Rb(3,"div",17),n.ic(4,"translate"),n.Oc(5,yd,3,4,"mat-card-title",18),n.Oc(6,xd,2,2,"mat-card-title",18),n.Oc(7,Cd,2,2,"mat-card-subtitle",18),n.Oc(8,Od,2,5,"i",19),n.Vb(),n.Wb(9,"mat-card-content"),n.Wb(10,"mat-list"),n.Oc(11,Dd,5,5,"mat-list-item",20),n.Oc(12,Md,6,6,"mat-list-item",20),n.Oc(13,kd,5,5,"mat-list-item",20),n.Oc(14,Sd,5,5,"mat-list-item",20),n.Oc(15,jd,7,7,"mat-list-item",21),n.Oc(16,Ad,5,5,"mat-list-item",20),n.Oc(17,Td,2,1,"ng-container",22),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t){const t=e.$implicit,i=n.hc(3);n.oc("id",i.id+"-"+t.id)("value",t),n.Db(3),n.Ib("fa-address-card","contact"===t.type)("fa-users","contactGroup"===t.type)("fa-sitemap","entity"===t.type)("fa-user","user"===t.type),n.oc("title",n.jc(4,22,"lang.contact_"+t.type)),n.Db(2),n.oc("ngIf",!i.empty(t.firstname)||!i.empty(t.lastname)),n.Db(1),n.oc("ngIf",i.empty(t.firstname)&&i.empty(t.lastname)),n.Db(1),n.oc("ngIf",!i.empty(t.function)),n.Db(1),n.oc("ngIf","contact"===t.type&&!i.empty(t.fillingRate.rate)),n.Db(3),n.oc("ngIf",!(i.empty(t.firstname)&&i.empty(t.lastname)||i.empty(t.company))),n.Db(1),n.oc("ngIf",!i.empty(t.department)),n.Db(1),n.oc("ngIf",!i.empty(t.email)),n.Db(1),n.oc("ngIf",!i.empty(t.phone)),n.Db(1),n.oc("ngIf",!(i.empty(t.addressNumber)&&i.empty(t.addressStreet)&&i.empty(t.addressAdditional2)&&i.empty(t.addressPostcode)&&i.empty(t.addressTown)&&i.empty(t.addressCountry))),n.Db(1),n.oc("ngIf",!i.empty(t.notes)),n.Db(1),n.oc("ngForOf",t.customFields)}}function Fd(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Ed,18,24,"mat-option",14),n.ic(2,"async"),n.Tb()),2&t){const t=n.hc(2);n.Db(1),n.oc("ngForOf",n.jc(2,1,t.filteredOptions))}}function Ld(t,e){if(1&t&&n.Rb(0,"mat-option",38),2&t){const t=n.hc(2);n.oc("innerHTML",t.listInfo,n.Ec)}}function Qd(t,e){1&t&&(n.Wb(0,"mat-option",39),n.Rb(1,"mat-spinner",40),n.Vb())}function Nd(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",41),n.Wb(1,"a",42),n.dc("click",(function(e){n.Dc(t);const i=n.hc(2);return e.stopPropagation(),i.openContact()})),n.Rb(2,"mat-icon",43),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(3),n.Sc(" ",n.jc(4,1,"lang.createContact")," "))}function zd(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field",4),n.Rb(1,"mat-icon",5),n.Wb(2,"input",6,7),n.dc("click",(function(e){n.Dc(t);const i=n.hc();return e.stopPropagation(),i.noResultFound=null})),n.ic(4,"translate"),n.Vb(),n.Wb(5,"mat-autocomplete",8,9),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc().selectOpt(e)})),n.Oc(7,Fd,3,3,"ng-container",10),n.Oc(8,Ld,1,1,"mat-option",11),n.Oc(9,Qd,2,0,"mat-option",12),n.Oc(10,Nd,5,3,"div",13),n.Vb(),n.Vb()}if(2&t){const t=n.zc(6),e=n.hc();n.Db(2),n.oc("id",e.id)("placeholder",n.jc(4,8,"lang.searchContact"))("formControl",e.myControl)("matAutocomplete",t),n.Db(5),n.oc("ngIf",e.options.length>0&&!e.loading),n.Db(1),n.oc("ngIf",0===e.options.length&&!e.loading),n.Db(1),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",e.canAdd&&(null!==e.noResultFound||e.options.length>0)&&!e.loading)}}function Bd(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",44),n.Wb(1,"button",45),n.dc("click",(function(){return n.Dc(t),n.hc().resetAll()})),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(2),n.Rc(n.jc(3,1,"lang.deleteAll")))}function Ud(t,e){if(1&t&&(n.Ub(0),n.Qc(1),n.Tb()),2&t){const t=n.hc().$implicit,e=n.hc(4);n.Db(1),n.Sc(" ",e.valuesToDisplay[t.id].firstname," ")}}function $d(t,e){if(1&t&&(n.Ub(0),n.Qc(1),n.Tb()),2&t){const t=n.hc().$implicit,e=n.hc(4);n.Db(1),n.Sc(" (",e.valuesToDisplay[t.id].company,")")}}function Hd(t,e){if(1&t&&n.Rb(0,"i",56),2&t){const t=n.hc().$implicit,e=n.hc(4);n.Lc("color",e.valuesToDisplay[t.id].fillingRate.color)}}function Gd(t,e){1&t&&n.Rb(0,"mat-icon",57)}function Xd(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",51),n.dc("removed",(function(){n.Dc(t);const i=e.index;return n.hc(4).removeItem(i)}))("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(4).openContact(i)})),n.Wb(1,"span",52),n.Rb(2,"i",53),n.ic(3,"translate"),n.Oc(4,Ud,2,1,"ng-container",10),n.Qc(5),n.Oc(6,$d,2,1,"ng-container",10),n.Vb(),n.Oc(7,Hd,1,2,"i",54),n.Oc(8,Gd,1,0,"mat-icon",55),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(4);n.oc("removable",!i.controlAutocomplete.disabled),n.Db(2),n.Ib("fa-address-card","contact"===i.valuesToDisplay[t.id].type)("fa-sitemap","entity"===i.valuesToDisplay[t.id].type)("fa-user","user"===i.valuesToDisplay[t.id].type),n.oc("title",n.jc(3,13,"lang."+i.valuesToDisplay[t.id].type)),n.Db(2),n.oc("ngIf",!i.empty(i.valuesToDisplay[t.id].firstname)),n.Db(1),n.Sc(" ",i.valuesToDisplay[t.id].lastname," "),n.Db(1),n.oc("ngIf",!i.empty(i.valuesToDisplay[t.id].company)),n.Db(1),n.oc("ngIf",!i.functions.empty(i.valuesToDisplay[t.id].fillingRate.color)),n.Db(1),n.oc("ngIf",!i.controlAutocomplete.disabled)}}function qd(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Xd,9,15,"mat-chip",50),n.Tb()),2&t){const t=n.hc(3);n.Db(1),n.oc("ngForOf",t.controlAutocomplete.value)}}function Kd(t,e){if(1&t&&(n.Wb(0,"mat-chip-list",49),n.Oc(1,qd,2,1,"ng-container",10),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("ngIf",!t.loadingValues)}}function Yd(t,e){1&t&&(n.Wb(0,"div",58),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noSelectedContact")," "))}function Jd(t,e){if(1&t&&(n.Wb(0,"div",46),n.Oc(1,Kd,2,1,"mat-chip-list",47),n.Oc(2,Yd,3,3,"div",48),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.controlAutocomplete.value.length>0),n.Db(1),n.oc("ngIf",0===t.controlAutocomplete.value.length)}}let Zd=(()=>{class t{constructor(t,e,i,a,s,o,r,c,l,d){this.translate=t,this.http=e,this.notify=i,this.dialog=a,this.headerService=s,this.appService=o,this.latinisePipe=r,this.privilegeService=c,this.contactService=l,this.functions=d,this.loading=!1,this.loadingValues=!0,this.key="id",this.canAdd=!1,this.canUpdate=!1,this.noResultFound=null,this.myControl=new X.i,this.valuesToDisplay={},this.newIds=[],this.customFields=[],this.controlAutocomplete=new X.i,this.id="contact-autocomplete",this.exclusion="",this.singleMode=!1,this.inputMode=!1,this.retrieveDocumentEvent=new n.o,this.afterSelected=new n.o}ngOnInit(){this.controlAutocomplete.setValue(null===this.controlAutocomplete.value||""===this.controlAutocomplete.value?[]:this.controlAutocomplete.value),this.canAdd=this.privilegeService.hasCurrentUserPrivilege("create_contacts"),this.canUpdate=this.privilegeService.hasCurrentUserPrivilege("update_contacts"),this.getCustomFields(),this.initFormValue(),this.initAutocompleteRoute()}initAutocompleteRoute(){this.listInfo=this.translate.instant("lang.autocompleteInfo"),this.options=[],this.myControl.valueChanges.pipe(Object(mt.a)(()=>{this.noResultFound=null,this.options=[],this.listInfo=this.translate.instant("lang.autocompleteInfo")}),Object(pt.a)(300),Object(d.a)(t=>t.length>2),Object(mt.a)(()=>this.loading=!0),Object(ft.a)(t=>this.getDatas(t)),Object(l.a)(t=>(t=t.filter(t=>!this.singleMode||"entity"!==t.type&&"contactGroup"!==t.type&&this.singleMode)).map(t=>Object.assign(Object.assign({},t),{civility:this.contactService.formatCivilityObject(t.civility),fillingRate:this.contactService.formatFillingObject(t.fillingRate),customFields:void 0!==t.customFields?this.formatCustomField(t.customFields):[]}))),Object(mt.a)(t=>{0===t.length?(this.noResultFound=!0,this.listInfo=this.translate.instant("lang.noAvailableValue")):(this.noResultFound=!1,this.listInfo=""),this.options=t,this.filteredOptions=Object(c.a)(this.options),this.loading=!1})).subscribe()}getCustomFields(){this.http.get("../rest/contactsCustomFields").pipe(Object(mt.a)(t=>{this.customFields=t.customFields.map(t=>({id:t.id,label:t.label}))})).subscribe()}formatCustomField(t){const e=[];return Object.keys(t).forEach(i=>{e.push({label:this.customFields.filter(t=>t.id==i)[0].label,value:t[i]})}),e}getDatas(t){return this.http.get("../rest/autocomplete/correspondents"+this.exclusion,{params:{search:t}})}selectOpt(t){this.setFormValue(t.option.value),this.afterSelected.emit(t.option.value),this.myControl.setValue("")}initFormValue(){this.controlAutocomplete.value.forEach(t=>{this.valuesToDisplay[t.id]={type:"",firstname:"",lastname:this.translate.instant("lang.undefined"),company:"",fillingRate:{color:""}},"contact"===t.type?this.http.get("../rest/contacts/"+t.id).pipe(Object(mt.a)(t=>{this.valuesToDisplay[t.id]={type:"contact",firstname:t.firstname,lastname:t.lastname,company:t.company,fillingRate:this.functions.empty(t.fillingRate)?"":{color:this.contactService.getFillingColor(t.fillingRate.thresholdLevel)}}}),Object(Xt.a)(()=>this.loadingValues=!1),Object(m.a)(t=>(this.notify.error(t.error.errors),Object(c.a)(!1)))).subscribe():"user"===t.type?this.http.get("../rest/users/"+t.id).pipe(Object(mt.a)(t=>{this.valuesToDisplay[t.id]={type:"user",firstname:t.firstname,lastname:t.lastname,fillingRate:{color:""}}}),Object(Xt.a)(()=>this.loadingValues=!1),Object(m.a)(t=>(this.notify.error(t.error.errors),Object(c.a)(!1)))).subscribe():"entity"===t.type&&this.http.get("../rest/entities/"+t.id).pipe(Object(mt.a)(t=>{this.valuesToDisplay[t.id]={type:"entity",lastname:t.entity_label,fillingRate:{color:""}}}),Object(Xt.a)(()=>this.loadingValues=!1),Object(m.a)(t=>(this.notify.error(t.error.errors),Object(c.a)(!1)))).subscribe()})}setFormValue(t){"contactGroup"===t.type?this.http.get("../rest/contactsGroups/"+t.id).pipe(Object(l.a)(t=>t.contactsGroup.contacts.map(t=>({id:t.id,type:t.type,lastname:t.contact,fillingRate:this.functions.empty(t.thresholdLevel)?"":{color:this.contactService.getFillingColor(t.thresholdLevel)}}))),Object(mt.a)(t=>{t.forEach(t=>{this.setContact(t)})}),Object(Xt.a)(()=>this.loadingValues=!1),Object(m.a)(t=>(this.notify.error(t.error.errors),Object(c.a)(!1)))).subscribe():this.setContact(t)}setContact(t){if(-1===this.controlAutocomplete.value.map(t=>t.id).indexOf(t.id)){let e=[];null!==this.controlAutocomplete.value&&(e=this.controlAutocomplete.value),this.valuesToDisplay[t.id]=t,e.push({type:t.type,id:t.id,label:this.getFormatedContact(t.id)}),this.controlAutocomplete.setValue(e),this.loadingValues=!1}}resetAutocomplete(){this.options=[],this.listInfo=this.translate.instant("lang.autocompleteInfo"),this.myControl.setValue("")}_filter(t){if("string"==typeof t){const e=this.latinisePipe.transform(t.toLowerCase());return this.options.filter(t=>this.latinisePipe.transform(t[this.key].toLowerCase()).includes(e))}return this.options}unsetValue(){this.controlAutocomplete.setValue(""),this.myControl.setValue(""),this.myControl.enable()}removeItem(t){if(-1===this.newIds.indexOf(this.controlAutocomplete.value[t])){const e=this.controlAutocomplete.value;this.controlAutocomplete.value.splice(t,1),this.controlAutocomplete.setValue(e)}else this.http.delete("../rest/tags/"+this.controlAutocomplete.value[t]).pipe(Object(mt.a)(e=>{const i=this.controlAutocomplete.value;this.controlAutocomplete.value.splice(t,1),this.controlAutocomplete.setValue(i)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}openContact(t=null){this.retrieveDocumentEvent.emit(),this.dialog.open(gd,{maxWidth:"100vw",width:null===t?"99vw":"auto",panelClass:null===t?"maarch-full-height-modal":"maarch-modal",disableClose:!0,data:{editMode:this.canUpdate,contactId:null!==t?t.id:null,contactType:null!==t?t.type:null}}).afterClosed().pipe(Object(d.a)(t=>void 0!==t),Object(mt.a)(t=>{this.setFormValue({type:"contact",id:t}),this.initFormValue()}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}empty(t){return null===t||""===t||void 0===t}resetAll(){this.controlAutocomplete.setValue([]),this.valuesToDisplay={}}getFormatedContact(t){return this.contactService.formatContact(this.valuesToDisplay[t])}getInputValue(){return this.myControl.value}setInputValue(t){this.myControl.setValue(t)}resetInputValue(){this.myControl.setValue("")}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(y.a),n.Qb(w.a),n.Qb(Tt.c),n.Qb(Dt.a),n.Qb(lc),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-contact-autocomplete"]],viewQuery:function(t,e){var i;1&t&&n.Kc(vd,!0),2&t&&n.yc(i=n.ec())&&(e.autoCompleteInput=i.first)},inputs:{controlAutocomplete:["control","controlAutocomplete"],id:"id",exclusion:"exclusion",singleMode:"singleMode",inputMode:"inputMode"},outputs:{retrieveDocumentEvent:"retrieveDocumentEvent",afterSelected:"afterSelected"},features:[n.Cb([Wt.a,lc])],decls:5,vars:4,consts:[["type","hidden",3,"formControl"],["floatLabel","never","class","input-form",4,"ngIf"],["style","text-align: right;",4,"ngIf"],["class","itemList",4,"ngIf"],["floatLabel","never",1,"input-form"],["color","primary","matPrefix","",1,"fa","fa-search",2,"padding-left","20px","font-size","15px"],["type","text","matInput","","maxlength","128",3,"id","placeholder","formControl","matAutocomplete","click"],["autoCompleteInput",""],[3,"optionSelected"],["auto","matAutocomplete"],[4,"ngIf"],["class","autoCompleteInfoResult smallInputInfo","disabled","",3,"innerHTML",4,"ngIf"],["disabled","","style","text-align: center;display: block;padding: 10px;",4,"ngIf"],["class","autoCompleteInfoResult smallInputInfo create-contact","disabled","",4,"ngIf"],[3,"id","value",4,"ngFor","ngForOf"],[3,"id","value"],[1,"contact-header"],["mat-card-avatar","",1,"contact-header-image","fa",3,"title"],[3,"title",4,"ngIf"],["class","contact-filling fa fa-circle",3,"title","color",4,"ngIf"],["class","contact-item",4,"ngIf"],["class","contact-address",3,"title",4,"ngIf"],[4,"ngFor","ngForOf"],[3,"title"],["style","color: #666;",4,"ngIf"],[2,"color","#666"],[1,"contact-filling","fa","fa-circle",3,"title"],[1,"contact-item"],["mat-list-icon","",1,"contact-group","far","fa-building",3,"title"],["mat-line","",1,"contact-content",3,"title"],["mat-list-icon","",1,"contact-group","fa","fa-sitemap",3,"title"],["mat-line","","class","contact-content",3,"title",4,"ngIf"],["mat-list-icon","",1,"contact-group","far","fa-envelope",3,"title"],["mat-list-icon","",1,"contact-group","fas","fa-phone",3,"title"],[1,"contact-address",3,"title"],["mat-list-icon","",1,"contact-group","fas","fa-map-marker-alt"],["mat-list-icon","",1,"contact-group","far","fa-sticky-note",3,"title"],["mat-list-icon","",1,"contact-group","fas","fa-hashtag",3,"title"],["disabled","",1,"autoCompleteInfoResult","smallInputInfo",3,"innerHTML"],["disabled","",2,"text-align","center","display","block","padding","10px"],["diameter","20"],["disabled","",1,"autoCompleteInfoResult","smallInputInfo","create-contact"],[2,"cursor","pointer",3,"click"],["matSuffix","",1,"fas","fa-plus-circle",2,"padding-top","5px"],[2,"text-align","right"],["mat-button","","color","warn",2,"font-size","10px",3,"click"],[1,"itemList"],["class","mat-chip-list-stacked itemChip","color","default",4,"ngIf"],["class","noResult",4,"ngIf"],["color","default",1,"mat-chip-list-stacked","itemChip"],["class","listAutocomplete","color","default",3,"removable","removed","click",4,"ngFor","ngForOf"],["color","default",1,"listAutocomplete",3,"removable","removed","click"],[2,"display","flex","flex","1","align-items","center"],[1,"fa",2,"padding-right","5px",3,"title"],["class","fa fa-circle","style","font-size: 9px;",3,"color",4,"ngIf"],["matChipRemove","","class","fa fa-times",4,"ngIf"],[1,"fa","fa-circle",2,"font-size","9px"],["matChipRemove","",1,"fa","fa-times"],[1,"noResult"]],template:function(t,e){1&t&&(n.Wb(0,"form"),n.Rb(1,"input",0),n.Oc(2,zd,11,10,"mat-form-field",1),n.Oc(3,Bd,4,3,"div",2),n.Oc(4,Jd,3,2,"div",3),n.Vb()),2&t&&(n.Db(1),n.oc("formControl",e.controlAutocomplete),n.Db(1),n.oc("ngIf",!e.controlAutocomplete.disabled&&!e.singleMode||e.singleMode&&0===e.controlAutocomplete.value.length&&!e.controlAutocomplete.disabled),n.Db(1),n.oc("ngIf",e.controlAutocomplete.value.length>=2&&!e.controlAutocomplete.disabled&&!e.inputMode),n.Db(1),n.oc("ngIf",!e.inputMode))},directives:[X.K,X.v,X.w,X.d,X.u,X.j,P.t,Y.c,S.a,Y.i,J.b,Ne.d,X.p,Ne.a,P.s,W.p,K.a,K.f,K.c,K.d,R.a,K.m,K.l,R.d,R.c,W.l,V.c,Y.j,k.b,ze.d,ze.a,ze.e],pipes:[g.d,P.b],styles:[".smallInputInfo[_ngcontent-%COMP%]{font-size:9px;white-space:normal;line-height:13px;display:table-cell;vertical-align:middle;text-align:center}.mat-chip.mat-standard-chip[_ngcontent-%COMP%]{color:#1a80ab;background-color:#fff;border:1px solid #1a80ab}.noResult[_ngcontent-%COMP%]{text-align:center;font-style:italic;opacity:.5}.listAutocomplete[_ngcontent-%COMP%]{cursor:pointer;height:auto}.itemChip[_ngcontent-%COMP%]{display:block;width:95%}.itemChip[_ngcontent-%COMP%] .mat-chip-list-wrapper{margin:0}.mat-card[_ngcontent-%COMP%]{padding:0;margin:5px}.mat-card[_ngcontent-%COMP%]:hover{box-shadow:inset 0 0 5px 0 rgba(0,0,0,.12)}.itemList[_ngcontent-%COMP%]{padding-top:10px;overflow-x:hidden;max-height:165px}.mat-list[_ngcontent-%COMP%]{padding:0}.mat-option[_ngcontent-%COMP%]:not(.smallInputInfo){white-space:normal;line-height:normal;height:auto;padding:0}.mat-option[_ngcontent-%COMP%]:hover{background:initial}.contact-card[_ngcontent-%COMP%]{width:100%;margin-top:10px;margin-bottom:10px;padding:0;box-shadow:none;border:1px solid rgba(0,0,0,.12)}.mat-card-header[_ngcontent-%COMP%]{background:#f9f9f9;padding:10px 10px 5px}.contact-header[_ngcontent-%COMP%] .mat-card-header-text, .mat-card-subtitle[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis}.mat-card-subtitle[_ngcontent-%COMP%]{white-space:pre}.contact-item[_ngcontent-%COMP%]{height:20px!important}.contact-item[_ngcontent-%COMP%] .mat-list-text{padding-left:0!important}.mat-card-title[_ngcontent-%COMP%]{font-size:13px}.mat-card-subtitle[_ngcontent-%COMP%]{font-size:10px;margin-bottom:0}.contact-header-image[_ngcontent-%COMP%]{background:#135f7f;font-size:10px;color:#fff;height:24px;width:24px}.contact-group[_ngcontent-%COMP%], .contact-header-image[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.contact-group[_ngcontent-%COMP%]{color:#135f7f;font-size:10px!important;padding:0!important;margin:0}.mat-list-item-content[_ngcontent-%COMP%]{padding:0}.contact-content[_ngcontent-%COMP%]{font-size:10px!important;color:#337ab7}.contact-address[_ngcontent-%COMP%]{height:auto!important;padding-top:5px;padding-bottom:5px}.contact-address[_ngcontent-%COMP%] .mat-list-text{padding-left:0!important}.contact-address[_ngcontent-%COMP%] .mat-list-item-content{padding-top:0!important;padding-bottom:0!important}.contact-filling[_ngcontent-%COMP%]{position:absolute;right:8px;border-radius:10px}.create-contact[_ngcontent-%COMP%]{text-align:center;justify-content:center;display:flex;height:auto;position:-webkit-sticky;position:sticky;bottom:0;width:auto;padding:0;background:#fff;box-shadow:1px 0 2px 0 rgba(0,0,0,.12);font-size:11px}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();const th=["appDocumentViewer"],eh=["contactAutocomplete"];function ih(t,e){1&t&&(n.Wb(0,"div",11),n.Rb(1,"mat-spinner"),n.Vb())}function nh(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",12),n.dc("click",(function(){return n.Dc(t),n.hc().dialogRef.close()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",13),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.close"))}function ah(t,e){1&t&&(n.Wb(0,"div",14),n.Rb(1,"mat-spinner",15),n.Vb())}function sh(t,e){1&t&&n.Rb(0,"i",31)}function oh(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",32),n.dc("click",(function(e){n.Dc(t);const i=n.hc(2).index,a=n.hc(2);return e.stopPropagation(),a.removePj(i)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",33),n.Vb()}if(2&t){const t=n.hc(4);n.oc("disabled",t.isDocLoading())("title",n.jc(1,2,"lang.delAttachment"))}}function rh(t,e){if(1&t&&(n.Wb(0,"span"),n.Qc(1),n.ic(2,"translate"),n.Oc(3,sh,1,0,"i",29),n.Oc(4,oh,3,4,"button",30),n.Vb()),2&t){const t=n.hc().index,e=n.hc(2);n.Ib("complete",e.isPjValid(t)),n.Db(1),n.Tc("",n.jc(2,6,"lang.attachmentShort")," n\xb0",t+1,"\xa0"),n.Db(2),n.oc("ngIf",e.isPjValid(t)),n.Db(1),n.oc("ngIf",e.attachments.length>1)}}function ch(t,e){1&t&&n.Rb(0,"i",51)}function lh(t,e){1&t&&n.Rb(0,"i",52)}function dh(t,e){1&t&&n.Rb(0,"i",53)}function hh(t,e){1&t&&n.Rb(0,"i",51)}function uh(t,e){1&t&&n.Rb(0,"i",52)}function ph(t,e){1&t&&n.Rb(0,"i",53)}function bh(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",35),n.Wb(1,"plugin-select-search",54),n.dc("afterSelected",(function(e){return n.Dc(t),n.hc(4).selectContact(e)})),n.ic(2,"translate"),n.ic(3,"translate"),n.Vb(),n.Wb(4,"div",37),n.Wb(5,"button",55),n.dc("click",(function(){return n.Dc(t),n.hc(4).toggleSendMass()})),n.ic(6,"translate"),n.ic(7,"translate"),n.Rb(8,"mat-icon",56),n.Vb(),n.Rb(9,"i",57),n.Vb(),n.Vb()}if(2&t){const t=n.hc(4);n.Db(1),n.oc("label",n.jc(2,8,"lang.selectContact"))("placeholderLabel",n.jc(3,10,"lang.selectContact"))("datas",t.resourceContacts)("returnValue","object")("formControlSelect",t.selectedContact),n.Db(4),n.Ib("active",t.sendMassMode),n.oc("title",t.sendMassMode?n.jc(6,12,"lang.disableMailing"):n.jc(7,14,"lang.enableMailing"))}}function fh(t,e){1&t&&(n.Wb(0,"div",58),n.Rb(1,"div",59),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.oc("innerHTML",n.jc(2,1,"lang.mailingMsg"),n.Ec))}function mh(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-contact-autocomplete",61),n.dc("retrieveDocumentEvent",(function(){return n.Dc(t),n.hc(3),n.zc(6).saveDocService()})),n.Vb()}if(2&t){const t=n.hc(3).$implicit;n.oc("control",t.recipient)("singleMode",!0)}}function gh(t,e){if(1&t&&(n.Wb(0,"div",35),n.Oc(1,mh,1,2,"app-contact-autocomplete",60),n.Wb(2,"div",37),n.Rb(3,"i",57),n.Vb(),n.Vb()),2&t){const t=n.hc(4);n.Db(1),n.oc("ngIf",!t.loadingContact)}}function vh(t,e){if(1&t&&n.Rb(0,"mat-datepicker-toggle",62),2&t){n.hc();const t=n.zc(29);n.oc("for",t)}}function _h(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",63),n.dc("click",(function(e){n.Dc(t);const i=n.hc(2).$implicit;return e.stopPropagation(),i.validationDate.reset()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",64),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.eraseValue"))}function yh(t,e){1&t&&n.Rb(0,"i",57)}function xh(t,e){1&t&&n.Rb(0,"i",53)}function Ch(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",34),n.Wb(1,"div",35),n.Wb(2,"plugin-select-search",36),n.dc("afterSelected",(function(e){n.Dc(t);const i=n.hc().index;return n.hc(2).getAttachType(e,i)})),n.ic(3,"translate"),n.ic(4,"translate"),n.Vb(),n.Wb(5,"div",37),n.Oc(6,ch,1,0,"i",38),n.Oc(7,lh,1,0,"i",28),n.Oc(8,dh,1,0,"i",39),n.Vb(),n.Vb(),n.Wb(9,"div",35),n.Wb(10,"mat-form-field",40),n.Rb(11,"input",41),n.ic(12,"translate"),n.Vb(),n.Wb(13,"div",37),n.Oc(14,hh,1,0,"i",38),n.Oc(15,uh,1,0,"i",28),n.Oc(16,ph,1,0,"i",39),n.Vb(),n.Vb(),n.Oc(17,bh,10,16,"div",42),n.Oc(18,fh,3,3,"div",43),n.Oc(19,gh,4,1,"div",42),n.Wb(20,"div",35),n.Wb(21,"mat-form-field",44),n.dc("click",(function(){return n.Dc(t),n.zc(29).open()})),n.Wb(22,"mat-label"),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Rb(25,"input",45),n.ic(26,"translate"),n.Oc(27,vh,1,1,"mat-datepicker-toggle",46),n.Rb(28,"mat-datepicker",47,48),n.Oc(30,_h,3,3,"button",49),n.Vb(),n.Wb(31,"div",37),n.Oc(32,yh,1,0,"i",50),n.Oc(33,xh,1,0,"i",39),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(29),e=n.hc().$implicit,i=n.hc(2);n.Db(2),n.oc("label",n.jc(3,25,"lang.type"))("placeholderLabel",n.jc(4,27,"lang.type"))("formControlSelect",e.type)("datas",i.attachmentsTypes),n.Db(4),n.oc("ngIf",e.type.hasError("required")&&e.type.untouched),n.Db(1),n.oc("ngIf",e.type.touched&&e.type.hasError("required")),n.Db(1),n.oc("ngIf",e.type.valid&&!i.isEmptyField(e.type)),n.Db(3),n.pc("placeholder",n.jc(12,29,"lang.subject")),n.oc("formControl",e.title),n.Db(3),n.oc("ngIf",e.title.hasError("required")&&e.title.untouched),n.Db(1),n.oc("ngIf",e.title.touched&&e.title.hasError("required")),n.Db(1),n.oc("ngIf",e.title.valid&&!i.isEmptyField(e.title)),n.Db(1),n.oc("ngIf",i.resourceContacts.length>1),n.Db(1),n.oc("ngIf",i.sendMassMode),n.Db(1),n.oc("ngIf",!i.sendMassMode),n.Db(4),n.Rc(n.jc(24,31,"lang.expectedReturnDate")),n.Db(2),n.oc("formControl",e.validationDate)("matDatepicker",t)("placeholder",n.jc(26,33,"lang.expectedReturnDate"))("min",i.now),n.Db(2),n.oc("ngIf",!e.validationDate.value),n.Db(1),n.oc("touchUi",i.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.validationDate.value&&!e.validationDate.disabled),n.Db(2),n.oc("ngIf",e.validationDate.valid&&i.isEmptyField(e.validationDate)),n.Db(1),n.oc("ngIf",e.validationDate.valid&&!i.isEmptyField(e.validationDate))}}function Oh(t,e){1&t&&n.Rb(0,"i",52)}function Dh(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab",21),n.Oc(1,rh,5,8,"ng-template",20),n.Wb(2,"div",22),n.Oc(3,Ch,34,35,"div",23),n.Wb(4,"div",24),n.Wb(5,"app-document-viewer",25,26),n.dc("triggerEvent",(function(){n.Dc(t);const i=e.index;return n.hc(2).setDatasViewer(i)})),n.Vb(),n.Wb(7,"div",27),n.Oc(8,Oh,1,0,"i",28),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.oc("disabled",i.isDocLoading()),n.Db(3),n.oc("ngIf",!i.loading),n.Db(2),n.oc("editMode",!0)("mode","attachment"),n.Db(3),n.oc("ngIf",t.encodedFile.touched&&t.encodedFile.hasError("required"))}}function wh(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span"),n.Wb(1,"button",65),n.dc("click",(function(e){n.Dc(t);const i=n.hc(2);return e.stopPropagation(),i.newPj()})),n.ic(2,"translate"),n.Rb(3,"mat-icon",66),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.oc("disabled",t.sendMassMode||t.isDocLoading())("title",n.jc(2,2,"lang.newAttachment"))}}function Mh(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab-group",16,17),n.dc("selectedIndexChange",(function(e){return n.Dc(t),n.hc().indexTab=e}))("selectedIndexChange",(function(e){return n.Dc(t),n.hc().updateFile(e)})),n.Oc(2,Dh,9,5,"mat-tab",18),n.Wb(3,"mat-tab",19),n.Oc(4,wh,4,4,"ng-template",20),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.oc("selectedIndex",t.indexTab),n.Db(2),n.oc("ngForOf",t.attachments)}}function kh(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",67),n.dc("click",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc();n.oc("disabled",t.canValidatePj()),n.Db(1),n.Rc(n.jc(2,2,"lang.validate"))}}function Sh(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",67),n.dc("click",(function(){return n.Dc(t),n.hc().onSubmit("mailing")})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc();n.oc("disabled",t.canValidatePj()),n.Db(1),n.Rc(n.jc(2,2,"lang.mailing"))}}function Ih(t,e){if(1&t&&(n.Wb(0,"button",68),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.oc("disabled",t.canValidatePj()),n.Db(1),n.Rc(n.jc(2,2,"lang.cancel"))}}let Ph=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c,l){this.translate=t,this.http=e,this.data=i,this.dialogRef=n,this.appService=a,this.notify=s,this.sortPipe=o,this.dialog=r,this.functions=c,this.contactService=l,this.loading=!0,this.sendMassMode=!1,this.sendingData=!1,this.attachmentsTypes=[],this.creationMode=!0,this.attachFormGroup=[],this.attachments=[],this.now=new Date,this.asyncIndexTab=0,this.indexTab=0,this.resourceSubject="",this.resourceContacts=[],this.selectedContact=new X.i,this.loadingContact=!1,this.resId=null}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){yield this.loadAttachmentTypes(),yield this.loadResource(),this.loading=!1}))}loadAttachmentTypes(){return new Promise((t,e)=>{this.http.get("../rest/attachmentsTypes").pipe(Object(mt.a)(e=>{Object.keys(e.attachmentsTypes).forEach(t=>{e.attachmentsTypes[t].show&&this.attachmentsTypes.push(Object.assign({id:t},e.attachmentsTypes[t]))}),this.attachmentsTypes=this.sortPipe.transform(this.attachmentsTypes,"label"),t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(""),Object(c.a)(!1)))).subscribe()})}loadResource(){return new Promise((t,e)=>{this.http.get(`../rest/resources/${this.data.resIdMaster}?light=true`).pipe(Object(mt.a)(e=>Object(r.a)(this,void 0,void 0,(function*(){let i="";"outgoing"===e.categoryId?!this.functions.empty(e.recipients)&&e.recipients.length>0&&(e.recipients=e.recipients.filter(t=>"entity"!==t.type),yield this.getContacts(e.recipients),i=this.functions.empty(e.recipients)?"":[{id:this.resourceContacts[0].id,type:this.resourceContacts[0].type}]):!this.functions.empty(e.senders)&&e.senders.length>0&&(e.senders=e.senders.filter(t=>"entity"!==t.type),yield this.getContacts(e.senders),i=this.functions.empty(e.senders)?"":[{id:this.resourceContacts[0].id,type:this.resourceContacts[0].type}]),this.resourceSubject=e.subject,this.attachments.push({title:new X.i({value:e.subject,disabled:!1},[X.I.required]),recipient:new X.i({value:i,disabled:!1}),type:new X.i({value:"response_project",disabled:!1},[X.I.required]),validationDate:new X.i({value:"",disabled:!1}),format:new X.i({value:"",disabled:!1},[X.I.required]),encodedFile:new X.i({value:"",disabled:!1},[X.I.required])}),setTimeout(()=>{this.getAttachType("response_project",0)},800),this.attachFormGroup.push(new X.l(this.attachments[0])),"outgoing"===e.categoryId?!this.functions.empty(e.recipients)&&e.recipients.length>1&&this.toggleSendMass():!this.functions.empty(e.senders)&&e.senders.length>1&&this.toggleSendMass(),t(!0)}))),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(""),Object(c.a)(!1)))).subscribe()})}getContacts(t){return Object(r.a)(this,void 0,void 0,(function*(){this.resourceContacts=[],yield Promise.all(t.map(t=>Object(r.a)(this,void 0,void 0,(function*(){yield this.getContact(t.id,t.type)})))),this.resourceContacts=this.sortPipe.transform(this.resourceContacts,"label")}))}selectContact(t){this.loadingContact=!0;const e=JSON.parse(JSON.stringify(this.resourceContacts.filter(e=>e.id===t.id&&e.type===t.type)[0]));this.attachments[this.indexTab].recipient.setValue([e]),setTimeout(()=>{this.loadingContact=!1},0),this.selectedContact.reset()}getContact(t,e){return new Promise((i,n)=>{"contact"===e?this.http.get("../rest/contacts/"+t).pipe(Object(mt.a)(t=>{this.resourceContacts.push({id:t.id,type:"contact",label:this.contactService.formatContact(t)}),i(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),i(!1),Object(c.a)(!1)))).subscribe():"user"===e?this.http.get("../rest/users/"+t).pipe(Object(mt.a)(t=>{this.resourceContacts.push({id:t.id,type:"user",label:`${t.firstname} ${t.lastname}`}),i(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),i(!1),Object(c.a)(!1)))).subscribe():"entity"===e&&this.http.get("../rest/entities/"+t).pipe(Object(mt.a)(t=>{this.resourceContacts.push({id:t.id,type:"entity",label:t.entity_label}),i(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),i(!1),Object(c.a)(!1)))).subscribe()})}selectAttachType(t,e){t.type=e.id}formatAttachments(){let t=[];return this.attachments.forEach((e,i)=>{t.push({resIdMaster:this.data.resIdMaster,type:e.type.value,title:e.title.value,recipientId:e.recipient.value.length>0?e.recipient.value[0].id:null,recipientType:e.recipient.value.length>0?e.recipient.value[0].type:null,validationDate:""!==e.validationDate.value?e.validationDate.value:null,encodedFile:e.encodedFile.value,format:e.format.value})}),t}onSubmit(t="default"){this.appDocumentViewer.toArray()[this.indexTab].getFile().pipe(Object(bt.a)(),Object(mt.a)(t=>{this.attachments[this.indexTab].encodedFile.setValue(t.content),this.attachments[this.indexTab].format.setValue(t.format)}),Object(mt.a)(()=>Object(r.a)(this,void 0,void 0,(function*(){if(this.isValid()){let e=null;this.sendingData=!0;const i=this.formatAttachments();for(const t of i)e=yield this.saveAttachment(t);this.sendMassMode&&null!==e&&"mailing"===t&&(yield this.generateMailling(e)),this.sendingData=!1,this.notify.success(this.translate.instant("lang.attachmentAdded")),this.dialogRef.close("success")}else this.sendingData=!1,this.notify.error(this.translate.instant("lang.mustCompleteAllAttachments"))})))).subscribe()}saveAttachment(t){return t.status=this.sendMassMode?"SEND_MASS":"A_TRA",new Promise((e,i)=>{this.http.post("../rest/attachments",t).pipe(Object(mt.a)(t=>{e(t.id)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(""),Object(c.a)(!1)))).subscribe()})}generateMailling(t){return new Promise((e,i)=>{this.http.post(`../rest/attachments/${t}/mailing`,{}).pipe(Object(mt.a)(()=>{e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(""),Object(c.a)(!1)))).subscribe()})}isValid(){let t=!0;return this.attachFormGroup.forEach(e=>{Object.keys(e.controls).forEach(t=>{e.controls[t].markAsTouched()}),"INVALID"===e.status&&(t=!1)}),t}isPjValid(t){let e=!0;return"INVALID"===this.attachFormGroup[t].status&&(e=!1),e}isDocLoading(){let t=!1;return this.appDocumentViewer.toArray().forEach((e,i)=>{e.isEditingTemplate()&&(t=!0)}),t}canValidatePj(){let t=!1;return this.appDocumentViewer.toArray().forEach((e,i)=>{e.isEditingTemplate()&&e.editor.async&&(t=!0)}),t}setDatasViewer(t){let e={};Object.keys(this.attachments[t]).forEach(i=>{["title","validationDate","recipient"].indexOf(i)>-1&&("recipient"===i&&this.attachments[t][i].value.length>0?(e.recipientId=this.attachments[t][i].value[0].id,e.recipientType=this.attachments[t][i].value[0].type):e["attachment_"+i]=this.attachments[t][i].value)});let i=1;this.attachments.forEach(t=>{"transmission"==t.type.value&&(e["transmissionRecipientId"+i]=t.recipient.value[0].id,e["transmissionRecipientType"+i]=t.recipient.value[0].type,i++)}),e.resId=this.data.resIdMaster,this.sendMassMode&&(e.inMailing=!0),this.appDocumentViewer.toArray()[t].setDatas(e)}newPj(){this.attachments.push({title:new X.i({value:this.resourceSubject,disabled:!1},[X.I.required]),recipient:new X.i({value:this.functions.empty(this.resourceContacts[this.attachments.length])?null:[{id:this.resourceContacts[this.attachments.length].id,type:this.resourceContacts[this.attachments.length].type}],disabled:!1}),type:new X.i({value:"response_project",disabled:!1},[X.I.required]),validationDate:new X.i({value:null,disabled:!1}),encodedFile:new X.i({value:"",disabled:!1},[X.I.required]),format:new X.i({value:"",disabled:!1},[X.I.required])}),this.attachFormGroup.push(new X.l(this.attachments[this.attachments.length-1])),this.indexTab=this.attachments.length-1,setTimeout(()=>{this.getAttachType("response_project",this.indexTab)},800)}updateFile(t){this.functions.empty(this.attachments[this.asyncIndexTab].encodedFile.value)?this.appDocumentViewer.toArray()[this.asyncIndexTab].getFile().pipe(Object(ro.a)(1),Object(mt.a)(e=>{this.attachments[this.asyncIndexTab].encodedFile.setValue(e.content),this.attachments[this.asyncIndexTab].format.setValue(e.format),this.asyncIndexTab=t})).subscribe():this.asyncIndexTab=t}removePj(t){this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete")+" : "+this.translate.instant("lang.attachmentShort")+" n\xb0"+(t+1),msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.indexTab=0,this.asyncIndexTab=this.indexTab,this.attachments.splice(t,1),this.attachFormGroup.splice(t,1)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}getAttachType(t,e){this.appDocumentViewer.toArray()[e].loadTemplatesByResId(this.data.resIdMaster,t)}isEmptyField(t){return null===t.value||(Array.isArray(t.value)?!(t.value.length>0):""===String(t.value))}toggleSendMass(){this.sendMassMode?(this.sendMassMode=!this.sendMassMode,this.selectedContact.enable()):1===this.attachments.length?(this.sendMassMode=!this.sendMassMode,this.selectedContact.disable()):this.notify.error("Veuillez supprimer les <b>autres onglets PJ</b> avant de passer en <b>publipostage</b>.")}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.a),n.Qb(q.h),n.Qb(w.a),n.Qb(D.a),n.Qb(Wt.a),n.Qb(q.b),n.Qb(_t.a),n.Qb(lc))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Xc(th,!0),n.Xc(eh,!0)),2&t&&(n.yc(i=n.ec())&&(e.appDocumentViewer=i),n.yc(i=n.ec())&&(e.contactAutocomplete=i))},inputs:{resId:"resId"},features:[n.Cb([Wt.a,lc])],decls:14,vars:10,consts:[[1,"attach-container"],["class","example-loading-shade",4,"ngIf"],["mat-dialog-title",""],[2,"flex","1"],["mat-icon-button","",3,"title","click",4,"ngIf"],[1,"attach-content"],["class","loading",4,"ngIf"],["style","width: 100%;",3,"selectedIndex","selectedIndexChange",4,"ngIf"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","color","primary",3,"disabled","click",4,"ngIf"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close",4,"ngIf"],[1,"example-loading-shade"],["mat-icon-button","",3,"title","click"],[1,"fa","fa-times"],[1,"loading"],[2,"margin","auto"],[2,"width","100%",3,"selectedIndex","selectedIndexChange"],["pjList",""],[3,"disabled",4,"ngFor","ngForOf"],["disabled","",1,"addPJ"],["mat-tab-label",""],[3,"disabled"],[2,"height","100%","overflow","auto"],["class","attachment-form col-md-3 col-sm-12",4,"ngIf"],[1,"documentContent","col-md-9","col-sm-12"],[2,"height","100%","width","100%","position","relative",3,"editMode","mode","triggerEvent"],["appDocumentViewer",""],[1,"fieldState","stateDoc"],["class","fas fa-exclamation-triangle fieldError",4,"ngIf"],["class","fa fa-check",4,"ngIf"],["mat-icon-button","","color","warn",3,"disabled","title","click",4,"ngIf"],[1,"fa","fa-check"],["mat-icon-button","","color","warn",3,"disabled","title","click"],[1,"fa","fa-minus"],[1,"attachment-form","col-md-3","col-sm-12"],[1,"attachment-form-item"],[2,"width","100%",3,"label","placeholderLabel","formControlSelect","datas","afterSelected"],[1,"fieldState"],["class","fas fa-asterisk fieldRequired",4,"ngIf"],["class","fas fa-check fieldFull",4,"ngIf"],[1,"input-form"],["matInput","",3,"placeholder","formControl"],["class","attachment-form-item",4,"ngIf"],["class","attachment-form-item","style","display: block;",4,"ngIf"],[1,"input-form","input-date",2,"cursor","pointer",3,"click"],["matInput","","readonly","",2,"cursor","pointer",3,"formControl","matDatepicker","placeholder","min"],["matSuffix","",3,"for",4,"ngIf"],[3,"touchUi"],["picker",""],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click",4,"ngIf"],["class","fas fa-asterisk noMandatory",4,"ngIf"],[1,"fas","fa-asterisk","fieldRequired"],[1,"fas","fa-exclamation-triangle","fieldError"],[1,"fas","fa-check","fieldFull"],[2,"width","100%",3,"label","placeholderLabel","datas","returnValue","formControlSelect","afterSelected"],["mat-icon-button","","color","primary",3,"title","click"],[1,"fas","fa-mail-bulk"],[1,"fas","fa-asterisk","noMandatory"],[1,"attachment-form-item",2,"display","block"],["role","alert",1,"alert","alert-info",3,"innerHTML"],["style","width:100%;",3,"control","singleMode","retrieveDocumentEvent",4,"ngIf"],[2,"width","100%",3,"control","singleMode","retrieveDocumentEvent"],["matSuffix","",3,"for"],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click"],["color","warn",1,"fa","fa-calendar-times"],["mat-icon-button","",3,"disabled","title","click"],[1,"fa","fa-plus"],["mat-raised-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Oc(1,ih,2,0,"div",1),n.Wb(2,"h1",2),n.Wb(3,"span",3),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Oc(6,nh,3,3,"button",4),n.Vb(),n.Wb(7,"mat-dialog-content",5),n.Oc(8,ah,2,0,"div",6),n.Oc(9,Mh,5,2,"mat-tab-group",7),n.Vb(),n.Wb(10,"div",8),n.Oc(11,kh,3,4,"button",9),n.Oc(12,Sh,3,4,"button",9),n.Oc(13,Ih,3,4,"button",10),n.Vb(),n.Vb()),2&t&&(n.Db(1),n.oc("ngIf",e.sendingData),n.Db(3),n.Sc(" ",n.jc(5,8,"lang.attachmentCreation")," "),n.Db(2),n.oc("ngIf",!e.loading),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(2),n.oc("ngIf",e.creationMode&&!e.loading),n.Db(1),n.oc("ngIf",e.sendMassMode&&!e.loading),n.Db(1),n.oc("ngIf",e.creationMode&&!e.loading))},directives:[P.t,q.i,q.f,q.c,V.c,k.b,S.a,Te.c,P.s,Te.a,Te.d,Jr,fr,Y.c,J.b,X.d,X.u,X.j,Y.g,ae.h,ae.f,Zd,ae.j,Y.j,q.d],pipes:[g.d],styles:[".loading[_ngcontent-%COMP%]{display:flex;height:100%;width:100%}.attach-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;height:100%}.attach-container[_ngcontent-%COMP%] .mat-tab-body-content, .attach-container[_ngcontent-%COMP%] .mat-tab-body-wrapper{height:100%!important}.mat-dialog-title[_ngcontent-%COMP%]{margin:0!important;display:flex;align-items:center}.attach-content[_ngcontent-%COMP%]{margin:0;padding:0!important;height:100%;display:flex;overflow:auto}.attach-content[_ngcontent-%COMP%] .mat-tab-label:last-child{min-width:50px;padding:0;opacity:1;color:#135f7f}.attachment-form[_ngcontent-%COMP%]{padding:10px;overflow:auto;position:-webkit-sticky;position:sticky;top:0}.attachment-form-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding-top:10px;padding-bottom:10px}.attachment-form-item[_ngcontent-%COMP%] .mat-form-field-should-float .mat-form-field-label-wrapper{margin-top:-7px}.attachment-form-item[_ngcontent-%COMP%] .mat-form-field-should-float .mat-form-field-label{background:#fff;width:auto!important;padding-top:5px;padding-left:5px;padding-right:5px}.example-loading-shade[_ngcontent-%COMP%]{background:hsla(0,0%,100%,.7686274509803922);z-index:2}.actions[_ngcontent-%COMP%]{margin:0}.complete[_ngcontent-%COMP%]{color:green;font-weight:700}.fieldState[_ngcontent-%COMP%]{padding-top:0!important}.stateDoc[_ngcontent-%COMP%]{position:absolute;right:20px;top:20px}.documentContent[_ngcontent-%COMP%]{display:flex;flex:1;align-items:center;justify-content:center;text-align:center;background:#135f7f;overflow:auto;color:#fff;height:100%}.active[_ngcontent-%COMP%]{color:#f99830}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();const Vh=["appAttachmentViewer"];function Rh(t,e){1&t&&(n.Wb(0,"div",13),n.Rb(1,"mat-spinner"),n.Vb())}function jh(t,e){if(1&t&&(n.Ub(0),n.Qc(1),n.Tb()),2&t){const t=n.hc(2);n.Db(1),n.Sc(" ",t.attachment.chrono.value," - ")}}function Ah(t,e){if(1&t&&(n.Wb(0,"span",14),n.Oc(1,jh,2,1,"ng-container",7),n.Qc(2),n.ic(3,"shorten"),n.Vb()),2&t){const t=n.hc();n.oc("title",t.attachment.title.value),n.Db(1),n.oc("ngIf",null!==t.attachment.chrono.value),n.Db(1),n.Sc(" ",n.lc(3,3,t.attachment.title.value,50,"...")," ")}}function Wh(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",17),n.Wb(1,"mat-slide-toggle",37),n.dc("change",(function(){n.Dc(t);const e=n.hc(2);return e.newVersion=!e.newVersion})),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.oc("checked",t.newVersion),n.Db(1),n.Rc(n.jc(3,2,"lang.newVersion"))}}function Th(t,e){if(1&t&&(n.Wb(0,"div",17),n.Rb(1,"div",38),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("innerHTML",t.translate.instant("lang.mustEditDocument"),n.Ec)}}function Eh(t,e){1&t&&n.Rb(0,"i",39)}function Fh(t,e){1&t&&n.Rb(0,"i",40)}function Lh(t,e){1&t&&n.Rb(0,"i",41)}function Qh(t,e){1&t&&n.Rb(0,"i",39)}function Nh(t,e){1&t&&n.Rb(0,"i",40)}function zh(t,e){1&t&&n.Rb(0,"i",41)}function Bh(t,e){if(1&t&&(n.Wb(0,"div",42),n.Rb(1,"div",43),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("innerHTML",t.translate.instant("lang.mailingMsg"),n.Ec)}}function Uh(t,e){if(1&t&&(n.Wb(0,"div",17),n.Rb(1,"app-contact-autocomplete",44),n.Wb(2,"div",20),n.Rb(3,"i",21),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("control",t.attachment.recipient)("singleMode",!0)}}function $h(t,e){if(1&t&&(n.Wb(0,"div",17),n.Wb(1,"mat-form-field",18),n.Rb(2,"input",28),n.ic(3,"translate"),n.ic(4,"fullDate"),n.ic(5,"ucfirst"),n.ic(6,"timeAgo"),n.Vb(),n.Wb(7,"div",20),n.Rb(8,"i",21),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.pc("placeholder",n.jc(3,3,"lang.signedAlt")),n.oc("title",n.jc(4,5,t.attachment.signDate.value))("value",n.jc(5,7,n.kc(6,9,t.attachment.signDate.value,"full")))}}function Hh(t,e){if(1&t&&(n.Wb(0,"div",17),n.Wb(1,"mat-form-field",18),n.Rb(2,"input",26),n.ic(3,"translate"),n.ic(4,"translate"),n.Vb(),n.Wb(5,"div",20),n.Rb(6,"i",21),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.rc("placeholder","",n.jc(3,3,"lang.signedAlt")," ",n.jc(4,5,"lang.by"),""),n.oc("formControl",t.attachment.signatory)}}function Gh(t,e){if(1&t&&(n.Wb(0,"div",17),n.Wb(1,"mat-form-field",18),n.Rb(2,"input",29),n.ic(3,"translate"),n.ic(4,"timeAgo"),n.Vb(),n.Wb(5,"div",20),n.Rb(6,"i",21),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.pc("placeholder",n.jc(3,3,"lang.modified")),n.oc("formControl",t.attachment.modificationDate)("value",n.kc(4,5,t.attachment.modificationDate.value,"full"))}}function Xh(t,e){if(1&t&&(n.Wb(0,"div",17),n.Wb(1,"mat-form-field",18),n.Rb(2,"input",26),n.ic(3,"translate"),n.ic(4,"translate"),n.Vb(),n.Wb(5,"div",20),n.Rb(6,"i",21),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.rc("placeholder","",n.jc(3,3,"lang.modified")," ",n.jc(4,5,"lang.by"),""),n.oc("formControl",t.attachment.modifiedBy)}}function qh(t,e){if(1&t&&n.Rb(0,"mat-datepicker-toggle",45),2&t){n.hc();const t=n.zc(62);n.oc("for",t)}}function Kh(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",46),n.dc("click",(function(e){n.Dc(t);const i=n.hc(2);return e.stopPropagation(),i.attachment.validationDate.reset()})),n.Rb(1,"mat-icon",47),n.Vb()}if(2&t){const t=n.hc(2);n.oc("title",t.translate.instant("lang.eraseValue"))}}function Yh(t,e){1&t&&n.Rb(0,"i",21)}function Jh(t,e){1&t&&n.Rb(0,"i",41)}function Zh(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"div",15),n.Oc(2,Wh,4,4,"div",16),n.Oc(3,Th,2,1,"div",16),n.Wb(4,"div",17),n.Wb(5,"mat-form-field",18),n.Rb(6,"input",19),n.ic(7,"translate"),n.ic(8,"translate"),n.Vb(),n.Wb(9,"div",20),n.Rb(10,"i",21),n.Vb(),n.Vb(),n.Wb(11,"div",17),n.Wb(12,"plugin-select-search",22),n.dc("afterSelected",(function(e){return n.Dc(t),n.hc().getAttachType(e)})),n.Vb(),n.Wb(13,"div",20),n.Oc(14,Eh,1,0,"i",23),n.Oc(15,Fh,1,0,"i",24),n.Oc(16,Lh,1,0,"i",25),n.Vb(),n.Vb(),n.Wb(17,"div",17),n.Wb(18,"mat-form-field",18),n.Rb(19,"input",26),n.ic(20,"translate"),n.Vb(),n.Wb(21,"div",20),n.Oc(22,Qh,1,0,"i",23),n.Oc(23,Nh,1,0,"i",24),n.Oc(24,zh,1,0,"i",25),n.Vb(),n.Vb(),n.Oc(25,Bh,2,1,"div",27),n.Oc(26,Uh,4,2,"div",16),n.Oc(27,$h,9,12,"div",16),n.Oc(28,Hh,7,7,"div",16),n.Wb(29,"mat-expansion-panel"),n.Wb(30,"mat-expansion-panel-header"),n.Wb(31,"mat-panel-title"),n.Qc(32),n.ic(33,"translate"),n.Vb(),n.Vb(),n.Wb(34,"div",17),n.Wb(35,"mat-form-field",18),n.Rb(36,"input",28),n.ic(37,"translate"),n.ic(38,"fullDate"),n.ic(39,"timeAgo"),n.Vb(),n.Wb(40,"div",20),n.Rb(41,"i",21),n.Vb(),n.Vb(),n.Wb(42,"div",17),n.Wb(43,"mat-form-field",18),n.Rb(44,"input",26),n.ic(45,"translate"),n.ic(46,"translate"),n.Vb(),n.Wb(47,"div",20),n.Rb(48,"i",21),n.Vb(),n.Vb(),n.Oc(49,Gh,7,8,"div",16),n.Oc(50,Xh,7,7,"div",16),n.Wb(51,"div",17),n.Wb(52,"mat-form-field",18),n.Rb(53,"input",29),n.ic(54,"translate"),n.Vb(),n.Wb(55,"div",20),n.Rb(56,"i",21),n.Vb(),n.Vb(),n.Wb(57,"div",17),n.Wb(58,"mat-form-field",30),n.dc("click",(function(){return n.Dc(t),n.zc(62).open()})),n.Rb(59,"input",31),n.Oc(60,qh,1,1,"mat-datepicker-toggle",32),n.Rb(61,"mat-datepicker",33,34),n.Oc(63,Kh,2,1,"button",35),n.Vb(),n.Wb(64,"div",20),n.Oc(65,Yh,1,0,"i",36),n.Oc(66,Jh,1,0,"i",25),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=n.zc(62),e=n.hc();n.Db(2),n.oc("ngIf",e.editMode),n.Db(1),n.oc("ngIf",e.newVersion),n.Db(3),n.pc("placeholder",n.jc(7,41,"lang.status")),n.oc("value",n.jc(8,43,"lang.attachment_"+e.attachment.status.value)),n.Db(6),n.oc("label",e.translate.instant("lang.type"))("placeholderLabel",e.translate.instant("lang.type"))("formControlSelect",e.attachment.type)("datas",e.attachmentsTypes),n.Db(2),n.oc("ngIf",e.attachment.type.hasError("required")&&e.attachment.type.untouched),n.Db(1),n.oc("ngIf",e.attachment.type.touched&&e.attachment.type.hasError("required")),n.Db(1),n.oc("ngIf",e.attachment.type.valid&&!e.isEmptyField(e.attachment.type)),n.Db(3),n.pc("placeholder",n.jc(20,45,"lang.subject")),n.oc("formControl",e.attachment.title),n.Db(3),n.oc("ngIf",e.attachment.title.hasError("required")&&e.attachment.title.untouched),n.Db(1),n.oc("ngIf",e.attachment.title.touched&&e.attachment.title.hasError("required")),n.Db(1),n.oc("ngIf",e.attachment.title.valid&&!e.isEmptyField(e.attachment.title)),n.Db(1),n.oc("ngIf",e.sendMassMode),n.Db(1),n.oc("ngIf",!e.sendMassMode),n.Db(1),n.oc("ngIf",void 0!==e.attachment.signedResponse.value),n.Db(1),n.oc("ngIf",void 0!==e.attachment.signedResponse.value),n.Db(4),n.Sc(" ",n.jc(33,47,"lang.othersInfos")," "),n.Db(4),n.pc("placeholder",n.jc(37,49,"lang.created")),n.oc("title",n.jc(38,51,e.attachment.creationDate.value))("value",n.kc(39,53,e.attachment.creationDate.value,"full")),n.Db(8),n.rc("placeholder","",n.jc(45,56,"lang.created")," ",n.jc(46,58,"lang.by"),""),n.oc("formControl",e.attachment.typistLabel),n.Db(5),n.oc("ngIf",null!==e.attachment.modificationDate.value),n.Db(1),n.oc("ngIf",null!==e.attachment.modificationDate.value),n.Db(3),n.pc("placeholder",n.jc(54,60,"lang.version")),n.oc("formControl",e.attachment.relation)("value",e.translate.instant("lang.version")+" "+e.attachment.relation.value),n.Db(6),n.oc("formControl",e.attachment.validationDate)("matDatepicker",t)("placeholder",e.translate.instant("lang.expectedReturnDate"))("min",e.now),n.Db(1),n.oc("ngIf",!e.attachment.validationDate.value),n.Db(1),n.oc("touchUi",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.attachment.validationDate.value&&!e.attachment.validationDate.disabled),n.Db(2),n.oc("ngIf",e.attachment.validationDate.valid&&e.isEmptyField(e.attachment.validationDate)),n.Db(1),n.oc("ngIf",e.attachment.validationDate.valid&&!e.isEmptyField(e.attachment.validationDate))}}function tu(t,e){if(1&t&&(n.Rb(0,"app-document-viewer",56,57),n.ic(2,"translate")),2&t){const t=n.hc(3);n.oc("editMode",!1)("resId",t.attachment.resIdMaster.value)("title",n.jc(2,3,"lang.mainDocument"))}}function eu(t,e){1&t&&(n.Wb(0,"mat-tab",54),n.ic(1,"translate"),n.Oc(2,tu,3,5,"ng-template",55),n.Vb()),2&t&&n.pc("label",n.jc(1,1,"lang.mainDocument"))}function iu(t,e){1&t&&(n.Wb(0,"span",59),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.signedAttachment")))}function nu(t,e){if(1&t&&(n.Wb(0,"mat-tab"),n.Oc(1,iu,3,3,"ng-template",50),n.Rb(2,"app-document-viewer",58,57),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.oc("editMode",!1)("resId",t.attachment.signedResponse.value)("mode","attachment")("title",t.attachment.chrono.value+" - "+t.attachment.title.value+" ("+t.translate.instant("lang.signed")+")")}}function au(t,e){1&t&&(n.Wb(0,"span",60),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.attachment")))}function su(t,e){if(1&t&&n.Rb(0,"app-document-viewer",61,57),2&t){const t=n.hc().$implicit,e=n.hc(2);n.oc("editMode",!1)("resId",t.resId)("mode","attachment")("format",e.attachment.format.value)("title",e.attachment.chrono.value+" - "+e.attachment.title.value+" ("+t.relation+")")}}function ou(t,e){if(1&t&&(n.Wb(0,"mat-tab",54),n.ic(1,"translate"),n.ic(2,"translate"),n.Oc(3,su,2,5,"ng-template",55),n.Vb()),2&t){const t=e.$implicit;n.sc("label","",n.jc(1,3,"lang.attachment")," (",n.jc(2,5,"lang.version")," ",t.relation,")")}}function ru(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab-group",48),n.Oc(1,eu,3,3,"mat-tab",49),n.Oc(2,nu,4,4,"mat-tab",7),n.Wb(3,"mat-tab"),n.Oc(4,au,3,3,"ng-template",50),n.Wb(5,"app-document-viewer",51,52),n.dc("triggerEvent",(function(e){return n.Dc(t),n.hc().setDatasViewer(e)})),n.Vb(),n.Vb(),n.Oc(7,ou,4,7,"mat-tab",53),n.Vb()}if(2&t){const t=n.hc();n.oc("selectedIndex",1),n.Db(1),n.oc("ngIf",null!==t.attachment.res_id_master),n.Db(1),n.oc("ngIf","SIGN"===t.attachment.status.value),n.Db(3),n.oc("editMode",t.editMode)("resId",t.data.resId)("resIdMaster",t.attachment.resIdMaster.value)("mode","attachment")("format",t.attachment.format.value)("attachType",t.attachment.type.value)("title",t.attachment.chrono.value+" - "+t.attachment.title.value),n.Db(2),n.oc("ngForOf",t.versions)}}function cu(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",62),n.dc("click",(function(){return n.Dc(t),n.hc().updateAttachment()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc();n.oc("disabled",!(t.loading||t.editMode&&t.attachFormGroup.valid)),n.Db(1),n.Rc(n.jc(2,2,"lang.validate"))}}function lu(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",62),n.dc("click",(function(){return n.Dc(t),n.hc().updateAttachment("mailing")})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc();n.oc("disabled",!(t.loading||t.editMode&&t.attachFormGroup.valid)),n.Db(1),n.Rc(n.jc(2,2,"lang.mailing"))}}function du(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",62),n.dc("click",(function(){return n.Dc(t),n.hc().createNewVersion()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc();n.oc("disabled",!t.editMode||!t.isEditing()),n.Db(1),n.Rc(n.jc(2,2,"lang.createNewVersion"))}}function hu(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",62),n.dc("click",(function(){return n.Dc(t),n.hc().createNewVersion("mailing")})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc();n.oc("disabled",!t.editMode||!t.isEditing()),n.Db(1),n.Rc(n.jc(2,2,"lang.mailing"))}}function uu(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",63),n.dc("click",(function(){return n.Dc(t),n.hc().deleteSignedVersion()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.deleteSignedVersion")))}let pu=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c,l,d){this.translate=t,this.http=e,this.data=i,this.dialog=n,this.dialogRef=a,this.appService=s,this.notify=o,this.sortPipe=r,this.headerService=c,this.privilegeService=l,this.functions=d,this.loading=!0,this.sendMassMode=!1,this.sendingData=!1,this.attachmentsTypes=[],this.versions=[],this.hidePanel=!1,this.newVersion=!1,this.attachFormGroup=null,this.editMode=!1,this.now=new Date}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.hidePanel=void 0!==this.data.hidePanel&&this.data.hidePanel,yield this.loadAttachmentTypes(),yield this.loadAttachment(),this.loading=!1}))}loadAttachmentTypes(){return new Promise(t=>{this.http.get("../rest/attachmentsTypes").pipe(Object(mt.a)(e=>{Object.keys(e.attachmentsTypes).forEach(t=>{this.attachmentsTypes.push(Object.assign({id:t},e.attachmentsTypes[t]))}),this.attachmentsTypes=this.sortPipe.transform(this.attachmentsTypes,"label"),t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(""),Object(c.a)(!1)))).subscribe()})}loadAttachment(){return new Promise(t=>{this.http.get("../rest/attachments/"+this.data.resId).pipe(Object(mt.a)(e=>{let i=null;this.functions.empty(this.data.editMode)?!this.privilegeService.hasCurrentUserPrivilege("manage_attachments")&&this.headerService.user.id!==e.typist||"SIGN"===e.status||"FRZ"===e.status||(this.editMode=!0):this.editMode=this.data.editMode,"acknowledgement_record_management"!==e.type&&"reply_record_management"!==e.type||(this.editMode=!1),null!==e.recipientId&&"SEND_MASS"!==e.status&&(i=[{id:e.recipientId,type:e.recipientType}]),this.sendMassMode="SEND_MASS"===e.status,this.attachment={typist:new X.i({value:e.typist,disabled:!0},[X.I.required]),typistLabel:new X.i({value:e.typistLabel,disabled:!0},[X.I.required]),creationDate:new X.i({value:e.creationDate,disabled:!0},[X.I.required]),modificationDate:new X.i({value:e.modificationDate,disabled:!0}),modifiedBy:new X.i({value:e.modifiedBy,disabled:!0}),signatory:new X.i({value:e.signatory,disabled:!0}),signatoryId:new X.i({value:e.signatoryId,disabled:!0}),signDate:new X.i({value:e.signDate,disabled:!0}),resId:new X.i({value:this.data.resId,disabled:!0},[X.I.required]),chrono:new X.i({value:e.chrono,disabled:!0}),originId:new X.i({value:e.originId,disabled:!0}),resIdMaster:new X.i({value:e.resIdMaster,disabled:!0},[X.I.required]),status:new X.i({value:e.status,disabled:!0},[X.I.required]),relation:new X.i({value:e.relation,disabled:!0},[X.I.required]),title:new X.i({value:e.title,disabled:!this.editMode},[X.I.required]),recipient:new X.i({value:i,disabled:!this.editMode}),type:new X.i({value:e.type,disabled:!this.editMode},[X.I.required]),validationDate:new X.i({value:null!==e.validationDate?new Date(e.validationDate):null,disabled:!this.editMode}),signedResponse:new X.i({value:e.signedResponse,disabled:!1}),encodedFile:new X.i({value:"_CURRENT_FILE",disabled:!this.editMode},[X.I.required]),format:new X.i({value:e.format,disabled:!0},[X.I.required])},this.versions=e.versions,this.attachFormGroup=new X.l(this.attachment),t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(""),Object(c.a)(!1)))).subscribe()})}createNewVersion(t="default"){this.sendingData=!0,this.appAttachmentViewer.getFile().pipe(Object(mt.a)(t=>{this.attachment.encodedFile.setValue(t.content),this.attachment.format.setValue(t.format),this.functions.empty(this.attachment.encodedFile.value)&&(this.notify.error(this.translate.instant("lang.mustEditAttachmentFirst")),this.sendingData=!1)}),Object(d.a)(()=>!this.functions.empty(this.attachment.encodedFile.value)),p(()=>this.http.post("../rest/attachments",this.getAttachmentValues(!0,t))),Object(mt.a)(e=>Object(r.a)(this,void 0,void 0,(function*(){this.sendMassMode&&"mailing"===t?(yield this.generateMailling(e.id),this.notify.success(this.translate.instant("lang.attachmentGenerated"))):this.notify.success(this.translate.instant("lang.newVersionAdded")),this.dialogRef.close("success")}))),Object(Xt.a)(()=>this.sendingData=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(""),Object(c.a)(!1)))).subscribe()}updateAttachment(t="default"){this.sendingData=!0,this.appAttachmentViewer.getFile().pipe(Object(mt.a)(t=>{this.attachment.encodedFile.setValue(t.content),this.attachment.format.setValue(t.format)}),p(()=>this.http.put("../rest/attachments/"+this.attachment.resId.value,this.getAttachmentValues(!1,t))),Object(mt.a)(()=>Object(r.a)(this,void 0,void 0,(function*(){this.sendMassMode&&"mailing"===t?(yield this.generateMailling(this.attachment.resId.value),this.notify.success(this.translate.instant("lang.attachmentGenerated"))):this.notify.success(this.translate.instant("lang.attachmentUpdated")),this.dialogRef.close("success")}))),Object(Xt.a)(()=>this.sendingData=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(""),Object(c.a)(!1)))).subscribe()}generateMailling(t){return new Promise(e=>{this.http.post(`../rest/attachments/${t}/mailing`,{}).pipe(Object(mt.a)(()=>{e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(""),Object(c.a)(!1)))).subscribe()})}enableForm(t){Object.keys(this.attachment).forEach(e=>{-1===["status","typistLabel","creationDate","relation","modificationDate","modifiedBy"].indexOf(e)&&(t?this.attachment[e].enable():this.attachment[e].disable())})}getAttachmentValues(t=!1,e){const i={};return Object.keys(this.attachment).forEach(t=>{if(void 0!==this.attachment[t]&&null!=this.attachment[t].value){if("validationDate"===t){const e=this.attachment[t].value.getDate(),n=this.attachment[t].value.getMonth()+1,a=this.attachment[t].value.getFullYear();i[t]=("00"+e).slice(-2)+"-"+("00"+n).slice(-2)+"-"+a+" 23:59:59"}else"recipient"===t?(i.recipientId=this.attachment[t].value.length>0?this.attachment[t].value[0].id:null,i.recipientType=this.attachment[t].value.length>0?this.attachment[t].value[0].type:null):i[t]=this.attachment[t].value;"encodedFile"===t&&"_CURRENT_FILE"===this.attachment[t].value&&(i.encodedFile=null),"mailing"===e&&(i.inMailing=!0)}}),t&&(i.originId=null!==this.attachment.originId.value?this.attachment.originId.value:i.resId,i.relation=this.attachment.relation.value+1,delete i.resId),i}setDatasViewer(t){const e={};Object.keys(this.attachment).forEach(t=>{["title","validationDate","effectiveDate"].indexOf(t)>-1&&(e["attachment_"+t]=this.attachment[t].value)}),"setData"===t?this.appAttachmentViewer.setDatas(e):"cleanFile"===t?this.attachment.encodedFile.setValue(null):(e.resId=this.attachment.resIdMaster.value,this.appAttachmentViewer.setDatas(e))}getAttachType(t){this.appAttachmentViewer.loadTemplatesByResId(this.attachment.resIdMaster.value,t)}setNewVersion(){this.newVersion||this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.createNewVersion"),msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.newVersion=!0}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}deleteSignedVersion(){this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.deleteSignedVersion"),msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.put(`../rest/attachments/${this.attachment.resId.value}/unsign`,{})),Object(mt.a)(()=>{this.attachment.status.setValue("A_TRA"),this.attachment.signedResponse.setValue(null),(this.privilegeService.hasCurrentUserPrivilege("manage_attachments")||this.headerService.user.id===this.attachment.typist.value)&&(this.editMode=!0,this.enableForm(this.editMode)),this.notify.success(this.translate.instant("lang.signedVersionDeleted")),this.dialogRef.close("success")}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}isEmptyField(t){return null===t.value||(Array.isArray(t.value)?!(t.value.length>0):""===String(t.value))}isEditing(){return!this.functions.empty(this.appAttachmentViewer)&&this.appAttachmentViewer.isEditorLoaded()}closeModal(){this.appAttachmentViewer.isEditingTemplate()?this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.close"),msg:this.translate.instant("lang.editingDocumentMsg")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.dialogRef.close()}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe():this.dialogRef.close()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.a),n.Qb(q.b),n.Qb(q.h),n.Qb(w.a),n.Qb(D.a),n.Qb(Wt.a),n.Qb(y.a),n.Qb(Dt.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-attachment-page"]],viewQuery:function(t,e){var i;1&t&&n.Xc(Vh,!0),2&t&&n.yc(i=n.ec())&&(e.appAttachmentViewer=i.first)},features:[n.Cb([Wt.a])],decls:18,vars:14,consts:[[1,"attach-container"],["class","example-loading-shade",4,"ngIf"],["mat-dialog-title",""],["style","flex: 1;",3,"title",4,"ngIf"],["mat-icon-button","",3,"title","click"],[1,"fa","fa-times"],[1,"attach-content"],[4,"ngIf"],["class","pjList","animationDuration","0","style","height: 100%",3,"selectedIndex",4,"ngIf"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","color","primary",3,"disabled","click",4,"ngIf"],["mat-raised-button","","color","warn",3,"click",4,"ngIf"],["mat-raised-button","","mat-button","",3,"disabled","click"],[1,"example-loading-shade"],[2,"flex","1",3,"title"],[1,"attachment-form","col-md-3","col-sm-12"],["class","attachment-form-item",4,"ngIf"],[1,"attachment-form-item"],[1,"input-form"],["disabled","","matInput","",3,"placeholder","value"],[1,"fieldState"],[1,"fas","fa-asterisk","noMandatory"],[2,"width","100%",3,"label","placeholderLabel","formControlSelect","datas","afterSelected"],["class","fas fa-asterisk fieldRequired",4,"ngIf"],["class","fas fa-exclamation-triangle fieldError",4,"ngIf"],["class","fas fa-check fieldFull",4,"ngIf"],["matInput","",3,"placeholder","formControl"],["class","attachment-form-item","style","display: block;",4,"ngIf"],["matInput","","disabled","",3,"placeholder","title","value"],["matInput","",3,"placeholder","formControl","value"],[1,"input-form",2,"cursor","pointer",3,"click"],["matInput","","readonly","",2,"cursor","pointer",3,"formControl","matDatepicker","placeholder","min"],["matSuffix","",3,"for",4,"ngIf"],[3,"touchUi"],["picker",""],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click",4,"ngIf"],["class","fas fa-asterisk noMandatory",4,"ngIf"],["color","primary",3,"checked","change"],["role","alert",1,"alert-message","alert-message-danger",3,"innerHTML"],[1,"fas","fa-asterisk","fieldRequired"],[1,"fas","fa-exclamation-triangle","fieldError"],[1,"fas","fa-check","fieldFull"],[1,"attachment-form-item",2,"display","block"],["role","alert",1,"alert","alert-info",3,"innerHTML"],[2,"width","100%",3,"control","singleMode"],["matSuffix","",3,"for"],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click"],["color","warn",1,"fa","fa-calendar-times"],["animationDuration","0",1,"pjList",2,"height","100%",3,"selectedIndex"],[3,"label",4,"ngIf"],["mat-tab-label",""],[2,"display","block","height","100%","width","100%","overflow","auto",3,"editMode","resId","resIdMaster","mode","format","attachType","title","triggerEvent"],["appAttachmentViewer",""],[3,"label",4,"ngFor","ngForOf"],[3,"label"],["matTabContent",""],[2,"display","block","height","100%","width","100%","overflow","auto",3,"editMode","resId","title"],["appDocumentViewer",""],[2,"display","block","height","100%","width","100%","overflow","auto",3,"editMode","resId","mode","title"],[2,"color","green"],[2,"color","#135f7f"],[2,"display","block","height","100%","width","100%","overflow","auto",3,"editMode","resId","mode","format","title"],["mat-raised-button","","color","primary",3,"disabled","click"],["mat-raised-button","","color","warn",3,"click"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Oc(1,Rh,2,0,"div",1),n.Wb(2,"h1",2),n.Oc(3,Ah,4,7,"span",3),n.Wb(4,"button",4),n.dc("click",(function(){return e.dialogRef.close()})),n.Rb(5,"mat-icon",5),n.Vb(),n.Vb(),n.Wb(6,"mat-dialog-content",6),n.Oc(7,Zh,67,62,"ng-container",7),n.Oc(8,ru,8,11,"mat-tab-group",8),n.Vb(),n.Wb(9,"div",9),n.Oc(10,cu,3,4,"button",10),n.Oc(11,lu,3,4,"button",10),n.Oc(12,du,3,4,"button",10),n.Oc(13,hu,3,4,"button",10),n.Oc(14,uu,3,3,"button",11),n.Wb(15,"button",12),n.dc("click",(function(){return e.closeModal()})),n.Qc(16),n.ic(17,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(1),n.oc("ngIf",e.sendingData),n.Db(2),n.oc("ngIf",!e.loading),n.Db(1),n.oc("title",e.translate.instant("lang.close")),n.Db(3),n.oc("ngIf",!e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(2),n.oc("ngIf",!e.newVersion),n.Db(1),n.oc("ngIf",!e.newVersion&&e.sendMassMode&&!e.loading),n.Db(1),n.oc("ngIf",e.newVersion),n.Db(1),n.oc("ngIf",e.newVersion&&e.sendMassMode&&!e.loading),n.Db(1),n.oc("ngIf",!e.loading&&"SIGN"===e.attachment.status.value&&e.headerService.user.id==e.attachment.signatoryId.value),n.Db(1),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(17,12,"lang.close")))},directives:[P.t,q.i,k.b,S.a,q.f,q.c,V.c,Y.c,J.b,fr,X.d,X.u,X.j,gt.c,gt.g,gt.h,ae.h,ae.f,te.a,Zd,ae.j,Y.j,Te.c,Te.a,Te.d,Jr,P.s,Te.b],pipes:[g.d,Tt.p,uo,ps,Tt.u],styles:[".attach-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;height:100%}.attach-container[_ngcontent-%COMP%] .mat-tab-body-content, .attach-container[_ngcontent-%COMP%] .mat-tab-body-wrapper{height:100%!important}.attach-container[_ngcontent-%COMP%] .mat-drawer-inner-container{overflow-x:hidden}.mat-dialog-title[_ngcontent-%COMP%]{margin:0!important;display:flex;align-items:center}.attach-content[_ngcontent-%COMP%]{margin:0;padding:0!important;display:block;overflow:auto;max-height:100vh!important;height:calc(100% - 75px)}.attachment-form[_ngcontent-%COMP%]{position:-webkit-sticky;position:sticky;top:0;overflow:auto;height:100%;padding:10px}.attachment-form[_ngcontent-%COMP%] .mat-expansion-panel-body{padding:0}.attachment-form-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding-top:10px;padding-bottom:10px}.attachment-form-item[_ngcontent-%COMP%] .mat-form-field-should-float .mat-form-field-label-wrapper{margin-top:-7px}.attachment-form-item[_ngcontent-%COMP%] .mat-form-field-should-float .mat-form-field-label{background:#fff;width:auto!important;padding-top:5px;padding-left:5px;padding-right:5px}.pjList[_ngcontent-%COMP%]{flex:1}.pjList[_ngcontent-%COMP%] .mat-tab-header{position:-webkit-sticky;position:sticky;z-index:1;height:50px;background:#fff;top:0}.pjList[_ngcontent-%COMP%] .mat-tab-body-wrapper{flex:1}.pjList[_ngcontent-%COMP%] .mat-tab-body-content{display:block;height:100%!important;text-align:center;background:#135f7f;color:#fff}.example-loading-shade[_ngcontent-%COMP%]{background:hsla(0,0%,100%,.7686274509803922);z-index:2}.actions[_ngcontent-%COMP%]{margin:0}.complete[_ngcontent-%COMP%]{color:green;font-weight:700}.fieldState[_ngcontent-%COMP%]{padding-top:0!important}.stateDoc[_ngcontent-%COMP%]{position:absolute;right:20px;top:20px}.documentContent[_ngcontent-%COMP%]{display:flex;flex:1;align-items:center;justify-content:center;text-align:center;background:#135f7f;overflow:auto;color:#fff}.mat-expansion-panel[_ngcontent-%COMP%]{box-shadow:none!important}.mat-expansion-panel-header-title[_ngcontent-%COMP%]{font-size:14px;color:#666}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();function bu(t,e){if(1&t&&(n.Wb(0,"button",18),n.Wb(1,"span"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()),2&t){n.hc();const t=n.zc(20);n.oc("matMenuTriggerFor",t),n.Db(2),n.Rc(n.jc(3,2,"lang.visibleBy"))}}function fu(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",19),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().selectTemplate(i)})),n.Wb(1,"span"),n.Qc(2),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.pc("matTooltip",t.template_content),n.Db(2),n.Rc(t.template_label)}}function mu(t,e){1&t&&(n.Wb(0,"button",20),n.Wb(1,"span"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,1,"lang.noTemplate")))}function gu(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",24),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.selectEntity(a)})),n.Qc(1),n.Vb()}if(2&t){const t=e.$implicit;n.oc("disabled",t.selected)("title",t.entity_label),n.Db(1),n.Sc(" ",t.entity_label," ")}}function vu(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field",21),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.Wb(1,"input",22),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("keydown",(function(e){return n.Dc(t),e.stopPropagation()})),n.ic(2,"translate"),n.Vb(),n.Vb(),n.Ub(3),n.Oc(4,gu,2,3,"button",23),n.Tb()}if(2&t){const t=n.hc();n.Db(1),n.pc("placeholder",n.jc(2,3,"lang.searchEntities")),n.oc("formControl",t.searchTerm),n.Db(3),n.oc("ngForOf",t.entitiesList)}}function _u(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",25),n.dc("click",(function(){return n.Dc(t),n.hc().addNote()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",26),n.Vb()}if(2&t){const t=n.hc();n.pc("title",n.jc(1,2,"lang.add")),n.oc("disabled",""==t.content.trim()||t.loading)}}function yu(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",25),n.dc("click",(function(){return n.Dc(t),n.hc().updateNote()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",26),n.Vb()}if(2&t){const t=n.hc();n.pc("title",n.jc(1,2,"lang.validate")),n.oc("disabled",""==t.content.trim()||t.loading)}}function xu(t,e){1&t&&(n.Wb(0,"span",27),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.all")))}function Cu(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",29),n.dc("click",(function(){n.Dc(t);const e=n.hc(),i=e.$implicit,a=e.index,s=n.hc();return s.removeEntityRestriction(s.entitiesRestriction.indexOf(i.id),a)})),n.ic(1,"translate"),n.Rb(2,"i",30),n.Qc(3),n.Rb(4,"i",31),n.Vb()}if(2&t){const t=n.hc().$implicit;n.pc("title",n.jc(1,2,"lang.restrictedEntity")),n.Db(3),n.Sc(" ",t.entity_label,"\xa0")}}function Ou(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Cu,5,4,"span",28),n.Tb()),2&t){const t=e.$implicit,i=n.hc();n.Db(1),n.oc("ngIf",i.entitiesRestriction.indexOf(t.id)>-1)}}let Du=(()=>{class t{constructor(t,e,i,a,s,o){this.translate=t,this.http=e,this.notify=i,this.headerService=a,this.functions=s,this.latinisePipe=o,this.loading=!1,this.templatesNote=[],this.entities=[],this.entitiesRestriction=[],this.title=this.translate.instant("lang.addNote"),this.content="",this.disableRestriction=!1,this.refreshNotes=new n.o,this.searchTerm=new X.i,this.entitiesList=[]}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){yield this.getEntities(),this.defaultRestriction&&this.setDefaultRestriction(),this.upMode&&(this.content=this.noteContent,(this.content.startsWith(`[${this.translate.instant("lang.avisUserState")}]`)||this.content.startsWith(`[${this.translate.instant("lang.avisUserAsk").toUpperCase()}]`))&&(this.disableRestriction=!0),this.entitiesRestriction=this.entitiesNoteRestriction),this.entitiesList=this.entities,this.searchTerm.valueChanges.pipe(Object(pt.a)(300),Object(mt.a)(t=>{if(t.length>0){let e=this.latinisePipe.transform(t.toLowerCase());this.entitiesList=this.entities.filter(t=>this.latinisePipe.transform(t.entity_label.toLowerCase()).includes(e)||this.latinisePipe.transform(t.entity_id.toLowerCase()).includes(e))}else this.entitiesList=this.entities}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}))}setDefaultRestriction(){this.entitiesRestriction=[],this.http.get(`../rest/resources/${this.resIds[0]}/fields/destination`).pipe(Object(mt.a)(t=>{this.entitiesRestriction=this.headerService.user.entities.map(t=>t.entity_id),-1!==this.entitiesRestriction.indexOf(t.field)||this.functions.empty(t.field)||this.entitiesRestriction.push(t.field),this.entities.filter(t=>this.entitiesRestriction.indexOf(t.id)>-1).forEach(t=>{t.selected=!0})}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}addNote(){this.loading=!0,this.http.post("../rest/notes",{value:this.content,resId:this.resIds[0],entities:this.entitiesRestriction}).subscribe(t=>{this.refreshNotes.emit(this.resIds[0]),this.loading=!1})}updateNote(){this.loading=!0,this.http.put("../rest/notes/"+this.noteId,{value:this.content,resId:this.resIds[0],entities:this.entitiesRestriction}).subscribe(t=>{this.refreshNotes.emit(this.resIds[0]),this.loading=!1})}getNoteContent(){return this.content}setNoteContent(t){this.content=t}getNote(){return{content:this.content,entities:this.entitiesRestriction}}selectTemplate(t){this.content=this.content.length>0?this.content+" "+t.template_content:t.template_content}selectEntity(t){t.selected=!0,this.entitiesRestriction.push(t.id)}getTemplatesNote(){if(0==this.templatesNote.length){let t={};this.functions.empty(this.resIds)||1!=this.resIds.length||(t.resId=this.resIds[0]),this.http.get("../rest/notesTemplates",{params:t}).subscribe(t=>{this.templatesNote=t.templates})}}getEntities(){return new Promise((t,e)=>{if(0==this.entities.length){let e={};this.functions.empty(this.resIds)||1!=this.resIds.length||(e.resId=this.resIds[0]),this.http.get("../rest/entities").pipe(Object(mt.a)(e=>{this.entities=e.entities,t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()}})}removeEntityRestriction(t,e){this.entities[e].selected=!1,this.entitiesRestriction.splice(t,1)}isWritingNote(){return""!==this.content}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(_t.a),n.Qb(Tt.c))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-note-editor"]],inputs:{title:"title",content:"content",resIds:"resIds",addMode:"addMode",upMode:"upMode",noteContent:"noteContent",entitiesNoteRestriction:"entitiesNoteRestriction",noteId:"noteId",defaultRestriction:"defaultRestriction",disableRestriction:"disableRestriction"},outputs:{refreshNotes:"refreshNotes"},decls:34,vars:37,consts:[["appearance","outline",1,"noteEditorContent"],["matInput","",3,"placeholder","ngModel","ngModelChange"],["matSuffix","","color","primary","mat-icon-button","",3,"title","matMenuTriggerFor"],["fontSet","fas","fontIcon","fa-angle-right fa-2x"],["menuMain","matMenu"],["mat-menu-item","",3,"matMenuTriggerFor","menuOpened"],["mat-menu-item","",3,"matMenuTriggerFor",4,"ngIf"],["menuTemplates","matMenu"],[2,"z-index","1","position","sticky","top","0px","text-align","center","font-size","10px","color","white","background","#135F7F","padding","5px","font-weight","bold"],["mat-menu-item","","matTooltipPosition","left",3,"matTooltip","click",4,"ngFor","ngForOf"],["mat-menu-item","","disabled","",4,"ngIf"],["menuEntities","matMenu"],["matMenuContent",""],["color","primary","matSuffix","","mat-icon-button","",3,"title","disabled","click",4,"ngIf"],[2,"overflow","auto","max-height","75px"],[2,"font-size","11px","position","sticky","top","0px"],["class","label label-default noNoteRestriction",4,"ngIf"],[4,"ngFor","ngForOf"],["mat-menu-item","",3,"matMenuTriggerFor"],["mat-menu-item","","matTooltipPosition","left",3,"matTooltip","click"],["mat-menu-item","","disabled",""],["floatLabel","never","appearance","outline",1,"smallInput",2,"margin-bottom","-15px",3,"click"],["matInput","","id","searchTerm","autocomplete","off",3,"placeholder","formControl","click","keydown"],["mat-menu-item","","class","labelFolder",3,"disabled","title","click",4,"ngFor","ngForOf"],["mat-menu-item","",1,"labelFolder",3,"disabled","title","click"],["color","primary","matSuffix","","mat-icon-button","",3,"title","disabled","click"],["fontSet","far","fontIcon","fa-paper-plane fa-2x"],[1,"label","label-default","noNoteRestriction"],["class","label label-default noteRestriction",3,"title","click",4,"ngIf"],[1,"label","label-default","noteRestriction",3,"title","click"],[1,"fa","fa-sitemap"],[1,"fa","fa-times",2,"cursor","pointer"]],template:function(t,e){if(1&t&&(n.Wb(0,"mat-form-field",0),n.Wb(1,"textarea",1),n.dc("ngModelChange",(function(t){return e.content=t})),n.Vb(),n.Wb(2,"button",2),n.ic(3,"translate"),n.Rb(4,"mat-icon",3),n.Vb(),n.Wb(5,"mat-menu",null,4),n.Wb(7,"button",5),n.dc("menuOpened",(function(){return e.getTemplatesNote()})),n.Wb(8,"span"),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Oc(11,bu,4,4,"button",6),n.Vb(),n.Wb(12,"mat-menu",null,7),n.Wb(14,"div",8),n.Qc(15),n.ic(16,"translate"),n.Vb(),n.Oc(17,fu,3,2,"button",9),n.Oc(18,mu,4,3,"button",10),n.Vb(),n.Wb(19,"mat-menu",null,11),n.Wb(21,"div",8),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Oc(24,vu,5,5,"ng-template",12),n.Vb(),n.Oc(25,_u,3,4,"button",13),n.Oc(26,yu,3,4,"button",13),n.Vb(),n.Wb(27,"div",14),n.Wb(28,"div",15),n.Qc(29),n.ic(30,"translate"),n.Vb(),n.Oc(31,xu,3,3,"span",16),n.Oc(32,Ou,2,1,"ng-container",17),n.ic(33,"sortBy"),n.Vb()),2&t){const t=n.zc(6),i=n.zc(13);n.Db(1),n.pc("placeholder",e.title),n.oc("ngModel",e.content),n.Db(1),n.pc("title",n.jc(3,24,"lang.options")),n.oc("matMenuTriggerFor",t),n.Db(3),n.Fb("templateNoteListMenu"),n.Db(2),n.oc("matMenuTriggerFor",i),n.Db(2),n.Rc(n.jc(10,26,"lang.noteTemplates")),n.Db(2),n.oc("ngIf",!e.disableRestriction),n.Db(1),n.Fb("templateNoteListMenu"),n.Db(3),n.Sc(" ",n.jc(16,28,"lang.noteTemplates")," "),n.Db(2),n.oc("ngForOf",e.templatesNote),n.Db(1),n.oc("ngIf",0==e.templatesNote.length),n.Db(1),n.Fb("templateNoteListMenu fixedWidth"),n.Db(3),n.Sc(" ",n.jc(23,30,"lang.entities")," "),n.Db(3),n.oc("ngIf",e.addMode),n.Db(1),n.oc("ngIf",e.upMode),n.Db(2),n.Lc("background",e.upMode&&e.entitiesRestriction.length>0?"#FFEDCC":"white"),n.Db(1),n.Rc(n.jc(30,32,"lang.noteVisibleBy")),n.Db(2),n.oc("ngIf",0===e.entitiesRestriction.length),n.Db(1),n.oc("ngForOf",n.kc(33,34,e.entities,"entity_label"))}},directives:[Y.c,J.b,X.d,X.u,X.x,k.b,Y.j,ne.d,S.a,ne.e,ne.b,P.t,P.s,ne.a,A.b,X.j],pipes:[g.d,Wt.a],styles:[".noteEditorContent[_ngcontent-%COMP%] .mat-icon-button[_ngcontent-%COMP%]:disabled{opacity:.5}.noteEditorContent[_ngcontent-%COMP%] .mat-form-field-flex{align-items:flex-start}.noteEditorContent[_ngcontent-%COMP%] .mat-form-field-wrapper{padding-bottom:0} .templateNoteListMenu .mat-menu-content{padding-top:0;padding-bottom:0;max-height:500px} .fixedWidth .mat-menu-content{min-width:265px} .mat-tooltip{font-size:14px}.noteRestriction[_ngcontent-%COMP%]{background-color:rgba(0,0,0,.4)}.noNoteRestriction[_ngcontent-%COMP%], .noteRestriction[_ngcontent-%COMP%]{white-space:normal;display:inline-block;margin:5px!important;cursor:pointer}.noNoteRestriction[_ngcontent-%COMP%]{background-color:#135f7f}.labelFolder[_ngcontent-%COMP%]{color:#666;font-size:12px;font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}"]}),t})();const wu=["noteEditor"];function Mu(t,e){1&t&&(n.Wb(0,"div",13),n.Rb(1,"mat-spinner",14),n.Vb())}function ku(t,e){1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function Su(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function Iu(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}let Pu=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.loading=!1}ngOnInit(){}onSubmit(){this.loading=!0,0===this.data.resIds.length?this.indexDocumentAndExecuteAction():this.executeAction()}indexDocumentAndExecuteAction(){this.http.post("../rest/resources",this.data.resource).pipe(Object(mt.a)(t=>{this.data.resIds=[t.resId]}),p(()=>this.http.put(this.data.indexActionRoute,{resource:this.data.resIds[0],note:this.noteEditor.getNote()})),Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(),Object(c.a)(!1)))).subscribe()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.data.resIds,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(wu,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:24,vars:17,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,Mu,2,0,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Qc(7),n.ic(8,"translate"),n.Oc(9,ku,3,3,"b",6),n.Oc(10,Su,2,1,"b",6),n.Oc(11,Iu,3,4,"b",6),n.Qc(12," ? "),n.Vb(),n.Wb(13,"div",5),n.Rb(14,"app-note-editor",7,8),n.Vb(),n.Vb(),n.Vb(),n.Rb(16,"span",9),n.Wb(17,"div",10),n.Wb(18,"button",11),n.dc("click",(function(){return e.onSubmit()})),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"button",12),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(3),n.Sc(" ",n.jc(8,11,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(3),n.oc("resIds",e.data.resIds),n.Db(4),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(20,13,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(23,15,"lang.cancel")))},directives:[q.i,q.f,P.t,Du,q.c,k.b,q.d,V.c],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:1;overflow:hidden}"]}),t})();const Vu=["noteEditor"];function Ru(t,e){1&t&&(n.Wb(0,"div",11),n.Rb(1,"mat-spinner",12),n.Vb())}function ju(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.chrono),n.Db(1),n.Sc(" : ",t.fields," ")}}function Au(t,e){if(1&t&&(n.Wb(0,"div",15),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,ju,4,2,"li",16),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.Sc("",n.jc(3,2,"lang.cannotCloseMails")," :"),n.Db(3),n.oc("ngForOf",t.emptyMandatoryFields)}}function Wu(t,e){if(1&t&&(n.Wb(0,"div",15),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.Tc("",n.jc(3,2,"lang.cannotCloseThisMail")," : ",t.emptyMandatoryFields[0].fields,"")}}function Tu(t,e){if(1&t&&(n.Wb(0,"div",13),n.Oc(1,Au,6,4,"div",14),n.Oc(2,Wu,4,4,"div",14),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.data.resIds.length>1),n.Db(1),n.oc("ngIf",t.data.resIds.length<2)}}function Eu(t,e){1&t&&(n.Wb(0,"b",21),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function Fu(t,e){if(1&t&&(n.Wb(0,"b",21),n.Qc(1),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Rc(t.data.resource.chrono)}}function Lu(t,e){if(1&t&&(n.Wb(0,"b",21),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Tc("",t.canCloseResIds.length," ",n.jc(2,2,"lang.elements"),"")}}function Qu(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div",13),n.Qc(2),n.ic(3,"translate"),n.Oc(4,Eu,3,3,"b",17),n.Oc(5,Fu,2,1,"b",17),n.Oc(6,Lu,3,4,"b",17),n.Qc(7," ? "),n.Rb(8,"div",18),n.ic(9,"translate"),n.Vb(),n.Wb(10,"div",13),n.Rb(11,"app-note-editor",19,20),n.Vb(),n.Tb()),2&t){const t=n.hc();n.Db(2),n.Sc(" ",n.jc(3,6,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===t.data.resIds.length),n.Db(1),n.oc("ngIf",1===t.data.resIds.length),n.Db(1),n.oc("ngIf",t.data.resIds.length>1),n.Db(2),n.oc("innerHTML",n.jc(9,8,"lang.updateClosingDate"),n.Ec),n.Db(3),n.oc("resIds",t.canCloseResIds)}}let Nu=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.loading=!1,this.emptyMandatoryFields=[],this.canCloseResIds=[],this.customFields=[]}ngOnInit(){this.data.resIds.length>0?(this.loading=!0,this.checkClose()):this.checkIndexingClose()}checkIndexingClose(){this.http.get("../rest/actions/"+this.data.action.id).pipe(Object(mt.a)(t=>{this.requiredFields=this.functions.empty(t.action.parameters.requiredFields)?[]:t.action.parameters.requiredFields}),p(()=>this.http.get("../rest/customFields")),Object(mt.a)(t=>this.customFields=t.customFields),Object(mt.a)(()=>{let t=[];this.requiredFields.forEach(e=>{for(let i of Object.keys(this.data.resource.customFields))e==="indexingCustomField_"+i&&this.functions.empty(this.data.resource.customFields[i])&&t.push(this.customFields.filter(t=>t.id==i)[0].label)}),this.functions.empty(t)?this.canCloseResIds=[1]:(this.emptyMandatoryFields.push({fields:t.join(", ")}),this.canCloseResIds=[])}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}checkClose(){this.http.post(`../rest/resourcesList/users/${this.data.userId}/groups/${this.data.groupId}/baskets/${this.data.basketId}/actions/${this.data.action.id}/checkCloseWithFieldsAction`,{resources:this.data.resIds}).pipe(Object(mt.a)(t=>{this.emptyMandatoryFields=t.errors,this.canCloseResIds=t.success}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}onSubmit(){this.loading=!0,0===this.data.resIds.length?this.indexDocumentAndExecuteAction():this.executeAction()}indexDocumentAndExecuteAction(){this.http.post("../rest/resources",this.data.resource).pipe(Object(mt.a)(t=>{this.data.resIds=[t.resId]}),p(()=>this.http.put(this.data.indexActionRoute,{resource:this.data.resIds[0],note:this.noteEditor.getNote()})),Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(),Object(c.a)(!1)))).subscribe()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.canCloseResIds,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(()=>{this.dialogRef.close(this.canCloseResIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Xc(Vu,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:16,vars:12,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],["class","col-md-12",4,"ngIf"],[4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],[1,"col-md-12"],["class","alert-message alert-message-danger mailList","role","alert",4,"ngIf"],["role","alert",1,"alert-message","alert-message-danger","mailList"],[4,"ngFor","ngForOf"],["color","primary","class","highlight",4,"ngIf"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","30px",3,"innerHTML"],[3,"resIds"],["noteEditor",""],["color","primary",1,"highlight"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,Ru,2,0,"div",3),n.Wb(5,"div",4),n.Oc(6,Tu,3,2,"div",5),n.Oc(7,Qu,13,10,"ng-container",6),n.Vb(),n.Vb(),n.Rb(8,"span",7),n.Wb(9,"div",8),n.Wb(10,"button",9),n.dc("click",(function(){return e.onSubmit()})),n.Qc(11),n.ic(12,"translate"),n.Vb(),n.Wb(13,"button",10),n.Qc(14),n.ic(15,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(2),n.oc("ngIf",e.emptyMandatoryFields.length>0),n.Db(1),n.oc("ngIf",0===e.data.resIds.length||e.canCloseResIds.length>0),n.Db(3),n.oc("disabled",e.loading||0==e.canCloseResIds.length),n.Db(1),n.Rc(n.jc(12,8,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(15,10,"lang.cancel")))},directives:[q.i,q.f,P.t,q.c,k.b,q.d,V.c,P.s,Du],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}"]}),t})();const zu=["noteEditor"],Bu=["appVisaWorkflow"];function Uu(t,e){1&t&&(n.Wb(0,"div",17),n.Rb(1,"mat-spinner",18),n.Vb())}function $u(t,e){if(1&t&&(n.Wb(0,"b",19),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function Hu(t,e){if(1&t&&(n.Wb(0,"b",19),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function Gu(t,e){1&t&&(n.Rb(0,"div",20),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.rejectVisaBack"),n.Ec)}function Xu(t,e){if(1&t&&(n.Rb(0,"div",20),n.ic(1,"translate")),2&t){const t=n.hc();n.oc("innerHTML",n.jc(1,1,"lang.rejectVisaBackUser")+" <b>"+t.appVisaWorkflow.getLastVisaUser().labelToDisplay+"</b>",n.Ec)}}function qu(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function Ku(t,e){if(1&t&&(n.Wb(0,"div",21),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,qu,5,4,"li",22),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Sc(" ",n.jc(3,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.resourcesErrors)}}function Yu(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function Ju(t,e){if(1&t&&(n.Wb(0,"div",23),n.Wb(1,"ul",24),n.Oc(2,Yu,5,4,"li",22),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.oc("ngForOf",t.resourcesWarnings)}}function Zu(t,e){if(1&t&&n.Rb(0,"app-visa-workflow",25,26),2&t){const t=n.hc();n.oc("adminMode",!1)("resId",t.data.resIds[0])}}let tp=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.loading=!1,this.resourcesWarnings=[],this.resourcesErrors=[],this.noResourceToProcess=null}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.loading=!0,yield this.checkRejectVisaBackToPrevious(),this.loading=!1}))}checkRejectVisaBackToPrevious(){return this.resourcesErrors=[],this.resourcesWarnings=[],new Promise((t,e)=>{this.http.post("../rest/resourcesList/users/"+this.data.userId+"/groups/"+this.data.groupId+"/baskets/"+this.data.basketId+"/actions/"+this.data.action.id+"/checkRejectVisa",{resources:this.data.resIds}).subscribe(e=>{this.functions.empty(e.resourcesInformations.warning)||(this.resourcesWarnings=e.resourcesInformations.warning),this.functions.empty(e.resourcesInformations.error)||(this.resourcesErrors=e.resourcesInformations.error,this.noResourceToProcess=this.resourcesErrors.length===this.data.resIds.length),t(!0)},t=>{this.notify.handleSoftErrors(t),this.dialogRef.close()})})}onSubmit(){this.loading=!0,this.executeAction()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.data.resIds,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isValidAction(){return!this.noResourceToProcess}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(zu,!0),n.Xc(Bu,!0)),2&t&&(n.yc(i=n.ec())&&(e.noteEditor=i.first),n.yc(i=n.ec())&&(e.appVisaWorkflow=i.first))},decls:28,vars:21,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],["class","alert-message alert-message-info","role","alert","style","margin-top: 30px;",3,"innerHTML",4,"ngIf"],["class","alert-message alert-message-danger mailList","role","alert",4,"ngIf"],["class","alert-message alert-message-info mailList","role","alert",4,"ngIf"],[3,"adminMode","resId",4,"ngIf"],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","30px",3,"innerHTML"],["role","alert",1,"alert-message","alert-message-danger","mailList"],[4,"ngFor","ngForOf"],["role","alert",1,"alert-message","alert-message-info","mailList"],[2,"margin","0","padding-bottom","0px"],[3,"adminMode","resId"],["appVisaWorkflow",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,Uu,2,0,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Qc(7),n.ic(8,"translate"),n.Oc(9,$u,2,1,"b",6),n.Oc(10,Hu,3,4,"b",6),n.Qc(11," ? "),n.Oc(12,Gu,2,3,"div",7),n.Oc(13,Xu,2,3,"div",7),n.Oc(14,Ku,6,4,"div",8),n.Oc(15,Ju,3,1,"div",9),n.Oc(16,Zu,2,2,"app-visa-workflow",10),n.Vb(),n.Wb(17,"div",5),n.Rb(18,"app-note-editor",11,12),n.Vb(),n.Vb(),n.Vb(),n.Rb(20,"span",13),n.Wb(21,"div",14),n.Wb(22,"button",15),n.dc("click",(function(){return e.onSubmit()})),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Wb(25,"button",16),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(3),n.Sc(" ",n.jc(8,15,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",1===e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(2),n.oc("ngIf",e.data.resIds.length>1),n.Db(1),n.oc("ngIf",1==e.data.resIds.length&&void 0!==e.appVisaWorkflow&&""!==e.appVisaWorkflow.getLastVisaUser()),n.Db(1),n.oc("ngIf",e.resourcesErrors.length>0),n.Db(1),n.oc("ngIf",e.resourcesWarnings.length>0),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(2),n.oc("resIds",e.data.resIds),n.Db(4),n.oc("disabled",e.loading||!e.isValidAction()),n.Db(1),n.Rc(n.jc(24,17,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(27,19,"lang.cancel")))},directives:[q.i,q.f,P.t,Du,q.c,k.b,q.d,V.c,P.s,Ko],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}"]}),t})();const ep=["noteEditor"],ip=["appVisaWorkflow"];function np(t,e){1&t&&(n.Wb(0,"div",17),n.Rb(1,"mat-spinner",18),n.Vb())}function ap(t,e){if(1&t&&(n.Wb(0,"b",19),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function sp(t,e){if(1&t&&(n.Wb(0,"b",19),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function op(t,e){1&t&&(n.Rb(0,"div",20),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.resetVisaWorkflow"),n.Ec)}function rp(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function cp(t,e){if(1&t&&(n.Wb(0,"div",21),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,rp,5,4,"li",22),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Sc(" ",n.jc(3,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.resourcesErrors)}}function lp(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function dp(t,e){if(1&t&&(n.Wb(0,"div",23),n.Wb(1,"ul",24),n.Oc(2,lp,5,4,"li",22),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.oc("ngForOf",t.resourcesWarnings)}}function hp(t,e){if(1&t&&n.Rb(0,"app-visa-workflow",25,26),2&t){const t=n.hc();n.oc("adminMode",!1)("resId",t.data.resIds[0])}}let up=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.loading=!1,this.resourcesWarnings=[],this.resourcesErrors=[],this.noResourceToProcess=null}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.loading=!0,yield this.checkResetVisa(),this.loading=!1}))}checkResetVisa(){return this.resourcesErrors=[],this.resourcesWarnings=[],new Promise((t,e)=>{this.http.post("../rest/resourcesList/users/"+this.data.userId+"/groups/"+this.data.groupId+"/baskets/"+this.data.basketId+"/actions/"+this.data.action.id+"/checkInterruptResetVisa",{resources:this.data.resIds}).subscribe(e=>{this.functions.empty(e.resourcesInformations.warning)||(this.resourcesWarnings=e.resourcesInformations.warning),this.functions.empty(e.resourcesInformations.error)||(this.resourcesErrors=e.resourcesInformations.error,this.noResourceToProcess=this.resourcesErrors.length===this.data.resIds.length),t(!0)},t=>{this.notify.handleSoftErrors(t),this.dialogRef.close()})})}onSubmit(){this.loading=!0,this.executeAction()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.data.resIds,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isValidAction(){return!this.noResourceToProcess}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(ep,!0),n.Xc(ip,!0)),2&t&&(n.yc(i=n.ec())&&(e.noteEditor=i.first),n.yc(i=n.ec())&&(e.appVisaWorkflow=i.first))},decls:27,vars:20,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],["class","alert-message alert-message-info","role","alert","style","margin-top: 30px;",3,"innerHTML",4,"ngIf"],["class","alert-message alert-message-danger mailList","role","alert",4,"ngIf"],["class","alert-message alert-message-info mailList","role","alert",4,"ngIf"],[3,"adminMode","resId",4,"ngIf"],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","30px",3,"innerHTML"],["role","alert",1,"alert-message","alert-message-danger","mailList"],[4,"ngFor","ngForOf"],["role","alert",1,"alert-message","alert-message-info","mailList"],[2,"margin","0","padding-bottom","0px"],[3,"adminMode","resId"],["appVisaWorkflow",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,np,2,0,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Qc(7),n.ic(8,"translate"),n.Oc(9,ap,2,1,"b",6),n.Oc(10,sp,3,4,"b",6),n.Qc(11," ? "),n.Oc(12,op,2,3,"div",7),n.Oc(13,cp,6,4,"div",8),n.Oc(14,dp,3,1,"div",9),n.Oc(15,hp,2,2,"app-visa-workflow",10),n.Vb(),n.Wb(16,"div",5),n.Rb(17,"app-note-editor",11,12),n.Vb(),n.Vb(),n.Vb(),n.Rb(19,"span",13),n.Wb(20,"div",14),n.Wb(21,"button",15),n.dc("click",(function(){return e.onSubmit()})),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Wb(24,"button",16),n.Qc(25),n.ic(26,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(3),n.Sc(" ",n.jc(8,14,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",1===e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(2),n.oc("ngIf",e.data.resIds.length>0),n.Db(1),n.oc("ngIf",e.resourcesErrors.length>0),n.Db(1),n.oc("ngIf",e.resourcesWarnings.length>0),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(2),n.oc("resIds",e.data.resIds),n.Db(4),n.oc("disabled",e.loading||!e.isValidAction()),n.Db(1),n.Rc(n.jc(23,16,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(26,18,"lang.cancel")))},directives:[q.i,q.f,P.t,Du,q.c,k.b,q.d,V.c,P.s,Ko],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}"]}),t})();const pp=["noteEditor"];function bp(t,e){1&t&&(n.Wb(0,"div",17),n.Rb(1,"mat-spinner",18),n.Vb())}function fp(t,e){if(1&t&&(n.Wb(0,"b",19),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function mp(t,e){if(1&t&&(n.Wb(0,"b",19),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function gp(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function vp(t,e){if(1&t&&(n.Wb(0,"div",20),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,gp,5,4,"li",21),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Sc(" ",n.jc(3,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.resourcesErrors)}}function _p(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function yp(t,e){if(1&t&&(n.Wb(0,"div",22),n.Wb(1,"ul",23),n.Oc(2,_p,5,4,"li",21),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.oc("ngForOf",t.resourcesWarnings)}}function xp(t,e){if(1&t&&n.Rb(0,"app-visa-workflow",24,25),2&t){const t=n.hc();n.oc("adminMode",!1)("resId",t.data.resIds[0])}}let Cp=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.loading=!1,this.resourcesWarnings=[],this.resourcesErrors=[],this.noResourceToProcess=null}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.loading=!0,yield this.checkInterruptVisa(),this.loading=!1}))}checkInterruptVisa(){return this.resourcesErrors=[],this.resourcesWarnings=[],new Promise((t,e)=>{this.http.post("../rest/resourcesList/users/"+this.data.userId+"/groups/"+this.data.groupId+"/baskets/"+this.data.basketId+"/actions/"+this.data.action.id+"/checkInterruptResetVisa",{resources:this.data.resIds}).subscribe(e=>{this.functions.empty(e.resourcesInformations.warning)||(this.resourcesWarnings=e.resourcesInformations.warning),this.functions.empty(e.resourcesInformations.error)||(this.resourcesErrors=e.resourcesInformations.error,this.noResourceToProcess=this.resourcesErrors.length===this.data.resIds.length),t(!0)},t=>{this.notify.handleSoftErrors(t),this.dialogRef.close()})})}onSubmit(){this.loading=!0,this.executeAction()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.data.resIds,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isValidAction(){return!this.noResourceToProcess}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(pp,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:28,vars:22,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","30px",3,"innerHTML"],["class","alert-message alert-message-danger mailList","role","alert",4,"ngIf"],["class","alert-message alert-message-info mailList","role","alert",4,"ngIf"],[3,"adminMode","resId",4,"ngIf"],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"],["role","alert",1,"alert-message","alert-message-danger","mailList"],[4,"ngFor","ngForOf"],["role","alert",1,"alert-message","alert-message-info","mailList"],[2,"margin","0","padding-bottom","0px"],[3,"adminMode","resId"],["appVisaWorkflow",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,bp,2,0,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Qc(7),n.ic(8,"translate"),n.Oc(9,fp,2,1,"b",6),n.Oc(10,mp,3,4,"b",6),n.Qc(11," ? "),n.Rb(12,"div",7),n.ic(13,"translate"),n.Oc(14,vp,6,4,"div",8),n.Oc(15,yp,3,1,"div",9),n.Oc(16,xp,2,2,"app-visa-workflow",10),n.Vb(),n.Wb(17,"div",5),n.Rb(18,"app-note-editor",11,12),n.Vb(),n.Vb(),n.Vb(),n.Rb(20,"span",13),n.Wb(21,"div",14),n.Wb(22,"button",15),n.dc("click",(function(){return e.onSubmit()})),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Wb(25,"button",16),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(3),n.Sc(" ",n.jc(8,14,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",1===e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(2),n.oc("innerHTML",n.jc(13,16,"lang.interruptVisaWorkflow"),n.Ec),n.Db(2),n.oc("ngIf",e.resourcesErrors.length>0),n.Db(1),n.oc("ngIf",e.resourcesWarnings.length>0),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(2),n.oc("resIds",e.data.resIds),n.Db(4),n.oc("disabled",e.loading||!e.isValidAction()),n.Db(1),n.Rc(n.jc(24,18,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(27,20,"lang.cancel")))},directives:[q.i,q.f,P.t,Du,q.c,k.b,q.d,V.c,P.s,Ko],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}"]}),t})();const Op=["noteEditor"];function Dp(t,e){1&t&&(n.Wb(0,"div",14),n.Rb(1,"mat-spinner",15),n.Vb())}function wp(t,e){1&t&&(n.Wb(0,"b",16),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function Mp(t,e){if(1&t&&(n.Wb(0,"b",16),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function kp(t,e){if(1&t&&(n.Wb(0,"b",16),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}let Sp=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.loading=!1}ngOnInit(){}onSubmit(){this.loading=!0,0===this.data.resIds.length?this.indexDocumentAndExecuteAction():this.executeAction()}indexDocumentAndExecuteAction(){this.http.post("../rest/resources",this.data.resource).pipe(Object(mt.a)(t=>{this.data.resIds=[t.resId]}),p(()=>this.http.put(this.data.indexActionRoute,{resource:this.data.resIds[0],note:this.noteEditor.getNote()})),Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(),Object(c.a)(!1)))).subscribe()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.data.resIds,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(Op,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:28,vars:23,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","30px",3,"innerHTML"],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,Dp,2,0,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Qc(7),n.ic(8,"translate"),n.Oc(9,wp,3,3,"b",6),n.Oc(10,Mp,2,1,"b",6),n.Oc(11,kp,3,4,"b",6),n.Qc(12," ? "),n.Rb(13,"div",7),n.ic(14,"translate"),n.Rb(15,"div",7),n.ic(16,"translate"),n.Vb(),n.Wb(17,"div",5),n.Rb(18,"app-note-editor",8,9),n.Vb(),n.Vb(),n.Vb(),n.Rb(20,"span",10),n.Wb(21,"div",11),n.Wb(22,"button",12),n.dc("click",(function(){return e.onSubmit()})),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Wb(25,"button",13),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(3),n.Sc(" ",n.jc(8,13,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1===e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(2),n.oc("innerHTML",n.jc(14,15,"lang.updateClosingDate"),n.Ec),n.Db(2),n.oc("innerHTML",n.jc(16,17,"lang.openIndexation"),n.Ec),n.Db(3),n.oc("resIds",e.data.selectedRes),n.Db(4),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(24,19,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(27,21,"lang.cancel")))},directives:[q.i,q.f,P.t,Du,q.c,k.b,q.d,V.c],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}"]}),t})();const Ip=["noteEditor"];function Pp(t,e){1&t&&(n.Wb(0,"div",19),n.Rb(1,"mat-spinner",20),n.Vb())}function Vp(t,e){1&t&&(n.Wb(0,"b",21),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function Rp(t,e){if(1&t&&(n.Wb(0,"b",21),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function jp(t,e){if(1&t&&(n.Wb(0,"b",21),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}let Ap=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.loading=!1,this.acknowledgementSendDate=new Date,this.acknowledgementSendDateEnd=new Date}ngOnInit(){}onSubmit(){this.loading=!0,this.data.resIds.length>0&&this.executeAction()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.data.resIds,note:this.noteEditor.getNote(),data:{send_date:(this.acknowledgementSendDate.getTime()/1e3).toString()}}).pipe(Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(Ip,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:33,vars:28,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","30px",3,"innerHTML"],[1,"col-sm-6",2,"padding-top","10px"],["matInput","",3,"ngModel","max","matDatepicker","placeholder","ngModelChange","focus"],["matSuffix","",3,"for"],[3,"startAt"],["pickerStart",""],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"]],template:function(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,Pp,2,0,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Qc(7),n.ic(8,"translate"),n.Oc(9,Vp,3,3,"b",6),n.Oc(10,Rp,2,1,"b",6),n.Oc(11,jp,3,4,"b",6),n.Qc(12," ? "),n.Rb(13,"div",7),n.ic(14,"translate"),n.Wb(15,"div",8),n.Wb(16,"mat-form-field"),n.Wb(17,"input",9),n.dc("ngModelChange",(function(t){return e.acknowledgementSendDate=t}))("focus",(function(){return n.Dc(t),n.zc(21).open()})),n.ic(18,"translate"),n.Vb(),n.Rb(19,"mat-datepicker-toggle",10),n.Rb(20,"mat-datepicker",11,12),n.Vb(),n.Vb(),n.Vb(),n.Wb(22,"div",5),n.Rb(23,"app-note-editor",13,14),n.Vb(),n.Vb(),n.Vb(),n.Rb(25,"span",15),n.Wb(26,"div",16),n.Wb(27,"button",17),n.dc("click",(function(){return e.onSubmit()})),n.Qc(28),n.ic(29,"translate"),n.Vb(),n.Wb(30,"button",18),n.Qc(31),n.ic(32,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(21);n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(3),n.Sc(" ",n.jc(8,18,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(2),n.oc("innerHTML",n.jc(14,20,"lang.updateAcknowledgementSendDate"),n.Ec),n.Db(4),n.pc("placeholder",n.jc(18,22,"lang.acknowledgementSendDate")),n.oc("ngModel",e.acknowledgementSendDate)("max",e.acknowledgementSendDateEnd)("matDatepicker",t),n.Db(2),n.oc("for",t),n.Db(1),n.oc("startAt",e.acknowledgementSendDate),n.Db(3),n.oc("resIds",e.data.resIds),n.Db(4),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(29,24,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(32,26,"lang.cancel"))}},directives:[q.i,q.f,P.t,Y.c,J.b,X.d,ae.h,X.u,X.x,ae.j,Y.j,ae.f,Du,q.c,k.b,q.d,V.c],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}"]}),t})();const Wp=["noteEditor"];function Tp(t,e){1&t&&(n.Wb(0,"div",14),n.Rb(1,"mat-spinner",15),n.Vb())}function Ep(t,e){1&t&&(n.Wb(0,"b",17),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function Fp(t,e){if(1&t&&(n.Wb(0,"b",17),n.Qc(1),n.Vb()),2&t){const t=n.hc(3);n.Db(1),n.Rc(t.data.resource.chrono)}}function Lp(t,e){if(1&t&&(n.Wb(0,"b",17),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(3);n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function Qp(t,e){if(1&t&&(n.Wb(0,"p"),n.Qc(1),n.ic(2,"translate"),n.Oc(3,Ep,3,3,"b",16),n.Oc(4,Fp,2,1,"b",16),n.Oc(5,Lp,3,4,"b",16),n.Qc(6," ? "),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Sc(" ",n.jc(2,4,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===t.data.resIds.length),n.Db(1),n.oc("ngIf",1==t.data.resIds.length),n.Db(1),n.oc("ngIf",t.data.resIds.length>1)}}function Np(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div"),n.Wb(1,"mat-slide-toggle",18),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).manualAR=e}))("change",(function(e){return n.Dc(t),n.hc(2).toggleArManual(e.checked)})),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.oc("ngModel",t.manualAR),n.Db(1),n.Sc(" ",n.jc(3,2,"lang.editAcknowledgementReceipt"),"")}}function zp(t,e){if(1&t){const t=n.Xb();n.Wb(0,"plugin-select-search",26),n.dc("afterSelected",(function(e){return n.Dc(t),n.hc(3).mergeEmailTemplate(e)})),n.ic(1,"translate"),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(3);n.oc("label",n.jc(1,4,"lang.emailModel"))("placeholderLabel",n.jc(2,6,"lang.emailModel"))("datas",t.availableEmailModels)("formControlSelect",t.templateEmailListForm)}}function Bp(t,e){if(1&t){const t=n.Xb();n.Wb(0,"plugin-select-search",26,27),n.dc("afterSelected",(function(e){return n.Dc(t),n.hc(3).mergeSignEmailTemplate(e)})),n.ic(2,"translate"),n.ic(3,"translate"),n.Vb()}if(2&t){const t=n.hc(3);n.oc("label",n.jc(2,4,"lang.emailSignatures"))("placeholderLabel",n.jc(3,6,"lang.emailSignatures"))("datas",t.availableSignEmailModels)("formControlSelect",t.emailSignListForm)}}function Up(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div"),n.Wb(1,"mat-form-field",19),n.Wb(2,"span",20),n.Wb(3,"span",21),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Qc(6,"[AR]\xa0"),n.Vb(),n.Wb(7,"input",22),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).emailsubject=e})),n.Vb(),n.Vb(),n.Wb(8,"div",23),n.Oc(9,zp,3,8,"plugin-select-search",24),n.Oc(10,Bp,4,8,"plugin-select-search",24),n.Vb(),n.Wb(11,"textarea",25),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).emailContent=e})),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(4),n.Sc("",n.jc(5,5,"lang.object"),"\xa0:\xa0"),n.Db(3),n.oc("ngModel",t.emailsubject),n.Db(2),n.oc("ngIf",t.availableEmailModels.length>0),n.Db(1),n.oc("ngIf",t.availableSignEmailModels.length>0),n.Db(1),n.oc("ngModel",t.emailContent)}}function $p(t,e){if(1&t&&(n.Wb(0,"li"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.alt_identifier," ")}}function Hp(t,e){if(1&t&&(n.Wb(0,"div"),n.Wb(1,"div",28),n.Wb(2,"p"),n.Wb(3,"b"),n.Qc(4),n.Vb(),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Wb(7,"ul"),n.Oc(8,$p,2,1,"li",29),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(4),n.Rc(t.acknowledgement.alreadySend.number),n.Db(1),n.Sc(" ",n.jc(6,3,"lang.arAlreadySend")," : "),n.Db(3),n.oc("ngForOf",t.acknowledgement.alreadySend.list)}}function Gp(t,e){if(1&t&&(n.Wb(0,"li"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.alt_identifier," ")}}function Xp(t,e){if(1&t&&(n.Wb(0,"div"),n.Wb(1,"div",28),n.Wb(2,"p"),n.Wb(3,"b"),n.Qc(4),n.Vb(),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Wb(7,"ul"),n.Oc(8,Gp,2,1,"li",29),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(4),n.Rc(t.acknowledgement.alreadyGenerated.number),n.Db(1),n.Sc(" ",n.jc(6,3,"lang.arAlreadyGenerated")," : "),n.Db(3),n.oc("ngForOf",t.acknowledgement.alreadyGenerated.list)}}function qp(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Qc(4),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(null!=t.alt_identifier?t.alt_identifier:n.jc(3,2,"lang.undefined")),n.Db(2),n.Sc(" : ",t.info," ")}}function Kp(t,e){if(1&t&&(n.Wb(0,"div"),n.Wb(1,"div",28),n.Wb(2,"p"),n.Wb(3,"b"),n.Qc(4),n.Vb(),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Wb(7,"ul"),n.Oc(8,qp,5,4,"li",29),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(4),n.Rc(t.acknowledgement.noSendAR.number),n.Db(1),n.Sc(" ",n.jc(6,3,"lang.canNotSendAr")," :"),n.Db(3),n.oc("ngForOf",t.acknowledgement.noSendAR.list)}}function Yp(t,e){if(1&t&&(n.Wb(0,"div"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=n.hc(3);n.Db(2),n.Rc(t.acknowledgement.sendEmail),n.Db(1),n.Sc(" ",n.jc(4,2,"lang.readyToSendElectronicAr")," ")}}function Jp(t,e){if(1&t&&(n.Wb(0,"div"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=n.hc(3);n.Db(2),n.Rc(t.acknowledgement.sendPaper),n.Db(1),n.Sc(" ",n.jc(4,2,"lang.readyToGeneratePaperAr")," ")}}function Zp(t,e){if(1&t&&(n.Wb(0,"div",30),n.Oc(1,Yp,5,4,"div",11),n.Oc(2,Jp,5,4,"div",11),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("ngIf",t.acknowledgement.sendEmail),n.Db(1),n.oc("ngIf",t.acknowledgement.sendPaper)}}function tb(t,e){if(1&t&&(n.Wb(0,"div",10),n.Rb(1,"app-note-editor",31,32),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("resIds",t.data.resIds)}}function eb(t,e){if(1&t&&(n.Wb(0,"div",7),n.Oc(1,Tp,2,0,"div",8),n.Wb(2,"div",9),n.Wb(3,"div",10),n.Oc(4,Qp,7,6,"p",11),n.Oc(5,Np,4,4,"div",11),n.Oc(6,Up,12,7,"div",11),n.Oc(7,Hp,9,5,"div",11),n.Oc(8,Xp,9,5,"div",11),n.Oc(9,Kp,9,5,"div",11),n.Oc(10,Zp,3,2,"div",12),n.Vb(),n.Oc(11,tb,3,1,"div",13),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.loading),n.Db(3),n.oc("ngIf","both"==t.arMode||t.acknowledgement.sendEmail||t.acknowledgement.sendPaper),n.Db(1),n.oc("ngIf","both"==t.arMode),n.Db(1),n.oc("ngIf",t.manualAR&&t.realResSelected.length>0),n.Db(1),n.oc("ngIf",t.acknowledgement.alreadySend.number),n.Db(1),n.oc("ngIf",t.acknowledgement.alreadyGenerated.number),n.Db(1),n.oc("ngIf",t.acknowledgement.noSendAR.number),n.Db(1),n.oc("ngIf",t.acknowledgement.sendEmail||t.acknowledgement.sendPaper),n.Db(1),n.oc("ngIf",t.acknowledgement.sendEmail||t.acknowledgement.sendPaper)}}let ib=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.functions=a,this.data=s,this.loading=!1,this.loadingInit=!1,this.emailsubject="",this.emailContent="",this.availableEmailModels=[],this.availableSignEmailModels=[],this.emailSignListForm=new X.i,this.templateEmailListForm=new X.i,this.acknowledgement={alReadyGenerated:{},alReadySend:{},noSendAR:{},sendEmail:0,sendPaper:0,sendList:[]},this.realResSelected=[],this.currentMode="",this.manualAR=!1,this.arMode="auto"}ngOnInit(){this.loadingInit=!0,this.checkAcknowledgementReceipt()}checkAcknowledgementReceipt(){this.http.post("../rest/resourcesList/users/"+this.data.userId+"/groups/"+this.data.groupId+"/baskets/"+this.data.basketId+"/actions/"+this.data.action.id+"/checkAcknowledgementReceipt?"+this.currentMode,{resources:this.data.resIds}).subscribe(t=>{this.acknowledgement=t,this.realResSelected=t.sendList,this.loadingInit=!1,this.arMode=t.mode,this.arModeInit(this.arMode)},t=>{this.notify.error(t.error.errors),this.dialogRef.close(),this.loadingInit=!1})}arModeInit(t){"manual"===t&&this.toggleArManual(!0)}onSubmit(){this.loading=!0,this.data.resIds.length>0&&this.executeAction()}ngOnDestroy(){tinymce.remove()}executeAction(){let t=null;if(this.manualAR){if(this.functions.empty(tinymce.get("emailSignature").getContent()))return this.notify.error(this.translate.instant("lang.arContentIsEmpty")),this.loading=!1,!1;t={subject:this.emailsubject,content:tinymce.get("emailSignature").getContent(),manual:!0}}this.http.put(this.data.processActionRoute,{resources:this.realResSelected,note:this.noteEditor.getNote(),data:t}).pipe(Object(mt.a)(t=>{t&&null!=t.data&&this.downloadAcknowledgementReceipt(t.data),t&&null!=t.errors&&this.notify.error(t.errors),this.dialogRef.close(this.realResSelected)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}downloadAcknowledgementReceipt(t){this.loadingExport=!0,this.http.post("../rest/acknowledgementReceipts",{resources:t},{responseType:"blob"}).subscribe(t=>{let e,i,n,a,s=document.createElement("a");s.href=window.URL.createObjectURL(t),e=new Date,i=e.getDate(),n=e.getMonth()+1,a=e.getFullYear(),i<10&&(i="0"+i),n<10&&(n="0"+n),e=i+"-"+n+"-"+a,s.setAttribute("download","acknowledgement_receipt_maarch_"+e+".pdf"),document.body.appendChild(s),s.click(),this.loadingExport=!1},t=>{this.notify.handleErrors(t)})}toggleArManual(t){t?(this.currentMode="mode=manual",this.checkAcknowledgementReceipt(),this.manualAR=!0,1===this.data.resIds.length&&(this.emailsubject=this.data.resource.subject,this.emailsubject=this.emailsubject.substring(0,100)),this.initEmailModelsList(),this.initSignEmailModelsList(),setTimeout(()=>{this.initMce()},800)):(this.currentMode="mode=auto",this.checkAcknowledgementReceipt(),tinymce.remove(),this.manualAR=!1)}initMce(){tinymce.init({selector:"textarea#emailSignature",base_url:"../node_modules/tinymce/",readonly:!1,suffix:".min",language:this.translate.instant("lang.langISO").replace("-","_"),language_url:`../node_modules/tinymce-i18n/langs/${this.translate.instant("lang.langISO").replace("-","_")}.js`,menubar:!1,statusbar:!1,plugins:["autolink","autoresize"],external_plugins:{maarch_b64image:"../../src/frontend/plugins/tinymce/maarch_b64image/plugin.min.js"},toolbar_sticky:!0,toolbar_drawer:"floating",toolbar:"undo redo | fontselect fontsizeselect | bold italic underline strikethrough forecolor | maarch_b64image | alignleft aligncenter alignright alignjustify bullist numlist outdent indent | removeformat"})}mergeEmailTemplate(t){this.templateEmailListForm.reset(),this.http.post(`../rest/templates/${t}/mergeEmail`,{data:{resId:this.data.resIds[0]}}).pipe(Object(mt.a)(t=>{var e=document.createElement("div");if(e.innerHTML=tinymce.get("emailSignature").getContent(),e.getElementsByClassName("signature").length>0){const i=e.getElementsByClassName("signature")[0].innerHTML;e.getElementsByClassName("signature")[0].remove(),tinymce.get("emailSignature").setContent(`${e.innerHTML}${t.mergedDocument}<div class="signature">${i}</div>`)}else tinymce.get("emailSignature").setContent(`${tinymce.get("emailSignature").getContent()}${t.mergedDocument}`)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}mergeSignEmailTemplate(t){this.emailSignListForm.reset(),this.http.get("../rest/currentUser/emailSignatures/"+t).pipe(Object(mt.a)(t=>{var e=document.createElement("div");e.innerHTML=tinymce.get("emailSignature").getContent(),e.getElementsByClassName("signature").length>0?(e.getElementsByClassName("signature")[0].remove(),tinymce.get("emailSignature").setContent(`${e.innerHTML}<div class="signature">${t.emailSignature.content}</div>`)):tinymce.get("emailSignature").setContent(`${tinymce.get("emailSignature").getContent()}<div class="signature">${t.emailSignature.content}</div>`)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}initEmailModelsList(){0===this.availableEmailModels.length&&1===this.data.resIds.length&&this.http.get(`../rest/resources/${this.data.resIds[0]}/emailTemplates`).pipe(Object(mt.a)(t=>{this.availableEmailModels=t.templates}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}initSignEmailModelsList(){0===this.availableSignEmailModels.length&&1===this.data.resIds.length&&this.http.get("../rest/currentUser/emailSignatures").pipe(Object(mt.a)(t=>{this.availableSignEmailModels=t.emailSignatures}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(_t.a),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Xc(Wp,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:12,vars:10,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content","",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[1,"col-md-12"],[4,"ngIf"],["class","alert-message alert-message-success acknowledgementList","role","alert","style","padding: 10px;",4,"ngIf"],["class","col-md-12",4,"ngIf"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary","class","highlight",4,"ngIf"],["color","primary",1,"highlight"],["color","primary",3,"ngModel","ngModelChange","change"],["floatLabel","never"],["matPrefix",""],[1,"attachLabel"],["matInput","","maxlength","100",3,"ngModel","ngModelChange"],[1,"models"],[3,"label","placeholderLabel","datas","formControlSelect","afterSelected",4,"ngIf"],["name","emailSignature","id","emailSignature",2,"padding-top","10px",3,"ngModel","ngModelChange"],[3,"label","placeholderLabel","datas","formControlSelect","afterSelected"],["templateList",""],["role","alert",1,"alert-message","alert-message-info","acknowledgementList"],[4,"ngFor","ngForOf"],["role","alert",1,"alert-message","alert-message-success","acknowledgementList",2,"padding","10px"],[3,"resIds"],["noteEditor",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Oc(3,eb,12,9,"div",2),n.Rb(4,"span",3),n.Wb(5,"div",4),n.Wb(6,"button",5),n.dc("click",(function(){return e.onSubmit()})),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Wb(9,"button",6),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(1),n.oc("ngIf",!e.loadingInit),n.Db(3),n.oc("disabled",e.loading||!e.acknowledgement.sendEmail&&!e.acknowledgement.sendPaper),n.Db(1),n.Rc(n.jc(8,6,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(11,8,"lang.cancel")))},directives:[q.i,P.t,q.c,k.b,q.d,q.f,V.c,te.a,X.u,X.x,Y.c,Y.i,J.b,X.d,X.p,fr,P.s,Du],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:1;overflow:hidden}.acknowledgementList[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{font-size:12px;max-height:100px;overflow:auto;padding-left:25px;padding-right:5px;padding-bottom:10px;margin-top:10px}.acknowledgementList[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;text-decoration:underline}.acknowledgementList[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{font-size:120%}.models[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;grid-gap:20px;padding-top:10px;margin-bottom:10px}.attachLabel[_ngcontent-%COMP%]{color:#135f7f}"]}),t})();const nb=["noteEditor"];function ab(t,e){1&t&&(n.Wb(0,"div",14),n.Rb(1,"mat-spinner",15),n.Vb())}function sb(t,e){1&t&&(n.Wb(0,"b",16),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function ob(t,e){if(1&t&&(n.Wb(0,"b",16),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function rb(t,e){if(1&t&&(n.Wb(0,"b",16),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}let cb=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.loading=!1}ngOnInit(){}onSubmit(){this.loading=!0,this.data.resIds.length>0&&this.executeAction()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.data.resIds,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(nb,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:26,vars:20,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","30px",3,"innerHTML"],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,ab,2,0,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Qc(7),n.ic(8,"translate"),n.Oc(9,sb,3,3,"b",6),n.Oc(10,ob,2,1,"b",6),n.Oc(11,rb,3,4,"b",6),n.Qc(12," ? "),n.Rb(13,"div",7),n.ic(14,"translate"),n.Vb(),n.Wb(15,"div",5),n.Rb(16,"app-note-editor",8,9),n.Vb(),n.Vb(),n.Vb(),n.Rb(18,"span",10),n.Wb(19,"div",11),n.Wb(20,"button",12),n.dc("click",(function(){return e.onSubmit()})),n.Qc(21),n.ic(22,"translate"),n.Vb(),n.Wb(23,"button",13),n.Qc(24),n.ic(25,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(3),n.Sc(" ",n.jc(8,12,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(2),n.oc("innerHTML",n.jc(14,14,"lang.updateDepartureDate"),n.Ec),n.Db(3),n.oc("resIds",e.data.resIds),n.Db(4),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(22,16,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(25,18,"lang.cancel")))},directives:[q.i,q.f,P.t,Du,q.c,k.b,q.d,V.c],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}"]}),t})();const lb=["noteEditor"];function db(t,e){1&t&&(n.Wb(0,"div",13),n.Rb(1,"mat-spinner",14),n.Vb())}function hb(t,e){1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function ub(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function pb(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}let bb=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.loading=!1}ngOnInit(){}onSubmit(){this.loading=!0,this.data.resIds.length>0&&this.executeAction()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.data.resIds,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(lb,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:24,vars:17,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,db,2,0,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Qc(7),n.ic(8,"translate"),n.Oc(9,hb,3,3,"b",6),n.Oc(10,ub,2,1,"b",6),n.Oc(11,pb,3,4,"b",6),n.Qc(12," ? "),n.Vb(),n.Wb(13,"div",5),n.Rb(14,"app-note-editor",7,8),n.Vb(),n.Vb(),n.Vb(),n.Rb(16,"span",9),n.Wb(17,"div",10),n.Wb(18,"button",11),n.dc("click",(function(){return e.onSubmit()})),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"button",12),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(3),n.Sc(" ",n.jc(8,11,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(3),n.oc("resIds",e.data.resIds),n.Db(4),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(20,13,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(23,15,"lang.cancel")))},directives:[q.i,q.f,P.t,Du,q.c,k.b,q.d,V.c],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:1;overflow:hidden}"]}),t})();const fb=["noteEditor"];function mb(t,e){1&t&&(n.Wb(0,"div",13),n.Rb(1,"mat-spinner",14),n.Vb())}function gb(t,e){1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function vb(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function _b(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}let yb=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.loading=!1}ngOnInit(){}onSubmit(){this.loading=!0,this.data.resIds.length>0&&this.executeAction()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.data.resIds,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(fb,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:24,vars:17,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,mb,2,0,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Qc(7),n.ic(8,"translate"),n.Oc(9,gb,3,3,"b",6),n.Oc(10,vb,2,1,"b",6),n.Oc(11,_b,3,4,"b",6),n.Qc(12," ? "),n.Vb(),n.Wb(13,"div",5),n.Rb(14,"app-note-editor",7,8),n.Vb(),n.Vb(),n.Vb(),n.Rb(16,"span",9),n.Wb(17,"div",10),n.Wb(18,"button",11),n.dc("click",(function(){return e.onSubmit()})),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"button",12),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(3),n.Sc(" ",n.jc(8,11,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(3),n.oc("resIds",e.data.resIds),n.Db(4),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(20,13,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(23,15,"lang.cancel")))},directives:[q.i,q.f,P.t,Du,q.c,k.b,q.d,V.c],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:1;overflow:hidden}"]}),t})();const xb=["noteEditor"];function Cb(t,e){1&t&&(n.Wb(0,"div",13),n.Rb(1,"mat-spinner",14),n.Vb())}function Ob(t,e){1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function Db(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function wb(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}let Mb=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.loading=!1}ngOnInit(){}onSubmit(){this.loading=!0,this.data.resIds.length>0&&this.executeAction()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.data.resIds,data:{basketId:this.data.basketId},note:this.noteEditor.getNote()}).pipe(Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(xb,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:24,vars:17,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,Cb,2,0,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Qc(7),n.ic(8,"translate"),n.Oc(9,Ob,3,3,"b",6),n.Oc(10,Db,2,1,"b",6),n.Oc(11,wb,3,4,"b",6),n.Qc(12," ? "),n.Vb(),n.Wb(13,"div",5),n.Rb(14,"app-note-editor",7,8),n.Vb(),n.Vb(),n.Vb(),n.Rb(16,"span",9),n.Wb(17,"div",10),n.Wb(18,"button",11),n.dc("click",(function(){return e.onSubmit()})),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"button",12),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(3),n.Sc(" ",n.jc(8,11,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(3),n.oc("resIds",e.data.resIds),n.Db(4),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(20,13,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(23,15,"lang.cancel")))},directives:[q.i,q.f,P.t,Du,q.c,k.b,q.d,V.c],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:1;overflow:hidden}"]}),t})(),kb=(()=>{class t{constructor(t,e){this.translate=t,this.data=e}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:10,vars:7,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-icon-button","",3,"title","mat-dialog-close"],[1,"fa","fa-times-circle","fa-2x"],["mat-dialog-content","",2,"min-height","200px"],[2,"display","block","height","100%","width","100%","overflow","auto",3,"editMode","resId","title"],["appDocumentViewer",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Wb(2,"span"),n.Qc(3),n.Vb(),n.Wb(4,"button",2),n.ic(5,"translate"),n.Rb(6,"mat-icon",3),n.Vb(),n.Vb(),n.Wb(7,"div",4),n.Rb(8,"app-document-viewer",5,6),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Sc(" ",e.data.resource.chrono," "),n.Db(1),n.pc("title",n.jc(5,5,"lang.close")),n.Db(4),n.oc("editMode",!1)("resId",e.data.resource.resId)("title",e.data.resource.chrono+" - "+e.data.resource.subject))},directives:[q.i,k.b,q.d,S.a,q.f,Jr],pipes:[g.d],styles:[""]}),t})(),Sb=(()=>{class t{constructor(t,e,i){this.translate=t,this.http=e,this.notify=i,this.loading=!1,this.currentAccount=null,this.usersWorkflowList=[],this.injectDatasParam={resId:0,editable:!0}}ngOnInit(){}isValidParaph(){return 0!==this.additionalsInfos.attachments.length}getRessources(){return this.additionalsInfos.attachments.map(t=>t.res_id)}getDatas(){return this.externalSignatoryBookDatas}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-i-paraph"]],inputs:{additionalsInfos:"additionalsInfos",externalSignatoryBookDatas:"externalSignatoryBookDatas"},decls:6,vars:3,consts:[[1,"col-md-12"],["role","alert",1,"alert-message","alert-message-info"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"div"),n.Wb(2,"div",1),n.Wb(3,"p"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(4),n.Rc(n.jc(5,1,"lang.sentToIParapheur")))},pipes:[g.d],styles:[".alert-message[_ngcontent-%COMP%]{margin:0}"]}),t})();function Ib(t,e){1&t&&(n.Wb(0,"div"),n.Wb(1,"div",4),n.Wb(2,"p"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Rc(n.jc(4,1,"lang.noIxbusNature")))}function Pb(t,e){1&t&&(n.Wb(0,"div"),n.Wb(1,"div",4),n.Wb(2,"p"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Rc(n.jc(4,1,"lang.noWorkflowIxbus")))}function Vb(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Ib,5,3,"div",3),n.Oc(2,Pb,5,3,"div",3),n.Tb()),2&t){const t=n.hc(2);n.Db(1),n.oc("ngIf",0==t.natures.length),n.Db(1),n.oc("ngIf",0==t.messagesModel.length)}}function Rb(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"div",5),n.Wb(2,"div",6),n.Wb(3,"plugin-select-search",7),n.dc("afterSelected",(function(){n.Dc(t);const e=n.hc(2);return e.ixbusDatas.nature=e.selectNature.value})),n.ic(4,"translate"),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(6,"div",5),n.Wb(7,"div",6),n.Wb(8,"plugin-select-search",7),n.dc("afterSelected",(function(){n.Dc(t);const e=n.hc(2);return e.ixbusDatas.messageModel=e.selectWorkflow.value})),n.ic(9,"translate"),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(11,"div",8),n.Wb(12,"div",6),n.Wb(13,"mat-form-field"),n.Wb(14,"input",9),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).ixbusDatas.login=e})),n.ic(15,"translate"),n.ic(16,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(17,"div",8),n.Wb(18,"div",6),n.Wb(19,"mat-form-field"),n.Wb(20,"input",10),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).ixbusDatas.password=e})),n.ic(21,"translate"),n.ic(22,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(23,"mat-radio-group",11),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).ixbusDatas.signatureMode=e})),n.Wb(24,"mat-radio-button",12),n.Qc(25),n.ic(26,"translate"),n.Vb(),n.Wb(27,"mat-radio-button",13),n.Qc(28),n.ic(29,"translate"),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=n.hc(2);n.Db(3),n.Fb(""),n.oc("showLabel",!0)("label",n.jc(4,25,"lang.natureIxbusParapheur"))("placeholderLabel",n.jc(5,27,"lang.natureIxbusParapheur"))("formControlSelect",t.selectNature)("datas",t.natures)("required",!0),n.Db(5),n.Fb(""),n.oc("showLabel",!0)("label",n.jc(9,29,"lang.workflowModelIxbus"))("placeholderLabel",n.jc(10,31,"lang.workflowModelIxbus"))("formControlSelect",t.selectWorkflow)("datas",t.messagesModel)("required",!0),n.Db(6),n.pc("title",n.jc(15,33,"lang.loginIxbus")),n.pc("placeholder",n.jc(16,35,"lang.loginIxbus")),n.oc("ngModel",t.ixbusDatas.login),n.Db(6),n.pc("title",n.jc(21,37,"lang.passwordIxbus")),n.pc("placeholder",n.jc(22,39,"lang.passwordIxbus")),n.oc("ngModel",t.ixbusDatas.password),n.Db(3),n.oc("ngModel",t.ixbusDatas.signatureMode),n.Db(2),n.Sc(" ",n.jc(26,41,"lang.handwrittenSignature")," "),n.Db(3),n.Sc(" ",n.jc(29,43,"lang.electronicSignature")," ")}}function jb(t,e){if(1&t&&(n.Wb(0,"div",1),n.Wb(1,"div"),n.Wb(2,"div",2),n.Wb(3,"p"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Oc(6,Vb,3,2,"ng-container",3),n.Oc(7,Rb,30,45,"ng-container",3),n.Vb()),2&t){const t=n.hc();n.Db(4),n.Rc(n.jc(5,3,"lang.sentToIxbusParapheur")),n.Db(2),n.oc("ngIf",0==t.natures.length||0==t.messagesModel.length),n.Db(1),n.oc("ngIf",0!=t.natures.length&&0!=t.messagesModel.length)}}let Ab=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.localStorage=a,this.loading=!0,this.currentAccount=null,this.usersWorkflowList=[],this.natures=[],this.messagesModel=[],this.ixbusDatas={nature:"",messageModel:"",login:"",password:"",signatureMode:"manual"},this.injectDatasParam={resId:0,editable:!0},this.selectNature=new X.i,this.selectWorkflow=new X.i}ngOnInit(){this.natures=this.additionalsInfos.ixbus.natures.map(t=>({id:t,label:t})),this.messagesModel=this.additionalsInfos.ixbus.messagesModel.map(t=>({id:t,label:t})),null!==this.localStorage.get("ixBusSignatureMode_"+this.headerService.user.id)&&(this.ixbusDatas.signatureMode=this.localStorage.get("ixBusSignatureMode_"+this.headerService.user.id)),this.loading=!1}isValidParaph(){return!!(0!==this.additionalsInfos.attachments.length&&0!==this.natures.length&&0!==this.messagesModel.length&&this.ixbusDatas.nature&&this.ixbusDatas.messageModel&&this.ixbusDatas.login&&this.ixbusDatas.password)}getRessources(){return this.additionalsInfos.attachments.map(t=>t.res_id)}getDatas(){return this.localStorage.save("ixBusSignatureMode_"+this.headerService.user.id,this.ixbusDatas.signatureMode),this.externalSignatoryBookDatas={ixbus:this.ixbusDatas,steps:[]},this.externalSignatoryBookDatas}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(Ut.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-ixbus-paraph"]],inputs:{additionalsInfos:"additionalsInfos",externalSignatoryBookDatas:"externalSignatoryBookDatas"},decls:1,vars:1,consts:[["class","col-md-12",4,"ngIf"],[1,"col-md-12"],["role","alert",1,"alert-message","alert-message-info"],[4,"ngIf"],["role","alert",1,"alert-message","alert-message-danger","mailList"],[1,"form-group",2,"margin-top","10px"],[1,"col-sm-12"],[2,"width","100%",3,"showLabel","label","placeholderLabel","formControlSelect","datas","required","afterSelected"],[1,"form-group"],["matInput","","required","","name","loginIxbus","id","loginIxbus","type","text",3,"ngModel","title","placeholder","ngModelChange"],["matInput","","required","","name","passwordIxbus","id","passwordIxbus","type","password",3,"ngModel","title","placeholder","ngModelChange"],["id","handwrittenSignature","name","handwrittenSignature","color","primary",3,"ngModel","ngModelChange"],["value","manual","color","primary"],["value","electronic","color","primary",2,"margin-left","5px"]],template:function(t,e){1&t&&n.Oc(0,jb,8,5,"div",0),2&t&&n.oc("ngIf",!e.loading)},directives:[P.t,fr,Y.c,J.b,X.d,X.F,X.u,X.x,hc.b,hc.a],pipes:[g.d],styles:[".alert-message[_ngcontent-%COMP%]{margin:0}"]}),t})(),Wb=(()=>{class t{constructor(t,e){this.translate=t,this.http=e,this.loading=!1,this.currentAccount=null,this.usersWorkflowList=[],this.injectDatasParam={resId:0,editable:!0}}ngOnInit(){}isValidParaph(){return 0!==this.additionalsInfos.attachments.length}getRessources(){return this.additionalsInfos.attachments.map(t=>t.res_id)}getDatas(){return this.externalSignatoryBookDatas}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-fast-paraph"]],inputs:{additionalsInfos:"additionalsInfos",externalSignatoryBookDatas:"externalSignatoryBookDatas"},decls:6,vars:3,consts:[[1,"col-md-12"],["role","alert",1,"alert-message","alert-message-info"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"div"),n.Wb(2,"div",1),n.Wb(3,"p"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(4),n.Rc(n.jc(5,1,"lang.sentToFastParapheur")))},pipes:[g.d],styles:[".alert-message[_ngcontent-%COMP%]{margin:0}"]}),t})();const Tb=["appVisaWorkflow"];function Eb(t,e){if(1&t&&(n.Wb(0,"div",7),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){n.hc();const t=n.zc(7);n.Db(2),n.Rc(t.checkExternalSignatoryBook().join(", ")),n.Db(1),n.Sc(" ",n.jc(4,2,"lang.usersMissingInSignatureBook")," ! ")}}function Fb(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function Lb(t,e){if(1&t&&(n.Wb(0,"div",0),n.Wb(1,"div"),n.Wb(2,"div",8),n.Wb(3,"p"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Wb(6,"ul"),n.Oc(7,Fb,5,4,"li",9),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.Sc(" ",n.jc(5,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.additionalsInfos.visaWorkflowError)}}let Qb=(()=>{class t{constructor(t,e){this.translate=t,this.http=e,this.loading=!1,this.currentAccount=null,this.usersWorkflowList=[],this.injectDatasParam={resId:0,editable:!0}}ngOnInit(){void 0!==this.additionalsInfos.destinationId&&""!==this.additionalsInfos.destinationId&&setTimeout(()=>{this.appVisaWorkflow.loadListModel(this.additionalsInfos.destinationId)},0)}isValidParaph(){return!(0===this.additionalsInfos.attachments.length||0===this.appVisaWorkflow.getWorkflow().length||this.appVisaWorkflow.checkExternalSignatoryBook().length>0)}getRessources(){return this.additionalsInfos.attachments.map(t=>t.res_id)}getDatas(){return this.appVisaWorkflow.getWorkflow().forEach(t=>{this.externalSignatoryBookDatas.steps.push({externalId:t.externalId.maarchParapheur,action:t.requested_signature?"sign":"visa"})}),this.externalSignatoryBookDatas}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-maarch-paraph"]],viewQuery:function(t,e){var i;1&t&&n.Xc(Tb,!0),2&t&&n.yc(i=n.ec())&&(e.appVisaWorkflow=i.first)},inputs:{additionalsInfos:"additionalsInfos",externalSignatoryBookDatas:"externalSignatoryBookDatas"},decls:10,vars:8,consts:[[1,"col-md-12"],[1,"fieldsetdContainer",2,"flex","2"],[1,"fieldsetdContent"],[3,"adminMode","injectDatas","linkedToMaarchParapheur"],["appVisaWorkflow",""],["class","alert-message alert-message-danger","role","alert",4,"ngIf"],["class","col-md-12",4,"ngIf"],["role","alert",1,"alert-message","alert-message-danger"],["role","alert",1,"alert-message","alert-message-danger","mailList"],[4,"ngFor","ngForOf"]],template:function(t,e){if(1&t&&(n.Wb(0,"div",0),n.Wb(1,"div",1),n.Wb(2,"h2"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"div",2),n.Rb(6,"app-visa-workflow",3,4),n.Oc(8,Eb,5,4,"div",5),n.Vb(),n.Vb(),n.Vb(),n.Oc(9,Lb,8,4,"div",6)),2&t){const t=n.zc(7);n.Db(3),n.Sc("",n.jc(4,6,"lang.visaWorkflow")," :"),n.Db(3),n.oc("adminMode",!0)("injectDatas",e.injectDatasParam)("linkedToMaarchParapheur",!0),n.Db(2),n.oc("ngIf",t.checkExternalSignatoryBook().length>0),n.Db(1),n.oc("ngIf",e.additionalsInfos.visaWorkflowError)}},directives:[Ko,P.t,P.s],pipes:[g.d],styles:[".fieldsetdContainer[_ngcontent-%COMP%]{position:relative}.fieldsetdContainer[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:-5px;left:30px;margin:0;padding:0 5px;color:#135f7f}.fieldsetdContainer[_ngcontent-%COMP%] .fieldsetdContent[_ngcontent-%COMP%]{background:#fff;border-radius:4px;border:1px solid #ccc;margin-top:10px;padding:10px;overflow:auto;height:450px}.alert-message[_ngcontent-%COMP%]{margin:0}"]}),t})();function Nb(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-option",8),n.Wb(1,"span",9),n.Qc(2),n.Vb(),n.Wb(3,"button",10),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc(2).removeAccount(i)})),n.ic(4,"translate"),n.Rb(5,"mat-icon",11),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.oc("value",t),n.Db(2),n.Tc("",t.login," (",t.siret,")"),n.Db(1),n.pc("title",n.jc(4,4,"lang.delete"))}}function zb(t,e){if(1&t){const t=n.Xb();n.Wb(0,"form",null,3),n.Wb(2,"div",4),n.Wb(3,"mat-form-field"),n.Wb(4,"mat-label"),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Wb(7,"mat-select",5),n.dc("selectionChange",(function(e){return n.Dc(t),n.hc().selectAccount(e)})),n.Oc(8,Nb,6,6,"mat-option",6),n.Vb(),n.Wb(9,"mat-hint"),n.Wb(10,"a",7),n.dc("click",(function(){return n.Dc(t),n.hc().initNewAccount()})),n.Qc(11),n.ic(12,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(5),n.Rc(n.jc(6,3,"lang.selectedAccount")),n.Db(3),n.oc("ngForOf",t.additionalsInfos.accounts),n.Db(3),n.Rc(n.jc(12,5,"lang.addNewAccount"))}}function Bb(t,e){if(1&t){const t=n.Xb();n.Wb(0,"form",12,13),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().addNewAccount()})),n.Wb(2,"div",14),n.Wb(3,"mat-form-field"),n.Wb(4,"input",15),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().newAccount.login=e})),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(6,"div",14),n.Wb(7,"mat-form-field"),n.Wb(8,"input",16),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().newAccount.siret=e})),n.ic(9,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(10,"div",17),n.Wb(11,"button",18),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Wb(14,"button",19),n.dc("click",(function(){return n.Dc(t),n.hc().addAccountMode=!1})),n.Qc(15),n.ic(16,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(1),e=n.hc();n.Db(4),n.pc("placeholder",n.jc(5,7,"lang.newAccount")),n.oc("ngModel",e.newAccount.login),n.Db(4),n.pc("placeholder",n.jc(9,9,"lang.siret")),n.oc("ngModel",e.newAccount.siret),n.Db(3),n.oc("disabled",!t.form.valid||e.loading),n.Db(1),n.Sc(" ",n.jc(13,11,"lang.add")," "),n.Db(3),n.Sc(" ",n.jc(16,13,"lang.cancel")," ")}}function Ub(t,e){if(1&t&&(n.Wb(0,"mat-option",33),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t.displayName," ")}}function $b(t,e){1&t&&(n.Wb(0,"div",34),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noPerson")," "))}function Hb(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",49),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc().index;return n.hc(2).changeRole(a,i)})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.Rc(n.jc(2,1,"lang."+t+"User"))}}function Gb(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",49),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc().index;return n.hc(2).changeContext(a,i)})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.Rc(n.jc(2,1,"lang."+t))}}function Xb(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list",35),n.Wb(1,"mat-list-item"),n.Rb(2,"mat-icon",36),n.Wb(3,"h4",37),n.Wb(4,"span",38),n.Qc(5),n.Vb(),n.Vb(),n.Wb(6,"p",39),n.Wb(7,"span",40),n.Wb(8,"button",41),n.ic(9,"translate"),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Wb(12,"mat-menu",null,42),n.Wb(14,"div",43),n.Qc(15),n.ic(16,"translate"),n.Vb(),n.Oc(17,Hb,3,3,"button",44),n.Vb(),n.Wb(18,"button",45),n.ic(19,"translate"),n.Qc(20),n.ic(21,"translate"),n.Vb(),n.Wb(22,"mat-menu",null,46),n.Wb(24,"div",43),n.Qc(25),n.ic(26,"translate"),n.Vb(),n.Oc(27,Gb,3,3,"button",44),n.Vb(),n.Vb(),n.Vb(),n.Wb(28,"button",47),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc(2).deleteItem(i)})),n.Rb(29,"mat-icon",48),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.zc(13),a=n.zc(23),s=n.hc(2);n.Db(5),n.Rc(t.displayName),n.Db(3),n.pc("title",n.jc(9,15,"lang."+t.currentRole+"User")),n.oc("matMenuTriggerFor",i),n.Db(2),n.Rc(n.jc(11,17,"lang."+t.currentRole+"User")),n.Db(2),n.Fb("listMenu"),n.Db(3),n.Sc(" ",n.jc(16,19,"lang.roles")," "),n.Db(2),n.oc("ngForOf",t.roles),n.Db(1),n.pc("title",n.jc(19,21,"lang."+t.currentContext)),n.oc("matMenuTriggerFor",a),n.Db(2),n.Rc(n.jc(21,23,"lang."+t.currentContext)),n.Db(2),n.Fb("listMenu"),n.Db(3),n.Sc(" ",n.jc(26,25,"lang.contextParaph")," "),n.Db(2),n.oc("ngForOf",s.contextList)}}function qb(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",20),n.Wb(1,"div",21),n.Wb(2,"h2",22),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"div",23),n.Wb(6,"mat-form-field",24),n.Rb(7,"input",25),n.ic(8,"translate"),n.Wb(9,"mat-autocomplete",26,27),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc().addItem(e)})),n.Oc(11,Ub,2,2,"mat-option",28),n.ic(12,"async"),n.Vb(),n.Vb(),n.Wb(13,"div",29,30),n.dc("cdkDropListDropped",(function(e){return n.Dc(t),n.hc().drop(e)})),n.Oc(15,$b,3,3,"div",31),n.Oc(16,Xb,30,27,"mat-list",32),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(10),e=n.hc();n.Db(3),n.Sc("",n.jc(4,10,"lang.visaWorkflow")," :"),n.Db(3),n.Lc("font-size",10,"px"),n.Db(1),n.pc("placeholder",n.jc(8,12,"lang.addPerson")),n.oc("matAutocomplete",t)("formControl",e.usersCtrl),n.Db(4),n.oc("ngForOf",n.jc(12,14,e.filteredUsers)),n.Db(2),n.oc("cdkDropListData",e.currentWorkflow),n.Db(2),n.oc("ngIf",0===e.currentWorkflow.length),n.Db(1),n.oc("ngForOf",e.currentWorkflow)}}let Kb=(()=>{class t{constructor(t,e,i){this.translate=t,this.http=e,this.notify=i,this.loading=!1,this.newAccount={},this.currentAccount=null,this.usersWorkflowList=[],this.currentWorkflow=[],this.contextList=["FON","PER","SPH","DIR","DLP","EXE"],this.addAccountMode=!1,this.usersCtrl=new X.i}ngOnInit(){}drop(t){t.previousContainer===t.container&&Object(lo.h)(t.container.data,t.previousIndex,t.currentIndex)}selectAccount(t){this.loading=!1,this.currentAccount=t.value,this.usersWorkflowList=[],this.currentWorkflow=[],this.getUsersWorkflowList(this.currentAccount)}getUsersWorkflowList(t){this.loading=!0,this.filteredUsers=this.usersCtrl.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>t?this._filterUsers(t):this.usersWorkflowList.slice())),this.http.get("../rest/xParaphWorkflow?login="+t.login+"&siret="+t.siret).subscribe(t=>{this.usersWorkflowList=t.workflow,this.usersWorkflowList.forEach(t=>{t.currentRole=t.roles[0],t.currentContext=this.contextList[0]}),setTimeout(()=>{$("#availableUsers").focus()},0)},t=>{this.loading=!1,this.notify.error(t.error.errors[0])})}changeRole(t,e){this.currentWorkflow[t].currentRole=e}changeContext(t,e){this.currentWorkflow[t].currentContext=e}addItem(t){this.currentWorkflow.push(JSON.parse(JSON.stringify(t.option.value))),$("#availableUsers").blur(),this.usersCtrl.setValue("")}deleteItem(t){this.currentWorkflow.splice(t,1)}_filterUsers(t){if("string"==typeof t){const e=t.toLowerCase();return this.usersWorkflowList.filter(t=>-1!==t.displayName.toLowerCase().indexOf(e))}}isValidParaph(){return this.additionalsInfos.attachments.length>0&&this.currentWorkflow.length>0&&""!==this.currentAccount.login&&""!==this.currentAccount.siret}getRessources(){return this.additionalsInfos.attachments.map(t=>t.res_id)}getDatas(){return this.externalSignatoryBookDatas={info:{siret:this.currentAccount.siret,login:this.currentAccount.login},steps:[]},this.currentWorkflow.forEach(t=>{this.externalSignatoryBookDatas.steps.push({login:t.userId,action:"visa"===t.currentRole?"2":"1",contexte:t.currentContext})}),this.externalSignatoryBookDatas}addNewAccount(){this.loading=!0,this.http.post("../rest/xParaphAccount",{login:this.newAccount.login,siret:this.newAccount.siret}).subscribe(t=>{this.additionalsInfos.accounts.push({login:this.newAccount.login,siret:this.newAccount.siret}),this.newAccount={},this.loading=!1,this.addAccountMode=!1,this.notify.success(this.translate.instant("lang.accountAdded"))},t=>{this.notify.handleErrors(t),this.loading=!1})}removeAccount(t){confirm(this.translate.instant("lang.confirmDeleteAccount"))&&this.http.delete("../rest/xParaphAccount?siret="+this.additionalsInfos.accounts[t].siret+"&login="+this.additionalsInfos.accounts[t].login).subscribe(e=>{this.additionalsInfos.accounts.splice(t,1),this.notify.success(this.translate.instant("lang.accountDeleted"))},t=>{this.notify.handleErrors(t),this.loading=!1})}initNewAccount(){this.loading=!1,this.usersWorkflowList=[],this.currentWorkflow=[],this.currentAccount=null,this.addAccountMode=!0,setTimeout(()=>{$("#newAccountLogin").focus()},0)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-x-paraph"]],inputs:{additionalsInfos:"additionalsInfos",externalSignatoryBookDatas:"externalSignatoryBookDatas"},decls:3,vars:3,consts:[[4,"ngIf"],[3,"ngSubmit",4,"ngIf"],["class","col-md-12","style","padding-top: 20px;",4,"ngIf"],["accountForm","ngForm"],[1,"col-md-12",2,"padding-top","10px"],["name","loginAccount","required","",3,"selectionChange"],["class","accountList",3,"value",4,"ngFor","ngForOf"],[2,"cursor","pointer",3,"click"],[1,"accountList",3,"value"],[1,"accountName"],["mat-icon-button","","color","warn",3,"title","click"],[1,"fa","fa-trash"],[3,"ngSubmit"],["newAccountForm","ngForm"],[1,"col-md-6",2,"padding-top","10px"],["id","newAccountLogin","matInput","","name","newAccountLogin","required","",3,"placeholder","ngModel","ngModelChange"],["id","newAccountSiret","matInput","","name","newAccountSiret","required","",3,"placeholder","ngModel","ngModelChange"],[1,"col-md-12","text-center",2,"padding-top","10px"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],["mat-raised-button","",3,"click"],[1,"col-md-12",2,"padding-top","20px"],[1,"workflowContent"],[2,"top","-5px"],[1,"contentUser"],["appearance","outline","floatLabel","never"],["id","availableUsers","type","text","matInput","",3,"placeholder","matAutocomplete","formControl"],["isOpen","true",3,"optionSelected"],["auto","matAutocomplete"],[3,"value",4,"ngFor","ngForOf"],["cdkDropList","",1,"cdk-list",3,"cdkDropListData","cdkDropListDropped"],["dataAvailableList","cdkDropList"],["style","opacity: 0.5;text-align: center;font-size: 10px;padding: 10px;",4,"ngIf"],["class","columns","cdkDrag","",4,"ngFor","ngForOf"],[3,"value"],[2,"opacity","0.5","text-align","center","font-size","10px","padding","10px"],["cdkDrag","",1,"columns"],["mat-list-icon","","color","primary",1,"fa","fa-user","fa-2x"],["mat-line","",2,"display","flex"],[2,"flex","1","text-overflow","ellipsis","overflow","hidden"],["mat-line","",1,"otherInfo",2,"display","flex"],[2,"opacity","0.5","flex","1"],["mat-button","",1,"currentRoleButton",3,"matMenuTriggerFor","title"],["menu","matMenu"],[2,"text-align","center","font-size","10px","color","white","background","#135F7F","padding","5px","font-weight","bold"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["mat-button","",1,"currentContextButton",3,"matMenuTriggerFor","title"],["menuContext","matMenu"],["mat-icon-button","",3,"click"],["color","warn",1,"fa","fa-times"],["mat-menu-item","",3,"click"]],template:function(t,e){1&t&&(n.Oc(0,zb,13,7,"form",0),n.Oc(1,Bb,17,15,"form",1),n.Oc(2,qb,17,16,"div",2)),2&t&&(n.oc("ngIf",!e.addAccountMode&&e.additionalsInfos.attachments.length>0),n.Db(1),n.oc("ngIf",e.addAccountMode&&e.additionalsInfos.attachments.length>0),n.Db(1),n.oc("ngIf",e.usersWorkflowList.length>0))},directives:[P.t,X.K,X.v,X.w,Y.c,Y.g,ee.a,P.s,Y.f,W.p,k.b,S.a,J.b,X.d,X.F,X.u,X.x,Ne.d,X.j,Ne.a,lo.e,R.a,lo.a,R.d,R.c,W.l,ne.d,ne.e,ne.b],pipes:[g.d,P.b],styles:[".cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);background:#fff;padding:10px}.cdk-drag-preview[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{display:none}.cdk-drag-placeholder[_ngcontent-%COMP%], .cdk-drag-preview[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.columns[_ngcontent-%COMP%]:last-child{border:none}.cdk-list[_ngcontent-%COMP%]{height:250px;overflow:auto}.cdk-list.cdk-drop-list-dragging[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.columns[_ngcontent-%COMP%]{cursor:move}.workflowContent[_ngcontent-%COMP%]{position:relative;background:#fff;border-radius:4px;border:1px solid #ccc;padding:10px}.workflowContent[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{height:auto;font-size:13px}.workflowContent[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:5px;left:10px;margin:0;padding:0 5px;color:#135f7f}.accountList[_ngcontent-%COMP%] .mat-option-text{display:flex}.accountList[_ngcontent-%COMP%] .accountName[_ngcontent-%COMP%]{flex:1} .listMenu .mat-menu-content{padding-top:0;padding-bottom:0}.currentContextButton[_ngcontent-%COMP%]{width:150px}.currentContextButton[_ngcontent-%COMP%], .currentRoleButton[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;font-size:13px;text-align:left}.currentRoleButton[_ngcontent-%COMP%]{width:120px}"]}),t})();const Yb=["noteEditor"],Jb=["xParaph"],Zb=["maarchParapheur"],tf=["fastParapheur"],ef=["iParapheur"],nf=["ixbus"];function af(t,e){1&t&&(n.Wb(0,"div",20),n.Rb(1,"mat-spinner",21),n.Vb())}function sf(t,e){1&t&&(n.Wb(0,"b",22),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function of(t,e){if(1&t&&(n.Wb(0,"b",22),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function rf(t,e){if(1&t&&(n.Wb(0,"b",22),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function cf(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-checkbox",25),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).toggleIntegration(i.key)})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.oc("checked",i.data.resource.integrations[t.key]),n.Db(1),n.Sc("",n.jc(2,2,"lang."+t.key+"_doc")," ")}}function lf(t,e){if(1&t&&(n.Wb(0,"div",23),n.Oc(1,cf,3,4,"mat-checkbox",24),n.ic(2,"keyvalue"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",n.jc(2,1,t.integrationsInfo))}}function df(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier)}}function hf(t,e){if(1&t&&(n.Wb(0,"div",26),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,df,3,1,"li",27),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Rc(n.jc(3,2,"lang.mailingActionInformations")),n.Db(3),n.oc("ngForOf",t.resourcesMailing)}}function uf(t,e){if(1&t&&n.Rb(0,"app-i-paraph",28,29),2&t){const t=n.hc();n.oc("additionalsInfos",t.additionalsInfos)("externalSignatoryBookDatas",t.externalSignatoryBookDatas)}}function pf(t,e){if(1&t&&n.Rb(0,"app-ixbus-paraph",28,30),2&t){const t=n.hc();n.oc("additionalsInfos",t.additionalsInfos)("externalSignatoryBookDatas",t.externalSignatoryBookDatas)}}function bf(t,e){if(1&t&&n.Rb(0,"app-fast-paraph",28,31),2&t){const t=n.hc();n.oc("additionalsInfos",t.additionalsInfos)("externalSignatoryBookDatas",t.externalSignatoryBookDatas)}}function ff(t,e){if(1&t&&n.Rb(0,"app-maarch-paraph",28,32),2&t){const t=n.hc();n.oc("additionalsInfos",t.additionalsInfos)("externalSignatoryBookDatas",t.externalSignatoryBookDatas)}}function mf(t,e){if(1&t&&n.Rb(0,"app-x-paraph",28,33),2&t){const t=n.hc();n.oc("additionalsInfos",t.additionalsInfos)("externalSignatoryBookDatas",t.externalSignatoryBookDatas)}}function gf(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function vf(t,e){if(1&t&&(n.Wb(0,"div",7),n.Wb(1,"div"),n.Wb(2,"div",34),n.Wb(3,"p"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Wb(6,"ul"),n.Oc(7,gf,5,4,"li",27),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.Sc(" ",n.jc(5,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.additionalsInfos.noAttachment)}}let _f=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.changeDetectorRef=s,this.loading=!1,this.additionalsInfos={destinationId:"",users:[],attachments:[],noAttachment:[]},this.resourcesMailing=[],this.signatoryBookEnabled="",this.externalSignatoryBookDatas={steps:[],objectSent:"attachment"},this.integrationsInfo={inSignatureBook:{icon:"fas fa-file-signature"}}}ngOnInit(){this.loading=!0,this.checkExternalSignatureBook()}onSubmit(){this.loading=!0,this.data.resIds.length>0&&this.executeAction()}checkExternalSignatureBook(){return this.loading=!0,new Promise((t,e)=>{this.http.post(`../rest/resourcesList/users/${this.data.userId}/groups/${this.data.groupId}/baskets/${this.data.basketId}/checkExternalSignatoryBook`,{resources:this.data.resIds}).pipe(Object(mt.a)(e=>{this.additionalsInfos=e.additionalsInfos,this.additionalsInfos.attachments.length>0&&(this.signatoryBookEnabled=e.signatureBookEnabled,e.additionalsInfos.attachments.forEach(t=>{t.mailing&&this.resourcesMailing.push(t)})),this.errors=e.errors,t(!0)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(),Object(c.a)(!1)))).subscribe()})}executeAction(){let t,e;t=this[this.signatoryBookEnabled].getRessources(),e=this[this.signatoryBookEnabled].getDatas(),this.http.put(this.data.processActionRoute,{resources:t,note:this.noteEditor.getNote(),data:e}).pipe(Object(mt.a)(e=>{e||this.dialogRef.close(t),e&&null!=e.errors&&this.notify.error(e.errors)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isValidAction(){return void 0!==this[this.signatoryBookEnabled]&&this[this.signatoryBookEnabled].isValidParaph()}toggleIntegration(t){this.http.put("../rest/resourcesList/integrations",{resources:this.data.resIds,integrations:{[t]:!this.data.resource.integrations[t]}}).pipe(Object(mt.a)(()=>Object(r.a)(this,void 0,void 0,(function*(){this.data.resource.integrations[t]=!this.data.resource.integrations[t],yield this.checkExternalSignatureBook(),this.changeDetectorRef.detectChanges()}))),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(n.h))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(Yb,!0),n.Xc(Jb,!0),n.Xc(Zb,!0),n.Xc(tf,!0),n.Xc(ef,!0),n.Xc(nf,!0)),2&t&&(n.yc(i=n.ec())&&(e.noteEditor=i.first),n.yc(i=n.ec())&&(e.xParaph=i.first),n.yc(i=n.ec())&&(e.maarchParapheur=i.first),n.yc(i=n.ec())&&(e.fastParapheur=i.first),n.yc(i=n.ec())&&(e.iParapheur=i.first),n.yc(i=n.ec())&&(e.ixbus=i.first))},decls:35,vars:25,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],["autosize","",2,"height","100%"],[2,"background","white"],[1,"row",2,"margin","0"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],["style","padding:10px;display: flex;flex-direction: column;",4,"ngIf"],["class","alert-message alert-message-info","role","alert",4,"ngIf"],[3,"additionalsInfos","externalSignatoryBookDatas",4,"ngIf"],["class","col-md-12",4,"ngIf"],[1,"col-md-12",2,"padding-top","10px"],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"],[2,"padding","10px","display","flex","flex-direction","column"],["color","primary",3,"checked","click",4,"ngFor","ngForOf"],["color","primary",3,"checked","click"],["role","alert",1,"alert-message","alert-message-info"],[4,"ngFor","ngForOf"],[3,"additionalsInfos","externalSignatoryBookDatas"],["iParapheur",""],["ixbus",""],["fastParapheur",""],["maarchParapheur",""],["xParaph",""],["role","alert",1,"alert-message","alert-message-danger","mailList"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,af,2,0,"div",3),n.Wb(5,"mat-sidenav-container",4),n.Wb(6,"mat-sidenav-content",5),n.Wb(7,"div",6),n.Wb(8,"div",7),n.Qc(9),n.ic(10,"translate"),n.Oc(11,sf,3,3,"b",8),n.Oc(12,of,2,1,"b",8),n.Oc(13,rf,3,4,"b",8),n.Qc(14," ? "),n.Vb(),n.Oc(15,lf,3,3,"div",9),n.Oc(16,hf,6,4,"div",10),n.Wb(17,"div"),n.Oc(18,uf,2,2,"app-i-paraph",11),n.Oc(19,pf,2,2,"app-ixbus-paraph",11),n.Oc(20,bf,2,2,"app-fast-paraph",11),n.Oc(21,ff,2,2,"app-maarch-paraph",11),n.Oc(22,mf,2,2,"app-x-paraph",11),n.Oc(23,vf,8,4,"div",12),n.Vb(),n.Wb(24,"div",13),n.Rb(25,"app-note-editor",14,15),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Rb(27,"span",16),n.Wb(28,"div",17),n.Wb(29,"button",18),n.dc("click",(function(){return e.onSubmit()})),n.Qc(30),n.ic(31,"translate"),n.Vb(),n.Wb(32,"button",19),n.Qc(33),n.ic(34,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(5),n.Sc(" ",n.jc(10,19,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(2),n.oc("ngIf",e.data.resIds.length>0),n.Db(1),n.oc("ngIf",e.resourcesMailing.length>0),n.Db(2),n.oc("ngIf","iParapheur"==e.signatoryBookEnabled),n.Db(1),n.oc("ngIf","ixbus"==e.signatoryBookEnabled),n.Db(1),n.oc("ngIf","fastParapheur"==e.signatoryBookEnabled),n.Db(1),n.oc("ngIf","maarchParapheur"==e.signatoryBookEnabled),n.Db(1),n.oc("ngIf","xParaph"==e.signatoryBookEnabled),n.Db(1),n.oc("ngIf",0!=e.additionalsInfos.noAttachment.length&&"attachment"==e.externalSignatoryBookDatas.objectSent),n.Db(2),n.oc("resIds",e.data.resIds),n.Db(4),n.oc("disabled",e.loading||!e.isValidAction()),n.Db(1),n.Rc(n.jc(31,21,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(34,23,"lang.cancel")))},directives:[q.i,q.f,P.t,I.e,I.f,Du,q.c,k.b,q.d,V.c,P.s,j.a,Sb,Ab,Wb,Qb,Kb],pipes:[g.d,P.l],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:2;overflow:hidden}.mailList[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{font-size:12px;max-height:100px;overflow:auto;padding-left:25px;padding-right:5px;padding-bottom:10px;margin-top:10px}.mailList[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;text-decoration:underline}.mailList[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{font-size:120%}.formType[_ngcontent-%COMP%]{align-items:center;display:flex;margin:10px;border-radius:4px;border:1px solid #ccc;position:relative;padding:10px}.formType-title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:-7px;left:10px;padding:0;margin:0;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-form-field-suffix{color:#f99830;font-size:15px;top:0}.formType[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.priceContent[_ngcontent-%COMP%]{align-items:center;width:100%}.priceContent[_ngcontent-%COMP%], .priceContent-label[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.priceContent-label[_ngcontent-%COMP%]{text-align:right;color:#135f7f;flex:1;padding-right:10px}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:90px!important}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.priceInfo[_ngcontent-%COMP%]{padding-right:20px;font-size:10px;opacity:.5;width:100%}.pjList[_ngcontent-%COMP%]{display:flex;width:100%;overflow:auto;flex-direction:column;background:#666}.pjList[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin:10px}"]}),t})();const yf=["noteEditor"];function xf(t,e){1&t&&(n.Wb(0,"div",18),n.Rb(1,"mat-spinner",19),n.Vb())}function Cf(t,e){1&t&&(n.Wb(0,"b",20),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function Of(t,e){if(1&t&&(n.Wb(0,"b",20),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function Df(t,e){if(1&t&&(n.Wb(0,"b",20),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function wf(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",11),n.Wb(1,"plugin-autocomplete",21),n.dc("triggerEvent",(function(e){return n.Dc(t),n.hc().setVal(e)})),n.ic(2,"translate"),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(1),n.oc("labelPlaceholder",n.jc(2,5,"lang.userMaarchParapheur"))("datas",t.additionalsInfos.users)("targetSearchKey","displayName")("subInfoKey","email")("singleMode",!0)}}function Mf(t,e){1&t&&(n.Wb(0,"div",7),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noUserDefinedInMaarchParapheur")," "))}function kf(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function Sf(t,e){if(1&t&&(n.Wb(0,"div",7),n.Wb(1,"div"),n.Wb(2,"div",22),n.Wb(3,"p"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Wb(6,"ul"),n.Oc(7,kf,5,4,"li",23),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.Sc(" ",n.jc(5,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.additionalsInfos.noMail)}}let If=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.loading=!1,this.additionalsInfos={users:[],mails:[],noMail:[]},this.externalSignatoryBookDatas={processingUser:""}}ngOnInit(){this.loading=!0,this.http.post("../rest/resourcesList/users/"+this.data.userId+"/groups/"+this.data.groupId+"/baskets/"+this.data.basketId+"/checkExternalNoteBook",{resources:this.data.resIds}).pipe(Object(l.a)(t=>(t.additionalsInfos.users.forEach(t=>{t.displayName=t.firstname+" "+t.lastname}),t)),Object(mt.a)(t=>{this.additionalsInfos=t.additionalsInfos,this.errors=t.errors}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),this.dialogRef.close(),Object(c.a)(!1)))).subscribe()}onSubmit(){this.loading=!0,this.data.resIds.length>0&&this.executeAction()}executeAction(){let t,e;t=this.additionalsInfos.mails.map(t=>t.res_id),e=this.externalSignatoryBookDatas,this.http.put(this.data.processActionRoute,{resources:t,note:this.noteEditor.getNote(),data:e}).pipe(Object(mt.a)(e=>{e||this.dialogRef.close(t),e&&null!=e.errors&&this.notify.error(e.errors)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}checkValidAction(){return 0==this.additionalsInfos.mails.length||!this.externalSignatoryBookDatas.processingUser||0==this.additionalsInfos.users.length}setVal(t){this.externalSignatoryBookDatas.processingUser=t.id}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(yf,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:30,vars:20,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],["autosize","",2,"height","100%"],[2,"background","white"],[1,"row",2,"margin","0"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],["class","col-md-12","style","padding-top: 10px;",4,"ngIf"],["class","col-md-12",4,"ngIf"],[1,"col-md-12",2,"padding-top","10px"],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"],["appearance","outline",3,"labelPlaceholder","datas","targetSearchKey","subInfoKey","singleMode","triggerEvent"],["role","alert",1,"alert-message","alert-message-danger","mailList"],[4,"ngFor","ngForOf"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,xf,2,0,"div",3),n.Wb(5,"mat-sidenav-container",4),n.Wb(6,"mat-sidenav-content",5),n.Wb(7,"div",6),n.Wb(8,"div",7),n.Qc(9),n.ic(10,"translate"),n.Oc(11,Cf,3,3,"b",8),n.Oc(12,Of,2,1,"b",8),n.Oc(13,Df,3,4,"b",8),n.Qc(14," ? "),n.Vb(),n.Wb(15,"div"),n.Oc(16,wf,3,7,"div",9),n.Oc(17,Mf,3,3,"div",10),n.Oc(18,Sf,8,4,"div",10),n.Vb(),n.Wb(19,"div",11),n.Rb(20,"app-note-editor",12,13),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Rb(22,"span",14),n.Wb(23,"div",15),n.Wb(24,"button",16),n.dc("click",(function(){return e.onSubmit()})),n.Qc(25),n.ic(26,"translate"),n.Vb(),n.Wb(27,"button",17),n.Qc(28),n.ic(29,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(5),n.Sc(" ",n.jc(10,14,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(3),n.oc("ngIf",0!=e.additionalsInfos.users.length),n.Db(1),n.oc("ngIf",0==e.additionalsInfos.users.length),n.Db(1),n.oc("ngIf",0!=e.additionalsInfos.noMail.length),n.Db(2),n.oc("resIds",e.data.resIds),n.Db(4),n.oc("disabled",e.loading||e.checkValidAction()),n.Db(1),n.Rc(n.jc(26,16,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(29,18,"lang.cancel")))},directives:[q.i,q.f,P.t,I.e,I.f,Du,q.c,k.b,q.d,V.c,ii,P.s],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:2;overflow:hidden}.mailList[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{font-size:12px;max-height:100px;overflow:auto;padding-left:25px;padding-right:5px;padding-bottom:10px;margin-top:10px}.mailList[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;text-decoration:underline}.mailList[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{font-size:120%}.formType[_ngcontent-%COMP%]{align-items:center;display:flex;margin:10px;border-radius:4px;border:1px solid #ccc;position:relative;padding:10px}.formType-title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:-7px;left:10px;padding:0;margin:0;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-form-field-suffix{color:#f99830;font-size:15px;top:0}.formType[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.priceContent[_ngcontent-%COMP%]{align-items:center;width:100%}.priceContent[_ngcontent-%COMP%], .priceContent-label[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.priceContent-label[_ngcontent-%COMP%]{text-align:right;color:#135f7f;flex:1;padding-right:10px}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:90px!important}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.priceInfo[_ngcontent-%COMP%]{padding-right:20px;font-size:10px;opacity:.5;width:100%}.pjList[_ngcontent-%COMP%]{display:flex;width:100%;overflow:auto;flex-direction:column;background:#666}.pjList[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin:10px}"]}),t})();function Pf(t,e){if(1&t&&(n.Ub(0),n.Qc(1),n.Tb()),2&t){const t=n.hc(2).$implicit,e=n.hc().$implicit;n.Db(1),n.Sc(" (",e.details[t.id].items.length,") ")}}function Vf(t,e){if(1&t&&(n.Wb(0,"mat-list-item",8),n.Rb(1,"mat-icon",9),n.Wb(2,"div",10),n.Wb(3,"p",11),n.Qc(4),n.Vb(),n.Wb(5,"p",12),n.Qc(6),n.Vb(),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Ib("fa-user","user_id"===t.item_type||"user"===t.item_type)("fa-sitemap","entity_id"===t.item_type||"entity"===t.item_type),n.Db(2),n.oc("title",t.itemLabel),n.Db(1),n.Rc(t.itemLabel),n.Db(1),n.oc("title",t.itemSubLabel),n.Db(1),n.Sc(" ",t.itemSubLabel,"")}}function Rf(t,e){if(1&t&&(n.Wb(0,"mat-expansion-panel",6),n.Wb(1,"mat-expansion-panel-header"),n.Wb(2,"mat-panel-title"),n.Qc(3),n.Oc(4,Pf,2,1,"ng-container",0),n.Vb(),n.Vb(),n.Wb(5,"mat-list"),n.Oc(6,Vf,7,8,"mat-list-item",7),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc().$implicit,i=n.hc(2);n.oc("expanded","dest"===t.id||i.expanded),n.Db(3),n.Sc(" ",t.label," "),n.Db(1),n.oc("ngIf","dest"!==t.id),n.Db(2),n.oc("ngForOf",e.details[t.id].items)}}function jf(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Rf,7,4,"mat-expansion-panel",5),n.Tb()),2&t){const t=e.$implicit,i=n.hc().$implicit;n.Db(1),n.oc("ngIf",i.details[t.id])}}function Af(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div",3),n.Wb(2,"div",4),n.ic(3,"fullDate"),n.Qc(4),n.ic(5,"translate"),n.Wb(6,"b"),n.Qc(7),n.Vb(),n.Qc(8," \xa0"),n.Wb(9,"b"),n.Qc(10),n.ic(11,"timeAgo"),n.Vb(),n.Vb(),n.Rb(12,"mat-divider"),n.Vb(),n.Oc(13,jf,2,1,"ng-container",2),n.Tb()),2&t){const t=e.$implicit,i=n.hc(2);n.Db(2),n.oc("title",n.jc(3,5,t.creationDate)),n.Db(2),n.Sc(" ",n.jc(5,7,"lang.createdBy"),"\xa0"),n.Db(3),n.Rc(t.user),n.Db(3),n.Rc(n.kc(11,9,t.creationDate,"full")),n.Db(3),n.oc("ngForOf",i.availableRoles)}}function Wf(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Af,14,12,"ng-container",2),n.Tb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",t.diffListHistory)}}function Tf(t,e){1&t&&(n.Wb(0,"div",13),n.Rb(1,"mat-spinner",14),n.Vb())}let Ef=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.notify=i,this.renderer=n,this.dialog=a,this.functions=s,this.headerService=o,this.roles=[],this.loading=!0,this.availableRoles=[],this.currentEntityId=0,this.userDestList=[],this.diffListHistory=[],this.resId=null,this.expanded=!0}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){yield this.initRoles(),null!==this.resId&&this.getListinstanceHistory(),this.loading=!1}))}getListinstanceHistory(){return new Promise((t,e)=>{this.http.get(`../rest/resources/${this.resId}/listInstanceHistory`).pipe(Object(mt.a)(t=>{this.diffListHistory=t.listInstanceHistory}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}initRoles(){return new Promise((t,e)=>{this.http.get("../rest/roles").pipe(Object(l.a)(t=>(t.roles=t.roles.map(t=>Object.assign(Object.assign({},t),{id:t.id})),t.roles)),Object(mt.a)(e=>{this.availableRoles=e,t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(n.I),n.Qb(q.b),n.Qb(_t.a),n.Qb(y.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-history-diffusions-list"]],inputs:{resId:"resId",expanded:"expanded"},decls:2,vars:2,consts:[[4,"ngIf"],["style","display:flex;",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"dateTitle"],["mat-subheader","","color","primary",3,"title"],["class","diffusionList",3,"expanded",4,"ngIf"],[1,"diffusionList",3,"expanded"],["disableRipple","","class","item-diffusion-list",4,"ngFor","ngForOf"],["disableRipple","",1,"item-diffusion-list"],["mat-list-icon","","color","primary",1,"fa"],[1,"item-diffusion"],["mat-line","",3,"title"],["mat-line","",1,"subInfo",3,"title"],[2,"display","flex"],[2,"margin","auto"]],template:function(t,e){1&t&&(n.Oc(0,Wf,2,1,"ng-container",0),n.Oc(1,Tf,2,0,"div",1)),2&t&&(n.oc("ngIf",!e.loading),n.Db(1),n.oc("ngIf",e.loading))},directives:[P.t,P.s,R.g,T.a,gt.c,gt.g,gt.h,R.a,R.d,S.a,R.c,W.l,V.c],pipes:[uo,g.d,ps],styles:[".columns[_ngcontent-%COMP%]{cursor:move}.notDraggable[_ngcontent-%COMP%]{cursor:not-allowed}.notEditable[_ngcontent-%COMP%]{cursor:auto}.roleList[_ngcontent-%COMP%]{padding-bottom:40px}.diffusionList[_ngcontent-%COMP%]{min-width:400px;box-shadow:none}.diffusionList[_ngcontent-%COMP%] .mat-expansion-panel-header-title[_ngcontent-%COMP%]{color:#4a4a4a;font-weight:700;font-size:13px}.diffusionList[_ngcontent-%COMP%] .item-diffusion-list[_ngcontent-%COMP%]{height:55px;margin-bottom:10px;background-color:hsla(0,0%,84.7%,.1);border-radius:10px;font-size:13px}.diffusionList[_ngcontent-%COMP%] .item-diffusion-list[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{font-size:13px;height:13px;width:13px;padding-right:10px}.diffusionList[_ngcontent-%COMP%] .item-diffusion-list[_ngcontent-%COMP%] .item-diffusion[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;justify-content:center;overflow:hidden}.diffusionList[_ngcontent-%COMP%] .item-diffusion-list[_ngcontent-%COMP%] .item-diffusion[_ngcontent-%COMP%] .mat-line[_ngcontent-%COMP%]{margin:0}.diffusionList[_ngcontent-%COMP%] .item-diffusion-list[_ngcontent-%COMP%] .subInfo[_ngcontent-%COMP%]{font-size:13px;opacity:.5}.diffusionList[_ngcontent-%COMP%] .item-diffusion-list[_ngcontent-%COMP%] .mat-button[_ngcontent-%COMP%]{background:#fff;font-size:13px;border:.5px solid rgba(74,74,74,.32);border-radius:29.5px;color:#4a4a4a} .roleListMenu .mat-menu-content{padding-top:0;padding-bottom:0;font-size:13px;color:#4a4a4a}"]}),t})();const Ff=function(){return["/rest/autocomplete/users","/rest/autocomplete/entities"]};function Lf(t,e){if(1&t){const t=n.Xb();n.Wb(0,"plugin-autocomplete",6,7),n.dc("triggerEvent",(function(e){return n.Dc(t),n.hc(2).addElem(e)})),n.ic(2,"translate"),n.Vb()}2&t&&n.oc("labelPlaceholder",n.jc(2,4,"lang.addUserOrEntity"))("routeDatas",n.uc(6,Ff))("targetSearchKey","idToDisplay")("subInfoKey","descriptionToDisplay")}function Qf(t,e){1&t&&(n.Wb(0,"div",8),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noDiffusionList")," "))}function Nf(t,e){1&t&&(n.Rb(0,"div",9),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.diffNoDestmsg"),n.Ec)}function zf(t,e){if(1&t&&(n.Ub(0),n.Qc(1),n.Tb()),2&t){const t=n.hc(2).$implicit,e=n.hc(2);n.Db(1),n.Sc("(",e.diffList[t.id].items.length,") ")}}function Bf(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",22),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(6).changeDest(i)})),n.Wb(1,"span"),n.Qc(2),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(2),n.Rc(t.labelToDisplay)}}function Uf(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div"),n.Wb(1,"button",18),n.dc("click",(function(){return n.Dc(t),n.hc(5).loadDestUserList()})),n.ic(2,"translate"),n.Rb(3,"mat-icon",19),n.Vb(),n.Wb(4,"mat-menu",null,20),n.Oc(6,Bf,3,1,"button",21),n.Vb(),n.Vb()}if(2&t){const t=n.zc(5),e=n.hc(5);n.Db(1),n.pc("title",n.jc(2,3,"lang.chooseAnotherEntityUser")),n.oc("matMenuTriggerFor",t),n.Db(5),n.oc("ngForOf",e.userDestList)}}function $f(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",27),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit,i=n.hc(2).$implicit,a=n.hc(2).$implicit;return n.hc(2).changeRole(i,a,e)})),n.Qc(1),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(1),n.Rc(t.label)}}function Hf(t,e){if(1&t&&(n.Ub(0),n.Oc(1,$f,2,1,"button",26),n.Tb()),2&t){const t=e.$implicit,i=n.hc(6);n.Db(1),n.oc("ngIf",t.canUpdate&&"redirect"!==i.target||"dest"!==t.id&&"redirect"===i.target&&t.canUpdate)}}function Gf(t,e){if(1&t&&(n.Wb(0,"div"),n.Wb(1,"button",23),n.Qc(2),n.Rb(3,"i",24),n.Vb(),n.Wb(4,"mat-menu",null,25),n.Oc(6,Hf,2,1,"ng-container",5),n.Vb(),n.Vb()),2&t){const t=n.zc(5),e=n.hc(3).$implicit,i=n.hc(2);n.Db(1),n.oc("matMenuTriggerFor",t)("disabled",!i.canUpdateRoles()),n.Db(1),n.Sc("",e.label," "),n.Db(2),n.Fb("roleListMenu"),n.Db(2),n.oc("ngForOf",i.availableRoles)}}function Xf(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div"),n.Wb(1,"button",28),n.dc("click",(function(){n.Dc(t);const e=n.hc().index,i=n.hc(2).$implicit;return n.hc(2).deleteItem(i.id,e)})),n.Rb(2,"mat-icon",29),n.Vb(),n.Vb()}if(2&t){const t=n.hc(5);n.Db(1),n.oc("disabled",!t.canUpdateRoles())}}function qf(t,e){if(1&t&&(n.Wb(0,"mat-list-item",13),n.Rb(1,"mat-icon",14),n.Wb(2,"div",15),n.Wb(3,"p",16),n.Qc(4),n.Vb(),n.Wb(5,"p",17),n.Qc(6),n.Vb(),n.Vb(),n.Oc(7,Uf,7,5,"div",0),n.Oc(8,Gf,7,6,"div",0),n.Oc(9,Xf,3,1,"div",0),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2).$implicit,a=n.hc(2);n.Db(1),n.Ib("fa-user","user_id"===t.item_type||"user"===t.item_type)("fa-sitemap","entity_id"===t.item_type||"entity"===t.item_type),n.Db(2),n.oc("title",t.itemLabel),n.Db(1),n.Rc(t.itemLabel),n.Db(1),n.oc("title",t.itemSubLabel),n.Db(1),n.Sc(" ",t.itemSubLabel,""),n.Db(1),n.oc("ngIf","dest"===i.id&&"redirect"===a.target&&a.adminMode),n.Db(1),n.oc("ngIf","dest"!==i.id&&a.adminMode&&("user_id"===t.item_type||"user"===t.item_type)),n.Db(1),n.oc("ngIf","dest"!==i.id&&a.adminMode)}}function Kf(t,e){if(1&t&&(n.Wb(0,"mat-expansion-panel",11),n.Wb(1,"mat-expansion-panel-header"),n.Wb(2,"mat-panel-title"),n.Qc(3),n.Oc(4,zf,2,1,"ng-container",0),n.Vb(),n.Vb(),n.Wb(5,"mat-list"),n.Oc(6,qf,10,11,"mat-list-item",12),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc(2);n.oc("expanded","dest"===t.id||e.adminMode||e.expanded),n.Db(3),n.Sc(" ",t.label," "),n.Db(1),n.oc("ngIf","dest"!==t.id),n.Db(2),n.oc("ngForOf",e.diffList[t.id].items)}}function Yf(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Kf,7,4,"mat-expansion-panel",10),n.Tb()),2&t){const t=e.$implicit,i=n.hc(2);n.Db(1),n.oc("ngIf",i.diffList[t.id].items.length>0)}}function Jf(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Lf,3,7,"plugin-autocomplete",2),n.Oc(2,Qf,3,3,"div",3),n.Oc(3,Nf,2,3,"div",4),n.Oc(4,Yf,2,1,"ng-container",5),n.Tb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.adminMode&&t.canUpdateRoles()),n.Db(1),n.oc("ngIf",t.isEmptyList()&&!t.loading),n.Db(1),n.oc("ngIf",t.hasNoDest),n.Db(1),n.oc("ngForOf",t.availableRoles)}}function Zf(t,e){1&t&&(n.Wb(0,"div",30),n.Rb(1,"mat-spinner",31),n.Vb())}function tm(t,e){if(1&t&&n.Rb(0,"app-history-diffusions-list",35),2&t){const t=n.hc(2);n.oc("resId",t.resId)}}function em(t,e){1&t&&(n.Ub(0),n.Rb(1,"mat-divider"),n.Wb(2,"mat-expansion-panel",32),n.Wb(3,"mat-expansion-panel-header"),n.Wb(4,"mat-panel-title",33),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Vb(),n.Oc(7,tm,1,1,"ng-template",34),n.Vb(),n.Tb()),2&t&&(n.Db(5),n.Sc(" ",n.jc(6,1,"lang.showDiffusionHistory")," "))}let im=(()=>{class t{constructor(t,e,i,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.renderer=a,this.dialog=s,this.functions=o,this.headerService=r,this.roles=[],this.loading=!0,this.hasHistory=!1,this.availableRoles=[],this.keepRoles=[],this.currentEntityId=0,this.userDestList=[],this.diffList=null,this.listinstanceClone=[],this.hasNoDest=!1,this.keepDiffusionRoleInOutgoingIndexation=!1,this.resId=null,this.keepDestForRedirection=!1,this.entityId=null,this.selfDest=!1,this.category="",this.adminMode=!1,this.allowedEntities=[],this.expanded=!1,this.customDiffusion=[],this.target="",this.triggerEvent=new n.o}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){yield this.initRoles(),null!==this.resId&&0!=this.resId&&"redirect"!==this.target?this.loadListinstance(this.resId):null!==this.resId&&0!=this.resId||this.functions.empty(this.entityId)||0!==this.customDiffusion.length?this.customDiffusion.length>0&&this.loadCustomDiffusion():this.loadListModel(this.entityId,!1,this.selfDest),this.loading=!1}))}drop(t){t.previousContainer===t.container||"dest"!=t.container.id&&Object(lo.i)(t.previousContainer.data,t.container.data,t.previousIndex,t.currentIndex)}noReturnPredicate(){return!1}allPredicate(){return!0}loadCustomDiffusion(){[...new Set(this.customDiffusion.map(t=>t.mode))].forEach(t=>{this.diffList[t].items=this.customDiffusion.filter(e=>e.mode===t).map(e=>({item_mode:t,item_type:e.type,itemSerialId:e.id,itemId:"",itemLabel:e.labelToDisplay,itemSubLabel:e.descriptionToDisplay,difflist_type:"entity_id",process_date:null,process_comment:null}))}),void 0!==this.diffFormControl&&this.setFormValues()}loadListModel(t,e=!1,i=!1){return Object(r.a)(this,void 0,void 0,(function*(){this.loading=!0,this.currentEntityId=t,this.userDestList=[];const n=yield this.getListModel(t);if(this.removeAllItems(),n.length>0&&n[0].forEach(t=>{this.diffList[t.item_mode].items.push(t)}),i&&this.headerService.user.entities[0].id===t&&(this.diffList.dest.items=[{item_mode:"dest",item_type:"user",itemSerialId:this.headerService.user.id,itemId:"",itemLabel:`${this.headerService.user.firstname} ${this.headerService.user.lastname}`,itemSubLabel:this.headerService.user.entities[0].entity_label,difflist_type:"entity_id",process_date:null,process_comment:null}]),null!==this.resId){const t=yield this.getListinstance(this.resId);void 0!==t&&t.forEach(t=>{e&&"dest"==t.item_mode&&(this.diffList[t.item_mode].items=[t]),this.keepRoles.indexOf(t.item_mode)>-1&&0===this.diffList[t.item_mode].items.filter(e=>e.itemSerialId===t.itemSerialId&&e.item_type===t.item_type).length&&this.diffList[t.item_mode].items.push(t),this.keepDestForRedirection&&"dest"==t.item_mode&&0===this.diffList.cc.items.filter(e=>e.itemSerialId===t.itemSerialId&&e.item_type===t.item_type).length&&this.diffList.cc.items.push(t)})}"outgoing"!==this.category||this.keepDiffusionRoleInOutgoingIndexation||Object.keys(this.diffList).forEach(t=>{"dest"!==t&&(this.diffList[t].items=[])}),void 0!==this.diffFormControl&&this.setFormValues(),this.listinstanceClone=JSON.parse(JSON.stringify(this.getCurrentListinstance())),this.loading=!1}))}getListModel(t){return new Promise((e,i)=>{this.http.get(`../rest/listTemplates/entities/${t}?type=diffusionList`).pipe(Object(l.a)(t=>(t.listTemplates=t.listTemplates.map(t=>t.items.map(t=>({listmodel_id:t.id,listinstance_id:t.listinstance_id,item_mode:t.item_mode,item_type:t.item_type,itemSerialId:t.item_id,itemId:"",itemLabel:t.labelToDisplay,itemSubLabel:t.descriptionToDisplay,difflist_type:"entity_id",process_date:null,process_comment:null}))),t.listTemplates)),Object(mt.a)(t=>{e(t)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}getListinstance(t){return new Promise((e,i)=>{0!=t?this.http.get(`../rest/resources/${t}/listInstance`).pipe(Object(l.a)(t=>(this.hasHistory=t.hasHistory,t.listInstance=t.listInstance.map(t=>({listinstance_id:t.listinstance_id,item_mode:t.item_mode,item_type:"user_id"===t.item_type?"user":"entity",itemSerialId:t.itemSerialId,itemId:t.item_id,itemLabel:t.labelToDisplay,itemSubLabel:t.descriptionToDisplay,difflist_type:t.difflist_type,process_date:null,process_comment:null})),t.listInstance)),Object(mt.a)(t=>{e(t)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe():e([])})}loadListinstance(t){return Object(r.a)(this,void 0,void 0,(function*(){this.resId=t,this.http.get(`../rest/resources/${t}/fields/destination?alt=true`).pipe(Object(mt.a)(t=>{this.currentEntityId=t.field}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe(),this.loading=!0;const e=yield this.getListinstance(t);this.removeAllItems(),e.forEach(t=>{this.functions.empty(this.diffList[t.item_mode])||this.diffList[t.item_mode].items.push(t)}),0===e.filter(t=>"dest"===t.item_mode).length&&!this.availableRoles.filter(t=>"dest"===t.id)[0].canUpdate&&this.adminMode&&(this.adminMode=!1,this.hasNoDest=!0),void 0!==this.diffFormControl&&this.setFormValues(),this.loading=!1,this.listinstanceClone=JSON.parse(JSON.stringify(this.getCurrentListinstance()))}))}saveListinstance(){if(!this.hasEmptyDest())return new Promise((t,e)=>{const i=[{resId:this.resId,listInstances:this.getCurrentListinstance()}];this.http.put("../rest/listinstances",i).pipe(Object(mt.a)(e=>{e&&null!=e.errors?this.notify.error(e.errors):(this.listinstanceClone=JSON.parse(JSON.stringify(this.getCurrentListinstance())),this.notify.success(this.translate.instant("lang.diffusionListUpdated")),t(!0))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()});this.notify.error(this.translate.instant("lang.noDest"))}initRoles(){return new Promise((t,e)=>{this.http.get("../rest/roles?context="+this.target).pipe(Object(l.a)(t=>(this.keepDiffusionRoleInOutgoingIndexation=t.parameters.keepDiffusionRoleInOutgoingIndexation,t.roles=t.roles.map(t=>Object.assign(Object.assign({},t),{id:t.id})),t.roles)),Object(mt.a)(e=>{this.diffList={},this.availableRoles=e,this.availableRoles.forEach(t=>{this.diffList[t.id]={label:t.label,items:[]},t.keepInListInstance&&this.keepRoles.push(t.id)}),t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}deleteItem(t,e){this.diffList[t].items.splice(e,1),void 0!==this.diffFormControl&&this.setFormValues()}getCurrentListinstance(){let t=[];return null!==this.diffList&&Object.keys(this.diffList).forEach(e=>{this.diffList[e].items.length>0&&this.diffList[e].items.forEach(i=>{t.push({difflist_type:i.difflist_type,item_id:i.itemSerialId,item_mode:"copy"===e?"cc":e,item_type:i.item_type,process_date:i.process_date,process_comment:i.process_comment})})}),t}loadDestUserList(){this.currentEntityId>0&&0==this.userDestList.length&&this.http.get("../rest/entities/"+this.currentEntityId+"/users").subscribe(t=>{this.userDestList=t.users,this.loading=!1},t=>{this.notify.handleErrors(t)})}changeDest(t){this.diffList.dest.items[0]={listinstance_id:null,item_mode:"dest",item_type:"user",itemSerialId:t.id,itemId:t.user_id,itemLabel:t.labelToDisplay,itemSubLabel:t.descriptionToDisplay,difflist_type:"entity_id",process_date:null,process_comment:null}}getDestUser(){return!(null===this.diffList||!this.diffList.dest)&&this.diffList.dest.items}addElem(t){return Object(r.a)(this,void 0,void 0,(function*(){let e="cc";this.hasEmptyDest()&&"user"==t.type&&(e=this.currentEntityId?(yield this.isUserInCurrentEntity(t.serialId))&&this.availableRoles.filter(t=>"dest"===t.id)[0].canUpdate?"dest":"cc":this.availableRoles.filter(t=>"dest"===t.id)[0].canUpdate?"dest":"cc");let i="";i="user"==t.type?"user":"entity";const n={listinstance_id:null,item_mode:e,item_type:i,itemSerialId:t.serialId,itemId:t.id,itemLabel:t.idToDisplay,itemSubLabel:t.descriptionToDisplay,difflist_type:"entity_id",process_date:null,process_comment:null};this.isItemInThisRole(n,"cc")||(this.diffList[e].items.unshift(n),void 0!==this.diffFormControl&&this.setFormValues())}))}isItemInThisRole(t,e){return this.diffList[e].items.map((t,e)=>Object.assign(Object.assign({},t),{index:e})).filter(e=>e.itemSerialId===t.itemSerialId&&e.item_type===t.item_type).length>0}isUserInCurrentEntity(t){return new Promise((e,i)=>{this.http.get(`../rest/entities/${this.currentEntityId}/users`).pipe(Object(mt.a)(i=>{const n=i.users.filter(e=>e.id===t).length>0;e(n)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}removeAllItems(){Object.keys(this.diffList).forEach(t=>{this.diffList[t].items=[]})}hasEmptyDest(){return 0===this.diffList.dest.items.length}isEmptyList(){let t=!0;return null!==this.diffList&&Object.keys(this.diffList).forEach(e=>{this.diffList[e].items.length>0&&(t=!1)}),t}changeRole(t,e,i){"dest"===i.id?this.switchUserWithOldDest(t,e):this.changeUserRole(t,e,i)}switchMode(){this.adminMode=!this.adminMode,this.adminMode&&this.canUpdateRoles()&&setTimeout(()=>{this.renderer.selectRootElement("#autoCompleteInput").focus()},100)}switchUserWithOldDest(t,e){this.http.get("../rest/users/"+t.itemSerialId+"/entities").pipe(Object(l.a)(t=>(t.entities=t.entities.filter(t=>"Y"===t.primary_entity).map(t=>t.id),t)),Object(mt.a)(i=>{let n=-1,a=!1,s=[];if(this.allowedEntities.forEach(t=>{i.entities.indexOf(t)>-1&&(a=!0,s.push(i.entities[i.entities.indexOf(t)]))}),a||"process"===this.target||"details"===this.target){if(this.diffList.dest.items.length>0){const t=this.diffList.dest.items[0];n=this.diffList[e.id].items.map(t=>t.itemSerialId).indexOf(t.itemSerialId),-1!==n||this.isItemInThisRole(t,e.id)||(t.item_mode=e.id,this.diffList[e.id].items.push(t))}const i=this.diffList[e.id].items.map((t,e)=>Object.assign(Object.assign({},t),{index:e})).filter(e=>e.itemSerialId===t.itemSerialId&&e.item_type===t.item_type);i.length>0&&this.diffList[e.id].items.splice(i[0].index,1),t.item_mode="dest",this.diffList.dest.items[0]=t,void 0!==this.diffFormControl&&this.setFormValues(),void 0!==this.triggerEvent&&this.triggerEvent.emit(s)}else this.dialog.open(qt.a,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.userUnauthorized"),msg:"<b>"+t.itemLabel+"</b> "+this.translate.instant("lang.notInAuthorizedEntities")}})})).subscribe()}changeUserRole(t,e,i){let n;n=this.diffList[e.id].items.map(t=>t.itemSerialId).indexOf(t.itemSerialId),n>-1&&this.diffList[e.id].items.splice(n,1),this.isItemInThisRole(t,i.id)||(t.item_mode=i.id,this.diffList[i.id].items.push(t)),void 0!==this.diffFormControl&&this.setFormValues()}setFormValues(){let t=[];Object.keys(this.diffList).forEach(e=>{t=t.concat(this.diffList[e].items.map(t=>({id:t.itemSerialId,mode:e,type:"user"===t.item_type?"user":"entity"})))}),this.diffFormControl.setValue(t),this.diffFormControl.markAsTouched()}canUpdateRoles(){return this.availableRoles.filter(t=>!0===t.canUpdate).length>0}isModified(){return JSON.stringify(this.listinstanceClone)!==JSON.stringify(this.getCurrentListinstance())}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(n.I),n.Qb(q.b),n.Qb(_t.a),n.Qb(y.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-diffusions-list"]],inputs:{resId:"resId",keepDestForRedirection:"keepDestForRedirection",entityId:"entityId",selfDest:"selfDest",category:"category",adminMode:"adminMode",allowedEntities:"allowedEntities",expanded:"expanded",customDiffusion:"customDiffusion",target:"target",diffFormControl:"diffFormControl"},outputs:{triggerEvent:"triggerEvent"},decls:3,vars:3,consts:[[4,"ngIf"],["style","display:flex;",4,"ngIf"],["appearance","ouline",3,"labelPlaceholder","routeDatas","targetSearchKey","subInfoKey","triggerEvent",4,"ngIf"],["style","text-align:center;font-size:24px;font-weight:bold;opacity:0.3;",4,"ngIf"],["class","alert-message alert-message-danger","role","alert",3,"innerHTML",4,"ngIf"],[4,"ngFor","ngForOf"],["appearance","ouline",3,"labelPlaceholder","routeDatas","targetSearchKey","subInfoKey","triggerEvent"],["test",""],[2,"text-align","center","font-size","24px","font-weight","bold","opacity","0.3"],["role","alert",1,"alert-message","alert-message-danger",3,"innerHTML"],["class","diffusionList",3,"expanded",4,"ngIf"],[1,"diffusionList",3,"expanded"],["disableRipple","","class","item-diffusion-list",4,"ngFor","ngForOf"],["disableRipple","",1,"item-diffusion-list"],["mat-list-icon","","color","primary",1,"fa"],[1,"item-diffusion"],["mat-line","",3,"title"],["mat-line","",1,"subInfo",3,"title"],["mat-icon-button","",3,"matMenuTriggerFor","title","click"],["color","primary",1,"fa","fa-edit"],["menuDestUserList","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["mat-menu-item","",3,"click"],["mat-button","",3,"matMenuTriggerFor","disabled"],[1,"fa","fa-chevron-down"],["menu","matMenu"],["mat-menu-item","","style","font-size:13px;",3,"click",4,"ngIf"],["mat-menu-item","",2,"font-size","13px",3,"click"],["mat-icon-button","","color","warn",3,"disabled","click"],[1,"fa","fa-trash",2,"height","auto"],[2,"display","flex"],[2,"margin","auto"],[2,"box-shadow","none"],["color","primary"],["matExpansionPanelContent",""],[2,"display","contents",3,"resId"]],template:function(t,e){1&t&&(n.Oc(0,Jf,5,4,"ng-container",0),n.Oc(1,Zf,2,0,"div",1),n.Oc(2,em,8,3,"ng-container",0)),2&t&&(n.oc("ngIf",!e.loading),n.Db(1),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading&&e.hasHistory))},directives:[P.t,P.s,ii,gt.c,gt.g,gt.h,R.a,R.d,S.a,R.c,W.l,k.b,ne.d,ne.e,ne.b,V.c,T.a,gt.e,Ef],pipes:[g.d],styles:[".cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);background:#fff;padding:10px}.cdk-drag-preview[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{display:none}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.columns[_ngcontent-%COMP%]:last-child{border:none}.cdk-list.cdk-drop-list-dragging[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.columns[_ngcontent-%COMP%]{cursor:move}.notDraggable[_ngcontent-%COMP%]{cursor:not-allowed}.notEditable[_ngcontent-%COMP%]{cursor:auto}.roleList[_ngcontent-%COMP%]{padding-bottom:40px}.diffusionList[_ngcontent-%COMP%]{box-shadow:none}.diffusionList[_ngcontent-%COMP%] .mat-expansion-panel-header-title[_ngcontent-%COMP%]{color:#4a4a4a;font-weight:700;font-size:13px}.diffusionList[_ngcontent-%COMP%] .item-diffusion-list[_ngcontent-%COMP%]{height:55px;margin-bottom:10px;background-color:hsla(0,0%,84.7%,.1);border-radius:10px;font-size:13px}.diffusionList[_ngcontent-%COMP%] .item-diffusion-list[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{font-size:13px;height:13px;width:13px;padding-right:10px}.diffusionList[_ngcontent-%COMP%] .item-diffusion-list[_ngcontent-%COMP%] .item-diffusion[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;justify-content:center;overflow:hidden}.diffusionList[_ngcontent-%COMP%] .item-diffusion-list[_ngcontent-%COMP%] .item-diffusion[_ngcontent-%COMP%] .mat-line[_ngcontent-%COMP%]{margin:0}.diffusionList[_ngcontent-%COMP%] .item-diffusion-list[_ngcontent-%COMP%] .subInfo[_ngcontent-%COMP%]{font-size:13px;opacity:.5}.diffusionList[_ngcontent-%COMP%] .item-diffusion-list[_ngcontent-%COMP%] .mat-button[_ngcontent-%COMP%]{background:#fff;font-size:13px;border:.5px solid rgba(74,74,74,.32);border-radius:29.5px;color:#4a4a4a} .roleListMenu .mat-menu-content{padding-top:0;padding-bottom:0;font-size:13px;color:#4a4a4a}"]}),t})();const nm=["appDiffusionsList"],am=["noteEditor"];function sm(t,e){1&t&&(n.Wb(0,"div",10),n.Rb(1,"mat-spinner",11),n.Vb())}function om(t,e){1&t&&(n.Wb(0,"b",13),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function rm(t,e){if(1&t&&(n.Wb(0,"b",13),n.Qc(1),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Rc(t.data.resource.chrono)}}function cm(t,e){if(1&t&&(n.Wb(0,"b",13),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function lm(t,e){if(1&t&&(n.Ub(0),n.Qc(1),n.ic(2,"translate"),n.Oc(3,om,3,3,"b",12),n.Oc(4,rm,2,1,"b",12),n.Oc(5,cm,3,4,"b",12),n.Qc(6," ?"),n.Rb(7,"br"),n.Tb()),2&t){const t=n.hc();n.Db(1),n.Sc(" ",n.jc(2,4,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===t.data.resIds.length),n.Db(1),n.oc("ngIf",1==t.data.resIds.length),n.Db(1),n.oc("ngIf",t.data.resIds.length>1)}}function dm(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",14),n.Wb(1,"div"),n.Wb(2,"button",15),n.dc("click",(function(){return n.Dc(t),n.hc().loadEntities()})),n.Rb(3,"i",16),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Wb(6,"div"),n.Wb(7,"button",15),n.dc("click",(function(){return n.Dc(t),n.hc().loadDestUser()})),n.Rb(8,"i",17),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Vb()}2&t&&(n.Db(4),n.Rc(n.jc(5,2,"lang.toAService")),n.Db(5),n.Rc(n.jc(10,4,"lang.toAnUser")))}function hm(t,e){1&t&&(n.Wb(0,"div"),n.Wb(1,"div",18),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Sc(" ",n.jc(3,1,"lang.noSettingsAvailable"),""))}function um(t,e){if(1&t&&(n.Wb(0,"div",19),n.Wb(1,"div",20),n.Wb(2,"h2"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"div",21),n.Wb(6,"mat-form-field",22),n.Rb(7,"input",23),n.ic(8,"translate"),n.Vb(),n.Rb(9,"div",24),n.Vb(),n.Vb(),n.Wb(10,"div",25),n.Wb(11,"h2",26),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Wb(14,"div",21),n.Rb(15,"app-diffusions-list",27,28),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(3),n.Sc("",n.jc(4,11,"lang.redirectTo")," :"),n.Db(3),n.Lc("font-size",10,"px"),n.Db(1),n.pc("placeholder",n.jc(8,13,"lang.searchEntities")),n.Db(4),n.pc("title",t.currentEntity.entity_label),n.Db(1),n.Tc("",n.jc(13,15,"lang.diffusionList"),' "',t.currentEntity.entity_label,'" : '),n.Db(3),n.oc("adminMode",!0)("resId",t.injectDatasParam.resId)("keepDestForRedirection",t.injectDatasParam.keepDestForRedirection)("target","redirect")}}function pm(t,e){if(1&t&&(n.Wb(0,"mat-option",38),n.Wb(1,"mat-list"),n.Wb(2,"mat-list-item"),n.Rb(3,"mat-icon",39),n.Wb(4,"h4",40),n.Qc(5),n.Vb(),n.Wb(6,"p",41),n.Qc(7),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(5),n.Rc(t.labelToDisplay),n.Db(2),n.Sc(" ",t.descriptionToDisplay," ")}}function bm(t,e){if(1&t&&(n.Wb(0,"mat-list"),n.Wb(1,"mat-list-item"),n.Rb(2,"mat-icon",42),n.Wb(3,"h4",40),n.Qc(4),n.Vb(),n.Wb(5,"p",43),n.Qc(6),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(4),n.Rc(t.destUser.labelToDisplay),n.Db(2),n.Sc(" ",t.destUser.descriptionToDisplay," ")}}function fm(t,e){1&t&&(n.Wb(0,"div",44),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noPerson")," "))}function mm(t,e){if(1&t&&(n.Wb(0,"div",45),n.Qc(1),n.ic(2,"translate"),n.Wb(3,"b"),n.Qc(4),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Sc("",n.jc(2,2,"lang.destinationChangingInfo")," "),n.Db(3),n.Rc(t.destUser.descriptionToDisplay)}}function gm(t,e){if(1&t&&(n.Wb(0,"div",45),n.Qc(1),n.ic(2,"translate"),n.Wb(3,"b"),n.Qc(4),n.Vb(),n.Qc(5),n.ic(6,"translate"),n.Wb(7,"b"),n.Qc(8),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Sc("",n.jc(2,4,"lang.destinationChangingInfoMass")," "),n.Db(3),n.Rc(t.destUser.labelToDisplay),n.Db(1),n.Sc(" ",n.jc(6,6,"lang.destinationChangingInfoMass2")," "),n.Db(3),n.Rc(t.destUser.descriptionToDisplay)}}function vm(t,e){if(1&t&&(n.Wb(0,"div",45),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3,"\xa0"),n.Rb(4,"span",46),n.ic(5,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.Rc(t.oldUser.labelToDisplay),n.Db(2),n.oc("innerHTML",n.jc(5,2,"lang.willBeAutomaticallyInCopy"),n.Ec)}}function _m(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",29),n.Wb(1,"mat-form-field",22),n.Wb(2,"input",30),n.dc("click",(function(){return n.Dc(t),n.hc().userRedirectCtrl.setValue("")})),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-autocomplete",31,32),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc().changeDest(e)})),n.Oc(6,pm,8,3,"mat-option",33),n.ic(7,"async"),n.Vb(),n.Vb(),n.Wb(8,"div",20),n.Wb(9,"h2",34),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Wb(12,"div",35),n.Oc(13,bm,7,2,"mat-list",4),n.Oc(14,fm,3,3,"div",36),n.Vb(),n.Vb(),n.Oc(15,mm,5,4,"div",37),n.Oc(16,gm,9,8,"div",37),n.Oc(17,vm,6,4,"div",37),n.Vb()}if(2&t){const t=n.zc(5),e=n.hc();n.Db(1),n.Lc("font-size",10,"px"),n.Db(1),n.pc("placeholder",n.jc(3,12,"lang.searchNewAssignee")),n.oc("matAutocomplete",t)("formControl",e.userRedirectCtrl),n.Db(4),n.oc("ngForOf",n.jc(7,14,e.filteredUserRedirect)),n.Db(4),n.Sc("",n.jc(11,16,"lang.newAssignee")," :"),n.Db(3),n.oc("ngIf",null!=e.destUser),n.Db(1),n.oc("ngIf",null==e.destUser),n.Db(1),n.oc("ngIf",e.isDestinationChanging&&1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.isDestinationChanging&&e.data.resIds.length>1),n.Db(1),n.oc("ngIf",e.keepDestForRedirection&&null!=e.oldUser)}}function ym(t,e){if(1&t&&(n.Wb(0,"div",29),n.Rb(1,"app-note-editor",47,48),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("resIds",t.data.resIds)}}function xm(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",52),n.dc("click",(function(){return n.Dc(t),n.hc(2).onSubmit()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(2);n.oc("disabled",t.checkValidity()),n.Db(1),n.Rc(n.jc(2,2,"lang.validate"))}}function Cm(t,e){if(1&t&&(n.Wb(0,"div",49),n.Oc(1,xm,3,4,"button",50),n.Wb(2,"button",51),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",""!=t.redirectMode),n.Db(1),n.oc("disabled",t.loading),n.Db(1),n.Rc(n.jc(4,3,"lang.cancel"))}}let Om=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functionsService=s,this.loading=!1,this.entities=[],this.injectDatasParam={resId:0,editable:!0,keepDestForRedirection:!1},this.destUser=null,this.oldUser=null,this.keepDestForRedirection=!1,this.currentDiffusionListDestRedirect=[],this.diffusionListDestRedirect=[],this.currentEntity={serialId:0,entity_label:""},this.redirectMode="",this.userListRedirect=[],this.userRedirectCtrl=new X.i,this.isDestinationChanging=!1}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.loading=!0,yield this.getEntities(),yield this.getDefaultEntity(),0===this.userListRedirect.length&&0===this.entities.filter(t=>t.allowed).length?(this.redirectMode="none",this.loading=!1):0===this.userListRedirect.length&&this.entities.filter(t=>t.allowed).length>0?this.loadEntities():this.userListRedirect.length>0&&0===this.entities.filter(t=>t.allowed).length?this.loadDestUser():this.loading=!1}))}getEntities(){return new Promise((t,e)=>{this.http.get(`../rest/resourcesList/users/${this.data.userId}/groups/${this.data.groupId}/baskets/${this.data.basketId}/actions/${this.data.action.id}/getRedirect`).pipe(Object(mt.a)(e=>{this.entities=e.entities,this.userListRedirect=e.users,this.keepDestForRedirection=e.keepDestForRedirection,this.injectDatasParam.keepDestForRedirection=e.keepDestForRedirection,t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}getDefaultEntity(){return new Promise((t,e)=>{1===this.data.resIds.length?this.http.get(`../rest/resources/${this.data.resIds[0]}/fields/destination?alt=true`).pipe(Object(mt.a)(e=>{this.functionsService.empty(e.field)?this.entities.filter(t=>t.state.selected).length>0&&(this.currentEntity=this.entities.filter(t=>t.state.selected)[0]):(this.currentEntity=this.entities.filter(t=>t.serialId===e.field)[0],this.entities=this.entities.map(t=>Object.assign(Object.assign({},t),{state:{selected:!1,opened:!1,disabled:t.state.disabled}}))),t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe():(this.currentEntity=this.entities.filter(t=>t.state.selected)[0],t(!0))})}loadEntities(){this.redirectMode="entity",1===this.data.resIds.length&&(this.injectDatasParam.resId=this.data.resIds[0]),this.loading=!1,setTimeout(()=>{$("#jstree").jstree({checkbox:{deselect_all:!0,three_state:!1},core:{force_text:!0,themes:{name:"proton",responsive:!0},multiple:!1,data:this.entities},plugins:["checkbox","search","sort"]});let t=!1;$("#jstree_search").keyup((function(){t&&clearTimeout(t),t=setTimeout((function(){const t=$("#jstree_search").val();$("#jstree").jstree(!0).search(t)}),250)})),$("#jstree").on("loaded.jstree",(t,e)=>{this.currentEntity.serialId>0&&($("#jstree").jstree("select_node",this.currentEntity),this.selectEntity(this.currentEntity,!0))}).on("select_node.jstree",(t,e)=>{this.selectEntity(e.node.original)}).on("deselect_node.jstree",(t,e)=>{$("#jstree").jstree("select_node",e.node.original)}).jstree()},0)}loadDestUser(){this.redirectMode="user",this.filteredUserRedirect=this.userRedirectCtrl.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>t?this._filterUserRedirect(t):this.userListRedirect.slice())),this.loading=!1,1===this.data.resIds.length?this.http.get("../rest/resources/"+this.data.resIds[0]+"/listInstance").subscribe(t=>{this.diffusionListDestRedirect=t.listInstance,Object.keys(t).forEach(e=>{t[e].forEach(t=>{"dest"===t.item_mode&&(this.oldUser=t)})}),$(".searchUserRedirect").click()},t=>{this.notify.handleErrors(t)}):(this.keepDestForRedirection=!1,setTimeout(()=>{$(".searchUserRedirect").click()},200))}changeDest(t){this.currentDiffusionListDestRedirect=this.diffusionListDestRedirect;const e=t.option.value;if(this.destUser={difflist_type:"entity_id",item_mode:"dest",item_type:"user_id",item_id:e.user_id,labelToDisplay:e.labelToDisplay,descriptionToDisplay:e.descriptionToDisplay},1===this.data.resIds.length){if(this.isDestinationChanging=!1,this.http.get("../rest/resources/"+this.data.resIds[0]+"/users/"+e.id+"/isDestinationChanging").subscribe(t=>{this.isDestinationChanging=t.isDestinationChanging},t=>{this.notify.handleErrors(t)}),this.keepDestForRedirection&&this.currentDiffusionListDestRedirect.length>0){let t=!1,e=null;this.currentDiffusionListDestRedirect.forEach(e=>{"cc"===e.item_mode&&e.item_id===this.oldUser.item_id&&(t=!0)}),t||(e=this.oldUser,e.item_mode="cc",this.currentDiffusionListDestRedirect.push(e))}this.currentDiffusionListDestRedirect.splice(this.currentDiffusionListDestRedirect.map(t=>t.item_mode).indexOf("dest"),1)}else this.isDestinationChanging=!0;this.currentDiffusionListDestRedirect.push(this.destUser),this.userRedirectCtrl.reset(),$(".searchUserRedirect").blur()}_filterUserRedirect(t){if("string"==typeof t){const e=t.toLowerCase();return this.userListRedirect.filter(t=>t.labelToDisplay.toLowerCase().indexOf(e)>=0)}}selectEntity(t,e=!1){this.currentEntity=t,this.appDiffusionsList.loadListModel(t.serialId,e)}onSubmit(){this.loading=!0,this.data.resIds.length>0&&this.executeAction()}executeAction(){"user"===this.redirectMode?this.http.put(this.data.processActionRoute,{resources:this.data.resIds,data:{onlyRedirectDest:!0,listInstances:this.currentDiffusionListDestRedirect},note:this.noteEditor.getNote()}).pipe(Object(mt.a)(t=>{t&&null!=t.errors&&this.notify.error(t.errors),this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe():this.http.put(this.data.processActionRoute,{resources:this.data.resIds,data:{listInstances:this.appDiffusionsList.getCurrentListinstance()},note:this.noteEditor.getNote()}).pipe(Object(mt.a)(t=>{t&&null!=t.errors&&this.notify.error(t.errors),this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}checkValidity(){return!("entity"===this.redirectMode&&this.appDiffusionsList&&this.appDiffusionsList.getDestUser().length>0&&this.currentEntity.serialId>0&&!this.loading||"user"===this.redirectMode&&this.currentDiffusionListDestRedirect.length>0&&null!=this.destUser&&!this.loading)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Xc(nm,!0),n.Xc(am,!0)),2&t&&(n.yc(i=n.ec())&&(e.appDiffusionsList=i.first),n.yc(i=n.ec())&&(e.noteEditor=i.first))},decls:13,vars:11,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[4,"ngIf"],["class","chooseMode",4,"ngIf"],["class","row","style","display: flex;",4,"ngIf"],["class","row",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","","class","actions",4,"ngIf"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary","class","highlight",4,"ngIf"],["color","primary",1,"highlight"],[1,"chooseMode"],["mat-stroked-button","","color","primary",3,"click"],[1,"fa","fa-sitemap"],[1,"fa","fa-user"],["role","alert",1,"alert-message","alert-message-danger",2,"margin-top","30px"],[1,"row",2,"display","flex"],[1,"redirectContent",2,"flex","2"],[1,"contentEntities"],["appearance","outline","floatLabel","never"],["matInput","","id","jstree_search","name","jstree_search","type","text",3,"placeholder"],["id","jstree"],[1,"redirectContent",2,"flex","1","overflow","auto"],[3,"title"],[3,"adminMode","resId","keepDestForRedirection","target"],["appDiffusionsList",""],[1,"row"],["matInput","",1,"searchUserRedirect",3,"placeholder","matAutocomplete","formControl","click"],["isOpen","true",3,"optionSelected"],["auto","matAutocomplete"],[3,"value",4,"ngFor","ngForOf"],[2,"top","-5px"],[1,"contentUser"],["class","noSelection",4,"ngIf"],["class","alert-message alert-message-info","role","alert","style","margin-top: 30px;",4,"ngIf"],[3,"value"],["mat-list-icon","","color","primary",1,"fa","fa-user",2,"padding-top","0px"],["mat-line",""],["mat-line","",2,"opacity","0.5","line-height","15px","font-size","10px"],["mat-list-icon","","color","primary",1,"fa","fa-2x","fa-user"],["mat-line","",2,"opacity","0.5"],[1,"noSelection"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","30px"],[3,"innerHTML"],[3,"resIds"],["noteEditor",""],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click",4,"ngIf"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,sm,2,0,"div",3),n.Oc(5,lm,8,6,"ng-container",4),n.Oc(6,dm,11,6,"div",5),n.Oc(7,hm,4,3,"div",4),n.Oc(8,um,17,17,"div",6),n.Oc(9,_m,18,18,"div",7),n.Oc(10,ym,3,1,"div",7),n.Vb(),n.Rb(11,"span",8),n.Oc(12,Cm,5,5,"div",9),n.Vb()),2&t&&(n.Db(2),n.Sc('"',e.data.action.label,'"'),n.Db(1),n.Ib("fullWidth","entity"==e.redirectMode),n.Db(1),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("ngIf",""==e.redirectMode&&!e.loading),n.Db(1),n.oc("ngIf","none"==e.redirectMode&&!e.loading),n.Db(1),n.oc("ngIf","entity"==e.redirectMode),n.Db(1),n.oc("ngIf","user"==e.redirectMode),n.Db(1),n.oc("ngIf",""!=e.redirectMode&&"none"!=e.redirectMode),n.Db(2),n.oc("ngIf",!e.loading))},directives:[q.i,q.f,P.t,V.c,k.b,Y.c,J.b,im,Ne.d,X.d,X.u,X.j,Ne.a,P.s,W.p,R.a,R.d,S.a,R.c,W.l,Du,q.c,q.d],pipes:[g.d,P.b],styles:[".fullWidth[_ngcontent-%COMP%]{width:70vw}.highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:1;overflow:hidden}.redirectContent[_ngcontent-%COMP%]{position:relative}.redirectContent[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:5px;left:30px;margin:0;padding:0 5px;color:#135f7f}.contentEntities[_ngcontent-%COMP%]{overflow:auto;height:60vh}.contentEntities[_ngcontent-%COMP%], .contentUser[_ngcontent-%COMP%]{background:#fff;border-radius:4px;border:1px solid #ccc;margin:10px;padding:10px}.contentEntitiesList[_ngcontent-%COMP%]{background:#fff;margin:10px;padding:10px;overflow:auto;height:60vh}.chooseMode[_ngcontent-%COMP%], .chooseMode[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:flex;justify-content:center}.chooseMode[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{flex:1}.chooseMode[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:10px;margin:10px;width:200px}.chooseMode[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{padding-right:10px}.noSelection[_ngcontent-%COMP%]{text-align:center;opacity:.5;font-style:italic}"]}),t})();const Dm=["noteEditor"];function wm(t,e){1&t&&(n.Wb(0,"div",10),n.Rb(1,"mat-spinner",11),n.Vb())}function Mm(t,e){if(1&t&&(n.Wb(0,"div",12),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Sc(" ",n.jc(2,1,"lang."+t.fatalError.reason)," ")}}function km(t,e){if(1&t&&(n.Wb(0,"li"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t," ")}}function Sm(t,e){if(1&t&&(n.Wb(0,"div",12),n.Qc(1),n.ic(2,"translate"),n.Rb(3,"br"),n.Wb(4,"div",13),n.Wb(5,"ul"),n.Oc(6,km,2,1,"li",14),n.Vb(),n.Vb(),n.Rb(7,"span",15),n.ic(8,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Sc(" ",n.jc(2,3,"lang.noShippingTemplate")," :"),n.Db(5),n.oc("ngForOf",t.entitiesList),n.Db(1),n.oc("innerHTML",n.jc(8,5,"lang.doShippingParameter"),n.Ec)}}function Im(t,e){1&t&&(n.Wb(0,"b",31),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function Pm(t,e){if(1&t&&(n.Wb(0,"b",31),n.Qc(1),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Rc(t.data.resource.chrono)}}function Vm(t,e){if(1&t&&(n.Wb(0,"b",31),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function Rm(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-checkbox",34),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).toggleIntegration(i.key)})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(3);n.oc("checked",i.data.resource.integrations[t.key]),n.Db(1),n.Sc("",n.jc(2,2,"lang."+t.key+"_doc")," ")}}function jm(t,e){if(1&t&&(n.Wb(0,"div",32),n.Oc(1,Rm,3,4,"mat-checkbox",33),n.ic(2,"keyvalue"),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("ngForOf",n.jc(2,1,t.integrationsInfo))}}function Am(t,e){if(1&t&&(n.Wb(0,"mat-option",35),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t.label," ")}}function Wm(t,e){if(1&t&&(n.Wb(0,"div",19),n.Wb(1,"div"),n.Wb(2,"div",36),n.Wb(3,"b"),n.Qc(4),n.Vb(),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(4),n.Rc(t.attachList.length),n.Db(1),n.Sc(" ",n.jc(6,2,"lang.shippingReadyToSend")," ")}}function Tm(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.chrono),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function Em(t,e){if(1&t&&(n.Wb(0,"div",19),n.Wb(1,"div"),n.Wb(2,"div",12),n.Wb(3,"p"),n.Wb(4,"b"),n.Qc(5),n.Vb(),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Wb(8,"ul"),n.Oc(9,Tm,5,4,"li",14),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(5),n.Rc(t.mailsNotSend.length),n.Db(1),n.Sc(" ",n.jc(7,3,"lang.shippingNotEligible")," : "),n.Db(3),n.oc("ngForOf",t.mailsNotSend)}}function Fm(t,e){if(1&t&&(n.Wb(0,"li"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",n.jc(2,1,"lang.maileva_"+t)," ")}}function Lm(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",19),n.Wb(1,"div",37),n.Wb(2,"div",38),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"div",39),n.Wb(6,"div",40),n.Wb(7,"div",41),n.Wb(8,"p"),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Wb(11,"ul"),n.Wb(12,"li"),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(15,"div",41),n.Wb(16,"p"),n.Qc(17),n.ic(18,"translate"),n.Vb(),n.Wb(19,"ul"),n.Oc(20,Fm,3,3,"li",14),n.Vb(),n.Vb(),n.Vb(),n.Wb(21,"mat-form-field",42),n.Wb(22,"input",43),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).currentShipping.fee=e})),n.ic(23,"translate"),n.Vb(),n.Wb(24,"span",44),n.Qc(25,"\xa0\u20ac"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(3),n.Sc(" ",n.jc(4,7,"lang.pricesInformations")," "),n.Db(6),n.Sc(" ",n.jc(10,9,"lang.sendMode")," : "),n.Db(4),n.Sc(" ",n.jc(14,11,"lang.maileva_"+t.currentShipping.options.sendMode)," "),n.Db(4),n.Sc(" ",n.jc(18,13,"lang.shapingOptions")," : "),n.Db(3),n.oc("ngForOf",t.currentShipping.options.shapingOptions),n.Db(2),n.pc("title",n.jc(23,15,"lang.totalPrice")),n.oc("ngModel",t.currentShipping.fee)}}function Qm(t,e){if(1&t&&(n.Rb(0,"img",45),n.ic(1,"async"),n.ic(2,"secureUrl")),2&t){const t=e.$implicit;n.rc("title","",t.chrono," : ",t.title,""),n.oc("src",n.jc(1,3,n.jc(2,5,"../rest/"+("attachment"===t.type?"attachments":"resources")+"/"+t.res_id+"/thumbnail")),n.Gc)}}function Nm(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-sidenav-container",16),n.Wb(1,"mat-sidenav-content",17),n.Wb(2,"div",18),n.Wb(3,"div",19),n.Qc(4),n.ic(5,"translate"),n.Oc(6,Im,3,3,"b",20),n.Oc(7,Pm,2,1,"b",20),n.Oc(8,Vm,3,4,"b",20),n.Qc(9," ? "),n.Vb(),n.Oc(10,jm,3,3,"div",21),n.Wb(11,"div",22),n.Wb(12,"mat-form-field"),n.Wb(13,"mat-label"),n.Qc(14),n.ic(15,"translate"),n.Vb(),n.Wb(16,"mat-select",23),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().currentShipping=e})),n.Oc(17,Am,2,2,"mat-option",24),n.Vb(),n.Vb(),n.Vb(),n.Oc(18,Wm,7,4,"div",25),n.Oc(19,Em,10,5,"div",25),n.Oc(20,Lm,26,17,"div",25),n.Wb(21,"div",19),n.Rb(22,"app-note-editor",26,27),n.Vb(),n.Vb(),n.Vb(),n.Wb(24,"mat-sidenav",28),n.Wb(25,"div",29),n.Oc(26,Qm,3,7,"img",30),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(4),n.Sc(" ",n.jc(5,14,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===t.data.resIds.length),n.Db(1),n.oc("ngIf",1==t.data.resIds.length),n.Db(1),n.oc("ngIf",t.data.resIds.length>1),n.Db(2),n.oc("ngIf",t.data.resIds.length>0),n.Db(4),n.Rc(n.jc(15,16,"lang.shippings")),n.Db(2),n.oc("ngModel",t.currentShipping),n.Db(1),n.oc("ngForOf",t.shippings),n.Db(1),n.oc("ngIf",t.attachList.length>0),n.Db(1),n.oc("ngIf",t.mailsNotSend.length>0),n.Db(1),n.oc("ngIf",null!=t.currentShipping),n.Db(2),n.oc("resIds",t.data.resIds),n.Db(2),n.oc("opened",t.attachList.length>0),n.Db(2),n.oc("ngForOf",t.attachList)}}let zm=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.loading=!1,this.shippings=[{label:"",description:"",options:{shapingOptions:[],sendMode:""},fee:0,account:{id:"",password:""}}],this.currentShipping=null,this.entitiesList=[],this.attachList=[],this.mailsNotSend=[],this.integrationsInfo={inShipping:{icon:"fas fa-shipping-fast"}},this.fatalError=""}ngOnInit(){this.loading=!0,this.checkShipping()}onSubmit(){this.loading=!0,this.data.resIds.length>0&&this.executeAction()}checkShipping(){this.http.post(`../rest/resourcesList/users/${this.data.userId}/groups/${this.data.groupId}/baskets/${this.data.basketId}/actions/${this.data.action.id}/checkShippings`,{resources:this.data.resIds}).pipe(Object(mt.a)(t=>{this.functions.empty(t.fatalError)?(this.shippings=t.shippingTemplates,this.mailsNotSend=t.canNotSend,this.entitiesList=t.entities,this.attachList=t.resources):(this.fatalError=t,this.shippings=[])}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(),Object(c.a)(!1)))).subscribe()}executeAction(){let t=this.attachList.filter(t=>"attachment"===t.type).map(t=>t.res_id_master);t=t.concat(this.attachList.filter(t=>"mail"===t.type).map(t=>t.res_id)),this.http.put(this.data.processActionRoute,{resources:t,data:{shippingTemplateId:this.currentShipping.id},note:this.noteEditor.getNote()}).pipe(Object(mt.a)(e=>{e&&null!=e.errors?this.notify.error(e.errors):this.dialogRef.close(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}toggleIntegration(t){this.http.put("../rest/resourcesList/integrations",{resources:this.data.resIds,integrations:{[t]:!this.data.resource.integrations[t]}}).pipe(Object(mt.a)(()=>{this.data.resource.integrations[t]=!this.data.resource.integrations[t],this.checkShipping()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Xc(Dm,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:16,vars:17,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],["class","alert-message alert-message-danger mailList","role","alert",4,"ngIf"],["autosize","","style","height:100%;",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["role","alert",1,"alert-message","alert-message-danger","mailList"],[1,"mailList"],[4,"ngFor","ngForOf"],[3,"innerHTML"],["autosize","",2,"height","100%"],[2,"background","white"],[1,"row",2,"margin","0"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],["style","padding:10px;display: flex;flex-direction: column;",4,"ngIf"],[1,"col-md-12",2,"padding-top","10px"],["name","currentShipping","required","",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["class","col-md-12",4,"ngIf"],[3,"resIds"],["noteEditor",""],["mode","side","fixedTopGap","56","position","end",2,"width","50%",3,"opened"],[1,"pjList"],[3,"title","src",4,"ngFor","ngForOf"],["color","primary",1,"highlight"],[2,"padding","10px","display","flex","flex-direction","column"],["color","primary",3,"checked","click",4,"ngFor","ngForOf"],["color","primary",3,"checked","click"],[3,"value"],["role","alert",1,"alert-message","alert-message-info","mailList"],[1,"formType",2,"flex-direction","column"],[1,"formType-title"],[1,"priceContent"],[1,"priceInfo"],[1,"col-md-6"],["appearance","outline"],["matInput","","required","","name","totalPrice","id","totalPrice","type","number","disabled","",3,"ngModel","title","ngModelChange"],["matSuffix",""],[3,"title","src"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,wm,2,0,"div",3),n.Oc(5,Mm,3,3,"div",4),n.Oc(6,Sm,9,7,"div",4),n.Oc(7,Nm,27,18,"mat-sidenav-container",5),n.Vb(),n.Rb(8,"span",6),n.Wb(9,"div",7),n.Wb(10,"button",8),n.dc("click",(function(){return e.onSubmit()})),n.Qc(11),n.ic(12,"translate"),n.Vb(),n.Wb(13,"button",9),n.Qc(14),n.ic(15,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(1),n.Ib("fullWidth",e.shippings.length>0)("fullHeight",e.shippings.length>0),n.Db(1),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.functions.empty(e.fatalError)),n.Db(1),n.oc("ngIf",e.functions.empty(e.fatalError)&&0==e.shippings.length),n.Db(1),n.oc("ngIf",e.shippings.length>0),n.Db(3),n.oc("disabled",e.loading||null==e.currentShipping||0==e.attachList.length),n.Db(1),n.Rc(n.jc(12,13,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(15,15,"lang.cancel")))},directives:[q.i,q.f,P.t,q.c,k.b,q.d,V.c,P.s,I.e,I.f,Y.c,Y.g,ee.a,X.F,X.u,X.x,Du,I.d,j.a,W.p,J.b,X.A,X.d,Y.j],pipes:[g.d,P.l,P.b,si],styles:[".fullHeight[_ngcontent-%COMP%]{height:70vh}.fullWidth[_ngcontent-%COMP%]{width:70vw}.highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:2;overflow:hidden}.mailList[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{font-size:12px;max-height:100px;overflow:auto;padding-left:25px;padding-right:5px;padding-bottom:10px;margin-top:10px}.mailList[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;text-decoration:underline}.mailList[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{font-size:120%}.formType[_ngcontent-%COMP%]{align-items:center;display:flex;margin:10px;border-radius:4px;border:1px solid #ccc;position:relative;padding:10px}.formType-title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:-7px;left:10px;padding:0;margin:0;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-form-field-suffix{color:#f99830;font-size:15px;top:0}.formType[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.priceContent[_ngcontent-%COMP%]{align-items:center;width:100%}.priceContent[_ngcontent-%COMP%], .priceContent-label[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.priceContent-label[_ngcontent-%COMP%]{text-align:right;color:#135f7f;flex:1;padding-right:10px}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:90px!important}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.priceInfo[_ngcontent-%COMP%]{padding-right:20px;font-size:10px;opacity:.5;width:100%}.pjList[_ngcontent-%COMP%]{display:flex;width:100%;overflow:auto;flex-direction:column;background:#666}.pjList[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin:10px}"]}),t})();const Bm=["noteEditor"];function Um(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Vb())}function $m(t,e){if(1&t&&(n.Wb(0,"b",17),n.Qc(1),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Rc(t.data.resource.chrono)}}function Hm(t,e){if(1&t&&(n.Wb(0,"b",17),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function Gm(t,e){if(1&t&&(n.Wb(0,"li"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t," ")}}function Xm(t,e){if(1&t&&(n.Wb(0,"div"),n.Wb(1,"div",18),n.Wb(2,"p"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"ul"),n.Oc(6,Gm,2,1,"li",19),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(3),n.Sc(" ",n.jc(4,2,"lang.hasNoEntity")," : "),n.Db(3),n.oc("ngForOf",t.resourcesInfo.withoutEntity)}}function qm(t,e){1&t&&(n.Wb(0,"div"),n.Wb(1,"div",20),n.Wb(2,"p"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Sc(" ",n.jc(4,1,"lang.destUserSetToDefault")," "))}function Km(t,e){if(1&t&&(n.Wb(0,"div",7),n.Oc(1,Um,2,0,"div",8),n.Wb(2,"div",9),n.Wb(3,"div",10),n.Qc(4),n.ic(5,"translate"),n.Oc(6,$m,2,1,"b",11),n.Oc(7,Hm,3,4,"b",11),n.Qc(8," ? "),n.Oc(9,Xm,7,4,"div",12),n.Oc(10,qm,5,3,"div",12),n.Vb(),n.Wb(11,"div",10),n.Rb(12,"app-note-editor",13,14),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.loading),n.Db(3),n.Sc(" ",n.jc(5,7,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",1==t.data.resIds.length),n.Db(1),n.oc("ngIf",t.data.resIds.length>1),n.Db(2),n.oc("ngIf",t.resourcesInfo.withoutEntity.length>0),n.Db(1),n.oc("ngIf",t.resourcesInfo.withEntity.length>0),n.Db(2),n.oc("resIds",t.data.resIds)}}let Ym=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.loading=!1,this.loadingInit=!1,this.resourcesInfo={withEntity:[],withoutEntity:[]}}ngOnInit(){this.loadingInit=!0,this.http.post("../rest/resourcesList/users/"+this.data.userId+"/groups/"+this.data.groupId+"/baskets/"+this.data.basketId+"/checkInitiatorEntity",{resources:this.data.resIds}).subscribe(t=>{this.resourcesInfo=t,this.loadingInit=!1},t=>{this.notify.error(t.error.errors),this.loadingInit=!1,this.dialogRef.close()})}onSubmit(){this.loading=!0,this.executeAction()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.resourcesInfo.withEntity,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(t=>{t&&null!=t.errors&&this.notify.error(t.errors),this.dialogRef.close(this.resourcesInfo.withEntity)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Xc(Bm,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:12,vars:10,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content","",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],[4,"ngIf"],[3,"resIds"],["noteEditor",""],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"],["role","alert",1,"alert-message","alert-message-danger","acknowledgementList"],[4,"ngFor","ngForOf"],["role","alert",1,"alert-message","alert-message-success"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Oc(3,Km,14,9,"div",2),n.Rb(4,"span",3),n.Wb(5,"div",4),n.Wb(6,"button",5),n.dc("click",(function(){return e.onSubmit()})),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Wb(9,"button",6),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(1),n.oc("ngIf",!e.loadingInit),n.Db(3),n.oc("disabled",e.loading||0==e.resourcesInfo.withEntity.length),n.Db(1),n.Rc(n.jc(8,6,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(11,8,"lang.cancel")))},directives:[q.i,P.t,q.c,k.b,q.d,q.f,Du,V.c,P.s],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:1;overflow:hidden}.acknowledgementList[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{font-size:12px;max-height:100px;overflow:auto;padding-left:25px;padding-right:5px;padding-bottom:10px;margin-top:10px}.acknowledgementList[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;text-decoration:underline}.acknowledgementList[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{font-size:120%}"]}),t})();const Jm=["noteEditor"];function Zm(t,e){1&t&&(n.Wb(0,"div",16),n.Rb(1,"mat-spinner",17),n.Vb())}function tg(t,e){if(1&t&&(n.Wb(0,"b",18),n.Qc(1),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Rc(t.data.resource.chrono)}}function eg(t,e){if(1&t&&(n.Wb(0,"b",18),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function ig(t,e){if(1&t&&(n.Wb(0,"li"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t," ")}}function ng(t,e){if(1&t&&(n.Wb(0,"div"),n.Wb(1,"div",19),n.Wb(2,"p"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"ul"),n.Oc(6,ig,2,1,"li",20),n.Vb(),n.Vb(),n.Wb(7,"div",21),n.Wb(8,"p"),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(3),n.Sc(" ",n.jc(4,3,"lang.hasNoAttachmentsNotes")," : "),n.Db(3),n.oc("ngForOf",t.resourcesInfo.noAttachmentsNotes),n.Db(3),n.Sc(" ",n.jc(10,5,"lang.closeMailAddNoteMandatory")," ")}}function ag(t,e){if(1&t&&(n.Wb(0,"div",7),n.Oc(1,Zm,2,0,"div",8),n.Wb(2,"div",9),n.Wb(3,"div",10),n.Qc(4),n.ic(5,"translate"),n.Oc(6,tg,2,1,"b",11),n.Oc(7,eg,3,4,"b",11),n.Qc(8," ? "),n.Rb(9,"div",12),n.ic(10,"translate"),n.Oc(11,ng,11,7,"div",13),n.Vb(),n.Wb(12,"div",10),n.Rb(13,"app-note-editor",14,15),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.loading),n.Db(3),n.Sc(" ",n.jc(5,7,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",1==t.data.resIds.length),n.Db(1),n.oc("ngIf",t.data.resIds.length>1),n.Db(2),n.oc("innerHTML",n.jc(10,9,"lang.updateClosingDate"),n.Ec),n.Db(2),n.oc("ngIf",t.resourcesInfo.noAttachmentsNotes.length>0),n.Db(2),n.oc("resIds",t.data.resIds)}}let sg=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.loading=!1,this.loadingInit=!1,this.resourcesInfo={withEntity:[],withoutEntity:[]}}ngOnInit(){this.loadingInit=!0,this.http.post("../rest/resourcesList/users/"+this.data.userId+"/groups/"+this.data.groupId+"/baskets/"+this.data.basketId+"/checkAttachmentsAndNotes",{resources:this.data.resIds}).subscribe(t=>{this.resourcesInfo=t,this.loadingInit=!1},t=>{this.notify.error(t.error.errors),this.loadingInit=!1})}onSubmit(){this.loading=!0,this.executeAction()}checkNote(){return!(!this.noteEditor||!this.noteEditor.getNoteContent())}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.data.resIds,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(t=>{t&&null!=t.errors&&this.notify.error(t.errors),this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Xc(Jm,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:12,vars:10,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content","",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","30px",3,"innerHTML"],[4,"ngIf"],[3,"resIds"],["noteEditor",""],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"],["role","alert",1,"alert-message","alert-message-info","acknowledgementList"],[4,"ngFor","ngForOf"],["role","alert",1,"alert-message","alert-message-danger"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Oc(3,ag,15,11,"div",2),n.Rb(4,"span",3),n.Wb(5,"div",4),n.Wb(6,"button",5),n.dc("click",(function(){return e.onSubmit()})),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Wb(9,"button",6),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(1),n.oc("ngIf",!e.loadingInit),n.Db(3),n.oc("disabled",e.loading||void 0!==e.resourcesInfo.noAttachmentsNotes&&e.resourcesInfo.noAttachmentsNotes.length>0&&!e.checkNote()),n.Db(1),n.Rc(n.jc(8,6,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(11,8,"lang.cancel")))},directives:[q.i,P.t,q.c,k.b,q.d,q.f,Du,V.c,P.s],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:1;overflow:hidden}.acknowledgementList[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{font-size:12px;max-height:100px;overflow:auto;padding-left:25px;padding-right:5px;padding-bottom:10px;margin-top:10px}.acknowledgementList[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;text-decoration:underline}.acknowledgementList[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{font-size:120%}"]}),t})();var og=i("jaxi");let rg=(()=>{class t{constructor(t){this.latinisePipe=t}transform(t,e,i){if(void 0!==i){let n=e.toLocaleLowerCase();return n?t.filter(t=>-1!=this.latinisePipe.transform(t[i].toLocaleLowerCase()).indexOf(this.latinisePipe.transform(n))):t}console.log("Init filter failed for values : "),console.log(t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(Tt.c))},t.\u0275pipe=n.Pb({name:"filterList",type:t,pure:!0}),t})();function cg(t,e){1&t&&(n.Ub(0),n.Wb(1,"div",2),n.Rb(2,"mat-spinner"),n.Vb(),n.Tb())}function lg(t,e){1&t&&(n.Wb(0,"div",9),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noAttachment")," "))}function dg(t,e){if(1&t&&(n.Wb(0,"mat-button-toggle",11),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(3);n.oc("checked",i.currentFilter===t.id)("value",t.id),n.Db(1),n.Sc("",t.label," ")}}function hg(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-button-toggle-group",10),n.dc("change",(function(e){return n.Dc(t),n.hc(2).filterType(e)})),n.Wb(1,"mat-button-toggle",11),n.Qc(2,"Tous"),n.Vb(),n.Oc(3,dg,2,3,"mat-button-toggle",12),n.ic(4,"sortBy"),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.oc("checked",""===t.currentFilter)("value",""),n.Db(2),n.oc("ngForOf",n.kc(4,3,t.filterAttachTypes,"label"))}}function ug(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",34),n.dc("click",(function(e){n.Dc(t);const i=n.hc(2).$implicit,a=n.hc(2);return e.stopPropagation(),a.deleteAttachment(i)})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.deleteResource")))}function pg(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",31),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).showAttachment(e)})),n.Wb(1,"button",32),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc(2);return e.stopPropagation(),a.showAttachment(i)})),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Oc(4,ug,3,3,"button",33),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc(2);n.oc("@myAnimation",void 0),n.Db(2),n.Rc(n.jc(3,3,"lang.viewResource")),n.Db(2),n.oc("ngIf","reply_record_management"!==t.type&&"acknowledgement_record_management"!==t.type&&"SIGN"!==t.status&&"FRZ"!==t.status&&t.canDelete&&(e.canModify||null===e.canModify))}}function bg(t,e){if(1&t&&(n.Wb(0,"span",35),n.Qc(1),n.ic(2,"translate"),n.Wb(3,"b",36),n.Qc(4),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Sc("",n.jc(2,2,"lang.version")," "),n.Db(3),n.Rc(t.relation)}}function fg(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Rb(1,"mat-divider"),n.Wb(2,"button",37),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).openMaarchParapheurWorkflow(e)})),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Tb()}2&t&&(n.Db(3),n.Sc(" ",n.jc(4,1,"lang.externalVisaWorkflow")," "))}function mg(t,e){1&t&&(n.Rb(0,"i",38),n.ic(1,"translate")),2&t&&n.pc("title",n.jc(1,1,"lang.inSignatureBook"))}function gg(t,e){1&t&&(n.Rb(0,"i",39),n.ic(1,"translate")),2&t&&n.pc("title",n.jc(1,1,"lang.inShipping"))}function vg(t,e){if(1&t&&(n.Wb(0,"div",40),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Sc(" ",t.chrono,"\xa0 ")}}function _g(t,e){if(1&t&&(n.Wb(0,"div",40),n.Qc(1),n.ic(2,"shorten"),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Sc(" ",n.lc(2,1,t.title,40,"...")," ")}}function yg(t,e){if(1&t&&(n.Wb(0,"div",41),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Sc(" ",t.typeLabel," ")}}function xg(t,e){if(1&t&&(n.Ub(0),n.Qc(1),n.ic(2,"translate"),n.Wb(3,"b"),n.Qc(4),n.ic(5,"timeAgo"),n.Vb(),n.Qc(6),n.ic(7,"lowercase"),n.ic(8,"translate"),n.Wb(9,"b"),n.Qc(10),n.Vb(),n.Tb()),2&t){const t=n.hc(2).$implicit;n.Db(1),n.Sc(" ",n.jc(2,4,"lang.signedAlt")," "),n.Db(3),n.Rc(n.kc(5,6,t.signDate,"full")),n.Db(2),n.Sc(" ",n.jc(7,9,n.jc(8,11,"lang.by"))," "),n.Db(4),n.Rc(t.signatory)}}function Cg(t,e){if(1&t&&(n.Ub(0),n.Qc(1),n.ic(2,"translate"),n.Wb(3,"b"),n.Qc(4),n.ic(5,"timeAgo"),n.Vb(),n.Qc(6),n.ic(7,"lowercase"),n.ic(8,"translate"),n.Wb(9,"b"),n.Qc(10),n.Vb(),n.Tb()),2&t){const t=n.hc(3).$implicit;n.Db(1),n.Sc(" ",n.jc(2,4,"lang.modified")," "),n.Db(3),n.Rc(n.kc(5,6,t.modificationDate,"full")),n.Db(2),n.Sc(" ",n.jc(7,9,n.jc(8,11,"lang.by"))," "),n.Db(4),n.Rc(t.modifiedBy)}}function Og(t,e){if(1&t&&(n.Qc(0),n.ic(1,"translate"),n.Wb(2,"b"),n.Qc(3),n.ic(4,"timeAgo"),n.Vb(),n.Qc(5),n.ic(6,"lowercase"),n.ic(7,"translate"),n.Wb(8,"b"),n.Qc(9),n.Vb()),2&t){const t=n.hc(3).$implicit;n.Sc(" ",n.jc(1,4,"lang.created")," "),n.Db(3),n.Rc(n.kc(4,6,t.creationDate,"full")),n.Db(2),n.Sc(" ",n.jc(6,9,n.jc(7,11,"lang.by"))," "),n.Db(4),n.Rc(t.typistLabel)}}function Dg(t,e){if(1&t&&(n.Oc(0,Cg,11,13,"ng-container",0),n.Oc(1,Og,10,13,"ng-template",null,43,n.Pc)),2&t){const t=n.zc(2),e=n.hc(2).$implicit;n.oc("ngIf",null!==e.modificationDate)("ngIfElse",t)}}function wg(t,e){if(1&t&&(n.Wb(0,"div",41),n.Oc(1,xg,11,13,"ng-container",0),n.Oc(2,Dg,3,2,"ng-template",null,42,n.Pc),n.Vb()),2&t){const t=n.zc(3),e=n.hc().$implicit;n.Db(1),n.oc("ngIf",void 0!==e.signDate)("ngIfElse",t)}}function Mg(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",13),n.dc("mouseover",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.toggleInfo(a,!0)})),n.ic(1,"async"),n.ic(2,"secureUrl"),n.Oc(3,pg,5,5,"div",14),n.Wb(4,"div",15),n.Oc(5,bg,5,4,"span",16),n.Wb(6,"button",17),n.Rb(7,"mat-icon",18),n.Vb(),n.Wb(8,"mat-menu",null,19),n.Wb(10,"button",20),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).setInSignatureBook(i)})),n.Wb(11,"mat-checkbox",21),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.inSignatureBook=i})),n.Vb(),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Wb(14,"button",20),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).setInSendAttachment(i)})),n.Wb(15,"mat-checkbox",22),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.inSendAttach=i})),n.Vb(),n.Qc(16),n.ic(17,"translate"),n.Vb(),n.Oc(18,fg,5,3,"ng-container",23),n.Vb(),n.Vb(),n.Wb(19,"div",24),n.Wb(20,"div",25),n.Oc(21,mg,2,3,"i",26),n.Qc(22,"\xa0 "),n.Oc(23,gg,2,3,"i",27),n.Vb(),n.Oc(24,vg,2,1,"div",28),n.Oc(25,_g,3,5,"div",28),n.Oc(26,yg,2,1,"div",29),n.Oc(27,wg,4,2,"div",29),n.Wb(28,"div",30),n.Qc(29),n.ic(30,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.zc(9),a=n.hc(2);n.Lc("background-image","url("+n.jc(1,22,n.jc(2,24,t.thumbnailUrl))+")"),n.Ib("signed","SIGN"===t.status),n.Db(3),n.oc("ngIf",t.hideMainInfo),n.Db(2),n.oc("ngIf",t.relation>1),n.Db(1),n.oc("matMenuTriggerFor",i),n.Db(4),n.oc("disabled","FRZ"===t.status),n.Db(1),n.oc("ngModel",t.inSignatureBook),n.Db(1),n.Sc(" ",n.jc(13,26,"lang.putInSignatureBook")," "),n.Db(2),n.oc("disabled",!a.mailevaEnabled),n.Db(1),n.oc("ngModel",t.inSendAttach)("disabled",!a.mailevaEnabled),n.Db(1),n.Sc(" ",n.jc(17,28,"lang.putInSendAttach")," "),n.Db(2),n.oc("ngIf",a.maarchParapheurEnabled&&"FRZ"===t.status),n.Db(3),n.oc("ngIf",t.inSignatureBook),n.Db(2),n.oc("ngIf",t.inSendAttach),n.Db(1),n.oc("ngIf",!t.hideMainInfo),n.Db(1),n.oc("ngIf",t.hideMainInfo),n.Db(1),n.oc("ngIf",!t.hideMainInfo),n.Db(1),n.oc("ngIf",t.hideMainInfo),n.Db(2),n.Sc(" ",n.jc(30,30,"lang.attachment_"+t.status)," ")}}function kg(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",3),n.dc("mouseover",(function(){return n.Dc(t),n.hc().resetToggleInfo()})),n.Oc(1,lg,3,3,"div",4),n.Oc(2,hg,5,6,"mat-button-toggle-group",5),n.Oc(3,Mg,31,32,"mat-card",6),n.ic(4,"filterList"),n.Vb(),n.Wb(5,"button",7),n.dc("click",(function(){return n.Dc(t),n.hc().createAttachment()})),n.ic(6,"translate"),n.Rb(7,"mat-icon",8),n.Vb()}if(2&t){const t=n.hc();n.Db(1),n.oc("ngIf",0==t.attachments.length),n.Db(1),n.oc("ngIf",t.attachments.length>0),n.Db(1),n.oc("ngForOf",n.lc(4,8,t.attachments,t.currentFilter,"type")),n.Db(2),n.Ib("addPjPanel","panel"===t.target)("addPjProcess","process"===t.target),n.oc("title",n.jc(6,12,"lang.addAttachment"))}}let Sg=(()=>{class t{constructor(t,e,i,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.dialog=a,this.appService=s,this.headerService=o,this.privilegeService=r,this.loading=!0,this.pos=0,this.mailevaEnabled=!1,this.maarchParapheurEnabled=!1,this.hideMainInfo=!1,this.filterAttachTypes=[],this.currentFilter="",this.resId=null,this.target="panel",this.autoOpenCreation=!1,this.canModify=null,this.reloadBadgeAttachments=new n.o,this.afterActionAttachment=new n.o}ngOnInit(){this.autoOpenCreation&&this.createAttachment(),this.checkMaarchParapheurEnabled(),null!==this.resId&&this.http.get(`../rest/resources/${this.resId}/attachments`).pipe(Object(mt.a)(t=>{this.mailevaEnabled=t.mailevaEnabled,this.attachments=t.attachments,this.attachments.forEach(t=>{0===this.filterAttachTypes.filter(e=>e.id===t.type).length&&this.filterAttachTypes.push({id:t.type,label:t.typeLabel}),t.thumbnailUrl="../rest/attachments/"+t.resId+"/thumbnail",t.canDelete=this.privilegeService.hasCurrentUserPrivilege("manage_attachments")||this.headerService.user.id===t.typist})}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}checkMaarchParapheurEnabled(){this.http.get("../rest/externalSignatureBooks/enabled").subscribe(t=>{"maarchParapheur"===t.enabledSignatureBook&&(this.maarchParapheurEnabled=!0)},t=>{this.notify.error(t.error.errors)})}loadAttachments(t){let e=+new Date;this.resId=t,this.loading=!0,this.filterAttachTypes=[],this.http.get("../rest/resources/"+this.resId+"/attachments").subscribe(t=>{this.mailevaEnabled=t.mailevaEnabled,this.attachments=t.attachments,this.attachments.forEach(t=>{0===this.filterAttachTypes.filter(e=>e.id===t.type).length&&this.filterAttachTypes.push({id:t.type,label:t.typeLabel}),t.thumbnailUrl="../rest/attachments/"+t.resId+"/thumbnail?tsp="+e,t.canDelete=this.privilegeService.hasCurrentUserPrivilege("manage_attachments")||this.headerService.user.id===t.typist}),0===this.attachments.filter(t=>t.type===this.currentFilter).length&&(this.currentFilter=""),this.reloadBadgeAttachments.emit(""+this.attachments.length),this.loading=!1},t=>{this.notify.error(t.error.errors)})}setInSignatureBook(t){this.http.put("../rest/attachments/"+t.resId+"/inSignatureBook",{}).subscribe(()=>{t.inSignatureBook=!t.inSignatureBook,this.afterActionAttachment.emit("setInSignatureBook"),this.notify.success(this.translate.instant("lang.actionDone"))},t=>{this.notify.error(t.error.errors)})}setInSendAttachment(t){this.http.put("../rest/attachments/"+t.resId+"/inSendAttachment",{}).subscribe(()=>{t.inSendAttach=!t.inSendAttach,this.afterActionAttachment.emit("setInSendAttachment"),this.notify.success(this.translate.instant("lang.actionDone"))},t=>{this.notify.error(t.error.errors)})}toggleInfo(t,e){this.attachments.forEach(t=>{t.hideMainInfo=!1}),t.hideMainInfo=e}resetToggleInfo(){this.attachments.forEach(t=>{t.hideMainInfo=!1})}showAttachment(t){this.dialogRef=this.dialog.open(pu,{height:"99vh",width:this.appService.getViewMode()?"99vw":"90vw",maxWidth:this.appService.getViewMode()?"99vw":"90vw",panelClass:"attachment-modal-container",disableClose:!0,data:{resId:t.resId,editMode:this.canModify}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"success"===t),Object(mt.a)(()=>{this.loadAttachments(this.resId)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}createAttachment(){this.dialogRef=this.dialog.open(Ph,{disableClose:!0,panelClass:"attachment-modal-container",height:"90vh",width:this.appService.getViewMode()?"99vw":"90vw",maxWidth:this.appService.getViewMode()?"99vw":"90vw",data:{resIdMaster:this.resId}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"success"===t),Object(mt.a)(()=>{this.loadAttachments(this.resId),this.afterActionAttachment.emit("setInSendAttachment")}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}deleteAttachment(t){this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete("../rest/attachments/"+t.resId)),Object(mt.a)(()=>{this.loadAttachments(this.resId),this.afterActionAttachment.emit("setInSendAttachment"),this.notify.success(this.translate.instant("lang.attachmentDeleted"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}filterType(t){this.currentFilter=t.value}openMaarchParapheurWorkflow(t){this.dialog.open(Jo,{panelClass:"maarch-modal",data:{id:t.resId,type:"attachment"}})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(w.a),n.Qb(y.a),n.Qb(Dt.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-attachments-list"]],inputs:{injectDatas:"injectDatas",resId:"resId",target:"target",autoOpenCreation:"autoOpenCreation",canModify:"canModify"},outputs:{reloadBadgeAttachments:"reloadBadgeAttachments",afterActionAttachment:"afterActionAttachment"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["elseLoading",""],[1,"loading"],[3,"mouseover"],["style","text-align:center;font-size:24px;font-weight:bold;opacity:0.3;",4,"ngIf"],["class","filterTypes",3,"change",4,"ngIf"],["style","padding:0;margin: 30px;min-height: 300px;background-size: cover;overflow: hidden;",3,"signed","background-image","mouseover",4,"ngFor","ngForOf"],["mat-fab","","color","primary",1,"addPj",3,"title","click"],[1,"fa","fa-plus"],[2,"text-align","center","font-size","24px","font-weight","bold","opacity","0.3"],[1,"filterTypes",3,"change"],[3,"checked","value"],[3,"checked","value",4,"ngFor","ngForOf"],[2,"padding","0","margin","30px","min-height","300px","background-size","cover","overflow","hidden",3,"mouseover"],["class","layout",3,"click",4,"ngIf"],[1,"pjToolsContent"],["color","primary","class","versionButton",4,"ngIf"],["color","primary","mat-icon-button","",1,"actionsButton",3,"matMenuTriggerFor"],["fontSet","fas","fontIcon","fa-ellipsis-v"],["menuPjAction","matMenu"],["mat-menu-item","",3,"disabled","click"],["color","primary",3,"ngModel","ngModelChange"],["color","primary",3,"ngModel","disabled","ngModelChange"],[4,"ngIf"],[1,"infosPj"],[1,"stateInfo"],["class","fas fa-file-signature",3,"title",4,"ngIf"],["class","fa fa-shipping-fast",3,"title",4,"ngIf"],["class","mainInfos",4,"ngIf"],["class","subInfos",4,"ngIf"],[1,"statusInfo"],[1,"layout",3,"click"],["mat-raised-button","","color","primary",3,"click"],["mat-raised-button","","color","warn",3,"click",4,"ngIf"],["mat-raised-button","","color","warn",3,"click"],["color","primary",1,"versionButton"],["color","secondary"],["mat-menu-item","",3,"click"],[1,"fas","fa-file-signature",3,"title"],[1,"fa","fa-shipping-fast",3,"title"],[1,"mainInfos"],[1,"subInfos"],["elseTemplate",""],["creationTemplate",""]],template:function(t,e){if(1&t&&(n.Oc(0,cg,3,0,"ng-container",0),n.Oc(1,kg,8,14,"ng-template",null,1,n.Pc)),2&t){const t=n.zc(2);n.oc("ngIf",e.loading)("ngIfElse",t)}},directives:[P.t,V.c,P.s,k.b,S.a,og.b,og.a,K.a,ne.d,ne.e,ne.b,j.a,X.u,X.x,T.a],pipes:[rg,g.d,Wt.a,P.b,si,Tt.p,ps,P.p],styles:[".mat-card[_ngcontent-%COMP%]{border:1px solid #e0e0e0;box-shadow:0 0 8px 0 rgba(0,0,0,.75)}.layout[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;background:rgba(0,0,0,.2);display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer}.layout[_ngcontent-%COMP%] .mat-raised-button[_ngcontent-%COMP%]{width:200px}.infosPj[_ngcontent-%COMP%]{background:#f9f9f9;border-top:1px solid rgba(0,0,0,.12);position:absolute;width:100%;bottom:0;padding:5px;display:flex;flex-direction:column;align-items:center}.infosPj[_ngcontent-%COMP%] .mat-expansion-panel-body{padding:0}.infosPj[_ngcontent-%COMP%] .mat-form-field-label{color:#135f7f}.mainInfos[_ngcontent-%COMP%]{display:block;font-size:16px;color:#666}.subInfos[_ngcontent-%COMP%]{display:block;font-size:10px;color:#135f7f}.stateInfo[_ngcontent-%COMP%]{color:#135f7f;left:0;justify-content:left;padding-left:10px}.stateInfo[_ngcontent-%COMP%], .statusInfo[_ngcontent-%COMP%]{font-size:12px;position:absolute;height:100%;top:0;width:100px;display:flex;align-items:center;font-style:italic}.statusInfo[_ngcontent-%COMP%]{color:#666;opacity:.5;right:0;justify-content:center}.subInfosBottom[_ngcontent-%COMP%]{font-style:italic;font-size:12px;color:#666}.signed[_ngcontent-%COMP%]{border:1px solid green}.signed[_ngcontent-%COMP%] .infosPj[_ngcontent-%COMP%]{background:green}.signed[_ngcontent-%COMP%] .mainInfos[_ngcontent-%COMP%], .signed[_ngcontent-%COMP%] .stateInfo[_ngcontent-%COMP%], .signed[_ngcontent-%COMP%] .statusInfo[_ngcontent-%COMP%], .signed[_ngcontent-%COMP%] .subInfos[_ngcontent-%COMP%], .signed[_ngcontent-%COMP%] .subInfosBottom[_ngcontent-%COMP%]{color:#fff}.mat-icon[_ngcontent-%COMP%]{height:auto}.pjToolsContent[_ngcontent-%COMP%]{position:absolute;right:0;border-bottom:1px solid #e0e0e0;border-left:1px solid #e0e0e0;border-bottom-left-radius:5px;background:#fff}.pjToolsContent[_ngcontent-%COMP%] .actionsButton[_ngcontent-%COMP%], .pjToolsContent[_ngcontent-%COMP%] .downloadButton[_ngcontent-%COMP%], .pjToolsContent[_ngcontent-%COMP%] .versionButton[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;font-size:10px}.pjToolsContent[_ngcontent-%COMP%] .downloadButton[_ngcontent-%COMP%]:active, .pjToolsContent[_ngcontent-%COMP%] .downloadButton[_ngcontent-%COMP%]:focus, .pjToolsContent[_ngcontent-%COMP%] .downloadButton[_ngcontent-%COMP%]:hover{text-decoration:none}.pjToolsContent[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:0;top:-7px;font-size:10px}.loading[_ngcontent-%COMP%]{display:flex;justify-content:center;top:0;left:0;width:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:1;overflow:hidden}.filterTypes[_ngcontent-%COMP%]{overflow:auto;overflow-y:hidden;width:auto;max-width:100%;margin-left:10px}.filterTypes[_ngcontent-%COMP%] .mat-button-toggle-checked{background:#f99830;color:#fff;font-weight:700;height:25px;font-size:10px}.filterTypes[_ngcontent-%COMP%] .mat-button-toggle-checked .mat-button-toggle-label-content{line-height:0}.filterTypes[_ngcontent-%COMP%] .mat-button-toggle-checked .mat-button-toggle-button{height:100%}.filterTypes[_ngcontent-%COMP%] [_ngcontent-%COMP%]:not( .mat-button-toggle-checked) .mat-button-toggle-button{color:#135f7f;font-weight:700;height:25px;font-size:10px}.filterTypes[_ngcontent-%COMP%] [_ngcontent-%COMP%]:not( .mat-button-toggle-checked) .mat-button-toggle-button .mat-button-toggle-label-content{line-height:0}.addPjProcess[_ngcontent-%COMP%]{bottom:0}.addPjPanel[_ngcontent-%COMP%], .addPjProcess[_ngcontent-%COMP%]{position:-webkit-sticky;position:sticky;z-index:2;margin-left:10px}.addPjPanel[_ngcontent-%COMP%]{bottom:10px}"],data:{animation:[Object(dc.n)("myAnimation",[Object(dc.m)(":enter",[Object(dc.l)({transform:"translateY(-10%)",opacity:0}),Object(dc.e)("150ms",Object(dc.l)({transform:"translateY(0)",opacity:1}))]),Object(dc.m)(":leave",[Object(dc.l)({transform:"translateY(0)",opacity:1}),Object(dc.e)("150ms",Object(dc.l)({transform:"translateY(-10%)",opacity:0}))])])]}}),t})();const Ig=["noteEditor"],Pg=["appVisaWorkflow"];function Vg(t,e){1&t&&(n.Wb(0,"div",19),n.Rb(1,"mat-spinner",20),n.Vb())}function Rg(t,e){1&t&&(n.Wb(0,"b",21),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function jg(t,e){if(1&t&&(n.Wb(0,"b",21),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function Ag(t,e){if(1&t&&(n.Wb(0,"b",21),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function Wg(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-checkbox",24),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).toggleIntegration(i.key)})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.oc("checked",i.data.resource.integrations[t.key]),n.Db(1),n.Sc(" ",n.jc(2,2,"lang."+t.key+"_doc"),"")}}function Tg(t,e){if(1&t&&(n.Wb(0,"div",22),n.Oc(1,Wg,3,4,"mat-checkbox",23),n.ic(2,"keyvalue"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",n.jc(2,1,t.integrationsInfo))}}const Eg=function(t){return{min:t}};function Fg(t,e){if(1&t&&(n.Wb(0,"p"),n.Qc(1),n.ic(2,"translate"),n.ic(3,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Tc(" ",n.jc(2,2,"lang.notEnoughVisaUser")," (",n.kc(3,4,"lang.requiredVisaUser",n.vc(7,Eg,t.minimumVisaRole)),") ")}}const Lg=function(t){return{max:t}};function Qg(t,e){if(1&t&&(n.Wb(0,"p"),n.Qc(1),n.ic(2,"translate"),n.ic(3,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Tc(" ",n.jc(2,2,"lang.tooManySignUser")," (",n.kc(3,4,"lang.authorizedSignUser",n.vc(7,Lg,t.maximumSignRole)),") ")}}function Ng(t,e){1&t&&(n.Wb(0,"p"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.signUserRequired")))}function zg(t,e){if(1&t&&(n.Wb(0,"div",25),n.Oc(1,Fg,4,9,"p",26),n.Oc(2,Qg,4,9,"p",26),n.Oc(3,Ng,3,3,"p",26),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",!t.visaNumberCorrect),n.Db(1),n.oc("ngIf",!t.signNumberCorrect),n.Db(1),n.oc("ngIf",!t.atLeastOneSign)}}function Bg(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function Ug(t,e){if(1&t&&(n.Wb(0,"div",27),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,Bg,5,4,"li",28),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Sc(" ",n.jc(3,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.resourcesError)}}function $g(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier)}}function Hg(t,e){if(1&t&&(n.Wb(0,"div",29),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,$g,3,1,"li",28),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Rc(n.jc(3,2,"lang.mailingActionInformations")),n.Db(3),n.oc("ngForOf",t.resourcesMailing)}}function Gg(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-visa-workflow",30,31),n.dc("workflowUpdated",(function(e){return n.Dc(t),n.hc().checkMinMaxVisaSign(e)})),n.Vb()}2&t&&n.oc("adminMode",!0)}function Xg(t,e){if(1&t&&(n.Wb(0,"div",32),n.Rb(1,"app-note-editor",33,34),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("resIds",t.data.resIds)}}function qg(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-attachments-list",35),n.dc("afterActionAttachment",(function(){return n.Dc(t),n.hc().checkSignatureBook()})),n.Vb()}if(2&t){const t=n.hc();n.oc("resId",t.data.resIds[0])}}const Kg=function(){return{width:"400px"}};let Yg=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.loading=!0,this.resourcesMailing=[],this.resourcesError=[],this.noResourceToProcess=null,this.integrationsInfo={inSignatureBook:{icon:"fas fa-file-signature"}},this.minimumVisaRole=0,this.maximumSignRole=0,this.visaNumberCorrect=!0,this.signNumberCorrect=!0,this.atLeastOneSign=!1}ngAfterViewInit(){return Object(r.a)(this,void 0,void 0,(function*(){0===this.data.resIds.length?(null===this.data.resource.encodedFile?(this.noResourceToProcess=!0,this.resourcesError=[{alt_identifier:this.translate.instant("lang.currentIndexingMail"),reason:"noDocumentToSend"}]):this.functions.empty(this.data.resource.destination)||(this.noResourceToProcess=!1,yield this.appVisaWorkflow.loadListModel(this.data.resource.destination),yield this.loadMinMaxVisaSignParameters()),this.loading=!1):this.data.resIds.length>0?(yield this.checkSignatureBook(),this.loading=!1):this.loading=!1,1===this.data.resIds.length&&(yield this.appVisaWorkflow.loadWorkflow(this.data.resIds[0]),this.appVisaWorkflow.emptyWorkflow()&&this.appVisaWorkflow.loadDefaultWorkflow(this.data.resIds[0])),this.checkMinMaxVisaSign(this.appVisaWorkflow.visaWorkflow.items)}))}onSubmit(){return Object(r.a)(this,void 0,void 0,(function*(){if(this.loading=!0,0===this.data.resIds.length){let t=yield this.indexDocument();t&&(t=yield this.appVisaWorkflow.saveVisaWorkflow(this.data.resIds)),t&&this.executeIndexingAction(this.data.resIds[0])}else{const t=this.data.resIds.filter(t=>-1===this.resourcesError.map(t=>t.res_id).indexOf(t));(yield this.appVisaWorkflow.saveVisaWorkflow(t))&&this.executeAction(t)}this.loading=!1}))}checkSignatureBook(){return this.resourcesError=[],new Promise(t=>{this.http.post("../rest/resourcesList/users/"+this.data.userId+"/groups/"+this.data.groupId+"/baskets/"+this.data.basketId+"/actions/"+this.data.action.id+"/checkSignatureBook",{resources:this.data.resIds}).subscribe(e=>{this.functions.empty(e.resourcesInformations.error)||(this.resourcesError=e.resourcesInformations.error),this.noResourceToProcess=this.data.resIds.length===this.resourcesError.length,e.resourcesInformations.success&&(this.resourcesMailing=e.resourcesInformations.success.filter(t=>t.mailing)),this.minimumVisaRole=e.minimumVisaRole,this.maximumSignRole=e.maximumSignRole,t(!0)},t=>{this.notify.handleSoftErrors(t),this.dialogRef.close()})})}toggleIntegration(t){this.http.put("../rest/resourcesList/integrations",{resources:this.data.resIds,integrations:{[t]:!this.data.resource.integrations[t]}}).pipe(Object(mt.a)(()=>{this.data.resource.integrations[t]=!this.data.resource.integrations[t],this.checkSignatureBook()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}indexDocument(){return this.data.resource.integrations={inSignatureBook:!0},new Promise(t=>{this.http.post("../rest/resources",this.data.resource).pipe(Object(mt.a)(e=>{this.data.resIds=[e.resId],t(!0)}),Object(m.a)(e=>(this.notify.handleErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}executeAction(t){this.http.put(this.data.processActionRoute,{resources:t,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(e=>{e||this.dialogRef.close(t),e&&null!=e.errors&&this.notify.error(e.errors)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}executeIndexingAction(t){this.http.put(this.data.indexActionRoute,{resource:t,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(t=>{t||this.dialogRef.close(this.data.resIds),t&&null!=t.errors&&this.notify.error(t.errors)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isValidAction(){return!this.noResourceToProcess&&void 0!==this.appVisaWorkflow&&!this.appVisaWorkflow.emptyWorkflow()&&!this.appVisaWorkflow.workflowEnd()&&this.signNumberCorrect&&this.visaNumberCorrect}checkMinMaxVisaSign(t){let e=0,i=0;t.forEach(t=>{t.requested_signature?i++:e++}),this.atLeastOneSign=i>=1,0===this.maximumSignRole&&0===this.minimumVisaRole||(this.visaNumberCorrect=0===this.minimumVisaRole||e>=this.minimumVisaRole,this.signNumberCorrect=0===this.maximumSignRole||i<=this.maximumSignRole)}loadMinMaxVisaSignParameters(){return Object(r.a)(this,void 0,void 0,(function*(){return new Promise(t=>{this.http.get("../rest/parameters/minimumVisaRole").pipe(Object(mt.a)(t=>{this.minimumVisaRole=t.parameter.param_value_int}),p(()=>this.http.get("../rest/parameters/maximumSignRole")),Object(mt.a)(e=>{this.maximumSignRole=e.parameter.param_value_int,t(!0)}),Object(m.a)(e=>(this.notify.handleErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Xc(Ig,!0),n.Xc(Pg,!0)),2&t&&(n.yc(i=n.ec())&&(e.noteEditor=i.first),n.yc(i=n.ec())&&(e.appVisaWorkflow=i.first))},decls:30,vars:26,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],["autosize","",2,"height","100%"],[2,"background","white","padding","10px"],["color","primary","class","highlight",4,"ngIf"],["style","padding:10px;display: flex;flex-direction: column;",4,"ngIf"],["class","alert-message alert-message-danger","role","alert",4,"ngIf"],["class","alert-message alert-message-danger mailList","role","alert",4,"ngIf"],["class","alert-message alert-message-info","role","alert",4,"ngIf"],[3,"adminMode","workflowUpdated",4,"ngIf"],["style","padding-top: 10px;",4,"ngIf"],["position","end","mode","side","autoFocus","false",2,"overflow-x","hidden",3,"opened","ngStyle"],[3,"resId","afterActionAttachment",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"],[2,"padding","10px","display","flex","flex-direction","column"],["color","primary",3,"checked","click",4,"ngFor","ngForOf"],["color","primary",3,"checked","click"],["role","alert",1,"alert-message","alert-message-danger"],[4,"ngIf"],["role","alert",1,"alert-message","alert-message-danger","mailList"],[4,"ngFor","ngForOf"],["role","alert",1,"alert-message","alert-message-info"],[3,"adminMode","workflowUpdated"],["appVisaWorkflow",""],[2,"padding-top","10px"],[3,"resIds"],["noteEditor",""],[3,"resId","afterActionAttachment"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,Vg,2,0,"div",3),n.Wb(5,"mat-sidenav-container",4),n.Wb(6,"mat-sidenav-content",5),n.Wb(7,"div"),n.Qc(8),n.ic(9,"translate"),n.Oc(10,Rg,3,3,"b",6),n.Oc(11,jg,2,1,"b",6),n.Oc(12,Ag,3,4,"b",6),n.Qc(13," ? "),n.Vb(),n.Oc(14,Tg,3,3,"div",7),n.Oc(15,zg,4,3,"div",8),n.Oc(16,Ug,6,4,"div",9),n.Oc(17,Hg,6,4,"div",10),n.Oc(18,Gg,2,1,"app-visa-workflow",11),n.Oc(19,Xg,3,1,"div",12),n.Vb(),n.Wb(20,"mat-sidenav",13),n.Oc(21,qg,1,1,"app-attachments-list",14),n.Vb(),n.Vb(),n.Vb(),n.Rb(22,"span",15),n.Wb(23,"div",16),n.Wb(24,"button",17),n.dc("click",(function(){return e.onSubmit()})),n.Qc(25),n.ic(26,"translate"),n.Vb(),n.Wb(27,"button",18),n.Qc(28),n.ic(29,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(4),n.Sc(" ",n.jc(9,19,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(2),n.oc("ngIf",e.data.resIds.length>0),n.Db(1),n.oc("ngIf",!e.visaNumberCorrect||!e.signNumberCorrect||!e.atLeastOneSign),n.Db(1),n.oc("ngIf",e.resourcesError.length>0),n.Db(1),n.oc("ngIf",e.resourcesMailing.length>0&&""!=e.appVisaWorkflow.getFirstVisaUser()&&e.appVisaWorkflow.visaWorkflow.items[0].requested_signature),n.Db(1),n.oc("ngIf",!e.noResourceToProcess),n.Db(1),n.oc("ngIf",!e.noResourceToProcess),n.Db(1),n.oc("opened",1===e.data.resIds.length&&e.noResourceToProcess)("ngStyle",n.uc(25,Kg)),n.Db(1),n.oc("ngIf",1===e.data.resIds.length&&e.noResourceToProcess),n.Db(3),n.oc("disabled",e.loading||!e.isValidAction()),n.Db(1),n.Rc(n.jc(26,21,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(29,23,"lang.cancel")))},directives:[q.i,q.f,P.t,I.e,I.f,I.d,P.w,q.c,k.b,q.d,V.c,P.s,j.a,Ko,Du,Sg],pipes:[g.d,P.l],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:2;overflow:hidden}.mailList[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{font-size:12px;max-height:100px;overflow:auto;padding-left:25px;padding-right:5px;padding-bottom:10px;margin-top:10px}.mailList[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;text-decoration:underline}.mailList[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{font-size:120%}.formType[_ngcontent-%COMP%]{align-items:center;display:flex;margin:10px;border-radius:4px;border:1px solid #ccc;position:relative;padding:10px}.formType-title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:-7px;left:10px;padding:0;margin:0;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-form-field-suffix{color:#f99830;font-size:15px;top:0}.formType[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.priceContent[_ngcontent-%COMP%]{align-items:center;width:100%}.priceContent[_ngcontent-%COMP%], .priceContent-label[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.priceContent-label[_ngcontent-%COMP%]{text-align:right;color:#135f7f;flex:1;padding-right:10px}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:90px!important}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.priceInfo[_ngcontent-%COMP%]{padding-right:20px;font-size:10px;opacity:.5;width:100%}.pjList[_ngcontent-%COMP%]{display:flex;width:100%;overflow:auto;flex-direction:column;background:#666}.pjList[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin:10px}.checked[_ngcontent-%COMP%]{opacity:1;color:#f99830}.unchecked[_ngcontent-%COMP%]{opacity:.5}"]}),t})();const Jg=["noteEditor"],Zg=["appVisaWorkflow"];function tv(t,e){1&t&&(n.Wb(0,"div",19),n.Rb(1,"mat-spinner",20),n.Vb())}function ev(t,e){1&t&&(n.Wb(0,"b",21),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function iv(t,e){if(1&t&&(n.Wb(0,"b",21),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function nv(t,e){if(1&t&&(n.Wb(0,"b",21),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function av(t,e){if(1&t&&(n.Rb(0,"div",22),n.ic(1,"translate")),2&t){const t=n.hc();n.oc("innerHTML",n.jc(1,1,"lang.sendToDocTo")+" <b>"+t.appVisaWorkflow.getNextVisaUser().labelToDisplay+"</b>",n.Ec)}}function sv(t,e){1&t&&(n.Rb(0,"div",22),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.endWorkflow"),n.Ec)}function ov(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function rv(t,e){if(1&t&&(n.Wb(0,"div",23),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,ov,5,4,"li",24),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Sc(" ",n.jc(3,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.resourcesErrors)}}function cv(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function lv(t,e){if(1&t&&(n.Wb(0,"div",25),n.Wb(1,"ul",26),n.Oc(2,cv,5,4,"li",24),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.oc("ngForOf",t.resourcesWarnings)}}function dv(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier)}}function hv(t,e){if(1&t&&(n.Wb(0,"div",27),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,dv,3,1,"li",24),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Rc(n.jc(3,2,"lang.mailingActionInformations")),n.Db(3),n.oc("ngForOf",t.resourcesMailing)}}function uv(t,e){if(1&t&&n.Rb(0,"app-visa-workflow",28,29),2&t){const t=n.hc();n.oc("adminMode",!1)("resId",t.data.resIds[0])}}let pv=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.loading=!1,this.resourcesMailing=[],this.resourcesWarnings=[],this.resourcesErrors=[],this.noResourceToProcess=null}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.loading=!0,yield this.checkSignatureBook(),this.loading=!1}))}checkSignatureBook(){return this.resourcesErrors=[],this.resourcesWarnings=[],new Promise((t,e)=>{this.http.post("../rest/resourcesList/users/"+this.data.userId+"/groups/"+this.data.groupId+"/baskets/"+this.data.basketId+"/actions/"+this.data.action.id+"/checkContinueVisaCircuit",{resources:this.data.resIds}).subscribe(e=>{this.functions.empty(e.resourcesInformations.warning)||(this.resourcesWarnings=e.resourcesInformations.warning),this.functions.empty(e.resourcesInformations.error)||(this.resourcesErrors=e.resourcesInformations.error,this.noResourceToProcess=this.resourcesErrors.length===this.data.resIds.length),e.resourcesInformations.success&&e.resourcesInformations.success.forEach(t=>{t.mailing&&this.resourcesMailing.push(t)}),t(!0)},t=>{this.notify.handleSoftErrors(t),this.dialogRef.close()})})}onSubmit(){return Object(r.a)(this,void 0,void 0,(function*(){const t=this.data.resIds.filter(t=>-1===this.resourcesErrors.map(t=>t.res_id).indexOf(t));this.executeAction(t)}))}executeAction(t){this.http.put(this.data.processActionRoute,{resources:t,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(e=>{e||this.dialogRef.close(t),e&&null!=e.errors&&this.notify.error(e.errors)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isValidAction(){return!this.noResourceToProcess}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(Jg,!0),n.Xc(Zg,!0)),2&t&&(n.yc(i=n.ec())&&(e.noteEditor=i.first),n.yc(i=n.ec())&&(e.appVisaWorkflow=i.first))},decls:31,vars:23,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],["autosize","",2,"height","100%"],[2,"background","white","padding","10px"],["color","primary","class","highlight",4,"ngIf"],["class","alert-message alert-message-info","role","alert","style","margin-top: 30px;",3,"innerHTML",4,"ngIf"],["class","alert-message alert-message-danger mailList","role","alert",4,"ngIf"],["class","alert-message alert-message-info mailList","role","alert",4,"ngIf"],["class","alert-message alert-message-info","role","alert",4,"ngIf"],[3,"adminMode","resId",4,"ngIf"],[2,"padding-top","10px"],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","30px",3,"innerHTML"],["role","alert",1,"alert-message","alert-message-danger","mailList"],[4,"ngFor","ngForOf"],["role","alert",1,"alert-message","alert-message-info","mailList"],[2,"margin","0","padding-bottom","0px"],["role","alert",1,"alert-message","alert-message-info"],[3,"adminMode","resId"],["appVisaWorkflow",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,tv,2,0,"div",3),n.Wb(5,"mat-sidenav-container",4),n.Wb(6,"mat-sidenav-content",5),n.Wb(7,"div"),n.Qc(8),n.ic(9,"translate"),n.Oc(10,ev,3,3,"b",6),n.Oc(11,iv,2,1,"b",6),n.Oc(12,nv,3,4,"b",6),n.Qc(13," ? "),n.Vb(),n.Oc(14,av,2,3,"div",7),n.Oc(15,sv,2,3,"div",7),n.Oc(16,rv,6,4,"div",8),n.Oc(17,lv,3,1,"div",9),n.Oc(18,hv,6,4,"div",10),n.Oc(19,uv,2,2,"app-visa-workflow",11),n.Wb(20,"div",12),n.Rb(21,"app-note-editor",13,14),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Rb(23,"span",15),n.Wb(24,"div",16),n.Wb(25,"button",17),n.dc("click",(function(){return e.onSubmit()})),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Wb(28,"button",18),n.Qc(29),n.ic(30,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(4),n.Sc(" ",n.jc(9,17,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(2),n.oc("ngIf",1==e.data.resIds.length&&void 0!==e.appVisaWorkflow&&""!==e.appVisaWorkflow.getNextVisaUser()),n.Db(1),n.oc("ngIf",1==e.data.resIds.length&&void 0!==e.appVisaWorkflow&&""===e.appVisaWorkflow.getNextVisaUser()&&!e.noResourceToProcess),n.Db(1),n.oc("ngIf",e.resourcesErrors.length>0),n.Db(1),n.oc("ngIf",e.resourcesWarnings.length>0),n.Db(1),n.oc("ngIf",e.resourcesMailing.length>0&&void 0!==e.appVisaWorkflow&&""!==e.appVisaWorkflow.getNextVisaUser()&&e.appVisaWorkflow.getNextVisaUser().requested_signature),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(2),n.oc("resIds",e.data.resIds),n.Db(4),n.oc("disabled",e.loading||!e.isValidAction()),n.Db(1),n.Rc(n.jc(27,19,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(30,21,"lang.cancel")))},directives:[q.i,q.f,P.t,I.e,I.f,Du,q.c,k.b,q.d,V.c,P.s,Ko],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:2;overflow:hidden}.mailList[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{font-size:12px;max-height:100px;overflow:auto;padding-left:25px;padding-right:5px;padding-bottom:10px;margin-top:10px}.mailList[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;text-decoration:underline}.mailList[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{font-size:120%}.formType[_ngcontent-%COMP%]{align-items:center;display:flex;margin:10px;border-radius:4px;border:1px solid #ccc;position:relative;padding:10px}.formType-title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:-7px;left:10px;padding:0;margin:0;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-form-field-suffix{color:#f99830;font-size:15px;top:0}.formType[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.priceContent[_ngcontent-%COMP%]{align-items:center;width:100%}.priceContent[_ngcontent-%COMP%], .priceContent-label[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.priceContent-label[_ngcontent-%COMP%]{text-align:right;color:#135f7f;flex:1;padding-right:10px}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:90px!important}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.priceInfo[_ngcontent-%COMP%]{padding-right:20px;font-size:10px;opacity:.5;width:100%}.pjList[_ngcontent-%COMP%]{display:flex;width:100%;overflow:auto;flex-direction:column;background:#666}.pjList[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin:10px}"]}),t})(),bv=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.data=i,this.dialogRef=n,this.notify=a,this.loading=!1,this.template={id:0,type:"opinionCircuit",title:"",items:[]}}ngOnInit(){this.template.items=this.data.avisWorkflow.map(t=>({id:t.item_id,type:"user",mode:"avis"}))}onSubmit(){this.http.post("../rest/listTemplates",this.template).pipe(Object(mt.a)(t=>{this.template.id=t.id,this.notify.success(this.translate.instant("lang.modelSaved")),this.dialogRef.close(this.template)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.a),n.Qb(q.h),n.Qb(D.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:14,vars:9,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],[1,"modal-container"],["appearance","outline"],["type","text","matInput","","placeholder","Nom du mod\xe8le",3,"ngModel","ngModelChange"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2,"Ajouter un mod\xe8le"),n.Vb(),n.Wb(3,"mat-dialog-content",2),n.Wb(4,"mat-form-field",3),n.Wb(5,"input",4),n.dc("ngModelChange",(function(t){return e.template.title=t})),n.Vb(),n.Vb(),n.Vb(),n.Rb(6,"span",5),n.Wb(7,"div",6),n.Wb(8,"button",7),n.dc("click",(function(){return e.onSubmit()})),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Wb(11,"button",8),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.oc("ngModel",e.template.title),n.Db(3),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(10,5,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(13,7,"lang.cancel")))},directives:[q.i,q.f,Y.c,J.b,X.d,X.u,X.x,q.c,k.b,q.d],pipes:[g.d],styles:[""]}),t})();const fv=["searchAvisUserInput"];function mv(t,e){1&t&&(n.Wb(0,"mat-option",15),n.Wb(1,"div",16),n.Rb(2,"mat-spinner",17),n.Vb(),n.Vb())}function gv(t,e){if(1&t&&(n.Wb(0,"mat-option",20),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t.label," ")}}function vv(t,e){if(1&t&&(n.Wb(0,"mat-optgroup",18),n.ic(1,"translate"),n.Oc(2,gv,2,2,"mat-option",19),n.ic(3,"sortBy"),n.ic(4,"async"),n.Vb()),2&t){const t=n.hc(3);n.oc("label",n.jc(1,2,"lang.publicModel")),n.Db(2),n.oc("ngForOf",n.kc(3,4,n.jc(4,7,t.filteredPublicModels),"label"))}}function _v(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-option",20),n.Wb(1,"div",21),n.Wb(2,"div",22),n.Qc(3),n.Vb(),n.Wb(4,"button",23),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(4);return i.stopPropagation(),s.deletePrivateModel(a)})),n.Rb(5,"mat-icon",24),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.oc("value",t),n.Db(3),n.Sc(" ",t.label," ")}}function yv(t,e){if(1&t&&(n.Wb(0,"mat-optgroup",18),n.ic(1,"translate"),n.Oc(2,_v,6,2,"mat-option",19),n.ic(3,"sortBy"),n.ic(4,"async"),n.Vb()),2&t){const t=n.hc(3);n.oc("label",n.jc(1,2,"lang.privateModel")),n.Db(2),n.oc("ngForOf",n.kc(3,4,n.jc(4,7,t.filteredPrivateModels),"label"))}}function xv(t,e){if(1&t&&(n.Wb(0,"mat-option",20),n.Qc(1),n.Wb(2,"small"),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t.label," "),n.Db(2),n.Sc("(",t.entity,")")}}function Cv(t,e){if(1&t&&(n.Wb(0,"mat-optgroup",18),n.ic(1,"titlecase"),n.ic(2,"translate"),n.Oc(3,xv,4,3,"mat-option",19),n.ic(4,"sortBy"),n.ic(5,"async"),n.Vb()),2&t){const t=n.hc(3);n.oc("label",n.jc(1,2,n.jc(2,4,"lang.user"))),n.Db(3),n.oc("ngForOf",n.kc(4,6,n.jc(5,9,t.filteredSignAvisUsers),"label"))}}function Ov(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",25),n.dc("click",(function(e){n.Dc(t);const i=n.hc(3);return e.stopPropagation(),i.openPromptSaveModel()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",26),n.Vb()}2&t&&n.pc("title",n.jc(1,1,"lang.saveAsPrivateModel"))}function Dv(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field",7),n.Rb(1,"input",8,9),n.Wb(3,"mat-autocomplete",10,11),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc(2).addItemToWorkflow(e.option.value)}))("opened",(function(){return n.Dc(t),n.hc(2).initFilterAvisModelList()})),n.Oc(5,mv,3,0,"mat-option",12),n.Oc(6,vv,5,9,"mat-optgroup",13),n.ic(7,"async"),n.Oc(8,yv,5,9,"mat-optgroup",13),n.ic(9,"async"),n.Oc(10,Cv,6,11,"mat-optgroup",13),n.ic(11,"async"),n.Vb(),n.Oc(12,Ov,3,3,"button",14),n.Vb()}if(2&t){const t=n.zc(4),e=n.hc(2);var i,a,s;n.Db(1),n.oc("formControl",e.searchAvisUser)("matAutocomplete",t),n.Db(4),n.oc("ngIf",e.avisModelListNotLoaded),n.Db(1),n.oc("ngIf",(null==(i=n.jc(7,7,e.filteredPublicModels))?null:i.length)>0),n.Db(2),n.oc("ngIf",(null==(a=n.jc(9,9,e.filteredPrivateModels))?null:a.length)>0),n.Db(2),n.oc("ngIf",(null==(s=n.jc(11,11,e.filteredSignAvisUsers))?null:s.length)>0),n.Db(2),n.oc("ngIf",e.avisWorkflow.items.length>0&&e.showListModels)}}function wv(t,e){1&t&&(n.Wb(0,"div",27),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noCircuitAvailable")," "))}function Mv(t,e){1&t&&(n.Wb(0,"div",27),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.cannotAddAvisCircuit")," "))}function kv(t,e){1&t&&n.Rb(0,"mat-icon",38)}function Sv(t,e){if(1&t&&(n.Ub(0),n.Rb(1,"mat-icon",39),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Ib("fa-hourglass",null==t.process_date)("fa-thumbs-up",null!=t.process_date)("valid",null!=t.process_date)}}function Iv(t,e){if(1&t&&(n.Ub(0),n.Rb(1,"mat-icon",40),n.ic(2,"translate"),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("title",n.jc(2,1,"lang.insteadOf")+" "+t.delegatedBy)}}function Pv(t,e){if(1&t&&(n.Wb(0,"div",41),n.ic(1,"fullDate"),n.Qc(2),n.ic(3,"translate"),n.ic(4,"timeAgo"),n.Vb()),2&t){const t=n.hc().$implicit;n.pc("title",n.jc(1,3,t.process_date)),n.Db(2),n.Tc("",n.jc(3,5,"lang.avisSent")," ",n.kc(4,7,t.process_date,"full"),"")}}function Vv(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",45),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc(2).index;return n.hc(2).changeRole(i,a)})),n.Qc(1),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.Rc(t.label)}}function Rv(t,e){if(1&t&&(n.Wb(0,"div"),n.Wb(1,"button",42),n.Qc(2),n.Vb(),n.Wb(3,"mat-menu",null,43),n.Oc(5,Vv,2,1,"button",44),n.Vb(),n.Vb()),2&t){const t=n.zc(4),e=n.hc().$implicit,i=n.hc(2);n.Db(1),n.oc("disabled",!i.adminMode||!i.functions.empty(e.process_date))("matMenuTriggerFor",t)("title",i.getRoleLabel(e.item_mode)),n.Db(1),n.Rc(i.getRoleLabel(e.item_mode)),n.Db(3),n.oc("ngForOf",i.availableRoles)}}function jv(t,e){1&t&&(n.Wb(0,"div",46),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noPrivileges")," "))}function Av(t,e){1&t&&(n.Wb(0,"div",46),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.userNotValid")," "))}function Wv(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",47),n.dc("click",(function(){n.Dc(t);const e=n.hc().index;return n.hc(2).deleteItem(e)})),n.Rb(1,"mat-icon",48),n.Vb()}}const Tv=function(t,e){return{"fa fa-user fa-2x":t,avatar:e}};function Ev(t,e){if(1&t&&(n.Wb(0,"mat-list-item",28),n.Oc(1,kv,1,0,"mat-icon",29),n.Rb(2,"mat-icon",30),n.Oc(3,Sv,2,6,"ng-container",0),n.Wb(4,"div",31),n.Wb(5,"div",32),n.Wb(6,"div",33),n.Qc(7),n.Oc(8,Iv,3,3,"ng-container",0),n.Vb(),n.Wb(9,"div",34),n.Qc(10),n.Vb(),n.Oc(11,Pv,5,10,"div",35),n.Vb(),n.Oc(12,Rv,6,5,"div",0),n.Oc(13,jv,3,3,"div",36),n.Oc(14,Av,3,3,"div",36),n.Vb(),n.Oc(15,Wv,2,0,"button",37),n.Vb()),2&t){const t=e.$implicit,i=e.index,a=n.hc(2);n.Ib("notDraggable",!a.adminMode||!a.functions.empty(t.process_date))("notEditable",!a.adminMode)("processed",null!=t.process_date),n.oc("cdkDragDisabled",!a.adminMode||!a.functions.empty(t.process_date)),n.Db(1),n.oc("ngIf",a.getCurrentAvisUserIndex()===i&&!a.adminMode),n.Db(1),n.Lc("background-image",a.functions.empty(t.picture)?"":"url("+t.picture+")"),n.Ib("invalid",!t.hasPrivilege||!t.isValid),n.oc("ngClass",n.wc(26,Tv,a.functions.empty(t.picture),!a.functions.empty(t.picture))),n.Db(1),n.oc("ngIf",!a.adminMode||null!=t.process_date),n.Db(3),n.Ib("unauthorized",!t.hasPrivilege||!t.isValid),n.Db(1),n.Sc(" ",t.labelToDisplay," "),n.Db(1),n.oc("ngIf",null!=t.process_date&&null!==t.delegatedBy),n.Db(1),n.Ib("unauthorized",!t.hasPrivilege||!t.isValid),n.Db(1),n.Sc(" ",t.item_entity," "),n.Db(1),n.oc("ngIf",null!=t.process_date),n.Db(1),n.oc("ngIf","parallel"===a.mode),n.Db(1),n.oc("ngIf",!t.hasPrivilege),n.Db(1),n.oc("ngIf",!t.isValid),n.Db(1),n.oc("ngIf",a.adminMode&&a.functions.empty(t.process_date))}}function Fv(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list"),n.Oc(1,Dv,13,13,"mat-form-field",2),n.Wb(2,"div",3,4),n.dc("cdkDropListDropped",(function(e){return n.Dc(t),n.hc().drop(e)})),n.Oc(4,wv,3,3,"div",5),n.Oc(5,Mv,3,3,"div",5),n.Oc(6,Ev,16,29,"mat-list-item",6),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.adminMode),n.Db(1),n.oc("cdkDropListData",t.avisWorkflow.items)("cdkDropListDisabled",!t.adminMode),n.Db(2),n.oc("ngIf",t.adminMode&&0===t.avisWorkflow.items.length),n.Db(1),n.oc("ngIf",!t.adminMode&&0===t.avisWorkflow.items.length),n.Db(1),n.oc("ngForOf",t.avisWorkflow.items)}}function Lv(t,e){1&t&&(n.Wb(0,"div",49),n.Rb(1,"mat-spinner",50),n.Vb())}let Qv=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.functions=n,this.latinisePipe=a,this.dialog=s,this.avisWorkflow={roles:["sign","avis"],items:[]},this.avisWorkflowClone=[],this.avisTemplates={private:[],public:[]},this.availableRoles=[],this.signAvisUsers=[],this.loading=!1,this.avisModelListNotLoaded=!0,this.resId=null,this.showListModels=!0,this.mode="circuit",this.searchAvisUser=new X.i}ngOnInit(){"parallel"===this.mode&&this.adminMode&&this.loadAvisRoles(),null!==this.resId&&("circuit"===this.mode?this.loadWorkflow(this.resId):this.loadParallelWorkflow(this.resId))}drop(t){t.previousContainer===t.container&&(this.functions.empty(this.avisWorkflow.items[t.currentIndex].process_date)?Object(lo.h)(t.container.data,t.previousIndex,t.currentIndex):this.notify.error(`${this.translate.instant("lang.moveAvisUserErr1")} <b>${this.avisWorkflow.items[t.previousIndex].labelToDisplay}</b> ${this.translate.instant("lang.moveAvisUserErr2")}.`))}loadAvisRoles(){return new Promise((t,e)=>{this.http.get("../rest/roles").pipe(Object(mt.a)(e=>{this.availableRoles=e.roles.filter(t=>["avis","avis_copy","avis_info"].indexOf(t.id)>-1).map(t=>({id:t.id,label:t.label})),t(!0)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()})}getRoleLabel(t){return this.availableRoles.filter(e=>e.id===t)[0].label}loadListModel(t){this.loading=!0,this.avisWorkflow.items=[],this.http.get(`../rest/listTemplates/entities/${t}?type=opinionCircuit`).subscribe(t=>{t.listTemplates[0]&&(this.avisWorkflow.items=t.listTemplates[0].items.map(t=>Object.assign(Object.assign({},t),{item_entity:t.descriptionToDisplay}))),this.avisWorkflowClone=JSON.parse(JSON.stringify(this.avisWorkflow.items)),this.loading=!1})}loadAvisUsersList(){return new Promise((t,e)=>{this.http.get("../rest/autocomplete/users/circuit?circuit=opinion").pipe(Object(l.a)(t=>t.map(t=>({id:t.id,title:`${t.idToDisplay} (${t.otherInfo})`,label:t.idToDisplay,entity:t.otherInfo,type:"user"}))),Object(mt.a)(e=>{this.signAvisUsers=e,this.filteredSignAvisUsers=this.searchAvisUser.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>this._filter(t))),t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}loadAvisModelList(){return Object(r.a)(this,void 0,void 0,(function*(){return null!==this.resId&&(yield this.loadDefaultModel()),new Promise((t,e)=>{this.http.get("../rest/availableCircuits?circuit=opinion").pipe(Object(mt.a)(e=>{this.avisTemplates.public=this.avisTemplates.public.concat(e.circuits.filter(t=>!t.private).map(t=>({id:t.id,title:t.title,label:t.title,type:"entity"}))),this.avisTemplates.private=e.circuits.filter(t=>t.private).map(t=>({id:t.id,title:t.title,label:t.title,type:"entity"})),this.filteredPublicModels=this.searchAvisUser.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>this._filterPublicModel(t))),this.filteredPrivateModels=this.searchAvisUser.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>this._filterPrivateModel(t))),t(!0)})).subscribe()})}))}loadDefaultModel(){return this.avisTemplates.public=[],new Promise((t,e)=>{this.http.get(`../rest/resources/${this.resId}/defaultCircuit?circuit=opinion`).pipe(Object(mt.a)(t=>{this.functions.empty(t.itemsRemoved)||this.notify.error(this.translate.instant("lang.itemRemovedFromAvisTemplate")+" : "+t.itemsRemoved.join(", "))}),Object(d.a)(t=>!this.functions.empty(t.circuit)),Object(mt.a)(t=>{this.functions.empty(t.circuit)||this.avisTemplates.public.push({id:t.circuit.id,title:t.circuit.title,label:t.circuit.title,type:"entity"})}),Object(Xt.a)(()=>t(!0)),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}initFilterAvisModelList(){return Object(r.a)(this,void 0,void 0,(function*(){this.avisModelListNotLoaded&&(yield this.loadAvisUsersList(),this.showListModels&&(yield this.loadAvisModelList()),this.searchAvisUser.reset(),this.avisModelListNotLoaded=!1)}))}_filter(t){if("string"==typeof t){const e=this.latinisePipe.transform(t.toLowerCase());return this.signAvisUsers.filter(t=>this.latinisePipe.transform(t.title.toLowerCase()).includes(e))}return this.signAvisUsers}_filterPrivateModel(t){if("string"==typeof t){const e=this.latinisePipe.transform(t.toLowerCase());return this.avisTemplates.private.filter(t=>this.latinisePipe.transform(t.title.toLowerCase()).includes(e))}return this.avisTemplates.private}_filterPublicModel(t){if("string"==typeof t){const e=this.latinisePipe.transform(t.toLowerCase());return this.avisTemplates.public.filter(t=>this.latinisePipe.transform(t.title.toLowerCase()).includes(e))}return this.avisTemplates.public}loadWorkflow(t){return this.resId=t,this.loading=!0,this.avisWorkflow.items=[],new Promise((e,i)=>{this.http.get("../rest/resources/"+t+"/opinionCircuit").pipe(Object(mt.a)(t=>{this.functions.empty(t.itemsRemoved)||this.notify.error(this.translate.instant("lang.itemRemovedFromAvisTemplate")+" : "+t.itemsRemoved.join(", "))}),Object(d.a)(t=>!this.functions.empty(t.circuit)),Object(mt.a)(t=>{t.circuit.forEach(t=>{this.avisWorkflow.items.push(Object.assign(Object.assign({},t),{difflist_type:"circuit"===this.mode?"AVIS_CIRCUIT":"entity_id"}))}),this.avisWorkflowClone=JSON.parse(JSON.stringify(this.avisWorkflow.items))}),Object(Xt.a)(()=>{this.loading=!1,e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}loadParallelWorkflow(t){return this.resId=t,this.loading=!0,this.avisWorkflow.items=[],new Promise((e,i)=>{this.http.get("../rest/resources/"+t+"/parallelOpinion").subscribe(t=>{t.forEach(t=>{this.avisWorkflow.items.push(Object.assign(Object.assign({},t),{difflist_type:"entity_id"}))}),this.avisWorkflowClone=JSON.parse(JSON.stringify(this.avisWorkflow.items)),this.loading=!1,e(!0)},t=>{this.notify.handleErrors(t)})})}loadDefaultWorkflow(t){this.loading=!0,this.avisWorkflow.items=[],this.http.get("../rest/resources/"+t+"/defaultCircuit?circuit=opinion").pipe(Object(mt.a)(t=>{this.functions.empty(t.itemsRemoved)||this.notify.error(this.translate.instant("lang.itemRemovedFromAvisTemplate")+" : "+t.itemsRemoved.join(", "))}),Object(d.a)(t=>!this.functions.empty(t.circuit)),Object(mt.a)(t=>{t.circuit.items.forEach(t=>{this.avisWorkflow.items.push(Object.assign(Object.assign({},t),{difflist_type:"circuit"===this.mode?"AVIS_CIRCUIT":"entity_id",item_entity:t.descriptionToDisplay}))}),this.avisWorkflowClone=JSON.parse(JSON.stringify(this.avisWorkflow.items))}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}deleteItem(t){this.avisWorkflow.items.splice(t,1)}getAvisCount(){return this.avisWorkflow.items.length}changeRole(t,e){this.avisWorkflow.items[e].item_mode=t.id}getWorkflow(){return this.avisWorkflow.items}getCurrentAvisUserIndex(){return this.avisWorkflow.items.map(t=>t.listinstance_id).indexOf(this.getLastAvisUser().listinstance_id)+1}getFirstAvisUser(){return this.functions.empty(this.avisWorkflow.items[0])?"":this.avisWorkflow.items[0]}getCurrentAvisUser(){const t=this.avisWorkflow.items.map(t=>t.listinstance_id).indexOf(this.getLastAvisUser().listinstance_id);return this.functions.empty(this.avisWorkflow.items[t+1])?"":this.avisWorkflow.items[t+1]}getNextAvisUser(){const t=this.avisWorkflow.items.map(t=>t.listinstance_id).indexOf(this.getLastAvisUser().listinstance_id);return this.functions.empty(this.avisWorkflow.items[t+2])?"":this.avisWorkflow.items[t+2]}getLastAvisUser(){let t=this.avisWorkflow.items.filter(t=>!this.functions.empty(t.process_date));return this.functions.empty(t[t.length-1])?"":t[t.length-1]}saveAvisWorkflow(t=[this.resId]){return new Promise((e,i)=>{if(0===this.avisWorkflow.items.length)this.http.delete(`../rest/resources/${t[0]}/circuits/opinionCircuit`).pipe(Object(mt.a)(()=>{this.avisWorkflowClone=JSON.parse(JSON.stringify(this.avisWorkflow.items)),this.notify.success(this.translate.instant("lang.avisWorkflowDeleted")),e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe();else if(this.isValidWorkflow()){const i=t.map(t=>({resId:t,listInstances:this.avisWorkflow.items}));this.http.put("../rest/circuits/opinionCircuit",{resources:i}).pipe(Object(mt.a)(t=>{this.avisWorkflowClone=JSON.parse(JSON.stringify(this.avisWorkflow.items)),this.notify.success(this.translate.instant("lang.avisWorkflowUpdated")),e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}else this.notify.error(this.getError()),e(!1)})}addItemToWorkflow(t){return new Promise((e,i)=>{"user"===t.type?(this.avisWorkflow.items.push({item_id:t.id,item_type:"user",item_entity:t.entity,item_mode:"avis",labelToDisplay:t.label,externalId:this.functions.empty(t.externalId)?null:t.externalId,difflist_type:"circuit"===this.mode?"AVIS_CIRCUIT":"entity_id",hasPrivilege:!0,isValid:!0}),this.searchAvisUser.reset(),this.searchAvisUserInput.nativeElement.blur(),e(!0)):"entity"===t.type&&this.http.get("../rest/listTemplates/"+t.id).pipe(Object(mt.a)(t=>{this.avisWorkflow.items=this.avisWorkflow.items.concat(t.listTemplate.items.map(t=>({item_id:t.item_id,item_type:"user",labelToDisplay:t.idToDisplay,item_entity:t.descriptionToDisplay,item_mode:"avis",difflist_type:"circuit"===this.mode?"AVIS_CIRCUIT":"entity_id",hasPrivilege:t.hasPrivilege,isValid:t.isValid}))),this.searchAvisUser.reset(),this.searchAvisUserInput.nativeElement.blur(),e(!0)})).subscribe()})}resetWorkflow(){this.avisWorkflow.items=[]}isValidWorkflow(){return 0===this.avisWorkflow.items.filter(t=>!t.hasPrivilege||!t.isValid).length&&this.avisWorkflow.items.length>0}getError(){return this.avisWorkflow.items.filter(t=>!t.hasPrivilege).length>0?this.translate.instant("lang.mustDeleteUsersWithNoPrivileges"):this.avisWorkflow.items.filter(t=>!t.isValid).length>0?this.translate.instant("lang.mustDeleteInvalidUsers"):void 0}emptyWorkflow(){return 0===this.avisWorkflow.items.length}workflowEnd(){return this.avisWorkflow.items.filter(t=>!this.functions.empty(t.process_date)).length===this.avisWorkflow.items.length}openPromptSaveModel(){this.dialog.open(bv,{panelClass:"maarch-modal",data:{avisWorkflow:this.avisWorkflow.items}}).afterClosed().pipe(Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.avisTemplates.private.push({id:t.id,title:t.title,label:t.title,type:"entity"}),this.searchAvisUser.reset()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}deletePrivateModel(t){this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete("../rest/listTemplates/"+t.id)),Object(mt.a)(()=>{this.avisTemplates.private=this.avisTemplates.private.filter(e=>e.id!==t.id),this.searchAvisUser.reset(),this.notify.success(this.translate.instant("lang.modelDeleted"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}getMaarchParapheurUserAvatar(t,e){this.functions.empty(t)||this.http.get("../rest/maarchParapheur/user/"+t+"/picture").subscribe(t=>{this.avisWorkflow.items[e].picture=t.picture},t=>{this.notify.handleErrors(t)})}isModified(){return!this.loading&&JSON.stringify(this.avisWorkflow.items)!==JSON.stringify(this.avisWorkflowClone)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(_t.a),n.Qb(Tt.c),n.Qb(q.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-avis-workflow"]],viewQuery:function(t,e){var i;1&t&&n.Xc(fv,!0),2&t&&n.yc(i=n.ec())&&(e.searchAvisUserInput=i.first)},inputs:{injectDatas:"injectDatas",adminMode:"adminMode",resId:"resId",showListModels:"showListModels",mode:"mode"},decls:2,vars:2,consts:[[4,"ngIf"],["style","display:flex;padding: 10px;",4,"ngIf"],["appearance","outline",4,"ngIf"],["cdkDropList","",1,"cdk-list",3,"cdkDropListData","cdkDropListDisabled","cdkDropListDropped"],["dataAvailableList","cdkDropList"],["class","emptyContent",4,"ngIf"],["disableRipple","","cdkDrag","","class","columns workflow",3,"cdkDragDisabled","notDraggable","notEditable","processed",4,"ngFor","ngForOf"],["appearance","outline"],["type","text","matInput","","placeholder","Ajouter des personnes","id","searchAvisUserInput",3,"formControl","matAutocomplete"],["searchAvisUserInput",""],[3,"optionSelected","opened"],["autoGroup","matAutocomplete"],["disabled","",4,"ngIf"],["class","avisSignList",3,"label",4,"ngIf"],["mat-icon-button","","matSuffix","","color","primary",3,"title","click",4,"ngIf"],["disabled",""],[2,"display","flex","justify-content","center"],["diameter","35"],[1,"avisSignList",3,"label"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[2,"display","flex","align-items","center"],[2,"flex","1"],["mat-icon-button","","color","warn",3,"click"],[1,"fa","fa-trash",2,"margin","0px"],["mat-icon-button","","matSuffix","","color","primary",3,"title","click"],[1,"fa","fa-plus"],[1,"emptyContent"],["disableRipple","","cdkDrag","",1,"columns","workflow",3,"cdkDragDisabled"],["class","fa fa-chevron-right fa-2x","mat-list-icon","","color","accent",4,"ngIf"],["mat-list-icon","","color","primary",3,"ngClass"],["mat-line","",1,"workflowLine"],[1,"workflowLineContainer"],[1,"workflowLineLabel"],[1,"workflowLineSubLabel"],["class","workflowLineProcessDate","color","accent",3,"title",4,"ngIf"],["class","invalid",4,"ngIf"],["mat-icon-button","",3,"click",4,"ngIf"],["mat-list-icon","","color","accent",1,"fa","fa-chevron-right","fa-2x"],["mat-list-icon","",1,"fa-2x","far",2,"opacity","0.5"],["mat-list-icon","",1,"fas","fa-exclamation-circle",2,"opacity","0.5","font-size","125%","height","15px","color","red",3,"title"],["color","accent",1,"workflowLineProcessDate",3,"title"],["color","primary","mat-raised-button","",1,"currentRoleButton",3,"disabled","matMenuTriggerFor","title"],["menu","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["mat-menu-item","",3,"click"],[1,"invalid"],["mat-icon-button","",3,"click"],["color","warn",1,"fa","fa-times"],[2,"display","flex","padding","10px"],[2,"margin","auto"]],template:function(t,e){1&t&&(n.Oc(0,Fv,7,6,"mat-list",0),n.Oc(1,Lv,2,0,"div",1)),2&t&&(n.oc("ngIf",!e.loading),n.Db(1),n.oc("ngIf",e.loading))},directives:[P.t,R.a,lo.e,P.s,Y.c,J.b,X.d,Ne.d,X.u,X.j,Ne.a,W.p,V.c,W.o,k.b,S.a,Y.j,R.d,lo.a,R.c,P.q,W.l,ne.d,ne.e,ne.b],pipes:[P.b,g.d,Wt.a,P.F,uo,ps],styles:[".mat-form-field-appearance-outline[_ngcontent-%COMP%]{font-size:11px}.avisSignList[_ngcontent-%COMP%] .mat-optgroup-label{color:#135f7f;position:-webkit-sticky;position:sticky;top:0;background:#fff!important;z-index:1}.cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);background:#fff!important;padding:10px}.cdk-drag-preview[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%], .cdk-drag-preview[_ngcontent-%COMP%] .mat-icon-button[_ngcontent-%COMP%]{display:none}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.columns[_ngcontent-%COMP%]:last-child{border:none}.cdk-list.cdk-drop-list-dragging[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.columns[_ngcontent-%COMP%]{cursor:move}.notDraggable[_ngcontent-%COMP%]{cursor:not-allowed}.notEditable[_ngcontent-%COMP%]{cursor:auto}.currentContextButton[_ngcontent-%COMP%]{width:150px;text-align:left}.currentContextButton[_ngcontent-%COMP%], .currentRoleButton[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;font-size:13px}.currentRoleButton[_ngcontent-%COMP%]{width:120px;text-align:center}.emptyContent[_ngcontent-%COMP%]{opacity:.5;text-align:center;font-size:10px;padding:10px}.processed[_ngcontent-%COMP%]{background:rgba(0,128,0,.11)!important}.workflow[_ngcontent-%COMP%]{height:55px;margin-bottom:10px;background:hsla(0,0%,84.7%,.1);border-radius:10px;font-size:13px}.workflowLine[_ngcontent-%COMP%]{display:flex!important;align-items:center}.workflowLineContainer[_ngcontent-%COMP%]{flex:1}.workflowLineContainer[_ngcontent-%COMP%], .workflowLineLabel[_ngcontent-%COMP%], .workflowLineSubLabel[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis}.workflowLineSubLabel[_ngcontent-%COMP%]{font-size:80%;opacity:.5;flex:1}.workflowLineProcessDate[_ngcontent-%COMP%]{flex:1;text-align:left;font-size:80%}.workflowLine[_ngcontent-%COMP%] .mat-raised-button[disabled][_ngcontent-%COMP%]{background:none;color:#135f7f!important;opacity:1}.avatar[_ngcontent-%COMP%]{border:3px solid #f99830;height:45px!important;width:45px!important;background-size:cover;background-repeat:no-repeat;background-position:50%}.valid[_ngcontent-%COMP%]{color:#006841}.invalid[_ngcontent-%COMP%]{color:#8e3e52}.unauthorized[_ngcontent-%COMP%]{color:#8e3e52;text-decoration:line-through}"]}),t})();const Nv=["noteEditor"],zv=["appAvisWorkflow"];function Bv(t,e){1&t&&(n.Wb(0,"div",20),n.Rb(1,"mat-spinner",21),n.Vb())}function Uv(t,e){1&t&&(n.Wb(0,"b",22),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function $v(t,e){if(1&t&&(n.Wb(0,"b",22),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function Hv(t,e){if(1&t&&(n.Wb(0,"b",22),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function Gv(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function Xv(t,e){if(1&t&&(n.Wb(0,"div",23),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,Gv,5,4,"li",24),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Sc(" ",n.jc(3,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.resourcesError)}}function qv(t,e){if(1&t&&n.Rb(0,"mat-datepicker-toggle",25),2&t){n.hc();const t=n.zc(23);n.oc("for",t)}}function Kv(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",26),n.dc("click",(function(e){n.Dc(t);const i=n.hc();return e.stopPropagation(),i.opinionLimitDate=null})),n.ic(1,"translate"),n.Rb(2,"mat-icon",27),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.eraseValue"))}function Yv(t,e){1&t&&n.Rb(0,"app-avis-workflow",28,29),2&t&&n.oc("adminMode",!0)}let Jv=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.loading=!1,this.resourcesError=[],this.noResourceToProcess=null,this.opinionLimitDate=null,this.today=new Date}ngAfterViewInit(){return Object(r.a)(this,void 0,void 0,(function*(){1===this.data.resIds.length&&(yield this.appAvisWorkflow.loadWorkflow(this.data.resIds[0]),this.appAvisWorkflow.emptyWorkflow()&&this.appAvisWorkflow.loadDefaultWorkflow(this.data.resIds[0]))}))}onSubmit(){return Object(r.a)(this,void 0,void 0,(function*(){if(this.loading=!0,0===this.data.resIds.length){let t=yield this.indexDocument();t&&(t=yield this.appAvisWorkflow.saveAvisWorkflow(this.data.resIds)),t&&this.executeAction(this.data.resIds)}else{const t=this.data.resIds.filter(t=>-1===this.resourcesError.map(t=>t.res_id).indexOf(t));(yield this.appAvisWorkflow.saveAvisWorkflow(t))&&this.executeAction(t)}this.loading=!1}))}indexDocument(){return new Promise((t,e)=>{this.http.post("../rest/resources",this.data.resource).pipe(Object(mt.a)(e=>{this.data.resIds=[e.resId],t(!0)}),Object(m.a)(e=>(this.notify.handleErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}executeAction(t){const e=`[${this.translate.instant("lang.avisUserAsk").toUpperCase()}] ${this.noteEditor.getNoteContent()}`;this.noteEditor.setNoteContent(e),this.http.put(this.data.processActionRoute,{resources:t,note:this.noteEditor.getNote(),data:{opinionLimitDate:this.functions.formatDateObjectToDateString(this.opinionLimitDate,!0)}}).pipe(Object(mt.a)(e=>{e||this.dialogRef.close(t),e&&null!=e.errors&&this.notify.error(e.errors)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isValidAction(){return!(this.noResourceToProcess||void 0===this.appAvisWorkflow||this.appAvisWorkflow.emptyWorkflow()||this.appAvisWorkflow.workflowEnd()||this.functions.empty(this.noteEditor.getNoteContent())||this.functions.empty(this.functions.formatDateObjectToDateString(this.opinionLimitDate)))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(Nv,!0),n.Xc(zv,!0)),2&t&&(n.yc(i=n.ec())&&(e.noteEditor=i.first),n.yc(i=n.ec())&&(e.appAvisWorkflow=i.first))},decls:37,vars:34,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],["autosize","",2,"height","100%"],[2,"background","white","padding","10px"],["color","primary","class","highlight",4,"ngIf"],["class","alert-message alert-message-danger mailList","role","alert",4,"ngIf"],["appearance","outline",2,"cursor","pointer","margin-top","10px",3,"click"],["matInput","","readonly","","required","",2,"cursor","pointer",3,"ngModel","matDatepicker","placeholder","min","ngModelChange"],["matSuffix","",3,"for",4,"ngIf"],["picker",""],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click",4,"ngIf"],[3,"title","resIds","disableRestriction"],["noteEditor",""],[3,"adminMode",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"],["role","alert",1,"alert-message","alert-message-danger","mailList"],[4,"ngFor","ngForOf"],["matSuffix","",3,"for"],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click"],["color","warn",1,"fa","fa-calendar-times"],[3,"adminMode"],["appAvisWorkflow",""]],template:function(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,Bv,2,0,"div",3),n.Wb(5,"mat-sidenav-container",4),n.Wb(6,"mat-sidenav-content",5),n.Wb(7,"div"),n.Qc(8),n.ic(9,"translate"),n.Oc(10,Uv,3,3,"b",6),n.Oc(11,$v,2,1,"b",6),n.Oc(12,Hv,3,4,"b",6),n.Qc(13," ? "),n.Vb(),n.Oc(14,Xv,6,4,"div",7),n.Wb(15,"mat-form-field",8),n.dc("click",(function(){return n.Dc(t),n.zc(23).open()})),n.Wb(16,"mat-label"),n.Qc(17),n.ic(18,"translate"),n.Vb(),n.Wb(19,"input",9),n.dc("ngModelChange",(function(t){return e.opinionLimitDate=t})),n.ic(20,"translate"),n.Vb(),n.Oc(21,qv,1,1,"mat-datepicker-toggle",10),n.Rb(22,"mat-datepicker",null,11),n.Oc(24,Kv,3,3,"button",12),n.Vb(),n.Rb(25,"app-note-editor",13,14),n.ic(27,"translate"),n.Oc(28,Yv,2,1,"app-avis-workflow",15),n.Vb(),n.Vb(),n.Vb(),n.Rb(29,"span",16),n.Wb(30,"div",17),n.Wb(31,"button",18),n.dc("click",(function(){return e.onSubmit()})),n.Qc(32),n.ic(33,"translate"),n.Vb(),n.Wb(34,"button",19),n.Qc(35),n.ic(36,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(23);n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(4),n.Sc(" ",n.jc(9,22,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(2),n.oc("ngIf",e.resourcesError.length>0),n.Db(3),n.Rc(n.jc(18,24,"lang.opinionLimitDate")),n.Db(2),n.oc("ngModel",e.opinionLimitDate)("matDatepicker",t)("placeholder",n.jc(20,26,"lang.chooseDate"))("min",e.today),n.Db(2),n.oc("ngIf",!e.opinionLimitDate),n.Db(3),n.oc("ngIf",e.opinionLimitDate),n.Db(1),n.oc("title",n.jc(27,28,"lang.addOpinionReason"))("resIds",e.data.resIds)("disableRestriction",!0),n.Db(3),n.oc("ngIf",1==e.data.resIds.length||!e.noResourceToProcess&&e.data.resIds.length>1),n.Db(3),n.oc("disabled",e.loading||!e.isValidAction()),n.Db(1),n.Rc(n.jc(33,30,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(36,32,"lang.cancel"))}},directives:[q.i,q.f,P.t,I.e,I.f,Y.c,Y.g,J.b,X.d,ae.h,X.F,X.u,X.x,ae.f,Du,q.c,k.b,q.d,V.c,P.s,ae.j,Y.j,S.a,Qv],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:2;overflow:hidden}.mailList[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{font-size:12px;max-height:100px;overflow:auto;padding-left:25px;padding-right:5px;padding-bottom:10px;margin-top:10px}.mailList[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;text-decoration:underline}.mailList[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{font-size:120%}.formType[_ngcontent-%COMP%]{align-items:center;display:flex;margin:10px;border-radius:4px;border:1px solid #ccc;position:relative;padding:10px}.formType-title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:-7px;left:10px;padding:0;margin:0;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-form-field-suffix{color:#f99830;font-size:15px;top:0}.formType[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.priceContent[_ngcontent-%COMP%]{align-items:center;width:100%}.priceContent[_ngcontent-%COMP%], .priceContent-label[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.priceContent-label[_ngcontent-%COMP%]{text-align:right;color:#135f7f;flex:1;padding-right:10px}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:90px!important}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.priceInfo[_ngcontent-%COMP%]{padding-right:20px;font-size:10px;opacity:.5;width:100%}.pjList[_ngcontent-%COMP%]{display:flex;width:100%;overflow:auto;flex-direction:column;background:#666}.pjList[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin:10px}"]}),t})();const Zv=["noteEditor"],t_=["appAvisWorkflow"];function e_(t,e){1&t&&(n.Wb(0,"div",18),n.Rb(1,"mat-spinner",19),n.Vb())}function i_(t,e){1&t&&(n.Wb(0,"b",20),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function n_(t,e){if(1&t&&(n.Wb(0,"b",20),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function a_(t,e){if(1&t&&(n.Wb(0,"b",20),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function s_(t,e){if(1&t&&(n.Rb(0,"div",21),n.ic(1,"translate")),2&t){const t=n.hc();n.oc("innerHTML","<b>"+t.ownerOpinion+"</b> "+n.jc(1,1,"lang.askOpinionUser")+" :<br/><br/>"+t.opinionContent,n.Ec)}}function o_(t,e){if(1&t&&(n.Rb(0,"div",21),n.ic(1,"translate")),2&t){const t=n.hc();n.oc("innerHTML",n.jc(1,1,"lang.sendToDocTo")+" <b>"+t.appAvisWorkflow.getNextAvisUser().labelToDisplay+"</b>",n.Ec)}}function r_(t,e){1&t&&(n.Rb(0,"div",21),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.endWorkflow"),n.Ec)}function c_(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function l_(t,e){if(1&t&&(n.Wb(0,"div",22),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,c_,5,4,"li",23),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Sc(" ",n.jc(3,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.resourcesErrors)}}function d_(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function h_(t,e){if(1&t&&(n.Wb(0,"div",24),n.Wb(1,"ul",25),n.Oc(2,d_,5,4,"li",23),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.oc("ngForOf",t.resourcesWarnings)}}function u_(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field",26),n.Wb(1,"mat-label"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"input",27),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().opinionLimitDate=e})),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(2),n.Rc(n.jc(3,2,"lang.opinionLimitDate")),n.Db(2),n.oc("ngModel",t.opinionLimitDate)}}function p_(t,e){if(1&t&&n.Rb(0,"app-avis-workflow",28,29),2&t){const t=n.hc();n.oc("adminMode",!1)("resId",t.data.resIds[0])}}let b_=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.loading=!1,this.resourcesWarnings=[],this.resourcesErrors=[],this.ownerOpinion="",this.opinionContent="",this.opinionLimitDate=null,this.noResourceToProcess=null}ngOnInit(){this.checkAvisCircuit()}checkAvisCircuit(){this.loading=!0,this.resourcesErrors=[],this.resourcesWarnings=[],this.http.post("../rest/resourcesList/users/"+this.data.userId+"/groups/"+this.data.groupId+"/baskets/"+this.data.basketId+"/actions/"+this.data.action.id+"/checkContinueOpinionCircuit",{resources:this.data.resIds}).pipe(Object(mt.a)(t=>{this.functions.empty(t.resourcesInformations.warning)||(this.resourcesWarnings=t.resourcesInformations.warning),this.functions.empty(t.resourcesInformations.error)||(this.resourcesErrors=t.resourcesInformations.error,this.noResourceToProcess=this.resourcesErrors.length===this.data.resIds.length),this.noResourceToProcess||(this.ownerOpinion=t.resourcesInformations.success[0].avisUserAsk,this.opinionContent=t.resourcesInformations.success[0].note,this.opinionLimitDate=new Date(t.resourcesInformations.success[0].opinionLimitDate),this.opinionLimitDate=this.functions.formatDateObjectToDateString(this.opinionLimitDate))}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(),Object(c.a)(!1)))).subscribe()}onSubmit(){const t=this.data.resIds.filter(t=>-1===this.resourcesErrors.map(t=>t.res_id).indexOf(t));this.executeAction(t)}executeAction(t){const e=`[${this.translate.instant("lang.avisUserState")}] ${this.noteEditor.getNoteContent()}`;this.noteEditor.setNoteContent(e),this.http.put(this.data.processActionRoute,{resources:t,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(e=>{e||this.dialogRef.close(t),e&&null!=e.errors&&this.notify.error(e.errors)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isValidAction(){return!this.noResourceToProcess&&!this.functions.empty(this.noteEditor.getNoteContent())}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(Zv,!0),n.Xc(t_,!0)),2&t&&(n.yc(i=n.ec())&&(e.noteEditor=i.first),n.yc(i=n.ec())&&(e.appAvisWorkflow=i.first))},decls:32,vars:28,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],["autosize","",2,"height","100%"],[2,"background","white","padding","10px"],["color","primary","class","highlight",4,"ngIf"],["class","alert-message alert-message-info","role","alert","style","margin-top: 30px;",3,"innerHTML",4,"ngIf"],["class","alert-message alert-message-danger mailList","role","alert",4,"ngIf"],["class","alert-message alert-message-info mailList","role","alert",4,"ngIf"],["appearance","outline","style","cursor:pointer;margin-top: 10px;",4,"ngIf"],[3,"title","resIds","disableRestriction"],["noteEditor",""],[3,"adminMode","resId",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","30px",3,"innerHTML"],["role","alert",1,"alert-message","alert-message-danger","mailList"],[4,"ngFor","ngForOf"],["role","alert",1,"alert-message","alert-message-info","mailList"],[2,"margin","0","padding-bottom","0px"],["appearance","outline",2,"cursor","pointer","margin-top","10px"],["matInput","","readonly","","disabled","",2,"cursor","pointer",3,"ngModel","ngModelChange"],[3,"adminMode","resId"],["appAvisWorkflow",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,e_,2,0,"div",3),n.Wb(5,"mat-sidenav-container",4),n.Wb(6,"mat-sidenav-content",5),n.Wb(7,"div"),n.Qc(8),n.ic(9,"translate"),n.Oc(10,i_,3,3,"b",6),n.Oc(11,n_,2,1,"b",6),n.Oc(12,a_,3,4,"b",6),n.Qc(13," ? "),n.Vb(),n.Oc(14,s_,2,3,"div",7),n.Oc(15,o_,2,3,"div",7),n.Oc(16,r_,2,3,"div",7),n.Oc(17,l_,6,4,"div",8),n.Oc(18,h_,3,1,"div",9),n.Oc(19,u_,5,4,"mat-form-field",10),n.Rb(20,"app-note-editor",11,12),n.ic(22,"translate"),n.Oc(23,p_,2,2,"app-avis-workflow",13),n.Vb(),n.Vb(),n.Vb(),n.Rb(24,"span",14),n.Wb(25,"div",15),n.Wb(26,"button",16),n.dc("click",(function(){return e.onSubmit()})),n.Qc(27),n.ic(28,"translate"),n.Vb(),n.Wb(29,"button",17),n.Qc(30),n.ic(31,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(4),n.Sc(" ",n.jc(9,20,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(2),n.oc("ngIf",1==e.data.resIds.length&&!e.noResourceToProcess),n.Db(1),n.oc("ngIf",1==e.data.resIds.length&&void 0!==e.appAvisWorkflow&&""!==e.appAvisWorkflow.getNextAvisUser()),n.Db(1),n.oc("ngIf",1==e.data.resIds.length&&void 0!==e.appAvisWorkflow&&""===e.appAvisWorkflow.getNextAvisUser()&&!e.noResourceToProcess),n.Db(1),n.oc("ngIf",e.resourcesErrors.length>0),n.Db(1),n.oc("ngIf",e.resourcesWarnings.length>0),n.Db(1),n.oc("ngIf",1===e.data.resIds.length&&!e.noResourceToProcess),n.Db(1),n.oc("title",n.jc(22,22,"lang.addOpinion"))("resIds",e.data.resIds)("disableRestriction",!0),n.Db(3),n.oc("ngIf",1==e.data.resIds.length),n.Db(3),n.oc("disabled",e.loading||!e.isValidAction()),n.Db(1),n.Rc(n.jc(28,24,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(31,26,"lang.cancel")))},directives:[q.i,q.f,P.t,I.e,I.f,Du,q.c,k.b,q.d,V.c,P.s,Y.c,Y.g,J.b,X.d,X.u,X.x,Qv],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:2;overflow:hidden}.mailList[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{font-size:12px;max-height:100px;overflow:auto;padding-left:25px;padding-right:5px;padding-bottom:10px;margin-top:10px}.mailList[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;text-decoration:underline}.mailList[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{font-size:120%}.formType[_ngcontent-%COMP%]{align-items:center;display:flex;margin:10px;border-radius:4px;border:1px solid #ccc;position:relative;padding:10px}.formType-title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:-7px;left:10px;padding:0;margin:0;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-form-field-suffix{color:#f99830;font-size:15px;top:0}.formType[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.priceContent[_ngcontent-%COMP%]{align-items:center;width:100%}.priceContent[_ngcontent-%COMP%], .priceContent-label[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.priceContent-label[_ngcontent-%COMP%]{text-align:right;color:#135f7f;flex:1;padding-right:10px}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:90px!important}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.priceInfo[_ngcontent-%COMP%]{padding-right:20px;font-size:10px;opacity:.5;width:100%}.pjList[_ngcontent-%COMP%]{display:flex;width:100%;overflow:auto;flex-direction:column;background:#666}.pjList[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin:10px}"]}),t})();const f_=["noteEditor"],m_=["appAvisWorkflow"];function g_(t,e){1&t&&(n.Wb(0,"div",20),n.Rb(1,"mat-spinner",21),n.Vb())}function v_(t,e){1&t&&(n.Wb(0,"b",22),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function __(t,e){if(1&t&&(n.Wb(0,"b",22),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function y_(t,e){if(1&t&&(n.Wb(0,"b",22),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function x_(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function C_(t,e){if(1&t&&(n.Wb(0,"div",23),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,x_,5,4,"li",24),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Sc(" ",n.jc(3,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.resourcesError)}}function O_(t,e){if(1&t&&n.Rb(0,"mat-datepicker-toggle",25),2&t){n.hc();const t=n.zc(23);n.oc("for",t)}}function D_(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",26),n.dc("click",(function(e){n.Dc(t);const i=n.hc();return e.stopPropagation(),i.opinionLimitDate=null})),n.ic(1,"translate"),n.Rb(2,"mat-icon",27),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.eraseValue"))}function w_(t,e){1&t&&n.Rb(0,"app-avis-workflow",28,29),2&t&&n.oc("adminMode",!0)("mode","parallel")}let M_=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.loading=!1,this.resourcesError=[],this.noResourceToProcess=null,this.opinionLimitDate=null,this.today=new Date,this.availableRoles=[]}ngAfterViewInit(){return Object(r.a)(this,void 0,void 0,(function*(){1===this.data.resIds.length&&(yield this.appAvisWorkflow.loadParallelWorkflow(this.data.resIds[0]),this.appAvisWorkflow.emptyWorkflow()&&this.appAvisWorkflow.loadDefaultWorkflow(this.data.resIds[0]))}))}onSubmit(){return Object(r.a)(this,void 0,void 0,(function*(){if(this.loading=!0,0===this.data.resIds.length)(yield this.indexDocument())&&this.executeAction(this.data.resIds);else{const t=this.data.resIds.filter(t=>-1===this.resourcesError.map(t=>t.res_id).indexOf(t));this.executeAction(t)}this.loading=!1}))}indexDocument(){return new Promise((t,e)=>{this.http.post("../rest/resources",this.data.resource).pipe(Object(mt.a)(e=>{this.data.resIds=[e.resId],t(!0)}),Object(m.a)(e=>(this.notify.handleErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}executeAction(t){const e=`[${this.translate.instant("lang.avisUserAsk").toUpperCase()}] ${this.noteEditor.getNoteContent()}`;this.noteEditor.setNoteContent(e),this.http.put(this.data.processActionRoute,{resources:t,note:this.noteEditor.getNote(),data:{opinionLimitDate:this.functions.formatDateObjectToDateString(this.opinionLimitDate,!0,"yyyy-mm-dd"),opinionCircuit:this.appAvisWorkflow.getWorkflow()}}).pipe(Object(mt.a)(e=>{e||this.dialogRef.close(t),e&&null!=e.errors&&this.notify.error(e.errors)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isValidAction(){return!(this.noResourceToProcess||void 0===this.appAvisWorkflow||this.appAvisWorkflow.emptyWorkflow()||this.appAvisWorkflow.workflowEnd()||this.functions.empty(this.noteEditor.getNoteContent())||this.functions.empty(this.functions.formatDateObjectToDateString(this.opinionLimitDate)))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(f_,!0),n.Xc(m_,!0)),2&t&&(n.yc(i=n.ec())&&(e.noteEditor=i.first),n.yc(i=n.ec())&&(e.appAvisWorkflow=i.first))},decls:37,vars:34,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],["autosize","",2,"height","100%"],[2,"background","white","padding","10px"],["color","primary","class","highlight",4,"ngIf"],["class","alert-message alert-message-danger mailList","role","alert",4,"ngIf"],["appearance","outline",2,"cursor","pointer","margin-top","10px",3,"click"],["matInput","","readonly","","required","",2,"cursor","pointer",3,"ngModel","matDatepicker","placeholder","min","ngModelChange"],["matSuffix","",3,"for",4,"ngIf"],["picker",""],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click",4,"ngIf"],[3,"title","resIds","disableRestriction"],["noteEditor",""],[3,"adminMode","mode",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"],["role","alert",1,"alert-message","alert-message-danger","mailList"],[4,"ngFor","ngForOf"],["matSuffix","",3,"for"],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click"],["color","warn",1,"fa","fa-calendar-times"],[3,"adminMode","mode"],["appAvisWorkflow",""]],template:function(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,g_,2,0,"div",3),n.Wb(5,"mat-sidenav-container",4),n.Wb(6,"mat-sidenav-content",5),n.Wb(7,"div"),n.Qc(8),n.ic(9,"translate"),n.Oc(10,v_,3,3,"b",6),n.Oc(11,__,2,1,"b",6),n.Oc(12,y_,3,4,"b",6),n.Qc(13," ? "),n.Vb(),n.Oc(14,C_,6,4,"div",7),n.Wb(15,"mat-form-field",8),n.dc("click",(function(){return n.Dc(t),n.zc(23).open()})),n.Wb(16,"mat-label"),n.Qc(17),n.ic(18,"translate"),n.Vb(),n.Wb(19,"input",9),n.dc("ngModelChange",(function(t){return e.opinionLimitDate=t})),n.ic(20,"translate"),n.Vb(),n.Oc(21,O_,1,1,"mat-datepicker-toggle",10),n.Rb(22,"mat-datepicker",null,11),n.Oc(24,D_,3,3,"button",12),n.Vb(),n.Rb(25,"app-note-editor",13,14),n.ic(27,"translate"),n.Oc(28,w_,2,2,"app-avis-workflow",15),n.Vb(),n.Vb(),n.Vb(),n.Rb(29,"span",16),n.Wb(30,"div",17),n.Wb(31,"button",18),n.dc("click",(function(){return e.onSubmit()})),n.Qc(32),n.ic(33,"translate"),n.Vb(),n.Wb(34,"button",19),n.Qc(35),n.ic(36,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(23);n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(4),n.Sc(" ",n.jc(9,22,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(2),n.oc("ngIf",e.resourcesError.length>0),n.Db(3),n.Rc(n.jc(18,24,"lang.opinionLimitDate")),n.Db(2),n.oc("ngModel",e.opinionLimitDate)("matDatepicker",t)("placeholder",n.jc(20,26,"lang.chooseDate"))("min",e.today),n.Db(2),n.oc("ngIf",!e.opinionLimitDate),n.Db(3),n.oc("ngIf",e.opinionLimitDate),n.Db(1),n.oc("title",n.jc(27,28,"lang.addOpinionReason"))("resIds",e.data.resIds)("disableRestriction",!0),n.Db(3),n.oc("ngIf",1==e.data.resIds.length||!e.noResourceToProcess&&e.data.resIds.length>1),n.Db(3),n.oc("disabled",e.loading||!e.isValidAction()),n.Db(1),n.Rc(n.jc(33,30,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(36,32,"lang.cancel"))}},directives:[q.i,q.f,P.t,I.e,I.f,Y.c,Y.g,J.b,X.d,ae.h,X.F,X.u,X.x,ae.f,Du,q.c,k.b,q.d,V.c,P.s,ae.j,Y.j,S.a,Qv],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:2;overflow:hidden}.mailList[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{font-size:12px;max-height:100px;overflow:auto;padding-left:25px;padding-right:5px;padding-bottom:10px;margin-top:10px}.mailList[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;text-decoration:underline}.mailList[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{font-size:120%}.formType[_ngcontent-%COMP%]{align-items:center;display:flex;margin:10px;border-radius:4px;border:1px solid #ccc;position:relative;padding:10px}.formType-title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:-7px;left:10px;padding:0;margin:0;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-form-field-suffix{color:#f99830;font-size:15px;top:0}.formType[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.priceContent[_ngcontent-%COMP%]{align-items:center;width:100%}.priceContent[_ngcontent-%COMP%], .priceContent-label[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.priceContent-label[_ngcontent-%COMP%]{text-align:right;color:#135f7f;flex:1;padding-right:10px}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:90px!important}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.priceInfo[_ngcontent-%COMP%]{padding-right:20px;font-size:10px;opacity:.5;width:100%}.pjList[_ngcontent-%COMP%]{display:flex;width:100%;overflow:auto;flex-direction:column;background:#666}.pjList[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin:10px}"]}),t})();const k_=["noteEditor"];function S_(t,e){1&t&&(n.Wb(0,"div",17),n.Rb(1,"mat-spinner",18),n.Vb())}function I_(t,e){1&t&&(n.Wb(0,"b",19),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function P_(t,e){if(1&t&&(n.Wb(0,"b",19),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function V_(t,e){if(1&t&&(n.Wb(0,"b",19),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function R_(t,e){if(1&t&&(n.Rb(0,"div",20),n.ic(1,"translate")),2&t){const t=n.hc();n.oc("innerHTML","<b>"+t.ownerOpinion+"</b> "+n.jc(1,1,"lang.askOpinionUser")+" :<br/><br/>"+t.opinionContent,n.Ec)}}function j_(t,e){1&t&&(n.Rb(0,"div",20),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.askOpinion"),n.Ec)}function A_(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function W_(t,e){if(1&t&&(n.Wb(0,"div",21),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,A_,5,4,"li",22),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Sc(" ",n.jc(3,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.resourcesErrors)}}function T_(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function E_(t,e){if(1&t&&(n.Wb(0,"div",23),n.Wb(1,"ul",24),n.Oc(2,T_,5,4,"li",22),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.oc("ngForOf",t.resourcesWarnings)}}function F_(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field",25),n.Wb(1,"mat-label"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"input",26),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().opinionLimitDate=e})),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(2),n.Rc(n.jc(3,2,"lang.opinionLimitDate")),n.Db(2),n.oc("ngModel",t.opinionLimitDate)}}let L_=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.loading=!1,this.resourcesWarnings=[],this.resourcesErrors=[],this.noResourceToProcess=null,this.opinionLimitDate=null,this.ownerOpinion="",this.opinionContent=""}ngOnInit(){this.checkAvisParallel()}checkAvisParallel(){this.loading=!0,this.resourcesErrors=[],this.resourcesWarnings=[],this.http.post("../rest/resourcesList/users/"+this.data.userId+"/groups/"+this.data.groupId+"/baskets/"+this.data.basketId+"/actions/"+this.data.action.id+"/checkGiveParallelOpinion",{resources:this.data.resIds}).pipe(Object(mt.a)(t=>{this.functions.empty(t.resourcesInformations.warning)||(this.resourcesWarnings=t.resourcesInformations.warning),this.functions.empty(t.resourcesInformations.error)||(this.resourcesErrors=t.resourcesInformations.error,this.noResourceToProcess=this.resourcesErrors.length===this.data.resIds.length),this.noResourceToProcess||(this.ownerOpinion=t.resourcesInformations.success[0].avisUserAsk,this.opinionContent=t.resourcesInformations.success[0].note,this.opinionLimitDate=new Date(t.resourcesInformations.success[0].opinionLimitDate),this.opinionLimitDate=this.functions.formatDateObjectToDateString(this.opinionLimitDate))}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(),Object(c.a)(!1)))).subscribe()}onSubmit(){const t=this.data.resIds.filter(t=>-1===this.resourcesErrors.map(t=>t.res_id).indexOf(t));this.executeAction(t)}executeAction(t){const e=`[${this.translate.instant("lang.avisUserState")}] ${this.noteEditor.getNoteContent()}`;this.noteEditor.setNoteContent(e),this.http.put(this.data.processActionRoute,{resources:t,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(e=>{e||this.dialogRef.close(t),e&&null!=e.errors&&this.notify.error(e.errors)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isValidAction(){return!this.noResourceToProcess&&!this.functions.empty(this.noteEditor.getNoteContent())}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(k_,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:30,vars:26,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],["autosize","",2,"height","100%"],[2,"background","white","padding","10px"],["color","primary","class","highlight",4,"ngIf"],["class","alert-message alert-message-info","role","alert","style","margin-top: 30px;",3,"innerHTML",4,"ngIf"],["class","alert-message alert-message-danger mailList","role","alert",4,"ngIf"],["class","alert-message alert-message-info mailList","role","alert",4,"ngIf"],["appearance","outline","style","cursor:pointer;margin-top: 10px;",4,"ngIf"],[3,"title","resIds","disableRestriction"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","30px",3,"innerHTML"],["role","alert",1,"alert-message","alert-message-danger","mailList"],[4,"ngFor","ngForOf"],["role","alert",1,"alert-message","alert-message-info","mailList"],[2,"margin","0","padding-bottom","0px"],["appearance","outline",2,"cursor","pointer","margin-top","10px"],["matInput","","readonly","","disabled","",2,"cursor","pointer",3,"ngModel","ngModelChange"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,S_,2,0,"div",3),n.Wb(5,"mat-sidenav-container",4),n.Wb(6,"mat-sidenav-content",5),n.Wb(7,"div"),n.Qc(8),n.ic(9,"translate"),n.Oc(10,I_,3,3,"b",6),n.Oc(11,P_,2,1,"b",6),n.Oc(12,V_,3,4,"b",6),n.Qc(13," ? "),n.Vb(),n.Oc(14,R_,2,3,"div",7),n.Oc(15,j_,2,3,"div",7),n.Oc(16,W_,6,4,"div",8),n.Oc(17,E_,3,1,"div",9),n.Oc(18,F_,5,4,"mat-form-field",10),n.Rb(19,"app-note-editor",11,12),n.ic(21,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Rb(22,"span",13),n.Wb(23,"div",14),n.Wb(24,"button",15),n.dc("click",(function(){return e.onSubmit()})),n.Qc(25),n.ic(26,"translate"),n.Vb(),n.Wb(27,"button",16),n.Qc(28),n.ic(29,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(4),n.Sc(" ",n.jc(9,18,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(2),n.oc("ngIf",1==e.data.resIds.length&&!e.noResourceToProcess),n.Db(1),n.oc("ngIf",e.data.resIds.length>1&&!e.noResourceToProcess),n.Db(1),n.oc("ngIf",e.resourcesErrors.length>0),n.Db(1),n.oc("ngIf",e.resourcesWarnings.length>0),n.Db(1),n.oc("ngIf",1===e.data.resIds.length&&!e.noResourceToProcess),n.Db(1),n.oc("title",n.jc(21,20,"lang.addOpinion"))("resIds",e.data.resIds)("disableRestriction",!0),n.Db(5),n.oc("disabled",e.loading||!e.isValidAction()),n.Db(1),n.Rc(n.jc(26,22,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(29,24,"lang.cancel")))},directives:[q.i,q.f,P.t,I.e,I.f,Du,q.c,k.b,q.d,V.c,P.s,Y.c,Y.g,J.b,X.d,X.u,X.x],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:2;overflow:hidden}.mailList[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{font-size:12px;max-height:100px;overflow:auto;padding-left:25px;padding-right:5px;padding-bottom:10px;margin-top:10px}.mailList[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;text-decoration:underline}.mailList[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{font-size:120%}.formType[_ngcontent-%COMP%]{align-items:center;display:flex;margin:10px;border-radius:4px;border:1px solid #ccc;position:relative;padding:10px}.formType-title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:-7px;left:10px;padding:0;margin:0;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-form-field-suffix{color:#f99830;font-size:15px;top:0}.formType[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.priceContent[_ngcontent-%COMP%]{align-items:center;width:100%}.priceContent[_ngcontent-%COMP%], .priceContent-label[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.priceContent-label[_ngcontent-%COMP%]{text-align:right;color:#135f7f;flex:1;padding-right:10px}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:90px!important}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.priceInfo[_ngcontent-%COMP%]{padding-right:20px;font-size:10px;opacity:.5;width:100%}.pjList[_ngcontent-%COMP%]{display:flex;width:100%;overflow:auto;flex-direction:column;background:#666}.pjList[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin:10px}"]}),t})();const Q_=["noteEditor"],N_=["appAvisWorkflow"];function z_(t,e){1&t&&(n.Wb(0,"div",16),n.Rb(1,"mat-spinner",17),n.Vb())}function B_(t,e){1&t&&(n.Wb(0,"b",18),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function U_(t,e){if(1&t&&(n.Wb(0,"b",18),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function $_(t,e){if(1&t&&(n.Wb(0,"b",18),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function H_(t,e){if(1&t&&(n.Rb(0,"div",19),n.ic(1,"translate")),2&t){const t=n.hc();n.oc("innerHTML",n.jc(1,1,"lang.validateAvisParallelSingle")+" <b>"+t.ownerOpinion+"</b>",n.Ec)}}function G_(t,e){1&t&&(n.Rb(0,"div",19),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.validateAvisParallel"),n.Ec)}function X_(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function q_(t,e){if(1&t&&(n.Wb(0,"div",20),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,X_,5,4,"li",21),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Sc(" ",n.jc(3,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.resourcesErrors)}}function K_(t,e){if(1&t&&n.Rb(0,"mat-datepicker-toggle",27),2&t){n.hc();const t=n.zc(8);n.oc("for",t)}}function Y_(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",28),n.dc("click",(function(e){n.Dc(t);const i=n.hc(2);return e.stopPropagation(),i.opinionLimitDate=null})),n.ic(1,"translate"),n.Rb(2,"mat-icon",29),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.eraseValue"))}function J_(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field",22),n.dc("click",(function(){return n.Dc(t),n.zc(8).open()})),n.Wb(1,"mat-label"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"input",23),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().opinionLimitDate=e})),n.ic(5,"translate"),n.Vb(),n.Oc(6,K_,1,1,"mat-datepicker-toggle",24),n.Rb(7,"mat-datepicker",null,25),n.Oc(9,Y_,3,3,"button",26),n.Vb()}if(2&t){const t=n.zc(8),e=n.hc();n.Db(2),n.Rc(n.jc(3,7,"lang.opinionLimitDate")),n.Db(2),n.oc("ngModel",e.opinionLimitDate)("matDatepicker",t)("placeholder",n.jc(5,9,"lang.chooseDate"))("min",e.today),n.Db(2),n.oc("ngIf",!e.opinionLimitDate),n.Db(3),n.oc("ngIf",e.opinionLimitDate)}}function Z_(t,e){if(1&t&&(n.Rb(0,"app-note-editor",30,31),n.ic(2,"translate")),2&t){const t=n.hc();n.oc("title",n.jc(2,4,"lang.addOpinionReason"))("content",t.opinionContent)("resIds",t.data.resIds)("disableRestriction",!0)}}function ty(t,e){1&t&&n.Rb(0,"app-avis-workflow",32,33),2&t&&n.oc("adminMode",!0)("mode","parallel")}let ey=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.headerService=o,this.loading=!1,this.resourcesWarnings=[],this.resourcesErrors=[],this.ownerOpinion="",this.opinionContent="",this.noResourceToProcess=null,this.opinionLimitDate=null,this.today=new Date,this.availableRoles=[]}ngOnInit(){this.checkAvisCircuit()}checkAvisCircuit(){this.loading=!0,this.resourcesErrors=[],this.resourcesWarnings=[],this.http.post("../rest/resourcesList/users/"+this.data.userId+"/groups/"+this.data.groupId+"/baskets/"+this.data.basketId+"/actions/"+this.data.action.id+"/checkValidateParallelOpinion",{resources:this.data.resIds}).pipe(Object(mt.a)(t=>{this.functions.empty(t.resourcesInformations.warning)||(this.resourcesWarnings=t.resourcesInformations.warning),this.functions.empty(t.resourcesInformations.error)||(this.resourcesErrors=t.resourcesInformations.error,this.noResourceToProcess=this.resourcesErrors.length===this.data.resIds.length),this.noResourceToProcess||(this.ownerOpinion=t.resourcesInformations.success[0].avisUserAsk,this.opinionContent=t.resourcesInformations.success[0].note,this.opinionLimitDate=new Date(t.resourcesInformations.success[0].opinionLimitDate))}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(),Object(c.a)(!1)))).subscribe()}ngAfterViewInit(){return Object(r.a)(this,void 0,void 0,(function*(){1===this.data.resIds.length&&(yield this.appAvisWorkflow.loadParallelWorkflow(this.data.resIds[0]))}))}onSubmit(){return Object(r.a)(this,void 0,void 0,(function*(){const t=this.data.resIds.filter(t=>-1===this.resourcesErrors.map(t=>t.res_id).indexOf(t));this.executeAction(t)}))}executeAction(t){const e=`[${this.translate.instant("lang.avisUserAsk").toUpperCase()}] ${this.noteEditor.getNoteContent()} \u2190 ${this.translate.instant("lang.validateBy")} ${this.headerService.user.firstname} ${this.headerService.user.lastname}`;this.noteEditor.setNoteContent(e),this.http.put(this.data.processActionRoute,{resources:t,data:{note:this.noteEditor.getNote(),opinionLimitDate:this.functions.formatDateObjectToDateString(this.opinionLimitDate,!0),opinionCircuit:this.appAvisWorkflow.getWorkflow()}}).pipe(Object(mt.a)(e=>{e||this.dialogRef.close(t),e&&null!=e.errors&&this.notify.error(e.errors)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isValidAction(){return 1===this.data.resIds.length?!(this.noResourceToProcess||void 0===this.noteEditor||void 0===this.appAvisWorkflow||this.appAvisWorkflow.emptyWorkflow()||this.appAvisWorkflow.workflowEnd()||this.functions.empty(this.noteEditor.getNoteContent())||this.functions.empty(this.functions.formatDateObjectToDateString(this.opinionLimitDate))):!this.noResourceToProcess}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a),n.Qb(y.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Xc(Q_,!0),n.Xc(N_,!0)),2&t&&(n.yc(i=n.ec())&&(e.noteEditor=i.first),n.yc(i=n.ec())&&(e.appAvisWorkflow=i.first))},decls:28,vars:22,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],["autosize","",2,"height","100%"],[2,"background","white","padding","10px"],["color","primary","class","highlight",4,"ngIf"],["class","alert-message alert-message-info","role","alert","style","margin-top: 30px;",3,"innerHTML",4,"ngIf"],["class","alert-message alert-message-danger mailList","role","alert",4,"ngIf"],["appearance","outline","style","cursor:pointer;margin-top: 10px;",3,"click",4,"ngIf"],[3,"title","content","resIds","disableRestriction",4,"ngIf"],[3,"adminMode","mode",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","30px",3,"innerHTML"],["role","alert",1,"alert-message","alert-message-danger","mailList"],[4,"ngFor","ngForOf"],["appearance","outline",2,"cursor","pointer","margin-top","10px",3,"click"],["matInput","","readonly","","required","",2,"cursor","pointer",3,"ngModel","matDatepicker","placeholder","min","ngModelChange"],["matSuffix","",3,"for",4,"ngIf"],["picker",""],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click",4,"ngIf"],["matSuffix","",3,"for"],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click"],["color","warn",1,"fa","fa-calendar-times"],[3,"title","content","resIds","disableRestriction"],["noteEditor",""],[3,"adminMode","mode"],["appAvisWorkflow",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,z_,2,0,"div",3),n.Wb(5,"mat-sidenav-container",4),n.Wb(6,"mat-sidenav-content",5),n.Wb(7,"div"),n.Qc(8),n.ic(9,"translate"),n.Oc(10,B_,3,3,"b",6),n.Oc(11,U_,2,1,"b",6),n.Oc(12,$_,3,4,"b",6),n.Qc(13," ? "),n.Vb(),n.Oc(14,H_,2,3,"div",7),n.Oc(15,G_,2,3,"div",7),n.Oc(16,q_,6,4,"div",8),n.Oc(17,J_,10,11,"mat-form-field",9),n.Oc(18,Z_,3,6,"app-note-editor",10),n.Oc(19,ty,2,2,"app-avis-workflow",11),n.Vb(),n.Vb(),n.Vb(),n.Rb(20,"span",12),n.Wb(21,"div",13),n.Wb(22,"button",14),n.dc("click",(function(){return e.onSubmit()})),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Wb(25,"button",15),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(4),n.Sc(" ",n.jc(9,16,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(2),n.oc("ngIf",1==e.data.resIds.length&&!e.noResourceToProcess),n.Db(1),n.oc("ngIf",e.data.resIds.length>1&&!e.noResourceToProcess),n.Db(1),n.oc("ngIf",e.resourcesErrors.length>0),n.Db(1),n.oc("ngIf",1===e.data.resIds.length&&!e.noResourceToProcess),n.Db(1),n.oc("ngIf",1===e.data.resIds.length&&!e.noResourceToProcess),n.Db(1),n.oc("ngIf",1===e.data.resIds.length&&!e.noResourceToProcess),n.Db(3),n.oc("disabled",e.loading||!e.isValidAction()),n.Db(1),n.Rc(n.jc(24,18,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(27,20,"lang.cancel")))},directives:[q.i,q.f,P.t,I.e,I.f,q.c,k.b,q.d,V.c,P.s,Y.c,Y.g,J.b,X.d,ae.h,X.F,X.u,X.x,ae.f,ae.j,Y.j,S.a,Du,Qv],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:2;overflow:hidden}.mailList[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{font-size:12px;max-height:100px;overflow:auto;padding-left:25px;padding-right:5px;padding-bottom:10px;margin-top:10px}.mailList[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;text-decoration:underline}.mailList[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{font-size:120%}.formType[_ngcontent-%COMP%]{align-items:center;display:flex;margin:10px;border-radius:4px;border:1px solid #ccc;position:relative;padding:10px}.formType-title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:-7px;left:10px;padding:0;margin:0;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-form-field-suffix{color:#f99830;font-size:15px;top:0}.formType[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.priceContent[_ngcontent-%COMP%]{align-items:center;width:100%}.priceContent[_ngcontent-%COMP%], .priceContent-label[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.priceContent-label[_ngcontent-%COMP%]{text-align:right;color:#135f7f;flex:1;padding-right:10px}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:90px!important}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.priceInfo[_ngcontent-%COMP%]{padding-right:20px;font-size:10px;opacity:.5;width:100%}.pjList[_ngcontent-%COMP%]{display:flex;width:100%;overflow:auto;flex-direction:column;background:#666}.pjList[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin:10px}"]}),t})();const iy=["noteEditor"],ny=["appSearchResultList"];function ay(t,e){1&t&&(n.Wb(0,"div",10),n.Rb(1,"mat-spinner",11),n.Vb())}function sy(t,e){1&t&&(n.Wb(0,"b",16),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function oy(t,e){if(1&t&&(n.Wb(0,"b",16),n.Qc(1),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Rc(t.data.resource.chrono)}}function ry(t,e){if(1&t&&(n.Wb(0,"b",16),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function cy(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function ly(t,e){if(1&t&&(n.Wb(0,"div",17),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,cy,5,4,"li",18),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.Sc(" ",n.jc(3,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.resourcesErrors)}}function dy(t,e){if(1&t&&(n.Wb(0,"div",12),n.Rb(1,"div",19),n.ic(2,"translate"),n.ic(3,"translate"),n.ic(4,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("innerHTML",1===t.data.resIds.length?n.jc(2,1,"lang.reconcileMsg"):n.jc(3,3,"lang.reconcileMsg")+"<br/>"+n.jc(4,5,"lang.reconcileMsg2"),n.Ec)}}const hy=function(){return["chrono","subject","recipients","senders"]};function uy(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",12),n.Wb(1,"div",20),n.Wb(2,"app-criteria-tool",21,22),n.dc("searchUrlGenerated",(function(e){return n.Dc(t),n.zc(6).launchSearch(e)})),n.Vb(),n.Rb(4,"div",23),n.Vb(),n.Rb(5,"app-search-result-list",24,25),n.Vb()}if(2&t){const t=n.zc(3);n.Db(2),n.oc("openedPanel",!0)("defaultCriteria",n.uc(7,hy)),n.Db(3),n.oc("actionMode",!1)("hideFilter",!0)("appCriteriaTool",t)("standalone",!0)("singleSelection",!0)}}function py(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div",12),n.Qc(2),n.ic(3,"translate"),n.Oc(4,sy,3,3,"b",13),n.Oc(5,oy,2,1,"b",13),n.Oc(6,ry,3,4,"b",13),n.Qc(7," ? "),n.Vb(),n.Wb(8,"div",12),n.Oc(9,ly,6,4,"div",14),n.Vb(),n.Oc(10,dy,5,7,"div",15),n.Oc(11,uy,7,8,"div",15),n.Tb()),2&t){const t=n.hc();n.Db(2),n.Sc(" ",n.jc(3,7,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===t.data.resIds.length),n.Db(1),n.oc("ngIf",1===t.data.resIds.length),n.Db(1),n.oc("ngIf",t.data.resIds.length>1),n.Db(3),n.oc("ngIf",t.resourcesErrors.length>0),n.Db(1),n.oc("ngIf",!t.noResourceToProcess),n.Db(1),n.oc("ngIf",!t.noResourceToProcess)}}let by=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.loading=!1,this.searchUrl="",this.resourcesErrors=[],this.selectedRes=[],this.noResourceToProcess=!1}ngOnInit(){this.checkReconcile()}onSubmit(){this.loading=!0,this.executeAction()}checkReconcile(){return this.resourcesErrors=[],new Promise((t,e)=>{this.http.post("../rest/resourcesList/users/"+this.data.userId+"/groups/"+this.data.groupId+"/baskets/"+this.data.basketId+"/actions/"+this.data.action.id+"/checkReconcile",{resources:this.data.resIds}).subscribe(e=>{this.functions.empty(e.resourcesInformations.error)||(this.resourcesErrors=e.resourcesInformations.error),e.resourcesInformations.success&&e.resourcesInformations.success.forEach(t=>{this.selectedRes.push(t.res_id)}),this.noResourceToProcess=this.resourcesErrors.length===this.data.resIds.length,t(!0)},t=>{this.notify.handleSoftErrors(t),this.dialogRef.close()})})}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.selectedRes,data:{resId:this.appSearchResultList.getSelectedResources()[0]}}).pipe(Object(mt.a)(t=>{null===t||this.functions.empty(t.errors)?this.dialogRef.close(this.selectedRes):this.notify.error(t.errors)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isSelectedResources(){return void 0!==this.appSearchResultList&&this.appSearchResultList.getSelectedResources().filter(t=>-1===this.data.resIds.indexOf(t)).length>0}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Xc(iy,!0),n.Xc(ny,!0)),2&t&&(n.yc(i=n.ec())&&(e.noteEditor=i.first),n.yc(i=n.ec())&&(e.appSearchResultList=i.first))},decls:15,vars:11,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],["class","alert-message alert-message-danger mailList","style","max-width: 100%;",4,"ngIf"],["class","col-md-12",4,"ngIf"],["color","primary",1,"highlight"],[1,"alert-message","alert-message-danger","mailList",2,"max-width","100%"],[4,"ngFor","ngForOf"],["role","alert",1,"alert-message","alert-message-info",2,"max-width","100%",3,"innerHTML"],[1,"bg-primary"],[3,"openedPanel","defaultCriteria","searchUrlGenerated"],["appCriteriaTool",""],["id","toolTemplate",2,"padding-top","10px"],[3,"actionMode","hideFilter","appCriteriaTool","standalone","singleSelection"],["appSearchResultList",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,ay,2,0,"div",3),n.Wb(5,"div",4),n.Oc(6,py,12,9,"ng-container",5),n.Vb(),n.Vb(),n.Rb(7,"span",6),n.Wb(8,"div",7),n.Wb(9,"button",8),n.dc("click",(function(){return e.onSubmit()})),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Wb(12,"button",9),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(2),n.oc("ngIf",e.data.resIds.length>0),n.Db(3),n.oc("disabled",e.loading||!e.isSelectedResources()||e.noResourceToProcess),n.Db(1),n.Rc(n.jc(11,7,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(14,9,"lang.cancel")))},styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.bg-primary[_ngcontent-%COMP%]{padding:10px;background:#135f7f}"]}),t})();var fy=i("FvrZ"),my=i("2Vo4"),gy=i("VRyK"),vy=i("8yBR");function _y(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tree-node",3),n.Wb(1,"button",4),n.Rb(2,"mat-icon",5),n.Vb(),n.Wb(3,"span",6),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc();return a.toggleNode(a.getData(i.item))})),n.Rb(4,"i"),n.Qc(5),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc();n.Db(3),n.Ib("node-selected",i.getData(t.item).selected),n.Db(1),n.Fb(i.getData(t.item).icon),n.Db(1),n.Sc("\xa0",i.getData(t.item).text,"")}}function yy(t,e){1&t&&n.Rb(0,"i",10),2&t&&n.Lc("left",25*e.$implicit,"px")}function xy(t,e){1&t&&n.Rb(0,"mat-progress-bar",11)}function Cy(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tree-node",3),n.Oc(1,yy,1,2,"i",7),n.Wb(2,"button",8),n.Rb(3,"mat-icon"),n.Vb(),n.Wb(4,"span",6),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc();return a.toggleNode(a.getData(i.item))})),n.Rb(5,"i"),n.Qc(6),n.Vb(),n.Oc(7,xy,1,0,"mat-progress-bar",9),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc();n.Db(1),n.oc("ngForOf",i.getIteration(t.level)),n.Db(1),n.Eb("aria-label","toggle "+t.filename),n.Db(1),n.Gb("mat-icon-rtl-mirror ",i.treeControl.isExpanded(t)?"maarch-tree-collapse":"maarch-tree-expand",""),n.Db(1),n.Ib("node-selected",i.getData(t.item).selected),n.Db(1),n.Fb(i.getData(t.item).icon),n.Db(1),n.Sc("\xa0",i.getData(t.item).text," "),n.Db(1),n.oc("ngIf",t.isLoading)}}class Oy{constructor(t,e=1,i=!1,n=!1){this.item=t,this.level=e,this.expandable=i,this.isLoading=n}}let Dy=(()=>{class t{constructor(){this.dataMap=new Map([]),this.rootLevelNodes=[]}initialData(){return this.rootLevelNodes.map(t=>new Oy(t,0,!0))}setData(t){return this.dataMap.set(t.id,t.childrens)}setRootNode(t){this.rootLevelNodes=t}getChildren(t){return this.dataMap.get(t)}isExpandable(t){return this.dataMap.has(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();class wy{constructor(t,e,i,n,a){this._treeControl=t,this._database=e,this.rawData=i,this.childrenRoute=n,this.httpClient=a,this.dataChange=new my.a([])}get data(){return this.dataChange.value}set data(t){this._treeControl.dataNodes=t,this.dataChange.next(t)}connect(t){return this._treeControl.expansionModel.changed.subscribe(t=>{(t.added||t.removed)&&this.handleTreeControl(t)}),Object(gy.a)(t.viewChange,this.dataChange).pipe(Object(l.a)(()=>this.data))}disconnect(t){}handleTreeControl(t){t.added&&t.added.forEach(t=>this.toggleNode(t,!0)),t.removed&&t.removed.slice().reverse().forEach(t=>this.toggleNode(t,!1))}toggleNode(t,e){let i=this._database.getChildren(t.item),n=this.data.indexOf(t);if(this.rawData[n].children)if(t.isLoading=!0,e)if(void 0===i)this.httpClient.get(this.childrenRoute.replace("__node",t.item)).pipe(Object(d.a)(t=>t.length>0),Object(mt.a)(e=>{e.forEach(t=>{this.rawData.push(t)}),this.rawData.map(t=>t.id),this.rawData.forEach(t=>{const e={id:t.id,childrens:this.rawData.filter(e=>e.parent===t.id).map(t=>t.id)};this.rawData.filter(e=>e.parent===t.id).length>0&&this._database.setData(e)}),i=this._database.getChildren(t.item),n=this.data.indexOf(t);const a=i.map(e=>new Oy(e,t.level+1,this._database.isExpandable(e)));this.data.splice(n+1,0,...a),this.dataChange.next(this.data)}),Object(Xt.a)(()=>t.isLoading=!1)).subscribe();else{const e=i.map(e=>new Oy(e,t.level+1,this._database.isExpandable(e)));this.data.splice(n+1,0,...e),this.dataChange.next(this.data),t.isLoading=!1}else{let e=0;for(let i=n+1;i<this.data.length&&this.data[i].level>t.level;i++,e++);this.data.splice(n+1,e),this.dataChange.next(this.data),t.isLoading=!1}}}let My=(()=>{class t{constructor(t,e){this.database=t,this.httpClient=e,this.rawData=[],this.childrenRoute="",this.multiple=!1,this.afterSelectNode=new n.o,this.afterDeselectNode=new n.o,this.getLevel=t=>t.level,this.isExpandable=t=>t.expandable,this.hasChild=(t,e)=>this.getData(e.item).children}ngOnInit(){this.treeControl=new fy.j(this.getLevel,this.isExpandable),this.dataSource=new wy(this.treeControl,this.database,this.rawData,this.childrenRoute,this.httpClient),this.initTree()}initTree(){this.rawData.forEach(t=>{const e={id:t.id,childrens:this.rawData.filter(e=>e.parent===t.id).map(t=>t.id)};this.rawData.filter(e=>e.parent===t.id).length>0&&this.database.setData(e)}),this.database.setRootNode(this.rawData.filter(t=>"#"===t.parent).map(t=>t.id)),this.dataSource.data=this.database.initialData()}getData(t){return this.rawData.filter(e=>e.id===t)[0]}toggleNode(t){t.selected?this.afterDeselectNode.emit(t):this.afterSelectNode.emit(t),this.multiple?t.selected=!t.selected:this.rawData.forEach(e=>{e.selected=e.id===t.id&&!t.selected})}getIteration(t){return Array(t).fill(0).map((t,e)=>e)}getTreeData(){return this.rawData}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(Dy),n.Qb(v.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-maaarch-tree"]],inputs:{rawData:"rawData",childrenRoute:"childrenRoute",multiple:"multiple"},outputs:{afterSelectNode:"afterSelectNode",afterDeselectNode:"afterDeselectNode"},features:[n.Cb([Dy])],decls:3,vars:3,consts:[[3,"dataSource","treeControl"],["matTreeNodePadding","","matTreeNodePaddingIndent","25px","style","background-size: 320px 96px;background-image: url(32px.png); background-position: -288px -5px;background-repeat: repeat-y;",4,"matTreeNodeDef"],["matTreeNodePadding","","matTreeNodePaddingIndent","25px","style","background-size: 320px 96px;background-image: url(32px.png); background-position: -288px -5px;background-repeat: repeat-y;",4,"matTreeNodeDef","matTreeNodeDefWhen"],["matTreeNodePadding","","matTreeNodePaddingIndent","25px",2,"background-size","320px 96px","background-image","url(32px.png)","background-position","-288px -5px","background-repeat","repeat-y"],["mat-icon-button","","disabled","",2,"width","32px","height","32px","background-size","320px 96px","background-image","url('32px.png')","background-position","-288px -5px","background-repeat","repeat-y"],[1,"maarch-tree-node"],[1,"node-content",3,"click"],["style","background-size: 320px 96px;background-image: url(32px.png); background-position: -288px -5px;background-repeat: repeat-y;width: 32px;height: 32px;position: absolute;",3,"left",4,"ngFor","ngForOf"],["type","button","mat-icon-button","","matTreeNodeToggle","",2,"width","32px","height","32px","background-size","320px 96px","background-image","url('32px.png')","background-position","-288px -5px","background-repeat","repeat-y"],["mode","indeterminate","class","example-tree-progress-bar",4,"ngIf"],[2,"background-size","320px 96px","background-image","url(32px.png)","background-position","-288px -5px","background-repeat","repeat-y","width","32px","height","32px","position","absolute"],["mode","indeterminate",1,"example-tree-progress-bar"]],template:function(t,e){1&t&&(n.Wb(0,"mat-tree",0),n.Oc(1,_y,6,5,"mat-tree-node",1),n.Oc(2,Cy,8,11,"mat-tree-node",2),n.Vb()),2&t&&(n.oc("dataSource",e.dataSource)("treeControl",e.treeControl),n.Db(2),n.oc("matTreeNodeDefWhen",e.hasChild))},directives:[vy.b,vy.h,vy.g,vy.j,k.b,S.a,P.s,vy.k,P.t,ni.a],styles:[".example-tree-progress-bar[_ngcontent-%COMP%]{margin-left:30px}.maarch-tree-expand[_ngcontent-%COMP%]{background-position:-101px -8px}.maarch-tree-collapse[_ngcontent-%COMP%], .maarch-tree-expand[_ngcontent-%COMP%]{background-size:320px 96px;background-image:url(32px.dcd8942fa7a2e261368d.png);width:22px;height:22px;line-height:22px;display:inline-block}.maarch-tree-collapse[_ngcontent-%COMP%]{background-position:-133px -8px}.maarch-tree-node[_ngcontent-%COMP%]{background-size:320px 96px;background-image:url(32px.dcd8942fa7a2e261368d.png);width:22px;height:22px;line-height:22px;display:inline-block;background-position:-69px -8px}.mat-tree[_ngcontent-%COMP%]{position:relative}.mat-tree-node[_ngcontent-%COMP%]{font-family:Titillium Web,sans-serif,Arial;min-height:32px;line-height:32px;min-width:32px;height:32px}.mat-tree-node[_ngcontent-%COMP%] button[disabled][_ngcontent-%COMP%]{opacity:1}.node-content[_ngcontent-%COMP%]{padding-left:5px;padding-right:5px;cursor:pointer;transition:all .3s;border-radius:5px;height:25px;display:flex;align-items:center;white-space:pre}.node-content[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#135f7f}.node-content[_ngcontent-%COMP%]:not(.node-selected):hover{background-color:hsla(0,0%,40%,.10980392156862745);transition:all .3s}.node-selected[_ngcontent-%COMP%]{background-color:#135f7f;color:#fff;transition:all .3s}.node-selected[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fff}"]}),t})();const ky=["noteEditor"],Sy=["maarchTree"];function Iy(t,e){1&t&&(n.Wb(0,"div",22),n.Rb(1,"mat-spinner",23),n.Vb())}function Py(t,e){1&t&&(n.Wb(0,"b",24),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function Vy(t,e){if(1&t&&(n.Wb(0,"b",24),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function Ry(t,e){if(1&t&&(n.Wb(0,"b",24),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function jy(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function Ay(t,e){if(1&t&&(n.Wb(0,"div",25),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,jy,5,4,"li",26),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Sc(" ",n.jc(3,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.resourcesErrors)}}function Wy(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-maaarch-tree",27,28),n.dc("afterSelectNode",(function(e){return n.Dc(t),n.hc().selectFolder(e)})),n.Vb()}if(2&t){const t=n.hc();n.oc("childrenRoute","../rest/alfresco/folders/__node/children")("rawData",t.alfrescoFolders)}}let Ty=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.loading=!1,this.alfrescoFolders=[],this.searchFolder=new X.i,this.selectedFolder=null,this.selectedFolderName=null,this.resourcesErrors=[],this.noResourceToProcess=null}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.loading=!0,yield this.checkAlfresco(),this.loading=!1,this.getRootFolders(),this.searchFolder.valueChanges.pipe(Object(pt.a)(300),Object(mt.a)(t=>Object(r.a)(this,void 0,void 0,(function*(){this.selectedFolder=null,this.selectedFolderName=null,0===t.length&&(yield this.getRootFolders(),this.refreshTree())}))),Object(d.a)(t=>t.length>2),Object(ft.a)(t=>this.http.get("../rest/alfresco/autocomplete/folders",{params:{search:t}})),Object(mt.a)(t=>{this.alfrescoFolders=t,this.refreshTree()})).subscribe()}))}checkAlfresco(){return this.resourcesErrors=[],new Promise((t,e)=>{this.http.post("../rest/resourcesList/users/"+this.data.userId+"/groups/"+this.data.groupId+"/baskets/"+this.data.basketId+"/actions/"+this.data.action.id+"/checkSendAlfresco",{resources:this.data.resIds}).subscribe(e=>{this.functions.empty(e.fatalError)?this.functions.empty(e.resourcesInformations.error)||(this.resourcesErrors=e.resourcesInformations.error,this.noResourceToProcess=this.resourcesErrors.length===this.data.resIds.length):(this.notify.error(this.translate.instant("lang."+e.reason)),this.dialogRef.close()),t(!0)},t=>{this.notify.handleSoftErrors(t),this.dialogRef.close()})})}refreshTree(){const t=this.alfrescoFolders;this.alfrescoFolders=[],setTimeout(()=>{this.alfrescoFolders=t},200)}getRootFolders(){return new Promise((t,e)=>{this.http.get("../rest/alfresco/rootFolders").pipe(Object(mt.a)(e=>{this.alfrescoFolders=e,t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}selectFolder(t){this.selectedFolder=t.id,this.selectedFolderName=this.getNameWithParents(t.text,t.parent)}onSubmit(){this.loading=!0,this.data.resIds.length>0&&this.executeAction()}executeAction(){const t=this.data.resIds.filter(t=>-1===this.resourcesErrors.map(t=>t.res_id).indexOf(t));this.http.put(this.data.processActionRoute,{resources:t,note:this.noteEditor.getNoteContent(),data:{folderId:this.selectedFolder,folderName:this.selectedFolderName}}).pipe(Object(mt.a)(t=>{t||this.dialogRef.close("success"),t&&null!=t.errors&&this.notify.error(t.errors)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}isValidAction(){return null!==this.selectedFolder&&!this.noResourceToProcess}getNameWithParents(t,e){return"#"===e||this.maarchTree.getTreeData().forEach(i=>{i.id==e&&(t=i.text+"/"+t,"#"!==i.parent&&(t=this.getNameWithParents(t,i.parent)))}),t}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(ky,!0),n.Xc(Sy,!0)),2&t&&(n.yc(i=n.ec())&&(e.noteEditor=i.first),n.yc(i=n.ec())&&(e.maarchTree=i.first))},decls:33,vars:21,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row",2,"margin","0"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],["class","alert-message alert-message-danger mailList","role","alert",4,"ngIf"],[2,"clear","both"],["appearance","outline","floatLabel","never",1,"smallInput"],["color","primary","matPrefix","",1,"fa","fa-search"],["type","text","id","autoCompleteInput","matInput","",3,"placeholder","formControl"],["autoCompleteInput",""],[3,"childrenRoute","rawData","afterSelectNode",4,"ngIf"],["id","jstreeAlfresco"],[1,"col-md-12",2,"padding-top","10px"],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"],["role","alert",1,"alert-message","alert-message-danger","mailList"],[4,"ngFor","ngForOf"],[3,"childrenRoute","rawData","afterSelectNode"],["maarchTree",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,Iy,2,0,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Qc(7),n.ic(8,"translate"),n.Oc(9,Py,3,3,"b",6),n.Oc(10,Vy,2,1,"b",6),n.Oc(11,Ry,3,4,"b",6),n.Qc(12," ? "),n.Vb(),n.Rb(13,"br"),n.Oc(14,Ay,6,4,"div",7),n.Wb(15,"div",8),n.Wb(16,"mat-form-field",9),n.Rb(17,"mat-icon",10),n.Rb(18,"input",11,12),n.Vb(),n.Oc(20,Wy,2,2,"app-maaarch-tree",13),n.Rb(21,"div",14),n.Vb(),n.Wb(22,"div",15),n.Rb(23,"app-note-editor",16,17),n.Vb(),n.Vb(),n.Vb(),n.Rb(25,"span",18),n.Wb(26,"div",19),n.Wb(27,"button",20),n.dc("click",(function(){return e.onSubmit()})),n.Qc(28),n.ic(29,"translate"),n.Vb(),n.Wb(30,"button",21),n.Qc(31),n.ic(32,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(3),n.Sc(" ",n.jc(8,15,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(3),n.oc("ngIf",e.resourcesErrors.length>0),n.Db(4),n.oc("placeholder","Recherche un dossier")("formControl",e.searchFolder),n.Db(2),n.oc("ngIf",e.alfrescoFolders.length>0),n.Db(3),n.oc("resIds",e.data.resIds),n.Db(4),n.oc("disabled",e.loading||!e.isValidAction()),n.Db(1),n.Rc(n.jc(29,17,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(32,19,"lang.cancel")))},directives:[q.i,q.f,P.t,Y.c,S.a,Y.i,J.b,X.d,X.u,X.j,Du,q.c,k.b,q.d,V.c,P.s,My],pipes:[g.d],styles:[".loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:2;overflow:hidden}.smallInput[_ngcontent-%COMP%]{font-size:9px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-flex{display:flex;align-items:center}.smallInput[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{height:auto}"]}),t})();const Ey=["noteEditor"];function Fy(t,e){1&t&&(n.Wb(0,"div",13),n.Rb(1,"mat-spinner",14),n.Vb())}function Ly(t,e){1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function Qy(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function Ny(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}let zy=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.loading=!1}ngOnInit(){}onSubmit(){this.loading=!0,0===this.data.resIds.length?this.indexDocumentAndExecuteAction():this.executeAction()}indexDocumentAndExecuteAction(){this.http.post("../rest/resources",this.data.resource).pipe(Object(mt.a)(t=>{this.data.resIds=[t.resId]}),p(()=>this.http.put(this.data.indexActionRoute,{resource:this.data.resIds[0],note:this.noteEditor.getNote(),data:{type:this.data.resource.registeredMail_type,warranty:this.data.resource.registeredMail_warranty,issuingSiteId:this.data.resource.registeredMail_issuingSite,letter:this.data.resource.registeredMail_letter,recipient:this.data.resource.registeredMail_recipient,reference:this.data.resource.registeredMail_reference,generated:!1}})),Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(),Object(c.a)(!1)))).subscribe()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.data.resIds,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(Ey,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:24,vars:17,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,Fy,2,0,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Qc(7),n.ic(8,"translate"),n.Oc(9,Ly,3,3,"b",6),n.Oc(10,Qy,2,1,"b",6),n.Oc(11,Ny,3,4,"b",6),n.Qc(12," ? "),n.Vb(),n.Wb(13,"div",5),n.Rb(14,"app-note-editor",7,8),n.Vb(),n.Vb(),n.Vb(),n.Rb(16,"span",9),n.Wb(17,"div",10),n.Wb(18,"button",11),n.dc("click",(function(){return e.onSubmit()})),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"button",12),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(3),n.Sc(" ",n.jc(8,11,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(3),n.oc("resIds",e.data.resIds),n.Db(4),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(20,13,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(23,15,"lang.cancel")))},directives:[q.i,q.f,P.t,Du,q.c,k.b,q.d,V.c],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:1;overflow:hidden}"]}),t})();const By=["noteEditor"];function Uy(t,e){1&t&&(n.Wb(0,"div",13),n.Rb(1,"mat-spinner",14),n.Vb())}function $y(t,e){1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function Hy(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function Gy(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}let Xy=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.loading=!1}ngOnInit(){}onSubmit(){this.loading=!0,0===this.data.resIds.length?this.indexDocumentAndExecuteAction():this.executeAction()}indexDocumentAndExecuteAction(){this.http.post("../rest/resources",this.data.resource).pipe(Object(mt.a)(t=>{this.data.resIds=[t.resId]}),p(()=>this.http.put(this.data.indexActionRoute,{resource:this.data.resIds[0],note:this.noteEditor.getNote(),data:{type:this.data.resource.registeredMail_type,warranty:this.data.resource.registeredMail_warranty,issuingSiteId:this.data.resource.registeredMail_issuingSite,letter:this.data.resource.registeredMail_letter,recipient:this.data.resource.registeredMail_recipient,reference:this.data.resource.registeredMail_reference,generated:!0}})),Object(mt.a)(t=>{if(t&&null!=t.errors)this.notify.error(t.errors);else{const e=document.createElement("a");e.href="data:application/pdf;base64,"+t.fileContent,e.setAttribute("download","recommande_"+t.registeredMailNumber.split(" ").join("_")+".pdf"),document.body.appendChild(e),e.click(),this.dialogRef.close(this.data.resIds)}}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(),Object(c.a)(!1)))).subscribe()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.data.resIds,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(By,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:24,vars:17,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,Uy,2,0,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Qc(7),n.ic(8,"translate"),n.Oc(9,$y,3,3,"b",6),n.Oc(10,Hy,2,1,"b",6),n.Oc(11,Gy,3,4,"b",6),n.Qc(12," ? "),n.Vb(),n.Wb(13,"div",5),n.Rb(14,"app-note-editor",7,8),n.Vb(),n.Vb(),n.Vb(),n.Rb(16,"span",9),n.Wb(17,"div",10),n.Wb(18,"button",11),n.dc("click",(function(){return e.onSubmit()})),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"button",12),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(3),n.Sc(" ",n.jc(8,11,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(3),n.oc("resIds",e.data.resIds),n.Db(4),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(20,13,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(23,15,"lang.cancel")))},directives:[q.i,q.f,P.t,Du,q.c,k.b,q.d,V.c],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:1;overflow:hidden}"]}),t})();const qy=["noteEditor"];function Ky(t,e){1&t&&(n.Wb(0,"div",13),n.Rb(1,"mat-spinner",14),n.Vb())}function Yy(t,e){1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function Jy(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function Zy(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}let tx=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.loading=!1}ngOnInit(){}onSubmit(){this.loading=!0,0===this.data.resIds.length?this.indexDocumentAndExecuteAction():this.executeAction()}indexDocumentAndExecuteAction(){this.http.post("../rest/resources",this.data.resource).pipe(Object(mt.a)(t=>{this.data.resIds=[t.resId]}),p(()=>this.http.put(this.data.indexActionRoute,{resource:this.data.resIds[0],note:this.noteEditor.getNote(),data:{type:this.data.resource.registeredMail_type,warranty:this.data.resource.registeredMail_warranty,issuingSiteId:this.data.resource.registeredMail_issuingSite,letter:this.data.resource.registeredMail_letter,recipient:this.data.resource.registeredMail_recipient,reference:this.data.resource.registeredMail_reference,generated:!1}})),Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.dialogRef.close(),Object(c.a)(!1)))).subscribe()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.data.resIds,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(()=>{this.dialogRef.close(this.data.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(qy,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:24,vars:17,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,Ky,2,0,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Qc(7),n.ic(8,"translate"),n.Oc(9,Yy,3,3,"b",6),n.Oc(10,Jy,2,1,"b",6),n.Oc(11,Zy,3,4,"b",6),n.Qc(12," ? "),n.Vb(),n.Wb(13,"div",5),n.Rb(14,"app-note-editor",7,8),n.Vb(),n.Vb(),n.Vb(),n.Rb(16,"span",9),n.Wb(17,"div",10),n.Wb(18,"button",11),n.dc("click",(function(){return e.onSubmit()})),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"button",12),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(3),n.Sc(" ",n.jc(8,11,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(3),n.oc("resIds",e.data.resIds),n.Db(4),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(20,13,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(23,15,"lang.cancel")))},directives:[q.i,q.f,P.t,Du,q.c,k.b,q.d,V.c],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:1;overflow:hidden}"]}),t})();const ex=["noteEditor"];function ix(t,e){1&t&&(n.Wb(0,"div",13),n.Rb(1,"mat-spinner",14),n.Vb())}function nx(t,e){1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function ax(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.data.resource.chrono)}}function sx(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}let ox=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.functions=n,this.dialogRef=a,this.data=s,this.loading=!1}ngOnInit(){}onSubmit(){this.loading=!0,this.executeAction()}executeAction(){const t=document.createElement("a");this.http.put(this.data.processActionRoute,{resources:this.data.resIds,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(e=>{e&&null!=e.errors?this.notify.error(e.errors):Object.values(e.data).forEach(e=>{if(!this.functions.empty(e)){let i;if(t.href="data:application/pdf;base64,"+e,1===this.data.resIds.length)i=this.data.resource.chrono.split(" ").join("_");else{let t,e,n,a;t=new Date,e=t.getDate(),n=t.getMonth()+1,a=t.getFullYear(),e<10&&(e="0"+e),n<10&&(n="0"+n),i=e+"-"+n+"-"+a}t.setAttribute("download","recommande_"+i+".pdf"),document.body.appendChild(t),t.click(),this.dialogRef.close(this.data.resIds)}})}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(_t.a),n.Qb(q.h),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(ex,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:24,vars:17,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],[1,"col-md-12"],["color","primary","class","highlight",4,"ngIf"],[3,"resIds"],["noteEditor",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["color","primary",1,"highlight"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,ix,2,0,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Qc(7),n.ic(8,"translate"),n.Oc(9,nx,3,3,"b",6),n.Oc(10,ax,2,1,"b",6),n.Oc(11,sx,3,4,"b",6),n.Qc(12," ? "),n.Vb(),n.Wb(13,"div",5),n.Rb(14,"app-note-editor",7,8),n.Vb(),n.Vb(),n.Vb(),n.Rb(16,"span",9),n.Wb(17,"div",10),n.Wb(18,"button",11),n.dc("click",(function(){return e.onSubmit()})),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"button",12),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.loading),n.Db(3),n.Sc(" ",n.jc(8,11,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===e.data.resIds.length),n.Db(1),n.oc("ngIf",1==e.data.resIds.length),n.Db(1),n.oc("ngIf",e.data.resIds.length>1),n.Db(3),n.oc("resIds",e.data.resIds),n.Db(4),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(20,13,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(23,15,"lang.cancel")))},directives:[q.i,q.f,P.t,Du,q.c,k.b,q.d,V.c],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:1;overflow:hidden}"]}),t})();const rx=["noteEditor"];function cx(t,e){1&t&&(n.Wb(0,"div",14),n.Rb(1,"mat-spinner",15),n.Vb())}function lx(t,e){if(1&t&&(n.Wb(0,"li"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t," ")}}function dx(t,e){if(1&t&&(n.Wb(0,"div",16),n.Qc(1),n.ic(2,"translate"),n.Wb(3,"ul"),n.Oc(4,lx,2,1,"li",17),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Sc(" ",n.jc(2,2,"lang.cannotGenerateDepositListForMails")," "),n.Db(3),n.oc("ngForOf",t.cannotGenerate)}}function hx(t,e){if(1&t&&(n.Wb(0,"div",18),n.Rb(1,"app-note-editor",19,20),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("resIds",t.data.resIds)}}function ux(t,e){if(1&t&&(n.Wb(0,"div",7),n.Oc(1,cx,2,0,"div",8),n.Wb(2,"div",9),n.Wb(3,"div"),n.Wb(4,"div",10),n.Wb(5,"p"),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Wb(8,"p"),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Wb(11,"p"),n.Wb(12,"b"),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Qc(15," : "),n.Rb(16,"span",11),n.Rb(17,"br"),n.Wb(18,"b"),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Qc(21," : "),n.Rb(22,"span",11),n.Rb(23,"br"),n.Wb(24,"b"),n.Qc(25),n.ic(26,"translate"),n.Vb(),n.Qc(27," : "),n.Rb(28,"span",11),n.Rb(29,"br"),n.Vb(),n.Vb(),n.Oc(30,dx,5,4,"div",12),n.Vb(),n.Oc(31,hx,3,1,"div",13),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.loading),n.Db(5),n.Sc(" ",n.jc(7,11,"lang.registeredMailsIncludedExplication")," "),n.Db(3),n.Sc(" ",n.jc(10,13,"lang.registeredMailsIncluded")," "),n.Db(4),n.Rc(n.jc(14,15,"lang.registeredMail_2C")),n.Db(3),n.oc("innerHTML",t.types["2C"],n.Ec),n.Db(3),n.Rc(n.jc(20,17,"lang.registeredMail_2D")),n.Db(3),n.oc("innerHTML",t.types["2D"],n.Ec),n.Db(3),n.Rc(n.jc(26,19,"lang.registeredMail_RW")),n.Db(3),n.oc("innerHTML",t.types.RW,n.Ec),n.Db(2),n.oc("ngIf",0!==t.cannotGenerate.length),n.Db(1),n.oc("ngIf",0!==t.canGenerate.length)}}let px=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.functions=a,this.data=s,this.loading=!1,this.loadingInit=!1,this.types=[],this.canGenerate=[],this.cannotGenerate=[]}ngOnInit(){this.loadingInit=!0,this.checkPrintDepositList()}checkPrintDepositList(){this.http.post("../rest/resourcesList/users/"+this.data.userId+"/groups/"+this.data.groupId+"/baskets/"+this.data.basketId+"/actions/"+this.data.action.id+"/checkPrintDepositList",{resources:this.data.resIds}).subscribe(t=>{this.types=t.types,this.types["2C"]=this.functions.empty(this.types["2C"])?this.translate.instant("lang.noneItalic"):this.types["2C"],this.types["2D"]=this.functions.empty(this.types["2D"])?this.translate.instant("lang.noneItalic"):this.types["2D"],this.types.RW=this.functions.empty(this.types.RW)?this.translate.instant("lang.noneItalic"):this.types.RW,this.canGenerate=t.canGenerate,this.cannotGenerate=t.cannotGenerate,this.loadingInit=!1},t=>{this.notify.error(t.error.errors),this.dialogRef.close(),this.loadingInit=!1})}onSubmit(){this.loading=!0,this.data.resIds.length>0&&this.executeAction()}executeAction(){const t=document.createElement("a");this.http.put(this.data.processActionRoute,{resources:this.canGenerate,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(e=>{if(e&&null!=e.errors&&this.notify.error(e.errors),!this.functions.empty(e.data.encodedFile)){let i,n,a,s;t.href="data:application/pdf;base64,"+e.data.encodedFile,i=new Date,n=i.getDate(),a=i.getMonth()+1,s=i.getFullYear(),n<10&&(n="0"+n),a<10&&(a="0"+a),i=n+"-"+a+"-"+s,t.setAttribute("download","descriptif_pli_"+i+".pdf"),document.body.appendChild(t),t.click(),this.dialogRef.close(this.canGenerate)}}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(_t.a),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Xc(rx,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:12,vars:10,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content","",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],["mat-dialog-content",""],["class","loading","style","display:flex;height:100%;",4,"ngIf"],[1,"row"],["role","alert",1,"alert-message","alert-message-info"],[3,"innerHTML"],["class","alert-message alert-message-danger","role","alert",4,"ngIf"],["class","col-md-12",4,"ngIf"],[1,"loading",2,"display","flex","height","100%"],[2,"margin","auto"],["role","alert",1,"alert-message","alert-message-danger"],[4,"ngFor","ngForOf"],[1,"col-md-12"],[3,"resIds"],["noteEditor",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Oc(3,ux,32,21,"div",2),n.Rb(4,"span",3),n.Wb(5,"div",4),n.Wb(6,"button",5),n.dc("click",(function(){return e.onSubmit()})),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Wb(9,"button",6),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(1),n.oc("ngIf",!e.loadingInit),n.Db(3),n.oc("disabled",e.loading||0===e.canGenerate.length),n.Db(1),n.Rc(n.jc(8,6,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(11,8,"lang.cancel")))},directives:[q.i,P.t,q.c,k.b,q.d,q.f,V.c,P.s,Du],pipes:[g.d],styles:[".highlight[_ngcontent-%COMP%]{font-size:110%}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:1;overflow:hidden}.acknowledgementList[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{font-size:12px;max-height:100px;overflow:auto;padding-left:25px;padding-right:5px;padding-bottom:10px;margin-top:10px}.acknowledgementList[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;text-decoration:underline}.acknowledgementList[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{font-size:120%}.models[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;grid-gap:20px;padding-top:10px;margin-bottom:10px}.attachLabel[_ngcontent-%COMP%]{color:#135f7f}"]}),t})();function bx(t,e){1&t&&(n.Wb(0,"div",11),n.Rb(1,"mat-spinner",12),n.Qc(2),n.ic(3,"translate"),n.Vb()),2&t&&(n.Db(2),n.Sc("\xa0",n.jc(3,1,"lang.checkInProgress")," ... "))}function fx(t,e){1&t&&(n.Wb(0,"div",13),n.Rb(1,"mat-spinner"),n.Vb())}function mx(t,e){1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function gx(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Rc(t.data.resource.chrono)}}function vx(t,e){if(1&t&&(n.Wb(0,"b",15),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function _x(t,e){if(1&t&&(n.Wb(0,"div"),n.Qc(1),n.ic(2,"translate"),n.Oc(3,mx,3,3,"b",14),n.Oc(4,gx,2,1,"b",14),n.Oc(5,vx,3,4,"b",14),n.Qc(6," ? "),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Sc(" ",n.jc(2,4,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===t.data.resIds.length),n.Db(1),n.oc("ngIf",1===t.data.resIds.length),n.Db(1),n.oc("ngIf",t.data.resIds.length>1)}}function yx(t,e){if(1&t&&(n.Wb(0,"mat-option",38),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label,"")}}function xx(t,e){if(1&t&&(n.Wb(0,"mat-option",38),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label,"")}}function Cx(t,e){if(1&t&&(n.Wb(0,"mat-option",38),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function Ox(t,e){if(1&t&&(n.Wb(0,"mat-form-field"),n.Wb(1,"mat-label"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-select",39),n.Oc(5,Cx,2,2,"mat-option",23),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.Rc(n.jc(3,2,"lang.folder")),n.Db(3),n.oc("ngForOf",t.folders)}}function Dx(t,e){if(1&t&&(n.Wb(0,"mat-list-item"),n.Wb(1,"span",43),n.Qc(2),n.Vb(),n.Qc(3,"\xa0-\xa0"),n.Wb(4,"span",44),n.Qc(5),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.chrono),n.Db(3),n.Rc(t.object)}}function wx(t,e){if(1&t&&(n.Wb(0,"mat-expansion-panel"),n.Wb(1,"mat-expansion-panel-header"),n.Wb(2,"mat-panel-title",40),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb(),n.Wb(5,"mat-list",41),n.Oc(6,Dx,6,2,"mat-list-item",42),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(3),n.Sc(" ",n.jc(4,2,"lang.linkedMails")," "),n.Db(3),n.oc("ngForOf",t.linkedResources)}}function Mx(t,e){if(1&t&&(n.Wb(0,"mat-option",38),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Rc(t.label)}}function kx(t,e){if(1&t&&(n.Wb(0,"mat-option",38),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Rc(t.label)}}function Sx(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab",45),n.Wb(1,"mat-form-field"),n.Wb(2,"mat-label"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"input",46),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.id=i})),n.Vb(),n.Vb(),n.Wb(6,"mat-form-field"),n.Wb(7,"mat-label"),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Wb(10,"input",46),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.label=i})),n.Vb(),n.Vb(),n.Wb(11,"mat-form-field"),n.Wb(12,"mat-label"),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Wb(15,"input",46),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.type=i})),n.Vb(),n.Vb(),n.Wb(16,"mat-form-field"),n.Wb(17,"mat-label"),n.Qc(18),n.ic(19,"translate"),n.Vb(),n.Wb(20,"mat-select",47),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.descriptionLevel=i})),n.Oc(21,kx,2,2,"mat-option",23),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=e.index,a=n.hc(2);n.qc("label","Unit\xe9 d'archive n\xb0",i+1,""),n.Db(3),n.Rc(n.jc(4,10,"lang.id")),n.Db(2),n.oc("ngModel",t.id),n.Db(3),n.Rc(n.jc(9,12,"lang.label")),n.Db(2),n.oc("ngModel",t.label),n.Db(3),n.Rc(n.jc(14,14,"lang.type")),n.Db(2),n.oc("ngModel",t.type),n.Db(3),n.Rc(n.jc(19,16,"lang.descriptionLevel")),n.Db(2),n.oc("ngModel",t.descriptionLevel),n.Db(1),n.oc("ngForOf",a.descriptionLevels)}}function Ix(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"form",16),n.Wb(2,"mat-form-field",17),n.Wb(3,"mat-label"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Rb(6,"input",18),n.Vb(),n.Wb(7,"mat-form-field",17),n.Wb(8,"mat-label"),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Rb(11,"input",19),n.Vb(),n.Wb(12,"div",20),n.Wb(13,"div",21),n.Wb(14,"mat-form-field"),n.Wb(15,"mat-label"),n.Qc(16),n.ic(17,"translate"),n.Vb(),n.Wb(18,"mat-select",22),n.dc("selectionChange",(function(e){return n.Dc(t),n.hc().archivalAgreementSelected(e)})),n.Oc(19,yx,2,2,"mat-option",23),n.Vb(),n.Vb(),n.Vb(),n.Wb(20,"div",21),n.Wb(21,"mat-form-field"),n.Wb(22,"mat-label"),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Wb(25,"mat-select",24),n.dc("selectionChange",(function(e){return n.Dc(t),n.hc().entityArchiveRecipientSelected(e)})),n.Oc(26,xx,2,2,"mat-option",23),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(27,"div",25),n.Wb(28,"div",26),n.Wb(29,"div",27),n.Qc(30),n.ic(31,"translate"),n.Vb(),n.Wb(32,"mat-form-field"),n.Wb(33,"mat-label"),n.Qc(34),n.ic(35,"translate"),n.Vb(),n.Rb(36,"input",28),n.Vb(),n.Wb(37,"mat-form-field"),n.Wb(38,"mat-label"),n.Qc(39),n.ic(40,"translate"),n.Vb(),n.Rb(41,"input",29),n.Vb(),n.Wb(42,"mat-form-field"),n.Wb(43,"mat-label"),n.Qc(44),n.ic(45,"translate"),n.Vb(),n.Rb(46,"input",30),n.Vb(),n.Vb(),n.Wb(47,"div",26),n.Wb(48,"div",27),n.Qc(49),n.ic(50,"translate"),n.Vb(),n.Wb(51,"mat-form-field"),n.Wb(52,"mat-label"),n.Qc(53),n.ic(54,"translate"),n.Vb(),n.Rb(55,"input",31),n.Vb(),n.Wb(56,"mat-form-field"),n.Wb(57,"mat-label"),n.Qc(58),n.ic(59,"translate"),n.Vb(),n.Rb(60,"input",32),n.Vb(),n.Wb(61,"mat-form-field"),n.Wb(62,"mat-label"),n.Qc(63),n.ic(64,"translate"),n.Vb(),n.Rb(65,"input",33),n.Vb(),n.Vb(),n.Vb(),n.Oc(66,Ox,6,4,"mat-form-field",5),n.Oc(67,wx,7,4,"mat-expansion-panel",5),n.Wb(68,"div",34),n.Wb(69,"div",21),n.Wb(70,"mat-form-field",17),n.Wb(71,"mat-label"),n.Qc(72),n.ic(73,"translate"),n.Vb(),n.Rb(74,"input",35),n.Vb(),n.Vb(),n.Wb(75,"div",21),n.Wb(76,"mat-form-field"),n.Wb(77,"mat-label"),n.Qc(78),n.ic(79,"translate"),n.Vb(),n.Wb(80,"mat-select",36),n.Oc(81,Mx,2,2,"mat-option",23),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(82,"mat-tab-group"),n.Oc(83,Sx,22,18,"mat-tab",37),n.Vb(),n.Tb()}if(2&t){const t=n.hc();n.Db(1),n.oc("formGroup",t.actionFormGroup),n.Db(3),n.Rc(n.jc(5,21,"lang.slipLabel")),n.Db(5),n.Rc(n.jc(10,23,"lang.slipId")),n.Db(7),n.Rc(n.jc(17,25,"lang.archivalAgreement")),n.Db(3),n.oc("ngForOf",t.archivalAgreements),n.Db(4),n.Rc(n.jc(24,27,"lang.archivalAgency")),n.Db(3),n.oc("ngForOf",t.recipientArchiveEntities),n.Db(4),n.Sc(" ",n.jc(31,29,"lang.transferEntity")," "),n.Db(4),n.Rc(n.jc(35,31,"lang.label")),n.Db(5),n.Rc(n.jc(40,33,"lang.producerService")),n.Db(5),n.Rc(n.jc(45,35,"lang.senderArchiveEntity")),n.Db(5),n.Sc(" ",n.jc(50,37,"lang.doctype")," "),n.Db(4),n.Rc(n.jc(54,39,"lang.label")),n.Db(5),n.Rc(n.jc(59,41,"lang.retentionRule")),n.Db(5),n.Rc(n.jc(64,43,"lang.retentionFinalDisposition")),n.Db(3),n.oc("ngIf",t.folders.length>0),n.Db(1),n.oc("ngIf",t.linkedResources.length>0),n.Db(5),n.Rc(n.jc(73,45,"lang.archiveId")),n.Db(6),n.Rc(n.jc(79,47,"lang.descriptionLevel")),n.Db(3),n.oc("ngForOf",t.descriptionLevels),n.Db(2),n.oc("ngForOf",t.archives)}}function Px(t,e){if(1&t&&(n.Wb(0,"div",48),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Sc(" ",t.resourcesErrors[0]," ")}}let Vx=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this._formBuilder=a,this.data=s,this.functions=o,this.loading=!1,this.checking=!1,this.resourcesErrors=[],this.recipientArchiveEntities=[],this.archivalAgreements=[],this.descriptionLevels=[{id:"Class",label:"Classe"},{id:"Collection",label:"Collection"},{id:"File",label:"Dossier"},{id:"Fonds",label:"Fonds"},{id:"Item",label:"Pi\xe8ce"},{id:"RecordGrp",label:"Groupe de documents"},{id:"Series",label:"S\xe9rie organique"},{id:"Subfonds",label:"Sous-fonds"},{id:"SubGrp",label:"Sous-groupe de documents"},{id:"Subseries",label:"Sous-s\xe9rie organique"}],this.archives=[],this.folders=[],this.linkedResources=[],this.actionFormGroup=this._formBuilder.group({folder:[""],packageName:["",X.I.required],slipId:[{value:"",disabled:!0},X.I.required],slipDate:[new Date,X.I.required],archivalAgreement:[{value:"",disabled:!1},X.I.required],entityArchiveRecipient:[{value:"",disabled:!1},X.I.required],entityLabelTransferEntity:[{value:"",disabled:!0},X.I.required],producerTransferEntity:[{value:"",disabled:!0},X.I.required],senderArchiveEntity:[{value:"",disabled:!0},X.I.required],archiveId:[{value:"",disabled:!0},X.I.required],archiveDescriptionLevel:[{value:"File",disabled:!1},X.I.required],doctype:[{value:"",disabled:!0},X.I.required],entityRetentionRule:[{value:"",disabled:!0},X.I.required],doctypeRetentionFinalDisposition:[{value:"",disabled:!0},X.I.required]})}ngOnInit(){1===this.data.resIds.length?this.getData():this.resourcesErrors.push({lang:"onlySingleResourceAllowed"})}getData(){this.checking=!0,this.http.post(`../rest/resourcesList/users/${this.data.userId}/groups/${this.data.groupId}/baskets/${this.data.basketId}/actions/${this.data.action.id}/checkSendToRecordManagement`,{resources:this.data.resIds}).pipe(Object(mt.a)(t=>{this.archives=t.archiveUnits,this.archives.forEach(t=>{t.type=this.translate.instant("lang."+t.type)}),this.linkedResources=t.additionalData.linkedResources,this.folders=t.additionalData.folders,this.recipientArchiveEntities=t.recipientArchiveEntities,this.archivalAgreements=t.archivalAgreements,this.actionFormGroup=this._formBuilder.group({folder:[this.folders.length>0?this.folders[0].id:null],packageName:["",X.I.required],slipId:[{value:t.data.slipInfo.slipId,disabled:!0},X.I.required],slipDate:[new Date,X.I.required],archivalAgreement:[{value:"",disabled:!1},X.I.required],entityArchiveRecipient:[{value:"",disabled:!1},X.I.required],entityLabelTransferEntity:[{value:t.data.entity.label,disabled:!0},X.I.required],producerTransferEntity:[{value:t.data.entity.producerService,disabled:!0},X.I.required],senderArchiveEntity:[{value:t.data.entity.senderArchiveEntity,disabled:!0},X.I.required],archiveId:[{value:t.data.slipInfo.archiveId,disabled:!0},X.I.required],archiveDescriptionLevel:[{value:"File",disabled:!1},X.I.required],doctype:[{value:t.data.doctype.label,disabled:!0},X.I.required],entityRetentionRule:[{value:t.data.doctype.retentionRule,disabled:!0},X.I.required],doctypeRetentionFinalDisposition:[{value:t.data.doctype.retentionFinalDisposition,disabled:!0},X.I.required]})}),Object(Xt.a)(()=>this.checking=!1),Object(m.a)(t=>(this.functions.empty(t.error.lang)?this.resourcesErrors.push(t.error.errors):this.resourcesErrors.push(this.translate.instant("lang."+t.error.lang)),Object(c.a)(!1)))).subscribe()}onSubmit(t){this.loading=!0,this.data.resIds.length>0&&this.executeAction(t)}executeAction(t){this.http.put(this.data.processActionRoute,{resources:this.data.resIds,data:this.formatData(t)}).pipe(Object(mt.a)(e=>{if("download"!==t||this.functions.empty(e.data.encodedFile))e||this.dialogRef.close("success");else{const t=document.createElement("a");let i,n,a,s;t.href="data:application/zip;base64,"+e.data.encodedFile,i=new Date,n=i.getDate(),a=i.getMonth()+1,s=i.getFullYear(),n<10&&(n="0"+n),a<10&&(a="0"+a),i=n+"-"+a+"-"+s,t.setAttribute("download","seda_package_"+i+".zip"),document.body.appendChild(t),t.click(),this.dialogRef.close("success")}e&&null!=e.errors&&this.notify.error(e.errors)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}formatData(t){const e={};return Object.keys(this.actionFormGroup.controls).forEach(t=>{e[t]=this.actionFormGroup.controls[t].value}),e.archives=this.archives.map(t=>({id:t.id,descriptionLevel:t.descriptionLevel})),e.actionMode=t,e}archivalAgreementSelected(t){const e=this.archivalAgreements.filter(e=>e.id===t.value);this.actionFormGroup.patchValue({entityArchiveRecipient:e[0].archiveEntityRegNumber})}entityArchiveRecipientSelected(t){this.functions.empty(this.actionFormGroup.get("archivalAgreement").value)||this.functions.empty(t.value)||0===this.archivalAgreements.filter(e=>e.id===this.actionFormGroup.get("archivalAgreement").value&&e.archiveEntityRegNumber===t.value).length&&this.actionFormGroup.patchValue({archivalAgreement:null})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(X.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-send-to-record-management"]],decls:20,vars:18,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","checking","color","primary","style","display:flex;height:100%;justify-content: center;padding: 30px;",4,"ngIf"],["class","loading","color","primary",4,"ngIf"],[4,"ngIf"],["class","alert-message alert-message-danger",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],["color","primary",1,"checking",2,"display","flex","height","100%","justify-content","center","padding","30px"],["diameter","24"],["color","primary",1,"loading"],["color","primary","class","highlight",4,"ngIf"],["color","primary",1,"highlight"],[2,"display","contents",3,"formGroup"],["appearance","outline"],["type","text","matInput","","formControlName","packageName"],["type","text","matInput","","formControlName","slipId"],[1,"row"],[1,"col-md-6"],["formControlName","archivalAgreement",3,"selectionChange"],[3,"value",4,"ngFor","ngForOf"],["formControlName","entityArchiveRecipient",3,"selectionChange"],[1,"form-group",2,"display","flex","flex-direction","row","flex-wrap","wrap"],[1,"formType","ratio-2","col-sm-12"],[1,"formType-title"],["type","text","matInput","","formControlName","entityLabelTransferEntity"],["type","text","matInput","","formControlName","producerTransferEntity"],["type","text","matInput","","formControlName","senderArchiveEntity"],["type","text","matInput","","formControlName","doctype"],["type","text","matInput","","formControlName","entityRetentionRule"],["type","text","matInput","","formControlName","doctypeRetentionFinalDisposition"],[1,"row",2,"padding-top","10px"],["type","text","matInput","","formControlName","archiveId"],["formControlName","archiveDescriptionLevel"],[3,"label",4,"ngFor","ngForOf"],[3,"value"],["formControlName","folder"],["color","primary",2,"font-size","14px"],[2,"max-height","350px","overflow","auto"],[4,"ngFor","ngForOf"],[2,"font-size","12px","color","#666"],["color","primary",2,"font-size","12px"],[3,"label"],["type","text","matInput","","disabled","",3,"ngModel","ngModelChange"],["required","",3,"ngModel","ngModelChange"],[1,"alert-message","alert-message-danger"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,bx,4,3,"div",3),n.Oc(5,fx,2,0,"div",4),n.Oc(6,_x,7,6,"div",5),n.Oc(7,Ix,84,49,"ng-container",5),n.Oc(8,Px,2,1,"div",6),n.Vb(),n.Rb(9,"span",7),n.Wb(10,"div",8),n.Wb(11,"button",9),n.dc("click",(function(){return e.onSubmit("send")})),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Wb(14,"button",9),n.dc("click",(function(){return e.onSubmit("download")})),n.Qc(15),n.ic(16,"translate"),n.Vb(),n.Wb(17,"button",10),n.Qc(18),n.ic(19,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.checking),n.Db(1),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.checking),n.Db(1),n.oc("ngIf",!e.checking&&0===e.resourcesErrors.length),n.Db(1),n.oc("ngIf",e.resourcesErrors.length>0),n.Db(3),n.oc("disabled",e.loading||!e.actionFormGroup.valid),n.Db(1),n.Rc(n.jc(13,12,"lang.send")),n.Db(2),n.oc("disabled",e.loading||!e.actionFormGroup.valid),n.Db(1),n.Rc(n.jc(16,14,"lang.download")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(19,16,"lang.cancel")))},directives:[q.i,q.f,P.t,q.c,k.b,q.d,V.c,X.K,X.v,X.m,Y.c,Y.g,J.b,X.d,X.u,X.k,ee.a,P.s,Te.c,W.p,gt.c,gt.g,gt.h,R.a,R.d,Te.a,X.x,X.F],pipes:[g.d],styles:[".loading[_ngcontent-%COMP%]{position:absolute;width:100%;left:0;top:0;z-index:1;background:hsla(0,0%,100%,.8)}.checking[_ngcontent-%COMP%], .loading[_ngcontent-%COMP%]{display:flex;height:100%;justify-content:center;align-items:center}.checking[_ngcontent-%COMP%]{padding:30px}.formType[_ngcontent-%COMP%]{align-items:center;display:flex;margin:10px;border-radius:4px;border:1px solid #ccc;position:relative;padding:10px;flex-direction:column}.formType-title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:-7px;left:10px;padding:0;margin:0;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-slide-toggle-label{color:#666;font-weight:700}.formType[_ngcontent-%COMP%] .mat-radio-button, .formType[_ngcontent-%COMP%] .mat-slide-toggle{opacity:.5;color:#666;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.formType[_ngcontent-%COMP%] .mat-checked, .formType[_ngcontent-%COMP%] .mat-radio-checked{opacity:1;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-checked .mat-slide-toggle-label{color:#135f7f}.formType[_ngcontent-%COMP%] .mat-form-field-suffix{color:#f99830;font-size:15px;top:0}.ratio-1[_ngcontent-%COMP%], .ratio-2[_ngcontent-%COMP%]{flex:1}.mat-input-element[_ngcontent-%COMP%]:disabled{color:#135f7f!important}"]}),t})();const Rx=["noteEditor"];function jx(t,e){1&t&&(n.Wb(0,"div",10),n.Rb(1,"mat-spinner",11),n.Qc(2),n.ic(3,"translate"),n.Vb()),2&t&&(n.Db(2),n.Sc("\xa0",n.jc(3,1,"lang.checkInProgress")," ... "))}function Ax(t,e){1&t&&(n.Wb(0,"div",12),n.Rb(1,"mat-spinner"),n.Vb())}function Wx(t,e){1&t&&(n.Wb(0,"b",18),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function Tx(t,e){if(1&t&&(n.Wb(0,"b",18),n.Qc(1),n.Vb()),2&t){const t=n.hc(3);n.Db(1),n.Rc(t.data.resource.chrono)}}function Ex(t,e){if(1&t&&(n.Wb(0,"b",18),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(3);n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function Fx(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function Lx(t,e){if(1&t&&(n.Wb(0,"div",19),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,Fx,5,4,"li",20),n.Vb(),n.Vb()),2&t){const t=n.hc(3);n.Db(2),n.Sc(" ",n.jc(3,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.resourcesErrors)}}function Qx(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div"),n.Qc(2),n.ic(3,"translate"),n.Oc(4,Wx,3,3,"b",16),n.Oc(5,Tx,2,1,"b",16),n.Oc(6,Ex,3,4,"b",16),n.Qc(7," ? "),n.Vb(),n.Wb(8,"div"),n.Oc(9,Lx,6,4,"div",17),n.Vb(),n.Tb()),2&t){const t=n.hc(2);n.Db(2),n.Sc(" ",n.jc(3,5,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===t.data.resIds.length),n.Db(1),n.oc("ngIf",1===t.data.resIds.length),n.Db(1),n.oc("ngIf",t.data.resIds.length>1),n.Db(3),n.oc("ngIf",t.resourcesErrors.length>0)}}function Nx(t,e){if(1&t&&(n.Wb(0,"div"),n.Rb(1,"app-note-editor",21,22),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("resIds",t.selectedRes)}}function zx(t,e){if(1&t&&(n.Wb(0,"div",13),n.Rb(1,"div",14),n.ic(2,"translate"),n.Oc(3,Qx,10,7,"ng-container",15),n.Oc(4,Nx,3,1,"div",15),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("innerHTML",n.jc(2,3,"lang.checkReplyRecordManagementDesc"),n.Ec),n.Db(2),n.oc("ngIf",t.data.resIds.length>0),n.Db(1),n.oc("ngIf",t.selectedRes.length>0)}}let Bx=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.loading=!1,this.checking=!0,this.resourcesErrors=[],this.selectedRes=[]}ngOnInit(){this.checkReply()}checkReply(){this.http.post(`../rest/resourcesList/users/${this.data.userId}/groups/${this.data.groupId}/baskets/${this.data.basketId}/checkReplyRecordManagement`,{resources:this.data.resIds}).pipe(Object(mt.a)(t=>{this.resourcesErrors=t.resourcesInformations.errors,this.selectedRes=t.resourcesInformations.success}),Object(Xt.a)(()=>this.checking=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}onSubmit(){this.loading=!0,this.executeAction()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.selectedRes,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(t=>{t||this.dialogRef.close(this.selectedRes),t&&null!=t.errors&&this.notify.error(t.errors)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-check-reply-record-management"]],viewQuery:function(t,e){var i;1&t&&n.Xc(Rx,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:15,vars:12,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","checking","color","primary","style","display:flex;height:100%;justify-content: center;padding: 30px;",4,"ngIf"],["class","loading","color","primary",4,"ngIf"],["class","row",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],["color","primary",1,"checking",2,"display","flex","height","100%","justify-content","center","padding","30px"],["diameter","24"],["color","primary",1,"loading"],[1,"row"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","0px",3,"innerHTML"],[4,"ngIf"],["color","primary","class","highlight",4,"ngIf"],["class","alert-message alert-message-danger mailList",4,"ngIf"],["color","primary",1,"highlight"],[1,"alert-message","alert-message-danger","mailList"],[4,"ngFor","ngForOf"],[3,"resIds"],["noteEditor",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,jx,4,3,"div",3),n.Oc(5,Ax,2,0,"div",4),n.Oc(6,zx,5,5,"div",5),n.Vb(),n.Rb(7,"span",6),n.Wb(8,"div",7),n.Wb(9,"button",8),n.dc("click",(function(){return e.onSubmit()})),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Wb(12,"button",9),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.checking),n.Db(1),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.checking),n.Db(3),n.oc("disabled",e.loading||0==e.selectedRes.length),n.Db(1),n.Rc(n.jc(11,8,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(14,10,"lang.cancel")))},directives:[q.i,q.f,P.t,q.c,k.b,q.d,V.c,P.s,Du],pipes:[g.d],styles:[".loading[_ngcontent-%COMP%]{position:absolute;width:100%;left:0;top:0;z-index:1;background:hsla(0,0%,100%,.8)}.checking[_ngcontent-%COMP%], .loading[_ngcontent-%COMP%]{display:flex;height:100%;justify-content:center;align-items:center}.checking[_ngcontent-%COMP%]{padding:30px}"]}),t})();const Ux=["noteEditor"];function $x(t,e){1&t&&(n.Wb(0,"div",10),n.Rb(1,"mat-spinner",11),n.Qc(2),n.ic(3,"translate"),n.Vb()),2&t&&(n.Db(2),n.Sc("\xa0",n.jc(3,1,"lang.checkInProgress")," ... "))}function Hx(t,e){1&t&&(n.Wb(0,"div",12),n.Rb(1,"mat-spinner"),n.Vb())}function Gx(t,e){1&t&&(n.Wb(0,"b",18),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function Xx(t,e){if(1&t&&(n.Wb(0,"b",18),n.Qc(1),n.Vb()),2&t){const t=n.hc(3);n.Db(1),n.Rc(t.data.resource.chrono)}}function qx(t,e){if(1&t&&(n.Wb(0,"b",18),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(3);n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function Kx(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function Yx(t,e){if(1&t&&(n.Wb(0,"div",19),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,Kx,5,4,"li",20),n.Vb(),n.Vb()),2&t){const t=n.hc(3);n.Db(2),n.Sc(" ",n.jc(3,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.resourcesErrors)}}function Jx(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div"),n.Qc(2),n.ic(3,"translate"),n.Oc(4,Gx,3,3,"b",16),n.Oc(5,Xx,2,1,"b",16),n.Oc(6,qx,3,4,"b",16),n.Qc(7," ? "),n.Vb(),n.Wb(8,"div"),n.Oc(9,Yx,6,4,"div",17),n.Vb(),n.Tb()),2&t){const t=n.hc(2);n.Db(2),n.Sc(" ",n.jc(3,5,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===t.data.resIds.length),n.Db(1),n.oc("ngIf",1===t.data.resIds.length),n.Db(1),n.oc("ngIf",t.data.resIds.length>1),n.Db(3),n.oc("ngIf",t.resourcesErrors.length>0)}}function Zx(t,e){if(1&t&&(n.Wb(0,"div"),n.Rb(1,"app-note-editor",21,22),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("resIds",t.selectedRes)}}function tC(t,e){if(1&t&&(n.Wb(0,"div",13),n.Rb(1,"div",14),n.ic(2,"translate"),n.Oc(3,Jx,10,7,"ng-container",15),n.Oc(4,Zx,3,1,"div",15),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("innerHTML",n.jc(2,3,"lang.resetRecordManagementDesc"),n.Ec),n.Db(2),n.oc("ngIf",t.data.resIds.length>0),n.Db(1),n.oc("ngIf",t.selectedRes.length>0)}}let eC=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.loading=!1,this.checking=!0,this.resourcesErrors=[],this.selectedRes=[]}ngOnInit(){this.checkReply()}checkReply(){this.http.post(`../rest/resourcesList/users/${this.data.userId}/groups/${this.data.groupId}/baskets/${this.data.basketId}/checkReplyRecordManagement`,{resources:this.data.resIds,resetAction:!0}).pipe(Object(mt.a)(t=>{this.resourcesErrors=t.resourcesInformations.errors,this.selectedRes=t.resourcesInformations.success}),Object(Xt.a)(()=>this.checking=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}onSubmit(){this.loading=!0,this.executeAction()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.selectedRes,note:this.noteEditor.getNote(),data:{resetAction:!0}}).pipe(Object(mt.a)(t=>{t||this.dialogRef.close(this.selectedRes),t&&null!=t.errors&&this.notify.error(t.errors)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-reset-record-management"]],viewQuery:function(t,e){var i;1&t&&n.Xc(Ux,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:15,vars:12,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","checking","color","primary","style","display:flex;height:100%;justify-content: center;padding: 30px;",4,"ngIf"],["class","loading","color","primary",4,"ngIf"],["class","row",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],["color","primary",1,"checking",2,"display","flex","height","100%","justify-content","center","padding","30px"],["diameter","24"],["color","primary",1,"loading"],[1,"row"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","0px",3,"innerHTML"],[4,"ngIf"],["color","primary","class","highlight",4,"ngIf"],["class","alert-message alert-message-danger mailList",4,"ngIf"],["color","primary",1,"highlight"],[1,"alert-message","alert-message-danger","mailList"],[4,"ngFor","ngForOf"],[3,"resIds"],["noteEditor",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,$x,4,3,"div",3),n.Oc(5,Hx,2,0,"div",4),n.Oc(6,tC,5,5,"div",5),n.Vb(),n.Rb(7,"span",6),n.Wb(8,"div",7),n.Wb(9,"button",8),n.dc("click",(function(){return e.onSubmit()})),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Wb(12,"button",9),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.checking),n.Db(1),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.checking),n.Db(3),n.oc("disabled",e.loading||0==e.selectedRes.length),n.Db(1),n.Rc(n.jc(11,8,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(14,10,"lang.cancel")))},directives:[q.i,q.f,P.t,q.c,k.b,q.d,V.c,P.s,Du],pipes:[g.d],styles:[".loading[_ngcontent-%COMP%]{position:absolute;width:100%;left:0;top:0;z-index:1;background:hsla(0,0%,100%,.8)}.checking[_ngcontent-%COMP%], .loading[_ngcontent-%COMP%]{display:flex;height:100%;justify-content:center;align-items:center}.checking[_ngcontent-%COMP%]{padding:30px}"]}),t})();const iC=["noteEditor"];function nC(t,e){1&t&&(n.Wb(0,"div",10),n.Rb(1,"mat-spinner",11),n.Qc(2),n.ic(3,"translate"),n.Vb()),2&t&&(n.Db(2),n.Sc("\xa0",n.jc(3,1,"lang.checkInProgress")," ... "))}function aC(t,e){1&t&&(n.Wb(0,"div",12),n.Rb(1,"mat-spinner"),n.Vb())}function sC(t,e){1&t&&(n.Wb(0,"b",18),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.currentIndexingMail")))}function oC(t,e){if(1&t&&(n.Wb(0,"b",18),n.Qc(1),n.Vb()),2&t){const t=n.hc(3);n.Db(1),n.Rc(t.data.resource.chrono)}}function rC(t,e){if(1&t&&(n.Wb(0,"b",18),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(3);n.Db(1),n.Tc("",t.data.resIds.length," ",n.jc(2,2,"lang.elements"),"")}}function cC(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.alt_identifier),n.Db(1),n.Sc(" : ",n.jc(4,2,"lang."+t.reason)," ")}}function lC(t,e){if(1&t&&(n.Wb(0,"div",19),n.Wb(1,"p"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"ul"),n.Oc(5,cC,5,4,"li",20),n.Vb(),n.Vb()),2&t){const t=n.hc(3);n.Db(2),n.Sc(" ",n.jc(3,2,"lang.canNotMakeAction")," : "),n.Db(3),n.oc("ngForOf",t.resourcesErrors)}}function dC(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div"),n.Qc(2),n.ic(3,"translate"),n.Oc(4,sC,3,3,"b",16),n.Oc(5,oC,2,1,"b",16),n.Oc(6,rC,3,4,"b",16),n.Qc(7," ? "),n.Vb(),n.Wb(8,"div"),n.Oc(9,lC,6,4,"div",17),n.Vb(),n.Tb()),2&t){const t=n.hc(2);n.Db(2),n.Sc(" ",n.jc(3,5,"lang.makeActionOn")," "),n.Db(2),n.oc("ngIf",0===t.data.resIds.length),n.Db(1),n.oc("ngIf",1===t.data.resIds.length),n.Db(1),n.oc("ngIf",t.data.resIds.length>1),n.Db(3),n.oc("ngIf",t.resourcesErrors.length>0)}}function hC(t,e){if(1&t&&(n.Wb(0,"div"),n.Rb(1,"app-note-editor",21,22),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("resIds",t.selectedRes)}}function uC(t,e){if(1&t&&(n.Wb(0,"div",13),n.Rb(1,"div",14),n.ic(2,"translate"),n.Oc(3,dC,10,7,"ng-container",15),n.Oc(4,hC,3,1,"div",15),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("innerHTML",n.jc(2,3,"lang.checkAcknowledgmentRecordManagementDesc"),n.Ec),n.Db(2),n.oc("ngIf",t.data.resIds.length>0),n.Db(1),n.oc("ngIf",t.selectedRes.length>0)}}let pC=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.loading=!1,this.checking=!0,this.resourcesErrors=[],this.selectedRes=[]}ngOnInit(){this.checkAcknowledgement()}checkAcknowledgement(){this.http.post(`../rest/resourcesList/users/${this.data.userId}/groups/${this.data.groupId}/baskets/${this.data.basketId}/checkAcknowledgementRecordManagement`,{resources:this.data.resIds}).pipe(Object(mt.a)(t=>{this.resourcesErrors=t.resourcesInformations.errors,this.selectedRes=t.resourcesInformations.success}),Object(Xt.a)(()=>this.checking=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}onSubmit(){this.loading=!0,this.executeAction()}executeAction(){this.http.put(this.data.processActionRoute,{resources:this.selectedRes,note:this.noteEditor.getNote()}).pipe(Object(mt.a)(t=>{t||this.dialogRef.close(this.selectedRes),t&&null!=t.errors&&this.notify.error(t.errors)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-check-acknowledgment-record-management"]],viewQuery:function(t,e){var i;1&t&&n.Xc(iC,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},decls:15,vars:12,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","checking","color","primary","style","display:flex;height:100%;justify-content: center;padding: 30px;",4,"ngIf"],["class","loading","color","primary",4,"ngIf"],["class","row",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],["color","primary",1,"checking",2,"display","flex","height","100%","justify-content","center","padding","30px"],["diameter","24"],["color","primary",1,"loading"],[1,"row"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","0px",3,"innerHTML"],[4,"ngIf"],["color","primary","class","highlight",4,"ngIf"],["class","alert-message alert-message-danger mailList",4,"ngIf"],["color","primary",1,"highlight"],[1,"alert-message","alert-message-danger","mailList"],[4,"ngFor","ngForOf"],[3,"resIds"],["noteEditor",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.Vb(),n.Wb(3,"div",2),n.Oc(4,nC,4,3,"div",3),n.Oc(5,aC,2,0,"div",4),n.Oc(6,uC,5,5,"div",5),n.Vb(),n.Rb(7,"span",6),n.Wb(8,"div",7),n.Wb(9,"button",8),n.dc("click",(function(){return e.onSubmit()})),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Wb(12,"button",9),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(e.data.action.label),n.Db(2),n.oc("ngIf",e.checking),n.Db(1),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.checking),n.Db(3),n.oc("disabled",e.loading||0==e.selectedRes.length),n.Db(1),n.Rc(n.jc(11,8,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(14,10,"lang.cancel")))},directives:[q.i,q.f,P.t,q.c,k.b,q.d,V.c,P.s,Du],pipes:[g.d],styles:[".loading[_ngcontent-%COMP%]{position:absolute;width:100%;left:0;top:0;z-index:1;background:hsla(0,0%,100%,.8)}.checking[_ngcontent-%COMP%], .loading[_ngcontent-%COMP%]{display:flex;height:100%;justify-content:center;align-items:center}.checking[_ngcontent-%COMP%]{padding:30px}"]}),t})(),bC=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.dialog=i,this.notify=n,this.router=a,this.headerService=s,this.functions=o,this.mode="indexing",this.currentResourceLock=null,this.lockMode=!0,this.actionEnded=!1,this.currentAction=null,this.currentUserId=null,this.currentGroupId=null,this.currentBasketId=null,this.currentResIds=[],this.currentResourceInformations=null,this.loading=!1,this.eventAction=new da.a}ngOnDestroy(){this.currentResourceLock&&this.unlockResourceAfterActionModal(this.currentResIds)}catchAction(){return this.eventAction.asObservable()}emitAction(){this.eventAction.next()}setLoading(t){this.loading=t}setActionInformations(t,e,i,n,a){return!(null!==t&&null===t.component||(null!==t&&e>0&&i>0?(this.mode=null===n?"indexing":"process",this.currentAction=t,this.currentUserId=e,this.currentGroupId=i,this.currentBasketId=n,this.currentResIds=null===a?[]:a,this.indexActionRoute=`../rest/indexing/groups/${this.currentGroupId}/actions/${this.currentAction.id}`,this.processActionRoute=`../rest/resourcesList/users/${this.currentUserId}/groups/${this.currentGroupId}/baskets/${this.currentBasketId}/actions/${this.currentAction.id}`,0):(console.log("Bad informations: "),console.log({action:t},{userId:e},{groupId:i},{basketId:n},{resIds:a}),this.notify.error("Une erreur est survenue"),1)))}saveDocument(t){return this.loading=!0,this.setResourceInformations(t),this.http.post("../rest/resources",this.currentResourceInformations)}setResourceInformations(t){this.currentResourceInformations=t}setResourceIds(t){this.currentResourceInformations.resId=t,this.currentResIds=t}launchIndexingAction(t,e,i,n){if(this.setActionInformations(t,e,i,null,null)){this.setResourceInformations(n),this.loading=!0;try{this[t.component]()}catch(a){console.log(a),console.log(t.component),alert(this.translate.instant("lang.actionNotExist"))}}}launchAction(t,e,i,n,a,s,o=!0){return Object(r.a)(this,void 0,void 0,(function*(){if(this.setActionInformations(t,e,i,n,a))if(this.actionEnded=!1,this.loading=!0,this.lockMode=o,this.setResourceInformations(s),this.lockMode){if(!0===(yield this.canExecuteAction(a)))if(["viewDoc","documentDetails","signatureBookAction","processDocument"].indexOf(t.component)>-1)this[t.component](t.data);else try{this.lockResource(),this[t.component](t.data)}catch(r){console.log(r),console.log(t),this.unlockResourceAfterActionModal([]),alert(this.translate.instant("lang.actionNotExist"))}}else try{this[t.component]()}catch(r){console.log(r),console.log(t),alert(this.translate.instant("lang.actionNotExist"))}}))}canExecuteAction(t,e=this.currentUserId,i=this.currentGroupId,n=this.currentBasketId){return new Promise(a=>{this.http.put(`../rest/resourcesList/users/${e}/groups/${i}/baskets/${n}/locked`,{resources:t}).pipe(Object(mt.a)(e=>{let i=this.translate.instant("lang.warnLockRes")+" : "+e.lockers.join(", ");e.countLockedResources!=t.length&&(i+=this.translate.instant("lang.warnLockRes2")+"."),e.countLockedResources>0&&alert(e.countLockedResources+" "+i),e.countLockedResources!=t.length?(this.currentResIds=e.resourcesToProcess,a(!0)):a(!1)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()})}hasLockResources(){return!this.functions.empty(this.currentResourceLock)}lockResource(t=this.currentUserId,e=this.currentGroupId,i=this.currentBasketId,n=this.currentResIds){console.debug("Lock resources : "+n),this.http.put(`../rest/resourcesList/users/${t}/groups/${e}/baskets/${i}/lock`,{resources:n}).pipe(Object(mt.a)(()=>console.debug("Cycle lock : ",this.currentResourceLock)),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe(),this.functions.empty(this.currentResourceLock)||clearInterval(this.currentResourceLock),this.currentResourceLock=setInterval(()=>{this.http.put(`../rest/resourcesList/users/${t}/groups/${e}/baskets/${i}/lock`,{resources:n}).pipe(Object(mt.a)(()=>console.debug("Cycle lock : ",this.currentResourceLock)),Object(m.a)(t=>(403===t.status&&clearInterval(this.currentResourceLock),this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()},5e4)}unlockResource(t=this.currentUserId,e=this.currentGroupId,i=this.currentBasketId,n=this.currentResIds){n.length>0&&(console.debug("Unlock resources : "+n),this.http.put(`../rest/resourcesList/users/${t}/groups/${e}/baskets/${i}/unlock`,{resources:n}).pipe(Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe())}stopRefreshResourceLock(){null!==this.currentResourceLock&&(console.debug("Cycle lock cancel"),clearInterval(this.currentResourceLock))}setDatasActionToSend(){return{resIds:this.currentResIds,resource:this.currentResourceInformations,action:this.currentAction,userId:this.currentUserId,groupId:this.currentGroupId,basketId:this.currentBasketId,indexActionRoute:this.indexActionRoute,processActionRoute:this.processActionRoute}}unlockResourceAfterActionModal(t){this.lockMode&&(this.stopRefreshResourceLock(),this.functions.empty(t)&&this.unlockResource())}endAction(t){"indexing"===this.mode&&!this.functions.empty(this.currentResourceInformations.followed)&&this.currentResourceInformations.followed&&this.headerService.nbResourcesFollowed++,this.notify.success(this.translate.instant("lang.action")+' : "'+this.currentAction.label+'" '+this.translate.instant("lang.done")),this.actionEnded=!0,this.eventAction.next(t)}confirmAction(t=null){this.dialog.open(Pu,{panelClass:"maarch-modal",disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}closeMailAction(t=null){this.dialog.open(Nu,{disableClose:!0,width:"500px",panelClass:"maarch-modal",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}closeAndIndexAction(t=null){this.dialog.open(Sp,{panelClass:"maarch-modal",disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}redirectInitiatorEntityAction(t=null){this.dialog.open(Ym,{panelClass:"maarch-modal",disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}closeMailWithAttachmentsOrNotesAction(t=null){this.dialog.open(sg,{panelClass:"maarch-modal",disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}updateAcknowledgementSendDateAction(t=null){this.dialog.open(Ap,{panelClass:"maarch-modal",disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}createAcknowledgementReceiptsAction(t=null){this.dialog.open(ib,{panelClass:"maarch-modal",disableClose:!0,width:"600px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}updateDepartureDateAction(t=null){this.dialog.open(cb,{panelClass:"maarch-modal",disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}disabledBasketPersistenceAction(t=null){this.dialog.open(bb,{disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}enabledBasketPersistenceAction(t=null){this.dialog.open(yb,{disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}resMarkAsReadAction(t=null){this.dialog.open(Mb,{disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}viewDoc(t=null){this.dialog.open(kb,{panelClass:"maarch-modal",data:this.setDatasActionToSend()})}sendExternalSignatoryBookAction(t=null){this.dialog.open(_f,{panelClass:"maarch-modal",disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}sendExternalNoteBookAction(t=null){this.dialog.open(If,{panelClass:"maarch-modal",disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}redirectAction(t=null){this.dialog.open(Om,{panelClass:"maarch-modal",disableClose:!0,data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}sendShippingAction(t=null){this.dialog.open(zm,{panelClass:"maarch-modal",disableClose:!0,minWidth:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}sendSignatureBookAction(t=null){this.dialog.open(Yg,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}continueVisaCircuitAction(t=null){this.dialog.open(pv,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}noConfirmAction(t=null){const e=this.setDatasActionToSend();0===e.resIds.length?this.http.post("../rest/resources",e.resource).pipe(Object(mt.a)(t=>{e.resIds=[t.resId]}),p(()=>this.http.put(e.indexActionRoute,{resource:e.resIds[0]})),Object(mt.a)(()=>{this.endAction(e.resIds)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe():this.http.put(e.processActionRoute,{resources:this.setDatasActionToSend().resIds}).pipe(Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}processDocument(t=null){this.router.navigate([`/process/users/${this.currentUserId}/groups/${this.currentGroupId}/baskets/${this.currentBasketId}/resId/${this.currentResIds}`])}signatureBookAction(t=null){this.router.navigate([`/signatureBook/users/${this.currentUserId}/groups/${this.currentGroupId}/baskets/${this.currentBasketId}/resources/${this.currentResIds}`])}documentDetails(t=null){this.router.navigate(["/resources/"+this.currentResIds])}rejectVisaBackToPreviousAction(t=null){this.dialog.open(tp,{panelClass:"maarch-modal",disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}resetVisaAction(t=null){this.dialog.open(up,{panelClass:"maarch-modal",disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}interruptVisaAction(t=null){this.dialog.open(Cp,{panelClass:"maarch-modal",disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}sendToOpinionCircuitAction(t=null){this.dialog.open(Jv,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}sendToParallelOpinion(t=null){this.dialog.open(M_,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}continueOpinionCircuitAction(t=null){this.dialog.open(b_,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}giveOpinionParallelAction(t=null){this.dialog.open(L_,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}validateParallelOpinionDiffusionAction(t=null){this.dialog.open(ey,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}reconcileAction(t=null){this.dialog.open(by,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(()=>{this.stopRefreshResourceLock()}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}sendAlfrescoAction(t=null){this.dialog.open(Ty,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>"success"===t),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}saveRegisteredMailAction(t=null){this.dialog.open(zy,{panelClass:"maarch-modal",disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}saveAndPrintRegisteredMailAction(t=null){this.dialog.open(Xy,{panelClass:"maarch-modal",disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}saveAndIndexRegisteredMailAction(t=null){this.dialog.open(tx,{panelClass:"maarch-modal",disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}printRegisteredMailAction(t=null){this.dialog.open(ox,{panelClass:"maarch-modal",disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}printDepositListAction(t=null){this.dialog.open(px,{panelClass:"maarch-modal",disableClose:!0,width:"500px",data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}sendToRecordManagementAction(t=null){this.dialog.open(Vx,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}checkReplyRecordManagementAction(t=null){this.dialog.open(Bx,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}resetRecordManagementAction(t=null){this.dialog.open(eC,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}checkAcknowledgmentRecordManagementAction(t=null){this.dialog.open(pC,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:this.setDatasActionToSend()}).afterClosed().pipe(Object(mt.a)(t=>{this.unlockResourceAfterActionModal(t)}),Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.endAction(t)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.ac(g.e),n.ac(v.b),n.ac(q.b),n.ac(D.a),n.ac(o.c),n.ac(y.a),n.ac(_t.a))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();const fC=["noteEditor"];function mC(t,e){1&t&&(n.Wb(0,"div",2),n.Rb(1,"mat-spinner",3),n.Vb())}function gC(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-note-editor",7,8),n.dc("refreshNotes",(function(e){return n.Dc(t),n.hc(2).loadNotes(e)})),n.Vb()}if(2&t){const t=n.hc(2);n.oc("addMode",!0)("resIds",t.resIds)("defaultRestriction",!0)}}function vC(t,e){1&t&&(n.Wb(0,"div",9),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noNote")," "))}function _C(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card-subtitle",16),n.Wb(1,"button",17),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).editNote(e)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",18),n.Vb(),n.Wb(4,"button",19),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).removeNote(e)})),n.ic(5,"translate"),n.Rb(6,"mat-icon",20),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.pc("title",n.jc(2,2,"lang.editNote")),n.Db(3),n.pc("title",n.jc(5,4,"lang.removeNote")))}function yC(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-note-editor",21,8),n.dc("refreshNotes",(function(e){return n.Dc(t),n.hc(3).loadNotes(e)})),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc(2);n.oc("resIds",e.resIds)("upMode",!0)("noteId",t.id)("entitiesNoteRestriction",e.getRestrictionEntitiesId(t.entities_restriction))("noteContent",t.value)}}function xC(t,e){if(1&t&&(n.Wb(0,"span",26),n.ic(1,"translate"),n.Rb(2,"i",27),n.Qc(3),n.Vb()),2&t){const t=e.$implicit;n.pc("title",n.jc(1,2,"lang.restrictedEntity")),n.Db(3),n.Sc(" ",t.short_label,"")}}function CC(t,e){if(1&t&&(n.Wb(0,"div",24),n.Oc(1,xC,4,4,"span",25),n.Vb()),2&t){const t=n.hc(2).$implicit;n.Db(1),n.oc("ngForOf",t.entities_restriction)}}function OC(t,e){if(1&t&&(n.Wb(0,"mat-card-content"),n.Wb(1,"p",22),n.Qc(2),n.Vb(),n.Oc(3,CC,2,1,"div",23),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(2),n.Sc(" ",t.value," "),n.Db(1),n.oc("ngIf",!e.functions.empty(t.entities_restriction))}}const DC=function(t){return{"background-color":t}};function wC(t,e){if(1&t&&(n.Wb(0,"mat-card",10),n.Wb(1,"mat-card-header"),n.Wb(2,"div",11),n.Rb(3,"i",12),n.Vb(),n.Wb(4,"mat-card-title"),n.Qc(5),n.Vb(),n.Wb(6,"mat-card-subtitle"),n.Qc(7),n.Vb(),n.Wb(8,"mat-card-subtitle",13),n.ic(9,"fullDate"),n.Qc(10),n.ic(11,"timeAgo"),n.Vb(),n.Oc(12,_C,7,6,"mat-card-subtitle",14),n.Vb(),n.Oc(13,yC,2,5,"app-note-editor",15),n.Oc(14,OC,4,2,"mat-card-content",1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.oc("ngStyle",n.vc(13,DC,t.entities_restriction?"#FFEDCC":"white")),n.Db(5),n.Tc("",t.firstname," ",t.lastname,""),n.Db(2),n.Rc(t.entity_label),n.Db(1),n.pc("title",n.jc(9,9,t.creation_date)),n.Db(2),n.Rc(n.jc(11,11,t.creation_date)),n.Db(2),n.oc("ngIf",t.user_id==i.headerService.user.id),n.Db(1),n.oc("ngIf",t.edit),n.Db(1),n.oc("ngIf",!t.edit)}}function MC(t,e){if(1&t&&(n.Ub(0),n.Oc(1,gC,2,3,"app-note-editor",4),n.Oc(2,vC,3,3,"div",5),n.Oc(3,wC,15,15,"mat-card",6),n.Tb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.editMode),n.Db(1),n.oc("ngIf",0==t.notes.length),n.Db(1),n.oc("ngForOf",t.notes)}}let kC=(()=>{class t{constructor(t,e,i,a,s,o){this.translate=t,this.http=e,this.notify=i,this.headerService=a,this.dialog=s,this.functions=o,this.notes=[],this.loading=!0,this.resIds=[],this.resId=null,this.editMode=!1,this.reloadBadgeNotes=new n.o}ngOnInit(){null!==this.resId&&this.http.get(`../rest/resources/${this.resId}/notes`).pipe(Object(mt.a)(t=>{this.resIds[0]=this.resId,this.notes=t.notes}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}loadNotes(t){this.resIds[0]=t,this.loading=!0,this.http.get("../rest/resources/"+this.resIds[0]+"/notes").subscribe(t=>{this.notes=t.notes,this.reloadBadgeNotes.emit(""+this.notes.length),this.loading=!1})}getRestrictionEntitiesId(t){return this.functions.empty(t)?[]:t.map(t=>t.item_id[0])}removeNote(t){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!1,data:{title:this.translate.instant("lang.confirmRemoveNote"),msg:this.translate.instant("lang.confirmAction")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.request("DELETE","../rest/notes/"+t.id)),Object(mt.a)(()=>{const e=this.notes.findIndex(e=>e.id==t.id);e>-1&&this.notes.splice(e,1),this.notify.success(this.translate.instant("lang.noteRemoved")),this.reloadBadgeNotes.emit(""+this.notes.length)})).subscribe()}editNote(t){t.edit=!t.edit}isModified(){return void 0!==this.noteEditor&&this.noteEditor.isWritingNote()}addNote(){this.noteEditor.addNote()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(q.b),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-notes-list"]],viewQuery:function(t,e){var i;1&t&&n.Xc(fC,!0),2&t&&n.yc(i=n.ec())&&(e.noteEditor=i.first)},inputs:{injectDatas:"injectDatas",resId:"resId",editMode:"editMode"},outputs:{reloadBadgeNotes:"reloadBadgeNotes"},decls:2,vars:2,consts:[["style","display:flex;height:100%;",4,"ngIf"],[4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],["style","margin: 20px;display: flex;flex-direction: column;",3,"addMode","resIds","defaultRestriction","refreshNotes",4,"ngIf"],["style","text-align:center;font-size:24px;font-weight:bold;opacity:0.3;",4,"ngIf"],["style","margin-top: 10px;",3,"ngStyle",4,"ngFor","ngForOf"],[2,"margin","20px","display","flex","flex-direction","column",3,"addMode","resIds","defaultRestriction","refreshNotes"],["noteEditor",""],[2,"text-align","center","font-size","24px","font-weight","bold","opacity","0.3"],[2,"margin-top","10px",3,"ngStyle"],["mat-card-avatar",""],["color","primary",1,"fa","fa-user"],[1,"dateNote",3,"title"],["class","removeNote",4,"ngIf"],["style","margin: 20px;display: flex;flex-direction: column;",3,"resIds","upMode","noteId","entitiesNoteRestriction","noteContent","refreshNotes",4,"ngIf"],[1,"removeNote"],["matSuffix","","mat-icon-button","",1,"editNote",3,"title","click"],["fontSet","fas","fontIcon","fa-pencil-alt fa-2x"],["matSuffix","","mat-icon-button","",2,"color","red",3,"title","click"],["fontSet","far","fontIcon","fa-trash-alt fa-2x"],[2,"margin","20px","display","flex","flex-direction","column",3,"resIds","upMode","noteId","entitiesNoteRestriction","noteContent","refreshNotes"],[1,"noteTextContent"],["style","overflow: auto;max-height: 75px;",4,"ngIf"],[2,"overflow","auto","max-height","75px"],["class","label label-default noteRestriction",3,"title",4,"ngFor","ngForOf"],[1,"label","label-default","noteRestriction",3,"title"],[1,"fa","fa-sitemap"]],template:function(t,e){1&t&&(n.Oc(0,mC,2,0,"div",0),n.Oc(1,MC,4,3,"ng-container",1)),2&t&&(n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[P.t,V.c,P.s,Du,K.a,P.w,K.f,K.c,K.m,K.l,k.b,Y.j,S.a,K.d],pipes:[g.d,uo,ps],styles:[".mat-card[_ngcontent-%COMP%]{margin:20px;padding:0;box-shadow:none;border:1px solid rgba(0,0,0,.12)}.mat-card-header[_ngcontent-%COMP%]{background:#f9f9f9;padding:10px}.mat-card-avatar[_ngcontent-%COMP%]{height:auto;width:auto;border-radius:0;display:flex;text-align:center}.mat-card-avatar[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{flex:1;font-size:25px;margin:auto}.mat-card-title[_ngcontent-%COMP%]{font-size:14px;font-weight:700;margin:0}.mat-card-subtitle[_ngcontent-%COMP%]{margin:0;padding-top:5px}.dateNote[_ngcontent-%COMP%]{position:absolute;right:10px;top:13px;font-size:12px;margin:0;color:#135f7f}.removeNote[_ngcontent-%COMP%]{position:absolute;top:22px;right:0}.editNote[_ngcontent-%COMP%]{margin-right:-10px;color:#135f7f}.noteTextContent[_ngcontent-%COMP%]{white-space:pre-line;padding:30px}.noteRestriction[_ngcontent-%COMP%]{background-color:rgba(0,0,0,.4);white-space:normal;display:inline-block;margin:5px!important}"]}),t})();const SC=["tableHistoryListSort"],IC=["autoCompleteInput"];function PC(t,e){1&t&&n.Rb(0,"mat-spinner")}function VC(t,e){if(1&t&&(n.Wb(0,"div",35),n.Oc(1,PC,1,0,"mat-spinner",10),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.isLoadingResults)}}function RC(t,e){1&t&&(n.Wb(0,"mat-option",36),n.Wb(1,"div",37),n.Rb(2,"mat-spinner",38),n.Vb(),n.Vb())}function jC(t,e){if(1&t&&(n.Wb(0,"mat-option",42),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2).$implicit,a=n.hc(2);n.Lc("color",t.used?"":a.filterColor[i.key]),n.oc("id",i.key)("value",t)("disabled",t.used),n.Db(1),n.Sc(" ",t.label," ")}}function AC(t,e){if(1&t&&(n.Wb(0,"mat-optgroup",40),n.ic(1,"translate"),n.Oc(2,jC,2,6,"mat-option",41),n.ic(3,"sortBy"),n.ic(4,"async"),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc(2);n.oc("label",n.jc(1,2,"lang."+t.key)),n.Db(2),n.oc("ngForOf",n.kc(3,4,n.jc(4,7,e.filteredList[t.key]),"label"))}}function WC(t,e){if(1&t&&(n.Ub(0),n.Oc(1,AC,5,9,"mat-optgroup",39),n.ic(2,"async"),n.Tb()),2&t){const t=e.$implicit,a=n.hc(2);var i;n.Db(1),n.oc("ngIf",(null==(i=n.jc(2,1,a.filteredList[t.key]))?null:i.length)>0)}}function TC(t,e){if(1&t&&(n.Ub(0),n.Oc(1,WC,3,3,"ng-container",18),n.ic(2,"keyvalue"),n.Tb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",n.jc(2,1,t.filterList))}}function EC(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",43),n.dc("click",(function(){return n.Dc(t),n.hc().switchHistoryMode()})),n.ic(1,"translate"),n.ic(2,"translate"),n.Rb(3,"mat-icon",44),n.Vb()}if(2&t){const t=n.hc();n.oc("title",t.fullHistoryMode?n.jc(2,7,"lang.viewActionsHistory"):n.jc(1,5,"lang.viewAllHistory")),n.Db(3),n.Ib("fa-exchange-alt",t.fullHistoryMode)("fa-history",!t.fullHistoryMode)}}function FC(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",46),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=e.index,s=n.hc(2).$implicit;return n.hc().removeItemFilter(i,s.key,a)})),n.ic(1,"translate"),n.Qc(2),n.Rb(3,"i",47),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2).$implicit,a=n.hc();n.Lc("background",a.filterColor[i.key]),n.oc("title",n.jc(1,4,"lang."+i.key)),n.Db(2),n.Sc("",t.label," ")}}function LC(t,e){if(1&t&&(n.Ub(0),n.Oc(1,FC,4,6,"span",45),n.Tb()),2&t){const t=n.hc().$implicit,e=n.hc();n.Db(1),n.oc("ngForOf",e.filterUsed[t.key])}}const QC=function(){return["startDate","endDate"]};function NC(t,e){if(1&t&&(n.Ub(0),n.Oc(1,LC,2,1,"ng-container",10),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",-1===n.uc(1,QC).indexOf(t.key))}}function zC(t,e){1&t&&(n.Wb(0,"mat-header-cell",48),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.event")))}function BC(t,e){if(1&t&&(n.Wb(0,"div",51),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Sc(" ",t.userLabel," ")}}function UC(t,e){if(1&t&&(n.Wb(0,"mat-cell",49),n.ic(1,"fullDate"),n.Oc(2,BC,2,1,"div",50),n.Wb(3,"div"),n.Qc(4),n.ic(5,"ucfirst"),n.ic(6,"timeAgo"),n.Vb(),n.Vb()),2&t){const t=e.$implicit,i=n.hc();n.Ib("smallText",null!==i.resId),n.oc("title",n.jc(1,5,t.event_date)),n.Db(2),n.oc("ngIf",null!==i.resId),n.Db(2),n.Sc(" ",n.jc(5,7,n.kc(6,9,t.event_date,"full"))," ")}}function $C(t,e){1&t&&(n.Wb(0,"mat-header-cell"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.technicalId")))}function HC(t,e){if(1&t&&(n.Wb(0,"mat-cell",52),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.record_id," ")}}function GC(t,e){1&t&&(n.Wb(0,"mat-header-cell",48),n.Qc(1),n.ic(2,"ucfirst"),n.ic(3,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,n.jc(3,3,"lang.user"))))}function XC(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.userLabel," ")}}function qC(t,e){1&t&&(n.Wb(0,"mat-header-cell",53),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.information")," "))}function KC(t,e){if(1&t&&(n.Wb(0,"mat-cell",54),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.info," ")}}function YC(t,e){1&t&&(n.Wb(0,"mat-header-cell",48),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.ip")," "))}function JC(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.remote_ip," ")}}function ZC(t,e){1&t&&n.Rb(0,"mat-header-row")}function tO(t,e){if(1&t&&(n.Ub(0),n.Oc(1,ZC,1,0,"mat-header-row",55),n.Tb()),2&t){const t=n.hc();n.Db(1),n.oc("matHeaderRowDef",t.displayedColumnsHistory)}}function eO(t,e){1&t&&n.Rb(0,"mat-row")}let iO=(()=>{class t{constructor(t,e,i,a,s,o,r,c){this.translate=t,this.http=e,this.notify=i,this.headerService=a,this.dialog=s,this.functions=o,this.latinisePipe=r,this.privilegeService=c,this.loading=!1,this.fullHistoryMode=!0,this.filtersChange=new n.o,this.displayedColumnsHistory=["event_date","userLabel","info","remote_ip"],this.isLoadingResults=!0,this.routeUrl="../rest/history",this.filterListUrl="../rest/history/availableFilters",this.extraParamUrl="",this.resultsLength=0,this.searchHistory=new X.i,this.startDateFilter="",this.endDateFilter="",this.filterUrl="",this.filterList=null,this.filteredList={},this.filterUsed={},this.filterColor={startDate:"#b5cfd8",endDate:"#7393a7",actions:"#7d5ba6",systemActions:"#7d5ba6",users:"#009dc5"},this.loadingFilters=!0,this.resId=null,this.destroy$=new da.a}ngOnInit(){null!==this.resId?(this.displayedColumnsHistory=["event_date","info"],this.fullHistoryMode=!this.privilegeService.hasCurrentUserPrivilege("view_doc_history")):this.displayedColumnsHistory=["event_date","record_id","userLabel","info","remote_ip"],this.loading=!0,this.initHistoryMode(),this.initHistoryList()}switchHistoryMode(){this.fullHistoryMode=!this.fullHistoryMode,this.initHistoryMode(),this.refreshDao()}resetFilter(){this.loadingFilters=!0,this.filterList=null,this.filterUsed={},this.filterUrl=""}initHistoryMode(){this.resetFilter(),this.fullHistoryMode?(this.extraParamUrl=null!==this.resId?"&resId="+this.resId:"",this.filterListUrl=null!==this.resId?"../rest/history/availableFilters?resId="+this.resId:"../rest/history/availableFilters"):(this.extraParamUrl=null!==this.resId?`&resId=${this.resId}&onlyActions=true`:"&onlyActions=true",this.filterListUrl=null!==this.resId?`../rest/history/availableFilters?resId=${this.resId}&onlyActions=true`:"../rest/history/availableFilters?onlyActions=true")}initHistoryList(){this.resultListDatabase=new nO(this.http),this.paginator.pageIndex=0,this.sort.active="event_date",this.sort.direction="desc",this.sort.sortChange.subscribe(()=>this.paginator.pageIndex=0),Object(gy.a)(this.sort.sortChange,this.paginator.page,this.filtersChange).pipe(Object(Zo.a)(this.destroy$),Object(Qe.a)({}),Object(ft.a)(()=>{this.isLoadingResults=!0;let t="";return this.functions.empty(this.searchHistory.value)||(t="&search="+this.searchHistory.value),this.resultListDatabase.getRepoIssues(this.sort.active,this.sort.direction,this.paginator.pageIndex,this.routeUrl,this.filterUrl,this.extraParamUrl,t)}),Object(l.a)(t=>(this.isLoadingResults=!1,t=this.processPostData(t),this.resultsLength=t.count,t.history)),Object(m.a)(t=>(this.notify.handleErrors(t),this.isLoadingResults=!1,Object(c.a)([])))).subscribe(t=>this.data=t)}processPostData(t){return t.history=t.history.map(t=>Object.assign(Object.assign({},t),{userLabel:this.functions.empty(t.userLabel)?this.translate.instant("lang.userDeleted"):t.userLabel})),t}refreshDao(){this.paginator.pageIndex=0,this.filtersChange.emit()}initFilterListHistory(){null===this.filterList&&(this.filterList={},this.filterUsed={},this.filterUrl="",this.loadingFilters=!0,this.http.get(this.filterListUrl).pipe(Object(l.a)(t=>{let e=t.actions.filter(t=>null===t.label).map(t=>t.id),i=t.users.filter(t=>null===t.label).map(t=>t.login);return t.actions=t.actions.filter(t=>null!==t.label),e.length>0&&t.actions.push({id:e,label:this.translate.instant("lang.actionDeleted")}),t.users=t.users.filter(t=>null!==t.label),i.length>0&&t.users.push({id:i,label:this.translate.instant("lang.userDeleted")}),t.systemActions=t.systemActions.map(t=>({id:t.id,label:this.functions.empty(this.translate.instant("lang."+t.id))?t.id:this.translate.instant("lang."+t.id)})),t}),Object(mt.a)(t=>{Object.keys(t).forEach(e=>{this.functions.empty(this.filterList[e])&&(this.filterList[e]=[],this.filteredList[e]=[]),t[e].forEach(t=>{this.filterList[e].push(t)}),this.filteredList[e]=this.searchHistory.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>t?this.filter(t,e):this.filterList[e].slice()))})}),Object(Xt.a)(()=>this.loadingFilters=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe())}filterStartDate(){this.functions.empty(this.filterUsed.startDate)&&(this.filterUsed.startDate=[]),this.filterUsed.startDate[0]={id:this.functions.empty(this.startDateFilter)?"":this.functions.formatDateObjectToDateString(this.startDateFilter),label:this.functions.empty(this.startDateFilter)?"":this.functions.formatDateObjectToDateString(this.startDateFilter)},this.generateUrlFilter(),this.refreshDao()}filterEndDate(){this.functions.empty(this.filterUsed.endDate)&&(this.filterUsed.endDate=[]),this.filterUsed.endDate[0]={id:this.functions.empty(this.endDateFilter)?"":this.functions.formatDateObjectToDateString(this.endDateFilter,!0),label:this.functions.empty(this.endDateFilter)?"":this.functions.formatDateObjectToDateString(this.endDateFilter)},this.generateUrlFilter(),this.refreshDao()}addItemFilter(t){t.value.used=!0,this.functions.empty(this.filterUsed[t.id])&&(this.filterUsed[t.id]=[]),this.filterUsed[t.id].push(t.value),this.generateUrlFilter(),this.searchHistory.reset(),this.autoCompleteInput.nativeElement.blur(),this.refreshDao()}removeItemFilter(t,e,i){t.used=!1,this.filterUsed[e].splice(i,1),this.generateUrlFilter(),this.refreshDao()}generateUrlFilter(){this.filterUrl="";let t=[];Object.keys(this.filterUsed).forEach(e=>{this.filterUsed[e].forEach(i=>{this.functions.empty(i.id)||(["startDate","endDate"].indexOf(e)>-1?t.push(`${e}=${i.id}`):t.push(`${e}[]=${i.id}`))})}),t.length>0&&(this.filterUrl="&"+t.join("&"))}directSearchHistory(){this.refreshDao()}filter(t,e){if("string"==typeof t){const i=this.latinisePipe.transform(t.toLowerCase());return this.filterList[e].filter(t=>this.latinisePipe.transform(t.label.toLowerCase()).includes(i))}return this.filterList[e]}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(q.b),n.Qb(_t.a),n.Qb(Tt.c),n.Qb(Dt.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-history-list"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(Kt.a,!0),n.Kc(SC,!0),n.Kc(IC,!0)),2&t&&(n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first),n.yc(i=n.ec())&&(e.autoCompleteInput=i.first))},inputs:{resId:"resId"},decls:45,vars:27,consts:[["class","example-loading-shade",4,"ngIf"],[1,"table-head"],[1,"table-head-result"],[3,"ngSubmit"],["floatLabel","never",2,"font-size","13px"],["type","text","matInput","","maxlength","128",3,"matAutocomplete","placeholder","formControl","click"],["autoCompleteInput",""],[3,"optionSelected","opened"],["auto","matAutocomplete"],["disabled","",4,"ngIf"],[4,"ngIf"],["mat-button","","matSuffix","","mat-icon-button","",2,"float","right",3,"title","click"],["color","primary",1,"fa","fa-search"],["color","primary","mat-icon-button","",3,"title","click",4,"ngIf"],[1,"table-head-tool"],[1,"paginatorResultList",3,"length","hidePageSize","pageSize"],["paginatorHistoryList",""],[1,"filterBadges"],[4,"ngFor","ngForOf"],["id","history-list","matSort","","matSortActive","event_date","matSortDirection","desc",2,"width","100%",3,"dataSource"],["tableHistoryListSort","matSort"],["matColumnDef","event_date"],["mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"title","smallText",4,"matCellDef"],["matColumnDef","record_id"],[4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","userLabel"],[4,"matCellDef"],["matColumnDef","info"],["mat-sort-header","","style","flex: 2;",4,"matHeaderCellDef"],["style","flex: 2;",4,"matCellDef"],["matColumnDef","remote_ip"],[4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],[1,"example-loading-shade"],["disabled",""],[2,"display","flex","justify-content","center"],["diameter","35"],["class","filterList",3,"label",4,"ngIf"],[1,"filterList",3,"label"],[3,"id","color","value","disabled",4,"ngFor","ngForOf"],[3,"id","value","disabled"],["color","primary","mat-icon-button","",3,"title","click"],[1,"fas"],["class","label",3,"background","title","click",4,"ngFor","ngForOf"],[1,"label",3,"title","click"],[1,"fa","fa-times-circle"],["mat-sort-header",""],["mat-cell","",3,"title"],["style","font-size: 10px;",4,"ngIf"],[2,"font-size","10px"],["mat-cell",""],["mat-sort-header","",2,"flex","2"],[2,"flex","2"],[4,"matHeaderRowDef"]],template:function(t,e){if(1&t&&(n.Oc(0,VC,2,1,"div",0),n.Wb(1,"div",1),n.Wb(2,"div",2),n.Wb(3,"form",3),n.dc("ngSubmit",(function(){return e.directSearchHistory()})),n.Wb(4,"mat-form-field",4),n.Wb(5,"input",5,6),n.dc("click",(function(t){return t.stopPropagation()})),n.ic(7,"translate"),n.Vb(),n.Wb(8,"mat-autocomplete",7,8),n.dc("optionSelected",(function(t){return e.addItemFilter(t.option)}))("opened",(function(){return e.initFilterListHistory()})),n.Oc(10,RC,3,0,"mat-option",9),n.Oc(11,TC,3,3,"ng-container",10),n.Vb(),n.Wb(12,"button",11),n.dc("click",(function(){return e.directSearchHistory()})),n.ic(13,"translate"),n.Rb(14,"mat-icon",12),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Oc(15,EC,4,9,"button",13),n.Wb(16,"div",14),n.Rb(17,"mat-paginator",15,16),n.Vb(),n.Vb(),n.Wb(19,"div"),n.Wb(20,"div",17),n.Oc(21,NC,2,2,"ng-container",18),n.ic(22,"keyvalue"),n.Vb(),n.Wb(23,"mat-table",19,20),n.Ub(25,21),n.Oc(26,zC,3,3,"mat-header-cell",22),n.Oc(27,UC,7,12,"mat-cell",23),n.Tb(),n.Ub(28,24),n.Oc(29,$C,3,3,"mat-header-cell",25),n.Oc(30,HC,2,1,"mat-cell",26),n.Tb(),n.Ub(31,27),n.Oc(32,GC,4,5,"mat-header-cell",22),n.Oc(33,XC,2,1,"mat-cell",28),n.Tb(),n.Ub(34,29),n.Oc(35,qC,3,3,"mat-header-cell",30),n.Oc(36,KC,2,1,"mat-cell",31),n.Tb(),n.Ub(37,32),n.Oc(38,YC,3,3,"mat-header-cell",22),n.Oc(39,JC,2,1,"mat-cell",28),n.Tb(),n.Oc(40,tO,2,1,"ng-container",10),n.Oc(41,eO,1,0,"mat-row",33),n.Vb(),n.Wb(42,"div",34),n.Qc(43),n.ic(44,"translate"),n.Vb(),n.Vb()),2&t){const t=n.zc(9);n.oc("ngIf",e.isLoadingResults),n.Db(5),n.oc("matAutocomplete",t)("placeholder",n.jc(7,19,"lang.filterBy"))("formControl",e.searchHistory),n.Db(5),n.oc("ngIf",e.loadingFilters),n.Db(1),n.oc("ngIf",null!==e.filterList&&!e.loadingFilters),n.Db(1),n.oc("title",n.jc(13,21,"lang.search")),n.Db(3),n.oc("ngIf",e.privilegeService.hasCurrentUserPrivilege("view_full_history")&&e.privilegeService.hasCurrentUserPrivilege("view_doc_history")),n.Db(2),n.oc("length",e.resultsLength)("hidePageSize",!0)("pageSize",10),n.Db(2),n.Ib("table-admin",null===e.resId),n.Db(2),n.oc("ngForOf",n.jc(22,23,e.filterUsed)),n.Db(2),n.oc("dataSource",e.data),n.Db(17),n.oc("ngIf",null===e.resId),n.Db(1),n.oc("matRowDefColumns",e.displayedColumnsHistory),n.Db(2),n.Tc(" ",e.resultsLength," ",n.jc(44,25,"lang.elements"),"")}},directives:[P.t,X.K,X.v,X.w,Y.c,J.b,Ne.d,X.d,X.p,X.u,X.j,Ne.a,k.b,Y.j,S.a,Kt.a,P.s,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.n,V.c,W.p,W.o,vt.h,Fe.b,vt.a,vt.k,vt.j,vt.m],pipes:[g.d,P.l,P.b,Wt.a,uo,Tt.u,ps],styles:[".active[_ngcontent-%COMP%], .active[_ngcontent-%COMP%]:active, .active[_ngcontent-%COMP%]:focus, .active[_ngcontent-%COMP%]:hover{color:#135f7f;border-left:5px solid #135f7f;background:rgba(19,95,127,.14)}.paginatorResultList[_ngcontent-%COMP%] .mat-paginator-range-label{justify-content:flex-end;display:flex}.filterList[_ngcontent-%COMP%] .mat-optgroup-label{color:#135f7f;position:-webkit-sticky;position:sticky;top:0;background:#fff!important;z-index:1}.label[_ngcontent-%COMP%]{cursor:pointer;margin:5px}.bg-head-content[_ngcontent-%COMP%] .mat-focused .mat-form-field-label{color:#fff!important}.bg-head-content[_ngcontent-%COMP%] .mat-form-field-ripple, .bg-head-content[_ngcontent-%COMP%] .mat-form-field-underline{background-color:#fff!important}.bg-head-content[_ngcontent-%COMP%] .mat-datepicker-toggle[_ngcontent-%COMP%], .bg-head-content[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{color:#fff}.table-admin[_ngcontent-%COMP%]{height:90%;overflow:auto;position:absolute;width:100%}.smallText[_ngcontent-%COMP%]{flex-direction:column;align-items:center;justify-content:center;font-size:10px;opacity:.5;width:150px;flex:initial}"]}),t})();class nO{constructor(t){this.http=t}getRepoIssues(t,e,i,n,a,s,o){return this.http.get(`${n}?limit=10&offset=${10*i}&order=${e}&orderBy=${t}${a}${s}${o}`)}}let aO=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.data=i,this.dialogRef=n,this.notify=a}onSubmit(){this.http.post("../rest/searchTemplates",this.data.searchTemplate).pipe(Object(mt.a)(t=>{this.data.searchTemplate.id=t.id,this.notify.success(this.translate.instant("lang.searchTemplateAdded")),this.dialogRef.close(this.data)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.a),n.Qb(q.h),n.Qb(D.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:23,vars:20,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],[3,"ngSubmit"],["submitForm","ngForm"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","15px"],["appearance","outline"],["matInput","","name","label","required","","maxlength","256",3,"placeholder","ngModel","ngModelChange"],["mat-raised-button","","color","primary","type","submit",3,"disabled","click"],["mat-raised-button","","color","default","type","button",3,"click"]],template:function(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-dialog-content"),n.Wb(5,"form",2,3),n.dc("ngSubmit",(function(){return e.onSubmit()})),n.Wb(7,"div",4),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Wb(10,"mat-form-field",5),n.Wb(11,"mat-label"),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Wb(14,"input",6),n.dc("ngModelChange",(function(t){return e.data.searchTemplate.label=t})),n.ic(15,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(16,"mat-dialog-actions"),n.Wb(17,"button",7),n.dc("click",(function(){return n.Dc(t),n.zc(6).ngSubmit.emit()})),n.Qc(18),n.ic(19,"translate"),n.Vb(),n.Wb(20,"button",8),n.dc("click",(function(){return e.dialogRef.close()})),n.Qc(21),n.ic(22,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(6);n.Db(2),n.Rc(n.jc(3,8,"lang.searchTemplateCreation")),n.Db(6),n.Sc("",n.jc(9,10,"lang.addSearchTemplateMsg")," "),n.Db(4),n.Rc(n.jc(13,12,"lang.label")),n.Db(2),n.pc("placeholder",n.jc(15,14,"lang.label")),n.oc("ngModel",e.data.searchTemplate.label),n.Db(3),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(19,16,"lang.validate")),n.Db(3),n.Rc(n.jc(22,18,"lang.cancel"))}},directives:[q.i,q.f,X.K,X.v,X.w,Y.c,Y.g,J.b,X.d,X.F,X.p,X.u,X.x,q.c,k.b],pipes:[g.d],styles:["mat-icon[_ngcontent-%COMP%]{height:auto!important}"]}),t})();const sO=["searchSelectInput"],oO=["test"];function rO(t,e){if(1&t&&(n.Wb(0,"mat-label"),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Rc(t.label)}}function cO(t,e){if(1&t&&(n.Wb(0,"span",15),n.Qc(1),n.ic(2,"lowercase"),n.ic(3,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Tc(" (+",t.formControlSelect.value.length-1," ",n.jc(2,2,n.jc(3,4,"lang.others")),") ")}}function lO(t,e){if(1&t&&(n.Wb(0,"mat-select-trigger"),n.Qc(1),n.Oc(2,cO,4,6,"span",14),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Sc(" ",t.formControlSelect.value?t.getFirstDataLabel():""," "),n.Db(1),n.oc("ngIf",(null==t.formControlSelect.value?null:t.formControlSelect.value.length)>1)}}function dO(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",16),n.dc("click",(function(){return n.Dc(t),n.hc()._reset(!0)})),n.Rb(1,"mat-icon",17),n.Vb()}}function hO(t,e){1&t&&n.Rb(0,"mat-spinner",18)}function uO(t,e){1&t&&(n.Wb(0,"div",19),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noResult")," "))}function pO(t,e){1&t&&(n.Wb(0,"mat-option",20),n.Wb(1,"i"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()),2&t&&(n.oc("value",null),n.Db(2),n.Sc("(",n.jc(3,2,"lang.emptyValue"),")"))}function bO(t,e){if(1&t&&(n.Wb(0,"mat-option",21),n.Rb(1,"span",22),n.Vb()),2&t){const t=e.$implicit,i=n.hc();n.Lc("color",t.color),n.Ib("opt-group",t.isTitle),n.oc("value","id"===i.returnValue?t.id:t)("title",void 0!==t.title?t.title:t.label)("disabled",t.disabled),n.Db(1),n.oc("innerHTML",t.label,n.Ec)}}function fO(t,e){if(1&t&&(n.Wb(0,"mat-error"),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Sc(" ",t.getErrorMsg(t.formControlSelect.errors),"")}}function mO(t,e){if(1&t&&n.Rb(0,"mat-icon",23),2&t){const t=n.hc();n.Lc("color",t.suffixIcon.color),n.oc("title",void 0!==t.suffixIcon.title?t.suffixIcon.title:"")}}const gO=function(t){return{"mat-select-search-inner-multiple":t}};let vO=(()=>{class t{constructor(t,e,i,a,s,o,r,c){this.http=t,this.translate=e,this.latinisePipe=i,this.changeDetectorRef=a,this.renderer=s,this.appService=o,this.functions=r,this.sortPipe=c,this.placeholderLabel=this.translate.instant("lang.chooseValue"),this.formControlSelect=new X.i,this.datas=[],this.returnValue="id",this.id="",this.showLabel=!1,this.required=!1,this.hideErrorDesc=!0,this.multiple=!1,this.optGroupTarget=null,this.optGroupList=null,this.suffixIcon=null,this.class="input-form",this.afterSelected=new n.o,this.afterOpened=new n.o,this.filteredDatasMulti=new la.a(1),this.overlayClassSet=!1,this.change=new n.o,this._onDestroy=new da.a,this.formControlSearch=new X.i,this.noResult=null,this.loadingSearch=null,this.onChange=t=>{},this.onTouched=t=>{}}get value(){return this._value}ngOnInit(){null!==this.optGroupList&&this.initOptGroups();const t="mat-select-search-panel";this.matSelect.panelClass?Array.isArray(this.matSelect.panelClass)?this.matSelect.panelClass.push(t):"string"==typeof this.matSelect.panelClass?this.matSelect.panelClass=[this.matSelect.panelClass,t]:"object"==typeof this.matSelect.panelClass&&(this.matSelect.panelClass[t]=!0):this.matSelect.panelClass=t,this.matSelect.openedChange.pipe(Object(Zo.a)(this._onDestroy)).subscribe(t=>{t?this.appService.getViewMode()||(this.noResult=null,this._focus()):this.formControlSearch.reset()}),this.matSelect.openedChange.pipe(Object(ro.a)(1)).pipe(Object(Zo.a)(this._onDestroy)).subscribe(()=>{this._options=this.matSelect.options,this._options.changes.pipe(Object(Zo.a)(this._onDestroy)).subscribe(()=>{const t=this.matSelect._keyManager;t&&this.matSelect.panelOpen&&setTimeout(()=>{t.setFirstItemActive()})})}),this.formControlSearch.valueChanges.pipe(Object(pt.a)(300),Object(d.a)(t=>null!==t&&t.length>2),Object(mt.a)(()=>this.loadingSearch=!0),Object(ft.a)(t=>this.getDatas(t)),Object(mt.a)(t=>{let e=[],i=[],n=[];this.functions.empty(this.formControlSelect.value)||(n="id"===this.returnValue?this.formControlSelect.value:this.formControlSelect.value.map(t=>null!==t?t.id:null)),e=this.datas.filter(t=>n.indexOf(t.id)>-1),i=t.filter(t=>-1===n.indexOf(t.id)),this.datas=e.concat(i),this.filteredDatas=Object(c.a)(this.datas),this.noResult=0===this.datas.filter(t=>-1===this.formControlSelect.value.indexOf(t.id)).length,this.loadingSearch=!1})).subscribe()}resetACDatas(){this.datas=this.datas.filter("id"===this.returnValue?t=>this.formControlSelect.value.indexOf(t.id)>-1:t=>this.formControlSelect.value.map(t=>null!==t?t.id:null).indexOf(t.id)>-1),this.filteredDatas=Object(c.a)(this.datas)}initOptGroups(){this.datas.unshift({id:0,label:"toto",disabled:!0});let t=[];this.optGroupList=this.sortPipe.transform(this.optGroupList,"label"),this.optGroupList.forEach(e=>{t.push({id:e.id,label:e.label,disabled:!0}),t=t.concat(this.datas.filter(t=>t[this.optGroupTarget]===e.id).map(t=>Object.assign(Object.assign({},t),{title:t.label,label:"  "+t.label})))}),this.datas=t}ngOnDestroy(){this._onDestroy.next(),this._onDestroy.complete()}ngAfterViewInit(){this.datas.length>5&&this.setOverlayClass()}_handleKeydown(t){32===t.keyCode&&t.stopPropagation()}writeValue(t){t!==this._value&&(this._value=t,this.change.emit(t))}onInputChange(t){t!==this._value&&(this._value=t,this.onChange(t),this.change.emit(t))}onBlur(t){this.writeValue(t),this.onTouched()}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}_focus(){const t=this.matSelect.panel.nativeElement,e=t.scrollTop;this.renderer.selectRootElement("#searchSelectInput").focus(),t.scrollTop=e}_reset(t){this.formControlSearch.reset(),this.resetACDatas(),this.renderer.selectRootElement("#searchSelectInput").focus()}setOverlayClass(){this.overlayClassSet||(this.matSelect.overlayDir.attach.pipe(Object(Zo.a)(this._onDestroy)).subscribe(()=>{void 0!==this.searchSelectInput&&this.searchSelectInput.nativeElement.parentElement.parentElement.parentElement.parentElement.parentElement.classList.add("cdk-overlay-pane-select-search")}),this.overlayClassSet=!0)}initMultipleHandling(){this.matSelect.valueChange.pipe(Object(Zo.a)(this._onDestroy)).subscribe(t=>{if(this.matSelect.multiple){let e=!1;if(this._value&&this._value.length&&this.previousSelectedValues&&Array.isArray(this.previousSelectedValues)){t&&Array.isArray(t)||(t=[]);const i=this.matSelect.options.map(t=>t.value);this.previousSelectedValues.forEach(n=>{-1===t.indexOf(n)&&-1===i.indexOf(n)&&(t.push(n),e=!0)})}e&&this.matSelect._onChange(t),this.previousSelectedValues=t}})}_filter(t,e=!1){if("__SELECTED"===t)return this.datas.filter(t=>this.formControlSelect.value.indexOf(t.id)>-1);if("string"==typeof t&&""!==t){const e=this.latinisePipe.transform(t.toLowerCase());return this.datas.filter(t=>!t.disabled&&this.latinisePipe.transform(t.label.toLowerCase()).includes(e))}return this.datas}launchEvent(t){void 0!==this.afterSelected&&this.afterSelected.emit(this.datas.filter(e=>e.id===t.value)[0])}getErrorMsg(t){return void 0!==t.required?this.translate.instant("lang.requiredField"):void 0!==t.pattern||void 0!==t.email?this.translate.instant("lang.badFormat"):"unknow validator"}getDatas(t){const e=[],i=[];return this.routeDatas.forEach(i=>{e.push(this.http.get(".."+i,{params:{search:t}}))}),Object(Le.a)(e).pipe(Object(l.a)(t=>(t.forEach(t=>{t.forEach(t=>{let e={id:t.id,label:t.idToDisplay};if(this.extraModel.length>0){const i=this.getExtraDatas(t);e=Object.assign(Object.assign({},e),i)}i.push(e)})}),i)))}getExtraDatas(t){const e={};return Object.keys(t).forEach(i=>{this.extraModel.indexOf(i)>-1&&(e[i]=t[i])}),e}getFirstDataLabel(){return"id"===this.returnValue?this.formControlSelect.value[0].label:this.formControlSelect.value.map(t=>null!==t?t.label:this.translate.instant("lang.emptyValue"))[0]}getDataLabel(t){return"id"===this.returnValue?this.datas.filter(e=>e.id===t)[0].label:this.datas.filter(e=>e.id===t.id)[0].label}setDatas(t){this.datas=t}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(v.b),n.Qb(g.e),n.Qb(Tt.c),n.Qb(n.h),n.Qb(n.I),n.Qb(w.a),n.Qb(_t.a),n.Qb(Wt.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["plugin-select-autocomplete-search"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(sO,!0,n.l),n.Kc(oO,!0)),2&t&&(n.yc(i=n.ec())&&(e.searchSelectInput=i.first),n.yc(i=n.ec())&&(e.matSelect=i.first))},inputs:{placeholderLabel:"placeholderLabel",formControlSelect:"formControlSelect",datas:"datas",returnValue:"returnValue",label:"label",id:"id",showResetOption:"showResetOption",showLabel:"showLabel",required:"required",hideErrorDesc:"hideErrorDesc",multiple:"multiple",optGroupTarget:"optGroupTarget",routeDatas:"routeDatas",extraModel:"extraModel",optGroupList:"optGroupList",suffixIcon:"suffixIcon",class:"class"},outputs:{afterSelected:"afterSelected",afterOpened:"afterOpened"},features:[n.Cb([Wt.a])],decls:18,vars:26,consts:[[3,"floatLabel"],[4,"ngIf"],[3,"id","formControl","placeholder","required","multiple","selectionChange","openedChange"],["test",""],["matInput","",1,"mat-select-search-input","mat-select-search-hidden"],[1,"mat-select-search-inner",3,"ngClass"],["id","searchSelectInput",1,"mat-select-search-input",3,"formControl","placeholder","keydown","input","blur"],["searchSelectInput",""],["mat-button","","mat-icon-button","","aria-label","Clear","class","mat-select-search-clear",3,"click",4,"ngIf"],["class","mat-select-search-loading","diameter","24",4,"ngIf"],["class","mat-select-search-no-entries-found","style","font-style: italic;opacity: 0.5;",4,"ngIf"],[3,"value",4,"ngIf"],[3,"value","title","disabled","opt-group","color",4,"ngFor","ngForOf"],["style","height: auto;","matSuffix","","class","fas fa-circle selectSuffixIcon",3,"color","title",4,"ngIf"],["class","multipleLabels",4,"ngIf"],[1,"multipleLabels"],["mat-button","","mat-icon-button","","aria-label","Clear",1,"mat-select-search-clear",3,"click"],[1,"fa","fa-times"],["diameter","24",1,"mat-select-search-loading"],[1,"mat-select-search-no-entries-found",2,"font-style","italic","opacity","0.5"],[3,"value"],[3,"value","title","disabled"],[3,"innerHTML"],["matSuffix","",1,"fas","fa-circle","selectSuffixIcon",2,"height","auto",3,"title"]],template:function(t,e){1&t&&(n.Wb(0,"mat-form-field",0),n.Oc(1,rO,2,1,"mat-label",1),n.Wb(2,"mat-select",2,3),n.dc("selectionChange",(function(t){return e.launchEvent(t)}))("openedChange",(function(){return e.resetACDatas()})),n.Oc(4,lO,3,2,"mat-select-trigger",1),n.Rb(5,"input",4),n.Wb(6,"div",5),n.Wb(7,"input",6,7),n.dc("keydown",(function(t){return e._handleKeydown(t)}))("input",(function(t){return e.onInputChange(t.target.value)}))("blur",(function(t){return e.onBlur(t.target.value)})),n.ic(9,"translate"),n.Vb(),n.Oc(10,dO,2,0,"button",8),n.Oc(11,hO,1,0,"mat-spinner",9),n.Vb(),n.Oc(12,uO,3,3,"div",10),n.Oc(13,pO,4,4,"mat-option",11),n.Oc(14,bO,2,8,"mat-option",12),n.ic(15,"async"),n.Vb(),n.Oc(16,fO,2,1,"mat-error",1),n.Oc(17,mO,1,3,"mat-icon",13),n.Vb()),2&t&&(n.Fb(e.class+" search-select"),n.oc("floatLabel",e.appService.getViewMode()||e.showLabel?"":"never"),n.Db(1),n.oc("ngIf",e.appService.getViewMode()||e.showLabel),n.Db(1),n.oc("id",e.id)("formControl",e.formControlSelect)("placeholder",e.placeholderLabel)("required",e.required)("multiple",e.multiple),n.Db(2),n.oc("ngIf",e.multiple),n.Db(2),n.oc("ngClass",n.vc(24,gO,e.matSelect.multiple)),n.Db(1),n.oc("formControl",e.formControlSearch)("placeholder",n.jc(9,20,"Saisissez un terme de recherche")),n.Db(3),n.oc("ngIf",e.formControlSearch.value&&!e.loadingSearch),n.Db(1),n.oc("ngIf",e.loadingSearch),n.Db(1),n.oc("ngIf",e.noResult),n.Db(1),n.oc("ngIf",e.showResetOption),n.Db(1),n.oc("ngForOf",n.jc(15,22,e.filteredDatas)),n.Db(2),n.oc("ngIf","VALID"!==e.formControlSelect.status&&e.formControlSelect.touched&&!e.hideErrorDesc),n.Db(1),n.oc("ngIf",null!==e.suffixIcon))},directives:[Y.c,P.t,ee.a,X.u,X.j,X.F,J.b,P.q,X.d,P.s,Y.g,ee.c,k.b,S.a,V.c,W.p,Y.b,Y.j],pipes:[g.d,P.b,P.p],styles:[".mat-select-search-hidden[_ngcontent-%COMP%]{visibility:hidden}.mat-select-search-inner[_ngcontent-%COMP%]{position:absolute;top:0;width:calc(100% + 15px);border-bottom:1px solid #ccc;background:#fff;z-index:100}.mat-select-search-inner.mat-select-search-inner-multiple[_ngcontent-%COMP%]{width:calc(100% + 48px)} .mat-select-search-panel{transform:none!important;max-height:350px!important;max-width:inherit!important}.mat-select-search-input[_ngcontent-%COMP%]{padding:16px 36px 16px 16px;box-sizing:border-box;width:100%;border:none}.mat-select-search-no-entries-found[_ngcontent-%COMP%]{padding:16px}.mat-select-search-clear[_ngcontent-%COMP%]{position:absolute;right:0;top:4px}.mat-select-search-loading[_ngcontent-%COMP%]{position:absolute;right:0;top:15px} .cdk-overlay-pane-select-search{margin-top:-50px}.mat-error[_ngcontent-%COMP%]{font-weight:700}.mat-error[_ngcontent-%COMP%], .selectSuffixIcon[_ngcontent-%COMP%]{font-size:10px;text-align:right}.search-select[_ngcontent-%COMP%] .mat-selected:not(.mat-option-disabled){font-weight:700}.opt-group[_ngcontent-%COMP%]{position:-webkit-sticky;position:sticky;top:50px;background:#fff;z-index:1}.opt-group[_ngcontent-%COMP%] .mat-pseudo-checkbox{display:none}.multipleLabels[_ngcontent-%COMP%]{color:#f99830}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();const _O=["autoCompleteInput"];function yO(t,e){if(1&t&&(n.Wb(0,"mat-option",17),n.Wb(1,"span",18),n.Qc(2),n.Vb(),n.Vb()),2&t){const t=e.$implicit,i=n.hc(3);n.oc("value",t)("title",t[i.key]),n.Db(2),n.Rc(t[i.key])}}function xO(t,e){if(1&t&&(n.Ub(0),n.Oc(1,yO,3,3,"mat-option",16),n.ic(2,"sortBy"),n.ic(3,"async"),n.Tb()),2&t){const t=n.hc(2);n.Db(1),n.oc("ngForOf",n.kc(2,1,n.jc(3,4,t.filteredOptions),t.key))}}function CO(t,e){if(1&t&&n.Rb(0,"mat-option",19),2&t){const t=n.hc(2);n.oc("innerHTML",t.listInfo,n.Ec)}}function OO(t,e){1&t&&(n.Wb(0,"mat-option",20),n.Rb(1,"mat-spinner",21),n.Vb())}function DO(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field",5),n.Rb(1,"mat-icon",6),n.Wb(2,"input",7,8),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("focus",(function(){return n.Dc(t),n.hc().resetAutocomplete()})),n.ic(4,"translate"),n.Vb(),n.Wb(5,"button",9),n.dc("click",(function(){return n.Dc(t),n.hc().addItem()})),n.Rb(6,"mat-icon",10),n.ic(7,"translate"),n.Vb(),n.Wb(8,"mat-autocomplete",11,12),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc().selectOpt(e)})),n.Oc(10,xO,4,6,"ng-container",13),n.Oc(11,CO,1,1,"mat-option",14),n.Oc(12,OO,2,0,"mat-option",15),n.Vb(),n.Vb()}if(2&t){const t=n.zc(9),e=n.hc();n.Db(2),n.oc("placeholder",n.jc(4,10,"lang.searchFolder"))("formControl",e.myControl)("matAutocomplete",t),n.Db(3),n.oc("disabled",!e.canAdd),n.Db(1),n.Lc("visibility",e.canAdd&&null!==e.myControl.value&&e.myControl.value.length>0?"visible":"hidden"),n.oc("title",n.jc(7,12,"lang.add")),n.Db(4),n.oc("ngIf",e.options.length>0&&!e.loading),n.Db(1),n.oc("ngIf",0===e.options.length&&!e.loading),n.Db(1),n.oc("ngIf",e.loading)}}function wO(t,e){1&t&&n.Rb(0,"mat-icon",28)}function MO(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",24),n.dc("removed",(function(){n.Dc(t);const i=e.index;return n.hc(2).removeItem(i)})),n.Wb(1,"span",25),n.Rb(2,"i",26),n.Qc(3),n.Vb(),n.Oc(4,wO,1,0,"mat-icon",27),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.oc("removable",!i.controlAutocomplete.disabled),n.Db(1),n.oc("title",i.getFolderLabel(t)),n.Db(2),n.Sc("\xa0",i.getFolderLabel(t)," "),n.Db(1),n.oc("ngIf",!i.controlAutocomplete.disabled)}}function kO(t,e){if(1&t&&(n.Wb(0,"mat-chip-list",22),n.Oc(1,MO,5,4,"mat-chip",23),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",t.controlAutocomplete.value)}}function SO(t,e){1&t&&(n.Wb(0,"div",29),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noSelectedFolder")," "))}let IO=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.dialog=n,this.headerService=a,this.appService=s,this.latinisePipe=o,this.functionsService=r,this.loading=!1,this.key="idToDisplay",this.canAdd=!0,this.myControl=new X.i,this.valuesToDisplay={},this.newIds=[],this.tmpObject=null,this.returnValue="id"}ngOnInit(){this.controlAutocomplete.valueChanges.pipe(Object(mt.a)(t=>{"object"===this.returnValue?(this.valuesToDisplay={},t.forEach(t=>{this.valuesToDisplay[t.id]=t.label})):this.functionsService.empty(this.tmpObject)?this.initFormValue():(this.valuesToDisplay[this.tmpObject.id]=this.tmpObject[this.key],this.tmpObject=null)})).subscribe(),this.controlAutocomplete.setValue(null===this.controlAutocomplete.value||""===this.controlAutocomplete.value?[]:this.controlAutocomplete.value),this.initAutocompleteRoute()}initAutocompleteRoute(){this.listInfo=this.translate.instant("lang.autocompleteInfo"),this.options=[],this.myControl.valueChanges.pipe(Object(pt.a)(300),Object(d.a)(t=>t.length>2),Object(bt.a)(),Object(mt.a)(()=>this.loading=!0),Object(ft.a)(t=>this.getDatas(t)),Object(mt.a)(t=>{this.listInfo=0===t.length?this.translate.instant("lang.noAvailableValue"):"",this.options=t,this.filteredOptions=Object(c.a)(this.options),this.loading=!1})).subscribe()}getDatas(t){return this.http.get("../rest/autocomplete/folders",{params:{search:t}})}selectOpt(t){this.setFormValue(t.option.value),this.myControl.setValue("")}initFormValue(){this.controlAutocomplete.value.forEach(t=>{this.http.get("../rest/folders/"+t).pipe(Object(mt.a)(t=>{for(var e in t)this.valuesToDisplay[t[e].id]=t[e].label})).subscribe()})}setFormValue(t){if(!("id"===this.returnValue?this.controlAutocomplete.value.indexOf(t.id)>-1:this.controlAutocomplete.value.map(t=>t.id).indexOf(t.id)>-1)){let e=[];null!==this.controlAutocomplete.value&&(e=this.controlAutocomplete.value),e.push("id"===this.returnValue?t.id:{id:t.id,label:t.idToDisplay}),this.controlAutocomplete.setValue(e)}}resetAutocomplete(){this.options=[],this.listInfo=this.translate.instant("lang.autocompleteInfo")}_filter(t){if("string"==typeof t){const e=this.latinisePipe.transform(t.toLowerCase());return this.options.filter(t=>this.latinisePipe.transform(t[this.key].toLowerCase()).includes(e))}return this.options}unsetValue(){this.controlAutocomplete.setValue(""),this.myControl.setValue(""),this.myControl.enable()}removeItem(t){if(-1===this.newIds.indexOf(this.controlAutocomplete.value[t])){let e=this.controlAutocomplete.value;this.controlAutocomplete.value.splice(t,1),this.controlAutocomplete.setValue(e)}else this.http.delete("../rest/folders/"+this.controlAutocomplete.value[t]).pipe(Object(mt.a)(e=>{let i=this.controlAutocomplete.value;this.controlAutocomplete.value.splice(t,1),this.controlAutocomplete.setValue(i)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}addItem(){const t={};t[this.key]=this.myControl.value,this.http.post("../rest/folders",{label:t[this.key]}).pipe(Object(mt.a)(e=>{for(var i in e)t.id=e[i],this.newIds.push(e[i]);this.setFormValue(t),this.myControl.setValue("")}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}getFolderLabel(t){return"id"===this.returnValue?this.valuesToDisplay[t]:this.valuesToDisplay[t.id]}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(y.a),n.Qb(w.a),n.Qb(Tt.c),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-folder-input"]],viewQuery:function(t,e){var i;1&t&&n.Kc(_O,!0),2&t&&n.yc(i=n.ec())&&(e.autoCompleteInput=i.first)},inputs:{controlAutocomplete:["control","controlAutocomplete"],returnValue:"returnValue"},features:[n.Cb([Wt.a])],decls:6,vars:4,consts:[["type","hidden",3,"formControl"],["floatLabel","never","class","input-form",4,"ngIf"],[1,"itemList"],["class","mat-chip-list-stacked itemChip","color","default",4,"ngIf"],["class","noResult",4,"ngIf"],["floatLabel","never",1,"input-form"],["color","primary","matPrefix","",1,"fa","fa-search",2,"padding-left","20px","font-size","15px"],["type","text","matInput","",3,"placeholder","formControl","matAutocomplete","click","focus"],["autoCompleteInput",""],["type","button","matSuffix","","mat-icon-button","",3,"disabled","click"],[1,"fa","fa-folder-plus",3,"title"],[3,"optionSelected"],["auto","matAutocomplete"],[4,"ngIf"],["class","autoCompleteInfoResult smallInputInfo","disabled","",3,"innerHTML",4,"ngIf"],["disabled","",4,"ngIf"],[3,"value","title",4,"ngFor","ngForOf"],[3,"value","title"],["color","primary"],["disabled","",1,"autoCompleteInfoResult","smallInputInfo",3,"innerHTML"],["disabled",""],["diameter","20"],["color","default",1,"mat-chip-list-stacked","itemChip"],["color","default","class","listAutocomplete",3,"removable","removed",4,"ngFor","ngForOf"],["color","default",1,"listAutocomplete",3,"removable","removed"],[2,"display","flex","flex","1","align-items","center",3,"title"],[1,"fa","fa-folder-open",2,"padding-right","5px"],["matChipRemove","","class","fa fa-times",4,"ngIf"],["matChipRemove","",1,"fa","fa-times"],[1,"noResult"]],template:function(t,e){1&t&&(n.Wb(0,"form"),n.Rb(1,"input",0),n.Oc(2,DO,13,14,"mat-form-field",1),n.Wb(3,"div",2),n.Oc(4,kO,2,1,"mat-chip-list",3),n.Oc(5,SO,3,3,"div",4),n.Vb(),n.Vb()),2&t&&(n.Db(1),n.oc("formControl",e.controlAutocomplete),n.Db(1),n.oc("ngIf",!e.controlAutocomplete.disabled),n.Db(2),n.oc("ngIf",e.controlAutocomplete.value.length>0),n.Db(1),n.oc("ngIf",0===e.controlAutocomplete.value.length))},directives:[X.K,X.v,X.w,X.d,X.u,X.j,P.t,Y.c,S.a,Y.i,J.b,Ne.d,k.b,Y.j,Ne.a,P.s,W.p,V.c,ze.d,ze.a,ze.e],pipes:[g.d,Wt.a,P.b],styles:[".smallInputInfo[_ngcontent-%COMP%]{font-size:9px;white-space:normal;line-height:13px;display:table-cell;vertical-align:middle;text-align:center}.mat-chip.mat-standard-chip[_ngcontent-%COMP%]{color:#fff;background-color:#1a80ab}.noResult[_ngcontent-%COMP%]{text-align:center;font-style:italic;opacity:.5}.itemChip[_ngcontent-%COMP%]{display:block;width:95%}.itemChip[_ngcontent-%COMP%] .mat-chip-list-wrapper{margin:0}.itemList[_ngcontent-%COMP%]{padding-top:10px;overflow-x:hidden;max-height:165px}.listAutocomplete[_ngcontent-%COMP%]{height:auto}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();function PO(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",15),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).selectTag(i)})),n.ic(1,"translate"),n.Qc(2),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(3);n.oc("title",n.jc(1,2,"lang.linkedTags")),n.Db(2),n.Rc(i.getTagLabel(t))}}function VO(t,e){if(1&t&&(n.Ub(0),n.Rb(1,"br"),n.Rb(2,"hr"),n.Oc(3,PO,3,4,"span",14),n.Tb()),2&t){const t=n.hc(2);n.Db(3),n.oc("ngForOf",t.tag.links)}}function RO(t,e){if(1&t&&(n.Wb(0,"div",11),n.Wb(1,"div",12),n.Wb(2,"b"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Rb(5,"br"),n.Qc(6),n.ic(7,"translate"),n.Rb(8,"br"),n.Rb(9,"br"),n.Wb(10,"b"),n.Qc(11),n.ic(12,"translate"),n.Vb(),n.Rb(13,"br"),n.Qc(14),n.ic(15,"translate"),n.Oc(16,VO,4,1,"ng-container",13),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(3),n.Sc("",n.jc(4,5,"lang.description")," :"),n.Db(3),n.Sc(" ",t.functionsService.empty(t.tag.description)?n.jc(7,7,"lang.undefined"):t.tag.description," "),n.Db(5),n.Sc("",n.jc(12,9,"lang.usage")," :"),n.Db(3),n.Sc(" ",t.functionsService.empty(t.tag.usage)?n.jc(15,11,"lang.undefined"):t.tag.usage," "),n.Db(2),n.oc("ngIf",t.tag.links.length>0)}}function jO(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",16),n.Wb(1,"button",17),n.dc("click",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"button",18),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(1),n.oc("disabled",t.loading||t.functionsService.empty(t.tag)),n.Db(1),n.Rc(n.jc(3,4,"lang.validate")),n.Db(2),n.oc("disabled",t.loading),n.Db(1),n.Rc(n.jc(6,6,"lang.cancel"))}}let AO=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functionsService=s,this.loading=!1,this.tags=[],this.tag=null}ngOnInit(){this.getTagsTree()}getTags(){return new Promise(t=>{this.http.get("../rest/tags").pipe(Object(mt.a)(e=>{this.tags=e.tags.map(t=>({id:t.id,label:t.label,parentId:t.parentId,countResources:t.countResources})),t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}getTag(t){this.http.get("../rest/tags/"+t).pipe(Object(mt.a)(t=>{this.tag=t}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}getTagsTree(){return Object(r.a)(this,void 0,void 0,(function*(){yield this.getTags();const t=this.tags.map(t=>({id:t.id,text:t.label,parent:this.functionsService.empty(t.parentId)?"#":t.parentId,state:{opened:this.data.id==t.id,selected:this.data.id==t.id,disabled:!this.functionsService.empty(this.data.id)}}));setTimeout(()=>{$("#jstree").on("select_node.jstree",(t,e)=>{this.getTag(e.node.id)}).jstree({checkbox:{deselect_all:!0,three_state:!1},core:{force_text:!0,themes:{name:"proton",responsive:!0},multiple:!1,data:t},plugins:["checkbox","search","sort"]})},0),this.functionsService.empty(this.data.id)||this.getTag(this.data.id)}))}selectTag(t){this.functionsService.empty(this.data.id)&&($("#jstree").jstree("deselect_all"),$("#jstree").jstree("select_node",t))}getTagLabel(t){return this.tags.filter(e=>e.id==t)[0].label}onSubmit(){this.dialogRef.close(this.tag)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:14,vars:10,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],[2,"flex","1"],["mat-icon-button","",3,"title","mat-dialog-close"],[1,"fa","fa-times-circle","fa-2x"],["mat-dialog-content",""],[1,"col-md-6",2,"overflow","auto"],["id","jstree"],["class","col-md-6",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","","class","actions",4,"ngIf"],[1,"col-md-6"],["role","alert",1,"alert-message","alert-message-info"],[4,"ngIf"],["class","badge","style","cursor: pointer;",3,"title","click",4,"ngFor","ngForOf"],[1,"badge",2,"cursor","pointer",3,"title","click"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Wb(2,"span",2),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"button",3),n.ic(6,"translate"),n.Rb(7,"mat-icon",4),n.Vb(),n.Vb(),n.Wb(8,"div",5),n.Wb(9,"div",6),n.Rb(10,"div",7),n.Vb(),n.Oc(11,RO,17,13,"div",8),n.Vb(),n.Rb(12,"span",9),n.Oc(13,jO,7,8,"div",10),n.Vb()),2&t&&(n.Db(3),n.Rc(n.jc(4,6,"lang.tags")),n.Db(2),n.pc("title",n.jc(6,8,"lang.close")),n.Db(4),n.Ib("col-md-12",!e.functionsService.empty(e.tag)),n.Db(2),n.oc("ngIf",!e.functionsService.empty(e.tag)),n.Db(2),n.oc("ngIf",e.functionsService.empty(e.data.id)))},directives:[q.i,k.b,q.d,S.a,q.f,P.t,P.s,q.c],pipes:[g.d],styles:[".badge[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;font-size:10px!important;color:#fff;font-weight:400;border-radius:.25em;background:#135f7f;margin:5px}"]}),t})();const WO=["autoCompleteInput"];function TO(t,e){if(1&t&&(n.Wb(0,"mat-option",18),n.Wb(1,"span",19),n.Qc(2),n.Vb(),n.Vb()),2&t){const t=e.$implicit,i=n.hc(3);n.oc("value",t)("title",t[i.key]),n.Db(2),n.Rc(t[i.key])}}function EO(t,e){if(1&t&&(n.Ub(0),n.Oc(1,TO,3,3,"mat-option",17),n.ic(2,"sortBy"),n.ic(3,"async"),n.Tb()),2&t){const t=n.hc(2);n.Db(1),n.oc("ngForOf",n.kc(2,1,n.jc(3,4,t.filteredOptions),t.key))}}function FO(t,e){if(1&t&&n.Rb(0,"mat-option",20),2&t){const t=n.hc(2);n.oc("innerHTML",t.listInfo,n.Ec)}}function LO(t,e){1&t&&(n.Wb(0,"mat-option",21),n.Rb(1,"mat-spinner",22),n.Vb())}function QO(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field",5),n.Wb(1,"button",6),n.dc("click",(function(e){n.Dc(t);const i=n.hc();return e.stopPropagation(),i.openThesaurus()})),n.Rb(2,"mat-icon",7),n.ic(3,"translate"),n.Vb(),n.Wb(4,"input",8,9),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("focus",(function(){return n.Dc(t),n.hc().resetAutocomplete()})),n.ic(6,"translate"),n.Vb(),n.Wb(7,"button",10),n.dc("click",(function(){return n.Dc(t),n.hc().addItem()})),n.Rb(8,"mat-icon",11),n.ic(9,"translate"),n.Vb(),n.Wb(10,"mat-autocomplete",12,13),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc().selectOpt(e)})),n.Oc(12,EO,4,6,"ng-container",14),n.Oc(13,FO,1,1,"mat-option",15),n.Oc(14,LO,2,0,"mat-option",16),n.Vb(),n.Vb()}if(2&t){const t=n.zc(11),e=n.hc();n.Db(2),n.oc("title",n.jc(3,11,"lang.openThesaurus")),n.Db(2),n.oc("placeholder",n.jc(6,13,"lang.searchTag"))("formControl",e.myControl)("matAutocomplete",t),n.Db(3),n.oc("disabled",!e.canAdd||null===e.myControl.value||0===e.myControl.value.length),n.Db(1),n.Lc("visibility",e.canAdd&&null!==e.myControl.value&&e.myControl.value.length>0?"visible":"hidden"),n.oc("title",n.jc(9,15,"lang.add")),n.Db(4),n.oc("ngIf",e.options.length>0&&!e.loading),n.Db(1),n.oc("ngIf",0===e.options.length&&!e.loading),n.Db(1),n.oc("ngIf",e.loading)}}function NO(t,e){1&t&&n.Rb(0,"mat-icon",29)}function zO(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",25),n.dc("removed",(function(){n.Dc(t);const i=e.index;return n.hc(2).removeItem(i)}))("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).openThesaurus(i)})),n.Wb(1,"span",26),n.Rb(2,"i",27),n.Qc(3),n.Vb(),n.Oc(4,NO,1,0,"mat-icon",28),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.oc("removable",!i.controlAutocomplete.disabled),n.Db(1),n.oc("title",i.getTagLabel(t)),n.Db(2),n.Sc("\xa0",i.getTagLabel(t)," "),n.Db(1),n.oc("ngIf",!i.controlAutocomplete.disabled)}}function BO(t,e){if(1&t&&(n.Wb(0,"mat-chip-list",23),n.Oc(1,zO,5,4,"mat-chip",24),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",t.controlAutocomplete.value)}}function UO(t,e){1&t&&(n.Wb(0,"div",30),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noSelectedTag")," "))}let $O=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this.translate=t,this.http=e,this.notify=i,this.dialog=n,this.headerService=a,this.appService=s,this.latinisePipe=o,this.privilegeService=r,this.functionsService=c,this.loading=!1,this.key="idToDisplay",this.canAdd=!1,this.myControl=new X.i,this.valuesToDisplay={},this.newIds=[],this.tags=[],this.tmpObject=null,this.returnValue="id"}ngOnInit(){this.controlAutocomplete.valueChanges.pipe(Object(mt.a)(t=>{"object"===this.returnValue?(this.valuesToDisplay={},t.forEach(t=>{this.valuesToDisplay[t.id]=t.label})):this.functionsService.empty(this.tmpObject)?this.initFormValue():(this.valuesToDisplay[this.tmpObject.id]=this.tmpObject[this.key],this.tmpObject=null)})).subscribe(),this.controlAutocomplete.setValue(null===this.controlAutocomplete.value||""===this.controlAutocomplete.value?[]:this.controlAutocomplete.value),this.canAdd=this.privilegeService.hasCurrentUserPrivilege("manage_tags_application"),this.initAutocompleteRoute()}initAutocompleteRoute(){this.listInfo=this.translate.instant("lang.autocompleteInfo"),this.options=[],this.myControl.valueChanges.pipe(Object(pt.a)(300),Object(d.a)(t=>t.length>2),Object(bt.a)(),Object(mt.a)(()=>this.loading=!0),Object(ft.a)(t=>this.getDatas(t)),Object(mt.a)(t=>{this.listInfo=0===t.length?this.translate.instant("lang.noAvailableValue"):"",this.options=t,this.filteredOptions=Object(c.a)(this.options),this.loading=!1})).subscribe()}getDatas(t){return this.http.get("../rest/autocomplete/tags",{params:{search:t}})}selectOpt(t){this.setFormValue(t.option.value),this.myControl.setValue("")}initFormValue(){this.controlAutocomplete.value.forEach(t=>{this.http.get("../rest/tags/"+t).pipe(Object(mt.a)(t=>{this.valuesToDisplay[t.id]=t.label})).subscribe()})}setFormValue(t){if(!("id"===this.returnValue?this.controlAutocomplete.value.indexOf(t.id)>-1:this.controlAutocomplete.value.map(t=>t.id).indexOf(t.id)>-1)){let e=[];null!==this.controlAutocomplete.value&&(e=this.controlAutocomplete.value),e.push("id"===this.returnValue?t.id:{id:t.id,label:t.idToDisplay}),this.controlAutocomplete.setValue(e)}}resetAutocomplete(){this.options=[],this.listInfo=this.translate.instant("lang.autocompleteInfo")}_filter(t){if("string"==typeof t){const e=this.latinisePipe.transform(t.toLowerCase());return this.options.filter(t=>this.latinisePipe.transform(t[this.key].toLowerCase()).includes(e))}return this.options}unsetValue(){this.controlAutocomplete.setValue(""),this.myControl.setValue(""),this.myControl.enable()}removeItem(t){if(-1===this.newIds.indexOf(this.controlAutocomplete.value[t])){let e=this.controlAutocomplete.value;this.controlAutocomplete.value.splice(t,1),this.controlAutocomplete.setValue(e)}else this.http.delete("../rest/tags/"+this.controlAutocomplete.value[t]).pipe(Object(mt.a)(e=>{let i=this.controlAutocomplete.value;this.controlAutocomplete.value.splice(t,1),this.controlAutocomplete.setValue(i)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}addItem(){const t={};t[this.key]=this.myControl.value,this.http.post("../rest/tags",{label:t[this.key]}).pipe(Object(mt.a)(e=>{for(var i in e)t.id=e[i],this.newIds.push(e[i]);this.setFormValue(t),this.myControl.setValue("")}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}openThesaurus(t=null){null!==t&&(t="id"===this.returnValue?t:t.id),this.dialog.open(AO,{panelClass:"maarch-modal",width:"600px",data:{id:t}}).afterClosed().pipe(Object(d.a)(t=>!this.functionsService.empty(t)),Object(l.a)(t=>({id:t.id,idToDisplay:t.label})),Object(mt.a)(t=>{this.tmpObject=t,this.setFormValue(t)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}getTagLabel(t){return"id"===this.returnValue?this.valuesToDisplay[t]:this.valuesToDisplay[t.id]}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(y.a),n.Qb(w.a),n.Qb(Tt.c),n.Qb(Dt.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-tag-input"]],viewQuery:function(t,e){var i;1&t&&n.Kc(WO,!0),2&t&&n.yc(i=n.ec())&&(e.autoCompleteInput=i.first)},inputs:{controlAutocomplete:["control","controlAutocomplete"],returnValue:"returnValue"},features:[n.Cb([Wt.a])],decls:6,vars:4,consts:[["type","hidden",3,"formControl"],["floatLabel","never","class","input-form",4,"ngIf"],[1,"itemList"],["class","mat-chip-list-stacked itemChip","color","default",4,"ngIf"],["class","noResult",4,"ngIf"],["floatLabel","never",1,"input-form"],["color","primary","type","button","matPrefix","","mat-icon-button","",2,"left","20px","z-index","1",3,"click"],[1,"fas","fa-external-link-alt",2,"font-size","15px",3,"title"],["type","text","matInput","","maxlength","128",3,"placeholder","formControl","matAutocomplete","click","focus"],["autoCompleteInput",""],["type","button","matSuffix","","mat-icon-button","",3,"disabled","click"],[1,"fa","fa-plus",3,"title"],[3,"optionSelected"],["auto","matAutocomplete"],[4,"ngIf"],["class","autoCompleteInfoResult smallInputInfo","disabled","",3,"innerHTML",4,"ngIf"],["disabled","",4,"ngIf"],[3,"value","title",4,"ngFor","ngForOf"],[3,"value","title"],["color","primary"],["disabled","",1,"autoCompleteInfoResult","smallInputInfo",3,"innerHTML"],["disabled",""],["diameter","20"],["color","default",1,"mat-chip-list-stacked","itemChip"],["class","listAutocomplete","color","default",3,"removable","removed","click",4,"ngFor","ngForOf"],["color","default",1,"listAutocomplete",3,"removable","removed","click"],[2,"display","flex","flex","1","align-items","center","cursor","pointer",3,"title"],[1,"fa","fa-tag",2,"padding-right","5px"],["matChipRemove","","class","fa fa-times",4,"ngIf"],["matChipRemove","",1,"fa","fa-times"],[1,"noResult"]],template:function(t,e){1&t&&(n.Wb(0,"form"),n.Rb(1,"input",0),n.Oc(2,QO,15,17,"mat-form-field",1),n.Wb(3,"div",2),n.Oc(4,BO,2,1,"mat-chip-list",3),n.Oc(5,UO,3,3,"div",4),n.Vb(),n.Vb()),2&t&&(n.Db(1),n.oc("formControl",e.controlAutocomplete),n.Db(1),n.oc("ngIf",!e.controlAutocomplete.disabled),n.Db(2),n.oc("ngIf",e.controlAutocomplete.value.length>0),n.Db(1),n.oc("ngIf",0===e.controlAutocomplete.value.length))},directives:[X.K,X.v,X.w,X.d,X.u,X.j,P.t,Y.c,k.b,Y.i,S.a,J.b,Ne.d,X.p,Y.j,Ne.a,P.s,W.p,V.c,ze.d,ze.a,ze.e],pipes:[g.d,Wt.a,P.b],styles:[".smallInputInfo[_ngcontent-%COMP%]{font-size:9px;white-space:normal;line-height:13px;display:table-cell;vertical-align:middle;text-align:center}.mat-chip.mat-standard-chip[_ngcontent-%COMP%]{color:#fff;background-color:#1a80ab}.noResult[_ngcontent-%COMP%]{text-align:center;font-style:italic;opacity:.5}.listAutocomplete[_ngcontent-%COMP%]{height:auto}.itemChip[_ngcontent-%COMP%]{display:block;width:95%}.itemChip[_ngcontent-%COMP%] .mat-chip-list-wrapper{margin:0}.itemList[_ngcontent-%COMP%]{padding-top:10px;overflow-x:hidden;max-height:165px}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();const HO=["autoCompleteInput"];function GO(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",17),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).addressBANCurrentDepartment=i})),n.Wb(1,"span"),n.Qc(2),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(2),n.Rc(t)}}function XO(t,e){if(1&t&&(n.Wb(0,"mat-option",19),n.Wb(1,"span",20),n.Qc(2),n.Vb(),n.Vb()),2&t){const t=e.$implicit,i=n.hc(3);n.oc("value",t)("title",t[i.key]),n.Db(2),n.Rc(t[i.key])}}function qO(t,e){if(1&t&&(n.Ub(0),n.Oc(1,XO,3,3,"mat-option",18),n.ic(2,"sortBy"),n.ic(3,"async"),n.Tb()),2&t){const t=n.hc(2);n.Db(1),n.oc("ngForOf",n.kc(2,1,n.jc(3,4,t.filteredOptions),t.key))}}function KO(t,e){if(1&t&&n.Rb(0,"mat-option",21),2&t){const t=n.hc(2);n.oc("innerHTML",t.listInfo,n.Ec)}}function YO(t,e){1&t&&(n.Wb(0,"mat-option",22),n.Rb(1,"mat-spinner",23),n.Vb())}function JO(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field",5),n.Wb(1,"button",6),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.Qc(2),n.Rb(3,"i",7),n.Vb(),n.Wb(4,"mat-menu",null,8),n.Oc(6,GO,3,1,"button",9),n.Vb(),n.Wb(7,"input",10,11),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("focus",(function(){return n.Dc(t),n.hc().resetAutocomplete()})),n.ic(9,"translate"),n.Vb(),n.Wb(10,"mat-autocomplete",12,13),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc().selectOpt(e)})),n.Oc(12,qO,4,6,"ng-container",14),n.Oc(13,KO,1,1,"mat-option",15),n.Oc(14,YO,2,0,"mat-option",16),n.Vb(),n.Vb()}if(2&t){const t=n.zc(5),e=n.zc(11),i=n.hc();n.Db(1),n.oc("matMenuTriggerFor",t)("disabled",i.adminMode),n.Db(1),n.Sc(" ",i.addressBANCurrentDepartment," "),n.Db(4),n.oc("ngForOf",i.departmentList),n.Db(1),n.oc("placeholder",n.jc(9,10,"lang.searchAddressBan"))("formControl",i.myControl)("matAutocomplete",e),n.Db(5),n.oc("ngIf",i.options.length>0&&!i.loading),n.Db(1),n.oc("ngIf",0===i.options.length&&!i.loading),n.Db(1),n.oc("ngIf",i.loading)}}function ZO(t,e){1&t&&n.Rb(0,"mat-icon",29)}function tD(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",26),n.dc("removed",(function(){n.Dc(t);const i=e.index;return n.hc(2).removeItem(i)})),n.Wb(1,"span",27),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).goTo(i)})),n.Qc(2),n.Vb(),n.Oc(3,ZO,1,0,"mat-icon",28),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.oc("removable",!i.controlAutocomplete.disabled),n.Db(1),n.oc("title",i.valuesToDisplay[t.id]),n.Db(1),n.Sc(" ",i.valuesToDisplay[t.id]," "),n.Db(1),n.oc("ngIf",!i.controlAutocomplete.disabled)}}function eD(t,e){if(1&t&&(n.Wb(0,"mat-chip-list",24),n.Oc(1,tD,4,4,"mat-chip",25),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",t.controlAutocomplete.value)}}function iD(t,e){1&t&&(n.Wb(0,"div",30),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noSelectedAddress")," "))}let nD=(()=>{class t{constructor(t,e,i,n){this.translate=t,this.http=e,this.notify=i,this.dialog=n,this.loading=!1,this.key="address",this.canAdd=!0,this.myControl=new X.i,this.valuesToDisplay={},this.addressBANCurrentDepartment="75",this.departmentList=[]}ngOnInit(){this.controlAutocomplete.setValue(null===this.controlAutocomplete.value||""===this.controlAutocomplete.value?[]:this.controlAutocomplete.value),this.initFormValue(),this.adminMode||this.initBanSearch(),this.initAutocompleteRoute()}initBanSearch(){this.http.get("../rest/ban/availableDepartments").pipe(Object(mt.a)(t=>{null!==t.default&&-1!==t.departments.indexOf(t.default.toString())&&(this.addressBANCurrentDepartment=t.default),this.departmentList=t.departments}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}initAutocompleteRoute(){this.listInfo=this.translate.instant("lang.autocompleteInfo"),this.options=[],this.myControl.valueChanges.pipe(Object(pt.a)(300),Object(d.a)(t=>t.length>2),Object(bt.a)(),Object(mt.a)(()=>this.loading=!0),Object(ft.a)(t=>this.getDatas(t)),Object(mt.a)(t=>{this.listInfo=0===t.length?this.translate.instant("lang.noAvailableValue"):"",this.options=t,this.filteredOptions=Object(c.a)(this.options),this.loading=!1})).subscribe()}getDatas(t){return this.http.get("../rest/autocomplete/banAddresses",{params:{address:t,department:this.addressBANCurrentDepartment}})}selectOpt(t){this.setFormValue({id:t.option.value.banId,label:`${t.option.value.number} ${t.option.value.afnorName}, ${t.option.value.city} (${t.option.value.postalCode})`,addressNumber:t.option.value.number,addressStreet:t.option.value.afnorName,addressPostcode:t.option.value.postalCode,addressTown:t.option.value.city,longitude:t.option.value.lon,latitude:t.option.value.lat}),this.myControl.setValue("")}initFormValue(){this.controlAutocomplete.value.forEach(t=>{this.valuesToDisplay[t.id]=`${t.addressNumber} ${t.addressStreet}, ${t.addressTown} (${t.addressPostcode})`})}setFormValue(t){this.valuesToDisplay[t.id]=`${t.addressNumber} ${t.addressStreet}, ${t.addressTown} (${t.addressPostcode})`,this.controlAutocomplete.setValue([t])}resetAutocomplete(){this.options=[],this.listInfo=this.translate.instant("lang.autocompleteInfo")}unsetValue(){this.controlAutocomplete.setValue(""),this.myControl.setValue(""),this.myControl.enable()}removeItem(t){let e=this.controlAutocomplete.value;this.controlAutocomplete.value.splice(t,1),this.controlAutocomplete.setValue(e)}goTo(t){window.open(`https://www.google.com/maps/search/${t.latitude},${t.longitude}`,"_blank")}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-address-ban-input"]],viewQuery:function(t,e){var i;1&t&&n.Kc(HO,!0),2&t&&n.yc(i=n.ec())&&(e.autoCompleteInput=i.first)},inputs:{controlAutocomplete:["control","controlAutocomplete"],adminMode:["admin","adminMode"]},decls:6,vars:4,consts:[["type","hidden",3,"formControl"],["floatLabel","never","class","input-form depList",4,"ngIf"],[1,"itemList"],["class","mat-chip-list-stacked itemChip","color","default",4,"ngIf"],["class","noResult",4,"ngIf"],["floatLabel","never",1,"input-form","depList"],["mat-button","","matPrefix","",3,"matMenuTriggerFor","disabled","click"],[1,"fas","fa-angle-down"],["menu","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["type","text","matInput","",3,"placeholder","formControl","matAutocomplete","click","focus"],["autoCompleteInput",""],[3,"optionSelected"],["auto","matAutocomplete"],[4,"ngIf"],["class","autoCompleteInfoResult smallInputInfo","disabled","",3,"innerHTML",4,"ngIf"],["disabled","",4,"ngIf"],["mat-menu-item","",3,"click"],[3,"value","title",4,"ngFor","ngForOf"],[3,"value","title"],["color","primary"],["disabled","",1,"autoCompleteInfoResult","smallInputInfo",3,"innerHTML"],["disabled",""],["diameter","20"],["color","default",1,"mat-chip-list-stacked","itemChip"],["class","activeListAutocomplete","style","height:auto;","color","default",3,"removable","removed",4,"ngFor","ngForOf"],["color","default",1,"activeListAutocomplete",2,"height","auto",3,"removable","removed"],[2,"display","flex","flex","1","align-items","center","cursor","pointer",3,"title","click"],["matChipRemove","","class","fa fa-times",4,"ngIf"],["matChipRemove","",1,"fa","fa-times"],[1,"noResult"]],template:function(t,e){1&t&&(n.Wb(0,"form"),n.Rb(1,"input",0),n.Oc(2,JO,15,12,"mat-form-field",1),n.Wb(3,"div",2),n.Oc(4,eD,2,1,"mat-chip-list",3),n.Oc(5,iD,3,3,"div",4),n.Vb(),n.Vb()),2&t&&(n.Db(1),n.oc("formControl",e.controlAutocomplete),n.Db(1),n.oc("ngIf",!e.controlAutocomplete.disabled),n.Db(2),n.oc("ngIf",e.controlAutocomplete.value.length>0),n.Db(1),n.oc("ngIf",0===e.controlAutocomplete.value.length))},directives:[X.K,X.v,X.w,X.d,X.u,X.j,P.t,Y.c,k.b,Y.i,ne.d,ne.e,P.s,J.b,Ne.d,Ne.a,ne.b,W.p,V.c,ze.d,ze.a,S.a,ze.e],pipes:[g.d,Wt.a,P.b],styles:[".smallInputInfo[_ngcontent-%COMP%]{font-size:9px;white-space:normal;line-height:13px;display:table-cell;vertical-align:middle;text-align:center}.mat-chip.mat-standard-chip[_ngcontent-%COMP%]{color:#fff;background-color:#1a80ab}.noResult[_ngcontent-%COMP%]{text-align:center;font-style:italic;opacity:.5}.itemChip[_ngcontent-%COMP%]{display:block;width:95%}.itemChip[_ngcontent-%COMP%] .mat-chip-list-wrapper{margin:0}.itemList[_ngcontent-%COMP%]{padding-top:10px;overflow-x:hidden;max-height:165px}.depList[_ngcontent-%COMP%] .mat-form-field-infix{margin-left:-20px}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();const aD=["criteriaTool"],sD=["searchCriteriaInput"],oD=["appFolderInput"],rD=["appTagInput"],cD=["appIssuingSiteInput"],lD=["appContactAutocomplete"],dD=["pluginSelectAutocompleteSearch"];function hD(t,e){if(1&t&&(n.Wb(0,"mat-form-field",30),n.Rb(1,"input",31),n.ic(2,"translate"),n.Wb(3,"button",32),n.Rb(4,"mat-icon",33),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("formControl",t.searchTermControl)("placeholder",n.jc(2,3,"lang.quickSearchTarget")),n.Db(2),n.oc("disabled",t.isLoadingResult)}}function uD(t,e){if(1&t&&(n.Wb(0,"button",34),n.Qc(1),n.ic(2,"translate"),n.Rb(3,"i",35),n.Vb()),2&t){n.hc();const t=n.zc(15);n.oc("matMenuTriggerFor",t),n.Db(1),n.Sc(" ",n.jc(2,2,"lang.mySearchTemplates"),"\xa0 ")}}function pD(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"button",36),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().selectSearchTemplate(i)})),n.Wb(2,"div",18),n.Qc(3),n.ic(4,"shorten"),n.Vb(),n.Wb(5,"mat-icon",37),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=e.index,o=n.hc();return i.stopPropagation(),o.deleteSearchTemplate(a.id,s)})),n.ic(6,"translate"),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=e.$implicit;n.Db(1),n.oc("title",t.label),n.Db(2),n.Sc(" ",n.lc(4,3,t.label,45,"...")," "),n.Db(2),n.oc("title",n.jc(6,7,"lang.delete"))}}function bD(t,e){1&t&&(n.Wb(0,"button",38),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.noResult")))}function fD(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",39),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit;return n.hc().addCriteria(a),i.stopPropagation()})),n.Rb(1,"i",40),n.Qc(2),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc();n.oc("disabled",i.isCurrentCriteriaById(t.identifier)),n.Db(1),n.Gb("fa ",t.icon,""),n.Db(1),n.Sc(" ",t.label," ")}}function mD(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"sup",50),n.Qc(2),n.Vb(),n.Tb()),2&t){const t=e.$implicit;n.Db(2),n.Sc("(",t,")")}}function gD(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"span",47),n.Rb(2,"i"),n.Qc(3),n.Oc(4,mD,3,1,"ng-container",14),n.Qc(5,"\xa0:\xa0 "),n.Vb(),n.Wb(6,"mat-form-field",48),n.Rb(7,"input",49),n.ic(8,"translate"),n.Vb(),n.Tb()),2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(2),n.Gb("fa ",t.icon,""),n.Db(1),n.Sc(" ",t.label," "),n.Db(1),n.oc("ngForOf",e.getBadgesInfoField(t)),n.Db(3),n.oc("id",t.identifier)("placeholder",n.jc(8,8,"lang.typeValue"))("formControl",t.control)}}function vD(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"sup",50),n.Qc(2),n.Vb(),n.Tb()),2&t){const t=e.$implicit;n.Db(2),n.Sc("(",t,")")}}function _D(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"span",47),n.Rb(2,"i"),n.Qc(3),n.Oc(4,vD,3,1,"ng-container",14),n.Qc(5,"\xa0:\xa0 "),n.Vb(),n.Wb(6,"mat-form-field",48),n.Wb(7,"div",51),n.Rb(8,"input",52),n.Wb(9,"input",53),n.dc("input",(function(e){return n.Dc(t),n.hc().$implicit.control.value.start=e.target.value})),n.ic(10,"translate"),n.Vb(),n.Wb(11,"span",54),n.Qc(12,"\u2013"),n.Vb(),n.Wb(13,"input",53),n.dc("input",(function(e){return n.Dc(t),n.hc().$implicit.control.value.end=e.target.value})),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(2),n.Gb("fa ",t.icon,""),n.Db(1),n.Sc(" ",t.label," "),n.Db(1),n.oc("ngForOf",e.getBadgesInfoField(t)),n.Db(5),n.oc("value",t.control.value.start)("placeholder",n.jc(10,9,"lang.start")),n.Db(4),n.oc("value",t.control.value.end)("placeholder",n.jc(14,11,"lang.end"))}}function yD(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"sup",50),n.Qc(2),n.Vb(),n.Tb()),2&t){const t=e.$implicit;n.Db(2),n.Sc("(",t,")")}}function xD(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"span",47),n.Rb(2,"i"),n.Qc(3),n.Oc(4,yD,3,1,"ng-container",14),n.Qc(5,"\xa0:\xa0 "),n.Vb(),n.Rb(6,"plugin-select-search",55),n.ic(7,"translate"),n.Tb()),2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(2),n.Gb("fa ",t.icon,""),n.Db(1),n.Sc(" ",t.label,""),n.Db(1),n.oc("ngForOf",e.getBadgesInfoField(t)),n.Db(2),n.oc("id",t.identifier)("showResetOption",!0)("placeholderLabel",n.jc(7,12,"lang.chooseValue"))("formControlSelect",t.control)("datas",t.values)("returnValue","object")("multiple",!0)}}function CD(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"sup",50),n.Qc(2),n.Vb(),n.Tb()),2&t){const t=e.$implicit;n.Db(2),n.Sc("(",t,")")}}const OD=function(){return["type"]};function DD(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"span",47),n.Rb(2,"i"),n.Qc(3),n.Oc(4,CD,3,1,"ng-container",14),n.Qc(5,"\xa0:\xa0 "),n.Vb(),n.Rb(6,"plugin-select-autocomplete-search",56,57),n.ic(8,"translate"),n.Tb()),2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(2),n.Gb("fa ",t.icon,""),n.Db(1),n.Sc(" ",t.label," "),n.Db(1),n.oc("ngForOf",e.getBadgesInfoField(t)),n.Db(2),n.oc("id",t.identifier)("showResetOption",!0)("placeholderLabel",n.jc(8,14,"lang.chooseValue"))("formControlSelect",t.control)("datas",t.values)("routeDatas",t.routeDatas)("extraModel",n.uc(16,OD))("multiple",!0)("returnValue",t.returnValue)}}function wD(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"sup",50),n.Qc(2),n.Vb(),n.Tb()),2&t){const t=e.$implicit;n.Db(2),n.Sc("(",t,")")}}function MD(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"span",47),n.Rb(2,"i"),n.Qc(3),n.Oc(4,wD,3,1,"ng-container",14),n.Qc(5,"\xa0:\xa0 "),n.Vb(),n.Wb(6,"mat-form-field",58),n.dc("click",(function(){return n.Dc(t),n.zc(14).open()})),n.Wb(7,"mat-date-range-input",59),n.Wb(8,"input",60),n.dc("dateChange",(function(e){return n.Dc(t),n.hc().$implicit.control.value.start=e.value})),n.ic(9,"translate"),n.Vb(),n.Wb(10,"input",61),n.dc("dateChange",(function(e){return n.Dc(t),n.hc().$implicit.control.value.end=e.value})),n.ic(11,"translate"),n.Vb(),n.Vb(),n.Rb(12,"mat-datepicker-toggle",62),n.Rb(13,"mat-date-range-picker",null,63),n.Vb(),n.Tb()}if(2&t){const t=n.zc(14),e=n.hc().$implicit,i=n.hc(2);n.Db(2),n.Gb("fa ",e.icon,""),n.Db(1),n.Sc(" ",e.label," "),n.Db(1),n.oc("ngForOf",i.getBadgesInfoField(e)),n.Db(3),n.oc("rangePicker",t),n.Db(1),n.oc("placeholder",n.jc(9,13,"lang.start"))("value",e.control.value.start)("disabled",e.control.disabled),n.Db(2),n.oc("placeholder",n.jc(11,15,"lang.end"))("value",e.control.value.end)("disabled",e.control.disabled),n.Db(2),n.oc("for",t)}}function kD(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"sup",50),n.Qc(2),n.Vb(),n.Tb()),2&t){const t=e.$implicit;n.Db(2),n.Sc("(",t,")")}}function SD(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"span",47),n.Rb(2,"i"),n.Qc(3),n.Oc(4,kD,3,1,"ng-container",14),n.Qc(5,"\xa0:\xa0 "),n.Vb(),n.Rb(6,"app-contact-autocomplete",64,65),n.Tb()),2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(2),n.Gb("fa ",t.icon,""),n.Db(1),n.Sc(" ",t.label," "),n.Db(1),n.oc("ngForOf",e.getBadgesInfoField(t)),n.Db(2),n.oc("id",t.identifier)("control",t.control)("exclusion","registeredMail_recipient"===t.identifier?"?noUsers=true&noEntities=true&noContactsGroups=true":"")}}function ID(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"sup",50),n.Qc(2),n.Vb(),n.Tb()),2&t){const t=e.$implicit;n.Db(2),n.Sc("(",t,")")}}function PD(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"span",47),n.Rb(2,"i"),n.Qc(3),n.Oc(4,ID,3,1,"ng-container",14),n.Qc(5,"\xa0:\xa0 "),n.Vb(),n.Rb(6,"app-folder-input",66,67),n.Tb()),2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(2),n.Gb("fa ",t.icon,""),n.Db(1),n.Sc(" ",t.label," "),n.Db(1),n.oc("ngForOf",e.getBadgesInfoField(t)),n.Db(2),n.oc("control",t.control)("returnValue","object")}}function VD(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"sup",50),n.Qc(2),n.Vb(),n.Tb()),2&t){const t=e.$implicit;n.Db(2),n.Sc("(",t,")")}}function RD(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"span",47),n.Rb(2,"i"),n.Qc(3),n.Oc(4,VD,3,1,"ng-container",14),n.Qc(5,"\xa0:\xa0 "),n.Vb(),n.Rb(6,"app-tag-input",66,68),n.Tb()),2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(2),n.Gb("fa ",t.icon,""),n.Db(1),n.Sc(" ",t.label," "),n.Db(1),n.oc("ngForOf",e.getBadgesInfoField(t)),n.Db(2),n.oc("control",t.control)("returnValue","object")}}function jD(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"sup",50),n.Qc(2),n.Vb(),n.Tb()),2&t){const t=e.$implicit;n.Db(2),n.Sc("(",t,")")}}function AD(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"span",47),n.Rb(2,"i"),n.Qc(3),n.Oc(4,jD,3,1,"ng-container",14),n.Qc(5,"\xa0:\xa0 "),n.Vb(),n.Rb(6,"app-address-ban-input",69),n.Tb()),2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(2),n.Gb("fa ",t.icon,""),n.Db(1),n.Sc(" ",t.label," "),n.Db(1),n.oc("ngForOf",e.getBadgesInfoField(t)),n.Db(2),n.oc("control",t.control)}}const WD=function(){return["select","radio","checkbox"]},TD=function(){return["registeredMail_issuingSite"]},ED=function(){return["selectAutocomplete"]},FD=function(){return["senders","recipients"]};function LD(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",43),n.Oc(1,gD,9,10,"ng-container",44),n.Oc(2,_D,15,13,"ng-container",44),n.Oc(3,xD,8,14,"ng-container",44),n.Oc(4,DD,9,17,"ng-container",44),n.Oc(5,MD,15,17,"ng-container",44),n.Oc(6,SD,8,8,"ng-container",44),n.Oc(7,PD,8,7,"ng-container",44),n.Oc(8,RD,8,7,"ng-container",44),n.Oc(9,AD,7,6,"ng-container",44),n.Wb(10,"button",45),n.dc("click",(function(i){n.Dc(t);const a=e.index,s=n.hc(2);return i.stopPropagation(),s.removeCriteria(a)})),n.Rb(11,"mat-icon",46),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf","string"===t.type),n.Db(1),n.oc("ngIf","integer"===t.type),n.Db(1),n.oc("ngIf",n.uc(9,WD).indexOf(t.type)>-1||n.uc(10,TD).indexOf(t.identifier)>-1),n.Db(1),n.oc("ngIf",n.uc(11,ED).indexOf(t.type)>-1),n.Db(1),n.oc("ngIf","date"===t.type),n.Db(1),n.oc("ngIf",n.uc(12,FD).indexOf(t.identifier)>-1||"contact"===t.type),n.Db(1),n.oc("ngIf","folders"===t.identifier),n.Db(1),n.oc("ngIf","tags"===t.identifier),n.Db(1),n.oc("ngIf","banAutocomplete"===t.type)}}function QD(t,e){if(1&t&&(n.Wb(0,"div",71),n.Wb(1,"sup",72),n.Qc(2),n.Vb(),n.Qc(3,"\xa0"),n.Rb(4,"span",73),n.ic(5,"translate"),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(2),n.Sc("(",t.id,")"),n.Db(2),n.oc("innerHTML",n.jc(5,2,t.desc),n.Ec)}}function ND(t,e){if(1&t&&(n.Ub(0),n.Oc(1,QD,6,4,"div",70),n.Tb()),2&t){const t=e.$implicit,i=n.hc(2);n.Db(1),n.oc("ngIf",i.displayInfoSearch(t.id))}}function zD(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div"),n.Oc(2,LD,12,13,"div",41),n.Vb(),n.Wb(3,"div",42),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Oc(6,ND,2,1,"ng-container",14),n.Tb()),2&t){const t=n.hc();n.Db(1),n.Ib("criteria-content",!t.appService.getViewMode())("criteria-content-mobile",t.appService.getViewMode()),n.Db(1),n.oc("ngForOf",t.currentCriteria),n.Db(2),n.Sc(" ",n.jc(5,7,"lang.criteriaOverQuickSearch")," "),n.Db(2),n.oc("ngForOf",t.infoFields)}}function BD(t,e){1&t&&n.Rb(0,"mat-spinner",74)}function UD(t,e){if(1&t&&(n.Wb(0,"div",75),n.Wb(1,"button",76),n.Rb(2,"mat-icon",77),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("disabled",t.isLoadingResult),n.Db(2),n.Sc(" ",n.jc(4,2,"lang.searchMails")," ")}}let $D=(()=>{class t{constructor(t,e,i,a,s,o,r,c,l,d,h){this._activatedRoute=t,this.translate=e,this.http=i,this.appService=a,this.functions=s,this.indexingFields=o,this.dialog=r,this.notify=c,this.datePipe=l,this.latinisePipe=d,this.sortPipe=h,this.loading=!0,this.criteria=[],this.currentCriteria=[],this.searchTermControl=new X.i,this.searchCriteria=new X.i,this.infoFields=[{id:1,desc:"lang.searchInAttachmentsInfo"},{id:2,desc:"lang.searchFulltextInfo"},{id:3,desc:"lang.manualSearchInfo"}],this.searchTerm="Foo",this.defaultCriteria=[],this.adminMode=!1,this.openedPanel=!0,this.isLoadingResult=!1,this.class="main",this.searchUrlGenerated=new n.o,this.loaded=new n.o,t.queryParams.subscribe(t=>{this.searchTerm=t.value})}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.searchTermControl.setValue(this.searchTerm),this.criteria=yield this.indexingFields.getAllSearchFields(),this.criteria.forEach(t=>{this.defaultCriteria.indexOf(t.identifier)>-1&&(t.control=new X.i(""),this.addCriteria(t,!1))}),this.loaded.emit(!0),this.filteredCriteria=this.searchCriteria.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>this._filter(t))),this.loading=!1,setTimeout(()=>{this.searchTermControl.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>{"string"!=typeof t||this.functions.empty(t)||(this.searchTerm=t)})).subscribe()},500),this.adminMode||this.getSearchTemplates()}))}_filter(t){if("string"==typeof t){const e=this.latinisePipe.transform(t.toLowerCase());return this.criteria.filter(t=>this.latinisePipe.transform(t.label.toLowerCase()).includes(e))}return this.criteria}isCurrentCriteriaById(t){return this.currentCriteria.filter(e=>t.indexOf(e.identifier)>-1).length>0}isCurrentCriteriaByType(t){return this.currentCriteria.filter(e=>t.indexOf(e.type)>-1).length>0}addCriteria(t,e=!0){return Object(r.a)(this,void 0,void 0,(function*(){(this.functions.empty(t.control)||this.functions.empty(t.control.value))&&(t.control=new X.i("date"===t.type||"integer"===t.type?{}:"")),this.initField(t),this.currentCriteria.push(t),this.adminMode&&t.control.disable(),this.searchCriteria.reset(),e&&setTimeout(()=>{this.criteriaTool.open()},0)}))}initField(t){try{null!==t.identifier.match(/role_[.]*/g)?this.set_role_field(t):this["set_"+t.identifier+"_field"](t)}catch(e){}}removeCriteria(t){this.currentCriteria.splice(t,1)}getFilterControl(){return this.searchCriteria}getCriterias(){return this.criteria}getFilteredCriterias(){return this.filteredCriteria}focusFilter(){setTimeout(()=>{this.searchCriteriaInput.nativeElement.focus()},100)}getCurrentCriteriaValues(){const t={};this.functions.empty(this.searchTermControl.value)||(t.meta={values:this.searchTermControl.value}),this.currentCriteria.forEach(e=>{"date"===e.type||"integer"===e.type?this.functions.empty(e.control.value.start)&&this.functions.empty(e.control.value.end)||(t[e.identifier]={type:e.type,values:{start:this.functions.empty(e.control.value.start)?null:e.control.value.start,end:this.functions.empty(e.control.value.end)?null:e.control.value.end}}):this.functions.empty(e.control.value)?(["recipients","senders"].indexOf(e.identifier)>-1||"contact"===e.type)&&(this.functions.empty(this.appContactAutocomplete.toArray().filter(t=>t.id===e.identifier)[0].getInputValue())||(t[e.identifier]={type:e.type,values:[this.appContactAutocomplete.toArray().filter(t=>t.id===e.identifier)[0].getInputValue()]})):t[e.identifier]={type:e.type,values:e.control.value}}),this.searchUrlGenerated.emit(t)}toggleTool(t){t?this.criteriaTool.open():this.criteriaTool.close()}getLabelValue(t,e){return this.functions.empty(e)?this.translate.instant("lang.undefined"):"object"!=typeof e?e:Object.keys(e).indexOf("title")>-1?e.title:Object.keys(e).indexOf("label")>-1?e.label:void 0}getFormatLabel(t,e){return"date"===this.criteria.filter(e=>e.identifier===t)[0].type?`${null!==e.start?this.datePipe.transform(e.start,"dd/MM/y"):"\u221e"} - ${null!==e.end?this.datePipe.transform(e.end,"dd/MM/y"):"\u221e"}`:"integer"===this.criteria.filter(e=>e.identifier===t)[0].type?`${null!==e.start?e.start:"\u221e"} - ${null!==e.end?e.end:"\u221e"}`:"registeredMail_issuingSite"===t?this.appIssuingSiteInput.getSiteLabel(e):e}getLabelValues(t,e){return 0===e.length?this.translate.instant("lang.undefined"):"object"!=typeof e[0]?e:Object.keys(e[0]).indexOf("title")>-1?e.map(t=>t.title):Object.keys(e[0]).indexOf("label")>-1?e.map(t=>t.label):void 0}resetAllCriteria(){this.currentCriteria.forEach((t,e)=>{this.resetCriteria(t.identifier,null,!1)}),this.resetCriteria("meta",null,!1),this.getCurrentCriteriaValues()}resetCriteria(t,e,i=!0){if("meta"!==t){const i=this.currentCriteria.filter(e=>e.identifier===t)[0];if(void 0!==i){if("date"===i.type&&this.functions.empty(i.values))i.control.setValue({start:null,end:null});else if(null!==e){const t=i.control.value.map(t=>JSON.stringify(t)).indexOf(JSON.stringify(e)),n=i.control.value.slice();n.splice(t,1),t>-1&&i.control.setValue(n)}else i.control.setValue([]);(["recipients","senders"].indexOf(i.identifier)>-1||"contact"===i.type)&&this.functions.empty(i.control.value)&&this.appContactAutocomplete.toArray().filter(t=>t.id===i.identifier)[0].resetInputValue()}}else this.searchTermControl.setValue("");i&&this.getCurrentCriteriaValues()}searchInAttachments(t){return["subject","chrono","fulltext"].indexOf(t)>-1}displayInfoSearch(t){return!(1!==t||!this.isCurrentCriteriaById(["subject","chrono","fulltext"]))||!(2!==t||!this.isCurrentCriteriaById(["fulltext"]))||!(3!==t||!this.isCurrentCriteriaById(["recipients","senders","registeredMail_recipient"])&&!this.isCurrentCriteriaByType(["contact"]))}getBadgesInfoField(t){const e=[];return["subject","chrono","fulltext"].indexOf(t.identifier)>-1&&e.push(1),["fulltext"].indexOf(t.identifier)>-1&&e.push(2),(["recipients","senders","registeredMail_recipient"].indexOf(t.identifier)>-1||"contact"===t.type)&&e.push(3),e}set_meta_field(t){this.searchTermControl.setValue(t)}set_doctype_field(t){return new Promise((e,i)=>{this.http.get("../rest/doctypes").pipe(Object(mt.a)(i=>{let n=[];i.structure.forEach(t=>{void 0===t.doctypes_second_level_id&&(n.push({id:t.doctypes_first_level_id,label:t.doctypes_first_level_label,title:t.doctypes_first_level_label,disabled:!0,isTitle:!0,color:t.css_style}),i.structure.filter(e=>e.doctypes_first_level_id===t.doctypes_first_level_id&&void 0!==e.doctypes_second_level_id&&void 0===e.description).forEach(t=>{n.push({id:t.doctypes_second_level_id,label:" "+t.doctypes_second_level_label,title:t.doctypes_second_level_label,disabled:!0,isTitle:!0,color:t.css_style}),n=n.concat(i.structure.filter(e=>e.doctypes_second_level_id===t.doctypes_second_level_id&&void 0!==e.description).map(t=>({id:t.type_id,label:" "+t.description,title:t.description,disabled:!1,isTitle:!1})))}))}),t.values=n,t.event="calcLimitDate",e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}set_priority_field(t){return new Promise((e,i)=>{this.http.get("../rest/priorities").pipe(Object(mt.a)(i=>{t.values=i.priorities,e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}set_status_field(t){return new Promise((e,i)=>{this.http.get("../rest/statuses").pipe(Object(mt.a)(i=>{t.values=i.statuses.map(t=>({id:t.identifier,label:t.label_status})),e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}set_category_field(t){return new Promise((e,i)=>{this.http.get("../rest/categories").pipe(Object(mt.a)(i=>{t.values=i.categories.map(t=>({id:t.id,label:t.label})),e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}set_attachment_type_field(t){return t.values=[],new Promise((e,i)=>{this.http.get("../rest/attachmentsTypes").pipe(Object(mt.a)(i=>{Object.keys(i.attachmentsTypes).forEach(e=>{t.values.push({id:e,label:i.attachmentsTypes[e].label})}),t.values=this.sortPipe.transform(t.values,"label"),e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}set_groupSign_field(t){return new Promise((e,i)=>{this.http.get("../rest/groups").pipe(Object(mt.a)(i=>{t.values=i.groups.map(t=>({id:t.id,label:t.group_desc})),t.values=this.sortPipe.transform(t.values,"label"),e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}set_destination_field(t){return t.values=[],new Promise((e,i)=>{this.http.get("../rest/indexingModels/entities").pipe(Object(mt.a)(i=>{let n="";t.values=t.values.concat(i.entities.map(t=>{n=t.entity_label;for(let e=0;e<t.level;e++)t.entity_label=" "+t.entity_label;return{id:t.id,title:n,label:t.entity_label,disabled:!1}})),e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}set_initiator_field(t){return t.values=[],new Promise((e,i)=>{this.http.get("../rest/indexingModels/entities").pipe(Object(mt.a)(i=>{let n="";t.values=t.values.concat(i.entities.map(t=>{n=t.entity_label;for(let e=0;e<t.level;e++)t.entity_label=" "+t.entity_label;return{id:t.id,title:n,label:t.entity_label,disabled:!1}})),e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}set_registeredMail_issuingSite_field(t){return new Promise((e,i)=>{this.http.get("../rest/registeredMail/sites").pipe(Object(mt.a)(i=>{t.values=i.sites.map(t=>({id:t.id,label:`${t.label} (${t.accountNumber})`})),e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}set_role_field(t){t.type="selectAutocomplete",t.routeDatas=["role_dest","role_visa","role_sign"].indexOf(t.identifier)>-1?["/rest/autocomplete/users?serial=serialId"]:["/rest/autocomplete/users?serial=serialId","/rest/autocomplete/entities?serial=serialId"],t.extraModel=["type"],t.returnValue="object"}set_senderDepartment_field(t){return new Promise((e,i)=>{this.http.get("../rest/departments").pipe(Object(mt.a)(i=>{t.values=[],Object.keys(i.departments).forEach(e=>{t.values.push({id:e,label:`${e} - ${i.departments[e]}`})}),t.values=this.sortPipe.transform(t.values,"label"),e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}getSearchTemplates(){this.http.get("../rest/searchTemplates").pipe(Object(mt.a)(t=>{this.searchTemplates=t.searchTemplates})).subscribe()}saveSearchTemplate(){let t=[];this.currentCriteria.forEach((e,i)=>{t.push({identifier:e.identifier,values:e.control.value})}),t.push({identifier:"meta",values:this.searchTermControl.value}),this.dialog.open(aO,{panelClass:"maarch-modal",autoFocus:!0,disableClose:!0,data:{searchTemplate:{query:t}}}).afterClosed().pipe(Object(d.a)(t=>void 0!==t),Object(mt.a)(t=>{this.searchTemplates.push(t.searchTemplate)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}deleteSearchTemplate(t,e){this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete("../rest/searchTemplates/"+t)),Object(mt.a)(()=>{this.searchTemplates.splice(e,1),this.notify.success(this.translate.instant("lang.searchTemplateDeleted"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}selectSearchTemplate(t,e=!0){let i;this.currentCriteria=[],this.criteria.forEach(n=>{if(i=t.query.map(t=>t.identifier).indexOf(n.identifier),i>-1){if(void 0===n.control&&(n.control=new X.i({value:t.query[i].values,disabled:!1})),n.control.setValue(t.query[i].values),this.addCriteria(n,e),(["recipients","senders"].indexOf(n.identifier)>-1||"contact"===n.type)&&"string"==typeof t.query[i].values[0]){const e=t.query[i].values[0];setTimeout(()=>{this.appContactAutocomplete.toArray().filter(t=>t.id===n.identifier)[0].setInputValue(e)},0)}"selectAutocomplete"===n.type&&setTimeout(()=>{this.pluginSelectAutocompleteSearch.toArray().filter(t=>t.id===n.identifier)[0].setDatas(n.control.value),this.pluginSelectAutocompleteSearch.toArray().filter(t=>t.id===n.identifier)[0].resetACDatas()},0)}}),i=t.query.map(t=>t.identifier).indexOf("meta"),i>-1&&this.searchTermControl.setValue(t.query[i].values)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(o.a),n.Qb(g.e),n.Qb(v.b),n.Qb(w.a),n.Qb(_t.a),n.Qb(Zt),n.Qb(q.b),n.Qb(D.a),n.Qb(P.f),n.Qb(Tt.c),n.Qb(Wt.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-criteria-tool"]],viewQuery:function(t,e){var i;1&t&&(n.Xc(aD,!0),n.Xc(sD,!0),n.Xc(oD,!0),n.Xc(rD,!0),n.Xc(cD,!0),n.Xc(lD,!0),n.Xc(dD,!0)),2&t&&(n.yc(i=n.ec())&&(e.criteriaTool=i.first),n.yc(i=n.ec())&&(e.searchCriteriaInput=i.first),n.yc(i=n.ec())&&(e.appFolderInput=i.first),n.yc(i=n.ec())&&(e.appTagInput=i.first),n.yc(i=n.ec())&&(e.appIssuingSiteInput=i.first),n.yc(i=n.ec())&&(e.appContactAutocomplete=i),n.yc(i=n.ec())&&(e.pluginSelectAutocompleteSearch=i))},inputs:{searchTerm:"searchTerm",defaultCriteria:"defaultCriteria",adminMode:"adminMode",openedPanel:"openedPanel",isLoadingResult:"isLoadingResult",class:"class"},outputs:{searchUrlGenerated:"searchUrlGenerated",loaded:"loaded"},features:[n.Cb([P.f,Wt.a])],decls:57,vars:51,consts:[[3,"ngSubmit"],["criteriaFormUp","ngForm"],["floatLabel","never","class","basket-search",4,"ngIf"],["togglePosition","before",3,"expanded"],["criteriaTool",""],[2,"background","white","height","1px","flex","1","margin-left","10px"],[1,"myCriterias",3,"click"],["type","button","mat-button","","class","button-form-primary","style","width: auto; height: 24px; line-height: 0px;",3,"matMenuTriggerFor",4,"ngIf"],[1,"searchTemplateMenu"],["IndexingModelsMenu","matMenu"],[1,"menuTitle"],["floatLabel","never","appearance","outline",1,"smallInput",2,"width","220px !important","padding-top","10px",3,"click"],["matInput","","id","searchTerm","autocomplete","off",3,"placeholder","click","keydown"],["listFilter",""],[4,"ngFor","ngForOf"],[1,"saveSearchTemplate"],["mat-menu-item","",2,"display","flex","align-items","center",3,"disabled","click"],["color","primary",1,"fa","fa-copy",2,"line-height","21px"],[2,"flex","1"],["type","button","mat-stroked-button","",1,"addCriteriaButton",3,"matMenuTriggerFor","title","menuOpened","click"],[1,"fa","fa-plus",2,"height","auto"],["menu","matMenu"],[1,"menuTitle",2,"position","sticky","top","0px","background","white","z-index","1","display","flex","justify-content","center"],["matInput","","id","searchTerm","autocomplete","off",3,"formControl","placeholder","click","keydown"],["searchCriteriaInput",""],["mat-menu-item","","disabled","",4,"ngIf"],["mat-menu-item","",3,"disabled","click",4,"ngFor","ngForOf"],[4,"ngIf","ngIfElse"],["loadingTemplate",""],["class","col-md-12","style","text-align: center;",4,"ngIf"],["floatLabel","never",1,"basket-search"],["type","text","matInput","",1,"metaSearch",3,"formControl","placeholder"],["mat-icon-button","","matPrefix","",3,"disabled"],[1,"fas","fa-search"],["type","button","mat-button","",1,"button-form-primary",2,"width","auto","height","24px","line-height","0px",3,"matMenuTriggerFor"],[1,"fa","fa-chevron-down",2,"margin","0 0 0 10px"],["mat-menu-item","",2,"display","flex","align-items","center",3,"title","click"],["color","warn",1,"fa","fa-trash",3,"title","click"],["mat-menu-item","","disabled",""],["mat-menu-item","",3,"disabled","click"],["color","primary",2,"font-size","14px","width","50px","text-align","center"],["style","display: grid;align-items: baseline;grid-template-columns: 35% 60% 5%;padding:5px;",4,"ngFor","ngForOf"],[1,"infoSearchDesc",2,"padding-top","25px"],[2,"display","grid","align-items","baseline","grid-template-columns","35% 60% 5%","padding","5px"],[4,"ngIf"],["mat-icon-button","","type","button","matSuffix","","color","warn",3,"click"],[1,"fa","fa-trash"],[1,"criteria-label"],["floatLabel","never",1,"input-form"],["type","text","matInput","",3,"id","placeholder","formControl"],["color","primary",1,"searchInAttachments"],["role","group",1,"range-number-container"],["matInput","",2,"display","none"],["type","number","min","0","step","1",1,"range-number-input-element",3,"value","placeholder","input"],[1,"range-number-spacer"],[2,"width","100%",3,"id","showResetOption","placeholderLabel","formControlSelect","datas","returnValue","multiple"],[2,"width","100%",3,"id","showResetOption","placeholderLabel","formControlSelect","datas","routeDatas","extraModel","multiple","returnValue"],["pluginSelectAutocompleteSearch",""],["floatLabel","never",1,"input-form","input-date",2,"cursor","pointer",3,"click"],[3,"rangePicker"],["matStartDate","",3,"placeholder","value","disabled","dateChange"],["matEndDate","",3,"placeholder","value","disabled","dateChange"],["matSuffix","",3,"for"],["picker",""],[2,"width","100%",3,"id","control","exclusion"],["appContactAutocomplete",""],[2,"width","100%",3,"control","returnValue"],["appFolderInput",""],["appTagInput",""],[2,"width","100%",3,"control"],["class","infoSearchDesc",4,"ngIf"],[1,"infoSearchDesc"],["color","primary"],[3,"innerHTML"],[1,"loader"],[1,"col-md-12",2,"text-align","center"],["mat-raised-button","","matSuffix","","color","primary","type","submit",3,"disabled"],[1,"fa","fa-search",2,"height","auto","font-size","24px"]],template:function(t,e){if(1&t&&(n.Wb(0,"form",0,1),n.dc("ngSubmit",(function(){return e.getCurrentCriteriaValues()})),n.Oc(2,hD,5,5,"mat-form-field",2),n.Wb(3,"mat-accordion"),n.Wb(4,"mat-expansion-panel",3,4),n.Wb(6,"mat-expansion-panel-header"),n.Wb(7,"mat-panel-title"),n.Wb(8,"span"),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Rb(11,"span",5),n.Vb(),n.Wb(12,"mat-panel-description",6),n.dc("click",(function(t){return t.stopPropagation()})),n.Oc(13,uD,4,4,"button",7),n.Wb(14,"mat-menu",8,9),n.Wb(16,"div",10),n.Wb(17,"span"),n.Qc(18),n.ic(19,"translate"),n.Vb(),n.Wb(20,"mat-form-field",11),n.dc("click",(function(t){return t.stopPropagation()})),n.Wb(21,"input",12,13),n.dc("click",(function(t){return t.stopPropagation()}))("keydown",(function(t){return t.stopPropagation()})),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Oc(24,pD,7,9,"ng-container",14),n.ic(25,"filterList"),n.Wb(26,"div",15),n.Rb(27,"mat-divider"),n.Wb(28,"button",16),n.dc("click",(function(){return e.saveSearchTemplate()})),n.Rb(29,"mat-icon",17),n.Wb(30,"div",18),n.Qc(31),n.ic(32,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(33,"button",19),n.dc("menuOpened",(function(){return e.focusFilter()}))("click",(function(t){return t.stopPropagation()})),n.ic(34,"translate"),n.Rb(35,"mat-icon",20),n.Qc(36),n.ic(37,"translate"),n.Vb(),n.Wb(38,"mat-menu",8,21),n.Wb(40,"div",22),n.Wb(41,"span"),n.Qc(42),n.ic(43,"translate"),n.Vb(),n.Wb(44,"mat-form-field",11),n.dc("click",(function(t){return t.stopPropagation()})),n.Wb(45,"input",23,24),n.dc("click",(function(t){return t.stopPropagation()}))("keydown",(function(t){return t.stopPropagation()})),n.ic(47,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Oc(48,bD,3,3,"button",25),n.ic(49,"async"),n.Oc(50,fD,3,5,"button",26),n.ic(51,"sortBy"),n.ic(52,"async"),n.Vb(),n.Oc(53,zD,7,9,"ng-container",27),n.Oc(54,BD,1,0,"ng-template",null,28,n.Pc),n.Oc(56,UD,5,4,"div",29),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.zc(22),a=n.zc(39),s=n.zc(55);var i;n.Db(2),n.oc("ngIf",!e.adminMode),n.Db(1),n.Ib("criteria-container","main"===e.class)("criteria-container-secondary","secondary"===e.class),n.Db(1),n.oc("expanded",e.openedPanel),n.Db(5),n.Sc(" ",n.jc(10,24,"lang.criteriaSearch")," "),n.Db(4),n.oc("ngIf",!e.adminMode),n.Db(5),n.Sc(" ",n.jc(19,26,"lang.mySearchTemplates")," "),n.Db(3),n.pc("placeholder",n.jc(23,28,"lang.filterBy")),n.Db(3),n.oc("ngForOf",n.lc(25,30,e.searchTemplates,t.value,"label")),n.Db(4),n.oc("disabled",e.functions.empty(e.currentCriteria)&&e.functions.empty(e.searchTermControl.value)),n.Db(3),n.Sc(" ",n.jc(32,34,"lang.createSearchTemplate")," "),n.Db(2),n.oc("matMenuTriggerFor",a)("title",n.jc(34,36,"lang.displayCriteria")),n.Db(3),n.Sc(" ",n.jc(37,38,"lang.addCriteria")," "),n.Db(6),n.Sc(" ",n.jc(43,40,"lang.criteria")," "),n.Db(3),n.pc("placeholder",n.jc(47,42,"lang.filterBy")),n.oc("formControl",e.getFilterControl()),n.Db(3),n.oc("ngIf",0===(null==(i=n.jc(49,44,e.getFilteredCriterias()))?null:i.length)),n.Db(2),n.oc("ngForOf",n.kc(51,46,n.jc(52,49,e.getFilteredCriterias()),"label")),n.Db(3),n.oc("ngIf",!e.loading)("ngIfElse",s),n.Db(3),n.oc("ngIf",!e.adminMode)}},directives:[X.K,X.v,X.w,P.t,gt.a,gt.c,gt.g,gt.h,gt.f,ne.e,Y.c,J.b,P.s,T.a,ne.b,S.a,k.b,ne.d,X.d,X.u,X.j,Y.i,Y.j,fr,vO,ae.d,ae.o,ae.l,ae.j,ae.e,Zd,IO,$O,nD,V.c],pipes:[g.d,rg,P.b,Wt.a,Tt.p],styles:[".criteria-content[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}.criteria-content[_ngcontent-%COMP%], .criteria-content-mobile[_ngcontent-%COMP%]{display:grid;align-items:start;max-height:300px;overflow:hidden;overflow-y:auto}.criteria-content-mobile[_ngcontent-%COMP%]{grid-template-columns:repeat(1,1fr)}.addCriteriaField[_ngcontent-%COMP%]{font-size:10px}.criteriaField[_ngcontent-%COMP%]{font-size:13px}.basket-search[_ngcontent-%COMP%]{color:#666;width:500px;padding-right:10px;height:55px}.basket-search[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:30px}.basket-search[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.basket-search[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;border-radius:30px}.basket-search[_ngcontent-%COMP%] .mat-form-field-label-wrapper{font-style:italic}.basket-search[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.basket-search[_ngcontent-%COMP%] .processLimitButton[_ngcontent-%COMP%]{color:#666;position:absolute;top:-32px;left:-47px;border-radius:30px}.basket-search[_ngcontent-%COMP%] .mat-button-toggle-checked[_ngcontent-%COMP%]{background-color:#f99830!important;color:#fff}.criteria-container[_ngcontent-%COMP%] .mat-expansion-panel[_ngcontent-%COMP%]{background:none;box-shadow:none}.criteria-container[_ngcontent-%COMP%] .mat-expansion-panel-header-title[_ngcontent-%COMP%]{color:#fff;align-items:center}.criteria-container[_ngcontent-%COMP%] .mat-expansion-panel-content{background:#fff;border-radius:30px}.criteria-container[_ngcontent-%COMP%] .mat-expansion-panel-body{padding-top:5px}.criteria-container[_ngcontent-%COMP%] .mat-expansion-indicator:after{color:#fff}.criteria-container-secondary[_ngcontent-%COMP%] .mat-expansion-panel-header-title[_ngcontent-%COMP%]{color:#135f7f;align-items:center}.criteria-container-secondary[_ngcontent-%COMP%] .mat-expansion-panel-content{background:#fff;border-radius:30px}.criteria-container-secondary[_ngcontent-%COMP%] .mat-expansion-panel-body{padding-top:5px}.criteria-list[_ngcontent-%COMP%] .mat-option-text{display:flex;align-items:center}.criteria-list[_ngcontent-%COMP%] .mat-optgroup-label{z-index:1;position:-webkit-sticky;position:sticky;top:0;background:#fff;display:flex;align-items:center}.criteria-label[_ngcontent-%COMP%]{text-align:right;color:#4a4a4a;white-space:pre;overflow:hidden;text-overflow:ellipsis}.loader[_ngcontent-%COMP%]{margin:auto}.loader[_ngcontent-%COMP%] circle{stroke:#fff!important}.myCriterias[_ngcontent-%COMP%]{flex-grow:0;margin-right:0} .searchTemplateMenu.mat-menu-panel{max-width:400px!important;width:400px!important;max-height:400px!important}.menuTitle[_ngcontent-%COMP%]{display:flex;padding-left:20px;align-items:center;color:#135f7f;font-weight:700}.fieldDesc[_ngcontent-%COMP%]{font-size:10px;text-align:right;color:#fff;font-style:italic;opacity:.5}.searchInAttachments[_ngcontent-%COMP%]{cursor:help}.infoSearchDesc[_ngcontent-%COMP%]{color:#4a4a4a;font-size:12px;font-style:italic;opacity:.8}.range-number-container[_ngcontent-%COMP%]{display:flex}.range-number-input-element[_ngcontent-%COMP%]{border:none;background:none;padding:0!important;outline:none;font:inherit;text-align:center;color:#135f7f}.range-number-input-element[_ngcontent-%COMP%]::-moz-placeholder{color:initial}.range-number-input-element[_ngcontent-%COMP%]:-ms-input-placeholder{color:initial}.range-number-input-element[_ngcontent-%COMP%]::placeholder{color:initial}.range-number-container[_ngcontent-%COMP%]{color:#135f7f}.saveSearchTemplate[_ngcontent-%COMP%]{position:-webkit-sticky;position:sticky;bottom:0;background-color:#fff}.addCriteriaButton[_ngcontent-%COMP%]{border-radius:20px;border-color:#135f7f;color:#135f7f}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})(),HD=(()=>{class t{constructor(t,e){this.latinisePipe=t,this.functions=e}transform(t,e=""){let i="";if("string"==typeof t&&"string"==typeof e){const n=this.latinisePipe.transform(t.toLowerCase()).indexOf(this.latinisePipe.transform(e.toLowerCase()));n>=0&&(i=t.substring(0,n)+"<span class='highlightResult'>"+t.substring(n,n+e.length)+"</span>"+t.substring(n+e.length))}return this.functions.empty(i)?t:i}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(Tt.c),n.Qb(_t.a))},t.\u0275pipe=n.Pb({name:"highlight",type:t,pure:!0}),t})();function GD(t,e){1&t&&(n.Ub(0),n.Wb(1,"div",2),n.Rb(2,"mat-spinner"),n.Vb(),n.Tb())}function XD(t,e){if(1&t&&(n.Wb(0,"div"),n.Rb(1,"app-contact-detail",4,5),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.oc("contact",t)}}function qD(t,e){if(1&t&&n.Oc(0,XD,3,1,"div",3),2&t){const t=n.hc();n.oc("ngForOf",t.contacts)}}let KD=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.contactService=n,this.functionsService=a,this.loading=!0,this.contacts=[],this.customFields=[],this.resId=null,this.mode="recipients"}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){yield this.getCustomFields(),null!==this.resId&&this.loadContactsOfResource(this.resId,this.mode)}))}getCustomFields(){return new Promise((t,e)=>{this.http.get("../rest/contactsCustomFields").pipe(Object(mt.a)(e=>{this.customFields=e.customFields.map(t=>({id:t.id,label:t.label})),t(!0)})).subscribe()})}loadContactsOfResource(t,e){this.http.get(`../rest/resources/${t}/contacts?type=${e}`).pipe(Object(mt.a)(t=>{this.contacts=t.contacts.map(t=>Object.assign(Object.assign({},t),{civility:this.contactService.formatCivilityObject(t.civility),fillingRate:this.contactService.formatFillingObject(t.fillingRate),customFields:this.functionsService.empty(t.customFields)?[]:this.formatCustomField(t.customFields)}))}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}formatCustomField(t){const e=[];return Object.keys(t).forEach(i=>{e.push({label:this.customFields.filter(t=>t.id==i).length>0?this.customFields.filter(t=>t.id==i)[0].label:i,value:t[i]})}),e}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(lc),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-contact-resource"]],inputs:{resId:"resId",mode:"mode"},features:[n.Cb([lc])],decls:4,vars:5,consts:[[4,"ngIf","ngIfElse"],["elseTemplate",""],[1,"loading"],[4,"ngFor","ngForOf"],[3,"contact"],["appContactDetail",""]],template:function(t,e){if(1&t&&(n.Wb(0,"div"),n.Oc(1,GD,3,0,"ng-container",0),n.Oc(2,qD,1,1,"ng-template",null,1,n.Pc),n.Vb()),2&t){const t=n.zc(3);n.Gb("contact-list-container contact-list-container-",e.contacts.length,""),n.Db(1),n.oc("ngIf",e.loading)("ngIfElse",t)}},directives:[P.t,V.c,P.s,hd],styles:[".contact-list-container[_ngcontent-%COMP%]{padding:10px;display:grid;grid-template-columns:repeat(3,33%);grid-gap:10px}.contact-list-container-1[_ngcontent-%COMP%]{grid-template-columns:1fr}.contact-list-container-2[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}.contact-card[_ngcontent-%COMP%]{min-width:350px;width:100%;margin-top:10px;margin-bottom:10px;padding:0;box-shadow:none;border:1px solid rgba(0,0,0,.12)}.contact-card[_ngcontent-%COMP%] .mat-expansion-panel-body{padding-left:0;padding-right:0}.mat-card-header[_ngcontent-%COMP%]{background:#f9f9f9;padding:10px 10px 5px}.mat-card-title[_ngcontent-%COMP%]{padding-right:15px}.contact-item[_ngcontent-%COMP%]{height:35px!important}.contact-header-image[_ngcontent-%COMP%]{background:#135f7f;font-size:18px;color:#fff}.contact-group[_ngcontent-%COMP%], .contact-header-image[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.contact-group[_ngcontent-%COMP%]{color:#135f7f;font-size:16px!important}.contact-content[_ngcontent-%COMP%]{font-size:13px!important}.contact-address[_ngcontent-%COMP%]{cursor:pointer;color:#337ab7}.contact-address[_ngcontent-%COMP%]:hover .contact-content[_ngcontent-%COMP%]{text-decoration:underline}.mat-expansion-panel[_ngcontent-%COMP%]{box-shadow:none!important}.mat-expansion-panel-header-title[_ngcontent-%COMP%]{font-size:14px;color:#666}.contact-filling[_ngcontent-%COMP%]{position:absolute;right:20px}.loading[_ngcontent-%COMP%]{display:flex;position:absolute;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.7019607843137254);z-index:1;overflow:hidden;justify-content:center;align-items:center}.newData[_ngcontent-%COMP%]{color:#f99830}"]}),t})(),YD=(()=>{class t{constructor(t,e,i,n){this.translate=t,this.http=e,this.data=i,this.dialogRef=n}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.a),n.Qb(q.h))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:10,vars:11,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],[2,"flex","1",3,"title"],["mat-icon-button","",3,"title","click"],[1,"fa","fa-times"],[3,"resId","mode"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Wb(2,"span",2),n.Qc(3),n.ic(4,"shorten"),n.Vb(),n.Wb(5,"button",3),n.dc("click",(function(){return e.dialogRef.close()})),n.ic(6,"translate"),n.Rb(7,"mat-icon",4),n.Vb(),n.Vb(),n.Wb(8,"mat-dialog-content"),n.Rb(9,"app-contact-resource",5),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.oc("title",e.data.title),n.Db(1),n.Sc(" ",n.lc(4,5,e.data.title,50,"...")," "),n.Db(2),n.oc("title",n.jc(6,9,"lang.close")),n.Db(4),n.oc("resId",e.data.resId)("mode",e.data.mode))},directives:[q.i,k.b,S.a,q.f,KD],pipes:[Tt.p,g.d],styles:[""]}),t})(),JD=(()=>{class t{constructor(t,e,i){this.datePipe=t,this.functions=e,this.headerService=i,this.listsProperties={page:0,pageSize:0,order:"creationDate",orderDir:"DESC",criteria:[],filters:{}}}initListsProperties(t){const e=JSON.parse(sessionStorage.getItem("criteriaSearch_"+t));return this.listsProperties=null!==e?JSON.parse(sessionStorage.getItem("criteriaSearch_"+t)):{page:0,pageSize:0,order:"creationDate",orderDir:"DESC",criteria:[],filters:{}},this.listsProperties}updateListsPropertiesPage(t){this.listsProperties.page=t,this.saveListsProperties()}updateListsPropertiesPageSize(t){this.listsProperties.pageSize=t,this.saveListsProperties()}updateListsPropertiesCriteria(t){this.listsProperties.criteria=t,this.saveListsProperties()}updateListsPropertiesFilters(t){this.listsProperties.filters=t,this.saveListsProperties()}updateListsProperties(t){this.listsProperties=t,this.saveListsProperties()}saveListsProperties(){sessionStorage.setItem("criteriaSearch_"+this.headerService.user.id,JSON.stringify(this.listsProperties))}getCriteria(){return this.listsProperties.criteria}formatDatas(t){return Object.keys(t).forEach(e=>{["folders","tags","registeredMail_issuingSite"].indexOf(e)>-1||["select","radio","checkbox"].indexOf(t[e].type)>-1?t[e].values=t[e].values.map(t=>t.id):"date"===t[e].type&&(t[e].values.start=this.datePipe.transform(t[e].values.start,"y-MM-dd"),t[e].values.end=this.datePipe.transform(t[e].values.end,"y-MM-dd")),delete t[e].type}),t}}return t.\u0275fac=function(e){return new(e||t)(n.ac(P.f),n.ac(_t.a),n.ac(y.a))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();var ZD=i("rDax"),tw=i("6Psc");const ew=["listFilter"];function iw(t,e){1&t&&(n.Wb(0,"div",32),n.Rb(1,"mat-spinner"),n.Vb())}function nw(t,e){if(1&t&&(n.Wb(0,"mat-option",33),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}function aw(t,e){if(1&t&&(n.Wb(0,"mat-option",33),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}function sw(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",34),n.Wb(1,"mat-form-field",5),n.Wb(2,"mat-label"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"mat-select",35),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().exportModel.delimiter=e})),n.ic(6,"translate"),n.Oc(7,aw,2,2,"mat-option",7),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(3),n.Rc(n.jc(4,5,"lang.delimiter")),n.Db(2),n.pc("placeholder",n.jc(6,7,"lang.delimiter")),n.oc("ngModel",t.exportModel.delimiter)("disabled","csv"!=t.exportModel.format),n.Db(2),n.oc("ngForOf",t.delimiters)}}function ow(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",36),n.Qc(1),n.Wb(2,"i",37),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().addData(i)})),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.pc("id",t.value),n.Db(1),n.Sc("",t.label," ")}}function rw(t,e){1&t&&(n.Wb(0,"div",38),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.noDataAvailable")))}function cw(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",36),n.Qc(1),n.Wb(2,"i",39),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc().removeData(i)})),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.pc("id",t.value),n.Db(1),n.Sc("",t.label," ")}}function lw(t,e){1&t&&(n.Wb(0,"div",38),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.noDataAvailable")))}const dw=function(t){return[t]};let hw=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.data=n,this.sortPipe=a,this.loading=!1,this.loadingExport=!1,this.delimiters=[";",",","TAB"],this.formats=["csv","pdf"],this.exportModel={delimiter:";",format:"csv",data:[],resources:[]},this.dataAvailable=[{value:"res_id",label:this.translate.instant("lang.resId"),isFunction:!1},{value:"type_label",label:this.translate.instant("lang.doctype"),isFunction:!1},{value:"doctypes_first_level_label",label:this.translate.instant("lang.firstLevelDoctype"),isFunction:!1},{value:"doctypes_second_level_label",label:this.translate.instant("lang.secondLevelDoctype"),isFunction:!1},{value:"format",label:this.translate.instant("lang.format"),isFunction:!1},{value:"doc_date",label:this.translate.instant("lang.docDate"),isFunction:!1},{value:"departure_date",label:this.translate.instant("lang.departureDate"),isFunction:!1},{value:"barcode",label:this.translate.instant("lang.barcode"),isFunction:!1},{value:"getFolder",label:this.translate.instant("lang.folderName"),isFunction:!0},{value:"confidentiality",label:this.translate.instant("lang.confidentiality"),isFunction:!1},{value:"alt_identifier",label:this.translate.instant("lang.chronoNumber"),isFunction:!1},{value:"admission_date",label:this.translate.instant("lang.admissionDate"),isFunction:!1},{value:"process_limit_date",label:this.translate.instant("lang.processLimitDate"),isFunction:!1},{value:"opinion_limit_date",label:this.translate.instant("lang.getOpinionLimitDate"),isFunction:!1},{value:"closing_date",label:this.translate.instant("lang.closingDate"),isFunction:!1},{value:"subject",label:this.translate.instant("lang.subject"),isFunction:!1},{value:"getRetentionFrozen",label:this.translate.instant("lang.retentionRuleFrozen"),isFunction:!0},{value:"getBinding",label:this.translate.instant("lang.bindingMail"),isFunction:!0},{value:"getStatus",label:this.translate.instant("lang.status"),isFunction:!0},{value:"getPriority",label:this.translate.instant("lang.priority"),isFunction:!0},{value:"getCopies",label:this.translate.instant("lang.copyUsersEntities"),isFunction:!0},{value:"getDetailLink",label:this.translate.instant("lang.detailLink"),isFunction:!0},{value:"getParentFolder",label:this.translate.instant("lang.parentFolder"),isFunction:!0},{value:"getCategory",label:this.translate.instant("lang.category_id"),isFunction:!0},{value:"getInitiatorEntity",label:this.translate.instant("lang.initiatorEntity"),isFunction:!0},{value:"getDestinationEntity",label:this.translate.instant("lang.destinationEntity"),isFunction:!0},{value:"getDestinationEntityType",label:this.translate.instant("lang.destinationEntityType"),isFunction:!0},{value:"getSenders",label:this.translate.instant("lang.getSenders"),isFunction:!0},{value:"getRecipients",label:this.translate.instant("lang.getRecipients"),isFunction:!0},{value:"getTypist",label:this.translate.instant("lang.typist"),isFunction:!0},{value:"getAssignee",label:this.translate.instant("lang.dest_user"),isFunction:!0},{value:"getTags",label:this.translate.instant("lang.tags"),isFunction:!0},{value:"getSignatories",label:this.translate.instant("lang.signUser"),isFunction:!0},{value:"getSignatureDates",label:this.translate.instant("lang.signatureDate"),isFunction:!0},{value:"getDepartment",label:this.translate.instant("lang.department"),isFunction:!0},{value:"getAcknowledgementSendDate",label:this.translate.instant("lang.acknowledgementSendDate"),isFunction:!0},{value:"getVisaCircuit",label:this.translate.instant("lang.getVisaWorkflow"),isFunction:!0},{value:"getOpinionCircuit",label:this.translate.instant("lang.opinionCircuit"),isFunction:!0},{value:"",label:this.translate.instant("lang.comment"),isFunction:!0}],this.dataAvailableClone=[]}ngOnInit(){this.dataAvailableClone=JSON.parse(JSON.stringify(this.dataAvailable)),this.http.get("../rest/resourcesList/exportTemplate").subscribe(t=>{this.exportModel.resources=this.data.selectedRes,this.exportModelList=t.templates,this.exportModel.data=t.templates.csv.data,this.exportModel.data.forEach(t=>{this.dataAvailable.forEach((e,i)=>{t.value===e.value&&this.dataAvailable.splice(i,1)})}),this.loading=!1},t=>{this.notify.handleErrors(t)}),this.http.get("../rest/customFields").pipe(Object(l.a)(t=>(t.customFields=t.customFields.map(t=>({value:"custom_"+t.id,label:t.label,isFunction:!0})),t)),Object(mt.a)(t=>{this.dataAvailable=this.dataAvailable.concat(t.customFields),this.dataAvailableClone=this.dataAvailableClone.concat(t.customFields)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}drop(t){if(t.previousContainer===t.container)Object(lo.h)(t.container.data,t.previousIndex,t.currentIndex);else{let e=t.previousIndex;if("selectedElements"===t.container.id&&(e=0,void 0!==$(".available-data .columns")[t.previousIndex])){const i=$(".available-data .columns")[t.previousIndex].id;e=this.dataAvailable.map(t=>t.value).indexOf(i)}Object(lo.i)(t.previousContainer.data,t.container.data,e,t.currentIndex);const i=this.listFilter.nativeElement.value;this.listFilter.nativeElement.value="",setTimeout(()=>{this.listFilter.nativeElement.value=i},10)}}exportData(){this.loadingExport=!0,this.http.put("../rest/resourcesList/exports",this.exportModel,{responseType:"blob"}).pipe(Object(mt.a)(t=>{if("text/html"!==t.type){const e=document.createElement("a");let i,n,a,s;e.href=window.URL.createObjectURL(t),i=new Date,n=i.getDate(),a=i.getMonth()+1,s=i.getFullYear(),n<10&&(n="0"+n),a<10&&(a="0"+a),i=n+"-"+a+"-"+s,e.setAttribute("download","export_maarch_"+i+"."+this.exportModel.format.toLowerCase()),document.body.appendChild(e),e.click(),this.exportModelList[this.exportModel.format.toLowerCase()].data=this.exportModel.data}else alert(this.translate.instant("lang.tooMuchDatas"))}),Object(Xt.a)(()=>this.loadingExport=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}addData(t){let e=0;this.dataAvailable.forEach((i,n)=>{i.value===t.value&&(e=n)}),Object(lo.i)(this.dataAvailable,this.exportModel.data,e,this.exportModel.data.length);const i=this.listFilter.nativeElement.value;this.listFilter.nativeElement.value="",setTimeout(()=>{this.listFilter.nativeElement.value=i},10)}removeData(t){Object(lo.i)(this.exportModel.data,this.dataAvailable,t,this.dataAvailable.length),this.sortPipe.transform(this.dataAvailable,"label")}removeAllData(){this.dataAvailable=this.dataAvailable.concat(this.exportModel.data),this.exportModel.data=[]}addAllData(){for(this.exportModel.data=this.exportModel.data.concat(this.dataAvailable);this.dataAvailable.length>0;)this.dataAvailable.pop();this.listFilter.nativeElement.value=""}changeTemplate(t){this.dataAvailable=JSON.parse(JSON.stringify(this.dataAvailableClone)),this.exportModel.format=t.value,this.exportModel.data=this.exportModelList[t.value].data,this.exportModel.data.forEach(t=>{this.dataAvailable.forEach((e,i)=>{t.value===e.value&&this.dataAvailable.splice(i,1)})})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.a),n.Qb(Wt.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(ew,!0),2&t&&n.yc(i=n.ec())&&(e.listFilter=i.first)},features:[n.Cb([Wt.a])],decls:63,vars:62,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loader",4,"ngIf"],[1,"row"],["appearance","outline"],[3,"placeholder","ngModel","ngModelChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["class","col-md-9",4,"ngIf"],[3,"expanded"],[1,"col-md-12"],["appearance","outline",1,"listFilter"],["matInput","","cdkFocusInitial","",3,"placeholder"],["listFilter",""],[1,"row","exportList"],[1,"col-md-6","available-data"],[1,"title"],["color","primary",1,"fa","fa-plus-circle","removeAllDatas",3,"title","click"],["id","availableElements","cdkDropList","",1,"cdk-list",3,"cdkDropListData","cdkDropListConnectedTo","cdkDropListDropped"],["dataAvailableList","cdkDropList"],["class","columns","cdkDrag","",3,"id",4,"ngFor","ngForOf"],["class","noData",4,"ngIf"],[2,"display","flex","align-items","center"],[1,"fas","fa-arrow-right"],[1,"col-md-6","active-data"],["color","warn",1,"fa","fa-minus-circle","removeAllDatas",3,"title","click"],["id","selectedElements","cdkDropList","",1,"cdk-list",3,"cdkDropListData","cdkDropListConnectedTo","cdkDropListDropped"],["dataExportList","cdkDropList"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"mat-dialog-close"],[1,"loader"],[3,"value"],[1,"col-md-9"],[3,"placeholder","ngModel","disabled","ngModelChange"],["cdkDrag","",1,"columns",3,"id"],["color","primary",1,"fa","fa-plus",2,"cursor","pointer",3,"click"],[1,"noData"],["color","warn",1,"fa","fa-minus",2,"cursor","pointer",3,"click"]],template:function(t,e){if(1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"div",2),n.Oc(5,iw,2,0,"div",3),n.Wb(6,"div",4),n.Wb(7,"div"),n.Wb(8,"mat-form-field",5),n.Wb(9,"mat-label"),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Wb(12,"mat-select",6),n.dc("ngModelChange",(function(t){return e.exportModel.format=t}))("selectionChange",(function(t){return e.changeTemplate(t)})),n.ic(13,"translate"),n.Oc(14,nw,2,2,"mat-option",7),n.Vb(),n.Vb(),n.Vb(),n.Oc(15,sw,8,9,"div",8),n.Vb(),n.Wb(16,"mat-accordion"),n.Wb(17,"mat-expansion-panel",9),n.Wb(18,"mat-expansion-panel-header"),n.Wb(19,"mat-panel-title"),n.Qc(20),n.ic(21,"translate"),n.Vb(),n.Vb(),n.Wb(22,"div",4),n.Wb(23,"div",10),n.Wb(24,"mat-form-field",11),n.Rb(25,"input",12,13),n.ic(27,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(28,"div",14),n.Wb(29,"div",15),n.Wb(30,"h2"),n.Wb(31,"span",16),n.Qc(32),n.ic(33,"translate"),n.Vb(),n.Wb(34,"i",17),n.dc("click",(function(){return e.addAllData()})),n.ic(35,"translate"),n.Vb(),n.Vb(),n.Wb(36,"div",18,19),n.dc("cdkDropListDropped",(function(t){return e.drop(t)})),n.Oc(38,ow,3,2,"div",20),n.ic(39,"filterList"),n.ic(40,"sortBy"),n.Oc(41,rw,3,3,"div",21),n.Vb(),n.Vb(),n.Wb(42,"div",22),n.Rb(43,"i",23),n.Vb(),n.Wb(44,"div",24),n.Wb(45,"h2"),n.Wb(46,"span",16),n.Qc(47),n.ic(48,"translate"),n.Vb(),n.Wb(49,"i",25),n.dc("click",(function(){return e.removeAllData()})),n.ic(50,"translate"),n.Vb(),n.Vb(),n.Wb(51,"div",26,27),n.dc("cdkDropListDropped",(function(t){return e.drop(t)})),n.Oc(53,cw,3,2,"div",20),n.Oc(54,lw,3,3,"div",21),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Rb(55,"span",28),n.Wb(56,"div",29),n.Wb(57,"button",30),n.dc("click",(function(){return e.exportData()})),n.Qc(58),n.ic(59,"translate"),n.Vb(),n.Wb(60,"button",31),n.Qc(61),n.ic(62,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.zc(26),i=n.zc(37),a=n.zc(52);n.Db(2),n.Rc(n.jc(3,29,"lang.exportDatas")),n.Db(3),n.oc("ngIf",e.loadingExport),n.Db(2),n.Ib("col-md-12","csv"!=e.exportModel.format)("col-md-3","csv"==e.exportModel.format),n.Db(3),n.Rc(n.jc(11,31,"lang.format")),n.Db(2),n.pc("placeholder",n.jc(13,33,"lang.format")),n.oc("ngModel",e.exportModel.format),n.Db(2),n.oc("ngForOf",e.formats),n.Db(1),n.oc("ngIf","csv"==e.exportModel.format),n.Db(2),n.oc("expanded",!0),n.Db(3),n.Sc(" ",n.jc(21,35,"lang.datasToExport")," "),n.Db(5),n.pc("placeholder",n.jc(27,37,"lang.searchDatas")),n.Db(7),n.Rc(n.jc(33,39,"lang.availableDatas")),n.Db(2),n.pc("title",n.jc(35,41,"lang.addAllData")),n.Db(2),n.oc("cdkDropListData",e.dataAvailable)("cdkDropListConnectedTo",n.vc(58,dw,a)),n.Db(2),n.oc("ngForOf",n.lc(39,43,n.kc(40,47,e.dataAvailable,"label"),t.value,"label")),n.Db(3),n.oc("ngIf",0==e.dataAvailable.length),n.Db(6),n.Rc(n.jc(48,50,"lang.chosenDatas")),n.Db(2),n.pc("title",n.jc(50,52,"lang.removeAllDatas")),n.Db(2),n.oc("cdkDropListData",e.exportModel.data)("cdkDropListConnectedTo",n.vc(60,dw,i)),n.Db(2),n.oc("ngForOf",e.exportModel.data),n.Db(1),n.oc("ngIf",0==e.exportModel.data.length),n.Db(3),n.oc("disabled",0==e.exportModel.data.length),n.Db(1),n.Rc(n.jc(59,54,"lang.toExport")),n.Db(3),n.Rc(n.jc(62,56,"lang.cancel"))}},directives:[q.i,q.f,P.t,Y.c,Y.g,ee.a,X.u,X.x,P.s,gt.a,gt.c,gt.g,gt.h,J.b,lo.e,q.c,k.b,q.d,V.c,W.p,lo.a],pipes:[g.d,rg,Wt.a],styles:[".mat-dialog-container{position:relative}.mat-dialog-content[_ngcontent-%COMP%]{padding-bottom:10px;overflow-x:hidden} .mat-expansion-panel-body{padding-bottom:50px}.mat-expansion-panel-header[_ngcontent-%COMP%], .noData[_ngcontent-%COMP%]{opacity:.5}.noData[_ngcontent-%COMP%]{text-align:center}.removeAllDatas[_ngcontent-%COMP%]{float:right;font-size:14px;opacity:1;cursor:pointer;margin-right:10px}.listFilter[_ngcontent-%COMP%]{font-size:10px;margin-bottom:-20px}.exportList[_ngcontent-%COMP%]{display:flex}.exportList[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{float:left;height:20px;font-size:10px;font-weight:700;opacity:.5}.exportList[_ngcontent-%COMP%] .cdk-list[_ngcontent-%COMP%]{height:100%}.cdk-list[_ngcontent-%COMP%]{max-width:100%;border:1px solid #ccc;display:block;border-radius:4px;max-height:310px;min-height:310px;overflow:auto}.cdk-list[_ngcontent-%COMP%], .columns[_ngcontent-%COMP%]{width:100%;background:#fff}.columns[_ngcontent-%COMP%]{height:50px;padding:20px 10px;border-bottom:1px solid #ccc;color:rgba(0,0,0,.87);display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;cursor:move;font-size:14px}.cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.columns[_ngcontent-%COMP%]:last-child{border:none}.cdk-list.cdk-drop-list-dragging[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.actions[_ngcontent-%COMP%], .loader[_ngcontent-%COMP%]{justify-content:center}.loader[_ngcontent-%COMP%]{position:absolute;display:flex;width:100%;left:0;top:0;height:100%;background:hsla(0,0%,100%,.6);z-index:1;align-items:center}"]}),t})();function uw(t,e){1&t&&(n.Wb(0,"div",25),n.Rb(1,"mat-spinner"),n.Vb())}function pw(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",41),n.dc("click",(function(){n.Dc(t);const e=n.hc(2).index;return n.hc().removeCustomUnit(e)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",42),n.Vb()}2&t&&n.pc("title",n.jc(1,1,"lang.deleteUnit"))}function bw(t,e){if(1&t&&(n.Wb(0,"div"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(3).$implicit;n.Fb(i.css),n.Db(1),n.Sc(" ",t," ")}}function fw(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",43),n.dc("click",(function(){n.Dc(t);const e=n.hc(2).$implicit;return e.enabled=!e.enabled})),n.Oc(1,bw,2,4,"div",44),n.Vb()}if(2&t){const t=n.hc(2).$implicit;n.Db(1),n.oc("ngForOf",t.desc)}}function mw(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",43),n.dc("click",(function(){n.Dc(t);const e=n.hc(2).$implicit;return e.enabled=!e.enabled})),n.Rb(1,"div",45),n.Vb()}if(2&t){const t=n.hc(2).$implicit;n.Db(1),n.oc("innerHTML",t.advanced_desc,n.Ec)}}function gw(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",27),n.Wb(1,"div",28),n.Wb(2,"div",29),n.gc(),n.Wb(3,"svg",30),n.Rb(4,"path",31),n.Rb(5,"path",32),n.Vb(),n.Vb(),n.fc(),n.Wb(6,"mat-form-field",33),n.Wb(7,"input",34),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().$implicit.label=e}))("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Oc(9,pw,3,3,"button",35),n.Vb(),n.Wb(10,"div",36),n.Wb(11,"div",37),n.Oc(12,fw,2,1,"div",38),n.Rb(13,"br"),n.Oc(14,mw,2,1,"div",38),n.Vb(),n.Wb(15,"div",39),n.Wb(16,"mat-slide-toggle",40),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().$implicit.enabled=e})),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc();n.Ib("disabled",!t.enabled),n.pc("id",t.id),n.Db(7),n.pc("placeholder",n.jc(8,9,"lang.label")),n.oc("ngModel",t.label),n.Db(2),n.oc("ngIf","freeField"==t.unit),n.Db(3),n.oc("ngIf",!e.functions.empty(t.desc)),n.Db(2),n.oc("ngIf",t.advanced_desc),n.Db(2),n.oc("ngModel",t.enabled)}}function vw(t,e){if(1&t&&(n.Ub(0),n.Oc(1,gw,17,11,"div",26),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf","qrcode"!==t.unit)}}function _w(t,e){1&t&&(n.Wb(0,"div",20),n.Wb(1,"span",46),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,1,"lang.firstSummarySheetsGenerated")))}function yw(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",47),n.dc("click",(function(){return n.Dc(t),n.hc().closeModalWithParams()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.validate")))}function xw(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",47),n.dc("click",(function(){return n.Dc(t),n.hc().genSummarySheets()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.genSummarySheets")))}let Cw=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.functions=s,this.sanitizer=o,this.loading=!1,this.withQrcode=!0,this.paramMode=!1,this.dataAvailable=[{id:"primaryInformations",unit:"primaryInformations",label:this.translate.instant("lang.primaryInformations"),css:"col-md-6 text-left",desc:[this.translate.instant("lang.mailDate"),this.translate.instant("lang.arrivalDate"),this.translate.instant("lang.nature"),this.translate.instant("lang.creation_date"),this.translate.instant("lang.mailType"),this.translate.instant("lang.initiator")],enabled:!0},{id:"senderRecipientInformations",unit:"senderRecipientInformations",label:this.translate.instant("lang.senderRecipientInformations"),css:"col-md-6 text-left",desc:[this.translate.instant("lang.senders"),this.translate.instant("lang.recipients")],enabled:!0},{id:"secondaryInformations",unit:"secondaryInformations",label:this.translate.instant("lang.secondaryInformations"),css:"col-md-6 text-left",desc:[this.translate.instant("lang.category_id"),this.translate.instant("lang.status"),this.translate.instant("lang.priority"),this.translate.instant("lang.processLimitDate"),this.translate.instant("lang.retentionRuleFrozen"),this.translate.instant("lang.bindingMail"),this.translate.instant("lang.customFieldsAdmin")],enabled:!0},{id:"diffusionList",unit:"diffusionList",label:this.translate.instant("lang.diffusionList"),css:"col-md-6 text-left",desc:[this.translate.instant("lang.dest_user"),this.translate.instant("lang.copyUsersEntities")],enabled:!0},{id:"opinionWorkflow",unit:"opinionWorkflow",label:this.translate.instant("lang.avis"),css:"col-md-4 text-center",desc:[this.translate.instant("lang.firstname")+" "+this.translate.instant("lang.lastname")+" ("+this.translate.instant("lang.destination").toLowerCase()+")",this.translate.instant("lang.role"),this.translate.instant("lang.processDate")],enabled:!0},{id:"visaWorkflow",unit:"visaWorkflow",label:this.translate.instant("lang.visaWorkflow"),css:"col-md-4 text-center",desc:[this.translate.instant("lang.firstname")+" "+this.translate.instant("lang.lastname")+" ("+this.translate.instant("lang.destination").toLowerCase()+")",this.translate.instant("lang.role"),this.translate.instant("lang.processDate")],enabled:!0},{id:"notes",unit:"notes",label:this.translate.instant("lang.notes"),css:"col-md-4 text-center",desc:[this.translate.instant("lang.firstname")+" "+this.translate.instant("lang.lastname"),this.translate.instant("lang.creation_date"),this.translate.instant("lang.content")],enabled:!0},{id:"trafficRecords",unit:"trafficRecords",label:this.translate.instant("lang.trafficRecordSummarySheet"),css:"col-md-4 text-center",desc:[],enabled:!0}]}ngOnInit(){this.paramMode=!this.functions.empty(this.data.paramMode),this.http.get("../rest/parameters").pipe(Object(mt.a)(t=>{const e=t.parameters.filter(t=>"traffic_record_summary_sheet"===t.id&&!this.functions.empty(t.param_value_string));this.dataAvailable=0===e.length?this.dataAvailable.filter(t=>"trafficRecords"!==t.id):this.dataAvailable.map(t=>("trafficRecords"===t.id&&(t.advanced_desc=this.sanitizer.bypassSecurityTrustHtml(e[0].param_value_string)),t))})).subscribe()}drop(t){t.previousContainer===t.container&&Object(lo.h)(t.container.data,t.previousIndex,t.currentIndex)}genSummarySheets(){this.loading=!0,this.http.post("../rest/resourcesList/summarySheets",{units:this.formatSummarySheet(),resources:this.data.selectedRes},{responseType:"blob"}).subscribe(t=>{if("text/html"!==t.type){const e=document.createElement("a");let i,n,a,s;e.href=window.URL.createObjectURL(t),i=new Date,n=i.getDate(),a=i.getMonth()+1,s=i.getFullYear(),n<10&&(n="0"+n),a<10&&(a="0"+a),i=n+"-"+a+"-"+s,e.setAttribute("download",this.translate.instant("lang.summarySheetsAlt")+"_"+i+".pdf"),document.body.appendChild(e),e.click()}else alert(this.translate.instant("lang.tooMuchDatas"));this.loading=!1},t=>{this.notify.handleErrors(t)})}formatSummarySheet(){const t=[];return this.withQrcode&&t.push({unit:"qrcode",label:""}),this.dataAvailable.forEach(e=>{e.enabled&&t.push({unit:e.unit,label:e.label})}),t}toggleQrcode(){this.withQrcode=!this.withQrcode}addCustomUnit(){this.dataAvailable.push({id:"freeField_"+this.dataAvailable.length,unit:"freeField",label:this.translate.instant("lang.comments"),css:"col-md-12 text-left",desc:[this.translate.instant("lang.freeNote")],enabled:!0})}removeCustomUnit(t){this.dataAvailable.splice(t,1)}closeModalWithParams(){this.dialogRef.close(this.formatSummarySheet())}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(_t.a),n.Qb(ca.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:44,vars:36,consts:[[1,"mat-dialog-content-container"],["mat-dialog-content","",1,"summarySheet"],["class","loader",4,"ngIf"],[1,"row","header"],[1,"col-md-4","text-left"],[1,"col-md-4","text-center"],[1,"col-md-4","text-right"],["multiple","",2,"position","absolute","top","-2px","right","0px",3,"change"],[1,"qrcode",2,"width","40px","height","40px",3,"checked","title"],["fontSet","fas","fontIcon","fa-qrcode",2,"height","auto","font-size","30px"],[1,"row"],[1,"col-md-12","title"],[1,"col-md-12"],["cdkDropList","",1,"cdk-list",3,"cdkDropListData","cdkDropListDropped"],["dataAvailableList","cdkDropList"],[4,"ngFor","ngForOf"],["mat-dialog-actions","","class","actions",4,"ngIf"],[2,"padding","10px"],[1,"alert-message","alert-message-info"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"click",4,"ngIf"],["mat-raised-button","","mat-button","",3,"mat-dialog-close"],["mat-mini-fab","","color","primary",2,"position","absolute","right","30px",3,"title","click"],["fontSet","fas","fontIcon","fa-plus",2,"height","auto"],[1,"loader"],["class","columns","cdkDrag","","style","position: relative;",3,"disabled","id",4,"ngIf"],["cdkDrag","",1,"columns",2,"position","relative",3,"id"],[1,"unitTitle"],["cdkDragHandle","",1,"handleDrag"],["width","24px","fill","currentColor","viewBox","0 0 24 24"],["d","M10 9h4V6h3l-5-5-5 5h3v3zm-1 1H6V7l-5 5 5 5v-3h3v-4zm14 2l-5-5v3h-3v4h3v3l5-5zm-9 3h-4v3H7l5 5 5-5h-3v-3z"],["d","M0 0h24v24H0z","fill","none"],["floatLabel","never",2,"margin-top","-10px"],["matInput","",3,"placeholder","ngModel","ngModelChange","click"],["mat-icon-button","","color","warn",3,"title","click",4,"ngIf"],[1,"rowData"],[1,"column-1"],["class","row unitData",3,"click",4,"ngIf"],[1,"column-2"],["color","primary",1,"unitToggle",3,"ngModel","ngModelChange"],["mat-icon-button","","color","warn",3,"title","click"],["fontSet","fas","fontIcon","fa-minus"],[1,"row","unitData",3,"click"],[3,"class",4,"ngFor","ngForOf"],["name","traffic_record_summary_sheet","id","traffic_record_summary_sheet",2,"padding-top","10px",3,"innerHTML"],[2,"color","#d24747","font-style","italic"],["mat-raised-button","","mat-button","","color","primary",3,"click"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"div",1),n.Oc(2,uw,2,0,"div",2),n.Wb(3,"div",3),n.Wb(4,"div",4),n.Qc(5),n.ic(6,"translate"),n.ic(7,"translate"),n.Vb(),n.Wb(8,"div",5),n.Wb(9,"b"),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Rb(12,"br"),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Wb(15,"div",6),n.Wb(16,"mat-button-toggle-group",7),n.dc("change",(function(){return e.toggleQrcode()})),n.Wb(17,"mat-button-toggle",8),n.ic(18,"translate"),n.Rb(19,"mat-icon",9),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(20,"div",10),n.Wb(21,"div",11),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Wb(24,"div",10),n.Wb(25,"div",12),n.Wb(26,"div",13,14),n.dc("cdkDropListDropped",(function(t){return e.drop(t)})),n.Oc(28,vw,2,1,"ng-container",15),n.Vb(),n.Vb(),n.Vb(),n.Oc(29,_w,4,3,"div",16),n.Wb(30,"div",17),n.Wb(31,"span",18),n.Qc(32),n.ic(33,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Rb(34,"span",19),n.Wb(35,"div",20),n.Oc(36,yw,3,3,"button",21),n.Oc(37,xw,3,3,"button",21),n.Wb(38,"button",22),n.Qc(39),n.ic(40,"translate"),n.Vb(),n.Wb(41,"button",23),n.dc("click",(function(){return e.addCustomUnit()})),n.ic(42,"translate"),n.Rb(43,"mat-icon",24),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.oc("ngIf",e.loading),n.Db(3),n.Tc(" ",n.jc(6,18,"lang.appName")," / ",n.jc(7,20,"lang.printDate")," "),n.Db(5),n.Rc(n.jc(11,22,"lang.summarySheet")),n.Db(3),n.Sc("",n.jc(14,24,"lang.chronoNumber")," "),n.Db(2),n.Ib("disabled",!e.withQrcode),n.Db(2),n.pc("title",n.jc(18,26,"lang.toggleQrcode")),n.oc("checked",e.withQrcode),n.Db(5),n.Sc(" ",n.jc(23,28,"lang.object")," "),n.Db(4),n.oc("cdkDropListData",e.dataAvailable),n.Db(2),n.oc("ngForOf",e.dataAvailable),n.Db(1),n.oc("ngIf",!e.functions.empty(e.data.selectedRes)&&e.data.selectedRes.length>500&&!e.paramMode),n.Db(3),n.Rc(n.jc(33,30,"lang.arGenWithModelMessage")),n.Db(4),n.oc("ngIf",e.paramMode),n.Db(1),n.oc("ngIf",!e.paramMode),n.Db(2),n.Rc(n.jc(40,32,"lang.cancel")),n.Db(2),n.pc("title",n.jc(42,34,"lang.addCustomUnit")))},directives:[q.f,P.t,og.b,og.a,S.a,lo.e,P.s,q.c,k.b,q.d,V.c,lo.a,lo.b,Y.c,J.b,X.d,X.u,X.x,te.a],pipes:[g.d],styles:[".mat-expansion-panel-body{padding-bottom:50px} .mat-slide-toggle-content{color:rgba(0,0,0,.87)}.cdk-drag-preview[_ngcontent-%COMP%] .header[_ngcontent-%COMP%], .summarySheet[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{font-size:10px;padding:10px}.cdk-drag-preview[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .summarySheet[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{text-align:center;font-weight:700;font-size:24px;margin-top:10px;margin-bottom:10px;border:1px solid #000}.cdk-drag-preview[_ngcontent-%COMP%] .unitTitle[_ngcontent-%COMP%], .summarySheet[_ngcontent-%COMP%] .unitTitle[_ngcontent-%COMP%]{display:flex;cursor:auto;top:2px;left:5px;width:50%}.cdk-drag-preview[_ngcontent-%COMP%] .unitData[_ngcontent-%COMP%], .summarySheet[_ngcontent-%COMP%] .unitData[_ngcontent-%COMP%]{cursor:pointer;width:100%;opacity:.5}.cdk-drag-preview[_ngcontent-%COMP%] .unitToggle[_ngcontent-%COMP%], .summarySheet[_ngcontent-%COMP%] .unitToggle[_ngcontent-%COMP%]{right:10px}.cdk-drag-preview[_ngcontent-%COMP%] .rowData[_ngcontent-%COMP%], .summarySheet[_ngcontent-%COMP%] .rowData[_ngcontent-%COMP%]{display:flex;margin:8px;flex-direction:row}.cdk-list[_ngcontent-%COMP%]{max-width:100%;border:1px solid #ccc;min-height:60px;display:block;border-radius:4px;overflow:auto}.cdk-list[_ngcontent-%COMP%], .columns[_ngcontent-%COMP%]{width:100%;background:#fff}.columns[_ngcontent-%COMP%]{padding:8px 4px;border-bottom:1px solid #ccc;color:rgba(0,0,0,.87);align-items:center;justify-content:space-between;box-sizing:border-box;font-size:14px}.cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.columns[_ngcontent-%COMP%]:last-child{border:none}.cdk-list.cdk-drop-list-dragging[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.actions[_ngcontent-%COMP%]{position:relative}.actions[_ngcontent-%COMP%], .loader[_ngcontent-%COMP%]{justify-content:center}.loader[_ngcontent-%COMP%]{position:absolute;display:flex;width:100%;left:0;top:0;height:100%;background:hsla(0,0%,100%,.6);z-index:1;align-items:center}.disabled[_ngcontent-%COMP%]{opacity:.5}.qrcode[_ngcontent-%COMP%] .mat-button-toggle-label-content{padding-left:7px!important;line-height:40px!important}.qrcode.mat-button-toggle-checked.mat-button-toggle-appearance-standard[_ngcontent-%COMP%]{background-color:#135f7f;color:#fff}.handleDrag[_ngcontent-%COMP%]{padding-right:5px;cursor:move;display:inline-block;opacity:.5}.column-1[_ngcontent-%COMP%]{width:90%}.column-2[_ngcontent-%COMP%]{width:10%}#traffic_record_summary_sheet[_ngcontent-%COMP%]{margin-left:20px;margin-right:-75px}"]}),t})(),Ow=(()=>{class t{constructor(t,e,i){this.translate=t,this.http=e,this.dialog=i,this.priorities=[],this.categories=[],this.entitiesList=[],this.statuses=[],this.metaSearchInput="",this.stateGroups=[],this.isLoading=!1}ngOnInit(){}openExport(){this.dialog.open(hw,{panelClass:"maarch-modal",width:"800px",data:{selectedRes:this.selectedRes}})}openSummarySheet(){this.dialog.open(Cw,{panelClass:"maarch-full-height-modal",width:"800px",data:{selectedRes:this.selectedRes}})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-tools-list"]],viewQuery:function(t,e){var i;1&t&&n.Kc(Ne.d,!0),2&t&&n.yc(i=n.ec())&&(e.autocomplete=i.first)},inputs:{listProperties:"listProperties",currentBasketInfo:"currentBasketInfo",sidenavRight:["snavR","sidenavRight"],selectedRes:"selectedRes",totalRes:"totalRes"},decls:6,vars:8,consts:[["mat-mini-fab","",3,"disabled","title","click"],[1,"fas","fa-scroll"],[1,"fa","fa-file-download"]],template:function(t,e){1&t&&(n.Wb(0,"button",0),n.dc("click",(function(){return e.openSummarySheet()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",1),n.Vb(),n.Wb(3,"button",0),n.dc("click",(function(){return e.openExport()})),n.ic(4,"translate"),n.Rb(5,"mat-icon",2),n.Vb()),2&t&&(n.pc("title",n.jc(1,4,"lang.summarySheets")),n.oc("disabled",0==e.selectedRes.length),n.Db(3),n.pc("title",n.jc(4,6,"lang.exportDatas")),n.oc("disabled",0==e.selectedRes.length))},directives:[k.b,S.a],pipes:[g.d],styles:[".mat-icon[_ngcontent-%COMP%]{height:auto}.mat-mini-fab[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;box-shadow:none;margin-left:5px;margin-right:5px}.mat-mini-fab[_ngcontent-%COMP%]:disabled{border:1px solid #fff}"]}),t})();function Dw(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div",8),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Rb(4,"mat-divider",9),n.Tb()),2&t){const t=n.hc().$implicit,e=n.hc();n.Db(2),n.Tc("",n.jc(3,2,"lang."+t.key)," (",e.getRealCount(t.key),")")}}function ww(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-option",11),n.dc("click",(function(){n.Dc(t);const e=n.hc(2).index,i=n.hc().$implicit;return n.hc().toggleFilter(i.key,e)})),n.Wb(1,"span",12),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"span",13),n.Qc(5),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2).$implicit,e=n.hc(2);n.oc("selected",t.selected)("disabled",e.isLoadingResults),n.Db(1),n.oc("title",t.label),n.Db(1),n.Rc(null!==t.id?t.label:n.jc(3,7,"lang.undefined")),n.Db(2),n.Ib("noRes",0===t.count),n.Db(1),n.Rc(t.count)}}function Mw(t,e){if(1&t&&(n.Ub(0),n.Oc(1,ww,6,9,"mat-list-option",10),n.Tb()),2&t){const t=n.hc().index,e=n.hc().$implicit,i=n.hc();n.Db(1),n.oc("ngIf",t<5||i.filters[e.key].expand)}}function kw(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Mw,2,1,"ng-container",5),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",t.count>0||0===t.count&&t.selected)}}function Sw(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",14),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc().toggleDisplay(e.key)})),n.Qc(1),n.ic(2,"translate"),n.ic(3,"translate"),n.Rb(4,"mat-icon",15),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc();n.Db(1),n.Rc(e.filters[t.key].expand?n.jc(2,5,"lang.less"):n.jc(3,7,"lang.more")),n.Db(3),n.Ib("fa-chevron-down",!e.filters[t.key].expand)("fa-chevron-up",e.filters[t.key].expand)}}function Iw(t,e){if(1&t&&(n.Wb(0,"mat-selection-list",3,4),n.Oc(2,Dw,5,4,"ng-container",5),n.Oc(3,kw,2,1,"ng-container",6),n.Oc(4,Sw,5,9,"button",7),n.Vb()),2&t){const t=e.$implicit,i=n.hc();n.Db(2),n.oc("ngIf",i.getRealCount(t.key)>0),n.Db(1),n.oc("ngForOf",i.getFiltersNotEmpty(t.key)),n.Db(1),n.oc("ngIf",i.getRealCount(t.key)>5)}}let Pw=(()=>{class t{constructor(t,e,i,a){this.translate=t,this.http=e,this.appService=i,this.functions=a,this.filters={},this.isLoadingResults=!1,this.filterChanged=new n.o}ngOnInit(){}setfilters(t){this.filters=t}toggleFilter(t,e){this.getFiltersNotEmpty(t)[e].selected=!this.getFiltersNotEmpty(t)[e].selected,this.filterChanged.emit()}toggleDisplay(t){this.filters[t].expand=!this.filters[t].expand}getRealCount(t){return this.filters[t].values.filter(t=>t.count>0||0===t.count&&t.selected).length}getFiltersNotEmpty(t){return this.filters[t].values.filter(t=>t.count>0||0===t.count&&t.selected)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(w.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-filter-tool-adv-search"]],inputs:{filters:"filters",isLoadingResults:"isLoadingResults"},outputs:{filterChanged:"filterChanged"},decls:8,vars:6,consts:[["expanded","",1,"FilterContainer"],[1,"fas","fa-filter","panelIconMenu"],["class","filter-list",4,"ngFor","ngForOf"],[1,"filter-list"],["filterList",""],[4,"ngIf"],[4,"ngFor","ngForOf"],["mat-button","","style","width:100%;","color","primary",3,"click",4,"ngIf"],[1,"catGroupTitle"],[2,"width","80%"],["color","primary","class","catContent","checkboxPosition","before",3,"selected","disabled","click",4,"ngIf"],["color","primary","checkboxPosition","before",1,"catContent",3,"selected","disabled","click"],[1,"catLabel",3,"title"],[1,"catBadge"],["mat-button","","color","primary",2,"width","100%",3,"click"],[1,"fas",2,"height","auto"]],template:function(t,e){1&t&&(n.Wb(0,"mat-expansion-panel",0),n.Wb(1,"mat-expansion-panel-header"),n.Wb(2,"mat-panel-title"),n.Rb(3,"i",1),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Oc(6,Iw,5,3,"mat-selection-list",2),n.ic(7,"keyvalue"),n.Vb()),2&t&&(n.Db(4),n.Sc("\xa0",n.jc(5,2,"lang.filterBy")," "),n.Db(2),n.oc("ngForOf",n.jc(7,4,e.filters)))},directives:[gt.c,gt.g,gt.h,P.s,R.i,P.t,T.a,R.f,k.b,S.a],pipes:[g.d,P.l],styles:[".catGroupTitle[_ngcontent-%COMP%]{color:#135f7f;font-size:14px;font-weight:500;padding-left:10px}.catContent[_ngcontent-%COMP%]{font-size:12px;font-weight:700}.catLabel[_ngcontent-%COMP%]{flex:1}.catBadge[_ngcontent-%COMP%]{color:#135f7f;font-size:14px;font-weight:700!important;min-width:auto}.filter-list[_ngcontent-%COMP%] .mat-list-text{flex-direction:row}.FilterContainer[_ngcontent-%COMP%]{border-radius:0;box-shadow:none}.FilterContainer[_ngcontent-%COMP%] .mat-expansion-panel-body{padding:0}.FilterContainer[_ngcontent-%COMP%] .mat-expansion-panel-header-title[_ngcontent-%COMP%]{color:#135f7f;display:flex;align-items:center;font-size:14px;font-weight:500}.FilterContainer[_ngcontent-%COMP%] .mat-line[_ngcontent-%COMP%]{font-size:12px;font-weight:700}.FilterContainer[_ngcontent-%COMP%] .mat-pseudo-checkbox-disabled{opacity:.5}.panelIconMenu[_ngcontent-%COMP%]{font-size:22px}.mat-list-item-disabled[_ngcontent-%COMP%]{background:initial}.noRes[_ngcontent-%COMP%]{color:#666!important;opacity:.5}"]}),t})(),Vw=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.data=n,this.dialogRef=a,this.loading=!1,this.folderName=""}ngOnInit(){this.folderName=void 0!==this.data.folderName?this.data.folderName:""}onSubmit(){this.loading=!0,this.http.post("../rest/folders",{label:this.folderName}).pipe(Object(mt.a)(t=>{this.notify.success(this.translate.instant("lang.folderAdded")),this.dialogRef.close(t.folder)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.a),n.Qb(q.h))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:16,vars:15,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["appearance","outline"],["type","text","matInput","",3,"ngModel","placeholder","ngModelChange"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"div",2),n.Wb(5,"mat-form-field",3),n.Wb(6,"input",4),n.dc("ngModelChange",(function(t){return e.folderName=t})),n.ic(7,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Rb(8,"span",5),n.Wb(9,"div",6),n.Wb(10,"button",7),n.dc("click",(function(){return e.onSubmit()})),n.Qc(11),n.ic(12,"translate"),n.Vb(),n.Wb(13,"button",8),n.Qc(14),n.ic(15,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,7,"lang.addFolder")),n.Db(4),n.oc("ngModel",e.folderName)("placeholder",n.jc(7,9,"lang.folderName")),n.Db(4),n.oc("disabled",e.loading||""===e.folderName),n.Db(1),n.Rc(n.jc(12,11,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(15,13,"lang.cancel")))},directives:[q.i,q.f,Y.c,J.b,X.d,X.u,X.x,q.c,k.b,q.d],pipes:[g.d],styles:[""]}),t})();function Rw(t,e){if(1&t&&(n.Wb(0,"button",8),n.Rb(1,"mat-icon",9),n.Wb(2,"span"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()),2&t){n.hc();const t=n.zc(2);n.oc("matMenuTriggerFor",t),n.Db(3),n.Sc("",n.jc(4,2,"lang.removeFromFolder"),"...")}}function jw(t,e){1&t&&(n.Rb(0,"i",12),n.ic(1,"translate")),2&t&&n.pc("title",n.jc(1,1,"lang.sharedFolder"))}function Aw(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",10),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().unclassifyDocuments(i)})),n.Oc(1,jw,2,3,"i",11),n.Qc(2),n.Vb()}if(2&t){const t=e.$implicit;n.oc("title",t.label),n.Db(1),n.oc("ngIf",t.public),n.Db(1),n.Sc(" ",t.label,"")}}function Ww(t,e){1&t&&(n.Wb(0,"button",19),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.myPinnedFolder")))}function Tw(t,e){1&t&&(n.Wb(0,"button",19),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.noPinnedFolder")))}function Ew(t,e){1&t&&(n.Wb(0,"button",19),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.noAvailableFolder")))}function Fw(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",20),n.dc("click",(function(){return n.Dc(t),n.hc(3).openCreateFolderModal()})),n.Qc(1,"Cr\xe9er un dossier"),n.Vb()}}function Lw(t,e){1&t&&(n.Rb(0,"i",12),n.ic(1,"translate")),2&t&&n.pc("title",n.jc(1,1,"lang.sharedFolder"))}function Qw(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",10),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).classifyDocuments(i)})),n.Oc(1,Lw,2,3,"i",11),n.Qc(2),n.Vb()}if(2&t){const t=e.$implicit;n.oc("title",t.label),n.Db(1),n.oc("ngIf",t.public),n.Db(1),n.Sc(" ",t.label,"")}}function Nw(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Ww,3,3,"button",17),n.Oc(2,Tw,3,3,"button",17),n.Oc(3,Ew,3,3,"button",17),n.Oc(4,Fw,2,0,"button",18),n.Oc(5,Qw,3,3,"button",2),n.ic(6,"sortBy"),n.Tb()),2&t){const t=n.hc(2);n.Db(1),n.oc("ngIf",t.pinnedFolder&&0!==t.foldersList.length),n.Db(1),n.oc("ngIf",t.pinnedFolder&&0===t.foldersList.length),n.Db(1),n.oc("ngIf",!t.pinnedFolder&&0===t.foldersList.length&&!t.loading),n.Db(1),n.oc("ngIf",!t.pinnedFolder&&0===t.foldersList.length&&!t.loading),n.Db(1),n.oc("ngForOf",n.kc(6,5,t.foldersList,"label"))}}function zw(t,e){1&t&&(n.Wb(0,"div",21),n.Rb(1,"mat-spinner",22),n.Vb())}function Bw(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field",13),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.Wb(1,"input",14),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("keydown",(function(e){return n.Dc(t),e.stopPropagation()})),n.ic(2,"translate"),n.Vb(),n.Vb(),n.Oc(3,Nw,7,8,"ng-container",15),n.Oc(4,zw,2,0,"ng-template",null,16,n.Pc)}if(2&t){const t=n.zc(5),e=n.hc();n.Db(1),n.pc("placeholder",n.jc(2,4,"lang.searchFolder")),n.oc("formControl",e.searchTerm),n.Db(2),n.oc("ngIf",!e.loading)("ngIfElse",t)}}let Uw=(()=>{class t{constructor(t,e,i,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.dialog=a,this.renderer=s,this.foldersService=o,this.functions=r,this.foldersList=[],this.pinnedFolder=!0,this.loading=!0,this.refreshFolders=new n.o,this.refreshList=new n.o,this.searchTerm=new X.i}ngOnInit(){this.searchTerm.valueChanges.pipe(Object(pt.a)(300),Object(mt.a)(t=>{0===t.length&&(this.pinnedFolder=!0,this.getFolders())}),Object(d.a)(t=>t.length>2),Object(mt.a)(()=>this.loading=!0),Object(ft.a)(t=>this.http.get("../rest/autocomplete/folders",{params:{search:t}})),Object(mt.a)(t=>{this.pinnedFolder=!1,this.foldersList=t.map(t=>({id:t.id,label:t.idToDisplay})),this.loading=!1}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}initFolderMenu(){this.searchTerm.setValue(""),setTimeout(()=>{this.renderer.selectRootElement("#searchTerm").focus()},200)}getFolders(){this.loading=!0,this.http.get("../rest/pinnedFolders").pipe(Object(l.a)(t=>t.folders),Object(mt.a)(t=>{this.foldersList=t}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}classifyDocuments(t){this.http.post("../rest/folders/"+t.id+"/resources",{resources:this.resIds}).pipe(Object(mt.a)(()=>{this.foldersService.getPinnedFolders(),this.refreshList.emit(),this.refreshFolders.emit(),this.notify.success(this.translate.instant("lang.mailClassified"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}unclassifyDocuments(t){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.unclassifyQuestion")+" <b>"+this.resIds.length+"</b> "+this.translate.instant("lang.mailsInFolder")+" ?"}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.request("DELETE","../rest/folders/"+t.id+"/resources",{body:{resources:this.resIds}})),Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.removedFromFolder")),this.foldersService.getPinnedFolders(),this.refreshList.emit(),this.refreshFolders.emit()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}openCreateFolderModal(){this.dialogRef=this.dialog.open(Vw,{panelClass:"maarch-modal",data:{folderName:this.searchTerm.value}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(t=>{this.classifyDocuments({id:t})}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(n.I),n.Qb(tw.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["folder-menu"]],inputs:{resIds:"resIds",currentFoldersList:["currentFolders","currentFoldersList"]},outputs:{refreshFolders:"refreshFolders",refreshList:"refreshList"},decls:13,vars:14,consts:[["mat-menu-item","","class","folderAction",3,"matMenuTriggerFor",4,"ngIf"],["currentFolders","matMenu"],["mat-menu-item","","class","labelFolder",3,"title","click",4,"ngFor","ngForOf"],["mat-menu-item","",1,"folderAction",3,"matMenuTriggerFor","disabled","menuOpened"],["color","primary",1,"fa","fa-folder-open","fa-2x"],["restoreFocus","false"],["folders","matMenu"],["matMenuContent",""],["mat-menu-item","",1,"folderAction",3,"matMenuTriggerFor"],["color","warn",1,"fa","fa-folder-minus","fa-2x"],["mat-menu-item","",1,"labelFolder",3,"title","click"],["class","fa fa-users private",3,"title",4,"ngIf"],[1,"fa","fa-users","private",3,"title"],["floatLabel","never","appearance","outline",1,"smallInput",3,"click"],["matInput","","id","searchTerm","autocomplete","off",3,"placeholder","formControl","click","keydown"],[4,"ngIf","ngIfElse"],["elseTemplate",""],["mat-menu-item","","class","noFolder","disabled","",4,"ngIf"],["mat-menu-item","","class","createFolder",3,"click",4,"ngIf"],["mat-menu-item","","disabled","",1,"noFolder"],["mat-menu-item","",1,"createFolder",3,"click"],[1,"loading"],["diameter","35"]],template:function(t,e){if(1&t&&(n.Oc(0,Rw,5,4,"button",0),n.Wb(1,"mat-menu",null,1),n.Oc(3,Aw,3,3,"button",2),n.ic(4,"sortBy"),n.Vb(),n.Wb(5,"button",3),n.dc("menuOpened",(function(){return e.initFolderMenu()})),n.Rb(6,"mat-icon",4),n.Wb(7,"span"),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Vb(),n.Wb(10,"mat-menu",5,6),n.Oc(12,Bw,6,6,"ng-template",7),n.Vb()),2&t){const t=n.zc(11);n.oc("ngIf",void 0!==e.currentFoldersList&&e.currentFoldersList.length>0),n.Db(1),n.Fb("folderListMenu"),n.Db(2),n.oc("ngForOf",n.kc(4,9,e.currentFoldersList,"label")),n.Db(2),n.oc("matMenuTriggerFor",t)("disabled",0===e.resIds.length),n.Db(3),n.Rc(n.jc(9,12,"lang.classifyIn")),n.Db(2),n.Fb("folderListMenu")}},directives:[P.t,ne.e,P.s,ne.b,ne.d,S.a,ne.a,Y.c,J.b,X.d,X.u,X.j,V.c],pipes:[Wt.a,g.d],styles:[".folderAction[_ngcontent-%COMP%]{font-style:italic}.folderAction[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{font-size:20px}.labelFolder[_ngcontent-%COMP%]{color:#666;font-size:12px;font-weight:700}.private[_ngcontent-%COMP%]{color:#f99830} .folderListMenu{width:auto}.noFolder[_ngcontent-%COMP%]{font-size:12px;color:#666;text-align:center;font-style:italic}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.loading[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.createFolder[_ngcontent-%COMP%]{color:#135f7f;text-align:center}"]}),t})();function $w(t,e){if(1&t&&(n.Wb(0,"button",17),n.Qc(1),n.ic(2,"translate"),n.Rb(3,"mat-icon",18),n.Vb()),2&t){n.hc();const t=n.zc(3);n.oc("matMenuTriggerFor",t),n.Db(1),n.Rc(n.jc(2,2,"lang.actionsAlt"))}}function Hw(t,e){if(1&t&&n.Rb(0,"span",19,20),2&t){const t=n.hc(),e=n.zc(3);n.Lc("left",t.contextMenuPosition.x)("top",t.contextMenuPosition.y),n.oc("matMenuTriggerFor",e)}}function Gw(t,e){if(1&t&&(n.Wb(0,"div",21),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Sc(" ",t.contextMenuTitle," ")}}function Xw(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",22),n.dc("menuOpened",(function(){return n.Dc(t),n.hc().getBaskets()})),n.Wb(1,"span"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()}if(2&t){n.hc();const t=n.zc(7);n.oc("matMenuTriggerFor",t),n.Db(2),n.Rc(n.jc(3,2,"lang.goToBasket"))}}function qw(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",25),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).goTo(e)})),n.Qc(1),n.Vb()}if(2&t){const t=n.hc().$implicit;n.pc("title",t.basketName),n.Db(1),n.Sc("",t.basketName," ")}}function Kw(t,e){if(1&t&&(n.Ub(0),n.Oc(1,qw,2,2,"button",24),n.Tb()),2&t){const t=e.$implicit,i=n.hc().$implicit;n.Db(1),n.oc("ngIf",t.groupId===i.groupId)}}function Yw(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div",23),n.Qc(2),n.Vb(),n.Oc(3,Kw,2,1,"ng-container",6),n.ic(4,"sortBy"),n.Tb()),2&t){const t=e.$implicit,i=n.hc();n.Db(2),n.Rc(t.groupName),n.Db(1),n.oc("ngForOf",n.kc(4,2,i.basketList.list,"basketName"))}}function Jw(t,e){1&t&&(n.Wb(0,"div",26),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.mailNotPresentInBasket")," "))}function Zw(t,e){if(1&t&&(n.Wb(0,"button",27),n.ic(1,"translate"),n.Rb(2,"mat-icon",28),n.Wb(3,"span"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc(),e=n.zc(20);n.oc("matMenuTriggerFor",e)("disabled",0===t.selectedRes.length)("title",n.jc(1,4,"lang.freezeRetentionRule")),n.Db(4),n.Rc(n.jc(5,6,"lang.freezeRetentionRule"))}}function tM(t,e){if(1&t&&(n.Wb(0,"button",27),n.ic(1,"translate"),n.Rb(2,"mat-icon",29),n.Wb(3,"span"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc(),e=n.zc(32);n.oc("matMenuTriggerFor",e)("disabled",0===t.selectedRes.length)("title",n.jc(1,4,"lang.setBindingDocument")),n.Db(4),n.Rc(n.jc(5,6,"lang.setBindingDocument"))}}let eM=(()=>{class t{constructor(t,e,i,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.dialog=a,this.router=s,this.headerService=o,this.privilegeService=r,this.loading=!1,this.triggerEvent=new n.o,this.contextMenuPosition={x:"0px",y:"0px"},this.contextMenuTitle="",this.currentAction={},this.basketInfo={},this.contextResId=0,this.currentLock=null,this.arrRes=[],this.folderList=[],this.actionsList=[],this.basketList={groups:[],list:[]},this.currentResource={},this.refreshEvent=new n.o,this.refreshPanelFolders=new n.o}ngOnInit(){}open(t,e,i){return this.contextMenuPosition.x=t+"px",this.contextMenuPosition.y=e+"px",this.currentResource=i,this.contextMenuTitle=i.chrono,this.contextResId=i.resId,this.folderList=void 0!==i.folders?i.folders:[],this.contextMenu.openMenu(),this.getFreezeBindingValue(),!1}refreshList(){this.refreshEvent.emit()}refreshFolders(){this.refreshPanelFolders.emit()}refreshDaoAfterAction(){this.refreshEvent.emit()}unFollow(){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.stopFollowingAlert")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.request("DELETE","../rest/resources/unfollow",{body:{resources:this.selectedRes}})),Object(mt.a)(t=>{this.notify.success(this.translate.instant("lang.removedFromFolder")),this.headerService.nbResourcesFollowed-=t.unFollowed,this.refreshDaoAfterAction()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}getBaskets(){this.http.get("../rest/resources/"+this.selectedRes+"/baskets").pipe(Object(mt.a)(t=>{this.basketList.groups=t.groupsBaskets.filter((t,e,i)=>t&&i.map(t=>t.groupId).indexOf(t.groupId)===e),this.basketList.list=t.groupsBaskets}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}goTo(t){this.contextMenuTitle!==this.translate.instant("lang.undefined")&&""!==this.contextMenuTitle?this.router.navigate(["/basketList/users/"+this.headerService.user.id+"/groups/"+t.groupId+"/baskets/"+t.basketId],{queryParams:{chrono:'"'+this.contextMenuTitle+'"'}}):this.router.navigate(["/basketList/users/"+this.headerService.user.id+"/groups/"+t.groupId+"/baskets/"+t.basketId])}toggleFreezing(t){this.http.put("../rest/archival/freezeRetentionRule",{resources:this.selectedRes,freeze:t}).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant(t?"lang.retentionRuleFrozen":"lang.retentionRuleUnfrozen")),this.refreshList()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}toogleBinding(t){this.http.put("../rest/archival/binding",{resources:this.selectedRes,binding:t}).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant(t?"lang.bindingMail":!1===t?"lang.noBindingMail":"lang.bindingUndefined")),this.refreshList()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}getFreezeBindingValue(){this.isSelectedFreeze=this.currentResource.retentionFrozen,this.isSelectedBinding=this.currentResource.binding}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(o.c),n.Qb(y.a),n.Qb(Dt.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-followed-action-list"]],viewQuery:function(t,e){var i;1&t&&n.Xc(ne.d,!0),2&t&&n.yc(i=n.ec())&&(e.contextMenu=i.first)},inputs:{selectedRes:"selectedRes",totalRes:"totalRes",contextMode:"contextMode",currentFolderInfo:"currentFolderInfo",currentResource:"currentResource",menuShortcut:"menuShortcut"},outputs:{triggerEvent:"triggerEvent",refreshEvent:"refreshEvent",refreshPanelFolders:"refreshPanelFolders"},decls:50,vars:70,consts:[["mat-stroked-button","",3,"matMenuTriggerFor",4,"ngIf"],["style","position: fixed;",3,"matMenuTriggerFor","left","top",4,"ngIf"],["menu","matMenu"],["style","text-align: center;font-size: 10px;color: white;background: #135F7F;padding: 5px;font-weight: bold;",4,"ngIf"],["mat-menu-item","",3,"matMenuTriggerFor","menuOpened",4,"ngIf"],["baskets","matMenu"],[4,"ngFor","ngForOf"],["class","noAvailableBasket",4,"ngIf"],["mat-menu-item","",1,"followAction",3,"disabled","click"],[1,"far","fa-star","fa-2x"],["mat-menu-item","",3,"matMenuTriggerFor","disabled","title",4,"ngIf"],["ng-switch","getValue(var)"],["freezeRentalRule","matMenu"],["mat-menu-item","",3,"title","click"],["bindingRentalRule","matMenu"],["mat-menu-item","",3,"title","innerHTML","click"],[3,"resIds","currentFolders","refreshList","refreshFolders"],["mat-stroked-button","",3,"matMenuTriggerFor"],["matSuffix","",1,"fa","fa-caret-down"],[2,"position","fixed",3,"matMenuTriggerFor"],["menu2",""],[2,"text-align","center","font-size","10px","color","white","background","#135F7F","padding","5px","font-weight","bold"],["mat-menu-item","",3,"matMenuTriggerFor","menuOpened"],[1,"basketGroupName"],["mat-menu-item","","class","labelBasket",3,"title","click",4,"ngIf"],["mat-menu-item","",1,"labelBasket",3,"title","click"],[1,"noAvailableBasket"],["mat-menu-item","",3,"matMenuTriggerFor","disabled","title"],[1,"freezeIcon","fas","fa-snowflake",2,"font-size","20px"],[1,"bindidngIcon","fas","fa-exclamation",2,"font-size","20px"]],template:function(t,e){1&t&&(n.Oc(0,$w,4,4,"button",0),n.Oc(1,Hw,2,5,"span",1),n.Wb(2,"mat-menu",null,2),n.Oc(4,Gw,2,1,"div",3),n.Oc(5,Xw,4,4,"button",4),n.Wb(6,"mat-menu",null,5),n.Oc(8,Yw,5,5,"ng-container",6),n.ic(9,"sortBy"),n.Oc(10,Jw,3,3,"div",7),n.Vb(),n.Rb(11,"mat-divider"),n.Wb(12,"button",8),n.dc("click",(function(){return e.unFollow()})),n.Rb(13,"mat-icon",9),n.Wb(14,"span"),n.Qc(15),n.ic(16,"translate"),n.Vb(),n.Vb(),n.Rb(17,"mat-divider"),n.Oc(18,Zw,6,8,"button",10),n.Wb(19,"mat-menu",11,12),n.Wb(21,"button",13),n.dc("click",(function(){return e.toggleFreezing(!0)})),n.ic(22,"translate"),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Rb(25,"mat-divider"),n.Wb(26,"button",13),n.dc("click",(function(){return e.toggleFreezing(!1)})),n.ic(27,"translate"),n.Qc(28),n.ic(29,"translate"),n.Vb(),n.Vb(),n.Oc(30,tM,6,8,"button",10),n.Wb(31,"mat-menu",null,14),n.Wb(33,"buton",15),n.dc("click",(function(){return e.toogleBinding(!0)})),n.ic(34,"stripTags"),n.ic(35,"translate"),n.ic(36,"translate"),n.Vb(),n.Rb(37,"mat-divider"),n.Wb(38,"buton",15),n.dc("click",(function(){return e.toogleBinding(!1)})),n.ic(39,"stripTags"),n.ic(40,"translate"),n.ic(41,"translate"),n.Vb(),n.Rb(42,"mat-divider"),n.Wb(43,"buton",13),n.dc("click",(function(){return e.toogleBinding(null)})),n.ic(44,"translate"),n.Qc(45),n.ic(46,"translate"),n.Vb(),n.Rb(47,"mat-divider"),n.Vb(),n.Rb(48,"mat-divider"),n.Wb(49,"folder-menu",16),n.dc("refreshList",(function(){return e.refreshList()}))("refreshFolders",(function(){return e.refreshFolders()})),n.Vb(),n.Vb()),2&t&&(n.oc("ngIf",!e.contextMode),n.Db(1),n.oc("ngIf",e.contextMode),n.Db(1),n.Fb("actionListMenu"),n.Db(2),n.oc("ngIf",e.contextMode&&1==e.selectedRes.length),n.Db(1),n.oc("ngIf",1==e.selectedRes.length),n.Db(1),n.Fb("folderListMenu"),n.Db(2),n.oc("ngForOf",n.kc(9,41,e.basketList.groups,"groupName")),n.Db(2),n.oc("ngIf",0==e.basketList.groups.length),n.Db(2),n.oc("disabled",0===e.selectedRes.length),n.Db(3),n.Rc(n.jc(16,44,"lang.untrackThisMail")),n.Db(3),n.oc("ngIf",e.privilegeService.hasCurrentUserPrivilege("freeze_retention_rule")),n.Db(3),n.Fb(!0===e.isSelectedFreeze?"isSelectedMenu":"notSelectedMenu"),n.oc("title",n.jc(22,46,"lang.freezeTheCurrentUsefulLife")),n.Db(2),n.Sc(" ",n.jc(24,48,"lang.freezeTheCurrentUsefulLife")," "),n.Db(3),n.Fb(!1===e.isSelectedFreeze?"isSelectedMenu":"notSelectedMenu"),n.oc("title",n.jc(27,50,"lang.unfreezeTheCurrentUsefulLife")),n.Db(2),n.Sc(" ",n.jc(29,52,"lang.unfreezeTheCurrentUsefulLife")," "),n.Db(2),n.oc("ngIf",e.privilegeService.hasCurrentUserPrivilege("set_binding_document")),n.Db(3),n.Fb(!0===e.isSelectedBinding?"isSelectedMenu":"notSelectedMenu"),n.oc("title",n.jc(34,54,n.jc(35,56,"lang.bindingMail")))("innerHTML",n.jc(36,58,"lang.bindingMail"),n.Ec),n.Db(5),n.Fb(!1===e.isSelectedBinding?"isSelectedMenu":"notSelectedMenu"),n.oc("title",n.jc(39,60,n.jc(40,62,"lang.noBindingMail")))("innerHTML",n.jc(41,64,"lang.noBindingMail"),n.Ec),n.Db(5),n.Fb(null===e.isSelectedBinding?"isSelectedMenu":"notSelectedMenu"),n.oc("title",n.jc(44,66,"lang.doNotDefine")),n.Db(2),n.Sc(" ",n.jc(46,68,"lang.doNotDefine"),""),n.Db(4),n.oc("resIds",e.selectedRes)("currentFolders",e.folderList))},directives:[P.t,ne.e,P.s,T.a,ne.b,S.a,Uw,k.b,ne.d,Y.j],pipes:[Wt.a,g.d,Tt.r],styles:[".mat-icon[_ngcontent-%COMP%]{height:auto}.mat-stroked-button[_ngcontent-%COMP%]{border-radius:20px;border-color:#135f7f;color:#135f7f} .actionListMenu .mat-menu-content{padding-top:0;padding-bottom:0}.followAction[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{font-size:20px;color:#8e3e52}.basketGroupName[_ngcontent-%COMP%]{color:#135f7f;padding-left:10px;padding-right:10px}.labelBasket[_ngcontent-%COMP%]{color:#666;font-size:12px;font-weight:700}.noAvailableBasket[_ngcontent-%COMP%]{text-align:center;font-size:12px;opacity:.5;font-style:italic;padding:22px}.freezeIcon[_ngcontent-%COMP%]{color:#135f7f}.bindidngIcon[_ngcontent-%COMP%]{color:#135f7f;margin-left:5px}.isSelectedMenu[_ngcontent-%COMP%]{background:#f99830}.notSelectedMenu[_ngcontent-%COMP%]{background:#fff}"]}),t})();const iM=["appDiffusionsList"],nM=["appVisaWorkflow"],aM=["appAvisWorkflow"],sM=["appNotesList"],oM=["appAttachmentsList"],rM=function(t){return{color:t}};function cM(t,e){if(1&t&&n.Rb(0,"mat-icon",10),2&t){const t=n.hc(2);n.Hb("",t.currentResource.statusImage.charAt(0),"",t.currentResource.statusImage.charAt(1)," ",t.currentResource.statusImage," ",t.currentResource.statusImage.charAt(0),"",t.currentResource.statusImage.charAt(1),"-2x"),n.oc("ngStyle",n.vc(8,rM,t.currentResource.priorityColor))}}function lM(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab-group",11),n.dc("selectedIndexChange",(function(e){return n.Dc(t),n.hc(2).selectedDiffusionTab=e})),n.Wb(1,"mat-tab",12),n.ic(2,"translate"),n.Rb(3,"app-diffusions-list",13,14),n.Vb(),n.Wb(5,"mat-tab",15),n.ic(6,"translate"),n.Rb(7,"app-visa-workflow",16,17),n.Vb(),n.Wb(9,"mat-tab",15),n.ic(10,"translate"),n.Rb(11,"app-avis-workflow",16,18),n.Vb(),n.Vb()}if(2&t){const t=n.zc(8),e=n.zc(12),i=n.hc(2);n.oc("selectedIndex",i.selectedDiffusionTab),n.Db(1),n.pc("label",n.jc(2,11,"lang.diffusionList")),n.Db(2),n.oc("adminMode",!1),n.Db(2),n.pc("label",n.jc(6,13,"lang.visaWorkflow")),n.oc("disabled",0==t.getVisaCount()),n.Db(2),n.oc("adminMode",!1)("injectDatas",i.injectDatasParam),n.Db(2),n.pc("label",n.jc(10,15,"lang.avis")),n.oc("disabled",0==e.getAvisCount()),n.Db(2),n.oc("adminMode",!1)("injectDatas",i.injectDatasParam)}}function dM(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-notes-list",19,20),n.dc("reloadBadgeNotes",(function(e){return n.Dc(t),n.hc(2).reloadBadgeNotes(e)})),n.Vb()}if(2&t){const t=n.hc(2);n.oc("editMode",!0)("injectDatas",t.injectDatasParam)}}function hM(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-attachments-list",21,22),n.dc("reloadBadgeAttachments",(function(e){return n.Dc(t),n.hc(2).reloadBadgeAttachments(e)})),n.Vb()}if(2&t){const t=n.hc(2);n.oc("injectDatas",t.injectDatasParam)}}function uM(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div",1),n.Rb(2,"mat-icon",2),n.Vb(),n.Wb(3,"div",3),n.Oc(4,cM,1,10,"mat-icon",4),n.Qc(5,"\xa0"),n.Rb(6,"span",5),n.Vb(),n.Rb(7,"div",6),n.ic(8,"stripTags"),n.ic(9,"shorten"),n.Oc(10,lM,13,17,"mat-tab-group",7),n.Oc(11,dM,2,2,"app-notes-list",8),n.Oc(12,hM,2,1,"app-attachments-list",9),n.Tb()),2&t){const t=n.hc();n.Db(2),n.qc("fontIcon","",t.icon," fa-2x"),n.Db(2),n.oc("ngIf",void 0!==t.currentResource.statusImage),n.Db(2),n.oc("innerHTML",t.currentResource.chrono,n.Ec),n.Db(1),n.pc("title",n.jc(8,8,t.currentResource.subject)),n.oc("innerHTML",n.lc(9,10,t.currentResource.subject,50,"..."),n.Ec),n.Db(3),n.oc("ngIf","diffusion"==t.mode),n.Db(1),n.oc("ngIf","note"==t.mode),n.Db(1),n.oc("ngIf","attachment"==t.mode)}}let pM=(()=>{class t{constructor(t){this.translate=t,this.loading=!1,this.selectedDiffusionTab=0,this.injectDatasParam={resId:0,editable:!1},this.currentResource={},this.refreshBadgeNotes=new n.o,this.refreshBadgeAttachments=new n.o}ngOnInit(){}loadComponent(t,e){this.mode=t,this.currentResource=e,this.injectDatasParam.resId=this.currentResource.resId,"diffusion"===t?setTimeout(()=>{this.icon="fa-sitemap",this.selectedDiffusionTab=0,this.injectDatasParam.resId=this.currentResource.resId,this.appDiffusionsList.loadListinstance(this.currentResource.resId),this.appVisaWorkflow.loadWorkflow(this.currentResource.resId),this.appAvisWorkflow.loadWorkflow(this.currentResource.resId)},0):"note"===t?(setTimeout(()=>{this.icon="fa-comments",this.appNotesList.loadNotes(this.currentResource.resId)},0),setTimeout(()=>{$("textarea").focus()},200)):"attachment"===t&&setTimeout(()=>{this.icon="fa-paperclip",this.appAttachmentsList.loadAttachments(this.currentResource.resId)},0)}reloadBadgeNotes(t){this.refreshBadgeNotes.emit(t)}reloadBadgeAttachments(t){this.refreshBadgeAttachments.emit(t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-panel-list"]],viewQuery:function(t,e){var i;1&t&&(n.Xc(iM,!0),n.Xc(nM,!0),n.Xc(aM,!0),n.Xc(sM,!0),n.Xc(oM,!0)),2&t&&(n.yc(i=n.ec())&&(e.appDiffusionsList=i.first),n.yc(i=n.ec())&&(e.appVisaWorkflow=i.first),n.yc(i=n.ec())&&(e.appAvisWorkflow=i.first),n.yc(i=n.ec())&&(e.appNotesList=i.first),n.yc(i=n.ec())&&(e.appAttachmentsList=i.first))},outputs:{refreshBadgeNotes:"refreshBadgeNotes",refreshBadgeAttachments:"refreshBadgeAttachments"},decls:1,vars:1,consts:[[4,"ngIf"],[2,"font-size","60px","opacity","0.1","padding-bottom","30px","text-align","center"],["fontSet","fas",3,"fontIcon"],[2,"position","sticky","top","0px","background","white","z-index","1","display","flex","justify-content","center","align-items","center","color","#666","padding","10px"],["style","width: auto;","color","primary",3,"ngStyle","class",4,"ngIf"],[3,"innerHTML"],[2,"text-align","center","font-weight","bold","margin-bottom","30px","padding-left","10px","padding-right","10px",3,"title","innerHTML"],["class","diffusionTab",3,"selectedIndex","selectedIndexChange",4,"ngIf"],[3,"editMode","injectDatas","reloadBadgeNotes",4,"ngIf"],[3,"injectDatas","reloadBadgeAttachments",4,"ngIf"],["color","primary",2,"width","auto",3,"ngStyle"],[1,"diffusionTab",3,"selectedIndex","selectedIndexChange"],[3,"label"],[3,"adminMode"],["appDiffusionsList",""],[3,"label","disabled"],[3,"adminMode","injectDatas"],["appVisaWorkflow",""],["appAvisWorkflow",""],[3,"editMode","injectDatas","reloadBadgeNotes"],["appNotesList",""],[3,"injectDatas","reloadBadgeAttachments"],["appAttachmentsList",""]],template:function(t,e){1&t&&n.Oc(0,uM,13,14,"ng-container",0),2&t&&n.oc("ngIf",void 0!==e.currentResource.resId)},directives:[P.t,S.a,P.w,Te.c,Te.a,im,Ko,Qv,kC,Sg],pipes:[Tt.r,Tt.p,g.d],styles:[""]}),t})();const bM=["filterTemplate"],fM=["toolTemplate"],mM=["panelTemplate"],gM=["adminMenuTemplate"],vM=["actionsListContext"],_M=["appPanelList"],yM=["appFilterToolAdvSearch"],xM=["tableBasketListSort"],CM=["basketHome"];function OM(t,e){if(1&t&&(n.Rb(0,"img",25),n.ic(1,"async"),n.ic(2,"secureUrl")),2&t){const t=n.hc();n.oc("src",n.jc(1,1,n.jc(2,3,t.thumbnailUrl)),n.Gc)}}function DM(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-filter-tool-adv-search",27,28),n.dc("filterChanged",(function(){return n.Dc(t),n.hc(2).launchSearch()})),n.Vb()}if(2&t){const t=n.hc(2);n.oc("filters",t.dataFilters)("isLoadingResults",t.isLoadingResults)}}function wM(t,e){if(1&t&&n.Oc(0,DM,2,2,"app-filter-tool-adv-search",26),2&t){const t=n.hc();n.oc("ngIf",!t.hideFilter)}}function MM(t,e){if(1&t&&(n.Wb(0,"mat-option",43),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",n.jc(2,2,"lang."+t.id)," ")}}function kM(t,e){1&t&&n.Rb(0,"mat-icon",44)}function SM(t,e){1&t&&n.Rb(0,"mat-icon",45)}function IM(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",46),n.dc("click",(function(){return n.Dc(t),n.hc(2).removeCriteria("_ALL")})),n.ic(1,"translate"),n.Rb(2,"i",47),n.Vb()}2&t&&n.pc("title",n.jc(1,1,"lang.eraseAllFilters"))}function PM(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",49),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc(2).$implicit;return n.hc(2).removeCriteria(a.key,i)})),n.Rb(1,"i",50),n.Qc(2),n.Rb(3,"i",51),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2).$implicit,a=n.hc(2);n.oc("title",a.appCriteriaTool.getLabelValue(i.key,t)),n.Db(1),n.Gb("fa ",a.indexingFieldService.getField(i.key).icon,""),n.oc("title",a.indexingFieldService.getField(i.key).label),n.Db(1),n.Sc("\xa0",a.appCriteriaTool.getLabelValue(i.key,t),"\xa0")}}function VM(t,e){if(1&t&&(n.Ub(0),n.Oc(1,PM,4,6,"span",48),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngForOf",t.value.values)}}function RM(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"span",49),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).removeCriteria(e.key)})),n.Rb(2,"i",50),n.Qc(3),n.Rb(4,"i",51),n.Vb(),n.Tb()}if(2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(1),n.oc("title",e.appCriteriaTool.getLabelValues(t.key,t.value.values)),n.Db(1),n.Gb("fa ",e.indexingFieldService.getField(t.key).icon,""),n.oc("title",e.indexingFieldService.getField(t.key).label),n.Db(1),n.Sc("\xa0",t.value.values.length," valeurs\xa0")}}function jM(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"span",49),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).removeCriteria(e.key)})),n.Rb(2,"i",50),n.Qc(3),n.Rb(4,"i",51),n.Vb(),n.Tb()}if(2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(1),n.oc("title",e.appCriteriaTool.getFormatLabel(t.key,t.value.values)),n.Db(1),n.Gb("fa ",e.indexingFieldService.getField(t.key).icon,""),n.oc("title",e.indexingFieldService.getField(t.key).label),n.Db(1),n.Sc("\xa0",e.appCriteriaTool.getFormatLabel(t.key,t.value.values),"\xa0")}}function AM(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"span",49),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).removeCriteria(e.key)})),n.Qc(2),n.Rb(3,"i",51),n.Vb(),n.Tb()}if(2&t){const t=n.hc().$implicit;n.Db(1),n.oc("title","meta"),n.Db(1),n.Sc("",t.value.values,"\xa0")}}function WM(t,e){if(1&t&&(n.Ub(0),n.Oc(1,VM,2,1,"ng-container",8),n.Oc(2,RM,5,6,"ng-container",8),n.Oc(3,jM,5,6,"ng-container",8),n.Oc(4,AM,4,2,"ng-container",8),n.Tb()),2&t){const t=e.$implicit,i=n.hc(2);n.Db(1),n.oc("ngIf",i.isArrayType(t.value.values)&&t.value.values.length<=3),n.Db(1),n.oc("ngIf",i.isArrayType(t.value.values)&&t.value.values.length>3),n.Db(1),n.oc("ngIf",!i.isArrayType(t.value.values)&&"meta"!==t.key),n.Db(1),n.oc("ngIf",!i.isArrayType(t.value.values)&&"meta"===t.key)}}function TM(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",29),n.Rb(1,"div",30),n.Wb(2,"div",31),n.Wb(3,"mat-form-field",32),n.Rb(4,"mat-icon",33),n.Wb(5,"mat-select",34),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().listProperties.order=e}))("selectionChange",(function(){return n.Dc(t),n.hc().updateFilters()})),n.Oc(6,MM,3,4,"mat-option",35),n.Vb(),n.Vb(),n.Vb(),n.Wb(7,"div",36),n.Wb(8,"button",37),n.dc("click",(function(){return n.Dc(t),n.hc().changeOrderDir()})),n.ic(9,"translate"),n.ic(10,"translate"),n.Oc(11,kM,1,0,"mat-icon",38),n.Oc(12,SM,1,0,"mat-icon",39),n.Vb(),n.Vb(),n.Vb(),n.Wb(13,"div",40),n.Oc(14,IM,3,3,"span",41),n.Oc(15,WM,5,4,"ng-container",42),n.ic(16,"keyvalue"),n.Vb()}if(2&t){const t=n.hc();n.Db(5),n.oc("ngModel",t.listProperties.order)("disabled",t.isLoadingResults||0===t.data.length),n.Db(1),n.oc("ngForOf",t.displayColsOrder),n.Db(2),n.Lc("opacity",""==t.listProperties.order?"0.2":"1"),n.oc("disabled",""==t.listProperties.order||t.isLoadingResults||0===t.data.length)("title","DESC"==t.listProperties.orderDir?n.jc(9,11,"lang.descOrder"):n.jc(10,13,"lang.ascOrder")),n.Db(3),n.oc("ngIf","DESC"==t.listProperties.orderDir),n.Db(1),n.oc("ngIf","ASC"==t.listProperties.orderDir),n.Db(2),n.oc("ngIf",!t.emptyCriteria()),n.Db(1),n.oc("ngForOf",n.jc(16,15,t.criteria))}}function EM(t,e){1&t&&n.Rb(0,"mat-spinner")}function FM(t,e){if(1&t&&(n.Wb(0,"div",52),n.Oc(1,EM,1,0,"mat-spinner",8),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.isLoadingResults)}}function LM(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-checkbox",53),n.dc("change",(function(e){return n.Dc(t),n.hc().toggleAllRes(e)})),n.ic(1,"translate"),n.Vb()}if(2&t){const t=n.hc();n.pc("title",n.jc(1,3,"lang.selectAllResInBasket")),n.oc("checked",t.selectedRes.length==t.resultsLength&&t.selectedRes.length>0)("indeterminate",t.selectedRes.length>0&&t.selectedRes.length<t.resultsLength)}}function QM(t,e){if(1&t&&(n.Wb(0,"small"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("- ",t.selectedRes.length," ",n.jc(2,2,"lang.selected"),"")}}function NM(t,e){if(1&t&&n.Rb(0,"div",54),2&t){n.hc();const t=n.zc(20);n.oc("matMenuTriggerFor",t)}}function zM(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",55),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc().goToPage(i)})),n.Qc(1),n.Vb()}if(2&t){const t=e.index;n.Db(1),n.Rc(t+1)}}function BM(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span"),n.Wb(1,"app-followed-action-list",56,17),n.dc("refreshEvent",(function(){return n.Dc(t),n.hc().refreshDaoAfterAction()})),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(1),n.oc("contextMode",!1)("currentFolderInfo",t.folderInfo)("totalRes",t.resultsLength)("selectedRes",t.selectedRes)}}function UM(t,e){if(1&t&&(n.Ub(0),n.Rb(1,"i",75),n.ic(2,"translate"),n.Qc(3,"\xa0"),n.Rb(4,"span",76),n.ic(5,"timeAgo"),n.ic(6,"fullDate"),n.Qc(7," - "),n.Rb(8,"i",77),n.ic(9,"translate"),n.Qc(10,"\xa0"),n.Rb(11,"span",76),n.ic(12,"timeAgo"),n.ic(13,"fullDate"),n.Tb()),2&t){const t=n.hc(2).$implicit,e=n.hc(2).$implicit;n.Db(1),n.pc("title",n.jc(2,10,"lang.creationDate")),n.Db(3),n.Ib("highlightResult",t.displayValue.creationDateHighlighted),n.pc("title",n.jc(6,14,t.displayValue.creationDate)),n.oc("innerHTML",n.jc(5,12,t.displayValue.creationDate),n.Ec),n.Db(4),n.pc("title",n.jc(9,16,"lang.closingDate")),n.Db(3),n.Ib("highlightResult",t.displayValue.closingDateHighlighted),n.pc("title",n.jc(13,20,e.closing_date)),n.oc("innerHTML",n.jc(12,18,e.closing_date),n.Ec)}}function $M(t,e){if(1&t&&(n.Ub(0),n.Rb(1,"i",75),n.ic(2,"translate"),n.Qc(3,"\xa0"),n.Rb(4,"span",76),n.ic(5,"timeAgo"),n.ic(6,"fullDate"),n.Qc(7," - "),n.Rb(8,"i",78),n.ic(9,"translate"),n.Qc(10,"\xa0"),n.Rb(11,"span",76),n.ic(12,"timeLimit"),n.ic(13,"fullDate"),n.Tb()),2&t){const t=n.hc(2).$implicit;n.Db(1),n.pc("title",n.jc(2,10,"lang.creationDate")),n.Db(3),n.Ib("highlightResult",t.displayValue.creationDateHighlighted),n.pc("title",n.jc(6,14,t.displayValue.creationDate)),n.oc("innerHTML",n.jc(5,12,t.displayValue.creationDate),n.Ec),n.Db(4),n.pc("title",n.jc(9,16,"lang.processLimitDate")),n.Db(3),n.Ib("highlightResult",t.displayValue.processLimitDateHighlighted),n.pc("title",n.jc(13,20,t.displayValue.processLimitDate)),n.oc("innerHTML",n.jc(12,18,t.displayValue.processLimitDate),n.Ec)}}function HM(t,e){if(1&t&&(n.Ub(0),n.Oc(1,UM,14,22,"ng-container",8),n.ic(2,"translate"),n.Oc(3,$M,14,22,"ng-container",8),n.ic(4,"translate"),n.Tb()),2&t){const t=n.hc(3).$implicit;n.Db(1),n.oc("ngIf",t.closing_date!=n.jc(2,2,"lang.undefined")),n.Db(2),n.oc("ngIf",t.closing_date==n.jc(4,4,"lang.undefined"))}}function GM(t,e){if(1&t&&(n.Ub(0),n.Rb(1,"i",50),n.Qc(2," \xa0 "),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Gb("fa ",t.icon,""),n.pc("title",t.label)}}function XM(t,e){if(1&t&&(n.Wb(0,"span",81),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2).$implicit;n.qc("title","id: ",t.displayValue,""),n.Db(1),n.Rc(n.jc(2,2,"lang.undefined"))}}function qM(t,e){if(1&t&&(n.Wb(0,"span",50),n.ic(1,"translate"),n.Qc(2),n.ic(3,"translate"),n.Vb()),2&t){const t=n.hc(2).$implicit;n.pc("title",n.jc(1,2,"lang."+t.displayValue)),n.Db(2),n.Rc(n.jc(3,4,"lang."+t.displayValue))}}function KM(t,e){if(1&t&&(n.Ub(0),n.Oc(1,XM,3,4,"span",79),n.ic(2,"translate"),n.Oc(3,qM,4,6,"span",80),n.ic(4,"translate"),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",!n.jc(2,2,"lang."+t.displayValue)),n.Db(2),n.oc("ngIf",n.jc(4,4,"lang."+t.displayValue))}}function YM(t,e){if(1&t&&n.Rb(0,"span",84),2&t){const t=n.hc(2).$implicit;n.pc("title",t.displayTitle),n.oc("innerHTML",t.displayValue,n.Ec)}}function JM(t,e){if(1&t&&(n.Rb(0,"span",85),n.ic(1,"timeAgo")),2&t){const t=n.hc(2).$implicit;n.oc("innerHTML",n.jc(1,1,t.displayValue),n.Ec)}}function ZM(t,e){if(1&t&&(n.Ub(0),n.Oc(1,YM,1,2,"span",82),n.Oc(2,JM,2,3,"span",83),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",!t.value.includes("Date")),n.Db(1),n.oc("ngIf",t.value.includes("Date"))}}function tk(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",74),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc(2).$implicit;return n.hc().launchEventSubData(i,a)})),n.ic(1,"translate"),n.Oc(2,HM,5,6,"ng-container",8),n.Oc(3,GM,3,4,"ng-container",8),n.Oc(4,KM,5,6,"ng-container",8),n.Oc(5,ZM,3,2,"ng-container",8),n.Vb()}if(2&t){const t=e.$implicit;n.Fb(t.cssClasses.join(" ")),n.Ib("hasEvent",t.event&&t.displayValue!==n.jc(1,8,"lang.undefined")),n.Db(2),n.oc("ngIf","getCreationAndProcessLimitDates"==t.value),n.Db(1),n.oc("ngIf",""!=t.icon),n.Db(1),n.oc("ngIf","getCategory"==t.value),n.Db(1),n.oc("ngIf","getCategory"!=t.value&&"getCreationAndProcessLimitDates"!=t.value)}}function ek(t,e){if(1&t&&(n.Wb(0,"div",72),n.Oc(1,tk,6,10,"span",73),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc();n.Gb("sub-info column-",e.templateColumns,"-list"),n.Db(1),n.oc("ngForOf",t.display)}}const ik=function(t){return{color:t}};function nk(t,e){if(1&t&&n.Rb(0,"mat-icon",86),2&t){const t=n.hc().$implicit;n.Hb("",t.statusImage.charAt(0),"",t.statusImage.charAt(1)," ",t.statusImage," ",t.statusImage.charAt(0),"",t.statusImage.charAt(1),"-2x"),n.pc("title",t.statusLabel),n.oc("ngStyle",n.vc(9,ik,t.priorityColor))}}function ak(t,e){1&t&&(n.Wb(0,"span",87),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.confidential")))}function sk(t,e){if(1&t&&(n.Rb(0,"mat-icon",88),n.ic(1,"translate")),2&t){const t=n.hc().$implicit;n.rc("title","",n.jc(1,2,"lang.warnLockResInProgress")," : ",t.locker,"")}}function ok(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"span",90),n.Rb(2,"i",91),n.ic(3,"translate"),n.Qc(4,"\xa0"),n.Rb(5,"span",84),n.Vb(),n.Tb()),2&t){const t=n.hc(2).$implicit;n.Db(2),n.pc("title",n.jc(3,3,"lang.barcode")),n.Db(3),n.pc("title",t.barcode_title),n.oc("innerHTML",t.barcode,n.Ec)}}function rk(t,e){if(1&t&&(n.Ub(0),n.Rb(1,"span",84),n.Tb()),2&t){const t=n.hc(2).$implicit;n.Db(1),n.pc("title",t.chrono_title),n.oc("innerHTML",t.chrono,n.Ec)}}function ck(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",89),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc().launch(e)})),n.Oc(1,ok,6,5,"ng-container",8),n.ic(2,"translate"),n.ic(3,"translate"),n.Oc(4,rk,2,2,"ng-container",8),n.ic(5,"translate"),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",t.chrono==n.jc(2,2,"lang.undefined")&&t.barcode!=n.jc(3,4,"lang.undefined")),n.Db(3),n.oc("ngIf",t.chrono!=n.jc(5,6,"lang.undefined"))}}const lk=function(t){return[t]};function dk(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",99),n.dc("click",(function(e){n.Dc(t);const i=n.hc(2).$implicit,a=n.hc();return e.stopPropagation(),a.viewDocument(i)}))("mouseenter",(function(){n.Dc(t);const e=n.hc(2).$implicit;return n.hc().viewThumbnail(e)}))("mouseleave",(function(){return n.Dc(t),n.hc(3).closeThumbnail()})),n.ic(1,"translate"),n.ic(2,"translate"),n.Rb(3,"mat-icon",100),n.Vb()}if(2&t){const t=n.hc(2).$implicit;n.pc("title",t.hasDocument?n.jc(1,3,"lang.viewResource"):n.jc(2,5,"lang.noDocument")),n.oc("disabled",!t.hasDocument),n.Db(3),n.oc("ngClass",n.vc(7,lk,t.hasDocument?"fa-eye":"fa-eye-slash"))}}function hk(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",93),n.dc("click",(function(e){n.Dc(t);const i=n.hc(2).$implicit,a=n.hc();return e.stopPropagation(),a.goToDetail(i)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",101),n.Vb()}if(2&t){const t=n.hc(2).$implicit;n.Ib("highlightResult",t.inDocument),n.pc("title",n.jc(1,3,"lang.linkDetails"))}}function uk(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",92),n.Wb(1,"button",93),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc();return e.stopPropagation(),a.togglePanel("note",i)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",94),n.Vb(),n.Wb(4,"button",93),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc();return e.stopPropagation(),a.togglePanel("attachment",i)})),n.ic(5,"translate"),n.Rb(6,"mat-icon",95),n.Vb(),n.Wb(7,"button",93),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc();return e.stopPropagation(),a.togglePanel("diffusion",i)})),n.ic(8,"translate"),n.Rb(9,"mat-icon",96),n.Vb(),n.Oc(10,dk,4,9,"button",97),n.Oc(11,hk,3,5,"button",98),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc();n.Db(1),n.Ib("highlightResultIcon",t.inNotes)("noData",0==t.countNotes),n.pc("title",n.jc(2,22,"lang.notes")),n.Db(2),n.pc("matBadgeHidden",0==t.countNotes),n.pc("matBadge",t.countNotes),n.oc("color",e.sidenavRight.opened&&t.checked&&"note"==e.currentMode?"primary":""),n.Db(1),n.Ib("highlightResultIcon",t.inAttachments)("noData",0==t.countAttachments),n.pc("title",n.jc(5,24,"lang.attachments")),n.Db(2),n.pc("matBadgeHidden",0==t.countAttachments),n.pc("matBadge",t.countAttachments),n.oc("color",e.sidenavRight.opened&&t.checked&&"attachment"==e.currentMode?"primary":""),n.Db(1),n.Ib("highlightResultIcon",t.inDiffusions),n.pc("title",n.jc(8,26,"lang.diffusionList")),n.Db(2),n.oc("color",e.sidenavRight.opened&&t.checked&&"diffusion"==e.currentMode?"primary":""),n.Db(1),n.oc("ngIf",!e.appService.getViewMode()),n.Db(1),n.oc("ngIf",!e.appService.getViewMode())}}function pk(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",104),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(3);return i.stopPropagation(),s.goToFolder(a)})),n.ic(1,"translate"),n.Rb(2,"i",105),n.Qc(3),n.Vb()}if(2&t){const t=e.$implicit;n.rc("title","",n.jc(1,3,"lang.goToFolder")," : ",t.label,""),n.Db(3),n.Sc(" ",t.label,"")}}function bk(t,e){if(1&t&&(n.Wb(0,"div",102),n.Oc(1,pk,4,5,"span",103),n.ic(2,"sortBy"),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngForOf",n.kc(2,1,t.folders,"label"))}}function fk(t,e){if(1&t){const t=n.Xb();n.Wb(0,"td",57),n.Oc(1,ek,2,4,"div",58),n.Wb(2,"div",59),n.Wb(3,"span",60),n.Wb(4,"mat-checkbox",61),n.dc("change",(function(i){n.Dc(t);const a=e.$implicit;return n.hc().toggleRes(i,a)}))("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.Vb(),n.Vb(),n.Wb(5,"button",62),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc();return i.stopPropagation(),s.toggleMailTracking(a)})),n.ic(6,"translate"),n.ic(7,"translate"),n.Rb(8,"mat-icon",63),n.Vb(),n.Wb(9,"span",64),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().launch(i)})),n.Oc(10,nk,1,11,"mat-icon",65),n.Oc(11,ak,3,3,"span",66),n.Oc(12,sk,2,4,"mat-icon",67),n.Vb(),n.Oc(13,ck,6,8,"span",68),n.Wb(14,"span",69),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().launch(i)})),n.ic(15,"translate"),n.Vb(),n.Oc(16,uk,12,28,"span",70),n.Vb(),n.Oc(17,bk,3,4,"div",71),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc();n.Db(1),n.oc("ngIf",!i.appService.getViewMode()&&t.display.length>0),n.Db(1),n.Ib("selected-data",t.checked),n.Db(2),n.oc("checked",t.checked),n.Db(1),n.oc("title",!0===t.mailTracking?n.jc(6,18,"lang.untrackThisMail"):n.jc(7,20,"lang.trackThisMail")),n.Db(3),n.oc("ngClass",n.vc(24,lk,!0===t.mailTracking?"fas fa-star":"far fa-star")),n.Db(1),n.Ib("highlightResultIcon",t.inStatus),n.Db(1),n.oc("ngIf",!0!==t.isLocked),n.Db(1),n.oc("ngIf","Y"===t.confidentiality),n.Db(1),n.oc("ngIf",!0===t.isLocked),n.Db(1),n.oc("ngIf",!i.appService.getViewMode()),n.Db(1),n.Ib("undefined",t.subject==n.jc(15,22,"lang.undefined")),n.pc("title",t.subject_title),n.oc("innerHTML",t.subject,n.Ec),n.Db(2),n.oc("ngIf",void 0!==i.sidenavRight),n.Db(1),n.oc("ngIf",void 0!==t.folders&&t.folders.length>0&&i.actionMode)}}function mk(t,e){1&t&&n.Rb(0,"div",109)}function gk(t,e){if(1&t&&(n.Wb(0,"div",110),n.Rb(1,"i",111),n.Rb(2,"br"),n.Qc(3),n.ic(4,"translate"),n.Wb(5,"b"),n.Qc(6),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(3),n.Sc(" ",n.jc(4,2,"lang.classifyInFolder")," : "),n.Db(3),n.Rc(t.chrono)}}function vk(t,e){if(1&t){const t=n.Xb();n.Wb(0,"tr",106),n.dc("contextmenu",(function(i){n.Dc(t);const a=e.$implicit;return n.hc().open(i,a)}))("cdkDragStarted",(function(){n.Dc(t);const i=e.$implicit;return n.hc().selectSpecificRes(i)})),n.Oc(1,mk,1,0,"div",107),n.Oc(2,gk,7,4,"div",108),n.Vb()}if(2&t){const t=e.$implicit;n.Ib("locked",1==t.isLocked),n.oc("cdkDragDisabled",!t.allowed)("cdkDragData",t)}}function _k(t,e){if(1&t&&n.Rb(0,"div",118),2&t){const t=n.hc(2);n.oc("matTooltip",t.currentChrono)("innerHTML",t.innerHtml,n.Ec)}}function yk(t,e){if(1&t){const t=n.Xb();n.Oc(0,_k,1,2,"div",112),n.Wb(1,"div",113),n.Wb(2,"button",114),n.dc("click",(function(){return n.Dc(t),n.hc().sidenavRight.close()})),n.Rb(3,"mat-icon",115),n.Vb(),n.Vb(),n.Wb(4,"app-panel-list",116,117),n.dc("refreshBadgeNotes",(function(e){return n.Dc(t),n.hc().refreshBadgeNotes(e)}))("refreshBadgeAttachments",(function(e){return n.Dc(t),n.hc().refreshBadgeAttachments(e)})),n.Vb(),n.Rb(6,"mat-divider")}if(2&t){const t=n.hc();n.oc("ngIf",t.innerHtml)}}function xk(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-followed-action-list",119,120),n.dc("refreshEvent",(function(){return n.Dc(t),n.hc().refreshDaoAfterAction()}))("refreshPanelFolders",(function(){return n.Dc(t),n.hc().foldersService.getFolders()})),n.Vb()}if(2&t){const t=n.hc();n.oc("contextMode",!0)("currentFolderInfo",t.folderInfo)("totalRes",t.resultsLength)("selectedRes",t.selectedRes)}}const Ck=function(){return[10,25,50,100,150]};let Ok=(()=>{class t{constructor(t,e,i,a,s,o,r,c,l,d,h,u,p,b,f,m,g,v){this._activatedRoute=t,this.translate=e,this.router=i,this.route=a,this.http=s,this.dialog=o,this.sanitizer=r,this.headerService=c,this.criteriaSearchService=l,this.notify=d,this.overlay=h,this.viewContainerRef=u,this.appService=p,this.foldersService=b,this.functions=f,this.indexingFieldService=m,this.highlightPipe=g,this.privilegeService=v,this.searchTerm="",this.actionMode=!0,this.singleSelection=!1,this.standalone=!1,this.hideFilter=!1,this.loadingResult=new n.o,this.loading=!0,this.initSearch=!1,this.docUrl="",this.searchUrl="../rest/search",this.criteria={},this.injectDatasParam={resId:0,editable:!1},this.currentResource={},this.filtersChange=new n.o,this.dragInit=!0,this.displayedColumnsBasket=["resId"],this.displayedMainData=[{value:"chrono",cssClasses:["softColorData","align_centerData","chronoData"],icon:""},{value:"subject",cssClasses:["longData"],icon:""}],this.data=[],this.resultsLength=0,this.isLoadingResults=!1,this.dataFilters={},this.listProperties={},this.currentChrono="",this.currentMode="",this.thumbnailUrl="",this.selectedRes=[],this.allResInBasket=[],this.selectedDiffusionTab=0,this.folderInfo={id:0,label:"",ownerDisplayName:"",entitiesSharing:[]},this.folderInfoOpened=!1,this.destroy$=new da.a,this.displayColsOrder=[{id:"destUser"},{id:"categoryId"},{id:"creationDate"},{id:"processLimitDate"},{id:"entityLabel"},{id:"subject"},{id:"chrono"},{id:"priority"},{id:"status"},{id:"typeLabel"}],this.currentSelectedChrono="",this.templateColumns=7,t.queryParams.subscribe(t=>{this.functions.empty(t.value)||(this.searchTerm=t.value,this.initSearch=!0,this.criteria={meta:{values:this.searchTerm}})})}ngOnInit(){this.functions.empty(this.searchTerm)||(this.initSearch=!0,this.criteria={meta:{values:this.searchTerm}}),this.headerService.sideBarAdmin=!0,this.isLoadingResults=!1,void 0!==this.toolTemplate&&this.headerService.initTemplate(this.toolTemplate,this.viewContainerRef,"toolTemplate"),void 0!==this.panelTemplate&&void 0!==this.sidenavRight&&this.headerService.initTemplate(this.panelTemplate,this.viewContainerRef,"panelTemplate"),void 0===this.filterTemplate||this.hideFilter||this.headerService.initTemplate(this.filterTemplate,this.viewContainerRef,"filterTemplate"),this.listProperties=this.criteriaSearchService.initListsProperties(this.headerService.user.id),this.loading=!1}initSavedCriteria(){if(Object.keys(this.listProperties.criteria).length>0){const t={query:[]};Object.keys(this.listProperties.criteria).forEach(e=>{const i={};i.identifier=e,i.values=this.listProperties.criteria[e].values,t.query.push(i)}),this.appCriteriaTool.selectSearchTemplate(t,!1),this.criteria=this.listProperties.criteria,this.functions.empty(this.listProperties.filters)||(this.dataFilters=this.listProperties.filters),this.initResultList()}else this.initSearch&&this.initResultList()}ngOnDestroy(){this.destroy$.next(!0)}launch(t){const e={checked:!0},i={checked:!1};this.actionMode?(t.checked=!0,this.toggleAllRes(i),this.toggleRes(e,t),this.router.navigate(["/resources/"+t.resId])):(t.checked=!t.checked,this.toggleRes(t.checked?e:i,t))}launchEventSubData(t,e){t.event&&["getSenders","getRecipients"].indexOf(t.value)>-1&&t.displayValue!==this.translate.instant("lang.undefined")&&this.openContact(e,"getSenders"===t.value?"senders":"recipients")}openContact(t,e){this.dialog.open(YD,{panelClass:"maarch-modal",data:{title:`${t.chrono} - ${t.subject}`,mode:e,resId:t.resId}})}launchSearch(t=this.criteria,e=!1){this.listProperties.page=0,this.listProperties.pageSize=0,e&&(this.dataFilters={}),this.criteria=JSON.parse(JSON.stringify(t)),this.initSearch?this.refreshDao():(this.initResultList(),this.initSearch=!0)}initResultList(){this.resultListDatabase=new Dk(this.http,this.criteriaSearchService),this.paginator.pageIndex=this.listProperties.page,this.paginator.pageSize=this.listProperties.pageSize,this.sort.sortChange.subscribe(()=>this.paginator.pageIndex=0),Object(gy.a)(this.sort.sortChange,this.paginator.page,this.filtersChange).pipe(Object(Zo.a)(this.destroy$),Object(Qe.a)({}),Object(ft.a)(()=>{if(!this.isLoadingResults)return this.data=[],void 0!==this.sidenavRight&&this.sidenavRight.close(),this.isLoadingResults=!0,this.loadingResult.emit(!0),this.resultListDatabase.getRepoIssues(this.sort.active,this.sort.direction,this.paginator.pageIndex,this.searchUrl,this.listProperties,this.paginator.pageSize,this.criteria,this.dataFilters)}),Object(l.a)(t=>(this.selectedRes=[],this.isLoadingResults=!1,this.loadingResult.emit(!1),t=this.processPostData(t),this.templateColumns=t.templateColumns,this.dataFilters=t.filters,this.criteriaSearchService.updateListsPropertiesFilters(t.filters),this.resultsLength=t.count,this.paginatorLength=t.count>1e4?1e4:t.count,this.allResInBasket=t.allResources,t.resources)),Object(m.a)(t=>(this.notify.handleErrors(t),this.selectedRes=[],this.data=[],this.resultsLength=0,this.paginatorLength=0,this.dataFilters={},this.allResInBasket=[],this.isLoadingResults=!1,this.loadingResult.emit(!1),this.initSearch=!1,Object(c.a)(!1)))).subscribe(t=>this.data=t)}goToPage(t){this.paginator.pageIndex=t,this.paginator.page.next({pageIndex:t,pageSize:this.paginator.pageSize,length:this.paginator.length})}goTo(t){this.docUrl==="../rest/resources/"+t.resId+"/content"&&this.sidenavRight.opened?this.sidenavRight.close():(this.docUrl="../rest/resources/"+t.resId+"/content",this.currentChrono=t.chrono,this.innerHtml=this.sanitizer.bypassSecurityTrustHtml("<iframe style='height:100%;width:100%;' src='"+this.docUrl+"' class='embed-responsive-item'></iframe>"),this.sidenavRight.open())}goToDetail(t){this.router.navigate(["/resources/"+t.resId])}goToFolder(t){this.router.navigate(["/folders/"+t.id])}togglePanel(t,e){e.checked=!0,this.toggleAllRes({checked:!1}),this.toggleRes({checked:!0},e),this.currentResource.resId===e.resId&&this.sidenavRight.opened&&this.currentMode===t?this.sidenavRight.close():(this.currentMode=t,this.currentResource=e,this.appPanelList.loadComponent(t,e),this.sidenavRight.open())}refreshBadgeNotes(t){this.currentResource.countNotes=t}refreshFolderInformations(){this.http.get("../rest/folders/"+this.folderInfo.id).subscribe(t=>{const e=[{keyword:"ALL_ENTITIES",text:this.translate.instant("lang.allEntities")}];this.folderInfo={id:t.folder.id,label:t.folder.label,ownerDisplayName:t.folder.ownerDisplayName,entitiesSharing:t.folder.sharing.entities.map(t=>this.functions.empty(t.label)?e.filter(e=>e.keyword===t.keyword)[0].text:t.label)},this.headerService.setHeader(this.folderInfo.label,"","fa fa-folder-open")})}refreshBadgeAttachments(t){this.currentResource.countAttachments=t}refreshDao(){this.paginator.pageIndex=this.listProperties.page,this.filtersChange.emit()}refreshDaoAfterAction(){this.sidenavRight.close(),this.refreshDao(),this.toggleAllRes({checked:!1})}viewThumbnail(t){t.hasDocument&&(this.thumbnailUrl="../rest/resources/"+t.resId+"/thumbnail",$("#viewThumbnail").show(),$("#listContent").css({overflow:"hidden"}))}closeThumbnail(){$("#viewThumbnail").hide(),$("#listContent").css({overflow:"auto"})}processPostData(t){return t.resources.forEach(t=>{Object.keys(this.criteria).filter(t=>t.indexOf("role_")>-1).length>0&&(t.inDiffusions=!0),Object.keys(t).forEach(e=>{t[e+"_title"]=t[e],"statusImage"===e&&null==t[e]?t[e]="fa-question undefined":null!=t[e]&&""!==t[e]||-1!==["closingDate","countAttachments","countNotes","display","mailTracking","hasDocument","binding"].indexOf(e)||(t[e]=this.translate.instant("lang.undefined")),Object.keys(this.criteria).indexOf(e)>-1?t[e]=this.highlightPipe.transform(t[e],this.criteria[e].values):["subject","chrono","resId"].indexOf(e)>-1&&Object.keys(this.criteria).indexOf("meta")>-1&&(t[e]=this.highlightPipe.transform(t[e],this.criteria.meta.values)),"countAttachments"===e&&Object.keys(this.criteria).indexOf("attachment_type")>-1&&(t.inAttachments=!0),"countNotes"===e&&Object.keys(this.criteria).indexOf("notes")>-1&&(t.inNotes=!0),"statusLabel"===e&&Object.keys(this.criteria).indexOf("status")>-1&&(t.inStatus=!0)}),t.display.forEach(t=>{if(t.event=!1,t.displayTitle=t.displayValue,null!=t.displayValue&&""!==t.displayValue||-1!==["getCreationAndProcessLimitDates","getParallelOpinionsNumber"].indexOf(t.value))if(["getSenders","getRecipients"].indexOf(t.value)>-1)t.event=!0,t.displayValue.length>1?(t.displayTitle=t.displayValue.join(" - "),t.displayValue="<b>"+t.displayValue.length+"</b> "+this.translate.instant("lang.contactsAlt")):t.displayValue=1===t.displayValue.length?t.displayValue[0]:this.translate.instant("lang.undefined");else if("getCreationAndProcessLimitDates"===t.value)t.icon="";else if("getVisaWorkflow"===t.value){let e=[],i="",n="";const a=[];t.displayValue.forEach((t,s)=>{i="",n=t.user,a.push(n),"sign"===t.mode&&(n="<u>"+n+"</u>"),i=""===t.date?'<i class="fa fa-hourglass-half"></i> <span title="'+this.translate.instant("lang."+t.mode+"User")+'">'+n+"</span>":'<span color="accent" style=""><i class="fa fa-check"></i> <span title="'+this.translate.instant("lang."+t.mode+"User")+'">'+n+"</span></span>",t.current&&s>=0&&(i='<b color="primary">'+i+"</b>"),e.push(i)});const s=t.displayValue.map(t=>t.current).indexOf(!0);if(s>0){e=e.slice(s-1),e=e.reverse();const i=t.displayValue.map(t=>t.current).reverse().indexOf(!0);i>1&&(e=e.slice(i-1)),e=e.reverse()}else 0===s?(e=e.reverse(),e=e.slice(s-2),e=e.reverse()):-1===s&&(e=e.slice(e.length-2));(s>=2||-1===s&&t.displayValue.length>=3)&&e.unshift("..."),-1!==s&&s-2<=t.displayValue.length&&s+2<t.displayValue.length&&t.displayValue.length>=3&&e.push("..."),t.displayValue=e.join(' <i class="fas fa-long-arrow-alt-right"></i> '),t.displayTitle=a.join(" - ")}else if("getSignatories"===t.value){const e=[];t.displayValue.forEach(t=>{e.push(t.user)}),t.displayValue=e.join(", "),t.displayTitle=e.join(", ")}else"getParallelOpinionsNumber"===t.value&&(t.displayTitle=t.displayValue+" "+this.translate.instant("lang.opinionsSent"),t.displayValue=t.displayValue>0?'<b color="primary">'+t.displayValue+"</b> "+this.translate.instant("lang.opinionsSent"):t.displayValue+" "+this.translate.instant("lang.opinionsSent"));else t.displayValue=this.translate.instant("lang.undefined"),t.displayTitle="";t.label=void 0===t.displayLabel?this.translate.instant("lang."+t.value):t.displayLabel,t.displayValue=this.setHighLightData(t)}),t.checked=-1!==this.selectedRes.indexOf(t.resId)}),t}setHighLightData(t){return Object.keys(this.criteria).indexOf(this.indexingFieldService.mappingdata[t.value])>-1?Array.isArray(this.criteria[this.indexingFieldService.mappingdata[t.value]].values)?this.criteria[this.indexingFieldService.mappingdata[t.value]].values.forEach(e=>{t.displayValue=this.highlightPipe.transform(t.displayValue,this.functions.empty(e.label)?e:e.label.replace(/ /g,""))}):t.displayValue=this.highlightPipe.transform(t.displayValue,this.criteria[this.indexingFieldService.mappingdata[t.value]].values):"getAssignee"===t.value?(Object.keys(this.criteria).indexOf("role_dest")>-1&&this.criteria.role_dest.values.forEach(e=>{null!==e&&(t.displayValue=this.highlightPipe.transform(t.displayValue,e.label.replace(/ /g,"")))}),Object.keys(this.criteria).indexOf("destination")>-1&&this.criteria.destination.values.forEach(e=>{t.displayValue=this.highlightPipe.transform(t.displayValue,e.label.replace(/ /g,""))})):"getCreationAndProcessLimitDates"===t.value?(Object.keys(this.criteria).indexOf("creationDate")>-1&&(t.displayValue.creationDateHighlighted=!0),Object.keys(this.criteria).indexOf("processLimitDate")>-1&&(t.displayValue.processLimitDateHighlighted=!0),Object.keys(this.criteria).indexOf("closingDate")>-1&&(t.displayValue.closingDateHighlighted=!0)):null!==t.value.match(/indexingCustomField_[.]*/g)&&Object.keys(this.criteria).indexOf(t.value)>-1&&(Array.isArray(this.criteria[t.value].values)?this.criteria[t.value].values.forEach(e=>{t.displayValue=this.highlightPipe.transform(t.displayValue,e.label.replace(/ /g,""))}):t.displayValue=this.highlightPipe.transform(t.displayValue,this.criteria[t.value].values)),t.displayValue}toggleRes(t,e){if(this.singleSelection&&this.toggleAllRes({checked:!1}),t.checked)-1===this.selectedRes.indexOf(e.resId)&&(this.selectedRes.push(e.resId),e.checked=!0);else{const t=this.selectedRes.indexOf(e.resId);this.selectedRes.splice(t,1),e.checked=!1}}toggleAllRes(t){this.selectedRes=[],t.checked?(this.data.forEach(t=>{t.checked=!0}),this.selectedRes=JSON.parse(JSON.stringify(this.allResInBasket))):this.data.forEach(t=>{t.checked=!1})}selectSpecificRes(t){this.toggleAllRes({checked:!1}),this.toggleRes({checked:!0},t)}open({x:t,y:e},i){return!1===i.checked&&(i.checked=!0,this.toggleAllRes({checked:!1}),this.toggleRes({checked:!0},i)),this.actionMode&&this.actionsList.open(t,e,i),!1}listTodrag(){return this.foldersService.getDragIds()}toggleMailTracking(t){t.mailTracking?this.http.request("DELETE","../rest/resources/unfollow",{body:{resources:[t.resId]}}).pipe(Object(mt.a)(()=>{this.headerService.nbResourcesFollowed--,t.mailTracking=!t.mailTracking}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe():this.http.post("../rest/resources/follow",{resources:[t.resId]}).pipe(Object(mt.a)(()=>{this.headerService.nbResourcesFollowed++,t.mailTracking=!t.mailTracking}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}viewDocument(t){this.http.get(`../rest/resources/${t.resId}/content?mode=view`,{responseType:"blob"}).pipe(Object(mt.a)(e=>{const i=new Blob([e],{type:"application/pdf"}),n=URL.createObjectURL(i),a=window.open();a.document.write(`<iframe style="width: 100%;height: 100%;margin: 0;padding: 0;" src="${n}" frameborder="0" allowfullscreen></iframe>`),a.document.title=t.chrono}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}emptyCriteria(){return 0===Object.keys(this.criteria).length}isArrayType(t){return Array.isArray(t)}removeCriteria(t,e=null){if(!this.isLoadingResults)if(this.appCriteriaTool.toggleTool(!0),"_ALL"!==t){if(null===e||1===this.criteria[t].values.length)this.criteria[t].values=[];else{const i=this.criteria[t].values.indexOf(e);this.criteria[t].values.splice(i,1)}this.appCriteriaTool.resetCriteria(t,e)}else Object.keys(this.criteria).forEach(t=>{this.criteria[t].values=[]}),this.appCriteriaTool.resetAllCriteria()}updateFilters(){this.listProperties.page=0,this.criteriaSearchService.updateListsProperties(this.listProperties),this.refreshDao()}changeOrderDir(){this.listProperties.orderDir="ASC"===this.listProperties.orderDir?"DESC":"ASC",this.updateFilters()}getSelectedResources(){return this.selectedRes}counter(t){return new Array(t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(o.a),n.Qb(g.e),n.Qb(o.c),n.Qb(o.a),n.Qb(v.b),n.Qb(q.b),n.Qb(ca.b),n.Qb(y.a),n.Qb(JD),n.Qb(D.a),n.Qb(ZD.c),n.Qb(n.T),n.Qb(w.a),n.Qb(tw.a),n.Qb(_t.a),n.Qb(Zt),n.Qb(HD),n.Qb(Dt.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-search-result-list"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(bM,!0),n.Kc(fM,!0),n.Kc(mM,!0),n.Kc(gM,!0),n.Xc(vM,!0),n.Xc(_M,!0),n.Xc(yM,!0),n.Kc(Kt.a,!0),n.Kc(xM,!0),n.Kc(CM,!0)),2&t&&(n.yc(i=n.ec())&&(e.filterTemplate=i.first),n.yc(i=n.ec())&&(e.toolTemplate=i.first),n.yc(i=n.ec())&&(e.panelTemplate=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.actionsList=i.first),n.yc(i=n.ec())&&(e.appPanelList=i.first),n.yc(i=n.ec())&&(e.appFilterToolAdvSearch=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first),n.yc(i=n.ec())&&(e.basketHome=i.first))},inputs:{searchTerm:"searchTerm",actionMode:"actionMode",singleSelection:"singleSelection",standalone:"standalone",hideFilter:"hideFilter",appCriteriaTool:"appCriteriaTool",sidenavRight:"sidenavRight"},outputs:{loadingResult:"loadingResult"},features:[n.Cb([HD])],decls:37,vars:25,consts:[["id","viewThumbnail",2,"display","none","position","fixed","z-index","2","margin-left","1px"],["style","max-height: 100vh;",3,"src",4,"ngIf"],["filterTemplate",""],["toolTemplate",""],["class","example-loading-shade",4,"ngIf"],[1,"table-head"],[1,"table-head-result"],["color","primary","style","margin: 10px;padding-right: 10px;",3,"checked","indeterminate","title","change",4,"ngIf"],[4,"ngIf"],[1,"table-head-tool"],[2,"position","relative"],[1,"paginatorResultList",3,"length","pageSizeOptions"],["paginatorResultList",""],["class","pageList",3,"matMenuTriggerFor",4,"ngIf"],["page","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],[3,"selectedRes"],["actionsList",""],["cdkDropList","","id","document-list","mat-table","","matSort","","matSortActive","resId","matSortDisableClear","","matSortDirection","asc",2,"width","100%",3,"cdkDropListConnectedTo","cdkDropListData","dataSource","cdkDropListDisabled"],["tableBasketListSort","matSort"],["matColumnDef","resId"],["mat-cell","","style","padding:0;border-top: solid 1px rgba(0, 0, 0, 0.12);",4,"matCellDef"],["mat-row","","class","rowData","style","cursor: pointer;","cdkDrag","",3,"locked","cdkDragDisabled","cdkDragData","contextmenu","cdkDragStarted",4,"matRowDef","matRowDefColumns"],["panelTemplate",""],[3,"contextMode","currentFolderInfo","totalRes","selectedRes","refreshEvent","refreshPanelFolders",4,"ngIf"],[2,"max-height","100vh",3,"src"],[3,"filters","isLoadingResults","filterChanged",4,"ngIf"],[3,"filters","isLoadingResults","filterChanged"],["appFilterToolAdvSearch",""],[1,"filtersContent"],[2,"flex","1"],[1,"orderTool"],[1,"basket-order"],["matPrefix","",1,"fa","fa-list"],[3,"ngModel","disabled","ngModelChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[1,"ascDescTool"],["mat-fab","",2,"color","rgba(0,0,0,0.38)",3,"disabled","title","click"],["fontSet","fas","fontIcon","fa-sort-amount-down fa-2x",4,"ngIf"],["fontSet","fas","fontIcon","fa-sort-amount-up fa-2x",4,"ngIf"],[1,"filterBadges"],["class","label badge-eraser",3,"title","click",4,"ngIf"],[4,"ngFor","ngForOf"],[3,"value"],["fontSet","fas","fontIcon","fa-sort-amount-down fa-2x"],["fontSet","fas","fontIcon","fa-sort-amount-up fa-2x"],[1,"label","badge-eraser",3,"title","click"],[1,"fas","fa-eraser"],["class","label badge-search",3,"title","click",4,"ngFor","ngForOf"],[1,"label","badge-search",3,"title","click"],[3,"title"],[1,"fa","fa-times-circle"],[1,"example-loading-shade"],["color","primary",2,"margin","10px","padding-right","10px",3,"checked","indeterminate","title","change"],[1,"pageList",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click"],[3,"contextMode","currentFolderInfo","totalRes","selectedRes","refreshEvent"],["mat-cell","",2,"padding","0","border-top","solid 1px rgba(0, 0, 0, 0.12)"],["style","cursor: initial;",3,"class",4,"ngIf"],[1,"main-info"],[2,"width","50px"],["color","primary",3,"checked","change","click"],["mat-icon-button","",1,"followIcon",2,"margin-left","-25px",3,"title","click"],[2,"margin-bottom","5px",3,"ngClass"],[1,"main-info-status",2,"cursor","pointer",3,"click"],["style","width: 100%;","color","primary",3,"title","ngStyle","class",4,"ngIf"],["class","watermark",4,"ngIf"],["style","color: red;","class","fa fa-lock fa-2x",3,"title",4,"ngIf"],["class","main-info-data","style","width:200px;text-align:center;cursor:pointer;",3,"click",4,"ngIf"],[1,"main-info-data",2,"font-weight","bold","flex","1","cursor","pointer",3,"title","innerHTML","click"],["class","main-info-action",4,"ngIf"],["class","folder-info",4,"ngIf"],[2,"cursor","initial"],["class","sub-info-data","style","flex:1;white-space: pre;overflow: hidden;text-overflow: ellipsis;\n padding-left: 5px;\n padding-right: 5px;",3,"class","hasEvent","click",4,"ngFor","ngForOf"],[1,"sub-info-data",2,"flex","1","white-space","pre","overflow","hidden","text-overflow","ellipsis","padding-left","5px","padding-right","5px",3,"click"],[1,"fa","fa-calendar",3,"title"],[3,"innerHTML","title"],[1,"fa","fa-lock",3,"title"],[1,"fa","fa-stopwatch",3,"title"],["style","opacity: 0.5",3,"title",4,"ngIf"],[3,"title",4,"ngIf"],[2,"opacity","0.5",3,"title"],[3,"title","innerHTML",4,"ngIf"],[3,"innerHTML",4,"ngIf"],[3,"title","innerHTML"],[3,"innerHTML"],["color","primary",2,"width","100%",3,"title","ngStyle"],[1,"watermark"],[1,"fa","fa-lock","fa-2x",2,"color","red",3,"title"],[1,"main-info-data",2,"width","200px","text-align","center","cursor","pointer",3,"click"],[2,"color","rgba(0,0,0,0.4)","font-size","90%"],[1,"fas","fa-barcode",3,"title"],[1,"main-info-action"],["mat-icon-button","",3,"title","click"],["fontSet","fas","fontIcon","fa-comments fa-2x",3,"matBadgeHidden","matBadge","color"],["fontSet","fas","fontIcon","fa-paperclip fa-2x",3,"matBadgeHidden","matBadge","color"],["fontSet","fas","fontIcon","fa-sitemap fa-2x",3,"color"],["mat-icon-button","",3,"title","disabled","click","mouseenter","mouseleave",4,"ngIf"],["mat-icon-button","",3,"title","highlightResult","click",4,"ngIf"],["mat-icon-button","",3,"title","disabled","click","mouseenter","mouseleave"],[1,"fa",3,"ngClass"],["fontSet","fas","fontIcon","fa-info-circle fa-2x"],[1,"folder-info"],["class","badge badge-folder",3,"title","click",4,"ngFor","ngForOf"],[1,"badge","badge-folder",3,"title","click"],[1,"fa","fa-folder"],["mat-row","","cdkDrag","",1,"rowData",2,"cursor","pointer",3,"cdkDragDisabled","cdkDragData","contextmenu","cdkDragStarted"],["class","example-custom-placeholder",4,"cdkDragPlaceholder"],["class","dragPreview",4,"cdkDragPreview"],[1,"example-custom-placeholder"],[1,"dragPreview"],[1,"fas","fa-envelope-open-text","fa-2x"],["style","height: 100%;overflow: hidden;",3,"matTooltip","innerHTML",4,"ngIf"],[2,"display","flex","position","sticky","top","0px","z-index","2"],["mat-icon-button","",2,"font-size","20px","color","#666",3,"click"],[1,"fa","fa-arrow-right"],[3,"refreshBadgeNotes","refreshBadgeAttachments"],["appPanelList",""],[2,"height","100%","overflow","hidden",3,"matTooltip","innerHTML"],[3,"contextMode","currentFolderInfo","totalRes","selectedRes","refreshEvent","refreshPanelFolders"],["actionsListContext",""]],template:function(t,e){if(1&t&&(n.Wb(0,"mat-card",0),n.Oc(1,OM,3,5,"img",1),n.Vb(),n.Oc(2,wM,1,1,"ng-template",null,2,n.Pc),n.Oc(4,TM,17,17,"ng-template",null,3,n.Pc),n.Oc(6,FM,2,1,"div",4),n.Wb(7,"div",5),n.Wb(8,"div",6),n.Oc(9,LM,2,5,"mat-checkbox",7),n.Qc(10),n.ic(11,"ucfirst"),n.ic(12,"translate"),n.Oc(13,QM,3,4,"small",8),n.Vb(),n.Wb(14,"div",9),n.Wb(15,"span",10),n.Rb(16,"mat-paginator",11,12),n.Oc(18,NM,1,1,"div",13),n.Wb(19,"mat-menu",null,14),n.Oc(21,zM,2,1,"button",15),n.Vb(),n.Vb(),n.Wb(22,"span"),n.Wb(23,"span"),n.Rb(24,"app-tools-list",16,17),n.Vb(),n.Oc(26,BM,3,4,"span",8),n.Vb(),n.Vb(),n.Vb(),n.Wb(27,"div"),n.Wb(28,"table",18,19),n.Ub(30,20),n.Oc(31,fk,18,26,"td",21),n.Tb(),n.Oc(32,vk,3,4,"tr",22),n.Vb(),n.Vb(),n.Rb(33,"div",5),n.Oc(34,yk,7,1,"ng-template",null,23,n.Pc),n.Oc(36,xk,2,4,"app-followed-action-list",24)),2&t){const t=n.zc(17);n.Db(1),n.oc("ngIf",""!==e.thumbnailUrl),n.Db(5),n.oc("ngIf",e.isLoadingResults),n.Db(3),n.oc("ngIf",!e.singleSelection),n.Db(1),n.Tc("\xa0",e.resultsLength," ",n.jc(11,20,n.jc(12,22,"lang.records")),"\xa0"),n.Db(3),n.oc("ngIf",e.selectedRes.length>0),n.Db(3),n.oc("length",e.paginatorLength)("pageSizeOptions",n.uc(24,Ck)),n.Db(2),n.oc("ngIf",t.getNumberOfPages()>0),n.Db(3),n.oc("ngForOf",e.counter(t.getNumberOfPages())),n.Db(3),n.oc("selectedRes",e.selectedRes),n.Db(2),n.oc("ngIf",e.actionMode),n.Db(1),n.Ib("integratedContent",!e.standalone),n.Db(1),n.oc("cdkDropListConnectedTo",e.listTodrag())("cdkDropListData",e.data)("dataSource",e.data)("cdkDropListDisabled",e.dragInit||e.appService.getViewMode()),n.Db(4),n.oc("matRowDefColumns",e.displayedColumnsBasket),n.Db(4),n.oc("ngIf",e.actionMode)}},directives:[K.a,P.t,Kt.a,ne.e,P.s,Ow,vt.o,lo.e,Fe.a,vt.c,vt.b,vt.n,Pw,Y.c,S.a,Y.i,ee.a,X.u,X.x,k.b,W.p,V.c,j.a,ne.d,ne.b,eM,vt.a,P.q,P.w,wt.a,vt.m,lo.a,lo.c,lo.d,pM,T.a,A.b],pipes:[Tt.u,g.d,P.b,si,P.l,ps,uo,bs,Wt.a],styles:[".followIcon[_ngcontent-%COMP%]{color:#f99830}.folder-info[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.badge-folder[_ngcontent-%COMP%]{cursor:pointer;background:#f99830;margin:5px;font-size:12px;border-radius:3px;opacity:.8;max-width:250px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.filterBadges[_ngcontent-%COMP%]{width:100%}.filterBadges[_ngcontent-%COMP%] > .badge-eraser[_ngcontent-%COMP%]{margin:5px;background:none;cursor:pointer;color:#fff;font-size:20px}.filterBadges[_ngcontent-%COMP%] > .label[_ngcontent-%COMP%]{white-space:inherit}.filterBadges[_ngcontent-%COMP%] > .badge-search[_ngcontent-%COMP%]{margin:5px;background:#fff;color:#135f7f;cursor:pointer}.filtersContent[_ngcontent-%COMP%]{width:100%;display:flex}.filtersContent[_ngcontent-%COMP%] .orderTool[_ngcontent-%COMP%]{flex:1}.basket-order[_ngcontent-%COMP%]{color:#fff;width:300px;padding-left:10px;padding-right:10px;height:55px}.basket-order[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{font-size:30px}.basket-order[_ngcontent-%COMP%] .mat-select-value{color:#fff}.basket-order[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.basket-order[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border:2px solid #fff;border-radius:30px;display:flex;align-items:center}.basket-order[_ngcontent-%COMP%] .mat-form-field-prefix{padding-left:15px;padding-right:10px}.basket-order[_ngcontent-%COMP%] .mat-form-field-label-wrapper{color:#fff}.basket-order[_ngcontent-%COMP%] .mat-select-arrow{color:#fff;margin-right:25px}.basket-order[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.ascDescTool[_ngcontent-%COMP%] .mat-fab[_ngcontent-%COMP%]{background:#135f7f;border:2px solid #fff;color:#fff!important;box-shadow:none}.integratedContent[_ngcontent-%COMP%]{height:90%;overflow:auto;position:absolute;width:100%} .highlightResult{background:#ff0}.highlightResultIcon[_ngcontent-%COMP%]{border-radius:20px;background:#ff0}.align_leftData[_ngcontent-%COMP%]{text-align:left}.align_centerData[_ngcontent-%COMP%]{text-align:center}.align_rightData[_ngcontent-%COMP%]{text-align:right}.boldFontData[_ngcontent-%COMP%]{font-weight:700}.bigFontData[_ngcontent-%COMP%]{font-size:14px}.smallFontData[_ngcontent-%COMP%]{font-size:10px}.normalData[_ngcontent-%COMP%]{flex:1}.pageInput[_ngcontent-%COMP%]{padding:0}.pageInput[_ngcontent-%COMP%] .mat-form-field-wrapper{margin:0;padding:0}.pageList[_ngcontent-%COMP%]{cursor:pointer;position:absolute;top:0;left:110px;height:100%;width:120px}.freezeIcon[_ngcontent-%COMP%]{color:#f99830}.unfreezeIcon[_ngcontent-%COMP%]{color:#135f7f}.bindIcon[_ngcontent-%COMP%]{color:#f99830}.noBindIcon[_ngcontent-%COMP%]{color:#135f7f}.watermark[_ngcontent-%COMP%]{position:absolute;left:50%;transform:translateX(-50%) rotate(-20deg);color:red;font-weight:700;opacity:.6}"]}),t})();class Dk{constructor(t,e){this.http=t,this.criteriaSearchService=e}getRepoIssues(t,e,i,n,a,s,o,r){this.criteriaSearchService.updateListsPropertiesPage(i),this.criteriaSearchService.updateListsPropertiesPageSize(s),this.criteriaSearchService.updateListsPropertiesCriteria(o);const c=`${n}?limit=${s}&offset=${i*s}&order=${a.order}&orderDir=${a.orderDir}`,l=Object.assign({},this.criteriaSearchService.formatDatas(JSON.parse(JSON.stringify(o))),{filters:r});return this.http.post(c,l)}}const wk=["appSearchResultList"],Mk=function(){return["chrono","subject","recipients","senders"]};let kk=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.data=n,this.dialogRef=a,this.searchUrl=""}ngOnInit(){}linkResources(){const t=this.appSearchResultList.getSelectedResources().filter(t=>t!==this.data.resId);this.http.post(`../rest/resources/${this.data.resId}/linkedResources`,{linkedResources:t}).pipe(Object(mt.a)(()=>{this.dialogRef.close("success")}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isSelectedResources(){return void 0!==this.appSearchResultList&&this.appSearchResultList.getSelectedResources().filter(t=>t!==this.data.resId).length>0}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.a),n.Qb(q.h))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Xc(wk,!0),2&t&&n.yc(i=n.ec())&&(e.appSearchResultList=i.first)},decls:21,vars:20,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],[2,"flex","1",3,"title"],["mat-icon-button","",3,"title","click"],[1,"fa","fa-times"],[1,"bg-primary"],[3,"openedPanel","defaultCriteria","searchUrlGenerated"],["appCriteriaTool",""],["id","toolTemplate",2,"padding-top","10px"],[3,"actionMode","hideFilter","appCriteriaTool","standalone"],["appSearchResultList",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","color","primary",3,"disabled","click"]],template:function(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Wb(2,"span",2),n.ic(3,"translate"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Wb(6,"button",3),n.dc("click",(function(){return e.dialogRef.close()})),n.ic(7,"translate"),n.Rb(8,"mat-icon",4),n.Vb(),n.Vb(),n.Wb(9,"mat-dialog-content"),n.Wb(10,"div",5),n.Wb(11,"app-criteria-tool",6,7),n.dc("searchUrlGenerated",(function(e){return n.Dc(t),n.zc(15).launchSearch(e)})),n.Vb(),n.Rb(13,"div",8),n.Vb(),n.Rb(14,"app-search-result-list",9,10),n.Vb(),n.Rb(16,"span",11),n.Wb(17,"div",12),n.Wb(18,"button",13),n.dc("click",(function(){return e.linkResources()})),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(12);n.Db(2),n.oc("title",n.jc(3,11,"lang.linkResource")),n.Db(2),n.Sc(" ",n.jc(5,13,"lang.linkResource")," "),n.Db(2),n.oc("title",n.jc(7,15,"lang.close")),n.Db(5),n.oc("openedPanel",!0)("defaultCriteria",n.uc(19,Mk)),n.Db(3),n.oc("actionMode",!1)("hideFilter",!0)("appCriteriaTool",t)("standalone",!0),n.Db(4),n.oc("disabled",!e.isSelectedResources()),n.Db(1),n.Rc(n.jc(20,17,"lang.linkSelectedResources"))}},directives:[q.i,k.b,S.a,q.f,$D,Ok,q.c],pipes:[g.d],styles:[".mat-dialog-content[_ngcontent-%COMP%]{padding:0}.bg-primary[_ngcontent-%COMP%]{padding:10px;background:#135f7f}"]}),t})();function Sk(t,e){1&t&&(n.Ub(0),n.Wb(1,"div",2),n.Rb(2,"mat-spinner"),n.Vb(),n.Tb())}function Ik(t,e){if(1&t&&(n.Rb(0,"img",15),n.ic(1,"async"),n.ic(2,"secureUrl")),2&t){const t=n.hc(2);n.oc("src",n.jc(1,1,n.jc(2,3,t.thumbnailUrl)),n.Gc)}}function Pk(t,e){if(1&t&&(n.Wb(0,"span",36),n.Rb(1,"i",37),n.ic(2,"translate"),n.Qc(3," \xa0 "),n.Wb(4,"span",20),n.Qc(5),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(1),n.pc("title",n.jc(2,3,"lang.visaWorkflow")),n.Db(3),n.oc("title",e.getUsersVisaCircuit(t)),n.Db(1),n.Rc(e.getUsersVisaCircuit(t))}}function Vk(t,e){1&t&&(n.Wb(0,"span",38),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.confidential")))}function Rk(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",39),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc(2);return e.stopPropagation(),a.unlinkResource(i)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",40),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.unlink"))}const jk=function(t){return{color:t}};function Ak(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",16),n.Wb(1,"div",17),n.Wb(2,"span",18),n.Rb(3,"i",19),n.ic(4,"translate"),n.Qc(5," \xa0 "),n.Wb(6,"span",20),n.ic(7,"translate"),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Vb(),n.Wb(10,"span",21),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).openContact(i,"senders")})),n.Rb(11,"i",22),n.ic(12,"translate"),n.Qc(13," \xa0 "),n.Wb(14,"span",20),n.Qc(15),n.Vb(),n.Vb(),n.Wb(16,"span",23),n.Rb(17,"i",24),n.ic(18,"translate"),n.Qc(19," \xa0 "),n.Wb(20,"span",20),n.ic(21,"fullDate"),n.Qc(22),n.ic(23,"ucfirst"),n.ic(24,"timeAgo"),n.Vb(),n.Vb(),n.Wb(25,"span",25),n.Rb(26,"i",26),n.ic(27,"translate"),n.Qc(28," \xa0 "),n.Wb(29,"span",20),n.Qc(30),n.Vb(),n.Vb(),n.Oc(31,Pk,6,5,"span",27),n.Vb(),n.Wb(32,"div",28),n.Wb(33,"span",29),n.Rb(34,"mat-icon",30),n.Oc(35,Vk,3,3,"span",31),n.Vb(),n.Wb(36,"span",32),n.Qc(37),n.Vb(),n.Wb(38,"span",33),n.ic(39,"translate"),n.Qc(40),n.ic(41,"shorten"),n.Vb(),n.Wb(42,"span",34),n.Oc(43,Rk,3,3,"button",35),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.Db(3),n.pc("title",n.jc(4,29,"lang.category_id")),n.Db(3),n.pc("title",n.jc(7,31,"lang."+t.categoryId)),n.Db(2),n.Rc(n.jc(9,33,"lang."+t.categoryId)),n.Db(3),n.pc("title",n.jc(12,35,"lang.contact")),n.Db(3),n.oc("title",t.senders),n.Db(1),n.Rc(t.senders),n.Db(2),n.pc("title",n.jc(18,37,"lang.creationDate")),n.Db(3),n.oc("title",n.jc(21,39,t.documentDate)),n.Db(2),n.Rc(n.jc(23,41,n.kc(24,43,t.documentDate,"full"))),n.Db(4),n.pc("title",n.jc(27,46,"lang.getAssignee")),n.Db(3),n.oc("title",t.destUserLabel+" ("+t.destinationLabel+")"),n.Db(1),n.Rc(t.destUserLabel+" ("+t.destinationLabel+")"),n.Db(1),n.oc("ngIf",t.visaCircuit.length>0),n.Db(3),n.Hb("",t.statusImage.charAt(0),"",t.statusImage.charAt(1)," ",t.statusImage," ",t.statusImage.charAt(0),"",t.statusImage.charAt(1),"-2x"),n.pc("title",t.statusLabel),n.oc("ngStyle",n.vc(54,jk,t.priorityColor)),n.Db(1),n.oc("ngIf",t.confidentiality),n.Db(2),n.Sc(" ",t.chrono," "),n.Db(1),n.Ib("undefined",t.subject==n.jc(39,48,"lang.undefined")),n.pc("title",t.subject),n.Db(2),n.Rc(n.lc(41,50,t.subject,150,"...")),n.Db(3),n.oc("ngIf",i.privilegeService.hasCurrentUserPrivilege("add_links"))}}function Wk(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-row",41),n.dc("mouseenter",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).viewThumbnail(i)}))("mouseleave",(function(){return n.Dc(t),n.hc(2).closeThumbnail()})),n.Vb()}2&t&&n.qc("routerLink","/resources/",e.$implicit.resId,"")}function Tk(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",42),n.dc("click",(function(){return n.Dc(t),n.hc(2).openSearchResourceModal()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",43),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.linkResource"))}function Ek(t,e){if(1&t&&(n.Wb(0,"mat-card",3),n.Oc(1,Ik,3,5,"img",4),n.Vb(),n.Wb(2,"div",5),n.Wb(3,"div",6),n.Rb(4,"mat-paginator",7,8),n.Vb(),n.Vb(),n.Wb(6,"mat-table",9,10),n.Ub(8,11),n.Oc(9,Ak,44,56,"mat-cell",12),n.Tb(),n.Oc(10,Wk,1,1,"mat-row",13),n.Vb(),n.Oc(11,Tk,3,3,"button",14)),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",""!==t.thumbnailUrl),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.dataSource),n.Db(4),n.oc("matRowDefColumns",t.displayedColumns),n.Db(1),n.oc("ngIf",t.privilegeService.hasCurrentUserPrivilege("add_links"))}}let Fk=(()=>{class t{constructor(t,e,i,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.appService=a,this.dialog=s,this.functions=o,this.privilegeService=r,this.loading=!0,this.linkedResources=[],this.displayedColumns=["resId"],this.thumbnailUrl="",this.reloadBadgeLinkedResources=new n.o}ngOnInit(){this.loading=!0,this.initLinkedResources()}initLinkedResources(){this.http.get(`../rest/resources/${this.resId}/linkedResources`).pipe(Object(mt.a)(t=>{this.linkedResources=t.linkedResources,this.reloadBadgeLinkedResources.emit(""+this.linkedResources.length),setTimeout(()=>{this.linkedResources=this.processPostData(this.linkedResources),this.dataSource=new vt.p(this.linkedResources),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort},0)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}processPostData(t){return t.forEach(t=>{Object.keys(t).forEach(e=>{"statusImage"===e&&this.functions.empty(t[e])?t[e]="fa-question undefined":this.functions.empty(t[e])&&-1===["senders","recipients","attachments","hasDocument","confidentiality","visaCircuit"].indexOf(e)&&(t[e]=this.translate.instant("lang.undefined")),"senders"===e&&t[e].length>1&&(t[e]=t[e].length>1?t[e].length+" "+this.translate.instant("lang.contactsAlt"):t[e][0])})}),t}getUsersVisaCircuit(t){return t.visaCircuit.length>0?t.visaCircuit.map(t=>t.userLabel):""}unlinkResource(t){this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.unlink"),msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete(`../rest/resources/${this.resId}/linkedResources/${t.resId}`)),Object(mt.a)(()=>{this.linkedResources=this.linkedResources.filter(e=>e.resId!==t.resId),this.reloadBadgeLinkedResources.emit(""+this.linkedResources.length),this.dataSource=new vt.p(this.linkedResources),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort,this.notify.success(this.translate.instant("lang.resourceUnlinked"))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}viewThumbnail(t){t.hasDocument&&(this.thumbnailUrl="../rest/resources/"+t.resId+"/thumbnail",$("#viewThumbnail").show())}closeThumbnail(){$("#viewThumbnail").hide()}openSearchResourceModal(){this.dialog.open(kk,{panelClass:"maarch-full-height-modal",minWidth:"80%",data:{resId:this.resId,currentLinkedRes:this.linkedResources.map(t=>t.resId)}}).afterClosed().pipe(Object(d.a)(t=>"success"===t),Object(mt.a)(()=>{this.initLinkedResources(),this.notify.success(this.translate.instant("lang.resourcesLinked"))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}openContact(t,e){this.dialog.open(YD,{panelClass:"maarch-modal",data:{title:`${t.chrono} - ${t.subject}`,mode:e,resId:t.resId}})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(w.a),n.Qb(q.b),n.Qb(_t.a),n.Qb(Dt.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-linked-resource-list"]],viewQuery:function(t,e){var i;1&t&&(n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},inputs:{resId:"resId"},outputs:{reloadBadgeLinkedResources:"reloadBadgeLinkedResources"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["elseLoading",""],[1,"loading"],["id","viewThumbnail",2,"display","none","position","fixed","z-index","2","margin-left","1px","left","50%","transform","translate(-50%,-50%)","top","50%"],["style","max-height: 100vh;",3,"src",4,"ngIf"],[1,"row",2,"margin","0px"],[1,"col-md-12"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSort","","matSortActive","resId","matSortDirection","desc",3,"dataSource"],["table",""],["matColumnDef","resId"],["style","flex: 1;flex-direction: column;padding: 0px;",4,"matCellDef"],["style","cursor: pointer;",3,"routerLink","mouseenter","mouseleave",4,"matRowDef","matRowDefColumns"],["mat-fab","","class","linkRes","color","primary",3,"title","click",4,"ngIf"],[2,"max-height","100vh",3,"src"],[2,"flex","1","flex-direction","column","padding","0px"],[1,"sub-info"],[1,"sub-info-data","col-md-4"],[1,"fas","fa-exchange-alt",3,"title"],[3,"title"],[1,"sub-info-data","col-md-4","text-center","senders",3,"click"],[1,"fas","fa-user",3,"title"],[1,"sub-info-data","col-md-4","text-right"],[1,"fas","fa-calendar",3,"title"],[1,"sub-info-data","col-md-6"],[1,"fas","fa-sitemap",3,"title"],["class","sub-info-data col-md-6 text-right",4,"ngIf"],[1,"main-info"],[1,"main-info-status"],["color","primary",3,"title","ngStyle"],["class","watermark",4,"ngIf"],[1,"main-info-data",2,"width","200px","text-align","center"],[1,"main-info-data",2,"font-weight","bold","flex","1",3,"title"],[1,"main-info-data"],["mat-icon-button","","color","warn",3,"title","click",4,"ngIf"],[1,"sub-info-data","col-md-6","text-right"],[1,"fas","fa-list-ol",3,"title"],[1,"watermark"],["mat-icon-button","","color","warn",3,"title","click"],["aria-hidden","true",1,"fa","fa-unlink","fa-2x"],[2,"cursor","pointer",3,"routerLink","mouseenter","mouseleave"],["mat-fab","","color","primary",1,"linkRes",3,"title","click"],[1,"fa","fa-link",2,"height","auto"]],template:function(t,e){if(1&t&&(n.Oc(0,Sk,3,0,"ng-container",0),n.Oc(1,Ek,12,7,"ng-template",null,1,n.Pc)),2&t){const t=n.zc(2);n.oc("ngIf",e.loading)("ngIfElse",t)}},directives:[P.t,V.c,K.a,Kt.a,vt.o,Fe.a,vt.c,vt.b,vt.n,vt.a,S.a,P.w,k.b,vt.m,o.d],pipes:[P.b,si,g.d,uo,Tt.u,ps,Tt.p],styles:[".loading[_ngcontent-%COMP%]{display:flex;justify-content:center}.linkRes[_ngcontent-%COMP%]{position:-webkit-sticky;position:sticky;z-index:2;bottom:10px;margin-left:10px;margin-top:10px}.main-info[_ngcontent-%COMP%], .sub-info[_ngcontent-%COMP%]{width:100%}.sub-info[_ngcontent-%COMP%]{display:block}.sub-info-data[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;text-overflow:ellipsis;padding-left:5px;padding-right:5px}.watermark[_ngcontent-%COMP%]{position:absolute;left:50%;transform:translateX(-50%) rotate(-20deg);color:red;font-weight:700;opacity:.6}.senders[_ngcontent-%COMP%]{cursor:pointer}.senders[_ngcontent-%COMP%]:hover{color:#135f7f}"]}),t})();const Lk=["appVisaWorkflow"],Qk=["appDocumentViewer"],Nk=["appNotesList"];function zk(t,e){1&t&&(n.Wb(0,"div",4),n.Rb(1,"i",5),n.Vb())}const Bk=function(t){return{activeTabSignatureBook:t}};function Uk(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",35),n.dc("click",(function(){return n.Dc(t),n.hc(2).changeSignatureBookLeftContent("document")})),n.ic(1,"translate"),n.Rb(2,"i",36),n.Vb()}if(2&t){const t=n.hc(2);n.pc("title",n.jc(1,2,"lang.mail")),n.oc("ngClass",n.vc(4,Bk,"document"==t.headerTab))}}function $k(t,e){1&t&&n.Rb(0,"i",38)}function Hk(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",35),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc(2);return!!a.isToolEnabled(i.id)&&a.changeSignatureBookLeftContent(i.id)})),n.Rb(1,"i"),n.Oc(2,$k,1,0,"i",37),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.Ib("tool-disabled",!i.isToolEnabled(t.id)),n.pc("title",t.label),n.oc("ngClass",n.vc(7,Bk,i.headerTab==t.id)),n.Db(1),n.Fb(t.icon),n.Db(1),n.oc("ngIf",t.count>0)}}function Gk(t,e){if(1&t&&(n.Wb(0,"option",39),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.pc("value",t.id),n.Db(1),n.Rc(t.label)}}function Xk(t,e){if(1&t&&(n.Wb(0,"div",40),n.Wb(1,"span",41),n.Rb(2,"input",42),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.pc("value",t.signatureBook.consigne),n.pc("title",t.signatureBook.consigne)}}function qk(t,e){1&t&&n.Rb(0,"i",53)}const Kk=function(t){return{resListContentFrameSelected:t}},Yk=function(t){return{color:t}};function Jk(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",43),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).changeLocation(i.res_id,"view")})),n.Wb(1,"div",44),n.Rb(2,"i",45),n.ic(3,"translate"),n.Qc(4),n.Oc(5,qk,1,0,"i",46),n.Qc(6,"\xa0 "),n.Rb(7,"i",47),n.Vb(),n.Wb(8,"div",44),n.Rb(9,"i",48),n.ic(10,"translate"),n.Qc(11),n.Vb(),n.Wb(12,"div",44),n.Rb(13,"i",49),n.ic(14,"translate"),n.Qc(15),n.Vb(),n.Wb(16,"div",44),n.Rb(17,"i",50),n.ic(18,"translate"),n.Qc(19),n.ic(20,"date"),n.Vb(),n.Wb(21,"div",51),n.Rb(22,"i",52),n.ic(23,"translate"),n.Qc(24),n.ic(25,"date"),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.oc("ngClass",n.vc(30,Kk,i.resId==t.res_id)),n.Db(2),n.pc("title",n.jc(3,14,"lang.chronoNumber")),n.Db(2),n.Sc(" ",t.alt_identifier," "),n.Db(1),n.oc("ngIf",t.allSigned),n.Db(2),n.pc("title",t.priorityLabel),n.oc("ngStyle",n.vc(32,Yk,t.priorityColor)),n.Db(2),n.pc("title",n.jc(10,16,"lang.object")),n.Db(2),n.Sc(" ",t.subject," "),n.Db(2),n.pc("title",n.jc(14,18,"lang.contactInfo")),n.Db(2),n.Sc(" ",t.sender," "),n.Db(2),n.pc("title",n.jc(18,20,"lang.arrivalDate")),n.Db(2),n.Sc(" ",n.kc(20,22,t.creation_date,"dd/MM/y")," "),n.Db(3),n.pc("title",n.jc(23,25,"lang.processLimitDate")),n.Db(2),n.Sc(" ",n.kc(25,27,t.process_limit_date,"dd/MM/y")," ")}}function Zk(t,e){1&t&&(n.Wb(0,"div",54),n.Rb(1,"i",55),n.Vb())}function tS(t,e){1&t&&n.Rb(0,"i",66)}function eS(t,e){1&t&&n.Rb(0,"i",67)}function iS(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",65),n.dc("click",(function(){return n.Dc(t),n.hc(3).displayPanel("RESLEFT")})),n.Oc(1,tS,1,0,"i",64),n.Oc(2,eS,1,0,"i",63),n.Vb()}if(2&t){const t=n.hc(3);n.Db(1),n.oc("ngIf",t.showResLeftPanel),n.Db(1),n.oc("ngIf",!t.showResLeftPanel)}}const nS=function(t){return{panelSelectedThumbnail:t}};function aS(t,e){if(1&t){const t=n.Xb();n.Wb(0,"img",76),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc(5).changeLeftViewer(i)})),n.ic(1,"async"),n.ic(2,"secureUrl"),n.Vb()}if(2&t){const t=e.$implicit,i=e.index,a=n.hc(5);n.pc("title",t.title),n.oc("src",n.jc(1,3,n.jc(2,5,t.thumbnailLink)),n.Gc)("ngClass",n.vc(7,nS,i==a.leftSelectedThumbnail))}}function sS(t,e){if(1&t&&(n.Wb(0,"div",73),n.Wb(1,"div",74),n.Oc(2,aS,3,9,"img",75),n.Vb(),n.Vb()),2&t){const t=n.hc(4);n.Db(2),n.oc("ngForOf",t.signatureBook.documents)}}function oS(t,e){1&t&&n.Rb(0,"i",81)}function rS(t,e){if(1&t&&(n.Wb(0,"sup",82),n.Qc(1),n.Vb()),2&t){const t=n.hc(5);n.Db(1),n.Rc(t.signatureBook.documents.length-1)}}function cS(t,e){1&t&&n.Rb(0,"i",83)}function lS(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",77),n.dc("click",(function(){return n.Dc(t),n.hc(4).displayPanel("TOPLEFT")})),n.ic(1,"translate"),n.Oc(2,oS,1,0,"i",78),n.Oc(3,rS,2,1,"sup",79),n.Oc(4,cS,1,0,"i",80),n.Vb()}if(2&t){const t=n.hc(4);n.rc("title","",t.signatureBook.documents.length-1," ",n.jc(1,5,"lang.mailAttachments"),""),n.Db(2),n.oc("ngIf",!t.showTopLeftPanel),n.Db(1),n.oc("ngIf",!t.showTopLeftPanel),n.Db(1),n.oc("ngIf",t.showTopLeftPanel)}}const dS=function(t){return{height:t}};function hS(t,e){if(1&t){const t=n.Xb();n.Wb(0,"pdf-viewer",84,85),n.dc("error",(function(){n.Dc(t);const e=n.hc(4);return e.pdfViewerError(e.leftViewerLink)})),n.ic(2,"async"),n.ic(3,"secureUrl"),n.Vb()}if(2&t){const t=n.hc(4);n.oc("src",n.jc(2,6,n.jc(3,8,t.leftViewerLink)))("render-text",!0)("fit-to-page",!1)("original-size",!0)("ngStyle",n.vc(10,dS,t.showTopLeftPanel?"84%":"99%"))("show-all",!0)}}function uS(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",86),n.Wb(1,"div",87),n.Qc(2),n.ic(3,"translate"),n.Rb(4,"br"),n.Wb(5,"sub"),n.Qc(6),n.ic(7,"translate"),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Wb(9,"div",88),n.Wb(10,"a",89),n.dc("click",(function(){n.Dc(t);const e=n.hc(4);return e.downloadOriginalFile(e.signatureBook.documents[e.leftSelectedThumbnail].res_id)})),n.ic(11,"translate"),n.Rb(12,"i",90),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(4);n.oc("ngStyle",n.vc(15,dS,t.showTopLeftPanel?"79%":"96%")),n.Db(2),n.Sc(" ",n.jc(3,7,"lang.noOverviewAvailable"),""),n.Db(4),n.Vc("",n.jc(7,9,"lang.pdfVersionFile"),' "',t.signatureBook.documents[t.leftSelectedThumbnail].title,".",t.signatureBook.documents[t.leftSelectedThumbnail].format,'" ',n.jc(8,11,"lang.isNotAvailable"),"."),n.Db(4),n.pc("title",n.jc(11,13,"lang.dlAttachment"))}}function pS(t,e){if(1&t&&(n.Wb(0,"div",68),n.Oc(1,sS,3,1,"div",69),n.Oc(2,lS,5,7,"div",70),n.Oc(3,hS,4,12,"pdf-viewer",71),n.Oc(4,uS,13,17,"div",72),n.Vb()),2&t){const t=n.hc(3);n.Db(1),n.oc("ngIf",t.showTopLeftPanel),n.Db(1),n.oc("ngIf",t.signatureBook.documents.length-1>0),n.Db(1),n.oc("ngIf",""!=t.leftViewerLink&&(0==t.leftSelectedThumbnail||"pdf"==t.signatureBook.documents[t.leftSelectedThumbnail].format||t.signatureBook.documents[t.leftSelectedThumbnail].isConverted)),n.Db(1),n.oc("ngIf",t.leftSelectedThumbnail>0&&"pdf"!=t.signatureBook.documents[t.leftSelectedThumbnail].format&&!t.signatureBook.documents[t.leftSelectedThumbnail].isConverted)}}function bS(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",91),n.Wb(1,"app-notes-list",92,93),n.dc("reloadBadgeNotes",(function(e){return n.Dc(t),n.hc(3).refreshBadge(e,"notes")})),n.Vb(),n.Vb()}if(2&t){const t=n.hc(3);n.Db(1),n.oc("editMode",!0)("resId",t.resId)}}function fS(t,e){if(1&t&&(n.Wb(0,"div",94),n.Rb(1,"app-visa-workflow",95,96),n.Vb()),2&t){const t=n.hc(3);n.Db(1),n.oc("resId",t.resId)("adminMode",t.privilegeService.hasCurrentUserPrivilege("config_visa_workflow"))("target","signatureBook")}}function mS(t,e){if(1&t&&(n.Wb(0,"div",91),n.Rb(1,"app-history-list",97,98),n.Vb()),2&t){const t=n.hc(3);n.Db(1),n.oc("resId",t.resId)}}function gS(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",91),n.Wb(1,"app-linked-resource-list",99,100),n.dc("reloadBadgeLinkedResources",(function(e){return n.Dc(t),n.hc(3).refreshBadge(e,"linkedResources")})),n.Vb(),n.Vb()}if(2&t){const t=n.hc(3);n.Db(1),n.oc("resId",t.resId)}}function vS(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",101),n.dc("click",(function(){return n.Dc(t),n.hc(3).saveTool()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",102),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.saveModifications"))}function _S(t,e){1&t&&n.Rb(0,"i",67)}function yS(t,e){1&t&&n.Rb(0,"i",66)}const xS=function(t){return{width:t}},CS=function(t){return{right:t}};function OS(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",56),n.Oc(1,iS,3,2,"div",57),n.Oc(2,pS,5,4,"div",58),n.Oc(3,bS,3,2,"div",59),n.Oc(4,fS,3,3,"div",60),n.Oc(5,mS,3,1,"div",59),n.Oc(6,gS,3,1,"div",59),n.Oc(7,vS,3,3,"button",61),n.Wb(8,"div",62),n.dc("click",(function(){return n.Dc(t),n.hc(2).displayPanel("MIDDLE")})),n.Oc(9,_S,1,0,"i",63),n.Oc(10,yS,1,0,"i",64),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.oc("ngStyle",n.vc(11,xS,t.leftContentWidth)),n.Db(1),n.oc("ngIf",t.showLeftPanel&&t.showRightPanel),n.Db(1),n.oc("ngIf","document"==t.headerTab),n.Db(1),n.oc("ngIf","notes"==t.headerTab),n.Db(1),n.oc("ngIf","visaCircuit"==t.headerTab),n.Db(1),n.oc("ngIf","history"==t.headerTab),n.Db(1),n.oc("ngIf","linkedResources"==t.headerTab),n.Db(1),n.oc("ngIf",t.isToolModified()),n.Db(1),n.oc("ngStyle",n.vc(13,CS,t.showRightPanel?"-10px":"0px")),n.Db(1),n.oc("ngIf",t.showRightPanel),n.Db(1),n.oc("ngIf",!t.showRightPanel)}}function DS(t,e){1&t&&n.Rb(0,"i",66)}function wS(t,e){1&t&&n.Rb(0,"i",67)}function MS(t,e){1&t&&(n.Wb(0,"sup",122),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.signed")))}function kS(t,e){if(1&t&&(n.Wb(0,"div",113),n.Wb(1,"label"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"span"),n.Qc(5),n.Vb(),n.Vb()),2&t){const t=n.hc(4);n.pc("title",t.signatureBook.attachments[t.rightSelectedThumbnail].typist),n.Db(2),n.Sc("",n.jc(3,3,"lang.createdBy")," :\xa0"),n.Db(3),n.Rc(t.signatureBook.attachments[t.rightSelectedThumbnail].typist)}}function SS(t,e){if(1&t&&(n.Wb(0,"div",113),n.ic(1,"translate"),n.ic(2,"date"),n.Wb(3,"label"),n.Wb(4,"i"),n.Qc(5,"*"),n.Vb(),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Wb(8,"span"),n.Qc(9),n.Vb(),n.Vb()),2&t){const t=n.hc(4);n.sc("title","",n.jc(1,5,"lang.modifiedBy")," : ",t.signatureBook.attachments[t.rightSelectedThumbnail].updated_by," le ",n.kc(2,7,t.signatureBook.attachments[t.rightSelectedThumbnail].doc_date,"dd/MM/y"),""),n.Db(6),n.Sc(" ",n.jc(7,10,"lang.createdBy")," :\xa0"),n.Db(3),n.Rc(t.signatureBook.attachments[t.rightSelectedThumbnail].typist)}}function IS(t,e){1&t&&n.Rb(0,"i",123)}function PS(t,e){1&t&&n.Rb(0,"i",83)}function VS(t,e){if(1&t&&n.Rb(0,"app-document-viewer",124,125),2&t){const t=n.hc(4);n.oc("editMode",!0)("hideTools",!0)("mode",t.signatureBook.attachments[t.rightSelectedThumbnail].isResource?"mainDocument":"attachment")("resId",t.signatureBook.attachments[t.rightSelectedThumbnail].signed?t.signatureBook.attachments[t.rightSelectedThumbnail].viewerId:t.signatureBook.attachments[t.rightSelectedThumbnail].res_id)("title",t.signatureBook.attachments[t.rightSelectedThumbnail].identifier)}}function RS(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",86),n.Wb(1,"div",87),n.Qc(2),n.ic(3,"translate"),n.Rb(4,"br"),n.Wb(5,"sub"),n.Qc(6),n.ic(7,"translate"),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Wb(9,"div",88),n.Wb(10,"a",89),n.dc("click",(function(){n.Dc(t);const e=n.hc(4);return e.downloadOriginalFile(e.signatureBook.attachments[e.rightSelectedThumbnail].res_id)})),n.ic(11,"translate"),n.Rb(12,"i",90),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(4);n.oc("ngStyle",n.vc(15,dS,t.showTopRightPanel?"79%":"96%")),n.Db(2),n.Sc(" ",n.jc(3,7,"lang.noOverviewAvailable"),""),n.Db(4),n.Vc("",n.jc(7,9,"lang.pdfVersionFile"),' "',t.signatureBook.attachments[t.rightSelectedThumbnail].title,".",t.signatureBook.attachments[t.rightSelectedThumbnail].format,'" ',n.jc(8,11,"lang.isNotAvailable"),"."),n.Db(4),n.pc("title",n.jc(11,13,"lang.dlAttachment"))}}function jS(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",86),n.Rb(1,"div",126),n.ic(2,"translate"),n.Wb(3,"div"),n.Wb(4,"a",127),n.dc("click",(function(){n.Dc(t);const e=n.hc(4);return e.showAttachment(e.signatureBook.attachments[e.rightSelectedThumbnail])})),n.ic(5,"translate"),n.Rb(6,"i",128),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(4);n.oc("ngStyle",n.vc(7,dS,t.showTopRightPanel?"79%":"96%")),n.Db(1),n.oc("innerHTML",n.jc(2,3,"lang.editingAttachmentInterrupted"),n.Ec),n.Db(3),n.pc("title",n.jc(5,5,"lang.editAttachment"))}}const AS=function(t){return{display:t}};function WS(t,e){if(1&t){const t=n.Xb();n.Wb(0,"img",133),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc(7);return a.signFile(a.signatureBook.attachments[a.rightSelectedThumbnail],i)})),n.ic(1,"async"),n.ic(2,"secureUrl"),n.Vb()}if(2&t){const t=e.$implicit,i=e.index,a=n.hc(7);n.pc("title",t.signature_label),n.oc("src",n.jc(1,3,n.jc(2,5,"../rest/users/"+t.user_serial_id+"/signatures/"+t.id+"/content")),n.Gc)("ngStyle",n.vc(7,AS,!a.showSignaturesPanel&&i>0?"none":""))}}function TS(t,e){if(1&t&&(n.Wb(0,"span"),n.Oc(1,WS,3,9,"img",132),n.Vb()),2&t){const t=n.hc(6);n.Db(1),n.oc("ngForOf",t.signatureBook.signatures)}}function ES(t,e){1&t&&n.Rb(0,"i",134)}function FS(t,e){if(1&t&&(n.Wb(0,"span"),n.Oc(1,TS,2,1,"span",3),n.Oc(2,ES,1,0,"i",131),n.Vb()),2&t){const t=n.hc(5);n.Db(1),n.oc("ngIf",!t.loadingSign),n.Db(1),n.oc("ngIf",t.loadingSign)}}function LS(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",135),n.dc("click",(function(){n.Dc(t);const e=n.hc(5);return e.unsignFile(e.signatureBook.attachments[e.rightSelectedThumbnail])})),n.Rb(1,"i",136),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.pc("title",n.jc(2,1,"lang.unsign")))}const QS=function(t){return[t]},NS=function(t){return{"box-shadow":t}};function zS(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",129),n.dc("mouseenter",(function(){return n.Dc(t),n.hc(4).showSignaturesPanel=!0}))("mouseleave",(function(){return n.Dc(t),n.hc(4).showSignaturesPanel=!1})),n.Oc(1,FS,3,2,"span",3),n.Oc(2,LS,3,3,"span",130),n.Vb()}if(2&t){const t=n.hc(4);n.oc("ngClass",n.vc(4,QS,"SIGN"==t.signatureBook.attachments[t.rightSelectedThumbnail].status?"signed":""))("ngStyle",n.vc(6,NS,t.signatureBook.listinstance.requested_signature?"inset 0px 0px 5px 0px red":"inset 0px 0px 5px 0px #656565;")),n.Db(1),n.oc("ngIf","SIGN"!=t.signatureBook.attachments[t.rightSelectedThumbnail].status&&t.signatureBook.signatures[0]),n.Db(1),n.oc("ngIf","SIGN"==t.signatureBook.attachments[t.rightSelectedThumbnail].status)}}function BS(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",111),n.Wb(1,"div",112),n.Wb(2,"div",113),n.Wb(3,"label"),n.Qc(4,"Type :\xa0"),n.Vb(),n.Wb(5,"span"),n.Qc(6),n.Oc(7,MS,3,3,"sup",114),n.Vb(),n.Vb(),n.Wb(8,"div",113),n.Wb(9,"label"),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Wb(12,"span"),n.Qc(13),n.Vb(),n.Vb(),n.Wb(14,"div",113),n.Wb(15,"label"),n.Qc(16),n.ic(17,"translate"),n.Vb(),n.Wb(18,"span"),n.Qc(19),n.Vb(),n.Vb(),n.Wb(20,"div"),n.Oc(21,kS,6,5,"div",115),n.Oc(22,SS,10,12,"div",115),n.Wb(23,"div",116),n.Wb(24,"label"),n.Qc(25),n.ic(26,"translate"),n.Vb(),n.Wb(27,"span"),n.Qc(28),n.ic(29,"date"),n.Vb(),n.Vb(),n.Wb(30,"div",113),n.ic(31,"date"),n.Wb(32,"label"),n.Qc(33),n.ic(34,"translate"),n.Vb(),n.Wb(35,"span"),n.Qc(36),n.ic(37,"date"),n.Vb(),n.Vb(),n.Wb(38,"div",113),n.Wb(39,"label"),n.Qc(40),n.ic(41,"translate"),n.Vb(),n.Wb(42,"span"),n.Qc(43),n.Vb(),n.Vb(),n.Wb(44,"div",116),n.Wb(45,"label"),n.Qc(46,"Version :\xa0"),n.Vb(),n.Wb(47,"span"),n.Qc(48),n.Vb(),n.Rb(49,"i",117),n.Vb(),n.Wb(50,"div",116),n.Wb(51,"label"),n.Qc(52,"Format :\xa0"),n.Vb(),n.Wb(53,"span"),n.Qc(54),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(55,"div",118),n.dc("click",(function(){return n.Dc(t),n.hc(3).displayPanel("TOPRIGHT")})),n.ic(56,"translate"),n.Oc(57,IS,1,0,"i",119),n.Oc(58,PS,1,0,"i",80),n.Vb(),n.Oc(59,VS,2,5,"app-document-viewer",120),n.Oc(60,RS,13,17,"div",72),n.Oc(61,jS,7,9,"div",72),n.Oc(62,zS,3,8,"div",121),n.Vb()}if(2&t){const t=n.hc(3);n.Db(1),n.oc("ngStyle",n.vc(51,AS,t.showTopRightPanel?"block":"none")),n.Db(1),n.pc("title",t.signatureBook.attachments[t.rightSelectedThumbnail].attachment_type),n.Db(4),n.Sc("",t.signatureBook.attachments[t.rightSelectedThumbnail].attachment_type," "),n.Db(1),n.oc("ngIf","SIGN"==t.signatureBook.attachments[t.rightSelectedThumbnail].status),n.Db(1),n.pc("title",t.signatureBook.attachments[t.rightSelectedThumbnail].title),n.Db(2),n.Sc("",n.jc(11,30,"lang.object")," :\xa0"),n.Db(3),n.Rc(t.signatureBook.attachments[t.rightSelectedThumbnail].title),n.Db(1),n.pc("title",t.signatureBook.attachments[t.rightSelectedThumbnail].destUser),n.Db(2),n.Sc("",n.jc(17,32,"lang.for")," :\xa0"),n.Db(3),n.Rc(t.signatureBook.attachments[t.rightSelectedThumbnail].destUser),n.Db(2),n.oc("ngIf",!t.signatureBook.attachments[t.rightSelectedThumbnail].updated_by),n.Db(1),n.oc("ngIf",t.signatureBook.attachments[t.rightSelectedThumbnail].updated_by),n.Db(3),n.Sc("",n.jc(26,34,"lang.createdOn")," :\xa0"),n.Db(3),n.Rc(n.kc(29,36,t.signatureBook.attachments[t.rightSelectedThumbnail].creation_date,"dd/MM/y \xe0 HH:mm")),n.Db(2),n.pc("title",n.kc(31,39,t.signatureBook.attachments[t.rightSelectedThumbnail].validation_date,"dd/MM/y")),n.Db(3),n.Sc("",n.jc(34,42,"lang.back")," :\xa0"),n.Db(3),n.Rc(n.kc(37,44,t.signatureBook.attachments[t.rightSelectedThumbnail].validation_date,"dd/MM/y")),n.Db(2),n.pc("title",t.signatureBook.attachments[t.rightSelectedThumbnail].identifier),n.Db(2),n.Sc("",n.jc(41,47,"lang.chrono")," :\xa0"),n.Db(3),n.Rc(t.signatureBook.attachments[t.rightSelectedThumbnail].identifier),n.Db(5),n.Rc(t.signatureBook.attachments[t.rightSelectedThumbnail].relation),n.Db(1),n.oc("ngStyle",n.vc(53,AS,t.signatureBook.attachments[t.rightSelectedThumbnail].relation>1?"":"none")),n.Db(5),n.Rc(t.signatureBook.attachments[t.rightSelectedThumbnail].format.toUpperCase()),n.Db(1),n.pc("title",n.jc(56,49,"lang.details")),n.Db(2),n.oc("ngIf",!t.showTopRightPanel),n.Db(1),n.oc("ngIf",t.showTopRightPanel),n.Db(1),n.oc("ngIf",t.signatureBook.attachments[t.rightSelectedThumbnail].isConverted),n.Db(1),n.oc("ngIf","pdf"!=t.signatureBook.attachments[t.rightSelectedThumbnail].format&&"TMP"!=t.signatureBook.attachments[t.rightSelectedThumbnail].status&&!t.signatureBook.attachments[t.rightSelectedThumbnail].isConverted),n.Db(1),n.oc("ngIf","TMP"==t.signatureBook.attachments[t.rightSelectedThumbnail].status&&!t.signatureBook.attachments[t.rightSelectedThumbnail].isConverted),n.Db(1),n.oc("ngIf",t.signatureBook.signatures[0]&&t.signatureBook.canSign&&"TMP"!=t.signatureBook.attachments[t.rightSelectedThumbnail].status&&t.signatureBook.attachments[t.rightSelectedThumbnail].sign&&t.signatureBook.attachments[t.rightSelectedThumbnail].isConverted)}}function US(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-attachments-list",137,138),n.dc("reloadBadgeAttachments",(function(){return n.Dc(t),n.hc(3).refreshAttachments()}))("afterActionAttachment",(function(){return n.Dc(t),n.hc(3).refreshAttachments()})),n.Vb()}if(2&t){const t=n.hc(3);n.oc("resId",t.resId)("target","process")("canModify",t.canUpdateDocument)}}function $S(t,e){1&t&&(n.Wb(0,"div",139),n.Rb(1,"div",109),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.oc("innerHTML",n.jc(2,1,"lang.noAttachmentClickToAddOne"),n.Ec))}const HS=function(t){return{"margin-left":t}};function GS(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",103),n.Wb(1,"div",104),n.dc("click",(function(){return n.Dc(t),n.hc(2).displayPanel("LEFT")})),n.Oc(2,DS,1,0,"i",64),n.Oc(3,wS,1,0,"i",63),n.Vb(),n.Wb(4,"div",105),n.Oc(5,BS,63,55,"div",106),n.Oc(6,US,2,3,"app-attachments-list",107),n.Vb(),n.Wb(7,"div",108),n.Rb(8,"div",109),n.ic(9,"translate"),n.Vb(),n.Oc(10,$S,3,3,"div",110),n.Vb()}if(2&t){const t=n.hc(2);n.oc("ngStyle",n.vc(10,xS,t.rightContentWidth)),n.Db(1),n.oc("ngStyle",n.vc(12,HS,t.showLeftPanel?"-13px":"-2px")),n.Db(1),n.oc("ngIf",t.showLeftPanel),n.Db(1),n.oc("ngIf",!t.showLeftPanel),n.Db(2),n.oc("ngIf",t.signatureBook.attachments[t.rightSelectedThumbnail]&&!t.showAttachmentPanel),n.Db(1),n.oc("ngIf",t.showAttachmentPanel),n.Db(2),n.oc("innerHTML",n.jc(9,8,"lang.noVisaWorkflowNoSignature"),n.Ec),n.Db(2),n.oc("ngIf",!t.signatureBook.attachments[t.rightSelectedThumbnail])}}function XS(t,e){1&t&&n.Rb(0,"i",150)}function qS(t,e){1&t&&n.Rb(0,"i",151)}function KS(t,e){1&t&&(n.Wb(0,"i",152),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.draft")))}function YS(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",142),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc(3).changeRightViewer(i)})),n.Wb(1,"span",143),n.Rb(2,"i",144),n.Wb(3,"i",145),n.Qc(4),n.Vb(),n.Vb(),n.Oc(5,XS,1,0,"i",146),n.Oc(6,qS,1,0,"i",147),n.Oc(7,KS,3,3,"i",148),n.Rb(8,"br"),n.Wb(9,"i",149),n.Qc(10),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=e.index,a=n.hc(3);n.rc("title","[",t.attachment_type,"] ",t.title,""),n.oc("ngClass",n.vc(8,nS,i==a.rightSelectedThumbnail&&!a.showAttachmentPanel)),n.Db(4),n.Rc(t.icon),n.Db(1),n.oc("ngIf",t.sign&&"SIGN"==t.status),n.Db(1),n.oc("ngIf",t.sign&&"SIGN"!=t.status&&"TMP"!=t.status),n.Db(1),n.oc("ngIf",t.sign&&"TMP"==t.status),n.Db(3),n.Sc(".",t.format,"")}}function JS(t,e){if(1&t&&(n.Wb(0,"div",140),n.Oc(1,YS,11,10,"div",141),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("ngForOf",t.signatureBook.attachments)}}const ZS=function(t){return{visaDisabledButton:t}};function tI(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div"),n.Wb(1,"div",153),n.dc("click",(function(){n.Dc(t);const e=n.hc(2);return e.showAttachment(e.signatureBook.attachments[e.rightSelectedThumbnail])})),n.ic(2,"translate"),n.Rb(3,"i",154),n.Vb(),n.Wb(4,"div",155),n.dc("click",(function(){n.Dc(t);const e=n.hc(2);return e.delAttachment(e.signatureBook.attachments[e.rightSelectedThumbnail])})),n.ic(5,"translate"),n.Rb(6,"i",156),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.pc("title",n.jc(2,4,"lang.editDocument")),n.oc("ngClass",n.vc(8,ZS,!t.canUpdateDocument||"SIGN"==t.signatureBook.attachments[t.rightSelectedThumbnail].status)),n.Db(3),n.pc("title",n.jc(5,6,"lang.deleteAtt")),n.oc("ngClass",n.vc(10,ZS,!t.canUpdateDocument))}}function eI(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",4),n.Wb(1,"div",6),n.Wb(2,"div",7),n.Oc(3,Uk,3,6,"div",8),n.Oc(4,Hk,3,9,"div",9),n.Vb(),n.Wb(5,"div",10),n.Wb(6,"div"),n.Qc(7),n.Vb(),n.Vb(),n.Wb(8,"div",11),n.Wb(9,"i",12),n.dc("click",(function(){return n.Dc(t),n.hc().backToBasket()})),n.Vb(),n.Vb(),n.Wb(10,"div",13),n.Wb(11,"i",14),n.dc("click",(function(){return n.Dc(t),n.hc().backToDetails()})),n.ic(12,"translate"),n.Vb(),n.Qc(13,"\xa0 "),n.Wb(14,"select",15),n.Oc(15,Gk,2,2,"option",16),n.Vb(),n.Wb(16,"input",17),n.dc("click",(function(){return n.Dc(t),n.hc().validForm()})),n.ic(17,"translate"),n.Vb(),n.Vb(),n.Oc(18,Xk,3,2,"div",18),n.Vb(),n.Wb(19,"div",19),n.Wb(20,"div",20),n.Wb(21,"div",21),n.Oc(22,Jk,26,34,"div",22),n.Vb(),n.Oc(23,Zk,2,0,"div",23),n.Vb(),n.Oc(24,OS,11,15,"div",24),n.Oc(25,GS,11,14,"div",25),n.Wb(26,"div",26),n.Oc(27,JS,2,1,"div",27),n.Wb(28,"div",28),n.Wb(29,"div",29),n.dc("click",(function(){return n.Dc(t),n.hc().displayAttachmentPanel()})),n.ic(30,"translate"),n.Rb(31,"i",30),n.Vb(),n.Rb(32,"hr",31),n.Wb(33,"div",32),n.dc("click",(function(){return n.Dc(t),n.hc().createAttachment()})),n.ic(34,"translate"),n.Rb(35,"i",33),n.Rb(36,"i",34),n.Vb(),n.Oc(37,tI,7,12,"div",3),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(3),n.oc("ngIf",t.signatureBook.documents[0]&&!t.signatureBook.documents[0].inSignatureBook),n.Db(1),n.oc("ngForOf",t.processTool),n.Db(1),n.pc("title",t.signatureBook.documents[0].title),n.Db(2),n.Tc("",t.signatureBook.documents[0].alt_id," : ",t.signatureBook.documents[0].title,""),n.Db(4),n.pc("title",n.jc(12,19,"lang.linkDetails")),n.Db(4),n.oc("ngForOf",t.signatureBook.actions),n.Db(1),n.pc("value",n.jc(17,21,"lang.validate")),n.Db(2),n.oc("ngIf",!t.functions.empty(t.signatureBook.consigne)),n.Db(2),n.oc("ngStyle",n.vc(27,AS,t.showResLeftPanel?"inline-block":"none")),n.Db(2),n.oc("ngForOf",t.signatureBook.resList),n.Db(1),n.oc("ngIf",0==t.signatureBook.resList.length),n.Db(1),n.oc("ngIf",t.showLeftPanel),n.Db(1),n.oc("ngIf",t.showRightPanel),n.Db(2),n.oc("ngIf",t.signatureBook.attachments),n.Db(2),n.pc("title",n.jc(30,23,"lang.displayAtt")),n.oc("ngClass",n.vc(29,nS,t.showAttachmentPanel)),n.Db(4),n.pc("title",n.jc(34,25,"lang.createAtt")),n.Db(4),n.oc("ngIf",t.signatureBook.attachments[t.rightSelectedThumbnail])}}function iI(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div"),n.Wb(1,"span"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"span"),n.Qc(5),n.Vb(),n.Qc(6,"\xa0 "),n.Wb(7,"span"),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Wb(10,"span"),n.Qc(11),n.Vb(),n.Qc(12,"\xa0 "),n.Wb(13,"a",89),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).downloadOriginalFile(i.resId)})),n.ic(14,"translate"),n.Rb(15,"i",90),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(2),n.Sc("",n.jc(3,5,"lang.version")," : "),n.Db(3),n.Rc(t.relation),n.Db(3),n.Sc("",n.jc(9,7,"lang.object")," : "),n.Db(3),n.Rc(t.title),n.Db(2),n.pc("title",n.jc(14,9,"lang.dlAttachment"))}}function nI(t,e){if(1&t&&(n.Wb(0,"div"),n.Oc(1,iI,16,11,"div",157),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",t.signatureBook.attachments[t.rightSelectedThumbnail].obsAttachments)}}let aI=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c,l,d,h){this.translate=t,this.http=e,this.appService=i,this.route=n,this.router=a,this.zone=s,this.notify=o,this.privilegeService=r,this.dialog=c,this.functions=l,this.actionService=d,this.headerService=h,this.signatureBook={consigne:"",documents:[],attachments:[],resList:[],resListIndex:0,lang:{}},this.rightSelectedThumbnail=0,this.leftSelectedThumbnail=0,this.rightViewerLink="",this.leftViewerLink="",this.headerTab="document",this.showTopRightPanel=!1,this.showTopLeftPanel=!1,this.showResLeftPanel=!0,this.showLeftPanel=!0,this.showRightPanel=!0,this.showAttachmentPanel=!1,this.showSignaturesPanel=!1,this.loading=!1,this.loadingSign=!1,this.canUpdateDocument=!1,this.currentResourceLock=null,this.leftContentWidth="44%",this.rightContentWidth="44%",this.processTool=[{id:"notes",icon:"fas fa-pen-square fa-2x",label:this.translate.instant("lang.notesAlt"),count:0},{id:"visaCircuit",icon:"fas fa-list-ol fa-2x",label:this.translate.instant("lang.visaWorkflow"),count:0},{id:"history",icon:"fas fa-history fa-2x",label:this.translate.instant("lang.history"),count:0},{id:"linkedResources",icon:"fas fa-link fa-2x",label:this.translate.instant("lang.links"),count:0}],window.pdfWorkerSrc="pdfjs/pdf.worker.min.js",this.subscription=this.actionService.catchAction().subscribe(t=>{this.processAfterAction()})}ngOnInit(){this.loading=!0,this.route.params.subscribe(t=>{this.resId=+t.resId,this.basketId=t.basketId,this.groupId=t.groupId,this.userId=t.userId,this.signatureBook.resList=[],this.actionService.lockResource(this.userId,this.groupId,this.basketId,[this.resId]),this.http.get("../rest/signatureBook/users/"+this.userId+"/groups/"+this.groupId+"/baskets/"+this.basketId+"/resources/"+this.resId).subscribe(t=>{if(t.error)return location.hash="",void(location.search="");this.signatureBook=t,this.canUpdateDocument=t.canUpdateDocuments,this.headerTab="document",this.leftSelectedThumbnail=0,this.rightSelectedThumbnail=0,this.leftViewerLink="",this.rightViewerLink="",this.showLeftPanel=!0,this.showRightPanel=!0,this.showResLeftPanel=!0,this.showTopLeftPanel=!1,this.showTopRightPanel=!1,this.showAttachmentPanel=!1,this.leftContentWidth="44%",this.rightContentWidth="44%",this.signatureBook.documents[0]&&(this.leftViewerLink=this.signatureBook.documents[0].viewerLink,this.signatureBook.documents[0].inSignatureBook&&(this.headerTab="visaCircuit")),this.signatureBook.attachments[0]&&(this.rightViewerLink=this.signatureBook.attachments[0].viewerLink),this.signatureBook.resListIndex=this.signatureBook.resList.map(t=>t.res_id).indexOf(this.resId),this.displayPanel("RESLEFT"),this.loading=!1,setTimeout(()=>{$("#rightPanelContent").niceScroll({touchbehavior:!1,cursorcolor:"#666",cursoropacitymax:.6,cursorwidth:"4"}),0===$(".tooltipstered").length&&$("#obsVersion").tooltipster({theme:"tooltipster-light",interactive:!0})},0),this.loadBadges(),this.loadActions(),void 0!==this.appDocumentViewer&&this.appDocumentViewer.loadRessource(this.signatureBook.attachments[this.rightSelectedThumbnail].signed?this.signatureBook.attachments[this.rightSelectedThumbnail].viewerId:this.signatureBook.attachments[this.rightSelectedThumbnail].res_id,this.signatureBook.attachments[this.rightSelectedThumbnail].isResource?"mainDocument":"attachment")},t=>{this.notify.error(t.error.errors),setTimeout(()=>{this.backToBasket()},2e3)})})}loadActions(){this.http.get("../rest/resourcesList/users/"+this.userId+"/groups/"+this.groupId+"/baskets/"+this.basketId+"/actions?resId="+this.resId).subscribe(t=>{this.signatureBook.actions=t.actions},t=>{this.notify.error(t.error.errors)})}processAfterAction(){let t=-1;const e=this.signatureBook.resList.length;for(let i=0;i<e;i++)this.signatureBook.resList[i].res_id===this.resId&&(this.signatureBook.resList[i+1]?t=this.signatureBook.resList[i+1].res_id:i>0&&(t=this.signatureBook.resList[i-1].res_id));e>0&&(t>=0?($("#send").removeAttr("disabled"),$("#send").css("opacity","1"),this.changeLocation(t,"action")):this.backToBasket())}changeSignatureBookLeftContent(t){this.isToolModified()?this.openConfirmModification().afterClosed().pipe(Object(mt.a)(e=>{"ok"!==e&&(this.headerTab=t,this.showTopLeftPanel=!1)}),Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.saveTool(),this.headerTab=t,this.showTopLeftPanel=!1}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe():(this.headerTab=t,this.showTopLeftPanel=!1)}isToolModified(){return!("visaCircuit"!==this.headerTab||void 0===this.appVisaWorkflow||!this.appVisaWorkflow.isModified())||!("notes"!==this.headerTab||void 0===this.appNotesList||!this.appNotesList.isModified())}saveTool(){return Object(r.a)(this,void 0,void 0,(function*(){"visaCircuit"===this.headerTab&&void 0!==this.appVisaWorkflow?(yield this.appVisaWorkflow.saveVisaWorkflow(),this.loadBadges()):"notes"===this.headerTab&&void 0!==this.appNotesList&&(this.appNotesList.addNote(),this.loadBadges())}))}openConfirmModification(){return this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.confirm"),msg:this.translate.instant("lang.saveModifiedData"),buttonValidate:this.translate.instant("lang.yes"),buttonCancel:this.translate.instant("lang.no")}})}changeRightViewer(t){this.showAttachmentPanel=!1,this.rightViewerLink=this.signatureBook.attachments[t]?this.signatureBook.attachments[t].viewerLink:"",this.rightSelectedThumbnail=t,this.appDocumentViewer.loadRessource(this.signatureBook.attachments[this.rightSelectedThumbnail].signed?this.signatureBook.attachments[this.rightSelectedThumbnail].viewerId:this.signatureBook.attachments[this.rightSelectedThumbnail].res_id,this.signatureBook.attachments[this.rightSelectedThumbnail].isResource?"mainDocument":"attachment")}changeLeftViewer(t){this.leftViewerLink=this.signatureBook.documents[t].viewerLink,this.leftSelectedThumbnail=t}displayPanel(t){"TOPRIGHT"===t?this.showTopRightPanel=!this.showTopRightPanel:"TOPLEFT"===t?this.showTopLeftPanel=!this.showTopLeftPanel:"LEFT"===t?(this.showLeftPanel=!this.showLeftPanel,this.showResLeftPanel=!1,this.showLeftPanel?(this.rightContentWidth="48%",this.leftContentWidth="48%",$("#hideLeftContent").css("background","#fbfbfb")):(this.rightContentWidth="96%",$("#hideLeftContent").css("background","none"))):"RESLEFT"===t?(this.showResLeftPanel=!this.showResLeftPanel,this.showResLeftPanel?(this.rightContentWidth="44%",this.leftContentWidth="44%",0!==this.signatureBook.resList.length&&void 0!==this.signatureBook.resList[0].creation_date||this.http.get("../rest/signatureBook/users/"+this.userId+"/groups/"+this.groupId+"/baskets/"+this.basketId+"/resources").subscribe(t=>{this.signatureBook.resList=t.resources,this.signatureBook.resList.forEach((t,e)=>{t.res_id==this.resId&&(this.signatureBook.resListIndex=e)}),setTimeout(()=>{$("#resListContent").niceScroll({touchbehavior:!1,cursorcolor:"#666",cursoropacitymax:.6,cursorwidth:"4"}),$("#resListContent").scrollTop(0),$("#resListContent").scrollTop($(".resListContentFrameSelected").offset().top-42)},0)})):(this.rightContentWidth="48%",this.leftContentWidth="48%")):"MIDDLE"===t&&(this.showRightPanel=!this.showRightPanel,this.showResLeftPanel=!1,this.showRightPanel?(this.rightContentWidth="48%",this.leftContentWidth="48%",$("#contentLeft").css("border-right","solid 1px")):(this.leftContentWidth="96%",$("#contentLeft").css("border-right","none")))}displayAttachmentPanel(){this.showAttachmentPanel=!this.showAttachmentPanel,this.rightSelectedThumbnail=0,this.signatureBook.attachments[0]&&(this.rightViewerLink=this.signatureBook.attachments[0].viewerLink)}refreshAttachments(t="rightContent"){"rightContent"===t&&this.http.get("../rest/signatureBook/"+this.resId+"/incomingMailAttachments").subscribe(t=>{this.signatureBook.documents=t}),this.http.get("../rest/signatureBook/"+this.resId+"/attachments").subscribe(e=>{let i=0;if("add"===t){let t=!1;e.forEach((e,n)=>{t||this.signatureBook.attachments[n]&&e.res_id==this.signatureBook.attachments[n].res_id||(i=n,t=!0)})}else if("edit"===t){const t=this.signatureBook.attachments[this.rightSelectedThumbnail].res_id;e.forEach((e,n)=>{e.res_id==t&&(i=n)})}this.signatureBook.attachments=e,"add"===t||"edit"===t?this.changeRightViewer(i):"del"===t&&this.changeRightViewer(0)})}delAttachment(t){if(this.canUpdateDocument){let e=!1;e=this.signatureBook.attachments.length<=1?confirm("Attention, ceci est votre derni\xe8re pi\xe8ce jointe pour ce courrier, voulez-vous vraiment la supprimer ?"):confirm("Voulez-vous vraiment supprimer la pi\xe8ce jointe ?"),e&&this.http.delete("../rest/attachments/"+t.res_id).pipe(Object(mt.a)(()=>{this.refreshAttachments("del")}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}}signFile(t,e){!this.loadingSign&&this.signatureBook.canSign&&(this.loadingSign=!0,this.http.put(t.isResource?"../rest/resources/"+t.res_id+"/sign":"../rest/attachments/"+t.res_id+"/sign",{signatureId:e.id}).subscribe(e=>{t.isResource?(this.appDocumentViewer.loadRessource(t.res_id,"mainDocument"),this.rightViewerLink+="?tsp="+Math.floor(100*Math.random()),this.signatureBook.attachments[this.rightSelectedThumbnail].status="SIGN"):(this.appDocumentViewer.loadRessource(e.id,"attachment"),this.rightViewerLink="../rest/attachments/"+e.id+"/content",this.signatureBook.attachments[this.rightSelectedThumbnail].status="SIGN",this.signatureBook.attachments[this.rightSelectedThumbnail].idToDl=e.new_id,this.signatureBook.attachments[this.rightSelectedThumbnail].signed=!0,this.signatureBook.attachments[this.rightSelectedThumbnail].viewerId=e.id),this.signatureBook.attachments[this.rightSelectedThumbnail].viewerLink=this.rightViewerLink;let i=!0;this.signatureBook.attachments.forEach(t=>{t.sign&&"SIGN"!==t.status&&(i=!1)}),this.signatureBook.resList.length>0&&(this.signatureBook.resList[this.signatureBook.resListIndex].allSigned=i),this.showSignaturesPanel=!1,this.loadingSign=!1},t=>{this.notify.handleSoftErrors(t),this.loadingSign=!1}))}unsignFile(t){t.isResource?this.unSignMainDocument(t):this.unSignAttachment(t)}unSignMainDocument(t){this.http.put(`../rest/resources/${t.res_id}/unsign`,{}).pipe(Object(mt.a)(()=>{this.appDocumentViewer.loadRessource(t.res_id,"maintDocument"),this.rightViewerLink+="?tsp="+Math.floor(100*Math.random()),this.signatureBook.attachments[this.rightSelectedThumbnail].status="A_TRA",this.signatureBook.resList.length>0&&(this.signatureBook.resList[this.signatureBook.resListIndex].allSigned=!1),"visaCircuit"===this.headerTab&&(this.changeSignatureBookLeftContent("document"),setTimeout(()=>{this.changeSignatureBookLeftContent("visaCircuit")},0))}),Object(m.a)(t=>(403===t.status?this.notify.error(this.translate.instant("lang.youCannotUnsign")):this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}unSignAttachment(t){this.http.put("../rest/attachments/"+t.res_id+"/unsign",{}).pipe(Object(mt.a)(()=>{this.appDocumentViewer.loadRessource(t.res_id,"attachment"),this.rightViewerLink="../rest/attachments/"+t.res_id+"/content",this.signatureBook.attachments[this.rightSelectedThumbnail].viewerLink=this.rightViewerLink,this.signatureBook.attachments[this.rightSelectedThumbnail].status="A_TRA",this.signatureBook.attachments[this.rightSelectedThumbnail].idToDl=t.res_id,this.signatureBook.attachments[this.rightSelectedThumbnail].signed=!1,this.signatureBook.attachments[this.rightSelectedThumbnail].viewerId=t.res_id,this.signatureBook.resList.length>0&&(this.signatureBook.resList[this.signatureBook.resListIndex].allSigned=!1),"visaCircuit"===this.headerTab&&(this.changeSignatureBookLeftContent("document"),setTimeout(()=>{this.changeSignatureBookLeftContent("visaCircuit")},0))}),Object(m.a)(t=>(403===t.status?this.notify.error(this.translate.instant("lang.youCannotUnsign")):this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}backToBasket(){this.router.navigate(["/basketList/users/"+this.userId+"/groups/"+this.groupId+"/baskets/"+this.basketId])}backToDetails(){this.http.put("../rest/resourcesList/users/"+this.userId+"/groups/"+this.groupId+"/baskets/"+this.basketId+"/unlock",{resources:[this.resId]}).subscribe(t=>{this.router.navigate(["/resources/"+this.resId])},t=>{})}changeLocation(t,e){return Object(r.a)(this,void 0,void 0,(function*(){t!==this.resId&&(!0===(yield this.actionService.canExecuteAction([t],this.userId,this.groupId,this.basketId))?(this.actionService.stopRefreshResourceLock(),this.actionService.actionEnded||this.actionService.unlockResource(this.userId,this.groupId,this.basketId,[this.resId]),this.router.navigate(["signatureBook/users/"+this.userId+"/groups/"+this.groupId+"/baskets/"+this.basketId+"/resources/"+t])):this.backToBasket())}))}validForm(){""!==$("#signatureBookActions option:selected").val()?this.processAction():alert("Aucune action choisie")}processAction(){this.http.get(`../rest/resources/${this.resId}?light=true`).pipe(Object(mt.a)(t=>{const e=$("#signatureBookActions option:selected").val(),i=this.signatureBook.actions.filter(t=>t.id==e)[0];this.actionService.launchAction(i,this.userId,this.groupId,this.basketId,[this.resId],t,!1)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}refreshBadge(t,e){this.processTool.filter(t=>t.id===e)[0].count=t}loadBadges(){this.http.get(`../rest/resources/${this.resId}/items`).pipe(Object(mt.a)(t=>{this.processTool.forEach(e=>{e.count=void 0!==t[e.id]?t[e.id]:0})}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}createAttachment(){this.dialogRef=this.dialog.open(Ph,{disableClose:!0,panelClass:"attachment-modal-container",height:"90vh",width:"90vw",data:{resIdMaster:this.resId}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"success"===t),Object(mt.a)(()=>{this.refreshAttachments("add")}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}showAttachment(t){this.canUpdateDocument&&"SIGN"!==t.status&&(t.isResource?this.appDocumentViewer.editResource():(this.dialogRef=this.dialog.open(pu,{height:"99vh",width:this.appService.getViewMode()?"99vw":"90vw",maxWidth:this.appService.getViewMode()?"99vw":"90vw",panelClass:"attachment-modal-container",disableClose:!0,data:{resId:t.res_id}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"success"===t),Object(mt.a)(()=>{this.refreshAttachments("edit")}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()))}saveVisaWorkflow(){this.appVisaWorkflow.saveVisaWorkflow()}downloadOriginalFile(t){const e=document.createElement("a");this.http.get(`../rest/attachments/${t}/originalContent?mode=base64`).pipe(Object(mt.a)(i=>{e.href=`data:${i.mimeType};base64,${i.encodedDocument}`,e.setAttribute("download",`${t}.${i.extension}`),document.body.appendChild(e),e.click()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}ngOnDestroy(){this.actionService.stopRefreshResourceLock(),this.actionService.actionEnded||this.actionService.unlockResource(this.userId,this.groupId,this.basketId,[this.resId]),this.subscription.unsubscribe()}pdfViewerError(t){this.http.get(t).pipe(Object(m.a)(t=>(200!==t.status&&this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isToolEnabled(t){return"history"!==t||!(!this.privilegeService.hasCurrentUserPrivilege("view_full_history")&&!this.privilegeService.hasCurrentUserPrivilege("view_doc_history"))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(w.a),n.Qb(o.a),n.Qb(o.c),n.Qb(n.C),n.Qb(D.a),n.Qb(Dt.a),n.Qb(q.b),n.Qb(_t.a),n.Qb(bC),n.Qb(y.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Xc(Lk,!0),n.Xc(Qk,!0),n.Xc(Nk,!0)),2&t&&(n.yc(i=n.ec())&&(e.appVisaWorkflow=i.first),n.yc(i=n.ec())&&(e.appDocumentViewer=i.first),n.yc(i=n.ec())&&(e.appNotesList=i.first))},decls:5,vars:3,consts:[["class","visaContent",4,"ngIf"],[1,"tooltip_templates",2,"display","none"],["id","obsVersionTooltip"],[4,"ngIf"],[1,"visaContent"],[1,"fa","fa-spinner","fa-spin","fa-5x",2,"margin-left","50%","margin-top","16%","font-size","8em"],[1,"titleSignatureBook"],["id","tabSignatureBook"],["class","item",3,"title","ngClass","click",4,"ngIf"],["class","item",3,"title","ngClass","tool-disabled","click",4,"ngFor","ngForOf"],["id","labelSignatureBook",3,"title"],["id","closeSignatureBook"],[1,"fa","fa-times-circle","fa-2x",2,"cursor","pointer",3,"click"],[1,"actions"],[1,"fa","fa-info-circle","fa-2x",2,"cursor","pointer","vertical-align","middle",3,"title","click"],["id","signatureBookActions"],[3,"value",4,"ngFor","ngForOf"],["name","send","id","send","type","button",1,"button","button-form-primary-filled",3,"value","click"],["class","others",4,"ngIf"],[1,"contentSignatureBook"],["id","resListContent",1,"resListContent",3,"ngStyle"],[1,"resListContentPos"],["class","resListContentFrame",3,"ngClass","click",4,"ngFor","ngForOf"],["style","position: absolute;top: 48%; left: 3%",4,"ngIf"],["class","contentLeft","id","contentLeft",3,"ngStyle",4,"ngIf"],["class","contentRight","id","contentRight",3,"ngStyle",4,"ngIf"],[1,"panelRight"],["id","rightPanelContent","class","panelRightContent",4,"ngIf"],[2,"bottom","0px","position","absolute","width","100%"],[1,"panelRightListPj",3,"title","ngClass","click"],[1,"fa","fa-bars","fa-2x"],[2,"background-color","#666","margin-top","0px"],[1,"panelRightAddPj",3,"title","click"],[1,"fa","fa-paperclip","fa-2x"],[1,"fa","fa-plus",2,"position","absolute"],[1,"item",3,"title","ngClass","click"],[1,"fa","fa-file-alt","fa-2x"],["class","fas fa-circle haveContent",4,"ngIf"],[1,"fas","fa-circle","haveContent"],[3,"value"],[1,"others"],["id","consigne"],["type","text","readonly","readonly",1,"inputConsigne",3,"value","title"],[1,"resListContentFrame",3,"ngClass","click"],[1,"resListContentInfo"],[1,"fa","fa-compass",3,"title"],["class","fa fa-certificate",4,"ngIf"],["aria-hidden","true",1,"fa","fa-circle",2,"position","absolute","right","0px","top","-10px","font-size","25px",3,"title","ngStyle"],[1,"fa","fa-info",3,"title"],[1,"fa","fa-book",3,"title"],[1,"fa","fa-calendar-alt",3,"title"],[1,"resListContentInfo",2,"margin-top","-10px"],[1,"fa","fa-bell",3,"title"],[1,"fa","fa-certificate"],[2,"position","absolute","top","48%","left","3%"],[1,"fa","fa-spinner","fa-spin","fa-4x"],["id","contentLeft",1,"contentLeft",3,"ngStyle"],["class","hideresListContent",3,"click",4,"ngIf"],["class","contentShow",4,"ngIf"],["class","contentShow","style","width:98%;",4,"ngIf"],["class","contentShow","style","width:98%;overflow-x: hidden;",4,"ngIf"],["style","position: absolute;bottom: 20px;right:20px;","mat-fab","","color","accent",3,"title","click",4,"ngIf"],[1,"hideRightContent",3,"ngStyle","click"],["class","fa fa-chevron-right","aria-hidden","true",4,"ngIf"],["class","fa fa-chevron-left","aria-hidden","true",4,"ngIf"],[1,"hideresListContent",3,"click"],["aria-hidden","true",1,"fa","fa-chevron-left"],["aria-hidden","true",1,"fa","fa-chevron-right"],[1,"contentShow"],["class","pjDoc",4,"ngIf"],["class","pjDetailsMore","style","left:25px;",3,"title","click",4,"ngIf"],["id","leftPanelShowDocumentIframe",3,"src","render-text","fit-to-page","original-size","ngStyle","show-all","error",4,"ngIf"],["class","visaNoPdfWarning",3,"ngStyle",4,"ngIf"],[1,"pjDoc"],[2,"height","100%"],["id","thumnails_img","class","leftPanelThumbnails",3,"title","src","ngClass","click",4,"ngFor","ngForOf"],["id","thumnails_img",1,"leftPanelThumbnails",3,"title","src","ngClass","click"],[1,"pjDetailsMore",2,"left","25px",3,"title","click"],["class","fa fa-envelope-square fa-2x","aria-hidden","true",4,"ngIf"],["class","nbRes","style","position: absolute;right: 6px;top: 5px;",4,"ngIf"],["class","fa fa-chevron-up","aria-hidden","true",4,"ngIf"],["aria-hidden","true",1,"fa","fa-envelope-square","fa-2x"],[1,"nbRes",2,"position","absolute","right","6px","top","5px"],["aria-hidden","true",1,"fa","fa-chevron-up"],["id","leftPanelShowDocumentIframe",3,"src","render-text","fit-to-page","original-size","ngStyle","show-all","error"],["leftPanelShowDocumentIframe",""],[1,"visaNoPdfWarning",3,"ngStyle"],[2,"padding-top","25%"],[1,"visaPjView"],[2,"cursor","pointer",3,"title","click"],[1,"fa","fa-download","fa-2x"],[1,"contentShow",2,"width","98%"],[3,"editMode","resId","reloadBadgeNotes"],["appNotesList",""],[1,"contentShow",2,"width","98%","overflow-x","hidden"],[3,"resId","adminMode","target"],["appVisaWorkflow",""],[3,"resId"],["appHistoryList",""],[3,"resId","reloadBadgeLinkedResources"],["appLinkedResourceList",""],["mat-fab","","color","accent",2,"position","absolute","bottom","20px","right","20px",3,"title","click"],[1,"fas","fa-check",2,"height","auto","font-size","20px"],["id","contentRight",1,"contentRight",3,"ngStyle"],["id","hideLeftContent",1,"hideLeftContent",3,"ngStyle","click"],[1,"contentShow",2,"overflow","auto"],["style","height:100%;overflow: auto;",4,"ngIf"],[3,"resId","target","canModify","reloadBadgeAttachments","afterActionAttachment",4,"ngIf"],[1,"visaNoWorkflowWarning"],[2,"margin-top","200px",3,"innerHTML"],["class","visaNoPjWarning",4,"ngIf"],[2,"height","100%","overflow","auto"],[1,"pjDetails",3,"ngStyle"],[1,"infoPj",3,"title"],["style","color:#135F7F;",4,"ngIf"],["class","infoPj",3,"title",4,"ngIf"],[1,"infoPj"],["id","obsVersion","data-tooltip-content","#obsVersionTooltip","aria-hidden","true",1,"fa","fa-chevron-circle-up",2,"color","#135F7F",3,"ngStyle"],[1,"pjDetailsMore",3,"title","click"],["class","fa fa-list-alt fa-2x","aria-hidden","true",4,"ngIf"],["id","rightPanelShowDocumentIframe","style","height:100%;width:100%;",3,"editMode","hideTools","mode","resId","title",4,"ngIf"],["class","pjSign",3,"ngClass","ngStyle","mouseenter","mouseleave",4,"ngIf"],[2,"color","#135F7F"],["aria-hidden","true",1,"fa","fa-list-alt","fa-2x"],["id","rightPanelShowDocumentIframe",2,"height","100%","width","100%",3,"editMode","hideTools","mode","resId","title"],["appDocumentViewer",""],[2,"padding-top","25%",3,"innerHTML"],[3,"title","click"],[1,"fa","fa-edit","fa-2x",2,"cursor","pointer"],[1,"pjSign",3,"ngClass","ngStyle","mouseenter","mouseleave"],["style","cursor: pointer;color: green;",3,"click",4,"ngIf"],["class","fa fa-spinner fa-pulse fa-2x fa-fw",4,"ngIf"],[3,"src","ngStyle","title","click",4,"ngFor","ngForOf"],[3,"src","ngStyle","title","click"],[1,"fa","fa-spinner","fa-pulse","fa-2x","fa-fw"],[2,"cursor","pointer","color","green",3,"click"],["aria-hidden","true",1,"fa","fa-check","fa-2x",3,"title"],[3,"resId","target","canModify","reloadBadgeAttachments","afterActionAttachment"],["appAttachmentsList",""],[1,"visaNoPjWarning"],["id","rightPanelContent",1,"panelRightContent"],["style","position: relative;","class","item",3,"title","ngClass","click",4,"ngFor","ngForOf"],[1,"item",2,"position","relative",3,"title","ngClass","click"],[1,"fa-stack","fa-lg"],[1,"far","fa-file","fa-stack-2x"],[2,"font-weight","bold","letter-spacing","-1px"],["title","Le document a \xe9t\xe9 sign\xe9","style","position: absolute;top: 12px;right: 6px;","class","fa fa-circle",4,"ngIf"],["title","Le document n'a pas encore \xe9t\xe9 sign\xe9","style","position: absolute;top: 12px;right: 6px;","class","far fa-circle",4,"ngIf"],["style","color:green;-ms-transform: rotate(-35deg);-webkit-transform: rotate(-35deg);transform: rotate(-35deg);position: absolute;top: 39px;right: 1px;",4,"ngIf"],[2,"position","absolute","margin-left","-9px"],["title","Le document a \xe9t\xe9 sign\xe9",1,"fa","fa-circle",2,"position","absolute","top","12px","right","6px"],["title","Le document n'a pas encore \xe9t\xe9 sign\xe9",1,"far","fa-circle",2,"position","absolute","top","12px","right","6px"],[2,"color","green","-ms-transform","rotate(-35deg)","-webkit-transform","rotate(-35deg)","transform","rotate(-35deg)","position","absolute","top","39px","right","1px"],[1,"visaPjUp",3,"ngClass","title","click"],[1,"fa","fa-edit","fa-2x"],[1,"visaPjDel",3,"ngClass","title","click"],[1,"fa","fa-trash-alt","fa-2x"],[4,"ngFor","ngForOf"]],template:function(t,e){1&t&&(n.Oc(0,zk,2,0,"div",0),n.Oc(1,eI,38,31,"div",0),n.Wb(2,"div",1),n.Wb(3,"span",2),n.Oc(4,nI,2,1,"div",3),n.Vb(),n.Vb()),2&t&&(n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(3),n.oc("ngIf",e.signatureBook.attachments[e.rightSelectedThumbnail]&&e.signatureBook.attachments[e.rightSelectedThumbnail].relation>1))},directives:[P.t,P.s,P.w,P.q,X.z,X.J,Gs,kC,Ko,iO,Fk,k.b,S.a,Jr,Sg],pipes:[g.d,P.f,P.b,si],styles:['.selectedId[_ngcontent-%COMP%]{background-color:#f99830}#tab_visaSetWorkflow[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{white-space:pre}[draggable=true][_ngcontent-%COMP%]{cursor:move}[draggable=true][_ngcontent-%COMP%]:hover{box-shadow:0 0 5px green}[draggable=false][_ngcontent-%COMP%]:hover{cursor:not-allowed}#visa_content[_ngcontent-%COMP%]{display:block;width:100%}.droptarget[_ngcontent-%COMP%]{position:relative;background-color:rgba(19,95,127,.2);display:table;margin:10px;padding:5px;text-align:left;width:95%;cursor:default;border:2px dashed rgba(19,95,127,.2)}.droptarget_arrow[_ngcontent-%COMP%]{border:none;display:table-cell}.vised[_ngcontent-%COMP%]{opacity:1;color:green;border:2px solid green}.moved[_ngcontent-%COMP%]{opacity:.5!important;color:#666!important;border:2px solid #fff!important;text-decoration:line-through!important}.droptarget[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%}#visaUserList[_ngcontent-%COMP%]{width:45%;float:left}.droptarget.currentVis[_ngcontent-%COMP%]{color:#135f7f;border:2px solid #135f7f}.visaUserAction[_ngcontent-%COMP%], .visaUserConsigne[_ngcontent-%COMP%], .visaUserInfo[_ngcontent-%COMP%], .visaUserStatus[_ngcontent-%COMP%]{display:table-cell;vertical-align:middle}.visaUserStatus[_ngcontent-%COMP%]{width:5%}.vised[_ngcontent-%COMP%] .visaUserStatus[_ngcontent-%COMP%]{opacity:1}.visaUserInfo[_ngcontent-%COMP%]{width:55%;font-weight:700}.visaUserInfo[_ngcontent-%COMP%] .nbRes[_ngcontent-%COMP%]{background-color:grey;font-weight:400}.visaUserInfo[_ngcontent-%COMP%] sub[_ngcontent-%COMP%]{font-weight:400}.droptarget[_ngcontent-%COMP%]:hover.vised #dropZone[_ngcontent-%COMP%]{visibility:hidden}.droptarget[_ngcontent-%COMP%]:hover #dropZone[_ngcontent-%COMP%]{visibility:visible}.dropArea[_ngcontent-%COMP%]{border:3px dashed #fff;width:60%;margin:auto;opacity:.5;padding:5px}.dropArea[_ngcontent-%COMP%]:after{font-weight:bolder}#dropZone[_ngcontent-%COMP%], #dropZone[_ngcontent-%COMP%]:active{width:40px;text-align:right;opacity:.5;visibility:hidden;float:right;margin:5px}#dropZone[_ngcontent-%COMP%]:hover{cursor:-webkit-grab;cursor:grab}#dropZone[_ngcontent-%COMP%]:active{cursor:-webkit-grabbing;cursor:grabbing}.visaUserConsigne[_ngcontent-%COMP%]{width:30%}.visaUserAction[_ngcontent-%COMP%]{color:red;text-align:center;width:5%}.visaUserAction[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{cursor:pointer}.visaContent[_ngcontent-%COMP%]{position:relative;font-size:12px;display:flex;flex-direction:column;height:100vh;overflow:hidden}.visaContent[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{display:block!important;position:static!important;padding:10px;text-align:center!important}.titleSignatureBook[_ngcontent-%COMP%] .others[_ngcontent-%COMP%]{float:right;width:14%;padding:5px;vertical-align:middle;text-align:right}.titleSignatureBook[_ngcontent-%COMP%] .others[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:95%;background:#e6e6e6;border-radius:2px;border:none;padding:5px}.resListContent[_ngcontent-%COMP%]{width:8%;height:100%;text-align:center;border-right:1px solid;vertical-align:top;overflow:auto;font-size:10px}.resListContentInfo[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:95%;text-align:left;padding:5px;cursor:pointer;margin-top:0}.resListContentInfo[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{width:5%;text-align:center}.resListContentFrame[_ngcontent-%COMP%]:hover{background-color:#f99830}.resListContentFrame[_ngcontent-%COMP%]{border-bottom:1px solid #000;position:relative;overflow:hidden;background-color:#fff}.resListContentPos[_ngcontent-%COMP%]{overflow-x:hidden;overflow-y:auto}.hideLeftContent[_ngcontent-%COMP%]{z-index:1;margin-left:-13px}.hideLeftContent[_ngcontent-%COMP%], .hideRightContent[_ngcontent-%COMP%]{position:absolute;color:#666;top:45%;padding:5px;cursor:pointer;background:#fbfbfb;border-radius:40px}.hideRightContent[_ngcontent-%COMP%]{right:-10px}.hideresListContent[_ngcontent-%COMP%]{position:absolute;left:-4px;color:#666;top:45%;padding:5px;cursor:pointer;background:#fbfbfb;border-radius:40px}.contentLeft[_ngcontent-%COMP%]{position:relative;border-right:1px solid;padding-left:10px}.contentLeft[_ngcontent-%COMP%], .contentRight[_ngcontent-%COMP%]{vertical-align:top;display:inline-block;height:100%}.visaContent[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{margin:auto;width:100%;height:75vh;border:none}.contentLeft[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{height:99%}.panelRight[_ngcontent-%COMP%]{width:50px;border-left:1px solid;text-align:center;position:absolute;right:0;background-color:#fff}.panelRightContent[_ngcontent-%COMP%]{width:100%;height:69%;overflow:auto}.panelRight[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{cursor:pointer;padding:20px 10px 20px 5px}.contentRight[_ngcontent-%COMP%] .contentShow[_ngcontent-%COMP%]{display:inline-block;height:91vh}.panelRight[_ngcontent-%COMP%]{display:inline-block;height:calc(100% - 38px)}.contentLeft[_ngcontent-%COMP%] .contentShow[_ngcontent-%COMP%]{height:95vh;overflow:auto;width:98%}.contentLeft[_ngcontent-%COMP%] .contentShow[_ngcontent-%COMP%], .contentRight[_ngcontent-%COMP%] .contentShow[_ngcontent-%COMP%]{padding:5px;height:100%}.contentRight[_ngcontent-%COMP%] .contentShow[_ngcontent-%COMP%]{position:relative;vertical-align:top;width:100%}.pjDetails[_ngcontent-%COMP%], .pjDoc[_ngcontent-%COMP%]{margin-bottom:5px}.pjDetails[_ngcontent-%COMP%], .pjSign[_ngcontent-%COMP%]{background-color:#fff;display:block;width:99%;text-align:left;-o-box-shadow:inset 0 0 5px 0 #656565;box-shadow:inset 0 0 5px 0 #656565;filter:progid:DXImageTransform.Microsoft.Shadow(color=#656565,Direction=NaN,Strength=5);border-radius:5px;padding:10px;height:100px}.pjDetails[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-weight:700;cursor:inherit}.pjDetailsMore[_ngcontent-%COMP%]{z-index:1;position:absolute;left:15px;margin-top:2px;text-align:center;cursor:pointer;background:#135f7f;color:#fff;padding:10px;-o-box-shadow:0 0 10px 0 #656565;box-shadow:0 0 10px 0 #656565;filter:progid:DXImageTransform.Microsoft.Shadow(color=#656565,Direction=NaN,Strength=10)}.pjDetails[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{white-space:normal}.pjDetails[_ngcontent-%COMP%]{color:#666;font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;font-size:12px;font-weight:400;letter-spacing:.02em}.pjDoc[_ngcontent-%COMP%]{height:100px;background-color:#fff;-o-box-shadow:inset 0 0 5px 0 #656565;box-shadow:inset 0 0 5px 0 #656565;filter:progid:DXImageTransform.Microsoft.Shadow(color=#656565,Direction=NaN,Strength=5);border-radius:5px;padding:10px}.pjDoc[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:95%;border:2px solid #fff;cursor:pointer}img.panelSelectedThumbnail[_ngcontent-%COMP%], img[_ngcontent-%COMP%]:hover.panelSelectedThumbnail{border:2px solid #135f7f;cursor:pointer}.actions[_ngcontent-%COMP%]{float:right;width:25%;padding:5px;vertical-align:middle;text-align:right;text-transform:none;border-left:1px solid #000;border-right:1px solid #000}.actions[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{width:5%}.actions[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{width:75%}.actions[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{text-align:center;width:17%}#signatureBookActions[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#000;font:400 13.3333px Arial}.titleSignatureBook[_ngcontent-%COMP%]{height:38px;font-size:12px;display:block;width:100%;border:1px solid #000;vertical-align:middle;font-weight:700;background:#135f7f;color:#fff;text-transform:uppercase;white-space:nowrap;overflow:hidden}#closeSignatureBook[_ngcontent-%COMP%]{float:right;padding:5px;width:47px;text-align:center}#labelSignatureBook[_ngcontent-%COMP%]{float:left;width:33%;padding-left:10px;margin-top:10px}#labelSignatureBook[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;display:block}#tabSignatureBook[_ngcontent-%COMP%]{float:left;width:auto}.titleSignatureBook[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:inline-block;vertical-align:middle}#tabSignatureBook[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{border-right:1px solid #000;display:table-cell;cursor:pointer;vertical-align:middle;width:60px;text-align:center;padding:5px 10px 7px;color:#666;background-color:#fbfbfb}.contentSignatureBook[_ngcontent-%COMP%]{border:1px solid #000;border-top:none;display:block;width:100%;flex:1;overflow:hidden;background-color:#fbfbfb}#tabSignatureBook[_ngcontent-%COMP%] .item.activeTabSignatureBook[_ngcontent-%COMP%]{-o-box-shadow:inset 0 0 5px 0 #656565;box-shadow:inset 0 0 5px 0 #656565;padding-left:10px;padding-right:10px}.resListContentFrameSelected[_ngcontent-%COMP%]{background-color:#f99830}.panelRightContent[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]:hover, .panelSelectedThumbnail[_ngcontent-%COMP%]{-o-box-shadow:inset 0 0 5px 0 #656565;box-shadow:inset 0 0 5px 0 #656565;background-color:#f99830}.panelSelectedThumbnail[_ngcontent-%COMP%]{color:#666!important}.infoPj[_ngcontent-%COMP%]{width:30%;display:inline-block;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis;padding-left:10px}.infoPj[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{vertical-align:top}.ng-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{text-align:left;padding:5px;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ng-table[_ngcontent-%COMP%] th.sortable[_ngcontent-%COMP%]{cursor:pointer}.ng-table[_ngcontent-%COMP%] th.sortable[_ngcontent-%COMP%] .sort-indicator[_ngcontent-%COMP%]{padding-right:18px;position:relative}.ng-table[_ngcontent-%COMP%] th.sortable[_ngcontent-%COMP%] .sort-indicator[_ngcontent-%COMP%]:after, .ng-table[_ngcontent-%COMP%] th.sortable[_ngcontent-%COMP%] .sort-indicator[_ngcontent-%COMP%]:before{content:"";border-color:#000 transparent;border-style:solid;border-width:0 4px 4px;visibility:visible;right:5px;top:50%;position:absolute;opacity:.3;margin-top:-4px}.ng-table[_ngcontent-%COMP%] th.sortable[_ngcontent-%COMP%] .sort-indicator[_ngcontent-%COMP%]:before{margin-top:2px;border:4px solid transparent;border-top-color:#000;border-bottom:none}.ng-table[_ngcontent-%COMP%] th.sortable[_ngcontent-%COMP%] .sort-indicator[_ngcontent-%COMP%]:hover:after, .ng-table[_ngcontent-%COMP%] th.sortable[_ngcontent-%COMP%] .sort-indicator[_ngcontent-%COMP%]:hover:before{opacity:1;visibility:visible}.ng-table[_ngcontent-%COMP%] th.sortable.sort-asc[_ngcontent-%COMP%], .ng-table[_ngcontent-%COMP%] th.sortable.sort-desc[_ngcontent-%COMP%]{background-color:rgba(141,192,219,.25);text-shadow:0 1px 1px hsla(0,0%,100%,.75)}.ng-table[_ngcontent-%COMP%] th.sortable.sort-asc[_ngcontent-%COMP%] .sort-indicator[_ngcontent-%COMP%]:after, .ng-table[_ngcontent-%COMP%] th.sortable.sort-desc[_ngcontent-%COMP%] .sort-indicator[_ngcontent-%COMP%]:after{margin-top:-2px}.ng-table[_ngcontent-%COMP%] th.sortable.sort-asc[_ngcontent-%COMP%] .sort-indicator[_ngcontent-%COMP%]:before, .ng-table[_ngcontent-%COMP%] th.sortable.sort-desc[_ngcontent-%COMP%] .sort-indicator[_ngcontent-%COMP%]:before{visibility:hidden}.ng-table[_ngcontent-%COMP%] th.sortable.sort-asc[_ngcontent-%COMP%] .sort-indicator[_ngcontent-%COMP%]:after, .ng-table[_ngcontent-%COMP%] th.sortable.sort-asc[_ngcontent-%COMP%] .sort-indicator[_ngcontent-%COMP%]:hover:after, .ng-table[_ngcontent-%COMP%] th.sortable.sort-desc[_ngcontent-%COMP%] .sort-indicator[_ngcontent-%COMP%]:after{visibility:visible;filter:alpha(opacity=60);-khtml-opacity:.6;-moz-opacity:.6;opacity:.6}.ng-table[_ngcontent-%COMP%] th.sortable.sort-desc[_ngcontent-%COMP%] .sort-indicator[_ngcontent-%COMP%]:after{border:4px solid transparent;border-top-color:#000;border-bottom:none;box-shadow:none}.ng-table[_ngcontent-%COMP%] th.filter[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]{margin:0;display:block;width:auto;font-size:9px;box-sizing:border-box}.ng-table[_ngcontent-%COMP%] .ng-table-group-header[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{text-align:left}.ng-table[_ngcontent-%COMP%] .ng-table-group-selector[_ngcontent-%COMP%]{display:block}.ng-table[_ngcontent-%COMP%] .ng-table-group-close[_ngcontent-%COMP%], .ng-table[_ngcontent-%COMP%] .ng-table-group-toggle[_ngcontent-%COMP%]{float:right}.ng-table[_ngcontent-%COMP%] .ng-table-group-toggle[_ngcontent-%COMP%]{margin-right:5px}@media only screen and (max-width:800px){.ng-table-responsive[_ngcontent-%COMP%]{border-bottom:1px solid #999}.ng-table-responsive[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border-top:1px solid #999;border-left:1px solid #999;border-right:1px solid #999}.ng-table-responsive[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:before{position:absolute;padding:8px;left:0;top:0;width:50%;white-space:nowrap;text-align:left;font-weight:700}.ng-table-responsive[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{text-align:left}.ng-table-responsive[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr.ng-table-filters[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:0}.ng-table-responsive[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr.ng-table-filters[_ngcontent-%COMP%] th[_ngcontent-%COMP%] form[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{padding:8px}.ng-table-responsive[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:none;border-bottom:1px solid #eee;position:relative;padding-left:50%;white-space:normal;text-align:left}.ng-table-responsive[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:before{content:attr(data-title-text)}.ng-table-responsive[_ngcontent-%COMP%], .ng-table-responsive[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%], .ng-table-responsive[_ngcontent-%COMP%] td[_ngcontent-%COMP%], .ng-table-responsive[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .ng-table-responsive[_ngcontent-%COMP%] thead[_ngcontent-%COMP%], .ng-table-responsive[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{display:block}}.ng-table-pagination[_ngcontent-%COMP%]{margin-top:0}.filter[_ngcontent-%COMP%]:after, .filter[_ngcontent-%COMP%]:before, .ng-table-group-selector[_ngcontent-%COMP%]:after, .ng-table-group-selector[_ngcontent-%COMP%]:before{display:table;content:" "}.filter[_ngcontent-%COMP%]:after, .ng-table-group-selector[_ngcontent-%COMP%]:after{clear:both}.filter[_ngcontent-%COMP%] > .filter-cell[_ngcontent-%COMP%]{float:left;box-sizing:border-box}.filter-horizontal[_ngcontent-%COMP%] > .filter-cell[_ngcontent-%COMP%]{padding:0 2px}.filter-horizontal[_ngcontent-%COMP%] > .filter-cell[_ngcontent-%COMP%]:first-child{padding-left:0}.filter-horizontal[_ngcontent-%COMP%] > .filter-cell.last[_ngcontent-%COMP%], .filter-horizontal[_ngcontent-%COMP%] > .filter-cell[_ngcontent-%COMP%]:last-child{padding-right:0}.s12[_ngcontent-%COMP%]{width:100%}.s11[_ngcontent-%COMP%]{width:91.66666666666666%}.s10[_ngcontent-%COMP%]{width:83.33333333333334%}.s9[_ngcontent-%COMP%]{width:75%}.s8[_ngcontent-%COMP%]{width:66.66666666666666%}.s7[_ngcontent-%COMP%]{width:58.333333333333336%}.s6[_ngcontent-%COMP%]{width:50%}.s5[_ngcontent-%COMP%]{width:41.66666666666667%}.s4[_ngcontent-%COMP%]{width:33.33333333333333%}.s3[_ngcontent-%COMP%]{width:25%}.s2[_ngcontent-%COMP%]{width:16.666666666666664%}.s1[_ngcontent-%COMP%]{width:8.333333333333332%}@media (max-width:468px){.s1[_ngcontent-%COMP%], .s2[_ngcontent-%COMP%], .s3[_ngcontent-%COMP%], .s4[_ngcontent-%COMP%], .s5[_ngcontent-%COMP%], .s6[_ngcontent-%COMP%], .s7[_ngcontent-%COMP%], .s8[_ngcontent-%COMP%], .s9[_ngcontent-%COMP%], .s10[_ngcontent-%COMP%], .s11[_ngcontent-%COMP%], .s12[_ngcontent-%COMP%]{width:100%}.filter[_ngcontent-%COMP%] > .filter-cell[_ngcontent-%COMP%]{padding:0}}.ng-table[_ngcontent-%COMP%]{margin-bottom:20px;max-width:100%;width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0;border-bottom:1px solid #135f7f}.ng-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{text-align:left;padding:10px}.ng-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border-bottom:1px solid #135f7f}.ng-table-counts[_ngcontent-%COMP%]{display:none}.ng-table-pagination[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:inline-block;border:1px solid #135f7f;padding:5px;margin:5px;border-radius:10px}.ng-table-pagination[_ngcontent-%COMP%] li.active[_ngcontent-%COMP%]{background:#135f7f;color:#fff}.ng-table-pagination[_ngcontent-%COMP%] li.active[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#fff}.ng-table-pagination[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:hover{background:#135f7f;color:#fff}.ng-table-pagination[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:hover a[_ngcontent-%COMP%]{color:#fff}.ng-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:rgba(141,192,219,.25)}.ng-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child, .ng-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:nth-child(2){width:20%}.ng-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:nth-child(3){width:60%}#footer[_ngcontent-%COMP%]{padding:0}.pjSign[_ngcontent-%COMP%]{text-align:left;height:auto;position:absolute;bottom:0;background:#fff;margin-bottom:5px;width:80px;transition:width .5s;overflow:auto!important}.pjSign.signed[_ngcontent-%COMP%]{width:auto!important}.pjSign[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{cursor:pointer;border:2px solid #fff;height:30px;width:auto;min-width:60px;transition:all .5s}.pjSign[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]{height:60px;width:auto;transition:all .5s}.pjSign[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]:hover{border:2px solid #135f7f}.pjSign[_ngcontent-%COMP%]:hover{display:flex;white-space:pre;overflow:hidden!important;width:95%;transition:width .5s}.visaPjView[_ngcontent-%COMP%]{color:initial}.panelRightListPj[_ngcontent-%COMP%]{padding:3px;margin-bottom:5px;cursor:pointer}.panelRightListPj[_ngcontent-%COMP%]:hover{color:#135f7f}.panelRightAddPj[_ngcontent-%COMP%]{display:block;background-color:#16a765}.panelRightAddPj[_ngcontent-%COMP%], .visaPjUp[_ngcontent-%COMP%]{margin:auto auto 10px;font-size:10px;height:40px;width:40px;cursor:pointer;padding:10px;color:#fff;border-radius:25px;-o-box-shadow:0 0 10px 0 #656565;box-shadow:0 0 10px 0 #656565;filter:progid:DXImageTransform.Microsoft.Shadow(color=#656565,Direction=NaN,Strength=10)}.visaPjUp[_ngcontent-%COMP%]{background-color:#4285f4}.visaPjDel[_ngcontent-%COMP%]{margin:auto;font-size:10px;height:40px;width:40px;cursor:pointer;padding:10px;background-color:#d14836;color:#fff;border-radius:25px;-o-box-shadow:0 0 10px 0 #656565;box-shadow:0 0 10px 0 #656565;filter:progid:DXImageTransform.Microsoft.Shadow(color=#656565,Direction=NaN,Strength=10)}.visaNoPdfWarning[_ngcontent-%COMP%]{border:dashed;font-weight:700;opacity:.5;white-space:normal;font-size:40px;text-align:center}.visaNoWorkflowWarning[_ngcontent-%COMP%]{height:97%;width:100%}.visaNoPjWarning[_ngcontent-%COMP%], .visaNoWorkflowWarning[_ngcontent-%COMP%]{font-size:40px;border:dashed;font-weight:700;opacity:.5;white-space:normal;margin-top:10px}.visaNoPjWarning[_ngcontent-%COMP%]{height:80vh}.visaDisabledButton[_ngcontent-%COMP%]{cursor:inherit;opacity:.3}.chosen-container-single[_ngcontent-%COMP%] .chosen-default[_ngcontent-%COMP%]{color:#000!important}#visa_content[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{font-size:11px}.nbResZero[_ngcontent-%COMP%]{background:#666}.nbRes[_ngcontent-%COMP%], .nbResZero[_ngcontent-%COMP%]{color:#fff;padding:3px;border-radius:7px}.nbRes[_ngcontent-%COMP%]{background:#f99830}.haveContent[_ngcontent-%COMP%]{font-size:9px!important;color:#f99830;margin-left:2px}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;transition:all .1s;margin-left:5px}.inputConsigne[_ngcontent-%COMP%]{height:22px;margin-top:2px;color:#000;font-weight:400}.tool-disabled[_ngcontent-%COMP%]{cursor:not-allowed!important}.tool-disabled[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{opacity:.3}']}),t})(),sI=(()=>{class t{constructor(){this.listsProperties=[],this.listsPropertiesIndex=0,this.filterMode=!1,this.mode="basket"}initListsProperties(t,e,i,n,a=""){let s;return this.listsProperties=JSON.parse(sessionStorage.getItem("propertyList"+n)),this.listsPropertiesIndex=0,this.mode=n,null!=this.listsProperties?this.listsProperties.forEach((n,a)=>{n.id==t&&n.groupId==e&&n.targetId==i&&(this.listsPropertiesIndex=a,s=n)}):this.listsProperties=[],s&&""===a||(s={id:t,groupId:e,targetId:i,page:"0",pageSize:10,order:"",orderDir:"DESC",search:a,delayed:!1,categories:[],priorities:[],entities:[],subEntities:[],statuses:[],doctypes:[],folders:[]},this.listsProperties.push(s),this.listsPropertiesIndex=this.listsProperties.length-1,this.saveListsProperties()),s}updateListsPropertiesPage(t){this.listsProperties&&(this.listsProperties[this.listsPropertiesIndex].page=t,this.saveListsProperties())}updateListsPropertiesPageSize(t){this.listsProperties&&(this.listsProperties[this.listsPropertiesIndex].pageSize=t,this.saveListsProperties())}updateListsProperties(t){this.listsProperties&&(this.listsProperties[this.listsPropertiesIndex]=t,this.saveListsProperties())}saveListsProperties(){sessionStorage.setItem("propertyList"+this.mode,JSON.stringify(this.listsProperties))}getUrlFilters(){let t="";if(this.listsProperties){if(this.listsProperties[this.listsPropertiesIndex].delayed&&(t+="&delayed=true"),this.listsProperties[this.listsPropertiesIndex].order.length>0&&(t+="&order="+this.listsProperties[this.listsPropertiesIndex].order+" "+this.listsProperties[this.listsPropertiesIndex].orderDir),this.listsProperties[this.listsPropertiesIndex].search.length>0&&(t+="&search="+this.listsProperties[this.listsPropertiesIndex].search),this.listsProperties[this.listsPropertiesIndex].categories.length>0){let e=[];this.listsProperties[this.listsPropertiesIndex].categories.forEach(t=>{e.push(t.id)}),t+="&categories="+e.join(",")}if(this.listsProperties[this.listsPropertiesIndex].priorities.length>0){let e=[];this.listsProperties[this.listsPropertiesIndex].priorities.forEach(t=>{e.push(t.id)}),t+="&priorities="+e.join(",")}if(this.listsProperties[this.listsPropertiesIndex].statuses.length>0){let e=[];this.listsProperties[this.listsPropertiesIndex].statuses.forEach(t=>{e.push(t.id)}),t+="&statuses="+e.join(",")}if(this.listsProperties[this.listsPropertiesIndex].entities.length>0){let e=[];this.listsProperties[this.listsPropertiesIndex].entities.forEach(t=>{e.push(t.id)}),t+="&entities="+e.join(",")}if(this.listsProperties[this.listsPropertiesIndex].subEntities.length>0){let e=[];this.listsProperties[this.listsPropertiesIndex].subEntities.forEach(t=>{e.push(t.id)}),t+="&entitiesChildren="+e.join(",")}if(this.listsProperties[this.listsPropertiesIndex].doctypes.length>0){let e=[];this.listsProperties[this.listsPropertiesIndex].doctypes.forEach(t=>{e.push(t.id)}),t+="&doctypes="+e.join(",")}if(this.listsProperties[this.listsPropertiesIndex].folders.length>0){let e=[];this.listsProperties[this.listsPropertiesIndex].folders.forEach(t=>{e.push(t.id)}),t+="&folders="+e.join(",")}}return t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();function oI(t,e){1&t&&(n.Wb(0,"mat-option",32),n.Rb(1,"mat-spinner",33),n.Vb())}function rI(t,e){if(1&t&&(n.Wb(0,"mat-option",38),n.Wb(1,"span",39),n.Qc(2),n.Vb(),n.Wb(3,"span",22),n.Wb(4,"span",40),n.Qc(5),n.Vb(),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Ib("undefined","_UNDEFINED"===t.label),n.Db(1),n.Rc(t.label),n.Db(2),n.Gb("badge badge-",t.id,""),n.Db(1),n.Rc(t.count)}}function cI(t,e){if(1&t&&(n.Wb(0,"mat-optgroup",36),n.Oc(1,rI,6,8,"mat-option",37),n.Vb()),2&t){const t=n.hc().$implicit;n.oc("label",t.letter),n.Db(1),n.oc("ngForOf",t.names)}}function lI(t,e){if(1&t&&(n.Ub(0),n.Oc(1,cI,2,2,"mat-optgroup",35),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",t.names.length>0)}}function dI(t,e){if(1&t&&(n.Ub(0),n.Oc(1,lI,2,1,"ng-container",34),n.ic(2,"async"),n.Tb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",n.jc(2,1,t.stateGroupOptions))}}function hI(t,e){if(1&t&&(n.Wb(0,"mat-option",41),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",n.jc(2,2,"lang."+t.id)," ")}}function uI(t,e){1&t&&n.Rb(0,"mat-icon",42)}function pI(t,e){1&t&&n.Rb(0,"mat-icon",43)}function bI(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",44),n.dc("click",(function(){n.Dc(t);const e=n.hc();return e.listProperties.search="",e.removeFilters()})),n.ic(1,"translate"),n.Rb(2,"i",45),n.Vb()}2&t&&n.pc("title",n.jc(1,1,"lang.eraseAllFilters"))}function fI(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",46),n.dc("click",(function(){n.Dc(t);const e=n.hc();return e.listProperties.search="",e.updateFilters()})),n.ic(1,"translate"),n.ic(2,"translate"),n.Qc(3),n.Rb(4,"i",47),n.Vb()}if(2&t){const t=n.hc();n.rc("title","",n.jc(1,3,"lang.subject")," / ",n.jc(2,5,"lang.chronoNumber"),""),n.Db(3),n.Sc("",t.listProperties.search," ")}}function mI(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",48),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc().removeFilter("categories",i)})),n.ic(1,"translate"),n.Qc(2),n.Rb(3,"i",47),n.Vb()}if(2&t){const t=e.$implicit;n.pc("title",n.jc(1,2,"lang.categories")),n.Db(2),n.Sc("",t.label," ")}}function gI(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",49),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc().removeFilter("priorities",i)})),n.ic(1,"translate"),n.Qc(2),n.Rb(3,"i",47),n.Vb()}if(2&t){const t=e.$implicit;n.pc("title",n.jc(1,2,"lang.priorities")),n.Db(2),n.Sc("",t.label," ")}}function vI(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",50),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc().removeFilter("statuses",i)})),n.ic(1,"translate"),n.Qc(2),n.Rb(3,"i",47),n.Vb()}if(2&t){const t=e.$implicit;n.pc("title",n.jc(1,2,"lang.statuses")),n.Db(2),n.Sc("",t.label," ")}}function _I(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",51),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc().removeFilter("entities",i)})),n.ic(1,"translate"),n.Qc(2),n.Rb(3,"i",47),n.Vb()}if(2&t){const t=e.$implicit;n.pc("title",n.jc(1,2,"lang.entities")),n.Db(2),n.Sc("",t.label," ")}}function yI(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",52),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc().removeFilter("subEntities",i)})),n.ic(1,"translate"),n.Qc(2),n.Rb(3,"i",47),n.Vb()}if(2&t){const t=e.$implicit;n.pc("title",n.jc(1,2,"lang.subEntities")),n.Db(2),n.Sc("",t.label," ")}}function xI(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",53),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc().removeFilter("doctypes",i)})),n.ic(1,"translate"),n.Qc(2),n.Rb(3,"i",47),n.Vb()}if(2&t){const t=e.$implicit;n.pc("title",n.jc(1,2,"lang.doctypes")),n.Db(2),n.Sc("",t.label," ")}}function CI(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",54),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc().removeFilter("folders",i)})),n.ic(1,"translate"),n.Qc(2),n.Rb(3,"i",47),n.Vb()}if(2&t){const t=e.$implicit;n.pc("title",n.jc(1,2,"lang.folders")),n.Db(2),n.Sc("",t.label," ")}}let OI=(()=>{class t{constructor(t,e,i,a,s,o){this.translate=t,this.http=e,this.filtersListService=i,this.fb=a,this.latinisePipe=s,this.dialog=o,this.stateForm=this.fb.group({stateGroup:""}),this.displayColsOrder=[{id:"dest_user"},{id:"category_id"},{id:"creation_date"},{id:"process_limit_date"},{id:"entity_label"},{id:"subject"},{id:"alt_identifier"},{id:"priority"},{id:"status"},{id:"type_label"}],this.priorities=[],this.categories=[],this.entitiesList=[],this.statuses=[],this.metaSearchInput="",this.stateGroups=[],this.isLoading=!1,this.refreshEvent=new n.o,this.refreshEventAfterAction=new n.o,this.toggleAllRes=new n.o,this._filter=(t,e)=>{if("string"==typeof e){const i=e.toLowerCase();return t.filter(t=>-1!==this.latinisePipe.transform(t.label.toLowerCase()).indexOf(this.latinisePipe.transform(i)))}}}ngOnInit(){}_filterGroup(t){return t&&"string"==typeof t?this.stateGroups.map(e=>({letter:e.letter,names:this._filter(e.names,t)})).filter(t=>t.names.length>0):this.stateGroups}changeOrderDir(){this.listProperties.orderDir="ASC"===this.listProperties.orderDir?"DESC":"ASC",this.updateFilters()}updateFilters(){this.listProperties.page=0,this.filtersListService.updateListsProperties(this.listProperties),this.refreshEvent.emit()}refreshAfterAction(){this.refreshEventAfterAction.emit()}setFilters(t,e){this.listProperties[e]=t.source.checked,this.updateFilters()}selectFilter(t){this.listProperties[t.option.value.id].push({id:t.option.value.value,label:t.option.value.label}),$(".metaSearch").blur(),this.stateForm.controls.stateGroup.reset(),this.updateFilters()}metaSearch(t){this.listProperties.search=t.target.value,$(".metaSearch").blur(),this.stateForm.controls.stateGroup.reset(),this.autocomplete.closePanel(),this.updateFilters()}removeFilter(t,e){this.listProperties[t].splice(e,1),this.updateFilters()}removeFilters(){Object.keys(this.listProperties).forEach(t=>{Array.isArray(this.listProperties[t])?this.listProperties[t]=[]:"search"===t&&(this.listProperties[t]="")}),this.updateFilters()}haveFilters(){let t=!1;return Object.keys(this.listProperties).forEach(e=>{(Array.isArray(this.listProperties[e])&&this.listProperties[e].length>0||"search"===e&&""!==this.listProperties[e])&&(t=!0)}),t}setInputSearch(t){$(".metaSearch").focus(),this.metaSearchInput=t}initFilters(){this.isLoading=!0,this.stateForm.controls.stateGroup.reset(),this.stateGroups=[{letter:this.translate.instant("lang.categories"),names:[]},{letter:this.translate.instant("lang.priorities"),names:[]},{letter:this.translate.instant("lang.statuses"),names:[]},{letter:this.translate.instant("lang.entities"),names:[]},{letter:this.translate.instant("lang.subEntities"),names:[]},{letter:this.translate.instant("lang.doctypes"),names:[]},{letter:this.translate.instant("lang.folders"),names:[]}],this.http.get(".."+this.routeDatas+"?init"+this.filtersListService.getUrlFilters()).subscribe(t=>{t.categories.forEach(t=>{-1===this.listProperties.categories.map(t=>t.id).indexOf(t.id)&&this.stateGroups[0].names.push({id:"categories",value:t.id,label:null!==t.id?t.label:this.translate.instant("lang.undefined"),count:t.count})}),t.priorities.forEach(t=>{-1===this.listProperties.priorities.map(t=>t.id).indexOf(t.id)&&this.stateGroups[1].names.push({id:"priorities",value:t.id,label:null!==t.id?t.label:this.translate.instant("lang.undefined"),count:t.count})}),t.statuses.forEach(t=>{-1===this.listProperties.statuses.map(t=>t.id).indexOf(t.id)&&this.stateGroups[2].names.push({id:"statuses",value:t.id,label:null!==t.id?t.label:this.translate.instant("lang.undefined"),count:t.count})}),t.entities.forEach(t=>{-1===this.listProperties.entities.map(t=>t.id).indexOf(t.entityId)&&0===this.listProperties.subEntities.length&&this.stateGroups[3].names.push({id:"entities",value:t.entityId,label:null!==t.entityId?t.label:this.translate.instant("lang.undefined"),count:t.count})}),t.entitiesChildren.forEach(t=>{-1===this.listProperties.subEntities.map(t=>t.id).indexOf(t.entityId)&&0===this.listProperties.entities.length&&this.stateGroups[4].names.push({id:"subEntities",value:t.entityId,label:null!==t.entityId?t.label:this.translate.instant("lang.undefined"),count:t.count})}),t.doctypes.forEach(t=>{-1===this.listProperties.doctypes.map(t=>t.id).indexOf(t.id)&&this.stateGroups[5].names.push({id:"doctypes",value:t.id,label:null!==t.id?t.label:this.translate.instant("lang.undefined"),count:t.count})}),t.folders.forEach(t=>{-1===this.listProperties.folders.map(t=>t.id).indexOf(t.id)&&this.stateGroups[6].names.push({id:"folders",value:t.id,label:null!==t.id?t.label:this.translate.instant("lang.undefined"),count:t.count})}),this.isLoading=!1,this.metaSearchInput.length>0&&setTimeout(()=>{this.stateForm.controls.stateGroup.setValue(this.metaSearchInput),this.metaSearchInput=""},200)}),this.stateGroupOptions=this.stateForm.get("stateGroup").valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>this._filterGroup(t)))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(sI),n.Qb(X.h),n.Qb(Tt.c),n.Qb(q.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-filters-tool"]],viewQuery:function(t,e){var i;1&t&&n.Kc(Ne.d,!0),2&t&&n.yc(i=n.ec())&&(e.autocomplete=i.first)},inputs:{listProperties:"listProperties",title:"title",routeDatas:"routeDatas",selectedRes:"selectedRes",totalRes:"totalRes"},outputs:{refreshEvent:"refreshEvent",refreshEventAfterAction:"refreshEventAfterAction",toggleAllRes:"toggleAllRes"},features:[n.Cb([Tt.c])],decls:37,vars:35,consts:[[1,"filtersContent"],[1,"filterTool",3,"formGroup"],["floatLabel","never",1,"basket-search"],["type","text","matInput","","formControlName","stateGroup",1,"metaSearch",3,"placeholder","matAutocomplete","focus","keyup.enter"],["mat-icon-button","","matPrefix",""],[1,"fa","fa-search"],["matSuffix","","value","delayed",1,"processLimitButton",3,"checked","title","click","change"],["fontSet","fas","fontIcon","fa-stopwatch fa-2x"],[3,"optionSelected"],["autoGroup","matAutocomplete"],["class","is-loading",4,"ngIf"],[4,"ngIf"],[1,"orderTool"],[1,"basket-order"],["matPrefix","",1,"fa","fa-list"],[3,"ngModel","ngModelChange","selectionChange"],["value","",2,"text-align","center"],[3,"value",4,"ngFor","ngForOf"],[1,"ascDescTool"],["mat-fab","",2,"color","rgba(0,0,0,0.38)",3,"disabled","title","click"],["fontSet","fas","fontIcon","fa-sort-amount-down fa-2x",4,"ngIf"],["fontSet","fas","fontIcon","fa-sort-amount-up fa-2x",4,"ngIf"],[1,"filterBadges"],["class","label badge-eraser",3,"title","click",4,"ngIf"],["class","label badge-search",3,"title","click",4,"ngIf"],["class","label badge-categories",3,"title","click",4,"ngFor","ngForOf"],["class","label badge-priorities",3,"title","click",4,"ngFor","ngForOf"],["class","label badge-statuses",3,"title","click",4,"ngFor","ngForOf"],["class","label badge-entities",3,"title","click",4,"ngFor","ngForOf"],["class","label badge-subEntities",3,"title","click",4,"ngFor","ngForOf"],["class","label badge-doctypes",3,"title","click",4,"ngFor","ngForOf"],["class","label badge-folders",3,"title","click",4,"ngFor","ngForOf"],[1,"is-loading"],["diameter","50"],[4,"ngFor","ngForOf"],[3,"label",4,"ngIf"],[3,"label"],["class","filterOptionContent",3,"value",4,"ngFor","ngForOf"],[1,"filterOptionContent",3,"value"],[2,"flex","1","overflow","hidden","text-overflow","ellipsis"],[2,"min-width","auto"],[3,"value"],["fontSet","fas","fontIcon","fa-sort-amount-down fa-2x"],["fontSet","fas","fontIcon","fa-sort-amount-up fa-2x"],[1,"label","badge-eraser",3,"title","click"],[1,"fas","fa-eraser"],[1,"label","badge-search",3,"title","click"],[1,"fa","fa-times-circle"],[1,"label","badge-categories",3,"title","click"],[1,"label","badge-priorities",3,"title","click"],[1,"label","badge-statuses",3,"title","click"],[1,"label","badge-entities",3,"title","click"],[1,"label","badge-subEntities",3,"title","click"],[1,"label","badge-doctypes",3,"title","click"],[1,"label","badge-folders",3,"title","click"]],template:function(t,e){if(1&t&&(n.Wb(0,"div",0),n.Wb(1,"form",1),n.Wb(2,"mat-form-field",2),n.Wb(3,"input",3),n.dc("focus",(function(){return e.initFilters()}))("keyup.enter",(function(t){return e.metaSearch(t)})),n.Vb(),n.Wb(4,"button",4),n.Rb(5,"mat-icon",5),n.Vb(),n.Wb(6,"mat-button-toggle",6),n.dc("click",(function(t){return t.stopPropagation()}))("change",(function(t){return e.setFilters(t,"delayed")})),n.ic(7,"translate"),n.Rb(8,"mat-icon",7),n.Vb(),n.Wb(9,"mat-autocomplete",8,9),n.dc("optionSelected",(function(t){return e.selectFilter(t)})),n.Oc(11,oI,2,0,"mat-option",10),n.Oc(12,dI,3,3,"ng-container",11),n.Vb(),n.Vb(),n.Vb(),n.Wb(13,"div",12),n.Wb(14,"mat-form-field",13),n.Rb(15,"mat-icon",14),n.Wb(16,"mat-select",15),n.dc("ngModelChange",(function(t){return e.listProperties.order=t}))("selectionChange",(function(){return e.updateFilters()})),n.Wb(17,"mat-option",16),n.Qc(18),n.ic(19,"translate"),n.Vb(),n.Oc(20,hI,3,4,"mat-option",17),n.Vb(),n.Vb(),n.Vb(),n.Wb(21,"div",18),n.Wb(22,"button",19),n.dc("click",(function(){return e.changeOrderDir()})),n.ic(23,"translate"),n.ic(24,"translate"),n.Oc(25,uI,1,0,"mat-icon",20),n.Oc(26,pI,1,0,"mat-icon",21),n.Vb(),n.Vb(),n.Vb(),n.Wb(27,"div",22),n.Oc(28,bI,3,3,"span",23),n.Oc(29,fI,5,7,"span",24),n.Oc(30,mI,4,4,"span",25),n.Oc(31,gI,4,4,"span",26),n.Oc(32,vI,4,4,"span",27),n.Oc(33,_I,4,4,"span",28),n.Oc(34,yI,4,4,"span",29),n.Oc(35,xI,4,4,"span",30),n.Oc(36,CI,4,4,"span",31),n.Vb()),2&t){const t=n.zc(10);n.Db(1),n.oc("formGroup",e.stateForm),n.Db(2),n.pc("placeholder",e.title),n.oc("matAutocomplete",t),n.Db(3),n.pc("title",n.jc(7,27,"lang.displayProcessLimitRes")),n.oc("checked",e.listProperties.delayed),n.Db(3),n.Fb("autoCompletePanelFilter"),n.Db(2),n.oc("ngIf",e.isLoading),n.Db(1),n.oc("ngIf",!e.isLoading),n.Db(4),n.oc("ngModel",e.listProperties.order),n.Db(2),n.Rc(n.jc(19,29,"lang.defaultOrder")),n.Db(2),n.oc("ngForOf",e.displayColsOrder),n.Db(2),n.Lc("opacity",""==e.listProperties.order?"0.2":"1"),n.oc("disabled",""==e.listProperties.order)("title","DESC"==e.listProperties.orderDir?n.jc(23,31,"lang.descOrder"):n.jc(24,33,"lang.ascOrder")),n.Db(3),n.oc("ngIf","DESC"==e.listProperties.orderDir),n.Db(1),n.oc("ngIf","ASC"==e.listProperties.orderDir),n.Db(2),n.oc("ngIf",e.haveFilters()),n.Db(1),n.oc("ngIf",""!==e.listProperties.search),n.Db(1),n.oc("ngForOf",e.listProperties.categories),n.Db(1),n.oc("ngForOf",e.listProperties.priorities),n.Db(1),n.oc("ngForOf",e.listProperties.statuses),n.Db(1),n.oc("ngForOf",e.listProperties.entities),n.Db(1),n.oc("ngForOf",e.listProperties.subEntities),n.Db(1),n.oc("ngForOf",e.listProperties.doctypes),n.Db(1),n.oc("ngForOf",e.listProperties.folders)}},directives:[X.K,X.v,X.m,Y.c,J.b,X.d,Ne.d,X.u,X.k,k.b,Y.i,S.a,og.a,Y.j,Ne.a,P.t,ee.a,X.x,W.p,P.s,V.c,W.o],pipes:[g.d,P.b],styles:[".filtersContent[_ngcontent-%COMP%]{display:flex}.filtersContent[_ngcontent-%COMP%] .filterTool[_ngcontent-%COMP%], .filtersContent[_ngcontent-%COMP%] .orderTool[_ngcontent-%COMP%]{flex:1}.basket-search[_ngcontent-%COMP%]{color:#666;width:500px;padding-right:10px;height:55px}.basket-search[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:30px}.basket-search[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.basket-search[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;border-radius:30px}.basket-search[_ngcontent-%COMP%] .mat-form-field-label-wrapper{font-style:italic}.basket-search[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.basket-search[_ngcontent-%COMP%] .processLimitButton[_ngcontent-%COMP%]{color:#666;position:absolute;top:-32px;left:-47px;border-radius:30px}.basket-search[_ngcontent-%COMP%] .mat-button-toggle-checked[_ngcontent-%COMP%]{background-color:#f99830!important;color:#fff}.basket-order[_ngcontent-%COMP%]{color:#fff;width:300px;padding-left:10px;padding-right:10px;height:55px}.basket-order[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{font-size:30px}.basket-order[_ngcontent-%COMP%] .mat-select-value{color:#fff}.basket-order[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.basket-order[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border:2px solid #fff;border-radius:30px;display:flex;align-items:center}.basket-order[_ngcontent-%COMP%] .mat-form-field-prefix{padding-left:15px;padding-right:10px}.basket-order[_ngcontent-%COMP%] .mat-form-field-label-wrapper{color:#fff}.basket-order[_ngcontent-%COMP%] .mat-select-arrow{color:#fff;margin-right:25px}.basket-order[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.ascDescTool[_ngcontent-%COMP%] .mat-fab[_ngcontent-%COMP%]{background:#135f7f;border:2px solid #fff;color:#fff!important;box-shadow:none}.filterOptionContent[_ngcontent-%COMP%] .mat-option-text{display:flex;overflow:inherit}.mat-option[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{background:#f99830;font-size:11px}.filterBadges[_ngcontent-%COMP%] > .badge-eraser[_ngcontent-%COMP%]{margin:5px;background:none;cursor:pointer;color:#fff;font-size:20px}.filterBadges[_ngcontent-%COMP%] > .label[_ngcontent-%COMP%]{white-space:inherit}.filterBadges[_ngcontent-%COMP%] > .badge-search[_ngcontent-%COMP%]{margin:5px;background:#666;cursor:pointer}.filterBadges[_ngcontent-%COMP%] > .badge-categories[_ngcontent-%COMP%]{margin:5px;background:#78ad32;cursor:pointer}.filterBadges[_ngcontent-%COMP%] > .badge-statuses[_ngcontent-%COMP%]{margin:5px;background:#5bc0de;cursor:pointer}.filterBadges[_ngcontent-%COMP%] > .badge-priorities[_ngcontent-%COMP%]{margin:5px;background:#f9d812;cursor:pointer}.filterBadges[_ngcontent-%COMP%] > .badge-entities[_ngcontent-%COMP%]{margin:5px;background:#7d5ba6;cursor:pointer}.filterBadges[_ngcontent-%COMP%] > .badge-subEntities[_ngcontent-%COMP%]{margin:5px;background:#9440d5;cursor:pointer}.filterBadges[_ngcontent-%COMP%] > .badge-doctypes[_ngcontent-%COMP%]{margin:5px;background:#d6716f;cursor:pointer}.filterBadges[_ngcontent-%COMP%] > .badge-folders[_ngcontent-%COMP%]{margin:5px;background:#f99830;cursor:pointer} .autoCompletePanelFilter{left:25px;min-width:400px!important;max-width:90%!important}.mat-optgroup-label[_ngcontent-%COMP%]{color:#f99830;font-size:14px;font-weight:500}"]}),t})();const DI=["snav2"],wI=["actionsListContext"],MI=["appPanelList"],kI=["tableBasketListSort"],SI=["basketHome"],II=["menuShortcut"];function PI(t,e){if(1&t&&(n.Rb(0,"img",38),n.ic(1,"async"),n.ic(2,"secureUrl")),2&t){const t=n.hc();n.oc("src",n.jc(1,1,n.jc(2,3,t.thumbnailUrl)),n.Gc)}}function VI(t,e){1&t&&n.Rb(0,"mat-spinner")}function RI(t,e){if(1&t&&(n.Wb(0,"div",39),n.Oc(1,VI,1,0,"mat-spinner",16),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.isLoadingResults)}}function jI(t,e){if(1&t&&(n.Wb(0,"small"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("- ",t.selectedRes.length," ",n.jc(2,2,"lang.selected"),"")}}const AI=function(t){return{color:t}};function WI(t,e){if(1&t&&n.Rb(0,"mat-icon",56),2&t){const t=n.hc(2).$implicit;n.Hb("",t.statusImage.charAt(0),"",t.statusImage.charAt(1)," ",t.statusImage," ",t.statusImage.charAt(0),"",t.statusImage.charAt(1),"-2x"),n.pc("title",t.statusLabel),n.oc("ngStyle",n.vc(9,AI,t.priorityColor))}}function TI(t,e){1&t&&(n.Wb(0,"span",57),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.confidential")))}function EI(t,e){if(1&t&&(n.Rb(0,"mat-icon",58),n.ic(1,"translate")),2&t){const t=n.hc(2).$implicit;n.rc("title","",n.jc(1,2,"lang.warnLockResInProgress")," : ",t.locker,"")}}function FI(t,e){if(1&t&&(n.Wb(0,"span",52),n.Oc(1,WI,1,11,"mat-icon",53),n.Oc(2,TI,3,3,"span",54),n.Oc(3,EI,2,4,"mat-icon",55),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",!0!==t.isLocked),n.Db(1),n.oc("ngIf","Y"===t.confidentiality),n.Db(1),n.oc("ngIf",!0===t.isLocked)}}function LI(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"span",60),n.Rb(2,"i",61),n.ic(3,"translate"),n.Qc(4),n.Vb(),n.Tb()),2&t){const t=n.hc(2).$implicit;n.Db(2),n.pc("title",n.jc(3,2,"lang.barcode")),n.Db(2),n.Sc(" ",t.barcode,"")}}function QI(t,e){if(1&t&&(n.Ub(0),n.Qc(1),n.Tb()),2&t){const t=n.hc(2).$implicit;n.Db(1),n.Sc(" ",t.chrono," ")}}function NI(t,e){if(1&t&&(n.Wb(0,"span",59),n.Oc(1,LI,5,4,"ng-container",16),n.ic(2,"translate"),n.ic(3,"translate"),n.Oc(4,QI,2,1,"ng-container",16),n.ic(5,"translate"),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",t.chrono==n.jc(2,2,"lang.undefined")&&t.barcode!=n.jc(3,4,"lang.undefined")),n.Db(3),n.oc("ngIf",t.chrono!=n.jc(5,6,"lang.undefined"))}}function zI(t,e){1&t&&(n.Wb(0,"div",62),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.documentOutOfPerimeter")," "))}const BI=function(t){return[t]};function UI(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"button",63),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc();return e.stopPropagation(),a.togglePanel("note",i)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",64),n.Vb(),n.Wb(4,"button",63),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc();return e.stopPropagation(),a.togglePanel("attachment",i)})),n.ic(5,"translate"),n.Rb(6,"mat-icon",65),n.Vb(),n.Wb(7,"button",63),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc();return e.stopPropagation(),a.togglePanel("diffusion",i)})),n.ic(8,"translate"),n.Rb(9,"mat-icon",66),n.Vb(),n.Wb(10,"button",67),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc();return e.stopPropagation(),a.viewDocument(i)}))("mouseenter",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc().viewThumbnail(e)}))("mouseleave",(function(){return n.Dc(t),n.hc(2).closeThumbnail()})),n.ic(11,"translate"),n.ic(12,"translate"),n.Rb(13,"mat-icon",68),n.Vb(),n.Wb(14,"button",63),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc();return e.stopPropagation(),a.goToDetail(i)})),n.ic(15,"translate"),n.Rb(16,"mat-icon",69),n.Vb(),n.Tb()}if(2&t){const t=n.hc().$implicit,e=n.hc(),i=n.zc(40);n.Db(1),n.Ib("noData",0==t.countNotes),n.pc("title",n.jc(2,18,"lang.notes")),n.Db(2),n.pc("matBadgeHidden",0==t.countNotes),n.pc("matBadge",t.countNotes),n.oc("color",i.opened&&t.checked&&"note"==e.currentMode?"primary":""),n.Db(1),n.Ib("noData",0==t.countAttachments),n.pc("title",n.jc(5,20,"lang.attachments")),n.Db(2),n.pc("matBadgeHidden",0==t.countAttachments),n.pc("matBadge",t.countAttachments),n.oc("color",i.opened&&t.checked&&"attachment"==e.currentMode?"primary":""),n.Db(1),n.pc("title",n.jc(8,22,"lang.diffusionList")),n.Db(2),n.oc("color",i.opened&&t.checked&&"diffusion"==e.currentMode?"primary":""),n.Db(1),n.pc("title",t.hasDocument?n.jc(11,24,"lang.viewResource"):n.jc(12,26,"lang.noDocument")),n.oc("disabled",!t.hasDocument),n.Db(3),n.oc("ngClass",n.vc(30,BI,t.hasDocument?"fa-eye":"fa-eye-slash")),n.Db(1),n.pc("title",n.jc(15,28,"lang.linkDetails"))}}function $I(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",72),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(3);return i.stopPropagation(),s.goToFolder(a)})),n.ic(1,"translate"),n.Rb(2,"i",73),n.Qc(3),n.Vb()}if(2&t){const t=e.$implicit;n.rc("title","",n.jc(1,3,"lang.goToFolder")," : ",t.label,""),n.Db(3),n.Sc(" ",t.label,"")}}function HI(t,e){if(1&t&&(n.Wb(0,"div",70),n.Oc(1,$I,4,5,"span",71),n.ic(2,"sortBy"),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngForOf",n.kc(2,1,t.folders,"label"))}}function GI(t,e){if(1&t){const t=n.Xb();n.Wb(0,"td",40),n.Wb(1,"div",41),n.Wb(2,"span",42),n.Wb(3,"mat-checkbox",43),n.dc("change",(function(i){n.Dc(t);const a=e.$implicit;return n.hc().toggleRes(i,a)}))("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.Vb(),n.Vb(),n.Wb(4,"button",44),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc();return i.stopPropagation(),s.unfollowMail(a)})),n.ic(5,"translate"),n.Rb(6,"mat-icon",45),n.Vb(),n.Oc(7,FI,4,3,"span",46),n.Oc(8,NI,6,8,"span",47),n.Wb(9,"span",48),n.ic(10,"translate"),n.Qc(11),n.ic(12,"shorten"),n.Vb(),n.Wb(13,"span",49),n.Oc(14,zI,3,3,"div",50),n.Oc(15,UI,17,32,"ng-container",16),n.Vb(),n.Vb(),n.Oc(16,HI,3,4,"div",51),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc();n.Ib("selected-data",t.checked),n.Db(3),n.oc("checked",t.checked),n.Db(1),n.pc("title",n.jc(5,13,"lang.untrackThisMail")),n.Db(3),n.oc("ngIf",!i.appService.getViewMode()),n.Db(1),n.oc("ngIf",!i.appService.getViewMode()),n.Db(1),n.Ib("undefined",t.subject==n.jc(10,15,"lang.undefined")),n.pc("title",t.subject),n.Db(2),n.Rc(n.lc(12,17,t.subject,150,"...")),n.Db(3),n.oc("ngIf",!t.allowed),n.Db(1),n.oc("ngIf",t.allowed),n.Db(1),n.oc("ngIf",void 0!==t.folders&&t.folders.length>0)}}function XI(t,e){1&t&&n.Rb(0,"div",77)}function qI(t,e){if(1&t&&(n.Wb(0,"div",78),n.Rb(1,"i",79),n.Rb(2,"br"),n.Qc(3),n.ic(4,"translate"),n.Wb(5,"b"),n.Qc(6),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(3),n.Sc(" ",n.jc(4,2,"lang.classifyInFolder")," : "),n.Db(3),n.Rc(t.chrono)}}function KI(t,e){if(1&t){const t=n.Xb();n.Wb(0,"tr",74),n.dc("contextmenu",(function(i){n.Dc(t);const a=e.$implicit;return n.hc().open(i,a)}))("click",(function(i){n.Dc(t);const a=e.$implicit;return n.hc().open(i,a)}))("cdkDragStarted",(function(){n.Dc(t);const i=e.$implicit;return n.hc().selectSpecificRes(i)})),n.Oc(1,XI,1,0,"div",75),n.Oc(2,qI,7,4,"div",76),n.Vb()}if(2&t){const t=e.$implicit;n.Ib("locked",1==t.isLocked),n.oc("cdkDragDisabled",!t.allowed)("cdkDragData",t)}}function YI(t,e){if(1&t&&n.Rb(0,"div",80),2&t){const t=n.hc();n.oc("matTooltip",t.currentChrono)("innerHTML",t.innerHtml,n.Ec)}}const JI=function(){return[10,25,50,100,150]},ZI=function(t){return{width:t}};let tP=(()=>{class t{constructor(t,e,i,a,s,o,r,c,l,d,h,u,p){this.translate=t,this.router=e,this.route=i,this.http=a,this.dialog=s,this.sanitizer=o,this.headerService=r,this.filtersListService=c,this.notify=l,this.overlay=d,this.viewContainerRef=h,this.appService=u,this.foldersService=p,this.loading=!1,this.docUrl="",this.injectDatasParam={resId:0,editable:!1},this.currentResource={},this.filtersChange=new n.o,this.dragInit=!0,this.displayedColumnsBasket=["resId"],this.displayedMainData=[{value:"chrono",cssClasses:["softColorData","align_centerData","chronoData"],icon:""},{value:"subject",cssClasses:["longData"],icon:""}],this.resultsLength=0,this.isLoadingResults=!0,this.listProperties={},this.currentChrono="",this.currentMode="",this.thumbnailUrl="",this.selectedRes=[],this.allResInBasket=[],this.selectedDiffusionTab=0,this.folderInfo={id:0,label:"",ownerDisplayName:"",entitiesSharing:[]},this.destroy$=new da.a,this.currentSelectedChrono="",this.subscription=this.foldersService.catchEvent().subscribe(t=>{"function"===t.type&&"refreshDao"===t.content&&this.refreshDao()})}ngOnInit(){this.loading=!1,this.isLoadingResults=!1,this.route.params.subscribe(t=>{this.dragInit=!0,this.destroy$.next(!0),this.http.get("../rest/followedResources").subscribe(t=>{this.headerService.setHeader(this.translate.instant("lang.followedMail"),"","fas fa-star")}),this.basketUrl="../rest/followedResources",this.filtersListService.filterMode=!1,this.selectedRes=[],this.listProperties=this.filtersListService.initListsProperties(this.headerService.user.id,0,null,"followed"),setTimeout(()=>{this.dragInit=!1},1e3),this.initResultList()},t=>{this.notify.handleErrors(t)})}ngOnDestroy(){this.destroy$.next(!0)}initResultList(){this.resultListDatabase=new eP(this.http,this.filtersListService),this.paginator.pageIndex=this.listProperties.page,this.paginator.pageSize=this.listProperties.pageSize,this.sort.sortChange.subscribe(()=>this.paginator.pageIndex=0),Object(gy.a)(this.sort.sortChange,this.paginator.page,this.filtersChange).pipe(Object(Zo.a)(this.destroy$),Object(Qe.a)({}),Object(ft.a)(()=>(this.isLoadingResults=!0,this.resultListDatabase.getRepoIssues(this.sort.active,this.sort.direction,this.paginator.pageIndex,this.basketUrl,this.filtersListService.getUrlFilters(),this.paginator.pageSize))),Object(l.a)(t=>(this.isLoadingResults=!1,t=this.processPostData(t),this.resultsLength=t.countResources,this.allResInBasket=t.allResources,t.resources)),Object(m.a)(t=>(this.notify.handleErrors(t),this.router.navigate(["/home"]),this.isLoadingResults=!1,Object(c.a)(!1)))).subscribe(t=>this.data=t)}goTo(t){this.filtersListService.filterMode=!1,this.docUrl==="../rest/resources/"+t.resId+"/content"&&this.sidenavRight.opened?this.sidenavRight.close():(this.docUrl="../rest/resources/"+t.resId+"/content",this.currentChrono=t.chrono,this.innerHtml=this.sanitizer.bypassSecurityTrustHtml("<iframe style='height:100%;width:100%;' src='"+this.docUrl+"' class='embed-responsive-item'></iframe>"),this.sidenavRight.open())}goToDetail(t){this.router.navigate(["/resources/"+t.resId])}goToFolder(t){this.router.navigate(["/folders/"+t.id])}togglePanel(t,e){e.checked=!0,this.toggleAllRes({checked:!1}),this.toggleRes({checked:!0},e),this.currentResource.resId===e.resId&&this.sidenavRight.opened&&this.currentMode===t?this.sidenavRight.close():(this.currentMode=t,this.currentResource=e,this.appPanelList.loadComponent(t,e),this.sidenavRight.open())}refreshBadgeNotes(t){this.currentResource.countNotes=t}refreshBadgeAttachments(t){this.currentResource.countAttachments=t}refreshDao(){this.paginator.pageIndex=this.listProperties.page,this.filtersChange.emit()}refreshDaoAfterAction(){this.sidenavRight.close(),this.refreshDao(),this.toggleAllRes({checked:!1})}viewThumbnail(t){t.hasDocument&&(this.thumbnailUrl="../rest/resources/"+t.resId+"/thumbnail",$("#viewThumbnail").show(),$("#listContent").css({overflow:"hidden"}))}closeThumbnail(){$("#viewThumbnail").hide(),$("#listContent").css({overflow:"auto"})}processPostData(t){return t.resources.forEach(t=>{Object.keys(t).forEach(e=>{"statusImage"===e&&null==t[e]?t[e]="fa-question undefined":null!=t[e]&&""!==t[e]||-1!==["closingDate","countAttachments","countNotes","display","mailTracking","hasDocument","folders","binding"].indexOf(e)||(t[e]=this.translate.instant("lang.undefined"))}),t.checked=-1!==this.selectedRes.indexOf(t.resId)}),t}toggleRes(t,e){if(t.checked)-1===this.selectedRes.indexOf(e.resId)&&(this.selectedRes.push(e.resId),e.checked=!0);else{const t=this.selectedRes.indexOf(e.resId);this.selectedRes.splice(t,1),e.checked=!1}}toggleAllRes(t){this.selectedRes=[],t.checked?(this.data.forEach(t=>{t.checked=!0}),this.selectedRes=JSON.parse(JSON.stringify(this.allResInBasket))):this.data.forEach(t=>{t.checked=!1})}selectSpecificRes(t){this.toggleAllRes({checked:!1}),this.toggleRes({checked:!0},t)}open({x:t,y:e},i){return!1===i.checked&&(i.checked=!0,this.toggleAllRes({checked:!1}),this.toggleRes({checked:!0},i)),this.actionsList.open(t,e,i),!1}listTodrag(){return this.foldersService.getDragIds()}unfollowMail(t){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.stopFollowingAlert")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.request("DELETE","../rest/resources/unfollow",{body:{resources:[t.resId]}})),Object(mt.a)(t=>{this.headerService.nbResourcesFollowed--,this.initResultList()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}viewDocument(t){this.http.get(`../rest/resources/${t.resId}/content?mode=view`,{responseType:"blob"}).pipe(Object(mt.a)(e=>{const i=new Blob([e],{type:"application/pdf"}),n=URL.createObjectURL(i),a=window.open();a.document.write(`<iframe style="width: 100%;height: 100%;margin: 0;padding: 0;" src="${n}" frameborder="0" allowfullscreen></iframe>`),a.document.title=t.chrono}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(o.c),n.Qb(o.a),n.Qb(v.b),n.Qb(q.b),n.Qb(ca.b),n.Qb(y.a),n.Qb(sI),n.Qb(D.a),n.Qb(ZD.c),n.Qb(n.T),n.Qb(w.a),n.Qb(tw.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(DI,!0),n.Kc(wI,!0),n.Kc(MI,!0),n.Kc(Kt.a,!0),n.Kc(kI,!0),n.Kc(SI,!0),n.Kc(II,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.actionsList=i.first),n.yc(i=n.ec())&&(e.appPanelList=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first),n.yc(i=n.ec())&&(e.basketHome=i.first),n.yc(i=n.ec())&&(e.menuShortcut=i.first))},decls:50,vars:56,consts:[[1,"maarch-container"],["id","viewThumbnail",2,"display","none","position","fixed","z-index","2","margin-left","1px"],["style","max-height: 100vh;",3,"src",4,"ngIf"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[2,"flex","1","overflow-x","auto","overflow-y","hidden",3,"listProperties","totalRes","selectedRes","routeDatas","title","toggleAllRes","refreshEventAfterAction","refreshEvent"],["filtersTool",""],[1,"container"],[1,"container-content"],["class","example-loading-shade",4,"ngIf"],[1,"table-head"],[1,"table-head-result"],["color","primary",2,"margin","10px","padding-right","10px",3,"checked","indeterminate","title","change"],[4,"ngIf"],[1,"table-head-tool"],[1,"paginatorResultList",3,"length","pageSizeOptions"],["paginatorResultList",""],[3,"contextMode","currentFolderInfo","totalRes","selectedRes","menuShortcut","currentResource","refreshEvent"],["actionsList",""],[2,"height","90%","overflow","auto","position","absolute","width","100%"],["cdkDropList","","id","folder-list","mat-table","","matSort","","matSortActive","resId","matSortDisableClear","","matSortDirection","asc",2,"width","100%",3,"cdkDropListConnectedTo","cdkDropListData","cdkDropListDisabled","dataSource"],["tableBasketListSort","matSort"],["matColumnDef","resId"],["mat-cell","","style","padding:0;border-top: solid 1px rgba(0, 0, 0, 0.12);",3,"selected-data",4,"matCellDef"],["mat-row","","class","rowData","style","cursor: pointer;","cdkDrag","",3,"locked","cdkDragDisabled","cdkDragData","contextmenu","click","cdkDragStarted",4,"matRowDef","matRowDefColumns"],["position","end","autoFocus","false",1,"panel-right",2,"overflow-x","hidden",3,"fixedInViewport","opened","mode","ngStyle"],["snav2",""],["style","height: 100%;overflow: hidden;",3,"matTooltip","innerHTML",4,"ngIf"],[2,"display","flex","position","sticky","top","0px","z-index","2"],["mat-icon-button","",2,"font-size","20px","color","#666",3,"click"],[1,"fa","fa-arrow-right"],[3,"refreshBadgeNotes","refreshBadgeAttachments"],["appPanelList",""],[3,"contextMode","currentFolderInfo","totalRes","selectedRes","menuShortcut","currentResource","refreshEvent","refreshPanelFolders"],["actionsListContext",""],[2,"max-height","100vh",3,"src"],[1,"example-loading-shade"],["mat-cell","",2,"padding","0","border-top","solid 1px rgba(0, 0, 0, 0.12)"],[1,"main-info"],[2,"width","50px"],["color","primary",3,"checked","change","click"],["mat-icon-button","",1,"followIcon",2,"margin-left","-25px",3,"title","click"],[1,"fas","fa-star",2,"margin-bottom","5px"],["style","cursor:pointer;","class","main-info-status",4,"ngIf"],["class","main-info-data","style","width:200px;text-align:center;cursor:pointer;",4,"ngIf"],[1,"main-info-data",2,"font-weight","bold","flex","1","cursor","pointer",3,"title"],[1,"main-info-action"],["color","warn",4,"ngIf"],["class","folder-info",4,"ngIf"],[1,"main-info-status",2,"cursor","pointer"],["color","primary",3,"title","ngStyle","class",4,"ngIf"],["class","watermark",4,"ngIf"],["style","color: red;","class","fa fa-lock fa-2x",3,"title",4,"ngIf"],["color","primary",3,"title","ngStyle"],[1,"watermark"],[1,"fa","fa-lock","fa-2x",2,"color","red",3,"title"],[1,"main-info-data",2,"width","200px","text-align","center","cursor","pointer"],[2,"color","rgba(0,0,0,0.4)","font-size","90%"],[1,"fas","fa-barcode",3,"title"],["color","warn"],["mat-icon-button","",3,"title","click"],["fontSet","fas","fontIcon","fa-comments fa-2x",3,"matBadgeHidden","matBadge","color"],["fontSet","fas","fontIcon","fa-paperclip fa-2x",3,"matBadgeHidden","matBadge","color"],["fontSet","fas","fontIcon","fa-sitemap fa-2x",3,"color"],["mat-icon-button","",3,"title","disabled","click","mouseenter","mouseleave"],[1,"fa",3,"ngClass"],["fontSet","fas","fontIcon","fa-info-circle fa-2x"],[1,"folder-info"],["class","badge badge-folder",3,"title","click",4,"ngFor","ngForOf"],[1,"badge","badge-folder",3,"title","click"],[1,"fa","fa-folder"],["mat-row","","cdkDrag","",1,"rowData",2,"cursor","pointer",3,"cdkDragDisabled","cdkDragData","contextmenu","click","cdkDragStarted"],["class","example-custom-placeholder",4,"cdkDragPlaceholder"],["class","dragPreview",4,"cdkDragPreview"],[1,"example-custom-placeholder"],[1,"dragPreview"],[1,"fas","fa-envelope-open-text","fa-2x"],[2,"height","100%","overflow","hidden",3,"matTooltip","innerHTML"]],template:function(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"mat-card",1),n.Oc(3,PI,3,5,"img",2),n.Vb(),n.Wb(4,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",6),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Wb(10,"div",7),n.Wb(11,"app-filters-tool",8,9),n.dc("toggleAllRes",(function(t){return e.toggleAllRes(t)}))("refreshEventAfterAction",(function(){return e.refreshDaoAfterAction()}))("refreshEvent",(function(){return e.refreshDao()})),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(14,"div",10),n.Wb(15,"div",11),n.Oc(16,RI,2,1,"div",12),n.Wb(17,"div",13),n.Wb(18,"div",14),n.Wb(19,"mat-checkbox",15),n.dc("change",(function(t){return e.toggleAllRes(t)})),n.ic(20,"translate"),n.Vb(),n.Qc(21),n.ic(22,"ucfirst"),n.ic(23,"translate"),n.Oc(24,jI,3,4,"small",16),n.Vb(),n.Wb(25,"div",17),n.Wb(26,"span"),n.Rb(27,"mat-paginator",18,19),n.Vb(),n.Wb(29,"span"),n.Wb(30,"app-followed-action-list",20,21),n.dc("refreshEvent",(function(){return e.refreshDaoAfterAction()})),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(32,"div",22),n.Wb(33,"table",23,24),n.Ub(35,25),n.Oc(36,GI,17,21,"td",26),n.Tb(),n.Oc(37,KI,3,4,"tr",27),n.Vb(),n.Vb(),n.Rb(38,"div",13),n.Vb(),n.Vb(),n.Vb(),n.Wb(39,"mat-sidenav",28,29),n.Oc(41,YI,1,2,"div",30),n.Wb(42,"div",31),n.Wb(43,"button",32),n.dc("click",(function(){return n.Dc(t),n.zc(40).close()})),n.Rb(44,"mat-icon",33),n.Vb(),n.Vb(),n.Wb(45,"app-panel-list",34,35),n.dc("refreshBadgeNotes",(function(t){return e.refreshBadgeNotes(t)}))("refreshBadgeAttachments",(function(t){return e.refreshBadgeAttachments(t)})),n.Vb(),n.Rb(47,"mat-divider"),n.Vb(),n.Vb(),n.Wb(48,"app-followed-action-list",36,37),n.dc("refreshEvent",(function(){return e.refreshDaoAfterAction()}))("refreshPanelFolders",(function(){return e.foldersService.getFolders()})),n.Vb()}2&t&&(n.Db(3),n.oc("ngIf",""!==e.thumbnailUrl),n.Db(2),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.oc("listProperties",e.listProperties)("totalRes",e.allResInBasket.length)("selectedRes",e.selectedRes)("routeDatas","/rest/followedResources/filters")("title",n.jc(13,45,"lang.searchTrackedMail")),n.Db(3),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.isLoadingResults),n.Db(3),n.pc("title",n.jc(20,47,"lang.selectAllResInBasket")),n.oc("checked",e.selectedRes.length==e.allResInBasket.length&&e.selectedRes.length>0)("indeterminate",e.selectedRes.length>0&&e.selectedRes.length<e.allResInBasket.length),n.Db(2),n.Tc("\xa0",e.resultsLength," ",n.jc(22,49,n.jc(23,51,"lang.records")),"\xa0"),n.Db(3),n.oc("ngIf",e.selectedRes.length>0),n.Db(3),n.oc("length",e.resultsLength)("pageSizeOptions",n.uc(53,JI)),n.Db(3),n.oc("contextMode",!1)("currentFolderInfo",e.folderInfo)("totalRes",e.allResInBasket.length)("selectedRes",e.selectedRes)("menuShortcut",e.menuShortcut)("currentResource",e.currentResource),n.Db(3),n.oc("cdkDropListConnectedTo",e.listTodrag())("cdkDropListData",e.data)("cdkDropListDisabled",e.dragInit||e.appService.getViewMode())("dataSource",e.data),n.Db(4),n.oc("matRowDefColumns",e.displayedColumnsBasket),n.Db(2),n.Ib("docView",e.innerHtml),n.oc("fixedInViewport",e.appService.getViewMode())("opened",(e.appService.getViewMode(),!1))("mode",e.appService.getViewMode()?"over":"side")("ngStyle",n.vc(54,ZI,e.appService.getViewMode()?"80%":"30%")),n.Db(2),n.oc("ngIf",e.innerHtml),n.Db(7),n.oc("contextMode",!0)("currentFolderInfo",e.folderInfo)("totalRes",e.allResInBasket.length)("selectedRes",e.selectedRes)("menuShortcut",e.menuShortcut)("currentResource",e.currentResource))},directives:[I.e,I.f,K.a,P.t,Ot,We,OI,j.a,Kt.a,eM,vt.o,lo.e,Fe.a,vt.c,vt.b,vt.n,I.d,P.w,k.b,S.a,pM,T.a,V.c,vt.a,wt.a,P.q,P.s,vt.m,lo.a,lo.c,lo.d,A.b],pipes:[g.d,Tt.u,P.b,si,Tt.p,Wt.a],styles:[".dragPreview[_ngcontent-%COMP%]{text-align:center;border-radius:5px;background:#fff;padding:10px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);color:#135f7f}.banner-opened[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:10px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;background:#1a80ab;width:100%}.banner-opened[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#fff}.banner-opened[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#1a80ab;height:1px}.banner-opened[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{display:flex;font-size:16px}.banner-opened[_ngcontent-%COMP%] .content-item[_ngcontent-%COMP%]{flex:1;padding-left:20px;padding-right:20px}.banner-opened[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .private[_ngcontent-%COMP%]{font-style:italic;display:flex;justify-content:flex-end;align-items:center}.banner-closed[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:10px;position:relative;width:100%}.banner-closed[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#fff}.followIcon[_ngcontent-%COMP%]{color:#f99830}.folder-info[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.badge-folder[_ngcontent-%COMP%]{cursor:pointer;background:#f99830;margin:5px;font-size:12px;border-radius:3px;opacity:.8;max-width:250px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),t})();class eP{constructor(t,e){this.http=t,this.filtersListService=e}getRepoIssues(t,e,i,n,a,s){return this.filtersListService.updateListsPropertiesPage(i),this.filtersListService.updateListsPropertiesPageSize(s),this.http.get(`${n}?limit=${s}&offset=${i*s}${a}`)}}function iP(t,e){if(1&t&&(n.Wb(0,"button",19),n.Qc(1),n.ic(2,"translate"),n.Rb(3,"mat-icon",20),n.Vb()),2&t){n.hc();const t=n.zc(3);n.oc("matMenuTriggerFor",t),n.Db(1),n.Rc(n.jc(2,2,"lang.actionsAlt"))}}function nP(t,e){if(1&t&&n.Rb(0,"span",21,22),2&t){const t=n.hc(),e=n.zc(3);n.Lc("left",t.contextMenuPosition.x)("top",t.contextMenuPosition.y),n.oc("matMenuTriggerFor",e)}}function aP(t,e){if(1&t&&(n.Wb(0,"div",23),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Sc(" ",t.contextMenuTitle," ")}}function sP(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",24),n.dc("menuOpened",(function(){return n.Dc(t),n.hc().getBaskets()})),n.Wb(1,"span"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()}if(2&t){n.hc();const t=n.zc(7);n.oc("matMenuTriggerFor",t),n.Db(2),n.Rc(n.jc(3,2,"lang.goToBasket"))}}function oP(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",27),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).goTo(e)})),n.Qc(1),n.Vb()}if(2&t){const t=n.hc().$implicit;n.pc("title",t.basketName),n.Db(1),n.Sc("",t.basketName," ")}}function rP(t,e){if(1&t&&(n.Ub(0),n.Oc(1,oP,2,2,"button",26),n.Tb()),2&t){const t=e.$implicit,i=n.hc().$implicit;n.Db(1),n.oc("ngIf",t.groupId===i.groupId)}}function cP(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div",25),n.Qc(2),n.Vb(),n.Oc(3,rP,2,1,"ng-container",6),n.ic(4,"sortBy"),n.Tb()),2&t){const t=e.$implicit,i=n.hc();n.Db(2),n.Rc(t.groupName),n.Db(1),n.oc("ngForOf",n.kc(4,2,i.basketList.list,"basketName"))}}function lP(t,e){1&t&&(n.Wb(0,"div",28),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.mailNotPresentInBasket")," "))}function dP(t,e){if(1&t&&(n.Wb(0,"button",29),n.ic(1,"translate"),n.Rb(2,"mat-icon",30),n.Wb(3,"span"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc(),e=n.zc(20);n.oc("matMenuTriggerFor",e)("disabled",0===t.selectedRes.length)("title",n.jc(1,4,"lang.freezeRetentionRule")),n.Db(4),n.Rc(n.jc(5,6,"lang.freezeRetentionRule"))}}function hP(t,e){if(1&t&&(n.Wb(0,"button",29),n.ic(1,"translate"),n.Rb(2,"mat-icon",31),n.Wb(3,"span"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc(),e=n.zc(32);n.oc("matMenuTriggerFor",e)("disabled",0===t.selectedRes.length)("title",n.jc(1,4,"lang.setBindingDocument")),n.Db(4),n.Rc(n.jc(5,6,"lang.setBindingDocument"))}}let uP=(()=>{class t{constructor(t,e,i,a,s,o,r,c){this.translate=t,this.http=e,this.notify=i,this.dialog=a,this.router=s,this.headerService=o,this.foldersService=r,this.privilegeService=c,this.loading=!1,this.triggerEvent=new n.o,this.contextMenuPosition={x:"0px",y:"0px"},this.contextMenuTitle="",this.currentAction={},this.basketInfo={},this.contextResId=0,this.currentLock=null,this.arrRes=[],this.actionsList=[],this.basketList={groups:[],list:[]},this.currentResource={},this.refreshEvent=new n.o,this.refreshPanelFolders=new n.o}ngOnInit(){}open(t,e,i){return this.contextMenuPosition.x=t+"px",this.contextMenuPosition.y=e+"px",this.contextMenuTitle=i.chrono,this.contextResId=i.resId,this.currentResource=i,this.getFreezeBindingValue(),this.contextMenu.openMenu(),!1}refreshList(){this.refreshEvent.emit()}refreshFolders(){this.refreshPanelFolders.emit()}refreshDaoAfterAction(){this.refreshEvent.emit()}unclassify(){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:"Voulez-vous enlever <b>"+this.selectedRes.length+"</b> document(s) du classement ?"}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.request("DELETE","../rest/folders/"+this.currentFolderInfo.id+"/resources",{body:{resources:this.selectedRes}})),Object(mt.a)(t=>{this.notify.success(this.translate.instant("lang.removedFromFolder")),this.refreshFolders(),this.foldersService.getPinnedFolders(),this.refreshDaoAfterAction()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}getBaskets(){this.http.get("../rest/resources/"+this.selectedRes+"/baskets").pipe(Object(mt.a)(t=>{this.basketList.groups=t.groupsBaskets.filter((t,e,i)=>t&&i.map(t=>t.groupId).indexOf(t.groupId)===e),this.basketList.list=t.groupsBaskets}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}goTo(t){this.contextMenuTitle!==this.translate.instant("lang.undefined")?this.router.navigate(["/basketList/users/"+this.headerService.user.id+"/groups/"+t.groupId+"/baskets/"+t.basketId],{queryParams:{chrono:'"'+this.contextMenuTitle+'"'}}):this.router.navigate(["/basketList/users/"+this.headerService.user.id+"/groups/"+t.groupId+"/baskets/"+t.basketId])}unFollow(){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.stopFollowingAlert")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.request("DELETE","../rest/resources/unfollow",{body:{resources:this.selectedRes}})),Object(mt.a)(t=>{this.notify.success(this.translate.instant("lang.removedFromFolder")),this.headerService.nbResourcesFollowed-=t.unFollowed,this.refreshDaoAfterAction()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}toggleFreezing(t){this.http.put("../rest/archival/freezeRetentionRule",{resources:this.selectedRes,freeze:t}).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant(t?"lang.retentionRuleFrozen":"lang.retentionRuleUnfrozen")),this.refreshList()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}toogleBinding(t){this.http.put("../rest/archival/binding",{resources:this.selectedRes,binding:t}).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant(t?"lang.bindingMail":!1===t?"lang.noBindingMail":"lang.bindingUndefined")),this.refreshList()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}getFreezeBindingValue(){this.isSelectedFreeze=this.currentResource.retentionFrozen,this.isSelectedBinding=this.currentResource.binding}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(o.c),n.Qb(y.a),n.Qb(tw.a),n.Qb(Dt.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-folder-action-list"]],viewQuery:function(t,e){var i;1&t&&n.Xc(ne.d,!0),2&t&&n.yc(i=n.ec())&&(e.contextMenu=i.first)},inputs:{selectedRes:"selectedRes",totalRes:"totalRes",contextMode:"contextMode",currentFolderInfo:"currentFolderInfo",currentResource:"currentResource"},outputs:{triggerEvent:"triggerEvent",refreshEvent:"refreshEvent",refreshPanelFolders:"refreshPanelFolders"},decls:55,vars:73,consts:[["mat-stroked-button","",3,"matMenuTriggerFor",4,"ngIf"],["style","position: fixed;",3,"matMenuTriggerFor","left","top",4,"ngIf"],["menu","matMenu"],["style","text-align: center;font-size: 10px;color: white;background: #135F7F;padding: 5px;font-weight: bold;",4,"ngIf"],["mat-menu-item","",3,"matMenuTriggerFor","menuOpened",4,"ngIf"],["baskets","matMenu"],[4,"ngFor","ngForOf"],["class","noAvailableBasket",4,"ngIf"],["mat-menu-item","",1,"followAction",3,"disabled","click"],[1,"far","fa-star","fa-2x"],["mat-menu-item","",3,"matMenuTriggerFor","disabled","title",4,"ngIf"],["ng-switch","getValue(var)"],["freezeRentalRule","matMenu"],["mat-menu-item","",3,"title","click"],["bindingRentalRule","matMenu"],["mat-menu-item","",3,"title","innerHTML","click"],["mat-menu-item","",1,"folderAction",3,"disabled","click"],[1,"fa","fa-folder-minus","fa-2x"],[3,"resIds","refreshList","refreshFolders"],["mat-stroked-button","",3,"matMenuTriggerFor"],["matSuffix","",1,"fa","fa-caret-down"],[2,"position","fixed",3,"matMenuTriggerFor"],["menu2",""],[2,"text-align","center","font-size","10px","color","white","background","#135F7F","padding","5px","font-weight","bold"],["mat-menu-item","",3,"matMenuTriggerFor","menuOpened"],[1,"basketGroupName"],["mat-menu-item","","class","labelBasket",3,"title","click",4,"ngIf"],["mat-menu-item","",1,"labelBasket",3,"title","click"],[1,"noAvailableBasket"],["mat-menu-item","",3,"matMenuTriggerFor","disabled","title"],[1,"freezeIcon","fas","fa-snowflake",2,"font-size","20px"],[1,"bindidngIcon","fas","fa-exclamation",2,"font-size","20px"]],template:function(t,e){1&t&&(n.Oc(0,iP,4,4,"button",0),n.Oc(1,nP,2,5,"span",1),n.Wb(2,"mat-menu",null,2),n.Oc(4,aP,2,1,"div",3),n.Oc(5,sP,4,4,"button",4),n.Wb(6,"mat-menu",null,5),n.Oc(8,cP,5,5,"ng-container",6),n.ic(9,"sortBy"),n.Oc(10,lP,3,3,"div",7),n.Vb(),n.Rb(11,"mat-divider"),n.Wb(12,"button",8),n.dc("click",(function(){return e.unFollow()})),n.Rb(13,"mat-icon",9),n.Wb(14,"span"),n.Qc(15),n.ic(16,"translate"),n.Vb(),n.Vb(),n.Rb(17,"mat-divider"),n.Oc(18,dP,6,8,"button",10),n.Wb(19,"mat-menu",11,12),n.Wb(21,"button",13),n.dc("click",(function(){return e.toggleFreezing(!0)})),n.ic(22,"translate"),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Rb(25,"mat-divider"),n.Wb(26,"button",13),n.dc("click",(function(){return e.toggleFreezing(!1)})),n.ic(27,"translate"),n.Qc(28),n.ic(29,"translate"),n.Vb(),n.Vb(),n.Oc(30,hP,6,8,"button",10),n.Wb(31,"mat-menu",null,14),n.Wb(33,"buton",15),n.dc("click",(function(){return e.toogleBinding(!0)})),n.ic(34,"stripTags"),n.ic(35,"translate"),n.ic(36,"translate"),n.Vb(),n.Rb(37,"mat-divider"),n.Wb(38,"buton",15),n.dc("click",(function(){return e.toogleBinding(!1)})),n.ic(39,"stripTags"),n.ic(40,"translate"),n.ic(41,"translate"),n.Vb(),n.Rb(42,"mat-divider"),n.Wb(43,"buton",13),n.dc("click",(function(){return e.toogleBinding(null)})),n.ic(44,"translate"),n.Qc(45),n.ic(46,"translate"),n.Vb(),n.Rb(47,"mat-divider"),n.Vb(),n.Rb(48,"mat-divider"),n.Wb(49,"button",16),n.dc("click",(function(){return e.unclassify()})),n.Rb(50,"mat-icon",17),n.Wb(51,"span"),n.Qc(52),n.ic(53,"translate"),n.Vb(),n.Vb(),n.Wb(54,"folder-menu",18),n.dc("refreshList",(function(){return e.refreshDaoAfterAction()}))("refreshFolders",(function(){return e.refreshFolders()})),n.Vb(),n.Vb()),2&t&&(n.oc("ngIf",!e.contextMode),n.Db(1),n.oc("ngIf",e.contextMode),n.Db(1),n.Fb("actionListMenu"),n.Db(2),n.oc("ngIf",e.contextMode&&1==e.selectedRes.length),n.Db(1),n.oc("ngIf",1==e.selectedRes.length),n.Db(1),n.Fb("folderListMenu"),n.Db(2),n.oc("ngForOf",n.kc(9,42,e.basketList.groups,"groupName")),n.Db(2),n.oc("ngIf",0==e.basketList.groups.length),n.Db(2),n.oc("disabled",0===e.selectedRes.length),n.Db(3),n.Rc(n.jc(16,45,"lang.untrackThisMail")),n.Db(3),n.oc("ngIf",e.privilegeService.hasCurrentUserPrivilege("freeze_retention_rule")),n.Db(3),n.Fb(!0===e.isSelectedFreeze?"isSelectedMenu":"notSelectedMenu"),n.oc("title",n.jc(22,47,"lang.freezeTheCurrentUsefulLife")),n.Db(2),n.Sc(" ",n.jc(24,49,"lang.freezeTheCurrentUsefulLife")," "),n.Db(3),n.Fb(!1===e.isSelectedFreeze?"isSelectedMenu":"notSelectedMenu"),n.oc("title",n.jc(27,51,"lang.unfreezeTheCurrentUsefulLife")),n.Db(2),n.Sc(" ",n.jc(29,53,"lang.unfreezeTheCurrentUsefulLife")," "),n.Db(2),n.oc("ngIf",e.privilegeService.hasCurrentUserPrivilege("set_binding_document")),n.Db(3),n.Fb(!0===e.isSelectedBinding?"isSelectedMenu":"notSelectedMenu"),n.oc("title",n.jc(34,55,n.jc(35,57,"lang.bindingMail")))("innerHTML",n.jc(36,59,"lang.bindingMail"),n.Ec),n.Db(5),n.Fb(!1===e.isSelectedBinding?"isSelectedMenu":"notSelectedMenu"),n.oc("title",n.jc(39,61,n.jc(40,63,"lang.noBindingMail")))("innerHTML",n.jc(41,65,"lang.noBindingMail"),n.Ec),n.Db(5),n.Fb(null===e.isSelectedBinding?"isSelectedMenu":"notSelectedMenu"),n.oc("title",n.jc(44,67,"lang.doNotDefine")),n.Db(2),n.Sc(" ",n.jc(46,69,"lang.doNotDefine"),""),n.Db(4),n.oc("disabled",0===e.selectedRes.length),n.Db(3),n.Rc(n.jc(53,71,"lang.removeFromFolder")),n.Db(2),n.oc("resIds",e.selectedRes))},directives:[P.t,ne.e,P.s,T.a,ne.b,S.a,Uw,k.b,ne.d,Y.j],pipes:[Wt.a,g.d,Tt.r],styles:[".mat-icon[_ngcontent-%COMP%]{height:auto}.mat-stroked-button[_ngcontent-%COMP%]{border-radius:20px;border-color:#135f7f;color:#135f7f} .actionListMenu .mat-menu-content{padding-top:0;padding-bottom:0}.folderAction[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%], .followAction[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{font-size:20px;color:#8e3e52}.basketGroupName[_ngcontent-%COMP%]{color:#135f7f;padding-left:10px;padding-right:10px}.labelBasket[_ngcontent-%COMP%]{color:#666;font-size:12px;font-weight:700}.noAvailableBasket[_ngcontent-%COMP%]{text-align:center;font-size:12px;opacity:.5;font-style:italic;padding:22px}.freezeIcon[_ngcontent-%COMP%]{color:#135f7f}.bindidngIcon[_ngcontent-%COMP%]{color:#135f7f;margin-left:5px}.isSelectedMenu[_ngcontent-%COMP%]{background:#f99830}.notSelectedMenu[_ngcontent-%COMP%]{background:#fff}"]}),t})();const pP=["snav2"],bP=["actionsListContext"],fP=["appPanelList"],mP=["tableBasketListSort"],gP=["basketHome"];function vP(t,e){if(1&t&&(n.Rb(0,"img",42),n.ic(1,"async"),n.ic(2,"secureUrl")),2&t){const t=n.hc();n.oc("src",n.jc(1,1,n.jc(2,3,t.thumbnailUrl)),n.Gc)}}function _P(t,e){1&t&&n.Rb(0,"div",43)}function yP(t,e){1&t&&(n.Wb(0,"div",48),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.privateFolder")," "))}function xP(t,e){if(1&t&&(n.Wb(0,"div"),n.Wb(1,"b",51),n.Qc(2),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t)}}function CP(t,e){if(1&t&&(n.Wb(0,"div",45),n.Qc(1),n.ic(2,"translate"),n.Rb(3,"br"),n.Wb(4,"div",49),n.Oc(5,xP,3,1,"div",50),n.ic(6,"sortBy"),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Sc(" ",n.jc(2,2,"lang.visibleBy")," :"),n.Db(4),n.oc("ngForOf",n.jc(6,4,t.folderInfo.entitiesSharing))}}function OP(t,e){if(1&t&&(n.Wb(0,"div",44),n.Wb(1,"div",45),n.Qc(2),n.ic(3,"translate"),n.Rb(4,"br"),n.Wb(5,"b"),n.Qc(6),n.Vb(),n.Vb(),n.Oc(7,yP,3,3,"div",46),n.Oc(8,CP,7,6,"div",47),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Sc(" ",n.jc(3,4,"lang.owner")," :"),n.Db(4),n.Rc(t.folderInfo.ownerDisplayName),n.Db(1),n.oc("ngIf",0===t.folderInfo.entitiesSharing.length),n.Db(1),n.oc("ngIf",t.folderInfo.entitiesSharing.length>0)}}function DP(t,e){1&t&&n.Rb(0,"mat-spinner")}function wP(t,e){if(1&t&&(n.Wb(0,"div",52),n.Oc(1,DP,1,0,"mat-spinner",21),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.isLoadingResults)}}function MP(t,e){if(1&t&&(n.Wb(0,"small"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("- ",t.selectedRes.length," ",n.jc(2,2,"lang.selected"),"")}}const kP=function(t){return{color:t}};function SP(t,e){if(1&t&&n.Rb(0,"mat-icon",69),2&t){const t=n.hc(2).$implicit;n.Hb("",t.statusImage.charAt(0),"",t.statusImage.charAt(1)," ",t.statusImage," ",t.statusImage.charAt(0),"",t.statusImage.charAt(1),"-2x"),n.pc("title",t.statusLabel),n.oc("ngStyle",n.vc(9,kP,t.priorityColor))}}function IP(t,e){1&t&&(n.Wb(0,"span",70),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.confidential")))}function PP(t,e){if(1&t&&(n.Rb(0,"mat-icon",71),n.ic(1,"translate")),2&t){const t=n.hc(2).$implicit;n.rc("title","",n.jc(1,2,"lang.warnLockResInProgress")," : ",t.locker,"")}}function VP(t,e){if(1&t&&(n.Wb(0,"span",65),n.Oc(1,SP,1,11,"mat-icon",66),n.Oc(2,IP,3,3,"span",67),n.Oc(3,PP,2,4,"mat-icon",68),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",!0!==t.isLocked),n.Db(1),n.oc("ngIf","Y"===t.confidentiality),n.Db(1),n.oc("ngIf",!0===t.isLocked)}}function RP(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"span",73),n.Rb(2,"i",74),n.ic(3,"translate"),n.Qc(4),n.Vb(),n.Tb()),2&t){const t=n.hc(2).$implicit;n.Db(2),n.pc("title",n.jc(3,2,"lang.barcode")),n.Db(2),n.Sc(" ",t.barcode,"")}}function jP(t,e){if(1&t&&(n.Ub(0),n.Qc(1),n.Tb()),2&t){const t=n.hc(2).$implicit;n.Db(1),n.Sc(" ",t.chrono," ")}}function AP(t,e){if(1&t&&(n.Wb(0,"span",72),n.Oc(1,RP,5,4,"ng-container",21),n.ic(2,"translate"),n.ic(3,"translate"),n.Oc(4,jP,2,1,"ng-container",21),n.ic(5,"translate"),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",t.chrono==n.jc(2,2,"lang.undefined")&&t.barcode!=n.jc(3,4,"lang.undefined")),n.Db(3),n.oc("ngIf",t.chrono!=n.jc(5,6,"lang.undefined"))}}function WP(t,e){1&t&&(n.Wb(0,"div",75),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.documentOutOfPerimeter")," "))}const TP=function(t){return[t]};function EP(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"button",76),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc();return e.stopPropagation(),a.togglePanel("note",i)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",77),n.Vb(),n.Wb(4,"button",76),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc();return e.stopPropagation(),a.togglePanel("attachment",i)})),n.ic(5,"translate"),n.Rb(6,"mat-icon",78),n.Vb(),n.Wb(7,"button",76),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc();return e.stopPropagation(),a.togglePanel("diffusion",i)})),n.ic(8,"translate"),n.Rb(9,"mat-icon",79),n.Vb(),n.Wb(10,"button",80),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc();return e.stopPropagation(),a.viewDocument(i)}))("mouseenter",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc().viewThumbnail(e)}))("mouseleave",(function(){return n.Dc(t),n.hc(2).closeThumbnail()})),n.ic(11,"translate"),n.ic(12,"translate"),n.Rb(13,"mat-icon",81),n.Vb(),n.Wb(14,"button",76),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc();return e.stopPropagation(),a.goToDetail(i)})),n.ic(15,"translate"),n.Rb(16,"mat-icon",82),n.Vb(),n.Tb()}if(2&t){const t=n.hc().$implicit,e=n.hc(),i=n.zc(48);n.Db(1),n.Ib("noData",0==t.countNotes),n.pc("title",n.jc(2,18,"lang.notes")),n.Db(2),n.pc("matBadgeHidden",0==t.countNotes),n.pc("matBadge",t.countNotes),n.oc("color",i.opened&&t.checked&&"note"==e.currentMode?"primary":""),n.Db(1),n.Ib("noData",0==t.countAttachments),n.pc("title",n.jc(5,20,"lang.attachments")),n.Db(2),n.pc("matBadgeHidden",0==t.countAttachments),n.pc("matBadge",t.countAttachments),n.oc("color",i.opened&&t.checked&&"attachment"==e.currentMode?"primary":""),n.Db(1),n.pc("title",n.jc(8,22,"lang.diffusionList")),n.Db(2),n.oc("color",i.opened&&t.checked&&"diffusion"==e.currentMode?"primary":""),n.Db(1),n.pc("title",t.hasDocument?n.jc(11,24,"lang.viewResource"):n.jc(12,26,"lang.noDocument")),n.oc("disabled",!t.hasDocument),n.Db(3),n.oc("ngClass",n.vc(30,TP,t.hasDocument?"fa-eye":"fa-eye-slash")),n.Db(1),n.pc("title",n.jc(15,28,"lang.linkDetails"))}}function FP(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",85),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(3);return i.stopPropagation(),s.goToFolder(a)})),n.ic(1,"translate"),n.Rb(2,"i",86),n.Qc(3),n.Vb()}if(2&t){const t=e.$implicit;n.rc("title","",n.jc(1,3,"lang.goToFolder")," : ",t.label,""),n.Db(3),n.Sc(" ",t.label,"")}}function LP(t,e){if(1&t&&(n.Wb(0,"div",83),n.Oc(1,FP,4,5,"span",84),n.ic(2,"sortBy"),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngForOf",n.kc(2,1,t.folders,"label"))}}function QP(t,e){if(1&t){const t=n.Xb();n.Wb(0,"td",53),n.Wb(1,"div",54),n.Wb(2,"span",55),n.Wb(3,"mat-checkbox",56),n.dc("change",(function(i){n.Dc(t);const a=e.$implicit;return n.hc().toggleRes(i,a)}))("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.Vb(),n.Vb(),n.Wb(4,"button",57),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc();return i.stopPropagation(),s.toggleMailTracking(a)})),n.ic(5,"translate"),n.ic(6,"translate"),n.Rb(7,"mat-icon",58),n.Vb(),n.Oc(8,VP,4,3,"span",59),n.Oc(9,AP,6,8,"span",60),n.Wb(10,"span",61),n.ic(11,"translate"),n.Qc(12),n.ic(13,"shorten"),n.Vb(),n.Wb(14,"span",62),n.Oc(15,WP,3,3,"div",63),n.Oc(16,EP,17,32,"ng-container",21),n.Vb(),n.Vb(),n.Oc(17,LP,3,4,"div",64),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc();n.Ib("selected-data",t.checked),n.Db(3),n.oc("checked",t.checked),n.Db(1),n.oc("title",!0===t.mailTracking?n.jc(5,14,"lang.untrackThisMail"):n.jc(6,16,"lang.trackThisMail")),n.Db(3),n.oc("ngClass",n.vc(24,TP,!0===t.mailTracking?"fas fa-star":"far fa-star")),n.Db(1),n.oc("ngIf",!i.appService.getViewMode()),n.Db(1),n.oc("ngIf",!i.appService.getViewMode()),n.Db(1),n.Ib("undefined",t.subject==n.jc(11,18,"lang.undefined")),n.pc("title",t.subject),n.Db(2),n.Rc(n.lc(13,20,t.subject,150,"...")),n.Db(3),n.oc("ngIf",!t.allowed),n.Db(1),n.oc("ngIf",t.allowed),n.Db(1),n.oc("ngIf",void 0!==t.folders&&t.folders.length>0)}}function NP(t,e){1&t&&n.Rb(0,"div",90)}function zP(t,e){if(1&t&&(n.Wb(0,"div",91),n.Rb(1,"i",92),n.Rb(2,"br"),n.Qc(3),n.ic(4,"translate"),n.Wb(5,"b"),n.Qc(6),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(3),n.Sc(" ",n.jc(4,2,"lang.classifyInFolder")," : "),n.Db(3),n.Rc(t.chrono)}}function BP(t,e){if(1&t){const t=n.Xb();n.Wb(0,"tr",87),n.dc("contextmenu",(function(i){n.Dc(t);const a=e.$implicit;return n.hc().open(i,a)}))("click",(function(i){n.Dc(t);const a=e.$implicit;return n.hc().open(i,a)}))("cdkDragStarted",(function(){n.Dc(t);const i=e.$implicit;return n.hc().selectSpecificRes(i)})),n.Oc(1,NP,1,0,"div",88),n.Oc(2,zP,7,4,"div",89),n.Vb()}if(2&t){const t=e.$implicit;n.Ib("locked",1==t.isLocked),n.oc("cdkDragDisabled",!t.allowed)("cdkDragData",t)}}function UP(t,e){if(1&t&&n.Rb(0,"div",93),2&t){const t=n.hc();n.oc("matTooltip",t.currentChrono)("innerHTML",t.innerHtml,n.Ec)}}const $P=function(){return[10,25,50,100,150]},HP=function(t){return{width:t}};let GP=(()=>{class t{constructor(t,e,i,a,s,o,r,c,l,d,h,u,p,b){this.translate=t,this.router=e,this.route=i,this.http=a,this.dialog=s,this.sanitizer=o,this.headerService=r,this.filtersListService=c,this.notify=l,this.overlay=d,this.viewContainerRef=h,this.appService=u,this.foldersService=p,this.functions=b,this.loading=!1,this.docUrl="",this.injectDatasParam={resId:0,editable:!1},this.currentResource={},this.filtersChange=new n.o,this.dragInit=!0,this.displayedColumnsBasket=["resId"],this.displayedMainData=[{value:"chrono",cssClasses:["softColorData","align_centerData","chronoData"],icon:""},{value:"subject",cssClasses:["longData"],icon:""}],this.resultsLength=0,this.isLoadingResults=!0,this.listProperties={},this.currentChrono="",this.currentMode="",this.thumbnailUrl="",this.selectedRes=[],this.allResInBasket=[],this.selectedDiffusionTab=0,this.folderInfo={id:0,label:"",ownerDisplayName:"",entitiesSharing:[]},this.folderInfoOpened=!1,this.destroy$=new da.a,this.currentSelectedChrono="",this.subscription=this.foldersService.catchEvent().subscribe(t=>{"refreshFolderInformations"===t.type&&t.content.id==this.folderInfo.id&&this.refreshFolderInformations(),"function"===t.type&&"refreshDao"===t.content&&this.refreshDao()})}ngOnInit(){this.loading=!1,this.isLoadingResults=!1,this.route.params.subscribe(t=>{this.folderInfoOpened=!1,this.dragInit=!0,this.destroy$.next(!0),this.http.get("../rest/folders/"+t.folderId).subscribe(e=>{const i=[{keyword:"ALL_ENTITIES",text:this.translate.instant("lang.allEntities")}];this.folderInfo={id:t.folderId,label:e.folder.label,ownerDisplayName:e.folder.ownerDisplayName,entitiesSharing:e.folder.sharing.entities.map(t=>this.functions.empty(t.label)?i.filter(e=>e.keyword===t.keyword)[0].text:t.label)},this.foldersService.setFolder(this.folderInfo),this.headerService.setHeader(this.folderInfo.label,"","fa fa-folder-open")}),this.basketUrl="../rest/folders/"+t.folderId+"/resources",this.filtersListService.filterMode=!1,this.selectedRes=[],this.sidenavRight.close(),this.listProperties=this.filtersListService.initListsProperties(this.headerService.user.id,0,t.folderId,"folder"),setTimeout(()=>{this.dragInit=!1},1e3),this.initResultList()},t=>{this.notify.handleErrors(t)})}ngOnDestroy(){this.destroy$.next(!0),this.subscription.unsubscribe()}initResultList(){this.resultListDatabase=new XP(this.http,this.filtersListService),this.paginator.pageIndex=this.listProperties.page,this.paginator.pageSize=this.listProperties.pageSize,this.sort.sortChange.subscribe(()=>this.paginator.pageIndex=0),Object(gy.a)(this.sort.sortChange,this.paginator.page,this.filtersChange).pipe(Object(Zo.a)(this.destroy$),Object(Qe.a)({}),Object(ft.a)(()=>(this.isLoadingResults=!0,this.resultListDatabase.getRepoIssues(this.sort.active,this.sort.direction,this.paginator.pageIndex,this.basketUrl,this.filtersListService.getUrlFilters(),this.paginator.pageSize))),Object(l.a)(t=>(this.isLoadingResults=!1,t=this.processPostData(t),this.resultsLength=t.countResources,this.allResInBasket=t.allResources,t.resources)),Object(m.a)(t=>(this.notify.handleErrors(t),this.router.navigate(["/home"]),this.isLoadingResults=!1,Object(c.a)(!1)))).subscribe(t=>this.data=t)}goTo(t){this.filtersListService.filterMode=!1,this.docUrl==="../rest/resources/"+t.resId+"/content"&&this.sidenavRight.opened?this.sidenavRight.close():(this.docUrl="../rest/resources/"+t.resId+"/content",this.currentChrono=t.chrono,this.innerHtml=this.sanitizer.bypassSecurityTrustHtml("<iframe style='height:100%;width:100%;' src='"+this.docUrl+"' class='embed-responsive-item'></iframe>"),this.sidenavRight.open())}goToDetail(t){this.router.navigate(["/resources/"+t.resId])}goToFolder(t){this.router.navigate(["/folders/"+t.id])}togglePanel(t,e){e.checked=!0,this.toggleAllRes({checked:!1}),this.toggleRes({checked:!0},e),this.currentResource.resId===e.resId&&this.sidenavRight.opened&&this.currentMode===t?this.sidenavRight.close():(this.currentMode=t,this.currentResource=e,this.appPanelList.loadComponent(t,e),this.sidenavRight.open())}refreshBadgeNotes(t){this.currentResource.countNotes=t}refreshFolderInformations(){this.http.get("../rest/folders/"+this.folderInfo.id).subscribe(t=>{const e=[{keyword:"ALL_ENTITIES",text:this.translate.instant("lang.allEntities")}];this.folderInfo={id:t.folder.id,label:t.folder.label,ownerDisplayName:t.folder.ownerDisplayName,entitiesSharing:t.folder.sharing.entities.map(t=>this.functions.empty(t.label)?e.filter(e=>e.keyword===t.keyword)[0].text:t.label)},this.headerService.setHeader(this.folderInfo.label,"","fa fa-folder-open")})}refreshBadgeAttachments(t){this.currentResource.countAttachments=t}refreshDao(){this.paginator.pageIndex=this.listProperties.page,this.filtersChange.emit()}refreshDaoAfterAction(){this.sidenavRight.close(),this.refreshDao(),this.toggleAllRes({checked:!1})}viewThumbnail(t){t.hasDocument&&(this.thumbnailUrl="../rest/resources/"+t.resId+"/thumbnail",$("#viewThumbnail").show(),$("#listContent").css({overflow:"hidden"}))}closeThumbnail(){$("#viewThumbnail").hide(),$("#listContent").css({overflow:"auto"})}processPostData(t){return t.resources.forEach(t=>{Object.keys(t).forEach(e=>{"statusImage"===e&&null==t[e]?t[e]="fa-question undefined":null!=t[e]&&""!==t[e]||-1!==["closingDate","countAttachments","countNotes","display","mailTracking","hasDocument","binding"].indexOf(e)||(t[e]=this.translate.instant("lang.undefined"))}),t.checked=-1!==this.selectedRes.indexOf(t.resId)}),t}toggleRes(t,e){if(t.checked)-1===this.selectedRes.indexOf(e.resId)&&(this.selectedRes.push(e.resId),e.checked=!0);else{const t=this.selectedRes.indexOf(e.resId);this.selectedRes.splice(t,1),e.checked=!1}}toggleAllRes(t){this.selectedRes=[],t.checked?(this.data.forEach(t=>{t.checked=!0}),this.selectedRes=JSON.parse(JSON.stringify(this.allResInBasket))):this.data.forEach(t=>{t.checked=!1})}selectSpecificRes(t){this.toggleAllRes({checked:!1}),this.toggleRes({checked:!0},t)}open({x:t,y:e},i){return!1===i.checked&&(i.checked=!0,this.toggleAllRes({checked:!1}),this.toggleRes({checked:!0},i)),this.actionsList.open(t,e,i),!1}listTodrag(){return this.foldersService.getDragIds()}toggleMailTracking(t){t.mailTracking?this.http.request("DELETE","../rest/resources/unfollow",{body:{resources:[t.resId]}}).pipe(Object(mt.a)(()=>{this.headerService.nbResourcesFollowed--,t.mailTracking=!t.mailTracking}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe():this.http.post("../rest/resources/follow",{resources:[t.resId]}).pipe(Object(mt.a)(()=>{this.headerService.nbResourcesFollowed++,t.mailTracking=!t.mailTracking}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}viewDocument(t){this.http.get(`../rest/resources/${t.resId}/content?mode=view`,{responseType:"blob"}).pipe(Object(mt.a)(e=>{const i=new Blob([e],{type:"application/pdf"}),n=URL.createObjectURL(i),a=window.open();a.document.write(`<iframe style="width: 100%;height: 100%;margin: 0;padding: 0;" src="${n}" frameborder="0" allowfullscreen></iframe>`),a.document.title=t.chrono}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(o.c),n.Qb(o.a),n.Qb(v.b),n.Qb(q.b),n.Qb(ca.b),n.Qb(y.a),n.Qb(sI),n.Qb(D.a),n.Qb(ZD.c),n.Qb(n.T),n.Qb(w.a),n.Qb(tw.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(pP,!0),n.Kc(bP,!0),n.Kc(fP,!0),n.Kc(Kt.a,!0),n.Kc(mP,!0),n.Kc(gP,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.actionsList=i.first),n.yc(i=n.ec())&&(e.appPanelList=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first),n.yc(i=n.ec())&&(e.basketHome=i.first))},decls:58,vars:69,consts:[[1,"maarch-container"],["id","viewThumbnail",2,"display","none","position","fixed","z-index","2","margin-left","1px"],["style","max-height: 100vh;",3,"src",4,"ngIf"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content",2,"padding-bottom","20px"],[1,"title",2,"cursor","pointer",3,"click"],[1,"far",2,"cursor","pointer","margin-left","10px"],["class","title-divider",4,"ngIf"],["class","content",4,"ngIf"],[1,"bg-head-content"],[2,"flex","1","overflow-x","auto","overflow-y","hidden",3,"listProperties","totalRes","selectedRes","routeDatas","title","toggleAllRes","refreshEventAfterAction","refreshEvent"],["filtersTool",""],[1,"container"],[1,"container-content"],["class","example-loading-shade",4,"ngIf"],[1,"table-head"],[1,"table-head-result"],["color","primary",2,"margin","10px","padding-right","10px",3,"checked","indeterminate","title","change"],[4,"ngIf"],[1,"table-head-tool"],[1,"paginatorResultList",3,"length","pageSizeOptions"],["paginatorResultList",""],[3,"contextMode","currentFolderInfo","totalRes","selectedRes","currentResource","refreshEvent","refreshPanelFolders"],["actionsList",""],[2,"height","90%","overflow","auto","position","absolute","width","100%"],["cdkDropList","","id","folder-list","mat-table","","matSort","","matSortActive","resId","matSortDisableClear","","matSortDirection","asc",2,"width","100%",3,"cdkDropListConnectedTo","cdkDropListData","cdkDropListDisabled","dataSource"],["tableBasketListSort","matSort"],["matColumnDef","resId"],["mat-cell","","style","padding:0;border-top: solid 1px rgba(0, 0, 0, 0.12);",3,"selected-data",4,"matCellDef"],["mat-row","","class","rowData","style","cursor: pointer;","cdkDrag","",3,"locked","cdkDragDisabled","cdkDragData","contextmenu","click","cdkDragStarted",4,"matRowDef","matRowDefColumns"],["position","end","autoFocus","false",1,"panel-right",2,"overflow-x","hidden",3,"fixedInViewport","opened","mode","ngStyle"],["snav2",""],["style","height: 100%;overflow: hidden;",3,"matTooltip","innerHTML",4,"ngIf"],[2,"display","flex","position","sticky","top","0px","z-index","2"],["mat-icon-button","",2,"font-size","20px","color","#666",3,"click"],[1,"fa","fa-arrow-right"],[3,"refreshBadgeNotes","refreshBadgeAttachments"],["appPanelList",""],["actionsListContext",""],[2,"max-height","100vh",3,"src"],[1,"title-divider"],[1,"content"],[1,"content-item"],["class","content-item private",4,"ngIf"],["class","content-item",4,"ngIf"],[1,"content-item","private"],[2,"max-height","100px","overflow","auto"],[4,"ngFor","ngForOf"],["color","secondary"],[1,"example-loading-shade"],["mat-cell","",2,"padding","0","border-top","solid 1px rgba(0, 0, 0, 0.12)"],[1,"main-info"],[2,"width","50px"],["color","primary",3,"checked","change","click"],["mat-icon-button","",1,"followIcon",2,"margin-left","-25px",3,"title","click"],[2,"margin-bottom","5px",3,"ngClass"],["style","cursor:pointer;","class","main-info-status",4,"ngIf"],["class","main-info-data","style","width:200px;text-align:center;cursor:pointer;",4,"ngIf"],[1,"main-info-data",2,"font-weight","bold","flex","1","cursor","pointer",3,"title"],[1,"main-info-action"],["color","warn",4,"ngIf"],["class","folder-info",4,"ngIf"],[1,"main-info-status",2,"cursor","pointer"],["color","primary",3,"title","ngStyle","class",4,"ngIf"],["class","watermark",4,"ngIf"],["style","color: red;","class","fa fa-lock fa-2x",3,"title",4,"ngIf"],["color","primary",3,"title","ngStyle"],[1,"watermark"],[1,"fa","fa-lock","fa-2x",2,"color","red",3,"title"],[1,"main-info-data",2,"width","200px","text-align","center","cursor","pointer"],[2,"color","rgba(0,0,0,0.4)","font-size","90%"],[1,"fas","fa-barcode",3,"title"],["color","warn"],["mat-icon-button","",3,"title","click"],["fontSet","fas","fontIcon","fa-comments fa-2x",3,"matBadgeHidden","matBadge","color"],["fontSet","fas","fontIcon","fa-paperclip fa-2x",3,"matBadgeHidden","matBadge","color"],["fontSet","fas","fontIcon","fa-sitemap fa-2x",3,"color"],["mat-icon-button","",3,"title","disabled","click","mouseenter","mouseleave"],[1,"fa",3,"ngClass"],["fontSet","fas","fontIcon","fa-info-circle fa-2x"],[1,"folder-info"],["class","badge badge-folder",3,"title","click",4,"ngFor","ngForOf"],[1,"badge","badge-folder",3,"title","click"],[1,"fa","fa-folder"],["mat-row","","cdkDrag","",1,"rowData",2,"cursor","pointer",3,"cdkDragDisabled","cdkDragData","contextmenu","click","cdkDragStarted"],["class","example-custom-placeholder",4,"cdkDragPlaceholder"],["class","dragPreview",4,"cdkDragPreview"],[1,"example-custom-placeholder"],[1,"dragPreview"],[1,"fas","fa-envelope-open-text","fa-2x"],[2,"height","100%","overflow","hidden",3,"matTooltip","innerHTML"]],template:function(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"mat-card",1),n.Oc(3,vP,3,5,"img",2),n.Vb(),n.Wb(4,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",6),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Wb(10,"div",7),n.Wb(11,"div"),n.Wb(12,"div",8),n.dc("click",(function(){return e.folderInfoOpened=!e.folderInfoOpened})),n.Rb(13,"i",9),n.Qc(14),n.ic(15,"translate"),n.Oc(16,_P,1,0,"div",10),n.Vb(),n.Oc(17,OP,9,6,"div",11),n.Vb(),n.Vb(),n.Wb(18,"div",12),n.Wb(19,"app-filters-tool",13,14),n.dc("toggleAllRes",(function(t){return e.toggleAllRes(t)}))("refreshEventAfterAction",(function(){return e.refreshDaoAfterAction()}))("refreshEvent",(function(){return e.refreshDao()})),n.ic(21,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(22,"div",15),n.Wb(23,"div",16),n.Oc(24,wP,2,1,"div",17),n.Wb(25,"div",18),n.Wb(26,"div",19),n.Wb(27,"mat-checkbox",20),n.dc("change",(function(t){return e.toggleAllRes(t)})),n.ic(28,"translate"),n.Vb(),n.Qc(29),n.ic(30,"ucfirst"),n.ic(31,"translate"),n.Oc(32,MP,3,4,"small",21),n.Vb(),n.Wb(33,"div",22),n.Wb(34,"span"),n.Rb(35,"mat-paginator",23,24),n.Vb(),n.Wb(37,"span"),n.Wb(38,"app-folder-action-list",25,26),n.dc("refreshEvent",(function(){return e.refreshDaoAfterAction()}))("refreshPanelFolders",(function(){return e.foldersService.getFolders()})),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(40,"div",27),n.Wb(41,"table",28,29),n.Ub(43,30),n.Oc(44,QP,18,26,"td",31),n.Tb(),n.Oc(45,BP,3,4,"tr",32),n.Vb(),n.Vb(),n.Rb(46,"div",18),n.Vb(),n.Vb(),n.Vb(),n.Wb(47,"mat-sidenav",33,34),n.Oc(49,UP,1,2,"div",35),n.Wb(50,"div",36),n.Wb(51,"button",37),n.dc("click",(function(){return n.Dc(t),n.zc(48).close()})),n.Rb(52,"mat-icon",38),n.Vb(),n.Vb(),n.Wb(53,"app-panel-list",39,40),n.dc("refreshBadgeNotes",(function(t){return e.refreshBadgeNotes(t)}))("refreshBadgeAttachments",(function(t){return e.refreshBadgeAttachments(t)})),n.Vb(),n.Rb(55,"mat-divider"),n.Vb(),n.Vb(),n.Wb(56,"app-folder-action-list",25,41),n.dc("refreshEvent",(function(){return e.refreshDaoAfterAction()}))("refreshPanelFolders",(function(){return e.foldersService.getFolders()})),n.Vb()}2&t&&(n.Db(3),n.oc("ngIf",""!==e.thumbnailUrl),n.Db(2),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("banner-opened",e.folderInfoOpened)("banner-closed",!e.folderInfoOpened),n.Db(2),n.Ib("fa-plus-square",!e.folderInfoOpened)("fa-minus-square",e.folderInfoOpened),n.Db(1),n.Sc("\xa0",n.jc(15,56,"lang.folderInformations")," "),n.Db(2),n.oc("ngIf",e.folderInfoOpened),n.Db(1),n.oc("ngIf",e.folderInfoOpened),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.oc("listProperties",e.listProperties)("totalRes",e.allResInBasket.length)("selectedRes",e.selectedRes)("routeDatas","/rest/folders/"+e.folderInfo.id+"/filters")("title",n.jc(21,58,"lang.searchMailInFolder")),n.Db(3),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.isLoadingResults),n.Db(3),n.pc("title",n.jc(28,60,"lang.selectAllResInBasket")),n.oc("checked",e.selectedRes.length==e.allResInBasket.length&&e.selectedRes.length>0)("indeterminate",e.selectedRes.length>0&&e.selectedRes.length<e.allResInBasket.length),n.Db(2),n.Tc("\xa0",e.resultsLength," ",n.jc(30,62,n.jc(31,64,"lang.records")),"\xa0"),n.Db(3),n.oc("ngIf",e.selectedRes.length>0),n.Db(3),n.oc("length",e.resultsLength)("pageSizeOptions",n.uc(66,$P)),n.Db(3),n.oc("contextMode",!1)("currentFolderInfo",e.folderInfo)("totalRes",e.allResInBasket.length)("selectedRes",e.selectedRes)("currentResource",e.currentResource),n.Db(3),n.oc("cdkDropListConnectedTo",e.listTodrag())("cdkDropListData",e.data)("cdkDropListDisabled",e.dragInit||e.appService.getViewMode())("dataSource",e.data),n.Db(4),n.oc("matRowDefColumns",e.displayedColumnsBasket),n.Db(2),n.Ib("docView",e.innerHtml),n.oc("fixedInViewport",e.appService.getViewMode())("opened",(e.appService.getViewMode(),!1))("mode",e.appService.getViewMode()?"over":"side")("ngStyle",n.vc(67,HP,e.appService.getViewMode()?"80%":"30%")),n.Db(2),n.oc("ngIf",e.innerHtml),n.Db(7),n.oc("contextMode",!0)("currentFolderInfo",e.folderInfo)("totalRes",e.allResInBasket.length)("selectedRes",e.selectedRes)("currentResource",e.currentResource))},directives:[I.e,I.f,K.a,P.t,Ot,We,OI,j.a,Kt.a,uP,vt.o,lo.e,Fe.a,vt.c,vt.b,vt.n,I.d,P.w,k.b,S.a,pM,T.a,P.s,V.c,vt.a,P.q,wt.a,vt.m,lo.a,lo.c,lo.d,A.b],pipes:[g.d,Tt.u,P.b,si,Wt.a,Tt.p],styles:[".dragPreview[_ngcontent-%COMP%]{text-align:center;border-radius:5px;background:#fff;padding:10px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);color:#135f7f}.banner-opened[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:10px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;background:#1a80ab;width:100%}.banner-opened[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#fff}.banner-opened[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#1a80ab;height:1px}.banner-opened[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{display:flex;font-size:16px}.banner-opened[_ngcontent-%COMP%] .content-item[_ngcontent-%COMP%]{flex:1;padding-left:20px;padding-right:20px}.banner-opened[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .private[_ngcontent-%COMP%]{font-style:italic;display:flex;justify-content:flex-end;align-items:center}.banner-closed[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:10px;position:relative;width:100%}.banner-closed[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#fff}.followIcon[_ngcontent-%COMP%]{color:#f99830}.folder-info[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.badge-folder[_ngcontent-%COMP%]{cursor:pointer;background:#f99830;margin:5px;font-size:12px;border-radius:3px;opacity:.8;max-width:250px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),t})();class XP{constructor(t,e){this.http=t,this.filtersListService=e}getRepoIssues(t,e,i,n,a,s){return this.filtersListService.updateListsPropertiesPage(i),this.filtersListService.updateListsPropertiesPageSize(s),this.http.get(`${n}?limit=${s}&offset=${i*s}${a}`)}}function qP(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",14),n.dc("click",(function(){return n.Dc(t),n.hc().loadActionList()})),n.Qc(1,"Actions "),n.Rb(2,"mat-icon",15),n.Vb()}if(2&t){n.hc();const t=n.zc(3);n.oc("matMenuTriggerFor",t)}}function KP(t,e){if(1&t&&n.Rb(0,"span",16,17),2&t){const t=n.hc(),e=n.zc(3);n.Lc("left",t.contextMenuPosition.x)("top",t.contextMenuPosition.y),n.oc("matMenuTriggerFor",e)}}function YP(t,e){if(1&t&&(n.Wb(0,"div",18),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Sc(" ",t.contextMenuTitle," ")}}function JP(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",19),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().launchEvent(i)})),n.Wb(1,"span"),n.Qc(2),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc();n.oc("disabled",""==t.component||0==i.selectedRes.length),n.Db(2),n.Rc(t.label)}}function ZP(t,e){if(1&t&&(n.Wb(0,"button",20),n.ic(1,"translate"),n.Rb(2,"mat-icon",21),n.Wb(3,"span"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc(),e=n.zc(15);n.oc("matMenuTriggerFor",e)("disabled",0===t.selectedRes.length)("title",n.jc(1,4,"lang.freezeRetentionRule")),n.Db(4),n.Rc(n.jc(5,6,"lang.freezeRetentionRule"))}}function tV(t,e){if(1&t&&(n.Wb(0,"button",20),n.ic(1,"translate"),n.Rb(2,"mat-icon",22),n.Wb(3,"span"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc(),e=n.zc(27);n.oc("matMenuTriggerFor",e)("disabled",0===t.selectedRes.length)("title",n.jc(1,4,"lang.setBindingDocument")),n.Db(4),n.Rc(n.jc(5,6,"lang.setBindingDocument"))}}let eV=(()=>{class t{constructor(t,e,i,a,s,o,r,c,l){this.translate=t,this.http=e,this.notify=i,this.dialog=a,this.router=s,this.actionService=o,this.headerService=r,this.functionService=c,this.privilegeService=l,this.loading=!1,this.triggerEvent=new n.o,this.contextMenuPosition={x:"0px",y:"0px"},this.contextMenuTitle="",this.currentAction={},this.basketInfo={},this.contextResId=0,this.currentLock=null,this.arrRes=[],this.folderList=[],this.actionsList=[],this.currentResource={},this.refreshEvent=new n.o,this.refreshEventAfterAction=new n.o,this.refreshPanelFolders=new n.o}ngOnInit(){}open(t,e,i){return this.loadActionList(),this.contextMenuPosition.x=t+"px",this.contextMenuPosition.y=e+"px",this.currentResource=i,this.contextMenuTitle=i.chrono,this.contextResId=i.resId,this.folderList=void 0!==i.folders?i.folders:[],this.getFreezeBindingValue(),this.contextMenu.openMenu(),!1}launchEvent(t,e=null){this.arrRes=[],this.currentAction=t,this.arrRes=this.selectedRes,this.contextMode&&this.selectedRes.length>1&&(this.contextMenuTitle="",this.contextResId=0),this.functionService.empty(e)||(this.contextMenuTitle=e.chrono,this.currentResource=e),this.actionService.launchAction(t,this.currentBasketInfo.ownerId,this.currentBasketInfo.groupId,this.currentBasketInfo.basketId,this.selectedRes,this.currentResource,!0)}loadActionList(){JSON.stringify(this.basketInfo)!=JSON.stringify(this.currentBasketInfo)&&(this.basketInfo=JSON.parse(JSON.stringify(this.currentBasketInfo)),this.http.get("../rest/resourcesList/users/"+this.currentBasketInfo.ownerId+"/groups/"+this.currentBasketInfo.groupId+"/baskets/"+this.currentBasketInfo.basketId+"/actions").subscribe(t=>{this.actionsList=t.actions.length>0?t.actions:[{id:0,label:this.translate.instant("lang.noAction"),component:""}],this.loading=!1},t=>{this.notify.handleErrors(t)}))}refreshList(){this.refreshEvent.emit()}refreshFolders(){this.refreshPanelFolders.emit()}unFollow(){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.stopFollowingAlert")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.request("DELETE","../rest/resources/unfollow",{body:{resources:this.selectedRes}})),Object(mt.a)(t=>{this.notify.success(this.translate.instant("lang.removedFromFolder")),this.headerService.nbResourcesFollowed-=t.unFollowed,this.refreshList()})).subscribe()}toggleFreezing(t){this.http.put("../rest/archival/freezeRetentionRule",{resources:this.selectedRes,freeze:t}).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant(t?"lang.retentionRuleFrozen":"lang.retentionRuleUnfrozen")),this.refreshList()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}toogleBinding(t){this.http.put("../rest/archival/binding",{resources:this.selectedRes,binding:t}).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant(t?"lang.bindingMail":!1===t?"lang.noBindingMail":"lang.bindingUndefined")),this.refreshList()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}getFreezeBindingValue(){this.isSelectedFreeze=this.currentResource.retentionFrozen,this.isSelectedBinding=this.currentResource.binding}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(o.c),n.Qb(bC),n.Qb(y.a),n.Qb(_t.a),n.Qb(Dt.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-actions-list"]],viewQuery:function(t,e){var i;1&t&&n.Xc(ne.d,!0),2&t&&n.yc(i=n.ec())&&(e.contextMenu=i.first)},inputs:{selectedRes:"selectedRes",totalRes:"totalRes",contextMode:"contextMode",currentBasketInfo:"currentBasketInfo",currentResource:"currentResource"},outputs:{triggerEvent:"triggerEvent",refreshEvent:"refreshEvent",refreshEventAfterAction:"refreshEventAfterAction",refreshPanelFolders:"refreshPanelFolders"},decls:45,vars:63,consts:[["mat-stroked-button","",3,"matMenuTriggerFor","click",4,"ngIf"],["style","position: fixed;",3,"matMenuTriggerFor","left","top",4,"ngIf"],["menu","matMenu"],["style","text-align: center;font-size: 10px;color: white;background: #135F7F;padding: 5px;font-weight: bold;",4,"ngIf"],["mat-menu-item","",3,"disabled","click",4,"ngFor","ngForOf"],["mat-menu-item","",1,"followAction",3,"disabled","click"],[1,"far","fa-star","fa-2x"],["mat-menu-item","",3,"matMenuTriggerFor","disabled","title",4,"ngIf"],["ng-switch","getValue(var)"],["freezeRentalRule","matMenu"],["mat-menu-item","",3,"title","click"],["bindingRentalRule","matMenu"],["mat-menu-item","",3,"title","innerHTML","click"],[3,"resIds","currentFolders","refreshList","refreshFolders"],["mat-stroked-button","",3,"matMenuTriggerFor","click"],["matSuffix","",1,"fa","fa-caret-down"],[2,"position","fixed",3,"matMenuTriggerFor"],["menu2",""],[2,"text-align","center","font-size","10px","color","white","background","#135F7F","padding","5px","font-weight","bold"],["mat-menu-item","",3,"disabled","click"],["mat-menu-item","",3,"matMenuTriggerFor","disabled","title"],[1,"freezeIcon","fas","fa-snowflake",2,"font-size","20px"],[1,"bindidngIcon","fas","fa-exclamation",2,"font-size","20px"]],template:function(t,e){1&t&&(n.Oc(0,qP,3,1,"button",0),n.Oc(1,KP,2,5,"span",1),n.Wb(2,"mat-menu",null,2),n.Oc(4,YP,2,1,"div",3),n.Oc(5,JP,3,2,"button",4),n.Rb(6,"mat-divider"),n.Wb(7,"button",5),n.dc("click",(function(){return e.unFollow()})),n.Rb(8,"mat-icon",6),n.Wb(9,"span"),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Vb(),n.Rb(12,"mat-divider"),n.Oc(13,ZP,6,8,"button",7),n.Wb(14,"mat-menu",8,9),n.Wb(16,"button",10),n.dc("click",(function(){return e.toggleFreezing(!0)})),n.ic(17,"translate"),n.Qc(18),n.ic(19,"translate"),n.Vb(),n.Rb(20,"mat-divider"),n.Wb(21,"button",10),n.dc("click",(function(){return e.toggleFreezing(!1)})),n.ic(22,"translate"),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Vb(),n.Oc(25,tV,6,8,"button",7),n.Wb(26,"mat-menu",null,11),n.Wb(28,"buton",12),n.dc("click",(function(){return e.toogleBinding(!0)})),n.ic(29,"stripTags"),n.ic(30,"translate"),n.ic(31,"translate"),n.Vb(),n.Rb(32,"mat-divider"),n.Wb(33,"buton",12),n.dc("click",(function(){return e.toogleBinding(!1)})),n.ic(34,"stripTags"),n.ic(35,"translate"),n.ic(36,"translate"),n.Vb(),n.Rb(37,"mat-divider"),n.Wb(38,"buton",10),n.dc("click",(function(){return e.toogleBinding(null)})),n.ic(39,"translate"),n.Qc(40),n.ic(41,"translate"),n.Vb(),n.Rb(42,"mat-divider"),n.Vb(),n.Rb(43,"mat-divider"),n.Wb(44,"folder-menu",13),n.dc("refreshList",(function(){return e.refreshList()}))("refreshFolders",(function(){return e.refreshFolders()})),n.Vb(),n.Vb()),2&t&&(n.oc("ngIf",!e.contextMode),n.Db(1),n.oc("ngIf",e.contextMode),n.Db(1),n.Fb("actionListMenu"),n.Db(2),n.oc("ngIf",e.contextMode&&1==e.selectedRes.length),n.Db(1),n.oc("ngForOf",e.actionsList),n.Db(2),n.oc("disabled",0===e.selectedRes.length),n.Db(3),n.Rc(n.jc(11,37,"lang.untrackThisMail")),n.Db(3),n.oc("ngIf",e.privilegeService.hasCurrentUserPrivilege("freeze_retention_rule")),n.Db(3),n.Fb(!0===e.isSelectedFreeze?"isSelectedMenu":"notSelectedMenu"),n.oc("title",n.jc(17,39,"lang.freezeTheCurrentUsefulLife")),n.Db(2),n.Sc(" ",n.jc(19,41,"lang.freezeTheCurrentUsefulLife")," "),n.Db(3),n.Fb(!1===e.isSelectedFreeze?"isSelectedMenu":"notSelectedMenu"),n.oc("title",n.jc(22,43,"lang.unfreezeTheCurrentUsefulLife")),n.Db(2),n.Sc(" ",n.jc(24,45,"lang.unfreezeTheCurrentUsefulLife")," "),n.Db(2),n.oc("ngIf",e.privilegeService.hasCurrentUserPrivilege("set_binding_document")),n.Db(3),n.Fb(!0===e.isSelectedBinding?"isSelectedMenu":"notSelectedMenu"),n.oc("title",n.jc(29,47,n.jc(30,49,"lang.bindingMail")))("innerHTML",n.jc(31,51,"lang.bindingMail"),n.Ec),n.Db(5),n.Fb(!1===e.isSelectedBinding?"isSelectedMenu":"notSelectedMenu"),n.oc("title",n.jc(34,53,n.jc(35,55,"lang.noBindingMail")))("innerHTML",n.jc(36,57,"lang.noBindingMail"),n.Ec),n.Db(5),n.Fb(null===e.isSelectedBinding?"isSelectedMenu":"notSelectedMenu"),n.oc("title",n.jc(39,59,"lang.doNotDefine")),n.Db(2),n.Sc(" ",n.jc(41,61,"lang.doNotDefine"),""),n.Db(4),n.oc("resIds",e.selectedRes)("currentFolders",e.folderList))},directives:[P.t,ne.e,P.s,T.a,ne.b,S.a,Uw,k.b,ne.d,Y.j],pipes:[g.d,Tt.r],styles:[".mat-icon[_ngcontent-%COMP%]{height:auto}.mat-stroked-button[_ngcontent-%COMP%]{border-radius:20px;border-color:#135f7f;color:#135f7f} .actionListMenu .mat-menu-content{padding-top:0;padding-bottom:0}.followAction[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{font-size:20px;color:#8e3e52}.freezeIcon[_ngcontent-%COMP%]{color:#135f7f}.bindidngIcon[_ngcontent-%COMP%]{color:#135f7f;margin-left:5px}.isSelectedMenu[_ngcontent-%COMP%]{background:#f99830}.notSelectedMenu[_ngcontent-%COMP%]{background:#fff}"]}),t})();const iV=["snav2"],nV=["actionsListContext"],aV=["filtersTool"],sV=["appPanelList"],oV=["tableBasketListSort"];function rV(t,e){if(1&t&&(n.Rb(0,"img",39),n.ic(1,"async"),n.ic(2,"secureUrl")),2&t){const t=n.hc();n.oc("src",n.jc(1,1,n.jc(2,3,t.thumbnailUrl)),n.Gc)}}function cV(t,e){1&t&&n.Rb(0,"mat-spinner")}function lV(t,e){if(1&t&&(n.Wb(0,"div",40),n.Oc(1,cV,1,0,"mat-spinner",16),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.isLoadingResults)}}function dV(t,e){if(1&t&&(n.Wb(0,"small"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc("- ",t.selectedRes.length," ",n.jc(2,2,"lang.selected"),"")}}function hV(t,e){if(1&t&&(n.Ub(0),n.Rb(1,"i",62),n.ic(2,"translate"),n.Qc(3,"\xa0"),n.Rb(4,"span",63),n.ic(5,"timeAgo"),n.ic(6,"fullDate"),n.Qc(7," - "),n.Rb(8,"i",64),n.ic(9,"translate"),n.Qc(10,"\xa0"),n.Rb(11,"span",63),n.ic(12,"timeAgo"),n.ic(13,"fullDate"),n.Tb()),2&t){const t=n.hc(2).$implicit,e=n.hc(2).$implicit;n.Db(1),n.pc("title",n.jc(2,6,"lang.creationDate")),n.Db(3),n.pc("title",n.jc(6,10,t.displayValue.creationDate)),n.oc("innerHTML",n.jc(5,8,t.displayValue.creationDate),n.Ec),n.Db(4),n.pc("title",n.jc(9,12,"lang.closingDate")),n.Db(3),n.pc("title",n.jc(13,16,e.closing_date)),n.oc("innerHTML",n.jc(12,14,e.closing_date),n.Ec)}}function uV(t,e){if(1&t&&(n.Ub(0),n.Rb(1,"i",62),n.ic(2,"translate"),n.Qc(3,"\xa0"),n.Rb(4,"span",63),n.ic(5,"timeAgo"),n.ic(6,"fullDate"),n.Qc(7," - "),n.Rb(8,"i",65),n.ic(9,"translate"),n.Qc(10,"\xa0"),n.Rb(11,"span",63),n.ic(12,"timeLimit"),n.ic(13,"fullDate"),n.Tb()),2&t){const t=n.hc(2).$implicit;n.Db(1),n.pc("title",n.jc(2,6,"lang.creationDate")),n.Db(3),n.pc("title",n.jc(6,10,t.displayValue.creationDate)),n.oc("innerHTML",n.jc(5,8,t.displayValue.creationDate),n.Ec),n.Db(4),n.pc("title",n.jc(9,12,"lang.processLimitDate")),n.Db(3),n.pc("title",n.jc(13,16,t.displayValue.processLimitDate)),n.oc("innerHTML",n.jc(12,14,t.displayValue.processLimitDate),n.Ec)}}function pV(t,e){if(1&t&&(n.Ub(0),n.Oc(1,hV,14,18,"ng-container",16),n.ic(2,"translate"),n.Oc(3,uV,14,18,"ng-container",16),n.ic(4,"translate"),n.Tb()),2&t){const t=n.hc(3).$implicit;n.Db(1),n.oc("ngIf",t.closing_date!=n.jc(2,2,"lang.undefined")),n.Db(2),n.oc("ngIf",t.closing_date==n.jc(4,4,"lang.undefined"))}}function bV(t,e){if(1&t&&(n.Ub(0),n.Rb(1,"i",66),n.Qc(2," \xa0 "),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Gb("fa ",t.icon,""),n.pc("title",t.label)}}function fV(t,e){if(1&t&&(n.Wb(0,"span",69),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2).$implicit;n.qc("title","id: ",t.displayValue,""),n.Db(1),n.Rc(n.jc(2,2,"lang.undefined"))}}function mV(t,e){if(1&t&&(n.Wb(0,"span",66),n.ic(1,"translate"),n.Qc(2),n.ic(3,"translate"),n.Vb()),2&t){const t=n.hc(2).$implicit;n.pc("title",n.jc(1,2,"lang."+t.displayValue)),n.Db(2),n.Rc(n.jc(3,4,"lang."+t.displayValue))}}function gV(t,e){if(1&t&&(n.Ub(0),n.Oc(1,fV,3,4,"span",67),n.ic(2,"translate"),n.Oc(3,mV,4,6,"span",68),n.ic(4,"translate"),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",!n.jc(2,2,"lang."+t.displayValue)),n.Db(2),n.oc("ngIf",n.jc(4,4,"lang."+t.displayValue))}}function vV(t,e){if(1&t&&n.Rb(0,"span",72),2&t){const t=n.hc(2).$implicit;n.pc("title",t.displayTitle),n.oc("innerHTML",t.displayValue,n.Ec)}}function _V(t,e){if(1&t&&(n.Rb(0,"span",73),n.ic(1,"timeAgo")),2&t){const t=n.hc(2).$implicit;n.oc("innerHTML",n.jc(1,1,t.displayValue),n.Ec)}}function yV(t,e){if(1&t&&(n.Ub(0),n.Oc(1,vV,1,2,"span",70),n.Oc(2,_V,2,3,"span",71),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",!t.value.includes("Date")),n.Db(1),n.oc("ngIf",t.value.includes("Date"))}}function xV(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",61),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc(2).$implicit;return n.hc().launchEventSubData(i,a)})),n.ic(1,"translate"),n.Oc(2,pV,5,6,"ng-container",16),n.Oc(3,bV,3,4,"ng-container",16),n.Oc(4,gV,5,6,"ng-container",16),n.Oc(5,yV,3,2,"ng-container",16),n.Vb()}if(2&t){const t=e.$implicit;n.Fb(t.cssClasses.join(" ")),n.Ib("hasEvent",t.event&&t.displayValue!==n.jc(1,8,"lang.undefined")),n.Db(2),n.oc("ngIf","getCreationAndProcessLimitDates"==t.value),n.Db(1),n.oc("ngIf",""!=t.icon),n.Db(1),n.oc("ngIf","getCategory"==t.value),n.Db(1),n.oc("ngIf","getCategory"!=t.value&&"getCreationAndProcessLimitDates"!=t.value)}}function CV(t,e){if(1&t&&(n.Wb(0,"div"),n.Oc(1,xV,6,10,"span",60),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc();n.Gb("sub-info column-",e.templateColumns,"-list"),n.Db(1),n.oc("ngForOf",t.display)}}const OV=function(t){return{color:t}};function DV(t,e){if(1&t&&n.Rb(0,"mat-icon",78),2&t){const t=n.hc(2).$implicit;n.Hb("",t.statusImage.charAt(0),"",t.statusImage.charAt(1)," ",t.statusImage," ",t.statusImage.charAt(0),"",t.statusImage.charAt(1),"-2x"),n.pc("title",t.statusLabel),n.oc("ngStyle",n.vc(9,OV,t.priorityColor))}}function wV(t,e){1&t&&(n.Wb(0,"span",79),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.confidential")))}function MV(t,e){if(1&t&&(n.Rb(0,"mat-icon",80),n.ic(1,"translate")),2&t){const t=n.hc(2).$implicit;n.rc("title","",n.jc(1,2,"lang.warnLockResInProgress")," : ",t.locker,"")}}function kV(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",74),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit,i=n.hc();return i.launch(i.defaultAction,e)})),n.Oc(1,DV,1,11,"mat-icon",75),n.Oc(2,wV,3,3,"span",76),n.Oc(3,MV,2,4,"mat-icon",77),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",!0!==t.isLocked),n.Db(1),n.oc("ngIf","Y"===t.confidentiality),n.Db(1),n.oc("ngIf",!0===t.isLocked)}}function SV(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"span",82),n.Rb(2,"i",83),n.ic(3,"translate"),n.Qc(4),n.Vb(),n.Tb()),2&t){const t=n.hc(2).$implicit;n.Db(2),n.pc("title",n.jc(3,2,"lang.barcode")),n.Db(2),n.Sc(" ",t.barcode,"")}}function IV(t,e){if(1&t&&(n.Ub(0),n.Qc(1),n.Tb()),2&t){const t=n.hc(2).$implicit;n.Db(1),n.Sc(" ",t.chrono," ")}}function PV(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",81),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit,i=n.hc();return i.launch(i.defaultAction,e)})),n.Oc(1,SV,5,4,"ng-container",16),n.ic(2,"translate"),n.ic(3,"translate"),n.Oc(4,IV,2,1,"ng-container",16),n.ic(5,"translate"),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",t.chrono==n.jc(2,2,"lang.undefined")&&t.barcode!=n.jc(3,4,"lang.undefined")),n.Db(3),n.oc("ngIf",t.chrono!=n.jc(5,6,"lang.undefined"))}}function VV(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",86),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(3);return i.stopPropagation(),s.goToFolder(a)})),n.ic(1,"translate"),n.Rb(2,"i",87),n.Qc(3),n.Vb()}if(2&t){const t=e.$implicit;n.rc("title","",n.jc(1,3,"lang.goToFolder")," : ",t.label,""),n.Db(3),n.Sc(" ",t.label,"")}}function RV(t,e){if(1&t&&(n.Wb(0,"div",84),n.Oc(1,VV,4,5,"span",85),n.ic(2,"sortBy"),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngForOf",n.kc(2,1,t.folders,"label"))}}const jV=function(t){return[t]};function AV(t,e){if(1&t){const t=n.Xb();n.Wb(0,"td",41),n.Oc(1,CV,2,4,"div",42),n.Wb(2,"div",43),n.Wb(3,"span",44),n.Wb(4,"mat-checkbox",45),n.dc("change",(function(i){n.Dc(t);const a=e.$implicit;return n.hc().toggleRes(i,a)}))("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.Vb(),n.Vb(),n.Wb(5,"button",46),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc();return i.stopPropagation(),s.toggleMailTracking(a)})),n.ic(6,"translate"),n.ic(7,"translate"),n.Rb(8,"mat-icon",47),n.Vb(),n.Oc(9,kV,4,3,"span",48),n.Oc(10,PV,6,8,"span",49),n.Wb(11,"span",50),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc();return a.launch(a.defaultAction,i)})),n.ic(12,"translate"),n.Qc(13),n.ic(14,"shorten"),n.Vb(),n.Wb(15,"span",51),n.Wb(16,"button",52),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc();return i.stopPropagation(),s.togglePanel("note",a)})),n.ic(17,"translate"),n.Rb(18,"mat-icon",53),n.Vb(),n.Wb(19,"button",52),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc();return i.stopPropagation(),s.togglePanel("attachment",a)})),n.ic(20,"translate"),n.Rb(21,"mat-icon",54),n.Vb(),n.Wb(22,"button",52),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc();return i.stopPropagation(),s.togglePanel("diffusion",a)})),n.ic(23,"translate"),n.Rb(24,"mat-icon",55),n.Vb(),n.Wb(25,"button",56),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc();return i.stopPropagation(),s.viewDocument(a)}))("mouseenter",(function(){n.Dc(t);const i=e.$implicit;return n.hc().viewThumbnail(i)}))("mouseleave",(function(){return n.Dc(t),n.hc().closeThumbnail()})),n.ic(26,"translate"),n.ic(27,"translate"),n.Rb(28,"mat-icon",57),n.Vb(),n.Wb(29,"button",52),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc();return i.stopPropagation(),s.goToDetail(a)})),n.ic(30,"translate"),n.Rb(31,"mat-icon",58),n.Vb(),n.Vb(),n.Vb(),n.Oc(32,RV,3,4,"div",59),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(),a=n.zc(43);n.Ib("selected-data",t.checked),n.Db(1),n.oc("ngIf",!a.opened&&!i.appService.getViewMode()&&t.display.length>0),n.Db(3),n.oc("checked",t.checked),n.Db(1),n.oc("title",!0===t.mailTracking?n.jc(6,31,"lang.untrackThisMail"):n.jc(7,33,"lang.trackThisMail")),n.Db(3),n.oc("ngClass",n.vc(53,jV,!0===t.mailTracking?"fas fa-star":"far fa-star")),n.Db(1),n.oc("ngIf",!i.appService.getViewMode()),n.Db(1),n.oc("ngIf",!i.appService.getViewMode()),n.Db(1),n.Ib("undefined",t.subject==n.jc(12,35,"lang.undefined")),n.pc("title",t.subject),n.Db(2),n.Rc(n.lc(14,37,t.subject,150,"...")),n.Db(3),n.Ib("noData",0==t.countNotes),n.pc("title",n.jc(17,41,"lang.notes")),n.Db(2),n.pc("matBadgeHidden",0==t.countNotes),n.pc("matBadge",t.countNotes),n.oc("color",a.opened&&t.checked&&"note"==i.currentMode?"primary":""),n.Db(1),n.Ib("noData",0==t.countAttachments),n.pc("title",n.jc(20,43,"lang.attachments")),n.Db(2),n.pc("matBadgeHidden",0==t.countAttachments),n.pc("matBadge",t.countAttachments),n.oc("color",a.opened&&t.checked&&"attachment"==i.currentMode?"primary":""),n.Db(1),n.pc("title",n.jc(23,45,"lang.diffusionList")),n.Db(2),n.oc("color",a.opened&&t.checked&&"diffusion"==i.currentMode?"primary":""),n.Db(1),n.pc("title",t.hasDocument?n.jc(26,47,"lang.viewResource"):n.jc(27,49,"lang.noDocument")),n.oc("disabled",!t.hasDocument),n.Db(3),n.oc("ngClass",n.vc(55,jV,t.hasDocument?"fa-eye":"fa-eye-slash")),n.Db(1),n.pc("title",n.jc(30,51,"lang.linkDetails")),n.Db(3),n.oc("ngIf",i.displayFolderTags&&void 0!==t.folders&&t.folders.length>0)}}function WV(t,e){1&t&&n.Rb(0,"div",91)}function TV(t,e){if(1&t&&(n.Wb(0,"div",92),n.Rb(1,"i",93),n.Rb(2,"br"),n.Qc(3),n.ic(4,"translate"),n.Wb(5,"b"),n.Qc(6),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(3),n.Sc("",n.jc(4,2,"lang.classifyInFolder")," : "),n.Db(3),n.Rc(t.chrono)}}function EV(t,e){if(1&t){const t=n.Xb();n.Wb(0,"tr",88),n.dc("contextmenu",(function(i){n.Dc(t);const a=e.$implicit;return n.hc().open(i,a)}))("cdkDragStarted",(function(){n.Dc(t);const i=e.$implicit;return n.hc().selectSpecificRes(i)})),n.Oc(1,WV,1,0,"div",89),n.Oc(2,TV,7,4,"div",90),n.Vb()}if(2&t){const t=e.$implicit;n.Ib("locked",1==t.isLocked),n.oc("cdkDragData",t)}}function FV(t,e){if(1&t&&n.Rb(0,"div",94),2&t){const t=n.hc();n.oc("matTooltip",t.currentChrono)("innerHTML",t.innerHtml,n.Ec)}}const LV=function(){return[10,25,50,100,150]},QV=function(t){return{width:t}};let NV=(()=>{class t{constructor(t,e,i,a,s,o,r,c,l,d,h,u,p,b,f){this.translate=t,this.router=e,this._activatedRoute=i,this.route=a,this.http=s,this.dialog=o,this.sanitizer=r,this.headerService=c,this.filtersListService=l,this.notify=d,this.overlay=h,this.viewContainerRef=u,this.appService=p,this.foldersService=b,this.actionService=f,this.loading=!1,this.docUrl="",this.injectDatasParam={resId:0,editable:!1},this.currentResource={},this.filtersChange=new n.o,this.dragInit=!0,this.templateColumns=7,this.displayedColumnsBasket=["resId"],this.displayedMainData=[{value:"chrono",cssClasses:["softColorData","align_centerData","chronoData"],icon:""},{value:"subject",cssClasses:["longData"],icon:""}],this.displayedSecondaryData=[],this.resultsLength=0,this.isLoadingResults=!0,this.listProperties={},this.currentBasketInfo={},this.currentChrono="",this.currentMode="",this.defaultAction={id:19,component:"processAction"},this.thumbnailUrl="",this.selectedRes=[],this.allResInBasket=[],this.selectedDiffusionTab=0,this.specificChrono="",this.displayFolderTags=!1,this.destroy$=new da.a,this.currentSelectedChrono="",i.queryParams.subscribe(t=>this.specificChrono=t.chrono),this.subscription=this.foldersService.catchEvent().subscribe(t=>{"function"===t.type&&this[t.content]()}),this.subscription2=this.actionService.catchAction().subscribe(t=>{this.refreshDaoAfterAction()})}ngOnInit(){this.loading=!1,this.isLoadingResults=!1,this.route.params.subscribe(t=>{this.dragInit=!0,this.destroy$.next(!0),this.basketUrl="../rest/resourcesList/users/"+t.userSerialId+"/groups/"+t.groupSerialId+"/baskets/"+t.basketId,this.currentBasketInfo={ownerId:t.userSerialId,groupId:t.groupSerialId,basketId:t.basketId},this.headerService.currentBasketInfo=this.currentBasketInfo,this.filtersListService.filterMode=!1,this.selectedRes=[],this.sidenavRight.close(),this.listProperties=this.filtersListService.initListsProperties(this.currentBasketInfo.ownerId,this.currentBasketInfo.groupId,this.currentBasketInfo.basketId,"basket",this.specificChrono),setTimeout(()=>{this.dragInit=!1},1e3),this.initResultList()},t=>{this.notify.handleErrors(t)})}ngOnDestroy(){this.destroy$.next(!0),this.subscription.unsubscribe(),this.subscription2.unsubscribe()}initResultList(){this.resultListDatabase=new zV(this.http,this.filtersListService),this.paginator.pageIndex=this.listProperties.page,this.paginator.pageSize=this.listProperties.pageSize,this.sort.sortChange.subscribe(()=>this.paginator.pageIndex=0),Object(gy.a)(this.sort.sortChange,this.paginator.page,this.filtersChange).pipe(Object(Zo.a)(this.destroy$),Object(Qe.a)({}),Object(ft.a)(()=>(this.data=[],this.isLoadingResults=!0,this.resultListDatabase.getRepoIssues(this.sort.active,this.sort.direction,this.paginator.pageIndex,this.basketUrl,this.filtersListService.getUrlFilters(),this.paginator.pageSize))),Object(l.a)(t=>(this.isLoadingResults=!1,t=this.processPostData(t),this.resultsLength=t.count,this.allResInBasket=t.allResources,this.currentBasketInfo.basket_id=t.basket_id,this.defaultAction=t.defaultAction,this.displayFolderTags=t.displayFolderTags,this.templateColumns=t.templateColumns,this.headerService.setHeader(t.basketLabel,"","fa fa-inbox"),t.resources)),Object(m.a)(t=>(this.notify.handleErrors(t),this.router.navigate(["/home"]),this.isLoadingResults=!1,Object(c.a)(!1)))).subscribe(t=>this.data=t)}goTo(t){this.filtersListService.filterMode=!1,this.docUrl==="../rest/resources/"+t.resId+"/content"&&this.sidenavRight.opened?this.sidenavRight.close():(this.docUrl="../rest/resources/"+t.resId+"/content",this.currentChrono=t.chrono,this.innerHtml=this.sanitizer.bypassSecurityTrustHtml("<iframe style='height:100%;width:100%;' src='"+this.docUrl+"' class='embed-responsive-item'></iframe>"),this.sidenavRight.open())}goToDetail(t){this.router.navigate(["/resources/"+t.resId])}goToFolder(t){this.router.navigate(["/folders/"+t.id])}togglePanel(t,e){const i=this.currentResource;e.checked=!0,this.toggleAllRes({checked:!1}),this.toggleRes({checked:!0},e),i.resId===e.resId&&this.sidenavRight.opened&&this.currentMode===t?this.sidenavRight.close():(this.currentMode=t,this.currentResource=e,this.appPanelList.loadComponent(t,e),this.sidenavRight.open())}refreshBadgeNotes(t){this.currentResource.countNotes=t}refreshBadgeAttachments(t){this.currentResource.countAttachments=t}refreshDao(){this.paginator.pageIndex=this.listProperties.page,this.filtersChange.emit()}refreshDaoAfterAction(){this.sidenavRight.close(),this.refreshDao(),this.toggleAllRes({checked:!1})}filterThis(t){this.filtersTool.setInputSearch(t)}viewThumbnail(t){if(t.hasDocument){const e=+new Date;this.thumbnailUrl="../rest/resources/"+t.resId+"/thumbnail?tsp="+e,$("#viewThumbnail").show(),$("#listContent").css({overflow:"hidden"})}}closeThumbnail(){$("#viewThumbnail").hide(),$("#listContent").css({overflow:"auto"})}processPostData(t){return this.displayedSecondaryData=[],t.resources.forEach(t=>{Object.keys(t).forEach(e=>{"statusImage"===e&&null==t[e]?t[e]="fa-question undefined":null!=t[e]&&""!==t[e]||-1!==["closingDate","countAttachments","countNotes","display","folders","hasDocument","integrations","mailTracking"].indexOf(e)||(t[e]=this.translate.instant("lang.undefined"))}),t.display.forEach(t=>{if(t.event=!1,t.displayTitle=t.displayValue,null!=t.displayValue&&""!==t.displayValue||-1!==["getCreationAndProcessLimitDates","getParallelOpinionsNumber"].indexOf(t.value))if(["getSenders","getRecipients"].indexOf(t.value)>-1)t.event=!0,t.displayValue.length>1?(t.displayTitle=t.displayValue.join(" - "),t.displayValue="<b>"+t.displayValue.length+"</b> "+this.translate.instant("lang.contactsAlt")):t.displayValue=1===t.displayValue.length?t.displayValue[0]:this.translate.instant("lang.undefined");else if("getCreationAndProcessLimitDates"===t.value)t.icon="";else if("getVisaWorkflow"===t.value){let e=[],i="",n="";const a=[];t.displayValue.forEach((t,s)=>{i="",n=t.user,a.push(n),"sign"===t.mode&&(n="<u>"+n+"</u>"),i=""===t.date?'<i class="fa fa-hourglass-half"></i> <span title="'+this.translate.instant("lang."+t.mode+"User")+'">'+n+"</span>":'<span color="accent" style=""><i class="fa fa-check"></i> <span title="'+this.translate.instant("lang."+t.mode+"User")+'">'+n+"</span></span>",t.current&&s>=0&&(i='<b color="primary">'+i+"</b>"),e.push(i)});const s=t.displayValue.map(t=>t.current).indexOf(!0);if(s>0){e=e.slice(s-1),e=e.reverse();const i=t.displayValue.map(t=>t.current).reverse().indexOf(!0);i>1&&(e=e.slice(i-1)),e=e.reverse()}else 0===s?(e=e.reverse(),e=e.slice(s-2),e=e.reverse()):-1===s&&(e=e.slice(e.length-2));(s>=2||-1===s&&t.displayValue.length>=3)&&e.unshift("..."),-1!==s&&s-2<=t.displayValue.length&&s+2<t.displayValue.length&&t.displayValue.length>=3&&e.push("..."),t.displayValue=e.join(' <i class="fas fa-long-arrow-alt-right"></i> '),t.displayTitle=a.join(" - ")}else if("getSignatories"===t.value){const e=[];t.displayValue.forEach(t=>{e.push(t.user)}),t.displayValue=e.join(", "),t.displayTitle=e.join(", ")}else"getParallelOpinionsNumber"===t.value&&(t.displayTitle=t.displayValue+" "+this.translate.instant("lang.opinionsSent"),t.displayValue=t.displayValue>0?'<b color="primary">'+t.displayValue+"</b> "+this.translate.instant("lang.opinionsSent"):t.displayValue+" "+this.translate.instant("lang.opinionsSent"));else t.displayValue=this.translate.instant("lang.undefined"),t.displayTitle="";t.label=void 0===t.displayLabel?this.translate.instant("lang."+t.value):t.displayLabel}),t.checked=-1!==this.selectedRes.indexOf(t.resId)}),t}toggleRes(t,e){if(t.checked)-1===this.selectedRes.indexOf(e.resId)&&(this.currentResource=e,this.selectedRes.push(e.resId),e.checked=!0);else{const t=this.selectedRes.indexOf(e.resId);this.selectedRes.splice(t,1),e.checked=!1}}toggleAllRes(t){this.selectedRes=[],t.checked?(this.data.forEach(t=>{t.checked=!0}),this.selectedRes=JSON.parse(JSON.stringify(this.allResInBasket))):this.data.forEach(t=>{t.checked=!1})}selectSpecificRes(t){this.toggleAllRes({checked:!1}),this.toggleRes({checked:!0},t)}open({x:t,y:e},i){return!1===i.checked&&(i.checked=!0,this.toggleAllRes({checked:!1}),this.toggleRes({checked:!0},i)),this.actionsList.open(t,e,i),!1}launch(t,e){e.checked=!0,this.toggleAllRes({checked:!1}),this.toggleRes({checked:!0},e),setTimeout(()=>{this.actionsList.launchEvent(t,e)},200)}listTodrag(){return this.foldersService.getDragIds()}launchEventSubData(t,e){t.event&&["getSenders","getRecipients"].indexOf(t.value)>-1&&t.displayValue!==this.translate.instant("lang.undefined")&&this.openContact(e,"getSenders"===t.value?"senders":"recipients")}openContact(t,e){this.dialog.open(YD,{panelClass:"maarch-modal",data:{title:`${t.chrono} - ${t.subject}`,mode:e,resId:t.resId}})}viewDocument(t){this.http.get(`../rest/resources/${t.resId}/content?mode=view`,{responseType:"blob"}).pipe(Object(mt.a)(e=>{const i=new Blob([e],{type:"application/pdf"}),n=URL.createObjectURL(i),a=window.open();a.document.write(`<iframe style="width: 100%;height: 100%;margin: 0;padding: 0;" src="${n}" frameborder="0" allowfullscreen></iframe>`),a.document.title=t.chrono}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}toggleMailTracking(t){t.mailTracking?this.http.request("DELETE","../rest/resources/unfollow",{body:{resources:[t.resId]}}).pipe(Object(mt.a)(()=>this.headerService.nbResourcesFollowed--),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe():this.http.post("../rest/resources/follow",{resources:[t.resId]}).pipe(Object(mt.a)(()=>this.headerService.nbResourcesFollowed++),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe(),t.mailTracking=!t.mailTracking}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(o.c),n.Qb(o.a),n.Qb(o.a),n.Qb(v.b),n.Qb(q.b),n.Qb(ca.b),n.Qb(y.a),n.Qb(sI),n.Qb(D.a),n.Qb(ZD.c),n.Qb(n.T),n.Qb(w.a),n.Qb(tw.a),n.Qb(bC))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(iV,!0),n.Kc(nV,!0),n.Kc(aV,!0),n.Kc(sV,!0),n.Kc(Kt.a,!0),n.Kc(oV,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.actionsList=i.first),n.yc(i=n.ec())&&(e.filtersTool=i.first),n.yc(i=n.ec())&&(e.appPanelList=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:53,vars:55,consts:[[1,"maarch-container"],["id","viewThumbnail",2,"display","none","position","fixed","z-index","2","margin-left","1px"],["style","max-height: 100vh;",3,"src",4,"ngIf"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[2,"flex","1","overflow-x","auto","overflow-y","hidden",3,"listProperties","totalRes","selectedRes","routeDatas","title","toggleAllRes","refreshEventAfterAction","refreshEvent"],["filtersTool",""],[1,"container"],[1,"container-content"],["class","example-loading-shade",4,"ngIf"],[1,"table-head"],[1,"table-head-result"],["color","primary",2,"margin","10px","padding-right","10px",3,"checked","indeterminate","title","change"],[4,"ngIf"],[1,"table-head-tool"],[1,"paginatorResultList",3,"length","pageSizeOptions"],["paginatorResultList",""],[3,"selectedRes","currentBasketInfo"],["actionsList",""],[3,"contextMode","totalRes","selectedRes","currentBasketInfo","currentResource","refreshEvent","refreshPanelFolders"],[2,"height","90%","overflow","auto","position","absolute","width","100%"],["cdkDropList","","id","document-list","mat-table","","matSort","","matSortActive","resId","matSortDisableClear","","matSortDirection","asc",2,"width","100%",3,"cdkDropListConnectedTo","cdkDropListData","dataSource","cdkDropListDisabled"],["tableBasketListSort","matSort"],["matColumnDef","resId"],["mat-cell","","style","padding:0;border-top: solid 1px rgba(0, 0, 0, 0.12);",3,"selected-data",4,"matCellDef"],["mat-row","","class","rowData","cdkDrag","",3,"locked","cdkDragData","contextmenu","cdkDragStarted",4,"matRowDef","matRowDefColumns"],["position","end","autoFocus","false",1,"panel-right",2,"overflow-x","hidden",3,"fixedInViewport","opened","mode","ngStyle"],["snav2",""],["style","height: 100%;overflow: hidden;",3,"matTooltip","innerHTML",4,"ngIf"],[2,"display","flex","position","sticky","top","0px","z-index","2"],["mat-icon-button","",2,"font-size","20px","color","#666",3,"click"],[1,"fa","fa-arrow-right"],[3,"refreshBadgeNotes","refreshBadgeAttachments"],["appPanelList",""],[3,"contextMode","totalRes","selectedRes","currentBasketInfo","refreshEvent","refreshEventAfterAction","refreshPanelFolders"],["actionsListContext",""],[2,"max-height","100vh",3,"src"],[1,"example-loading-shade"],["mat-cell","",2,"padding","0","border-top","solid 1px rgba(0, 0, 0, 0.12)"],[3,"class",4,"ngIf"],[1,"main-info"],[2,"width","50px","height","16px"],["color","primary",3,"checked","change","click"],["mat-icon-button","",1,"followIcon",2,"margin-left","-25px",3,"title","click"],[3,"ngClass"],["style","cursor:pointer;","class","main-info-status",3,"click",4,"ngIf"],["class","main-info-data","style","width:200px;text-align:center;cursor:pointer;",3,"click",4,"ngIf"],[1,"main-info-data",2,"font-weight","bold","flex","1","cursor","pointer",3,"title","click"],[1,"main-info-action"],["mat-icon-button","",3,"title","click"],["fontSet","fas","fontIcon","fa-comments fa-2x",3,"matBadgeHidden","matBadge","color"],["fontSet","fas","fontIcon","fa-paperclip fa-2x",3,"matBadgeHidden","matBadge","color"],["fontSet","fas","fontIcon","fa-sitemap fa-2x",3,"color"],["mat-icon-button","",3,"title","disabled","click","mouseenter","mouseleave"],[1,"fa",3,"ngClass"],["fontSet","fas","fontIcon","fa-info-circle fa-2x"],["class","folder-info",4,"ngIf"],["class","sub-info-data","style","flex:1;white-space: pre;\n overflow: hidden;\n text-overflow: ellipsis;\n padding-left: 5px;\n padding-right: 5px;",3,"class","hasEvent","click",4,"ngFor","ngForOf"],[1,"sub-info-data",2,"flex","1","white-space","pre","overflow","hidden","text-overflow","ellipsis","padding-left","5px","padding-right","5px",3,"click"],[1,"fa","fa-calendar",3,"title"],[3,"innerHTML","title"],[1,"fa","fa-lock",3,"title"],[1,"fa","fa-stopwatch",3,"title"],[3,"title"],["style","opacity: 0.5",3,"title",4,"ngIf"],[3,"title",4,"ngIf"],[2,"opacity","0.5",3,"title"],[3,"title","innerHTML",4,"ngIf"],[3,"innerHTML",4,"ngIf"],[3,"title","innerHTML"],[3,"innerHTML"],[1,"main-info-status",2,"cursor","pointer",3,"click"],["color","primary",3,"title","ngStyle","class",4,"ngIf"],["class","watermark",4,"ngIf"],["style","color: red;","class","fa fa-lock fa-2x",3,"title",4,"ngIf"],["color","primary",3,"title","ngStyle"],[1,"watermark"],[1,"fa","fa-lock","fa-2x",2,"color","red",3,"title"],[1,"main-info-data",2,"width","200px","text-align","center","cursor","pointer",3,"click"],[2,"color","rgba(0,0,0,0.4)","font-size","90%"],[1,"fas","fa-barcode",3,"title"],[1,"folder-info"],["class","badge badge-folder",3,"title","click",4,"ngFor","ngForOf"],[1,"badge","badge-folder",3,"title","click"],[1,"fa","fa-folder"],["mat-row","","cdkDrag","",1,"rowData",3,"cdkDragData","contextmenu","cdkDragStarted"],["class","example-custom-placeholder",4,"cdkDragPlaceholder"],["class","dragPreview",4,"cdkDragPreview"],[1,"example-custom-placeholder"],[1,"dragPreview"],[1,"fas","fa-envelope-open-text","fa-2x"],[2,"height","100%","overflow","hidden",3,"matTooltip","innerHTML"]],template:function(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"mat-card",1),n.Oc(3,rV,3,5,"img",2),n.Vb(),n.Wb(4,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",6),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Wb(10,"div",7),n.Wb(11,"app-filters-tool",8,9),n.dc("toggleAllRes",(function(t){return e.toggleAllRes(t)}))("refreshEventAfterAction",(function(){return e.refreshDaoAfterAction()}))("refreshEvent",(function(){return e.refreshDao()})),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(14,"div",10),n.Wb(15,"div",11),n.Oc(16,lV,2,1,"div",12),n.Wb(17,"div",13),n.Wb(18,"div",14),n.Wb(19,"mat-checkbox",15),n.dc("change",(function(t){return e.toggleAllRes(t)})),n.ic(20,"translate"),n.Vb(),n.Qc(21),n.ic(22,"ucfirst"),n.ic(23,"translate"),n.Oc(24,dV,3,4,"small",16),n.Vb(),n.Wb(25,"div",17),n.Wb(26,"span"),n.Rb(27,"mat-paginator",18,19),n.Vb(),n.Wb(29,"span"),n.Rb(30,"app-tools-list",20,21),n.Vb(),n.Wb(32,"span"),n.Wb(33,"app-actions-list",22,21),n.dc("refreshEvent",(function(){return e.refreshDao()}))("refreshPanelFolders",(function(){return e.foldersService.getFolders()})),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(35,"div",23),n.Wb(36,"table",24,25),n.Ub(38,26),n.Oc(39,AV,33,57,"td",27),n.Tb(),n.Oc(40,EV,3,3,"tr",28),n.Vb(),n.Vb(),n.Rb(41,"div",13),n.Vb(),n.Vb(),n.Vb(),n.Wb(42,"mat-sidenav",29,30),n.Oc(44,FV,1,2,"div",31),n.Wb(45,"div",32),n.Wb(46,"button",33),n.dc("click",(function(){return n.Dc(t),n.zc(43).close()})),n.Rb(47,"mat-icon",34),n.Vb(),n.Vb(),n.Wb(48,"app-panel-list",35,36),n.dc("refreshBadgeNotes",(function(t){return e.refreshBadgeNotes(t)}))("refreshBadgeAttachments",(function(t){return e.refreshBadgeAttachments(t)})),n.Vb(),n.Rb(50,"mat-divider"),n.Vb(),n.Vb(),n.Wb(51,"app-actions-list",37,38),n.dc("refreshEvent",(function(){return e.refreshDao()}))("refreshEventAfterAction",(function(){return e.refreshDaoAfterAction()}))("refreshPanelFolders",(function(){return e.foldersService.getFolders()})),n.Vb()}2&t&&(n.Db(3),n.oc("ngIf",""!==e.thumbnailUrl),n.Db(2),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.oc("listProperties",e.listProperties)("totalRes",e.allResInBasket.length)("selectedRes",e.selectedRes)("routeDatas","/rest/resourcesList/users/"+e.currentBasketInfo.ownerId+"/groups/"+e.currentBasketInfo.groupId+"/baskets/"+e.currentBasketInfo.basketId+"/filters")("title",n.jc(13,44,"lang.searchMailInBasket")),n.Db(3),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.isLoadingResults),n.Db(3),n.pc("title",n.jc(20,46,"lang.selectAllResInBasket")),n.oc("checked",e.selectedRes.length==e.allResInBasket.length&&e.selectedRes.length>0)("indeterminate",e.selectedRes.length>0&&e.selectedRes.length<e.allResInBasket.length),n.Db(2),n.Tc("\xa0",e.allResInBasket.length," ",n.jc(22,48,n.jc(23,50,"lang.records")),"\xa0"),n.Db(3),n.oc("ngIf",e.selectedRes.length>0),n.Db(3),n.oc("length",e.resultsLength)("pageSizeOptions",n.uc(52,LV)),n.Db(3),n.oc("selectedRes",e.selectedRes)("currentBasketInfo",e.currentBasketInfo),n.Db(3),n.oc("contextMode",!1)("totalRes",e.allResInBasket.length)("selectedRes",e.selectedRes)("currentBasketInfo",e.currentBasketInfo)("currentResource",e.currentResource),n.Db(3),n.oc("cdkDropListConnectedTo",e.listTodrag())("cdkDropListData",e.data)("dataSource",e.data)("cdkDropListDisabled",e.dragInit||e.appService.getViewMode()),n.Db(4),n.oc("matRowDefColumns",e.displayedColumnsBasket),n.Db(2),n.Ib("docView",!e.filtersListService.filterMode),n.oc("fixedInViewport",e.appService.getViewMode())("opened",(e.appService.getViewMode(),!1))("mode",e.appService.getViewMode()?"over":"side")("ngStyle",n.vc(53,QV,e.appService.getViewMode()?"80%":"30%")),n.Db(2),n.oc("ngIf",e.innerHtml&&!e.filtersListService.filterMode),n.Db(7),n.oc("contextMode",!0)("totalRes",e.allResInBasket.length)("selectedRes",e.selectedRes)("currentBasketInfo",e.currentBasketInfo))},directives:[I.e,I.f,K.a,P.t,Ot,We,OI,j.a,Kt.a,Ow,eV,vt.o,lo.e,Fe.a,vt.c,vt.b,vt.n,I.d,P.w,k.b,S.a,pM,T.a,V.c,vt.a,P.q,wt.a,P.s,vt.m,lo.a,lo.c,lo.d,A.b],pipes:[g.d,Tt.u,P.b,si,Tt.p,ps,uo,bs,Wt.a],styles:[".align_leftData[_ngcontent-%COMP%]{text-align:left}.align_centerData[_ngcontent-%COMP%]{text-align:center}.align_rightData[_ngcontent-%COMP%]{text-align:right}.boldFontData[_ngcontent-%COMP%]{font-weight:700}.bigFontData[_ngcontent-%COMP%]{font-size:14px}.smallFontData[_ngcontent-%COMP%]{font-size:10px}.normalData[_ngcontent-%COMP%]{flex:1}.chronoData[_ngcontent-%COMP%]{width:150px}.longData[_ngcontent-%COMP%]{flex:3}.locked[_ngcontent-%COMP%]{opacity:.5}.watermark[_ngcontent-%COMP%]{position:absolute;left:50%;transform:translateX(-50%) rotate(-20deg);color:red;font-weight:700;opacity:.6}.dragPreview[_ngcontent-%COMP%]{text-align:center;border-radius:5px;background:#fff;padding:10px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);color:#135f7f}.folder-info[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.badge-folder[_ngcontent-%COMP%]{background:#f99830;margin:5px;font-size:12px;border-radius:3px;opacity:.8;max-width:250px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.badge-folder[_ngcontent-%COMP%], .hasEvent[_ngcontent-%COMP%]{cursor:pointer}.hasEvent[_ngcontent-%COMP%]:hover{color:#135f7f}.followIcon[_ngcontent-%COMP%]{color:#f99830}"]}),t})();class zV{constructor(t,e){this.http=t,this.filtersListService=e}getRepoIssues(t,e,i,n,a,s){return this.filtersListService.updateListsPropertiesPage(i),this.filtersListService.updateListsPropertiesPageSize(s),this.http.get(`${n}?limit=${s}&offset=${i*s}${a}`)}}const BV=["numberInput"];function UV(t,e){1&t&&(n.Wb(0,"div",10),n.Rb(1,"mat-spinner",11),n.Vb())}function $V(t,e){if(1&t&&n.Rb(0,"mat-datepicker-toggle",34),2&t){n.hc();const t=n.zc(8);n.oc("for",t)}}function HV(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field",30),n.dc("click",(function(){return n.Dc(t),n.zc(8).open()})),n.Wb(1,"mat-label"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"input",31),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).receivedDate=e})),n.ic(5,"translate"),n.Vb(),n.Oc(6,$V,1,1,"mat-datepicker-toggle",32),n.Rb(7,"mat-datepicker",null,33),n.Vb()}if(2&t){const t=n.zc(8),e=n.hc(2);n.Db(2),n.Rc(n.jc(3,6,"lang.registeredMailReceivedDate")),n.Db(2),n.oc("ngModel",e.receivedDate)("matDatepicker",t)("placeholder",n.jc(5,8,"lang.chooseDate"))("max",e.today),n.Db(2),n.oc("ngIf",!e.receivedDate)}}function GV(t,e){if(1&t&&(n.Wb(0,"mat-option",15),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Rc(t)}}function XV(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"mat-select",35),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).reason=e})),n.ic(2,"translate"),n.Oc(3,GV,2,2,"mat-option",36),n.Wb(4,"mat-option",15),n.ic(5,"translate"),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.pc("placeholder",n.jc(2,5,"lang.returnReason")),n.oc("ngModel",t.reason),n.Db(2),n.oc("ngForOf",t.returnReasons),n.Db(1),n.pc("value",n.jc(5,7,"lang.others")),n.Db(2),n.Rc(n.jc(7,9,"lang.others"))}}function qV(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"mat-label"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"input",37),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).reasonOther=e})),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(2),n.Rc(n.jc(3,2,"lang.precise")),n.Db(2),n.oc("ngModel",t.reasonOther)}}function KV(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"mat-label"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"input",38,39),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).number=e})),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(2),n.Rc(n.jc(3,2,"lang.registeredMailNumber")),n.Db(2),n.oc("ngModel",t.number)}}function YV(t,e){1&t&&(n.Wb(0,"mat-header-cell"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.returnType")))}function JV(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.ic(2,"translate"),n.ic(3,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ","distributed"===t.type?n.jc(2,1,"lang.registeredMailDistributed"):n.jc(3,3,"lang.registeredMailNotDistributed")," ")}}function ZV(t,e){1&t&&(n.Wb(0,"mat-header-cell"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.registeredMailNumber")))}function tR(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.number," ")}}function eR(t,e){1&t&&(n.Wb(0,"mat-header-cell"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.registeredMailReceivedDate")))}function iR(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.receivedDate," ")}}function nR(t,e){1&t&&(n.Wb(0,"mat-header-cell"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.returnReason")))}function aR(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc("",t.returnReason," ")}}function sR(t,e){1&t&&(n.Wb(0,"mat-header-cell"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.cancel")))}function oR(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell"),n.Wb(1,"button",40),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).rollbackReception(i)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",41),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.oc("title",n.jc(2,1,"lang.cancel")))}function rR(t,e){1&t&&n.Rb(0,"mat-header-row")}function cR(t,e){1&t&&n.Rb(0,"mat-row")}function lR(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",12),n.Wb(1,"form",13),n.Wb(2,"div"),n.Wb(3,"mat-form-field"),n.Wb(4,"mat-select",14),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().type=e}))("ngModelChange",(function(e){n.Dc(t);const i=n.hc();return i.changeType(e),i.focusRegisteredMailNumber(),i.receivedDate=i.today})),n.ic(5,"translate"),n.Wb(6,"mat-option",15),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Wb(9,"mat-option",15),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Oc(12,HV,9,10,"mat-form-field",16),n.Oc(13,XV,8,11,"mat-form-field",17),n.Oc(14,qV,5,4,"mat-form-field",17),n.ic(15,"translate"),n.Oc(16,KV,6,4,"mat-form-field",17),n.Wb(17,"div",18),n.Wb(18,"button",19),n.dc("click",(function(){n.Dc(t);const e=n.hc();return e.receiveAcknowledgement(),e.focusRegisteredMailNumber()})),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(21,"mat-table",20),n.Ub(22,21),n.Oc(23,YV,3,3,"mat-header-cell",22),n.Oc(24,JV,4,5,"mat-cell",23),n.Tb(),n.Ub(25,24),n.Oc(26,ZV,3,3,"mat-header-cell",22),n.Oc(27,tR,2,1,"mat-cell",23),n.Tb(),n.Ub(28,25),n.Oc(29,eR,3,3,"mat-header-cell",22),n.Oc(30,iR,2,1,"mat-cell",23),n.Tb(),n.Ub(31,26),n.Oc(32,nR,3,3,"mat-header-cell",22),n.Oc(33,aR,2,1,"mat-cell",23),n.Tb(),n.Ub(34,27),n.Oc(35,sR,3,3,"mat-header-cell",22),n.Oc(36,oR,4,3,"mat-cell",23),n.Tb(),n.Oc(37,rR,1,0,"mat-header-row",28),n.Oc(38,cR,1,0,"mat-row",29),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(1),n.oc("formGroup",t.adminFormGroup),n.Db(3),n.pc("placeholder",n.jc(5,16,"lang.returnType")),n.oc("ngModel",t.type),n.Db(2),n.oc("value","distributed"),n.Db(1),n.Rc(n.jc(8,18,"lang.registeredMailDistributed")),n.Db(2),n.oc("value","notDistributed"),n.Db(1),n.Rc(n.jc(11,20,"lang.registeredMailNotDistributed")),n.Db(2),n.oc("ngIf","notDistributed"===t.type||"distributed"===t.type),n.Db(1),n.oc("ngIf","notDistributed"===t.type),n.Db(1),n.oc("ngIf","notDistributed"===t.type&&t.reason===n.jc(15,22,"lang.others")),n.Db(2),n.oc("ngIf","notDistributed"===t.type||"distributed"===t.type),n.Db(2),n.oc("disabled",!t.adminFormGroup.valid),n.Db(1),n.Rc(n.jc(20,24,"lang.validate")),n.Db(2),n.oc("dataSource",t.dataSource),n.Db(16),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns)}}let dR=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.http=t,this.notify=e,this.headerService=i,this.functions=n,this.appService=a,this.translate=s,this._formBuilder=o,this.dialog=r,this.loading=!1,this.today=new Date,this.receivedDate=this.today,this.displayedColumns=["type","number","receivedDate","returnReason","rollback"],this.returnReasons=[this.translate.instant("lang.returnReasonCannotAccess"),this.translate.instant("lang.returnReasonNotClaimed"),this.translate.instant("lang.returnReasonRejected"),this.translate.instant("lang.returnReasonUnknown")]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.arReception"));const t=[X.I.pattern(/(2C|2D|RW) ?([0-9]{3} ?[0-9]{3} ?[0-9]{4}) ?([0-9])/),X.I.required];this.adminFormGroup=this._formBuilder.group({type:["",X.I.required],number:["",t],receivedDate:[""],returnReason:[""],returnReasonOther:[""]}),this.loading=!1,this.dataSource=new vt.p([]),this.returnReasons.sort(),this.adminFormGroup.controls.number.valueChanges.pipe(Object(pt.a)(500),Object(mt.a)(()=>this.receiveAcknowledgement())).subscribe()}receiveAcknowledgement(){const t={type:this.type,number:this.number,receivedDate:this.functions.formatDateObjectToDateString(this.receivedDate),returnReason:this.reason,status:void 0};if(!this.functions.empty(this.number)&&this.adminFormGroup.get("number").valid){if("notDistributed"===this.type){if(!this.adminFormGroup.get("receivedDate").valid)return void this.notify.error(this.translate.instant("lang.fieldsNotValid"));if(!this.adminFormGroup.get("returnReason").valid)return void this.notify.error(this.translate.instant("lang.selectReturnReason"));if(this.reason===this.translate.instant("lang.others")&&this.functions.empty(this.reasonOther))return void this.notify.error(this.translate.instant("lang.fieldsNotValid"));this.reason!==this.translate.instant("lang.others")||this.functions.empty(this.reasonOther)||(t.returnReason=this.reasonOther)}this.http.put("../rest/registeredMails/acknowledgement",t).pipe(Object(mt.a)(e=>{if(e.canRescan){t.status=e.previousStatus;let i=this.translate.instant("lang.confirmRescanToNotDistributed");"distributed"===t.type&&(i=this.translate.instant("lang.confirmRescanToDistributed")),this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.confirmRescanTitle"),msg:i}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>Object(r.a)(this,void 0,void 0,(function*(){yield this.rollbackReception(t),this.receiveAcknowledgement()})))).subscribe()}else{this.notify.success(this.translate.instant("lang.arReceived")),t.status=e.previousStatus;const i=this.dataSource.data;i.unshift(t),this.dataSource.data=i,this.number="",this.receivedDate=this.today,this.reason="",this.reasonOther="",this.focusRegisteredMailNumber()}}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}rollbackReception(t){return Object(r.a)(this,void 0,void 0,(function*(){return new Promise(e=>{this.http.put("../rest/registeredMails/acknowledgement/rollback",t).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.receptionCanceled"));const i=this.dataSource.data;i.splice(i.indexOf(t),1),this.dataSource.data=i,this.focusRegisteredMailNumber(),e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}))}focusRegisteredMailNumber(){setTimeout(()=>{this.numberInput.nativeElement.focus()},0)}changeType(t){"distributed"===t?this.adminFormGroup.get("receivedDate").disable():this.adminFormGroup.get("receivedDate").enable()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(_t.a),n.Qb(w.a),n.Qb(g.e),n.Qb(X.h),n.Qb(q.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-acknowledgement-reception"]],viewQuery:function(t,e){var i;1&t&&n.Xc(BV,!0),2&t&&n.yc(i=n.ec())&&(e.numberInput=i.first)},decls:13,vars:8,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[2,"display","contents",3,"formGroup"],["formControlName","type",3,"ngModel","placeholder","ngModelChange"],[3,"value"],["appearance","outline","style","cursor:pointer;margin-top: 10px;",3,"click",4,"ngIf"],[4,"ngIf"],[2,"text-align","center"],["mat-raised-button","","color","primary","type","button",3,"disabled","click"],[3,"dataSource"],["matColumnDef","type"],[4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","number"],["matColumnDef","receivedDate"],["matColumnDef","returnReason"],["matColumnDef","rollback"],[4,"matHeaderRowDef"],[4,"matRowDef","matRowDefColumns"],["appearance","outline",2,"cursor","pointer","margin-top","10px",3,"click"],["matInput","","readonly","","formControlName","receivedDate","required","",2,"cursor","pointer",3,"ngModel","matDatepicker","placeholder","max","ngModelChange"],["matSuffix","",3,"for",4,"ngIf"],["picker",""],["matSuffix","",3,"for"],["formControlName","returnReason","required","",3,"ngModel","placeholder","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["matInput","","name","returnReasonOther","formControlName","returnReasonOther",3,"ngModel","ngModelChange"],["type","text","matInput","","required","","formControlName","number",3,"ngModel","ngModelChange"],["numberInput",""],["mat-icon-button","","color","primary",3,"title","click"],[1,"fa","fa-undo","fa-2x"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,UV,2,0,"div",8),n.Oc(12,lR,39,26,"mat-card",9),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,V.c,K.a,X.K,X.v,X.m,Y.c,ee.a,X.u,X.k,W.p,k.b,vt.o,vt.c,vt.i,vt.b,vt.k,vt.n,Y.g,J.b,X.d,ae.h,X.F,ae.f,ae.j,Y.j,P.s,vt.h,vt.a,S.a,vt.j,vt.m],pipes:[g.d],encapsulation:2}),t})();const hR=["snav2"],uR=["adminMenuTemplate"],pR=["appSearchResultList"],bR=["appCriteriaTool"];function fR(t,e){1&t&&n.Rb(0,"div",17)}const mR=function(t){return{width:t}};let gR=(()=>{class t{constructor(t,e,i,a,s,o){this.translate=e,this.headerService=i,this.viewContainerRef=a,this.appService=s,this.functions=o,this.searchTerm="",this.filtersChange=new n.o,this.loadingResult=!1,t.queryParams.subscribe(t=>{this.functions.empty(t.value)||(this.searchTerm=t.value)})}ngOnInit(){this.headerService.sideBarAdmin=!0,this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.headerService.setHeader(this.translate.instant("lang.searchMails"),"","")}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(o.a),n.Qb(g.e),n.Qb(y.a),n.Qb(n.T),n.Qb(w.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(hR,!0),n.Kc(uR,!0),n.Xc(pR,!0),n.Kc(bR,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.appSearchResultList=i.first),n.yc(i=n.ec())&&(e.appCriteriaTool=i.first))},decls:21,vars:16,consts:[[1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[2,"width","100%","padding-bottom","10px",3,"isLoadingResult","searchUrlGenerated","loaded"],["appCriteriaTool",""],["id","toolTemplate",2,"width","100%"],[1,"container"],[1,"container-content"],[3,"searchTerm","appCriteriaTool","sidenavRight","loadingResult"],["appSearchResultList",""],["position","end","autoFocus","false",1,"panel-right",2,"overflow-x","hidden",3,"fixedInViewport","opened","mode","ngStyle"],["snav2",""],["id","panelTemplate"],["id","filterTemplate"]],template:function(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-sidenav-container",0),n.Oc(1,fR,1,0,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Wb(10,"div",6),n.Wb(11,"app-criteria-tool",7,8),n.dc("searchUrlGenerated",(function(e){return n.Dc(t),n.zc(17).launchSearch(e,!0)}))("loaded",(function(){return n.Dc(t),n.zc(17).initSavedCriteria()})),n.Vb(),n.Rb(13,"div",9),n.Vb(),n.Vb(),n.Wb(14,"div",10),n.Wb(15,"div",11),n.Wb(16,"app-search-result-list",12,13),n.dc("loadingResult",(function(t){return e.loadingResult=t})),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(18,"mat-sidenav",14,15),n.Rb(20,"div",16),n.Vb(),n.Vb()}if(2&t){const t=n.zc(12);n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.oc("isLoadingResult",e.loadingResult),n.Db(3),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("searchTerm",e.searchTerm)("appCriteriaTool",t)("sidenavRight",e.sidenavRight),n.Db(2),n.oc("fixedInViewport",e.appService.getViewMode())("opened",(e.appService.getViewMode(),!1))("mode",e.appService.getViewMode()?"over":"side")("ngStyle",n.vc(14,mR,e.appService.getViewMode()?"80%":"30%"))}},directives:[I.e,I.f,Ot,We,$D,Ok,I.d,P.w],styles:[".bg-head-content[_ngcontent-%COMP%]{flex-direction:column;padding-bottom:70px}.dragPreview[_ngcontent-%COMP%]{text-align:center;border-radius:5px;background:#fff;padding:10px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);color:#135f7f}.banner-opened[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:10px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;background:#1a80ab;width:100%}.banner-opened[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#fff}.banner-opened[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#1a80ab;height:1px}.banner-opened[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{display:flex;font-size:16px}.banner-opened[_ngcontent-%COMP%] .content-item[_ngcontent-%COMP%]{flex:1;padding-left:20px;padding-right:20px}.banner-opened[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .private[_ngcontent-%COMP%]{font-style:italic;display:flex;justify-content:flex-end;align-items:center}.banner-closed[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:10px;position:relative;width:100%}.banner-closed[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#fff}.followIcon[_ngcontent-%COMP%]{color:#f99830}.folder-info[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.badge-folder[_ngcontent-%COMP%]{cursor:pointer;background:#f99830;margin:5px;font-size:12px;border-radius:3px;opacity:.8;max-width:250px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.filterBadges[_ngcontent-%COMP%]{width:100%}.filterBadges[_ngcontent-%COMP%] > .badge-eraser[_ngcontent-%COMP%]{margin:5px;background:none;cursor:pointer;color:#fff;font-size:20px}.filterBadges[_ngcontent-%COMP%] > .label[_ngcontent-%COMP%]{white-space:inherit}.filterBadges[_ngcontent-%COMP%] > .badge-search[_ngcontent-%COMP%]{margin:5px;background:#fff;color:#135f7f;cursor:pointer}.filtersContent[_ngcontent-%COMP%]{width:100%;display:flex}.filtersContent[_ngcontent-%COMP%] .orderTool[_ngcontent-%COMP%]{flex:1}.basket-order[_ngcontent-%COMP%]{color:#fff;width:300px;padding-left:10px;padding-right:10px;height:55px}.basket-order[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{font-size:30px}.basket-order[_ngcontent-%COMP%] .mat-select-value{color:#fff}.basket-order[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.basket-order[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border:2px solid #fff;border-radius:30px;display:flex;align-items:center}.basket-order[_ngcontent-%COMP%] .mat-form-field-prefix{padding-left:15px;padding-right:10px}.basket-order[_ngcontent-%COMP%] .mat-form-field-label-wrapper{color:#fff}.basket-order[_ngcontent-%COMP%] .mat-select-arrow{color:#fff;margin-right:25px}.basket-order[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.ascDescTool[_ngcontent-%COMP%] .mat-fab[_ngcontent-%COMP%]{background:#135f7f;border:2px solid #fff;color:#fff!important;box-shadow:none}"]}),t})();function vR(t,e){1&t&&(n.Wb(0,"div",11),n.Rb(1,"mat-spinner",12),n.Vb())}function _R(t,e){1&t&&n.Rb(0,"mat-spinner")}function yR(t,e){if(1&t&&(n.Wb(0,"div",20),n.Oc(1,_R,1,0,"mat-spinner",21),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("ngIf",t.isLoadingResults)}}function xR(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-expansion-panel",22),n.Wb(1,"mat-expansion-panel-header"),n.Wb(2,"mat-panel-title",23),n.Wb(3,"mat-checkbox",24),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).mainDocument=e})),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.oc("title",t.mainDocumentInformation.canConvert?"":"Aucune version pdf trouv\xe9!"),n.Db(3),n.oc("ngModel",t.mainDocument)("disabled",!t.mainDocumentInformation.canConvert),n.Db(1),n.Sc("",n.jc(5,4,"lang.mainDocument")," ")}}function CR(t,e){if(1&t&&(n.Wb(0,"div",36),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Sc(" ",t.chronoMaster," ")}}function OR(t,e){if(1&t&&(n.Wb(0,"div",36),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Sc(" ",t.chrono," ")}}function DR(t,e){if(1&t&&(n.Wb(0,"div",37),n.Qc(1),n.ic(2,"ucfirst"),n.ic(3,"translate"),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Tc(" ",n.jc(2,2,n.jc(3,4,"lang.for"))," : ",t.recipients," ")}}function wR(t,e){if(1&t&&(n.Wb(0,"div",36),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Sc(" ",t.creator," ")}}function MR(t,e){if(1&t&&(n.Wb(0,"div",38),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Sc(" ",t.type," ")}}function kR(t,e){if(1&t&&(n.Wb(0,"div",40),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2).$implicit;n.Db(1),n.Sc(" ",n.jc(2,1,"lang.attachment_"+t.status)," ")}}function SR(t,e){if(1&t&&(n.Wb(0,"div"),n.Oc(1,kR,3,3,"div",39),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf","SIGN"===t.status)}}function IR(t,e){if(1&t&&(n.Wb(0,"mat-list-option",30),n.Wb(1,"div"),n.Oc(2,CR,2,1,"div",31),n.Oc(3,OR,2,1,"div",31),n.Oc(4,DR,4,6,"div",32),n.Oc(5,wR,2,1,"div",31),n.Rb(6,"div",33),n.ic(7,"shorten"),n.Oc(8,MR,2,1,"div",34),n.Oc(9,SR,2,1,"div",21),n.Wb(10,"div",35),n.ic(11,"fullDate"),n.Qc(12),n.ic(13,"date"),n.Vb(),n.Vb(),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2).$implicit,a=n.hc(2);n.Ib("disabled",!t.canConvert),n.oc("title",t.canConvert?"":"Aucune version pdf trouv\xe9!")("disabled",!t.canConvert)("value",t.id),n.Db(1),n.Gb("printedFolderElement-item ",i.key,""),n.Db(1),n.oc("ngIf",!a.functions.empty(t.chronoMaster)),n.Db(1),n.oc("ngIf",!a.functions.empty(t.chrono)),n.Db(1),n.oc("ngIf",!a.functions.empty(t.recipients)),n.Db(1),n.oc("ngIf",!a.functions.empty(t.creator)),n.Db(1),n.oc("title",t.label)("innerHTML",n.lc(7,18,t.label,150,"..."),n.Ec),n.Db(2),n.oc("ngIf",!a.functions.empty(t.type)),n.Db(1),n.oc("ngIf",!a.functions.empty(t.status)),n.Db(1),n.oc("title",n.jc(11,22,t.creationDate)),n.Db(2),n.Sc(" ",n.kc(13,24,t.creationDate,"dd/MM/y HH:mm")," ")}}function PR(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",26),n.Wb(1,"mat-expansion-panel"),n.Wb(2,"mat-expansion-panel-header"),n.Wb(3,"mat-panel-title",23),n.Wb(4,"mat-checkbox",27),n.dc("change",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc(2);return e?a.toggleAllElements(e.checked,i.key):null}))("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(7,"mat-selection-list",28),n.Oc(8,IR,14,27,"mat-list-option",29),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(4),n.oc("checked",e.selectedPrintedFolderElement[t.key].value.length>0&&e.selectedPrintedFolderElement[t.key].value.length===e.printedFolderElement[t.key].length)("indeterminate",e.selectedPrintedFolderElement[t.key].value.length>0&&e.selectedPrintedFolderElement[t.key].value.length!==e.printedFolderElement[t.key].length),n.Db(1),n.Sc("",n.jc(6,5,"lang."+t.key)," "),n.Db(2),n.oc("formControl",e.selectedPrintedFolderElement[t.key]),n.Db(1),n.oc("ngForOf",e.printedFolderElement[t.key])}}function VR(t,e){if(1&t&&(n.Ub(0),n.Oc(1,PR,9,7,"div",25),n.Tb()),2&t){const t=e.$implicit,i=n.hc(2);n.Db(1),n.oc("ngIf",i.printedFolderElement[t.key].length>0)}}function RR(t,e){if(1&t){const t=n.Xb();n.Oc(0,yR,2,1,"div",13),n.Wb(1,"div",14),n.Wb(2,"mat-slide-toggle",15),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().summarySheet=e}))("change",(function(e){n.Dc(t);const i=n.hc();return!!e.checked&&i.openSummarySheet()})),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb(),n.Wb(5,"div",14),n.Wb(6,"mat-slide-toggle",16),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().withSeparator=e})),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Wb(9,"div",17),n.Oc(10,xR,6,6,"mat-expansion-panel",18),n.Oc(11,VR,2,1,"ng-container",19),n.ic(12,"keyvalue"),n.Vb()}if(2&t){const t=n.hc();n.oc("ngIf",t.isLoadingResults),n.Db(2),n.oc("ngModel",t.summarySheet),n.Db(1),n.Sc("",n.jc(4,7,"lang.attachSummarySheet")," "),n.Db(3),n.oc("ngModel",t.withSeparator),n.Db(1),n.Sc("",n.jc(8,9,"lang.generateSeparators")," "),n.Db(3),n.oc("ngIf",null!==t.mainDocumentInformation.format),n.Db(1),n.oc("ngForOf",n.jc(12,11,t.printedFolderElement))}}let jR=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.data=n,this.dialogRef=a,this.functions=s,this.sortPipe=o,this.dialog=r,this.loading=!0,this.document=[],this.mainDocument=!1,this.summarySheet=!1,this.withSeparator=!1,this.isLoadingResults=!1,this.mainDocumentInformation={},this.printedFolderElement={attachments:[],notes:[],emails:[],acknowledgementReceipts:[],linkedResources:[],linkedResourcesAttachments:[]},this.selectedPrintedFolderElement={}}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){Object.keys(this.printedFolderElement).forEach(t=>{this.selectedPrintedFolderElement[t]=new X.i({value:[],disabled:!1})}),this.getMainDocInfo(),this.getAttachments(),this.getEmails(),this.getAcknowledgementReceips(),this.getNotes(),yield this.getLinkedResources(),this.loading=!1}))}getMainDocInfo(){return new Promise(t=>{this.http.get(`../rest/resources/${this.data.resId}/fileInformation`).pipe(Object(l.a)(t=>Object.assign(Object.assign({},t.information),{id:this.data.resId})),Object(mt.a)(e=>{this.mainDocumentInformation=e,t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}getAttachments(){return new Promise(t=>{this.http.get("../rest/resources/"+this.data.resId+"/attachments").pipe(Object(l.a)(t=>(t.attachments=t.attachments.map(t=>({id:t.resId,label:t.title,chrono:this.functions.empty(t.chrono)?this.translate.instant("lang.undefined"):t.chrono,type:t.typeLabel,creationDate:t.creationDate,canConvert:t.canConvert,status:t.status})),t.attachments)),Object(mt.a)(e=>{this.printedFolderElement.attachments=this.sortPipe.transform(e,"chrono"),t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}getLinkedResources(){return new Promise(t=>{this.http.get(`../rest/resources/${this.data.resId}/linkedResources`).pipe(Object(mt.a)(e=>Object(r.a)(this,void 0,void 0,(function*(){for(let t=0;t<e.linkedResources.length;t++)this.printedFolderElement.linkedResources.push({id:e.linkedResources[t].resId,label:e.linkedResources[t].subject,chrono:this.functions.empty(e.linkedResources[t].chrono)?this.translate.instant("lang.undefined"):e.linkedResources[t].chrono,creationDate:e.linkedResources[t].documentDate,canConvert:e.linkedResources[t].canConvert}),yield this.getLinkedAttachments(e.linkedResources[t]);t(!0)}))),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}getLinkedAttachments(t){return new Promise(e=>{this.http.get(`../rest/resources/${t.resId}/attachments`).pipe(Object(l.a)(e=>(e.attachments=e.attachments.map(e=>({id:e.resId,label:e.title,resIdMaster:t.resId,chronoMaster:t.chrono,chrono:this.functions.empty(e.chrono)?this.translate.instant("lang.undefined"):e.chrono,type:e.typeLabel,creationDate:e.creationDate,canConvert:e.canConvert,status:e.status})),e.attachments)),Object(mt.a)(t=>{this.printedFolderElement.linkedResourcesAttachments=this.printedFolderElement.linkedResourcesAttachments.concat(this.sortPipe.transform(t,"chronoMaster")),e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),e(!1),Object(c.a)(!1)))).subscribe()})}getEmails(){return new Promise(t=>{this.http.get(`../rest/resources/${this.data.resId}/emails?type=email`).pipe(Object(l.a)(t=>(t.emails=t.emails.map(t=>({id:t.id,recipients:t.recipients,creationDate:t.creation_date,label:this.functions.empty(t.object)?`<i>${this.translate.instant("lang.emptySubject")}<i>`:t.object,canConvert:!0})),t.emails)),Object(mt.a)(e=>{this.printedFolderElement.emails=this.sortPipe.transform(e,"creationDate"),t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}getNotes(){return new Promise(t=>{this.http.get(`../rest/resources/${this.data.resId}/notes`).pipe(Object(l.a)(t=>(t.notes=t.notes.map(t=>({id:t.id,creator:`${t.firstname} ${t.lastname}`,creationDate:t.creation_date,label:t.value,canConvert:!0})),t.notes)),Object(mt.a)(e=>{this.printedFolderElement.notes=this.sortPipe.transform(e,"creationDate"),t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}getAcknowledgementReceips(){return new Promise(t=>{this.http.get(`../rest/resources/${this.data.resId}/acknowledgementReceipts?type=ar`).pipe(Object(l.a)(t=>t.map(t=>{let e,i;return e=this.functions.empty(t.contact.email)?this.translate.instant("lang.contactDeleted"):t.contact.email,i=this.functions.empty(t.contact.firstname)||this.functions.empty(t.contact.lastname)?this.translate.instant("lang.contactDeleted"):`${t.contact.firstname} ${t.contact.lastname}`,{id:t.id,sender:!1,recipients:"html"===t.format?e:i,creationDate:t.creationDate,label:this.translate.instant("html"===t.format?"lang.ARelectronic":"lang.ARPaper"),canConvert:!0}})),Object(mt.a)(e=>{this.printedFolderElement.acknowledgementReceipts=this.sortPipe.transform(e,"creationDate"),t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}toggleAllElements(t,e){this.selectedPrintedFolderElement[e].setValue(t?this.printedFolderElement[e].filter(t=>t.canConvert).map(t=>t.id):[])}onSubmit(){this.isLoadingResults=!0,this.http.post("../rest/resources/folderPrint",this.formatPrintedFolder(),{responseType:"blob"}).pipe(Object(mt.a)(t=>{const e=document.createElement("a");let i,n,a,s;e.href=window.URL.createObjectURL(t),i=new Date,n=i.getDate(),a=i.getMonth()+1,s=i.getFullYear(),n<10&&(n="0"+n),a<10&&(a="0"+a),i=n+"-"+a+"-"+s,e.setAttribute("download","export_maarch_"+i+".pdf"),document.body.appendChild(e),e.click()}),Object(Xt.a)(()=>this.isLoadingResults=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}formatPrintedFolder(){const t={withSeparator:this.withSeparator,summarySheet:this.summarySheet,resources:[]},e={resId:this.data.resId,document:this.mainDocument};return Object.keys(this.printedFolderElement).forEach(t=>{e[t]=this.selectedPrintedFolderElement[t].value.length!==this.printedFolderElement[t].length?this.selectedPrintedFolderElement[t].value:this.selectedPrintedFolderElement[t].value.length>0?"ALL":[]}),t.resources.push(e),t}openSummarySheet(){this.dialog.open(Cw,{panelClass:"maarch-full-height-modal",width:"800px",data:{paramMode:!0}}).afterClosed().pipe(Object(mt.a)(t=>{this.summarySheet=t}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isEmptySelection(){let t=!0;return Object.keys(this.printedFolderElement).forEach(e=>{this.selectedPrintedFolderElement[e].value.length>0&&(t=!1)}),(this.summarySheet||this.mainDocument)&&(t=!1),t}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.a),n.Qb(q.h),n.Qb(_t.a),n.Qb(Wt.a),n.Qb(q.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],features:[n.Cb([Wt.a])],decls:17,vars:12,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],[2,"flex","1"],["mat-icon-button","",3,"title","click"],[1,"fa","fa-times"],[2,"padding-bottom","10px"],["class","loading",4,"ngIf","ngIfElse"],["loadingTemplate",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","color","primary",3,"disabled","click"],[1,"loading"],[2,"margin","auto"],["class","example-loading-shade",4,"ngIf"],[2,"padding","10px"],["color","primary",3,"ngModel","ngModelChange","change"],["color","primary",3,"ngModel","ngModelChange"],[1,"printedFolderContainer"],["hideToggle","","disabled","",3,"title",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"example-loading-shade"],[4,"ngIf"],["hideToggle","","disabled","",3,"title"],[2,"color","#135f7f","font-weight","bold"],["color","primary","disableRipple","",3,"ngModel","disabled","ngModelChange"],["class","printedFolderElement",4,"ngIf"],[1,"printedFolderElement"],["color","primary","disableRipple","",3,"checked","indeterminate","change","click"],["color","primary",1,"printedFolderElement-content",3,"formControl"],["class","printedFolderElement-option","checkboxPosition","before",3,"title","disabled","value",4,"ngFor","ngForOf"],["checkboxPosition","before",1,"printedFolderElement-option",3,"title","disabled","value"],["color","primary","style","flex:1;font-size: 80%;padding-right: 10px;",4,"ngIf"],["color","primary","style","flex:1;display: flex;font-size: 80%;white-space: pre;padding-right: 10px;",4,"ngIf"],[2,"flex","2","padding-right","10px",3,"title","innerHTML"],["color","primary","style","flex:1;font-size: 80%;white-space: pre;padding-right: 10px;",4,"ngIf"],["color","primary",2,"flex","1","justify-content","flex-end","display","flex","font-size","80%",3,"title"],["color","primary",2,"flex","1","font-size","80%","padding-right","10px"],["color","primary",2,"flex","1","display","flex","font-size","80%","white-space","pre","padding-right","10px"],["color","primary",2,"flex","1","font-size","80%","white-space","pre","padding-right","10px"],["style","color: green",4,"ngIf"],[2,"color","green"]],template:function(t,e){if(1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Wb(2,"span",2),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"button",3),n.dc("click",(function(){return e.dialogRef.close()})),n.ic(6,"translate"),n.Rb(7,"mat-icon",4),n.Vb(),n.Vb(),n.Wb(8,"mat-dialog-content",5),n.Oc(9,vR,2,0,"div",6),n.Oc(10,RR,13,13,"ng-template",null,7,n.Pc),n.Vb(),n.Rb(12,"span",8),n.Wb(13,"div",9),n.Wb(14,"button",10),n.dc("click",(function(){return e.onSubmit()})),n.Qc(15),n.ic(16,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.zc(11);n.Db(3),n.Sc(" ",n.jc(4,6,"lang.generateAndDownloadPrintedFolder")," "),n.Db(2),n.oc("title",n.jc(6,8,"lang.close")),n.Db(4),n.oc("ngIf",e.loading)("ngIfElse",t),n.Db(5),n.oc("disabled",e.isLoadingResults||e.isEmptySelection()),n.Db(1),n.Rc(n.jc(16,10,"lang.validate"))}},directives:[q.i,k.b,S.a,q.f,P.t,q.c,V.c,te.a,X.u,X.x,P.s,gt.c,gt.g,gt.h,j.a,R.i,X.j,R.f],pipes:[g.d,P.l,Tt.p,uo,P.f,Tt.u],styles:[".mat-dialog-title[_ngcontent-%COMP%]{padding:10px;display:flex;align-items:center}.modal-container[_ngcontent-%COMP%]{min-height:250px;height:auto;padding-bottom:5px}.modal-body[_ngcontent-%COMP%]{min-height:auto}.loading[_ngcontent-%COMP%]{display:flex;height:100%;width:100%;padding:10px;top:0;left:0}.printedFolderElement-title[_ngcontent-%COMP%]{position:-webkit-sticky;position:sticky;top:-10px;padding:10px;font-size:20px;font-weight:700;color:#135f7f;background:#fff;z-index:1}.printedFolderElement-option[_ngcontent-%COMP%]:nth-child(2n){background:rgba(19,95,127,.1)}.printedFolderElement-item[_ngcontent-%COMP%]{font-size:14px!important;align-items:center;display:grid;grid-template-columns:1fr 2fr 1fr;grid-gap:20px}.attachments[_ngcontent-%COMP%]{grid-template-columns:1fr 2fr 1fr 1fr 1fr}.linkedResourcesAttachments[_ngcontent-%COMP%]{grid-template-columns:1fr 1fr 2fr 1fr 1fr 1fr}.printedFolderContainer[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;grid-gap:20px}.mat-expansion-panel-header[aria-disabled=true][_ngcontent-%COMP%]{color:initial!important}.disabled[_ngcontent-%COMP%]{opacity:.5;cursor:not-allowed}"]}),t})();function AR(t,e){1&t&&(n.Wb(0,"div",9),n.Rb(1,"mat-spinner"),n.Vb())}function WR(t,e){if(1&t&&(n.Wb(0,"mat-form-field",11),n.Rb(1,"mat-icon",12),n.Wb(2,"mat-label"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Rb(5,"input",13),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Fb(t.value.icon),n.Db(2),n.Rc(n.jc(4,4,"lang."+t.key)),n.Db(2),n.oc("value",t.value.value)}}function TR(t,e){if(1&t&&(n.Ub(0),n.Oc(1,WR,6,6,"mat-form-field",10),n.Tb()),2&t){const t=e.$implicit,i=n.hc();n.Db(1),n.oc("ngIf",!i.functions.empty(t.value.value))}}function ER(t,e){if(1&t&&(n.Wb(0,"mat-form-field",11),n.Rb(1,"mat-icon",12),n.Wb(2,"mat-label"),n.Qc(3),n.Vb(),n.Rb(4,"input",13),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Fb(t.value.icon),n.Db(2),n.Rc(t.value.label),n.Db(1),n.oc("value",t.value.value)}}function FR(t,e){if(1&t&&(n.Wb(0,"mat-accordion"),n.Wb(1,"mat-expansion-panel",14),n.Wb(2,"mat-expansion-panel-header"),n.Wb(3,"mat-panel-title"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Oc(6,ER,5,4,"mat-form-field",15),n.ic(7,"keyvalue"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.Sc(" ",n.jc(5,2,"lang.otherInformations")," "),n.Db(2),n.oc("ngForOf",n.jc(7,4,t.customsData))}}let LR=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this.translate=t,this.http=e,this.notify=i,this.dialog=n,this.dialogRef=a,this.data=s,this.appService=o,this.functions=r,this.datePipe=c,this.loading=!1,this.techData={initiator:{label:"initiator",value:"",icon:"fas fa-user"},creationDate:{label:"creationDate",value:"",icon:"fas fa-calendar-day"},size:{label:"filesize",value:"",icon:"fas fa-cubes"},format:{label:"fileFormat",value:"",icon:"far fa-file-archive"},filename:{label:"filename",value:"",icon:"fas fa-quote-right"},docserverPathFile:{label:"docserverPathFile",value:"",icon:"fas fa-terminal"},fingerprint:{label:"fingerprint",value:"",icon:"fas fa-fingerprint"},fulltext:{label:"fulltext",value:"",icon:"far fa-file-alt"}},this.customsData={},this.customs={}}ngOnInit(){this.fetchData()}fetchData(){this.http.get(`../rest/resources/${this.data.resId}/fileInformation`).pipe(Object(mt.a)(t=>{this.techData.format.value=t.information.format,this.techData.fingerprint.value=t.information.fingerprint,this.techData.size.value=this.functions.formatBytes(t.information.filesize),this.techData.fulltext.value=t.information.fulltext_result,this.techData.docserverPathFile.value=t.information.docserverPathFile,this.techData.filename.value=t.information.filename,this.techData.initiator.value=t.information.typistLabel,this.techData.creationDate.value=this.datePipe.transform(t.information.creationDate,"dd/MM/y HH:mm"),this.loading=!1}),p(()=>this.http.get("../rest/customFields")),Object(mt.a)(t=>{t.customFields.filter(t=>"technical"===t.mode).map(t=>{this.customs[t.id]={label:t.label,type:t.type}})}),p(()=>this.http.get("../rest/resources/"+this.data.resId)),Object(mt.a)(t=>{Object.keys(t.customFields).forEach(e=>{this.functions.empty(this.customs[e])||(this.customsData[e]={label:this.customs[e].label,value:t.customFields[e],icon:"fas fa-hashtag"})})}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isEmptyCustom(){return 0===Object.keys(this.customsData).length}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(q.h),n.Qb(q.a),n.Qb(w.a),n.Qb(_t.a),n.Qb(P.f))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:14,vars:15,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],[2,"flex","1",3,"title"],["mat-icon-button","",3,"title","click"],[1,"fa","fa-times"],["mat-dialog-content",""],["class","loading","color","primary",4,"ngIf"],[4,"ngFor","ngForOf"],[4,"ngIf"],["color","primary",1,"loading"],["class","data-item",4,"ngIf"],[1,"data-item"],["matPrefix","","color","primary",2,"width","35px","text-align","center"],["matInput","","readonly","",3,"value"],["expanded",""],["class","data-item",4,"ngFor","ngForOf"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Wb(2,"span",2),n.ic(3,"translate"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Wb(6,"button",3),n.dc("click",(function(){return e.dialogRef.close()})),n.ic(7,"translate"),n.Rb(8,"mat-icon",4),n.Vb(),n.Vb(),n.Wb(9,"div",5),n.Oc(10,AR,2,0,"div",6),n.Oc(11,TR,2,1,"ng-container",7),n.ic(12,"keyvalue"),n.Oc(13,FR,8,6,"mat-accordion",8),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.oc("title",n.jc(3,6,"lang.linkResource")),n.Db(2),n.Sc(" ",n.jc(5,8,"lang.technicalInformations")," "),n.Db(2),n.oc("title",n.jc(7,10,"lang.close")),n.Db(4),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngForOf",n.kc(12,12,e.techData,null)),n.Db(2),n.oc("ngIf",!e.isEmptyCustom()))},directives:[q.i,k.b,S.a,q.f,P.t,P.s,V.c,Y.c,Y.i,Y.g,J.b,gt.a,gt.c,gt.g,gt.h],pipes:[g.d,P.l],styles:[".data-item[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}"]}),t})();function QR(t,e){1&t&&(n.Ub(0),n.Wb(1,"div",2),n.Rb(2,"mat-spinner",3),n.Vb(),n.Tb())}function NR(t,e){if(1&t&&(n.Wb(0,"div",8),n.Wb(1,"div",9),n.ic(2,"fullDate"),n.Qc(3),n.ic(4,"timeAgo"),n.Vb(),n.Wb(5,"div",10),n.Qc(6),n.ic(7,"shorten"),n.Vb(),n.Wb(8,"div",11),n.Qc(9),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.oc("title",n.jc(2,4,t.event_date)),n.Db(2),n.Sc(" ",n.jc(4,6,t.event_date)," "),n.Db(3),n.Sc(" ",n.lc(7,8,t.info,110,"...")," "),n.Db(3),n.Sc(" ",t.userLabel," ")}}function zR(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",12),n.dc("click",(function(){return n.Dc(t),n.hc(3).showMore()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.showMore")))}function BR(t,e){1&t&&(n.Wb(0,"div",13),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noEvent")," "))}function UR(t,e){if(1&t&&(n.Ub(0),n.Oc(1,NR,10,12,"div",5),n.Oc(2,zR,3,3,"button",6),n.Oc(3,BR,3,3,"div",7),n.Tb()),2&t){const t=n.hc(2);n.Db(1),n.oc("ngForOf",t.histories),n.Db(1),n.oc("ngIf",3===t.histories.length),n.Db(1),n.oc("ngIf",0===t.histories.length)}}function $R(t,e){1&t&&(n.Wb(0,"div",13),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.historyDisabled")," "))}function HR(t,e){if(1&t&&(n.Oc(0,UR,4,3,"ng-container",0),n.Oc(1,$R,3,3,"ng-template",null,4,n.Pc)),2&t){const t=n.zc(2),e=n.hc();n.oc("ngIf",!e.disabledHistory)("ngIfElse",t)}}let GR=(()=>{class t{constructor(t,e,i,a){this.translate=t,this.http=e,this.notify=i,this.privilegeService=a,this.loading=!0,this.disabledHistory=!0,this.histories=[],this.resId=null,this.goTo=new n.o}ngOnInit(){this.loading=!0,this.privilegeService.hasCurrentUserPrivilege("view_full_history")||this.privilegeService.hasCurrentUserPrivilege("view_doc_history")?(this.disabledHistory=!1,this.loadHistory(this.resId)):this.loading=!1}loadHistory(t){this.loading=!0,this.http.get(`../rest/history?resId=${t}&limit=3&onlyActions=true`).pipe(Object(mt.a)(t=>{this.histories=t.history}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}showMore(){this.goTo.emit()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(Dt.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-history-workflow-resume"]],inputs:{resId:"resId"},outputs:{goTo:"goTo"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["elseTemplate",""],[1,"loading"],["diameter","35"],["noPrivilegeTemplate",""],["class","historyList",4,"ngFor","ngForOf"],["mat-button","","class","showMore",3,"click",4,"ngIf"],["class","noData",4,"ngIf"],[1,"historyList"],[1,"date",3,"title"],[1,"info"],[1,"date"],["mat-button","",1,"showMore",3,"click"],[1,"noData"]],template:function(t,e){if(1&t&&(n.Oc(0,QR,3,0,"ng-container",0),n.Oc(1,HR,3,2,"ng-template",null,1,n.Pc)),2&t){const t=n.zc(2);n.oc("ngIf",e.loading)("ngIfElse",t)}},directives:[P.t,V.c,P.s,k.b],pipes:[uo,ps,Tt.p,g.d],styles:[".historyList[_ngcontent-%COMP%]{font-size:13px;width:100%;display:grid;grid-template-columns:15% 70% 15%;align-items:center}.historyList[_ngcontent-%COMP%]:nth-child(2n){background:rgba(19,95,127,.1)}.date[_ngcontent-%COMP%]{color:#135f7f}.date[_ngcontent-%COMP%], .info[_ngcontent-%COMP%]{padding:5px}.noData[_ngcontent-%COMP%]{text-align:center;font-size:24px;font-weight:700;opacity:.3}.loading[_ngcontent-%COMP%]{display:flex;justify-content:center;height:100%}.showMore[_ngcontent-%COMP%]{float:right;font-size:10px;position:absolute;right:10px;margin-top:-2px;padding:0;line-height:20px;width:35px;color:#f99830;font-weight:700}"]}),t})();function XR(t,e){1&t&&(n.Ub(0),n.Wb(1,"div",2),n.Rb(2,"mat-spinner",3),n.Vb(),n.Tb())}function qR(t,e){if(1&t&&(n.Wb(0,"div",7),n.Wb(1,"div",8),n.ic(2,"fullDate"),n.Qc(3),n.ic(4,"timeAgo"),n.Vb(),n.Wb(5,"div",9),n.Qc(6),n.ic(7,"shorten"),n.Vb(),n.Wb(8,"div",10),n.Qc(9),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.oc("title",n.jc(2,6,t.creation_date)),n.Db(2),n.Sc(" ",n.jc(4,8,t.creation_date)," "),n.Db(2),n.oc("title",t.value),n.Db(1),n.Sc(" ",n.lc(7,10,t.value,110,"...")," "),n.Db(3),n.Tc(" ",t.firstname," ",t.lastname," ")}}function KR(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",11),n.dc("click",(function(){return n.Dc(t),n.hc(2).showMore()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.showMore")))}function YR(t,e){1&t&&(n.Wb(0,"div",12),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noNote")," "))}function JR(t,e){if(1&t&&(n.Oc(0,qR,10,14,"div",4),n.Oc(1,KR,3,3,"button",5),n.Oc(2,YR,3,3,"div",6)),2&t){const t=n.hc();n.oc("ngForOf",t.notes),n.Db(1),n.oc("ngIf",3===t.notes.length),n.Db(1),n.oc("ngIf",0===t.notes.length)}}let ZR=(()=>{class t{constructor(t,e,i){this.translate=t,this.http=e,this.notify=i,this.loading=!0,this.notes=[],this.resId=null,this.goTo=new n.o}ngOnInit(){this.loading=!0,this.loadNotes(this.resId)}loadNotes(t){this.loading=!0,this.http.get(`../rest/resources/${t}/notes?limit=3`).pipe(Object(mt.a)(t=>{this.notes=t.notes}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}showMore(){this.goTo.emit()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-note-resume"]],inputs:{resId:"resId"},outputs:{goTo:"goTo"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["elseTemplate",""],[1,"loading"],["diameter","35"],["class","noteList",4,"ngFor","ngForOf"],["mat-button","","class","showMore",3,"click",4,"ngIf"],["class","noData",4,"ngIf"],[1,"noteList"],[1,"date",3,"title"],[1,"info",3,"title"],[1,"date"],["mat-button","",1,"showMore",3,"click"],[1,"noData"]],template:function(t,e){if(1&t&&(n.Oc(0,XR,3,0,"ng-container",0),n.Oc(1,JR,3,3,"ng-template",null,1,n.Pc)),2&t){const t=n.zc(2);n.oc("ngIf",e.loading)("ngIfElse",t)}},directives:[P.t,V.c,P.s,k.b],pipes:[uo,ps,Tt.p,g.d],styles:[".noteList[_ngcontent-%COMP%]{font-size:13px;width:100%;display:grid;grid-template-columns:15% 70% 15%;align-items:center}.noteList[_ngcontent-%COMP%]:nth-child(2n){background:rgba(19,95,127,.1)}.date[_ngcontent-%COMP%]{color:#135f7f}.date[_ngcontent-%COMP%], .info[_ngcontent-%COMP%]{padding:5px}.noData[_ngcontent-%COMP%]{text-align:center;font-size:24px;font-weight:700;opacity:.3}.loading[_ngcontent-%COMP%]{display:flex;justify-content:center;height:100%}.showMore[_ngcontent-%COMP%]{float:right;font-size:10px;position:absolute;right:10px;margin-top:-2px;padding:0;line-height:20px;width:35px;color:#f99830;font-weight:700}"]}),t})();function tj(t,e){1&t&&(n.Ub(0),n.Wb(1,"div",2),n.Rb(2,"mat-spinner",3),n.Vb(),n.Tb())}function ej(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div",10),n.ic(2,"fullDate"),n.Qc(3),n.ic(4,"timeAgo"),n.Vb(),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("title",n.jc(2,2,t.modificationDate)),n.Db(2),n.Sc(" ",n.jc(4,4,t.modificationDate)," ")}}function ij(t,e){if(1&t&&(n.Wb(0,"div",10),n.ic(1,"fullDate"),n.Qc(2),n.ic(3,"timeAgo"),n.Vb()),2&t){const t=n.hc().$implicit;n.oc("title",n.jc(1,2,t.creationDate)),n.Db(2),n.Sc(" ",n.jc(3,4,t.creationDate)," ")}}function nj(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",7),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).showAttachment(i)})),n.Oc(1,ej,5,6,"ng-container",0),n.Oc(2,ij,4,6,"ng-template",null,1,n.Pc),n.Wb(4,"div",8),n.Qc(5),n.ic(6,"shorten"),n.Vb(),n.Wb(7,"div",9),n.Qc(8),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.zc(3);n.Db(1),n.oc("ngIf",null!==t.modificationDate)("ngIfElse",i),n.Db(4),n.Sc(" ",n.lc(6,4,t.title,110,"...")," "),n.Db(3),n.Sc(" ",t.typeLabel," ")}}function aj(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",11),n.dc("click",(function(){return n.Dc(t),n.hc(2).showMore()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.showMore")))}function sj(t,e){1&t&&(n.Wb(0,"div",12),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noAttachment")," "))}function oj(t,e){if(1&t&&(n.Oc(0,nj,9,8,"div",4),n.Oc(1,aj,3,3,"button",5),n.Oc(2,sj,3,3,"div",6)),2&t){const t=n.hc();n.oc("ngForOf",t.attachments),n.Db(1),n.oc("ngIf",3===t.attachments.length),n.Db(1),n.oc("ngIf",0===t.attachments.length)}}let rj=(()=>{class t{constructor(t,e,i,a){this.translate=t,this.http=e,this.notify=i,this.dialog=a,this.loading=!0,this.attachments=[],this.resId=null,this.goTo=new n.o}ngOnInit(){this.loading=!0,this.loadAttachments(this.resId)}loadAttachments(t){this.loading=!0,this.http.get(`../rest/resources/${t}/attachments?limit=3`).pipe(Object(mt.a)(t=>{this.attachments=t.attachments}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}showAttachment(t){this.dialogRef=this.dialog.open(pu,{height:"99vh",width:"99vw",disableClose:!0,panelClass:"modal-container",data:{resId:t.resId}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"success"===t),Object(mt.a)(()=>{this.loadAttachments(this.resId)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}showMore(){this.goTo.emit()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-attachments-resume"]],inputs:{resId:"resId"},outputs:{goTo:"goTo"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["elseTemplate",""],[1,"loading"],["diameter","35"],["class","attachmentsList",3,"click",4,"ngFor","ngForOf"],["mat-button","","class","showMore",3,"click",4,"ngIf"],["class","noData",4,"ngIf"],[1,"attachmentsList",3,"click"],[1,"info"],[1,"attachmentType"],[1,"date",3,"title"],["mat-button","",1,"showMore",3,"click"],[1,"noData"]],template:function(t,e){if(1&t&&(n.Oc(0,tj,3,0,"ng-container",0),n.Oc(1,oj,3,3,"ng-template",null,1,n.Pc)),2&t){const t=n.zc(2);n.oc("ngIf",e.loading)("ngIfElse",t)}},directives:[P.t,V.c,P.s,k.b],pipes:[Tt.p,uo,ps,g.d],styles:[".attachmentsList[_ngcontent-%COMP%]{cursor:pointer;font-size:13px;width:100%;display:grid;grid-template-columns:15% 65% 20%;align-items:center}.attachmentsList[_ngcontent-%COMP%]:nth-child(2n){background:rgba(19,95,127,.1)}.date[_ngcontent-%COMP%]{color:#135f7f}.date[_ngcontent-%COMP%], .info[_ngcontent-%COMP%]{padding:5px}.attachmentType[_ngcontent-%COMP%]{font-size:10px;color:#135f7f}.noData[_ngcontent-%COMP%]{text-align:center;font-size:24px;font-weight:700;opacity:.3}.loading[_ngcontent-%COMP%]{display:flex;justify-content:center;height:100%}.showMore[_ngcontent-%COMP%]{float:right;font-size:10px;position:absolute;right:10px;margin-top:-2px;padding:0;line-height:20px;width:35px;color:#f99830;font-weight:700}"]}),t})();function cj(t,e){1&t&&(n.Ub(0),n.Wb(1,"div",2),n.Rb(2,"mat-spinner",3),n.Vb(),n.Tb())}function lj(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div",10),n.ic(2,"fullDate"),n.Qc(3),n.ic(4,"timeAgo"),n.Vb(),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("title",n.jc(2,2,t.send_date)),n.Db(2),n.Sc(" ",n.jc(4,4,t.send_date)," ")}}function dj(t,e){if(1&t&&(n.Wb(0,"div",12),n.ic(1,"fullDate"),n.Qc(2),n.ic(3,"translate"),n.Vb()),2&t){const t=n.hc(2).$implicit;n.oc("title",n.jc(1,2,t.send_date)),n.Db(2),n.Sc(" ",n.jc(3,4,"lang.sendError")," ")}}function hj(t,e){if(1&t&&n.Oc(0,dj,4,6,"div",11),2&t){const t=n.hc().$implicit;n.oc("ngIf","ERROR"===t.status)}}function uj(t,e){if(1&t&&(n.Wb(0,"div",7),n.Oc(1,lj,5,6,"ng-container",0),n.Oc(2,hj,1,1,"ng-template",null,1,n.Pc),n.Rb(4,"div",8),n.ic(5,"shorten"),n.Wb(6,"div",9),n.Qc(7),n.Vb(),n.Vb()),2&t){const t=e.$implicit,i=n.zc(3);n.Db(1),n.oc("ngIf","SENT"===t.status)("ngIfElse",i),n.Db(3),n.Ib("arType","aknowledgement_receipt"===t.type),n.oc("innerHTML",n.lc(5,6,t.object,110,"..."),n.Ec),n.Db(3),n.Sc(" ",t.userInfo," ")}}function pj(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",13),n.dc("click",(function(){return n.Dc(t),n.hc(2).showMore()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.showMore")))}function bj(t,e){1&t&&(n.Wb(0,"div",14),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noSendmail")," "))}function fj(t,e){if(1&t&&(n.Oc(0,uj,8,10,"div",4),n.Oc(1,pj,3,3,"button",5),n.Oc(2,bj,3,3,"div",6)),2&t){const t=n.hc();n.oc("ngForOf",t.mails),n.Db(1),n.oc("ngIf",3===t.mails.length),n.Db(1),n.oc("ngIf",0===t.mails.length)}}let mj=(()=>{class t{constructor(t,e,i,a){this.translate=t,this.http=e,this.notify=i,this.functions=a,this.loading=!0,this.mails=[],this.resId=null,this.goTo=new n.o}ngOnInit(){this.loading=!0,this.loadMails(this.resId)}loadMails(t){this.loading=!0,this.http.get(`../rest/externalSummary/${t}?limit=3`).pipe(Object(l.a)(t=>(t.elementsSend=t.elementsSend.map(t=>{let e=t.object,i=t.type;return"aknowledgement_receipt"==t.type&&this.functions.empty(t.object)?(e=this.translate.instant("lang.ARPaper"),i="aknowledgement_receipt"):"aknowledgement_receipt"==t.type&&t.object.startsWith("[AR]")&&(e=this.translate.instant("lang.ARelectronic"),i="aknowledgement_receipt"),{object:this.functions.empty(e)?`<i>${this.translate.instant("lang.emptySubject")}<i>`:e,send_date:t.send_date,status:t.status,userInfo:t.userInfo,type:i}}),t)),Object(mt.a)(t=>{this.mails=t.elementsSend}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}showMore(){this.goTo.emit()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-mail-resume"]],inputs:{resId:"resId"},outputs:{goTo:"goTo"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["elseTemplate",""],[1,"loading"],["diameter","35"],["class","mailList",4,"ngFor","ngForOf"],["mat-button","","class","showMore",3,"click",4,"ngIf"],["class","noData",4,"ngIf"],[1,"mailList"],[1,"info",3,"innerHTML"],[1,"date"],[1,"date",3,"title"],["class","error",3,"title",4,"ngIf"],[1,"error",3,"title"],["mat-button","",1,"showMore",3,"click"],[1,"noData"]],template:function(t,e){if(1&t&&(n.Oc(0,cj,3,0,"ng-container",0),n.Oc(1,fj,3,3,"ng-template",null,1,n.Pc)),2&t){const t=n.zc(2);n.oc("ngIf",e.loading)("ngIfElse",t)}},directives:[P.t,V.c,P.s,k.b],pipes:[Tt.p,uo,ps,g.d],styles:[".mailList[_ngcontent-%COMP%]{font-size:13px;width:100%;display:grid;grid-template-columns:15% 70% 15%;align-items:center}.mailList[_ngcontent-%COMP%]:nth-child(2n){background:rgba(19,95,127,.1)}.date[_ngcontent-%COMP%]{color:#135f7f}.date[_ngcontent-%COMP%], .info[_ngcontent-%COMP%]{padding:5px}.noData[_ngcontent-%COMP%]{text-align:center;font-size:24px;font-weight:700;opacity:.3}.loading[_ngcontent-%COMP%]{display:flex;justify-content:center;height:100%}.showMore[_ngcontent-%COMP%]{float:right;font-size:10px;position:absolute;right:10px;margin-top:-2px;padding:0;line-height:20px;width:35px;color:#f99830;font-weight:700}.error[_ngcontent-%COMP%]{padding:5px;color:#8e3e52}.arType[_ngcontent-%COMP%], .error[_ngcontent-%COMP%]{font-style:italic}.arType[_ngcontent-%COMP%]{color:#666}"]}),t})();var gj=i("FtGj");const vj=["recipientsField"],_j=["copiesField"],yj=["invisibleCopiesField"];function xj(t,e){1&t&&(n.Wb(0,"div",32),n.Rb(1,"mat-spinner",33),n.Vb())}function Cj(t,e){if(1&t&&n.Rb(0,"input",34),2&t){const t=n.hc();n.oc("value",t.currentSender.email)}}function Oj(t,e){if(1&t&&(n.Wb(0,"mat-option",36),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Tc(" ",t.label," (",t.email,") ")}}function Dj(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-select",35),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().currentSender=e})),n.Oc(1,Oj,2,3,"mat-option",18),n.ic(2,"sortBy"),n.Vb()}if(2&t){const t=n.hc();n.oc("compareWith",t.compareSenders)("ngModel",t.currentSender),n.Db(1),n.oc("ngForOf",n.kc(2,3,t.availableSenders,"label"))}}function wj(t,e){1&t&&n.Rb(0,"mat-icon",39)}function Mj(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",37),n.dc("removed",(function(){n.Dc(t);const i=e.$implicit;return n.hc().remove(i,"recipients")}))("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().remove(i,"recipients")})),n.Qc(1),n.Oc(2,wj,1,0,"mat-icon",38),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc();n.Ib("badFormat",t.badFormat),n.oc("cdkDragDisabled","SENT"==i.emailStatus||"ERROR"==i.emailStatus)("removable",i.canManageMail())("title",t.email),n.Db(1),n.Tc(" ",t.label,"",t.label!==t.email?" ("+t.email+")":""," "),n.Db(1),n.oc("ngIf",i.canManageMail())}}function kj(t,e){if(1&t&&(n.Wb(0,"span",41),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Sc(" (",t.email,")")}}function Sj(t,e){if(1&t&&(n.Wb(0,"mat-option",36),n.Qc(1),n.Oc(2,kj,2,1,"span",40),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t.label,""),n.Db(1),n.oc("ngIf","contactGroup"!==t.type)}}function Ij(t,e){1&t&&n.Rb(0,"mat-icon",39)}function Pj(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",47),n.dc("removed",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).remove(i,"copies")}))("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).remove(i,"recipients")})),n.Qc(1),n.Oc(2,Ij,1,0,"mat-icon",38),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.Ib("badFormat",t.badFormat),n.oc("cdkDragDisabled","SENT"==i.emailStatus||"ERROR"==i.emailStatus)("removable",i.canManageMail())("title",t.email),n.Db(1),n.Tc(" ",t.label,"",t.label!==t.email?" ("+t.email+")":""," "),n.Db(1),n.oc("ngIf",i.canManageMail())}}function Vj(t,e){if(1&t&&(n.Wb(0,"span",41),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Sc(" (",t.email,")")}}function Rj(t,e){if(1&t&&(n.Wb(0,"mat-option",36),n.Qc(1),n.Oc(2,Vj,2,1,"span",40),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t.label,""),n.Db(1),n.oc("ngIf","contactGroup"!==t.type)}}const jj=function(){return["recipients-list","invcopies-list"]};function Aj(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"span",7),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-chip-list",42,43),n.dc("cdkDropListDropped",(function(e){return n.Dc(t),n.hc().drop(e)})),n.Oc(6,Pj,3,8,"mat-chip",44),n.Wb(7,"input",14,45),n.dc("matChipInputTokenEnd",(function(e){return n.Dc(t),n.hc().add(e,"copies")}))("focus",(function(){return n.Dc(t),n.hc().resetAutocomplete()}))("paste",(function(e){return n.Dc(t),n.hc().onPaste(e,"copies")})),n.Vb(),n.Vb(),n.Wb(9,"mat-autocomplete",16,46),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc().addEmail(e.option.value,"copies")})),n.Oc(11,Rj,3,3,"mat-option",18),n.ic(12,"async"),n.Vb(),n.Vb()}if(2&t){const t=n.zc(5),e=n.zc(10),i=n.hc();n.Db(2),n.Sc("",n.jc(3,10,"lang.copieShort"),"\xa0:\xa0"),n.Db(2),n.oc("cdkDropListConnectedTo",n.uc(14,jj))("cdkDropListData",i.copies),n.Db(2),n.oc("ngForOf",i.copies),n.Db(1),n.oc("formControl",i.recipientsInput)("matChipInputFor",t)("matChipInputSeparatorKeyCodes",i.separatorKeysCodes)("matChipInputAddOnBlur",!0)("matAutocomplete",e),n.Db(4),n.oc("ngForOf",n.jc(12,12,i.filteredEmails))}}function Wj(t,e){1&t&&n.Rb(0,"mat-icon",39)}function Tj(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",47),n.dc("removed",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).remove(i,"invisibleCopies")}))("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).remove(i,"recipients")})),n.Qc(1),n.Oc(2,Wj,1,0,"mat-icon",38),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.Ib("badFormat",t.badFormat),n.oc("cdkDragDisabled","SENT"==i.emailStatus||"ERROR"==i.emailStatus)("removable",i.canManageMail())("title",t.email),n.Db(1),n.Tc(" ",t.label,"",t.label!==t.email?" ("+t.email+")":""," "),n.Db(1),n.oc("ngIf",i.canManageMail())}}function Ej(t,e){if(1&t&&(n.Wb(0,"span",41),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Sc(" (",t.email,")")}}function Fj(t,e){if(1&t&&(n.Wb(0,"mat-option",36),n.Qc(1),n.Oc(2,Ej,2,1,"span",40),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t.label,""),n.Db(1),n.oc("ngIf","contactGroup"!==t.type)}}const Lj=function(){return["recipients-list","copies-list"]};function Qj(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"span",7),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-chip-list",48,49),n.dc("cdkDropListDropped",(function(e){return n.Dc(t),n.hc().drop(e)})),n.Oc(6,Tj,3,8,"mat-chip",44),n.Wb(7,"input",14,50),n.dc("matChipInputTokenEnd",(function(e){return n.Dc(t),n.hc().add(e,"invisibleCopies")}))("focus",(function(){return n.Dc(t),n.hc().resetAutocomplete()}))("paste",(function(e){return n.Dc(t),n.hc().onPaste(e,"invisibleCopies")})),n.Vb(),n.Vb(),n.Wb(9,"mat-autocomplete",16,51),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc().addEmail(e.option.value,"invisibleCopies")})),n.Oc(11,Fj,3,3,"mat-option",18),n.ic(12,"async"),n.Vb(),n.Vb()}if(2&t){const t=n.zc(5),e=n.zc(10),i=n.hc();n.Db(2),n.Sc("",n.jc(3,10,"lang.invisibleCopyShort"),"\xa0:\xa0"),n.Db(2),n.oc("cdkDropListConnectedTo",n.uc(14,Lj))("cdkDropListData",i.invisibleCopies),n.Db(2),n.oc("ngForOf",i.invisibleCopies),n.Db(1),n.oc("formControl",i.recipientsInput)("matChipInputFor",t)("matChipInputSeparatorKeyCodes",i.separatorKeysCodes)("matChipInputAddOnBlur",!0)("matAutocomplete",e),n.Db(4),n.oc("ngForOf",n.jc(12,12,i.filteredEmails))}}function Nj(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",52),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc();return i.stopPropagation(),s.currentEmailAttachTool=a.key,s.openSummarySheetModal(a.key)})),n.Rb(1,"mat-icon",53),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(),a=n.zc(42);n.oc("disabled",!i.canManageMail()||"summarySheet"!==t.key&&0===i.emailAttachTool[t.key].list.length||"summarySheet"===t.key&&!i.functions.empty(i.emailAttach.summarySheet))("title",i.emailAttachTool[t.key].title)("matMenuTriggerFor",a),n.Db(1),n.Fb(i.emailAttachTool[t.key].icon),n.Ib("activeButton","document"===t.key&&i.emailAttach.document.isLinked||"document"!==t.key&&i.emailAttach[t.key].length>0)}}function zj(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",61),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit,i=n.hc(2).$implicit;return n.hc().toggleAttachMail(e,i.key,"original")})),n.Qc(1),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(1),n.Sc(".",t.format,"")}}function Bj(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",61),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit,i=n.hc(2).$implicit;return n.hc().toggleAttachMail(e,i.key,"pdf")})),n.Qc(1,".pdf"),n.Vb()}}function Uj(t,e){if(1&t&&(n.Ub(0),n.Qc(1),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Sc(" ",t.chrono," \xa0 ")}}function $j(t,e){1&t&&(n.Wb(0,"span",62),n.Qc(1),n.ic(2,"lowercase"),n.ic(3,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("\xa0(",n.jc(2,1,n.jc(3,3,"lang.signed")),")"))}function Hj(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"button",54),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.Wb(2,"div",55),n.Wb(3,"div"),n.Oc(4,zj,2,1,"button",56),n.Rb(5,"br"),n.Oc(6,Bj,2,0,"button",56),n.Vb(),n.Wb(7,"div"),n.Wb(8,"span",57),n.Wb(9,"div",58),n.Oc(10,Uj,2,1,"ng-container",19),n.Qc(11),n.Vb(),n.Wb(12,"div"),n.Qc(13),n.ic(14,"shorten"),n.Vb(),n.Wb(15,"div",59),n.Qc(16),n.Oc(17,$j,4,5,"span",60),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Rb(18,"mat-divider"),n.Tb()}if(2&t){const t=e.$implicit,i=n.hc(2).$implicit,a=n.hc();n.Db(1),n.oc("disabled",a.isSelectedAttachMail(t,i.key)),n.Db(3),n.oc("ngIf","SIGN"!==t.status),n.Db(2),n.oc("ngIf",!a.functions.empty(t.convertedDocument)),n.Db(2),n.oc("title",t.label),n.Db(2),n.oc("ngIf",!a.functions.empty(t.chrono)),n.Db(1),n.Sc(" ",t.creator," "),n.Db(2),n.Sc(" ",n.lc(14,9,t.label,45,"...")," "),n.Db(3),n.Sc(" ",t.typeLabel,""),n.Db(1),n.oc("ngIf","SIGN"===t.status)}}function Gj(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Hj,19,13,"ng-container",24),n.Tb()),2&t){const t=n.hc().$implicit,e=n.hc();n.Db(1),n.oc("ngForOf",e.emailAttachTool[t.key].list)}}function Xj(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Gj,2,1,"ng-container",19),n.Tb()),2&t){const t=e.$implicit,i=n.hc();n.Db(1),n.oc("ngIf",t.key===i.currentEmailAttachTool)}}function qj(t,e){1&t&&n.Rb(0,"mat-icon",39)}function Kj(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",63),n.dc("removed",(function(){return n.Dc(t),n.hc().removeAttachMail(0,"document")})),n.Rb(1,"i",64),n.Qc(2),n.ic(3,"shorten"),n.Wb(4,"small",41),n.Qc(5),n.Vb(),n.Oc(6,qj,1,0,"mat-icon",38),n.Vb()}if(2&t){const t=n.hc();n.oc("removable",t.canManageMail())("title",t.emailAttach.document.chrono+" - "+t.emailAttach.document.label),n.Db(2),n.Sc("\xa0",n.lc(3,6,t.emailAttach.document.label,25,"..."),"\xa0"),n.Db(3),n.Tc("(",t.emailAttach.document.format," - ",t.emailAttach.document.size,")"),n.Db(1),n.oc("ngIf",t.canManageMail())}}function Yj(t,e){1&t&&n.Rb(0,"mat-icon",39)}function Jj(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",63),n.dc("removed",(function(){n.Dc(t);const i=e.index,a=n.hc(2).$implicit;return n.hc().removeAttachMail(i,a.key)})),n.Rb(1,"i"),n.Qc(2),n.ic(3,"shorten"),n.Wb(4,"small",41),n.Qc(5),n.Vb(),n.Oc(6,Yj,1,0,"mat-icon",38),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2).$implicit,a=n.hc();n.oc("removable",a.canManageMail())("title",t.title),n.Db(1),n.Gb("",a.emailAttachTool[i.key].icon," attachLabel"),n.Db(1),n.Sc("\xa0",n.lc(3,9,t.label,25,"..."),"\xa0"),n.Db(3),n.Tc("(",t.format,"",a.functions.empty(t.size)?"":" - "+t.size,")"),n.Db(1),n.oc("ngIf",a.canManageMail())}}function Zj(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Jj,7,13,"mat-chip",65),n.Tb()),2&t){const t=n.hc().$implicit,e=n.hc();n.Db(1),n.oc("ngForOf",e.emailAttach[t.key])}}function tA(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Zj,2,1,"ng-container",19),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf","document"!==t.key)}}function eA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"plugin-select-search",68),n.dc("afterSelected",(function(e){return n.Dc(t),n.hc(2).mergeEmailTemplate(e)})),n.ic(1,"translate"),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(2);n.oc("label",n.jc(1,4,"lang.emailModel"))("placeholderLabel",n.jc(2,6,"lang.emailModel"))("datas",t.availableEmailModels)("formControlSelect",t.templateEmailListForm)}}function iA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"plugin-select-search",68,69),n.dc("afterSelected",(function(e){return n.Dc(t),n.hc(2).mergeSignEmailTemplate(e)})),n.ic(2,"translate"),n.ic(3,"translate"),n.Vb()}if(2&t){const t=n.hc(2);n.oc("label",n.jc(2,4,"lang.emailSignatures"))("placeholderLabel",n.jc(3,6,"lang.emailSignatures"))("datas",t.availableSignEmailModels)("formControlSelect",t.emailSignListForm)}}function nA(t,e){if(1&t&&(n.Wb(0,"div",66),n.Oc(1,eA,3,8,"plugin-select-search",67),n.Oc(2,iA,4,8,"plugin-select-search",67),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.availableEmailModels.length>0),n.Db(1),n.oc("ngIf",t.availableSignEmailModels.length>0)}}function aA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"textarea",70),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().emailContent=e})),n.Vb()}if(2&t){const t=n.hc();n.oc("ngModel",t.emailContent)}}function sA(t,e){if(1&t&&n.Rb(0,"app-document-viewer",71,72),2&t){const t=n.hc();n.oc("editMode",!1)("base64",t.emailContent)}}function oA(t,e){if(1&t&&(n.Wb(0,"button",79),n.Rb(1,"mat-icon",80),n.Vb()),2&t){n.hc();const t=n.zc(3);n.oc("matMenuTriggerFor",t)}}function rA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",81),n.dc("click",(function(){return n.Dc(t),n.hc(2).switchEditionMode()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.switchInPlainText")," "))}function cA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",81),n.dc("click",(function(){return n.Dc(t),n.hc(2).switchEditionMode()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.switchInHtml")," "))}function lA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",82),n.dc("click",(function(){return n.Dc(t),n.hc(2).onSubmit()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(2);n.oc("disabled",0===t.recipients.length||t.emailsubject.length>256),n.Db(1),n.Rc(n.jc(2,2,"lang.send"))}}function dA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",83),n.dc("click",(function(){return n.Dc(t),n.hc(2).deleteEmail()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(2);n.oc("disabled",t.headerService.user.id!==t.emailCreatorId),n.Db(1),n.Rc(n.jc(2,2,"lang.delete"))}}function hA(t,e){if(1&t&&(n.Wb(0,"div",73),n.Oc(1,oA,2,1,"button",74),n.Wb(2,"mat-menu",null,75),n.Oc(4,rA,3,3,"button",76),n.Oc(5,cA,3,3,"button",76),n.Vb(),n.Oc(6,lA,3,4,"button",77),n.Oc(7,dA,3,4,"button",78),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.canManageMail()&&t.privilegeService.hasCurrentUserPrivilege("sendmail")),n.Db(1),n.Fb("attachListMenu"),n.Db(2),n.oc("ngIf",t.htmlMode),n.Db(1),n.oc("ngIf",!t.htmlMode),n.Db(1),n.oc("ngIf",t.canManageMail()&&t.privilegeService.hasCurrentUserPrivilege("sendmail")),n.Db(1),n.oc("ngIf",t.data.emailId&&"email"===t.data.emailType)}}const uA=function(){return["copies-list","invcopies-list"]};let pA=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c,l){this.http=t,this.notify=e,this.data=i,this.dialog=n,this.dialogRef=a,this.functions=s,this.contactService=o,this.privilegeService=r,this.headerService=c,this.translate=l,this.loading=!0,this.separatorKeysCodes=[gj.c,gj.p,gj.i,190],this.availableEmailModels=[],this.availableSignEmailModels=[],this.resourceData=null,this.availableSenders=[],this.currentSender={},this.recipients=[],this.copies=[],this.invisibleCopies=[],this.recipientsInput=new X.i,this.emailSignListForm=new X.i,this.templateEmailListForm=new X.i,this.showCopies=!1,this.showInvisibleCopies=!1,this.emailCreatorId=null,this.emailId=null,this.emailsubject="",this.emailStatus="WAITING",this.emailContent="",this.currentEmailAttachTool="",this.emailAttachTool={document:{icon:"fa fa-file",title:this.translate.instant("lang.attachMainDocument"),list:[]},notes:{icon:"fas fa-pen-square",title:this.translate.instant("lang.attachNote"),list:[]},attachments:{icon:"fa fa-paperclip",title:this.translate.instant("lang.attachAttachment"),list:[]},summarySheet:{icon:"fas fa-scroll",title:this.translate.instant("lang.attachSummarySheet"),list:[]}},this.emailAttach={},this.encodedSummarySheet=null,this.summarySheetUnits=[],this.canManage=!1,this.pdfMode=!1,this.htmlMode=!0}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){Object.keys(this.emailAttachTool).forEach(t=>{this.emailAttach[t]="document"===t?{id:this.data.resId,isLinked:!1,original:!1}:[]}),yield this.getAttachElements(),this.data.emailId&&"email"===this.data.emailType?yield this.getEmailData(this.data.emailId):this.data.emailId&&"acknowledgementReceipt"===this.data.emailType&&(yield this.getAcknowledgementReceiptData(this.data.emailId)),this.canManageMail()&&(this.initEmailModelsList(),this.initEmailsList(),this.initSignEmailModelsList(),yield this.getResourceData(),yield this.getUserEmails(),"DRAFT"!==this.emailStatus&&this.setDefaultInfo()),setTimeout(()=>{this.initMce()},0)}))}initMce(){tinymce.init({selector:"textarea#emailSignature",base_url:"../node_modules/tinymce/",setup:t=>{t.on("init",t=>{this.loading=!1})},readonly:"SENT"===this.emailStatus,height:"400",suffix:".min",language:this.translate.instant("lang.langISO").replace("-","_"),language_url:`../node_modules/tinymce-i18n/langs/${this.translate.instant("lang.langISO").replace("-","_")}.js`,menubar:!1,statusbar:!1,plugins:["autolink"],external_plugins:{maarch_b64image:"../../src/frontend/plugins/tinymce/maarch_b64image/plugin.min.js"},toolbar_sticky:!0,toolbar_drawer:"floating",toolbar:"SENT"!==this.emailStatus&&"undo redo | fontselect fontsizeselect | bold italic underline strikethrough forecolor | maarch_b64image | alignleft aligncenter alignright alignjustify bullist numlist outdent indent | removeformat"})}add(t,e){const i=t.input,n=t.value;(n||"").trim()&&this[e].push({label:n.trim(),email:n.trim(),badFormat:this.isBadEmailFormat(n.trim())}),i&&(i.value="")}isBadEmailFormat(t){return null===t.trim().match(/^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$/g)}closeModal(t=""){tinymce.remove(),this.dialogRef.close(t)}addEmail(t,e){this[e].splice(this[e].length-1,1),"contactGroup"===t.type?this.http.get("../rest/contactsGroups/"+t.id).pipe(Object(l.a)(t=>t.contactsGroup.contacts.filter(t=>!this.functions.empty(t.email)).map(t=>({label:t.contact,email:t.email}))),Object(mt.a)(t=>{this[e]=this[e].concat(t)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe():this[e].push({label:t.label,email:t.email})}mergeEmailTemplate(t){this.templateEmailListForm.reset(),this.http.post(`../rest/templates/${t}/mergeEmail`,{data:{resId:this.data.resId}}).pipe(Object(mt.a)(t=>{const e=document.createElement("div");if(e.innerHTML=tinymce.get("emailSignature").getContent(),e.getElementsByClassName("signature").length>0){const i=e.getElementsByClassName("signature")[0].innerHTML;e.getElementsByClassName("signature")[0].remove(),tinymce.get("emailSignature").setContent(`${e.innerHTML}${t.mergedDocument}<div class="signature">${i}</div>`)}else tinymce.get("emailSignature").setContent(`${tinymce.get("emailSignature").getContent()}${t.mergedDocument}`);this.htmlMode||tinymce.get("emailSignature").setContent(tinymce.get("emailSignature").getContent({format:"text"})),this.functions.empty(t.mergedSubject)||(this.emailsubject=t.mergedSubject)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}mergeSignEmailTemplate(t){this.emailSignListForm.reset(),this.http.get("../rest/currentUser/emailSignatures/"+t).pipe(Object(mt.a)(t=>{const e=document.createElement("div");e.innerHTML=tinymce.get("emailSignature").getContent(),e.getElementsByClassName("signature").length>0?(e.getElementsByClassName("signature")[0].remove(),tinymce.get("emailSignature").setContent(`${e.innerHTML}<div class="signature">${t.emailSignature.content}</div>`)):tinymce.get("emailSignature").setContent(`${tinymce.get("emailSignature").getContent()}<div class="signature">${t.emailSignature.content}</div>`),this.htmlMode||tinymce.get("emailSignature").setContent(tinymce.get("emailSignature").getContent({format:"text"}))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}remove(t,e){if(this.canManageMail()){const i=this[e].indexOf(t);i>=0&&this[e].splice(i,1)}}getEmailData(t){return new Promise(e=>{this.http.get("../rest/emails/"+t).pipe(Object(mt.a)(t=>{this.emailCreatorId=t.userId,this.recipients=t.recipients.map(t=>({label:t,email:t,badFormat:this.isBadEmailFormat(t)})),this.copies=t.cc.map(t=>({label:t,email:t,badFormat:this.isBadEmailFormat(t)})),this.invisibleCopies=t.cci.map(t=>({label:t,email:t,badFormat:this.isBadEmailFormat(t)})),this.showCopies=this.copies.length>0,this.showInvisibleCopies=this.invisibleCopies.length>0,this.emailsubject=t.object,this.emailStatus=t.status,this.currentSender={entityId:t.sender.entityId,label:t.sender.label,email:t.sender.email},this.emailContent=t.body,Object.keys(t.document).forEach(e=>{-1===["id","isLinked","original"].indexOf(e)?(this.emailAttach[e]=[],t.document[e].forEach(t=>{const i=this.emailAttachTool[e].list.filter(e=>e.id===t.id||e.id===t);i.length>0&&(this.emailAttach[e]=this.emailAttach[e].concat(i.map(e=>Object.assign(Object.assign({},e),{format:t.original||void 0===t.original?e.format:"pdf",original:t.original,size:t.original||void 0===t.original?e.size:e.convertedDocument.size}))))})):"isLinked"===e&&!0===t.document.isLinked&&(this.emailAttach.document.isLinked=!0,this.emailAttach.document.format=t.document.original||void 0===t.document.original?this.emailAttachTool.document.list[0].format:"pdf",this.emailAttach.document.original=t.document.original,this.emailAttach.document.size=this.emailAttach.document.original?this.emailAttachTool.document.list[0].size:this.emailAttachTool.document.list[0].convertedDocument.size)}),e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),e(!1),Object(c.a)(!1)))).subscribe()})}getAcknowledgementReceiptData(t){return new Promise(e=>{this.http.get("../rest/acknowledgementReceipts/"+t).pipe(Object(mt.a)(t=>{this.currentSender={label:t.acknowledgementReceipt.userLabel,email:t.acknowledgementReceipt.userLabel},this.recipients=[{label:this.functions.empty(t.acknowledgementReceipt.contact)?this.translate.instant("lang.contactDeleted"):this.contactService.formatContact(t.acknowledgementReceipt.contact),email:this.functions.empty(t.acknowledgementReceipt.contact.email)?this.translate.instant("lang.withoutEmail"):t.acknowledgementReceipt.contact.email}],this.emailStatus="SENT"}),p(()=>this.http.get(`../rest/acknowledgementReceipts/${t}/content`)),Object(mt.a)(t=>{this.pdfMode="pdf"===t.format,this.pdfMode?(this.emailsubject=this.translate.instant("lang.ARPaper"),this.emailContent=t.encodedDocument,this.loading=!1):(this.emailsubject=this.translate.instant("lang.ARelectronic"),this.emailContent=this.b64DecodeUnicode(t.encodedDocument)),e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),e(!1),Object(c.a)(!1)))).subscribe()})}getResourceData(){return new Promise(t=>{this.http.get(`../rest/resources/${this.data.resId}?light=true`).pipe(Object(mt.a)(e=>{this.resourceData=e,this.emailAttach.document.chrono=this.resourceData.chrono,this.emailAttach.document.label=this.resourceData.subject,t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}setDefaultInfo(){this.emailsubject=`[${this.resourceData.chrono}] ${this.resourceData.subject}`,this.emailsubject=this.emailsubject.substring(0,70),this.currentSender=0===this.headerService.user.entities.length?this.availableSenders[0]:this.availableSenders.filter(t=>t.entityId===this.headerService.user.entities[0].id).length>0?this.availableSenders.filter(t=>t.entityId===this.headerService.user.entities[0].id)[0]:this.availableSenders[0],this.functions.empty(this.resourceData.senders)||this.resourceData.senders.forEach(t=>{this.setSender(t)})}setSender(t){switch(t.type){case"contact":this.http.get("../rest/contacts/"+t.id).pipe(Object(mt.a)(t=>{this.functions.empty(t.email)||this.recipients.push({label:this.contactService.formatContact(t),email:t.email})}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe();break;case"user":this.http.get("../rest/users/"+t.id).pipe(Object(mt.a)(t=>{this.functions.empty(t.mail)||this.recipients.push({label:this.contactService.formatContact(t),email:t.mail})}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}getUserEmails(){return new Promise(t=>{this.http.get("../rest/currentUser/availableEmails").pipe(Object(mt.a)(e=>{this.availableSenders=e.emails,t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}getAttachElements(){return new Promise(t=>{this.http.get(`../rest/resources/${this.data.resId}/emailsInitialization`).pipe(Object(mt.a)(e=>{Object.keys(e).forEach(t=>{"resource"===t?(this.emailAttachTool.document.list=[],this.functions.empty(e[t])||(this.emailAttachTool.document.list=[e[t]])):this.emailAttachTool[t].list=e[t].map(e=>(e.attachInMail&&this.toggleAttachMail(e,t,"SIGN"===e.status?"pdf":"original"),Object.assign(Object.assign({},e),{original:void 0===e.original||e.original,title:void 0!==e.chrono?`${e.chrono} - ${e.label} (${e.typeLabel})`:`${e.label} (${e.typeLabel})`})))}),t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}initEmailsList(){this.recipientsInput.valueChanges.pipe(Object(d.a)(t=>null!==t),Object(pt.a)(300),Object(mt.a)(t=>{0===t.length&&(this.filteredEmails=Object(c.a)([]))}),Object(d.a)(t=>t.length>2),Object(bt.a)(),Object(ft.a)(t=>this.http.get("../rest/autocomplete/correspondents",{params:{search:t,searchEmails:"true"}})),Object(mt.a)(t=>{t=t.filter(t=>!this.functions.empty(t.email)||"contactGroup"===t.type).map(t=>{let e="";return e="user"===t.type||"contact"===t.type?this.functions.empty(t.firstname)&&this.functions.empty(t.lastname)?t.company:t.firstname+" "+t.lastname:"contactGroup"===t.type?`${t.firstname} ${t.lastname}`:""+t.lastname,{id:t.id,type:t.type,label:e,email:t.email}}),this.filteredEmails=Object(c.a)(t)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}initEmailModelsList(){this.http.get(`../rest/resources/${this.data.resId}/emailTemplates`).pipe(Object(mt.a)(t=>{this.availableEmailModels=t.templates}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}initSignEmailModelsList(){this.http.get("../rest/currentUser/emailSignatures").pipe(Object(mt.a)(t=>{this.availableSignEmailModels=t.emailSignatures}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}resetAutocomplete(){this.filteredEmails=Object(c.a)([])}onSubmit(){this.emailStatus="WAITING",null===this.data.emailId?this.isAllEmailRightFormat()?""===this.emailsubject?this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.confirm"),msg:this.translate.instant("lang.warnEmptySubject")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.createEmail(!0)})).subscribe():this.createEmail(!0):this.notify.error(this.translate.instant("lang.badEmailsFormat")):this.updateEmail(!0)}createEmail(t=!0){return Object(r.a)(this,void 0,void 0,(function*(){0!==this.summarySheetUnits.length&&(yield this.createSummarySheet()),this.http.post("../rest/emails",this.formatEmail()).pipe(Object(mt.a)(()=>{"DRAFT"===this.emailStatus||this.notify.success(this.translate.instant("lang.sendingEmail")+"..."),t&&this.closeModal("success")}),Object(Xt.a)(()=>{"DRAFT"===this.emailStatus&&this.closeModal("success")}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}))}deleteEmail(){this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete("../rest/emails/"+this.data.emailId)),Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.emailDeleted")),this.closeModal("success")}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}updateEmail(t=!0){return Object(r.a)(this,void 0,void 0,(function*(){0!==this.summarySheetUnits.length&&(yield this.createSummarySheet()),this.http.put("../rest/emails/"+this.data.emailId,this.formatEmail()).pipe(Object(mt.a)(()=>{"DRAFT"===this.emailStatus||this.notify.success(this.translate.instant("lang.sendingEmail")+"..."),t&&this.closeModal("success")}),Object(Xt.a)(()=>{"DRAFT"===this.emailStatus&&this.closeModal("success")}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}))}saveDraft(){this.canManageMail()?(this.emailStatus="DRAFT",null===this.data.emailId?this.functions.empty(tinymce.get("emailSignature").getContent())?this.closeModal():this.createEmail(!0):this.updateEmail(!0)):this.closeModal()}drop(t){t.previousContainer!==t.container&&Object(lo.i)(t.previousContainer.data,t.container.data,t.previousIndex,t.currentIndex)}toggleAttachMail(t,e,i){"document"===e?!1===this.emailAttach.document.isLinked&&(this.emailAttach.document.isLinked=!0,this.emailAttach.document.format="pdf"!==i?t.format:"pdf",this.emailAttach.document.original="pdf"!==i,this.emailAttach.document.size="pdf"===i?t.convertedDocument.size:t.size):0===this.emailAttach[e].filter(e=>e.id===t.id).length&&this.emailAttach[e].push(Object.assign(Object.assign({},t),{format:"pdf"!==i?t.format:"pdf",original:"pdf"!==i,size:"pdf"===i?t.convertedDocument.size:t.size}))}removeAttachMail(t,e){"document"===e?(this.emailAttach.document.isLinked=!1,this.emailAttach.document.original=!1):this.emailAttach[e].splice(t,1)}switchEditionMode(){this.htmlMode=!this.htmlMode,this.htmlMode?($(".tox-editor-header").show(),tinymce.get("emailSignature").setContent(tinymce.get("emailSignature").getContent())):this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.switchInPlainText"),msg:this.translate.instant("lang.confirmSwitchInPlanText")}}).afterClosed().pipe(Object(mt.a)(t=>{"ok"===t?($(".tox-editor-header").hide(),tinymce.get("emailSignature").setContent(tinymce.get("emailSignature").getContent({format:"text"}))):this.htmlMode=!this.htmlMode})).subscribe()}formatEmail(){let t={};Object.keys(this.emailAttach).forEach(e=>{this.functions.empty(this.emailAttach[e])||("document"===e?t={id:this.emailAttach[e].id,isLinked:this.emailAttach[e].isLinked,original:this.emailAttach[e].original}:t[e]=this.emailAttach[e].map("notes"===e?t=>t.id:t=>({id:t.id,original:t.original})))});const e={email:this.currentSender.email,entityId:this.functions.empty(this.currentSender.entityId)?null:this.currentSender.entityId};return{document:t,sender:e,recipients:this.recipients.map(t=>t.email),cc:this.showCopies?this.copies.map(t=>t.email):[],cci:this.showInvisibleCopies?this.invisibleCopies.map(t=>t.email):[],object:this.emailsubject,body:this.htmlMode?tinymce.get("emailSignature").getContent():tinymce.get("emailSignature").getContent({format:"text"}),isHtml:!0,status:this.emailStatus}}isSelectedAttachMail(t,e){return"document"===e?this.emailAttach.document.isLinked:this.emailAttach[e].filter(e=>e.id===t.id).length>0}canManageMail(){return null===this.data.emailId||"SENT"!==this.emailStatus&&this.headerService.user.id===this.emailCreatorId?(this.recipientsInput.enable(),!0):(this.recipientsInput.disable(),!1)}isAllEmailRightFormat(){let t=!0;return this.recipients.concat(this.copies).concat(this.invisibleCopies).map(t=>t.email).forEach(e=>{this.isBadEmailFormat(e)&&(t=!1)}),t}compareSenders(t,e){return!(t.label!==e.label&&(null!==t.label&&null!==e.label||null!==t.entityId&&null!==e.entityId)||t.entityId!==e.entityId||t.email!==e.email)}b64DecodeUnicode(t){return decodeURIComponent(atob(t).split("").map((function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)})).join(""))}onPaste(t,e){const i=t.clipboardData.getData("text");this.formatEmailAddress(i,e)}formatEmailAddress(t,e){const i=t.split(/[,;]+/);this.functions.empty(i)||(setTimeout(()=>{this.recipientsInput.setValue(null),this[e+"Field"].nativeElement.value=""},0),i.forEach(t=>{t=t.match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+)/gi),this.functions.empty(t)||this[e].push({label:t[0],email:t[0]})}))}openSummarySheetModal(t){if("summarySheet"!==t)return;let e,i,n,a;e=new Date,i=e.getDate(),n=e.getMonth()+1,a=e.getFullYear(),i<10&&(i="0"+i),n<10&&(n="0"+n),e=i+"-"+n+"-"+a;const s=this.translate.instant("lang.summarySheet")+" "+e;this.dialog.open(Cw,{panelClass:"maarch-full-height-modal",width:"800px",data:{paramMode:!0}}).afterClosed().pipe(Object(d.a)(t=>void 0!==t),Object(mt.a)(t=>{this.summarySheetUnits=t,this.emailAttach.summarySheet.push({label:s,format:"pdf",title:s,list:[]})}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}createSummarySheet(){return Object(r.a)(this,void 0,void 0,(function*(){return new Promise(t=>{this.http.post("../rest/resourcesList/summarySheets?mode=base64",{units:this.summarySheetUnits,resources:[this.data.resId]}).pipe(Object(mt.a)(e=>Object(r.a)(this,void 0,void 0,(function*(){yield this.saveSummarySheet(e.encodedDocument),this.loading=!1,t(!0)}))),Object(m.a)(e=>(this.notify.handleErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}))}saveSummarySheet(t){return Object(r.a)(this,void 0,void 0,(function*(){return new Promise(e=>{let i,n,a,s;i=new Date,n=i.getDate(),a=i.getMonth()+1,s=i.getFullYear(),n<10&&(n="0"+n),a<10&&(a="0"+a),i=n+"-"+a+"-"+s;const o=this.translate.instant("lang.summarySheet")+" "+i;this.http.post("../rest/attachments",{resIdMaster:this.data.resId,encodedFile:t,type:"summary_sheet",format:"PDF",title:o}).pipe(Object(mt.a)(t=>{this.emailAttach.summarySheet=void 0,this.emailAttach.attachments.push({id:t.id,label:o,format:"pdf",title:o,original:!0}),this.loading=!1,e(!0)}),Object(m.a)(t=>(this.notify.handleErrors(t),e(!1),Object(c.a)(!1)))).subscribe()})}))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(v.b),n.Qb(D.a),n.Qb(q.a),n.Qb(q.b),n.Qb(q.h),n.Qb(_t.a),n.Qb(lc),n.Qb(Dt.a),n.Qb(y.a),n.Qb(g.e))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-sent-resource-page"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(vj,!0),n.Xc(_j,!0),n.Xc(yj,!0)),2&t&&(n.yc(i=n.ec())&&(e.recipientsField=i.first),n.yc(i=n.ec())&&(e.copiesField=i.first),n.yc(i=n.ec())&&(e.invisibleCopiesField=i.first))},features:[n.Cb([lc,w.a])],decls:55,vars:60,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],[2,"flex","1"],["mat-icon-button","",3,"title","click"],[1,"fa","fa-times"],[1,"modal-container"],["class","loading",4,"ngIf"],["matPrefix","",1,"attachLabel"],["matInput","","readonly","",3,"value",4,"ngIf"],[3,"compareWith","ngModel","ngModelChange",4,"ngIf"],["mat-button","","color","primary","matSuffix","",3,"disabled","click"],["id","recipients-list","cdkDropList","",3,"cdkDropListConnectedTo","cdkDropListData","cdkDropListDropped"],["recipientsList",""],["cdkDrag","","class","recipients",3,"cdkDragDisabled","removable","title","badFormat","removed","click",4,"ngFor","ngForOf"],[3,"formControl","matChipInputFor","matChipInputSeparatorKeyCodes","matChipInputAddOnBlur","matAutocomplete","matChipInputTokenEnd","focus","paste"],["recipientsField",""],[3,"optionSelected"],["autoEmails","matAutocomplete"],[3,"value",4,"ngFor","ngForOf"],[4,"ngIf"],["floatLabel","never"],["matInput","","maxlength","255",3,"placeholder","readonly","ngModel","ngModelChange"],["mat-icon-button","","matSuffix","",3,"disabled","title","matMenuTriggerFor","click",4,"ngFor","ngForOf"],["emailAttachListMenu","matMenu"],[4,"ngFor","ngForOf"],["class","copy",3,"removable","title","removed",4,"ngIf"],["class","models",4,"ngIf"],[2,"padding-top","10px"],["style","padding-top: 10px;","name","emailSignature","id","emailSignature",3,"ngModel","ngModelChange",4,"ngIf"],["style","display:block;height:400px;width:100%;overflow: auto;",3,"editMode","base64",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","","class","actions",4,"ngIf"],[1,"loading"],[2,"margin","auto"],["matInput","","readonly","",3,"value"],[3,"compareWith","ngModel","ngModelChange"],[3,"value"],["cdkDrag","",1,"recipients",3,"cdkDragDisabled","removable","title","removed","click"],["matChipRemove","","class","fa fa-times",4,"ngIf"],["matChipRemove","",1,"fa","fa-times"],["class","attachLabel",4,"ngIf"],[1,"attachLabel"],["id","copies-list","cdkDropList","",3,"cdkDropListConnectedTo","cdkDropListData","cdkDropListDropped"],["copiesList",""],["cdkDrag","","class","copy",3,"cdkDragDisabled","removable","title","badFormat","removed","click",4,"ngFor","ngForOf"],["copiesField",""],["autoEmails2","matAutocomplete"],["cdkDrag","",1,"copy",3,"cdkDragDisabled","removable","title","removed","click"],["id","invcopies-list","cdkDropList","",3,"cdkDropListConnectedTo","cdkDropListData","cdkDropListDropped"],["invCopiesList",""],["invisibleCopiesField",""],["autoEmails3","matAutocomplete"],["mat-icon-button","","matSuffix","",3,"disabled","title","matMenuTriggerFor","click"],["color","primary"],["mat-menu-item","","disableRipple","",1,"attachListButton",2,"line-height","normal","height","auto","padding","10px",3,"disabled","click"],[1,"attachListContainer"],["mat-raised-button","","class","extensionButton","color","primary",3,"click",4,"ngIf"],[3,"title"],[2,"font-size","10px","opacity","0.5"],[1,"attachLabel",2,"font-size","10px"],["style","color:green",4,"ngIf"],["mat-raised-button","","color","primary",1,"extensionButton",3,"click"],[2,"color","green"],[1,"copy",3,"removable","title","removed"],[1,"fa","fa-file","attachLabel"],["class","copy",3,"removable","title","removed",4,"ngFor","ngForOf"],[1,"models"],[3,"label","placeholderLabel","datas","formControlSelect","afterSelected",4,"ngIf"],[3,"label","placeholderLabel","datas","formControlSelect","afterSelected"],["templateList",""],["name","emailSignature","id","emailSignature",2,"padding-top","10px",3,"ngModel","ngModelChange"],[2,"display","block","height","400px","width","100%","overflow","auto",3,"editMode","base64"],["appDocumentViewer",""],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","color","primary","style","min-width: auto;width: 30px;padding: 0;background-color: white; color: grey;",3,"matMenuTriggerFor",4,"ngIf"],["emailActionMenu","matMenu"],["mat-menu-item","",3,"click",4,"ngIf"],["mat-raised-button","","color","primary",3,"disabled","click",4,"ngIf"],["mat-raised-button","","color","warn",3,"disabled","click",4,"ngIf"],["mat-raised-button","","color","primary",2,"min-width","auto","width","30px","padding","0","background-color","white","color","grey",3,"matMenuTriggerFor"],[1,"fas","fa-ellipsis-v",2,"height","auto"],["mat-menu-item","",3,"click"],["mat-raised-button","","color","primary",3,"disabled","click"],["mat-raised-button","","color","warn",3,"disabled","click"]],template:function(t,e){if(1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Wb(2,"span",2),n.Qc(3),n.Vb(),n.Wb(4,"button",3),n.dc("click",(function(){return e.saveDraft()})),n.ic(5,"translate"),n.Rb(6,"mat-icon",4),n.Vb(),n.Vb(),n.Wb(7,"mat-dialog-content",5),n.Oc(8,xj,2,0,"div",6),n.Wb(9,"mat-form-field"),n.Wb(10,"span",7),n.Qc(11),n.ic(12,"translate"),n.Vb(),n.Oc(13,Cj,1,1,"input",8),n.Oc(14,Dj,3,6,"mat-select",9),n.Wb(15,"button",10),n.dc("click",(function(t){return t.stopPropagation(),e.showCopies=!e.showCopies})),n.Qc(16),n.ic(17,"translate"),n.Vb(),n.Wb(18,"button",10),n.dc("click",(function(t){return t.stopPropagation(),e.showInvisibleCopies=!e.showInvisibleCopies})),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Vb(),n.Wb(21,"mat-form-field"),n.Wb(22,"span",7),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Wb(25,"mat-chip-list",11,12),n.dc("cdkDropListDropped",(function(t){return e.drop(t)})),n.Oc(27,Mj,3,8,"mat-chip",13),n.Wb(28,"input",14,15),n.dc("matChipInputTokenEnd",(function(t){return e.add(t,"recipients")}))("focus",(function(){return e.resetAutocomplete()}))("paste",(function(t){return e.onPaste(t,"recipients")})),n.Vb(),n.Vb(),n.Wb(30,"mat-autocomplete",16,17),n.dc("optionSelected",(function(t){return e.addEmail(t.option.value,"recipients")})),n.Oc(32,Sj,3,3,"mat-option",18),n.ic(33,"async"),n.Vb(),n.Vb(),n.Oc(34,Aj,13,15,"mat-form-field",19),n.Oc(35,Qj,13,15,"mat-form-field",19),n.Wb(36,"mat-form-field",20),n.Wb(37,"input",21),n.dc("ngModelChange",(function(t){return e.emailsubject=t})),n.ic(38,"translate"),n.Vb(),n.Oc(39,Nj,2,8,"button",22),n.ic(40,"keyvalue"),n.Wb(41,"mat-menu",null,23),n.Oc(43,Xj,2,1,"ng-container",24),n.ic(44,"keyvalue"),n.Vb(),n.Vb(),n.Wb(45,"mat-chip-list"),n.Oc(46,Kj,7,10,"mat-chip",25),n.Oc(47,tA,2,1,"ng-container",24),n.ic(48,"keyvalue"),n.Vb(),n.Oc(49,nA,3,2,"div",26),n.Wb(50,"div",27),n.Oc(51,aA,1,1,"textarea",28),n.Oc(52,sA,2,2,"app-document-viewer",29),n.Vb(),n.Vb(),n.Rb(53,"span",30),n.Oc(54,hA,8,7,"div",31),n.Vb()),2&t){const t=n.zc(26),i=n.zc(31);n.Db(3),n.Sc(" ",e.data.title," "),n.Db(1),n.oc("title",n.jc(5,39,"lang.saveAndClose")),n.Db(4),n.oc("ngIf",e.loading),n.Db(3),n.Sc("",n.jc(12,41,"lang.senderShort"),"\xa0:\xa0"),n.Db(2),n.oc("ngIf",!e.canManageMail()),n.Db(1),n.oc("ngIf",e.canManageMail()),n.Db(1),n.Ib("activeButton",e.showCopies),n.oc("disabled",!e.canManageMail()),n.Db(1),n.Rc(n.jc(17,43,"lang.copieShort")),n.Db(2),n.Ib("activeButton",e.showInvisibleCopies),n.oc("disabled",!e.canManageMail()),n.Db(1),n.Rc(n.jc(20,45,"lang.invisibleCopyShort")),n.Db(4),n.Sc("",n.jc(24,47,"lang.recipientShort"),"\xa0:\xa0"),n.Db(2),n.oc("cdkDropListConnectedTo",n.uc(59,uA))("cdkDropListData",e.recipients),n.Db(2),n.oc("ngForOf",e.recipients),n.Db(1),n.oc("formControl",e.recipientsInput)("matChipInputFor",t)("matChipInputSeparatorKeyCodes",e.separatorKeysCodes)("matChipInputAddOnBlur",!0)("matAutocomplete",i),n.Db(4),n.oc("ngForOf",n.jc(33,49,e.filteredEmails)),n.Db(2),n.oc("ngIf",e.showCopies),n.Db(1),n.oc("ngIf",e.showInvisibleCopies),n.Db(2),n.oc("placeholder",n.jc(38,51,"lang.object"))("readonly",!e.canManageMail())("ngModel",e.emailsubject),n.Db(2),n.oc("ngForOf",n.jc(40,53,e.emailAttachTool)),n.Db(2),n.Fb("attachListMenu"),n.Db(2),n.oc("ngForOf",n.jc(44,55,e.emailAttachTool)),n.Db(3),n.oc("ngIf",e.emailAttach.document.isLinked),n.Db(1),n.oc("ngForOf",n.jc(48,57,e.emailAttach)),n.Db(2),n.oc("ngIf",e.canManageMail()),n.Db(2),n.oc("ngIf",!e.pdfMode),n.Db(1),n.oc("ngIf",e.pdfMode),n.Db(2),n.oc("ngIf",!e.loading)}},directives:[q.i,k.b,S.a,q.f,P.t,Y.c,Y.i,Y.j,ze.d,lo.e,P.s,X.d,ze.c,Ne.d,X.u,X.j,Ne.a,J.b,X.p,X.x,ne.e,V.c,ee.a,W.p,ze.a,lo.a,ze.e,ne.d,ne.b,T.a,fr,Jr,q.c],pipes:[g.d,P.b,P.l,Wt.a,Tt.p,P.p],styles:[".loading[_ngcontent-%COMP%]{display:flex;height:100%;position:absolute;z-index:2;width:100%;top:0;left:0;background:#fff}.mat-dialog-title[_ngcontent-%COMP%]{display:flex;align-items:center}.copy[_ngcontent-%COMP%], .recipients[_ngcontent-%COMP%]{font-size:12px!important;padding:5px!important;min-height:auto;height:auto;border-radius:5px;cursor:pointer}.copy[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%], .recipients[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{width:auto;font-size:12px;height:auto}.models[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;grid-gap:20px;padding-top:10px}.activeButton[_ngcontent-%COMP%]{color:#f99830;font-weight:700}.attachLabel[_ngcontent-%COMP%], .pdfVersion[_ngcontent-%COMP%]:hover{color:#135f7f} .attachListMenu{width:auto;max-width:none;min-height:auto}.attachListButton[_ngcontent-%COMP%]:hover{background:initial!important;cursor:default}.attachListContainer[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto 1fr;grid-gap:10px;align-items:center}.extensionButton[_ngcontent-%COMP%]{line-height:20px;min-width:50px;padding:0}.badFormat[_ngcontent-%COMP%]{background-color:#d03c3c;color:#fff}"]}),t})();const bA=["recipientsInput"];function fA(t,e){1&t&&(n.Wb(0,"div",35),n.Rb(1,"mat-spinner",36),n.Vb())}const mA=function(t){return{value1:t}};function gA(t,e){if(1&t&&(n.Rb(0,"div",37),n.ic(1,"translate")),2&t){const t=n.hc();n.oc("innerHTML",n.kc(1,1,"lang.sendNumericPackageInfo",n.vc(4,mA,t.maarch2maarchUrl)),n.Ec)}}function vA(t,e){if(1&t&&n.Rb(0,"input",38),2&t){const t=n.hc();n.oc("value",t.currentSender.label)}}function _A(t,e){if(1&t&&(n.Wb(0,"mat-option",41),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Tc(" ",t.label," (",t.m2m,") ")}}function yA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-select",39),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().currentSender=e})),n.Oc(1,_A,2,3,"mat-option",40),n.ic(2,"sortBy"),n.Vb()}if(2&t){const t=n.hc();n.oc("compareWith",t.compareSenders)("ngModel",t.currentSender),n.Db(1),n.oc("ngForOf",n.kc(2,3,t.availableSenders,"label"))}}function xA(t,e){1&t&&n.Rb(0,"mat-icon",44)}function CA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",42),n.dc("removed",(function(){n.Dc(t);const i=e.$implicit;return n.hc().remove(i,"recipients")}))("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().remove(i,"recipients")})),n.Wb(1,"span",2),n.Wb(2,"div"),n.Qc(3),n.Wb(4,"b"),n.Qc(5),n.Vb(),n.Vb(),n.Wb(6,"div",8),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Oc(9,xA,1,0,"mat-icon",43),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc();n.oc("removable",i.canManageMail()),n.Db(3),n.Sc(" ",t.label," - "),n.Db(2),n.Rc(t.m2m),n.Db(2),n.Tc(" (",n.jc(8,6,"lang.communicationMean")," : ",t.communicationMeans,") "),n.Db(2),n.oc("ngIf",i.canManageMail())}}function OA(t,e){if(1&t&&(n.Wb(0,"mat-option",45),n.Wb(1,"div"),n.Qc(2),n.Wb(3,"b"),n.Qc(4),n.Vb(),n.Vb(),n.Wb(5,"div",8),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(2),n.Sc(" ",t.label," - "),n.Db(2),n.Rc(t.m2m),n.Db(2),n.Tc(" (",n.jc(7,5,"lang.communicationMean")," : ",t.communicationMeans,") ")}}function DA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",46),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc();return i.stopPropagation(),s.numericPackageCurrentAttachTool=a.key})),n.Rb(1,"mat-icon",47),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(),a=n.zc(38);n.oc("disabled",!i.canManageMail()||0===i.numericPackageAttachTool[t.key].list.length)("title",i.numericPackageAttachTool[t.key].title)("matMenuTriggerFor",a),n.Db(1),n.Fb(i.numericPackageAttachTool[t.key].icon),n.Ib("activeButton",i.isSelectedAttachType(t.key))}}function wA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",49),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2).$implicit,o=n.hc();return i.stopPropagation(),o.toggleAttach(a,s.key,"original")})),n.Wb(1,"span",50),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2).$implicit,o=n.hc();return i.stopPropagation(),o.toggleAttach(a,s.key,"original")})),n.Wb(2,"div",51),n.Qc(3),n.Vb(),n.Qc(4),n.ic(5,"shorten"),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2).$implicit,a=n.hc();n.oc("disabled",a.isSelectedAttach(t,i.key)),n.Db(1),n.oc("title",t.label),n.Db(2),n.Uc("",t.chrono," - ",t.typeLabel," (",t.creator,")"),n.Db(1),n.Tc(" ",n.lc(5,7,t.label,45,"...")," - ",t.format," ")}}function MA(t,e){if(1&t&&(n.Ub(0),n.Oc(1,wA,6,11,"button",48),n.Tb()),2&t){const t=n.hc().$implicit,e=n.hc();n.Db(1),n.oc("ngForOf",e.numericPackageAttachTool[t.key].list)}}function kA(t,e){if(1&t&&(n.Ub(0),n.Oc(1,MA,2,1,"ng-container",23),n.Tb()),2&t){const t=e.$implicit,i=n.hc();n.Db(1),n.oc("ngIf",t.key===i.numericPackageCurrentAttachTool)}}function SA(t,e){if(1&t&&(n.Wb(0,"mat-form-field"),n.Wb(1,"mat-label",8),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Rb(4,"input",38),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Rc(n.jc(3,2,"lang.reference")),n.Db(2),n.oc("value",t.reference)}}function IA(t,e){1&t&&(n.Wb(0,"div",52),n.Qc(1),n.ic(2,"translate"),n.Rb(3,"i",53),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.attachItemToNumericPackage")," "))}function PA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",62),n.dc("click",(function(){return n.Dc(t),n.hc(3).numericPackage.mainExchangeDoc=null})),n.Rb(1,"mat-icon",63),n.Vb()}}function VA(t,e){if(1&t&&(n.Wb(0,"mat-list-item",56),n.Wb(1,"p",57),n.Wb(2,"span",58),n.Qc(3),n.Vb(),n.Wb(4,"span",59),n.Qc(5),n.Vb(),n.Wb(6,"span",60),n.Qc(7),n.Vb(),n.Oc(8,PA,2,0,"button",61),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(3),n.Rc(t.numericPackage.mainExchangeDoc.label),n.Db(2),n.Rc(t.numericPackage.mainExchangeDoc.typeLabel),n.Db(2),n.Sc(".",t.numericPackage.mainExchangeDoc.format,""),n.Db(1),n.oc("ngIf",t.canManageMail())}}function RA(t,e){if(1&t&&(n.Wb(0,"mat-list"),n.Wb(1,"h3",54),n.Qc(2),n.ic(3,"translate"),n.ic(4,"translate"),n.Vb(),n.Oc(5,VA,9,4,"mat-list-item",55),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Rc(t.canManageMail()?n.jc(3,2,"lang.mainDocNumericPackageToSend"):n.jc(4,4,"lang.mainDocNumericPackage")),n.Db(3),n.oc("ngIf",null!==t.numericPackage.mainExchangeDoc)}}function jA(t,e){1&t&&n.Rb(0,"mat-divider")}function AA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",62),n.dc("click",(function(){n.Dc(t);const e=n.hc().index;return n.hc(2).removeAttach(e)})),n.Rb(1,"mat-icon",63),n.Vb()}}function WA(t,e){if(1&t&&(n.Wb(0,"mat-list-item",56),n.Wb(1,"p",57),n.Wb(2,"span",65),n.Qc(3),n.Vb(),n.Wb(4,"span",59),n.Qc(5),n.Vb(),n.Wb(6,"span",60),n.Qc(7),n.Vb(),n.Oc(8,AA,2,0,"button",61),n.Vb(),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Db(2),n.oc("title",t.label),n.Db(1),n.Rc(t.label),n.Db(2),n.Rc(t.typeLabel),n.Db(2),n.Sc(".",t.format,""),n.Db(1),n.oc("ngIf",i.canManageMail())}}function TA(t,e){if(1&t&&(n.Wb(0,"mat-list"),n.Wb(1,"h3",54),n.Qc(2),n.ic(3,"translate"),n.ic(4,"translate"),n.Vb(),n.Oc(5,WA,9,5,"mat-list-item",64),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Rc(t.canManageMail()?n.jc(3,2,"lang.attachmentsNumericPackageToSend"):n.jc(4,4,"lang.attachmentsNumericPackage")),n.Db(3),n.oc("ngForOf",t.numericPackageAttach)}}function EA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"plugin-select-search",68),n.dc("afterSelected",(function(e){return n.Dc(t),n.hc(2).mergeEmailTemplate(e)})),n.ic(1,"translate"),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(2);n.oc("label",n.jc(1,4,"lang.emailModel"))("placeholderLabel",n.jc(2,6,"lang.emailModel"))("datas",t.availableEmailModels)("formControlSelect",t.templateEmailListForm)}}function FA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"plugin-select-search",68,69),n.dc("afterSelected",(function(e){return n.Dc(t),n.hc(2).mergeSignEmailTemplate(e)})),n.ic(2,"translate"),n.ic(3,"translate"),n.Vb()}if(2&t){const t=n.hc(2);n.oc("label",n.jc(2,4,"lang.emailSignatures"))("placeholderLabel",n.jc(3,6,"lang.emailSignatures"))("datas",t.availableSignEmailModels)("formControlSelect",t.emailSignListForm)}}function LA(t,e){if(1&t&&(n.Wb(0,"div",66),n.Oc(1,EA,3,8,"plugin-select-search",67),n.Oc(2,FA,4,8,"plugin-select-search",67),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.availableEmailModels.length>0),n.Db(1),n.oc("ngIf",t.availableSignEmailModels.length>0)}}function QA(t,e){if(1&t&&(n.Wb(0,"div",78),n.Wb(1,"div",79),n.Qc(2),n.ic(3,"timeAgo"),n.Vb(),n.Wb(4,"div"),n.Qc(5),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Sc(" ",n.kc(3,2,t.date,"full")," "),n.Db(3),n.Sc(" ",t.content," ")}}function NA(t,e){1&t&&(n.Wb(0,"div",80),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.noActionProcessed")))}function zA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",70),n.Wb(1,"div",71),n.Wb(2,"label",8),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"div",72),n.Oc(6,QA,6,5,"div",73),n.Oc(7,NA,3,3,"div",74),n.Vb(),n.Vb(),n.Wb(8,"div",75),n.Wb(9,"button",76),n.dc("click",(function(){return n.Dc(t),n.hc().saveNumericPackageFile()})),n.Rb(10,"i",77),n.Rb(11,"br"),n.Wb(12,"span"),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(3),n.Rc(n.jc(4,4,"lang.actionsHistory")),n.Db(3),n.oc("ngForOf",t.messageReview),n.Db(1),n.oc("ngIf",0===t.messageReview.length),n.Db(6),n.Rc(n.jc(14,6,"lang.downloadNumericPackage"))}}function BA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",81),n.dc("click",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc();n.oc("disabled",0===t.recipients.length||null===t.numericPackage.mainExchangeDoc||t.loading),n.Db(1),n.Rc(n.jc(2,2,"lang.send"))}}function UA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",82),n.dc("click",(function(){return n.Dc(t),n.hc().deleteEmail()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc();n.oc("disabled",t.headerService.user.id!==t.numericPackageCreatorId),n.Db(1),n.Rc(n.jc(2,2,"lang.delete"))}}let $A=(()=>{class t{constructor(t,e,i,n,s,o,r,c,l,d,h,u){this.translate=t,this.http=e,this.notify=i,this.data=n,this.dialog=s,this.dialogRef=o,this.functions=r,this.contactService=c,this.privilegeService=l,this.headerService=d,this.stringPipe=h,this.reversePipe=u,this.loading=!0,this.availableEmailModels=[],this.availableSignEmailModels=[],this.resourceData=null,this.availableSenders=[],this.currentSender={},this.recipients=[],this.recipientsCtrl=new X.i,this.emailSignListForm=new X.i,this.templateEmailListForm=new X.i,this.numericPackageCreatorId=null,this.numericPackageStatus="WAITING",this.numericPackageCurrentAttachTool="",this.numericPackageAttachTool={document:{icon:"fa fa-file",title:this.translate.instant("lang.attachMainDocument"),list:[]},notes:{icon:"fas fa-pen-square",title:this.translate.instant("lang.attachNote"),list:[]},attachments:{icon:"fa fa-paperclip",title:this.translate.instant("lang.attachAttachment"),list:[]}},this.numericPackageAttach=[],this.numericPackage={mainExchangeDoc:null,object:"",contacts:[],joinFile:[],joinAttachment:[],notes:[],content:"",senderEmail:null},this.reference=null,this.messageReview=[],this.maarch2maarchUrl=`https://docs.maarch.org/gitbook/html/MaarchCourrier/${a.a.VERSION.split(".")[0]+"."+a.a.VERSION.split(".")[1]}/guat/guat_exploitation/maarch2maarch.html`}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){yield this.getAttachElements(),this.data.emailId&&(yield this.getNumericPackageData(this.data.emailId)),this.canManageMail()&&(this.initEmailModelsList(),this.initM2MList(),this.initSignEmailModelsList(),yield this.getResourceData(),yield this.getM2MSenders(),this.setDefaultInfo()),this.loading=!1}))}isBadEmailFormat(t){return null===t.trim().match(/^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$/g)}closeModal(t=""){this.dialogRef.close(t)}addRecipient(t){this.recipients.push(t),this.recipientsInput.nativeElement.value="",this.recipientsCtrl.setValue("")}mergeEmailTemplate(t){this.templateEmailListForm.reset(),this.http.post(`../rest/templates/${t}/mergeEmail`,{data:{resId:this.data.resId}}).pipe(Object(mt.a)(t=>{const e=document.createElement("textarea");e.innerHTML=t.mergedDocument,this.numericPackage.content+=this.stringPipe.transform(e.value)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}mergeSignEmailTemplate(t){this.emailSignListForm.reset(),this.http.get("../rest/currentUser/emailSignatures/"+t).pipe(Object(mt.a)(t=>{const e=document.createElement("textarea");e.innerHTML=t.emailSignature.content,this.numericPackage.content+=this.stringPipe.transform(e.value)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}remove(t,e){if(this.canManageMail()){const i=this[e].indexOf(t);i>=0&&this[e].splice(i,1)}}getNumericPackageData(t){return new Promise(e=>{this.http.get("../rest/messageExchanges/"+t).pipe(Object(l.a)(t=>t.messageExchange),Object(mt.a)(t=>{this.numericPackageCreatorId=t.userId,t.recipient.communicationMeans=t.communicationType,this.recipients=[t.recipient],this.currentSender.label=t.sender,this.numericPackage.object=t.object,this.numericPackageStatus=t.status.toUpperCase(),this.numericPackage.content=t.body,this.reference=t.reference,this.messageReview=t.messageReview.map(t=>({date:this.functions.formatFrenchDateToObjectDate(t.substring(1,19),"/"),content:t.substring(21)})),this.messageReview=this.reversePipe.transform(this.messageReview),"res_letterbox"===t.disposition.tablename?(this.numericPackage.mainExchangeDoc=Object.assign(Object.assign({},this.numericPackageAttachTool.document.list[0]),{typeLabel:this.translate.instant("lang.mainDocument"),type:"document"}),this.numericPackageAttach=this.numericPackageAttach.concat(this.numericPackageAttachTool.attachments.list.filter(e=>t.attachments.indexOf(e.id.toString())>-1))):(this.numericPackage.mainExchangeDoc=Object.assign(Object.assign({},this.numericPackageAttachTool.attachments.list.filter(e=>e.id===t.disposition.res_id)[0]),{type:"attachments"}),this.numericPackageAttach=this.numericPackageAttach.concat(this.numericPackageAttachTool.attachments.list.filter(e=>t.attachments.indexOf(e.id.toString())>-1&&e.id!==t.disposition.res_id))),t.resMasterAttached&&"res_letterbox"!==t.disposition.tablename&&this.numericPackageAttach.push(Object.assign(Object.assign({},this.numericPackageAttachTool.document.list[0]),{typeLabel:this.translate.instant("lang.mainDocument"),type:"document"})),this.numericPackageAttach=this.numericPackageAttach.concat(this.numericPackageAttachTool.notes.list.filter(e=>t.notes.indexOf(e.id.toString())>-1)),e(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),e(!1),Object(c.a)(!1)))).subscribe()})}getResourceData(){return new Promise(t=>{this.http.get(`../rest/resources/${this.data.resId}?light=true`).pipe(Object(mt.a)(e=>{this.resourceData=e,this.numericPackage.object=this.resourceData.subject,t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}setDefaultInfo(){this.functions.empty(this.resourceData.senders)||this.resourceData.senders.forEach(t=>{"contact"===t.type&&this.setSender(t.id)})}setSender(t){this.http.get("../rest/contacts/"+t).pipe(Object(mt.a)(e=>{this.functions.empty(e.communicationMeans)||this.functions.empty(e.externalId.m2m)||this.recipients.push({id:t,label:this.contactService.formatContact(e),email:e.email,m2m:e.externalId.m2m,communicationMeans:e.communicationMeans})}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}getM2MSenders(){return new Promise(t=>{this.http.get("../rest/messageExchangesInitialization").pipe(Object(mt.a)(e=>{this.availableSenders=e.entities,this.currentSender=this.availableSenders[0],t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}getAttachElements(){return new Promise(t=>{this.http.get(`../rest/resources/${this.data.resId}/emailsInitialization`).pipe(Object(mt.a)(e=>{Object.keys(e).forEach(t=>{"resource"===t?(this.numericPackageAttachTool.document.list=[],this.functions.empty(e[t])||(this.numericPackageAttachTool.document.list=[e[t]])):this.numericPackageAttachTool[t].list=e[t].map(t=>Object.assign(Object.assign({},t),{original:void 0===t.original||t.original,title:void 0!==t.chrono?`${t.chrono} - ${t.label} (${t.typeLabel})`:`${t.label} (${t.typeLabel})`}))}),t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}initM2MList(){this.recipientsCtrl.valueChanges.pipe(Object(d.a)(t=>null!==t),Object(pt.a)(300),Object(mt.a)(t=>{0===t.length&&(this.filteredEmails=Object(c.a)([]))}),Object(d.a)(t=>t.length>2),Object(bt.a)(),Object(ft.a)(t=>this.http.get("../rest/autocomplete/contacts/m2m",{params:{search:t}})),Object(mt.a)(t=>{t=t.map(t=>Object.assign(Object.assign({},t),{address:this.contactService.formatContact(t),label:this.contactService.formatContact(t)})),this.filteredEmails=Object(c.a)(t)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}initEmailModelsList(){this.http.get(`../rest/resources/${this.data.resId}/emailTemplates`).pipe(Object(mt.a)(t=>{this.availableEmailModels=t.templates}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}initSignEmailModelsList(){this.http.get("../rest/currentUser/emailSignatures").pipe(Object(mt.a)(t=>{this.availableSignEmailModels=t.emailSignatures}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}resetAutocomplete(){this.filteredEmails=Object(c.a)([])}onSubmit(){this.loading=!0,this.numericPackageStatus="WAITING",null===this.data.emailId?""===this.numericPackage.object?this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.confirm"),msg:this.translate.instant("lang.warnEmptySubject")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.createEmail(!0)})).subscribe():this.createEmail(!0):this.updateEmail(!0)}createEmail(t=!0){this.http.post(`../rest/resources/${this.data.resId}/messageExchange`,this.formatNumericPackage()).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.numericPackageSent")),this.closeModal("success")}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}deleteEmail(){this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete("../rest/messageExchanges/"+this.data.emailId)),Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.numericPackageDeleted")),this.closeModal("success")}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}updateEmail(t=!0){this.http.put("../rest/emails/"+this.data.emailId,this.formatNumericPackage()).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.numericPackageSent")),t&&this.closeModal("success")}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}toggleAttach(t,e,i){null===this.numericPackage.mainExchangeDoc&&"notes"!==e?this.numericPackage.mainExchangeDoc=Object.assign(Object.assign({},t),{typeLabel:void 0!==t.typeLabel?t.typeLabel:this.translate.instant("lang.mainDocument"),type:e}):this.numericPackageAttach.push(Object.assign(Object.assign({},t),{typeLabel:void 0!==t.typeLabel?t.typeLabel:this.translate.instant("lang.mainDocument"),type:e}))}removeAttach(t){this.numericPackageAttach.splice(t,1)}formatNumericPackage(){const t={};if(null!==this.numericPackage.mainExchangeDoc){let e="res_letterbox";"attachments"===this.numericPackage.mainExchangeDoc.type?e="res_attachments":"notes"===this.numericPackage.mainExchangeDoc.type&&(e="notes"),t.joinFile=[parseInt(this.numericPackage.mainExchangeDoc.id)],t.mainExchangeDoc=`${e}__${this.numericPackage.mainExchangeDoc.id}`}return t.object=this.numericPackage.object,t.content=this.numericPackage.content,t.contacts=this.recipients.map(t=>t.id),t.joinAttachment=this.numericPackageAttach.filter(t=>"attachments"===t.type).map(t=>t.id),t.notes=this.numericPackageAttach.filter(t=>"notes"===t.type).map(t=>t.id),t.senderEmail=this.currentSender.id,t}isSelectedAttach(t,e){return this.numericPackageAttach.filter(i=>i.id===t.id&&i.type===e).length>0||null!==this.numericPackage.mainExchangeDoc&&this.numericPackage.mainExchangeDoc.id===t.id&&e===this.numericPackage.mainExchangeDoc.type}isSelectedAttachType(t){return this.numericPackageAttach.filter(e=>e.type===t).length>0||null!==this.numericPackage.mainExchangeDoc&&t===this.numericPackage.mainExchangeDoc.type}canManageMail(){return null===this.data.emailId||"SENT"!==this.numericPackageStatus&&this.headerService.user.id===this.numericPackageCreatorId?(this.recipientsCtrl.enable(),!0):(this.recipientsCtrl.disable(),!1)}compareSenders(t,e){return!(t.label!==e.label&&(null!==t.label&&null!==e.label||null!==t.entityId&&null!==e.entityId)||t.entityId!==e.entityId||t.email!==e.email)}saveNumericPackageFile(){this.http.get(`../rest/messageExchanges/${this.data.emailId}/archiveContent`,{responseType:"blob"}).pipe(Object(mt.a)(t=>{const e=document.createElement("a");let i,n,a,s;e.href=window.URL.createObjectURL(t),i=new Date,n=i.getDate(),a=i.getMonth()+1,s=i.getFullYear(),n<10&&(n="0"+n),a<10&&(a="0"+a),i=n+"-"+a+"-"+s,e.setAttribute("download","NumericPackage_"+i+".zip"),document.body.appendChild(e),e.click()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}canSendNumericPackage(){return this.privilegeService.getCurrentUserMenus().filter(t=>"manage_numeric_package"===t.id).length>0}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.a),n.Qb(q.b),n.Qb(q.h),n.Qb(_t.a),n.Qb(lc),n.Qb(Dt.a),n.Qb(y.a),n.Qb(Tt.r),n.Qb(Tt.l))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-sent-numeric-package-page"]],viewQuery:function(t,e){var i;1&t&&n.Kc(bA,!0),2&t&&n.yc(i=n.ec())&&(e.recipientsInput=i.first)},features:[n.Cb([lc,Tt.r,Tt.l])],decls:61,vars:53,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],[2,"flex","1"],["mat-icon-button","",3,"title","click"],[1,"fa","fa-times"],[1,"modal-container"],["class","loading",4,"ngIf"],["class","alert-message alert-message-info",3,"innerHTML",4,"ngIf"],[1,"attachLabel"],["matInput","","readonly","",3,"value",4,"ngIf"],["required","",3,"compareWith","ngModel","ngModelChange",4,"ngIf"],["id","recipients-list"],["recipientsList",""],["class","recipients",3,"removable","removed","click",4,"ngFor","ngForOf"],["required","",3,"formControl","matChipInputFor","matAutocomplete","focus"],["recipientsInput",""],[3,"optionSelected"],["autoEmails","matAutocomplete"],["class","m2mRecipientList",3,"value",4,"ngFor","ngForOf"],["matInput","","maxlength","70","required","",3,"readonly","ngModel","ngModelChange"],["mat-icon-button","","matSuffix","",3,"disabled","title","matMenuTriggerFor","click",4,"ngFor","ngForOf"],["emailAttachListMenu","matMenu"],[4,"ngFor","ngForOf"],[4,"ngIf"],["class","attachMsg",4,"ngIf"],[2,"overflow","auto","max-height","300px"],["class","models",4,"ngIf"],["class","row","style","margin: 0;padding-top: 10px;",4,"ngIf"],[2,"padding-top","10px"],["appearance","outline"],["matInput","","matTextareaAutosize","",2,"padding","0",3,"placeholder","ngModel","readonly","ngModelChange"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","color","primary",3,"disabled","click",4,"ngIf"],["mat-raised-button","","color","warn",3,"disabled","click",4,"ngIf"],[1,"loading"],[2,"margin","auto"],[1,"alert-message","alert-message-info",3,"innerHTML"],["matInput","","readonly","",3,"value"],["required","",3,"compareWith","ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"recipients",3,"removable","removed","click"],["matChipRemove","","class","fa fa-times",4,"ngIf"],["matChipRemove","",1,"fa","fa-times"],[1,"m2mRecipientList",3,"value"],["mat-icon-button","","matSuffix","",3,"disabled","title","matMenuTriggerFor","click"],["color","primary"],["mat-menu-item","","style","line-height: normal;","disableRipple","",3,"disabled","click",4,"ngFor","ngForOf"],["mat-menu-item","","disableRipple","",2,"line-height","normal",3,"disabled","click"],[3,"title","click"],[2,"font-size","10px","opacity","0.5"],[1,"attachMsg"],[1,"fas","fa-arrow-up"],["mat-subheader","",1,"attachLabel"],["class","numericPackageAttach",4,"ngIf"],[1,"numericPackageAttach"],["mat-line","",1,"numericPackageAttachItem"],[2,"overflow","hidden","text-overflow","ellipsis"],[1,"badge"],[1,"subInfo"],["mat-icon-button","","color","warn",3,"click",4,"ngIf"],["mat-icon-button","","color","warn",3,"click"],[1,"fa","fa-trash"],["class","numericPackageAttach",4,"ngFor","ngForOf"],[2,"overflow","hidden","text-overflow","ellipsis",3,"title"],[1,"models"],[3,"label","placeholderLabel","datas","formControlSelect","afterSelected",4,"ngIf"],[3,"label","placeholderLabel","datas","formControlSelect","afterSelected"],["templateList",""],[1,"row",2,"margin","0","padding-top","10px"],[1,"col-md-9"],[1,"messageExchangeHistory"],["class","messageExchangeHistoryItem",4,"ngFor","ngForOf"],["class","noAction",4,"ngIf"],[1,"col-md-3","text-center"],["mat-button","","color","primary",2,"width","180px","white-space","initial","line-height","20px","padding","10px",3,"click"],[1,"fas","fa-file-download",2,"font-size","40px"],[1,"messageExchangeHistoryItem"],[1,"messageExchangeHistoryDate"],[1,"noAction"],["mat-raised-button","","color","primary",3,"disabled","click"],["mat-raised-button","","color","warn",3,"disabled","click"]],template:function(t,e){if(1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Wb(2,"span",2),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"button",3),n.dc("click",(function(){return e.closeModal()})),n.ic(6,"translate"),n.Rb(7,"mat-icon",4),n.Vb(),n.Vb(),n.Wb(8,"mat-dialog-content",5),n.Oc(9,fA,2,0,"div",6),n.Oc(10,gA,2,6,"div",7),n.Wb(11,"mat-form-field"),n.Wb(12,"mat-label",8),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Oc(15,vA,1,1,"input",9),n.Oc(16,yA,3,6,"mat-select",10),n.Vb(),n.Wb(17,"mat-form-field"),n.Wb(18,"mat-label",8),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"mat-chip-list",11,12),n.Oc(23,CA,10,8,"mat-chip",13),n.Wb(24,"input",14,15),n.dc("focus",(function(){return e.resetAutocomplete()})),n.Vb(),n.Vb(),n.Wb(26,"mat-autocomplete",16,17),n.dc("optionSelected",(function(t){return e.addRecipient(t.option.value)})),n.Oc(28,OA,8,7,"mat-option",18),n.ic(29,"async"),n.Vb(),n.Vb(),n.Wb(30,"mat-form-field"),n.Wb(31,"mat-label",8),n.Qc(32),n.ic(33,"translate"),n.Vb(),n.Wb(34,"input",19),n.dc("ngModelChange",(function(t){return e.numericPackage.object=t})),n.Vb(),n.Oc(35,DA,2,8,"button",20),n.ic(36,"keyvalue"),n.Wb(37,"mat-menu",null,21),n.Oc(39,kA,2,1,"ng-container",22),n.ic(40,"keyvalue"),n.Vb(),n.Vb(),n.Oc(41,SA,5,4,"mat-form-field",23),n.Oc(42,IA,4,3,"div",24),n.Wb(43,"div",25),n.Oc(44,RA,6,6,"mat-list",23),n.Oc(45,jA,1,0,"mat-divider",23),n.Oc(46,TA,6,6,"mat-list",23),n.Vb(),n.Oc(47,LA,3,2,"div",26),n.Rb(48,"mat-divider"),n.Oc(49,zA,15,8,"div",27),n.Wb(50,"div",28),n.Wb(51,"mat-form-field",29),n.Wb(52,"mat-label",8),n.Qc(53),n.ic(54,"translate"),n.Vb(),n.Wb(55,"textarea",30),n.dc("ngModelChange",(function(t){return e.numericPackage.content=t})),n.ic(56,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Rb(57,"span",31),n.Wb(58,"div",32),n.Oc(59,BA,3,4,"button",33),n.Oc(60,UA,3,4,"button",34),n.Vb(),n.Vb()),2&t){const t=n.zc(22),i=n.zc(27);n.Db(3),n.Sc(" ",e.functions.empty(e.reference)?n.jc(4,33,"lang.sendNumericPackage"):e.reference," "),n.Db(2),n.oc("title",n.jc(6,35,"lang.close")),n.Db(4),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",e.canManageMail()),n.Db(3),n.Rc(n.jc(14,37,"lang.sender")),n.Db(2),n.oc("ngIf",!e.canManageMail()),n.Db(1),n.oc("ngIf",e.canManageMail()),n.Db(3),n.Sc("",n.jc(20,39,"lang.recipient")," *"),n.Db(4),n.oc("ngForOf",e.recipients),n.Db(1),n.oc("formControl",e.recipientsCtrl)("matChipInputFor",t)("matAutocomplete",i),n.Db(4),n.oc("ngForOf",n.jc(29,41,e.filteredEmails)),n.Db(4),n.Rc(n.jc(33,43,"lang.mailSubject")),n.Db(2),n.oc("readonly",!e.canManageMail())("ngModel",e.numericPackage.object),n.Db(1),n.oc("ngForOf",n.jc(36,45,e.numericPackageAttachTool)),n.Db(2),n.Fb("attachListMenu"),n.Db(2),n.oc("ngForOf",n.jc(40,47,e.numericPackageAttachTool)),n.Db(2),n.oc("ngIf",!e.canManageMail()),n.Db(1),n.oc("ngIf",null===e.numericPackage.mainExchangeDoc&&0===e.numericPackageAttach.length&&e.canManageMail()),n.Db(2),n.oc("ngIf",null!==e.numericPackage.mainExchangeDoc),n.Db(1),n.oc("ngIf",e.numericPackageAttach.length>0),n.Db(1),n.oc("ngIf",e.numericPackageAttach.length>0),n.Db(1),n.oc("ngIf",e.canManageMail()),n.Db(2),n.oc("ngIf",!e.canManageMail()),n.Db(4),n.Rc(n.jc(54,49,"lang.note")),n.Db(2),n.oc("placeholder",n.jc(56,51,"lang.addNoteToNumericPackage"))("ngModel",e.numericPackage.content)("readonly",!e.canManageMail()),n.Db(4),n.oc("ngIf",e.canManageMail()&&e.canSendNumericPackage()&&"ERROR"!==e.numericPackageStatus),n.Db(1),n.oc("ngIf",e.data.emailId&&!e.loading&&"ERROR"===e.numericPackageStatus)}},directives:[q.i,k.b,S.a,q.f,P.t,Y.c,Y.g,ze.d,P.s,X.d,ze.c,Ne.d,X.F,X.u,X.j,Ne.a,J.b,X.p,X.x,ne.e,T.a,J.d,q.c,V.c,ee.a,W.p,ze.a,ze.e,Y.j,ne.d,ne.b,R.a,R.g,R.d,W.l,fr],pipes:[g.d,P.b,P.l,Wt.a,Tt.p,ps],styles:[".loading[_ngcontent-%COMP%]{display:flex;height:100%;position:absolute;z-index:2;width:100%;top:0;left:0;background:#fff}.models[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;grid-gap:20px;padding-top:10px}.activeButton[_ngcontent-%COMP%]{color:#f99830;font-weight:700}.attachLabel[_ngcontent-%COMP%]{color:#135f7f} .attachListMenu{width:auto;max-width:none;min-height:auto}.numericPackageAttachItem[_ngcontent-%COMP%]{font-size:14px;display:grid!important;grid-template-columns:1fr 150px 50px 50px;grid-gap:10px;align-items:center}.numericPackageAttachItem[_ngcontent-%COMP%] .subInfo[_ngcontent-%COMP%]{color:#135f7f;font-size:80%}.m2mRecipientList[_ngcontent-%COMP%]{line-height:normal;font-size:14px}.recipients[_ngcontent-%COMP%]{font-size:14px!important;padding:10px!important;width:100%;min-height:auto;height:auto;border-radius:5px;cursor:pointer}.attachMsg[_ngcontent-%COMP%]{font-size:20px;padding:30px;opacity:.5;font-weight:700;position:relative;text-align:center}.attachMsg[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{position:absolute;top:0;right:40px;transform:rotate(29deg)}.badge[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;font-size:10px!important;color:#fff;font-weight:400;border-radius:.25em;background:#135f7f}.alert-message[_ngcontent-%COMP%]{min-width:100%}.messageExchangeHistory[_ngcontent-%COMP%]{max-height:300px;overflow:auto}.messageExchangeHistoryItem[_ngcontent-%COMP%]{display:grid;grid-template-columns:130px 1fr;grid-gap:10px;align-items:center;padding:10px}.messageExchangeHistoryItem[_ngcontent-%COMP%]:nth-child(odd){background:rgba(19,95,127,.1)}.messageExchangeHistoryDate[_ngcontent-%COMP%]{color:#135f7f}.noAction[_ngcontent-%COMP%]{padding:10px;opacity:.5;font-style:italic}"]}),t})();function HA(t,e){1&t&&(n.Ub(0),n.Wb(1,"div",2),n.Rb(2,"mat-spinner"),n.Vb(),n.Tb())}function GA(t,e){if(1&t&&(n.Wb(0,"mat-button-toggle",13),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(3);n.oc("checked",i.currentFilter===t.id)("value",t.id),n.Db(1),n.Sc("",t.label," ")}}function XA(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-button-toggle-group",12),n.dc("change",(function(e){return n.Dc(t),n.hc(2).filterType(e)})),n.Wb(1,"mat-button-toggle",13),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Oc(4,GA,2,3,"mat-button-toggle",14),n.ic(5,"sortBy"),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.oc("checked",""===t.currentFilter)("value",""),n.Db(1),n.Rc(n.jc(3,4,"lang.all")),n.Db(2),n.oc("ngForOf",n.kc(5,6,t.filterTypes,"label"))}}function qA(t,e){if(1&t&&(n.Wb(0,"span",34),n.ic(1,"fullDate"),n.Qc(2),n.ic(3,"translate"),n.ic(4,"translate"),n.Wb(5,"b"),n.Qc(6),n.ic(7,"timeAgo"),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit;n.oc("title",n.jc(1,3,t.creationDate)),n.Db(2),n.Sc(" ","m2m_ARCHIVETRANSFER"==t.type?n.jc(3,5,"lang.sent"):n.jc(4,7,"lang.createdAlt")," : "),n.Db(4),n.Rc(n.kc(7,9,t.creationDate,"full"))}}function KA(t,e){if(1&t&&(n.Wb(0,"span",35),n.ic(1,"fullDate"),n.Qc(2),n.ic(3,"translate"),n.Wb(4,"b"),n.Qc(5),n.ic(6,"timeAgo"),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit;n.oc("title",n.jc(1,3,t.sendDate)),n.Db(2),n.Sc(" ","m2m_ARCHIVETRANSFER"==t.type?"Re\xe7u":n.jc(3,5,"lang.sent")," : "),n.Db(3),n.Rc(n.kc(6,7,t.sendDate,"full"))}}function YA(t,e){1&t&&(n.Wb(0,"span",36),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.draft")," "))}function JA(t,e){1&t&&(n.Wb(0,"span",36),n.Qc(1," En attente de r\xe9ception "),n.Vb())}function ZA(t,e){1&t&&(n.Wb(0,"span",37),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.emailSendInProgress")," "))}function tW(t,e){1&t&&(n.Wb(0,"span",38),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.notSent")," "))}function eW(t,e){1&t&&(n.Wb(0,"span",36),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.manualSendingAR")," "))}function iW(t,e){if(1&t&&(n.Wb(0,"span",35),n.ic(1,"fullDate"),n.Qc(2),n.ic(3,"translate"),n.Wb(4,"b"),n.Qc(5),n.ic(6,"timeAgo"),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit;n.oc("title",n.jc(1,3,t.operationDate)),n.Db(2),n.Sc(" ",n.jc(3,5,"lang.delivery")," : "),n.Db(3),n.Rc(n.kc(6,7,t.operationDate,"full"))}}function nW(t,e){1&t&&n.Rb(0,"i",39)}function aW(t,e){1&t&&n.Rb(0,"i",40)}function sW(t,e){1&t&&n.Rb(0,"i",41)}function oW(t,e){if(1&t&&(n.Wb(0,"span",33),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc().$implicit;n.oc("title",t.sender),n.Db(1),n.Tc(" ",n.jc(2,3,"lang.senderShort")," : ",t.sender," ")}}function rW(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",15),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).open(i)})),n.Wb(1,"div",16),n.Oc(2,qA,8,12,"span",17),n.Oc(3,KA,7,10,"span",18),n.Oc(4,YA,3,3,"span",19),n.Oc(5,JA,2,0,"span",19),n.Oc(6,ZA,3,3,"span",20),n.Oc(7,tW,3,3,"span",21),n.Oc(8,eW,3,3,"span",19),n.Oc(9,iW,7,10,"span",18),n.Vb(),n.Wb(10,"div",22),n.Wb(11,"div",23),n.Wb(12,"span",24),n.Wb(13,"span",25),n.ic(14,"translate"),n.Qc(15),n.ic(16,"translate"),n.Vb(),n.Wb(17,"div",26),n.Oc(18,nW,1,0,"i",27),n.Oc(19,aW,1,0,"i",28),n.Oc(20,sW,1,0,"i",29),n.Vb(),n.Vb(),n.Vb(),n.Rb(21,"div",30),n.Wb(22,"div",31),n.Oc(23,oW,3,5,"span",32),n.Wb(24,"span",33),n.Qc(25),n.ic(26,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.Ib("canManage",t.canManage),n.Db(2),n.oc("ngIf",null===t.sendDate&&"SENT"===t.status&&"m2m_ARCHIVETRANSFER"==t.type||"m2m_ARCHIVETRANSFER"!=t.type),n.Db(1),n.oc("ngIf",null!==t.sendDate),n.Db(1),n.oc("ngIf","DRAFT"===t.status),n.Db(1),n.oc("ngIf",null===t.sendDate&&"SENT"===t.status),n.Db(1),n.oc("ngIf","WAITING"===t.status),n.Db(1),n.oc("ngIf","ERROR"===t.status),n.Db(1),n.oc("ngIf","ERROR"!==t.status&&"acknowledgementReceipt"==t.type&&i.functions.empty(t.sendDate)),n.Db(1),n.oc("ngIf",!i.functions.empty(t.operationDate)),n.Db(4),n.Lc("background",t.typeColor),n.oc("title",n.jc(14,22,"lang."+t.type)),n.Db(2),n.Rc(n.jc(16,24,"lang."+t.type)),n.Db(3),n.oc("ngIf",t.hasMainDoc),n.Db(1),n.oc("ngIf",t.hasAttach),n.Db(1),n.oc("ngIf",t.hasNote),n.Db(1),n.oc("innerHTML",t.desc,n.Ec),n.Db(2),n.oc("ngIf",t.sender),n.Db(1),n.oc("title",t.recipients),n.Db(1),n.Tc(" ",n.jc(26,26,"lang.recipientShort")," : ",t.recipients," ")}}function cW(t,e){1&t&&n.Rb(0,"mat-row")}function lW(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",42),n.dc("click",(function(){return n.Dc(t),n.hc(2).openPromptMail()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",43),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.sendElement"))}function dW(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",42),n.dc("click",(function(){return n.Dc(t),n.hc(2).openPromptNumericPackage()})),n.ic(1,"translate"),n.Wb(2,"mat-icon",44),n.Rb(3,"i",45),n.Rb(4,"i",46),n.Vb(),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.sendNumericPackage"))}function hW(t,e){if(1&t&&(n.Wb(0,"div",3),n.Wb(1,"div",4),n.Oc(2,XA,6,9,"mat-button-toggle-group",5),n.Vb(),n.Vb(),n.Wb(3,"mat-table",6,7),n.Ub(5,8),n.Oc(6,rW,27,28,"mat-cell",9),n.Tb(),n.Oc(7,cW,1,0,"mat-row",10),n.Vb(),n.Oc(8,lW,3,3,"button",11),n.Oc(9,dW,5,3,"button",11)),2&t){const t=n.hc();n.Db(2),n.oc("ngIf",t.sentResources.length>0),n.Db(1),n.oc("dataSource",t.dataSource),n.Db(4),n.oc("matRowDefColumns",t.displayedColumns),n.Db(1),n.oc("ngIf",t.privilegeService.hasCurrentUserPrivilege("sendmail")),n.Db(1),n.oc("ngIf",t.canSendNumericPackage())}}let uW=(()=>{class t{constructor(t,e,i,a,s,o){this.translate=t,this.http=e,this.notify=i,this.dialog=a,this.functions=s,this.privilegeService=o,this.loading=!0,this.displayedColumns=["creationDate"],this.sentResources=[],this.resultsLength=0,this.currentFilter="",this.filterTypes=[],this.resId=null,this.currentUserId=null,this.currentGroupId=null,this.currentBasketId=null,this.reloadBadgeSentResource=new n.o}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.loadList()}))}loadList(){return Object(r.a)(this,void 0,void 0,(function*(){this.sentResources=[],this.loading=!0,yield this.initAcknowledgementReceiptList(),yield this.initEmailList(),yield this.initMessageExchange(),yield this.initShippings(),this.reloadBadgeSentResource.emit(""+this.sentResources.length),this.initFilter(),setTimeout(()=>{this.dataSource=new vt.p(this.sentResources),this.dataSource.sort=this.sort},0),this.loading=!1}))}initAcknowledgementReceiptList(){return new Promise(t=>{this.http.get(`../rest/resources/${this.resId}/acknowledgementReceipts?type=ar`).pipe(Object(l.a)(t=>t.map(t=>{let e,i;return e=this.functions.empty(t.contact.email)?this.translate.instant("lang.withoutEmail"):t.contact.email,i=this.functions.empty(t.contact.firstname)&&this.functions.empty(t.contact.lastname)?this.functions.empty(t.contact.company)?this.translate.instant("lang.contactDeleted"):t.contact.company:t.contact.firstname+" "+t.contact.lastname,{id:t.id,sender:!1,recipients:"html"===t.format?e:i,creationDate:t.creationDate,sendDate:t.sendDate,type:"acknowledgementReceipt",typeColor:"#7d5ba6",desc:this.translate.instant("html"===t.format?"lang.ARelectronic":"lang.ARPaper"),status:"html"===t.format&&null===t.sendDate?"ERROR":"SENT",hasAttach:!1,hasNote:!1,hasMainDoc:!1,canManage:!0}})),Object(mt.a)(e=>{this.sentResources=this.sentResources.concat(e),t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}initEmailList(){return new Promise(t=>{this.http.get(`../rest/resources/${this.resId}/emails?type=email`).pipe(Object(l.a)(t=>(t.emails=t.emails.map(t=>({id:t.id,sender:t.sender.email,recipients:t.recipients,creationDate:t.creation_date,sendDate:t.send_date,type:"email",typeColor:"#5bc0de",desc:this.functions.empty(t.object)?`<i>${this.translate.instant("lang.emptySubject")}<i>`:t.object,status:t.status,hasAttach:!this.functions.empty(t.document.attachments),hasNote:!this.functions.empty(t.document.notes),hasMainDoc:t.document.isLinked,canManage:!0})),t.emails)),Object(mt.a)(e=>{this.sentResources=this.sentResources.concat(e),t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}initMessageExchange(){return new Promise(t=>{this.http.get(`../rest/resources/${this.resId}/messageExchanges`).pipe(Object(l.a)(t=>(t.messageExchanges=t.messageExchanges.map(t=>({id:t.messageId,sender:t.sender,recipients:t.recipient,creationDate:t.creationDate,sendDate:t.receptionDate,operationDate:t.operationDate,type:"m2m_ARCHIVETRANSFER",typeColor:"#F99830",desc:this.translate.instant("lang.m2m_ARCHIVETRANSFER"),status:t.status.toUpperCase(),hasAttach:!1,hasNote:!1,hasMainDoc:!1,canManage:!0})),t.messageExchanges)),Object(mt.a)(e=>{this.sentResources=this.sentResources.concat(e),t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}initShippings(){return new Promise(t=>{this.http.get(`../rest/resources/${this.resId}/shippings`).pipe(Object(l.a)(t=>t.map(t=>({id:t.id,sender:t.userLabel,recipients:t.recipients.map(t=>t.contactLabel),creationDate:t.creationDate,sendDate:t.creationDate,type:"shipping",typeColor:"#9440D5",desc:this.translate.instant("lang.shipping"),status:"SENT",hasAttach:"attachment"===t.creationDate,hasNote:!1,hasMainDoc:"resource"===t.creationDate,canManage:!1}))),Object(mt.a)(e=>{this.sentResources=this.sentResources.concat(e),t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}initFilter(){this.sentResources.forEach(t=>{0===this.filterTypes.filter(e=>e.id===t.type).length&&this.filterTypes.push({id:t.type,label:this.translate.instant("lang."+t.type)})})}filterType(t){this.currentFilter=t.value,this.dataSource.filter=t.value}open(t={id:null,type:null}){"m2m_ARCHIVETRANSFER"===t.type?this.openPromptNumericPackage(t):this.openPromptMail(t)}openPromptMail(t={id:null,type:null}){let e=this.translate.instant("lang.sendElement");null!==t.id&&(e=this.translate.instant("lang."+t.type)),(t.canManage||null===t.id)&&this.dialog.open(pA,{panelClass:"maarch-modal",width:"60vw",disableClose:!0,data:{title:e,resId:this.resId,emailId:t.id,emailType:t.type,currentUserId:this.currentUserId,currentGroupId:this.currentGroupId,currentBasketId:this.currentBasketId}}).afterClosed().pipe(Object(d.a)(t=>"success"===t.state||"success"===t),Object(mt.a)(()=>{this.refreshEmailList(),setTimeout(()=>{this.refreshWaitingElements()},5e3)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}openPromptNumericPackage(t={id:null,type:null}){let e=this.translate.instant("lang.sendElement");null!==t.id&&(e=this.translate.instant("lang."+t.type)),(t.canManage||null===t.id)&&this.dialog.open($A,{panelClass:"maarch-modal",width:"60vw",disableClose:!0,data:{title:e,resId:this.resId,emailId:t.id}}).afterClosed().pipe(Object(d.a)(t=>"success"===t.state||"success"===t),Object(mt.a)(()=>{this.loadList()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}refreshWaitingElements(){this.sentResources.forEach(t=>{"WAITING"==t.status&&"email"==t.type&&this.http.get("../rest/emails/"+t.id).pipe(Object(mt.a)(e=>{"SENT"!=e.status&&"ERROR"!=e.status||("SENT"==e.status?this.notify.success(this.translate.instant("lang.emailSent")):this.notify.error(this.translate.instant("lang.emailCannotSent")),this.sentResources.forEach((i,n)=>{i.id==t.id&&"email"==i.type&&(this.sentResources[n].status=e.status,this.sentResources[n].sendDate=e.sendDate)}))})).subscribe()}),setTimeout(()=>{this.dataSource=new vt.p(this.sentResources),this.dataSource.sort=this.sort},0)}refreshEmailList(){return new Promise(t=>{this.http.get(`../rest/resources/${this.resId}/emails?type=email`).pipe(Object(l.a)(t=>(t.emails=t.emails.map(t=>({id:t.id,sender:t.sender.email,recipients:t.recipients,creationDate:t.creation_date,sendDate:t.send_date,type:"email",typeColor:"#5bc0de",desc:this.functions.empty(t.object)?`<i>${this.translate.instant("lang.emptySubject")}<i>`:t.object,status:t.status,hasAttach:!this.functions.empty(t.document.attachments),hasNote:!this.functions.empty(t.document.notes),hasMainDoc:t.document.isLinked,canManage:!0})),t.emails)),Object(mt.a)(e=>{const i=this.sentResources.filter(t=>"email"!==t.type);this.sentResources=i.concat(e),setTimeout(()=>{this.dataSource=new vt.p(this.sentResources),this.dataSource.sort=this.sort},0),this.initFilter(),t(!0)}),Object(m.a)(e=>(this.notify.handleSoftErrors(e),t(!1),Object(c.a)(!1)))).subscribe()})}canSendNumericPackage(){return this.privilegeService.getCurrentUserMenus().filter(t=>"manage_numeric_package"===t.id).length>0}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(_t.a),n.Qb(Dt.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-sent-resource-list"]],viewQuery:function(t,e){var i;1&t&&n.Xc(Fe.a,!0),2&t&&n.yc(i=n.ec())&&(e.sort=i.first)},inputs:{resId:"resId",currentUserId:"currentUserId",currentGroupId:"currentGroupId",currentBasketId:"currentBasketId"},outputs:{reloadBadgeSentResource:"reloadBadgeSentResource"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["elseLoading",""],[1,"loading"],[1,"row",2,"margin","0px"],[1,"col-md-12",2,"padding-bottom","10px"],["class","filterTypes",3,"change",4,"ngIf"],["matSort","","matSortActive","creationDate","matSortDirection","desc",3,"dataSource"],["table",""],["matColumnDef","creationDate"],["class","dataLine","style","flex: 1;padding: 0px;flex-direction: column;",3,"canManage","click",4,"matCellDef"],[4,"matRowDef","matRowDefColumns"],["mat-fab","","class","addSentResource","color","primary",3,"title","click",4,"ngIf"],[1,"filterTypes",3,"change"],[3,"checked","value"],[3,"checked","value",4,"ngFor","ngForOf"],[1,"dataLine",2,"flex","1","padding","0px","flex-direction","column",3,"click"],[1,"subinfo"],["style","flex:1",3,"title",4,"ngIf"],["style","flex:1;color:green",3,"title",4,"ngIf"],["style","flex:1;color:orange",4,"ngIf"],["style","flex:1;color:orange;font-weight: bold;",4,"ngIf"],["style","flex:1;color:red;font-weight: bold;",4,"ngIf"],[2,"display","grid","grid-template-columns","100px 1fr 170px","width","100%","grid-gap","10px","align-items","center","padding","10px"],[1,"dateType"],[1,"type"],[1,"badge",3,"title"],[1,"attach"],["class","fas fa-file","title","Document attach\xe9",4,"ngIf"],["class","fas fa-paperclip","title","Pi\xe8ce(s) jointe(s) attach\xe9e(s)",4,"ngIf"],["class","fas fa-pen-square","title","Note(s) attach\xe9e(s)",4,"ngIf"],[1,"desc",3,"innerHTML"],[1,"contact"],["style","white-space: pre;overflow: hidden;text-overflow: ellipsis;",3,"title",4,"ngIf"],[2,"white-space","pre","overflow","hidden","text-overflow","ellipsis",3,"title"],[2,"flex","1",3,"title"],[2,"flex","1","color","green",3,"title"],[2,"flex","1","color","orange"],[2,"flex","1","color","orange","font-weight","bold"],[2,"flex","1","color","red","font-weight","bold"],["title","Document attach\xe9",1,"fas","fa-file"],["title","Pi\xe8ce(s) jointe(s) attach\xe9e(s)",1,"fas","fa-paperclip"],["title","Note(s) attach\xe9e(s)",1,"fas","fa-pen-square"],["mat-fab","","color","primary",1,"addSentResource",3,"title","click"],[1,"fa","fa-plus",2,"height","auto","width","auto"],[2,"height","auto","width","auto","font-size","20px"],[1,"fas","fa-envelope-open-text",2,"left","-5px","position","relative"],[1,"fas","fa-wifi",2,"position","absolute","font-size","10px","transform","rotate(35deg)","margin-left","-3px","margin-top","-3px"]],template:function(t,e){if(1&t&&(n.Oc(0,HA,3,0,"ng-container",0),n.Oc(1,hW,10,5,"ng-template",null,1,n.Pc)),2&t){const t=n.zc(2);n.oc("ngIf",e.loading)("ngIfElse",t)}},directives:[P.t,V.c,vt.o,Fe.a,vt.c,vt.b,vt.n,og.b,og.a,P.s,vt.a,vt.m,k.b,S.a],pipes:[g.d,Wt.a,uo,ps],styles:[".dateType[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;text-align:center}.dateType[_ngcontent-%COMP%], .dateType[_ngcontent-%COMP%] .type[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{width:100px;font-size:10px!important}.dateType[_ngcontent-%COMP%] .type[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;color:#fff;font-weight:400;border-radius:.25em}.dateType[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{opacity:.5}.desc[_ngcontent-%COMP%]{font-size:13px;flex:1;display:flex;flex-direction:column}.error[_ngcontent-%COMP%]{color:red}.success[_ngcontent-%COMP%]{color:green}.contact[_ngcontent-%COMP%]{font-size:10px;flex-direction:column;display:flex}.filterTypes[_ngcontent-%COMP%]{overflow:auto;overflow-y:hidden;width:auto;max-width:100%;margin-left:10px}.filterTypes[_ngcontent-%COMP%] .mat-button-toggle-checked{background:#f99830;color:#fff;font-weight:700;height:25px;font-size:10px}.filterTypes[_ngcontent-%COMP%] .mat-button-toggle-checked .mat-button-toggle-label-content{line-height:0}.filterTypes[_ngcontent-%COMP%] .mat-button-toggle-checked .mat-button-toggle-button{height:100%}.filterTypes[_ngcontent-%COMP%] [_ngcontent-%COMP%]:not( .mat-button-toggle-checked) .mat-button-toggle-button{color:#135f7f;font-weight:700;height:25px;font-size:10px}.filterTypes[_ngcontent-%COMP%] [_ngcontent-%COMP%]:not( .mat-button-toggle-checked) .mat-button-toggle-button .mat-button-toggle-label-content{line-height:0}.subinfo[_ngcontent-%COMP%]{padding:5px;display:flex;font-size:10px;width:100%}.canManage[_ngcontent-%COMP%]{cursor:pointer;transition:all .5s}.canManage[_ngcontent-%COMP%]:hover{background:rgba(19,95,127,.1);transition:all .5s}.attach[_ngcontent-%COMP%]{font-size:13px;display:flex;padding:5px;color:#135f7f}.attach[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{flex:1;cursor:help}.addSentResource[_ngcontent-%COMP%]{position:-webkit-sticky;position:sticky;z-index:2;bottom:10px;margin-left:10px}.loading[_ngcontent-%COMP%]{display:flex;width:100%;align-items:center;justify-content:center}"]}),t})(),pW=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.data=i,this.dialogRef=n,this.notify=a}ngOnInit(){}onSubmit(){this.http.post("../rest/indexingModels",this.data.indexingModel).pipe(Object(mt.a)(t=>{this.data.indexingModel.id=t.id,this.notify.success(this.translate.instant("lang.indexingModelAdded")),this.dialogRef.close(this.data)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.a),n.Qb(q.h),n.Qb(D.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:23,vars:22,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],[3,"ngSubmit"],["submitForm","ngForm"],["role","alert",1,"alert-message","alert-message-info",2,"margin-top","30px",3,"innerHTML"],["appearance","outline"],["matInput","","name","label","required","","maxlength","256",3,"placeholder","ngModel","ngModelChange"],["mat-raised-button","","color","primary","type","submit",3,"disabled","click"],["mat-raised-button","","color","default","type","button",3,"click"]],template:function(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-dialog-content"),n.Wb(5,"form",2,3),n.dc("ngSubmit",(function(){return e.onSubmit()})),n.Rb(7,"div",4),n.ic(8,"translate"),n.ic(9,"translate"),n.Wb(10,"mat-form-field",5),n.Wb(11,"mat-label"),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Wb(14,"input",6),n.dc("ngModelChange",(function(t){return e.data.indexingModel.label=t})),n.ic(15,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(16,"mat-dialog-actions"),n.Wb(17,"button",7),n.dc("click",(function(){return n.Dc(t),n.zc(6).ngSubmit.emit()})),n.Qc(18),n.ic(19,"translate"),n.Vb(),n.Wb(20,"button",8),n.dc("click",(function(){return e.dialogRef.close()})),n.Qc(21),n.ic(22,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(6);n.Db(2),n.Rc(n.jc(3,8,"lang.privateIndexingModelCreation")),n.Db(5),n.oc("innerHTML",n.jc(8,10,"lang.addPrivateIndexingModelMsg")+"<b> "+e.data.masterIndexingModel.label+"</b> "+n.jc(9,12,"lang.addPrivateIndexingModelMsg2"),n.Ec),n.Db(5),n.Rc(n.jc(13,14,"lang.label")),n.Db(2),n.pc("placeholder",n.jc(15,16,"lang.label")),n.oc("ngModel",e.data.indexingModel.label),n.Db(3),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(19,18,"lang.validate")),n.Db(3),n.Rc(n.jc(22,20,"lang.cancel"))}},directives:[q.i,q.f,X.K,X.v,X.w,Y.c,Y.g,J.b,X.d,X.F,X.p,X.u,X.x,q.c,k.b],pipes:[g.d],styles:["mat-icon[_ngcontent-%COMP%]{height:auto!important}"]}),t})();function bW(t,e){if(1&t&&(n.Wb(0,"div",3),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Tc(" Mod\xe8le utilis\xe9 : ",t.currentIndexingModel.label," ",t.currentIndexingModel.default?"("+t.translate.instant("lang.default")+")":""," ")}}function fW(t,e){if(1&t&&(n.Wb(0,"div",19),n.Qc(1),n.ic(2,"shorten"),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(1),n.Tc(" ",n.lc(2,2,t.label,45,"...")," ",t.default?"("+e.translate.instant("lang.default")+")":""," ")}}function mW(t,e){if(1&t&&(n.Wb(0,"div",19),n.Qc(1),n.ic(2,"shorten"),n.Wb(3,"span",20),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Sc(" ",n.lc(2,2,t.label,45,"..."),"\xa0"),n.Db(3),n.Rc(n.jc(5,6,"lang.private"))}}function gW(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",21),n.dc("click",(function(e){n.Dc(t);const i=n.hc(),a=i.$implicit,s=i.index,o=n.hc(2);return e.stopPropagation(),o.deletePrivateIndexingModel(a.id,s)})),n.Rb(1,"mat-icon",22),n.Vb()}if(2&t){const t=n.hc(3);n.oc("title",t.translate.instant("lang.delete"))}}function vW(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"button",16),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).selectIndexingModel(i)})),n.Oc(2,fW,3,6,"div",17),n.Oc(3,mW,6,8,"div",17),n.Oc(4,gW,2,1,"button",18),n.Vb(),n.Tb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.Db(1),n.Ib("listModels-menu-selected",t.id===i.currentIndexingModel.id)("private",t.private),n.oc("title",t.label),n.Db(1),n.oc("ngIf",!t.private),n.Db(1),n.oc("ngIf",t.private),n.Db(1),n.oc("ngIf",t.id!==i.currentIndexingModel.id&&t.private)}}function _W(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",4),n.Rb(1,"mat-icon",5),n.Wb(2,"span",6),n.Qc(3),n.Vb(),n.Rb(4,"i",7),n.Vb(),n.Wb(5,"mat-menu",null,8),n.Wb(7,"div",9),n.Wb(8,"span"),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Wb(11,"mat-form-field",10),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.Wb(12,"input",11,12),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("keydown",(function(e){return n.Dc(t),e.stopPropagation()})),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Oc(15,vW,5,8,"ng-container",13),n.ic(16,"filterList"),n.Vb(),n.Wb(17,"button",14),n.dc("click",(function(){return n.Dc(t),n.hc().savePrivateIndexingModel()})),n.Rb(18,"mat-icon",15),n.Vb()}if(2&t){const t=n.zc(6),e=n.zc(13),i=n.hc();n.oc("matMenuTriggerFor",t),n.Db(2),n.oc("title",i.currentIndexingModel.label),n.Db(1),n.Tc(" ",i.currentIndexingModel.label," ",i.currentIndexingModel.default?"("+i.translate.instant("lang.default")+")":""," "),n.Db(2),n.Fb("menuForm listModels-menu"),n.Db(4),n.Sc(" ",n.jc(10,10,"lang.indexingModel")," "),n.Db(3),n.pc("placeholder",n.jc(14,12,"lang.filterBy")),n.Db(3),n.oc("ngForOf",n.lc(16,14,i.indexingModels,e.value,"label")),n.Db(2),n.oc("title",i.translate.instant("lang.createPrivateIndexingModel"))}}let yW=(()=>{class t{constructor(t,e,i,a,s,o){this.translate=t,this.http=e,this.headerService=i,this.notify=a,this.sortPipe=s,this.dialog=o,this.loading=!0,this.defaultIndexingModelId=null,this.indexingModels=[],this.adminMode=!1,this.afterListModelsLoaded=new n.o,this.afterSelectedListModel=new n.o,this.currentIndexingModel={}}ngOnInit(){this.getIndexingModelList()}getIndexingModelList(){this.http.get("../rest/indexingModels").pipe(Object(mt.a)(t=>{this.indexingModels=t.indexingModels,this.indexingModels.length>0&&(this.currentIndexingModel=null===this.defaultIndexingModelId?this.indexingModels.filter(t=>!0===t.default)[0]:this.indexingModels.filter(t=>t.id===this.defaultIndexingModelId)[0],void 0===this.currentIndexingModel&&(this.currentIndexingModel=this.indexingModels[0],this.notify.error(this.translate.instant("lang.noDefaultIndexingModel"))),this.loadIndexingModelsList())}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}loadIndexingModelsList(){const t=this.sortPipe.transform(this.indexingModels.filter(t=>null===t.master),"label"),e=this.sortPipe.transform(this.indexingModels.filter(t=>null!==t.master),"label");this.indexingModels=[],t.forEach(t=>{this.indexingModels.push(t),e.forEach(e=>{e.master===t.id&&this.indexingModels.push(e)})}),this.afterListModelsLoaded.emit(this.currentIndexingModel)}resetIndexingModel(){this.currentIndexingModel=this.indexingModels.filter(t=>!0===t.default)[0],this.afterSelectedListModel.emit(this.currentIndexingModel)}selectIndexingModel(t){this.currentIndexingModel=t,this.afterSelectedListModel.emit(t)}getCurrentIndexingModel(){return this.currentIndexingModel}getIndexingModels(){return this.indexingModels}savePrivateIndexingModel(){const t=JSON.parse(JSON.stringify(this.indexingForm.getDatas()));t.forEach((e,i)=>{delete t[i].event,delete t[i].label,delete t[i].system,delete t[i].type,delete t[i].values});const e={category:this.indexingForm.getCategory(),label:"",owner:this.headerService.user.id,private:!0,fields:t,master:null!==this.currentIndexingModel.master?this.currentIndexingModel.master:this.currentIndexingModel.id},i=this.indexingModels.filter(t=>t.id===e.master)[0];this.dialog.open(pW,{panelClass:"maarch-modal",autoFocus:!0,disableClose:!0,data:{indexingModel:e,masterIndexingModel:i}}).afterClosed().pipe(Object(d.a)(t=>void 0!==t),Object(mt.a)(t=>{this.indexingModels.push(t.indexingModel),this.currentIndexingModel=this.indexingModels.filter(e=>e.id===t.indexingModel.id)[0],this.loadIndexingModelsList()}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}deletePrivateIndexingModel(t,e){this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete("../rest/indexingModels/"+t)),Object(mt.a)(()=>{this.indexingModels.splice(e,1),this.notify.success(this.translate.instant("lang.indexingModelDeleted"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(y.a),n.Qb(D.a),n.Qb(Wt.a),n.Qb(q.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-select-indexing-model"]],inputs:{defaultIndexingModelId:"defaultIndexingModelId",indexingModels:"indexingModels",indexingForm:"indexingForm",adminMode:"adminMode"},outputs:{afterListModelsLoaded:"afterListModelsLoaded",afterSelectedListModel:"afterSelectedListModel"},features:[n.Cb([Wt.a])],decls:4,vars:2,consts:[[1,"listModels"],["class","primary",4,"ngIf","ngIfElse"],["menuModel",""],[1,"primary"],["mat-button","",1,"button-form-primary","listModels-button",3,"matMenuTriggerFor"],["mattPrefix","",1,"fab","fa-wpforms"],[1,"menu-label",3,"title"],[1,"fa","fa-chevron-down","menu-icon"],["IndexingModelsMenu","matMenu"],[1,"menuTitle"],["floatLabel","never","appearance","outline",1,"smallInput",2,"width","220px !important",3,"click"],["matInput","","id","searchTerm","autocomplete","off",3,"placeholder","click","keydown"],["listFilter",""],[4,"ngFor","ngForOf"],["mat-icon-button","","type","button","color","primary",3,"title","click"],[1,"far","fa-copy"],["mat-menu-item","",2,"display","flex","align-items","center",3,"title","click"],["style","flex:1;",4,"ngIf"],["mat-icon-button","","class","listModels-menu-delete",3,"title","click",4,"ngIf"],[2,"flex","1"],[1,"listModels-menu-badge"],["mat-icon-button","",1,"listModels-menu-delete",3,"title","click"],["color","warn",1,"fa","fa-trash"]],template:function(t,e){if(1&t&&(n.Wb(0,"div",0),n.Oc(1,bW,2,2,"div",1),n.Oc(2,_W,19,18,"ng-template",null,2,n.Pc),n.Vb()),2&t){const t=n.zc(3);n.Db(1),n.oc("ngIf",!e.adminMode)("ngIfElse",t)}},directives:[P.t,k.b,ne.d,S.a,ne.e,Y.c,J.b,P.s,ne.b],pipes:[g.d,rg,Tt.p],styles:[".listModels[_ngcontent-%COMP%]{background:#f9f9f9;display:flex;padding:10px 40px}@media (max-width:768px){.listModels[_ngcontent-%COMP%]{padding-bottom:20px;padding-left:0;padding-right:0}}.listModels[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{font-size:20px;height:auto}.listModels-button[_ngcontent-%COMP%]{margin-right:20px;width:450px!important} .listModels-menu{min-width:450px!important} .listModels-menu .mat-menu-item:hover:hover .listModels-menu-badge{background:#fff!important;color:#135f7f!important} .listModels-menu .mat-menu-item:hover:hover .listModels-menu-delete .mat-icon{color:#fff!important} .listModels-menu-badge{font-size:70%;background:#135f7f;border-radius:20px;color:#fff;padding:2px 5px;font-weight:700} .listModels-menu-delete .mat-icon{margin-right:0} .listModels-menu-selected{color:#fff!important;background:#135f7f} .listModels-menu-selected .listModels-menu-badge{background:#fff!important;color:#135f7f!important}.smallInput[_ngcontent-%COMP%]{padding:10px}.smallInput[_ngcontent-%COMP%] .mat-form-field-wrapper{padding-bottom:0}.menuTitle[_ngcontent-%COMP%]{display:flex;padding-left:20px;align-items:center;color:#135f7f;font-weight:700}.private[_ngcontent-%COMP%]{padding-left:50px}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();const xW=["autoCompleteInput"];function CW(t,e){if(1&t){const t=n.Xb();n.Wb(0,"plugin-select-search",2),n.dc("afterSelected",(function(e){n.Dc(t);const i=n.hc();return i.afterSelected.emit(e),i.setAddress(e)})),n.ic(1,"translate"),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc();n.oc("label",n.jc(1,5,"lang.issuingSite"))("placeholderLabel",n.jc(2,7,"lang.issuingSite"))("formControlSelect",t.control)("showResetOption",t.showResetOption)("datas",t.issuingSiteList)}}function OW(t,e){if(1&t&&(n.Wb(0,"div"),n.Qc(1),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Sc(" ",t.issuingSiteAddress.addressCountry," ")}}function DW(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",3),n.Wb(1,"div"),n.Qc(2),n.Vb(),n.Wb(3,"div"),n.Qc(4),n.Vb(),n.Wb(5,"div"),n.Qc(6),n.Vb(),n.Wb(7,"div"),n.Qc(8),n.Vb(),n.Wb(9,"div"),n.Qc(10),n.Vb(),n.Oc(11,OW,2,1,"div",4),n.Wb(12,"button",5),n.dc("click",(function(){return n.Dc(t),n.hc().goTo()})),n.ic(13,"translate"),n.Rb(14,"mat-icon",6),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(2),n.Sc(" ",t.issuingSiteAddress.siteLabel," "),n.Db(2),n.Sc(" ",t.issuingSiteAddress.addressAdditional1," "),n.Db(2),n.Tc(" ",t.issuingSiteAddress.addressNumber," ",t.issuingSiteAddress.addressStreet," "),n.Db(2),n.Sc(" ",t.issuingSiteAddress.addressAdditional2," "),n.Db(2),n.Tc(" ",t.issuingSiteAddress.addressPostcode," ",t.issuingSiteAddress.addressTown," "),n.Db(1),n.oc("ngIf","RW"===t.registedMailType),n.Db(1),n.oc("title",n.jc(13,9,"lang.openMap"))}}let wW=(()=>{class t{constructor(t,e,i,a){this.http=t,this.notify=e,this.headerService=i,this.functions=a,this.loading=!1,this.issuingSiteList=[],this.issuingSiteAddress=null,this.control=new X.i(""),this.registedMailType=null,this.showResetOption=!1,this.afterSelected=new n.o}ngOnInit(){this.getIssuingSites(),this.functions.empty(this.control.value)||setTimeout(()=>{this.setAddress(this.control.value)},0)}getIssuingSites(){this.loading=!0,this.http.get("../rest/registeredMail/sites").pipe(Object(mt.a)(t=>{this.issuingSiteAddress=null,this.issuingSiteList=this.functions.empty(this.headerService.user.entities)?t.sites.map(t=>Object.assign(Object.assign({},t),{id:t.id,label:`${t.label} (${t.accountNumber})`})):t.sites.filter(t=>t.entities.indexOf(this.headerService.user.entities[0].id)>-1).map(t=>Object.assign(Object.assign({},t),{id:t.id,label:`${t.label} (${t.accountNumber})`}))}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}setAddress(t){null===t?this.issuingSiteAddress=null:this.http.get("../rest/registeredMail/sites/"+t).pipe(Object(mt.a)(t=>{this.issuingSiteAddress=t.site}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}getSiteLabel(t){return this.issuingSiteList.filter(e=>e.id===t)[0].label}goTo(){window.open(`https://www.google.com/maps/search/${this.issuingSiteAddress.addressNumber}+${this.issuingSiteAddress.addressStreet},+${this.issuingSiteAddress.addressPostcode}+${this.issuingSiteAddress.addressTown},+${this.issuingSiteAddress.addressCountry}`,"_blank")}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-issuing-site-input"]],viewQuery:function(t,e){var i;1&t&&n.Kc(xW,!0),2&t&&n.yc(i=n.ec())&&(e.autoCompleteInput=i.first)},inputs:{control:"control",registedMailType:"registedMailType",showResetOption:"showResetOption"},outputs:{afterSelected:"afterSelected"},decls:3,vars:2,consts:[["style","width:100%;",3,"label","placeholderLabel","formControlSelect","showResetOption","datas","afterSelected",4,"ngIf"],["color","primary",4,"ngIf"],[2,"width","100%",3,"label","placeholderLabel","formControlSelect","showResetOption","datas","afterSelected"],["color","primary"],[4,"ngIf"],["mat-icon-button","",1,"map-icon",3,"title","click"],[1,"fa","fas","fa-map-marked-alt"]],template:function(t,e){1&t&&(n.Wb(0,"form"),n.Oc(1,CW,3,9,"plugin-select-search",0),n.Oc(2,DW,15,11,"mat-card",1),n.Vb()),2&t&&(n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("ngIf",null!==e.issuingSiteAddress))},directives:[X.K,X.v,X.w,P.t,fr,K.a,k.b,S.a],pipes:[g.d],styles:[".address-icon[_ngcontent-%COMP%]{right:10px;top:10px}.address-icon[_ngcontent-%COMP%], .map-icon[_ngcontent-%COMP%]{position:absolute;font-size:14px}.map-icon[_ngcontent-%COMP%]{cursor:pointer;z-index:2;right:0;bottom:0}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();function MW(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-contact-autocomplete",4),n.dc("afterSelected",(function(e){return n.Dc(t),n.hc().getContact(e)})),n.Vb()}2&t&&n.oc("exclusion","?noUsers=true&noEntities=true&noContactsGroups=true")("inputMode",!0)}function kW(t,e){if(1&t){const t=n.Xb();n.Wb(0,"a",5),n.dc("click",(function(){n.Dc(t);const e=n.hc();return e.manualAddress=!e.manualAddress})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.switchManualAddress")))}function SW(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",38),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).addressBANCurrentDepartment=i})),n.Qc(1),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.Rc(t)}}function IW(t,e){if(1&t&&(n.Wb(0,"mat-option",40),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t)("title",t.address),n.Db(1),n.Sc(" ",t.address," ")}}function PW(t,e){if(1&t&&(n.Ub(0),n.Oc(1,IW,2,3,"mat-option",39),n.ic(2,"async"),n.Tb()),2&t){const t=n.hc(3);n.Db(1),n.oc("ngForOf",n.jc(2,1,t.addressBANFilteredResult))}}function VW(t,e){if(1&t&&n.Rb(0,"mat-option",41),2&t){const t=n.hc(3);n.oc("innerHTML",t.addressBANInfo,n.Ec)}}function RW(t,e){1&t&&(n.Wb(0,"mat-option",42),n.Rb(1,"mat-spinner",43),n.Vb())}function jW(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field",26),n.Wb(1,"button",27),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.ic(2,"translate"),n.Qc(3),n.Rb(4,"i",28),n.Vb(),n.Wb(5,"mat-menu",null,29),n.Oc(7,SW,2,1,"button",30),n.Vb(),n.Rb(8,"mat-icon",31),n.Wb(9,"input",32,23),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("focus",(function(){return n.Dc(t),n.hc(2).resetAutocompleteAddressBan()})),n.ic(11,"translate"),n.Vb(),n.Wb(12,"mat-autocomplete",33,34),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc(2).selectAddressBan(e)})),n.Oc(14,PW,3,3,"ng-container",35),n.Oc(15,VW,1,1,"mat-option",36),n.Oc(16,RW,2,0,"mat-option",37),n.Vb(),n.Vb()}if(2&t){const t=n.zc(6),e=n.zc(13),i=n.hc(2);n.Db(1),n.oc("matMenuTriggerFor",t)("title",n.jc(2,10,"lang.targetDepartment")),n.Db(2),n.Sc(" ",i.addressBANCurrentDepartment,"\xa0"),n.Db(4),n.oc("ngForOf",i.departmentList),n.Db(2),n.oc("placeholder",n.jc(11,12,"lang.searchAddressBan"))("formControl",i.addressBANControl)("matAutocomplete",e),n.Db(5),n.oc("ngIf",i.addressBANResult.length>0&&!i.addressBANLoading),n.Db(1),n.oc("ngIf",0===i.addressBANResult.length&&!i.addressBANLoading),n.Db(1),n.oc("ngIf",i.addressBANLoading)}}function AW(t,e){if(1&t&&(n.Wb(0,"mat-option",44),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.label),n.Db(1),n.Sc(" ",t.label," ")}}function WW(t,e){if(1&t&&(n.Wb(0,"mat-option",44),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}function TW(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",6),n.Oc(1,jW,17,14,"mat-form-field",7),n.Wb(2,"button",8),n.dc("click",(function(){n.Dc(t);const e=n.hc();return e.manualAddress=!e.manualAddress})),n.ic(3,"translate"),n.Rb(4,"mat-icon",9),n.Vb(),n.Wb(5,"mat-form-field",10),n.Wb(6,"mat-label"),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Wb(9,"input",11),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().control.value.company=e}))("ngModelChange",(function(e){return n.Dc(t),n.hc().toUpperCase("company",e)})),n.Vb(),n.Vb(),n.Wb(10,"mat-form-field",10),n.Wb(11,"mat-label"),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Wb(14,"mat-select",12),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().control.value.civility=e})),n.Oc(15,AW,2,2,"mat-option",13),n.ic(16,"sortBy"),n.Vb(),n.Vb(),n.Wb(17,"mat-form-field",10),n.Wb(18,"mat-label"),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"input",14),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().control.value.firstname=e}))("ngModelChange",(function(e){return n.Dc(t),n.hc().toUpperCase("firstname",e)})),n.Vb(),n.Vb(),n.Wb(22,"mat-form-field",10),n.Wb(23,"mat-label"),n.Qc(24),n.ic(25,"translate"),n.Vb(),n.Wb(26,"input",15),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().control.value.lastname=e}))("ngModelChange",(function(e){return n.Dc(t),n.hc().toUpperCase("lastname",e)})),n.Vb(),n.Vb(),n.Wb(27,"mat-form-field",10),n.Wb(28,"mat-label"),n.Qc(29),n.ic(30,"translate"),n.Vb(),n.Wb(31,"input",16),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().control.value.addressAdditional1=e}))("ngModelChange",(function(e){return n.Dc(t),n.hc().toUpperCase("addressAdditional1",e)})),n.Vb(),n.Vb(),n.Wb(32,"mat-form-field",10),n.Wb(33,"mat-label"),n.Qc(34),n.ic(35,"translate"),n.Vb(),n.Wb(36,"input",17),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().control.value.addressNumber=e}))("ngModelChange",(function(e){return n.Dc(t),n.hc().toUpperCase("addressNumber",e)})),n.Vb(),n.Vb(),n.Wb(37,"mat-form-field",10),n.Wb(38,"mat-label"),n.Qc(39),n.ic(40,"translate"),n.Vb(),n.Wb(41,"input",18),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().control.value.addressStreet=e}))("ngModelChange",(function(e){return n.Dc(t),n.hc().toUpperCase("addressStreet",e)})),n.Vb(),n.Vb(),n.Wb(42,"mat-form-field",10),n.Wb(43,"mat-label"),n.Qc(44),n.ic(45,"translate"),n.Vb(),n.Wb(46,"input",19),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().control.value.addressAdditional2=e}))("ngModelChange",(function(e){return n.Dc(t),n.hc().toUpperCase("addressAdditional2",e)})),n.Vb(),n.Vb(),n.Wb(47,"mat-form-field",10),n.Wb(48,"mat-label"),n.Qc(49),n.ic(50,"translate"),n.Vb(),n.Wb(51,"input",20),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().control.value.addressPostcode=e}))("ngModelChange",(function(e){return n.Dc(t),n.hc().toUpperCase("addressPostcode",e)})),n.Vb(),n.Vb(),n.Wb(52,"mat-form-field",10),n.Wb(53,"mat-label"),n.Qc(54),n.ic(55,"translate"),n.Vb(),n.Wb(56,"input",21),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().control.value.addressTown=e}))("ngModelChange",(function(e){return n.Dc(t),n.hc().toUpperCase("addressTown",e)})),n.Vb(),n.Vb(),n.Wb(57,"mat-form-field",10),n.Wb(58,"mat-label"),n.Qc(59),n.ic(60,"translate"),n.Vb(),n.Wb(61,"input",22,23),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().control.value.addressCountry=e})),n.Vb(),n.Wb(63,"mat-autocomplete",24,25),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc().control.value.addressCountry=e.option.value})),n.Oc(65,WW,2,2,"mat-option",13),n.ic(66,"async"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(64),e=n.hc();n.Db(1),n.oc("ngIf","DISABLED"!==e.control.status),n.Db(1),n.oc("title",n.jc(3,32,"lang.showAddress")),n.Db(5),n.Rc(n.jc(8,34,"lang.contactsParameters_company")),n.Db(2),n.oc("ngModel",e.control.value.company)("required",e.functions.empty(e.control.value.lastname)),n.Db(3),n.Rc(n.jc(13,36,"lang.contactsParameters_civility")),n.Db(2),n.oc("ngModel",e.control.value.civility),n.Db(1),n.oc("ngForOf",n.kc(16,38,e.civilities,"label")),n.Db(4),n.Rc(n.jc(20,41,"lang.contactsParameters_firstname")),n.Db(2),n.oc("ngModel",e.control.value.firstname)("required",e.functions.empty(e.control.value.company)),n.Db(3),n.Rc(n.jc(25,43,"lang.contactsParameters_lastname")),n.Db(2),n.oc("ngModel",e.control.value.lastname)("required",e.functions.empty(e.control.value.company)),n.Db(3),n.Rc(n.jc(30,45,"lang.contactsParameters_addressAdditional1")),n.Db(2),n.oc("ngModel",e.control.value.addressAdditional1),n.Db(3),n.Rc(n.jc(35,47,"lang.contactsParameters_addressNumber")),n.Db(2),n.oc("ngModel",e.control.value.addressNumber),n.Db(3),n.Rc(n.jc(40,49,"lang.contactsParameters_addressStreet")),n.Db(2),n.oc("ngModel",e.control.value.addressStreet),n.Db(3),n.Rc(n.jc(45,51,"lang.contactsParameters_addressAdditional2")),n.Db(2),n.oc("ngModel",e.control.value.addressAdditional2),n.Db(3),n.Rc(n.jc(50,53,"lang.contactsParameters_addressPostcode")),n.Db(2),n.oc("ngModel",e.control.value.addressPostcode),n.Db(3),n.Rc(n.jc(55,55,"lang.contactsParameters_addressTown")),n.Db(2),n.oc("ngModel",e.control.value.addressTown),n.Db(3),n.Rc(n.jc(60,57,"lang.contactsParameters_addressCountry")),n.Db(2),n.oc("ngModel",e.control.value.addressCountry)("matAutocomplete",t)("formControl",e.countryControl)("required","RW"===e.registeredMailType),n.Db(4),n.oc("ngForOf",n.jc(66,59,e.countriesFilteredResult))}}function EW(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",8),n.dc("click",(function(){n.Dc(t);const e=n.hc(2);return e.manualAddress=!e.manualAddress})),n.ic(1,"translate"),n.Rb(2,"mat-icon",49),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.update"))}function FW(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",45),n.Oc(1,EW,3,3,"button",46),n.Wb(2,"div"),n.Qc(3),n.Vb(),n.Wb(4,"div"),n.Qc(5),n.Vb(),n.Wb(6,"div"),n.Qc(7),n.Vb(),n.Wb(8,"div"),n.Qc(9),n.Vb(),n.Wb(10,"div"),n.Qc(11),n.Vb(),n.Wb(12,"div"),n.Qc(13),n.Vb(),n.Wb(14,"div"),n.Qc(15),n.Vb(),n.Wb(16,"button",47),n.dc("click",(function(){return n.Dc(t),n.hc().goTo()})),n.ic(17,"translate"),n.Rb(18,"mat-icon",48),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(1),n.oc("ngIf","DISABLED"!==t.control.status),n.Db(2),n.Sc(" ",t.control.value.company," "),n.Db(2),n.Uc(" ",t.control.value.civility," ",t.control.value.firstname," ",t.control.value.lastname," "),n.Db(2),n.Sc(" ",t.control.value.addressAdditional1," "),n.Db(2),n.Tc(" ",t.control.value.addressNumber," ",t.control.value.addressStreet," "),n.Db(2),n.Sc(" ",t.control.value.addressAdditional2," "),n.Db(2),n.Tc(" ",t.control.value.addressPostcode," ",t.control.value.addressTown," "),n.Db(2),n.Sc(" ",t.control.value.addressCountry," "),n.Db(1),n.oc("title",n.jc(17,13,"lang.openMap"))}}let LW=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.latinisePipe=n,this.functions=a,this.manualAddress=!1,this.civilities=[],this.addressBANInfo="",this.addressBANMode=!0,this.addressBANControl=new X.i,this.addressBANLoading=!1,this.addressBANResult=[],this.addressBANCurrentDepartment="75",this.departmentList=[],this.countries=[],this.countryControl=new X.i}ngOnInit(){this.getCivilities(),this.getCountries(),this.initAutocompleteCountries(),this.initBanSearch(),this.initAutocompleteAddressBan(),null===this.control.value&&(this.control.setValue({}),this.control.setErrors({required:!0}))}getCivilities(){this.http.get("../rest/civilities").pipe(Object(mt.a)(t=>{Object.keys(t.civilities).forEach(e=>{this.civilities.push({id:e,label:t.civilities[e].label.toUpperCase()})})}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}getCountries(){this.http.get("../rest/registeredMail/countries").pipe(Object(mt.a)(t=>{this.countries=t.countries.map(t=>this.latinisePipe.transform(t.toUpperCase()))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}initAutocompleteCountries(){this.countriesFilteredResult=this.countryControl.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>this._filter(t)))}_filter(t){const e=t.toLowerCase();return this.countries.filter(t=>t.toLowerCase().includes(e))}initBanSearch(){this.http.get("../rest/ban/availableDepartments").pipe(Object(mt.a)(t=>{null!==t.default&&-1!==t.departments.indexOf(t.default.toString())&&(this.addressBANCurrentDepartment=t.default),this.departmentList=t.departments}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}initAutocompleteAddressBan(){this.addressBANInfo=this.translate.instant("lang.autocompleteInfo"),this.addressBANResult=[],this.addressBANControl.valueChanges.pipe(Object(pt.a)(300),Object(d.a)(t=>t.length>2),Object(bt.a)(),Object(mt.a)(()=>this.addressBANLoading=!0),Object(ft.a)(t=>this.http.get("../rest/autocomplete/banAddresses",{params:{address:t,department:this.addressBANCurrentDepartment}})),Object(mt.a)(t=>{this.addressBANInfo=0===t.length?this.translate.instant("lang.noAvailableValue"):"",this.addressBANResult=t,this.addressBANFilteredResult=Object(c.a)(this.addressBANResult),this.addressBANLoading=!1})).subscribe()}resetAutocompleteAddressBan(){this.addressBANResult=[],this.addressBANInfo=this.translate.instant("lang.autocompleteInfo")}selectAddressBan(t){this.control.value.addressNumber=t.option.value.number,this.control.value.addressStreet=t.option.value.afnorName,this.control.value.addressPostcode=t.option.value.postalCode,this.control.value.addressTown=t.option.value.city,this.control.value.addressCountry="FRANCE",this.countryControl.setValue("FRANCE"),this.addressBANControl.setValue(""),this.checkRequiredFields(),this.control.markAsTouched()}getFormatedAdress(){const t={};return Object.keys(this.control.value).forEach(e=>{t[e]=this.control.value[e]}),t}emptyAddress(){let t=!0;return Object.keys(this.control.value).forEach(e=>{this.functions.empty(this.control.value[e])||(t=!1)}),t}toUpperCase(t,e){setTimeout(()=>{const e=this.latinisePipe.transform(this.control.value[t].toUpperCase());this.control.value[t]=e,this.checkRequiredFields()},100)}checkRequiredFields(){this.functions.empty(this.control.value.company)?this.functions.empty(this.control.value.company)&&(this.functions.empty(this.control.value.firstname)||this.functions.empty(this.control.value.lastname)||this.functions.empty(this.control.value.addressNumber)||this.functions.empty(this.control.value.addressStreet)||this.functions.empty(this.control.value.addressPostcode)||this.functions.empty(this.control.value.addressTown)||"RW"===this.registeredMailType&&this.functions.empty(this.control.value.addressCountry)?this.control.setErrors({required:!0}):this.control.setErrors(null)):this.functions.empty(this.control.value.addressNumber)||this.functions.empty(this.control.value.addressStreet)||this.functions.empty(this.control.value.addressPostcode)||this.functions.empty(this.control.value.addressTown)||"RW"===this.registeredMailType&&this.functions.empty(this.control.value.addressCountry)?this.control.setErrors({required:!0}):this.control.setErrors(null)}goTo(){window.open(`https://www.google.com/maps/search/${this.control.value.addressNumber}+${this.control.value.addressStreet},+${this.control.value.addressPostcode}+${this.control.value.addressTown},+${this.control.value.addressCountry}`,"_blank")}getContact(t){this.http.get("../rest/contacts/"+t.id).pipe(Object(mt.a)(t=>{this.control.value.firstname=t.firstname,this.control.value.lastname=t.lastname,this.control.value.addressStreet=t.addressStreet,this.control.value.addressPostcode=t.addressPostcode,this.control.value.addressTown=t.addressTown,this.control.value.addressCountry=t.addressCountry,this.control.value.addressNumber=t.addressNumber,this.control.value.company=t.company,this.control.value.civility=t.civility.label.toUpperCase(),this.control.value.addressAdditional1=t.addressAdditional1,this.control.value.addressAdditional2=t.addressAdditional2,this.countryControl.setValue(t.addressCountry),this.control.markAsTouched()}),Object(m.a)(t=>(this.notify.error(t.error.errors),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(Tt.c),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-registered-mail-recipient-input"]],inputs:{control:"control",registeredMailType:"registeredMailType"},decls:4,vars:4,consts:[["style","width:100%;",3,"exclusion","inputMode","afterSelected",4,"ngIf"],["style","cursor: pointer;",3,"click",4,"ngIf"],["color","primary",4,"ngIf"],["color","primary","style","min-height: 60px",4,"ngIf"],[2,"width","100%",3,"exclusion","inputMode","afterSelected"],[2,"cursor","pointer",3,"click"],["color","primary"],["appearance","outline","class","smallInput",4,"ngIf"],["mat-icon-button","",1,"address-icon",3,"title","click"],[1,"fa","fa-eye"],["floatLabel","always"],["matInput","","name","company",3,"ngModel","required","ngModelChange"],["name","civility",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["matInput","","name","firstname",3,"ngModel","required","ngModelChange"],["matInput","","name","lastname",3,"ngModel","required","ngModelChange"],["matInput","","name","addressAdditional1",3,"ngModel","ngModelChange"],["matInput","","name","addressNumber","required","",3,"ngModel","ngModelChange"],["matInput","","name","addressStreet","required","",3,"ngModel","ngModelChange"],["matInput","","name","addressAdditional2",3,"ngModel","ngModelChange"],["matInput","","name","addressPostcode","required","",3,"ngModel","ngModelChange"],["matInput","","name","addressTown","required","",3,"ngModel","ngModelChange"],["matInput","",3,"ngModel","matAutocomplete","formControl","required","ngModelChange"],["autoCompleteInput",""],["isOpen","true",3,"optionSelected"],["matAutocompleteCountries","matAutocomplete"],["appearance","outline",1,"smallInput"],["mat-button","","matSuffix","",3,"matMenuTriggerFor","title","click"],[1,"fa","fa-chevron-down"],["menuDep","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["color","primary","matPrefix","",1,"fa","fa-search",2,"font-size","15px"],["type","text","matInput","","maxlength","128",3,"placeholder","formControl","matAutocomplete","click","focus"],[3,"optionSelected"],["auto","matAutocomplete"],[4,"ngIf"],["class","autoCompleteInfoResult smallInputInfo","disabled","",3,"innerHTML",4,"ngIf"],["disabled","",4,"ngIf"],["mat-menu-item","",3,"click"],[3,"value","title",4,"ngFor","ngForOf"],[3,"value","title"],["disabled","",1,"autoCompleteInfoResult","smallInputInfo",3,"innerHTML"],["disabled",""],["diameter","20"],[3,"value"],["color","primary",2,"min-height","60px"],["mat-icon-button","","class","address-icon",3,"title","click",4,"ngIf"],["mat-icon-button","",1,"map-icon",3,"title","click"],[1,"fa","fas","fa-map-marked-alt"],[1,"fa","fa-edit"]],template:function(t,e){1&t&&(n.Oc(0,MW,1,2,"app-contact-autocomplete",0),n.Oc(1,kW,3,3,"a",1),n.Oc(2,TW,67,61,"mat-card",2),n.Oc(3,FW,19,15,"mat-card",3)),2&t&&(n.oc("ngIf","DISABLED"!==e.control.status),n.Db(1),n.oc("ngIf",!e.manualAddress&&e.emptyAddress()),n.Db(1),n.oc("ngIf",e.manualAddress),n.Db(1),n.oc("ngIf",!e.manualAddress&&!e.emptyAddress()))},directives:[P.t,Zd,K.a,k.b,S.a,Y.c,Y.g,J.b,X.d,X.u,X.x,X.F,ee.a,P.s,Ne.d,X.j,Ne.a,Y.j,ne.d,ne.e,Y.i,X.p,ne.b,W.p,V.c],pipes:[g.d,Wt.a,P.b],styles:[".smallInput[_ngcontent-%COMP%]{width:230px!important;font-size:11px}.smallInput[_ngcontent-%COMP%] .mat-button[_ngcontent-%COMP%]{width:30px;height:25px;color:#135f7f}.smallInput[_ngcontent-%COMP%] .mat-button[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;line-height:normal;align-items:center}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.address-icon[_ngcontent-%COMP%]{top:0}.address-icon[_ngcontent-%COMP%], .map-icon[_ngcontent-%COMP%]{cursor:pointer;z-index:2;position:absolute;right:0;font-size:14px}.map-icon[_ngcontent-%COMP%]{bottom:0}"]}),t})();const QW=["appDiffusionsList"],NW=["appIssuingSiteInput"],zW=["appRegisteredMailRecipientInput"];function BW(t,e){1&t&&(n.Wb(0,"div",2),n.Rb(1,"mat-spinner",3),n.Vb())}function UW(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",6),n.Wb(1,"button",7),n.dc("click",(function(){return n.Dc(t),n.hc(2).toggleMailTracking()})),n.ic(2,"translate"),n.ic(3,"translate"),n.Qc(4),n.ic(5,"translate"),n.ic(6,"translate"),n.Rb(7,"mat-icon",8),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.oc("title",t.arrFormControl["mail\xadtracking"].value?n.jc(2,5,"lang.untrackThisMail"):n.jc(3,7,"lang.trackThisMail")),n.Db(3),n.Sc(" ",t.arrFormControl["mail\xadtracking"].value?n.jc(5,9,"lang.untrackThisMail"):n.jc(6,11,"lang.trackThisMail")," "),n.Db(3),n.Gb("",t.arrFormControl["mail\xadtracking"].value?"fas":"far"," fa-star")}}function $W(t,e){if(1&t&&(n.Wb(0,"small",16),n.ic(1,"translate"),n.Qc(2),n.ic(3,"titlecase"),n.ic(4,"translate"),n.Vb()),2&t){const t=n.hc(4);n.oc("title",n.jc(1,2,"lang.category_id")),n.Db(2),n.Rc(n.jc(3,4,n.jc(4,6,"lang.indexing_"+t.currentCategory)))}}function HW(t,e){1&t&&(n.Rb(0,"i",30),n.ic(1,"translate")),2&t&&n.oc("title",n.jc(1,1,"lang.move"))}function GW(t,e){if(1&t&&(n.Wb(0,"button",31),n.Rb(1,"mat-icon",32),n.Vb()),2&t){n.hc();const t=n.zc(5);n.oc("matMenuTriggerFor",t)}}function XW(t,e){1&t&&(n.Wb(0,"span"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.mandatoryField")))}function qW(t,e){1&t&&(n.Wb(0,"span"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.optionalField")))}function KW(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",33),n.dc("click",(function(){n.Dc(t);const e=n.hc(3).$implicit;return e.mandatory=!e.mandatory})),n.Oc(1,XW,3,3,"span",1),n.Oc(2,qW,3,3,"span",1),n.Vb()}if(2&t){const t=n.hc(3).$implicit;n.Db(1),n.oc("ngIf",!t.mandatory),n.Db(1),n.oc("ngIf",t.mandatory)}}function YW(t,e){1&t&&n.Rb(0,"mat-divider")}function JW(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",33),n.dc("click",(function(){n.Dc(t);const e=n.hc(3).$implicit;return n.hc(4).enableField(e,!0)})),n.Wb(1,"span"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(2),n.Rc(n.jc(3,1,"lang.enableField")))}function ZW(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",33),n.dc("click",(function(){n.Dc(t);const e=n.hc(3).$implicit;return n.hc(4).enableField(e,!1)})),n.Wb(1,"span"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(2),n.Rc(n.jc(3,1,"lang.disableField")))}function tT(t,e){1&t&&n.Rb(0,"mat-divider")}function eT(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",33),n.dc("click",(function(){n.Dc(t);const e=n.hc(3),i=e.$implicit,a=e.index,s=n.hc(2).$implicit;return n.hc(2).removeItem("indexingModels_"+s,i,a)})),n.Rb(1,"mat-icon",34),n.Wb(2,"span"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(3),n.Rc(n.jc(4,1,"lang.delete")))}function iT(t,e){if(1&t&&(n.Wb(0,"div",25),n.Oc(1,HW,2,3,"i",26),n.Qc(2),n.Oc(3,GW,2,1,"button",27),n.Wb(4,"mat-menu",null,28),n.Oc(6,KW,3,2,"button",29),n.Oc(7,YW,1,0,"mat-divider",1),n.Oc(8,JW,4,3,"button",29),n.Oc(9,ZW,4,3,"button",29),n.Oc(10,tT,1,0,"mat-divider",1),n.Oc(11,eT,5,3,"button",29),n.Vb(),n.Vb()),2&t){const t=n.hc(2).$implicit,e=n.hc(4);n.Db(1),n.oc("ngIf",e.adminMode),n.Db(1),n.Sc("\xa0 ",t.label," "),n.Db(1),n.oc("ngIf",e.adminMode),n.Db(1),n.Fb("parametersFieldsMenu"),n.Db(2),n.oc("ngIf",!t.system),n.Db(1),n.oc("ngIf",!t.system),n.Db(1),n.oc("ngIf",!t.enabled),n.Db(1),n.oc("ngIf",t.enabled),n.Db(1),n.oc("ngIf",!t.system),n.Db(1),n.oc("ngIf",!t.system&&-1===t.identifier.indexOf("registeredMail_")&&("registeredMail"==e.currentCategory&&"departureDate"!=t.identifier||"registeredMail"!=e.currentCategory))}}function nT(t,e){1&t&&(n.Wb(0,"button",38),n.ic(1,"translate"),n.Rb(2,"mat-icon",39),n.Vb()),2&t&&n.oc("title",n.jc(1,1,"lang.bddModeCustomFieldMsg"))}function aT(t,e){if(1&t&&(n.Wb(0,"mat-label"),n.Qc(1),n.Vb()),2&t){const t=n.hc(3).$implicit;n.Db(1),n.Rc(t.label)}}function sT(t,e){if(1&t&&(n.Ub(0),n.Oc(1,nT,3,3,"button",35),n.Wb(2,"mat-form-field",36),n.Oc(3,aT,2,1,"mat-label",1),n.Rb(4,"textarea",37),n.ic(5,"translate"),n.ic(6,"translate"),n.Vb(),n.Tb()),2&t){const t=n.hc(2).$implicit,e=n.hc(4);n.Db(1),n.oc("ngIf",t.SQLMode&&e.adminMode),n.Db(1),n.oc("floatLabel",e.appService.getViewMode()?"":"never"),n.Db(1),n.oc("ngIf",e.appService.getViewMode()),n.Db(1),n.oc("id",t.identifier)("formControl",e.arrFormControl[t.identifier])("placeholder",e.adminMode?n.jc(6,8,"lang.defaultValue"):n.jc(5,6,"lang.typeValue"))}}function oT(t,e){1&t&&(n.Wb(0,"button",38),n.ic(1,"translate"),n.Rb(2,"mat-icon",39),n.Vb()),2&t&&n.oc("title",n.jc(1,1,"lang.bddModeCustomFieldMsg"))}function rT(t,e){if(1&t&&(n.Wb(0,"mat-label"),n.Qc(1),n.Vb()),2&t){const t=n.hc(3).$implicit;n.Db(1),n.Rc(t.label)}}function cT(t,e){if(1&t&&(n.Ub(0),n.Oc(1,oT,3,3,"button",35),n.Wb(2,"mat-form-field",36),n.Oc(3,rT,2,1,"mat-label",1),n.Rb(4,"input",40),n.ic(5,"translate"),n.ic(6,"translate"),n.Vb(),n.Tb()),2&t){const t=n.hc(2).$implicit,e=n.hc(4);n.Db(1),n.oc("ngIf",t.SQLMode&&e.adminMode),n.Db(1),n.oc("floatLabel",e.appService.getViewMode()?"":"never"),n.Db(1),n.oc("ngIf",e.appService.getViewMode()),n.Db(1),n.oc("id",t.identifier)("formControl",e.arrFormControl[t.identifier])("placeholder",e.adminMode?n.jc(6,8,"lang.defaultValue"):n.jc(5,6,"lang.typeValue"))}}function lT(t,e){1&t&&(n.Wb(0,"button",38),n.ic(1,"translate"),n.Rb(2,"mat-icon",39),n.Vb()),2&t&&n.oc("title",n.jc(1,1,"lang.bddModeCustomFieldMsg"))}function dT(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Oc(1,lT,3,3,"button",35),n.Wb(2,"plugin-select-search",41),n.dc("afterSelected",(function(e){n.Dc(t);const i=n.hc(2).$implicit;return n.hc(4).launchEvent(e,i)})),n.ic(3,"translate"),n.ic(4,"translate"),n.Vb(),n.Tb()}if(2&t){const t=n.hc(2).$implicit,e=n.hc(4);n.Db(1),n.oc("ngIf",t.SQLMode&&e.adminMode),n.Db(1),n.oc("id",t.identifier)("showResetOption",e.adminMode||!t.mandatory)("label",t.label)("placeholderLabel",e.adminMode?n.jc(4,9,"lang.defaultValue"):n.jc(3,7,"lang.chooseValue"))("formControlSelect",e.arrFormControl[t.identifier])("datas",t.values)}}function hT(t,e){1&t&&(n.Wb(0,"button",38),n.ic(1,"translate"),n.Rb(2,"mat-icon",39),n.Vb()),2&t&&n.oc("title",n.jc(1,1,"lang.bddModeCustomFieldMsg"))}function uT(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",49),n.dc("click",(function(e){n.Dc(t);const i=n.hc(3).$implicit,a=n.hc(4);return e.stopPropagation(),a.toggleTodayDate(i)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",50),n.Vb()}if(2&t){const t=n.hc(3).$implicit;n.oc("matTooltip",n.jc(1,4,"lang.todayDate")),n.Db(2),n.Fb(t.today?"far fa-bell-slash":"far fa-bell")}}function pT(t,e){if(1&t&&(n.Wb(0,"mat-label"),n.Qc(1),n.Vb()),2&t){const t=n.hc(3).$implicit;n.Db(1),n.Rc(t.label)}}function bT(t,e){if(1&t&&n.Rb(0,"mat-datepicker-toggle",51),2&t){n.hc();const t=n.zc(10);n.oc("for",t)}}function fT(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",52),n.dc("click",(function(e){n.Dc(t);const i=n.hc(3).$implicit,a=n.hc(4);return e.stopPropagation(),a.arrFormControl[i.identifier].reset()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",53),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.eraseValue"))}function mT(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Oc(1,hT,3,3,"button",35),n.Oc(2,uT,3,6,"button",42),n.Wb(3,"mat-form-field",43),n.dc("click",(function(){return n.Dc(t),n.zc(10).open()})),n.Oc(4,pT,2,1,"mat-label",1),n.Wb(5,"input",44),n.dc("dateChange",(function(e){n.Dc(t);const i=n.hc(2).$implicit;return n.hc(4).launchEvent(e,i)})),n.ic(6,"translate"),n.ic(7,"translate"),n.Vb(),n.Oc(8,bT,1,1,"mat-datepicker-toggle",45),n.Rb(9,"mat-datepicker",46,47),n.Oc(11,fT,3,3,"button",48),n.Vb(),n.Tb()}if(2&t){const t=n.zc(10),e=n.hc(2).$implicit,i=n.hc(4);n.Db(1),n.oc("ngIf",e.SQLMode&&i.adminMode),n.Db(1),n.oc("ngIf",i.adminMode&&!e.SQLMode),n.Db(1),n.oc("floatLabel",i.appService.getViewMode()?"":"never"),n.Db(1),n.oc("ngIf",i.appService.getViewMode()),n.Db(1),n.oc("id",e.identifier)("formControl",i.arrFormControl[e.identifier])("matDatepicker",t)("placeholder",i.adminMode?n.jc(7,15,"lang.defaultValue"):n.jc(6,13,"lang.chooseDate"))("min",i.getMinDate(e.startDate))("max",i.getMaxDate(e.endDate)),n.Db(3),n.oc("ngIf",!i.arrFormControl[e.identifier].value),n.Db(1),n.oc("touchUi",i.appService.getViewMode()),n.Db(2),n.oc("ngIf",i.arrFormControl[e.identifier].value&&!i.arrFormControl[e.identifier].disabled)}}function gT(t,e){1&t&&(n.Wb(0,"button",38),n.ic(1,"translate"),n.Rb(2,"mat-icon",39),n.Vb()),2&t&&n.oc("title",n.jc(1,1,"lang.bddModeCustomFieldMsg"))}function vT(t,e){if(1&t&&(n.Wb(0,"mat-label"),n.Qc(1),n.Vb()),2&t){const t=n.hc(3).$implicit;n.Db(1),n.Rc(t.label)}}function _T(t,e){if(1&t&&(n.Wb(0,"mat-radio-button",58),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id)("disabled",t.disabled),n.Db(1),n.Sc(" ",t.label," ")}}function yT(t,e){if(1&t&&(n.Ub(0),n.Oc(1,gT,3,3,"button",35),n.Wb(2,"mat-form-field",54),n.Oc(3,vT,2,1,"mat-label",1),n.Rb(4,"input",55),n.Wb(5,"mat-radio-group",56),n.Oc(6,_T,2,3,"mat-radio-button",57),n.Vb(),n.Vb(),n.Tb()),2&t){const t=n.hc(2).$implicit,e=n.hc(4);n.Db(1),n.oc("ngIf",t.SQLMode&&e.adminMode),n.Db(1),n.oc("floatLabel",e.appService.getViewMode()?"":"never"),n.Db(1),n.oc("ngIf",e.appService.getViewMode()),n.Db(2),n.oc("formControl",e.arrFormControl[t.identifier]),n.Db(1),n.oc("ngForOf",t.values)}}function xT(t,e){1&t&&(n.Wb(0,"button",38),n.ic(1,"translate"),n.Rb(2,"mat-icon",39),n.Vb()),2&t&&n.oc("title",n.jc(1,1,"lang.bddModeCustomFieldMsg"))}function CT(t,e){if(1&t&&(n.Wb(0,"mat-list-option",65),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function OT(t,e){if(1&t&&(n.Wb(0,"mat-chip",66),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(3).$implicit,a=n.hc(4);n.Db(1),n.Sc(" ",a.getCheckboxListLabel(t.value,i.values)," ")}}function DT(t,e){if(1&t&&(n.Ub(0),n.Oc(1,xT,3,3,"button",35),n.Wb(2,"div",59),n.Wb(3,"mat-selection-list",60,61),n.Oc(5,CT,2,2,"mat-list-option",62),n.Vb(),n.Vb(),n.Wb(6,"mat-chip-list",63),n.Oc(7,OT,2,1,"mat-chip",64),n.Vb(),n.Tb()),2&t){const t=n.zc(4),e=n.hc(2).$implicit,i=n.hc(4);n.Db(1),n.oc("ngIf",e.SQLMode&&i.adminMode),n.Db(2),n.oc("formControl",i.arrFormControl[e.identifier]),n.Db(2),n.oc("ngForOf",e.values),n.Db(1),n.oc("disabled",e.system&&i.adminMode),n.Db(1),n.oc("ngForOf",t.selectedOptions.selected)}}function wT(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"app-contact-autocomplete",67),n.dc("retrieveDocumentEvent",(function(){return n.Dc(t),n.hc(6).retrieveDocumentEvent.emit()})),n.Vb(),n.Tb()}if(2&t){const t=n.hc(2).$implicit,e=n.hc(4);n.Db(1),n.oc("id",t.identifier)("control",e.arrFormControl[t.identifier])}}function MT(t,e){if(1&t&&(n.Ub(0),n.Rb(1,"app-folder-input",68),n.Tb()),2&t){const t=n.hc(2).$implicit,e=n.hc(4);n.Db(1),n.oc("control",e.arrFormControl[t.identifier])}}function kT(t,e){if(1&t&&(n.Ub(0),n.Rb(1,"app-tag-input",68),n.Tb()),2&t){const t=n.hc(2).$implicit,e=n.hc(4);n.Db(1),n.oc("control",e.arrFormControl[t.identifier])}}function ST(t,e){if(1&t&&(n.Ub(0),n.Rb(1,"app-address-ban-input",69),n.Tb()),2&t){const t=n.hc(2).$implicit,e=n.hc(4);n.Db(1),n.oc("control",e.arrFormControl[t.identifier])("admin",e.adminMode)}}function IT(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"app-contact-autocomplete",67),n.dc("retrieveDocumentEvent",(function(){return n.Dc(t),n.hc(6).retrieveDocumentEvent.emit()})),n.Vb(),n.Tb()}if(2&t){const t=n.hc(2).$implicit,e=n.hc(4);n.Db(1),n.oc("id",t.identifier)("control",e.arrFormControl[t.identifier])}}function PT(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"app-issuing-site-input",70,71),n.dc("afterSelected",(function(e){n.Dc(t);const i=n.hc(2).$implicit;return n.hc(4).launchEvent(e,i)})),n.Vb(),n.Tb()}if(2&t){const t=n.hc(2).$implicit,e=n.hc(4);n.Db(1),n.oc("registedMailType",e.arrFormControl.registeredMail_type.value)("control",e.arrFormControl[t.identifier])("showResetOption",e.adminMode||!t.mandatory)}}function VT(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-contact-autocomplete",74),n.dc("retrieveDocumentEvent",(function(){return n.Dc(t),n.hc(7).retrieveDocumentEvent.emit()})),n.Vb()}if(2&t){const t=n.hc(3).$implicit,e=n.hc(4);n.oc("exclusion","?noUsers=true&noEntities=true&noContactsGroups=true")("id",t.identifier)("singleMode",!0)("control",e.arrFormControl[t.identifier])}}function RT(t,e){if(1&t&&n.Rb(0,"app-registered-mail-recipient-input",75,76),2&t){const t=n.hc(3).$implicit,e=n.hc(4);n.oc("control",e.arrFormControl[t.identifier])("registeredMailType",e.arrFormControl.registeredMail_type.value)}}function jT(t,e){if(1&t&&(n.Ub(0),n.Oc(1,VT,1,4,"app-contact-autocomplete",72),n.Oc(2,RT,2,2,"app-registered-mail-recipient-input",73),n.Tb()),2&t){const t=n.hc(6);n.Db(1),n.oc("ngIf","indexation"===t.mode),n.Db(1),n.oc("ngIf","indexation"!==t.mode)}}function AT(t,e){if(1&t&&n.Rb(0,"i",77),2&t){const t=n.hc(2).$implicit;n.Ib("noMandatory",!t.mandatory)}}function WT(t,e){1&t&&n.Rb(0,"i",78)}function TT(t,e){1&t&&n.Rb(0,"i",79)}const ET=function(){return["senders","recipients"]};function FT(t,e){if(1&t&&(n.Wb(0,"div",18),n.Oc(1,iT,12,11,"div",19),n.Wb(2,"div",20),n.Oc(3,sT,7,10,"ng-container",1),n.Oc(4,cT,7,10,"ng-container",1),n.Oc(5,dT,5,11,"ng-container",1),n.Oc(6,mT,12,17,"ng-container",1),n.Oc(7,yT,7,5,"ng-container",1),n.Oc(8,DT,8,5,"ng-container",1),n.Oc(9,wT,2,2,"ng-container",1),n.Oc(10,MT,2,1,"ng-container",1),n.Oc(11,kT,2,1,"ng-container",1),n.Oc(12,ST,2,2,"ng-container",1),n.Oc(13,IT,2,2,"ng-container",1),n.Oc(14,PT,3,3,"ng-container",1),n.Oc(15,jT,3,2,"ng-container",1),n.Vb(),n.Wb(16,"div",21),n.Oc(17,AT,1,2,"i",22),n.Oc(18,WT,1,0,"i",23),n.Oc(19,TT,1,0,"i",24),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc(4);n.oc("cdkDragData",t),n.Db(1),n.oc("ngIf",!e.adminMode&&!e.appService.getViewMode()||e.adminMode),n.Db(1),n.Ib("textareaInput","string"===t.type)("checkboxInput","checkbox"===t.type),n.Db(1),n.oc("ngIf","string"===t.type),n.Db(1),n.oc("ngIf","integer"===t.type),n.Db(1),n.oc("ngIf","select"===t.type),n.Db(1),n.oc("ngIf","date"===t.type),n.Db(1),n.oc("ngIf","radio"===t.type),n.Db(1),n.oc("ngIf","checkbox"===t.type),n.Db(1),n.oc("ngIf",n.uc(22,ET).indexOf(t.identifier)>-1),n.Db(1),n.oc("ngIf","folders"===t.identifier),n.Db(1),n.oc("ngIf","tags"===t.identifier),n.Db(1),n.oc("ngIf","banAutocomplete"===t.type),n.Db(1),n.oc("ngIf","contact"===t.type),n.Db(1),n.oc("ngIf","registeredMail_issuingSite"===t.identifier),n.Db(1),n.oc("ngIf","registeredMail_recipient"===t.identifier),n.Db(2),n.oc("ngIf",e.adminMode||e.arrFormControl[t.identifier].hasError("required")&&e.arrFormControl[t.identifier].untouched),n.Db(1),n.oc("ngIf",!e.adminMode&&e.arrFormControl[t.identifier].touched&&e.arrFormControl[t.identifier].hasError("required")),n.Db(1),n.oc("ngIf",!e.adminMode&&e.arrFormControl[t.identifier].valid&&!e.isEmptyField(t))}}function LT(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",86),n.dc("click",(function(){return n.Dc(t),n.hc(),n.zc(12).switchMode()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",87),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.modifyDiffusionList"))}function QT(t,e){if(1&t&&n.Rb(0,"i",77),2&t){const t=n.hc(2).$implicit;n.Ib("noMandatory",!t.mandatory)}}function NT(t,e){1&t&&n.Rb(0,"i",78)}function zT(t,e){1&t&&n.Rb(0,"i",79)}function BT(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div"),n.Rb(1,"mat-divider"),n.Wb(2,"div",80),n.Wb(3,"div",81),n.Qc(4),n.ic(5,"translate"),n.Oc(6,LT,3,3,"button",82),n.Vb(),n.Wb(7,"div",83),n.Oc(8,QT,1,2,"i",22),n.Oc(9,NT,1,0,"i",23),n.Oc(10,zT,1,0,"i",24),n.Vb(),n.Vb(),n.Wb(11,"app-diffusions-list",84,85),n.dc("triggerEvent",(function(e){n.Dc(t);const i=n.hc().$implicit;return n.hc(4).changeDestination(e,i.allowedEntities)})),n.Vb(),n.Rb(13,"mat-divider"),n.Vb()}if(2&t){const t=n.zc(12),e=n.hc().$implicit,i=n.hc(4);n.Db(4),n.Sc(" ",n.jc(5,13,"lang.diffusionList")," "),n.Db(2),n.oc("ngIf",t.canUpdateRoles()&&i.canEdit&&"process"!==i.mode&&e.enabled),n.Db(2),n.oc("ngIf",i.adminMode||i.arrFormControl.diffusionList.hasError("required")&&i.arrFormControl.diffusionList.untouched),n.Db(1),n.oc("ngIf",!i.adminMode&&i.arrFormControl.diffusionList.touched&&"INVALID"===i.arrFormControl.diffusionList.status),n.Db(1),n.oc("ngIf",!i.adminMode&&i.arrFormControl.diffusionList.valid&&!i.isEmptyField(e)),n.Db(1),n.oc("resId",i.resId)("entityId",i.arrFormControl[e.identifier].value)("diffFormControl",i.arrFormControl.diffusionList)("allowedEntities",e.allowedEntities)("category",i.currentCategory)("target","indexation")("selfDest",i.selfDest)("customDiffusion",i.customDiffusion)}}function UT(t,e){if(1&t&&(n.Ub(0),n.Oc(1,FT,20,23,"div",17),n.Oc(2,BT,14,15,"div",1),n.Tb()),2&t){const t=e.$implicit,i=n.hc(2).$implicit,a=n.hc(2);n.Db(1),n.oc("ngIf",t.unit===i),n.Db(1),n.oc("ngIf","destination"===t.identifier&&!a.adminMode&&a.arrFormControl.destination.value>0&&!a.hideDiffusionList)}}const $T=function(){return["indexingModelsCustomFieldsList_mail","indexingModelsCustomFieldsList_contact","indexingModelsCustomFieldsList_process","indexingModelsCustomFieldsList_classifying","customFieldsList","fieldsList"]};function HT(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",10),n.Wb(1,"div",11),n.Qc(2),n.ic(3,"uppercase"),n.ic(4,"translate"),n.Oc(5,$W,5,8,"small",12),n.Rb(6,"div",13),n.Vb(),n.Wb(7,"div",14),n.Wb(8,"div",15),n.dc("cdkDropListDropped",(function(e){return n.Dc(t),n.hc(3).drop(e)})),n.Oc(9,UT,3,2,"ng-container",5),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc(2);n.Lc("border-color",e.currentPriorityColor),n.Db(1),n.Lc("color",e.currentPriorityColor),n.Db(1),n.Sc(" ",n.jc(3,11,n.jc(4,13,"lang."+t))," "),n.Db(3),n.oc("ngIf","mail"===t),n.Db(3),n.qc("id","indexingModelsCustomFieldsList_",t,""),n.oc("cdkDropListConnectedTo",n.uc(15,$T))("cdkDropListData",e["indexingModels_"+t])("cdkDropListDisabled",!e.adminMode),n.Db(1),n.oc("ngForOf",e["indexingModels_"+t])}}function GT(t,e){if(1&t&&(n.Ub(0),n.Oc(1,HT,10,16,"div",9),n.Tb()),2&t){const t=e.$implicit,i=n.hc(2);n.Db(1),n.oc("ngIf",i["indexingModels_"+t].length>0||i.adminMode)}}function XT(t,e){if(1&t&&(n.Ub(0),n.Oc(1,UW,8,13,"div",4),n.Oc(2,GT,2,1,"ng-container",5),n.Tb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",!t.adminMode&&"indexation"==t.mode),n.Db(1),n.oc("ngForOf",t.fieldCategories)}}let qT=(()=>{class t{constructor(t,e,i,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.dialog=a,this.headerService=s,this.appService=o,this.functions=r,this.loading=!0,this.resId=null,this.canEdit=!0,this.mode="indexation",this.hideDiffusionList=!1,this.retrieveDocumentEvent=new n.o,this.loadingFormEndEvent=new n.o,this.afterSaveEvent=new n.o,this.fieldCategories=["mail","contact","process","classifying"],this.indexingModelsCore=[{identifier:"doctype",label:this.translate.instant("lang.doctype"),unit:"mail",type:"select",system:!0,mandatory:!0,enabled:!0,default_value:"",values:[]},{identifier:"subject",label:this.translate.instant("lang.subject"),unit:"mail",type:"string",system:!0,mandatory:!0,enabled:!0,default_value:"",values:[]}],this.indexingModels_mail=[],this.indexingModels_contact=[],this.indexingModels_process=[],this.indexingModels_classement=[],this.indexingModels_mailClone=[],this.indexingModels_contactClone=[],this.indexingModels_processClone=[],this.indexingModels_classementClone=[],this.indexingModelsCustomFields=[],this.availableFields=[{identifier:"recipients",label:this.translate.instant("lang.getRecipients"),type:"autocomplete",default_value:[],values:[],enabled:!0},{identifier:"priority",label:this.translate.instant("lang.priority"),type:"select",default_value:null,values:[],enabled:!0},{identifier:"confidentiality",label:this.translate.instant("lang.confidential"),type:"radio",default_value:null,values:[{id:!0,label:this.translate.instant("lang.yes")},{id:!1,label:this.translate.instant("lang.no")}],enabled:!0},{identifier:"initiator",label:this.translate.instant("lang.initiatorEntityAlt"),type:"select",default_value:null,values:[],enabled:!0},{identifier:"departureDate",label:this.translate.instant("lang.departureDate"),type:"date",default_value:null,values:[],enabled:!0},{identifier:"processLimitDate",label:this.translate.instant("lang.processLimitDate"),type:"date",default_value:null,values:[],enabled:!0},{identifier:"tags",label:this.translate.instant("lang.tags"),type:"autocomplete",default_value:[],values:["/rest/autocomplete/tags","/rest/tags"],enabled:!0},{identifier:"senders",label:this.translate.instant("lang.getSenders"),type:"autocomplete",default_value:[],values:["/rest/autocomplete/correspondents"],enabled:!0},{identifier:"destination",label:this.translate.instant("lang.destination"),type:"select",default_value:null,values:[],enabled:!0},{identifier:"folders",label:this.translate.instant("lang.folders"),type:"autocomplete",default_value:[],values:["/rest/autocomplete/folders","/rest/folders"],enabled:!0},{identifier:"documentDate",label:this.translate.instant("lang.docDate"),unit:"mail",type:"date",default_value:null,values:[],enabled:!0},{identifier:"arrivalDate",label:this.translate.instant("lang.arrivalDate"),unit:"mail",type:"date",default_value:null,values:[],enabled:!0},{identifier:"registeredMail_type",label:this.translate.instant("lang.registeredMailType"),type:"select",default_value:null,values:[{id:"2D",label:this.translate.instant("lang.registeredMail_2D")},{id:"2C",label:this.translate.instant("lang.registeredMail_2C")},{id:"RW",label:this.translate.instant("lang.registeredMail_RW")}],enabled:!0},{identifier:"registeredMail_issuingSite",label:this.translate.instant("lang.issuingSite"),type:"issuingSite",default_value:null,values:[],enabled:!0},{identifier:"registeredMail_number",label:this.translate.instant("lang.registeredMailNumber"),type:"string",default_value:null,values:[],enabled:!1},{identifier:"registeredMail_warranty",label:this.translate.instant("lang.warrantyLevel"),type:"radio",default_value:null,values:[{id:"R1",label:"R1"},{id:"R2",label:"R2"},{id:"R3",label:"R3"}],enabled:!0},{identifier:"registeredMail_letter",label:this.translate.instant("lang.letter"),type:"radio",default_value:null,values:[{id:!0,label:this.translate.instant("lang.yes")},{id:!1,label:this.translate.instant("lang.no")}],enabled:!0},{identifier:"registeredMail_recipient",label:this.translate.instant("lang.registeredMailRecipient"),type:"autocomplete",default_value:null,values:["/rest/autocomplete/correspondents"],enabled:!0},{identifier:"registeredMail_reference",label:this.translate.instant("lang.registeredMailReference"),type:"string",default_value:null,values:[],enabled:!0}],this.availableFieldsClone=[],this.availableCustomFields=[],this.availableCustomFieldsClone=null,this.arrFormControl={},this.currentCategory="",this.currentPriorityColor="",this.currentResourceValues=null,this.selfDest=!1,this.customDiffusion=[]}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.adminMode=void 0!==this.adminMode,this.availableFieldsClone=JSON.parse(JSON.stringify(this.availableFields)),this.fieldCategories.forEach(t=>{this["indexingModels_"+t]=[]}),this.indexingFormId<=0||void 0===this.indexingFormId?(yield this.initFields(),yield this.initCustomFields(),this.initElemForm()):this.loadForm(this.indexingFormId)}))}initFields(){return new Promise((t,e)=>{this.fieldCategories.forEach(t=>{this["indexingModels_"+t]=this.indexingModelsCore.filter((e,i,n)=>e.unit===t),this["indexingModels_"+t].forEach(t=>{this.initValidator(t)})}),t(!0)})}initCustomFields(){return new Promise((t,e)=>{this.http.get("../rest/customFields").pipe(Object(mt.a)(e=>{const i=e.customFields.filter(t=>"form"===t.mode);this.availableCustomFields=i.map(t=>(t.identifier="indexingCustomField_"+t.id,t.system=!1,t.enabled=!0,t.SQLMode=t.SQLMode,t.default_value=["integer","string","date"].indexOf(t.type)>-1&&!this.functions.empty(t.values)?t.values[0].key:["contact","banAutocomplete"].indexOf(t.type)>-1?[]:null,t.values=t.values.length>0?t.values.map(t=>({id:t.key,label:t.label})):t.values,t)),this.availableCustomFieldsClone=JSON.parse(JSON.stringify(this.availableCustomFields)),t(!0)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()})}drop(t){t.item.data.unit=t.container.id.split("_")[1],t.previousContainer===t.container?Object(lo.h)(t.container.data,t.previousIndex,t.currentIndex):(null!==t.item.data.identifier.match(/registeredMail_[.]*/g)&&"fieldsList"===t.previousContainer.id?this.transferRegisteredMailInput(t):this.transferInput(t),["destination","priority"].indexOf(t.item.data.identifier)>-1&&this.initElemForm())}transferInput(t){this.initValidator(t.item.data),Object(lo.i)(t.previousContainer.data,t.container.data,t.previousIndex,t.currentIndex)}onSubmit(){let t=[];this.fieldCategories.forEach(e=>{t=t.concat(this["indexingModels_"+e])})}removeItem(t,e,i){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.indexingModelModification"),msg:this.translate.instant("lang.updateIndexingFieldWarning")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{e.mandatory=!1,e.enabled=!0,e.identifier.indexOf("indexingCustomField")>-1?(this.availableCustomFields.push(e),this[t].splice(i,1)):(this.availableFields.push(e),this[t].splice(i,1))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}getDatas(t=!0){let e=[];return this.fieldCategories.forEach(t=>{e=e.concat(this["indexingModels_"+t])}),e.forEach(i=>{i.default_value="date"!==i.type||this.functions.empty(this.arrFormControl[i.identifier].value)?""===this.arrFormControl[i.identifier].value?null:this.arrFormControl[i.identifier].value:!0===i.today?this.adminMode?"_TODAY":this.functions.formatDateObjectToDateString(this.arrFormControl[i.identifier].value,!1):this.functions.formatDateObjectToDateString(this.arrFormControl[i.identifier].value,"processLimitDate"===i.identifier),"destination"===i.identifier&&!this.adminMode&&t&&e.push({identifier:"diffusionList",default_value:this.arrFormControl.diffusionList.value})}),this.adminMode||(e.push({identifier:"modelId",default_value:this.indexingFormId}),"indexation"===this.mode&&e.push({identifier:"followed",default_value:this.arrFormControl["mail\xadtracking"].value})),e}saveData(){return new Promise((t,e)=>{if(this.isValidForm()){const e=this.formatDatas(this.getDatas());return this.http.put("../rest/resources/"+this.resId,e).pipe(Object(mt.a)(()=>{"registeredMail"===this.currentCategory&&this.http.put("../rest/registeredMails/"+this.resId,{type:e.registeredMail_type,warranty:e.registeredMail_warranty,issuingSiteId:e.registeredMail_issuingSite,letter:e.registeredMail_letter,recipient:e.registeredMail_recipient,reference:e.registeredMail_reference}).pipe(Object(mt.a)(()=>{this.loadForm(this.indexingFormId),this.afterSaveEvent.emit()}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}),Object(mt.a)(()=>{this.currentResourceValues=JSON.parse(JSON.stringify(this.getDatas(!1))),this.notify.success(this.translate.instant("lang.dataUpdated")),t(!0)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe(),!0}return this.notify.error(this.translate.instant("lang.mustFixErrors")),!1})}formatDatas(t){let e={};const i=/indexingCustomField_[.]*/g;return e.customFields={},t.forEach(t=>{null!==t.identifier.match(i)?e.customFields[t.identifier.split("_")[1]]=t.default_value:e[t.identifier]=t.default_value}),e}getCategory(){return this.currentCategory}getAvailableFields(){return this.availableFields}getAvailableCustomFields(){return this.availableCustomFields}isModified(){let t=!1,e="",i="";return this.fieldCategories.forEach(n=>{e=JSON.stringify(this["indexingModels_"+n]),i=JSON.stringify(this["indexingModels_"+n+"Clone"]),e!==i&&(t=!0)}),t}isResourceModified(){return!this.loading&&JSON.stringify(this.currentResourceValues)!==JSON.stringify(this.getDatas(!1))}setModification(){this.fieldCategories.forEach(t=>{this["indexingModels_"+t+"Clone"]=JSON.parse(JSON.stringify(this["indexingModels_"+t]))})}cancelModification(){this.fieldCategories.forEach(t=>{this["indexingModels_"+t]=JSON.parse(JSON.stringify(this["indexingModels_"+t+"Clone"]))})}setDocumentDateField(t){t.startDate="",t.endDate="_TODAY",this.fieldCategories.forEach(e=>{this["indexingModels_"+e].filter(t=>"arrivalDate"===t.identifier).length>0?t.endDate="arrivalDate":this["indexingModels_"+e].filter(t=>"departureDate"===t.identifier).length>0&&(t.endDate="departureDate")})}setDestinationField(t){let e=this.adminMode||"indexation"!==this.mode?"../rest/indexingModels/entities":`../rest/indexing/groups/${this.groupId}/entities`;return new Promise((i,n)=>{this.http.get(e).pipe(Object(mt.a)(e=>{var n;if(this.adminMode){let i="";t.values=[{id:"#myPrimaryEntity",title:this.translate.instant("lang.myPrimaryEntity"),label:'<i class="fa fa-hashtag"></i> '+this.translate.instant("lang.myPrimaryEntity"),disabled:!1}],t.values=t.values.concat(e.entities.map(t=>{i=t.entity_label;for(let e=0;e<t.level;e++)t.entity_label=" "+t.entity_label;return{id:t.id,title:i,label:t.entity_label,disabled:!1}}))}else{let i="";if("#myPrimaryEntity"===t.default_value)this.selfDest="outgoing"===this.currentCategory,t.default_value=null===(n=this.headerService.user.entities[0])||void 0===n?void 0:n.id,this.arrFormControl[t.identifier].setValue(t.default_value);else{this.selfDest=!1;const i=e.entities.filter(e=>!0===e.enabled&&e.id===t.default_value);t.default_value=i.length>0?i[0].id:null,this.arrFormControl[t.identifier].setValue(i.length>0?i[0].id:"")}t.values=e.entities.map(t=>{i=t.entity_label;for(let e=0;e<t.level;e++)t.entity_label=" "+t.entity_label;return{id:t.id,title:i,label:t.entity_label,disabled:!t.enabled}}),t.event="loadDiffusionList",t.allowedEntities=t.values.filter(t=>!1===t.disabled).map(t=>t.id)}i(!0)})).subscribe()})}setInitiatorField(t){t.values=this.headerService.user.entities.map(t=>({id:t.id,label:t.entity_label}))}setCategoryField(t){return new Promise((e,i)=>{this.http.get("../rest/categories").pipe(Object(mt.a)(i=>{t.values=i.categories,e(!0)})).subscribe()})}setPriorityField(t){return new Promise((e,i)=>{this.http.get("../rest/priorities").pipe(Object(mt.a)(i=>{t.values=i.priorities,t.event="calcLimitDateByPriority",null!==t.default_value&&this.calcLimitDateByPriority(t,t.default_value),e(!0)})).subscribe()})}setDoctypeField(t){return new Promise((e,i)=>{this.http.get("../rest/doctypes").pipe(Object(mt.a)(i=>{let n=[];i.structure.forEach(t=>{void 0===t.doctypes_second_level_id&&(n.push({id:t.doctypes_first_level_id,label:t.doctypes_first_level_label,title:t.doctypes_first_level_label,disabled:!0,isTitle:!0,color:t.css_style}),i.structure.filter(e=>e.doctypes_first_level_id===t.doctypes_first_level_id&&void 0!==e.doctypes_second_level_id&&void 0===e.description).forEach(t=>{n.push({id:t.doctypes_second_level_id,label:" "+t.doctypes_second_level_label,title:t.doctypes_second_level_label,disabled:!0,isTitle:!0,color:t.css_style}),n=n.concat(i.structure.filter(e=>e.doctypes_second_level_id===t.doctypes_second_level_id&&void 0!==e.description).map(t=>({id:t.type_id,label:" "+t.description,title:t.description,disabled:!1,isTitle:!1})))}))}),t.values=n,t.event="calcLimitDate",this.functions.empty(t.default_value)||this.adminMode||this.calcLimitDate(t,t.default_value),e(!0)})).subscribe()})}initElemForm(t=!0){return Object(r.a)(this,void 0,void 0,(function*(){this.loading=!0,this.adminMode||this.arrFormControl["mail\xadtracking"].setValue(!1),this.currentPriorityColor="",yield Promise.all(this.fieldCategories.map(t=>Object(r.a)(this,void 0,void 0,(function*(){yield Promise.all(this["indexingModels_"+t].map(t=>Object(r.a)(this,void 0,void 0,(function*(){"documentDate"===t.identifier?this.setDocumentDateField(t):"destination"===t.identifier?yield this.setDestinationField(t):"arrivalDate"===t.identifier?(t.startDate="documentDate",t.endDate="_TODAY"):"initiator"!==t.identifier||this.adminMode?"processLimitDate"===t.identifier?(t.startDate="_TODAY",t.endDate="",t.event="setPriorityColorByLimitDate"):"departureDate"===t.identifier?(t.startDate="documentDate",t.endDate=""):"folders"===t.identifier?t.values=null:"category_id"===t.identifier?yield this.setCategoryField(t):"priority"===t.identifier?yield this.setPriorityField(t):"doctype"===t.identifier?yield this.setDoctypeField(t):"registeredMail_type"===t.identifier&&(t.event="getIssuingSites"):this.setInitiatorField(t)}))))})))),null!==this.resId&&(yield this.setResource(t)),this.loading=!1}))}setResource(t=!0){return new Promise((e,i)=>{this.http.get("../rest/resources/"+this.resId).pipe(Object(mt.a)(i=>Object(r.a)(this,void 0,void 0,(function*(){yield Promise.all(this.fieldCategories.map(e=>Object(r.a)(this,void 0,void 0,(function*(){yield Promise.all(this["indexingModels_"+e].map(e=>Object(r.a)(this,void 0,void 0,(function*(){const n=Object.keys(i.customFields).filter(t=>t===e.identifier.split("indexingCustomField_")[1])[0];if(Object.keys(i).indexOf(e.identifier)>-1||void 0!==n){let t="";t=void 0!==n?i.customFields[n]:i[e.identifier],"registeredMail_type"===e.identifier&&this.getIssuingSites(null,t),"priority"===e.identifier?this.setPriorityColor(null,t):"processLimitDate"!==e.identifier||this.functions.empty(t)?"destination"===e.identifier?("process"===this.mode&&this.arrFormControl[e.identifier].disable(),this.arrFormControl.diffusionList.disable()):"initiator"!==e.identifier||0!==e.values.filter(e=>e.id===t).length||this.functions.empty(t)||(yield this.getCurrentInitiator(e,t)):e.startDate="","date"!==e.type||this.functions.empty(t)||(t=new Date(t)),this.functions.empty(t)||this.arrFormControl[e.identifier].setValue(t)}else t||"destination"!==e.identifier||(this.arrFormControl[e.identifier].disable(),this.arrFormControl[e.identifier].setValidators([]),this.arrFormControl.diffusionList.disable());this.canEdit||this.arrFormControl[e.identifier].disable()}))))})))),this.arrFormControl["mail\xadtracking"].setValue(i.followed),t&&(this.currentResourceValues=JSON.parse(JSON.stringify(this.getDatas(!1)))),e(!0)}))),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()})}getCurrentInitiator(t,e){return new Promise((i,n)=>{this.http.get("../rest/entities/"+e).pipe(Object(mt.a)(e=>{t.values.unshift({id:e.id,label:e.entity_label}),i(!0)})).subscribe()})}createForm(){this.indexingFormGroup=new X.l(this.arrFormControl),this.loadingFormEndEvent.emit()}resetForm(){return Object(r.a)(this,void 0,void 0,(function*(){Object.keys(this.arrFormControl).forEach(t=>{delete this.arrFormControl[t]}),this.availableFields=JSON.parse(JSON.stringify(this.availableFieldsClone)),this.fieldCategories.forEach(t=>{this["indexingModels_"+t]=[]}),null===this.availableCustomFieldsClone?yield this.initCustomFields():this.availableCustomFields=JSON.parse(JSON.stringify(this.availableCustomFieldsClone))}))}loadForm(t,e=!0){return Object(r.a)(this,void 0,void 0,(function*(){this.loading=!0,this.customDiffusion=[],this.indexingFormId=t,yield this.resetForm(),this.adminMode||(this.arrFormControl["mail\xadtracking"]=new X.i({value:"",disabled:!!this.adminMode})),this.http.get("../rest/indexingModels/"+t).pipe(Object(mt.a)(t=>Object(r.a)(this,void 0,void 0,(function*(){let i;this.indexingFormId=null!==t.indexingModel.master?t.indexingModel.master:t.indexingModel.id,this.currentCategory=t.indexingModel.category,0===t.indexingModel.fields.length?(this.initFields(),this.notify.error(this.translate.instant("lang.noFieldInModelMsg"))):t.indexingModel.fields.forEach(t=>{i=!1,t.system=!1,t.values=[];let e=this.availableFields.map(t=>t.identifier).indexOf(t.identifier);e>-1&&(t.label=this.availableFields[e].label,t.default_value=this.functions.empty(t.default_value)?this.availableFields[e].default_value:t.default_value,t.values=this.availableFields[e].values,t.type=this.availableFields[e].type,this.availableFields.splice(e,1),i=!0),e=this.availableCustomFields.map(t=>t.identifier).indexOf(t.identifier),e>-1&&(t.label=this.availableCustomFields[e].label,t.default_value=this.functions.empty(t.default_value)?this.availableCustomFields[e].default_value:t.default_value,t.values=this.availableCustomFields[e].values,t.type=this.availableCustomFields[e].type,t.SQLMode=this.availableCustomFields[e].SQLMode,this.availableCustomFields.splice(e,1),i=!0),e=this.indexingModelsCore.map(t=>t.identifier).indexOf(t.identifier),e>-1&&(t.label=this.indexingModelsCore[e].label,t.default_value=this.functions.empty(t.default_value)?this.indexingModelsCore[e].default_value:t.default_value,t.values=this.indexingModelsCore[e].values,t.type=this.indexingModelsCore[e].type,i=!0,t.system=!0),"date"===t.type&&"_TODAY"===t.default_value&&(t.today=!0,t.default_value=new Date),"initiator"===t.identifier&&"indexation"===this.mode&&this.functions.empty(t.default_value)&&this.headerService.user.entities[0]&&(t.default_value=this.headerService.user.entities.filter(t=>"Y"===t.primary_entity)[0].id),"diffusionList"===t.identifier&&(this.customDiffusion=t.default_value),i?(this["indexingModels_"+t.unit].push(t),this.initValidator(t)):"diffusionList"!==t.identifier&&this.notify.error(this.translate.instant("lang.fieldNotExist")+": "+t.identifier)}),yield this.initElemForm(e),this.createForm()}))),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}))}enableField(t,e){if(e)this.isAlwaysDisabledField(t)||this.arrFormControl[t.identifier].enable(),t.enabled=!0;else{if(this.functions.empty(this.arrFormControl[t.identifier].value)&&t.mandatory)return alert(this.translate.instant("lang.canNotDisabledField")),!1;this.arrFormControl[t.identifier].disable(),t.enabled=!1}}isAlwaysDisabledField(t){return!(!this.adminMode||!(["integer","string","date"].indexOf(t.type)>-1&&!this.functions.empty(t.values)||t.today))}initValidator(t){let e=[];const i=!t.enabled||this.isAlwaysDisabledField(t);if(i||(t.enabled=!0),this.arrFormControl[t.identifier]=new X.i({value:t.default_value,disabled:i}),"integer"===t.type?e.push(this.regexValidator(new RegExp("[+-]?([0-9]*[.])?[0-9]+"),{floatNumber:""})):"date"!==t.type||this.functions.empty(t.default_value)||this.arrFormControl[t.identifier].setValue(new Date(t.default_value)),t.mandatory&&!this.adminMode&&e.push(X.I.required),this.arrFormControl[t.identifier].setValidators(e),"destination"===t.identifier){let e=[];t.mandatory?(e.push(X.I.required),e.push(this.requireDestValidator({isDest:""}))):e.push(this.requireDestValidatorOrEmpty({isDest:""})),this.arrFormControl.diffusionList=new X.i({value:null,disabled:!1}),this.arrFormControl.diffusionList.setValidators(e),this.arrFormControl.diffusionList.setValue([])}}requireDestValidator(t){return e=>e.value?e.value.filter(t=>"dest"===t.mode).length>0?null:t:null}requireDestValidatorOrEmpty(t){return e=>e.value?e.value.filter(t=>"dest"===t.mode).length>0||this.functions.empty(this.arrFormControl.destination.value)?null:t:null}regexValidator(t,e){return i=>i.value?t.test(i.value)?null:e:null}isValidForm(){return this.indexingFormGroup.valid||Object.keys(this.indexingFormGroup.controls).forEach(t=>{null!=this.indexingFormGroup.get(t).errors&&this.indexingFormGroup.controls[t].markAsTouched()}),this.indexingFormGroup.valid}isEmptyField(t){return null===this.arrFormControl[t.identifier].value||(Array.isArray(this.arrFormControl[t.identifier].value)?!(this.arrFormControl[t.identifier].value.length>0):""===String(this.arrFormControl[t.identifier].value))}getMinDate(t){return void 0!==this.arrFormControl[t]?this.arrFormControl[t].value:"_TODAY"===t?new Date:""}getMaxDate(t){return void 0!==this.arrFormControl[t]?this.arrFormControl[t].value:"_TODAY"===t?new Date:""}toggleTodayDate(t){t.today=!t.today,t.today?(this.arrFormControl[t.identifier].disable(),this.arrFormControl[t.identifier].setValue(new Date)):(this.arrFormControl[t.identifier].setValue(""),this.arrFormControl[t.identifier].enable())}toggleMailTracking(){this.arrFormControl["mail\xadtracking"].setValue(!this.arrFormControl["mail\xadtracking"].value)}changeCategory(t){this.currentCategory=t,this.changeRegisteredMailItems(t)}changeDestination(t,e){-1===t.indexOf(this.arrFormControl.destination.value)&&this.arrFormControl.destination.setValue(t[0])}launchEvent(t,e){void 0===e.event||null===t||this.adminMode||this[e.event](e,t)}calcLimitDate(t,e){let i=null;void 0!==this.arrFormControl.processLimitDate&&this.http.get("../rest/indexing/processLimitDate",{params:{doctype:e}}).pipe(Object(mt.a)(t=>{i=null!==t.processLimitDate?new Date(t.processLimitDate):"",this.arrFormControl.processLimitDate.setValue(i)}),Object(d.a)(t=>void 0!==this.arrFormControl.priority&&null!==t.processLimitDate),p(()=>this.http.get("../rest/indexing/priority",{params:{processLimitDate:i.toDateString()}})),Object(mt.a)(t=>{this.arrFormControl.priority.setValue(t.priority),this.setPriorityColor(null,t.priority)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}calcLimitDateByPriority(t,e){let i=null;void 0!==this.arrFormControl.processLimitDate?this.http.get("../rest/indexing/processLimitDate",{params:{priority:e}}).pipe(Object(mt.a)(n=>{i=null!==n.processLimitDate?new Date(n.processLimitDate):"",this.arrFormControl.processLimitDate.setValue(i),this.setPriorityColor(t,e)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe():this.setPriorityColor(t,e)}setPriorityColor(t,e){null!==t?this.currentPriorityColor=t.values.filter(t=>t.id===e).map(t=>t.color)[0]:this.fieldCategories.forEach(t=>{this["indexingModels_"+t].filter(t=>"priority"===t.identifier).length>0&&(this.currentPriorityColor=this["indexingModels_"+t].filter(t=>"priority"===t.identifier)[0].values.filter(t=>t.id===e).map(t=>t.color)[0])})}setPriorityColorByLimitDate(t,e){const i=new Date(e.value);this.http.get("../rest/indexing/priority",{params:{processLimitDate:i.toDateString()}}).pipe(Object(mt.a)(t=>{this.functions.empty(this.arrFormControl.priority)||this.arrFormControl.priority.setValue(t.priority),this.setPriorityColor(null,t.priority)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}loadDiffusionList(t,e){this.functions.empty(this.appDiffusionsList)||this.appDiffusionsList.loadListModel(e)}getCheckboxListLabel(t,e){return e.filter(e=>e.id===t)[0].label}getIssuingSites(t,e){this.fieldCategories.forEach(t=>{this["indexingModels_"+t].forEach(t=>{"registeredMail_warranty"===t.identifier&&(t.values[2].disabled="RW"===e)}),"RW"===e&&"R3"===this.arrFormControl.registeredMail_warranty.value&&this.arrFormControl.registeredMail_warranty.setValue("R1")}),this.functions.empty(this.appIssuingSiteInput)||(this.appIssuingSiteInput.registedMailType=e)}transferRegisteredMailInput(t){const e=/registeredMail_[.]*/g;if(this.transferInput(t),"registeredMail_type"!==t.item.data.identifier){const e=t.previousContainer.data.map((t,e)=>({index:e,identifier:t.identifier})).filter(t=>"registeredMail_type"===t.identifier)[0];this.initValidator(t.previousContainer.data[e.index]),t.previousContainer.data[e.index].unit=t.container.id.split("_")[1],t.container.data.splice(t.currentIndex,0,t.previousContainer.data[e.index]),t.previousContainer.data.splice(e.index,1)}t.previousContainer.data.forEach((i,n)=>{null!==i.identifier.match(e)&&(this.initValidator(i),i.unit=t.container.id.split("_")[1],t.container.data.splice(t.currentIndex,0,i),t.previousContainer.data.splice(n,1))}),this.initElemForm()}changeRegisteredMailItems(t){"registeredMail"!==t?this.fieldCategories.forEach(t=>{this.availableFields=this.availableFields.concat(this["indexingModels_"+t].filter(t=>t.identifier.indexOf("registeredMail_")>-1)),this["indexingModels_"+t]=this["indexingModels_"+t].filter(t=>-1===t.identifier.indexOf("registeredMail_"))}):(this.indexingModels_mail=this.indexingModels_mail.concat(this.availableFields.filter(t=>t.identifier.indexOf("registeredMail_")>-1||"departureDate"===t.identifier)),this.indexingModels_mail.forEach(t=>{(t.identifier.indexOf("registeredMail_")>-1||"departureDate"===t.identifier)&&(this.functions.empty(t.unit)&&(t.unit="mail"),"registeredMail_number"!==t.identifier&&(t.mandatory=!0),this.initValidator(t))}),this.availableFields=this.availableFields.filter(t=>-1===t.identifier.indexOf("registeredMail_")&&"departureDate"!==t.identifier))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-indexing-form"]],viewQuery:function(t,e){var i;1&t&&(n.Xc(QW,!0),n.Xc(NW,!0),n.Xc(zW,!0)),2&t&&(n.yc(i=n.ec())&&(e.appDiffusionsList=i.first),n.yc(i=n.ec())&&(e.appIssuingSiteInput=i.first),n.yc(i=n.ec())&&(e.appRegisteredMailRecipientInput=i.first))},inputs:{indexingFormId:"indexingFormId",resId:"resId",groupId:"groupId",adminMode:["admin","adminMode"],canEdit:"canEdit",mode:"mode",hideDiffusionList:"hideDiffusionList"},outputs:{retrieveDocumentEvent:"retrieveDocumentEvent",loadingFormEndEvent:"loadingFormEndEvent",afterSaveEvent:"afterSaveEvent"},features:[n.Cb([Wt.a])],decls:2,vars:2,consts:[["style","display:flex;height:100%;",4,"ngIf"],[4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],["style","display: flex;align-items: center;justify-content: flex-end;margin-top: 10px;margin-bottom: -20px;",4,"ngIf"],[4,"ngFor","ngForOf"],[2,"display","flex","align-items","center","justify-content","flex-end","margin-top","10px","margin-bottom","-20px"],["mat-button","",1,"categoryLabel",3,"title","click"],["color","primary",2,"font-size","20px"],["class","banner",3,"borderColor",4,"ngIf"],[1,"banner"],[1,"title"],[3,"title",4,"ngIf"],[1,"title-divider"],[1,"content"],["cdkDropList","",1,"indexingModelsCustomFieldsList",2,"min-height","50px",3,"id","cdkDropListConnectedTo","cdkDropListData","cdkDropListDisabled","cdkDropListDropped"],[3,"title"],["class","fieldRow","cdkDrag","","cdkDragLockAxis","y",3,"cdkDragData",4,"ngIf"],["cdkDrag","","cdkDragLockAxis","y",1,"fieldRow",3,"cdkDragData"],["class","fieldLabel",4,"ngIf"],[1,"fieldInput"],[1,"fieldState"],["class","fas fa-asterisk fieldRequired",3,"noMandatory",4,"ngIf"],["class","fas fa-exclamation-triangle fieldError",4,"ngIf"],["class","fas fa-check fieldFull",4,"ngIf"],[1,"fieldLabel"],["class","fas fa-bars fa-2x","color","primary","style","cursor: move","cdkDragHandle","",3,"title",4,"ngIf"],["mat-icon-button","",3,"matMenuTriggerFor",4,"ngIf"],["fieldActions","matMenu"],["mat-menu-item","",3,"click",4,"ngIf"],["color","primary","cdkDragHandle","",1,"fas","fa-bars","fa-2x",2,"cursor","move",3,"title"],["mat-icon-button","",3,"matMenuTriggerFor"],["color","secondary",1,"fa","fa-ellipsis-v"],["mat-menu-item","",3,"click"],["color","warn",1,"fa","fa-trash"],["mat-button","","color","primary","matPrefix","","mat-icon-button","","disabled","","style","position: absolute;left: -40px;",3,"title",4,"ngIf"],[1,"input-form",3,"floatLabel"],["matInput","","matTextareaAutosize","",1,"subject",3,"id","formControl","placeholder"],["mat-button","","color","primary","matPrefix","","mat-icon-button","","disabled","",2,"position","absolute","left","-40px",3,"title"],["color","primary",1,"fas","fa-database"],["type","number","matInput","","min","0","step","0.1",3,"id","formControl","placeholder"],[2,"width","100%",3,"id","showResetOption","label","placeholderLabel","formControlSelect","datas","afterSelected"],["mat-button","","color","primary","matPrefix","","mat-icon-button","","style","position: absolute;left: -40px;",3,"matTooltip","click",4,"ngIf"],[1,"input-form","input-date",2,"cursor","pointer",3,"floatLabel","click"],["matInput","","readonly","",2,"cursor","pointer",3,"id","formControl","matDatepicker","placeholder","min","max","dateChange"],["matSuffix","",3,"for",4,"ngIf"],[3,"touchUi"],["picker",""],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click",4,"ngIf"],["mat-button","","color","primary","matPrefix","","mat-icon-button","",2,"position","absolute","left","-40px",3,"matTooltip","click"],["color","primary"],["matSuffix","",3,"for"],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click"],["color","warn",1,"fa","fa-calendar-times"],[1,"input-form","input-radio",3,"floatLabel"],["matInput","",2,"display","none"],["color","primary",1,"radio-form",3,"formControl"],[3,"value","disabled",4,"ngFor","ngForOf"],[3,"value","disabled"],[1,"input-form","checkbox-form"],[1,"div-list",3,"formControl"],["shoes",""],["color","primary","checkboxPosition","before",3,"value",4,"ngFor","ngForOf"],[1,"checkbox-selected-list",3,"disabled"],["selected","",4,"ngFor","ngForOf"],["color","primary","checkboxPosition","before",3,"value"],["selected",""],[2,"width","100%",3,"id","control","retrieveDocumentEvent"],[2,"width","100%",3,"control"],[2,"width","100%",3,"control","admin"],[2,"width","100%",3,"registedMailType","control","showResetOption","afterSelected"],["appIssuingSiteInput",""],["style","width:100%;",3,"exclusion","id","singleMode","control","retrieveDocumentEvent",4,"ngIf"],["style","width:100%;",3,"control","registeredMailType",4,"ngIf"],[2,"width","100%",3,"exclusion","id","singleMode","control","retrieveDocumentEvent"],[2,"width","100%",3,"control","registeredMailType"],["appRegisteredMailRecipientInput",""],[1,"fas","fa-asterisk","fieldRequired"],[1,"fas","fa-exclamation-triangle","fieldError"],[1,"fas","fa-check","fieldFull"],[2,"padding","10px","font-size","16px","color","#135F7F","letter-spacing","2px","font-weight","bold","display","flex","align-items","center"],[2,"display","flex","flex","1","align-items","center"],["mat-icon-button","","color","primary",3,"title","click",4,"ngIf"],[1,"fieldState",2,"width","20px","padding","0px"],[3,"resId","entityId","diffFormControl","allowedEntities","category","target","selfDest","customDiffusion","triggerEvent"],["appDiffusionsList",""],["mat-icon-button","","color","primary",3,"title","click"],[1,"fa","fa-edit"]],template:function(t,e){1&t&&(n.Oc(0,BW,2,0,"div",0),n.Oc(1,XT,3,2,"ng-container",1)),2&t&&(n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[P.t,V.c,P.s,k.b,S.a,lo.e,lo.a,ne.e,lo.b,ne.d,ne.b,T.a,Y.c,J.b,J.d,X.d,X.u,X.j,Y.i,Y.g,X.A,fr,ae.h,ae.f,A.b,ae.j,Y.j,hc.b,hc.a,R.i,ze.d,R.f,ze.a,Zd,IO,$O,nD,wW,LW,im],pipes:[g.d,P.G,P.F],styles:[".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();const KT=["snav2"],YT=["adminMenuTemplate"],JT=["appDocumentViewer"],ZT=["indexingForm"],tE=["appDiffusionsList"],eE=["appVisaWorkflow"],iE=["appAvisWorkflow"],nE=["appNotesList"];function aE(t,e){1&t&&(n.Wb(0,"div",28),n.Rb(1,"i",29),n.Qc(2,"\xa0"),n.Rb(3,"span",30),n.ic(4,"translate"),n.Vb()),2&t&&(n.Db(3),n.oc("innerHTML",n.jc(4,1,"lang.retentionRuleFrozenAlt"),n.Ec))}function sE(t,e){if(1&t&&(n.Wb(0,"div",28),n.Rb(1,"i",31),n.Qc(2,"\xa0 "),n.Rb(3,"span",30),n.ic(4,"translate"),n.ic(5,"translate"),n.Qc(6," \xa0 "),n.Rb(7,"i",32),n.ic(8,"translate"),n.ic(9,"translate"),n.Vb()),2&t){const t=n.hc(3);n.Db(3),n.oc("innerHTML",t.resourceBinded?n.jc(4,2,"lang.bindingMailAlt"):n.jc(5,4,"lang.noBindingMailAlt"),n.Ec),n.Db(4),n.oc("title",t.resourceBinded?n.jc(8,6,"lang.bindingMailDesc"):n.jc(9,8,"lang.noBindingMailDesc"))}}function oE(t,e){if(1&t&&(n.Wb(0,"div",26),n.Oc(1,aE,5,3,"div",27),n.Oc(2,sE,10,10,"div",27),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("ngIf",t.resourceFreezed),n.Db(1),n.oc("ngIf",null!==t.resourceBinded)}}function rE(t,e){1&t&&n.Rb(0,"i",35)}function cE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",33),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc(2);return!!a.isToolEnabled(i.id)&&a.changeTab(i.id)})),n.Oc(1,rE,1,0,"i",34),n.Rb(2,"i"),n.Wb(3,"span"),n.Qc(4),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.Ib("processTool-module-active",t.id===i.currentTool)("tool-disabled",!i.isToolEnabled(t.id)),n.Db(1),n.oc("ngIf",t.count>0),n.Db(1),n.Fb(t.icon),n.Db(2),n.Rc(t.label)}}function lE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",38),n.dc("click",(function(){return n.Dc(t),n.hc(3).openTechnicalInfo()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",40),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.showTechnicalInfo"))}function dE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",36),n.Oc(1,lE,3,3,"button",37),n.Wb(2,"button",38),n.dc("click",(function(){return n.Dc(t),n.hc(2).createModal()})),n.ic(3,"translate"),n.Rb(4,"mat-icon",39),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.oc("ngIf",t.privilegeService.hasCurrentUserPrivilege("view_technical_infos")),n.Db(1),n.oc("title",n.jc(3,2,"lang.openInExternalModal"))}}function hE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-history-workflow-resume",48),n.dc("goTo",(function(){return n.Dc(t),n.hc(3).currentTool="history"})),n.Vb()}if(2&t){const t=n.hc(3);n.oc("resId",t.currentResourceInformations.resId)}}function uE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-note-resume",48),n.dc("goTo",(function(){return n.Dc(t),n.hc(3).currentTool="notes"})),n.Vb()}if(2&t){const t=n.hc(3);n.oc("resId",t.currentResourceInformations.resId)}}function pE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-attachments-resume",48),n.dc("goTo",(function(){return n.Dc(t),n.hc(3).currentTool="attachments"})),n.Vb()}if(2&t){const t=n.hc(3);n.oc("resId",t.currentResourceInformations.resId)}}function bE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-mail-resume",48),n.dc("goTo",(function(){return n.Dc(t),n.hc(3).currentTool="emails"})),n.Vb()}if(2&t){const t=n.hc(3);n.oc("resId",t.currentResourceInformations.resId)}}function fE(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"div",41),n.Wb(2,"button",42),n.dc("click",(function(){return n.Dc(t),n.hc(2).openPrintedFolderPrompt()})),n.ic(3,"translate"),n.Rb(4,"mat-icon",43),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Vb(),n.Wb(7,"div",44),n.Wb(8,"div",45),n.dc("click",(function(){return n.Dc(t),n.hc(2).currentTool="history"})),n.Qc(9),n.ic(10,"translate"),n.Rb(11,"div",46),n.Vb(),n.Wb(12,"div",12),n.Oc(13,hE,1,1,"app-history-workflow-resume",47),n.Vb(),n.Vb(),n.Wb(14,"div",44),n.Wb(15,"div",45),n.dc("click",(function(){return n.Dc(t),n.hc(2).currentTool="notes"})),n.Qc(16),n.ic(17,"translate"),n.Rb(18,"div",46),n.Vb(),n.Wb(19,"div",12),n.Oc(20,uE,1,1,"app-note-resume",47),n.Vb(),n.Vb(),n.Wb(21,"div",44),n.Wb(22,"div",45),n.dc("click",(function(){return n.Dc(t),n.hc(2).currentTool="attachments"})),n.Qc(23),n.ic(24,"translate"),n.Rb(25,"div",46),n.Vb(),n.Wb(26,"div",12),n.Oc(27,pE,1,1,"app-attachments-resume",47),n.Vb(),n.Vb(),n.Wb(28,"div",44),n.Wb(29,"div",45),n.dc("click",(function(){return n.Dc(t),n.hc(2).currentTool="emails"})),n.Qc(30),n.ic(31,"translate"),n.Rb(32,"div",46),n.Vb(),n.Wb(33,"div",12),n.Oc(34,bE,1,1,"app-mail-resume",47),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=n.hc(2);n.Db(2),n.oc("title",n.jc(3,10,"lang.generateAndDownloadPrintedFolder")),n.Db(3),n.Sc(" ",n.jc(6,12,"lang.printedFolder")," "),n.Db(4),n.Sc(" ",n.jc(10,14,"lang.history")," "),n.Db(4),n.oc("ngIf",!t.loading),n.Db(3),n.Sc(" ",n.jc(17,16,"lang.notesAlt")," "),n.Db(4),n.oc("ngIf",!t.loading),n.Db(3),n.Sc(" ",n.jc(24,18,"lang.attachments")," "),n.Db(4),n.oc("ngIf",!t.loading),n.Db(3),n.Sc(" ",n.jc(31,20,"lang.mailsSentAlt")," "),n.Db(4),n.oc("ngIf",!t.loading)}}function mE(t,e){if(1&t&&n.Rb(0,"app-history-list",61,62),2&t){const t=n.hc(3);n.oc("resId",t.currentResourceInformations.resId)}}function gE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-notes-list",63,64),n.dc("reloadBadgeNotes",(function(e){return n.Dc(t),n.hc(3).refreshBadge(e,"notes")})),n.Vb()}if(2&t){const t=n.hc(3);n.oc("editMode",!0)("resId",t.currentResourceInformations.resId)}}function vE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-linked-resource-list",65,66),n.dc("reloadBadgeLinkedResources",(function(e){return n.Dc(t),n.hc(3).refreshBadge(e,"linkedResources")})),n.Vb()}if(2&t){const t=n.hc(3);n.oc("resId",t.currentResourceInformations.resId)}}function _E(t,e){if(1&t&&n.Rb(0,"app-diffusions-list",67,68),2&t){const t=n.hc(3);n.oc("adminMode",!0)("target",t.detailMode?"details":"process")("resId",t.currentResourceInformations.resId)("expanded",!0)}}function yE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-sent-resource-list",69,70),n.dc("reloadBadgeSentResource",(function(e){return n.Dc(t),n.hc(3).refreshBadge(e,"emails")})),n.Vb()}if(2&t){const t=n.hc(3);n.oc("resId",t.currentResourceInformations.resId)("currentUserId",t.currentUserId)("currentGroupId",t.currentGroupId)("currentBasketId",t.currentBasketId)}}function xE(t,e){if(1&t&&n.Rb(0,"app-visa-workflow",71,72),2&t){const t=n.hc(3);n.oc("resId",t.currentResourceInformations.resId)("adminMode",t.privilegeService.hasCurrentUserPrivilege(t.detailMode?"config_visa_workflow_in_detail":"config_visa_workflow"))}}function CE(t,e){if(1&t&&n.Rb(0,"app-avis-workflow",71,73),2&t){const t=n.hc(3);n.oc("resId",t.currentResourceInformations.resId)("adminMode",t.privilegeService.hasCurrentUserPrivilege(t.detailMode?"config_avis_workflow_in_detail":"config_avis_workflow"))}}function OE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-attachments-list",74,75),n.dc("reloadBadgeAttachments",(function(e){return n.Dc(t),n.hc(3).refreshBadge(e,"attachments")})),n.Vb()}if(2&t){const t=n.hc(3);n.oc("resId",t.currentResourceInformations.resId)("autoOpenCreation",t.isMailing)("target","process")}}function DE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-select-indexing-model",76,77),n.dc("afterSelectedListModel",(function(e){return n.Dc(t),n.hc(3).indexingForm.loadForm(e.id,!1)})),n.Vb()}if(2&t){const t=n.hc(3);n.oc("defaultIndexingModelId",t.currentResourceInformations.modelId)("adminMode",t.canChangeModel)("indexingForm",t.indexingForm)}}function wE(t,e){1&t&&(n.Rb(0,"div",78),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.dispositListGeneratedMsg"),n.Ec)}function ME(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-indexing-form",79,80),n.dc("loadingFormEndEvent",(function(){return n.Dc(t),n.hc(3).triggerProcessAction()}))("retrieveDocumentEvent",(function(){return n.Dc(t),n.hc(3).appDocumentViewer.saveDocService()}))("afterSaveEvent",(function(){return n.Dc(t),n.hc(3).refreshData()})),n.Vb()}if(2&t){const t=n.hc(3);n.oc("groupId",t.currentGroupId)("resId",t.currentResourceInformations.resId)("indexingFormId",t.currentResourceInformations.modelId)("mode","process")("canEdit",t.canEditData)("hideDiffusionList",!0)}}function kE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",81),n.dc("click",(function(){return n.Dc(t),n.hc(3).saveTool()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",82),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.saveModifications"))}function SE(t,e){if(1&t&&(n.Ub(0),n.Oc(1,mE,2,1,"app-history-list",49),n.Oc(2,gE,2,2,"app-notes-list",50),n.Oc(3,vE,2,1,"app-linked-resource-list",51),n.Oc(4,_E,2,4,"app-diffusions-list",52),n.Oc(5,yE,2,4,"app-sent-resource-list",53),n.Oc(6,xE,2,2,"app-visa-workflow",54),n.Oc(7,CE,2,2,"app-avis-workflow",54),n.Oc(8,OE,2,3,"app-attachments-list",55),n.Oc(9,DE,2,3,"app-select-indexing-model",56),n.Oc(10,wE,2,3,"div",57),n.Oc(11,ME,2,6,"app-indexing-form",58),n.Wb(12,"div",59),n.Oc(13,kE,3,3,"button",60),n.Vb(),n.Tb()),2&t){const t=n.hc(2);n.Db(1),n.oc("ngIf","history"===t.currentTool&&!t.loading),n.Db(1),n.oc("ngIf","notes"===t.currentTool&&!t.loading),n.Db(1),n.oc("ngIf","linkedResources"===t.currentTool&&!t.loading),n.Db(1),n.oc("ngIf","diffusionList"===t.currentTool&&!t.loading),n.Db(1),n.oc("ngIf","emails"===t.currentTool&&!t.loading),n.Db(1),n.oc("ngIf","visaCircuit"===t.currentTool&&!t.loading),n.Db(1),n.oc("ngIf","opinionCircuit"===t.currentTool&&!t.loading),n.Db(1),n.oc("ngIf","attachments"===t.currentTool&&!t.loading),n.Db(1),n.oc("ngIf","info"===t.currentTool&&!t.loading),n.Db(1),n.oc("ngIf","info"===t.currentTool&&!t.loading&&!t.functions.empty(t.currentResourceInformations.registeredMail_deposit_id)),n.Db(1),n.oc("ngIf","info"===t.currentTool&&!t.loading),n.Db(2),n.oc("ngIf",t.isToolModified())}}function IE(t,e){1&t&&(n.Wb(0,"div",83),n.Rb(1,"i",39),n.Qc(2),n.ic(3,"translate"),n.Vb()),2&t&&(n.Db(2),n.Sc(" ",n.jc(3,1,"lang.openedInExternalModal")," "))}function PE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",98),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(4).selectAction(e)})),n.Wb(1,"span",99),n.Qc(2),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc(4);n.Ib("listModels-menu-selected",t.id===e.selectedAction.id),n.oc("title",t.label),n.Db(2),n.Rc(t.label)}}function VE(t,e){if(1&t&&(n.Ub(0),n.Oc(1,PE,3,4,"button",97),n.Tb()),2&t){const t=e.$implicit,i=n.hc(4);n.Db(1),n.oc("ngIf",i.showActionInCurrentCategory(t))}}function RE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",100),n.dc("click",(function(){return n.Dc(t),n.hc(4).onSubmit()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(4);n.oc("disabled",t.actionService.loading||0===t.selectedAction.id||void 0!==t.appDocumentViewer&&!t.appDocumentViewer.isEditorLoaded()),n.Db(1),n.Rc(n.jc(2,2,"lang.validate"))}}function jE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",101),n.dc("click",(function(){return n.Dc(t),n.hc(4).onSubmit()})),n.Rb(1,"mat-icon",102),n.Vb()}}function AE(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"button",86),n.Rb(2,"span",87),n.Rb(3,"i",88),n.Vb(),n.Wb(4,"mat-menu",null,89),n.Wb(6,"div",90),n.Wb(7,"span"),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Wb(10,"mat-form-field",91),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.Wb(11,"input",92,93),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("keydown",(function(e){return n.Dc(t),e.stopPropagation()})),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Oc(14,VE,2,1,"ng-container",94),n.ic(15,"filterList"),n.Vb(),n.Oc(16,RE,3,4,"button",95),n.Oc(17,jE,2,0,"button",96),n.Tb()}if(2&t){const t=n.zc(5),e=n.zc(12),i=n.hc(3);n.Db(1),n.oc("disabled",0===i.selectedAction.id)("matMenuTriggerFor",t)("title",i.selectedAction.label),n.Db(1),n.oc("innerHTML",i.selectedAction.label,n.Ec),n.Db(2),n.Fb("menuForm menuAction"),n.Db(4),n.Sc(" ",n.jc(9,11,"lang.actions")," "),n.Db(3),n.pc("placeholder",n.jc(13,13,"lang.filterBy")),n.Db(3),n.oc("ngForOf",n.lc(15,15,i.actionsList,e.value,"label")),n.Db(2),n.oc("ngIf",!i.appService.getViewMode()),n.Db(1),n.oc("ngIf",i.appService.getViewMode())}}function WE(t,e){1&t&&(n.Rb(0,"div",103),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.noAvailableActionProcess"),n.Ec)}function TE(t,e){if(1&t&&(n.Wb(0,"div",84),n.Oc(1,AE,18,19,"ng-container",23),n.Oc(2,WE,2,3,"div",85),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("ngIf",t.actionsList.length>0&&void 0!==t.selectedAction),n.Db(1),n.oc("ngIf",0===t.actionsList.length)}}function EE(t,e){if(1&t&&(n.Oc(0,oE,3,2,"div",17),n.Wb(1,"div",18),n.Wb(2,"div",19),n.Oc(3,cE,5,8,"div",20),n.Vb(),n.Vb(),n.Wb(4,"div",21),n.Oc(5,dE,5,4,"div",22),n.Oc(6,fE,35,22,"ng-container",23),n.Oc(7,SE,14,12,"ng-container",9),n.Oc(8,IE,4,3,"ng-template",null,24,n.Pc),n.Vb(),n.Oc(10,TE,3,2,"div",25)),2&t){const t=n.zc(9),e=n.hc();n.oc("ngIf",(e.resourceFreezed||null!==e.resourceBinded)&&!e.loading),n.Db(3),n.oc("ngForOf",e.processTool),n.Db(2),n.oc("ngIf",!e.isModalOpen()&&"dashboard"!==e.currentTool),n.Db(1),n.oc("ngIf","dashboard"===e.currentTool),n.Db(1),n.oc("ngIf",!e.isModalOpen()&&!e.loading)("ngIfElse",t),n.Db(3),n.oc("ngIf",!e.detailMode)}}function FE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",107),n.dc("click",(function(){return n.Dc(t),n.hc(2).toggleFreezing()})),n.ic(1,"translate"),n.ic(2,"translate"),n.Rb(3,"mat-icon",108),n.Vb()}if(2&t){const t=n.hc(2);n.oc("title",t.resourceFreezed?n.jc(1,4,"lang.unfreezeRetentionRule"):n.jc(2,6,"lang.freezeRetentionRule")),n.Db(3),n.Gb("",t.resourceFreezed?"freezeUnfreezIcon":"nonFreeze"," fas fa-snowflake")}}function LE(t,e){if(1&t&&(n.Wb(0,"button",121),n.ic(1,"translate"),n.Rb(2,"mat-icon",122),n.Vb()),2&t){n.hc();const t=n.zc(15);n.oc("matMenuTriggerFor",t)("title",n.jc(1,2,"lang.setBindingDocument"))}}function QE(t,e){if(1&t&&(n.Wb(0,"div",114),n.Wb(1,"b"),n.Rb(2,"i",123),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.Lc("color",t.currentResourceInformations.priorityColor),n.Db(1),n.Sc(" ",t.currentResourceInformations.priorityLabel,"")}}function NE(t,e){if(1&t&&n.Rb(0,"i",124),2&t){const t=n.hc(2);n.Lc("color",t.senderLightInfo.filling)}}function zE(t,e){if(1&t&&(n.Wb(0,"div",114),n.Wb(1,"div"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"div",115),n.ic(5,"fullDate"),n.Qc(6),n.ic(7,"date"),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.Sc("",n.jc(3,3,"lang.returnDate")," :"),n.Db(2),n.oc("title",n.jc(5,5,t.currentResourceInformations.registeredMail_returnDate)),n.Db(2),n.Sc(" ",n.kc(7,7,t.currentResourceInformations.registeredMail_returnDate,"dd/MM/y")," ")}}function BE(t,e){if(1&t&&(n.Wb(0,"div",114),n.Wb(1,"div"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"div",115),n.Qc(5),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.Sc("",n.jc(3,3,"lang.returnReason")," :"),n.Db(2),n.oc("title",t.currentResourceInformations.registeredMail_returnReason),n.Db(1),n.Sc(" ",t.currentResourceInformations.registeredMail_returnReason,"")}}function UE(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div",126),n.ic(2,"fullDate"),n.Qc(3),n.ic(4,"translate"),n.ic(5,"timeAgo"),n.Rb(6,"i",127),n.Vb(),n.Tb()),2&t){const t=n.hc(3);n.Db(1),n.oc("title",n.jc(2,3,t.currentResourceInformations.closingDate)),n.Db(2),n.Tc(" ",n.jc(4,5,"lang.closed")," ",n.kc(5,7,t.currentResourceInformations.closingDate,"full"),"\xa0\xa0")}}function $E(t,e){if(1&t&&(n.Wb(0,"div"),n.Qc(1),n.ic(2,"translate"),n.Vb(),n.Rb(3,"div",128),n.ic(4,"fullDate"),n.ic(5,"timeLimit")),2&t){const t=n.hc(3);n.Db(1),n.Sc("",n.jc(2,3,"lang.processLimitDate")," :"),n.Db(2),n.oc("title",n.jc(4,5,t.currentResourceInformations.processLimitDate))("innerHTML",n.kc(5,7,t.currentResourceInformations.processLimitDate,"badge"),n.Ec)}}function HE(t,e){if(1&t&&(n.Wb(0,"div",114),n.Oc(1,UE,7,10,"ng-container",9),n.Oc(2,$E,6,10,"ng-template",null,125,n.Pc),n.Vb()),2&t){const t=n.zc(3),e=n.hc(2);n.Db(1),n.oc("ngIf",null!==e.currentResourceInformations.closingDate)("ngIfElse",t)}}function GE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",129),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).toggleIntegration(i.key)})),n.ic(1,"translate"),n.Rb(2,"mat-icon"),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.pc("matTooltip",n.jc(1,7,"lang."+t.key)),n.Db(2),n.Fb(t.value.icon),n.Ib("checked",i.currentResourceInformations.integrations[t.key])("unchecked",!i.currentResourceInformations.integrations[t.key])}}function XE(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"div",104),n.Wb(2,"span",105),n.Qc(3),n.Wb(4,"small",106),n.Qc(5),n.Vb(),n.Vb(),n.Rb(6,"div",46),n.Vb(),n.Wb(7,"div",12),n.Wb(8,"button",107),n.dc("click",(function(){return n.Dc(t),n.hc().toggleFollow()})),n.ic(9,"translate"),n.ic(10,"translate"),n.Rb(11,"mat-icon",108),n.Vb(),n.Oc(12,FE,4,8,"button",109),n.Oc(13,LE,3,4,"button",110),n.Wb(14,"mat-menu",null,111),n.Wb(16,"buton",112),n.dc("click",(function(){return n.Dc(t),n.hc().toggleBinding(!0)})),n.ic(17,"stripTags"),n.ic(18,"translate"),n.ic(19,"translate"),n.Vb(),n.Rb(20,"mat-divider"),n.Wb(21,"buton",112),n.dc("click",(function(){return n.Dc(t),n.hc().toggleBinding(!1)})),n.ic(22,"stripTags"),n.ic(23,"translate"),n.ic(24,"translate"),n.Vb(),n.Rb(25,"mat-divider"),n.Wb(26,"buton",98),n.dc("click",(function(){return n.Dc(t),n.hc().toggleBinding(null)})),n.ic(27,"translate"),n.Qc(28),n.ic(29,"translate"),n.Vb(),n.Rb(30,"mat-divider"),n.Vb(),n.Oc(31,QE,4,3,"div",113),n.Wb(32,"div",114),n.Wb(33,"div"),n.Qc(34),n.ic(35,"translate"),n.Vb(),n.Wb(36,"div",115),n.Qc(37),n.Vb(),n.Vb(),n.Wb(38,"div",116),n.dc("click",(function(){return n.Dc(t),n.hc().openContact()})),n.Wb(39,"div"),n.Qc(40),n.ic(41,"translate"),n.ic(42,"translate"),n.Vb(),n.Wb(43,"div",117),n.Qc(44),n.Oc(45,NE,1,2,"i",118),n.Vb(),n.Vb(),n.Oc(46,zE,8,10,"div",113),n.Oc(47,BE,6,5,"div",113),n.Oc(48,HE,4,2,"div",113),n.Wb(49,"div",119),n.Oc(50,GE,3,9,"button",120),n.ic(51,"keyvalue"),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=n.hc();n.Db(2),n.oc("title",t.currentResourceInformations.subject+" ("+t.currentResourceInformations.statusLabel+")"),n.Db(1),n.Sc(" ",t.currentResourceInformations.subject," "),n.Db(2),n.Rc(t.currentResourceInformations.statusLabel),n.Db(3),n.oc("title",t.resourceFollowed?n.jc(9,32,"lang.untrackThisMail"):n.jc(10,34,"lang.trackThisMail")),n.Db(3),n.Gb("followIcon ",t.resourceFollowed?"fas":"far"," fa-star"),n.Db(1),n.oc("ngIf",t.privilegeService.hasCurrentUserPrivilege("freeze_retention_rule")),n.Db(1),n.oc("ngIf",t.privilegeService.hasCurrentUserPrivilege("set_binding_document")),n.Db(3),n.Ib("isSelectedMenu",!0===t.resourceBinded),n.oc("title",n.jc(17,36,n.jc(18,38,"lang.bindingMail")))("innerHTML",n.jc(19,40,"lang.bindingMail"),n.Ec),n.Db(5),n.Ib("isSelectedMenu",!1===t.resourceBinded),n.oc("title",n.jc(22,42,n.jc(23,44,"lang.noBindingMail")))("innerHTML",n.jc(24,46,"lang.noBindingMail"),n.Ec),n.Db(5),n.Ib("isSelectedMenu",null===t.resourceBinded),n.oc("title",n.jc(27,48,"lang.doNotDefine")),n.Db(2),n.Sc(" ",n.jc(29,50,"lang.doNotDefine"),""),n.Db(3),n.oc("ngIf",void 0!==t.currentResourceInformations.priority),n.Db(3),n.Sc("",n.jc(35,52,"lang.chronoNumberShort")," :"),n.Db(2),n.oc("title","N\xb0 "+t.currentResourceInformations.resId),n.Db(1),n.Sc(" ",t.currentResourceInformations.chrono,""),n.Db(3),n.Sc(" ","outgoing"!==t.currentResourceInformations.categoryId?n.jc(41,54,"lang.senders"):n.jc(42,56,"lang.recipient")," :"),n.Db(4),n.Sc("",t.senderLightInfo.displayName," "),n.Db(1),n.oc("ngIf",t.senderLightInfo.filling),n.Db(1),n.oc("ngIf",!t.functions.empty(t.currentResourceInformations.registeredMail_returnDate)),n.Db(1),n.oc("ngIf",!t.functions.empty(t.currentResourceInformations.registeredMail_returnReason)),n.Db(1),n.oc("ngIf",void 0!==t.currentResourceInformations.processLimitDate),n.Db(2),n.oc("ngForOf",n.jc(51,58,t.integrationsInfo))}}function qE(t,e){1&t&&(n.Wb(0,"div",130),n.Rb(1,"mat-spinner",131),n.Vb())}function KE(t,e){if(1&t&&n.Rb(0,"app-document-viewer",132,133),2&t){const t=n.hc();n.oc("editMode",t.canEditData)("resId",t.currentResourceInformations.resId)("title",t.currentResourceInformations.chrono+" - "+t.currentResourceInformations.subject)}}function YE(t,e){if(1&t&&n.Rb(0,"app-history-list",61,62),2&t){const t=n.hc(2);n.oc("resId",t.currentResourceInformations.resId)}}function JE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-notes-list",63,64),n.dc("reloadBadgeNotes",(function(e){return n.Dc(t),n.hc(2).refreshBadge(e,"notes")})),n.Vb()}if(2&t){const t=n.hc(2);n.oc("editMode",!0)("resId",t.currentResourceInformations.resId)}}function ZE(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-linked-resource-list",65,66),n.dc("reloadBadgeLinkedResources",(function(e){return n.Dc(t),n.hc(2).refreshBadge(e,"linkedResources")})),n.Vb()}if(2&t){const t=n.hc(2);n.oc("resId",t.currentResourceInformations.resId)}}function tF(t,e){if(1&t&&n.Rb(0,"app-diffusions-list",67,68),2&t){const t=n.hc(2);n.oc("adminMode",!0)("target",t.detailMode?"details":"process")("resId",t.currentResourceInformations.resId)("expanded",!0)}}function eF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-sent-resource-list",145,70),n.dc("reloadBadgeSentResource",(function(e){return n.Dc(t),n.hc(2).refreshBadge(e,"emails")})),n.Vb()}if(2&t){const t=n.hc(2);n.oc("resId",t.currentResourceInformations.resId)}}function iF(t,e){if(1&t&&n.Rb(0,"app-visa-workflow",146,72),2&t){const t=n.hc(2);n.oc("adminMode",t.privilegeService.hasCurrentUserPrivilege(t.detailMode?"config_visa_workflow_in_detail":"config_visa_workflow"))("resId",t.currentResourceInformations.resId)}}function nF(t,e){if(1&t&&n.Rb(0,"app-avis-workflow",71,73),2&t){const t=n.hc(2);n.oc("resId",t.currentResourceInformations.resId)("adminMode",t.privilegeService.hasCurrentUserPrivilege(t.detailMode?"config_avis_workflow_in_detail":"config_avis_workflow"))}}function aF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-attachments-list",147,75),n.dc("reloadBadgeAttachments",(function(e){return n.Dc(t),n.hc(2).refreshBadge(e,"attachments")})),n.Vb()}if(2&t){const t=n.hc(2);n.oc("resId",t.currentResourceInformations.resId)("autoOpenCreation",t.isMailing)}}function sF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-select-indexing-model",148,77),n.dc("afterSelectedListModel",(function(e){return n.Dc(t),n.hc(2).indexingForm.loadForm(e.id,!1)})),n.Vb()}if(2&t){const t=n.hc(2);n.oc("adminMode",t.canChangeModel)("indexingForm",t.indexingForm)("defaultIndexingModelId",t.currentResourceInformations.modelId)}}function oF(t,e){1&t&&(n.Rb(0,"div",78),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.dispositListGeneratedMsg"),n.Ec)}function rF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-indexing-form",149,80),n.dc("loadingFormEndEvent",(function(){return n.Dc(t),n.hc(2).triggerProcessAction()}))("retrieveDocumentEvent",(function(){return n.Dc(t),n.hc(2).appDocumentViewer.saveDocService()}))("afterSaveEvent",(function(){return n.Dc(t),n.hc(2).refreshData()})),n.Vb()}if(2&t){const t=n.hc(2);n.oc("groupId",t.currentGroupId)("indexingFormId",t.currentResourceInformations.modelId)("resId",t.currentResourceInformations.resId)("mode","process")("canEdit",t.canEditData)("hideDiffusionList",!0)}}function cF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",81),n.dc("click",(function(){return n.Dc(t),n.hc(2).confirmModification()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",82),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.saveModifications"))}function lF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",81),n.dc("click",(function(){return n.Dc(t),n.hc(2).saveListinstance()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",82),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.saveModifications"))}function dF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",81),n.dc("click",(function(){return n.Dc(t),n.hc(2).saveVisaWorkflow()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",82),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.saveModifications"))}function hF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",134),n.Wb(1,"div",135),n.Wb(2,"span"),n.Qc(3),n.Vb(),n.Wb(4,"button",136),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc().removeModal(i)})),n.Rb(5,"mat-icon",137),n.Vb(),n.Vb(),n.Wb(6,"div",138),n.Oc(7,YE,2,1,"app-history-list",49),n.Oc(8,JE,2,2,"app-notes-list",50),n.Oc(9,ZE,2,1,"app-linked-resource-list",51),n.Oc(10,tF,2,4,"app-diffusions-list",52),n.Oc(11,eF,2,1,"app-sent-resource-list",139),n.Oc(12,iF,2,2,"app-visa-workflow",140),n.Oc(13,nF,2,2,"app-avis-workflow",54),n.Oc(14,aF,2,2,"app-attachments-list",141),n.Oc(15,sF,2,3,"app-select-indexing-model",142),n.Oc(16,oF,2,3,"div",57),n.Oc(17,rF,2,6,"app-indexing-form",143),n.Wb(18,"div",144),n.Oc(19,cF,3,3,"button",60),n.Oc(20,lF,3,3,"button",60),n.Oc(21,dF,3,3,"button",60),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc();n.Gb("modal-module ",t.id," largeModal"),n.Db(3),n.Sc(" ",t.label," "),n.Db(4),n.oc("ngIf","history"===t.id&&!i.loading),n.Db(1),n.oc("ngIf","notes"===t.id&&!i.loading),n.Db(1),n.oc("ngIf","linkedResources"===t.id&&!i.loading),n.Db(1),n.oc("ngIf","diffusionList"===t.id&&!i.loading),n.Db(1),n.oc("ngIf","emails"===t.id&&!i.loading),n.Db(1),n.oc("ngIf","visaCircuit"===t.id&&!i.loading),n.Db(1),n.oc("ngIf","opinionCircuit"===t.id&&!i.loading),n.Db(1),n.oc("ngIf","attachments"===t.id&&!i.loading),n.Db(1),n.oc("ngIf","info"===t.id&&!i.loading),n.Db(1),n.oc("ngIf","info"===t.id&&!i.loading&&!i.functions.empty(i.currentResourceInformations.registeredMail_deposit_id)),n.Db(1),n.oc("ngIf","info"===t.id&&!i.loading),n.Db(2),n.oc("ngIf",void 0!==i.indexingForm&&i.indexingForm.isResourceModified()&&"info"===t.id),n.Db(1),n.oc("ngIf",void 0!==i.appDiffusionsList&&i.appDiffusionsList.isModified()&&"diffusionList"===t.id),n.Db(1),n.oc("ngIf",void 0!==i.appVisaWorkflow&&i.appVisaWorkflow.isModified()&&"visaCircuit"===t.id)}}const uF=function(t){return{width:t}};let pF=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c,l,d,h,u,p,b,f){this.translate=t,this.route=e,this._activatedRoute=i,this.http=n,this.dialog=a,this.headerService=s,this.filtersListService=o,this.notify=r,this.overlay=c,this.viewContainerRef=l,this.appService=d,this.actionService=h,this.contactService=u,this.router=p,this.privilegeService=b,this.functions=f,this.loading=!0,this.detailMode=!1,this.isMailing=!1,this.actionsList=[],this.currentUserId=null,this.currentBasketId=null,this.currentGroupId=null,this.selectedAction={id:0,label:"",component:"",default:!1,categoryUse:[]},this.currentResourceInformations={},this.processTool=[{id:"dashboard",icon:"fas fa-columns",label:this.translate.instant("lang.newsFeed"),count:0},{id:"history",icon:"fas fa-history",label:this.translate.instant("lang.history"),count:0},{id:"notes",icon:"fas fa-pen-square",label:this.translate.instant("lang.notesAlt"),count:0},{id:"attachments",icon:"fas fa-paperclip",label:this.translate.instant("lang.attachments"),count:0},{id:"linkedResources",icon:"fas fa-link",label:this.translate.instant("lang.links"),count:0},{id:"emails",icon:"fas fa-envelope",label:this.translate.instant("lang.mailsSentAlt"),count:0},{id:"diffusionList",icon:"fas fa-share-alt",label:this.translate.instant("lang.diffusionList"),editMode:!1,count:0},{id:"visaCircuit",icon:"fas fa-list-ol",label:this.translate.instant("lang.visaWorkflow"),count:0},{id:"opinionCircuit",icon:"fas fa-comment-alt",label:this.translate.instant("lang.avis"),count:0},{id:"info",icon:"fas fa-info-circle",label:this.translate.instant("lang.informations"),count:0}],this.modalModule=[],this.actionEnded=!1,this.canEditData=!1,this.canChangeModel=!1,this.autoAction=!1,this.integrationsInfo={inSignatureBook:{icon:"fas fa-file-signature"}},this.senderLightInfo={displayName:null,fillingRate:null},this.hasContact=!1,this.resourceFollowed=!1,this.resourceFreezed=!1,this.resourceBinded=!1,this.route.params.subscribe(t=>{this.loading=!0,this.headerService.sideBarForm=!0,this.headerService.showhHeaderPanel=!0,this.headerService.showMenuShortcut=!1,this.headerService.showMenuNav=!1,this.headerService.sideBarAdmin=!0,void 0!==t.detailResId?this.initDetailPage(t):this.initProcessPage(t)},t=>{this.notify.handleErrors(t)}),this.subscription=this.actionService.catchAction().subscribe(t=>{this.actionEnded=!0,this.router.navigate([`/basketList/users/${this.currentUserId}/groups/${this.currentGroupId}/baskets/${this.currentBasketId}`])})}ngOnInit(){this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu","form"),this.headerService.setHeader(this.translate.instant("lang.eventProcessDoc"))}checkAccesDocument(t){return new Promise((e,i)=>{this.http.get(`../rest/resources/${t}/isAllowed`).pipe(Object(mt.a)(t=>{t.isAllowed?e(!0):(this.notify.error(this.translate.instant("lang.documentOutOfPerimeter")),this.router.navigate(["/home"]))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.router.navigate(["/home"]),Object(c.a)(!1)))).subscribe()})}initProcessPage(t){return Object(r.a)(this,void 0,void 0,(function*(){this.detailMode=!1,this.currentUserId=t.userSerialId,this.currentGroupId=t.groupSerialId,this.currentBasketId=t.basketId,this.currentResourceInformations={resId:t.resId,mailtracking:!1},this.headerService.sideBarButton={icon:"fa fa-inbox",label:this.translate.instant("lang.backBasket"),route:`/basketList/users/${this.currentUserId}/groups/${this.currentGroupId}/baskets/${this.currentBasketId}`},yield this.checkAccesDocument(this.currentResourceInformations.resId),this.actionService.lockResource(this.currentUserId,this.currentGroupId,this.currentBasketId,[this.currentResourceInformations.resId]),this.loadBadges(),this.loadResource(),this.appService.getViewMode()&&setTimeout(()=>{this.headerService.sideNavLeft.open()},800),this.http.get(`../rest/resourcesList/users/${this.currentUserId}/groups/${this.currentGroupId}/baskets/${this.currentBasketId}/actions?resId=${this.currentResourceInformations.resId}`).pipe(Object(l.a)(t=>(t.actions=t.actions.map((t,e)=>({id:t.id,label:t.label,component:t.component,categoryUse:t.categories})),t)),Object(mt.a)(t=>{this.selectedAction=t.actions[0],this.actionsList=t.actions}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}))}initDetailPage(t){return Object(r.a)(this,void 0,void 0,(function*(){this._activatedRoute.queryParamMap.subscribe(t=>{this.isMailing=!this.functions.empty(t.get("isMailing")),this.isMailing&&(this.currentTool="attachments")}),this.detailMode=!0,this.currentResourceInformations={resId:t.detailResId,mailtracking:!1,retentionFrozen:!1},this.headerService.sideBarButton={icon:"fas fa-arrow-left",label:this.translate.instant("lang.back"),route:"__GOBACK"},yield this.checkAccesDocument(this.currentResourceInformations.resId),this.loadBadges(),this.loadResource(!this.isMailing),this.appService.getViewMode()&&setTimeout(()=>{this.headerService.sideNavLeft.open()},800)}))}isActionEnded(){return this.actionEnded}loadResource(t=!0){this.http.get(`../rest/resources/${this.currentResourceInformations.resId}?light=true`).pipe(Object(mt.a)(e=>{this.currentResourceInformations=e,this.resourceFollowed=e.followed,this.resourceBinded=e.binding,this.resourceFreezed=e.retentionFrozen,"outgoing"!==this.currentResourceInformations.categoryId?this.loadSenders():this.loadRecipients(),t&&this.setEditDataPrivilege(),this.loadAvaibleIntegrations(e.integrations),this.headerService.setHeader(this.translate.instant(this.detailMode?"lang.detailDoc":"lang.eventProcessDoc"),this.translate.instant("lang."+this.currentResourceInformations.categoryId))}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}setEditDataPrivilege(){this.detailMode?(this.http.get("../rest/search/configuration").pipe(Object(mt.a)(t=>{this.currentTool=null==t.configuration.listEvent.defaultTab?"dashboard":t.configuration.listEvent.defaultTab}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe(),this.canEditData=this.privilegeService.hasCurrentUserPrivilege("edit_resource")&&this.currentResourceInformations.statusAlterable&&this.functions.empty(this.currentResourceInformations.registeredMail_deposit_id),this.isMailing&&this.isToolEnabled("attachments")&&(this.currentTool="attachments",setTimeout(()=>{this.isMailing=!1},200))):this.http.get(`../rest/resources/${this.currentResourceInformations.resId}/users/${this.currentUserId}/groups/${this.currentGroupId}/baskets/${this.currentBasketId}/processingData`).pipe(Object(mt.a)(t=>{null!==t.listEventData&&(this.isToolEnabled(t.listEventData.defaultTab)&&(this.currentTool=t.listEventData.defaultTab),this.canEditData=t.listEventData.canUpdateData&&this.functions.empty(this.currentResourceInformations.registeredMail_deposit_id),this.canChangeModel=t.listEventData.canUpdateModel)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}loadAvaibleIntegrations(t){this.integrationsInfo.inSignatureBook.enable=!this.functions.empty(t.inSignatureBook)&&t.inSignatureBook,this.http.get("../rest/externalConnectionsEnabled").pipe(Object(mt.a)(t=>{Object.keys(t.connection).filter(t=>"maarchParapheur"!==t).forEach(t=>{"maileva"===t&&(this.integrationsInfo.inShipping={icon:"fas fa-shipping-fast"})})}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}toggleIntegration(t){this.http.put("../rest/resourcesList/integrations",{resources:[this.currentResourceInformations.resId],integrations:{[t]:!this.currentResourceInformations.integrations[t]}}).pipe(Object(mt.a)(()=>{this.currentResourceInformations.integrations[t]=!this.currentResourceInformations.integrations[t],this.notify.success(this.translate.instant("lang.actionDone"))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}loadBadges(){this.http.get(`../rest/resources/${this.currentResourceInformations.resId}/items`).pipe(Object(mt.a)(t=>{this.processTool.forEach(e=>{e.count=void 0!==t[e.id]?t[e.id]:0})}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}loadSenders(){void 0===this.currentResourceInformations.senders||0===this.currentResourceInformations.senders.length?(this.hasContact=!1,this.senderLightInfo={displayName:this.translate.instant("lang.noSelectedContact"),filling:null}):1===this.currentResourceInformations.senders.length?(this.hasContact=!0,"contact"===this.currentResourceInformations.senders[0].type?this.http.get("../rest/contacts/"+this.currentResourceInformations.senders[0].id).pipe(Object(mt.a)(t=>{const e=[];this.empty(t.firstname)&&this.empty(t.lastname)?this.senderLightInfo=this.functions.empty(t.fillingRate)?{displayName:t.company}:{displayName:t.company,filling:this.contactService.getFillingColor(t.fillingRate.thresholdLevel)}:(e.push(t.firstname),e.push(t.lastname),this.empty(t.company)||e.push("("+t.company+")"),this.senderLightInfo=this.functions.empty(t.fillingRate)?{displayName:e.filter(t=>""!==t).join(" ")}:{displayName:e.filter(t=>""!==t).join(" "),filling:this.contactService.getFillingColor(t.fillingRate.thresholdLevel)})})).subscribe():"entity"===this.currentResourceInformations.senders[0].type?this.http.get("../rest/entities/"+this.currentResourceInformations.senders[0].id).pipe(Object(mt.a)(t=>{this.senderLightInfo={displayName:t.entity_label,filling:null}})).subscribe():"user"===this.currentResourceInformations.senders[0].type&&this.http.get("../rest/users/"+this.currentResourceInformations.senders[0].id).pipe(Object(mt.a)(t=>{this.senderLightInfo={displayName:t.firstname+" "+t.lastname,filling:null}})).subscribe()):this.currentResourceInformations.senders.length>1&&(this.hasContact=!0,this.senderLightInfo={displayName:this.currentResourceInformations.senders.length+" "+this.translate.instant("lang.senders"),filling:null})}loadRecipients(){void 0===this.currentResourceInformations.recipients||0===this.currentResourceInformations.recipients.length?(this.hasContact=!1,this.senderLightInfo={displayName:this.translate.instant("lang.noSelectedContact"),filling:null}):1===this.currentResourceInformations.recipients.length?(this.hasContact=!0,"contact"===this.currentResourceInformations.recipients[0].type?this.http.get("../rest/contacts/"+this.currentResourceInformations.recipients[0].id).pipe(Object(mt.a)(t=>{const e=[];this.empty(t.firstname)&&this.empty(t.lastname)?this.senderLightInfo=this.functions.empty(t.fillingRate)?{displayName:t.company}:{displayName:t.company,filling:this.contactService.getFillingColor(t.fillingRate.thresholdLevel)}:(e.push(t.firstname),e.push(t.lastname),this.empty(t.company)||e.push("("+t.company+")"),this.senderLightInfo=this.functions.empty(t.fillingRate)?{displayName:e.filter(t=>""!==t).join(" ")}:{displayName:e.filter(t=>""!==t).join(" "),filling:this.contactService.getFillingColor(t.fillingRate.thresholdLevel)})})).subscribe():"entity"===this.currentResourceInformations.recipients[0].type?this.http.get("../rest/entities/"+this.currentResourceInformations.recipients[0].id).pipe(Object(mt.a)(t=>{this.senderLightInfo={displayName:t.entity_label,filling:null}})).subscribe():"user"===this.currentResourceInformations.recipients[0].type&&this.http.get("../rest/users/"+this.currentResourceInformations.recipients[0].id).pipe(Object(mt.a)(t=>{this.senderLightInfo={displayName:t.firstname+" "+t.lastname,filling:null}})).subscribe()):this.currentResourceInformations.recipients.length>1&&(this.hasContact=!0,this.senderLightInfo={displayName:this.currentResourceInformations.recipients.length+" "+this.translate.instant("lang.recipients"),filling:null})}onSubmit(){"info"===this.currentTool||this.isModalOpen("info")?this.processAction():this.isToolModified()?this.openConfirmModification().afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.saveTool()}),Object(Xt.a)(()=>{this.autoAction=!0,this.currentTool="info"}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe():(this.autoAction=!0,this.currentTool="info")}triggerProcessAction(){this.autoAction&&(this.processAction(),this.autoAction=!this.autoAction)}processAction(){return Object(r.a)(this,void 0,void 0,(function*(){this.indexingForm.isValidForm()?(this.actionService.loading=!0,this.isToolModified()?this.openConfirmModification().afterClosed().pipe(Object(mt.a)(t=>{"ok"!==t&&(this.refreshTool(),this.actionService.loading=!1)}),Object(mt.a)(t=>Object(r.a)(this,void 0,void 0,(function*(){"ok"===t&&(yield this.saveTool()),this.appDocumentViewer.isEditingTemplate()&&(yield this.appDocumentViewer.saveMainDocument()),this.actionService.launchAction(this.selectedAction,this.currentUserId,this.currentGroupId,this.currentBasketId,[this.currentResourceInformations.resId],this.currentResourceInformations,!1)}))),Object(m.a)(t=>(this.notify.handleSoftErrors(t),this.actionService.loading=!1,Object(c.a)(!1)))).subscribe():(this.appDocumentViewer.isEditingTemplate()&&(yield this.appDocumentViewer.saveMainDocument()),this.actionService.launchAction(this.selectedAction,this.currentUserId,this.currentGroupId,this.currentBasketId,[this.currentResourceInformations.resId],this.currentResourceInformations,!1))):this.notify.error(this.translate.instant("lang.mustFixErrors"))}))}showActionInCurrentCategory(t){if(-1===this.selectedAction.categoryUse.indexOf(this.currentResourceInformations.categoryId)){const t=this.actionsList.filter(t=>t.categoryUse.indexOf(this.currentResourceInformations.categoryId)>-1)[0];this.selectedAction=void 0!==t?this.actionsList.filter(t=>t.categoryUse.indexOf(this.currentResourceInformations.categoryId)>-1)[0]:{id:0,label:"",component:"",default:!1,categoryUse:[]}}return t.categoryUse.indexOf(this.currentResourceInformations.categoryId)>-1}selectAction(t){this.selectedAction=t}createModal(){this.modalModule.push(this.processTool.filter(t=>t.id===this.currentTool)[0])}openTechnicalInfo(){this.dialog.open(LR,{panelClass:"maarch-modal",autoFocus:!1,data:{resId:this.currentResourceInformations.resId}})}removeModal(t){"info"===this.modalModule[t].id&&this.indexingForm.isResourceModified()?this.openConfirmModification().afterClosed().pipe(Object(mt.a)(e=>{"ok"!==e&&this.modalModule.splice(t,1)}),Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.indexingForm.saveData(),setTimeout(()=>{this.loadResource(!1)},400),this.modalModule.splice(t,1)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe():this.modalModule.splice(t,1)}isModalOpen(t=this.currentTool){return this.modalModule.map(t=>t.id).indexOf(t)>-1}ngOnDestroy(){this.detailMode||(this.actionService.stopRefreshResourceLock(),this.actionService.actionEnded||this.actionService.unlockResource(this.currentUserId,this.currentGroupId,this.currentBasketId,[this.currentResourceInformations.resId])),this.subscription.unsubscribe()}changeTab(t){this.isToolModified()&&!this.isModalOpen()?this.openConfirmModification().afterClosed().pipe(Object(mt.a)(e=>{"ok"!==e&&(this.currentTool=t)}),Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.saveTool(),setTimeout(()=>{this.loadResource(!1)},400),this.currentTool=t}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe():this.currentTool=t}openConfirmModification(){return this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.confirm"),msg:this.translate.instant("lang.saveModifiedData"),buttonValidate:this.translate.instant("lang.yes"),buttonCancel:this.translate.instant("lang.no")}})}confirmModification(){this.indexingForm.saveData(),setTimeout(()=>{this.loadResource(!1)},400)}saveModificationBeforeClose(){return Object(r.a)(this,void 0,void 0,(function*(){this.isToolModified()&&!this.isModalOpen()&&(yield this.saveTool()),this.appDocumentViewer.isEditingTemplate()&&(yield this.appDocumentViewer.saveMainDocument())}))}refreshData(){this.appDocumentViewer.loadRessource(this.currentResourceInformations.resId)}refreshBadge(t,e){this.processTool.filter(t=>t.id===e)[0].count=t}openContact(){this.hasContact&&this.dialog.open(YD,{panelClass:"maarch-modal",data:{title:`${this.currentResourceInformations.chrono} - ${this.currentResourceInformations.subject}`,mode:"outgoing"!==this.currentResourceInformations.categoryId?"senders":"recipients",resId:this.currentResourceInformations.resId}})}saveListinstance(){this.appDiffusionsList.saveListinstance()}saveVisaWorkflow(){this.appVisaWorkflow.saveVisaWorkflow()}isToolModified(){return!!("info"===this.currentTool&&void 0!==this.indexingForm&&this.indexingForm.isResourceModified()||"diffusionList"===this.currentTool&&void 0!==this.appDiffusionsList&&this.appDiffusionsList.isModified()||"visaCircuit"===this.currentTool&&void 0!==this.appVisaWorkflow&&this.appVisaWorkflow.isModified()||"opinionCircuit"===this.currentTool&&void 0!==this.appAvisWorkflow&&this.appAvisWorkflow.isModified()||"notes"===this.currentTool&&void 0!==this.appNotesList&&this.appNotesList.isModified())}refreshTool(){const t=this.currentTool;this.currentTool="",setTimeout(()=>{this.currentTool=t},0)}saveTool(){return Object(r.a)(this,void 0,void 0,(function*(){"info"===this.currentTool&&void 0!==this.indexingForm?(yield this.indexingForm.saveData(),setTimeout(()=>{this.loadResource(!1)},400)):"diffusionList"===this.currentTool&&void 0!==this.appDiffusionsList?(yield this.appDiffusionsList.saveListinstance(),this.loadBadges()):"visaCircuit"===this.currentTool&&void 0!==this.appVisaWorkflow?(yield this.appVisaWorkflow.saveVisaWorkflow(),this.loadBadges()):"opinionCircuit"===this.currentTool&&void 0!==this.appAvisWorkflow?(yield this.appAvisWorkflow.saveAvisWorkflow(),this.loadBadges()):"notes"===this.currentTool&&void 0!==this.appNotesList&&(this.appNotesList.addNote(),this.loadBadges())}))}empty(t){return null==t||(Array.isArray(t)?!(t.length>0):""===String(t))}toggleFollow(){this.resourceFollowed=!this.resourceFollowed,this.resourceFollowed?this.http.post("../rest/resources/follow",{resources:[this.currentResourceInformations.resId]}).pipe(Object(mt.a)(()=>this.headerService.nbResourcesFollowed++),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe():this.http.request("DELETE","../rest/resources/unfollow",{body:{resources:[this.currentResourceInformations.resId]}}).pipe(Object(mt.a)(()=>this.headerService.nbResourcesFollowed--),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}toggleFreezing(){this.resourceFreezed=!this.resourceFreezed,this.http.put("../rest/archival/freezeRetentionRule",{resources:[this.currentResourceInformations.resId],freeze:this.resourceFreezed}).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant(this.resourceFreezed?"lang.retentionRuleFrozen":"lang.retentionRuleUnfrozen"))}),Object(m.a)(t=>(this.resourceFreezed=!this.resourceFreezed,this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}toggleBinding(t){this.resourceBinded=t,this.http.put("../rest/archival/binding",{resources:[this.currentResourceInformations.resId],binding:t}).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant(t?"lang.bindingMail":!1===t?"lang.noBindingMail":"lang.bindingUndefined"))}),Object(m.a)(t=>(this.resourceBinded=!this.resourceBinded,this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isToolEnabled(t){return"history"!==t||!(!this.privilegeService.hasCurrentUserPrivilege("view_full_history")&&!this.privilegeService.hasCurrentUserPrivilege("view_doc_history"))}openPrintedFolderPrompt(){this.dialog.open(jR,{panelClass:"maarch-modal",data:{resId:this.currentResourceInformations.resId}})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(o.a),n.Qb(o.a),n.Qb(v.b),n.Qb(q.b),n.Qb(y.a),n.Qb(sI),n.Qb(D.a),n.Qb(ZD.c),n.Qb(n.T),n.Qb(w.a),n.Qb(bC),n.Qb(lc),n.Qb(o.c),n.Qb(Dt.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(KT,!0),n.Kc(YT,!0),n.Xc(JT,!0),n.Xc(ZT,!0),n.Xc(tE,!0),n.Xc(eE,!0),n.Xc(iE,!0),n.Xc(nE,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.appDocumentViewer=i.first),n.yc(i=n.ec())&&(e.indexingForm=i.first),n.yc(i=n.ec())&&(e.appDiffusionsList=i.first),n.yc(i=n.ec())&&(e.appVisaWorkflow=i.first),n.yc(i=n.ec())&&(e.appAvisWorkflow=i.first),n.yc(i=n.ec())&&(e.appNotesList=i.first))},features:[n.Cb([bC,lc])],decls:21,vars:18,consts:[[1,"maarch-container"],["adminMenuTemplate",""],[1,"process-content"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content",2,"padding-bottom","20px"],[1,"resourceInfo"],[4,"ngIf","ngIfElse"],["elseInfoRes",""],[1,"document-container"],[1,"content"],["style","height:100%;width:100%;",3,"editMode","resId","title",4,"ngIf"],["cdkDrag","","cdkDragBoundary",".process-content",3,"class",4,"ngFor","ngForOf"],["position","end","autoFocus","false",1,"panel-right",2,"overflow-x","hidden",3,"fixedInViewport","opened","mode","ngStyle"],["snav2",""],["class","alert-message alert-message-danger","style","min-width: 100%; margin: 10px 0;",4,"ngIf"],[1,"listModels"],[1,"processTool"],["class","processTool-module jiggle","matRipple","",3,"processTool-module-active","tool-disabled","click",4,"ngFor","ngForOf"],[1,"indexing-form-container"],["style","display: flex;justify-content: flex-end;",4,"ngIf"],[4,"ngIf"],["elseTemplate",""],["class","actions-indexing-form",4,"ngIf"],[1,"alert-message","alert-message-danger",2,"min-width","100%","margin","10px 0"],["style","display: flex;align-items: center;",4,"ngIf"],[2,"display","flex","align-items","center"],[1,"fas","fa-snowflake",2,"width","25px","text-align","center"],[3,"innerHTML"],[1,"fas","fa-exclamation",2,"width","25px","text-align","center"],[1,"fa","fa-info-circle",2,"cursor","help","opacity","0.5",3,"title"],["matRipple","",1,"processTool-module","jiggle",3,"click"],["class","fas fa-circle haveContent",4,"ngIf"],[1,"fas","fa-circle","haveContent"],[2,"display","flex","justify-content","flex-end"],["mat-icon-button","","color","primary",3,"title","click",4,"ngIf"],["mat-icon-button","","color","primary",3,"title","click"],[1,"fas","fa-external-link-alt"],[1,"far","fa-file-code"],[2,"display","flex","align-items","center","justify-content","flex-end","margin-top","10px","margin-bottom","-20px"],["mat-button","","color","primary",3,"title","click"],[1,"fa","fa-print",2,"height","auto"],[1,"banner"],[1,"title",3,"click"],[1,"title-divider"],[3,"resId","goTo",4,"ngIf"],[3,"resId","goTo"],[3,"resId",4,"ngIf"],[3,"editMode","resId","reloadBadgeNotes",4,"ngIf"],[3,"resId","reloadBadgeLinkedResources",4,"ngIf"],[3,"adminMode","target","resId","expanded",4,"ngIf"],[3,"resId","currentUserId","currentGroupId","currentBasketId","reloadBadgeSentResource",4,"ngIf"],[3,"resId","adminMode",4,"ngIf"],[3,"resId","autoOpenCreation","target","reloadBadgeAttachments",4,"ngIf"],[3,"defaultIndexingModelId","adminMode","indexingForm","afterSelectedListModel",4,"ngIf"],["class","alert-message alert-message-info","style","min-width: 100%;",3,"innerHTML",4,"ngIf"],[3,"groupId","resId","indexingFormId","mode","canEdit","hideDiffusionList","loadingFormEndEvent","retrieveDocumentEvent","afterSaveEvent",4,"ngIf"],[2,"position","sticky","bottom","0px","text-align","right"],["mat-fab","","color","accent",3,"title","click",4,"ngIf"],[3,"resId"],["appHistoryList",""],[3,"editMode","resId","reloadBadgeNotes"],["appNotesList",""],[3,"resId","reloadBadgeLinkedResources"],["appLinkedResourceList",""],[3,"adminMode","target","resId","expanded"],["appDiffusionsList",""],[3,"resId","currentUserId","currentGroupId","currentBasketId","reloadBadgeSentResource"],["appSentResource",""],[3,"resId","adminMode"],["appVisaWorkflow",""],["appAvisWorkflow",""],[3,"resId","autoOpenCreation","target","reloadBadgeAttachments"],["appAttachmentsList",""],[3,"defaultIndexingModelId","adminMode","indexingForm","afterSelectedListModel"],["appSelectIndexingModel",""],[1,"alert-message","alert-message-info",2,"min-width","100%",3,"innerHTML"],[3,"groupId","resId","indexingFormId","mode","canEdit","hideDiffusionList","loadingFormEndEvent","retrieveDocumentEvent","afterSaveEvent"],["indexingForm",""],["mat-fab","","color","accent",3,"title","click"],[1,"fas","fa-check",2,"height","auto","font-size","20px"],[1,"openedModal"],[1,"actions-indexing-form"],["class","emptyAction",3,"innerHTML",4,"ngIf"],["mat-button","",1,"button-form-primary",2,"width","350px","margin-right","20px",3,"disabled","matMenuTriggerFor","title"],[1,"menu-label",3,"innerHTML"],[1,"fa","fa-chevron-down","menu-icon"],["menu","matMenu"],[1,"menuTitle"],["floatLabel","never","appearance","outline",1,"smallInput",3,"click"],["matInput","","id","searchTerm","autocomplete","off",3,"placeholder","click","keydown"],["listFilter",""],[4,"ngFor","ngForOf"],["mat-button","","class","button-form-primary-filled","style","width: 150px;align-items: center;justify-content: center;text-align: center;display: flex;",3,"disabled","click",4,"ngIf"],["mat-icon-button","","class","button-form-primary",3,"click",4,"ngIf"],["mat-menu-item","",3,"title","listModels-menu-selected","click",4,"ngIf"],["mat-menu-item","",3,"title","click"],[2,"flex","1"],["mat-button","",1,"button-form-primary-filled",2,"width","150px","align-items","center","justify-content","center","text-align","center","display","flex",3,"disabled","click"],["mat-icon-button","",1,"button-form-primary",3,"click"],[1,"fa","fa-check"],[1,"emptyAction",3,"innerHTML"],[1,"title"],[2,"white-space","nowrap","padding-left","10px","padding-right","10px",3,"title"],[1,"subSubject"],["mat-icon-button","",1,"categoryLabel",3,"title","click"],[2,"font-size","20px"],["mat-icon-button","","class","categoryLabel",3,"title","click",4,"ngIf"],["mat-icon-button","","class","categoryLabel",3,"matMenuTriggerFor","title",4,"ngIf"],["bindingRentalRule","matMenu"],["mat-menu-item","",3,"title","innerHTML","click"],["class","content-item",4,"ngIf"],[1,"content-item"],[1,"content-item-value",3,"title"],[1,"content-item",2,"cursor","pointer",3,"click"],[1,"content-item-value"],["class","fas fa-circle","style","font-size: 8px",3,"color",4,"ngIf"],[2,"position","absolute","right","0px","top","0px","height","100%","display","flex","flex-direction","column","justify-content","center"],["mat-icon-button","",3,"matTooltip","click",4,"ngFor","ngForOf"],["mat-icon-button","",1,"categoryLabel",3,"matMenuTriggerFor","title"],[1,"bindIcon","fas","fa-exclamation",2,"font-size","20px"],[1,"fas","fa-flag",2,"font-size","25px","padding-right","20px"],[1,"fas","fa-circle",2,"font-size","8px"],["elseLimitDate",""],[2,"font-weight","bold",3,"title"],[1,"fa","fa-lock"],[1,"content-item-value",3,"title","innerHTML"],["mat-icon-button","",3,"matTooltip","click"],[1,"loadingBanner"],["diameter","35"],[2,"height","100%","width","100%",3,"editMode","resId","title"],["appDocumentViewer",""],["cdkDrag","","cdkDragBoundary",".process-content"],["cdkDragHandle","",1,"modal-module-title"],["mat-icon-button","",3,"click"],[1,"fas","fa-times"],[1,"modal-module-content"],[3,"resId","reloadBadgeSentResource",4,"ngIf"],[3,"adminMode","resId",4,"ngIf"],[3,"resId","autoOpenCreation","reloadBadgeAttachments",4,"ngIf"],[3,"adminMode","indexingForm","defaultIndexingModelId","afterSelectedListModel",4,"ngIf"],[3,"groupId","indexingFormId","resId","mode","canEdit","hideDiffusionList","loadingFormEndEvent","retrieveDocumentEvent","afterSaveEvent",4,"ngIf"],[2,"position","sticky","bottom","0px","text-align","right","padding","15px"],[3,"resId","reloadBadgeSentResource"],[3,"adminMode","resId"],[3,"resId","autoOpenCreation","reloadBadgeAttachments"],[3,"adminMode","indexingForm","defaultIndexingModelId","afterSelectedListModel"],[3,"groupId","indexingFormId","resId","mode","canEdit","hideDiffusionList","loadingFormEndEvent","retrieveDocumentEvent","afterSaveEvent"]],template:function(t,e){if(1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,EE,11,7,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content",2),n.Wb(4,"div",3),n.Wb(5,"div",4),n.Wb(6,"div",5),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",6),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Wb(10,"div",7),n.Wb(11,"div",8),n.Oc(12,XE,52,60,"ng-container",9),n.Oc(13,qE,2,0,"ng-template",null,10,n.Pc),n.Vb(),n.Vb(),n.Vb(),n.Wb(15,"div",11),n.Wb(16,"div",12),n.Oc(17,KE,2,3,"app-document-viewer",13),n.Vb(),n.Vb(),n.Oc(18,hF,22,18,"div",14),n.Vb(),n.Rb(19,"mat-sidenav",15,16),n.Vb()),2&t){const t=n.zc(14);n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",!e.loading)("ngIfElse",t),n.Db(3),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",!e.loading),n.Db(1),n.oc("ngForOf",e.modalModule),n.Db(1),n.Ib("docView",!e.filtersListService.filterMode),n.oc("fixedInViewport",e.appService.getViewMode())("opened",(e.appService.getViewMode(),!1))("mode",e.appService.getViewMode()?"over":"side")("ngStyle",n.vc(16,uF,e.appService.getViewMode()?"80%":"30%"))}},directives:[I.e,I.f,Ot,We,P.t,P.s,I.d,P.w,W.u,k.b,S.a,GR,ZR,rj,mj,iO,kC,Fk,im,uW,Ko,Qv,Sg,yW,qT,ne.d,ne.e,Y.c,J.b,ne.b,T.a,A.b,V.c,Jr,lo.a,lo.b],pipes:[g.d,rg,Tt.r,P.l,uo,P.f,ps,bs],styles:[".document-container[_ngcontent-%COMP%]{flex:1;padding-left:50px;padding-right:50px;color:#fff;margin-top:0;width:100%;overflow:hidden;background-color:#135f7f}@media (max-width:768px){.document-container[_ngcontent-%COMP%]{padding-left:0;padding-right:0}}.document-container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{overflow-y:auto;overflow-x:hidden;position:relative;height:100%;min-height:200px;width:100%;border-radius:0;box-shadow:none;border:1px solid #fff;justify-content:center;display:flex;align-items:center;text-align:center;font-weight:700;flex-direction:column}.indexing-form-container[_ngcontent-%COMP%]{position:relative;height:100%;overflow:auto;padding-left:20px;padding-right:20px;padding-bottom:20px}@media (max-width:768px){.indexing-form-container[_ngcontent-%COMP%]{padding-right:0;padding-left:0}}.actions-indexing-form[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;box-shadow:0 -5px 10px 0 rgba(0,0,0,.07);padding:10px 40px}@media (max-width:768px){.actions-indexing-form[_ngcontent-%COMP%]{padding-left:0;padding-right:0}}.emptyModel[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;align-items:center;justify-content:center;text-align:center;padding-left:20px;padding-right:20px;font-size:25px;opacity:.3;font-weight:700}.listModels[_ngcontent-%COMP%]{background:#f9f9f9;display:flex;padding:10px 40px}@media (max-width:768px){.listModels[_ngcontent-%COMP%]{padding-bottom:20px;padding-left:0;padding-right:0}}.listModels[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{font-size:20px;height:auto}.listModels-button[_ngcontent-%COMP%]{margin-right:20px;width:450px!important} .listModels-menu{min-width:450px!important} .listModels-menu .mat-menu-item:hover:hover .listModels-menu-badge{background:#fff!important;color:#135f7f!important} .listModels-menu .mat-menu-item:hover:hover .listModels-menu-delete .mat-icon{color:#fff!important} .listModels-menu-badge{font-size:70%;background:#135f7f;border-radius:20px;color:#fff;padding:2px 5px;font-weight:700} .listModels-menu-delete .mat-icon{margin-right:0} .listModels-menu-selected{color:#fff!important;background:#135f7f} .listModels-menu-selected .listModels-menu-badge{background:#fff!important;color:#135f7f!important}.emptyAction[_ngcontent-%COMP%]{color:#8e3e52;font-size:14px;text-align:center}.loading[_ngcontent-%COMP%]{display:flex;height:100%;position:absolute;width:100%;background:hsla(0,0%,100%,.7294117647058823);z-index:2}.loadingBanner[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center} .menuAction{min-width:350px!important}.resourceInfo[_ngcontent-%COMP%]{display:flex;flex-direction:column;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px 40px 20px 20px;background:#1a80ab;width:100%}.resourceInfo[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#fff}.resourceInfo[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#1a80ab;height:1px}.resourceInfo[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{display:flex;font-size:15px;overflow:auto}.resourceInfo[_ngcontent-%COMP%] .content-item[_ngcontent-%COMP%]{flex-direction:column;align-items:center;justify-content:center;display:flex;flex:1;padding-left:20px;padding-right:20px;white-space:pre}.resourceInfo[_ngcontent-%COMP%] .content-item-value[_ngcontent-%COMP%]{font-weight:700;display:flex;align-items:center}.resourceInfo[_ngcontent-%COMP%] .content-item-value[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{padding-left:10px}.processTool[_ngcontent-%COMP%]{width:100%;display:grid;grid-template-columns:20% 20% 20% 20% 20%;background-color:#fff;color:#b3b3b3;border:1px solid #dedede;padding:5px;border-radius:15px;text-align:center}.processTool-module[_ngcontent-%COMP%]{display:flex;justify-content:center;flex-direction:column;padding:5px;border-right:1px solid #dedede;cursor:pointer;transition:all .3s}.processTool-module[_ngcontent-%COMP%]:nth-child(-n+5){border-bottom:1px solid #dedede}.processTool-module[_ngcontent-%COMP%]:nth-child(5n){border-right:none}.processTool-module[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:30px}.processTool-module[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{white-space:pre;font-size:10px}.processTool-module-active[_ngcontent-%COMP%]{font-weight:700;color:#135f7f}.processTool-module[_ngcontent-%COMP%]:hover:not(.tool-disabled){transition:all .3s;color:#135f7f}.haveContent[_ngcontent-%COMP%]{position:absolute;right:15px;top:15px;font-size:10px!important;color:#f99830}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{cursor:pointer}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{overflow:auto;max-height:300px}.jiggle[_ngcontent-%COMP%]:active:not(.tool-disabled) i[_ngcontent-%COMP%]{-webkit-animation:jiggle .2s;-moz-animation-duration:.2s;-moz-animation-name:jiggle;-moz-animation-iteration-count:2;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg)}@-webkit-keyframes jiggle{0%{-webkit-transform:rotate(-9deg)}50%{-webkit-transform:rotate(9deg)}}.modal-module[_ngcontent-%COMP%]{background:#fff;position:absolute;right:50px;z-index:1;box-shadow:10px 10px 21px -15px rgba(0,0,0,.75);border-radius:5px;padding:10px;width:400px}.modal-module-title[_ngcontent-%COMP%]{cursor:move;color:#fff;padding-left:10px;padding-right:10px;background:#f99830;margin-top:-10px;margin-left:-10px;margin-right:-10px;border-top-left-radius:5px;border-top-right-radius:5px;display:flex;align-items:center}.modal-module-title[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:flex;flex:1}.modal-module-content[_ngcontent-%COMP%]{overflow:auto;max-height:500px}.openedModal[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;justify-content:center;align-items:center;font-size:30px;font-weight:700;opacity:.2}.largeModal[_ngcontent-%COMP%]{width:560px}.menuTitle[_ngcontent-%COMP%]{display:flex;padding-left:20px;align-items:center;color:#135f7f;font-weight:700}.smallInput[_ngcontent-%COMP%]{padding:10px}.smallInput[_ngcontent-%COMP%] .mat-form-field-wrapper{padding-bottom:0}.followIcon[_ngcontent-%COMP%], .freezeUnfreezIcon[_ngcontent-%COMP%]{color:#f99830}.nonFreeze[_ngcontent-%COMP%]{color:#135f7f}.bindIcon[_ngcontent-%COMP%]{color:#f99830;margin-left:5px}.tool-disabled[_ngcontent-%COMP%]{cursor:not-allowed;opacity:.3}.checked[_ngcontent-%COMP%]{opacity:1;color:#f99830}.unchecked[_ngcontent-%COMP%]{opacity:.5}.emails[_ngcontent-%COMP%], .linkedResources[_ngcontent-%COMP%]{width:600px}.subSubject[_ngcontent-%COMP%]{color:#f99830}.isSelectedMenu[_ngcontent-%COMP%]{background:#f99830}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();const bF=["adminMenuTemplate"],fF=["appSelectIndexingModel"],mF=["indexingForm"],gF=["appDocumentViewer"];function vF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-indexing-form",19,20),n.dc("retrieveDocumentEvent",(function(){return n.Dc(t),n.hc(3),n.zc(13).saveDocService()})),n.Vb()}if(2&t){const t=n.hc(3);n.oc("groupId",t.currentGroupId)("indexingFormId",t.currentIndexingModel.id)}}function _F(t,e){1&t&&(n.Wb(0,"small",36),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.badActionParam")))}function yF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",33),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(4).selectAction(e)})),n.Wb(1,"span",34),n.Qc(2),n.Vb(),n.Oc(3,_F,3,3,"small",35),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc(4);n.Ib("listModels-menu-selected",t.id===e.selectedAction.id),n.oc("title",t.label)("disabled",!t.enabled),n.Db(2),n.Rc(t.label),n.Db(1),n.oc("ngIf",!t.enabled)}}function xF(t,e){if(1&t&&(n.Ub(0),n.Oc(1,yF,4,6,"button",32),n.Tb()),2&t){const t=e.$implicit,i=n.hc(4);n.Db(1),n.oc("ngIf",i.showActionInCurrentCategory(t))}}function CF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",37),n.dc("click",(function(){return n.Dc(t),n.hc(4).onSubmit()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(4),e=n.zc(13);n.oc("disabled",t.actionService.loading||0===t.selectedAction.id||void 0!==e&&!e.isEditorLoaded()),n.Db(1),n.Rc(n.jc(2,2,"lang.validate"))}}function OF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",38),n.dc("click",(function(){return n.Dc(t),n.hc(4).onSubmit()})),n.Rb(1,"mat-icon",39),n.Vb()}}function DF(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"button",21),n.Rb(2,"span",22),n.Rb(3,"i",23),n.Vb(),n.Wb(4,"mat-menu",null,24),n.Wb(6,"div",25),n.Wb(7,"span"),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Wb(10,"mat-form-field",26),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.Wb(11,"input",27,28),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("keydown",(function(e){return n.Dc(t),e.stopPropagation()})),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Oc(14,xF,2,1,"ng-container",29),n.ic(15,"filterList"),n.Vb(),n.Oc(16,CF,3,4,"button",30),n.Oc(17,OF,2,0,"button",31),n.Tb()}if(2&t){const t=n.zc(5),e=n.zc(12),i=n.hc(3);n.Db(1),n.oc("disabled",0===i.selectedAction.id)("matMenuTriggerFor",t)("title",i.selectedAction.label),n.Db(1),n.oc("innerHTML",i.selectedAction.label,n.Ec),n.Db(2),n.Fb("menuForm menuAction"),n.Db(4),n.Sc(" ",n.jc(9,11,"lang.actions")," "),n.Db(3),n.pc("placeholder",n.jc(13,13,"lang.filterBy")),n.Db(3),n.oc("ngForOf",n.lc(15,15,i.actionsList,e.value,"label")),n.Db(2),n.oc("ngIf",!i.appService.getViewMode()),n.Db(1),n.oc("ngIf",i.appService.getViewMode())}}function wF(t,e){1&t&&(n.Rb(0,"div",40),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.noAvailableAction"),n.Ec)}function MF(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div",15),n.Oc(2,vF,2,2,"app-indexing-form",16),n.Vb(),n.Wb(3,"div",17),n.Oc(4,DF,18,19,"ng-container",13),n.Oc(5,wF,2,3,"div",18),n.Vb(),n.Tb()),2&t){const t=n.hc(2);n.Db(2),n.oc("ngIf",void 0!==t.currentIndexingModel.id),n.Db(2),n.oc("ngIf",t.actionsList.length>0&&void 0!==t.indexingForm&&void 0!==t.selectedAction),n.Db(1),n.oc("ngIf",0===t.actionsList.length)}}function kF(t,e){1&t&&(n.Rb(0,"div",41),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.noAvailableIndexingModel"),n.Ec)}function SF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-select-indexing-model",11,12),n.dc("afterListModelsLoaded",(function(e){return n.Dc(t),n.hc().loadIndexingModel(e)}))("afterSelectedListModel",(function(e){n.Dc(t);const i=n.hc();return i.currentIndexingModel=e,i.indexingForm.loadForm(e.id)})),n.Vb(),n.Oc(2,MF,6,3,"ng-container",13),n.Oc(3,kF,2,3,"div",14)}if(2&t){const t=n.hc();n.oc("adminMode",!0)("indexingForm",t.indexingForm),n.Db(2),n.oc("ngIf",!t.isEmptyIndexingModels()),n.Db(1),n.oc("ngIf",t.isEmptyIndexingModels())}}function IF(t,e){1&t&&(n.Wb(0,"div",42),n.Rb(1,"i",43),n.Vb())}let PF=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c,l,d,h,u,p,b){this.translate=t,this.route=e,this._activatedRoute=i,this.http=n,this.dialog=a,this.headerService=s,this.filtersListService=o,this.notify=r,this.overlay=c,this.viewContainerRef=l,this.appService=d,this.actionService=h,this.router=u,this.sortPipe=p,this.functions=b,this.loading=!1,this.indexingModels=[],this.currentIndexingModel={},this.actionsList=[],this.selectedAction={id:0,label:"",component:"",default:!1,categoryUse:[]},this.tmpFilename="",this.isMailing=!1,i.queryParams.subscribe(t=>this.tmpFilename=t.tmpfilename),this.subscription=this.actionService.catchAction().subscribe(t=>{["closeAndIndexAction","saveAndIndexRegisteredMailAction"].indexOf(this.selectedAction.component)>-1?(this.appDocumentViewer.templateListForm.reset(),this.appDocumentViewer.file={name:"",type:"",content:null,src:null},this.appDocumentViewer.triggerEvent.emit("cleanFile"),this.appSelectIndexingModel.resetIndexingModel()):this.router.navigate(["/resources/"+t[0]],{queryParams:this.isMailing?{isMailing:!0}:null})})}ngOnInit(){this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu","form"),this.headerService.sideBarButton={icon:"fa fa-home",label:this.translate.instant("lang.backHome"),route:"/home"},this.fetchData()}fetchData(){this.loading=!1,this.headerService.setHeader(this.translate.instant("lang.recordingMail")),this.route.params.subscribe(t=>{this.currentGroupId=t.groupId,this.http.get("../rest/indexing/groups/"+this.currentGroupId+"/actions").pipe(Object(l.a)(t=>(t.actions=t.actions.map((t,e)=>({id:t.id,label:t.label,component:t.component,enabled:t.enabled,default:0===e,categoryUse:t.categories})),t)),Object(mt.a)(t=>{this.selectedAction=t.actions[0],this.actionsList=t.actions}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()},t=>{this.notify.handleErrors(t)})}isEmptyIndexingModels(){return void 0!==this.appSelectIndexingModel&&0===this.appSelectIndexingModel.getIndexingModels().length}onSubmit(){if(this.indexingForm.isValidForm()){this.actionService.loading=!0;const t=this.indexingForm.formatDatas(this.indexingForm.getDatas());t.modelId=null!==this.currentIndexingModel.master?this.currentIndexingModel.master:this.currentIndexingModel.id,t.chrono=!0,this.appDocumentViewer.getFile().pipe(Object(ro.a)(1),Object(mt.a)(e=>{t.encodedFile=e.content,t.format=e.format,this.isMailing=!this.functions.empty(t.recipients)&&t.recipients.length>0&&"outgoing"===this.currentIndexingModel.category&&null===t.encodedFile,null===t.encodedFile&&"registeredMail"!==this.currentIndexingModel.category?(this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.noFile"),msg:this.translate.instant("lang.noFileMsg")}}),this.dialogRef.afterClosed().pipe(Object(mt.a)(t=>{"ok"!==t&&(this.actionService.loading=!1)}),Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.actionService.launchIndexingAction(this.selectedAction,this.headerService.user.id,this.currentGroupId,t)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()):this.actionService.launchIndexingAction(this.selectedAction,this.headerService.user.id,this.currentGroupId,t)})).subscribe()}else this.notify.error(this.translate.instant("lang.mustFixErrors"))}formatDatas(t){const e={},i=/indexingCustomField_[.]*/g;return e.customFields={},t.forEach(t=>{null!==t.identifier.match(i)?e.customFields[t.identifier.split("_")[1]]=t.default_value:e[t.identifier]=t.default_value}),e}loadIndexingModel(t){this.currentIndexingModel=t}selectAction(t){this.selectedAction=t}ngOnDestroy(){this.subscription.unsubscribe()}showActionInCurrentCategory(t){if(-1===this.selectedAction.categoryUse.indexOf(this.indexingForm.getCategory())){const t=this.actionsList.filter(t=>t.categoryUse.indexOf(this.indexingForm.getCategory())>-1)[0];this.selectedAction=void 0!==t?this.actionsList.filter(t=>t.categoryUse.indexOf(this.indexingForm.getCategory())>-1)[0]:{id:0,label:"",component:"",default:!1,categoryUse:[]}}return t.categoryUse.indexOf(this.indexingForm.getCategory())>-1}refreshDatas(){this.appDocumentViewer.setDatas(this.indexingForm.formatDatas(this.indexingForm.getDatas()))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(o.a),n.Qb(o.a),n.Qb(v.b),n.Qb(q.b),n.Qb(y.a),n.Qb(sI),n.Qb(D.a),n.Qb(ZD.c),n.Qb(n.T),n.Qb(w.a),n.Qb(bC),n.Qb(o.c),n.Qb(Wt.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(bF,!0),n.Xc(fF,!0),n.Xc(mF,!0),n.Xc(gF,!0)),2&t&&(n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.appSelectIndexingModel=i.first),n.yc(i=n.ec())&&(e.indexingForm=i.first),n.yc(i=n.ec())&&(e.appDocumentViewer=i.first))},features:[n.Cb([bC,Wt.a])],decls:15,vars:9,consts:[[1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"document-container"],[1,"content"],[2,"height","100%","width","100%",3,"editMode","tmpFilename","triggerEvent"],["appDocumentViewer",""],["style","font-size: 120px;opacity: 0.4;",4,"ngIf"],[3,"adminMode","indexingForm","afterListModelsLoaded","afterSelectedListModel"],["appSelectIndexingModel",""],[4,"ngIf"],["class","emptyModel",3,"innerHTML",4,"ngIf"],[1,"indexing-form-container"],[3,"groupId","indexingFormId","retrieveDocumentEvent",4,"ngIf"],[1,"actions-indexing-form"],["class","emptyAction",3,"innerHTML",4,"ngIf"],[3,"groupId","indexingFormId","retrieveDocumentEvent"],["indexingForm",""],["mat-button","",1,"button-form-primary",2,"width","350px","margin-right","20px",3,"disabled","matMenuTriggerFor","title"],[1,"menu-label",3,"innerHTML"],[1,"fa","fa-chevron-down","menu-icon"],["menu","matMenu"],[1,"menuTitle"],["floatLabel","never","appearance","outline",1,"smallInput",3,"click"],["matInput","","id","searchTerm","autocomplete","off",3,"placeholder","click","keydown"],["listFilter",""],[4,"ngFor","ngForOf"],["mat-button","","class","button-form-primary-filled","style","width: 150px;align-items: center;justify-content: center;text-align: center;display: flex;",3,"disabled","click",4,"ngIf"],["mat-icon-button","","class","button-form-primary",3,"click",4,"ngIf"],["mat-menu-item","",3,"title","listModels-menu-selected","disabled","click",4,"ngIf"],["mat-menu-item","",3,"title","disabled","click"],[2,"flex","1"],["style","position: absolute;top: 15px;left: 140px;","color","warn",4,"ngIf"],["color","warn",2,"position","absolute","top","15px","left","140px"],["mat-button","",1,"button-form-primary-filled",2,"width","150px","align-items","center","justify-content","center","text-align","center","display","flex",3,"disabled","click"],["mat-icon-button","",1,"button-form-primary",3,"click"],[1,"fa","fa-check"],[1,"emptyAction",3,"innerHTML"],[1,"emptyModel",3,"innerHTML"],[2,"font-size","120px","opacity","0.4"],[1,"fas","fa-dolly-flatbed"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,SF,4,4,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Vb(),n.Wb(10,"div",6),n.Wb(11,"div",7),n.Wb(12,"app-document-viewer",8,9),n.dc("triggerEvent",(function(){return e.refreshDatas()})),n.Vb(),n.Oc(14,IF,2,0,"div",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.Lc("display","registeredMail"!==e.currentIndexingModel.category?"block":"none"),n.oc("editMode",!0)("tmpFilename",e.tmpFilename),n.Db(2),n.oc("ngIf","registeredMail"===e.currentIndexingModel.category))},directives:[I.e,I.f,Ot,We,Jr,P.t,yW,qT,k.b,ne.d,ne.e,Y.c,J.b,P.s,ne.b,S.a],pipes:[g.d,rg],styles:[".panel-left[_ngcontent-%COMP%] .mat-drawer-inner-container{display:flex;flex-direction:column}.document-container[_ngcontent-%COMP%]{flex:1;padding-left:50px;padding-right:50px;color:#fff;margin-top:0;width:100%;overflow:hidden;background-color:#135f7f}@media (max-width:768px){.document-container[_ngcontent-%COMP%]{padding-left:0;padding-right:0}}.document-container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{overflow-y:auto;overflow-x:hidden;position:relative;height:100%;min-height:200px;width:100%;border-radius:0;box-shadow:none;border:1px solid #fff;justify-content:center;display:flex;align-items:center;text-align:center;font-weight:700;flex-direction:column}.indexing-form-container[_ngcontent-%COMP%]{height:100%;overflow:auto;padding-left:20px;padding-right:20px;padding-bottom:20px}@media (max-width:768px){.indexing-form-container[_ngcontent-%COMP%]{padding-right:0;padding-left:0}}.actions-indexing-form[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;box-shadow:0 -5px 10px 0 rgba(0,0,0,.07);padding:10px 40px}@media (max-width:768px){.actions-indexing-form[_ngcontent-%COMP%]{padding-left:0;padding-right:0}}.emptyModel[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;align-items:center;justify-content:center;text-align:center;padding-left:20px;padding-right:20px;font-size:25px;opacity:.3;font-weight:700}.listModels[_ngcontent-%COMP%]{background:#f9f9f9;display:flex;padding:10px 40px}@media (max-width:768px){.listModels[_ngcontent-%COMP%]{padding-bottom:20px;padding-left:0;padding-right:0}}.listModels[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{font-size:20px;height:auto}.listModels-button[_ngcontent-%COMP%]{margin-right:20px;width:450px!important} .listModels-menu{min-width:450px!important} .listModels-menu .mat-menu-item:hover:hover .listModels-menu-badge{background:#fff!important;color:#135f7f!important} .listModels-menu .mat-menu-item:hover:hover .listModels-menu-delete .mat-icon{color:#fff!important} .listModels-menu-badge{font-size:70%;background:#135f7f;border-radius:20px;color:#fff;padding:2px 5px;font-weight:700} .listModels-menu-delete .mat-icon{margin-right:0} .listModels-menu-selected{color:#fff!important;background:#135f7f} .listModels-menu-selected .listModels-menu-badge{background:#fff!important;color:#135f7f!important}.emptyAction[_ngcontent-%COMP%]{color:#8e3e52;font-size:14px;text-align:center}.loading[_ngcontent-%COMP%]{display:flex;height:100%;position:absolute;width:100%;background:hsla(0,0%,100%,.7294117647058823);z-index:2} .menuAction{min-width:350px!important}.menuTitle[_ngcontent-%COMP%]{display:flex;padding-left:20px;align-items:center;color:#135f7f;font-weight:700}.smallInput[_ngcontent-%COMP%]{padding:10px}.smallInput[_ngcontent-%COMP%] .mat-form-field-wrapper{padding-bottom:0}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})(),VF=(()=>{class t{constructor(t,e,i,n){this.translate=t,this.http=e,this.authService=i,this.headerService=n}canActivate(t,e){return e.url.replace(/^\/+|\/+$/g,"").split("/"),console.debug("== ROUTE LIGHT GUARD =="),console.debug(e.url),this.headerService.resetSideNavSelection(),this.authService.getLoginInformations(e.url).pipe(p(()=>null!==this.authService.getToken()&&"/login"!==e.url?this.authService.getCurrentUserInfo():Object(c.a)(!1)),Object(l.a)(()=>!0),Object(m.a)(t=>Object(c.a)(!0)))}}return t.\u0275fac=function(e){return new(e||t)(n.ac(g.e),n.ac(v.b),n.ac(_.a),n.ac(y.a))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const RF=[{path:"resources/:resId/content",canActivate:[x],component:tc},{path:"install",canActivate:[VF],loadChildren:()=>i.e(5).then(i.bind(null,"6S62")).then(t=>t.InstallerModule)},{path:"signatureBook/users/:userId/groups/:groupId/baskets/:basketId/resources/:resId",canActivate:[x],component:aI},{path:"followed",canActivate:[x],component:tP},{path:"saveNumericPackage",canActivate:[x],component:Ls},{path:"separators/print",canActivate:[x],component:eo},{path:"forgot-password",component:io},{path:"reset-password",component:oo},{path:"activate-user",component:G},{path:"password-modification",component:ht},{path:"folders/:folderId",canActivate:[x],component:GP},{path:"profile",canActivate:[x],component:aa},{path:"about-us",canActivate:[x],component:ra},{path:"home",canActivate:[x],component:Ws},{path:"basketList/users/:userSerialId/groups/:groupSerialId/baskets/:basketId",canActivate:[x],component:NV},{path:"login",canActivate:[VF],component:cc},{path:"registeredMail/acknowledgement",canActivate:[x],component:dR},{path:"search",canActivate:[x],component:gR},{path:"process/users/:userSerialId/groups/:groupSerialId/baskets/:basketId/resId/:resId",canActivate:[x],canDeactivate:[C],component:pF},{path:"resources/:detailResId",canActivate:[x],canDeactivate:[C],component:pF},{path:"indexing/:groupId",canActivate:[x],component:PF},{path:"",redirectTo:"home",pathMatch:"full"}];let jF=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[o.g.forRoot(RF,{preloadingStrategy:o.b,useHash:!0})],o.g]}),t})();var AF=i("cMWS");const WF=["snav2"],TF=["searchServiceInput"];function EF(t,e){1&t&&(n.Wb(0,"div",18),n.Rb(1,"mat-spinner",19),n.Vb())}function FF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",20),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().goToSpecifiedAdministration(i)})),n.Wb(1,"div",21),n.Rb(2,"i",22),n.Vb(),n.Wb(3,"span",23),n.Qc(4),n.Vb(),n.Qc(5),n.ic(6,"translate"),n.Vb()}if(2&t){const t=e.$implicit;n.Db(2),n.Fb(t.style),n.Db(2),n.Rc(t.count),n.Db(1),n.Sc("\xa0 ",n.jc(6,5,t.label)," ")}}function LF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",24),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().goToSpecifiedAdministration(i)})),n.ic(1,"translate"),n.Wb(2,"div",25),n.Wb(3,"span",26),n.Rb(4,"i"),n.Vb(),n.Wb(5,"span",27),n.Qc(6),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.oc("joyrideStep",t.id)("title",n.jc(1,6,t.comment)),n.Db(4),n.Gb("avatarCount2 ",t.style,""),n.Db(2),n.Sc(" ",t.label," ")}}const QF=function(t){return{width:t}};let NF=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c,l){this.translate=t,this.http=e,this.router=i,this.headerService=n,this.appService=a,this.privilegeService=s,this.latinisePipe=o,this.notify=r,this.functionService=c,this.featureTourService=l,this.loading=!1,this.shortcutsAdmin=[],this.organisationServices=[],this.productionServices=[],this.classementServices=[],this.supervisionServices=[],this.searchService=new X.i,this.administrations=[]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")),this.organisationServices=this.privilegeService.getCurrentUserAdministrationsByUnit("organisation"),this.productionServices=this.privilegeService.getCurrentUserAdministrationsByUnit("production"),this.classementServices=this.privilegeService.getCurrentUserAdministrationsByUnit("classement"),this.supervisionServices=this.privilegeService.getCurrentUserAdministrationsByUnit("supervision"),this.administrations=this.organisationServices.concat(this.productionServices).concat(this.classementServices).concat(this.supervisionServices),this.administrations=this.administrations.map(t=>Object.assign(Object.assign({},t),{label:this.translate.instant(t.label)})),this.shortcutsAdmin=this.administrations.filter(t=>["admin_users","admin_groups","manage_entities"].indexOf(t.id)>-1).map(t=>Object.assign(Object.assign({},t),{count:0})),this.getNbShortcuts(),this.filteredAdministrations=this.searchService.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>this._filter(t,"administrations"))),this.loading=!1,setTimeout(()=>{this.searchServiceInput.nativeElement.focus()},0)}ngAfterViewInit(){this.featureTourService.isComplete()||this.featureTourService.init()}goToSpecifiedAdministration(t){!0===t.angular?this.router.navigate([t.route]):window.location.assign(t.route)}_filter(t,e){if("string"==typeof t){const i=this.latinisePipe.transform(t.toLowerCase());return this[e].filter(t=>this.latinisePipe.transform(this.translate.instant(t.label).toLowerCase()).includes(i))}return this[e]}getNbShortcuts(){this.http.get("../rest/administration/details").pipe(Object(mt.a)(t=>{this.functionService.empty(t.count.users)||(this.shortcutsAdmin.filter(t=>"admin_users"===t.id)[0].count=t.count.users),this.functionService.empty(t.count.groups)||(this.shortcutsAdmin.filter(t=>"admin_groups"===t.id)[0].count=t.count.groups),this.functionService.empty(t.count.entities)||(this.shortcutsAdmin.filter(t=>"manage_entities"===t.id)[0].count=t.count.entities)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.c),n.Qb(y.a),n.Qb(w.a),n.Qb(Dt.a),n.Qb(Tt.c),n.Qb(D.a),n.Qb(_t.a),n.Qb(ss))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(WF,!0),n.Kc(TF,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.searchServiceInput=i.first))},decls:25,vars:24,consts:[[1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],["stepNumber","1","joyrideStep","firstStep","title","demoTour",1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content",2,"display","flex","flex-direction","column"],["class","loading",4,"ngIf"],[2,"display","grid","grid-template-columns","repeat(auto-fill, minmax(400px, 1fr))","gap","20px","padding","20px"],["class","countCard","matRipple","",3,"click",4,"ngFor","ngForOf"],[2,"padding","10px","font-size","10px","width","250px !important"],["matInput","",3,"formControl","placeholder"],["searchServiceInput",""],[2,"margin","20px","display","grid","grid-template-columns","repeat(auto-fill, minmax(300px, 1fr))","gap","20px","padding","20px","padding-top","0px","margin-top","0px"],["mat-button","","style","font-size:20px;height:80px;",3,"joyrideStep","title","click",4,"ngFor","ngForOf"],["position","end","autoFocus","false",1,"panel-right",2,"overflow-x","hidden",3,"fixedInViewport","opened","mode","ngStyle"],["snav2",""],[1,"loading"],[2,"margin","auto"],["matRipple","",1,"countCard",3,"click"],["mat-card-avatar","",1,"avatarCount",2,"margin-right","10px"],[2,"position","absolute"],[2,"font-size","40px"],["mat-button","",2,"font-size","20px","height","80px",3,"joyrideStep","title","click"],[2,"display","flex","align-items","center"],[2,"padding-right","10px"],[1,"countLabel",2,"white-space","initial","text-align","left"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,EF,2,0,"div",8),n.Wb(12,"div",9),n.Oc(13,FF,7,7,"mat-card",10),n.Vb(),n.Rb(14,"mat-divider"),n.Wb(15,"mat-form-field",11),n.Rb(16,"input",12,13),n.ic(18,"translate"),n.Vb(),n.Wb(19,"div",14),n.Oc(20,LF,7,8,"button",15),n.ic(21,"sortBy"),n.ic(22,"async"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Rb(23,"mat-sidenav",16,17),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(2),n.oc("ngForOf",e.shortcutsAdmin),n.Db(3),n.oc("formControl",e.searchService)("placeholder",n.jc(18,15,"lang.filterBy")),n.Db(4),n.oc("ngForOf",n.kc(21,17,n.jc(22,20,e.filteredAdministrations),"label")),n.Db(3),n.oc("fixedInViewport",e.appService.getViewMode())("opened",(e.appService.getViewMode(),!1))("mode",e.appService.getViewMode()?"over":"side")("ngStyle",n.vc(22,QF,e.appService.getViewMode()?"80%":"30%")))},directives:[I.e,I.f,Ot,za,We,P.t,P.s,T.a,Y.c,J.b,X.d,X.u,X.j,I.d,P.w,V.c,K.a,W.u,K.c,k.b],pipes:[g.d,Wt.a,P.b],styles:[".adminArea[_ngcontent-%COMP%]{display:flex;flex-flow:row wrap}.adminArea_1[_ngcontent-%COMP%]{flex:1}.adminArea_1[_ngcontent-%COMP%], .adminArea_2[_ngcontent-%COMP%], .adminArea_3[_ngcontent-%COMP%], .adminArea_4[_ngcontent-%COMP%]{overflow:hidden;padding:20px}.loading[_ngcontent-%COMP%]{display:flex;height:100%}.adminArea-label[_ngcontent-%COMP%]{font-size:20px;font-weight:bolder;opacity:.2;text-align:center}.adminArea-button[_ngcontent-%COMP%]{white-space:inherit;height:100px;line-height:20px} .autocompleteServices .mat-optgroup-label{position:-webkit-sticky;position:sticky;top:0;background:#fff;z-index:1}.countCard[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;height:100px;color:#fff;background:#135f7f;cursor:pointer}.avatarCount[_ngcontent-%COMP%]{color:#135f7f;font-size:20px;background:#fff}.avatarCount[_ngcontent-%COMP%], .avatarCount2[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:center;border-radius:40px;padding:10px}.avatarCount2[_ngcontent-%COMP%]{color:#fff;font-size:30px;background:#135f7f;width:55px!important;height:55px!important}.countLabel[_ngcontent-%COMP%]{color:#135f7f;font-size:16px}"]}),t})();function zF(t,e){1&t&&(n.Ub(0),n.Wb(1,"div",18),n.Rb(2,"mat-spinner"),n.Vb(),n.Tb())}function BF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",25),n.dc("click",(function(){return n.Dc(t),n.hc(),n.zc(1).click()}))("onFileDropped",(function(e){return n.Dc(t),n.hc(2).dndUploadFile(e)})),n.Wb(1,"div"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(2),n.Sc(" ",n.jc(3,1,"lang.dndFileCsvDesc")," "))}function UF(t,e){1&t&&(n.Wb(0,"div",26),n.Wb(1,"div",27),n.Rb(2,"mat-paginator",28,29),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.oc("length",100)("hidePageSize",!0)("pageSize",8))}function $F(t,e){if(1&t&&(n.Wb(0,"mat-option",46),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}function HF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-header-cell"),n.Rb(1,"i",38),n.ic(2,"translate"),n.Qc(3,"\xa0"),n.Wb(4,"b",39),n.ic(5,"translate"),n.Qc(6),n.Vb(),n.Qc(7," \xa0"),n.Rb(8,"i",40),n.Qc(9,"\xa0 "),n.Rb(10,"i",41),n.ic(11,"translate"),n.Qc(12,"\xa0"),n.Wb(13,"mat-form-field",42),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.ic(14,"translate"),n.Wb(15,"mat-select",43),n.dc("ngModelChange",(function(e){n.Dc(t);const i=n.hc().$implicit;return n.hc(3).associatedColmuns[i]=e}))("selectionChange",(function(e){n.Dc(t);const i=n.hc().$implicit;return n.hc(3).changeColumn(i,e.value)})),n.Rb(16,"mat-option",44),n.Oc(17,$F,2,2,"mat-option",45),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc(3);n.Db(1),n.oc("title",n.jc(2,7,"lang.dbColumn")),n.Db(3),n.oc("title",n.jc(5,9,"lang.dbColumn")),n.Db(2),n.Rc(t),n.Db(4),n.oc("title",n.jc(11,11,"lang.csvColumn")),n.Db(3),n.oc("title",n.jc(14,13,"lang.csvColumn")),n.Db(2),n.oc("ngModel",e.associatedColmuns[t]),n.Db(2),n.oc("ngForOf",e.csvColumns)}}function GF(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc().$implicit;n.Db(1),n.Sc(" ",t[i]," ")}}function XF(t,e){if(1&t&&(n.Ub(0),n.Ub(1,35),n.Oc(2,HF,18,15,"mat-header-cell",36),n.Oc(3,GF,2,1,"mat-cell",37),n.Tb(),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("matColumnDef",t)}}function qF(t,e){1&t&&n.Rb(0,"mat-header-row")}function KF(t,e){1&t&&n.Rb(0,"mat-row")}function YF(t,e){if(1&t&&(n.Wb(0,"mat-table",30,31),n.Oc(2,XF,4,1,"ng-container",32),n.Oc(3,qF,1,0,"mat-header-row",33),n.Oc(4,KF,1,0,"mat-row",34),n.Vb()),2&t){const t=n.hc(2);n.oc("dataSource",t.dataSource),n.Db(2),n.oc("ngForOf",t.userColmuns),n.Db(1),n.oc("matHeaderRowDef",t.userColmuns),n.Db(1),n.oc("matRowDefColumns",t.userColmuns)}}function JF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"input",19,20),n.dc("change",(function(e){return n.Dc(t),n.hc().uploadCsv(e)})),n.Vb(),n.Oc(2,BF,4,3,"div",21),n.Oc(3,UF,4,3,"div",22),n.Oc(4,YF,5,4,"mat-table",23),n.Rb(5,"div",24),n.ic(6,"translate"),n.Rb(7,"div",24),n.ic(8,"translate")}if(2&t){const t=n.hc();n.Db(2),n.oc("ngIf",0===t.csvData.length),n.Db(1),n.oc("ngIf",0!==t.csvData.length),n.Db(1),n.oc("ngIf",t.csvData.length>0),n.Db(1),n.oc("innerHTML",n.jc(6,5,"lang.infoImportNoIdToCreate"),n.Ec),n.Db(2),n.oc("innerHTML",n.jc(8,7,"lang.infoImportusers2"),n.Ec)}}function ZF(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",47),n.dc("click",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc();n.oc("disabled",t.loading),n.Db(1),n.Rc(n.jc(2,2,"lang.validate"))}}let tL=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c,l){this.translate=t,this.http=e,this.notify=i,this.functionsService=n,this.localStorage=a,this.headerService=s,this.dialog=o,this.dialogRef=r,this.papa=c,this.data=l,this.loading=!1,this.userColmuns=["id","user_id","firstname","lastname","mail","phone"],this.csvColumns=[],this.associatedColmuns={},this.dataSource=new vt.p(null),this.hasHeader=!0,this.csvData=[],this.userData=[],this.countAll=0,this.countAdd=0,this.countUp=0}ngOnInit(){}changeColumn(t,e){this.userData=[];for(let i=this.hasHeader?1:0;i<this.csvData.length;i++){const n=this.csvData[i];this.userData.push({id:"id"===t?n[this.csvColumns.filter(t=>t===e)[0]]:n[this.associatedColmuns.id],user_id:"user_id"===t?n[this.csvColumns.filter(t=>t===e)[0]]:n[this.associatedColmuns.user_id],firstname:"firstname"===t?n[this.csvColumns.filter(t=>t===e)[0]]:n[this.associatedColmuns.firstname],lastname:"lastname"===t?n[this.csvColumns.filter(t=>t===e)[0]]:n[this.associatedColmuns.lastname],mail:"mail"===t?n[this.csvColumns.filter(t=>t===e)[0]]:n[this.associatedColmuns.mail],phone:"phone"===t?n[this.csvColumns.filter(t=>t===e)[0]]:n[this.associatedColmuns.phone]})}this.countAdd=this.csvData.filter((t,e)=>e>0&&this.functionsService.empty(t[this.associatedColmuns.id])).length,this.countUp=this.csvData.filter((t,e)=>e>0&&!this.functionsService.empty(t[this.associatedColmuns.id])).length,setTimeout(()=>{this.dataSource=new vt.p(this.userData),this.dataSource.paginator=this.paginator},0)}uploadCsv(t){if(t.target.files&&t.target.files[0]&&("text/csv"===t.target.files[0].type||"application/vnd.ms-excel"===t.target.files[0].type)){this.loading=!0;let e=[];const i=new FileReader;i.readAsText(t.target.files[0],"ISO-8859-1"),i.onload=t=>{this.papa.parse(t.target.result,{complete:t=>{e=t.data,e=e.filter(t=>t.length===e[0].length);let i=[],n={};this.setCsvColumns(e[0]),this.countAll=this.hasHeader?e.length-1:e.length;for(let a=0;a<e.length;a++)n={},i=e[a],i.forEach((t,e)=>{n[this.csvColumns[e]]=t}),this.csvData.push(n);this.initData(),this.countAdd=this.csvData.filter((t,e)=>e>0&&this.functionsService.empty(t[this.associatedColmuns.id])).length,this.countUp=this.csvData.filter((t,e)=>e>0&&!this.functionsService.empty(t[this.associatedColmuns.id])).length,this.loading=!1}})}}else this.dialog.open(qt.a,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.notAllowedExtension")+" !",msg:this.translate.instant("lang.file")+" : <b>"+t.target.files[0].name+"</b>, "+this.translate.instant("lang.type")+" : <b>"+t.target.files[0].type+"</b><br/><br/><u>"+this.translate.instant("lang.allowedExtensions")+"</u> : <br/>text/csv"}})}setCsvColumns(t=null){this.csvColumns=t.filter(t=>this.functionsService.empty(t)).length>0?Object.keys(t).map((t,e)=>""+e):t}toggleHeader(){this.hasHeader=!this.hasHeader,this.countAll=this.hasHeader?this.csvData.length-1:this.csvData.length,this.hasHeader?(this.countAdd=this.csvData.filter((t,e)=>e>0&&this.functionsService.empty(t[this.associatedColmuns.id])).length,this.countUp=this.csvData.filter((t,e)=>e>0&&!this.functionsService.empty(t[this.associatedColmuns.id])).length):(this.countAdd=this.csvData.filter((t,e)=>this.functionsService.empty(t[this.associatedColmuns.id])).length,this.countUp=this.csvData.filter((t,e)=>!this.functionsService.empty(t[this.associatedColmuns.id])).length),this.initData()}initData(){this.userData=[];for(let t=this.hasHeader?1:0;t<this.csvData.length;t++){const e=this.csvData[t];this.associatedColmuns.id=this.csvColumns[0],this.associatedColmuns.user_id=this.csvColumns[1],this.associatedColmuns.firstname=this.csvColumns[2],this.associatedColmuns.lastname=this.csvColumns[3],this.associatedColmuns.mail=this.csvColumns[4],this.associatedColmuns.phone=this.csvColumns[5],this.userData.push({id:e[this.csvColumns[0]],user_id:e[this.csvColumns[1]],firstname:e[this.csvColumns[2]],lastname:e[this.csvColumns[3]],mail:e[this.csvColumns[4]],phone:e[this.csvColumns[5]]})}setTimeout(()=>{this.dataSource=new vt.p(this.userData),this.dataSource.paginator=this.paginator},0)}dndUploadFile(t){this.uploadCsv({target:{files:[t[0]]}})}onSubmit(){let t=null;const e=[];let i="";this.translate.get("lang.confirmImportUsers",{0:this.countAll}).subscribe(t=>{i=t+" ?<br/><br/>",i+=`<ul><li><b>${this.countAdd}</b> ${this.translate.instant("lang.additions")}</li><li><b>${this.countUp}</b> ${this.translate.instant("lang.modifications")}</li></ul>`}),t=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.import"),msg:i}}),t.afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.loading=!0,this.csvData.forEach((t,i)=>{(this.hasHeader&&i>0||!this.hasHeader)&&e.push({id:t[this.associatedColmuns.id],user_id:t[this.associatedColmuns.user_id],firstname:t[this.associatedColmuns.firstname],lastname:t[this.associatedColmuns.lastname],mail:t[this.associatedColmuns.mail],phone:t[this.associatedColmuns.phone]})})}),p(()=>this.http.put("../rest/users/import",{users:e})),Object(mt.a)(e=>{let i="";e.warnings.count>0&&(i=`<br/>${e.warnings.count} ${this.translate.instant("lang.withWarnings")} : <ul>`,e.warnings.details.forEach(t=>{i+=`<li> ${this.translate.instant("lang."+t.lang)} (${this.translate.instant("lang.line")} : ${this.hasHeader?t.index+2:t.index+1})</li>`}),i+="</ul>"),e.errors.count>0&&(i+=`<br/>${e.errors.count} ${this.translate.instant("lang.withErrors")} : <ul>`,e.errors.details.forEach(t=>{i+=`<li> ${this.translate.instant("lang."+t.lang)} (${this.translate.instant("lang.line")} : ${this.hasHeader?t.index+2:t.index+1})</li>`}),i+="</ul>"),t=this.dialog.open(qt.a,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.import"),msg:"<b>"+e.success+"</b> / <b>"+this.countAll+"</b> "+this.translate.instant("lang.importedUsers")+"."+i}})}),p(()=>t.afterClosed()),Object(mt.a)(()=>{this.dialogRef.close("success")}),Object(m.a)(t=>(this.loading=!1,this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(_t.a),n.Qb(Ut.a),n.Qb(y.a),n.Qb(q.b),n.Qb(q.h),n.Qb(Jt),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Xc(Kt.a,!0),2&t&&n.yc(i=n.ec())&&(e.paginator=i.first)},decls:37,vars:28,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],[1,"import-tool"],[2,"flex","1"],["color","primary",3,"checked","change"],[2,"flex","1","text-align","center"],["color","primary",1,"fa","fa-users"],["color","primary"],["color","primary",1,"fa","fa-user-plus"],[2,"flex","1","text-align","right"],["color","primary",1,"fa","fa-user-edit"],[4,"ngIf","ngIfElse"],["elseTemplate",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click",4,"ngIf"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loader"],["type","file","name","files[]","id","uploadFile","accept",".csv",2,"display","none",3,"change"],["uploadFile",""],["appUploadFileDragDrop","","class","dndFile",3,"click","onFileDropped",4,"ngIf"],["class","row","style","margin: 0px;",4,"ngIf"],[3,"dataSource",4,"ngIf"],[1,"alert-message","alert-message-info",2,"min-width","100%",3,"innerHTML"],["appUploadFileDragDrop","",1,"dndFile",3,"click","onFileDropped"],[1,"row",2,"margin","0px"],[1,"col-md-12"],[3,"length","hidePageSize","pageSize"],["paginator",""],[3,"dataSource"],["table",""],[4,"ngFor","ngForOf"],[4,"matHeaderRowDef"],[4,"matRowDef","matRowDefColumns"],[3,"matColumnDef"],[4,"matHeaderCellDef"],[4,"matCellDef"],["color","primary",1,"fas","fa-database",3,"title"],["color","primary",3,"title"],[1,"fas","fa-arrows-alt-h"],[1,"fas","fa-file-csv",3,"title"],[2,"width","80px !important",3,"title","click"],[3,"ngModel","ngModelChange","selectionChange"],["value",""],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"]],template:function(t,e){if(1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"div",2),n.Wb(5,"mat-toolbar",3),n.Wb(6,"span",4),n.Wb(7,"mat-slide-toggle",5),n.dc("change",(function(){return e.toggleHeader()})),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Vb(),n.Wb(10,"span",6),n.Rb(11,"i",7),n.Qc(12),n.ic(13,"translate"),n.Wb(14,"b",8),n.Qc(15),n.Vb(),n.Vb(),n.Wb(16,"span",6),n.Rb(17,"i",9),n.Qc(18),n.ic(19,"translate"),n.Wb(20,"b",8),n.Qc(21),n.Vb(),n.Vb(),n.Wb(22,"span",10),n.Rb(23,"i",11),n.Qc(24),n.ic(25,"translate"),n.Wb(26,"b",8),n.Qc(27),n.Vb(),n.Vb(),n.Vb(),n.Oc(28,zF,3,0,"ng-container",12),n.Oc(29,JF,9,9,"ng-template",null,13,n.Pc),n.Vb(),n.Rb(31,"span",14),n.Wb(32,"div",15),n.Oc(33,ZF,3,4,"button",16),n.Wb(34,"button",17),n.Qc(35),n.ic(36,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.zc(30);n.Db(2),n.Rc(n.jc(3,16,"lang.usersImport")),n.Db(3),n.Ib("hide",0===e.csvData.length||e.loading),n.Db(2),n.oc("checked",e.hasHeader),n.Db(1),n.Rc(n.jc(9,18,"lang.csvHeader")),n.Db(4),n.Sc("\xa0",n.jc(13,20,"lang.usersOfFile")," : "),n.Db(3),n.Rc(e.countAll),n.Db(3),n.Sc("\xa0",n.jc(19,22,"lang.additions")," : "),n.Db(3),n.Rc(e.countAdd),n.Db(3),n.Sc("\xa0",n.jc(25,24,"lang.modifications")," : "),n.Db(3),n.Rc(e.countUp),n.Db(1),n.oc("ngIf",e.loading)("ngIfElse",t),n.Db(5),n.oc("ngIf",e.csvData.length>0),n.Db(1),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(36,26,"lang.cancel"))}},directives:[q.i,q.f,M.a,te.a,P.t,q.c,k.b,q.d,V.c,ie,Kt.a,vt.o,P.s,vt.k,vt.n,vt.c,vt.i,vt.b,vt.h,Y.c,ee.a,X.u,X.x,W.p,vt.a,vt.j,vt.m],pipes:[g.d],styles:[".mat-dialog-content[_ngcontent-%COMP%]{display:flex;flex-direction:column}.loader[_ngcontent-%COMP%]{display:flex;height:100%;align-items:center;justify-content:center}.hide[_ngcontent-%COMP%]{display:none}.import-tool[_ngcontent-%COMP%]{font-size:14px}.dndFile[_ngcontent-%COMP%]{flex:1;display:flex;align-items:center;margin:0;justify-content:center;font-size:30px;opacity:.5!important;cursor:pointer}"]}),t})();function eL(t,e){1&t&&(n.Wb(0,"div",14),n.Rb(1,"mat-spinner"),n.Vb())}function iL(t,e){if(1&t&&(n.Wb(0,"mat-option",15),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}function nL(t,e){if(1&t&&(n.Wb(0,"mat-option",15),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}let aL=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.localStorage=s,this.headerService=o,this.loading=!1,this.loadingExport=!1,this.delimiters=[";",",","TAB"],this.formats=["csv"],this.exportModel={delimiter:";",format:"csv"}}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.setConfiguration()}))}exportData(){this.localStorage.save("exportUsersFields_"+this.headerService.user.id,JSON.stringify(this.exportModel)),this.loadingExport=!0,this.http.put("../rest/users/export",this.exportModel,{responseType:"blob"}).pipe(Object(mt.a)(t=>{if("text/html"!==t.type){const e=document.createElement("a");let i,n,a,s;e.href=window.URL.createObjectURL(t),i=new Date,n=i.getDate(),a=i.getMonth()+1,s=i.getFullYear(),n<10&&(n="0"+n),a<10&&(a="0"+a),i=n+"-"+a+"-"+s,e.setAttribute("download","export_users_maarch_"+i+"."+this.exportModel.format.toLowerCase()),document.body.appendChild(e),e.click(),this.dialogRef.close()}else alert(this.translate.instant("lang.tooMuchDatas"))}),Object(Xt.a)(()=>this.loadingExport=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}setConfiguration(){null!==this.localStorage.get("exportUsersFields_"+this.headerService.user.id)&&(this.exportModel.delimiter=JSON.parse(this.localStorage.get("exportUsersFields_"+this.headerService.user.id)).delimiter)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(Ut.a),n.Qb(y.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:31,vars:27,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loader",4,"ngIf"],[1,"row"],[1,"col-md-6"],["appearance","outline"],[3,"placeholder","ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[3,"placeholder","ngModel","disabled","ngModelChange"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"click"],["mat-raised-button","","mat-button","",3,"mat-dialog-close"],[1,"loader"],[3,"value"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"div",2),n.Oc(5,eL,2,0,"div",3),n.Wb(6,"div",4),n.Wb(7,"div",5),n.Wb(8,"mat-form-field",6),n.Wb(9,"mat-label"),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Wb(12,"mat-select",7),n.dc("ngModelChange",(function(t){return e.exportModel.format=t})),n.ic(13,"translate"),n.Oc(14,iL,2,2,"mat-option",8),n.Vb(),n.Vb(),n.Vb(),n.Wb(15,"div",5),n.Wb(16,"mat-form-field",6),n.Wb(17,"mat-label"),n.Qc(18),n.ic(19,"translate"),n.Vb(),n.Wb(20,"mat-select",9),n.dc("ngModelChange",(function(t){return e.exportModel.delimiter=t})),n.ic(21,"translate"),n.Oc(22,nL,2,2,"mat-option",8),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Rb(23,"span",10),n.Wb(24,"div",11),n.Wb(25,"button",12),n.dc("click",(function(){return e.exportData()})),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Wb(28,"button",13),n.Qc(29),n.ic(30,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,13,"lang.exportDatas")),n.Db(3),n.oc("ngIf",e.loadingExport),n.Db(5),n.Rc(n.jc(11,15,"lang.format")),n.Db(2),n.pc("placeholder",n.jc(13,17,"lang.format")),n.oc("ngModel",e.exportModel.format),n.Db(2),n.oc("ngForOf",e.formats),n.Db(4),n.Rc(n.jc(19,19,"lang.delimiter")),n.Db(2),n.pc("placeholder",n.jc(21,21,"lang.delimiter")),n.oc("ngModel",e.exportModel.delimiter)("disabled","csv"!=e.exportModel.format),n.Db(2),n.oc("ngForOf",e.delimiters),n.Db(4),n.Rc(n.jc(27,23,"lang.toExport")),n.Db(3),n.Rc(n.jc(30,25,"lang.cancel")))},directives:[q.i,q.f,P.t,Y.c,Y.g,ee.a,X.u,X.x,P.s,q.c,k.b,q.d,V.c,W.p],pipes:[g.d],styles:[".mat-dialog-container{position:relative}.mat-dialog-content[_ngcontent-%COMP%]{min-height:150px;padding-bottom:10px;overflow-x:hidden}.actions[_ngcontent-%COMP%], .loader[_ngcontent-%COMP%]{justify-content:center}.loader[_ngcontent-%COMP%]{position:absolute;display:flex;width:100%;left:0;top:0;height:100%;background:hsla(0,0%,100%,.6);z-index:1;align-items:center}"]}),t})();const sL=function(t){return[t]};function oL(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",10),n.Wb(1,"plugin-autocomplete",11),n.dc("triggerEvent",(function(i){n.Dc(t);const a=e.index;return n.hc(3).setRedirectUserListModels(a,i)})),n.ic(2,"translate"),n.ic(3,"translate"),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.pc("id",t.object_id),n.Db(1),n.oc("labelPlaceholder",n.jc(2,6,"lang.newDest")+" : "+t.title)("labelList",n.jc(3,8,"lang.availableUsers"))("routeDatas",n.vc(10,sL,"/rest/autocomplete/users?inEntity="+t.entity_id))("targetSearchKey","idToDisplay")("subInfoKey","descriptionToDisplay")}}function rL(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"h2"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"div",7),n.Wb(5,"b"),n.Qc(6),n.Vb(),n.Qc(7,"\xa0"),n.Rb(8,"span",8),n.ic(9,"translate"),n.Qc(10," : "),n.Vb(),n.Oc(11,oL,4,12,"div",9),n.Tb()),2&t){const t=n.hc(2);n.Db(2),n.Rc(n.jc(3,5,"lang.redirectUserListDiff")),n.Db(4),n.Tc("",t.data.user.firstname," ",t.data.user.lastname,""),n.Db(2),n.oc("innerHTML",n.jc(9,7,"lang.chooseNewDest"),n.Ec),n.Db(3),n.oc("ngForOf",t.userDestTemplates)}}const cL=function(){return["/rest/autocomplete/users"]};function lL(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"h2"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"div",7),n.Wb(5,"b"),n.Qc(6),n.Vb(),n.Qc(7,"\xa0"),n.Rb(8,"span",8),n.ic(9,"translate"),n.Qc(10," : "),n.Vb(),n.Wb(11,"div",10),n.Wb(12,"plugin-autocomplete",11),n.dc("triggerEvent",(function(e){return n.Dc(t),n.hc(2).setRedirectUserRes(e)})),n.ic(13,"translate"),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=n.hc(2);n.Db(2),n.Rc(n.jc(3,10,"lang.redirectUserListInstances")),n.Db(4),n.Tc("",t.data.user.firstname," ",t.data.user.lastname,""),n.Db(2),n.oc("innerHTML",n.jc(9,12,"lang.chooseNewDestUser"),n.Ec),n.Db(3),n.pc("id",t.data.user.user_id),n.Db(1),n.oc("labelPlaceholder",n.jc(13,14,"lang.newDestRes"))("labelList",n.jc(14,16,"lang.availableUsers"))("routeDatas",n.uc(18,cL))("targetSearchKey","idToDisplay")("subInfoKey","descriptionToDisplay")}}const dL=function(){return["/rest/autocomplete/users/circuit"]};function hL(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"h2"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"div",7),n.Wb(5,"b"),n.Qc(6),n.Vb(),n.Qc(7,"\xa0"),n.Rb(8,"span",8),n.ic(9,"translate"),n.Qc(10," : "),n.Vb(),n.Wb(11,"div",10),n.Wb(12,"plugin-autocomplete",11),n.dc("triggerEvent",(function(e){return n.Dc(t),n.hc(2).setRedirectUserVisaWorkflowRes(e)})),n.ic(13,"translate"),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=n.hc(2);n.Db(2),n.Rc(n.jc(3,10,"lang.redirectUserVisaWorkflow")),n.Db(4),n.Tc("",t.data.user.firstname," ",t.data.user.lastname,""),n.Db(2),n.oc("innerHTML",n.jc(9,12,"lang.chooseNewVisaUser"),n.Ec),n.Db(3),n.pc("id",t.data.user.user_id),n.Db(1),n.oc("labelPlaceholder",n.jc(13,14,"lang.newDestRes"))("labelList",n.jc(14,16,"lang.availableUsers"))("routeDatas",n.uc(18,dL))("targetSearchKey","idToDisplay")("subInfoKey","descriptionToDisplay")}}function uL(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div",7),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Tb()),2&t){const t=n.hc(2);n.Db(2),n.Uc(" ",n.jc(3,3,"lang."+t.data.user.actionMode)," ",t.data.user.firstname," ",t.data.user.lastname," ")}}function pL(t,e){if(1&t&&(n.Ub(0),n.Oc(1,rL,12,9,"ng-container",2),n.Oc(2,lL,15,19,"ng-container",2),n.Oc(3,hL,15,19,"ng-container",2),n.Oc(4,uL,4,5,"ng-container",2),n.Tb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.userDestTemplates.length>0),n.Db(1),n.oc("ngIf",t.userDestDifflists.length>0),n.Db(1),n.oc("ngIf",t.userVisaWorkflowResources.length>0),n.Db(1),n.oc("ngIf",0===t.userDestTemplates.length&&0===t.userDestDifflists.length&&0===t.userVisaWorkflowResources.length)}}function bL(t,e){if(1&t&&(n.Wb(0,"mat-list-item"),n.Wb(1,"mat-icon",16),n.Rb(2,"i",17),n.Vb(),n.Wb(3,"p",14),n.Wb(4,"span"),n.Qc(5),n.Vb(),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(5),n.Sc(" ",t," ")}}function fL(t,e){if(1&t&&(n.Wb(0,"div",13),n.Wb(1,"mat-list"),n.Wb(2,"p",14),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Oc(5,bL,6,1,"mat-list-item",15),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(3),n.Rc(n.jc(4,2,"lang.diffusionList")),n.Db(2),n.oc("ngForOf",t.userDestTemplates)}}function mL(t,e){if(1&t&&(n.Wb(0,"mat-list-item"),n.Wb(1,"mat-icon",16),n.Rb(2,"i",18),n.Vb(),n.Wb(3,"p",14),n.Wb(4,"span"),n.Qc(5),n.Vb(),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(5),n.Sc(" ",t," ")}}function gL(t,e){if(1&t&&(n.Wb(0,"div",13),n.Wb(1,"mat-list"),n.Wb(2,"p",14),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Oc(5,mL,6,1,"mat-list-item",15),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(3),n.Rc(n.jc(4,2,"lang.mailEntitiesList")),n.Db(2),n.oc("ngForOf",t.userDestDifflists)}}function vL(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div",7),n.Wb(2,"p"),n.Rb(3,"span",8),n.ic(4,"translate"),n.Wb(5,"b"),n.Qc(6),n.Vb(),n.Qc(7,"\xa0"),n.Vb(),n.Wb(8,"p"),n.Rb(9,"span",8),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Oc(11,fL,6,4,"div",12),n.Oc(12,gL,6,4,"div",12),n.Tb()),2&t){const t=n.hc();n.Db(3),n.oc("innerHTML",n.jc(4,6,"lang.userIsNotDeletable"),n.Ec),n.Db(3),n.Tc("",t.data.user.firstname," ",t.data.user.lastname,""),n.Db(3),n.oc("innerHTML",n.jc(10,8,"lang.userIsDeletableBy"),n.Ec),n.Db(2),n.oc("ngIf",t.userDestTemplates.length>0),n.Db(1),n.oc("ngIf",t.userDestDifflists.length>0)}}function _L(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",19),n.dc("click",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Qc(1),n.ic(2,"translate"),n.ic(3,"translate"),n.Vb()}if(2&t){const t=n.hc();n.oc("disabled",!t.isValid()),n.Db(1),n.Tc("",n.jc(2,3,"lang.delete")," ",n.jc(3,5,"lang.user"),"")}}function yL(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",20),n.dc("click",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Qc(1),n.ic(2,"translate"),n.ic(3,"translate"),n.Vb()}if(2&t){const t=n.hc();n.oc("disabled",!t.isValid()),n.Db(1),n.Tc("",n.jc(2,3,"lang.suspend")," ",n.jc(3,5,"lang.user"),"")}}function xL(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",21),n.dc("click",(function(){return n.Dc(t),n.hc().dialogRef.close()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.close")))}let CL=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.data=i,this.dialogRef=n,this.notify=a,this.modalTitle="lang.confirmAction",this.isDeletable=!1,this.userDestTemplates=[],this.userDestDifflists=[],this.userDestDifflistsRedirectUserId=null,this.userVisaWorkflowResources=[],this.userVisaWorkflowResourcesRedirectUserId=null}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){yield this.getActionInfo()}))}onSubmit(){return Object(r.a)(this,void 0,void 0,(function*(){this.userDestTemplates.length>0&&(yield this.updateListmodels()),this.userDestDifflists.length>0&&(yield this.updateListinstances()),this.userVisaWorkflowResources.length>0&&(yield this.updateVisaWorkflow()),"delete"===this.data.user.actionMode?yield this.deleteUser():yield this.suspendUser(),this.dialogRef.close("success")}))}getActionInfo(){return new Promise(t=>{this.http.get(`../rest/users/${this.data.user.id}/isDeletable`).pipe(Object(mt.a)(e=>{e&&e.hasOwnProperty("errors")?(this.notify.error(e.errors),this.dialogRef.close("")):(this.isDeletable=e.isDeletable,this.isDeletable?(this.userDestTemplates=e.listTemplates,this.userDestDifflists=e.listInstances,this.userVisaWorkflowResources=e.workflowListInstances):(this.modalTitle="delete"===this.data.user.actionMode?"lang.unableToDelete":"lang.unableToSuspend",this.userDestTemplates=e.listTemplateEntities,this.userDestDifflists=e.listInstanceEntities),t(!0))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}setRedirectUserListModels(t,e){this.data.user.user_id!=e.id?this.userDestTemplates[t].redirectUserId=e.id:(this.userDestTemplates[t].redirectUserId=null,this.notify.error(this.translate.instant("lang.userUnauthorized")))}setRedirectUserRes(t){this.data.user.user_id!=t.id?this.userDestDifflistsRedirectUserId=t.id:(this.userDestDifflistsRedirectUserId=null,this.notify.error(this.translate.instant("lang.userUnauthorized")))}setRedirectUserVisaWorkflowRes(t){this.data.user.user_id!=t.id?this.userVisaWorkflowResourcesRedirectUserId=t.id:(this.userVisaWorkflowResourcesRedirectUserId=null,this.notify.error(this.translate.instant("lang.userUnauthorized")))}isValid(){let t=!0;return this.userDestTemplates.length>0&&this.userDestTemplates.forEach(e=>{e.redirectUserId||(t=!1)}),this.userDestDifflists.length>0&&(this.userDestDifflistsRedirectUserId||(t=!1)),this.userVisaWorkflowResources.length>0&&(this.userVisaWorkflowResourcesRedirectUserId||(t=!1)),t}updateListmodels(){return new Promise(t=>{this.http.put("../rest/listTemplates/entityDest/itemId/"+this.data.user.id,{redirectListModels:this.userDestTemplates}).pipe(Object(mt.a)(e=>{null!=e&&e.errors?this.notify.error(e.errors):t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}updateListinstances(){return this.userDestDifflists.forEach((t,e)=>{this.userDestDifflists[e].listInstances=this.userDestDifflists[e].listInstances.map(t=>Object.assign(Object.assign({},t),{item_id:"dest"===t.item_mode&&t.item_id===this.data.user.id?this.userDestDifflistsRedirectUserId:t.item_id}))}),new Promise(t=>{this.http.put("../rest/listinstances",this.userDestDifflists).pipe(Object(mt.a)(e=>{e&&e.hasOwnProperty("errors")?this.notify.error(e.errors):t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}updateVisaWorkflow(){return this.userVisaWorkflowResources.forEach((t,e)=>{this.userVisaWorkflowResources[e].listInstances=this.userVisaWorkflowResources[e].listInstances.map(t=>Object.assign(Object.assign({},t),{item_id:null!==t.process_mode&&t.item_id===this.data.user.id?this.userVisaWorkflowResourcesRedirectUserId:t.item_id}))}),new Promise(t=>{this.http.put("../rest/circuits/visaCircuit",{resources:this.userVisaWorkflowResources}).pipe(Object(mt.a)(e=>{e&&e.hasOwnProperty("errors")?this.notify.error(e.errors):t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}deleteUser(){return new Promise(t=>{this.http.delete("../rest/users/"+this.data.user.id).pipe(Object(mt.a)(e=>{this.notify.success(this.translate.instant("lang.userDeleted")+" \xab "+this.data.user.user_id+" \xbb"),t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}suspendUser(){return new Promise(t=>{this.http.put(`../rest/users/${this.data.user.id}/suspend`,this.data.user).pipe(Object(mt.a)(e=>{this.notify.success(this.translate.instant("lang.userSuspended")),t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.a),n.Qb(q.h),n.Qb(D.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:12,vars:8,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],[4,"ngIf"],[1,"divider-modal"],["mat-raised-button","","color","warn","type","submit","class","btn btn-danger",3,"disabled","click",4,"ngIf"],["mat-raised-button","","color","primary","type","submit",3,"disabled","click",4,"ngIf"],["mat-raised-button","","color","default","type","submit",3,"click",4,"ngIf"],["role","alert",1,"alert-message","alert-message-info"],[3,"innerHTML"],["class","form-group",3,"id",4,"ngFor","ngForOf"],[1,"form-group",3,"id"],["singleMode","","required","",3,"labelPlaceholder","labelList","routeDatas","targetSearchKey","subInfoKey","triggerEvent"],["class","modal-body","class","col-md-6",4,"ngIf"],[1,"col-md-6"],["mat-line",""],[4,"ngFor","ngForOf"],["mat-list-icon",""],["color","primary",1,"fa","fa-share-alt"],["color","primary",1,"fa","fa-inbox"],["mat-raised-button","","color","warn","type","submit",1,"btn","btn-danger",3,"disabled","click"],["mat-raised-button","","color","primary","type","submit",3,"disabled","click"],["mat-raised-button","","color","default","type","submit",3,"click"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-dialog-content"),n.Oc(5,pL,5,4,"ng-container",2),n.Oc(6,vL,13,10,"ng-container",2),n.Vb(),n.Rb(7,"span",3),n.Wb(8,"mat-dialog-actions"),n.Oc(9,_L,4,7,"button",4),n.Oc(10,yL,4,7,"button",5),n.Oc(11,xL,3,3,"button",6),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,6,e.modalTitle)),n.Db(3),n.oc("ngIf",e.isDeletable),n.Db(1),n.oc("ngIf",!e.isDeletable),n.Db(3),n.oc("ngIf","delete"==e.data.user.actionMode&&e.isDeletable),n.Db(1),n.oc("ngIf","suspend"==e.data.user.actionMode&&e.isDeletable),n.Db(1),n.oc("ngIf",!e.data.isDeletable))},directives:[q.i,q.f,P.t,q.c,P.s,ii,R.a,W.l,R.d,S.a,R.c,k.b],pipes:[g.d],styles:["mat-icon[_ngcontent-%COMP%]{height:auto!important}.alert-message[_ngcontent-%COMP%]{max-width:100%}"]}),t})(),OL=(()=>{class t{constructor(t,e,i,n){this.notify=t,this.headerService=e,this.functionsService=i,this.localStorage=n,this.filters={},this.defaultFilters={admin_users:{sort:"user_id",sortDirection:"asc",page:0,field:""},admin_actions:{sort:"id",sortDirection:"asc",page:0,field:""},admin_baskets:{sort:"basket_id",sortDirection:"asc",page:0,field:""},admin_contacts_groups:{sort:"label",sortDirection:"asc",page:0,field:""},admin_listmodels:{sort:"title",sortDirection:"asc",page:0,field:""},admin_groups:{sort:"group_desc",sortDirection:"asc",page:0,field:""},admin_indexing_models:{sort:"label",sortDirection:"asc",page:0,field:""},admin_notif:{sort:"notification_id",sortDirection:"asc",page:0,field:""},admin_parameters:{sort:"id",sortDirection:"asc",page:0,field:""},admin_priorities:{sort:"label",sortDirection:"asc",page:0,field:""},admin_shippings:{sort:"label",sortDirection:"asc",page:0,field:""},admin_status:{sort:"label_status",sortDirection:"asc",page:0,field:""},admin_tag:{sort:"label",sortDirection:"asc",page:0,field:""},admin_templates:{sort:"template_label",sortDirection:"asc",page:0,field:""},admin_alfresco:{sort:"label",sortDirection:"asc",page:0,field:""},admin_contacts_list:{sort:"lastname",sortDirection:"asc",page:0,field:""},admin_regitered_mail_issuing_site:{sort:"accountNumber",sortDirection:"asc",page:0,field:""},admin_regitered_mail:{sort:"rangeNumber",sortDirection:"asc",page:0,field:""},admin_sso:{sort:"label",sortDirection:"asc",page:0,field:""}},this.searchTerm=new X.i(""),this.currentAdminId=""}setAdminId(t){this.currentAdminId=t}setDataSource(t,e,i,n,a){this.currentAdminId=t,null!==this.localStorage.get("filtersAdmin_"+this.headerService.user.id)?(this.filters=JSON.parse(this.localStorage.get("filtersAdmin_"+this.headerService.user.id)),void 0===this.filters[t]&&this.saveDefaultFilter()):this.saveDefaultFilter(),this.searchTerm=new X.i(""),this.searchTerm.valueChanges.pipe(Object(mt.a)(t=>{this.setFilter("field",t),this.saveFilter(this.filters[this.currentAdminId]),t=(t=t.trim()).toLowerCase(),setTimeout(()=>{this.dataSource.filter=t},0),this.dataSource.filterPredicate=(t,e)=>this.functionsService.filterUnSensitive(t,e,this.filterColumns)})).subscribe(),this.filterColumns=a,this.dataSource=new vt.p(e),this.dataSource.paginator=n,this.dataSource.sortingDataAccessor=this.functionsService.listSortingDataAccessor,n.pageIndex=this.getFilter("page"),this.dataSource.sort=i;const s=document.getElementsByClassName("mat-column-"+this.getFilter("sort"))[0];s.click(),"desc"===this.getFilter("sortDirection")&&s.click(),this.searchTerm.setValue(this.getFilter("field")),Object(gy.a)(i.sortChange,n.page).pipe(Object(Qe.a)({}),Object(mt.a)(()=>{this.saveFilter({sort:i.active,sortDirection:i.direction,page:n.pageIndex,field:this.getFilter("field")})}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}saveDefaultFilter(){this.saveFilter(this.defaultFilters[this.currentAdminId])}setFilter(t,e){this.filters[this.currentAdminId][t]=e}saveFilter(t){this.filters[this.currentAdminId]=t,this.localStorage.save("filtersAdmin_"+this.headerService.user.id,JSON.stringify(this.filters))}getFilterField(){return this.searchTerm}getDataSource(){return this.dataSource}getFilter(t=null){return this.functionsService.empty(this.filters[this.currentAdminId])?null:this.functionsService.empty(t)?this.functionsService.empty(this.filters[this.currentAdminId])?"":this.filters[this.currentAdminId]:this.functionsService.empty(this.filters[this.currentAdminId][t])?"":this.filters[this.currentAdminId][t]}}return t.\u0275fac=function(e){return new(e||t)(n.ac(D.a),n.ac(y.a),n.ac(_t.a),n.ac(Ut.a))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();const DL=["adminMenuTemplate"];function wL(t,e){1&t&&n.Rb(0,"mat-divider")}function ML(t,e){if(1&t&&(n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",11),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"p",19),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Wb(7,"p",19),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Wb(10,"p",19),n.Qc(11),n.ic(12,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.Rc(n.jc(3,7,"lang.quota")),n.Db(3),n.Tc("",n.jc(6,9,"lang.actives")," : ",t.quota.actives,""),n.Db(3),n.Tc("",n.jc(9,11,"lang.inactives")," : ",t.quota.inactives,""),n.Db(3),n.Tc("",n.jc(12,13,"lang.quota")," : ",t.quota.userQuota,"")}}function kL(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",11),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",12),n.Rb(5,"mat-icon",13),n.Wb(6,"p",14),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Wb(9,"a",15),n.dc("click",(function(){return n.Dc(t),n.hc().openUsersExportModal()})),n.Rb(10,"mat-icon",16),n.Wb(11,"p",14),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Wb(14,"a",15),n.dc("click",(function(){return n.Dc(t),n.hc().openUsersImportModal()})),n.Rb(15,"mat-icon",17),n.Wb(16,"p",14),n.Qc(17),n.ic(18,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Rb(19,"mat-divider"),n.Oc(20,wL,1,0,"mat-divider",18),n.Oc(21,ML,13,15,"mat-nav-list",18)}if(2&t){const t=n.hc();n.Db(2),n.Rc(n.jc(3,6,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,8,"lang.add")," "),n.Db(5),n.Sc(" ",n.jc(13,10,"lang.usersExport")," "),n.Db(5),n.Sc(" ",n.jc(18,12,"lang.usersImport")," "),n.Db(3),n.oc("ngIf",t.quota.userQuota),n.Db(1),n.oc("ngIf",t.quota.userQuota)}}function SL(t,e){1&t&&(n.Wb(0,"div",20),n.Rb(1,"mat-spinner",21),n.Vb())}function IL(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",48),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Sc("",n.jc(2,3,"lang.technicalId")," ")}}function PL(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",t.id," ")}}function VL(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",48),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Rc(n.jc(2,3,"lang.id"))}}function RL(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",t.user_id," ")}}function jL(t,e){1&t&&(n.Wb(0,"mat-header-cell",48),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.lastname")))}function AL(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.lastname," ")}}function WL(t,e){1&t&&(n.Wb(0,"mat-header-cell",48),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.firstname")))}function TL(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.firstname," ")}}function EL(t,e){1&t&&(n.Wb(0,"mat-header-cell",48),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.status")))}const FL=function(){return["SPD","ABS"]},LL=function(t,e){return{statusUserLabelWarn:t,statusUserLabelPrimary:e}};function QL(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Wb(1,"span",49),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngClass",n.wc(6,LL,n.uc(4,FL).indexOf(t.status)>-1,-1==n.uc(5,FL).indexOf(t.status))),n.Db(1),n.Rc(n.jc(3,2,"lang.user"+t.status))}}function NL(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",48),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Rc(n.jc(2,3,"lang.email"))}}function zL(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",t.mail," ")}}function BL(t,e){1&t&&n.Rb(0,"mat-header-cell")}const UL=function(){return["root_visible","root_invisible"]};function $L(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",55),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc(2);return e.stopPropagation(),a.actionUserPrompt(i,"suspend")})),n.ic(1,"translate"),n.Rb(2,"mat-icon",56),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc(2);n.pc("matTooltip",n.jc(1,2,"lang.suspend")),n.oc("disabled",t.id===e.user.id||n.uc(4,UL).indexOf(t.mode)>-1&&"standard"===e.headerService.user.mode)}}function HL(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",57),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc(2);return e.stopPropagation(),a.activateUser(i)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",58),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc(2);n.pc("matTooltip",n.jc(1,2,"lang.authorize")),n.oc("disabled",n.uc(4,UL).indexOf(t.mode)>-1&&"standard"===e.headerService.user.mode)}}function GL(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",50),n.Oc(1,$L,3,5,"button",51),n.Oc(2,HL,3,5,"button",52),n.Wb(3,"button",53),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.actionUserPrompt(a,"delete")})),n.ic(4,"translate"),n.Rb(5,"mat-icon",54),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.Db(1),n.oc("ngIf","SPD"!=t.status),n.Db(1),n.oc("ngIf","SPD"==t.status),n.Db(1),n.pc("matTooltip",n.jc(4,4,"lang.delete")),n.oc("disabled",t.id===i.user.id||n.uc(6,UL).indexOf(t.mode)>-1)}}function XL(t,e){1&t&&n.Rb(0,"mat-header-row")}function qL(t,e){if(1&t&&(n.Rb(0,"mat-row",59),n.ic(1,"translate")),2&t){const t=e.$implicit;n.Ib("admin",n.uc(6,UL).indexOf(t.mode)>-1),n.qc("routerLink","/administration/users/",t.id,""),n.pc("matTooltip",n.jc(1,4,"lang.view"))}}function KL(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",22),n.Wb(1,"div",23),n.Wb(2,"div",24),n.Wb(3,"mat-form-field"),n.Rb(4,"input",25),n.ic(5,"translate"),n.Wb(6,"mat-button-toggle",26),n.dc("click",(function(e){n.Dc(t);const i=n.hc();return e.stopPropagation(),i.toggleWebserviceAccount()})),n.ic(7,"translate"),n.Rb(8,"mat-icon",27),n.Vb(),n.Vb(),n.Vb(),n.Wb(9,"div",24),n.Rb(10,"mat-paginator",28,29),n.Vb(),n.Vb(),n.Wb(12,"mat-table",30,31),n.Ub(14,32),n.Oc(15,IL,3,5,"mat-header-cell",33),n.Oc(16,PL,2,3,"mat-cell",34),n.Tb(),n.Ub(17,35),n.Oc(18,VL,3,5,"mat-header-cell",33),n.Oc(19,RL,2,3,"mat-cell",34),n.Tb(),n.Ub(20,36),n.Oc(21,jL,3,3,"mat-header-cell",37),n.Oc(22,AL,2,1,"mat-cell",38),n.Tb(),n.Ub(23,39),n.Oc(24,WL,3,3,"mat-header-cell",37),n.Oc(25,TL,2,1,"mat-cell",38),n.Tb(),n.Ub(26,40),n.Oc(27,EL,3,3,"mat-header-cell",37),n.Oc(28,QL,4,9,"mat-cell",38),n.Tb(),n.Ub(29,41),n.Oc(30,NL,3,5,"mat-header-cell",33),n.Oc(31,zL,2,3,"mat-cell",34),n.Tb(),n.Ub(32,42),n.Oc(33,BL,1,0,"mat-header-cell",43),n.Oc(34,GL,6,7,"mat-cell",44),n.Tb(),n.Oc(35,XL,1,0,"mat-header-row",45),n.Oc(36,qL,2,7,"mat-row",46),n.Vb(),n.Wb(37,"div",47),n.Qc(38),n.ic(39,"translate"),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(4),n.pc("placeholder",n.jc(5,12,"lang.filterBy")),n.oc("formControl",t.adminService.getFilterField()),n.Db(2),n.pc("title",n.jc(7,14,"lang.displayWebserviceAccount")),n.oc("checked",t.withWebserviceAccount),n.Db(4),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.adminService.getDataSource()),n.Db(23),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns),n.Db(2),n.Tc(" ",t.data.length," ",n.jc(39,16,"lang.usersAlt"),"")}}let YL=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this.translate=t,this.http=e,this.notify=i,this.dialog=n,this.headerService=a,this.appService=s,this.functions=o,this.adminService=r,this.viewContainerRef=c,this.loading=!0,this.updateListModel=!0,this.updateListInstance=!0,this.data=[],this.config={},this.userDestRedirect={},this.userDestRedirectModels=[],this.listinstances=[],this.quota={},this.user={},this.withWebserviceAccount=!1,this.webserviceAccounts=[],this.noWebserviceAccounts=[],this.displayedColumns=["id","user_id","lastname","firstname","status","mail","actions"],this.filterColumns=["id","user_id","lastname","firstname","mail"]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.users")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.user=this.headerService.user,this.getData()}getData(){this.webserviceAccounts=[],this.noWebserviceAccounts=[],this.data=[],this.http.get("../rest/users").pipe(Object(mt.a)(t=>{this.data=t.users,this.data.forEach(t=>{t.statusLabel=this.translate.instant("lang.user"+t.status),"rest"===t.mode?this.webserviceAccounts.push(t):this.noWebserviceAccounts.push(t)}),this.data=this.noWebserviceAccounts,this.quota=t.quota,this.quota.actives>this.quota.userQuota&&this.notify.error(this.translate.instant("lang.quotaExceeded")),this.loading=!1,setTimeout(()=>{this.adminService.setDataSource("admin_users",this.data,this.sort,this.paginator,this.filterColumns)},0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}activateUser(t){confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.authorize")+" \xab "+t.user_id+" \xbb")&&(t.status="OK",this.http.put("../rest/users/"+t.id,t).subscribe(()=>{this.notify.success(this.translate.instant("lang.userAuthorized")),this.updateQuota(t,"activate")},e=>{t.status="SPD",this.notify.error(e.error.errors)}))}updateQuota(t,e){"delete"===e?this.quota.userQuota&&"OK"===t.status?this.quota.actives--:this.quota.userQuota&&"SPD"===t.status&&this.quota.inactives--:"suspend"===e?this.quota.userQuota&&(this.quota.inactives++,this.quota.actives--):"activate"===e&&this.quota.userQuota&&(this.quota.inactives--,this.quota.actives++,this.quota.actives>this.quota.userQuota&&this.notify.error(this.translate.instant("lang.quotaExceeded")))}actionUserPrompt(t,e){t.actionMode=e,this.dialogRef=this.dialog.open(CL,{panelClass:"maarch-modal",data:{user:t}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"success"===t),Object(mt.a)(i=>{if(this.updateQuota(t,e),"delete"===t.actionMode){for(const e in this.data)this.data[e].id==t.id&&this.data.splice(Number(e),1);this.adminService.setDataSource("admin_users",this.data,this.sort,this.paginator,this.filterColumns)}else t.status="SPD"})).subscribe()}toggleWebserviceAccount(){this.withWebserviceAccount=!this.withWebserviceAccount,this.data=this.withWebserviceAccount?this.webserviceAccounts:this.noWebserviceAccounts,this.adminService.setDataSource("admin_users",this.data,this.sort,this.paginator,this.filterColumns)}openUsersImportModal(){this.dialog.open(tL,{disableClose:!0,width:"99vw",maxWidth:"99vw",panelClass:"maarch-full-height-modal"}).afterClosed().pipe(Object(d.a)(t=>"success"===t),Object(mt.a)(()=>{this.getData()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}openUsersExportModal(){this.dialog.open(aL,{panelClass:"maarch-modal",width:"400px",autoFocus:!1})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a),n.Qb(OL),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(DL,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:15,vars:8,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["mat-subheader",""],["mat-list-item","","routerLink","/administration/users/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],["mat-list-item","",3,"click"],["color","primary","mat-list-icon","",1,"fas","fa-file-export"],["color","primary","mat-list-icon","",1,"fas","fa-file-import"],[4,"ngIf"],["mat-line","",2,"margin-left","20px"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"row"],[1,"col-md-6","col-xs-6"],["matInput","",3,"formControl","placeholder"],["matSuffix","",1,"webserviceAccount",3,"checked","title","click"],["fontSet","fas","fontIcon","fa-user-shield fa-2x",2,"margin-left","-2px","margin-top","-4px"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSort","","matSortDisableClear","",3,"dataSource"],["table",""],["matColumnDef","id"],["mat-sort-header","",3,"hide-for-mobile",4,"matHeaderCellDef"],[3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","user_id"],["matColumnDef","lastname"],["mat-sort-header","",4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","firstname"],["matColumnDef","status"],["matColumnDef","mail"],["matColumnDef","actions"],[4,"matHeaderCellDef"],["style","justify-content: flex-end;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"routerLink","matTooltip","admin",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["mat-sort-header",""],[1,"label",3,"ngClass"],[2,"justify-content","flex-end"],["mat-icon-button","","color","primary",3,"disabled","matTooltip","click",4,"ngIf"],["mat-icon-button","","color","accent",3,"matTooltip","disabled","click",4,"ngIf"],["mat-icon-button","","color","warn","data-toggle","modal","data-target","#changeDiffListDest",3,"disabled","matTooltip","click"],[1,"fa","fa-trash-alt","fa-2x"],["mat-icon-button","","color","primary",3,"disabled","matTooltip","click"],["aria-hidden","true",1,"fa","fa-pause","fa-2x"],["mat-icon-button","","color","accent",3,"matTooltip","disabled","click"],["aria-hidden","true",1,"fa","fa-check","fa-2x"],[2,"cursor","pointer",3,"routerLink","matTooltip"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,kL,22,14,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,SL,2,0,"div",9),n.Oc(14,KL,40,18,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,R.h,R.g,R.d,o.f,S.a,R.c,W.l,T.a,V.c,K.a,Y.c,J.b,X.d,X.u,X.j,og.a,Y.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,vt.h,Fe.b,vt.a,P.q,k.b,A.b,vt.j,vt.m,o.d],pipes:[g.d],styles:["button[_ngcontent-%COMP%]:disabled{opacity:.3!important}.statusUserLabelWarn[_ngcontent-%COMP%]{color:#8e3e52}.statusUserLabelPrimary[_ngcontent-%COMP%]{color:#135f7f}.webserviceAccount[_ngcontent-%COMP%]{color:#666;width:37px;height:37px;font-size:x-small;border-radius:18px!important}.mat-button-toggle-checked[_ngcontent-%COMP%]{background-color:#f99830!important;color:#fff}.admin[_ngcontent-%COMP%]{font-weight:700}"]}),t})();function JL(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list"),n.Wb(1,"mat-list-item"),n.Rb(2,"mat-icon",8),n.Wb(3,"h4",9),n.Qc(4),n.Vb(),n.Wb(5,"p",10),n.Qc(6),n.Vb(),n.Wb(7,"button",11),n.dc("click",(function(){return n.Dc(t),n.hc().unlinkMaarchParapheurAccount()})),n.ic(8,"translate"),n.Rb(9,"mat-icon",12),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(2),n.Lc("background-image","url("+t.externalUser.picture+")"),n.Db(2),n.Tc("",t.externalUser.firstname," ",t.externalUser.lastname,""),n.Db(2),n.Rc(t.externalUser.email),n.Db(1),n.oc("title",n.jc(8,6,"lang.unlinkAccount"))}}function ZL(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"input",13),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().externalUser.login=e})),n.ic(2,"translate"),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(1),n.pc("placeholder",n.jc(2,2,"lang.newLoginInMaarchParapheur")),n.oc("ngModel",t.externalUser.login)}}function tQ(t,e){if(1&t&&(n.Rb(0,"div",14),n.ic(1,"translate"),n.ic(2,"translate")),2&t){const t=n.hc();n.oc("innerHTML",n.jc(1,1,"lang.maarchParapheurAccountMsg")+" <b>"+t.externalUser.login+"</b> "+n.jc(2,3,"lang.maarchParapheurAccountMsg2"),n.Ec)}}const eQ=function(){return["/rest/autocomplete/maarchParapheurUsers?exludeAlreadyConnected=true"]};let iQ=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.data=i,this.dialogRef=n,this.notify=a,this.externalUser={inMaarchParapheur:!1,login:"",firstname:"",lastname:"",email:"",picture:""}}ngOnInit(){this.http.get("../rest/autocomplete/maarchParapheurUsers",{params:{search:this.data.user.mail,exludeAlreadyConnected:"true"}}).subscribe(t=>{t.length>0?(this.externalUser=t[0],this.externalUser.inMaarchParapheur=!0,this.http.get("../rest/maarchParapheur/user/"+this.externalUser.id+"/picture").subscribe(t=>{this.externalUser.picture=t.picture},t=>{this.notify.handleErrors(t)})):(this.externalUser.inMaarchParapheur=!1,this.externalUser=this.data.user,this.externalUser.login=this.data.user.user_id,this.externalUser.email=this.data.user.mail)},t=>{this.notify.handleErrors(t)})}selectUser(t){this.externalUser=t,this.externalUser.inMaarchParapheur=!0,this.http.get("../rest/maarchParapheur/user/"+this.externalUser.id+"/picture").subscribe(t=>{this.externalUser.picture=t.picture},t=>{this.notify.handleErrors(t)})}unlinkMaarchParapheurAccount(){this.externalUser.inMaarchParapheur=!1,this.externalUser=this.data.user,this.externalUser.login=this.data.user.user_id,this.externalUser.email=this.data.user.mail}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.a),n.Qb(q.h),n.Qb(D.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:18,vars:20,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["appearance","outline",3,"labelPlaceholder","routeDatas","targetSearchKey","subInfoKey","triggerEvent"],[4,"ngIf"],["class","alert-message alert-message-danger","role","alert","style","margin-top: 30px;",3,"innerHTML",4,"ngIf"],[1,"divider-modal"],["color","primary","mat-raised-button","",3,"disabled","click"],["mat-raised-button","",3,"click"],["color","primary","mat-list-icon","",1,"avatarAccount"],["mat-line",""],["mat-line","",2,"color","#666"],["mat-icon-button","","color","warn",3,"title","click"],[1,"fas","fa-unlink"],["type","text","matInput","",3,"placeholder","ngModel","ngModelChange"],["role","alert",1,"alert-message","alert-message-danger",2,"margin-top","30px",3,"innerHTML"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-dialog-content"),n.Wb(5,"plugin-autocomplete",2),n.dc("triggerEvent",(function(t){return e.selectUser(t)})),n.ic(6,"translate"),n.Vb(),n.Oc(7,JL,10,8,"mat-list",3),n.Oc(8,ZL,3,4,"mat-form-field",3),n.Oc(9,tQ,3,5,"div",4),n.Vb(),n.Rb(10,"span",5),n.Wb(11,"mat-dialog-actions"),n.Wb(12,"button",6),n.dc("click",(function(){return e.dialogRef.close(e.externalUser)})),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Wb(15,"button",7),n.dc("click",(function(){return e.dialogRef.close("")})),n.Qc(16),n.ic(17,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,11,"lang.linkAccount")),n.Db(3),n.oc("labelPlaceholder",n.jc(6,13,"lang.searchUserInMaarchParapheur"))("routeDatas",n.uc(19,eQ))("targetSearchKey","idToDisplay")("subInfoKey","email"),n.Db(2),n.oc("ngIf",e.externalUser.inMaarchParapheur),n.Db(1),n.oc("ngIf",!e.externalUser.inMaarchParapheur),n.Db(1),n.oc("ngIf",!e.externalUser.inMaarchParapheur),n.Db(3),n.oc("disabled",""===e.externalUser.login),n.Db(1),n.Rc(n.jc(14,15,"lang.validate")),n.Db(3),n.Rc(n.jc(17,17,"lang.cancel")))},directives:[q.i,q.f,ii,P.t,q.c,k.b,R.a,R.d,S.a,R.c,W.l,Y.c,J.b,X.d,X.u,X.x],pipes:[g.d],styles:[".avatarAccount[_ngcontent-%COMP%]{border:3px solid #f99830;height:45px!important;width:45px!important;background-size:cover;background-repeat:no-repeat;background-position:50%}"]}),t})();function nQ(t,e){1&t&&(n.Rb(0,"mat-hint",7),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.hotkeyInfo"),n.Ec)}function aQ(t,e){1&t&&(n.Wb(0,"div",8),n.ic(1,"translate"),n.Rb(2,"i",9),n.Qc(3,"\xa0"),n.Rb(4,"span",10),n.ic(5,"translate"),n.Vb()),2&t&&(n.oc("title",n.jc(1,2,"lang.hotkeyTitle")),n.Db(4),n.oc("innerHTML",n.jc(5,4,"lang.hotkeyMsg"),n.Ec))}function sQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-nested-tree-node"),n.Wb(1,"li"),n.Wb(2,"div",11),n.Rb(3,"button",12),n.Wb(4,"div",13),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().selectNode(i)})),n.Rb(5,"i",14),n.Qc(6),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc();n.Db(4),n.Ib("node-selected",t.state.selected)("node-disabled",t.state.disabled)("node-hide",i.searchMode&&!t.state.search)("node-highlight",i.searchMode&&t.state.search),n.Db(1),n.Fb(t.icon),n.Db(1),n.Sc("\xa0",t.text," ")}}function oQ(t,e){1&t&&(n.Wb(0,"div"),n.Sb(1,19),n.Vb())}function rQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-nested-tree-node"),n.Wb(1,"li",15),n.Wb(2,"div",11),n.Wb(3,"button",16),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc();return a.toggleNode(a.dataSource.data,{opened:!i.state.opened},[i.id])})),n.Rb(4,"mat-icon"),n.Vb(),n.Wb(5,"div",13),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().selectNode(i)})),n.Rb(6,"i",14),n.Qc(7),n.Vb(),n.Vb(),n.Wb(8,"ul",17),n.Oc(9,oQ,2,0,"div",18),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc();n.Db(1),n.Ib("fixHeight",!t.state.opened),n.Db(2),n.qc("id","button-",t.id,""),n.Eb("aria-label","toggle "+t.filename),n.Db(1),n.Gb("tree-exp far ",t.state.opened?"fa-minus-square":"fa-plus-square",""),n.Db(1),n.Ib("node-selected",t.state.selected)("node-disabled",t.state.disabled)("node-hide",i.searchMode&&!t.state.search)("node-highlight",i.searchMode&&t.state.search),n.Db(1),n.Fb(t.icon),n.Db(1),n.Sc("\xa0",t.text," "),n.Db(1),n.Ib("lastNode",t.last),n.Db(1),n.oc("ngIf",t.state.opened)}}let cQ=(()=>{class t{constructor(t,e){this.sortPipe=t,this.latinisePipe=e,this.rawData=[],this.selectionPropagation=!0,this.openState="",this.afterSelectNode=new n.o,this.afterDeselectNode=new n.o,this.holdShift=!1,this.defaultOpenedNodes=[],this.treeControl=new fy.k(t=>t.children),this.dataSource=new vy.f,this.searchMode=!1,this.searchTerm=new X.i(""),this.lastSelectedNodeIds=[],this.pendingChildOf={},this.temp={},this.hasChild=(t,e)=>!!e.children&&e.children.length>0}onKeydownHandler(t){this.selectionPropagation&&(this.holdShift=!0)}onKeyupHandler(t){this.holdShift=!1}ngOnInit(){this.rawData.length>0&&this.initData()}initData(t=this.rawData){let e,n;this.rawData=t,"all"!==this.openState&&this.setDefaultOpened(),this.rawData=t.map(t=>Object.assign(Object.assign({},t),{parent_id:"#"===t.parent_id||""===t.parent_id?null:t.parent_id,state:void 0!==t.state?{selected:t.state.selected,opened:t.state.opened||this.defaultOpenedNodes.indexOf(t.id)>-1||"all"===this.openState,disabled:t.state.disabled}:{selected:!1,opened:this.defaultOpenedNodes.indexOf(t.id)>-1||"all"===this.openState,disabled:!1}})),this.rawData=this.sortPipe.transform(this.rawData,"text"),e=i("g9mw"),n=new e({id:"id",parent:"parent_id",children:"children",options:{deleteParent:!1}});let a=n.convert(this.rawData);a=a.children,this.initLastNodes(a),this.dataSource.data=a,this.treeControl.dataNodes=a,this.searchTerm.valueChanges.pipe(Object(pt.a)(300),Object(mt.a)(t=>{t=(t=t.trim()).toLowerCase(),this.searchNode(this.dataSource.data,t)})).subscribe()}setDefaultOpened(){this.rawData.filter(t=>void 0!==t.state&&t.state.opened).forEach(t=>{this.defaultOpenedNodes=this.defaultOpenedNodes.concat(this.getParents([t]))}),this.defaultOpenedNodes=this.defaultOpenedNodes.map(t=>t.id)}getData(t){return this.rawData.filter(e=>e.id===t)[0]}getIteration(t){return Array(t).fill(0).map((t,e)=>e)}selectNode(t){t.state.disabled||(this.searchMode&&(this.searchMode=!1,this.searchTerm.setValue("")),this.lastSelectedNodeIds=[],this.holdShift?this.toggleNode(this.dataSource.data,{selected:!t.state.selected,opened:!0},[t.id]):(t.state.selected=!t.state.selected,this.lastSelectedNodeIds=[t]),t.state.selected?this.afterSelectNode.emit(this.lastSelectedNodeIds):this.afterDeselectNode.emit(this.lastSelectedNodeIds))}toggleNode(t,e,i){Array.isArray(t)?t.forEach(t=>{(i.indexOf(t.id)>-1||this.holdShift&&i.indexOf(t.parent_id)>-1)&&Object.keys(e).forEach(i=>{t.state.disabled&&"opened"===i?t.state[i]=e[i]:t.state.disabled||(t.state[i]=e[i],"selected"===i&&this.lastSelectedNodeIds.push(t))}),this.holdShift&&i.indexOf(t.parent_id)>-1&&i.push(t.id),this.toggleNode(t,e,i)}):t instanceof Object&&(t.children||[]).forEach(t=>{(i.indexOf(t.id)>-1||this.holdShift&&i.indexOf(t.parent_id)>-1)&&Object.keys(e).forEach(i=>{t.state.disabled&&"opened"===i?t.state[i]=e[i]:t.state.disabled||(t.state[i]=e[i],"selected"===i&&this.lastSelectedNodeIds.push(t))}),this.holdShift&&i.indexOf(t.parent_id)>-1&&i.push(t.id),this.toggleNode(t,e,i)})}getParents(t){const e=this.rawData.filter(e=>e.id===t[t.length-1].parent_id);return e.length>0?(t.push(e[0]),this.getParents(t)):t}searchNode(t,e){this.searchMode=""!==e,Array.isArray(t)?t.forEach(t=>{t.state.opened=!0,this.latinisePipe.transform(t.text.toLowerCase()).indexOf(this.latinisePipe.transform(e))>-1?t.state.search=!0:""===e?delete t.state.search:t.state.search=!1,this.searchNode(t,e)}):t instanceof Object&&(t.children||[]).forEach(t=>{t.state.opened=!0,this.latinisePipe.transform(t.text.toLowerCase()).indexOf(this.latinisePipe.transform(e))>-1?t.state.search=!0:""===e?delete t.state.search:t.state.search=!1,this.searchNode(t,e)})}initLastNodes(t){Array.isArray(t)?t.forEach((e,i)=>{i===t.length-1&&(e.last=!0),this.initLastNodes(e)}):t instanceof Object&&(t.children||[]).forEach((e,i)=>{i===t.children.length-1&&(e.last=!0),this.initLastNodes(e)})}getSelectedNodes(){return this.rawData.filter(t=>t.state.selected)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(Wt.a),n.Qb(Tt.c))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-maarch-flat-tree"]],hostBindings:function(t,e){1&t&&n.dc("keydown.Shift",(function(t){return e.onKeydownHandler(t)}),!1,n.Bc)("keyup.Shift",(function(t){return e.onKeyupHandler(t)}),!1,n.Bc)},inputs:{rawData:"rawData",selectionPropagation:"selectionPropagation",openState:"openState"},outputs:{afterSelectNode:"afterSelectNode",afterDeselectNode:"afterDeselectNode"},features:[n.Cb([Wt.a])],decls:9,vars:9,consts:[["matInput","","type","text",3,"formControl","placeholder"],["align","end",3,"innerHTML",4,"ngIf"],[2,"position","relative","padding-top","20px"],["class","msgHotkey",3,"title",4,"ngIf"],[3,"dataSource","treeControl"],[4,"matTreeNodeDef"],[4,"matTreeNodeDef","matTreeNodeDefWhen"],["align","end",3,"innerHTML"],[1,"msgHotkey",3,"title"],[1,"fas","fa-keyboard"],[3,"innerHTML"],[1,"mat-tree-node"],["mat-icon-button","","matTreeNodeToggle","","disabled","",2,"position","absolute","left","-35px"],[1,"node-content",3,"click"],[2,"width","24px","text-align","center"],[1,"example-tree-container"],["mat-icon-button","",2,"position","absolute","left","-35px",3,"id","click"],[1,"example-tree-nested-node"],[4,"ngIf"],["matTreeNodeOutlet",""]],template:function(t,e){1&t&&(n.Wb(0,"mat-form-field"),n.Rb(1,"input",0),n.ic(2,"translate"),n.Oc(3,nQ,2,3,"mat-hint",1),n.Vb(),n.Wb(4,"div",2),n.Oc(5,aQ,6,6,"div",3),n.Wb(6,"mat-tree",4),n.Oc(7,sQ,7,11,"mat-nested-tree-node",5),n.Oc(8,rQ,10,21,"mat-nested-tree-node",6),n.Vb(),n.Vb()),2&t&&(n.Db(1),n.pc("placeholder",n.jc(2,7,"lang.searchEntities")),n.oc("formControl",e.searchTerm),n.Db(2),n.oc("ngIf",e.selectionPropagation),n.Db(2),n.oc("ngIf",e.holdShift),n.Db(1),n.oc("dataSource",e.dataSource)("treeControl",e.treeControl),n.Db(2),n.oc("matTreeNodeDefWhen",e.hasChild))},directives:[Y.c,J.b,X.d,X.u,X.j,P.t,vy.b,vy.h,Y.f,vy.a,k.b,vy.k,S.a,vy.i],pipes:[g.d],styles:[".example-tree-progress-bar[_ngcontent-%COMP%]{margin-left:30px}.example-tree-nested-node[_ngcontent-%COMP%]{padding-left:30px}mat-tree[_ngcontent-%COMP%]{margin-left:10px}.mat-tree-node[_ngcontent-%COMP%]{font-family:Titillium Web,sans-serif,Arial;min-height:32px;line-height:32px;min-width:32px;height:32px;padding:0;background-color:#fff;white-space:pre}.mat-nested-tree-node[_ngcontent-%COMP%]{top:-24px}li[_ngcontent-%COMP%], ul[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0}li.example-tree-container[_ngcontent-%COMP%]{border-bottom:0}ul[_ngcontent-%COMP%]{padding-left:40px}li[_ngcontent-%COMP%]{padding-left:15px;border:1px dotted grey;border-width:0 0 1px 1px;position:relative;top:-24px}li.mat-tree-node[_ngcontent-%COMP%], li[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:0;position:relative;top:17px}li[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{padding-top:15px;border-top:1px dotted grey;margin-left:-15px;padding-left:27px}.lastNode[_ngcontent-%COMP%]{border-left:1px solid #fff;margin-left:-16px!important}.mat-icon-button[_ngcontent-%COMP%]{z-index:100}.fixHeight[_ngcontent-%COMP%]{height:33px}.node-content[_ngcontent-%COMP%]{height:24px;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;border-radius:5px;display:flex;align-items:center;margin-top:-35px!important;z-index:2}.node-content[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#666;color:#135f7f}.node-content[_ngcontent-%COMP%]:not(.node-selected):not(.node-disabled):hover{background-color:hsla(0,0%,40%,.10980392156862745)!important;transition:all .3s}.node-selected[_ngcontent-%COMP%]{background-color:#1a80ab;color:#fff;transition:all .3s}.node-selected[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fff}.node-disabled[_ngcontent-%COMP%]{opacity:.5;cursor:not-allowed}.node-hide[_ngcontent-%COMP%]{opacity:.5}.node-highlight[_ngcontent-%COMP%]{font-weight:700;color:#135f7f}.tree-exp[_ngcontent-%COMP%]:before{background:#fff}.msgHotkey[_ngcontent-%COMP%]{position:absolute;background:rgba(0,0,0,.5882352941176471);color:#fff;z-index:3;padding:5px;border-radius:5px;font-size:10px;top:0;right:0}"]}),t})();const lQ=["snav2"],dQ=["adminMenuTemplate"],hQ=["maarchTree"];function uQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"a",18),n.dc("click",(function(){return n.Dc(t),n.hc(3).activateAbsence()})),n.Rb(1,"mat-icon",19),n.Wb(2,"p",20),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(3),n.Sc(" ",n.jc(4,1,"lang.activateAbsence")," "))}function pQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"a",18),n.dc("click",(function(){return n.Dc(t),n.hc(3).desactivateAbsence()})),n.Rb(1,"mat-icon",21),n.Wb(2,"p",20),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(3),n.Sc(" ",n.jc(4,1,"lang.desactivateAbsence")," "))}function bQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"a",18),n.dc("click",(function(){return n.Dc(t),n.hc(3).resendActivationNotification()})),n.Rb(1,"mat-icon",22),n.Wb(2,"p",20),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(3),n.Sc(" ",n.jc(4,1,"lang.sendActivationNotification")," "))}function fQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"a",18),n.dc("click",(function(){return n.Dc(t),n.hc(3).changePasswd()})),n.Rb(1,"mat-icon",23),n.Wb(2,"p",20),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(3),n.Sc(" ",n.jc(4,1,"lang.changePassword")," "))}function mQ(t,e){1&t&&(n.Wb(0,"p",27),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.maarchParapheurLinkbroken")," "))}function gQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"a",24),n.dc("click",(function(){return n.Dc(t),n.hc(3).linkMaarchParapheurAccount()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",25),n.Wb(3,"p",20),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Oc(6,mQ,3,3,"p",26),n.Vb()}if(2&t){const t=n.hc(3);n.pc("title",n.jc(1,3,"lang.createUserInMaarchParapheur")),n.Db(4),n.Sc(" ",n.jc(5,5,"lang.linkAccount")," "),n.Db(2),n.oc("ngIf",!t.maarchParapheurConnectionStatus)}}function vQ(t,e){if(1&t&&(n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",13),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Oc(4,uQ,5,3,"a",16),n.Oc(5,pQ,5,3,"a",16),n.Oc(6,bQ,5,3,"a",16),n.Oc(7,fQ,5,3,"a",16),n.Oc(8,gQ,7,7,"a",17),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.Rc(n.jc(3,6,"lang.actions")),n.Db(2),n.oc("ngIf","ABS"!=t.user.status),n.Db(1),n.oc("ngIf","ABS"==t.user.status),n.Db(1),n.oc("ngIf",t.user.canSendActivationNotification),n.Db(1),n.oc("ngIf",t.user.canModifyPassword),n.Db(1),n.oc("ngIf",t.user.canCreateMaarchParapheurUser||""===t.maarchParapheurLink.login)}}function _Q(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list"),n.Wb(1,"h3",13),n.Qc(2,"Compte Maarch Parapheur"),n.Vb(),n.Wb(3,"mat-list-item"),n.Rb(4,"mat-icon",28),n.Wb(5,"p",29),n.Wb(6,"span"),n.Qc(7),n.Vb(),n.Wb(8,"button",30),n.dc("click",(function(){return n.Dc(t),n.hc(2).unlinkMaarchParapheurAccount()})),n.ic(9,"translate"),n.Rb(10,"mat-icon",31),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(4),n.Lc("background-image","url("+t.maarchParapheurLink.picture+")"),n.Db(3),n.Sc(" ",t.maarchParapheurLink.login," "),n.Db(1),n.pc("title",n.jc(9,4,"lang.unlinkAccount"))}}function yQ(t,e){if(1&t&&(n.Oc(0,vQ,9,8,"mat-nav-list",15),n.Rb(1,"mat-divider"),n.Oc(2,_Q,11,6,"mat-list",15)),2&t){const t=n.hc();n.oc("ngIf",!t.creationMode&&!t.loading),n.Db(2),n.oc("ngIf",""!==t.maarchParapheurLink.login)}}function xQ(t,e){1&t&&(n.Wb(0,"div",32),n.Rb(1,"mat-spinner",33),n.Vb())}function CQ(t,e){1&t&&(n.Wb(0,"mat-error"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.requiredField"),""))}function OQ(t,e){1&t&&(n.Wb(0,"mat-hint"),n.Rb(1,"i",58),n.Wb(2,"span",59),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Rc(n.jc(4,1,"lang.passwordValid")))}function DQ(t,e){1&t&&(n.Wb(0,"mat-hint"),n.Rb(1,"i",58),n.Wb(2,"span",59),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Rc(n.jc(4,1,"lang.passwordMatch")))}function wQ(t,e){if(1&t&&(n.Wb(0,"div",44),n.Wb(1,"div",60),n.Rb(2,"div",61),n.Vb(),n.Vb()),2&t){const t=n.hc(3);n.Db(2),n.oc("innerHTML",t.otherRuleText,n.Ec)}}const MQ=function(t){return[t]};function kQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",42),n.Wb(1,"form",43),n.Wb(2,"div",44),n.Wb(3,"mat-form-field",45),n.Rb(4,"input",46),n.ic(5,"translate"),n.Wb(6,"mat-icon",47),n.dc("click",(function(){n.Dc(t);const e=n.hc(2);return e.hidePassword=!e.hidePassword})),n.Vb(),n.Oc(7,CQ,3,3,"mat-error",15),n.Vb(),n.Vb(),n.Wb(8,"div",44),n.Wb(9,"div",48),n.Qc(10),n.Vb(),n.Wb(11,"div",49),n.Wb(12,"mat-form-field",45),n.Rb(13,"input",50,51),n.ic(15,"translate"),n.Wb(16,"mat-icon",47),n.dc("click",(function(){n.Dc(t);const e=n.hc(2);return e.hidePassword=!e.hidePassword})),n.Vb(),n.Oc(17,OQ,5,3,"mat-hint",15),n.Wb(18,"mat-error"),n.Qc(19),n.Vb(),n.Vb(),n.Vb(),n.Wb(20,"div",49),n.Wb(21,"mat-form-field",45),n.Rb(22,"input",52,53),n.ic(24,"translate"),n.Wb(25,"mat-icon",47),n.dc("click",(function(){n.Dc(t);const e=n.hc(2);return e.hidePassword=!e.hidePassword})),n.Vb(),n.Oc(26,DQ,5,3,"mat-hint",15),n.Wb(27,"mat-error"),n.Qc(28),n.ic(29,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Oc(30,wQ,3,1,"div",54),n.Wb(31,"div",44),n.Wb(32,"div",55),n.Wb(33,"button",56),n.dc("click",(function(){return n.Dc(t),n.hc(2).updatePassword()})),n.Qc(34),n.ic(35,"translate"),n.Vb(),n.Wb(36,"button",57),n.dc("click",(function(){return n.Dc(t),n.hc(2).showPassword=!1})),n.Qc(37),n.ic(38,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.oc("formGroup",t.firstFormGroup),n.Db(3),n.pc("placeholder",n.jc(5,20,"lang.typeCurrentPassword")),n.oc("type",t.hidePassword?"password":"text"),n.Db(2),n.oc("ngClass",n.vc(32,MQ,t.hidePassword?"fa-eye-slash":"fa-eye")),n.Db(1),n.oc("ngIf",t.firstFormGroup.controls.currentPasswordCtrl.hasError("required")),n.Db(3),n.Sc(" ",t.ruleText,""),n.Db(3),n.pc("placeholder",n.jc(15,22,"lang.typeNewPassword")),n.oc("type",t.hidePassword?"password":"text"),n.Db(3),n.oc("ngClass",n.vc(34,MQ,t.hidePassword?"fa-eye-slash":"fa-eye")),n.Db(1),n.oc("ngIf",t.validPassword),n.Db(2),n.Rc(t.getErrorMessage()),n.Db(3),n.pc("placeholder",n.jc(24,24,"lang.retypeNewPassword")),n.oc("type",t.hidePassword?"password":"text"),n.Db(3),n.oc("ngClass",n.vc(36,MQ,t.hidePassword?"fa-eye-slash":"fa-eye")),n.Db(1),n.oc("ngIf",!t.firstFormGroup.controls.retypePasswordCtrl.hasError("mismatch")&&""!=t.firstFormGroup.controls.retypePasswordCtrl.value),n.Db(2),n.Sc("",n.jc(29,26,"lang.passwordNotMatch")," !"),n.Db(2),n.oc("ngIf",t.passwordRules.renewal.enabled||t.passwordRules.historyLastUse.enabled),n.Db(3),n.oc("disabled",!t.firstFormGroup.valid),n.Db(1),n.Rc(n.jc(35,28,"lang.update")),n.Db(3),n.Rc(n.jc(38,30,"lang.cancel"))}}function SQ(t,e){if(1&t&&(n.Wb(0,"div",62),n.Qc(1),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Sc(" ",t.user.status,"")}}function IQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"input",84),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(3).user.userId=e}))("keyup",(function(){return n.Dc(t),n.hc(3).setLowerUserId()})),n.ic(1,"translate"),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(3);n.pc("title",n.jc(1,3,"lang.id")),n.pc("placeholder",n.jc(2,5,"lang.id")),n.oc("ngModel",t.user.userId)}}function PQ(t,e){if(1&t&&(n.Rb(0,"input",85),n.ic(1,"translate"),n.ic(2,"translate")),2&t){const t=n.hc(3);n.pc("title",n.jc(1,3,"lang.id")),n.pc("value",t.user.user_id),n.pc("placeholder",n.jc(2,5,"lang.id"))}}const VQ=function(){return["root_visible","root_invisible"]};function RQ(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-option",86),n.ic(2,"translate"),n.Qc(3),n.Vb(),n.Tb()),2&t){const t=e.$implicit,i=n.hc(3);n.Db(1),n.oc("value",t.id)("disabled","standard"===i.headerService.user.mode&&n.uc(6,VQ).indexOf(t.id)>-1)("title","standard"===i.headerService.user.mode&&n.uc(7,VQ).indexOf(t.id)>-1?n.jc(2,4,"lang.mustSuperadmin"):""),n.Db(2),n.Sc(" ",t.label," ")}}function jQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div"),n.Wb(1,"mat-form-field"),n.Wb(2,"mat-label"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"textarea",87),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(3).user.authorizedApi=e})),n.Vb(),n.Wb(6,"mat-hint"),n.Qc(7),n.ic(8,"translate"),n.Wb(9,"a",88),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(3);n.Db(3),n.Rc(n.jc(4,5,"lang.authorizedRoutes")),n.Db(2),n.oc("ngModel",t.user.authorizedApi),n.Db(2),n.Sc("",n.jc(8,7,"lang.authorizedRoutesInformations")," "),n.Db(2),n.qc("href","https://docs.maarch.org/gitbook/html/MaarchCourrier/",t.appVersion,"/guat/guat_architecture/API_REST/home.html",n.Gc),n.Db(1),n.Rc(n.jc(11,9,"lang.here"))}}function AQ(t,e){if(1&t&&(n.Wb(0,"button",89),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){n.hc();const t=n.zc(1);n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(2,2,"lang.save"))}}function WQ(t,e){if(1&t&&(n.Wb(0,"button",89),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){n.hc();const t=n.zc(1);n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(2,2,"lang.update"))}}function TQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"form",63,64),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc(2).onSubmit()})),n.Wb(2,"div",44),n.Wb(3,"div",65),n.Wb(4,"div",66),n.Wb(5,"div",67),n.Rb(6,"i",68),n.Vb(),n.Vb(),n.Wb(7,"div",69),n.Wb(8,"mat-form-field"),n.Oc(9,IQ,3,7,"input",70),n.Oc(10,PQ,3,7,"input",71),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(11,"div",44),n.Wb(12,"div",72),n.Wb(13,"mat-form-field"),n.Wb(14,"input",73),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).user.lastname=e})),n.ic(15,"translate"),n.ic(16,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(17,"div",72),n.Wb(18,"mat-form-field"),n.Wb(19,"input",74),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).user.firstname=e})),n.ic(20,"translate"),n.ic(21,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(22,"div",75),n.Wb(23,"mat-form-field"),n.Wb(24,"input",76),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).user.initials=e})),n.ic(25,"translate"),n.ic(26,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(27,"div",44),n.Wb(28,"div",65),n.Wb(29,"mat-form-field"),n.Wb(30,"input",77),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).user.phone=e})),n.ic(31,"translate"),n.ic(32,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(33,"div",44),n.Wb(34,"div",65),n.Wb(35,"mat-form-field"),n.Wb(36,"input",78),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).user.mail=e})),n.ic(37,"translate"),n.ic(38,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(39,"mat-accordion"),n.Wb(40,"mat-expansion-panel",79),n.Wb(41,"mat-expansion-panel-header"),n.Wb(42,"mat-panel-title",80),n.Qc(43),n.ic(44,"translate"),n.Vb(),n.Vb(),n.Wb(45,"div"),n.Wb(46,"mat-form-field"),n.Wb(47,"mat-label"),n.Qc(48),n.ic(49,"translate"),n.Vb(),n.Wb(50,"mat-select",81),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).user.mode=e})),n.Oc(51,RQ,4,8,"ng-container",14),n.ic(52,"sortBy"),n.Vb(),n.Vb(),n.Vb(),n.Oc(53,jQ,12,11,"div",15),n.Vb(),n.Vb(),n.Wb(54,"div",82),n.Wb(55,"div",55),n.Oc(56,AQ,3,4,"button",83),n.Oc(57,WQ,3,4,"button",83),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(9),n.oc("ngIf",t.creationMode),n.Db(1),n.oc("ngIf",!t.creationMode),n.Db(4),n.pc("title",n.jc(15,27,"lang.lastname")),n.pc("placeholder",n.jc(16,29,"lang.lastname")),n.oc("ngModel",t.user.lastname),n.Db(5),n.pc("title",n.jc(20,31,"lang.firstname")),n.pc("placeholder",n.jc(21,33,"lang.firstname")),n.oc("ngModel",t.user.firstname),n.Db(5),n.pc("title",n.jc(25,35,"lang.initials")),n.pc("placeholder",n.jc(26,37,"lang.initials")),n.oc("ngModel",t.user.initials),n.Db(6),n.pc("title",n.jc(31,39,"lang.phoneNumber")),n.pc("placeholder",n.jc(32,41,"lang.phoneNumber")),n.oc("ngModel",t.user.phone)("disabled",t.creationMode&&!t.canManagePersonalDatas||!t.creationMode&&(!t.canManagePersonalDatas||!t.canViewPersonalDatas)),n.Db(6),n.pc("title",n.jc(37,43,"lang.email")),n.pc("placeholder",n.jc(38,45,"lang.email")),n.oc("ngModel",t.user.mail),n.Db(4),n.oc("expanded",t.creationMode),n.Db(3),n.Sc(" ",n.jc(44,47,"lang.otherInformations")," "),n.Db(5),n.Rc(n.jc(49,49,"lang.accountType")),n.Db(2),n.oc("ngModel",t.user.mode)("disabled","standard"===t.headerService.user.mode&&n.uc(54,VQ).indexOf(t.user.mode)>-1),n.Db(1),n.oc("ngForOf",n.kc(52,51,t.adminModes,"label")),n.Db(2),n.oc("ngIf","rest"===t.user.mode),n.Db(3),n.oc("ngIf",t.creationMode),n.Db(1),n.oc("ngIf",!t.creationMode)}}function EQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item",91),n.Wb(1,"mat-slide-toggle",92),n.dc("change",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).toggleGroup(i)})),n.Qc(2),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.pc("id",t.group_id),n.oc("checked",1==t.checked)("disabled",!t.enabled),n.Db(1),n.Sc(" ",t.group_desc,"")}}function FQ(t,e){if(1&t&&(n.Wb(0,"mat-tab",36),n.ic(1,"translate"),n.Wb(2,"mat-nav-list"),n.Oc(3,EQ,3,4,"mat-list-item",90),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.pc("label",n.jc(1,2,"lang.groups")),n.Db(3),n.oc("ngForOf",t.user.allGroups)}}function LQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab",36),n.ic(1,"translate"),n.Wb(2,"app-maarch-flat-tree",93,94),n.dc("afterSelectNode",(function(e){return n.Dc(t),n.hc(2).addEntity(e)}))("afterDeselectNode",(function(e){return n.Dc(t),n.hc(2).deleteEntity(e)})),n.Vb(),n.Vb()}2&t&&(n.pc("label",n.jc(1,3,"lang.entities")),n.Db(2),n.oc("selectionPropagation",!1)("openState","all"))}function QQ(t,e){1&t&&(n.Wb(0,"p",100),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.selectAll")," "))}const NQ=function(){return["/rest/autocomplete/users"]},zQ=function(){return["no-margin"]};function BQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"p",101),n.Wb(1,"button",102),n.ic(2,"translate"),n.Rb(3,"mat-icon",103),n.Rb(4,"mat-divider",104),n.Vb(),n.Wb(5,"button",105),n.dc("click",(function(){return n.Dc(t),n.hc(3).toggleBasket(!1)})),n.ic(6,"translate"),n.Rb(7,"mat-icon",106),n.Vb(),n.Wb(8,"button",107),n.dc("click",(function(){return n.Dc(t),n.hc(3).toggleBasket(!0)})),n.ic(9,"translate"),n.Rb(10,"mat-icon",108),n.Vb(),n.Wb(11,"mat-menu",109,110),n.Wb(13,"plugin-autocomplete",111),n.dc("triggerEvent",(function(e){return n.Dc(t),n.hc(3).addBasketRedirection(e)})),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(12),e=n.hc(3);n.Db(1),n.pc("matTooltip",n.jc(2,11,"lang.redirectBaskets")),n.oc("matMenuTriggerFor",t),n.Db(3),n.oc("vertical",!0),n.Db(1),n.pc("matTooltip",n.jc(6,13,"lang.disableBasket")),n.Db(3),n.pc("matTooltip",n.jc(9,15,"lang.enableBasket")),n.Db(5),n.oc("labelPlaceholder",n.jc(14,17,"lang.redirectBaskets"))("routeDatas",n.uc(19,NQ))("targetSearchKey","idToDisplay")("subInfoKey","descriptionToDisplay")("disableItems",n.vc(20,MQ,e.user.id))("styles",n.uc(22,zQ))}}function UQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-icon",96),n.Wb(1,"mat-checkbox",118),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("change",(function(e){n.Dc(t);const i=n.hc(2).$implicit,a=n.hc(3);return e?a.selectionBaskets.toggle(i):null})),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2).$implicit,e=n.hc(3);n.Db(1),n.oc("checked",e.selectionBaskets.isSelected(t))}}const $Q=function(t){return{opacity:t}};function HQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item",113),n.Oc(1,UQ,2,1,"mat-icon",114),n.Wb(2,"h4",115),n.Wb(3,"span",116),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(3).selectionBaskets.toggle(e)})),n.Qc(4),n.Wb(5,"span",117),n.Qc(6),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",t.enabled),n.Db(2),n.rc("matTooltip","",t.basket_name," [",t.group_desc,"]"),n.oc("ngStyle",n.vc(6,$Q,t.allowed?"1":"0.5")),n.Db(1),n.Sc(" ",t.basket_name," "),n.Db(2),n.Rc(t.group_desc)}}function GQ(t,e){if(1&t&&(n.Ub(0),n.Oc(1,HQ,7,8,"mat-list-item",112),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",null==t.userToDisplay)}}function XQ(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"mat-list-item"),n.Rb(2,"mat-icon",119),n.Wb(3,"h4",120),n.Qc(4),n.Wb(5,"span",117),n.Qc(6),n.Vb(),n.Vb(),n.Wb(7,"p",20),n.Wb(8,"mat-form-field"),n.Rb(9,"input",121),n.ic(10,"translate"),n.Wb(11,"button",122),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=e.index;return n.hc(3).delBasketRedirection(i,a)})),n.ic(12,"translate"),n.Rb(13,"mat-icon",123),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=e.$implicit;n.Db(4),n.Sc("",t.basket_name," "),n.Db(2),n.Rc(t.group_desc),n.Db(3),n.rc("value","",n.jc(10,5,"lang.redirectedTo")," ",t.userToDisplay,""),n.Db(2),n.pc("matTooltip",n.jc(12,7,"lang.deleteRedirection"))}}function qQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"plugin-autocomplete",127),n.dc("triggerEvent",(function(e){n.Dc(t);const i=n.hc(),a=i.$implicit,s=i.index;return n.hc(3).reassignBasketRedirection(e,a,s)})),n.ic(1,"translate"),n.Vb()}2&t&&n.oc("labelPlaceholder",n.jc(1,4,"lang.redirectBaskets"))("routeDatas",n.uc(6,NQ))("targetSearchKey","idToDisplay")("subInfoKey","descriptionToDisplay")}function KQ(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"mat-list-item"),n.Rb(2,"mat-icon",124),n.Wb(3,"h4",120),n.Qc(4),n.Wb(5,"span",117),n.Qc(6),n.Vb(),n.Vb(),n.Wb(7,"p",20),n.Oc(8,qQ,2,7,"plugin-autocomplete",125),n.Wb(9,"mat-form-field"),n.Rb(10,"input",121),n.ic(11,"translate"),n.Wb(12,"button",122),n.dc("click",(function(){return e.$implicit.userToDisplay=null})),n.ic(13,"translate"),n.Rb(14,"mat-icon",126),n.Vb(),n.Wb(15,"button",122),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=e.index;return n.hc(3).delBasketAssignRedirection(i,a)})),n.ic(16,"translate"),n.Rb(17,"mat-icon",123),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=e.$implicit;n.Db(4),n.Sc("",t.basket_name," "),n.Db(2),n.Rc(t.group_desc),n.Db(2),n.oc("ngIf",null==t.userToDisplay),n.Db(2),n.rc("value","",n.jc(11,7,"lang.assignBy")," ",t.userToDisplay,""),n.Db(2),n.pc("matTooltip",n.jc(13,9,"lang.reassign")),n.Db(3),n.pc("matTooltip",n.jc(16,11,"lang.deleteAssignation"))}}function YQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab",36),n.ic(1,"translate"),n.Wb(2,"div",95),n.Wb(3,"mat-list"),n.Wb(4,"mat-list-item"),n.Wb(5,"mat-icon",96),n.Wb(6,"mat-checkbox",97),n.dc("change",(function(e){n.Dc(t);const i=n.hc(2);return e?i.masterToggleBaskets(e):null})),n.ic(7,"translate"),n.Vb(),n.Vb(),n.Oc(8,QQ,3,3,"p",98),n.Oc(9,BQ,15,23,"p",99),n.Vb(),n.Rb(10,"mat-divider"),n.Oc(11,GQ,2,1,"ng-container",14),n.Vb(),n.Vb(),n.Wb(12,"div",95),n.Wb(13,"mat-tab-group"),n.Wb(14,"mat-tab",36),n.ic(15,"translate"),n.Wb(16,"mat-list"),n.Oc(17,XQ,14,9,"ng-container",14),n.Vb(),n.Vb(),n.Vb(),n.Wb(18,"mat-tab-group"),n.Wb(19,"mat-tab",36),n.ic(20,"translate"),n.Wb(21,"mat-list"),n.Oc(22,KQ,18,13,"ng-container",14),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.pc("label",n.jc(1,10,"lang.baskets")),n.Db(6),n.pc("matTooltip",n.jc(7,12,"lang.selectAll")),n.oc("checked",t.selectionBaskets.hasValue()),n.Db(2),n.oc("ngIf",!t.selectionBaskets.hasValue()),n.Db(1),n.oc("ngIf",t.selectionBaskets.hasValue()),n.Db(2),n.oc("ngForOf",t.user.baskets),n.Db(3),n.pc("label",n.jc(15,14,"lang.basketsRedirected")),n.Db(3),n.oc("ngForOf",t.user.redirectedBaskets),n.Db(2),n.pc("label",n.jc(20,16,"lang.basketsAssigned")),n.Db(3),n.oc("ngForOf",t.user.assignedBaskets)}}function JQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",147),n.dc("click",(function(){return n.Dc(t),n.hc(3).clickOnUploader("uploadSignFile")}))("dragover",(function(){return n.Dc(t),n.hc(3).highlightMe=!0}))("dragleave",(function(){return n.Dc(t),n.hc(3).highlightMe=!1}))("onDropSuccess",(function(e){n.Dc(t);const i=n.hc(3);return i.test(e),i.highlightMe=!1})),n.ic(1,"translate"),n.Qc(2),n.ic(3,"translate"),n.Vb()}if(2&t){const t=n.hc(3);n.Ib("dndFileHighlighted",t.highlightMe),n.pc("matTooltip",n.jc(1,4,"lang.uploadSignFileInfo")),n.Db(2),n.Sc(" ",n.jc(3,6,"lang.uploadSignFile")," ")}}function ZQ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",148),n.Wb(1,"mat-card",149),n.Wb(2,"mat-card-content",55),n.Wb(3,"mat-form-field",150),n.Wb(4,"input",151),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.signature_label=i}))("change",(function(){n.Dc(t);const i=e.index;return n.hc(3).updateSignature(i)})),n.ic(5,"translate"),n.Vb(),n.Wb(6,"button",152),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).deleteSignature(i)})),n.ic(7,"translate"),n.Rb(8,"mat-icon",153),n.Vb(),n.Vb(),n.Rb(9,"img",154),n.ic(10,"async"),n.ic(11,"secureUrl"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(3);n.Db(4),n.pc("placeholder",n.jc(5,6,"lang.label")),n.oc("ngModel",t.signature_label)("disabled",!i.canManagePersonalDatas),n.Db(2),n.pc("matTooltip",n.jc(7,8,"lang.delete")),n.oc("disabled",!i.canManagePersonalDatas),n.Db(3),n.oc("src",n.jc(10,10,n.jc(11,12,"../rest/users/"+i.user.id+"/signatures/"+t.id+"/content")),n.Gc)}}function tN(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",155),n.dc("click",(function(){return n.Dc(t),n.hc(3).syncMP()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",156),n.Vb()}if(2&t){const t=n.hc(3);n.pc("matTooltip",n.jc(1,4,"lang.syncSignsToMaarchParapheur")),n.oc("disabled",!t.user.external_id.maarchParapheur||t.loadingSign),n.Db(2),n.Ib("fa-spin",t.loadingSign)}}function eN(t,e){if(1&t&&(n.Wb(0,"div",157),n.Rb(1,"img",158),n.Vb()),2&t){const t=n.hc(3);n.Db(1),n.pc("src",t.signatureModel.base64ForJs,n.Gc)}}function iN(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab",128),n.ic(1,"translate"),n.Oc(2,JQ,4,8,"div",129),n.Wb(3,"div",130),n.Wb(4,"div",131),n.Oc(5,ZQ,12,14,"div",132),n.Vb(),n.Wb(6,"div"),n.Oc(7,tN,3,6,"button",133),n.Vb(),n.Vb(),n.Wb(8,"form",134,135),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc(2).submitSignature()})),n.Wb(10,"div",136),n.Wb(11,"input",137),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).signatureModel.label=e})),n.ic(12,"translate"),n.Vb(),n.Wb(13,"div",138),n.Wb(14,"div",44),n.Wb(15,"input",139),n.dc("change",(function(e){return n.Dc(t),n.hc(2).uploadSignatureTrigger(e)})),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(16,"div",140),n.Wb(17,"button",141),n.Rb(18,"i",142),n.Vb(),n.Vb(),n.Wb(19,"div",143),n.Wb(20,"div",144),n.dc("click",(function(){return n.Dc(t),n.hc(2).clickOnUploader("uploadSignFile")})),n.Qc(21),n.ic(22,"translate"),n.Rb(23,"i",145),n.Qc(24," ( < 2MB ) "),n.Vb(),n.Vb(),n.Oc(25,eN,2,1,"div",146),n.Vb(),n.Vb()}if(2&t){const t=n.zc(9),e=n.hc(2);n.pc("label",n.jc(1,11,"lang.signatures")),n.oc("disabled",!e.canViewPersonalDatas),n.Db(2),n.oc("ngIf",e.canManagePersonalDatas),n.Db(3),n.oc("ngForOf",e.user.signatures),n.Db(2),n.oc("ngIf",e.user.signatures.length>0&&e.canManagePersonalDatas),n.Db(4),n.pc("placeholder",n.jc(12,13,"lang.label")),n.oc("ngModel",e.signatureModel.label),n.Db(6),n.oc("disabled",!t.form.valid||!e.signatureModel.size),n.Db(2),n.oc("ngClass",n.vc(17,MQ,""!=e.signatureModel.size?"col-md-10":"col-md-12")),n.Db(2),n.Sc(" ",n.jc(22,15,"lang.clickOn")," "),n.Db(4),n.oc("ngIf",e.signatureModel.size)}}function nN(t,e){1&t&&(n.Wb(0,"mat-header-cell",183),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.date")," "))}function aN(t,e){if(1&t&&(n.Wb(0,"mat-cell",131),n.Qc(1),n.ic(2,"date"),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",n.kc(2,1,t.event_date,"dd/MM/y HH:mm"),"")}}function sN(t,e){1&t&&(n.Wb(0,"mat-header-cell",131),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.technicalId")," "))}function oN(t,e){if(1&t&&(n.Wb(0,"mat-cell",131),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc("",t.record_id," ")}}function rN(t,e){1&t&&(n.Wb(0,"mat-header-cell",184),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.description"),""))}function cN(t,e){if(1&t&&(n.Wb(0,"mat-cell",185),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.info," ")}}function lN(t,e){1&t&&(n.Wb(0,"mat-header-cell",183),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.ip")," "))}function dN(t,e){if(1&t&&(n.Wb(0,"mat-cell",131),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.remote_ip," ")}}function hN(t,e){1&t&&n.Rb(0,"mat-header-row")}function uN(t,e){1&t&&n.Rb(0,"mat-row")}function pN(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab",36),n.ic(1,"translate"),n.Wb(2,"div",159),n.Wb(3,"div"),n.Wb(4,"div",160),n.Wb(5,"div",161),n.Wb(6,"mat-form-field"),n.Wb(7,"input",162),n.dc("keyup",(function(e){return n.Dc(t),n.hc(2).applyFilter(e.target.value)})),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(9,"div",161),n.Rb(10,"mat-paginator",163,164),n.Vb(),n.Vb(),n.Wb(12,"mat-table",165,166),n.Ub(14,167),n.Oc(15,nN,3,3,"mat-header-cell",168),n.Oc(16,aN,3,4,"mat-cell",169),n.Tb(),n.Ub(17,170),n.Oc(18,sN,3,3,"mat-header-cell",171),n.Oc(19,oN,2,1,"mat-cell",169),n.Tb(),n.Ub(20,172),n.Oc(21,rN,3,3,"mat-header-cell",173),n.Oc(22,cN,2,1,"mat-cell",174),n.Tb(),n.Ub(23,175),n.Oc(24,lN,3,3,"mat-header-cell",168),n.Oc(25,dN,2,1,"mat-cell",169),n.Tb(),n.Oc(26,hN,1,0,"mat-header-row",176),n.Oc(27,uN,1,0,"mat-row",177),n.Vb(),n.Wb(28,"div",160),n.Wb(29,"div",178),n.Wb(30,"mat-form-field"),n.Wb(31,"input",179),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).minDate=e})),n.ic(32,"translate"),n.Vb(),n.Rb(33,"mat-datepicker-toggle",180),n.Rb(34,"mat-datepicker",181,182),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(35),e=n.hc(2);n.pc("label",n.jc(1,13,"lang.history")),n.Db(7),n.pc("placeholder",n.jc(8,15,"lang.filterBy")),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",e.dataSource),n.Db(14),n.oc("matHeaderRowDef",e.displayedColumns),n.Db(1),n.oc("matRowDefColumns",e.displayedColumns),n.Db(4),n.pc("placeholder",n.jc(32,17,"lang.since")),n.oc("ngModel",e.minDate)("matDatepicker",t),n.Db(2),n.oc("for",t),n.Db(1),n.oc("startAt",e.minDate)}}function bN(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",34),n.Wb(1,"mat-tab-group",35),n.dc("selectedIndexChange",(function(e){return n.Dc(t),n.hc().selectedTabIndex=e}))("selectedTabChange",(function(){return n.Dc(t),n.hc().initService()})),n.Wb(2,"mat-tab",36),n.ic(3,"translate"),n.Oc(4,kQ,39,38,"div",37),n.Oc(5,SQ,2,1,"div",38),n.Oc(6,TQ,58,55,"form",39),n.Vb(),n.Oc(7,FQ,4,4,"mat-tab",40),n.Oc(8,LQ,4,5,"mat-tab",40),n.Oc(9,YQ,23,18,"mat-tab",40),n.Oc(10,iN,26,19,"mat-tab",41),n.Oc(11,pN,36,19,"mat-tab",40),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(1),n.oc("selectedIndex",t.selectedTabIndex),n.Db(1),n.pc("label",n.jc(3,10,"lang.informations")),n.Db(2),n.oc("ngIf",t.showPassword),n.Db(1),n.oc("ngIf","ABS"==t.user.status&&!t.showPassword),n.Db(1),n.oc("ngIf",!t.showPassword),n.Db(1),n.oc("ngIf",!t.creationMode),n.Db(1),n.oc("ngIf",!t.creationMode),n.Db(1),n.oc("ngIf",!t.creationMode),n.Db(1),n.oc("ngIf",!t.creationMode),n.Db(1),n.oc("ngIf",!t.creationMode)}}function fN(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item"),n.Rb(1,"mat-icon",186),n.Wb(2,"h4",20),n.Qc(3),n.Vb(),n.Wb(4,"p",20),n.Wb(5,"mat-form-field",187),n.Wb(6,"input",188),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.role=i}))("change",(function(){n.Dc(t);const i=e.$implicit;return n.hc().updateGroup(i)})),n.ic(7,"translate"),n.ic(8,"translate"),n.Vb(),n.Wb(9,"mat-hint",189),n.ic(10,"translate"),n.Qc(11),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(3),n.Rc(t.group_desc),n.Db(3),n.pc("title",n.jc(7,6,"lang.role")),n.pc("placeholder",n.jc(8,8,"lang.role")),n.oc("ngModel",t.role),n.Db(3),n.pc("matTooltip",n.jc(10,10,"lang.perimeter")),n.Db(2),n.Rc(t.maarch_comment)}}function mN(t,e){1&t&&n.Rb(0,"mat-icon",194)}function gN(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-icon",195),n.Wb(1,"button",196),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc().updatePrimaryEntity(e)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",197),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.pc("matTooltip",n.jc(2,1,"lang.entityTooglePrimary")))}function vN(t,e){1&t&&(n.Wb(0,"span",117),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.primary")))}const _N=function(t){return{"font-weight":t}};function yN(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item"),n.Oc(1,mN,1,0,"mat-icon",190),n.Oc(2,gN,4,3,"mat-icon",191),n.Wb(3,"h4",192),n.Qc(4),n.Oc(5,vN,3,3,"span",193),n.Vb(),n.Wb(6,"p",20),n.Wb(7,"mat-form-field",187),n.Wb(8,"input",188),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.user_role=i}))("change",(function(){n.Dc(t);const i=e.$implicit;return n.hc().updateEntity(i)})),n.ic(9,"translate"),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf","Y"==t.primary_entity),n.Db(1),n.oc("ngIf","Y"!=t.primary_entity),n.Db(1),n.pc("matTooltip",t.entity_label),n.oc("ngStyle",n.vc(13,_N,"Y"==t.primary_entity?"bold":"normal")),n.Db(1),n.Sc(" ",t.entity_label," "),n.Db(1),n.oc("ngIf","Y"==t.primary_entity),n.Db(3),n.pc("title",n.jc(9,9,"lang.role")),n.pc("placeholder",n.jc(10,11,"lang.role")),n.oc("ngModel",t.user_role)}}function xN(t,e){1&t&&(n.Rb(0,"div",15),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.redirectConfidentialInfo"),n.Ec)}function CN(t,e){1&t&&(n.Rb(0,"div",15),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.redirectModelInfo"),n.Ec)}function ON(t,e){if(1&t){const t=n.Xb();n.Wb(0,"plugin-autocomplete",16),n.dc("triggerEvent",(function(e){return n.Dc(t),n.hc().setRedirectUser(e)})),n.ic(1,"translate"),n.ic(2,"translate"),n.Vb()}2&t&&n.oc("labelPlaceholder",n.jc(1,5,"lang.userReplacement"))("labelList",n.jc(2,7,"lang.availableUsers"))("routeDatas",n.uc(9,NQ))("targetSearchKey","idToDisplay")("subInfoKey","descriptionToDisplay")}function DN(t,e){1&t&&(n.Wb(0,"span"),n.Wb(1,"em"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,1,"lang.doNothingRedirectInformations")))}function wN(t,e){1&t&&(n.Rb(0,"span",17),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.removeUserRedirectInformations"),n.Ec)}function MN(t,e){1&t&&(n.Wb(0,"span"),n.Wb(1,"em"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,1,"lang.reaffectUserRedirectInformations")))}let kN=(()=>{class t{constructor(t,e,i,n,s,o,r,c,l,d,h,u){this.translate=t,this.http=e,this.route=i,this.router=n,this.zone=s,this.notify=o,this.dialog=r,this.headerService=c,this._formBuilder=l,this.appService=d,this.privilegeService=h,this.viewContainerRef=u,this.loading=!1,this.highlightMe=!1,this.config={},this.mode="",this.user={mode:"standard",authorizedApi:""},this._search="",this.signatureModel={base64:"",base64ForJs:"",name:"",type:"",size:0,label:""},this.userAbsenceModel=[],this.userList=[],this.maarchParapheurLink={login:"",picture:""},this.selectedSignature=-1,this.selectedSignatureLabel="",this.loadingSign=!1,this.data=[],this.CurrentYear=(new Date).getFullYear(),this.currentMonth=(new Date).getMonth()+1,this.minDate=new Date,this.ruleText="",this.validPassword=!1,this.showPassword=!1,this.hidePassword=!0,this.passwordModel={currentPassword:"",newPassword:"",reNewPassword:""},this.passwordRules={minLength:{enabled:!1,value:0},complexityUpper:{enabled:!1,value:0},complexityNumber:{enabled:!1,value:0},complexitySpecial:{enabled:!1,value:0},renewal:{enabled:!1,value:0},historyLastUse:{enabled:!1,value:0}},this.displayedColumns=["event_date","record_id","info","remote_ip"],this.dataSource=new vt.p(this.data),this.selectedTabIndex=0,this.maarchParapheurConnectionStatus=!0,this.canViewPersonalDatas=!1,this.canManagePersonalDatas=!1,this.adminModes=[{id:"standard",label:this.translate.instant("lang.standard")},{id:"root_visible",label:this.translate.instant("lang.root_visible")},{id:"root_invisible",label:this.translate.instant("lang.root_invisible")},{id:"rest",label:this.translate.instant("lang.rest")}],this.appVersion=a.a.VERSION.split(".")[0]+"."+a.a.VERSION.split(".")[1],this.selectionBaskets=new O.c(!0,[]),window.angularUserAdministrationComponent={componentAfterUpload:t=>this.processAfterUpload(t)}}applyFilter(t){t=(t=t.trim()).toLowerCase(),this.dataSource.filter=t}masterToggleBaskets(t){t.checked?this.user.baskets.forEach(t=>{t.userToDisplay||this.selectionBaskets.select(t)}):this.selectionBaskets.clear()}ngOnInit(){this.loading=!0,this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.route.params.subscribe(t=>{void 0===t.id?(this.headerService.setHeader(this.translate.instant("lang.userCreation")),this.creationMode=!0,this.canViewPersonalDatas=!1,this.canManagePersonalDatas=this.privilegeService.hasCurrentUserPrivilege("manage_personal_data"),this.loading=!1):(this.creationMode=!1,this.serialId=t.id,this.http.get("../rest/users/"+this.serialId+"/details").subscribe(t=>{this.user=t,"rest"===this.user.mode&&(this.user.authorizedApi=this.user.authorizedApi.join("\n")),this.headerService.user.id===this.user.id?(this.canViewPersonalDatas=!0,this.canManagePersonalDatas=!0):(this.canViewPersonalDatas=this.privilegeService.hasCurrentUserPrivilege("view_personal_data"),this.canManagePersonalDatas=this.privilegeService.hasCurrentUserPrivilege("manage_personal_data")),this.canManagePersonalDatas&&(this.canViewPersonalDatas=!0),this.canViewPersonalDatas||(this.user.phone="****"),this.data=t.history,this.userId=t.user_id,this.minDate=new Date(this.CurrentYear+"-"+this.currentMonth+"-01"),this.headerService.setHeader(this.translate.instant("lang.userModification"),t.firstname+" "+t.lastname),void 0!==this.user.external_id.maarchParapheur&&this.checkInfoMaarchParapheurAccount(),this.loading=!1,setTimeout(()=>{this.dataSource=new vt.p(this.data),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort},0)},t=>{this.notify.handleErrors(t)}))})}checkInfoMaarchParapheurAccount(){this.http.get("../rest/users/"+this.serialId+"/statusInMaarchParapheur").subscribe(t=>{this.maarchParapheurLink.login=t.link,this.loading=!1,""!==this.maarchParapheurLink.login?this.loadAvatarMaarchParapheur(this.user.external_id.maarchParapheur):this.maarchParapheurConnectionStatus=!1})}linkMaarchParapheurAccount(){this.dialog.open(iQ,{panelClass:"maarch-modal",autoFocus:!1,data:{user:this.user}}).afterClosed().subscribe(t=>{t&&(t.inMaarchParapheur?this.linkAccountToMaarchParahpeur(t.id):this.createAccountToMaarchParahpeur(t.id,t.login))})}linkAccountToMaarchParahpeur(t){this.http.put("../rest/users/"+this.serialId+"/linkToMaarchParapheur",{maarchParapheurUserId:t}).subscribe(()=>{this.user.canCreateMaarchParapheurUser=!1,this.user.external_id.maarchParapheur=t,this.checkInfoMaarchParapheurAccount(),this.notify.success(this.translate.instant("lang.accountLinked"))},t=>{this.notify.error(t.error.errors)})}createAccountToMaarchParahpeur(t,e){this.http.put("../rest/users/"+t+"/createInMaarchParapheur",{login:e}).subscribe(t=>{this.user.canCreateMaarchParapheurUser=!1,this.user.external_id.maarchParapheur=t.externalId,this.checkInfoMaarchParapheurAccount(),this.notify.success(this.translate.instant("lang.accountAdded"))},t=>{"Login already exists"===t.error.errors&&(t.error.errors=this.translate.instant("lang.loginAlreadyExistsInMaarchParapheur")),this.notify.error(t.error.errors)})}loadAvatarMaarchParapheur(t){this.http.get("../rest/maarchParapheur/user/"+t+"/picture").subscribe(t=>{this.maarchParapheurLink.picture=t.picture},t=>{this.notify.handleErrors(t)})}unlinkMaarchParapheurAccount(){confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.unlinkAccount"))&&this.http.put("../rest/users/"+this.serialId+"/unlinkToMaarchParapheur",{}).subscribe(()=>{this.user.canCreateMaarchParapheurUser=!0,this.maarchParapheurLink.login="",this.maarchParapheurLink.picture="",this.notify.success(this.translate.instant("lang.accountUnlinked")),this.maarchParapheurConnectionStatus=!0},t=>{this.notify.error(t.error.errors)})}toogleRedirect(t){$("#redirectUser_"+t.group_id+"_"+t.basket_id).toggle(),this.http.get("../rest/users").subscribe(t=>{},t=>{this.notify.handleErrors(t)})}initService(){0===this.maarchTree.rawData.length&&this.maarchTree.initData(this.user.allEntities.map(t=>Object.assign(Object.assign({},t),{parent_id:t.parent})))}processAfterUpload(t){this.zone.run(()=>this.resfreshUpload(t))}resfreshUpload(t){this.signatureModel.size<=2e6?(this.signatureModel.base64=t.replace(/^data:.*?;base64,/,""),this.signatureModel.base64ForJs=t):(this.signatureModel.name="",this.signatureModel.size=0,this.signatureModel.type="",this.signatureModel.base64="",this.signatureModel.base64ForJs="",this.notify.error("Taille maximum de fichier d\xe9pass\xe9e (2 MB)"))}clickOnUploader(t){$("#"+t).click()}uploadSignatureTrigger(t){if(t.target.files&&t.target.files[0]){const e=new FileReader;this.signatureModel.name=t.target.files[0].name,this.signatureModel.size=t.target.files[0].size,this.signatureModel.type=t.target.files[0].type,""===this.signatureModel.label&&(this.signatureModel.label=this.signatureModel.name),e.readAsDataURL(t.target.files[0]),e.onload=t=>{window.angularUserAdministrationComponent.componentAfterUpload(t.target.result),this.submitSignature()}}}displaySignatureEditionForm(t){this.selectedSignature=t,this.selectedSignatureLabel=this.user.signatures[t].signature_label}resendActivationNotification(){confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.sendActivationNotification"))&&this.http.put("../rest/users/"+this.serialId+"/accountActivationNotification",{}).subscribe(t=>{this.notify.success(this.translate.instant("lang.activationNotificationSend"))},t=>{this.notify.error(t.error.errors)})}toggleGroup(t){!0===$("#"+t.group_id+"-input").is(":checked")?this.http.post("../rest/users/"+this.serialId+"/groups",{groupId:t.group_id,role:t.role}).subscribe(t=>Object(r.a)(this,void 0,void 0,(function*(){this.user.groups=t.groups,this.user.baskets=t.baskets,this.headerService.user.id==this.serialId&&(yield this.headerService.resfreshCurrentUser(),this.privilegeService.resfreshUserShortcuts()),this.notify.success(this.translate.instant("lang.groupAdded"))})),t=>{this.notify.error(t.error.errors)}):this.http.delete("../rest/users/"+this.serialId+"/groups/"+t.group_id).subscribe(t=>Object(r.a)(this,void 0,void 0,(function*(){this.user.groups=t.groups,this.user.baskets=t.baskets,this.user.redirectedBaskets=t.redirectedBaskets,this.headerService.user.id==this.serialId&&(yield this.headerService.resfreshCurrentUser(),this.privilegeService.resfreshUserShortcuts()),this.notify.success(this.translate.instant("lang.groupDeleted"))})),t=>{this.notify.error(t.error.errors)})}updateGroup(t){this.http.put("../rest/users/"+this.serialId+"/groups/"+t.group_id,t).subscribe(t=>{this.notify.success(this.translate.instant("lang.groupUpdated"))},t=>{this.notify.error(t.error.errors)})}addEntity(t){t.forEach(t=>{this.http.post("../rest/users/"+this.serialId+"/entities",{entityId:t.entity_id,role:""}).subscribe(t=>{this.user.entities=t.entities,this.user.allEntities=t.allEntities,this.headerService.user.id==this.serialId&&this.headerService.resfreshCurrentUser(),this.notify.success(this.translate.instant("lang.entityAdded"))},t=>{this.notify.error(t.error.errors)})})}updateEntity(t){this.http.put("../rest/users/"+this.serialId+"/entities/"+t.entity_id,t).subscribe(()=>{this.notify.success(this.translate.instant("lang.entityUpdated"))},t=>{this.notify.error(t.error.errors)})}updatePrimaryEntity(t){this.http.put("../rest/users/"+this.serialId+"/entities/"+t.entity_id+"/primaryEntity",{}).subscribe(e=>{this.user.entities=e.entities,this.notify.success(this.translate.instant("lang.entityTooglePrimary")+" \xab "+t.entity_id+" \xbb")},t=>{this.notify.error(t.error.errors)})}deleteEntity(t){t.forEach(t=>{const e=t.entity_id;this.http.get("../rest/users/"+this.serialId+"/entities/"+e).subscribe(i=>{i.hasConfidentialityInstances||i.hasListTemplates?(this.config={panelClass:"maarch-modal",data:{hasConfidentialityInstances:i.hasConfidentialityInstances,hasListTemplates:i.hasListTemplates}},this.dialogRef=this.dialog.open(SN,this.config),this.dialogRef.afterClosed().subscribe(i=>{this.mode="delete",i?(this.mode=i.processMode,this.http.request("DELETE","../rest/users/"+this.serialId+"/entities/"+e,{body:{mode:this.mode,newUser:i.newUser}}).subscribe(t=>{this.user.entities=t.entities,this.user.allEntities=t.allEntities,this.headerService.user.id==this.serialId&&this.headerService.resfreshCurrentUser(),this.notify.success(this.translate.instant("lang.entityDeleted"))},t=>{this.notify.error(t.error.errors)})):(this.maarchTree.toggleNode(this.maarchTree.dataSource.data,{selected:!0,opened:!0},[t.id]),this.mode=""),this.dialogRef=null})):this.http.delete("../rest/users/"+this.serialId+"/entities/"+e).subscribe(t=>{this.user.entities=t.entities,this.user.allEntities=t.allEntities,this.headerService.user.id==this.serialId&&this.headerService.resfreshCurrentUser(),this.notify.success(this.translate.instant("lang.entityDeleted"))},t=>{this.notify.error(t.error.errors)})},t=>{this.notify.error(t.error.errors)})})}submitSignature(){this.http.post("../rest/users/"+this.serialId+"/signatures",this.signatureModel).subscribe(t=>{this.user.signatures=t.signatures,this.notify.success(this.translate.instant("lang.signAdded")),this.signatureModel={base64:"",base64ForJs:"",name:"",type:"",size:0,label:""}},t=>{this.notify.error(t.error.errors)})}updateSignature(t){this.http.put("../rest/users/"+this.serialId+"/signatures/"+this.user.signatures[t].id,{label:this.user.signatures[t].signature_label}).subscribe(e=>{this.user.signatures[t].signature_label=e.signature.signature_label,this.notify.success(this.translate.instant("lang.signUpdated"))},t=>{this.notify.error(t.error.errors)})}deleteSignature(t){confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.delete")+" \xab "+t.signature_label+" \xbb")&&this.http.delete("../rest/users/"+this.serialId+"/signatures/"+t.id).subscribe(t=>{this.user.signatures=t.signatures,this.notify.success(this.translate.instant("lang.signDeleted"))},t=>{this.notify.error(t.error.errors)})}test(t){if(t.mouseEvent.dataTransfer.files&&t.mouseEvent.dataTransfer.files[0]){const e=new FileReader;this.signatureModel.name=t.mouseEvent.dataTransfer.files[0].name,this.signatureModel.size=t.mouseEvent.dataTransfer.files[0].size,this.signatureModel.type=t.mouseEvent.dataTransfer.files[0].type,""===this.signatureModel.label&&(this.signatureModel.label=this.signatureModel.name),e.readAsDataURL(t.mouseEvent.dataTransfer.files[0]),e.onload=t=>{window.angularUserAdministrationComponent.componentAfterUpload(t.target.result),this.submitSignature()}}}addBasketRedirection(t){const e=[];this.selectionBaskets.selected.forEach(i=>{e.push({actual_user_id:t.serialId,basket_id:i.basket_id,group_id:i.groupSerialId,originalOwner:null})}),confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.redirectBasket"))&&this.http.post("../rest/users/"+this.serialId+"/redirectedBaskets",e).subscribe(t=>{this.user.baskets=t.baskets,this.user.redirectedBaskets=t.redirectedBaskets,this.selectionBaskets.clear(),this.notify.success(this.translate.instant("lang.basketUpdated"))},t=>{this.notify.error(t.error.errors)})}reassignBasketRedirection(t,e,i){confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.redirectBasket"))&&this.http.post("../rest/users/"+this.serialId+"/redirectedBaskets",[{actual_user_id:t.serialId,basket_id:e.basket_id,group_id:e.group_id,originalOwner:e.owner_user_id}]).subscribe(t=>{this.user.baskets=t.baskets,this.user.assignedBaskets.splice(i,1),this.notify.success(this.translate.instant("lang.basketUpdated"))},t=>{this.notify.error(t.error.errors)})}delBasketRedirection(t,e){confirm(this.translate.instant("lang.confirmAction"))&&this.http.delete("../rest/users/"+this.serialId+"/redirectedBaskets?redirectedBasketIds[]="+t.id).subscribe(t=>{this.user.baskets=t.baskets,this.user.redirectedBaskets.splice(e,1),this.notify.success(this.translate.instant("lang.basketUpdated"))},t=>{this.notify.error(t.error.errors)})}delBasketAssignRedirection(t,e){confirm(this.translate.instant("lang.confirmAction"))&&this.http.delete("../rest/users/"+this.serialId+"/redirectedBaskets?redirectedBasketIds[]="+t.id).subscribe(t=>{this.user.baskets=t.baskets,this.user.assignedBaskets.splice(e,1),this.notify.success(this.translate.instant("lang.basketUpdated"))},t=>{this.notify.error(t.error.errors)})}toggleBasket(t){const e=[];this.user.baskets.forEach(i=>{this.selectionBaskets.selected.forEach(n=>{i.basket_id===n.basket_id&&i.group_id===n.group_id&&i.allowed!==t&&(i.allowed=t,e.push({basketId:i.basket_id,groupSerialId:i.groupSerialId,allowed:t}))})}),e.length>0&&this.http.put("../rest/users/"+this.serialId+"/baskets",{baskets:e}).subscribe(t=>{this.selectionBaskets.clear(),this.notify.success(this.translate.instant("lang.basketsUpdated"))},t=>{this.notify.error(t.error.errors)})}activateAbsence(){this.http.put("../rest/users/"+this.serialId+"/status",{status:"ABS"}).subscribe(t=>{this.user.status=t.user.status,this.userAbsenceModel=[],this.notify.success(this.translate.instant("lang.absOn"))},t=>{this.notify.error(t.error.errors)})}desactivateAbsence(){this.http.put("../rest/users/"+this.serialId+"/status",{status:"OK"}).subscribe(t=>{this.user.status=t.user.status,this.notify.success(this.translate.instant("lang.absOff"))},t=>{this.notify.error(t.error.errors)})}getErrorMessage(){return this.firstFormGroup.controls.retypePasswordCtrl.setErrors(this.firstFormGroup.controls.newPasswordCtrl.value!==this.firstFormGroup.controls.retypePasswordCtrl.value?{mismatch:!0}:null),this.firstFormGroup.controls.newPasswordCtrl.hasError("required")?this.translate.instant("lang.requiredField")+" !":this.firstFormGroup.controls.newPasswordCtrl.hasError("minlength")&&this.passwordRules.minLength.enabled?this.passwordRules.minLength.value+" "+this.translate.instant("lang.passwordminLength")+" !":null!=this.firstFormGroup.controls.newPasswordCtrl.errors&&void 0!==this.firstFormGroup.controls.newPasswordCtrl.errors.complexityUpper&&this.passwordRules.complexityUpper.enabled?this.translate.instant("lang.passwordcomplexityUpper")+" !":null!=this.firstFormGroup.controls.newPasswordCtrl.errors&&void 0!==this.firstFormGroup.controls.newPasswordCtrl.errors.complexityNumber&&this.passwordRules.complexityNumber.enabled?this.translate.instant("lang.passwordcomplexityNumber")+" !":null!=this.firstFormGroup.controls.newPasswordCtrl.errors&&void 0!==this.firstFormGroup.controls.newPasswordCtrl.errors.complexitySpecial&&this.passwordRules.complexitySpecial.enabled?this.translate.instant("lang.passwordcomplexitySpecial")+" !":(this.firstFormGroup.controls.newPasswordCtrl.setErrors(null),this.validPassword=!0,"")}matchValidator(t){return t.controls.newPasswordCtrl.value!==t.controls.retypePasswordCtrl.value&&(t.controls.retypePasswordCtrl.setErrors({mismatch:!0}),{mismatch:!0})}regexValidator(t,e){return i=>i.value?t.test(i.value)?null:e:null}changePasswd(){this.http.get("../rest/passwordRules").subscribe(t=>{const e=[],i=[],n=[];e.push(X.I.required),t.rules.forEach(t=>{"minLength"===t.label?(this.passwordRules.minLength.enabled=t.enabled,this.passwordRules.minLength.value=t.value,t.enabled&&(e.push(X.I.minLength(this.passwordRules.minLength.value)),i.push(t.value+" "+this.translate.instant("lang.password"+t.label)))):"complexityUpper"===t.label?(this.passwordRules.complexityUpper.enabled=t.enabled,this.passwordRules.complexityUpper.value=t.value,t.enabled&&(e.push(this.regexValidator(new RegExp("[A-Z]"),{complexityUpper:""})),i.push(this.translate.instant("lang.password"+t.label)))):"complexityNumber"===t.label?(this.passwordRules.complexityNumber.enabled=t.enabled,this.passwordRules.complexityNumber.value=t.value,t.enabled&&(e.push(this.regexValidator(new RegExp("[0-9]"),{complexityNumber:""})),i.push(this.translate.instant("lang.password"+t.label)))):"complexitySpecial"===t.label?(this.passwordRules.complexitySpecial.enabled=t.enabled,this.passwordRules.complexitySpecial.value=t.value,t.enabled&&(e.push(this.regexValidator(new RegExp("[^A-Za-z0-9]"),{complexitySpecial:""})),i.push(this.translate.instant("lang.password"+t.label)))):"renewal"===t.label?(this.passwordRules.renewal.enabled=t.enabled,this.passwordRules.renewal.value=t.value,t.enabled&&n.push(this.translate.instant("lang.password"+t.label)+" <b>"+t.value+" "+this.translate.instant("lang.days")+"</b>. "+this.translate.instant("lang.password2"+t.label)+".")):"historyLastUse"===t.label&&(this.passwordRules.historyLastUse.enabled=t.enabled,this.passwordRules.historyLastUse.value=t.value,t.enabled&&n.push(this.translate.instant("lang.passwordhistoryLastUseDesc")+" <b>"+t.value+"</b> "+this.translate.instant("lang.passwordhistoryLastUseDesc2")+"."))}),this.ruleText=i.join(", "),this.otherRuleText=n.join("<br/>"),this.firstFormGroup.controls.newPasswordCtrl.setValidators(e)},t=>{this.notify.error(t.error.errors)}),this.firstFormGroup=this._formBuilder.group({newPasswordCtrl:[""],retypePasswordCtrl:["",X.I.compose([X.I.required])],currentPasswordCtrl:["",X.I.compose([X.I.required])]},{validator:this.matchValidator}),this.validPassword=!1,this.firstFormGroup.controls.currentPasswordCtrl.setErrors(null),this.firstFormGroup.controls.newPasswordCtrl.setErrors(null),this.firstFormGroup.controls.retypePasswordCtrl.setErrors(null),this.showPassword=!0,this.selectedTabIndex=0}updatePassword(){this.passwordModel.currentPassword=this.firstFormGroup.controls.currentPasswordCtrl.value,this.passwordModel.newPassword=this.firstFormGroup.controls.newPasswordCtrl.value,this.passwordModel.reNewPassword=this.firstFormGroup.controls.retypePasswordCtrl.value,this.http.put("../rest/users/"+this.serialId+"/password",this.passwordModel).subscribe(()=>{this.showPassword=!1,this.passwordModel={currentPassword:"",newPassword:"",reNewPassword:""},this.notify.success(this.translate.instant("lang.passwordUpdated"))},t=>{this.notify.error(t.error.errors)})}onSubmit(){if(this.creationMode){let t=!0;this.http.get("../rest/users/"+this.user.userId+"/status").subscribe(e=>{let i=!1;e.status&&"DEL"===e.status&&(t=confirm(this.translate.instant("lang.reactivateUserDeleted")),i=!0),t&&this.http.post("../rest/users",this.user).subscribe(t=>{this.notify.success(this.translate.instant(i?"lang.userUpdated":"lang.userAdded")),this.router.navigate(["/administration/users/"+t.id])},t=>{this.notify.handleSoftErrors(t)})},t=>{this.notify.error(t.error.errors)})}else{const t=Object.assign({},this.user);"rest"===this.user.mode&&(t.authorizedApi=""!==this.user.authorizedApi.split("\n")[0]?this.user.authorizedApi.split("\n"):[]),this.http.put("../rest/users/"+this.serialId,t).subscribe(t=>{this.headerService.user.id==this.serialId&&this.headerService.resfreshCurrentUser(),this.notify.success(this.translate.instant("lang.userUpdated"))},t=>{this.notify.handleSoftErrors(t)})}}setUserModeLogin(t){this.user.mode=t.checked?"rest":"standard"}sendToMaarchParapheur(){confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.createUserInMaarchParapheur"))&&this.http.put("../rest/users/"+this.serialId+"/maarchParapheur","").subscribe(t=>{this.notify.success(this.translate.instant("lang.userCreatedInMaarchParapheur")),this.user.external_id.maarchParapheur=t.externalId,this.user.canCreateMaarchParapheurUser=!1},t=>{this.notify.error(t.error.errors)})}setLowerUserId(){this.user.userId=this.user.userId.toLowerCase()}syncMP(){this.loadingSign=!0,this.http.put("../rest/users/"+this.user.id+"/externalSignatures",{}).subscribe(t=>{this.loadingSign=!1,this.notify.success(this.translate.instant("lang.signsSynchronized"))},t=>{this.loadingSign=!1,this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(n.C),n.Qb(D.a),n.Qb(q.b),n.Qb(y.a),n.Qb(X.h),n.Qb(w.a),n.Qb(Dt.a),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(lQ,!0),n.Kc(dQ,!0),n.Xc(hQ,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.maarchTree=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:27,vars:19,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["fixedTopGap","56","position","end",2,"overflow-x","hidden","max-width","500px",3,"mode","fixedInViewport","opened"],["snav2",""],["mat-subheader",""],[4,"ngFor","ngForOf"],[4,"ngIf"],["mat-list-item","",3,"click",4,"ngIf"],["mat-list-item","",3,"title","click",4,"ngIf"],["mat-list-item","",3,"click"],["color","warn","mat-list-icon","",1,"fa","fa-plane"],["mat-line",""],["color","accent","mat-list-icon","",1,"fa","fa-check"],["color","primary","mat-list-icon","",1,"fa","fa-paper-plane"],["color","primary","mat-list-icon","",1,"fa","fa-key"],["mat-list-item","",3,"title","click"],["color","primary","mat-list-icon","",1,"fa","fa-link"],["mat-line","","style","font-size:11px;color:red",4,"ngIf"],["mat-line","",2,"font-size","11px","color","red"],["color","primary","mat-list-icon","",1,"avatarAccount"],["mat-line","",1,"accountInfo"],["mat-icon-button","","color","warn",3,"title","click"],[1,"fas","fa-unlink"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[3,"selectedIndex","selectedIndexChange","selectedTabChange"],[3,"label"],["style","margin-bottom: 5%",4,"ngIf"],["class","text-warning","style","position: absolute;opacity: 0.25;font-size: 120px;transform: rotate(324deg);-webkit-transform: rotate(324deg);margin-left: 35%;margin-top: 90px;",4,"ngIf"],["class","form-horizontal",3,"ngSubmit",4,"ngIf"],[3,"label",4,"ngIf"],[3,"label","disabled",4,"ngIf"],[2,"margin-bottom","5%"],[3,"formGroup"],[1,"form-group"],[2,"padding","10px"],["matInput","","formControlName","currentPasswordCtrl","required","",3,"placeholder","type"],["matSuffix","",1,"fa","fa-2x",3,"ngClass","click"],[2,"text-align","center","color","rgba(0,0,0,0.54)","font-size","75%"],[1,"col-sm-6",2,"padding-left","0px","padding-right","0px"],["matInput","","formControlName","newPasswordCtrl","required","",3,"placeholder","type"],["inputPasswd",""],["matInput","","required","","formControlName","retypePasswordCtrl",3,"placeholder","type"],["inputPasswd2",""],["class","form-group",4,"ngIf"],[2,"text-align","center"],["mat-raised-button","","color","primary","type","button",3,"disabled","click"],["mat-raised-button","","color","default","type","button",3,"click"],["color","accent",1,"fa","fa-check"],["color","accent"],[1,"col-sm-12",2,"padding-left","0px","padding-right","0px"],["role","alert",1,"alert","alert-warning",2,"text-align","center",3,"innerHTML"],[1,"text-warning",2,"position","absolute","opacity","0.25","font-size","120px","transform","rotate(324deg)","-webkit-transform","rotate(324deg)","margin-left","35%","margin-top","90px"],[1,"form-horizontal",3,"ngSubmit"],["profileForm","ngForm"],[1,"col-sm-12"],[1,"pull-left"],[1,"avatar",2,"font-size","90px","text-align","center"],[1,"fa","fa-user",2,"font-size","90px","padding-top","5px"],[1,"input-group"],["matInput","","type","text","name","user_id","pattern","^[\\w.@-]*$","required","","maxlength","128",3,"title","ngModel","placeholder","ngModelChange","keyup",4,"ngIf"],["matInput","","type","text","disabled","",3,"title","value","placeholder",4,"ngIf"],[1,"col-sm-5",2,"font-weight","bold"],["matInput","","type","text","id","lastname","name","lastname","maxlength","255","required","",3,"title","placeholder","ngModel","ngModelChange"],["matInput","","type","text","id","firstname","name","firstname","maxlength","255","required","",3,"title","placeholder","ngModel","ngModelChange"],[1,"col-sm-2",2,"font-style","italic"],["matInput","","type","text","id","initials","name","initials","maxlength","32",3,"title","placeholder","ngModel","ngModelChange"],["matInput","","type","tel","id","phone","name","phone","maxlength","32","pattern","\\+?((|\\ |\\.|\\(|\\)|\\-)?(\\d)*)*\\d$",3,"title","placeholder","ngModel","disabled","ngModelChange"],["matInput","","type","email","id","mail","name","mail","maxlength","255","pattern","(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$)","required","",3,"title","placeholder","ngModel","ngModelChange"],[3,"expanded"],[2,"color","rgba(0,0,0,0.54)"],["id","accountType","name","accountType","required","",3,"ngModel","disabled","ngModelChange"],[1,"form-group",2,"margin-top","10px"],["mat-raised-button","","color","primary","type","submit",3,"disabled",4,"ngIf"],["matInput","","type","text","name","user_id","pattern","^[\\w.@-]*$","required","","maxlength","128",3,"title","ngModel","placeholder","ngModelChange","keyup"],["matInput","","type","text","disabled","",3,"title","value","placeholder"],[3,"value","disabled","title"],["matInput","","name","authorizedApi","placeholder","Ex : PUT/attachments/{id}",3,"ngModel","ngModelChange"],["target","_blank",3,"href"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],["disableRipple","true",4,"ngFor","ngForOf"],["disableRipple","true"],["color","primary",3,"id","checked","disabled","change"],[3,"selectionPropagation","openState","afterSelectNode","afterDeselectNode"],["maarchTree",""],[1,"col-sm-6",2,"overflow","hidden"],["mat-list-icon","","color","primary"],["color","primary",3,"checked","matTooltip","change"],["mat-line","","style","opacity: 0.5;font-style: italic;font-size: 80%;margin-top:10px;",4,"ngIf"],["mat-line","","style","margin-top:10px;",4,"ngIf"],["mat-line","",2,"opacity","0.5","font-style","italic","font-size","80%","margin-top","10px"],["mat-line","",2,"margin-top","10px"],["mat-icon-button","",3,"matMenuTriggerFor","matTooltip"],[1,"fa","fa-reply"],[1,"vertical-divider",3,"vertical"],["color","warn","mat-icon-button","",3,"matTooltip","click"],[1,"fa","fa-ban"],["color","accent","mat-icon-button","",3,"matTooltip","click"],[1,"fa","fa-check"],[2,"width","200px !important"],["menu","matMenu"],["appearance","outline",3,"labelPlaceholder","routeDatas","targetSearchKey","subInfoKey","disableItems","styles","triggerEvent"],["style","cursor: pointer;",4,"ngIf"],[2,"cursor","pointer"],["mat-list-icon","","color","primary",4,"ngIf"],["mat-line","","color","primary",2,"display","flex","align-items","center"],[2,"flex","2","overflow","hidden","text-overflow","ellipsis",3,"matTooltip","ngStyle","click"],[1,"label","label-primary",2,"font-weight","normal"],["color","primary",3,"checked","click","change"],["mat-list-icon","","color","primary",1,"fa","fa-paper-plane",2,"margin-top","-60px"],["mat-line","","color","primary"],["type","text","color","warn","matInput","","disabled","",3,"value"],["mat-button","","color","warn","matSuffix","","mat-icon-button","","aria-label","Clear",3,"matTooltip","click"],["color","warn",1,"fa","fa-times","text-danger"],["mat-list-icon","","color","primary",1,"fa","fa-reply",2,"margin-top","-60px"],["appearance","outline",3,"labelPlaceholder","routeDatas","targetSearchKey","subInfoKey","triggerEvent",4,"ngIf"],["color","primary",1,"fa","fa-edit"],["appearance","outline",3,"labelPlaceholder","routeDatas","targetSearchKey","subInfoKey","triggerEvent"],[3,"label","disabled"],["dnd-droppable","","class","dndFile",3,"matTooltip","dndFileHighlighted","click","dragover","dragleave","onDropSuccess",4,"ngIf"],[2,"display","flex","align-items","flex-start"],[2,"flex","1"],["class","col-md-3 col-sm-6 col-xm-12",4,"ngFor","ngForOf"],["mat-icon-button","","color","primary",3,"matTooltip","disabled","click",4,"ngIf"],[2,"display","none",3,"ngSubmit"],["signatureForm","ngForm"],[1,"col-md-11"],["type","text","id","signLabel","name","label","required","",1,"form-control",3,"ngModel","placeholder","ngModelChange"],[1,"form-inline","hide"],["type","file","name","files[]","id","uploadSignFile","accept","image/*",3,"change"],[1,"col-md-1",2,"margin-bottom","5px"],["type","submit",1,"form-control","btn","btn-sm","btn-success",3,"disabled"],[1,"fa","fa-plus"],[3,"ngClass"],[1,"upload-drop-zone",2,"cursor","pointer",3,"click"],[1,"fa","fa-upload","fa-2x"],["class","col-md-2",4,"ngIf"],["dnd-droppable","",1,"dndFile",3,"matTooltip","click","dragover","dragleave","onDropSuccess"],[1,"col-md-3","col-sm-6","col-xm-12"],[2,"margin-bottom","10px","overflow","hidden"],["floatLabel","never"],["matInput","","type","text","name","selectedSignatureLabel",3,"ngModel","placeholder","disabled","ngModelChange","change"],["mat-button","","matSuffix","","mat-icon-button","","color","warn",3,"matTooltip","disabled","click"],[1,"fa","fa-times"],["alt","Signature",2,"width","auto","height","60px",3,"src"],["mat-icon-button","","color","primary",3,"matTooltip","disabled","click"],[1,"fa","fa-sync-alt","fa-2x"],[1,"col-md-2"],["id","signaturePreview","alt","Invalid image",2,"width","100%",3,"src"],[1,"col-md-12"],[1,"row"],[1,"col-md-6","col-xs-6"],["matInput","",3,"placeholder","keyup"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSort","","matSortActive","event_date","matSortDirection","desc",3,"dataSource"],["table",""],["matColumnDef","event_date"],["mat-sort-header","","style","flex:1;",4,"matHeaderCellDef"],["style","flex:1;",4,"matCellDef"],["matColumnDef","record_id"],["style","flex:1;",4,"matHeaderCellDef"],["matColumnDef","info"],["mat-sort-header","","style","flex:2;",4,"matHeaderCellDef"],["style","flex:2;",4,"matCellDef"],["matColumnDef","remote_ip"],[4,"matHeaderRowDef"],[4,"matRowDef","matRowDefColumns"],[1,"col-md-3","pull-right",2,"padding-top","10px"],["matInput","","disabled","",3,"ngModel","matDatepicker","placeholder","ngModelChange"],["matSuffix","",3,"for"],["startView","month",3,"startAt"],["picker",""],["mat-sort-header","",2,"flex","1"],["mat-sort-header","",2,"flex","2"],[2,"flex","2"],["color","primary","mat-list-icon","",1,"fa","fa-users"],[2,"font-size","10px"],["matInput","","type","text","id","role","name","role",3,"title","placeholder","ngModel","ngModelChange","change"],[3,"matTooltip"],["color","primary","mat-list-icon","","class","fa fa-sitemap",4,"ngIf"],["color","primary","mat-list-icon","","class","fa fa-sitemap","style","position:relative;",4,"ngIf"],["mat-line","",3,"ngStyle","matTooltip"],["class","label label-primary","style","font-weight:normal",4,"ngIf"],["color","primary","mat-list-icon","",1,"fa","fa-sitemap"],["color","primary","mat-list-icon","",1,"fa","fa-sitemap",2,"position","relative"],["mat-icon-button","",2,"cursor","pointer","position","absolute","right","-20px","top","-20px","font-size","10px",3,"matTooltip","click"],[1,"fa","fa-arrow-up"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,yQ,3,2,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,xQ,2,0,"div",9),n.Oc(14,bN,12,12,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Wb(15,"mat-sidenav",11,12),n.Wb(17,"mat-list"),n.Wb(18,"h3",13),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Oc(21,fN,12,12,"mat-list-item",14),n.Rb(22,"mat-divider"),n.Wb(23,"h3",13),n.Qc(24),n.ic(25,"translate"),n.Vb(),n.Oc(26,yN,11,15,"mat-list-item",14),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",!e.appService.getViewMode()&&!e.creationMode),n.Db(4),n.Rc(n.jc(20,15,"lang.groups")),n.Db(2),n.oc("ngForOf",e.user.groups),n.Db(3),n.Rc(n.jc(25,17,"lang.entities")),n.Db(2),n.oc("ngForOf",e.user.entities))},directives:[I.e,I.f,Ot,We,P.t,I.d,R.a,R.g,P.s,T.a,R.h,R.d,S.a,R.c,W.l,k.b,V.c,K.a,Te.c,Te.a,X.K,X.v,X.m,Y.c,J.b,X.d,X.u,X.k,X.F,Y.j,P.q,Y.b,Y.f,X.w,X.p,X.x,X.B,gt.a,gt.c,gt.g,gt.h,Y.g,ee.a,W.p,te.a,cQ,j.a,A.b,ne.d,ne.e,ii,P.w,Ee.d,K.d,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,ae.h,ae.j,ae.f,vt.h,Fe.b,vt.a,vt.j,vt.m],pipes:[g.d,Wt.a,P.b,si,P.f],styles:[".avatar[_ngcontent-%COMP%]{text-decoration:none;background:#135f7f;color:#fff;width:100px;height:100px;border-radius:5px;display:block;overflow:hidden;margin:5px}.form-group[_ngcontent-%COMP%]{margin:0}.vertical-divider[_ngcontent-%COMP%]{height:80%}.avatarAccount[_ngcontent-%COMP%]{border:3px solid #f99830;height:45px!important;width:45px!important;background-size:cover;background-repeat:no-repeat;background-position:50%}.accountInfo[_ngcontent-%COMP%]{margin-left:20px!important;display:flex!important}.accountInfo[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1;align-items:center;display:flex}"]}),t})(),SN=(()=>{class t{constructor(t,e,i){this.http=t,this.data=e,this.dialogRef=i,this.redirectUser="",this.processMode=""}setRedirectUser(t){this.redirectUser=t}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(v.b),n.Qb(q.a),n.Qb(q.h))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:30,vars:23,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["redirectConfForm","ngForm"],["class","alert-message alert-message-info","role","alert",3,"innerHTML",4,"ngIf"],[1,"input-group"],["id","processMode","name","processMode","color","primary",2,"display","inline-flex","flex-direction","column",3,"ngModel","ngModelChange"],["value","","checked","true","color","primary"],["value","delete","color","primary"],["value","reaffect","color","primary"],["singleMode","","required","",3,"labelPlaceholder","labelList","routeDatas","targetSearchKey","subInfoKey","triggerEvent",4,"ngIf"],["role","alert",1,"alert-message","alert-message-info",2,"max-width","inherit"],[4,"ngIf"],[3,"innerHTML",4,"ngIf"],[1,"divider-modal"],["mat-raised-button","","color","primary","type","submit",3,"disabled","click"],["role","alert",1,"alert-message","alert-message-info",3,"innerHTML"],["singleMode","","required","",3,"labelPlaceholder","labelList","routeDatas","targetSearchKey","subInfoKey","triggerEvent"],[3,"innerHTML"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-dialog-content"),n.Wb(5,"form",null,2),n.Oc(7,xN,2,3,"div",3),n.Oc(8,CN,2,3,"div",3),n.Wb(9,"div",4),n.Wb(10,"mat-radio-group",5),n.dc("ngModelChange",(function(t){return e.processMode=t})),n.Wb(11,"mat-radio-button",6),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Wb(14,"mat-radio-button",7),n.Qc(15),n.ic(16,"translate"),n.Vb(),n.Wb(17,"mat-radio-button",8),n.Qc(18),n.ic(19,"translate"),n.Vb(),n.Vb(),n.Oc(20,ON,3,10,"plugin-autocomplete",9),n.Wb(21,"div",10),n.Oc(22,DN,4,3,"span",11),n.Oc(23,wN,2,3,"span",12),n.Oc(24,MN,4,3,"span",11),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Rb(25,"span",13),n.Wb(26,"mat-dialog-actions"),n.Wb(27,"button",14),n.dc("click",(function(){return e.dialogRef.close({newUser:e.redirectUser,processMode:e.processMode})})),n.Qc(28),n.ic(29,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,13,"lang.redirects")),n.Db(5),n.oc("ngIf",e.data.hasConfidentialityInstances),n.Db(1),n.oc("ngIf",e.data.hasListTemplates),n.Db(2),n.oc("ngModel",e.processMode),n.Db(2),n.Sc(" ",n.jc(13,15,"lang.doNothingRedirect")," "),n.Db(3),n.Sc(" ",n.jc(16,17,"lang.removeUserRedirect")," "),n.Db(3),n.Sc(" ",n.jc(19,19,"lang.reaffectUserRedirect")," "),n.Db(2),n.oc("ngIf","reaffect"==e.processMode),n.Db(2),n.oc("ngIf",""==e.processMode),n.Db(1),n.oc("ngIf","delete"==e.processMode),n.Db(1),n.oc("ngIf","reaffect"==e.processMode),n.Db(3),n.oc("disabled",!e.redirectUser&&"reaffect"==e.processMode),n.Db(1),n.Rc(n.jc(29,21,"lang.validate")))},directives:[q.i,q.f,X.K,X.v,X.w,P.t,hc.b,X.u,X.x,hc.a,q.c,k.b,ii],pipes:[g.d],styles:[".mat-dialog-content[_ngcontent-%COMP%]{max-height: 65vh;width:600px;}"]}),t})();const IN=["snav2"],PN=["adminMenuTemplate"];function VN(t,e){1&t&&(n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",11),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",12),n.Rb(5,"mat-icon",13),n.Wb(6,"p",14),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,2,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,4,"lang.add")," "))}function RN(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Vb())}function jN(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",37),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Rc(n.jc(2,3,"lang.id"))}}function AN(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",t.group_id," ")}}function WN(t,e){1&t&&(n.Wb(0,"mat-header-cell",38),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.description")," "))}function TN(t,e){if(1&t&&(n.Wb(0,"mat-cell",39),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.group_desc," ")}}function EN(t,e){1&t&&n.Rb(0,"mat-header-cell",40)}function FN(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",41),n.Wb(1,"button",42),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.preDelete(a)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",43),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.pc("matTooltip",n.jc(2,1,"lang.delete")))}function LN(t,e){1&t&&n.Rb(0,"mat-header-row")}function QN(t,e){1&t&&(n.Rb(0,"mat-row",44),n.ic(1,"translate")),2&t&&(n.qc("routerLink","/administration/groups/",e.$implicit.id,""),n.pc("matTooltip",n.jc(1,2,"lang.view")))}function NN(t,e){if(1&t&&(n.Wb(0,"mat-card",17),n.Wb(1,"div",18),n.Wb(2,"div",19),n.Wb(3,"mat-form-field"),n.Rb(4,"input",20),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Wb(6,"div",19),n.Rb(7,"mat-paginator",21,22),n.Vb(),n.Vb(),n.Wb(9,"mat-table",23,24),n.Ub(11,25),n.Oc(12,jN,3,5,"mat-header-cell",26),n.Oc(13,AN,2,3,"mat-cell",27),n.Tb(),n.Ub(14,28),n.Oc(15,WN,3,3,"mat-header-cell",29),n.Oc(16,TN,2,1,"mat-cell",30),n.Tb(),n.Ub(17,31),n.Oc(18,EN,1,0,"mat-header-cell",32),n.Oc(19,FN,4,3,"mat-cell",33),n.Tb(),n.Oc(20,LN,1,0,"mat-header-row",34),n.Oc(21,QN,2,4,"mat-row",35),n.Vb(),n.Wb(22,"div",36),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.pc("placeholder",n.jc(5,10,"lang.filterBy")),n.oc("formControl",t.adminService.getFilterField()),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.adminService.getDataSource()),n.Db(11),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns),n.Db(2),n.Tc(" ",t.groups.length," ",n.jc(24,12,"lang.groups"),"")}}function zN(t,e){if(1&t&&(n.Wb(0,"mat-list-item",11),n.Rb(1,"mat-icon",12),n.Rb(2,"h4",13),n.Wb(3,"p",13),n.Qc(4),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(4),n.Tc(" ",t.firstname," ",t.lastname,"")}}function BN(t,e){if(1&t&&(n.Wb(0,"mat-option",14),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.group_desc," ")}}let UN=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this.translate=t,this.http=e,this.notify=i,this.dialog=n,this.headerService=a,this.appService=s,this.functions=o,this.adminService=r,this.viewContainerRef=c,this.loading=!1,this.config={},this.groups=[],this.groupsForAssign=[],this.displayedColumns=["group_id","group_desc","actions"],this.filterColumns=["group_id","group_desc"]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.groups")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,this.http.get("../rest/groups").subscribe(t=>{this.groups=t.groups,this.loading=!1,setTimeout(()=>{this.adminService.setDataSource("admin_groups",this.groups,this.sort,this.paginator,this.filterColumns)},0)},t=>{this.notify.handleErrors(t)})}preDelete(t){0===t.users.length?confirm(this.translate.instant("lang.reallyWantToDeleteThisGroup"))&&this.deleteGroup(t):(this.groupsForAssign=[],this.groups.forEach(e=>{t.group_id!==e.group_id&&this.groupsForAssign.push(e)}),this.config={panelClass:"maarch-modal",data:{id:t.id,group_desc:t.group_desc,groupsForAssign:this.groupsForAssign,users:t.users}},this.dialogRef=this.dialog.open($N,this.config),this.dialogRef.afterClosed().subscribe(e=>{e&&("_NO_REPLACEMENT"===e?this.deleteGroup(t):this.http.put("../rest/groups/"+t.id+"/reassign/"+e,{}).subscribe(e=>{this.deleteGroup(t)},t=>{this.notify.error(t.error.errors)})),this.dialogRef=null}))}deleteGroup(t){this.http.delete("../rest/groups/"+t.id).subscribe(t=>{setTimeout(()=>{this.groups=t.groups,this.adminService.setDataSource("admin_groups",this.groups,this.sort,this.paginator,this.filterColumns)},0),this.notify.success(this.translate.instant("lang.groupDeleted"))},t=>{this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a),n.Qb(OL),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(IN,!0),n.Kc(PN,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:15,vars:8,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["mat-subheader",""],["mat-list-item","","routerLink","/administration/groups/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"row",2,"margin","0px"],[1,"col-md-6","col-xs-6"],["matInput","",3,"formControl","placeholder"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSortDisableClear","","matSort","",3,"dataSource"],["table",""],["matColumnDef","group_id"],["mat-sort-header","",3,"hide-for-mobile",4,"matHeaderCellDef"],[3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","group_desc"],["mat-sort-header","","style","flex:2;",4,"matHeaderCellDef"],["style","flex:2;",4,"matCellDef"],["matColumnDef","actions"],["style","flex:1;",4,"matHeaderCellDef"],["style","justify-content: flex-end;flex:1;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"routerLink","matTooltip",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["mat-sort-header",""],["mat-sort-header","",2,"flex","2"],[2,"flex","2"],[2,"flex","1"],[2,"justify-content","flex-end","flex","1"],["mat-icon-button","","color","warn",3,"matTooltip","click"],["aria-hidden","true",1,"fa","fa-trash-alt","fa-2x"],[2,"cursor","pointer",3,"routerLink","matTooltip"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,VN,9,6,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,RN,2,0,"div",9),n.Oc(14,NN,25,14,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,R.h,R.g,R.d,o.f,S.a,R.c,W.l,V.c,K.a,Y.c,J.b,X.d,X.u,X.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,vt.h,Fe.b,vt.a,k.b,A.b,vt.j,vt.m,o.d],pipes:[g.d],encapsulation:2}),t})(),$N=(()=>{class t{constructor(t,e,i){this.http=t,this.data=e,this.dialogRef=i}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(v.b),n.Qb(q.a),n.Qb(q.h))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:34,vars:30,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["changeGroupUsersForm","ngForm"],["role","alert",1,"alert-message","alert-message-info"],["style","height:25px;",4,"ngFor","ngForOf"],["id","groups_redirect","name","groups_redirect","required","",3,"title","placeholder","ngModel","ngModelChange"],["value","_NO_REPLACEMENT"],[3,"label"],[3,"value",4,"ngFor","ngForOf"],[1,"divider-modal"],["mat-raised-button","","color","primary","type","submit",3,"disabled","click"],[2,"height","25px"],["mat-list-icon","","color","primary",1,"fa","fa-user"],["mat-line",""],[3,"value"]],template:function(t,e){if(1&t&&(n.Wb(0,"div",0),n.Wb(1,"h2",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-dialog-content"),n.Wb(5,"form",null,2),n.Wb(7,"div",3),n.Qc(8," Le groupe "),n.Wb(9,"b"),n.Qc(10),n.Vb(),n.Qc(11),n.ic(12,"translate"),n.Wb(13,"b"),n.Qc(14),n.Vb(),n.Qc(15),n.ic(16,"translate"),n.Wb(17,"mat-list"),n.Oc(18,zN,5,2,"mat-list-item",4),n.Vb(),n.Vb(),n.Wb(19,"mat-form-field"),n.Wb(20,"mat-select",5),n.dc("ngModelChange",(function(t){return e.data.group_redirect=t})),n.ic(21,"translate"),n.ic(22,"translate"),n.Wb(23,"mat-option",6),n.Qc(24),n.ic(25,"translate"),n.Vb(),n.Wb(26,"mat-optgroup",7),n.ic(27,"translate"),n.Oc(28,BN,2,2,"mat-option",8),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Rb(29,"span",9),n.Wb(30,"mat-dialog-actions"),n.Wb(31,"button",10),n.dc("click",(function(){return e.dialogRef.close(e.data.group_redirect)})),n.Qc(32),n.ic(33,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.zc(6);n.Db(2),n.Rc(n.jc(3,14,"lang.groupRedirect")),n.Db(8),n.Rc(e.data.group_desc),n.Db(1),n.Sc(" ",n.jc(12,16,"lang.isAssociatedTo")," "),n.Db(3),n.Rc(e.data.users.length),n.Db(1),n.Sc(" ",n.jc(16,18,"lang.usersAlt"),": "),n.Db(3),n.oc("ngForOf",e.data.users),n.Db(2),n.pc("title",n.jc(21,20,"lang.chooseRedirectGroup")),n.pc("placeholder",n.jc(22,22,"lang.chooseRedirectGroup")),n.oc("ngModel",e.data.group_redirect),n.Db(4),n.Sc("-- ",n.jc(25,24,"lang.noReplacement")," --"),n.Db(2),n.pc("label",n.jc(27,26,"lang.groups")),n.Db(2),n.oc("ngForOf",e.data.groupsForAssign),n.Db(3),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(33,28,"lang.validate"))}},directives:[q.i,q.f,X.K,X.v,X.w,R.a,P.s,Y.c,ee.a,X.F,X.u,X.x,W.p,W.o,q.c,k.b,R.d,S.a,R.c,W.l],pipes:[g.d],encapsulation:2}),t})();function HN(t,e){1&t&&(n.Wb(0,"div",19),n.Rb(1,"mat-spinner",20),n.Vb())}function GN(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",21),n.Qc(1),n.ic(2,"translate"),n.Wb(3,"button",22),n.dc("click",(function(){n.Dc(t);const e=n.hc();return e.toggleIndex(!e.indexingInfo.canIndex)})),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.Sc("",n.jc(2,2,"lang.warnIndex")," "),n.Db(3),n.Rc(n.jc(5,4,"lang.enableIndex")))}function XN(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",23),n.dc("click",(function(){n.Dc(t);const e=n.hc();return e.toggleIndex(!e.indexingInfo.canIndex)})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.disableIndex")))}function qN(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item",24),n.Wb(1,"div"),n.Rb(2,"i",25),n.Vb(),n.Wb(3,"div",26),n.Qc(4),n.Vb(),n.Wb(5,"div"),n.Wb(6,"button",27),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc().removeAction(i)})),n.Rb(7,"mat-icon",28),n.Vb(),n.Vb(),n.Rb(8,"mat-divider"),n.Vb()}if(2&t){const t=e.$implicit;n.oc("cdkDragData",t),n.Db(4),n.Sc(" ",t.label_action,"")}}let KN=(()=>{class t{constructor(t,e,i,a){this.translate=t,this.http=e,this.notify=i,this.dialog=a,this.loading=!0,this.resfreshShortcut=new n.o,this.keywordEntities=[],this.actionList=[],this.indexingInfo={canIndex:!1,actions:[],keywords:[],entities:[]},this.keywordEntities=[{id:"ALL_ENTITIES",keyword:"ALL_ENTITIES",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:this.translate.instant("lang.allEntities")},{id:"ENTITIES_JUST_BELOW",keyword:"ENTITIES_JUST_BELOW",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:this.translate.instant("lang.immediatelyBelowMyPrimaryEntity")},{id:"ENTITIES_BELOW",keyword:"ENTITIES_BELOW",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:this.translate.instant("lang.belowAllMyEntities")},{id:"ALL_ENTITIES_BELOW",keyword:"ALL_ENTITIES_BELOW",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:this.translate.instant("lang.belowMyPrimaryEntity")},{id:"MY_ENTITIES",keyword:"MY_ENTITIES",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:this.translate.instant("lang.myEntities")},{id:"MY_PRIMARY_ENTITY",keyword:"MY_PRIMARY_ENTITY",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:this.translate.instant("lang.myPrimaryEntity")},{id:"SAME_LEVEL_ENTITIES",keyword:"SAME_LEVEL_ENTITIES",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:this.translate.instant("lang.sameLevelMyPrimaryEntity")},{id:"ENTITIES_JUST_UP",keyword:"ENTITIES_JUST_UP",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:this.translate.instant("lang.immediatelySuperiorMyPrimaryEntity")}]}ngOnInit(){this.getIndexingInformations().pipe(Object(mt.a)(t=>this.indexingInfo.canIndex=t.group.canIndex),Object(mt.a)(t=>this.getActions(t.actions)),Object(mt.a)(t=>this.getSelectedActions(t.group.indexationParameters.actions)),Object(l.a)(t=>this.getEntities(t)),Object(l.a)(t=>this.getSelectedEntities(t)),Object(mt.a)(t=>this.initEntitiesTree(t)),Object(Xt.a)(()=>this.loading=!1)).subscribe()}initEntitiesTree(t){$("#jstree").jstree({checkbox:{three_state:!1},core:{force_text:!0,themes:{name:"proton",responsive:!0},data:t},plugins:["checkbox","search"]});let e=!1;$("#jstree_search").keyup((function(){e&&clearTimeout(e),e=setTimeout((function(){const t=$("#jstree_search").val();$("#jstree").jstree(!0).search(t)}),250)})),$("#jstree").on("select_node.jstree",(t,e)=>{isNaN(e.node.id)?this.addKeyword(e.node.id):this.addEntity(e.node.id)}).on("deselect_node.jstree",(t,e)=>{isNaN(e.node.id)?this.removeKeyword(e.node.id):this.removeEntity(e.node.id)}).jstree()}getEntities(t){return this.keywordEntities.forEach(e=>{e.state=t.group.indexationParameters.keywords.indexOf(e.id)>-1?{opened:!0,selected:!0}:{opened:!0,selected:!1}}),t.entities=this.keywordEntities.concat(t.entities),t}getSelectedEntities(t){return this.indexingInfo.entities=[...t.group.indexationParameters.entities],this.indexingInfo.keywords=[...t.group.indexationParameters.keywords],t.entities}getActions(t){this.actionList=t}getIndexingInformations(){return this.http.get("../rest/groups/"+this.groupId+"/indexing")}getSelectedActions(t){let e=-1;t.forEach(t=>{e=this.actionList.findIndex(e=>e.id==t),e>-1&&(this.indexingInfo.actions.push(this.actionList[e]),this.actionList.splice(e,1))})}addEntity(t){const e=this.indexingInfo.entities.concat([t]);this.http.put("../rest/groups/"+this.groupId+"/indexing",{entities:e}).pipe(Object(mt.a)(()=>{this.indexingInfo.entities.push(t)}),Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.entityAdded"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}removeEntity(t){const e=this.indexingInfo.entities.indexOf(t),i=[...this.indexingInfo.entities];i.splice(e,1),this.http.put("../rest/groups/"+this.groupId+"/indexing",{entities:i}).pipe(Object(mt.a)(()=>{this.indexingInfo.entities.splice(e,1)}),Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.entityDeleted"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}addKeyword(t){const e=this.indexingInfo.keywords.concat([t]);this.http.put("../rest/groups/"+this.groupId+"/indexing",{keywords:e}).pipe(Object(mt.a)(()=>{this.indexingInfo.keywords.push(t)}),Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.keywordAdded"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}removeKeyword(t){const e=this.indexingInfo.keywords.indexOf(t),i=[...this.indexingInfo.keywords];i.splice(e,1),this.http.put("../rest/groups/"+this.groupId+"/indexing",{keywords:i}).pipe(Object(mt.a)(()=>{this.indexingInfo.keywords.splice(e,1)}),Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.keywordDeleted"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}addAction(t){const e=this.indexingInfo.actions.map(t=>t.id).concat([t].map(t=>t.id));this.http.put("../rest/groups/"+this.groupId+"/indexing",{actions:e}).pipe(Object(mt.a)(()=>{const e=this.actionList.findIndex(e=>e.id===t.id),i=Object.assign({},this.actionList[e]);this.indexingInfo.actions.push(i),this.actionList.splice(e,1)}),Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.actionAdded"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}removeAction(t){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.confirmAction")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(l.a)(()=>{this.dialogRef=null;const e=[...this.indexingInfo.actions];return e.splice(t,1),e.map(t=>t.id)}),p(t=>this.http.put("../rest/groups/"+this.groupId+"/indexing",{actions:t})),Object(mt.a)(()=>{this.actionList.push(this.indexingInfo.actions[t]),this.indexingInfo.actions.splice(t,1)}),Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.actionDeleted"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}toggleIndex(t){this.http.put("../rest/groups/"+this.groupId+"/indexing",{canIndex:t}).pipe(Object(mt.a)(()=>{this.indexingInfo.canIndex=t,this.resfreshShortcut.emit()}),Object(mt.a)(()=>{this.notify.success(this.translate.instant(this.indexingInfo.canIndex?"lang.indexEnabled":"lang.indexDisabled"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}drop(t){if(t.previousContainer===t.container){Object(lo.h)(t.container.data,t.previousIndex,t.currentIndex);const e=this.indexingInfo.actions.map(t=>t.id);this.http.put("../rest/groups/"+this.groupId+"/indexing",{actions:e}).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.actionAdded"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-indexing-administration"]],inputs:{groupId:"groupId"},outputs:{resfreshShortcut:"resfreshShortcut"},decls:27,vars:22,consts:[["class","loading",4,"ngIf"],[1,"row",2,"margin","0px"],[1,"col-md-12"],["class","alert-message alert-message-danger","role","alert","style","margin-top: 30px;",4,"ngIf"],["color","warn","mat-raised-button","",3,"click",4,"ngIf"],[1,"col-md-8",2,"margin-top","20px"],[1,"formType"],[1,"formType-title"],[1,"infoActions",3,"innerHTML"],["appearance","outline",3,"labelPlaceholder","datas","targetSearchKey","triggerEvent"],["cdkDropList","","role","list",1,"selectedActionList",3,"cdkDropListData","cdkDropListDropped"],["class","selectedAction","role","listitem","cdkDrag","","cdkDragLockAxis","y",3,"cdkDragData",4,"ngFor","ngForOf"],[1,"col-md-4",2,"margin-top","20px"],[1,"formType","jstreeEntities"],["appearance","outline"],["color","primary","matPrefix","",1,"fa","fa-search"],["matInput","","id","jstree_search","name","jstree_search","type","text",3,"placeholder"],["id","jstree"],["jstree",""],[1,"loading"],[2,"margin","auto"],["role","alert",1,"alert-message","alert-message-danger",2,"margin-top","30px"],["mat-raised-button","",3,"click"],["color","warn","mat-raised-button","",3,"click"],["role","listitem","cdkDrag","","cdkDragLockAxis","y",1,"selectedAction",3,"cdkDragData"],["color","primary","cdkDragHandle","",1,"fas","fa-bars","fa-2x",2,"cursor","move"],[1,"actionLabel"],["mat-icon-button","","color","warn",3,"click"],[1,"fa","fa-trash"]],template:function(t,e){1&t&&(n.Oc(0,HN,2,0,"div",0),n.Wb(1,"div",1),n.Wb(2,"div",2),n.Oc(3,GN,6,6,"div",3),n.Oc(4,XN,3,3,"button",4),n.Vb(),n.Wb(5,"div",5),n.Wb(6,"div",6),n.Wb(7,"div",7),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Rb(10,"mat-hint",8),n.ic(11,"translate"),n.Wb(12,"plugin-autocomplete",9),n.dc("triggerEvent",(function(t){return e.addAction(t)})),n.ic(13,"translate"),n.Vb(),n.Wb(14,"mat-list",10),n.dc("cdkDropListDropped",(function(t){return e.drop(t)})),n.Oc(15,qN,9,2,"mat-list-item",11),n.Vb(),n.Vb(),n.Vb(),n.Wb(16,"div",12),n.Wb(17,"div",13),n.Wb(18,"div",7),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"mat-form-field",14),n.Rb(22,"mat-icon",15),n.Rb(23,"input",16),n.ic(24,"translate"),n.Vb(),n.Rb(25,"div",17,18),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.oc("ngIf",e.loading),n.Db(3),n.oc("ngIf",!e.indexingInfo.canIndex),n.Db(1),n.oc("ngIf",e.indexingInfo.canIndex),n.Db(4),n.Sc(" ",n.jc(9,12,"lang.availableIndexingActions")," "),n.Db(2),n.oc("innerHTML",n.jc(11,14,"lang.actionsInfo"),n.Ec),n.Db(2),n.oc("labelPlaceholder",n.jc(13,16,"lang.linkNewAction"))("datas",e.actionList)("targetSearchKey","label_action"),n.Db(2),n.oc("cdkDropListData",e.indexingInfo.actions),n.Db(1),n.oc("ngForOf",e.indexingInfo.actions),n.Db(4),n.Sc(" ",n.jc(20,18,"lang.authorizedEntities")," "),n.Db(4),n.pc("placeholder",n.jc(24,20,"lang.searchEntities")))},directives:[P.t,Y.f,ii,R.a,lo.e,P.s,Y.c,S.a,Y.i,J.b,V.c,k.b,R.d,lo.a,lo.b,T.a],pipes:[g.d],styles:[".loading[_ngcontent-%COMP%]{display:flex;height:100%;position:absolute;background:#fff;z-index:2}.loading[_ngcontent-%COMP%], .selectedActionList[_ngcontent-%COMP%]{width:100%}.infoActions[_ngcontent-%COMP%]{font-size:80%}.selectedAction[_ngcontent-%COMP%]{height:70px}.selectedAction[_ngcontent-%COMP%] .actionLabel[_ngcontent-%COMP%]{padding-left:10px;flex:1}.formType[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:10px;border-radius:4px;border:1px solid #ccc;position:relative;padding:10px}.formType-title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;background:#fff;position:absolute;top:-18px;left:10px;padding:0;margin:0;color:#135f7f}.alert-message[_ngcontent-%COMP%]{max-width:100%}a[_ngcontent-%COMP%]{cursor:pointer}.jstreeEntities[_ngcontent-%COMP%] .mat-form-field-appearance-outline[_ngcontent-%COMP%]{font-size:11px}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.cdk-drag-preview[_ngcontent-%COMP%] .mat-icon-button[_ngcontent-%COMP%], .cdk-drag-preview[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{visibility:hidden}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.selectedAction[_ngcontent-%COMP%]:last-child{border:none}.selectedAction.cdk-drop-list-dragging[_ngcontent-%COMP%] .selectedAction[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}"]}),t})();const YN=["snav2"],JN=["paginatorBaskets"],ZN=["sortBaskets"],tz=["sortUsers"];function ez(t,e){1&t&&(n.Wb(0,"div",13),n.Rb(1,"mat-spinner",14),n.Vb())}function iz(t,e){if(1&t){const t=n.Xb();n.Wb(0,"input",28),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).group.group_id=e})),n.ic(1,"translate"),n.Vb()}if(2&t){const t=n.hc(2);n.pc("placeholder",n.jc(1,2,"lang.id")),n.oc("ngModel",t.group.group_id)}}function nz(t,e){if(1&t){const t=n.Xb();n.Wb(0,"input",29),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).group.group_id=e})),n.ic(1,"translate"),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(2);n.pc("placeholder",n.jc(1,3,"lang.id")),n.pc("title",n.jc(2,5,"lang.id")),n.oc("ngModel",t.group.group_id)}}function az(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item"),n.Wb(1,"mat-slide-toggle",37),n.dc("change",(function(i){n.Dc(t);const a=e.$implicit;return n.hc(4).toggleService(i,a)})),n.ic(2,"translate"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(4);n.Db(1),n.pc("name",t.label),n.pc("matTooltip",n.jc(2,5,t.comment)),n.oc("checked",i.group.privileges.indexOf(t.id)>-1)("disabled","create_custom"==t.id&&i.group.lockAdvancedPrivileges),n.Db(2),n.Sc(" ",n.jc(4,7,t.label),"")}}function sz(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",41),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc(4);return e.stopPropagation(),a.openUserParams(i.id)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",42),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc(4);n.Ib("active",e.panelMode===t.id),n.oc("title",n.jc(1,4,"lang.goToAdminParams"))("disabled",-1===e.group.privileges.indexOf(t.id))}}function oz(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",38),n.Wb(1,"mat-slide-toggle",39),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.checked=i}))("change",(function(i){n.Dc(t);const a=e.$implicit;return n.hc(4).toggleService(i,a)})),n.ic(2,"translate"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Oc(5,sz,3,6,"button",40),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(4);n.Db(1),n.pc("name",t.label),n.pc("matTooltip",n.jc(2,7,t.comment)),n.oc("ngModel",t.checked)("checked",t.checked)("disabled","admin_update_control"==t.id&&i.group.lockAdvancedPrivileges||"admin_password_rules"==t.id&&"standard"!==i.authService.authMode),n.Db(2),n.Sc(" ",n.jc(4,9,t.label)," "),n.Db(2),n.oc("ngIf",t.hasParams)}}function rz(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item"),n.Wb(1,"mat-slide-toggle",44),n.dc("change",(function(i){n.Dc(t);const a=e.$implicit;return n.hc(6).toggleService(i,a)})),n.ic(2,"translate"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(6);n.Db(1),n.pc("name",t.label),n.pc("matTooltip",n.jc(2,4,t.comment)),n.oc("checked",i.group.privileges.indexOf(t.id)>-1),n.Db(2),n.Sc(" ",n.jc(4,6,t.label)," ")}}function cz(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-list"),n.Oc(2,rz,5,8,"mat-list-item",30),n.ic(3,"filterList"),n.ic(4,"sortBy"),n.Vb(),n.Tb()),2&t){const t=n.hc().$implicit;n.hc();const e=n.zc(19);n.Db(2),n.oc("ngForOf",n.lc(3,1,n.kc(4,5,t.services,"label"),e.value,"label"))}}function lz(t,e){if(1&t&&(n.Wb(0,"mat-option",52),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc("",n.jc(2,2,t.label)," ")}}function dz(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item",46),n.Rb(1,"span",47),n.Wb(2,"mat-form-field",48),n.Wb(3,"mat-select",49),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.current=i}))("selectionChange",(function(i){n.Dc(t);const a=e.$implicit;return n.hc(6).changeDifflistPrivilege(i,a.id)})),n.Wb(4,"mat-option",50),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Oc(7,lz,3,4,"mat-option",51),n.Vb(),n.Vb(),n.Qc(8,". "),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.oc("innerHTML",t.label,n.Ec),n.Db(2),n.oc("ngModel",t.current),n.Db(2),n.Rc(n.jc(6,4,"lang.noRole")),n.Db(2),n.oc("ngForOf",t.services)}}function hz(t,e){if(1&t&&(n.Ub(0),n.Oc(1,dz,9,6,"mat-list-item",45),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngForOf",t.services)}}function uz(t,e){if(1&t&&(n.Wb(0,"mat-option",52),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc("",n.jc(2,2,t.label)," ")}}function pz(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item",46),n.Rb(1,"span",47),n.Wb(2,"mat-form-field",53),n.Wb(3,"mat-select",49),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.current=i}))("selectionChange",(function(e){return n.Dc(t),n.hc(6).changePersonalDataPrivilege(e)})),n.Wb(4,"mat-option",50),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Oc(7,uz,3,4,"mat-option",51),n.Vb(),n.Vb(),n.Qc(8,". "),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.oc("innerHTML",t.label,n.Ec),n.Db(2),n.oc("ngModel",t.current),n.Db(2),n.Sc("",n.jc(6,4,"lang.notVisible")," "),n.Db(2),n.oc("ngForOf",t.services)}}function bz(t,e){if(1&t&&(n.Ub(0),n.Oc(1,pz,9,6,"mat-list-item",45),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngForOf",t.services)}}const fz=function(){return["diffusionList","confidentialityAndSecurity"]};function mz(t,e){if(1&t&&(n.Wb(0,"mat-expansion-panel",43),n.ic(1,"filterList"),n.Wb(2,"mat-expansion-panel-header"),n.Wb(3,"mat-panel-title"),n.Qc(4),n.Vb(),n.Vb(),n.Oc(5,cz,5,8,"ng-container",12),n.Oc(6,hz,2,1,"ng-container",12),n.Oc(7,bz,2,1,"ng-container",12),n.Vb()),2&t){const t=e.$implicit;n.hc();const i=n.zc(19);n.Ib("emptyExpansionPanel",0==n.lc(1,6,t.services,i.value,"label").length),n.Db(4),n.Sc(" ",t.label," "),n.Db(1),n.oc("ngIf",-1===n.uc(10,fz).indexOf(t.id)),n.Db(1),n.oc("ngIf","diffusionList"===t.id),n.Db(1),n.oc("ngIf","confidentialityAndSecurity"===t.id)}}function gz(t,e){if(1&t&&(n.Wb(0,"mat-tab-group"),n.Wb(1,"mat-tab",16),n.ic(2,"translate"),n.Wb(3,"mat-list"),n.Oc(4,az,5,9,"mat-list-item",30),n.ic(5,"sortBy"),n.Vb(),n.Vb(),n.Wb(6,"mat-tab",16),n.ic(7,"translate"),n.Wb(8,"mat-form-field",31),n.Rb(9,"input",32,33),n.ic(11,"translate"),n.Vb(),n.Oc(12,oz,6,11,"div",34),n.ic(13,"filterList"),n.ic(14,"sortBy"),n.Vb(),n.Wb(15,"mat-tab",16),n.ic(16,"translate"),n.Wb(17,"mat-form-field",31),n.Rb(18,"input",32,35),n.ic(20,"translate"),n.Vb(),n.Oc(21,mz,8,11,"mat-expansion-panel",36),n.ic(22,"sortBy"),n.Vb(),n.Vb()),2&t){const t=n.zc(10),e=n.hc(3);n.Db(1),n.pc("label",n.jc(2,8,"lang.menus")),n.Db(3),n.oc("ngForOf",n.kc(5,10,e.privilegeService.getMenus(),"label")),n.Db(2),n.pc("label",n.jc(7,13,"lang.administrationServices")),n.Db(3),n.pc("placeholder",n.jc(11,15,"lang.filterBy")),n.Db(3),n.oc("ngForOf",n.lc(13,17,n.kc(14,21,e.administrationPrivileges,"label"),t.value,"label")),n.Db(3),n.pc("label",n.jc(16,24,"lang.functionnalities")),n.Db(3),n.pc("placeholder",n.jc(20,26,"lang.filterBy")),n.Db(3),n.oc("ngForOf",n.kc(22,28,e.unitPrivileges,"label"))}}function vz(t,e){if(1&t&&(n.Wb(0,"mat-tab",16),n.ic(1,"translate"),n.Oc(2,gz,23,31,"mat-tab-group",12),n.Vb()),2&t){const t=n.hc(2);n.pc("label",n.jc(1,2,"lang.privileges")),n.Db(2),n.oc("ngIf",!t.creationMode)}}function _z(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-indexing-administration",55),n.dc("resfreshShortcut",(function(){return n.Dc(t),n.hc(3).resfreshShortcut()})),n.Vb()}if(2&t){const t=n.hc(3);n.oc("groupId",t.group.id)}}function yz(t,e){1&t&&(n.Wb(0,"mat-tab",16),n.ic(1,"translate"),n.Oc(2,_z,1,1,"ng-template",54),n.Vb()),2&t&&n.pc("label",n.jc(1,1,"lang.indexation"))}const xz=function(){return["/rest/autocomplete/users/administration"]};function Cz(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",70),n.Wb(1,"plugin-autocomplete",71),n.dc("triggerEvent",(function(e){return n.Dc(t),n.hc(3).linkUser(e)})),n.ic(2,"translate"),n.ic(3,"translate"),n.Vb(),n.Rb(4,"hr"),n.Vb()}2&t&&(n.Db(1),n.oc("labelPlaceholder",n.jc(2,4,"lang.linkUser"))("labelList",n.jc(3,6,"lang.availableUsers"))("routeDatas",n.uc(8,xz))("targetSearchKey","idToDisplay"))}function Oz(t,e){1&t&&(n.Wb(0,"mat-header-cell",72),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.firstname")," "))}function Dz(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.firstname," ")}}function wz(t,e){1&t&&(n.Wb(0,"mat-header-cell",72),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.lastname")," "))}function Mz(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.lastname," ")}}function kz(t,e){1&t&&n.Rb(0,"mat-header-row")}const Sz=function(t,e){return{cursor:t,opacity:e}};function Iz(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-row",73),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).goToUserAdmin(i)})),n.ic(1,"translate"),n.Vb()}if(2&t){const t=e.$implicit;n.pc("matTooltip",n.jc(1,3,"lang.view")),n.oc("matTooltipDisabled",!t.allowed)("ngStyle",n.wc(5,Sz,t.allowed?"pointer":"",t.allowed?"1":"0.6"))}}function Pz(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab",16),n.ic(1,"translate"),n.Wb(2,"div",56),n.Oc(3,Cz,5,9,"div",57),n.Wb(4,"div",58),n.Wb(5,"mat-form-field"),n.Wb(6,"input",59),n.dc("keyup",(function(e){return n.Dc(t),n.hc(2).applyFilter(e.target.value)})),n.ic(7,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(8,"div",58),n.Rb(9,"mat-paginator",60,61),n.Vb(),n.Vb(),n.Wb(11,"mat-table",62,63),n.Ub(13,64),n.Oc(14,Oz,3,3,"mat-header-cell",65),n.Oc(15,Dz,2,1,"mat-cell",66),n.Tb(),n.Ub(16,67),n.Oc(17,wz,3,3,"mat-header-cell",65),n.Oc(18,Mz,2,1,"mat-cell",66),n.Tb(),n.Oc(19,kz,1,0,"mat-header-row",68),n.Oc(20,Iz,2,8,"mat-row",69),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.pc("label",n.jc(1,9,"lang.relatedUsers")),n.Db(3),n.oc("ngIf",t.group.canAdminUsers),n.Db(3),n.pc("placeholder",n.jc(7,11,"lang.filterBy")),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.usersDataSource),n.Db(8),n.oc("matHeaderRowDef",t.usersDisplayedColumns),n.Db(1),n.oc("matRowDefColumns",t.usersDisplayedColumns)}}function Vz(t,e){1&t&&(n.Wb(0,"mat-header-cell",72),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.label")," "))}function Rz(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.basket_name," ")}}function jz(t,e){1&t&&(n.Wb(0,"mat-header-cell",72),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.description")," "))}function Az(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.basket_desc," ")}}function Wz(t,e){1&t&&n.Rb(0,"mat-header-row")}function Tz(t,e){1&t&&(n.Rb(0,"mat-row",80),n.ic(1,"translate")),2&t&&(n.qc("routerLink","/administration/baskets/",e.$implicit.basket_id,""),n.pc("matTooltip",n.jc(1,2,"lang.view")))}function Ez(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab",16),n.ic(1,"translate"),n.Wb(2,"div",56),n.Wb(3,"div",58),n.Wb(4,"mat-form-field"),n.Wb(5,"input",59),n.dc("keyup",(function(e){return n.Dc(t),n.hc(2).applyBasketsFilter(e.target.value)})),n.ic(6,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(7,"div",58),n.Rb(8,"mat-paginator",60,74),n.Vb(),n.Vb(),n.Wb(10,"mat-table",75,76),n.Ub(12,77),n.Oc(13,Vz,3,3,"mat-header-cell",65),n.Oc(14,Rz,2,1,"mat-cell",66),n.Tb(),n.Ub(15,78),n.Oc(16,jz,3,3,"mat-header-cell",65),n.Oc(17,Az,2,1,"mat-cell",66),n.Tb(),n.Oc(18,Wz,1,0,"mat-header-row",68),n.Oc(19,Tz,2,4,"mat-row",79),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.pc("label",n.jc(1,8,"lang.relatedBaskets")),n.Db(5),n.pc("placeholder",n.jc(6,10,"lang.filterBy")),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.basketsDataSource),n.Db(8),n.oc("matHeaderRowDef",t.basketsDisplayedColumns),n.Db(1),n.oc("matRowDefColumns",t.basketsDisplayedColumns)}}function Fz(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",15),n.Wb(1,"mat-tab-group"),n.Wb(2,"mat-tab",16),n.ic(3,"translate"),n.Wb(4,"form",17,18),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Wb(6,"mat-form-field"),n.Oc(7,iz,2,4,"input",19),n.Oc(8,nz,3,7,"input",20),n.Vb(),n.Wb(9,"mat-form-field"),n.Wb(10,"input",21),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().group.group_desc=e})),n.ic(11,"translate"),n.ic(12,"translate"),n.Vb(),n.Vb(),n.Wb(13,"mat-form-field"),n.Wb(14,"input",22),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().group.security.maarch_comment=e})),n.ic(15,"translate"),n.ic(16,"translate"),n.Vb(),n.Vb(),n.Wb(17,"mat-form-field"),n.Wb(18,"textarea",23),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().group.security.where_clause=e})),n.ic(19,"translate"),n.ic(20,"translate"),n.Vb(),n.Wb(21,"mat-icon",24),n.dc("click",(function(){n.Dc(t);const e=n.hc(),i=n.zc(14);return e.panelMode="keywordInfos",i.toggle()})),n.ic(22,"translate"),n.Vb(),n.Vb(),n.Wb(23,"div",25),n.Wb(24,"button",26),n.Qc(25),n.ic(26,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Oc(27,vz,3,4,"mat-tab",27),n.Oc(28,yz,3,3,"mat-tab",27),n.Oc(29,Pz,21,13,"mat-tab",27),n.Oc(30,Ez,20,12,"mat-tab",27),n.Vb(),n.Vb()}if(2&t){const t=n.zc(5),e=n.hc();n.Db(2),n.pc("label",n.jc(3,19,"lang.informations")),n.Db(5),n.oc("ngIf",e.creationMode),n.Db(1),n.oc("ngIf",!e.creationMode),n.Db(2),n.pc("title",n.jc(11,21,"lang.label")),n.pc("placeholder",n.jc(12,23,"lang.label")),n.oc("ngModel",e.group.group_desc),n.Db(4),n.pc("title",n.jc(15,25,"lang.description")),n.pc("placeholder",n.jc(16,27,"lang.description")),n.oc("ngModel",e.group.security.maarch_comment),n.Db(4),n.pc("title",n.jc(19,29,"lang.clauseGroup")),n.pc("placeholder",n.jc(20,31,"lang.clauseGroup")),n.oc("ngModel",e.group.security.where_clause),n.Db(3),n.pc("matTooltip",n.jc(22,33,"lang.keywordHelper")),n.Db(3),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(26,35,"lang.save")),n.Db(2),n.oc("ngIf",!e.creationMode),n.Db(1),n.oc("ngIf",!e.creationMode),n.Db(1),n.oc("ngIf",!e.creationMode),n.Db(1),n.oc("ngIf",!e.creationMode)}}function Lz(t,e){1&t&&(n.Ub(0),n.Wb(1,"mat-nav-list"),n.Wb(2,"h3",81),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb(),n.Wb(5,"mat-list",82),n.Wb(6,"p",83),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Wb(9,"div",84),n.Wb(10,"b"),n.Qc(11,"DESTINATION = @my_primary_entity or DESTINATION in (@subentities[@my_primary_entity])"),n.Vb(),n.Vb(),n.Wb(12,"h4",85),n.Qc(13,"@user :"),n.Vb(),n.Wb(14,"p",86),n.Qc(15),n.ic(16,"translate"),n.Vb(),n.Wb(17,"h4",85),n.Qc(18,"@user_id :"),n.Vb(),n.Wb(19,"p",86),n.Qc(20),n.ic(21,"translate"),n.Vb(),n.Wb(22,"h4",85),n.Qc(23,"@email :"),n.Vb(),n.Wb(24,"p",86),n.Qc(25),n.ic(26,"translate"),n.Vb(),n.Wb(27,"h4",85),n.Qc(28,"@my_entities :"),n.Vb(),n.Wb(29,"p",86),n.Qc(30),n.ic(31,"translate"),n.Vb(),n.Wb(32,"h4",85),n.Qc(33,"@my_entities_id :"),n.Vb(),n.Wb(34,"p",86),n.Qc(35),n.ic(36,"translate"),n.Vb(),n.Wb(37,"h4",85),n.Qc(38,"@my_primary_entity :"),n.Vb(),n.Wb(39,"p",86),n.Qc(40),n.ic(41,"translate"),n.Vb(),n.Wb(42,"h4",85),n.Qc(43,"@my_primary_entity_id :"),n.Vb(),n.Wb(44,"p",86),n.Qc(45),n.ic(46,"translate"),n.Vb(),n.Wb(47,"h4",85),n.Qc(48,"@subentities[('entity_1',...,'entity_n')] : "),n.Vb(),n.Wb(49,"p",86),n.Qc(50),n.ic(51,"translate"),n.Vb(),n.Wb(52,"h4",85),n.Qc(53,"@subentities_id[(1, 2, ...)] :"),n.Vb(),n.Wb(54,"p",86),n.Qc(55),n.ic(56,"translate"),n.Vb(),n.Wb(57,"h4",85),n.Qc(58,"@parent_entity['entity_id'] :"),n.Vb(),n.Wb(59,"p",86),n.Qc(60),n.ic(61,"translate"),n.Vb(),n.Wb(62,"h4",85),n.Qc(63,"@sisters_entities['entity_id'] :"),n.Vb(),n.Wb(64,"p",86),n.Qc(65),n.ic(66,"translate"),n.Vb(),n.Wb(67,"h4",85),n.Qc(68,"@entity_type['type'] :"),n.Vb(),n.Wb(69,"p",86),n.Qc(70),n.ic(71,"translate"),n.Vb(),n.Wb(72,"h4",85),n.Qc(73,"@all_entities :"),n.Vb(),n.Wb(74,"p",86),n.Qc(75),n.ic(76,"translate"),n.Vb(),n.Wb(77,"h4",85),n.Qc(78,"@immediate_children['entity_1',..., 'entity_id'] : "),n.Vb(),n.Wb(79,"p",86),n.Qc(80),n.ic(81,"translate"),n.Vb(),n.Vb(),n.Tb()),2&t&&(n.Db(3),n.Rc(n.jc(4,16,"lang.keywordHelp")),n.Db(4),n.Rc(n.jc(8,18,"lang.keywordHelpDesc_11")),n.Db(8),n.Rc(n.jc(16,20,"lang.keywordHelpDesc_1")),n.Db(5),n.Rc(n.jc(21,22,"lang.keywordHelpDesc_12")),n.Db(5),n.Rc(n.jc(26,24,"lang.keywordHelpDesc_2")),n.Db(5),n.Rc(n.jc(31,26,"lang.keywordHelpDesc_3")),n.Db(5),n.Rc(n.jc(36,28,"lang.keywordHelpDesc_13")),n.Db(5),n.Rc(n.jc(41,30,"lang.keywordHelpDesc_4")),n.Db(5),n.Rc(n.jc(46,32,"lang.keywordHelpDesc_14")),n.Db(5),n.Rc(n.jc(51,34,"lang.keywordHelpDesc_5")),n.Db(5),n.Rc(n.jc(56,36,"lang.keywordHelpDesc_15")),n.Db(5),n.Rc(n.jc(61,38,"lang.keywordHelpDesc_6")),n.Db(5),n.Rc(n.jc(66,40,"lang.keywordHelpDesc_7")),n.Db(5),n.Rc(n.jc(71,42,"lang.keywordHelpDesc_8")),n.Db(5),n.Rc(n.jc(76,44,"lang.keywordHelpDesc_9")),n.Db(5),n.Rc(n.jc(81,46,"lang.keywordHelpDesc_10")))}function Qz(t,e){if(1&t&&(n.Wb(0,"mat-list-option",91),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("selected",t.checked)("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function Nz(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"mat-nav-list"),n.Wb(2,"h3",81),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb(),n.Wb(5,"mat-list",82),n.Wb(6,"p",87),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Wb(9,"mat-selection-list",88,89),n.dc("selectionChange",(function(){n.Dc(t);const e=n.zc(10);return n.hc().updatePrivilegeParams(e.selectedOptions.selected)})),n.Oc(11,Qz,2,3,"mat-list-option",90),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=n.hc();n.Db(3),n.Rc(n.jc(4,3,"lang.adminParamsUsers")),n.Db(4),n.Sc(" ",n.jc(8,5,"lang.chooseAllowedGroups")," : "),n.Db(4),n.oc("ngForOf",t.authorizedGroupsUserParams)}}let zz=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c,l){this.translate=t,this.http=e,this.route=i,this.router=n,this.notify=a,this.headerService=s,this.appService=o,this.privilegeService=r,this.authService=c,this.dialog=l,this.loading=!1,this.paramsLoading=!1,this.group={security:{}},this.menus={},this.usersDisplayedColumns=["firstname","lastname"],this.basketsDisplayedColumns=["basket_name","basket_desc"],this.unitPrivileges=[],this.administrationPrivileges=[],this.authorizedGroupsUserParams=[],this.panelMode="keywordInfos"}applyFilter(t){t=(t=t.trim()).toLowerCase(),this.usersDataSource.filter=t}applyBasketsFilter(t){t=(t=t.trim()).toLowerCase(),this.basketsDataSource.filter=t}ngOnInit(){this.loading=!0,this.route.params.subscribe(t=>{void 0===t.id?(this.headerService.setHeader(this.translate.instant("lang.groupCreation")),this.creationMode=!0,this.loading=!1):(this.creationMode=!1,this.http.get("../rest/groups/"+t.id+"/details").subscribe(t=>{this.group=t.group,this.administrationPrivileges=this.privilegeService.getAdministrations(),this.administrationPrivileges=this.administrationPrivileges.map(t=>Object.assign(Object.assign({},t),{checked:this.group.privileges.indexOf(t.id)>-1})),this.privilegeService.getUnitsPrivileges().forEach(t=>{let e=this.privilegeService.getPrivilegesByUnit(t);if("diffusionList"===t)e=[{id:"indexing_diffList",label:this.translate.instant("lang.diffListPrivilegeMsgIndexing"),current:void 0!==this.group.privileges.filter(t=>["update_diffusion_indexing","update_diffusion_except_recipient_indexing"].indexOf(t)>-1)[0]?this.group.privileges.filter(t=>["update_diffusion_indexing","update_diffusion_except_recipient_indexing"].indexOf(t)>-1)[0]:"",services:this.privilegeService.getPrivileges(["update_diffusion_indexing","update_diffusion_except_recipient_indexing"])},{id:"process_diffList",label:this.translate.instant("lang.diffListPrivilegeMsgProcess"),current:void 0!==this.group.privileges.filter(t=>["update_diffusion_process","update_diffusion_except_recipient_process"].indexOf(t)>-1)[0]?this.group.privileges.filter(t=>["update_diffusion_process","update_diffusion_except_recipient_process"].indexOf(t)>-1)[0]:"",services:this.privilegeService.getPrivileges(["update_diffusion_process","update_diffusion_except_recipient_process"])},{id:"details_diffList",label:this.translate.instant("lang.diffListPrivilegeMsgDetails"),current:void 0!==this.group.privileges.filter(t=>["update_diffusion_details","update_diffusion_except_recipient_details"].indexOf(t)>-1)[0]?this.group.privileges.filter(t=>["update_diffusion_details","update_diffusion_except_recipient_details"].indexOf(t)>-1)[0]:"",services:this.privilegeService.getPrivileges(["update_diffusion_details","update_diffusion_except_recipient_details"])}];else if("confidentialityAndSecurity"===t){let t="";this.group.privileges.filter(t=>"manage_personal_data"===t)[0]?t="manage_personal_data":this.group.privileges.filter(t=>"view_personal_data"===t)[0]&&(t="view_personal_data"),e=[{id:"confidentialityAndSecurity_personal_data",label:this.translate.instant("lang.personalDataMsg"),current:t,services:this.privilegeService.getPrivileges(["view_personal_data","manage_personal_data"])}]}this.unitPrivileges.push({id:t,label:this.translate.instant("lang."+t),services:e})}),this.headerService.setHeader(this.translate.instant("lang.groupModification"),this.group.group_desc),this.loading=!1,setTimeout(()=>{this.usersDataSource=new vt.p(this.group.users),this.usersDataSource.paginator=this.paginator,this.usersDataSource.sort=this.sortUsers,this.basketsDataSource=new vt.p(this.group.baskets),this.basketsDataSource.paginator=this.paginatorBaskets,this.basketsDataSource.sort=this.sortBaskets},0)},t=>{this.notify.handleErrors(t)}))})}changeDifflistPrivilege(t,e){"indexing_diffList"===e?"update_diffusion_indexing"===t.value?this.manageServices(["update_diffusion_indexing","update_diffusion_except_recipient_indexing"]):"update_diffusion_except_recipient_indexing"===t.value?this.manageServices(["update_diffusion_except_recipient_indexing","update_diffusion_indexing"]):this.manageServices(["update_diffusion_indexing","update_diffusion_except_recipient_indexing"],"deleteAll"):"process_diffList"===e?"update_diffusion_process"===t.value?this.manageServices(["update_diffusion_process","update_diffusion_except_recipient_process"]):"update_diffusion_except_recipient_process"===t.value?this.manageServices(["update_diffusion_except_recipient_process","update_diffusion_process"]):this.manageServices(["update_diffusion_process","update_diffusion_except_recipient_process"],"deleteAll"):"update_diffusion_details"===t.value?this.manageServices(["update_diffusion_details","update_diffusion_except_recipient_details"]):"update_diffusion_except_recipient_details"===t.value?this.manageServices(["update_diffusion_except_recipient_details","update_diffusion_details"]):this.manageServices(["update_diffusion_details","update_diffusion_except_recipient_details"],"deleteAll")}manageServices(t,e=null){"deleteAll"!==e?this.http.post(`../rest/groups/${this.group.id}/privileges/${t[0]}`,{}).pipe(Object(mt.a)(()=>{this.group.privileges.push(t[0])}),p(()=>this.http.delete(`../rest/groups/${this.group.id}/privileges/${t[1]}`)),Object(mt.a)(()=>{this.group.privileges.splice(this.group.privileges.indexOf(t[1]),1),this.headerService.resfreshCurrentUser(),this.notify.success(this.translate.instant("lang.groupServicesUpdated"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe():this.http.delete(`../rest/groups/${this.group.id}/privileges/${t[0]}`).pipe(Object(mt.a)(()=>{this.group.privileges.splice(this.group.privileges.indexOf(t[0]),1)}),p(()=>this.http.delete(`../rest/groups/${this.group.id}/privileges/${t[1]}`)),Object(mt.a)(()=>{this.group.privileges.splice(this.group.privileges.indexOf(t[1]),1),this.headerService.resfreshCurrentUser(),this.notify.success(this.translate.instant("lang.groupServicesUpdated"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}changePersonalDataPrivilege(t){"view_personal_data"===t.value?this.manageServices(["view_personal_data","manage_personal_data"]):"manage_personal_data"===t.value?this.http.post(`../rest/groups/${this.group.id}/privileges/view_personal_data`,{}).pipe(Object(mt.a)(()=>{this.group.privileges.push("view_personal_data")}),p(()=>this.http.post(`../rest/groups/${this.group.id}/privileges/manage_personal_data`,{})),Object(mt.a)(()=>{this.group.privileges.splice(this.group.privileges.indexOf("manage_personal_data"),1),this.headerService.resfreshCurrentUser(),this.notify.success(this.translate.instant("lang.groupServicesUpdated"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe():this.manageServices(["view_personal_data","manage_personal_data"],"deleteAll")}resfreshShortcut(){return Object(r.a)(this,void 0,void 0,(function*(){yield this.headerService.resfreshCurrentUser(),this.privilegeService.resfreshUserShortcuts()}))}getCurrentPrivListDiff(t){return this.group.privileges.indexOf(t)>-1}onSubmit(){this.creationMode?this.http.post("../rest/groups",this.group).subscribe(t=>{this.notify.success(this.translate.instant("lang.groupAdded")),this.router.navigate(["/administration/groups/"+t.group])},t=>{this.notify.error(t.error.errors)}):this.http.put("../rest/groups/"+this.group.id,{description:this.group.group_desc,security:this.group.security}).subscribe(()=>{this.notify.success(this.translate.instant("lang.groupUpdated"))},t=>{this.notify.error(t.error.errors)})}toggleService(t,e){t.checked?"admin_groups"===e.id?this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.confirmAction"),msg:this.translate.instant("lang.enableGroupMsg")}}).afterClosed().pipe(Object(mt.a)(t=>{"ok"!==t&&(e.checked=!1)}),Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.addService(e)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe():this.addService(e):(this.sidenavRight.close(),this.removeService(e))}addService(t){this.http.post(`../rest/groups/${this.group.id}/privileges/${t.id}`,{}).pipe(Object(mt.a)(()=>{this.group.privileges.push(t.id),this.headerService.resfreshCurrentUser(),this.notify.success(this.translate.instant("lang.groupServicesUpdated"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}removeService(t){this.http.delete(`../rest/groups/${this.group.id}/privileges/${t.id}`).pipe(Object(mt.a)(()=>{this.group.privileges.splice(this.group.privileges.indexOf(t.id),1),this.headerService.resfreshCurrentUser(),this.notify.success(this.translate.instant("lang.groupServicesUpdated"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}linkUser(t){this.http.post("../rest/users/"+t.id+"/groups",{groupId:this.group.group_id,role:this.group.role}).subscribe(()=>{const e=t.idToDisplay.split(" ");this.group.users.push({id:t.id,user_id:t.otherInfo,firstname:e[0],lastname:e[1],allowed:!0}),this.usersDataSource=new vt.p(this.group.users),this.usersDataSource.paginator=this.paginator,this.usersDataSource.sort=this.sortUsers,this.notify.success(this.translate.instant("lang.userAdded"))},t=>{this.notify.error(t.error.errors)})}openUserParams(t){this.sidenavRight.toggle(),this.sidenavRight.opened?(this.panelMode=t,this.paramsLoading=!0,this.http.get("../rest/groups").pipe(Object(l.a)(t=>(t.groups=t.groups.map(t=>({id:t.id,label:t.group_desc})),t)),Object(mt.a)(t=>{this.authorizedGroupsUserParams=t.groups}),p(()=>this.http.get(`../rest/groups/${this.group.id}/privileges/${this.panelMode}/parameters?parameter=groups`)),Object(mt.a)(t=>{const e=t;this.authorizedGroupsUserParams.forEach(t=>{t.checked=e.indexOf(t.id)>-1})}),Object(Xt.a)(()=>this.paramsLoading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()):this.panelMode=""}updatePrivilegeParams(t){let e={};"admin_users"===this.panelMode&&(e={groups:t.map(t=>t.value)}),this.http.put(`../rest/groups/${this.group.id}/privileges/${this.panelMode}/parameters`,{parameters:e}).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.parameterUpdated"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}goToUserAdmin(t){t.allowed&&this.router.navigate(["/administration/users/"+t.id])}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(Dt.a),n.Qb(_.a),n.Qb(q.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(YN,!0),n.Xc(JN,!0),n.Kc(ZN,!0),n.Xc(Kt.a,!0),n.Kc(tz,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.paginatorBaskets=i.first),n.yc(i=n.ec())&&(e.sortBaskets=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sortUsers=i.first))},decls:17,vars:13,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["fixedTopGap","56","position","end",3,"mode","fixedInViewport","opened"],["snav2",""],[4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[3,"label"],[1,"form-horizontal",3,"ngSubmit"],["groupForm","ngForm"],["matInput","","name","identifier","pattern","^[\\w.-]*$","maxlength","32","required","",3,"placeholder","ngModel","ngModelChange",4,"ngIf"],["matInput","","name","identifier","disabled","",3,"placeholder","title","ngModel","ngModelChange",4,"ngIf"],["matInput","","name","description","maxlength","255","required","",3,"title","placeholder","ngModel","ngModelChange"],["matInput","","name","comment",3,"title","placeholder","ngModel","ngModelChange"],["matInput","","name","clause","required","","matTextareaAutosize","","matAutosizeMinRows","1","matAutosizeMaxRows","5",3,"title","placeholder","ngModel","ngModelChange"],["color","primary","matSuffix","",1,"fa","fa-info-circle",2,"cursor","pointer",3,"matTooltip","click"],[1,"col-md-12","text-center",2,"padding","10px"],["mat-raised-button","","color","primary",3,"disabled"],[3,"label",4,"ngIf"],["matInput","","name","identifier","pattern","^[\\w.-]*$","maxlength","32","required","",3,"placeholder","ngModel","ngModelChange"],["matInput","","name","identifier","disabled","",3,"placeholder","title","ngModel","ngModelChange"],[4,"ngFor","ngForOf"],["floatLabel","never","appearance","outline",1,"basketsFilter",2,"padding-left","20px","padding-right","20px","font-size","11px"],["matInput","",3,"placeholder"],["listFilterAdmin",""],["class","col-md-3","style","padding:10px;",4,"ngFor","ngForOf"],["listFilter",""],["expanded","",3,"emptyExpansionPanel",4,"ngFor","ngForOf"],["color","primary",3,"name","checked","disabled","matTooltip","change"],[1,"col-md-3",2,"padding","10px"],["color","primary",3,"name","ngModel","checked","disabled","matTooltip","ngModelChange","change"],["mat-icon-button","","color","primary",3,"active","title","disabled","click",4,"ngIf"],["mat-icon-button","","color","primary",3,"title","disabled","click"],[1,"fa","fa-cogs"],["expanded",""],["color","primary",3,"name","checked","matTooltip","change"],["color","primary","style","font-size: 16px;",4,"ngFor","ngForOf"],["color","primary",2,"font-size","16px"],[3,"innerHTML"],[2,"width","250px !important","padding-left","10px","padding-right","10px"],[3,"ngModel","ngModelChange","selectionChange"],["value",""],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[2,"width","300px !important","padding-left","10px","padding-right","10px"],["matTabContent",""],[3,"groupId","resfreshShortcut"],[1,"row",2,"margin","0px"],["class","col-md-12","style","padding:5px;",4,"ngIf"],[1,"col-md-6","col-xs-6"],["matInput","",3,"placeholder","keyup"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSort","","matSortActive","lastname","matSortDirection","asc",3,"dataSource"],["sortUsers","matSort"],["matColumnDef","firstname"],["mat-sort-header","",4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","lastname"],[4,"matHeaderRowDef"],[3,"matTooltip","matTooltipDisabled","ngStyle","click",4,"matRowDef","matRowDefColumns"],[1,"col-md-12",2,"padding","5px"],[3,"labelPlaceholder","labelList","routeDatas","targetSearchKey","triggerEvent"],["mat-sort-header",""],[3,"matTooltip","matTooltipDisabled","ngStyle","click"],["paginatorBaskets",""],["matSort","","matSortActive","basket_name","matSortDirection","asc",3,"dataSource"],["sortBaskets","matSort"],["matColumnDef","basket_name"],["matColumnDef","basket_desc"],["style","cursor:pointer;",3,"routerLink","matTooltip",4,"matRowDef","matRowDefColumns"],[2,"cursor","pointer",3,"routerLink","matTooltip"],["mat-subheader",""],["role","list",2,"width","400px","padding","5px"],[2,"font-size","10px"],[2,"border","1px black solid","padding","3px","font-size","10px"],["mat-line","",2,"font-weight","bold","font-size","10px"],["mat-line","",2,"font-size","10px"],["color","primary"],[3,"selectionChange"],["paramsList",""],["color","primary","style","font-size: 13px;","checkboxPosition","before",3,"selected","value",4,"ngFor","ngForOf"],["color","primary","checkboxPosition","before",2,"font-size","13px",3,"selected","value"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,ez,2,0,"div",8),n.Oc(12,Fz,31,37,"mat-card",9),n.Vb(),n.Vb(),n.Vb(),n.Wb(13,"mat-sidenav",10,11),n.Oc(15,Lz,82,48,"ng-container",12),n.Oc(16,Nz,12,7,"ng-container",12),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",(e.appService.getViewMode(),!1)),n.Db(2),n.oc("ngIf","keywordInfos"===e.panelMode),n.Db(1),n.oc("ngIf","admin_users"===e.panelMode))},directives:[I.e,I.f,Ot,We,P.t,I.d,V.c,K.a,Te.c,Te.a,X.K,X.v,X.w,Y.c,J.b,X.d,X.p,X.F,X.u,X.x,J.d,S.a,Y.j,A.b,k.b,X.B,R.a,P.s,R.d,te.a,gt.c,gt.g,gt.h,ee.a,W.p,Te.b,KN,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,ii,vt.h,Fe.b,vt.a,vt.j,vt.m,P.w,o.d,R.h,R.g,W.l,R.i,R.f],pipes:[g.d,Wt.a,rg],styles:["textarea.mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0}.active[_ngcontent-%COMP%]{color:#f99830}.emptyExpansionPanel[_ngcontent-%COMP%]{height:0}"]}),t})();const Bz=["snav2"],Uz=["adminMenuTemplate"];function $z(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",16),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",17),n.Rb(5,"mat-icon",18),n.Wb(6,"p",19),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Wb(9,"a",20),n.dc("click",(function(){return n.Dc(t),n.hc(),n.zc(16).toggle()})),n.Rb(10,"mat-icon",21),n.Wb(11,"p",19),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Vb()}2&t&&(n.Db(2),n.Rc(n.jc(3,3,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,5,"lang.add")," "),n.Db(5),n.Sc(" ",n.jc(13,7,"lang.basketsOrder")," "))}function Hz(t,e){1&t&&(n.Wb(0,"div",22),n.Rb(1,"mat-spinner",23),n.Vb())}function Gz(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",45),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Rc(n.jc(2,3,"lang.id"))}}function Xz(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",t.basket_id," ")}}function qz(t,e){1&t&&(n.Wb(0,"mat-header-cell",45),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.label")))}function Kz(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.basket_name," ")}}function Yz(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",45),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Sc("",n.jc(2,3,"lang.description")," ")}}function Jz(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",t.basket_desc," ")}}function Zz(t,e){1&t&&n.Rb(0,"mat-header-cell")}function tB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",46),n.Wb(1,"button",47),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.delete(a)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",48),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.pc("matTooltip",n.jc(2,1,"lang.delete")))}function eB(t,e){1&t&&n.Rb(0,"mat-header-row")}function iB(t,e){1&t&&(n.Rb(0,"mat-row",49),n.ic(1,"translate")),2&t&&(n.qc("routerLink","/administration/baskets/",e.$implicit.basket_id,""),n.pc("matTooltip",n.jc(1,2,"lang.view")))}function nB(t,e){if(1&t&&(n.Wb(0,"mat-card",24),n.Wb(1,"div",25),n.Wb(2,"div",26),n.Wb(3,"mat-form-field"),n.Rb(4,"input",27),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Wb(6,"div",26),n.Rb(7,"mat-paginator",28,29),n.Vb(),n.Vb(),n.Wb(9,"mat-table",30,31),n.Ub(11,32),n.Oc(12,Gz,3,5,"mat-header-cell",33),n.Oc(13,Xz,2,3,"mat-cell",34),n.Tb(),n.Ub(14,35),n.Oc(15,qz,3,3,"mat-header-cell",36),n.Oc(16,Kz,2,1,"mat-cell",37),n.Tb(),n.Ub(17,38),n.Oc(18,Yz,3,5,"mat-header-cell",33),n.Oc(19,Jz,2,3,"mat-cell",34),n.Tb(),n.Ub(20,39),n.Oc(21,Zz,1,0,"mat-header-cell",40),n.Oc(22,tB,4,3,"mat-cell",41),n.Tb(),n.Oc(23,eB,1,0,"mat-header-row",42),n.Oc(24,iB,2,4,"mat-row",43),n.Vb(),n.Wb(25,"div",44),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.pc("placeholder",n.jc(5,10,"lang.filterBy")),n.oc("formControl",t.adminService.getFilterField()),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.adminService.getDataSource()),n.Db(14),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns),n.Db(2),n.Tc(" ",t.baskets.length," ",n.jc(27,12,"lang.baskets"),"")}}function aB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item",50),n.dc("onDropSuccess",(function(){n.Dc(t);const i=e.$implicit;return n.hc().updateBasketOrder(i)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",51),n.Wb(3,"p",19),n.Qc(4),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=e.index;n.pc("title",n.jc(1,4,"lang.move")),n.oc("sortableIndex",i),n.Db(4),n.Tc("",i+1," - ",t.basket_name,"")}}const sB=function(){return["boxers-zone"]};let oB=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.functions=s,this.adminService=o,this.viewContainerRef=r,this.loading=!1,this.baskets=[],this.basketsOrder=[],this.displayedColumns=["basket_id","basket_name","basket_desc","actions"],this.filterColumns=["basket_id","basket_name","basket_desc"]}ngOnInit(){this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.baskets")),this.loading=!0,this.getSortedBasket(),this.http.get("../rest/baskets").subscribe(t=>{this.baskets=t.baskets,this.loading=!1,setTimeout(()=>{this.adminService.setDataSource("admin_baskets",this.baskets,this.sort,this.paginator,this.filterColumns)},0)},t=>{this.notify.handleErrors(t)})}getSortedBasket(){this.http.get("../rest/sortedBaskets").pipe(Object(mt.a)(t=>{this.basketsOrder=t.baskets}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}delete(t){confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.delete")+" \xab "+t.basket_name+" \xbb")&&this.http.delete("../rest/baskets/"+t.basket_id).subscribe(t=>{this.notify.success(this.translate.instant("lang.basketDeleted")),this.baskets=t.baskets,this.adminService.setDataSource("admin_baskets",this.baskets,this.sort,this.paginator,this.filterColumns),this.getSortedBasket()},t=>{this.notify.error(t.error.errors)})}updateBasketOrder(t){this.http.put("../rest/sortedBaskets/"+t.basket_id,this.basketsOrder).subscribe(t=>{this.baskets=t.baskets,this.notify.success(this.translate.instant("lang.modificationSaved"))},t=>{this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a),n.Qb(OL),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(Bz,!0),n.Kc(Uz,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:23,vars:18,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["fixedTopGap","56","position","end",3,"mode","fixedInViewport","opened"],["snav2",""],[2,"font-size","15px","padding","10px"],["dnd-sortable-container","",3,"dropZones","sortableData"],["disableRipple","true","dnd-sortable","",3,"title","sortableIndex","onDropSuccess",4,"ngFor","ngForOf"],["mat-subheader",""],["mat-list-item","","routerLink","/administration/baskets/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],["mat-list-item","",3,"click"],["color","primary","mat-list-icon","",1,"fa","fa-list-ol"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"row"],[1,"col-md-6","col-xs-6"],["matInput","",3,"formControl","placeholder"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSortDisableClear","","matSort","",3,"dataSource"],["table",""],["matColumnDef","basket_id"],["mat-sort-header","",3,"hide-for-mobile",4,"matHeaderCellDef"],[3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","basket_name"],["mat-sort-header","",4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","basket_desc"],["matColumnDef","actions"],[4,"matHeaderCellDef"],["style","justify-content: flex-end;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"routerLink","matTooltip",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["mat-sort-header",""],[2,"justify-content","flex-end"],["mat-icon-button","","color","warn",3,"matTooltip","click"],["aria-hidden","true",1,"fa","fa-trash-alt","fa-2x"],[2,"cursor","pointer",3,"routerLink","matTooltip"],["disableRipple","true","dnd-sortable","",3,"title","sortableIndex","onDropSuccess"],["color","primary","mat-list-icon","",1,"fa","fa-inbox"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,$z,14,9,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,Hz,2,0,"div",9),n.Oc(14,nB,28,14,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Wb(15,"mat-sidenav",11,12),n.Wb(17,"p",13),n.Qc(18),n.ic(19,"translate"),n.Vb(),n.Wb(20,"mat-list"),n.Wb(21,"span",14),n.Oc(22,aB,5,6,"mat-list-item",15),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",(e.appService.getViewMode(),!1)),n.Db(3),n.Sc(" ",n.jc(19,15,"lang.basketHelpDesc")," "),n.Db(3),n.oc("dropZones",n.uc(17,sB))("sortableData",e.basketsOrder),n.Db(1),n.oc("ngForOf",e.basketsOrder))},directives:[I.e,I.f,Ot,We,P.t,I.d,R.a,Ee.f,P.s,R.h,R.g,R.d,o.f,S.a,R.c,W.l,V.c,K.a,Y.c,J.b,X.d,X.u,X.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,vt.h,Fe.b,vt.a,k.b,A.b,vt.j,vt.m,o.d,Ee.e],pipes:[g.d],encapsulation:2}),t})();function rB(t,e){if(1&t&&(n.Wb(0,"mat-option",31),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.value),n.Db(1),n.Sc(" ",n.jc(2,2,"lang."+t.id)," ")}}function cB(t,e){if(1&t&&(n.Wb(0,"mat-option",31),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function lB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",32),n.Wb(1,"div",33),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-form-field",0),n.Wb(5,"mat-label"),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Wb(8,"mat-select",34),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().selectedProcessTool.defaultTab=e})),n.Oc(9,cB,2,2,"mat-option",2),n.ic(10,"sortBy"),n.Vb(),n.Vb(),n.Wb(11,"div",35),n.Wb(12,"mat-slide-toggle",36),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().selectedProcessTool.canUpdateData=e}))("change",(function(e){return n.Dc(t),n.hc().toggleCanUpdate(e.checked)})),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Wb(15,"div",35),n.Wb(16,"mat-slide-toggle",37),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().selectedProcessTool.canUpdateModel=e})),n.Qc(17),n.ic(18,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(2),n.Sc(" ",n.jc(3,9,"lang.options")," "),n.Db(4),n.Rc(n.jc(7,11,"lang.tabProcessPosition")),n.Db(2),n.oc("ngModel",t.selectedProcessTool.defaultTab),n.Db(1),n.oc("ngForOf",n.kc(10,13,t.processTool,"label")),n.Db(3),n.oc("ngModel",t.selectedProcessTool.canUpdateData),n.Db(1),n.Rc(n.jc(14,16,"lang.canUpdateData")),n.Db(3),n.oc("ngModel",t.selectedProcessTool.canUpdateModel)("disabled",!t.selectedProcessTool.canUpdateData),n.Db(1),n.Sc("",n.jc(18,18,"lang.canUpdateIndexingModel")," ")}}function dB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",32),n.Wb(1,"div",33),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"div",35),n.Wb(5,"mat-slide-toggle",38),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().selectedProcessTool.canUpdateDocuments=e})),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(2),n.Sc(" ",n.jc(3,3,"lang.options")," "),n.Db(3),n.oc("ngModel",t.selectedProcessTool.canUpdateDocuments),n.Db(1),n.Sc(" ",n.jc(7,5,"lang.canUpdateResourcesInSignatureBook"),"")}}function hB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",39),n.dc("click",(function(){return n.Dc(t),n.hc().toggleData()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",40),n.Vb()}2&t&&n.pc("title",n.jc(1,1,"lang.preview"))}function uB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",39),n.dc("click",(function(){return n.Dc(t),n.hc().toggleData()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",41),n.Vb()}2&t&&n.pc("title",n.jc(1,1,"lang.edition"))}function pB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",42),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().selectedTemplateDisplayedSecondaryData=i})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.Tc("",t," ",n.jc(2,2,"lang.columns"),"")}}function bB(t,e){if(1&t&&(n.Wb(0,"mat-option",43),n.Wb(1,"span",44),n.Wb(2,"span",45),n.Rb(3,"i",46),n.Vb(),n.Wb(4,"span",47),n.Qc(5),n.Vb(),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.value),n.Db(3),n.Gb("fa ",t.icon," fa-2x"),n.Db(2),n.Sc(" ",t.label," ")}}function fB(t,e){if(1&t&&(n.Wb(0,"button",61),n.Rb(1,"mat-icon",62),n.Vb()),2&t){n.hc();const t=n.zc(3);n.oc("matMenuTriggerFor",t)}}function mB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",51),n.Oc(1,fB,2,1,"button",52),n.Wb(2,"mat-menu",null,8),n.Wb(4,"button",42),n.dc("click",(function(){n.Dc(t);const e=n.hc(),i=e.$implicit,a=e.index;return n.hc(2).removeData(i,a)})),n.Rb(5,"mat-icon",53),n.Wb(6,"span"),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Rb(9,"mat-divider"),n.Wb(10,"button",42),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).setStyle(e,"boldFontData")})),n.Rb(11,"mat-icon",54),n.Wb(12,"span"),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Wb(15,"button",42),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).setStyle(e,"align_leftData")})),n.Rb(16,"mat-icon",55),n.Wb(17,"span"),n.Qc(18),n.ic(19,"translate"),n.Vb(),n.Vb(),n.Wb(20,"button",42),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).setStyle(e,"align_centerData")})),n.Rb(21,"mat-icon",56),n.Wb(22,"span"),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Vb(),n.Wb(25,"button",42),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).setStyle(e,"align_rightData")})),n.Rb(26,"mat-icon",57),n.Wb(27,"span"),n.Qc(28),n.ic(29,"translate"),n.Vb(),n.Vb(),n.Wb(30,"button",42),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).setStyle(e,"bigFontData")})),n.Rb(31,"mat-icon",58),n.Wb(32,"span"),n.Qc(33),n.ic(34,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(35,"span",59),n.Rb(36,"i"),n.Qc(37,"\xa0 "),n.Rb(38,"span",60),n.Vb(),n.Vb()}if(2&t){const t=n.hc(),e=t.index,i=t.$implicit,a=n.hc(2);n.oc("sortableIndex",e),n.Db(1),n.oc("ngIf","label"==a.displayMode),n.Db(6),n.Rc(n.jc(8,24,"lang.delete")),n.Db(3),n.Ib("isSelectedMenu",i.cssClasses.indexOf("boldFontData")>-1),n.Db(3),n.Rc(n.jc(14,26,"lang.fontBold")),n.Db(2),n.Ib("isSelectedMenu",i.cssClasses.indexOf("align_leftData")>-1),n.Db(3),n.Rc(n.jc(19,28,"lang.alignLeft")),n.Db(2),n.Ib("isSelectedMenu",i.cssClasses.indexOf("align_centerData")>-1),n.Db(3),n.Rc(n.jc(24,30,"lang.alignCenter")),n.Db(2),n.Ib("isSelectedMenu",i.cssClasses.indexOf("align_rightData")>-1),n.Db(3),n.Rc(n.jc(29,32,"lang.alignRight")),n.Db(2),n.Ib("isSelectedMenu",i.cssClasses.indexOf("bigFontData")>-1),n.Db(3),n.Rc(n.jc(34,34,"lang.fontBig")),n.Db(2),n.Fb(i.cssClasses.join(" ")),n.Db(1),n.Gb("fa ",i.icon,""),n.Db(2),n.oc("innerHTML",i[a.displayMode],n.Ec)}}function gB(t,e){if(1&t&&(n.Ub(0),n.Oc(1,mB,39,36,"span",50),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf","getFolders"!=t.value)}}const vB=function(){return["boxers-zone"]};function _B(t,e){if(1&t&&(n.Wb(0,"div",48),n.Wb(1,"mat-toolbar"),n.Oc(2,gB,2,1,"ng-container",49),n.Vb(),n.Vb()),2&t){const t=n.hc();n.oc("dropZones",n.uc(6,vB))("sortableData",t.displayedSecondaryData),n.Db(1),n.Gb("secondaryInformations example-list column-",t.selectedTemplateDisplayedSecondaryData,"-list"),n.Db(1),n.oc("ngForOf",t.displayedSecondaryData)}}function yB(t,e){1&t&&n.Rb(0,"mat-icon",68)}function xB(t,e){1&t&&n.Rb(0,"mat-icon",69)}function CB(t,e){if(1&t&&(n.Wb(0,"span"),n.Oc(1,yB,1,0,"mat-icon",65),n.Oc(2,xB,1,0,"mat-icon",66),n.Rb(3,"br"),n.Wb(4,"span",67),n.Qc(5),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc();n.Db(1),n.oc("ngIf","label"==e.displayMode),n.Db(1),n.oc("ngIf","sample"==e.displayMode),n.Db(3),n.Rc(t[e.displayMode])}}function OB(t,e){if(1&t&&(n.Wb(0,"span"),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc();n.Db(1),n.Sc(" ",t[e.displayMode]," ")}}function DB(t,e){if(1&t&&(n.Wb(0,"span",63),n.Oc(1,CB,6,3,"span",64),n.Oc(2,OB,2,1,"span",64),n.Vb()),2&t){const t=e.index;n.Fb(e.$implicit.cssClasses.join(" ")),n.Db(1),n.oc("ngIf",0==t),n.Db(1),n.oc("ngIf",1==t)}}function wB(t,e){if(1&t&&(n.Wb(0,"button",61),n.Rb(1,"mat-icon",62),n.Vb()),2&t){n.hc();const t=n.zc(3);n.oc("matMenuTriggerFor",t)}}function MB(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Oc(1,wB,2,1,"button",52),n.Wb(2,"mat-menu",null,8),n.Wb(4,"button",42),n.dc("click",(function(){n.Dc(t);const e=n.hc(),i=e.$implicit,a=e.index;return n.hc().removeData(i,a)})),n.Rb(5,"mat-icon",53),n.Wb(6,"span"),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(9,"span",71),n.Rb(10,"i",72),n.Qc(11),n.Vb(),n.Tb()}if(2&t){const t=n.hc().$implicit,e=n.hc();n.Db(1),n.oc("ngIf","label"==e.displayMode),n.Db(6),n.Rc(n.jc(8,3,"lang.delete")),n.Db(4),n.Sc(" ",t[e.displayMode],"")}}function kB(t,e){if(1&t&&(n.Wb(0,"div",70),n.Oc(1,MB,12,5,"ng-container",64),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf","getFolders"==t.value)}}let SB=(()=>{class t{constructor(t,e,i,a){this.translate=t,this.http=e,this.notify=i,this.functions=a,this.loading=!1,this.displayedMainData=[{value:"chronoNumberShort",label:this.translate.instant("lang.chronoNumberShort"),sample:"MAARCH/2019A/1",cssClasses:["align_centerData","normalData"],icon:""},{value:"object",label:this.translate.instant("lang.object"),sample:this.translate.instant("lang.objectSample"),cssClasses:["longData"],icon:""}],this.availableData=[{value:"getPriority",label:this.translate.instant("lang.getPriority"),sample:this.translate.instant("lang.getPrioritySample"),cssClasses:["align_leftData"],icon:"fa-traffic-light"},{value:"getCategory",label:this.translate.instant("lang.getCategory"),sample:this.translate.instant("lang.incoming"),cssClasses:["align_leftData"],icon:"fa-exchange-alt"},{value:"getDoctype",label:this.translate.instant("lang.getDoctype"),sample:this.translate.instant("lang.getDoctypeSample"),cssClasses:["align_leftData"],icon:"fa-suitcase"},{value:"getAssignee",label:this.translate.instant("lang.getAssignee"),sample:this.translate.instant("lang.getAssigneeSample"),cssClasses:["align_leftData"],icon:"fa-sitemap"},{value:"getRecipients",label:this.translate.instant("lang.getRecipients"),sample:"Patricia PETIT",cssClasses:["align_leftData"],icon:"fa-user"},{value:"getSenders",label:this.translate.instant("lang.getSenders"),sample:"Alain DUBOIS (MAARCH)",cssClasses:["align_leftData"],icon:"fa-book"},{value:"getCreationAndProcessLimitDates",label:this.translate.instant("lang.getCreationAndProcessLimitDates"),sample:this.translate.instant("lang.getCreationAndProcessLimitDatesSample"),cssClasses:["align_leftData"],icon:"fa-calendar"},{value:"getVisaWorkflow",label:this.translate.instant("lang.getVisaWorkflow"),sample:'<i color="accent" class="fa fa-check"></i> Barbara BAIN -> <i class="fa fa-hourglass-half"></i> <b>Bruno BOULE</b> -> <i class="fa fa-hourglass-half"></i> Patricia PETIT',cssClasses:["align_leftData"],icon:"fa-list-ol"},{value:"getSignatories",label:this.translate.instant("lang.getSignatories"),sample:"Denis DAULL, Patricia PETIT",cssClasses:["align_leftData"],icon:"fa-certificate"},{value:"getModificationDate",label:this.translate.instant("lang.getModificationDate"),sample:"01-01-2019",cssClasses:["align_leftData"],icon:"fa-calendar-check"},{value:"getOpinionLimitDate",label:this.translate.instant("lang.getOpinionLimitDate"),sample:"01-01-2019",cssClasses:["align_leftData"],icon:"fa-stopwatch"},{value:"getParallelOpinionsNumber",label:this.translate.instant("lang.getParallelOpinionsNumber"),sample:this.translate.instant("lang.getParallelOpinionsNumberSample"),cssClasses:["align_leftData"],icon:"fa-comment-alt"},{value:"getFolders",label:this.translate.instant("lang.getFolders"),sample:this.translate.instant("lang.getFoldersSample"),cssClasses:["align_leftData"],icon:"fa-folder"},{value:"getResId",label:this.translate.instant("lang.getResId"),sample:this.translate.instant("lang.getResIdSample"),cssClasses:["align_leftData"],icon:"fa-envelope"},{value:"getBarcode",label:this.translate.instant("lang.getBarcode"),sample:this.translate.instant("lang.getBarcodeSample"),cssClasses:["align_leftData"],icon:"fa-barcode"},{value:"getRegisteredMailRecipient",label:this.translate.instant("lang.registeredMailRecipient"),sample:this.translate.instant("lang.registeredMailRecipientSample"),cssClasses:["align_leftData"],icon:"fa-user"},{value:"getRegisteredMailReference",label:this.translate.instant("lang.registeredMailReference"),sample:this.translate.instant("lang.registeredMailReferenceSample"),cssClasses:["align_leftData"],icon:"fa-hashtag"},{value:"getRegisteredMailIssuingSite",label:this.translate.instant("lang.issuingSite"),sample:this.translate.instant("lang.issuingSiteSample"),cssClasses:["align_leftData"],icon:"fas fa-warehouse"}],this.availableDataClone=[],this.displayedSecondaryData=[],this.displayedSecondaryDataClone=[],this.displayMode="label",this.dataControl=new X.i,this.listEvent=[{id:"detailDoc",value:"documentDetails"},{id:"eventVisaMail",value:"signatureBookAction"},{id:"eventProcessDoc",value:"processDocument"},{id:"eventViewDoc",value:"viewDoc"}],this.templateDisplayedSecondaryData=[2,3,4,5,6,7],this.selectedTemplateDisplayedSecondaryData=7,this.selectedTemplateDisplayedSecondaryDataClone=7,this.selectedListEvent=null,this.selectedListEventClone=null,this.processTool=[{id:"dashboard",icon:"fas fa-columns",label:this.translate.instant("lang.newsFeed")},{id:"history",icon:"fas fa-history",label:this.translate.instant("lang.history")},{id:"notes",icon:"fas fa-pen-square",label:this.translate.instant("lang.notesAlt")},{id:"attachments",icon:"fas fa-paperclip",label:this.translate.instant("lang.attachments")},{id:"linkedResources",icon:"fas fa-link",label:this.translate.instant("lang.links")},{id:"diffusionList",icon:"fas fa-share-alt",label:this.translate.instant("lang.diffusionList")},{id:"emails",icon:"fas fa-envelope",label:this.translate.instant("lang.mailsSentAlt")},{id:"visaCircuit",icon:"fas fa-list-ol",label:this.translate.instant("lang.visaWorkflow")},{id:"opinionCircuit",icon:"fas fa-comment-alt",label:this.translate.instant("lang.avis")},{id:"info",icon:"fas fa-info-circle",label:this.translate.instant("lang.informations")}],this.selectedProcessTool={defaultTab:null,canUpdateData:!1,canUpdateModel:!1,canUpdateDocuments:!1},this.selectedProcessToolClone=null,this.refreshBasketGroup=new n.o}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){yield this.initCustomFields(),this.filteredDataOptions=this.dataControl.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>this._filterData(t))),this.availableDataClone=JSON.parse(JSON.stringify(this.availableData)),this.displayedSecondaryData=[],this.selectedTemplateDisplayedSecondaryData=this.basketGroup.list_display.templateColumns,this.selectedTemplateDisplayedSecondaryDataClone=this.selectedTemplateDisplayedSecondaryData,this.basketGroup.list_display.subInfos.forEach(t=>{this.addData(t.value),this.displayedSecondaryData[this.displayedSecondaryData.length-1].cssClasses=t.cssClasses}),this.selectedListEvent=this.basketGroup.list_event,this.selectedListEventClone=this.selectedListEvent,"processDocument"===this.basketGroup.list_event?(this.selectedProcessTool.defaultTab=null===this.basketGroup.list_event_data?"dashboard":this.basketGroup.list_event_data.defaultTab,this.selectedProcessTool.canUpdateData=null!==this.basketGroup.list_event_data&&this.basketGroup.list_event_data.canUpdateData,this.selectedProcessTool.canUpdateModel=null!==this.basketGroup.list_event_data&&this.basketGroup.list_event_data.canUpdateModel):"signatureBookAction"===this.basketGroup.list_event&&(this.selectedProcessTool.canUpdateDocuments=null!==this.basketGroup.list_event_data&&this.basketGroup.list_event_data.canUpdateDocuments),this.selectedProcessToolClone=JSON.parse(JSON.stringify(this.selectedProcessTool)),this.displayedSecondaryDataClone=JSON.parse(JSON.stringify(this.displayedSecondaryData))}))}initCustomFields(){return new Promise((t,e)=>{this.http.get("../rest/customFields").pipe(Object(l.a)(t=>(t.customFields=t.customFields.map(t=>({value:"indexingCustomField_"+t.id,label:t.label,sample:this.translate.instant("lang.customField")+t.id,cssClasses:["align_leftData"],icon:"fa-hashtag"})),t.customFields)),Object(mt.a)(e=>{this.availableData=this.availableData.concat(e),t(!0)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()})}toggleData(){this.dataControl.disabled?this.dataControl.enable():this.dataControl.disable(),this.displayMode="label"===this.displayMode?"sample":"label"}setStyle(t,e){const i=e.split("_");2===i.length&&t.cssClasses.forEach((n,a)=>{n.includes(i[0])&&n!==e&&t.cssClasses.splice(a,1)});const n=t.cssClasses.indexOf(e);-1===n?t.cssClasses.push(e):t.cssClasses.splice(n,1)}addData(t){const e=this.availableData.map(t=>t.value).indexOf(t);this.displayedSecondaryData.push(this.availableData.filter(e=>e.value===t)[0]),this.availableData.splice(e,1),$("#availableData").blur(),this.dataControl.setValue("")}removeData(t,e){this.availableData.push(t),this.displayedSecondaryData.splice(e,1),this.dataControl.setValue("")}removeAllData(){this.displayedSecondaryData=this.displayedSecondaryData.concat(),this.availableData=this.availableData.concat(this.displayedSecondaryData),this.dataControl.setValue(""),this.displayedSecondaryData=[]}drop(t){t.previousContainer===t.container?Object(lo.h)(t.container.data,t.previousIndex,t.currentIndex):(Object(lo.i)(t.previousContainer.data,t.container.data,t.previousIndex,t.currentIndex-1),this.displayedSecondaryData.forEach((t,e)=>{t.length>this.selectedTemplateDisplayedSecondaryData?Object(lo.i)(t,this.displayedSecondaryData[e+1],t.length,0):t.length<this.selectedTemplateDisplayedSecondaryData&&!this.functions.empty(this.displayedSecondaryData[e+1])&&Object(lo.i)(this.displayedSecondaryData[e+1],t,0,t.length)}))}saveTemplate(){this.http.put("../rest/baskets/"+this.basketGroup.basket_id+"/groups/"+this.basketGroup.group_id,{list_display:{templateColumns:this.selectedTemplateDisplayedSecondaryData,subInfos:this.displayedSecondaryData},list_event:this.selectedListEvent,list_event_data:this.selectedProcessTool}).subscribe(()=>{this.displayedSecondaryDataClone=JSON.parse(JSON.stringify(this.displayedSecondaryData)),this.basketGroup.list_display=this.displayedSecondaryData,this.basketGroup.list_event=this.selectedListEvent,this.selectedListEventClone=this.selectedListEvent,this.basketGroup.list_event_data=this.selectedProcessTool,this.selectedProcessToolClone=JSON.parse(JSON.stringify(this.selectedProcessTool)),this.selectedTemplateDisplayedSecondaryDataClone=JSON.parse(JSON.stringify(this.selectedTemplateDisplayedSecondaryData)),this.notify.success(this.translate.instant("lang.modificationsProcessed")),this.refreshBasketGroup.emit(this.basketGroup)},t=>{this.notify.error(t.error.errors)})}_filterData(t){let e="";return"string"==typeof t?e=t.toLowerCase():null!==t&&(e=t.label.toLowerCase()),this.availableData.filter(t=>t.label.toLowerCase().includes(e))}checkModif(){return JSON.stringify(this.displayedSecondaryData)===JSON.stringify(this.displayedSecondaryDataClone)&&this.selectedListEvent===this.selectedListEventClone&&JSON.stringify(this.selectedProcessTool)===JSON.stringify(this.selectedProcessToolClone)&&JSON.stringify(this.selectedTemplateDisplayedSecondaryData)===JSON.stringify(this.selectedTemplateDisplayedSecondaryDataClone)}cancelModification(){this.displayedSecondaryData=JSON.parse(JSON.stringify(this.displayedSecondaryDataClone)),this.selectedListEvent=this.selectedListEventClone,this.selectedProcessTool=JSON.parse(JSON.stringify(this.selectedProcessToolClone)),this.availableData=JSON.parse(JSON.stringify(this.availableDataClone)),this.selectedTemplateDisplayedSecondaryData=JSON.parse(JSON.stringify(this.selectedTemplateDisplayedSecondaryDataClone)),this.dataControl.setValue("")}hasFolder(){return this.displayedSecondaryData.map(t=>t.value).indexOf("getFolders")>-1}changeEventList(t){this.selectedProcessTool="processDocument"===t.value?{defaultTab:"dashboard"}:{}}toggleCanUpdate(t){t||(this.selectedProcessTool.canUpdateModel=t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["list-administration"]],inputs:{basketGroup:["currentBasketGroup","basketGroup"]},outputs:{refreshBasketGroup:"refreshBasketGroup"},decls:59,vars:56,consts:[["appearance","outline",1,"eventList"],[3,"ngModel","ngModelChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["class","formType ratio-2 col-sm-12",4,"ngIf"],[1,"editorTool"],["color","primary","mat-icon-button","",3,"title","click",4,"ngIf"],["color","primary","mat-button","",3,"title","matMenuTriggerFor"],[1,"fas","fa-columns"],["menu","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],[1,"area"],["appearance","outline","floatLabel","never"],["id","availableData","name","availableData","type","text","matInput","",3,"formControl","placeholder","matAutocomplete"],[3,"optionSelected"],["auto","matAutocomplete"],["class","dataList",3,"value",4,"ngFor","ngForOf"],["color","warn","mat-button","",2,"float","right",3,"disabled","click"],["dnd-sortable-container","","style","border: solid 1px #F9983066;border-radius: 4px;",3,"dropZones","sortableData",4,"ngIf"],[1,"resultRow","newRow"],["class","resultCol",3,"class",4,"ngFor","ngForOf"],["multiple","",1,"actions"],["color","primary","mat-icon-button","",3,"title","disabled"],["fontSet","fas","matBadge","2","fontIcon","fa-comments fa-2x",3,"matBadgeHidden"],["fontSet","fas","matBadge","7","fontIcon","fa-paperclip fa-2x",3,"matBadgeHidden"],["fontSet","fas","fontIcon","fa-sitemap fa-2x"],["fontSet","fas","fontIcon","fa-info-circle fa-2x"],["class","folder-info",4,"ngFor","ngForOf"],[1,"row"],[1,"col-md-12","text-center",2,"margin-top","30px"],["color","primary","mat-raised-button","",3,"disabled","click"],["color","default","mat-raised-button","",3,"disabled","click"],[3,"value"],[1,"formType","ratio-2","col-sm-12"],[1,"formType-title"],[3,"ngModel","ngModelChange"],[2,"padding","10px"],["color","primary",3,"ngModel","ngModelChange","change"],["color","primary",3,"ngModel","disabled","ngModelChange"],["color","primary",3,"ngModel","ngModelChange"],["color","primary","mat-icon-button","",3,"title","click"],["fontSet","fas","fontIcon","fa-eye"],["fontSet","fas","fontIcon","fa-edit"],["mat-menu-item","",3,"click"],[1,"dataList",3,"value"],[1,"optionContent"],[1,"dataIcon"],["color","primary"],[1,"dataLabel"],["dnd-sortable-container","",2,"border","solid 1px #F9983066","border-radius","4px",3,"dropZones","sortableData"],[4,"ngFor","ngForOf"],["class","example-box","dnd-sortable","",3,"sortableIndex",4,"ngIf"],["dnd-sortable","",1,"example-box",3,"sortableIndex"],["color","primary","mat-icon-button","",3,"matMenuTriggerFor",4,"ngIf"],["color","warn","fontSet","fas","fontIcon","fa-trash fa-2x",1,"secondaryInformations_icon"],["fontSet","fas","fontIcon","fa-bold fa-2x",1,"secondaryInformations_icon"],["fontSet","fas","fontIcon","fa-align-left fa-2x",1,"secondaryInformations_icon"],["fontSet","fas","fontIcon","fa-align-center fa-2x",1,"secondaryInformations_icon"],["fontSet","fas","fontIcon","fa-align-right fa-2x",1,"secondaryInformations_icon"],["fontSet","fas","fontIcon","fa-text-height fa-2x",1,"secondaryInformations_icon"],[2,"width","100%"],[1,"secondaryInformations_label",3,"innerHTML"],["color","primary","mat-icon-button","",3,"matMenuTriggerFor"],["fontSet","fas","fontIcon","fa-ellipsis-v fa-2x"],[1,"resultCol"],[4,"ngIf"],["color","primary","class","fm fm-letter fm-2x",4,"ngIf"],["color","warn","class","fm fm-letter-status-inprogress fm-2x",4,"ngIf"],[1,"resultCol_chrono"],["color","primary",1,"fm","fm-letter","fm-2x"],["color","warn",1,"fm","fm-letter-status-inprogress","fm-2x"],[1,"folder-info"],[1,"badge","badge-folder"],[1,"fa","fa-folder"]],template:function(t,e){if(1&t&&(n.Wb(0,"mat-form-field",0),n.Wb(1,"mat-label"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-select",1),n.dc("ngModelChange",(function(t){return e.selectedListEvent=t}))("selectionChange",(function(t){return e.changeEventList(t)})),n.Oc(5,rB,3,4,"mat-option",2),n.Vb(),n.Vb(),n.Oc(6,lB,19,20,"div",3),n.Oc(7,dB,8,7,"div",3),n.Rb(8,"hr"),n.Wb(9,"mat-toolbar",4),n.Wb(10,"span"),n.Oc(11,hB,3,3,"button",5),n.Oc(12,uB,3,3,"button",5),n.Wb(13,"button",6),n.ic(14,"translate"),n.Qc(15),n.Rb(16,"i",7),n.Vb(),n.Wb(17,"mat-menu",null,8),n.Oc(19,pB,3,4,"button",9),n.Vb(),n.Vb(),n.Wb(20,"span",10),n.Wb(21,"form"),n.Wb(22,"mat-form-field",11),n.Rb(23,"input",12),n.ic(24,"translate"),n.Wb(25,"mat-autocomplete",13,14),n.dc("optionSelected",(function(t){return e.addData(t.option.value)})),n.Oc(27,bB,6,5,"mat-option",15),n.ic(28,"async"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(29,"span"),n.Wb(30,"button",16),n.dc("click",(function(){return e.removeAllData()})),n.Qc(31),n.ic(32,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(33,"mat-card"),n.Oc(34,_B,3,7,"div",17),n.Wb(35,"div",18),n.Oc(36,DB,3,4,"span",19),n.Wb(37,"mat-button-toggle-group",20),n.Wb(38,"button",21),n.ic(39,"translate"),n.Rb(40,"mat-icon",22),n.Vb(),n.Wb(41,"button",21),n.ic(42,"translate"),n.Rb(43,"mat-icon",23),n.Vb(),n.Wb(44,"button",21),n.ic(45,"translate"),n.Rb(46,"mat-icon",24),n.Vb(),n.Wb(47,"button",21),n.ic(48,"translate"),n.Rb(49,"mat-icon",25),n.Vb(),n.Vb(),n.Vb(),n.Oc(50,kB,2,1,"div",26),n.Vb(),n.Wb(51,"div",27),n.Wb(52,"div",28),n.Wb(53,"button",29),n.dc("click",(function(){return e.saveTemplate()})),n.Qc(54),n.ic(55,"translate"),n.Vb(),n.Wb(56,"button",30),n.dc("click",(function(){return e.cancelModification()})),n.Qc(57),n.ic(58,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.zc(18),i=n.zc(26);n.Db(2),n.Rc(n.jc(3,34,"lang.eventList")),n.Db(2),n.oc("ngModel",e.selectedListEvent),n.Db(1),n.oc("ngForOf",e.listEvent),n.Db(1),n.oc("ngIf","processDocument"===e.selectedListEvent),n.Db(1),n.oc("ngIf","signatureBookAction"===e.selectedListEvent),n.Db(4),n.oc("ngIf","label"==e.displayMode),n.Db(1),n.oc("ngIf","sample"==e.displayMode),n.Db(1),n.oc("title",n.jc(14,36,"lang.templateUsed"))("matMenuTriggerFor",t),n.Db(2),n.Sc(" ",e.selectedTemplateDisplayedSecondaryData," "),n.Db(4),n.oc("ngForOf",e.templateDisplayedSecondaryData),n.Db(4),n.pc("placeholder",n.jc(24,38,"lang.availableDatas")),n.oc("formControl",e.dataControl)("matAutocomplete",i),n.Db(4),n.oc("ngForOf",n.jc(28,40,e.filteredDataOptions)),n.Db(3),n.oc("disabled","sample"==e.displayMode),n.Db(1),n.Sc(" ",n.jc(32,42,"lang.eraseAll")," "),n.Db(3),n.oc("ngIf",e.displayedSecondaryData.length>0),n.Db(2),n.oc("ngForOf",e.displayedMainData),n.Db(2),n.pc("title",n.jc(39,44,"lang.notes")),n.oc("disabled","label"==e.displayMode),n.Db(2),n.oc("matBadgeHidden","label"==e.displayMode),n.Db(1),n.pc("title",n.jc(42,46,"lang.attachments")),n.oc("disabled","label"==e.displayMode),n.Db(2),n.oc("matBadgeHidden","label"==e.displayMode),n.Db(1),n.pc("title",n.jc(45,48,"lang.diffusionList")),n.oc("disabled","label"==e.displayMode),n.Db(3),n.pc("title",n.jc(48,50,"lang.linkDetails")),n.oc("disabled","label"==e.displayMode),n.Db(3),n.oc("ngForOf",e.displayedSecondaryData),n.Db(3),n.oc("disabled",e.checkModif()),n.Db(1),n.Sc(" ",n.jc(55,52,"lang.validate")," "),n.Db(2),n.oc("disabled",e.checkModif()),n.Db(1),n.Sc(" ",n.jc(58,54,"lang.cancel")," ")}},directives:[Y.c,Y.g,ee.a,X.u,X.x,P.s,P.t,M.a,k.b,ne.d,ne.e,X.K,X.v,X.w,J.b,X.d,Ne.d,X.j,Ne.a,K.a,og.b,S.a,wt.a,W.p,te.a,ne.b,Ee.f,Ee.e,T.a],pipes:[g.d,P.b,Wt.a],styles:[".availableData[_ngcontent-%COMP%]{margin:10px;display:flex}.secondaryInformations[_ngcontent-%COMP%]{font-size:10px;height:30px;color:#666}.secondaryInformations_icon[_ngcontent-%COMP%]{height:auto}.secondaryInformations_label[_ngcontent-%COMP%]{width:100%}.resultRow[_ngcontent-%COMP%]{align-items:center;display:flex;padding:5px}.resultRow-mobile[_ngcontent-%COMP%]{font-size:80%}.resultCol[_ngcontent-%COMP%]{flex:1;overflow:hidden;text-overflow:ellipsis}.resultCol-mobile[_ngcontent-%COMP%]{overflow:inherit;text-overflow:inherit;word-break:break-all}.resultCol_chrono[_ngcontent-%COMP%]{color:rgba(0,0,0,.4);font-size:90%}.actions[_ngcontent-%COMP%]{text-align:right;box-shadow:none;border:none;flex:1;justify-content:flex-end;overflow:inherit}.elemToDrag[_ngcontent-%COMP%]{flex:1;border:1px dashed;padding:10px;height:10px;line-height:0;cursor:move;margin-right:5px;margin-left:5px}.columns[_ngcontent-%COMP%]{width:100%;height:90px;padding:20px 10px;border-bottom:1px solid #ccc;color:rgba(0,0,0,.87);display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;background:#fff;font-size:14px}.mat-badge-content[_ngcontent-%COMP%]{background:#f99830}.example-list[_ngcontent-%COMP%]{display:grid;gap:10px;height:auto;max-width:100%;font-size:10px;background:#f5f5f5}.example-box[_ngcontent-%COMP%]{color:#666;display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;cursor:move;background:#f5f5f5;flex-grow:1;flex-basis:0;height:20px}.cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.example-box[_ngcontent-%COMP%]:last-child{border:none}.example-list.cdk-drop-list-dragging[_ngcontent-%COMP%] .example-box[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.editorTool[_ngcontent-%COMP%]{display:flex;height:44px;font-size:10px;margin-bottom:30px}.editorTool[_ngcontent-%COMP%] .area[_ngcontent-%COMP%]{flex:1}.editorTool[_ngcontent-%COMP%] .area[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{width:100%}.editorTool[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{border-left:1px solid #666;height:70%;margin-left:10px;margin-right:10px}.editorTool[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{height:35px}.editorTool[_ngcontent-%COMP%] .mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline{background:inherit}.editorTool[_ngcontent-%COMP%] .mat-form-field-outline{background:#fff}.optionContent[_ngcontent-%COMP%]{display:flex!important}.optionContent[_ngcontent-%COMP%] .dataIcon[_ngcontent-%COMP%]{width:30px}.optionContent[_ngcontent-%COMP%] .dataIcon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:14px}.optionContent[_ngcontent-%COMP%] .dataLabel[_ngcontent-%COMP%]{flex:1}.isSelectedMenu[_ngcontent-%COMP%]{background:rgba(249,152,48,.14)}.align_leftData[_ngcontent-%COMP%]{text-align:left}.align_centerData[_ngcontent-%COMP%]{text-align:center}.align_rightData[_ngcontent-%COMP%]{text-align:right}.boldFontData[_ngcontent-%COMP%]{font-weight:700}.bigFontData[_ngcontent-%COMP%]{font-size:14px}.smallFontData[_ngcontent-%COMP%]{font-size:10px}.normalData[_ngcontent-%COMP%]{flex:1}.longData[_ngcontent-%COMP%]{flex:3}.eventList[_ngcontent-%COMP%]{padding-top:10px}.badge-folder[_ngcontent-%COMP%]{cursor:default;background:#135f7f;margin:5px;font-size:8px;max-width:250px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.formType[_ngcontent-%COMP%]{align-items:center;margin-bottom:10px;border-radius:4px;border:1px solid #ccc;position:relative;padding:10px}.formType-title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:-7px;left:10px;padding:0;margin:0;color:#135f7f}"]}),t})();const IB=["snav2"],PB=["adminMenuTemplate"],VB=function(t){return{opacity:t}};function RB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",13),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",20),n.dc("click",(function(){return n.Dc(t),n.hc(2).linkGroup()})),n.Rb(5,"mat-icon",21),n.Wb(6,"p",22),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Rb(9,"mat-divider"),n.Wb(10,"a",23),n.ic(11,"translate"),n.Wb(12,"mat-icon",24),n.Wb(13,"mat-slide-toggle",25),n.dc("change",(function(){n.Dc(t);const e=n.hc(2);return e.toggleIsSearchBasket(e.basket),!1})),n.Vb(),n.Vb(),n.Wb(14,"p",26),n.dc("click",(function(){n.Dc(t);const e=n.hc(2);return e.toggleIsSearchBasket(e.basket),!1})),n.Qc(15),n.ic(16,"translate"),n.Vb(),n.Vb(),n.Wb(17,"a",23),n.ic(18,"translate"),n.Wb(19,"mat-icon",24),n.Wb(20,"mat-slide-toggle",25),n.dc("change",(function(){n.Dc(t);const e=n.hc(2);return e.toggleFlagNotif(e.basket),!1})),n.Vb(),n.Vb(),n.Wb(21,"p",26),n.dc("click",(function(){n.Dc(t);const e=n.hc(2);return e.toggleFlagNotif(e.basket),!1})),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(2),n.Rc(n.jc(3,10,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,12,"lang.linkGroup")," "),n.Db(3),n.pc("matTooltip",n.jc(11,14,"lang.isSearchBasketInfo")),n.Db(3),n.oc("checked",t.basket.isSearchBasket),n.Db(1),n.oc("ngStyle",n.vc(22,VB,t.basket.isSearchBasket?"":"0.3")),n.Db(1),n.Sc(" ",n.jc(16,16,"lang.isSearchBasket")," "),n.Db(2),n.pc("matTooltip",n.jc(18,18,"lang.basketNotification")),n.Db(3),n.oc("checked",t.basket.flagNotif),n.Db(1),n.oc("ngStyle",n.vc(24,VB,t.basket.flagNotif?"":"0.3")),n.Db(1),n.Sc(" ",n.jc(23,20,"lang.activateNotification")," ")}}function jB(t,e){if(1&t&&n.Oc(0,RB,24,26,"mat-nav-list",19),2&t){const t=n.hc();n.oc("ngIf",!t.creationMode)}}function AB(t,e){1&t&&(n.Wb(0,"div",27),n.Rb(1,"mat-spinner",28),n.Vb())}function WB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"input",49),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).basket.id=e}))("blur",(function(){return n.Dc(t),n.hc(2).isAvailable()})),n.ic(1,"translate"),n.Vb()}if(2&t){const t=n.hc(2);n.pc("placeholder",n.jc(1,2,"lang.id")),n.oc("ngModel",t.basket.id)}}function TB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"input",50),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).basket.id=e})),n.ic(1,"translate"),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(2);n.pc("placeholder",n.jc(1,3,"lang.id")),n.pc("title",n.jc(2,5,"lang.id")),n.oc("ngModel",t.basket.id)}}function EB(t,e){if(1&t&&(n.Wb(0,"mat-option",58),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(3);n.oc("value",t),n.Db(1),n.Sc(" ",i.langVarName[i.orderColumns.indexOf(t)],"")}}function FB(t,e){if(1&t&&(n.Wb(0,"mat-option",58),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(3);n.oc("value",t),n.Db(1),n.Sc(" ",i.langOrderName[i.orderByColumns.indexOf(t)],"")}}function LB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",59),n.dc("click",(function(){return n.Dc(t),n.hc(3).addLine()})),n.Rb(1,"mat-icon",60),n.Vb()}if(2&t){const t=n.hc(3);n.oc("disabled",2==t.orderColumnsSelected.length)}}function QB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",36),n.Wb(1,"div",51),n.Wb(2,"mat-form-field"),n.Wb(3,"mat-select",52),n.dc("ngModelChange",(function(i){n.Dc(t);const a=e.index;return n.hc(2).orderColumnsSelected[a].column=i})),n.ic(4,"translate"),n.Oc(5,EB,2,2,"mat-option",53),n.Vb(),n.Vb(),n.Vb(),n.Wb(6,"div",51),n.Wb(7,"mat-form-field"),n.Wb(8,"mat-select",52),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.order=i})),n.ic(9,"translate"),n.Oc(10,FB,2,2,"mat-option",53),n.Vb(),n.Vb(),n.Vb(),n.Wb(11,"div",54),n.Wb(12,"button",55),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc(2).removeLine(i)})),n.Rb(13,"mat-icon",56),n.Vb(),n.Oc(14,LB,2,1,"button",57),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=e.index,a=n.hc(2);n.Db(3),n.rc("placeholder","",n.jc(4,11,"lang.defaultSort")," ",i+1,""),n.qc("name","basket_res_order",i,""),n.oc("ngModel",a.orderColumnsSelected[i].column),n.Db(2),n.oc("ngForOf",a.orderColumns),n.Db(3),n.pc("placeholder",n.jc(9,13,"lang.orderBy")),n.qc("name","order_by_select",i,""),n.oc("ngModel",t.order),n.Db(2),n.oc("ngForOf",a.orderByColumns),n.Db(2),n.oc("disabled",1==a.orderColumnsSelected.length),n.Db(2),n.oc("ngIf",a.orderColumnsSelected.length==i+1)}}function NB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span"),n.Qc(1),n.Vb(),n.Wb(2,"mat-icon",62),n.dc("click",(function(){n.Dc(t);const e=n.hc().index;return n.hc(2).unlinkGroup(e)})),n.ic(3,"translate"),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(1),n.Rc(t.group_desc),n.Db(1),n.pc("matTooltip",n.jc(3,2,"lang.unlinkGroup"))}}function zB(t,e){1&t&&(n.Wb(0,"small"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("(",n.jc(2,1,"lang.default"),")"))}function BB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-icon",85),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.ic(1,"translate"),n.Vb()}2&t&&n.pc("matTooltip",n.jc(1,1,"lang.delete"))}const UB=function(t){return{"font-weight":t}};function $B(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",81),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit,i=n.hc(2).$implicit;return n.hc(2).openSettings(i,e)}))("removed",(function(){n.Dc(t);const e=n.hc().$implicit,i=n.hc(2).$implicit;return n.hc(2).unlinkAction(i,e)})),n.Qc(1," \xa0 "),n.Wb(2,"span"),n.Qc(3),n.Vb(),n.Qc(4,"\xa0 "),n.Oc(5,zB,3,3,"small",19),n.Rb(6,"span",82),n.Wb(7,"button",83),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc(2).$implicit,s=n.hc(2);return e.stopPropagation(),s.setDefaultAction(a,i)})),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Oc(10,BB,2,3,"mat-icon",84),n.Vb()}if(2&t){const t=n.hc().$implicit;n.qc("matTooltip","id : ",t.id,""),n.oc("ngStyle",n.vc(9,UB,1==t.default_action_list?"bold":"")),n.Db(3),n.Rc(t.label_action),n.Db(2),n.oc("ngIf",1==t.default_action_list),n.Db(2),n.oc("disabled",t.default_action_list),n.Db(1),n.Rc(n.jc(9,7,"lang.setByDefault")),n.Db(2),n.oc("ngIf",1!=t.default_action_list)}}function HB(t,e){if(1&t&&(n.Wb(0,"span",79),n.Oc(1,$B,11,11,"mat-chip",80),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",1==t.checked)}}function GB(t,e){1&t&&n.Rb(0,"mat-header-cell")}function XB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",86),n.Wb(1,"mat-checkbox",87),n.dc("change",(function(){n.Dc(t);const e=n.hc(2).$implicit;return n.hc(2).addAction(e)}))("ngModelChange",(function(i){return n.Dc(t),e.$implicit.checked=i})),n.Wb(2,"span"),n.Qc(3),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.qc("matTooltip","id : ",t.id,""),n.Db(1),n.oc("disabled",1==t.default_action_list)("ngModel",t.checked),n.Db(2),n.Rc(t.label_action)}}function qB(t,e){1&t&&n.Rb(0,"mat-header-cell")}function KB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",88),n.Wb(1,"button",89),n.Rb(2,"mat-icon",90),n.Vb(),n.Wb(3,"mat-menu",null,91),n.Wb(5,"button",92),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc(2).$implicit;return n.hc(2).setDefaultAction(a,i)})),n.Rb(6,"mat-icon",93),n.Wb(7,"span"),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Vb(),n.Wb(10,"button",94),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc(2).$implicit;return n.hc(2).openSettings(a,i)})),n.Rb(11,"mat-icon",95),n.Wb(12,"span"),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.zc(4);n.qc("matTooltip","id : ",t.id,""),n.Db(1),n.oc("matMenuTriggerFor",i)("disabled",!t.checked),n.Db(4),n.oc("disabled",1==t.default_action_list),n.Db(3),n.Rc(n.jc(9,6,"lang.defaultAction")),n.Db(5),n.Rc(n.jc(14,8,"lang.moreOptions"))}}function YB(t,e){1&t&&n.Rb(0,"mat-row")}function JB(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab-group"),n.Wb(1,"mat-tab",31),n.ic(2,"translate"),n.Wb(3,"div",63),n.Wb(4,"h5"),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Wb(7,"mat-chip-list",64,65),n.Oc(9,HB,2,1,"span",66),n.ic(10,"sortBy"),n.Vb(),n.Vb(),n.Wb(11,"div",63),n.Wb(12,"mat-accordion",67),n.Wb(13,"mat-expansion-panel",68),n.dc("opened",(function(){n.Dc(t);const e=n.hc().index;return n.hc(2).initAction(e)})),n.Wb(14,"mat-expansion-panel-header"),n.Wb(15,"mat-panel-title"),n.Qc(16),n.ic(17,"translate"),n.Vb(),n.Vb(),n.Wb(18,"div"),n.Wb(19,"mat-form-field"),n.Wb(20,"input",69),n.dc("keyup",(function(e){return n.Dc(t),n.hc(3).applyFilter(e.target.value)})),n.ic(21,"translate"),n.Vb(),n.Vb(),n.Wb(22,"mat-table",70,71),n.Ub(24,72),n.Oc(25,GB,1,0,"mat-header-cell",73),n.Oc(26,XB,4,4,"mat-cell",74),n.Tb(),n.Ub(27,75),n.Oc(28,qB,1,0,"mat-header-cell",73),n.Oc(29,KB,15,10,"mat-cell",76),n.Tb(),n.Oc(30,YB,1,0,"mat-row",77),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(31,"mat-tab",31),n.ic(32,"translate"),n.Wb(33,"list-administration",78),n.dc("refreshBasketGroup",(function(e){n.Dc(t);const i=n.hc().$implicit;return n.hc(2).updateGroupInfo(i,e)})),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(1),n.pc("label",n.jc(2,9,"lang.actions")),n.Db(4),n.Rc(n.jc(6,11,"lang.actionChosen")),n.Db(4),n.oc("ngForOf",n.kc(10,13,t.groupActions,"label_action")),n.Db(7),n.Sc(" ",n.jc(17,16,"lang.actionAvailable")," "),n.Db(4),n.pc("placeholder",n.jc(21,18,"lang.filterBy")),n.Db(2),n.oc("dataSource",e.dataSource),n.Db(8),n.oc("matRowDefColumns",e.displayedColumns),n.Db(1),n.pc("label",n.jc(32,20,"lang.resultPage")),n.Db(2),n.oc("currentBasketGroup",t)}}function ZB(t,e){if(1&t&&(n.Wb(0,"mat-tab",31),n.Oc(1,NB,4,4,"ng-template",61),n.Oc(2,JB,34,22,"mat-tab-group",19),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.pc("label",t.group_desc),n.Db(2),n.oc("ngIf",i.selectedIndex>0)}}const tU=function(t){return{color:t}};function eU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",29),n.Wb(1,"mat-tab-group",30),n.dc("selectedIndexChange",(function(e){return n.Dc(t),n.hc().selectedIndex=e})),n.Wb(2,"mat-tab",31),n.ic(3,"translate"),n.Wb(4,"form",32,33),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Wb(6,"mat-form-field"),n.Oc(7,WB,2,4,"input",34),n.Oc(8,TB,3,7,"input",35),n.Vb(),n.Wb(9,"div",36),n.Wb(10,"div",37),n.Wb(11,"mat-form-field"),n.Wb(12,"input",38),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().basket.basket_name=e})),n.ic(13,"translate"),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(15,"div",39),n.Wb(16,"mat-form-field"),n.Wb(17,"input",40),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().basket.color=e})),n.ic(18,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(19,"mat-form-field"),n.Wb(20,"input",41),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().basket.basket_desc=e})),n.ic(21,"translate"),n.ic(22,"translate"),n.Vb(),n.Vb(),n.Wb(23,"mat-form-field"),n.Wb(24,"textarea",42),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().basket.clause=e})),n.ic(25,"translate"),n.ic(26,"translate"),n.Vb(),n.Wb(27,"mat-icon",43),n.dc("click",(function(){return n.Dc(t),n.hc(),n.zc(16).toggle()})),n.ic(28,"translate"),n.Vb(),n.Vb(),n.Wb(29,"div",44),n.Oc(30,QB,15,15,"div",45),n.Vb(),n.Wb(31,"div",46),n.Wb(32,"button",47),n.Qc(33),n.ic(34,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Oc(35,ZB,3,2,"mat-tab",48),n.Vb(),n.Vb()}if(2&t){const t=n.zc(5),e=n.hc();n.Db(1),n.oc("selectedIndex",e.selectedIndex),n.Db(1),n.pc("label",n.jc(3,21,"lang.informations")),n.Db(5),n.oc("ngIf",e.creationMode),n.Db(1),n.oc("ngIf",!e.creationMode),n.Db(4),n.pc("title",n.jc(13,23,"lang.label")),n.pc("placeholder",n.jc(14,25,"lang.label")),n.oc("ngModel",e.basket.basket_name)("ngStyle",n.vc(41,tU,e.basket.color)),n.Db(5),n.pc("matTooltip",n.jc(18,27,"lang.chooseColor")),n.oc("ngModel",e.basket.color),n.Db(3),n.pc("title",n.jc(21,29,"lang.description")),n.pc("placeholder",n.jc(22,31,"lang.description")),n.oc("ngModel",e.basket.basket_desc),n.Db(4),n.pc("title",n.jc(25,33,"lang.clause")),n.pc("placeholder",n.jc(26,35,"lang.clause")),n.oc("ngModel",e.basket.clause),n.Db(3),n.pc("matTooltip",n.jc(28,37,"lang.keywordHelper")),n.Db(3),n.oc("ngForOf",e.orderColumnsSelected),n.Db(2),n.oc("disabled",!t.form.valid||0==e.orderColumnsSelected.length),n.Db(1),n.Rc(n.jc(34,39,"lang.save")),n.Db(2),n.oc("ngForOf",e.basketGroups)}}const iU=["statusInput"];function nU(t,e){1&t&&(n.Qc(0),n.ic(1,"translate")),2&t&&n.Sc(" ",n.jc(1,1,"lang.redirects")," ")}function aU(t,e){1&t&&n.Oc(0,nU,2,3,"ng-template",21)}function sU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-expansion-panel",17),n.dc("opened",(function(){return n.Dc(t),n.hc(2).initService2()})),n.Wb(1,"mat-expansion-panel-header"),n.Wb(2,"mat-panel-title"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb(),n.Wb(5,"mat-form-field"),n.Rb(6,"input",22),n.ic(7,"translate"),n.Vb(),n.Rb(8,"div",23),n.Vb()}2&t&&(n.Db(3),n.Sc(" ",n.jc(4,2,"lang.toUsersEntities")," "),n.Db(3),n.pc("placeholder",n.jc(7,4,"lang.searchEntities")))}function oU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab"),n.Oc(1,aU,1,0,void 0,7),n.Wb(2,"mat-accordion"),n.Wb(3,"mat-expansion-panel",17),n.dc("opened",(function(){return n.Dc(t),n.hc().initService()})),n.Wb(4,"mat-expansion-panel-header"),n.Wb(5,"mat-panel-title"),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Vb(),n.Wb(8,"mat-form-field"),n.Rb(9,"input",18),n.ic(10,"translate"),n.Vb(),n.Rb(11,"div",19),n.Vb(),n.Oc(12,sU,9,6,"mat-expansion-panel",20),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(1),n.oc("ngIf","redirect"==t.data.action.keyword),n.Db(5),n.Sc(" ",n.jc(7,4,"lang.toEntities")," "),n.Db(3),n.pc("placeholder",n.jc(10,6,"lang.searchEntities")),n.Db(3),n.oc("ngIf","redirect"==t.data.action.keyword)}}function rU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item",4),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc().validateForm(e)})),n.Qc(1),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(1),n.Sc(" ",t.group_desc," ")}}function cU(t,e){if(1&t&&(n.Wb(0,"span"),n.Oc(1,rU,2,1,"mat-list-item",3),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",0==t.isUsed)}}let lU=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this.translate=t,this.http=e,this.route=i,this.router=n,this.notify=a,this.dialog=s,this.headerService=o,this.appService=r,this.viewContainerRef=c,this.selectedIndex=0,this.loading=!1,this.config={},this.basket={},this.basketClone={},this.basketGroups=[],this.allGroups=[],this.actionsList=[],this.list_display=[],this.displayedColumns=["label_action","actions"],this.orderColumns=["alt_identifier","creation_date","process_limit_date","res_id","priority"],this.orderByColumns=["asc","desc"],this.langVarName=[this.translate.instant("lang.chrono"),this.translate.instant("lang.creationDate"),this.translate.instant("lang.processLimitDate"),this.translate.instant("lang.id"),this.translate.instant("lang.priority")],this.langOrderName=[this.translate.instant("lang.ascending"),this.translate.instant("lang.descending")],this.orderColumnsSelected=[{column:"res_id",order:"asc"}]}applyFilter(t){t=(t=t.trim()).toLowerCase(),this.dataSource.filter=t}ngOnInit(){this.loading=!0,this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.route.params.subscribe(t=>{void 0===t.id?(this.headerService.setHeader(this.translate.instant("lang.basketCreation")),this.creationMode=!0,this.basketIdAvailable=!1,this.loading=!1):(this.orderColumnsSelected=[],this.creationMode=!1,this.basketIdAvailable=!0,this.id=t.id,this.http.get("../rest/baskets/"+this.id).subscribe(t=>{if(this.headerService.setHeader(this.translate.instant("lang.basketModification"),t.basket.basket_name),this.basket=t.basket,this.basket.id=t.basket.basket_id,this.basket.name=t.basket.basket_name,this.basket.description=t.basket.basket_desc,this.basket.clause=t.basket.basket_clause,this.basket.isSearchBasket="Y"!==t.basket.is_visible,this.basket.flagNotif="Y"===t.basket.flag_notif,""===this.basket.basket_res_order||null==this.basket.basket_res_order)this.orderColumnsSelected=[];else{const t=this.basket.basket_res_order.split(", ");for(let e=0;e<t.length;e++){const i=t[e].split(" ");i[1]||(i[1]="desc"),this.orderColumnsSelected.push({column:i[0],order:i[1]})}}this.basketClone=JSON.parse(JSON.stringify(this.basket)),this.http.get("../rest/baskets/"+this.id+"/groups").subscribe(t=>{this.allGroups=t.allGroups,this.allGroups.forEach(e=>{e.isUsed=!1,t.groups.forEach(t=>{e.group_id===t.group_id&&(e.isUsed=!0)})}),t.groups.forEach(t=>{t.groupActions.forEach(t=>{t.used_in_basketlist="Y"===t.used_in_basketlist,t.used_in_action_page="Y"===t.used_in_action_page,t.default_action_list="Y"===t.default_action_list})}),this.basketGroups=t.groups,this.loading=!1},t=>{this.notify.handleErrors(t)})},t=>{this.notify.handleErrors(t)}))})}openSettings(t,e){this.config={panelClass:"maarch-modal",data:{group:t,action:e}},this.dialogRef=this.dialog.open(dU,this.config),this.dialogRef.afterClosed().subscribe(i=>{i&&this.http.put("../rest/baskets/"+this.id+"/groups/"+i.group.group_id+"/actions",{groupActions:i.group.groupActions}).subscribe(()=>{this.dialogRef=null,this.notify.success(this.translate.instant("lang.basketUpdated"))},i=>{this.dialogRef=null,this.openSettings(t,e),this.notify.error(i.error.errors)})})}isAvailable(){this.basket.id?this.http.get("../rest/baskets/"+this.basket.id).subscribe(()=>{this.basketIdAvailable=!1},t=>{this.basketIdAvailable=!1,t.error.errors===this.translate.instant("lang.basketNotFound")&&(this.basketIdAvailable=!0)}):this.basketIdAvailable=!1}onSubmit(){if(null!==this.orderColumnsSelected&&this.orderColumnsSelected.length>0){const t=[];for(let e=0;e<this.orderColumnsSelected.length;e++)t[e]=this.orderColumnsSelected[e].column+" "+this.orderColumnsSelected[e].order;this.basket.basket_res_order=t.join(", ")}else this.basket.basket_res_order="";this.creationMode?this.http.post("../rest/baskets",this.basket).subscribe(()=>{this.notify.success(this.translate.instant("lang.basketAdded")),this.router.navigate(["/administration/baskets/"+this.basket.id])},t=>{this.notify.error(t.error.errors)}):this.http.put("../rest/baskets/"+this.id,this.basket).subscribe(()=>{this.notify.success(this.translate.instant("lang.basketUpdated")),this.router.navigate(["/administration/baskets"])},t=>{this.notify.error(t.error.errors)})}addLine(){this.orderColumnsSelected.push(JSON.parse(JSON.stringify(this.orderColumnsSelected[0])))}removeLine(t){this.orderColumnsSelected.splice(t,1)}initAction(t){this.dataSource=new vt.p(this.basketGroups[t].groupActions),this.dataSource.sort=this.sort}setDefaultAction(t,e){t.groupActions.forEach(t=>{t.default_action_list=t.id===e.id}),this.addAction(t)}unlinkGroup(t){confirm(this.translate.instant("lang.unlinkGroup")+" ?")&&this.http.delete("../rest/baskets/"+this.id+"/groups/"+this.basketGroups[t].group_id).subscribe(()=>{this.allGroups.forEach(e=>{e.group_id===this.basketGroups[t].group_id&&(e.isUsed=!1)}),this.basketGroups.splice(t,1),this.notify.success(this.translate.instant("lang.basketUpdated")),this.selectedIndex=0},t=>{this.notify.error(t.error.errors)})}linkGroup(){this.config={panelClass:"maarch-modal",data:{basketId:this.basket.id,groups:this.allGroups,linkedGroups:this.basketGroups}},this.dialogRef=this.dialog.open(hU,this.config),this.dialogRef.afterClosed().subscribe(t=>{t&&(t.list_display=this.basketGroups.length>0?this.basketGroups[this.basketGroups.length-1].list_display:{subInfos:[],templateColumns:0},this.http.post("../rest/baskets/"+this.id+"/groups",t).subscribe(()=>{this.basketGroups.push(t),this.allGroups.forEach(e=>{e.group_id===t.group_id&&(e.isUsed=!0)}),this.notify.success(this.translate.instant("lang.basketUpdated")),this.selectedIndex=this.basketGroups.length},t=>{this.notify.error(t.error.errors)})),this.dialogRef=null})}addAction(t){this.http.put("../rest/baskets/"+this.id+"/groups/"+t.group_id+"/actions",{groupActions:t.groupActions}).subscribe(()=>{this.notify.success(this.translate.instant("lang.actionsGroupBasketUpdated"))},t=>{this.notify.error(t.error.errors)})}toggleIsSearchBasket(t){t.isSearchBasket=!t.isSearchBasket,this.basketClone.isSearchBasket=t.isSearchBasket,this.http.put("../rest/baskets/"+this.id,this.basketClone).subscribe(()=>{this.notify.success(this.translate.instant("lang.basketUpdated"))},t=>{this.notify.error(t.error.errors)})}toggleFlagNotif(t){t.flagNotif=!t.flagNotif,this.basketClone.flagNotif=t.flagNotif,this.http.put("../rest/baskets/"+this.id,this.basketClone).subscribe(()=>{this.notify.success(this.translate.instant("lang.basketUpdated"))},t=>{this.notify.error(t.error.errors)})}unlinkAction(t,e){confirm(this.translate.instant("lang.unlinkAction")+" ?")&&(e.checked=!1,this.http.put("../rest/baskets/"+this.id+"/groups/"+t.group_id+"/actions",{groupActions:t.groupActions}).subscribe(()=>{this.notify.success(this.translate.instant("lang.actionsGroupBasketUpdated"))},t=>{this.notify.error(t.error.errors)}))}updateGroupInfo(t,e){}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(q.b),n.Qb(y.a),n.Qb(w.a),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(IB,!0),n.Kc(PB,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:98,vars:59,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["fixedTopGap","56","position","end",3,"mode","fixedInViewport","opened"],["snav2",""],["mat-subheader",""],["role","list",2,"width","300px","padding","5px"],[2,"font-size","10px"],[2,"border","1px black solid","padding","3px","font-size","10px"],["mat-line","",2,"font-weight","bold","font-size","10px"],["mat-line","",2,"font-size","10px"],[4,"ngIf"],["mat-list-item","",3,"click"],["color","primary","mat-list-icon","",1,"fa","fa-link"],["mat-line",""],["mat-list-item","","disableRipple","true",3,"matTooltip"],["color","primary","mat-list-icon",""],["color","primary",3,"checked","change"],["mat-line","",3,"ngStyle","click"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[3,"selectedIndex","selectedIndexChange"],[3,"label"],[1,"form-horizontal",3,"ngSubmit"],["basketForm","ngForm"],["matInput","","name","identifier","maxlength","32","pattern","^[\\w.-]*$","required","",3,"placeholder","ngModel","ngModelChange","blur",4,"ngIf"],["matInput","","name","identifier","required","","disabled","",3,"placeholder","title","ngModel","ngModelChange",4,"ngIf"],[1,"row"],[1,"col-md-11","col-xs-10"],["matInput","","name","label","maxlength","255","required","",3,"title","placeholder","ngModel","ngStyle","ngModelChange"],[1,"col-md-1","col-xs-2"],["matInput","","type","color","name","color",3,"matTooltip","ngModel","ngModelChange"],["matInput","","name","description","maxlength","255","required","",3,"title","placeholder","ngModel","ngModelChange"],["matInput","","name","clause","matTextareaAutosize","","matAutosizeMinRows","1","required","",3,"title","placeholder","ngModel","ngModelChange"],["color","primary","matSuffix","",1,"fa","fa-info-circle",2,"cursor","pointer",3,"matTooltip","click"],["id","listOrder"],["class","row",4,"ngFor","ngForOf"],[1,"col-md-12","text-center",2,"padding","10px"],["mat-raised-button","","color","primary",3,"disabled"],[3,"label",4,"ngFor","ngForOf"],["matInput","","name","identifier","maxlength","32","pattern","^[\\w.-]*$","required","",3,"placeholder","ngModel","ngModelChange","blur"],["matInput","","name","identifier","required","","disabled","",3,"placeholder","title","ngModel","ngModelChange"],[1,"col-md-5","col-xs-5","text-center"],["required","",3,"placeholder","ngModel","name","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"col-md-2","col-xs-2","text-left"],["color","warn","mat-icon-button","","type","button",3,"disabled","click"],[1,"fa","fa-minus-square","fa-2x"],["color","primary","mat-icon-button","","type","button",3,"disabled","click",4,"ngIf"],[3,"value"],["color","primary","mat-icon-button","","type","button",3,"disabled","click"],[1,"fa","fa-plus-square","fa-2x"],["mat-tab-label",""],["color","warn",1,"fa","fa-times",3,"matTooltip","click"],[1,"col-md-6"],[1,"mat-chip-list-stacked"],["chipList",""],["style","width:100%;",4,"ngFor","ngForOf"],[1,"basketActionsList"],[3,"opened"],["matInput","",3,"placeholder","keyup"],[3,"dataSource"],["table",""],["matColumnDef","label_action"],[4,"matHeaderCellDef"],["style","flex:6;",3,"matTooltip",4,"matCellDef"],["matColumnDef","actions"],["style","text-align:right",3,"matTooltip",4,"matCellDef"],[4,"matRowDef","matRowDefColumns"],[3,"currentBasketGroup","refreshBasketGroup"],[2,"width","100%"],["color","primary","style","cursor:pointer;margin:5px;border-radius:0px;display:flex;","selectable","true","removable","true",3,"matTooltip","ngStyle","click","removed",4,"ngIf"],["color","primary","selectable","true","removable","true",2,"cursor","pointer","margin","5px","border-radius","0px","display","flex",3,"matTooltip","ngStyle","click","removed"],[2,"flex","1 1 auto"],["mat-raised-button","",3,"disabled","click"],["matChipRemove","","color","warn","class","fa fa-times",3,"matTooltip","click",4,"ngIf"],["matChipRemove","","color","warn",1,"fa","fa-times",3,"matTooltip","click"],[2,"flex","6",3,"matTooltip"],["color","primary",3,"disabled","ngModel","change","ngModelChange"],[2,"text-align","right",3,"matTooltip"],["mat-icon-button","",3,"matMenuTriggerFor","disabled"],[1,"fa","fa-bars"],["menu","matMenu"],["mat-menu-item","",3,"disabled","click"],[1,"fa","fa-check-circle"],["mat-menu-item","",3,"click"],[1,"fa","fa-cogs"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,jB,1,1,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,AB,2,0,"div",9),n.Oc(14,eU,36,43,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Wb(15,"mat-sidenav",11,12),n.Wb(17,"mat-nav-list"),n.Wb(18,"h3",13),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Vb(),n.Wb(21,"mat-list",14),n.Wb(22,"p",15),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Wb(25,"div",16),n.Wb(26,"b"),n.Qc(27,"DESTINATION = @my_primary_entity or DESTINATION in (@subentities[@my_primary_entity])"),n.Vb(),n.Vb(),n.Wb(28,"h4",17),n.Qc(29,"@user :"),n.Vb(),n.Wb(30,"p",18),n.Qc(31),n.ic(32,"translate"),n.Vb(),n.Wb(33,"h4",17),n.Qc(34,"@user_id :"),n.Vb(),n.Wb(35,"p",18),n.Qc(36),n.ic(37,"translate"),n.Vb(),n.Wb(38,"h4",17),n.Qc(39,"@email :"),n.Vb(),n.Wb(40,"p",18),n.Qc(41),n.ic(42,"translate"),n.Vb(),n.Wb(43,"h4",17),n.Qc(44,"@my_entities :"),n.Vb(),n.Wb(45,"p",18),n.Qc(46),n.ic(47,"translate"),n.Vb(),n.Wb(48,"h4",17),n.Qc(49,"@my_entities_id :"),n.Vb(),n.Wb(50,"p",18),n.Qc(51),n.ic(52,"translate"),n.Vb(),n.Wb(53,"h4",17),n.Qc(54,"@my_primary_entity :"),n.Vb(),n.Wb(55,"p",18),n.Qc(56),n.ic(57,"translate"),n.Vb(),n.Wb(58,"h4",17),n.Qc(59,"@my_primary_entity_id :"),n.Vb(),n.Wb(60,"p",18),n.Qc(61),n.ic(62,"translate"),n.Vb(),n.Wb(63,"h4",17),n.Qc(64,"@subentities[('entity_1',...,'entity_n')] :"),n.Vb(),n.Wb(65,"p",18),n.Qc(66),n.ic(67,"translate"),n.Vb(),n.Wb(68,"h4",17),n.Qc(69,"@subentities_id[(1, 2, ...)] :"),n.Vb(),n.Wb(70,"p",18),n.Qc(71),n.ic(72,"translate"),n.Vb(),n.Wb(73,"h4",17),n.Qc(74,"@parent_entity['entity_id'] :"),n.Vb(),n.Wb(75,"p",18),n.Qc(76),n.ic(77,"translate"),n.Vb(),n.Wb(78,"h4",17),n.Qc(79,"@sisters_entities['entity_id'] :"),n.Vb(),n.Wb(80,"p",18),n.Qc(81),n.ic(82,"translate"),n.Vb(),n.Wb(83,"h4",17),n.Qc(84,"@entity_type['type'] :"),n.Vb(),n.Wb(85,"p",18),n.Qc(86),n.ic(87,"translate"),n.Vb(),n.Wb(88,"h4",17),n.Qc(89,"@all_entities :"),n.Vb(),n.Wb(90,"p",18),n.Qc(91),n.ic(92,"translate"),n.Vb(),n.Wb(93,"h4",17),n.Qc(94,"@immediate_children['entity_1',..., 'entity_id'] :"),n.Vb(),n.Wb(95,"p",18),n.Qc(96),n.ic(97,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",(e.appService.getViewMode(),!1)),n.Db(4),n.Rc(n.jc(20,27,"lang.keywordHelp")),n.Db(4),n.Rc(n.jc(24,29,"lang.keywordHelpDesc_11")),n.Db(8),n.Rc(n.jc(32,31,"lang.keywordHelpDesc_1")),n.Db(5),n.Rc(n.jc(37,33,"lang.keywordHelpDesc_12")),n.Db(5),n.Rc(n.jc(42,35,"lang.keywordHelpDesc_2")),n.Db(5),n.Rc(n.jc(47,37,"lang.keywordHelpDesc_3")),n.Db(5),n.Rc(n.jc(52,39,"lang.keywordHelpDesc_13")),n.Db(5),n.Rc(n.jc(57,41,"lang.keywordHelpDesc_4")),n.Db(5),n.Rc(n.jc(62,43,"lang.keywordHelpDesc_14")),n.Db(5),n.Rc(n.jc(67,45,"lang.keywordHelpDesc_5")),n.Db(5),n.Rc(n.jc(72,47,"lang.keywordHelpDesc_15")),n.Db(5),n.Rc(n.jc(77,49,"lang.keywordHelpDesc_6")),n.Db(5),n.Rc(n.jc(82,51,"lang.keywordHelpDesc_7")),n.Db(5),n.Rc(n.jc(87,53,"lang.keywordHelpDesc_8")),n.Db(5),n.Rc(n.jc(92,55,"lang.keywordHelpDesc_9")),n.Db(5),n.Rc(n.jc(97,57,"lang.keywordHelpDesc_10")))},directives:[I.e,I.f,Ot,We,P.t,I.d,R.h,R.g,R.a,W.l,R.d,S.a,R.c,T.a,A.b,te.a,P.w,V.c,K.a,Te.c,Te.a,X.K,X.v,X.w,Y.c,J.b,X.d,X.p,X.F,X.u,X.x,J.d,Y.j,P.s,k.b,X.B,ee.a,W.p,Te.d,ze.d,gt.a,gt.c,gt.g,gt.h,vt.o,vt.c,vt.i,vt.b,vt.n,SB,ze.a,ze.e,vt.h,vt.a,j.a,ne.d,ne.e,ne.b,vt.m],pipes:[g.d,Wt.a],styles:[".basketActionsList[_ngcontent-%COMP%] .mat-expansion-panel-body{height:400px;overflow:auto}.mat-chip[_ngcontent-%COMP%]{padding:25px!important}textarea.mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0}"]}),t})(),dU=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.data=n,this.dialogRef=a,this.allEntities=[]}ngOnInit(){this.http.get("../rest/entities").subscribe(t=>{[{id:"ALL_ENTITIES",keyword:"ALL_ENTITIES",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:this.translate.instant("lang.allEntities")},{id:"ENTITIES_JUST_BELOW",keyword:"ENTITIES_JUST_BELOW",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:this.translate.instant("lang.immediatelyBelowMyPrimaryEntity")},{id:"ENTITIES_BELOW",keyword:"ENTITIES_BELOW",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:this.translate.instant("lang.belowAllMyEntities")},{id:"ALL_ENTITIES_BELOW",keyword:"ALL_ENTITIES_BELOW",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:this.translate.instant("lang.belowMyPrimaryEntity")},{id:"MY_ENTITIES",keyword:"MY_ENTITIES",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:this.translate.instant("lang.myEntities")},{id:"MY_PRIMARY_ENTITY",keyword:"MY_PRIMARY_ENTITY",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:this.translate.instant("lang.myPrimaryEntity")},{id:"SAME_LEVEL_ENTITIES",keyword:"SAME_LEVEL_ENTITIES",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:this.translate.instant("lang.sameLevelMyPrimaryEntity")},{id:"ENTITIES_JUST_UP",keyword:"ENTITIES_JUST_UP",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:this.translate.instant("lang.immediatelySuperiorMyPrimaryEntity")}].forEach(t=>{this.allEntities.push(t)}),t.entities.forEach(t=>{this.allEntities.push(t)})},t=>{this.notify.handleErrors(t)})}initService(){this.allEntities.forEach(t=>{t.state={opened:!1,selected:!1},this.data.action.redirects.forEach(e=>{(t.id===e.keyword&&"ENTITY"===e.redirect_mode||t.id===e.entity_id&&"ENTITY"===e.redirect_mode)&&(t.state={opened:!0,selected:!0})})}),$("#jstree").jstree({checkbox:{three_state:!1},core:{force_text:!0,themes:{name:"proton",responsive:!0},data:this.allEntities},plugins:["checkbox","search"]}),$("#jstree").on("select_node.jstree",(t,e)=>{this.data.action.redirects.push(e.node.original.keyword?{action_id:this.data.action.id,entity_id:"",keyword:e.node.id,redirect_mode:"ENTITY"}:{action_id:this.data.action.id,entity_id:e.node.id,keyword:"",redirect_mode:"ENTITY"})}).on("deselect_node.jstree",(t,e)=>{this.data.action.redirects.forEach(t=>{if(e.node.original.keyword){if(t.keyword===e.node.original.keyword){const e=this.data.action.redirects.indexOf(t);this.data.action.redirects.splice(e,1)}}else if(t.entity_id===e.node.id){const e=this.data.action.redirects.indexOf(t);this.data.action.redirects.splice(e,1)}})}).jstree();let t=!1;$("#jstree_search").keyup((function(){t&&clearTimeout(t),t=setTimeout((function(){const t=$("#jstree_search").val();$("#jstree").jstree(!0).search(t)}),250)}))}initService2(){this.allEntities.forEach(t=>{t.state={opened:!1,selected:!1},this.data.action.redirects.forEach(e=>{(t.id===e.keyword&&"USERS"===e.redirect_mode||t.id===e.entity_id&&"USERS"===e.redirect_mode)&&(t.state={opened:!0,selected:!0})})}),$("#jstree2").jstree({checkbox:{three_state:!1},core:{force_text:!0,themes:{name:"proton",responsive:!0},data:this.allEntities},plugins:["checkbox","search"]}),$("#jstree2").on("select_node.jstree",(t,e)=>{this.data.action.redirects.push(e.node.original.keyword?{action_id:this.data.action.id,entity_id:"",keyword:e.node.id,redirect_mode:"USERS"}:{action_id:this.data.action.id,entity_id:e.node.id,keyword:"",redirect_mode:"USERS"})}).on("deselect_node.jstree",(t,e)=>{this.data.action.redirects.forEach(t=>{if(e.node.original.keyword){if(t.keyword===e.node.original.keyword){const e=this.data.action.redirects.indexOf(t);this.data.action.redirects.splice(e,1)}}else if(t.entity_id===e.node.id){const e=this.data.action.redirects.indexOf(t);this.data.action.redirects.splice(e,1)}})}).jstree();let t=!1;$("#jstree_search2").keyup((function(){t&&clearTimeout(t),t=setTimeout((function(){const t=$("#jstree_search2").val();$("#jstree2").jstree(!0).search(t)}),250)}))}saveSettings(){this.dialogRef.close(this.data)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.a),n.Qb(q.h))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(iU,!0),2&t&&n.yc(i=n.ec())&&(e.statusInput=i.first)},decls:114,vars:75,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["settingGroupsBasket","ngForm"],[1,"container-fluid"],[1,"col-md-6"],["id","usedInActionPage","name","usedInActionPage","color","primary",3,"ngModel","ngModelChange"],["id","usedInBasketlist","name","usedInBasketlist","color","primary",3,"ngModel","ngModelChange"],[4,"ngIf"],[3,"label"],["matInput","","name","clause","matTextareaAutosize","","matAutosizeMinRows","1",3,"title","placeholder","ngModel","ngModelChange"],["role","list",2,"width","400px","padding","5px"],[2,"font-size","10px"],[2,"border","1px black solid","padding","3px","font-size","10px"],["mat-line","",2,"font-weight","bold","font-size","10px"],["mat-line","",2,"font-size","10px"],[1,"divider-modal"],["mat-raised-button","","type","submit","color","primary",2,"margin","auto",3,"disabled","click"],[3,"opened"],["matInput","","id","jstree_search","name","jstree_search","type","text",3,"placeholder"],["id","jstree"],[3,"opened",4,"ngIf"],["mat-tab-label",""],["matInput","","id","jstree_search2","name","jstree_search2","type","text",3,"placeholder"],["id","jstree2"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h2",1),n.Qc(2),n.ic(3,"translate"),n.Wb(4,"small"),n.Qc(5),n.Vb(),n.Vb(),n.Wb(6,"mat-dialog-content"),n.Wb(7,"form",null,2),n.Wb(9,"div",3),n.Wb(10,"div",4),n.Wb(11,"mat-checkbox",5),n.dc("ngModelChange",(function(t){return e.data.action.used_in_action_page=t})),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Wb(14,"div",4),n.Wb(15,"mat-checkbox",6),n.dc("ngModelChange",(function(t){return e.data.action.used_in_basketlist=t})),n.Qc(16),n.ic(17,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(18,"mat-tab-group"),n.Oc(19,oU,13,8,"mat-tab",7),n.Wb(20,"mat-tab",8),n.ic(21,"translate"),n.Wb(22,"mat-form-field"),n.Wb(23,"textarea",9),n.dc("ngModelChange",(function(t){return e.data.action.where_clause=t})),n.ic(24,"translate"),n.ic(25,"translate"),n.Vb(),n.Vb(),n.Wb(26,"mat-accordion"),n.Wb(27,"mat-expansion-panel"),n.Wb(28,"mat-expansion-panel-header"),n.Wb(29,"mat-panel-title"),n.Qc(30),n.ic(31,"translate"),n.Vb(),n.Vb(),n.Wb(32,"mat-list",10),n.Wb(33,"p",11),n.Qc(34),n.ic(35,"translate"),n.Vb(),n.Wb(36,"div",12),n.Wb(37,"b"),n.Qc(38,"DESTINATION = @my_primary_entity or DESTINATION in (@subentities[@my_primary_entity])"),n.Vb(),n.Vb(),n.Wb(39,"h4",13),n.Qc(40,"@user :"),n.Vb(),n.Wb(41,"p",14),n.Qc(42),n.ic(43,"translate"),n.Vb(),n.Wb(44,"h4",13),n.Qc(45,"@user_id :"),n.Vb(),n.Wb(46,"p",14),n.Qc(47),n.ic(48,"translate"),n.Vb(),n.Wb(49,"h4",13),n.Qc(50,"@email :"),n.Vb(),n.Wb(51,"p",14),n.Qc(52),n.ic(53,"translate"),n.Vb(),n.Wb(54,"h4",13),n.Qc(55,"@my_entities :"),n.Vb(),n.Wb(56,"p",14),n.Qc(57),n.ic(58,"translate"),n.Vb(),n.Wb(59,"h4",13),n.Qc(60,"@my_entities_id :"),n.Vb(),n.Wb(61,"p",14),n.Qc(62),n.ic(63,"translate"),n.Vb(),n.Wb(64,"h4",13),n.Qc(65,"@my_primary_entity :"),n.Vb(),n.Wb(66,"p",14),n.Qc(67),n.ic(68,"translate"),n.Vb(),n.Wb(69,"h4",13),n.Qc(70,"@my_primary_entity_id :"),n.Vb(),n.Wb(71,"p",14),n.Qc(72),n.ic(73,"translate"),n.Vb(),n.Wb(74,"h4",13),n.Qc(75," @subentities[('entity_1',...,'entity_n')] :"),n.Vb(),n.Wb(76,"p",14),n.Qc(77),n.ic(78,"translate"),n.Vb(),n.Wb(79,"h4",13),n.Qc(80,"@subentities_id[(1, 2, ...)] :"),n.Vb(),n.Wb(81,"p",14),n.Qc(82),n.ic(83,"translate"),n.Vb(),n.Wb(84,"h4",13),n.Qc(85,"@parent_entity['entity_id'] :"),n.Vb(),n.Wb(86,"p",14),n.Qc(87),n.ic(88,"translate"),n.Vb(),n.Wb(89,"h4",13),n.Qc(90,"@sisters_entities['entity_id'] : "),n.Vb(),n.Wb(91,"p",14),n.Qc(92),n.ic(93,"translate"),n.Vb(),n.Wb(94,"h4",13),n.Qc(95,"@entity_type['type'] :"),n.Vb(),n.Wb(96,"p",14),n.Qc(97),n.ic(98,"translate"),n.Vb(),n.Wb(99,"h4",13),n.Qc(100,"@all_entities :"),n.Vb(),n.Wb(101,"p",14),n.Qc(102),n.ic(103,"translate"),n.Vb(),n.Wb(104,"h4",13),n.Qc(105," @immediate_children['entity_1',..., 'entity_id'] :"),n.Vb(),n.Wb(106,"p",14),n.Qc(107),n.ic(108,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Rb(109,"span",15),n.Wb(110,"mat-dialog-actions"),n.Wb(111,"button",16),n.dc("click",(function(){return e.saveSettings()})),n.Qc(112),n.ic(113,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Sc("",n.jc(3,29,"lang.actionParameters")," "),n.Db(3),n.Rc(e.data.action.label_action),n.Db(6),n.oc("ngModel",e.data.action.used_in_action_page),n.Db(1),n.Sc(" ",n.jc(13,31,"lang.usedInActionPage"),""),n.Db(3),n.oc("ngModel",e.data.action.used_in_basketlist),n.Db(1),n.Sc(" ",n.jc(17,33,"lang.usedInBasketlist"),""),n.Db(3),n.oc("ngIf","redirect"==e.data.action.keyword),n.Db(1),n.pc("label",n.jc(21,35,"lang.otherParameters")),n.Db(3),n.pc("title",n.jc(24,37,"lang.whereClauseAction")),n.pc("placeholder",n.jc(25,39,"lang.whereClauseAction")),n.oc("ngModel",e.data.action.where_clause),n.Db(7),n.Sc(" ",n.jc(31,41,"lang.keywordHelp")," "),n.Db(4),n.Rc(n.jc(35,43,"lang.keywordHelpDesc_11")),n.Db(8),n.Rc(n.jc(43,45,"lang.keywordHelpDesc_1")),n.Db(5),n.Rc(n.jc(48,47,"lang.keywordHelpDesc_12")),n.Db(5),n.Rc(n.jc(53,49,"lang.keywordHelpDesc_2")),n.Db(5),n.Rc(n.jc(58,51,"lang.keywordHelpDesc_3")),n.Db(5),n.Rc(n.jc(63,53,"lang.keywordHelpDesc_13")),n.Db(5),n.Rc(n.jc(68,55,"lang.keywordHelpDesc_4")),n.Db(5),n.Rc(n.jc(73,57,"lang.keywordHelpDesc_14")),n.Db(5),n.Rc(n.jc(78,59,"lang.keywordHelpDesc_5")),n.Db(5),n.Rc(n.jc(83,61,"lang.keywordHelpDesc_15")),n.Db(5),n.Rc(n.jc(88,63,"lang.keywordHelpDesc_6")),n.Db(5),n.Rc(n.jc(93,65,"lang.keywordHelpDesc_7")),n.Db(5),n.Rc(n.jc(98,67,"lang.keywordHelpDesc_8")),n.Db(5),n.Rc(n.jc(103,69,"lang.keywordHelpDesc_9")),n.Db(5),n.Rc(n.jc(108,71,"lang.keywordHelpDesc_10")),n.Db(4),n.oc("disabled",!e.data.action.used_in_basketlist&&!e.data.action.used_in_action_page),n.Db(1),n.Rc(n.jc(113,73,"lang.validate")))},directives:[q.i,q.f,X.K,X.v,X.w,j.a,X.u,X.x,Te.c,P.t,Te.a,Y.c,J.b,J.d,X.d,gt.a,gt.c,gt.g,gt.h,R.a,W.l,q.c,k.b,Te.d],pipes:[g.d],styles:[".mat-dialog-content[_ngcontent-%COMP%]{height: 65vh;}"]}),t})(),hU=(()=>{class t{constructor(t,e,i,n){this.http=t,this.notify=e,this.data=i,this.dialogRef=n,this.actionAll=[],this.newBasketGroup={}}ngOnInit(){this.http.get("../rest/actions").subscribe(t=>{t.actions.forEach(t=>{t.where_clause="",t.used_in_basketlist=!1,t.default_action_list=!1,t.used_in_action_page=!0,t.statuses=[],t.redirects=[],t.checked=!1,this.actionAll.push(t)})},t=>{this.notify.handleErrors(t)}),this.data.groups.forEach(t=>{this.data.linkedGroups.forEach(e=>{if(t.group_id===e.group_id){const e=this.data.groups.indexOf(t);this.data.groups.splice(e,1)}})})}validateForm(t){0===this.data.linkedGroups.length?(this.actionAll[0].used_in_action_page=!0,this.actionAll[0].default_action_list=!0,this.actionAll[0].used_in_basketlist=!0,this.actionAll[0].checked=!0,this.newBasketGroup.groupActions=this.actionAll):this.newBasketGroup=JSON.parse(JSON.stringify(this.data.linkedGroups[this.data.linkedGroups.length-1])),this.newBasketGroup.basket_id=this.data.basketId,this.newBasketGroup.group_id=t.group_id,this.newBasketGroup.group_desc=t.group_desc,this.dialogRef.close(this.newBasketGroup)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(v.b),n.Qb(D.a),n.Qb(q.a),n.Qb(q.h))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:7,vars:4,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title","","color","primary"],[4,"ngFor","ngForOf"],[3,"click",4,"ngIf"],[3,"click"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h2",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-dialog-content"),n.Wb(5,"mat-nav-list"),n.Oc(6,cU,2,1,"span",2),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,2,"lang.linkGroup")),n.Db(4),n.oc("ngForOf",e.data.groups))},directives:[q.i,q.f,R.h,P.s,P.t,R.d],pipes:[g.d],styles:[".mat-dialog-content[_ngcontent-%COMP%]{height: 65vh;}"]}),t})();const uU=["snav2"],pU=["adminMenuTemplate"];function bU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",14),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",15),n.dc("click",(function(){return n.Dc(t),n.hc().prepareDoctypeAdd("firstLevel")})),n.Wb(5,"mat-icon",16),n.Rb(6,"i",17),n.Rb(7,"i",18),n.Vb(),n.Wb(8,"p",19),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Wb(11,"a",15),n.dc("click",(function(){return n.Dc(t),n.hc().prepareDoctypeAdd("secondLevel")})),n.Wb(12,"mat-icon",16),n.Rb(13,"i",17),n.Rb(14,"i",18),n.Vb(),n.Wb(15,"p",19),n.Qc(16),n.ic(17,"translate"),n.Vb(),n.Vb(),n.Wb(18,"a",15),n.dc("click",(function(){return n.Dc(t),n.hc().prepareDoctypeAdd("doctype")})),n.Wb(19,"mat-icon",16),n.Rb(20,"i",20),n.Rb(21,"i",18),n.Vb(),n.Wb(22,"p",19),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Vb(),n.Vb()}2&t&&(n.Db(2),n.Rc(n.jc(3,4,"lang.actions")),n.Db(7),n.Sc(" ",n.jc(10,6,"lang.addFirstLevel")," "),n.Db(7),n.Sc(" ",n.jc(17,8,"lang.addSecondLevel")," "),n.Db(7),n.Sc(" ",n.jc(24,10,"lang.addDoctype")," "))}function fU(t,e){1&t&&(n.Wb(0,"div",21),n.Rb(1,"mat-spinner",22),n.Vb())}function mU(t,e){if(1&t&&(n.Wb(0,"mat-card",23),n.Wb(1,"mat-form-field"),n.Rb(2,"input",24),n.ic(3,"translate"),n.Vb(),n.Rb(4,"div",25),n.Wb(5,"div",26),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.pc("placeholder",n.jc(3,3,"lang.searchDoctypes")),n.Db(4),n.Tc(" ",t.doctypes.length," ",n.jc(7,5,"lang.documentTypesAlt"),"")}}function gU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",31),n.Wb(1,"div",32),n.Wb(2,"mat-form-field"),n.Wb(3,"input",38),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).currentFirstLevel.doctypes_first_level_id=e})),n.ic(4,"translate"),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(3),n.pc("title",n.jc(4,4,"lang.id")),n.pc("placeholder",n.jc(5,6,"lang.id")),n.oc("ngModel",t.currentFirstLevel.doctypes_first_level_id)("disabled",!t.creationMode)}}function vU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",39),n.dc("click",(function(){return n.Dc(t),n.hc(2).removeFirstLevel()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){n.hc();const t=n.zc(3),e=n.hc();n.oc("disabled",!t.form.valid||e.currentFirstLevel.hasChildren),n.Db(1),n.Rc(n.jc(2,2,"lang.delete"))}}function _U(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",40),n.dc("click",(function(){return n.Dc(t),n.hc(2).readMode()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.cancel")))}function yU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab",27),n.ic(1,"translate"),n.Wb(2,"form",28,29),n.Oc(4,gU,6,8,"div",30),n.Wb(5,"div",31),n.Wb(6,"div",32),n.Wb(7,"mat-form-field"),n.Wb(8,"input",33),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().currentFirstLevel.doctypes_first_level_label=e})),n.ic(9,"translate"),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(11,"div",31),n.Wb(12,"div",34),n.Wb(13,"button",35),n.dc("click",(function(){return n.Dc(t),n.hc().saveFirstLevel()})),n.Qc(14),n.ic(15,"translate"),n.Vb(),n.Oc(16,vU,3,4,"button",36),n.Oc(17,_U,3,3,"button",37),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(3),e=n.hc();n.pc("label",n.jc(1,9,"lang.firstLevelDoctype")),n.Db(4),n.oc("ngIf",!e.creationMode),n.Db(4),n.pc("title",n.jc(9,11,"lang.label")),n.pc("placeholder",n.jc(10,13,"lang.label")),n.oc("ngModel",e.currentFirstLevel.doctypes_first_level_label),n.Db(5),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(15,15,"lang.save")),n.Db(2),n.oc("ngIf",!e.creationMode),n.Db(1),n.oc("ngIf",e.creationMode)}}function xU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",31),n.Wb(1,"div",32),n.Wb(2,"mat-form-field"),n.Wb(3,"input",47),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).currentSecondLevel.doctypes_second_level_id=e})),n.ic(4,"translate"),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(3),n.pc("title",n.jc(4,4,"lang.id")),n.pc("placeholder",n.jc(5,6,"lang.id")),n.oc("ngModel",t.currentSecondLevel.doctypes_second_level_id)("disabled",!t.creationMode)}}function CU(t,e){if(1&t&&(n.Wb(0,"mat-option",48),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.doctypes_first_level_id),n.Db(1),n.Sc(" ",t.doctypes_first_level_label," ")}}function OU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",49),n.dc("click",(function(){return n.Dc(t),n.hc(2).removeSecondLevel()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){n.hc();const t=n.zc(3),e=n.hc();n.oc("disabled",!t.form.valid||e.currentSecondLevel.hasChildren),n.Db(1),n.Rc(n.jc(2,2,"lang.delete"))}}function DU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",50),n.dc("click",(function(){return n.Dc(t),n.hc(2).readMode()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.cancel")))}function wU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab",27),n.ic(1,"translate"),n.Wb(2,"form",28,41),n.Oc(4,xU,6,8,"div",30),n.Wb(5,"div",31),n.Wb(6,"div",32),n.Wb(7,"mat-form-field"),n.Wb(8,"input",42),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().currentSecondLevel.doctypes_second_level_label=e})),n.ic(9,"translate"),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(11,"div",31),n.Wb(12,"div",32),n.Wb(13,"mat-form-field"),n.Wb(14,"mat-select",43),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().currentSecondLevel.doctypes_first_level_id=e})),n.ic(15,"translate"),n.ic(16,"translate"),n.Oc(17,CU,2,2,"mat-option",44),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(18,"div",31),n.Wb(19,"div",34),n.Wb(20,"button",35),n.dc("click",(function(){return n.Dc(t),n.hc().saveSecondLevel()})),n.Qc(21),n.ic(22,"translate"),n.Vb(),n.Oc(23,OU,3,4,"button",45),n.Oc(24,DU,3,3,"button",46),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(3),e=n.hc();n.pc("label",n.jc(1,13,"lang.secondLevelDoctype")),n.Db(4),n.oc("ngIf",!e.creationMode),n.Db(4),n.pc("title",n.jc(9,15,"lang.label")),n.pc("placeholder",n.jc(10,17,"lang.label")),n.oc("ngModel",e.currentSecondLevel.doctypes_second_level_label),n.Db(6),n.pc("title",n.jc(15,19,"lang.firstLevelAttached")),n.pc("placeholder",n.jc(16,21,"lang.firstLevelAttached")),n.oc("ngModel",e.currentSecondLevel.doctypes_first_level_id),n.Db(3),n.oc("ngForOf",e.firstLevels),n.Db(3),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(22,23,"lang.save")),n.Db(2),n.oc("ngIf",!e.creationMode),n.Db(1),n.oc("ngIf",e.creationMode)}}function MU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",31),n.Wb(1,"div",32),n.Wb(2,"mat-form-field"),n.Wb(3,"input",70),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).currentType.type_id=e})),n.ic(4,"translate"),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(3),n.pc("title",n.jc(4,4,"lang.id")),n.pc("placeholder",n.jc(5,6,"lang.id")),n.oc("ngModel",t.currentType.type_id)("disabled",!t.creationMode)}}function kU(t,e){if(1&t&&(n.Wb(0,"mat-option",48),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.doctypes_second_level_id),n.Db(1),n.Sc(" ",t.doctypes_second_level_label," ")}}function SU(t,e){if(1&t&&(n.Wb(0,"mat-option",48),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}function IU(t,e){if(1&t&&(n.Wb(0,"mat-option",48),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function PU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-select",71),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).currentType.retention_rule=e})),n.ic(1,"translate"),n.Oc(2,IU,2,2,"mat-option",44),n.ic(3,"sortBy"),n.Vb()}if(2&t){const t=n.hc(2);n.pc("title",n.jc(1,3,"lang.retentionRule")),n.oc("ngModel",t.currentType.retention_rule),n.Db(2),n.oc("ngForOf",n.kc(3,5,t.conservationRules,"label"))}}function VU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"input",72),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).currentType.retention_rule=e})),n.ic(1,"translate"),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(2);n.pc("title",n.jc(1,3,"lang.retentionRule")),n.pc("placeholder",n.jc(2,5,"lang.retentionRule")),n.oc("ngModel",t.currentType.retention_rule)}}function RU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",73),n.dc("click",(function(){return n.Dc(t),n.hc(2).removeType()})),n.ic(1,"translate"),n.Qc(2),n.ic(3,"translate"),n.Vb()}if(2&t){n.hc();const t=n.zc(3);n.pc("matTooltip",n.jc(1,3,"lang.toolTipDeleteDoctype")),n.oc("disabled",!t.form.valid),n.Db(2),n.Rc(n.jc(3,5,"lang.delete"))}}function jU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",50),n.dc("click",(function(){return n.Dc(t),n.hc(2).readMode()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.cancel")))}function AU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab",27),n.ic(1,"translate"),n.Wb(2,"form",28,51),n.Oc(4,MU,6,8,"div",30),n.Wb(5,"div",31),n.Wb(6,"div",32),n.Wb(7,"mat-form-field"),n.Wb(8,"input",52),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().currentType.description=e})),n.ic(9,"translate"),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(11,"div",31),n.Wb(12,"div",32),n.Wb(13,"mat-form-field"),n.Wb(14,"mat-select",53),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().currentType.doctypes_second_level_id=e})),n.ic(15,"translate"),n.ic(16,"translate"),n.Oc(17,kU,2,2,"mat-option",44),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(18,"div",31),n.Wb(19,"div",32),n.Wb(20,"mat-form-field"),n.Wb(21,"input",54),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().currentType.process_delay=e})),n.ic(22,"translate"),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(24,"div",31),n.Wb(25,"div",32),n.Wb(26,"mat-form-field"),n.Wb(27,"input",55),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().currentType.delay1=e})),n.ic(28,"translate"),n.ic(29,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(30,"div",31),n.Wb(31,"div",32),n.Wb(32,"mat-form-field"),n.Wb(33,"input",56),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().currentType.delay2=e})),n.ic(34,"translate"),n.ic(35,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(36,"div",31),n.Wb(37,"div",32),n.Wb(38,"mat-form-field"),n.Wb(39,"mat-select",57),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().currentType.process_mode=e})),n.ic(40,"translate"),n.ic(41,"translate"),n.Oc(42,SU,2,2,"mat-option",44),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(43,"mat-accordion",58),n.Wb(44,"mat-expansion-panel"),n.Wb(45,"mat-expansion-panel-header"),n.Wb(46,"mat-panel-title"),n.Qc(47),n.ic(48,"translate"),n.Vb(),n.Vb(),n.Wb(49,"div",31),n.Wb(50,"div",32),n.Wb(51,"mat-form-field"),n.Wb(52,"input",59),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().currentType.duration_current_use=e})),n.ic(53,"translate"),n.ic(54,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(55,"div",32),n.Wb(56,"mat-form-field"),n.Wb(57,"mat-select",60),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().currentType.action_current_use=e})),n.ic(58,"translate"),n.ic(59,"translate"),n.Rb(60,"mat-option",61),n.Wb(61,"mat-option",62),n.Qc(62),n.ic(63,"translate"),n.Vb(),n.Wb(64,"mat-option",63),n.Qc(65),n.ic(66,"translate"),n.Vb(),n.Wb(67,"mat-option",64),n.Qc(68),n.ic(69,"translate"),n.Vb(),n.Wb(70,"mat-option",65),n.Qc(71),n.ic(72,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(73,"mat-expansion-panel"),n.Wb(74,"mat-expansion-panel-header"),n.Wb(75,"mat-panel-title"),n.Qc(76),n.ic(77,"translate"),n.Vb(),n.Vb(),n.Wb(78,"div",31),n.Wb(79,"div",32),n.Wb(80,"mat-form-field"),n.Wb(81,"mat-label"),n.Qc(82),n.ic(83,"translate"),n.Vb(),n.Oc(84,PU,4,8,"mat-select",66),n.Oc(85,VU,3,7,"ng-template",null,67,n.Pc),n.Vb(),n.Vb(),n.Wb(87,"div",32),n.Wb(88,"mat-form-field"),n.Wb(89,"mat-select",68),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().currentType.retention_final_disposition=e})),n.ic(90,"translate"),n.ic(91,"translate"),n.Rb(92,"mat-option",61),n.Wb(93,"mat-option",65),n.Qc(94),n.ic(95,"translate"),n.Vb(),n.Wb(96,"mat-option",64),n.Qc(97),n.ic(98,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(99,"div",31),n.Wb(100,"div",34),n.Wb(101,"button",35),n.dc("click",(function(){return n.Dc(t),n.hc().saveType()})),n.Qc(102),n.ic(103,"translate"),n.Vb(),n.Oc(104,RU,4,7,"button",69),n.Oc(105,jU,3,3,"button",46),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(3),e=n.zc(86),i=n.hc();n.pc("label",n.jc(1,46,"lang.doctype")),n.Db(4),n.oc("ngIf",!i.creationMode),n.Db(4),n.pc("title",n.jc(9,48,"lang.label")),n.pc("placeholder",n.jc(10,50,"lang.label")),n.oc("ngModel",i.currentType.description),n.Db(6),n.pc("title",n.jc(15,52,"lang.secondLevelAttached")),n.pc("placeholder",n.jc(16,54,"lang.secondLevelAttached")),n.oc("ngModel",i.currentType.doctypes_second_level_id),n.Db(3),n.oc("ngForOf",i.secondLevels),n.Db(4),n.pc("title",n.jc(22,56,"lang.processDelayDay")),n.pc("placeholder",n.jc(23,58,"lang.processDelayDay")),n.oc("ngModel",i.currentType.process_delay),n.Db(6),n.pc("title",n.jc(28,60,"lang.delay1")),n.pc("placeholder",n.jc(29,62,"lang.delay1")),n.oc("ngModel",i.currentType.delay1),n.Db(6),n.pc("title",n.jc(34,64,"lang.delay2")),n.pc("placeholder",n.jc(35,66,"lang.delay2")),n.oc("ngModel",i.currentType.delay2),n.Db(6),n.pc("title",n.jc(40,68,"lang.processMode")),n.pc("placeholder",n.jc(41,70,"lang.processMode")),n.oc("ngModel",i.currentType.process_mode),n.Db(3),n.oc("ngForOf",i.processModes),n.Db(5),n.Sc(" ",n.jc(48,72,"lang.currentUseRule")," "),n.Db(5),n.pc("title",n.jc(53,74,"lang.durationCurrentUse")),n.pc("placeholder",n.jc(54,76,"lang.durationCurrentUse")),n.oc("ngModel",i.currentType.duration_current_use),n.Db(5),n.pc("title",n.jc(58,78,"lang.finalAction")),n.pc("placeholder",n.jc(59,80,"lang.finalAction")),n.oc("ngModel",i.currentType.action_current_use),n.Db(5),n.Rc(n.jc(63,82,"lang.currentUseTransfer")),n.Db(3),n.Rc(n.jc(66,84,"lang.currentUseCopy")),n.Db(3),n.Rc(n.jc(69,86,"lang.currentUseCnservation")),n.Db(3),n.Rc(n.jc(72,88,"lang.destruction")),n.Db(5),n.Sc(" ",n.jc(77,90,"lang.archival")," "),n.Db(6),n.Rc(n.jc(83,92,"lang.retentionRule")),n.Db(2),n.oc("ngIf",i.conservationRules.length>0)("ngIfElse",e),n.Db(5),n.pc("title",n.jc(90,94,"lang.retentionFinalDisposition")),n.pc("placeholder",n.jc(91,96,"lang.retentionFinalDisposition")),n.oc("ngModel",i.currentType.retention_final_disposition),n.Db(5),n.Rc(n.jc(95,98,"lang.destruction")),n.Db(3),n.Rc(n.jc(98,100,"lang.conservation")),n.Db(4),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(103,102,"lang.save")),n.Db(2),n.oc("ngIf",!i.creationMode),n.Db(1),n.oc("ngIf",i.creationMode)}}function WU(t,e){if(1&t&&(n.Wb(0,"mat-option",9),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("disabled",t.disabled)("value",t.type_id),n.Db(1),n.Sc(" ",t.description," ")}}let TU=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.notify=i,this.dialog=n,this.headerService=a,this.appService=s,this.viewContainerRef=o,this.config={},this.doctypes=[],this.currentType=!1,this.currentSecondLevel=!1,this.currentFirstLevel=!1,this.firstLevels=!1,this.types=!1,this.secondLevels=!1,this.processModes=!1,this.loading=!1,this.creationMode=!1,this.newSecondLevel=!1,this.newFirstLevel=!1,this.conservationRules=[],this.displayedColumns=["label","use","mandatory","column"]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.documentTypes")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,this.http.get("../rest/doctypes").subscribe(t=>{this.doctypes=t.structure,setTimeout(()=>{$("#jstree").jstree({checkbox:{three_state:!1},core:{force_text:!0,themes:{name:"proton",responsive:!0},multiple:!1,data:this.doctypes,check_callback:function(t,e,i,n,a){if("move_node"===t)return void 0===a.ref||(!isNaN(parseFloat(e.id))&&isFinite(e.id)&&0===a.ref.id.indexOf("secondlevel_")||0===e.id.indexOf("secondlevel_")&&0===a.ref.id.indexOf("firstlevel_"))&&!(a.ref.children.indexOf(e.id)>-1)}},dnd:{is_draggable:function(t){return this.secondLevelSelected=t[0].id.replace("secondlevel_",""),!!(!isNaN(parseFloat(this.secondLevelSelected))&&isFinite(this.secondLevelSelected)||!isNaN(parseFloat(t[0].id))&&isFinite(t[0].id))}},plugins:["search","dnd","contextmenu"]});let t=!1;$("#jstree_search").keyup((function(){t&&clearTimeout(t),t=setTimeout((function(){const t=$("#jstree_search").val();$("#jstree").jstree(!0).search(t)}),250)})),$("#jstree").on("select_node.jstree",(t,e)=>{!1===this.sidenavRight.opened&&this.sidenavRight.open(),this.loadDoctype(e,!1)}).on("move_node.jstree",(t,e)=>{this.loadDoctype(e,!0)}).jstree()},0),$("#jstree").jstree("select_node",this.doctypes[0]),this.loading=!1},t=>{this.notify.handleErrors(t)})}getRules(){return new Promise((t,e)=>{this.http.get("../rest/archival/retentionRules").pipe(Object(mt.a)(e=>{this.conservationRules=0!=e.retentionRules.length?e.retentionRules:[],t(!0)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()})}loadDoctype(t,e){this.creationMode=!1,t.node.original.type_id?(this.currentFirstLevel=!1,this.currentSecondLevel=!1,this.http.get("../rest/doctypes/types/"+t.node.original.type_id).subscribe(i=>{this.currentType=i.doctype,this.secondLevels=i.secondLevel,this.processModes=["NORMAL","SVA","SVR"],this.getRules(),e&&(this.currentType?(this.newSecondLevel=t.parent.replace("secondlevel_",""),!isNaN(parseFloat(this.newSecondLevel))&&isFinite(this.newSecondLevel)?this.currentType.doctypes_second_level_id!==this.newSecondLevel&&(this.currentType.doctypes_second_level_id=this.newSecondLevel,this.saveType()):alert(this.translate.instant("lang.cantMoveDoctype"))):alert(this.translate.instant("lang.noDoctypeSelected")))},t=>{this.notify.error(t.error.errors)})):t.node.original.doctypes_second_level_id?(this.currentFirstLevel=!1,this.currentType=!1,this.http.get("../rest/doctypes/secondLevel/"+t.node.original.doctypes_second_level_id).subscribe(i=>{this.currentSecondLevel=i.secondLevel,this.firstLevels=i.firstLevel,e&&(this.currentSecondLevel?(this.newFirstLevel=t.parent.replace("firstlevel_",""),!isNaN(parseFloat(this.newFirstLevel))&&isFinite(this.newFirstLevel)?this.currentSecondLevel.doctypes_first_level_id!==this.newFirstLevel&&(this.currentSecondLevel.doctypes_first_level_id=this.newFirstLevel,this.saveSecondLevel()):alert(this.translate.instant("lang.cantMoveFirstLevel"))):alert(this.translate.instant("lang.noFirstLevelSelected")))},t=>{this.notify.error(t.error.errors)})):(this.currentSecondLevel=!1,this.currentType=!1,this.http.get("../rest/doctypes/firstLevel/"+t.node.original.doctypes_first_level_id).subscribe(t=>{this.currentFirstLevel=t.firstLevel},t=>{this.notify.error(t.error.errors)}))}resetDatas(){this.currentFirstLevel=!1,this.currentSecondLevel=!1,this.currentType=!1}refreshTree(){$("#jstree").jstree(!0).settings.core.data=this.doctypes,$("#jstree").jstree("refresh")}saveFirstLevel(){this.creationMode?this.http.post("../rest/doctypes/firstLevel",this.currentFirstLevel).subscribe(t=>{this.resetDatas(),this.readMode(),this.doctypes=t.doctypeTree,this.refreshTree(),this.notify.success(this.translate.instant("lang.firstLevelAdded"))},t=>{this.notify.error(t.error.errors)}):this.http.put("../rest/doctypes/firstLevel/"+this.currentFirstLevel.doctypes_first_level_id,this.currentFirstLevel).subscribe(t=>{this.doctypes=t.doctypeTree,this.refreshTree(),this.notify.success(this.translate.instant("lang.firstLevelUpdated"))},t=>{this.notify.error(t.error.errors)})}saveSecondLevel(){this.creationMode?this.http.post("../rest/doctypes/secondLevel",this.currentSecondLevel).subscribe(t=>{this.resetDatas(),this.readMode(),this.doctypes=t.doctypeTree,this.refreshTree(),this.notify.success(this.translate.instant("lang.secondLevelAdded"))},t=>{this.notify.error(t.error.errors)}):this.http.put("../rest/doctypes/secondLevel/"+this.currentSecondLevel.doctypes_second_level_id,this.currentSecondLevel).subscribe(t=>{this.doctypes=t.doctypeTree,this.refreshTree(),this.notify.success(this.translate.instant("lang.secondLevelUpdated"))},t=>{this.notify.error(t.error.errors)})}saveType(){this.creationMode?this.http.post("../rest/doctypes/types",this.currentType).subscribe(t=>{this.resetDatas(),this.readMode(),this.doctypes=t.doctypeTree,this.refreshTree(),this.notify.success(this.translate.instant("lang.documentTypeAdded"))},t=>{this.notify.error(t.error.errors)}):this.http.put("../rest/doctypes/types/"+this.currentType.type_id,this.currentType).subscribe(t=>{this.doctypes=t.doctypeTree,this.refreshTree(),this.notify.success(this.translate.instant("lang.documentTypeUpdated"))},t=>{this.notify.error(t.error.errors)})}readMode(){this.creationMode=!1,$("#jstree").jstree("deselect_all"),$("#jstree").jstree("select_node",this.doctypes[0])}removeFirstLevel(){confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.delete")+" \xab "+this.currentFirstLevel.doctypes_first_level_label+" \xbb")&&this.http.delete("../rest/doctypes/firstLevel/"+this.currentFirstLevel.doctypes_first_level_id).subscribe(t=>{this.resetDatas(),this.readMode(),this.doctypes=t.doctypeTree,this.refreshTree(),this.doctypes[0]?$("#jstree").jstree("select_node",this.doctypes[0]):!0===this.sidenavRight.opened&&this.sidenavRight.close(),this.notify.success(this.translate.instant("lang.firstLevelDeleted"))},t=>{this.notify.error(t.error.errors)})}removeSecondLevel(){confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.delete")+" \xab "+this.currentSecondLevel.doctypes_second_level_label+" \xbb")&&this.http.delete("../rest/doctypes/secondLevel/"+this.currentSecondLevel.doctypes_second_level_id).subscribe(t=>{this.resetDatas(),this.readMode(),this.doctypes=t.doctypeTree,this.refreshTree(),$("#jstree").jstree("select_node",this.doctypes[0]),this.notify.success(this.translate.instant("lang.secondLevelDeleted"))},t=>{this.notify.error(t.error.errors)})}removeType(){confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.delete")+" \xab "+this.currentType.description+" \xbb")&&this.http.delete("../rest/doctypes/types/"+this.currentType.type_id).subscribe(t=>{0===t.deleted?(this.resetDatas(),this.readMode(),this.doctypes=t.doctypeTree,this.refreshTree(),$("#jstree").jstree("select_node",this.doctypes[0]),this.notify.success(this.translate.instant("lang.documentTypeDeleted"))):(this.config={panelClass:"maarch-modal",data:{count:t.deleted,types:t.doctypes}},this.dialogRef=this.dialog.open(EU,this.config),this.dialogRef.afterClosed().subscribe(t=>{t&&this.http.put("../rest/doctypes/types/"+this.currentType.type_id+"/redirect",t).subscribe(t=>{this.resetDatas(),this.readMode(),this.doctypes=t.doctypeTree,this.refreshTree(),$("#jstree").jstree("select_node",this.doctypes[0]),this.notify.success(this.translate.instant("lang.documentTypeDeleted"))},t=>{this.notify.error(t.error.errors)}),this.dialogRef=null}))},t=>{this.notify.error(t.error.errors)})}prepareDoctypeAdd(t){this.currentFirstLevel=!1,this.currentSecondLevel=!1,this.currentType=!1,"firstLevel"===t&&(this.currentFirstLevel={}),"secondLevel"===t&&(this.currentSecondLevel={}),"doctype"===t&&(this.currentType={}),!1===this.sidenavRight.opened&&this.sidenavRight.open(),$("#jstree").jstree("deselect_all"),this.http.get("../rest/administration/doctypes/new").subscribe(t=>{this.firstLevels=t.firstLevel,this.secondLevels=t.secondLevel,this.processModes=["NORMAL","SVA","SVR"]},t=>{this.notify.error(t.error.errors)}),this.creationMode=t}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(y.a),n.Qb(w.a),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(uU,!0),n.Kc(pU,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:22,vars:14,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["fixedTopGap","56","position","end",1,"col-md-4","col-sm-12",3,"mode","fixedInViewport","opened"],["snav2",""],[3,"label",4,"ngIf"],["mat-subheader",""],["mat-list-item","",3,"click"],["color","primary","mat-list-icon","",1,"fa-stack","fa-fw",2,"margin-left","-3px","font-size","18px"],[1,"fa","fa-folder"],[1,"fa","fa-plus",2,"position","absolute"],["mat-line",""],[1,"fa","fa-file"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],["matInput","","id","jstree_search","name","jstree_search","type","text",3,"placeholder"],["id","jstree"],[1,"mat-paginator",2,"min-height","48px","min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],[3,"label"],[1,"form-horizontal",2,"overflow","hidden"],["firstLevelForm","ngForm"],["class","form-group",4,"ngIf"],[1,"form-group"],[1,"col-sm-12"],["matInput","","required","","name","doctypes_first_level_label","id","doctypes_first_level_label","type","text","maxlength","255",3,"ngModel","title","placeholder","ngModelChange"],[1,"col-md-12","text-center",2,"padding","10px"],["mat-raised-button","","color","primary",3,"disabled","click"],["type","button","mat-raised-button","","color","warn",3,"disabled","click",4,"ngIf"],["type","button","mat-raised-button","","color","default",3,"click",4,"ngIf"],["matInput","","required","","name","doctypes_first_level_id","id","doctypes_first_level_id","type","text","maxlength","255",3,"ngModel","title","placeholder","disabled","ngModelChange"],["type","button","mat-raised-button","","color","warn",3,"disabled","click"],["type","button","mat-raised-button","","color","default",3,"click"],["secondLevelForm","ngForm"],["matInput","","required","","name","doctypes_second_level_label","id","doctypes_second_level_label","type","text","maxlength","255",3,"ngModel","title","placeholder","ngModelChange"],["id","doctypes_first_level_id","name","doctypes_first_level_id","required","",3,"title","placeholder","ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["mat-raised-button","","color","warn",3,"disabled","click",4,"ngIf"],["mat-raised-button","","color","default",3,"click",4,"ngIf"],["matInput","","required","","name","doctypes_second_level_id","id","doctypes_second_level_id","type","text","maxlength","255",3,"ngModel","title","placeholder","disabled","ngModelChange"],[3,"value"],["mat-raised-button","","color","warn",3,"disabled","click"],["mat-raised-button","","color","default",3,"click"],["typeForm","ngForm"],["matInput","","required","","name","description","id","description","type","text","maxlength","255",3,"ngModel","title","placeholder","ngModelChange"],["id","doctypes_second_level_id","name","doctypes_second_level_id","required","",3,"title","placeholder","ngModel","ngModelChange"],["matInput","","required","","name","process_delay","id","process_delay","type","number","pattern","^[0-9]*$",3,"ngModel","title","placeholder","ngModelChange"],["matInput","","required","","name","delay1","id","delay1","type","number","pattern","^[0-9]*$",3,"ngModel","title","placeholder","ngModelChange"],["matInput","","required","","name","delay2","id","delay2","type","number","maxlength","255","pattern","^[0-9]*$",3,"ngModel","title","placeholder","ngModelChange"],["id","process_mode","name","process_mode","required","",3,"title","placeholder","ngModel","ngModelChange"],["multi",""],["matInput","","type","number","name","duration_current_use","id","duration_current_use",3,"ngModel","title","placeholder","ngModelChange"],["id","action_current_use","name","action_current_use",3,"title","placeholder","ngModel","ngModelChange"],["value",""],["value","transfer"],["value","copy"],["value","conservation"],["value","destruction"],["name","retention_rule",3,"title","ngModel","ngModelChange",4,"ngIf","ngIfElse"],["elseBlock",""],["id","retention_final_disposition","name","retention_final_disposition",3,"title","placeholder","ngModel","ngModelChange"],["mat-raised-button","","color","warn",3,"disabled","matTooltip","click",4,"ngIf"],["matInput","","required","","name","type_id","id","type_id","type","text","maxlength","255",3,"ngModel","title","placeholder","disabled","ngModelChange"],["name","retention_rule",3,"title","ngModel","ngModelChange"],["matInput","","name","retention_rule","type","text","maxlength","15",3,"ngModel","title","placeholder","ngModelChange"],["mat-raised-button","","color","warn",3,"disabled","matTooltip","click"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,bU,25,12,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,fU,2,0,"div",9),n.Oc(14,mU,8,7,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Wb(15,"mat-sidenav",11,12),n.Wb(17,"mat-nav-list"),n.Wb(18,"mat-tab-group"),n.Oc(19,yU,18,17,"mat-tab",13),n.Oc(20,wU,25,25,"mat-tab",13),n.Oc(21,AU,106,104,"mat-tab",13),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",!1),n.Db(4),n.oc("ngIf",e.currentFirstLevel||"firstLevel"==e.creationMode),n.Db(1),n.oc("ngIf",e.currentSecondLevel||"secondeLevel"==e.creationMode),n.Db(1),n.oc("ngIf",e.currentType||"doctype"==e.creationMode))},directives:[I.e,I.f,Ot,We,P.t,I.d,R.h,Te.c,R.g,R.d,S.a,R.c,W.l,V.c,K.a,Y.c,J.b,Te.a,X.K,X.v,X.w,X.d,X.F,X.p,X.u,X.x,k.b,ee.a,P.s,W.p,X.A,X.B,gt.a,gt.c,gt.g,gt.h,Y.g,A.b],pipes:[g.d,Wt.a],encapsulation:2}),t})(),EU=(()=>{class t{constructor(t,e,i){this.http=t,this.data=e,this.dialogRef=i}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(v.b),n.Qb(q.a),n.Qb(q.h))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:25,vars:19,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["changeDoctypeForm","ngForm"],["role","alert",1,"alert-message","alert-message-info"],["color","primary","mat-list-icon","",1,"fa","fa-file","fa-2x"],["mat-line",""],["id","new_type_id","name","new_type_id","required","",3,"title","placeholder","ngModel","ngModelChange"],[3,"disabled","value",4,"ngFor","ngForOf"],["mat-raised-button","","color","warn","type","submit",3,"disabled","click"],[3,"disabled","value"]],template:function(t,e){if(1&t&&(n.Wb(0,"div",0),n.Wb(1,"h2",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-dialog-content"),n.Wb(5,"form",null,2),n.Wb(7,"div",3),n.Wb(8,"mat-list"),n.Wb(9,"mat-list-item"),n.Rb(10,"mat-icon",4),n.Wb(11,"p",5),n.Wb(12,"b"),n.Qc(13),n.Vb(),n.Qc(14),n.ic(15,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(16,"mat-form-field"),n.Wb(17,"mat-select",6),n.dc("ngModelChange",(function(t){return e.data.new_type_id=t})),n.ic(18,"translate"),n.ic(19,"translate"),n.Oc(20,WU,2,3,"mat-option",7),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(21,"mat-dialog-actions"),n.Wb(22,"button",8),n.dc("click",(function(){return e.dialogRef.close(e.data)})),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.zc(6);n.Db(2),n.Rc(n.jc(3,9,"lang.documentTypeReplacement")),n.Db(11),n.Rc(e.data.count),n.Db(1),n.Sc(" ",n.jc(15,11,"lang.documents")," "),n.Db(3),n.pc("title",n.jc(18,13,"lang.transferToDoctype")),n.pc("placeholder",n.jc(19,15,"lang.transferToDoctype")),n.oc("ngModel",e.data.new_type_id),n.Db(3),n.oc("ngForOf",e.data.types),n.Db(2),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(24,17,"lang.delete"))}},directives:[q.i,q.f,X.K,X.v,X.w,R.a,R.d,S.a,R.c,W.l,Y.c,ee.a,X.F,X.u,X.x,P.s,q.c,k.b,W.p],pipes:[g.d],encapsulation:2}),t})();const FU=["adminMenuTemplate"];function LU(t,e){1&t&&(n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",11),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",12),n.Rb(5,"mat-icon",13),n.Wb(6,"p",14),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,2,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,4,"lang.add")," "))}function QU(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Vb())}function NU(t,e){1&t&&(n.Wb(0,"mat-header-cell",38),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.label")))}function zU(t,e){if(1&t&&(n.Wb(0,"mat-cell",39),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.title," ")}}function BU(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",38),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Rc(n.jc(2,3,"lang.description"))}}function UU(t,e){if(1&t&&(n.Wb(0,"mat-cell",39),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",t.description," ")}}function $U(t,e){1&t&&(n.Wb(0,"mat-header-cell",38),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.type")))}function HU(t,e){if(1&t&&(n.Wb(0,"mat-cell",39),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.typeLabel," ")}}function GU(t,e){1&t&&n.Rb(0,"mat-header-cell",40)}function XU(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",41),n.Wb(1,"button",42),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.delete(a)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",43),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.pc("matTooltip",n.jc(2,1,"lang.delete")))}function qU(t,e){1&t&&n.Rb(0,"mat-header-row")}function KU(t,e){1&t&&(n.Rb(0,"mat-row",44),n.ic(1,"translate")),2&t&&(n.qc("routerLink","/administration/diffusionModels/",e.$implicit.id,""),n.pc("matTooltip",n.jc(1,2,"lang.view")))}function YU(t,e){if(1&t&&(n.Wb(0,"mat-card",17),n.Wb(1,"div",18),n.Wb(2,"div",19),n.Wb(3,"mat-form-field"),n.Rb(4,"input",20),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Wb(6,"div",19),n.Rb(7,"mat-paginator",21,22),n.Vb(),n.Vb(),n.Wb(9,"mat-table",23,24),n.Ub(11,25),n.Oc(12,NU,3,3,"mat-header-cell",26),n.Oc(13,zU,2,1,"mat-cell",27),n.Tb(),n.Ub(14,28),n.Oc(15,BU,3,5,"mat-header-cell",29),n.Oc(16,UU,2,3,"mat-cell",30),n.Tb(),n.Ub(17,31),n.Oc(18,$U,3,3,"mat-header-cell",26),n.Oc(19,HU,2,1,"mat-cell",27),n.Tb(),n.Ub(20,32),n.Oc(21,GU,1,0,"mat-header-cell",33),n.Oc(22,XU,4,3,"mat-cell",34),n.Tb(),n.Oc(23,qU,1,0,"mat-header-row",35),n.Oc(24,KU,2,4,"mat-row",36),n.Vb(),n.Wb(25,"div",37),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.pc("placeholder",n.jc(5,10,"lang.filterBy")),n.oc("formControl",t.adminService.getFilterField()),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.adminService.getDataSource()),n.Db(14),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns),n.Db(2),n.Tc("",t.listTemplates.length," ",n.jc(27,12,"lang.workflowModels"),"")}}let JU=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this.translate=t,this.http=e,this.notify=i,this.dialog=n,this.headerService=a,this.appService=s,this.functions=o,this.adminService=r,this.viewContainerRef=c,this.loading=!1,this.listTemplates=[],this.listTemplatesForAssign=[],this.displayedColumns=["title","description","typeLabel","actions"],this.filterColumns=["title","description","typeLabel"]}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.workflowModels")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,yield this.getListemplates(),this.loadList(),this.loading=!1}))}getListemplates(){return new Promise((t,e)=>{this.http.get("../rest/listTemplates").pipe(Object(l.a)(t=>(t.listTemplates=t.listTemplates.filter(t=>null===t.entityId&&["visaCircuit","opinionCircuit"].indexOf(t.type)>-1).map(t=>Object.assign(Object.assign({},t),{typeLabel:this.translate.instant("lang."+t.type)})),t.listTemplates)),Object(mt.a)(e=>{this.listTemplates=e,t(!0)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()})}loadList(){setTimeout(()=>{this.adminService.setDataSource("admin_listmodels",this.listTemplates,this.sort,this.paginator,this.filterColumns)},0)}delete(t){this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete("../rest/listTemplates/"+t.id)),Object(mt.a)(()=>{this.listTemplates=this.listTemplates.filter(e=>e.id!==t.id),this.notify.success(this.translate.instant("lang.diffusionModelDeleted")),this.loadList()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a),n.Qb(OL),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(FU,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:15,vars:8,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["mat-subheader",""],["mat-list-item","","routerLink","/administration/diffusionModels/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"row",2,"margin","0px"],[1,"col-md-6","col-xs-6"],["matInput","",3,"formControl","placeholder"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSortDisableClear","","matSort","",3,"dataSource"],["table",""],["matColumnDef","title"],["mat-sort-header","","style","flex:2;",4,"matHeaderCellDef"],["style","flex:2;",4,"matCellDef"],["matColumnDef","description"],["mat-sort-header","","style","flex:2;",3,"hide-for-mobile",4,"matHeaderCellDef"],["style","flex:2;",3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","typeLabel"],["matColumnDef","actions"],["style","flex:1;",4,"matHeaderCellDef"],["style","justify-content: flex-end;flex:1;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"routerLink","matTooltip",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["mat-sort-header","",2,"flex","2"],[2,"flex","2"],[2,"flex","1"],[2,"justify-content","flex-end","flex","1"],["mat-icon-button","","color","warn",3,"matTooltip","click"],["aria-hidden","true",1,"fa","fa-trash-alt","fa-2x"],[2,"cursor","pointer",3,"routerLink","matTooltip"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,LU,9,6,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,QU,2,0,"div",9),n.Oc(14,YU,28,14,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,R.h,R.g,R.d,o.f,S.a,R.c,W.l,V.c,K.a,Y.c,J.b,X.d,X.u,X.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,vt.h,Fe.b,vt.a,k.b,A.b,vt.j,vt.m,o.d],pipes:[g.d],encapsulation:2}),t})();const ZU=["snav2"],t$=["appVisaWorkflow"],e$=["appAvisWorkflow"];function i$(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Vb())}function n$(t,e){if(1&t&&(n.Wb(0,"mat-option",27),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function a$(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",28),n.dc("click",(function(){return n.Dc(t),n.hc(2).cancelModification()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.cancel")))}function s$(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",17),n.Wb(1,"mat-tab-group"),n.Wb(2,"mat-tab",12),n.ic(3,"translate"),n.Wb(4,"form",18,19),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Wb(6,"mat-form-field"),n.Wb(7,"mat-select",20),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().diffusionModel.type=e})),n.ic(8,"translate"),n.Oc(9,n$,2,2,"mat-option",21),n.Vb(),n.Vb(),n.Wb(10,"mat-form-field"),n.Wb(11,"input",22),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().diffusionModel.title=e})),n.ic(12,"translate"),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Wb(14,"mat-form-field"),n.Wb(15,"textarea",23),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().diffusionModel.description=e})),n.ic(16,"translate"),n.ic(17,"translate"),n.Vb(),n.Vb(),n.Wb(18,"div",24),n.Wb(19,"button",25),n.Qc(20),n.ic(21,"translate"),n.Vb(),n.Oc(22,a$,3,3,"button",26),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(2),n.pc("label",n.jc(3,14,"lang.informations")),n.Db(5),n.pc("placeholder",n.jc(8,16,"lang.diffusionType")),n.oc("ngModel",t.diffusionModel.type)("disabled",!t.creationMode),n.Db(2),n.oc("ngForOf",t.itemTypeList),n.Db(2),n.pc("title",n.jc(12,18,"lang.label")),n.pc("placeholder",n.jc(13,20,"lang.label")),n.oc("ngModel",t.diffusionModel.title),n.Db(4),n.pc("title",n.jc(16,22,"lang.description")),n.pc("placeholder",n.jc(17,24,"lang.description")),n.oc("ngModel",t.diffusionModel.description),n.Db(4),n.oc("disabled",!t.isValidForm()),n.Db(1),n.Rc(n.jc(21,26,"lang.save")),n.Db(2),n.oc("ngIf",!t.creationMode)}}function o$(t,e){1&t&&n.Rb(0,"app-visa-workflow",29,30),2&t&&n.oc("showListModels",!1)("showComment",!1)("adminMode",!0)}function r$(t,e){1&t&&n.Rb(0,"app-avis-workflow",31,32),2&t&&n.oc("showListModels",!1)("adminMode",!0)}let c$=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.route=i,this.router=n,this.notify=a,this.headerService=s,this.appService=o,this.loading=!0,this.diffusionModel={title:"",description:"",type:"opinionCircuit",items:[]},this.diffusionModelClone={},this.itemTypeList=[{id:"visaCircuit",label:this.translate.instant("lang.visaCircuit")},{id:"opinionCircuit",label:this.translate.instant("lang.opinionCircuit")}],this.listDiffModified=!1}ngOnInit(){this.loading=!0,this.route.params.subscribe(t=>Object(r.a)(this,void 0,void 0,(function*(){void 0===t.id?(this.headerService.setHeader(this.translate.instant("lang.diffusionModelCreation")),this.creationMode=!0,this.loading=!1):(this.creationMode=!1,yield this.getTemplate(t.id),"visaCircuit"===this.diffusionModel.type?this.loadVisaCircuit():this.loadOpinionCircuit())})))}getTemplate(t){return new Promise((e,i)=>{this.http.get("../rest/listTemplates/"+t).pipe(Object(mt.a)(i=>{this.diffusionModel=i.listTemplate,this.diffusionModel.id=t,e(!0)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()})}loadVisaCircuit(){const t={id:this.diffusionModel.id,type:"entity"};setTimeout(()=>Object(r.a)(this,void 0,void 0,(function*(){this.appVisaWorkflow.resetWorkflow(),yield this.appVisaWorkflow.addItemToWorkflow(t,!1),this.diffusionModel.items=this.appVisaWorkflow.getWorkflow(),this.diffusionModelClone=JSON.parse(JSON.stringify(this.diffusionModel))})),0)}loadOpinionCircuit(){const t={id:this.diffusionModel.id,type:"entity"};setTimeout(()=>Object(r.a)(this,void 0,void 0,(function*(){this.appAvisWorkflow.resetWorkflow(),yield this.appAvisWorkflow.addItemToWorkflow(t),this.diffusionModel.items=this.appAvisWorkflow.getWorkflow(),this.diffusionModelClone=JSON.parse(JSON.stringify(this.diffusionModel))})),0)}onSubmit(){this.creationMode?this.createTemplate():this.updateTemplate()}createTemplate(){this.http.post("../rest/listTemplates?admin=true",this.formatCircuit()).pipe(Object(mt.a)(()=>{this.router.navigate(["/administration/diffusionModels"]),this.notify.success(this.translate.instant("lang.diffusionModelAdded"))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}updateTemplate(){this.http.put("../rest/listTemplates/"+this.diffusionModel.id,this.formatCircuit()).pipe(Object(mt.a)(()=>{this.router.navigate(["/administration/diffusionModels"]),this.notify.success(this.translate.instant("lang.diffusionModelUpdated"))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}formatCircuit(){return"visaCircuit"===this.diffusionModel.type?(this.diffusionModel.items=this.appVisaWorkflow.getWorkflow().map((t,e)=>({id:t.item_id,type:"user",mode:t.requested_signature?"sign":"visa",sequence:e})),this.diffusionModel):(this.diffusionModel.items=this.appAvisWorkflow.getWorkflow().map((t,e)=>({id:t.item_id,type:"user",mode:"avis",sequence:e})),this.diffusionModel)}checkValidUsers(t){let e=!0;return t.forEach(t=>{t.hasPrivilege&&t.isValid||(e=!1)}),e}isValidForm(){return"visaCircuit"===this.diffusionModel.type?void 0!==this.appVisaWorkflow&&this.appVisaWorkflow.getWorkflow().length>0&&""!==this.diffusionModel.title&&this.checkValidUsers(this.appVisaWorkflow.getWorkflow()):void 0!==this.appAvisWorkflow&&this.appAvisWorkflow.getWorkflow().length>0&&""!==this.diffusionModel.title&&this.checkValidUsers(this.appAvisWorkflow.getWorkflow())}cancelModification(){this.diffusionModel=JSON.parse(JSON.stringify(this.diffusionModelClone)),"visaCircuit"===this.diffusionModel.type?this.loadVisaCircuit():this.loadOpinionCircuit()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(ZU,!0),n.Xc(t$,!0),n.Xc(e$,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.appVisaWorkflow=i.first),n.yc(i=n.ec())&&(e.appAvisWorkflow=i.first))},decls:21,vars:16,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["fixedTopGap","56","position","end",1,"col-md-4","col-xs-11",3,"mode","fixedInViewport","opened"],["snav2",""],[3,"label"],[3,"showListModels","showComment","adminMode",4,"ngIf"],[3,"showListModels","adminMode",4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[3,"ngSubmit"],["diffusionModelForm","ngForm"],["id","type","name","type",3,"placeholder","ngModel","disabled","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["matInput","","name","title","maxlength","255","required","",3,"title","placeholder","ngModel","ngModelChange"],["matInput","","name","description","matTextareaAutosize","","matAutosizeMinRows","1","matAutosizeMaxRows","5","maxlength","255",3,"title","placeholder","ngModel","ngModelChange"],[1,"col-md-12","text-center",2,"padding","10px"],["mat-raised-button","","color","primary",3,"disabled"],["mat-raised-button","","type","button","color","default",3,"click",4,"ngIf"],[3,"value"],["mat-raised-button","","type","button","color","default",3,"click"],[3,"showListModels","showComment","adminMode"],["appVisaWorkflow",""],[3,"showListModels","adminMode"],["appAvisWorkflow",""]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,i$,2,0,"div",8),n.Oc(12,s$,23,28,"mat-card",9),n.Vb(),n.Vb(),n.Vb(),n.Wb(13,"mat-sidenav",10,11),n.Wb(15,"mat-nav-list"),n.Wb(16,"mat-tab-group"),n.Wb(17,"mat-tab",12),n.ic(18,"translate"),n.Oc(19,o$,2,3,"app-visa-workflow",13),n.Oc(20,r$,2,2,"app-avis-workflow",14),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",!e.appService.getViewMode()),n.Db(4),n.pc("label",n.jc(18,14,"lang."+e.diffusionModel.type)),n.Db(2),n.oc("ngIf","visaCircuit"===e.diffusionModel.type),n.Db(1),n.oc("ngIf","opinionCircuit"===e.diffusionModel.type))},directives:[I.e,I.f,Ot,We,P.t,I.d,R.h,Te.c,Te.a,V.c,K.a,X.K,X.v,X.w,Y.c,ee.a,X.u,X.x,P.s,J.b,X.d,X.p,X.F,J.d,k.b,W.p,Ko,Qv],pipes:[g.d],styles:[".mat-list-item[draggable=false][_ngcontent-%COMP%]:hover{background:inherit}.mat-list-item[draggable=false][_ngcontent-%COMP%]{cursor:not-allowed!important}.mat-list-item[draggable=true][_ngcontent-%COMP%]{cursor:pointer}.mat-list-item[draggable=true][_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{cursor:move}.primaryColor[_ngcontent-%COMP%]{color:#135f7f}.redColor[_ngcontent-%COMP%]{color:#e4342b}"]}),t})();function l$(t,e){1&t&&(n.Wb(0,"div",14),n.Rb(1,"mat-spinner"),n.Vb())}function d$(t,e){if(1&t&&(n.Wb(0,"mat-option",15),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}function h$(t,e){if(1&t&&(n.Wb(0,"mat-option",15),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}function u$(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",5),n.Wb(1,"mat-form-field",6),n.Wb(2,"mat-label"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"mat-select",16),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().exportModel.delimiter=e})),n.ic(6,"translate"),n.Oc(7,h$,2,2,"mat-option",8),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(3),n.Rc(n.jc(4,5,"lang.delimiter")),n.Db(2),n.pc("placeholder",n.jc(6,7,"lang.delimiter")),n.oc("ngModel",t.exportModel.delimiter)("disabled","csv"!=t.exportModel.format),n.Db(2),n.oc("ngForOf",t.delimiters)}}let p$=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.data=a,this.localStorage=s,this.headerService=o,this.loading=!1,this.loadingExport=!1,this.delimiters=[";",",","TAB"],this.formats=["csv"],this.exportModel={delimiter:";",format:"csv"}}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.setConfiguration()}))}exportData(){this.localStorage.save("exportEntities_"+this.headerService.user.id,JSON.stringify(this.exportModel)),this.loadingExport=!0,this.http.put("../rest/entities/export",this.exportModel,{responseType:"blob"}).pipe(Object(mt.a)(t=>{if("text/html"!==t.type){const e=document.createElement("a");let i,n,a,s;e.href=window.URL.createObjectURL(t),i=new Date,n=i.getDate(),a=i.getMonth()+1,s=i.getFullYear(),n<10&&(n="0"+n),a<10&&(a="0"+a),i=n+"-"+a+"-"+s,e.setAttribute("download","export_entities_maarch_"+i+"."+this.exportModel.format.toLowerCase()),document.body.appendChild(e),e.click(),this.dialogRef.close()}else alert(this.translate.instant("lang.tooMuchDatas"))}),Object(Xt.a)(()=>this.loadingExport=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}setConfiguration(){null!==this.localStorage.get("exportEntitiesFields_"+this.headerService.user.id)&&(this.exportModel.delimiter=JSON.parse(this.localStorage.get("exportEntitiesFields_"+this.headerService.user.id)).delimiter)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(q.a),n.Qb(Ut.a),n.Qb(y.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:24,vars:19,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loader",4,"ngIf"],[1,"row"],[1,"col-md-6"],["appearance","outline"],[3,"placeholder","ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["class","col-md-6",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"click"],["mat-raised-button","","mat-button","",3,"mat-dialog-close"],[1,"loader"],[3,"value"],[3,"placeholder","ngModel","disabled","ngModelChange"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"div",2),n.Oc(5,l$,2,0,"div",3),n.Wb(6,"div",4),n.Wb(7,"div",5),n.Wb(8,"mat-form-field",6),n.Wb(9,"mat-label"),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Wb(12,"mat-select",7),n.dc("ngModelChange",(function(t){return e.exportModel.format=t})),n.ic(13,"translate"),n.Oc(14,d$,2,2,"mat-option",8),n.Vb(),n.Vb(),n.Vb(),n.Oc(15,u$,8,9,"div",9),n.Vb(),n.Vb(),n.Rb(16,"span",10),n.Wb(17,"div",11),n.Wb(18,"button",12),n.dc("click",(function(){return e.exportData()})),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"button",13),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,9,"lang.exportDatas")),n.Db(3),n.oc("ngIf",e.loadingExport),n.Db(5),n.Rc(n.jc(11,11,"lang.format")),n.Db(2),n.pc("placeholder",n.jc(13,13,"lang.format")),n.oc("ngModel",e.exportModel.format),n.Db(2),n.oc("ngForOf",e.formats),n.Db(1),n.oc("ngIf","csv"==e.exportModel.format),n.Db(4),n.Rc(n.jc(20,15,"lang.toExport")),n.Db(3),n.Rc(n.jc(23,17,"lang.cancel")))},directives:[q.i,q.f,P.t,Y.c,Y.g,ee.a,X.u,X.x,P.s,q.c,k.b,q.d,V.c,W.p],pipes:[g.d],styles:[".mat-dialog-container{position:relative}.mat-dialog-content[_ngcontent-%COMP%]{min-height:150px;padding-bottom:10px;overflow-x:hidden}.actions[_ngcontent-%COMP%], .loader[_ngcontent-%COMP%]{justify-content:center}.loader[_ngcontent-%COMP%]{position:absolute;display:flex;width:100%;left:0;top:0;height:100%;background:hsla(0,0%,100%,.6);z-index:1;align-items:center}"]}),t})();const b$=["snav2"],f$=["adminMenuTemplate"],m$=["paginatorUsers"],g$=["paginatorTemplates"],v$=["tableUsers"],_$=["tableTemplates"],y$=["appDiffusionsList"],x$=["appVisaWorkflow"],C$=["appAvisWorkflow"];function O$(t,e){if(1&t){const t=n.Xb();n.Wb(0,"a",45),n.dc("click",(function(){n.Dc(t);const e=n.hc(2);return n.zc(16).open(),e.prepareEntityAdd()})),n.Rb(1,"mat-icon",48),n.Wb(2,"p",47),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(3),n.Sc(" ",n.jc(4,1,"lang.add")," "))}const D$=function(t){return{opacity:t}};function w$(t,e){if(1&t){const t=n.Xb();n.Wb(0,"a",50),n.Wb(1,"mat-icon",51),n.Wb(2,"mat-slide-toggle",52),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).toggleRole(e),!1})),n.Vb(),n.Vb(),n.Wb(3,"p",53),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).toggleRole(e),!1})),n.Qc(4),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(2),n.oc("checked",t.available),n.Db(1),n.oc("ngStyle",n.vc(3,D$,t.available?"":"0.5")),n.Db(1),n.Sc(" ",t.label," ")}}function M$(t,e){if(1&t&&(n.Ub(0),n.Oc(1,w$,5,5,"a",49),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf","dest"!=t.id&&"cc"!=t.id)}}function k$(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",43),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Oc(4,O$,5,3,"a",44),n.Wb(5,"a",45),n.dc("click",(function(){return n.Dc(t),n.hc().openExportModal()})),n.Rb(6,"mat-icon",46),n.Wb(7,"p",47),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Rb(10,"mat-divider"),n.Wb(11,"mat-nav-list"),n.Wb(12,"h3",43),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Oc(15,M$,2,1,"ng-container",21),n.Vb()}if(2&t){const t=n.hc();n.Db(2),n.Rc(n.jc(3,5,"lang.actions")),n.Db(2),n.oc("ngIf",!t.creationMode),n.Db(4),n.Sc(" ",n.jc(9,7,"lang.toExport")," "),n.Db(5),n.Rc(n.jc(14,9,"lang.additionalRoles")),n.Db(2),n.oc("ngForOf",t.listTemplateRoles)}}function S$(t,e){1&t&&(n.Wb(0,"div",54),n.Rb(1,"mat-spinner",55),n.Vb())}function I$(t,e){1&t&&(n.Wb(0,"mat-hint"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.entityTreeInfo")))}function P$(t,e){1&t&&(n.Wb(0,"mat-hint"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.entityTreeInfoCreation")))}function V$(t,e){if(1&t&&(n.Wb(0,"mat-card",56),n.Wb(1,"mat-form-field"),n.Rb(2,"input",57),n.ic(3,"translate"),n.Oc(4,I$,3,3,"mat-hint",58),n.Oc(5,P$,3,3,"mat-hint",58),n.Vb(),n.Rb(6,"div",59),n.Wb(7,"div",60),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.pc("placeholder",n.jc(3,5,"lang.searchEntities")),n.Db(2),n.oc("ngIf",!t.creationMode),n.Db(1),n.oc("ngIf",t.creationMode),n.Db(3),n.Tc(" ",t.entities.length," ",n.jc(9,7,"lang.entities"),"")}}function R$(t,e){if(1&t&&(n.Wb(0,"mat-option",62),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.oc("value",t.entity_id),n.Db(1),n.Sc(" ",t.entity_label," ")}}function j$(t,e){if(1&t&&(n.Ub(0),n.Oc(1,R$,2,2,"mat-option",61),n.Tb()),2&t){const t=e.$implicit,i=n.hc();n.Db(1),n.oc("ngIf",!t.state.disabled&&t.entity_id!=i.currentEntity.entity_id||i.currentEntity.parent_entity_id==t.entity_id)}}function A$(t,e){if(1&t&&(n.Wb(0,"mat-option",62),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function W$(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",16),n.Wb(1,"div",17),n.Wb(2,"mat-form-field"),n.Wb(3,"input",63),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().currentEntity.id=e})),n.ic(4,"translate"),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(3),n.pc("title",n.jc(4,3,"lang.technicalId")),n.pc("placeholder",n.jc(5,5,"lang.technicalId")),n.oc("ngModel",t.currentEntity.id)}}function T$(t,e){1&t&&(n.Rb(0,"input",67),n.ic(1,"translate"),n.ic(2,"translate")),2&t&&(n.pc("title",n.jc(1,2,"lang.siretCode")),n.pc("placeholder",n.jc(2,4,"lang.siretCode")))}function E$(t,e){if(1&t){const t=n.Xb();n.Wb(0,"input",68),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).currentEntity.business_id=e})),n.ic(1,"translate"),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(2);n.pc("title",n.jc(1,3,"lang.siretCode")),n.pc("placeholder",n.jc(2,5,"lang.siretCode")),n.oc("ngModel",t.currentEntity.business_id)}}function F$(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",69),n.dc("click",(function(){return n.Dc(t),n.hc(2).addEntityToAnnuary()})),n.Rb(1,"mat-icon",70),n.Vb()}}function L$(t,e){if(1&t&&(n.Wb(0,"div",16),n.Wb(1,"div",17),n.Wb(2,"mat-form-field"),n.Oc(3,T$,3,6,"input",64),n.Oc(4,E$,3,7,"input",65),n.Oc(5,F$,2,0,"button",66),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(3),n.oc("ngIf",!t.currentEntity.canSynchronizeSiret),n.Db(1),n.oc("ngIf",t.currentEntity.canSynchronizeSiret),n.Db(1),n.oc("ngIf",t.currentEntity.canSynchronizeSiret)}}function Q$(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",71),n.dc("click",(function(){return n.Dc(t),n.hc().removeEntity()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(),e=n.zc(23);n.oc("disabled",!e.form.valid||t.currentEntity.hasChildren),n.Db(1),n.Rc(n.jc(2,2,"lang.delete"))}}function N$(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",72),n.dc("click",(function(){return n.Dc(t),n.hc().readMode()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.cancel")))}function z$(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",79),n.dc("click",(function(){return n.Dc(t),n.hc(3).deleteDiffList()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.delete")))}function B$(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",16),n.Wb(1,"div",38),n.Wb(2,"button",39),n.dc("click",(function(){return n.Dc(t),n.hc(2).saveDiffList()})),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"button",77),n.dc("click",(function(){n.Dc(t),n.hc();const e=n.zc(5),i=n.hc();return e.loadListModel(i.currentEntity.id)})),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Oc(8,z$,3,3,"button",78),n.Vb(),n.Vb()}if(2&t){n.hc();const t=n.zc(5),e=n.hc();n.Db(2),n.oc("disabled",t.hasEmptyDest()||!t.isModified()),n.Db(1),n.Rc(n.jc(4,5,"lang.save")),n.Db(2),n.oc("disabled",!t.isModified()),n.Db(1),n.Rc(n.jc(7,7,"lang.cancel")),n.Db(2),n.oc("ngIf",!t.isEmptyList()&&e.currentEntity.listTemplate.id)}}function U$(t,e){if(1&t&&(n.Wb(0,"mat-tab",13),n.ic(1,"translate"),n.Wb(2,"div",73),n.Wb(3,"div",74),n.Rb(4,"app-diffusions-list",75,76),n.Vb(),n.Oc(6,B$,9,9,"div",24),n.Vb(),n.Vb()),2&t){const t=n.hc();n.pc("label",n.jc(1,4,"lang.diffusionList")),n.Db(4),n.oc("adminMode",!0)("target","redirect"),n.Db(2),n.oc("ngIf",t.currentEntity.entity_id)}}function $$(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",16),n.Wb(1,"div",38),n.Wb(2,"button",39),n.dc("click",(function(){return n.Dc(t),n.hc(2).saveDiffListVisa()})),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"button",77),n.dc("click",(function(){n.Dc(t),n.hc();const e=n.zc(5),i=n.hc();return e.loadListModel(i.currentEntity.id)})),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){n.hc();const t=n.zc(5);n.Db(2),n.oc("disabled",!t.isModified()),n.Db(1),n.Rc(n.jc(4,4,"lang.save")),n.Db(2),n.oc("disabled",!t.isModified()),n.Db(1),n.Rc(n.jc(7,6,"lang.cancel"))}}function H$(t,e){if(1&t&&(n.Wb(0,"mat-tab",13),n.ic(1,"translate"),n.Wb(2,"div",80),n.Wb(3,"div",74),n.Rb(4,"app-visa-workflow",81,82),n.Vb(),n.Oc(6,$$,8,8,"div",24),n.Vb(),n.Vb()),2&t){const t=n.hc();n.pc("label",n.jc(1,5,"lang.visaWorkflow")),n.Db(4),n.oc("adminMode",!0)("showListModels",!1)("showComment",!1),n.Db(2),n.oc("ngIf",t.currentEntity.entity_id)}}function G$(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",16),n.Wb(1,"div",38),n.Wb(2,"button",39),n.dc("click",(function(){return n.Dc(t),n.hc(2).saveDiffListOpinion()})),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"button",77),n.dc("click",(function(){n.Dc(t),n.hc();const e=n.zc(5),i=n.hc();return e.loadListModel(i.currentEntity.id)})),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){n.hc();const t=n.zc(5);n.Db(2),n.oc("disabled",!t.isModified()),n.Db(1),n.Rc(n.jc(4,4,"lang.save")),n.Db(2),n.oc("disabled",!t.isModified()),n.Db(1),n.Rc(n.jc(7,6,"lang.cancel"))}}function X$(t,e){if(1&t&&(n.Wb(0,"mat-tab",13),n.ic(1,"translate"),n.Wb(2,"div",83),n.Wb(3,"div",74),n.Rb(4,"app-avis-workflow",84,85),n.Vb(),n.Oc(6,G$,8,8,"div",24),n.Vb(),n.Vb()),2&t){const t=n.hc();n.pc("label",n.jc(1,4,"lang.avis")),n.Db(4),n.oc("adminMode",!0)("showListModels",!1),n.Db(2),n.oc("ngIf",t.currentEntity.entity_id)}}const q$=function(){return["/rest/autocomplete/users/administration"]};function K$(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",99),n.Wb(1,"plugin-autocomplete",100),n.dc("triggerEvent",(function(e){return n.Dc(t),n.hc(2).linkUser(e)})),n.ic(2,"translate"),n.ic(3,"translate"),n.Vb(),n.Rb(4,"hr"),n.Vb()}2&t&&(n.Db(1),n.oc("labelPlaceholder",n.jc(2,5,"lang.linkUser"))("labelList",n.jc(3,7,"lang.availableUsers"))("routeDatas",n.uc(9,q$))("targetSearchKey","idToDisplay")("subInfoKey","descriptionToDisplay"))}function Y$(t,e){1&t&&(n.Wb(0,"mat-header-cell",101),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.firstname")))}function J$(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.firstname," ")}}function Z$(t,e){1&t&&(n.Wb(0,"mat-header-cell",101),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.lastname")))}function tH(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.lastname," ")}}function eH(t,e){1&t&&n.Rb(0,"mat-header-row")}function iH(t,e){1&t&&(n.Rb(0,"mat-row",102),n.ic(1,"translate")),2&t&&(n.qc("routerLink","/administration/users/",e.$implicit.id,""),n.pc("matTooltip",n.jc(1,2,"lang.view")))}function nH(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab",13),n.ic(1,"translate"),n.Wb(2,"div",73),n.Oc(3,K$,5,10,"div",86),n.Wb(4,"div",87),n.Wb(5,"mat-form-field"),n.Wb(6,"input",88),n.dc("keyup",(function(e){return n.Dc(t),n.hc().applyFilterUsers(e.target.value)})),n.ic(7,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(8,"div",87),n.Rb(9,"mat-paginator",89,90),n.Vb(),n.Vb(),n.Wb(11,"mat-table",91,92),n.Ub(13,93),n.Oc(14,Y$,3,3,"mat-header-cell",94),n.Oc(15,J$,2,1,"mat-cell",95),n.Tb(),n.Ub(16,96),n.Oc(17,Z$,3,3,"mat-header-cell",94),n.Oc(18,tH,2,1,"mat-cell",95),n.Tb(),n.Oc(19,eH,1,0,"mat-header-row",97),n.Oc(20,iH,2,4,"mat-row",98),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.pc("label",n.jc(1,9,"lang.users")),n.Db(3),n.oc("ngIf",t.currentEntity.canAdminUsers),n.Db(3),n.pc("placeholder",n.jc(7,11,"lang.filterBy")),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.dataSourceUsers),n.Db(8),n.oc("matHeaderRowDef",t.displayedColumnsUsers),n.Db(1),n.oc("matRowDefColumns",t.displayedColumnsUsers)}}function aH(t,e){1&t&&(n.Wb(0,"mat-header-cell",113),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.templateName")," "))}function sH(t,e){if(1&t&&(n.Wb(0,"mat-cell",114),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.pc("matTooltip",t.template_comment),n.Db(1),n.Sc(" ",t.template_label," ")}}function oH(t,e){1&t&&(n.Wb(0,"mat-header-cell",115),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.templateTarget")," "))}function rH(t,e){if(1&t&&(n.Wb(0,"mat-cell",116),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",n.jc(2,1,"lang."+t.template_target)," ")}}function cH(t,e){1&t&&n.Rb(0,"mat-header-row")}const lH=function(t){return{cursor:t}};function dH(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-row",117),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).showTemplate(i.template_id)})),n.Vb()}if(2&t){const t=n.hc(2);n.oc("ngStyle",n.vc(1,lH,t.currentEntity.canAdminTemplates?"pointer":"position"))}}function hH(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab",13),n.ic(1,"translate"),n.Wb(2,"div",73),n.Wb(3,"div",87),n.Wb(4,"mat-form-field"),n.Wb(5,"input",88),n.dc("keyup",(function(e){return n.Dc(t),n.hc().applyFilterTemplates(e.target.value)})),n.ic(6,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(7,"div",87),n.Rb(8,"mat-paginator",89,103),n.Vb(),n.Vb(),n.Wb(10,"mat-table",104,105),n.Ub(12,106),n.Oc(13,aH,3,3,"mat-header-cell",107),n.Oc(14,sH,2,2,"mat-cell",108),n.Tb(),n.Ub(15,109),n.Oc(16,oH,3,3,"mat-header-cell",110),n.Oc(17,rH,3,3,"mat-cell",111),n.Tb(),n.Oc(18,cH,1,0,"mat-header-row",97),n.Oc(19,dH,1,3,"mat-row",112),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.pc("label",n.jc(1,8,"lang.templates")),n.Db(5),n.pc("placeholder",n.jc(6,10,"lang.filterBy")),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.dataSourceTemplates),n.Db(8),n.oc("matHeaderRowDef",t.displayedColumnsTemplates),n.Db(1),n.oc("matRowDefColumns",t.displayedColumnsTemplates)}}function uH(t,e){if(1&t&&(n.Wb(0,"mat-list-item"),n.Rb(1,"mat-icon",7),n.Wb(2,"p",8),n.Wb(3,"b"),n.Qc(4),n.Vb(),n.Qc(5),n.ic(6,"translate"),n.Wb(7,"b"),n.Qc(8),n.Vb(),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.Rc(t.data.entity.entity_label),n.Db(1),n.Sc(" ",n.jc(6,4,"lang.isDestTo")," "),n.Db(3),n.Rc(t.data.entity.documents),n.Db(1),n.Sc(" ",n.jc(10,6,"lang.documents"),"")}}function pH(t,e){if(1&t&&(n.Wb(0,"mat-list-item"),n.Rb(1,"mat-icon",9),n.Wb(2,"p",8),n.Wb(3,"b"),n.Qc(4),n.Vb(),n.Qc(5),n.ic(6,"translate"),n.Wb(7,"b"),n.Qc(8),n.Vb(),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.Rc(t.data.entity.entity_label),n.Db(1),n.Sc(" ",n.jc(6,4,"lang.isCopyTo")," "),n.Db(3),n.Rc(t.data.entity.instances),n.Db(1),n.Sc(" ",n.jc(10,6,"lang.documents"),"")}}function bH(t,e){if(1&t&&(n.Wb(0,"mat-list-item"),n.Rb(1,"mat-icon",10),n.Wb(2,"p",8),n.Wb(3,"b"),n.Qc(4),n.Vb(),n.Qc(5),n.ic(6,"lowercase"),n.ic(7,"translate"),n.Wb(8,"b"),n.Qc(9),n.Vb(),n.Qc(10),n.ic(11,"lowercase"),n.ic(12,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.Rc(t.data.entity.entity_label),n.Db(1),n.Sc(" ",n.jc(6,4,n.jc(7,6,"lang.isLinkedTo"))," "),n.Db(4),n.Rc(t.data.entity.users.length),n.Db(1),n.Sc(" ",n.jc(11,8,n.jc(12,10,"lang.usersAlt")),"")}}function fH(t,e){if(1&t&&(n.Wb(0,"mat-list-item"),n.Rb(1,"mat-icon",11),n.Wb(2,"p",8),n.Wb(3,"b"),n.Qc(4),n.Vb(),n.Qc(5),n.ic(6,"lowercase"),n.ic(7,"translate"),n.Wb(8,"b"),n.Qc(9),n.Vb(),n.Qc(10),n.ic(11,"lowercase"),n.ic(12,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.Rc(t.data.entity.entity_label),n.Db(1),n.Sc(" ",n.jc(6,4,n.jc(7,6,"lang.isLinkedTo"))," "),n.Db(4),n.Rc(t.data.entity.templates.length),n.Db(1),n.Sc(" ",n.jc(11,8,n.jc(12,10,"lang.templates")),"")}}const mH=function(){return["/rest/autocomplete/entities"]};let gH=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this.translate=t,this.http=e,this.notify=i,this.dialog=n,this.headerService=a,this.router=s,this.appService=o,this.functions=r,this.viewContainerRef=c,this.loading=!1,this.entities=[],this.listTemplateRoles=[],this.entityTypeList=[],this.currentEntity={},this.isDraggable=!0,this.newEntity=!1,this.creationMode=!1,this.visaCircuitModified=!1,this.opinionCircuitModified=!1,this.config={},this.dataSourceUsers=new vt.p(this.currentEntity.users),this.dataSourceTemplates=new vt.p(this.currentEntity.templates),this.displayedColumnsUsers=["firstname","lastname"],this.displayedColumnsTemplates=["template_label","template_target"]}applyFilterUsers(t){t=(t=t.trim()).toLowerCase(),this.dataSourceUsers.filter=t}applyFilterTemplates(t){t=(t=t.trim()).toLowerCase(),this.dataSourceTemplates.filter=t}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.entities")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,yield this.getEntityTypes(),yield this.getRoles(),yield this.getEntities(),this.loading=!1,this.initEntitiesTree()}))}initEntitiesTree(){setTimeout(()=>{$("#jstree").jstree({checkbox:{deselect_all:!0,three_state:!1},core:{force_text:!0,themes:{name:"proton",responsive:!0},multiple:!1,data:this.entities,check_callback:function(t,e,i,n,a){if("move_node"===t)return"#"!==i.id&&!!i.original.allowed}},dnd:{is_draggable:function(t){let e=0;const i=t.length;for(;e<i;e++)if(!t[e].original.allowed)return!1;return!0}},plugins:["checkbox","search","dnd","sort"]}),$("#jstree").jstree("select_node",this.entities[0]);let t=!1;$("#jstree_search").keyup((function(){t&&clearTimeout(t),t=setTimeout((function(){const t=$("#jstree_search").val();$("#jstree").jstree(!0).search(t)}),250)})),$("#jstree").on("select_node.jstree",(t,e)=>{!1===this.sidenavRight.opened&&this.sidenavRight.open(),!0===this.creationMode?this.currentEntity.parent_entity_id=e.node.id:!0===this.newEntity?(this.loadEntity(this.currentEntity.entity_id),this.newEntity=!1):this.loadEntity(e.node.id)}).on("deselect_node.jstree",(t,e)=>{this.sidenavRight.close()}).on("move_node.jstree",(t,e)=>{this.currentEntity.parent_entity_id!==this.currentEntity.entity_id&&(this.currentEntity.parent_entity_id=e.parent),this.moveEntity()}).jstree(),$(document).on("dnd_start.vakata",(t,e)=>{$("#jstree").jstree("deselect_all"),$("#jstree").jstree("select_node",e.data.nodes[0])})},0)}getEntityTypes(){return new Promise((t,e)=>{this.http.get("../rest/entityTypes").pipe(Object(mt.a)(e=>{this.entityTypeList=e.types,t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}getRoles(){return new Promise((t,e)=>{this.http.get("../rest/listTemplates/types/entity_id/roles").pipe(Object(mt.a)(e=>{this.listTemplateRoles=e.roles,t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}getEntities(){return new Promise((t,e)=>{this.http.get("../rest/entities").pipe(Object(mt.a)(e=>{this.entities=e.entities,t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}loadEntity(t){this.visaCircuitModified=!1,this.opinionCircuitModified=!1,this.http.get("../rest/entities/"+t+"/details").subscribe(t=>{this.currentEntity=t.entity,this.appDiffusionsList.loadListModel(this.currentEntity.id),this.appVisaWorkflow.loadListModel(this.currentEntity.id),this.appAvisWorkflow.loadListModel(this.currentEntity.id),this.idVisaCircuit=this.currentEntity.visaCircuit?this.currentEntity.visaCircuit.id:null,this.idOpinionCircuit=this.currentEntity.opinionCircuit?this.currentEntity.opinionCircuit.id:null,this.dataSourceUsers=new vt.p(this.currentEntity.users),this.dataSourceUsers.paginator=this.paginatorUsers,this.dataSourceUsers.sort=this.sortUsers,this.dataSourceTemplates=new vt.p(this.currentEntity.templates),this.dataSourceTemplates.paginator=this.paginatorTemplates,this.dataSourceTemplates.sort=this.sortTemplates,this.currentEntity.listTemplate.items||(this.currentEntity.listTemplate.items=[]),this.listTemplateRoles.forEach(t=>{t.available&&!this.currentEntity.listTemplate.items[t.id]&&(this.currentEntity.listTemplate.items[t.id]=[])})},t=>{this.notify.error(t.error.errors)})}addElemListModelVisa(t){this.visaCircuitModified=!0;const e={id:t.id,type:"user",mode:"sign",idToDisplay:t.idToDisplay,descriptionToDisplay:t.otherInfo};this.currentEntity.visaCircuit.items||(this.currentEntity.visaCircuit.items=[]),this.currentEntity.visaCircuit.items.push(e),this.currentEntity.visaCircuit.items.length>1&&(this.currentEntity.visaCircuit.items[this.currentEntity.visaCircuit.items.length-2].mode="visa")}addElemListModelOpinion(t){this.opinionCircuitModified=!0;const e={id:t.id,type:"user",mode:"avis",idToDisplay:t.idToDisplay,descriptionToDisplay:t.otherInfo};this.currentEntity.opinionCircuit.items||(this.currentEntity.opinionCircuit.items=[]),this.currentEntity.opinionCircuit.items.push(e)}saveEntity(){"#"===this.currentEntity.parent_entity_id&&(this.currentEntity.parent_entity_id="");let t=!0;""===this.currentEntity.parent_entity_id&&(t=confirm(this.translate.instant("lang.entityWithoutParentMessage"))),t&&(this.creationMode?(this.functions.empty(this.currentEntity.producerService)&&(this.currentEntity.producerService=this.currentEntity.entity_id),this.http.post("../rest/entities",this.currentEntity).subscribe(t=>{this.currentEntity.listTemplate=[],this.entities=t.entities,this.creationMode=!1,this.newEntity=!0,$("#jstree").jstree(!0).settings.core.data=this.entities,$("#jstree").jstree(!0).refresh(),$("#jstree").on("refresh.jstree",t=>{$("#jstree").jstree("deselect_all"),$("#jstree").jstree("select_node",this.currentEntity.entity_id)}),this.notify.success(this.translate.instant("lang.entityAdded"))},t=>{this.notify.error(t.error.errors)})):this.http.put("../rest/entities/"+this.currentEntity.entity_id,this.currentEntity).subscribe(t=>{this.entities=t.entities,$("#jstree").jstree(!0).settings.core.data=this.entities,$("#jstree").jstree("refresh"),this.notify.success(this.translate.instant("lang.entityUpdated"))},t=>{this.notify.error(t.error.errors)}))}moveEntity(){this.http.put("../rest/entities/"+this.currentEntity.entity_id,this.currentEntity).subscribe(()=>{this.notify.success(this.translate.instant("lang.entityUpdated"))},t=>{this.notify.error(t.error.errors)})}readMode(){if(this.creationMode=!1,this.isDraggable=!0,$("#jstree").jstree("deselect_all"),this.currentEntity.parent_entity_id){for(let t=0;t<this.entities.length;t++)if(this.entities[t].entity_id===this.currentEntity.parent_entity_id){$("#jstree").jstree("select_node",this.entities[t]);break}}else this.sidenavRight.close()}selectParentEntity(t){this.creationMode&&($("#jstree").jstree("deselect_all"),$("#jstree").jstree("select_node",t))}removeEntity(){this.currentEntity.documents>0||this.currentEntity.redirects>0||this.currentEntity.instances>0||this.currentEntity.users.length>0||this.currentEntity.templates.length>0?(this.config={panelClass:"maarch-modal",data:{entity:this.currentEntity}},this.dialogRef=this.dialog.open(vH,this.config),this.dialogRef.afterClosed().subscribe(t=>{t&&(this.currentEntity.listTemplate.id&&this.http.delete("../rest/listTemplates/"+this.currentEntity.listTemplate.id).subscribe(t=>{this.currentEntity.listTemplate.id=t.id,this.http.get("../rest/listTemplates/types/entity_id/roles").subscribe(t=>{this.listTemplateRoles=t.roles},t=>{this.notify.error(t.error.errors)})},t=>{this.notify.error(t.error.errors)}),this.idVisaCircuit&&this.http.delete("../rest/listTemplates/"+this.idVisaCircuit).subscribe(()=>{this.idVisaCircuit=null},t=>{this.notify.error(t.error.errors)}),this.http.put("../rest/entities/"+t.entity_id+"/reassign/"+t.redirectEntity,{}).subscribe(t=>{this.entities=t.entities,$("#jstree").jstree(!0).settings.core.data=this.entities,$("#jstree").jstree("refresh"),this.sidenavRight.close(),this.notify.success(this.translate.instant(void 0===t.deleted||t.deleted?"lang.entityDeleted":"lang.entityDeletedButAnnuaryUnreachable"))},t=>{this.notify.error(t.error.errors)})),this.dialogRef=null})):confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.delete")+" \xab "+this.currentEntity.entity_label+" \xbb")&&(this.currentEntity.listTemplate.id&&this.http.delete("../rest/listTemplates/"+this.currentEntity.listTemplate.id).subscribe(t=>{this.currentEntity.listTemplate.id=t.id,this.http.get("../rest/listTemplates/types/entity_id/roles").subscribe(t=>{this.listTemplateRoles=t.roles},t=>{this.notify.error(t.error.errors)})},t=>{this.notify.error(t.error.errors)}),this.idVisaCircuit&&this.http.delete("../rest/listTemplates/"+this.idVisaCircuit).subscribe(()=>{this.idVisaCircuit=null},t=>{this.notify.error(t.error.errors)}),this.http.delete("../rest/entities/"+this.currentEntity.entity_id).subscribe(t=>{this.entities=t.entities,$("#jstree").jstree(!0).settings.core.data=this.entities,$("#jstree").jstree("refresh"),this.sidenavRight.close(),this.notify.success(this.translate.instant(void 0===t.deleted||t.deleted?"lang.entityDeleted":"lang.entityDeletedButAnnuaryUnreachable"))},t=>{this.notify.error(t.error.errors)}))}prepareEntityAdd(){if(this.creationMode=!0,this.isDraggable=!1,this.currentEntity.entity_id){for(let t=0;t<this.entities.length;t++)if(this.entities[t].entity_id===this.currentEntity.entity_id){this.currentEntity={entity_type:this.entityTypeList[0].id},this.currentEntity.parent_entity_id=this.entities[t].entity_id;break}}else this.currentEntity={entity_type:this.entityTypeList[0].id},$("#jstree").jstree("deselect_all"),this.sidenavRight.open()}updateStatus(t,e){this.http.put("../rest/entities/"+t.entity_id+"/status",{method:e}).subscribe(t=>{this.notify.success("")},t=>{this.notify.error(t.error.errors)})}saveDiffList(){const t={title:this.currentEntity.entity_id,description:this.currentEntity.entity_id,type:"diffusionList",entityId:this.currentEntity.id,items:this.appDiffusionsList.getCurrentListinstance().map(t=>({id:t.item_id,type:t.item_type,mode:t.item_mode}))};this.functions.empty(this.currentEntity.listTemplate.id)?this.http.post("../rest/listTemplates?admin=true",t).pipe(Object(mt.a)(t=>{this.currentEntity.listTemplate.id=t.id,this.notify.success(this.translate.instant("lang.diffusionModelUpdated")),this.appDiffusionsList.loadListModel(this.currentEntity.id)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe():this.http.put("../rest/listTemplates/"+this.currentEntity.listTemplate.id,t).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.diffusionModelUpdated")),this.appDiffusionsList.loadListModel(this.currentEntity.id)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}deleteDiffList(){this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete("../rest/listTemplates/"+this.currentEntity.listTemplate.id)),Object(mt.a)(()=>{this.currentEntity.listTemplate.id=null,this.notify.success(this.translate.instant("lang.diffusionModelDeleted")),this.appDiffusionsList.loadListModel(this.currentEntity.id)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}saveDiffListVisa(){const t={title:this.currentEntity.entity_id,description:this.currentEntity.entity_id,type:"visaCircuit",entityId:this.currentEntity.id,items:this.appVisaWorkflow.getWorkflow().map((t,e)=>({id:t.item_id,type:t.item_type,mode:t.requested_signature?"sign":"visa",sequence:e}))};this.appVisaWorkflow.isValidWorkflow()||this.functions.empty(t.items)?this.functions.empty(t.items)?this.http.delete("../rest/listTemplates/"+this.idVisaCircuit).pipe(Object(mt.a)(()=>{this.idVisaCircuit=null,this.notify.success(this.translate.instant("lang.diffusionModelDeleted")),this.appVisaWorkflow.loadListModel(this.currentEntity.id)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe():this.functions.empty(this.idVisaCircuit)?this.http.post("../rest/listTemplates?admin=true",t).pipe(Object(mt.a)(t=>{this.idVisaCircuit=t.id,this.notify.success(this.translate.instant("lang.diffusionModelUpdated")),this.appVisaWorkflow.loadListModel(this.currentEntity.id)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe():this.http.put("../rest/listTemplates/"+this.idVisaCircuit,t).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.diffusionModelUpdated")),this.appVisaWorkflow.loadListModel(this.currentEntity.id)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe():this.notify.error(this.appVisaWorkflow.getError())}saveDiffListOpinion(){const t={title:this.currentEntity.entity_id,description:this.currentEntity.entity_id,type:"opinionCircuit",entityId:this.currentEntity.id,items:this.appAvisWorkflow.getWorkflow().map((t,e)=>({id:t.item_id,type:t.item_type,mode:"avis",sequence:e}))};this.functions.empty(t.items)?this.http.delete("../rest/listTemplates/"+this.idOpinionCircuit).pipe(Object(mt.a)(()=>{this.idOpinionCircuit=null,this.notify.success(this.translate.instant("lang.diffusionModelDeleted")),this.appAvisWorkflow.loadListModel(this.currentEntity.id)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe():this.functions.empty(this.idOpinionCircuit)?this.http.post("../rest/listTemplates?admin=true",t).pipe(Object(mt.a)(t=>{this.idOpinionCircuit=t.id,this.notify.success(this.translate.instant("lang.diffusionModelUpdated")),this.appAvisWorkflow.loadListModel(this.currentEntity.id)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe():this.http.put("../rest/listTemplates/"+this.idOpinionCircuit,t).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.diffusionModelUpdated")),this.appAvisWorkflow.loadListModel(this.currentEntity.id)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}removeDiffListOpinion(t,e){this.opinionCircuitModified=!0,this.currentEntity.opinionCircuit.items.splice(e,1)}toggleRole(t){t.usedIn.length>0?this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,data:{title:this.translate.instant("lang.confirmAction"),msg:this.translate.instant("lang.roleUsedInTemplateInfo")+" : <b>"+t.usedIn.join(", ")+"</b><br/>"+this.translate.instant("lang.roleUsedInTemplateInfo2")}}).afterClosed().subscribe(e=>{"ok"===e&&(t.available=!t.available,this.http.put("../rest/listTemplates/types/entity_id/roles",{roles:this.listTemplateRoles}).subscribe(()=>{t.usedIn=[],this.currentEntity.listTemplate&&(this.currentEntity.listTemplate.items[t.id]=[]),this.notify.success(this.translate.instant("lang.listTemplatesRolesUpdated"))},t=>{this.notify.error(t.error.errors)}))}):(t.available=!t.available,this.http.put("../rest/listTemplates/types/entity_id/roles",{roles:this.listTemplateRoles}).subscribe(()=>{this.currentEntity.listTemplate&&(this.currentEntity.listTemplate.items[t.id]=[],this.http.get("../rest/listTemplates/types/entity_id/roles").subscribe(t=>{this.listTemplateRoles=t.roles},t=>{this.notify.error(t.error.errors)})),this.notify.success(this.translate.instant("lang.listTemplatesRolesUpdated"))},t=>{this.notify.error(t.error.errors)}))}linkUser(t){this.http.post("../rest/users/"+t.id+"/entities",{entityId:this.currentEntity.entity_id,role:""}).subscribe(e=>{const i=t.idToDisplay.split(" ");this.currentEntity.users.push({id:t.id,user_id:t.otherInfo,firstname:i[0],lastname:i[1]}),this.dataSourceUsers=new vt.p(this.currentEntity.users),this.dataSourceUsers.paginator=this.paginatorUsers,this.dataSourceUsers.sort=this.sortUsers,this.notify.success(this.translate.instant("lang.userAdded"))},t=>{this.notify.error(t.error.errors)})}showTemplate(t){this.currentEntity.canAdminTemplates&&this.router.navigate(["/administration/templates/"+t])}addEntityToAnnuary(){this.http.put("../rest/entities/"+this.currentEntity.id+"/annuaries",this.currentEntity).subscribe(t=>{this.currentEntity.business_id=t.entitySiret,this.notify.success(this.translate.instant(void 0===t.synchronized?"lang.siretGenerated":t.synchronized?"lang.siretGeneratedAndSynchronizationDone":"lang.siretGeneratedButAnnuaryUnreachable"))},t=>{this.notify.handleErrors(t)})}openExportModal(){this.dialog.open(p$,{panelClass:"maarch-modal",width:"400px",autoFocus:!1})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(y.a),n.Qb(o.c),n.Qb(w.a),n.Qb(_t.a),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(b$,!0),n.Kc(f$,!0),n.Xc(m$,!0),n.Xc(g$,!0),n.Xc(v$,!0),n.Xc(_$,!0),n.Xc(y$,!0),n.Xc(x$,!0),n.Xc(C$,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginatorUsers=i.first),n.yc(i=n.ec())&&(e.paginatorTemplates=i.first),n.yc(i=n.ec())&&(e.sortUsers=i.first),n.yc(i=n.ec())&&(e.sortTemplates=i.first),n.yc(i=n.ec())&&(e.appDiffusionsList=i.first),n.yc(i=n.ec())&&(e.appVisaWorkflow=i.first),n.yc(i=n.ec())&&(e.appAvisWorkflow=i.first))},decls:129,vars:139,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["fixedTopGap","56","position","end",1,"col-md-5","col-xs-11",3,"mode","fixedInViewport","opened"],["snav2",""],[3,"label"],[1,"form-horizontal",2,"overflow","hidden"],["entityForm","ngForm"],[1,"form-group"],[1,"col-sm-12"],["id","parent_entity_id","name","parent_entity_id",3,"title","placeholder","ngModel","ngModelChange","selectionChange"],["value",""],[2,"opacity","0.5","text-align","center"],[4,"ngFor","ngForOf"],["id","entity_type","name","entity_type","maxlength","32","required","",3,"title","placeholder","ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["class","form-group",4,"ngIf"],["matInput","","required","","name","entity_id","id","entity_id","type","text","maxlength","32","pattern","^[\\w-]*$",3,"ngModel","title","placeholder","disabled","ngModelChange"],["matInput","","required","","name","entity_label","id","entity_label","type","text","maxlength","255",3,"ngModel","title","placeholder","ngModelChange"],["matInput","","required","","name","short_label","id","short_label","type","text","maxlength","50",3,"ngModel","title","placeholder","ngModelChange"],["matInput","","name","email","id","email","type","text","maxlength","255","pattern","(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$)",3,"ngModel","title","placeholder","ngModelChange"],[1,"col-sm-4"],["matInput","","name","adrs_1","id","adrs_1","type","text","maxlength","255",3,"ngModel","title","placeholder","ngModelChange"],["matInput","","name","adrs_2","id","adrs_2","type","text","maxlength","255",3,"ngModel","title","placeholder","ngModelChange"],["matInput","","name","adrs_3","id","adrs_3","type","text","maxlength","255",3,"ngModel","title","placeholder","ngModelChange"],["matInput","","name","zipcode","id","zipcode","type","text","maxlength","32",3,"ngModel","title","placeholder","ngModelChange"],["matInput","","name","city","id","city","type","text","maxlength","255",3,"ngModel","title","placeholder","ngModelChange"],["matInput","","name","country","id","country","type","text","maxlength","255",3,"ngModel","title","placeholder","ngModelChange"],["matInput","","name","entity_full_name","id","entity_full_name","matTextareaAutosize","","matAutosizeMinRows","1","matAutosizeMaxRows","5",3,"ngModel","placeholder","title","ngModelChange"],["matInput","","name","producerService","id","producerService","type","text","maxlength","255","pattern","^[\\w-]*$",3,"ngModel","title","placeholder","ngModelChange"],[1,"col-md-12","text-center",2,"padding","10px"],["mat-raised-button","","color","primary",3,"disabled","click"],["mat-raised-button","","color","warn",3,"disabled","click",4,"ngIf"],["mat-raised-button","","color","default",3,"click",4,"ngIf"],[3,"label",4,"ngIf"],["mat-subheader",""],["mat-list-item","",3,"click",4,"ngIf"],["mat-list-item","",3,"click"],["color","primary","mat-list-icon","",1,"fas","fa-file-export"],["mat-line",""],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-list-item","","disableRipple","true",4,"ngIf"],["mat-list-item","","disableRipple","true"],["color","primary","mat-list-icon",""],["color","primary",3,"checked","click"],["mat-line","",3,"ngStyle","click"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],["matInput","","id","jstree_search","name","jstree_search","type","text",3,"placeholder"],[4,"ngIf"],["id","jstree"],[1,"mat-paginator",2,"min-height","48px","min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],[3,"value",4,"ngIf"],[3,"value"],["matInput","","name","id","id","id","type","text","disabled","",3,"ngModel","title","placeholder","ngModelChange"],["matInput","","value","Param\xe8tre SIRET manquant","type","text","maxlength","255","disabled","",3,"title","placeholder",4,"ngIf"],["matInput","","name","business_id","id","business_id","type","text","maxlength","255","disabled","",3,"ngModel","title","placeholder","ngModelChange",4,"ngIf"],["color","primary","mat-icon-button","","matSuffix","","title","G\xe9n\xe9rer un num\xe9ro SIRET",3,"click",4,"ngIf"],["matInput","","value","Param\xe8tre SIRET manquant","type","text","maxlength","255","disabled","",3,"title","placeholder"],["matInput","","name","business_id","id","business_id","type","text","maxlength","255","disabled","",3,"ngModel","title","placeholder","ngModelChange"],["color","primary","mat-icon-button","","matSuffix","","title","G\xe9n\xe9rer un num\xe9ro SIRET",3,"click"],[1,"fas","fa-compress-arrows-alt"],["mat-raised-button","","color","warn",3,"disabled","click"],["mat-raised-button","","color","default",3,"click"],[1,"row",2,"margin","0px"],[1,"col-md-12"],[3,"adminMode","target"],["appDiffusionsList",""],["mat-raised-button","","color","default",3,"disabled","click"],["mat-raised-button","","color","warn",3,"click",4,"ngIf"],["mat-raised-button","","color","warn",3,"click"],["id","visaCircuitContent",1,"row",2,"margin","0px"],[3,"adminMode","showListModels","showComment"],["appVisaWorkflow",""],["id","opinionCircuitContent",1,"row",2,"margin","0px"],[3,"adminMode","showListModels"],["appAvisWorkflow",""],["class","col-md-12","style","padding:5px;",4,"ngIf"],[1,"col-md-6","col-xs-6"],["matInput","",3,"placeholder","keyup"],[3,"length","hidePageSize","pageSize"],["paginatorUsers",""],["matSort","","matSortActive","lastname","matSortDirection","asc",3,"dataSource"],["tableUsers","matSort"],["matColumnDef","firstname"],["mat-sort-header","",4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","lastname"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"routerLink","matTooltip",4,"matRowDef","matRowDefColumns"],[1,"col-md-12",2,"padding","5px"],[3,"labelPlaceholder","labelList","routeDatas","targetSearchKey","subInfoKey","triggerEvent"],["mat-sort-header",""],[2,"cursor","pointer",3,"routerLink","matTooltip"],["paginatorTemplates",""],["matSort","","matSortActive","template_label","matSortDirection","asc",3,"dataSource"],["tableTemplates","matSort"],["matColumnDef","template_label"],["mat-sort-header","","style","flex:2;",4,"matHeaderCellDef"],["style","flex:2;",3,"matTooltip",4,"matCellDef"],["matColumnDef","template_target"],["mat-sort-header","","style","flex:1;",4,"matHeaderCellDef"],["style","flex:1;",4,"matCellDef"],[3,"ngStyle","click",4,"matRowDef","matRowDefColumns"],["mat-sort-header","",2,"flex","2"],[2,"flex","2",3,"matTooltip"],["mat-sort-header","",2,"flex","1"],[2,"flex","1"],[3,"ngStyle","click"]],template:function(t,e){if(1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,k$,16,11,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,S$,2,0,"div",9),n.Oc(14,V$,10,9,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Wb(15,"mat-sidenav",11,12),n.Wb(17,"mat-nav-list"),n.Wb(18,"mat-tab-group"),n.Wb(19,"mat-tab",13),n.ic(20,"translate"),n.ic(21,"translate"),n.Wb(22,"form",14,15),n.Wb(24,"div",16),n.Wb(25,"div",17),n.Wb(26,"mat-form-field"),n.Wb(27,"mat-select",18),n.dc("ngModelChange",(function(t){return e.currentEntity.parent_entity_id=t}))("selectionChange",(function(){return e.selectParentEntity(e.currentEntity.parent_entity_id)})),n.ic(28,"translate"),n.ic(29,"translate"),n.Wb(30,"mat-option",19),n.Wb(31,"i",20),n.Qc(32),n.ic(33,"translate"),n.Vb(),n.Vb(),n.Oc(34,j$,2,1,"ng-container",21),n.ic(35,"sortBy"),n.Vb(),n.Vb(),n.Wb(36,"mat-form-field"),n.Wb(37,"mat-select",22),n.dc("ngModelChange",(function(t){return e.currentEntity.entity_type=t})),n.ic(38,"translate"),n.ic(39,"translate"),n.Oc(40,A$,2,2,"mat-option",23),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Oc(41,W$,6,7,"div",24),n.Wb(42,"div",16),n.Wb(43,"div",17),n.Wb(44,"mat-form-field"),n.Wb(45,"input",25),n.dc("ngModelChange",(function(t){return e.currentEntity.entity_id=t})),n.ic(46,"translate"),n.ic(47,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(48,"div",16),n.Wb(49,"div",17),n.Wb(50,"mat-form-field"),n.Wb(51,"input",26),n.dc("ngModelChange",(function(t){return e.currentEntity.entity_label=t})),n.ic(52,"translate"),n.ic(53,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(54,"div",16),n.Wb(55,"div",17),n.Wb(56,"mat-form-field"),n.Wb(57,"input",27),n.dc("ngModelChange",(function(t){return e.currentEntity.short_label=t})),n.ic(58,"translate"),n.ic(59,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(60,"div",16),n.Wb(61,"div",17),n.Wb(62,"mat-form-field"),n.Wb(63,"input",28),n.dc("ngModelChange",(function(t){return e.currentEntity.email=t})),n.ic(64,"translate"),n.ic(65,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(66,"mat-accordion"),n.Wb(67,"mat-expansion-panel"),n.Wb(68,"mat-expansion-panel-header"),n.Wb(69,"mat-panel-title"),n.Qc(70),n.ic(71,"translate"),n.Vb(),n.Vb(),n.Wb(72,"div",16),n.Wb(73,"div",29),n.Wb(74,"mat-form-field"),n.Wb(75,"input",30),n.dc("ngModelChange",(function(t){return e.currentEntity.adrs_1=t})),n.ic(76,"translate"),n.ic(77,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(78,"div",29),n.Wb(79,"mat-form-field"),n.Wb(80,"input",31),n.dc("ngModelChange",(function(t){return e.currentEntity.adrs_2=t})),n.ic(81,"translate"),n.ic(82,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(83,"div",29),n.Wb(84,"mat-form-field"),n.Wb(85,"input",32),n.dc("ngModelChange",(function(t){return e.currentEntity.adrs_3=t})),n.ic(86,"translate"),n.ic(87,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(88,"div",16),n.Wb(89,"div",29),n.Wb(90,"mat-form-field"),n.Wb(91,"input",33),n.dc("ngModelChange",(function(t){return e.currentEntity.zipcode=t})),n.ic(92,"translate"),n.ic(93,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(94,"div",29),n.Wb(95,"mat-form-field"),n.Wb(96,"input",34),n.dc("ngModelChange",(function(t){return e.currentEntity.city=t})),n.ic(97,"translate"),n.ic(98,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(99,"div",29),n.Wb(100,"mat-form-field"),n.Wb(101,"input",35),n.dc("ngModelChange",(function(t){return e.currentEntity.country=t})),n.ic(102,"translate"),n.ic(103,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(104,"div",16),n.Wb(105,"div",17),n.Wb(106,"mat-form-field"),n.Wb(107,"textarea",36),n.dc("ngModelChange",(function(t){return e.currentEntity.entity_full_name=t})),n.ic(108,"translate"),n.ic(109,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Oc(110,L$,6,3,"div",24),n.Wb(111,"div",16),n.Wb(112,"div",17),n.Wb(113,"mat-form-field"),n.Wb(114,"input",37),n.dc("ngModelChange",(function(t){return e.currentEntity.producerService=t})),n.ic(115,"translate"),n.ic(116,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(117,"div",16),n.Wb(118,"div",38),n.Wb(119,"button",39),n.dc("click",(function(){return e.saveEntity()})),n.Qc(120),n.ic(121,"translate"),n.Vb(),n.Oc(122,Q$,3,4,"button",40),n.Oc(123,N$,3,3,"button",41),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Oc(124,U$,7,6,"mat-tab",42),n.Oc(125,H$,7,7,"mat-tab",42),n.Oc(126,X$,7,6,"mat-tab",42),n.Oc(127,nH,21,13,"mat-tab",42),n.Oc(128,hH,20,12,"mat-tab",42),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.zc(23);n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",!1),n.Db(4),n.oc("label",e.creationMode?n.jc(20,70,"lang.createNewEntity"):n.jc(21,72,"lang.informations")),n.Db(8),n.pc("title",n.jc(28,74,"lang.isLinkedTo")),n.pc("placeholder",n.jc(29,76,"lang.isLinkedTo")),n.oc("ngModel",e.currentEntity.parent_entity_id),n.Db(5),n.Sc("- ",n.jc(33,78,"lang.noEntity")," -"),n.Db(2),n.oc("ngForOf",n.kc(35,80,e.entities,"entity_label")),n.Db(3),n.pc("title",n.jc(38,83,"lang.entityType")),n.pc("placeholder",n.jc(39,85,"lang.entityType")),n.oc("ngModel",e.currentEntity.entity_type),n.Db(3),n.oc("ngForOf",e.entityTypeList),n.Db(1),n.oc("ngIf",!e.creationMode),n.Db(4),n.pc("title",n.jc(46,87,"lang.id")),n.pc("placeholder",n.jc(47,89,"lang.id")),n.oc("ngModel",e.currentEntity.entity_id)("disabled",!e.creationMode),n.Db(6),n.pc("title",n.jc(52,91,"lang.label")),n.pc("placeholder",n.jc(53,93,"lang.label")),n.oc("ngModel",e.currentEntity.entity_label),n.Db(6),n.pc("title",n.jc(58,95,"lang.shortLabel")),n.pc("placeholder",n.jc(59,97,"lang.shortLabel")),n.oc("ngModel",e.currentEntity.short_label),n.Db(6),n.pc("title",n.jc(64,99,"lang.email")),n.pc("placeholder",n.jc(65,101,"lang.email")),n.oc("ngModel",e.currentEntity.email),n.Db(7),n.Sc(" ",n.jc(71,103,"lang.otherInformations")," "),n.Db(5),n.qc("title","",n.jc(76,105,"lang.address"),"1"),n.qc("placeholder","",n.jc(77,107,"lang.address"),"1"),n.oc("ngModel",e.currentEntity.adrs_1),n.Db(5),n.qc("title","",n.jc(81,109,"lang.address"),"2"),n.qc("placeholder","",n.jc(82,111,"lang.address"),"2"),n.oc("ngModel",e.currentEntity.adrs_2),n.Db(5),n.qc("title","",n.jc(86,113,"lang.address"),"3"),n.qc("placeholder","",n.jc(87,115,"lang.address"),"3"),n.oc("ngModel",e.currentEntity.adrs_3),n.Db(6),n.pc("title",n.jc(92,117,"lang.zipcode")),n.pc("placeholder",n.jc(93,119,"lang.zipcode")),n.oc("ngModel",e.currentEntity.zipcode),n.Db(5),n.pc("title",n.jc(97,121,"lang.city")),n.pc("placeholder",n.jc(98,123,"lang.city")),n.oc("ngModel",e.currentEntity.city),n.Db(5),n.pc("title",n.jc(102,125,"lang.country")),n.pc("placeholder",n.jc(103,127,"lang.country")),n.oc("ngModel",e.currentEntity.country),n.Db(6),n.pc("placeholder",n.jc(108,129,"lang.entityFullName")),n.pc("title",n.jc(109,131,"lang.entityFullName")),n.oc("ngModel",e.currentEntity.entity_full_name),n.Db(3),n.oc("ngIf",!e.creationMode),n.Db(4),n.pc("title",n.jc(115,133,"lang.producerService")),n.pc("placeholder",n.jc(116,135,"lang.producerService")),n.oc("ngModel",e.currentEntity.producerService),n.Db(5),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(121,137,"lang.save")),n.Db(2),n.oc("ngIf",!e.creationMode),n.Db(1),n.oc("ngIf",e.creationMode),n.Db(1),n.oc("ngIf",!e.creationMode),n.Db(1),n.oc("ngIf",!e.creationMode),n.Db(1),n.oc("ngIf",!e.creationMode),n.Db(1),n.oc("ngIf",!e.creationMode),n.Db(1),n.oc("ngIf",!e.creationMode)}},directives:[I.e,I.f,Ot,We,P.t,I.d,R.h,Te.c,Te.a,X.K,X.v,X.w,Y.c,ee.a,X.u,X.x,W.p,P.s,X.p,X.F,J.b,X.d,X.B,gt.a,gt.c,gt.g,gt.h,J.d,k.b,R.g,R.d,S.a,R.c,W.l,T.a,te.a,P.w,V.c,K.a,Y.f,Y.j,im,Ko,Qv,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,ii,vt.h,Fe.b,vt.a,vt.j,vt.m,o.d,A.b],pipes:[g.d,Wt.a],styles:[".mat-list-item[draggable=false][_ngcontent-%COMP%]:hover{background:inherit}.mat-list-item[draggable=false][_ngcontent-%COMP%]{cursor:not-allowed!important}.mat-list-item[draggable=true][_ngcontent-%COMP%]{cursor:pointer}.mat-list-item[draggable=true][_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{cursor:move}"]}),t})(),vH=(()=>{class t{constructor(t,e,i,n){this.translate=t,this.http=e,this.data=i,this.dialogRef=n}setRedirectEntity(t){this.data.entity.redirectEntity=t.id}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.a),n.Qb(q.h))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:19,vars:21,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["role","alert",1,"alert-message","alert-message-info"],[4,"ngIf"],["singleMode","","required","",3,"labelPlaceholder","labelList","routeDatas","targetSearchKey","subInfoKey","triggerEvent"],[1,"divider-modal"],["mat-raised-button","","color","warn","type","submit",1,"btn","btn-danger",3,"disabled","click"],["color","primary","mat-list-icon","",1,"fa","fa-file","fa-2x"],["mat-line",""],["color","primary","mat-list-icon","",1,"fa","fa-sitemap","fa-2x"],["color","primary","mat-list-icon","",1,"fa","fa-user","fa-2x"],["color","primary","mat-list-icon","",1,"fa","fa-file-alt","fa-2x"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h2",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-dialog-content"),n.Wb(5,"div",2),n.Wb(6,"mat-list"),n.Oc(7,uH,11,8,"mat-list-item",3),n.Oc(8,pH,11,8,"mat-list-item",3),n.Oc(9,bH,13,12,"mat-list-item",3),n.Oc(10,fH,13,12,"mat-list-item",3),n.Vb(),n.Vb(),n.Wb(11,"plugin-autocomplete",4),n.dc("triggerEvent",(function(t){return e.setRedirectEntity(t)})),n.ic(12,"translate"),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Rb(14,"span",5),n.Wb(15,"mat-dialog-actions"),n.Wb(16,"button",6),n.dc("click",(function(){return e.dialogRef.close(e.data.entity)})),n.Qc(17),n.ic(18,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,12,"lang.entityReplacement")),n.Db(5),n.oc("ngIf",e.data.entity.documents>0),n.Db(1),n.oc("ngIf",e.data.entity.instances>0),n.Db(1),n.oc("ngIf",e.data.entity.users.length>0),n.Db(1),n.oc("ngIf",e.data.entity.templates.length>0),n.Db(1),n.oc("labelPlaceholder",n.jc(12,14,"lang.chooseEntity"))("labelList",n.jc(13,16,"lang.availableEntities"))("routeDatas",n.uc(20,mH))("targetSearchKey","idToDisplay")("subInfoKey","descriptionToDisplay"),n.Db(5),n.oc("disabled",void 0===e.data.entity.redirectEntity||e.data.entity.redirectEntity==e.data.entity.entity_id),n.Db(1),n.Rc(n.jc(18,18,"lang.delete")))},directives:[q.i,q.f,R.a,P.t,ii,q.c,k.b,R.d,S.a,R.c,W.l],pipes:[g.d,P.p],styles:[".alert-message[_ngcontent-%COMP%] { max-width: inherit; }"]}),t})();const _H=["adminMenuTemplate"];function yH(t,e){1&t&&(n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",11),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",12),n.Rb(5,"mat-icon",13),n.Wb(6,"p",14),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,2,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,4,"lang.add")," "))}function xH(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Vb())}function CH(t,e){1&t&&(n.Wb(0,"mat-header-cell"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.imgRelated")))}function OH(t,e){if(1&t&&n.Rb(0,"mat-icon",41),2&t){const t=n.hc().$implicit;n.Gb("fm ",t.img_filename," fm-2x")}}function DH(t,e){if(1&t&&n.Rb(0,"mat-icon",41),2&t){const t=n.hc().$implicit;n.Gb("fa ",t.img_filename," fa-2x")}}function wH(t,e){if(1&t&&(n.Wb(0,"mat-cell",39),n.Oc(1,OH,1,3,"mat-icon",40),n.Oc(2,DH,1,3,"mat-icon",40),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",0==t.img_filename.indexOf("fm")),n.Db(1),n.oc("ngIf",0==t.img_filename.indexOf("fa"))}}function MH(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",42),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Rc(n.jc(2,3,"lang.id"))}}function kH(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",t.id," ")}}function SH(t,e){1&t&&(n.Wb(0,"mat-header-cell",42),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.statusName")))}function IH(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.label_status," ")}}function PH(t,e){1&t&&n.Rb(0,"mat-header-cell")}function VH(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",43),n.Wb(1,"button",44),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.deleteStatus(a)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",45),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.pc("matTooltip",n.jc(2,1,"lang.delete")))}function RH(t,e){1&t&&n.Rb(0,"mat-header-row")}function jH(t,e){1&t&&(n.Rb(0,"mat-row",46),n.ic(1,"translate")),2&t&&(n.qc("routerLink","/administration/statuses/",e.$implicit.identifier,""),n.pc("matTooltip",n.jc(1,2,"lang.view")))}function AH(t,e){if(1&t&&(n.Wb(0,"mat-card",17),n.Wb(1,"div",18),n.Wb(2,"div",19),n.Wb(3,"mat-form-field"),n.Rb(4,"input",20),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Wb(6,"div",19),n.Rb(7,"mat-paginator",21,22),n.Vb(),n.Vb(),n.Wb(9,"mat-table",23,24),n.Ub(11,25),n.Oc(12,CH,3,3,"mat-header-cell",26),n.Oc(13,wH,3,2,"mat-cell",27),n.Tb(),n.Ub(14,28),n.Oc(15,MH,3,5,"mat-header-cell",29),n.Oc(16,kH,2,3,"mat-cell",30),n.Tb(),n.Ub(17,31),n.Oc(18,SH,3,3,"mat-header-cell",32),n.Oc(19,IH,2,1,"mat-cell",33),n.Tb(),n.Ub(20,34),n.Oc(21,PH,1,0,"mat-header-cell",26),n.Oc(22,VH,4,3,"mat-cell",35),n.Tb(),n.Oc(23,RH,1,0,"mat-header-row",36),n.Oc(24,jH,2,4,"mat-row",37),n.Vb(),n.Wb(25,"div",38),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.pc("placeholder",n.jc(5,10,"lang.filterBy")),n.oc("formControl",t.adminService.getFilterField()),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.adminService.getDataSource()),n.Db(14),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns),n.Db(2),n.Tc(" ",t.statuses.length," ",n.jc(27,12,"lang.statuses"),"")}}let WH=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.functions=s,this.adminService=o,this.viewContainerRef=r,this.loading=!1,this.statuses=[],this.displayedColumns=["img_filename","id","label_status","identifier"],this.filterColumns=["id","label_status"]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.statuses")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,this.http.get("../rest/statuses").subscribe(t=>{this.statuses=t.statuses,this.loading=!1,setTimeout(()=>{this.adminService.setDataSource("admin_status",this.statuses,this.sort,this.paginator,this.filterColumns)},0)},t=>{this.notify.error(t.error.errors)})}deleteStatus(t){confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.delete")+" \xab "+t.id+" \xbb")&&this.http.delete("../rest/statuses/"+t.identifier).subscribe(t=>{this.statuses=t.statuses,this.adminService.setDataSource("admin_status",this.statuses,this.sort,this.paginator,this.filterColumns),this.notify.success(this.translate.instant("lang.statusDeleted"))},t=>{this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a),n.Qb(OL),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(_H,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:15,vars:8,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["mat-subheader",""],["mat-list-item","","routerLink","/administration/statuses/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"row"],[1,"col-md-6","col-xs-6"],["matInput","",3,"formControl","placeholder"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSort","","matSortDisableClear","",3,"dataSource"],["table",""],["matColumnDef","img_filename"],[4,"matHeaderCellDef"],["color","primary",4,"matCellDef"],["matColumnDef","id"],["mat-sort-header","",3,"hide-for-mobile",4,"matHeaderCellDef"],[3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","label_status"],["mat-sort-header","",4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","identifier"],["style","justify-content: flex-end;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"routerLink","matTooltip",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["color","primary"],["aria-hidden","true",3,"class",4,"ngIf"],["aria-hidden","true"],["mat-sort-header",""],[2,"justify-content","flex-end"],["mat-icon-button","","color","warn",3,"matTooltip","click"],["aria-hidden","true",1,"fa","fa-trash-alt","fa-2x"],[2,"cursor","pointer",3,"routerLink","matTooltip"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,yH,9,6,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,xH,2,0,"div",9),n.Oc(14,AH,28,14,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,R.h,R.g,R.d,o.f,S.a,R.c,W.l,V.c,K.a,Y.c,J.b,X.d,X.u,X.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,vt.h,vt.a,Fe.b,k.b,A.b,vt.j,vt.m,o.d],pipes:[g.d],encapsulation:2}),t})();function TH(t,e){1&t&&(n.Wb(0,"div",10),n.Rb(1,"mat-spinner",11),n.Vb())}function EH(t,e){if(1&t){const t=n.Xb();n.Wb(0,"input",31),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).status.id=e}))("blur",(function(){return n.Dc(t),n.hc(2).isAvailable()})),n.ic(1,"translate"),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(2);n.pc("title",n.jc(1,4,"lang.id")),n.pc("placeholder",n.jc(2,6,"lang.id")),n.oc("formControl",t.statusId)("ngModel",t.status.id)}}function FH(t,e){if(1&t){const t=n.Xb();n.Wb(0,"input",32),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).status.id=e})),n.ic(1,"translate"),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(2);n.pc("title",n.jc(1,3,"lang.id")),n.pc("placeholder",n.jc(2,5,"lang.id")),n.oc("ngModel",t.status.id)}}function LH(t,e){if(1&t&&(n.Wb(0,"mat-error"),n.Qc(1),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.Rc(t.getErrorMessage())}}const QH=function(t){return[t]};function NH(t,e){if(1&t&&(n.Wb(0,"mat-option",33),n.Rb(1,"i",34),n.Qc(2),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.image_name),n.Db(1),n.Fb(t.image_name),n.oc("ngClass",n.vc(6,QH,0==t.image_name.indexOf("fm")?"fm":"fa")),n.Db(1),n.Sc(" ",t.image_name," ")}}function zH(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",12),n.Wb(1,"form",13,14),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().submitStatus()})),n.Wb(3,"div",15),n.Wb(4,"div",16),n.Wb(5,"mat-form-field"),n.Oc(6,EH,3,8,"input",17),n.Oc(7,FH,3,7,"input",18),n.Oc(8,LH,2,1,"mat-error",19),n.Vb(),n.Vb(),n.Vb(),n.Wb(9,"div",15),n.Wb(10,"div",16),n.Wb(11,"mat-form-field"),n.Wb(12,"input",20),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().status.label_status=e})),n.ic(13,"translate"),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(15,"div",15),n.Wb(16,"div",21),n.Wb(17,"mat-slide-toggle",22),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().status.can_be_searched=e})),n.ic(18,"translate"),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Vb(),n.Wb(21,"div",21),n.Wb(22,"mat-slide-toggle",23),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().status.can_be_modified=e})),n.ic(23,"translate"),n.Qc(24),n.ic(25,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(26,"div",15),n.Wb(27,"div",24),n.Rb(28,"mat-icon",25),n.Vb(),n.Wb(29,"div",26),n.Wb(30,"mat-form-field"),n.Wb(31,"mat-select",27),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().status.img_filename=e})),n.ic(32,"translate"),n.Oc(33,NH,3,8,"mat-option",28),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(34,"div",15),n.Wb(35,"div",29),n.Wb(36,"button",30),n.Qc(37),n.ic(38,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(2),e=n.hc();n.Db(6),n.oc("ngIf",e.creationMode),n.Db(1),n.oc("ngIf",!e.creationMode),n.Db(1),n.oc("ngIf",e.statusId.invalid),n.Db(4),n.pc("title",n.jc(13,23,"lang.label")),n.pc("placeholder",n.jc(14,25,"lang.label")),n.oc("ngModel",e.status.label_status),n.Db(5),n.pc("matTooltip",n.jc(18,27,"lang.tooltipSearchStatus")),n.oc("ngModel",e.status.can_be_searched)("checked",1==e.status.can_be_searched),n.Db(2),n.Sc(" ",n.jc(20,29,"lang.canBeSearched")," "),n.Db(3),n.pc("matTooltip",n.jc(23,31,"lang.tooltipIndexStatus")),n.oc("ngModel",e.status.can_be_modified)("checked",1==e.status.can_be_modified),n.Db(2),n.Sc(" ",n.jc(25,33,"lang.canBeModified")," "),n.Db(4),n.Fb(e.status.img_filename),n.oc("ngClass",n.vc(39,QH,0==e.status.img_filename.indexOf("fm")?"fm fm-2x":"fa fa-2x")),n.Db(3),n.pc("placeholder",n.jc(32,35,"lang.imgRelated")),n.oc("ngModel",e.status.img_filename),n.Db(2),n.oc("ngForOf",e.statusImages),n.Db(3),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(38,37,"lang.save"))}}let BH=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.route=i,this.router=n,this.notify=a,this.headerService=s,this.appService=o,this.status={id:null,label_status:null,can_be_searched:null,can_be_modified:null,img_filename:"fm-letter"},this.statusImages="",this.loading=!1,this.statusId=new X.i("",[X.I.required,X.I.pattern(/^[\w.-]*$/)])}getErrorMessage(){return this.statusId.hasError("required")?this.translate.instant("lang.enterValue"):this.statusId.hasError("pattern")?this.translate.instant("lang.patternId"):""}ngOnInit(){this.loading=!0,this.route.params.subscribe(t=>{void 0===t.identifier?(this.headerService.setHeader(this.translate.instant("lang.statusCreation")),this.http.get("../rest/administration/statuses/new").subscribe(t=>{this.status.img_filename="fm-letter",this.status.can_be_searched=!0,this.status.can_be_modified=!0,this.statusImages=t.statusImages,this.creationMode=!0,this.loading=!1}),this.statusIdAvailable=!1):(this.creationMode=!1,this.statusIdentifier=t.identifier,this.http.get("../rest/statuses/"+t.identifier).subscribe(t=>{this.status=t.status[0],this.headerService.setHeader(this.translate.instant("lang.statusModification"),this.status.label_status),this.status.can_be_searched="Y"===this.status.can_be_searched,this.status.can_be_modified="Y"===this.status.can_be_modified,this.statusImages=t.statusImages,this.statusIdAvailable=!0,this.loading=!1},t=>{this.notify.error(t.error.errors)}))})}isAvailable(){this.status.id?this.http.get("../rest/status/"+this.status.id).subscribe(()=>{this.statusIdAvailable=!1},t=>{this.statusIdAvailable=!1,"id not found"===t.error.errors&&(this.statusIdAvailable=!0)}):this.statusIdAvailable=!1}submitStatus(){!0===this.creationMode?this.http.post("../rest/statuses",this.status).subscribe(()=>{this.notify.success(this.translate.instant("lang.statusAdded")),this.router.navigate(["administration/statuses"])},t=>{this.notify.error(t.error.errors)}):!1===this.creationMode&&this.http.put("../rest/statuses/"+this.statusIdentifier,this.status).subscribe(()=>{this.notify.success(this.translate.instant("lang.statusUpdated")),this.router.navigate(["administration/statuses"])},t=>{this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:13,vars:8,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"form-horizontal",3,"ngSubmit"],["statusFormUp","ngForm"],[1,"form-group"],[1,"col-sm-12"],["matInput","","maxlength","10","name","id","id","id","type","text","pattern","^[\\w.-]*$","required","",3,"formControl","ngModel","title","placeholder","ngModelChange","blur",4,"ngIf"],["matInput","","maxlength","10","name","id","id","id","required","","disabled","",3,"ngModel","title","placeholder","ngModelChange",4,"ngIf"],[4,"ngIf"],["matInput","","name","label_status","id","label_status","maxlength","50","type","text","required","",3,"ngModel","title","placeholder","ngModelChange"],[1,"col-sm-6",2,"white-space","nowrap","text-align","center"],["id","can_be_search","name","can_be_search","color","primary",3,"matTooltip","ngModel","checked","ngModelChange"],["id","can_be_modified","name","can_be_modified","color","primary",3,"matTooltip","ngModel","checked","ngModelChange"],[1,"col-sm-1",2,"text-align","right"],["aria-hidden","true","color","primary",3,"ngClass"],[1,"col-sm-11"],["id","status","name","status","required","",3,"ngModel","placeholder","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"col-sm-12",2,"text-align","center"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],["matInput","","maxlength","10","name","id","id","id","type","text","pattern","^[\\w.-]*$","required","",3,"formControl","ngModel","title","placeholder","ngModelChange","blur"],["matInput","","maxlength","10","name","id","id","id","required","","disabled","",3,"ngModel","title","placeholder","ngModelChange"],[3,"value"],["color","primary",3,"ngClass"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,TH,2,0,"div",8),n.Oc(12,zH,39,41,"mat-card",9),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,V.c,K.a,X.K,X.v,X.w,Y.c,J.b,X.d,X.p,X.F,X.u,X.x,te.a,A.b,S.a,P.q,ee.a,P.s,k.b,X.B,X.j,Y.b,W.p],pipes:[g.d],encapsulation:2}),t})();const UH=["snav2"],$H=["adminMenuTemplate"];function HH(t,e){1&t&&(n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",11),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",12),n.Rb(5,"mat-icon",13),n.Wb(6,"p",14),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,2,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,4,"lang.add")," "))}function GH(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Vb())}function XH(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",38),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Rc(n.jc(2,3,"lang.id"))}}function qH(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",t.id," ")}}function KH(t,e){1&t&&(n.Wb(0,"mat-header-cell",38),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.actionName")))}function YH(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.label_action," ")}}function JH(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",38),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Sc("",n.jc(2,3,"lang.actionHistory")," ")}}function ZH(t,e){1&t&&(n.Wb(0,"span"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.no")," "))}function tG(t,e){1&t&&(n.Wb(0,"span"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.yes")," "))}function eG(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Oc(1,ZH,3,3,"span",39),n.Oc(2,tG,3,3,"span",39),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.oc("ngIf","N"==t.history),n.Db(1),n.oc("ngIf","Y"==t.history)}}function iG(t,e){1&t&&n.Rb(0,"mat-header-cell")}function nG(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",40),n.Wb(1,"button",41),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.deleteAction(a)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",42),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.pc("matTooltip",n.jc(2,2,"lang.delete")),n.oc("disabled","Y"==t.is_system)}}function aG(t,e){1&t&&n.Rb(0,"mat-header-row")}function sG(t,e){1&t&&(n.Rb(0,"mat-row",43),n.ic(1,"translate")),2&t&&(n.qc("routerLink","/administration/actions/",e.$implicit.id,""),n.pc("matTooltip",n.jc(1,2,"lang.view")))}function oG(t,e){if(1&t&&(n.Wb(0,"mat-card",17),n.Wb(1,"div",18),n.Wb(2,"div",19),n.Wb(3,"mat-form-field"),n.Rb(4,"input",20),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Wb(6,"div",19),n.Rb(7,"mat-paginator",21,22),n.Vb(),n.Vb(),n.Wb(9,"mat-table",23,24),n.Ub(11,25),n.Oc(12,XH,3,5,"mat-header-cell",26),n.Oc(13,qH,2,3,"mat-cell",27),n.Tb(),n.Ub(14,28),n.Oc(15,KH,3,3,"mat-header-cell",29),n.Oc(16,YH,2,1,"mat-cell",30),n.Tb(),n.Ub(17,31),n.Oc(18,JH,3,5,"mat-header-cell",26),n.Oc(19,eG,3,4,"mat-cell",27),n.Tb(),n.Ub(20,32),n.Oc(21,iG,1,0,"mat-header-cell",33),n.Oc(22,nG,4,4,"mat-cell",34),n.Tb(),n.Oc(23,aG,1,0,"mat-header-row",35),n.Oc(24,sG,2,4,"mat-row",36),n.Vb(),n.Wb(25,"div",37),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.pc("placeholder",n.jc(5,10,"lang.filterBy")),n.oc("formControl",t.adminService.getFilterField()),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.adminService.getDataSource()),n.Db(14),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns),n.Db(2),n.Tc(" ",t.actions.length," ",n.jc(27,12,"lang.actions"),"")}}let rG=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.adminService=s,this.functions=o,this.viewContainerRef=r,this.search=null,this.actions=[],this.titles=[],this.loading=!1,this.displayedColumns=["id","label_action","history","actions"],this.filterColumns=["id","label_action"]}ngOnInit(){this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,this.http.get("../rest/actions").subscribe(t=>{this.actions=t.actions,this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.actions")),this.loading=!1,setTimeout(()=>{this.adminService.setDataSource("admin_actions",this.actions,this.sort,this.paginator,this.filterColumns)},0)},t=>{this.notify.handleErrors(t)})}deleteAction(t){confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.delete")+" \xab "+t.label_action+" \xbb")&&this.http.delete("../rest/actions/"+t.id).subscribe(t=>{this.actions=t.actions,this.adminService.setDataSource("admin_actions",this.actions,this.sort,this.paginator,this.filterColumns),this.notify.success(this.translate.instant("lang.actionDeleted"))},t=>{this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(OL),n.Qb(_t.a),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(UH,!0),n.Kc($H,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:15,vars:8,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["mat-subheader",""],["mat-list-item","","routerLink","/administration/actions/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"row"],[1,"col-md-6","col-xs-6"],["matInput","",3,"placeholder","formControl"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSort","","matSortDisableClear","",3,"dataSource"],["table",""],["matColumnDef","id"],["mat-sort-header","",3,"hide-for-mobile",4,"matHeaderCellDef"],[3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","label_action"],["mat-sort-header","",4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","history"],["matColumnDef","actions"],[4,"matHeaderCellDef"],["style","justify-content: flex-end;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"routerLink","matTooltip",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["mat-sort-header",""],[4,"ngIf"],[2,"justify-content","flex-end"],["mat-icon-button","","color","warn",3,"disabled","matTooltip","click"],["aria-hidden","true",1,"fa","fa-trash-alt","fa-2x"],[2,"cursor","pointer",3,"routerLink","matTooltip"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,HH,9,6,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,GH,2,0,"div",9),n.Oc(14,oG,28,14,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,R.h,R.g,R.d,o.f,S.a,R.c,W.l,V.c,K.a,Y.c,J.b,X.d,X.u,X.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,vt.h,Fe.b,vt.a,k.b,A.b,vt.j,vt.m,o.d],pipes:[g.d],encapsulation:2}),t})();const cG=["snav2"];function lG(t,e){1&t&&(n.Wb(0,"div",10),n.Rb(1,"mat-spinner",11),n.Vb())}function dG(t,e){1&t&&(n.Wb(0,"div",28),n.Wb(1,"b"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Qc(4),n.ic(5,"translate"),n.Vb()),2&t&&(n.Db(2),n.Sc("",n.jc(3,2,"lang.isSytemAction")," !"),n.Db(2),n.Sc(" ",n.jc(5,4,"lang.doNotModifyUnlessExpert")," "))}function hG(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",32),n.dc("removed",(function(){n.Dc(t);const i=e.index;return n.hc(3).removeSelectedFields(i)})),n.Qc(1),n.Rb(2,"mat-icon",33),n.Vb()}if(2&t){const t=e.$implicit;n.oc("removable",!0),n.Db(1),n.Sc(" ",t," ")}}function uG(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",16),n.Wb(1,"div",17),n.Wb(2,"plugin-select-search",29),n.dc("afterSelected",(function(){return n.Dc(t),n.hc(2).getSelectedFields()})),n.ic(3,"translate"),n.ic(4,"translate"),n.Vb(),n.Wb(5,"mat-chip-list",30),n.Oc(6,hG,3,2,"mat-chip",31),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(2),n.Fb(""),n.oc("showLabel",!0)("label",n.jc(3,8,"lang.checkEmptyFields"))("placeholderLabel",n.jc(4,10,"lang.checkEmptyFields"))("formControlSelect",t.customFieldsFormControl)("datas",t.availableCustomFields),n.Db(4),n.oc("ngForOf",t.selectedFieldsValue)}}function pG(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",16),n.Wb(1,"div",17),n.Wb(2,"mat-form-field"),n.Wb(3,"mat-select",34),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).arMode=e})),n.ic(4,"translate"),n.ic(5,"translate"),n.Wb(6,"mat-option",35),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Wb(9,"mat-option",36),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Wb(12,"mat-option",37),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(3),n.pc("title",n.jc(4,7,"lang.generateARMode")),n.pc("placeholder",n.jc(5,9,"lang.generateARMode")),n.oc("required","create_acknowledgement_receipt"==t.action.actionPageId)("ngModel",t.arMode),n.Db(4),n.Rc(n.jc(8,11,"lang.autoAR")),n.Db(3),n.Rc(n.jc(11,13,"lang.manualAR")),n.Db(3),n.Rc(n.jc(14,15,"lang.bothAR"))}}function bG(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",16),n.Wb(1,"div",17),n.Wb(2,"plugin-select-search",29),n.dc("afterSelected",(function(){n.Dc(t);const e=n.hc(2);return e.action.id_status=e.selectStatusId.value})),n.ic(3,"translate"),n.ic(4,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(2),n.Fb(""),n.oc("showLabel",!0)("label",n.jc(3,7,"lang.associatedStatus"))("placeholderLabel",n.jc(4,9,"lang.associatedStatus"))("formControlSelect",t.selectStatusId)("datas",t.statuses)}}function fG(t,e){if(1&t&&(n.Wb(0,"mat-option",38),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.value),n.Db(1),n.Sc(" ",t.label," ")}}function mG(t,e){if(1&t&&(n.Wb(0,"mat-option",39),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.oc("value",t.id)("disabled","registeredMail"!==t.id&&"registeredMail"===i.action.actionPageGroup),n.Db(1),n.Sc(" ",t.label," ")}}function gG(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",12),n.Oc(1,dG,6,6,"div",13),n.Wb(2,"form",14,15),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Wb(4,"div",16),n.Wb(5,"div",17),n.Wb(6,"mat-form-field"),n.Wb(7,"input",18),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().action.label_action=e})),n.ic(8,"translate"),n.ic(9,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(10,"div",16),n.Wb(11,"div",17),n.Wb(12,"plugin-select-search",19),n.dc("afterSelected",(function(){return n.Dc(t),n.hc().getCustomFields()})),n.ic(13,"translate"),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Oc(15,uG,7,12,"div",20),n.Oc(16,pG,15,17,"div",20),n.Oc(17,bG,5,11,"div",20),n.Wb(18,"div",16),n.Wb(19,"div",17),n.Wb(20,"mat-form-field"),n.Wb(21,"mat-select",21),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().action.keyword=e})),n.ic(22,"translate"),n.ic(23,"translate"),n.Oc(24,fG,2,2,"mat-option",22),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(25,"div",16),n.Wb(26,"div",23),n.Wb(27,"mat-slide-toggle",24),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().action.history=e})),n.ic(28,"translate"),n.Qc(29),n.ic(30,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(31,"div",16),n.Wb(32,"div",17),n.Wb(33,"mat-form-field"),n.Wb(34,"mat-select",25),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().action.actionCategories=e})),n.ic(35,"translate"),n.ic(36,"translate"),n.Oc(37,mG,2,3,"mat-option",26),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(38,"div",16),n.Wb(39,"div",23),n.Wb(40,"button",27),n.Qc(41),n.ic(42,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(3),e=n.hc();n.Db(1),n.oc("ngIf",1==e.action.is_system),n.Db(6),n.pc("title",n.jc(8,30,"lang.label")),n.pc("placeholder",n.jc(9,32,"lang.label")),n.oc("ngModel",e.action.label_action),n.Db(5),n.Fb(""),n.oc("showLabel",!0)("label",n.jc(13,34,"lang.actionCarriedOut"))("placeholderLabel",n.jc(14,36,"lang.actionCarriedOut"))("formControlSelect",e.selectActionPageId)("datas",e.actionPages)("optGroupList",e.group)("optGroupTarget","category"),n.Db(3),n.oc("ngIf",!e.functions.empty(e.availableCustomFields)&&"close_mail"==e.action.actionPageId),n.Db(1),n.oc("ngIf","create_acknowledgement_receipt"==e.action.actionPageId),n.Db(1),n.oc("ngIf","reconcile"!=e.action.actionPageId),n.Db(4),n.pc("title",n.jc(22,38,"lang.keyword")),n.pc("placeholder",n.jc(23,40,"lang.keyword")),n.oc("ngModel",e.action.keyword),n.Db(3),n.oc("ngForOf",e.keywordsList),n.Db(3),n.pc("title",n.jc(28,42,"lang.actionHistoryDesc")),n.oc("ngModel",e.action.history)("checked","Y"==e.action.history),n.Db(2),n.Sc(" ",n.jc(30,44,"lang.actionHistory"),""),n.Db(5),n.pc("title",n.jc(35,46,"lang.chooseCategoryAssociation")),n.pc("placeholder",n.jc(36,48,"lang.chooseCategoryAssociation")),n.oc("ngModel",e.action.actionCategories),n.Db(3),n.oc("ngForOf",e.categoriesList),n.Db(3),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(42,50,"lang.save"))}}let vG=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.route=i,this.router=n,this.notify=a,this.headerService=s,this.appService=o,this.functions=r,this.action={},this.statuses=[],this.actionPages=[],this.categoriesList=[],this.keywordsList=[],this.group=[],this.loading=!1,this.availableCustomFields=[],this.customFieldsFormControl=new X.i({value:"",disabled:!1}),this.selectedFieldsValue=[],this.selectedFieldsId=[],this.selectActionPageId=new X.i,this.selectStatusId=new X.i}ngOnInit(){this.loading=!0,this.route.params.subscribe(t=>{void 0===t.id?(this.creationMode=!0,this.http.get("../rest/initAction").subscribe(t=>{this.action=t.action,this.selectActionPageId.setValue(this.action.actionPageId),this.selectStatusId.setValue(this.action.id_status),this.categoriesList=t.categoriesList,this.statuses=t.statuses.map(t=>({id:t.id,label:t.label_status})),this.actionPages=t.actionPages,this.actionPages.map(t=>t.category).filter((t,e,i)=>i.indexOf(t)===e).forEach(t=>{this.group.push({id:t,label:this.translate.instant("lang."+t)})}),this.keywordsList=t.keywordsList,this.headerService.setHeader(this.translate.instant("lang.actionCreation")),this.loading=!1})):(this.creationMode=!1,this.http.get("../rest/actions/"+t.id).subscribe(t=>Object(r.a)(this,void 0,void 0,(function*(){this.action=t.action,this.selectActionPageId.setValue(this.action.actionPageId),this.selectStatusId.setValue(this.action.id_status),this.categoriesList=t.categoriesList,this.statuses=t.statuses.map(t=>({id:t.id,label:t.label_status})),this.actionPages=t.actionPages,this.actionPages.map(t=>t.category).filter((t,e,i)=>i.indexOf(t)===e).forEach(t=>{this.group.push({id:t,label:this.translate.instant("lang."+t)})}),this.keywordsList=t.keywordsList,this.headerService.setHeader(this.translate.instant("lang.actionCreation"),t.action.label_action),yield this.getCustomFields(),this.loading=!1,"close_mail"===this.action.actionPageId?(this.customFieldsFormControl=new X.i({value:this.action.parameters.requiredFields,disabled:!1}),this.selectedFieldsId=[],this.action.parameters.requiredFields&&(this.selectedFieldsId=this.action.parameters.requiredFields),this.selectedFieldsId.forEach(t=>{this.availableCustomFields.forEach(e=>{e.id===t&&this.selectedFieldsValue.push(e.label)})})):"create_acknowledgement_receipt"===this.action.actionPageId&&(this.arMode=this.action.parameters.mode)}))))})}getCustomFields(){return this.action.actionPageId=this.selectActionPageId.value,this.action.actionPageGroup=this.actionPages.filter(t=>t.id===this.action.actionPageId)[0].category,"registeredMail"===this.action.actionPageGroup&&(this.action.actionCategories=["registeredMail"]),new Promise((t,e)=>{"close_mail"===this.action.actionPageId&&this.functions.empty(this.availableCustomFields)?this.http.get("../rest/customFields").pipe(Object(mt.a)(e=>(this.availableCustomFields=e.customFields.map(t=>(t.id="indexingCustomField_"+t.id,t)),t(!0))),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe():t(!0)})}getSelectedFields(){this.availableCustomFields.forEach(t=>{t.id===this.customFieldsFormControl.value&&(this.selectedValue=t)}),this.selectedFieldsId.indexOf(this.customFieldsFormControl.value)<0&&(this.selectedFieldsValue.push(this.selectedValue.label),this.selectedFieldsId.push(this.customFieldsFormControl.value)),this.customFieldsFormControl.reset()}removeSelectedFields(t){this.selectedFieldsValue.splice(t,1),this.selectedFieldsId.splice(t,1)}onSubmit(){"close_mail"===this.action.actionPageId?this.action.parameters={requiredFields:this.selectedFieldsId}:"create_acknowledgement_receipt"===this.action.actionPageId&&(this.action.parameters={mode:this.arMode}),this.creationMode?this.http.post("../rest/actions",this.action).subscribe(()=>{this.router.navigate(["/administration/actions"]),this.notify.success(this.translate.instant("lang.actionAdded"))},t=>{this.notify.error(t.error.errors)}):this.http.put("../rest/actions/"+this.action.id,this.action).subscribe(()=>{this.router.navigate(["/administration/actions"]),this.notify.success(this.translate.instant("lang.actionUpdated"))},t=>{this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(cG,!0),2&t&&n.yc(i=n.ec())&&(e.sidenavRight=i.first)},decls:13,vars:8,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],["class","alert alert-danger","role","alert",4,"ngIf"],[1,"form-horizontal",3,"ngSubmit"],["actionsFormUp","ngForm"],[1,"form-group"],[1,"col-sm-12"],["matInput","","required","","name","action_name","id","action_name","type","text","maxlength","255",3,"ngModel","title","placeholder","ngModelChange"],[2,"width","100%",3,"showLabel","label","placeholderLabel","formControlSelect","datas","optGroupList","optGroupTarget","afterSelected"],["class","form-group",4,"ngIf"],["id","keyword","name","keyword",3,"title","placeholder","ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"col-sm-12",2,"text-align","center"],["name","history","id","history","color","primary",3,"title","ngModel","checked","ngModelChange"],["id","categorieslist","name","categorieslist","multiple","","required","",3,"title","placeholder","ngModel","ngModelChange"],[3,"value","disabled",4,"ngFor","ngForOf"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],["role","alert",1,"alert","alert-danger"],[2,"width","100%",3,"showLabel","label","placeholderLabel","formControlSelect","datas","afterSelected"],[1,"checkbox-selected-list"],["selected","",3,"removable","removed",4,"ngFor","ngForOf"],["selected","",3,"removable","removed"],["matChipRemove","",1,"fa","fa-times-circle"],["id","generateARmode","name","generateARmode",3,"required","title","placeholder","ngModel","ngModelChange"],["value","auto"],["value","manual"],["value","both"],[3,"value"],[3,"value","disabled"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,lG,2,0,"div",8),n.Oc(12,gG,43,52,"mat-card",9),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,V.c,K.a,X.K,X.v,X.w,Y.c,J.b,X.d,X.F,X.p,X.u,X.x,fr,ee.a,P.s,te.a,k.b,ze.d,ze.a,S.a,ze.e,W.p],pipes:[g.d],encapsulation:2}),t})();function _G(t,e){1&t&&(n.Wb(0,"div",10),n.Rb(1,"mat-spinner",11),n.Vb())}function yG(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"input",27),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).parameter.param_value_string=e})),n.ic(2,"translate"),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.pc("placeholder",n.jc(2,2,"lang.value")),n.oc("ngModel",t.parameter.param_value_string)}}function xG(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"input",28),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).parameter.param_value_int=e})),n.ic(2,"translate"),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.pc("placeholder",n.jc(2,2,"lang.value")),n.oc("ngModel",t.parameter.param_value_int)}}function CG(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"input",29),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).parameter.param_value_date=e})),n.ic(2,"translate"),n.Vb(),n.Rb(3,"mat-datepicker-toggle",30),n.Rb(4,"mat-datepicker",31,32),n.Vb()}if(2&t){const t=n.zc(5),e=n.hc(2);n.Db(1),n.pc("placeholder",n.jc(2,4,"lang.date")),n.oc("ngModel",e.parameter.param_value_date)("matDatepicker",t),n.Db(2),n.oc("for",t)}}function OG(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",12),n.Wb(1,"form",13,14),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Wb(3,"div",15),n.Wb(4,"div",16),n.Wb(5,"mat-form-field"),n.Wb(6,"input",17),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().parameter.id=e})),n.ic(7,"translate"),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(9,"div",15),n.Wb(10,"div",16),n.Wb(11,"mat-form-field"),n.Wb(12,"input",18),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().parameter.description=e})),n.ic(13,"translate"),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(15,"div",15),n.Wb(16,"div",19),n.Wb(17,"mat-form-field"),n.Wb(18,"mat-select",20),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().type=e})),n.ic(19,"translate"),n.Wb(20,"mat-option",21),n.Qc(21),n.ic(22,"translate"),n.Vb(),n.Wb(23,"mat-option",22),n.Qc(24),n.ic(25,"translate"),n.Vb(),n.Wb(26,"mat-option",23),n.Qc(27),n.ic(28,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(29,"div",19),n.Oc(30,yG,3,4,"mat-form-field",24),n.Oc(31,xG,3,4,"mat-form-field",24),n.Oc(32,CG,6,6,"mat-form-field",24),n.Vb(),n.Vb(),n.Wb(33,"div",15),n.Wb(34,"div",25),n.Wb(35,"button",26),n.Qc(36),n.ic(37,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(2),e=n.hc();n.Db(6),n.pc("title",n.jc(7,18,"lang.id")),n.pc("placeholder",n.jc(8,20,"lang.id")),n.oc("ngModel",e.parameter.id)("disabled",!e.creationMode),n.Db(6),n.pc("title",n.jc(13,22,"lang.description")),n.pc("placeholder",n.jc(14,24,"lang.description")),n.oc("ngModel",e.parameter.description),n.Db(6),n.pc("placeholder",n.jc(19,26,"lang.type")),n.oc("ngModel",e.type)("disabled",!e.creationMode),n.Db(3),n.Sc(" ",n.jc(22,28,"lang.stringInput")," "),n.Db(3),n.Sc(" ",n.jc(25,30,"lang.integer")," "),n.Db(3),n.Sc(" ",n.jc(28,32,"lang.date")," "),n.Db(3),n.oc("ngIf","string"==e.type),n.Db(1),n.oc("ngIf","int"==e.type),n.Db(1),n.oc("ngIf","date"==e.type),n.Db(3),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(37,34,"lang.save"))}}let DG=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.route=i,this.router=n,this.notify=a,this.headerService=s,this.appService=o,this.loading=!1,this.parameter={}}ngOnInit(){this.loading=!0,this.route.params.subscribe(t=>{void 0===t.id?(this.headerService.setHeader(this.translate.instant("lang.parameterCreation")),this.creationMode=!0,this.loading=!1):(this.creationMode=!1,this.http.get("../rest/parameters/"+t.id).subscribe(t=>{this.parameter=t.parameter,this.headerService.setHeader(this.translate.instant("lang.parameterModification"),this.parameter.id),this.type="number"==typeof this.parameter.param_value_int?"int":this.parameter.param_value_date?"date":"string",this.loading=!1},t=>{this.notify.handleErrors(t)}))})}onSubmit(){"date"===this.type?(this.parameter.param_value_int=null,this.parameter.param_value_string=null):"int"===this.type?(this.parameter.param_value_date=null,this.parameter.param_value_string=null):"string"===this.type&&(this.parameter.param_value_date=null,this.parameter.param_value_int=null),!0===this.creationMode?this.http.post("../rest/parameters",this.parameter).subscribe(()=>{this.router.navigate(["administration/parameters"]),this.notify.success(this.translate.instant("lang.parameterAdded"))},t=>{this.notify.error(t.error.errors)}):!1===this.creationMode&&this.http.put("../rest/parameters/"+this.parameter.id,this.parameter).subscribe(()=>{this.router.navigate(["administration/parameters"]),this.notify.success(this.translate.instant("lang.parameterUpdated"))},t=>{this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:13,vars:8,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"form-horizontal",3,"ngSubmit"],["parameterForm","ngForm"],[1,"form-group"],[1,"col-sm-12"],["matInput","","name","id","type","text","pattern","^[\\w-]*$","required","",3,"ngModel","disabled","title","placeholder","ngModelChange"],["matInput","","name","description","id","description","type","text",3,"ngModel","title","placeholder","ngModelChange"],[1,"col-sm-6"],["name","type","required","",3,"placeholder","ngModel","disabled","ngModelChange"],["value","string"],["value","int"],["value","date"],[4,"ngIf"],[1,"col-sm-12",2,"text-align","center"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],["matInput","","name","paramValueString","type","text","required","",3,"ngModel","placeholder","ngModelChange"],["matInput","","name","paramValueInt","type","number","pattern","^[0-9]*$","required","",3,"ngModel","placeholder","ngModelChange"],["matInput","","name","paramValueDate","required","",3,"ngModel","matDatepicker","placeholder","ngModelChange"],["matSuffix","",3,"for"],["startView","month"],["picker",""]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,_G,2,0,"div",8),n.Oc(12,OG,38,36,"mat-card",9),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,V.c,K.a,X.K,X.v,X.w,Y.c,J.b,X.d,X.B,X.F,X.u,X.x,ee.a,W.p,k.b,X.A,ae.h,ae.j,Y.j,ae.f],pipes:[g.d],encapsulation:2}),t})();function wG(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",17),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().selectBg(i.url)})),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc();n.Lc("background","url("+t.url+")"),n.Ib("selected",t.url===i.stepFormGroup.controls.bodyImage.value)("disabled",i.stepFormGroup.controls.bodyImage.disabled)}}function MG(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",18),n.dc("click",(function(){return n.Dc(t),n.zc(2).click()})),n.Wb(1,"input",19,20),n.dc("change",(function(e){return n.Dc(t),n.hc().uploadTrigger(e,"bg")})),n.Vb(),n.Rb(3,"i",21),n.Vb()}}let kG=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this._formBuilder=e,this.notify=i,this.sanitizer=n,this.scanPipe=a,this.http=s,this.readonlyState=!1,this.backgroundList=[],X.I.pattern(/^[a-zA-Z0-9_\-]*$/),this.stepFormGroup=this._formBuilder.group({applicationName:["",X.I.required],loginpage_message:[""],homepage_message:[""],traffic_record_summary_sheet:[""],bodyImage:["../rest/images?image=loginPage"],logo:["../rest/images?image=logo"]}),this.backgroundList=Array.from({length:16}).map((t,e)=>({filename:e+1+".jpg",url:`assets/${e+1}.jpg`}))}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){yield this.getParameters()}))}getParameters(){return new Promise(t=>{this.http.get("../rest/parameters").pipe(Object(mt.a)(t=>{this.stepFormGroup.controls.homepage_message.setValue(t.parameters.filter(t=>"homepage_message"===t.id)[0].value),this.stepFormGroup.controls.loginpage_message.setValue(t.parameters.filter(t=>"loginpage_message"===t.id)[0].value),this.stepFormGroup.controls.traffic_record_summary_sheet.setValue(t.parameters.filter(t=>"traffic_record_summary_sheet"===t.id)[0].value)}),p(()=>this.http.get("../rest/authenticationInformations")),Object(mt.a)(t=>{this.stepFormGroup.controls.applicationName.setValue(t.applicationName),setTimeout(()=>{this.stepFormGroup.controls.applicationName.valueChanges.pipe(Object(pt.a)(1e3),Object(mt.a)(()=>this.saveParameter("applicationName"))).subscribe(),this.stepFormGroup.controls.homepage_message.valueChanges.pipe(Object(pt.a)(100),Object(mt.a)(()=>this.saveParameter("homepage_message"))).subscribe(),this.stepFormGroup.controls.loginpage_message.valueChanges.pipe(Object(pt.a)(100),Object(mt.a)(()=>this.saveParameter("loginpage_message"))).subscribe(),this.stepFormGroup.controls.traffic_record_summary_sheet.valueChanges.pipe(Object(pt.a)(100),Object(mt.a)(()=>this.saveParameter("traffic_record_summary_sheet"))).subscribe(),this.initMce()},100)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}isValidStep(){return void 0!==this.stepFormGroup&&this.stepFormGroup.valid}initMce(t=!1){let e={selector:"#loginpage_message",setup:t=>{t.on("Blur",t=>{this.stepFormGroup.controls[t.target.id].setValue(tinymce.get(t.target.id).getContent())})},base_url:"../node_modules/tinymce/",height:"200",suffix:".min",language:this.translate.instant("lang.langISO").replace("-","_"),language_url:`../node_modules/tinymce-i18n/langs/${this.translate.instant("lang.langISO").replace("-","_")}.js`,menubar:!1,statusbar:!1,readonly:t,plugins:["autolink","table","code"],external_plugins:{maarch_b64image:"../../src/frontend/plugins/tinymce/maarch_b64image/plugin.min.js"},table_toolbar:"",table_sizing_mode:"relative",table_resize_bars:!1,toolbar_sticky:!0,toolbar_drawer:"floating",table_style_by_css:!0,content_style:"table td { padding: 1px; vertical-align: top; }",forced_root_block:!1,toolbar:t?"":"undo redo | fontselect fontsizeselect | bold italic underline strikethrough forecolor | table maarch_b64image | alignleft aligncenter alignright alignjustify bullist numlist outdent indent | removeformat code"};tinymce.init(e),e.selector="#homepage_message",tinymce.init(e),e.selector="#traffic_record_summary_sheet",e.height="500",tinymce.init(e)}uploadTrigger(t,e){if(t.target.files&&t.target.files[0]){const i=this.canUploadFile(t.target.files[0],e);if(!0===i){const i=new FileReader;i.readAsDataURL(t.target.files[0]),i.onload=t=>{if("logo"===e)this.stepFormGroup.controls.logo.setValue(t.target.result),this.saveParameter("logo");else{const e=new Image;e.onload=e=>{e.target.width<1920||e.target.height<1080?this.notify.error(this.translate.instant("lang.badImageResolution",{value1:"1920x1080"})):(this.backgroundList.push({filename:t.target.result,url:t.target.result}),this.stepFormGroup.controls.bodyImage.setValue(t.target.result),this.saveParameter("bodyImage"))},e.src=t.target.result}}}else this.notify.error(i)}}canUploadFile(t,e){const i="logo"!==e?["image/jpg","image/jpeg"]:["image/svg+xml"];if("logo"===e){if(t.size>5e6)return this.translate.instant("lang.maxFileSizeExceeded",{value1:"5mo"});if(-1===i.indexOf(t.type))return this.translate.instant("lang.onlyExtensionsAllowed",{value1:i.join(", ")})}else{if(t.size>1e7)return this.translate.instant("lang.maxFileSizeExceeded",{value1:"10mo"});if(-1===i.indexOf(t.type))return this.translate.instant("lang.onlyExtensionsAllowed",{value1:i.join(", ")})}return!0}selectBg(t){this.stepFormGroup.controls.bodyImage.disabled||(this.stepFormGroup.controls.bodyImage.setValue(t),this.saveParameter("bodyImage"))}clickLogoButton(t){this.stepFormGroup.controls.logo.disabled||t.click()}saveParameter(t){let e={};"logo"===t||"bodyImage"===t?e.image=this.stepFormGroup.controls[t].value:"applicationName"===t?e.applicationName=this.stepFormGroup.controls[t].value:e={param_value_string:this.stepFormGroup.controls[t].value},this.http.put("../rest/parameters/"+t,e).subscribe(()=>{this.notify.success(this.translate.instant("lang.parameterUpdated")),"logo"===t&&setTimeout(()=>{window.location.reload()},500)},t=>{this.notify.error(t.error.errors)})}ngOnDestroy(){tinymce.remove()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(X.h),n.Qb(D.a),n.Qb(ca.b),n.Qb(Tt.o),n.Qb(v.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-parameters-customization"]],features:[n.Cb([Tt.o])],decls:44,vars:29,consts:[[2,"display","contents",3,"formGroup"],[1,"col-md-6"],["appearance","outline"],["matInput","","formControlName","applicationName"],["name","loginpage_message","id","loginpage_message","formControlName","loginpage_message",2,"padding-top","10px"],["name","homepage_message","id","homepage_message","formControlName","homepage_message",2,"padding-top","10px"],["matRipple","",2,"width","350px","background-size","100%","cursor","pointer"],["svgIcon","maarchLogoFull",1,"maarchLogo",3,"click"],["type","file","name","files[]","accept","image/svg+xml",2,"display","none",3,"change"],["uploadLogo",""],[1,"backgroundList"],[1,"backgroundItem",2,"background","url(../rest/images?image=loginPage)","background-size","cover"],[1,"backgroundItem",2,"background","url(assets/bodylogin.jpg)","background-size","cover",3,"click"],["style","opacity: 0.3;","class","backgroundItem",3,"selected","disabled","background","click",4,"ngFor","ngForOf"],["style","opacity: 0.3;display: flex;align-items: center;justify-content: center;","class","backgroundItem",3,"click",4,"ngIf"],[1,"col-md-10",2,"margin-top","20px"],["name","traffic_record_summary_sheet","id","traffic_record_summary_sheet","formControlName","traffic_record_summary_sheet",2,"padding-top","10px"],[1,"backgroundItem",2,"opacity","0.3",3,"click"],[1,"backgroundItem",2,"opacity","0.3","display","flex","align-items","center","justify-content","center",3,"click"],["type","file","name","files[]","accept","image/jpeg",2,"display","none",3,"change"],["uploadFile",""],[1,"fa","fa-plus",2,"font-size","30px","color","#666"]],template:function(t,e){if(1&t){const t=n.Xb();n.Wb(0,"form",0),n.Wb(1,"div",1),n.Wb(2,"mat-form-field",2),n.Wb(3,"mat-label"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Rb(6,"input",3),n.Vb(),n.Wb(7,"div"),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Rb(10,"textarea",4),n.Rb(11,"br"),n.Rb(12,"br"),n.Wb(13,"div"),n.Qc(14),n.ic(15,"translate"),n.Vb(),n.Rb(16,"textarea",5),n.Rb(17,"br"),n.Rb(18,"br"),n.Vb(),n.Wb(19,"div",1),n.Wb(20,"div"),n.Qc(21),n.ic(22,"translate"),n.Vb(),n.Wb(23,"div"),n.Wb(24,"mat-card",6),n.Wb(25,"mat-icon",7),n.dc("click",(function(){n.Dc(t);const i=n.zc(27);return e.clickLogoButton(i)})),n.Vb(),n.Wb(26,"input",8,9),n.dc("change",(function(t){return e.uploadTrigger(t,"logo")})),n.Vb(),n.Vb(),n.Vb(),n.Rb(28,"br"),n.Wb(29,"div"),n.Qc(30),n.ic(31,"translate"),n.Vb(),n.Wb(32,"div",10),n.Rb(33,"mat-card",11),n.Wb(34,"mat-card",12),n.dc("click",(function(){return e.selectBg("assets/bodylogin.jpg")})),n.Vb(),n.Oc(35,wG,1,6,"mat-card",13),n.Oc(36,MG,4,0,"mat-card",14),n.Vb(),n.Vb(),n.Wb(37,"div",15),n.Wb(38,"div"),n.Qc(39),n.ic(40,"translate"),n.Vb(),n.Rb(41,"textarea",16),n.Rb(42,"br"),n.Rb(43,"br"),n.Vb(),n.Vb()}2&t&&(n.oc("formGroup",e.stepFormGroup),n.Db(4),n.Rc(n.jc(5,17,"lang.applicationName")),n.Db(4),n.Sc("",n.jc(9,19,"lang.loginMsg")," : "),n.Db(6),n.Sc("",n.jc(15,21,"lang.homeMsg")," : "),n.Db(7),n.Sc("",n.jc(22,23,"lang.chooseLogo")," : "),n.Db(9),n.Sc("",n.jc(31,25,"lang.chooseLoginBg")," : "),n.Db(3),n.Ib("disabled",e.stepFormGroup.controls.bodyImage.disabled)("selected","../rest/images?image=loginPage"===e.stepFormGroup.controls.bodyImage.value),n.Db(1),n.Ib("disabled",e.stepFormGroup.controls.bodyImage.disabled)("selected","assets/bodylogin.jpg"===e.stepFormGroup.controls.bodyImage.value),n.Db(1),n.oc("ngForOf",e.backgroundList),n.Db(1),n.oc("ngIf",!e.stepFormGroup.controls.bodyImage.disabled),n.Db(3),n.Sc("",n.jc(40,27,"lang.trafficRecordSummarySheetParameters")," : "))},directives:[X.K,X.v,X.m,Y.c,Y.g,J.b,X.d,X.u,X.k,K.a,W.u,S.a,P.s,P.t],pipes:[g.d],styles:[".backgroundList[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(5,1fr);grid-gap:10px}.selected[_ngcontent-%COMP%]{transition:all .3s;opacity:1!important;border:10px solid #f99830!important}.backgroundItem[_ngcontent-%COMP%]{border:0 solid #f99830;opacity:.5;transition:all .3s;cursor:pointer;height:120px;background-size:cover!important}.disabled[_ngcontent-%COMP%]{cursor:default!important}.backgroundItem[_ngcontent-%COMP%]:not(.disabled):hover{transition:all .3s;opacity:1!important}.maarchLogo[_ngcontent-%COMP%]{width:100%;height:50%}"]}),t})();function SG(t,e){if(1&t&&(n.Wb(0,"mat-option",5),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",n.jc(2,2,"lang."+t)," ")}}function IG(t,e){if(1&t&&(n.Wb(0,"mat-option",5),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",n.jc(2,2,"lang."+t)," ")}}let PG=(()=>{class t{constructor(t,e,i,n){this.translate=t,this.http=e,this._formBuilder=i,this.notify=n,this.finalActionValues=["restrictAccess","transfer","copy","delete"],this.documentFinalAction=this._formBuilder.group({bindingDocumentFinalAction:[""],nonBindingDocumentFinalAction:[""]})}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){yield this.getFinalAction()}))}getFinalAction(){return new Promise(t=>{this.http.get("../rest/parameters").pipe(Object(mt.a)(e=>{const i=e.parameters.filter(t=>"bindingDocumentFinalAction"===t.id)[0].param_value_string,n=e.parameters.filter(t=>"nonBindingDocumentFinalAction"===t.id)[0].param_value_string;this.documentFinalAction.controls.bindingDocumentFinalAction.setValue(i),this.documentFinalAction.controls.nonBindingDocumentFinalAction.setValue(n),setTimeout(()=>{this.documentFinalAction.controls.bindingDocumentFinalAction.valueChanges.pipe(Object(pt.a)(100),Object(mt.a)(()=>this.saveParameter("bindingDocumentFinalAction"))).subscribe(),this.documentFinalAction.controls.nonBindingDocumentFinalAction.valueChanges.pipe(Object(pt.a)(100),Object(mt.a)(()=>this.saveParameter("nonBindingDocumentFinalAction"))).subscribe()}),t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}saveParameter(t){let e={};e={param_value_string:this.documentFinalAction.controls[t].value},this.http.put("../rest/parameters/"+t,e).subscribe(()=>{this.notify.success(this.translate.instant("lang.parameterUpdated"))},t=>{this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(X.h),n.Qb(D.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-life-cyle"]],decls:16,vars:15,consts:[[2,"display","contents",3,"formGroup"],["appearance","outline"],["formControlName","bindingDocumentFinalAction","id","bindingDocumentFinalAction","name","bindingDocumentFinalAction",3,"title"],[3,"value",4,"ngFor","ngForOf"],["formControlName","nonBindingDocumentFinalAction","id","nonBindingDocumentFinalAction","name","nonBindingDocumentFinalAction",3,"title"],[3,"value"]],template:function(t,e){1&t&&(n.Wb(0,"form",0),n.Wb(1,"mat-form-field",1),n.Wb(2,"mat-label"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"mat-select",2),n.ic(6,"translate"),n.Oc(7,SG,3,4,"mat-option",3),n.Vb(),n.Vb(),n.Rb(8,"br"),n.Wb(9,"mat-form-field",1),n.Wb(10,"mat-label"),n.Qc(11),n.ic(12,"translate"),n.Vb(),n.Wb(13,"mat-select",4),n.ic(14,"translate"),n.Oc(15,IG,3,4,"mat-option",3),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.oc("formGroup",e.documentFinalAction),n.Db(3),n.Rc(n.jc(4,7,"lang.bindingDocumentFinalAction")),n.Db(2),n.pc("title",n.jc(6,9,"lang.bindingDocumentFinalAction")),n.Db(2),n.oc("ngForOf",e.finalActionValues),n.Db(4),n.Rc(n.jc(12,11,"lang.nonBindingDocumentFinalAction")),n.Db(2),n.pc("title",n.jc(14,13,"lang.nonBindingDocumentFinalAction")),n.Db(2),n.oc("ngForOf",e.finalActionValues))},directives:[X.K,X.v,X.m,Y.c,Y.g,ee.a,X.u,X.k,P.s,W.p],pipes:[g.d],encapsulation:2}),t})();const VG=["adminMenuTemplate"];function RG(t,e){1&t&&(n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",11),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",12),n.Rb(5,"mat-icon",13),n.Wb(6,"p",14),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,2,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,4,"lang.add")," "))}function jG(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Vb())}function AG(t,e){1&t&&(n.Wb(0,"mat-header-cell",40),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.id")," "))}function WG(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.id," ")}}function TG(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",40),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Sc(" ",n.jc(2,3,"lang.description")," ")}}function EG(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",t.description," ")}}function FG(t,e){1&t&&(n.Wb(0,"mat-header-cell",40),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.value")," "))}function LG(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.value," ")}}function QG(t,e){1&t&&n.Rb(0,"mat-header-cell")}function NG(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",41),n.Wb(1,"button",42),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.deleteParameter(a.id)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",43),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.pc("matTooltip",n.jc(2,1,"lang.delete")))}function zG(t,e){1&t&&n.Rb(0,"mat-header-row")}function BG(t,e){1&t&&(n.Rb(0,"mat-row",44),n.ic(1,"translate")),2&t&&(n.qc("routerLink","/administration/parameters/",e.$implicit.id,""),n.pc("matTooltip",n.jc(1,2,"lang.view")))}function UG(t,e){1&t&&n.Rb(0,"app-parameters-customization")}function $G(t,e){1&t&&n.Rb(0,"app-life-cyle")}function HG(t,e){if(1&t&&(n.Wb(0,"mat-card",17),n.Wb(1,"mat-tab-group"),n.Wb(2,"mat-tab",18),n.ic(3,"translate"),n.Wb(4,"div",19),n.Wb(5,"div",20),n.Wb(6,"mat-form-field"),n.Rb(7,"input",21),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Wb(9,"div",20),n.Rb(10,"mat-paginator",22,23),n.Vb(),n.Vb(),n.Wb(12,"mat-table",24,25),n.Ub(14,26),n.Oc(15,AG,3,3,"mat-header-cell",27),n.Oc(16,WG,2,1,"mat-cell",28),n.Tb(),n.Ub(17,29),n.Oc(18,TG,3,5,"mat-header-cell",30),n.Oc(19,EG,2,3,"mat-cell",31),n.Tb(),n.Ub(20,32),n.Oc(21,FG,3,3,"mat-header-cell",27),n.Oc(22,LG,2,1,"mat-cell",28),n.Tb(),n.Ub(23,33),n.Oc(24,QG,1,0,"mat-header-cell",34),n.Oc(25,NG,4,3,"mat-cell",35),n.Tb(),n.Oc(26,zG,1,0,"mat-header-row",36),n.Oc(27,BG,2,4,"mat-row",37),n.Vb(),n.Wb(28,"div",38),n.Qc(29),n.ic(30,"translate"),n.Vb(),n.Vb(),n.Wb(31,"mat-tab",18),n.ic(32,"translate"),n.Oc(33,UG,1,0,"ng-template",39),n.Vb(),n.Wb(34,"mat-tab",18),n.ic(35,"translate"),n.Oc(36,$G,1,0,"ng-template",39),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.oc("label",n.jc(3,13,"lang.technicalParameters")),n.Db(5),n.pc("placeholder",n.jc(8,15,"lang.filterBy")),n.oc("formControl",t.adminService.getFilterField()),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.adminService.getDataSource()),n.Db(14),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns),n.Db(2),n.Tc(" ",t.parameters.length," ",n.jc(30,17,"lang.parameters"),""),n.Db(2),n.oc("label",n.jc(32,19,"lang.customization")),n.Db(3),n.oc("label",n.jc(35,21,"lang.lifeCycle"))}}let GG=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.functions=s,this.adminService=o,this.viewContainerRef=r,this.parameters={},this.loading=!1,this.displayedColumns=["id","description","value","actions"],this.filterColumns=["id","description","value"]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.parameters")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,this.http.get("../rest/parameters").subscribe(t=>{this.parameters=t.parameters.filter(t=>-1===["homepage_message","loginpage_message","traffic_record_summary_sheet","bindingDocumentFinalAction","nonBindingDocumentFinalAction"].indexOf(t.id)),this.loading=!1,setTimeout(()=>{this.adminService.setDataSource("admin_parameters",this.parameters,this.sort,this.paginator,this.filterColumns)},0)})}deleteParameter(t){confirm(this.translate.instant("lang.deleteMsg"))&&this.http.delete("../rest/parameters/"+t).subscribe(t=>{this.parameters=t.parameters.filter(t=>-1===["homepage_message","loginpage_message","traffic_record_summary_sheet","bindingDocumentFinalAction","nonBindingDocumentFinalAction"].indexOf(t.id)),this.adminService.setDataSource("admin_parameters",this.parameters,this.sort,this.paginator,this.filterColumns),this.notify.success(this.translate.instant("lang.parameterDeleted"))},t=>{this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a),n.Qb(OL),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(VG,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:15,vars:8,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["mat-subheader",""],["mat-list-item","","routerLink","/administration/parameters/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[3,"label"],[1,"row"],[1,"col-md-6","col-xs-6"],["matInput","",3,"formControl","placeholder"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSort","","matSortDisableClear","",3,"dataSource"],["table",""],["matColumnDef","id"],["mat-sort-header","",4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","description"],["mat-sort-header","",3,"hide-for-mobile",4,"matHeaderCellDef"],[3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","value"],["matColumnDef","actions"],[4,"matHeaderCellDef"],["style","justify-content: flex-end;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"routerLink","matTooltip",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["matTabContent",""],["mat-sort-header",""],[2,"justify-content","flex-end"],["mat-icon-button","","color","warn",3,"matTooltip","click"],["aria-hidden","true",1,"fa","fa-trash-alt","fa-2x"],[2,"cursor","pointer",3,"routerLink","matTooltip"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,RG,9,6,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,jG,2,0,"div",9),n.Oc(14,HG,37,23,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,R.h,R.g,R.d,o.f,S.a,R.c,W.l,V.c,K.a,Te.c,Te.a,Y.c,J.b,X.d,X.u,X.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,Te.b,vt.h,Fe.b,vt.a,k.b,A.b,vt.j,vt.m,o.d,kG,PG],pipes:[g.d],encapsulation:2}),t})();const XG=["snav2"],qG=["adminMenuTemplate"];function KG(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",16),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",17),n.Rb(5,"mat-icon",18),n.Wb(6,"p",19),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Wb(9,"a",20),n.dc("click",(function(){return n.Dc(t),n.hc(),n.zc(16).toggle()})),n.Rb(10,"mat-icon",21),n.Wb(11,"p",19),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Vb()}2&t&&(n.Db(2),n.Rc(n.jc(3,3,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,5,"lang.add")," "),n.Db(5),n.Sc(" ",n.jc(13,7,"lang.prioritiesOrder")," "))}function YG(t,e){1&t&&(n.Wb(0,"div",22),n.Rb(1,"mat-spinner",23),n.Vb())}function JG(t,e){1&t&&(n.Wb(0,"mat-header-cell",45),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.technicalId")," "))}function ZG(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",46),n.Wb(1,"span",47),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.Qc(2),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(2),n.Sc(" ",t.id," ")}}function tX(t,e){1&t&&(n.Wb(0,"mat-header-cell",45),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.label")," "))}function eX(t,e){if(1&t&&(n.Wb(0,"mat-cell",46),n.Rb(1,"input",48),n.Qc(2),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.pc("value",t.color),n.Db(1),n.Sc(" ",t.label," ")}}function iX(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",45),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Sc(" ",n.jc(2,3,"lang.processDelayDay"),"")}}function nX(t,e){if(1&t&&(n.Wb(0,"mat-cell",46),n.Wb(1,"span"),n.Qc(2),n.Vb(),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(2),n.Sc(" ",t.delays," ")}}function aX(t,e){1&t&&n.Rb(0,"mat-header-cell")}function sX(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",49),n.Wb(1,"button",50),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.deletePriority(a.id)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",51),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.pc("matTooltip",n.jc(2,1,"lang.delete")))}function oX(t,e){1&t&&n.Rb(0,"mat-header-row")}function rX(t,e){1&t&&(n.Rb(0,"mat-row",52),n.ic(1,"translate")),2&t&&(n.qc("routerLink","/administration/priorities/",e.$implicit.id,""),n.pc("matTooltip",n.jc(1,2,"lang.view")))}function cX(t,e){if(1&t&&(n.Wb(0,"mat-card",24),n.Wb(1,"div",25),n.Wb(2,"div",26),n.Wb(3,"mat-form-field"),n.Rb(4,"input",27),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Wb(6,"div",26),n.Rb(7,"mat-paginator",28,29),n.Vb(),n.Vb(),n.Wb(9,"mat-table",30,31),n.Ub(11,32),n.Oc(12,JG,3,3,"mat-header-cell",33),n.Oc(13,ZG,3,1,"mat-cell",34),n.Tb(),n.Ub(14,35),n.Oc(15,tX,3,3,"mat-header-cell",33),n.Oc(16,eX,3,2,"mat-cell",34),n.Tb(),n.Ub(17,36),n.Oc(18,iX,3,5,"mat-header-cell",37),n.Oc(19,nX,3,3,"mat-cell",38),n.Tb(),n.Ub(20,39),n.Oc(21,aX,1,0,"mat-header-cell",40),n.Oc(22,sX,4,3,"mat-cell",41),n.Tb(),n.Oc(23,oX,1,0,"mat-header-row",42),n.Oc(24,rX,2,4,"mat-row",43),n.Vb(),n.Wb(25,"div",44),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.pc("placeholder",n.jc(5,10,"lang.filterBy")),n.oc("formControl",t.adminService.getFilterField()),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.adminService.getDataSource()),n.Db(14),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns),n.Db(2),n.Tc(" ",t.priorities.length," ",n.jc(27,12,"lang.priorities"),"")}}function lX(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item",53),n.dc("onDropSuccess",(function(){return n.Dc(t),n.hc().updatePrioritiesOrder()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",54),n.Wb(3,"p",19),n.Qc(4),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=e.index;n.pc("title",n.jc(1,4,"lang.move")),n.oc("sortableIndex",i),n.Db(4),n.Tc("",i+1," - ",t.label,"")}}const dX=function(){return["boxers-zone"]};let hX=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.functions=s,this.adminService=o,this.viewContainerRef=r,this.loading=!1,this.priorities=[],this.prioritiesOrder=[],this.displayedColumns=["id","label","delays","actions"],this.filterColumns=["id","label","delays"]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.priorities")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,this.http.get("../rest/priorities").subscribe(t=>{this.priorities=t.priorities,this.loading=!1,this.http.get("../rest/sortedPriorities").subscribe(t=>{this.prioritiesOrder=t.priorities},t=>{this.notify.handleErrors(t)}),setTimeout(()=>{this.adminService.setDataSource("admin_priorities",this.priorities,this.sort,this.paginator,this.filterColumns)},0)},t=>{this.notify.handleErrors(t)})}deletePriority(t){confirm(this.translate.instant("lang.deleteMsg"))&&this.http.delete("../rest/priorities/"+t).subscribe(t=>{this.priorities=t.priorities,this.adminService.setDataSource("admin_priorities",this.priorities,this.sort,this.paginator,this.filterColumns),this.notify.success(this.translate.instant("lang.priorityDeleted"))},t=>{this.notify.error(t.error.errors)})}updatePrioritiesOrder(){this.http.put("../rest/sortedPriorities",this.prioritiesOrder).subscribe(t=>{this.prioritiesOrder=t.priorities,this.notify.success(this.translate.instant("lang.modificationSaved"))},t=>{this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a),n.Qb(OL),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(XG,!0),n.Kc(qG,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:23,vars:18,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["fixedTopGap","56","position","end",3,"mode","fixedInViewport","opened"],["snav2",""],[2,"font-size","15px","padding","5px"],["dnd-sortable-container","",3,"dropZones","sortableData"],["disableRipple","true","dnd-sortable","",3,"title","sortableIndex","onDropSuccess",4,"ngFor","ngForOf"],["mat-subheader",""],["mat-list-item","","routerLink","/administration/priorities/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],["mat-list-item","",3,"click"],["color","primary","mat-list-icon","",1,"fa","fa-list-ol"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"row"],[1,"col-md-6","col-xs-6"],["matInput","",3,"formControl","placeholder"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSort","","matSortDisableClear","",3,"dataSource"],["table",""],["matColumnDef","id"],["mat-sort-header","","style","flex:2;",4,"matHeaderCellDef"],["style","flex:2;",4,"matCellDef"],["matColumnDef","label"],["matColumnDef","delays"],["mat-sort-header","","style","flex:2;",3,"hide-for-mobile",4,"matHeaderCellDef"],["style","flex:2;",3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","actions"],[4,"matHeaderCellDef"],["style","justify-content: flex-end;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"routerLink","matTooltip",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["mat-sort-header","",2,"flex","2"],[2,"flex","2"],[3,"click"],["type","color","disabled","",2,"background","none","border","none","width","45px",3,"value"],[2,"justify-content","flex-end"],["mat-icon-button","","color","warn",3,"matTooltip","click"],["aria-hidden","true",1,"fa","fa-trash-alt","fa-2x"],[2,"cursor","pointer",3,"routerLink","matTooltip"],["disableRipple","true","dnd-sortable","",3,"title","sortableIndex","onDropSuccess"],["color","primary","mat-list-icon","",1,"fa","fa-inbox"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,KG,14,9,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,YG,2,0,"div",9),n.Oc(14,cX,28,14,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Wb(15,"mat-sidenav",11,12),n.Wb(17,"p",13),n.Qc(18),n.ic(19,"translate"),n.Vb(),n.Wb(20,"mat-list"),n.Wb(21,"span",14),n.Oc(22,lX,5,6,"mat-list-item",15),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",(e.appService.getViewMode(),!1)),n.Db(3),n.Sc(" ",n.jc(19,15,"lang.prioritiesHelpDesc")," "),n.Db(3),n.oc("dropZones",n.uc(17,dX))("sortableData",e.prioritiesOrder),n.Db(1),n.oc("ngForOf",e.prioritiesOrder))},directives:[I.e,I.f,Ot,We,P.t,I.d,R.a,Ee.f,P.s,R.h,R.g,R.d,o.f,S.a,R.c,W.l,V.c,K.a,Y.c,J.b,X.d,X.u,X.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,vt.h,Fe.b,vt.a,k.b,A.b,vt.j,vt.m,o.d,Ee.e],pipes:[g.d],encapsulation:2}),t})();function uX(t,e){1&t&&(n.Wb(0,"div",10),n.Rb(1,"mat-spinner",11),n.Vb())}function pX(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",12),n.Wb(1,"form",13,14),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Wb(3,"div",15),n.Wb(4,"div",16),n.Wb(5,"div",17),n.Wb(6,"mat-form-field"),n.Wb(7,"input",18),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().priority.color=e})),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(9,"div",19),n.Wb(10,"mat-form-field"),n.Wb(11,"input",20),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().priority.label=e})),n.ic(12,"translate"),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(14,"div",15),n.Wb(15,"div",21),n.Wb(16,"mat-form-field"),n.Wb(17,"input",22),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().priority.delays=e})),n.ic(18,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(19,"div",15),n.Wb(20,"div",23),n.Wb(21,"button",24),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(2),e=n.hc();n.Db(7),n.pc("matTooltip",n.jc(8,9,"lang.chooseColor")),n.oc("ngModel",e.priority.color),n.Db(4),n.pc("title",n.jc(12,11,"lang.label")),n.pc("placeholder",n.jc(13,13,"lang.label")),n.oc("ngModel",e.priority.label),n.Db(6),n.pc("placeholder",n.jc(18,15,"lang.processDelayDay")),n.oc("ngModel",e.priority.delays),n.Db(4),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(23,17,"lang.save"))}}let bX=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.route=i,this.router=n,this.notify=a,this.headerService=s,this.appService=o,this.loading=!1,this.priority={color:"#135f7f",delays:"0"}}ngOnInit(){this.loading=!0,this.route.params.subscribe(t=>{void 0===t.id?(this.headerService.setHeader(this.translate.instant("lang.priorityCreation")),this.creationMode=!0,this.loading=!1):(this.creationMode=!1,this.id=t.id,this.http.get("../rest/priorities/"+this.id).subscribe(t=>{this.priority=t.priority,this.headerService.setHeader(this.translate.instant("lang.priorityModification"),this.priority.label),this.loading=!1},t=>{this.notify.handleErrors(t)}))})}onSubmit(){this.creationMode?this.http.post("../rest/priorities",this.priority).subscribe(()=>{this.notify.success(this.translate.instant("lang.priorityAdded")),this.router.navigate(["/administration/priorities"])},t=>{this.notify.error(t.error.errors)}):this.http.put("../rest/priorities/"+this.id,this.priority).subscribe(()=>{this.notify.success(this.translate.instant("lang.priorityUpdated")),this.router.navigate(["/administration/priorities"])},t=>{this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:13,vars:8,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"form-horizontal",3,"ngSubmit"],["priorityForm","ngForm"],[1,"form-group"],[1,"row",2,"margin","0px"],[1,"col-md-1","col-xs-2"],["matInput","","type","color","name","color","required","",3,"matTooltip","ngModel","ngModelChange"],[1,"col-md-11","col-xs-10"],["matInput","","type","text","name","label","maxlength","128","required","",3,"title","placeholder","ngModel","ngModelChange"],[1,"col-md-4"],["matInput","","type","number","name","delays","required","","pattern","^\\d+$",3,"placeholder","ngModel","ngModelChange"],[1,"col-md-12","text-center",2,"padding","10px"],["mat-raised-button","","color","primary",3,"disabled"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,uX,2,0,"div",8),n.Oc(12,pX,24,19,"mat-card",9),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,V.c,K.a,X.K,X.v,X.w,Y.c,J.b,X.d,X.F,A.b,X.u,X.x,X.p,X.A,X.B,k.b],pipes:[g.d],encapsulation:2}),t})();const fX=["snav2"],mX=["adminMenuTemplate"];function gX(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",14),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",35),n.Rb(5,"mat-icon",36),n.Wb(6,"p",37),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Wb(9,"a",38),n.dc("click",(function(){n.Dc(t);const e=n.hc(),i=n.zc(16);return e.loadCron(),i.toggle()}))("next",(function(){n.Dc(t);const e=n.hc();return n.zc(16).open(),e.paramCron()})),n.Rb(10,"mat-icon",39),n.Wb(11,"p",37),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Vb()}2&t&&(n.Db(2),n.Rc(n.jc(3,3,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,5,"lang.add")," "),n.Db(5),n.Sc(" ",n.jc(13,7,"lang.toSchedule")," "))}function vX(t,e){1&t&&(n.Wb(0,"div",40),n.Rb(1,"mat-spinner",41),n.Vb())}function _X(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",64),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Rc(n.jc(2,3,"lang.id"))}}function yX(t,e){if(1&t&&(n.Wb(0,"mat-cell",65),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",t.notification_id," ")}}function xX(t,e){1&t&&(n.Wb(0,"mat-header-cell",66),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.description")," "))}function CX(t,e){if(1&t&&(n.Wb(0,"mat-cell",67),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.description," ")}}function OX(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",64),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Rc(n.jc(2,3,"lang.status"))}}function DX(t,e){1&t&&(n.Wb(0,"span",71),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.active")))}function wX(t,e){1&t&&(n.Wb(0,"span",72),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.suspended")))}function MX(t,e){if(1&t&&(n.Wb(0,"mat-cell",68),n.ic(1,"translate"),n.Oc(2,DX,3,3,"span",69),n.Oc(3,wX,3,3,"span",70),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.pc("matTooltip",n.jc(1,5,"lang.view")),n.Db(2),n.oc("ngIf","Y"==t.is_enabled),n.Db(1),n.oc("ngIf","N"==t.is_enabled)}}function kX(t,e){1&t&&n.Rb(0,"mat-header-cell",65)}function SX(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",73),n.Wb(1,"button",74),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.deleteNotification(a)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",75),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.pc("matTooltip",n.jc(2,1,"lang.delete")))}function IX(t,e){1&t&&n.Rb(0,"mat-header-row")}function PX(t,e){if(1&t&&(n.Rb(0,"mat-row",76),n.ic(1,"translate")),2&t){const t=e.$implicit;n.qc("routerLink","/administration/notifications/",t.notification_sid,""),n.pc("matTooltip",n.jc(1,3,"lang.view")),n.oc("joyrideStep",t.notification_id+"_Tour")}}function VX(t,e){if(1&t&&(n.Wb(0,"mat-card",42),n.Wb(1,"div",43),n.Wb(2,"div",44),n.Wb(3,"mat-form-field"),n.Rb(4,"input",45),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Wb(6,"div",44),n.Rb(7,"mat-paginator",46,47),n.Vb(),n.Vb(),n.Wb(9,"mat-table",48,49),n.Ub(11,50),n.Oc(12,_X,3,5,"mat-header-cell",51),n.Oc(13,yX,2,3,"mat-cell",52),n.Tb(),n.Ub(14,53),n.Oc(15,xX,3,3,"mat-header-cell",54),n.Oc(16,CX,2,1,"mat-cell",55),n.Tb(),n.Ub(17,56),n.Oc(18,OX,3,5,"mat-header-cell",51),n.Oc(19,MX,4,7,"mat-cell",57),n.Tb(),n.Ub(20,58),n.Oc(21,kX,1,0,"mat-header-cell",59),n.Oc(22,SX,4,3,"mat-cell",60),n.Tb(),n.Oc(23,IX,1,0,"mat-header-row",61),n.Oc(24,PX,2,5,"mat-row",62),n.Vb(),n.Wb(25,"div",63),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.pc("placeholder",n.jc(5,10,"lang.filterBy")),n.oc("formControl",t.adminService.getFilterField()),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.adminService.getDataSource()),n.Db(14),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns),n.Db(2),n.Tc(" ",t.notifications.length," ",n.jc(27,12,"lang.notifications"),"")}}function RX(t,e){if(1&t&&(n.Wb(0,"mat-option",77),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.value),n.Db(1),n.Sc(" ",t.label," ")}}function jX(t,e){if(1&t&&(n.Wb(0,"mat-option",77),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.value),n.Db(1),n.Sc(" ",t.label," ")}}function AX(t,e){if(1&t&&(n.Wb(0,"mat-option",77),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.value),n.Db(1),n.Sc(" ",t.label," ")}}function WX(t,e){if(1&t&&(n.Wb(0,"mat-option",77),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.value),n.Db(1),n.Sc(" ",t.label," ")}}function TX(t,e){if(1&t&&(n.Wb(0,"mat-option",77),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.value),n.Db(1),n.Sc(" ",t.label," ")}}function EX(t,e){if(1&t&&(n.Wb(0,"mat-option",77),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.path),n.Db(1),n.Sc(" ",t.description," ")}}function FX(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",79),n.dc("removed",(function(){n.Dc(t);const e=n.hc().index;return n.hc().deleteCron(e)})),n.Qc(1),n.Rb(2,"span",80),n.Wb(3,"b"),n.Qc(4),n.Vb(),n.Rb(5,"mat-icon",81),n.ic(6,"translate"),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(1),n.Sc(" ",t.description," "),n.Db(3),n.Wc("",t.m,"\xa0\xa0",t.h,"\xa0\xa0",t.dom,"\xa0\xa0",t.mon,"\xa0\xa0",t.dow,""),n.Db(1),n.pc("matTooltip",n.jc(6,7,"lang.delete"))}}function LX(t,e){if(1&t&&(n.Wb(0,"span"),n.Oc(1,FX,7,9,"mat-chip",78),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf","normal"==t.state)}}let QX=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.functions=s,this.adminService=o,this.viewContainerRef=r,this.notifications=[],this.loading=!1,this.months=[],this.dom=[],this.dow=[],this.newCron={m:"",h:"",dom:"",mon:"",cmd:"",state:"normal"},this.displayedColumns=["notification_id","description","is_enabled","notifications"],this.filterColumns=["notification_id","description"]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.notifications")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,this.http.get("../rest/notifications").subscribe(t=>{this.notifications=t.notifications,this.loading=!1,setTimeout(()=>{this.adminService.setDataSource("admin_notif",this.notifications,this.sort,this.paginator,this.filterColumns)},0)},t=>{this.notify.error(t.error.errors)})}deleteNotification(t){confirm(this.translate.instant("lang.deleteMsg"))&&this.http.delete("../rest/notifications/"+t.notification_sid).subscribe(t=>{this.notifications=t.notifications,setTimeout(()=>{this.adminService.setDataSource("admin_notif",this.notifications,this.sort,this.paginator,this.filterColumns)},0),this.sidenavRight.close(),this.notify.success(this.translate.instant("lang.notificationDeleted"))},t=>{this.notify.error(t.error.errors)})}loadCron(){return new Promise(t=>{this.hours=[{label:this.translate.instant("lang.eachHour"),value:"*"}],this.minutes=[{label:this.translate.instant("lang.eachMinute"),value:"*"}],this.months=[{label:this.translate.instant("lang.eachMonth"),value:"*"},{label:this.translate.instant("lang.january"),value:"1"},{label:this.translate.instant("lang.february"),value:"2"},{label:this.translate.instant("lang.march"),value:"3"},{label:this.translate.instant("lang.april"),value:"4"},{label:this.translate.instant("lang.may"),value:"5"},{label:this.translate.instant("lang.june"),value:"6"},{label:this.translate.instant("lang.july"),value:"7"},{label:this.translate.instant("lang.august"),value:"8"},{label:this.translate.instant("lang.september"),value:"9"},{label:this.translate.instant("lang.october"),value:"10"},{label:this.translate.instant("lang.november"),value:"11"},{label:this.translate.instant("lang.december"),value:"12"}],this.dom=[{label:this.translate.instant("lang.notUsed"),value:"*"}],this.dow=[{label:this.translate.instant("lang.eachDay"),value:"*"},{label:this.translate.instant("lang.monday"),value:"1"},{label:this.translate.instant("lang.tuesday"),value:"2"},{label:this.translate.instant("lang.wednesday"),value:"3"},{label:this.translate.instant("lang.thursday"),value:"4"},{label:this.translate.instant("lang.friday"),value:"5"},{label:this.translate.instant("lang.saturday"),value:"6"},{label:this.translate.instant("lang.sunday"),value:"7"}],this.newCron={m:"",h:"",dom:"",mon:"",cmd:"",state:"normal"};for(let e=0;e<=23;e++)this.hours.push({label:e,value:String(e)});for(let e=0;e<=59;e++)this.minutes.push({label:e,value:String(e)});for(let e=1;e<=31;e++)this.dom.push({label:e,value:String(e)});this.http.get("../rest/notifications/schedule").pipe(Object(mt.a)(t=>{this.crontab=t.crontab,this.authorizedNotification=t.authorizedNotification}),Object(Xt.a)(()=>t(!0)),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}saveCron(){const t=this.newCron.cmd.split("/");this.newCron.description=t[t.length-1],this.crontab.push(this.newCron),this.http.post("../rest/notifications/schedule",this.crontab).subscribe(t=>{this.newCron={m:"",h:"",dom:"",mon:"",cmd:"",description:"",state:"normal"},this.notify.success(this.translate.instant("lang.notificationScheduleUpdated"))},t=>{this.crontab.pop(),this.notify.error(t.error.errors)})}deleteCron(t){this.crontab[t].state="deleted",this.http.post("../rest/notifications/schedule",this.crontab).subscribe(e=>{this.crontab.splice(t,1),this.notify.success(this.translate.instant("lang.notificationScheduleUpdated"))},t=>{this.notify.error(t.error.errors)})}onNext(){return this.sidenavRight.open(),!1}paramCron(){return Object(r.a)(this,void 0,void 0,(function*(){yield this.loadCron();const t=this.authorizedNotification.filter(t=>t.path.indexOf("_BASKETS.sh")>-1)[0];this.newCron={m:"0",h:"8",dom:"*",dow:"*",mon:"*",cmd:t.path,description:t.description,state:"normal"}}))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a),n.Qb(OL),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(fX,!0),n.Kc(mX,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:76,vars:73,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["fixedTopGap","56","position","end",3,"mode","fixedInViewport","opened","next"],["snav2",""],["joyrideStep","notifTour3",3,"next"],["mat-subheader",""],[1,"form-horizontal",2,"overflow","hidden"],["notifForm","ngForm"],[1,"form-group",2,"padding-left","15px","padding-right","15px"],[1,"col-sm-4"],["name","hour","id","hour","required","",3,"title","placeholder","ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["name","minute","id","minute","required","",3,"title","placeholder","ngModel","ngModelChange"],["name","day","id","day","required","",3,"title","placeholder","ngModel","ngModelChange"],[1,"col-sm-6"],["name","month","id","month","required","",3,"title","placeholder","ngModel","ngModelChange"],["name","dayM","id","dayM","required","",3,"title","placeholder","ngModel","ngModelChange"],[1,"col-sm-12"],["name","script","id","script","required","",3,"title","placeholder","ngModel","ngModelChange"],[1,"col-sm-12","text-center",2,"padding","10px"],["mat-raised-button","","color","primary",3,"disabled","click"],["role","alert",1,"alert","alert-info",2,"margin","15px"],["joyrideStep","notifTour4"],[1,"mat-chip-list-stacked"],["chipList",""],[4,"ngFor","ngForOf"],["mat-list-item","","routerLink","/administration/notifications/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],["mat-list-item","","joyrideStep","notifTour",3,"click","next"],["color","primary","mat-list-icon","",1,"fa","fa-clock"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"row"],[1,"col-md-6","col-xs-6"],["matInput","",3,"formControl","placeholder"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSort","","matSortDisableClear","",3,"dataSource"],["table",""],["matColumnDef","notification_id"],["mat-sort-header","","style","flex:1;",3,"hide-for-mobile",4,"matHeaderCellDef"],["style","flex:1;",3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","description"],["mat-sort-header","","style","flex:2;",4,"matHeaderCellDef"],["style","flex:2;",4,"matCellDef"],["matColumnDef","is_enabled"],["style","flex:1;",3,"matTooltip","hide-for-mobile",4,"matCellDef"],["matColumnDef","notifications"],["style","flex:1;",4,"matHeaderCellDef"],["style","justify-content: flex-end;flex:1;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"routerLink","matTooltip","joyrideStep",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["mat-sort-header","",2,"flex","1"],[2,"flex","1"],["mat-sort-header","",2,"flex","2"],[2,"flex","2"],[2,"flex","1",3,"matTooltip"],["color","primary","class","label",4,"ngIf"],["color","warn","class","label",4,"ngIf"],["color","primary",1,"label"],["color","warn",1,"label"],[2,"justify-content","flex-end","flex","1"],["mat-icon-button","","color","warn",3,"matTooltip","click"],["aria-hidden","true",1,"fa","fa-trash-alt","fa-2x"],[2,"cursor","pointer",3,"routerLink","matTooltip","joyrideStep"],[3,"value"],["color","primary","style","margin:5px;border-radius:0px;display:flex;","selectable","false","removable","true",3,"removed",4,"ngIf"],["color","primary","selectable","false","removable","true",2,"margin","5px","border-radius","0px","display","flex",3,"removed"],[2,"flex","1 1 auto"],["matChipRemove","","color","warn",1,"fa","fa-times",3,"matTooltip"]],template:function(t,e){if(1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,gX,14,9,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,vX,2,0,"div",9),n.Oc(14,VX,28,14,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Wb(15,"mat-sidenav",11,12),n.dc("next",(function(){return e.paramCron()})),n.Wb(17,"mat-list",13),n.dc("next",(function(){return e.saveCron()})),n.Wb(18,"h3",14),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"form",15,16),n.Wb(23,"div",17),n.Wb(24,"div",18),n.Wb(25,"mat-form-field"),n.Wb(26,"mat-select",19),n.dc("ngModelChange",(function(t){return e.newCron.h=t})),n.ic(27,"translate"),n.ic(28,"translate"),n.Oc(29,RX,2,2,"mat-option",20),n.Vb(),n.Vb(),n.Vb(),n.Wb(30,"div",18),n.Wb(31,"mat-form-field"),n.Wb(32,"mat-select",21),n.dc("ngModelChange",(function(t){return e.newCron.m=t})),n.ic(33,"translate"),n.ic(34,"translate"),n.Oc(35,jX,2,2,"mat-option",20),n.Vb(),n.Vb(),n.Vb(),n.Wb(36,"div",18),n.Wb(37,"mat-form-field"),n.Wb(38,"mat-select",22),n.dc("ngModelChange",(function(t){return e.newCron.dow=t})),n.ic(39,"translate"),n.ic(40,"translate"),n.Oc(41,AX,2,2,"mat-option",20),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(42,"div",17),n.Wb(43,"div",23),n.Wb(44,"mat-form-field"),n.Wb(45,"mat-select",24),n.dc("ngModelChange",(function(t){return e.newCron.mon=t})),n.ic(46,"translate"),n.ic(47,"translate"),n.Oc(48,WX,2,2,"mat-option",20),n.Vb(),n.Vb(),n.Vb(),n.Wb(49,"div",23),n.Wb(50,"mat-form-field"),n.Wb(51,"mat-select",25),n.dc("ngModelChange",(function(t){return e.newCron.dom=t})),n.ic(52,"translate"),n.ic(53,"translate"),n.Oc(54,TX,2,2,"mat-option",20),n.Vb(),n.Vb(),n.Vb(),n.Wb(55,"div",26),n.Wb(56,"mat-form-field"),n.Wb(57,"mat-select",27),n.dc("ngModelChange",(function(t){return e.newCron.cmd=t})),n.ic(58,"translate"),n.ic(59,"translate"),n.Oc(60,EX,2,2,"mat-option",20),n.Vb(),n.Vb(),n.Vb(),n.Wb(61,"div",28),n.Wb(62,"button",29),n.dc("click",(function(){return e.saveCron()})),n.Qc(63),n.ic(64,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Rb(65,"mat-divider"),n.Wb(66,"div",30),n.Qc(67),n.ic(68,"translate"),n.Vb(),n.Wb(69,"mat-list",31),n.Wb(70,"h3",14),n.Qc(71),n.ic(72,"translate"),n.Vb(),n.Wb(73,"mat-chip-list",32,33),n.Oc(75,LX,2,1,"span",34),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.zc(22);n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",(e.appService.getViewMode(),!1)),n.Db(4),n.Rc(n.jc(20,41,"lang.notificationSchedule")),n.Db(7),n.pc("title",n.jc(27,43,"lang.hour")),n.pc("placeholder",n.jc(28,45,"lang.hour")),n.oc("ngModel",e.newCron.h),n.Db(3),n.oc("ngForOf",e.hours),n.Db(3),n.pc("title",n.jc(33,47,"lang.minute")),n.pc("placeholder",n.jc(34,49,"lang.minute")),n.oc("ngModel",e.newCron.m),n.Db(3),n.oc("ngForOf",e.minutes),n.Db(3),n.pc("title",n.jc(39,51,"lang.day")),n.pc("placeholder",n.jc(40,53,"lang.day")),n.oc("ngModel",e.newCron.dow),n.Db(3),n.oc("ngForOf",e.dow),n.Db(4),n.pc("title",n.jc(46,55,"lang.month")),n.pc("placeholder",n.jc(47,57,"lang.month")),n.oc("ngModel",e.newCron.mon),n.Db(3),n.oc("ngForOf",e.months),n.Db(3),n.pc("title",n.jc(52,59,"lang.dayOfMonth")),n.pc("placeholder",n.jc(53,61,"lang.dayOfMonth")),n.oc("ngModel",e.newCron.dom),n.Db(3),n.oc("ngForOf",e.dom),n.Db(3),n.pc("title",n.jc(58,63,"lang.script")),n.pc("placeholder",n.jc(59,65,"lang.script")),n.oc("ngModel",e.newCron.cmd),n.Db(3),n.oc("ngForOf",e.authorizedNotification),n.Db(2),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(64,67,"lang.save")),n.Db(4),n.Sc(" ",n.jc(68,69,"lang.NotificationScheduleInfo")," "),n.Db(4),n.Rc(n.jc(72,71,"lang.activeCron")),n.Db(4),n.oc("ngForOf",e.crontab)}},directives:[I.e,I.f,Ot,We,P.t,I.d,R.a,za,R.g,X.K,X.v,X.w,Y.c,ee.a,X.F,X.u,X.x,P.s,k.b,T.a,ze.d,R.h,R.d,o.f,S.a,R.c,W.l,V.c,K.a,J.b,X.d,X.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,vt.h,Fe.b,vt.a,A.b,vt.j,vt.m,o.d,W.p,ze.a,ze.e],pipes:[g.d],encapsulation:2}),t})();const NX=["adminMenuTemplate"];function zX(t,e){1&t&&(n.Wb(0,"h3",14),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.actions")))}function BX(t,e){if(1&t){const t=n.Xb();n.Wb(0,"a",15),n.dc("click",(function(){return n.Dc(t),n.hc(2).createScript()}))("next",(function(){return n.Dc(t),n.hc(2).createScript()})),n.Rb(1,"mat-icon",16),n.Wb(2,"p",17),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(3),n.Sc(" ",n.jc(4,1,"lang.createScriptNotification")," "))}function UX(t,e){if(1&t){const t=n.Xb();n.Wb(0,"a",18),n.dc("click",(function(){return n.Dc(t),n.hc(2).toggleNotif()})),n.Rb(1,"mat-icon",19),n.Wb(2,"p",17),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(3),n.Sc(" ",n.jc(4,1,"lang.activateNotification")," "))}function $X(t,e){if(1&t){const t=n.Xb();n.Wb(0,"a",18),n.dc("click",(function(){return n.Dc(t),n.hc(2).toggleNotif()})),n.Rb(1,"mat-icon",20),n.Wb(2,"p",17),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(3),n.Sc(" ",n.jc(4,1,"lang.suspendNotification")," "))}function HX(t,e){if(1&t&&(n.Wb(0,"mat-nav-list"),n.Oc(1,zX,3,3,"h3",11),n.Oc(2,BX,5,3,"a",12),n.Oc(3,UX,5,3,"a",13),n.Oc(4,$X,5,3,"a",13),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",!t.creationMode),n.Db(1),n.oc("ngIf",!t.creationMode&&!t.loading&&!t.notification.scriptcreated),n.Db(1),n.oc("ngIf",!t.creationMode&&!t.loading&&"N"==t.notification.is_enabled),n.Db(1),n.oc("ngIf",!t.creationMode&&!t.loading&&"Y"==t.notification.is_enabled)}}function GX(t,e){1&t&&(n.Wb(0,"div",21),n.Rb(1,"mat-spinner",22),n.Vb())}function XX(t,e){1&t&&(n.Wb(0,"div",46),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.suspended"),""))}function qX(t,e){if(1&t&&(n.Wb(0,"mat-option",48),n.Rb(1,"mat-icon",49),n.Qc(2),n.Vb()),2&t){const t=n.hc().$implicit;n.oc("value",t.id),n.Db(2),n.Sc(" ",t.label_action," ")}}function KX(t,e){if(1&t&&(n.Ub(0),n.Oc(1,qX,3,2,"mat-option",47),n.Tb()),2&t){const t=e.$implicit,i=n.hc(2);n.Db(1),n.oc("ngIf",!i.isNumber(t.id))}}function YX(t,e){if(1&t&&(n.Wb(0,"mat-option",48),n.Rb(1,"mat-icon",50),n.Qc(2),n.Vb()),2&t){const t=n.hc().$implicit;n.oc("value",t.id),n.Db(2),n.Sc(" ",t.label_action," ")}}function JX(t,e){if(1&t&&(n.Ub(0),n.Oc(1,YX,3,2,"mat-option",47),n.Tb()),2&t){const t=e.$implicit,i=n.hc(2);n.Db(1),n.oc("ngIf",i.isNumber(t.id))}}function ZX(t,e){if(1&t&&(n.Wb(0,"mat-option",48),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.template_id),n.Db(1),n.Sc(" ",t.template_label," ")}}function tq(t,e){if(1&t&&(n.Wb(0,"mat-option",48),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.oc("value",t.id),n.Db(1),n.Rc(t.label)}}function eq(t,e){if(1&t&&(n.Ub(0),n.Oc(1,tq,2,2,"mat-option",47),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf","dest_user"==t.id)}}function iq(t,e){if(1&t&&(n.Wb(0,"mat-optgroup",32),n.ic(1,"translate"),n.Oc(2,eq,2,1,"ng-container",33),n.Vb()),2&t){const t=n.hc(2);n.qc("label","",n.jc(1,2,"lang.memberUserDest")," :"),n.Db(2),n.oc("ngForOf",t.notification.data.diffusionType)}}function nq(t,e){if(1&t&&(n.Wb(0,"mat-option",48),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.oc("value",t.id),n.Db(1),n.Rc(t.label)}}function aq(t,e){if(1&t&&(n.Ub(0),n.Oc(1,nq,2,2,"mat-option",47),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf","copy_list"==t.id)}}function sq(t,e){if(1&t&&(n.Wb(0,"mat-optgroup",32),n.ic(1,"translate"),n.Oc(2,aq,2,1,"ng-container",33),n.Vb()),2&t){const t=n.hc(2);n.qc("label","",n.jc(1,2,"lang.memberUsersCopy")," :"),n.Db(2),n.oc("ngForOf",t.notification.data.diffusionType)}}function oq(t,e){if(1&t&&(n.Wb(0,"mat-option",48),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.oc("value",t.id),n.Db(1),n.Rc(t.label)}}function rq(t,e){if(1&t&&(n.Ub(0),n.Oc(1,oq,2,2,"mat-option",47),n.Tb()),2&t){const t=e.$implicit,i=n.hc(2);n.Db(1),n.oc("ngIf","group"==t.id||"entity"==t.id&&"baskets"!=i.notification.event_id||"user"==t.id&&"baskets"!=i.notification.event_id)}}function cq(t,e){if(1&t&&(n.Wb(0,"mat-option",48),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.oc("value",t.id),n.Db(1),n.Rc(t.label)}}function lq(t,e){if(1&t&&(n.Ub(0),n.Oc(1,cq,2,2,"mat-option",47),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf","group"!=t.id&&"entity"!=t.id&&"user"!=t.id&&"copy_list"!=t.id&&"group"!=t.id&&"dest_user"!=t.id)}}function dq(t,e){if(1&t&&(n.Wb(0,"mat-optgroup",32),n.ic(1,"translate"),n.Oc(2,lq,2,1,"ng-container",33),n.Vb()),2&t){const t=n.hc(2);n.qc("label","",n.jc(1,2,"lang.others")," :"),n.Db(2),n.oc("ngForOf",t.notification.data.diffusionType)}}function hq(t,e){if(1&t&&(n.Wb(0,"mat-option",48),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.group_id),n.Db(1),n.Sc(" ",t.group_desc," ")}}function uq(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"mat-select",51),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).notification.diffusion_properties=e})),n.ic(2,"translate"),n.ic(3,"translate"),n.Oc(4,hq,2,2,"mat-option",36),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.pc("title",n.jc(2,4,"lang.memberDiffTypeUsers")),n.pc("placeholder",n.jc(3,6,"lang.memberDiffTypeUsers")),n.oc("ngModel",t.notification.diffusion_properties),n.Db(3),n.oc("ngForOf",t.notification.data.groups)}}function pq(t,e){if(1&t&&(n.Wb(0,"mat-option",48),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function bq(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"mat-select",51),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).notification.diffusion_properties=e})),n.ic(2,"translate"),n.ic(3,"translate"),n.Oc(4,pq,2,2,"mat-option",36),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.pc("title",n.jc(2,4,"lang.memberDiffTypeUsers")),n.pc("placeholder",n.jc(3,6,"lang.memberDiffTypeUsers")),n.oc("ngModel",t.notification.diffusion_properties),n.Db(3),n.oc("ngForOf",t.notification.data.users)}}function fq(t,e){if(1&t&&(n.Wb(0,"mat-option",48),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.entity_id),n.Db(1),n.Sc(" ",t.entity_label," ")}}function mq(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"mat-select",51),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).notification.diffusion_properties=e})),n.ic(2,"translate"),n.ic(3,"translate"),n.Oc(4,fq,2,2,"mat-option",36),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.pc("title",n.jc(2,4,"lang.memberDiffTypeUsers")),n.pc("placeholder",n.jc(3,6,"lang.memberDiffTypeUsers")),n.oc("ngModel",t.notification.diffusion_properties),n.Db(3),n.oc("ngForOf",t.notification.data.entities)}}function gq(t,e){if(1&t&&(n.Wb(0,"mat-option",48),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label_status," ")}}function vq(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"mat-select",52),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).notification.diffusion_properties=e})),n.ic(2,"translate"),n.ic(3,"translate"),n.ic(4,"translate"),n.Oc(5,gq,2,2,"mat-option",36),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.qc("title","",n.jc(2,5,"lang.selectedDocumentStatus")," (optionnel)"),n.rc("placeholder","",n.jc(3,7,"lang.selectedDocumentStatus")," (",n.jc(4,9,"lang.optional"),")"),n.oc("ngModel",t.notification.diffusion_properties),n.Db(4),n.oc("ngForOf",t.notification.data.status)}}function _q(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",23),n.Oc(1,XX,3,3,"div",24),n.Wb(2,"form",25,26),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Wb(4,"div",27),n.Wb(5,"div",28),n.Wb(6,"mat-form-field"),n.Wb(7,"input",29),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().notification.notification_id=e})),n.ic(8,"translate"),n.ic(9,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(10,"div",27),n.Wb(11,"div",28),n.Wb(12,"mat-form-field"),n.Wb(13,"input",30),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().notification.description=e})),n.ic(14,"translate"),n.ic(15,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(16,"div",27),n.Wb(17,"div",28),n.Wb(18,"mat-form-field"),n.Wb(19,"mat-select",31),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().notification.event_id=e})),n.ic(20,"translate"),n.ic(21,"translate"),n.Wb(22,"mat-optgroup",32),n.ic(23,"translate"),n.Oc(24,KX,2,1,"ng-container",33),n.Vb(),n.Wb(25,"mat-optgroup",32),n.ic(26,"translate"),n.Oc(27,JX,2,1,"ng-container",33),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(28,"div",27),n.Wb(29,"div",34),n.Wb(30,"mat-form-field"),n.Wb(31,"mat-select",35),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().notification.template_id=e})),n.ic(32,"translate"),n.ic(33,"translate"),n.Oc(34,ZX,2,2,"mat-option",36),n.Vb(),n.Vb(),n.Vb(),n.Wb(35,"div",37),n.Wb(36,"mat-form-field"),n.Wb(37,"mat-select",38),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().notification.attachfor_type=e})),n.ic(38,"translate"),n.ic(39,"translate"),n.Wb(40,"mat-option",39),n.Qc(41),n.ic(42,"translate"),n.Vb(),n.Wb(43,"mat-option",40),n.Qc(44),n.ic(45,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(46,"div",27),n.Wb(47,"div",37),n.Wb(48,"mat-form-field"),n.Wb(49,"mat-select",41),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().notification.diffusion_type=e})),n.ic(50,"translate"),n.ic(51,"translate"),n.Oc(52,iq,3,4,"mat-optgroup",42),n.Oc(53,sq,3,4,"mat-optgroup",42),n.Wb(54,"mat-optgroup",32),n.ic(55,"translate"),n.Oc(56,rq,2,1,"ng-container",33),n.Vb(),n.Oc(57,dq,3,4,"mat-optgroup",42),n.Vb(),n.Vb(),n.Vb(),n.Wb(58,"div",34),n.Oc(59,uq,5,8,"mat-form-field",43),n.Oc(60,bq,5,8,"mat-form-field",43),n.Oc(61,mq,5,8,"mat-form-field",43),n.Oc(62,vq,6,11,"mat-form-field",43),n.Vb(),n.Vb(),n.Wb(63,"div",27),n.Wb(64,"div",44),n.Wb(65,"button",45),n.Qc(66),n.ic(67,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(3),e=n.hc();n.Db(1),n.oc("ngIf","N"==e.notification.is_enabled),n.Db(6),n.pc("title",n.jc(8,38,"lang.id")),n.pc("placeholder",n.jc(9,40,"lang.id")),n.oc("ngModel",e.notification.notification_id)("disabled",!e.creationMode),n.Db(6),n.pc("title",n.jc(14,42,"lang.description")),n.pc("placeholder",n.jc(15,44,"lang.description")),n.oc("ngModel",e.notification.description),n.Db(6),n.pc("title",n.jc(20,46,"lang.NotificationEvent")),n.pc("placeholder",n.jc(21,48,"lang.NotificationEvent")),n.oc("ngModel",e.notification.event_id),n.Db(3),n.qc("label","",n.jc(23,50,"lang.triggerSystem")," :"),n.Db(2),n.oc("ngForOf",e.notification.data.event),n.Db(1),n.qc("label","",n.jc(26,52,"lang.triggerAction")," :"),n.Db(2),n.oc("ngForOf",e.notification.data.event),n.Db(4),n.pc("title",n.jc(32,54,"lang.notificationModel")),n.pc("placeholder",n.jc(33,56,"lang.notificationModel")),n.oc("ngModel",e.notification.template_id),n.Db(3),n.oc("ngForOf",e.notification.data.template),n.Db(3),n.pc("title",n.jc(38,58,"lang.attachment")),n.pc("placeholder",n.jc(39,60,"lang.attachment")),n.oc("ngModel",e.notification.attachfor_type),n.Db(4),n.Sc(" ",n.jc(42,62,"lang.noAttachment")," "),n.Db(3),n.Sc(" ",n.jc(45,64,"lang.notificationJoinDocument")," "),n.Db(5),n.pc("title",n.jc(50,66,"lang.sendTo")),n.pc("placeholder",n.jc(51,68,"lang.sendTo")),n.oc("ngModel",e.notification.diffusion_type),n.Db(3),n.oc("ngIf","baskets"!=e.notification.event_id),n.Db(1),n.oc("ngIf","baskets"!=e.notification.event_id),n.Db(1),n.qc("label","",n.jc(55,70,"lang.memberAllUsers")," :"),n.Db(2),n.oc("ngForOf",e.notification.data.diffusionType),n.Db(1),n.oc("ngIf","baskets"!=e.notification.event_id),n.Db(2),n.oc("ngIf","group"==e.notification.diffusion_type),n.Db(1),n.oc("ngIf","user"==e.notification.diffusion_type),n.Db(1),n.oc("ngIf","entity"==e.notification.diffusion_type),n.Db(1),n.oc("ngIf","dest_user"==e.notification.diffusion_type||"copy_list"==e.notification.diffusion_type||"dest_entity"==e.notification.diffusion_type||"dest_user_visa"==e.notification.diffusion_type||"dest_user_sign"==e.notification.diffusion_type),n.Db(3),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(67,72,"lang.save"))}}let yq=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.route=i,this.router=n,this.notify=a,this.headerService=s,this.appService=o,this.viewContainerRef=r,this.notification={diffusionType_label:null},this.loading=!1}ngOnInit(){this.loading=!0,this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.route.params.subscribe(t=>{void 0===t.identifier?(this.headerService.setHeader(this.translate.instant("lang.notificationCreation")),this.creationMode=!0,this.http.get("../rest/administration/notifications/new").subscribe(t=>{this.notification=t.notification,this.notification.attachfor_properties=[],this.loading=!1},t=>{this.notify.error(t.error.errors)})):(this.creationMode=!1,this.http.get("../rest/notifications/"+t.identifier).subscribe(t=>{this.headerService.setHeader(this.translate.instant("lang.notificationModification"),t.notification.description),this.notification=t.notification,this.notification.attachfor_properties=[],this.loading=!1},t=>{this.notify.error(t.error.errors)}))})}createScript(){this.http.post("../rest/scriptNotification",this.notification).subscribe(t=>{this.notification.scriptcreated=t,this.notify.success(this.translate.instant("lang.scriptCreated"))},t=>{this.notify.error(t.error.errors)})}onSubmit(){this.creationMode?(this.notification.is_enabled="Y",this.http.post("../rest/notifications",this.notification).subscribe(t=>{this.router.navigate(["/administration/notifications"]),this.notify.success(this.translate.instant("lang.notificationAdded"))},t=>{this.notify.error(t.error.errors)})):this.http.put("../rest/notifications/"+this.notification.notification_sid,this.notification).subscribe(t=>{this.router.navigate(["/administration/notifications"]),this.notify.success(this.translate.instant("lang.notificationUpdated"))},t=>{this.notify.error(t.error.errors)})}toggleNotif(){this.notification.is_enabled="Y"===this.notification.is_enabled?"N":"Y",this.http.put("../rest/notifications/"+this.notification.notification_sid,this.notification).subscribe(t=>{this.notify.success(this.translate.instant("lang.notificationUpdated"))},t=>{this.notify.error(t.error.errors)})}isNumber(t){return $.isNumeric(t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(NX,!0),2&t&&n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first)},decls:15,vars:8,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["mat-subheader","",4,"ngIf"],["mat-list-item","","joyrideStep","createScriptTour",3,"click","next",4,"ngIf"],["mat-list-item","",3,"click",4,"ngIf"],["mat-subheader",""],["mat-list-item","","joyrideStep","createScriptTour",3,"click","next"],["color","primary","mat-list-icon","",1,"fa","fa-terminal"],["mat-line",""],["mat-list-item","",3,"click"],["color","accent","mat-list-icon","",1,"fa","fa-play"],["color","warn","mat-list-icon","",1,"fa","fa-pause"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],["class","text-warning","style","position: absolute;opacity: 0.1;font-size: 120px;transform: rotate(324deg);-webkit-transform: rotate(324deg);margin-left: 25%;margin-top: 90px;",4,"ngIf"],[1,"form-horizontal",3,"ngSubmit"],["notificationsFormUp","ngForm"],[1,"form-group"],[1,"col-md-12"],["matInput","","required","","name","notification_id","id","notification_id","type","text","pattern","^[\\w.-]*$","maxlength","50",3,"ngModel","title","placeholder","disabled","ngModelChange"],["matInput","","required","","name","description","id","description","type","text","maxlength","255",3,"ngModel","title","placeholder","ngModelChange"],["id","event_id","name","event_id","required","",3,"title","placeholder","ngModel","ngModelChange"],[3,"label"],[4,"ngFor","ngForOf"],[1,"col-md-8"],["id","template_id","name","template_id","required","",3,"title","placeholder","ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"col-md-4"],["id","attachfor_type","name","attachfor_type",3,"title","placeholder","ngModel","ngModelChange"],["value",""],["value","main_document"],["id","diffusion_type","name","diffusion_type","required","",3,"title","placeholder","ngModel","ngModelChange"],[3,"label",4,"ngIf"],[4,"ngIf"],[1,"col-sm-12",2,"text-align","center"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],[1,"text-warning",2,"position","absolute","opacity","0.1","font-size","120px","transform","rotate(324deg)","-webkit-transform","rotate(324deg)","margin-left","25%","margin-top","90px"],[3,"value",4,"ngIf"],[3,"value"],["color","primary",1,"fa","fa-cog",2,"height","auto"],["color","primary",1,"fa","fa-exchange-alt",2,"height","auto"],["id","diffusion_properties","name","diffusion_properties","required","","multiple","",3,"title","placeholder","ngModel","ngModelChange"],["id","diffusion_properties","name","diffusion_properties","multiple","",3,"title","placeholder","ngModel","ngModelChange"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,HX,5,4,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,GX,2,0,"div",9),n.Oc(14,_q,68,74,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,R.h,R.g,R.d,za,S.a,R.c,W.l,V.c,K.a,X.K,X.v,X.w,Y.c,J.b,X.d,X.F,X.B,X.p,X.u,X.x,ee.a,W.o,P.s,W.p,k.b],pipes:[g.d],encapsulation:2}),t})();const xq=["adminMenuTemplate"],Cq=["appHistoryList"];function Oq(t,e){if(1&t&&(n.Wb(0,"a",21),n.Rb(1,"mat-icon",22),n.Wb(2,"p",23),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Ib("active",t.current),n.oc("routerLink",t.route),n.Db(1),n.Fb(t.icon),n.Db(2),n.Sc(" ",t.label," ")}}function Dq(t,e){if(1&t&&(n.Wb(0,"mat-nav-list"),n.Oc(1,Oq,4,6,"a",20),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",t.subMenus)}}function wq(t,e){if(1&t&&n.Rb(0,"mat-datepicker-toggle",24),2&t){n.hc();const t=n.zc(20);n.oc("for",t)}}function Mq(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",25),n.dc("click",(function(e){n.Dc(t),n.hc();const i=n.zc(35);return e.stopPropagation(),i.startDateFilter="",i.filterStartDate()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",26),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.eraseValue"))}function kq(t,e){if(1&t&&n.Rb(0,"mat-datepicker-toggle",24),2&t){n.hc();const t=n.zc(30);n.oc("for",t)}}function Sq(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",25),n.dc("click",(function(e){n.Dc(t),n.hc();const i=n.zc(35);return e.stopPropagation(),i.endDateFilter="",i.filterEndDate()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",26),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.eraseValue"))}let Iq=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.appService=i,this.functions=n,this.privilegeService=a,this.headerService=s,this.viewContainerRef=o,this.startDateFilter="",this.endDateFilter="",this.subMenus=[{icon:"fa fa-history",route:"/administration/history",label:this.translate.instant("lang.history"),current:!0},{icon:"fa fa-history",route:"/administration/history-batch",label:this.translate.instant("lang.historyBatch"),current:!1}]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.history").toLowerCase(),"",""),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.subMenus=this.privilegeService.hasCurrentUserPrivilege("view_history_batch")?[{icon:"fa fa-history",route:"/administration/history",label:this.translate.instant("lang.history"),current:!0},{icon:"fa fa-history",route:"/administration/history-batch",label:this.translate.instant("lang.historyBatch"),current:!1}]:[{icon:"fa fa-history",route:"/administration/history",label:this.translate.instant("lang.history"),current:!0}]}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(w.a),n.Qb(_t.a),n.Qb(Dt.a),n.Qb(y.a),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["admin-history"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(xq,!0),n.Xc(Cq,!0)),2&t&&(n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.appHistoryList=i.first))},decls:36,vars:30,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[2,"display","grid","grid-template-columns","repeat(2, 1fr)","grid-gap","10px","width","100%"],[1,"dateFilter",2,"cursor","pointer",3,"click"],[2,"color","white"],["matInput","","readonly","",2,"cursor","pointer",3,"ngModel","matDatepicker","placeholder","max","ngModelChange","dateChange"],["matSuffix","",3,"for",4,"ngIf"],[3,"touchUi"],["startPicker",""],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click",4,"ngIf"],["matInput","","readonly","",2,"cursor","pointer",3,"ngModel","matDatepicker","placeholder","min","ngModelChange","dateChange"],["endPicker",""],[1,"container"],[1,"container-content"],["appHistoryList",""],["mat-list-item","",3,"active","routerLink",4,"ngFor","ngForOf"],["mat-list-item","",3,"routerLink"],["color","primary","mat-list-icon",""],["mat-line",""],["matSuffix","",3,"for"],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click"],["color","warn",1,"fa","fa-calendar-times"]],template:function(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-sidenav-container",0),n.Oc(1,Dq,2,1,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Wb(10,"div",6),n.Wb(11,"div",7),n.Wb(12,"mat-form-field",8),n.dc("click",(function(){return n.Dc(t),n.zc(20).open()})),n.Wb(13,"mat-label",9),n.Qc(14),n.ic(15,"translate"),n.Vb(),n.Wb(16,"input",10),n.dc("ngModelChange",(function(e){return n.Dc(t),n.zc(35).startDateFilter=e}))("dateChange",(function(){return n.Dc(t),n.zc(35).filterStartDate()})),n.ic(17,"translate"),n.Vb(),n.Oc(18,wq,1,1,"mat-datepicker-toggle",11),n.Rb(19,"mat-datepicker",12,13),n.Oc(21,Mq,3,3,"button",14),n.Vb(),n.Wb(22,"mat-form-field",8),n.dc("click",(function(){return n.Dc(t),n.zc(30).open()})),n.Wb(23,"mat-label",9),n.Qc(24),n.ic(25,"translate"),n.Vb(),n.Wb(26,"input",15),n.dc("ngModelChange",(function(e){return n.Dc(t),n.zc(35).endDateFilter=e}))("dateChange",(function(){return n.Dc(t),n.zc(35).filterEndDate()})),n.ic(27,"translate"),n.Vb(),n.Oc(28,kq,1,1,"mat-datepicker-toggle",11),n.Rb(29,"mat-datepicker",12,16),n.Oc(31,Sq,3,3,"button",14),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(32,"div",17),n.Wb(33,"div",18),n.Rb(34,"app-history-list",null,19),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(20),i=n.zc(30),a=n.zc(35);n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(4),n.Sc("",n.jc(15,22,"lang.since")," "),n.Db(2),n.oc("ngModel",a.startDateFilter)("matDatepicker",t)("placeholder",n.jc(17,24,"lang.since"))("max",a.endDateFilter),n.Db(2),n.oc("ngIf",!a.startDateFilter),n.Db(1),n.oc("touchUi",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",a.startDateFilter),n.Db(3),n.Sc("",n.jc(25,26,"lang.until")," "),n.Db(2),n.oc("ngModel",a.endDateFilter)("matDatepicker",i)("placeholder",n.jc(27,28,"lang.until"))("min",a.startDateFilter),n.Db(2),n.oc("ngIf",!a.endDateFilter),n.Db(1),n.oc("touchUi",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",a.endDateFilter),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode())}},directives:[I.e,I.f,Ot,We,Y.c,Y.g,J.b,X.d,ae.h,X.u,X.x,P.t,ae.f,iO,R.h,P.s,R.d,o.f,S.a,R.c,W.l,ae.j,Y.j,k.b],pipes:[g.d],styles:[".active[_ngcontent-%COMP%], .active[_ngcontent-%COMP%]:active, .active[_ngcontent-%COMP%]:focus, .active[_ngcontent-%COMP%]:hover{color:#135f7f;border-left:5px solid #135f7f;background:rgba(19,95,127,.14)}.paginatorResultList[_ngcontent-%COMP%] .mat-paginator-range-label{justify-content:flex-end;display:flex}.filterList[_ngcontent-%COMP%] .mat-optgroup-label{color:#135f7f;position:-webkit-sticky;position:sticky;top:0;background:#fff!important;z-index:1}.label[_ngcontent-%COMP%]{cursor:pointer;margin:5px}.bg-head-content[_ngcontent-%COMP%] .mat-focused .mat-form-field-label{color:#fff!important}.bg-head-content[_ngcontent-%COMP%] .mat-form-field-ripple, .bg-head-content[_ngcontent-%COMP%] .mat-form-field-underline{background-color:#fff!important}.bg-head-content[_ngcontent-%COMP%] .mat-datepicker-toggle[_ngcontent-%COMP%], .bg-head-content[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{color:#fff}"]}),t})();const Pq=["adminMenuTemplate"],Vq=["tableHistoryListSort"],Rq=["autoCompleteInput"];function jq(t,e){if(1&t&&(n.Wb(0,"a",56),n.Rb(1,"mat-icon",57),n.Wb(2,"p",58),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Ib("active",t.current),n.oc("routerLink",t.route),n.Db(1),n.Fb(t.icon),n.Db(2),n.Sc(" ",t.label," ")}}function Aq(t,e){if(1&t&&(n.Wb(0,"mat-nav-list"),n.Oc(1,jq,4,6,"a",55),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",t.subMenus)}}function Wq(t,e){if(1&t&&n.Rb(0,"mat-datepicker-toggle",59),2&t){n.hc();const t=n.zc(20);n.oc("for",t)}}function Tq(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",60),n.dc("click",(function(e){n.Dc(t);const i=n.hc();return e.stopPropagation(),i.startDateFilter="",i.filterStartDate()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",61),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.eraseValue"))}function Eq(t,e){if(1&t&&n.Rb(0,"mat-datepicker-toggle",59),2&t){n.hc();const t=n.zc(30);n.oc("for",t)}}function Fq(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",60),n.dc("click",(function(e){n.Dc(t);const i=n.hc();return e.stopPropagation(),i.endDateFilter="",i.filterEndDate()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",61),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.eraseValue"))}function Lq(t,e){1&t&&n.Rb(0,"mat-spinner")}function Qq(t,e){if(1&t&&(n.Wb(0,"div",62),n.Oc(1,Lq,1,0,"mat-spinner",29),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.isLoadingResults)}}function Nq(t,e){1&t&&(n.Wb(0,"mat-option",63),n.Wb(1,"div",64),n.Rb(2,"mat-spinner",65),n.Vb(),n.Vb())}function zq(t,e){if(1&t&&(n.Wb(0,"mat-option",69),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2).$implicit,a=n.hc(2);n.Lc("color",t.used?"":a.filterColor[i.key]),n.oc("id",i.key)("value",t)("disabled",t.used),n.Db(1),n.Sc(" ",t.label," ")}}function Bq(t,e){if(1&t&&(n.Wb(0,"mat-optgroup",67),n.ic(1,"translate"),n.Oc(2,zq,2,6,"mat-option",68),n.ic(3,"sortBy"),n.ic(4,"async"),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc(2);n.oc("label",n.jc(1,2,"lang."+t.key)),n.Db(2),n.oc("ngForOf",n.kc(3,4,n.jc(4,7,e.filteredList[t.key]),"label"))}}function Uq(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Bq,5,9,"mat-optgroup",66),n.ic(2,"async"),n.Tb()),2&t){const t=e.$implicit,a=n.hc(2);var i;n.Db(1),n.oc("ngIf",(null==(i=n.jc(2,1,a.filteredList[t.key]))?null:i.length)>0)}}function $q(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Uq,3,3,"ng-container",37),n.ic(2,"keyvalue"),n.Tb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",n.jc(2,1,t.filterList))}}function Hq(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",71),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=e.index,s=n.hc(2).$implicit;return n.hc().removeItemFilter(i,s.key,a)})),n.ic(1,"translate"),n.Qc(2),n.Rb(3,"i",72),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2).$implicit,a=n.hc();n.Lc("background",a.filterColor[i.key]),n.oc("title",n.jc(1,4,"lang."+i.key)),n.Db(2),n.Sc("",t.label," ")}}function Gq(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Hq,4,6,"span",70),n.Tb()),2&t){const t=n.hc().$implicit,e=n.hc();n.Db(1),n.oc("ngForOf",e.filterUsed[t.key])}}const Xq=function(){return["startDate","endDate"]};function qq(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Gq,2,1,"ng-container",29),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",-1===n.uc(1,Xq).indexOf(t.key))}}function Kq(t,e){1&t&&(n.Wb(0,"mat-header-cell",73),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.event")))}function Yq(t,e){if(1&t&&(n.Wb(0,"mat-cell",74),n.ic(1,"fullDate"),n.Qc(2),n.ic(3,"ucfirst"),n.ic(4,"timeAgo"),n.Vb()),2&t){const t=e.$implicit;n.oc("title",n.jc(1,2,t.event_date)),n.Db(2),n.Sc(" ",n.jc(3,4,n.kc(4,6,t.event_date,"full"))," ")}}function Jq(t,e){1&t&&(n.Wb(0,"mat-header-cell",73),n.Qc(1),n.ic(2,"ucfirst"),n.ic(3,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,n.jc(3,3,"lang.totalProcessed"))," "))}function Zq(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Ib("empty",0===t.total_processed),n.Db(1),n.Sc(" ",t.total_processed," ")}}function tK(t,e){1&t&&(n.Wb(0,"mat-header-cell",73),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.totalErrors")," "))}function eK(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Ib("empty",0===t.total_errors)("error",t.total_errors>0),n.Db(1),n.Sc(" ",t.total_errors," ")}}function iK(t,e){1&t&&(n.Wb(0,"mat-header-cell",75),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.information")," "))}function nK(t,e){if(1&t&&(n.Wb(0,"mat-cell",76),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.info," ")}}function aK(t,e){1&t&&(n.Wb(0,"mat-header-cell",73),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.module")," "))}function sK(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.module_name," ")}}function oK(t,e){1&t&&n.Rb(0,"mat-header-row")}function rK(t,e){1&t&&n.Rb(0,"mat-row")}let cK=(()=>{class t{constructor(t,e,i,a,s,o,r,c,l,d){this.translate=t,this.http=e,this.notify=i,this.headerService=a,this.appService=s,this.dialog=o,this.functions=r,this.latinisePipe=c,this.privilegeService=l,this.viewContainerRef=d,this.loading=!1,this.filtersChange=new n.o,this.displayedColumnsHistory=["event_date","total_processed","total_errors","info","module_name"],this.isLoadingResults=!0,this.routeUrl="../rest/batchHistory",this.resultsLength=0,this.searchHistory=new X.i,this.startDateFilter="",this.endDateFilter="",this.filterUrl="",this.filterList=null,this.filteredList={},this.filterUsed={},this.filterColor={startDate:"#b5cfd8",endDate:"#7393a7",totalErrors:"#fc6471",modules:"#009dc5"},this.loadingFilters=!0,this.destroy$=new da.a,this.subMenus=[]}ngOnInit(){this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.subMenus=this.privilegeService.hasCurrentUserPrivilege("view_history")?[{icon:"fa fa-history",route:"/administration/history",label:this.translate.instant("lang.history"),current:!1},{icon:"fa fa-history",route:"/administration/history-batch",label:this.translate.instant("lang.historyBatch"),current:!0}]:[{icon:"fa fa-history",route:"/administration/history-batch",label:this.translate.instant("lang.historyBatch"),current:!0}],this.loading=!0,this.initHistoryList()}initHistoryList(){this.resultListDatabase=new lK(this.http),this.paginator.pageIndex=0,this.sort.active="event_date",this.sort.direction="desc",this.sort.sortChange.subscribe(()=>this.paginator.pageIndex=0),Object(gy.a)(this.sort.sortChange,this.paginator.page,this.filtersChange).pipe(Object(Zo.a)(this.destroy$),Object(Qe.a)({}),Object(ft.a)(()=>{this.isLoadingResults=!0;let t="";return this.functions.empty(this.searchHistory.value)||(t="&search="+this.searchHistory.value),this.resultListDatabase.getRepoIssues(this.sort.active,this.sort.direction,this.paginator.pageIndex,this.routeUrl,this.filterUrl,t)}),Object(l.a)(t=>(this.isLoadingResults=!1,t=this.processPostData(t),this.resultsLength=t.count,this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.historyBatch").toLowerCase(),"",""),t.history)),Object(m.a)(t=>(this.notify.handleErrors(t),this.isLoadingResults=!1,Object(c.a)([])))).subscribe(t=>this.data=t)}processPostData(t){return t.history=t.history.map(t=>Object.assign(Object.assign({},t),{total_errors:null===t.total_errors?0:t.total_errors})),t}refreshDao(){this.paginator.pageIndex=0,this.filtersChange.emit()}initFilterListHistory(){null===this.filterList&&(this.filterList={},this.loadingFilters=!0,this.http.get("../rest/batchHistory/availableFilters").pipe(Object(l.a)(t=>{let e={modules:[{}],totalErrors:[{}]};return e.modules=t.modules,e.totalErrors=[{id:"errorElement",label:this.translate.instant("lang.totalErrors")}],e}),Object(mt.a)(t=>{Object.keys(t).forEach(e=>{this.functions.empty(this.filterList[e])&&(this.filterList[e]=[],this.filteredList[e]=[]),t[e].forEach(t=>{this.filterList[e].push(t)}),this.filteredList[e]=this.searchHistory.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>t?this.filter(t,e):this.filterList[e].slice()))})}),Object(Xt.a)(()=>this.loadingFilters=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe())}filterStartDate(){this.functions.empty(this.filterUsed.startDate)&&(this.filterUsed.startDate=[]),this.filterUsed.startDate[0]={id:this.functions.empty(this.startDateFilter)?"":this.functions.formatDateObjectToDateString(this.startDateFilter),label:this.functions.empty(this.startDateFilter)?"":this.functions.formatDateObjectToDateString(this.startDateFilter)},this.generateUrlFilter(),this.refreshDao()}filterEndDate(){this.functions.empty(this.filterUsed.endDate)&&(this.filterUsed.endDate=[]),this.filterUsed.endDate[0]={id:this.functions.empty(this.endDateFilter)?"":this.functions.formatDateObjectToDateString(this.endDateFilter,!0),label:this.functions.empty(this.endDateFilter)?"":this.functions.formatDateObjectToDateString(this.endDateFilter)},this.generateUrlFilter(),this.refreshDao()}addItemFilter(t){t.value.used=!0,this.functions.empty(this.filterUsed[t.id])&&(this.filterUsed[t.id]=[]),this.filterUsed[t.id].push(t.value),this.generateUrlFilter(),this.searchHistory.reset(),this.autoCompleteInput.nativeElement.blur(),this.refreshDao()}removeItemFilter(t,e,i){t.used=!1,this.filterUsed[e].splice(i,1),this.generateUrlFilter(),this.refreshDao()}generateUrlFilter(){this.filterUrl="";let t=[];Object.keys(this.filterUsed).forEach(e=>{this.filterUsed[e].forEach(i=>{this.functions.empty(i.id)||(["startDate","endDate"].indexOf(e)>-1?t.push(`${e}=${i.id}`):t.push(`${e}[]=${i.id}`))})}),t.length>0&&(this.filterUrl="&"+t.join("&"))}directSearchHistory(){this.refreshDao()}filter(t,e){if("string"==typeof t){const i=this.latinisePipe.transform(t.toLowerCase());return this.filterList[e].filter(t=>this.latinisePipe.transform(t.label.toLowerCase()).includes(i))}return this.filterList[e]}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(q.b),n.Qb(_t.a),n.Qb(Tt.c),n.Qb(Dt.a),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(Pq,!0),n.Kc(Kt.a,!0),n.Kc(Vq,!0),n.Kc(Rq,!0)),2&t&&(n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first),n.yc(i=n.ec())&&(e.autoCompleteInput=i.first))},decls:79,vars:54,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[2,"display","grid","grid-template-columns","repeat(2, 1fr)","grid-gap","10px","width","100%"],[1,"dateFilter",2,"cursor","pointer",3,"click"],[2,"color","white"],["matInput","","readonly","",2,"cursor","pointer",3,"ngModel","matDatepicker","placeholder","max","ngModelChange","dateChange"],["matSuffix","",3,"for",4,"ngIf"],[3,"touchUi"],["startPicker",""],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click",4,"ngIf"],["matInput","","readonly","",2,"cursor","pointer",3,"ngModel","matDatepicker","placeholder","min","ngModelChange","dateChange"],["endPicker",""],[1,"container"],[1,"container-content"],["class","example-loading-shade",4,"ngIf"],[1,"table-head"],[1,"table-head-result"],[3,"ngSubmit"],["floatLabel","never",2,"font-size","13px"],["type","text","matInput","","maxlength","128",3,"matAutocomplete","placeholder","formControl","click"],["autoCompleteInput",""],[3,"optionSelected","opened"],["auto","matAutocomplete"],["disabled","",4,"ngIf"],[4,"ngIf"],["mat-button","","matSuffix","","mat-icon-button","","type","submit",2,"float","right",3,"title","click"],["color","primary",1,"fa","fa-search"],[1,"table-head-tool"],[1,"paginatorResultList",3,"length","hidePageSize","pageSize"],["paginatorHistoryList",""],[2,"height","90%","overflow","auto","position","absolute","width","100%"],[1,"filterBadges"],[4,"ngFor","ngForOf"],["id","history-list","matSort","","matSortActive","event_date","matSortDirection","desc",2,"width","100%",3,"dataSource"],["tableHistoryListSort","matSort"],["matColumnDef","event_date"],["mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"title",4,"matCellDef"],["matColumnDef","total_processed"],[3,"empty",4,"matCellDef"],["matColumnDef","total_errors"],[3,"empty","error",4,"matCellDef"],["matColumnDef","info"],["mat-sort-header","","style","flex: 2;",4,"matHeaderCellDef"],["style","flex: 2;",4,"matCellDef"],["matColumnDef","module_name"],[4,"matCellDef"],[4,"matHeaderRowDef"],[4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["mat-list-item","",3,"active","routerLink",4,"ngFor","ngForOf"],["mat-list-item","",3,"routerLink"],["color","primary","mat-list-icon",""],["mat-line",""],["matSuffix","",3,"for"],["mat-button","","color","warn","matSuffix","","mat-icon-button","",3,"title","click"],["color","warn",1,"fa","fa-calendar-times"],[1,"example-loading-shade"],["disabled",""],[2,"display","flex","justify-content","center"],["diameter","35"],["class","filterList",3,"label",4,"ngIf"],[1,"filterList",3,"label"],[3,"id","color","value","disabled",4,"ngFor","ngForOf"],[3,"id","value","disabled"],["class","label",3,"background","title","click",4,"ngFor","ngForOf"],[1,"label",3,"title","click"],[1,"fa","fa-times-circle"],["mat-sort-header",""],["mat-cell","",3,"title"],["mat-sort-header","",2,"flex","2"],[2,"flex","2"]],template:function(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-sidenav-container",0),n.Oc(1,Aq,2,1,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Wb(10,"div",6),n.Wb(11,"div",7),n.Wb(12,"mat-form-field",8),n.dc("click",(function(){return n.Dc(t),n.zc(20).open()})),n.Wb(13,"mat-label",9),n.Qc(14),n.ic(15,"translate"),n.Vb(),n.Wb(16,"input",10),n.dc("ngModelChange",(function(t){return e.startDateFilter=t}))("dateChange",(function(){return e.filterStartDate()})),n.ic(17,"translate"),n.Vb(),n.Oc(18,Wq,1,1,"mat-datepicker-toggle",11),n.Rb(19,"mat-datepicker",12,13),n.Oc(21,Tq,3,3,"button",14),n.Vb(),n.Wb(22,"mat-form-field",8),n.dc("click",(function(){return n.Dc(t),n.zc(30).open()})),n.Wb(23,"mat-label",9),n.Qc(24),n.ic(25,"translate"),n.Vb(),n.Wb(26,"input",15),n.dc("ngModelChange",(function(t){return e.endDateFilter=t}))("dateChange",(function(){return e.filterEndDate()})),n.ic(27,"translate"),n.Vb(),n.Oc(28,Eq,1,1,"mat-datepicker-toggle",11),n.Rb(29,"mat-datepicker",12,16),n.Oc(31,Fq,3,3,"button",14),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(32,"div",17),n.Wb(33,"div",18),n.Oc(34,Qq,2,1,"div",19),n.Wb(35,"div",20),n.Wb(36,"div",21),n.Wb(37,"form",22),n.dc("ngSubmit",(function(){return e.directSearchHistory()})),n.Wb(38,"mat-form-field",23),n.Wb(39,"input",24,25),n.dc("click",(function(t){return t.stopPropagation()})),n.ic(41,"translate"),n.Vb(),n.Wb(42,"mat-autocomplete",26,27),n.dc("optionSelected",(function(t){return e.addItemFilter(t.option)}))("opened",(function(){return e.initFilterListHistory()})),n.Oc(44,Nq,3,0,"mat-option",28),n.Oc(45,$q,3,3,"ng-container",29),n.Vb(),n.Wb(46,"button",30),n.dc("click",(function(){return e.directSearchHistory()})),n.ic(47,"translate"),n.Rb(48,"mat-icon",31),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(49,"div",32),n.Rb(50,"mat-paginator",33,34),n.Vb(),n.Vb(),n.Wb(52,"div",35),n.Wb(53,"div",36),n.Oc(54,qq,2,2,"ng-container",37),n.ic(55,"keyvalue"),n.Vb(),n.Wb(56,"mat-table",38,39),n.Ub(58,40),n.Oc(59,Kq,3,3,"mat-header-cell",41),n.Oc(60,Yq,5,9,"mat-cell",42),n.Tb(),n.Ub(61,43),n.Oc(62,Jq,4,5,"mat-header-cell",41),n.Oc(63,Zq,2,3,"mat-cell",44),n.Tb(),n.Ub(64,45),n.Oc(65,tK,3,3,"mat-header-cell",41),n.Oc(66,eK,2,5,"mat-cell",46),n.Tb(),n.Ub(67,47),n.Oc(68,iK,3,3,"mat-header-cell",48),n.Oc(69,nK,2,1,"mat-cell",49),n.Tb(),n.Ub(70,50),n.Oc(71,aK,3,3,"mat-header-cell",41),n.Oc(72,sK,2,1,"mat-cell",51),n.Tb(),n.Oc(73,oK,1,0,"mat-header-row",52),n.Oc(74,rK,1,0,"mat-row",53),n.Vb(),n.Wb(75,"div",54),n.Qc(76),n.ic(77,"translate"),n.Vb(),n.Vb(),n.Rb(78,"div",20),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(20),i=n.zc(30),a=n.zc(43);n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(4),n.Sc("",n.jc(15,38,"lang.since")," "),n.Db(2),n.oc("ngModel",e.startDateFilter)("matDatepicker",t)("placeholder",n.jc(17,40,"lang.since"))("max",e.endDateFilter),n.Db(2),n.oc("ngIf",!e.startDateFilter),n.Db(1),n.oc("touchUi",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.startDateFilter),n.Db(3),n.Sc("",n.jc(25,42,"lang.until")," "),n.Db(2),n.oc("ngModel",e.endDateFilter)("matDatepicker",i)("placeholder",n.jc(27,44,"lang.until"))("min",e.startDateFilter),n.Db(2),n.oc("ngIf",!e.endDateFilter),n.Db(1),n.oc("touchUi",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.endDateFilter),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.isLoadingResults),n.Db(5),n.oc("matAutocomplete",a)("placeholder",n.jc(41,46,"lang.filterBy"))("formControl",e.searchHistory),n.Db(5),n.oc("ngIf",e.loadingFilters),n.Db(1),n.oc("ngIf",null!==e.filterList&&!e.loadingFilters),n.Db(1),n.oc("title",n.jc(47,48,"lang.search")),n.Db(4),n.oc("length",e.resultsLength)("hidePageSize",!0)("pageSize",10),n.Db(4),n.oc("ngForOf",n.jc(55,50,e.filterUsed)),n.Db(2),n.oc("dataSource",e.data),n.Db(17),n.oc("matHeaderRowDef",e.displayedColumnsHistory),n.Db(1),n.oc("matRowDefColumns",e.displayedColumnsHistory),n.Db(2),n.Tc(" ",e.resultsLength," ",n.jc(77,52,"lang.elements"),"")}},directives:[I.e,I.f,Ot,We,Y.c,Y.g,J.b,X.d,ae.h,X.u,X.x,P.t,ae.f,X.K,X.v,X.w,Ne.d,X.p,X.j,Ne.a,k.b,Y.j,S.a,Kt.a,P.s,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,R.h,R.d,o.f,R.c,W.l,ae.j,V.c,W.p,W.o,vt.h,Fe.b,vt.a,vt.j,vt.m],pipes:[g.d,P.l,P.b,Wt.a,uo,Tt.u,ps],styles:[".active[_ngcontent-%COMP%], .active[_ngcontent-%COMP%]:active, .active[_ngcontent-%COMP%]:focus, .active[_ngcontent-%COMP%]:hover{color:#135f7f;border-left:5px solid #135f7f;background:rgba(19,95,127,.14)}.paginatorResultList[_ngcontent-%COMP%] .mat-paginator-range-label{justify-content:flex-end;display:flex}.filterList[_ngcontent-%COMP%] .mat-optgroup-label{color:#135f7f;position:-webkit-sticky;position:sticky;top:0;background:#fff!important;z-index:1}.label[_ngcontent-%COMP%]{cursor:pointer;margin:5px}.bg-head-content[_ngcontent-%COMP%] .mat-focused .mat-form-field-label{color:#fff!important}.bg-head-content[_ngcontent-%COMP%] .mat-form-field-ripple, .bg-head-content[_ngcontent-%COMP%] .mat-form-field-underline{background-color:#fff!important}.bg-head-content[_ngcontent-%COMP%] .mat-datepicker-toggle[_ngcontent-%COMP%], .bg-head-content[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{color:#fff}.empty[_ngcontent-%COMP%]{opacity:.5}.error[_ngcontent-%COMP%]{color:#8e3e52;font-weight:700}"]}),t})();class lK{constructor(t){this.http=t}getRepoIssues(t,e,i,n,a,s){return this.http.get(`${n}?limit=10&offset=${10*i}&order=${e}&orderBy=${t}${a}${s}`)}}function dK(t,e){1&t&&(n.Wb(0,"div",10),n.Rb(1,"mat-spinner",11),n.Vb())}function hK(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",32),n.dc("removed",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).removeChrono(i)})),n.Wb(1,"span",33),n.Qc(2),n.Vb(),n.Qc(3),n.Rb(4,"mat-icon",34),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.oc("removable",!0),n.Db(2),n.Rc(i.chronoList.indexOf(t)+1),n.Db(1),n.Sc(" \xa0",t," ")}}function uK(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",32),n.dc("removed",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).removeResId(i)})),n.Wb(1,"span",33),n.Qc(2),n.Vb(),n.Qc(3),n.Rb(4,"mat-icon",34),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.oc("removable",!0),n.Db(2),n.Rc(i.resIdList.indexOf(t)+1),n.Db(1),n.Sc(" \xa0",t," ")}}function pK(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",12),n.Wb(1,"form",13,14),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Wb(3,"mat-tab-group",15),n.dc("selectedTabChange",(function(e){return n.Dc(t),n.hc().resetInput(e)})),n.Wb(4,"mat-tab",16),n.ic(5,"translate"),n.Wb(6,"div",17),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Wb(9,"mat-form-field"),n.Wb(10,"input",18),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().chrono=e})),n.ic(11,"translate"),n.ic(12,"translate"),n.Vb(),n.Vb(),n.Wb(13,"div",19),n.Wb(14,"div",20),n.Wb(15,"div",21),n.Wb(16,"button",22),n.dc("click",(function(){return n.Dc(t),n.hc().addChrono()})),n.Qc(17),n.ic(18,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(19,"mat-chip-list",23,24),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().chronoList=e})),n.Oc(21,hK,5,3,"mat-chip",25),n.Vb(),n.Vb(),n.Rb(22,"mat-divider"),n.Vb(),n.Wb(23,"mat-tab",16),n.ic(24,"translate"),n.Wb(25,"div",17),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Wb(28,"mat-form-field"),n.Wb(29,"input",26),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().resId=e})),n.ic(30,"translate"),n.ic(31,"translate"),n.Vb(),n.Vb(),n.Wb(32,"div",19),n.Wb(33,"div",20),n.Wb(34,"div",21),n.Wb(35,"button",27),n.dc("click",(function(){return n.Dc(t),n.hc().addResId()})),n.Qc(36),n.ic(37,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(38,"mat-chip-list",28,24),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().resIdList=e})),n.Oc(40,uK,5,3,"mat-chip",25),n.Vb(),n.Vb(),n.Rb(41,"mat-divider"),n.Vb(),n.Vb(),n.Wb(42,"plugin-autocomplete",29),n.dc("triggerEvent",(function(e){return n.Dc(t),n.hc().setStatus(e)})),n.ic(43,"translate"),n.ic(44,"translate"),n.Vb(),n.Wb(45,"div",20),n.Wb(46,"div",30),n.Wb(47,"button",31),n.Qc(48),n.ic(49,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(4),n.pc("label",n.jc(5,25,"lang.chronoNumber")),n.Db(3),n.Sc(" ",n.jc(8,27,"lang.updateStatusInformationsChrono")," "),n.Db(3),n.pc("title",n.jc(11,29,"lang.chronoNumber")),n.pc("placeholder",n.jc(12,31,"lang.chronoNumber")),n.oc("ngModel",t.chrono),n.Db(6),n.oc("disabled",!t.chrono),n.Db(1),n.Rc(n.jc(18,33,"lang.add")),n.Db(2),n.oc("ngModel",t.chronoList),n.Db(2),n.oc("ngForOf",t.chronoList),n.Db(2),n.pc("label",n.jc(24,35,"lang.resId")),n.Db(3),n.Sc(" ",n.jc(27,37,"lang.updateStatusInformationsGed")," "),n.Db(3),n.pc("title",n.jc(30,39,"lang.resId")),n.pc("placeholder",n.jc(31,41,"lang.resId")),n.oc("ngModel",t.resId),n.Db(6),n.oc("disabled",!t.resId),n.Db(1),n.Rc(n.jc(37,43,"lang.add")),n.Db(2),n.oc("ngModel",t.resIdList),n.Db(2),n.oc("ngForOf",t.resIdList),n.Db(2),n.oc("labelPlaceholder",n.jc(43,45,"lang.availableStatuses"))("labelList",n.jc(44,47,"lang.availableStatuses"))("datas",t.statuses)("targetSearchKey","idToDisplay")("subInfoKey","id"),n.Db(5),n.oc("disabled",0==t.resIdList.length&&0==t.chronoList.length||t.resIdList.length>0&&t.chronoList.length>0||!t.statusId),n.Db(1),n.Rc(n.jc(49,49,"lang.save"))}}let bK=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.loading=!1,this.statuses=[],this.statusId="",this.resId="",this.chrono="",this.resIdList=[],this.chronoList=[]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.updateStatus")),this.loading=!0,this.http.get("../rest/autocomplete/statuses").pipe(Object(mt.a)(t=>this.statuses=t),Object(mt.a)(()=>this.loading=!1)).subscribe()}onSubmit(){const t={status:this.statusId};this.resIdList.length>0?t.resId=this.resIdList:this.chronoList.length>0&&(t.chrono=this.chronoList),this.http.put("../rest/res/resource/status",t).subscribe(()=>{this.resId="",this.chrono="",this.statusId="",this.resIdList=[],this.chronoList=[],this.notify.success(this.translate.instant("lang.modificationSaved"))},t=>{this.notify.error(t.error.errors)})}addResId(){-1===this.resIdList.indexOf(this.resId)&&this.resIdList.push(this.resId),this.resId=""}addChrono(){-1===this.chronoList.indexOf(this.chrono)&&this.chronoList.push(this.chrono),this.chrono=""}setStatus(t){this.statusId=t.id}removeResId(t){const e=this.resIdList.indexOf(t);this.resIdList.splice(e,1)}removeChrono(t){const e=this.chronoList.indexOf(t);this.chronoList.splice(e,1)}resetInput(t){0===t.index?this.resId="":this.chrono=""}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:13,vars:8,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"form-horizontal",3,"ngSubmit"],["updateStatusForm","ngForm"],[3,"selectedTabChange"],[3,"label"],["role","alert",1,"alert","alert-info"],["matInput","","name","chrono",3,"title","placeholder","ngModel","ngModelChange"],[1,"row"],[1,"form-group"],[1,"col-md-12","text-left",2,"padding","10px"],["mat-raised-button","","type","button","color","primary",3,"disabled","click"],["name","chronoChips",3,"ngModel","ngModelChange"],["chipList",""],["color","primary",3,"removable","removed",4,"ngFor","ngForOf"],["type","number","id","","matInput","","name","resId",3,"title","placeholder","ngModel","ngModelChange"],["mat-raised-button","","color","primary","type","button",3,"disabled","click"],["name","resIdChips",3,"ngModel","ngModelChange"],["singleMode","","required","",3,"labelPlaceholder","labelList","datas","targetSearchKey","subInfoKey","triggerEvent"],[1,"col-md-12","text-center",2,"padding","10px"],["mat-raised-button","","color","primary",3,"disabled"],["color","primary",3,"removable","removed"],[1,"badge","badge-pill","badge-dark"],["matChipRemove","",1,"fa","fa-times-circle"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,dK,2,0,"div",8),n.Oc(12,pK,50,51,"mat-card",9),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,V.c,K.a,X.K,X.v,X.w,Te.c,Te.a,Y.c,J.b,X.d,X.u,X.x,k.b,ze.d,P.s,T.a,X.A,ii,ze.a,S.a,ze.e],pipes:[g.d],styles:[".mat-tab-body{overflow-y:hidden!important}.row[_ngcontent-%COMP%]{margin-left:0}"]}),t})();const fK=["snav2"],mK=["adminMenuTemplate"];function gK(t,e){if(1&t&&(n.Wb(0,"a",18),n.Rb(1,"mat-icon",19),n.Wb(2,"p",16),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Ib("active",t.current),n.oc("routerLink",t.route),n.Db(1),n.Fb(t.icon),n.Db(2),n.Sc(" ",t.label," ")}}function vK(t,e){if(1&t&&(n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",13),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",14),n.Rb(5,"mat-icon",15),n.Wb(6,"p",16),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Rb(9,"mat-divider"),n.Wb(10,"mat-nav-list"),n.Oc(11,gK,4,6,"a",17),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Rc(n.jc(3,3,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,5,"lang.add")," "),n.Db(4),n.oc("ngForOf",t.subMenus)}}function _K(t,e){1&t&&(n.Wb(0,"div",20),n.Rb(1,"mat-spinner",21),n.Vb())}function yK(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",49),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Sc("",n.jc(2,3,"lang.label")," ")}}function xK(t,e){if(1&t&&(n.Wb(0,"mat-cell",50),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Rc(t.label)}}function CK(t,e){1&t&&(n.Wb(0,"mat-header-cell",49),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.description")," "))}function OK(t,e){if(1&t&&(n.Wb(0,"mat-cell",50),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.description," ")}}function DK(t,e){1&t&&(n.Wb(0,"mat-header-cell",51),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.relatedContactNumber")," "))}function wK(t,e){if(1&t&&(n.Wb(0,"span"),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Rc(t.nbContacts)}}function MK(t,e){if(1&t&&(n.Wb(0,"span",55),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Rc(t.nbContacts)}}function kK(t,e){if(1&t&&(n.Wb(0,"mat-cell",52),n.Oc(1,wK,2,1,"span",53),n.Oc(2,MK,2,1,"span",54),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",0==t.nbContacts),n.Db(1),n.oc("ngIf",t.nbContacts>0)}}function SK(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",51),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Sc("",n.jc(2,3,"lang.public")," ")}}function IK(t,e){1&t&&(n.Wb(0,"span"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.no")," "))}function PK(t,e){1&t&&(n.Wb(0,"span"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.yes")," "))}function VK(t,e){if(1&t&&(n.Wb(0,"mat-cell",52),n.Oc(1,IK,3,3,"span",53),n.Oc(2,PK,3,3,"span",53),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.oc("ngIf",!t.public),n.Db(1),n.oc("ngIf",t.public)}}function RK(t,e){1&t&&(n.Wb(0,"mat-header-cell",51),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.createdBy")," "))}function jK(t,e){if(1&t&&(n.Wb(0,"mat-cell",52),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.labelledOwner," ")}}function AK(t,e){1&t&&n.Rb(0,"mat-header-cell")}function WK(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",56),n.Wb(1,"button",57),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.deleteContactsGroup(a.position)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",58),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.pc("matTooltip",n.jc(2,1,"lang.delete")))}function TK(t,e){1&t&&n.Rb(0,"mat-header-row")}function EK(t,e){1&t&&(n.Rb(0,"mat-row",59),n.ic(1,"translate")),2&t&&(n.qc("routerLink","/administration/contacts/contacts-groups/",e.$implicit.id,""),n.pc("matTooltip",n.jc(1,2,"lang.view")))}function FK(t,e){if(1&t&&(n.Wb(0,"mat-card",22),n.Wb(1,"div",23),n.Wb(2,"div",24),n.Wb(3,"mat-form-field"),n.Rb(4,"input",25),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Wb(6,"div",24),n.Rb(7,"mat-paginator",26,27),n.Vb(),n.Vb(),n.Wb(9,"mat-table",28,29),n.Ub(11,30),n.Oc(12,yK,3,5,"mat-header-cell",31),n.Oc(13,xK,2,3,"mat-cell",32),n.Tb(),n.Ub(14,33),n.Oc(15,CK,3,3,"mat-header-cell",34),n.Oc(16,OK,2,1,"mat-cell",35),n.Tb(),n.Ub(17,36),n.Oc(18,DK,3,3,"mat-header-cell",37),n.Oc(19,kK,3,2,"mat-cell",38),n.Tb(),n.Ub(20,39),n.Oc(21,SK,3,5,"mat-header-cell",40),n.Oc(22,VK,3,4,"mat-cell",41),n.Tb(),n.Ub(23,42),n.Oc(24,RK,3,3,"mat-header-cell",37),n.Oc(25,jK,2,1,"mat-cell",38),n.Tb(),n.Ub(26,43),n.Oc(27,AK,1,0,"mat-header-cell",44),n.Oc(28,WK,4,3,"mat-cell",45),n.Tb(),n.Oc(29,TK,1,0,"mat-header-row",46),n.Oc(30,EK,2,4,"mat-row",47),n.Vb(),n.Wb(31,"div",48),n.Qc(32),n.ic(33,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.pc("placeholder",n.jc(5,10,"lang.filterBy")),n.oc("formControl",t.adminService.getFilterField()),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.adminService.getDataSource()),n.Db(20),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns),n.Db(2),n.Tc(" ",t.contactsGroups.length," ",n.jc(33,12,"lang.contactsGroupsAlt"),"")}}let LK=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.functions=s,this.adminService=o,this.viewContainerRef=r,this.search=null,this.contactsGroups=[],this.titles=[],this.loading=!1,this.subMenus=[{icon:"fa fa-book",route:"/administration/contacts",label:this.translate.instant("lang.contactsList"),current:!1},{icon:"fa fa-code",route:"/administration/contacts/contactsCustomFields",label:this.translate.instant("lang.customFieldsAdmin"),current:!1},{icon:"fa fa-cog",route:"/administration/contacts/contacts-parameters",label:this.translate.instant("lang.contactsParameters"),current:!1},{icon:"fa fa-users",route:"/administration/contacts/contacts-groups",label:this.translate.instant("lang.contactsGroups"),current:!0},{icon:"fas fa-magic",route:"/administration/contacts/duplicates",label:this.translate.instant("lang.duplicatesContactsAdmin"),current:!1}],this.displayedColumns=["label","description","nbContacts","public","owner","actions"],this.filterColumns=["label","description"]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.contactsGroups")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,this.http.get("../rest/contactsGroups").subscribe(t=>{this.contactsGroups=t.contactsGroups,this.loading=!1,setTimeout(()=>{this.adminService.setDataSource("admin_contacts_groups",this.contactsGroups,this.sort,this.paginator,this.filterColumns)},0)},t=>{this.notify.handleErrors(t)})}deleteContactsGroup(t){const e=this.contactsGroups[t];confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.delete")+" \xab "+e.label+" \xbb")&&this.http.delete("../rest/contactsGroups/"+e.id).subscribe(()=>{const e=this.contactsGroups.length-1;this.contactsGroups[t]=this.contactsGroups[e],this.contactsGroups[t].position=t,this.contactsGroups.splice(e,1),this.adminService.setDataSource("admin_contacts_groups",this.contactsGroups,this.sort,this.paginator,this.filterColumns),this.notify.success(this.translate.instant("lang.contactsGroupDeleted"))},t=>{this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a),n.Qb(OL),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(fK,!0),n.Kc(mK,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:17,vars:10,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["position","end",3,"mode","fixedInViewport"],["snav2",""],["mat-subheader",""],["mat-list-item","","routerLink","/administration/contacts/contacts-groups/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],["mat-list-item","",3,"active","routerLink",4,"ngFor","ngForOf"],["mat-list-item","",3,"routerLink"],["color","primary","mat-list-icon",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"row"],[1,"col-md-6","col-xs-6"],["matInput","",3,"formControl","placeholder"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSortDisableClear","","matSort","",3,"dataSource"],["table",""],["matColumnDef","label"],["mat-sort-header","","style","flex:2;",3,"hide-for-mobile",4,"matHeaderCellDef"],["style","flex:2;",3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","description"],["mat-sort-header","","style","flex:2;",4,"matHeaderCellDef"],["style","flex:2;",4,"matCellDef"],["matColumnDef","nbContacts"],["mat-sort-header","","style","flex:1;",4,"matHeaderCellDef"],["style","flex:1;",4,"matCellDef"],["matColumnDef","public"],["mat-sort-header","","style","flex:1;",3,"hide-for-mobile",4,"matHeaderCellDef"],["style","flex:1;",3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","owner"],["matColumnDef","actions"],[4,"matHeaderCellDef"],["style","justify-content: flex-end;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"routerLink","matTooltip",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["mat-sort-header","",2,"flex","2"],[2,"flex","2"],["mat-sort-header","",2,"flex","1"],[2,"flex","1"],[4,"ngIf"],["color","primary","style","font-weight:bold;",4,"ngIf"],["color","primary",2,"font-weight","bold"],[2,"justify-content","flex-end"],["mat-icon-button","","color","warn",3,"matTooltip","click"],["aria-hidden","true",1,"fa","fa-trash-alt","fa-2x"],[2,"cursor","pointer",3,"routerLink","matTooltip"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,vK,12,7,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,_K,2,0,"div",9),n.Oc(14,FK,34,14,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Rb(15,"mat-sidenav",11,12),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode()))},directives:[I.e,I.f,Ot,We,P.t,I.d,R.h,R.g,R.d,o.f,S.a,R.c,W.l,T.a,P.s,V.c,K.a,Y.c,J.b,X.d,X.u,X.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,vt.h,Fe.b,vt.a,k.b,A.b,vt.j,vt.m,o.d],pipes:[g.d],styles:[".active[_ngcontent-%COMP%], .active[_ngcontent-%COMP%]:active, .active[_ngcontent-%COMP%]:focus, .active[_ngcontent-%COMP%]:hover{color:#135f7f;border-left:5px solid #135f7f;background:rgba(19,95,127,.14)}"]}),t})();const QK=["snav2"],NK=["adminMenuTemplate"],zK=["paginatorContactList"],BK=["paginatorAdded"],UK=["tableAdded"];function $K(t,e){if(1&t&&(n.Wb(0,"a",31),n.Rb(1,"mat-icon",32),n.Wb(2,"p",33),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Ib("active",t.current),n.oc("routerLink",t.route),n.Db(1),n.Fb(t.icon),n.Db(2),n.Sc(" ",t.label," ")}}function HK(t,e){if(1&t&&(n.Wb(0,"mat-nav-list"),n.Oc(1,$K,4,6,"a",30),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",t.subMenus)}}function GK(t,e){1&t&&(n.Wb(0,"div",34),n.Rb(1,"mat-spinner",35),n.Vb())}function XK(t,e){1&t&&(n.Rb(0,"div",60),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.limitDataReached_1000"),n.Ec)}function qK(t,e){1&t&&n.Rb(0,"mat-progress-bar",61)}function KK(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-header-cell",68),n.Wb(1,"mat-checkbox",69),n.dc("change",(function(e){n.Dc(t);const i=n.hc(4);return e?i.masterToggle(e):null})),n.Vb(),n.Vb()}if(2&t){const t=n.hc(4);n.Db(1),n.oc("checked",t.selection.hasValue())}}function YK(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",68),n.Wb(1,"mat-checkbox",70),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("change",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(4);return i?s.selection.toggle(a.id):null})),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(4);n.Db(1),n.qc("id","check_",t.id,""),n.oc("disabled",i.isInGrp(t))("checked",i.selection.isSelected(t.id))}}function JK(t,e){1&t&&(n.Wb(0,"mat-header-cell",71),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.contact")," "))}function ZK(t,e){if(1&t&&(n.Wb(0,"mat-cell",71),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.contact," ")}}function tY(t,e){1&t&&(n.Wb(0,"mat-header-cell",71),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.address")," "))}function eY(t,e){if(1&t&&(n.Wb(0,"mat-cell",71),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.address," ")}}function iY(t,e){1&t&&n.Rb(0,"mat-header-row")}const nY=function(t){return{opacity:t}};function aY(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-row",72),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(4).selectContact(i.id)})),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(4);n.oc("ngStyle",n.vc(1,nY,i.isInGrp(t)?"0.5":""))}}function sY(t,e){if(1&t&&(n.Wb(0,"mat-table",62,63),n.Ub(2,64),n.Oc(3,KK,2,1,"mat-header-cell",26),n.Oc(4,YK,2,3,"mat-cell",65),n.Tb(),n.Ub(5,21),n.Oc(6,JK,3,3,"mat-header-cell",66),n.Oc(7,ZK,2,1,"mat-cell",23),n.Tb(),n.Ub(8,24),n.Oc(9,tY,3,3,"mat-header-cell",66),n.Oc(10,eY,2,1,"mat-cell",23),n.Tb(),n.Oc(11,iY,1,0,"mat-header-row",28),n.Oc(12,aY,1,3,"mat-row",67),n.Vb()),2&t){const t=n.hc(3);n.oc("dataSource",t.dataSource),n.Db(11),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns)}}function oY(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tab",37),n.ic(1,"translate"),n.Wb(2,"div",14),n.Wb(3,"div",49),n.Wb(4,"mat-form-field",50),n.Wb(5,"span",51),n.Rb(6,"mat-icon",52),n.Qc(7,"\xa0\xa0 "),n.Vb(),n.Wb(8,"input",53),n.dc("keyup",(function(){return n.Dc(t),n.hc(2).launchLoading()})),n.ic(9,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(10,"div",15),n.Oc(11,XK,2,3,"div",54),n.Vb(),n.Wb(12,"div",15),n.Rb(13,"mat-paginator",17,55),n.Vb(),n.Vb(),n.Oc(15,qK,1,0,"mat-progress-bar",56),n.Oc(16,sY,13,3,"mat-table",57),n.Wb(17,"div",40),n.Wb(18,"div",58),n.Wb(19,"button",59),n.dc("click",(function(e){return n.Dc(t),n.hc(2).saveContactsList(e.target)})),n.Qc(20),n.ic(21,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.pc("label",n.jc(1,11,"lang.addContacts")),n.Db(8),n.pc("placeholder",n.jc(9,13,"lang.linkContact")),n.oc("formControl",t.searchTerm),n.Db(3),n.oc("ngIf",t.dataSource&&1e3==t.dataSource.data.length),n.Db(2),n.oc("length",0)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("ngIf",!t.dataSource&&!t.initAutoCompleteContact),n.Db(1),n.oc("ngIf",t.dataSource),n.Db(3),n.oc("disabled",0==t.selection.selected.length),n.Db(1),n.Rc(n.jc(21,15,"lang.add"))}}function rY(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",36),n.Wb(1,"mat-tab-group"),n.Wb(2,"mat-tab",37),n.ic(3,"translate"),n.Wb(4,"form",38,39),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Wb(6,"div",40),n.Wb(7,"div",41),n.Wb(8,"mat-form-field"),n.Wb(9,"input",42),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().contactsGroup.label=e})),n.ic(10,"translate"),n.ic(11,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(12,"div",40),n.Wb(13,"div",41),n.Wb(14,"mat-form-field"),n.Wb(15,"input",43),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().contactsGroup.description=e})),n.ic(16,"translate"),n.ic(17,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(18,"div",40),n.Wb(19,"div",44),n.Wb(20,"mat-slide-toggle",45),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().contactsGroup.public=e})),n.ic(21,"translate"),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(24,"div",40),n.Wb(25,"div",46),n.Wb(26,"button",47),n.Qc(27),n.ic(28,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Oc(29,oY,22,17,"mat-tab",48),n.Vb(),n.Vb()}if(2&t){const t=n.zc(5),e=n.hc();n.Db(2),n.pc("label",n.jc(3,14,"lang.informations")),n.Db(7),n.pc("title",n.jc(10,16,"lang.label")),n.pc("placeholder",n.jc(11,18,"lang.label")),n.oc("ngModel",e.contactsGroup.label),n.Db(6),n.pc("title",n.jc(16,20,"lang.description")),n.pc("placeholder",n.jc(17,22,"lang.description")),n.oc("ngModel",e.contactsGroup.description),n.Db(5),n.pc("title",n.jc(21,24,"lang.contactsGroupDesc")),n.oc("ngModel",e.contactsGroup.public)("checked",e.contactsGroup.public),n.Db(2),n.Rc(n.jc(23,26,"lang.public")),n.Db(4),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(28,28,"lang.save")),n.Db(2),n.oc("ngIf",!e.creationMode)}}function cY(t,e){1&t&&(n.Wb(0,"mat-header-cell",73),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.contact")," "))}function lY(t,e){if(1&t&&(n.Wb(0,"mat-cell",71),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.contact," ")}}function dY(t,e){1&t&&(n.Wb(0,"mat-header-cell",73),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.address")," "))}function hY(t,e){if(1&t&&(n.Wb(0,"mat-cell",71),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.address," ")}}function uY(t,e){1&t&&n.Rb(0,"mat-header-cell",68)}function pY(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",74),n.Wb(1,"button",75),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc();return i.stopPropagation(),s.preDelete(a.position)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",76),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.pc("matTooltip",n.jc(2,1,"lang.delete")))}function bY(t,e){1&t&&n.Rb(0,"mat-header-row")}function fY(t,e){1&t&&n.Rb(0,"mat-row")}let mY=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.route=i,this.router=n,this.notify=a,this.headerService=s,this.appService=o,this.viewContainerRef=r,this.subMenus=[{icon:"fa fa-book",route:"/administration/contacts",label:this.translate.instant("lang.contactsList"),current:!1},{icon:"fa fa-code",route:"/administration/contacts/contactsCustomFields",label:this.translate.instant("lang.customFieldsAdmin"),current:!1},{icon:"fa fa-cog",route:"/administration/contacts/contacts-parameters",label:this.translate.instant("lang.contactsParameters"),current:!1},{icon:"fa fa-users",route:"/administration/contacts/contacts-groups",label:this.translate.instant("lang.contactsGroups"),current:!1},{icon:"fas fa-magic",route:"/administration/contacts/duplicates",label:this.translate.instant("lang.duplicatesContactsAdmin"),current:!1}],this.contactsGroup={},this.loading=!1,this.initAutoCompleteContact=!0,this.searchTerm=new X.i,this.searchResult=[],this.displayedColumns=["select","contact","address"],this.displayedColumnsAdded=["contact","address","actions"],this.selection=new O.c(!0,[]),this.searchTerm.valueChanges.pipe(Object(pt.a)(500),Object(d.a)(t=>t.length>2),Object(bt.a)(),Object(ft.a)(t=>this.http.get("../rest/autocomplete/contacts",{params:{search:t}}))).subscribe(t=>{this.searchResult=t,this.dataSource=new vt.p(this.searchResult),this.dataSource.paginator=this.paginator})}masterToggle(t){t.checked?this.dataSource.data.forEach(t=>{$("#check_"+t.id+"-input").is(":disabled")||this.selection.select(t.id)}):this.selection.clear()}applyFilter(t){t=(t=t.trim()).toLowerCase(),this.dataSourceAdded.filter=t}ngOnInit(){this.loading=!0,this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.route.params.subscribe(t=>{void 0===t.id?(this.headerService.setHeader(this.translate.instant("lang.contactGroupCreation")),this.creationMode=!0,this.contactsGroup.public=!1,this.loading=!1):(this.creationMode=!1,this.http.get("../rest/contactsGroups/"+t.id).subscribe(t=>{this.contactsGroup=t.contactsGroup,this.headerService.setHeader(this.translate.instant("lang.contactsGroupModification"),this.contactsGroup.label),this.nbContact=this.contactsGroup.nbContacts,setTimeout(()=>{this.dataSourceAdded=new vt.p(this.contactsGroup.contacts),this.dataSourceAdded.paginator=this.paginatorAdded,this.dataSourceAdded.sort=this.sortAdded},0),this.loading=!1}))})}saveContactsList(t){t.textContent=this.translate.instant("lang.loading")+"...",t.disabled=!0,this.http.post("../rest/contactsGroups/"+this.contactsGroup.id+"/contacts",{contacts:this.selection.selected}).subscribe(e=>{this.notify.success(this.translate.instant("lang.contactAdded")),this.nbContact=this.nbContact+this.selection.selected.length,this.selection.clear(),t.textContent=this.translate.instant("lang.add"),this.contactsGroup=e.contactsGroup,setTimeout(()=>{this.dataSourceAdded=new vt.p(this.contactsGroup.contacts),this.dataSourceAdded.paginator=this.paginatorAdded,this.dataSourceAdded.sort=this.sortAdded},0)},t=>{this.notify.error(t.error.errors)})}onSubmit(){this.creationMode?this.http.post("../rest/contactsGroups",this.contactsGroup).subscribe(t=>{this.router.navigate(["/administration/contacts/contacts-groups/"+t.contactsGroup]),this.notify.success(this.translate.instant("lang.contactsGroupAdded"))},t=>{this.notify.error(t.error.errors)}):this.http.put("../rest/contactsGroups/"+this.contactsGroup.id,this.contactsGroup).subscribe(()=>{this.router.navigate(["/administration/contacts-groups"]),this.notify.success(this.translate.instant("lang.contactsGroupUpdated"))},t=>{this.notify.error(t.error.errors)})}preDelete(t){confirm(this.translate.instant("lang.reallyWantToDeleteContactFromGroup"))&&this.removeContact(this.contactsGroup.contacts[t],t)}removeContact(t,e){this.http.delete("../rest/contactsGroups/"+this.contactsGroup.id+"/contacts/"+t.id).subscribe(()=>{const t=this.contactsGroup.contacts.length-1;this.contactsGroup.contacts[e]=this.contactsGroup.contacts[t],this.contactsGroup.contacts[e].position=e,this.contactsGroup.contacts.splice(t,1),this.nbContact=this.nbContact-1,this.dataSourceAdded=new vt.p(this.contactsGroup.contacts),this.dataSourceAdded.paginator=this.paginatorAdded,this.dataSourceAdded.sort=this.sortAdded,this.notify.success(this.translate.instant("lang.contactDeletedFromGroup"))},t=>{this.notify.error(t.error.errors)})}launchLoading(){this.searchTerm.value.length>2&&(this.dataSource=null,this.initAutoCompleteContact=!1)}isInGrp(t){let e=!1;return this.contactsGroup.contacts.forEach(i=>{i.id==t.id&&(e=!0)}),e}selectContact(t){$("#check_"+t+"-input").is(":disabled")||this.selection.toggle(t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(QK,!0),n.Kc(NK,!0),n.Kc(zK,!0),n.Kc(BK,!0),n.Kc(UK,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.paginatorAdded=i.first),n.yc(i=n.ec())&&(e.sortAdded=i.first))},decls:42,vars:24,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["position","end",2,"overflow-x","hidden","width","40%",3,"mode","fixedInViewport","opened"],["snav2",""],["mat-subheader",""],[1,"row",2,"margin","0px"],[1,"col-md-6","col-xs-6"],["matInput","",3,"placeholder","keyup"],[3,"length","hidePageSize","pageSize"],["paginatorAdded",""],["matSort","","matSortActive","contact","matSortDirection","asc",3,"dataSource"],["tableAdded","matSort"],["matColumnDef","contact"],["mat-sort-header","","style","flex:3;",4,"matHeaderCellDef"],["style","flex:3;",4,"matCellDef"],["matColumnDef","address"],["matColumnDef","actions"],["style","flex:1;",4,"matHeaderCellDef"],["style","justify-content: flex-end;flex:1;",4,"matCellDef"],[4,"matHeaderRowDef"],[4,"matRowDef","matRowDefColumns"],["mat-list-item","",3,"active","routerLink",4,"ngFor","ngForOf"],["mat-list-item","",3,"routerLink"],["color","primary","mat-list-icon",""],["mat-line",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[3,"label"],[1,"form-horizontal",3,"ngSubmit"],["contactsGroupFormUp","ngForm"],[1,"form-group"],[1,"col-sm-12"],["matInput","","required","","name","label","id","label","type","text","maxlength","32",3,"ngModel","title","placeholder","ngModelChange"],["matInput","","required","","name","description","id","description","type","text","maxlength","255",3,"ngModel","title","placeholder","ngModelChange"],[1,"col-sm-6",2,"text-align","center"],["name","public","id","public","color","primary",3,"title","ngModel","checked","ngModelChange"],[1,"col-sm-12",2,"text-align","center"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],[3,"label",4,"ngIf"],[1,"col-md-8",2,"padding","5px"],["hintLabel","3 caract\xe8res minium"],["matPrefix",""],["color","primary",1,"fa","fa-user-plus"],["type","text","matInput","","autocomplete","off","minlength","3",1,"autocompleteSearch",3,"placeholder","formControl","keyup"],["class","alert alert-danger",3,"innerHTML",4,"ngIf"],["paginatorContactList",""],["mode","indeterminate",4,"ngIf"],[3,"dataSource",4,"ngIf"],[1,"col-sm-12",2,"text-align","center","margin-top","30px"],["mat-raised-button","","color","primary","type","button",3,"disabled","click"],[1,"alert","alert-danger",3,"innerHTML"],["mode","indeterminate"],[3,"dataSource"],["tableContactList",""],["matColumnDef","select"],["style","flex:1;",4,"matCellDef"],["style","flex:3;",4,"matHeaderCellDef"],["style","cursor: pointer;",3,"ngStyle","click",4,"matRowDef","matRowDefColumns"],[2,"flex","1"],["color","primary",3,"checked","change"],["color","primary",3,"id","disabled","checked","click","change"],[2,"flex","3"],[2,"cursor","pointer",3,"ngStyle","click"],["mat-sort-header","",2,"flex","3"],[2,"justify-content","flex-end","flex","1"],["mat-icon-button","","color","warn",3,"matTooltip","click"],["aria-hidden","true",1,"fa","fa-trash-alt","fa-2x"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,HK,2,1,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,GK,2,0,"div",9),n.Oc(14,rY,30,30,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Wb(15,"mat-sidenav",11,12),n.Wb(17,"mat-list"),n.Wb(18,"h3",13),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Vb(),n.Wb(21,"div",14),n.Wb(22,"div",15),n.Wb(23,"mat-form-field"),n.Wb(24,"input",16),n.dc("keyup",(function(t){return e.applyFilter(t.target.value)})),n.ic(25,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(26,"div",15),n.Rb(27,"mat-paginator",17,18),n.Vb(),n.Vb(),n.Wb(29,"mat-table",19,20),n.Ub(31,21),n.Oc(32,cY,3,3,"mat-header-cell",22),n.Oc(33,lY,2,1,"mat-cell",23),n.Tb(),n.Ub(34,24),n.Oc(35,dY,3,3,"mat-header-cell",22),n.Oc(36,hY,2,1,"mat-cell",23),n.Tb(),n.Ub(37,25),n.Oc(38,uY,1,0,"mat-header-cell",26),n.Oc(39,pY,4,3,"mat-cell",27),n.Tb(),n.Oc(40,bY,1,0,"mat-header-row",28),n.Oc(41,fY,1,0,"mat-row",29),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",!e.appService.getViewMode()&&!e.creationMode),n.Db(4),n.Tc("",e.nbContact," ",n.jc(20,20,"lang.relatedContacts")," : "),n.Db(5),n.pc("placeholder",n.jc(25,22,"lang.filterBy")),n.Db(3),n.oc("length",0)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",e.dataSourceAdded),n.Db(11),n.oc("matHeaderRowDef",e.displayedColumnsAdded),n.Db(1),n.oc("matRowDefColumns",e.displayedColumnsAdded))},directives:[I.e,I.f,Ot,We,P.t,I.d,R.a,R.g,Y.c,J.b,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,R.h,P.s,R.d,o.f,S.a,R.c,W.l,V.c,K.a,Te.c,Te.a,X.K,X.v,X.w,X.d,X.F,X.p,X.u,X.x,te.a,k.b,Y.i,X.q,X.j,ni.a,vt.h,j.a,vt.a,vt.j,vt.m,P.w,Fe.b,A.b],pipes:[g.d],styles:[".active[_ngcontent-%COMP%], .active[_ngcontent-%COMP%]:active, .active[_ngcontent-%COMP%]:focus, .active[_ngcontent-%COMP%]:hover{color:#135f7f;border-left:5px solid #135f7f;background:rgba(19,95,127,.14)}"]}),t})();var gY=i("5RNC");const vY=["adminMenuTemplate"];function _Y(t,e){1&t&&(n.Wb(0,"span"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.disabledContactsFilling")))}function yY(t,e){1&t&&(n.Wb(0,"span"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.enabledContactsFilling")))}function xY(t,e){if(1&t&&(n.Wb(0,"a",18),n.Rb(1,"mat-icon",13),n.Wb(2,"p",19),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Ib("active",t.current),n.oc("routerLink",t.route),n.Db(1),n.Fb(t.icon),n.Db(2),n.Sc(" ",t.label," ")}}const CY=function(t){return{opacity:t}};function OY(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",11),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",12),n.Wb(5,"mat-icon",13),n.Wb(6,"mat-slide-toggle",14),n.dc("change",(function(){return n.Dc(t),n.hc().toggleFillingContact()})),n.Vb(),n.Vb(),n.Wb(7,"p",15),n.dc("click",(function(){return n.Dc(t),n.hc().toggleFillingContact()})),n.Oc(8,_Y,3,3,"span",16),n.Oc(9,yY,3,3,"span",16),n.Vb(),n.Vb(),n.Vb(),n.Rb(10,"mat-divider"),n.Wb(11,"mat-nav-list"),n.Oc(12,xY,4,6,"a",17),n.Vb()}if(2&t){const t=n.hc();n.Db(2),n.Rc(n.jc(3,6,"lang.actions")),n.Db(4),n.oc("checked",t.contactsFilling.enable),n.Db(1),n.oc("ngStyle",n.vc(8,CY,t.contactsFilling.enable?"":"0.5")),n.Db(1),n.oc("ngIf",t.contactsFilling.enable),n.Db(1),n.oc("ngIf",!t.contactsFilling.enable),n.Db(3),n.oc("ngForOf",t.subMenus)}}function DY(t,e){1&t&&(n.Wb(0,"div",20),n.Rb(1,"mat-spinner",21),n.Vb())}function wY(t,e){1&t&&(n.Wb(0,"mat-header-cell",42),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.label")))}function MY(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Wb(1,"div"),n.Qc(2),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.label)}}function kY(t,e){1&t&&(n.Wb(0,"mat-header-cell",42),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.mandatory")))}function SY(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell"),n.Wb(1,"mat-slide-toggle",43),n.dc("change",(function(i){n.Dc(t);const a=e.$implicit;return n.hc(2).addCriteria(i,a,"mandatory")})),n.ic(2,"translate"),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.pc("title",n.jc(2,3,"lang.mandatory")),n.oc("disabled","lastname"==t.identifier||"company"==t.identifier)("checked",t.mandatory)}}function IY(t,e){1&t&&(n.Wb(0,"mat-header-cell",42),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.contactsFillingCriteria")," "))}function PY(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell"),n.Wb(1,"mat-slide-toggle",44),n.dc("change",(function(i){n.Dc(t);const a=e.$implicit;return n.hc(2).addCriteria(i,a,"filling")})),n.ic(2,"translate"),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.pc("title",n.jc(2,2,"lang.contactsFillingCriteria")),n.oc("checked",t.filling)}}function VY(t,e){1&t&&(n.Wb(0,"mat-header-cell",42),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.autocompletionSearchable")," "))}function RY(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell"),n.Wb(1,"mat-slide-toggle",43),n.dc("change",(function(i){n.Dc(t);const a=e.$implicit;return n.hc(2).addCriteria(i,a,"searchable")})),n.ic(2,"translate"),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.pc("title",n.jc(2,3,"lang.autocompletionSearchable")),n.oc("disabled","lastname"==t.identifier||"company"==t.identifier||"civility"==t.identifier)("checked",t.searchable)}}function jY(t,e){1&t&&(n.Wb(0,"mat-header-cell",42),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.autocompletionDisplayable")," "))}function AY(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell"),n.Wb(1,"mat-slide-toggle",43),n.dc("change",(function(i){n.Dc(t);const a=e.$implicit;return n.hc(2).addCriteria(i,a,"displayable")})),n.ic(2,"translate"),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.pc("title",n.jc(2,3,"lang.autocompletionDisplayable")),n.oc("disabled","lastname"==t.identifier||"company"==t.identifier)("checked",t.displayable)}}function WY(t,e){1&t&&n.Rb(0,"mat-header-row")}function TY(t,e){1&t&&n.Rb(0,"mat-row")}const EY=function(t){return{color:t}};function FY(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",22),n.Wb(1,"div",23),n.Wb(2,"div",24),n.Wb(3,"mat-card",25),n.Wb(4,"mat-card-header"),n.Wb(5,"mat-card-title"),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Vb(),n.Wb(8,"p"),n.Qc(9),n.ic(10,"translate"),n.Wb(11,"b",26),n.Qc(12,"0%"),n.Vb(),n.Qc(13),n.ic(14,"translate"),n.Wb(15,"b",26),n.Qc(16),n.Vb(),n.Qc(17),n.ic(18,"translate"),n.Vb(),n.Wb(19,"mat-slider",27),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().contactsFilling.first_threshold=e}))("change",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Vb(),n.Rb(20,"input",28),n.Vb(),n.Vb(),n.Wb(21,"div",24),n.Wb(22,"mat-card",25),n.Wb(23,"mat-card-header"),n.Wb(24,"mat-card-title"),n.Qc(25),n.ic(26,"translate"),n.Vb(),n.Vb(),n.Wb(27,"p"),n.Qc(28),n.ic(29,"translate"),n.Wb(30,"b",26),n.Qc(31),n.Vb(),n.Qc(32),n.ic(33,"translate"),n.Wb(34,"b",26),n.Qc(35),n.Vb(),n.Qc(36),n.ic(37,"translate"),n.Vb(),n.Wb(38,"mat-slider",29),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().contactsFilling.second_threshold=e}))("change",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Vb(),n.Rb(39,"input",28),n.Vb(),n.Vb(),n.Wb(40,"div",24),n.Wb(41,"mat-card",25),n.Wb(42,"mat-card-header"),n.Wb(43,"mat-card-title"),n.Qc(44),n.ic(45,"translate"),n.Vb(),n.Vb(),n.Wb(46,"p"),n.Qc(47),n.ic(48,"translate"),n.Wb(49,"b",26),n.Qc(50),n.Vb(),n.Qc(51),n.ic(52,"translate"),n.Wb(53,"b",26),n.Qc(54,"100%"),n.Vb(),n.Qc(55),n.ic(56,"translate"),n.Vb(),n.Rb(57,"mat-slider",30),n.Rb(58,"input",28),n.Vb(),n.Vb(),n.Vb(),n.Wb(59,"mat-table",31,32),n.Ub(61,33),n.Oc(62,wY,3,3,"mat-header-cell",34),n.Oc(63,MY,3,1,"mat-cell",35),n.Tb(),n.Ub(64,36),n.Oc(65,kY,3,3,"mat-header-cell",34),n.Oc(66,SY,3,5,"mat-cell",35),n.Tb(),n.Ub(67,37),n.Oc(68,IY,3,3,"mat-header-cell",34),n.Oc(69,PY,3,4,"mat-cell",35),n.Tb(),n.Ub(70,38),n.Oc(71,VY,3,3,"mat-header-cell",34),n.Oc(72,RY,3,5,"mat-cell",35),n.Tb(),n.Ub(73,39),n.Oc(74,jY,3,3,"mat-header-cell",34),n.Oc(75,AY,3,5,"mat-cell",35),n.Tb(),n.Oc(76,WY,1,0,"mat-header-row",40),n.Oc(77,TY,1,0,"mat-row",41),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(6),n.Rc(n.jc(7,31,"lang.contactsFillingStep1")),n.Db(3),n.Sc("",n.jc(10,33,"lang.fromRange")," "),n.Db(2),n.oc("ngStyle",n.vc(55,EY,t.fillingColor.first_threshold)),n.Db(2),n.Sc(" ",n.jc(14,35,"lang.toRange")," "),n.Db(2),n.oc("ngStyle",n.vc(57,EY,t.fillingColor.first_threshold)),n.Db(1),n.Sc("",t.contactsFilling.first_threshold,"%"),n.Db(1),n.Sc(" ",n.jc(18,37,"lang.contactsFillingStr"),""),n.Db(2),n.oc("ngModel",t.contactsFilling.first_threshold),n.Db(1),n.pc("value",t.fillingColor.first_threshold),n.Db(5),n.Rc(n.jc(26,39,"lang.contactsFillingStep2")),n.Db(3),n.Sc("",n.jc(29,41,"lang.fromRange")," "),n.Db(2),n.oc("ngStyle",n.vc(59,EY,t.fillingColor.second_threshold)),n.Db(1),n.Sc("",t.contactsFilling.first_threshold+1,"%"),n.Db(1),n.Sc(" ",n.jc(33,43,"lang.toRange")," "),n.Db(2),n.oc("ngStyle",n.vc(61,EY,t.fillingColor.second_threshold)),n.Db(1),n.Sc("",t.contactsFilling.second_threshold,"%"),n.Db(1),n.Sc(" ",n.jc(37,45,"lang.contactsFillingStr"),""),n.Db(2),n.oc("ngModel",t.contactsFilling.second_threshold)("min",t.contactsFilling.first_threshold+1),n.Db(1),n.pc("value",t.fillingColor.second_threshold),n.Db(5),n.Rc(n.jc(45,47,"lang.contactsFillingStep3")),n.Db(3),n.Sc("",n.jc(48,49,"lang.fromRange")," "),n.Db(2),n.oc("ngStyle",n.vc(63,EY,t.fillingColor.third_threshold)),n.Db(1),n.Sc("",t.contactsFilling.second_threshold+1,"%"),n.Db(1),n.Sc(" ",n.jc(52,51,"lang.toRange")," "),n.Db(2),n.oc("ngStyle",n.vc(65,EY,t.fillingColor.third_threshold)),n.Db(2),n.Sc(" ",n.jc(56,53,"lang.contactsFillingStr"),""),n.Db(3),n.pc("value",t.fillingColor.third_threshold),n.Db(1),n.oc("dataSource",t.dataSource),n.Db(17),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns)}}let LY=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.functionsService=s,this.viewContainerRef=o,this.subMenus=[{icon:"fa fa-book",route:"/administration/contacts",label:this.translate.instant("lang.contactsList"),current:!1},{icon:"fa fa-code",route:"/administration/contacts/contactsCustomFields",label:this.translate.instant("lang.customFieldsAdmin"),current:!1},{icon:"fa fa-cog",route:"/administration/contacts/contacts-parameters",label:this.translate.instant("lang.contactsParameters"),current:!0},{icon:"fa fa-users",route:"/administration/contacts/contacts-groups",label:this.translate.instant("lang.contactsGroups"),current:!1},{icon:"fas fa-magic",route:"/administration/contacts/duplicates",label:this.translate.instant("lang.duplicatesContactsAdmin"),current:!1}],this.contactsFilling={enable:!1,first_threshold:"33",second_threshold:"66"},this.contactsParameters=[],this.arrRatingColumns=[],this.fillingColor={first_threshold:"#E81C2B",second_threshold:"#F4891E",third_threshold:"#0AA34F"},this.loading=!1,this.dataSource=new vt.p(this.contactsParameters),this.displayedColumns=["label","mandatory","filling","searchable","displayable"]}ngOnInit(){this.loading=!0,this.headerService.setHeader(this.translate.instant("lang.contactsParameters")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.http.get("../rest/contactsParameters").subscribe(t=>{this.contactsFilling=t.contactsFilling,this.contactsParameters=t.contactsParameters.map(t=>Object.assign(Object.assign({},t),{label:this.functionsService.empty(t.label)?this.translate.instant("lang.contactsParameters_"+t.identifier):t.label})),this.loading=!1,setTimeout(()=>{this.dataSource=new vt.p(this.contactsParameters),this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort},0)})}addCriteria(t,e,i){this.contactsParameters.forEach((n,a)=>{n.id==e.id&&(this.contactsParameters[a][i]=t.checked)}),this.onSubmit()}onSubmit(){this.contactsFilling.first_threshold>=this.contactsFilling.second_threshold&&(this.contactsFilling.second_threshold=this.contactsFilling.first_threshold+1),this.http.put("../rest/contactsParameters",{contactsFilling:this.contactsFilling,contactsParameters:this.contactsParameters}).subscribe(()=>{this.notify.success(this.translate.instant("lang.parameterUpdated"))},t=>{this.notify.error(t.error.errors)})}toggleFillingContact(){this.contactsFilling.enable=!0!==this.contactsFilling.enable,this.onSubmit()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(vY,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:15,vars:8,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["mat-subheader",""],["mat-list-item","","disableRipple","true"],["color","primary","mat-list-icon",""],["color","primary",3,"checked","change"],["mat-line","",3,"ngStyle","click"],[4,"ngIf"],["mat-list-item","",3,"active","routerLink",4,"ngFor","ngForOf"],["mat-list-item","",3,"routerLink"],["mat-line",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"row"],[1,"col-md-4","col-xs-12"],[2,"margin-bottom","5px"],[3,"ngStyle"],["color","primary","max","98","min","1","step","1","thumbLabel","true",2,"width","100%",3,"ngModel","ngModelChange","change"],["disabled","","matInput","","type","color","name","color",3,"value"],["color","primary","max","99","step","1","thumbLabel","true",2,"width","100%",3,"ngModel","min","ngModelChange","change"],["color","primary","max","100","min","100","step","1","thumbLabel","true","disabled","",2,"width","100%"],["matSort","",3,"dataSource"],["table",""],["matColumnDef","label"],["mat-sort-header","",4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","mandatory"],["matColumnDef","filling"],["matColumnDef","searchable"],["matColumnDef","displayable"],[4,"matHeaderRowDef"],[4,"matRowDef","matRowDefColumns"],["mat-sort-header",""],["color","primary",2,"margin-left","11px",3,"disabled","title","checked","change"],["color","primary",2,"margin-left","11px",3,"title","checked","change"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,OY,13,10,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,DY,2,0,"div",9),n.Oc(14,FY,78,67,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,R.h,R.g,R.d,S.a,R.c,te.a,W.l,P.w,T.a,P.s,o.f,V.c,K.a,K.f,K.m,gY.a,X.u,X.x,J.b,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,vt.h,Fe.b,vt.a,vt.j,vt.m],pipes:[g.d],styles:[".active[_ngcontent-%COMP%], .active[_ngcontent-%COMP%]:active, .active[_ngcontent-%COMP%]:focus, .active[_ngcontent-%COMP%]:hover{color:#135f7f;border-left:5px solid #135f7f;background:rgba(19,95,127,.14)}"]}),t})();const QY=["snav2"];function NY(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Qc(2,"\xa0 "),n.Wb(3,"div"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb()),2&t&&(n.Db(4),n.Sc(" ",n.jc(5,1,"lang.updateInProgress")," "))}function zY(t,e){1&t&&(n.Wb(0,"div",17),n.Rb(1,"mat-spinner",18),n.Vb())}function BY(t,e){1&t&&(n.Wb(0,"div",24),n.Rb(1,"mat-icon",25),n.Wb(2,"span",26),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Rb(5,"mat-icon",27),n.Vb()),2&t&&(n.Db(3),n.Sc("",n.jc(4,1,"lang.appUpToDate")," !"))}function UY(t,e){if(1&t&&(n.Wb(0,"div",28),n.Rb(1,"mat-icon",29),n.Wb(2,"span",26),n.Qc(3),n.ic(4,"translate"),n.Wb(5,"a",30),n.Qc(6),n.Vb(),n.Vb(),n.Rb(7,"mat-icon",31),n.Vb()),2&t){const t=n.hc(2);n.Db(3),n.Sc(" ",n.jc(4,3,"lang.newVersionAvailable")," ! "),n.Db(2),n.qc("href","https://labs.maarch.org/maarch/MaarchCourrier/tags/",t.versions.lastAvailableMinorVersion,"",n.Gc),n.Db(1),n.Rc(t.versions.lastAvailableMinorVersion)}}function $Y(t,e){if(1&t&&(n.Rb(0,"div",32),n.ic(1,"translate")),2&t){const t=n.hc(2);n.oc("innerHTML",n.jc(1,1,"lang.updateWarn")+t.versions.diffOutput.join("<br/>"),n.Ec)}}function HY(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",33),n.Wb(1,"button",34),n.dc("click",(function(){return n.Dc(t),n.hc(2).updateVersionAccess()})),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(1),n.oc("disabled",!t.versions.canUpdate),n.Db(1),n.Rc(n.jc(3,2,"lang.makeUpdate"))}}function GY(t,e){if(1&t&&(n.Wb(0,"mat-card",19),n.Oc(1,BY,6,3,"div",20),n.Oc(2,UY,8,5,"div",21),n.Oc(3,$Y,2,3,"div",22),n.Oc(4,HY,4,4,"div",23),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",null==t.versions.lastAvailableMinorVersion),n.Db(1),n.oc("ngIf",null!=t.versions.lastAvailableMinorVersion),n.Db(1),n.oc("ngIf",!t.versions.canUpdate&&null!=t.versions.lastAvailableMinorVersion),n.Db(1),n.oc("ngIf",null!=t.versions.lastAvailableMinorVersion)}}function XY(t,e){if(1&t&&(n.Wb(0,"div",35),n.Qc(1," Maarch Courrier\xa0"),n.Wb(2,"a",30),n.Qc(3),n.Vb(),n.Qc(4),n.ic(5,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(2),n.qc("href","https://labs.maarch.org/maarch/MaarchCourrier/tags/",t.versions.lastAvailableMajorVersion,"",n.Gc),n.Db(1),n.Rc(t.versions.lastAvailableMajorVersion),n.Db(1),n.Sc("\xa0",n.jc(5,3,"lang.isAvailable")," ! ")}}let qY=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.headerService=i,this.notify=n,this.dialog=a,this.appService=s,this.loading=!1,this.updateInprogress=!1,this.versions={}}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.updateVersionControl")),this.loading=!0,this.http.get("../rest/versionsUpdate").pipe(Object(mt.a)(t=>{this.versions=t}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1))),Object(mt.a)(()=>{this.loading=!1})).subscribe()}updateVersionAccess(){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",data:{title:this.translate.instant("lang.confirm")+" ?",msg:this.translate.instant("lang.updateInfo")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>(this.dialogRef=null,"ok"===t?(this.updateInprogress=!0,!0):(this.updateInprogress=!1,!1))),p(()=>this.http.put("../rest/versionsUpdate",{})),Object(mt.a)(()=>{this.dialogRef=this.dialog.open(qt.a,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.updateOk"),msg:this.translate.instant("lang.saveInDocserversInfo")}})}),p(()=>this.dialogRef.afterClosed()),Object(mt.a)(()=>{this.dialogRef=null,window.location.reload(!0)}),Object(m.a)(t=>(this.dialogRef=this.dialog.open(qt.a,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.updateKO"),msg:this.translate.instant("lang.saveInDocserversInfo")}}),this.notify.handleErrors(t),Object(c.a)(!1))),Object(mt.a)(()=>{this.updateInprogress=!1})).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(y.a),n.Qb(D.a),n.Qb(q.b),n.Qb(w.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(QY,!0),2&t&&n.yc(i=n.ec())&&(e.sidenavRight=i.first)},decls:24,vars:17,consts:[["class","updateInProgress",4,"ngIf"],["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["fixedTopGap","56","position","end",2,"overflow-x","hidden",3,"mode","fixedInViewport","opened"],["snav2",""],["class","alert-message alert-message-info","style","display: flex;",4,"ngIf"],["mat-subheader",""],[1,"updateInProgress"],["diameter","30"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],["class","alert alert-info","style","display: flex;",4,"ngIf"],["class","alert alert-success","style","display: flex;",4,"ngIf"],["class","alert-message alert-message-danger",3,"innerHTML",4,"ngIf"],["class","col-sm-12","style","text-align:center;",4,"ngIf"],[1,"alert","alert-info",2,"display","flex"],[1,"fa","fa-check","fa-2x",2,"flex","1","text-align","left"],[2,"flex","1","text-align","center"],[1,"fa","fa-check","fa-2x",2,"flex","1","text-align","right"],[1,"alert","alert-success",2,"display","flex"],[1,"fa","fa-info-circle","fa-2x",2,"flex","1","text-align","left"],["target","_blank",2,"font-weight","bold",3,"href"],[1,"fa","fa-info-circle","fa-2x",2,"flex","1","text-align","right"],[1,"alert-message","alert-message-danger",3,"innerHTML"],[1,"col-sm-12",2,"text-align","center"],["mat-raised-button","","color","primary",3,"disabled","click"],[1,"alert-message","alert-message-info",2,"display","flex"]],template:function(t,e){1&t&&(n.Oc(0,NY,6,3,"div",0),n.Wb(1,"mat-sidenav-container",1),n.Wb(2,"mat-sidenav-content"),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Wb(5,"div",4),n.Rb(6,"header-left"),n.Vb(),n.Wb(7,"div",5),n.Rb(8,"header-right"),n.Vb(),n.Vb(),n.Rb(9,"div",6),n.Vb(),n.Wb(10,"div",7),n.Wb(11,"div",8),n.Oc(12,zY,2,0,"div",9),n.Oc(13,GY,5,4,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Wb(14,"mat-sidenav",11,12),n.Oc(16,XY,6,5,"div",13),n.Wb(17,"mat-list"),n.Wb(18,"h3",14),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"mat-list-item"),n.Wb(22,"b"),n.Qc(23),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.oc("ngIf",e.updateInprogress),n.Db(4),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",!e.appService.getViewMode()),n.Db(2),n.oc("ngIf",null!=e.versions.lastAvailableMajorVersion),n.Db(3),n.Rc(n.jc(20,15,"lang.currentVersion")),n.Db(4),n.Rc(e.versions.currentVersion))},directives:[P.t,I.e,I.f,Ot,We,I.d,R.a,R.g,R.d,V.c,K.a,S.a,k.b],pipes:[g.d],styles:[".updateInProgress[_ngcontent-%COMP%]{z-index:2;display:flex;position:fixed;top:0;left:0;width:100%;height:100%;background:hsla(0,0%,100%,.9294117647058824);justify-content:center;align-items:center}.alert-message-danger[_ngcontent-%COMP%]{width:100%;max-width:100%}"]}),t})();const KY=["adminMenuTemplate"];function YY(t,e){1&t&&(n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",11),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",12),n.Rb(5,"mat-icon",13),n.Wb(6,"p",14),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,2,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,4,"lang.add")," "))}function JY(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Vb())}function ZY(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",42),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(3).toggleDocserver(e)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",43),n.Vb()}2&t&&n.pc("matTooltip",n.jc(1,1,"lang.lockDocserver"))}function tJ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",44),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(3).toggleDocserver(e)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",45),n.Vb()}2&t&&n.pc("matTooltip",n.jc(1,1,"lang.unlockDocserver"))}function eJ(t,e){if(1&t&&n.Rb(0,"mat-progress-spinner",46),2&t){const t=n.hc().$implicit;n.oc("value",t.percentage)}}function iJ(t,e){if(1&t&&n.Rb(0,"mat-progress-spinner",47),2&t){const t=n.hc().$implicit;n.oc("value",t.percentage)}}function nJ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",21),n.Wb(1,"mat-card"),n.Wb(2,"form",22,23),n.dc("ngSubmit",(function(){n.Dc(t);const i=e.$implicit,a=e.index;return n.hc(3).onSubmit(i,a)})),n.Oc(4,ZY,3,3,"button",24),n.Oc(5,tJ,3,3,"button",25),n.Wb(6,"div",26),n.Wb(7,"div",27),n.Wb(8,"mat-form-field"),n.Wb(9,"input",28),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.device_label=i})),n.ic(10,"translate"),n.ic(11,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(12,"div",21),n.Oc(13,eJ,1,1,"mat-progress-spinner",29),n.Oc(14,iJ,1,1,"mat-progress-spinner",30),n.Wb(15,"span",31),n.Qc(16),n.Vb(),n.Vb(),n.Wb(17,"div",32),n.Wb(18,"mat-form-field"),n.Wb(19,"input",33),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.coll_id=i})),n.ic(20,"translate"),n.ic(21,"translate"),n.Vb(),n.Vb(),n.Wb(22,"mat-form-field"),n.Wb(23,"input",34),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.docserver_id=i})),n.ic(24,"translate"),n.ic(25,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(26,"div",21),n.Wb(27,"mat-form-field"),n.Wb(28,"input",35),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.limitSizeFormatted=i})),n.ic(29,"translate"),n.ic(30,"translate"),n.Vb(),n.Wb(31,"span",36),n.Qc(32," Go"),n.Vb(),n.Vb(),n.Vb(),n.Rb(33,"div",32),n.Wb(34,"div",27),n.Wb(35,"mat-form-field"),n.Wb(36,"input",37),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.path_template=i})),n.ic(37,"translate"),n.ic(38,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(39,"div",38),n.Wb(40,"button",39),n.Qc(41),n.ic(42,"translate"),n.Vb(),n.Wb(43,"button",40),n.dc("click",(function(){n.Dc(t);const i=e.index,a=n.hc().$implicit;return n.hc(2).cancelModification(a.docserver_type_id,i)})),n.Qc(44),n.ic(45,"translate"),n.Vb(),n.Wb(46,"button",41),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=e.index;return n.hc(3).delete(i,a)})),n.Qc(47),n.ic(48,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=e.index,a=n.hc().$implicit,s=n.hc(2);n.Db(4),n.oc("ngIf",!t.is_readonly),n.Db(1),n.oc("ngIf",t.is_readonly),n.Db(4),n.pc("title",n.jc(10,29,"lang.label")),n.pc("placeholder",n.jc(11,31,"lang.label")),n.oc("ngModel",t.device_label)("disabled",t.is_readonly),n.Db(4),n.oc("ngIf",t.percentage<60),n.Db(1),n.oc("ngIf",t.percentage>=60),n.Db(1),n.pc("title",t.actualSizeFormatted),n.Db(1),n.Sc("",t.percentage,"%"),n.Db(3),n.pc("title",n.jc(20,33,"lang.collection")),n.pc("placeholder",n.jc(21,35,"lang.collection")),n.oc("ngModel",t.coll_id),n.Db(4),n.pc("title",n.jc(24,37,"lang.id")),n.pc("placeholder",n.jc(25,39,"lang.id")),n.oc("ngModel",t.docserver_id),n.Db(5),n.pc("title",n.jc(29,41,"lang.maxSize")),n.pc("placeholder",n.jc(30,43,"lang.maxSize")),n.oc("ngModel",t.limitSizeFormatted)("disabled",t.is_readonly),n.Db(8),n.pc("title",n.jc(37,45,"lang.path")),n.pc("placeholder",n.jc(38,47,"lang.path")),n.oc("ngModel",t.path_template)("disabled",t.is_readonly),n.Db(4),n.oc("disabled",s.checkModif(t,s.docserversClone[a.docserver_type_id][i])),n.Db(1),n.Rc(n.jc(42,49,"lang.update")),n.Db(2),n.oc("disabled",s.checkModif(t,s.docserversClone[a.docserver_type_id][i])),n.Db(1),n.Rc(n.jc(45,51,"lang.cancel")),n.Db(3),n.Rc(n.jc(48,53,"lang.delete"))}}function aJ(t,e){if(1&t&&(n.Wb(0,"mat-expansion-panel"),n.Wb(1,"mat-expansion-panel-header"),n.Wb(2,"mat-panel-title"),n.Qc(3),n.Vb(),n.Wb(4,"mat-panel-description"),n.Qc(5),n.Vb(),n.Vb(),n.Wb(6,"div",19),n.Oc(7,nJ,49,55,"div",20),n.Vb(),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Db(3),n.Sc(" ",t.docserver_type_label," "),n.Db(2),n.Sc(" ",t.docserver_type_id," "),n.Db(2),n.oc("ngForOf",i.docservers[t.docserver_type_id])}}function sJ(t,e){if(1&t&&(n.Wb(0,"mat-card",17),n.Wb(1,"mat-accordion"),n.Oc(2,aJ,8,3,"mat-expansion-panel",18),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.oc("ngForOf",t.docserversTypes)}}let oJ=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.viewContainerRef=s,this.loading=!1,this.docservers=[],this.docserversClone=[],this.docserversTypes={}}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.docservers")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,this.http.get("../rest/docservers").subscribe(t=>{this.docservers=t.docservers,this.docserversClone=JSON.parse(JSON.stringify(this.docservers)),this.docserversTypes=t.types,this.loading=!1})}toggleDocserver(t){t.is_readonly=!t.is_readonly}cancelModification(t,e){this.docservers[t][e]=JSON.parse(JSON.stringify(this.docserversClone[t][e]))}checkModif(t,e){return t.size_limit_number=1e9*t.limitSizeFormatted,JSON.stringify(t)===JSON.stringify(e)||!(t.size_limit_number>=t.actual_size_number&&t.limitSizeFormatted>0&&/^[\d]*$/.test(t.limitSizeFormatted))}onSubmit(t,e){t.size_limit_number=1e9*t.limitSizeFormatted,this.http.put("../rest/docservers/"+t.id,t).subscribe(i=>{this.docservers[t.docserver_type_id][e]=i.docserver,this.docserversClone[t.docserver_type_id][e]=JSON.parse(JSON.stringify(this.docservers[t.docserver_type_id][e])),this.notify.success(this.translate.instant("lang.docserverUpdated"))},t=>{this.notify.error(t.error.errors)})}delete(t,e){let i=null;i=0===t.actual_size_number?confirm(this.translate.instant("lang.delete")+" ?"):confirm(this.translate.instant("lang.docserverdeleteWarning")),i&&this.http.delete("../rest/docservers/"+t.id).subscribe(()=>{this.docservers[t.docserver_type_id].splice(e,1),this.notify.success(this.translate.instant("lang.docserverDeleted"))},t=>{this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(KY,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:15,vars:8,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["mat-subheader",""],["mat-list-item","","routerLink","/administration/docservers/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[4,"ngFor","ngForOf"],[1,"row"],["class","col-md-4",4,"ngFor","ngForOf"],[1,"col-md-4"],[1,"form-horizontal",3,"ngSubmit"],["docserverFormUp","ngForm"],["mat-icon-button","","color","accent","style","position: absolute;top: 5px;right:10px;",3,"matTooltip","click",4,"ngIf"],["mat-icon-button","","color","warn","style","position: absolute;top: 5px;right:10px;",3,"matTooltip","click",4,"ngIf"],[1,"row",2,"margin-top","10px"],[1,"col-md-12"],["matInput","","required","","name","label","id","label","type","text","maxlength","255",3,"title","placeholder","ngModel","disabled","ngModelChange"],["name","percent_val","id","percent_val","color","primary","mode","determinate","style","margin:auto;",3,"value",4,"ngIf"],["name","percent_val","id","percent_val","color","warn","mode","determinate","style","margin:auto;",3,"value",4,"ngIf"],[2,"position","absolute","font-weight","bold","left","50%","transform","translateX(-50%)","top","40%","font-weight","bold",3,"title"],[1,"col-md-8"],["matInput","","required","","name","collection","id","collection","type","text","disabled","",3,"title","placeholder","ngModel","ngModelChange"],["matInput","","required","","name","identifier","id","identifier","type","text","disabled","",3,"title","placeholder","ngModel","ngModelChange"],["matInput","","required","","name","max_size","id","max_size","type","number",3,"title","placeholder","ngModel","disabled","ngModelChange"],["matSuffix",""],["matInput","","required","","name","path","id","path","type","text",3,"title","placeholder","ngModel","disabled","ngModelChange"],[1,"col-md-12","text-center",2,"padding","10px"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],["mat-raised-button","","color","default",3,"disabled","click"],["mat-raised-button","","type","button","color","warn",3,"click"],["mat-icon-button","","color","accent",2,"position","absolute","top","5px","right","10px",3,"matTooltip","click"],[1,"fa","fa-lock-open"],["mat-icon-button","","color","warn",2,"position","absolute","top","5px","right","10px",3,"matTooltip","click"],[1,"fa","fa-lock"],["name","percent_val","id","percent_val","color","primary","mode","determinate",2,"margin","auto",3,"value"],["name","percent_val","id","percent_val","color","warn","mode","determinate",2,"margin","auto",3,"value"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,YY,9,6,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,JY,2,0,"div",9),n.Oc(14,sJ,3,1,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,R.h,R.g,R.d,o.f,S.a,R.c,W.l,V.c,K.a,gt.a,P.s,gt.c,gt.g,gt.h,gt.f,X.K,X.v,X.w,Y.c,J.b,X.d,X.F,X.p,X.u,X.x,X.A,Y.j,k.b,A.b,V.a],pipes:[g.d],encapsulation:2}),t})();function rJ(t,e){1&t&&(n.Wb(0,"div",10),n.Rb(1,"mat-spinner",11),n.Vb())}function cJ(t,e){if(1&t&&(n.Wb(0,"mat-option",30),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.docserver_type_id),n.Db(1),n.Sc(" ",t.docserver_type_label," ")}}function lJ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",12),n.Wb(1,"form",13,14),n.dc("ngSubmit",(function(){n.Dc(t);const e=n.hc();return e.onSubmit(e.docserver)})),n.Wb(3,"div",15),n.Wb(4,"div",16),n.Wb(5,"mat-form-field"),n.Wb(6,"mat-select",17),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().docserver.docserver_type_id=e})),n.ic(7,"translate"),n.ic(8,"translate"),n.Oc(9,cJ,2,2,"mat-option",18),n.Vb(),n.Vb(),n.Wb(10,"mat-form-field"),n.Wb(11,"input",19),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().docserver.docserver_id=e})),n.ic(12,"translate"),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Wb(14,"mat-form-field"),n.Wb(15,"input",20),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().docserver.device_label=e})),n.ic(16,"translate"),n.ic(17,"translate"),n.Vb(),n.Vb(),n.Wb(18,"mat-form-field"),n.Wb(19,"mat-select",21),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().docserver.coll_id=e})),n.ic(20,"translate"),n.ic(21,"translate"),n.Wb(22,"mat-option",22),n.Qc(23," letterbox_coll "),n.Vb(),n.Wb(24,"mat-option",23),n.Qc(25," attachments_coll "),n.Vb(),n.Wb(26,"mat-option",24),n.Qc(27," archive_transfer_coll "),n.Vb(),n.Vb(),n.Vb(),n.Wb(28,"mat-form-field"),n.Wb(29,"input",25),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().docserver.limitSizeFormatted=e})),n.ic(30,"translate"),n.ic(31,"translate"),n.Vb(),n.Wb(32,"span",26),n.Qc(33," Go"),n.Vb(),n.Vb(),n.Wb(34,"mat-form-field"),n.Wb(35,"input",27),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().docserver.path_template=e})),n.ic(36,"translate"),n.ic(37,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(38,"div",28),n.Wb(39,"button",29),n.Qc(40),n.ic(41,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(2),e=n.hc();n.Db(6),n.pc("title",n.jc(7,23,"lang.docserverType")),n.pc("placeholder",n.jc(8,25,"lang.docserverType")),n.oc("ngModel",e.docserver.docserver_type_id),n.Db(3),n.oc("ngForOf",e.docserversTypes),n.Db(2),n.pc("title",n.jc(12,27,"lang.id")),n.pc("placeholder",n.jc(13,29,"lang.id")),n.oc("ngModel",e.docserver.docserver_id),n.Db(4),n.pc("title",n.jc(16,31,"lang.label")),n.pc("placeholder",n.jc(17,33,"lang.label")),n.oc("ngModel",e.docserver.device_label),n.Db(4),n.pc("title",n.jc(20,35,"lang.collection")),n.pc("placeholder",n.jc(21,37,"lang.collection")),n.oc("ngModel",e.docserver.coll_id),n.Db(10),n.pc("title",n.jc(30,39,"lang.maxSize")),n.pc("placeholder",n.jc(31,41,"lang.maxSize")),n.oc("ngModel",e.docserver.limitSizeFormatted)("disabled",e.docserver.is_readonly),n.Db(6),n.pc("title",n.jc(36,43,"lang.path")),n.pc("placeholder",n.jc(37,45,"lang.path")),n.oc("ngModel",e.docserver.path_template)("disabled",e.docserver.is_readonly),n.Db(4),n.oc("disabled",!t.form.valid),n.Db(1),n.Rc(n.jc(41,47,"lang.add"))}}let dJ=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.router=i,this.notify=n,this.headerService=a,this.appService=s,this.loading=!1,this.docserver={coll_id:"letterbox_coll",docserver_type_id:"DOC",limitSizeFormatted:"50"},this.docserversTypes=[]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.docserverCreation")),this.loading=!0,this.http.get("../rest/docserverTypes").subscribe(t=>{this.docserversTypes=t.docserverTypes,this.loading=!1})}onSubmit(t){t.size_limit_number=1e9*t.limitSizeFormatted,this.http.post("../rest/docservers",t).subscribe(t=>{this.notify.success(this.translate.instant("lang.docserverAdded")),this.router.navigate(["/administration/docservers/"])},t=>{this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:13,vars:8,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"form-horizontal",3,"ngSubmit"],["docserverForm","ngForm"],[1,"row",2,"margin-top","10px"],[1,"col-md-12"],["required","","name","docserver_type","id","docserver_type",3,"title","placeholder","ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["matInput","","required","","name","identifier","id","identifier","type","text","maxlength","32","pattern","^[\\w.-]*$",3,"title","placeholder","ngModel","ngModelChange"],["matInput","","required","","name","label","id","label","type","text","maxlength","255",3,"title","placeholder","ngModel","ngModelChange"],["required","","name","collection","id","collection",3,"title","placeholder","ngModel","ngModelChange"],["value","letterbox_coll","selected",""],["value","attachments_coll"],["value","archive_transfer_coll"],["matInput","","required","","name","max_size","id","max_size","type","number","pattern","^\\d+$",3,"title","placeholder","ngModel","disabled","ngModelChange"],["matSuffix",""],["matInput","","required","","name","path","id","path","type","text",3,"title","placeholder","ngModel","disabled","ngModelChange"],[1,"col-md-12","text-center",2,"padding","10px"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],[3,"value"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,rJ,2,0,"div",8),n.Oc(12,lJ,42,49,"mat-card",9),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,V.c,K.a,X.K,X.v,X.w,Y.c,ee.a,X.F,X.u,X.x,P.s,J.b,X.d,X.p,X.B,W.p,X.A,Y.j,k.b],pipes:[g.d],encapsulation:2}),t})();const hJ=["adminMenuTemplate"];function uJ(t,e){1&t&&(n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",11),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",12),n.Rb(5,"mat-icon",13),n.Wb(6,"p",14),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,2,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,4,"lang.add")," "))}function pJ(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Vb())}function bJ(t,e){1&t&&(n.Wb(0,"mat-header-cell",44),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.technicalId")," "))}function fJ(t,e){if(1&t&&(n.Wb(0,"mat-cell",45),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.template_id," ")}}function mJ(t,e){1&t&&(n.Wb(0,"mat-header-cell",46),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.templateName")," "))}function gJ(t,e){if(1&t&&(n.Wb(0,"mat-cell",47),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.template_label," ")}}function vJ(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",46),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Sc("",n.jc(2,3,"lang.description")," ")}}function _J(t,e){if(1&t&&(n.Wb(0,"mat-cell",47),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",t.template_comment," ")}}function yJ(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",44),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Sc(" ",n.jc(2,3,"lang.templateTarget"),"")}}function xJ(t,e){if(1&t&&(n.Wb(0,"mat-cell",45),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",n.jc(2,3,"lang."+t.template_target)," ")}}function CJ(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",44),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Sc("",n.jc(2,3,"lang.templateType")," ")}}function OJ(t,e){if(1&t&&(n.Wb(0,"mat-cell",45),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",t.template_type," ")}}function DJ(t,e){1&t&&n.Rb(0,"mat-header-cell")}function wJ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",48),n.Wb(1,"button",49),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.deleteTemplate(a)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",50),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.pc("matTooltip",n.jc(2,2,"lang.delete")),n.oc("disabled","Y"==t.is_system)}}function MJ(t,e){1&t&&n.Rb(0,"mat-header-row")}function kJ(t,e){1&t&&(n.Rb(0,"mat-row",51),n.ic(1,"translate")),2&t&&(n.qc("routerLink","/administration/templates/",e.$implicit.template_id,""),n.pc("matTooltip",n.jc(1,2,"lang.view")))}function SJ(t,e){if(1&t&&(n.Wb(0,"mat-card",17),n.Wb(1,"div",18),n.Wb(2,"div",19),n.Wb(3,"mat-form-field"),n.Rb(4,"input",20),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Wb(6,"div",19),n.Rb(7,"mat-paginator",21,22),n.Vb(),n.Vb(),n.Wb(9,"mat-table",23,24),n.Ub(11,25),n.Oc(12,bJ,3,3,"mat-header-cell",26),n.Oc(13,fJ,2,1,"mat-cell",27),n.Tb(),n.Ub(14,28),n.Oc(15,mJ,3,3,"mat-header-cell",29),n.Oc(16,gJ,2,1,"mat-cell",30),n.Tb(),n.Ub(17,31),n.Oc(18,vJ,3,5,"mat-header-cell",32),n.Oc(19,_J,2,3,"mat-cell",33),n.Tb(),n.Ub(20,34),n.Oc(21,yJ,3,5,"mat-header-cell",35),n.Oc(22,xJ,3,5,"mat-cell",36),n.Tb(),n.Ub(23,37),n.Oc(24,CJ,3,5,"mat-header-cell",35),n.Oc(25,OJ,2,3,"mat-cell",36),n.Tb(),n.Ub(26,38),n.Oc(27,DJ,1,0,"mat-header-cell",39),n.Oc(28,wJ,4,4,"mat-cell",40),n.Tb(),n.Oc(29,MJ,1,0,"mat-header-row",41),n.Oc(30,kJ,2,4,"mat-row",42),n.Vb(),n.Wb(31,"div",43),n.Qc(32),n.ic(33,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.pc("placeholder",n.jc(5,10,"lang.filterBy")),n.oc("formControl",t.adminService.getFilterField()),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.adminService.getDataSource()),n.Db(20),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns),n.Db(2),n.Tc(" ",t.templates.length," ",n.jc(33,12,"lang.templates"),"")}}let IJ=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.functions=s,this.adminService=o,this.viewContainerRef=r,this.search=null,this.templates=[],this.titles=[],this.loading=!1,this.displayedColumns=["template_id","template_label","template_comment","template_type","template_target","actions"],this.filterColumns=["template_label","template_comment","template_type","template_target"]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.templates")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,this.http.get("../rest/templates").subscribe(t=>{this.templates=t.templates,this.loading=!1,setTimeout(()=>{this.adminService.setDataSource("admin_templates",this.templates,this.sort,this.paginator,this.filterColumns)},0)},t=>{this.notify.handleErrors(t)})}deleteTemplate(t){confirm(this.translate.instant("lang.confirmAction")+" "+this.translate.instant("lang.delete")+" \xab "+t.template_label+" \xbb")&&this.http.delete("../rest/templates/"+t.template_id).subscribe(()=>{for(const e in this.templates)this.templates[e].template_id===t.template_id&&this.templates.splice(Number(e),1);this.adminService.setDataSource("admin_templates",this.templates,this.sort,this.paginator,this.filterColumns),this.notify.success(this.translate.instant("lang.templateDeleted"))},t=>{this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a),n.Qb(OL),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(hJ,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:15,vars:8,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["mat-subheader",""],["mat-list-item","","routerLink","/administration/templates/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"row"],[1,"col-md-6","col-xs-6"],["matInput","",3,"formControl","placeholder"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSort","","matSortDisableClear","",3,"dataSource"],["table",""],["matColumnDef","template_id"],["mat-sort-header","","style","flex:1;",4,"matHeaderCellDef"],["style","flex:1;",4,"matCellDef"],["matColumnDef","template_label"],["mat-sort-header","","style","flex:2;",4,"matHeaderCellDef"],["style","flex:2;",4,"matCellDef"],["matColumnDef","template_comment"],["mat-sort-header","","style","flex:2;",3,"hide-for-mobile",4,"matHeaderCellDef"],["style","flex:2;",3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","template_target"],["mat-sort-header","","style","flex:1;",3,"hide-for-mobile",4,"matHeaderCellDef"],["style","flex:1;",3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","template_type"],["matColumnDef","actions"],[4,"matHeaderCellDef"],["style","justify-content: flex-end;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"routerLink","matTooltip",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["mat-sort-header","",2,"flex","1"],[2,"flex","1"],["mat-sort-header","",2,"flex","2"],[2,"flex","2"],[2,"justify-content","flex-end"],["mat-icon-button","","color","warn",3,"disabled","matTooltip","click"],["aria-hidden","true",1,"fa","fa-trash-alt","fa-2x"],[2,"cursor","pointer",3,"routerLink","matTooltip"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,uJ,9,6,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,pJ,2,0,"div",9),n.Oc(14,SJ,34,14,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,R.h,R.g,R.d,o.f,S.a,R.c,W.l,V.c,K.a,Y.c,J.b,X.d,X.u,X.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,vt.h,Fe.b,vt.a,k.b,A.b,vt.j,vt.m,o.d],pipes:[g.d],encapsulation:2}),t})();const PJ=["onlyofficeViewer"],VJ=["collaboraOnlineViewer"];function RJ(t,e){1&t&&(n.Wb(0,"div",9),n.Rb(1,"mat-spinner"),n.Vb())}function jJ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"onlyoffice-viewer",10,11),n.dc("triggerAfterUpdatedDoc",(function(){return n.Dc(t),n.hc().close()}))("triggerCloseEditor",(function(){return n.Dc(t),n.hc().dialogRef.close("")}))("triggerModifiedDocument",(function(){return n.Dc(t),n.hc().documentIsModified=!0})),n.Vb()}if(2&t){const t=n.hc();n.oc("hideCloseEditor",!0)("params",t.editorOptions)("file",t.file)("editMode",!0)}}function AJ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-collabora-online-viewer",12,13),n.dc("triggerAfterUpdatedDoc",(function(){return n.Dc(t),n.hc().close()}))("triggerCloseEditor",(function(){return n.Dc(t),n.hc().dialogRef.close("")}))("triggerModifiedDocument",(function(){return n.Dc(t),n.hc().documentIsModified=!0})),n.Vb()}if(2&t){const t=n.hc();n.oc("params",t.editorOptions)("file",t.file)("editMode",!0)}}let WJ=(()=>{class t{constructor(t,e,i){this.translate=t,this.dialogRef=e,this.data=i,this.loading=!1,this.editorOptions=null,this.file=null,this.editorType=null,this.documentIsModified=!1}ngOnInit(){this.editorOptions=this.data.editorOptions,this.file=this.data.file,this.editorType=this.data.editorType}close(){this.loading=!0,"onlyoffice"===this.editorType?this.onlyofficeViewer.getFile().pipe(Object(ro.a)(1),Object(mt.a)(t=>{this.loading=!1,this.dialogRef.close(t)})).subscribe():"collaboraonline"===this.editorType?this.collaboraOnlineViewer.getFile().pipe(Object(ro.a)(1),Object(mt.a)(t=>{this.loading=!1,this.dialogRef.close(t)})).subscribe():(this.loading=!1,this.dialogRef.close())}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(q.h),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Xc(PJ,!0),n.Xc(VJ,!0)),2&t&&(n.yc(i=n.ec())&&(e.onlyofficeViewer=i.first),n.yc(i=n.ec())&&(e.collaboraOnlineViewer=i.first))},decls:13,vars:11,consts:[[1,"mat-dialog-content-container"],[2,"padding","0px"],["class","example-loading-shade",4,"ngIf"],["style","height:100%;width:100%;",3,"hideCloseEditor","params","file","editMode","triggerAfterUpdatedDoc","triggerCloseEditor","triggerModifiedDocument",4,"ngIf"],["style","height:100%;width:100%;",3,"params","file","editMode","triggerAfterUpdatedDoc","triggerCloseEditor","triggerModifiedDocument",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"example-loading-shade"],[2,"height","100%","width","100%",3,"hideCloseEditor","params","file","editMode","triggerAfterUpdatedDoc","triggerCloseEditor","triggerModifiedDocument"],["onlyofficeViewer",""],[2,"height","100%","width","100%",3,"params","file","editMode","triggerAfterUpdatedDoc","triggerCloseEditor","triggerModifiedDocument"],["collaboraOnlineViewer",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"mat-dialog-content",1),n.Oc(2,RJ,2,0,"div",2),n.Oc(3,jJ,2,4,"onlyoffice-viewer",3),n.Oc(4,AJ,2,3,"app-collabora-online-viewer",4),n.Vb(),n.Rb(5,"span",5),n.Wb(6,"div",6),n.Wb(7,"button",7),n.dc("click",(function(){return e.close()})),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Wb(10,"button",8),n.Qc(11),n.ic(12,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf","onlyoffice"===e.editorType),n.Db(1),n.oc("ngIf","collaboraonline"===e.editorType),n.Db(3),n.oc("disabled",!e.documentIsModified||e.loading),n.Db(1),n.Rc(n.jc(9,7,"lang.validate")),n.Db(2),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(12,9,"lang.cancel")))},directives:[q.f,P.t,q.c,k.b,q.d,V.c,vr,Cr],pipes:[g.d],styles:[""]}),t})();const TJ=["snav2"],EJ=["adminMenuTemplate"],FJ=["maarchTree"];function LJ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",13),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",17),n.dc("click",(function(){return n.Dc(t),n.hc(2).duplicateTemplate()})),n.Rb(5,"mat-icon",18),n.Wb(6,"p",19),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(2),n.Rc(n.jc(3,5,"lang.actions")),n.Db(2),n.Ib("disabled",t.lockFound||"acknowledgementReceipt"==t.template.target),n.oc("disableRipple",t.lockFound||"acknowledgementReceipt"==t.template.target),n.Db(3),n.Sc(" ",n.jc(8,7,"lang.duplicate")," ")}}function QJ(t,e){if(1&t&&n.Oc(0,LJ,9,9,"mat-nav-list",16),2&t){const t=n.hc();n.oc("ngIf",!t.creationMode&&!t.loading)}}function NJ(t,e){1&t&&(n.Wb(0,"div",20),n.Rb(1,"mat-spinner",21),n.Vb())}function zJ(t,e){if(1&t&&(n.Wb(0,"div",27),n.Wb(1,"div",25),n.Wb(2,"mat-form-field"),n.Rb(3,"input",34),n.ic(4,"translate"),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(3),n.pc("title",n.jc(4,3,"lang.technicalId")),n.pc("value",t.template.id),n.pc("placeholder",n.jc(5,5,"lang.technicalId"))}}function BJ(t,e){if(1&t&&(n.Wb(0,"mat-option",35),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",n.jc(2,2,"lang."+t),"")}}function UJ(t,e){if(1&t&&(n.Wb(0,"mat-option",35),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function $J(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",27),n.Wb(1,"div",25),n.Wb(2,"mat-form-field"),n.Wb(3,"mat-select",36),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).template.template_attachment_type=e})),n.ic(4,"translate"),n.ic(5,"translate"),n.Wb(6,"mat-option",37),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Oc(9,UJ,2,2,"mat-option",31),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(3),n.pc("title",n.jc(4,5,"lang.attachmentType")),n.pc("placeholder",n.jc(5,7,"lang.attachmentType")),n.oc("ngModel",t.template.template_attachment_type),n.Db(4),n.Rc(n.jc(8,9,"lang.allAttachments")),n.Db(2),n.oc("ngForOf",t.attachmentTypesList)}}function HJ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",27),n.Wb(1,"div",25),n.Wb(2,"mat-form-field"),n.Wb(3,"mat-select",38),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).template.template_attachment_type=e})),n.ic(4,"translate"),n.ic(5,"translate"),n.Wb(6,"mat-option",39),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Wb(9,"mat-option",40),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Wb(12,"mat-option",41),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(3),n.pc("title",n.jc(4,7,"lang.acknowledgementReceiptType")),n.pc("placeholder",n.jc(5,9,"lang.acknowledgementReceiptType")),n.oc("disabled",!t.creationMode)("ngModel",t.template.template_attachment_type),n.Db(4),n.Rc(n.jc(8,11,"lang.ARsimple")),n.Db(3),n.Rc(n.jc(11,13,"lang.ARsva")),n.Db(3),n.Rc(n.jc(14,15,"lang.ARsvr"))}}function GJ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",27),n.Wb(1,"div",25),n.Wb(2,"mat-form-field"),n.Wb(3,"input",42),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).template.subject=e})),n.ic(4,"translate"),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(3),n.pc("title",n.jc(4,3,"lang.emailSubject")),n.pc("placeholder",n.jc(5,5,"lang.emailSubject")),n.oc("ngModel",t.template.subject)}}function XJ(t,e){if(1&t&&(n.Wb(0,"mat-radio-button",45),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(3);n.oc("value",t)("checked",i.template.type===t),n.Db(1),n.Sc(" ",t,"")}}function qJ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",27),n.Wb(1,"div",25),n.Wb(2,"mat-radio-group",43),n.dc("change",(function(e){return n.Dc(t),n.hc(2).changeType(e)})),n.Oc(3,XJ,2,3,"mat-radio-button",44),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(2),n.oc("disabled",!t.creationMode),n.Db(1),n.oc("ngForOf",t.availableTypes)}}function KJ(t,e){if(1&t&&(n.Wb(0,"mat-option",35),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.rc("value","",t.fileExt,": ",t.fileName,""),n.Db(1),n.Tc(" ",t.fileExt,": ",t.fileName," ")}}function YJ(t,e){if(1&t&&(n.Ub(0),n.Oc(1,KJ,2,4,"mat-option",58),n.Tb()),2&t){const t=e.$implicit,i=n.hc().$implicit;n.Db(1),n.oc("ngIf",i==t.fileExt)}}function JJ(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-optgroup",54),n.Oc(2,YJ,2,1,"ng-container",57),n.Vb(),n.Tb()),2&t){const t=e.$implicit,i=n.hc(4);n.Db(1),n.qc("label","",t," :"),n.Db(1),n.oc("ngForOf",i.defaultTemplatesList)}}function ZJ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"mat-select",53),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(3).selectedModelFile=e}))("selectionChange",(function(){return n.Dc(t),n.hc(3).changeModel()})),n.ic(2,"translate"),n.ic(3,"translate"),n.Wb(4,"mat-optgroup",54),n.ic(5,"translate"),n.Wb(6,"mat-option",55),n.dc("click",(function(){return n.Dc(t),n.hc(),n.zc(5).click()})),n.Rb(7,"mat-icon",56),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Vb(),n.Oc(10,JJ,3,2,"ng-container",57),n.Vb(),n.Vb()}if(2&t){const t=n.hc(3);n.Db(1),n.pc("title",n.jc(2,9,"lang.defaultTemplate")),n.pc("placeholder",n.jc(3,11,"lang.chosenModel")),n.oc("disabled",!t.creationMode)("ngModel",t.selectedModelFile)("required","acknowledgementReceipt"!=t.template.target),n.Db(3),n.qc("label","",n.jc(5,13,"lang.loadedFile")," :"),n.Db(2),n.oc("value",t.template.file.name),n.Db(2),n.Sc(" ",t.functionsService.empty(t.template.file)||t.functionsService.empty(t.template.file.name)?n.jc(9,15,"lang.importFile"):t.template.file.name," "),n.Db(2),n.oc("ngForOf",t.extensionModels)}}function tZ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",51),n.dc("click",(function(e){n.Dc(t);const i=n.hc(3);return e.stopPropagation(),i.editFile()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(3);n.oc("disabled",t.lockFound),n.Db(1),n.Rc(n.jc(2,2,"lang.templateEdition"))}}function eZ(t,e){if(1&t&&n.Rb(0,"iframe",59),2&t){const t=n.hc(3);n.oc("src",t.templateDocView,n.Fc)}}function iZ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",27),n.Wb(1,"div",46),n.Wb(2,"div",47),n.Wb(3,"div",27),n.Wb(4,"input",48,49),n.dc("change",(function(e){return n.Dc(t),n.hc(2).uploadFileTrigger(e)})),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(6,"div",25),n.Oc(7,ZJ,11,17,"mat-form-field",16),n.Oc(8,tZ,3,4,"button",50),n.Wb(9,"button",51),n.dc("click",(function(e){n.Dc(t);const i=n.zc(5);return e.stopPropagation(),i.click()})),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Vb(),n.Oc(12,eZ,1,1,"iframe",52),n.Vb()}if(2&t){const t=n.hc(2);n.Db(7),n.oc("ngIf",t.creationMode||t.template.file.name),n.Db(1),n.oc("ngIf",t.creationMode&&t.selectedModelFile&&!t.documentImported||t.creationMode&&t.selectedModelFile&&t.documentImported&&"java"!==t.headerService.user.preferences.documentEdition||!t.creationMode&&!t.documentImported||!t.creationMode&&t.documentImported&&"java"!==t.headerService.user.preferences.documentEdition),n.Db(1),n.oc("disabled",t.lockFound),n.Db(1),n.Rc(n.jc(11,5,"lang.importFile")),n.Db(2),n.oc("ngIf",null!==t.templateDocView)}}function nZ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",27),n.Wb(1,"div",25),n.Wb(2,"mat-form-field"),n.Wb(3,"textarea",60),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).template.file.content=e})),n.ic(4,"translate"),n.ic(5,"translate"),n.Qc(6," "),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(3),n.pc("placeholder",n.jc(4,4,"lang.contentTxtTemplate")),n.pc("title",n.jc(5,6,"lang.contentTxtTemplate")),n.oc("ngModel",t.template.file.content)("required","acknowledgementReceipt"!=t.template.target)}}function aZ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",27),n.Wb(1,"div",25),n.Wb(2,"div",61),n.Wb(3,"textarea",62),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).template.file.content=e})),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(3),n.oc("ngModel",t.template.file.content)("required","acknowledgementReceipt"!=t.template.target)}}function sZ(t,e){if(1&t&&(n.Wb(0,"mat-option",35),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.oc("value",t.id),n.Db(1),n.Rc(t.label)}}function oZ(t,e){if(1&t&&(n.Ub(0),n.Oc(1,sZ,2,2,"mat-option",58),n.Tb()),2&t){const t=e.$implicit,i=n.hc(3);n.Db(1),n.oc("ngIf",i.displayDatasources(t))}}function rZ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",27),n.Wb(1,"div",25),n.Wb(2,"mat-form-field"),n.Wb(3,"mat-select",63),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).template.datasource=e})),n.ic(4,"translate"),n.ic(5,"translate"),n.Wb(6,"mat-option",64),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Oc(9,oZ,2,1,"ng-container",57),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(3),n.pc("title",n.jc(4,5,"lang.templateDatasource")),n.pc("placeholder",n.jc(5,7,"lang.templateDatasource")),n.oc("ngModel",t.template.datasource),n.Db(4),n.Rc(n.jc(8,9,"lang.noDatasource")),n.Db(2),n.oc("ngForOf",t.datasourcesList)}}function cZ(t,e){if(1&t&&(n.Wb(0,"mat-option",35),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.rc("value","",t.fileExt,": ",t.fileName,""),n.Db(1),n.Tc(" ",t.fileExt,": ",t.fileName," ")}}function lZ(t,e){if(1&t&&(n.Ub(0),n.Oc(1,cZ,2,4,"mat-option",58),n.Tb()),2&t){const t=e.$implicit,i=n.hc().$implicit;n.Db(1),n.oc("ngIf",i==t.fileExt)}}function dZ(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-optgroup",54),n.Oc(2,lZ,2,1,"ng-container",57),n.Vb(),n.Tb()),2&t){const t=e.$implicit,i=n.hc(3);n.Db(1),n.qc("label","",t," :"),n.Db(1),n.oc("ngForOf",i.defaultTemplatesList)}}function hZ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",51),n.dc("click",(function(e){n.Dc(t);const i=n.hc(3);return e.stopPropagation(),i.editFile()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc(3);n.oc("disabled",t.lockFound),n.Db(1),n.Rc(n.jc(2,2,"lang.templateEdition"))}}function uZ(t,e){if(1&t&&n.Rb(0,"iframe",59),2&t){const t=n.hc(3);n.oc("src",t.templateDocView,n.Fc)}}function pZ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",27),n.Wb(1,"mat-tab-group",65),n.dc("selectedTabChange",(function(e){return n.Dc(t),n.hc(2).loadTab(e)})),n.Wb(2,"mat-tab",54),n.ic(3,"translate"),n.Wb(4,"div",25),n.Wb(5,"div",61),n.Wb(6,"textarea",66),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).template.file.electronic.content=e})),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(7,"mat-tab",54),n.ic(8,"translate"),n.Wb(9,"div",46),n.Wb(10,"div",47),n.Wb(11,"div",27),n.Wb(12,"input",48,67),n.dc("change",(function(e){return n.Dc(t),n.hc(2).uploadFileTrigger(e)})),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(14,"div",25),n.Wb(15,"mat-form-field"),n.Wb(16,"mat-select",68),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).selectedModelFile=e})),n.ic(17,"translate"),n.ic(18,"translate"),n.Wb(19,"mat-optgroup",54),n.ic(20,"translate"),n.Wb(21,"mat-option",69),n.dc("click",(function(){return n.Dc(t),n.zc(13).click()})),n.Rb(22,"mat-icon",56),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Vb(),n.Oc(25,dZ,3,2,"ng-container",57),n.Vb(),n.Vb(),n.Oc(26,hZ,3,4,"button",50),n.Wb(27,"button",51),n.dc("click",(function(e){n.Dc(t);const i=n.zc(13);return e.stopPropagation(),i.click()})),n.Qc(28),n.ic(29,"translate"),n.Vb(),n.Vb(),n.Oc(30,uZ,1,1,"iframe",52),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2);n.Db(2),n.pc("label",n.jc(3,17,"lang.electronicTemplate")),n.Db(4),n.oc("ngModel",t.template.file.electronic.content)("required","acknowledgementReceipt"!=t.template.target),n.Db(1),n.pc("label",n.jc(8,19,"lang.paperTemplate")),n.Db(9),n.pc("title",n.jc(17,21,"lang.defaultTemplate")),n.pc("placeholder",n.jc(18,23,"lang.chosenModel")),n.oc("disabled",!t.creationMode&&null!==t.template.file.paper.name)("ngModel",t.selectedModelFile)("required","acknowledgementReceipt"!=t.template.target),n.Db(3),n.qc("label","",n.jc(20,25,"lang.loadedFile")," :"),n.Db(2),n.oc("value",t.template.file.paper.name),n.Db(2),n.Sc(" ",t.functionsService.empty(t.template.file.paper)||t.functionsService.empty(t.template.file.paper.name)?n.jc(24,27,"lang.importFile"):t.template.file.paper.name," "),n.Db(2),n.oc("ngForOf",t.extensionModels),n.Db(1),n.oc("ngIf",t.creationMode&&t.selectedModelFile&&!t.documentImported||t.creationMode&&t.selectedModelFile&&t.documentImported&&"java"!==t.headerService.user.preferences.documentEdition||!t.creationMode&&!t.documentImported||!t.creationMode&&t.documentImported&&"java"!==t.headerService.user.preferences.documentEdition),n.Db(1),n.oc("disabled",t.lockFound),n.Db(1),n.Rc(n.jc(29,29,"lang.importFile")),n.Db(2),n.oc("ngIf",null!==t.templateDocView)}}function bZ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",22),n.Wb(1,"form",23,24),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Wb(3,"div",25),n.Oc(4,zJ,6,7,"div",26),n.Wb(5,"div",27),n.Wb(6,"div",25),n.Wb(7,"mat-form-field"),n.Wb(8,"input",28),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().template.label=e})),n.ic(9,"translate"),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(11,"div",27),n.Wb(12,"div",25),n.Wb(13,"mat-form-field"),n.Wb(14,"textarea",29),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().template.description=e})),n.ic(15,"translate"),n.ic(16,"translate"),n.Qc(17," "),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(18,"div",27),n.Wb(19,"div",25),n.Wb(20,"mat-form-field"),n.Wb(21,"mat-select",30),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().template.target=e}))("selectionChange",(function(){return n.Dc(t),n.hc().updateTemplateType()})),n.ic(22,"translate"),n.ic(23,"translate"),n.Oc(24,BJ,3,4,"mat-option",31),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Oc(25,$J,10,11,"div",26),n.Oc(26,HJ,15,17,"div",26),n.Oc(27,GJ,6,7,"div",26),n.Oc(28,qJ,4,2,"div",26),n.Oc(29,iZ,13,7,"div",26),n.Oc(30,nZ,7,8,"div",26),n.Oc(31,aZ,4,2,"div",26),n.Oc(32,rZ,10,11,"div",26),n.Oc(33,pZ,31,31,"div",26),n.Vb(),n.Wb(34,"div",32),n.Wb(35,"button",33),n.Qc(36),n.ic(37,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(2),e=n.hc();n.Db(4),n.oc("ngIf",!e.creationMode),n.Db(4),n.pc("title",n.jc(9,23,"lang.templateName")),n.pc("placeholder",n.jc(10,25,"lang.templateName")),n.oc("ngModel",e.template.label),n.Db(6),n.pc("placeholder",n.jc(15,27,"lang.description")),n.pc("title",n.jc(16,29,"lang.description")),n.oc("ngModel",e.template.description),n.Db(7),n.pc("title",n.jc(22,31,"lang.templateTarget")),n.pc("placeholder",n.jc(23,33,"lang.templateTarget")),n.oc("disabled",!e.creationMode)("ngModel",e.template.target),n.Db(3),n.oc("ngForOf",e.targetTypes),n.Db(1),n.oc("ngIf","attachments"==e.template.target),n.Db(1),n.oc("ngIf","acknowledgementReceipt"==e.template.target),n.Db(1),n.oc("ngIf","sendmail"==e.template.target),n.Db(1),n.oc("ngIf",e.availableTypes.length>1),n.Db(1),n.oc("ngIf","OFFICE"==e.template.type),n.Db(1),n.oc("ngIf","TXT"==e.template.type),n.Db(1),n.oc("ngIf","HTML"==e.template.type),n.Db(1),n.oc("ngIf","notifications"==e.template.target),n.Db(1),n.oc("ngIf","OFFICE_HTML"==e.template.type),n.Db(2),n.oc("disabled",!t.form.valid||e.lockFound),n.Db(1),n.Rc(n.jc(37,35,"lang.save"))}}function fZ(t,e){if(1&t&&(n.Wb(0,"mat-list-item"),n.Wb(1,"mat-icon",5),n.Rb(2,"i",6),n.Vb(),n.Wb(3,"span",7),n.Qc(4),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(4),n.Sc(" ",t.entity_label," ")}}let mZ=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c,l,d,h){this.http=t,this.sanitizer=e,this.route=i,this.router=n,this.notify=a,this.headerService=s,this.dialog=o,this.appService=r,this.viewContainerRef=c,this.functionsService=l,this.translate=d,this.authService=h,this.loading=!1,this.template={id:0,label:"",description:"",datasource:"letterbox_attachment",target:"",type:"",file:null},this.targetTypes=["acknowledgementReceipt","notes","sendmail","indexingFile","notifications","attachments"],this.allowedExtensions=["doc","docx","dotx","odt","ott","html","xlsl","xlsx","xltx","ods","ots","csv"],this.selectedModelFile=null,this.availableTypes=[],this.statuses=[],this.categoriesList=[],this.keywordsList=[],this.jnlpValue={},this.extensionModels=[],this.buttonFileName=this.translate.instant("lang.importFile"),this.lockFound=!1,this.templateDocView=null,this.data=[],this.config={},this.documentImported=!1}ngOnInit(){this.loading=!0,this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.route.params.subscribe(t=>{void 0===t.id?(this.headerService.setHeader(this.translate.instant("lang.templateCreation")),this.creationMode=!0,this.http.get("../rest/administration/templates/new").subscribe(t=>{this.setInitialValue(t),this.loading=!1})):(this.creationMode=!1,this.http.get("../rest/templates/"+t.id+"/details").subscribe(t=>{this.setInitialValue(t),this.template={id:t.template.template_id,label:t.template.template_label,description:t.template.template_comment,datasource:t.template.template_datasource,target:t.template.template_target,type:t.template.template_type,subject:t.template.subject,file:{}},this.updateTemplateType(),this.selectedModelFile=t.template.template_file_name,this.template.template_attachment_type=t.template.template_attachment_type,"HTML"===this.template.type||"TXT"===this.template.type?this.template.file.content=t.template.template_content:"OFFICE"===this.template.type?(this.template.file.format=t.template.template_file_name.split(".").pop(),this.template.file.name=t.template.template_file_name,this.getViewTemplateContent()):"acknowledgementReceipt"===this.template.target&&(this.functionsService.empty(t.template.template_file_name)||(this.template.file.paper.format=t.template.template_file_name.split(".").pop()),this.template.file.paper.name=t.template.template_file_name,this.template.file.electronic.content=t.template.template_content,this.getViewTemplateContent()),this.headerService.setHeader(this.translate.instant("lang.templateModification"),this.template.template_label),this.loading=!1})),this.template.template_attachment_type||(this.template.template_attachment_type="all")})}getViewTemplateContent(){this.http.get(`../rest/templates/${this.template.id}/content`).pipe(Object(mt.a)(t=>{this.templateDocView=this.sanitizer.bypassSecurityTrustResourceUrl("data:application/pdf;base64,"+t.encodedDocument)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}initMce(t){setTimeout(()=>{tinymce.remove("textarea"),tinymce.baseURL="../node_modules/tinymce",tinymce.suffix=".min",tinymce.init({selector:t,statusbar:!1,language:this.translate.instant("lang.langISO").replace("-","_"),language_url:`../node_modules/tinymce-i18n/langs/${this.translate.instant("lang.langISO").replace("-","_")}.js`,height:"200",plugins:["autoresize","code"],external_plugins:{maarch_b64image:"../../src/frontend/plugins/tinymce/maarch_b64image/plugin.min.js"},menubar:!1,toolbar:"undo | bold italic underline | alignleft aligncenter alignright | maarch_b64image | forecolor | code",theme_buttons1_add:"fontselect,fontsizeselect",theme_buttons2_add_before:"cut,copy,paste,pastetext,pasteword,separator,search,replace,separator",theme_buttons2_add:"separator,insertdate,inserttime,preview,separator,forecolor,backcolor",theme_buttons3_add_before:"tablecontrols,separator",theme_buttons3_add:"separator,print,separator,ltr,rtl,separator,fullscreen,separator,insertlayer,moveforward,movebackward,absolut",theme_toolbar_align:"left",theme_advanced_toolbar_location:"top",theme_styles:"Header 1=header1;Header 2=header2;Header 3=header3;Table Row=tableRow1",setup:t=>{t.on("keyup",t=>{"HTML"===this.template.type&&null!=tinymce.get("templateHtml")&&(this.template.file.content=tinymce.get("templateHtml").getContent()),"OFFICE_HTML"===this.template.type&&null!=tinymce.get("templateOfficeHtml")&&(this.template.file.electronic.content=tinymce.get("templateOfficeHtml").getContent())})}})},20)}setInitialValue(t){this.extensionModels=[],t.templatesModels.forEach(t=>{-1===this.extensionModels.indexOf(t.fileExt)&&this.extensionModels.push(t.fileExt)}),this.defaultTemplatesList=t.templatesModels,this.attachmentTypesList=t.attachmentTypes,this.datasourcesList=t.datasources,this.maarchTree.initData(t.entities.map(t=>Object.assign(Object.assign({},t),{id:t.serialId})))}getBase64Document(t){const e=new Uint8Array(t).reduce((t,e)=>t+String.fromCharCode(e),"");return btoa(e)}uploadFileTrigger(t){if(t.target.files&&t.target.files[0]&&this.isExtensionAllowed(t.target.files[0])){const e=new FileReader;"acknowledgementReceipt"===this.template.target?(this.template.file.paper={name:"",type:"",content:""},this.template.file.paper.name=t.target.files[0].name,this.selectedModelFile=this.template.file.paper.name,this.template.file.paper.type=t.target.files[0].type,this.template.file.paper.format=this.template.file.paper.name.split(".").pop()):(this.template.file={name:"",type:"",content:""},this.template.file.name=t.target.files[0].name,this.selectedModelFile=this.template.file.name,this.template.file.type=t.target.files[0].type,this.template.file.format=this.template.file.name.split(".").pop()),e.readAsArrayBuffer(t.target.files[0]),e.onload=t=>{"acknowledgementReceipt"===this.template.target?this.template.file.paper.content=this.getBase64Document(t.target.result):this.template.file.content=this.getBase64Document(t.target.result),this.documentImported=!0,this.getViewTemplateFile()}}}isExtensionAllowed(t){const e=t.name.toLowerCase().split(".").pop();return 0!==this.allowedExtensions.filter(t=>t.toLowerCase()===e.toLowerCase()).length||(this.dialog.open(qt.a,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.notAllowedExtension")+" !",msg:this.translate.instant("lang.file")+" : <b>"+t.name+"</b>, "+this.translate.instant("lang.type")+" : <b>"+t.type+"</b><br/><br/><u>"+this.translate.instant("lang.allowedExtensions")+"</u> : <br/>"+this.allowedExtensions.filter((t,e,i)=>e===i.indexOf(t)).join(", ")}}),!1)}editFile(){const t={docUrl:"rest/onlyOffice/mergedFile"};if(this.creationMode){if("acknowledgementReceipt"!==this.template.target)if(this.functionsService.empty(this.template.file.content)){t.objectType="templateCreation";for(const e of this.defaultTemplatesList)this.selectedModelFile===e.fileExt+": "+e.fileName&&(t.objectId=e.filePath);t.extension=t.objectId.toLowerCase().split(".").pop()}else t.objectType="encodedResource",t.objectId=this.template.file.content,t.extension=this.template.file.format;else if("acknowledgementReceipt"===this.template.target)if(this.functionsService.empty(this.template.file.paper.content)){t.objectType="templateCreation";for(const e of this.defaultTemplatesList)this.selectedModelFile===e.fileExt+": "+e.fileName&&(t.objectId=e.filePath);t.extension=t.objectId.toLowerCase().split(".").pop()}else t.objectType="encodedResource",t.objectId=this.template.file.paper.content,t.extension=this.template.file.paper.format}else"acknowledgementReceipt"!==this.template.target?this.functionsService.empty(this.template.file.content)?(t.objectType="templateModification",t.objectId=this.template.id,t.extension=this.template.file.name.toLowerCase().split(".").pop()):(t.objectType="encodedResource",t.objectId=this.template.file.content,t.extension=this.template.file.format):"acknowledgementReceipt"===this.template.target&&(this.functionsService.empty(this.template.file.paper.content)?(t.objectType="templateModification",t.objectId=this.template.id,t.extension=this.template.file.paper.name.toLowerCase().split(".").pop()):(t.objectType="encodedResource",t.objectId=this.template.file.paper.content,t.extension=this.template.file.paper.format));if("java"===this.headerService.user.preferences.documentEdition){if(this.creationMode){t.objectId="",t.objectType="templateCreation";for(const e of this.defaultTemplatesList)this.selectedModelFile===e.fileExt+": "+e.fileName&&(t.objectId=e.filePath);if(this.functionsService.empty(t.objectId))return alert(this.translate.instant("lang.canNotEditImportedDocumentWhenJava")),!1}else t.objectType="templateModification",t.objectId=this.template.id;t.authToken=this.authService.getToken(),this.launchJavaEditor(t)}else"java"!==this.headerService.user.preferences.documentEdition&&this.launchIntegratedEditor(t,this.headerService.user.preferences.documentEdition)}launchJavaEditor(t){this.http.post("../rest/jnlp",t).pipe(Object(mt.a)(e=>{window.location.href="../rest/jnlp/"+e.generatedJnlp,this.checkLockFile(e.jnlpUniqueId,t.extension)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}launchIntegratedEditor(t,e){this.dialogRef=this.dialog.open(WJ,{autoFocus:!1,panelClass:"maarch-full-height-modal",minWidth:"80%",disableClose:!0,data:{title:this.template.template_style,editorOptions:t,file:{format:t.extension},editorType:e}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>!this.functionsService.empty(t)),Object(mt.a)(e=>{"acknowledgementReceipt"===this.template.target?(this.template.file.paper.name=this.selectedModelFile,this.template.file.paper.format=t.extension,this.template.file.paper.content=e.content):(this.template.file.name=this.selectedModelFile,this.template.file.format=t.extension,this.template.file.content=e.content),this.getViewTemplateFile()}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}getViewTemplateFile(){this.http.post("../rest/convertedFile/encodedFile",{encodedFile:"acknowledgementReceipt"===this.template.target?this.template.file.paper.content:this.template.file.content,format:"acknowledgementReceipt"===this.template.target?this.template.file.paper.format:this.template.file.format}).pipe(Object(mt.a)(t=>{this.templateDocView=this.sanitizer.bypassSecurityTrustResourceUrl("data:application/pdf;base64,"+t.encodedResource)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}checkLockFile(t,e){this.intervalLockFile=setInterval(()=>{this.http.get("../rest/jnlp/lock/"+t).pipe(Object(mt.a)(t=>{this.lockFound=t.lockFileFound,this.lockFound||(clearInterval(this.intervalLockFile),this.loadTmpFile(`${t.fileTrunk}.${e}`))})).subscribe()},1e3)}loadTmpFile(t){this.http.get(`../rest/convertedFile/${t}?convert=true`).pipe(Object(mt.a)(e=>{"acknowledgementReceipt"===this.template.target?(this.template.file.paper.name=this.selectedModelFile,this.template.file.paper.format=t.toLowerCase().split(".").pop(),this.template.file.paper.content=e.encodedResource):(this.template.file.name=this.selectedModelFile,this.template.file.format=t.toLowerCase().split(".").pop(),this.template.file.content=e.encodedResource),this.templateDocView=this.sanitizer.bypassSecurityTrustResourceUrl("data:application/pdf;base64,"+e.encodedConvertedResource)})).subscribe()}duplicateTemplate(){this.lockFound||"acknowledgementReceipt"===this.template.target||confirm(this.translate.instant("lang.confirmDuplicate"))&&this.http.post("../rest/templates/"+this.template.id+"/duplicate",{id:this.template.id}).subscribe(t=>{this.notify.success(this.translate.instant("lang.templateDuplicated")),this.router.navigate(["/administration/templates/"+t.id])},t=>{this.notify.error(t.error.errors)})}onSubmit(){this.isValidTemplate()&&(this.creationMode?this.http.post("../rest/templates",this.formatTemplate()).pipe(Object(mt.a)(t=>{t.checkEntities?(this.config={panelClass:"maarch-modal",data:{entitiesList:t.checkEntities,template_attachment_type:this.template.template_attachment_type}},this.dialog.open(gZ,this.config)):(this.router.navigate(["/administration/templates"]),this.notify.success(this.translate.instant("lang.templateAdded")))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe():this.http.put("../rest/templates/"+this.template.id,this.formatTemplate()).pipe(Object(mt.a)(t=>{!this.functionsService.empty(t)&&t.checkEntities?(this.config={panelClass:"maarch-modal",data:{entitiesList:t.checkEntities,template_attachment_type:this.template.template_attachment_type}},this.dialogRef=this.dialog.open(gZ,this.config)):(this.router.navigate(["/administration/templates"]),this.notify.success(this.translate.instant("lang.templateUpdated")))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe())}formatTemplate(){const t=Object.assign({},this.template);return t.entities=this.maarchTree.getSelectedNodes().map(t=>t.entity_id),t}isValidTemplate(){return"acknowledgementReceipt"===this.template.target&&this.functionsService.empty(this.template.file.paper.name)&&this.functionsService.empty(this.template.file.electronic.content)?(alert(this.translate.instant("lang.mustCompleteAR")),!1):"acknowledgementReceipt"===this.template.target||"OFFICE"!==this.template.type||!this.functionsService.empty(this.template.file.name)||(alert(this.translate.instant("lang.editModelFirst")),!1)}displayDatasources(t){return"notification"===t.target&&"notifications"===this.template.target||"document"===t.target&&"notifications"!==this.template.target}updateTemplateType(){this.template.file={name:"",type:"",content:""},this.templateDocView=null,["attachments","indexingFile"].indexOf(this.template.target)>-1?(this.template.type="OFFICE",this.availableTypes=["OFFICE"]):["notifications","sendmail"].indexOf(this.template.target)>-1?(this.template.type="HTML",this.availableTypes=["HTML","TXT"],this.initMce("textarea#templateHtml")):"notes"===this.template.target?(this.template.type="TXT",this.availableTypes=["TXT"]):"acknowledgementReceipt"===this.template.target&&(this.template.file={electronic:{name:"",type:"",content:""},paper:{name:"",type:"",content:""}},this.template.type="OFFICE_HTML",this.availableTypes=[],this.template.template_attachment_type="",this.initMce("textarea#templateOfficeHtml"))}changeType(t){"HTML"===t.value?this.initMce("textarea#templateHtml"):tinymce.remove("textarea"),this.template.type=t.value}changeModel(){this.template.file={name:"",type:"",content:""},this.template.file={electronic:{name:"",type:"",content:""}},this.documentImported=!1}loadTab(t){0===t.index?this.initMce("textarea#templateOfficeHtml"):(tinymce.remove("textarea"),null==this.template.template_file_name&&null==this.template.template_style&&(this.buttonFileName=this.translate.instant("lang.importFile")))}ngOnDestroy(){tinymce.remove("textarea"),this.intervalLockFile&&clearInterval(this.intervalLockFile)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(v.b),n.Qb(ca.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a),n.Qb(q.b),n.Qb(w.a),n.Qb(n.T),n.Qb(_t.a),n.Qb(g.e),n.Qb(_.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(TJ,!0),n.Kc(EJ,!0),n.Kc(FJ,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.maarchTree=i.first))},decls:24,vars:14,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content",2,"padding","10px 10px 0px 10px"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content","style","display: contents;",4,"ngIf"],["fixedTopGap","56","position","end",2,"overflow-x","hidden","width","400px",3,"mode","fixedInViewport","opened"],["snav2",""],["mat-subheader",""],[2,"padding","10px"],["maarchTree",""],[4,"ngIf"],["mat-list-item","",3,"disableRipple","click"],["color","primary","mat-list-icon","",1,"fa","fa-copy"],["mat-line",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content",2,"display","contents"],[1,"form-horizontal",2,"display","contents",3,"ngSubmit"],["templatesFormUp","ngForm"],[1,"col-sm-12"],["class","form-group",4,"ngIf"],[1,"form-group"],["matInput","","name","label","type","text","maxlength","255","required","",3,"ngModel","title","placeholder","ngModelChange"],["matInput","","name","description","name","template_comment","matTextareaAutosize","","matAutosizeMinRows","2","matAutosizeMaxRows","5","required","",3,"ngModel","placeholder","title","ngModelChange"],["name","target","required","",3,"disabled","title","placeholder","ngModel","ngModelChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[1,"col-sm-12",2,"background","white","position","sticky","bottom","0px","text-align","center"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],["matInput","","type","number","disabled","",3,"title","value","placeholder"],[3,"value"],["id","template_attachment_type","name","template_attachment_type",3,"title","placeholder","ngModel","ngModelChange"],["value","all"],["id","template_attachment_type","name","template_attachment_type","required","",3,"disabled","title","placeholder","ngModel","ngModelChange"],["value","simple"],["value","sva"],["value","svr"],["matInput","","name","subject","type","text","maxlength","255",3,"ngModel","title","placeholder","ngModelChange"],["required","","name","type",3,"disabled","change"],["style","margin-left:10px","color","primary","name","type",3,"value","checked",4,"ngFor","ngForOf"],["color","primary","name","type",2,"margin-left","10px",3,"value","checked"],[1,"col-md-12",2,"display","none"],[1,"form-inline","hide"],["type","file","name","files[]","accept","application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel,application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml\u200c.slideshow,application/vnd.oasis.opendocument.text,application/vnd.oasis.opendocument.presentation,application/vnd.oasis.opendocument.spreadsheet",3,"change"],["uploadSignFileOffice",""],["mat-raised-button","","color","default","type","button",3,"disabled","click",4,"ngIf"],["mat-raised-button","","color","default","type","button",3,"disabled","click"],["style","width:100%;height:800px;",3,"src",4,"ngIf"],["id","template_style","name","template_style",3,"disabled","title","placeholder","ngModel","required","ngModelChange","selectionChange"],[3,"label"],[1,"selectFile",3,"value","click"],["color","primary",1,"fa","fa-paperclip",2,"height","auto"],[4,"ngFor","ngForOf"],[3,"value",4,"ngIf"],[2,"width","100%","height","800px",3,"src"],["matInput","","name","templateTxt","id","templateTxt","matTextareaAutosize","","matAutosizeMinRows","5","matAutosizeMaxRows","5",3,"ngModel","placeholder","title","required","ngModelChange"],["id","html_mode",2,"display","block","width","100%"],["name","templateHtml","id","templateHtml","rows","15","cols","60",2,"width","100%",3,"ngModel","required","ngModelChange"],["id","datasource","name","datasource",3,"title","placeholder","ngModel","ngModelChange"],["value",""],[3,"selectedTabChange"],["name","templateOfficeHtml","id","templateOfficeHtml","rows","15","cols","60",2,"width","100%",3,"ngModel","required","ngModelChange"],["uploadSignFileOfficeHtml",""],["id","template_style","name","template_style",3,"disabled","title","placeholder","ngModel","required","ngModelChange"],[2,"text-align","center",3,"value","click"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,QJ,1,1,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,NJ,2,0,"div",9),n.Oc(14,bZ,38,37,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Wb(15,"mat-sidenav",11,12),n.Wb(17,"mat-list"),n.Wb(18,"h3",13),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"div",14),n.Rb(22,"app-maarch-flat-tree",null,15),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",!e.appService.getViewMode()),n.Db(4),n.Rc(n.jc(20,12,"lang.chooseEntityAssociationModel")))},directives:[I.e,I.f,Ot,We,P.t,I.d,R.a,R.g,cQ,R.h,R.d,S.a,R.c,W.l,V.c,K.a,X.K,X.v,X.w,Y.c,J.b,X.d,X.p,X.F,X.u,X.x,J.d,ee.a,P.s,k.b,W.p,hc.b,hc.a,W.o,Te.c,Te.a],pipes:[g.d],styles:[".mat-list-item.disabled[_ngcontent-%COMP%]{opacity:.5;cursor:default}.mat-list-item.disabled[_ngcontent-%COMP%]:active, .mat-list-item.disabled[_ngcontent-%COMP%]:focus, .mat-list-item.disabled[_ngcontent-%COMP%]:hover{background:initial}.selectFile[_ngcontent-%COMP%]{text-align:center}.selectFile[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:flex!important;align-items:center;justify-content:center}"]}),t})(),gZ=(()=>{class t{constructor(t,e,i){this.http=t,this.data=e,this.dialogRef=i}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(v.b),n.Qb(q.a),n.Qb(q.h))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:18,vars:13,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["role","alert",1,"alert-message","alert-message-info"],[4,"ngFor","ngForOf"],["mat-raised-button","","color","primary","type","submit",3,"click"],["mat-list-icon",""],["color","primary",1,"fa","fa-share-alt"],["mat-line",""]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-dialog-content"),n.Wb(5,"div",2),n.Wb(6,"p"),n.Qc(7),n.ic(8,"translate"),n.Wb(9,"b"),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(12,"mat-list"),n.Oc(13,fZ,5,1,"mat-list-item",3),n.Vb(),n.Vb(),n.Wb(14,"mat-dialog-actions"),n.Wb(15,"button",4),n.dc("click",(function(){return e.dialogRef.close()})),n.Qc(16),n.ic(17,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,5,"lang.templateAssociateEntities")),n.Db(5),n.Rc(n.jc(8,7,"lang.templateCheckEntities")),n.Db(3),n.Rc(n.jc(11,9,"lang.AR"+e.data.template_attachment_type)),n.Db(3),n.oc("ngForOf",e.data.entitiesList),n.Db(3),n.Rc(n.jc(17,11,"lang.close")))},directives:[q.i,q.f,R.a,P.s,q.c,k.b,R.d,S.a,R.c,W.l],pipes:[g.d],styles:[".alert-message[_ngcontent-%COMP%]{max-width:inherit}"]}),t})();function vZ(t,e){1&t&&(n.Wb(0,"div",10),n.Rb(1,"mat-spinner",11),n.Vb())}function _Z(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",12),n.Wb(1,"mat-tab-group"),n.Wb(2,"mat-tab",13),n.ic(3,"translate"),n.Wb(4,"form",14,15),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Wb(6,"mat-list"),n.Wb(7,"p",16),n.Wb(8,"mat-slide-toggle",17),n.dc("change",(function(){n.Dc(t);const e=n.hc();return e.toggleRule(e.passwordRules.complexityUpper)})),n.Qc(9),n.Vb(),n.Wb(10,"mat-slide-toggle",17),n.dc("change",(function(){n.Dc(t);const e=n.hc();return e.toggleRule(e.passwordRules.complexityNumber)})),n.Qc(11),n.Vb(),n.Wb(12,"mat-slide-toggle",17),n.dc("change",(function(){n.Dc(t);const e=n.hc();return e.toggleRule(e.passwordRules.complexitySpecial)})),n.Qc(13),n.Vb(),n.Vb(),n.Wb(14,"mat-list-item",18),n.Wb(15,"mat-icon",19),n.Wb(16,"mat-slide-toggle",20),n.dc("change",(function(){n.Dc(t);const e=n.hc();return e.toggleRule(e.passwordRules.minLength)})),n.Vb(),n.Vb(),n.Wb(17,"p",21),n.Wb(18,"mat-form-field"),n.Wb(19,"input",22),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().passwordRules.minLength.value=e})),n.Vb(),n.Wb(20,"span",23),n.Qc(21),n.ic(22,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(23,"mat-list-item",18),n.Wb(24,"mat-icon",19),n.Wb(25,"mat-slide-toggle",20),n.dc("change",(function(){n.Dc(t);const e=n.hc();return e.toggleRule(e.passwordRules.lockAttempts)})),n.Vb(),n.Vb(),n.Wb(26,"p",24),n.Wb(27,"mat-form-field",25),n.Wb(28,"input",22),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().passwordRules.lockAttempts.value=e})),n.Vb(),n.Vb(),n.Wb(29,"mat-form-field",26),n.Wb(30,"input",22),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().passwordRules.lockTime.value=e})),n.Vb(),n.Wb(31,"span",23),n.Qc(32),n.ic(33,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(34,"mat-list-item",18),n.Wb(35,"mat-icon",19),n.Wb(36,"mat-slide-toggle",20),n.dc("change",(function(){n.Dc(t);const e=n.hc();return e.toggleRule(e.passwordRules.renewal)})),n.Vb(),n.Vb(),n.Wb(37,"p",21),n.Wb(38,"mat-form-field"),n.Wb(39,"input",22),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().passwordRules.renewal.value=e})),n.Vb(),n.Wb(40,"span",23),n.Qc(41),n.ic(42,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(43,"mat-list-item",18),n.Wb(44,"mat-icon",19),n.Wb(45,"mat-slide-toggle",20),n.dc("change",(function(){n.Dc(t);const e=n.hc();return e.toggleRule(e.passwordRules.historyLastUse)})),n.Vb(),n.Vb(),n.Wb(46,"p",21),n.Wb(47,"mat-form-field"),n.Wb(48,"input",22),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().passwordRules.historyLastUse.value=e})),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(49,"div",27),n.Wb(50,"button",28),n.Qc(51),n.ic(52,"translate"),n.Vb(),n.Wb(53,"button",29),n.dc("click",(function(){return n.Dc(t),n.hc().cancelModification()})),n.Qc(54),n.ic(55,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(5),e=n.hc();n.Db(2),n.pc("label",n.jc(3,41,"lang.password")),n.Db(6),n.oc("name",e.passwordRules.complexityUpper.label)("checked",e.passwordRules.complexityUpper.enabled),n.Db(1),n.Sc(" ",e.passwordRules.complexityUpper.label,""),n.Db(1),n.oc("name",e.passwordRules.complexityNumber.label)("checked",e.passwordRules.complexityNumber.enabled),n.Db(1),n.Sc(" ",e.passwordRules.complexityNumber.label,""),n.Db(1),n.oc("name",e.passwordRules.complexitySpecial.label)("checked",e.passwordRules.complexitySpecial.enabled),n.Db(1),n.Sc(" ",e.passwordRules.complexitySpecial.label,""),n.Db(3),n.oc("checked",e.passwordRules.minLength.enabled),n.Db(3),n.pc("placeholder",e.passwordRules.minLength.label),n.oc("disabled",!e.passwordRules.minLength.enabled)("name",e.passwordRules.minLength.label)("ngModel",e.passwordRules.minLength.value),n.Db(2),n.Sc("\xa0",n.jc(22,43,"lang.chars"),""),n.Db(4),n.oc("checked",e.passwordRules.lockAttempts.enabled),n.Db(3),n.pc("placeholder",e.passwordRules.lockAttempts.label),n.oc("disabled",!e.passwordRules.lockAttempts.enabled)("name",e.passwordRules.lockAttempts.label)("ngModel",e.passwordRules.lockAttempts.value),n.Db(2),n.pc("placeholder",e.passwordRules.lockTime.label),n.oc("disabled",!e.passwordRules.lockTime.enabled)("name",e.passwordRules.lockTime.label)("ngModel",e.passwordRules.lockTime.value),n.Db(2),n.Sc("\xa0",n.jc(33,45,"lang.minutes"),""),n.Db(4),n.oc("checked",e.passwordRules.renewal.enabled),n.Db(3),n.pc("placeholder",e.passwordRules.renewal.label),n.oc("disabled",!e.passwordRules.renewal.enabled)("name",e.passwordRules.renewal.label)("ngModel",e.passwordRules.renewal.value),n.Db(2),n.Sc("\xa0",n.jc(42,47,"lang.days"),""),n.Db(4),n.oc("checked",e.passwordRules.historyLastUse.enabled),n.Db(3),n.pc("placeholder",e.passwordRules.historyLastUse.label),n.oc("disabled",!e.passwordRules.historyLastUse.enabled)("name",e.passwordRules.historyLastUse.label)("ngModel",e.passwordRules.historyLastUse.value),n.Db(2),n.oc("disabled",!t.valid&&!e.disabledForm()||e.checkModif()),n.Db(1),n.Rc(n.jc(52,49,"lang.validate")),n.Db(2),n.oc("disabled",e.checkModif()),n.Db(1),n.Rc(n.jc(55,51,"lang.cancel"))}}let yZ=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.loading=!1,this.passwordRules={minLength:{enabled:!1,value:0},complexityUpper:{enabled:!1,value:0},complexityNumber:{enabled:!1,value:0},complexitySpecial:{enabled:!1,value:0},renewal:{enabled:!1,value:0},historyLastUse:{enabled:!1,value:0},lockTime:{enabled:!1,value:0},lockAttempts:{enabled:!1,value:0}},this.passwordRulesClone={},this.passwordRulesList=[]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.securitiesAdministration")),this.loading=!0,this.http.get("../rest/passwordRules").subscribe(t=>{this.passwordRulesList=t.rules,t.rules.forEach(t=>{this.passwordRules[t.label].enabled=t.enabled,this.passwordRules[t.label].value=t.value,this.passwordRules[t.label].label=this.translate.instant("lang.password"+t.label+"Required"),this.passwordRules[t.label].id=t.label,this.loading=!1}),this.passwordRulesClone=JSON.parse(JSON.stringify(this.passwordRules))},t=>{this.notify.error(t.error.errors)})}cancelModification(){this.passwordRules=JSON.parse(JSON.stringify(this.passwordRulesClone)),this.passwordRulesList.forEach(t=>{t.enabled=this.passwordRules[t.label].enabled,t.value=this.passwordRules[t.label].value})}checkModif(){return JSON.stringify(this.passwordRules)===JSON.stringify(this.passwordRulesClone)}disabledForm(){return!(this.passwordRules.lockTime.enabled||this.passwordRules.minLength.enabled||this.passwordRules.lockAttempts.enabled||this.passwordRules.renewal.enabled||this.passwordRules.historyLastUse.enabled)}toggleRule(t){t.enabled=!t.enabled,this.passwordRulesList.forEach(e=>{"lockAttempts"!==t.id||"lockTime"!==e.label&&"lockAttempts"!==e.label?t.id===e.label&&(e.enabled=t.enabled):(e.enabled=t.enabled,this.passwordRules.lockTime.enabled=t.enabled)})}onSubmit(){this.passwordRulesList.forEach(t=>{t.enabled=this.passwordRules[t.label].enabled,t.value=this.passwordRules[t.label].value}),this.http.put("../rest/passwordRules",{rules:this.passwordRulesList}).subscribe(t=>{this.passwordRulesClone=JSON.parse(JSON.stringify(this.passwordRules)),this.notify.success(this.translate.instant("lang.passwordRulesUpdated"))},t=>{this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:13,vars:8,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[3,"label"],[3,"ngSubmit"],["passwordForm","ngForm"],[2,"margin-bottom","40px","text-align","center"],["color","primary",2,"padding-left","10px","padding-right","10px",3,"name","checked","change"],[2,"margin-top","15px","margin-bottom","15px"],["mat-list-icon",""],["color","primary",2,"position","relative","top","-10px",3,"checked","change"],["mat-line",""],["type","number","min","1","pattern","^[1-9][0-9]*","matInput","","required","",3,"disabled","name","ngModel","placeholder","ngModelChange"],["matSuffix",""],["mat-line","",2,"display","flex"],[2,"flex","1","padding-right","10px"],[2,"flex","1"],[1,"col-md-12","text-center",2,"padding","10px"],["mat-raised-button","","type","submit","color","primary",3,"disabled"],["mat-raised-button","","type","button","color","default",3,"disabled","click"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,vZ,2,0,"div",8),n.Oc(12,_Z,56,53,"mat-card",9),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,V.c,K.a,Te.c,Te.a,X.K,X.v,X.w,R.a,te.a,R.d,S.a,R.c,W.l,Y.c,X.A,J.b,X.d,X.B,X.F,X.u,X.x,Y.j,k.b],pipes:[g.d],encapsulation:2}),t})();const xZ=["snav2"],CZ=["adminMenuTemplate"],OZ=["sendmailForm"];function DZ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",14),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",22),n.dc("click",(function(){return n.Dc(t),n.hc(),n.zc(16).toggle()})),n.Rb(5,"mat-icon",23),n.Wb(6,"p",24),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb()}2&t&&(n.Db(2),n.Rc(n.jc(3,2,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,4,"lang.checkSendmail")," "))}function wZ(t,e){1&t&&(n.Wb(0,"div",25),n.Rb(1,"mat-spinner",26),n.Vb())}function MZ(t,e){if(1&t&&(n.Wb(0,"mat-option",49),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function kZ(t,e){if(1&t&&(n.Wb(0,"mat-option",49),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}const SZ=function(){return["smtp","mail"]},IZ=function(t){return[t]};function PZ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",27),n.Wb(1,"mat-tab-group"),n.Wb(2,"mat-tab",28),n.ic(3,"translate"),n.Wb(4,"form",29,30),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Wb(6,"div",15),n.Wb(7,"div",31),n.Wb(8,"mat-form-field"),n.Wb(9,"mat-select",32,33),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().sendmail.type=e})),n.ic(11,"translate"),n.Oc(12,MZ,2,2,"mat-option",34),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(13,"div",15),n.Wb(14,"div",35),n.Wb(15,"mat-form-field"),n.Wb(16,"mat-select",36),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().sendmail.secure=e})),n.ic(17,"translate"),n.Oc(18,kZ,2,2,"mat-option",34),n.Vb(),n.Vb(),n.Vb(),n.Wb(19,"div",37),n.Wb(20,"mat-form-field"),n.Wb(21,"input",38),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().sendmail.host=e})),n.ic(22,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(23,"div",39),n.Wb(24,"mat-form-field"),n.Wb(25,"input",40),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().sendmail.port=e})),n.ic(26,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(27,"div",15),n.Wb(28,"div",16),n.Wb(29,"mat-slide-toggle",41),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().sendmail.auth=e}))("change",(function(e){return n.Dc(t),n.hc().cleanAuthInfo(e)})),n.Qc(30),n.ic(31,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(32,"div",15),n.Wb(33,"div",16),n.Wb(34,"mat-form-field"),n.Wb(35,"input",42),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().sendmail.user=e})),n.ic(36,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(37,"div",16),n.Wb(38,"mat-form-field"),n.Wb(39,"input",43),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().sendmail.password=e})),n.ic(40,"translate"),n.ic(41,"translate"),n.Vb(),n.Wb(42,"mat-icon",44),n.dc("click",(function(){n.Dc(t);const e=n.hc();return e.hidePassword=!e.hidePassword})),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(43,"div",15),n.Wb(44,"div",16),n.Wb(45,"mat-form-field"),n.Wb(46,"input",45),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().sendmail.from=e})),n.ic(47,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(48,"div",46),n.Wb(49,"button",47),n.Qc(50),n.ic(51,"translate"),n.Vb(),n.Wb(52,"button",48),n.dc("click",(function(){return n.Dc(t),n.hc().cancelModification()})),n.Qc(53),n.ic(54,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(5),e=n.hc();n.Db(2),n.pc("label",n.jc(3,38,"lang.informations")),n.Db(7),n.pc("placeholder",n.jc(11,40,"lang.configurationType")),n.oc("ngModel",e.sendmail.type),n.Db(3),n.oc("ngForOf",e.smtpTypeList),n.Db(1),n.Lc("opacity",n.uc(62,SZ).indexOf(e.sendmail.type)>-1?"1":"0.5"),n.Db(3),n.pc("placeholder",n.jc(17,42,"lang.smtpAuth")),n.oc("disabled",-1==n.uc(63,SZ).indexOf(e.sendmail.type))("ngModel",e.sendmail.secure),n.Db(2),n.oc("ngForOf",e.smtpSecList),n.Db(3),n.pc("placeholder",n.jc(22,44,"lang.host")),n.oc("disabled",-1==n.uc(64,SZ).indexOf(e.sendmail.type))("ngModel",e.sendmail.host),n.Db(4),n.pc("placeholder",n.jc(26,46,"lang.port")),n.oc("ngModel",e.sendmail.port)("disabled",-1==n.uc(65,SZ).indexOf(e.sendmail.type)),n.Db(2),n.Lc("opacity",n.uc(66,SZ).indexOf(e.sendmail.type)>-1?"1":"0.5"),n.Db(2),n.oc("ngModel",e.sendmail.auth)("disabled",-1==n.uc(67,SZ).indexOf(e.sendmail.type)),n.Db(1),n.Rc(n.jc(31,48,"lang.enableAuth")),n.Db(2),n.Lc("opacity",n.uc(68,SZ).indexOf(e.sendmail.type)>-1?"1":"0.5"),n.Db(3),n.pc("placeholder",n.jc(36,50,"lang.id")),n.oc("ngModel",e.sendmail.user)("disabled",!e.sendmail.auth||-1==n.uc(69,SZ).indexOf(e.sendmail.type)),n.Db(4),n.oc("type",e.hidePassword?"password":"text")("ngModel",e.sendmail.password)("disabled",!e.sendmail.auth||-1==n.uc(70,SZ).indexOf(e.sendmail.type))("placeholder",!0===e.sendmail.passwordAlreadyExists?n.jc(40,52,"lang.passwordModification"):n.jc(41,54,"lang.password"))("required",!e.sendmail.passwordAlreadyExists),n.Db(3),n.oc("ngClass",n.vc(71,IZ,e.hidePassword?"fa-eye-slash":"fa-eye")),n.Db(4),n.pc("placeholder",n.jc(47,56,"lang.mailFrom")),n.oc("ngModel",e.sendmail.from),n.Db(3),n.oc("disabled",e.checkModif()||!t.valid),n.Db(1),n.Rc(n.jc(51,58,"lang.validate")),n.Db(2),n.oc("disabled",e.checkModif()),n.Db(1),n.Rc(n.jc(54,60,"lang.cancel"))}}function VZ(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-icon",50),n.dc("click",(function(){return n.Dc(t),n.hc().testEmailSend()})),n.ic(1,"translate"),n.Vb()}2&t&&n.pc("title",n.jc(1,1,"lang.beginSendTest"))}function RZ(t,e){if(1&t&&(n.Wb(0,"mat-list-item"),n.Rb(1,"mat-icon",51),n.Wb(2,"p",24),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Gb("fas ",t.emailSendResult.icon," fa-2x"),n.Db(2),n.Sc(" ",t.emailSendResult.msg," ")}}function jZ(t,e){if(1&t&&(n.Wb(0,"div",52),n.Qc(1),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Sc(" ",t.emailSendResult.debug," ")}}let AZ=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.viewContainerRef=s,this.loading=!1,this.sendmail={type:"smtp",host:"",auth:!0,user:"",password:"",secure:"ssl",port:"465",charset:"utf-8",from:""},this.smtpTypeList=[{id:"smtp",label:this.translate.instant("lang.smtpclient")},{id:"sendmail",label:this.translate.instant("lang.smtprelay")},{id:"qmail",label:this.translate.instant("lang.qmail")},{id:"mail",label:this.translate.instant("lang.phpmail")}],this.smtpSecList=[{id:"",label:this.translate.instant("lang.none")},{id:"ssl",label:"ssl"},{id:"tls",label:"tls"}],this.sendmailClone={},this.hidePassword=!0,this.serverConnectionLoading=!1,this.emailSendLoading=!1,this.emailSendResult={icon:"",msg:"",debug:""},this.currentUser={},this.recipientTest="",this.passwordLabel=""}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.sendmailShort")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,this.http.get("../rest/configurations/admin_email_server").subscribe(t=>{this.sendmail=t.configuration.value,this.sendmailClone=JSON.parse(JSON.stringify(this.sendmail)),this.loading=!1},t=>{this.notify.handleErrors(t)})}cancelModification(){this.sendmail=JSON.parse(JSON.stringify(this.sendmailClone))}onSubmit(){this.sendmailFormCpt.invalid?this.notify.handleErrors({error:{errors:this.translate.instant("lang.notSavedBecauseInvalid")}}):this.http.put("../rest/configurations/admin_email_server",this.sendmail).subscribe(t=>{this.sendmailClone=JSON.parse(JSON.stringify(this.sendmail)),this.notify.success(this.translate.instant("lang.configurationUpdated"))},t=>{this.notify.handleErrors(t)})}checkModif(){return JSON.stringify(this.sendmailClone)===JSON.stringify(this.sendmail)}initEmailSend(){this.emailSendResult={icon:"",msg:"",debug:""},void 0===this.currentUser.mail&&this.http.get("../rest/currentUser/profile").subscribe(t=>{this.currentUser=t,this.recipientTest=t.mail})}testEmailSend(){JSON.stringify(this.sendmailClone)!==JSON.stringify(this.sendmail)&&this.onSubmit(),this.emailSendResult={icon:"fa-paper-plane primary",msg:this.translate.instant("lang.emailSendInProgress"),debug:""};const t={sender:{email:this.currentUser.mail},recipients:[this.recipientTest],object:"["+this.translate.instant("lang.doNotReply")+"] "+this.translate.instant("lang.emailSendTest"),status:"EXPRESS",body:this.translate.instant("lang.emailSendTest"),isHtml:!1};this.emailSendLoading=!0,this.http.post("../rest/emails",t).subscribe(t=>{this.emailSendLoading=!1,this.emailSendResult={icon:"fa-check green",msg:this.translate.instant("lang.emailSendSuccess"),debug:""}},t=>{this.emailSendLoading=!1,this.emailSendResult={icon:"fa-times red",msg:this.translate.instant("lang.emailSendFailed"),debug:t.error.errors}})}cleanAuthInfo(t){this.sendmail.passwordAlreadyExists=!1,this.sendmail.user="",this.sendmail.password=""}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(xZ,!0),n.Kc(CZ,!0),n.Xc(OZ,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.sendmailFormCpt=i.first))},decls:32,vars:24,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],["joyrideStep","emailTour",1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["fixedTopGap","56","position","end",2,"overflow-x","hidden","width","500px",3,"mode","fixedInViewport","opened"],["snav2",""],["disableRipple","true",2,"display","flex","flex-direction","column"],["mat-subheader",""],[1,"form-group"],[1,"col-md-12"],["testSendmailForm","ngForm"],["name","recipientTest","matInput","","pattern","(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$)",3,"placeholder","ngModel","disabled","ngModelChange"],["color","primary","style","cursor: pointer;","matSuffix","","class","fa fa-paper-plane fa-2x",3,"title","click",4,"ngIf"],[4,"ngIf"],["class","bash",4,"ngIf"],["mat-list-item","","joyrideStep","emailTour2",3,"click"],["color","primary","mat-list-icon","",1,"fas","fa-signal"],["mat-line",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[3,"label"],[3,"ngSubmit"],["sendmailForm","ngForm"],[1,"col-md-12",2,"margin-bottom","20px"],["name","smtpType","required","",3,"placeholder","ngModel","ngModelChange"],["smtpType",""],[3,"value",4,"ngFor","ngForOf"],[1,"col-md-2"],["name","SMTPSecure",3,"placeholder","disabled","ngModel","ngModelChange"],[1,"col-md-9"],["matInput","","name","host","required","",3,"disabled","ngModel","placeholder","ngModelChange"],[1,"col-md-1"],["name","port","type","number","matInput","","required","",3,"ngModel","disabled","placeholder","ngModelChange"],["color","primary","name","SMTPAuth",3,"ngModel","disabled","ngModelChange","change"],["name","user","matInput","","required","",3,"ngModel","disabled","placeholder","ngModelChange"],["name","password","matInput","",3,"type","ngModel","disabled","placeholder","required","ngModelChange"],["color","primary","matSuffix","",1,"fa","fa-2x",2,"cursor","pointer",3,"ngClass","click"],["name","mailFrom","required","","matInput","","pattern","(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$)",3,"ngModel","placeholder","ngModelChange"],[1,"col-md-12","text-center",2,"padding","10px"],["mat-raised-button","","type","submit","color","primary",3,"disabled"],["mat-raised-button","","type","button","color","default",3,"disabled","click"],[3,"value"],["color","primary","matSuffix","",1,"fa","fa-paper-plane","fa-2x",2,"cursor","pointer",3,"title","click"],["mat-list-icon",""],[1,"bash"]],template:function(t,e){if(1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,DZ,9,6,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,wZ,2,0,"div",9),n.Oc(14,PZ,55,73,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Wb(15,"mat-sidenav",11,12),n.dc("opened",(function(){return e.onSubmit(),e.initEmailSend()})),n.Wb(17,"mat-nav-list",13),n.Wb(18,"h3",14),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"div",15),n.Wb(22,"div",16),n.Wb(23,"form",null,17),n.Wb(25,"mat-form-field"),n.Wb(26,"input",18),n.dc("ngModelChange",(function(t){return e.recipientTest=t})),n.ic(27,"translate"),n.Vb(),n.Oc(28,VZ,2,3,"mat-icon",19),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Oc(29,RZ,4,4,"mat-list-item",20),n.Vb(),n.Oc(30,jZ,2,1,"div",21),n.ic(31,"translate"),n.Vb(),n.Vb()),2&t){const t=n.zc(24);n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",(e.appService.getViewMode(),!1)),n.Db(4),n.Rc(n.jc(20,18,"lang.emailSendTest")),n.Db(7),n.pc("placeholder",n.jc(27,20,"lang.mailTo")),n.oc("ngModel",e.recipientTest)("disabled",e.emailSendLoading),n.Db(2),n.oc("ngIf",!e.emailSendLoading&&t.valid),n.Db(1),n.oc("ngIf",""!=e.emailSendResult.msg),n.Db(1),n.oc("ngIf",e.emailSendResult.msg===n.jc(31,22,"lang.emailSendFailed"))}},directives:[I.e,I.f,Ot,We,za,P.t,I.d,R.h,R.g,X.K,X.v,X.w,Y.c,J.b,X.d,X.B,X.u,X.x,R.d,S.a,R.c,W.l,V.c,K.a,Te.c,Te.a,ee.a,X.F,P.s,X.A,te.a,Y.j,P.q,k.b,W.p],pipes:[g.d],styles:[".mat-list-item[_ngcontent-%COMP%]:hover{background:inherit}.green[_ngcontent-%COMP%]{color:green}.primary[_ngcontent-%COMP%]{color:#135f7f}.red[_ngcontent-%COMP%]{color:red}.bash[_ngcontent-%COMP%]{background:#34495e;height:310px;border-radius:5px;top:40px;display:absolute;color:#fff;padding:10px;margin:10px}"]}),t})();const WZ=["adminMenuTemplate"];function TZ(t,e){1&t&&(n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",11),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",12),n.Rb(5,"mat-icon",13),n.Wb(6,"p",14),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,2,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,4,"lang.add")," "))}function EZ(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Vb())}function FZ(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",38),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Rc(n.jc(2,3,"lang.label"))}}function LZ(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",t.label," ")}}function QZ(t,e){1&t&&(n.Wb(0,"mat-header-cell",38),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.description")))}function NZ(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.description," ")}}function zZ(t,e){1&t&&(n.Wb(0,"mat-header-cell",38),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.mailevaAccount")))}function BZ(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.accountid," ")}}function UZ(t,e){1&t&&n.Rb(0,"mat-header-cell")}function $Z(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",39),n.Wb(1,"button",40),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.deleteShipping(a.id)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",41),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.pc("matTooltip",n.jc(2,1,"lang.delete")))}function HZ(t,e){1&t&&n.Rb(0,"mat-header-row")}function GZ(t,e){1&t&&(n.Rb(0,"mat-row",42),n.ic(1,"translate")),2&t&&(n.qc("routerLink","/administration/shippings/",e.$implicit.id,""),n.pc("matTooltip",n.jc(1,2,"lang.view")))}function XZ(t,e){if(1&t&&(n.Wb(0,"mat-card",17),n.Wb(1,"div",18),n.Wb(2,"div",19),n.Wb(3,"mat-form-field"),n.Rb(4,"input",20),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Wb(6,"div",19),n.Rb(7,"mat-paginator",21,22),n.Vb(),n.Vb(),n.Wb(9,"mat-table",23,24),n.Ub(11,25),n.Oc(12,FZ,3,5,"mat-header-cell",26),n.Oc(13,LZ,2,3,"mat-cell",27),n.Tb(),n.Ub(14,28),n.Oc(15,QZ,3,3,"mat-header-cell",29),n.Oc(16,NZ,2,1,"mat-cell",30),n.Tb(),n.Ub(17,31),n.Oc(18,zZ,3,3,"mat-header-cell",29),n.Oc(19,BZ,2,1,"mat-cell",30),n.Tb(),n.Ub(20,32),n.Oc(21,UZ,1,0,"mat-header-cell",33),n.Oc(22,$Z,4,3,"mat-cell",34),n.Tb(),n.Oc(23,HZ,1,0,"mat-header-row",35),n.Oc(24,GZ,2,4,"mat-row",36),n.Vb(),n.Wb(25,"div",37),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.pc("placeholder",n.jc(5,10,"lang.filterBy")),n.oc("formControl",t.adminService.getFilterField()),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.adminService.getDataSource()),n.Db(14),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns),n.Db(2),n.Tc(" ",t.shippings.length," ",n.jc(27,12,"lang.shippings"),"")}}let qZ=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.functions=s,this.adminService=o,this.viewContainerRef=r,this.shippings=[],this.loading=!1,this.displayedColumns=["label","description","accountid","actions"],this.filterColumns=["label","description","accountid"]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.shippings")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,this.http.get("../rest/administration/shippings").subscribe(t=>{this.shippings=t.shippings,setTimeout(()=>{this.adminService.setDataSource("admin_shippings",this.shippings,this.sort,this.paginator,this.filterColumns)},0),this.loading=!1})}deleteShipping(t){confirm(this.translate.instant("lang.deleteMsg"))&&this.http.delete("../rest/administration/shippings/"+t).subscribe(t=>{this.shippings=t.shippings,this.adminService.setDataSource("admin_shippings",this.shippings,this.sort,this.paginator,this.filterColumns),this.notify.success(this.translate.instant("lang.shippingDeleted"))},t=>{this.notify.error(t.error.errors)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a),n.Qb(OL),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(WZ,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:15,vars:8,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["mat-subheader",""],["mat-list-item","","routerLink","/administration/shippings/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"row"],[1,"col-md-6","col-xs-6"],["matInput","",3,"formControl","placeholder"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSort","","matSortDisableClear","",3,"dataSource"],["table",""],["matColumnDef","label"],["mat-sort-header","",3,"hide-for-mobile",4,"matHeaderCellDef"],[3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","description"],["mat-sort-header","",4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","accountid"],["matColumnDef","actions"],[4,"matHeaderCellDef"],["style","justify-content: flex-end;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"routerLink","matTooltip",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["mat-sort-header",""],[2,"justify-content","flex-end"],["mat-icon-button","","color","warn",3,"matTooltip","click"],["aria-hidden","true",1,"fa","fa-trash-alt","fa-2x"],[2,"cursor","pointer",3,"routerLink","matTooltip"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,TZ,9,6,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,EZ,2,0,"div",9),n.Oc(14,XZ,28,14,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,R.h,R.g,R.d,o.f,S.a,R.c,W.l,V.c,K.a,Y.c,J.b,X.d,X.u,X.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,vt.h,Fe.b,vt.a,k.b,A.b,vt.j,vt.m,o.d],pipes:[g.d],encapsulation:2}),t})();const KZ=["snav2"],YZ=["maarchTree"];function JZ(t,e){1&t&&(n.Wb(0,"div",16),n.Rb(1,"mat-spinner",17),n.Vb())}function ZZ(t,e){1&t&&(n.Rb(0,"div",54),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.shippingUnavailable"),n.Ec)}function t1(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item",55),n.Wb(1,"mat-slide-toggle",56),n.dc("change",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).toggleShapingOption(i)})),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.Db(1),n.pc("name",t),n.oc("checked",i.shipping.options.shapingOptions.indexOf(t)>-1),n.Db(1),n.Rc(n.jc(3,3,"lang.maileva_"+t))}}function e1(t,e){1&t&&(n.Rb(0,"div",57),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.warnShapingOption"),n.Ec)}function i1(t,e){if(1&t&&(n.Wb(0,"mat-radio-button",58),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.pc("name",t),n.oc("value",t),n.Db(1),n.Sc(" ",n.jc(2,3,"lang.maileva_"+t)," ")}}const n1=function(t){return[t]};function a1(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",18),n.Oc(1,ZZ,2,3,"div",19),n.Wb(2,"form",20,21),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Wb(4,"div",22),n.Wb(5,"div",23),n.Wb(6,"mat-form-field"),n.Wb(7,"input",24),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().shipping.label=e})),n.ic(8,"translate"),n.ic(9,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(10,"div",22),n.Wb(11,"div",23),n.Wb(12,"mat-form-field"),n.Wb(13,"input",25),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().shipping.description=e})),n.ic(14,"translate"),n.ic(15,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(16,"div",26),n.Wb(17,"div",27),n.Wb(18,"div",28),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"mat-list",29),n.Oc(22,t1,4,5,"mat-list-item",30),n.Oc(23,e1,2,3,"div",31),n.Vb(),n.Vb(),n.Wb(24,"div",32),n.Wb(25,"div",28),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Wb(28,"mat-radio-group",33),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().shipping.options.sendMode=e})),n.Oc(29,i1,3,5,"mat-radio-button",34),n.Vb(),n.Vb(),n.Vb(),n.Wb(30,"div",26),n.Wb(31,"div",35),n.Wb(32,"div",28),n.Qc(33),n.ic(34,"translate"),n.Vb(),n.Wb(35,"div",36),n.Wb(36,"label",37),n.Qc(37),n.ic(38,"translate"),n.Vb(),n.Wb(39,"mat-form-field",38),n.Wb(40,"input",39),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().shipping.fee.firstPagePrice=e})),n.ic(41,"translate"),n.Vb(),n.Wb(42,"span",40),n.Qc(43,"\xa0\u20ac"),n.Vb(),n.Vb(),n.Vb(),n.Wb(44,"div",36),n.Wb(45,"label",41),n.Qc(46),n.ic(47,"translate"),n.Vb(),n.Wb(48,"mat-form-field",38),n.Wb(49,"input",42),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().shipping.fee.nextPagePrice=e})),n.ic(50,"translate"),n.Vb(),n.Wb(51,"span",40),n.Qc(52,"\xa0\u20ac"),n.Vb(),n.Vb(),n.Vb(),n.Wb(53,"div",36),n.Wb(54,"label",43),n.Qc(55),n.ic(56,"translate"),n.Vb(),n.Wb(57,"mat-form-field",38),n.Wb(58,"input",44),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().shipping.fee.postagePrice=e})),n.ic(59,"translate"),n.Vb(),n.Wb(60,"span",40),n.Qc(61,"\xa0\u20ac"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(62,"div",45),n.Wb(63,"div",28),n.Qc(64),n.ic(65,"translate"),n.Vb(),n.Wb(66,"div",46),n.Qc(67),n.ic(68,"translate"),n.Vb(),n.Wb(69,"div",23),n.Wb(70,"mat-form-field"),n.Wb(71,"input",47),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().shipping.account.id=e})),n.ic(72,"translate"),n.ic(73,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(74,"div",23),n.Wb(75,"mat-form-field"),n.Wb(76,"input",48),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().shipping.account.password=e})),n.ic(77,"translate"),n.ic(78,"translate"),n.Vb(),n.Wb(79,"mat-icon",49),n.dc("click",(function(){n.Dc(t);const e=n.hc();return e.hidePassword=!e.hidePassword})),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(80,"div",50),n.Wb(81,"div",51),n.Wb(82,"button",52),n.Qc(83),n.ic(84,"translate"),n.Vb(),n.Wb(85,"button",53),n.dc("click",(function(){return n.Dc(t),n.hc().cancelModification()})),n.Qc(86),n.ic(87,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(3),e=n.hc();n.Db(1),n.oc("ngIf",!e.shippingAvailable),n.Db(6),n.pc("title",n.jc(8,37,"lang.label")),n.pc("placeholder",n.jc(9,39,"lang.label")),n.oc("ngModel",e.shipping.label),n.Db(6),n.pc("title",n.jc(14,41,"lang.description")),n.pc("placeholder",n.jc(15,43,"lang.description")),n.oc("ngModel",e.shipping.description),n.Db(6),n.Sc(" ",n.jc(20,45,"lang.shapingOptions")," "),n.Db(3),n.oc("ngForOf",e.shapingOptions),n.Db(1),n.oc("ngIf",-1==e.shipping.options.shapingOptions.indexOf("addressPage")),n.Db(3),n.Sc(" ",n.jc(27,47,"lang.sendModes")," "),n.Db(2),n.oc("ngModel",e.shipping.options.sendMode),n.Db(1),n.oc("ngForOf",e.sendModes),n.Db(4),n.Sc(" ",n.jc(34,49,"lang.pricesInformations")," "),n.Db(4),n.Sc(" ",n.jc(38,51,"lang.maileva_firstPagePrice")," "),n.Db(3),n.pc("title",n.jc(41,53,"lang.maileva_firstPagePrice")),n.oc("ngModel",e.shipping.fee.firstPagePrice),n.Db(6),n.Sc(" ",n.jc(47,55,"lang.maileva_nextPagePrice")," "),n.Db(3),n.pc("title",n.jc(50,57,"lang.maileva_nextPagePrice")),n.oc("ngModel",e.shipping.fee.nextPagePrice),n.Db(6),n.Sc(" ",n.jc(56,59,"lang.maileva_postagePrice")," "),n.Db(3),n.pc("title",n.jc(59,61,"lang.maileva_postagePrice")),n.oc("ngModel",e.shipping.fee.postagePrice),n.Db(6),n.Sc(" ",n.jc(65,63,"lang.mailevaAccount")," "),n.Db(3),n.Rc(n.jc(68,65,"lang.infoMailevaAccount")),n.Db(4),n.pc("title",n.jc(72,67,"lang.login")),n.pc("placeholder",n.jc(73,69,"lang.id")),n.oc("ngModel",e.shipping.account.id),n.Db(5),n.oc("type",e.hidePassword?"password":"text")("ngModel",e.shipping.account.password)("placeholder",!1===e.creationMode?n.jc(77,71,"lang.passwordModification"):n.jc(78,73,"lang.password"))("required",e.creationMode),n.Db(3),n.oc("ngClass",n.vc(79,n1,e.hidePassword?"fa-eye-slash":"fa-eye")),n.Db(3),n.oc("disabled",e.checkModif()||!t.valid),n.Db(1),n.Rc(n.jc(84,75,"lang.validate")),n.Db(2),n.oc("disabled",e.checkModif()),n.Db(1),n.Rc(n.jc(87,77,"lang.cancel"))}}let s1=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.route=i,this.router=n,this.notify=a,this.headerService=s,this.appService=o,this.loading=!1,this.creationMode=!0,this.shipping={label:"",description:"",options:{shapingOptions:["addressPage"],sendMode:"fast"},fee:{firstPagePrice:0,nextPagePrice:0,postagePrice:0},account:{id:"",password:""},entities:[]},this.entities=[],this.entitiesClone=null,this.shippingClone=null,this.shapingOptions=["color","duplexPrinting","addressPage"],this.sendModes=["fast","economic"],this.hidePassword=!0,this.shippingAvailable=!1}ngOnInit(){this.http.get("../rest/externalConnectionsEnabled").pipe(Object(mt.a)(t=>{this.shippingAvailable=!0===t.connection.maileva}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe(),this.route.params.subscribe(t=>{void 0===t.id?(this.headerService.setHeader(this.translate.instant("lang.shippingCreation")),this.creationMode=!0,this.http.get("../rest/administration/shippings/new").subscribe(t=>{this.entities=t.entities.map(t=>Object.assign(Object.assign({},t),{id:parseInt(t.id)})),this.entitiesClone=JSON.parse(JSON.stringify(this.entities)),this.initEntitiesTree(this.entities),this.shippingClone=JSON.parse(JSON.stringify(this.shipping)),this.loading=!1},t=>{this.notify.handleErrors(t)}),this.loading=!1):(this.headerService.setHeader(this.translate.instant("lang.shippingModification")),this.creationMode=!1,this.http.get("../rest/administration/shippings/"+t.id).subscribe(t=>{this.shipping=t.shipping,this.entities=t.entities,this.entitiesClone=JSON.parse(JSON.stringify(this.entities)),this.initEntitiesTree(this.entities),this.shippingClone=JSON.parse(JSON.stringify(this.shipping)),this.loading=!1},t=>{this.notify.handleErrors(t)}))})}initEntitiesTree(t){this.maarchTree.initData(t)}updateSelectedEntities(){this.shipping.entities=this.maarchTree.getSelectedNodes().map(t=>t.id)}onSubmit(){this.creationMode?this.http.post("../rest/administration/shippings",this.shipping).subscribe(t=>{this.shippingClone=JSON.parse(JSON.stringify(this.shipping)),this.notify.success(this.translate.instant("lang.shippingAdded")),this.router.navigate(["/administration/shippings"])},t=>{this.notify.handleErrors(t)}):this.http.put("../rest/administration/shippings/"+this.shipping.id,this.shipping).subscribe(t=>{this.shippingClone=JSON.parse(JSON.stringify(this.shipping)),this.notify.success(this.translate.instant("lang.shippingUpdated")),this.router.navigate(["/administration/shippings"])},t=>{this.notify.handleErrors(t)})}checkModif(){return JSON.stringify(this.shippingClone)===JSON.stringify(this.shipping)}toggleShapingOption(t){const e=this.shipping.options.shapingOptions.indexOf(t);e>-1?this.shipping.options.shapingOptions.splice(e,1):this.shipping.options.shapingOptions.push(t)}cancelModification(){this.shipping=JSON.parse(JSON.stringify(this.shippingClone)),this.entities=JSON.parse(JSON.stringify(this.entitiesClone)),this.initEntitiesTree(this.entities)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(KZ,!0),n.Kc(YZ,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.maarchTree=i.first))},decls:22,vars:14,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["fixedTopGap","56","position","end",2,"overflow-x","hidden","width","400px",3,"mode","fixedInViewport","opened"],["snav2",""],["mat-subheader",""],[2,"padding","10px"],[3,"afterSelectNode","afterDeselectNode"],["maarchTree",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],["class","alert-message alert-message-danger","role","alert","style","max-width: 100%",3,"innerHTML",4,"ngIf"],[1,"form-horizontal",3,"ngSubmit"],["shippingForm","ngForm"],[1,"form-group"],[1,"col-sm-12"],["matInput","","required","","name","label","id","label","type","text","maxlength","64",3,"ngModel","title","placeholder","ngModelChange"],["matInput","","required","","name","description","id","description","type","text","maxlength","255",3,"ngModel","title","placeholder","ngModelChange"],[1,"form-group",2,"flex-direction","row","flex-wrap","wrap"],[1,"formType","ratio-2","col-sm-12"],[1,"formType-title"],["role","list"],["role","listitem",4,"ngFor","ngForOf"],["class","alert-message alert-message-danger","role","alert","style","margin-top: 30px;max-width: none;",3,"innerHTML",4,"ngIf"],[1,"formType","ratio-1","col-sm-12"],["name","sendMode",1,"radio-group",3,"ngModel","ngModelChange"],["color","primary",3,"name","value",4,"ngFor","ngForOf"],[1,"formType","ratio-2",2,"flex-direction","column"],[1,"priceContent"],["for","firstPagePrice",1,"priceContent-label"],["appearance","outline"],["matInput","","required","","name","firstPagePrice","id","firstPagePrice","type","number","maxlength","255","min","0","step","0.1","pattern","^(?=.+)(?:[1-9]\\d*|0)?(?:\\.\\d+)?$",3,"ngModel","title","ngModelChange"],["matSuffix",""],["for","nextPagePrice",1,"priceContent-label"],["matInput","","required","","name","nextPagePrice","id","nextPagePrice","type","number","maxlength","255","min","0","step","0.1","pattern","^(?=.+)(?:[1-9]\\d*|0)?(?:\\.\\d+)?$",3,"ngModel","title","ngModelChange"],["for","postagePrice",1,"priceContent-label"],["matInput","","required","","name","postagePrice","id","postagePrice","type","number","maxlength","255","min","0","step","0.1","pattern","^(?=.+)(?:[1-9]\\d*|0)?(?:\\.\\d+)?$",3,"ngModel","title","ngModelChange"],[1,"formType","ratio-1",2,"flex-direction","column","justify-content","center"],[1,"alert-message","alert-message-info",2,"max-width","none"],["matInput","","required","","name","login","id","login","type","text","maxlength","255",3,"ngModel","title","placeholder","ngModelChange"],["name","password","matInput","",3,"type","ngModel","placeholder","required","ngModelChange"],["color","primary","matSuffix","","maxlength","255",1,"fa","fa-2x",2,"cursor","pointer",3,"ngClass","click"],[1,"form-group",2,"flex-direction","row","align-items","center"],[1,"col-sm-12","text-center",2,"padding","10px"],["mat-raised-button","","type","submit","color","primary",3,"disabled"],["mat-raised-button","","type","button","color","default",3,"disabled","click"],["role","alert",1,"alert-message","alert-message-danger",2,"max-width","100%",3,"innerHTML"],["role","listitem"],["color","primary",3,"name","checked","change"],["role","alert",1,"alert-message","alert-message-danger",2,"margin-top","30px","max-width","none",3,"innerHTML"],["color","primary",3,"name","value"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,JZ,2,0,"div",8),n.Oc(12,a1,88,81,"mat-card",9),n.Vb(),n.Vb(),n.Vb(),n.Wb(13,"mat-sidenav",10,11),n.Wb(15,"mat-list"),n.Wb(16,"h3",12),n.Qc(17),n.ic(18,"translate"),n.Vb(),n.Wb(19,"div",13),n.Wb(20,"app-maarch-flat-tree",14,15),n.dc("afterSelectNode",(function(){return e.updateSelectedEntities()}))("afterDeselectNode",(function(){return e.updateSelectedEntities()})),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",!e.appService.getViewMode()),n.Db(4),n.Rc(n.jc(18,12,"lang.chooseEntityAssociationModel")))},directives:[I.e,I.f,Ot,We,P.t,I.d,R.a,R.g,cQ,V.c,K.a,X.K,X.v,X.w,Y.c,J.b,X.d,X.F,X.p,X.u,X.x,P.s,hc.b,X.A,X.B,Y.j,S.a,P.q,k.b,R.d,te.a,hc.a],pipes:[g.d],styles:[".radio-group[_ngcontent-%COMP%]{display:inline-flex;flex-direction:column}.radio-group[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{padding:10px}.form-group[_ngcontent-%COMP%], .formType[_ngcontent-%COMP%]{display:flex}.formType[_ngcontent-%COMP%]{align-items:center;margin:10px;border-radius:4px;border:1px solid #ccc;position:relative;padding:10px}.formType-title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:-7px;left:10px;padding:0;margin:0;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-slide-toggle-label{color:#666;font-weight:700}.formType[_ngcontent-%COMP%] .mat-radio-button, .formType[_ngcontent-%COMP%] .mat-slide-toggle{opacity:.5;color:#666;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.formType[_ngcontent-%COMP%] .mat-checked, .formType[_ngcontent-%COMP%] .mat-radio-checked{opacity:1;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-checked .mat-slide-toggle-label{color:#135f7f}.formType[_ngcontent-%COMP%] .mat-form-field-suffix{color:#f99830;font-size:15px;top:0}.ratio-1[_ngcontent-%COMP%], .ratio-2[_ngcontent-%COMP%]{flex:1}.priceContent[_ngcontent-%COMP%]{display:flex;align-items:first baseline;width:100%}.priceContent-label[_ngcontent-%COMP%]{text-align:right;color:#135f7f;flex:1;justify-content:flex-end;display:flex;padding-right:10px}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{width:90px!important}.priceContent[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.priceInfo[_ngcontent-%COMP%]{font-size:10px;font-weight:700;opacity:.5}label[_ngcontent-%COMP%]{cursor:pointer}"]}),t})();const o1=["snav2"];function r1(t,e){1&t&&(n.Wb(0,"div",14),n.Rb(1,"mat-spinner",15),n.Vb())}function c1(t,e){1&t&&(n.Rb(0,"div",19),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.noCustomFieldInfo"),n.Ec)}function l1(t,e){if(1&t&&(n.Wb(0,"mat-option",33),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.value),n.Db(1),n.Sc(" ",n.jc(2,2,"lang."+t.label)," ")}}function d1(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",34),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).switchSQLMode(e)})),n.Rb(1,"mat-icon",35),n.Vb()}}function h1(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",44),n.dc("click",(function(){n.Dc(t);const e=n.hc(3).$implicit;return n.hc(2).sortValues(e)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",45),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.orderValues"))}function u1(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field",46),n.Wb(1,"input",47),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.label=i})),n.ic(2,"translate"),n.Vb(),n.Wb(3,"button",48),n.dc("click",(function(){n.Dc(t);const i=e.index,a=n.hc(3).$implicit;return n.hc(2).removeValue(a,i)})),n.ic(4,"translate"),n.Rb(5,"mat-icon",49),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.oc("ngModel",t.label)("placeholder",n.jc(2,3,"lang.newValue")),n.Db(2),n.oc("title",n.jc(4,5,"lang.delete"))}}function p1(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-expansion-panel",38),n.Wb(1,"mat-expansion-panel-header"),n.Wb(2,"mat-panel-title",39),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb(),n.Wb(5,"div",40),n.Wb(6,"div",36),n.Wb(7,"button",41),n.dc("click",(function(){n.Dc(t);const e=n.hc(2).index;return n.hc(2).addValue(e)})),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Vb(),n.Wb(10,"div"),n.Oc(11,h1,3,3,"button",42),n.Vb(),n.Vb(),n.Wb(12,"div",21),n.Oc(13,u1,6,7,"mat-form-field",43),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2).$implicit;n.Db(2),n.oc("matBadge",t.values.length),n.Db(1),n.Sc(" ",n.jc(4,5,"lang.valuesList")," "),n.Db(5),n.Sc(" ",n.jc(9,7,"lang.addValue"),""),n.Db(3),n.oc("ngIf",t.values.length>0),n.Db(2),n.oc("ngForOf",t.values)}}function b1(t,e){if(1&t&&(n.Wb(0,"div",36),n.Oc(1,p1,14,9,"mat-expansion-panel",37),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.oc("ngIf",!t.SQLMode)}}function f1(t,e){if(1&t&&(n.Ub(0),n.Qc(1),n.ic(2,"translate"),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Sc(" (",n.jc(2,1,"lang."+t.key),") ")}}function m1(t,e){if(1&t&&(n.Wb(0,"mat-option",33),n.Qc(1),n.Oc(2,f1,3,3,"ng-container",54),n.ic(3,"translate"),n.Vb()),2&t){const t=e.$implicit,i=n.hc(5);n.oc("value",t.key),n.Db(1),n.Sc(" ",t.key," "),n.Db(1),n.oc("ngIf",!i.functionsService.empty(n.jc(3,3,"lang."+t.key)))}}function g1(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span"),n.Wb(1,"input",62),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.delimiterStart=i})),n.Vb(),n.Wb(2,"mat-chip",63),n.dc("removed",(function(){n.Dc(t);const i=e.index,a=n.hc(4).$implicit;return n.hc(2).removeColumnLabel(a.values.label,i)})),n.Qc(3),n.Rb(4,"mat-icon",64),n.Vb(),n.Wb(5,"input",62),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.delimiterEnd=i})),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.Lc("width",8*(t.delimiterStart.length+1),"px"),n.oc("ngModel",t.delimiterStart),n.Db(2),n.Sc(" ",t.column," "),n.Db(2),n.Lc("width",8*(t.delimiterEnd.length+1),"px"),n.oc("ngModel",t.delimiterEnd)}}function v1(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",65),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.hc(4).$implicit;return n.hc(2).addColumnLabel(a.values.label,i)})),n.Qc(1),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.Rc(t)}}function _1(t,e){if(1&t&&(n.Wb(0,"div",56),n.Wb(1,"mat-label",57),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Oc(4,g1,6,7,"span",18),n.Wb(5,"button",58),n.Rb(6,"i",59),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Wb(9,"mat-menu",null,60),n.Oc(11,v1,2,1,"button",61),n.Vb(),n.Vb()),2&t){const t=n.zc(10),e=n.hc(3).$implicit,i=n.hc(2);n.Db(2),n.Sc(" ",n.jc(3,5,"lang.targetLabel")," *"),n.Db(2),n.oc("ngForOf",e.values.label),n.Db(1),n.oc("matMenuTriggerFor",t),n.Db(2),n.Sc(" ",n.jc(8,7,"lang.addColumn")," "),n.Db(4),n.oc("ngForOf",i.availaibleTables[e.values.table])}}function y1(t,e){if(1&t&&(n.Wb(0,"mat-option",33),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}function x1(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"mat-label"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-select",52),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(3).$implicit.values.key=e})),n.Oc(5,y1,2,2,"mat-option",25),n.Vb(),n.Vb()}if(2&t){const t=n.hc(3).$implicit,e=n.hc(2);n.Db(2),n.Rc(n.jc(3,3,"lang.targetIdentifier")),n.Db(2),n.oc("ngModel",t.values.key),n.Db(1),n.oc("ngForOf",e.availaibleTables[t.values.table])}}const C1=function(){return["string","integer","date"]};function O1(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-expansion-panel",38),n.Wb(1,"mat-expansion-panel-header"),n.Wb(2,"mat-panel-title"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb(),n.Wb(5,"div",21),n.Wb(6,"div",51),n.Wb(7,"mat-form-field"),n.Wb(8,"mat-label"),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Wb(11,"mat-select",52),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).$implicit.values.table=e})),n.Oc(12,m1,4,5,"mat-option",25),n.ic(13,"keyvalue"),n.Vb(),n.Vb(),n.Oc(14,_1,12,9,"div",53),n.Oc(15,x1,6,5,"mat-form-field",54),n.Vb(),n.Wb(16,"mat-form-field"),n.Wb(17,"mat-label"),n.Qc(18),n.ic(19,"translate"),n.Vb(),n.Wb(20,"textarea",55),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).$implicit.values.clause=e})),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc(2).$implicit,e=n.hc(2);n.Db(3),n.Sc(" ",n.jc(4,8,"lang.database")," "),n.Db(6),n.Rc(n.jc(10,10,"lang.targetTable")),n.Db(2),n.oc("ngModel",t.values.table),n.Db(1),n.oc("ngForOf",n.jc(13,12,e.availaibleTables)),n.Db(2),n.oc("ngIf",-1===n.uc(16,C1).indexOf(t.type)&&t.values.table),n.Db(1),n.oc("ngIf",t.values.table),n.Db(3),n.Rc(n.jc(19,14,"lang.clause")),n.Db(2),n.oc("ngModel",t.values.clause)}}function D1(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",26),n.Wb(1,"div"),n.Wb(2,"button",34),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(2).switchSQLMode(e)})),n.Rb(3,"mat-icon",50),n.Vb(),n.Vb(),n.Wb(4,"div",36),n.Oc(5,O1,21,17,"mat-expansion-panel",37),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(5),n.oc("ngIf",t.SQLMode)}}const w1=function(){return["banAutocomplete","contact"]},M1=function(){return["select","radio","checkbox"]};function k1(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-expansion-panel"),n.Wb(1,"mat-expansion-panel-header"),n.Wb(2,"mat-panel-title",20),n.Qc(3),n.Vb(),n.Wb(4,"mat-panel-description"),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Vb(),n.Wb(7,"div",21),n.Wb(8,"mat-form-field"),n.Wb(9,"input",22),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.id=i})),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Wb(11,"mat-form-field"),n.Wb(12,"input",23),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.label=i})),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Wb(14,"mat-form-field"),n.Wb(15,"mat-label"),n.Qc(16),n.ic(17,"translate"),n.Vb(),n.Wb(18,"mat-select",24),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.mode=i})),n.ic(19,"translate"),n.Oc(20,l1,3,4,"mat-option",25),n.Vb(),n.Wb(21,"mat-hint"),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(24,"div",26),n.Wb(25,"div"),n.Oc(26,d1,2,0,"button",27),n.Vb(),n.Oc(27,b1,2,1,"div",28),n.Vb(),n.Oc(28,D1,6,1,"div",29),n.Wb(29,"div",30),n.Wb(30,"button",31),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=e.index;return n.hc(2).updateCustomField(i,a)})),n.Qc(31),n.ic(32,"translate"),n.Vb(),n.Wb(33,"button",32),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc(2).removeCustomField(i)})),n.Qc(34),n.ic(35,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=e.index,a=n.hc(2);n.Db(3),n.Sc(" ",t.label," "),n.Db(2),n.Sc(" ",n.jc(6,19,"lang."+t.type+"Input")," "),n.Db(4),n.oc("ngModel",t.id)("placeholder",n.jc(10,21,"lang.technicalId"))("value",t.id),n.Db(3),n.oc("ngModel",t.label)("placeholder",n.jc(13,23,"lang.label"))("value",t.label),n.Db(4),n.Rc(n.jc(17,25,"lang.displayMode")),n.Db(2),n.pc("title",n.jc(19,27,"lang.displayMode")),n.oc("ngModel",t.mode),n.Db(2),n.oc("ngForOf",a.mode),n.Db(2),n.Sc(" ",n.jc(23,29,"lang."+t.mode+"Description")," "),n.Db(4),n.oc("ngIf",!t.SQLMode&&-1===n.uc(35,w1).indexOf(t.type)),n.Db(1),n.oc("ngIf",n.uc(36,M1).indexOf(t.type)>-1),n.Db(1),n.oc("ngIf",t.SQLMode),n.Db(2),n.oc("disabled",a.isModified(t,i)||!a.isValidField(t)),n.Db(1),n.Rc(n.jc(32,31,"lang.update")),n.Db(3),n.Rc(n.jc(35,33,"lang.delete"))}}function S1(t,e){if(1&t&&(n.Wb(0,"mat-card",16),n.Wb(1,"mat-tab-group"),n.Wb(2,"mat-tab",12),n.ic(3,"translate"),n.Oc(4,c1,2,3,"div",17),n.Wb(5,"mat-accordion"),n.Oc(6,k1,36,37,"mat-expansion-panel",18),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.oc("label",n.jc(3,3,"lang.usableFields")),n.Db(2),n.oc("ngIf",0===t.customFields.length),n.Db(2),n.oc("ngForOf",t.customFields)}}function I1(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-form-field",71),n.Rb(2,"textarea",72),n.ic(3,"translate"),n.Vb(),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(2),n.oc("placeholder",n.jc(3,1,"lang."+t.type+"Input"))}}function P1(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-form-field",71),n.Rb(2,"input",73),n.ic(3,"translate"),n.Vb(),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(2),n.oc("placeholder",n.jc(3,1,"lang."+t.type+"Input"))}}function V1(t,e){if(1&t&&(n.Wb(0,"mat-option",33),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Tc(" ",n.jc(2,3,"lang.choice")," ",t," ")}}function R1(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-form-field",71),n.Wb(2,"mat-select",74),n.ic(3,"translate"),n.Oc(4,V1,3,5,"mat-option",25),n.Vb(),n.Vb(),n.Tb()),2&t){const t=n.hc().$implicit,e=n.hc();n.Db(2),n.oc("placeholder",n.jc(3,2,"lang."+t.type+"Input")),n.Db(2),n.oc("ngForOf",e.sampleIncrement)}}function j1(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"mat-form-field",71),n.Wb(2,"input",75),n.dc("click",(function(){return n.Dc(t),n.zc(6).open()})),n.ic(3,"translate"),n.Vb(),n.Rb(4,"mat-datepicker-toggle",76),n.Rb(5,"mat-datepicker",null,77),n.Vb(),n.Tb()}if(2&t){const t=n.zc(6),e=n.hc().$implicit;n.Db(2),n.oc("matDatepicker",t)("placeholder",n.jc(3,3,"lang."+e.type+"Input")),n.Db(2),n.oc("for",t)}}function A1(t,e){if(1&t&&(n.Wb(0,"mat-radio-button",33),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Tc(" ",n.jc(2,3,"lang.choice")," ",t," ")}}function W1(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-radio-group",78),n.Oc(2,A1,3,5,"mat-radio-button",25),n.Vb(),n.Tb()),2&t){const t=n.hc(2);n.Db(2),n.oc("ngForOf",t.sampleIncrement)}}function T1(t,e){if(1&t&&(n.Wb(0,"mat-list-option",84),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Tc(" ",n.jc(2,3,"lang.choice")," ",t," ")}}function E1(t,e){1&t&&(n.Wb(0,"mat-chip"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.selectedValue")," "))}function F1(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div",79),n.Wb(2,"mat-selection-list",80,81),n.Oc(4,T1,3,5,"mat-list-option",82),n.Vb(),n.Vb(),n.Wb(5,"mat-chip-list",83),n.Oc(6,E1,3,3,"mat-chip",18),n.Vb(),n.Tb()),2&t){const t=n.zc(3),e=n.hc(2);n.Db(4),n.oc("ngForOf",e.sampleIncrement),n.Db(2),n.oc("ngForOf",t.selectedOptions.selected)}}const L1=function(){return["string","banAutocomplete","contact"]};function Q1(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",66),n.Wb(1,"div",67),n.Wb(2,"button",68),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().addCustomField(i)})),n.ic(3,"translate"),n.Rb(4,"mat-icon",69),n.Vb(),n.Vb(),n.Wb(5,"div",36),n.Wb(6,"div",70),n.Qc(7),n.Vb(),n.Oc(8,I1,4,3,"ng-container",54),n.Oc(9,P1,4,3,"ng-container",54),n.Oc(10,R1,5,4,"ng-container",54),n.Oc(11,j1,7,5,"ng-container",54),n.Oc(12,W1,3,1,"ng-container",54),n.Oc(13,F1,7,2,"ng-container",54),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(2),n.oc("title",n.jc(3,8,"lang.add")),n.Db(5),n.Sc("",t.label," :"),n.Db(1),n.oc("ngIf",n.uc(10,L1).indexOf(t.type)>-1),n.Db(1),n.oc("ngIf","integer"===t.type),n.Db(1),n.oc("ngIf","select"===t.type),n.Db(1),n.oc("ngIf","date"===t.type),n.Db(1),n.oc("ngIf","radio"===t.type),n.Db(1),n.oc("ngIf","checkbox"===t.type)}}let N1=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.dialog=n,this.headerService=a,this.appService=s,this.sortPipe=o,this.functionsService=r,this.loading=!0,this.idTable=[],this.customFieldsTypes=[{label:this.translate.instant("lang.stringInput"),type:"string"},{label:this.translate.instant("lang.integerInput"),type:"integer"},{label:this.translate.instant("lang.selectInput"),type:"select"},{label:this.translate.instant("lang.dateInput"),type:"date"},{label:this.translate.instant("lang.radioInput"),type:"radio"},{label:this.translate.instant("lang.checkboxInput"),type:"checkbox"},{label:this.translate.instant("lang.banAutocompleteInput"),type:"banAutocomplete"},{label:this.translate.instant("lang.contactInput"),type:"contact"}],this.customFields=[],this.customFieldsClone=[],this.mode=[{label:"displayInForm",value:"form"},{label:"displayAsTechnicalData",value:"technical"}],this.incrementCreation=1,this.sampleIncrement=[1,2,3,4],this.SQLMode=!1,this.availaibleTables={}}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.customFieldsAdmin")),this.getTables(),this.http.get("../rest/customFields?admin=true").pipe(Object(l.a)(t=>(t.customFields.forEach(t=>{this.functionsService.empty(t.values.key)?(t.SQLMode=!1,t.values=Object.values(t.values).map(t=>({label:t}))):t.SQLMode=!0;const e=t.label;if(e.includes(this.translate.instant("lang.newField"))){let t=e.substr(this.translate.instant("lang.newField").length+1);isNaN(Number(t))||(this.idTable.push(t),this.incrementCreation=Math.max(...this.idTable)+1)}}),t)),Object(mt.a)(t=>{this.customFields=t.customFields,this.customFieldsClone=JSON.parse(JSON.stringify(this.customFields))}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}addCustomField(t){let e={};this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.add"),msg:this.translate.instant("lang.confirmAction")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{e={label:this.translate.instant("lang.newField")+" "+this.incrementCreation,type:t.type,values:[],mode:"form"}}),p(t=>this.http.post("../rest/customFields",e)),Object(mt.a)(t=>{e.id=t.customFieldId,this.customFields.push(e),this.notify.success(this.translate.instant("lang.customFieldAdded")),this.incrementCreation++}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}addValue(t){this.customFields[t].values.push({label:""})}removeValue(t,e){t.values.splice(e,1)}removeCustomField(t){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete")+' "'+this.customFields[t].label+'"',msg:this.translate.instant("lang.confirmAction")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete("../rest/customFields/"+this.customFields[t].id)),Object(mt.a)(()=>{this.customFields.splice(t,1),this.notify.success(this.translate.instant("lang.customFieldDeleted"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}updateCustomField(t,e){const i=Object.assign({},t);if(t.SQLMode)["string","integer","date"].indexOf(t.type)>-1&&(t.values.label=[{column:t.values.key,delimiterEnd:"",delimiterStart:""}]);else if(t.values=t.values.filter((t,e,i)=>i.map(t=>t.label).indexOf(t.label)===e),i.values=t.values.map(t=>t.label),this.customFields.filter(t=>t.label===i.label).length>1)return this.notify.handleErrors(this.translate.instant("lang.customFieldAlreadyExists")),Object(c.a)(!1);this.http.put("../rest/customFields/"+t.id,i).pipe(Object(mt.a)(()=>{this.customFieldsClone[e]=JSON.parse(JSON.stringify(t)),this.notify.success(this.translate.instant("lang.customFieldUpdated"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}sortValues(t){t.values=this.sortPipe.transform(t.values,"label")}isModified(t,e){return!(JSON.stringify(t)!==JSON.stringify(this.customFieldsClone[e])&&""!==t.label&&!this.SQLMode&&""!==t.mode)}switchSQLMode(t){t.SQLMode=!t.SQLMode,t.values=t.SQLMode?{key:"id",label:[{column:"id",delimiterEnd:"",delimiterStart:""}],table:"users",clause:"1=1"}:[]}getTables(){this.http.get("../rest/customFieldsWhiteList").pipe(Object(mt.a)(t=>{t.allowedTables.forEach(t=>{this.availaibleTables[t.name]=t.columns})}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}addColumnLabel(t,e){t.push({delimiterStart:"",delimiterEnd:"",column:e})}removeColumnLabel(t,e){t.splice(e,1)}isValidField(t){return!t.SQLMode||!(this.functionsService.empty(t.values.key)||this.functionsService.empty(t.values.label)||this.functionsService.empty(t.values.table)||this.functionsService.empty(t.values.clause))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(y.a),n.Qb(w.a),n.Qb(Wt.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(o1,!0),2&t&&n.yc(i=n.ec())&&(e.sidenavRight=i.first)},features:[n.Cb([Wt.a])],decls:19,vars:14,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["fixedTopGap","56","position","end","opened","",1,"col-md-4","col-sm-12","customFielsdPanel",3,"mode","fixedInViewport"],["snav2",""],[3,"label"],["class","customFieldsTypesItem",4,"ngFor","ngForOf"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],["class","alert-message alert-message-info","role","alert",3,"innerHTML",4,"ngIf"],[4,"ngFor","ngForOf"],["role","alert",1,"alert-message","alert-message-info",3,"innerHTML"],["color","primary"],[1,"col-md-12"],["matInput","","name","id","disabled","",3,"ngModel","placeholder","value","ngModelChange"],["matInput","","name","label",3,"ngModel","placeholder","value","ngModelChange"],["name","mode",3,"title","ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"col-md-12",2,"display","flex","align-items","center"],["mat-mini-fab","","color","primary",3,"click",4,"ngIf"],["style","flex:1;",4,"ngIf"],["class","col-md-12","style","display: flex;align-items: center;",4,"ngIf"],[1,"col-md-12","text-center"],["mat-raised-button","","color","primary",3,"disabled","click"],["mat-raised-button","","color","warn",3,"click"],[3,"value"],["mat-mini-fab","","color","primary",3,"click"],[1,"fas","fa-database",2,"height","auto"],[2,"flex","1"],["class","customFieldValues","opened","",4,"ngIf"],["opened","",1,"customFieldValues"],["matBadgeSize","small",3,"matBadge"],[1,"actionValuesCustom"],["mat-raised-button","","color","primary",3,"click"],["mat-mini-fab","","color","default",3,"title","click",4,"ngIf"],["floatLabel","never",4,"ngFor","ngForOf"],["mat-mini-fab","","color","default",3,"title","click"],["color","primary",1,"fas","fa-sort-alpha-down",2,"height","auto"],["floatLabel","never"],["matInput","",3,"ngModel","placeholder","ngModelChange"],["color","warn","mat-icon-button","","matSuffix","",3,"title","click"],[1,"fa","fa-trash"],[1,"fas","fa-list-ol",2,"height","auto"],[2,"display","flex","flex-direction","column"],["required","",3,"ngModel","ngModelChange"],["style","width:100%;padding-bottom: 20px;",4,"ngIf"],[4,"ngIf"],["matInput","","placeholder","Ex. status='OK'","required","",3,"ngModel","ngModelChange"],[2,"width","100%","padding-bottom","20px"],[2,"font-size","75%","color","rgba(0,0,0,0.54)","width","100%","display","block"],["mat-button","","color","primary",3,"matMenuTriggerFor"],[1,"fa","fa-plus-circle"],["menu","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],[2,"min-width","8px",3,"ngModel","ngModelChange"],[3,"removed"],["matChipRemove","",1,"fa","fa-times-circle"],["mat-menu-item","",3,"click"],[1,"customFieldsTypesItem"],[1,"addCustomFieldTypeContainer"],["mat-icon-button","","color","primary",3,"title","click"],[1,"fas","fa-plus-circle","fa-2x"],[2,"color","rgba(0,0,0,0.54)"],["floatLabel","never",1,"input-form"],["matInput","","matTextareaAutosize","","matAutosizeMinRows","1","cdkAutosizeMaxRows","6","disabled","",3,"placeholder"],["type","number","matInput","","disabled","",3,"placeholder"],["disabled","",3,"placeholder"],["matInput","","disabled","",3,"matDatepicker","placeholder","click"],["matSuffix","",3,"for"],["picker",""],["color","primary","disabled","",1,"radio-form"],[1,"input-form","checkbox-form"],["disabled","",1,"div-list"],["sampleList",""],["checkboxPosition","before",3,"value",4,"ngFor","ngForOf"],[1,"checkbox-selected-list"],["checkboxPosition","before",3,"value"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,r1,2,0,"div",8),n.Oc(12,S1,7,5,"mat-card",9),n.Vb(),n.Vb(),n.Vb(),n.Wb(13,"mat-sidenav",10,11),n.Wb(15,"mat-tab-group"),n.Wb(16,"mat-tab",12),n.ic(17,"translate"),n.Oc(18,Q1,14,11,"div",13),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode()),n.Db(3),n.oc("label",n.jc(17,12,"lang.customFieldsTypesAvailable")),n.Db(2),n.oc("ngForOf",e.customFieldsTypes))},directives:[I.e,I.f,Ot,We,P.t,I.d,Te.c,Te.a,P.s,V.c,K.a,gt.a,gt.c,gt.g,gt.h,gt.f,Y.c,J.b,X.d,X.u,X.x,Y.g,ee.a,Y.f,k.b,W.p,S.a,wt.a,Y.j,X.F,ne.d,ne.e,ze.a,ze.e,ne.b,J.d,ae.h,ae.j,ae.f,hc.b,hc.a,R.i,ze.d,R.f],pipes:[g.d,P.l],styles:[".mat-divider[_ngcontent-%COMP%]{padding-top:10px;padding-bottom:10px}.customFielsdPanel[_ngcontent-%COMP%], .customFielsdPanel[_ngcontent-%COMP%] .mat-tab-body-wrapper{padding-left:0}.mat-expansion-panel-header-description[_ngcontent-%COMP%]{flex-direction:row-reverse}.customFieldValues[_ngcontent-%COMP%]{box-shadow:none;border:1px solid rgba(0,0,0,.12)}.mat-expansion-panel[_ngcontent-%COMP%]{margin:5px}.mat-accordion[_ngcontent-%COMP%]{padding:5px}.mat-tab-body-content[_ngcontent-%COMP%], .mat-tab-body-wrapper[_ngcontent-%COMP%], .mat-tab-group[_ngcontent-%COMP%]{height:100%}.actionsCustomFields[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.actionValuesCustom[_ngcontent-%COMP%]{display:flex}.alert-message-info[_ngcontent-%COMP%]{margin-top:30px;max-width:100%}.addCustomFieldTypeContainer[_ngcontent-%COMP%]{justify-content:center;display:flex;align-items:center;width:60px}.customFieldsTypesItem[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.mat-badge-content[_ngcontent-%COMP%]{top:2px!important}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();function z1(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-form-field",13),n.Rb(2,"textarea",14),n.ic(3,"translate"),n.Vb(),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(2),n.oc("placeholder",n.jc(3,1,"lang."+t.type+"Input"))}}function B1(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-form-field",13),n.Rb(2,"input",15),n.ic(3,"translate"),n.Vb(),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(2),n.oc("placeholder",n.jc(3,1,"lang."+t.type+"Input"))}}function U1(t,e){if(1&t&&(n.Wb(0,"mat-option",18),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}function $1(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-form-field",13),n.Wb(2,"mat-select",16),n.ic(3,"translate"),n.Oc(4,U1,2,2,"mat-option",17),n.Vb(),n.Vb(),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(2),n.oc("placeholder",n.jc(3,2,"lang."+t.type+"Input")),n.Db(2),n.oc("ngForOf",t.values)}}function H1(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"mat-form-field",13),n.Wb(2,"input",19),n.dc("click",(function(){return n.Dc(t),n.zc(6).open()})),n.ic(3,"translate"),n.Vb(),n.Rb(4,"mat-datepicker-toggle",20),n.Rb(5,"mat-datepicker",null,21),n.Vb(),n.Tb()}if(2&t){const t=n.zc(6),e=n.hc().$implicit;n.Db(2),n.oc("matDatepicker",t)("placeholder",n.jc(3,3,"lang."+e.type+"Input")),n.Db(2),n.oc("for",t)}}function G1(t,e){if(1&t&&(n.Wb(0,"mat-radio-button",18),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function X1(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-radio-group",22),n.Oc(2,G1,2,2,"mat-radio-button",17),n.Vb(),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(2),n.oc("ngForOf",t.values)}}function q1(t,e){if(1&t&&(n.Wb(0,"mat-list-option",29),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function K1(t,e){1&t&&(n.Wb(0,"mat-chip",30),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.selectedValue")," "))}function Y1(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div",23),n.Wb(2,"mat-selection-list",24,25),n.Oc(4,q1,2,2,"mat-list-option",26),n.Vb(),n.Vb(),n.Wb(5,"mat-chip-list",27),n.Oc(6,K1,3,3,"mat-chip",28),n.Vb(),n.Tb()),2&t){const t=n.zc(3),e=n.hc().$implicit;n.Db(4),n.oc("ngForOf",e.values),n.Db(2),n.oc("ngForOf",t.selectedOptions.selected)}}const J1=function(){return["string","autocomplete","banAutocomplete","contact"]};function Z1(t,e){if(1&t&&(n.Wb(0,"div",4),n.Wb(1,"div",5),n.Rb(2,"i",6),n.Vb(),n.Wb(3,"div",7),n.Wb(4,"div",8),n.Qc(5),n.Vb(),n.Wb(6,"div",9),n.Oc(7,z1,4,3,"ng-container",10),n.Oc(8,B1,4,3,"ng-container",10),n.Oc(9,$1,5,4,"ng-container",10),n.Oc(10,H1,7,5,"ng-container",10),n.Oc(11,X1,3,1,"ng-container",10),n.Oc(12,Y1,7,2,"ng-container",10),n.Vb(),n.Wb(13,"div",11),n.Rb(14,"i",12),n.Vb(),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.oc("cdkDragData",t),n.Db(4),n.oc("id",t.identifier),n.Db(1),n.Sc(" ",t.label," "),n.Db(1),n.Ib("advancedInput","checkbox"===t.type),n.Db(1),n.oc("ngIf",n.uc(13,J1).indexOf(t.type)>-1),n.Db(1),n.oc("ngIf","integer"===t.type),n.Db(1),n.oc("ngIf","select"===t.type),n.Db(1),n.oc("ngIf","date"===t.type),n.Db(1),n.oc("ngIf","radio"===t.type),n.Db(1),n.oc("ngIf","checkbox"===t.type),n.Db(2),n.Ib("noMandatory",!t.mandatory)}}const t0=function(){return["indexingModelsCustomFieldsList_mail","indexingModelsCustomFieldsList_contact","indexingModelsCustomFieldsList_process","indexingModelsCustomFieldsList_classifying"]};function e0(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",2),n.dc("cdkDropListDropped",(function(e){return n.Dc(t),n.hc().drop(e)})),n.Oc(1,Z1,15,14,"div",3),n.ic(2,"sortBy"),n.Vb()}if(2&t){const t=n.hc();n.oc("cdkDropListConnectedTo",n.uc(6,t0))("cdkDropListData",t.dataCustomFields),n.Db(1),n.oc("ngForOf",n.kc(2,3,t.dataCustomFields,"label"))}}function i0(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-form-field",13),n.Rb(2,"textarea",14),n.ic(3,"translate"),n.Vb(),n.Tb()),2&t){const t=n.hc(2).$implicit;n.Db(2),n.oc("placeholder",n.jc(3,1,"lang."+t.type+"Input"))}}function n0(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-form-field",13),n.Rb(2,"input",15),n.ic(3,"translate"),n.Vb(),n.Tb()),2&t){const t=n.hc(2).$implicit;n.Db(2),n.oc("placeholder",n.jc(3,1,"lang."+t.type+"Input"))}}function a0(t,e){if(1&t&&(n.Wb(0,"mat-option",18),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}function s0(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-form-field",13),n.Wb(2,"mat-select",16),n.ic(3,"translate"),n.Oc(4,a0,2,2,"mat-option",17),n.Vb(),n.Vb(),n.Tb()),2&t){const t=n.hc(2).$implicit;n.Db(2),n.oc("placeholder",n.jc(3,2,"lang."+t.type+"Input")),n.Db(2),n.oc("ngForOf",t.values)}}function o0(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"mat-form-field",13),n.Wb(2,"input",19),n.dc("click",(function(){return n.Dc(t),n.zc(6).open()})),n.ic(3,"translate"),n.Vb(),n.Rb(4,"mat-datepicker-toggle",20),n.Rb(5,"mat-datepicker",null,21),n.Vb(),n.Tb()}if(2&t){const t=n.zc(6),e=n.hc(2).$implicit;n.Db(2),n.oc("matDatepicker",t)("placeholder",n.jc(3,3,"lang."+e.type+"Input")),n.Db(2),n.oc("for",t)}}function r0(t,e){if(1&t&&(n.Wb(0,"mat-radio-button",18),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function c0(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-radio-group",22),n.Oc(2,r0,2,2,"mat-radio-button",17),n.Vb(),n.Tb()),2&t){const t=n.hc(2).$implicit;n.Db(2),n.oc("ngForOf",t.values)}}function l0(t,e){if(1&t&&(n.Wb(0,"mat-list-option",29),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function d0(t,e){1&t&&(n.Wb(0,"mat-chip",30),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.selectedValue")," "))}function h0(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div",23),n.Wb(2,"mat-selection-list",24,38),n.Oc(4,l0,2,2,"mat-list-option",26),n.Vb(),n.Vb(),n.Wb(5,"mat-chip-list",27),n.Oc(6,d0,3,3,"mat-chip",28),n.Vb(),n.Tb()),2&t){const t=n.zc(3),e=n.hc(2).$implicit;n.Db(4),n.oc("ngForOf",e.values),n.Db(2),n.oc("ngForOf",t.selectedOptions.selected)}}function u0(t,e){if(1&t&&(n.Wb(0,"div",35),n.Wb(1,"div",36),n.Rb(2,"i",37),n.Vb(),n.Wb(3,"div",7),n.Wb(4,"div",8),n.Qc(5),n.Vb(),n.Wb(6,"div",9),n.Oc(7,i0,4,3,"ng-container",10),n.Oc(8,n0,4,3,"ng-container",10),n.Oc(9,s0,5,4,"ng-container",10),n.Oc(10,o0,7,5,"ng-container",10),n.Oc(11,c0,3,1,"ng-container",10),n.Oc(12,h0,7,2,"ng-container",10),n.Vb(),n.Wb(13,"div",11),n.Rb(14,"i",12),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(4),n.oc("id",t.identifier),n.Db(1),n.Sc(" ",t.label," "),n.Db(2),n.oc("ngIf","string"===t.type||"autocomplete"===t.type),n.Db(1),n.oc("ngIf","integer"===t.type),n.Db(1),n.oc("ngIf","select"===t.type),n.Db(1),n.oc("ngIf","date"===t.type),n.Db(1),n.oc("ngIf","radio"===t.type),n.Db(1),n.oc("ngIf","checkbox"===t.type),n.Db(2),n.Ib("noMandatory",!t.mandatory)}}function p0(t,e){if(1&t&&(n.Wb(0,"div",33),n.Oc(1,u0,15,10,"div",34),n.Vb()),2&t){const t=e.$implicit;n.oc("cdkDragData",t),n.Db(1),n.oc("ngIf",-1===t.identifier.indexOf("registeredMail_"))}}function b0(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",31),n.dc("cdkDropListDropped",(function(e){return n.Dc(t),n.hc().drop(e)})),n.Oc(1,p0,2,2,"div",32),n.ic(2,"sortBy"),n.Vb()}if(2&t){const t=n.hc();n.oc("cdkDropListConnectedTo",n.uc(6,t0))("cdkDropListData",t.dataFields),n.Db(1),n.oc("ngForOf",n.kc(2,3,t.dataFields,"label"))}}let f0=(()=>{class t{constructor(t,e,i,n){this.translate=t,this.http=e,this.dialog=i,this.appService=n,this.loading=!1}ngOnInit(){}drop(t){t.item.data.unit=t.container.id.split("_")[1],t.previousContainer===t.container?Object(lo.h)(t.container.data,t.previousIndex,t.currentIndex):Object(lo.i)(t.previousContainer.data,t.container.data,t.previousIndex,t.currentIndex)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.b),n.Qb(w.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-field-list"]],inputs:{dataCustomFields:"dataCustomFields",dataFields:"dataFields"},features:[n.Cb([Wt.a])],decls:2,vars:2,consts:[["class","content","cdkDropList","","id","customFieldsList",3,"cdkDropListConnectedTo","cdkDropListData","cdkDropListDropped",4,"ngIf"],["class","content","cdkDropList","","id","fieldsList",3,"cdkDropListConnectedTo","cdkDropListData","cdkDropListDropped",4,"ngIf"],["cdkDropList","","id","customFieldsList",1,"content",3,"cdkDropListConnectedTo","cdkDropListData","cdkDropListDropped"],["class","customFieldRow","cdkDrag","",3,"cdkDragData",4,"ngFor","ngForOf"],["cdkDrag","",1,"customFieldRow",3,"cdkDragData"],[1,"customFieldDrag"],["color","primary","cdkDragHandle","",1,"fas","fa-arrows-alt","fa-2x"],[2,"flex","1","display","flex"],[1,"fieldLabel",3,"id"],[1,"fieldInput"],[4,"ngIf"],[1,"fieldState"],[1,"fas","fa-asterisk"],["floatLabel","never",1,"input-form"],["matInput","","matTextareaAutosize","","matAutosizeMinRows","1","cdkAutosizeMaxRows","6","disabled","",3,"placeholder"],["type","number","matInput","","disabled","",3,"placeholder"],["disabled","",3,"placeholder"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["matInput","","disabled","",3,"matDatepicker","placeholder","click"],["matSuffix","",3,"for"],["picker",""],["color","primary","disabled","",1,"radio-form"],[1,"input-form","checkbox-form"],["disabled","",1,"div-list"],["checkboxCustomElement",""],["checkboxPosition","before",3,"value",4,"ngFor","ngForOf"],[1,"checkbox-selected-list"],["selected","",4,"ngFor","ngForOf"],["checkboxPosition","before",3,"value"],["selected",""],["cdkDropList","","id","fieldsList",1,"content",3,"cdkDropListConnectedTo","cdkDropListData","cdkDropListDropped"],["cdkDrag","",3,"cdkDragData",4,"ngFor","ngForOf"],["cdkDrag","",3,"cdkDragData"],["class","customFieldRow",4,"ngIf"],[1,"customFieldRow"],["cdkDragHandle","",1,"customFieldDrag"],["color","primary",1,"fas","fa-arrows-alt","fa-2x"],["checkboxElement",""]],template:function(t,e){1&t&&(n.Oc(0,e0,3,7,"div",0),n.Oc(1,b0,3,7,"div",1)),2&t&&(n.oc("ngIf",void 0!==e.dataCustomFields),n.Db(1),n.oc("ngIf",void 0!==e.dataFields))},directives:[P.t,lo.e,P.s,lo.a,lo.b,Y.c,J.b,J.d,ee.a,W.p,ae.h,ae.j,Y.j,ae.f,hc.b,hc.a,R.i,ze.d,R.f,ze.a],pipes:[Wt.a,g.d],styles:["div[id^=registeredMail_][_ngcontent-%COMP%]{color:orange}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();const m0=["snav2"],g0=["indexingForm"];function v0(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Vb())}function _0(t,e){if(1&t&&(n.Wb(0,"mat-option",30),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(1),n.Sc(" ",t.label," ")}}function y0(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",17),n.Wb(1,"div",18),n.Wb(2,"mat-form-field"),n.Wb(3,"mat-label"),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Wb(6,"mat-select",19),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().indexingModel.category=e}))("selectionChange",(function(e){return n.Dc(t),n.hc().changeCategory(e)})),n.ic(7,"translate"),n.Oc(8,_0,2,2,"mat-option",20),n.Vb(),n.Vb(),n.Vb(),n.Wb(9,"div",18),n.Wb(10,"div",21),n.Wb(11,"mat-form-field",22),n.Wb(12,"mat-label"),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Wb(15,"input",23),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().indexingModel.label=e})),n.Vb(),n.Vb(),n.Vb(),n.Wb(16,"div",24),n.Wb(17,"mat-slide-toggle",25),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().indexingModel.default=e})),n.Qc(18),n.ic(19,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(20,"mat-tab-group"),n.Wb(21,"mat-tab",12),n.ic(22,"translate"),n.Rb(23,"app-indexing-form",26,27),n.Wb(25,"div",28),n.Wb(26,"button",29),n.dc("click",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Qc(27),n.ic(28,"translate"),n.ic(29,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(24),e=n.hc();n.Db(4),n.Rc(n.jc(5,13,"lang.category_id")),n.Db(2),n.oc("ngModel",e.indexingModel.category)("placeholder",n.jc(7,15,"lang.category_id")),n.Db(2),n.oc("ngForOf",e.categoriesList),n.Db(5),n.Rc(n.jc(14,17,"lang.modelName")),n.Db(2),n.oc("ngModel",e.indexingModel.label),n.Db(2),n.oc("ngModel",e.indexingModel.default),n.Db(1),n.Sc(" ",n.jc(19,19,"lang.defaultModel")," "),n.Db(3),n.oc("label",n.jc(22,21,"lang.indexingForm")),n.Db(2),n.oc("indexingFormId",e.indexingModel.id)("admin",!0),n.Db(3),n.oc("disabled",!t.isModified()&&!e.isModified()||""===e.indexingModel.label),n.Db(1),n.Rc(e.creationMode?n.jc(28,23,"lang.save"):n.jc(29,25,"lang.update"))}}function x0(t,e){if(1&t&&n.Rb(0,"app-field-list",31),2&t){const t=n.hc();n.oc("dataFields",t.indexingForm.getAvailableFields())}}function C0(t,e){if(1&t&&n.Rb(0,"app-field-list",32),2&t){const t=n.hc();n.oc("dataCustomFields",t.indexingForm.getAvailableCustomFields())}}let O0=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.route=i,this.router=n,this.notify=a,this.dialog=s,this.headerService=o,this.appService=r,this.loading=!0,this.indexingModel={id:0,label:"",category:"incoming",default:!1,owner:0,private:!1},this.indexingModelsCustomFields=[],this.creationMode=!0}ngOnInit(){this.route.params.subscribe(t=>{void 0===t.id?(this.creationMode=!0,this.headerService.setHeader(this.translate.instant("lang.indexingModelCreation")),this.http.get("../rest/categories").pipe(Object(mt.a)(t=>{this.categoriesList=t.categories}),Object(mt.a)(t=>{this.loading=!1,setTimeout(()=>{this.indexingForm.changeCategory(this.indexingModel.category)},0)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe(),this.indexingModelClone=JSON.parse(JSON.stringify(this.indexingModel))):(this.creationMode=!1,this.http.get("../rest/indexingModels/"+t.id).pipe(Object(mt.a)(t=>{this.indexingModel=t.indexingModel,this.headerService.setHeader(this.translate.instant("lang.indexingModelModification"),this.indexingModel.label),this.indexingModelClone=JSON.parse(JSON.stringify(this.indexingModel))}),p(()=>this.http.get("../rest/categories")),Object(mt.a)(t=>{this.categoriesList=t.categories}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe())})}onSubmit(){const t=this.indexingForm.getDatas();t.forEach((e,i)=>{t[i].default_value=["string","integer","date"].indexOf(t[i].type)>-1&&t[i].SQLMode?null:t[i].default_value,delete t[i].event,delete t[i].label,delete t[i].system,delete t[i].type,delete t[i].values}),this.indexingModel.fields=t,this.creationMode?this.http.post("../rest/indexingModels",this.indexingModel).pipe(Object(mt.a)(t=>{this.indexingForm.setModification(),this.setModification(),this.router.navigate(["/administration/indexingModels"]),this.notify.success(this.translate.instant("lang.indexingModelAdded"))}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe():this.http.put("../rest/indexingModels/"+this.indexingModel.id,this.indexingModel).pipe(Object(mt.a)(t=>{this.indexingForm.setModification(),this.setModification(),this.router.navigate(["/administration/indexingModels"]),this.notify.success(this.translate.instant("lang.indexingModelUpdated"))}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}isModified(){let t="",e="";return t=JSON.stringify(this.indexingModel),e=JSON.stringify(this.indexingModelClone),t!==e}setModification(){this.indexingModelClone=JSON.parse(JSON.stringify(this.indexingModel))}changeCategory(t){this.indexingForm.changeCategory(t.value)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(q.b),n.Qb(y.a),n.Qb(w.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(m0,!0),n.Xc(g0,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.indexingForm=i.first))},features:[n.Cb([w.a,Wt.a])],decls:22,vars:18,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["fixedTopGap","56","position","end","opened","",1,"col-md-4","col-sm-12",3,"mode","fixedInViewport"],["snav2",""],[3,"label"],[3,"dataFields",4,"ngIf"],[3,"dataCustomFields",4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[2,"display","flex"],["name","category","required","",3,"ngModel","placeholder","ngModelChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[2,"flex","1"],["appearance","outline",1,"indexingModelLabel"],["matInput","","name","label",3,"ngModel","ngModelChange"],[1,"defaultModel"],["color","primary","name","default",3,"ngModel","ngModelChange"],[3,"indexingFormId","admin"],["indexingForm",""],[1,"col-md-12","text-center"],["mat-raised-button","","color","primary",3,"disabled","click"],[3,"value"],[3,"dataFields"],[3,"dataCustomFields"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,v0,2,0,"div",8),n.Oc(12,y0,30,27,"mat-card",9),n.Vb(),n.Vb(),n.Vb(),n.Wb(13,"mat-sidenav",10,11),n.Wb(15,"mat-tab-group"),n.Wb(16,"mat-tab",12),n.ic(17,"translate"),n.Oc(18,x0,1,1,"app-field-list",13),n.Vb(),n.Wb(19,"mat-tab",12),n.ic(20,"translate"),n.Oc(21,C0,1,1,"app-field-list",14),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode()),n.Db(3),n.oc("label",n.jc(17,14,"lang.availableFields")),n.Db(2),n.oc("ngIf",void 0!==e.indexingForm),n.Db(1),n.oc("label",n.jc(20,16,"lang.availableCustomFields")),n.Db(2),n.oc("ngIf",void 0!==e.indexingForm))},directives:[I.e,I.f,Ot,We,P.t,I.d,Te.c,Te.a,V.c,K.a,Y.c,Y.g,ee.a,X.F,X.u,X.x,P.s,J.b,X.d,te.a,qT,k.b,W.p,f0],pipes:[g.d],styles:[".indexingModelLabel[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.defaultModel[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding-left:10px}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();function D0(t,e){1&t&&(n.Ub(0),n.Rb(1,"mat-spinner",9),n.Tb())}function w0(t,e){1&t&&(n.Ub(0),n.Rb(1,"div",11),n.ic(2,"translate"),n.Tb()),2&t&&(n.Db(1),n.oc("innerHTML",n.jc(2,1,"lang.confirmAction"),n.Ec))}function M0(t,e){if(1&t&&(n.Wb(0,"li"),n.Wb(1,"b"),n.Qc(2),n.Vb(),n.Qc(3),n.ic(4,"translate"),n.Wb(5,"b"),n.Qc(6),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.Rc(t.count),n.Db(1),n.Sc(" ",n.jc(4,3,"lang.mailsWithStatus")," "),n.Db(3),n.Rc(t.status)}}function k0(t,e){if(1&t&&(n.Wb(0,"mat-option",18),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(3);n.oc("value",t.id)("disabled",t.id===i.mainIndexingModel.id),n.Db(1),n.Sc(" ",t.label," ")}}function S0(t,e){if(1&t&&(n.Wb(0,"li"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.label," ")}}function I0(t,e){if(1&t&&(n.Wb(0,"div",19),n.Qc(1),n.ic(2,"translate"),n.Wb(3,"ul"),n.Oc(4,S0,2,1,"li",13),n.Vb(),n.Qc(5),n.ic(6,"translate"),n.Vb()),2&t){const t=n.hc(3);n.Db(1),n.Sc(" ",n.jc(2,3,"lang.indexingModelFieldsReset")," "),n.Db(3),n.oc("ngForOf",t.resetFields),n.Db(1),n.Sc(" ",n.jc(6,5,"lang.confirmAction")," ")}}function P0(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",12),n.Qc(1),n.ic(2,"translate"),n.Wb(3,"ul"),n.Oc(4,M0,7,5,"li",13),n.Vb(),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Wb(7,"div"),n.Wb(8,"mat-form-field",14),n.Wb(9,"mat-select",15),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc(2).modelIds=e}))("selectionChange",(function(e){return n.Dc(t),n.hc(2).changeModel(e)})),n.ic(10,"translate"),n.Oc(11,k0,2,3,"mat-option",16),n.Vb(),n.Vb(),n.Vb(),n.Oc(12,I0,7,7,"div",17)}if(2&t){const t=n.hc(2);n.Db(1),n.Sc(" ",n.jc(2,7,"lang.indexingModelUsedBy")," "),n.Db(3),n.oc("ngForOf",t.mainIndexingModel.used),n.Db(1),n.Sc(" ",n.jc(6,9,"lang.indexingModelReplaceToDelete")," "),n.Db(4),n.oc("ngModel",t.modelIds)("placeholder",n.jc(10,11,"lang.indexingModel")),n.Db(2),n.oc("ngForOf",t.indexingModels),n.Db(1),n.oc("ngIf",0!==t.resetFields.length)}}function V0(t,e){if(1&t&&(n.Oc(0,w0,3,3,"ng-container",3),n.Oc(1,P0,13,13,"ng-template",null,10,n.Pc)),2&t){const t=n.zc(2),e=n.hc();n.oc("ngIf",0===e.mainIndexingModel.used.length)("ngIfElse",t)}}let R0=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.data=e,this.dialogRef=i,this.http=n,this.notify=a,this.sortPipe=s,this.title="lang.delete",this.indexingModels=[],this.modelIds=[],this.mainIndexingModel={used:[]},this.resetFields=[],this.statuses=[],this.customFields=[],this.availableFields=[{identifier:"doctype",label:this.translate.instant("lang.doctype")},{identifier:"subject",label:this.translate.instant("lang.subject")},{identifier:"recipients",label:this.translate.instant("lang.getRecipients")},{identifier:"priority",label:this.translate.instant("lang.priority")},{identifier:"confidentiality",label:this.translate.instant("lang.confidential")},{identifier:"initiator",label:this.translate.instant("lang.initiatorEntityAlt")},{identifier:"departureDate",label:this.translate.instant("lang.departureDate")},{identifier:"processLimitDate",label:this.translate.instant("lang.processLimitDate")},{identifier:"tags",label:this.translate.instant("lang.tags")},{identifier:"senders",label:this.translate.instant("lang.getSenders")},{identifier:"destination",label:this.translate.instant("lang.destination")},{identifier:"folders",label:this.translate.instant("lang.folders")},{identifier:"documentDate",label:this.translate.instant("lang.docDate")},{identifier:"arrivalDate",label:this.translate.instant("lang.arrivalDate")}],this.loading=!0,this.mainIndexingModel.id=e.indexingModel.id}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){yield this.loadIndexingModelFields(),this.mainIndexingModel.used.length>0&&(this.title="lang.indexingModelReassign",yield this.loadIndexingModels(),yield this.loadStatuses(),yield this.loadCustomFields(),this.formatFields()),this.loading=!1}))}loadIndexingModels(){return new Promise(t=>{this.http.get("../rest/indexingModels").pipe(Object(l.a)(t=>t.indexingModels.filter(t=>!1===t.private)),Object(mt.a)(t=>{this.indexingModels=t,this.sortPipe.transform(this.indexingModels,"label"),this.modelIds=this.indexingModels.map(t=>t.id)}),Object(Xt.a)(()=>t(!0)),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()})}loadIndexingModelFields(){return new Promise(t=>{this.http.get("../rest/indexingModels/"+this.mainIndexingModel.id+"?used=true").pipe(Object(mt.a)(t=>{this.mainIndexingModel.used=t.indexingModel.used,this.mainIndexingModelFields=t.indexingModel.fields}),Object(mt.a)(()=>t(!0)),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()})}formatFields(){this.mainIndexingModelFields=this.mainIndexingModelFields.map(t=>{const e=this.availableFields.find(e=>e.identifier===t.identifier);return t.label=void 0===e?this.translate.instant("lang.undefined"):e.label,t})}loadStatuses(){return new Promise(t=>{this.http.get("../rest/statuses").pipe(Object(mt.a)(t=>{this.statuses=t.statuses,this.mainIndexingModel.used.forEach(t=>{const e=this.statuses.find(e=>e.id===t.status);void 0!==e&&(t.status=e.label_status)})}),Object(Xt.a)(()=>t(!0)),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()})}loadCustomFields(){return new Promise(t=>{this.http.get("../rest/customFields").pipe(Object(mt.a)(t=>{t.customFields=t.customFields.map(t=>({identifier:"indexingCustomField_"+t.id,label:t.label})),t.customFields.forEach(t=>{this.availableFields.push(t)}),this.sortPipe.transform(this.availableFields,"label")}),Object(Xt.a)(()=>t(!0)),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()})}changeModel(t){this.selectedModelId=t.value,this.http.get("../rest/indexingModels/"+this.selectedModelId).pipe(Object(mt.a)(t=>{this.selectedModelFields=t.indexingModel.fields,this.resetFields=this.mainIndexingModelFields.filter(t=>void 0===this.selectedModelFields.find(e=>e.identifier===t.identifier)),this.sortPipe.transform(this.resetFields,"label")}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}isValid(){return!this.loading&&(0===this.mainIndexingModel.used.length||void 0!==this.selectedModelId)}onSubmit(){0===this.mainIndexingModel.used.length?this.http.delete("../rest/indexingModels/"+this.mainIndexingModel.id).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.indexingModelDeleted")),this.dialogRef.close("ok")}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe():this.http.request("DELETE","../rest/indexingModels/"+this.mainIndexingModel.id,{body:{targetId:this.selectedModelId}}).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.indexingModelDeleted")),this.dialogRef.close("ok")}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(q.a),n.Qb(q.h),n.Qb(v.b),n.Qb(D.a),n.Qb(Wt.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],features:[n.Cb([Wt.a])],decls:16,vars:12,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],[4,"ngIf","ngIfElse"],["elseLoading",""],[1,"divider-modal"],["mat-dialog-actions",""],["color","primary","mat-raised-button","",1,"actions",3,"disabled","click"],["color","","mat-raised-button","",1,"actions",3,"click"],[2,"margin","auto"],["elseTemplate",""],["role","alert",1,"alert-message","alert-message-info",2,"margin","20px 0",3,"innerHTML"],[1,"alert-message","alert-message-info"],[4,"ngFor","ngForOf"],[2,"padding","10px","margin-top","15px"],["name","model","required","",3,"ngModel","placeholder","ngModelChange","selectionChange"],[3,"value","disabled",4,"ngFor","ngForOf"],["class","alert-message alert-message-danger",4,"ngIf"],[3,"value","disabled"],[1,"alert-message","alert-message-danger"]],template:function(t,e){if(1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"div",2),n.Oc(5,D0,2,0,"ng-container",3),n.Oc(6,V0,3,2,"ng-template",null,4,n.Pc),n.Rb(8,"span",5),n.Wb(9,"div",6),n.Wb(10,"button",7),n.dc("click",(function(){return e.onSubmit()})),n.Qc(11),n.ic(12,"translate"),n.Vb(),n.Wb(13,"button",8),n.dc("click",(function(){return e.dialogRef.close("")})),n.Qc(14),n.ic(15,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.zc(7);n.Db(2),n.Rc(n.jc(3,6,e.title)),n.Db(3),n.oc("ngIf",e.loading)("ngIfElse",t),n.Db(5),n.oc("disabled",!e.isValid()),n.Db(1),n.Rc(n.jc(12,8,"lang.validate")),n.Db(3),n.Rc(n.jc(15,10,"lang.cancel"))}},directives:[q.i,q.f,P.t,q.c,k.b,V.c,P.s,Y.c,ee.a,X.F,X.u,X.x,W.p],pipes:[g.d],styles:[".alert-message-info[_ngcontent-%COMP%]{margin:0;font-size:16px}"]}),t})();const j0=["adminMenuTemplate"];function A0(t,e){1&t&&(n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",11),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",12),n.Rb(5,"mat-icon",13),n.Wb(6,"p",14),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,2,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,4,"lang.add")," "))}function W0(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Vb())}function T0(t,e){1&t&&(n.Wb(0,"mat-header-cell",41),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.technicalId")))}function E0(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.id," ")}}function F0(t,e){1&t&&(n.Wb(0,"mat-header-cell",41),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.category_id")))}function L0(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",n.jc(2,1,"lang."+t.category)," ")}}function Q0(t,e){1&t&&(n.Wb(0,"mat-header-cell",42),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.label")))}function N0(t,e){if(1&t&&(n.Wb(0,"mat-cell",43),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.label," ")}}function z0(t,e){1&t&&(n.Wb(0,"mat-header-cell",41),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.perimeter")))}const B0=function(t,e){return{dataLabelWarn:t,dataLabelPrimary:e}};function U0(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Wb(1,"span",44),n.Qc(2),n.ic(3,"translate"),n.ic(4,"translate"),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngClass",n.wc(6,B0,t.private,!t.private)),n.Db(1),n.Rc(t.private?n.jc(3,2,"lang.private"):n.jc(4,4,"lang.public"))}}function $0(t,e){1&t&&(n.Wb(0,"mat-header-cell",41),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.default")))}function H0(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Wb(1,"span",44),n.Qc(2),n.ic(3,"translate"),n.ic(4,"translate"),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngClass",n.wc(6,B0,!t.default,t.default)),n.Db(1),n.Rc(t.default?n.jc(3,2,"lang.yes"):n.jc(4,4,"lang.no"))}}function G0(t,e){1&t&&(n.Wb(0,"mat-header-cell",41),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.status")))}function X0(t,e){1&t&&(n.Wb(0,"span",47),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.active")))}function q0(t,e){1&t&&(n.Wb(0,"span",48),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.inactive")))}function K0(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Oc(1,X0,3,3,"span",45),n.Oc(2,q0,3,3,"span",46),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",t.enabled),n.Db(1),n.oc("ngIf",!t.enabled)}}function Y0(t,e){1&t&&n.Rb(0,"mat-header-cell")}function J0(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",54),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc(2);return e.stopPropagation(),a.disableIndexingModel(i)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",55),n.Vb()}if(2&t){const t=n.hc().$implicit;n.pc("matTooltip",n.jc(1,2,"lang.suspend")),n.oc("disabled",t.default)}}function Z0(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",56),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc(2);return e.stopPropagation(),a.enableIndexingModel(i)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",57),n.Vb()}2&t&&n.pc("matTooltip",n.jc(1,1,"lang.authorize"))}function t2(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",49),n.Oc(1,J0,3,4,"button",50),n.Oc(2,Z0,3,3,"button",51),n.Wb(3,"button",52),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.delete(a)})),n.ic(4,"translate"),n.Rb(5,"mat-icon",53),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",t.enabled),n.Db(1),n.oc("ngIf",!t.enabled),n.Db(1),n.pc("matTooltip",n.jc(4,4,"lang.delete")),n.oc("disabled",t.default)}}function e2(t,e){1&t&&n.Rb(0,"mat-header-row")}function i2(t,e){1&t&&(n.Rb(0,"mat-row",58),n.ic(1,"translate")),2&t&&(n.qc("routerLink","/administration/indexingModels/",e.$implicit.id,""),n.pc("matTooltip",n.jc(1,2,"lang.view")))}function n2(t,e){if(1&t&&(n.Wb(0,"mat-card",17),n.Wb(1,"div",18),n.Wb(2,"div",19),n.Wb(3,"mat-form-field"),n.Rb(4,"input",20),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Wb(6,"div",19),n.Rb(7,"mat-paginator",21,22),n.Vb(),n.Vb(),n.Wb(9,"mat-table",23,24),n.Ub(11,25),n.Oc(12,T0,3,3,"mat-header-cell",26),n.Oc(13,E0,2,1,"mat-cell",27),n.Tb(),n.Ub(14,28),n.Oc(15,F0,3,3,"mat-header-cell",26),n.Oc(16,L0,3,3,"mat-cell",27),n.Tb(),n.Ub(17,29),n.Oc(18,Q0,3,3,"mat-header-cell",30),n.Oc(19,N0,2,1,"mat-cell",31),n.Tb(),n.Ub(20,32),n.Oc(21,z0,3,3,"mat-header-cell",26),n.Oc(22,U0,5,9,"mat-cell",27),n.Tb(),n.Ub(23,33),n.Oc(24,$0,3,3,"mat-header-cell",26),n.Oc(25,H0,5,9,"mat-cell",27),n.Tb(),n.Ub(26,34),n.Oc(27,G0,3,3,"mat-header-cell",26),n.Oc(28,K0,3,2,"mat-cell",27),n.Tb(),n.Ub(29,35),n.Oc(30,Y0,1,0,"mat-header-cell",36),n.Oc(31,t2,6,6,"mat-cell",37),n.Tb(),n.Oc(32,e2,1,0,"mat-header-row",38),n.Oc(33,i2,2,4,"mat-row",39),n.Vb(),n.Wb(34,"div",40),n.Qc(35),n.ic(36,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.pc("placeholder",n.jc(5,10,"lang.filterBy")),n.oc("formControl",t.adminService.getFilterField()),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.adminService.getDataSource()),n.Db(23),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns),n.Db(2),n.Tc(" ",t.indexingModels.length," ",n.jc(36,12,"lang.indexingModels"),"")}}let a2=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.dialog=s,this.functions=o,this.adminService=r,this.viewContainerRef=c,this.search=null,this.indexingModels=[],this.loading=!1,this.displayedColumns=["id","category","label","private","default","enabled","actions"],this.filterColumns=["id","label"]}ngOnInit(){this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,this.http.get("../rest/indexingModels?showDisabled=true").pipe(Object(l.a)(t=>t.indexingModels.filter(t=>!1===t.private)),Object(mt.a)(t=>{this.indexingModels=t,this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.indexingModels")),setTimeout(()=>{this.adminService.setDataSource("admin_indexing_models",this.indexingModels,this.sort,this.paginator,this.filterColumns)},0)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}delete(t){this.dialogRef=this.dialog.open(R0,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{indexingModel:t}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{for(const e in this.indexingModels)this.indexingModels[e].id===t.id&&this.indexingModels.splice(Number(e),1);this.adminService.setDataSource("admin_indexing_models",this.indexingModels,this.sort,this.paginator,this.filterColumns)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}disableIndexingModel(t){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.disable"),msg:this.translate.instant("lang.confirmAction")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.request("PUT","../rest/indexingModels/"+t.id+"/disable")),Object(mt.a)(e=>{for(const i in this.indexingModels)this.indexingModels[i].id===t.id&&(this.indexingModels[i].enabled=!1);this.notify.success(this.translate.instant("lang.indexingModelDisabled"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}enableIndexingModel(t){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.enable"),msg:this.translate.instant("lang.confirmAction")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.request("PUT","../rest/indexingModels/"+t.id+"/enable")),Object(mt.a)(e=>{for(let i in this.indexingModels)this.indexingModels[i].id===t.id&&(this.indexingModels[i].enabled=!0);this.notify.success(this.translate.instant("lang.indexingModelEnabled"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(q.b),n.Qb(_t.a),n.Qb(OL),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(j0,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:15,vars:8,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["mat-subheader",""],["mat-list-item","","routerLink","/administration/indexingModels/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"row"],[1,"col-md-6","col-xs-6"],["matInput","",3,"formControl","placeholder"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSortDisableClear","","matSort","",3,"dataSource"],["table",""],["matColumnDef","id"],["mat-sort-header","",4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","category"],["matColumnDef","label"],["mat-sort-header","","style","flex:2",4,"matHeaderCellDef"],["style","flex:2",4,"matCellDef"],["matColumnDef","private"],["matColumnDef","default"],["matColumnDef","enabled"],["matColumnDef","actions"],[4,"matHeaderCellDef"],["style","justify-content: flex-end;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"routerLink","matTooltip",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["mat-sort-header",""],["mat-sort-header","",2,"flex","2"],[2,"flex","2"],[1,"label",3,"ngClass"],["class","label dataLabelPrimary",4,"ngIf"],["class","label dataLabelWarn",4,"ngIf"],[1,"label","dataLabelPrimary"],[1,"label","dataLabelWarn"],[2,"justify-content","flex-end"],["mat-icon-button","","color","primary",3,"matTooltip","disabled","click",4,"ngIf"],["mat-icon-button","","color","accent",3,"matTooltip","click",4,"ngIf"],["mat-icon-button","","color","warn",3,"matTooltip","disabled","click"],["aria-hidden","true",1,"fa","fa-trash-alt","fa-2x"],["mat-icon-button","","color","primary",3,"matTooltip","disabled","click"],["aria-hidden","true",1,"fa","fa-pause","fa-2x"],["mat-icon-button","","color","accent",3,"matTooltip","click"],["aria-hidden","true",1,"fa","fa-check","fa-2x"],[2,"cursor","pointer",3,"routerLink","matTooltip"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,A0,9,6,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,W0,2,0,"div",9),n.Oc(14,n2,37,14,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,R.h,R.g,R.d,o.f,S.a,R.c,W.l,V.c,K.a,Y.c,J.b,X.d,X.u,X.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,vt.h,Fe.b,vt.a,P.q,k.b,A.b,vt.j,vt.m,o.d],pipes:[g.d],styles:[".dataLabelWarn[_ngcontent-%COMP%]{color:#8e3e52}.dataLabelPrimary[_ngcontent-%COMP%]{color:#135f7f}.label[_ngcontent-%COMP%]{font-size:75%;font-weight:700}"]}),t})();const s2=["listFilter"];function o2(t,e){1&t&&(n.Wb(0,"div",32),n.Rb(1,"mat-spinner"),n.Vb())}function r2(t,e){if(1&t&&(n.Wb(0,"mat-option",33),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}function c2(t,e){if(1&t&&(n.Wb(0,"mat-option",33),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}function l2(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",34),n.Wb(1,"mat-form-field",5),n.Wb(2,"mat-label"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"mat-select",35),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().exportModel.delimiter=e})),n.ic(6,"translate"),n.Oc(7,c2,2,2,"mat-option",7),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(3),n.Rc(n.jc(4,5,"lang.delimiter")),n.Db(2),n.pc("placeholder",n.jc(6,7,"lang.delimiter")),n.oc("ngModel",t.exportModel.delimiter)("disabled","csv"!=t.exportModel.format),n.Db(2),n.oc("ngForOf",t.delimiters)}}function d2(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",36),n.Qc(1),n.Wb(2,"i",37),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().addData(i)})),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.pc("id",t.value),n.Db(1),n.Sc("",t.label," ")}}function h2(t,e){1&t&&(n.Wb(0,"div",38),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.noDataAvailable")))}function u2(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",36),n.Qc(1),n.Wb(2,"i",39),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc().removeData(i)})),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.pc("id",t.value),n.Db(1),n.Sc("",t.label," ")}}function p2(t,e){1&t&&(n.Wb(0,"div",38),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.noDataAvailable")))}const b2=function(t){return[t]};let f2=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.notify=i,this.data=n,this.sortPipe=a,this.localStorage=s,this.headerService=o,this.loading=!1,this.loadingExport=!1,this.delimiters=[";",",","TAB"],this.formats=["csv"],this.exportModel={delimiter:";",format:"csv",data:[]},this.dataAvailable=[{value:"id",label:this.translate.instant("lang.id")},{value:"externalId",label:"External Id"},{value:"enabled",label:this.translate.instant("lang.status")},{value:"communicationMeans",label:this.translate.instant("lang.communicationMean")}]}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){yield this.getContactFields(),this.setConfiguration()}))}getContactFields(){return new Promise((t,e)=>{this.http.get("../rest/contactsParameters").pipe(Object(l.a)(t=>{const e=/contactCustomField_[.]*/g;return t.contactsParameters=t.contactsParameters.filter(t=>null===t.identifier.match(e)).map(t=>({value:t.identifier,label:this.translate.instant("lang.contactsParameters_"+t.identifier)})),t.contactsParameters}),Object(mt.a)(t=>{this.dataAvailable=this.dataAvailable.concat(t)}),p(()=>this.http.get("../rest/contactsCustomFields")),Object(l.a)(t=>(t.customFields=t.customFields.map(t=>({value:"contactCustomField_"+t.id,label:t.label})),t.customFields)),Object(mt.a)(e=>{this.dataAvailable=this.dataAvailable.concat(e),this.dataAvailable=this.sortPipe.transform(this.dataAvailable,"label"),t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}drop(t){if(t.previousContainer===t.container)Object(lo.h)(t.container.data,t.previousIndex,t.currentIndex);else{let e=t.previousIndex;if("selectedElements"===t.container.id&&(e=0,void 0!==$(".available-data .columns")[t.previousIndex])){const i=$(".available-data .columns")[t.previousIndex].id;e=this.dataAvailable.map(t=>t.value).indexOf(i)}Object(lo.i)(t.previousContainer.data,t.container.data,e,t.currentIndex);const i=this.listFilter.nativeElement.value;this.listFilter.nativeElement.value="",setTimeout(()=>{this.listFilter.nativeElement.value=i},10)}}exportData(){this.localStorage.save("exportContactFields_"+this.headerService.user.id,JSON.stringify(this.exportModel)),this.loadingExport=!0,this.http.put("../rest/contacts/export",this.exportModel,{responseType:"blob"}).pipe(Object(mt.a)(t=>{if("text/html"!==t.type){const e=document.createElement("a");let i,n,a,s;e.href=window.URL.createObjectURL(t),i=new Date,n=i.getDate(),a=i.getMonth()+1,s=i.getFullYear(),n<10&&(n="0"+n),a<10&&(a="0"+a),i=n+"-"+a+"-"+s,e.setAttribute("download","export_contact_maarch_"+i+"."+this.exportModel.format.toLowerCase()),document.body.appendChild(e),e.click()}else alert(this.translate.instant("lang.tooMuchDatas"))}),Object(Xt.a)(()=>this.loadingExport=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}addData(t){let e=0;this.dataAvailable.forEach((i,n)=>{i.value===t.value&&(e=n)}),Object(lo.i)(this.dataAvailable,this.exportModel.data,e,this.exportModel.data.length);const i=this.listFilter.nativeElement.value;this.listFilter.nativeElement.value="",setTimeout(()=>{this.listFilter.nativeElement.value=i},10)}removeData(t){Object(lo.i)(this.exportModel.data,this.dataAvailable,t,this.dataAvailable.length),this.sortPipe.transform(this.dataAvailable,"label")}removeAllData(){this.dataAvailable=this.dataAvailable.concat(this.exportModel.data),this.exportModel.data=[]}addAllData(){for(this.exportModel.data=this.exportModel.data.concat(this.dataAvailable);this.dataAvailable.length>0;)this.dataAvailable.pop();this.listFilter.nativeElement.value=""}setConfiguration(){null!==this.localStorage.get("exportContactFields_"+this.headerService.user.id)&&(JSON.parse(this.localStorage.get("exportContactFields_"+this.headerService.user.id)).data.forEach(t=>{this.addData(t)}),this.exportModel.delimiter=JSON.parse(this.localStorage.get("exportContactFields_"+this.headerService.user.id)).delimiter)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.a),n.Qb(Wt.a),n.Qb(Ut.a),n.Qb(y.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(s2,!0),2&t&&n.yc(i=n.ec())&&(e.listFilter=i.first)},features:[n.Cb([Wt.a])],decls:63,vars:62,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],["class","loader",4,"ngIf"],[1,"row"],["appearance","outline"],[3,"placeholder","ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["class","col-md-9",4,"ngIf"],[3,"expanded"],[1,"col-md-12"],["appearance","outline",1,"listFilter"],["matInput","","cdkFocusInitial","",3,"placeholder"],["listFilter",""],[1,"row","exportList"],[1,"col-md-6","available-data"],[1,"title"],["color","primary",1,"fa","fa-plus-circle","removeAllDatas",3,"title","click"],["id","availableElements","cdkDropList","",1,"cdk-list",3,"cdkDropListData","cdkDropListConnectedTo","cdkDropListDropped"],["dataAvailableList","cdkDropList"],["class","columns","cdkDrag","",3,"id",4,"ngFor","ngForOf"],["class","noData",4,"ngIf"],[2,"display","flex","align-items","center"],[1,"fas","fa-arrow-right"],[1,"col-md-6","active-data"],["color","warn",1,"fa","fa-minus-circle","removeAllDatas",3,"title","click"],["id","selectedElements","cdkDropList","",1,"cdk-list",3,"cdkDropListData","cdkDropListConnectedTo","cdkDropListDropped"],["dataExportList","cdkDropList"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"mat-dialog-close"],[1,"loader"],[3,"value"],[1,"col-md-9"],[3,"placeholder","ngModel","disabled","ngModelChange"],["cdkDrag","",1,"columns",3,"id"],["color","primary",1,"fa","fa-plus",2,"cursor","pointer",3,"click"],[1,"noData"],["color","warn",1,"fa","fa-minus",2,"cursor","pointer",3,"click"]],template:function(t,e){if(1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"div",2),n.Oc(5,o2,2,0,"div",3),n.Wb(6,"div",4),n.Wb(7,"div"),n.Wb(8,"mat-form-field",5),n.Wb(9,"mat-label"),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Wb(12,"mat-select",6),n.dc("ngModelChange",(function(t){return e.exportModel.format=t})),n.ic(13,"translate"),n.Oc(14,r2,2,2,"mat-option",7),n.Vb(),n.Vb(),n.Vb(),n.Oc(15,l2,8,9,"div",8),n.Vb(),n.Wb(16,"mat-accordion"),n.Wb(17,"mat-expansion-panel",9),n.Wb(18,"mat-expansion-panel-header"),n.Wb(19,"mat-panel-title"),n.Qc(20),n.ic(21,"translate"),n.Vb(),n.Vb(),n.Wb(22,"div",4),n.Wb(23,"div",10),n.Wb(24,"mat-form-field",11),n.Rb(25,"input",12,13),n.ic(27,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(28,"div",14),n.Wb(29,"div",15),n.Wb(30,"h2"),n.Wb(31,"span",16),n.Qc(32),n.ic(33,"translate"),n.Vb(),n.Wb(34,"i",17),n.dc("click",(function(){return e.addAllData()})),n.ic(35,"translate"),n.Vb(),n.Vb(),n.Wb(36,"div",18,19),n.dc("cdkDropListDropped",(function(t){return e.drop(t)})),n.Oc(38,d2,3,2,"div",20),n.ic(39,"filterList"),n.ic(40,"sortBy"),n.Oc(41,h2,3,3,"div",21),n.Vb(),n.Vb(),n.Wb(42,"div",22),n.Rb(43,"i",23),n.Vb(),n.Wb(44,"div",24),n.Wb(45,"h2"),n.Wb(46,"span",16),n.Qc(47),n.ic(48,"translate"),n.Vb(),n.Wb(49,"i",25),n.dc("click",(function(){return e.removeAllData()})),n.ic(50,"translate"),n.Vb(),n.Vb(),n.Wb(51,"div",26,27),n.dc("cdkDropListDropped",(function(t){return e.drop(t)})),n.Oc(53,u2,3,2,"div",20),n.Oc(54,p2,3,3,"div",21),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Rb(55,"span",28),n.Wb(56,"div",29),n.Wb(57,"button",30),n.dc("click",(function(){return e.exportData()})),n.Qc(58),n.ic(59,"translate"),n.Vb(),n.Wb(60,"button",31),n.Qc(61),n.ic(62,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.zc(26),i=n.zc(37),a=n.zc(52);n.Db(2),n.Rc(n.jc(3,29,"lang.exportDatas")),n.Db(3),n.oc("ngIf",e.loadingExport),n.Db(2),n.Ib("col-md-12","csv"!=e.exportModel.format)("col-md-3","csv"==e.exportModel.format),n.Db(3),n.Rc(n.jc(11,31,"lang.format")),n.Db(2),n.pc("placeholder",n.jc(13,33,"lang.format")),n.oc("ngModel",e.exportModel.format),n.Db(2),n.oc("ngForOf",e.formats),n.Db(1),n.oc("ngIf","csv"==e.exportModel.format),n.Db(2),n.oc("expanded",!0),n.Db(3),n.Sc(" ",n.jc(21,35,"lang.datasToExport")," "),n.Db(5),n.pc("placeholder",n.jc(27,37,"lang.searchDatas")),n.Db(7),n.Rc(n.jc(33,39,"lang.availableDatas")),n.Db(2),n.pc("title",n.jc(35,41,"lang.addAllData")),n.Db(2),n.oc("cdkDropListData",e.dataAvailable)("cdkDropListConnectedTo",n.vc(58,b2,a)),n.Db(2),n.oc("ngForOf",n.lc(39,43,n.kc(40,47,e.dataAvailable,"label"),t.value,"label")),n.Db(3),n.oc("ngIf",0==e.dataAvailable.length),n.Db(6),n.Rc(n.jc(48,50,"lang.chosenDatas")),n.Db(2),n.pc("title",n.jc(50,52,"lang.removeAllDatas")),n.Db(2),n.oc("cdkDropListData",e.exportModel.data)("cdkDropListConnectedTo",n.vc(60,b2,i)),n.Db(2),n.oc("ngForOf",e.exportModel.data),n.Db(1),n.oc("ngIf",0==e.exportModel.data.length),n.Db(3),n.oc("disabled",0==e.exportModel.data.length),n.Db(1),n.Rc(n.jc(59,54,"lang.toExport")),n.Db(3),n.Rc(n.jc(62,56,"lang.cancel"))}},directives:[q.i,q.f,P.t,Y.c,Y.g,ee.a,X.u,X.x,P.s,gt.a,gt.c,gt.g,gt.h,J.b,lo.e,q.c,k.b,q.d,V.c,W.p,lo.a],pipes:[g.d,rg,Wt.a],styles:[".mat-dialog-container{position:relative}.mat-dialog-content[_ngcontent-%COMP%]{padding-bottom:10px;overflow-x:hidden} .mat-expansion-panel-body{padding-bottom:50px}.mat-expansion-panel-header[_ngcontent-%COMP%], .noData[_ngcontent-%COMP%]{opacity:.5}.noData[_ngcontent-%COMP%]{text-align:center}.removeAllDatas[_ngcontent-%COMP%]{float:right;font-size:14px;opacity:1;cursor:pointer;margin-right:10px}.listFilter[_ngcontent-%COMP%]{font-size:10px;margin-bottom:-20px}.exportList[_ngcontent-%COMP%]{display:flex}.exportList[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{float:left;height:20px;font-size:10px;font-weight:700;opacity:.5}.exportList[_ngcontent-%COMP%] .cdk-list[_ngcontent-%COMP%]{height:100%}.cdk-list[_ngcontent-%COMP%]{max-width:100%;border:1px solid #ccc;display:block;border-radius:4px;max-height:310px;min-height:310px;overflow:auto}.cdk-list[_ngcontent-%COMP%], .columns[_ngcontent-%COMP%]{width:100%;background:#fff}.columns[_ngcontent-%COMP%]{height:50px;padding:20px 10px;border-bottom:1px solid #ccc;color:rgba(0,0,0,.87);display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;cursor:move;font-size:14px}.cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.columns[_ngcontent-%COMP%]:last-child{border:none}.cdk-list.cdk-drop-list-dragging[_ngcontent-%COMP%] .columns[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.actions[_ngcontent-%COMP%], .loader[_ngcontent-%COMP%]{justify-content:center}.loader[_ngcontent-%COMP%]{position:absolute;display:flex;width:100%;left:0;top:0;height:100%;background:hsla(0,0%,100%,.6);z-index:1;align-items:center}"]}),t})();function m2(t,e){1&t&&(n.Ub(0),n.Wb(1,"div",18),n.Rb(2,"mat-spinner"),n.Vb(),n.Tb())}function g2(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",26),n.dc("click",(function(){return n.Dc(t),n.hc(),n.zc(1).click()}))("onFileDropped",(function(e){return n.Dc(t),n.hc(2).dndUploadFile(e)})),n.Wb(1,"div"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()}2&t&&(n.Db(2),n.Sc(" ",n.jc(3,1,"lang.dndFileCsvDesc")," "))}function v2(t,e){1&t&&(n.Wb(0,"div",27),n.Rb(1,"mat-paginator",28,29),n.Vb()),2&t&&(n.Db(1),n.oc("length",100)("hidePageSize",!0)("pageSize",8))}function _2(t,e){if(1&t&&(n.Wb(0,"mat-option",51),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}function y2(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-header-cell",41),n.Rb(1,"i",42),n.ic(2,"translate"),n.Qc(3,"\xa0"),n.Wb(4,"b",43),n.ic(5,"translate"),n.Qc(6),n.Vb(),n.Qc(7," \xa0"),n.Rb(8,"i",44),n.Qc(9,"\xa0 "),n.Rb(10,"i",45),n.ic(11,"translate"),n.Qc(12,"\xa0 "),n.Wb(13,"mat-form-field",46),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.ic(14,"translate"),n.Wb(15,"mat-select",47),n.dc("ngModelChange",(function(e){n.Dc(t);const i=n.hc().$implicit;return n.hc(4).associatedColmuns[i.id]=e}))("selectionChange",(function(e){n.Dc(t);const i=n.hc().$implicit;return n.hc(4).changeColumn(i,e.value)})),n.Rb(16,"mat-option",48),n.Oc(17,_2,2,2,"mat-option",49),n.Vb(),n.Vb(),n.Wb(18,"mat-checkbox",50),n.dc("change",(function(e){n.Dc(t);const i=n.hc().$implicit;return n.hc(4).toggleEmptyMode(i.id,e.checked)})),n.ic(19,"translate"),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc(4);n.Db(1),n.oc("title",n.jc(2,8,"lang.dbColumn")),n.Db(3),n.oc("title",n.jc(5,10,"lang.dbColumn")),n.Db(2),n.Rc(t.label),n.Db(4),n.oc("title",n.jc(11,12,"lang.csvColumn")),n.Db(3),n.oc("title",n.jc(14,14,"lang.csvColumn")),n.Db(2),n.oc("ngModel",e.associatedColmuns[t.id]),n.Db(2),n.oc("ngForOf",e.csvColumns),n.Db(1),n.oc("title",n.jc(19,16,"lang.toggleEmptyValues"))}}function x2(t,e){1&t&&(n.Ub(0),n.Wb(1,"i",52),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Tb()),2&t&&(n.Db(2),n.Rc(n.jc(3,1,"lang.emptyValue")))}function C2(t,e){if(1&t&&n.Qc(0),2&t){const t=n.hc().$implicit,e=n.hc().$implicit;n.Sc(" ",t[e.id]," ")}}function O2(t,e){if(1&t&&(n.Wb(0,"mat-cell",41),n.Oc(1,x2,4,3,"ng-container",12),n.Oc(2,C2,1,1,"ng-template",null,13,n.Pc),n.Vb()),2&t){const t=e.$implicit,i=n.zc(3),a=n.hc().$implicit,s=n.hc(4);n.Db(1),n.oc("ngIf",a.emptyValueMode&&s.functionsService.empty(t[a.id]))("ngIfElse",i)}}function D2(t,e){if(1&t&&(n.Ub(0),n.Ub(1,38),n.Oc(2,y2,20,18,"mat-header-cell",39),n.Oc(3,O2,4,2,"mat-cell",40),n.Tb(),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("matColumnDef",t.id)}}function w2(t,e){1&t&&n.Rb(0,"mat-header-row")}function M2(t,e){1&t&&n.Rb(0,"mat-row")}function k2(t,e){if(1&t&&(n.Wb(0,"mat-table",33,34),n.Oc(2,D2,4,1,"ng-container",35),n.Oc(3,w2,1,0,"mat-header-row",36),n.Oc(4,M2,1,0,"mat-row",37),n.Vb()),2&t){const t=n.hc(3);n.Lc("width",300*t.contactColumns.length,"px"),n.oc("dataSource",t.dataSource),n.Db(2),n.oc("ngForOf",t.contactColumns),n.Db(1),n.oc("matHeaderRowDef",t.getcontactColumnsIds()),n.Db(1),n.oc("matRowDefColumns",t.getcontactColumnsIds())}}function S2(t,e){if(1&t&&(n.Wb(0,"div",30),n.Wb(1,"div",31),n.Oc(2,k2,5,6,"mat-table",32),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(2),n.oc("ngIf",t.csvData.length>0)}}function I2(t,e){if(1&t){const t=n.Xb();n.Wb(0,"input",19,20),n.dc("change",(function(e){return n.Dc(t),n.hc().uploadCsv(e)})),n.Vb(),n.Oc(2,g2,4,3,"div",21),n.Wb(3,"div",22),n.Oc(4,v2,3,3,"div",23),n.Vb(),n.Oc(5,S2,3,1,"div",24),n.Rb(6,"div",25),n.ic(7,"translate"),n.Rb(8,"div",25),n.ic(9,"translate")}if(2&t){const t=n.hc();n.Db(2),n.oc("ngIf",0===t.csvData.length),n.Db(2),n.oc("ngIf",0!==t.csvData.length),n.Db(1),n.oc("ngIf",0!==t.csvData.length),n.Db(1),n.oc("innerHTML",n.jc(7,5,"lang.infoImportNoIdToCreate"),n.Ec),n.Db(2),n.oc("innerHTML",n.jc(9,7,"lang.infoImportcontacts2"),n.Ec)}}function P2(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",53),n.dc("click",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc();n.oc("disabled",t.loading),n.Db(1),n.Rc(n.jc(2,2,"lang.validate"))}}let V2=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c,l){this.translate=t,this.http=e,this.notify=i,this.functionsService=n,this.localStorage=a,this.headerService=s,this.dialog=o,this.dialogRef=r,this.papa=c,this.data=l,this.loading=!1,this.contactColumns=[{id:"id",label:this.translate.instant("lang.id"),emptyValueMode:!1},{id:"company",label:this.translate.instant("lang.contactsParameters_company"),emptyValueMode:!1},{id:"civility",label:this.translate.instant("lang.contactsParameters_civility"),emptyValueMode:!1},{id:"firstname",label:this.translate.instant("lang.contactsParameters_firstname"),emptyValueMode:!1},{id:"lastname",label:this.translate.instant("lang.contactsParameters_lastname"),emptyValueMode:!1},{id:"function",label:this.translate.instant("lang.contactsParameters_function"),emptyValueMode:!1},{id:"department",label:this.translate.instant("lang.contactsParameters_department"),emptyValueMode:!1},{id:"email",label:this.translate.instant("lang.contactsParameters_email"),emptyValueMode:!1},{id:"phone",label:this.translate.instant("lang.contactsParameters_phone"),emptyValueMode:!1},{id:"addressAdditional1",label:this.translate.instant("lang.contactsParameters_addressAdditional1"),emptyValueMode:!1},{id:"addressNumber",label:this.translate.instant("lang.contactsParameters_addressNumber"),emptyValueMode:!1},{id:"addressStreet",label:this.translate.instant("lang.contactsParameters_addressStreet"),emptyValueMode:!1},{id:"addressAdditional2",label:this.translate.instant("lang.contactsParameters_addressAdditional2"),emptyValueMode:!1},{id:"addressPostcode",label:this.translate.instant("lang.contactsParameters_addressPostcode"),emptyValueMode:!1},{id:"addressTown",label:this.translate.instant("lang.contactsParameters_addressTown"),emptyValueMode:!1},{id:"addressCountry",label:this.translate.instant("lang.contactsParameters_addressCountry"),emptyValueMode:!1}],this.csvColumns=[],this.associatedColmuns={},this.dataSource=new vt.p(null),this.hasHeader=!0,this.csvData=[],this.contactData=[],this.countAll=0,this.countAdd=0,this.countUp=0}ngOnInit(){this.initCustomFields()}getcontactColumnsIds(){return this.contactColumns.map(t=>t.id)}initCustomFields(){this.http.get("../rest/contactsCustomFields").pipe(Object(l.a)(t=>t.customFields.map(t=>({id:"contactCustomField_"+t.id,label:t.label,type:t.type}))),Object(mt.a)(t=>{this.contactColumns=this.contactColumns.concat(t)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}toggleEmptyMode(t,e){this.contactColumns.filter(e=>e.id===t)[0].emptyValueMode=e}changeColumn(t,e){this.contactData=[];for(let i=this.hasHeader?1:0;i<this.csvData.length;i++){const n=this.csvData[i],a={};this.contactColumns.forEach(i=>{a[i.id]=t===i.id?n[this.csvColumns.filter(t=>t===e)[0]]:n[this.associatedColmuns[i.id]]}),this.contactData.push(a)}this.countAdd=this.csvData.filter((t,e)=>e>0&&this.functionsService.empty(t[this.associatedColmuns.id])).length,this.countUp=this.csvData.filter((t,e)=>e>0&&!this.functionsService.empty(t[this.associatedColmuns.id])).length,setTimeout(()=>{this.dataSource=new vt.p(this.contactData),this.dataSource.paginator=this.paginator},0)}uploadCsv(t){if(t.target.files&&t.target.files[0]&&("text/csv"===t.target.files[0].type||"application/vnd.ms-excel"===t.target.files[0].type)){this.loading=!0;let e=[];const i=new FileReader;i.readAsText(t.target.files[0]),i.onload=t=>{this.papa.parse(t.target.result,{complete:t=>{e=t.data,e=e.filter(t=>t.length===e[0].length);let i=[],n={};this.setCsvColumns(e[0]),this.countAll=this.hasHeader?e.length-1:e.length;for(let a=0;a<e.length;a++)n={},i=e[a],i.forEach((t,e)=>{n[this.csvColumns[e]]=t}),this.csvData.push(n);this.initData(),this.countAdd=this.csvData.filter((t,e)=>e>0&&this.functionsService.empty(t[this.associatedColmuns.id])).length,this.countUp=this.csvData.filter((t,e)=>e>0&&!this.functionsService.empty(t[this.associatedColmuns.id])).length,this.loading=!1}})}}else this.dialog.open(qt.a,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.notAllowedExtension")+" !",msg:this.translate.instant("lang.file")+" : <b>"+t.target.files[0].name+"</b>, "+this.translate.instant("lang.type")+" : <b>"+t.target.files[0].type+"</b><br/><br/><u>"+this.translate.instant("lang.allowedExtensions")+"</u> : <br/>text/csv"}})}setCsvColumns(t=null){this.csvColumns=t.filter(t=>this.functionsService.empty(t)).length>0?Object.keys(t).map((t,e)=>""+e):t}toggleHeader(){this.hasHeader=!this.hasHeader,this.countAll=this.hasHeader?this.csvData.length-1:this.csvData.length,this.hasHeader?(this.countAdd=this.csvData.filter((t,e)=>e>0&&this.functionsService.empty(t[this.associatedColmuns.id])).length,this.countUp=this.csvData.filter((t,e)=>e>0&&!this.functionsService.empty(t[this.associatedColmuns.id])).length):(this.countAdd=this.csvData.filter((t,e)=>this.functionsService.empty(t[this.associatedColmuns.id])).length,this.countUp=this.csvData.filter((t,e)=>!this.functionsService.empty(t[this.associatedColmuns.id])).length),this.initData()}initData(){this.contactData=[];for(let t=this.hasHeader?1:0;t<this.csvData.length;t++){const e=this.csvData[t],i={};this.contactColumns.forEach((t,n)=>{const a=this.csvColumns.indexOf(t.label);this.associatedColmuns[t.id]=a>-1?this.csvColumns[a]:"",i[t.id]=a>-1?e[this.csvColumns[a]]:""}),this.contactData.push(i)}setTimeout(()=>{this.dataSource=new vt.p(this.contactData),this.dataSource.paginator=this.paginator},0)}dndUploadFile(t){this.uploadCsv({target:{files:[t[0]]}})}onSubmit(){let t=null;const e=[];let i="";this.translate.get("lang.confirmImportContacts",{0:this.countAll}).subscribe(t=>{i=t+" ?<br/><br/>",i+=`<ul><li><b>${this.countAdd}</b> ${this.translate.instant("lang.additions")}</li><li><b>${this.countUp}</b> ${this.translate.instant("lang.modifications")}</li></ul>`}),t=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.import"),msg:i}}),t.afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{this.loading=!0,this.csvData.forEach((t,i)=>{if(this.hasHeader&&i>0||!this.hasHeader){const i={};this.contactColumns.forEach(e=>{i[e.id]=(!e.emptyValueMode||void 0!==t[this.associatedColmuns[e.id]]&&!this.functionsService.empty(t[this.associatedColmuns[e.id]]))&&(void 0===t[this.associatedColmuns[e.id]]?"":"checkbox"===e.type?this.functionsService.empty(t[this.associatedColmuns[e.id]])?[]:t[this.associatedColmuns[e.id]].split("\n"):t[this.associatedColmuns[e.id]])}),e.push(i)}})}),p(()=>this.http.put("../rest/contacts/import",{contacts:e})),Object(mt.a)(e=>{let i="";e.errors.count>0&&(i+=`<br/>${e.errors.count} ${this.translate.instant("lang.withErrors")} : <ul>`,e.errors.details.forEach(t=>{i+=`<li> ${this.translate.instant("lang."+t.lang,{0:t.langParam})} (${this.translate.instant("lang.line")} : ${this.hasHeader?t.index+2:t.index+1})</li>`}),i+="</ul>"),t=this.dialog.open(qt.a,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.import"),msg:"<b>"+e.success+"</b> / <b>"+this.countAll+"</b> "+this.translate.instant("lang.importedContacts")+"."+i}})}),p(()=>t.afterClosed()),Object(mt.a)(()=>{this.dialogRef.close("success")}),Object(m.a)(t=>(this.loading=!1,this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(_t.a),n.Qb(Ut.a),n.Qb(y.a),n.Qb(q.b),n.Qb(q.h),n.Qb(Jt),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Xc(Kt.a,!0),2&t&&n.yc(i=n.ec())&&(e.paginator=i.first)},decls:37,vars:28,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["mat-dialog-content",""],[1,"import-tool"],[2,"flex","1"],["color","primary",3,"checked","change"],[2,"flex","1","text-align","center"],["color","primary",1,"fa","fa-users"],["color","primary"],["color","primary",1,"fa","fa-user-plus"],[2,"flex","1","text-align","right"],["color","primary",1,"fa","fa-user-edit"],[4,"ngIf","ngIfElse"],["elseTemplate",""],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click",4,"ngIf"],["mat-raised-button","","mat-button","",3,"disabled","mat-dialog-close"],[1,"loader"],["type","file","name","files[]","id","uploadFile","accept",".csv",2,"display","none",3,"change"],["uploadFile",""],["appUploadFileDragDrop","","class","dndFile",3,"click","onFileDropped",4,"ngIf"],[1,"row",2,"margin","0px"],["class","col-md-12",4,"ngIf"],["style","width:100%;box-shadow: inset 0px 0px 5px 0px rgba(0,0,0,0.75);padding:10px;",4,"ngIf"],[1,"alert-message","alert-message-info",2,"min-width","100%",3,"innerHTML"],["appUploadFileDragDrop","",1,"dndFile",3,"click","onFileDropped"],[1,"col-md-12"],[3,"length","hidePageSize","pageSize"],["paginator",""],[2,"width","100%","box-shadow","inset 0px 0px 5px 0px rgba(0,0,0,0.75)","padding","10px"],[2,"overflow","auto"],[3,"dataSource","width",4,"ngIf"],[3,"dataSource"],["table",""],[4,"ngFor","ngForOf"],[4,"matHeaderRowDef"],[4,"matRowDef","matRowDefColumns"],[3,"matColumnDef"],["style","padding-left: 5px;padding-right: 5px;",4,"matHeaderCellDef"],["style","padding-left: 5px;padding-right: 5px;",4,"matCellDef"],[2,"padding-left","5px","padding-right","5px"],["color","primary",1,"fas","fa-database",3,"title"],["color","primary",3,"title"],[1,"fas","fa-arrows-alt-h"],[1,"fas","fa-file-csv",3,"title"],[2,"width","80px !important",3,"title","click"],[3,"ngModel","ngModelChange","selectionChange"],["value",""],[3,"value",4,"ngFor","ngForOf"],["color","primary",3,"title","change"],[3,"value"],[2,"opacity","0.5"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"]],template:function(t,e){if(1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"div",2),n.Wb(5,"mat-toolbar",3),n.Wb(6,"span",4),n.Wb(7,"mat-slide-toggle",5),n.dc("change",(function(){return e.toggleHeader()})),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Vb(),n.Wb(10,"span",6),n.Rb(11,"i",7),n.Qc(12),n.ic(13,"translate"),n.Wb(14,"b",8),n.Qc(15),n.Vb(),n.Vb(),n.Wb(16,"span",6),n.Rb(17,"i",9),n.Qc(18),n.ic(19,"translate"),n.Wb(20,"b",8),n.Qc(21),n.Vb(),n.Vb(),n.Wb(22,"span",10),n.Rb(23,"i",11),n.Qc(24),n.ic(25,"translate"),n.Wb(26,"b",8),n.Qc(27),n.Vb(),n.Vb(),n.Vb(),n.Oc(28,m2,3,0,"ng-container",12),n.Oc(29,I2,10,9,"ng-template",null,13,n.Pc),n.Vb(),n.Rb(31,"span",14),n.Wb(32,"div",15),n.Oc(33,P2,3,4,"button",16),n.Wb(34,"button",17),n.Qc(35),n.ic(36,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.zc(30);n.Db(2),n.Rc(n.jc(3,16,"lang.importContacts")),n.Db(3),n.Ib("hide",0===e.csvData.length||e.loading),n.Db(2),n.oc("checked",e.hasHeader),n.Db(1),n.Sc(" ",n.jc(9,18,"lang.csvHeader")," "),n.Db(4),n.Sc("\xa0",n.jc(13,20,"lang.contactsOfFile")," : "),n.Db(3),n.Rc(e.countAll),n.Db(3),n.Sc("\xa0",n.jc(19,22,"lang.additions")," : "),n.Db(3),n.Rc(e.countAdd),n.Db(3),n.Sc("\xa0",n.jc(25,24,"lang.modifications")," : "),n.Db(3),n.Rc(e.countUp),n.Db(1),n.oc("ngIf",e.loading)("ngIfElse",t),n.Db(5),n.oc("ngIf",e.csvData.length>0),n.Db(1),n.oc("disabled",e.loading),n.Db(1),n.Rc(n.jc(36,26,"lang.cancel"))}},directives:[q.i,q.f,M.a,te.a,P.t,q.c,k.b,q.d,V.c,ie,Kt.a,vt.o,P.s,vt.k,vt.n,vt.c,vt.i,vt.b,vt.h,Y.c,ee.a,X.u,X.x,W.p,j.a,vt.a,vt.j,vt.m],pipes:[g.d],styles:[".mat-dialog-content[_ngcontent-%COMP%]{display:flex;flex-direction:column}.loader[_ngcontent-%COMP%]{display:flex;height:100%;align-items:center;justify-content:center}.hide[_ngcontent-%COMP%]{display:none}.import-tool[_ngcontent-%COMP%]{font-size:14px}.dndFile[_ngcontent-%COMP%]{flex:1;display:flex;align-items:center;margin:0;justify-content:center;font-size:30px;opacity:.5!important;cursor:pointer}"]}),t})();const R2=["snav2"],j2=["adminMenuTemplate"],A2=["tableContactListSort"];function W2(t,e){if(1&t&&(n.Wb(0,"a",47),n.Rb(1,"mat-icon",48),n.Wb(2,"p",42),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Ib("active",t.current),n.oc("routerLink",t.route),n.Db(1),n.Fb(t.icon),n.Db(2),n.Sc(" ",t.label," ")}}function T2(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",39),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",40),n.Rb(5,"mat-icon",41),n.Wb(6,"p",42),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Wb(9,"a",43),n.dc("click",(function(){return n.Dc(t),n.hc().openContactExport()})),n.Rb(10,"mat-icon",44),n.Wb(11,"p",42),n.Qc(12),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Wb(14,"a",43),n.dc("click",(function(){return n.Dc(t),n.hc().openContactImportModal()})),n.Rb(15,"mat-icon",45),n.Wb(16,"p",42),n.Qc(17),n.ic(18,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Rb(19,"mat-divider"),n.Wb(20,"mat-nav-list"),n.Oc(21,W2,4,6,"a",46),n.Vb()}if(2&t){const t=n.hc();n.Db(2),n.Rc(n.jc(3,5,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,7,"lang.add")," "),n.Db(5),n.Sc(" ",n.jc(13,9,"lang.exportContacts")," "),n.Db(5),n.Sc(" ",n.jc(18,11,"lang.importContacts")," "),n.Db(4),n.oc("ngForOf",t.subMenus)}}function E2(t,e){1&t&&n.Rb(0,"mat-spinner")}function F2(t,e){if(1&t&&(n.Wb(0,"div",49),n.Oc(1,E2,1,0,"mat-spinner",50),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf",t.isLoadingResults)}}function L2(t,e){if(1&t&&n.Rb(0,"mat-header-cell",51),2&t){const t=n.hc();n.Ib("hide-for-mobile",t.appService.getViewMode())}}function Q2(t,e){if(1&t&&(n.Wb(0,"mat-cell",52),n.Rb(1,"i",53),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit,i=n.hc();n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Gb("fas fa-circle threshold_",t.filling.thresholdLevel,""),n.oc("title",n.jc(2,6,"lang.contactFilledTo")+" "+t.filling.rate+"%")}}function N2(t,e){1&t&&(n.Wb(0,"mat-header-cell",54),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.firstname")))}function z2(t,e){if(1&t&&(n.Wb(0,"mat-cell",55),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.firstname," ")}}function B2(t,e){1&t&&(n.Wb(0,"mat-header-cell",54),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.lastname")))}function U2(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.lastname," ")}}function $2(t,e){1&t&&(n.Wb(0,"mat-header-cell",54),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.contactsParameters_company")," "))}function H2(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.company," ")}}function G2(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",56),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Sc(" ",n.jc(2,3,"lang.address"),"")}}function X2(t,e){if(1&t&&(n.Wb(0,"mat-cell",56),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc();n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",t.formatedAddress," ")}}function q2(t,e){1&t&&n.Rb(0,"mat-header-cell")}function K2(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",62),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc();return e.stopPropagation(),a.toggleContact(i)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",63),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.suspend"))}function Y2(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",64),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc();return e.stopPropagation(),a.toggleContact(i)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",65),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.authorize"))}function J2(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",57),n.Oc(1,K2,3,3,"button",58),n.Oc(2,Y2,3,3,"button",59),n.Wb(3,"button",60),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc();return i.stopPropagation(),s.deleteContact(a)})),n.ic(4,"translate"),n.Rb(5,"mat-icon",61),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",t.enabled),n.Db(1),n.oc("ngIf",!t.enabled),n.Db(1),n.oc("title",n.jc(4,3,"lang.delete"))}}function Z2(t,e){1&t&&n.Rb(0,"mat-header-row")}function t3(t,e){1&t&&n.Rb(0,"mat-row",66),2&t&&n.qc("routerLink","/administration/contacts/list/",e.$implicit.id,"")}const e3=function(){return["/rest/autocomplete/contacts"]};function i3(t,e){if(1&t){const t=n.Xb();n.Wb(0,"plugin-autocomplete",14),n.dc("triggerEvent",(function(e){return n.Dc(t),n.hc().setRedirectUser(e)})),n.ic(1,"translate"),n.ic(2,"translate"),n.Vb()}2&t&&n.oc("labelPlaceholder",n.jc(1,4,"lang.contactReplacement"))("labelList",n.jc(2,6,"lang.availableContacts"))("routeDatas",n.uc(8,e3))("targetSearchKey","contact")}function n3(t,e){1&t&&(n.Wb(0,"span"),n.Wb(1,"em"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,1,"lang.deleteContactInformations")))}function a3(t,e){1&t&&(n.Wb(0,"span"),n.Wb(1,"em"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,1,"lang.reaffectContactInformations")))}function s3(t,e){if(1&t&&(n.Wb(0,"div",15),n.Oc(1,n3,4,3,"span",16),n.Oc(2,a3,4,3,"span",16),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngIf","delete"==t.processMode),n.Db(1),n.oc("ngIf","reaffect"==t.processMode)}}let o3=(()=>{class t{constructor(t,e,i,a,s,o,r,c,l){this.translate=t,this.http=e,this.notify=i,this.headerService=a,this.appService=s,this.dialog=o,this.functions=r,this.adminService=c,this.viewContainerRef=l,this.loading=!1,this.filtersChange=new n.o,this.displayedColumnsContact=["filling","firstname","lastname","company","formatedAddress","actions"],this.isLoadingResults=!0,this.routeUrl="../rest/contacts",this.resultsLength=0,this.searchContact=new X.i,this.search="",this.destroy$=new da.a,this.subMenus=[{icon:"fa fa-book",route:"/administration/contacts",label:this.translate.instant("lang.contactsList"),current:!0},{icon:"fa fa-code",route:"/administration/contacts/contactsCustomFields",label:this.translate.instant("lang.customFieldsAdmin"),current:!1},{icon:"fa fa-cog",route:"/administration/contacts/contacts-parameters",label:this.translate.instant("lang.contactsParameters"),current:!1},{icon:"fa fa-users",route:"/administration/contacts/contacts-groups",label:this.translate.instant("lang.contactsGroups"),current:!1},{icon:"fas fa-magic",route:"/administration/contacts/duplicates",label:this.translate.instant("lang.duplicatesContactsAdmin"),current:!1}]}ngOnInit(){this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,this.adminService.setAdminId("admin_contacts_list"),this.functions.empty(this.adminService.getFilter())&&this.adminService.saveDefaultFilter(),this.initContactList(),this.initAutocompleteContacts()}initContactList(){this.resultListDatabase=new r3(this.http),this.paginator.pageIndex=this.adminService.getFilter("page"),this.sort.active=this.adminService.getFilter("sort"),this.sort.direction=this.adminService.getFilter("sortDirection"),this.sort.sortChange.subscribe(()=>this.paginator.pageIndex=0),Object(gy.a)(this.sort.sortChange,this.paginator.page,this.filtersChange).pipe(Object(Zo.a)(this.destroy$),Object(Qe.a)({}),Object(ft.a)(()=>(this.adminService.saveFilter({sort:this.sort.active,sortDirection:this.sort.direction,page:this.paginator.pageIndex,field:this.adminService.getFilter("field")}),this.search=this.adminService.getFilter("field"),this.isLoadingResults=!0,this.resultListDatabase.getRepoIssues(this.sort.active,this.sort.direction,this.paginator.pageIndex,this.routeUrl,this.search))),Object(l.a)(t=>(this.isLoadingResults=!1,t=this.processPostData(t),this.resultsLength=t.count,this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.contacts").toLowerCase(),"",""),t.contacts)),Object(m.a)(t=>(this.notify.handleErrors(t),this.isLoadingResults=!1,Object(c.a)([])))).subscribe(t=>this.data=t)}processPostData(t){return t.contacts.forEach(t=>{let e=[];e.push(t.addressNumber),e.push(t.addressStreet),e.push(t.addressPostcode),e.push(t.addressTown),e.push(t.addressCountry),t.formatedAddress=e.filter(t=>!this.isEmptyValue(t)).join(" ")}),this.displayedColumnsContact=this.functions.empty(t.contacts[0])||this.functions.empty(t.contacts[0].filling)?["firstname","lastname","company","formatedAddress","actions"]:["filling","firstname","lastname","company","formatedAddress","actions"],t}deleteContact(t){t.isUsed?(this.dialogRef=this.dialog.open(c3,{panelClass:"maarch-modal",autoFocus:!1}),this.dialogRef.afterClosed().subscribe(e=>{if(void 0!==e&&""!=e){var i="";"reaffect"==e.processMode&&(i="?redirect="+e.contactId),this.http.request("DELETE",`../rest/contacts/${t.id}${i}`).subscribe(()=>{this.refreshDao(),this.notify.success(this.translate.instant("lang.contactDeleted"))},t=>{this.notify.error(t.error.errors)})}this.dialogRef=null})):this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete("../rest/contacts/"+t.id)),Object(mt.a)(t=>{this.refreshDao(),this.notify.success(this.translate.instant("lang.contactDeleted"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}toggleContact(t){this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.suspend"),msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.put(`../rest/contacts/${t.id}/activation`,{enabled:!t.enabled})),Object(mt.a)(e=>{this.refreshDao(),this.notify.success(this.translate.instant(1==!t.enabled?"lang.contactEnabled":"lang.contactDisabled"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}openContactExport(){this.dialog.open(f2,{panelClass:"maarch-modal",width:"800px",autoFocus:!1})}openContactImportModal(){this.dialog.open(V2,{disableClose:!0,width:"99vw",maxWidth:"99vw",panelClass:"maarch-full-height-modal"}).afterClosed().pipe(Object(d.a)(t=>"success"===t),Object(mt.a)(()=>{this.refreshDao()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}refreshDao(){this.filtersChange.emit()}initAutocompleteContacts(){this.searchContact=new X.i(this.adminService.getFilter("field")),this.searchContact.valueChanges.pipe(Object(mt.a)(t=>{this.adminService.setFilter("field",t),this.adminService.saveFilter(this.adminService.getFilter()),0===t.length&&(this.search="",this.paginator.pageIndex=0,this.refreshDao())}),Object(pt.a)(300),Object(d.a)(t=>t.length>2),Object(bt.a)(),Object(mt.a)(t=>{this.search=t,this.paginator.pageIndex=0,this.refreshDao()})).subscribe()}isEmptyValue(t){return null===t||(Array.isArray(t)?!(t.length>0):""===String(t))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(q.b),n.Qb(_t.a),n.Qb(OL),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["contact-list"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(R2,!0),n.Kc(j2,!0),n.Kc(Kt.a,!0),n.Kc(A2,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:50,vars:21,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["class","example-loading-shade",4,"ngIf"],[1,"table-head"],[1,"table-head-result"],["floatLabel","never",2,"font-size","13px"],["type","text","matInput","","maxlength","128",3,"placeholder","formControl","click"],["autoCompleteInput",""],[1,"table-head-tool"],[1,"paginatorResultList",3,"length","hidePageSize","pageSize"],["paginatorContactList",""],[2,"height","90%","overflow","auto","position","absolute","width","100%"],["id","contact-list","matSort","","matSortDisableClear","",2,"width","100%",3,"dataSource"],["tableContactListSort","matSort"],["matColumnDef","filling"],["style","flex: initial;width: 60px;",3,"hide-for-mobile",4,"matHeaderCellDef"],["mat-cell","","style","flex: initial;width: 60px;",3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","firstname"],["mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","lastname"],[4,"matCellDef"],["matColumnDef","company"],["matColumnDef","formatedAddress"],["style","flex: 2;",3,"hide-for-mobile",4,"matHeaderCellDef"],["style","flex: 2;",3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","actions"],[4,"matHeaderCellDef"],["style","justify-content: flex-end;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor: pointer;",3,"routerLink",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["mat-subheader",""],["mat-list-item","","routerLink","/administration/contacts/list/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],["mat-list-item","",3,"click"],["color","primary","mat-list-icon","",1,"fa","fa-file-export"],["color","primary","mat-list-icon","",1,"fas","fa-file-import"],["mat-list-item","",3,"active","routerLink",4,"ngFor","ngForOf"],["mat-list-item","",3,"routerLink"],["color","primary","mat-list-icon",""],[1,"example-loading-shade"],[4,"ngIf"],[2,"flex","initial","width","60px"],["mat-cell","",2,"flex","initial","width","60px"],[3,"title"],["mat-sort-header",""],["mat-cell",""],[2,"flex","2"],[2,"justify-content","flex-end"],["mat-icon-button","","color","primary",3,"title","click",4,"ngIf"],["mat-icon-button","","color","accent",3,"title","click",4,"ngIf"],["mat-icon-button","","color","warn","data-toggle","modal","data-target","#changeDiffListDest",3,"title","click"],[1,"fa","fa-trash-alt","fa-2x"],["mat-icon-button","","color","primary",3,"title","click"],["aria-hidden","true",1,"fa","fa-pause","fa-2x"],["mat-icon-button","","color","accent",3,"title","click"],["aria-hidden","true",1,"fa","fa-check","fa-2x"],[2,"cursor","pointer",3,"routerLink"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,T2,22,13,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,F2,2,1,"div",9),n.Wb(14,"div",10),n.Wb(15,"div",11),n.Wb(16,"mat-form-field",12),n.Wb(17,"input",13,14),n.dc("click",(function(t){return t.stopPropagation()})),n.ic(19,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(20,"div",15),n.Rb(21,"mat-paginator",16,17),n.Vb(),n.Vb(),n.Wb(23,"div",18),n.Wb(24,"mat-table",19,20),n.Ub(26,21),n.Oc(27,L2,1,2,"mat-header-cell",22),n.Oc(28,Q2,3,8,"mat-cell",23),n.Tb(),n.Ub(29,24),n.Oc(30,N2,3,3,"mat-header-cell",25),n.Oc(31,z2,2,1,"mat-cell",26),n.Tb(),n.Ub(32,27),n.Oc(33,B2,3,3,"mat-header-cell",25),n.Oc(34,U2,2,1,"mat-cell",28),n.Tb(),n.Ub(35,29),n.Oc(36,$2,3,3,"mat-header-cell",25),n.Oc(37,H2,2,1,"mat-cell",28),n.Tb(),n.Ub(38,30),n.Oc(39,G2,3,5,"mat-header-cell",31),n.Oc(40,X2,2,3,"mat-cell",32),n.Tb(),n.Ub(41,33),n.Oc(42,q2,1,0,"mat-header-cell",34),n.Oc(43,J2,6,5,"mat-cell",35),n.Tb(),n.Oc(44,Z2,1,0,"mat-header-row",36),n.Oc(45,t3,1,1,"mat-row",37),n.Vb(),n.Wb(46,"div",38),n.Qc(47),n.ic(48,"translate"),n.Vb(),n.Vb(),n.Rb(49,"div",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.isLoadingResults),n.Db(4),n.oc("placeholder",n.jc(19,17,"lang.filterBy"))("formControl",e.searchContact),n.Db(4),n.oc("length",e.resultsLength)("hidePageSize",!0)("pageSize",10),n.Db(3),n.oc("dataSource",e.data),n.Db(20),n.oc("matHeaderRowDef",e.displayedColumnsContact),n.Db(1),n.oc("matRowDefColumns",e.displayedColumnsContact),n.Db(2),n.Tc(" ",e.resultsLength," ",n.jc(48,19,"lang.contactsAlt"),""))},directives:[I.e,I.f,Ot,We,P.t,Y.c,J.b,X.d,X.p,X.u,X.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,R.h,R.g,R.d,o.f,S.a,R.c,W.l,T.a,P.s,V.c,vt.h,vt.a,Fe.b,k.b,vt.j,vt.m,o.d],pipes:[g.d],styles:[".active[_ngcontent-%COMP%], .active[_ngcontent-%COMP%]:active, .active[_ngcontent-%COMP%]:focus, .active[_ngcontent-%COMP%]:hover{color:#135f7f;border-left:5px solid #135f7f;background:rgba(19,95,127,.14)}.paginatorResultList[_ngcontent-%COMP%] .mat-paginator-range-label{justify-content:flex-end;display:flex}.threshold_first[_ngcontent-%COMP%]{color:#e81c2b}.threshold_second[_ngcontent-%COMP%]{color:#f4891e}.threshold_third[_ngcontent-%COMP%]{color:#0aa34f}"]}),t})();class r3{constructor(t){this.http=t}getRepoIssues(t,e,i,n,a){return this.http.get(`${n}?limit=10&offset=${10*i}&order=${e}&orderBy=${t}&search=${a}`)}}let c3=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.data=i,this.dialogRef=n,this.notify=a,this.modalTitle=this.translate.instant("lang.confirmAction"),this.processMode="delete"}ngOnInit(){}setRedirectUser(t){this.redirectContact=t.id}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(q.a),n.Qb(q.h),n.Qb(D.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:29,vars:22,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],["redirectConfForm","ngForm"],[1,"modal-body"],["role","alert",1,"alert-message","alert-message-danger"],[1,"input-group"],["id","processMode","name","processMode","color","primary","required","",2,"display","inline-flex","flex-direction","column",3,"ngModel","ngModelChange"],["value","delete","color","primary"],["value","reaffect","color","primary"],["singleMode","","required","",3,"labelPlaceholder","labelList","routeDatas","targetSearchKey","triggerEvent",4,"ngIf"],["class","alert-message alert-message-info","role","alert",4,"ngIf"],[1,"divider-modal"],["mat-raised-button","","color","primary","type","submit",3,"disabled","click"],["color","","mat-raised-button","",1,"actions",3,"click"],["singleMode","","required","",3,"labelPlaceholder","labelList","routeDatas","targetSearchKey","triggerEvent"],["role","alert",1,"alert-message","alert-message-info"],[4,"ngIf"]],template:function(t,e){if(1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-dialog-content"),n.Wb(5,"form",null,2),n.Wb(7,"div",3),n.Wb(8,"div",4),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Wb(11,"div",5),n.Wb(12,"mat-radio-group",6),n.dc("ngModelChange",(function(t){return e.processMode=t})),n.Wb(13,"mat-radio-button",7),n.Qc(14),n.ic(15,"translate"),n.Vb(),n.Wb(16,"mat-radio-button",8),n.Qc(17),n.ic(18,"translate"),n.Vb(),n.Vb(),n.Oc(19,i3,3,9,"plugin-autocomplete",9),n.Oc(20,s3,3,2,"div",10),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Rb(21,"span",11),n.Wb(22,"mat-dialog-actions"),n.Wb(23,"button",12),n.dc("click",(function(){return e.dialogRef.close({contactId:e.redirectContact,processMode:e.processMode})})),n.Qc(24),n.ic(25,"translate"),n.Vb(),n.Wb(26,"button",13),n.dc("click",(function(){return e.dialogRef.close("")})),n.Qc(27),n.ic(28,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.zc(6);n.Db(2),n.Rc(n.jc(3,10,"lang.contactsReassign")),n.Db(7),n.Sc(" ",n.jc(10,12,"lang.contactLinkedToMails")," "),n.Db(3),n.oc("ngModel",e.processMode),n.Db(2),n.Sc(" ",n.jc(15,14,"lang.deleteContactwithtoutReassign")," "),n.Db(3),n.Sc(" ",n.jc(18,16,"lang.reaffectContactRedirect")," "),n.Db(2),n.oc("ngIf","reaffect"==e.processMode),n.Db(1),n.oc("ngIf",e.processMode),n.Db(3),n.oc("disabled",!t.form.valid||!e.redirectContact&&"reaffect"==e.processMode),n.Db(1),n.Rc(n.jc(25,18,"lang.delete")),n.Db(3),n.Rc(n.jc(28,20,"lang.cancel"))}},directives:[q.i,q.f,X.K,X.v,X.w,hc.b,X.F,X.u,X.x,hc.a,P.t,q.c,k.b,ii],pipes:[g.d],encapsulation:2}),t})();const l3=["snav2"],d3=["adminMenuTemplate"];function h3(t,e){if(1&t&&(n.Wb(0,"a",16),n.Rb(1,"mat-icon",17),n.Wb(2,"p",18),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Ib("active",t.current),n.oc("routerLink",t.route),n.Db(1),n.Fb(t.icon),n.Db(2),n.Sc(" ",t.label," ")}}function u3(t,e){if(1&t&&(n.Wb(0,"mat-nav-list"),n.Oc(1,h3,4,6,"a",15),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",t.subMenus)}}function p3(t,e){1&t&&(n.Rb(0,"div",19),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.noCustomFieldInfo"),n.Ec)}function b3(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",35),n.dc("click",(function(){n.Dc(t);const e=n.hc(2).$implicit;return n.hc().sortValues(e)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",36),n.Vb()}2&t&&n.oc("title",n.jc(1,1,"lang.orderValues"))}function f3(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field",37),n.Wb(1,"input",38),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.label=i})),n.ic(2,"translate"),n.Vb(),n.Wb(3,"button",39),n.dc("click",(function(){n.Dc(t);const i=e.index,a=n.hc(2).$implicit;return n.hc().removeValue(a,i)})),n.ic(4,"translate"),n.Rb(5,"mat-icon",40),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.oc("ngModel",t.label)("placeholder",n.jc(2,3,"lang.newValue")),n.Db(2),n.oc("title",n.jc(4,5,"lang.delete"))}}function m3(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",21),n.Wb(1,"mat-expansion-panel",28),n.Wb(2,"mat-expansion-panel-header"),n.Wb(3,"mat-panel-title",29),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Wb(6,"div",30),n.Wb(7,"div",31),n.Wb(8,"button",32),n.dc("click",(function(){n.Dc(t);const e=n.hc().index;return n.hc().addValue(e)})),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Wb(11,"div"),n.Oc(12,b3,3,3,"button",33),n.Vb(),n.Vb(),n.Wb(13,"div",21),n.Oc(14,f3,6,7,"mat-form-field",34),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit;n.Db(3),n.oc("matBadge",t.values.length),n.Db(1),n.Sc(" ",n.jc(5,5,"lang.valuesList")," "),n.Db(5),n.Sc(" ",n.jc(10,7,"lang.addValue"),""),n.Db(3),n.oc("ngIf",t.values.length>0),n.Db(2),n.oc("ngForOf",t.values)}}const g3=function(){return["select","radio","checkbox"]};function v3(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-expansion-panel"),n.Wb(1,"mat-expansion-panel-header"),n.Wb(2,"mat-panel-title",20),n.Qc(3),n.Vb(),n.Wb(4,"mat-panel-description"),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Vb(),n.Wb(7,"div",21),n.Wb(8,"mat-form-field"),n.Wb(9,"input",22),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.id=i})),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Wb(11,"mat-form-field"),n.Wb(12,"input",23),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.label=i})),n.ic(13,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Oc(14,m3,15,9,"div",24),n.Wb(15,"div",25),n.Wb(16,"button",26),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=e.index;return n.hc().updateCustomField(i,a)})),n.Qc(17),n.ic(18,"translate"),n.Vb(),n.Wb(19,"button",27),n.dc("click",(function(){n.Dc(t);const i=e.index;return n.hc().removeCustomField(i)})),n.Qc(20),n.ic(21,"translate"),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=e.index,a=n.hc();n.Db(3),n.Sc(" ",t.label," "),n.Db(2),n.Sc(" ",n.jc(6,12,"lang."+t.type+"Input")," "),n.Db(4),n.oc("ngModel",t.id)("placeholder",n.jc(10,14,"lang.technicalId"))("value",t.id),n.Db(3),n.oc("ngModel",t.label)("placeholder",n.jc(13,16,"lang.label"))("value",t.label),n.Db(2),n.oc("ngIf",n.uc(22,g3).indexOf(t.type)>-1),n.Db(2),n.oc("disabled",a.isModified(t,i)),n.Db(1),n.Rc(n.jc(18,18,"lang.update")),n.Db(3),n.Rc(n.jc(21,20,"lang.delete"))}}function _3(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-form-field",47),n.Rb(2,"textarea",48),n.ic(3,"translate"),n.Vb(),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(2),n.oc("placeholder",n.jc(3,1,"lang."+t.type+"Input"))}}function y3(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-form-field",47),n.Rb(2,"input",49),n.ic(3,"translate"),n.Vb(),n.Tb()),2&t){const t=n.hc().$implicit;n.Db(2),n.oc("placeholder",n.jc(3,1,"lang."+t.type+"Input"))}}function x3(t,e){if(1&t&&(n.Wb(0,"mat-option",52),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Tc(" ",n.jc(2,3,"lang.choice")," ",t," ")}}function C3(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-form-field",47),n.Wb(2,"mat-select",50),n.ic(3,"translate"),n.Oc(4,x3,3,5,"mat-option",51),n.Vb(),n.Vb(),n.Tb()),2&t){const t=n.hc().$implicit,e=n.hc();n.Db(2),n.oc("placeholder",n.jc(3,2,"lang."+t.type+"Input")),n.Db(2),n.oc("ngForOf",e.sampleIncrement)}}function O3(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"mat-form-field",47),n.Wb(2,"input",53),n.dc("click",(function(){return n.Dc(t),n.zc(6).open()})),n.ic(3,"translate"),n.Vb(),n.Rb(4,"mat-datepicker-toggle",54),n.Rb(5,"mat-datepicker",null,55),n.Vb(),n.Tb()}if(2&t){const t=n.zc(6),e=n.hc().$implicit;n.Db(2),n.oc("matDatepicker",t)("placeholder",n.jc(3,3,"lang."+e.type+"Input")),n.Db(2),n.oc("for",t)}}function D3(t,e){if(1&t&&(n.Wb(0,"mat-radio-button",52),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Tc(" ",n.jc(2,3,"lang.choice")," ",t," ")}}function w3(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-radio-group",56),n.Oc(2,D3,3,5,"mat-radio-button",51),n.Vb(),n.Tb()),2&t){const t=n.hc(2);n.Db(2),n.oc("ngForOf",t.sampleIncrement)}}function M3(t,e){if(1&t&&(n.Wb(0,"mat-list-option",62),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Tc(" ",n.jc(2,3,"lang.choice")," ",t," ")}}function k3(t,e){1&t&&(n.Wb(0,"mat-chip"),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.selectedValue")," "))}function S3(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"div",57),n.Wb(2,"mat-selection-list",58,59),n.Oc(4,M3,3,5,"mat-list-option",60),n.Vb(),n.Vb(),n.Wb(5,"mat-chip-list",61),n.Oc(6,k3,3,3,"mat-chip",11),n.Vb(),n.Tb()),2&t){const t=n.zc(3),e=n.hc(2);n.Db(4),n.oc("ngForOf",e.sampleIncrement),n.Db(2),n.oc("ngForOf",t.selectedOptions.selected)}}function I3(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",41),n.Wb(1,"div",42),n.Wb(2,"button",43),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().addCustomField(i)})),n.ic(3,"translate"),n.Rb(4,"mat-icon",44),n.Vb(),n.Vb(),n.Wb(5,"div",31),n.Wb(6,"div",45),n.Qc(7),n.Vb(),n.Oc(8,_3,4,3,"ng-container",46),n.Oc(9,y3,4,3,"ng-container",46),n.Oc(10,C3,5,4,"ng-container",46),n.Oc(11,O3,7,5,"ng-container",46),n.Oc(12,w3,3,1,"ng-container",46),n.Oc(13,S3,7,2,"ng-container",46),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(2),n.oc("title",n.jc(3,8,"lang.add")),n.Db(5),n.Sc("",t.label," :"),n.Db(1),n.oc("ngIf","string"===t.type),n.Db(1),n.oc("ngIf","integer"===t.type),n.Db(1),n.oc("ngIf","select"===t.type),n.Db(1),n.oc("ngIf","date"===t.type),n.Db(1),n.oc("ngIf","radio"===t.type),n.Db(1),n.oc("ngIf","checkbox"===t.type)}}let P3=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.notify=i,this.dialog=n,this.headerService=a,this.appService=s,this.sortPipe=o,this.viewContainerRef=r,this.loading=!0,this.subMenus=[{icon:"fa fa-book",route:"/administration/contacts",label:this.translate.instant("lang.contactsList"),current:!1},{icon:"fa fa-code",route:"/administration/contacts/contactsCustomFields",label:this.translate.instant("lang.customFieldsAdmin"),current:!0},{icon:"fa fa-cog",route:"/administration/contacts/contacts-parameters",label:this.translate.instant("lang.contactsParameters"),current:!1},{icon:"fa fa-users",route:"/administration/contacts/contacts-groups",label:this.translate.instant("lang.contactsGroups"),current:!1},{icon:"fas fa-magic",route:"/administration/contacts/duplicates",label:this.translate.instant("lang.duplicatesContactsAdmin"),current:!1}],this.customFieldsTypes=[{label:this.translate.instant("lang.stringInput"),type:"string"},{label:this.translate.instant("lang.integerInput"),type:"integer"},{label:this.translate.instant("lang.selectInput"),type:"select"},{label:this.translate.instant("lang.dateInput"),type:"date"},{label:this.translate.instant("lang.radioInput"),type:"radio"},{label:this.translate.instant("lang.checkboxInput"),type:"checkbox"}],this.customFields=[],this.customFieldsClone=[],this.incrementCreation=1,this.sampleIncrement=[1,2,3,4]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.customFields")+" "+this.translate.instant("lang.contacts")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.http.get("../rest/contactsCustomFields").pipe(Object(l.a)(t=>(t.customFields.forEach(t=>{t.values=t.values.map(t=>({label:t}))}),t)),Object(mt.a)(t=>{this.customFields=t.customFields,this.customFieldsClone=JSON.parse(JSON.stringify(this.customFields))}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}addCustomField(t){let e={};this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.add"),msg:this.translate.instant("lang.confirmAction")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),Object(mt.a)(()=>{e={label:this.translate.instant("lang.newField")+" "+this.incrementCreation,type:t.type,values:[]}}),p(t=>this.http.post("../rest/contactsCustomFields",e)),Object(mt.a)(t=>{e.id=t.id,this.customFields.push(e),this.notify.success(this.translate.instant("lang.customFieldAdded")),this.incrementCreation++}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}addValue(t){this.customFields[t].values.push({label:""})}removeValue(t,e){t.values.splice(e,1)}removeCustomField(t){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete")+' "'+this.customFields[t].label+'"',msg:this.translate.instant("lang.confirmAction")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete("../rest/contactsCustomFields/"+this.customFields[t].id)),Object(mt.a)(()=>{this.customFields.splice(t,1),this.notify.success(this.translate.instant("lang.customFieldDeleted"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}updateCustomField(t,e){t.values=t.values.filter((t,e,i)=>i.map(t=>t.label).indexOf(t.label)===e);const i=Object.assign({},t);if(i.values=t.values.map(t=>t.label),this.customFields.filter(t=>t.label===i.label).length>1)return this.notify.handleErrors(this.translate.instant("lang.customFieldAlreadyExists")),Object(c.a)(!1);this.http.put("../rest/contactsCustomFields/"+t.id,i).pipe(Object(mt.a)(()=>{this.customFieldsClone[e]=JSON.parse(JSON.stringify(t)),this.notify.success(this.translate.instant("lang.customFieldUpdated"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}sortValues(t){t.values=this.sortPipe.transform(t.values,"label")}isModified(t,e){return JSON.stringify(t)===JSON.stringify(this.customFieldsClone[e])||""===t.label}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(y.a),n.Qb(w.a),n.Qb(Wt.a),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(l3,!0),n.Kc(d3,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first))},features:[n.Cb([Wt.a])],decls:25,vars:17,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],[3,"label"],["class","alert-message alert-message-info","role","alert",3,"innerHTML",4,"ngIf"],[4,"ngFor","ngForOf"],["position","end","opened","",1,"col-md-4","col-sm-12","customFielsdPanel",3,"mode","fixedInViewport"],["snav2",""],["class","customFieldsTypesItem",4,"ngFor","ngForOf"],["mat-list-item","",3,"active","routerLink",4,"ngFor","ngForOf"],["mat-list-item","",3,"routerLink"],["color","primary","mat-list-icon",""],["mat-line",""],["role","alert",1,"alert-message","alert-message-info",3,"innerHTML"],["color","primary"],[1,"col-md-12"],["matInput","","name","id","disabled","",3,"ngModel","placeholder","value","ngModelChange"],["matInput","","name","label",3,"ngModel","placeholder","value","ngModelChange"],["class","col-md-12",4,"ngIf"],[1,"col-md-12","text-center"],["mat-raised-button","","color","primary",3,"disabled","click"],["mat-raised-button","","color","warn",3,"click"],["opened","",1,"customFieldValues"],["matBadgeSize","small",3,"matBadge"],[1,"actionValuesCustom"],[2,"flex","1"],["mat-raised-button","","color","primary",3,"click"],["mat-mini-fab","","color","default",3,"title","click",4,"ngIf"],["floatLabel","never",4,"ngFor","ngForOf"],["mat-mini-fab","","color","default",3,"title","click"],["color","primary",1,"fas","fa-sort-alpha-down",2,"height","auto"],["floatLabel","never"],["matInput","",3,"ngModel","placeholder","ngModelChange"],["color","warn","mat-icon-button","","matSuffix","",3,"title","click"],[1,"fa","fa-trash"],[1,"customFieldsTypesItem"],[1,"addCustomFieldTypeContainer"],["mat-icon-button","","color","primary",3,"title","click"],[1,"fas","fa-plus-circle","fa-2x"],[2,"color","rgba(0,0,0,0.54)"],[4,"ngIf"],["floatLabel","never",1,"input-form"],["matInput","","matTextareaAutosize","","matAutosizeMinRows","1","cdkAutosizeMaxRows","6","disabled","",3,"placeholder"],["type","number","matInput","","disabled","",3,"placeholder"],["disabled","",3,"placeholder"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["matInput","","disabled","",3,"matDatepicker","placeholder","click"],["matSuffix","",3,"for"],["picker",""],["color","primary","disabled","",1,"radio-form"],[1,"input-form","checkbox-form"],["disabled","",1,"div-list"],["sampleList",""],["checkboxPosition","before",3,"value",4,"ngFor","ngForOf"],[1,"checkbox-selected-list"],["checkboxPosition","before",3,"value"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,u3,2,1,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Wb(13,"mat-tab-group"),n.Wb(14,"mat-tab",9),n.ic(15,"translate"),n.Oc(16,p3,2,3,"div",10),n.Wb(17,"mat-accordion"),n.Oc(18,v3,22,23,"mat-expansion-panel",11),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(19,"mat-sidenav",12,13),n.Wb(21,"mat-tab-group"),n.Wb(22,"mat-tab",9),n.ic(23,"translate"),n.Oc(24,I3,14,10,"div",14),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(3),n.oc("label",n.jc(15,13,"lang.usableFields")),n.Db(2),n.oc("ngIf",0===e.customFields.length),n.Db(2),n.oc("ngForOf",e.customFields),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode()),n.Db(3),n.oc("label",n.jc(23,15,"lang.customFieldsTypesAvailable")),n.Db(2),n.oc("ngForOf",e.customFieldsTypes))},directives:[I.e,I.f,Ot,We,Te.c,Te.a,P.t,gt.a,P.s,I.d,R.h,R.d,o.f,S.a,R.c,W.l,gt.c,gt.g,gt.h,gt.f,Y.c,J.b,X.d,X.u,X.x,k.b,wt.a,Y.j,J.d,ee.a,W.p,ae.h,ae.j,ae.f,hc.b,hc.a,R.i,ze.d,R.f,ze.a],pipes:[g.d],styles:[".active[_ngcontent-%COMP%], .active[_ngcontent-%COMP%]:active, .active[_ngcontent-%COMP%]:focus, .active[_ngcontent-%COMP%]:hover{color:#135f7f;border-left:5px solid #135f7f;background:rgba(19,95,127,.14)}.mat-divider[_ngcontent-%COMP%]{padding-top:10px;padding-bottom:10px}.customFielsdPanel[_ngcontent-%COMP%], .customFielsdPanel[_ngcontent-%COMP%] .mat-tab-body-wrapper{padding-left:0}.mat-expansion-panel-header-description[_ngcontent-%COMP%]{flex-direction:row-reverse}.customFieldValues[_ngcontent-%COMP%]{box-shadow:none;border:1px solid rgba(0,0,0,.12)}.mat-expansion-panel[_ngcontent-%COMP%]{margin:5px}.mat-accordion[_ngcontent-%COMP%]{padding:5px}.mat-tab-body-content[_ngcontent-%COMP%], .mat-tab-body-wrapper[_ngcontent-%COMP%], .mat-tab-group[_ngcontent-%COMP%]{height:100%}.actionsCustomFields[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.actionValuesCustom[_ngcontent-%COMP%]{display:flex}.alert-message-info[_ngcontent-%COMP%]{margin-top:30px;max-width:100%}.addCustomFieldTypeContainer[_ngcontent-%COMP%]{justify-content:center;display:flex;align-items:center;width:60px}.customFieldsTypesItem[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.mat-badge-content[_ngcontent-%COMP%]{top:2px!important}",".banner[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:30px;border-radius:20px;border:1px solid #ccc;position:relative;padding:20px;width:100%}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;letter-spacing:2px;position:absolute;top:-18px;left:20px;padding:0;margin:0;color:#135f7f}.banner[_ngcontent-%COMP%] .title-divider[_ngcontent-%COMP%]{position:absolute;width:99%;z-index:-1;top:17px;background:#fff;height:1px}.banner[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:50%;padding-right:10px}.banner[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{font-size:16px}.fieldRow[_ngcontent-%COMP%]{display:flex;padding-top:10px;padding-bottom:10px}.fieldLabel[_ngcontent-%COMP%]{color:#4a4a4a}.fieldLabel[_ngcontent-%COMP%] .cdk-drag-handle[_ngcontent-%COMP%]{margin-right:10px}.fieldState[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;width:40px;justify-content:center;align-items:normal!important;padding-top:15px}.fieldState[_ngcontent-%COMP%] .fieldRequired[_ngcontent-%COMP%]{font-size:5px;color:#135f7f}.fieldState[_ngcontent-%COMP%] .fieldError[_ngcontent-%COMP%]{font-size:15px;color:#f99830}.fieldState[_ngcontent-%COMP%] .fieldFull[_ngcontent-%COMP%]{font-size:15px;color:green}.fieldInput[_ngcontent-%COMP%]{position:relative}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:13px;flex:1}@media (max-width:768px){.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%]{font-size:1em}}.fieldInput[_ngcontent-%COMP%], .fieldLabel[_ngcontent-%COMP%], .fieldState[_ngcontent-%COMP%]{align-items:center;display:flex}.input-form[_ngcontent-%COMP%]{font-size:13px;color:#666;width:500px}.input-form[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-label{top:15px;left:20px}.input-form[_ngcontent-%COMP%] .mat-form-field-infix{display:flex;padding-top:0;padding-bottom:5px}.input-form[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-13px}.input-form[_ngcontent-%COMP%] .mat-form-field-flex{background:#fff;height:40px;border-radius:10px;border:1px solid #135f7f}.input-form[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.search-select[_ngcontent-%COMP%] .mat-form-field-label-wrapper{top:-15px}.input-form.input-date[_ngcontent-%COMP%] .mat-form-field-flex{align-items:center}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-start-wrapper{flex:1}.input-form.input-date[_ngcontent-%COMP%] .mat-date-range-input-inner{color:#135f7f}.input-form-filled[_ngcontent-%COMP%]{color:#fff;width:500px;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-flex, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-flex{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.input-form-filled[_ngcontent-%COMP%]:hover .mat-form-field-label, .input-form-filled[_ngcontent-%COMP%]:hover .mat-select-placeholder, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-form-field-label, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-placeholder{color:#135f7f!important}.input-form-filled[_ngcontent-%COMP%]:hover .mat-select-arrow, .input-form-filled[aria-expanded=true][_ngcontent-%COMP%] .mat-select-arrow{color:rgba(19,95,127,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{color:#135f7f;padding-left:20px}.input-form-filled[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-value{text-align:left;font-weight:400}.input-form-filled[_ngcontent-%COMP%] .mat-select-value-text{padding-left:20px;color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-label{color:#fff;left:20px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-infix{padding-bottom:15px}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-flex{background:#135f7f;border-radius:30px;border:1px solid #fff}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-underline{display:none}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-suffix{margin-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow-wrapper{padding-right:20px}.input-form-filled[_ngcontent-%COMP%] .mat-select-arrow{color:hsla(0,0%,100%,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-select-placeholder{color:#fff}.input-form-filled[_ngcontent-%COMP%] .mat-list-option{color:rgba(0,0,0,.54)}.input-form-filled[_ngcontent-%COMP%] .mat-form-field-wrapper{padding:0}.input-form-filled[_ngcontent-%COMP%] textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:4px 0!important}.input-form-filled[_ngcontent-%COMP%] .mat-datepicker-toggle-default-icon{height:auto}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-input-element{cursor:not-allowed;padding-left:20px}.input-form.mat-form-field-disabled[_ngcontent-%COMP%] .mat-form-field-flex{cursor:not-allowed;border:1px dashed #353232}.opt-group[_ngcontent-%COMP%]{font-weight:700}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.button-form-primary[_ngcontent-%COMP%]{background:#fff;border:1px solid #135f7f;color:#135f7f;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary[_ngcontent-%COMP%]{width:auto}}.button-form-primary[_ngcontent-%COMP%]:hover, .button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{background:#135f7f!important;border:1px solid #fff!important;color:#fff!important;transition:all .1s}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-filled[_ngcontent-%COMP%]{background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding-left:20px;padding-right:20px;width:240px;height:45px;transition:all .1s}@media (max-width:768px){.button-form-primary-filled[_ngcontent-%COMP%]{width:auto}}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1;overflow:hidden;text-overflow:ellipsis;margin-right:10px}.button-form-primary-filled[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary-alt[_ngcontent-%COMP%]{font-size:13px;background:#135f7f;border:1px solid #fff;color:#fff;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}@media (max-width:768px){.button-form-primary-alt[_ngcontent-%COMP%]{font-size:1em}}.button-form-primary-alt[_ngcontent-%COMP%]:hover, .button-form-primary-alt[aria-expanded=true][_ngcontent-%COMP%]{background:#fff!important;border:1px solid #fff!important;color:#135f7f!important;transition:all .1s}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;align-items:center;justify-content:center;width:100%}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-label{display:flex;flex:1}.button-form-primary-alt[_ngcontent-%COMP%] .mat-button-wrapper .menu-icon{display:flex}.button-form-primary[aria-expanded=true][_ngcontent-%COMP%]{color:#135f7f;background:#fff;transition:all .1s;border:1px solid #135f7f}.button-form[_ngcontent-%COMP%]{background:#fff;color:#135f7f;border-radius:30px;padding:5px 20px;width:240px;transition:all .1s}.button-form[aria-expanded=true][_ngcontent-%COMP%]{transition:all .1s;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:30px;border-top-right-radius:30px} .menuForm{width:240px;border-radius:30px;border:1px solid #fff;min-height:auto} .menuForm .mat-menu-content{padding-top:0;padding-bottom:0} .menuForm .mat-menu-content .mat-menu-item{transition:all .1s;font-size:13px;color:#666}@media (max-width:768px){ .menuForm .mat-menu-content .mat-menu-item{font-size:1em}} .menuForm .mat-menu-content .mat-menu-item:hover{transition:all .1s;color:#fff;background:#1a80ab} .parametersFieldsMenu{min-height:auto}.div-list[_ngcontent-%COMP%]{padding:0;max-height:150px;overflow:auto}.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.div-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{font-size:1em}}.checkbox-form[_ngcontent-%COMP%]{width:100%;padding:0;border:1px solid #135f7f;border-radius:30px;overflow:hidden}.checkbox-selected-list[_ngcontent-%COMP%]{margin-top:10px;display:flex;justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip-list-wrapper{justify-content:center}.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:13px}@media (max-width:768px){.checkbox-selected-list[_ngcontent-%COMP%] .mat-chip[_ngcontent-%COMP%]{font-size:1em}}.radio-form[_ngcontent-%COMP%]{padding-left:20px;display:grid;grid-template-columns:repeat(2,1fr);width:100%}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%]{flex:1}.radio-form[_ngcontent-%COMP%] .mat-radio-button[_ngcontent-%COMP%] .mat-radio-label-content{font-weight:400;color:rgba(0,0,0,.54)}.radio-form[_ngcontent-%COMP%] .mat-radio-disabled[_ngcontent-%COMP%]{opacity:.5}.input-radio[_ngcontent-%COMP%] .mat-form-field-infix{overflow:auto;padding-top:0}.input-radio[_ngcontent-%COMP%] .mat-form-field-flex{height:auto}.input-radio[_ngcontent-%COMP%] .mat-form-field-label{top:0;font-size:12px}.disabled[_ngcontent-%COMP%]{opacity:.2}.customFieldRow[_ngcontent-%COMP%]{display:flex;padding-top:20px;padding-bottom:20px}.customFieldDrag[_ngcontent-%COMP%]{cursor:move;width:50px;display:flex;align-items:center;justify-content:center}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview[_ngcontent-%COMP%]{background:#fff;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.indexingModelsCustomFieldsList.cdk-drop-list-dragging[_ngcontent-%COMP%] .indexingModelsCustomFieldsList[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.advancedInput[_ngcontent-%COMP%]{flex-direction:column}.noMandatory[_ngcontent-%COMP%]{visibility:hidden}.checkboxInput[_ngcontent-%COMP%]{display:block}.categoryLabel[_ngcontent-%COMP%]{letter-spacing:1px;font-size:13px;color:#135f7f;font-weight:700}@media (max-width:768px){.categoryLabel[_ngcontent-%COMP%]{font-size:1em}}.textareaInput[_ngcontent-%COMP%] .mat-form-field{line-height:normal}.textareaInput[_ngcontent-%COMP%] .mat-input-element[_ngcontent-%COMP%]{padding:0;margin:0;color:#135f7f}.textareaInput[_ngcontent-%COMP%] .mat-form-field-flex{padding-left:20px;height:auto!important;min-height:40px!important}.textareaInput[_ngcontent-%COMP%] .mat-form-field-label{left:0}"]}),t})();const V3=["adminMenuTemplate"];function R3(t,e){if(1&t&&(n.Wb(0,"a",11),n.Rb(1,"mat-icon",12),n.Wb(2,"p",13),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Ib("active",t.current),n.oc("routerLink",t.route),n.Db(1),n.Fb(t.icon),n.Db(2),n.Sc(" ",t.label," ")}}function j3(t,e){if(1&t&&(n.Wb(0,"mat-nav-list"),n.Oc(1,R3,4,6,"a",10),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",t.subMenus)}}function A3(t,e){if(1&t){const t=n.Xb();n.Wb(0,"app-contact-form",14),n.dc("onSubmitEvent",(function(){return n.Dc(t),n.hc().goToList()})),n.Vb()}if(2&t){const t=n.hc();n.oc("creationMode",t.creationMode)("contactId",t.contactId)}}let W3=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.route=i,this.router=n,this.headerService=a,this.appService=s,this.dialog=o,this.viewContainerRef=r,this.loading=!1,this.creationMode=!0,this.subMenus=[{icon:"fa fa-book",route:"/administration/contacts",label:this.translate.instant("lang.contactsList"),current:!1},{icon:"fa fa-code",route:"/administration/contacts/contactsCustomFields",label:this.translate.instant("lang.customFieldsAdmin"),current:!1},{icon:"fa fa-cog",route:"/administration/contacts/contacts-parameters",label:this.translate.instant("lang.contactsParameters"),current:!1},{icon:"fa fa-users",route:"/administration/contacts/contacts-groups",label:this.translate.instant("lang.contactsGroups"),current:!1},{icon:"fas fa-magic",route:"/administration/contacts/duplicates",label:this.translate.instant("lang.duplicatesContactsAdmin"),current:!1}],this.contactId=null}ngOnInit(){this.loading=!0,this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.route.params.subscribe(t=>{void 0===t.id?(this.headerService.setHeader(this.translate.instant("lang.contactCreation")),this.creationMode=!0,this.loading=!1):(this.headerService.setHeader(this.translate.instant("lang.contactModification")),this.creationMode=!1,this.contactId=t.id,this.loading=!1)})}goToList(){this.router.navigate(["/administration/contacts"])}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(y.a),n.Qb(w.a),n.Qb(q.b),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Kc(V3,!0),2&t&&n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first)},decls:14,vars:7,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],[3,"creationMode","contactId","onSubmitEvent",4,"ngIf"],["mat-list-item","",3,"active","routerLink",4,"ngFor","ngForOf"],["mat-list-item","",3,"routerLink"],["color","primary","mat-list-icon",""],["mat-line",""],[3,"creationMode","contactId","onSubmitEvent"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,j3,2,1,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,A3,1,2,"app-contact-form",9),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,R.h,P.s,R.d,o.f,S.a,R.c,W.l,El],styles:[".active[_ngcontent-%COMP%], .active[_ngcontent-%COMP%]:active, .active[_ngcontent-%COMP%]:focus, .active[_ngcontent-%COMP%]:hover{color:#135f7f;border-left:5px solid #135f7f;background:rgba(19,95,127,.14)}"]}),t})();const T3=["adminMenuTemplate"];function E3(t,e){1&t&&(n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",29),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",30),n.Rb(5,"mat-icon",31),n.Wb(6,"p",32),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,2,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,4,"lang.add")," "))}function F3(t,e){1&t&&(n.Wb(0,"mat-header-cell",33),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.label")))}function L3(t,e){if(1&t&&(n.Wb(0,"mat-cell",34),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.label," ")}}function Q3(t,e){1&t&&(n.Wb(0,"mat-header-cell",33),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.description")))}function N3(t,e){if(1&t&&(n.Wb(0,"mat-cell",34),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.description," ")}}function z3(t,e){1&t&&n.Rb(0,"mat-header-cell")}function B3(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",35),n.Wb(1,"button",36),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc();return i.stopPropagation(),s.deleteTag(a)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",37),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.oc("title",n.jc(2,1,"lang.delete")))}function U3(t,e){1&t&&n.Rb(0,"mat-header-row")}function $3(t,e){1&t&&n.Rb(0,"mat-row",38),2&t&&n.qc("routerLink","/administration/tags/",e.$implicit.id,"")}let H3=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.dialog=s,this.functions=o,this.adminService=r,this.viewContainerRef=c,this.loading=!0,this.resultsLength=0,this.displayedColumns=["label","description","actions"],this.filterColumns=["label","description"]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.tags")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loadList()}loadList(){this.loading=!0,this.http.get("../rest/tags").pipe(Object(mt.a)(t=>{this.resultsLength=t.tags.length,setTimeout(()=>{this.adminService.setDataSource("admin_tag",t.tags,this.sort,this.paginator,this.filterColumns)},0)}),Object(Xt.a)(()=>this.loading=!1)).subscribe()}deleteTag(t){this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:`${this.translate.instant("lang.delete")} "${t.label}"`,msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete("../rest/tags/"+t.id)),Object(mt.a)(()=>{this.loadList(),this.notify.success(this.translate.instant("lang.tagDeleted"))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(q.b),n.Qb(_t.a),n.Qb(OL),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(T3,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:38,vars:20,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],[1,"table-head"],[1,"table-head-result"],[2,"font-size","13px"],["matInput","",3,"formControl","placeholder"],[1,"table-head-tool"],[3,"length","hidePageSize","pageSize"],["paginator",""],[2,"height","90%","overflow","auto","position","absolute","width","100%"],["id","contact-list","matSort","","matSortDisableClear","",2,"width","100%",3,"dataSource"],["tableContactListSort","matSort"],["matColumnDef","label"],["mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","description"],["matColumnDef","actions"],[4,"matHeaderCellDef"],["style","justify-content: flex-end;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor: pointer;",3,"routerLink",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","display","flex","justify-content","end","align-items","center","padding-left","20px"],["mat-subheader",""],["mat-list-item","","routerLink","/administration/tags/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],["mat-sort-header",""],["mat-cell",""],[2,"justify-content","flex-end"],["mat-icon-button","","color","warn",3,"title","click"],[1,"fa","fa-trash-alt","fa-2x"],[2,"cursor","pointer",3,"routerLink"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,E3,9,6,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Wb(13,"div",9),n.Wb(14,"div",10),n.Wb(15,"mat-form-field",11),n.Rb(16,"input",12),n.ic(17,"translate"),n.Vb(),n.Vb(),n.Wb(18,"div",13),n.Rb(19,"mat-paginator",14,15),n.Vb(),n.Vb(),n.Wb(21,"div",16),n.Wb(22,"mat-table",17,18),n.Ub(24,19),n.Oc(25,F3,3,3,"mat-header-cell",20),n.Oc(26,L3,2,1,"mat-cell",21),n.Tb(),n.Ub(27,22),n.Oc(28,Q3,3,3,"mat-header-cell",20),n.Oc(29,N3,2,1,"mat-cell",21),n.Tb(),n.Ub(30,23),n.Oc(31,z3,1,0,"mat-header-cell",24),n.Oc(32,B3,4,3,"mat-cell",25),n.Tb(),n.Oc(33,U3,1,0,"mat-header-row",26),n.Oc(34,$3,1,1,"mat-row",27),n.Vb(),n.Wb(35,"div",28),n.Qc(36),n.ic(37,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(5),n.pc("placeholder",n.jc(17,16,"lang.filterBy")),n.oc("formControl",e.adminService.getFilterField()),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(3),n.oc("dataSource",e.adminService.getDataSource()),n.Db(11),n.oc("matHeaderRowDef",e.displayedColumns),n.Db(1),n.oc("matRowDefColumns",e.displayedColumns),n.Db(2),n.Tc(" ",e.resultsLength," ",n.jc(37,18,"lang.tags"),""))},directives:[I.e,I.f,Ot,We,Y.c,J.b,X.d,X.u,X.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,R.h,R.g,R.d,o.f,S.a,R.c,W.l,vt.h,Fe.b,vt.a,k.b,vt.j,vt.m,o.d],pipes:[g.d],encapsulation:2}),t})();const G3=["linkedTagInput"];function X3(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",31),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).remove(i)}))("removed",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).remove(i)})),n.Qc(1),n.Rb(2,"mat-icon",32),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.Db(1),n.Sc(" ",i.getTagLabel(t)," ")}}function q3(t,e){if(1&t&&(n.Wb(0,"mat-option",33),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.oc("value",t)("disabled",i.isSelected(t)||t.id==i.id),n.Db(1),n.Sc(" ",t.label," ")}}function K3(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"mat-chip-list",null,24),n.Oc(3,X3,3,1,"mat-chip",25),n.Rb(4,"input",26,27),n.ic(6,"translate"),n.Vb(),n.Wb(7,"mat-autocomplete",28,29),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc().selected(e)})),n.Oc(9,q3,2,3,"mat-option",30),n.ic(10,"async"),n.Vb(),n.Vb()}if(2&t){const t=n.zc(2),e=n.zc(8),i=n.hc();n.Db(3),n.oc("ngForOf",i.tag.links.value),n.Db(1),n.oc("placeholder",n.jc(6,6,"lang.linkedTags"))("formControl",i.myControl)("matAutocomplete",e)("matChipInputFor",t),n.Db(5),n.oc("ngForOf",n.jc(10,8,i.filteredOptions))}}function Y3(t,e){1&t&&(n.Wb(0,"div",34),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.cannotMergeTags")," "))}function J3(t,e){if(1&t){const t=n.Xb();n.Wb(0,"plugin-select-search",35),n.dc("afterOpened",(function(){return n.Dc(t),n.hc().getTags()}))("afterSelected",(function(e){return n.Dc(t),n.hc().mergeTag(e)})),n.ic(1,"translate"),n.ic(2,"translate"),n.Vb()}if(2&t){const t=n.hc();n.oc("label",n.jc(1,4,"lang.mergeTagWith"))("placeholderLabel",n.jc(2,6,"lang.mergeTagWith"))("formControlSelect",t.selectMergeTag)("datas",t.tags)}}let Z3=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this.translate=t,this.http=e,this.route=i,this.router=n,this.notify=a,this.headerService=s,this.appService=o,this.functions=r,this.dialog=c,this.loading=!1,this.loadingTags=!0,this.advancedMode=!1,this.tags=[],this.tag={label:new X.i({value:"",disabled:!1},[X.I.required]),description:new X.i({value:"",disabled:!1}),parentId:new X.i({value:"",disabled:!1}),links:new X.i({value:[],disabled:!1}),usage:new X.i({value:"",disabled:!1}),canMerge:new X.i({value:!0,disabled:!1}),countResources:new X.i({value:0,disabled:!1})},this.myControl=new X.i,this.selectMergeTag=new X.i({value:"",disabled:!1}),this.tagFormGroup=new X.l(this.tag),this.currTagChildren=[]}ngOnInit(){this.loading=!0,this.route.params.subscribe(t=>Object(r.a)(this,void 0,void 0,(function*(){this.id=t.id,yield this.getTags(),void 0===t.id?(this.headerService.setHeader(this.translate.instant("lang.tagCreation")),this.creationMode=!0,this.loading=!1):(this.creationMode=!1,this.http.get("../rest/tags/"+this.id).pipe(Object(mt.a)(t=>{Object.keys(this.tag).forEach(e=>{this.functions.empty(t[e])||this.tag[e].setValue(t[e])}),this.functions.empty(this.tag.parentId.value)||this.toggleAdvancedTag(),this.headerService.setHeader(this.translate.instant("lang.tagModification"),this.tag.label.value)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe())})))}onSubmit(){this.creationMode?this.createTag():this.updateTag()}formatTag(){const t={};return Object.keys(this.tag).forEach(e=>{t[e]=this.tag[e].value}),t}createTag(){this.http.post("../rest/tags",this.formatTag()).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.tagAdded")),this.router.navigate(["/administration/tags"])}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}updateTag(){this.http.put("../rest/tags/"+this.id,this.formatTag()).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.tagUpdated")),this.router.navigate(["/administration/tags"])}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}getTags(){return new Promise(t=>{this.http.get("../rest/tags").pipe(Object(mt.a)(e=>{this.tags=e.tags.map(t=>({id:t.id,label:t.label,parentId:t.parentId,countResources:t.countResources,disabled:t.id==this.id})),t(!0)}),Object(Xt.a)(()=>this.loadingTags=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}mergeTag(t){this.selectMergeTag.reset();const e=this.tags.filter(e=>e.id===t)[0],i=`${this.translate.instant("lang.confirmAction")}<br/><br/>${this.translate.instant("lang.theTag")}<b> "${this.tag.label.value}" </b>${this.translate.instant("lang.willBeDeletedAndMerged")}<b> "${e.label}"</b><br/><br/>${this.translate.instant("lang.willBeTransferredToNewTag")}<b> "${e.label}"</b> : <b>${this.tag.countResources.value}</b>`;this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:`${this.translate.instant("lang.mergeWith")} "${e.label}"`,msg:i}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.put("../rest/mergeTags",{idMaster:e.id,idMerge:this.id})),Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.tagMerged")),this.router.navigate(["/administration/tags/"+e.id])}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}toggleAdvancedTag(){return Object(r.a)(this,void 0,void 0,(function*(){this.advancedMode=!this.advancedMode,this.getTagsTree(),this.filteredOptions=this.myControl.valueChanges.pipe(Object(Qe.a)(null),Object(l.a)(t=>t?this._filter(t):this.tags.slice()))}))}_filter(t){let e=t;return"string"==typeof t&&(e=t.toLowerCase()),this.tags.filter(t=>t.label.toLowerCase().indexOf(e)>-1)}isSelected(t){return this.tag.links.value.filter(e=>e==t.id).length>0}remove(t){const e=this.tag.links.value.indexOf(t);e>=0&&this.tag.links.value.splice(e,1)}selected(t){const e=this.tag.links.value;e.push(t.option.value.id),this.tag.links.setValue(e),this.linkedTagInput.nativeElement.value="",this.myControl.setValue(null)}getTagsTree(){this.functions.empty(this.id)||this.getChildrens(this.id);const t=this.tags.map(t=>({id:t.id,text:t.label,parent:this.functions.empty(t.parentId)?"#":t.parentId,state:{opened:this.tag.parentId.value==t.id,selected:this.tag.parentId.value==t.id,disabled:this.currTagChildren.indexOf(t.id.toString())>-1}}));setTimeout(()=>{$("#jstree").on("select_node.jstree",(t,e)=>{this.tag.parentId.setValue(parseInt(e.node.id))}).on("deselect_node.jstree",(t,e)=>{this.tag.parentId.setValue(null)}).jstree({checkbox:{deselect_all:!0,three_state:!1},core:{force_text:!0,themes:{name:"proton",responsive:!0},multiple:!1,data:t},plugins:["checkbox","search","sort"]});let e=!1;$("#jstree_search").keyup((function(){e&&clearTimeout(e),e=setTimeout((function(){const t=$("#jstree_search").val();$("#jstree").jstree(!0).search(t)}),250)}))},0)}getChildrens(t){this.currTagChildren.push(t.toString()),this.tags.filter(e=>e.parentId==t).forEach(t=>{this.getChildrens(t.id)})}getTagLabel(t){return this.tags.filter(e=>e.id==t)[0].label}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a),n.Qb(q.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&n.Xc(G3,!0),2&t&&n.yc(i=n.ec())&&(e.linkedTagInput=i.first)},decls:44,vars:39,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],[2,"height","90%","overflow","auto","position","absolute","width","100%"],[2,"padding","20px",3,"ngSubmit"],["matInput","","type","text","maxlength","128","required","",3,"formControl","placeholder"],["matInput","","type","text",3,"formControl","placeholder"],[4,"ngIf"],["class","alert-message alert-message-danger","style","min-width: 100%;",4,"ngIf"],["style","width:100%;",3,"label","placeholderLabel","formControlSelect","datas","afterOpened","afterSelected",4,"ngIf"],[1,"text-center"],["mat-raised-button","","color","primary",3,"disabled"],["type","button","mat-raised-button","","color","default",3,"click"],["fixedTopGap","56","position","end",2,"overflow-x","hidden","width","450px",3,"mode","fixedInViewport","opened"],["snav2",""],["mat-subheader",""],[2,"padding","10px"],["matInput","","id","jstree_search","name","jstree_search","type","text",3,"placeholder"],["id","jstree"],["chipList",""],["style","cursor: pointer;",3,"click","removed",4,"ngFor","ngForOf"],[3,"placeholder","formControl","matAutocomplete","matChipInputFor"],["linkedTagInput",""],[3,"optionSelected"],["auto","matAutocomplete"],[3,"value","disabled",4,"ngFor","ngForOf"],[2,"cursor","pointer",3,"click","removed"],["matChipRemove","",1,"fa","fa-times-circle"],[3,"value","disabled"],[1,"alert-message","alert-message-danger",2,"min-width","100%"],[2,"width","100%",3,"label","placeholderLabel","formControlSelect","datas","afterOpened","afterSelected"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Wb(11,"div",8),n.Wb(12,"form",9),n.dc("ngSubmit",(function(){return e.onSubmit()})),n.Wb(13,"mat-form-field"),n.Rb(14,"input",10),n.ic(15,"translate"),n.Vb(),n.Wb(16,"mat-form-field"),n.Rb(17,"textarea",11),n.ic(18,"translate"),n.Vb(),n.Wb(19,"mat-form-field"),n.Rb(20,"input",11),n.ic(21,"translate"),n.Vb(),n.Oc(22,K3,11,10,"mat-form-field",12),n.Oc(23,Y3,3,3,"div",13),n.Oc(24,J3,3,8,"plugin-select-search",14),n.Wb(25,"div",15),n.Wb(26,"button",16),n.Qc(27),n.ic(28,"translate"),n.Vb(),n.Wb(29,"button",17),n.dc("click",(function(){return e.toggleAdvancedTag()})),n.Qc(30),n.ic(31,"translate"),n.ic(32,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(33,"mat-sidenav",18,19),n.Wb(35,"mat-list"),n.Wb(36,"h3",20),n.Qc(37),n.ic(38,"translate"),n.Vb(),n.Wb(39,"div",21),n.Wb(40,"mat-form-field"),n.Rb(41,"input",22),n.ic(42,"translate"),n.Vb(),n.Rb(43,"div",23),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(5),n.oc("formControl",e.tag.label)("placeholder",n.jc(15,23,"lang.label")),n.Db(3),n.oc("formControl",e.tag.description)("placeholder",n.jc(18,25,"lang.description")),n.Db(3),n.oc("formControl",e.tag.usage)("placeholder",n.jc(21,27,"lang.usage")),n.Db(2),n.oc("ngIf",e.advancedMode),n.Db(1),n.oc("ngIf",!e.creationMode&&!e.tag.canMerge.value),n.Db(1),n.oc("ngIf",!e.loadingTags&&e.tag.canMerge.value&&!e.creationMode),n.Db(2),n.oc("disabled",!e.tagFormGroup.valid),n.Db(1),n.Rc(n.jc(28,29,"lang.validate")),n.Db(3),n.Sc(" ",e.advancedMode?n.jc(31,31,"lang.defaultMode"):n.jc(32,33,"lang.advancedMode")," "),n.Db(3),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",e.advancedMode),n.Db(4),n.Sc("",n.jc(38,35,"lang.selectParentTag")," :"),n.Db(4),n.pc("placeholder",n.jc(42,37,"lang.searchTag")))},directives:[I.e,I.f,Ot,We,X.K,X.v,X.w,Y.c,J.b,X.d,X.p,X.F,X.u,X.j,P.t,k.b,I.d,R.a,R.g,ze.d,P.s,Ne.d,ze.c,Ne.a,ze.a,S.a,ze.e,W.p,fr],pipes:[g.d,P.b],encapsulation:2}),t})();const t4=["snav2"],e4=["maarchTree"];function i4(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Vb())}const n4=function(t){return[t]};function a4(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",17),n.Wb(1,"form",18,19),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Wb(3,"mat-form-field"),n.Wb(4,"input",20),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().alfresco.label=e})),n.ic(5,"translate"),n.ic(6,"translate"),n.Vb(),n.Vb(),n.Wb(7,"div",21),n.Wb(8,"div",22),n.Wb(9,"div",23),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Wb(12,"div",24),n.Wb(13,"mat-form-field"),n.Wb(14,"input",25),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().alfresco.account.id=e})),n.ic(15,"translate"),n.ic(16,"translate"),n.Vb(),n.Vb(),n.Wb(17,"mat-form-field"),n.Wb(18,"input",26),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().alfresco.account.password=e})),n.ic(19,"translate"),n.ic(20,"translate"),n.ic(21,"translate"),n.ic(22,"translate"),n.Vb(),n.Wb(23,"mat-icon",27),n.dc("click",(function(){n.Dc(t);const e=n.hc();return e.hidePassword=!e.hidePassword})),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(24,"div",28),n.Wb(25,"div",23),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Wb(28,"mat-form-field"),n.Wb(29,"input",29),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().alfresco.rootFolder=e})),n.ic(30,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(31,"div",30),n.Wb(32,"button",31),n.dc("click",(function(){return n.Dc(t),n.hc().checkAccount()})),n.Qc(33),n.ic(34,"translate"),n.Vb(),n.Wb(35,"button",32),n.Qc(36),n.ic(37,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(2),e=n.hc();n.Db(4),n.pc("title",n.jc(5,20,"lang.label")),n.pc("placeholder",n.jc(6,22,"lang.label")),n.oc("ngModel",e.alfresco.label),n.Db(6),n.Sc(" ",n.jc(11,24,"lang.alfrescoAccount")," "),n.Db(4),n.pc("title",n.jc(15,26,"lang.id")),n.pc("placeholder",n.jc(16,28,"lang.id")),n.oc("ngModel",e.alfresco.account.id),n.Db(4),n.oc("ngModel",e.alfresco.account.password)("required",e.creationMode)("title",e.creationMode?n.jc(19,30,"lang.password"):n.jc(20,32,"lang.changePassword"))("type",e.hidePassword?"password":"text")("placeholder",e.creationMode?n.jc(21,34,"lang.password"):n.jc(22,36,"lang.changePassword")),n.Db(5),n.oc("ngClass",n.vc(46,n4,e.hidePassword?"fa-eye-slash":"fa-eye")),n.Db(3),n.Sc(" ",n.jc(27,38,"lang.rootFolder")," "),n.Db(3),n.oc("ngModel",e.alfresco.rootFolder)("title",n.jc(30,40,"lang.id")),n.Db(3),n.oc("disabled",e.functionsService.empty(e.alfresco.account.id)||e.functionsService.empty(e.alfresco.account.password)&&e.creationMode),n.Db(1),n.Rc(n.jc(34,42,"lang.test")),n.Db(2),n.oc("disabled",!t.valid||!e.validAccount()),n.Db(1),n.Rc(n.jc(37,44,"lang.validate"))}}let s4=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.route=i,this.router=n,this.notify=a,this.headerService=s,this.appService=o,this.functionsService=r,this.loading=!1,this.creationMode=!0,this.entities=[],this.availableEntities=[],this.alfresco={id:0,label:"",account:{id:"",password:""},rootFolder:null,linkedEntities:[]},this.hidePassword=!0,this.alfrescoTreeLoaded=!1}ngOnInit(){this.loading=!1,this.route.params.subscribe(t=>Object(r.a)(this,void 0,void 0,(function*(){void 0===t.id?(this.headerService.setHeader(this.translate.instant("lang.alfrescoCreation")),this.creationMode=!0):(this.headerService.setHeader(this.translate.instant("lang.alfrescoModification")),this.alfresco.id=t.id,this.creationMode=!1),yield this.getEntities(),yield this.getAvailableEntities(),yield this.initAccount(),this.loading=!1})))}onSubmit(){this.creationMode?this.createAccount():this.updateAccount()}createAccount(){this.http.post("../rest/alfresco/accounts",this.formatData()).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.accountAdded")),this.router.navigate(["/administration/alfresco"])}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}updateAccount(){this.http.put("../rest/alfresco/accounts/"+this.alfresco.id,this.formatData()).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.accountUpdated")),this.router.navigate(["/administration/alfresco"])}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}formatData(){const t={label:this.alfresco.label,login:this.alfresco.account.id,nodeId:this.alfresco.rootFolder,entities:this.maarchTree.getSelectedNodes().map(t=>t.id)};return this.functionsService.empty(this.alfresco.account.password)||(t.password=this.alfresco.account.password),t}getAvailableEntities(){return new Promise((t,e)=>{this.http.get("../rest/alfresco/availableEntities").pipe(Object(mt.a)(e=>{this.availableEntities=e.availableEntities,t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}getEntities(){return new Promise((t,e)=>{this.http.get("../rest/entities").pipe(Object(l.a)(t=>(t.entities=t.entities.map(t=>({text:t.entity_label,icon:t.icon,parent_id:t.parentSerialId,id:t.serialId,state:{opened:!0}})),t.entities)),Object(mt.a)(e=>{this.entities=e,t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}initAccount(){return new Promise((t,e)=>{this.creationMode?this.http.get("../rest/entities").pipe(Object(l.a)(t=>(t.entities=t.entities.map(t=>({text:t.entity_label,icon:t.icon,parent_id:t.parentSerialId,id:t.serialId,state:{opened:!0}})),t.entities)),Object(mt.a)(e=>{this.entities=e,this.entities.forEach(t=>{t.state.disabled=!(this.availableEntities.indexOf(+t.id)>-1)}),setTimeout(()=>{this.initEntitiesTree(this.entities)},0),t(!0)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe():this.http.get("../rest/alfresco/accounts/"+this.alfresco.id).pipe(Object(mt.a)(e=>{this.alfresco={id:e.id,label:e.label,account:{id:e.login},rootFolder:e.nodeId,linkedEntities:e.entities},this.entities.forEach(t=>{t.state.disabled=!(this.availableEntities.indexOf(+t.id)>-1),this.alfresco.linkedEntities.indexOf(+t.id)>-1&&(t.state.disabled=!1,t.state.selected=!0)}),setTimeout(()=>{this.initEntitiesTree(this.entities)},0),t(!0)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()})}initEntitiesTree(t){this.maarchTree.initData(t)}validAccount(){return!this.functionsService.empty(this.alfresco.rootFolder)&&0!==this.maarchTree.getSelectedNodes().length}checkAccount(){let t={};t=this.creationMode?{login:this.alfresco.account.id,password:this.alfresco.account.password,nodeId:this.alfresco.rootFolder}:{accountId:this.alfresco.id,login:this.alfresco.account.id,password:this.alfresco.account.password,nodeId:this.alfresco.rootFolder},this.http.post("../rest/alfresco/checkAccounts",t).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.testSucceeded"))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-alfresco"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(t4,!0),n.Kc(e4,!0)),2&t&&(n.yc(i=n.ec())&&(e.sidenavRight=i.first),n.yc(i=n.ec())&&(e.maarchTree=i.first))},decls:22,vars:14,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["fixedTopGap","56","position","end",2,"overflow-x","hidden","width","400px",3,"mode","fixedInViewport","opened"],["snav2",""],["mat-subheader",""],[2,"padding","10px"],["maarchTree",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[3,"ngSubmit"],["alfrescoForm","ngForm"],["matInput","","required","","name","label","id","label","type","text","maxlength","64",3,"ngModel","title","placeholder","ngModelChange"],[1,"form-group",2,"flex-direction","row","flex-wrap","wrap"],[1,"formType","ratio-2","col-sm-12"],[1,"formType-title"],[2,"width","100%","text-align","center"],["matInput","","required","","name","accountId","id","accountId","type","text",3,"ngModel","title","placeholder","ngModelChange"],["matInput","","name","password","id","password",3,"ngModel","required","title","type","placeholder","ngModelChange"],["color","primary","matSuffix","",1,"fa","fa-2x",2,"cursor","pointer",3,"ngClass","click"],[1,"formType","ratio-1","col-sm-12"],["matInput","","required","","name","rootFolder","id","rootFolder","type","text","placeholder","D\xe9p\xf4t racine",3,"ngModel","title","ngModelChange"],[1,"col-sm-12","text-center",2,"padding","10px"],["mat-raised-button","","type","button","color","primary",3,"disabled","click"],["mat-raised-button","","type","submit","color","primary",3,"disabled"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,i4,2,0,"div",8),n.Oc(12,a4,38,48,"mat-card",9),n.Vb(),n.Vb(),n.Vb(),n.Wb(13,"mat-sidenav",10,11),n.Wb(15,"mat-list"),n.Wb(16,"h3",12),n.Qc(17),n.ic(18,"translate"),n.Vb(),n.Wb(19,"div",13),n.Rb(20,"app-maarch-flat-tree",null,14),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",!e.appService.getViewMode()),n.Db(4),n.Rc(n.jc(18,12,"lang.chooseEntityAssociationAccount")))},directives:[I.e,I.f,Ot,We,P.t,I.d,R.a,R.g,cQ,V.c,K.a,X.K,X.v,X.w,Y.c,J.b,X.d,X.F,X.p,X.u,X.x,S.a,Y.j,P.q,k.b],pipes:[g.d],styles:[".form-group[_ngcontent-%COMP%], .formType[_ngcontent-%COMP%]{display:flex}.formType[_ngcontent-%COMP%]{align-items:center;margin:10px;border-radius:4px;border:1px solid #ccc;position:relative;padding:10px}.formType-title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:-7px;left:10px;padding:0;margin:0;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-slide-toggle-label{color:#666;font-weight:700}.formType[_ngcontent-%COMP%] .mat-radio-button, .formType[_ngcontent-%COMP%] .mat-slide-toggle{opacity:.5;color:#666;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.formType[_ngcontent-%COMP%] .mat-checked, .formType[_ngcontent-%COMP%] .mat-radio-checked{opacity:1;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-checked .mat-slide-toggle-label{color:#135f7f}.formType[_ngcontent-%COMP%] .mat-form-field-suffix{color:#f99830;font-size:15px;top:0}.ratio-1[_ngcontent-%COMP%]{flex:1}.ratio-2[_ngcontent-%COMP%]{flex:1;align-items:baseline}"]}),t})();const o4=["adminMenuTemplate"];function r4(t,e){1&t&&(n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",11),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",12),n.Rb(5,"mat-icon",13),n.Wb(6,"p",14),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,2,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,4,"lang.add")," "))}function c4(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Vb())}function l4(t,e){if(1&t&&(n.Wb(0,"mat-header-cell",40),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc(2);n.Ib("hide-for-mobile",t.appService.getViewMode()),n.Db(1),n.Rc(n.jc(2,3,"lang.label"))}}function d4(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Ib("hide-for-mobile",i.appService.getViewMode()),n.Db(1),n.Sc(" ",t.label," ")}}function h4(t,e){1&t&&(n.Wb(0,"mat-header-cell",41),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.linkedEntities")))}function u4(t,e){if(1&t&&(n.Wb(0,"span",44),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Rc(t)}}function p4(t,e){if(1&t&&(n.Wb(0,"mat-cell",42),n.Wb(1,"div"),n.Oc(2,u4,2,1,"span",43),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(2),n.oc("ngForOf",t.entitiesLabel)}}function b4(t,e){1&t&&n.Rb(0,"mat-header-cell",45)}function f4(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",46),n.Wb(1,"button",47),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.deleteAccount(a.id)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",48),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.pc("matTooltip",n.jc(2,1,"lang.delete")))}function m4(t,e){1&t&&n.Rb(0,"mat-header-row")}function g4(t,e){1&t&&(n.Rb(0,"mat-row",49),n.ic(1,"translate")),2&t&&(n.qc("routerLink","/administration/alfresco/",e.$implicit.id,""),n.pc("matTooltip",n.jc(1,2,"lang.view")))}function v4(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",17),n.Wb(1,"div",18),n.Wb(2,"div",19),n.Wb(3,"mat-form-field",20),n.Wb(4,"mat-label"),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Wb(7,"input",21),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().alfrescoUrl=e}))("blur",(function(){return n.Dc(t),n.hc().saveUrl()})),n.Vb(),n.Vb(),n.Vb(),n.Wb(8,"div",22),n.Wb(9,"mat-form-field"),n.Rb(10,"input",23),n.ic(11,"translate"),n.Vb(),n.Vb(),n.Wb(12,"div",22),n.Rb(13,"mat-paginator",24,25),n.Vb(),n.Vb(),n.Wb(15,"mat-table",26,27),n.Ub(17,28),n.Oc(18,l4,3,5,"mat-header-cell",29),n.Oc(19,d4,2,3,"mat-cell",30),n.Tb(),n.Ub(20,31),n.Oc(21,h4,3,3,"mat-header-cell",32),n.Oc(22,p4,3,1,"mat-cell",33),n.Tb(),n.Ub(23,34),n.Oc(24,b4,1,0,"mat-header-cell",35),n.Oc(25,f4,4,3,"mat-cell",36),n.Tb(),n.Oc(26,m4,1,0,"mat-header-row",37),n.Oc(27,g4,2,4,"mat-row",38),n.Vb(),n.Wb(28,"div",39),n.Qc(29),n.ic(30,"translate"),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(5),n.Rc(n.jc(6,13,"lang.alfrescoAPI")),n.Db(2),n.oc("ngModel",t.alfrescoUrl)("title",t.alfrescoUrl),n.Db(3),n.pc("placeholder",n.jc(11,15,"lang.filterBy")),n.oc("formControl",t.adminService.getFilterField()),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.adminService.getDataSource()),n.Db(11),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns),n.Db(2),n.Tc(" ",t.accounts.length," ",n.jc(30,17,"lang.accounts"),"")}}let _4=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.dialog=s,this.functions=o,this.adminService=r,this.viewContainerRef=c,this.alfrescoUrl="",this.accounts=[],this.loading=!1,this.displayedColumns=["label","entitiesLabel","actions"],this.filterColumns=["label","entitiesLabel"]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.alfresco")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!0,this.http.get("../rest/alfresco/configuration").pipe(Object(d.a)(t=>!this.functions.empty(t.configuration)),Object(mt.a)(t=>{this.alfrescoUrl=t.configuration.uri})).subscribe(),this.http.get("../rest/alfresco/accounts").subscribe(t=>{this.accounts=t.accounts,this.loading=!1,setTimeout(()=>{this.adminService.setDataSource("admin_alfresco",this.accounts,this.sort,this.paginator,this.filterColumns)},0)})}deleteAccount(t){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.confirmAction")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete("../rest/alfresco/accounts/"+t)),Object(mt.a)(()=>{this.accounts=this.accounts.filter(e=>e.id!==t),setTimeout(()=>{this.adminService.setDataSource("admin_alfresco",this.accounts,this.sort,this.paginator,this.filterColumns)},0),this.notify.success(this.translate.instant("lang.accountDeleted"))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}saveUrl(){this.http.put("../rest/alfresco/configuration",{uri:this.alfrescoUrl}).pipe(Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(q.b),n.Qb(_t.a),n.Qb(OL),n.Qb(n.T))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(o4,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:15,vars:8,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["mat-subheader",""],["mat-list-item","","routerLink","/administration/alfresco/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"row"],[1,"col-md-12"],["appearance","outline"],["matInput","","required","","name","accountId","id","accountId","type","text","placeholder","https://alfresco/api/",3,"ngModel","title","ngModelChange","blur"],[1,"col-md-6","col-xs-6"],["matInput","",3,"formControl","placeholder"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSortDisableClear","","matSort","",3,"dataSource"],["table",""],["matColumnDef","label"],["mat-sort-header","",3,"hide-for-mobile",4,"matHeaderCellDef"],[3,"hide-for-mobile",4,"matCellDef"],["matColumnDef","entitiesLabel"],["mat-sort-header","","style","flex: 2",4,"matHeaderCellDef"],["style","flex: 2",4,"matCellDef"],["matColumnDef","actions"],["style","flex:none",4,"matHeaderCellDef"],["style","flex:none;justify-content: flex-end;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"routerLink","matTooltip",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["mat-sort-header",""],["mat-sort-header","",2,"flex","2"],[2,"flex","2"],["class","label",4,"ngFor","ngForOf"],[1,"label"],[2,"flex","none"],[2,"flex","none","justify-content","flex-end"],["mat-icon-button","","color","warn",3,"matTooltip","click"],["aria-hidden","true",1,"fa","fa-trash-alt","fa-2x"],[2,"cursor","pointer",3,"routerLink","matTooltip"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,r4,9,6,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,c4,2,0,"div",9),n.Oc(14,v4,31,19,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,R.h,R.g,R.d,o.f,S.a,R.c,W.l,V.c,K.a,Y.c,Y.g,J.b,X.d,X.F,X.u,X.x,X.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,vt.h,Fe.b,vt.a,P.s,k.b,A.b,vt.j,vt.m,o.d],pipes:[g.d],styles:[".label[_ngcontent-%COMP%]{white-space:break-spaces;background:#135f7f;margin:5px}"]}),t})();const y4=["appContactDetail"];function x4(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",13),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit,i=n.hc();return i.toggleExcludeContact(e),i.mergeContact()})),n.Qc(1),n.ic(2,"translate"),n.Vb()}2&t&&(n.Db(1),n.Rc(n.jc(2,1,"lang.exludeContact")))}function C4(t,e){1&t&&n.Rb(0,"i",14)}function O4(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",15),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit,i=n.hc();return i.toggleExcludeContact(e),i.mergeContact()})),n.Rb(1,"i",16),n.Qc(2),n.ic(3,"translate"),n.Vb()}2&t&&(n.Db(2),n.Sc("\xa0",n.jc(3,1,"lang.contactExcluded"),""))}function D4(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",7),n.Wb(1,"app-contact-detail",8,9),n.dc("afterSelectedEvent",(function(){n.Dc(t);const i=e.index;return n.hc().mergeContact(i)}))("afterDeselectedEvent",(function(i){n.Dc(t);const a=e.index;return n.hc().resetContact(i,a)})),n.Vb(),n.Oc(3,x4,3,3,"button",10),n.Oc(4,C4,1,0,"i",11),n.Oc(5,O4,4,3,"button",12),n.Vb()}if(2&t){const t=e.$implicit,i=e.index,a=n.hc();n.Db(1),n.Ib("merged",a.contactSelected!==i&&null!==a.contactSelected&&-1===a.contactsExcluded.indexOf(t.id)),n.oc("contact",t)("selectable",a.contactSelected===i||null===a.contactSelected),n.Db(2),n.oc("ngIf",a.contactSelected!==i&&null!==a.contactSelected&&-1===a.contactsExcluded.indexOf(t.id)),n.Db(1),n.oc("ngIf",a.contactSelected!==i&&null!==a.contactSelected&&a.contactsExcluded.indexOf(t.id)>-1),n.Db(1),n.oc("ngIf",a.contactSelected!==i&&null!==a.contactSelected&&a.contactsExcluded.indexOf(t.id)>-1)}}let w4=(()=>{class t{constructor(t,e,i,n,a,s,o){this.translate=t,this.http=e,this.notify=i,this.data=n,this.dialogRef=a,this.headerService=s,this.functionsService=o,this.loading=!1,this.contactSelected=null,this.contactsExcluded=[]}ngOnInit(){}mergeContact(t=this.contactSelected){this.appContactDetail.toArray()[t].resetContact(),this.appContactDetail.toArray()[t].contact.selected=!0,this.functionsService.empty(t)||(this.contactSelected=t),this.data.duplicate.forEach((e,i)=>{-1===this.contactsExcluded.indexOf(this.appContactDetail.toArray()[i].getContactInfo().id)&&Object.keys(this.appContactDetail.toArray()[i].getContactInfo()).forEach(e=>{"customFields"!==e||this.functionsService.empty(this.appContactDetail.toArray()[i].getContactInfo()[e])?"civility"!==e||this.functionsService.empty(this.appContactDetail.toArray()[i].getContactInfo()[e].id)?this.functionsService.empty(this.appContactDetail.toArray()[t].getContactInfo()[e])&&this.appContactDetail.toArray()[t].getContactInfo()[e]!==this.appContactDetail.toArray()[i].getContactInfo()[e]&&this.appContactDetail.toArray()[t].setContactInfo(e,this.appContactDetail.toArray()[i].getContactInfo()[e]):this.appContactDetail.toArray()[t].setContactInfo(e,this.appContactDetail.toArray()[i].getContactInfo()[e]):this.appContactDetail.toArray()[i].getContactInfo()[e].forEach(i=>{0===this.appContactDetail.toArray()[t].getContactInfo()[e].filter(t=>t.label===i.label).length&&this.appContactDetail.toArray()[t].setContactInfo(e,i)})})})}toggleExcludeContact(t){const e=this.contactsExcluded.indexOf(t.id);-1===e?this.contactsExcluded.push(t.id):this.contactsExcluded.splice(e,1)}resetContact(t,e){this.contactSelected=null,this.appContactDetail.toArray()[e].resetContact()}onSubmit(){this.loading=!0;const t=this.data.duplicate.filter((t,e)=>e===this.contactSelected).map(t=>t.id)[0],e=this.data.duplicate.filter((t,e)=>e!==this.contactSelected).filter((t,e)=>-1===this.contactsExcluded.indexOf(t.id)).map(t=>t.id);this.http.put(`../rest/contacts/${t}/merge`,{duplicates:e}).pipe(Object(mt.a)(()=>{this.dialogRef.close(e.length===this.data.duplicate.length-1?"removeAll":e)}),Object(Xt.a)(()=>this.loading=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.a),n.Qb(q.h),n.Qb(y.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-manage-duplicate"]],viewQuery:function(t,e){var i;1&t&&n.Xc(y4,!0),2&t&&n.yc(i=n.ec())&&(e.appContactDetail=i)},decls:11,vars:12,consts:[[1,"mat-dialog-content-container"],["mat-dialog-content","",1,"contact-list-container"],["style","position: relative;",4,"ngFor","ngForOf"],[1,"divider-modal"],["mat-dialog-actions","",1,"actions"],["mat-raised-button","","mat-button","","color","primary",3,"disabled","click"],["mat-raised-button","","mat-button","",3,"mat-dialog-close"],[2,"position","relative"],[2,"height","100%",3,"contact","selectable","afterSelectedEvent","afterDeselectedEvent"],["appContactDetail",""],["mat-raised-button","","mat-button","","style","position: absolute;bottom: 0px;left: 50%;transform: translateX(-50%);",3,"click",4,"ngIf"],["class","fas fa-ban excludeLogo",4,"ngIf"],["mat-raised-button","","mat-button","","color","primary","style","position: absolute;bottom: 0px;left: 50%;transform: translateX(-50%);",3,"click",4,"ngIf"],["mat-raised-button","","mat-button","",2,"position","absolute","bottom","0px","left","50%","transform","translateX(-50%)",3,"click"],[1,"fas","fa-ban","excludeLogo"],["mat-raised-button","","mat-button","","color","primary",2,"position","absolute","bottom","0px","left","50%","transform","translateX(-50%)",3,"click"],[1,"fas","fa-ban"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"div",1),n.Oc(2,D4,6,7,"div",2),n.Vb(),n.Rb(3,"span",3),n.Wb(4,"div",4),n.Wb(5,"button",5),n.dc("click",(function(){return e.onSubmit()})),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Wb(8,"button",6),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(1),n.Ib("contact-list-container-1",1==e.data.duplicate.length)("contact-list-container-2",2==e.data.duplicate.length),n.Db(1),n.oc("ngForOf",e.data.duplicate),n.Db(3),n.oc("disabled",null===e.contactSelected||e.loading||e.contactsExcluded.length===e.data.duplicate.length-1),n.Db(1),n.Rc(n.jc(7,8,"lang.merge")),n.Db(3),n.Rc(n.jc(10,10,"lang.cancel")))},directives:[q.f,P.s,q.c,k.b,q.d,hd,P.t],pipes:[g.d],styles:[".merged[_ngcontent-%COMP%]{opacity:.5}.contact-list-container[_ngcontent-%COMP%]{padding:20px;display:grid;grid-template-columns:repeat(3,33%);grid-gap:10px}.contact-list-container-1[_ngcontent-%COMP%]{grid-template-columns:1fr}.contact-list-container-2[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}.excludeLogo[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:80px;color:#8e3e52}"]}),t})();var M4=i("vxfF");const k4=["adminMenuTemplate"];function S4(t,e){if(1&t&&(n.Wb(0,"a",19),n.Rb(1,"mat-icon",20),n.Wb(2,"p",21),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Ib("active",t.current),n.oc("routerLink",t.route),n.Db(1),n.Fb(t.icon),n.Db(2),n.Sc(" ",t.label," ")}}function I4(t,e){if(1&t&&(n.Wb(0,"mat-nav-list"),n.Oc(1,S4,4,6,"a",18),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",t.subMenus)}}function P4(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",31),n.dc("removed",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).removeCriteria(i)}))("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).removeCriteria(i)})),n.Qc(1),n.Rb(2,"mat-icon",32),n.Vb()}if(2&t){const t=e.$implicit;n.oc("removable",!0),n.Db(1),n.Sc(" ",t.label," ")}}function V4(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",22),n.Wb(1,"mat-accordion",23),n.Wb(2,"mat-expansion-panel",24),n.Wb(3,"mat-expansion-panel-header"),n.Wb(4,"mat-panel-title"),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Vb(),n.Wb(7,"plugin-select-search",25),n.dc("afterSelected",(function(e){return n.Dc(t),n.hc().addCriteria(e)})),n.ic(8,"translate"),n.ic(9,"translate"),n.Vb(),n.Rb(10,"mat-divider",26),n.Wb(11,"mat-chip-list",27),n.Oc(12,P4,3,2,"mat-chip",28),n.Vb(),n.Wb(13,"div",29),n.Wb(14,"button",30),n.dc("click",(function(){return n.Dc(t),n.hc().searchDuplicates()})),n.Qc(15),n.ic(16,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(2),n.oc("expanded",t.openedSearchTool),n.Db(3),n.Sc(" ",n.jc(6,9,"lang.criteriaSearch")," "),n.Db(2),n.oc("label",n.jc(8,11,"lang.addCriteria"))("formControlSelect",t.addCriteriaSelect)("placeholderLabel",n.jc(9,13,"lang.addCriteria"))("datas",t.contactFields),n.Db(5),n.oc("ngForOf",t.currentFieldsSearch),n.Db(2),n.oc("disabled",0===t.currentFieldsSearch.length||t.isLoadingResults),n.Db(1),n.Rc(n.jc(16,15,"lang.launchSearch"))}}function R4(t,e){1&t&&(n.Wb(0,"div",33),n.Wb(1,"em"),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Vb()),2&t&&(n.Db(2),n.Rc(n.jc(3,1,"lang.noDuplicatesFound")))}const j4=function(t,e){return{value1:t,value2:e}};function A4(t,e){if(1&t&&(n.Wb(0,"div",34),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Sc(" ",n.kc(2,1,"lang.duplicatesContactDisplayed",n.wc(4,j4,t.duplicatesContactsRealCount,t.duplicatesContactsCount))," ")}}function W4(t,e){if(1&t&&(n.Wb(0,"span",38),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc(2);n.Db(1),n.Sc(" ",i.getLabel(t)," ")}}function T4(t,e){if(1&t&&(n.Wb(0,"mat-list",15),n.Wb(1,"mat-list-item",35),n.Wb(2,"p",36),n.Oc(3,W4,2,1,"span",37),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Gb("contact-list-container-",t.displayedColumns.length,""),n.Db(1),n.oc("ngForOf",t.displayedColumns)}}function E4(t,e){if(1&t&&(n.Wb(0,"span",42),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc().$implicit;n.Db(1),n.Sc(" ",i[t]," ")}}function F4(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"mat-list-item",39),n.dc("mouseover",(function(){n.Dc(t);const i=e.$implicit;return n.hc().selectDuplicates(i.duplicateId)}))("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc().manageDuplicate(i.duplicateId)})),n.Wb(2,"p",40),n.Oc(3,E4,2,1,"span",41),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=e.$implicit,i=e.index,a=n.hc();n.Db(1),n.Ib("odd",void 0!==a.duplicatesContacts[i+1]&&t.odd!==a.duplicatesContacts[i+1].odd)("hovered",t.duplicateId===a.currentDuplicateId),n.Db(1),n.Gb("contact-list-container-",a.displayedColumns.length,""),n.Db(1),n.oc("ngForOf",a.displayedColumns)}}function L4(t,e){1&t&&(n.Wb(0,"div",43),n.Rb(1,"mat-spinner"),n.Vb())}let Q4=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c,l){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.dialog=s,this.functions=o,this.sortPipe=r,this.viewContainerRef=c,this.functionsService=l,this.loading=!0,this.subMenus=[{icon:"fa fa-book",route:"/administration/contacts",label:this.translate.instant("lang.contactsList"),current:!1},{icon:"fa fa-code",route:"/administration/contacts/contactsCustomFields",label:this.translate.instant("lang.customFieldsAdmin"),current:!1},{icon:"fa fa-cog",route:"/administration/contacts/contacts-parameters",label:this.translate.instant("lang.contactsParameters"),current:!1},{icon:"fa fa-users",route:"/administration/contacts/contacts-groups",label:this.translate.instant("lang.contactsGroups"),current:!1},{icon:"fas fa-magic",route:"/administration/contacts/duplicates",label:this.translate.instant("lang.duplicatesContactsAdmin"),current:!0}],this.contactFields=[],this.addCriteriaSelect=new X.i,this.currentFieldsSearch=[],this.currentDuplicateId=null,this.duplicatesContacts=[],this.duplicatesContactsCount=-1,this.duplicatesContactsRealCount=0,this.displayedColumns=["companyLastname","lastname","company"],this.isLoadingResults=!1,this.openedSearchTool=!0}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.headerService.setHeader(this.translate.instant("lang.contactsDuplicates"),"",""),yield this.getContactFields(),this.setDefaultSearchCriteria(),this.loading=!1}))}getContactFields(){return new Promise((t,e)=>{this.http.get("../rest/contactsParameters").pipe(Object(l.a)(t=>{const e=/contactCustomField_[.]*/g;return t.contactsParameters=t.contactsParameters.filter(t=>null===t.identifier.match(e)).map(t=>Object.assign(Object.assign({},t),{label:this.translate.instant("lang.contactsParameters_"+t.identifier)})),t.contactsParameters}),Object(mt.a)(t=>{this.contactFields=t}),p(()=>this.http.get("../rest/contactsCustomFields")),Object(l.a)(t=>(t.customFields=t.customFields.map(t=>Object.assign(Object.assign({},t),{id:"contactCustomField_"+t.id,identifier:"contactCustomField_"+t.id})),t.customFields)),Object(mt.a)(e=>{this.contactFields=this.contactFields.concat(e),this.contactFields=this.sortPipe.transform(this.contactFields,"label"),t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}setDefaultSearchCriteria(t=["lastname","company"]){this.contactFields.filter(e=>t.indexOf(e.identifier)>-1).forEach(t=>{t.disabled=!0,this.currentFieldsSearch.push(t)})}addCriteria(t){this.contactFields.filter(e=>e.id===t).forEach(t=>{t.disabled=!0,this.currentFieldsSearch.push(t)}),this.addCriteriaSelect.reset()}removeCriteria(t){this.contactFields.forEach((e,i)=>{e.id===t.id&&(this.currentFieldsSearch=this.currentFieldsSearch.filter(e=>e.id!==t.id),e.disabled=!1)})}searchDuplicates(){this.duplicatesContacts=[],this.isLoadingResults=!0;const t="?criteria[]="+this.currentFieldsSearch.map(t=>t.identifier).join("&criteria[]=");this.http.get("../rest/duplicatedContacts"+t).pipe(Object(l.a)(t=>(this.duplicatesContactsRealCount=t.realCount,this.duplicatesContactsCount=t.returnedCount,t.contacts.forEach((e,i)=>{e.odd=0===i||(void 0!==t.contacts[i-1]&&t.contacts[i-1].duplicateId===e.duplicateId?t.contacts[i-1].odd:!t.contacts[i-1].odd);const n=[];n.push(e.company),n.push(e.lastname),e.companyLastname=n.filter(t=>!this.functions.empty(t)).join(" / "),this.functionsService.empty(e.customFields)||Object.keys(e.customFields).forEach(t=>{e[t]=e.customFields[t]})}),t.contacts)),Object(mt.a)(t=>{this.duplicatesContacts=t,setTimeout(()=>{const t=/contactCustomField_[.]*/g;this.displayedColumns=this.currentFieldsSearch.filter(e=>null===e.identifier.match(t)).map(t=>t.identifier).concat(this.currentFieldsSearch.filter(e=>null!==e.identifier.match(t)).map(t=>t.identifier.replace("contactCustomField_",""))),this.displayedColumns.unshift("companyLastname"),this.openedSearchTool=!1},0)}),Object(Xt.a)(()=>this.isLoadingResults=!1),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}selectDuplicates(t){this.currentDuplicateId=t}manageDuplicate(t){this.dialog.open(w4,{panelClass:"maarch-modal",data:{duplicate:this.duplicatesContacts.filter(e=>e.duplicateId===t).map(t=>({id:t.id,type:"contact"}))}}).afterClosed().pipe(Object(d.a)(t=>!this.functionsService.empty(t)),Object(mt.a)(e=>{this.notify.success(this.translate.instant("lang.contactsMerged")),this.duplicatesContactsCount--,this.duplicatesContactsRealCount--,this.duplicatesContacts=this.duplicatesContacts.filter("removeAll"!==e?t=>-1===e.indexOf(t.id):e=>e.duplicateId!==t)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}getLabel(t){return void 0!==this.translate.instant("lang.contactsParameters_"+t)?this.translate.instant("lang.contactsParameters_"+t):void 0!==this.translate.instant("lang."+t)?this.translate.instant("lang."+t):this.contactFields.filter(e=>e.id==="contactCustomField_"+t)[0].label}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(q.b),n.Qb(_t.a),n.Qb(Wt.a),n.Qb(n.T),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-contact-duplicate"]],viewQuery:function(t,e){var i;1&t&&n.Kc(k4,!0),2&t&&n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first)},features:[n.Cb([Wt.a])],decls:22,vars:12,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content",2,"display","flex","flex-direction","column","overflow","hidden"],["class","criteria-container",4,"ngIf"],["style","padding: 10px;text-align: center;color: rgba(0,0,0,0.54);",4,"ngIf"],["style","padding: 10px;text-align: right;color: rgba(0,0,0,0.54);",4,"ngIf"],["role","list",4,"ngIf"],[2,"position","relative","height","100%","overflow","auto"],["itemSize","48",1,"example-viewport"],["role","list"],[4,"cdkVirtualFor","cdkVirtualForOf"],["class","example-loading-shade",4,"ngIf"],["mat-list-item","",3,"active","routerLink",4,"ngFor","ngForOf"],["mat-list-item","",3,"routerLink"],["color","primary","mat-list-icon",""],["mat-line",""],[1,"criteria-container"],[2,"margin-bottom","10px"],[3,"expanded"],[3,"label","formControlSelect","placeholderLabel","datas","afterSelected"],[2,"margin-top","20px","margin-bottom","20px"],[1,"checkbox-selected-list"],["selected","",3,"removable","removed","click",4,"ngFor","ngForOf"],[1,"col-md-12","text-center"],["mat-raised-button","","color","primary","type","button",3,"disabled","click"],["selected","",3,"removable","removed","click"],["matChipRemove","",1,"fa","fa-times-circle"],[2,"padding","10px","text-align","center","color","rgba(0,0,0,0.54)"],[2,"padding","10px","text-align","right","color","rgba(0,0,0,0.54)"],["role","listitem"],["mat-line","",2,"font-size","80%","display","grid","grid-gap","10px"],["class","primary","style","overflow: hidden;text-overflow: ellipsis;",4,"ngFor","ngForOf"],[1,"primary",2,"overflow","hidden","text-overflow","ellipsis"],["role","listitem",2,"cursor","pointer","font-size","14px",3,"mouseover","click"],["mat-line","",2,"display","grid","grid-gap","10px","align-items","center"],["style","overflow: hidden;text-overflow: ellipsis;",4,"ngFor","ngForOf"],[2,"overflow","hidden","text-overflow","ellipsis"],[1,"example-loading-shade"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,I4,2,1,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,V4,17,17,"div",9),n.Oc(14,R4,4,3,"div",10),n.Oc(15,A4,3,7,"div",11),n.Oc(16,T4,4,4,"mat-list",12),n.Wb(17,"div",13),n.Wb(18,"cdk-virtual-scroll-viewport",14),n.Wb(19,"mat-list",15),n.Oc(20,F4,4,8,"ng-container",16),n.Vb(),n.Vb(),n.Oc(21,L4,2,0,"div",17),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",!e.loading),n.Db(1),n.oc("ngIf",0===e.duplicatesContactsCount),n.Db(1),n.oc("ngIf",e.duplicatesContacts.length>0),n.Db(1),n.oc("ngIf",e.duplicatesContacts.length>0),n.Db(4),n.oc("cdkVirtualForOf",e.duplicatesContacts),n.Db(1),n.oc("ngIf",e.isLoadingResults))},directives:[I.e,I.f,Ot,We,P.t,M4.e,M4.a,R.a,M4.d,R.h,P.s,R.d,o.f,S.a,R.c,W.l,gt.a,gt.c,gt.g,gt.h,fr,T.a,ze.d,k.b,ze.a,ze.e,V.c],pipes:[g.d],styles:[".example-viewport[_ngcontent-%COMP%]{flex:1;width:100%;background:#fff;height:100%}.example-viewport[_ngcontent-%COMP%] .cdk-virtual-scroll-content-wrapper{overflow:hidden;text-overflow:ellipsis;width:100%}.active[_ngcontent-%COMP%], .active[_ngcontent-%COMP%]:active, .active[_ngcontent-%COMP%]:focus, .active[_ngcontent-%COMP%]:hover{color:#135f7f;border-left:5px solid #135f7f;background:rgba(19,95,127,.14)}.criteria-container[_ngcontent-%COMP%]{margin:20px}.hovered[_ngcontent-%COMP%]{background:rgba(0,0,0,.04)!important;transition:all .3s}.odd[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.12)}.contact-list-container-1[_ngcontent-%COMP%]{grid-template-columns:1fr}.contact-list-container-2[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}.contact-list-container-3[_ngcontent-%COMP%]{grid-template-columns:repeat(3,1fr)}.contact-list-container-4[_ngcontent-%COMP%]{grid-template-columns:repeat(4,1fr)}.contact-list-container-5[_ngcontent-%COMP%]{grid-template-columns:repeat(5,1fr)}"]}),t})();const N4=["adminMenuTemplate"];function z4(t,e){if(1&t&&(n.Wb(0,"a",16),n.Rb(1,"mat-icon",17),n.Wb(2,"p",14),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Ib("active",t.current),n.oc("routerLink",t.route),n.Db(1),n.Fb(t.icon),n.Db(2),n.Sc(" ",t.label," ")}}function B4(t,e){if(1&t&&(n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",11),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",12),n.Rb(5,"mat-icon",13),n.Wb(6,"p",14),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Rb(9,"mat-divider"),n.Wb(10,"mat-nav-list"),n.Oc(11,z4,4,6,"a",15),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Rc(n.jc(3,3,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,5,"lang.add")," "),n.Db(4),n.oc("ngForOf",t.subMenus)}}function U4(t,e){1&t&&(n.Wb(0,"div",18),n.Rb(1,"mat-spinner",19),n.Vb())}function $4(t,e){1&t&&(n.Wb(0,"mat-header-cell",39),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc("",n.jc(2,1,"lang.coclicoNumber")," "))}function H4(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.accountNumber," ")}}function G4(t,e){1&t&&(n.Wb(0,"mat-header-cell",39),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.label")," "))}function X4(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.label," ")}}function q4(t,e){1&t&&(n.Wb(0,"mat-header-cell",39),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.postOffice")," "))}function K4(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.postOfficeLabel," ")}}function Y4(t,e){1&t&&n.Rb(0,"mat-header-cell")}function J4(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",40),n.Wb(1,"button",41),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.delete(a)})),n.ic(2,"translate"),n.Rb(3,"mat-icon",42),n.Vb(),n.Vb()}2&t&&(n.Db(1),n.pc("matTooltip",n.jc(2,1,"lang.delete")))}function Z4(t,e){1&t&&n.Rb(0,"mat-header-row")}function t5(t,e){1&t&&(n.Rb(0,"mat-row",43),n.ic(1,"translate")),2&t&&(n.qc("routerLink","/administration/issuingSites/",e.$implicit.id,""),n.pc("matTooltip",n.jc(1,2,"lang.view")))}function e5(t,e){if(1&t&&(n.Wb(0,"mat-card",20),n.Wb(1,"div",21),n.Wb(2,"div",22),n.Wb(3,"mat-form-field"),n.Rb(4,"input",23),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Wb(6,"div",22),n.Rb(7,"mat-paginator",24,25),n.Vb(),n.Vb(),n.Wb(9,"mat-table",26,27),n.Ub(11,28),n.Oc(12,$4,3,3,"mat-header-cell",29),n.Oc(13,H4,2,1,"mat-cell",30),n.Tb(),n.Ub(14,31),n.Oc(15,G4,3,3,"mat-header-cell",29),n.Oc(16,X4,2,1,"mat-cell",30),n.Tb(),n.Ub(17,32),n.Oc(18,q4,3,3,"mat-header-cell",29),n.Oc(19,K4,2,1,"mat-cell",30),n.Tb(),n.Ub(20,33),n.Oc(21,Y4,1,0,"mat-header-cell",34),n.Oc(22,J4,4,3,"mat-cell",35),n.Tb(),n.Oc(23,Z4,1,0,"mat-header-row",36),n.Oc(24,t5,2,4,"mat-row",37),n.Vb(),n.Wb(25,"div",38),n.Qc(26),n.ic(27,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.pc("placeholder",n.jc(5,10,"lang.filterBy")),n.oc("formControl",t.adminService.getFilterField()),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.adminService.getDataSource()),n.Db(14),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns),n.Db(2),n.Tc(" ",t.data.length," ",n.jc(27,12,"lang.issuingSites"),"")}}let i5=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.functions=s,this.adminService=o,this.viewContainerRef=r,this.dialog=c,this.subMenus=[{icon:"fas fa-dolly-flatbed",route:"/administration/registeredMails",label:this.translate.instant("lang.registeredMailNumberRanges"),current:!1},{icon:"fas fa-warehouse",route:"/administration/issuingSites",label:this.translate.instant("lang.issuingSites"),current:!0}],this.parameters={},this.loading=!0,this.data=[],this.displayedColumns=["accountNumber","label","postOfficeLabel","actions"],this.filterColumns=["accountNumber","label","postOfficeLabel"]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.issuingSites")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!1,this.getData()}getData(){this.data=[],this.http.get("../rest/registeredMail/sites").pipe(Object(mt.a)(t=>{this.data=t.sites,this.loading=!1,setTimeout(()=>{this.adminService.setDataSource("admin_regitered_mail_issuing_site",this.data,this.sort,this.paginator,this.filterColumns)},0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}delete(t){this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete("../rest/registeredMail/sites/"+t.id)),Object(mt.a)(()=>{this.data=this.data.filter(e=>e.id!==t.id),setTimeout(()=>{this.adminService.setDataSource("admin_regitered_mail_issuing_site",this.data,this.sort,this.paginator,this.filterColumns)},0),this.notify.success(this.translate.instant("lang.issuingSiteDeleted"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a),n.Qb(OL),n.Qb(n.T),n.Qb(q.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-issuing-site-list"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(N4,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:15,vars:8,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["mat-subheader",""],["mat-list-item","","routerLink","/administration/issuingSites/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],["mat-list-item","",3,"active","routerLink",4,"ngFor","ngForOf"],["mat-list-item","",3,"routerLink"],["color","primary","mat-list-icon",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"row"],[1,"col-md-6","col-xs-6"],["matInput","",3,"formControl","placeholder"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSort","","matSortDisableClear","",3,"dataSource"],["table",""],["matColumnDef","accountNumber"],["mat-sort-header","",4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","label"],["matColumnDef","postOfficeLabel"],["matColumnDef","actions"],[4,"matHeaderCellDef"],["style","justify-content: flex-end;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"routerLink","matTooltip",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["mat-sort-header",""],[2,"justify-content","flex-end"],["mat-icon-button","","color","warn",3,"matTooltip","click"],["aria-hidden","true",1,"fa","fa-trash-alt","fa-2x"],[2,"cursor","pointer",3,"routerLink","matTooltip"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,B4,12,7,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,U4,2,0,"div",9),n.Oc(14,e5,28,14,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,R.h,R.g,R.d,o.f,S.a,R.c,W.l,T.a,P.s,V.c,K.a,Y.c,J.b,X.d,X.u,X.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,vt.h,Fe.b,vt.a,k.b,A.b,vt.j,vt.m,o.d],pipes:[g.d],styles:[".active[_ngcontent-%COMP%], .active[_ngcontent-%COMP%]:active, .active[_ngcontent-%COMP%]:focus, .active[_ngcontent-%COMP%]:hover{color:#135f7f;border-left:5px solid #135f7f;background:rgba(19,95,127,.14)}"]}),t})();const n5=["maarchTree"];function a5(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Vb())}function s5(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",49),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).addressBANCurrentDepartment=i})),n.Qc(1),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.Rc(t)}}function o5(t,e){if(1&t&&(n.Wb(0,"mat-option",50),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t.address," ")}}function r5(t,e){if(1&t&&(n.Ub(0),n.Oc(1,o5,2,2,"mat-option",46),n.ic(2,"async"),n.Tb()),2&t){const t=n.hc(2);n.Db(1),n.oc("ngForOf",n.jc(2,1,t.addressBANFilteredResult))}}function c5(t,e){if(1&t&&n.Rb(0,"mat-option",51),2&t){const t=n.hc(2);n.oc("innerHTML",t.addressBANInfo,n.Ec)}}function l5(t,e){1&t&&(n.Wb(0,"mat-option",52),n.Rb(1,"mat-spinner",53),n.Vb())}function d5(t,e){if(1&t&&(n.Wb(0,"mat-option",50),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t),n.Db(1),n.Sc(" ",t," ")}}function h5(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",17),n.Wb(1,"form",18),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Wb(2,"div"),n.Wb(3,"mat-form-field"),n.Wb(4,"mat-label"),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Rb(7,"input",19),n.Vb(),n.Wb(8,"mat-form-field"),n.Wb(9,"mat-label"),n.Qc(10),n.ic(11,"translate"),n.Vb(),n.Rb(12,"input",20),n.Vb(),n.Wb(13,"mat-form-field"),n.Wb(14,"mat-label"),n.Qc(15),n.ic(16,"translate"),n.Vb(),n.Rb(17,"input",21),n.Vb(),n.Wb(18,"div",22),n.Wb(19,"div",23),n.Qc(20),n.ic(21,"translate"),n.Vb(),n.Wb(22,"mat-form-field",24),n.Wb(23,"button",25),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()})),n.ic(24,"translate"),n.Qc(25),n.Rb(26,"i",26),n.Vb(),n.Wb(27,"mat-menu",null,27),n.Oc(29,s5,2,1,"button",28),n.Vb(),n.Rb(30,"mat-icon",29),n.Wb(31,"input",30,31),n.dc("click",(function(e){return n.Dc(t),e.stopPropagation()}))("focus",(function(){return n.Dc(t),n.hc().resetAutocompleteAddressBan()})),n.ic(33,"translate"),n.Vb(),n.Wb(34,"mat-autocomplete",32,33),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc().selectAddressBan(e)})),n.Oc(36,r5,3,3,"ng-container",34),n.Oc(37,c5,1,1,"mat-option",35),n.Oc(38,l5,2,0,"mat-option",36),n.Vb(),n.Vb(),n.Wb(39,"mat-form-field"),n.Wb(40,"mat-label"),n.Qc(41),n.ic(42,"translate"),n.Vb(),n.Rb(43,"input",37),n.Vb(),n.Wb(44,"mat-form-field"),n.Wb(45,"mat-label"),n.Qc(46),n.ic(47,"translate"),n.Vb(),n.Rb(48,"input",38),n.Vb(),n.Wb(49,"mat-form-field"),n.Wb(50,"mat-label"),n.Qc(51),n.ic(52,"translate"),n.Vb(),n.Rb(53,"input",39),n.Vb(),n.Wb(54,"mat-form-field"),n.Wb(55,"mat-label"),n.Qc(56),n.ic(57,"translate"),n.Vb(),n.Rb(58,"input",40),n.Vb(),n.Wb(59,"mat-form-field"),n.Wb(60,"mat-label"),n.Qc(61),n.ic(62,"translate"),n.Vb(),n.Rb(63,"input",41),n.Vb(),n.Wb(64,"mat-form-field"),n.Wb(65,"mat-label"),n.Qc(66),n.ic(67,"translate"),n.Vb(),n.Rb(68,"input",42),n.Vb(),n.Wb(69,"mat-form-field"),n.Wb(70,"mat-label"),n.Qc(71),n.ic(72,"translate"),n.Vb(),n.Rb(73,"input",43,31),n.Wb(75,"mat-autocomplete",44,45),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc().adminFormGroup.controls.addressCountry.setValue(e.option.value)})),n.Oc(77,d5,2,2,"mat-option",46),n.ic(78,"async"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(79,"div",47),n.Wb(80,"button",48),n.Qc(81),n.ic(82,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(28),e=n.zc(35),i=n.zc(76),a=n.hc();n.Db(1),n.oc("formGroup",a.adminFormGroup),n.Db(4),n.Rc(n.jc(6,26,"lang.siteName")),n.Db(5),n.Rc(n.jc(11,28,"lang.coclicoNumber")),n.Db(5),n.Rc(n.jc(16,30,"lang.postOffice")),n.Db(5),n.Sc(" ",n.jc(21,32,"lang.address")," "),n.Db(3),n.oc("matMenuTriggerFor",t)("title",n.jc(24,34,"lang.targetDepartment")),n.Db(2),n.Sc(" ",a.addressBANCurrentDepartment,"\xa0"),n.Db(4),n.oc("ngForOf",a.departmentList),n.Db(2),n.oc("placeholder",n.jc(33,36,"lang.searchAddressBan"))("formControl",a.addressBANControl)("matAutocomplete",e),n.Db(5),n.oc("ngIf",a.addressBANResult.length>0&&!a.addressBANLoading),n.Db(1),n.oc("ngIf",0===a.addressBANResult.length&&!a.addressBANLoading),n.Db(1),n.oc("ngIf",a.addressBANLoading),n.Db(3),n.Rc(n.jc(42,38,"lang.contactsParameters_addressAdditional1")),n.Db(5),n.Rc(n.jc(47,40,"lang.contactsParameters_addressNumber")),n.Db(5),n.Rc(n.jc(52,42,"lang.contactsParameters_addressStreet")),n.Db(5),n.Rc(n.jc(57,44,"lang.contactsParameters_addressAdditional2")),n.Db(5),n.Rc(n.jc(62,46,"lang.contactsParameters_addressPostcode")),n.Db(5),n.Rc(n.jc(67,48,"lang.contactsParameters_addressTown")),n.Db(5),n.Rc(n.jc(72,50,"lang.contactsParameters_addressCountry")),n.Db(2),n.oc("matAutocomplete",i),n.Db(4),n.oc("ngForOf",n.jc(78,52,a.countriesFilteredResult)),n.Db(3),n.oc("disabled",!a.adminFormGroup.valid),n.Db(1),n.Rc(n.jc(82,54,"lang.save"))}}let u5=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this.translate=t,this.http=e,this.route=i,this.router=n,this.notify=a,this.headerService=s,this.appService=o,this._formBuilder=r,this.latinisePipe=c,this.loading=!0,this.entities=[],this.countries=[],this.id=null,this.addressBANInfo="",this.addressBANMode=!0,this.addressBANControl=new X.i,this.addressBANLoading=!1,this.addressBANResult=[],this.addressBANCurrentDepartment="75",this.departmentList=[]}ngOnInit(){this.route.params.subscribe(t=>Object(r.a)(this,void 0,void 0,(function*(){void 0===t.id?(this.creationMode=!0,this.headerService.setHeader(this.translate.instant("lang.issuingSiteCreation")),this.initBanSearch(),this.initAutocompleteAddressBan(),this.adminFormGroup=this._formBuilder.group({id:[null],label:["",X.I.required],postOfficeLabel:["",X.I.required],accountNumber:["",X.I.required],addressNumber:["",X.I.required],addressStreet:["",X.I.required],addressAdditional1:[""],addressAdditional2:[""],addressPostcode:["",X.I.required],addressTown:["",X.I.required],addressCountry:[""]}),this.getCountries(),this.initAutocompleteCountries(),this.loading=!1,yield this.getEntities(),this.maarchTree.initData(this.entities)):(this.id=t.id,this.creationMode=!1,this.headerService.setHeader(this.translate.instant("lang.issuingSiteModification")),this.initBanSearch(),this.initAutocompleteAddressBan(),yield this.getEntities(),yield this.getData(),this.getCountries(),this.initAutocompleteCountries(),this.maarchTree.initData(this.entities))})))}getData(){return new Promise(t=>{this.http.get("../rest/registeredMail/sites/"+this.id).pipe(Object(mt.a)(e=>{this.adminFormGroup=this._formBuilder.group({id:[this.id],label:[e.site.label,X.I.required],postOfficeLabel:[e.site.postOfficeLabel,X.I.required],accountNumber:[e.site.accountNumber,X.I.required],addressNumber:[e.site.addressNumber,X.I.required],addressStreet:[e.site.addressStreet,X.I.required],addressAdditional1:[e.site.addressAdditional1],addressAdditional2:[e.site.addressAdditional2],addressPostcode:[e.site.addressPostcode,X.I.required],addressTown:[e.site.addressTown,X.I.required],addressCountry:[e.site.addressCountry],entities:[e.site.entities]}),this.entities=this.entities.map(t=>Object.assign(Object.assign({},t),{state:{opened:!0,selected:e.site.entities.indexOf(t.id)>-1}})),t(!0),this.loading=!1}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}initBanSearch(){this.http.get("../rest/ban/availableDepartments").pipe(Object(mt.a)(t=>{null!==t.default&&-1!==t.departments.indexOf(t.default.toString())&&(this.addressBANCurrentDepartment=t.default),this.departmentList=t.departments}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}initAutocompleteCountries(){this.countriesFilteredResult=this.adminFormGroup.controls.addressCountry.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>this._filter(t)))}_filter(t){const e=t.toLowerCase();return this.countries.filter(t=>t.toLowerCase().includes(e))}initAutocompleteAddressBan(){this.addressBANInfo=this.translate.instant("lang.autocompleteInfo"),this.addressBANResult=[],this.addressBANControl.valueChanges.pipe(Object(pt.a)(300),Object(d.a)(t=>t.length>2),Object(bt.a)(),Object(mt.a)(()=>this.addressBANLoading=!0),Object(ft.a)(t=>this.http.get("../rest/autocomplete/banAddresses",{params:{address:t,department:this.addressBANCurrentDepartment}})),Object(mt.a)(t=>{this.addressBANInfo=0===t.length?this.translate.instant("lang.noAvailableValue"):"",this.addressBANResult=t,this.addressBANFilteredResult=Object(c.a)(this.addressBANResult),this.addressBANLoading=!1})).subscribe()}resetAutocompleteAddressBan(){this.addressBANResult=[],this.addressBANInfo=this.translate.instant("lang.autocompleteInfo")}selectAddressBan(t){this.adminFormGroup.controls.addressNumber.setValue(t.option.value.number),this.adminFormGroup.controls.addressStreet.setValue(t.option.value.afnorName),this.adminFormGroup.controls.addressPostcode.setValue(t.option.value.postalCode),this.adminFormGroup.controls.addressTown.setValue(t.option.value.city),this.adminFormGroup.controls.addressCountry.setValue("FRANCE"),this.addressBANControl.setValue("")}getEntities(){return new Promise(t=>{this.http.get("../rest/entities").pipe(Object(l.a)(t=>(t.entities=t.entities.map(t=>({text:t.entity_label,icon:t.icon,parent_id:t.parentSerialId,id:t.serialId,state:{opened:!0}})),t.entities)),Object(mt.a)(e=>{this.entities=e,t(!0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}getCountries(){this.http.get("../rest/registeredMail/countries").pipe(Object(mt.a)(t=>{this.countries=t.countries.map(t=>this.latinisePipe.transform(t.toUpperCase()))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}onSubmit(){const t={};Object.keys(this.adminFormGroup.controls).forEach(e=>{t[e]=this.adminFormGroup.controls[e].value}),t.entities=this.maarchTree.getSelectedNodes().map(t=>t.id),this.creationMode?this.http.post("../rest/registeredMail/sites",t).subscribe(()=>{this.notify.success(this.translate.instant("lang.issuingSiteAdded")),this.router.navigate(["/administration/issuingSites"])},t=>{this.notify.handleSoftErrors(t)}):this.http.put("../rest/registeredMail/sites/"+this.id,t).subscribe(()=>{this.notify.success(this.translate.instant("lang.issuingSiteUpdated")),this.router.navigate(["/administration/issuingSites"])},t=>{this.notify.handleSoftErrors(t)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(X.h),n.Qb(Tt.c))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-issuing-site"]],viewQuery:function(t,e){var i;1&t&&n.Kc(n5,!0),2&t&&n.yc(i=n.ec())&&(e.maarchTree=i.first)},decls:22,vars:14,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["fixedTopGap","56","position","end",2,"overflow-x","hidden","width","400px",3,"mode","fixedInViewport","opened"],["snav2",""],["mat-subheader",""],[2,"padding","10px"],["maarchTree",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[2,"display","contents",3,"formGroup","ngSubmit"],["matInput","","formControlName","label"],["type","text","pattern","[0-9]+","maxlength","10","matInput","","formControlName","accountNumber"],["matInput","","formControlName","postOfficeLabel"],[1,"formType","ratio-1","col-sm-12"],[1,"formType-title"],["appearance","outline",1,"smallInput"],["type","button","mat-button","","matSuffix","",3,"matMenuTriggerFor","title","click"],[1,"fa","fa-chevron-down"],["menuDep","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["color","primary","matPrefix","",1,"fa","fa-search",2,"font-size","15px"],["type","text","matInput","","maxlength","128",3,"placeholder","formControl","matAutocomplete","click","focus"],["autoCompleteInput",""],[3,"optionSelected"],["auto","matAutocomplete"],[4,"ngIf"],["class","autoCompleteInfoResult smallInputInfo","disabled","",3,"innerHTML",4,"ngIf"],["disabled","",4,"ngIf"],["matInput","","formControlName","addressAdditional1"],["matInput","","formControlName","addressNumber"],["matInput","","formControlName","addressStreet"],["matInput","","formControlName","addressAdditional2"],["matInput","","formControlName","addressPostcode"],["matInput","","formControlName","addressTown"],["matInput","","formControlName","addressCountry",3,"matAutocomplete"],["isOpen","true",3,"optionSelected"],["matAutocompleteCountries","matAutocomplete"],[3,"value",4,"ngFor","ngForOf"],[2,"text-align","center"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],["mat-menu-item","",3,"click"],[3,"value"],["disabled","",1,"autoCompleteInfoResult","smallInputInfo",3,"innerHTML"],["disabled",""],["diameter","20"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,a5,2,0,"div",8),n.Oc(12,h5,83,56,"mat-card",9),n.Vb(),n.Vb(),n.Vb(),n.Wb(13,"mat-sidenav",10,11),n.Wb(15,"mat-list"),n.Wb(16,"h3",12),n.Qc(17),n.ic(18,"translate"),n.Vb(),n.Wb(19,"div",13),n.Rb(20,"app-maarch-flat-tree",null,14),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading),n.Db(1),n.oc("mode",e.appService.getViewMode()?"over":"side")("fixedInViewport",e.appService.getViewMode())("opened",!e.appService.getViewMode()),n.Db(4),n.Rc(n.jc(18,12,"lang.chooseEntityAssociationModel")))},directives:[I.e,I.f,Ot,We,P.t,I.d,R.a,R.g,cQ,V.c,K.a,X.K,X.v,X.m,Y.c,Y.g,J.b,X.d,X.u,X.k,X.B,X.p,k.b,Y.j,ne.d,ne.e,P.s,S.a,Y.i,Ne.d,X.j,Ne.a,ne.b,W.p],pipes:[g.d,P.b],styles:[".formType[_ngcontent-%COMP%]{align-items:center;display:flex;border-radius:4px;border:1px solid #ccc;position:relative;padding:10px 20px;flex-direction:column}.formType-title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:10px;font-weight:700;background:#fff;position:absolute;top:-7px;left:10px;padding:0;margin:0;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-slide-toggle-label{color:#666;font-weight:700}.formType[_ngcontent-%COMP%] .mat-radio-button, .formType[_ngcontent-%COMP%] .mat-slide-toggle{opacity:.5;color:#666;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.formType[_ngcontent-%COMP%] .mat-checked, .formType[_ngcontent-%COMP%] .mat-radio-checked{opacity:1;color:#135f7f}.formType[_ngcontent-%COMP%] .mat-checked .mat-slide-toggle-label{color:#135f7f}.formType[_ngcontent-%COMP%] .mat-form-field-suffix{color:#f99830;font-size:15px;top:0}.ratio-1[_ngcontent-%COMP%], .ratio-2[_ngcontent-%COMP%]{flex:1}.smallInput[_ngcontent-%COMP%]{font-size:11px;padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-button[_ngcontent-%COMP%]{width:30px;height:25px;color:#135f7f}.smallInput[_ngcontent-%COMP%] .mat-button[_ngcontent-%COMP%] .mat-button-wrapper{display:flex;line-height:normal;align-items:center}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}"]}),t})();const p5=["adminMenuTemplate"];function b5(t,e){if(1&t&&(n.Wb(0,"a",16),n.Rb(1,"mat-icon",17),n.Wb(2,"p",14),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Ib("active",t.current),n.oc("routerLink",t.route),n.Db(1),n.Fb(t.icon),n.Db(2),n.Sc(" ",t.label," ")}}function f5(t,e){if(1&t&&(n.Wb(0,"mat-nav-list"),n.Wb(1,"h3",11),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"a",12),n.Rb(5,"mat-icon",13),n.Wb(6,"p",14),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Rb(9,"mat-divider"),n.Wb(10,"mat-nav-list"),n.Oc(11,b5,4,6,"a",15),n.Vb()),2&t){const t=n.hc();n.Db(2),n.Rc(n.jc(3,3,"lang.actions")),n.Db(5),n.Sc(" ",n.jc(8,5,"lang.add")," "),n.Db(4),n.oc("ngForOf",t.subMenus)}}function m5(t,e){1&t&&(n.Wb(0,"div",18),n.Rb(1,"mat-spinner",19),n.Vb())}function g5(t,e){1&t&&(n.Wb(0,"mat-header-cell",44),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.trackerNumber")," "))}function v5(t,e){if(1&t&&(n.Wb(0,"mat-cell",45),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.trackerNumber," ")}}function _5(t,e){1&t&&(n.Wb(0,"mat-header-cell",44),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.type")," "))}function y5(t,e){if(1&t&&(n.Wb(0,"mat-cell",45),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.typeLabel," ")}}function x5(t,e){1&t&&(n.Wb(0,"mat-header-cell",46),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.rangeNumber")," "))}function C5(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.rangeNumber," ")}}function O5(t,e){1&t&&(n.Wb(0,"mat-header-cell",46),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.currentNumber")," "))}function D5(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Qc(1),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t.currentNumber," ")}}function w5(t,e){1&t&&(n.Wb(0,"mat-header-cell",46),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.status")," "))}const M5=function(){return["OK"]},k5=function(){return["SPD"]},S5=function(){return["END"]},I5=function(t,e,i){return{statusLabelPrimary:t,statusLabelWarn:e,statusLabelDanger:i}};function P5(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Wb(1,"span",47),n.Qc(2),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngClass",n.xc(5,I5,n.uc(2,M5).indexOf(t.status)>-1,n.uc(3,k5).indexOf(t.status)>-1,n.uc(4,S5).indexOf(t.status)>-1)),n.Db(1),n.Rc(t.statusLabel)}}function V5(t,e){1&t&&(n.Wb(0,"mat-header-cell",46),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.fullness")," "))}function R5(t,e){if(1&t&&(n.Wb(0,"mat-cell"),n.Wb(1,"div",48),n.Rb(2,"mat-progress-spinner",49),n.Wb(3,"div",50),n.Qc(4),n.Vb(),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.Ib("fullness-ok",t.fullness<50)("fullness-warning",t.fullness>=50&&t.fullness<80)("fullness-danger",t.fullness>=80),n.Db(1),n.oc("value",t.fullness),n.Db(2),n.Sc("",t.fullness,"%")}}function j5(t,e){1&t&&n.Rb(0,"mat-header-cell")}function A5(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",56),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc(2);return e.stopPropagation(),a.activate(i)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",57),n.Vb()}if(2&t){const t=n.hc().$implicit;n.pc("matTooltip",n.jc(1,2,"Activer la plage")),n.oc("disabled",100===t.fullness)}}function W5(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",58),n.dc("click",(function(e){n.Dc(t);const i=n.hc().$implicit,a=n.hc(2);return e.stopPropagation(),a.stop(i)})),n.ic(1,"translate"),n.Rb(2,"mat-icon",59),n.Vb()}2&t&&n.pc("matTooltip",n.jc(1,1,"Cl\xf4turer la plage"))}function T5(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-cell",51),n.Oc(1,A5,3,4,"button",52),n.Oc(2,W5,3,3,"button",53),n.Wb(3,"button",54),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.delete(a)})),n.ic(4,"translate"),n.Rb(5,"mat-icon",55),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf","SPD"===t.status),n.Db(1),n.oc("ngIf","OK"===t.status),n.Db(1),n.pc("matTooltip",n.jc(4,4,"lang.delete")),n.oc("disabled","OK"===t.status)}}function E5(t,e){1&t&&n.Rb(0,"mat-header-row")}function F5(t,e){1&t&&(n.Rb(0,"mat-row",60),n.ic(1,"translate")),2&t&&(n.qc("routerLink","/administration/registeredMails/",e.$implicit.id,""),n.pc("matTooltip",n.jc(1,2,"lang.view")))}function L5(t,e){if(1&t&&(n.Wb(0,"mat-card",20),n.Wb(1,"div",21),n.Wb(2,"div",22),n.Wb(3,"mat-form-field"),n.Rb(4,"input",23),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Wb(6,"div",22),n.Rb(7,"mat-paginator",24,25),n.Vb(),n.Vb(),n.Wb(9,"mat-table",26,27),n.Ub(11,28),n.Oc(12,g5,3,3,"mat-header-cell",29),n.Oc(13,v5,2,1,"mat-cell",30),n.Tb(),n.Ub(14,31),n.Oc(15,_5,3,3,"mat-header-cell",29),n.Oc(16,y5,2,1,"mat-cell",30),n.Tb(),n.Ub(17,32),n.Oc(18,x5,3,3,"mat-header-cell",33),n.Oc(19,C5,2,1,"mat-cell",34),n.Tb(),n.Ub(20,35),n.Oc(21,O5,3,3,"mat-header-cell",33),n.Oc(22,D5,2,1,"mat-cell",34),n.Tb(),n.Ub(23,36),n.Oc(24,w5,3,3,"mat-header-cell",33),n.Oc(25,P5,3,9,"mat-cell",34),n.Tb(),n.Ub(26,37),n.Oc(27,V5,3,3,"mat-header-cell",33),n.Oc(28,R5,5,8,"mat-cell",34),n.Tb(),n.Ub(29,38),n.Oc(30,j5,1,0,"mat-header-cell",39),n.Oc(31,T5,6,6,"mat-cell",40),n.Tb(),n.Oc(32,E5,1,0,"mat-header-row",41),n.Oc(33,F5,2,4,"mat-row",42),n.Vb(),n.Wb(34,"div",43),n.Qc(35),n.ic(36,"translate"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(4),n.pc("placeholder",n.jc(5,10,"lang.filterBy")),n.oc("formControl",t.adminService.getFilterField()),n.Db(3),n.oc("length",100)("hidePageSize",!0)("pageSize",10),n.Db(2),n.oc("dataSource",t.adminService.getDataSource()),n.Db(23),n.oc("matHeaderRowDef",t.displayedColumns),n.Db(1),n.oc("matRowDefColumns",t.displayedColumns),n.Db(2),n.Tc(" ",t.data.length," ",n.jc(36,12,"lang.registeredMailNumberRanges"),"")}}let Q5=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this.translate=t,this.http=e,this.notify=i,this.headerService=n,this.appService=a,this.functions=s,this.adminService=o,this.viewContainerRef=r,this.dialog=c,this.subMenus=[{icon:"fas fa-dolly-flatbed",route:"/administration/registeredMails",label:this.translate.instant("lang.registeredMailNumberRanges"),current:!0},{icon:"fas fa-warehouse",route:"/administration/issuingSites",label:this.translate.instant("lang.issuingSites"),current:!1}],this.parameters={},this.loading=!0,this.data=[],this.displayedColumns=["trackerNumber","typeLabel","rangeNumber","currentNumber","status","fullness","actions"],this.filterColumns=["trackerNumber","typeLabel","rangeNumber","currentNumber","fullness","statusLabel"]}ngOnInit(){this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.registeredMailNumberRanges")),this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.loading=!1,this.getData()}getData(){this.data=[],this.http.get("../rest/registeredMail/ranges").pipe(Object(mt.a)(t=>{this.data=t.ranges.map(t=>Object.assign(Object.assign({},t),{statusLabel:this.translate.instant("lang.registeredMail_"+t.status),typeLabel:this.translate.instant("lang.registeredMail_"+t.registeredMailType),rangeNumber:`${t.rangeStart} - ${t.rangeEnd}`})),this.loading=!1,setTimeout(()=>{this.adminService.setDataSource("admin_regitered_mail",this.data,this.sort,this.paginator,this.filterColumns)},0)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}activate(t){const e=JSON.parse(JSON.stringify(t));e.status="OK",this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.activateRegisteredMailNumberRange"),msg:this.translate.instant("lang.registeredMailMsgActivate")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.put("../rest/registeredMail/ranges/"+t.id,e)),Object(mt.a)(()=>{this.data.forEach(e=>{"OK"===e.status&&e.registeredMailType===t.registeredMailType&&e.siteId===t.siteId?(e.status="END",e.currentNumber=null,e.statusLabel=this.translate.instant("lang.registeredMail_"+e.status)):e.id===t.id&&(e.status="OK",e.currentNumber=e.rangeStart,e.statusLabel=this.translate.instant("lang.registeredMail_"+e.status))}),setTimeout(()=>{this.adminService.setDataSource("admin_regitered_mail",this.data,this.sort,this.paginator,this.filterColumns)},0),this.notify.success(this.translate.instant("lang.registeredMailNumberRangesActivated"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}stop(t){const e=JSON.parse(JSON.stringify(t));e.status="END",this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.suspend"),msg:"En cl\xf4turant la plage, vous ne pourrez plus utiliser de recommand\xe9 de ce type tant que vous n'en n'aurez pas activ\xe9 une autre."}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.put("../rest/registeredMail/ranges/"+t.id,e)),Object(mt.a)(()=>{t.status="END",t.statusLabel=this.translate.instant("lang.registeredMail_"+t.status),setTimeout(()=>{this.adminService.setDataSource("admin_regitered_mail",this.data,this.sort,this.paginator,this.filterColumns)},0),this.notify.success(this.translate.instant("lang.registeredMailNumberRangesClosed"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}delete(t){this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.confirmAction")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete("../rest/registeredMail/ranges/"+t.id)),Object(mt.a)(()=>{this.data=this.data.filter(e=>e.id!==t.id),setTimeout(()=>{this.adminService.setDataSource("admin_regitered_mail",this.data,this.sort,this.paginator,this.filterColumns)},0),this.notify.success(this.translate.instant("lang.registeredMailNumberRangesRemoved"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(_t.a),n.Qb(OL),n.Qb(n.T),n.Qb(q.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-registered-mail-list"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(p5,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:15,vars:8,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["mat-subheader",""],["mat-list-item","","routerLink","/administration/registeredMails/new"],["color","primary","mat-list-icon","",1,"fa","fa-plus"],["mat-line",""],["mat-list-item","",3,"active","routerLink",4,"ngFor","ngForOf"],["mat-list-item","",3,"routerLink"],["color","primary","mat-list-icon",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[1,"row"],[1,"col-md-6","col-xs-6"],["matInput","",3,"formControl","placeholder"],[3,"length","hidePageSize","pageSize"],["paginator",""],["matSort","","matSortDisableClear","",3,"dataSource"],["table",""],["matColumnDef","trackerNumber"],["mat-sort-header","","style","flex:2",4,"matHeaderCellDef"],["style","flex:2",4,"matCellDef"],["matColumnDef","typeLabel"],["matColumnDef","rangeNumber"],["mat-sort-header","",4,"matHeaderCellDef"],[4,"matCellDef"],["matColumnDef","currentNumber"],["matColumnDef","status"],["matColumnDef","fullness"],["matColumnDef","actions"],[4,"matHeaderCellDef"],["style","justify-content: flex-end;",4,"matCellDef"],[4,"matHeaderRowDef"],["style","cursor:pointer;",3,"routerLink","matTooltip",4,"matRowDef","matRowDefColumns"],[1,"mat-paginator",2,"min-height","48px","min-height","48px","display","flex","justify-content","end","align-items","center","padding-right","20px"],["mat-sort-header","",2,"flex","2"],[2,"flex","2"],["mat-sort-header",""],[1,"label",3,"ngClass"],[1,"fullness","full"],["color","primay","mode","determinate","diameter","54",3,"value"],[1,"percent"],[2,"justify-content","flex-end"],["mat-icon-button","","color","accent",3,"matTooltip","disabled","click",4,"ngIf"],["mat-icon-button","","color","warn",3,"matTooltip","click",4,"ngIf"],["mat-icon-button","","color","warn",3,"matTooltip","disabled","click"],["aria-hidden","true",1,"fa","fa-trash-alt","fa-2x"],["mat-icon-button","","color","accent",3,"matTooltip","disabled","click"],["aria-hidden","true",1,"fa","fas","fa-play","fa-2x"],["mat-icon-button","","color","warn",3,"matTooltip","click"],["aria-hidden","true",1,"fa","fas","fa-stop-circle","fa-2x"],[2,"cursor","pointer",3,"routerLink","matTooltip"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,f5,12,7,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,m5,2,0,"div",9),n.Oc(14,L5,37,14,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,R.h,R.g,R.d,o.f,S.a,R.c,W.l,T.a,P.s,V.c,K.a,Y.c,J.b,X.d,X.u,X.j,Kt.a,vt.o,Fe.a,vt.c,vt.i,vt.b,vt.k,vt.n,vt.h,Fe.b,vt.a,P.q,V.a,k.b,A.b,vt.j,vt.m,o.d],pipes:[g.d],styles:[".active[_ngcontent-%COMP%], .active[_ngcontent-%COMP%]:active, .active[_ngcontent-%COMP%]:focus, .active[_ngcontent-%COMP%]:hover{color:#135f7f;border-left:5px solid #135f7f;background:rgba(19,95,127,.14)}.fullness[_ngcontent-%COMP%]{position:relative}.percent[_ngcontent-%COMP%]{position:absolute;top:50%;transform:translate(-50%,-50%);left:50%;font-size:10px;font-weight:700;color:#888}.fullness-ok[_ngcontent-%COMP%] .mat-progress-spinner circle, .mat-spinner[_ngcontent-%COMP%] circle[_ngcontent-%COMP%]{stroke:green}.fullness-warning[_ngcontent-%COMP%] .mat-progress-spinner circle, .mat-spinner[_ngcontent-%COMP%] circle[_ngcontent-%COMP%]{stroke:orange}.fullness-danger[_ngcontent-%COMP%] .mat-progress-spinner circle, .mat-spinner[_ngcontent-%COMP%] circle[_ngcontent-%COMP%]{stroke:red}.statusLabelDanger[_ngcontent-%COMP%]{color:#8e3e52}.statusLabelWarn[_ngcontent-%COMP%]{color:#f99830}.statusLabelPrimary[_ngcontent-%COMP%]{color:#135f7f}"]}),t})();function N5(t,e){1&t&&(n.Wb(0,"div",10),n.Rb(1,"mat-spinner",11),n.Vb())}function z5(t,e){1&t&&(n.Rb(0,"div",22),n.ic(1,"translate")),2&t&&n.oc("innerHTML",n.jc(1,1,"lang.registeredMailNumberRangeModificationMsg"),n.Ec)}function B5(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",12),n.Oc(1,z5,2,3,"div",13),n.Wb(2,"form",14),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Wb(3,"div"),n.Wb(4,"mat-form-field"),n.Wb(5,"mat-label"),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Rb(8,"input",15),n.Vb(),n.Rb(9,"plugin-select-search",16),n.ic(10,"translate"),n.ic(11,"translate"),n.Wb(12,"div",17),n.Wb(13,"mat-form-field"),n.Wb(14,"mat-label"),n.Qc(15),n.ic(16,"translate"),n.Vb(),n.Wb(17,"input",18),n.dc("keypress",(function(e){return n.Dc(t),n.hc().onlyNumbers(e)})),n.Vb(),n.Vb(),n.Wb(18,"mat-form-field"),n.Wb(19,"mat-label"),n.Qc(20),n.ic(21,"translate"),n.Vb(),n.Wb(22,"input",19),n.dc("keypress",(function(e){return n.Dc(t),n.hc().onlyNumbers(e)})),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(23,"div",20),n.Wb(24,"button",21),n.Qc(25),n.ic(26,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(1),n.oc("ngIf","OK"===t.adminFormGroup.controls.status.value||"END"===t.adminFormGroup.controls.status.value),n.Db(1),n.oc("formGroup",t.adminFormGroup),n.Db(4),n.Rc(n.jc(7,16,"lang.trackerNumber")),n.Db(3),n.Fb(""),n.oc("showLabel",!0)("label",n.jc(10,18,"lang.registeredMailType"))("placeholderLabel",n.jc(11,20,"lang.registeredMailType"))("datas",t.registeredMailType)("formControlSelect",t.adminFormGroup.controls.registeredMailType),n.Db(6),n.Rc(n.jc(16,22,"lang.registeredMailStart")),n.Db(2),n.oc("min",t.minRange),n.Db(3),n.Rc(n.jc(21,24,"lang.registeredMailEnd")),n.Db(2),n.oc("min",t.adminFormGroup.controls.rangeStart.value),n.Db(2),n.oc("disabled",!t.adminFormGroup.valid),n.Db(1),n.Rc(n.jc(26,26,"lang.save"))}}let U5=(()=>{class t{constructor(t,e,i,n,a,s,o,r){this.translate=t,this.http=e,this.route=i,this.router=n,this.notify=a,this.headerService=s,this.appService=o,this._formBuilder=r,this.loading=!0,this.id=null,this.minRange=1,this.registeredMailType=[{id:"2D",label:this.translate.instant("lang.registeredMail_2D")},{id:"2C",label:this.translate.instant("lang.registeredMail_2C")},{id:"RW",label:this.translate.instant("lang.registeredMail_RW")}]}ngOnInit(){this.route.params.subscribe(t=>Object(r.a)(this,void 0,void 0,(function*(){void 0===t.id?(this.creationMode=!0,this.headerService.setHeader(this.translate.instant("lang.registeredMailNumberRangeCreation")),this.adminFormGroup=this._formBuilder.group({id:[null],trackerNumber:[null,X.I.required],registeredMailType:[null,X.I.required],rangeStart:[1,X.I.required],rangeEnd:[2,X.I.required],status:["SPD"]}),this.loading=!1):(this.headerService.setHeader(this.translate.instant("lang.registeredMailNumberRangeModification")),this.id=t.id,this.creationMode=!1,yield this.getData()),this.adminFormGroup.controls.registeredMailType.valueChanges.pipe(Object(mt.a)(()=>{this.creationMode&&this.getMinRange()})).subscribe(),this.adminFormGroup.controls.rangeStart.valueChanges.pipe(Object(mt.a)(t=>{t>this.adminFormGroup.controls.rangeEnd.value?this.adminFormGroup.controls.rangeStart.setErrors({rangeError:!0}):(this.adminFormGroup.controls.rangeStart.setErrors(null),this.adminFormGroup.controls.rangeEnd.setErrors(null))})).subscribe(),this.adminFormGroup.controls.rangeEnd.valueChanges.pipe(Object(mt.a)(t=>{t<this.adminFormGroup.controls.rangeStart.value?this.adminFormGroup.controls.rangeEnd.setErrors({rangeError:!0}):(this.adminFormGroup.controls.rangeStart.setErrors(null),this.adminFormGroup.controls.rangeEnd.setErrors(null))})).subscribe()})))}getData(){return new Promise(t=>{this.http.get("../rest/registeredMail/ranges/"+this.id).pipe(Object(mt.a)(e=>{this.adminFormGroup=this._formBuilder.group({id:[this.id],trackerNumber:[e.range.trackerNumber],registeredMailType:[e.range.registeredMailType],rangeStart:[e.range.rangeStart],rangeEnd:[e.range.rangeEnd],status:[e.range.status]}),"OK"!==e.range.status&&"END"!==e.range.status||this.adminFormGroup.disable(),t(!0),this.loading=!1}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()})}onlyNumbers(t){let e;return e=t.charCode,(null!==this.adminFormGroup.controls.rangeStart.value||48!==e)&&e>=48&&e<=57}getMinRange(){this.http.get(`../rest/registeredMail/ranges/type/${this.adminFormGroup.controls.registeredMailType.value}/last`).pipe(Object(mt.a)(t=>{this.minRange=1===t.lastNumber?t.lastNumber:t.lastNumber+1,this.adminFormGroup.controls.rangeStart.setValue(this.minRange),this.adminFormGroup.controls.rangeEnd.value<this.adminFormGroup.controls.rangeStart.value&&this.adminFormGroup.controls.rangeEnd.setValue(this.adminFormGroup.controls.rangeStart.value+1)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}onSubmit(){const t={};Object.keys(this.adminFormGroup.controls).forEach(e=>{t[e]=this.adminFormGroup.controls[e].value}),this.creationMode?this.http.post("../rest/registeredMail/ranges",t).subscribe(()=>{this.notify.success(this.translate.instant("lang.registeredMailNumberRangesAdded")),this.router.navigate(["/administration/registeredMails"])},t=>{this.notify.handleSoftErrors(t)}):this.http.put("../rest/registeredMail/ranges/"+this.id,t).subscribe(()=>{this.notify.success(this.translate.instant("lang.registeredMailNumberRangesUpdated")),this.router.navigate(["/administration/registeredMails"])},t=>{this.notify.handleSoftErrors(t)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.a),n.Qb(o.c),n.Qb(D.a),n.Qb(y.a),n.Qb(w.a),n.Qb(X.h))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-registered-mail"]],decls:13,vars:8,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],["class","alert-message alert-message-danger","style","min-width: 100%;",3,"innerHTML",4,"ngIf"],[2,"display","contents",3,"formGroup","ngSubmit"],["matInput","","formControlName","trackerNumber"],[3,"showLabel","label","placeholderLabel","datas","formControlSelect"],[2,"display","grid","grid-template-columns","1fr 1fr","grid-gap","20px"],["matInput","","type","number","formControlName","rangeStart",3,"min","keypress"],["matInput","","type","number","formControlName","rangeEnd",3,"min","keypress"],[2,"text-align","center"],["mat-raised-button","","color","primary","type","submit",3,"disabled"],[1,"alert-message","alert-message-danger",2,"min-width","100%",3,"innerHTML"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,N5,2,0,"div",8),n.Oc(12,B5,27,28,"mat-card",9),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,V.c,K.a,X.K,X.v,X.m,Y.c,Y.g,J.b,X.d,X.u,X.k,fr,X.A,k.b],pipes:[g.d],styles:[""]}),t})();function $5(t,e){if(1&t&&(n.Wb(0,"mat-option",40),n.Wb(1,"span",41),n.Wb(2,"span",42),n.Rb(3,"i",43),n.Vb(),n.Wb(4,"span",44),n.Qc(5),n.Vb(),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.id),n.Db(3),n.Gb("fa ",t.icon," fa-1x"),n.Db(2),n.Sc(" ",t.label," ")}}function H5(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",45),n.dc("click",(function(){return n.Dc(t),n.hc(2).toggleData()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",46),n.Vb()}2&t&&n.pc("title",n.jc(1,1,"lang.preview"))}function G5(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",45),n.dc("click",(function(){return n.Dc(t),n.hc(2).toggleData()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",47),n.Vb()}2&t&&n.pc("title",n.jc(1,1,"lang.edition"))}function X5(t,e){if(1&t){const t=n.Xb();n.Wb(0,"button",48),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).selectedTemplateDisplayedSecondaryData=i})),n.Qc(1),n.ic(2,"translate"),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.Tc("",t," ",n.jc(2,2,"lang.columns"),"")}}function q5(t,e){if(1&t&&(n.Wb(0,"mat-option",49),n.Wb(1,"span",41),n.Wb(2,"span",42),n.Rb(3,"i",43),n.Vb(),n.Wb(4,"span",44),n.Qc(5),n.Vb(),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.oc("value",t.value),n.Db(3),n.Gb("fa ",t.icon," fa-2x"),n.Db(2),n.Sc(" ",t.label," ")}}function K5(t,e){if(1&t&&(n.Wb(0,"button",63),n.Rb(1,"mat-icon",64),n.Vb()),2&t){n.hc();const t=n.zc(3);n.oc("matMenuTriggerFor",t)}}function Y5(t,e){if(1&t){const t=n.Xb();n.Wb(0,"span",53),n.Oc(1,K5,2,1,"button",54),n.Wb(2,"mat-menu",null,17),n.Wb(4,"button",48),n.dc("click",(function(){n.Dc(t);const e=n.hc(),i=e.$implicit,a=e.index;return n.hc(3).removeData(i,a)})),n.Rb(5,"mat-icon",55),n.Wb(6,"span"),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Rb(9,"mat-divider"),n.Wb(10,"button",48),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(3).setStyle(e,"boldFontData")})),n.Rb(11,"mat-icon",56),n.Wb(12,"span"),n.Qc(13),n.ic(14,"translate"),n.Vb(),n.Vb(),n.Wb(15,"button",48),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(3).setStyle(e,"align_leftData")})),n.Rb(16,"mat-icon",57),n.Wb(17,"span"),n.Qc(18),n.ic(19,"translate"),n.Vb(),n.Vb(),n.Wb(20,"button",48),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(3).setStyle(e,"align_centerData")})),n.Rb(21,"mat-icon",58),n.Wb(22,"span"),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Vb(),n.Wb(25,"button",48),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(3).setStyle(e,"align_rightData")})),n.Rb(26,"mat-icon",59),n.Wb(27,"span"),n.Qc(28),n.ic(29,"translate"),n.Vb(),n.Vb(),n.Wb(30,"button",48),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit;return n.hc(3).setStyle(e,"bigFontData")})),n.Rb(31,"mat-icon",60),n.Wb(32,"span"),n.Qc(33),n.ic(34,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(35,"span",61),n.Rb(36,"i"),n.Qc(37,"\xa0 "),n.Rb(38,"span",62),n.Vb(),n.Vb()}if(2&t){const t=n.hc(),e=t.index,i=t.$implicit,a=n.hc(3);n.oc("sortableIndex",e),n.Db(1),n.oc("ngIf","label"==a.displayMode),n.Db(6),n.Rc(n.jc(8,24,"lang.delete")),n.Db(3),n.Ib("isSelectedMenu",i.cssClasses.indexOf("boldFontData")>-1),n.Db(3),n.Rc(n.jc(14,26,"lang.fontBold")),n.Db(2),n.Ib("isSelectedMenu",i.cssClasses.indexOf("align_leftData")>-1),n.Db(3),n.Rc(n.jc(19,28,"lang.alignLeft")),n.Db(2),n.Ib("isSelectedMenu",i.cssClasses.indexOf("align_centerData")>-1),n.Db(3),n.Rc(n.jc(24,30,"lang.alignCenter")),n.Db(2),n.Ib("isSelectedMenu",i.cssClasses.indexOf("align_rightData")>-1),n.Db(3),n.Rc(n.jc(29,32,"lang.alignRight")),n.Db(2),n.Ib("isSelectedMenu",i.cssClasses.indexOf("bigFontData")>-1),n.Db(3),n.Rc(n.jc(34,34,"lang.fontBig")),n.Db(2),n.Fb(i.cssClasses.join(" ")),n.Db(1),n.Gb("fa ",i.icon,""),n.Db(2),n.oc("innerHTML",i[a.displayMode],n.Ec)}}function J5(t,e){if(1&t&&(n.Ub(0),n.Oc(1,Y5,39,36,"span",52),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf","getFolders"!=t.value)}}const Z5=function(){return["boxers-zone"]};function t6(t,e){if(1&t&&(n.Wb(0,"div",50),n.Wb(1,"mat-toolbar"),n.Oc(2,J5,2,1,"ng-container",51),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.oc("dropZones",n.uc(6,Z5))("sortableData",t.displayedSecondaryData),n.Db(1),n.Gb("secondaryInformations example-list column-",t.selectedTemplateDisplayedSecondaryData,"-list"),n.Db(1),n.oc("ngForOf",t.displayedSecondaryData)}}function e6(t,e){1&t&&n.Rb(0,"mat-icon",70)}function i6(t,e){1&t&&n.Rb(0,"mat-icon",71)}function n6(t,e){if(1&t&&(n.Wb(0,"span"),n.Oc(1,e6,1,0,"mat-icon",67),n.Oc(2,i6,1,0,"mat-icon",68),n.Rb(3,"br"),n.Wb(4,"span",69),n.Qc(5),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(1),n.oc("ngIf","label"==e.displayMode),n.Db(1),n.oc("ngIf","sample"==e.displayMode),n.Db(3),n.Rc(t[e.displayMode])}}function a6(t,e){if(1&t&&(n.Wb(0,"span"),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(1),n.Sc(" ",t[e.displayMode]," ")}}function s6(t,e){if(1&t&&(n.Wb(0,"span",65),n.Oc(1,n6,6,3,"span",66),n.Oc(2,a6,2,1,"span",66),n.Vb()),2&t){const t=e.index;n.Fb(e.$implicit.cssClasses.join(" ")),n.Db(1),n.oc("ngIf",0==t),n.Db(1),n.oc("ngIf",1==t)}}function o6(t,e){if(1&t&&(n.Wb(0,"button",63),n.Rb(1,"mat-icon",64),n.Vb()),2&t){n.hc();const t=n.zc(3);n.oc("matMenuTriggerFor",t)}}function r6(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Oc(1,o6,2,1,"button",54),n.Wb(2,"mat-menu",null,17),n.Wb(4,"button",48),n.dc("click",(function(){n.Dc(t);const e=n.hc(),i=e.$implicit,a=e.index;return n.hc(2).removeData(i,a)})),n.Rb(5,"mat-icon",55),n.Wb(6,"span"),n.Qc(7),n.ic(8,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(9,"span",73),n.Rb(10,"i",74),n.Qc(11),n.Vb(),n.Tb()}if(2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(1),n.oc("ngIf","label"==e.displayMode),n.Db(6),n.Rc(n.jc(8,3,"lang.delete")),n.Db(4),n.Sc(" ",t[e.displayMode],"")}}function c6(t,e){if(1&t&&(n.Wb(0,"div",72),n.Oc(1,r6,12,5,"ng-container",66),n.Vb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf","getFolders"==t.value)}}function l6(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",9),n.Wb(1,"mat-form-field",10),n.Wb(2,"mat-label"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Wb(5,"mat-select",11),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().selectedProcessTool.defaultTab=e})),n.Oc(6,$5,6,5,"mat-option",12),n.ic(7,"sortBy"),n.Vb(),n.Vb(),n.Rb(8,"hr"),n.Wb(9,"mat-toolbar",13),n.Wb(10,"span"),n.Oc(11,H5,3,3,"button",14),n.Oc(12,G5,3,3,"button",14),n.Wb(13,"button",15),n.ic(14,"translate"),n.Qc(15),n.Rb(16,"i",16),n.Vb(),n.Wb(17,"mat-menu",null,17),n.Oc(19,X5,3,4,"button",18),n.Vb(),n.Vb(),n.Wb(20,"span",19),n.Wb(21,"form"),n.Wb(22,"mat-form-field",20),n.Rb(23,"input",21),n.ic(24,"translate"),n.Wb(25,"mat-autocomplete",22,23),n.dc("optionSelected",(function(e){return n.Dc(t),n.hc().addData(e.option.value)})),n.Oc(27,q5,6,5,"mat-option",24),n.ic(28,"async"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Wb(29,"span"),n.Wb(30,"button",25),n.dc("click",(function(){return n.Dc(t),n.hc().removeAllData()})),n.Qc(31),n.ic(32,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(33,"mat-card"),n.Oc(34,t6,3,7,"div",26),n.Wb(35,"div",27),n.Oc(36,s6,3,4,"span",28),n.Wb(37,"mat-button-toggle-group",29),n.Wb(38,"button",30),n.ic(39,"translate"),n.Rb(40,"mat-icon",31),n.Vb(),n.Wb(41,"button",30),n.ic(42,"translate"),n.Rb(43,"mat-icon",32),n.Vb(),n.Wb(44,"button",30),n.ic(45,"translate"),n.Rb(46,"mat-icon",33),n.Vb(),n.Wb(47,"button",30),n.ic(48,"translate"),n.Rb(49,"mat-icon",34),n.Vb(),n.Vb(),n.Vb(),n.Oc(50,c6,2,1,"div",35),n.Vb(),n.Wb(51,"div",36),n.Wb(52,"div",37),n.Wb(53,"button",38),n.dc("click",(function(){return n.Dc(t),n.hc().saveTemplate()})),n.Qc(54),n.ic(55,"translate"),n.Vb(),n.Wb(56,"button",39),n.dc("click",(function(){return n.Dc(t),n.hc().cancelModification()})),n.Qc(57),n.ic(58,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(18),e=n.zc(26),i=n.hc();n.Db(3),n.Rc(n.jc(4,32,"lang.tabProcessPosition")),n.Db(2),n.oc("ngModel",i.selectedProcessTool.defaultTab),n.Db(1),n.oc("ngForOf",n.kc(7,34,i.processTool,"label")),n.Db(5),n.oc("ngIf","label"==i.displayMode),n.Db(1),n.oc("ngIf","sample"==i.displayMode),n.Db(1),n.oc("title",n.jc(14,37,"lang.templateUsed"))("matMenuTriggerFor",t),n.Db(2),n.Sc(" ",i.selectedTemplateDisplayedSecondaryData," "),n.Db(4),n.oc("ngForOf",i.templateDisplayedSecondaryData),n.Db(4),n.pc("placeholder",n.jc(24,39,"lang.availableDatas")),n.oc("formControl",i.dataControl)("matAutocomplete",e),n.Db(4),n.oc("ngForOf",n.jc(28,41,i.filteredDataOptions)),n.Db(3),n.oc("disabled","sample"==i.displayMode),n.Db(1),n.Sc(" ",n.jc(32,43,"lang.eraseAll")," "),n.Db(3),n.oc("ngIf",i.displayedSecondaryData.length>0),n.Db(2),n.oc("ngForOf",i.displayedMainData),n.Db(2),n.pc("title",n.jc(39,45,"lang.notes")),n.oc("disabled","label"==i.displayMode),n.Db(2),n.oc("matBadgeHidden","label"==i.displayMode),n.Db(1),n.pc("title",n.jc(42,47,"lang.attachments")),n.oc("disabled","label"==i.displayMode),n.Db(2),n.oc("matBadgeHidden","label"==i.displayMode),n.Db(1),n.pc("title",n.jc(45,49,"lang.diffusionList")),n.oc("disabled","label"==i.displayMode),n.Db(3),n.pc("title",n.jc(48,51,"lang.linkDetails")),n.oc("disabled","label"==i.displayMode),n.Db(3),n.oc("ngForOf",i.displayedSecondaryData),n.Db(3),n.oc("disabled",i.checkModif()),n.Db(1),n.Sc(" ",n.jc(55,53,"lang.validate")," "),n.Db(2),n.oc("disabled",i.checkModif()),n.Db(1),n.Sc(" ",n.jc(58,55,"lang.cancel")," ")}}let d6=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.appService=n,this.headerService=a,this.functions=s,this.loading=!0,this.customFieldsFormControl=new X.i({value:"",disabled:!1}),this.displayedMainData=[{value:"chronoNumberShort",label:this.translate.instant("lang.chronoNumberShort"),sample:"MAARCH/2019A/1",cssClasses:["align_centerData","normalData"],icon:""},{value:"object",label:this.translate.instant("lang.object"),sample:this.translate.instant("lang.objectSample"),cssClasses:["longData"],icon:""}],this.availableData=[{value:"getPriority",label:this.translate.instant("lang.getPriority"),sample:this.translate.instant("lang.getPrioritySample"),cssClasses:["align_leftData"],icon:"fa-traffic-light"},{value:"getCategory",label:this.translate.instant("lang.getCategory"),sample:this.translate.instant("lang.incoming"),cssClasses:["align_leftData"],icon:"fa-exchange-alt"},{value:"getDoctype",label:this.translate.instant("lang.getDoctype"),sample:this.translate.instant("lang.getDoctypeSample"),cssClasses:["align_leftData"],icon:"fa-suitcase"},{value:"getAssignee",label:this.translate.instant("lang.getAssignee"),sample:this.translate.instant("lang.getAssigneeSample"),cssClasses:["align_leftData"],icon:"fa-sitemap"},{value:"getRecipients",label:this.translate.instant("lang.getRecipients"),sample:"Patricia PETIT",cssClasses:["align_leftData"],icon:"fa-user"},{value:"getSenders",label:this.translate.instant("lang.getSenders"),sample:"Alain DUBOIS (MAARCH)",cssClasses:["align_leftData"],icon:"fa-book"},{value:"getCreationAndProcessLimitDates",label:this.translate.instant("lang.getCreationAndProcessLimitDates"),sample:this.translate.instant("lang.getCreationAndProcessLimitDatesSample"),cssClasses:["align_leftData"],icon:"fa-calendar"},{value:"getVisaWorkflow",label:this.translate.instant("lang.getVisaWorkflow"),sample:'<i color="accent" class="fa fa-check"></i> Barbara BAIN -> <i class="fa fa-hourglass-half"></i> <b>Bruno BOULE</b> -> <i class="fa fa-hourglass-half"></i> Patricia PETIT',cssClasses:["align_leftData"],icon:"fa-list-ol"},{value:"getSignatories",label:this.translate.instant("lang.getSignatories"),sample:"Denis DAULL, Patricia PETIT",cssClasses:["align_leftData"],icon:"fa-certificate"},{value:"getModificationDate",label:this.translate.instant("lang.getModificationDate"),sample:"01-01-2019",cssClasses:["align_leftData"],icon:"fa-calendar-check"},{value:"getOpinionLimitDate",label:this.translate.instant("lang.getOpinionLimitDate"),sample:"01-01-2019",cssClasses:["align_leftData"],icon:"fa-stopwatch"},{value:"getParallelOpinionsNumber",label:this.translate.instant("lang.getParallelOpinionsNumber"),sample:this.translate.instant("lang.getParallelOpinionsNumberSample"),cssClasses:["align_leftData"],icon:"fa-comment-alt"},{value:"getFolders",label:this.translate.instant("lang.getFolders"),sample:this.translate.instant("lang.getFoldersSample"),cssClasses:["align_leftData"],icon:"fa-folder"},{value:"getResId",label:this.translate.instant("lang.getResId"),sample:this.translate.instant("lang.getResIdSample"),cssClasses:["align_leftData"],icon:"fa-envelope"},{value:"getBarcode",label:this.translate.instant("lang.getBarcode"),sample:this.translate.instant("lang.getBarcodeSample"),cssClasses:["align_leftData"],icon:"fa-barcode"}],this.availableDataClone=[],this.displayedSecondaryData=[],this.displayedSecondaryDataClone=[],this.displayMode="label",this.dataControl=new X.i,this.listEvent=[{id:"detailDoc",value:"documentDetails"},{id:"eventVisaMail",value:"signatureBookAction"},{id:"eventProcessDoc",value:"processDocument"},{id:"eventViewDoc",value:"viewDoc"}],this.templateDisplayedSecondaryData=[2,3,4,5,6,7],this.selectedTemplateDisplayedSecondaryData=7,this.selectedTemplateDisplayedSecondaryDataClone=7,this.selectedListEvent=null,this.selectedListEventClone=null,this.processTool=[{id:"dashboard",icon:"fas fa-columns",label:this.translate.instant("lang.newsFeed")},{id:"history",icon:"fas fa-history",label:this.translate.instant("lang.history")},{id:"notes",icon:"fas fa-pen-square",label:this.translate.instant("lang.notesAlt")},{id:"attachments",icon:"fas fa-paperclip",label:this.translate.instant("lang.attachments")},{id:"linkedResources",icon:"fas fa-link",label:this.translate.instant("lang.links")},{id:"diffusionList",icon:"fas fa-share-alt",label:this.translate.instant("lang.diffusionList")},{id:"emails",icon:"fas fa-envelope",label:this.translate.instant("lang.mailsSentAlt")},{id:"visaCircuit",icon:"fas fa-list-ol",label:this.translate.instant("lang.visaWorkflow")},{id:"opinionCircuit",icon:"fas fa-comment-alt",label:this.translate.instant("lang.avis")},{id:"info",icon:"fas fa-info-circle",label:this.translate.instant("lang.informations")}],this.selectedProcessTool={defaultTab:null,canUpdateData:!1,canUpdateModel:!1,canUpdateDocuments:!1},this.selectedProcessToolClone=null,this.searchAdv={listEvent:{},listDisplay:{},list_event_data:{}}}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.headerService.setHeader(this.translate.instant("lang.searchAdministration")),yield this.initCustomFields(),yield this.getTemplate(),this.availableDataClone=JSON.parse(JSON.stringify(this.availableData)),this.selectedTemplateDisplayedSecondaryDataClone=this.selectedTemplateDisplayedSecondaryData,this.selectedListEvent=this.searchAdv.listEvent,this.selectedListEventClone=this.selectedListEvent,this.selectedProcessToolClone=JSON.parse(JSON.stringify(this.selectedProcessTool)),this.displayedSecondaryDataClone=JSON.parse(JSON.stringify(this.displayedSecondaryData)),setTimeout(()=>{this.filteredDataOptions=this.dataControl.valueChanges.pipe(Object(Qe.a)(""),Object(l.a)(t=>this._filterData(t)))},0),this.loading=!1}))}initCustomFields(){return new Promise((t,e)=>{this.http.get("../rest/customFields").pipe(Object(l.a)(t=>(t.customFields=t.customFields.map(t=>({value:"indexingCustomField_"+t.id,label:t.label,sample:this.translate.instant("lang.customField")+t.id,cssClasses:["align_leftData"],icon:"fa-hashtag"})),t.customFields)),Object(mt.a)(e=>{this.availableData=this.availableData.concat(e),t(!0)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()})}toggleData(){this.dataControl.disabled?this.dataControl.enable():this.dataControl.disable(),this.displayMode="label"===this.displayMode?"sample":"label"}setStyle(t,e){const i=e.split("_");2===i.length&&t.cssClasses.forEach((n,a)=>{n.includes(i[0])&&n!==e&&t.cssClasses.splice(a,1)});const n=t.cssClasses.indexOf(e);-1===n?t.cssClasses.push(e):t.cssClasses.splice(n,1)}addData(t){const e=this.availableData.map(t=>t.value).indexOf(t);this.displayedSecondaryData.push(this.availableData.filter(e=>e.value===t)[0]),this.availableData.splice(e,1),$("#availableData").blur(),this.dataControl.setValue("")}removeData(t,e){this.availableData.push(t),this.displayedSecondaryData.splice(e,1),this.dataControl.setValue("")}removeAllData(){this.displayedSecondaryData=this.displayedSecondaryData.concat(),this.availableData=this.availableData.concat(this.displayedSecondaryData),this.dataControl.setValue(""),this.displayedSecondaryData=[]}drop(t){t.previousContainer===t.container?Object(lo.h)(t.container.data,t.previousIndex,t.currentIndex):(Object(lo.i)(t.previousContainer.data,t.container.data,t.previousIndex,t.currentIndex-1),this.displayedSecondaryData.forEach((t,e)=>{t.length>this.selectedTemplateDisplayedSecondaryData?Object(lo.i)(t,this.displayedSecondaryData[e+1],t.length,0):t.length<this.selectedTemplateDisplayedSecondaryData&&!this.functions.empty(this.displayedSecondaryData[e+1])&&Object(lo.i)(this.displayedSecondaryData[e+1],t,0,t.length)}))}getTemplate(){return this.displayedSecondaryData=[],new Promise((t,e)=>{this.http.get("../rest/search/configuration").pipe(Object(mt.a)(e=>{this.selectedTemplateDisplayedSecondaryData=e.configuration.listDisplay.templateColumns,this.selectedProcessTool.defaultTab=e.configuration.listEvent.defaultTab,e.configuration.listDisplay.subInfos.forEach(t=>{this.addData(t.value),this.displayedSecondaryData[this.displayedSecondaryData.length-1].cssClasses=t.cssClasses}),t(!0)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()})}saveTemplate(){const t={templateColumns:this.selectedTemplateDisplayedSecondaryData,subInfos:this.displayedSecondaryData};this.selectedListEvent=JSON.parse(JSON.stringify({defaultTab:this.selectedProcessTool.defaultTab})),this.http.put("../rest/configurations/admin_search ",{listDisplay:t,listEvent:this.selectedListEvent,list_event_data:this.selectedProcessTool}).subscribe(()=>{this.displayedSecondaryDataClone=JSON.parse(JSON.stringify(this.displayedSecondaryData)),this.searchAdv.listDisplay=this.displayedSecondaryData,this.searchAdv.listEvent=this.selectedListEvent,this.selectedListEventClone=this.selectedListEvent,this.searchAdv.list_event_data=this.selectedProcessTool,this.selectedProcessToolClone=JSON.parse(JSON.stringify(this.selectedProcessTool)),this.selectedTemplateDisplayedSecondaryDataClone=JSON.parse(JSON.stringify(this.selectedTemplateDisplayedSecondaryData)),this.notify.success(this.translate.instant("lang.modificationsProcessed"))},t=>{this.notify.error(t.error.errors)})}_filterData(t){let e="";return"string"==typeof t?e=t.toLowerCase():null!==t&&(e=t.label.toLowerCase()),this.availableData.filter(t=>t.label.toLowerCase().includes(e))}checkModif(){return JSON.stringify(this.displayedSecondaryData)===JSON.stringify(this.displayedSecondaryDataClone)&&this.selectedListEvent===this.selectedListEventClone&&JSON.stringify(this.selectedProcessTool)===JSON.stringify(this.selectedProcessToolClone)&&JSON.stringify(this.selectedTemplateDisplayedSecondaryData)===JSON.stringify(this.selectedTemplateDisplayedSecondaryDataClone)}cancelModification(){this.displayedSecondaryData=JSON.parse(JSON.stringify(this.displayedSecondaryDataClone)),this.selectedListEvent=this.selectedListEventClone,this.selectedProcessTool=JSON.parse(JSON.stringify(this.selectedProcessToolClone)),this.availableData=JSON.parse(JSON.stringify(this.availableDataClone)),this.selectedTemplateDisplayedSecondaryData=JSON.parse(JSON.stringify(this.selectedTemplateDisplayedSecondaryDataClone)),this.dataControl.setValue("")}hasFolder(){return this.displayedSecondaryData.map(t=>t.value).indexOf("getFolders")>-1}changeEventList(t){this.selectedProcessTool="processDocument"===t.value?{defaultTab:"dashboard"}:{}}toggleCanUpdate(t){t||(this.selectedProcessTool.canUpdateModel=t)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(w.a),n.Qb(y.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:12,vars:7,consts:[["autosize","",1,"maarch-container"],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["class","card-app-content",4,"ngIf"],[1,"card-app-content"],["appearance","outline"],[3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"editorTool"],["color","primary","mat-icon-button","",3,"title","click",4,"ngIf"],["color","primary","mat-button","",3,"title","matMenuTriggerFor"],[1,"fas","fa-columns"],["menu","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],[1,"area"],["appearance","outline","floatLabel","never"],["id","availableData","name","availableData","type","text","matInput","",3,"formControl","placeholder","matAutocomplete"],[3,"optionSelected"],["auto","matAutocomplete"],["class","dataList",3,"value",4,"ngFor","ngForOf"],["color","warn","mat-button","",2,"float","right",3,"disabled","click"],["dnd-sortable-container","","style","border: solid 1px #F9983066;border-radius: 4px;",3,"dropZones","sortableData",4,"ngIf"],[1,"resultRow","newRow"],["class","resultCol",3,"class",4,"ngFor","ngForOf"],["multiple","",1,"actions"],["color","primary","mat-icon-button","",3,"title","disabled"],["fontSet","fas","matBadge","2","fontIcon","fa-comments fa-2x",3,"matBadgeHidden"],["fontSet","fas","matBadge","7","fontIcon","fa-paperclip fa-2x",3,"matBadgeHidden"],["fontSet","fas","fontIcon","fa-sitemap fa-2x"],["fontSet","fas","fontIcon","fa-info-circle fa-2x"],["class","folder-info",4,"ngFor","ngForOf"],[1,"row"],[1,"col-md-12","text-center",2,"margin-top","30px"],["color","primary","mat-raised-button","",3,"disabled","click"],["color","default","mat-raised-button","",3,"disabled","click"],[3,"value"],[1,"optionContent"],[1,"dataIcon"],["color","primary"],[1,"dataLabel"],["color","primary","mat-icon-button","",3,"title","click"],["fontSet","fas","fontIcon","fa-eye"],["fontSet","fas","fontIcon","fa-edit"],["mat-menu-item","",3,"click"],[1,"dataList",3,"value"],["dnd-sortable-container","",2,"border","solid 1px #F9983066","border-radius","4px",3,"dropZones","sortableData"],[4,"ngFor","ngForOf"],["class","example-box","dnd-sortable","",3,"sortableIndex",4,"ngIf"],["dnd-sortable","",1,"example-box",3,"sortableIndex"],["color","primary","mat-icon-button","",3,"matMenuTriggerFor",4,"ngIf"],["color","warn","fontSet","fas","fontIcon","fa-trash fa-2x",1,"secondaryInformations_icon"],["fontSet","fas","fontIcon","fa-bold fa-2x",1,"secondaryInformations_icon"],["fontSet","fas","fontIcon","fa-align-left fa-2x",1,"secondaryInformations_icon"],["fontSet","fas","fontIcon","fa-align-center fa-2x",1,"secondaryInformations_icon"],["fontSet","fas","fontIcon","fa-align-right fa-2x",1,"secondaryInformations_icon"],["fontSet","fas","fontIcon","fa-text-height fa-2x",1,"secondaryInformations_icon"],[2,"width","100%"],[1,"secondaryInformations_label",3,"innerHTML"],["color","primary","mat-icon-button","",3,"matMenuTriggerFor"],["fontSet","fas","fontIcon","fa-ellipsis-v fa-2x"],[1,"resultCol"],[4,"ngIf"],["color","primary","class","fm fm-letter fm-2x",4,"ngIf"],["color","warn","class","fm fm-letter-status-inprogress fm-2x",4,"ngIf"],[1,"resultCol_chrono"],["color","primary",1,"fm","fm-letter","fm-2x"],["color","warn",1,"fm","fm-letter-status-inprogress","fm-2x"],[1,"folder-info"],[1,"badge","badge-folder"],[1,"fa","fa-folder"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Wb(1,"mat-sidenav-content"),n.Wb(2,"div",1),n.Wb(3,"div",2),n.Wb(4,"div",3),n.Rb(5,"header-left"),n.Vb(),n.Wb(6,"div",4),n.Rb(7,"header-right"),n.Vb(),n.Vb(),n.Rb(8,"div",5),n.Vb(),n.Wb(9,"div",6),n.Wb(10,"div",7),n.Oc(11,l6,59,57,"mat-card",8),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(3),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,K.a,Y.c,Y.g,ee.a,X.u,X.x,P.s,M.a,k.b,ne.d,ne.e,X.K,X.v,X.w,J.b,X.d,Ne.d,X.j,Ne.a,og.b,S.a,wt.a,W.p,ne.b,Ee.f,Ee.e,T.a],pipes:[g.d,Wt.a,P.b],styles:[".availableData[_ngcontent-%COMP%]{margin:10px;display:flex}.secondaryInformations[_ngcontent-%COMP%]{font-size:10px;height:30px;color:#666}.secondaryInformations_icon[_ngcontent-%COMP%]{height:auto}.secondaryInformations_label[_ngcontent-%COMP%]{width:100%}.resultRow[_ngcontent-%COMP%]{align-items:center;display:flex;padding:5px}.resultRow-mobile[_ngcontent-%COMP%]{font-size:80%}.resultCol[_ngcontent-%COMP%]{flex:1;overflow:hidden;text-overflow:ellipsis}.resultCol-mobile[_ngcontent-%COMP%]{overflow:inherit;text-overflow:inherit;word-break:break-all}.resultCol_chrono[_ngcontent-%COMP%]{color:rgba(0,0,0,.4);font-size:90%}.actions[_ngcontent-%COMP%]{text-align:right;box-shadow:none;border:none;flex:1;justify-content:flex-end;overflow:inherit}.elemToDrag[_ngcontent-%COMP%]{flex:1;border:1px dashed;padding:10px;height:10px;line-height:0;cursor:move;margin-right:5px;margin-left:5px}.columns[_ngcontent-%COMP%]{width:100%;height:90px;padding:20px 10px;border-bottom:1px solid #ccc;color:rgba(0,0,0,.87);display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;background:#fff;font-size:14px}.mat-badge-content[_ngcontent-%COMP%]{background:#f99830}.example-list[_ngcontent-%COMP%]{display:grid;gap:10px;height:auto;max-width:100%;font-size:10px;background:#f5f5f5}.example-box[_ngcontent-%COMP%]{color:#666;display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;cursor:move;background:#f5f5f5;flex-grow:1;flex-basis:0;height:20px}.cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .25s cubic-bezier(0,0,.2,1)}.example-box[_ngcontent-%COMP%]:last-child{border:none}.example-list.cdk-drop-list-dragging[_ngcontent-%COMP%] .example-box[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.editorTool[_ngcontent-%COMP%]{display:flex;height:44px;font-size:10px;margin-bottom:30px}.editorTool[_ngcontent-%COMP%] .area[_ngcontent-%COMP%]{flex:1}.editorTool[_ngcontent-%COMP%] .area[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{width:100%}.editorTool[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{border-left:1px solid #666;height:70%;margin-left:10px;margin-right:10px}.editorTool[_ngcontent-%COMP%] .mat-form-field[_ngcontent-%COMP%]{height:35px}.editorTool[_ngcontent-%COMP%] .mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline{background:inherit}.editorTool[_ngcontent-%COMP%] .mat-form-field-outline{background:#fff}.optionContent[_ngcontent-%COMP%]{display:flex!important}.optionContent[_ngcontent-%COMP%] .dataIcon[_ngcontent-%COMP%]{width:30px}.optionContent[_ngcontent-%COMP%] .dataIcon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:14px}.optionContent[_ngcontent-%COMP%] .dataLabel[_ngcontent-%COMP%]{flex:1}.isSelectedMenu[_ngcontent-%COMP%]{background:rgba(249,152,48,.14)}.align_leftData[_ngcontent-%COMP%]{text-align:left}.align_centerData[_ngcontent-%COMP%]{text-align:center}.align_rightData[_ngcontent-%COMP%]{text-align:right}.boldFontData[_ngcontent-%COMP%]{font-weight:700}.bigFontData[_ngcontent-%COMP%]{font-size:14px}.smallFontData[_ngcontent-%COMP%]{font-size:10px}.normalData[_ngcontent-%COMP%]{flex:1}.longData[_ngcontent-%COMP%]{flex:3}.badge-folder[_ngcontent-%COMP%]{cursor:default;background:#135f7f;margin:5px;font-size:8px;max-width:250px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),t})();const h6=["adminMenuTemplate"];function u6(t,e){if(1&t&&(n.Wb(0,"a",12),n.Rb(1,"mat-icon",13),n.Wb(2,"p",14),n.Qc(3),n.Vb(),n.Vb()),2&t){const t=e.$implicit;n.Ib("active",t.current),n.oc("routerLink",t.route),n.Db(1),n.Fb(t.icon),n.Db(2),n.Sc(" ",t.label," ")}}function p6(t,e){if(1&t&&(n.Wb(0,"mat-nav-list"),n.Oc(1,u6,4,6,"a",11),n.Vb()),2&t){const t=n.hc();n.Db(1),n.oc("ngForOf",t.subMenus)}}function b6(t,e){1&t&&(n.Wb(0,"div",15),n.Rb(1,"mat-spinner",16),n.Vb())}function f6(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-form-field"),n.Wb(1,"input",28),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.ssoId=i})),n.Vb(),n.Wb(2,"mat-hint"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=e.index;n.Db(1),n.qc("name","input_",i,""),n.oc("ngModel",t.ssoId)("placeholder",t.maarchId),n.Db(2),n.Rc(n.jc(4,4,t.desc))}}function m6(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-card",17),n.Wb(1,"form",18,19),n.dc("ngSubmit",(function(){return n.Dc(t),n.hc().onSubmit()})),n.Wb(3,"mat-form-field",20),n.Wb(4,"mat-label"),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Wb(7,"input",21),n.dc("ngModelChange",(function(e){return n.Dc(t),n.hc().sso.url=e})),n.Vb(),n.Wb(8,"mat-hint"),n.Qc(9),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Wb(11,"mat-expansion-panel",22),n.Wb(12,"mat-expansion-panel-header"),n.Wb(13,"mat-panel-title",23),n.Qc(14),n.ic(15,"translate"),n.Vb(),n.Vb(),n.Oc(16,f6,5,6,"mat-form-field",24),n.Vb(),n.Wb(17,"div",25),n.Wb(18,"button",26),n.Qc(19),n.ic(20,"translate"),n.Vb(),n.Wb(21,"button",27),n.dc("click",(function(){return n.Dc(t),n.hc().cancel()})),n.Qc(22),n.ic(23,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(2),e=n.hc();n.Db(5),n.Rc(n.jc(6,9,"lang.ssoUrl")),n.Db(2),n.oc("ngModel",e.sso.url),n.Db(2),n.Rc(n.jc(10,11,"lang.ssoUrlDesc")),n.Db(5),n.Sc(" ",n.jc(15,13,"lang.mappingHeaders")," "),n.Db(2),n.oc("ngForOf",e.sso.mapping),n.Db(2),n.oc("disabled",!e.isValid(t)),n.Db(1),n.Rc(n.jc(20,15,"lang.validate")),n.Db(2),n.oc("disabled",!e.isValid(t)),n.Db(1),n.Rc(n.jc(23,17,"lang.cancel"))}}let g6=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c){this.translate=t,this.http=e,this.notify=i,this.appService=n,this.headerService=a,this.viewContainerRef=s,this.adminService=o,this.dialog=r,this.authService=c,this.loading=!0,this.subMenus=[{icon:"fas fa-users-cog",route:"/administration/connections/sso",label:this.translate.instant("lang.sso"),current:!0}],this.sso={url:"",mapping:[{maarchId:"login",ssoId:"id",desc:"lang.fieldUserIdDescSso"}]}}ngOnInit(){this.headerService.injectInSideBarLeft(this.adminMenuTemplate,this.viewContainerRef,"adminMenu"),this.headerService.setHeader(this.translate.instant("lang.administration")+" "+this.translate.instant("lang.ssoConnections")),this.getConnection()}getConnection(){this.http.get("../rest/configurations/admin_sso").pipe(Object(mt.a)(t=>{this.sso=t.configuration.value,this.ssoClone=JSON.parse(JSON.stringify(this.sso)),this.loading=!1}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}isValid(t){return t.form.valid&&JSON.stringify(this.sso)!==JSON.stringify(this.ssoClone)}cancel(){this.sso=JSON.parse(JSON.stringify(this.ssoClone))}formatData(){const t=JSON.parse(JSON.stringify(this.sso));return t.mapping=t.mapping.map(t=>(delete t.desc,t)),t}onSubmit(){this.formatData(),"sso"!==this.authService.authMode?this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.warning")+" !",msg:this.translate.instant("lang.warningConnectionMsg")}}).afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.put("../rest/configurations/admin_sso",this.formatData())),Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.dataUpdated")),this.ssoClone=JSON.parse(JSON.stringify(this.sso))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe():this.http.put("../rest/configurations/admin_sso",this.formatData()).pipe(Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.dataUpdated")),this.ssoClone=JSON.parse(JSON.stringify(this.sso))}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(w.a),n.Qb(y.a),n.Qb(n.T),n.Qb(OL),n.Qb(q.b),n.Qb(_.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-sso-administration"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(h6,!0),n.Xc(Kt.a,!0),n.Xc(Fe.a,!0)),2&t&&(n.yc(i=n.ec())&&(e.adminMenuTemplate=i.first),n.yc(i=n.ec())&&(e.paginator=i.first),n.yc(i=n.ec())&&(e.sort=i.first))},decls:15,vars:8,consts:[["autosize","",1,"maarch-container"],["adminMenuTemplate",""],[1,"bg-head"],[1,"bg-head-title"],[1,"bg-head-title-label"],[1,"bg-head-title-tool"],[1,"bg-head-content"],[1,"container"],[1,"container-content"],["style","display:flex;height:100%;",4,"ngIf"],["class","card-app-content",4,"ngIf"],["mat-list-item","",3,"active","routerLink",4,"ngFor","ngForOf"],["mat-list-item","",3,"routerLink"],["color","primary","mat-list-icon",""],["mat-line",""],[2,"display","flex","height","100%"],[2,"margin","auto"],[1,"card-app-content"],[2,"display","contents",3,"ngSubmit"],["ssoForm","ngForm"],["appearance","outline"],["matInput","","name","ssoUrl",3,"ngModel","ngModelChange"],["expanded","",2,"margin-top","10px"],["color","primary"],[4,"ngFor","ngForOf"],[1,"text-center",2,"padding","10px"],["mat-raised-button","","color","primary",3,"disabled"],["mat-raised-button","","type","button","color","default",3,"disabled","click"],["matInput","","required","",3,"name","ngModel","placeholder","ngModelChange"]],template:function(t,e){1&t&&(n.Wb(0,"mat-sidenav-container",0),n.Oc(1,p6,2,1,"ng-template",null,1,n.Pc),n.Wb(3,"mat-sidenav-content"),n.Wb(4,"div",2),n.Wb(5,"div",3),n.Wb(6,"div",4),n.Rb(7,"header-left"),n.Vb(),n.Wb(8,"div",5),n.Rb(9,"header-right"),n.Vb(),n.Vb(),n.Rb(10,"div",6),n.Vb(),n.Wb(11,"div",7),n.Wb(12,"div",8),n.Oc(13,b6,2,0,"div",9),n.Oc(14,m6,24,19,"mat-card",10),n.Vb(),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.Ib("customContainerRight",e.appService.getViewMode()),n.Db(5),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(1),n.Ib("fullContainer",e.appService.getViewMode()),n.Db(2),n.oc("ngIf",e.loading),n.Db(1),n.oc("ngIf",!e.loading))},directives:[I.e,I.f,Ot,We,P.t,R.h,P.s,R.d,o.f,S.a,R.c,W.l,V.c,K.a,X.K,X.v,X.w,Y.c,Y.g,J.b,X.d,X.u,X.x,Y.f,gt.c,gt.g,gt.h,k.b,X.F],pipes:[g.d],styles:[".active[_ngcontent-%COMP%], .active[_ngcontent-%COMP%]:active, .active[_ngcontent-%COMP%]:focus, .active[_ngcontent-%COMP%]:hover{color:#135f7f;border-left:5px solid #135f7f;background:rgba(19,95,127,.14)}"]}),t})(),v6=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[o.g.forChild([{path:"administration",canActivate:[x],component:NF},{path:"administration/users",canActivate:[x],component:YL},{path:"administration/users/new",canActivate:[x],component:kN},{path:"administration/users/:id",canActivate:[x],component:kN},{path:"administration/groups",canActivate:[x],component:UN},{path:"administration/groups/new",canActivate:[x],component:zz},{path:"administration/groups/:id",canActivate:[x],component:zz},{path:"administration/baskets",canActivate:[x],component:oB},{path:"administration/baskets/new",canActivate:[x],component:lU},{path:"administration/baskets/:id",canActivate:[x],component:lU},{path:"administration/doctypes",canActivate:[x],component:TU},{path:"administration/diffusionModels",canActivate:[x],component:JU},{path:"administration/diffusionModels/new",canActivate:[x],component:c$},{path:"administration/diffusionModels/:id",canActivate:[x],component:c$},{path:"administration/entities",canActivate:[x],component:gH},{path:"administration/statuses",canActivate:[x],component:WH},{path:"administration/statuses/new",canActivate:[x],component:BH},{path:"administration/statuses/:identifier",canActivate:[x],component:BH},{path:"administration/parameters",canActivate:[x],component:GG},{path:"administration/parameters/new",canActivate:[x],component:DG},{path:"administration/parameters/:id",canActivate:[x],component:DG},{path:"administration/priorities",canActivate:[x],component:hX},{path:"administration/priorities/new",canActivate:[x],component:bX},{path:"administration/priorities/:id",canActivate:[x],component:bX},{path:"administration/actions",canActivate:[x],component:rG},{path:"administration/actions/new",canActivate:[x],component:vG},{path:"administration/actions/:id",canActivate:[x],component:vG},{path:"administration/notifications",canActivate:[x],component:QX},{path:"administration/notifications/new",canActivate:[x],component:yq},{path:"administration/notifications/:identifier",canActivate:[x],component:yq},{path:"administration/history",canActivate:[x],component:Iq},{path:"administration/history-batch",canActivate:[x],component:cK},{path:"administration/update-status",canActivate:[x],component:bK},{path:"administration/contacts",canActivate:[x],component:o3},{path:"administration/contacts/duplicates",canActivate:[x],component:Q4},{path:"administration/contacts/list",redirectTo:"contacts",pathMatch:"full"},{path:"administration/contacts/list/new",canActivate:[x],component:W3},{path:"administration/contacts/list/:id",canActivate:[x],component:W3},{path:"administration/contacts/contactsCustomFields",canActivate:[x],component:P3},{path:"administration/contacts/contacts-groups",canActivate:[x],component:LK},{path:"administration/contacts/contacts-groups/new",canActivate:[x],component:mY},{path:"administration/contacts/contacts-groups/:id",canActivate:[x],component:mY},{path:"administration/contacts/contacts-parameters",canActivate:[x],component:LY},{path:"administration/versions-update",canActivate:[x],component:qY},{path:"administration/docservers",canActivate:[x],component:oJ},{path:"administration/docservers/new",canActivate:[x],component:dJ},{path:"administration/templates",canActivate:[x],component:IJ},{path:"administration/templates/new",canActivate:[x],component:mZ},{path:"administration/templates/:id",canActivate:[x],component:mZ},{path:"administration/securities",canActivate:[x],component:yZ},{path:"administration/sendmail",canActivate:[x],component:AZ},{path:"administration/shippings",canActivate:[x],component:qZ},{path:"administration/shippings/new",canActivate:[x],component:s1},{path:"administration/shippings/:id",canActivate:[x],component:s1},{path:"administration/customFields",canActivate:[x],component:N1},{path:"administration/indexingModels",canActivate:[x],component:a2},{path:"administration/indexingModels/new",canActivate:[x],component:O0},{path:"administration/indexingModels/:id",canActivate:[x],component:O0},{path:"administration/tags",canActivate:[x],component:H3},{path:"administration/tags/new",canActivate:[x],component:Z3},{path:"administration/tags/:id",canActivate:[x],component:Z3},{path:"administration/alfresco",canActivate:[x],component:_4},{path:"administration/alfresco/new",canActivate:[x],component:s4},{path:"administration/alfresco/:id",canActivate:[x],component:s4},{path:"administration/registeredMails",canActivate:[x],component:Q5},{path:"administration/registeredMails/new",canActivate:[x],component:U5},{path:"administration/registeredMails/:id",canActivate:[x],component:U5},{path:"administration/issuingSites",canActivate:[x],component:i5},{path:"administration/issuingSites/new",canActivate:[x],component:u5},{path:"administration/issuingSites/:id",canActivate:[x],component:u5},{path:"administration/search",canActivate:[x],component:d6},{path:"administration/connections/sso",canActivate:[x],component:g6}])],o.g]}),t})();function _6(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-nav-list"),n.Wb(1,"a",1),n.dc("click",(function(){return n.Dc(t),n.hc().backClicked()})),n.Rb(2,"mat-icon",2),n.Wb(3,"p",3),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Vb()}2&t&&(n.Db(4),n.Sc(" ",n.jc(5,1,"lang.back")," "))}function y6(t,e){1&t&&n.Rb(0,"mat-divider")}let x6=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this._router=i,this.activatedRoute=n,this._location=a,this.user={},this.router=i}ngOnInit(){}backClicked(){this._location.back()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(o.c),n.Qb(o.a),n.Qb(P.n))},t.\u0275cmp=n.Kb({type:t,selectors:[["menu-nav"]],decls:2,vars:2,consts:[[4,"ngIf"],["mat-list-item","",3,"click"],["color","primary","mat-list-icon","",1,"fa","fa-chevron-left"],["mat-line",""]],template:function(t,e){1&t&&(n.Oc(0,_6,6,3,"mat-nav-list",0),n.Oc(1,y6,1,0,"mat-divider",0)),2&t&&(n.oc("ngIf","/home"!=e.router.url&&"/profile"!=e.router.url&&"/about-us"!=e.router.url&&"/administration"!=e.router.url&&-1==e.router.url.indexOf("/basketList")&&-1==e.router.url.indexOf("/folders")&&"/followed"!=e.router.url),n.Db(1),n.oc("ngIf","/home"!=e.router.url&&"/about-us"!=e.router.url&&"/administration"!=e.router.url&&-1==e.router.url.indexOf("/basketList")&&-1==e.router.url.indexOf("/folders")))},directives:[P.t,R.h,R.d,S.a,R.c,W.l,T.a],pipes:[g.d],encapsulation:2}),t})();function C6(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",8),n.Wb(1,"button",9),n.dc("click",(function(){return n.Dc(t),n.hc().goTo()})),n.Rb(2,"i",10),n.Qc(3,"\xa0 "),n.Wb(4,"span"),n.Qc(5),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.hc();n.Db(2),n.Fb(t.headerService.sideBarButton.icon),n.Db(3),n.Rc(t.headerService.sideBarButton.label)}}let O6=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.headerService=e,this.appService=i,this.router=n,this._location=a,this.config={},this.navButton=null}ngOnInit(){}goTo(){"__GOBACK"===this.headerService.sideBarButton.route?this._location.back():this.router.navigate([this.headerService.sideBarButton.route])}goToHome(){this.router.navigate(["/home"])}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(y.a),n.Qb(w.a),n.Qb(o.c),n.Qb(P.n))},t.\u0275cmp=n.Kb({type:t,selectors:[["header-panel"]],inputs:{navButton:"navButton",snavLeft:"snavLeft"},decls:11,vars:9,consts:[[1,"panelHeader"],["class","panelHeader-backHome",4,"ngIf"],[1,"panelHeader-logo"],["mat-button","",2,"margin-right","30px",3,"title","click"],["svgIcon","maarchLogoFull",1,"maarchLogo"],[1,"panelHeader-button"],["mat-icon-button","",3,"title","click"],["fontSet","fas","fontIcon","fa-stream",2,"transform","rotate(180deg)"],[1,"panelHeader-backHome"],["mat-button","",2,"padding-top","5px","padding-bottom","5px",3,"click"],[2,"height","auto"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Oc(1,C6,6,4,"div",1),n.Wb(2,"div",2),n.Wb(3,"button",3),n.dc("click",(function(){return e.goToHome()})),n.ic(4,"translate"),n.Rb(5,"mat-icon",4),n.Vb(),n.Vb(),n.Wb(6,"div",5),n.Wb(7,"button",6),n.dc("click",(function(){return e.headerService.sideNavLeft.close()})),n.ic(8,"translate"),n.Rb(9,"mat-icon",7),n.Vb(),n.Vb(),n.Vb(),n.Rb(10,"mat-divider")),2&t&&(n.Db(1),n.oc("ngIf",null!==e.headerService.sideBarButton),n.Db(1),n.Ib("text-center",null!==e.headerService.sideBarButton),n.Db(1),n.pc("title",n.jc(4,5,"lang.home")),n.Db(4),n.pc("title",n.jc(8,7,"lang.closeSidePanel")))},directives:[P.t,k.b,S.a,T.a],pipes:[g.d],styles:[".panelHeader[_ngcontent-%COMP%]{display:flex;align-items:center}.panelHeader-logo[_ngcontent-%COMP%]{flex:1}.panelHeader-button[_ngcontent-%COMP%]{display:flex;align-items:center}.panelHeader-button[_ngcontent-%COMP%] .mat-icon-button[_ngcontent-%COMP%]{font-size:25px;color:#666}.panelHeader-backHome[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{height:auto;color:#666;background:#d8d8d8;padding:10px;border-radius:20px;font-size:18px}.panelHeader-backHome[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:13px;color:#666}.maarchLogo[_ngcontent-%COMP%]{height:80px;width:auto;padding:20px}"]}),t})();const D6=["basketPanel"];function w6(t,e){1&t&&(n.Wb(0,"div",13),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noticeGroupeOrder")," "))}function M6(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item",16),n.dc("onDropSuccess",(function(){return n.Dc(t),n.hc(4).updateGroupsOrder()})),n.ic(1,"translate"),n.Rb(2,"mat-icon",17),n.Wb(3,"span",18),n.Qc(4),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=e.index;n.pc("title",n.jc(1,3,"lang.move")),n.oc("sortableIndex",i),n.Db(4),n.Rc(t.groupDesc)}}const k6=function(){return["boxers-zone"]};function S6(t,e){if(1&t&&(n.Wb(0,"mat-list"),n.Wb(1,"span",14),n.Oc(2,M6,5,5,"mat-list-item",15),n.Vb(),n.Vb()),2&t){const t=n.hc(3);n.Db(1),n.oc("dropZones",n.uc(3,k6))("sortableData",t.homeData.regroupedBaskets),n.Db(1),n.oc("ngForOf",t.homeData.regroupedBaskets)}}function I6(t,e){if(1&t&&(n.Wb(0,"span",18),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Rc(t.groupDesc)}}function P6(t,e){1&t&&n.Rb(0,"mat-divider",22)}const V6=function(t){return{color:t}};function R6(t,e){if(1&t&&n.Rb(0,"mat-icon",32),2&t){const t=n.hc(2).$implicit;n.oc("ngStyle",n.vc(1,V6,t.color))}}function j6(t,e){if(1&t&&(n.Wb(0,"span",33),n.Qc(1),n.Vb()),2&t){const t=n.hc(2).$implicit;n.Db(1),n.Rc(t.resourceNumber)}}function A6(t,e){if(1&t&&(n.Wb(0,"span",34),n.Qc(1),n.Vb()),2&t){const t=n.hc(2).$implicit;n.Db(1),n.Rc(t.resourceNumber)}}function W6(t,e){if(1&t&&(n.Wb(0,"a",26),n.Oc(1,R6,1,3,"mat-icon",27),n.Oc(2,j6,2,1,"span",28),n.Oc(3,A6,2,1,"span",29),n.Wb(4,"p",30),n.Qc(5),n.Rb(6,"br"),n.Wb(7,"small",31),n.Qc(8),n.ic(9,"translate"),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc(5);n.Db(1),n.oc("ngIf",t.redirected&&!e.appService.getViewMode()),n.Db(1),n.oc("ngIf",0==t.resourceNumber),n.Db(1),n.oc("ngIf",0!=t.resourceNumber),n.Db(1),n.pc("title",t.basket_name),n.oc("ngStyle",n.vc(10,V6,t.color)),n.Db(1),n.Sc(" ",t.basket_name,""),n.Db(3),n.Tc("(",n.jc(9,8,"lang.redirectedTo")," ",t.redirectedUser,")")}}function T6(t,e){if(1&t&&(n.Wb(0,"span",33),n.Qc(1),n.Vb()),2&t){const t=n.hc(2).$implicit;n.Db(1),n.Rc(t.resourceNumber)}}function E6(t,e){if(1&t&&(n.Wb(0,"span",34),n.Qc(1),n.Vb()),2&t){const t=n.hc(2).$implicit;n.Db(1),n.Rc(t.resourceNumber)}}const F6=function(t){return{selectedBasket:t}},L6=function(t,e){return{opacity:t,height:e}};function Q6(t,e){if(1&t){const t=n.Xb();n.Wb(0,"a",35),n.dc("click",(function(){n.Dc(t);const e=n.hc().$implicit,i=n.hc(5);return i.refreshDatas(e),i.closePanelLeft()})),n.Oc(1,T6,2,1,"span",28),n.Oc(2,E6,2,1,"span",29),n.Wb(3,"p",30),n.Qc(4),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc(2).$implicit,i=n.hc(3);n.sc("routerLink","/basketList/users/",t.owner_user_id,"/groups/",e.groupSerialId,"/baskets/",t.id,""),n.oc("ngClass",n.vc(10,F6,i.headerService.currentBasketInfo.basketId==t.id&&i.headerService.currentBasketInfo.ownerId==t.owner_user_id&&i.headerService.currentBasketInfo.groupId==e.groupSerialId))("ngStyle",n.wc(12,L6,0==t.resourceNumber?"0.5":"1",i.appService.getViewMode()?"50px":"38px")),n.Db(1),n.oc("ngIf",0==t.resourceNumber),n.Db(1),n.oc("ngIf",0!=t.resourceNumber),n.Db(1),n.pc("title",t.basket_name),n.oc("ngStyle",n.vc(15,V6,t.color)),n.Db(1),n.Sc(" ",t.basket_name," ")}}function N6(t,e){if(1&t&&(n.Ub(0),n.Oc(1,W6,10,12,"a",24),n.Oc(2,Q6,5,17,"a",25),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf",t.redirected),n.Db(1),n.oc("ngIf",!t.redirected)}}function z6(t,e){if(1&t&&(n.Wb(0,"mat-nav-list",23),n.Oc(1,N6,3,2,"ng-container",11),n.ic(2,"filterList"),n.Vb()),2&t){const t=n.hc().$implicit;n.hc();const e=n.zc(3);n.Db(1),n.oc("ngForOf",n.lc(2,1,t.baskets,e.value,"basket_name"))}}function B6(t,e){if(1&t&&(n.Ub(0),n.Oc(1,I6,2,1,"span",19),n.Oc(2,P6,1,0,"mat-divider",20),n.Oc(3,z6,3,5,"mat-nav-list",21),n.Tb()),2&t){const t=e.$implicit,i=n.hc(3);n.Db(1),n.oc("ngIf",t.baskets[0]&&!i.editOrderGroups),n.Db(1),n.oc("ngIf",t.baskets[0]&&!i.editOrderGroups),n.Db(1),n.oc("ngIf",!i.editOrderGroups)}}function U6(t,e){1&t&&n.Rb(0,"mat-icon",41)}function $6(t,e){if(1&t&&(n.Wb(0,"span",33),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Rc(t.resourceNumber)}}function H6(t,e){if(1&t&&(n.Wb(0,"span",34),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Db(1),n.Rc(t.resourceNumber)}}function G6(t,e){if(1&t&&(n.Wb(0,"a",38),n.Oc(1,U6,1,0,"mat-icon",39),n.Oc(2,$6,2,1,"span",28),n.Oc(3,H6,2,1,"span",29),n.Wb(4,"p",40),n.Qc(5),n.Rb(6,"br"),n.Wb(7,"small",31),n.Qc(8),n.Vb(),n.Vb(),n.Vb()),2&t){const t=e.$implicit,i=n.hc(4);n.sc("routerLink","/basketList/users/",t.owner_user_id,"/groups/",t.group_id,"/baskets/",t.id,""),n.oc("ngClass",n.vc(11,F6,i.headerService.currentBasketInfo.basketId==t.id&&i.headerService.currentBasketInfo.ownerId==t.owner_user_id&&i.headerService.currentBasketInfo.groupId==t.group_id)),n.Db(1),n.oc("ngIf",!i.appService.getViewMode()),n.Db(1),n.oc("ngIf",0==t.resourceNumber),n.Db(1),n.oc("ngIf",0!=t.resourceNumber),n.Db(1),n.pc("title",t.basket_name),n.Db(1),n.Sc(" ",t.basket_name,""),n.Db(3),n.Tc("(",t.userToDisplay," - ",t.group_desc,")")}}function X6(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"span",36),n.ic(2,"translate"),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Rb(5,"mat-divider"),n.Wb(6,"mat-nav-list"),n.Oc(7,G6,9,13,"a",37),n.ic(8,"filterList"),n.Vb(),n.Tb()),2&t){n.hc();const t=n.zc(3),e=n.hc(2);n.Db(1),n.pc("title",n.jc(2,3,"lang.basketsAssigned")),n.Db(2),n.Rc(n.jc(4,5,"lang.basketsAssignedShort")),n.Db(4),n.oc("ngForOf",n.lc(8,7,e.homeData.assignedBaskets,t.value,"basket_name"))}}function q6(t,e){1&t&&(n.Wb(0,"div",42),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noAvailableBasket")," "))}function K6(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-form-field",7),n.Rb(2,"input",8,9),n.ic(4,"translate"),n.Vb(),n.Oc(5,w6,3,3,"div",10),n.Oc(6,S6,3,4,"mat-list",6),n.Oc(7,B6,4,3,"ng-container",11),n.Oc(8,X6,9,11,"ng-container",6),n.Oc(9,q6,3,3,"div",12),n.Tb()),2&t){const t=n.hc(2);n.Db(1),n.Lc("display",(t.homeData.assignedBaskets.length>0||t.homeData.regroupedBaskets.length>0)&&!t.editOrderGroups?"inline-block":"none"),n.Db(1),n.pc("placeholder",n.jc(4,8,"lang.filterBy")),n.Db(3),n.oc("ngIf",t.editOrderGroups),n.Db(1),n.oc("ngIf",t.editOrderGroups),n.Db(1),n.oc("ngForOf",t.homeData.regroupedBaskets),n.Db(1),n.oc("ngIf",t.homeData.assignedBaskets.length>0&&!t.editOrderGroups),n.Db(1),n.oc("ngIf",0===t.homeData.assignedBaskets.length&&0===t.homeData.regroupedBaskets.length)}}const Y6=function(t,e){return{color:t,opacity:e}};function J6(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-expansion-panel",1,2),n.Wb(2,"mat-expansion-panel-header"),n.Wb(3,"mat-panel-title"),n.Rb(4,"i",3),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Wb(7,"div",4),n.dc("click",(function(e){n.Dc(t);const i=n.hc();return e.stopPropagation(),i.editGroupOrder()}))("mouseover",(function(){return n.Dc(t),n.hc().hoverEditGroupOrder=!0}))("mouseleave",(function(){return n.Dc(t),n.hc().hoverEditGroupOrder=!1})),n.ic(8,"translate"),n.Rb(9,"mat-icon",5),n.Vb(),n.Vb(),n.Oc(10,K6,10,10,"ng-container",6),n.Vb()}if(2&t){const t=n.hc();n.Db(5),n.Sc("\xa0",n.jc(6,4,"lang.myBaskets")," "),n.Db(2),n.pc("title",n.jc(8,6,"lang.listConfiguration")),n.Db(2),n.oc("ngStyle",n.wc(8,Y6,t.editOrderGroups?"orange":"#135F7F",t.editOrderGroups||t.hoverEditGroupOrder?"1":"0.4")),n.Db(1),n.oc("ngIf",!t.loading)}}let Z6=(()=>{class t{constructor(t,e,i,a,s,o){this.translate=t,this.http=e,this.appService=i,this.headerService=a,this.notify=s,this.actionService=o,this.loading=!0,this.hoverEditGroupOrder=!1,this.homeData=null,this.currentBasketInfo={ownerId:0,groupId:0,basketId:""},this.refreshEvent=new n.o,this.editOrderGroups=!1,this.subscription=this.actionService.catchAction().subscribe(t=>{this.refreshBasketHome()})}ngOnInit(){this.getMyBaskets()}ngOnDestroy(){this.subscription.unsubscribe()}getMyBaskets(){this.loading=!0,this.http.get("../rest/home").pipe(Object(mt.a)(t=>{this.homeData=t,this.loading=!1})).subscribe()}closePanelLeft(){this.appService.getViewMode()&&this.snavL.close()}refreshDatas(t){this.refreshBasketHome(),this.headerService.headerMessage===t.basket_name&&this.actionService.emitAction()}refreshBasketHome(){this.http.get("../rest/home").subscribe(t=>{this.homeData=t})}togglePanel(t){t?this.basketPanel.open():this.basketPanel.close()}editGroupOrder(){this.editOrderGroups=!this.editOrderGroups}updateGroupsOrder(){const t=this.homeData.regroupedBaskets.map(t=>t.groupSerialId);this.http.put("../rest/currentUser/profile/preferences",{homeGroups:t}).pipe(Object(mt.a)(()=>this.notify.success(this.translate.instant("lang.parameterUpdated"))),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(w.a),n.Qb(y.a),n.Qb(D.a),n.Qb(bC))},t.\u0275cmp=n.Kb({type:t,selectors:[["basket-home"]],viewQuery:function(t,e){var i;1&t&&n.Kc(D6,!0),2&t&&n.yc(i=n.ec())&&(e.basketPanel=i.first)},inputs:{currentBasketInfo:"currentBasketInfo",snavL:"snavL"},outputs:{refreshEvent:"refreshEvent"},decls:1,vars:1,consts:[["class","basketList","expanded","",4,"ngIf"],["expanded","",1,"basketList"],["basketPanel",""],[1,"fa","fa-inbox","panelIconMenu"],[3,"title","click","mouseover","mouseleave"],["mat-list-icon","",1,"fa","fa-cog",2,"height","auto",3,"ngStyle"],[4,"ngIf"],["floatLabel","never","appearance","outline",1,"basketsFilter",2,"padding-left","20px","padding-right","20px","font-size","11px"],["matInput","",3,"placeholder"],["listFilter",""],["style","color: rgba(0,0,0,0.25);text-align:center;",4,"ngIf"],[4,"ngFor","ngForOf"],["class","noBasket",4,"ngIf"],[2,"color","rgba(0,0,0,0.25)","text-align","center"],["dnd-sortable-container","",3,"dropZones","sortableData"],["disableRipple","true","dnd-sortable","",3,"title","sortableIndex","onDropSuccess",4,"ngFor","ngForOf"],["disableRipple","true","dnd-sortable","",3,"title","sortableIndex","onDropSuccess"],["color","primary","mat-list-icon","",1,"fa","fa-arrows-alt",2,"font-size","19px"],[1,"basketGroupTitle"],["class","basketGroupTitle",4,"ngIf"],["style","width: 80%;",4,"ngIf"],["style","padding-bottom: 10px;",4,"ngIf"],[2,"width","80%"],[2,"padding-bottom","10px"],["mat-list-item","","disableRipple","true","style","cursor:not-allowed;",4,"ngIf"],["mat-list-item","","style","cursor:pointer;",3,"ngClass","routerLink","ngStyle","click",4,"ngIf"],["mat-list-item","","disableRipple","true",2,"cursor","not-allowed"],["mat-list-icon","","class","fa fa-share",3,"ngStyle",4,"ngIf"],["class","nbResZero",4,"ngIf"],["class","nbRes",4,"ngIf"],["mat-line","",3,"title","ngStyle"],["color","primary"],["mat-list-icon","",1,"fa","fa-share",3,"ngStyle"],[1,"nbResZero"],[1,"nbRes"],["mat-list-item","",2,"cursor","pointer",3,"ngClass","routerLink","ngStyle","click"],["color","primary",2,"font-weight","bold",3,"title"],["mat-list-item","",3,"ngClass","routerLink",4,"ngFor","ngForOf"],["mat-list-item","",3,"ngClass","routerLink"],["style","color:#666","mat-list-icon","","class","fa fa-paper-plane",4,"ngIf"],["mat-line","",2,"color","#666",3,"title"],["mat-list-icon","",1,"fa","fa-paper-plane",2,"color","#666"],[1,"noBasket"]],template:function(t,e){1&t&&n.Oc(0,J6,11,11,"mat-expansion-panel",0),2&t&&n.oc("ngIf",!e.loading)},directives:[P.t,gt.c,gt.g,gt.h,S.a,R.c,P.w,Y.c,J.b,P.s,R.a,Ee.f,R.d,Ee.e,T.a,R.h,W.l,o.f,P.q],pipes:[g.d,rg],styles:[".basketList[_ngcontent-%COMP%]{border-radius:0;box-shadow:none}.basketList[_ngcontent-%COMP%] .mat-expansion-panel-body{padding:0}.basketList[_ngcontent-%COMP%] .mat-expansion-panel-header-title[_ngcontent-%COMP%]{color:#135f7f;display:flex;align-items:center;font-size:14px;font-weight:500}.basketList[_ngcontent-%COMP%] .mat-line[_ngcontent-%COMP%]{font-size:12px;font-weight:700}.selectedBasket[_ngcontent-%COMP%]{border-left:5px solid #135f7f}.selectedBasket[_ngcontent-%COMP%], .selectedBasket[_ngcontent-%COMP%]:focus{background:rgba(19,95,127,.14)}.nbRes[_ngcontent-%COMP%]{color:#135f7f;font-size:14px}.nbRes[_ngcontent-%COMP%], .nbResZero[_ngcontent-%COMP%]{font-weight:700;min-width:auto}.nbResZero[_ngcontent-%COMP%]{color:#666;font-size:12px}.basketGroupTitle[_ngcontent-%COMP%]{color:#135f7f;font-size:14px;font-weight:500;padding-left:10px}.basketsFilter[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.panelIconMenu[_ngcontent-%COMP%]{font-size:22px}.noBasket[_ngcontent-%COMP%]{text-align:center;font-size:13px;opacity:.5;font-style:italic}"]}),t})();var t7=i("cH1L"),e7=i("ihCf"),i7=i("zkoq"),n7=i("dNgK"),a7=i("xHqg"),s7=i("2ChS");const o7=["acInput"],r7=["auto"];function c7(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-chip",7),n.dc("removed",(function(){n.Dc(t);const i=e.$implicit;return n.hc().remove(i)})),n.Qc(1),n.Rb(2,"mat-icon",8),n.Vb()}if(2&t){const t=e.$implicit;n.Db(1),n.Sc(" ",t," ")}}function l7(t,e){if(1&t&&(n.Wb(0,"mat-option",9),n.Qc(1),n.Vb()),2&t){const t=e.$implicit,i=n.hc();n.oc("value",t)("disabled",i.datasFormControl.value.indexOf(t)>-1),n.Db(1),n.Sc(" ",t," ")}}let d7=(()=>{class t{constructor(t,e,i,a,s){this.translate=t,this.http=e,this.notify=i,this.dialog=a,this.latinisePipe=s,this.inputFormControl=new X.i,this.loading=!1,this.appearance="legacy",this.required=!1,this.options=[],this.inputLabel="Mon champ",this.targetSearchKey=null,this.datasFormControl=new X.i({value:[],disabled:!1}),this.afterSelected=new n.o,this.valuesToDisplay={}}ngOnInit(){}getLabel(t){return this.options.length>0&&Object.keys(2===this.options[0].length)?t[this.targetSearchKey]:t}initAutocompleteData(){this.filteredOptions=this.inputFormControl.valueChanges.pipe(Object(Qe.a)(null),Object(l.a)(t=>t?this._filter(t):this.options.slice()))}add(t){const e=t.input,i=t.value;(i||"").trim()&&this.datasFormControl.value.push(i.trim()),e&&(e.value=""),this.inputFormControl.setValue(null)}remove(t){const e=this.datasFormControl.value.indexOf(t);if(e>=0){let t=[];t=this.datasFormControl.value,t.splice(e,1),this.datasFormControl.setValue(t)}}selected(t){this.datasFormControl.value.push(t.option.viewValue),this.acInput.nativeElement.value="",this.inputFormControl.setValue(null)}_filter(t){const e=t.toLowerCase();return this.datasFormControl.value.filter(t=>t.toLowerCase().indexOf(e)>-1)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(Tt.c))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-autocomplete-list"]],viewQuery:function(t,e){var i;1&t&&(n.Xc(o7,!0),n.Xc(r7,!0)),2&t&&(n.yc(i=n.ec())&&(e.acInput=i.first),n.yc(i=n.ec())&&(e.matAutocomplete=i.first))},inputs:{appearance:"appearance",required:"required",options:"options",inputLabel:"inputLabel",targetSearchKey:"targetSearchKey",datasFormControl:"datasFormControl"},outputs:{afterSelected:"afterSelected"},decls:10,vars:8,consts:[["chipList",""],[3,"removed",4,"ngFor","ngForOf"],[3,"placeholder","formControl","matAutocomplete","matChipInputFor"],["acInput",""],[3,"optionSelected"],["auto","matAutocomplete"],[3,"value","disabled",4,"ngFor","ngForOf"],[3,"removed"],["matChipRemove","",1,"fa","fa-times-circle"],[3,"value","disabled"]],template:function(t,e){if(1&t&&(n.Wb(0,"mat-form-field"),n.Wb(1,"mat-chip-list",null,0),n.Oc(3,c7,3,1,"mat-chip",1),n.Rb(4,"input",2,3),n.Vb(),n.Wb(6,"mat-autocomplete",4,5),n.dc("optionSelected",(function(t){return e.selected(t)})),n.Oc(8,l7,2,3,"mat-option",6),n.ic(9,"async"),n.Vb(),n.Vb()),2&t){const t=n.zc(2),i=n.zc(7);n.Db(3),n.oc("ngForOf",e.datasFormControl.value),n.Db(1),n.oc("placeholder",e.inputLabel)("formControl",e.inputFormControl)("matAutocomplete",i)("matChipInputFor",t),n.Db(4),n.oc("ngForOf",n.jc(9,6,e.filteredOptions))}},directives:[Y.c,ze.d,P.s,X.d,Ne.d,ze.c,X.u,X.j,Ne.a,ze.a,S.a,ze.e,W.p],pipes:[P.b],styles:[".mat-form-field-appearance-outline[_ngcontent-%COMP%]{font-size:11px} .mat-form-field-appearance-outline .mat-form-field-outline-thick{color:#135f7f} .mat-form-field-prefix{top:0!important}.mat-option[_ngcontent-%COMP%] .mat-option-text{display:flex}.mat-option[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:110%;font-weight:700}.autcompleteIcon[_ngcontent-%COMP%]{width:20px;display:flex;align-items:center}.smallInput[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}.smallInput[_ngcontent-%COMP%] .mat-form-field-infix{padding:0 0 5px}.smallInputInfo[_ngcontent-%COMP%]{font-size:9px;white-space:normal;line-height:13px;display:table-cell;vertical-align:middle}.input-form[_ngcontent-%COMP%] .mat-form-field-prefix{left:15px}.activeListAutocomplete[_ngcontent-%COMP%]{font-size:13px;height:auto}.noResult[_ngcontent-%COMP%]{text-align:center;font-style:italic;opacity:.5}.autoCompleteInfoResult[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center}"]}),t})(),h7=(()=>{class t{constructor(t){t.setDefaultLang("fr")}}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)(n.ac(g.e))},imports:[[s.a,Xs,AF.a],Xs]}),t})();n.Hc(co,[P.q,P.r,P.s,P.t,P.A,P.w,P.x,P.y,P.z,P.u,P.v,x6,zt,We,Ot,O6,Z6,X.K,X.z,X.J,X.d,X.A,X.D,X.a,X.G,X.H,X.C,X.u,X.v,X.F,X.q,X.p,X.B,X.b,X.e,X.x,X.y,X.w,X.j,X.m,X.k,X.n,X.g,o.h,o.d,o.f,o.e,o.i,j.a,t7.b,j.c,M4.b,Y.b,Y.c,Y.f,Y.g,Y.h,Y.i,Y.j,ee.a,ee.c,W.p,W.o,te.c,te.a,e7.b,e7.c,J.b,J.d,A.b,A.d,Te.c,Te.d,Te.a,Te.f,Te.e,Te.b,I.a,I.b,I.c,I.d,I.e,I.f,k.b,k.a,K.a,K.f,K.n,K.d,K.m,K.l,K.b,K.e,K.k,K.i,K.h,K.g,K.o,K.c,og.b,og.a,V.a,V.c,ni.a,M.a,M.c,ne.e,ne.b,ne.d,ne.a,i7.b,i7.d,i7.g,W.l,i7.f,i7.e,i7.a,vt.o,vt.i,vt.k,vt.c,vt.b,vt.n,vt.e,vt.g,vt.h,vt.a,vt.d,vt.j,vt.m,vt.f,vt.l,vt.r,Kt.a,Fe.a,Fe.b,ae.a,ae.b,ae.f,ae.g,ae.h,ae.j,ae.k,ae.m,ae.p,ae.n,ae.c,ae.d,ae.o,ae.l,ae.e,gt.a,gt.c,gt.d,gt.g,gt.h,gt.f,gt.e,Ne.a,Ne.d,Ne.c,n7.c,S.a,q.e,q.d,q.i,q.f,q.c,R.a,R.h,R.d,R.b,R.c,R.g,W.s,R.i,R.f,T.a,ze.d,ze.a,ze.c,ze.e,ze.b,ze.f,a7.a,a7.j,a7.b,a7.d,a7.e,a7.h,a7.i,a7.c,a7.f,hc.b,hc.a,gY.a,wt.a,s7.a,W.u,vy.a,vy.h,vy.j,vy.k,vy.b,vy.g,vy.i,M4.a,M4.d,M4.e,Ee.b,Ee.c,Ee.d,Ee.f,Ee.e,Ee.g,At,Rt,jt,lo.e,lo.f,lo.a,lo.b,lo.d,lo.c,ii,f0,fr,vO,im,Ef,ie,Zd,El,iO,nD,Ko,go,Qv,My,cQ,KD,hd,d7,Sg,Uw,uP,Fk,kC,Du,qT,$O,IO,wW,LW,$D,Gs,g.a,Jr,vr,co,Cr],[P.b,P.G,P.p,P.k,P.E,P.g,P.C,P.F,P.d,P.f,P.i,P.j,P.l,Tt.a,Tt.e,Tt.k,Tt.n,Tt.o,Tt.p,Tt.r,Tt.t,Tt.u,Tt.v,Tt.q,Tt.b,Tt.c,Tt.f,Tt.w,Tt.h,Tt.s,Tt.d,Tt.m,Tt.g,Tt.x,rg,uo,ec,si,Wt.a,ps,bs,HD,g.d]);let u7=(()=>{class t{constructor(t){t.setDefaultLang("fr")}}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)(n.ac(g.e))},providers:[OL],imports:[[s.a,AF.a,as.forChild(),v6,h7]]}),t})();var p7=i("R1ws");let b7=(()=>{class t{constructor(t){t.setDefaultLang("fr")}}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)(n.ac(g.e))},imports:[[s.a,Tt.i,AF.a],s.a]}),t})(),f7=(()=>{class t{constructor(t,e,i,n,a){this.translate=t,this.http=e,this.router=i,this.notificationService=n,this.authService=a,this.byPassToken=[{route:"../rest/prerequisites",method:["GET"]},{route:"../rest/authenticate",method:["POST"]},{route:"../rest/authenticate/token",method:["GET"]},{route:"../rest/authenticationInformation",method:["GET"]},{route:"../rest/passwordRules",method:["GET"]},{route:"../rest/languages",method:["GET"]}],this.byPassHandleErrors=[{route:"/password",method:["PUT"]}]}addAuthHeader(t){const e=this.authService.getToken();return t.clone({setHeaders:{Authorization:"Bearer "+e}})}logout(){this.authService.logout(!1,!0),this.notificationService.error(this.translate.instant("lang.sessionExpired"))}intercept(t,e){return this.byPassToken.filter(e=>t.url.indexOf(e.route)>-1&&e.method.indexOf(t.method)>-1).length>0?e.handle(t):(t=this.addAuthHeader(t),e.handle(t).pipe(Object(m.a)(i=>{if(this.byPassHandleErrors.filter(e=>t.url.indexOf(e.route)>-1&&e.method.indexOf(t.method)>-1).length>0)return e.handle(t);if(401===i.status)return console.debug("Auth error",t.url),this.http.get("../rest/authenticate/token",{params:{refreshToken:this.authService.getRefreshToken()}}).pipe(Object(ft.a)(i=>(console.debug("Attempt get token ... !",t.url),this.authService.setToken(i.token),this.authService.updateUserInfo(i.token),t=this.addAuthHeader(t),e.handle(t).pipe(Object(m.a)(t=>{if(401===t.status)return this.logout(),Object(c.a)(!1)})))),Object(m.a)(e=>(401===e.status&&(console.debug("Refresh token failed !",t.url,this.router.url),this.logout()),Object(c.a)(!1))));if("User must change his password"===i.error.errors)return this.router.navigate(["/password-modification"]);{const t=new v.d({error:i.error,status:i.status,statusText:i.statusText,headers:i.headers,url:i.url});return Promise.reject(t)}})))}}return t.\u0275fac=function(e){return new(e||t)(n.ac(g.e),n.ac(v.b),n.ac(o.c),n.ac(D.a),n.ac(_.a))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();function m7(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-list-item",4),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).gotToFolder(i)}))("cdkDropListDropped",(function(i){n.Dc(t);const a=e.$implicit;return n.hc(2).drop(i,a)}))("cdkDropListEntered",(function(){n.Dc(t);const i=e.$implicit;return n.hc(2).dragEnter(i)}))("cdkDropListExited",(function(){return e.$implicit.drag=!1})),n.Wb(1,"mat-icon",5),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(2);return i.stopPropagation(),s.foldersService.unpinFolder(a)})),n.ic(2,"translate"),n.Rb(3,"i",6),n.Vb(),n.Wb(4,"span",7),n.Wb(5,"span",8),n.Qc(6),n.Vb(),n.Vb(),n.Wb(7,"span",9),n.Qc(8),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.hc(2);n.Ib("selectedFolder",i.foldersService.getCurrentFolder().id==t.id),n.oc("id","folder-list-"+t.id),n.Db(1),n.oc("title",n.jc(2,11,"lang.unpinFolder")),n.Db(4),n.Ib("drag",t.drag),n.oc("title",t.label),n.Db(1),n.Sc(" ",t.label," "),n.Db(1),n.Ib("empty",0===t.countResources),n.Db(1),n.Sc(" ",t.countResources," ")}}function g7(t,e){if(1&t&&(n.Ub(0),n.Wb(1,"mat-list",2),n.Oc(2,m7,9,13,"mat-list-item",3),n.Vb(),n.Tb()),2&t){const t=n.hc();n.Db(2),n.oc("ngForOf",t.foldersService.getPinnedList())}}function v7(t,e){1&t&&(n.Wb(0,"div",10),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noPinnedFolder")," "))}let _7=(()=>{class t{constructor(t,e,i){this.translate=t,this.http=e,this.foldersService=i,this.noInit=!1,this.subscription=this.foldersService.catchEvent().subscribe(t=>{})}ngOnInit(){this.foldersService.initFolder(),this.noInit||this.foldersService.getPinnedFolders()}gotToFolder(t){this.foldersService.goToFolder(t)}dragEnter(t){t.drag=!0}drop(t,e){this.foldersService.classifyDocument(t,e)}ngOnDestroy(){this.subscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(tw.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["folder-pinned"]],inputs:{noInit:"noInit"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["elseTemplate",""],[1,"pinnedFolderList"],["cdkDropList","","cdkDropListConnectedTo","['document-list','folder-list']",3,"selectedFolder","id","click","cdkDropListDropped","cdkDropListEntered","cdkDropListExited",4,"ngFor","ngForOf"],["cdkDropList","","cdkDropListConnectedTo","['document-list','folder-list']",3,"id","click","cdkDropListDropped","cdkDropListEntered","cdkDropListExited"],["mat-list-icon","",1,"pinnedIcon",3,"title","click"],[1,"fa","fa-thumbtack"],[1,"pinnedFolderItem"],[1,"treeLabel",3,"title"],[1,"countResources"],[1,"noPinnedFolder"]],template:function(t,e){if(1&t&&(n.Oc(0,g7,3,1,"ng-container",0),n.Oc(1,v7,3,3,"ng-template",null,1,n.Pc)),2&t){const t=n.zc(2);n.oc("ngIf",e.foldersService.getPinnedList().length>0)("ngIfElse",t)}},directives:[P.t,R.a,P.s,R.d,lo.e,S.a,R.c],pipes:[g.d],styles:[".pinnedFolderList[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{cursor:pointer;height:45px}.pinnedFolderList[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]:hover{background:rgba(0,0,0,.04)}.pinnedFolderList[_ngcontent-%COMP%] .mat-list-text{padding-left:0!important}.pinnedFolderList[_ngcontent-%COMP%] .pinnedFolderItem[_ngcontent-%COMP%]{font-weight:700;font-size:12px;width:90%;overflow:hidden;text-overflow:ellipsis}.pinnedFolderList[_ngcontent-%COMP%] .folderAction[_ngcontent-%COMP%]{color:#666}.pinnedIcon[_ngcontent-%COMP%]{cursor:pointer;color:#135f7f;text-align:center}.pinnedIcon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:13px;transition:all .3s}.pinnedIcon[_ngcontent-%COMP%]:hover{color:#8e3e52}.pinnedIcon[_ngcontent-%COMP%]:hover i[_ngcontent-%COMP%]{transition:all .3s;transform:rotate(45deg) translateY(-50%)}.countResources[_ngcontent-%COMP%]{color:#135f7f;font-weight:700;font-size:14px}.empty[_ngcontent-%COMP%]{opacity:.5;font-size:12px;color:#666}button[_ngcontent-%COMP%]:disabled{opacity:1}.selectedFolder[_ngcontent-%COMP%]{border-left:5px solid #135f7f;background:rgba(19,95,127,.14)}.public[_ngcontent-%COMP%]{color:#f99830}.drag[_ngcontent-%COMP%]{color:#f99830!important}.noPinnedFolder[_ngcontent-%COMP%]{text-align:center;font-size:13px;opacity:.5;font-style:italic}.treeLabel[_ngcontent-%COMP%]{white-space:pre;color:#666}"]}),t})();function y7(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-expansion-panel",22),n.Wb(1,"mat-expansion-panel-header"),n.Wb(2,"mat-panel-title"),n.Qc(3),n.Vb(),n.Vb(),n.Wb(4,"mat-slide-toggle",23),n.dc("change",(function(e){n.Dc(t);const i=n.hc().$implicit;return n.hc(2).toggleAdmin(i,e)})),n.Qc(5),n.ic(6,"translate"),n.Vb(),n.Vb()}if(2&t){const t=n.hc().$implicit,e=n.hc(2);n.Db(3),n.Sc(" ",t.entity_label," "),n.Db(1),n.oc("checked",e.isAdminEnabled(t)),n.Db(1),n.Sc("",n.jc(6,3,"lang.canManageFolder")," ")}}function x7(t,e){if(1&t&&(n.Ub(0),n.Oc(1,y7,7,5,"mat-expansion-panel",21),n.Tb()),2&t){const t=e.$implicit,i=n.hc(2);n.Db(1),n.oc("ngIf",i.checkSelectedFolder(t))}}function C7(t,e){if(1&t&&(n.Wb(0,"div",17),n.Wb(1,"div",18),n.Wb(2,"div",19),n.Qc(3),n.ic(4,"translate"),n.Vb(),n.Oc(5,x7,2,1,"ng-container",20),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(3),n.Sc(" ",n.jc(4,2,"lang.parameters")," "),n.Db(2),n.oc("ngForOf",t.entities)}}let O7=(()=>{class t{constructor(t,e,i,n,a,s){this.translate=t,this.http=e,this.notify=i,this.dialogRef=n,this.functions=a,this.data=s,this.folder={id:0,label:"",public:!0,user_id:0,parent_id:null,level:0,sharing:{entities:[]}},this.sharingFolderCLone=[],this.holdShift=!1,this.entities=[]}onKeydownHandler(t){this.holdShift=!0}onKeyupHandler(t){this.holdShift=!1}ngOnInit(){this.getFolder()}getFolder(){this.http.get("../rest/folders/"+this.data.folderId).pipe(Object(mt.a)(t=>this.folder=t.folder),p(()=>this.http.get("../rest/entities")),Object(l.a)(t=>{const e={serialId:"ALL_ENTITIES",keyword:"ALL_ENTITIES",parent:"#",icon:"fa fa-hashtag",allowed:!0,text:this.translate.instant("lang.allEntities"),state:{opened:!1,selected:!1},parent_entity_id:"",id:"ALL_ENTITIES",entity_label:this.translate.instant("lang.allEntities")};return t.entities.unshift(e),this.entities=t.entities,t.entities.forEach(t=>{(this.folder.sharing.entities.map(t=>t.entity_id).indexOf(t.serialId)>-1||this.folder.sharing.entities.map(t=>t.keyword).indexOf(t.serialId)>-1)&&(t.state.selected=!0),t.state.allowed=!0,t.state.disabled=!1}),t}),Object(mt.a)(t=>{this.initEntitiesTree(t.entities)}),p(()=>this.http.get("../rest/folders")),Object(l.a)(t=>{let e=0;return t.folders.forEach(t=>{t.state={opened:!0},null===t.parent_id&&(t.parent_id="#"),t.id===this.folder.parent_id&&(t.state.selected=!0),t.id!==this.folder.id&&e!==t.parent_id&&t.canEdit||(e=t.id,t.state.opened=!1,t.state.disabled=!0),t.parent=t.parent_id,t.text=t.label}),t}),Object(mt.a)(t=>{this.initFoldersTree(t.folders)}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1))),Object(Xt.a)(()=>this.sharingFolderCLone=JSON.parse(JSON.stringify(this.folder.sharing.entities)))).subscribe()}initFoldersTree(t){$("#jstreeFolders").jstree({checkbox:{deselect_all:!0,three_state:!1},core:{force_text:!0,themes:{name:"proton",responsive:!0},multiple:!1,data:t},plugins:["checkbox","search"]}),$("#jstreeFolders").on("select_node.jstree",(t,e)=>{this.folder.parent_id=e.node.original.id}).on("deselect_node.jstree",(t,e)=>{this.folder.parent_id=""}).jstree();let e=!1;$("#jstree_searchFolders").keyup((function(){e&&clearTimeout(e),e=setTimeout((function(){const t=$("#jstree_searchFolders").val();$("#jstreeFolders").jstree(!0).search(t)}),250)}))}initEntitiesTree(t){$("#jstree").jstree({checkbox:{three_state:!1},core:{force_text:!0,themes:{name:"proton",responsive:!0},data:t},plugins:["checkbox","search"]}),$("#jstree").on("select_node.jstree",(t,e)=>{this.selectEntity(e.node.original)}).on("deselect_node.jstree",(t,e)=>{this.deselectEntity(e.node.original)}).jstree();let e=!1;$("#jstree_search").keyup((function(){e&&clearTimeout(e),e=setTimeout((function(){const t=$("#jstree_search").val();$("#jstree").jstree(!0).search(t)}),250)}))}selectEntity(t){this.holdShift?($("#jstree").jstree("deselect_all"),this.folder.sharing.entities=[]):this.functions.empty(t.keyword)?this.folder.sharing.entities.push({entity_id:t.serialId,edition:!1}):this.folder.sharing.entities.push({keyword:t.keyword,edition:!1})}deselectEntity(t){let e=this.folder.sharing.entities.map(t=>t.entity_id).indexOf(t.serialId);e>-1?this.folder.sharing.entities.splice(e,1):(e=this.folder.sharing.entities.map(t=>t.keyword).indexOf(t.serialId),e>-1&&this.folder.sharing.entities.splice(e,1))}onSubmit(){this.http.put("../rest/folders/"+this.folder.id,this.folder).pipe(p(()=>JSON.stringify(this.sharingFolderCLone)!==JSON.stringify(this.folder.sharing.entities)?this.http.put("../rest/folders/"+this.folder.id+"/sharing",{public:this.folder.sharing.entities.length>0,sharing:this.folder.sharing}):Object(c.a)(!1)),Object(mt.a)(()=>{this.notify.success(this.translate.instant("lang.folderUpdated")),this.dialogRef.close("success")}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}checkSelectedFolder(t){return this.folder.sharing.entities.map(t=>t.entity_id).indexOf(t.serialId)>-1||this.folder.sharing.entities.map(t=>t.keyword).indexOf(t.serialId)>-1}initService(t){1===t.index&&this.initEntitiesTree(this.entities)}toggleAdmin(t,e){let i=this.folder.sharing.entities.map(t=>t.entity_id).indexOf(t.serialId);i>-1?this.folder.sharing.entities[i].edition=e.checked:(i=this.folder.sharing.entities.map(t=>t.keyword).indexOf(t.serialId),i>-1&&(this.folder.sharing.entities[i].edition=e.checked))}isAdminEnabled(t){let e=this.folder.sharing.entities.map(t=>t.entity_id).indexOf(t.serialId);return e>-1?this.folder.sharing.entities[e].edition:(e=this.folder.sharing.entities.map(t=>t.keyword).indexOf(t.serialId),e>-1&&this.folder.sharing.entities[e].edition)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.h),n.Qb(_t.a),n.Qb(q.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],hostBindings:function(t,e){1&t&&n.dc("keydown.Shift",(function(t){return e.onKeydownHandler(t)}),!1,n.Bc)("keyup",(function(t){return e.onKeyupHandler(t)}),!1,n.Bc)},decls:35,vars:31,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title",""],[3,"ngSubmit"],["submitForm","ngForm"],[1,"col-md-12"],["matInput","","name","label",3,"placeholder","ngModel","ngModelChange"],[3,"selectedTabChange"],[3,"label"],["appearance","outline"],["matInput","","id","jstree_searchFolders","type","text",3,"placeholder"],["id","jstreeFolders",1,"entitiesList"],["matInput","","id","jstree_search","type","text",3,"placeholder"],["id","jstree",1,"entitiesList"],["class","col-md-6",4,"ngIf"],[1,"divider-modal"],["mat-raised-button","","color","primary","type","submit",3,"click"],["mat-raised-button","","type","button","color","default",3,"click"],[1,"col-md-6"],[1,"formType","jstreeEntities"],[1,"formType-title"],[4,"ngFor","ngForOf"],["class","selectedEntities","opened","",4,"ngIf"],["opened","",1,"selectedEntities"],["color","primary",3,"checked","change"]],template:function(t,e){if(1&t){const t=n.Xb();n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2),n.ic(3,"translate"),n.Vb(),n.Wb(4,"mat-dialog-content"),n.Wb(5,"form",2,3),n.dc("ngSubmit",(function(){return e.onSubmit()})),n.Wb(7,"div",4),n.Wb(8,"mat-form-field"),n.Wb(9,"input",5),n.dc("ngModelChange",(function(t){return e.folder.label=t})),n.ic(10,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Wb(11,"div",4),n.Wb(12,"mat-tab-group",6),n.dc("selectedTabChange",(function(t){return e.initService(t)})),n.Wb(13,"mat-tab",7),n.ic(14,"translate"),n.Wb(15,"mat-form-field",8),n.Rb(16,"input",9),n.ic(17,"translate"),n.Vb(),n.Rb(18,"div",10),n.Vb(),n.Wb(19,"mat-tab",7),n.ic(20,"translate"),n.Wb(21,"div"),n.Wb(22,"mat-form-field",8),n.Rb(23,"input",11),n.ic(24,"translate"),n.Vb(),n.Rb(25,"div",12),n.Vb(),n.Oc(26,C7,6,4,"div",13),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Rb(27,"span",14),n.Wb(28,"mat-dialog-actions"),n.Wb(29,"button",15),n.dc("click",(function(){return n.Dc(t),n.zc(6).ngSubmit.emit()})),n.Qc(30),n.ic(31,"translate"),n.Vb(),n.Wb(32,"button",16),n.dc("click",(function(){return e.dialogRef.close()})),n.Qc(33),n.ic(34,"translate"),n.Vb(),n.Vb(),n.Vb()}2&t&&(n.Db(2),n.Tc("",n.jc(3,15,"lang.folder")," : ",e.folder.label,""),n.Db(7),n.pc("placeholder",n.jc(10,17,"lang.label")),n.oc("ngModel",e.folder.label),n.Db(4),n.pc("label",n.jc(14,19,"lang.setInParentFolder")),n.Db(3),n.pc("placeholder",n.jc(17,21,"lang.searchFolder")),n.Db(3),n.pc("label",n.jc(20,23,"lang.shareToEntities")),n.Db(2),n.Ib("col-md-12",0===e.folder.sharing.entities.length)("col-md-6",e.folder.sharing.entities.length>0),n.Db(2),n.pc("placeholder",n.jc(24,25,"lang.searchEntities")),n.Db(3),n.oc("ngIf",e.folder.sharing.entities.length>0),n.Db(4),n.Rc(n.jc(31,27,"lang.validate")),n.Db(3),n.Rc(n.jc(34,29,"lang.cancel")))},directives:[q.i,q.f,X.K,X.v,X.w,Y.c,J.b,X.d,X.u,X.x,Te.c,Te.a,P.t,q.c,k.b,P.s,gt.c,gt.g,gt.h,te.a],pipes:[g.d],styles:[".mat-form-field-appearance-outline[_ngcontent-%COMP%]{font-size:11px}.formType[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:10px;border-radius:4px;border:1px solid #ccc;position:relative;padding:10px}.formType-title[_ngcontent-%COMP%]{white-space:pre;overflow:hidden;max-width:85%;text-overflow:ellipsis;z-index:1;font-size:20px;font-weight:700;background:#fff;position:absolute;top:-18px;left:10px;padding:0;margin:0;color:#135f7f}.entitiesList[_ngcontent-%COMP%]{overflow:auto}.selectedEntities[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:5px}"]}),t})();const D7=["itemValue"],w7=["autocomplete"],M7=["tree"];function k7(t,e){1&t&&(n.Wb(0,"div",10),n.Qc(1),n.ic(2,"translate"),n.Vb()),2&t&&(n.Db(1),n.Sc(" ",n.jc(2,1,"lang.noAvailableFolder")," "))}function S7(t,e){1&t&&(n.Rb(0,"i",31),n.ic(1,"translate")),2&t&&n.pc("title",n.jc(1,1,"lang.sharedFolder"))}function I7(t,e){1&t&&n.Rb(0,"mat-icon",32)}function P7(t,e){if(1&t&&(n.Wb(0,"span",33),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Ib("empty",0===t.countResources),n.Db(1),n.Sc(" ",t.countResources," ")}}function V7(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tree-node",15),n.dc("cdkDropListDropped",(function(i){n.Dc(t);const a=e.$implicit;return n.hc(3).drop(i,a)}))("cdkDropListEntered",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).dragEnter(i)}))("cdkDropListExited",(function(){return e.$implicit.drag=!1})),n.Rb(1,"button",16),n.Wb(2,"a",17),n.dc("mouseenter",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).showAction(i)}))("mouseleave",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).hideAction(i)}))("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).foldersService.goToFolder(i)})),n.Wb(3,"span",18),n.Wb(4,"span",19),n.Oc(5,S7,2,3,"i",20),n.Qc(6),n.Vb(),n.Vb(),n.Wb(7,"button",21),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(3);return i.stopPropagation(),s.showAction(a),s.checkRights(a)})),n.Oc(8,I7,1,0,"mat-icon",22),n.Oc(9,P7,2,3,"span",23),n.Vb(),n.Wb(10,"mat-menu",null,24),n.Wb(12,"button",25),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).togglePinFolder(i)})),n.Wb(13,"mat-icon"),n.Rb(14,"i",26),n.Vb(),n.Wb(15,"span"),n.Qc(16),n.ic(17,"translate"),n.ic(18,"translate"),n.Vb(),n.Vb(),n.Wb(19,"button",27),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).addNewItem(i)})),n.Wb(20,"mat-icon",28),n.Rb(21,"i",7),n.Vb(),n.Wb(22,"span"),n.Qc(23),n.ic(24,"translate"),n.Vb(),n.Vb(),n.Wb(25,"button",27),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).deleteNode(i)})),n.Wb(26,"mat-icon",28),n.Rb(27,"i",29),n.Vb(),n.Wb(28,"span"),n.Qc(29),n.ic(30,"translate"),n.Vb(),n.Vb(),n.Wb(31,"button",27),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).openFolderAdmin(i)})),n.Wb(32,"mat-icon",28),n.Rb(33,"i",30),n.Vb(),n.Wb(34,"span"),n.Qc(35),n.ic(36,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.zc(11),a=n.hc(3);n.oc("id","treefolder-list-"+t.id)("@hideShow",void 0),n.Db(2),n.Ib("selectedFolder",a.foldersService.getCurrentFolder().id==t.id),n.Db(2),n.Ib("drag",t.drag),n.oc("title",t.label),n.Db(1),n.oc("ngIf",t.public),n.Db(1),n.Sc(" ",t.label," "),n.Db(1),n.oc("matMenuTriggerFor",i)("disabled",!t.showAction),n.Db(1),n.oc("ngIf",t.showAction),n.Db(1),n.oc("ngIf",!t.showAction),n.Db(1),n.Fb("folderListMenu"),n.Db(3),n.Ib("pinnedActionIcon",!t.pinned)("revertPinnedActionIcon",t.pinned),n.Db(3),n.Rc(t.pinned?n.jc(17,26,"lang.unpinFolder"):n.jc(18,28,"lang.pinFolder")),n.Db(3),n.oc("disabled",a.createItemNode||!t.canAdd||t.level>6),n.Db(4),n.Rc(n.jc(24,30,"lang.addSubFolder")),n.Db(2),n.oc("disabled",!t.canDelete),n.Db(4),n.Sc(" ",n.jc(30,32,"lang.delete")," "),n.Db(2),n.oc("disabled",!t.edition),n.Db(4),n.Sc(" ",n.jc(36,34,"lang.properties")," ")}}function R7(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tree-node",34),n.Wb(1,"form"),n.Wb(2,"mat-form-field",35),n.Rb(3,"input",36,37),n.ic(5,"translate"),n.Wb(6,"button",38),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.zc(4);return n.hc(3).saveNode(i,a.value)})),n.Rb(7,"mat-icon",39),n.ic(8,"translate"),n.Vb(),n.Wb(9,"button",40),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).removeTemporaryNode(i)})),n.Rb(10,"mat-icon",41),n.ic(11,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=n.zc(4);n.Db(3),n.qc("placeholder","",n.jc(5,4,"lang.addFolder"),"..."),n.Db(3),n.oc("disabled",""===t.value),n.Db(1),n.oc("title",n.jc(8,6,"lang.add")),n.Db(3),n.oc("title",n.jc(11,8,"lang.delete"))}}function j7(t,e){1&t&&(n.Rb(0,"i",31),n.ic(1,"translate")),2&t&&n.pc("title",n.jc(1,1,"lang.sharedFolder"))}function A7(t,e){1&t&&n.Rb(0,"mat-icon",32)}function W7(t,e){if(1&t&&(n.Wb(0,"span",33),n.Qc(1),n.Vb()),2&t){const t=n.hc().$implicit;n.Ib("empty",0===t.countResources),n.Db(1),n.Sc(" ",t.countResources," ")}}function T7(t,e){if(1&t){const t=n.Xb();n.Wb(0,"mat-tree-node",42),n.dc("cdkDropListDropped",(function(i){n.Dc(t);const a=e.$implicit;return n.hc(3).drop(i,a)}))("cdkDropListEntered",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).dragEnter(i)}))("cdkDropListExited",(function(){return e.$implicit.drag=!1})),n.Wb(1,"button",43),n.Rb(2,"mat-icon"),n.Vb(),n.Wb(3,"a",44),n.dc("mouseleave",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).hideAction(i)}))("mouseenter",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).showAction(i)}))("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).foldersService.goToFolder(i)})),n.Wb(4,"span",18),n.Wb(5,"span",19),n.Oc(6,j7,2,3,"i",20),n.Qc(7),n.Vb(),n.Vb(),n.Wb(8,"button",21),n.dc("click",(function(i){n.Dc(t);const a=e.$implicit,s=n.hc(3);return i.stopPropagation(),s.checkRights(a)})),n.Oc(9,A7,1,0,"mat-icon",22),n.Oc(10,W7,2,3,"span",23),n.Vb(),n.Wb(11,"mat-menu",null,24),n.Wb(13,"button",25),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).togglePinFolder(i)})),n.Wb(14,"mat-icon"),n.Rb(15,"i",26),n.Vb(),n.Wb(16,"span"),n.Qc(17),n.ic(18,"translate"),n.ic(19,"translate"),n.Vb(),n.Vb(),n.Wb(20,"button",27),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).addNewItem(i)})),n.Wb(21,"mat-icon",28),n.Rb(22,"i",7),n.Vb(),n.Wb(23,"span"),n.Qc(24),n.ic(25,"translate"),n.Vb(),n.Vb(),n.Wb(26,"button",27),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).deleteNode(i)})),n.Wb(27,"mat-icon",28),n.Rb(28,"i",29),n.Vb(),n.Wb(29,"span"),n.Qc(30),n.ic(31,"translate"),n.Vb(),n.Vb(),n.Wb(32,"button",27),n.dc("click",(function(){n.Dc(t);const i=e.$implicit;return n.hc(3).openFolderAdmin(i)})),n.Wb(33,"mat-icon",28),n.Rb(34,"i",30),n.Vb(),n.Wb(35,"span"),n.Qc(36),n.ic(37,"translate"),n.Vb(),n.Vb(),n.Vb(),n.Vb(),n.Vb()}if(2&t){const t=e.$implicit,i=n.zc(12),a=n.hc(3);n.oc("id","treefolder-list-"+t.id)("@hideShow",void 0),n.Db(1),n.Eb("aria-label","toggle "+t.name),n.Db(1),n.Gb("mat-icon-rtl-mirror fa ",a.treeControl.isExpanded(t)?"fa-chevron-down":"fa-chevron-right",""),n.Db(1),n.Ib("selectedFolder",a.foldersService.getCurrentFolder().id==t.id),n.Db(2),n.Ib("drag",t.drag),n.oc("title",t.label),n.Db(1),n.oc("ngIf",t.public),n.Db(1),n.Sc(" ",t.label," "),n.Db(1),n.oc("matMenuTriggerFor",i)("disabled",!t.showAction),n.Db(1),n.oc("ngIf",t.showAction),n.Db(1),n.oc("ngIf",!t.showAction),n.Db(1),n.Fb("folderListMenu"),n.Db(3),n.Ib("pinnedActionIcon",!t.pinned)("revertPinnedActionIcon",t.pinned),n.Db(3),n.Rc(t.pinned?n.jc(18,30,"lang.unpinFolder"):n.jc(19,32,"lang.pinFolder")),n.Db(3),n.oc("disabled",a.createItemNode||!t.canAdd||t.level>6),n.Db(4),n.Rc(n.jc(25,34,"lang.addSubFolder")),n.Db(2),n.oc("disabled",!t.canDelete),n.Db(4),n.Sc(" ",n.jc(31,36,"lang.delete")," "),n.Db(2),n.oc("disabled",!t.edition),n.Db(4),n.Sc(" ",n.jc(37,38,"lang.properties")," ")}}function E7(t,e){if(1&t&&(n.Wb(0,"mat-nav-list"),n.Wb(1,"mat-tree",11),n.Oc(2,V7,37,36,"mat-tree-node",12),n.Oc(3,R7,12,10,"mat-tree-node",13),n.Oc(4,T7,38,40,"mat-tree-node",14),n.Vb(),n.Vb()),2&t){const t=n.hc(2);n.Db(1),n.oc("dataSource",t.dataSource)("treeControl",t.treeControl),n.Db(2),n.oc("matTreeNodeDefWhen",t.hasNoContent),n.Db(1),n.oc("matTreeNodeDefWhen",t.hasChild)}}const F7=function(){return["/rest/autocomplete/folders"]};function L7(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"div",2),n.Wb(2,"div",3),n.Wb(3,"plugin-autocomplete",4,5),n.dc("triggerEvent",(function(e){return n.Dc(t),n.hc().goTo(e)})),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Wb(6,"div"),n.Wb(7,"button",6),n.dc("click",(function(){return n.Dc(t),n.hc().openCreateFolderModal()})),n.ic(8,"translate"),n.Rb(9,"mat-icon",7),n.Vb(),n.Vb(),n.Vb(),n.Oc(10,k7,3,3,"div",8),n.Oc(11,E7,5,4,"mat-nav-list",9),n.Tb()}if(2&t){const t=n.hc();n.Db(3),n.oc("size","small")("labelPlaceholder",n.jc(5,7,"lang.searchFolder"))("routeDatas",n.uc(11,F7))("targetSearchKey","idToDisplay"),n.Db(4),n.pc("title",n.jc(8,9,"lang.addRootFolder")),n.Db(3),n.oc("ngIf",0===t.dataSource.data.length),n.Db(1),n.oc("ngIf",t.dataSource.data.length>0)}}function Q7(t,e){1&t&&(n.Wb(0,"div",45),n.Rb(1,"mat-spinner"),n.Vb())}class N7{}let z7=(()=>{class t{constructor(t,e,i,a,s,o,r,c,l){this.translate=t,this.http=e,this.notify=i,this.dialog=a,this.router=s,this.renderer=o,this.headerService=r,this.foldersService=c,this.functions=l,this.loading=!0,this.searchTerm=new X.i,this.TREE_DATA=[],this.createRootNode=!1,this.createItemNode=!1,this.dataChange=new my.a([]),this.refreshDocList=new n.o,this.refreshFolderList=new n.o,this.flatNodeMap=new Map,this.nestedNodeMap=new Map,this.transformer=(t,e)=>{const i=this.nestedNodeMap.get(t),n=i&&i.label===t.label?i:new N7;return n.label=t.label,n.countResources=t.countResources,n.public=t.public,n.pinned=t.pinned,n.parent_id=t.parent_id,n.id=t.id,n.level=e,n.expandable=!!t.children,this.flatNodeMap.set(n,t),this.nestedNodeMap.set(t,n),n},this.treeControl=new fy.j(t=>t.level,t=>t.expandable),this.treeFlattener=new vy.d(this.transformer,t=>t.level,t=>t.expandable,t=>t.children),this.dataSource=new vy.c(this.treeControl,this.treeFlattener),this.hasChild=(t,e)=>e.expandable,this.hasNoContent=(t,e)=>""===e.label,this.subscription=this.foldersService.catchEvent().subscribe(t=>{if("initTree"===t.type){const t=this.flatToNestedObject(this.foldersService.getList());t.length>0&&(this.initTree(t),this.openTree(this.foldersService.getCurrentFolder().id)),this.loading=!1}else"refreshFolderCount"===t.type?this.treeControl.dataNodes.filter(e=>e.id===t.content.id)[0].countResources=t.content.countResources:"refreshFolderPinned"===t.type?this.treeControl.dataNodes.filter(e=>e.id===t.content.id)[0].pinned=t.content.pinned:void 0!==this.treeControl.dataNodes&&this.openTree(this.foldersService.getCurrentFolder().id)})}get data(){return this.dataChange.value}ngOnInit(){this.getFolders()}getFolders(){this.loading=!0,this.foldersService.getFolders()}initTree(t){this.dataChange.next(t),this.dataChange.subscribe(t=>{this.dataSource.data=t})}openTree(t){let e=this.treeControl.dataNodes.map(t=>t.id).indexOf(parseInt(t));for(;-1!==e;)e=this.treeControl.dataNodes.map(t=>t.id).indexOf(this.treeControl.dataNodes[e].parent_id),-1!==e&&this.treeControl.expand(this.treeControl.dataNodes[e])}showAction(t){this.treeControl.dataNodes.forEach(t=>{t.showAction=!1}),t.showAction=!0}hideAction(t){t.showAction=!1}flatToNestedObject(t){return t.reduce((t,e,i,n)=>(null===e.parent_id?(t.left.length&&this.checkLeftOvers(t.left,e),delete e.parent_id,e.root=!0,t.nested.push(e)):this.findParent(t.nested,e)?this.checkLeftOvers(t.left,e):t.left.push(e),i<n.length-1?t:t.nested),{nested:[],left:[]})}checkLeftOvers(t,e){for(let i=0;i<t.length;i++)if(t[i].parent_id===e.id){e.children?e.children.push(t[i]):e.children=[t[i]],e.count=e.children.length;const n=t.splice(i,1);this.checkLeftOvers(t,n[0])}}findParent(t,e){let i=!1;for(let n=0;n<t.length;n++){if(t[n].id===e.parent_id)return i=!0,t[n].children?t[n].children.push(e):t[n].children=[e],t[n].count=t[n].children.length,!0;t[n].children&&(i=this.findParent(t[n].children,e))}return i}addNewItem(t){this.createItemNode=!0;const e=this.flatNodeMap.get(t);void 0===e.children&&(e.children=[]),e.children.push({label:"",parent_id:e.id,public:e.public}),this.dataChange.next(this.data),this.treeControl.expand(t),this.renderer.selectRootElement("#itemValue").focus()}saveNode(t,e){this.http.post("../rest/folders",{label:e,parent_id:t.parent_id}).pipe(Object(mt.a)(i=>{const n=this.flatNodeMap.get(t);n.label=e,n.id=i.folder,n.countResources=0,this.dataChange.next(this.data),this.treeControl.collapseAll(),this.openTree(n.id),this.createItemNode=!1,this.foldersService.getPinnedFolders()}),Object(mt.a)(()=>this.notify.success(this.translate.instant("lang.folderAdded"))),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}removeTemporaryNode(t){const e=this.getParentNode(t),i=e.children.map(t=>t.id).indexOf(t.id);-1!==i&&e.children.splice(i,1),this.flatNodeMap.delete(t),this.dataChange.next(this.data),this.createItemNode=!1}openCreateFolderModal(){this.dialogRef=this.dialog.open(Vw,{panelClass:"maarch-modal",data:{folderName:this.autocomplete.getValue()}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>!this.functions.empty(t)),Object(mt.a)(()=>{this.autocomplete.resetValue(),this.getFolders(),this.foldersService.getPinnedFolders()}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}deleteNode(t){this.dialogRef=this.dialog.open(Gt,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.delete"),msg:this.translate.instant("lang.confirmAction")}}),this.dialogRef.afterClosed().pipe(Object(d.a)(t=>"ok"===t),p(()=>this.http.delete("../rest/folders/"+t.id)),Object(mt.a)(()=>{const e=this.getParentNode(t);if(null!==e){const i=e.children.map(t=>t.id).indexOf(t.id);-1!==i&&e.children.splice(i,1)}else{const e=this.data.map(t=>t.id).indexOf(t.id);-1!==e&&this.data.splice(e,1)}this.flatNodeMap.delete(t),this.dataChange.next(this.data)}),Object(mt.a)(()=>{this.foldersService.getPinnedFolders(),this.notify.success(this.translate.instant("lang.folderDeleted"))}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}getParentNode(t){const e=t.level;if(e<1)return null;for(let i=this.treeControl.dataNodes.indexOf(t)-1;i>=0;i--){const t=this.treeControl.dataNodes[i];if(t.level<e)return this.flatNodeMap.get(t)}return null}drop(t,e){this.foldersService.classifyDocument(t,e)}dragEnter(t){t.drag=!0}openFolderAdmin(t){this.dialogRef=this.dialog.open(O7,{panelClass:"maarch-modal",autoFocus:!1,data:{folderId:t.id}}),this.dialogRef.afterClosed().pipe(Object(mt.a)(e=>{void 0!==e&&(this.getFolders(),this.foldersService.getPinnedFolders(),this.foldersService.setEvent({type:"refreshFolderInformations",content:t}))})).subscribe()}checkRights(t){let e=[],i=0;this.http.get("../rest/folders/"+t.id).pipe(Object(mt.a)(n=>{e=this.headerService.user.entities.map(t=>t.id),i=this.headerService.user.id;let a=!1,s=!1;const o=n.folder.sharing.entities.filter(t=>e.indexOf(t)>-1);n.folder.sharing.entities.filter(t=>o.indexOf(t.id)).forEach(t=>{!0===t.edition&&(a=!0),!0===t.canDelete&&(s=!0)}),t.edition=!(!a&&n.folder.user_id!==i),t.canAdd=t.edition,t.canDelete=s||n.folder.user_id===i})).subscribe()}goTo(t){this.selectedId=t.id,this.getFolders(),this.router.navigate(["/folders/"+t.id])}togglePinFolder(t){t.pinned?this.foldersService.unpinFolder(t):this.foldersService.pinFolder(t)}ngOnDestroy(){this.subscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(D.a),n.Qb(q.b),n.Qb(o.c),n.Qb(n.I),n.Qb(y.a),n.Qb(tw.a),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["folder-tree"]],viewQuery:function(t,e){var i;1&t&&(n.Kc(D7,!0),n.Xc(w7,!0),n.Kc(M7,!0)),2&t&&(n.yc(i=n.ec())&&(e.itemValue=i.first),n.yc(i=n.ec())&&(e.autocomplete=i.first),n.yc(i=n.ec())&&(e.tree=i.first))},inputs:{selectedId:"selectedId"},outputs:{refreshDocList:"refreshDocList",refreshFolderList:"refreshFolderList"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["elseTemplate",""],[1,"folderTools"],[1,"filter"],["appearance","outline",3,"size","labelPlaceholder","routeDatas","targetSearchKey","triggerEvent"],["autocomplete",""],["mat-icon-button","","color","primary",3,"title","click"],[1,"fas","fa-folder-plus"],["class","noFolder",4,"ngIf"],[4,"ngIf"],[1,"noFolder"],[3,"dataSource","treeControl"],["cdkDropList","","cdkDropListConnectedTo","['document-list','folder-list']","matTreeNodePadding","","matTreeNodePaddingIndent","20px",3,"id","cdkDropListDropped","cdkDropListEntered","cdkDropListExited",4,"matTreeNodeDef"],["matTreeNodePadding","","matTreeNodePaddingIndent","0px",4,"matTreeNodeDef","matTreeNodeDefWhen"],["cdkDropList","","cdkDropListConnectedTo","list-1","matTreeNodePadding","","matTreeNodePaddingIndent","20px",3,"id","cdkDropListDropped","cdkDropListEntered","cdkDropListExited",4,"matTreeNodeDef","matTreeNodeDefWhen"],["cdkDropList","","cdkDropListConnectedTo","['document-list','folder-list']","matTreeNodePadding","","matTreeNodePaddingIndent","20px",3,"id","cdkDropListDropped","cdkDropListEntered","cdkDropListExited"],["mat-icon-button","","disabled","",1,"expandButton"],["mat-list-item","","disableRipple","",1,"folderTreeItem",3,"mouseenter","mouseleave","click"],[2,"width","90%","overflow","hidden","text-overflow","ellipsis"],[1,"treeLabel",3,"title"],["class","fa fa-users private",3,"title",4,"ngIf"],["mat-icon-button","",2,"position","absolute","right","0px",3,"matMenuTriggerFor","disabled","click"],["class","folderAction fa fa-ellipsis-v",4,"ngIf"],["class","countResources",3,"empty",4,"ngIf"],["menu","matMenu"],["mat-menu-item","",3,"click"],[1,"fas","fa-thumbtack"],["mat-menu-item","",3,"disabled","click"],[2,"width","auto","height","auto"],[1,"far","fa-trash-alt"],[1,"fas","fa-sliders-h"],[1,"fa","fa-users","private",3,"title"],[1,"folderAction","fa","fa-ellipsis-v"],[1,"countResources"],["matTreeNodePadding","","matTreeNodePaddingIndent","0px"],["floatLabel","never",2,"width","100%","padding-left","10px","padding-right","10px"],["matInput","","id","itemValue",3,"placeholder"],["itemValue",""],["type","submit","matSuffix","","mat-icon-button","",3,"disabled","click"],["color","accent",1,"fa","fa-check",3,"title"],["type","button","matSuffix","","mat-icon-button","",3,"click"],[1,"fa","fa-times",2,"color","#8e3e52",3,"title"],["cdkDropList","","cdkDropListConnectedTo","list-1","matTreeNodePadding","","matTreeNodePaddingIndent","20px",3,"id","cdkDropListDropped","cdkDropListEntered","cdkDropListExited"],["mat-icon-button","","matTreeNodeToggle","",1,"expandButton"],["mat-list-item","","disableRipple","",1,"folderTreeItem",3,"mouseleave","mouseenter","click"],[1,"loading"]],template:function(t,e){if(1&t&&(n.Oc(0,L7,12,12,"ng-container",0),n.Oc(1,Q7,2,0,"ng-template",null,1,n.Pc)),2&t){const t=n.zc(2);n.oc("ngIf",!e.loading)("ngIfElse",t)}},directives:[P.t,ii,k.b,S.a,R.h,vy.b,vy.h,vy.g,lo.e,vy.j,R.d,ne.d,ne.e,ne.b,X.K,X.v,X.w,Y.c,J.b,Y.j,vy.k,V.c],pipes:[g.d],styles:[".selectedFolder[_ngcontent-%COMP%]{border-left:5px solid #135f7f;background:rgba(19,95,127,.14)}.mat-icon-rtl-mirror[_ngcontent-%COMP%]{opacity:.5}.folderAction[_ngcontent-%COMP%]{color:#666}.mat-form-field-appearance-outline[_ngcontent-%COMP%]{font-size:11px} .mat-form-field-appearance-outline .mat-form-field-outline-thick{color:#135f7f}.example-tree-invisible[_ngcontent-%COMP%]{display:none}.example-tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%], .example-tree[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0;list-style-type:none}.example-tree-node[_ngcontent-%COMP%]{display:block}.example-tree-node[_ngcontent-%COMP%] .example-tree-node[_ngcontent-%COMP%]{padding-left:40px}.expandButton[_ngcontent-%COMP%]{width:20px;height:20px;line-height:20px}.mat-list-item[_ngcontent-%COMP%]{color:#666;font-size:12px;font-weight:700;height:40px;width:90%}.mat-tree-node[_ngcontent-%COMP%]{min-height:0;height:40px}.mat-tree-node[_ngcontent-%COMP%] .mat-list-item-content{padding-left:0}form[_ngcontent-%COMP%]{display:flex;width:100%;align-items:center}.treeLabel[_ngcontent-%COMP%]{white-space:pre;color:#666}.drag[_ngcontent-%COMP%]{color:#f99830!important}.more[_ngcontent-%COMP%]{width:100%;opacity:.6}.more[_ngcontent-%COMP%] .mat-list-item-content{justify-content:center}.rootFolder[_ngcontent-%COMP%]{width:100%}.private[_ngcontent-%COMP%]{margin-left:5px;color:#f99830}button[_ngcontent-%COMP%]:disabled{opacity:1}.countResources[_ngcontent-%COMP%]{font-weight:700;color:#135f7f}.empty[_ngcontent-%COMP%]{opacity:.5;font-size:12px;color:#666}.folderTools[_ngcontent-%COMP%]{padding-right:15px;display:flex;justify-content:center;align-items:baseline}.folderTools[_ngcontent-%COMP%] .filter[_ngcontent-%COMP%]{flex:1}.noFolder[_ngcontent-%COMP%]{font-size:12px;color:#666;text-align:center;font-style:italic}.noFolder[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer} .folderListMenu .mat-menu-content{padding-top:0;padding-bottom:0} .folderListMenu .mat-menu-content .mat-menu-item .pinnedActionIcon{color:#8e3e52;height:auto} .folderListMenu .mat-menu-content .mat-menu-item .pinnedActionIcon i{font-size:13px;transition:all .3s;transform:rotate(15deg) translateY(-50%)} .folderListMenu .mat-menu-content .mat-menu-item .revertPinnedActionIcon{color:#135f7f;height:auto} .folderListMenu .mat-menu-content .mat-menu-item .revertPinnedActionIcon i{font-size:13px;transition:all .3s;transform:rotate(0deg) translate(0)} .folderListMenu .mat-menu-content .mat-menu-item:hover .pinnedActionIcon{color:#135f7f} .folderListMenu .mat-menu-content .mat-menu-item:hover .pinnedActionIcon i{transition:all .3s;transform:rotate(0deg) translate(0)} .folderListMenu .mat-menu-content .mat-menu-item:hover .revertPinnedActionIcon{color:#8e3e52} .folderListMenu .mat-menu-content .mat-menu-item:hover .revertPinnedActionIcon i{transition:all .3s;transform:rotate(15deg) translateY(-50%)}.loading[_ngcontent-%COMP%]{display:flex;justify-content:center}"],data:{animation:[Object(dc.n)("hideShow",[Object(dc.m)(":enter",[Object(dc.l)({height:"0px"}),Object(dc.e)("200ms",Object(dc.l)({height:"30px"}))]),Object(dc.m)(":leave",[Object(dc.l)({height:"30px"}),Object(dc.e)("200ms",Object(dc.l)({height:"0px"}))])])]}}),t})();const B7=["folderTree"];function U7(t,e){1&t&&(n.Wb(0,"mat-expansion-panel",4),n.Wb(1,"mat-expansion-panel-header"),n.Wb(2,"mat-panel-title"),n.Rb(3,"i",5),n.Qc(4),n.ic(5,"translate"),n.Vb(),n.Vb(),n.Rb(6,"folder-pinned",6),n.Vb()),2&t&&(n.Db(4),n.Sc("\xa0",n.jc(5,2,"lang.myPinnedFolder")," "),n.Db(2),n.oc("noInit",!0))}function $7(t,e){if(1&t){const t=n.Xb();n.Wb(0,"folder-tree",7,8),n.dc("refreshDocList",(function(){return n.Dc(t),n.hc().refreshDocList()})),n.Vb()}}let H7=(()=>{class t{constructor(t,e,i){this.translate=t,this.foldersService=e,this.actionService=i,this.refreshEvent=new n.o,this.subscription=this.actionService.catchAction().subscribe(t=>{this.refreshFoldersTree()})}ngOnInit(){this.foldersService.getPinnedFolders()}ngOnDestroy(){this.subscription.unsubscribe()}initTree(){this.folderTree.openTree(this.selectedId)}refreshDocList(){this.refreshEvent.emit()}refreshFoldersTree(){void 0!==this.folderTree&&this.folderTree.getFolders()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(tw.a),n.Qb(bC))},t.\u0275cmp=n.Kb({type:t,selectors:[["panel-folder"]],viewQuery:function(t,e){var i;1&t&&n.Xc(B7,!0),2&t&&n.yc(i=n.ec())&&(e.folderTree=i.first)},inputs:{selectedId:"selectedId"},outputs:{refreshEvent:"refreshEvent"},decls:9,vars:5,consts:[["class","folderList","expanded","",4,"ngIf"],[1,"folderList",3,"expanded"],[1,"fa","fa-folder","panelIconMenu"],["matExpansionPanelContent",""],["expanded","",1,"folderList"],[1,"fa","fa-thumbtack","panelIconMenu"],[3,"noInit"],[3,"refreshDocList"],["folderTree",""]],template:function(t,e){1&t&&(n.Oc(0,U7,7,4,"mat-expansion-panel",0),n.Rb(1,"mat-divider"),n.Wb(2,"mat-expansion-panel",1),n.Wb(3,"mat-expansion-panel-header"),n.Wb(4,"mat-panel-title"),n.Rb(5,"i",2),n.Qc(6),n.ic(7,"translate"),n.Vb(),n.Vb(),n.Oc(8,$7,2,0,"ng-template",3),n.Vb()),2&t&&(n.oc("ngIf",e.foldersService.getPinnedList().length>0),n.Db(2),n.oc("expanded",!1),n.Db(4),n.Sc("\xa0",n.jc(7,3,"lang.folders")," "))},directives:[P.t,T.a,gt.c,gt.g,gt.h,gt.e,_7,z7],pipes:[g.d],styles:[".folderList[_ngcontent-%COMP%]{box-shadow:none}.folderList[_ngcontent-%COMP%] .mat-expansion-panel-body{padding:0}.folderList[_ngcontent-%COMP%] .mat-expansion-panel-header-title[_ngcontent-%COMP%]{color:#135f7f;display:flex;align-items:center;font-size:14px;font-weight:500}.folderList[_ngcontent-%COMP%] .mat-expansion-panel-body[_ngcontent-%COMP%]{padding:0}.folderList[_ngcontent-%COMP%] .mat-line[_ngcontent-%COMP%]{font-size:12px;font-weight:700}.panelIconMenu[_ngcontent-%COMP%]{font-size:22px}.showFolderTree[_ngcontent-%COMP%]{font-size:13px;opacity:.8;font-weight:700;color:#666;width:100%}"]}),t})();function G7(t,e){if(1&t&&(n.Qc(0),n.Wb(1,"p",13),n.Qc(2,"\xa0"),n.Vb()),2&t){const t=n.hc(2).$implicit,e=n.hc();n.Sc(" ",t.key,"\xa0"),n.Db(1),n.oc("matBadge",e.missingLang[t.key].length)}}function X7(t,e){if(1&t){const t=n.Xb();n.Ub(0),n.Wb(1,"mat-form-field",14),n.Wb(2,"mat-label"),n.Qc(3),n.Vb(),n.Wb(4,"input",15,16),n.dc("ngModelChange",(function(i){return n.Dc(t),e.$implicit.value=i})),n.Vb(),n.Wb(6,"button",17),n.dc("click",(function(){n.Dc(t);const i=e.$implicit,a=n.zc(5),s=n.hc(3);return a.select(),s.openTranslation(i.value)})),n.Rb(7,"mat-icon",18),n.Vb(),n.Vb(),n.Tb()}if(2&t){const t=e.$implicit;n.Db(3),n.Rc(t.id),n.Db(1),n.oc("ngModel",t.value)}}function q7(t,e){if(1&t&&(n.Wb(0,"mat-tab",10),n.Oc(1,G7,3,2,"ng-template",11),n.Wb(2,"div",12),n.Oc(3,X7,8,2,"ng-container",4),n.Vb(),n.Vb()),2&t){const t=n.hc().$implicit,e=n.hc();n.oc("label",t.key),n.Db(3),n.oc("ngForOf",e.missingLang[t.key])}}function K7(t,e){if(1&t&&(n.Ub(0),n.Oc(1,q7,4,2,"mat-tab",9),n.Tb()),2&t){const t=e.$implicit;n.Db(1),n.oc("ngIf","fr"!==t.key)}}let Y7=(()=>{class t{constructor(t,e,i,n){this.data=t,this.dialogRef=e,this.http=i,this.notify=n,this.missingLang=[],this.currentLang="en"}ngOnInit(){this.getLangs()}getLangs(){this.http.get("../rest/dev/lang").pipe(Object(mt.a)(t=>{this.allLang=t.langs,Object.keys(this.allLang).forEach(t=>{this.missingLang[t]=Object.keys(this.allLang.fr).filter(e=>-1===Object.keys(this.allLang[t]).indexOf(e)).map(t=>({id:t,value:this.allLang.fr[t]+"__TO_TRANSLATE"}))})}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}openTranslation(t){window.open("https://translate.google.fr/?hl=fr#view=home&op=translate&sl=fr&tl="+this.currentLang+"&text="+t.replace("__TO_TRANSLATE",""),"_blank")}setActiveLang(t){this.currentLang=t.tab.textLabel}generateMissingLang(t=!1){let e={},i=this.allLang[this.currentLang];const n=/__TO_TRANSLATE$/g;this.missingLang[this.currentLang].forEach(i=>{null===i.value.match(n)&&t?e[i.id]=i.value:t||(e[i.id]=i.value)}),i=Object.assign(Object.assign({},i),e),this.http.put("../rest/dev/lang",{langId:this.currentLang,jsonContent:i}).pipe(Object(mt.a)(t=>{Object.keys(e).forEach(t=>{delete this.allLang[this.currentLang][t],this.missingLang[this.currentLang]=this.missingLang[this.currentLang].filter(e=>e.id!==t),this.data.countMissingLang--}),this.dialogRef.close(this.data.countMissingLang)}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),console.log(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(q.a),n.Qb(q.h),n.Qb(v.b),n.Qb(D.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["ng-component"]],decls:15,vars:3,consts:[[1,"mat-dialog-content-container","lang-container"],["mat-dialog-title",""],["mat-dialog-content",""],[3,"selectedTabChange"],[4,"ngFor","ngForOf"],[1,"divider-modal"],["mat-dialog-actions",""],["mat-raised-button","","color","primary",1,"actions",3,"click"],["mat-raised-button","","color","","mat-dialog-close","","cdkFocusInitial","",1,"actions"],[3,"label",4,"ngIf"],[3,"label"],["mat-tab-label",""],[2,"display","grid"],[3,"matBadge"],["appearance","fill"],["matInput","",3,"ngModel","ngModelChange"],["toto",""],["mat-button","","color","primary","matSuffix","","mat-icon-button","",3,"click"],[1,"fas","fa-language"]],template:function(t,e){1&t&&(n.Wb(0,"div",0),n.Wb(1,"h1",1),n.Qc(2,"Lang checking"),n.Vb(),n.Wb(3,"div",2),n.Wb(4,"mat-tab-group",3),n.dc("selectedTabChange",(function(t){return e.setActiveLang(t)})),n.Oc(5,K7,2,1,"ng-container",4),n.ic(6,"keyvalue"),n.Vb(),n.Vb(),n.Rb(7,"span",5),n.Wb(8,"div",6),n.Wb(9,"button",7),n.dc("click",(function(){return e.generateMissingLang(!1)})),n.Qc(10,"Generate lang variables"),n.Vb(),n.Wb(11,"button",7),n.dc("click",(function(){return e.generateMissingLang(!0)})),n.Qc(12,"Generate lang variables (IGNORE __TO_TRANSLATE)"),n.Vb(),n.Wb(13,"button",8),n.Qc(14,"Close"),n.Vb(),n.Vb(),n.Vb()),2&t&&(n.Db(5),n.oc("ngForOf",n.jc(6,1,e.allLang)))},directives:[q.i,q.f,Te.c,P.s,q.c,k.b,q.d,P.t,Te.a,Te.d,wt.a,Y.c,Y.g,J.b,X.d,X.u,X.x,Y.j,S.a],pipes:[P.l],styles:[".mat-dialog-content[_ngcontent-%COMP%]{padding-top:0}.lang-container[_ngcontent-%COMP%] .mat-tab-header{position:-webkit-sticky;position:sticky;top:0;z-index:2}.lang-container[_ngcontent-%COMP%] .mat-tab-label-container{background:#fff}"]}),t})(),J7=(()=>{class t{constructor(t,e,i,n){this.notify=t,this.dialog=e,this.http=i,this.functionsService=n,this.countMissingLang=0}ngOnInit(){this.getLangs()}openLangTool(){this.dialog.open(Y7,{panelClass:"maarch-modal",height:"99%",width:"80%",data:{countMissingLang:this.countMissingLang}}).afterClosed().pipe(Object(d.a)(t=>!this.functionsService.empty(t)),Object(mt.a)(t=>{this.countMissingLang=t}),Object(m.a)(t=>(this.notify.handleErrors(t),Object(c.a)(!1)))).subscribe()}getLangs(){this.http.get("../rest/dev/lang").pipe(Object(mt.a)(t=>{this.allLang=t.langs,Object.keys(this.allLang).forEach(t=>{this.countMissingLang+=Object.keys(this.allLang.fr).filter(e=>-1===Object.keys(this.allLang[t]).indexOf(e)).length})}),Object(m.a)(t=>(this.notify.handleSoftErrors(t),Object(c.a)(!1)))).subscribe()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(D.a),n.Qb(q.b),n.Qb(v.b),n.Qb(_t.a))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-dev-tool"]],decls:11,vars:5,consts:[["mat-fab","","cdkDrag","","color","warn",2,"position","fixed","right","50px","top","50px","z-index","1",3,"matBadge","matMenuTriggerFor"],[1,"fas","fa-toolbox",2,"height","auto","font-size","23px"],["menu","matMenu"],["mat-menu-item","",3,"click"],["color","primary",1,"fas","fa-language",2,"height","auto"],[3,"matBadge"]],template:function(t,e){if(1&t&&(n.Wb(0,"button",0),n.Rb(1,"mat-icon",1),n.Vb(),n.Wb(2,"mat-menu",null,2),n.Wb(4,"button",3),n.dc("click",(function(){return e.openLangTool()})),n.Rb(5,"mat-icon",4),n.Wb(6,"span"),n.Qc(7,"Missing lang"),n.Vb(),n.Qc(8,"\xa0\xa0"),n.Wb(9,"span",5),n.Qc(10,"\xa0"),n.Vb(),n.Vb(),n.Vb()),2&t){const t=n.zc(3);n.oc("matBadge",e.countMissingLang)("matMenuTriggerFor",t),n.Db(2),n.Fb("devToolListMenu"),n.Db(7),n.oc("matBadge",e.countMissingLang)}},directives:[k.b,lo.a,wt.a,ne.d,S.a,ne.e,ne.b],styles:[".devToolListMenu{min-height:auto!important;width:250px}"]}),t})();const Z7=["snavLeft"];function t8(t,e){1&t&&n.Rb(0,"header-panel")}function e8(t,e){1&t&&n.Rb(0,"menu-shortcut")}function i8(t,e){1&t&&n.Rb(0,"menu-nav")}function n8(t,e){1&t&&(n.Ub(0),n.Rb(1,"basket-home",null,6),n.Rb(3,"mat-divider"),n.Rb(4,"panel-folder",null,7),n.Tb())}function a8(t,e){1&t&&n.Rb(0,"div",8)}const s8=function(t){return{width:t}};function o8(t,e){if(1&t&&(n.Wb(0,"mat-sidenav-container",2),n.Wb(1,"mat-sidenav",3,4),n.Oc(3,t8,1,0,"header-panel",1),n.Oc(4,e8,1,0,"menu-shortcut",1),n.Oc(5,i8,1,0,"menu-nav",1),n.Oc(6,n8,6,0,"ng-container",1),n.Oc(7,a8,1,0,"div",5),n.Vb(),n.Wb(8,"mat-sidenav-content"),n.Rb(9,"router-outlet"),n.Vb(),n.Vb()),2&t){const t=n.hc();n.Db(1),n.Ib("sideBarForm",t.headerService.sideBarForm&&!t.appService.getViewMode())("sideBarFormMobile",t.appService.getViewMode()&&t.headerService.sideBarForm),n.oc("mode",t.appService.getViewMode()?"over":"side")("fixedInViewport",t.appService.getViewMode())("opened",!t.appService.getViewMode()&&!t.headerService.hideSideBar)("ngStyle",n.vc(13,s8,t.appService.getViewMode()?"80%":"350px")),n.Db(2),n.oc("ngIf",t.headerService.showhHeaderPanel&&!t.headerService.hideSideBar),n.Db(1),n.oc("ngIf",t.headerService.showMenuShortcut&&!t.headerService.hideSideBar),n.Db(1),n.oc("ngIf",t.headerService.showMenuShortcut&&!t.headerService.hideSideBar),n.Db(1),n.oc("ngIf",!t.headerService.sideBarAdmin&&!t.headerService.hideSideBar),n.Db(1),n.oc("ngIf",!t.headerService.hideSideBar)}}function r8(t,e){1&t&&n.Rb(0,"app-dev-tool")}const c8={showDelay:500,hideDelay:0,touchendHideDelay:0};let l8=(()=>{class t{constructor(t,e,i,n,s,o,r,c,l){this.translate=t,this.http=e,this.appService=s,this.headerService=o,this.authService=r,this.adapter=c,this.dialog=l,this.debugMode=!1,this.loading=!0,t.setDefaultLang("fr"),i.addSvgIcon("maarchLogo",n.bypassSecurityTrustResourceUrl("../rest/images?image=onlyLogo")),i.addSvgIcon("maarchLogoFull",n.bypassSecurityTrustResourceUrl("../rest/images?image=logo")),i.addSvgIcon("maarchLogoWhite",n.bypassSecurityTrustResourceUrl("assets/logo_only_white.svg")),i.addSvgIcon("maarchLogoWhiteFull",n.bypassSecurityTrustResourceUrl("assets/logo_white.svg")),i.addSvgIcon("maarchBox",n.bypassSecurityTrustResourceUrl("assets/maarch_box.svg")),i.addSvgIcon("alfresco",n.bypassSecurityTrustResourceUrl("assets/alfresco.svg")),a.a.production||(this.debugMode=!0)}onResize(){this.appService.setScreenWidth(window.innerWidth)}ngOnInit(){return Object(r.a)(this,void 0,void 0,(function*(){this.loading=!1,this.headerService.hideSideBar=!0,setTimeout(()=>{this.headerService.sideNavLeft=this.snavLeft},0),this.translate.get("lang.langISO").subscribe(t=>{this.adapter.setLocale(t)})}))}ngAfterViewInit(){this.appService.setScreenWidth(window.innerWidth)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(g.e),n.Qb(v.b),n.Qb(S.c),n.Qb(ca.b),n.Qb(w.a),n.Qb(y.a),n.Qb(_.a),n.Qb(W.c),n.Qb(q.b))},t.\u0275cmp=n.Kb({type:t,selectors:[["app-root"]],viewQuery:function(t,e){var i;1&t&&n.Xc(Z7,!0),2&t&&n.yc(i=n.ec())&&(e.snavLeft=i.first)},hostBindings:function(t,e){1&t&&n.dc("resize",(function(t){return e.onResize(t)}),!1,n.Cc)},features:[n.Cb([w.a,{provide:A.a,useValue:c8}],[S.c])],decls:2,vars:2,consts:[["class","maarch-container","autosize","",4,"ngIf"],[4,"ngIf"],["autosize","",1,"maarch-container"],["autoFocus","false",1,"panel-left",2,"overflow-x","hidden",3,"mode","fixedInViewport","opened","ngStyle"],["snavLeft",""],["id","adminMenu","style","display: contents;",4,"ngIf"],["basketHome",""],["panelFolder",""],["id","adminMenu",2,"display","contents"]],template:function(t,e){1&t&&(n.Oc(0,o8,10,15,"mat-sidenav-container",0),n.Oc(1,r8,1,0,"app-dev-tool",1)),2&t&&(n.oc("ngIf",!e.loading),n.Db(1),n.oc("ngIf",e.debugMode&&e.authService.isAuth()))},directives:[P.t,I.e,I.d,P.w,I.f,o.h,O6,zt,x6,Z6,T.a,H7,J7],encapsulation:2}),t})(),d8=(()=>{class t extends ca.d{constructor(){super(...arguments),this.overrides={pinch:{enable:!1},rotate:{enable:!1}}}}return t.\u0275fac=function(e){return h8(e||t)},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();const h8=n.Yb(d8);let u8=(()=>{class t{}return t.\u0275mod=n.Ob({type:t,bootstrap:[l8]}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},providers:[{provide:v.a,useClass:f7,multi:!0},P.f,sI,JD,tw.a,bC,Dt.a,{provide:ca.c,useClass:d8}],imports:[[ca.a,p7.b,v.c,AF.a,as.forRoot(),s.a,jF,u7,h7,b7],s.a]}),t})();n.Hc(by,[P.q,P.r,P.s,P.t,P.A,P.w,P.x,P.y,P.z,P.u,P.v,g.a,za,x6,zt,We,Ot,O6,Z6,X.K,X.z,X.J,X.d,X.A,X.D,X.a,X.G,X.H,X.C,X.u,X.v,X.F,X.q,X.p,X.B,X.b,X.e,X.x,X.y,X.w,X.j,X.m,X.k,X.n,X.g,o.h,o.d,o.f,o.e,o.i,j.a,t7.b,j.c,M4.b,Y.b,Y.c,Y.f,Y.g,Y.h,Y.i,Y.j,ee.a,ee.c,W.p,W.o,te.c,te.a,e7.b,e7.c,J.b,J.d,A.b,A.d,Te.c,Te.d,Te.a,Te.f,Te.e,Te.b,I.a,I.b,I.c,I.d,I.e,I.f,k.b,k.a,K.a,K.f,K.n,K.d,K.m,K.l,K.b,K.e,K.k,K.i,K.h,K.g,K.o,K.c,og.b,og.a,V.a,V.c,ni.a,M.a,M.c,ne.e,ne.b,ne.d,ne.a,i7.b,i7.d,i7.g,W.l,i7.f,i7.e,i7.a,vt.o,vt.i,vt.k,vt.c,vt.b,vt.n,vt.e,vt.g,vt.h,vt.a,vt.d,vt.j,vt.m,vt.f,vt.l,vt.r,Kt.a,Fe.a,Fe.b,ae.a,ae.b,ae.f,ae.g,ae.h,ae.j,ae.k,ae.m,ae.p,ae.n,ae.c,ae.d,ae.o,ae.l,ae.e,gt.a,gt.c,gt.d,gt.g,gt.h,gt.f,gt.e,Ne.a,Ne.d,Ne.c,n7.c,S.a,q.e,q.d,q.i,q.f,q.c,R.a,R.h,R.d,R.b,R.c,R.g,W.s,R.i,R.f,T.a,ze.d,ze.a,ze.c,ze.e,ze.b,ze.f,a7.a,a7.j,a7.b,a7.d,a7.e,a7.h,a7.i,a7.c,a7.f,hc.b,hc.a,gY.a,wt.a,s7.a,W.u,vy.a,vy.h,vy.j,vy.k,vy.b,vy.g,vy.i,M4.a,M4.d,M4.e,Ee.b,Ee.c,Ee.d,Ee.f,Ee.e,Ee.g,At,Rt,jt,lo.e,lo.f,lo.a,lo.b,lo.d,lo.c,ii,f0,fr,vO,im,Ef,ie,Zd,El,iO,nD,Ko,go,Qv,My,cQ,KD,hd,d7,Sg,Uw,uP,Fk,kC,Du,qT,$O,IO,wW,LW,$D,Gs,vr,Jr,Cr,OI,Cw,hw,Ow,jR,eV,eM,l8,pF,PF,kk,GR,ZR,rj,mj,uW,pA,$A,AO,yW,Pw,pM,gR,Ok,ra,G,bv,pW,aO,ho,Ph,pu,NV,gd,YD,tc,Vw,GP,_7,z7,O7,tP,io,Ws,ut,cc,us,H7,ht,eo,aa,R0,oo,Ls,aI,Jo,Y7,J7,dR,Pu,Mb,yb,bb,Sp,Ap,ib,Nu,tp,up,Cp,cb,_f,If,Kb,Qb,Wb,Ab,Sb,kb,Om,zm,Ym,sg,Yg,pv,b_,Jv,M_,L_,ey,Ty,zy,Xy,tx,ox,px,by,Vx,Bx,eC,pC,LR],[P.b,P.G,P.p,P.k,P.E,P.g,P.C,P.F,P.d,P.f,P.i,P.j,P.l,g.d,Tt.a,Tt.e,Tt.k,Tt.n,Tt.o,Tt.p,Tt.r,Tt.t,Tt.u,Tt.v,Tt.q,Tt.b,Tt.c,Tt.f,Tt.w,Tt.h,Tt.s,Tt.d,Tt.m,Tt.g,Tt.x,rg,uo,ec,si,Wt.a,ps,bs,HD]),a.a.production&&(window.console.debug=function(){},Object(n.W)()),ca.e().bootstrapModule(u8)},jtHE:function(t,e,i){"use strict";i.d(e,"a",(function(){return m}));var n=i("XNiG"),a=i("3N8a");class s extends a.a{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}schedule(t,e=0){return e>0?super.schedule(t,e):(this.delay=e,this.state=t,this.scheduler.flush(this),this)}execute(t,e){return e>0||this.closed?super.execute(t,e):this._execute(t,e)}requestAsyncId(t,e,i=0){return null!==i&&i>0||null===i&&this.delay>0?super.requestAsyncId(t,e,i):t.flush(this)}}var o=i("IjjT");class r extends o.a{}const c=new r(s);var l=i("quSY"),d=i("7o/Q"),h=i("WMd4");class u extends d.a{constructor(t,e,i=0){super(t),this.scheduler=e,this.delay=i}static dispatch(t){const{notification:e,destination:i}=t;e.observe(i),this.unsubscribe()}scheduleMessage(t){this.destination.add(this.scheduler.schedule(u.dispatch,this.delay,new p(t,this.destination)))}_next(t){this.scheduleMessage(h.a.createNext(t))}_error(t){this.scheduleMessage(h.a.createError(t)),this.unsubscribe()}_complete(){this.scheduleMessage(h.a.createComplete()),this.unsubscribe()}}class p{constructor(t,e){this.notification=t,this.destination=e}}var b=i("9ppp"),f=i("Ylt2");class m extends n.a{constructor(t=Number.POSITIVE_INFINITY,e=Number.POSITIVE_INFINITY,i){super(),this.scheduler=i,this._events=[],this._infiniteTimeWindow=!1,this._bufferSize=t<1?1:t,this._windowTime=e<1?1:e,e===Number.POSITIVE_INFINITY?(this._infiniteTimeWindow=!0,this.next=this.nextInfiniteTimeWindow):this.next=this.nextTimeWindow}nextInfiniteTimeWindow(t){if(!this.isStopped){const e=this._events;e.push(t),e.length>this._bufferSize&&e.shift()}super.next(t)}nextTimeWindow(t){this.isStopped||(this._events.push(new g(this._getNow(),t)),this._trimBufferThenGetEvents()),super.next(t)}_subscribe(t){const e=this._infiniteTimeWindow,i=e?this._events:this._trimBufferThenGetEvents(),n=this.scheduler,a=i.length;let s;if(this.closed)throw new b.a;if(this.isStopped||this.hasError?s=l.a.EMPTY:(this.observers.push(t),s=new f.a(this,t)),n&&t.add(t=new u(t,n)),e)for(let o=0;o<a&&!t.closed;o++)t.next(i[o]);else for(let o=0;o<a&&!t.closed;o++)t.next(i[o].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),s}_getNow(){return(this.scheduler||c).now()}_trimBufferThenGetEvents(){const t=this._getNow(),e=this._bufferSize,i=this._windowTime,n=this._events,a=n.length;let s=0;for(;s<a&&!(t-n[s].time<i);)s++;return a>e&&(s=Math.max(s,a-e)),s>0&&n.splice(0,s),n}}class g{constructor(t,e){this.time=t,this.value=e}}},kJWO:function(t,e,i){"use strict";i.d(e,"a",(function(){return n}));const n=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")()},kiQV:function(t){t.exports=JSON.parse('{"name":"MaarchCourrier","version":"20.10.5","description":"MaarchCourrier","scripts":{"build-css":"node-sass --include-path scss src/frontend/css/maarch-material.scss src/frontend/css/maarch-material.css --output-style compressed","build-prod":"ng build --prod && npm run build-css","build-watch":"ng build --watch","build":"ng build","check-update":"ncu","dep-list":"npm list --depth=0","upgrade":"ncu -u","create-component":"echo Component name ?\xa0&& read varname && ng g c $varname --module app --style=scss","create-component-admin":"echo Component name ?\xa0&& read varname && ng g c administration/$varname --module administration --style=scss","ee-launch":"webdriver-manager update && webdriver-manager start --detach && protractor test/e2e/conf.js && webdriver-manager shutdown && fuser -k 4444/tcp","ee-update":"webdriver-manager update","ee-start-server":"webdriver-manager start","ee-test":"protractor test/e2e/conf.js"},"keywords":[],"author":"Maarch","license":"GPL-3.0","dependencies":{"core-js":"3.6.5","pdfjs-dist":"2.5.207","tinymce-i18n":"20.4.4","tinymce":"5.5.0","zone.js":"0.11.2"},"devDependencies":{"@angular-devkit/build-angular":"0.1002.0","@angular/animations":"10.2.0","@angular/cdk":"10.2.7","@angular/cli":"10.2.0","@angular/common":"10.2.0","@angular/compiler-cli":"10.2.0","@angular/compiler":"10.2.0","@angular/core":"10.2.0","@angular/forms":"10.2.0","@angular/material":"10.2.7","@angular/platform-browser-dynamic":"10.2.0","@angular/platform-browser":"10.2.0","@angular/platform-server":"10.2.0","@angular/router":"10.2.0","@fortawesome/fontawesome-free":"5.15.1","@ngx-translate/core":"13.0.0","@ngx-translate/http-loader":"6.0.0","@swimlane/ngx-charts":"16.0.0","@types/datatables.net":"1.10.19","@types/jquery.nicescroll":"3.7.1","@types/jquery":"3.5.3","@types/jstree":"3.3.40","@types/tooltipster":"0.0.30","ajv":"6.12.6","bootstrap":"3.4.1","chosen-js":"1.8.7","codelyzer":"6.0.0","flat-to-nested":"1.1.0","hammerjs":"2.0.8","html-minifier":"4.0.0","jquery-typeahead":"2.11.1","jquery.nicescroll":"3.7.6","jquery":"3.5.1","jstree-bootstrap-theme":"1.0.1","ng2-dnd":"5.0.2","ng2-pdf-viewer":"6.3.2","ngx-cookie-service":"10.0.1","ngx-joyride":"2.3.1","ngx-papaparse":"5.0.0","ngx-pipes":"2.7.5","node-sass":"4.14.1","nodemon":"2.0.6","npm-check-updates":"9.1.2","photoswipe":"4.1.3","protractor":"7.0.0","rxjs":"6.6.3","tooltipster":"4.2.8","tslib":"2.0.3","tslint":"6.1.3","typescript":"4.0.3","url-loader":"4.1.1"},"repository":{}}')},kmnG:function(t,e,i){"use strict";i.d(e,"a",(function(){return Z})),i.d(e,"b",(function(){return E})),i.d(e,"c",(function(){return tt})),i.d(e,"d",(function(){return L})),i.d(e,"e",(function(){return et})),i.d(e,"f",(function(){return z})),i.d(e,"g",(function(){return B})),i.d(e,"h",(function(){return U})),i.d(e,"i",(function(){return H})),i.d(e,"j",(function(){return X}));var n=i("GU7r"),a=i("ofXK"),s=i("fXoL"),o=i("FKr1"),r=i("8LU1"),c=i("XNiG"),l=i("VRyK"),d=i("xgIS"),h=i("JX91"),u=i("1G5W"),p=i("IzEk"),b=i("R0Ic"),f=i("R1ws"),m=i("cH1L"),g=i("nLfN");const v=["underline"],_=["connectionContainer"],y=["inputContainer"],x=["label"];function C(t,e){1&t&&(s.Ub(0),s.Wb(1,"div",14),s.Rb(2,"div",15),s.Rb(3,"div",16),s.Rb(4,"div",17),s.Vb(),s.Wb(5,"div",18),s.Rb(6,"div",15),s.Rb(7,"div",16),s.Rb(8,"div",17),s.Vb(),s.Tb())}function O(t,e){1&t&&(s.Wb(0,"div",19),s.mc(1,1),s.Vb())}function D(t,e){if(1&t&&(s.Ub(0),s.mc(1,2),s.Wb(2,"span"),s.Qc(3),s.Vb(),s.Tb()),2&t){const t=s.hc(2);s.Db(3),s.Rc(t._control.placeholder)}}function w(t,e){1&t&&s.mc(0,3,["*ngSwitchCase","true"])}function M(t,e){1&t&&(s.Wb(0,"span",23),s.Qc(1," *"),s.Vb())}function k(t,e){if(1&t){const t=s.Xb();s.Wb(0,"label",20,21),s.dc("cdkObserveContent",(function(){return s.Dc(t),s.hc().updateOutlineGap()})),s.Oc(2,D,4,1,"ng-container",12),s.Oc(3,w,1,0,"ng-content",12),s.Oc(4,M,2,0,"span",22),s.Vb()}if(2&t){const t=s.hc();s.Ib("mat-empty",t._control.empty&&!t._shouldAlwaysFloat())("mat-form-field-empty",t._control.empty&&!t._shouldAlwaysFloat())("mat-accent","accent"==t.color)("mat-warn","warn"==t.color),s.oc("cdkObserveContentDisabled","outline"!=t.appearance)("id",t._labelId)("ngSwitch",t._hasLabel()),s.Eb("for",t._control.id)("aria-owns",t._control.id),s.Db(2),s.oc("ngSwitchCase",!1),s.Db(1),s.oc("ngSwitchCase",!0),s.Db(1),s.oc("ngIf",!t.hideRequiredMarker&&t._control.required&&!t._control.disabled)}}function S(t,e){1&t&&(s.Wb(0,"div",24),s.mc(1,4),s.Vb())}function I(t,e){if(1&t&&(s.Wb(0,"div",25,26),s.Rb(2,"span",27),s.Vb()),2&t){const t=s.hc();s.Db(2),s.Ib("mat-accent","accent"==t.color)("mat-warn","warn"==t.color)}}function P(t,e){if(1&t&&(s.Wb(0,"div"),s.mc(1,5),s.Vb()),2&t){const t=s.hc();s.oc("@transitionMessages",t._subscriptAnimationState)}}function V(t,e){if(1&t&&(s.Wb(0,"div",31),s.Qc(1),s.Vb()),2&t){const t=s.hc(2);s.oc("id",t._hintLabelId),s.Db(1),s.Rc(t.hintLabel)}}function R(t,e){if(1&t&&(s.Wb(0,"div",28),s.Oc(1,V,2,2,"div",29),s.mc(2,6),s.Rb(3,"div",30),s.mc(4,7),s.Vb()),2&t){const t=s.hc();s.oc("@transitionMessages",t._subscriptAnimationState),s.Db(1),s.oc("ngIf",t.hintLabel)}}const j=["*",[["","matPrefix",""]],[["mat-placeholder"]],[["mat-label"]],[["","matSuffix",""]],[["mat-error"]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],A=["*","[matPrefix]","mat-placeholder","mat-label","[matSuffix]","mat-error","mat-hint:not([align='end'])","mat-hint[align='end']"];let W=0;const T=new s.s("MatError");let E=(()=>{class t{constructor(){this.id="mat-error-"+W++}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["mat-error"]],hostAttrs:["role","alert",1,"mat-error"],hostVars:1,hostBindings:function(t,e){2&t&&s.Eb("id",e.id)},inputs:{id:"id"},features:[s.Cb([{provide:T,useExisting:t}])]}),t})();const F={transitionMessages:Object(b.n)("transitionMessages",[Object(b.k)("enter",Object(b.l)({opacity:1,transform:"translateY(0%)"})),Object(b.m)("void => enter",[Object(b.l)({opacity:0,transform:"translateY(-100%)"}),Object(b.e)("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let L=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t}),t})(),Q=0;const N=new s.s("MatHint");let z=(()=>{class t{constructor(){this.align="start",this.id="mat-hint-"+Q++}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["mat-hint"]],hostAttrs:[1,"mat-hint"],hostVars:4,hostBindings:function(t,e){2&t&&(s.Eb("id",e.id)("align",null),s.Ib("mat-form-field-hint-end","end"===e.align))},inputs:{align:"align",id:"id"},features:[s.Cb([{provide:N,useExisting:t}])]}),t})(),B=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["mat-label"]]}),t})(),U=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["mat-placeholder"]]}),t})();const $=new s.s("MatPrefix");let H=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","matPrefix",""]],features:[s.Cb([{provide:$,useExisting:t}])]}),t})();const G=new s.s("MatSuffix");let X=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=s.Lb({type:t,selectors:[["","matSuffix",""]],features:[s.Cb([{provide:G,useExisting:t}])]}),t})(),q=0;class K{constructor(t){this._elementRef=t}}const Y=Object(o.A)(K,"primary"),J=new s.s("MAT_FORM_FIELD_DEFAULT_OPTIONS"),Z=new s.s("MatFormField");let tt=(()=>{class t extends Y{constructor(t,e,i,n,a,s,o,r){super(t),this._elementRef=t,this._changeDetectorRef=e,this._dir=n,this._defaults=a,this._platform=s,this._ngZone=o,this._outlineGapCalculationNeededImmediately=!1,this._outlineGapCalculationNeededOnStable=!1,this._destroyed=new c.a,this._showAlwaysAnimate=!1,this._subscriptAnimationState="",this._hintLabel="",this._hintLabelId="mat-hint-"+q++,this._labelId="mat-form-field-label-"+q++,this._labelOptions=i||{},this.floatLabel=this._getDefaultFloatLabelState(),this._animationsEnabled="NoopAnimations"!==r,this.appearance=a&&a.appearance?a.appearance:"legacy",this._hideRequiredMarker=!(!a||null==a.hideRequiredMarker)&&a.hideRequiredMarker}get appearance(){return this._appearance}set appearance(t){const e=this._appearance;this._appearance=t||this._defaults&&this._defaults.appearance||"legacy","outline"===this._appearance&&e!==t&&(this._outlineGapCalculationNeededOnStable=!0)}get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(t){this._hideRequiredMarker=Object(r.c)(t)}_shouldAlwaysFloat(){return"always"===this.floatLabel&&!this._showAlwaysAnimate}_canLabelFloat(){return"never"!==this.floatLabel}get hintLabel(){return this._hintLabel}set hintLabel(t){this._hintLabel=t,this._processHints()}get floatLabel(){return"legacy"!==this.appearance&&"never"===this._floatLabel?"auto":this._floatLabel}set floatLabel(t){t!==this._floatLabel&&(this._floatLabel=t||this._getDefaultFloatLabelState(),this._changeDetectorRef.markForCheck())}get _control(){return this._explicitFormFieldControl||this._controlNonStatic||this._controlStatic}set _control(t){this._explicitFormFieldControl=t}getLabelId(){return this._hasFloatingLabel()?this._labelId:null}getConnectedOverlayOrigin(){return this._connectionContainerRef||this._elementRef}ngAfterContentInit(){this._validateControlChild();const t=this._control;t.controlType&&this._elementRef.nativeElement.classList.add("mat-form-field-type-"+t.controlType),t.stateChanges.pipe(Object(h.a)(null)).subscribe(()=>{this._validatePlaceholders(),this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),t.ngControl&&t.ngControl.valueChanges&&t.ngControl.valueChanges.pipe(Object(u.a)(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck()),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe(Object(u.a)(this._destroyed)).subscribe(()=>{this._outlineGapCalculationNeededOnStable&&this.updateOutlineGap()})}),Object(l.a)(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._outlineGapCalculationNeededOnStable=!0,this._changeDetectorRef.markForCheck()}),this._hintChildren.changes.pipe(Object(h.a)(null)).subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.pipe(Object(h.a)(null)).subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._dir&&this._dir.change.pipe(Object(u.a)(this._destroyed)).subscribe(()=>{"function"==typeof requestAnimationFrame?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this.updateOutlineGap())}):this.updateOutlineGap()})}ngAfterContentChecked(){this._validateControlChild(),this._outlineGapCalculationNeededImmediately&&this.updateOutlineGap()}ngAfterViewInit(){this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_shouldForward(t){const e=this._control?this._control.ngControl:null;return e&&e[t]}_hasPlaceholder(){return!!(this._control&&this._control.placeholder||this._placeholderChild)}_hasLabel(){return!(!this._labelChildNonStatic&&!this._labelChildStatic)}_shouldLabelFloat(){return this._canLabelFloat()&&(this._control&&this._control.shouldLabelFloat||this._shouldAlwaysFloat())}_hideControlPlaceholder(){return"legacy"===this.appearance&&!this._hasLabel()||this._hasLabel()&&!this._shouldLabelFloat()}_hasFloatingLabel(){return this._hasLabel()||"legacy"===this.appearance&&this._hasPlaceholder()}_getDisplayedMessages(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_animateAndLockLabel(){this._hasFloatingLabel()&&this._canLabelFloat()&&(this._animationsEnabled&&this._label&&(this._showAlwaysAnimate=!0,Object(d.a)(this._label.nativeElement,"transitionend").pipe(Object(p.a)(1)).subscribe(()=>{this._showAlwaysAnimate=!1})),this.floatLabel="always",this._changeDetectorRef.markForCheck())}_validatePlaceholders(){}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){}_getDefaultFloatLabelState(){return this._defaults&&this._defaults.floatLabel||this._labelOptions.float||"auto"}_syncDescribedByIds(){if(this._control){let t=[];if(this._control.userAriaDescribedBy&&"string"==typeof this._control.userAriaDescribedBy&&t.push(...this._control.userAriaDescribedBy.split(" ")),"hint"===this._getDisplayedMessages()){const e=this._hintChildren?this._hintChildren.find(t=>"start"===t.align):null,i=this._hintChildren?this._hintChildren.find(t=>"end"===t.align):null;e?t.push(e.id):this._hintLabel&&t.push(this._hintLabelId),i&&t.push(i.id)}else this._errorChildren&&t.push(...this._errorChildren.map(t=>t.id));this._control.setDescribedByIds(t)}}_validateControlChild(){}updateOutlineGap(){const t=this._label?this._label.nativeElement:null;if("outline"!==this.appearance||!t||!t.children.length||!t.textContent.trim())return;if(!this._platform.isBrowser)return;if(!this._isAttachedToDOM())return void(this._outlineGapCalculationNeededImmediately=!0);let e=0,i=0;const n=this._connectionContainerRef.nativeElement,a=n.querySelectorAll(".mat-form-field-outline-start"),s=n.querySelectorAll(".mat-form-field-outline-gap");if(this._label&&this._label.nativeElement.children.length){const a=n.getBoundingClientRect();if(0===a.width&&0===a.height)return this._outlineGapCalculationNeededOnStable=!0,void(this._outlineGapCalculationNeededImmediately=!1);const s=this._getStartEnd(a),o=t.children,r=this._getStartEnd(o[0].getBoundingClientRect());let c=0;for(let t=0;t<o.length;t++)c+=o[t].offsetWidth;e=Math.abs(r-s)-5,i=c>0?.75*c+10:0}for(let o=0;o<a.length;o++)a[o].style.width=e+"px";for(let o=0;o<s.length;o++)s[o].style.width=i+"px";this._outlineGapCalculationNeededOnStable=this._outlineGapCalculationNeededImmediately=!1}_getStartEnd(t){return this._dir&&"rtl"===this._dir.value?t.right:t.left}_isAttachedToDOM(){const t=this._elementRef.nativeElement;if(t.getRootNode){const e=t.getRootNode();return e&&e!==t}return document.documentElement.contains(t)}}return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.l),s.Qb(s.h),s.Qb(o.g,8),s.Qb(m.c,8),s.Qb(J,8),s.Qb(g.a),s.Qb(s.C),s.Qb(f.a,8))},t.\u0275cmp=s.Kb({type:t,selectors:[["mat-form-field"]],contentQueries:function(t,e,i){var n;1&t&&(s.Jb(i,L,!0),s.Jc(i,L,!0),s.Jb(i,B,!0),s.Jc(i,B,!0),s.Jb(i,U,!0),s.Jb(i,T,!0),s.Jb(i,N,!0),s.Jb(i,$,!0),s.Jb(i,G,!0)),2&t&&(s.yc(n=s.ec())&&(e._controlNonStatic=n.first),s.yc(n=s.ec())&&(e._controlStatic=n.first),s.yc(n=s.ec())&&(e._labelChildNonStatic=n.first),s.yc(n=s.ec())&&(e._labelChildStatic=n.first),s.yc(n=s.ec())&&(e._placeholderChild=n.first),s.yc(n=s.ec())&&(e._errorChildren=n),s.yc(n=s.ec())&&(e._hintChildren=n),s.yc(n=s.ec())&&(e._prefixChildren=n),s.yc(n=s.ec())&&(e._suffixChildren=n))},viewQuery:function(t,e){var i;1&t&&(s.Xc(v,!0),s.Kc(_,!0),s.Xc(y,!0),s.Xc(x,!0)),2&t&&(s.yc(i=s.ec())&&(e.underlineRef=i.first),s.yc(i=s.ec())&&(e._connectionContainerRef=i.first),s.yc(i=s.ec())&&(e._inputContainerRef=i.first),s.yc(i=s.ec())&&(e._label=i.first))},hostAttrs:[1,"mat-form-field"],hostVars:44,hostBindings:function(t,e){2&t&&s.Ib("mat-form-field-appearance-standard","standard"==e.appearance)("mat-form-field-appearance-fill","fill"==e.appearance)("mat-form-field-appearance-outline","outline"==e.appearance)("mat-form-field-appearance-legacy","legacy"==e.appearance)("mat-form-field-invalid",e._control.errorState)("mat-form-field-can-float",e._canLabelFloat())("mat-form-field-should-float",e._shouldLabelFloat())("mat-form-field-has-label",e._hasFloatingLabel())("mat-form-field-hide-placeholder",e._hideControlPlaceholder())("mat-form-field-disabled",e._control.disabled)("mat-form-field-autofilled",e._control.autofilled)("mat-focused",e._control.focused)("mat-accent","accent"==e.color)("mat-warn","warn"==e.color)("ng-untouched",e._shouldForward("untouched"))("ng-touched",e._shouldForward("touched"))("ng-pristine",e._shouldForward("pristine"))("ng-dirty",e._shouldForward("dirty"))("ng-valid",e._shouldForward("valid"))("ng-invalid",e._shouldForward("invalid"))("ng-pending",e._shouldForward("pending"))("_mat-animation-noopable",!e._animationsEnabled)},inputs:{color:"color",floatLabel:"floatLabel",appearance:"appearance",hideRequiredMarker:"hideRequiredMarker",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[s.Cb([{provide:Z,useExisting:t}]),s.Ab],ngContentSelectors:A,decls:15,vars:8,consts:[[1,"mat-form-field-wrapper"],[1,"mat-form-field-flex",3,"click"],["connectionContainer",""],[4,"ngIf"],["class","mat-form-field-prefix",4,"ngIf"],[1,"mat-form-field-infix"],["inputContainer",""],[1,"mat-form-field-label-wrapper"],["class","mat-form-field-label",3,"cdkObserveContentDisabled","id","mat-empty","mat-form-field-empty","mat-accent","mat-warn","ngSwitch","cdkObserveContent",4,"ngIf"],["class","mat-form-field-suffix",4,"ngIf"],["class","mat-form-field-underline",4,"ngIf"],[1,"mat-form-field-subscript-wrapper",3,"ngSwitch"],[4,"ngSwitchCase"],["class","mat-form-field-hint-wrapper",4,"ngSwitchCase"],[1,"mat-form-field-outline"],[1,"mat-form-field-outline-start"],[1,"mat-form-field-outline-gap"],[1,"mat-form-field-outline-end"],[1,"mat-form-field-outline","mat-form-field-outline-thick"],[1,"mat-form-field-prefix"],[1,"mat-form-field-label",3,"cdkObserveContentDisabled","id","ngSwitch","cdkObserveContent"],["label",""],["class","mat-placeholder-required mat-form-field-required-marker","aria-hidden","true",4,"ngIf"],["aria-hidden","true",1,"mat-placeholder-required","mat-form-field-required-marker"],[1,"mat-form-field-suffix"],[1,"mat-form-field-underline"],["underline",""],[1,"mat-form-field-ripple"],[1,"mat-form-field-hint-wrapper"],["class","mat-hint",3,"id",4,"ngIf"],[1,"mat-form-field-hint-spacer"],[1,"mat-hint",3,"id"]],template:function(t,e){1&t&&(s.nc(j),s.Wb(0,"div",0),s.Wb(1,"div",1,2),s.dc("click",(function(t){return e._control.onContainerClick&&e._control.onContainerClick(t)})),s.Oc(3,C,9,0,"ng-container",3),s.Oc(4,O,2,0,"div",4),s.Wb(5,"div",5,6),s.mc(7),s.Wb(8,"span",7),s.Oc(9,k,5,16,"label",8),s.Vb(),s.Vb(),s.Oc(10,S,2,0,"div",9),s.Vb(),s.Oc(11,I,3,4,"div",10),s.Wb(12,"div",11),s.Oc(13,P,2,1,"div",12),s.Oc(14,R,5,2,"div",13),s.Vb(),s.Vb()),2&t&&(s.Db(3),s.oc("ngIf","outline"==e.appearance),s.Db(1),s.oc("ngIf",e._prefixChildren.length),s.Db(5),s.oc("ngIf",e._hasFloatingLabel()),s.Db(1),s.oc("ngIf",e._suffixChildren.length),s.Db(1),s.oc("ngIf","outline"!=e.appearance),s.Db(1),s.oc("ngSwitch",e._getDisplayedMessages()),s.Db(1),s.oc("ngSwitchCase","error"),s.Db(1),s.oc("ngSwitchCase","hint"))},directives:[a.t,a.x,a.y,n.a],styles:[".mat-form-field{display:inline-block;position:relative;text-align:left}[dir=rtl] .mat-form-field{text-align:right}.mat-form-field-wrapper{position:relative}.mat-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-form-field-prefix,.mat-form-field-suffix{white-space:nowrap;flex:none;position:relative}.mat-form-field-infix{display:block;position:relative;flex:auto;min-width:0;width:180px}.cdk-high-contrast-active .mat-form-field-infix{border-image:linear-gradient(transparent, transparent)}.mat-form-field-label-wrapper{position:absolute;left:0;box-sizing:content-box;width:100%;height:100%;overflow:hidden;pointer-events:none}[dir=rtl] .mat-form-field-label-wrapper{left:auto;right:0}.mat-form-field-label{position:absolute;left:0;font:inherit;pointer-events:none;width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;transform-origin:0 0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),width 400ms cubic-bezier(0.25, 0.8, 0.25, 1);display:none}[dir=rtl] .mat-form-field-label{transform-origin:100% 0;left:auto;right:0}.mat-form-field-empty.mat-form-field-label,.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label{display:block}.mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:block;transition:none}.mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-form-field-can-float .mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:block}.mat-form-field-label:not(.mat-form-field-empty){transition:none}.mat-form-field-underline{position:absolute;width:100%;pointer-events:none;transform:scale3d(1, 1.0001, 1)}.mat-form-field-ripple{position:absolute;left:0;width:100%;transform-origin:50%;transform:scaleX(0.5);opacity:0;transition:background-color 300ms cubic-bezier(0.55, 0, 0.55, 0.2)}.mat-form-field.mat-focused .mat-form-field-ripple,.mat-form-field.mat-form-field-invalid .mat-form-field-ripple{opacity:1;transform:scaleX(1);transition:transform 300ms cubic-bezier(0.25, 0.8, 0.25, 1),opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 300ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-subscript-wrapper{position:absolute;box-sizing:border-box;width:100%;overflow:hidden}.mat-form-field-subscript-wrapper .mat-icon,.mat-form-field-label-wrapper .mat-icon{width:1em;height:1em;font-size:inherit;vertical-align:baseline}.mat-form-field-hint-wrapper{display:flex}.mat-form-field-hint-spacer{flex:1 0 1em}.mat-error{display:block}.mat-form-field-control-wrapper{position:relative}.mat-form-field-hint-end{order:1}.mat-form-field._mat-animation-noopable .mat-form-field-label,.mat-form-field._mat-animation-noopable .mat-form-field-ripple{transition:none}\n",'.mat-form-field-appearance-fill .mat-form-field-flex{border-radius:4px 4px 0 0;padding:.75em .75em 0 .75em}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-flex{outline:solid 1px}.mat-form-field-appearance-fill .mat-form-field-underline::before{content:"";display:block;position:absolute;bottom:0;height:1px;width:100%}.mat-form-field-appearance-fill .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-fill:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-fill._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}.mat-form-field-appearance-fill .mat-form-field-subscript-wrapper{padding:0 1em}\n','.mat-input-element{font:inherit;background:transparent;color:currentColor;border:none;outline:none;padding:0;margin:0;width:100%;max-width:100%;vertical-align:bottom;text-align:inherit}.mat-input-element:-moz-ui-invalid{box-shadow:none}.mat-input-element::-ms-clear,.mat-input-element::-ms-reveal{display:none}.mat-input-element,.mat-input-element::-webkit-search-cancel-button,.mat-input-element::-webkit-search-decoration,.mat-input-element::-webkit-search-results-button,.mat-input-element::-webkit-search-results-decoration{-webkit-appearance:none}.mat-input-element::-webkit-contacts-auto-fill-button,.mat-input-element::-webkit-caps-lock-indicator,.mat-input-element::-webkit-credentials-auto-fill-button{visibility:hidden}.mat-input-element[type=date],.mat-input-element[type=datetime],.mat-input-element[type=datetime-local],.mat-input-element[type=month],.mat-input-element[type=week],.mat-input-element[type=time]{line-height:1}.mat-input-element[type=date]::after,.mat-input-element[type=datetime]::after,.mat-input-element[type=datetime-local]::after,.mat-input-element[type=month]::after,.mat-input-element[type=week]::after,.mat-input-element[type=time]::after{content:" ";white-space:pre;width:1px}.mat-input-element::-webkit-inner-spin-button,.mat-input-element::-webkit-calendar-picker-indicator,.mat-input-element::-webkit-clear-button{font-size:.75em}.mat-input-element::placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element::-moz-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-moz-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element::-webkit-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-webkit-input-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element:-ms-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element:-ms-input-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-form-field-hide-placeholder .mat-input-element::placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element::-moz-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element::-webkit-input-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.mat-form-field-hide-placeholder .mat-input-element:-ms-input-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}textarea.mat-input-element{resize:vertical;overflow:auto}textarea.mat-input-element.cdk-textarea-autosize{resize:none}textarea.mat-input-element{padding:2px 0;margin:-2px 0}select.mat-input-element{-moz-appearance:none;-webkit-appearance:none;position:relative;background-color:transparent;display:inline-flex;box-sizing:border-box;padding-top:1em;top:-1em;margin-bottom:-1em}select.mat-input-element::-ms-expand{display:none}select.mat-input-element::-moz-focus-inner{border:0}select.mat-input-element:not(:disabled){cursor:pointer}select.mat-input-element::-ms-value{color:inherit;background:none}.mat-focused .cdk-high-contrast-active select.mat-input-element::-ms-value{color:inherit}.mat-form-field-type-mat-native-select .mat-form-field-infix::after{content:"";width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;position:absolute;top:50%;right:0;margin-top:-2.5px;pointer-events:none}[dir=rtl] .mat-form-field-type-mat-native-select .mat-form-field-infix::after{right:auto;left:0}.mat-form-field-type-mat-native-select .mat-input-element{padding-right:15px}[dir=rtl] .mat-form-field-type-mat-native-select .mat-input-element{padding-right:0;padding-left:15px}.mat-form-field-type-mat-native-select .mat-form-field-label-wrapper{max-width:calc(100% - 10px)}.mat-form-field-type-mat-native-select.mat-form-field-appearance-outline .mat-form-field-infix::after{margin-top:-5px}.mat-form-field-type-mat-native-select.mat-form-field-appearance-fill .mat-form-field-infix::after{margin-top:-10px}\n',".mat-form-field-appearance-legacy .mat-form-field-label{transform:perspective(100px);-ms-transform:none}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon{width:1em}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button{font:inherit;vertical-align:baseline}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button .mat-icon{font-size:inherit}.mat-form-field-appearance-legacy .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-legacy .mat-form-field-ripple{top:0;height:2px;overflow:hidden}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}.cdk-high-contrast-active .mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-legacy.mat-form-field-invalid:not(.mat-focused) .mat-form-field-ripple{height:1px}\n",".mat-form-field-appearance-outline .mat-form-field-wrapper{margin:.25em 0}.mat-form-field-appearance-outline .mat-form-field-flex{padding:0 .75em 0 .75em;margin-top:-0.25em;position:relative}.mat-form-field-appearance-outline .mat-form-field-prefix,.mat-form-field-appearance-outline .mat-form-field-suffix{top:.25em}.mat-form-field-appearance-outline .mat-form-field-outline{display:flex;position:absolute;top:.25em;left:0;right:0;bottom:0;pointer-events:none}.mat-form-field-appearance-outline .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-end{border:1px solid currentColor;min-width:5px}.mat-form-field-appearance-outline .mat-form-field-outline-start{border-radius:5px 0 0 5px;border-right-style:none}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-start{border-right-style:solid;border-left-style:none;border-radius:0 5px 5px 0}.mat-form-field-appearance-outline .mat-form-field-outline-end{border-radius:0 5px 5px 0;border-left-style:none;flex-grow:1}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-end{border-left-style:solid;border-right-style:none;border-radius:5px 0 0 5px}.mat-form-field-appearance-outline .mat-form-field-outline-gap{border-radius:.000001px;border:1px solid currentColor;border-left-style:none;border-right-style:none}.mat-form-field-appearance-outline.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-outline-gap{border-top-color:transparent}.mat-form-field-appearance-outline .mat-form-field-outline-thick{opacity:0}.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-end,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-gap{border-width:2px}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline{opacity:0;transition:opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline{opacity:0;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline .mat-form-field-subscript-wrapper{padding:0 1em}.mat-form-field-appearance-outline._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-start,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-end,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-gap{transition:none}\n",".mat-form-field-appearance-standard .mat-form-field-flex{padding-top:.75em}.mat-form-field-appearance-standard .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-standard .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-ripple{height:0;border-top:2px}.mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}.cdk-high-contrast-active .mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-standard:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-standard._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}\n"],encapsulation:2,data:{animation:[F.transitionMessages]},changeDetection:0}),t})(),et=(()=>{class t{}return t.\u0275mod=s.Ob({type:t}),t.\u0275inj=s.Nb({factory:function(e){return new(e||t)},imports:[[a.c,o.k,n.c],o.k]}),t})()},lJEt:function(t,e,i){"use strict";i.d(e,"a",(function(){return I})),i.d(e,"b",(function(){return m})),i.d(e,"c",(function(){return g})),i.d(e,"d",(function(){return y})),i.d(e,"f",(function(){return O})),i.d(e,"e",(function(){return M})),i.d(e,"g",(function(){return k}));var n=i("fXoL"),a=i("3Pt+");function s(t){return null!=t}let o=(()=>{class t{constructor(t){this.name=t}}return t.COPY=new t("copy"),t.LINK=new t("link"),t.MOVE=new t("move"),t.NONE=new t("none"),t})();class r{constructor(){this.onDragStartClass="dnd-drag-start",this.onDragEnterClass="dnd-drag-enter",this.onDragOverClass="dnd-drag-over",this.onSortableDragClass="dnd-sortable-drag",this.dragEffect=o.MOVE,this.dropEffect=o.MOVE,this.dragCursor="move",this.defaultCursor="pointer"}}var c=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let l=(()=>{let t=class{constructor(){this.allowedDropZones=[]}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=n.Mb({token:t,factory:function(e){return t.\u0275fac(e)}}),t})(),d=(()=>{let t=class{constructor(t){this._config=t}get elem(){return this._elem}markSortable(t){s(this._elem)&&this._elem.classList.remove(this._config.onSortableDragClass),s(t)&&(this._elem=t,this._elem.classList.add(this._config.onSortableDragClass))}};return t.\u0275fac=function(e){return new(e||t)(n.ac(r))},t.\u0275prov=n.Mb({token:t,factory:function(e){return t.\u0275fac(e)}}),t=function(t,e,i,n){var a,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(o=(s<3?a(o):s>3?a(e,i,o):a(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o}([c("design:paramtypes",[r])],t),t})();var h=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let u=(()=>{let t=class{constructor(t,e,i,n){this._dragDropService=e,this._config=i,this._cdr=n,this._dragEnabled=!1,this.dropEnabled=!1,this.dropZones=[],this.cloneItem=!1,this._defaultCursor=i.defaultCursor,this._elem=t.nativeElement,this._elem.style.cursor=this._defaultCursor,this._elem.ondragenter=t=>{this._onDragEnter(t)},this._elem.ondragover=t=>(this._onDragOver(t),null!=t.dataTransfer&&(t.dataTransfer.dropEffect=this._config.dropEffect.name),!1),this._elem.ondragleave=t=>{this._onDragLeave(t)},this._elem.ondrop=t=>{this._onDrop(t)},this._elem.onmousedown=t=>{this._target=t.target},this._elem.ondragstart=t=>{if(!this._dragHandle||this._dragHandle.contains(this._target)){if(this._onDragStart(t),null!=t.dataTransfer){if(t.dataTransfer.setData("text",""),t.dataTransfer.effectAllowed=this.effectAllowed||this._config.dragEffect.name,s(this.dragImage))if("string"==typeof this.dragImage)t.dataTransfer.setDragImage(function(t){let e=new HTMLImageElement;return e.src=t,e}(this.dragImage));else if("function"==typeof this.dragImage)t.dataTransfer.setDragImage((0,this.dragImage)());else{let e=this.dragImage;t.dataTransfer.setDragImage(e.imageElement,e.x_offset,e.y_offset)}else if(s(this._config.dragImage)){let e=this._config.dragImage;t.dataTransfer.setDragImage(e.imageElement,e.x_offset,e.y_offset)}else this.cloneItem&&(this._dragHelper=this._elem.cloneNode(!0),this._dragHelper.classList.add("dnd-drag-item"),this._dragHelper.style.position="absolute",this._dragHelper.style.top="0px",this._dragHelper.style.left="-1000px",this._elem.parentElement.appendChild(this._dragHelper),t.dataTransfer.setDragImage(this._dragHelper,t.offsetX,t.offsetY));(this._dragHandle?this._dragHandle:this._elem).style.cursor=this._dragEnabled?this.effectCursor?this.effectCursor:this._config.dragCursor:this._defaultCursor}}else t.preventDefault()},this._elem.ondragend=t=>{this._elem.parentElement&&this._dragHelper&&this._elem.parentElement.removeChild(this._dragHelper),this._onDragEnd(t),(this._dragHandle?this._dragHandle:this._elem).style.cursor=this._defaultCursor}}set dragEnabled(t){this._dragEnabled=!!t,this._elem.draggable=this._dragEnabled}get dragEnabled(){return this._dragEnabled}setDragHandle(t){this._dragHandle=t}detectChanges(){setTimeout(()=>{this._cdr&&!this._cdr.destroyed&&this._cdr.detectChanges()},250)}_onDragEnter(t){this._isDropAllowed(t)&&this._onDragEnterCallback(t)}_onDragOver(t){this._isDropAllowed(t)&&(t.preventDefault&&t.preventDefault(),this._onDragOverCallback(t))}_onDragLeave(t){this._isDropAllowed(t)&&this._onDragLeaveCallback(t)}_onDrop(t){this._isDropAllowed(t)&&(this._preventAndStop(t),this._onDropCallback(t),this.detectChanges())}_isDropAllowed(t){if((this._dragDropService.isDragged||t.dataTransfer&&t.dataTransfer.files)&&this.dropEnabled){if(this.allowDrop)return this.allowDrop(this._dragDropService.dragData);if(0===this.dropZones.length&&0===this._dragDropService.allowedDropZones.length)return!0;for(let t=0;t<this._dragDropService.allowedDropZones.length;t++)if(-1!==this.dropZones.indexOf(this._dragDropService.allowedDropZones[t]))return!0}return!1}_preventAndStop(t){t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation()}_onDragStart(t){this._dragEnabled&&(this._dragDropService.allowedDropZones=this.dropZones,this._onDragStartCallback(t))}_onDragEnd(t){this._dragDropService.allowedDropZones=[],this._onDragEndCallback(t)}_onDragEnterCallback(t){}_onDragOverCallback(t){}_onDragLeaveCallback(t){}_onDropCallback(t){}_onDragStartCallback(t){}_onDragEndCallback(t){}};return t.\u0275fac=function(e){return new(e||t)(n.ac(n.l),n.ac(l),n.ac(r),n.ac(n.h))},t.\u0275prov=n.Mb({token:t,factory:function(e){return t.\u0275fac(e)}}),t=function(t,e,i,n){var a,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(o=(s<3?a(o):s>3?a(e,i,o):a(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o}([h("design:paramtypes",[n.l,l,r,n.h])],t),t})();class p{constructor(t,e,i,n,a){this._dragDropService=e,this._config=i,this._Component=n,this._cdr=a,this._elem=t.nativeElement,this._Component.setDragHandle(this._elem)}}var b=function(t,e,i,n){var a,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(o=(s<3?a(o):s>3?a(e,i,o):a(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o},f=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let m=(()=>{let t=class extends u{constructor(t,e,i,a){super(t,e,i,a),this.onDragStart=new n.o,this.onDragEnd=new n.o,this.onDragSuccessCallback=new n.o,this._defaultCursor=this._elem.style.cursor,this.dragEnabled=!0}set draggable(t){this.dragEnabled=!!t}set dropzones(t){this.dropZones=t}set effectallowed(t){this.effectAllowed=t}set effectcursor(t){this.effectCursor=t}_onDragStartCallback(t){this._dragDropService.isDragged=!0,this._dragDropService.dragData=this.dragData,this._dragDropService.onDragSuccessCallback=this.onDragSuccessCallback,this._elem.classList.add(this._config.onDragStartClass),this.onDragStart.emit({dragData:this.dragData,mouseEvent:t})}_onDragEndCallback(t){this._dragDropService.isDragged=!1,this._dragDropService.dragData=null,this._dragDropService.onDragSuccessCallback=null,this._elem.classList.remove(this._config.onDragStartClass),this.onDragEnd.emit({dragData:this.dragData,mouseEvent:t})}};return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(l),n.Qb(r),n.Qb(n.h))},t.\u0275dir=n.Lb({type:t,selectors:[["","dnd-draggable",""]],inputs:{draggable:["dragEnabled","draggable"],dropzones:["dropZones","dropzones"],effectallowed:["effectAllowed","effectallowed"],effectcursor:["effectCursor","effectcursor"],dragData:"dragData",dragImage:"dragImage",cloneItem:"cloneItem"},outputs:{onDragStart:"onDragStart",onDragEnd:"onDragEnd",onDragSuccessCallback:"onDragSuccess"},features:[n.Ab]}),b([Object(n.u)("dragEnabled"),f("design:type",Boolean),f("design:paramtypes",[Boolean])],t.prototype,"draggable",null),b([Object(n.E)(),f("design:type",n.o)],t.prototype,"onDragStart",void 0),b([Object(n.E)(),f("design:type",n.o)],t.prototype,"onDragEnd",void 0),b([Object(n.u)(),f("design:type",Object)],t.prototype,"dragData",void 0),b([Object(n.E)("onDragSuccess"),f("design:type",n.o)],t.prototype,"onDragSuccessCallback",void 0),b([Object(n.u)("dropZones"),f("design:type",Array),f("design:paramtypes",[Array])],t.prototype,"dropzones",null),b([Object(n.u)("effectAllowed"),f("design:type",String),f("design:paramtypes",[String])],t.prototype,"effectallowed",null),b([Object(n.u)("effectCursor"),f("design:type",String),f("design:paramtypes",[String])],t.prototype,"effectcursor",null),b([Object(n.u)(),f("design:type",Object)],t.prototype,"dragImage",void 0),b([Object(n.u)(),f("design:type",Boolean)],t.prototype,"cloneItem",void 0),t=b([f("design:paramtypes",[n.l,l,r,n.h])],t),t})(),g=(()=>{let t=class extends p{constructor(t,e,i,n,a){super(t,e,i,n,a)}};return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(l),n.Qb(r),n.Qb(m),n.Qb(n.h))},t.\u0275dir=n.Lb({type:t,selectors:[["","dnd-draggable-handle",""]],features:[n.Ab]}),t=b([f("design:paramtypes",[n.l,l,r,m,n.h])],t),t})();var v=function(t,e,i,n){var a,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(o=(s<3?a(o):s>3?a(e,i,o):a(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o},_=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let y=(()=>{let t=class extends u{constructor(t,e,i,a){super(t,e,i,a),this.onDropSuccess=new n.o,this.onDragEnter=new n.o,this.onDragOver=new n.o,this.onDragLeave=new n.o,this.dropEnabled=!0}set droppable(t){this.dropEnabled=!!t}set allowdrop(t){this.allowDrop=t}set dropzones(t){this.dropZones=t}set effectallowed(t){this.effectAllowed=t}set effectcursor(t){this.effectCursor=t}_onDragEnterCallback(t){this._dragDropService.isDragged&&(this._elem.classList.add(this._config.onDragEnterClass),this.onDragEnter.emit({dragData:this._dragDropService.dragData,mouseEvent:t}))}_onDragOverCallback(t){this._dragDropService.isDragged&&(this._elem.classList.add(this._config.onDragOverClass),this.onDragOver.emit({dragData:this._dragDropService.dragData,mouseEvent:t}))}_onDragLeaveCallback(t){this._dragDropService.isDragged&&(this._elem.classList.remove(this._config.onDragOverClass),this._elem.classList.remove(this._config.onDragEnterClass),this.onDragLeave.emit({dragData:this._dragDropService.dragData,mouseEvent:t}))}_onDropCallback(t){let e=t.dataTransfer;(this._dragDropService.isDragged||e&&e.files)&&(this.onDropSuccess.emit({dragData:this._dragDropService.dragData,mouseEvent:t}),this._dragDropService.onDragSuccessCallback&&this._dragDropService.onDragSuccessCallback.emit({dragData:this._dragDropService.dragData,mouseEvent:t}),this._elem.classList.remove(this._config.onDragOverClass),this._elem.classList.remove(this._config.onDragEnterClass))}};return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(l),n.Qb(r),n.Qb(n.h))},t.\u0275dir=n.Lb({type:t,selectors:[["","dnd-droppable",""]],inputs:{droppable:["dropEnabled","droppable"],allowdrop:["allowDrop","allowdrop"],dropzones:["dropZones","dropzones"],effectallowed:["effectAllowed","effectallowed"],effectcursor:["effectCursor","effectcursor"]},outputs:{onDropSuccess:"onDropSuccess",onDragEnter:"onDragEnter",onDragOver:"onDragOver",onDragLeave:"onDragLeave"},features:[n.Ab]}),v([Object(n.u)("dropEnabled"),_("design:type",Boolean),_("design:paramtypes",[Boolean])],t.prototype,"droppable",null),v([Object(n.E)(),_("design:type",n.o)],t.prototype,"onDropSuccess",void 0),v([Object(n.E)(),_("design:type",n.o)],t.prototype,"onDragEnter",void 0),v([Object(n.E)(),_("design:type",n.o)],t.prototype,"onDragOver",void 0),v([Object(n.E)(),_("design:type",n.o)],t.prototype,"onDragLeave",void 0),v([Object(n.u)("allowDrop"),_("design:type",Function),_("design:paramtypes",[Function])],t.prototype,"allowdrop",null),v([Object(n.u)("dropZones"),_("design:type",Array),_("design:paramtypes",[Array])],t.prototype,"dropzones",null),v([Object(n.u)("effectAllowed"),_("design:type",String),_("design:paramtypes",[String])],t.prototype,"effectallowed",null),v([Object(n.u)("effectCursor"),_("design:type",String),_("design:paramtypes",[String])],t.prototype,"effectcursor",null),t=v([_("design:paramtypes",[n.l,l,r,n.h])],t),t})();var x=function(t,e,i,n){var a,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(o=(s<3?a(o):s>3?a(e,i,o):a(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o},C=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let O=(()=>{let t=class extends u{constructor(t,e,i,n,a){super(t,e,i,n),this._sortableDataService=a,this._sortableData=[],this.dragEnabled=!1}set draggable(t){this.dragEnabled=!!t}set sortableData(t){this._sortableData=t,this.sortableHandler=t instanceof a.f?new w:new D,this.dropEnabled=!!this._sortableData}get sortableData(){return this._sortableData}set dropzones(t){this.dropZones=t}_onDragEnterCallback(t){if(this._sortableDataService.isDragged){let t=this._sortableDataService.sortableContainer.getItemAt(this._sortableDataService.index);-1===this.indexOf(t)&&(this._sortableDataService.sortableContainer.removeItemAt(this._sortableDataService.index),0===this._sortableDataService.sortableContainer._sortableData.length&&(this._sortableDataService.sortableContainer.dropEnabled=!0),this.insertItemAt(t,0),this._sortableDataService.sortableContainer=this,this._sortableDataService.index=0),this.detectChanges()}}getItemAt(t){return this.sortableHandler.getItemAt(this._sortableData,t)}indexOf(t){return this.sortableHandler.indexOf(this._sortableData,t)}removeItemAt(t){this.sortableHandler.removeItemAt(this._sortableData,t)}insertItemAt(t,e){this.sortableHandler.insertItemAt(this._sortableData,t,e)}};return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(l),n.Qb(r),n.Qb(n.h),n.Qb(d))},t.\u0275dir=n.Lb({type:t,selectors:[["","dnd-sortable-container",""]],inputs:{draggable:["dragEnabled","draggable"],sortableData:"sortableData",dropzones:["dropZones","dropzones"]},features:[n.Ab]}),x([Object(n.u)("dragEnabled"),C("design:type",Boolean),C("design:paramtypes",[Boolean])],t.prototype,"draggable",null),x([Object(n.u)(),C("design:type",Object),C("design:paramtypes",[Object])],t.prototype,"sortableData",null),x([Object(n.u)("dropZones"),C("design:type",Array),C("design:paramtypes",[Array])],t.prototype,"dropzones",null),t=x([C("design:paramtypes",[n.l,l,r,n.h,d])],t),t})();class D{getItemAt(t,e){return t[e]}indexOf(t,e){return t.indexOf(e)}removeItemAt(t,e){t.splice(e,1)}insertItemAt(t,e,i){t.splice(i,0,e)}}class w{getItemAt(t,e){return t.at(e)}indexOf(t,e){return t.controls.indexOf(e)}removeItemAt(t,e){t.removeAt(e)}insertItemAt(t,e,i){t.insert(i,e)}}let M=(()=>{let t=class extends u{constructor(t,e,i,a,s,o){super(t,e,i,o),this._sortableContainer=a,this._sortableDataService=s,this.onDragSuccessCallback=new n.o,this.onDragStartCallback=new n.o,this.onDragOverCallback=new n.o,this.onDragEndCallback=new n.o,this.onDropSuccessCallback=new n.o,this.dropZones=this._sortableContainer.dropZones,this.dragEnabled=!0,this.dropEnabled=!0}set draggable(t){this.dragEnabled=!!t}set droppable(t){this.dropEnabled=!!t}set effectallowed(t){this.effectAllowed=t}set effectcursor(t){this.effectCursor=t}_onDragStartCallback(t){this._sortableDataService.isDragged=!0,this._sortableDataService.sortableContainer=this._sortableContainer,this._sortableDataService.index=this.index,this._sortableDataService.markSortable(this._elem),this._dragDropService.isDragged=!0,this._dragDropService.dragData=this.dragData,this._dragDropService.onDragSuccessCallback=this.onDragSuccessCallback,this.onDragStartCallback.emit(this._dragDropService.dragData)}_onDragOverCallback(t){this._sortableDataService.isDragged&&this._elem!==this._sortableDataService.elem&&(this._sortableDataService.sortableContainer=this._sortableContainer,this._sortableDataService.index=this.index,this._sortableDataService.markSortable(this._elem),this.onDragOverCallback.emit(this._dragDropService.dragData))}_onDragEndCallback(t){this._sortableDataService.isDragged=!1,this._sortableDataService.sortableContainer=null,this._sortableDataService.index=null,this._sortableDataService.markSortable(null),this._dragDropService.isDragged=!1,this._dragDropService.dragData=null,this._dragDropService.onDragSuccessCallback=null,this.onDragEndCallback.emit(this._dragDropService.dragData)}_onDragEnterCallback(t){if(this._sortableDataService.isDragged&&(this._sortableDataService.markSortable(this._elem),this.index!==this._sortableDataService.index||this._sortableDataService.sortableContainer.sortableData!==this._sortableContainer.sortableData)){let t=this._sortableDataService.sortableContainer.getItemAt(this._sortableDataService.index);this._sortableDataService.sortableContainer.removeItemAt(this._sortableDataService.index),0===this._sortableDataService.sortableContainer.sortableData.length&&(this._sortableDataService.sortableContainer.dropEnabled=!0),this._sortableContainer.insertItemAt(t,this.index),this._sortableContainer.dropEnabled&&(this._sortableContainer.dropEnabled=!1),this._sortableDataService.sortableContainer=this._sortableContainer,this._sortableDataService.index=this.index,this.detectChanges()}}_onDropCallback(t){this._sortableDataService.isDragged&&(this.onDropSuccessCallback.emit(this._dragDropService.dragData),this._dragDropService.onDragSuccessCallback&&this._dragDropService.onDragSuccessCallback.emit(this._dragDropService.dragData),this._sortableContainer.detectChanges())}};return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(l),n.Qb(r),n.Qb(O),n.Qb(d),n.Qb(n.h))},t.\u0275dir=n.Lb({type:t,selectors:[["","dnd-sortable",""]],inputs:{draggable:["dragEnabled","draggable"],droppable:["dropEnabled","droppable"],effectallowed:["effectAllowed","effectallowed"],effectcursor:["effectCursor","effectcursor"],index:["sortableIndex","index"],dragData:"dragData"},outputs:{onDragSuccessCallback:"onDragSuccess",onDragStartCallback:"onDragStart",onDragOverCallback:"onDragOver",onDragEndCallback:"onDragEnd",onDropSuccessCallback:"onDropSuccess"},features:[n.Ab]}),x([Object(n.u)("sortableIndex"),C("design:type",Number)],t.prototype,"index",void 0),x([Object(n.u)("dragEnabled"),C("design:type",Boolean),C("design:paramtypes",[Boolean])],t.prototype,"draggable",null),x([Object(n.u)("dropEnabled"),C("design:type",Boolean),C("design:paramtypes",[Boolean])],t.prototype,"droppable",null),x([Object(n.u)(),C("design:type",Object)],t.prototype,"dragData",void 0),x([Object(n.u)("effectAllowed"),C("design:type",String),C("design:paramtypes",[String])],t.prototype,"effectallowed",null),x([Object(n.u)("effectCursor"),C("design:type",String),C("design:paramtypes",[String])],t.prototype,"effectcursor",null),x([Object(n.E)("onDragSuccess"),C("design:type",n.o)],t.prototype,"onDragSuccessCallback",void 0),x([Object(n.E)("onDragStart"),C("design:type",n.o)],t.prototype,"onDragStartCallback",void 0),x([Object(n.E)("onDragOver"),C("design:type",n.o)],t.prototype,"onDragOverCallback",void 0),x([Object(n.E)("onDragEnd"),C("design:type",n.o)],t.prototype,"onDragEndCallback",void 0),x([Object(n.E)("onDropSuccess"),C("design:type",n.o)],t.prototype,"onDropSuccessCallback",void 0),t=x([C("design:paramtypes",[n.l,l,r,O,d,n.h])],t),t})(),k=(()=>{let t=class extends p{constructor(t,e,i,n,a){super(t,e,i,n,a)}};return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(l),n.Qb(r),n.Qb(M),n.Qb(n.h))},t.\u0275dir=n.Lb({type:t,selectors:[["","dnd-sortable-handle",""]],features:[n.Ab]}),t=x([C("design:paramtypes",[n.l,l,r,M,n.h])],t),t})(),S=[r,{provide:l,useFactory:function(){return new l}},{provide:d,useFactory:function(t){return new d(t)},deps:[r]}],I=(()=>{let t=P=class{static forRoot(){return{ngModule:P,providers:S}}};return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)}}),t})();var P},lJxs:function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var n=i("7o/Q");function a(t,e){return function(i){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return i.lift(new s(t,e))}}class s{constructor(t,e){this.project=t,this.thisArg=e}call(t,e){return e.subscribe(new o(t,this.project,this.thisArg))}}class o extends n.a{constructor(t,e,i){super(t),this.project=e,this.count=0,this.thisArg=i||this}_next(t){let e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(i){return void this.destination.error(i)}this.destination.next(e)}}},lRFz:function(module,exports,__webpack_require__){var factory;factory=function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var a=e[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,i),a.l=!0,a.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)i.d(n,a,(function(e){return t[e]}).bind(null,a));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=0)}([function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"addLinkAttributes",{enumerable:!0,get:function(){return n.addLinkAttributes}}),Object.defineProperty(e,"getFilenameFromUrl",{enumerable:!0,get:function(){return n.getFilenameFromUrl}}),Object.defineProperty(e,"LinkTarget",{enumerable:!0,get:function(){return n.LinkTarget}}),Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return n.loadScript}}),Object.defineProperty(e,"PDFDateString",{enumerable:!0,get:function(){return n.PDFDateString}}),Object.defineProperty(e,"RenderingCancelledException",{enumerable:!0,get:function(){return n.RenderingCancelledException}}),Object.defineProperty(e,"build",{enumerable:!0,get:function(){return a.build}}),Object.defineProperty(e,"getDocument",{enumerable:!0,get:function(){return a.getDocument}}),Object.defineProperty(e,"LoopbackPort",{enumerable:!0,get:function(){return a.LoopbackPort}}),Object.defineProperty(e,"PDFDataRangeTransport",{enumerable:!0,get:function(){return a.PDFDataRangeTransport}}),Object.defineProperty(e,"PDFWorker",{enumerable:!0,get:function(){return a.PDFWorker}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return a.version}}),Object.defineProperty(e,"CMapCompressionType",{enumerable:!0,get:function(){return s.CMapCompressionType}}),Object.defineProperty(e,"createObjectURL",{enumerable:!0,get:function(){return s.createObjectURL}}),Object.defineProperty(e,"createPromiseCapability",{enumerable:!0,get:function(){return s.createPromiseCapability}}),Object.defineProperty(e,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return s.createValidAbsoluteUrl}}),Object.defineProperty(e,"InvalidPDFException",{enumerable:!0,get:function(){return s.InvalidPDFException}}),Object.defineProperty(e,"MissingPDFException",{enumerable:!0,get:function(){return s.MissingPDFException}}),Object.defineProperty(e,"OPS",{enumerable:!0,get:function(){return s.OPS}}),Object.defineProperty(e,"PasswordResponses",{enumerable:!0,get:function(){return s.PasswordResponses}}),Object.defineProperty(e,"PermissionFlag",{enumerable:!0,get:function(){return s.PermissionFlag}}),Object.defineProperty(e,"removeNullCharacters",{enumerable:!0,get:function(){return s.removeNullCharacters}}),Object.defineProperty(e,"shadow",{enumerable:!0,get:function(){return s.shadow}}),Object.defineProperty(e,"UnexpectedResponseException",{enumerable:!0,get:function(){return s.UnexpectedResponseException}}),Object.defineProperty(e,"UNSUPPORTED_FEATURES",{enumerable:!0,get:function(){return s.UNSUPPORTED_FEATURES}}),Object.defineProperty(e,"Util",{enumerable:!0,get:function(){return s.Util}}),Object.defineProperty(e,"VerbosityLevel",{enumerable:!0,get:function(){return s.VerbosityLevel}}),Object.defineProperty(e,"AnnotationLayer",{enumerable:!0,get:function(){return o.AnnotationLayer}}),Object.defineProperty(e,"apiCompatibilityParams",{enumerable:!0,get:function(){return r.apiCompatibilityParams}}),Object.defineProperty(e,"GlobalWorkerOptions",{enumerable:!0,get:function(){return c.GlobalWorkerOptions}}),Object.defineProperty(e,"renderTextLayer",{enumerable:!0,get:function(){return l.renderTextLayer}}),Object.defineProperty(e,"SVGGraphics",{enumerable:!0,get:function(){return d.SVGGraphics}});var n=i(1),a=i(5),s=i(2),o=i(16),r=i(7),c=i(10),l=i(17),d=i(18);{const{isNodeJS:t}=i(4);if(t){const t=i(19).PDFNodeStream;(0,a.setPDFNetworkStreamFactory)(e=>new t(e))}else{const t=i(22).PDFNetworkStream;let e;(0,n.isFetchSupported)()&&(e=i(23).PDFFetchStream),(0,a.setPDFNetworkStreamFactory)(i=>e&&(0,n.isValidFetchUrl)(i.url)?new e(i):new t(i))}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addLinkAttributes=function(t,{url:e,target:i,rel:a,enabled:s=!0}={}){(0,n.assert)(e&&"string"==typeof e,'addLinkAttributes: A valid "url" parameter must provided.');const r=(0,n.removeNullCharacters)(e);s?t.href=t.title=r:(t.href="",t.title="Disabled: "+r,t.onclick=()=>!1);let c="";switch(i){case o.NONE:break;case o.SELF:c="_self";break;case o.BLANK:c="_blank";break;case o.PARENT:c="_parent";break;case o.TOP:c="_top"}t.target=c,t.rel="string"==typeof a?a:"noopener noreferrer nofollow"},e.getFilenameFromUrl=function(t){const e=t.indexOf("#"),i=t.indexOf("?"),n=Math.min(e>0?e:t.length,i>0?i:t.length);return t.substring(t.lastIndexOf("/",n)+1,n)},e.isFetchSupported=r,e.isValidFetchUrl=c,e.loadScript=function(t){return new Promise((e,i)=>{const n=document.createElement("script");n.src=t,n.onload=e,n.onerror=function(){i(new Error("Cannot load script at: "+n.src))},(document.head||document.documentElement).appendChild(n)})},e.deprecated=function(t){console.log("Deprecated API usage: "+t)},e.PDFDateString=e.StatTimer=e.DOMSVGFactory=e.DOMCMapReaderFactory=e.DOMCanvasFactory=e.DEFAULT_LINK_REL=e.LinkTarget=e.RenderingCancelledException=e.PageViewport=void 0;var n=i(2);e.DEFAULT_LINK_REL="noopener noreferrer nofollow";const a="http://www.w3.org/2000/svg";e.DOMCanvasFactory=class{create(t,e){if(t<=0||e<=0)throw new Error("Invalid canvas size");const i=document.createElement("canvas"),n=i.getContext("2d");return i.width=t,i.height=e,{canvas:i,context:n}}reset(t,e,i){if(!t.canvas)throw new Error("Canvas is not specified");if(e<=0||i<=0)throw new Error("Invalid canvas size");t.canvas.width=e,t.canvas.height=i}destroy(t){if(!t.canvas)throw new Error("Canvas is not specified");t.canvas.width=0,t.canvas.height=0,t.canvas=null,t.context=null}},e.DOMCMapReaderFactory=class{constructor({baseUrl:t=null,isCompressed:e=!1}){this.baseUrl=t,this.isCompressed=e}async fetch({name:t}){if(!this.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!t)throw new Error("CMap name must be specified.");const e=this.baseUrl+t+(this.isCompressed?".bcmap":""),i=this.isCompressed?n.CMapCompressionType.BINARY:n.CMapCompressionType.NONE;return r()&&c(e,document.baseURI)?fetch(e).then(async t=>{if(!t.ok)throw new Error(t.statusText);let e;return e=this.isCompressed?new Uint8Array(await t.arrayBuffer()):(0,n.stringToBytes)(await t.text()),{cMapData:e,compressionType:i}}).catch(t=>{throw new Error("Unable to load "+(this.isCompressed?"binary ":"")+"CMap at: "+e)}):new Promise((t,a)=>{const s=new XMLHttpRequest;s.open("GET",e,!0),this.isCompressed&&(s.responseType="arraybuffer"),s.onreadystatechange=()=>{if(s.readyState===XMLHttpRequest.DONE){if(200===s.status||0===s.status){let e;if(this.isCompressed&&s.response?e=new Uint8Array(s.response):!this.isCompressed&&s.responseText&&(e=(0,n.stringToBytes)(s.responseText)),e)return void t({cMapData:e,compressionType:i})}a(new Error(s.statusText))}},s.send(null)}).catch(t=>{throw new Error("Unable to load "+(this.isCompressed?"binary ":"")+"CMap at: "+e)})}},e.DOMSVGFactory=class{create(t,e){(0,n.assert)(t>0&&e>0,"Invalid SVG dimensions");const i=document.createElementNS(a,"svg:svg");return i.setAttribute("version","1.1"),i.setAttribute("width",t+"px"),i.setAttribute("height",e+"px"),i.setAttribute("preserveAspectRatio","none"),i.setAttribute("viewBox","0 0 "+t+" "+e),i}createElement(t){return(0,n.assert)("string"==typeof t,"Invalid SVG element type"),document.createElementNS(a,t)}};class s{constructor({viewBox:t,scale:e,rotation:i,offsetX:n=0,offsetY:a=0,dontFlip:s=!1}){this.viewBox=t,this.scale=e,this.rotation=i,this.offsetX=n,this.offsetY=a;const o=(t[2]+t[0])/2,r=(t[3]+t[1])/2;let c,l,d,h,u,p,b,f;switch(i=(i%=360)<0?i+360:i){case 180:c=-1,l=0,d=0,h=1;break;case 90:c=0,l=1,d=1,h=0;break;case 270:c=0,l=-1,d=-1,h=0;break;case 0:c=1,l=0,d=0,h=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}s&&(d=-d,h=-h),0===c?(u=Math.abs(r-t[1])*e+n,p=Math.abs(o-t[0])*e+a,b=Math.abs(t[3]-t[1])*e,f=Math.abs(t[2]-t[0])*e):(u=Math.abs(o-t[0])*e+n,p=Math.abs(r-t[1])*e+a,b=Math.abs(t[2]-t[0])*e,f=Math.abs(t[3]-t[1])*e),this.transform=[c*e,l*e,d*e,h*e,u-c*e*o-d*e*r,p-l*e*o-h*e*r],this.width=b,this.height=f}clone({scale:t=this.scale,rotation:e=this.rotation,offsetX:i=this.offsetX,offsetY:n=this.offsetY,dontFlip:a=!1}={}){return new s({viewBox:this.viewBox.slice(),scale:t,rotation:e,offsetX:i,offsetY:n,dontFlip:a})}convertToViewportPoint(t,e){return n.Util.applyTransform([t,e],this.transform)}convertToViewportRectangle(t){const e=n.Util.applyTransform([t[0],t[1]],this.transform),i=n.Util.applyTransform([t[2],t[3]],this.transform);return[e[0],e[1],i[0],i[1]]}convertToPdfPoint(t,e){return n.Util.applyInverseTransform([t,e],this.transform)}}e.PageViewport=s,e.RenderingCancelledException=class extends n.BaseException{constructor(t,e){super(t),this.type=e}};const o={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};function r(){return"undefined"!=typeof fetch&&"undefined"!=typeof Response&&"body"in Response.prototype&&"undefined"!=typeof ReadableStream}function c(t,e){try{const{protocol:i}=e?new URL(t,e):new URL(t);return"http:"===i||"https:"===i}catch(i){return!1}}let l;e.LinkTarget=o,e.StatTimer=class{constructor(){this.started=Object.create(null),this.times=[]}time(t){t in this.started&&(0,n.warn)("Timer is already running for "+t),this.started[t]=Date.now()}timeEnd(t){t in this.started||(0,n.warn)("Timer has not been started for "+t),this.times.push({name:t,start:this.started[t],end:Date.now()}),delete this.started[t]}toString(){const t=[];let e=0;for(const i of this.times){const t=i.name;t.length>e&&(e=t.length)}for(const i of this.times){const n=i.end-i.start;t.push(`${i.name.padEnd(e)} ${n}ms\n`)}return t.join("")}},e.PDFDateString=class{static toDateObject(t){if(!t||!(0,n.isString)(t))return null;l||(l=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const e=l.exec(t);if(!e)return null;const i=parseInt(e[1],10);let a=parseInt(e[2],10);a=a>=1&&a<=12?a-1:0;let s=parseInt(e[3],10);s=s>=1&&s<=31?s:1;let o=parseInt(e[4],10);o=o>=0&&o<=23?o:0;let r=parseInt(e[5],10);r=r>=0&&r<=59?r:0;let c=parseInt(e[6],10);c=c>=0&&c<=59?c:0;const d=e[7]||"Z";let h=parseInt(e[8],10);h=h>=0&&h<=23?h:0;let u=parseInt(e[9],10)||0;return u=u>=0&&u<=59?u:0,"-"===d?(o+=h,r+=u):"+"===d&&(o-=h,r-=u),new Date(Date.UTC(i,a,s,o,r,c))}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.arrayByteLength=u,e.arraysToBytes=function(t){const e=t.length;if(1===e&&t[0]instanceof Uint8Array)return t[0];let i=0;for(let s=0;s<e;s++)i+=u(t[s]);let n=0;const a=new Uint8Array(i);for(let s=0;s<e;s++){let e=t[s];e instanceof Uint8Array||(e="string"==typeof e?h(e):new Uint8Array(e));const i=e.byteLength;a.set(e,n),n+=i}return a},e.assert=r,e.bytesToString=function(t){r(null!==t&&"object"==typeof t&&void 0!==t.length,"Invalid argument for bytesToString");const e=t.length;if(e<8192)return String.fromCharCode.apply(null,t);const i=[];for(let n=0;n<e;n+=8192){const a=Math.min(n+8192,e),s=t.subarray(n,a);i.push(String.fromCharCode.apply(null,s))}return i.join("")},e.createPromiseCapability=function(){const t=Object.create(null);let e=!1;return Object.defineProperty(t,"settled",{get:()=>e}),t.promise=new Promise((function(i,n){t.resolve=function(t){e=!0,i(t)},t.reject=function(t){e=!0,n(t)}})),t},e.getVerbosityLevel=function(){return a},e.info=function(t){a>=n.INFOS&&console.log("Info: "+t)},e.isArrayBuffer=function(t){return"object"==typeof t&&null!==t&&void 0!==t.byteLength},e.isArrayEqual=function(t,e){return t.length===e.length&&t.every((function(t,i){return t===e[i]}))},e.isBool=function(t){return"boolean"==typeof t},e.isEmptyObj=function(t){for(const e in t)return!1;return!0},e.isNum=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSameOrigin=function(t,e){let i;try{if(i=new URL(t),!i.origin||"null"===i.origin)return!1}catch(a){return!1}const n=new URL(e,i);return i.origin===n.origin},e.createValidAbsoluteUrl=function(t,e){if(!t)return null;try{const i=e?new URL(t,e):new URL(t);if(function(t){if(!t)return!1;switch(t.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(i))return i}catch(i){}return null},e.removeNullCharacters=function(t){return"string"!=typeof t?(s("The argument for removeNullCharacters must be a string."),t):t.replace(d,"")},e.setVerbosityLevel=function(t){Number.isInteger(t)&&(a=t)},e.shadow=c,e.string32=function(t){return String.fromCharCode(t>>24&255,t>>16&255,t>>8&255,255&t)},e.stringToBytes=h,e.stringToPDFString=function(t){const e=t.length,i=[];if("\xfe"===t[0]&&"\xff"===t[1])for(let n=2;n<e;n+=2)i.push(String.fromCharCode(t.charCodeAt(n)<<8|t.charCodeAt(n+1)));else if("\xff"===t[0]&&"\xfe"===t[1])for(let n=2;n<e;n+=2)i.push(String.fromCharCode(t.charCodeAt(n+1)<<8|t.charCodeAt(n)));else for(let n=0;n<e;++n){const e=f[t.charCodeAt(n)];i.push(e?String.fromCharCode(e):t.charAt(n))}return i.join("")},e.stringToUTF8String=function(t){return decodeURIComponent(escape(t))},e.utf8StringToString=function(t){return unescape(encodeURIComponent(t))},e.warn=s,e.unreachable=o,e.IsEvalSupportedCached=e.IsLittleEndianCached=e.createObjectURL=e.FormatError=e.Util=e.UnknownErrorException=e.UnexpectedResponseException=e.TextRenderingMode=e.StreamType=e.PermissionFlag=e.PasswordResponses=e.PasswordException=e.MissingPDFException=e.InvalidPDFException=e.AbortException=e.CMapCompressionType=e.ImageKind=e.FontType=e.AnnotationType=e.AnnotationStateModelType=e.AnnotationReviewState=e.AnnotationReplyType=e.AnnotationMarkedState=e.AnnotationFlag=e.AnnotationFieldFlag=e.AnnotationBorderStyleType=e.UNSUPPORTED_FEATURES=e.VerbosityLevel=e.OPS=e.IDENTITY_MATRIX=e.FONT_IDENTITY_MATRIX=e.BaseException=void 0,i(3),e.IDENTITY_MATRIX=[1,0,0,1,0,0],e.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],e.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},e.TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},e.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},e.AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},e.AnnotationStateModelType={MARKED:"Marked",REVIEW:"Review"},e.AnnotationMarkedState={MARKED:"Marked",UNMARKED:"Unmarked"},e.AnnotationReviewState={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"},e.AnnotationReplyType={GROUP:"Group",REPLY:"R"},e.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},e.AnnotationFieldFlag={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864},e.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},e.StreamType={UNKNOWN:"UNKNOWN",FLATE:"FLATE",LZW:"LZW",DCT:"DCT",JPX:"JPX",JBIG:"JBIG",A85:"A85",AHX:"AHX",CCF:"CCF",RLX:"RLX"},e.FontType={UNKNOWN:"UNKNOWN",TYPE1:"TYPE1",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"};const n={ERRORS:0,WARNINGS:1,INFOS:5};e.VerbosityLevel=n,e.CMapCompressionType={NONE:0,BINARY:1,STREAM:2},e.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},e.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font",errorTilingPattern:"errorTilingPattern",errorExtGState:"errorExtGState",errorXObject:"errorXObject",errorFontLoadType3:"errorFontLoadType3",errorFontState:"errorFontState",errorFontMissing:"errorFontMissing",errorFontTranslate:"errorFontTranslate",errorColorSpace:"errorColorSpace",errorOperatorList:"errorOperatorList",errorFontToUnicode:"errorFontToUnicode",errorFontLoadNative:"errorFontLoadNative",errorFontGetPath:"errorFontGetPath"},e.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let a=n.WARNINGS;function s(t){a>=n.WARNINGS&&console.log("Warning: "+t)}function o(t){throw new Error(t)}function r(t,e){t||o(e)}function c(t,e,i){return Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!1}),i}const l=function(){function t(e){this.constructor===t&&o("Cannot initialize BaseException."),this.message=e,this.name=this.constructor.name}return t.prototype=new Error,t.constructor=t,t}();e.BaseException=l,e.PasswordException=class extends l{constructor(t,e){super(t),this.code=e}},e.UnknownErrorException=class extends l{constructor(t,e){super(t),this.details=e}},e.InvalidPDFException=class extends l{},e.MissingPDFException=class extends l{},e.UnexpectedResponseException=class extends l{constructor(t,e){super(t),this.status=e}},e.FormatError=class extends l{},e.AbortException=class extends l{};const d=/\x00/g;function h(t){r("string"==typeof t,"Invalid argument for stringToBytes");const e=t.length,i=new Uint8Array(e);for(let n=0;n<e;++n)i[n]=255&t.charCodeAt(n);return i}function u(t){return void 0!==t.length?t.length:(r(void 0!==t.byteLength,"arrayByteLength - invalid argument."),t.byteLength)}e.IsLittleEndianCached={get value(){return c(this,"value",function(){const t=new Uint8Array(4);return t[0]=1,1===new Uint32Array(t.buffer,0,1)[0]}())}},e.IsEvalSupportedCached={get value(){return c(this,"value",function(){try{return new Function(""),!0}catch(t){return!1}}())}};const p=["rgb(",0,",",0,",",0,")"];class b{static makeCssRgb(t,e,i){return p[1]=t,p[3]=e,p[5]=i,p.join("")}static transform(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}static applyTransform(t,e){return[t[0]*e[0]+t[1]*e[2]+e[4],t[0]*e[1]+t[1]*e[3]+e[5]]}static applyInverseTransform(t,e){const i=e[0]*e[3]-e[1]*e[2];return[(t[0]*e[3]-t[1]*e[2]+e[2]*e[5]-e[4]*e[3])/i,(-t[0]*e[1]+t[1]*e[0]+e[4]*e[1]-e[5]*e[0])/i]}static getAxialAlignedBoundingBox(t,e){const i=b.applyTransform(t,e),n=b.applyTransform(t.slice(2,4),e),a=b.applyTransform([t[0],t[3]],e),s=b.applyTransform([t[2],t[1]],e);return[Math.min(i[0],n[0],a[0],s[0]),Math.min(i[1],n[1],a[1],s[1]),Math.max(i[0],n[0],a[0],s[0]),Math.max(i[1],n[1],a[1],s[1])]}static inverseTransform(t){const e=t[0]*t[3]-t[1]*t[2];return[t[3]/e,-t[1]/e,-t[2]/e,t[0]/e,(t[2]*t[5]-t[4]*t[3])/e,(t[4]*t[1]-t[5]*t[0])/e]}static apply3dTransform(t,e){return[t[0]*e[0]+t[1]*e[1]+t[2]*e[2],t[3]*e[0]+t[4]*e[1]+t[5]*e[2],t[6]*e[0]+t[7]*e[1]+t[8]*e[2]]}static singularValueDecompose2dScale(t){const e=[t[0],t[2],t[1],t[3]],i=t[0]*e[0]+t[1]*e[2],n=t[2]*e[1]+t[3]*e[3],a=(i+n)/2,s=Math.sqrt((i+n)*(i+n)-4*(i*n-(t[2]*e[0]+t[3]*e[2])*(t[0]*e[1]+t[1]*e[3])))/2,o=a-s||1;return[Math.sqrt(a+s||1),Math.sqrt(o)]}static normalizeRect(t){const e=t.slice(0);return t[0]>t[2]&&(e[0]=t[2],e[2]=t[0]),t[1]>t[3]&&(e[1]=t[3],e[3]=t[1]),e}static intersect(t,e){function i(t,e){return t-e}const n=[t[0],t[2],e[0],e[2]].sort(i),a=[t[1],t[3],e[1],e[3]].sort(i),s=[];return t=b.normalizeRect(t),e=b.normalizeRect(e),n[0]===t[0]&&n[1]===e[0]||n[0]===e[0]&&n[1]===t[0]?(s[0]=n[1],s[2]=n[2],a[0]===t[1]&&a[1]===e[1]||a[0]===e[1]&&a[1]===t[1]?(s[1]=a[1],s[3]=a[2],s):null):null}}e.Util=b;const f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364],m=function(){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return function(e,i,n=!1){if(!n&&URL.createObjectURL){const t=new Blob([e],{type:i});return URL.createObjectURL(t)}let a=`data:${i};base64,`;for(let s=0,o=e.length;s<o;s+=3){const i=255&e[s],n=255&e[s+1],r=255&e[s+2];a+=t[i>>2]+t[(3&i)<<4|n>>4]+t[s+1<o?(15&n)<<2|r>>6:64]+t[s+2<o?63&r:64]}return a}}();e.createObjectURL=m},function(t,e,i){"use strict";i(4)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isNodeJS=void 0;const n="object"==typeof process&&process+""=="[object process]"&&!process.versions.nw&&!process.versions.electron;e.isNodeJS=n},function(module,exports,__w_pdfjs_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getDocument=getDocument,exports.setPDFNetworkStreamFactory=setPDFNetworkStreamFactory,exports.build=exports.version=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFWorker=exports.PDFDataRangeTransport=exports.LoopbackPort=void 0;var _util=__w_pdfjs_require__(2),_display_utils=__w_pdfjs_require__(1),_font_loader=__w_pdfjs_require__(6),_api_compatibility=__w_pdfjs_require__(7),_canvas=__w_pdfjs_require__(8),_worker_options=__w_pdfjs_require__(10),_is_node=__w_pdfjs_require__(4),_message_handler=__w_pdfjs_require__(11),_metadata=__w_pdfjs_require__(12),_transport_stream=__w_pdfjs_require__(14),_webgl=__w_pdfjs_require__(15);const DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100;let createPDFNetworkStream;function setPDFNetworkStreamFactory(t){createPDFNetworkStream=t}function getDocument(t){const e=new PDFDocumentLoadingTask;let i;if("string"==typeof t)i={url:t};else if((0,_util.isArrayBuffer)(t))i={data:t};else if(t instanceof PDFDataRangeTransport)i={range:t};else{if("object"!=typeof t)throw new Error("Invalid parameter in getDocument, need either Uint8Array, string or a parameter object");if(!t.url&&!t.data&&!t.range)throw new Error("Invalid parameter object: need either .data, .range or .url");i=t}const n=Object.create(null);let a=null,s=null;for(const r in i)if("url"!==r||"undefined"==typeof window)if("range"!==r)if("worker"!==r)if("data"!==r||i[r]instanceof Uint8Array)n[r]=i[r];else{const t=i[r];if("string"==typeof t)n[r]=(0,_util.stringToBytes)(t);else if("object"!=typeof t||null===t||isNaN(t.length)){if(!(0,_util.isArrayBuffer)(t))throw new Error("Invalid PDF binary data: either typed array, string or array-like object is expected in the data property.");n[r]=new Uint8Array(t)}else n[r]=new Uint8Array(t)}else s=i[r];else a=i[r];else n[r]=new URL(i[r],window.location).href;if(n.rangeChunkSize=n.rangeChunkSize||DEFAULT_RANGE_CHUNK_SIZE,n.CMapReaderFactory=n.CMapReaderFactory||_display_utils.DOMCMapReaderFactory,n.ignoreErrors=!0!==n.stopAtErrors,n.fontExtraProperties=!0===n.fontExtraProperties,n.pdfBug=!0===n.pdfBug,Number.isInteger(n.maxImageSize)||(n.maxImageSize=-1),"boolean"!=typeof n.isEvalSupported&&(n.isEvalSupported=!0),"boolean"!=typeof n.disableFontFace&&(n.disableFontFace=_api_compatibility.apiCompatibilityParams.disableFontFace||!1),"boolean"!=typeof n.disableRange&&(n.disableRange=!1),"boolean"!=typeof n.disableStream&&(n.disableStream=!1),"boolean"!=typeof n.disableAutoFetch&&(n.disableAutoFetch=!1),(0,_util.setVerbosityLevel)(n.verbosity),!s){const t={verbosity:n.verbosity,port:_worker_options.GlobalWorkerOptions.workerPort};s=t.port?PDFWorker.fromPort(t):new PDFWorker(t),e._worker=s}const o=e.docId;return s.promise.then((function(){if(e.destroyed)throw new Error("Loading aborted");const t=_fetchDocument(s,n,a,o),i=new Promise((function(t){let e;a?e=new _transport_stream.PDFDataTransportStream({length:n.length,initialData:n.initialData,progressiveDone:n.progressiveDone,disableRange:n.disableRange,disableStream:n.disableStream},a):n.data||(e=createPDFNetworkStream({url:n.url,length:n.length,httpHeaders:n.httpHeaders,withCredentials:n.withCredentials,rangeChunkSize:n.rangeChunkSize,disableRange:n.disableRange,disableStream:n.disableStream})),t(e)}));return Promise.all([t,i]).then((function([t,i]){if(e.destroyed)throw new Error("Loading aborted");const a=new _message_handler.MessageHandler(o,t,s.port);a.postMessageTransfers=s.postMessageTransfers;const r=new WorkerTransport(a,e,i,n);e._transport=r,a.send("Ready",null)}))})).catch(e._capability.reject),e}function _fetchDocument(t,e,i,n){return t.destroyed?Promise.reject(new Error("Worker was destroyed")):(i&&(e.length=i.length,e.initialData=i.initialData,e.progressiveDone=i.progressiveDone),t.messageHandler.sendWithPromise("GetDocRequest",{docId:n,apiVersion:"2.5.207",source:{data:e.data,url:e.url,password:e.password,disableAutoFetch:e.disableAutoFetch,rangeChunkSize:e.rangeChunkSize,length:e.length},maxImageSize:e.maxImageSize,disableFontFace:e.disableFontFace,postMessageTransfers:t.postMessageTransfers,docBaseUrl:e.docBaseUrl,ignoreErrors:e.ignoreErrors,isEvalSupported:e.isEvalSupported,fontExtraProperties:e.fontExtraProperties}).then((function(e){if(t.destroyed)throw new Error("Worker was destroyed");return e})))}const PDFDocumentLoadingTask=function(){let t=0;return class{constructor(){this._capability=(0,_util.createPromiseCapability)(),this._transport=null,this._worker=null,this.docId="d"+t++,this.destroyed=!1,this.onPassword=null,this.onProgress=null,this.onUnsupportedFeature=null}get promise(){return this._capability.promise}destroy(){return this.destroyed=!0,(this._transport?this._transport.destroy():Promise.resolve()).then(()=>{this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)})}}}();class PDFDataRangeTransport{constructor(t,e,i=!1){this.length=t,this.initialData=e,this.progressiveDone=i,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=(0,_util.createPromiseCapability)()}addRangeListener(t){this._rangeListeners.push(t)}addProgressListener(t){this._progressListeners.push(t)}addProgressiveReadListener(t){this._progressiveReadListeners.push(t)}addProgressiveDoneListener(t){this._progressiveDoneListeners.push(t)}onDataRange(t,e){for(const i of this._rangeListeners)i(t,e)}onDataProgress(t,e){this._readyCapability.promise.then(()=>{for(const i of this._progressListeners)i(t,e)})}onDataProgressiveRead(t){this._readyCapability.promise.then(()=>{for(const e of this._progressiveReadListeners)e(t)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(const t of this._progressiveDoneListeners)t()})}transportReady(){this._readyCapability.resolve()}requestDataRange(t,e){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}exports.PDFDataRangeTransport=PDFDataRangeTransport;class PDFDocumentProxy{constructor(t,e){this._pdfInfo=t,this._transport=e}get numPages(){return this._pdfInfo.numPages}get fingerprint(){return this._pdfInfo.fingerprint}getPage(t){return this._transport.getPage(t)}getPageIndex(t){return this._transport.getPageIndex(t)}getDestinations(){return this._transport.getDestinations()}getDestination(t){return this._transport.getDestination(t)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getOpenActionDestination(){return(0,_display_utils.deprecated)("getOpenActionDestination, use getOpenAction instead."),this.getOpenAction().then((function(t){return t&&t.dest?t.dest:null}))}getAttachments(){return this._transport.getAttachments()}getJavaScript(){return this._transport.getJavaScript()}getOutline(){return this._transport.getOutline()}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getData(){return this._transport.getData()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}getStats(){return this._transport.getStats()}cleanup(){return this._transport.startCleanup()}destroy(){return this.loadingTask.destroy()}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}}exports.PDFDocumentProxy=PDFDocumentProxy;class PDFPageProxy{constructor(t,e,i,n=!1){this._pageIndex=t,this._pageInfo=e,this._transport=i,this._stats=n?new _display_utils.StatTimer:null,this._pdfBug=n,this.commonObjs=i.commonObjs,this.objs=new PDFObjects,this.cleanupAfterRender=!1,this.pendingCleanup=!1,this.intentStates=Object.create(null),this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:t,rotation:e=this.rotate,offsetX:i=0,offsetY:n=0,dontFlip:a=!1}={}){return new _display_utils.PageViewport({viewBox:this.view,scale:t,rotation:e,offsetX:i,offsetY:n,dontFlip:a})}getAnnotations({intent:t=null}={}){return this.annotationsPromise&&this.annotationsIntent===t||(this.annotationsPromise=this._transport.getAnnotations(this._pageIndex,t),this.annotationsIntent=t),this.annotationsPromise}render({canvasContext:t,viewport:e,intent:i="display",enableWebGL:n=!1,renderInteractiveForms:a=!1,transform:s=null,imageLayer:o=null,canvasFactory:r=null,background:c=null}){this._stats&&this._stats.time("Overall");const l="print"===i?"print":"display";this.pendingCleanup=!1,this.intentStates[l]||(this.intentStates[l]=Object.create(null));const d=this.intentStates[l];d.streamReaderCancelTimeout&&(clearTimeout(d.streamReaderCancelTimeout),d.streamReaderCancelTimeout=null);const h=r||new _display_utils.DOMCanvasFactory,u=new _webgl.WebGLContext({enable:n});d.displayReadyCapability||(d.displayReadyCapability=(0,_util.createPromiseCapability)(),d.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList({pageIndex:this._pageIndex,intent:l,renderInteractiveForms:!0===a}));const p=t=>{const e=d.renderTasks.indexOf(b);e>=0&&d.renderTasks.splice(e,1),(this.cleanupAfterRender||"print"===l)&&(this.pendingCleanup=!0),this._tryCleanup(),t?(b.capability.reject(t),this._abortOperatorList({intentState:d,reason:t})):b.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"))},b=new InternalRenderTask({callback:p,params:{canvasContext:t,viewport:e,transform:s,imageLayer:o,background:c},objs:this.objs,commonObjs:this.commonObjs,operatorList:d.operatorList,pageIndex:this._pageIndex,canvasFactory:h,webGLContext:u,useRequestAnimationFrame:"print"!==l,pdfBug:this._pdfBug});d.renderTasks||(d.renderTasks=[]),d.renderTasks.push(b);const f=b.task;return d.displayReadyCapability.promise.then(t=>{this.pendingCleanup?p():(this._stats&&this._stats.time("Rendering"),b.initializeGraphics(t),b.operatorListChanged())}).catch(p),f}getOperatorList(){this.intentStates.oplist||(this.intentStates.oplist=Object.create(null));const t=this.intentStates.oplist;let e;return t.opListReadCapability||(e={},e.operatorListChanged=function(){if(t.operatorList.lastChunk){t.opListReadCapability.resolve(t.operatorList);const i=t.renderTasks.indexOf(e);i>=0&&t.renderTasks.splice(i,1)}},t.opListReadCapability=(0,_util.createPromiseCapability)(),t.renderTasks=[],t.renderTasks.push(e),t.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this._stats&&this._stats.time("Page Request"),this._pumpOperatorList({pageIndex:this._pageIndex,intent:"oplist"})),t.opListReadCapability.promise}streamTextContent({normalizeWhitespace:t=!1,disableCombineTextItems:e=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,normalizeWhitespace:!0===t,combineTextItems:!0!==e},{highWaterMark:100,size:t=>t.items.length})}getTextContent(t={}){const e=this.streamTextContent(t);return new Promise((function(t,i){const n=e.getReader(),a={items:[],styles:Object.create(null)};!function e(){n.read().then((function({value:i,done:n}){n?t(a):(Object.assign(a.styles,i.styles),a.items.push(...i.items),e())}),i)}()}))}_destroy(){this.destroyed=!0,this._transport.pageCache[this._pageIndex]=null;const t=[];return Object.keys(this.intentStates).forEach(e=>{const i=this.intentStates[e];this._abortOperatorList({intentState:i,reason:new Error("Page was destroyed."),force:!0}),"oplist"!==e&&i.renderTasks.forEach((function(e){const i=e.capability.promise.catch((function(){}));t.push(i),e.cancel()}))}),this.objs.clear(),this.annotationsPromise=null,this.pendingCleanup=!1,Promise.all(t)}cleanup(t=!1){return this.pendingCleanup=!0,this._tryCleanup(t)}_tryCleanup(t=!1){return!(!this.pendingCleanup||Object.keys(this.intentStates).some(t=>{const e=this.intentStates[t];return 0!==e.renderTasks.length||!e.operatorList.lastChunk})||(Object.keys(this.intentStates).forEach(t=>{delete this.intentStates[t]}),this.objs.clear(),this.annotationsPromise=null,t&&this._stats&&(this._stats=new _display_utils.StatTimer),this.pendingCleanup=!1,0))}_startRenderPage(t,e){const i=this.intentStates[e];i&&(this._stats&&this._stats.timeEnd("Page Request"),i.displayReadyCapability&&i.displayReadyCapability.resolve(t))}_renderPageChunk(t,e){for(let i=0,n=t.length;i<n;i++)e.operatorList.fnArray.push(t.fnArray[i]),e.operatorList.argsArray.push(t.argsArray[i]);e.operatorList.lastChunk=t.lastChunk;for(let i=0;i<e.renderTasks.length;i++)e.renderTasks[i].operatorListChanged();t.lastChunk&&this._tryCleanup()}_pumpOperatorList(t){(0,_util.assert)(t.intent,'PDFPageProxy._pumpOperatorList: Expected "intent" argument.');const e=this._transport.messageHandler.sendWithStream("GetOperatorList",t).getReader(),i=this.intentStates[t.intent];i.streamReader=e;const n=()=>{e.read().then(({value:t,done:e})=>{e?i.streamReader=null:this._transport.destroyed||(this._renderPageChunk(t,i),n())},t=>{if(i.streamReader=null,!this._transport.destroyed){if(i.operatorList){i.operatorList.lastChunk=!0;for(let t=0;t<i.renderTasks.length;t++)i.renderTasks[t].operatorListChanged();this._tryCleanup()}if(i.displayReadyCapability)i.displayReadyCapability.reject(t);else{if(!i.opListReadCapability)throw t;i.opListReadCapability.reject(t)}}})};n()}_abortOperatorList({intentState:t,reason:e,force:i=!1}){if((0,_util.assert)(e instanceof Error||"object"==typeof e&&null!==e,'PDFPageProxy._abortOperatorList: Expected "reason" argument.'),t.streamReader){if(!i){if(0!==t.renderTasks.length)return;if(e instanceof _display_utils.RenderingCancelledException)return void(t.streamReaderCancelTimeout=setTimeout(()=>{this._abortOperatorList({intentState:t,reason:e,force:!0}),t.streamReaderCancelTimeout=null},RENDERING_CANCELLED_TIMEOUT))}t.streamReader.cancel(new _util.AbortException(e&&e.message)),t.streamReader=null,this._transport.destroyed||(Object.keys(this.intentStates).some(e=>this.intentStates[e]===t&&(delete this.intentStates[e],!0)),this.cleanup())}}get stats(){return this._stats}}exports.PDFPageProxy=PDFPageProxy;class LoopbackPort{constructor(t=!0){this._listeners=[],this._defer=t,this._deferred=Promise.resolve(void 0)}postMessage(t,e){if(!this._defer)return void this._listeners.forEach(e=>{e.call(this,{data:t})});const i=new WeakMap,n={data:function t(n){if("object"!=typeof n||null===n)return n;if(i.has(n))return i.get(n);let a,s;if((a=n.buffer)&&(0,_util.isArrayBuffer)(a))return s=e&&e.includes(a)?new n.constructor(a,n.byteOffset,n.byteLength):new n.constructor(n),i.set(n,s),s;s=Array.isArray(n)?[]:{},i.set(n,s);for(const e in n){let i,a=n;for(;!(i=Object.getOwnPropertyDescriptor(a,e));)a=Object.getPrototypeOf(a);if(void 0!==i.value)if("function"!=typeof i.value)s[e]=t(i.value);else if(n.hasOwnProperty&&n.hasOwnProperty(e))throw new Error("LoopbackPort.postMessage - cannot clone: "+n[e])}return s}(t)};this._deferred.then(()=>{this._listeners.forEach(t=>{t.call(this,n)})})}addEventListener(t,e){this._listeners.push(e)}removeEventListener(t,e){const i=this._listeners.indexOf(e);this._listeners.splice(i,1)}terminate(){this._listeners.length=0}}exports.LoopbackPort=LoopbackPort;const PDFWorker=function PDFWorkerClosure(){const pdfWorkerPorts=new WeakMap;let isWorkerDisabled=!1,fallbackWorkerSrc,nextFakeWorkerId=0,fakeWorkerCapability;if(_is_node.isNodeJS)isWorkerDisabled=!0,fallbackWorkerSrc="./pdf.worker.js";else if("object"==typeof document&&"currentScript"in document){const t=document.currentScript&&document.currentScript.src;t&&(fallbackWorkerSrc=t.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}function getWorkerSrc(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(void 0!==fallbackWorkerSrc)return _is_node.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),fallbackWorkerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}function getMainThreadWorkerMessageHandler(){let t;try{t=globalThis.pdfjsWorker&&globalThis.pdfjsWorker.WorkerMessageHandler}catch(e){}return t||null}function setupFakeWorkerGlobal(){if(fakeWorkerCapability)return fakeWorkerCapability.promise;fakeWorkerCapability=(0,_util.createPromiseCapability)();const loader=async function(){const mainWorkerMessageHandler=getMainThreadWorkerMessageHandler();if(mainWorkerMessageHandler)return mainWorkerMessageHandler;if(_is_node.isNodeJS){const worker=eval("require")(getWorkerSrc());return worker.WorkerMessageHandler}return await(0,_display_utils.loadScript)(getWorkerSrc()),window.pdfjsWorker.WorkerMessageHandler};return loader().then(fakeWorkerCapability.resolve,fakeWorkerCapability.reject),fakeWorkerCapability.promise}function createCDNWrapper(t){return URL.createObjectURL(new Blob(["importScripts('"+t+"');"]))}class PDFWorker{constructor({name:t=null,port:e=null,verbosity:i=(0,_util.getVerbosityLevel)()}={}){if(e&&pdfWorkerPorts.has(e))throw new Error("Cannot use more than one PDFWorker per port");if(this.name=t,this.destroyed=!1,this.postMessageTransfers=!0,this.verbosity=i,this._readyCapability=(0,_util.createPromiseCapability)(),this._port=null,this._webWorker=null,this._messageHandler=null,e)return pdfWorkerPorts.set(e,this),void this._initializeFromPort(e);this._initialize()}get promise(){return this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(t){this._port=t,this._messageHandler=new _message_handler.MessageHandler("main","worker",t),this._messageHandler.on("ready",(function(){})),this._readyCapability.resolve()}_initialize(){if("undefined"!=typeof Worker&&!isWorkerDisabled&&!getMainThreadWorkerMessageHandler()){let e=getWorkerSrc();try{(0,_util.isSameOrigin)(window.location.href,e)||(e=createCDNWrapper(new URL(e,window.location).href));const t=new Worker(e),i=new _message_handler.MessageHandler("main","worker",t),n=()=>{t.removeEventListener("error",a),i.destroy(),t.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},a=()=>{this._webWorker||n()};t.addEventListener("error",a),i.on("test",e=>{t.removeEventListener("error",a),this.destroyed?n():e?(this._messageHandler=i,this._port=t,this._webWorker=t,e.supportTransfers||(this.postMessageTransfers=!1),this._readyCapability.resolve(),i.send("configure",{verbosity:this.verbosity})):(this._setupFakeWorker(),i.destroy(),t.terminate())}),i.on("ready",e=>{if(t.removeEventListener("error",a),this.destroyed)n();else try{s()}catch(i){this._setupFakeWorker()}});const s=()=>{const t=new Uint8Array([this.postMessageTransfers?255:0]);try{i.send("test",t,[t.buffer])}catch(e){(0,_util.warn)("Cannot use postMessage transfers."),t[0]=0,i.send("test",t)}};return void s()}catch(t){(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}_setupFakeWorker(){isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),isWorkerDisabled=!0),setupFakeWorkerGlobal().then(t=>{if(this.destroyed)return void this._readyCapability.reject(new Error("Worker was destroyed"));const e=new LoopbackPort;this._port=e;const i="fake"+nextFakeWorkerId++,n=new _message_handler.MessageHandler(i+"_worker",i,e);t.setup(n,e);const a=new _message_handler.MessageHandler(i,i+"_worker",e);this._messageHandler=a,this._readyCapability.resolve(),a.send("configure",{verbosity:this.verbosity})}).catch(t=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${t.message}".`))})}destroy(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),pdfWorkerPorts.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(t){if(!t||!t.port)throw new Error("PDFWorker.fromPort - invalid method signature.");return pdfWorkerPorts.has(t.port)?pdfWorkerPorts.get(t.port):new PDFWorker(t)}static getWorkerSrc(){return getWorkerSrc()}}return PDFWorker}();exports.PDFWorker=PDFWorker;class WorkerTransport{constructor(t,e,i,n){this.messageHandler=t,this.loadingTask=e,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({docId:e.docId,onUnsupportedFeature:this._onUnsupportedFeature.bind(this)}),this._params=n,this.CMapReaderFactory=new n.CMapReaderFactory({baseUrl:n.cMapUrl,isCompressed:n.cMapPacked}),this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=i,this._fullReader=null,this._lastProgress=null,this.pageCache=[],this.pagePromises=[],this.downloadInfoCapability=(0,_util.createPromiseCapability)(),this.setupMessageHandler()}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=(0,_util.createPromiseCapability)(),this._passwordCapability&&this._passwordCapability.reject(new Error("Worker was destroyed during onPassword callback"));const t=[];this.pageCache.forEach((function(e){e&&t.push(e._destroy())})),this.pageCache.length=0,this.pagePromises.length=0;const e=this.messageHandler.sendWithPromise("Terminate",null);return t.push(e),Promise.all(t).then(()=>{this.fontLoader.clear(),this._networkStream&&this._networkStream.cancelAllRequests(new _util.AbortException("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:t,loadingTask:e}=this;t.on("GetReader",(t,e)=>{(0,_util.assert)(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=t=>{this._lastProgress={loaded:t.loaded,total:t.total}},e.onPull=()=>{this._fullReader.read().then((function({value:t,done:i}){i?e.close():((0,_util.assert)((0,_util.isArrayBuffer)(t),"GetReader - expected an ArrayBuffer."),e.enqueue(new Uint8Array(t),1,[t]))})).catch(t=>{e.error(t)})},e.onCancel=t=>{this._fullReader.cancel(t)}}),t.on("ReaderHeadersReady",t=>{const i=(0,_util.createPromiseCapability)(),n=this._fullReader;return n.headersReady.then(()=>{n.isStreamingSupported&&n.isRangeSupported||(this._lastProgress&&e.onProgress&&e.onProgress(this._lastProgress),n.onProgress=t=>{e.onProgress&&e.onProgress({loaded:t.loaded,total:t.total})}),i.resolve({isStreamingSupported:n.isStreamingSupported,isRangeSupported:n.isRangeSupported,contentLength:n.contentLength})},i.reject),i.promise}),t.on("GetRangeReader",(t,e)=>{(0,_util.assert)(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const i=this._networkStream.getRangeReader(t.begin,t.end);i?(e.onPull=()=>{i.read().then((function({value:t,done:i}){i?e.close():((0,_util.assert)((0,_util.isArrayBuffer)(t),"GetRangeReader - expected an ArrayBuffer."),e.enqueue(new Uint8Array(t),1,[t]))})).catch(t=>{e.error(t)})},e.onCancel=t=>{i.cancel(t)}):e.close()}),t.on("GetDoc",({pdfInfo:t})=>{this._numPages=t.numPages,e._capability.resolve(new PDFDocumentProxy(t,this))}),t.on("DocException",(function(t){let i;switch(t.name){case"PasswordException":i=new _util.PasswordException(t.message,t.code);break;case"InvalidPDFException":i=new _util.InvalidPDFException(t.message);break;case"MissingPDFException":i=new _util.MissingPDFException(t.message);break;case"UnexpectedResponseException":i=new _util.UnexpectedResponseException(t.message,t.status);break;case"UnknownErrorException":i=new _util.UnknownErrorException(t.message,t.details)}e._capability.reject(i)})),t.on("PasswordRequest",t=>{if(this._passwordCapability=(0,_util.createPromiseCapability)(),e.onPassword){const n=t=>{this._passwordCapability.resolve({password:t})};try{e.onPassword(n,t.code)}catch(i){this._passwordCapability.reject(i)}}else this._passwordCapability.reject(new _util.PasswordException(t.message,t.code));return this._passwordCapability.promise}),t.on("DataLoaded",t=>{e.onProgress&&e.onProgress({loaded:t.length,total:t.length}),this.downloadInfoCapability.resolve(t)}),t.on("StartRenderPage",t=>{this.destroyed||this.pageCache[t.pageIndex]._startRenderPage(t.transparency,t.intent)}),t.on("commonobj",e=>{if(this.destroyed)return;const[i,n,a]=e;if(!this.commonObjs.has(i))switch(n){case"Font":const e=this._params;if("error"in a){const t=a.error;(0,_util.warn)("Error during font loading: "+t),this.commonObjs.resolve(i,t);break}let s=null;e.pdfBug&&globalThis.FontInspector&&globalThis.FontInspector.enabled&&(s={registerFont(t,e){globalThis.FontInspector.fontAdded(t,e)}});const o=new _font_loader.FontFaceObject(a,{isEvalSupported:e.isEvalSupported,disableFontFace:e.disableFontFace,ignoreErrors:e.ignoreErrors,onUnsupportedFeature:this._onUnsupportedFeature.bind(this),fontRegistry:s});this.fontLoader.bind(o).catch(e=>t.sendWithPromise("FontFallback",{id:i})).finally(()=>{!e.fontExtraProperties&&o.data&&(o.data=null),this.commonObjs.resolve(i,o)});break;case"FontPath":case"FontType3Res":case"Image":this.commonObjs.resolve(i,a);break;default:throw new Error("Got unknown common object type "+n)}}),t.on("obj",t=>{if(this.destroyed)return;const[e,i,n,a]=t,s=this.pageCache[i];if(!s.objs.has(e))switch(n){case"Image":s.objs.resolve(e,a);const t=8e6;a&&"data"in a&&a.data.length>t&&(s.cleanupAfterRender=!0);break;default:throw new Error("Got unknown object type "+n)}}),t.on("DocProgress",t=>{this.destroyed||e.onProgress&&e.onProgress({loaded:t.loaded,total:t.total})}),t.on("UnsupportedFeature",this._onUnsupportedFeature.bind(this)),t.on("FetchBuiltInCMap",(t,e)=>{if(this.destroyed)return void e.error(new Error("Worker was destroyed"));let i=!1;e.onPull=()=>{i?e.close():(i=!0,this.CMapReaderFactory.fetch(t).then((function(t){e.enqueue(t,1,[t.cMapData.buffer])})).catch((function(t){e.error(t)})))}})}_onUnsupportedFeature({featureId:t}){this.destroyed||this.loadingTask.onUnsupportedFeature&&this.loadingTask.onUnsupportedFeature(t)}getData(){return this.messageHandler.sendWithPromise("GetData",null)}getPage(t){if(!Number.isInteger(t)||t<=0||t>this._numPages)return Promise.reject(new Error("Invalid page request"));const e=t-1;if(e in this.pagePromises)return this.pagePromises[e];const i=this.messageHandler.sendWithPromise("GetPage",{pageIndex:e}).then(t=>{if(this.destroyed)throw new Error("Transport destroyed");const i=new PDFPageProxy(e,t,this,this._params.pdfBug);return this.pageCache[e]=i,i});return this.pagePromises[e]=i,i}getPageIndex(t){return this.messageHandler.sendWithPromise("GetPageIndex",{ref:t}).catch((function(t){return Promise.reject(new Error(t))}))}getAnnotations(t,e){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:t,intent:e})}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(t){return"string"!=typeof t?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:t})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getJavaScript(){return this.messageHandler.sendWithPromise("GetJavaScript",null)}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){return this.messageHandler.sendWithPromise("GetMetadata",null).then(t=>({info:t[0],metadata:t[1]?new _metadata.Metadata(t[1]):null,contentDispositionFilename:this._fullReader?this._fullReader.filename:null}))}getStats(){return this.messageHandler.sendWithPromise("GetStats",null)}startCleanup(){return this.messageHandler.sendWithPromise("Cleanup",null).then(()=>{for(let t=0,e=this.pageCache.length;t<e;t++){const e=this.pageCache[t];if(e&&!e.cleanup())throw new Error(`startCleanup: Page ${t+1} is currently rendering.`)}this.commonObjs.clear(),this.fontLoader.clear()})}get loadingParams(){const t=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:t.disableAutoFetch,disableFontFace:t.disableFontFace})}}class PDFObjects{constructor(){this._objs=Object.create(null)}_ensureObj(t){return this._objs[t]?this._objs[t]:this._objs[t]={capability:(0,_util.createPromiseCapability)(),data:null,resolved:!1}}get(t,e=null){if(e)return this._ensureObj(t).capability.promise.then(e),null;const i=this._objs[t];if(!i||!i.resolved)throw new Error(`Requesting object that isn't resolved yet ${t}.`);return i.data}has(t){const e=this._objs[t];return!!e&&e.resolved}resolve(t,e){const i=this._ensureObj(t);i.resolved=!0,i.data=e,i.capability.resolve(e)}clear(){this._objs=Object.create(null)}}class RenderTask{constructor(t){this._internalRenderTask=t,this.onContinue=null}get promise(){return this._internalRenderTask.capability.promise}cancel(){this._internalRenderTask.cancel()}}const InternalRenderTask=function(){const t=new WeakSet;return class{constructor({callback:t,params:e,objs:i,commonObjs:n,operatorList:a,pageIndex:s,canvasFactory:o,webGLContext:r,useRequestAnimationFrame:c=!1,pdfBug:l=!1}){this.callback=t,this.params=e,this.objs=i,this.commonObjs=n,this.operatorListIdx=null,this.operatorList=a,this._pageIndex=s,this.canvasFactory=o,this.webGLContext=r,this._pdfBug=l,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===c&&"undefined"!=typeof window,this.cancelled=!1,this.capability=(0,_util.createPromiseCapability)(),this.task=new RenderTask(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=e.canvasContext.canvas}initializeGraphics(e=!1){if(this.cancelled)return;if(this._canvas){if(t.has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");t.add(this._canvas)}this._pdfBug&&globalThis.StepperManager&&globalThis.StepperManager.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:i,viewport:n,transform:a,imageLayer:s,background:o}=this.params;this.gfx=new _canvas.CanvasGraphics(i,this.commonObjs,this.objs,this.canvasFactory,this.webGLContext,s),this.gfx.beginDrawing({transform:a,viewport:n,transparency:e,background:o}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback&&this.graphicsReadyCallback()}cancel(e=null){this.running=!1,this.cancelled=!0,this.gfx&&this.gfx.endDrawing(),this._canvas&&t.delete(this._canvas),this.callback(e||new _display_utils.RenderingCancelledException("Rendering cancelled, page "+(this._pageIndex+1),"canvas"))}operatorListChanged(){this.graphicsReady?(this.stepper&&this.stepper.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}_continue(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?window.requestAnimationFrame(()=>{this._nextBound().catch(this.cancel.bind(this))}):Promise.resolve().then(this._nextBound).catch(this.cancel.bind(this))}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),this._canvas&&t.delete(this._canvas),this.callback())))}}}(),version="2.5.207";exports.version=version;const build="0974d605";exports.build=build},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FontLoader=e.FontFaceObject=void 0;var n=i(2);class a{constructor({docId:t,onUnsupportedFeature:e}){this.constructor===a&&(0,n.unreachable)("Cannot initialize BaseFontLoader."),this.docId=t,this._onUnsupportedFeature=e,this.nativeFontFaces=[],this.styleElement=null}addNativeFontFace(t){this.nativeFontFaces.push(t),document.fonts.add(t)}insertRule(t){let e=this.styleElement;e||(e=this.styleElement=document.createElement("style"),e.id="PDFJS_FONT_STYLE_TAG_"+this.docId,document.documentElement.getElementsByTagName("head")[0].appendChild(e));const i=e.sheet;i.insertRule(t,i.cssRules.length)}clear(){this.nativeFontFaces.forEach((function(t){document.fonts.delete(t)})),this.nativeFontFaces.length=0,this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async bind(t){if(t.attached||t.missingFile)return;if(t.attached=!0,this.isFontLoadingAPISupported){const e=t.createNativeFontFace();if(e){this.addNativeFontFace(e);try{await e.loaded}catch(i){throw this._onUnsupportedFeature({featureId:n.UNSUPPORTED_FEATURES.errorFontLoadNative}),(0,n.warn)(`Failed to load font '${e.family}': '${i}'.`),t.disableFontFace=!0,i}}return}const e=t.createFontFaceRule();if(e){if(this.insertRule(e),this.isSyncFontLoadingSupported)return;await new Promise(i=>{const n=this._queueLoadingCallback(i);this._prepareFontLoadEvent([e],[t],n)})}}_queueLoadingCallback(t){(0,n.unreachable)("Abstract method `_queueLoadingCallback`.")}get isFontLoadingAPISupported(){const t="undefined"!=typeof document&&!!document.fonts;return(0,n.shadow)(this,"isFontLoadingAPISupported",t)}get isSyncFontLoadingSupported(){(0,n.unreachable)("Abstract method `isSyncFontLoadingSupported`.")}get _loadTestFont(){(0,n.unreachable)("Abstract method `_loadTestFont`.")}_prepareFontLoadEvent(t,e,i){(0,n.unreachable)("Abstract method `_prepareFontLoadEvent`.")}}let s;e.FontLoader=s,e.FontLoader=s=class extends a{constructor(t){super(t),this.loadingContext={requests:[],nextRequestId:0},this.loadTestFontId=0}get isSyncFontLoadingSupported(){let t=!1;if("undefined"==typeof navigator)t=!0;else{const e=/Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent);e&&e[1]>=14&&(t=!0)}return(0,n.shadow)(this,"isSyncFontLoadingSupported",t)}_queueLoadingCallback(t){const e=this.loadingContext,i={id:"pdfjs-font-loading-"+e.nextRequestId++,done:!1,complete:function(){for((0,n.assert)(!i.done,"completeRequest() cannot be called twice."),i.done=!0;e.requests.length>0&&e.requests[0].done;){const t=e.requests.shift();setTimeout(t.callback,0)}},callback:t};return e.requests.push(i),i}get _loadTestFont(){return(0,n.shadow)(this,"_loadTestFont",atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="))}_prepareFontLoadEvent(t,e,i){function a(t,e){return t.charCodeAt(e)<<24|t.charCodeAt(e+1)<<16|t.charCodeAt(e+2)<<8|255&t.charCodeAt(e+3)}function s(t,e,i,n){return t.substring(0,e)+n+t.substring(e+i)}let o,r;const c=document.createElement("canvas");c.width=1,c.height=1;const l=c.getContext("2d");let d=0;const h=`lt${Date.now()}${this.loadTestFontId++}`;let u=this._loadTestFont;u=s(u,976,h.length,h);let p=a(u,16);for(o=0,r=h.length-3;o<r;o+=4)p=p-1482184792+a(h,o)|0;o<h.length&&(p=p-1482184792+a(h+"XXX",o)|0),u=s(u,16,4,(0,n.string32)(p));const b=`url(data:font/opentype;base64,${btoa(u)});`;this.insertRule(`@font-face {font-family:"${h}";src:${b}}`);const f=[];for(o=0,r=e.length;o<r;o++)f.push(e[o].loadedName);f.push(h);const m=document.createElement("div");for(m.style.visibility="hidden",m.style.width=m.style.height="10px",m.style.position="absolute",m.style.top=m.style.left="0px",o=0,r=f.length;o<r;++o){const t=document.createElement("span");t.textContent="Hi",t.style.fontFamily=f[o],m.appendChild(t)}document.body.appendChild(m),function t(e,i){if(d++,d>30)return(0,n.warn)("Load test font never loaded."),void i();l.font="30px "+e,l.fillText(".",0,20),l.getImageData(0,0,1,1).data[3]>0?i():setTimeout(t.bind(null,e,i))}(h,(function(){document.body.removeChild(m),i.complete()}))}},e.FontFaceObject=class{constructor(t,{isEvalSupported:e=!0,disableFontFace:i=!1,ignoreErrors:n=!1,onUnsupportedFeature:a=null,fontRegistry:s=null}){this.compiledGlyphs=Object.create(null);for(const o in t)this[o]=t[o];this.isEvalSupported=!1!==e,this.disableFontFace=!0===i,this.ignoreErrors=!0===n,this._onUnsupportedFeature=a,this.fontRegistry=s}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;const t=new FontFace(this.loadedName,this.data,{});return this.fontRegistry&&this.fontRegistry.registerFont(this),t}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;const t=(0,n.bytesToString)(new Uint8Array(this.data)),e=`url(data:${this.mimetype};base64,${btoa(t)});`,i=`@font-face {font-family:"${this.loadedName}";src:${e}}`;return this.fontRegistry&&this.fontRegistry.registerFont(this,e),i}getPathGenerator(t,e){if(void 0!==this.compiledGlyphs[e])return this.compiledGlyphs[e];let i,a;try{i=t.get(this.loadedName+"_path_"+e)}catch(s){if(!this.ignoreErrors)throw s;return this._onUnsupportedFeature&&this._onUnsupportedFeature({featureId:n.UNSUPPORTED_FEATURES.errorFontGetPath}),(0,n.warn)(`getPathGenerator - ignoring character: "${s}".`),this.compiledGlyphs[e]=function(t,e){}}if(this.isEvalSupported&&n.IsEvalSupportedCached.value){let t,n="";for(let e=0,s=i.length;e<s;e++)a=i[e],t=void 0!==a.args?a.args.join(","):"",n+="c."+a.cmd+"("+t+");\n";return this.compiledGlyphs[e]=new Function("c","size",n)}return this.compiledGlyphs[e]=function(t,e){for(let n=0,s=i.length;n<s;n++)a=i[n],"scale"===a.cmd&&(a.args=[e,-e]),t[a.cmd].apply(t,a.args)}}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.apiCompatibilityParams=void 0;var n=i(4);const a=Object.create(null);n.isNodeJS&&(a.disableFontFace=!0);const s=Object.freeze(a);e.apiCompatibilityParams=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CanvasGraphics=void 0;var n=i(2),a=i(9);function s(t){t.mozCurrentTransform||(t._originalSave=t.save,t._originalRestore=t.restore,t._originalRotate=t.rotate,t._originalScale=t.scale,t._originalTranslate=t.translate,t._originalTransform=t.transform,t._originalSetTransform=t.setTransform,t._transformMatrix=t._transformMatrix||[1,0,0,1,0,0],t._transformStack=[],Object.defineProperty(t,"mozCurrentTransform",{get:function(){return this._transformMatrix}}),Object.defineProperty(t,"mozCurrentTransformInverse",{get:function(){var t=this._transformMatrix,e=t[0],i=t[1],n=t[2],a=t[3],s=t[4],o=t[5],r=e*a-i*n,c=i*n-e*a;return[a/r,i/c,n/c,e/r,(a*s-n*o)/c,(i*s-e*o)/r]}}),t.save=function(){var t=this._transformMatrix;this._transformStack.push(t),this._transformMatrix=t.slice(0,6),this._originalSave()},t.restore=function(){var t=this._transformStack.pop();t&&(this._transformMatrix=t,this._originalRestore())},t.translate=function(t,e){var i=this._transformMatrix;i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this._originalTranslate(t,e)},t.scale=function(t,e){var i=this._transformMatrix;i[0]=i[0]*t,i[1]=i[1]*t,i[2]=i[2]*e,i[3]=i[3]*e,this._originalScale(t,e)},t.transform=function(e,i,n,a,s,o){var r=this._transformMatrix;this._transformMatrix=[r[0]*e+r[2]*i,r[1]*e+r[3]*i,r[0]*n+r[2]*a,r[1]*n+r[3]*a,r[0]*s+r[2]*o+r[4],r[1]*s+r[3]*o+r[5]],t._originalTransform(e,i,n,a,s,o)},t.setTransform=function(e,i,n,a,s,o){this._transformMatrix=[e,i,n,a,s,o],t._originalSetTransform(e,i,n,a,s,o)},t.rotate=function(t){var e=Math.cos(t),i=Math.sin(t),n=this._transformMatrix;this._transformMatrix=[n[0]*e+n[2]*i,n[1]*e+n[3]*i,n[0]*-i+n[2]*e,n[1]*-i+n[3]*e,n[4],n[5]],this._originalRotate(t)})}var o=function(){function t(t){this.canvasFactory=t,this.cache=Object.create(null)}return t.prototype={getCanvas:function(t,e,i,n){var a;return void 0!==this.cache[t]?(this.canvasFactory.reset(a=this.cache[t],e,i),a.context.setTransform(1,0,0,1,0,0)):(a=this.canvasFactory.create(e,i),this.cache[t]=a),n&&s(a.context),a},clear(){for(var t in this.cache)this.canvasFactory.destroy(this.cache[t]),delete this.cache[t]}},t}(),r=function(){function t(){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=n.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=n.FONT_IDENTITY_MATRIX,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=n.TextRenderingMode.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.resumeSMaskCtx=null}return t.prototype={clone:function(){return Object.create(this)},setCurrentPoint:function(t,e){this.x=t,this.y=e}},t}(),c=function(){function t(t,e,i,n,a,c){this.ctx=t,this.current=new r,this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=e,this.objs=i,this.canvasFactory=n,this.webGLContext=a,this.imageLayer=c,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.cachedCanvases=new o(this.canvasFactory),t&&s(t),this._cachedGetSinglePixelWidth=null}function e(t,e){if("undefined"!=typeof ImageData&&e instanceof ImageData)t.putImageData(e,0,0);else{var i,a,s,o,r,c=e.height,l=e.width,d=c%16,h=(c-d)/16,u=0===d?h:h+1,p=t.createImageData(l,16),b=0,f=e.data,m=p.data;if(e.kind===n.ImageKind.GRAYSCALE_1BPP){var g=f.byteLength,v=new Uint32Array(m.buffer,0,m.byteLength>>2),_=v.length,y=l+7>>3,x=4294967295,C=n.IsLittleEndianCached.value?4278190080:255;for(a=0;a<u;a++){for(o=a<h?16:d,i=0,s=0;s<o;s++){for(var O=g-b,D=0,w=O>y?l:8*O-7,M=-8&w,k=0,S=0;D<M;D+=8)S=f[b++],v[i++]=128&S?x:C,v[i++]=64&S?x:C,v[i++]=32&S?x:C,v[i++]=16&S?x:C,v[i++]=8&S?x:C,v[i++]=4&S?x:C,v[i++]=2&S?x:C,v[i++]=1&S?x:C;for(;D<w;D++)0===k&&(S=f[b++],k=128),v[i++]=S&k?x:C,k>>=1}for(;i<_;)v[i++]=0;t.putImageData(p,0,16*a)}}else if(e.kind===n.ImageKind.RGBA_32BPP){for(s=0,r=16*l*4,a=0;a<h;a++)m.set(f.subarray(b,b+r)),b+=r,t.putImageData(p,0,s),s+=16;a<u&&(m.set(f.subarray(b,b+(r=l*d*4))),t.putImageData(p,0,s))}else{if(e.kind!==n.ImageKind.RGB_24BPP)throw new Error("bad image kind: "+e.kind);for(r=l*(o=16),a=0;a<u;a++){for(a>=h&&(r=l*(o=d)),i=0,s=r;s--;)m[i++]=f[b++],m[i++]=f[b++],m[i++]=f[b++],m[i++]=255;t.putImageData(p,0,16*a)}}}}function i(t,e){for(var i=e.height,n=e.width,a=i%16,s=(i-a)/16,o=0===a?s:s+1,r=t.createImageData(n,16),c=0,l=e.data,d=r.data,h=0;h<o;h++){for(var u=h<s?16:a,p=3,b=0;b<u;b++)for(var f=0,m=0;m<n;m++){if(!f){var g=l[c++];f=128}d[p]=g&f?0:255,p+=4,f>>=1}t.putImageData(r,0,16*h)}}function c(t,e){for(var i=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font"],n=0,a=i.length;n<a;n++){var s=i[n];void 0!==t[s]&&(e[s]=t[s])}void 0!==t.setLineDash&&(e.setLineDash(t.getLineDash()),e.lineDashOffset=t.lineDashOffset)}function l(t){t.strokeStyle="#000000",t.fillStyle="#000000",t.fillRule="nonzero",t.globalAlpha=1,t.lineWidth=1,t.lineCap="butt",t.lineJoin="miter",t.miterLimit=10,t.globalCompositeOperation="source-over",t.font="10px sans-serif",void 0!==t.setLineDash&&(t.setLineDash([]),t.lineDashOffset=0)}function d(t,e,i,n){for(var a=t.length,s=3;s<a;s+=4){var o=t[s];if(0===o)t[s-3]=e,t[s-2]=i,t[s-1]=n;else if(o<255){var r=255-o;t[s-3]=t[s-3]*o+e*r>>8,t[s-2]=t[s-2]*o+i*r>>8,t[s-1]=t[s-1]*o+n*r>>8}}}function h(t,e,i){for(var n=t.length,a=3;a<n;a+=4)e[a]=e[a]*(i?i[t[a]]:t[a])*.00392156862745098|0}function u(t,e,i){for(var n=t.length,a=3;a<n;a+=4){var s=77*t[a-3]+152*t[a-2]+28*t[a-1];e[a]=i?e[a]*i[s>>8]>>8:e[a]*s>>16}}function p(t,e,i,n){var a=e.canvas,s=e.context;t.setTransform(e.scaleX,0,0,e.scaleY,e.offsetX,e.offsetY);var o=e.backdrop||null;if(!e.transferMap&&n.isEnabled){const s=n.composeSMask({layer:i.canvas,mask:a,properties:{subtype:e.subtype,backdrop:o}});return t.setTransform(1,0,0,1,0,0),void t.drawImage(s,e.offsetX,e.offsetY)}!function(t,e,i,n,a,s,o){var r,c=!!s,l=c?s[0]:0,p=c?s[1]:0,b=c?s[2]:0;r="Luminosity"===a?u:h;for(var f=Math.min(n,Math.ceil(1048576/i)),m=0;m<n;m+=f){var g=Math.min(f,n-m),v=t.getImageData(0,m,i,g),_=e.getImageData(0,m,i,g);c&&d(v.data,l,p,b),r(v.data,_.data,o),t.putImageData(_,0,m)}}(s,i,a.width,a.height,e.subtype,o,e.transferMap),t.drawImage(a,0,0)}var b=["butt","round","square"],f=["miter","round","bevel"],m={},g={};for(var v in t.prototype={beginDrawing({transform:t,viewport:e,transparency:i=!1,background:n=null}){var a=this.ctx.canvas.width,s=this.ctx.canvas.height;if(this.ctx.save(),this.ctx.fillStyle=n||"rgb(255, 255, 255)",this.ctx.fillRect(0,0,a,s),this.ctx.restore(),i){var o=this.cachedCanvases.getCanvas("transparent",a,s,!0);this.compositeCtx=this.ctx,this.transparentCanvas=o.canvas,this.ctx=o.context,this.ctx.save(),this.ctx.transform.apply(this.ctx,this.compositeCtx.mozCurrentTransform)}this.ctx.save(),l(this.ctx),t&&this.ctx.transform.apply(this.ctx,t),this.ctx.transform.apply(this.ctx,e.transform),this.baseTransform=this.ctx.mozCurrentTransform.slice(),this.imageLayer&&this.imageLayer.beginLayout()},executeOperatorList:function(t,e,i,a){var s=t.argsArray,o=t.fnArray,r=e||0,c=s.length;if(c===r)return r;for(var l,d=c-r>10&&"function"==typeof i,h=d?Date.now()+15:0,u=0,p=this.commonObjs,b=this.objs;;){if(void 0!==a&&r===a.nextBreakPoint)return a.breakIt(r,i),r;if((l=o[r])!==n.OPS.dependency)this[l].apply(this,s[r]);else for(const t of s[r]){const e=t.startsWith("g_")?p:b;if(!e.has(t))return e.get(t,i),r}if(++r===c)return r;if(d&&++u>10){if(Date.now()>h)return i(),r;u=0}}},endDrawing:function(){null!==this.current.activeSMask&&this.endSMaskGroup(),this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null),this.cachedCanvases.clear(),this.webGLContext.clear(),this.imageLayer&&this.imageLayer.endLayout()},setLineWidth:function(t){this.current.lineWidth=t,this.ctx.lineWidth=t},setLineCap:function(t){this.ctx.lineCap=b[t]},setLineJoin:function(t){this.ctx.lineJoin=f[t]},setMiterLimit:function(t){this.ctx.miterLimit=t},setDash:function(t,e){var i=this.ctx;void 0!==i.setLineDash&&(i.setLineDash(t),i.lineDashOffset=e)},setRenderingIntent(t){},setFlatness(t){},setGState:function(t){for(var e=0,i=t.length;e<i;e++){var n=t[e],a=n[1];switch(n[0]){case"LW":this.setLineWidth(a);break;case"LC":this.setLineCap(a);break;case"LJ":this.setLineJoin(a);break;case"ML":this.setMiterLimit(a);break;case"D":this.setDash(a[0],a[1]);break;case"RI":this.setRenderingIntent(a);break;case"FL":this.setFlatness(a);break;case"Font":this.setFont(a[0],a[1]);break;case"CA":this.current.strokeAlpha=n[1];break;case"ca":this.current.fillAlpha=n[1],this.ctx.globalAlpha=n[1];break;case"BM":this.ctx.globalCompositeOperation=a;break;case"SMask":this.current.activeSMask&&(this.stateStack.length>0&&this.stateStack[this.stateStack.length-1].activeSMask===this.current.activeSMask?this.suspendSMaskGroup():this.endSMaskGroup()),this.current.activeSMask=a?this.tempSMask:null,this.current.activeSMask&&this.beginSMaskGroup(),this.tempSMask=null}}},beginSMaskGroup:function(){var t=this.current.activeSMask,e=this.cachedCanvases.getCanvas("smaskGroupAt"+this.groupLevel,t.canvas.width,t.canvas.height,!0),i=this.ctx,n=i.mozCurrentTransform;this.ctx.save();var a=e.context;a.scale(1/t.scaleX,1/t.scaleY),a.translate(-t.offsetX,-t.offsetY),a.transform.apply(a,n),t.startTransformInverse=a.mozCurrentTransformInverse,c(i,a),this.ctx=a,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(i),this.groupLevel++},suspendSMaskGroup:function(){var t=this.ctx;this.groupLevel--,this.ctx=this.groupStack.pop(),p(this.ctx,this.current.activeSMask,t,this.webGLContext),this.ctx.restore(),this.ctx.save(),c(t,this.ctx),this.current.resumeSMaskCtx=t;var e=n.Util.transform(this.current.activeSMask.startTransformInverse,t.mozCurrentTransform);this.ctx.transform.apply(this.ctx,e),t.save(),t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,t.canvas.width,t.canvas.height),t.restore()},resumeSMaskGroup:function(){var t=this.ctx;this.ctx=this.current.resumeSMaskCtx,this.groupStack.push(t),this.groupLevel++},endSMaskGroup:function(){var t=this.ctx;this.groupLevel--,this.ctx=this.groupStack.pop(),p(this.ctx,this.current.activeSMask,t,this.webGLContext),this.ctx.restore(),c(t,this.ctx);var e=n.Util.transform(this.current.activeSMask.startTransformInverse,t.mozCurrentTransform);this.ctx.transform.apply(this.ctx,e)},save:function(){this.ctx.save();var t=this.current;this.stateStack.push(t),this.current=t.clone(),this.current.resumeSMaskCtx=null},restore:function(){this.current.resumeSMaskCtx&&this.resumeSMaskGroup(),null===this.current.activeSMask||0!==this.stateStack.length&&this.stateStack[this.stateStack.length-1].activeSMask===this.current.activeSMask||this.endSMaskGroup(),0!==this.stateStack.length&&(this.current=this.stateStack.pop(),this.ctx.restore(),this.pendingClip=null,this._cachedGetSinglePixelWidth=null)},transform:function(t,e,i,n,a,s){this.ctx.transform(t,e,i,n,a,s),this._cachedGetSinglePixelWidth=null},constructPath:function(t,e){for(var i=this.ctx,a=this.current,s=a.x,o=a.y,r=0,c=0,l=t.length;r<l;r++)switch(0|t[r]){case n.OPS.rectangle:s=e[c++],o=e[c++];var d=e[c++],h=e[c++];0===d&&(d=this.getSinglePixelWidth()),0===h&&(h=this.getSinglePixelWidth());var u=s+d,p=o+h;this.ctx.moveTo(s,o),this.ctx.lineTo(u,o),this.ctx.lineTo(u,p),this.ctx.lineTo(s,p),this.ctx.lineTo(s,o),this.ctx.closePath();break;case n.OPS.moveTo:s=e[c++],o=e[c++],i.moveTo(s,o);break;case n.OPS.lineTo:s=e[c++],o=e[c++],i.lineTo(s,o);break;case n.OPS.curveTo:i.bezierCurveTo(e[c],e[c+1],e[c+2],e[c+3],s=e[c+4],o=e[c+5]),c+=6;break;case n.OPS.curveTo2:i.bezierCurveTo(s,o,e[c],e[c+1],e[c+2],e[c+3]),s=e[c+2],o=e[c+3],c+=4;break;case n.OPS.curveTo3:i.bezierCurveTo(e[c],e[c+1],s=e[c+2],o=e[c+3],s,o),c+=4;break;case n.OPS.closePath:i.closePath()}a.setCurrentPoint(s,o)},closePath:function(){this.ctx.closePath()},stroke:function(t){t=void 0===t||t;var e=this.ctx,i=this.current.strokeColor;if(e.globalAlpha=this.current.strokeAlpha,i&&i.hasOwnProperty("type")&&"Pattern"===i.type){e.save();const t=n.Util.singularValueDecompose2dScale(e.mozCurrentTransform)[0];e.strokeStyle=i.getPattern(e,this),e.lineWidth=Math.max(.65*this.getSinglePixelWidth(),this.current.lineWidth*t),e.stroke(),e.restore()}else e.lineWidth=Math.max(.65*this.getSinglePixelWidth(),this.current.lineWidth),e.stroke();t&&this.consumePath(),e.globalAlpha=this.current.fillAlpha},closeStroke:function(){this.closePath(),this.stroke()},fill:function(t){t=void 0===t||t;var e=this.ctx,i=this.current.fillColor,n=!1;this.current.patternFill&&(e.save(),this.baseTransform&&e.setTransform.apply(e,this.baseTransform),e.fillStyle=i.getPattern(e,this),n=!0),this.pendingEOFill?(e.fill("evenodd"),this.pendingEOFill=!1):e.fill(),n&&e.restore(),t&&this.consumePath()},eoFill:function(){this.pendingEOFill=!0,this.fill()},fillStroke:function(){this.fill(!1),this.stroke(!1),this.consumePath()},eoFillStroke:function(){this.pendingEOFill=!0,this.fillStroke()},closeFillStroke:function(){this.closePath(),this.fillStroke()},closeEOFillStroke:function(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()},endPath:function(){this.consumePath()},clip:function(){this.pendingClip=m},eoClip:function(){this.pendingClip=g},beginText:function(){this.current.textMatrix=n.IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0},endText:function(){var t=this.pendingTextPaths,e=this.ctx;if(void 0!==t){e.save(),e.beginPath();for(var i=0;i<t.length;i++){var n=t[i];e.setTransform.apply(e,n.transform),e.translate(n.x,n.y),n.addToPath(e,n.fontSize)}e.restore(),e.clip(),e.beginPath(),delete this.pendingTextPaths}else e.beginPath()},setCharSpacing:function(t){this.current.charSpacing=t},setWordSpacing:function(t){this.current.wordSpacing=t},setHScale:function(t){this.current.textHScale=t/100},setLeading:function(t){this.current.leading=-t},setFont:function(t,e){var i=this.commonObjs.get(t),a=this.current;if(!i)throw new Error("Can't find font for "+t);if(a.fontMatrix=i.fontMatrix?i.fontMatrix:n.FONT_IDENTITY_MATRIX,0!==a.fontMatrix[0]&&0!==a.fontMatrix[3]||(0,n.warn)("Invalid font matrix for font "+t),e<0?(e=-e,a.fontDirection=-1):a.fontDirection=1,this.current.font=i,this.current.fontSize=e,i.isType3Font)return;let s="normal";i.black?s="900":i.bold&&(s="bold");var o=i.italic?"italic":"normal",r=`"${i.loadedName||"sans-serif"}", ${i.fallbackName}`;let c=e;e<16?c=16:e>100&&(c=100),this.current.fontSizeScale=e/c,this.ctx.font=`${o} ${s} ${c}px ${r}`},setTextRenderingMode:function(t){this.current.textRenderingMode=t},setTextRise:function(t){this.current.textRise=t},moveText:function(t,e){this.current.x=this.current.lineX+=t,this.current.y=this.current.lineY+=e},setLeadingMoveText:function(t,e){this.setLeading(-e),this.moveText(t,e)},setTextMatrix:function(t,e,i,n,a,s){this.current.textMatrix=[t,e,i,n,a,s],this.current.textMatrixScale=Math.sqrt(t*t+e*e),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0},nextLine:function(){this.moveText(0,this.current.leading)},paintChar(t,e,i,a){var s=this.ctx,o=this.current,r=o.font,c=o.textRenderingMode,l=o.fontSize/o.fontSizeScale,d=c&n.TextRenderingMode.FILL_STROKE_MASK,h=!!(c&n.TextRenderingMode.ADD_TO_PATH_FLAG);const u=o.patternFill&&!r.missingFile;var p;(r.disableFontFace||h||u)&&(p=r.getPathGenerator(this.commonObjs,t)),r.disableFontFace||u?(s.save(),s.translate(e,i),s.beginPath(),p(s,l),a&&s.setTransform.apply(s,a),d!==n.TextRenderingMode.FILL&&d!==n.TextRenderingMode.FILL_STROKE||s.fill(),d!==n.TextRenderingMode.STROKE&&d!==n.TextRenderingMode.FILL_STROKE||s.stroke(),s.restore()):(d!==n.TextRenderingMode.FILL&&d!==n.TextRenderingMode.FILL_STROKE||s.fillText(t,e,i),d!==n.TextRenderingMode.STROKE&&d!==n.TextRenderingMode.FILL_STROKE||s.strokeText(t,e,i)),h&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:s.mozCurrentTransform,x:e,y:i,fontSize:l,addToPath:p})},get isFontSubpixelAAEnabled(){const{context:t}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);t.scale(1.5,1),t.fillText("I",0,10);for(var e=t.getImageData(0,0,10,10).data,i=!1,a=3;a<e.length;a+=4)if(e[a]>0&&e[a]<255){i=!0;break}return(0,n.shadow)(this,"isFontSubpixelAAEnabled",i)},showText:function(t){var e=this.current,i=e.font;if(i.isType3Font)return this.showType3Text(t);var a=e.fontSize;if(0===a)return;var s=this.ctx,o=e.fontSizeScale,r=e.charSpacing,c=e.wordSpacing,l=e.fontDirection,d=e.textHScale*l,h=t.length,u=i.vertical,p=u?1:-1,b=i.defaultVMetrics,f=a*e.fontMatrix[0],m=e.textRenderingMode===n.TextRenderingMode.FILL&&!i.disableFontFace&&!e.patternFill;let g;if(s.save(),e.patternFill){s.save();const t=e.fillColor.getPattern(s,this);g=s.mozCurrentTransform,s.restore(),s.fillStyle=t}s.transform.apply(s,e.textMatrix),s.translate(e.x,e.y+e.textRise),s.scale(d,l>0?-1:1);var v=e.lineWidth,_=e.textMatrixScale;if(0===_||0===v){var y=e.textRenderingMode&n.TextRenderingMode.FILL_STROKE_MASK;y!==n.TextRenderingMode.STROKE&&y!==n.TextRenderingMode.FILL_STROKE||(this._cachedGetSinglePixelWidth=null,v=.65*this.getSinglePixelWidth())}else v/=_;1!==o&&(s.scale(o,o),v/=o),s.lineWidth=v;var x,C=0;for(x=0;x<h;++x){var O=t[x];if((0,n.isNum)(O))C+=p*O*a/1e3;else{var D,w,M,k,S=!1,I=(O.isSpace?c:0)+r,P=O.fontChar,V=O.accent,R=O.width;if(u?(M=O.vmetric||b,k=O.vmetric?M[1]:.5*R,R=M?-M[0]:R,D=(k=-k*f)/o,w=(C+M[2]*f)/o):(D=C/o,w=0),i.remeasure&&R>0){var j=1e3*s.measureText(P).width/a*o;if(R<j&&this.isFontSubpixelAAEnabled){var A=R/j;S=!0,s.save(),s.scale(A,1),D/=A}else R!==j&&(D+=(R-j)/2e3*a/o)}(O.isInFont||i.missingFile)&&(m&&!V?s.fillText(P,D,w):(this.paintChar(P,D,w,g),V&&this.paintChar(V.fontChar,D+V.offset.x/o,w-V.offset.y/o,g))),C+=u?R*f-I*l:R*f+I*l,S&&s.restore()}}u?e.y-=C:e.x+=C*d,s.restore()},showType3Text:function(t){var e,i,a,s,o=this.ctx,r=this.current,c=r.font,l=r.fontSize,d=r.fontDirection,h=c.vertical?1:-1,u=r.charSpacing,p=r.wordSpacing,b=r.textHScale*d,f=r.fontMatrix||n.FONT_IDENTITY_MATRIX,m=t.length;if(r.textRenderingMode!==n.TextRenderingMode.INVISIBLE&&0!==l){for(this._cachedGetSinglePixelWidth=null,o.save(),o.transform.apply(o,r.textMatrix),o.translate(r.x,r.y),o.scale(b,d),e=0;e<m;++e)if((0,n.isNum)(i=t[e]))this.ctx.translate(s=h*i*l/1e3,0),r.x+=s*b;else{var g=(i.isSpace?p:0)+u,v=c.charProcOperatorList[i.operatorListId];if(v){this.processingType3=i,this.save(),o.scale(l,l),o.transform.apply(o,f),this.executeOperatorList(v),this.restore();var _=n.Util.applyTransform([i.width,0],f);o.translate(a=_[0]*l+g,0),r.x+=a*b}else(0,n.warn)(`Type3 character "${i.operatorListId}" is not available.`)}o.restore(),this.processingType3=null}},setCharWidth:function(t,e){},setCharWidthAndBounds:function(t,e,i,n,a,s){this.ctx.rect(i,n,a-i,s-n),this.clip(),this.endPath()},getColorN_Pattern:function(e){var i;if("TilingPattern"===e[0]){var n=e[1],s=this.baseTransform||this.ctx.mozCurrentTransform.slice();i=new a.TilingPattern(e,n,this.ctx,{createCanvasGraphics:e=>new t(e,this.commonObjs,this.objs,this.canvasFactory,this.webGLContext)},s)}else i=(0,a.getShadingPatternFromIR)(e);return i},setStrokeColorN:function(){this.current.strokeColor=this.getColorN_Pattern(arguments)},setFillColorN:function(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0},setStrokeRGBColor:function(t,e,i){var a=n.Util.makeCssRgb(t,e,i);this.ctx.strokeStyle=a,this.current.strokeColor=a},setFillRGBColor:function(t,e,i){var a=n.Util.makeCssRgb(t,e,i);this.ctx.fillStyle=a,this.current.fillColor=a,this.current.patternFill=!1},shadingFill:function(t){var e=this.ctx;this.save();var i=(0,a.getShadingPatternFromIR)(t);e.fillStyle=i.getPattern(e,this,!0);var s=e.mozCurrentTransformInverse;if(s){var o=e.canvas,r=o.width,c=o.height,l=n.Util.applyTransform([0,0],s),d=n.Util.applyTransform([0,c],s),h=n.Util.applyTransform([r,0],s),u=n.Util.applyTransform([r,c],s),p=Math.min(l[0],d[0],h[0],u[0]),b=Math.min(l[1],d[1],h[1],u[1]),f=Math.max(l[0],d[0],h[0],u[0]),m=Math.max(l[1],d[1],h[1],u[1]);this.ctx.fillRect(p,b,f-p,m-b)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.restore()},beginInlineImage:function(){(0,n.unreachable)("Should not call beginInlineImage")},beginImageData:function(){(0,n.unreachable)("Should not call beginImageData")},paintFormXObjectBegin:function(t,e){this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(t)&&6===t.length&&this.transform.apply(this,t),this.baseTransform=this.ctx.mozCurrentTransform,e&&(this.ctx.rect(e[0],e[1],e[2]-e[0],e[3]-e[1]),this.clip(),this.endPath())},paintFormXObjectEnd:function(){this.restore(),this.baseTransform=this.baseTransformStack.pop()},beginGroup:function(t){this.save();var e=this.ctx;t.isolated||(0,n.info)("TODO: Support non-isolated groups."),t.knockout&&(0,n.warn)("Knockout groups not supported.");var i=e.mozCurrentTransform;if(t.matrix&&e.transform.apply(e,t.matrix),!t.bbox)throw new Error("Bounding box is required.");var a=n.Util.getAxialAlignedBoundingBox(t.bbox,e.mozCurrentTransform);a=n.Util.intersect(a,[0,0,e.canvas.width,e.canvas.height])||[0,0,0,0];var s=Math.floor(a[0]),o=Math.floor(a[1]),r=Math.max(Math.ceil(a[2])-s,1),l=Math.max(Math.ceil(a[3])-o,1),d=1,h=1;r>4096&&(d=r/4096,r=4096),l>4096&&(h=l/4096,l=4096);var u="groupAt"+this.groupLevel;t.smask&&(u+="_smask_"+this.smaskCounter++%2);var p=this.cachedCanvases.getCanvas(u,r,l,!0),b=p.context;b.scale(1/d,1/h),b.translate(-s,-o),b.transform.apply(b,i),t.smask?this.smaskStack.push({canvas:p.canvas,context:b,offsetX:s,offsetY:o,scaleX:d,scaleY:h,subtype:t.smask.subtype,backdrop:t.smask.backdrop,transferMap:t.smask.transferMap||null,startTransformInverse:null}):(e.setTransform(1,0,0,1,0,0),e.translate(s,o),e.scale(d,h)),c(e,b),this.ctx=b,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(e),this.groupLevel++,this.current.activeSMask=null},endGroup:function(t){this.groupLevel--;var e=this.ctx;this.ctx=this.groupStack.pop(),void 0!==this.ctx.imageSmoothingEnabled?this.ctx.imageSmoothingEnabled=!1:this.ctx.mozImageSmoothingEnabled=!1,t.smask?this.tempSMask=this.smaskStack.pop():this.ctx.drawImage(e.canvas,0,0),this.restore()},beginAnnotations:function(){this.save(),this.baseTransform&&this.ctx.setTransform.apply(this.ctx,this.baseTransform)},endAnnotations:function(){this.restore()},beginAnnotation:function(t,e,i){this.save(),l(this.ctx),this.current=new r,Array.isArray(t)&&4===t.length&&(this.ctx.rect(t[0],t[1],t[2]-t[0],t[3]-t[1]),this.clip(),this.endPath()),this.transform.apply(this,e),this.transform.apply(this,i)},endAnnotation:function(){this.restore()},paintImageMaskXObject:function(t){var e=this.ctx,n=t.width,a=t.height,s=this.current.fillColor,o=this.current.patternFill,r=this.processingType3;if(r&&void 0===r.compiled&&(r.compiled=n<=1e3&&a<=1e3?function(t){var e,i,n,a,s=t.width,o=t.height,r=s+1,c=new Uint8Array(r*(o+1)),l=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),d=s+7&-8,h=t.data,u=new Uint8Array(d*o),p=0;for(e=0,a=h.length;e<a;e++)for(var b=128,f=h[e];b>0;)u[p++]=f&b?0:255,b>>=1;var m=0;for(0!==u[p=0]&&(c[0]=1,++m),i=1;i<s;i++)u[p]!==u[p+1]&&(c[i]=u[p]?2:1,++m),p++;for(0!==u[p]&&(c[i]=2,++m),e=1;e<o;e++){n=e*r,u[(p=e*d)-d]!==u[p]&&(c[n]=u[p]?1:8,++m);var g=(u[p]?4:0)+(u[p-d]?8:0);for(i=1;i<s;i++)l[g=(g>>2)+(u[p+1]?4:0)+(u[p-d+1]?8:0)]&&(c[n+i]=l[g],++m),p++;if(u[p-d]!==u[p]&&(c[n+i]=u[p]?2:4,++m),m>1e3)return null}for(n=e*r,0!==u[p=d*(o-1)]&&(c[n]=8,++m),i=1;i<s;i++)u[p]!==u[p+1]&&(c[n+i]=u[p]?4:8,++m),p++;if(0!==u[p]&&(c[n+i]=4,++m),m>1e3)return null;var v=new Int32Array([0,r,-1,0,-r,0,0,0,1]),_=[];for(e=0;m&&e<=o;e++){for(var y=e*r,x=y+s;y<x&&!c[y];)y++;if(y!==x){var C,O=[y%r,e],D=c[y],w=y;do{var M=v[D];do{y+=M}while(!c[y]);5!==(C=c[y])&&10!==C?(D=C,c[y]=0):c[y]&=(D=C&51*D>>4)>>2|D<<2,O.push(y%r),O.push(y/r|0),c[y]||--m}while(w!==y);_.push(O),--e}}return function(t){t.save(),t.scale(1/s,-1/o),t.translate(0,-o),t.beginPath();for(let i=0,n=_.length;i<n;i++){var e=_[i];t.moveTo(e[0],e[1]);for(let i=2,n=e.length;i<n;i+=2)t.lineTo(e[i],e[i+1])}t.fill(),t.beginPath(),t.restore()}}({data:t.data,width:n,height:a}):null),r&&r.compiled)r.compiled(e);else{var c=this.cachedCanvases.getCanvas("maskCanvas",n,a),l=c.context;l.save(),i(l,t),l.globalCompositeOperation="source-in",l.fillStyle=o?s.getPattern(l,this):s,l.fillRect(0,0,n,a),l.restore(),this.paintInlineImageXObject(c.canvas)}},paintImageMaskXObjectRepeat:function(t,e,n,a){var s=t.width,o=t.height,r=this.current.fillColor,c=this.current.patternFill,l=this.cachedCanvases.getCanvas("maskCanvas",s,o),d=l.context;d.save(),i(d,t),d.globalCompositeOperation="source-in",d.fillStyle=c?r.getPattern(d,this):r,d.fillRect(0,0,s,o),d.restore();for(var h=this.ctx,u=0,p=a.length;u<p;u+=2)h.save(),h.transform(e,0,0,n,a[u],a[u+1]),h.scale(1,-1),h.drawImage(l.canvas,0,0,s,o,0,-1,1,1),h.restore()},paintImageMaskXObjectGroup:function(t){for(var e=this.ctx,n=this.current.fillColor,a=this.current.patternFill,s=0,o=t.length;s<o;s++){var r=t[s],c=r.width,l=r.height,d=this.cachedCanvases.getCanvas("maskCanvas",c,l),h=d.context;h.save(),i(h,r),h.globalCompositeOperation="source-in",h.fillStyle=a?n.getPattern(h,this):n,h.fillRect(0,0,c,l),h.restore(),e.save(),e.transform.apply(e,r.transform),e.scale(1,-1),e.drawImage(d.canvas,0,0,c,l,0,-1,1,1),e.restore()}},paintImageXObject:function(t){const e=t.startsWith("g_")?this.commonObjs.get(t):this.objs.get(t);e?this.paintInlineImageXObject(e):(0,n.warn)("Dependent image isn't ready yet")},paintImageXObjectRepeat:function(t,e,i,a){const s=t.startsWith("g_")?this.commonObjs.get(t):this.objs.get(t);if(s){for(var o=s.width,r=s.height,c=[],l=0,d=a.length;l<d;l+=2)c.push({transform:[e,0,0,i,a[l],a[l+1]],x:0,y:0,w:o,h:r});this.paintInlineImageXObjectGroup(s,c)}else(0,n.warn)("Dependent image isn't ready yet")},paintInlineImageXObject:function(t){var i=t.width,n=t.height,a=this.ctx;this.save(),a.scale(1/i,-1/n);var s,o,r=a.mozCurrentTransformInverse,c=r[0],l=r[1],d=Math.max(Math.sqrt(c*c+l*l),1),h=r[2],u=r[3],p=Math.max(Math.sqrt(h*h+u*u),1);if("function"==typeof HTMLElement&&t instanceof HTMLElement||!t.data)s=t;else{var b=(o=this.cachedCanvases.getCanvas("inlineImage",i,n)).context;e(b,t),s=o.canvas}for(var f=i,m=n,g="prescale1";d>2&&f>1||p>2&&m>1;){var v=f,_=m;d>2&&f>1&&(d/=f/(v=Math.ceil(f/2))),p>2&&m>1&&(p/=m/(_=Math.ceil(m/2))),(b=(o=this.cachedCanvases.getCanvas(g,v,_)).context).clearRect(0,0,v,_),b.drawImage(s,0,0,f,m,0,0,v,_),s=o.canvas,f=v,m=_,g="prescale1"===g?"prescale2":"prescale1"}if(a.drawImage(s,0,0,f,m,0,-n,i,n),this.imageLayer){var y=this.getCanvasPosition(0,-n);this.imageLayer.appendImage({imgData:t,left:y[0],top:y[1],width:i/r[0],height:n/r[3]})}this.restore()},paintInlineImageXObjectGroup:function(t,i){var n=this.ctx,a=t.width,s=t.height,o=this.cachedCanvases.getCanvas("inlineImage",a,s);e(o.context,t);for(var r=0,c=i.length;r<c;r++){var l=i[r];if(n.save(),n.transform.apply(n,l.transform),n.scale(1,-1),n.drawImage(o.canvas,l.x,l.y,l.w,l.h,0,-1,1,1),this.imageLayer){var d=this.getCanvasPosition(l.x,l.y);this.imageLayer.appendImage({imgData:t,left:d[0],top:d[1],width:a,height:s})}n.restore()}},paintSolidColorImageMask:function(){this.ctx.fillRect(0,0,1,1)},paintXObject:function(){(0,n.warn)("Unsupported 'paintXObject' command.")},markPoint:function(t){},markPointProps:function(t,e){},beginMarkedContent:function(t){},beginMarkedContentProps:function(t,e){},endMarkedContent:function(){},beginCompat:function(){},endCompat:function(){},consumePath:function(){var t=this.ctx;this.pendingClip&&(this.pendingClip===g?t.clip("evenodd"):t.clip(),this.pendingClip=null),t.beginPath()},getSinglePixelWidth(t){if(null===this._cachedGetSinglePixelWidth){const t=this.ctx.mozCurrentTransformInverse;this._cachedGetSinglePixelWidth=Math.sqrt(Math.max(t[0]*t[0]+t[1]*t[1],t[2]*t[2]+t[3]*t[3]))}return this._cachedGetSinglePixelWidth},getCanvasPosition:function(t,e){var i=this.ctx.mozCurrentTransform;return[i[0]*t+i[2]*e+i[4],i[1]*t+i[3]*e+i[5]]}},n.OPS)t.prototype[n.OPS[v]]=t.prototype[v];return t}();e.CanvasGraphics=c},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getShadingPatternFromIR=function(t){var e=a[t[0]];if(!e)throw new Error("Unknown IR type: "+t[0]);return e.fromIR(t)},e.TilingPattern=void 0;var n=i(2),a={};function s(t,e){if(!e||"undefined"==typeof Path2D)return;const i=e[2]-e[0],n=e[3]-e[1],a=new Path2D;a.rect(e[0],e[1],i,n),t.clip(a)}a.RadialAxial={fromIR:function(t){var e=t[1],i=t[2],n=t[3],a=t[4],o=t[5],r=t[6],c=t[7];return{type:"Pattern",getPattern:function(t){var l;s(t,i),"axial"===e?l=t.createLinearGradient(a[0],a[1],o[0],o[1]):"radial"===e&&(l=t.createRadialGradient(a[0],a[1],r,o[0],o[1],c));for(var d=0,h=n.length;d<h;++d){var u=n[d];l.addColorStop(u[0],u[1])}return l}}}};var o=function(){function t(t,e,i,n,a,s,o,r){var c,l=e.coords,d=e.colors,h=t.data,u=4*t.width;l[i+1]>l[n+1]&&(c=i,i=n,n=c,c=s,s=o,o=c),l[n+1]>l[a+1]&&(c=n,n=a,a=c,c=o,o=r,r=c),l[i+1]>l[n+1]&&(c=i,i=n,n=c,c=s,s=o,o=c);var p=(l[i]+e.offsetX)*e.scaleX,b=(l[i+1]+e.offsetY)*e.scaleY,f=(l[n]+e.offsetX)*e.scaleX,m=(l[n+1]+e.offsetY)*e.scaleY,g=(l[a]+e.offsetX)*e.scaleX,v=(l[a+1]+e.offsetY)*e.scaleY;if(!(b>=v))for(var _,y,x,C,O,D,w,M,k=d[s],S=d[s+1],I=d[s+2],P=d[o],V=d[o+1],R=d[o+2],j=d[r],A=d[r+1],W=d[r+2],T=Math.round(b),E=Math.round(v),F=T;F<=E;F++){if(F<m){let t;t=F<b?0:b===m?1:(b-F)/(b-m),_=p-(p-f)*t,y=k-(k-P)*t,x=S-(S-V)*t,C=I-(I-R)*t}else{let t;t=F>v?1:m===v?0:(m-F)/(m-v),_=f-(f-g)*t,y=P-(P-j)*t,x=V-(V-A)*t,C=R-(R-W)*t}let t;t=F<b?0:F>v?1:(b-F)/(b-v),O=p-(p-g)*t,D=k-(k-j)*t,w=S-(S-A)*t,M=I-(I-W)*t;for(var L=Math.round(Math.min(_,O)),Q=Math.round(Math.max(_,O)),N=u*F+4*L,z=L;z<=Q;z++)t=(_-z)/(_-O),t<0?t=0:t>1&&(t=1),h[N++]=y-(y-D)*t|0,h[N++]=x-(x-w)*t|0,h[N++]=C-(C-M)*t|0,h[N++]=255}}function e(e,i,n){var a,s,o=i.coords,r=i.colors;switch(i.type){case"lattice":var c=i.verticesPerRow,l=Math.floor(o.length/c)-1,d=c-1;for(a=0;a<l;a++)for(var h=a*c,u=0;u<d;u++,h++)t(e,n,o[h],o[h+1],o[h+c],r[h],r[h+1],r[h+c]),t(e,n,o[h+c+1],o[h+1],o[h+c],r[h+c+1],r[h+1],r[h+c]);break;case"triangles":for(a=0,s=o.length;a<s;a+=3)t(e,n,o[a],o[a+1],o[a+2],r[a],r[a+1],r[a+2]);break;default:throw new Error("illegal figure")}}return function(t,i,n,a,s,o,r,c){var l,d,h,u,p=Math.floor(t[0]),b=Math.floor(t[1]),f=Math.ceil(t[2])-p,m=Math.ceil(t[3])-b,g=Math.min(Math.ceil(Math.abs(f*i[0]*1.1)),3e3),v=Math.min(Math.ceil(Math.abs(m*i[1]*1.1)),3e3),_=f/g,y=m/v,x={coords:n,colors:a,offsetX:-p,offsetY:-b,scaleX:1/_,scaleY:1/y},C=g+4,O=v+4;if(c.isEnabled)l=c.drawFigures({width:g,height:v,backgroundColor:o,figures:s,context:x}),(d=r.getCanvas("mesh",C,O,!1)).context.drawImage(l,2,2),l=d.canvas;else{var D=(d=r.getCanvas("mesh",C,O,!1)).context,w=D.createImageData(g,v);if(o){var M=w.data;for(h=0,u=M.length;h<u;h+=4)M[h]=o[0],M[h+1]=o[1],M[h+2]=o[2],M[h+3]=255}for(h=0;h<s.length;h++)e(w,s[h],x);D.putImageData(w,2,2),l=d.canvas}return{canvas:l,offsetX:p-2*_,offsetY:b-2*y,scaleX:_,scaleY:y}}}();a.Mesh={fromIR:function(t){var e=t[2],i=t[3],a=t[4],r=t[5],c=t[6],l=t[7],d=t[8];return{type:"Pattern",getPattern:function(t,h,u){var p;if(s(t,l),u)p=n.Util.singularValueDecompose2dScale(t.mozCurrentTransform);else if(p=n.Util.singularValueDecompose2dScale(h.baseTransform),c){var b=n.Util.singularValueDecompose2dScale(c);p=[p[0]*b[0],p[1]*b[1]]}var f=o(r,p,e,i,a,u?null:d,h.cachedCanvases,h.webGLContext);return u||(t.setTransform.apply(t,h.baseTransform),c&&t.transform.apply(t,c)),t.translate(f.offsetX,f.offsetY),t.scale(f.scaleX,f.scaleY),t.createPattern(f.canvas,"no-repeat")}}}},a.Dummy={fromIR:function(){return{type:"Pattern",getPattern:function(){return"hotpink"}}}};var r=function(){function t(t,e,i,n,a){this.operatorList=t[2],this.matrix=t[3]||[1,0,0,1,0,0],this.bbox=t[4],this.xstep=t[5],this.ystep=t[6],this.paintType=t[7],this.tilingType=t[8],this.color=e,this.canvasGraphicsFactory=n,this.baseTransform=a,this.type="Pattern",this.ctx=i}return t.prototype={createPatternCanvas:function(t){var e=this.operatorList,i=this.bbox,a=this.xstep,s=this.ystep,o=this.paintType,r=this.color,c=this.canvasGraphicsFactory;(0,n.info)("TilingType: "+this.tilingType);var l=i[0],d=i[1],h=i[2],u=i[3],p=n.Util.singularValueDecompose2dScale(this.matrix),b=n.Util.singularValueDecompose2dScale(this.baseTransform),f=[p[0]*b[0],p[1]*b[1]],m=this.getSizeAndScale(a,this.ctx.canvas.width,f[0]),g=this.getSizeAndScale(s,this.ctx.canvas.height,f[1]),v=t.cachedCanvases.getCanvas("pattern",m.size,g.size,!0),_=c.createCanvasGraphics(v.context);return _.groupLevel=t.groupLevel,this.setFillAndStrokeStyleToContext(_,o,r),_.transform(m.scale,0,0,g.scale,0,0),_.transform(1,0,0,1,-l,-d),this.clipBbox(_,i,l,d,h,u),_.executeOperatorList(e),this.ctx.transform(1,0,0,1,l,d),this.ctx.scale(1/m.scale,1/g.scale),v.canvas},getSizeAndScale:function(t,e,i){t=Math.abs(t);var n=Math.max(3e3,e),a=Math.ceil(t*i);return a>=n?a=n:i=a/t,{scale:i,size:a}},clipBbox:function(t,e,i,n,a,s){Array.isArray(e)&&4===e.length&&(t.ctx.rect(i,n,a-i,s-n),t.clip(),t.endPath())},setFillAndStrokeStyleToContext:function(t,e,i){const a=t.ctx,s=t.current;switch(e){case 1:var o=this.ctx;a.fillStyle=o.fillStyle,a.strokeStyle=o.strokeStyle,s.fillColor=o.fillStyle,s.strokeColor=o.strokeStyle;break;case 2:var r=n.Util.makeCssRgb(i[0],i[1],i[2]);a.fillStyle=r,a.strokeStyle=r,s.fillColor=r,s.strokeColor=r;break;default:throw new n.FormatError("Unsupported paint type: "+e)}},getPattern:function(t,e){(t=this.ctx).setTransform.apply(t,this.baseTransform),t.transform.apply(t,this.matrix);var i=this.createPatternCanvas(e);return t.createPattern(i,"repeat")}},t}();e.TilingPattern=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlobalWorkerOptions=void 0;const n=Object.create(null);e.GlobalWorkerOptions=n,n.workerPort=void 0===n.workerPort?null:n.workerPort,n.workerSrc=void 0===n.workerSrc?"":n.workerSrc},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MessageHandler=void 0;var n=i(2);function a(t){if("object"!=typeof t||null===t)return t;switch(t.name){case"AbortException":return new n.AbortException(t.message);case"MissingPDFException":return new n.MissingPDFException(t.message);case"UnexpectedResponseException":return new n.UnexpectedResponseException(t.message,t.status);case"UnknownErrorException":return new n.UnknownErrorException(t.message,t.details);default:return new n.UnknownErrorException(t.message,t.toString())}}e.MessageHandler=class{constructor(t,e,i){this.sourceName=t,this.targetName=e,this.comObj=i,this.callbackId=1,this.streamId=1,this.postMessageTransfers=!0,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=t=>{const e=t.data;if(e.targetName!==this.sourceName)return;if(e.stream)return void this._processStreamMessage(e);if(e.callback){const t=e.callbackId,i=this.callbackCapabilities[t];if(!i)throw new Error("Cannot resolve callback "+t);if(delete this.callbackCapabilities[t],1===e.callback)i.resolve(e.data);else{if(2!==e.callback)throw new Error("Unexpected callback case");i.reject(a(e.reason))}return}const n=this.actionHandler[e.action];if(!n)throw new Error("Unknown action from worker: "+e.action);if(e.callbackId){const t=this.sourceName,s=e.sourceName;new Promise((function(t){t(n(e.data))})).then((function(n){i.postMessage({sourceName:t,targetName:s,callback:1,callbackId:e.callbackId,data:n})}),(function(n){i.postMessage({sourceName:t,targetName:s,callback:2,callbackId:e.callbackId,reason:a(n)})}))}else e.streamId?this._createStreamSink(e):n(e.data)},i.addEventListener("message",this._onComObjOnMessage)}on(t,e){const i=this.actionHandler;if(i[t])throw new Error(`There is already an actionName called "${t}"`);i[t]=e}send(t,e,i){this._postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,data:e},i)}sendWithPromise(t,e,i){const a=this.callbackId++,s=(0,n.createPromiseCapability)();this.callbackCapabilities[a]=s;try{this._postMessage({sourceName:this.sourceName,targetName:this.targetName,action:t,callbackId:a,data:e},i)}catch(o){s.reject(o)}return s.promise}sendWithStream(t,e,i,s){const o=this.streamId++,r=this.sourceName,c=this.targetName,l=this.comObj;return new ReadableStream({start:i=>{const a=(0,n.createPromiseCapability)();return this.streamControllers[o]={controller:i,startCall:a,pullCall:null,cancelCall:null,isClosed:!1},this._postMessage({sourceName:r,targetName:c,action:t,streamId:o,data:e,desiredSize:i.desiredSize},s),a.promise},pull:t=>{const e=(0,n.createPromiseCapability)();return this.streamControllers[o].pullCall=e,l.postMessage({sourceName:r,targetName:c,stream:6,streamId:o,desiredSize:t.desiredSize}),e.promise},cancel:t=>{(0,n.assert)(t instanceof Error,"cancel must have a valid reason");const e=(0,n.createPromiseCapability)();return this.streamControllers[o].cancelCall=e,this.streamControllers[o].isClosed=!0,l.postMessage({sourceName:r,targetName:c,stream:1,streamId:o,reason:a(t)}),e.promise}},i)}_createStreamSink(t){const e=this,i=this.actionHandler[t.action],s=t.streamId,o=this.sourceName,r=t.sourceName,c=this.comObj,l={enqueue(t,i=1,a){if(this.isCancelled)return;const c=this.desiredSize;this.desiredSize-=i,c>0&&this.desiredSize<=0&&(this.sinkCapability=(0,n.createPromiseCapability)(),this.ready=this.sinkCapability.promise),e._postMessage({sourceName:o,targetName:r,stream:4,streamId:s,chunk:t},a)},close(){this.isCancelled||(this.isCancelled=!0,c.postMessage({sourceName:o,targetName:r,stream:3,streamId:s}),delete e.streamSinks[s])},error(t){(0,n.assert)(t instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,c.postMessage({sourceName:o,targetName:r,stream:5,streamId:s,reason:a(t)}))},sinkCapability:(0,n.createPromiseCapability)(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:t.desiredSize,ready:null};l.sinkCapability.resolve(),l.ready=l.sinkCapability.promise,this.streamSinks[s]=l,new Promise((function(e){e(i(t.data,l))})).then((function(){c.postMessage({sourceName:o,targetName:r,stream:8,streamId:s,success:!0})}),(function(t){c.postMessage({sourceName:o,targetName:r,stream:8,streamId:s,reason:a(t)})}))}_processStreamMessage(t){const e=t.streamId,i=this.sourceName,s=t.sourceName,o=this.comObj;switch(t.stream){case 8:t.success?this.streamControllers[e].startCall.resolve():this.streamControllers[e].startCall.reject(a(t.reason));break;case 7:t.success?this.streamControllers[e].pullCall.resolve():this.streamControllers[e].pullCall.reject(a(t.reason));break;case 6:if(!this.streamSinks[e]){o.postMessage({sourceName:i,targetName:s,stream:7,streamId:e,success:!0});break}this.streamSinks[e].desiredSize<=0&&t.desiredSize>0&&this.streamSinks[e].sinkCapability.resolve(),this.streamSinks[e].desiredSize=t.desiredSize;const{onPull:r}=this.streamSinks[t.streamId];new Promise((function(t){t(r&&r())})).then((function(){o.postMessage({sourceName:i,targetName:s,stream:7,streamId:e,success:!0})}),(function(t){o.postMessage({sourceName:i,targetName:s,stream:7,streamId:e,reason:a(t)})}));break;case 4:if((0,n.assert)(this.streamControllers[e],"enqueue should have stream controller"),this.streamControllers[e].isClosed)break;this.streamControllers[e].controller.enqueue(t.chunk);break;case 3:if((0,n.assert)(this.streamControllers[e],"close should have stream controller"),this.streamControllers[e].isClosed)break;this.streamControllers[e].isClosed=!0,this.streamControllers[e].controller.close(),this._deleteStreamController(e);break;case 5:(0,n.assert)(this.streamControllers[e],"error should have stream controller"),this.streamControllers[e].controller.error(a(t.reason)),this._deleteStreamController(e);break;case 2:t.success?this.streamControllers[e].cancelCall.resolve():this.streamControllers[e].cancelCall.reject(a(t.reason)),this._deleteStreamController(e);break;case 1:if(!this.streamSinks[e])break;const{onCancel:c}=this.streamSinks[t.streamId];new Promise((function(e){e(c&&c(a(t.reason)))})).then((function(){o.postMessage({sourceName:i,targetName:s,stream:2,streamId:e,success:!0})}),(function(t){o.postMessage({sourceName:i,targetName:s,stream:2,streamId:e,reason:a(t)})})),this.streamSinks[e].sinkCapability.reject(a(t.reason)),this.streamSinks[e].isCancelled=!0,delete this.streamSinks[e];break;default:throw new Error("Unexpected stream case")}}async _deleteStreamController(t){await Promise.allSettled([this.streamControllers[t].startCall,this.streamControllers[t].pullCall,this.streamControllers[t].cancelCall].map((function(t){return t&&t.promise}))),delete this.streamControllers[t]}_postMessage(t,e){e&&this.postMessageTransfers?this.comObj.postMessage(t,e):this.comObj.postMessage(t)}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Metadata=void 0;var n=i(2),a=i(13);e.Metadata=class{constructor(t){(0,n.assert)("string"==typeof t,"Metadata: input is not a string"),t=this._repair(t);const e=(new a.SimpleXMLParser).parseFromString(t);this._metadataMap=new Map,e&&this._parse(e)}_repair(t){return t.replace(/^[^<]+/,"").replace(/>\\376\\377([^<]+)/g,(function(t,e){const i=e.replace(/\\([0-3])([0-7])([0-7])/g,(function(t,e,i,n){return String.fromCharCode(64*e+8*i+1*n)})).replace(/&(amp|apos|gt|lt|quot);/g,(function(t,e){switch(e){case"amp":return"&";case"apos":return"'";case"gt":return">";case"lt":return"<";case"quot":return'"'}throw new Error(`_repair: ${e} isn't defined.`)}));let n="";for(let a=0,s=i.length;a<s;a+=2){const t=256*i.charCodeAt(a)+i.charCodeAt(a+1);n+=t>=32&&t<127&&60!==t&&62!==t&&38!==t?String.fromCharCode(t):"&#x"+(65536+t).toString(16).substring(1)+";"}return">"+n}))}_parse(t){let e=t.documentElement;if("rdf:rdf"!==e.nodeName.toLowerCase())for(e=e.firstChild;e&&"rdf:rdf"!==e.nodeName.toLowerCase();)e=e.nextSibling;const i=e?e.nodeName.toLowerCase():null;if(!e||"rdf:rdf"!==i||!e.hasChildNodes())return;const n=e.childNodes;for(let a=0,s=n.length;a<s;a++){const t=n[a];if("rdf:description"===t.nodeName.toLowerCase())for(let e=0,i=t.childNodes.length;e<i;e++)if("#text"!==t.childNodes[e].nodeName.toLowerCase()){const i=t.childNodes[e],n=i.nodeName.toLowerCase();this._metadataMap.set(n,i.textContent.trim())}}}get(t){return this._metadataMap.has(t)?this._metadataMap.get(t):null}getAll(){const t=Object.create(null);for(const[e,i]of this._metadataMap)t[e]=i;return t}has(t){return this._metadataMap.has(t)}}},function(t,e,i){"use strict";function n(t,e){const i=t[e];return" "===i||"\n"===i||"\r"===i||"\t"===i}Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleXMLParser=void 0;class a{constructor(t,e){this.nodeName=t,this.nodeValue=e,Object.defineProperty(this,"parentNode",{value:null,writable:!0})}get firstChild(){return this.childNodes&&this.childNodes[0]}get nextSibling(){const t=this.parentNode.childNodes;if(!t)return;const e=t.indexOf(this);return-1!==e?t[e+1]:void 0}get textContent(){return this.childNodes?this.childNodes.map((function(t){return t.textContent})).join(""):this.nodeValue||""}hasChildNodes(){return this.childNodes&&this.childNodes.length>0}}e.SimpleXMLParser=class extends class{_resolveEntities(t){return t.replace(/&([^;]+);/g,(t,e)=>{if("#x"===e.substring(0,2))return String.fromCharCode(parseInt(e.substring(2),16));if("#"===e.substring(0,1))return String.fromCharCode(parseInt(e.substring(1),10));switch(e){case"lt":return"<";case"gt":return">";case"amp":return"&";case"quot":return'"'}return this.onResolveEntity(e)})}_parseContent(t,e){const i=[];let a=e;function s(){for(;a<t.length&&n(t,a);)++a}for(;a<t.length&&!n(t,a)&&">"!==t[a]&&"/"!==t[a];)++a;const o=t.substring(e,a);for(s();a<t.length&&">"!==t[a]&&"/"!==t[a]&&"?"!==t[a];){s();let e="",o="";for(;a<t.length&&!n(t,a)&&"="!==t[a];)e+=t[a],++a;if(s(),"="!==t[a])return null;++a,s();const r=t[a];if('"'!==r&&"'"!==r)return null;const c=t.indexOf(r,++a);if(c<0)return null;o=t.substring(a,c),i.push({name:e,value:this._resolveEntities(o)}),a=c+1,s()}return{name:o,attributes:i,parsed:a-e}}_parseProcessingInstruction(t,e){let i=e;for(;i<t.length&&!n(t,i)&&">"!==t[i]&&"/"!==t[i];)++i;const a=t.substring(e,i);!function(){for(;i<t.length&&n(t,i);)++i}();const s=i;for(;i<t.length&&("?"!==t[i]||">"!==t[i+1]);)++i;return{name:a,value:t.substring(s,i),parsed:i-e}}parseXml(t){let e=0;for(;e<t.length;){let i=e;if("<"===t[e]){let e;switch(++i,t[i]){case"/":if(++i,e=t.indexOf(">",i),e<0)return void this.onError(-9);this.onEndElement(t.substring(i,e)),i=e+1;break;case"?":++i;const n=this._parseProcessingInstruction(t,i);if("?>"!==t.substring(i+n.parsed,i+n.parsed+2))return void this.onError(-3);this.onPi(n.name,n.value),i+=n.parsed+2;break;case"!":if("--"===t.substring(i+1,i+3)){if(e=t.indexOf("--\x3e",i+3),e<0)return void this.onError(-5);this.onComment(t.substring(i+3,e)),i=e+3}else if("[CDATA["===t.substring(i+1,i+8)){if(e=t.indexOf("]]>",i+8),e<0)return void this.onError(-2);this.onCdata(t.substring(i+8,e)),i=e+3}else{if("DOCTYPE"!==t.substring(i+1,i+8))return void this.onError(-6);{const n=t.indexOf("[",i+8);let a=!1;if(e=t.indexOf(">",i+8),e<0)return void this.onError(-4);if(n>0&&e>n){if(e=t.indexOf("]>",i+8),e<0)return void this.onError(-4);a=!0}const s=t.substring(i+8,e+(a?1:0));this.onDoctype(s),i=e+(a?2:1)}}break;default:const a=this._parseContent(t,i);if(null===a)return void this.onError(-6);let s=!1;if("/>"===t.substring(i+a.parsed,i+a.parsed+2))s=!0;else if(">"!==t.substring(i+a.parsed,i+a.parsed+1))return void this.onError(-9);this.onBeginElement(a.name,a.attributes,s),i+=a.parsed+(s?2:1)}}else{for(;i<t.length&&"<"!==t[i];)i++;const n=t.substring(e,i);this.onText(this._resolveEntities(n))}e=i}}onResolveEntity(t){return`&${t};`}onPi(t,e){}onComment(t){}onCdata(t){}onDoctype(t){}onText(t){}onBeginElement(t,e,i){}onEndElement(t){}onError(t){}}{constructor(){super(),this._currentFragment=null,this._stack=null,this._errorCode=0}parseFromString(t){if(this._currentFragment=[],this._stack=[],this._errorCode=0,this.parseXml(t),0!==this._errorCode)return;const[e]=this._currentFragment;return e?{documentElement:e}:void 0}onResolveEntity(t){switch(t){case"apos":return"'"}return super.onResolveEntity(t)}onText(t){if(function(t){for(let e=0,i=t.length;e<i;e++)if(!n(t,e))return!1;return!0}(t))return;const e=new a("#text",t);this._currentFragment.push(e)}onCdata(t){const e=new a("#text",t);this._currentFragment.push(e)}onBeginElement(t,e,i){const n=new a(t);n.childNodes=[],this._currentFragment.push(n),i||(this._stack.push(this._currentFragment),this._currentFragment=n.childNodes)}onEndElement(t){this._currentFragment=this._stack.pop()||[];const e=this._currentFragment[this._currentFragment.length-1];if(e)for(let i=0,n=e.childNodes.length;i<n;i++)e.childNodes[i].parentNode=e}onError(t){this._errorCode=t}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PDFDataTransportStream=void 0;var n=i(2);e.PDFDataTransportStream=class{constructor(t,e){(0,n.assert)(e,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=t.progressiveDone||!1;const i=t.initialData;if(i&&i.length>0){const t=new Uint8Array(i).buffer;this._queuedChunks.push(t)}this._pdfDataRangeTransport=e,this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._contentLength=t.length,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener((t,e)=>{this._onReceiveData({begin:t,chunk:e})}),this._pdfDataRangeTransport.addProgressListener((t,e)=>{this._onProgress({loaded:t,total:e})}),this._pdfDataRangeTransport.addProgressiveReadListener(t=>{this._onReceiveData({chunk:t})}),this._pdfDataRangeTransport.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),this._pdfDataRangeTransport.transportReady()}_onReceiveData(t){const e=new Uint8Array(t.chunk).buffer;if(void 0===t.begin)this._fullRequestReader?this._fullRequestReader._enqueue(e):this._queuedChunks.push(e);else{const i=this._rangeReaders.some((function(i){return i._begin===t.begin&&(i._enqueue(e),!0)}));(0,n.assert)(i,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){return this._fullRequestReader?this._fullRequestReader._loaded:0}_onProgress(t){if(void 0===t.total){const e=this._rangeReaders[0];e&&e.onProgress&&e.onProgress({loaded:t.loaded})}else{const e=this._fullRequestReader;e&&e.onProgress&&e.onProgress({loaded:t.loaded,total:t.total})}}_onProgressiveDone(){this._fullRequestReader&&this._fullRequestReader.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(t){const e=this._rangeReaders.indexOf(t);e>=0&&this._rangeReaders.splice(e,1)}getFullReader(){(0,n.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const t=this._queuedChunks;return this._queuedChunks=null,new a(this,t,this._progressiveDone)}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;const i=new s(this,t,e);return this._pdfDataRangeTransport.requestDataRange(t,e),this._rangeReaders.push(i),i}cancelAllRequests(t){this._fullRequestReader&&this._fullRequestReader.cancel(t),this._rangeReaders.slice(0).forEach((function(e){e.cancel(t)})),this._pdfDataRangeTransport.abort()}};class a{constructor(t,e,i=!1){this._stream=t,this._done=i||!1,this._filename=null,this._queuedChunks=e||[],this._loaded=0;for(const n of this._queuedChunks)this._loaded+=n.byteLength;this._requests=[],this._headersReady=Promise.resolve(),t._fullRequestReader=this,this.onProgress=null}_enqueue(t){this._done||(this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunks.push(t),this._loaded+=t.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const t=(0,n.createPromiseCapability)();return this._requests.push(t),t.promise}cancel(t){this._done=!0,this._requests.forEach((function(t){t.resolve({value:void 0,done:!0})})),this._requests=[]}progressiveDone(){this._done||(this._done=!0)}}class s{constructor(t,e,i){this._stream=t,this._begin=e,this._end=i,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(t){this._done||(0===this._requests.length?this._queuedChunk=t:(this._requests.shift().resolve({value:t,done:!1}),this._requests.forEach((function(t){t.resolve({value:void 0,done:!0})})),this._requests=[]),this._done=!0,this._stream._removeRangeReader(this))}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const t=this._queuedChunk;return this._queuedChunk=null,{value:t,done:!1}}if(this._done)return{value:void 0,done:!0};const t=(0,n.createPromiseCapability)();return this._requests.push(t),t.promise}cancel(t){this._done=!0,this._requests.forEach((function(t){t.resolve({value:void 0,done:!0})})),this._requests=[],this._stream._removeRangeReader(this)}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebGLContext=void 0;var n=i(2);e.WebGLContext=class{constructor({enable:t=!1}){this._enabled=!0===t}get isEnabled(){let t=this._enabled;return t&&(t=a.tryInitGL()),(0,n.shadow)(this,"isEnabled",t)}composeSMask({layer:t,mask:e,properties:i}){return a.composeSMask(t,e,i)}drawFigures({width:t,height:e,backgroundColor:i,figures:n,context:s}){return a.drawFigures(t,e,i,n,s)}clear(){a.cleanup()}};var a=function(){function t(t,e,i){var n=t.createShader(i);if(t.shaderSource(n,e),t.compileShader(n),!t.getShaderParameter(n,t.COMPILE_STATUS)){var a=t.getShaderInfoLog(n);throw new Error("Error during shader compilation: "+a)}return n}function e(e,i){return t(e,i,e.VERTEX_SHADER)}function i(e,i){return t(e,i,e.FRAGMENT_SHADER)}function n(t,e){for(var i=t.createProgram(),n=0,a=e.length;n<a;++n)t.attachShader(i,e[n]);if(t.linkProgram(i),!t.getProgramParameter(i,t.LINK_STATUS)){var s=t.getProgramInfoLog(i);throw new Error("Error during program linking: "+s)}return i}function a(t,e,i){t.activeTexture(i);var n=t.createTexture();return t.bindTexture(t.TEXTURE_2D,n),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e),n}var s,o;function r(){s||(o=document.createElement("canvas"),s=o.getContext("webgl",{premultipliedalpha:!1}))}var c=null,l=null;return{tryInitGL(){try{return r(),!!s}catch(t){}return!1},composeSMask:function(t,l,d){var h=t.width,u=t.height;c||function(){var t,a;r(),t=o,o=null,a=s,s=null;var l=n(a,[e(a," attribute vec2 a_position; attribute vec2 a_texCoord; uniform vec2 u_resolution; varying vec2 v_texCoord; void main() { vec2 clipSpace = (a_position / u_resolution) * 2.0 - 1.0; gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); v_texCoord = a_texCoord; } "),i(a," precision mediump float; uniform vec4 u_backdrop; uniform int u_subtype; uniform sampler2D u_image; uniform sampler2D u_mask; varying vec2 v_texCoord; void main() { vec4 imageColor = texture2D(u_image, v_texCoord); vec4 maskColor = texture2D(u_mask, v_texCoord); if (u_backdrop.a > 0.0) { maskColor.rgb = maskColor.rgb * maskColor.a + u_backdrop.rgb * (1.0 - maskColor.a); } float lum; if (u_subtype == 0) { lum = maskColor.a; } else { lum = maskColor.r * 0.3 + maskColor.g * 0.59 + maskColor.b * 0.11; } imageColor.a *= lum; imageColor.rgb *= imageColor.a; gl_FragColor = imageColor; } ")]);a.useProgram(l);var d={};d.gl=a,d.canvas=t,d.resolutionLocation=a.getUniformLocation(l,"u_resolution"),d.positionLocation=a.getAttribLocation(l,"a_position"),d.backdropLocation=a.getUniformLocation(l,"u_backdrop"),d.subtypeLocation=a.getUniformLocation(l,"u_subtype");var h=a.getAttribLocation(l,"a_texCoord"),u=a.getUniformLocation(l,"u_image"),p=a.getUniformLocation(l,"u_mask"),b=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,b),a.bufferData(a.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1]),a.STATIC_DRAW),a.enableVertexAttribArray(h),a.vertexAttribPointer(h,2,a.FLOAT,!1,0,0),a.uniform1i(u,0),a.uniform1i(p,1),c=d}();var p=c,b=p.canvas,f=p.gl;b.width=h,b.height=u,f.viewport(0,0,f.drawingBufferWidth,f.drawingBufferHeight),f.uniform2f(p.resolutionLocation,h,u),d.backdrop?f.uniform4f(p.resolutionLocation,d.backdrop[0],d.backdrop[1],d.backdrop[2],1):f.uniform4f(p.resolutionLocation,0,0,0,0),f.uniform1i(p.subtypeLocation,"Luminosity"===d.subtype?1:0);var m=a(f,t,f.TEXTURE0),g=a(f,l,f.TEXTURE1),v=f.createBuffer();return f.bindBuffer(f.ARRAY_BUFFER,v),f.bufferData(f.ARRAY_BUFFER,new Float32Array([0,0,h,0,0,u,0,u,h,0,h,u]),f.STATIC_DRAW),f.enableVertexAttribArray(p.positionLocation),f.vertexAttribPointer(p.positionLocation,2,f.FLOAT,!1,0,0),f.clearColor(0,0,0,0),f.enable(f.BLEND),f.blendFunc(f.ONE,f.ONE_MINUS_SRC_ALPHA),f.clear(f.COLOR_BUFFER_BIT),f.drawArrays(f.TRIANGLES,0,6),f.flush(),f.deleteTexture(m),f.deleteTexture(g),f.deleteBuffer(v),b},drawFigures:function(t,a,c,d,h){l||function(){var t,a;r(),t=o,o=null,a=s,s=null;var c=n(a,[e(a," attribute vec2 a_position; attribute vec3 a_color; uniform vec2 u_resolution; uniform vec2 u_scale; uniform vec2 u_offset; varying vec4 v_color; void main() { vec2 position = (a_position + u_offset) * u_scale; vec2 clipSpace = (position / u_resolution) * 2.0 - 1.0; gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); v_color = vec4(a_color / 255.0, 1.0); } "),i(a," precision mediump float; varying vec4 v_color; void main() { gl_FragColor = v_color; } ")]);a.useProgram(c);var d={};d.gl=a,d.canvas=t,d.resolutionLocation=a.getUniformLocation(c,"u_resolution"),d.scaleLocation=a.getUniformLocation(c,"u_scale"),d.offsetLocation=a.getUniformLocation(c,"u_offset"),d.positionLocation=a.getAttribLocation(c,"a_position"),d.colorLocation=a.getAttribLocation(c,"a_color"),l=d}();var u=l,p=u.canvas,b=u.gl;p.width=t,p.height=a,b.viewport(0,0,b.drawingBufferWidth,b.drawingBufferHeight),b.uniform2f(u.resolutionLocation,t,a);var f,m,g,v=0;for(f=0,m=d.length;f<m;f++)switch(d[f].type){case"lattice":v+=((g=d[f].coords.length/d[f].verticesPerRow|0)-1)*(d[f].verticesPerRow-1)*6;break;case"triangles":v+=d[f].coords.length}var _=new Float32Array(2*v),y=new Uint8Array(3*v),x=h.coords,C=h.colors,O=0,D=0;for(f=0,m=d.length;f<m;f++){var w=d[f],M=w.coords,k=w.colors;switch(w.type){case"lattice":var S=w.verticesPerRow;g=M.length/S|0;for(var I=1;I<g;I++)for(var P=I*S+1,V=1;V<S;V++,P++)_[O]=x[M[P-S-1]],_[O+1]=x[M[P-S-1]+1],_[O+2]=x[M[P-S]],_[O+3]=x[M[P-S]+1],_[O+4]=x[M[P-1]],_[O+5]=x[M[P-1]+1],y[D]=C[k[P-S-1]],y[D+1]=C[k[P-S-1]+1],y[D+2]=C[k[P-S-1]+2],y[D+3]=C[k[P-S]],y[D+4]=C[k[P-S]+1],y[D+5]=C[k[P-S]+2],y[D+6]=C[k[P-1]],y[D+7]=C[k[P-1]+1],y[D+8]=C[k[P-1]+2],_[O+6]=_[O+2],_[O+7]=_[O+3],_[O+8]=_[O+4],_[O+9]=_[O+5],_[O+10]=x[M[P]],_[O+11]=x[M[P]+1],y[D+9]=y[D+3],y[D+10]=y[D+4],y[D+11]=y[D+5],y[D+12]=y[D+6],y[D+13]=y[D+7],y[D+14]=y[D+8],y[D+15]=C[k[P]],y[D+16]=C[k[P]+1],y[D+17]=C[k[P]+2],O+=12,D+=18;break;case"triangles":for(var R=0,j=M.length;R<j;R++)_[O]=x[M[R]],_[O+1]=x[M[R]+1],y[D]=C[k[R]],y[D+1]=C[k[R]+1],y[D+2]=C[k[R]+2],O+=2,D+=3}}c?b.clearColor(c[0]/255,c[1]/255,c[2]/255,1):b.clearColor(0,0,0,0),b.clear(b.COLOR_BUFFER_BIT);var A=b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER,A),b.bufferData(b.ARRAY_BUFFER,_,b.STATIC_DRAW),b.enableVertexAttribArray(u.positionLocation),b.vertexAttribPointer(u.positionLocation,2,b.FLOAT,!1,0,0);var W=b.createBuffer();return b.bindBuffer(b.ARRAY_BUFFER,W),b.bufferData(b.ARRAY_BUFFER,y,b.STATIC_DRAW),b.enableVertexAttribArray(u.colorLocation),b.vertexAttribPointer(u.colorLocation,3,b.UNSIGNED_BYTE,!1,0,0),b.uniform2f(u.scaleLocation,h.scaleX,h.scaleY),b.uniform2f(u.offsetLocation,h.offsetX,h.offsetY),b.drawArrays(b.TRIANGLES,0,v),b.flush(),b.deleteBuffer(A),b.deleteBuffer(W),p},cleanup(){c&&c.canvas&&(c.canvas.width=0,c.canvas.height=0),l&&l.canvas&&(l.canvas.width=0,l.canvas.height=0),c=null,l=null}}}()},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AnnotationLayer=void 0;var n=i(1),a=i(2);class s{static create(t){switch(t.data.annotationType){case a.AnnotationType.LINK:return new r(t);case a.AnnotationType.TEXT:return new c(t);case a.AnnotationType.WIDGET:switch(t.data.fieldType){case"Tx":return new d(t);case"Btn":return t.data.radioButton?new u(t):t.data.checkBox?new h(t):new p(t);case"Ch":return new b(t)}return new l(t);case a.AnnotationType.POPUP:return new f(t);case a.AnnotationType.FREETEXT:return new g(t);case a.AnnotationType.LINE:return new v(t);case a.AnnotationType.SQUARE:return new _(t);case a.AnnotationType.CIRCLE:return new y(t);case a.AnnotationType.POLYLINE:return new x(t);case a.AnnotationType.CARET:return new O(t);case a.AnnotationType.INK:return new D(t);case a.AnnotationType.POLYGON:return new C(t);case a.AnnotationType.HIGHLIGHT:return new w(t);case a.AnnotationType.UNDERLINE:return new M(t);case a.AnnotationType.SQUIGGLY:return new k(t);case a.AnnotationType.STRIKEOUT:return new S(t);case a.AnnotationType.STAMP:return new I(t);case a.AnnotationType.FILEATTACHMENT:return new P(t);default:return new o(t)}}}class o{constructor(t,e=!1,i=!1){this.isRenderable=e,this.data=t.data,this.layer=t.layer,this.page=t.page,this.viewport=t.viewport,this.linkService=t.linkService,this.downloadManager=t.downloadManager,this.imageResourcesPath=t.imageResourcesPath,this.renderInteractiveForms=t.renderInteractiveForms,this.svgFactory=t.svgFactory,e&&(this.container=this._createContainer(i))}_createContainer(t=!1){const e=this.data,i=this.page,n=this.viewport,s=document.createElement("section");let o=e.rect[2]-e.rect[0],r=e.rect[3]-e.rect[1];s.setAttribute("data-annotation-id",e.id);const c=a.Util.normalizeRect([e.rect[0],i.view[3]-e.rect[1]+i.view[1],e.rect[2],i.view[3]-e.rect[3]+i.view[1]]);if(s.style.transform=`matrix(${n.transform.join(",")})`,s.style.transformOrigin=`-${c[0]}px -${c[1]}px`,!t&&e.borderStyle.width>0){s.style.borderWidth=e.borderStyle.width+"px",e.borderStyle.style!==a.AnnotationBorderStyleType.UNDERLINE&&(o-=2*e.borderStyle.width,r-=2*e.borderStyle.width);const t=e.borderStyle.horizontalCornerRadius,i=e.borderStyle.verticalCornerRadius;switch((t>0||i>0)&&(s.style.borderRadius=`${t}px / ${i}px`),e.borderStyle.style){case a.AnnotationBorderStyleType.SOLID:s.style.borderStyle="solid";break;case a.AnnotationBorderStyleType.DASHED:s.style.borderStyle="dashed";break;case a.AnnotationBorderStyleType.BEVELED:(0,a.warn)("Unimplemented border style: beveled");break;case a.AnnotationBorderStyleType.INSET:(0,a.warn)("Unimplemented border style: inset");break;case a.AnnotationBorderStyleType.UNDERLINE:s.style.borderBottomStyle="solid"}e.color?s.style.borderColor=a.Util.makeCssRgb(0|e.color[0],0|e.color[1],0|e.color[2]):s.style.borderWidth=0}return s.style.left=c[0]+"px",s.style.top=c[1]+"px",s.style.width=o+"px",s.style.height=r+"px",s}_createPopup(t,e,i){e||((e=document.createElement("div")).style.height=t.style.height,e.style.width=t.style.width,t.appendChild(e));const n=new m({container:t,trigger:e,color:i.color,title:i.title,modificationDate:i.modificationDate,contents:i.contents,hideWrapper:!0}).render();n.style.left=t.style.width,t.appendChild(n)}render(){(0,a.unreachable)("Abstract method `AnnotationElement.render` called")}}class r extends o{constructor(t){super(t,!!(t.data.url||t.data.dest||t.data.action))}render(){this.container.className="linkAnnotation";const{data:t,linkService:e}=this,i=document.createElement("a");return t.url?(0,n.addLinkAttributes)(i,{url:t.url,target:t.newWindow?n.LinkTarget.BLANK:e.externalLinkTarget,rel:e.externalLinkRel,enabled:e.externalLinkEnabled}):t.action?this._bindNamedAction(i,t.action):this._bindLink(i,t.dest),this.container.appendChild(i),this.container}_bindLink(t,e){t.href=this.linkService.getDestinationHash(e),t.onclick=()=>(e&&this.linkService.navigateTo(e),!1),e&&(t.className="internalLink")}_bindNamedAction(t,e){t.href=this.linkService.getAnchorUrl(""),t.onclick=()=>(this.linkService.executeNamedAction(e),!1),t.className="internalLink"}}class c extends o{constructor(t){super(t,!!(t.data.hasPopup||t.data.title||t.data.contents))}render(){this.container.className="textAnnotation";const t=document.createElement("img");return t.style.height=this.container.style.height,t.style.width=this.container.style.width,t.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",t.alt="[{{type}} Annotation]",t.dataset.l10nId="text_annotation_type",t.dataset.l10nArgs=JSON.stringify({type:this.data.name}),this.data.hasPopup||this._createPopup(this.container,t,this.data),this.container.appendChild(t),this.container}}class l extends o{render(){return this.container}}class d extends l{constructor(t){super(t,t.renderInteractiveForms||!t.data.hasAppearance&&!!t.data.fieldValue)}render(){this.container.className="textWidgetAnnotation";let t=null;if(this.renderInteractiveForms){if(this.data.multiLine?(t=document.createElement("textarea"),t.textContent=this.data.fieldValue):(t=document.createElement("input"),t.type="text",t.setAttribute("value",this.data.fieldValue)),t.disabled=this.data.readOnly,t.name=this.data.fieldName,null!==this.data.maxLen&&(t.maxLength=this.data.maxLen),this.data.comb){const e=(this.data.rect[2]-this.data.rect[0])/this.data.maxLen;t.classList.add("comb"),t.style.letterSpacing=`calc(${e}px - 1ch)`}}else{t=document.createElement("div"),t.textContent=this.data.fieldValue,t.style.verticalAlign="middle",t.style.display="table-cell";let e=null;this.data.fontRefName&&this.page.commonObjs.has(this.data.fontRefName)&&(e=this.page.commonObjs.get(this.data.fontRefName)),this._setTextStyle(t,e)}return null!==this.data.textAlignment&&(t.style.textAlign=["left","center","right"][this.data.textAlignment]),this.container.appendChild(t),this.container}_setTextStyle(t,e){const i=t.style;if(i.fontSize=this.data.fontSize+"px",i.direction=this.data.fontDirection<0?"rtl":"ltr",!e)return;let n="normal";e.black?n="900":e.bold&&(n="bold"),i.fontWeight=n,i.fontStyle=e.italic?"italic":"normal",i.fontFamily=(e.loadedName?`"${e.loadedName}", `:"")+(e.fallbackName||"Helvetica, sans-serif")}}class h extends l{constructor(t){super(t,t.renderInteractiveForms)}render(){this.container.className="buttonWidgetAnnotation checkBox";const t=document.createElement("input");return t.disabled=this.data.readOnly,t.type="checkbox",t.name=this.data.fieldName,this.data.fieldValue&&"Off"!==this.data.fieldValue&&t.setAttribute("checked",!0),this.container.appendChild(t),this.container}}class u extends l{constructor(t){super(t,t.renderInteractiveForms)}render(){this.container.className="buttonWidgetAnnotation radioButton";const t=document.createElement("input");return t.disabled=this.data.readOnly,t.type="radio",t.name=this.data.fieldName,this.data.fieldValue===this.data.buttonValue&&t.setAttribute("checked",!0),this.container.appendChild(t),this.container}}class p extends r{render(){const t=super.render();return t.className="buttonWidgetAnnotation pushButton",t}}class b extends l{constructor(t){super(t,t.renderInteractiveForms)}render(){this.container.className="choiceWidgetAnnotation";const t=document.createElement("select");t.disabled=this.data.readOnly,t.name=this.data.fieldName,this.data.combo||(t.size=this.data.options.length,this.data.multiSelect&&(t.multiple=!0));for(const e of this.data.options){const i=document.createElement("option");i.textContent=e.displayValue,i.value=e.exportValue,this.data.fieldValue.includes(e.displayValue)&&i.setAttribute("selected",!0),t.appendChild(i)}return this.container.appendChild(t),this.container}}class f extends o{constructor(t){super(t,!(!t.data.title&&!t.data.contents))}render(){if(this.container.className="popupAnnotation",["Line","Square","Circle","PolyLine","Polygon","Ink"].includes(this.data.parentType))return this.container;const t=this.layer.querySelector(`[data-annotation-id="${this.data.parentId}"]`);if(!t)return this.container;const e=new m({container:this.container,trigger:t,color:this.data.color,title:this.data.title,modificationDate:this.data.modificationDate,contents:this.data.contents}),i=parseFloat(t.style.left),n=parseFloat(t.style.width);return this.container.style.transformOrigin=`-${i+n}px -${t.style.top}`,this.container.style.left=i+n+"px",this.container.appendChild(e.render()),this.container}}class m{constructor(t){this.container=t.container,this.trigger=t.trigger,this.color=t.color,this.title=t.title,this.modificationDate=t.modificationDate,this.contents=t.contents,this.hideWrapper=t.hideWrapper||!1,this.pinned=!1}render(){const t=document.createElement("div");t.className="popupWrapper",this.hideElement=this.hideWrapper?t:this.container,this.hideElement.setAttribute("hidden",!0);const e=document.createElement("div");e.className="popup";const i=this.color;i&&(e.style.backgroundColor=a.Util.makeCssRgb(0|.7*(255-i[0])+i[0],0|.7*(255-i[1])+i[1],0|.7*(255-i[2])+i[2]));const s=document.createElement("h1");s.textContent=this.title,e.appendChild(s);const o=n.PDFDateString.toDateObject(this.modificationDate);if(o){const t=document.createElement("span");t.textContent="{{date}}, {{time}}",t.dataset.l10nId="annotation_date_string",t.dataset.l10nArgs=JSON.stringify({date:o.toLocaleDateString(),time:o.toLocaleTimeString()}),e.appendChild(t)}const r=this._formatContents(this.contents);return e.appendChild(r),this.trigger.addEventListener("click",this._toggle.bind(this)),this.trigger.addEventListener("mouseover",this._show.bind(this,!1)),this.trigger.addEventListener("mouseout",this._hide.bind(this,!1)),e.addEventListener("click",this._hide.bind(this,!0)),t.appendChild(e),t}_formatContents(t){const e=document.createElement("p"),i=t.split(/(?:\r\n?|\n)/);for(let n=0,a=i.length;n<a;++n)e.appendChild(document.createTextNode(i[n])),n<a-1&&e.appendChild(document.createElement("br"));return e}_toggle(){this.pinned?this._hide(!0):this._show(!0)}_show(t=!1){t&&(this.pinned=!0),this.hideElement.hasAttribute("hidden")&&(this.hideElement.removeAttribute("hidden"),this.container.style.zIndex+=1)}_hide(t=!0){t&&(this.pinned=!1),this.hideElement.hasAttribute("hidden")||this.pinned||(this.hideElement.setAttribute("hidden",!0),this.container.style.zIndex-=1)}}class g extends o{constructor(t){super(t,!!(t.data.hasPopup||t.data.title||t.data.contents),!0)}render(){return this.container.className="freeTextAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class v extends o{constructor(t){super(t,!!(t.data.hasPopup||t.data.title||t.data.contents),!0)}render(){this.container.className="lineAnnotation";const t=this.data,e=this.svgFactory.create(t.rect[2]-t.rect[0],t.rect[3]-t.rect[1]),i=this.svgFactory.createElement("svg:line");return i.setAttribute("x1",t.rect[2]-t.lineCoordinates[0]),i.setAttribute("y1",t.rect[3]-t.lineCoordinates[1]),i.setAttribute("x2",t.rect[2]-t.lineCoordinates[2]),i.setAttribute("y2",t.rect[3]-t.lineCoordinates[3]),i.setAttribute("stroke-width",t.borderStyle.width||1),i.setAttribute("stroke","transparent"),e.appendChild(i),this.container.append(e),this._createPopup(this.container,i,t),this.container}}class _ extends o{constructor(t){super(t,!!(t.data.hasPopup||t.data.title||t.data.contents),!0)}render(){this.container.className="squareAnnotation";const t=this.data,e=t.rect[2]-t.rect[0],i=t.rect[3]-t.rect[1],n=this.svgFactory.create(e,i),a=t.borderStyle.width,s=this.svgFactory.createElement("svg:rect");return s.setAttribute("x",a/2),s.setAttribute("y",a/2),s.setAttribute("width",e-a),s.setAttribute("height",i-a),s.setAttribute("stroke-width",a||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","none"),n.appendChild(s),this.container.append(n),this._createPopup(this.container,s,t),this.container}}class y extends o{constructor(t){super(t,!!(t.data.hasPopup||t.data.title||t.data.contents),!0)}render(){this.container.className="circleAnnotation";const t=this.data,e=t.rect[2]-t.rect[0],i=t.rect[3]-t.rect[1],n=this.svgFactory.create(e,i),a=t.borderStyle.width,s=this.svgFactory.createElement("svg:ellipse");return s.setAttribute("cx",e/2),s.setAttribute("cy",i/2),s.setAttribute("rx",e/2-a/2),s.setAttribute("ry",i/2-a/2),s.setAttribute("stroke-width",a||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","none"),n.appendChild(s),this.container.append(n),this._createPopup(this.container,s,t),this.container}}class x extends o{constructor(t){super(t,!!(t.data.hasPopup||t.data.title||t.data.contents),!0),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.className=this.containerClassName;const t=this.data,e=this.svgFactory.create(t.rect[2]-t.rect[0],t.rect[3]-t.rect[1]);let i=[];for(const a of t.vertices)i.push(a.x-t.rect[0]+","+(t.rect[3]-a.y));i=i.join(" ");const n=this.svgFactory.createElement(this.svgElementName);return n.setAttribute("points",i),n.setAttribute("stroke-width",t.borderStyle.width||1),n.setAttribute("stroke","transparent"),n.setAttribute("fill","none"),e.appendChild(n),this.container.append(e),this._createPopup(this.container,n,t),this.container}}class C extends x{constructor(t){super(t),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class O extends o{constructor(t){super(t,!!(t.data.hasPopup||t.data.title||t.data.contents),!0)}render(){return this.container.className="caretAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class D extends o{constructor(t){super(t,!!(t.data.hasPopup||t.data.title||t.data.contents),!0),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline"}render(){this.container.className=this.containerClassName;const t=this.data,e=this.svgFactory.create(t.rect[2]-t.rect[0],t.rect[3]-t.rect[1]);for(const i of t.inkLists){let n=[];for(const e of i)n.push(`${e.x-t.rect[0]},${t.rect[3]-e.y}`);n=n.join(" ");const a=this.svgFactory.createElement(this.svgElementName);a.setAttribute("points",n),a.setAttribute("stroke-width",t.borderStyle.width||1),a.setAttribute("stroke","transparent"),a.setAttribute("fill","none"),this._createPopup(this.container,a,t),e.appendChild(a)}return this.container.append(e),this.container}}class w extends o{constructor(t){super(t,!!(t.data.hasPopup||t.data.title||t.data.contents),!0)}render(){return this.container.className="highlightAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class M extends o{constructor(t){super(t,!!(t.data.hasPopup||t.data.title||t.data.contents),!0)}render(){return this.container.className="underlineAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class k extends o{constructor(t){super(t,!!(t.data.hasPopup||t.data.title||t.data.contents),!0)}render(){return this.container.className="squigglyAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class S extends o{constructor(t){super(t,!!(t.data.hasPopup||t.data.title||t.data.contents),!0)}render(){return this.container.className="strikeoutAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class I extends o{constructor(t){super(t,!!(t.data.hasPopup||t.data.title||t.data.contents),!0)}render(){return this.container.className="stampAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}class P extends o{constructor(t){super(t,!0);const{filename:e,content:i}=this.data.file;this.filename=(0,n.getFilenameFromUrl)(e),this.content=i,this.linkService.eventBus&&this.linkService.eventBus.dispatch("fileattachmentannotation",{source:this,id:(0,a.stringToPDFString)(e),filename:e,content:i})}render(){this.container.className="fileAttachmentAnnotation";const t=document.createElement("div");return t.style.height=this.container.style.height,t.style.width=this.container.style.width,t.addEventListener("dblclick",this._download.bind(this)),this.data.hasPopup||!this.data.title&&!this.data.contents||this._createPopup(this.container,t,this.data),this.container.appendChild(t),this.container}_download(){this.downloadManager?this.downloadManager.downloadData(this.content,this.filename,""):(0,a.warn)("Download cannot be started due to unavailable download manager")}}e.AnnotationLayer=class{static render(t){const e=[],i=[];for(const n of t.annotations)n&&(n.annotationType!==a.AnnotationType.POPUP?e.push(n):i.push(n));i.length&&e.push(...i);for(const a of e){const e=s.create({data:a,layer:t.div,page:t.page,viewport:t.viewport,linkService:t.linkService,downloadManager:t.downloadManager,imageResourcesPath:t.imageResourcesPath||"",renderInteractiveForms:t.renderInteractiveForms||!1,svgFactory:new n.DOMSVGFactory});e.isRenderable&&t.div.appendChild(e.render())}}static update(t){for(const e of t.annotations){const i=t.div.querySelector(`[data-annotation-id="${e.id}"]`);i&&(i.style.transform=`matrix(${t.viewport.transform.join(",")})`)}t.div.removeAttribute("hidden")}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderTextLayer=void 0;var n=i(2),a=function(){var t=/\S/;function e(e,i,a){var s=document.createElement("span"),o={angle:0,canvasWidth:0,isWhitespace:!1,originalTransform:null,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,scale:1};if(e._textDivs.push(s),!t.test(i.str))return o.isWhitespace=!0,void e._textDivProperties.set(s,o);var r=n.Util.transform(e._viewport.transform,i.transform),c=Math.atan2(r[1],r[0]),l=a[i.fontName];l.vertical&&(c+=Math.PI/2);var d=Math.sqrt(r[2]*r[2]+r[3]*r[3]),h=d;let u,p;l.ascent?h*=l.ascent:l.descent&&(h*=1+l.descent),0===c?(u=r[4],p=r[5]-h):(u=r[4]+h*Math.sin(c),p=r[5]-h*Math.cos(c)),s.style.left=u+"px",s.style.top=p+"px",s.style.fontSize=d+"px",s.style.fontFamily=l.fontFamily,s.textContent=i.str,e._fontInspectorEnabled&&(s.dataset.fontName=i.fontName),0!==c&&(o.angle=c*(180/Math.PI));let b=!1;if(i.str.length>1)b=!0;else if(i.transform[0]!==i.transform[3]){const t=Math.abs(i.transform[0]),e=Math.abs(i.transform[3]);t!==e&&Math.max(t,e)/Math.min(t,e)>1.5&&(b=!0)}if(b&&(o.canvasWidth=l.vertical?i.height*e._viewport.scale:i.width*e._viewport.scale),e._textDivProperties.set(s,o),e._textContentStream&&e._layoutText(s),e._enhanceTextSelection){var f=1,m=0;0!==c&&(f=Math.cos(c),m=Math.sin(c));var g,v,_=(l.vertical?i.height:i.width)*e._viewport.scale,y=d;v=0!==c?n.Util.getAxialAlignedBoundingBox([0,0,_,y],g=[f,m,-m,f,u,p]):[u,p,u+_,p+y],e._bounds.push({left:v[0],top:v[1],right:v[2],bottom:v[3],div:s,size:[_,y],m:g})}}function i(t){if(!t._canceled){var e=t._textDivs,i=t._capability,n=e.length;if(n>1e5)return t._renderingDone=!0,void i.resolve();if(!t._textContentStream)for(var a=0;a<n;a++)t._layoutText(e[a]);t._renderingDone=!0,i.resolve()}}function a(t,e,i){let n=0;for(let a=0;a<i;a++){const i=t[e++];i>0&&(n=n?Math.min(i,n):i)}return n}function s(t,e){e.sort((function(t,e){return t.x1-e.x1||t.index-e.index}));var i=[{start:-1/0,end:1/0,boundary:{x1:-1/0,y1:-1/0,x2:0,y2:1/0,index:-1,x1New:0,x2New:0}}];e.forEach((function(t){for(var e=0;e<i.length&&i[e].end<=t.y1;)e++;for(var n,a,s=i.length-1;s>=0&&i[s].start>=t.y2;)s--;var o,r,c=-1/0;for(o=e;o<=s;o++){var l;(l=(a=(n=i[o]).boundary).x2>t.x1?a.index>t.index?a.x1New:t.x1:void 0===a.x2New?(a.x2+t.x1)/2:a.x2New)>c&&(c=l)}for(t.x1New=c,o=e;o<=s;o++)void 0===(a=(n=i[o]).boundary).x2New?a.x2>t.x1?a.index>t.index&&(a.x2New=a.x2):a.x2New=c:a.x2New>c&&(a.x2New=Math.max(c,a.x2));var d=[],h=null;for(o=e;o<=s;o++){var u=(a=(n=i[o]).boundary).x2>t.x2?a:t;h===u?d[d.length-1].end=n.end:(d.push({start:n.start,end:n.end,boundary:u}),h=u)}for(i[e].start<t.y1&&(d[0].start=t.y1,d.unshift({start:i[e].start,end:t.y1,boundary:i[e].boundary})),t.y2<i[s].end&&(d[d.length-1].end=t.y2,d.push({start:t.y2,end:i[s].end,boundary:i[s].boundary})),o=e;o<=s;o++)if(void 0===(a=(n=i[o]).boundary).x2New){var p=!1;for(r=e-1;!p&&r>=0&&i[r].start>=a.y1;r--)p=i[r].boundary===a;for(r=s+1;!p&&r<i.length&&i[r].end<=a.y2;r++)p=i[r].boundary===a;for(r=0;!p&&r<d.length;r++)p=d[r].boundary===a;p||(a.x2New=c)}Array.prototype.splice.apply(i,[e,s-e+1].concat(d))})),i.forEach((function(e){var i=e.boundary;void 0===i.x2New&&(i.x2New=Math.max(t,i.x2))}))}function o({textContent:t,textContentStream:e,container:i,viewport:a,textDivs:s,textContentItemsStr:o,enhanceTextSelection:r}){this._textContent=t,this._textContentStream=e,this._container=i,this._viewport=a,this._textDivs=s||[],this._textContentItemsStr=o||[],this._enhanceTextSelection=!!r,this._fontInspectorEnabled=!(!globalThis.FontInspector||!globalThis.FontInspector.enabled),this._reader=null,this._layoutTextLastFontSize=null,this._layoutTextLastFontFamily=null,this._layoutTextCtx=null,this._textDivProperties=new WeakMap,this._renderingDone=!1,this._canceled=!1,this._capability=(0,n.createPromiseCapability)(),this._renderTimer=null,this._bounds=[],this._capability.promise.finally(()=>{this._layoutTextCtx&&(this._layoutTextCtx.canvas.width=0,this._layoutTextCtx.canvas.height=0,this._layoutTextCtx=null)}).catch(()=>{})}return o.prototype={get promise(){return this._capability.promise},cancel:function(){this._canceled=!0,this._reader&&(this._reader.cancel(new n.AbortException("TextLayer task cancelled.")),this._reader=null),null!==this._renderTimer&&(clearTimeout(this._renderTimer),this._renderTimer=null),this._capability.reject(new Error("TextLayer task cancelled."))},_processItems(t,i){for(let n=0,a=t.length;n<a;n++)this._textContentItemsStr.push(t[n].str),e(this,t[n],i)},_layoutText(t){const e=this._textDivProperties.get(t);if(e.isWhitespace)return;let i="";if(0!==e.canvasWidth){const{fontSize:n,fontFamily:a}=t.style;n===this._layoutTextLastFontSize&&a===this._layoutTextLastFontFamily||(this._layoutTextCtx.font=`${n} ${a}`,this._layoutTextLastFontSize=n,this._layoutTextLastFontFamily=a);const{width:s}=this._layoutTextCtx.measureText(t.textContent);s>0&&(e.scale=e.canvasWidth/s,i=`scaleX(${e.scale})`)}0!==e.angle&&(i=`rotate(${e.angle}deg) ${i}`),i.length>0&&(this._enhanceTextSelection&&(e.originalTransform=i),t.style.transform=i),this._textDivProperties.set(t,e),this._container.appendChild(t)},_render:function(t){const e=(0,n.createPromiseCapability)();let a=Object.create(null);const s=document.createElement("canvas");if(s.mozOpaque=!0,this._layoutTextCtx=s.getContext("2d",{alpha:!1}),this._textContent)this._processItems(this._textContent.items,this._textContent.styles),e.resolve();else{if(!this._textContentStream)throw new Error('Neither "textContent" nor "textContentStream" parameters specified.');{const t=()=>{this._reader.read().then(({value:i,done:n})=>{n?e.resolve():(Object.assign(a,i.styles),this._processItems(i.items,a),t())},e.reject)};this._reader=this._textContentStream.getReader(),t()}}e.promise.then(()=>{a=null,t?this._renderTimer=setTimeout(()=>{i(this),this._renderTimer=null},t):i(this)},this._capability.reject)},expandTextDivs:function(t){if(!this._enhanceTextSelection||!this._renderingDone)return;null!==this._bounds&&(function(t){for(var e=t._bounds,i=t._viewport,o=function(t,e,i){var n=i.map((function(t,e){return{x1:t.left,y1:t.top,x2:t.right,y2:t.bottom,index:e,x1New:void 0,x2New:void 0}}));s(t,n);var a=new Array(i.length);return n.forEach((function(t){a[t.index]={left:t.x1New,top:0,right:t.x2New,bottom:0}})),i.map((function(e,i){var s=a[i],o=n[i];o.x1=e.top,o.y1=t-s.right,o.x2=e.bottom,o.y2=t-s.left,o.index=i,o.x1New=void 0,o.x2New=void 0})),s(e,n),n.forEach((function(t){var e=t.index;a[e].top=t.x1New,a[e].bottom=t.x2New})),a}(i.width,i.height,e),r=0;r<o.length;r++){var c=e[r].div,l=t._textDivProperties.get(c);if(0!==l.angle){var d=o[r],h=e[r],u=h.m,p=u[0],b=u[1],f=[[0,0],[0,h.size[1]],[h.size[0],0],h.size],m=new Float64Array(64);f.forEach((function(t,e){var i=n.Util.applyTransform(t,u);m[e+0]=p&&(d.left-i[0])/p,m[e+4]=b&&(d.top-i[1])/b,m[e+8]=p&&(d.right-i[0])/p,m[e+12]=b&&(d.bottom-i[1])/b,m[e+16]=b&&(d.left-i[0])/-b,m[e+20]=p&&(d.top-i[1])/p,m[e+24]=b&&(d.right-i[0])/-b,m[e+28]=p&&(d.bottom-i[1])/p,m[e+32]=p&&(d.left-i[0])/-p,m[e+36]=b&&(d.top-i[1])/-b,m[e+40]=p&&(d.right-i[0])/-p,m[e+44]=b&&(d.bottom-i[1])/-b,m[e+48]=b&&(d.left-i[0])/b,m[e+52]=p&&(d.top-i[1])/-p,m[e+56]=b&&(d.right-i[0])/b,m[e+60]=p&&(d.bottom-i[1])/-p}));var g=1+Math.min(Math.abs(p),Math.abs(b));l.paddingLeft=a(m,32,16)/g,l.paddingTop=a(m,48,16)/g,l.paddingRight=a(m,0,16)/g,l.paddingBottom=a(m,16,16)/g,t._textDivProperties.set(c,l)}else l.paddingLeft=e[r].left-o[r].left,l.paddingTop=e[r].top-o[r].top,l.paddingRight=o[r].right-e[r].right,l.paddingBottom=o[r].bottom-e[r].bottom,t._textDivProperties.set(c,l)}}(this),this._bounds=null);const e=[],i=[];for(var o=0,r=this._textDivs.length;o<r;o++){const n=this._textDivs[o],a=this._textDivProperties.get(n);a.isWhitespace||(t?(e.length=0,i.length=0,a.originalTransform&&e.push(a.originalTransform),a.paddingTop>0?(i.push(a.paddingTop+"px"),e.push(`translateY(${-a.paddingTop}px)`)):i.push(0),i.push(a.paddingRight>0?a.paddingRight/a.scale+"px":0),i.push(a.paddingBottom>0?a.paddingBottom+"px":0),a.paddingLeft>0?(i.push(a.paddingLeft/a.scale+"px"),e.push(`translateX(${-a.paddingLeft/a.scale}px)`)):i.push(0),n.style.padding=i.join(" "),e.length&&(n.style.transform=e.join(" "))):(n.style.padding=null,n.style.transform=a.originalTransform))}}},function(t){var e=new o({textContent:t.textContent,textContentStream:t.textContentStream,container:t.container,viewport:t.viewport,textDivs:t.textDivs,textContentItemsStr:t.textContentItemsStr,enhanceTextSelection:t.enhanceTextSelection});return e._render(t.timeout),e}}();e.renderTextLayer=a},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SVGGraphics=void 0;var n=i(2),a=i(1),s=i(4);let o=function(){throw new Error("Not implemented: SVGGraphics")};e.SVGGraphics=o;{const t={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},i="http://www.w3.org/XML/1998/namespace",l="http://www.w3.org/1999/xlink",d=["butt","round","square"],h=["miter","round","bevel"],u=function(){const t=new Uint8Array([137,80,78,71,13,10,26,10]),e=new Int32Array(256);for(let n=0;n<256;n++){let t=n;for(let e=0;e<8;e++)t=1&t?3988292384^t>>1&2147483647:t>>1&2147483647;e[n]=t}function i(t,i,n,a){let s=a;const o=i.length;n[s]=o>>24&255,n[s+1]=o>>16&255,n[s+2]=o>>8&255,n[s+3]=255&o,s+=4,n[s]=255&t.charCodeAt(0),n[s+1]=255&t.charCodeAt(1),n[s+2]=255&t.charCodeAt(2),n[s+3]=255&t.charCodeAt(3),s+=4,n.set(i,s),s+=i.length;const r=function(t,i,n){let a=-1;for(let s=i;s<n;s++)a=a>>>8^e[255&(a^t[s])];return-1^a}(n,a+4,s);n[s]=r>>24&255,n[s+1]=r>>16&255,n[s+2]=r>>8&255,n[s+3]=255&r}function a(t){let e=t.length;const i=Math.ceil(e/65535),n=new Uint8Array(2+e+5*i+4);let a=0;n[a++]=120,n[a++]=156;let s=0;for(;e>65535;)n[a++]=0,n[a++]=255,n[a++]=255,n[a++]=0,n[a++]=0,n.set(t.subarray(s,s+65535),a),a+=65535,s+=65535,e-=65535;n[a++]=1,n[a++]=255&e,n[a++]=e>>8&255,n[a++]=255&~e,n[a++]=(65535&~e)>>8&255,n.set(t.subarray(s),a),a+=t.length-s;const o=function(t,e,i){let n=1,a=0;for(let s=0;s<i;++s)n=(n+(255&t[s]))%65521,a=(a+n)%65521;return a<<16|n}(t,0,t.length);return n[a++]=o>>24&255,n[a++]=o>>16&255,n[a++]=o>>8&255,n[a++]=255&o,n}return function(e,o,r){return function(e,o,r,c){const l=e.width,d=e.height;let h,u,p;const b=e.data;switch(o){case n.ImageKind.GRAYSCALE_1BPP:u=0,h=1,p=l+7>>3;break;case n.ImageKind.RGB_24BPP:u=2,h=8,p=3*l;break;case n.ImageKind.RGBA_32BPP:u=6,h=8,p=4*l;break;default:throw new Error("invalid format")}const f=new Uint8Array((1+p)*d);let m=0,g=0;for(let t=0;t<d;++t)f[m++]=0,f.set(b.subarray(g,g+p),m),g+=p,m+=p;if(o===n.ImageKind.GRAYSCALE_1BPP&&c){m=0;for(let t=0;t<d;t++){m++;for(let t=0;t<p;t++)f[m++]^=255}}const v=new Uint8Array([l>>24&255,l>>16&255,l>>8&255,255&l,d>>24&255,d>>16&255,d>>8&255,255&d,h,u,0,0,0]),_=function(t){if(!s.isNodeJS)return a(t);try{let e;e=parseInt(process.versions.node)>=8?t:Buffer.from(t);const i=__webpack_require__(1).deflateSync(e,{level:9});return i instanceof Uint8Array?i:new Uint8Array(i)}catch(e){(0,n.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+e)}return a(t)}(f),y=new Uint8Array(t.length+36+v.length+_.length);let x=0;return y.set(t,x),x+=t.length,i("IHDR",v,y,x),x+=12+v.length,i("IDATA",_,y,x),x+=12+_.length,i("IEND",new Uint8Array(0),y,x),(0,n.createObjectURL)(y,"image/png",r)}(e,void 0===e.kind?n.ImageKind.GRAYSCALE_1BPP:e.kind,o,r)}}();class p{constructor(){this.fontSizeScale=1,this.fontWeight=t.fontWeight,this.fontSize=0,this.textMatrix=n.IDENTITY_MATRIX,this.fontMatrix=n.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=n.TextRenderingMode.FILL,this.textMatrixScale=1,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRise=0,this.fillColor=t.fillColor,this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.lineJoin="",this.lineCap="",this.miterLimit=0,this.dashArray=[],this.dashPhase=0,this.dependencies=[],this.activeClipUrl=null,this.clipGroup=null,this.maskId=""}clone(){return Object.create(this)}setCurrentPoint(t,e){this.x=t,this.y=e}}function r(t){if(Number.isInteger(t))return t.toString();const e=t.toFixed(10);let i=e.length-1;if("0"!==e[i])return e;do{i--}while("0"===e[i]);return e.substring(0,"."===e[i]?i:i+1)}function c(t){if(0===t[4]&&0===t[5]){if(0===t[1]&&0===t[2])return 1===t[0]&&1===t[3]?"":`scale(${r(t[0])} ${r(t[3])})`;if(t[0]===t[3]&&t[1]===-t[2])return`rotate(${r(180*Math.acos(t[0])/Math.PI)})`}else if(1===t[0]&&0===t[1]&&0===t[2]&&1===t[3])return`translate(${r(t[4])} ${r(t[5])})`;return`matrix(${r(t[0])} ${r(t[1])} ${r(t[2])} ${r(t[3])} ${r(t[4])} `+r(t[5])+")"}let b=0,f=0,m=0;e.SVGGraphics=o=class{constructor(t,e,i=!1){this.svgFactory=new a.DOMSVGFactory,this.current=new p,this.transformMatrix=n.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=t,this.objs=e,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!i,this._operatorIdMapping=[];for(const a in n.OPS)this._operatorIdMapping[n.OPS[a]]=a}save(){this.transformStack.push(this.transformMatrix);const t=this.current;this.extraStack.push(t),this.current=t.clone()}restore(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}group(t){this.save(),this.executeOpTree(t),this.restore()}loadDependencies(t){const e=t.fnArray,i=t.argsArray;for(let a=0,s=e.length;a<s;a++)if(e[a]===n.OPS.dependency)for(const t of i[a]){const e=t.startsWith("g_")?this.commonObjs:this.objs,i=new Promise(i=>{e.get(t,i)});this.current.dependencies.push(i)}return Promise.all(this.current.dependencies)}transform(t,e,i,a,s,o){this.transformMatrix=n.Util.transform(this.transformMatrix,[t,e,i,a,s,o]),this.tgrp=null}getSVG(t,e){this.viewport=e;const i=this._initialize(e);return this.loadDependencies(t).then(()=>(this.transformMatrix=n.IDENTITY_MATRIX,this.executeOpTree(this.convertOpList(t)),i))}convertOpList(t){const e=this._operatorIdMapping,i=t.argsArray,n=t.fnArray,a=[];for(let s=0,o=n.length;s<o;s++){const t=n[s];a.push({fnId:t,fn:e[t],args:i[s]})}return function(t){let e=[];const i=[];for(const n of t)"save"!==n.fn?"restore"===n.fn?e=i.pop():e.push(n):(e.push({fnId:92,fn:"group",items:[]}),i.push(e),e=e[e.length-1].items);return e}(a)}executeOpTree(t){for(const e of t){const t=e.fn,i=e.args;switch(0|e.fnId){case n.OPS.beginText:this.beginText();break;case n.OPS.dependency:break;case n.OPS.setLeading:this.setLeading(i);break;case n.OPS.setLeadingMoveText:this.setLeadingMoveText(i[0],i[1]);break;case n.OPS.setFont:this.setFont(i);break;case n.OPS.showText:case n.OPS.showSpacedText:this.showText(i[0]);break;case n.OPS.endText:this.endText();break;case n.OPS.moveText:this.moveText(i[0],i[1]);break;case n.OPS.setCharSpacing:this.setCharSpacing(i[0]);break;case n.OPS.setWordSpacing:this.setWordSpacing(i[0]);break;case n.OPS.setHScale:this.setHScale(i[0]);break;case n.OPS.setTextMatrix:this.setTextMatrix(i[0],i[1],i[2],i[3],i[4],i[5]);break;case n.OPS.setTextRise:this.setTextRise(i[0]);break;case n.OPS.setTextRenderingMode:this.setTextRenderingMode(i[0]);break;case n.OPS.setLineWidth:this.setLineWidth(i[0]);break;case n.OPS.setLineJoin:this.setLineJoin(i[0]);break;case n.OPS.setLineCap:this.setLineCap(i[0]);break;case n.OPS.setMiterLimit:this.setMiterLimit(i[0]);break;case n.OPS.setFillRGBColor:this.setFillRGBColor(i[0],i[1],i[2]);break;case n.OPS.setStrokeRGBColor:this.setStrokeRGBColor(i[0],i[1],i[2]);break;case n.OPS.setStrokeColorN:this.setStrokeColorN(i);break;case n.OPS.setFillColorN:this.setFillColorN(i);break;case n.OPS.shadingFill:this.shadingFill(i[0]);break;case n.OPS.setDash:this.setDash(i[0],i[1]);break;case n.OPS.setRenderingIntent:this.setRenderingIntent(i[0]);break;case n.OPS.setFlatness:this.setFlatness(i[0]);break;case n.OPS.setGState:this.setGState(i[0]);break;case n.OPS.fill:this.fill();break;case n.OPS.eoFill:this.eoFill();break;case n.OPS.stroke:this.stroke();break;case n.OPS.fillStroke:this.fillStroke();break;case n.OPS.eoFillStroke:this.eoFillStroke();break;case n.OPS.clip:this.clip("nonzero");break;case n.OPS.eoClip:this.clip("evenodd");break;case n.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case n.OPS.paintImageXObject:this.paintImageXObject(i[0]);break;case n.OPS.paintInlineImageXObject:this.paintInlineImageXObject(i[0]);break;case n.OPS.paintImageMaskXObject:this.paintImageMaskXObject(i[0]);break;case n.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(i[0],i[1]);break;case n.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case n.OPS.closePath:this.closePath();break;case n.OPS.closeStroke:this.closeStroke();break;case n.OPS.closeFillStroke:this.closeFillStroke();break;case n.OPS.closeEOFillStroke:this.closeEOFillStroke();break;case n.OPS.nextLine:this.nextLine();break;case n.OPS.transform:this.transform(i[0],i[1],i[2],i[3],i[4],i[5]);break;case n.OPS.constructPath:this.constructPath(i[0],i[1]);break;case n.OPS.endPath:this.endPath();break;case 92:this.group(e.items);break;default:(0,n.warn)("Unimplemented operator "+t)}}}setWordSpacing(t){this.current.wordSpacing=t}setCharSpacing(t){this.current.charSpacing=t}nextLine(){this.moveText(0,this.current.leading)}setTextMatrix(t,e,i,n,a,s){const o=this.current;o.textMatrix=o.lineMatrix=[t,e,i,n,a,s],o.textMatrixScale=Math.sqrt(t*t+e*e),o.x=o.lineX=0,o.y=o.lineY=0,o.xcoords=[],o.ycoords=[],o.tspan=this.svgFactory.createElement("svg:tspan"),o.tspan.setAttributeNS(null,"font-family",o.fontFamily),o.tspan.setAttributeNS(null,"font-size",r(o.fontSize)+"px"),o.tspan.setAttributeNS(null,"y",r(-o.y)),o.txtElement=this.svgFactory.createElement("svg:text"),o.txtElement.appendChild(o.tspan)}beginText(){const t=this.current;t.x=t.lineX=0,t.y=t.lineY=0,t.textMatrix=n.IDENTITY_MATRIX,t.lineMatrix=n.IDENTITY_MATRIX,t.textMatrixScale=1,t.tspan=this.svgFactory.createElement("svg:tspan"),t.txtElement=this.svgFactory.createElement("svg:text"),t.txtgrp=this.svgFactory.createElement("svg:g"),t.xcoords=[],t.ycoords=[]}moveText(t,e){const i=this.current;i.x=i.lineX+=t,i.y=i.lineY+=e,i.xcoords=[],i.ycoords=[],i.tspan=this.svgFactory.createElement("svg:tspan"),i.tspan.setAttributeNS(null,"font-family",i.fontFamily),i.tspan.setAttributeNS(null,"font-size",r(i.fontSize)+"px"),i.tspan.setAttributeNS(null,"y",r(-i.y))}showText(e){const a=this.current,s=a.font,o=a.fontSize;if(0===o)return;const l=a.fontSizeScale,d=a.charSpacing,h=a.wordSpacing,u=a.fontDirection,p=a.textHScale*u,b=s.vertical,f=b?1:-1,m=s.defaultVMetrics,g=o*a.fontMatrix[0];let v=0;for(const t of e){if(null===t){v+=u*h;continue}if((0,n.isNum)(t)){v+=f*t*o/1e3;continue}const e=(t.isSpace?h:0)+d,i=t.fontChar;let r,c,p,_=t.width;if(b){let e;const i=t.vmetric||m;e=t.vmetric?i[1]:.5*_,e=-e*g,_=i?-i[0]:_,r=e/l,c=(v+i[2]*g)/l}else r=v/l,c=0;(t.isInFont||s.missingFile)&&(a.xcoords.push(a.x+r),b&&a.ycoords.push(-a.y+c),a.tspan.textContent+=i),p=b?_*g-e*u:_*g+e*u,v+=p}a.tspan.setAttributeNS(null,"x",a.xcoords.map(r).join(" ")),a.tspan.setAttributeNS(null,"y",b?a.ycoords.map(r).join(" "):r(-a.y)),b?a.y-=v:a.x+=v*p,a.tspan.setAttributeNS(null,"font-family",a.fontFamily),a.tspan.setAttributeNS(null,"font-size",r(a.fontSize)+"px"),a.fontStyle!==t.fontStyle&&a.tspan.setAttributeNS(null,"font-style",a.fontStyle),a.fontWeight!==t.fontWeight&&a.tspan.setAttributeNS(null,"font-weight",a.fontWeight);const _=a.textRenderingMode&n.TextRenderingMode.FILL_STROKE_MASK;_===n.TextRenderingMode.FILL||_===n.TextRenderingMode.FILL_STROKE?(a.fillColor!==t.fillColor&&a.tspan.setAttributeNS(null,"fill",a.fillColor),a.fillAlpha<1&&a.tspan.setAttributeNS(null,"fill-opacity",a.fillAlpha)):a.tspan.setAttributeNS(null,"fill",a.textRenderingMode===n.TextRenderingMode.ADD_TO_PATH?"transparent":"none"),(_===n.TextRenderingMode.STROKE||_===n.TextRenderingMode.FILL_STROKE)&&this._setStrokeAttributes(a.tspan,1/(a.textMatrixScale||1));let y=a.textMatrix;0!==a.textRise&&(y=y.slice(),y[5]+=a.textRise),a.txtElement.setAttributeNS(null,"transform",`${c(y)} scale(${r(p)}, -1)`),a.txtElement.setAttributeNS(i,"xml:space","preserve"),a.txtElement.appendChild(a.tspan),a.txtgrp.appendChild(a.txtElement),this._ensureTransformGroup().appendChild(a.txtElement)}setLeadingMoveText(t,e){this.setLeading(-e),this.moveText(t,e)}addFontStyle(t){if(!t.data)throw new Error('addFontStyle: No font data available, ensure that the "fontExtraProperties" API parameter is set.');this.cssStyle||(this.cssStyle=this.svgFactory.createElement("svg:style"),this.cssStyle.setAttributeNS(null,"type","text/css"),this.defs.appendChild(this.cssStyle));const e=(0,n.createObjectURL)(t.data,t.mimetype,this.forceDataSchema);this.cssStyle.textContent+=`@font-face { font-family: "${t.loadedName}"; src: url(${e}); }\n`}setFont(t){const e=this.current,i=this.commonObjs.get(t[0]);let a=t[1];e.font=i,!this.embedFonts||i.missingFile||this.embeddedFonts[i.loadedName]||(this.addFontStyle(i),this.embeddedFonts[i.loadedName]=i),e.fontMatrix=i.fontMatrix?i.fontMatrix:n.FONT_IDENTITY_MATRIX;let s="normal";i.black?s="900":i.bold&&(s="bold");const o=i.italic?"italic":"normal";a<0?(a=-a,e.fontDirection=-1):e.fontDirection=1,e.fontSize=a,e.fontFamily=i.loadedName,e.fontWeight=s,e.fontStyle=o,e.tspan=this.svgFactory.createElement("svg:tspan"),e.tspan.setAttributeNS(null,"y",r(-e.y)),e.xcoords=[],e.ycoords=[]}endText(){const t=this.current;t.textRenderingMode&n.TextRenderingMode.ADD_TO_PATH_FLAG&&t.txtElement&&t.txtElement.hasChildNodes()&&(t.element=t.txtElement,this.clip("nonzero"),this.endPath())}setLineWidth(t){t>0&&(this.current.lineWidth=t)}setLineCap(t){this.current.lineCap=d[t]}setLineJoin(t){this.current.lineJoin=h[t]}setMiterLimit(t){this.current.miterLimit=t}setStrokeAlpha(t){this.current.strokeAlpha=t}setStrokeRGBColor(t,e,i){this.current.strokeColor=n.Util.makeCssRgb(t,e,i)}setFillAlpha(t){this.current.fillAlpha=t}setFillRGBColor(t,e,i){this.current.fillColor=n.Util.makeCssRgb(t,e,i),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(t){this.current.strokeColor=this._makeColorN_Pattern(t)}setFillColorN(t){this.current.fillColor=this._makeColorN_Pattern(t)}shadingFill(t){const e=this.viewport.width,i=this.viewport.height,a=n.Util.inverseTransform(this.transformMatrix),s=n.Util.applyTransform([0,0],a),o=n.Util.applyTransform([0,i],a),r=n.Util.applyTransform([e,0],a),c=n.Util.applyTransform([e,i],a),l=Math.min(s[0],o[0],r[0],c[0]),d=Math.min(s[1],o[1],r[1],c[1]),h=Math.max(s[0],o[0],r[0],c[0]),u=Math.max(s[1],o[1],r[1],c[1]),p=this.svgFactory.createElement("svg:rect");p.setAttributeNS(null,"x",l),p.setAttributeNS(null,"y",d),p.setAttributeNS(null,"width",h-l),p.setAttributeNS(null,"height",u-d),p.setAttributeNS(null,"fill",this._makeShadingPattern(t)),this.current.fillAlpha<1&&p.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().appendChild(p)}_makeColorN_Pattern(t){return"TilingPattern"===t[0]?this._makeTilingPattern(t):this._makeShadingPattern(t)}_makeTilingPattern(t){const e=t[1],i=t[2],a=t[3]||n.IDENTITY_MATRIX,[s,o,r,c]=t[4],l=t[5],d=t[6],h=t[7],u="shading"+m++,[p,b]=n.Util.applyTransform([s,o],a),[f,g]=n.Util.applyTransform([r,c],a),[v,_]=n.Util.singularValueDecompose2dScale(a),y=l*v,x=d*_,C=this.svgFactory.createElement("svg:pattern");C.setAttributeNS(null,"id",u),C.setAttributeNS(null,"patternUnits","userSpaceOnUse"),C.setAttributeNS(null,"width",y),C.setAttributeNS(null,"height",x),C.setAttributeNS(null,"x",""+p),C.setAttributeNS(null,"y",""+b);const O=this.svg,D=this.transformMatrix,w=this.current.fillColor,M=this.current.strokeColor,k=this.svgFactory.create(f-p,g-b);if(this.svg=k,this.transformMatrix=a,2===h){const t=n.Util.makeCssRgb(...e);this.current.fillColor=t,this.current.strokeColor=t}return this.executeOpTree(this.convertOpList(i)),this.svg=O,this.transformMatrix=D,this.current.fillColor=w,this.current.strokeColor=M,C.appendChild(k.childNodes[0]),this.defs.appendChild(C),`url(#${u})`}_makeShadingPattern(t){switch(t[0]){case"RadialAxial":const e="shading"+m++,i=t[3];let a;switch(t[1]){case"axial":const i=t[4],n=t[5];a=this.svgFactory.createElement("svg:linearGradient"),a.setAttributeNS(null,"id",e),a.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),a.setAttributeNS(null,"x1",i[0]),a.setAttributeNS(null,"y1",i[1]),a.setAttributeNS(null,"x2",n[0]),a.setAttributeNS(null,"y2",n[1]);break;case"radial":const s=t[4],o=t[5],r=t[6],c=t[7];a=this.svgFactory.createElement("svg:radialGradient"),a.setAttributeNS(null,"id",e),a.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),a.setAttributeNS(null,"cx",o[0]),a.setAttributeNS(null,"cy",o[1]),a.setAttributeNS(null,"r",c),a.setAttributeNS(null,"fx",s[0]),a.setAttributeNS(null,"fy",s[1]),a.setAttributeNS(null,"fr",r);break;default:throw new Error("Unknown RadialAxial type: "+t[1])}for(const t of i){const e=this.svgFactory.createElement("svg:stop");e.setAttributeNS(null,"offset",t[0]),e.setAttributeNS(null,"stop-color",t[1]),a.appendChild(e)}return this.defs.appendChild(a),`url(#${e})`;case"Mesh":return(0,n.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error("Unknown IR type: "+t[0])}}setDash(t,e){this.current.dashArray=t,this.current.dashPhase=e}constructPath(t,e){const i=this.current;let a=i.x,s=i.y,o=[],c=0;for(const l of t)switch(0|l){case n.OPS.rectangle:a=e[c++],s=e[c++];const t=a+e[c++],i=s+e[c++];o.push("M",r(a),r(s),"L",r(t),r(s),"L",r(t),r(i),"L",r(a),r(i),"Z");break;case n.OPS.moveTo:a=e[c++],s=e[c++],o.push("M",r(a),r(s));break;case n.OPS.lineTo:a=e[c++],s=e[c++],o.push("L",r(a),r(s));break;case n.OPS.curveTo:a=e[c+4],s=e[c+5],o.push("C",r(e[c]),r(e[c+1]),r(e[c+2]),r(e[c+3]),r(a),r(s)),c+=6;break;case n.OPS.curveTo2:o.push("C",r(a),r(s),r(e[c]),r(e[c+1]),r(e[c+2]),r(e[c+3])),a=e[c+2],s=e[c+3],c+=4;break;case n.OPS.curveTo3:a=e[c+2],s=e[c+3],o.push("C",r(e[c]),r(e[c+1]),r(a),r(s),r(a),r(s)),c+=4;break;case n.OPS.closePath:o.push("Z")}o=o.join(" "),i.path&&t.length>0&&t[0]!==n.OPS.rectangle&&t[0]!==n.OPS.moveTo?o=i.path.getAttributeNS(null,"d")+o:(i.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().appendChild(i.path)),i.path.setAttributeNS(null,"d",o),i.path.setAttributeNS(null,"fill","none"),i.element=i.path,i.setCurrentPoint(a,s)}endPath(){const t=this.current;if(t.path=null,!this.pendingClip)return;if(!t.element)return void(this.pendingClip=null);const e="clippath"+b++,i=this.svgFactory.createElement("svg:clipPath");i.setAttributeNS(null,"id",e),i.setAttributeNS(null,"transform",c(this.transformMatrix));const n=t.element.cloneNode(!0);n.setAttributeNS(null,"clip-rule","evenodd"===this.pendingClip?"evenodd":"nonzero"),this.pendingClip=null,i.appendChild(n),this.defs.appendChild(i),t.activeClipUrl&&(t.clipGroup=null,this.extraStack.forEach((function(t){t.clipGroup=null})),i.setAttributeNS(null,"clip-path",t.activeClipUrl)),t.activeClipUrl=`url(#${e})`,this.tgrp=null}clip(t){this.pendingClip=t}closePath(){const t=this.current;if(t.path){const e=t.path.getAttributeNS(null,"d")+"Z";t.path.setAttributeNS(null,"d",e)}}setLeading(t){this.current.leading=-t}setTextRise(t){this.current.textRise=t}setTextRenderingMode(t){this.current.textRenderingMode=t}setHScale(t){this.current.textHScale=t/100}setRenderingIntent(t){}setFlatness(t){}setGState(t){for(const[e,i]of t)switch(e){case"LW":this.setLineWidth(i);break;case"LC":this.setLineCap(i);break;case"LJ":this.setLineJoin(i);break;case"ML":this.setMiterLimit(i);break;case"D":this.setDash(i[0],i[1]);break;case"RI":this.setRenderingIntent(i);break;case"FL":this.setFlatness(i);break;case"Font":this.setFont(i);break;case"CA":this.setStrokeAlpha(i);break;case"ca":this.setFillAlpha(i);break;default:(0,n.warn)("Unimplemented graphic state operator "+e)}}fill(){const t=this.current;t.element&&(t.element.setAttributeNS(null,"fill",t.fillColor),t.element.setAttributeNS(null,"fill-opacity",t.fillAlpha),this.endPath())}stroke(){const t=this.current;t.element&&(this._setStrokeAttributes(t.element),t.element.setAttributeNS(null,"fill","none"),this.endPath())}_setStrokeAttributes(t,e=1){const i=this.current;let n=i.dashArray;1!==e&&n.length>0&&(n=n.map((function(t){return e*t}))),t.setAttributeNS(null,"stroke",i.strokeColor),t.setAttributeNS(null,"stroke-opacity",i.strokeAlpha),t.setAttributeNS(null,"stroke-miterlimit",r(i.miterLimit)),t.setAttributeNS(null,"stroke-linecap",i.lineCap),t.setAttributeNS(null,"stroke-linejoin",i.lineJoin),t.setAttributeNS(null,"stroke-width",r(e*i.lineWidth)+"px"),t.setAttributeNS(null,"stroke-dasharray",n.map(r).join(" ")),t.setAttributeNS(null,"stroke-dashoffset",r(e*i.dashPhase)+"px")}eoFill(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}fillStroke(){this.stroke(),this.fill()}eoFillStroke(){this.current.element&&this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}closeStroke(){this.closePath(),this.stroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.closePath(),this.eoFillStroke()}paintSolidColorImageMask(){const t=this.svgFactory.createElement("svg:rect");t.setAttributeNS(null,"x","0"),t.setAttributeNS(null,"y","0"),t.setAttributeNS(null,"width","1px"),t.setAttributeNS(null,"height","1px"),t.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().appendChild(t)}paintImageXObject(t){const e=this.objs.get(t);e?this.paintInlineImageXObject(e):(0,n.warn)(`Dependent image with object ID ${t} is not ready yet`)}paintInlineImageXObject(t,e){const i=t.width,n=t.height,a=u(t,this.forceDataSchema,!!e),s=this.svgFactory.createElement("svg:rect");s.setAttributeNS(null,"x","0"),s.setAttributeNS(null,"y","0"),s.setAttributeNS(null,"width",r(i)),s.setAttributeNS(null,"height",r(n)),this.current.element=s,this.clip("nonzero");const o=this.svgFactory.createElement("svg:image");o.setAttributeNS(l,"xlink:href",a),o.setAttributeNS(null,"x","0"),o.setAttributeNS(null,"y",r(-n)),o.setAttributeNS(null,"width",r(i)+"px"),o.setAttributeNS(null,"height",r(n)+"px"),o.setAttributeNS(null,"transform",`scale(${r(1/i)} ${r(-1/n)})`),e?e.appendChild(o):this._ensureTransformGroup().appendChild(o)}paintImageMaskXObject(t){const e=this.current,i=t.width,n=t.height,a=e.fillColor;e.maskId="mask"+f++;const s=this.svgFactory.createElement("svg:mask");s.setAttributeNS(null,"id",e.maskId);const o=this.svgFactory.createElement("svg:rect");o.setAttributeNS(null,"x","0"),o.setAttributeNS(null,"y","0"),o.setAttributeNS(null,"width",r(i)),o.setAttributeNS(null,"height",r(n)),o.setAttributeNS(null,"fill",a),o.setAttributeNS(null,"mask",`url(#${e.maskId})`),this.defs.appendChild(s),this._ensureTransformGroup().appendChild(o),this.paintInlineImageXObject(t,s)}paintFormXObjectBegin(t,e){if(Array.isArray(t)&&6===t.length&&this.transform(t[0],t[1],t[2],t[3],t[4],t[5]),e){const t=e[2]-e[0],i=e[3]-e[1],n=this.svgFactory.createElement("svg:rect");n.setAttributeNS(null,"x",e[0]),n.setAttributeNS(null,"y",e[1]),n.setAttributeNS(null,"width",r(t)),n.setAttributeNS(null,"height",r(i)),this.current.element=n,this.clip("nonzero"),this.endPath()}}paintFormXObjectEnd(){}_initialize(t){const e=this.svgFactory.create(t.width,t.height),i=this.svgFactory.createElement("svg:defs");e.appendChild(i),this.defs=i;const n=this.svgFactory.createElement("svg:g");return n.setAttributeNS(null,"transform",c(t.transform)),e.appendChild(n),this.svg=n,e}_ensureClipGroup(){if(!this.current.clipGroup){const t=this.svgFactory.createElement("svg:g");t.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.appendChild(t),this.current.clipGroup=t}return this.current.clipGroup}_ensureTransformGroup(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",c(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().appendChild(this.tgrp):this.svg.appendChild(this.tgrp)),this.tgrp}}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PDFNodeStream=void 0;var n=i(2),a=i(20);const s=__webpack_require__(2),o=__webpack_require__(3),r=__webpack_require__(4),c=__webpack_require__(5),l=/^file:\/\/\/[a-zA-Z]:\//;e.PDFNodeStream=class{constructor(t){this.source=t,this.url=function(t){const e=c.parse(t);return"file:"===e.protocol||e.host?e:/^[a-z]:[/\\]/i.test(t)?c.parse("file:///"+t):(e.host||(e.protocol="file:"),e)}(t.url),this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol,this.isFsUrl="file:"===this.url.protocol,this.httpHeaders=this.isHttp&&t.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?this._fullRequestReader._loaded:0}getFullReader(){return(0,n.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new f(this):new p(this),this._fullRequestReader}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;const i=this.isFsUrl?new m(this,t,e):new b(this,t,e);return this._rangeRequestReaders.push(i),i}cancelAllRequests(t){this._fullRequestReader&&this._fullRequestReader.cancel(t),this._rangeRequestReaders.slice(0).forEach((function(e){e.cancel(t)}))}};class d{constructor(t){this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null;const e=t.source;this._contentLength=e.length,this._loaded=0,this._filename=null,this._disableRange=e.disableRange||!1,this._rangeChunkSize=e.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!e.disableStream,this._isRangeSupported=!e.disableRange,this._readableStream=null,this._readCapability=(0,n.createPromiseCapability)(),this._headersCapability=(0,n.createPromiseCapability)()}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();return null===t?(this._readCapability=(0,n.createPromiseCapability)(),this.read()):(this._loaded+=t.length,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(t).buffer,done:!1})}cancel(t){this._readableStream?this._readableStream.destroy(t):this._error(t)}_error(t){this._storedError=t,this._readCapability.resolve()}_setReadableStream(t){this._readableStream=t,t.on("readable",()=>{this._readCapability.resolve()}),t.on("end",()=>{t.destroy(),this._done=!0,this._readCapability.resolve()}),t.on("error",t=>{this._error(t)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new n.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class h{constructor(t){this._url=t.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=(0,n.createPromiseCapability)(),this._isStreamingSupported=!t.source.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const t=this._readableStream.read();return null===t?(this._readCapability=(0,n.createPromiseCapability)(),this.read()):(this._loaded+=t.length,this.onProgress&&this.onProgress({loaded:this._loaded}),{value:new Uint8Array(t).buffer,done:!1})}cancel(t){this._readableStream?this._readableStream.destroy(t):this._error(t)}_error(t){this._storedError=t,this._readCapability.resolve()}_setReadableStream(t){this._readableStream=t,t.on("readable",()=>{this._readCapability.resolve()}),t.on("end",()=>{t.destroy(),this._done=!0,this._readCapability.resolve()}),t.on("error",t=>{this._error(t)}),this._storedError&&this._readableStream.destroy(this._storedError)}}function u(t,e){return{protocol:t.protocol,auth:t.auth,host:t.hostname,port:t.port,path:t.path,method:"GET",headers:e}}class p extends d{constructor(t){super(t);const e=e=>{if(404===e.statusCode){const t=new n.MissingPDFException(`Missing PDF "${this._url}".`);return this._storedError=t,void this._headersCapability.reject(t)}this._headersCapability.resolve(),this._setReadableStream(e);const i=t=>this._readableStream.headers[t.toLowerCase()],{allowRangeRequests:s,suggestedLength:o}=(0,a.validateRangeRequestCapabilities)({getResponseHeader:i,isHttp:t.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=s,this._contentLength=o||this._contentLength,this._filename=(0,a.extractFilenameFromHeader)(i)};this._request=null,this._request="http:"===this._url.protocol?o.request(u(this._url,t.httpHeaders),e):r.request(u(this._url,t.httpHeaders),e),this._request.on("error",t=>{this._storedError=t,this._headersCapability.reject(t)}),this._request.end()}}class b extends h{constructor(t,e,i){super(t),this._httpHeaders={};for(const n in t.httpHeaders){const e=t.httpHeaders[n];void 0!==e&&(this._httpHeaders[n]=e)}this._httpHeaders.Range=`bytes=${e}-${i-1}`;const a=t=>{if(404!==t.statusCode)this._setReadableStream(t);else{const t=new n.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=t}};this._request=null,this._request="http:"===this._url.protocol?o.request(u(this._url,this._httpHeaders),a):r.request(u(this._url,this._httpHeaders),a),this._request.on("error",t=>{this._storedError=t}),this._request.end()}}class f extends d{constructor(t){super(t);let e=decodeURIComponent(this._url.path);l.test(this._url.href)&&(e=e.replace(/^\//,"")),s.lstat(e,(t,i)=>{if(t)return"ENOENT"===t.code&&(t=new n.MissingPDFException(`Missing PDF "${e}".`)),this._storedError=t,void this._headersCapability.reject(t);this._contentLength=i.size,this._setReadableStream(s.createReadStream(e)),this._headersCapability.resolve()})}}class m extends h{constructor(t,e,i){super(t);let n=decodeURIComponent(this._url.path);l.test(this._url.href)&&(n=n.replace(/^\//,"")),this._setReadableStream(s.createReadStream(n,{start:e,end:i-1}))}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createResponseStatusError=function(t,e){return 404===t||0===t&&e.startsWith("file:")?new n.MissingPDFException('Missing PDF "'+e+'".'):new n.UnexpectedResponseException("Unexpected server response ("+t+') while retrieving PDF "'+e+'".',t)},e.extractFilenameFromHeader=function(t){const e=t("Content-Disposition");if(e){let t=(0,a.getFilenameFromContentDispositionHeader)(e);if(t.includes("%"))try{t=decodeURIComponent(t)}catch(i){}if(/\.pdf$/i.test(t))return t}return null},e.validateRangeRequestCapabilities=function({getResponseHeader:t,isHttp:e,rangeChunkSize:i,disableRange:a}){(0,n.assert)(i>0,"Range chunk size must be larger than zero");const s={allowRangeRequests:!1,suggestedLength:void 0},o=parseInt(t("Content-Length"),10);return Number.isInteger(o)?(s.suggestedLength=o,o<=2*i||a||!e||"bytes"!==t("Accept-Ranges")||"identity"!==(t("Content-Encoding")||"identity")||(s.allowRangeRequests=!0),s):s},e.validateResponseStatus=function(t){return 200===t||206===t};var n=i(2),a=i(21)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getFilenameFromContentDispositionHeader=function(t){let e=!0,i=n("filename\\*","i").exec(t);if(i){i=i[1];let t=o(i);return t=unescape(t),t=r(t),t=c(t),s(t)}if(i=function(t){const e=[];let i;const a=n("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;null!==(i=a.exec(t));){let[,t,n,a]=i;if(t=parseInt(t,10),t in e){if(0===t)break}else e[t]=[n,a]}const s=[];for(let n=0;n<e.length&&n in e;++n){let[t,i]=e[n];i=o(i),t&&(i=unescape(i),0===n&&(i=r(i))),s.push(i)}return s.join("")}(t),i)return s(c(i));if(i=n("filename","i").exec(t),i){i=i[1];let t=o(i);return t=c(t),s(t)}function n(t,e){return new RegExp("(?:^|;)\\s*"+t+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',e)}function a(t,i){if(t){if(!/^[\x00-\xFF]+$/.test(i))return i;try{const n=new TextDecoder(t,{fatal:!0}),a=Array.from(i,(function(t){return 255&t.charCodeAt(0)}));i=n.decode(new Uint8Array(a)),e=!1}catch(n){if(/^utf-?8$/i.test(t))try{i=decodeURIComponent(escape(i)),e=!1}catch(a){}}}return i}function s(t){return e&&/[\x80-\xff]/.test(t)&&(t=a("utf-8",t),e&&(t=a("iso-8859-1",t))),t}function o(t){if(t.startsWith('"')){const e=t.slice(1).split('\\"');for(let t=0;t<e.length;++t){const i=e[t].indexOf('"');-1!==i&&(e[t]=e[t].slice(0,i),e.length=t+1),e[t]=e[t].replace(/\\(.)/g,"$1")}t=e.join('"')}return t}function r(t){const e=t.indexOf("'");return-1===e?t:a(t.slice(0,e),t.slice(e+1).replace(/^[^']*'/,""))}function c(t){return!t.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(t)?t:t.replace(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,(function(t,e,i,n){if("q"===i||"Q"===i)return a(e,n=(n=n.replace(/_/g," ")).replace(/=([0-9a-fA-F]{2})/g,(function(t,e){return String.fromCharCode(parseInt(e,16))})));try{n=atob(n)}catch(s){}return a(e,n)}))}return""}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PDFNetworkStream=void 0;var n=i(2),a=i(20);class s{constructor(t,e){this.url=t,e=e||{},this.isHttp=/^https?:/i.test(t),this.httpHeaders=this.isHttp&&e.httpHeaders||{},this.withCredentials=e.withCredentials||!1,this.getXhr=e.getXhr||function(){return new XMLHttpRequest},this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(t,e,i){const n={begin:t,end:e};for(const a in i)n[a]=i[a];return this.request(n)}requestFull(t){return this.request(t)}request(t){const e=this.getXhr(),i=this.currXhrId++,n=this.pendingRequests[i]={xhr:e};e.open("GET",this.url),e.withCredentials=this.withCredentials;for(const a in this.httpHeaders){const t=this.httpHeaders[a];void 0!==t&&e.setRequestHeader(a,t)}return this.isHttp&&"begin"in t&&"end"in t?(e.setRequestHeader("Range",`bytes=${t.begin}-${t.end-1}`),n.expectedStatus=206):n.expectedStatus=200,e.responseType="arraybuffer",t.onError&&(e.onerror=function(i){t.onError(e.status)}),e.onreadystatechange=this.onStateChange.bind(this,i),e.onprogress=this.onProgress.bind(this,i),n.onHeadersReceived=t.onHeadersReceived,n.onDone=t.onDone,n.onError=t.onError,n.onProgress=t.onProgress,e.send(null),i}onProgress(t,e){const i=this.pendingRequests[t];i&&i.onProgress&&i.onProgress(e)}onStateChange(t,e){const i=this.pendingRequests[t];if(!i)return;const a=i.xhr;if(a.readyState>=2&&i.onHeadersReceived&&(i.onHeadersReceived(),delete i.onHeadersReceived),4!==a.readyState)return;if(!(t in this.pendingRequests))return;if(delete this.pendingRequests[t],0===a.status&&this.isHttp)return void(i.onError&&i.onError(a.status));const s=a.status||200;if((200!==s||206!==i.expectedStatus)&&s!==i.expectedStatus)return void(i.onError&&i.onError(a.status));const o=function(t){const e=t.response;return"string"!=typeof e?e:(0,n.stringToBytes)(e).buffer}(a);if(206===s){const t=a.getResponseHeader("Content-Range"),e=/bytes (\d+)-(\d+)\/(\d+)/.exec(t);i.onDone({begin:parseInt(e[1],10),chunk:o})}else o?i.onDone({begin:0,chunk:o}):i.onError&&i.onError(a.status)}hasPendingRequests(){for(const t in this.pendingRequests)return!0;return!1}getRequestXhr(t){return this.pendingRequests[t].xhr}isPendingRequest(t){return t in this.pendingRequests}abortAllRequests(){for(const t in this.pendingRequests)this.abortRequest(0|t)}abortRequest(t){const e=this.pendingRequests[t].xhr;delete this.pendingRequests[t],e.abort()}}e.PDFNetworkStream=class{constructor(t){this._source=t,this._manager=new s(t.url,{httpHeaders:t.httpHeaders,withCredentials:t.withCredentials}),this._rangeChunkSize=t.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(t){const e=this._rangeRequestReaders.indexOf(t);e>=0&&this._rangeRequestReaders.splice(e,1)}getFullReader(){return(0,n.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new o(this._manager,this._source),this._fullRequestReader}getRangeReader(t,e){const i=new r(this._manager,t,e);return i.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(i),i}cancelAllRequests(t){this._fullRequestReader&&this._fullRequestReader.cancel(t),this._rangeRequestReaders.slice(0).forEach((function(e){e.cancel(t)}))}};class o{constructor(t,e){this._manager=t;const i={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=e.url,this._fullRequestId=t.requestFull(i),this._headersReceivedCapability=(0,n.createPromiseCapability)(),this._disableRange=e.disableRange||!1,this._contentLength=e.length,this._rangeChunkSize=e.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const t=this._fullRequestId,e=this._manager.getRequestXhr(t),i=t=>e.getResponseHeader(t),{allowRangeRequests:n,suggestedLength:s}=(0,a.validateRangeRequestCapabilities)({getResponseHeader:i,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});n&&(this._isRangeSupported=!0),this._contentLength=s||this._contentLength,this._filename=(0,a.extractFilenameFromHeader)(i),this._isRangeSupported&&this._manager.abortRequest(t),this._headersReceivedCapability.resolve()}_onDone(t){t&&(this._requests.length>0?this._requests.shift().resolve({value:t.chunk,done:!1}):this._cachedChunks.push(t.chunk)),this._done=!0,this._cachedChunks.length>0||(this._requests.forEach((function(t){t.resolve({value:void 0,done:!0})})),this._requests=[])}_onError(t){const e=(0,a.createResponseStatusError)(t,this._url);this._storedError=e,this._headersReceivedCapability.reject(e),this._requests.forEach((function(t){t.reject(e)})),this._requests=[],this._cachedChunks=[]}_onProgress(t){this.onProgress&&this.onProgress({loaded:t.loaded,total:t.lengthComputable?t.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersReceivedCapability.promise}async read(){if(this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const t=(0,n.createPromiseCapability)();return this._requests.push(t),t.promise}cancel(t){this._done=!0,this._headersReceivedCapability.reject(t),this._requests.forEach((function(t){t.resolve({value:void 0,done:!0})})),this._requests=[],this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class r{constructor(t,e,i){this._manager=t;const n={onDone:this._onDone.bind(this),onProgress:this._onProgress.bind(this)};this._requestId=t.requestRange(e,i,n),this._requests=[],this._queuedChunk=null,this._done=!1,this.onProgress=null,this.onClosed=null}_close(){this.onClosed&&this.onClosed(this)}_onDone(t){const e=t.chunk;this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunk=e,this._done=!0,this._requests.forEach((function(t){t.resolve({value:void 0,done:!0})})),this._requests=[],this._close()}_onProgress(t){!this.isStreamingSupported&&this.onProgress&&this.onProgress({loaded:t.loaded})}get isStreamingSupported(){return!1}async read(){if(null!==this._queuedChunk){const t=this._queuedChunk;return this._queuedChunk=null,{value:t,done:!1}}if(this._done)return{value:void 0,done:!0};const t=(0,n.createPromiseCapability)();return this._requests.push(t),t.promise}cancel(t){this._done=!0,this._requests.forEach((function(t){t.resolve({value:void 0,done:!0})})),this._requests=[],this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PDFFetchStream=void 0;var n=i(2),a=i(20);function s(t,e,i){return{method:"GET",headers:t,signal:i&&i.signal,mode:"cors",credentials:e?"include":"same-origin",redirect:"follow"}}function o(t){const e=new Headers;for(const i in t){const n=t[i];void 0!==n&&e.append(i,n)}return e}e.PDFFetchStream=class{constructor(t){this.source=t,this.isHttp=/^https?:/i.test(t.url),this.httpHeaders=this.isHttp&&t.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?this._fullRequestReader._loaded:0}getFullReader(){return(0,n.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new r(this),this._fullRequestReader}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;const i=new c(this,t,e);return this._rangeRequestReaders.push(i),i}cancelAllRequests(t){this._fullRequestReader&&this._fullRequestReader.cancel(t),this._rangeRequestReaders.slice(0).forEach((function(e){e.cancel(t)}))}};class r{constructor(t){this._stream=t,this._reader=null,this._loaded=0,this._filename=null;const e=t.source;this._withCredentials=e.withCredentials||!1,this._contentLength=e.length,this._headersCapability=(0,n.createPromiseCapability)(),this._disableRange=e.disableRange||!1,this._rangeChunkSize=e.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),"undefined"!=typeof AbortController&&(this._abortController=new AbortController),this._isStreamingSupported=!e.disableStream,this._isRangeSupported=!e.disableRange,this._headers=o(this._stream.httpHeaders);const i=e.url;fetch(i,s(this._headers,this._withCredentials,this._abortController)).then(t=>{if(!(0,a.validateResponseStatus)(t.status))throw(0,a.createResponseStatusError)(t.status,i);this._reader=t.body.getReader(),this._headersCapability.resolve();const e=e=>t.headers.get(e),{allowRangeRequests:s,suggestedLength:o}=(0,a.validateRangeRequestCapabilities)({getResponseHeader:e,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=s,this._contentLength=o||this._contentLength,this._filename=(0,a.extractFilenameFromHeader)(e),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new n.AbortException("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._headersCapability.promise;const{value:t,done:e}=await this._reader.read();return e?{value:t,done:e}:(this._loaded+=t.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(t).buffer,done:!1})}cancel(t){this._reader&&this._reader.cancel(t),this._abortController&&this._abortController.abort()}}class c{constructor(t,e,i){this._stream=t,this._reader=null,this._loaded=0;const r=t.source;this._withCredentials=r.withCredentials||!1,this._readCapability=(0,n.createPromiseCapability)(),this._isStreamingSupported=!r.disableStream,"undefined"!=typeof AbortController&&(this._abortController=new AbortController),this._headers=o(this._stream.httpHeaders),this._headers.append("Range",`bytes=${e}-${i-1}`);const c=r.url;fetch(c,s(this._headers,this._withCredentials,this._abortController)).then(t=>{if(!(0,a.validateResponseStatus)(t.status))throw(0,a.createResponseStatusError)(t.status,c);this._readCapability.resolve(),this._reader=t.body.getReader()}),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;const{value:t,done:e}=await this._reader.read();return e?{value:t,done:e}:(this._loaded+=t.byteLength,this.onProgress&&this.onProgress({loaded:this._loaded}),{value:new Uint8Array(t).buffer,done:!1})}cancel(t){this._reader&&this._reader.cancel(t),this._abortController&&this._abortController.abort()}}}])},module.exports=factory()},louq:function(t,e,i){var n;n=function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var a=e[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,i),a.l=!0,a.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)i.d(n,a,(function(e){return t[e]}).bind(null,a));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=0)}([function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"AnnotationLayerBuilder",{enumerable:!0,get:function(){return n.AnnotationLayerBuilder}}),Object.defineProperty(e,"DefaultAnnotationLayerFactory",{enumerable:!0,get:function(){return n.DefaultAnnotationLayerFactory}}),Object.defineProperty(e,"DefaultTextLayerFactory",{enumerable:!0,get:function(){return a.DefaultTextLayerFactory}}),Object.defineProperty(e,"TextLayerBuilder",{enumerable:!0,get:function(){return a.TextLayerBuilder}}),Object.defineProperty(e,"EventBus",{enumerable:!0,get:function(){return s.EventBus}}),Object.defineProperty(e,"NullL10n",{enumerable:!0,get:function(){return s.NullL10n}}),Object.defineProperty(e,"ProgressBar",{enumerable:!0,get:function(){return s.ProgressBar}}),Object.defineProperty(e,"PDFLinkService",{enumerable:!0,get:function(){return o.PDFLinkService}}),Object.defineProperty(e,"SimpleLinkService",{enumerable:!0,get:function(){return o.SimpleLinkService}}),Object.defineProperty(e,"DownloadManager",{enumerable:!0,get:function(){return r.DownloadManager}}),Object.defineProperty(e,"GenericL10n",{enumerable:!0,get:function(){return c.GenericL10n}}),Object.defineProperty(e,"PDFFindController",{enumerable:!0,get:function(){return l.PDFFindController}}),Object.defineProperty(e,"PDFHistory",{enumerable:!0,get:function(){return d.PDFHistory}}),Object.defineProperty(e,"PDFPageView",{enumerable:!0,get:function(){return h.PDFPageView}}),Object.defineProperty(e,"PDFSinglePageViewer",{enumerable:!0,get:function(){return u.PDFSinglePageViewer}}),Object.defineProperty(e,"PDFViewer",{enumerable:!0,get:function(){return p.PDFViewer}});var n=i(1),a=i(5),s=i(3),o=i(4),r=i(6),c=i(8),l=i(10),d=i(12),h=i(13),u=i(15),p=i(17)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultAnnotationLayerFactory=e.AnnotationLayerBuilder=void 0;var n=i(2),a=i(3),s=i(4);class o{constructor({pageDiv:t,pdfPage:e,linkService:i,downloadManager:n,imageResourcesPath:s="",renderInteractiveForms:o=!1,l10n:r=a.NullL10n}){this.pageDiv=t,this.pdfPage=e,this.linkService=i,this.downloadManager=n,this.imageResourcesPath=s,this.renderInteractiveForms=o,this.l10n=r,this.div=null,this._cancelled=!1}render(t,e="display"){this.pdfPage.getAnnotations({intent:e}).then(e=>{if(this._cancelled)return;const i={viewport:t.clone({dontFlip:!0}),div:this.div,annotations:e,page:this.pdfPage,imageResourcesPath:this.imageResourcesPath,renderInteractiveForms:this.renderInteractiveForms,linkService:this.linkService,downloadManager:this.downloadManager};if(this.div)n.AnnotationLayer.update(i);else{if(0===e.length)return;this.div=document.createElement("div"),this.div.className="annotationLayer",this.pageDiv.appendChild(this.div),i.div=this.div,n.AnnotationLayer.render(i),this.l10n.translate(this.div)}})}cancel(){this._cancelled=!0}hide(){this.div&&this.div.setAttribute("hidden","true")}}e.AnnotationLayerBuilder=o,e.DefaultAnnotationLayerFactory=class{createAnnotationLayerBuilder(t,e,i="",n=!1,r=a.NullL10n){return new o({pageDiv:t,pdfPage:e,imageResourcesPath:i,renderInteractiveForms:n,linkService:new s.SimpleLinkService,l10n:r})}}},function(t,e,n){"use strict";let a;a="undefined"!=typeof window&&window["pdfjs-dist/build/pdf"]?window["pdfjs-dist/build/pdf"]:i("lRFz"),t.exports=a},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isValidRotation=function(t){return Number.isInteger(t)&&t%90==0},e.isValidScrollMode=function(t){return Number.isInteger(t)&&Object.values(n).includes(t)&&t!==n.UNKNOWN},e.isValidSpreadMode=function(t){return Number.isInteger(t)&&Object.values(a).includes(t)&&t!==a.UNKNOWN},e.isPortraitOrientation=function(t){return t.width<=t.height},e.clamp=d,e.getPDFFileNameFromURL=function(t,e="document.pdf"){if("string"!=typeof t)return e;if(function(t){let e=0;const i=t.length;for(;e<i&&""===t[e].trim();)e++;return"data:"===t.substring(e,e+5).toLowerCase()}(t))return console.warn('getPDFFileNameFromURL: ignoring "data:" URL for performance reasons.'),e;const i=/[^\/?#=]+\.pdf\b(?!.*\.pdf\b)/i,n=/^(?:(?:[^:]+:)?\/\/[^\/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(t);let a=i.exec(n[1])||i.exec(n[2])||i.exec(n[3]);if(a&&(a=a[0],a.includes("%")))try{a=i.exec(decodeURIComponent(a))[0]}catch(s){}return a||e},e.noContextMenuHandler=function(t){t.preventDefault()},e.parseQueryString=function(t){const e=t.split("&"),i=Object.create(null);for(let n=0,a=e.length;n<a;++n){const t=e[n].split("="),a=t[0].toLowerCase(),s=t.length>1?t[1]:null;i[decodeURIComponent(a)]=decodeURIComponent(s)}return i},e.backtrackBeforeAllVisibleElements=o,e.getVisibleElements=function(t,e,i=!1,n=!1){const a=t.scrollTop,r=a+t.clientHeight,c=t.scrollLeft,l=c+t.clientWidth,d=[],h=e.length;let u=0===h?0:s(e,n?function(t){const e=t.div;return e.offsetLeft+e.clientLeft+e.clientWidth>c}:function(t){const e=t.div;return e.offsetTop+e.clientTop+e.clientHeight>a});u>0&&u<h&&!n&&(u=o(u,e,a));let p=n?l:-1;for(let s=u;s<h;s++){const t=e[s],i=t.div,o=i.offsetLeft+i.clientLeft,h=i.offsetTop+i.clientTop,u=i.clientWidth,b=i.clientHeight,f=o+u,m=h+b;if(-1===p)m>=r&&(p=m);else if((n?o:h)>p)break;if(m<=a||h>=r||f<=c||o>=l)continue;const g=Math.max(0,a-h)+Math.max(0,m-r),v=Math.max(0,c-o)+Math.max(0,f-l);d.push({id:t.id,x:o,y:h,view:t,percent:(b-g)*(u-v)*100/b/u|0})}const b=d[0],f=d[d.length-1];return i&&d.sort((function(t,e){const i=t.percent-e.percent;return Math.abs(i)>.001?-i:t.id-e.id})),{first:b,last:f,views:d}},e.roundToDivide=function(t,e){const i=t%e;return 0===i?t:Math.round(t-i+e)},e.getPageSizeInches=function({view:t,userUnit:e,rotate:i}){const[n,a,s,o]=t,r=i%180!=0,c=(s-n)/72*e,l=(o-a)/72*e;return{width:r?l:c,height:r?c:l}},e.approximateFraction=function(t){if(Math.floor(t)===t)return[t,1];const e=1/t;if(e>8)return[1,8];if(Math.floor(e)===e)return[1,e];const i=t>1?e:t;let n,a=0,s=1,o=1,r=1;for(;;){const t=a+o,e=s+r;if(e>8)break;i<=t/e?(o=t,r=e):(a=t,s=e)}return n=i-a/s<o/r-i?i===t?[a,s]:[s,a]:i===t?[o,r]:[r,o],n},e.getOutputScale=function(t){const e=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1);return{sx:e,sy:e,scaled:1!==e}},e.scrollIntoView=function(t,e,i=!1){let n=t.offsetParent;if(!n)return void console.error("offsetParent is not set -- cannot scroll");let a=t.offsetTop+t.clientTop,s=t.offsetLeft+t.clientLeft;for(;n.clientHeight===n.scrollHeight&&n.clientWidth===n.scrollWidth||i&&"hidden"===getComputedStyle(n).overflow;)if(n.dataset._scaleY&&(a/=n.dataset._scaleY,s/=n.dataset._scaleX),a+=n.offsetTop,s+=n.offsetLeft,n=n.offsetParent,!n)return;e&&(void 0!==e.top&&(a+=e.top),void 0!==e.left&&(s+=e.left,n.scrollLeft=s)),n.scrollTop=a},e.watchScroll=function(t,e){const i=function(i){a||(a=window.requestAnimationFrame((function(){a=null;const i=t.scrollLeft,s=n.lastX;i!==s&&(n.right=i>s),n.lastX=i;const o=t.scrollTop,r=n.lastY;o!==r&&(n.down=o>r),n.lastY=o,e(n)})))},n={right:!0,down:!0,lastX:t.scrollLeft,lastY:t.scrollTop,_eventHandler:i};let a=null;return t.addEventListener("scroll",i,!0),n},e.binarySearchFirstItem=s,e.normalizeWheelEventDelta=function(t){let e=Math.sqrt(t.deltaX*t.deltaX+t.deltaY*t.deltaY);const i=Math.atan2(t.deltaY,t.deltaX);return-.25*Math.PI<i&&i<.75*Math.PI&&(e=-e),0===t.deltaMode?e/=900:1===t.deltaMode&&(e/=30),e},e.waitOnEventOrTimeout=function({target:t,name:e,delay:i=0}){return new Promise((function(n,a){if("object"!=typeof t||!e||"string"!=typeof e||!(Number.isInteger(i)&&i>=0))throw new Error("waitOnEventOrTimeout - invalid parameters.");function s(i){t instanceof l?t._off(e,o):t.removeEventListener(e,o),d&&clearTimeout(d),n(i)}const o=s.bind(null,r.EVENT);t instanceof l?t._on(e,o):t.addEventListener(e,o);const c=s.bind(null,r.TIMEOUT),d=setTimeout(c,i)}))},e.moveToEndOfArray=function(t,e){const i=[],n=t.length;let a=0;for(let s=0;s<n;++s)e(t[s])?i.push(t[s]):(t[a]=t[s],++a);for(let s=0;a<n;++s,++a)t[a]=i[s]},e.WaitOnType=e.animationStarted=e.ProgressBar=e.EventBus=e.NullL10n=e.SpreadMode=e.ScrollMode=e.TextLayerMode=e.RendererType=e.PresentationModeState=e.VERTICAL_PADDING=e.SCROLLBAR_PADDING=e.MAX_AUTO_SCALE=e.UNKNOWN_SCALE=e.MAX_SCALE=e.MIN_SCALE=e.DEFAULT_SCALE=e.DEFAULT_SCALE_VALUE=e.CSS_UNITS=e.AutoPrintRegExp=void 0,e.CSS_UNITS=96/72,e.DEFAULT_SCALE_VALUE="auto",e.DEFAULT_SCALE=1,e.MIN_SCALE=.1,e.MAX_SCALE=10,e.UNKNOWN_SCALE=0,e.MAX_AUTO_SCALE=1.25,e.SCROLLBAR_PADDING=40,e.VERTICAL_PADDING=5,e.PresentationModeState={UNKNOWN:0,NORMAL:1,CHANGING:2,FULLSCREEN:3},e.RendererType={CANVAS:"canvas",SVG:"svg"},e.TextLayerMode={DISABLE:0,ENABLE:1,ENABLE_ENHANCE:2};const n={UNKNOWN:-1,VERTICAL:0,HORIZONTAL:1,WRAPPED:2};e.ScrollMode=n;const a={UNKNOWN:-1,NONE:0,ODD:1,EVEN:2};function s(t,e){let i=0,n=t.length-1;if(n<0||!e(t[n]))return t.length;if(e(t[i]))return i;for(;i<n;){const a=i+n>>1;e(t[a])?n=a:i=a+1}return i}function o(t,e,i){if(t<2)return t;let n=e[t].div,a=n.offsetTop+n.clientTop;a>=i&&(n=e[t-1].div,a=n.offsetTop+n.clientTop);for(let s=t-2;s>=0&&(n=e[s].div,!(n.offsetTop+n.clientTop+n.clientHeight<=a));--s)t=s;return t}e.SpreadMode=a,e.AutoPrintRegExp=/\bprint\s*\(/,e.NullL10n={getLanguage:async()=>"en-us",getDirection:async()=>"ltr",get:async(t,e,i)=>function(t,e){return e?t.replace(/\{\{\s*(\w+)\s*\}\}/g,(t,i)=>i in e?e[i]:"{{"+i+"}}"):t}(i,e),async translate(t){}};const r={EVENT:"event",TIMEOUT:"timeout"};e.WaitOnType=r;const c=new Promise((function(t){window.requestAnimationFrame(t)}));e.animationStarted=c;class l{constructor(t){this._listeners=Object.create(null)}on(t,e){this._on(t,e,{external:!0})}off(t,e){this._off(t,e,{external:!0})}dispatch(t){const e=this._listeners[t];if(!e||0===e.length)return;const i=Array.prototype.slice.call(arguments,1);let n;e.slice(0).forEach((function({listener:t,external:e}){if(e)return n||(n=[]),void n.push(t);t.apply(null,i)})),n&&(n.forEach((function(t){t.apply(null,i)})),n=null)}_on(t,e,i=null){let n=this._listeners[t];n||(this._listeners[t]=n=[]),n.push({listener:e,external:!0===(i&&i.external)})}_off(t,e,i=null){const n=this._listeners[t];if(n)for(let a=0,s=n.length;a<s;a++)if(n[a].listener===e)return void n.splice(a,1)}}function d(t,e,i){return Math.min(Math.max(t,e),i)}e.EventBus=l,e.ProgressBar=class{constructor(t,{height:e,width:i,units:n}={}){this.visible=!0,this.div=document.querySelector(t+" .progress"),this.bar=this.div.parentNode,this.height=e||100,this.width=i||100,this.units=n||"%",this.div.style.height=this.height+this.units,this.percent=0}_updateBar(){if(this._indeterminate)return this.div.classList.add("indeterminate"),void(this.div.style.width=this.width+this.units);this.div.classList.remove("indeterminate"),this.div.style.width=this.width*this._percent/100+this.units}get percent(){return this._percent}set percent(t){this._indeterminate=isNaN(t),this._percent=d(t,0,100),this._updateBar()}setWidth(t){if(!t)return;const e=t.parentNode.offsetWidth-t.offsetWidth;e>0&&(this.bar.style.width=`calc(100% - ${e}px)`)}hide(){this.visible&&(this.visible=!1,this.bar.classList.add("hidden"),document.body.classList.remove("loadingInProgress"))}show(){this.visible||(this.visible=!0,document.body.classList.add("loadingInProgress"),this.bar.classList.remove("hidden"))}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleLinkService=e.PDFLinkService=void 0;var n=i(3);e.PDFLinkService=class{constructor({eventBus:t,externalLinkTarget:e=null,externalLinkRel:i=null,externalLinkEnabled:n=!0,ignoreDestinationZoom:a=!1}={}){this.eventBus=t,this.externalLinkTarget=e,this.externalLinkRel=i,this.externalLinkEnabled=n,this._ignoreDestinationZoom=a,this.baseUrl=null,this.pdfDocument=null,this.pdfViewer=null,this.pdfHistory=null,this._pagesRefCache=null}setDocument(t,e=null){this.baseUrl=e,this.pdfDocument=t,this._pagesRefCache=Object.create(null)}setViewer(t){this.pdfViewer=t}setHistory(t){this.pdfHistory=t}get pagesCount(){return this.pdfDocument?this.pdfDocument.numPages:0}get page(){return this.pdfViewer.currentPageNumber}set page(t){this.pdfViewer.currentPageNumber=t}get rotation(){return this.pdfViewer.pagesRotation}set rotation(t){this.pdfViewer.pagesRotation=t}navigateTo(t){const e=({namedDest:i,explicitDest:n})=>{const a=n[0];let s;if(a instanceof Object){if(s=this._cachedPageNumber(a),null===s)return void this.pdfDocument.getPageIndex(a).then(t=>{this.cachePageRef(t+1,a),e({namedDest:i,explicitDest:n})}).catch(()=>{console.error(`PDFLinkService.navigateTo: "${a}" is not a valid page reference, for dest="${t}".`)})}else{if(!Number.isInteger(a))return void console.error(`PDFLinkService.navigateTo: "${a}" is not a valid destination reference, for dest="${t}".`);s=a+1}!s||s<1||s>this.pagesCount?console.error(`PDFLinkService.navigateTo: "${s}" is not a valid page number, for dest="${t}".`):(this.pdfHistory&&(this.pdfHistory.pushCurrentPosition(),this.pdfHistory.push({namedDest:i,explicitDest:n,pageNumber:s})),this.pdfViewer.scrollPageIntoView({pageNumber:s,destArray:n,ignoreDestinationZoom:this._ignoreDestinationZoom}))};new Promise((e,i)=>{"string"!=typeof t?e({namedDest:"",explicitDest:t}):this.pdfDocument.getDestination(t).then(i=>{e({namedDest:t,explicitDest:i})})}).then(i=>{Array.isArray(i.explicitDest)?e(i):console.error(`PDFLinkService.navigateTo: "${i.explicitDest}" is not a valid destination array, for dest="${t}".`)})}getDestinationHash(t){if("string"==typeof t)return this.getAnchorUrl("#"+escape(t));if(Array.isArray(t)){const e=JSON.stringify(t);return this.getAnchorUrl("#"+escape(e))}return this.getAnchorUrl("")}getAnchorUrl(t){return(this.baseUrl||"")+t}setHash(t){let e,i;if(t.includes("=")){const a=(0,n.parseQueryString)(t);if("search"in a&&this.eventBus.dispatch("findfromurlhash",{source:this,query:a.search.replace(/"/g,""),phraseSearch:"true"===a.phrase}),"page"in a&&(e=0|a.page||1),"zoom"in a){const t=a.zoom.split(","),e=t[0],n=parseFloat(e);e.includes("Fit")?"Fit"===e||"FitB"===e?i=[null,{name:e}]:"FitH"===e||"FitBH"===e||"FitV"===e||"FitBV"===e?i=[null,{name:e},t.length>1?0|t[1]:null]:"FitR"===e?5!==t.length?console.error('PDFLinkService.setHash: Not enough parameters for "FitR".'):i=[null,{name:e},0|t[1],0|t[2],0|t[3],0|t[4]]:console.error(`PDFLinkService.setHash: "${e}" is not a valid zoom value.`):i=[null,{name:"XYZ"},t.length>1?0|t[1]:null,t.length>2?0|t[2]:null,n?n/100:e]}i?this.pdfViewer.scrollPageIntoView({pageNumber:e||this.page,destArray:i,allowNegativeOffset:!0}):e&&(this.page=e),"pagemode"in a&&this.eventBus.dispatch("pagemode",{source:this,mode:a.pagemode}),"nameddest"in a&&this.navigateTo(a.nameddest)}else{i=unescape(t);try{i=JSON.parse(i),Array.isArray(i)||(i=i.toString())}catch(a){}if("string"==typeof i||function(t){if(!Array.isArray(t))return!1;const e=t.length;if(e<2)return!1;const i=t[0];if(!("object"==typeof i&&Number.isInteger(i.num)&&Number.isInteger(i.gen)||Number.isInteger(i)&&i>=0))return!1;const n=t[1];if("object"!=typeof n||"string"!=typeof n.name)return!1;let a=!0;switch(n.name){case"XYZ":if(5!==e)return!1;break;case"Fit":case"FitB":return 2===e;case"FitH":case"FitBH":case"FitV":case"FitBV":if(3!==e)return!1;break;case"FitR":if(6!==e)return!1;a=!1;break;default:return!1}for(let s=2;s<e;s++){const e=t[s];if(!("number"==typeof e||a&&null===e))return!1}return!0}(i))return void this.navigateTo(i);console.error(`PDFLinkService.setHash: "${unescape(t)}" is not a valid destination.`)}}executeNamedAction(t){switch(t){case"GoBack":this.pdfHistory&&this.pdfHistory.back();break;case"GoForward":this.pdfHistory&&this.pdfHistory.forward();break;case"NextPage":this.page<this.pagesCount&&this.page++;break;case"PrevPage":this.page>1&&this.page--;break;case"LastPage":this.page=this.pagesCount;break;case"FirstPage":this.page=1}this.eventBus.dispatch("namedaction",{source:this,action:t})}cachePageRef(t,e){e&&(this._pagesRefCache[0===e.gen?e.num+"R":`${e.num}R${e.gen}`]=t)}_cachedPageNumber(t){return this._pagesRefCache&&this._pagesRefCache[0===t.gen?t.num+"R":`${t.num}R${t.gen}`]||null}isPageVisible(t){return this.pdfViewer.isPageVisible(t)}},e.SimpleLinkService=class{constructor(){this.externalLinkTarget=null,this.externalLinkRel=null,this.externalLinkEnabled=!0,this._ignoreDestinationZoom=!1}get pagesCount(){return 0}get page(){return 0}set page(t){}get rotation(){return 0}set rotation(t){}navigateTo(t){}getDestinationHash(t){return"#"}getAnchorUrl(t){return"#"}setHash(t){}executeNamedAction(t){}cachePageRef(t,e){}isPageVisible(t){return!0}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultTextLayerFactory=e.TextLayerBuilder=void 0;var n=i(2);class a{constructor({textLayerDiv:t,eventBus:e,pageIndex:i,viewport:n,findController:a=null,enhanceTextSelection:s=!1}){this.textLayerDiv=t,this.eventBus=e,this.textContent=null,this.textContentItemsStr=[],this.textContentStream=null,this.renderingDone=!1,this.pageIdx=i,this.pageNumber=this.pageIdx+1,this.matches=[],this.viewport=n,this.textDivs=[],this.findController=a,this.textLayerRenderTask=null,this.enhanceTextSelection=s,this._onUpdateTextLayerMatches=null,this._bindMouse()}_finishRendering(){if(this.renderingDone=!0,!this.enhanceTextSelection){const t=document.createElement("div");t.className="endOfContent",this.textLayerDiv.appendChild(t)}this.eventBus.dispatch("textlayerrendered",{source:this,pageNumber:this.pageNumber,numTextDivs:this.textDivs.length})}render(t=0){if(!this.textContent&&!this.textContentStream||this.renderingDone)return;this.cancel(),this.textDivs=[];const e=document.createDocumentFragment();this.textLayerRenderTask=(0,n.renderTextLayer)({textContent:this.textContent,textContentStream:this.textContentStream,container:e,viewport:this.viewport,textDivs:this.textDivs,textContentItemsStr:this.textContentItemsStr,timeout:t,enhanceTextSelection:this.enhanceTextSelection}),this.textLayerRenderTask.promise.then(()=>{this.textLayerDiv.appendChild(e),this._finishRendering(),this._updateMatches()},(function(t){})),this._onUpdateTextLayerMatches||(this._onUpdateTextLayerMatches=t=>{t.pageIndex!==this.pageIdx&&-1!==t.pageIndex||this._updateMatches()},this.eventBus._on("updatetextlayermatches",this._onUpdateTextLayerMatches))}cancel(){this.textLayerRenderTask&&(this.textLayerRenderTask.cancel(),this.textLayerRenderTask=null),this._onUpdateTextLayerMatches&&(this.eventBus._off("updatetextlayermatches",this._onUpdateTextLayerMatches),this._onUpdateTextLayerMatches=null)}setTextContentStream(t){this.cancel(),this.textContentStream=t}setTextContent(t){this.cancel(),this.textContent=t}_convertMatches(t,e){if(!t)return[];const{findController:i,textContentItemsStr:n}=this;let a=0,s=0;const o=n.length-1,r=i.state.query.length,c=[];for(let l=0,d=t.length;l<d;l++){let i=t[l];for(;a!==o&&i>=s+n[a].length;)s+=n[a].length,a++;a===n.length&&console.error("Could not find a matching mapping");const d={begin:{divIdx:a,offset:i-s}};for(i+=e?e[l]:r;a!==o&&i>s+n[a].length;)s+=n[a].length,a++;d.end={divIdx:a,offset:i-s},c.push(d)}return c}_renderMatches(t){if(0===t.length)return;const{findController:e,pageIdx:i,textContentItemsStr:n,textDivs:a}=this,s=i===e.selected.pageIdx,o=e.selected.matchIdx;let r=null;function c(t,e){const i=t.divIdx;a[i].textContent="",l(i,0,t.offset,e)}function l(t,e,i,s){const o=a[t],r=n[t].substring(e,i),c=document.createTextNode(r);if(s){const t=document.createElement("span");return t.className=s,t.appendChild(c),void o.appendChild(t)}o.appendChild(c)}let d=o,h=d+1;if(e.state.highlightAll)d=0,h=t.length;else if(!s)return;for(let u=d;u<h;u++){const n=t[u],d=n.begin,h=n.end,p=s&&u===o,b=p?" selected":"";if(p&&e.scrollMatchIntoView({element:a[d.divIdx],pageIndex:i,matchIndex:o}),r&&d.divIdx===r.divIdx?l(r.divIdx,r.offset,d.offset):(null!==r&&l(r.divIdx,r.offset,undefined),c(d)),d.divIdx===h.divIdx)l(d.divIdx,d.offset,h.offset,"highlight"+b);else{l(d.divIdx,d.offset,undefined,"highlight begin"+b);for(let t=d.divIdx+1,e=h.divIdx;t<e;t++)a[t].className="highlight middle"+b;c(h,"highlight end"+b)}r=h}r&&l(r.divIdx,r.offset,undefined)}_updateMatches(){if(!this.renderingDone)return;const{findController:t,matches:e,pageIdx:i,textContentItemsStr:n,textDivs:a}=this;let s=-1;for(let o=0,r=e.length;o<r;o++){const t=e[o];for(let e=Math.max(s,t.begin.divIdx),i=t.end.divIdx;e<=i;e++){const t=a[e];t.textContent=n[e],t.className=""}s=t.end.divIdx+1}t&&t.highlightMatches&&(this.matches=this._convertMatches(t.pageMatches[i]||null,t.pageMatchesLength[i]||null),this._renderMatches(this.matches))}_bindMouse(){const t=this.textLayerDiv;let e=null;t.addEventListener("mousedown",i=>{if(this.enhanceTextSelection&&this.textLayerRenderTask)return this.textLayerRenderTask.expandTextDivs(!0),void(e&&(clearTimeout(e),e=null));const n=t.querySelector(".endOfContent");if(!n)return;let a=i.target!==t;if(a=a&&"none"!==window.getComputedStyle(n).getPropertyValue("-moz-user-select"),a){const e=t.getBoundingClientRect(),a=Math.max(0,(i.pageY-e.top)/e.height);n.style.top=(100*a).toFixed(2)+"%"}n.classList.add("active")}),t.addEventListener("mouseup",()=>{if(this.enhanceTextSelection&&this.textLayerRenderTask)return void(e=setTimeout(()=>{this.textLayerRenderTask&&this.textLayerRenderTask.expandTextDivs(!1),e=null},300));const i=t.querySelector(".endOfContent");i&&(i.style.top="",i.classList.remove("active"))})}}e.TextLayerBuilder=a,e.DefaultTextLayerFactory=class{createTextLayerBuilder(t,e,i,n=!1,s){return new a({textLayerDiv:t,pageIndex:e,viewport:i,enhanceTextSelection:n,eventBus:s})}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DownloadManager=void 0;var n=i(2);const a=i(7).viewerCompatibilityParams.disableCreateObjectURL||!1;function s(t,e){const i=document.createElement("a");if(!i.click)throw new Error('DownloadManager: "a.click()" is not supported.');i.href=t,i.target="_parent","download"in i&&(i.download=e),(document.body||document.documentElement).appendChild(i),i.click(),i.remove()}e.DownloadManager=class{constructor({disableCreateObjectURL:t=a}){this.disableCreateObjectURL=t}downloadUrl(t,e){(0,n.createValidAbsoluteUrl)(t,"http://example.com")&&s(t+"#pdfjs.action=download",e)}downloadData(t,e,i){navigator.msSaveBlob?navigator.msSaveBlob(new Blob([t],{type:i}),e):s((0,n.createObjectURL)(t,i,this.disableCreateObjectURL),e)}download(t,e,i){navigator.msSaveBlob?navigator.msSaveBlob(t,i)||this.downloadUrl(e,i):this.disableCreateObjectURL?this.downloadUrl(e,i):s(URL.createObjectURL(t),i)}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.viewerCompatibilityParams=void 0;const n=Object.create(null);{const t="undefined"!=typeof navigator&&navigator.userAgent||"",e="undefined"!=typeof navigator&&navigator.platform||"",i="undefined"!=typeof navigator&&navigator.maxTouchPoints||1,a=/Android/.test(t),s=/Trident/.test(t),o=/\b(iPad|iPhone|iPod)(?=;)/.test(t)||"MacIntel"===e&&i>1,r=/CriOS/.test(t);(s||r)&&(n.disableCreateObjectURL=!0),(o||a)&&(n.maxCanvasPixels=5242880)}const a=Object.freeze(n);e.viewerCompatibilityParams=a},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GenericL10n=void 0,i(9);const n=document.webL10n;e.GenericL10n=class{constructor(t){this._lang=t,this._ready=new Promise((e,i)=>{n.setLanguage(t,()=>{e(n)})})}async getLanguage(){return(await this._ready).getLanguage()}async getDirection(){return(await this._ready).getDirection()}async get(t,e,i){return(await this._ready).get(t,e,i)}async translate(t){return(await this._ready).translate(t)}}},function(t,e,i){"use strict";document.webL10n=function(t,e,i){var n={},a="",s="textContent",o="",r={},c="loading";function l(t,e,i){e=e||function(t){},i=i||function(){};var n=new XMLHttpRequest;n.open("GET",t,!0),n.overrideMimeType&&n.overrideMimeType("text/plain; charset=utf-8"),n.onreadystatechange=function(){4==n.readyState&&(200==n.status||0===n.status?e(n.responseText):i())},n.onerror=i,n.ontimeout=i;try{n.send(null)}catch(a){i()}}function d(t,e,i){var a=n[t];if(!a){if(console.warn("#"+t+" is undefined."),!i)return null;a=i}var s={};for(var o in a){var r=a[o];r=u(r=h(r,e,t,o),e,t),s[o]=r}return s}function h(t,e,i,a){var s=/\{\[\s*([a-zA-Z]+)\(([a-zA-Z]+)\)\s*\]\}/.exec(t);if(!s||!s.length)return t;var o,c=s[1],l=s[2];return e&&l in e?o=e[l]:l in n&&(o=n[l]),c in r&&(t=(0,r[c])(t,o,i,a)),t}function u(t,e,i){return t.replace(/\{\{\s*(.+?)\s*\}\}/g,(function(t,a){return e&&a in e?e[a]:a in n?n[a]:(console.log("argument {{"+a+"}} for #"+i+" is undefined."),t)}))}function p(t){var i=function(t){if(!t)return{};var e=t.getAttribute("data-l10n-id"),i=t.getAttribute("data-l10n-args"),n={};if(i)try{n=JSON.parse(i)}catch(a){console.warn("could not parse arguments for #"+e)}return{id:e,args:n}}(t);if(i.id){var n=d(i.id,i.args);if(n){if(n[s]){if(0===function(t){if(t.children)return t.children.length;if(void 0!==t.childElementCount)return t.childElementCount;for(var e=0,i=0;i<t.childNodes.length;i++)e+=1===t.nodeType?1:0;return e}(t))t[s]=n[s];else{for(var a=t.childNodes,o=!1,r=0,c=a.length;r<c;r++)3===a[r].nodeType&&/\S/.test(a[r].nodeValue)&&(o?a[r].nodeValue="":(a[r].nodeValue=n[s],o=!0));if(!o){var l=e.createTextNode(n[s]);t.insertBefore(l,t.firstChild)}}delete n[s]}for(var h in n)t[h]=n[h]}else console.warn("#"+i.id+" is undefined.")}}return r.plural=function(t,e,i,a){var c=parseFloat(e);if(isNaN(c))return t;if(a!=s)return t;r._pluralRules||(r._pluralRules=function(t){function e(t,e){return-1!==e.indexOf(t)}function i(t,e,i){return e<=t&&t<=i}var n={0:function(t){return"other"},1:function(t){return i(t%100,3,10)?"few":0===t?"zero":i(t%100,11,99)?"many":2==t?"two":1==t?"one":"other"},2:function(t){return 0!==t&&t%10==0?"many":2==t?"two":1==t?"one":"other"},3:function(t){return 1==t?"one":"other"},4:function(t){return i(t,0,1)?"one":"other"},5:function(t){return i(t,0,2)&&2!=t?"one":"other"},6:function(t){return 0===t?"zero":t%10==1&&t%100!=11?"one":"other"},7:function(t){return 2==t?"two":1==t?"one":"other"},8:function(t){return i(t,3,6)?"few":i(t,7,10)?"many":2==t?"two":1==t?"one":"other"},9:function(t){return 0===t||1!=t&&i(t%100,1,19)?"few":1==t?"one":"other"},10:function(t){return i(t%10,2,9)&&!i(t%100,11,19)?"few":t%10!=1||i(t%100,11,19)?"other":"one"},11:function(t){return i(t%10,2,4)&&!i(t%100,12,14)?"few":t%10==0||i(t%10,5,9)||i(t%100,11,14)?"many":t%10==1&&t%100!=11?"one":"other"},12:function(t){return i(t,2,4)?"few":1==t?"one":"other"},13:function(t){return i(t%10,2,4)&&!i(t%100,12,14)?"few":1!=t&&i(t%10,0,1)||i(t%10,5,9)||i(t%100,12,14)?"many":1==t?"one":"other"},14:function(t){return i(t%100,3,4)?"few":t%100==2?"two":t%100==1?"one":"other"},15:function(t){return 0===t||i(t%100,2,10)?"few":i(t%100,11,19)?"many":1==t?"one":"other"},16:function(t){return t%10==1&&11!=t?"one":"other"},17:function(t){return 3==t?"few":0===t?"zero":6==t?"many":2==t?"two":1==t?"one":"other"},18:function(t){return 0===t?"zero":i(t,0,2)&&0!==t&&2!=t?"one":"other"},19:function(t){return i(t,2,10)?"few":i(t,0,1)?"one":"other"},20:function(t){return!i(t%10,3,4)&&t%10!=9||i(t%100,10,19)||i(t%100,70,79)||i(t%100,90,99)?t%1e6==0&&0!==t?"many":t%10!=2||e(t%100,[12,72,92])?t%10!=1||e(t%100,[11,71,91])?"other":"one":"two":"few"},21:function(t){return 0===t?"zero":1==t?"one":"other"},22:function(t){return i(t,0,1)||i(t,11,99)?"one":"other"},23:function(t){return i(t%10,1,2)||t%20==0?"one":"other"},24:function(t){return i(t,3,10)||i(t,13,19)?"few":e(t,[2,12])?"two":e(t,[1,11])?"one":"other"}},a={af:3,ak:4,am:4,ar:1,asa:3,az:0,be:11,bem:3,bez:3,bg:3,bh:4,bm:0,bn:3,bo:0,br:20,brx:3,bs:11,ca:3,cgg:3,chr:3,cs:12,cy:17,da:3,de:3,dv:3,dz:0,ee:3,el:3,en:3,eo:3,es:3,et:3,eu:3,fa:0,ff:5,fi:3,fil:4,fo:3,fr:5,fur:3,fy:3,ga:8,gd:24,gl:3,gsw:3,gu:3,guw:4,gv:23,ha:3,haw:3,he:2,hi:4,hr:11,hu:0,id:0,ig:0,ii:0,is:3,it:3,iu:7,ja:0,jmc:3,jv:0,ka:0,kab:5,kaj:3,kcg:3,kde:0,kea:0,kk:3,kl:3,km:0,kn:0,ko:0,ksb:3,ksh:21,ku:3,kw:7,lag:18,lb:3,lg:3,ln:4,lo:0,lt:10,lv:6,mas:3,mg:4,mk:16,ml:3,mn:3,mo:9,mr:3,ms:0,mt:15,my:0,nah:3,naq:7,nb:3,nd:3,ne:3,nl:3,nn:3,no:3,nr:3,nso:4,ny:3,nyn:3,om:3,or:3,pa:3,pap:3,pl:13,ps:3,pt:3,rm:3,ro:9,rof:3,ru:11,rwk:3,sah:0,saq:3,se:7,seh:3,ses:0,sg:0,sh:11,shi:19,sk:12,sl:14,sma:7,smi:7,smj:7,smn:7,sms:7,sn:3,so:3,sq:3,sr:11,ss:3,ssy:3,st:3,sv:3,sw:3,syr:3,ta:3,te:3,teo:3,th:0,ti:4,tig:3,tk:3,tl:4,tn:3,to:0,tr:0,ts:3,tzm:22,uk:11,ur:3,ve:3,vi:0,vun:3,wa:4,wae:3,wo:0,xh:3,xog:3,yo:0,zh:0,zu:3}[t.replace(/-.*$/,"")];return a in n?n[a]:(console.warn("plural form unknown for ["+t+"]"),function(){return"other"})}(o));var l="["+r._pluralRules(c)+"]";return 0===c&&i+"[zero]"in n?t=n[i+"[zero]"][a]:1==c&&i+"[one]"in n?t=n[i+"[one]"][a]:2==c&&i+"[two]"in n?t=n[i+"[two]"][a]:i+l in n?t=n[i+l][a]:i+"[other]"in n&&(t=n[i+"[other]"][a]),t},{get:function(t,e,i){var n,a=t.lastIndexOf("."),o=s;a>0&&(o=t.substring(a+1),t=t.substring(0,a)),i&&((n={})[o]=i);var r=d(t,e,n);return r&&o in r?r[o]:"{{"+t+"}}"},getData:function(){return n},getText:function(){return a},getLanguage:function(){return o},setLanguage:function(t,i){!function(t,i){t&&(t=t.toLowerCase()),i=i||function(){},n={},a="",o="",o=t;var r=e.querySelectorAll('link[type="application/l10n"]'),d=r.length;if(0!==d){var h,u,p=0;u=function(){++p>=d&&(i(),c="complete")};for(var b=0;b<d;b++)new v(r[b]).load(t,u)}else{var f=(h=e.querySelector('script[type="application/l10n"]'))?JSON.parse(h.innerHTML):null;if(f&&f.locales&&f.default_locale){if(console.log("using the embedded JSON directory, early way out"),!(n=f.locales[t])){var m=f.default_locale.toLowerCase();for(var g in f.locales){if((g=g.toLowerCase())===t){n=f.locales[t];break}g===m&&(n=f.locales[m])}}i()}else console.log("no resource to load, early way out");c="complete"}function v(t){var e=t.href;this.load=function(t,i){!function(t,e,i,o){var r=t.replace(/[^\/]*$/,"")||"./";function c(t){return t.lastIndexOf("\\")<0?t:t.replace(/\\\\/g,"\\").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\b/g,"\b").replace(/\\f/g,"\f").replace(/\\{/g,"{").replace(/\\}/g,"}").replace(/\\"/g,'"').replace(/\\'/g,"'")}l(t,(function(t){a+=t,function(t,a){var o={},d=/^\s*|\s*$/,h=/^\s*#|^\s*$/,u=/^\s*\[(.*)\]\s*$/,p=/^\s*@import\s+url\((.*)\)\s*$/i,b=/^([^=\s]*)\s*=\s*(.+)$/;function f(t,i,n){var a=t.replace(d,"").split(/[\r\n]+/),s="*",l=e.split("-",1)[0],f=!1,g="";!function t(){for(;;){if(!a.length)return void n();var d=a.shift();if(!h.test(d)){if(i){if(g=u.exec(d)){s=g[1].toLowerCase(),f="*"!==s&&s!==e&&s!==l;continue}if(f)continue;if(g=p.exec(d))return void m(r+g[1],t)}var v=d.match(b);v&&3==v.length&&(o[v[1]]=c(v[2]))}}}()}function m(t,e){l(t,(function(t){f(t,!1,e)}),(function(){console.warn(t+" not found."),e()}))}f(t,!0,(function(){!function(t){for(var e in t){var a,o,r=e.lastIndexOf(".");r>0?(a=e.substring(0,r),o=e.substring(r+1)):(a=e,o=s),n[a]||(n[a]={}),n[a][o]=t[e]}i&&i()}(o)}))}(t)}),o)}(e,t,i,(function(){console.warn(e+" not found."),console.warn('"'+t+'" resource not found'),o="",i()}))}}}(t,(function(){i&&i()}))},getDirection:function(){var t=o.split("-",1)[0];return["ar","he","fa","ps","ur"].indexOf(t)>=0?"rtl":"ltr"},translate:function(t){for(var i=function(t){return t?t.querySelectorAll("*[data-l10n-id]"):[]}(t=t||e.documentElement),n=i.length,a=0;a<n;a++)p(i[a]);p(t)},getReadyState:function(){return c},ready:function(i){i&&("complete"==c||"interactive"==c?t.setTimeout((function(){i()})):e.addEventListener&&e.addEventListener("localized",(function t(){e.removeEventListener("localized",t),i()})))}}}(window,document)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PDFFindController=e.FindState=void 0;var n=i(2),a=i(11),s=i(3);const o={FOUND:0,NOT_FOUND:1,WRAPPED:2,PENDING:3};e.FindState=o;const r={"\u2018":"'","\u2019":"'","\u201a":"'","\u201b":"'","\u201c":'"',"\u201d":'"',"\u201e":'"',"\u201f":'"',"\xbc":"1/4","\xbd":"1/2","\xbe":"3/4"};let c=null;function l(t){if(!c){const t=Object.keys(r).join("");c=new RegExp(`[${t}]`,"g")}return t.replace(c,(function(t){return r[t]}))}e.PDFFindController=class{constructor({linkService:t,eventBus:e}){this._linkService=t,this._eventBus=e,this._reset(),e._on("findbarclose",this._onFindBarClose.bind(this))}get highlightMatches(){return this._highlightMatches}get pageMatches(){return this._pageMatches}get pageMatchesLength(){return this._pageMatchesLength}get selected(){return this._selected}get state(){return this._state}setDocument(t){this._pdfDocument&&this._reset(),t&&(this._pdfDocument=t,this._firstPageCapability.resolve())}executeCommand(t,e){if(!e)return;const i=this._pdfDocument;(null===this._state||this._shouldDirtyMatch(t,e))&&(this._dirtyMatch=!0),this._state=e,"findhighlightallchange"!==t&&this._updateUIState(o.PENDING),this._firstPageCapability.promise.then(()=>{if(!this._pdfDocument||i&&this._pdfDocument!==i)return;this._extractText();const e=!this._highlightMatches,n=!!this._findTimeout;this._findTimeout&&(clearTimeout(this._findTimeout),this._findTimeout=null),"find"===t?this._findTimeout=setTimeout(()=>{this._nextMatch(),this._findTimeout=null},250):this._dirtyMatch?this._nextMatch():"findagain"===t?(this._nextMatch(),e&&this._state.highlightAll&&this._updateAllPages()):"findhighlightallchange"===t?(n?this._nextMatch():this._highlightMatches=!0,this._updateAllPages()):this._nextMatch()})}scrollMatchIntoView({element:t=null,pageIndex:e=-1,matchIndex:i=-1}){this._scrollMatches&&t&&-1!==i&&i===this._selected.matchIdx&&-1!==e&&e===this._selected.pageIdx&&(this._scrollMatches=!1,(0,s.scrollIntoView)(t,{top:-50,left:-400},!0))}_reset(){this._highlightMatches=!1,this._scrollMatches=!1,this._pdfDocument=null,this._pageMatches=[],this._pageMatchesLength=[],this._state=null,this._selected={pageIdx:-1,matchIdx:-1},this._offset={pageIdx:null,matchIdx:null,wrapped:!1},this._extractTextPromises=[],this._pageContents=[],this._matchesCountTotal=0,this._pagesToSearch=null,this._pendingFindMatches=Object.create(null),this._resumePageIdx=null,this._dirtyMatch=!1,clearTimeout(this._findTimeout),this._findTimeout=null,this._firstPageCapability=(0,n.createPromiseCapability)()}get _query(){return this._state.query!==this._rawQuery&&(this._rawQuery=this._state.query,this._normalizedQuery=l(this._state.query)),this._normalizedQuery}_shouldDirtyMatch(t,e){if(e.query!==this._state.query)return!0;switch(t){case"findagain":const t=this._selected.pageIdx+1,e=this._linkService;return t>=1&&t<=e.pagesCount&&t!==e.page&&!e.isPageVisible(t);case"findhighlightallchange":return!1}return!0}_prepareMatches(t,e,i){function n(e){const i=t[e];if(e<t.length-1&&i.match===t[e+1].match)return i.skipped=!0,!0;for(let n=e-1;n>=0;n--){const e=t[n];if(!e.skipped){if(e.match+e.matchLength<i.match)break;if(e.match+e.matchLength>=i.match+i.matchLength)return i.skipped=!0,!0}}return!1}t.sort((function(t,e){return t.match===e.match?t.matchLength-e.matchLength:t.match-e.match}));for(let a=0,s=t.length;a<s;a++)n(a)||(e.push(t[a].match),i.push(t[a].matchLength))}_isEntireWord(t,e,i){if(e>0){const i=t.charCodeAt(e),n=t.charCodeAt(e-1);if((0,a.getCharacterType)(i)===(0,a.getCharacterType)(n))return!1}const n=e+i-1;if(n<t.length-1){const e=t.charCodeAt(n),i=t.charCodeAt(n+1);if((0,a.getCharacterType)(e)===(0,a.getCharacterType)(i))return!1}return!0}_calculatePhraseMatch(t,e,i,n){const a=[],s=t.length;let o=-s;for(;o=i.indexOf(t,o+s),-1!==o;)n&&!this._isEntireWord(i,o,s)||a.push(o);this._pageMatches[e]=a}_calculateWordMatch(t,e,i,n){const a=[],s=t.match(/\S+/g);for(let o=0,r=s.length;o<r;o++){const t=s[o],e=t.length;let r=-e;for(;r=i.indexOf(t,r+e),-1!==r;)n&&!this._isEntireWord(i,r,e)||a.push({match:r,matchLength:e,skipped:!1})}this._pageMatchesLength[e]=[],this._pageMatches[e]=[],this._prepareMatches(a,this._pageMatches[e],this._pageMatchesLength[e])}_calculateMatch(t){let e=this._pageContents[t],i=this._query;const{caseSensitive:n,entireWord:a,phraseSearch:s}=this._state;if(0===i.length)return;n||(e=e.toLowerCase(),i=i.toLowerCase()),s?this._calculatePhraseMatch(i,t,e,a):this._calculateWordMatch(i,t,e,a),this._state.highlightAll&&this._updatePage(t),this._resumePageIdx===t&&(this._resumePageIdx=null,this._nextPageMatch());const o=this._pageMatches[t].length;o>0&&(this._matchesCountTotal+=o,this._updateUIResultsCount())}_extractText(){if(this._extractTextPromises.length>0)return;let t=Promise.resolve();for(let e=0,i=this._linkService.pagesCount;e<i;e++){const i=(0,n.createPromiseCapability)();this._extractTextPromises[e]=i.promise,t=t.then(()=>this._pdfDocument.getPage(e+1).then(t=>t.getTextContent({normalizeWhitespace:!0})).then(t=>{const n=t.items,a=[];for(let e=0,i=n.length;e<i;e++)a.push(n[e].str);this._pageContents[e]=l(a.join("")),i.resolve(e)},t=>{console.error("Unable to get text content for page "+(e+1),t),this._pageContents[e]="",i.resolve(e)}))}}_updatePage(t){this._scrollMatches&&this._selected.pageIdx===t&&(this._linkService.page=t+1),this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:t})}_updateAllPages(){this._eventBus.dispatch("updatetextlayermatches",{source:this,pageIndex:-1})}_nextMatch(){const t=this._state.findPrevious,e=this._linkService.page-1,i=this._linkService.pagesCount;if(this._highlightMatches=!0,this._dirtyMatch){this._dirtyMatch=!1,this._selected.pageIdx=this._selected.matchIdx=-1,this._offset.pageIdx=e,this._offset.matchIdx=null,this._offset.wrapped=!1,this._resumePageIdx=null,this._pageMatches.length=0,this._pageMatchesLength.length=0,this._matchesCountTotal=0,this._updateAllPages();for(let t=0;t<i;t++)!0!==this._pendingFindMatches[t]&&(this._pendingFindMatches[t]=!0,this._extractTextPromises[t].then(t=>{delete this._pendingFindMatches[t],this._calculateMatch(t)}))}if(""===this._query)return void this._updateUIState(o.FOUND);if(this._resumePageIdx)return;const n=this._offset;if(this._pagesToSearch=i,null!==n.matchIdx){const e=this._pageMatches[n.pageIdx].length;if(!t&&n.matchIdx+1<e||t&&n.matchIdx>0)return n.matchIdx=t?n.matchIdx-1:n.matchIdx+1,void this._updateMatch(!0);this._advanceOffsetPage(t)}this._nextPageMatch()}_matchesReady(t){const e=this._offset,i=t.length,n=this._state.findPrevious;return i?(e.matchIdx=n?i-1:0,this._updateMatch(!0),!0):(this._advanceOffsetPage(n),!!(e.wrapped&&(e.matchIdx=null,this._pagesToSearch<0))&&(this._updateMatch(!1),!0))}_nextPageMatch(){null!==this._resumePageIdx&&console.error("There can only be one pending page.");let t=null;do{const e=this._offset.pageIdx;if(t=this._pageMatches[e],!t){this._resumePageIdx=e;break}}while(!this._matchesReady(t))}_advanceOffsetPage(t){const e=this._offset,i=this._linkService.pagesCount;e.pageIdx=t?e.pageIdx-1:e.pageIdx+1,e.matchIdx=null,this._pagesToSearch--,(e.pageIdx>=i||e.pageIdx<0)&&(e.pageIdx=t?i-1:0,e.wrapped=!0)}_updateMatch(t=!1){let e=o.NOT_FOUND;const i=this._offset.wrapped;if(this._offset.wrapped=!1,t){const t=this._selected.pageIdx;this._selected.pageIdx=this._offset.pageIdx,this._selected.matchIdx=this._offset.matchIdx,e=i?o.WRAPPED:o.FOUND,-1!==t&&t!==this._selected.pageIdx&&this._updatePage(t)}this._updateUIState(e,this._state.findPrevious),-1!==this._selected.pageIdx&&(this._scrollMatches=!0,this._updatePage(this._selected.pageIdx))}_onFindBarClose(t){const e=this._pdfDocument;this._firstPageCapability.promise.then(()=>{!this._pdfDocument||e&&this._pdfDocument!==e||(this._findTimeout&&(clearTimeout(this._findTimeout),this._findTimeout=null),this._resumePageIdx&&(this._resumePageIdx=null,this._dirtyMatch=!0),this._updateUIState(o.FOUND),this._highlightMatches=!1,this._updateAllPages())})}_requestMatchesCount(){const{pageIdx:t,matchIdx:e}=this._selected;let i=0,n=this._matchesCountTotal;if(-1!==e){for(let e=0;e<t;e++)i+=this._pageMatches[e]&&this._pageMatches[e].length||0;i+=e+1}return(i<1||i>n)&&(i=n=0),{current:i,total:n}}_updateUIResultsCount(){this._eventBus.dispatch("updatefindmatchescount",{source:this,matchesCount:this._requestMatchesCount()})}_updateUIState(t,e){this._eventBus.dispatch("updatefindcontrolstate",{source:this,state:t,previous:e,matchesCount:this._requestMatchesCount()})}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCharacterType=function(t){return function(t){return t<11904}(t)?function(t){return 0==(65408&t)}(t)?function(t){return 32===t||9===t||13===t||10===t}(t)?n.SPACE:function(t){return t>=97&&t<=122||t>=65&&t<=90}(t)||function(t){return t>=48&&t<=57}(t)||95===t?n.ALPHA_LETTER:n.PUNCT:function(t){return 3584==(65408&t)}(t)?n.THAI_LETTER:160===t?n.SPACE:n.ALPHA_LETTER:function(t){return t>=13312&&t<=40959||t>=63744&&t<=64255}(t)?n.HAN_LETTER:function(t){return t>=12448&&t<=12543}(t)?n.KATAKANA_LETTER:function(t){return t>=12352&&t<=12447}(t)?n.HIRAGANA_LETTER:function(t){return t>=65376&&t<=65439}(t)?n.HALFWIDTH_KATAKANA_LETTER:n.ALPHA_LETTER},e.CharacterType=void 0;const n={SPACE:0,ALPHA_LETTER:1,PUNCT:2,HAN_LETTER:3,KATAKANA_LETTER:4,HIRAGANA_LETTER:5,HALFWIDTH_KATAKANA_LETTER:6,THAI_LETTER:7};e.CharacterType=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isDestHashesEqual=s,e.isDestArraysEqual=o,e.PDFHistory=void 0;var n=i(3);function a(){return document.location.hash}function s(t,e){if("string"!=typeof t||"string"!=typeof e)return!1;if(t===e)return!0;const{nameddest:i}=(0,n.parseQueryString)(t);return i===e}function o(t,e){function i(t,e){if(typeof t!=typeof e)return!1;if(Array.isArray(t)||Array.isArray(e))return!1;if(null!==t&&"object"==typeof t&&null!==e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!i(t[n],e[n]))return!1;return!0}return t===e||Number.isNaN(t)&&Number.isNaN(e)}if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t.length!==e.length)return!1;for(let n=0,a=t.length;n<a;n++)if(!i(t[n],e[n]))return!1;return!0}e.PDFHistory=class{constructor({linkService:t,eventBus:e}){this.linkService=t,this.eventBus=e,this._initialized=!1,this._fingerprint="",this.reset(),this._boundEvents=null,this._isViewerInPresentationMode=!1,this.eventBus._on("presentationmodechanged",t=>{this._isViewerInPresentationMode=t.active||t.switchInProgress}),this.eventBus._on("pagesinit",()=>{this._isPagesLoaded=!1;const t=e=>{this.eventBus._off("pagesloaded",t),this._isPagesLoaded=!!e.pagesCount};this.eventBus._on("pagesloaded",t)})}initialize({fingerprint:t,resetHistory:e=!1,updateUrl:i=!1}){if(!t||"string"!=typeof t)return void console.error('PDFHistory.initialize: The "fingerprint" must be a non-empty string.');this._initialized&&this.reset();const n=""!==this._fingerprint&&this._fingerprint!==t;this._fingerprint=t,this._updateUrl=!0===i,this._initialized=!0,this._bindEvents();const s=window.history.state;if(this._popStateInProgress=!1,this._blockHashChange=0,this._currentHash=a(),this._numPositionUpdates=0,this._uid=this._maxUid=0,this._destination=null,this._position=null,!this._isValidState(s,!0)||e){const{hash:t,page:i,rotation:a}=this._parseCurrentHash(!0);return!t||n||e?void this._pushOrReplaceState(null,!0):void this._pushOrReplaceState({hash:t,page:i,rotation:a},!0)}const o=s.destination;this._updateInternalState(o,s.uid,!0),this._uid>this._maxUid&&(this._maxUid=this._uid),void 0!==o.rotation&&(this._initialRotation=o.rotation),o.dest?(this._initialBookmark=JSON.stringify(o.dest),this._destination.page=null):o.hash?this._initialBookmark=o.hash:o.page&&(this._initialBookmark="page="+o.page)}reset(){this._initialized&&(this._pageHide(),this._initialized=!1,this._unbindEvents()),this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),this._initialBookmark=null,this._initialRotation=null}push({namedDest:t=null,explicitDest:e,pageNumber:i}){if(!this._initialized)return;if(t&&"string"!=typeof t)return void console.error(`PDFHistory.push: "${t}" is not a valid namedDest parameter.`);if(!Array.isArray(e))return void console.error(`PDFHistory.push: "${e}" is not a valid explicitDest parameter.`);if(!(Number.isInteger(i)&&i>0&&i<=this.linkService.pagesCount)&&(null!==i||this._destination))return void console.error(`PDFHistory.push: "${i}" is not a valid pageNumber parameter.`);const n=t||JSON.stringify(e);if(!n)return;let a=!1;if(this._destination&&(s(this._destination.hash,n)||o(this._destination.dest,e))){if(this._destination.page)return;a=!0}this._popStateInProgress&&!a||(this._pushOrReplaceState({dest:e,hash:n,page:i,rotation:this.linkService.rotation},a),this._popStateInProgress||(this._popStateInProgress=!0,Promise.resolve().then(()=>{this._popStateInProgress=!1})))}pushCurrentPosition(){this._initialized&&!this._popStateInProgress&&this._tryPushCurrentPosition()}back(){if(!this._initialized||this._popStateInProgress)return;const t=window.history.state;this._isValidState(t)&&t.uid>0&&window.history.back()}forward(){if(!this._initialized||this._popStateInProgress)return;const t=window.history.state;this._isValidState(t)&&t.uid<this._maxUid&&window.history.forward()}get popStateInProgress(){return this._initialized&&(this._popStateInProgress||this._blockHashChange>0)}get initialBookmark(){return this._initialized?this._initialBookmark:null}get initialRotation(){return this._initialized?this._initialRotation:null}_pushOrReplaceState(t,e=!1){const i=e||!this._destination,n={fingerprint:this._fingerprint,uid:i?this._uid:this._uid+1,destination:t};let a;if(this._updateInternalState(t,n.uid),this._updateUrl&&t&&t.hash){const e=document.location.href.split("#")[0];e.startsWith("file://")||(a=`${e}#${t.hash}`)}i?window.history.replaceState(n,"",a):(this._maxUid=this._uid,window.history.pushState(n,"",a))}_tryPushCurrentPosition(t=!1){if(!this._position)return;let e=this._position;if(t&&(e=Object.assign(Object.create(null),this._position),e.temporary=!0),!this._destination)return void this._pushOrReplaceState(e);if(this._destination.temporary)return void this._pushOrReplaceState(e,!0);if(this._destination.hash===e.hash)return;if(!this._destination.page&&this._numPositionUpdates<=50)return;let i=!1;if(this._destination.page>=e.first&&this._destination.page<=e.page){if(this._destination.dest||!this._destination.first)return;i=!0}this._pushOrReplaceState(e,i)}_isValidState(t,e=!1){if(!t)return!1;if(t.fingerprint!==this._fingerprint){if(!e)return!1;{if("string"!=typeof t.fingerprint||t.fingerprint.length!==this._fingerprint.length)return!1;const[e]=performance.getEntriesByType("navigation");if(!e||"reload"!==e.type)return!1}}return!(!Number.isInteger(t.uid)||t.uid<0)&&null!==t.destination&&"object"==typeof t.destination}_updateInternalState(t,e,i=!1){this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),i&&t&&t.temporary&&delete t.temporary,this._destination=t,this._uid=e,this._numPositionUpdates=0}_parseCurrentHash(t=!1){const e=unescape(a()).substring(1),i=(0,n.parseQueryString)(e),s=i.nameddest||"";let o=0|i.page;return Number.isInteger(o)&&o>0&&o<=this.linkService.pagesCount&&!(t&&s.length>0)||(o=null),{hash:e,page:o,rotation:this.linkService.rotation}}_updateViewarea({location:t}){this._updateViewareaTimeout&&(clearTimeout(this._updateViewareaTimeout),this._updateViewareaTimeout=null),this._position={hash:this._isViewerInPresentationMode?"page="+t.pageNumber:t.pdfOpenParams.substring(1),page:this.linkService.page,first:t.pageNumber,rotation:t.rotation},this._popStateInProgress||(this._isPagesLoaded&&this._destination&&!this._destination.page&&this._numPositionUpdates++,this._updateViewareaTimeout=setTimeout(()=>{this._popStateInProgress||this._tryPushCurrentPosition(!0),this._updateViewareaTimeout=null},1e3))}_popState({state:t}){const e=a(),i=this._currentHash!==e;if(this._currentHash=e,!t){this._uid++;const{hash:t,page:e,rotation:i}=this._parseCurrentHash();return void this._pushOrReplaceState({hash:t,page:e,rotation:i},!0)}if(!this._isValidState(t))return;this._popStateInProgress=!0,i&&(this._blockHashChange++,(0,n.waitOnEventOrTimeout)({target:window,name:"hashchange",delay:1e3}).then(()=>{this._blockHashChange--}));const s=t.destination;this._updateInternalState(s,t.uid,!0),this._uid>this._maxUid&&(this._maxUid=this._uid),(0,n.isValidRotation)(s.rotation)&&(this.linkService.rotation=s.rotation),s.dest?this.linkService.navigateTo(s.dest):s.hash?this.linkService.setHash(s.hash):s.page&&(this.linkService.page=s.page),Promise.resolve().then(()=>{this._popStateInProgress=!1})}_pageHide(){this._destination&&!this._destination.temporary||this._tryPushCurrentPosition()}_bindEvents(){this._boundEvents||(this._boundEvents={updateViewarea:this._updateViewarea.bind(this),popState:this._popState.bind(this),pageHide:this._pageHide.bind(this)},this.eventBus._on("updateviewarea",this._boundEvents.updateViewarea),window.addEventListener("popstate",this._boundEvents.popState),window.addEventListener("pagehide",this._boundEvents.pageHide))}_unbindEvents(){this._boundEvents&&(this.eventBus._off("updateviewarea",this._boundEvents.updateViewarea),window.removeEventListener("popstate",this._boundEvents.popState),window.removeEventListener("pagehide",this._boundEvents.pageHide),this._boundEvents=null)}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PDFPageView=void 0;var n=i(3),a=i(2),s=i(14);const o=i(7).viewerCompatibilityParams.maxCanvasPixels||16777216;e.PDFPageView=class{constructor(t){const e=t.container,i=t.defaultViewport;this.id=t.id,this.renderingId="page"+this.id,this.pdfPage=null,this.pageLabel=null,this.rotation=0,this.scale=t.scale||n.DEFAULT_SCALE,this.viewport=i,this.pdfPageRotate=i.rotation,this.hasRestrictedScaling=!1,this.textLayerMode=Number.isInteger(t.textLayerMode)?t.textLayerMode:n.TextLayerMode.ENABLE,this.imageResourcesPath=t.imageResourcesPath||"",this.renderInteractiveForms=t.renderInteractiveForms||!1,this.useOnlyCssZoom=t.useOnlyCssZoom||!1,this.maxCanvasPixels=t.maxCanvasPixels||o,this.eventBus=t.eventBus,this.renderingQueue=t.renderingQueue,this.textLayerFactory=t.textLayerFactory,this.annotationLayerFactory=t.annotationLayerFactory,this.renderer=t.renderer||n.RendererType.CANVAS,this.enableWebGL=t.enableWebGL||!1,this.l10n=t.l10n||n.NullL10n,this.paintTask=null,this.paintedViewportMap=new WeakMap,this.renderingState=s.RenderingStates.INITIAL,this.resume=null,this.error=null,this.annotationLayer=null,this.textLayer=null,this.zoomLayer=null;const a=document.createElement("div");a.className="page",a.style.width=Math.floor(this.viewport.width)+"px",a.style.height=Math.floor(this.viewport.height)+"px",a.setAttribute("data-page-number",this.id),this.div=a,e.appendChild(a)}setPdfPage(t){this.pdfPage=t,this.pdfPageRotate=t.rotate,this.viewport=t.getViewport({scale:this.scale*n.CSS_UNITS,rotation:(this.rotation+this.pdfPageRotate)%360}),this.stats=t.stats,this.reset()}destroy(){this.reset(),this.pdfPage&&this.pdfPage.cleanup()}_resetZoomLayer(t=!1){if(!this.zoomLayer)return;const e=this.zoomLayer.firstChild;this.paintedViewportMap.delete(e),e.width=0,e.height=0,t&&this.zoomLayer.remove(),this.zoomLayer=null}reset(t=!1,e=!1){this.cancelRendering(e),this.renderingState=s.RenderingStates.INITIAL;const i=this.div;i.style.width=Math.floor(this.viewport.width)+"px",i.style.height=Math.floor(this.viewport.height)+"px";const n=i.childNodes,a=t&&this.zoomLayer||null,o=e&&this.annotationLayer&&this.annotationLayer.div||null;for(let s=n.length-1;s>=0;s--){const t=n[s];a!==t&&o!==t&&i.removeChild(t)}i.removeAttribute("data-loaded"),o?this.annotationLayer.hide():this.annotationLayer&&(this.annotationLayer.cancel(),this.annotationLayer=null),a||(this.canvas&&(this.paintedViewportMap.delete(this.canvas),this.canvas.width=0,this.canvas.height=0,delete this.canvas),this._resetZoomLayer()),this.svg&&(this.paintedViewportMap.delete(this.svg),delete this.svg),this.loadingIconDiv=document.createElement("div"),this.loadingIconDiv.className="loadingIcon",i.appendChild(this.loadingIconDiv)}update(t,e){if(this.scale=t||this.scale,void 0!==e&&(this.rotation=e),this.viewport=this.viewport.clone({scale:this.scale*n.CSS_UNITS,rotation:(this.rotation+this.pdfPageRotate)%360}),this.svg)return this.cssTransform(this.svg,!0),void this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!0,timestamp:performance.now()});let i=!1;if(this.canvas&&this.maxCanvasPixels>0){const t=this.outputScale;(Math.floor(this.viewport.width)*t.sx|0)*(Math.floor(this.viewport.height)*t.sy|0)>this.maxCanvasPixels&&(i=!0)}if(this.canvas){if(this.useOnlyCssZoom||this.hasRestrictedScaling&&i)return this.cssTransform(this.canvas,!0),void this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!0,timestamp:performance.now()});this.zoomLayer||this.canvas.hasAttribute("hidden")||(this.zoomLayer=this.canvas.parentNode,this.zoomLayer.style.position="absolute")}this.zoomLayer&&this.cssTransform(this.zoomLayer.firstChild),this.reset(!0,!0)}cancelRendering(t=!1){this.paintTask&&(this.paintTask.cancel(),this.paintTask=null),this.resume=null,this.textLayer&&(this.textLayer.cancel(),this.textLayer=null),!t&&this.annotationLayer&&(this.annotationLayer.cancel(),this.annotationLayer=null)}cssTransform(t,e=!1){const i=this.viewport.width,n=this.viewport.height,a=this.div;t.style.width=t.parentNode.style.width=a.style.width=Math.floor(i)+"px",t.style.height=t.parentNode.style.height=a.style.height=Math.floor(n)+"px";const s=this.viewport.rotation-this.paintedViewportMap.get(t).rotation,o=Math.abs(s);let r=1,c=1;if(90!==o&&270!==o||(r=n/i,c=i/n),t.style.transform="rotate("+s+"deg) scale("+r+","+c+")",this.textLayer){const t=this.textLayer.viewport,e=Math.abs(this.viewport.rotation-t.rotation);let n=i/t.width;90!==e&&270!==e||(n=i/t.height);const a=this.textLayer.textLayerDiv;let s,o;switch(e){case 0:s=o=0;break;case 90:s=0,o="-"+a.style.height;break;case 180:s="-"+a.style.width,o="-"+a.style.height;break;case 270:s="-"+a.style.width,o=0;break;default:console.error("Bad rotation value.")}a.style.transform="rotate("+e+"deg) scale("+n+", "+n+") translate("+s+", "+o+")",a.style.transformOrigin="0% 0%"}e&&this.annotationLayer&&this.annotationLayer.render(this.viewport,"display")}get width(){return this.viewport.width}get height(){return this.viewport.height}getPagePoint(t,e){return this.viewport.convertToPdfPoint(t,e)}draw(){this.renderingState!==s.RenderingStates.INITIAL&&(console.error("Must be in new state before drawing"),this.reset());const{div:t,pdfPage:e}=this;if(!e)return this.renderingState=s.RenderingStates.FINISHED,this.loadingIconDiv&&(t.removeChild(this.loadingIconDiv),delete this.loadingIconDiv),Promise.reject(new Error("pdfPage is not loaded"));this.renderingState=s.RenderingStates.RUNNING;const i=document.createElement("div");i.style.width=t.style.width,i.style.height=t.style.height,i.classList.add("canvasWrapper"),this.annotationLayer&&this.annotationLayer.div?t.insertBefore(i,this.annotationLayer.div):t.appendChild(i);let o=null;if(this.textLayerMode!==n.TextLayerMode.DISABLE&&this.textLayerFactory){const e=document.createElement("div");e.className="textLayer",e.style.width=i.style.width,e.style.height=i.style.height,this.annotationLayer&&this.annotationLayer.div?t.insertBefore(e,this.annotationLayer.div):t.appendChild(e),o=this.textLayerFactory.createTextLayerBuilder(e,this.id-1,this.viewport,this.textLayerMode===n.TextLayerMode.ENABLE_ENHANCE,this.eventBus)}this.textLayer=o;let r=null;this.renderingQueue&&(r=t=>{if(!this.renderingQueue.isHighestPriority(this))return this.renderingState=s.RenderingStates.PAUSED,void(this.resume=()=>{this.renderingState=s.RenderingStates.RUNNING,t()});t()});const c=async i=>{if(l===this.paintTask&&(this.paintTask=null),i instanceof a.RenderingCancelledException)this.error=null;else if(this.renderingState=s.RenderingStates.FINISHED,this.loadingIconDiv&&(t.removeChild(this.loadingIconDiv),delete this.loadingIconDiv),this._resetZoomLayer(!0),this.error=i,this.stats=e.stats,this.eventBus.dispatch("pagerendered",{source:this,pageNumber:this.id,cssTransform:!1,timestamp:performance.now()}),i)throw i},l=this.renderer===n.RendererType.SVG?this.paintOnSvg(i):this.paintOnCanvas(i);l.onRenderContinue=r,this.paintTask=l;const d=l.promise.then((function(){return c(null).then((function(){if(o){const t=e.streamTextContent({normalizeWhitespace:!0});o.setTextContentStream(t),o.render()}}))}),(function(t){return c(t)}));return this.annotationLayerFactory&&(this.annotationLayer||(this.annotationLayer=this.annotationLayerFactory.createAnnotationLayerBuilder(t,e,this.imageResourcesPath,this.renderInteractiveForms,this.l10n)),this.annotationLayer.render(this.viewport,"display")),t.setAttribute("data-loaded",!0),this.eventBus.dispatch("pagerender",{source:this,pageNumber:this.id}),d}paintOnCanvas(t){const e=(0,a.createPromiseCapability)(),i={promise:e.promise,onRenderContinue(t){t()},cancel(){p.cancel()}},s=this.viewport,o=document.createElement("canvas");this.l10n.get("page_canvas",{page:this.id},"Page {{page}}").then(t=>{o.setAttribute("aria-label",t)}),o.setAttribute("hidden","hidden");let r=!0;const c=function(){r&&(o.removeAttribute("hidden"),r=!1)};t.appendChild(o),this.canvas=o,o.mozOpaque=!0;const l=o.getContext("2d",{alpha:!1}),d=(0,n.getOutputScale)(l);if(this.outputScale=d,this.useOnlyCssZoom){const t=s.clone({scale:n.CSS_UNITS});d.sx*=t.width/s.width,d.sy*=t.height/s.height,d.scaled=!0}if(this.maxCanvasPixels>0){const t=Math.sqrt(this.maxCanvasPixels/(s.width*s.height));d.sx>t||d.sy>t?(d.sx=t,d.sy=t,d.scaled=!0,this.hasRestrictedScaling=!0):this.hasRestrictedScaling=!1}const h=(0,n.approximateFraction)(d.sx),u=(0,n.approximateFraction)(d.sy);o.width=(0,n.roundToDivide)(s.width*d.sx,h[0]),o.height=(0,n.roundToDivide)(s.height*d.sy,u[0]),o.style.width=(0,n.roundToDivide)(s.width,h[1])+"px",o.style.height=(0,n.roundToDivide)(s.height,u[1])+"px",this.paintedViewportMap.set(o,s);const p=this.pdfPage.render({canvasContext:l,transform:d.scaled?[d.sx,0,0,d.sy,0,0]:null,viewport:this.viewport,enableWebGL:this.enableWebGL,renderInteractiveForms:this.renderInteractiveForms});return p.onContinue=function(t){c(),i.onRenderContinue?i.onRenderContinue(t):t()},p.promise.then((function(){c(),e.resolve(void 0)}),(function(t){c(),e.reject(t)})),i}paintOnSvg(t){let e=!1;const i=()=>{if(e)throw new a.RenderingCancelledException("Rendering cancelled, page "+this.id,"svg")},o=this.pdfPage,r=this.viewport.clone({scale:n.CSS_UNITS});return{promise:o.getOperatorList().then(e=>(i(),new a.SVGGraphics(o.commonObjs,o.objs).getSVG(e,r).then(e=>{i(),this.svg=e,this.paintedViewportMap.set(e,r),e.style.width=t.style.width,e.style.height=t.style.height,this.renderingState=s.RenderingStates.FINISHED,t.appendChild(e)}))),onRenderContinue(t){t()},cancel(){e=!0}}}setPageLabel(t){this.pageLabel="string"==typeof t?t:null,null!==this.pageLabel?this.div.setAttribute("data-page-label",this.pageLabel):this.div.removeAttribute("data-page-label")}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PDFRenderingQueue=e.RenderingStates=void 0;const n={INITIAL:0,RUNNING:1,PAUSED:2,FINISHED:3};e.RenderingStates=n,e.PDFRenderingQueue=class{constructor(){this.pdfViewer=null,this.pdfThumbnailViewer=null,this.onIdle=null,this.highestPriorityPage=null,this.idleTimeout=null,this.printing=!1,this.isThumbnailViewEnabled=!1}setViewer(t){this.pdfViewer=t}setThumbnailViewer(t){this.pdfThumbnailViewer=t}isHighestPriority(t){return this.highestPriorityPage===t.renderingId}renderHighestPriority(t){this.idleTimeout&&(clearTimeout(this.idleTimeout),this.idleTimeout=null),this.pdfViewer.forceRendering(t)||this.pdfThumbnailViewer&&this.isThumbnailViewEnabled&&this.pdfThumbnailViewer.forceRendering()||this.printing||this.onIdle&&(this.idleTimeout=setTimeout(this.onIdle.bind(this),3e4))}getHighestPriority(t,e,i){const n=t.views,a=n.length;if(0===a)return null;for(let s=0;s<a;++s){const t=n[s].view;if(!this.isViewFinished(t))return t}if(i){const i=t.last.id;if(e[i]&&!this.isViewFinished(e[i]))return e[i]}else{const i=t.first.id-2;if(e[i]&&!this.isViewFinished(e[i]))return e[i]}return null}isViewFinished(t){return t.renderingState===n.FINISHED}renderView(t){switch(t.renderingState){case n.FINISHED:return!1;case n.PAUSED:this.highestPriorityPage=t.renderingId,t.resume();break;case n.RUNNING:this.highestPriorityPage=t.renderingId;break;case n.INITIAL:this.highestPriorityPage=t.renderingId,t.draw().finally(()=>{this.renderHighestPriority()}).catch(t=>{console.error(`renderView: "${t}"`)})}return!0}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PDFSinglePageViewer=void 0;var n=i(16),a=i(2);e.PDFSinglePageViewer=class extends n.BaseViewer{constructor(t){super(t),this.eventBus._on("pagesinit",t=>{this._ensurePageViewVisible()})}get _viewerElement(){return(0,a.shadow)(this,"_viewerElement",this._shadowViewer)}_resetView(){super._resetView(),this._previousPageNumber=1,this._shadowViewer=document.createDocumentFragment(),this._updateScrollDown=null}_ensurePageViewVisible(){const t=this._pages[this._currentPageNumber-1],e=this._pages[this._previousPageNumber-1],i=this.viewer.childNodes;switch(i.length){case 0:this.viewer.appendChild(t.div);break;case 1:if(i[0]!==e.div)throw new Error("_ensurePageViewVisible: Unexpected previously visible page.");if(t===e)break;this._shadowViewer.appendChild(e.div),this.viewer.appendChild(t.div),this.container.scrollTop=0;break;default:throw new Error("_ensurePageViewVisible: Only one page should be visible at a time.")}this._previousPageNumber=this._currentPageNumber}_scrollUpdate(){this._updateScrollDown&&this._updateScrollDown(),super._scrollUpdate()}_scrollIntoView({pageDiv:t,pageSpot:e=null,pageNumber:i=null}){i&&this._setCurrentPageNumber(i);const n=this._currentPageNumber>=this._previousPageNumber;this._ensurePageViewVisible(),this.update(),super._scrollIntoView({pageDiv:t,pageSpot:e,pageNumber:i}),this._updateScrollDown=()=>{this.scroll.down=n,this._updateScrollDown=null}}_getVisiblePages(){return this._getCurrentVisiblePage()}_updateHelper(t){}get _isScrollModeHorizontal(){return(0,a.shadow)(this,"_isScrollModeHorizontal",!1)}_updateScrollMode(){}_updateSpreadMode(){}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseViewer=void 0;var n=i(3),a=i(14),s=i(1),o=i(2),r=i(13),c=i(4),l=i(5);function d(t){const e=[];this.push=function(i){const n=e.indexOf(i);n>=0&&e.splice(n,1),e.push(i),e.length>t&&e.shift().destroy()},this.resize=function(i,a){if(t=i,a){const t=new Set;for(let e=0,i=a.length;e<i;++e)t.add(a[e].id);(0,n.moveToEndOfArray)(e,(function(e){return t.has(e.id)}))}for(;e.length>t;)e.shift().destroy()}}class h{constructor(t){if(this.constructor===h)throw new Error("Cannot initialize BaseViewer.");this._name=this.constructor.name,this.container=t.container,this.viewer=t.viewer||t.container.firstElementChild,this.eventBus=t.eventBus,this.linkService=t.linkService||new c.SimpleLinkService,this.downloadManager=t.downloadManager||null,this.findController=t.findController||null,this.removePageBorders=t.removePageBorders||!1,this.textLayerMode=Number.isInteger(t.textLayerMode)?t.textLayerMode:n.TextLayerMode.ENABLE,this.imageResourcesPath=t.imageResourcesPath||"",this.renderInteractiveForms=t.renderInteractiveForms||!1,this.enablePrintAutoRotate=t.enablePrintAutoRotate||!1,this.renderer=t.renderer||n.RendererType.CANVAS,this.enableWebGL=t.enableWebGL||!1,this.useOnlyCssZoom=t.useOnlyCssZoom||!1,this.maxCanvasPixels=t.maxCanvasPixels,this.l10n=t.l10n||n.NullL10n,this.defaultRenderingQueue=!t.renderingQueue,this.defaultRenderingQueue?(this.renderingQueue=new a.PDFRenderingQueue,this.renderingQueue.setViewer(this)):this.renderingQueue=t.renderingQueue,this.scroll=(0,n.watchScroll)(this.container,this._scrollUpdate.bind(this)),this.presentationModeState=n.PresentationModeState.UNKNOWN,this._onBeforeDraw=this._onAfterDraw=null,this._resetView(),this.removePageBorders&&this.viewer.classList.add("removePageBorders"),Promise.resolve().then(()=>{this.eventBus.dispatch("baseviewerinit",{source:this})})}get pagesCount(){return this._pages.length}getPageView(t){return this._pages[t]}get pageViewsReady(){return!!this._pagesCapability.settled&&this._pages.every((function(t){return t&&t.pdfPage}))}get currentPageNumber(){return this._currentPageNumber}set currentPageNumber(t){if(!Number.isInteger(t))throw new Error("Invalid page number.");this.pdfDocument&&(this._setCurrentPageNumber(t,!0)||console.error(`${this._name}.currentPageNumber: "${t}" is not a valid page.`))}_setCurrentPageNumber(t,e=!1){return this._currentPageNumber===t?(e&&this._resetCurrentPageView(),!0):0<t&&t<=this.pagesCount&&(this._currentPageNumber=t,this.eventBus.dispatch("pagechanging",{source:this,pageNumber:t,pageLabel:this._pageLabels&&this._pageLabels[t-1]}),e&&this._resetCurrentPageView(),!0)}get currentPageLabel(){return this._pageLabels&&this._pageLabels[this._currentPageNumber-1]}set currentPageLabel(t){if(!this.pdfDocument)return;let e=0|t;if(this._pageLabels){const i=this._pageLabels.indexOf(t);i>=0&&(e=i+1)}this._setCurrentPageNumber(e,!0)||console.error(`${this._name}.currentPageLabel: "${t}" is not a valid page.`)}get currentScale(){return this._currentScale!==n.UNKNOWN_SCALE?this._currentScale:n.DEFAULT_SCALE}set currentScale(t){if(isNaN(t))throw new Error("Invalid numeric scale.");this.pdfDocument&&this._setScale(t,!1)}get currentScaleValue(){return this._currentScaleValue}set currentScaleValue(t){this.pdfDocument&&this._setScale(t,!1)}get pagesRotation(){return this._pagesRotation}set pagesRotation(t){if(!(0,n.isValidRotation)(t))throw new Error("Invalid pages rotation angle.");if(!this.pdfDocument)return;if(this._pagesRotation===t)return;this._pagesRotation=t;const e=this._currentPageNumber;for(let i=0,n=this._pages.length;i<n;i++){const e=this._pages[i];e.update(e.scale,t)}this._currentScaleValue&&this._setScale(this._currentScaleValue,!0),this.eventBus.dispatch("rotationchanging",{source:this,pagesRotation:t,pageNumber:e}),this.defaultRenderingQueue&&this.update()}get firstPagePromise(){return this.pdfDocument?this._firstPageCapability.promise:null}get onePageRendered(){return this.pdfDocument?this._onePageRenderedCapability.promise:null}get pagesPromise(){return this.pdfDocument?this._pagesCapability.promise:null}get _viewerElement(){throw new Error("Not implemented: _viewerElement")}_onePageRenderedOrForceFetch(){return this.container.offsetParent&&0!==this._getVisiblePages().views.length?this._onePageRenderedCapability.promise:Promise.resolve()}setDocument(t){if(this.pdfDocument&&(this._cancelRendering(),this._resetView(),this.findController&&this.findController.setDocument(null)),this.pdfDocument=t,!t)return;const e=t.numPages,i=t.getPage(1);this._pagesCapability.promise.then(()=>{this.eventBus.dispatch("pagesloaded",{source:this,pagesCount:e})}),this._onBeforeDraw=t=>{const e=this._pages[t.pageNumber-1];e&&this._buffer.push(e)},this.eventBus._on("pagerender",this._onBeforeDraw),this._onAfterDraw=t=>{t.cssTransform||this._onePageRenderedCapability.settled||(this._onePageRenderedCapability.resolve(),this.eventBus._off("pagerendered",this._onAfterDraw),this._onAfterDraw=null)},this.eventBus._on("pagerendered",this._onAfterDraw),i.then(i=>{this._firstPageCapability.resolve(i);const a=this.currentScale,s=i.getViewport({scale:a*n.CSS_UNITS}),o=this.textLayerMode!==n.TextLayerMode.DISABLE?this:null;for(let t=1;t<=e;++t){const e=new r.PDFPageView({container:this._viewerElement,eventBus:this.eventBus,id:t,scale:a,defaultViewport:s.clone(),renderingQueue:this.renderingQueue,textLayerFactory:o,textLayerMode:this.textLayerMode,annotationLayerFactory:this,imageResourcesPath:this.imageResourcesPath,renderInteractiveForms:this.renderInteractiveForms,renderer:this.renderer,enableWebGL:this.enableWebGL,useOnlyCssZoom:this.useOnlyCssZoom,maxCanvasPixels:this.maxCanvasPixels,l10n:this.l10n});this._pages.push(e)}const c=this._pages[0];c&&(c.setPdfPage(i),this.linkService.cachePageRef(1,i.ref)),this._spreadMode!==n.SpreadMode.NONE&&this._updateSpreadMode(),this._onePageRenderedOrForceFetch().then(()=>{if(this.findController&&this.findController.setDocument(t),t.loadingParams.disableAutoFetch||e>7500)return void this._pagesCapability.resolve();let i=e-1;if(i<=0)this._pagesCapability.resolve();else for(let n=2;n<=e;++n)t.getPage(n).then(t=>{const e=this._pages[n-1];e.pdfPage||e.setPdfPage(t),this.linkService.cachePageRef(n,t.ref),0==--i&&this._pagesCapability.resolve()},t=>{console.error(`Unable to get page ${n} to initialize viewer`,t),0==--i&&this._pagesCapability.resolve()})}),this.eventBus.dispatch("pagesinit",{source:this}),this.defaultRenderingQueue&&this.update()}).catch(t=>{console.error("Unable to initialize viewer",t)})}setPageLabels(t){if(this.pdfDocument){t?Array.isArray(t)&&this.pdfDocument.numPages===t.length?this._pageLabels=t:(this._pageLabels=null,console.error(this._name+".setPageLabels: Invalid page labels.")):this._pageLabels=null;for(let t=0,e=this._pages.length;t<e;t++)this._pages[t].setPageLabel(this._pageLabels&&this._pageLabels[t])}}_resetView(){this._pages=[],this._currentPageNumber=1,this._currentScale=n.UNKNOWN_SCALE,this._currentScaleValue=null,this._pageLabels=null,this._buffer=new d(10),this._location=null,this._pagesRotation=0,this._pagesRequests=new WeakMap,this._firstPageCapability=(0,o.createPromiseCapability)(),this._onePageRenderedCapability=(0,o.createPromiseCapability)(),this._pagesCapability=(0,o.createPromiseCapability)(),this._scrollMode=n.ScrollMode.VERTICAL,this._spreadMode=n.SpreadMode.NONE,this._onBeforeDraw&&(this.eventBus._off("pagerender",this._onBeforeDraw),this._onBeforeDraw=null),this._onAfterDraw&&(this.eventBus._off("pagerendered",this._onAfterDraw),this._onAfterDraw=null),this.viewer.textContent="",this._updateScrollMode()}_scrollUpdate(){0!==this.pagesCount&&this.update()}_scrollIntoView({pageDiv:t,pageSpot:e=null,pageNumber:i=null}){(0,n.scrollIntoView)(t,e)}_setScaleUpdatePages(t,e,i=!1,n=!1){if(this._currentScaleValue=e.toString(),function(t,e){return e===t||Math.abs(e-t)<1e-15}(this._currentScale,t))n&&this.eventBus.dispatch("scalechanging",{source:this,scale:t,presetValue:e});else{for(let e=0,i=this._pages.length;e<i;e++)this._pages[e].update(t);if(this._currentScale=t,!i){let t,e=this._currentPageNumber;!this._location||this.isInPresentationMode||this.isChangingPresentationMode||(e=this._location.pageNumber,t=[null,{name:"XYZ"},this._location.left,this._location.top,null]),this.scrollPageIntoView({pageNumber:e,destArray:t,allowNegativeOffset:!0})}this.eventBus.dispatch("scalechanging",{source:this,scale:t,presetValue:n?e:void 0}),this.defaultRenderingQueue&&this.update()}}_setScale(t,e=!1){let i=parseFloat(t);if(i>0)this._setScaleUpdatePages(i,t,e,!1);else{const a=this._pages[this._currentPageNumber-1];if(!a)return;const s=this.isInPresentationMode||this.removePageBorders;let o=s?0:n.SCROLLBAR_PADDING,r=s?0:n.VERTICAL_PADDING;!s&&this._isScrollModeHorizontal&&([o,r]=[r,o]);const c=(this.container.clientWidth-o)/a.width*a.scale,l=(this.container.clientHeight-r)/a.height*a.scale;switch(t){case"page-actual":i=1;break;case"page-width":i=c;break;case"page-height":i=l;break;case"page-fit":i=Math.min(c,l);break;case"auto":const e=(0,n.isPortraitOrientation)(a)?c:Math.min(l,c);i=Math.min(n.MAX_AUTO_SCALE,e);break;default:return void console.error(`${this._name}._setScale: "${t}" is an unknown zoom value.`)}this._setScaleUpdatePages(i,t,e,!0)}}_resetCurrentPageView(){this.isInPresentationMode&&this._setScale(this._currentScaleValue,!0),this._scrollIntoView({pageDiv:this._pages[this._currentPageNumber-1].div})}scrollPageIntoView({pageNumber:t,destArray:e=null,allowNegativeOffset:i=!1,ignoreDestinationZoom:a=!1}){if(!this.pdfDocument)return;const s=Number.isInteger(t)&&this._pages[t-1];if(!s)return void console.error(this._name+".scrollPageIntoView: "+`"${t}" is not a valid pageNumber parameter.`);if(this.isInPresentationMode||!e)return void this._setCurrentPageNumber(t,!0);let o,r,c=0,l=0,d=0,h=0;const u=s.rotation%180!=0,p=(u?s.height:s.width)/s.scale/n.CSS_UNITS,b=(u?s.width:s.height)/s.scale/n.CSS_UNITS;let f=0;switch(e[1].name){case"XYZ":c=e[2],l=e[3],f=e[4],c=null!==c?c:0,l=null!==l?l:b;break;case"Fit":case"FitB":f="page-fit";break;case"FitH":case"FitBH":l=e[2],f="page-width",null===l&&this._location&&(c=this._location.left,l=this._location.top);break;case"FitV":case"FitBV":c=e[2],d=p,h=b,f="page-height";break;case"FitR":c=e[2],l=e[3],d=e[4]-c,h=e[5]-l,o=(this.container.clientWidth-(this.removePageBorders?0:n.SCROLLBAR_PADDING))/d/n.CSS_UNITS,r=(this.container.clientHeight-(this.removePageBorders?0:n.VERTICAL_PADDING))/h/n.CSS_UNITS,f=Math.min(Math.abs(o),Math.abs(r));break;default:return void console.error(this._name+".scrollPageIntoView: "+`"${e[1].name}" is not a valid destination type.`)}if(a||(f&&f!==this._currentScale?this.currentScaleValue=f:this._currentScale===n.UNKNOWN_SCALE&&(this.currentScaleValue=n.DEFAULT_SCALE_VALUE)),"page-fit"===f&&!e[4])return void this._scrollIntoView({pageDiv:s.div,pageNumber:t});const m=[s.viewport.convertToViewportPoint(c,l),s.viewport.convertToViewportPoint(c+d,l+h)];let g=Math.min(m[0][0],m[1][0]),v=Math.min(m[0][1],m[1][1]);i||(g=Math.max(g,0),v=Math.max(v,0)),this._scrollIntoView({pageDiv:s.div,pageSpot:{left:g,top:v},pageNumber:t})}_updateLocation(t){const e=this._currentScale,i=this._currentScaleValue,n=parseFloat(i)===e?Math.round(1e4*e)/100:i,a=t.id;let s="#page="+a;s+="&zoom="+n;const o=this.container,r=this._pages[a-1].getPagePoint(o.scrollLeft-t.x,o.scrollTop-t.y),c=Math.round(r[0]),l=Math.round(r[1]);s+=","+c+","+l,this._location={pageNumber:a,scale:n,top:l,left:c,rotation:this._pagesRotation,pdfOpenParams:s}}_updateHelper(t){throw new Error("Not implemented: _updateHelper")}update(){const t=this._getVisiblePages(),e=t.views,i=e.length;if(0===i)return;const n=Math.max(10,2*i+1);this._buffer.resize(n,e),this.renderingQueue.renderHighestPriority(t),this._updateHelper(e),this._updateLocation(t.first),this.eventBus.dispatch("updateviewarea",{source:this,location:this._location})}containsElement(t){return this.container.contains(t)}focus(){this.container.focus()}get _isScrollModeHorizontal(){return!this.isInPresentationMode&&this._scrollMode===n.ScrollMode.HORIZONTAL}get isInPresentationMode(){return this.presentationModeState===n.PresentationModeState.FULLSCREEN}get isChangingPresentationMode(){return this.presentationModeState===n.PresentationModeState.CHANGING}get isHorizontalScrollbarEnabled(){return!this.isInPresentationMode&&this.container.scrollWidth>this.container.clientWidth}get isVerticalScrollbarEnabled(){return!this.isInPresentationMode&&this.container.scrollHeight>this.container.clientHeight}_getCurrentVisiblePage(){if(!this.pagesCount)return{views:[]};const t=this._pages[this._currentPageNumber-1],e=t.div,i={id:t.id,x:e.offsetLeft+e.clientLeft,y:e.offsetTop+e.clientTop,view:t};return{first:i,last:i,views:[i]}}_getVisiblePages(){return(0,n.getVisibleElements)(this.container,this._pages,!0,this._isScrollModeHorizontal)}isPageVisible(t){return!!this.pdfDocument&&(t<1||t>this.pagesCount?(console.error(`${this._name}.isPageVisible: "${t}" is out of bounds.`),!1):this._getVisiblePages().views.some((function(e){return e.id===t})))}cleanup(){for(let t=0,e=this._pages.length;t<e;t++)this._pages[t]&&this._pages[t].renderingState!==a.RenderingStates.FINISHED&&this._pages[t].reset()}_cancelRendering(){for(let t=0,e=this._pages.length;t<e;t++)this._pages[t]&&this._pages[t].cancelRendering()}_ensurePdfPageLoaded(t){if(t.pdfPage)return Promise.resolve(t.pdfPage);if(this._pagesRequests.has(t))return this._pagesRequests.get(t);const e=this.pdfDocument.getPage(t.id).then(e=>(t.pdfPage||t.setPdfPage(e),this._pagesRequests.delete(t),e)).catch(e=>{console.error("Unable to get page for page view",e),this._pagesRequests.delete(t)});return this._pagesRequests.set(t,e),e}forceRendering(t){const e=t||this._getVisiblePages(),i=this.renderingQueue.getHighestPriority(e,this._pages,this._isScrollModeHorizontal?this.scroll.right:this.scroll.down);return!!i&&(this._ensurePdfPageLoaded(i).then(()=>{this.renderingQueue.renderView(i)}),!0)}createTextLayerBuilder(t,e,i,n=!1,a){return new l.TextLayerBuilder({textLayerDiv:t,eventBus:a,pageIndex:e,viewport:i,findController:this.isInPresentationMode?null:this.findController,enhanceTextSelection:!this.isInPresentationMode&&n})}createAnnotationLayerBuilder(t,e,i="",a=!1,o=n.NullL10n){return new s.AnnotationLayerBuilder({pageDiv:t,pdfPage:e,imageResourcesPath:i,renderInteractiveForms:a,linkService:this.linkService,downloadManager:this.downloadManager,l10n:o})}get hasEqualPageSizes(){const t=this._pages[0];for(let e=1,i=this._pages.length;e<i;++e){const i=this._pages[e];if(i.width!==t.width||i.height!==t.height)return!1}return!0}getPagesOverview(){const t=this._pages.map((function(t){const e=t.pdfPage.getViewport({scale:1});return{width:e.width,height:e.height,rotation:e.rotation}}));if(!this.enablePrintAutoRotate)return t;const e=(0,n.isPortraitOrientation)(t[0]);return t.map((function(t){return e===(0,n.isPortraitOrientation)(t)?t:{width:t.height,height:t.width,rotation:(t.rotation+90)%360}}))}get scrollMode(){return this._scrollMode}set scrollMode(t){if(this._scrollMode!==t){if(!(0,n.isValidScrollMode)(t))throw new Error("Invalid scroll mode: "+t);this._scrollMode=t,this.eventBus.dispatch("scrollmodechanged",{source:this,mode:t}),this._updateScrollMode(this._currentPageNumber)}}_updateScrollMode(t=null){const e=this._scrollMode,i=this.viewer;i.classList.toggle("scrollHorizontal",e===n.ScrollMode.HORIZONTAL),i.classList.toggle("scrollWrapped",e===n.ScrollMode.WRAPPED),this.pdfDocument&&t&&(this._currentScaleValue&&isNaN(this._currentScaleValue)&&this._setScale(this._currentScaleValue,!0),this._setCurrentPageNumber(t,!0),this.update())}get spreadMode(){return this._spreadMode}set spreadMode(t){if(this._spreadMode!==t){if(!(0,n.isValidSpreadMode)(t))throw new Error("Invalid spread mode: "+t);this._spreadMode=t,this.eventBus.dispatch("spreadmodechanged",{source:this,mode:t}),this._updateSpreadMode(this._currentPageNumber)}}_updateSpreadMode(t=null){if(!this.pdfDocument)return;const e=this.viewer,i=this._pages;if(e.textContent="",this._spreadMode===n.SpreadMode.NONE)for(let n=0,a=i.length;n<a;++n)e.appendChild(i[n].div);else{const t=this._spreadMode-1;let n=null;for(let a=0,s=i.length;a<s;++a)null===n?(n=document.createElement("div"),n.className="spread",e.appendChild(n)):a%2===t&&(n=n.cloneNode(!1),e.appendChild(n)),n.appendChild(i[a].div)}t&&(this._setCurrentPageNumber(t,!0),this.update())}}e.BaseViewer=h},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PDFViewer=void 0;var n=i(16),a=i(2);e.PDFViewer=class extends n.BaseViewer{get _viewerElement(){return(0,a.shadow)(this,"_viewerElement",this.viewer)}_scrollIntoView({pageDiv:t,pageSpot:e=null,pageNumber:i=null}){if(!e&&!this.isInPresentationMode){const i=t.offsetLeft+t.clientLeft,n=i+t.clientWidth,{scrollLeft:a,clientWidth:s}=this.container;(this._isScrollModeHorizontal||i<a||n>a+s)&&(e={left:0,top:0})}super._scrollIntoView({pageDiv:t,pageSpot:e,pageNumber:i})}_getVisiblePages(){return this.isInPresentationMode?this._getCurrentVisiblePage():super._getVisiblePages()}_updateHelper(t){if(this.isInPresentationMode)return;let e=this._currentPageNumber,i=!1;for(const n of t){if(n.percent<100)break;if(n.id===e){i=!0;break}}i||(e=t[0].id),this._setCurrentPageNumber(e)}}}])},t.exports=n()},mrSG:function(t,e,i){"use strict";function n(t,e,i,n){return new(i||(i=Promise))((function(a,s){function o(t){try{c(n.next(t))}catch(e){s(e)}}function r(t){try{c(n.throw(t))}catch(e){s(e)}}function c(t){var e;t.done?a(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,r)}c((n=n.apply(t,e||[])).next())}))}i.d(e,"a",(function(){return n}))},n6bG:function(t,e,i){"use strict";function n(t){return"function"==typeof t}i.d(e,"a",(function(){return n}))},nLfN:function(t,e,i){"use strict";i.d(e,"a",(function(){return r})),i.d(e,"b",(function(){return c})),i.d(e,"c",(function(){return v})),i.d(e,"d",(function(){return g})),i.d(e,"e",(function(){return d})),i.d(e,"f",(function(){return f})),i.d(e,"g",(function(){return m}));var n=i("fXoL"),a=i("ofXK");let s;try{s="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch(_){s=!1}let o,r=(()=>{class t{constructor(t){this._platformId=t,this.isBrowser=this._platformId?Object(a.I)(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&&!s)&&"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)(n.ac(n.F))},t.\u0275prov=Object(n.Mb)({factory:function(){return new t(Object(n.ac)(n.F))},token:t,providedIn:"root"}),t})(),c=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)}}),t})();const l=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function d(){if(o)return o;if("object"!=typeof document||!document)return o=new Set(l),o;let t=document.createElement("input");return o=new Set(l.filter(e=>(t.setAttribute("type",e),t.type===e))),o}let h,u,p,b;function f(t){return function(){if(null==h&&"undefined"!=typeof window)try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>h=!0}))}finally{h=h||!1}return h}()?t:!!t.capture}function m(){if(null==p)if("object"==typeof document&&document||(p=!1),"scrollBehavior"in document.documentElement.style)p=!0;else{const t=Element.prototype.scrollTo;p=!!t&&!/\{\s*\[native code\]\s*\}/.test(t.toString())}return p}function g(){if("object"!=typeof document||!document)return 0;if(null==u){const t=document.createElement("div"),e=t.style;t.dir="rtl",e.width="1px",e.overflow="auto",e.visibility="hidden",e.pointerEvents="none",e.position="absolute";const i=document.createElement("div"),n=i.style;n.width="2px",n.height="1px",t.appendChild(i),document.body.appendChild(t),u=0,0===t.scrollLeft&&(t.scrollLeft=1,u=0===t.scrollLeft?1:2),t.parentNode.removeChild(t)}return u}function v(t){if(function(){if(null==b){const t="undefined"!=typeof document?document.head:null;b=!(!t||!t.createShadowRoot&&!t.attachShadow)}return b}()){const e=t.getRootNode?t.getRootNode():null;if("undefined"!=typeof ShadowRoot&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}},nYR2:function(t,e,i){"use strict";i.d(e,"a",(function(){return s}));var n=i("7o/Q"),a=i("quSY");function s(t){return e=>e.lift(new o(t))}class o{constructor(t){this.callback=t}call(t,e){return e.subscribe(new r(t,this.callback))}}class r extends n.a{constructor(t,e){super(t),this.add(new a.a(e))}}},ngJS:function(t,e,i){"use strict";i.d(e,"a",(function(){return n}));const n=t=>e=>{for(let i=0,n=t.length;i<n&&!e.closed;i++)e.next(t[i]);e.complete()}},ofXK:function(t,e,i){"use strict";i.d(e,"a",(function(){return y})),i.d(e,"b",(function(){return Rt})),i.d(e,"c",(function(){return Kt})),i.d(e,"d",(function(){return Ht})),i.d(e,"e",(function(){return c})),i.d(e,"f",(function(){return Et})),i.d(e,"g",(function(){return Ut})),i.d(e,"h",(function(){return C})),i.d(e,"i",(function(){return Lt})),i.d(e,"j",(function(){return Qt})),i.d(e,"k",(function(){return Nt})),i.d(e,"l",(function(){return zt})),i.d(e,"m",(function(){return h})),i.d(e,"n",(function(){return O})),i.d(e,"o",(function(){return v})),i.d(e,"p",(function(){return jt})),i.d(e,"q",(function(){return ht})),i.d(e,"r",(function(){return ut})),i.d(e,"s",(function(){return bt})),i.d(e,"t",(function(){return mt})),i.d(e,"u",(function(){return Ot})),i.d(e,"v",(function(){return Dt})),i.d(e,"w",(function(){return wt})),i.d(e,"x",(function(){return yt})),i.d(e,"y",(function(){return xt})),i.d(e,"z",(function(){return Ct})),i.d(e,"A",(function(){return Mt})),i.d(e,"B",(function(){return x})),i.d(e,"C",(function(){return $t})),i.d(e,"D",(function(){return l})),i.d(e,"E",(function(){return qt})),i.d(e,"F",(function(){return Wt})),i.d(e,"G",(function(){return Tt})),i.d(e,"H",(function(){return Zt})),i.d(e,"I",(function(){return Jt})),i.d(e,"J",(function(){return r})),i.d(e,"K",(function(){return Yt})),i.d(e,"L",(function(){return s})),i.d(e,"M",(function(){return dt})),i.d(e,"N",(function(){return o}));var n=i("fXoL");let a=null;function s(){return a}function o(t){a||(a=t)}class r{}const c=new n.s("DocumentToken");let l=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(n.Mb)({factory:d,token:t,providedIn:"platform"}),t})();function d(){return Object(n.ac)(u)}const h=new n.s("Location Initialized");let u=(()=>{class t extends l{constructor(t){super(),this._doc=t,this._init()}_init(){this.location=s().getLocation(),this._history=s().getHistory()}getBaseHrefFromDOM(){return s().getBaseHref(this._doc)}onPopState(t){s().getGlobalEventTarget(this._doc,"window").addEventListener("popstate",t,!1)}onHashChange(t){s().getGlobalEventTarget(this._doc,"window").addEventListener("hashchange",t,!1)}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(t){this.location.pathname=t}pushState(t,e,i){p()?this._history.pushState(t,e,i):this.location.hash=i}replaceState(t,e,i){p()?this._history.replaceState(t,e,i):this.location.hash=i}forward(){this._history.forward()}back(){this._history.back()}getState(){return this._history.state}}return t.\u0275fac=function(e){return new(e||t)(n.ac(c))},t.\u0275prov=Object(n.Mb)({factory:b,token:t,providedIn:"platform"}),t})();function p(){return!!window.history.pushState}function b(){return new u(Object(n.ac)(c))}function f(t,e){if(0==t.length)return e;if(0==e.length)return t;let i=0;return t.endsWith("/")&&i++,e.startsWith("/")&&i++,2==i?t+e.substring(1):1==i?t+e:t+"/"+e}function m(t){const e=t.match(/#|\?|$/),i=e&&e.index||t.length;return t.slice(0,i-("/"===t[i-1]?1:0))+t.slice(i)}function g(t){return t&&"?"!==t[0]?"?"+t:t}let v=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(n.Mb)({factory:_,token:t,providedIn:"root"}),t})();function _(t){const e=Object(n.ac)(c).location;return new x(Object(n.ac)(l),e&&e.origin||"")}const y=new n.s("appBaseHref");let x=(()=>{class t extends v{constructor(t,e){if(super(),this._platformLocation=t,null==e&&(e=this._platformLocation.getBaseHrefFromDOM()),null==e)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=e}onPopState(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)}getBaseHref(){return this._baseHref}prepareExternalUrl(t){return f(this._baseHref,t)}path(t=!1){const e=this._platformLocation.pathname+g(this._platformLocation.search),i=this._platformLocation.hash;return i&&t?`${e}${i}`:e}pushState(t,e,i,n){const a=this.prepareExternalUrl(i+g(n));this._platformLocation.pushState(t,e,a)}replaceState(t,e,i,n){const a=this.prepareExternalUrl(i+g(n));this._platformLocation.replaceState(t,e,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}}return t.\u0275fac=function(e){return new(e||t)(n.ac(l),n.ac(y,8))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})(),C=(()=>{class t extends v{constructor(t,e){super(),this._platformLocation=t,this._baseHref="",null!=e&&(this._baseHref=e)}onPopState(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)}getBaseHref(){return this._baseHref}path(t=!1){let e=this._platformLocation.hash;return null==e&&(e="#"),e.length>0?e.substring(1):e}prepareExternalUrl(t){const e=f(this._baseHref,t);return e.length>0?"#"+e:e}pushState(t,e,i,n){let a=this.prepareExternalUrl(i+g(n));0==a.length&&(a=this._platformLocation.pathname),this._platformLocation.pushState(t,e,a)}replaceState(t,e,i,n){let a=this.prepareExternalUrl(i+g(n));0==a.length&&(a=this._platformLocation.pathname),this._platformLocation.replaceState(t,e,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}}return t.\u0275fac=function(e){return new(e||t)(n.ac(l),n.ac(y,8))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})(),O=(()=>{class t{constructor(t,e){this._subject=new n.o,this._urlChangeListeners=[],this._platformStrategy=t;const i=this._platformStrategy.getBaseHref();this._platformLocation=e,this._baseHref=m(w(i)),this._platformStrategy.onPopState(t=>{this._subject.emit({url:this.path(!0),pop:!0,state:t.state,type:t.type})})}path(t=!1){return this.normalize(this._platformStrategy.path(t))}getState(){return this._platformLocation.getState()}isCurrentPathEqualTo(t,e=""){return this.path()==this.normalize(t+g(e))}normalize(e){return t.stripTrailingSlash(function(t,e){return t&&e.startsWith(t)?e.substring(t.length):e}(this._baseHref,w(e)))}prepareExternalUrl(t){return t&&"/"!==t[0]&&(t="/"+t),this._platformStrategy.prepareExternalUrl(t)}go(t,e="",i=null){this._platformStrategy.pushState(i,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+g(e)),i)}replaceState(t,e="",i=null){this._platformStrategy.replaceState(i,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+g(e)),i)}forward(){this._platformStrategy.forward()}back(){this._platformStrategy.back()}onUrlChange(t){this._urlChangeListeners.push(t),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(t=>{this._notifyUrlChangeListeners(t.url,t.state)}))}_notifyUrlChangeListeners(t="",e){this._urlChangeListeners.forEach(i=>i(t,e))}subscribe(t,e,i){return this._subject.subscribe({next:t,error:e,complete:i})}}return t.\u0275fac=function(e){return new(e||t)(n.ac(v),n.ac(l))},t.normalizeQueryParams=g,t.joinWithSlash=f,t.stripTrailingSlash=m,t.\u0275prov=Object(n.Mb)({factory:D,token:t,providedIn:"root"}),t})();function D(){return new O(Object(n.ac)(v),Object(n.ac)(l))}function w(t){return t.replace(/\/index.html$/,"")}const M={ADP:[void 0,void 0,0],AFN:[void 0,void 0,0],ALL:[void 0,void 0,0],AMD:[void 0,void 0,2],AOA:[void 0,"Kz"],ARS:[void 0,"$"],AUD:["A$","$"],BAM:[void 0,"KM"],BBD:[void 0,"$"],BDT:[void 0,"\u09f3"],BHD:[void 0,void 0,3],BIF:[void 0,void 0,0],BMD:[void 0,"$"],BND:[void 0,"$"],BOB:[void 0,"Bs"],BRL:["R$"],BSD:[void 0,"$"],BWP:[void 0,"P"],BYN:[void 0,"\u0440.",2],BYR:[void 0,void 0,0],BZD:[void 0,"$"],CAD:["CA$","$",2],CHF:[void 0,void 0,2],CLF:[void 0,void 0,4],CLP:[void 0,"$",0],CNY:["CN\xa5","\xa5"],COP:[void 0,"$",2],CRC:[void 0,"\u20a1",2],CUC:[void 0,"$"],CUP:[void 0,"$"],CZK:[void 0,"K\u010d",2],DJF:[void 0,void 0,0],DKK:[void 0,"kr",2],DOP:[void 0,"$"],EGP:[void 0,"E\xa3"],ESP:[void 0,"\u20a7",0],EUR:["\u20ac"],FJD:[void 0,"$"],FKP:[void 0,"\xa3"],GBP:["\xa3"],GEL:[void 0,"\u20be"],GIP:[void 0,"\xa3"],GNF:[void 0,"FG",0],GTQ:[void 0,"Q"],GYD:[void 0,"$",2],HKD:["HK$","$"],HNL:[void 0,"L"],HRK:[void 0,"kn"],HUF:[void 0,"Ft",2],IDR:[void 0,"Rp",2],ILS:["\u20aa"],INR:["\u20b9"],IQD:[void 0,void 0,0],IRR:[void 0,void 0,0],ISK:[void 0,"kr",0],ITL:[void 0,void 0,0],JMD:[void 0,"$"],JOD:[void 0,void 0,3],JPY:["\xa5",void 0,0],KHR:[void 0,"\u17db"],KMF:[void 0,"CF",0],KPW:[void 0,"\u20a9",0],KRW:["\u20a9",void 0,0],KWD:[void 0,void 0,3],KYD:[void 0,"$"],KZT:[void 0,"\u20b8"],LAK:[void 0,"\u20ad",0],LBP:[void 0,"L\xa3",0],LKR:[void 0,"Rs"],LRD:[void 0,"$"],LTL:[void 0,"Lt"],LUF:[void 0,void 0,0],LVL:[void 0,"Ls"],LYD:[void 0,void 0,3],MGA:[void 0,"Ar",0],MGF:[void 0,void 0,0],MMK:[void 0,"K",0],MNT:[void 0,"\u20ae",2],MRO:[void 0,void 0,0],MUR:[void 0,"Rs",2],MXN:["MX$","$"],MYR:[void 0,"RM"],NAD:[void 0,"$"],NGN:[void 0,"\u20a6"],NIO:[void 0,"C$"],NOK:[void 0,"kr",2],NPR:[void 0,"Rs"],NZD:["NZ$","$"],OMR:[void 0,void 0,3],PHP:[void 0,"\u20b1"],PKR:[void 0,"Rs",2],PLN:[void 0,"z\u0142"],PYG:[void 0,"\u20b2",0],RON:[void 0,"lei"],RSD:[void 0,void 0,0],RUB:[void 0,"\u20bd"],RUR:[void 0,"\u0440."],RWF:[void 0,"RF",0],SBD:[void 0,"$"],SEK:[void 0,"kr",2],SGD:[void 0,"$"],SHP:[void 0,"\xa3"],SLL:[void 0,void 0,0],SOS:[void 0,void 0,0],SRD:[void 0,"$"],SSP:[void 0,"\xa3"],STD:[void 0,void 0,0],STN:[void 0,"Db"],SYP:[void 0,"\xa3",0],THB:[void 0,"\u0e3f"],TMM:[void 0,void 0,0],TND:[void 0,void 0,3],TOP:[void 0,"T$"],TRL:[void 0,void 0,0],TRY:[void 0,"\u20ba"],TTD:[void 0,"$"],TWD:["NT$","$",2],TZS:[void 0,void 0,2],UAH:[void 0,"\u20b4"],UGX:[void 0,void 0,0],USD:["$"],UYI:[void 0,void 0,0],UYU:[void 0,"$"],UYW:[void 0,void 0,4],UZS:[void 0,void 0,2],VEF:[void 0,"Bs",2],VND:["\u20ab",void 0,0],VUV:[void 0,void 0,0],XAF:["FCFA",void 0,0],XCD:["EC$","$"],XOF:["CFA",void 0,0],XPF:["CFPF",void 0,0],XXX:["\xa4"],YER:[void 0,void 0,0],ZAR:[void 0,"R"],ZMK:[void 0,void 0,0],ZMW:[void 0,"ZK"],ZWD:[void 0,void 0,0]};var k=function(t){return t[t.Decimal=0]="Decimal",t[t.Percent=1]="Percent",t[t.Currency=2]="Currency",t[t.Scientific=3]="Scientific",t}({}),S=function(t){return t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t[t.Few=3]="Few",t[t.Many=4]="Many",t[t.Other=5]="Other",t}({}),I=function(t){return t[t.Format=0]="Format",t[t.Standalone=1]="Standalone",t}({}),P=function(t){return t[t.Narrow=0]="Narrow",t[t.Abbreviated=1]="Abbreviated",t[t.Wide=2]="Wide",t[t.Short=3]="Short",t}({}),V=function(t){return t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t[t.Full=3]="Full",t}({}),R=function(t){return t[t.Decimal=0]="Decimal",t[t.Group=1]="Group",t[t.List=2]="List",t[t.PercentSign=3]="PercentSign",t[t.PlusSign=4]="PlusSign",t[t.MinusSign=5]="MinusSign",t[t.Exponential=6]="Exponential",t[t.SuperscriptingExponent=7]="SuperscriptingExponent",t[t.PerMille=8]="PerMille",t[t[1/0]=9]="Infinity",t[t.NaN=10]="NaN",t[t.TimeSeparator=11]="TimeSeparator",t[t.CurrencyDecimal=12]="CurrencyDecimal",t[t.CurrencyGroup=13]="CurrencyGroup",t}({});function j(t,e){return Q(Object(n.nb)(t)[n.eb.DateFormat],e)}function A(t,e){return Q(Object(n.nb)(t)[n.eb.TimeFormat],e)}function W(t,e){return Q(Object(n.nb)(t)[n.eb.DateTimeFormat],e)}function T(t,e){const i=Object(n.nb)(t),a=i[n.eb.NumberSymbols][e];if(void 0===a){if(e===R.CurrencyDecimal)return i[n.eb.NumberSymbols][R.Decimal];if(e===R.CurrencyGroup)return i[n.eb.NumberSymbols][R.Group]}return a}function E(t,e){return Object(n.nb)(t)[n.eb.NumberFormats][e]}const F=n.qb;function L(t){if(!t[n.eb.ExtraData])throw new Error(`Missing extra locale data for the locale "${t[n.eb.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function Q(t,e){for(let i=e;i>-1;i--)if(void 0!==t[i])return t[i];throw new Error("Locale data API: locale data undefined")}function N(t){const[e,i]=t.split(":");return{hours:+e,minutes:+i}}const z=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,B={},U=/((?:[^GyMLwWdEabBhHmsSzZO']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;var $=function(t){return t[t.Short=0]="Short",t[t.ShortGMT=1]="ShortGMT",t[t.Long=2]="Long",t[t.Extended=3]="Extended",t}({}),H=function(t){return t[t.FullYear=0]="FullYear",t[t.Month=1]="Month",t[t.Date=2]="Date",t[t.Hours=3]="Hours",t[t.Minutes=4]="Minutes",t[t.Seconds=5]="Seconds",t[t.FractionalSeconds=6]="FractionalSeconds",t[t.Day=7]="Day",t}({}),G=function(t){return t[t.DayPeriods=0]="DayPeriods",t[t.Days=1]="Days",t[t.Months=2]="Months",t[t.Eras=3]="Eras",t}({});function X(t,e){return e&&(t=t.replace(/\{([^}]+)}/g,(function(t,i){return null!=e&&i in e?e[i]:t}))),t}function q(t,e,i="-",n,a){let s="";(t<0||a&&t<=0)&&(a?t=1-t:(t=-t,s=i));let o=String(t);for(;o.length<e;)o="0"+o;return n&&(o=o.substr(o.length-e)),s+o}function K(t,e,i=0,n=!1,a=!1){return function(s,o){let r=function(t,e){switch(t){case H.FullYear:return e.getFullYear();case H.Month:return e.getMonth();case H.Date:return e.getDate();case H.Hours:return e.getHours();case H.Minutes:return e.getMinutes();case H.Seconds:return e.getSeconds();case H.FractionalSeconds:return e.getMilliseconds();case H.Day:return e.getDay();default:throw new Error(`Unknown DateType value "${t}".`)}}(t,s);if((i>0||r>-i)&&(r+=i),t===H.Hours)0===r&&-12===i&&(r=12);else if(t===H.FractionalSeconds)return c=e,q(r,3).substr(0,c);var c;const l=T(o,R.MinusSign);return q(r,e,l,n,a)}}function Y(t,e,i=I.Format,a=!1){return function(s,o){return function(t,e,i,a,s,o){switch(i){case G.Months:return function(t,e,i){const a=Object(n.nb)(t),s=Q([a[n.eb.MonthsFormat],a[n.eb.MonthsStandalone]],e);return Q(s,i)}(e,s,a)[t.getMonth()];case G.Days:return function(t,e,i){const a=Object(n.nb)(t),s=Q([a[n.eb.DaysFormat],a[n.eb.DaysStandalone]],e);return Q(s,i)}(e,s,a)[t.getDay()];case G.DayPeriods:const r=t.getHours(),c=t.getMinutes();if(o){const t=function(t){const e=Object(n.nb)(t);return L(e),(e[n.eb.ExtraData][2]||[]).map(t=>"string"==typeof t?N(t):[N(t[0]),N(t[1])])}(e),i=function(t,e,i){const a=Object(n.nb)(t);L(a);const s=Q([a[n.eb.ExtraData][0],a[n.eb.ExtraData][1]],e)||[];return Q(s,i)||[]}(e,s,a),o=t.findIndex(t=>{if(Array.isArray(t)){const[e,i]=t,n=r>=e.hours&&c>=e.minutes,a=r<i.hours||r===i.hours&&c<i.minutes;if(e.hours<i.hours){if(n&&a)return!0}else if(n||a)return!0}else if(t.hours===r&&t.minutes===c)return!0;return!1});if(-1!==o)return i[o]}return function(t,e,i){const a=Object(n.nb)(t),s=Q([a[n.eb.DayPeriodsFormat],a[n.eb.DayPeriodsStandalone]],e);return Q(s,i)}(e,s,a)[r<12?0:1];case G.Eras:return function(t,e){return Q(Object(n.nb)(t)[n.eb.Eras],e)}(e,a)[t.getFullYear()<=0?0:1];default:throw new Error("unexpected translation type "+i)}}(s,o,t,e,i,a)}}function J(t){return function(e,i,n){const a=-1*n,s=T(i,R.MinusSign),o=a>0?Math.floor(a/60):Math.ceil(a/60);switch(t){case $.Short:return(a>=0?"+":"")+q(o,2,s)+q(Math.abs(a%60),2,s);case $.ShortGMT:return"GMT"+(a>=0?"+":"")+q(o,1,s);case $.Long:return"GMT"+(a>=0?"+":"")+q(o,2,s)+":"+q(Math.abs(a%60),2,s);case $.Extended:return 0===n?"Z":(a>=0?"+":"")+q(o,2,s)+":"+q(Math.abs(a%60),2,s);default:throw new Error(`Unknown zone width "${t}"`)}}}function Z(t,e=!1){return function(i,n){let a;if(e){const t=new Date(i.getFullYear(),i.getMonth(),1).getDay()-1,e=i.getDate();a=1+Math.floor((e+t)/7)}else{const t=(s=i,new Date(s.getFullYear(),s.getMonth(),s.getDate()+(4-s.getDay()))),e=function(t){const e=new Date(t,0,1).getDay();return new Date(t,0,1+(e<=4?4:11)-e)}(t.getFullYear()),n=t.getTime()-e.getTime();a=1+Math.round(n/6048e5)}var s;return q(a,t,T(n,R.MinusSign))}}const tt={};function et(t,e){t=t.replace(/:/g,"");const i=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(i)?e:i}function it(t){return t instanceof Date&&!isNaN(t.valueOf())}const nt=/^(\d+)?\.((\d+)(-(\d+))?)?$/;function at(t,e,i,n,a,s,o=!1){let r="",c=!1;if(isFinite(t)){let l=function(t){let e,i,n,a,s,o=Math.abs(t)+"",r=0;for((i=o.indexOf("."))>-1&&(o=o.replace(".","")),(n=o.search(/e/i))>0?(i<0&&(i=n),i+=+o.slice(n+1),o=o.substring(0,n)):i<0&&(i=o.length),n=0;"0"===o.charAt(n);n++);if(n===(s=o.length))e=[0],i=1;else{for(s--;"0"===o.charAt(s);)s--;for(i-=n,e=[],a=0;n<=s;n++,a++)e[a]=Number(o.charAt(n))}return i>22&&(e=e.splice(0,21),r=i-1,i=1),{digits:e,exponent:r,integerLen:i}}(t);o&&(l=function(t){if(0===t.digits[0])return t;const e=t.digits.length-t.integerLen;return t.exponent?t.exponent+=2:(0===e?t.digits.push(0,0):1===e&&t.digits.push(0),t.integerLen+=2),t}(l));let d=e.minInt,h=e.minFrac,u=e.maxFrac;if(s){const t=s.match(nt);if(null===t)throw new Error(s+" is not a valid digit info");const e=t[1],i=t[3],n=t[5];null!=e&&(d=ot(e)),null!=i&&(h=ot(i)),null!=n?u=ot(n):null!=i&&h>u&&(u=h)}!function(t,e,i){if(e>i)throw new Error(`The minimum number of digits after fraction (${e}) is higher than the maximum (${i}).`);let n=t.digits,a=n.length-t.integerLen;const s=Math.min(Math.max(e,a),i);let o=s+t.integerLen,r=n[o];if(o>0){n.splice(Math.max(t.integerLen,o));for(let t=o;t<n.length;t++)n[t]=0}else{a=Math.max(0,a),t.integerLen=1,n.length=Math.max(1,o=s+1),n[0]=0;for(let t=1;t<o;t++)n[t]=0}if(r>=5)if(o-1<0){for(let e=0;e>o;e--)n.unshift(0),t.integerLen++;n.unshift(1),t.integerLen++}else n[o-1]++;for(;a<Math.max(0,s);a++)n.push(0);let c=0!==s;const l=e+t.integerLen,d=n.reduceRight((function(t,e,i,n){return n[i]=(e+=t)<10?e:e-10,c&&(0===n[i]&&i>=l?n.pop():c=!1),e>=10?1:0}),0);d&&(n.unshift(d),t.integerLen++)}(l,h,u);let p=l.digits,b=l.integerLen;const f=l.exponent;let m=[];for(c=p.every(t=>!t);b<d;b++)p.unshift(0);for(;b<0;b++)p.unshift(0);b>0?m=p.splice(b,p.length):(m=p,p=[0]);const g=[];for(p.length>=e.lgSize&&g.unshift(p.splice(-e.lgSize,p.length).join(""));p.length>e.gSize;)g.unshift(p.splice(-e.gSize,p.length).join(""));p.length&&g.unshift(p.join("")),r=g.join(T(i,n)),m.length&&(r+=T(i,a)+m.join("")),f&&(r+=T(i,R.Exponential)+"+"+f)}else r=T(i,R.Infinity);return r=t<0&&!c?e.negPre+r+e.negSuf:e.posPre+r+e.posSuf,r}function st(t,e="-"){const i={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=t.split(";"),a=n[0],s=n[1],o=-1!==a.indexOf(".")?a.split("."):[a.substring(0,a.lastIndexOf("0")+1),a.substring(a.lastIndexOf("0")+1)],r=o[0],c=o[1]||"";i.posPre=r.substr(0,r.indexOf("#"));for(let d=0;d<c.length;d++){const t=c.charAt(d);"0"===t?i.minFrac=i.maxFrac=d+1:"#"===t?i.maxFrac=d+1:i.posSuf+=t}const l=r.split(",");if(i.gSize=l[1]?l[1].length:0,i.lgSize=l[2]||l[1]?(l[2]||l[1]).length:0,s){const t=a.length-i.posPre.length-i.posSuf.length,e=s.indexOf("#");i.negPre=s.substr(0,e).replace(/'/g,""),i.negSuf=s.substr(e+t).replace(/'/g,"")}else i.negPre=e+i.posPre,i.negSuf=i.posSuf;return i}function ot(t){const e=parseInt(t);if(isNaN(e))throw new Error("Invalid integer literal when parsing "+t);return e}class rt{}function ct(t,e,i,n){let a="="+t;if(e.indexOf(a)>-1)return a;if(a=i.getPluralCategory(t,n),e.indexOf(a)>-1)return a;if(e.indexOf("other")>-1)return"other";throw new Error(`No plural message found for value "${t}"`)}let lt=(()=>{class t extends rt{constructor(t){super(),this.locale=t}getPluralCategory(t,e){switch(F(e||this.locale)(t)){case S.Zero:return"zero";case S.One:return"one";case S.Two:return"two";case S.Few:return"few";case S.Many:return"many";default:return"other"}}}return t.\u0275fac=function(e){return new(e||t)(n.ac(n.x))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();function dt(t,e){e=encodeURIComponent(e);for(const i of t.split(";")){const t=i.indexOf("="),[n,a]=-1==t?[i,""]:[i.slice(0,t),i.slice(t+1)];if(n.trim()===e)return decodeURIComponent(a)}return null}let ht=(()=>{class t{constructor(t,e,i,n){this._iterableDiffers=t,this._keyValueDiffers=e,this._ngEl=i,this._renderer=n,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}set klass(t){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof t?t.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}set ngClass(t){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof t?t.split(/\s+/):t,this._rawClass&&(Object(n.tb)(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}ngDoCheck(){if(this._iterableDiffer){const t=this._iterableDiffer.diff(this._rawClass);t&&this._applyIterableChanges(t)}else if(this._keyValueDiffer){const t=this._keyValueDiffer.diff(this._rawClass);t&&this._applyKeyValueChanges(t)}}_applyKeyValueChanges(t){t.forEachAddedItem(t=>this._toggleClass(t.key,t.currentValue)),t.forEachChangedItem(t=>this._toggleClass(t.key,t.currentValue)),t.forEachRemovedItem(t=>{t.previousValue&&this._toggleClass(t.key,!1)})}_applyIterableChanges(t){t.forEachAddedItem(t=>{if("string"!=typeof t.item)throw new Error("NgClass can only toggle CSS classes expressed as strings, got "+Object(n.yb)(t.item));this._toggleClass(t.item,!0)}),t.forEachRemovedItem(t=>this._toggleClass(t.item,!1))}_applyClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(t=>this._toggleClass(t,!0)):Object.keys(t).forEach(e=>this._toggleClass(e,!!t[e])))}_removeClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(t=>this._toggleClass(t,!1)):Object.keys(t).forEach(t=>this._toggleClass(t,!1)))}_toggleClass(t,e){(t=t.trim())&&t.split(/\s+/g).forEach(t=>{e?this._renderer.addClass(this._ngEl.nativeElement,t):this._renderer.removeClass(this._ngEl.nativeElement,t)})}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.v),n.Qb(n.w),n.Qb(n.l),n.Qb(n.I))},t.\u0275dir=n.Lb({type:t,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),t})(),ut=(()=>{class t{constructor(t){this._viewContainerRef=t,this._componentRef=null,this._moduleRef=null}ngOnChanges(t){if(this._viewContainerRef.clear(),this._componentRef=null,this.ngComponentOutlet){const e=this.ngComponentOutletInjector||this._viewContainerRef.parentInjector;if(t.ngComponentOutletNgModuleFactory)if(this._moduleRef&&this._moduleRef.destroy(),this.ngComponentOutletNgModuleFactory){const t=e.get(n.A);this._moduleRef=this.ngComponentOutletNgModuleFactory.create(t.injector)}else this._moduleRef=null;const i=(this._moduleRef?this._moduleRef.componentFactoryResolver:e.get(n.j)).resolveComponentFactory(this.ngComponentOutlet);this._componentRef=this._viewContainerRef.createComponent(i,this._viewContainerRef.length,e,this.ngComponentOutletContent)}}ngOnDestroy(){this._moduleRef&&this._moduleRef.destroy()}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.T))},t.\u0275dir=n.Lb({type:t,selectors:[["","ngComponentOutlet",""]],inputs:{ngComponentOutlet:"ngComponentOutlet",ngComponentOutletInjector:"ngComponentOutletInjector",ngComponentOutletContent:"ngComponentOutletContent",ngComponentOutletNgModuleFactory:"ngComponentOutletNgModuleFactory"},features:[n.Bb]}),t})();class pt{constructor(t,e,i,n){this.$implicit=t,this.ngForOf=e,this.index=i,this.count=n}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 bt=(()=>{class t{constructor(t,e,i){this._viewContainer=t,this._template=e,this._differs=i,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){Object(n.Z)()&&null!=t&&"function"!=typeof t&&console&&console.warn&&console.warn(`trackBy must be a function, but received ${JSON.stringify(t)}. See https://angular.io/api/common/NgForOf#change-propagation for more information.`),this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const i=this._ngForOf;if(!this._differ&&i)try{this._differ=this._differs.find(i).create(this.ngForTrackBy)}catch(e){throw new Error(`Cannot find a differ supporting object '${i}' of type '${t=i,t.name||typeof t}'. NgFor only supports binding to Iterables such as Arrays.`)}}var t;if(this._differ){const t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const e=[];t.forEachOperation((t,i,n)=>{if(null==t.previousIndex){const i=this._viewContainer.createEmbeddedView(this._template,new pt(null,this._ngForOf,-1,-1),null===n?void 0:n),a=new ft(t,i);e.push(a)}else if(null==n)this._viewContainer.remove(null===i?void 0:i);else if(null!==i){const a=this._viewContainer.get(i);this._viewContainer.move(a,n);const s=new ft(t,a);e.push(s)}});for(let i=0;i<e.length;i++)this._perViewChange(e[i].view,e[i].record);for(let i=0,n=this._viewContainer.length;i<n;i++){const t=this._viewContainer.get(i);t.context.index=i,t.context.count=n,t.context.ngForOf=this._ngForOf}t.forEachIdentityChange(t=>{this._viewContainer.get(t.currentIndex).context.$implicit=t.item})}_perViewChange(t,e){t.context.$implicit=e.item}static ngTemplateContextGuard(t,e){return!0}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.T),n.Qb(n.P),n.Qb(n.v))},t.\u0275dir=n.Lb({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),t})();class ft{constructor(t,e){this.record=t,this.view=e}}let mt=(()=>{class t{constructor(t,e){this._viewContainer=t,this._context=new gt,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=e}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){vt("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){vt("ngIfElse",t),this._elseTemplateRef=t,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(t,e){return!0}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.T),n.Qb(n.P))},t.\u0275dir=n.Lb({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),t})();class gt{constructor(){this.$implicit=null,this.ngIf=null}}function vt(t,e){if(e&&!e.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${Object(n.yb)(e)}'.`)}class _t{constructor(t,e){this._viewContainerRef=t,this._templateRef=e,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(t){t&&!this._created?this.create():!t&&this._created&&this.destroy()}}let yt=(()=>{class t{constructor(){this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(t){this._ngSwitch=t,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(t){this._defaultViews||(this._defaultViews=[]),this._defaultViews.push(t)}_matchCase(t){const e=t==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||e,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),e}_updateDefaultCases(t){if(this._defaultViews&&t!==this._defaultUsed){this._defaultUsed=t;for(let e=0;e<this._defaultViews.length;e++)this._defaultViews[e].enforceState(t)}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"}}),t})(),xt=(()=>{class t{constructor(t,e,i){this.ngSwitch=i,i._addCase(),this._view=new _t(t,e)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.T),n.Qb(n.P),n.Qb(yt,1))},t.\u0275dir=n.Lb({type:t,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"}}),t})(),Ct=(()=>{class t{constructor(t,e,i){i._addDefault(new _t(t,e))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.T),n.Qb(n.P),n.Qb(yt,1))},t.\u0275dir=n.Lb({type:t,selectors:[["","ngSwitchDefault",""]]}),t})(),Ot=(()=>{class t{constructor(t){this._localization=t,this._caseViews={}}set ngPlural(t){this._switchValue=t,this._updateView()}addCase(t,e){this._caseViews[t]=e}_updateView(){this._clearViews();const t=Object.keys(this._caseViews),e=ct(this._switchValue,t,this._localization);this._activateView(this._caseViews[e])}_clearViews(){this._activeView&&this._activeView.destroy()}_activateView(t){t&&(this._activeView=t,this._activeView.create())}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(rt))},t.\u0275dir=n.Lb({type:t,selectors:[["","ngPlural",""]],inputs:{ngPlural:"ngPlural"}}),t})(),Dt=(()=>{class t{constructor(t,e,i,n){this.value=t;const a=!isNaN(Number(t));n.addCase(a?"="+t:t,new _t(i,e))}}return t.\u0275fac=function(e){return new(e||t)(n.bc("ngPluralCase"),n.Qb(n.P),n.Qb(n.T),n.Qb(Ot,1))},t.\u0275dir=n.Lb({type:t,selectors:[["","ngPluralCase",""]]}),t})(),wt=(()=>{class t{constructor(t,e,i){this._ngEl=t,this._differs=e,this._renderer=i,this._ngStyle=null,this._differ=null}set ngStyle(t){this._ngStyle=t,!this._differ&&t&&(this._differ=this._differs.find(t).create())}ngDoCheck(){if(this._differ){const t=this._differ.diff(this._ngStyle);t&&this._applyChanges(t)}}_setStyle(t,e){const[i,n]=t.split(".");null!=(e=null!=e&&n?`${e}${n}`:e)?this._renderer.setStyle(this._ngEl.nativeElement,i,e):this._renderer.removeStyle(this._ngEl.nativeElement,i)}_applyChanges(t){t.forEachRemovedItem(t=>this._setStyle(t.key,null)),t.forEachAddedItem(t=>this._setStyle(t.key,t.currentValue)),t.forEachChangedItem(t=>this._setStyle(t.key,t.currentValue))}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(n.w),n.Qb(n.I))},t.\u0275dir=n.Lb({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}}),t})(),Mt=(()=>{class t{constructor(t){this._viewContainerRef=t,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null}ngOnChanges(t){if(this._shouldRecreateView(t)){const t=this._viewContainerRef;this._viewRef&&t.remove(t.indexOf(this._viewRef)),this._viewRef=this.ngTemplateOutlet?t.createEmbeddedView(this.ngTemplateOutlet,this.ngTemplateOutletContext):null}else this._viewRef&&this.ngTemplateOutletContext&&this._updateExistingContext(this.ngTemplateOutletContext)}_shouldRecreateView(t){const e=t.ngTemplateOutletContext;return!!t.ngTemplateOutlet||e&&this._hasContextShapeChanged(e)}_hasContextShapeChanged(t){const e=Object.keys(t.previousValue||{}),i=Object.keys(t.currentValue||{});if(e.length===i.length){for(let t of i)if(-1===e.indexOf(t))return!0;return!1}return!0}_updateExistingContext(t){for(let e of Object.keys(t))this._viewRef.context[e]=this.ngTemplateOutletContext[e]}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.T))},t.\u0275dir=n.Lb({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet"},features:[n.Bb]}),t})();function kt(t,e){return Error(`InvalidPipeArgument: '${e}' for pipe '${Object(n.yb)(t)}'`)}class St{createSubscription(t,e){return t.subscribe({next:e,error:t=>{throw t}})}dispose(t){t.unsubscribe()}onDestroy(t){t.unsubscribe()}}class It{createSubscription(t,e){return t.then(e,t=>{throw t})}dispose(t){}onDestroy(t){}}const Pt=new It,Vt=new St;let Rt=(()=>{class t{constructor(t){this._ref=t,this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null}ngOnDestroy(){this._subscription&&this._dispose()}transform(t){return this._obj?t!==this._obj?(this._dispose(),this.transform(t)):this._latestValue:(t&&this._subscribe(t),this._latestValue)}_subscribe(t){this._obj=t,this._strategy=this._selectStrategy(t),this._subscription=this._strategy.createSubscription(t,e=>this._updateLatestValue(t,e))}_selectStrategy(e){if(Object(n.vb)(e))return Pt;if(Object(n.ub)(e))return Vt;throw kt(t,e)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(t,e){t===this._obj&&(this._latestValue=e,this._ref.markForCheck())}}return t.\u0275fac=function(e){return new(e||t)(n.cc())},t.\u0275pipe=n.Pb({name:"async",type:t,pure:!1}),t})(),jt=(()=>{class t{transform(e){if(!e)return e;if("string"!=typeof e)throw kt(t,e);return e.toLowerCase()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"lowercase",type:t,pure:!0}),t})();const At=/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D])\S*/g;let Wt=(()=>{class t{transform(e){if(!e)return e;if("string"!=typeof e)throw kt(t,e);return e.replace(At,t=>t[0].toUpperCase()+t.substr(1).toLowerCase())}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"titlecase",type:t,pure:!0}),t})(),Tt=(()=>{class t{transform(e){if(!e)return e;if("string"!=typeof e)throw kt(t,e);return e.toUpperCase()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"uppercase",type:t,pure:!0}),t})(),Et=(()=>{class t{constructor(t){this.locale=t}transform(e,i="mediumDate",a,s){if(null==e||""===e||e!=e)return null;try{return function(t,e,i,a){let s=function(t){if(it(t))return t;if("number"==typeof t&&!isNaN(t))return new Date(t);if("string"==typeof t){t=t.trim();const e=parseFloat(t);if(!isNaN(t-e))return new Date(e);if(/^(\d{4}-\d{1,2}-\d{1,2})$/.test(t)){const[e,i,n]=t.split("-").map(t=>+t);return new Date(e,i-1,n)}let i;if(i=t.match(z))return function(t){const e=new Date(0);let i=0,n=0;const a=t[8]?e.setUTCFullYear:e.setFullYear,s=t[8]?e.setUTCHours:e.setHours;t[9]&&(i=Number(t[9]+t[10]),n=Number(t[9]+t[11])),a.call(e,Number(t[1]),Number(t[2])-1,Number(t[3]));const o=Number(t[4]||0)-i,r=Number(t[5]||0)-n,c=Number(t[6]||0),l=Math.round(1e3*parseFloat("0."+(t[7]||0)));return s.call(e,o,r,c,l),e}(i)}const e=new Date(t);if(!it(e))throw new Error(`Unable to convert "${t}" into a date`);return e}(t);e=function t(e,i){const a=function(t){return Object(n.nb)(t)[n.eb.LocaleId]}(e);if(B[a]=B[a]||{},B[a][i])return B[a][i];let s="";switch(i){case"shortDate":s=j(e,V.Short);break;case"mediumDate":s=j(e,V.Medium);break;case"longDate":s=j(e,V.Long);break;case"fullDate":s=j(e,V.Full);break;case"shortTime":s=A(e,V.Short);break;case"mediumTime":s=A(e,V.Medium);break;case"longTime":s=A(e,V.Long);break;case"fullTime":s=A(e,V.Full);break;case"short":const i=t(e,"shortTime"),n=t(e,"shortDate");s=X(W(e,V.Short),[i,n]);break;case"medium":const a=t(e,"mediumTime"),o=t(e,"mediumDate");s=X(W(e,V.Medium),[a,o]);break;case"long":const r=t(e,"longTime"),c=t(e,"longDate");s=X(W(e,V.Long),[r,c]);break;case"full":const l=t(e,"fullTime"),d=t(e,"fullDate");s=X(W(e,V.Full),[l,d])}return s&&(B[a][i]=s),s}(i,e)||e;let o,r=[];for(;e;){if(o=U.exec(e),!o){r.push(e);break}{r=r.concat(o.slice(1));const t=r.pop();if(!t)break;e=t}}let c=s.getTimezoneOffset();a&&(c=et(a,c),s=function(t,e,i){const n=t.getTimezoneOffset();return function(t,e){return(t=new Date(t.getTime())).setMinutes(t.getMinutes()+e),t}(t,-1*(et(e,n)-n))}(s,a));let l="";return r.forEach(t=>{const e=function(t){if(tt[t])return tt[t];let e;switch(t){case"G":case"GG":case"GGG":e=Y(G.Eras,P.Abbreviated);break;case"GGGG":e=Y(G.Eras,P.Wide);break;case"GGGGG":e=Y(G.Eras,P.Narrow);break;case"y":e=K(H.FullYear,1,0,!1,!0);break;case"yy":e=K(H.FullYear,2,0,!0,!0);break;case"yyy":e=K(H.FullYear,3,0,!1,!0);break;case"yyyy":e=K(H.FullYear,4,0,!1,!0);break;case"M":case"L":e=K(H.Month,1,1);break;case"MM":case"LL":e=K(H.Month,2,1);break;case"MMM":e=Y(G.Months,P.Abbreviated);break;case"MMMM":e=Y(G.Months,P.Wide);break;case"MMMMM":e=Y(G.Months,P.Narrow);break;case"LLL":e=Y(G.Months,P.Abbreviated,I.Standalone);break;case"LLLL":e=Y(G.Months,P.Wide,I.Standalone);break;case"LLLLL":e=Y(G.Months,P.Narrow,I.Standalone);break;case"w":e=Z(1);break;case"ww":e=Z(2);break;case"W":e=Z(1,!0);break;case"d":e=K(H.Date,1);break;case"dd":e=K(H.Date,2);break;case"E":case"EE":case"EEE":e=Y(G.Days,P.Abbreviated);break;case"EEEE":e=Y(G.Days,P.Wide);break;case"EEEEE":e=Y(G.Days,P.Narrow);break;case"EEEEEE":e=Y(G.Days,P.Short);break;case"a":case"aa":case"aaa":e=Y(G.DayPeriods,P.Abbreviated);break;case"aaaa":e=Y(G.DayPeriods,P.Wide);break;case"aaaaa":e=Y(G.DayPeriods,P.Narrow);break;case"b":case"bb":case"bbb":e=Y(G.DayPeriods,P.Abbreviated,I.Standalone,!0);break;case"bbbb":e=Y(G.DayPeriods,P.Wide,I.Standalone,!0);break;case"bbbbb":e=Y(G.DayPeriods,P.Narrow,I.Standalone,!0);break;case"B":case"BB":case"BBB":e=Y(G.DayPeriods,P.Abbreviated,I.Format,!0);break;case"BBBB":e=Y(G.DayPeriods,P.Wide,I.Format,!0);break;case"BBBBB":e=Y(G.DayPeriods,P.Narrow,I.Format,!0);break;case"h":e=K(H.Hours,1,-12);break;case"hh":e=K(H.Hours,2,-12);break;case"H":e=K(H.Hours,1);break;case"HH":e=K(H.Hours,2);break;case"m":e=K(H.Minutes,1);break;case"mm":e=K(H.Minutes,2);break;case"s":e=K(H.Seconds,1);break;case"ss":e=K(H.Seconds,2);break;case"S":e=K(H.FractionalSeconds,1);break;case"SS":e=K(H.FractionalSeconds,2);break;case"SSS":e=K(H.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":e=J($.Short);break;case"ZZZZZ":e=J($.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":e=J($.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":e=J($.Long);break;default:return null}return tt[t]=e,e}(t);l+=e?e(s,i,c):"''"===t?"'":t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}(e,i,s||this.locale,a)}catch(o){throw kt(t,o.message)}}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.x))},t.\u0275pipe=n.Pb({name:"date",type:t,pure:!0}),t})();const Ft=/#/g;let Lt=(()=>{class t{constructor(t){this._localization=t}transform(e,i,n){if(null==e)return"";if("object"!=typeof i||null===i)throw kt(t,i);return i[ct(e,Object.keys(i),this._localization,n)].replace(Ft,e.toString())}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(rt))},t.\u0275pipe=n.Pb({name:"i18nPlural",type:t,pure:!0}),t})(),Qt=(()=>{class t{transform(e,i){if(null==e)return"";if("object"!=typeof i||"string"!=typeof e)throw kt(t,i);return i.hasOwnProperty(e)?i[e]:i.hasOwnProperty("other")?i.other:""}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"i18nSelect",type:t,pure:!0}),t})(),Nt=(()=>{class t{transform(t){return JSON.stringify(t,null,2)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"json",type:t,pure:!1}),t})(),zt=(()=>{class t{constructor(t){this.differs=t,this.keyValues=[]}transform(t,e=Bt){if(!t||!(t instanceof Map)&&"object"!=typeof t)return null;this.differ||(this.differ=this.differs.find(t).create());const i=this.differ.diff(t);return i&&(this.keyValues=[],i.forEachItem(t=>{this.keyValues.push({key:t.key,value:t.currentValue})}),this.keyValues.sort(e)),this.keyValues}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.w))},t.\u0275pipe=n.Pb({name:"keyvalue",type:t,pure:!1}),t})();function Bt(t,e){const i=t.key,n=e.key;if(i===n)return 0;if(void 0===i)return 1;if(void 0===n)return-1;if(null===i)return 1;if(null===n)return-1;if("string"==typeof i&&"string"==typeof n)return i<n?-1:1;if("number"==typeof i&&"number"==typeof n)return i-n;if("boolean"==typeof i&&"boolean"==typeof n)return i<n?-1:1;const a=String(i),s=String(n);return a==s?0:a<s?-1:1}let Ut=(()=>{class t{constructor(t){this._locale=t}transform(e,i,n){if(Gt(e))return null;n=n||this._locale;try{return function(t,e,i){return at(t,st(E(e,k.Decimal),T(e,R.MinusSign)),e,R.Group,R.Decimal,i)}(Xt(e),n,i)}catch(a){throw kt(t,a.message)}}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.x))},t.\u0275pipe=n.Pb({name:"number",type:t,pure:!0}),t})(),$t=(()=>{class t{constructor(t){this._locale=t}transform(e,i,n){if(Gt(e))return null;n=n||this._locale;try{return function(t,e,i){return at(t,st(E(e,k.Percent),T(e,R.MinusSign)),e,R.Group,R.Decimal,i,!0).replace(new RegExp("%","g"),T(e,R.PercentSign))}(Xt(e),n,i)}catch(a){throw kt(t,a.message)}}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.x))},t.\u0275pipe=n.Pb({name:"percent",type:t,pure:!0}),t})(),Ht=(()=>{class t{constructor(t,e="USD"){this._locale=t,this._defaultCurrencyCode=e}transform(e,i,a="symbol",s,o){if(Gt(e))return null;o=o||this._locale,"boolean"==typeof a&&(console&&console.warn&&console.warn('Warning: the currency pipe has been changed in Angular v5. The symbolDisplay option (third parameter) is now a string instead of a boolean. The accepted values are "code", "symbol" or "symbol-narrow".'),a=a?"symbol":"code");let r=i||this._defaultCurrencyCode;"code"!==a&&(r="symbol"===a||"symbol-narrow"===a?function(t,e,i="en"){const a=function(t){return Object(n.nb)(t)[n.eb.Currencies]}(i)[t]||M[t]||[],s=a[1];return"narrow"===e&&"string"==typeof s?s:a[0]||t}(r,"symbol"===a?"wide":"narrow",o):a);try{return function(t,e,i,n,a){const s=st(E(e,k.Currency),T(e,R.MinusSign));return s.minFrac=function(t){let e;const i=M[t];return i&&(e=i[2]),"number"==typeof e?e:2}(n),s.maxFrac=s.minFrac,at(t,s,e,R.CurrencyGroup,R.CurrencyDecimal,a).replace("\xa4",i).replace("\xa4","").trim()}(Xt(e),o,r,i,s)}catch(c){throw kt(t,c.message)}}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.x),n.Qb(n.k))},t.\u0275pipe=n.Pb({name:"currency",type:t,pure:!0}),t})();function Gt(t){return null==t||""===t||t!=t}function Xt(t){if("string"==typeof t&&!isNaN(Number(t)-parseFloat(t)))return Number(t);if("number"!=typeof t)throw new Error(t+" is not a number");return t}let qt=(()=>{class t{transform(e,i,n){if(null==e)return e;if(!this.supports(e))throw kt(t,e);return e.slice(i,n)}supports(t){return"string"==typeof t||Array.isArray(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=n.Pb({name:"slice",type:t,pure:!1}),t})(),Kt=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},providers:[{provide:rt,useClass:lt}]}),t})();const Yt="browser";function Jt(t){return t===Yt}let Zt=(()=>{class t{}return t.\u0275prov=Object(n.Mb)({token:t,providedIn:"root",factory:()=>new te(Object(n.ac)(c),window,Object(n.ac)(n.n))}),t})();class te{constructor(t,e,i){this.document=t,this.window=e,this.errorHandler=i,this.offset=()=>[0,0]}setOffset(t){this.offset=Array.isArray(t)?()=>t:t}getScrollPosition(){return this.supportsScrolling()?[this.window.scrollX,this.window.scrollY]:[0,0]}scrollToPosition(t){this.supportsScrolling()&&this.window.scrollTo(t[0],t[1])}scrollToAnchor(t){if(this.supportsScrolling()){const e=this.document.getElementById(t)||this.document.getElementsByName(t)[0];e&&this.scrollToElement(e)}}setHistoryScrollRestoration(t){if(this.supportScrollRestoration()){const e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=t)}}scrollToElement(t){const e=t.getBoundingClientRect(),i=e.left+this.window.pageXOffset,n=e.top+this.window.pageYOffset,a=this.offset();this.window.scrollTo(i-a[0],n-a[1])}supportScrollRestoration(){try{if(!this.window||!this.window.scrollTo)return!1;const t=ee(this.window.history)||ee(Object.getPrototypeOf(this.window.history));return!(!t||!t.writable&&!t.set)}catch(t){return!1}}supportsScrolling(){try{return!!this.window.scrollTo}catch(t){return!1}}}function ee(t){return Object.getOwnPropertyDescriptor(t,"scrollRestoration")}},pLZG:function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var n=i("7o/Q");function a(t,e){return function(i){return i.lift(new s(t,e))}}class s{constructor(t,e){this.predicate=t,this.thisArg=e}call(t,e){return e.subscribe(new o(t,this.predicate,this.thisArg))}}class o extends n.a{constructor(t,e,i){super(t),this.predicate=e,this.thisArg=i,this.count=0}_next(t){let e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(i){return void this.destination.error(i)}e&&this.destination.next(t)}}},qFsG:function(t,e,i){"use strict";i.d(e,"a",(function(){return p})),i.d(e,"b",(function(){return v})),i.d(e,"c",(function(){return _})),i.d(e,"d",(function(){return h}));var n=i("ihCf"),a=i("fXoL"),s=i("8LU1"),o=i("nLfN"),r=i("FKr1"),c=i("kmnG"),l=i("XNiG"),d=i("3Pt+");let h=(()=>{class t extends n.c{get matAutosizeMinRows(){return this.minRows}set matAutosizeMinRows(t){this.minRows=t}get matAutosizeMaxRows(){return this.maxRows}set matAutosizeMaxRows(t){this.maxRows=t}get matAutosize(){return this.enabled}set matAutosize(t){this.enabled=t}get matTextareaAutosize(){return this.enabled}set matTextareaAutosize(t){this.enabled=t}}return t.\u0275fac=function(e){return u(e||t)},t.\u0275dir=a.Lb({type:t,selectors:[["textarea","mat-autosize",""],["textarea","matTextareaAutosize",""]],hostAttrs:["rows","1",1,"cdk-textarea-autosize","mat-autosize"],inputs:{cdkAutosizeMinRows:"cdkAutosizeMinRows",cdkAutosizeMaxRows:"cdkAutosizeMaxRows",matAutosizeMinRows:"matAutosizeMinRows",matAutosizeMaxRows:"matAutosizeMaxRows",matAutosize:["mat-autosize","matAutosize"],matTextareaAutosize:"matTextareaAutosize"},exportAs:["matTextareaAutosize"],features:[a.Ab]}),t})();const u=a.Yb(h),p=new a.s("MAT_INPUT_VALUE_ACCESSOR"),b=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let f=0;class m{constructor(t,e,i,n){this._defaultErrorStateMatcher=t,this._parentForm=e,this._parentFormGroup=i,this.ngControl=n}}const g=Object(r.D)(m);let v=(()=>{class t extends g{constructor(t,e,i,n,a,s,r,c,d,h){super(s,n,a,i),this._elementRef=t,this._platform=e,this.ngControl=i,this._autofillMonitor=c,this._formField=h,this._uid="mat-input-"+f++,this.focused=!1,this.stateChanges=new l.a,this.controlType="mat-input",this.autofilled=!1,this._disabled=!1,this._required=!1,this._type="text",this._readonly=!1,this._neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(t=>Object(o.e)().has(t));const u=this._elementRef.nativeElement,p=u.nodeName.toLowerCase();this._inputValueAccessor=r||u,this._previousNativeValue=this.value,this.id=this.id,e.IOS&&d.runOutsideAngular(()=>{t.nativeElement.addEventListener("keyup",t=>{let e=t.target;e.value||e.selectionStart||e.selectionEnd||(e.setSelectionRange(1,1),e.setSelectionRange(0,0))})}),this._isServer=!this._platform.isBrowser,this._isNativeSelect="select"===p,this._isTextarea="textarea"===p,this._isNativeSelect&&(this.controlType=u.multiple?"mat-native-select-multiple":"mat-native-select")}get disabled(){return this.ngControl&&null!==this.ngControl.disabled?this.ngControl.disabled:this._disabled}set disabled(t){this._disabled=Object(s.c)(t),this.focused&&(this.focused=!1,this.stateChanges.next())}get id(){return this._id}set id(t){this._id=t||this._uid}get required(){return this._required}set required(t){this._required=Object(s.c)(t)}get type(){return this._type}set type(t){this._type=t||"text",this._validateType(),!this._isTextarea&&Object(o.e)().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}get value(){return this._inputValueAccessor.value}set value(t){t!==this.value&&(this._inputValueAccessor.value=t,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(t){this._readonly=Object(s.c)(t)}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(t=>{this.autofilled=t.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement)}ngDoCheck(){this.ngControl&&this.updateErrorState(),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(t){this._elementRef.nativeElement.focus(t)}_focusChanged(t){t===this.focused||this.readonly&&t||(this.focused=t,this.stateChanges.next())}_onInput(){}_dirtyCheckPlaceholder(){var t,e;const i=(null===(e=null===(t=this._formField)||void 0===t?void 0:t._hideControlPlaceholder)||void 0===e?void 0:e.call(t))?null:this.placeholder;if(i!==this._previousPlaceholder){const t=this._elementRef.nativeElement;this._previousPlaceholder=i,i?t.setAttribute("placeholder",i):t.removeAttribute("placeholder")}}_dirtyCheckNativeValue(){const t=this._elementRef.nativeElement.value;this._previousNativeValue!==t&&(this._previousNativeValue=t,this.stateChanges.next())}_validateType(){b.indexOf(this._type)}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let t=this._elementRef.nativeElement.validity;return t&&t.badInput}get empty(){return!(this._isNeverEmpty()||this._elementRef.nativeElement.value||this._isBadInput()||this.autofilled)}get shouldLabelFloat(){if(this._isNativeSelect){const t=this._elementRef.nativeElement,e=t.options[0];return this.focused||t.multiple||!this.empty||!!(t.selectedIndex>-1&&e&&e.label)}return this.focused||!this.empty}setDescribedByIds(t){t.length?this._elementRef.nativeElement.setAttribute("aria-describedby",t.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(o.a),a.Qb(d.t,10),a.Qb(d.w,8),a.Qb(d.m,8),a.Qb(r.d),a.Qb(p,10),a.Qb(n.a),a.Qb(a.C),a.Qb(c.a,8))},t.\u0275dir=a.Lb({type:t,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-input-element","mat-form-field-autofill-control"],hostVars:9,hostBindings:function(t,e){1&t&&a.dc("focus",(function(){return e._focusChanged(!0)}))("blur",(function(){return e._focusChanged(!1)}))("input",(function(){return e._onInput()})),2&t&&(a.Zb("disabled",e.disabled)("required",e.required),a.Eb("id",e.id)("data-placeholder",e.placeholder)("readonly",e.readonly&&!e._isNativeSelect||null)("aria-invalid",e.errorState)("aria-required",e.required.toString()),a.Ib("mat-input-server",e._isServer))},inputs:{id:"id",disabled:"disabled",required:"required",type:"type",value:"value",readonly:"readonly",placeholder:"placeholder",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"]},exportAs:["matInput"],features:[a.Cb([{provide:c.d,useExisting:t}]),a.Ab,a.Bb]}),t})(),_=(()=>{class t{}return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)},providers:[r.d],imports:[[n.d,c.e],n.d,c.e]}),t})()},quSY:function(t,e,i){"use strict";i.d(e,"a",(function(){return r}));var n=i("DH7j"),a=i("XoHu"),s=i("n6bG");const o=(()=>{function t(t){return Error.call(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((t,e)=>`${e+1}) ${t.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t})();let r=(()=>{class t{constructor(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}unsubscribe(){let e;if(this.closed)return;let{_parentOrParents:i,_ctorUnsubscribe:r,_unsubscribe:l,_subscriptions:d}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,i instanceof t)i.remove(this);else if(null!==i)for(let t=0;t<i.length;++t)i[t].remove(this);if(Object(s.a)(l)){r&&(this._unsubscribe=void 0);try{l.call(this)}catch(h){e=h instanceof o?c(h.errors):[h]}}if(Object(n.a)(d)){let t=-1,i=d.length;for(;++t<i;){const i=d[t];if(Object(a.a)(i))try{i.unsubscribe()}catch(h){e=e||[],h instanceof o?e=e.concat(c(h.errors)):e.push(h)}}}if(e)throw new o(e)}add(e){let i=e;if(!e)return t.EMPTY;switch(typeof e){case"function":i=new t(e);case"object":if(i===this||i.closed||"function"!=typeof i.unsubscribe)return i;if(this.closed)return i.unsubscribe(),i;if(!(i instanceof t)){const e=i;i=new t,i._subscriptions=[e]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}let{_parentOrParents:n}=i;if(null===n)i._parentOrParents=this;else if(n instanceof t){if(n===this)return i;i._parentOrParents=[n,this]}else{if(-1!==n.indexOf(this))return i;n.push(this)}const a=this._subscriptions;return null===a?this._subscriptions=[i]:a.push(i),i}remove(t){const e=this._subscriptions;if(e){const i=e.indexOf(t);-1!==i&&e.splice(i,1)}}}var e;return t.EMPTY=((e=new t).closed=!0,e),t})();function c(t){return t.reduce((t,e)=>t.concat(e instanceof o?e.errors:e),[])}},rDax:function(t,e,i){"use strict";i.d(e,"a",(function(){return G})),i.d(e,"b",(function(){return H})),i.d(e,"c",(function(){return B})),i.d(e,"d",(function(){return M})),i.d(e,"e",(function(){return j})),i.d(e,"f",(function(){return q}));var n=i("vxfF"),a=i("fXoL"),s=i("nLfN"),o=i("cH1L"),r=i("ofXK"),c=i("8LU1"),l=i("+rOU"),d=i("XNiG"),h=i("quSY"),u=i("VRyK"),p=i("IzEk"),b=i("1G5W"),f=i("7o/Q");class m{constructor(t,e){this.predicate=t,this.inclusive=e}call(t,e){return e.subscribe(new g(t,this.predicate,this.inclusive))}}class g extends f.a{constructor(t,e,i){super(t),this.predicate=e,this.inclusive=i,this.index=0}_next(t){const e=this.destination;let i;try{i=this.predicate(t,this.index++)}catch(n){return void e.error(n)}this.nextOrComplete(t,i)}nextOrComplete(t,e){const i=this.destination;Boolean(e)?i.next(t):(this.inclusive&&i.next(t),i.complete())}}var v=i("FtGj");class _{constructor(t,e){this._viewportRuler=t,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=e}attach(){}enable(){if(this._canBeEnabled()){const t=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=t.style.left||"",this._previousHTMLStyles.top=t.style.top||"",t.style.left=Object(c.d)(-this._previousScrollPosition.left),t.style.top=Object(c.d)(-this._previousScrollPosition.top),t.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){const t=this._document.documentElement,e=t.style,i=this._document.body.style,n=e.scrollBehavior||"",a=i.scrollBehavior||"";this._isEnabled=!1,e.left=this._previousHTMLStyles.left,e.top=this._previousHTMLStyles.top,t.classList.remove("cdk-global-scrollblock"),e.scrollBehavior=i.scrollBehavior="auto",window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),e.scrollBehavior=n,i.scrollBehavior=a}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;const t=this._document.body,e=this._viewportRuler.getViewportSize();return t.scrollHeight>e.height||t.scrollWidth>e.width}}class y{constructor(t,e,i,n){this._scrollDispatcher=t,this._ngZone=e,this._viewportRuler=i,this._config=n,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(t){this._overlayRef=t}enable(){if(this._scrollSubscription)return;const t=this._scrollDispatcher.scrolled(0);this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=t.subscribe(()=>{const t=this._viewportRuler.getViewportScrollPosition().top;Math.abs(t-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=t.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}class x{enable(){}disable(){}attach(){}}function C(t,e){return e.some(e=>t.bottom<e.top||t.top>e.bottom||t.right<e.left||t.left>e.right)}function O(t,e){return e.some(e=>t.top<e.top||t.bottom>e.bottom||t.left<e.left||t.right>e.right)}class D{constructor(t,e,i,n){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=i,this._config=n,this._scrollSubscription=null}attach(t){this._overlayRef=t}enable(){this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){const t=this._overlayRef.overlayElement.getBoundingClientRect(),{width:e,height:i}=this._viewportRuler.getViewportSize();C(t,[{width:e,height:i,bottom:i,right:e,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}}))}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}let w=(()=>{class t{constructor(t,e,i,n){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=i,this.noop=()=>new x,this.close=t=>new y(this._scrollDispatcher,this._ngZone,this._viewportRuler,t),this.block=()=>new _(this._viewportRuler,this._document),this.reposition=t=>new D(this._scrollDispatcher,this._viewportRuler,this._ngZone,t),this._document=n}}return t.\u0275fac=function(e){return new(e||t)(a.ac(n.f),a.ac(n.h),a.ac(a.C),a.ac(r.e))},t.\u0275prov=Object(a.Mb)({factory:function(){return new t(Object(a.ac)(n.f),Object(a.ac)(n.h),Object(a.ac)(a.C),Object(a.ac)(r.e))},token:t,providedIn:"root"}),t})();class M{constructor(t){if(this.scrollStrategy=new x,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,t){const e=Object.keys(t);for(const i of e)void 0!==t[i]&&(this[i]=t[i])}}}class k{constructor(t,e,i,n,a){this.offsetX=i,this.offsetY=n,this.panelClass=a,this.originX=t.originX,this.originY=t.originY,this.overlayX=e.overlayX,this.overlayY=e.overlayY}}class S{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}let I=(()=>{class t{constructor(t){this._attachedOverlays=[],this._document=t}ngOnDestroy(){this.detach()}add(t){this.remove(t),this._attachedOverlays.push(t)}remove(t){const e=this._attachedOverlays.indexOf(t);e>-1&&this._attachedOverlays.splice(e,1),0===this._attachedOverlays.length&&this.detach()}}return t.\u0275fac=function(e){return new(e||t)(a.ac(r.e))},t.\u0275prov=Object(a.Mb)({factory:function(){return new t(Object(a.ac)(r.e))},token:t,providedIn:"root"}),t})(),P=(()=>{class t extends I{constructor(t){super(t),this._keydownListener=t=>{const e=this._attachedOverlays;for(let i=e.length-1;i>-1;i--)if(e[i]._keydownEvents.observers.length>0){e[i]._keydownEvents.next(t);break}}}add(t){super.add(t),this._isAttached||(this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}}return t.\u0275fac=function(e){return new(e||t)(a.ac(r.e))},t.\u0275prov=Object(a.Mb)({factory:function(){return new t(Object(a.ac)(r.e))},token:t,providedIn:"root"}),t})(),V=(()=>{class t extends I{constructor(t,e){super(t),this._platform=e,this._cursorStyleIsSet=!1,this._clickListener=t=>{const e=t.composedPath?t.composedPath()[0]:t.target,i=this._attachedOverlays.slice();for(let n=i.length-1;n>-1;n--){const a=i[n];if(!(a._outsidePointerEvents.observers.length<1)&&a.hasAttached()){if(a.overlayElement.contains(e))break;a._outsidePointerEvents.next(t)}}}}add(t){super.add(t),this._isAttached||(this._document.body.addEventListener("click",this._clickListener,!0),this._document.body.addEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=this._document.body.style.cursor,this._document.body.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("click",this._clickListener,!0),this._document.body.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(this._document.body.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1)}}return t.\u0275fac=function(e){return new(e||t)(a.ac(r.e),a.ac(s.a))},t.\u0275prov=Object(a.Mb)({factory:function(){return new t(Object(a.ac)(r.e),Object(a.ac)(s.a))},token:t,providedIn:"root"}),t})();const R=!("undefined"==typeof window||!window||!window.__karma__&&!window.jasmine);let j=(()=>{class t{constructor(t,e){this._platform=e,this._document=t}ngOnDestroy(){const t=this._containerElement;t&&t.parentNode&&t.parentNode.removeChild(t)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){const t=this._platform?this._platform.isBrowser:"undefined"!=typeof window;if(t||R){const t=this._document.querySelectorAll('.cdk-overlay-container[platform="server"], .cdk-overlay-container[platform="test"]');for(let e=0;e<t.length;e++)t[e].parentNode.removeChild(t[e])}const e=this._document.createElement("div");e.classList.add("cdk-overlay-container"),R?e.setAttribute("platform","test"):t||e.setAttribute("platform","server"),this._document.body.appendChild(e),this._containerElement=e}}return t.\u0275fac=function(e){return new(e||t)(a.ac(r.e),a.ac(s.a))},t.\u0275prov=Object(a.Mb)({factory:function(){return new t(Object(a.ac)(r.e),Object(a.ac)(s.a))},token:t,providedIn:"root"}),t})();class A{constructor(t,e,i,n,a,s,o,r,c){this._portalOutlet=t,this._host=e,this._pane=i,this._config=n,this._ngZone=a,this._keyboardDispatcher=s,this._document=o,this._location=r,this._outsideClickDispatcher=c,this._backdropElement=null,this._backdropClick=new d.a,this._attachments=new d.a,this._detachments=new d.a,this._locationChanges=h.a.EMPTY,this._backdropClickHandler=t=>this._backdropClick.next(t),this._keydownEvents=new d.a,this._outsidePointerEvents=new d.a,n.scrollStrategy&&(this._scrollStrategy=n.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=n.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(t){let e=this._portalOutlet.attach(t);return!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host),this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._ngZone.onStable.pipe(Object(p.a)(1)).subscribe(()=>{this.hasAttached()&&this.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&this._location&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher&&this._outsideClickDispatcher.add(this),e}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();const t=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenStable(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher&&this._outsideClickDispatcher.remove(this),t}dispose(){const t=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this.detachBackdrop(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher&&this._outsideClickDispatcher.remove(this),this._host&&this._host.parentNode&&(this._host.parentNode.removeChild(this._host),this._host=null),this._previousHostParent=this._pane=null,t&&this._detachments.next(),this._detachments.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(t){t!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=t,this.hasAttached()&&(t.attach(this),this.updatePosition()))}updateSize(t){this._config=Object.assign(Object.assign({},this._config),t),this._updateElementSize()}setDirection(t){this._config=Object.assign(Object.assign({},this._config),{direction:t}),this._updateElementDirection()}addPanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!0)}removePanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!1)}getDirection(){const t=this._config.direction;return t?"string"==typeof t?t:t.value:"ltr"}updateScrollStrategy(t){t!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=t,this.hasAttached()&&(t.attach(this),t.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;const t=this._pane.style;t.width=Object(c.d)(this._config.width),t.height=Object(c.d)(this._config.height),t.minWidth=Object(c.d)(this._config.minWidth),t.minHeight=Object(c.d)(this._config.minHeight),t.maxWidth=Object(c.d)(this._config.maxWidth),t.maxHeight=Object(c.d)(this._config.maxHeight)}_togglePointerEvents(t){this._pane.style.pointerEvents=t?"auto":"none"}_attachBackdrop(){this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),"undefined"!=typeof requestAnimationFrame?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add("cdk-overlay-backdrop-showing")})}):this._backdropElement.classList.add("cdk-overlay-backdrop-showing")}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){let t,e=this._backdropElement;if(!e)return;let i=()=>{e&&(e.removeEventListener("click",this._backdropClickHandler),e.removeEventListener("transitionend",i),e.parentNode&&e.parentNode.removeChild(e)),this._backdropElement==e&&(this._backdropElement=null),this._config.backdropClass&&this._toggleClasses(e,this._config.backdropClass,!1),clearTimeout(t)};e.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{e.addEventListener("transitionend",i)}),e.style.pointerEvents="none",t=this._ngZone.runOutsideAngular(()=>setTimeout(i,500))}_toggleClasses(t,e,i){const n=t.classList;Object(c.b)(e).forEach(t=>{t&&(i?n.add(t):n.remove(t))})}_detachContentWhenStable(){this._ngZone.runOutsideAngular(()=>{const t=this._ngZone.onStable.pipe(Object(b.a)(Object(u.a)(this._attachments,this._detachments))).subscribe(()=>{this._pane&&this._host&&0!==this._pane.children.length||(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._previousHostParent.removeChild(this._host)),t.unsubscribe())})})}_disposeScrollStrategy(){const t=this._scrollStrategy;t&&(t.disable(),t.detach&&t.detach())}}const W=/([A-Za-z%]+)$/;class T{constructor(t,e,i,n,a){this._viewportRuler=e,this._document=i,this._platform=n,this._overlayContainer=a,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new d.a,this._resizeSubscription=h.a.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}get positions(){return this._preferredPositions}attach(t){this._validatePositions(),t.hostElement.classList.add("cdk-overlay-connected-position-bounding-box"),this._overlayRef=t,this._boundingBox=t.hostElement,this._pane=t.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition)return void this.reapplyLastPosition();this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect();const t=this._originRect,e=this._overlayRect,i=this._viewportRect,n=[];let a;for(let s of this._preferredPositions){let o=this._getOriginPoint(t,s),r=this._getOverlayPoint(o,e,s),c=this._getOverlayFit(r,e,i,s);if(c.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(s,o);this._canFitWithFlexibleDimensions(c,r,i)?n.push({position:s,origin:o,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(o,s)}):(!a||a.overlayFit.visibleArea<c.visibleArea)&&(a={overlayFit:c,overlayPoint:r,originPoint:o,position:s,overlayRect:e})}if(n.length){let t=null,e=-1;for(const i of n){const n=i.boundingBoxRect.width*i.boundingBoxRect.height*(i.position.weight||1);n>e&&(e=n,t=i)}return this._isPushed=!1,void this._applyPosition(t.position,t.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(a.position,a.originPoint);this._applyPosition(a.position,a.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&E(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove("cdk-overlay-connected-position-bounding-box"),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(!this._isDisposed&&(!this._platform||this._platform.isBrowser)){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect();const t=this._lastPosition||this._preferredPositions[0],e=this._getOriginPoint(this._originRect,t);this._applyPosition(t,e)}}withScrollableContainers(t){return this._scrollables=t,this}withPositions(t){return this._preferredPositions=t,-1===t.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(t){return this._viewportMargin=t,this}withFlexibleDimensions(t=!0){return this._hasFlexibleDimensions=t,this}withGrowAfterOpen(t=!0){return this._growAfterOpen=t,this}withPush(t=!0){return this._canPush=t,this}withLockedPosition(t=!0){return this._positionLocked=t,this}setOrigin(t){return this._origin=t,this}withDefaultOffsetX(t){return this._offsetX=t,this}withDefaultOffsetY(t){return this._offsetY=t,this}withTransformOriginOn(t){return this._transformOriginSelector=t,this}_getOriginPoint(t,e){let i,n;if("center"==e.originX)i=t.left+t.width/2;else{const n=this._isRtl()?t.right:t.left,a=this._isRtl()?t.left:t.right;i="start"==e.originX?n:a}return n="center"==e.originY?t.top+t.height/2:"top"==e.originY?t.top:t.bottom,{x:i,y:n}}_getOverlayPoint(t,e,i){let n,a;return n="center"==i.overlayX?-e.width/2:"start"===i.overlayX?this._isRtl()?-e.width:0:this._isRtl()?0:-e.width,a="center"==i.overlayY?-e.height/2:"top"==i.overlayY?0:-e.height,{x:t.x+n,y:t.y+a}}_getOverlayFit(t,e,i,n){let{x:a,y:s}=t,o=this._getOffset(n,"x"),r=this._getOffset(n,"y");o&&(a+=o),r&&(s+=r);let c=0-s,l=s+e.height-i.height,d=this._subtractOverflows(e.width,0-a,a+e.width-i.width),h=this._subtractOverflows(e.height,c,l),u=d*h;return{visibleArea:u,isCompletelyWithinViewport:e.width*e.height===u,fitsInViewportVertically:h===e.height,fitsInViewportHorizontally:d==e.width}}_canFitWithFlexibleDimensions(t,e,i){if(this._hasFlexibleDimensions){const n=i.bottom-e.y,a=i.right-e.x,s=F(this._overlayRef.getConfig().minHeight),o=F(this._overlayRef.getConfig().minWidth),r=t.fitsInViewportHorizontally||null!=o&&o<=a;return(t.fitsInViewportVertically||null!=s&&s<=n)&&r}return!1}_pushOverlayOnScreen(t,e,i){if(this._previousPushAmount&&this._positionLocked)return{x:t.x+this._previousPushAmount.x,y:t.y+this._previousPushAmount.y};const n=this._viewportRect,a=Math.max(t.x+e.width-n.width,0),s=Math.max(t.y+e.height-n.height,0),o=Math.max(n.top-i.top-t.y,0),r=Math.max(n.left-i.left-t.x,0);let c=0,l=0;return c=e.width<=n.width?r||-a:t.x<this._viewportMargin?n.left-i.left-t.x:0,l=e.height<=n.height?o||-s:t.y<this._viewportMargin?n.top-i.top-t.y:0,this._previousPushAmount={x:c,y:l},{x:t.x+c,y:t.y+l}}_applyPosition(t,e){if(this._setTransformOrigin(t),this._setOverlayElementStyles(e,t),this._setBoundingBoxStyles(e,t),t.panelClass&&this._addPanelClasses(t.panelClass),this._lastPosition=t,this._positionChanges.observers.length){const e=this._getScrollVisibility(),i=new S(t,e);this._positionChanges.next(i)}this._isInitialRender=!1}_setTransformOrigin(t){if(!this._transformOriginSelector)return;const e=this._boundingBox.querySelectorAll(this._transformOriginSelector);let i,n=t.overlayY;i="center"===t.overlayX?"center":this._isRtl()?"start"===t.overlayX?"right":"left":"start"===t.overlayX?"left":"right";for(let a=0;a<e.length;a++)e[a].style.transformOrigin=`${i} ${n}`}_calculateBoundingBoxRect(t,e){const i=this._viewportRect,n=this._isRtl();let a,s,o,r,c,l;if("top"===e.overlayY)s=t.y,a=i.height-s+this._viewportMargin;else if("bottom"===e.overlayY)o=i.height-t.y+2*this._viewportMargin,a=i.height-o+this._viewportMargin;else{const e=Math.min(i.bottom-t.y+i.top,t.y),n=this._lastBoundingBoxSize.height;a=2*e,s=t.y-e,a>n&&!this._isInitialRender&&!this._growAfterOpen&&(s=t.y-n/2)}if("end"===e.overlayX&&!n||"start"===e.overlayX&&n)l=i.width-t.x+this._viewportMargin,r=t.x-this._viewportMargin;else if("start"===e.overlayX&&!n||"end"===e.overlayX&&n)c=t.x,r=i.right-t.x;else{const e=Math.min(i.right-t.x+i.left,t.x),n=this._lastBoundingBoxSize.width;r=2*e,c=t.x-e,r>n&&!this._isInitialRender&&!this._growAfterOpen&&(c=t.x-n/2)}return{top:s,left:c,bottom:o,right:l,width:r,height:a}}_setBoundingBoxStyles(t,e){const i=this._calculateBoundingBoxRect(t,e);this._isInitialRender||this._growAfterOpen||(i.height=Math.min(i.height,this._lastBoundingBoxSize.height),i.width=Math.min(i.width,this._lastBoundingBoxSize.width));const n={};if(this._hasExactPosition())n.top=n.left="0",n.bottom=n.right=n.maxHeight=n.maxWidth="",n.width=n.height="100%";else{const t=this._overlayRef.getConfig().maxHeight,a=this._overlayRef.getConfig().maxWidth;n.height=Object(c.d)(i.height),n.top=Object(c.d)(i.top),n.bottom=Object(c.d)(i.bottom),n.width=Object(c.d)(i.width),n.left=Object(c.d)(i.left),n.right=Object(c.d)(i.right),n.alignItems="center"===e.overlayX?"center":"end"===e.overlayX?"flex-end":"flex-start",n.justifyContent="center"===e.overlayY?"center":"bottom"===e.overlayY?"flex-end":"flex-start",t&&(n.maxHeight=Object(c.d)(t)),a&&(n.maxWidth=Object(c.d)(a))}this._lastBoundingBoxSize=i,E(this._boundingBox.style,n)}_resetBoundingBoxStyles(){E(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){E(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(t,e){const i={},n=this._hasExactPosition(),a=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(n){const n=this._viewportRuler.getViewportScrollPosition();E(i,this._getExactOverlayY(e,t,n)),E(i,this._getExactOverlayX(e,t,n))}else i.position="static";let o="",r=this._getOffset(e,"x"),l=this._getOffset(e,"y");r&&(o+=`translateX(${r}px) `),l&&(o+=`translateY(${l}px)`),i.transform=o.trim(),s.maxHeight&&(n?i.maxHeight=Object(c.d)(s.maxHeight):a&&(i.maxHeight="")),s.maxWidth&&(n?i.maxWidth=Object(c.d)(s.maxWidth):a&&(i.maxWidth="")),E(this._pane.style,i)}_getExactOverlayY(t,e,i){let n={top:"",bottom:""},a=this._getOverlayPoint(e,this._overlayRect,t);this._isPushed&&(a=this._pushOverlayOnScreen(a,this._overlayRect,i));let s=this._overlayContainer.getContainerElement().getBoundingClientRect().top;return a.y-=s,"bottom"===t.overlayY?n.bottom=this._document.documentElement.clientHeight-(a.y+this._overlayRect.height)+"px":n.top=Object(c.d)(a.y),n}_getExactOverlayX(t,e,i){let n,a={left:"",right:""},s=this._getOverlayPoint(e,this._overlayRect,t);return this._isPushed&&(s=this._pushOverlayOnScreen(s,this._overlayRect,i)),n=this._isRtl()?"end"===t.overlayX?"left":"right":"end"===t.overlayX?"right":"left","right"===n?a.right=this._document.documentElement.clientWidth-(s.x+this._overlayRect.width)+"px":a.left=Object(c.d)(s.x),a}_getScrollVisibility(){const t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),i=this._scrollables.map(t=>t.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:O(t,i),isOriginOutsideView:C(t,i),isOverlayClipped:O(e,i),isOverlayOutsideView:C(e,i)}}_subtractOverflows(t,...e){return e.reduce((t,e)=>t-Math.max(e,0),t)}_getNarrowedViewportRect(){const t=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,i=this._viewportRuler.getViewportScrollPosition();return{top:i.top+this._viewportMargin,left:i.left+this._viewportMargin,right:i.left+t-this._viewportMargin,bottom:i.top+e-this._viewportMargin,width:t-2*this._viewportMargin,height:e-2*this._viewportMargin}}_isRtl(){return"rtl"===this._overlayRef.getDirection()}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(t,e){return"x"===e?null==t.offsetX?this._offsetX:t.offsetX:null==t.offsetY?this._offsetY:t.offsetY}_validatePositions(){}_addPanelClasses(t){this._pane&&Object(c.b)(t).forEach(t=>{""!==t&&-1===this._appliedPanelClasses.indexOf(t)&&(this._appliedPanelClasses.push(t),this._pane.classList.add(t))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(t=>{this._pane.classList.remove(t)}),this._appliedPanelClasses=[])}_getOriginRect(){const t=this._origin;if(t instanceof a.l)return t.nativeElement.getBoundingClientRect();if(t instanceof Element)return t.getBoundingClientRect();const e=t.width||0,i=t.height||0;return{top:t.y,bottom:t.y+i,left:t.x,right:t.x+e,height:i,width:e}}}function E(t,e){for(let i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function F(t){if("number"!=typeof t&&null!=t){const[e,i]=t.split(W);return i&&"px"!==i?null:parseFloat(e)}return t||null}class L{constructor(t,e,i,n,a,s,o){this._preferredPositions=[],this._positionStrategy=new T(i,n,a,s,o).withFlexibleDimensions(!1).withPush(!1).withViewportMargin(0),this.withFallbackPosition(t,e),this.onPositionChange=this._positionStrategy.positionChanges}get positions(){return this._preferredPositions}attach(t){this._overlayRef=t,this._positionStrategy.attach(t),this._direction&&(t.setDirection(this._direction),this._direction=null)}dispose(){this._positionStrategy.dispose()}detach(){this._positionStrategy.detach()}apply(){this._positionStrategy.apply()}recalculateLastPosition(){this._positionStrategy.reapplyLastPosition()}withScrollableContainers(t){this._positionStrategy.withScrollableContainers(t)}withFallbackPosition(t,e,i,n){const a=new k(t,e,i,n);return this._preferredPositions.push(a),this._positionStrategy.withPositions(this._preferredPositions),this}withDirection(t){return this._overlayRef?this._overlayRef.setDirection(t):this._direction=t,this}withOffsetX(t){return this._positionStrategy.withDefaultOffsetX(t),this}withOffsetY(t){return this._positionStrategy.withDefaultOffsetY(t),this}withLockedPosition(t){return this._positionStrategy.withLockedPosition(t),this}withPositions(t){return this._preferredPositions=t.slice(),this._positionStrategy.withPositions(this._preferredPositions),this}setOrigin(t){return this._positionStrategy.setOrigin(t),this}}class Q{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._leftOffset="",this._rightOffset="",this._alignItems="",this._justifyContent="",this._width="",this._height=""}attach(t){const e=t.getConfig();this._overlayRef=t,this._width&&!e.width&&t.updateSize({width:this._width}),this._height&&!e.height&&t.updateSize({height:this._height}),t.hostElement.classList.add("cdk-global-overlay-wrapper"),this._isDisposed=!1}top(t=""){return this._bottomOffset="",this._topOffset=t,this._alignItems="flex-start",this}left(t=""){return this._rightOffset="",this._leftOffset=t,this._justifyContent="flex-start",this}bottom(t=""){return this._topOffset="",this._bottomOffset=t,this._alignItems="flex-end",this}right(t=""){return this._leftOffset="",this._rightOffset=t,this._justifyContent="flex-end",this}width(t=""){return this._overlayRef?this._overlayRef.updateSize({width:t}):this._width=t,this}height(t=""){return this._overlayRef?this._overlayRef.updateSize({height:t}):this._height=t,this}centerHorizontally(t=""){return this.left(t),this._justifyContent="center",this}centerVertically(t=""){return this.top(t),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;const t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,i=this._overlayRef.getConfig(),{width:n,height:a,maxWidth:s,maxHeight:o}=i,r=!("100%"!==n&&"100vw"!==n||s&&"100%"!==s&&"100vw"!==s),c=!("100%"!==a&&"100vh"!==a||o&&"100%"!==o&&"100vh"!==o);t.position=this._cssPosition,t.marginLeft=r?"0":this._leftOffset,t.marginTop=c?"0":this._topOffset,t.marginBottom=this._bottomOffset,t.marginRight=this._rightOffset,r?e.justifyContent="flex-start":"center"===this._justifyContent?e.justifyContent="center":"rtl"===this._overlayRef.getConfig().direction?"flex-start"===this._justifyContent?e.justifyContent="flex-end":"flex-end"===this._justifyContent&&(e.justifyContent="flex-start"):e.justifyContent=this._justifyContent,e.alignItems=c?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;const t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,i=e.style;e.classList.remove("cdk-global-overlay-wrapper"),i.justifyContent=i.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}let N=(()=>{class t{constructor(t,e,i,n){this._viewportRuler=t,this._document=e,this._platform=i,this._overlayContainer=n}global(){return new Q}connectedTo(t,e,i){return new L(e,i,t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}flexibleConnectedTo(t){return new T(t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return t.\u0275fac=function(e){return new(e||t)(a.ac(n.h),a.ac(r.e),a.ac(s.a),a.ac(j))},t.\u0275prov=Object(a.Mb)({factory:function(){return new t(Object(a.ac)(n.h),Object(a.ac)(r.e),Object(a.ac)(s.a),Object(a.ac)(j))},token:t,providedIn:"root"}),t})(),z=0,B=(()=>{class t{constructor(t,e,i,n,a,s,o,r,c,l,d){this.scrollStrategies=t,this._overlayContainer=e,this._componentFactoryResolver=i,this._positionBuilder=n,this._keyboardDispatcher=a,this._injector=s,this._ngZone=o,this._document=r,this._directionality=c,this._location=l,this._outsideClickDispatcher=d}create(t){const e=this._createHostElement(),i=this._createPaneElement(e),n=this._createPortalOutlet(i),a=new M(t);return a.direction=a.direction||this._directionality.value,new A(n,e,i,a,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher)}position(){return this._positionBuilder}_createPaneElement(t){const e=this._document.createElement("div");return e.id="cdk-overlay-"+z++,e.classList.add("cdk-overlay-pane"),t.appendChild(e),e}_createHostElement(){const t=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(t),t}_createPortalOutlet(t){return this._appRef||(this._appRef=this._injector.get(a.g)),new l.f(t,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return t.\u0275fac=function(e){return new(e||t)(a.ac(w),a.ac(j),a.ac(a.j),a.ac(N),a.ac(P),a.ac(a.t),a.ac(a.C),a.ac(r.e),a.ac(o.c),a.ac(r.n),a.ac(V))},t.\u0275prov=a.Mb({token:t,factory:t.\u0275fac}),t})();const U=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],$=new a.s("cdk-connected-overlay-scroll-strategy");let H=(()=>{class t{constructor(t){this.elementRef=t}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l))},t.\u0275dir=a.Lb({type:t,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"]}),t})(),G=(()=>{class t{constructor(t,e,i,n,s){this._overlay=t,this._dir=s,this._hasBackdrop=!1,this._lockPosition=!1,this._growAfterOpen=!1,this._flexibleDimensions=!1,this._push=!1,this._backdropSubscription=h.a.EMPTY,this._attachSubscription=h.a.EMPTY,this._detachSubscription=h.a.EMPTY,this._positionSubscription=h.a.EMPTY,this.viewportMargin=0,this.open=!1,this.backdropClick=new a.o,this.positionChange=new a.o,this.attach=new a.o,this.detach=new a.o,this.overlayKeydown=new a.o,this.overlayOutsideClick=new a.o,this._templatePortal=new l.i(e,i),this._scrollStrategyFactory=n,this.scrollStrategy=this._scrollStrategyFactory()}get offsetX(){return this._offsetX}set offsetX(t){this._offsetX=t,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(t){this._offsetY=t,this._position&&this._updatePositionStrategy(this._position)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(t){this._hasBackdrop=Object(c.c)(t)}get lockPosition(){return this._lockPosition}set lockPosition(t){this._lockPosition=Object(c.c)(t)}get flexibleDimensions(){return this._flexibleDimensions}set flexibleDimensions(t){this._flexibleDimensions=Object(c.c)(t)}get growAfterOpen(){return this._growAfterOpen}set growAfterOpen(t){this._growAfterOpen=Object(c.c)(t)}get push(){return this._push}set push(t){this._push=Object(c.c)(t)}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef&&this._overlayRef.dispose()}ngOnChanges(t){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),t.origin&&this.open&&this._position.apply()),t.open&&(this.open?this._attachOverlay():this._detachOverlay())}_createOverlay(){this.positions&&this.positions.length||(this.positions=U);const t=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=t.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=t.detachments().subscribe(()=>this.detach.emit()),t.keydownEvents().subscribe(t=>{this.overlayKeydown.next(t),t.keyCode!==v.h||Object(v.v)(t)||(t.preventDefault(),this._detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(t=>{this.overlayOutsideClick.next(t)})}_buildConfig(){const t=this._position=this.positionStrategy||this._createPositionStrategy(),e=new M({direction:this._dir,positionStrategy:t,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop});return(this.width||0===this.width)&&(e.width=this.width),(this.height||0===this.height)&&(e.height=this.height),(this.minWidth||0===this.minWidth)&&(e.minWidth=this.minWidth),(this.minHeight||0===this.minHeight)&&(e.minHeight=this.minHeight),this.backdropClass&&(e.backdropClass=this.backdropClass),this.panelClass&&(e.panelClass=this.panelClass),e}_updatePositionStrategy(t){const e=this.positions.map(t=>({originX:t.originX,originY:t.originY,overlayX:t.overlayX,overlayY:t.overlayY,offsetX:t.offsetX||this.offsetX,offsetY:t.offsetY||this.offsetY,panelClass:t.panelClass||void 0}));return t.setOrigin(this.origin.elementRef).withPositions(e).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){const t=this._overlay.position().flexibleConnectedTo(this.origin.elementRef);return this._updatePositionStrategy(t),t}_attachOverlay(){this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(t=>{this.backdropClick.emit(t)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(function(t,e=!1){return i=>i.lift(new m(t,e))}(()=>this.positionChange.observers.length>0)).subscribe(t=>{this.positionChange.emit(t),0===this.positionChange.observers.length&&this._positionSubscription.unsubscribe()}))}_detachOverlay(){this._overlayRef&&this._overlayRef.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(B),a.Qb(a.P),a.Qb(a.T),a.Qb($),a.Qb(o.c,8))},t.\u0275dir=a.Lb({type:t,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{viewportMargin:["cdkConnectedOverlayViewportMargin","viewportMargin"],open:["cdkConnectedOverlayOpen","open"],scrollStrategy:["cdkConnectedOverlayScrollStrategy","scrollStrategy"],offsetX:["cdkConnectedOverlayOffsetX","offsetX"],offsetY:["cdkConnectedOverlayOffsetY","offsetY"],hasBackdrop:["cdkConnectedOverlayHasBackdrop","hasBackdrop"],lockPosition:["cdkConnectedOverlayLockPosition","lockPosition"],flexibleDimensions:["cdkConnectedOverlayFlexibleDimensions","flexibleDimensions"],growAfterOpen:["cdkConnectedOverlayGrowAfterOpen","growAfterOpen"],push:["cdkConnectedOverlayPush","push"],positions:["cdkConnectedOverlayPositions","positions"],origin:["cdkConnectedOverlayOrigin","origin"],positionStrategy:["cdkConnectedOverlayPositionStrategy","positionStrategy"],width:["cdkConnectedOverlayWidth","width"],height:["cdkConnectedOverlayHeight","height"],minWidth:["cdkConnectedOverlayMinWidth","minWidth"],minHeight:["cdkConnectedOverlayMinHeight","minHeight"],backdropClass:["cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:["cdkConnectedOverlayPanelClass","panelClass"],transformOriginSelector:["cdkConnectedOverlayTransformOriginOn","transformOriginSelector"]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],features:[a.Bb]}),t})();const X={provide:$,deps:[B],useFactory:function(t){return()=>t.scrollStrategies.reposition()}};let q=(()=>{class t{}return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)},providers:[B,X],imports:[[o.a,l.h,n.g],n.g]}),t})()},"rH+9":function(t,e,i){"use strict";i.d(e,"a",(function(){return r}));var n=i("fXoL"),a=i("sYmb"),s=i("4zkx"),o=i("aEDk");let r=(()=>{class t{constructor(t,e,i){this.translate=t,this.headerService=e,this.latinisePipe=i}empty(t){return null==t||(Array.isArray(t)?!(t.length>0):""===String(t))}isDate(t){return t instanceof Date&&!isNaN(t.valueOf())}formatFrenchDateToTechnicalDate(t){if(this.empty(t))return t;{let e=t.split("-");return e=e.concat(e[e.length-1].split(" ")),e.splice(2,1),this.empty(e[3])&&(e[3]="00:00:00"),`${e[2]}-${e[1]}-${e[0]} ${e[3]}`}}formatFrenchDateToObjectDate(t,e="-"){if(this.empty(t))return t;{let i=t.split(e);return i=i.concat(i[i.length-1].split(" ")),i.splice(2,1),this.empty(i[3])&&(i[3]="00:00:00"),new Date(`${i[2]}-${i[1]}-${i[0]} ${i[3]}`)}}formatDateObjectToDateString(t,e=!1,i="dd-mm-yyyy"){if(null!==t){let n=[];i.split("-").forEach(e=>{if("dd"===e){let e=t.getDate();e=("00"+e).slice(-2),n.push(e)}else if("mm"===e){let e=t.getMonth()+1;e=("00"+e).slice(-2),n.push(e)}else if("yyyy"===e){let e=t.getFullYear();n.push(e)}});let a="";return e&&(a=" 23:59:59"),`${n.join("-")}${a}`}return t}formatSerializedDateToDateString(t){return this.formatDateObjectToDateString(new Date(t))}listSortingDataAccessor(t,e){return"string"==typeof t[e]?t[e].toLowerCase():t[e]}filterUnSensitive(t,e,i){let n=!1;return e=this.latinisePipe.transform(e),i.forEach(i=>{let a=t[i];"string"!=typeof t[i]&&(a=void 0===a?"":JSON.stringify(a)),n=n||this.latinisePipe.transform(a.toLowerCase()).includes(e)}),n}formatBytes(t,e=2){if("number"==typeof t){if(0===t)return"0 Octet";const i=1024,n=e<0?0:e,a=["Octets","KO","MO","GO","TO","PO","EO","ZO","YO"],s=Math.floor(Math.log(t)/Math.log(i));return parseFloat((t/Math.pow(i,s)).toFixed(n))+" "+a[s]}return t}}return t.\u0275fac=function(e){return new(e||t)(n.ac(a.e),n.ac(s.a),n.ac(o.c))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()},sYmb:function(t,e,i){"use strict";i.d(e,"a",(function(){return A})),i.d(e,"b",(function(){return b})),i.d(e,"c",(function(){return T})),i.d(e,"d",(function(){return W})),i.d(e,"e",(function(){return j}));var n=i("fXoL"),a=i("LRne"),s=i("7+OI"),o=i("cp0P"),r=i("GyhO"),c=i("NXyV"),l=i("IzEk"),d=i("UXun"),h=i("lJxs"),u=i("bOdf"),p=i("eIep");class b{}let f=(()=>{class t extends b{getTranslation(t){return Object(a.a)({})}}return t.\u0275fac=function(e){return m(e||t)},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();const m=n.Yb(f);class g{}let v=(()=>{class t{handle(t){return t.key}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();function _(t,e){if(t===e)return!0;if(null===t||null===e)return!1;if(t!=t&&e!=e)return!0;let i,n,a,s=typeof t;if(s==typeof e&&"object"==s){if(!Array.isArray(t)){if(Array.isArray(e))return!1;for(n in a=Object.create(null),t){if(!_(t[n],e[n]))return!1;a[n]=!0}for(n in e)if(!(n in a)&&void 0!==e[n])return!1;return!0}if(!Array.isArray(e))return!1;if((i=t.length)==e.length){for(n=0;n<i;n++)if(!_(t[n],e[n]))return!1;return!0}}return!1}function y(t){return null!=t}function x(t){return t&&"object"==typeof t&&!Array.isArray(t)}class C{}let O=(()=>{class t extends C{constructor(){super(...arguments),this.templateMatcher=/{{\s?([^{}\s]*)\s?}}/g}interpolate(t,e){let i;return i="string"==typeof t?this.interpolateString(t,e):"function"==typeof t?this.interpolateFunction(t,e):t,i}getValue(t,e){let i="string"==typeof e?e.split("."):[e];e="";do{e+=i.shift(),!y(t)||!y(t[e])||"object"!=typeof t[e]&&i.length?i.length?e+=".":t=void 0:(t=t[e],e="")}while(i.length);return t}interpolateFunction(t,e){return t(e)}interpolateString(t,e){return e?t.replace(this.templateMatcher,(t,i)=>{let n=this.getValue(e,i);return y(n)?n:t}):t}}return t.\u0275fac=function(e){return D(e||t)},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();const D=n.Yb(O);class w{}let M=(()=>{class t extends w{compile(t,e){return t}compileTranslations(t,e){return t}}return t.\u0275fac=function(e){return k(e||t)},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();const k=n.Yb(M);class S{constructor(){this.currentLang=this.defaultLang,this.translations={},this.langs=[],this.onTranslationChange=new n.o,this.onLangChange=new n.o,this.onDefaultLangChange=new n.o}}const I=new n.s("USE_STORE"),P=new n.s("USE_DEFAULT_LANG"),V=new n.s("DEFAULT_LANGUAGE"),R=new n.s("USE_EXTEND");let j=(()=>{class t{constructor(t,e,i,a,s,o=!0,r=!1,c=!1,l){this.store=t,this.currentLoader=e,this.compiler=i,this.parser=a,this.missingTranslationHandler=s,this.useDefaultLang=o,this.isolate=r,this.extend=c,this.pending=!1,this._onTranslationChange=new n.o,this._onLangChange=new n.o,this._onDefaultLangChange=new n.o,this._langs=[],this._translations={},this._translationRequests={},l&&this.setDefaultLang(l)}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(t){this.isolate?this._defaultLang=t:this.store.defaultLang=t}get currentLang(){return this.isolate?this._currentLang:this.store.currentLang}set currentLang(t){this.isolate?this._currentLang=t:this.store.currentLang=t}get langs(){return this.isolate?this._langs:this.store.langs}set langs(t){this.isolate?this._langs=t:this.store.langs=t}get translations(){return this.isolate?this._translations:this.store.translations}set translations(t){this.isolate?this._translations=t:this.store.translations=t}setDefaultLang(t){if(t===this.defaultLang)return;let e=this.retrieveTranslations(t);void 0!==e?(null==this.defaultLang&&(this.defaultLang=t),e.pipe(Object(l.a)(1)).subscribe(e=>{this.changeDefaultLang(t)})):this.changeDefaultLang(t)}getDefaultLang(){return this.defaultLang}use(t){if(t===this.currentLang)return Object(a.a)(this.translations[t]);let e=this.retrieveTranslations(t);return void 0!==e?(this.currentLang||(this.currentLang=t),e.pipe(Object(l.a)(1)).subscribe(e=>{this.changeLang(t)}),e):(this.changeLang(t),Object(a.a)(this.translations[t]))}retrieveTranslations(t){let e;return(void 0===this.translations[t]||this.extend)&&(this._translationRequests[t]=this._translationRequests[t]||this.getTranslation(t),e=this._translationRequests[t]),e}getTranslation(t){this.pending=!0;const e=this.currentLoader.getTranslation(t).pipe(Object(d.a)(1),Object(l.a)(1));return this.loadingTranslations=e.pipe(Object(h.a)(e=>this.compiler.compileTranslations(e,t)),Object(d.a)(1),Object(l.a)(1)),this.loadingTranslations.subscribe({next:e=>{this.translations[t]=this.extend&&this.translations[t]?Object.assign(Object.assign({},e),this.translations[t]):e,this.updateLangs(),this.pending=!1},error:t=>{this.pending=!1}}),e}setTranslation(t,e,i=!1){e=this.compiler.compileTranslations(e,t),this.translations[t]=(i||this.extend)&&this.translations[t]?function t(e,i){let n=Object.assign({},e);return x(e)&&x(i)&&Object.keys(i).forEach(a=>{x(i[a])?a in e?n[a]=t(e[a],i[a]):Object.assign(n,{[a]:i[a]}):Object.assign(n,{[a]:i[a]})}),n}(this.translations[t],e):e,this.updateLangs(),this.onTranslationChange.emit({lang:t,translations:this.translations[t]})}getLangs(){return this.langs}addLangs(t){t.forEach(t=>{-1===this.langs.indexOf(t)&&this.langs.push(t)})}updateLangs(){this.addLangs(Object.keys(this.translations))}getParsedResult(t,e,i){let n;if(e instanceof Array){let n={},r=!1;for(let a of e)n[a]=this.getParsedResult(t,a,i),Object(s.a)(n[a])&&(r=!0);if(r){const t=e.map(t=>Object(s.a)(n[t])?n[t]:Object(a.a)(n[t]));return Object(o.a)(t).pipe(Object(h.a)(t=>{let i={};return t.forEach((t,n)=>{i[e[n]]=t}),i}))}return n}if(t&&(n=this.parser.interpolate(this.parser.getValue(t,e),i)),void 0===n&&null!=this.defaultLang&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(n=this.parser.interpolate(this.parser.getValue(this.translations[this.defaultLang],e),i)),void 0===n){let t={key:e,translateService:this};void 0!==i&&(t.interpolateParams=i),n=this.missingTranslationHandler.handle(t)}return void 0!==n?n:e}get(t,e){if(!y(t)||!t.length)throw new Error('Parameter "key" required');if(this.pending)return this.loadingTranslations.pipe(Object(u.a)(i=>(i=this.getParsedResult(i,t,e),Object(s.a)(i)?i:Object(a.a)(i))));{let i=this.getParsedResult(this.translations[this.currentLang],t,e);return Object(s.a)(i)?i:Object(a.a)(i)}}getStreamOnTranslationChange(t,e){if(!y(t)||!t.length)throw new Error('Parameter "key" required');return Object(r.a)(Object(c.a)(()=>this.get(t,e)),this.onTranslationChange.pipe(Object(p.a)(i=>{const n=this.getParsedResult(i.translations,t,e);return"function"==typeof n.subscribe?n:Object(a.a)(n)})))}stream(t,e){if(!y(t)||!t.length)throw new Error('Parameter "key" required');return Object(r.a)(Object(c.a)(()=>this.get(t,e)),this.onLangChange.pipe(Object(p.a)(i=>{const n=this.getParsedResult(i.translations,t,e);return Object(s.a)(n)?n:Object(a.a)(n)})))}instant(t,e){if(!y(t)||!t.length)throw new Error('Parameter "key" required');let i=this.getParsedResult(this.translations[this.currentLang],t,e);if(Object(s.a)(i)){if(t instanceof Array){let e={};return t.forEach((i,n)=>{e[t[n]]=t[n]}),e}return t}return i}set(t,e,i=this.currentLang){this.translations[i][t]=this.compiler.compile(e,i),this.updateLangs(),this.onTranslationChange.emit({lang:i,translations:this.translations[i]})}changeLang(t){this.currentLang=t,this.onLangChange.emit({lang:t,translations:this.translations[t]}),null==this.defaultLang&&this.changeDefaultLang(t)}changeDefaultLang(t){this.defaultLang=t,this.onDefaultLangChange.emit({lang:t,translations:this.translations[t]})}reloadLang(t){return this.resetLang(t),this.getTranslation(t)}resetLang(t){this._translationRequests[t]=void 0,this.translations[t]=void 0}getBrowserLang(){if("undefined"==typeof window||void 0===window.navigator)return;let t=window.navigator.languages?window.navigator.languages[0]:null;return t=t||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,void 0!==t?(-1!==t.indexOf("-")&&(t=t.split("-")[0]),-1!==t.indexOf("_")&&(t=t.split("_")[0]),t):void 0}getBrowserCultureLang(){if("undefined"==typeof window||void 0===window.navigator)return;let t=window.navigator.languages?window.navigator.languages[0]:null;return t=t||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,t}}return t.\u0275fac=function(e){return new(e||t)(n.ac(S),n.ac(b),n.ac(w),n.ac(C),n.ac(g),n.ac(P),n.ac(I),n.ac(R),n.ac(V))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})(),A=(()=>{class t{constructor(t,e,i){this.translateService=t,this.element=e,this._ref=i,this.onTranslationChangeSub||(this.onTranslationChangeSub=this.translateService.onTranslationChange.subscribe(t=>{t.lang===this.translateService.currentLang&&this.checkNodes(!0,t.translations)})),this.onLangChangeSub||(this.onLangChangeSub=this.translateService.onLangChange.subscribe(t=>{this.checkNodes(!0,t.translations)})),this.onDefaultLangChangeSub||(this.onDefaultLangChangeSub=this.translateService.onDefaultLangChange.subscribe(t=>{this.checkNodes(!0)}))}set translate(t){t&&(this.key=t,this.checkNodes())}set translateParams(t){_(this.currentParams,t)||(this.currentParams=t,this.checkNodes(!0))}ngAfterViewChecked(){this.checkNodes()}checkNodes(t=!1,e){let i=this.element.nativeElement.childNodes;i.length||(this.setContent(this.element.nativeElement,this.key),i=this.element.nativeElement.childNodes);for(let n=0;n<i.length;++n){let a=i[n];if(3===a.nodeType){let i;if(t&&(a.lastKey=null),y(a.lookupKey))i=a.lookupKey;else if(this.key)i=this.key;else{let t=this.getContent(a),e=t.trim();e.length&&(a.lookupKey=e,t!==a.currentValue?(i=e,a.originalContent=t||a.originalContent):a.originalContent?i=a.originalContent.trim():t!==a.currentValue&&(i=e,a.originalContent=t||a.originalContent))}this.updateValue(i,a,e)}}}updateValue(t,e,i){if(t){if(e.lastKey===t&&this.lastParams===this.currentParams)return;this.lastParams=this.currentParams;let n=i=>{i!==t&&(e.lastKey=t),e.originalContent||(e.originalContent=this.getContent(e)),e.currentValue=y(i)?i:e.originalContent||t,this.setContent(e,this.key?e.currentValue:e.originalContent.replace(t,e.currentValue)),this._ref.markForCheck()};if(y(i)){let e=this.translateService.getParsedResult(i,t,this.currentParams);Object(s.a)(e)?e.subscribe(n):n(e)}else this.translateService.get(t,this.currentParams).subscribe(n)}}getContent(t){return y(t.textContent)?t.textContent:t.data}setContent(t,e){y(t.textContent)?t.textContent=e:t.data=e}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)(n.Qb(j),n.Qb(n.l),n.Qb(n.h))},t.\u0275dir=n.Lb({type:t,selectors:[["","translate",""],["","ngx-translate",""]],inputs:{translate:"translate",translateParams:"translateParams"}}),t})(),W=(()=>{class t{constructor(t,e){this.translate=t,this._ref=e,this.value=""}updateValue(t,e,i){let n=e=>{this.value=void 0!==e?e:t,this.lastKey=t,this._ref.markForCheck()};if(i){let a=this.translate.getParsedResult(i,t,e);Object(s.a)(a.subscribe)?a.subscribe(n):n(a)}this.translate.get(t,e).subscribe(n)}transform(t,...e){if(!t||!t.length)return t;if(_(t,this.lastKey)&&_(e,this.lastParams))return this.value;let i;if(y(e[0])&&e.length)if("string"==typeof e[0]&&e[0].length){let t=e[0].replace(/(\')?([a-zA-Z0-9_]+)(\')?(\s)?:/g,'"$2":').replace(/:(\s)?(\')(.*?)(\')/g,':"$3"');try{i=JSON.parse(t)}catch(n){throw new SyntaxError("Wrong parameter in TranslatePipe. Expected a valid Object, received: "+e[0])}}else"object"!=typeof e[0]||Array.isArray(e[0])||(i=e[0]);return this.lastKey=t,this.lastParams=e,this.updateValue(t,i),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(e=>{this.lastKey&&e.lang===this.translate.currentLang&&(this.lastKey=null,this.updateValue(t,i,e.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(e=>{this.lastKey&&(this.lastKey=null,this.updateValue(t,i,e.translations))})),this.onDefaultLangChange||(this.onDefaultLangChange=this.translate.onDefaultLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(t,i))})),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)(n.Qb(j),n.cc())},t.\u0275pipe=n.Pb({name:"translate",type:t,pure:!1}),t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})(),T=(()=>{class t{static forRoot(e={}){return{ngModule:t,providers:[e.loader||{provide:b,useClass:f},e.compiler||{provide:w,useClass:M},e.parser||{provide:C,useClass:O},e.missingTranslationHandler||{provide:g,useClass:v},S,{provide:I,useValue:e.isolate},{provide:P,useValue:e.useDefaultLang},{provide:R,useValue:e.extend},{provide:V,useValue:e.defaultLanguage},j]}}static forChild(e={}){return{ngModule:t,providers:[e.loader||{provide:b,useClass:f},e.compiler||{provide:w,useClass:M},e.parser||{provide:C,useClass:O},e.missingTranslationHandler||{provide:g,useClass:v},{provide:I,useValue:e.isolate},{provide:P,useValue:e.useDefaultLang},{provide:R,useValue:e.extend},{provide:V,useValue:e.defaultLanguage},j]}}}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)}}),t})()},"tk/3":function(t,e,i){"use strict";i.d(e,"a",(function(){return S})),i.d(e,"b",(function(){return M})),i.d(e,"c",(function(){return N})),i.d(e,"d",(function(){return D})),i.d(e,"e",(function(){return y})),i.d(e,"f",(function(){return u}));var n=i("fXoL"),a=i("LRne"),s=i("HDdC"),o=i("bOdf"),r=i("pLZG"),c=i("lJxs"),l=i("ofXK");class d{}class h{}class u{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?this.lazyInit="string"==typeof t?()=>{this.headers=new Map,t.split("\n").forEach(t=>{const e=t.indexOf(":");if(e>0){const i=t.slice(0,e),n=i.toLowerCase(),a=t.slice(e+1).trim();this.maybeSetNormalizedName(i,n),this.headers.has(n)?this.headers.get(n).push(a):this.headers.set(n,[a])}})}:()=>{this.headers=new Map,Object.keys(t).forEach(e=>{let i=t[e];const n=e.toLowerCase();"string"==typeof i&&(i=[i]),i.length>0&&(this.headers.set(n,i),this.maybeSetNormalizedName(e,n))})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();const e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof u?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){const e=new u;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof u?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){const e=t.name.toLowerCase();switch(t.op){case"a":case"s":let i=t.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(t.name,e);const n=("a"===t.op?this.headers.get(e):void 0)||[];n.push(...i),this.headers.set(e,n);break;case"d":const a=t.value;if(a){let t=this.headers.get(e);if(!t)return;t=t.filter(t=>-1===a.indexOf(t)),0===t.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,t)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}}class p{encodeKey(t){return b(t)}encodeValue(t){return b(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}function b(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}class f{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new p,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function(t,e){const i=new Map;return t.length>0&&t.split("&").forEach(t=>{const n=t.indexOf("="),[a,s]=-1==n?[e.decodeKey(t),""]:[e.decodeKey(t.slice(0,n)),e.decodeValue(t.slice(n+1))],o=i.get(a)||[];o.push(s),i.set(a,o)}),i}(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{const i=t.fromObject[e];this.map.set(e,Array.isArray(i)?i:[i])})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();const e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{const e=this.encoder.encodeKey(t);return this.map.get(t).map(t=>e+"="+this.encoder.encodeValue(t)).join("&")}).filter(t=>""!==t).join("&")}clone(t){const e=new f({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat([t]),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":const e=("a"===t.op?this.map.get(t.param):void 0)||[];e.push(t.value),this.map.set(t.param,e);break;case"d":if(void 0===t.value){this.map.delete(t.param);break}{let e=this.map.get(t.param)||[];const i=e.indexOf(t.value);-1!==i&&e.splice(i,1),e.length>0?this.map.set(t.param,e):this.map.delete(t.param)}}}),this.cloneFrom=this.updates=null)}}function m(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer}function g(t){return"undefined"!=typeof Blob&&t instanceof Blob}function v(t){return"undefined"!=typeof FormData&&t instanceof FormData}class _{constructor(t,e,i,n){let a;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||n?(this.body=void 0!==i?i:null,a=n):a=i,a&&(this.reportProgress=!!a.reportProgress,this.withCredentials=!!a.withCredentials,a.responseType&&(this.responseType=a.responseType),a.headers&&(this.headers=a.headers),a.params&&(this.params=a.params)),this.headers||(this.headers=new u),this.params){const t=this.params.toString();if(0===t.length)this.urlWithParams=e;else{const i=e.indexOf("?");this.urlWithParams=e+(-1===i?"?":i<e.length-1?"&":"")+t}}else this.params=new f,this.urlWithParams=e}serializeBody(){return null===this.body?null:m(this.body)||g(this.body)||v(this.body)||"string"==typeof this.body?this.body:this.body instanceof f?this.body.toString():"object"==typeof this.body||"boolean"==typeof this.body||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return null===this.body||v(this.body)?null:g(this.body)?this.body.type||null:m(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof f?"application/x-www-form-urlencoded;charset=UTF-8":"object"==typeof this.body||"number"==typeof this.body||Array.isArray(this.body)?"application/json":null}clone(t={}){const e=t.method||this.method,i=t.url||this.url,n=t.responseType||this.responseType,a=void 0!==t.body?t.body:this.body,s=void 0!==t.withCredentials?t.withCredentials:this.withCredentials,o=void 0!==t.reportProgress?t.reportProgress:this.reportProgress;let r=t.headers||this.headers,c=t.params||this.params;return void 0!==t.setHeaders&&(r=Object.keys(t.setHeaders).reduce((e,i)=>e.set(i,t.setHeaders[i]),r)),t.setParams&&(c=Object.keys(t.setParams).reduce((e,i)=>e.set(i,t.setParams[i]),c)),new _(e,i,a,{params:c,headers:r,reportProgress:o,responseType:n,withCredentials:s})}}var y=function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t}({});class x{constructor(t,e=200,i="OK"){this.headers=t.headers||new u,this.status=void 0!==t.status?t.status:e,this.statusText=t.statusText||i,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}}class C extends x{constructor(t={}){super(t),this.type=y.ResponseHeader}clone(t={}){return new C({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class O extends x{constructor(t={}){super(t),this.type=y.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new O({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class D extends x{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?"Http failure during parsing for "+(t.url||"(unknown url)"):`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}}function w(t,e){return{body:e,headers:t.headers,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}let M=(()=>{class t{constructor(t){this.handler=t}request(t,e,i={}){let n;if(t instanceof _)n=t;else{let a=void 0;a=i.headers instanceof u?i.headers:new u(i.headers);let s=void 0;i.params&&(s=i.params instanceof f?i.params:new f({fromObject:i.params})),n=new _(t,e,void 0!==i.body?i.body:null,{headers:a,params:s,reportProgress:i.reportProgress,responseType:i.responseType||"json",withCredentials:i.withCredentials})}const s=Object(a.a)(n).pipe(Object(o.a)(t=>this.handler.handle(t)));if(t instanceof _||"events"===i.observe)return s;const l=s.pipe(Object(r.a)(t=>t instanceof O));switch(i.observe||"body"){case"body":switch(n.responseType){case"arraybuffer":return l.pipe(Object(c.a)(t=>{if(null!==t.body&&!(t.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return t.body}));case"blob":return l.pipe(Object(c.a)(t=>{if(null!==t.body&&!(t.body instanceof Blob))throw new Error("Response is not a Blob.");return t.body}));case"text":return l.pipe(Object(c.a)(t=>{if(null!==t.body&&"string"!=typeof t.body)throw new Error("Response is not a string.");return t.body}));case"json":default:return l.pipe(Object(c.a)(t=>t.body))}case"response":return l;default:throw new Error(`Unreachable: unhandled observe type ${i.observe}}`)}}delete(t,e={}){return this.request("DELETE",t,e)}get(t,e={}){return this.request("GET",t,e)}head(t,e={}){return this.request("HEAD",t,e)}jsonp(t,e){return this.request("JSONP",t,{params:(new f).append(e,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,e={}){return this.request("OPTIONS",t,e)}patch(t,e,i={}){return this.request("PATCH",t,w(i,e))}post(t,e,i={}){return this.request("POST",t,w(i,e))}put(t,e,i={}){return this.request("PUT",t,w(i,e))}}return t.\u0275fac=function(e){return new(e||t)(n.ac(d))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();class k{constructor(t,e){this.next=t,this.interceptor=e}handle(t){return this.interceptor.intercept(t,this.next)}}const S=new n.s("HTTP_INTERCEPTORS");let I=(()=>{class t{intercept(t,e){return e.handle(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();const P=/^\)\]\}',?\n/;class V{}let R=(()=>{class t{constructor(){}build(){return new XMLHttpRequest}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})(),j=(()=>{class t{constructor(t){this.xhrFactory=t}handle(t){if("JSONP"===t.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new s.a(e=>{const i=this.xhrFactory.build();if(i.open(t.method,t.urlWithParams),t.withCredentials&&(i.withCredentials=!0),t.headers.forEach((t,e)=>i.setRequestHeader(t,e.join(","))),t.headers.has("Accept")||i.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){const e=t.detectContentTypeHeader();null!==e&&i.setRequestHeader("Content-Type",e)}if(t.responseType){const e=t.responseType.toLowerCase();i.responseType="json"!==e?e:"text"}const n=t.serializeBody();let a=null;const s=()=>{if(null!==a)return a;const e=1223===i.status?204:i.status,n=i.statusText||"OK",s=new u(i.getAllResponseHeaders()),o=function(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(i)||t.url;return a=new C({headers:s,status:e,statusText:n,url:o}),a},o=()=>{let{headers:n,status:a,statusText:o,url:r}=s(),c=null;204!==a&&(c=void 0===i.response?i.responseText:i.response),0===a&&(a=c?200:0);let l=a>=200&&a<300;if("json"===t.responseType&&"string"==typeof c){const t=c;c=c.replace(P,"");try{c=""!==c?JSON.parse(c):null}catch(d){c=t,l&&(l=!1,c={error:d,text:c})}}l?(e.next(new O({body:c,headers:n,status:a,statusText:o,url:r||void 0})),e.complete()):e.error(new D({error:c,headers:n,status:a,statusText:o,url:r||void 0}))},r=t=>{const{url:n}=s(),a=new D({error:t,status:i.status||0,statusText:i.statusText||"Unknown Error",url:n||void 0});e.error(a)};let c=!1;const l=n=>{c||(e.next(s()),c=!0);let a={type:y.DownloadProgress,loaded:n.loaded};n.lengthComputable&&(a.total=n.total),"text"===t.responseType&&i.responseText&&(a.partialText=i.responseText),e.next(a)},d=t=>{let i={type:y.UploadProgress,loaded:t.loaded};t.lengthComputable&&(i.total=t.total),e.next(i)};return i.addEventListener("load",o),i.addEventListener("error",r),t.reportProgress&&(i.addEventListener("progress",l),null!==n&&i.upload&&i.upload.addEventListener("progress",d)),i.send(n),e.next({type:y.Sent}),()=>{i.removeEventListener("error",r),i.removeEventListener("load",o),t.reportProgress&&(i.removeEventListener("progress",l),null!==n&&i.upload&&i.upload.removeEventListener("progress",d)),i.readyState!==i.DONE&&i.abort()}})}}return t.\u0275fac=function(e){return new(e||t)(n.ac(V))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})();const A=new n.s("XSRF_COOKIE_NAME"),W=new n.s("XSRF_HEADER_NAME");class T{}let E=(()=>{class t{constructor(t,e,i){this.doc=t,this.platform=e,this.cookieName=i,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=Object(l.M)(t,this.cookieName),this.lastCookieString=t),this.lastToken}}return t.\u0275fac=function(e){return new(e||t)(n.ac(l.e),n.ac(n.F),n.ac(A))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})(),F=(()=>{class t{constructor(t,e){this.tokenService=t,this.headerName=e}intercept(t,e){const i=t.url.toLowerCase();if("GET"===t.method||"HEAD"===t.method||i.startsWith("http://")||i.startsWith("https://"))return e.handle(t);const n=this.tokenService.getToken();return null===n||t.headers.has(this.headerName)||(t=t.clone({headers:t.headers.set(this.headerName,n)})),e.handle(t)}}return t.\u0275fac=function(e){return new(e||t)(n.ac(T),n.ac(W))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})(),L=(()=>{class t{constructor(t,e){this.backend=t,this.injector=e,this.chain=null}handle(t){if(null===this.chain){const t=this.injector.get(S,[]);this.chain=t.reduceRight((t,e)=>new k(t,e),this.backend)}return this.chain.handle(t)}}return t.\u0275fac=function(e){return new(e||t)(n.ac(h),n.ac(n.t))},t.\u0275prov=n.Mb({token:t,factory:t.\u0275fac}),t})(),Q=(()=>{class t{static disable(){return{ngModule:t,providers:[{provide:F,useClass:I}]}}static withOptions(e={}){return{ngModule:t,providers:[e.cookieName?{provide:A,useValue:e.cookieName}:[],e.headerName?{provide:W,useValue:e.headerName}:[]]}}}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},providers:[F,{provide:S,useExisting:F,multi:!0},{provide:T,useClass:E},{provide:A,useValue:"XSRF-TOKEN"},{provide:W,useValue:"X-XSRF-TOKEN"}]}),t})(),N=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},providers:[M,{provide:d,useClass:L},j,{provide:h,useExisting:j},R,{provide:V,useExisting:R}],imports:[[Q.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),t})()},tyNb:function(t,e,i){"use strict";i.d(e,"a",(function(){return Bt})),i.d(e,"b",(function(){return ui})),i.d(e,"c",(function(){return ai})),i.d(e,"d",(function(){return si})),i.d(e,"e",(function(){return ci})),i.d(e,"f",(function(){return oi})),i.d(e,"g",(function(){return yi})),i.d(e,"h",(function(){return li})),i.d(e,"i",(function(){return $e}));var n=i("ofXK"),a=i("fXoL"),s=i("LRne"),o=i("Cfvw"),r=i("2Vo4"),c=i("itXk"),l=i("HDdC");const d=(()=>{function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t})();var h=i("NXyV"),u=i("EY2u"),p=i("XNiG"),b=i("lJxs"),f=i("0EUg"),m=i("pLZG"),g=i("7o/Q"),v=i("4I5i");function _(t){return function(e){return 0===t?Object(u.b)():e.lift(new y(t))}}class y{constructor(t){if(this.total=t,this.total<0)throw new v.a}call(t,e){return e.subscribe(new x(t,this.total))}}class x extends g.a{constructor(t,e){super(t),this.total=e,this.ring=new Array,this.count=0}_next(t){const e=this.ring,i=this.total,n=this.count++;e.length<i?e.push(t):e[n%i]=t}_complete(){const t=this.destination;let e=this.count;if(e>0){const i=this.count>=this.total?this.total:this.count,n=this.ring;for(let a=0;a<i;a++){const a=e++%i;t.next(n[a])}}t.complete()}}function C(t=w){return e=>e.lift(new O(t))}class O{constructor(t){this.errorFactory=t}call(t,e){return e.subscribe(new D(t,this.errorFactory))}}class D extends g.a{constructor(t,e){super(t),this.errorFactory=e,this.hasValue=!1}_next(t){this.hasValue=!0,this.destination.next(t)}_complete(){if(this.hasValue)return this.destination.complete();{let e;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)}}}function w(){return new d}function M(t=null){return e=>e.lift(new k(t))}class k{constructor(t){this.defaultValue=t}call(t,e){return e.subscribe(new S(t,this.defaultValue))}}class S extends g.a{constructor(t,e){super(t),this.defaultValue=e,this.isEmpty=!0}_next(t){this.isEmpty=!1,this.destination.next(t)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}var I=i("SpAZ"),P=i("eIep"),V=i("IzEk"),R=i("JX91");class j{constructor(t,e,i=!1){this.accumulator=t,this.seed=e,this.hasSeed=i}call(t,e){return e.subscribe(new A(t,this.accumulator,this.seed,this.hasSeed))}}class A extends g.a{constructor(t,e,i,n){super(t),this.accumulator=e,this._seed=i,this.hasSeed=n,this.index=0}get seed(){return this._seed}set seed(t){this.hasSeed=!0,this._seed=t}_next(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)}_tryNext(t){const e=this.index++;let i;try{i=this.accumulator(this.seed,t,e)}catch(n){this.destination.error(n)}this.seed=i,this.destination.next(i)}}var W=i("JIr8"),T=i("bOdf");function E(t,e){const i=arguments.length>=2;return n=>n.pipe(t?Object(m.a)((e,i)=>t(e,i,n)):I.a,Object(V.a)(1),i?M(e):C(()=>new d))}var F=i("5+tZ"),L=i("vkgz"),Q=i("nYR2"),N=i("bHdf");class z{constructor(t,e){this.id=t,this.url=e}}class B extends z{constructor(t,e,i="imperative",n=null){super(t,e),this.navigationTrigger=i,this.restoredState=n}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class U extends z{constructor(t,e,i){super(t,e),this.urlAfterRedirects=i}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class $ extends z{constructor(t,e,i){super(t,e),this.reason=i}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class H extends z{constructor(t,e,i){super(t,e),this.error=i}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class G extends z{constructor(t,e,i,n){super(t,e),this.urlAfterRedirects=i,this.state=n}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class X extends z{constructor(t,e,i,n){super(t,e),this.urlAfterRedirects=i,this.state=n}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class q extends z{constructor(t,e,i,n,a){super(t,e),this.urlAfterRedirects=i,this.state=n,this.shouldActivate=a}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class K extends z{constructor(t,e,i,n){super(t,e),this.urlAfterRedirects=i,this.state=n}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Y extends z{constructor(t,e,i,n){super(t,e),this.urlAfterRedirects=i,this.state=n}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class J{constructor(t){this.route=t}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class Z{constructor(t){this.route=t}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class tt{constructor(t){this.snapshot=t}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class et{constructor(t){this.snapshot=t}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class it{constructor(t){this.snapshot=t}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class nt{constructor(t){this.snapshot=t}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class at{constructor(t,e,i){this.routerEvent=t,this.position=e,this.anchor=i}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}class st{constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e[0]:e}return null}getAll(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}}function ot(t){return new st(t)}function rt(t){const e=Error("NavigationCancelingError: "+t);return e.ngNavigationCancelingError=!0,e}function ct(t,e,i){const n=i.path.split("/");if(n.length>t.length)return null;if("full"===i.pathMatch&&(e.hasChildren()||n.length<t.length))return null;const a={};for(let s=0;s<n.length;s++){const e=n[s],i=t[s];if(e.startsWith(":"))a[e.substring(1)]=i;else if(e!==i.path)return null}return{consumed:t.slice(0,n.length),posParams:a}}function lt(t,e){const i=Object.keys(t),n=Object.keys(e);if(!i||!n||i.length!=n.length)return!1;let a;for(let s=0;s<i.length;s++)if(a=i[s],!dt(t[a],e[a]))return!1;return!0}function dt(t,e){if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;const i=[...t].sort(),n=[...e].sort();return i.every((t,e)=>n[e]===t)}return t===e}function ht(t){return Array.prototype.concat.apply([],t)}function ut(t){return t.length>0?t[t.length-1]:null}function pt(t,e){for(const i in t)t.hasOwnProperty(i)&&e(t[i],i)}function bt(t){return Object(a.ub)(t)?t:Object(a.vb)(t)?Object(o.a)(Promise.resolve(t)):Object(s.a)(t)}function ft(t,e,i){return i?function(t,e){return lt(t,e)}(t.queryParams,e.queryParams)&&function t(e,i){if(!_t(e.segments,i.segments))return!1;if(e.numberOfChildren!==i.numberOfChildren)return!1;for(const n in i.children){if(!e.children[n])return!1;if(!t(e.children[n],i.children[n]))return!1}return!0}(t.root,e.root):function(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every(i=>dt(t[i],e[i]))}(t.queryParams,e.queryParams)&&function t(e,i){return function e(i,n,a){if(i.segments.length>a.length)return!!_t(i.segments.slice(0,a.length),a)&&!n.hasChildren();if(i.segments.length===a.length){if(!_t(i.segments,a))return!1;for(const e in n.children){if(!i.children[e])return!1;if(!t(i.children[e],n.children[e]))return!1}return!0}{const t=a.slice(0,i.segments.length),s=a.slice(i.segments.length);return!!_t(i.segments,t)&&!!i.children.primary&&e(i.children.primary,n,s)}}(e,i,i.segments)}(t.root,e.root)}class mt{constructor(t,e,i){this.root=t,this.queryParams=e,this.fragment=i}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=ot(this.queryParams)),this._queryParamMap}toString(){return Ot.serialize(this)}}class gt{constructor(t,e){this.segments=t,this.children=e,this.parent=null,pt(e,(t,e)=>t.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Dt(this)}}class vt{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=ot(this.parameters)),this._parameterMap}toString(){return Pt(this)}}function _t(t,e){return t.length===e.length&&t.every((t,i)=>t.path===e[i].path)}function yt(t,e){let i=[];return pt(t.children,(t,n)=>{"primary"===n&&(i=i.concat(e(t,n)))}),pt(t.children,(t,n)=>{"primary"!==n&&(i=i.concat(e(t,n)))}),i}class xt{}class Ct{parse(t){const e=new Wt(t);return new mt(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){return`${"/"+function t(e,i){if(!e.hasChildren())return Dt(e);if(i){const i=e.children.primary?t(e.children.primary,!1):"",n=[];return pt(e.children,(e,i)=>{"primary"!==i&&n.push(`${i}:${t(e,!1)}`)}),n.length>0?`${i}(${n.join("//")})`:i}{const i=yt(e,(i,n)=>"primary"===n?[t(e.children.primary,!1)]:[`${n}:${t(i,!1)}`]);return 1===Object.keys(e.children).length&&null!=e.children.primary?`${Dt(e)}/${i[0]}`:`${Dt(e)}/(${i.join("//")})`}}(t.root,!0)}${function(t){const e=Object.keys(t).map(e=>{const i=t[e];return Array.isArray(i)?i.map(t=>`${Mt(e)}=${Mt(t)}`).join("&"):`${Mt(e)}=${Mt(i)}`});return e.length?"?"+e.join("&"):""}(t.queryParams)}${"string"==typeof t.fragment?"#"+encodeURI(t.fragment):""}`}}const Ot=new Ct;function Dt(t){return t.segments.map(t=>Pt(t)).join("/")}function wt(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Mt(t){return wt(t).replace(/%3B/gi,";")}function kt(t){return wt(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function St(t){return decodeURIComponent(t)}function It(t){return St(t.replace(/\+/g,"%20"))}function Pt(t){return`${kt(t.path)}${e=t.parameters,Object.keys(e).map(t=>`;${kt(t)}=${kt(e[t])}`).join("")}`;var e}const Vt=/^[^\/()?;=#]+/;function Rt(t){const e=t.match(Vt);return e?e[0]:""}const jt=/^[^=?&#]+/,At=/^[^?&#]+/;class Wt{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new gt([],{}):new gt([],this.parseChildren())}parseQueryParams(){const t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(i.primary=new gt(t,e)),i}parseSegment(){const t=Rt(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);return this.capture(t),new vt(St(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=Rt(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const t=Rt(this.remaining);t&&(i=t,this.capture(i))}t[St(e)]=St(i)}parseQueryParam(t){const e=function(t){const e=t.match(jt);return e?e[0]:""}(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const t=function(t){const e=t.match(At);return e?e[0]:""}(this.remaining);t&&(i=t,this.capture(i))}const n=It(e),a=It(i);if(t.hasOwnProperty(n)){let e=t[n];Array.isArray(e)||(e=[e],t[n]=e),e.push(a)}else t[n]=a}parseParens(t){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const i=Rt(this.remaining),n=this.remaining[i.length];if("/"!==n&&")"!==n&&";"!==n)throw new Error(`Cannot parse url '${this.url}'`);let a=void 0;i.indexOf(":")>-1?(a=i.substr(0,i.indexOf(":")),this.capture(a),this.capture(":")):t&&(a="primary");const s=this.parseChildren();e[a]=1===Object.keys(s).length?s.primary:new gt([],s),this.consumeOptional("//")}return e}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)}capture(t){if(!this.consumeOptional(t))throw new Error(`Expected "${t}".`)}}class Tt{constructor(t){this._root=t}get root(){return this._root.value}parent(t){const e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}children(t){const e=Et(t,this._root);return e?e.children.map(t=>t.value):[]}firstChild(t){const e=Et(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=Ft(t,this._root);return e.length<2?[]:e[e.length-2].children.map(t=>t.value).filter(e=>e!==t)}pathFromRoot(t){return Ft(t,this._root).map(t=>t.value)}}function Et(t,e){if(t===e.value)return e;for(const i of e.children){const e=Et(t,i);if(e)return e}return null}function Ft(t,e){if(t===e.value)return[e];for(const i of e.children){const n=Ft(t,i);if(n.length)return n.unshift(e),n}return[]}class Lt{constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}}function Qt(t){const e={};return t&&t.children.forEach(t=>e[t.value.outlet]=t),e}class Nt extends Tt{constructor(t,e){super(t),this.snapshot=e,Gt(this,t)}toString(){return this.snapshot.toString()}}function zt(t,e){const i=function(t,e){const i=new $t([],{},{},"",{},"primary",e,null,t.root,-1,{});return new Ht("",new Lt(i,[]))}(t,e),n=new r.a([new vt("",{})]),a=new r.a({}),s=new r.a({}),o=new r.a({}),c=new r.a(""),l=new Bt(n,a,o,c,s,"primary",e,i.root);return l.snapshot=i.root,new Nt(new Lt(l,[]),i)}class Bt{constructor(t,e,i,n,a,s,o,r){this.url=t,this.params=e,this.queryParams=i,this.fragment=n,this.data=a,this.outlet=s,this.component=o,this._futureSnapshot=r}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(Object(b.a)(t=>ot(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(Object(b.a)(t=>ot(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function Ut(t,e="emptyOnly"){const i=t.pathFromRoot;let n=0;if("always"!==e)for(n=i.length-1;n>=1;){const t=i[n],e=i[n-1];if(t.routeConfig&&""===t.routeConfig.path)n--;else{if(e.component)break;n--}}return function(t){return t.reduce((t,e)=>({params:Object.assign(Object.assign({},t.params),e.params),data:Object.assign(Object.assign({},t.data),e.data),resolve:Object.assign(Object.assign({},t.resolve),e._resolvedData)}),{params:{},data:{},resolve:{}})}(i.slice(n))}class $t{constructor(t,e,i,n,a,s,o,r,c,l,d){this.url=t,this.params=e,this.queryParams=i,this.fragment=n,this.data=a,this.outlet=s,this.component=o,this.routeConfig=r,this._urlSegment=c,this._lastPathIndex=l,this._resolve=d}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=ot(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=ot(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(t=>t.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class Ht extends Tt{constructor(t,e){super(e),this.url=t,Gt(this,e)}toString(){return Xt(this._root)}}function Gt(t,e){e.value._routerState=t,e.children.forEach(e=>Gt(t,e))}function Xt(t){const e=t.children.length>0?` { ${t.children.map(Xt).join(", ")} } `:"";return`${t.value}${e}`}function qt(t){if(t.snapshot){const e=t.snapshot,i=t._futureSnapshot;t.snapshot=i,lt(e.queryParams,i.queryParams)||t.queryParams.next(i.queryParams),e.fragment!==i.fragment&&t.fragment.next(i.fragment),lt(e.params,i.params)||t.params.next(i.params),function(t,e){if(t.length!==e.length)return!1;for(let i=0;i<t.length;++i)if(!lt(t[i],e[i]))return!1;return!0}(e.url,i.url)||t.url.next(i.url),lt(e.data,i.data)||t.data.next(i.data)}else t.snapshot=t._futureSnapshot,t.data.next(t._futureSnapshot.data)}function Kt(t,e){var i,n;return lt(t.params,e.params)&&_t(i=t.url,n=e.url)&&i.every((t,e)=>lt(t.parameters,n[e].parameters))&&!(!t.parent!=!e.parent)&&(!t.parent||Kt(t.parent,e.parent))}function Yt(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function Jt(t,e,i,n,a){let s={};return n&&pt(n,(t,e)=>{s[e]=Array.isArray(t)?t.map(t=>""+t):""+t}),new mt(i.root===t?e:function t(e,i,n){const a={};return pt(e.children,(e,s)=>{a[s]=e===i?n:t(e,i,n)}),new gt(e.segments,a)}(i.root,t,e),s,a)}class Zt{constructor(t,e,i){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=i,t&&i.length>0&&Yt(i[0]))throw new Error("Root segment cannot have matrix parameters");const n=i.find(t=>"object"==typeof t&&null!=t&&t.outlets);if(n&&n!==ut(i))throw new Error("{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class te{constructor(t,e,i){this.segmentGroup=t,this.processChildren=e,this.index=i}}function ee(t){return"object"==typeof t&&null!=t&&t.outlets?t.outlets.primary:""+t}function ie(t,e,i){if(t||(t=new gt([],{})),0===t.segments.length&&t.hasChildren())return ne(t,e,i);const n=function(t,e,i){let n=0,a=e;const s={match:!1,pathIndex:0,commandIndex:0};for(;a<t.segments.length;){if(n>=i.length)return s;const e=t.segments[a],o=ee(i[n]),r=n<i.length-1?i[n+1]:null;if(a>0&&void 0===o)break;if(o&&r&&"object"==typeof r&&void 0===r.outlets){if(!re(o,r,e))return s;n+=2}else{if(!re(o,{},e))return s;n++}a++}return{match:!0,pathIndex:a,commandIndex:n}}(t,e,i),a=i.slice(n.commandIndex);if(n.match&&n.pathIndex<t.segments.length){const e=new gt(t.segments.slice(0,n.pathIndex),{});return e.children.primary=new gt(t.segments.slice(n.pathIndex),t.children),ne(e,0,a)}return n.match&&0===a.length?new gt(t.segments,{}):n.match&&!t.hasChildren()?ae(t,e,i):n.match?ne(t,0,a):ae(t,e,i)}function ne(t,e,i){if(0===i.length)return new gt(t.segments,{});{const n=function(t){return"object"==typeof t[0]&&null!==t[0]&&t[0].outlets?t[0].outlets:{primary:t}}(i),a={};return pt(n,(i,n)=>{null!==i&&(a[n]=ie(t.children[n],e,i))}),pt(t.children,(t,e)=>{void 0===n[e]&&(a[e]=t)}),new gt(t.segments,a)}}function ae(t,e,i){const n=t.segments.slice(0,e);let a=0;for(;a<i.length;){if("object"==typeof i[a]&&null!==i[a]&&void 0!==i[a].outlets){const t=se(i[a].outlets);return new gt(n,t)}if(0===a&&Yt(i[0])){n.push(new vt(t.segments[e].path,i[0])),a++;continue}const s=ee(i[a]),o=a<i.length-1?i[a+1]:null;s&&o&&Yt(o)?(n.push(new vt(s,oe(o))),a+=2):(n.push(new vt(s,{})),a++)}return new gt(n,{})}function se(t){const e={};return pt(t,(t,i)=>{null!==t&&(e[i]=ae(new gt([],{}),0,t))}),e}function oe(t){const e={};return pt(t,(t,i)=>e[i]=""+t),e}function re(t,e,i){return t==i.path&<(e,i.parameters)}class ce{constructor(t,e,i,n){this.routeReuseStrategy=t,this.futureState=e,this.currState=i,this.forwardEvent=n}activate(t){const e=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,i,t),qt(this.futureState.root),this.activateChildRoutes(e,i,t)}deactivateChildRoutes(t,e,i){const n=Qt(e);t.children.forEach(t=>{const e=t.value.outlet;this.deactivateRoutes(t,n[e],i),delete n[e]}),pt(n,(t,e)=>{this.deactivateRouteAndItsChildren(t,i)})}deactivateRoutes(t,e,i){const n=t.value,a=e?e.value:null;if(n===a)if(n.component){const a=i.getContext(n.outlet);a&&this.deactivateChildRoutes(t,e,a.children)}else this.deactivateChildRoutes(t,e,i);else a&&this.deactivateRouteAndItsChildren(e,i)}deactivateRouteAndItsChildren(t,e){this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)}detachAndStoreRouteSubtree(t,e){const i=e.getContext(t.value.outlet);if(i&&i.outlet){const e=i.outlet.detach(),n=i.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:e,route:t,contexts:n})}}deactivateRouteAndOutlet(t,e){const i=e.getContext(t.value.outlet);if(i){const n=Qt(t),a=t.value.component?i.children:e;pt(n,(t,e)=>this.deactivateRouteAndItsChildren(t,a)),i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated())}}activateChildRoutes(t,e,i){const n=Qt(e);t.children.forEach(t=>{this.activateRoutes(t,n[t.value.outlet],i),this.forwardEvent(new nt(t.value.snapshot))}),t.children.length&&this.forwardEvent(new et(t.value.snapshot))}activateRoutes(t,e,i){const n=t.value,a=e?e.value:null;if(qt(n),n===a)if(n.component){const a=i.getOrCreateContext(n.outlet);this.activateChildRoutes(t,e,a.children)}else this.activateChildRoutes(t,e,i);else if(n.component){const e=i.getOrCreateContext(n.outlet);if(this.routeReuseStrategy.shouldAttach(n.snapshot)){const t=this.routeReuseStrategy.retrieve(n.snapshot);this.routeReuseStrategy.store(n.snapshot,null),e.children.onOutletReAttached(t.contexts),e.attachRef=t.componentRef,e.route=t.route.value,e.outlet&&e.outlet.attach(t.componentRef,t.route.value),le(t.route)}else{const i=function(t){for(let e=t.parent;e;e=e.parent){const t=e.routeConfig;if(t&&t._loadedConfig)return t._loadedConfig;if(t&&t.component)return null}return null}(n.snapshot),a=i?i.module.componentFactoryResolver:null;e.attachRef=null,e.route=n,e.resolver=a,e.outlet&&e.outlet.activateWith(n,a),this.activateChildRoutes(t,null,e.children)}}else this.activateChildRoutes(t,null,i)}}function le(t){qt(t.value),t.children.forEach(le)}class de{constructor(t,e){this.routes=t,this.module=e}}function he(t){return"function"==typeof t}function ue(t){return t instanceof mt}const pe=Symbol("INITIAL_VALUE");function be(){return Object(P.a)(t=>Object(c.a)(...t.map(t=>t.pipe(Object(V.a)(1),Object(R.a)(pe)))).pipe(function(t,e){let i=!1;return arguments.length>=2&&(i=!0),function(n){return n.lift(new j(t,e,i))}}((t,e)=>{let i=!1;return e.reduce((t,n,a)=>{if(t!==pe)return t;if(n===pe&&(i=!0),!i){if(!1===n)return n;if(a===e.length-1||ue(n))return n}return t},t)},pe),Object(m.a)(t=>t!==pe),Object(b.a)(t=>ue(t)?t:!0===t),Object(V.a)(1)))}class fe{constructor(t){this.segmentGroup=t||null}}class me{constructor(t){this.urlTree=t}}function ge(t){return new l.a(e=>e.error(new fe(t)))}function ve(t){return new l.a(e=>e.error(new me(t)))}function _e(t){return new l.a(e=>e.error(new Error(`Only absolute redirects can have named outlets. redirectTo: '${t}'`)))}class ye{constructor(t,e,i,n,s){this.configLoader=e,this.urlSerializer=i,this.urlTree=n,this.config=s,this.allowRedirects=!0,this.ngModule=t.get(a.A)}apply(){return this.expandSegmentGroup(this.ngModule,this.config,this.urlTree.root,"primary").pipe(Object(b.a)(t=>this.createUrlTree(t,this.urlTree.queryParams,this.urlTree.fragment))).pipe(Object(W.a)(t=>{if(t instanceof me)return this.allowRedirects=!1,this.match(t.urlTree);if(t instanceof fe)throw this.noMatchError(t);throw t}))}match(t){return this.expandSegmentGroup(this.ngModule,this.config,t.root,"primary").pipe(Object(b.a)(e=>this.createUrlTree(e,t.queryParams,t.fragment))).pipe(Object(W.a)(t=>{if(t instanceof fe)throw this.noMatchError(t);throw t}))}noMatchError(t){return new Error(`Cannot match any routes. URL Segment: '${t.segmentGroup}'`)}createUrlTree(t,e,i){const n=t.segments.length>0?new gt([],{primary:t}):t;return new mt(n,e,i)}expandSegmentGroup(t,e,i,n){return 0===i.segments.length&&i.hasChildren()?this.expandChildren(t,e,i).pipe(Object(b.a)(t=>new gt([],t))):this.expandSegment(t,i,e,i.segments,n,!0)}expandChildren(t,e,i){return function(t,e){if(0===Object.keys(t).length)return Object(s.a)({});const i=[],n=[],a={};return pt(t,(t,s)=>{const o=e(s,t).pipe(Object(b.a)(t=>a[s]=t));"primary"===s?i.push(o):n.push(o)}),s.a.apply(null,i.concat(n)).pipe(Object(f.a)(),function(t,e){const i=arguments.length>=2;return n=>n.pipe(t?Object(m.a)((e,i)=>t(e,i,n)):I.a,_(1),i?M(e):C(()=>new d))}(),Object(b.a)(()=>a))}(i.children,(i,n)=>this.expandSegmentGroup(t,e,n,i))}expandSegment(t,e,i,n,a,o){return Object(s.a)(...i).pipe(Object(T.a)(r=>this.expandSegmentAgainstRoute(t,e,i,r,n,a,o).pipe(Object(W.a)(t=>{if(t instanceof fe)return Object(s.a)(null);throw t}))),E(t=>!!t),Object(W.a)((t,i)=>{if(t instanceof d||"EmptyError"===t.name){if(this.noLeftoversInUrl(e,n,a))return Object(s.a)(new gt([],{}));throw new fe(e)}throw t}))}noLeftoversInUrl(t,e,i){return 0===e.length&&!t.children[i]}expandSegmentAgainstRoute(t,e,i,n,a,s,o){return De(n)!==s?ge(e):void 0===n.redirectTo?this.matchSegmentAgainstRoute(t,e,n,a):o&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,i,n,a,s):ge(e)}expandSegmentAgainstRouteUsingRedirect(t,e,i,n,a,s){return"**"===n.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,i,n,s):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,i,n,a,s)}expandWildCardWithParamsAgainstRouteUsingRedirect(t,e,i,n){const a=this.applyRedirectCommands([],i.redirectTo,{});return i.redirectTo.startsWith("/")?ve(a):this.lineralizeSegments(i,a).pipe(Object(F.a)(i=>{const a=new gt(i,{});return this.expandSegment(t,a,e,i,n,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(t,e,i,n,a,s){const{matched:o,consumedSegments:r,lastChild:c,positionalParamSegments:l}=xe(e,n,a);if(!o)return ge(e);const d=this.applyRedirectCommands(r,n.redirectTo,l);return n.redirectTo.startsWith("/")?ve(d):this.lineralizeSegments(n,d).pipe(Object(F.a)(n=>this.expandSegment(t,e,i,n.concat(a.slice(c)),s,!1)))}matchSegmentAgainstRoute(t,e,i,n){if("**"===i.path)return i.loadChildren?this.configLoader.load(t.injector,i).pipe(Object(b.a)(t=>(i._loadedConfig=t,new gt(n,{})))):Object(s.a)(new gt(n,{}));const{matched:a,consumedSegments:o,lastChild:r}=xe(e,i,n);if(!a)return ge(e);const c=n.slice(r);return this.getChildConfig(t,i,n).pipe(Object(F.a)(t=>{const i=t.module,n=t.routes,{segmentGroup:a,slicedSegments:r}=function(t,e,i,n){return i.length>0&&function(t,e,i){return i.some(i=>Oe(t,e,i)&&"primary"!==De(i))}(t,i,n)?{segmentGroup:Ce(new gt(e,function(t,e){const i={};i.primary=e;for(const n of t)""===n.path&&"primary"!==De(n)&&(i[De(n)]=new gt([],{}));return i}(n,new gt(i,t.children)))),slicedSegments:[]}:0===i.length&&function(t,e,i){return i.some(i=>Oe(t,e,i))}(t,i,n)?{segmentGroup:Ce(new gt(t.segments,function(t,e,i,n){const a={};for(const s of i)Oe(t,e,s)&&!n[De(s)]&&(a[De(s)]=new gt([],{}));return Object.assign(Object.assign({},n),a)}(t,i,n,t.children))),slicedSegments:i}:{segmentGroup:t,slicedSegments:i}}(e,o,c,n);return 0===r.length&&a.hasChildren()?this.expandChildren(i,n,a).pipe(Object(b.a)(t=>new gt(o,t))):0===n.length&&0===r.length?Object(s.a)(new gt(o,{})):this.expandSegment(i,a,n,r,"primary",!0).pipe(Object(b.a)(t=>new gt(o.concat(t.segments),t.children)))}))}getChildConfig(t,e,i){return e.children?Object(s.a)(new de(e.children,t)):e.loadChildren?void 0!==e._loadedConfig?Object(s.a)(e._loadedConfig):this.runCanLoadGuards(t.injector,e,i).pipe(Object(F.a)(i=>i?this.configLoader.load(t.injector,e).pipe(Object(b.a)(t=>(e._loadedConfig=t,t))):function(t){return new l.a(e=>e.error(rt(`Cannot load children because the guard of the route "path: '${t.path}'" returned false`)))}(e))):Object(s.a)(new de([],t))}runCanLoadGuards(t,e,i){const n=e.canLoad;if(!n||0===n.length)return Object(s.a)(!0);const a=n.map(n=>{const a=t.get(n);let s;if(function(t){return t&&he(t.canLoad)}(a))s=a.canLoad(e,i);else{if(!he(a))throw new Error("Invalid CanLoad guard");s=a(e,i)}return bt(s)});return Object(s.a)(a).pipe(be(),Object(L.a)(t=>{if(!ue(t))return;const e=rt(`Redirecting to "${this.urlSerializer.serialize(t)}"`);throw e.url=t,e}),Object(b.a)(t=>!0===t))}lineralizeSegments(t,e){let i=[],n=e.root;for(;;){if(i=i.concat(n.segments),0===n.numberOfChildren)return Object(s.a)(i);if(n.numberOfChildren>1||!n.children.primary)return _e(t.redirectTo);n=n.children.primary}}applyRedirectCommands(t,e,i){return this.applyRedirectCreatreUrlTree(e,this.urlSerializer.parse(e),t,i)}applyRedirectCreatreUrlTree(t,e,i,n){const a=this.createSegmentGroup(t,e.root,i,n);return new mt(a,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const i={};return pt(t,(t,n)=>{if("string"==typeof t&&t.startsWith(":")){const a=t.substring(1);i[n]=e[a]}else i[n]=t}),i}createSegmentGroup(t,e,i,n){const a=this.createSegments(t,e.segments,i,n);let s={};return pt(e.children,(e,a)=>{s[a]=this.createSegmentGroup(t,e,i,n)}),new gt(a,s)}createSegments(t,e,i,n){return e.map(e=>e.path.startsWith(":")?this.findPosParam(t,e,n):this.findOrReturn(e,i))}findPosParam(t,e,i){const n=i[e.path.substring(1)];if(!n)throw new Error(`Cannot redirect to '${t}'. Cannot find '${e.path}'.`);return n}findOrReturn(t,e){let i=0;for(const n of e){if(n.path===t.path)return e.splice(i),n;i++}return t}}function xe(t,e,i){if(""===e.path)return"full"===e.pathMatch&&(t.hasChildren()||i.length>0)?{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}:{matched:!0,consumedSegments:[],lastChild:0,positionalParamSegments:{}};const n=(e.matcher||ct)(i,t,e);return n?{matched:!0,consumedSegments:n.consumed,lastChild:n.consumed.length,positionalParamSegments:n.posParams}:{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}}function Ce(t){if(1===t.numberOfChildren&&t.children.primary){const e=t.children.primary;return new gt(t.segments.concat(e.segments),e.children)}return t}function Oe(t,e,i){return(!(t.hasChildren()||e.length>0)||"full"!==i.pathMatch)&&""===i.path&&void 0!==i.redirectTo}function De(t){return t.outlet||"primary"}class we{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class Me{constructor(t,e){this.component=t,this.route=e}}function ke(t,e,i){const n=t._root;return function t(e,i,n,a,s={canDeactivateChecks:[],canActivateChecks:[]}){const o=Qt(i);return e.children.forEach(e=>{!function(e,i,n,a,s={canDeactivateChecks:[],canActivateChecks:[]}){const o=e.value,r=i?i.value:null,c=n?n.getContext(e.value.outlet):null;if(r&&o.routeConfig===r.routeConfig){const l=function(t,e,i){if("function"==typeof i)return i(t,e);switch(i){case"pathParamsChange":return!_t(t.url,e.url);case"pathParamsOrQueryParamsChange":return!_t(t.url,e.url)||!lt(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Kt(t,e)||!lt(t.queryParams,e.queryParams);case"paramsChange":default:return!Kt(t,e)}}(r,o,o.routeConfig.runGuardsAndResolvers);l?s.canActivateChecks.push(new we(a)):(o.data=r.data,o._resolvedData=r._resolvedData),t(e,i,o.component?c?c.children:null:n,a,s),l&&c&&c.outlet&&c.outlet.isActivated&&s.canDeactivateChecks.push(new Me(c.outlet.component,r))}else r&&Ie(i,c,s),s.canActivateChecks.push(new we(a)),t(e,null,o.component?c?c.children:null:n,a,s)}(e,o[e.value.outlet],n,a.concat([e.value]),s),delete o[e.value.outlet]}),pt(o,(t,e)=>Ie(t,n.getContext(e),s)),s}(n,e?e._root:null,i,[n.value])}function Se(t,e,i){const n=function(t){if(!t)return null;for(let e=t.parent;e;e=e.parent){const t=e.routeConfig;if(t&&t._loadedConfig)return t._loadedConfig}return null}(e);return(n?n.module.injector:i).get(t)}function Ie(t,e,i){const n=Qt(t),a=t.value;pt(n,(t,n)=>{Ie(t,a.component?e?e.children.getContext(n):null:e,i)}),i.canDeactivateChecks.push(new Me(a.component&&e&&e.outlet&&e.outlet.isActivated?e.outlet.component:null,a))}function Pe(t,e){return null!==t&&e&&e(new it(t)),Object(s.a)(!0)}function Ve(t,e){return null!==t&&e&&e(new tt(t)),Object(s.a)(!0)}function Re(t,e,i){const n=e.routeConfig?e.routeConfig.canActivate:null;if(!n||0===n.length)return Object(s.a)(!0);const a=n.map(n=>Object(h.a)(()=>{const a=Se(n,e,i);let s;if(function(t){return t&&he(t.canActivate)}(a))s=bt(a.canActivate(e,t));else{if(!he(a))throw new Error("Invalid CanActivate guard");s=bt(a(e,t))}return s.pipe(E())}));return Object(s.a)(a).pipe(be())}function je(t,e,i){const n=e[e.length-1],a=e.slice(0,e.length-1).reverse().map(t=>function(t){const e=t.routeConfig?t.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:t,guards:e}:null}(t)).filter(t=>null!==t).map(e=>Object(h.a)(()=>{const a=e.guards.map(a=>{const s=Se(a,e.node,i);let o;if(function(t){return t&&he(t.canActivateChild)}(s))o=bt(s.canActivateChild(n,t));else{if(!he(s))throw new Error("Invalid CanActivateChild guard");o=bt(s(n,t))}return o.pipe(E())});return Object(s.a)(a).pipe(be())}));return Object(s.a)(a).pipe(be())}class Ae{}class We{constructor(t,e,i,n,a,s){this.rootComponentType=t,this.config=e,this.urlTree=i,this.url=n,this.paramsInheritanceStrategy=a,this.relativeLinkResolution=s}recognize(){try{const t=Fe(this.urlTree.root,[],[],this.config,this.relativeLinkResolution).segmentGroup,e=this.processSegmentGroup(this.config,t,"primary"),i=new $t([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},"primary",this.rootComponentType,null,this.urlTree.root,-1,{}),n=new Lt(i,e),a=new Ht(this.url,n);return this.inheritParamsAndData(a._root),Object(s.a)(a)}catch(t){return new l.a(e=>e.error(t))}}inheritParamsAndData(t){const e=t.value,i=Ut(e,this.paramsInheritanceStrategy);e.params=Object.freeze(i.params),e.data=Object.freeze(i.data),t.children.forEach(t=>this.inheritParamsAndData(t))}processSegmentGroup(t,e,i){return 0===e.segments.length&&e.hasChildren()?this.processChildren(t,e):this.processSegment(t,e,e.segments,i)}processChildren(t,e){const i=yt(e,(e,i)=>this.processSegmentGroup(t,e,i));return function(t){const e={};t.forEach(t=>{const i=e[t.value.outlet];if(i){const e=i.url.map(t=>t.toString()).join("/"),n=t.value.url.map(t=>t.toString()).join("/");throw new Error(`Two segments cannot have the same outlet name: '${e}' and '${n}'.`)}e[t.value.outlet]=t.value})}(i),i.sort((t,e)=>"primary"===t.value.outlet?-1:"primary"===e.value.outlet?1:t.value.outlet.localeCompare(e.value.outlet)),i}processSegment(t,e,i,n){for(const s of t)try{return this.processSegmentAgainstRoute(s,e,i,n)}catch(a){if(!(a instanceof Ae))throw a}if(this.noLeftoversInUrl(e,i,n))return[];throw new Ae}noLeftoversInUrl(t,e,i){return 0===e.length&&!t.children[i]}processSegmentAgainstRoute(t,e,i,n){if(t.redirectTo)throw new Ae;if((t.outlet||"primary")!==n)throw new Ae;let a,s=[],o=[];if("**"===t.path){const s=i.length>0?ut(i).parameters:{};a=new $t(i,s,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,Ne(t),n,t.component,t,Te(e),Ee(e)+i.length,ze(t))}else{const r=function(t,e,i){if(""===e.path){if("full"===e.pathMatch&&(t.hasChildren()||i.length>0))throw new Ae;return{consumedSegments:[],lastChild:0,parameters:{}}}const n=(e.matcher||ct)(i,t,e);if(!n)throw new Ae;const a={};pt(n.posParams,(t,e)=>{a[e]=t.path});const s=n.consumed.length>0?Object.assign(Object.assign({},a),n.consumed[n.consumed.length-1].parameters):a;return{consumedSegments:n.consumed,lastChild:n.consumed.length,parameters:s}}(e,t,i);s=r.consumedSegments,o=i.slice(r.lastChild),a=new $t(s,r.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,Ne(t),n,t.component,t,Te(e),Ee(e)+s.length,ze(t))}const r=function(t){return t.children?t.children:t.loadChildren?t._loadedConfig.routes:[]}(t),{segmentGroup:c,slicedSegments:l}=Fe(e,s,o,r,this.relativeLinkResolution);if(0===l.length&&c.hasChildren()){const t=this.processChildren(r,c);return[new Lt(a,t)]}if(0===r.length&&0===l.length)return[new Lt(a,[])];const d=this.processSegment(r,c,l,"primary");return[new Lt(a,d)]}}function Te(t){let e=t;for(;e._sourceSegment;)e=e._sourceSegment;return e}function Ee(t){let e=t,i=e._segmentIndexShift?e._segmentIndexShift:0;for(;e._sourceSegment;)e=e._sourceSegment,i+=e._segmentIndexShift?e._segmentIndexShift:0;return i-1}function Fe(t,e,i,n,a){if(i.length>0&&function(t,e,i){return i.some(i=>Le(t,e,i)&&"primary"!==Qe(i))}(t,i,n)){const a=new gt(e,function(t,e,i,n){const a={};a.primary=n,n._sourceSegment=t,n._segmentIndexShift=e.length;for(const s of i)if(""===s.path&&"primary"!==Qe(s)){const i=new gt([],{});i._sourceSegment=t,i._segmentIndexShift=e.length,a[Qe(s)]=i}return a}(t,e,n,new gt(i,t.children)));return a._sourceSegment=t,a._segmentIndexShift=e.length,{segmentGroup:a,slicedSegments:[]}}if(0===i.length&&function(t,e,i){return i.some(i=>Le(t,e,i))}(t,i,n)){const s=new gt(t.segments,function(t,e,i,n,a,s){const o={};for(const r of n)if(Le(t,i,r)&&!a[Qe(r)]){const i=new gt([],{});i._sourceSegment=t,i._segmentIndexShift="legacy"===s?t.segments.length:e.length,o[Qe(r)]=i}return Object.assign(Object.assign({},a),o)}(t,e,i,n,t.children,a));return s._sourceSegment=t,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:i}}const s=new gt(t.segments,t.children);return s._sourceSegment=t,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:i}}function Le(t,e,i){return(!(t.hasChildren()||e.length>0)||"full"!==i.pathMatch)&&""===i.path&&void 0===i.redirectTo}function Qe(t){return t.outlet||"primary"}function Ne(t){return t.data||{}}function ze(t){return t.resolve||{}}function Be(t){return function(e){return e.pipe(Object(P.a)(e=>{const i=t(e);return i?Object(o.a)(i).pipe(Object(b.a)(()=>e)):Object(o.a)([e])}))}}class Ue extends class{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}{}let $e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=a.Kb({type:t,selectors:[["ng-component"]],decls:1,vars:0,template:function(t,e){1&t&&a.Rb(0,"router-outlet")},directives:function(){return[li]},encapsulation:2}),t})();function He(t,e=""){for(let i=0;i<t.length;i++){const n=t[i];Ge(n,Xe(e,n))}}function Ge(t,e){if(!t)throw new Error(`\n Invalid configuration of route '${e}': Encountered undefined route.\n The reason might be an extra comma.\n\n Example:\n const routes: Routes = [\n { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n { path: 'dashboard', component: DashboardComponent },, << two commas\n { path: 'detail/:id', component: HeroDetailComponent }\n ];\n `);if(Array.isArray(t))throw new Error(`Invalid configuration of route '${e}': Array cannot be specified`);if(!t.component&&!t.children&&!t.loadChildren&&t.outlet&&"primary"!==t.outlet)throw new Error(`Invalid configuration of route '${e}': a componentless route without children or loadChildren cannot have a named outlet set`);if(t.redirectTo&&t.children)throw new Error(`Invalid configuration of route '${e}': redirectTo and children cannot be used together`);if(t.redirectTo&&t.loadChildren)throw new Error(`Invalid configuration of route '${e}': redirectTo and loadChildren cannot be used together`);if(t.children&&t.loadChildren)throw new Error(`Invalid configuration of route '${e}': children and loadChildren cannot be used together`);if(t.redirectTo&&t.component)throw new Error(`Invalid configuration of route '${e}': redirectTo and component cannot be used together`);if(t.path&&t.matcher)throw new Error(`Invalid configuration of route '${e}': path and matcher cannot be used together`);if(void 0===t.redirectTo&&!t.component&&!t.children&&!t.loadChildren)throw new Error(`Invalid configuration of route '${e}'. One of the following must be provided: component, redirectTo, children or loadChildren`);if(void 0===t.path&&void 0===t.matcher)throw new Error(`Invalid configuration of route '${e}': routes must have either a path or a matcher specified`);if("string"==typeof t.path&&"/"===t.path.charAt(0))throw new Error(`Invalid configuration of route '${e}': path cannot start with a slash`);if(""===t.path&&void 0!==t.redirectTo&&void 0===t.pathMatch)throw new Error(`Invalid configuration of route '{path: "${e}", redirectTo: "${t.redirectTo}"}': please provide 'pathMatch'. The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`);if(void 0!==t.pathMatch&&"full"!==t.pathMatch&&"prefix"!==t.pathMatch)throw new Error(`Invalid configuration of route '${e}': pathMatch can only be set to 'prefix' or 'full'`);t.children&&He(t.children,e)}function Xe(t,e){return e?t||e.path?t&&!e.path?t+"/":!t&&e.path?e.path:`${t}/${e.path}`:"":t}function qe(t){const e=t.children&&t.children.map(qe),i=e?Object.assign(Object.assign({},t),{children:e}):Object.assign({},t);return!i.component&&(e||i.loadChildren)&&i.outlet&&"primary"!==i.outlet&&(i.component=$e),i}const Ke=new a.s("ROUTES");class Ye{constructor(t,e,i,n){this.loader=t,this.compiler=e,this.onLoadStartListener=i,this.onLoadEndListener=n}load(t,e){return this.onLoadStartListener&&this.onLoadStartListener(e),this.loadModuleFactory(e.loadChildren).pipe(Object(b.a)(i=>{this.onLoadEndListener&&this.onLoadEndListener(e);const n=i.create(t);return new de(ht(n.injector.get(Ke)).map(qe),n)}))}loadModuleFactory(t){return"string"==typeof t?Object(o.a)(this.loader.load(t)):bt(t()).pipe(Object(F.a)(t=>t instanceof a.y?Object(s.a)(t):Object(o.a)(this.compiler.compileModuleAsync(t))))}}class Je{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.children=new Ze,this.attachRef=null}}class Ze{constructor(){this.contexts=new Map}onChildOutletCreated(t,e){const i=this.getOrCreateContext(t);i.outlet=e,this.contexts.set(t,i)}onChildOutletDestroyed(t){const e=this.getContext(t);e&&(e.outlet=null)}onOutletDeactivated(){const t=this.contexts;return this.contexts=new Map,t}onOutletReAttached(t){this.contexts=t}getOrCreateContext(t){let e=this.getContext(t);return e||(e=new Je,this.contexts.set(t,e)),e}getContext(t){return this.contexts.get(t)||null}}class ti{shouldProcessUrl(t){return!0}extract(t){return t}merge(t,e){return t}}function ei(t){throw t}function ii(t,e,i){return e.parse("/")}function ni(t,e){return Object(s.a)(null)}let ai=(()=>{class t{constructor(t,e,i,n,s,o,c,l){this.rootComponentType=t,this.urlSerializer=e,this.rootContexts=i,this.location=n,this.config=l,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.lastLocationChangeInfo=null,this.navigationId=0,this.isNgZoneEnabled=!1,this.events=new p.a,this.errorHandler=ei,this.malformedUriErrorHandler=ii,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:ni,afterPreactivation:ni},this.urlHandlingStrategy=new ti,this.routeReuseStrategy=new Ue,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="legacy",this.ngModule=s.get(a.A),this.console=s.get(a.cb);const d=s.get(a.C);this.isNgZoneEnabled=d instanceof a.C,this.resetConfig(l),this.currentUrlTree=new mt(new gt([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new Ye(o,c,t=>this.triggerEvent(new J(t)),t=>this.triggerEvent(new Z(t))),this.routerState=zt(this.currentUrlTree,this.rootComponentType),this.transitions=new r.a({id: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()}setupNavigations(t){const e=this.events;return t.pipe(Object(m.a)(t=>0!==t.id),Object(b.a)(t=>Object.assign(Object.assign({},t),{extractedUrl:this.urlHandlingStrategy.extract(t.rawUrl)})),Object(P.a)(t=>{let i=!1,n=!1;return Object(s.a)(t).pipe(Object(L.a)(t=>{this.currentNavigation={id:t.id,initialUrl:t.currentRawUrl,extractedUrl:t.extractedUrl,trigger:t.source,extras:t.extras,previousNavigation:this.lastSuccessfulNavigation?Object.assign(Object.assign({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),Object(P.a)(t=>{const i=!this.navigated||t.extractedUrl.toString()!==this.browserUrlTree.toString();if(("reload"===this.onSameUrlNavigation||i)&&this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl))return Object(s.a)(t).pipe(Object(P.a)(t=>{const i=this.transitions.getValue();return e.next(new B(t.id,this.serializeUrl(t.extractedUrl),t.source,t.restoredState)),i!==this.transitions.getValue()?u.a:[t]}),Object(P.a)(t=>Promise.resolve(t)),(n=this.ngModule.injector,a=this.configLoader,o=this.urlSerializer,r=this.config,function(t){return t.pipe(Object(P.a)(t=>function(t,e,i,n,a){return new ye(t,e,i,n,a).apply()}(n,a,o,t.extractedUrl,r).pipe(Object(b.a)(e=>Object.assign(Object.assign({},t),{urlAfterRedirects:e})))))}),Object(L.a)(t=>{this.currentNavigation=Object.assign(Object.assign({},this.currentNavigation),{finalUrl:t.urlAfterRedirects})}),function(t,e,i,n,a){return function(s){return s.pipe(Object(F.a)(s=>function(t,e,i,n,a="emptyOnly",s="legacy"){return new We(t,e,i,n,a,s).recognize()}(t,e,s.urlAfterRedirects,i(s.urlAfterRedirects),n,a).pipe(Object(b.a)(t=>Object.assign(Object.assign({},s),{targetSnapshot:t})))))}}(this.rootComponentType,this.config,t=>this.serializeUrl(t),this.paramsInheritanceStrategy,this.relativeLinkResolution),Object(L.a)(t=>{"eager"===this.urlUpdateStrategy&&(t.extras.skipLocationChange||this.setBrowserUrl(t.urlAfterRedirects,!!t.extras.replaceUrl,t.id,t.extras.state),this.browserUrlTree=t.urlAfterRedirects)}),Object(L.a)(t=>{const i=new G(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.next(i)}));var n,a,o,r;if(i&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)){const{id:i,extractedUrl:n,source:a,restoredState:o,extras:r}=t,c=new B(i,this.serializeUrl(n),a,o);e.next(c);const l=zt(n,this.rootComponentType).snapshot;return Object(s.a)(Object.assign(Object.assign({},t),{targetSnapshot:l,urlAfterRedirects:n,extras:Object.assign(Object.assign({},r),{skipLocationChange:!1,replaceUrl:!1})}))}return this.rawUrlTree=t.rawUrl,this.browserUrlTree=t.urlAfterRedirects,t.resolve(null),u.a}),Be(t=>{const{targetSnapshot:e,id:i,extractedUrl:n,rawUrl:a,extras:{skipLocationChange:s,replaceUrl:o}}=t;return this.hooks.beforePreactivation(e,{navigationId:i,appliedUrlTree:n,rawUrlTree:a,skipLocationChange:!!s,replaceUrl:!!o})}),Object(L.a)(t=>{const e=new X(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}),Object(b.a)(t=>Object.assign(Object.assign({},t),{guards:ke(t.targetSnapshot,t.currentSnapshot,this.rootContexts)})),function(t,e){return function(i){return i.pipe(Object(F.a)(i=>{const{targetSnapshot:n,currentSnapshot:a,guards:{canActivateChecks:r,canDeactivateChecks:c}}=i;return 0===c.length&&0===r.length?Object(s.a)(Object.assign(Object.assign({},i),{guardsResult:!0})):function(t,e,i,n){return Object(o.a)(t).pipe(Object(F.a)(t=>function(t,e,i,n,a){const o=e&&e.routeConfig?e.routeConfig.canDeactivate:null;if(!o||0===o.length)return Object(s.a)(!0);const r=o.map(s=>{const o=Se(s,e,a);let r;if(function(t){return t&&he(t.canDeactivate)}(o))r=bt(o.canDeactivate(t,e,i,n));else{if(!he(o))throw new Error("Invalid CanDeactivate guard");r=bt(o(t,e,i,n))}return r.pipe(E())});return Object(s.a)(r).pipe(be())}(t.component,t.route,i,e,n)),E(t=>!0!==t,!0))}(c,n,a,t).pipe(Object(F.a)(i=>i&&"boolean"==typeof i?function(t,e,i,n){return Object(o.a)(e).pipe(Object(T.a)(e=>Object(o.a)([Ve(e.route.parent,n),Pe(e.route,n),je(t,e.path,i),Re(t,e.route,i)]).pipe(Object(f.a)(),E(t=>!0!==t,!0))),E(t=>!0!==t,!0))}(n,r,t,e):Object(s.a)(i)),Object(b.a)(t=>Object.assign(Object.assign({},i),{guardsResult:t})))}))}}(this.ngModule.injector,t=>this.triggerEvent(t)),Object(L.a)(t=>{if(ue(t.guardsResult)){const e=rt(`Redirecting to "${this.serializeUrl(t.guardsResult)}"`);throw e.url=t.guardsResult,e}}),Object(L.a)(t=>{const e=new q(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot,!!t.guardsResult);this.triggerEvent(e)}),Object(m.a)(t=>{if(!t.guardsResult){this.resetUrlToCurrentUrlTree();const i=new $(t.id,this.serializeUrl(t.extractedUrl),"");return e.next(i),t.resolve(!1),!1}return!0}),Be(t=>{if(t.guards.canActivateChecks.length)return Object(s.a)(t).pipe(Object(L.a)(t=>{const e=new K(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}),Object(P.a)(t=>{let i=!1;return Object(s.a)(t).pipe((n=this.paramsInheritanceStrategy,a=this.ngModule.injector,function(t){return t.pipe(Object(F.a)(t=>{const{targetSnapshot:e,guards:{canActivateChecks:i}}=t;if(!i.length)return Object(s.a)(t);let r=0;return Object(o.a)(i).pipe(Object(T.a)(t=>function(t,e,i,n){return function(t,e,i,n){const a=Object.keys(t);if(0===a.length)return Object(s.a)({});const r={};return Object(o.a)(a).pipe(Object(F.a)(a=>function(t,e,i,n){const a=Se(t,e,n);return bt(a.resolve?a.resolve(e,i):a(e,i))}(t[a],e,i,n).pipe(Object(L.a)(t=>{r[a]=t}))),_(1),Object(F.a)(()=>Object.keys(r).length===a.length?Object(s.a)(r):u.a))}(t._resolve,t,e,n).pipe(Object(b.a)(e=>(t._resolvedData=e,t.data=Object.assign(Object.assign({},t.data),Ut(t,i).resolve),null)))}(t.route,e,n,a)),Object(L.a)(()=>r++),_(1),Object(F.a)(e=>r===i.length?Object(s.a)(t):u.a))}))}),Object(L.a)({next:()=>i=!0,complete:()=>{if(!i){const i=new $(t.id,this.serializeUrl(t.extractedUrl),"At least one route resolver didn't emit any value.");e.next(i),t.resolve(!1)}}}));var n,a}),Object(L.a)(t=>{const e=new Y(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}))}),Be(t=>{const{targetSnapshot:e,id:i,extractedUrl:n,rawUrl:a,extras:{skipLocationChange:s,replaceUrl:o}}=t;return this.hooks.afterPreactivation(e,{navigationId:i,appliedUrlTree:n,rawUrlTree:a,skipLocationChange:!!s,replaceUrl:!!o})}),Object(b.a)(t=>{const e=function(t,e,i){const n=function t(e,i,n){if(n&&e.shouldReuseRoute(i.value,n.value.snapshot)){const a=n.value;a._futureSnapshot=i.value;const s=function(e,i,n){return i.children.map(i=>{for(const a of n.children)if(e.shouldReuseRoute(a.value.snapshot,i.value))return t(e,i,a);return t(e,i)})}(e,i,n);return new Lt(a,s)}{const n=e.retrieve(i.value);if(n){const t=n.route;return function t(e,i){if(e.value.routeConfig!==i.value.routeConfig)throw new Error("Cannot reattach ActivatedRouteSnapshot created from a different route");if(e.children.length!==i.children.length)throw new Error("Cannot reattach ActivatedRouteSnapshot with a different number of children");i.value._futureSnapshot=e.value;for(let n=0;n<e.children.length;++n)t(e.children[n],i.children[n])}(i,t),t}{const n=new Bt(new r.a((a=i.value).url),new r.a(a.params),new r.a(a.queryParams),new r.a(a.fragment),new r.a(a.data),a.outlet,a.component,a),s=i.children.map(i=>t(e,i));return new Lt(n,s)}}var a}(t,e._root,i?i._root:void 0);return new Nt(n,e)}(this.routeReuseStrategy,t.targetSnapshot,t.currentRouterState);return Object.assign(Object.assign({},t),{targetRouterState:e})}),Object(L.a)(t=>{this.currentUrlTree=t.urlAfterRedirects,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,t.rawUrl),this.routerState=t.targetRouterState,"deferred"===this.urlUpdateStrategy&&(t.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,!!t.extras.replaceUrl,t.id,t.extras.state),this.browserUrlTree=t.urlAfterRedirects)}),(a=this.rootContexts,c=this.routeReuseStrategy,l=t=>this.triggerEvent(t),Object(b.a)(t=>(new ce(c,t.targetRouterState,t.currentRouterState,l).activate(a),t))),Object(L.a)({next(){i=!0},complete(){i=!0}}),Object(Q.a)(()=>{if(!i&&!n){this.resetUrlToCurrentUrlTree();const i=new $(t.id,this.serializeUrl(t.extractedUrl),`Navigation ID ${t.id} is not equal to the current navigation id ${this.navigationId}`);e.next(i),t.resolve(!1)}this.currentNavigation=null}),Object(W.a)(i=>{if(n=!0,(a=i)&&a.ngNavigationCancelingError){const n=ue(i.url);n||(this.navigated=!0,this.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl));const a=new $(t.id,this.serializeUrl(t.extractedUrl),i.message);e.next(a),n?setTimeout(()=>{const e=this.urlHandlingStrategy.merge(i.url,this.rawUrlTree);return this.scheduleNavigation(e,"imperative",null,{skipLocationChange:t.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy},{resolve:t.resolve,reject:t.reject,promise:t.promise})},0):t.resolve(!1)}else{this.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl);const n=new H(t.id,this.serializeUrl(t.extractedUrl),i);e.next(n);try{t.resolve(this.errorHandler(i))}catch(s){t.reject(s)}}var a;return u.a}));var a,c,l}))}resetRootComponentType(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType}getTransition(){const t=this.transitions.value;return t.urlAfterRedirects=this.browserUrlTree,t}setTransition(t){this.transitions.next(Object.assign(Object.assign({},this.getTransition()),t))}initialNavigation(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(t=>{const e=this.extractLocationChangeInfoFromEvent(t);this.shouldScheduleNavigation(this.lastLocationChangeInfo,e)&&setTimeout(()=>{const{source:t,state:i,urlTree:n}=e,a={replaceUrl:!0};if(i){const t=Object.assign({},i);delete t.navigationId,0!==Object.keys(t).length&&(a.state=t)}this.scheduleNavigation(n,t,i,a)},0),this.lastLocationChangeInfo=e}))}extractLocationChangeInfoFromEvent(t){var e;return{source:"popstate"===t.type?"popstate":"hashchange",urlTree:this.parseUrl(t.url),state:(null===(e=t.state)||void 0===e?void 0:e.navigationId)?t.state:null,transitionId:this.getTransition().id}}shouldScheduleNavigation(t,e){if(!t)return!0;const i=e.urlTree.toString()===t.urlTree.toString();return!(e.transitionId===t.transitionId&&i&&("hashchange"===e.source&&"popstate"===t.source||"popstate"===e.source&&"hashchange"===t.source))}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.currentNavigation}triggerEvent(t){this.events.next(t)}resetConfig(t){He(t),this.config=t.map(qe),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0)}createUrlTree(t,e={}){const{relativeTo:i,queryParams:n,fragment:s,preserveQueryParams:o,queryParamsHandling:r,preserveFragment:c}=e;Object(a.Z)()&&o&&console&&console.warn&&console.warn("preserveQueryParams is deprecated, use queryParamsHandling instead.");const l=i||this.routerState.root,d=c?this.currentUrlTree.fragment:s;let h=null;if(r)switch(r){case"merge":h=Object.assign(Object.assign({},this.currentUrlTree.queryParams),n);break;case"preserve":h=this.currentUrlTree.queryParams;break;default:h=n||null}else h=o?this.currentUrlTree.queryParams:n||null;return null!==h&&(h=this.removeEmptyProps(h)),function(t,e,i,n,a){if(0===i.length)return Jt(e.root,e.root,e,n,a);const s=function(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new Zt(!0,0,t);let e=0,i=!1;const n=t.reduce((t,n,a)=>{if("object"==typeof n&&null!=n){if(n.outlets){const e={};return pt(n.outlets,(t,i)=>{e[i]="string"==typeof t?t.split("/"):t}),[...t,{outlets:e}]}if(n.segmentPath)return[...t,n.segmentPath]}return"string"!=typeof n?[...t,n]:0===a?(n.split("/").forEach((n,a)=>{0==a&&"."===n||(0==a&&""===n?i=!0:".."===n?e++:""!=n&&t.push(n))}),t):[...t,n]},[]);return new Zt(i,e,n)}(i);if(s.toRoot())return Jt(e.root,new gt([],{}),e,n,a);const o=function(t,e,i){if(t.isAbsolute)return new te(e.root,!0,0);if(-1===i.snapshot._lastPathIndex){const t=i.snapshot._urlSegment;return new te(t,t===e.root,0)}const n=Yt(t.commands[0])?0:1;return function(t,e,i){let n=t,a=e,s=i;for(;s>a;){if(s-=a,n=n.parent,!n)throw new Error("Invalid number of '../'");a=n.segments.length}return new te(n,!1,a-s)}(i.snapshot._urlSegment,i.snapshot._lastPathIndex+n,t.numberOfDoubleDots)}(s,e,t),r=o.processChildren?ne(o.segmentGroup,o.index,s.commands):ie(o.segmentGroup,o.index,s.commands);return Jt(o.segmentGroup,r,e,n,a)}(l,this.currentUrlTree,t,h,d)}navigateByUrl(t,e={skipLocationChange:!1}){Object(a.Z)()&&this.isNgZoneEnabled&&!a.C.isInAngularZone()&&this.console.warn("Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?");const i=ue(t)?t:this.parseUrl(t),n=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(n,"imperative",null,e)}navigate(t,e={skipLocationChange:!1}){return function(t){for(let e=0;e<t.length;e++){const i=t[e];if(null==i)throw new Error(`The requested path contains ${i} segment at index ${e}`)}}(t),this.navigateByUrl(this.createUrlTree(t,e),e)}serializeUrl(t){return this.urlSerializer.serialize(t)}parseUrl(t){let e;try{e=this.urlSerializer.parse(t)}catch(i){e=this.malformedUriErrorHandler(i,this.urlSerializer,t)}return e}isActive(t,e){if(ue(t))return ft(this.currentUrlTree,t,e);const i=this.parseUrl(t);return ft(this.currentUrlTree,i,e)}removeEmptyProps(t){return Object.keys(t).reduce((e,i)=>{const n=t[i];return null!=n&&(e[i]=n),e},{})}processNavigations(){this.navigations.subscribe(t=>{this.navigated=!0,this.lastSuccessfulId=t.id,this.events.next(new U(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(this.currentUrlTree))),this.lastSuccessfulNavigation=this.currentNavigation,this.currentNavigation=null,t.resolve(!0)},t=>{this.console.warn("Unhandled Navigation Error: ")})}scheduleNavigation(t,e,i,n,a){const s=this.getTransition(),o="imperative"!==e&&"imperative"===(null==s?void 0:s.source),r=(this.lastSuccessfulId===s.id||this.currentNavigation?s.rawUrl:s.urlAfterRedirects).toString()===t.toString();if(o&&r)return Promise.resolve(!0);let c,l,d;a?(c=a.resolve,l=a.reject,d=a.promise):d=new Promise((t,e)=>{c=t,l=e});const h=++this.navigationId;return this.setTransition({id:h,source:e,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:t,extras:n,resolve:c,reject:l,promise:d,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),d.catch(t=>Promise.reject(t))}setBrowserUrl(t,e,i,n){const a=this.urlSerializer.serialize(t);n=n||{},this.location.isCurrentPathEqualTo(a)||e?this.location.replaceState(a,"",Object.assign(Object.assign({},n),{navigationId:i})):this.location.go(a,"",Object.assign(Object.assign({},n),{navigationId:i}))}resetStateAndUrl(t,e,i){this.routerState=t,this.currentUrlTree=e,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,i),this.resetUrlToCurrentUrlTree()}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",{navigationId:this.lastSuccessfulId})}}return t.\u0275fac=function(e){return new(e||t)(a.ac(a.R),a.ac(xt),a.ac(Ze),a.ac(n.n),a.ac(a.t),a.ac(a.z),a.ac(a.i),a.ac(void 0))},t.\u0275prov=a.Mb({token:t,factory:t.\u0275fac}),t})(),si=(()=>{class t{constructor(t,e,i,n,a){this.router=t,this.route=e,this.commands=[],this.onChanges=new p.a,null==i&&n.setAttribute(a.nativeElement,"tabindex","0")}ngOnChanges(t){this.onChanges.next(this)}set routerLink(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]}set preserveQueryParams(t){Object(a.Z)()&&console&&console.warn&&console.warn("preserveQueryParams is deprecated!, use queryParamsHandling instead."),this.preserve=t}onClick(){const t={skipLocationChange:ri(this.skipLocationChange),replaceUrl:ri(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,t),!0}get urlTree(){return this.router.createUrlTree(this.commands,{relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,preserveQueryParams:ri(this.preserve),queryParamsHandling:this.queryParamsHandling,preserveFragment:ri(this.preserveFragment)})}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(ai),a.Qb(Bt),a.bc("tabindex"),a.Qb(a.I),a.Qb(a.l))},t.\u0275dir=a.Lb({type:t,selectors:[["","routerLink","",5,"a",5,"area"]],hostBindings:function(t,e){1&t&&a.dc("click",(function(){return e.onClick()}))},inputs:{routerLink:"routerLink",preserveQueryParams:"preserveQueryParams",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state"},features:[a.Bb]}),t})(),oi=(()=>{class t{constructor(t,e,i){this.router=t,this.route=e,this.locationStrategy=i,this.commands=[],this.onChanges=new p.a,this.subscription=t.events.subscribe(t=>{t instanceof U&&this.updateTargetUrlAndHref()})}set routerLink(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]}set preserveQueryParams(t){Object(a.Z)()&&console&&console.warn&&console.warn("preserveQueryParams is deprecated, use queryParamsHandling instead."),this.preserve=t}ngOnChanges(t){this.updateTargetUrlAndHref(),this.onChanges.next(this)}ngOnDestroy(){this.subscription.unsubscribe()}onClick(t,e,i,n,a){if(0!==t||e||i||n||a)return!0;if("string"==typeof this.target&&"_self"!=this.target)return!0;const s={skipLocationChange:ri(this.skipLocationChange),replaceUrl:ri(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,s),!1}updateTargetUrlAndHref(){this.href=this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree))}get urlTree(){return this.router.createUrlTree(this.commands,{relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,preserveQueryParams:ri(this.preserve),queryParamsHandling:this.queryParamsHandling,preserveFragment:ri(this.preserveFragment)})}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(ai),a.Qb(Bt),a.Qb(n.o))},t.\u0275dir=a.Lb({type:t,selectors:[["a","routerLink",""],["area","routerLink",""]],hostVars:2,hostBindings:function(t,e){1&t&&a.dc("click",(function(t){return e.onClick(t.button,t.ctrlKey,t.shiftKey,t.altKey,t.metaKey)})),2&t&&(a.Zb("href",e.href,a.Gc),a.Eb("target",e.target))},inputs:{routerLink:"routerLink",preserveQueryParams:"preserveQueryParams",target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state"},features:[a.Bb]}),t})();function ri(t){return""===t||!!t}let ci=(()=>{class t{constructor(t,e,i,n,a,s){this.router=t,this.element=e,this.renderer=i,this.cdr=n,this.link=a,this.linkWithHref=s,this.classes=[],this.isActive=!1,this.routerLinkActiveOptions={exact:!1},this.routerEventsSubscription=t.events.subscribe(t=>{t instanceof U&&this.update()})}ngAfterContentInit(){Object(o.a)([this.links.changes,this.linksWithHrefs.changes,Object(s.a)(null)]).pipe(Object(N.a)()).subscribe(t=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){var t;null===(t=this.linkInputChangesSubscription)||void 0===t||t.unsubscribe();const e=[...this.links.toArray(),...this.linksWithHrefs.toArray(),this.link,this.linkWithHref].filter(t=>!!t).map(t=>t.onChanges);this.linkInputChangesSubscription=Object(o.a)(e).pipe(Object(N.a)()).subscribe(t=>{this.isActive!==this.isLinkActive(this.router)(t)&&this.update()})}set routerLinkActive(t){const e=Array.isArray(t)?t:t.split(" ");this.classes=e.filter(t=>!!t)}ngOnChanges(t){this.update()}ngOnDestroy(){var t;this.routerEventsSubscription.unsubscribe(),null===(t=this.linkInputChangesSubscription)||void 0===t||t.unsubscribe()}update(){this.links&&this.linksWithHrefs&&this.router.navigated&&Promise.resolve().then(()=>{const t=this.hasActiveLinks();this.isActive!==t&&(this.isActive=t,this.cdr.markForCheck(),this.classes.forEach(e=>{t?this.renderer.addClass(this.element.nativeElement,e):this.renderer.removeClass(this.element.nativeElement,e)}))})}isLinkActive(t){return e=>t.isActive(e.urlTree,this.routerLinkActiveOptions.exact)}hasActiveLinks(){const t=this.isLinkActive(this.router);return this.link&&t(this.link)||this.linkWithHref&&t(this.linkWithHref)||this.links.some(t)||this.linksWithHrefs.some(t)}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(ai),a.Qb(a.l),a.Qb(a.I),a.Qb(a.h),a.Qb(si,8),a.Qb(oi,8))},t.\u0275dir=a.Lb({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(t,e,i){var n;1&t&&(a.Jb(i,si,!0),a.Jb(i,oi,!0)),2&t&&(a.yc(n=a.ec())&&(e.links=n),a.yc(n=a.ec())&&(e.linksWithHrefs=n))},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",routerLinkActive:"routerLinkActive"},exportAs:["routerLinkActive"],features:[a.Bb]}),t})(),li=(()=>{class t{constructor(t,e,i,n,s){this.parentContexts=t,this.location=e,this.resolver=i,this.changeDetector=s,this.activated=null,this._activatedRoute=null,this.activateEvents=new a.o,this.deactivateEvents=new a.o,this.name=n||"primary",t.onChildOutletCreated(this.name,this)}ngOnDestroy(){this.parentContexts.onChildOutletDestroyed(this.name)}ngOnInit(){if(!this.activated){const t=this.parentContexts.getContext(this.name);t&&t.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.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 t=this.activated;return this.activated=null,this._activatedRoute=null,t}attach(t,e){this.activated=t,this._activatedRoute=e,this.location.insert(t.hostView)}deactivate(){if(this.activated){const t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}}activateWith(t,e){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=t;const i=(e=e||this.resolver).resolveComponentFactory(t._futureSnapshot.routeConfig.component),n=this.parentContexts.getOrCreateContext(this.name).children,a=new di(t,n,this.location.injector);this.activated=this.location.createComponent(i,this.location.length,a),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(Ze),a.Qb(a.T),a.Qb(a.j),a.bc("name"),a.Qb(a.h))},t.\u0275dir=a.Lb({type:t,selectors:[["router-outlet"]],outputs:{activateEvents:"activate",deactivateEvents:"deactivate"},exportAs:["outlet"]}),t})();class di{constructor(t,e,i){this.route=t,this.childContexts=e,this.parent=i}get(t,e){return t===Bt?this.route:t===Ze?this.childContexts:this.parent.get(t,e)}}class hi{}class ui{preload(t,e){return e().pipe(Object(W.a)(()=>Object(s.a)(null)))}}class pi{preload(t,e){return Object(s.a)(null)}}let bi=(()=>{class t{constructor(t,e,i,n,a){this.router=t,this.injector=n,this.preloadingStrategy=a,this.loader=new Ye(e,i,e=>t.triggerEvent(new J(e)),e=>t.triggerEvent(new Z(e)))}setUpPreloading(){this.subscription=this.router.events.pipe(Object(m.a)(t=>t instanceof U),Object(T.a)(()=>this.preload())).subscribe(()=>{})}preload(){const t=this.injector.get(a.A);return this.processRoutes(t,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(t,e){const i=[];for(const n of e)if(n.loadChildren&&!n.canLoad&&n._loadedConfig){const t=n._loadedConfig;i.push(this.processRoutes(t.module,t.routes))}else n.loadChildren&&!n.canLoad?i.push(this.preloadConfig(t,n)):n.children&&i.push(this.processRoutes(t,n.children));return Object(o.a)(i).pipe(Object(N.a)(),Object(b.a)(t=>{}))}preloadConfig(t,e){return this.preloadingStrategy.preload(e,()=>this.loader.load(t.injector,e).pipe(Object(F.a)(t=>(e._loadedConfig=t,this.processRoutes(t.module,t.routes)))))}}return t.\u0275fac=function(e){return new(e||t)(a.ac(ai),a.ac(a.z),a.ac(a.i),a.ac(a.t),a.ac(hi))},t.\u0275prov=a.Mb({token:t,factory:t.\u0275fac}),t})(),fi=(()=>{class t{constructor(t,e,i={}){this.router=t,this.viewportScroller=e,this.options=i,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},i.scrollPositionRestoration=i.scrollPositionRestoration||"disabled",i.anchorScrolling=i.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(t=>{t instanceof B?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=t.navigationTrigger,this.restoredId=t.restoredState?t.restoredState.navigationId:0):t instanceof U&&(this.lastId=t.id,this.scheduleScrollEvent(t,this.router.parseUrl(t.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.router.events.subscribe(t=>{t instanceof at&&(t.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(t.position):t.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(t.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(t,e){this.router.triggerEvent(new at(t,"popstate"===this.lastSource?this.store[this.restoredId]:null,e))}ngOnDestroy(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(a.ac(ai),a.ac(n.H),a.ac(void 0))},t.\u0275prov=a.Mb({token:t,factory:t.\u0275fac}),t})();const mi=new a.s("ROUTER_CONFIGURATION"),gi=new a.s("ROUTER_FORROOT_GUARD"),vi=[n.n,{provide:xt,useClass:Ct},{provide:ai,useFactory:function(t,e,i,a,s,o,r,c={},l,d){const h=new ai(null,t,e,i,a,s,o,ht(r));if(l&&(h.urlHandlingStrategy=l),d&&(h.routeReuseStrategy=d),c.errorHandler&&(h.errorHandler=c.errorHandler),c.malformedUriErrorHandler&&(h.malformedUriErrorHandler=c.malformedUriErrorHandler),c.enableTracing){const t=Object(n.L)();h.events.subscribe(e=>{t.logGroup("Router Event: "+e.constructor.name),t.log(e.toString()),t.log(e),t.logGroupEnd()})}return c.onSameUrlNavigation&&(h.onSameUrlNavigation=c.onSameUrlNavigation),c.paramsInheritanceStrategy&&(h.paramsInheritanceStrategy=c.paramsInheritanceStrategy),c.urlUpdateStrategy&&(h.urlUpdateStrategy=c.urlUpdateStrategy),c.relativeLinkResolution&&(h.relativeLinkResolution=c.relativeLinkResolution),h},deps:[xt,Ze,n.n,a.t,a.z,a.i,Ke,mi,[class{},new a.D],[class{},new a.D]]},Ze,{provide:Bt,useFactory:function(t){return t.routerState.root},deps:[ai]},{provide:a.z,useClass:a.O},bi,pi,ui,{provide:mi,useValue:{enableTracing:!1}}];function _i(){return new a.B("Router",ai)}let yi=(()=>{class t{constructor(t,e){}static forRoot(e,i){return{ngModule:t,providers:[vi,Di(e),{provide:gi,useFactory:Oi,deps:[[ai,new a.D,new a.N]]},{provide:mi,useValue:i||{}},{provide:n.o,useFactory:Ci,deps:[n.D,[new a.q(n.a),new a.D],mi]},{provide:fi,useFactory:xi,deps:[ai,n.H,mi]},{provide:hi,useExisting:i&&i.preloadingStrategy?i.preloadingStrategy:pi},{provide:a.B,multi:!0,useFactory:_i},[wi,{provide:a.d,multi:!0,useFactory:Mi,deps:[wi]},{provide:Si,useFactory:ki,deps:[wi]},{provide:a.b,multi:!0,useExisting:Si}]]}}static forChild(e){return{ngModule:t,providers:[Di(e)]}}}return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)(a.ac(gi,8),a.ac(ai,8))}}),t})();function xi(t,e,i){return i.scrollOffset&&e.setOffset(i.scrollOffset),new fi(t,e,i)}function Ci(t,e,i={}){return i.useHash?new n.h(t,e):new n.B(t,e)}function Oi(t){if(t)throw new Error("RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function Di(t){return[{provide:a.a,multi:!0,useValue:t},{provide:Ke,multi:!0,useValue:t}]}let wi=(()=>{class t{constructor(t){this.injector=t,this.initNavigation=!1,this.resultOfPreactivationDone=new p.a}appInitializer(){return this.injector.get(n.m,Promise.resolve(null)).then(()=>{let t=null;const e=new Promise(e=>t=e),i=this.injector.get(ai),n=this.injector.get(mi);if(this.isLegacyDisabled(n)||this.isLegacyEnabled(n))t(!0);else if("disabled"===n.initialNavigation)i.setUpLocationChangeListener(),t(!0);else{if("enabled"!==n.initialNavigation)throw new Error(`Invalid initialNavigation options: '${n.initialNavigation}'`);i.hooks.afterPreactivation=()=>this.initNavigation?Object(s.a)(null):(this.initNavigation=!0,t(!0),this.resultOfPreactivationDone),i.initialNavigation()}return e})}bootstrapListener(t){const e=this.injector.get(mi),i=this.injector.get(bi),n=this.injector.get(fi),s=this.injector.get(ai),o=this.injector.get(a.g);t===o.components[0]&&(this.isLegacyEnabled(e)?s.initialNavigation():this.isLegacyDisabled(e)&&s.setUpLocationChangeListener(),i.setUpPreloading(),n.init(),s.resetRootComponentType(o.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}isLegacyEnabled(t){return"legacy_enabled"===t.initialNavigation||!0===t.initialNavigation||void 0===t.initialNavigation}isLegacyDisabled(t){return"legacy_disabled"===t.initialNavigation||!1===t.initialNavigation}}return t.\u0275fac=function(e){return new(e||t)(a.ac(a.t))},t.\u0275prov=a.Mb({token:t,factory:t.\u0275fac}),t})();function Mi(t){return t.appInitializer.bind(t)}function ki(t){return t.bootstrapListener.bind(t)}const Si=new a.s("Router Initializer")},u47x:function(t,e,i){"use strict";i.d(e,"a",(function(){return z})),i.d(e,"b",(function(){return O})),i.d(e,"c",(function(){return x})),i.d(e,"d",(function(){return A})),i.d(e,"e",(function(){return Q})),i.d(e,"f",(function(){return P})),i.d(e,"g",(function(){return D})),i.d(e,"h",(function(){return F})),i.d(e,"i",(function(){return I})),i.d(e,"j",(function(){return N})),i.d(e,"k",(function(){return j})),i.d(e,"l",(function(){return W}));var n=i("ofXK"),a=i("fXoL"),s=i("nLfN"),o=i("XNiG"),r=i("quSY"),c=i("LRne"),l=i("FtGj"),d=i("vkgz"),h=i("Kj3r"),u=i("pLZG"),p=i("lJxs"),b=i("IzEk"),f=i("8LU1"),m=i("GU7r");function g(t,e){return(t.getAttribute(e)||"").match(/\S+/g)||[]}let v=0;const _=new Map;let y=null,x=(()=>{class t{constructor(t,e){this._platform=e,this._document=t}describe(t,e){this._canBeDescribed(t,e)&&("string"!=typeof e?(this._setMessageId(e),_.set(e,{messageElement:e,referenceCount:0})):_.has(e)||this._createMessageElement(e),this._isElementDescribedByMessage(t,e)||this._addMessageReference(t,e))}removeDescription(t,e){if(e&&this._isElementNode(t)){if(this._isElementDescribedByMessage(t,e)&&this._removeMessageReference(t,e),"string"==typeof e){const t=_.get(e);t&&0===t.referenceCount&&this._deleteMessageElement(e)}y&&0===y.childNodes.length&&this._deleteMessagesContainer()}}ngOnDestroy(){const t=this._document.querySelectorAll("[cdk-describedby-host]");for(let e=0;e<t.length;e++)this._removeCdkDescribedByReferenceIds(t[e]),t[e].removeAttribute("cdk-describedby-host");y&&this._deleteMessagesContainer(),_.clear()}_createMessageElement(t){const e=this._document.createElement("div");this._setMessageId(e),e.textContent=t,this._createMessagesContainer(),y.appendChild(e),_.set(t,{messageElement:e,referenceCount:0})}_setMessageId(t){t.id||(t.id="cdk-describedby-message-"+v++)}_deleteMessageElement(t){const e=_.get(t),i=e&&e.messageElement;y&&i&&y.removeChild(i),_.delete(t)}_createMessagesContainer(){if(!y){const t=!this._platform||!this._platform.EDGE&&!this._platform.TRIDENT,e=this._document.getElementById("cdk-describedby-message-container");e&&e.parentNode&&e.parentNode.removeChild(e),y=this._document.createElement("div"),y.id="cdk-describedby-message-container",y.classList.add("cdk-visually-hidden"),y.setAttribute("aria-hidden",t+""),this._document.body.appendChild(y)}}_deleteMessagesContainer(){y&&y.parentNode&&(y.parentNode.removeChild(y),y=null)}_removeCdkDescribedByReferenceIds(t){const e=g(t,"aria-describedby").filter(t=>0!=t.indexOf("cdk-describedby-message"));t.setAttribute("aria-describedby",e.join(" "))}_addMessageReference(t,e){const i=_.get(e);!function(t,e,i){const n=g(t,e);n.some(t=>t.trim()==i.trim())||(n.push(i.trim()),t.setAttribute(e,n.join(" ")))}(t,"aria-describedby",i.messageElement.id),t.setAttribute("cdk-describedby-host",""),i.referenceCount++}_removeMessageReference(t,e){const i=_.get(e);i.referenceCount--,function(t,e,i){const n=g(t,e).filter(t=>t!=i.trim());n.length?t.setAttribute(e,n.join(" ")):t.removeAttribute(e)}(t,"aria-describedby",i.messageElement.id),t.removeAttribute("cdk-describedby-host")}_isElementDescribedByMessage(t,e){const i=g(t,"aria-describedby"),n=_.get(e),a=n&&n.messageElement.id;return!!a&&-1!=i.indexOf(a)}_canBeDescribed(t,e){if(!this._isElementNode(t))return!1;if(e&&"object"==typeof e)return!0;const i=null==e?"":(""+e).trim(),n=t.getAttribute("aria-label");return!(!i||n&&n.trim()===i)}_isElementNode(t){return t.nodeType===this._document.ELEMENT_NODE}}return t.\u0275fac=function(e){return new(e||t)(a.ac(n.e),a.ac(s.a))},t.\u0275prov=Object(a.Mb)({factory:function(){return new t(Object(a.ac)(n.e),Object(a.ac)(s.a))},token:t,providedIn:"root"}),t})();class C{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new o.a,this._typeaheadSubscription=r.a.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._skipPredicateFn=t=>t.disabled,this._pressedLetters=[],this.tabOut=new o.a,this.change=new o.a,t instanceof a.H&&t.changes.subscribe(t=>{if(this._activeItem){const e=t.toArray().indexOf(this._activeItem);e>-1&&e!==this._activeItemIndex&&(this._activeItemIndex=e)}})}skipPredicate(t){return this._skipPredicateFn=t,this}withWrap(t=!0){return this._wrap=t,this}withVerticalOrientation(t=!0){return this._vertical=t,this}withHorizontalOrientation(t){return this._horizontal=t,this}withAllowedModifierKeys(t){return this._allowedModifierKeys=t,this}withTypeAhead(t=200){return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(Object(d.a)(t=>this._pressedLetters.push(t)),Object(h.a)(t),Object(u.a)(()=>this._pressedLetters.length>0),Object(p.a)(()=>this._pressedLetters.join(""))).subscribe(t=>{const e=this._getItemsArray();for(let i=1;i<e.length+1;i++){const n=(this._activeItemIndex+i)%e.length,a=e[n];if(!this._skipPredicateFn(a)&&0===a.getLabel().toUpperCase().trim().indexOf(t)){this.setActiveItem(n);break}}this._pressedLetters=[]}),this}withHomeAndEnd(t=!0){return this._homeAndEnd=t,this}setActiveItem(t){const e=this._activeItem;this.updateActiveItem(t),this._activeItem!==e&&this.change.next(this._activeItemIndex)}onKeydown(t){const e=t.keyCode,i=["altKey","ctrlKey","metaKey","shiftKey"].every(e=>!t[e]||this._allowedModifierKeys.indexOf(e)>-1);switch(e){case l.r:return void this.tabOut.next();case l.e:if(this._vertical&&i){this.setNextItemActive();break}return;case l.s:if(this._vertical&&i){this.setPreviousItemActive();break}return;case l.o:if(this._horizontal&&i){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case l.k:if(this._horizontal&&i){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case l.j:if(this._homeAndEnd&&i){this.setFirstItemActive();break}return;case l.f:if(this._homeAndEnd&&i){this.setLastItemActive();break}return;default:return void((i||Object(l.v)(t,"shiftKey"))&&(t.key&&1===t.key.length?this._letterKeyStream.next(t.key.toLocaleUpperCase()):(e>=l.a&&e<=l.t||e>=l.u&&e<=l.l)&&this._letterKeyStream.next(String.fromCharCode(e))))}this._pressedLetters=[],t.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}isTyping(){return this._pressedLetters.length>0}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._items.length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(t){const e=this._getItemsArray(),i="number"==typeof t?t:e.indexOf(t),n=e[i];this._activeItem=null==n?null:n,this._activeItemIndex=i}_setActiveItemByDelta(t){this._wrap?this._setActiveInWrapMode(t):this._setActiveInDefaultMode(t)}_setActiveInWrapMode(t){const e=this._getItemsArray();for(let i=1;i<=e.length;i++){const n=(this._activeItemIndex+t*i+e.length)%e.length;if(!this._skipPredicateFn(e[n]))return void this.setActiveItem(n)}}_setActiveInDefaultMode(t){this._setActiveItemByIndex(this._activeItemIndex+t,t)}_setActiveItemByIndex(t,e){const i=this._getItemsArray();if(i[t]){for(;this._skipPredicateFn(i[t]);)if(!i[t+=e])return;this.setActiveItem(t)}}_getItemsArray(){return this._items instanceof a.H?this._items.toArray():this._items}}class O extends C{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}}class D extends C{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(t){return this._origin=t,this}setActiveItem(t){super.setActiveItem(t),this.activeItem&&this.activeItem.focus(this._origin)}}let w=(()=>{class t{constructor(t){this._platform=t}isDisabled(t){return t.hasAttribute("disabled")}isVisible(t){return function(t){return!!(t.offsetWidth||t.offsetHeight||"function"==typeof t.getClientRects&&t.getClientRects().length)}(t)&&"visible"===getComputedStyle(t).visibility}isTabbable(t){if(!this._platform.isBrowser)return!1;const e=function(t){try{return t.frameElement}catch(e){return null}}((i=t).ownerDocument&&i.ownerDocument.defaultView||window);var i;if(e){if(-1===k(e))return!1;if(!this.isVisible(e))return!1}let n=t.nodeName.toLowerCase(),a=k(t);return t.hasAttribute("contenteditable")?-1!==a:"iframe"!==n&&"object"!==n&&!(this._platform.WEBKIT&&this._platform.IOS&&!function(t){let e=t.nodeName.toLowerCase(),i="input"===e&&t.type;return"text"===i||"password"===i||"select"===e||"textarea"===e}(t))&&("audio"===n?!!t.hasAttribute("controls")&&-1!==a:"video"===n?-1!==a&&(null!==a||this._platform.FIREFOX||t.hasAttribute("controls")):t.tabIndex>=0)}isFocusable(t,e){return function(t){return!function(t){return function(t){return"input"==t.nodeName.toLowerCase()}(t)&&"hidden"==t.type}(t)&&(function(t){let e=t.nodeName.toLowerCase();return"input"===e||"select"===e||"button"===e||"textarea"===e}(t)||function(t){return function(t){return"a"==t.nodeName.toLowerCase()}(t)&&t.hasAttribute("href")}(t)||t.hasAttribute("contenteditable")||M(t))}(t)&&!this.isDisabled(t)&&((null==e?void 0:e.ignoreVisibility)||this.isVisible(t))}}return t.\u0275fac=function(e){return new(e||t)(a.ac(s.a))},t.\u0275prov=Object(a.Mb)({factory:function(){return new t(Object(a.ac)(s.a))},token:t,providedIn:"root"}),t})();function M(t){if(!t.hasAttribute("tabindex")||void 0===t.tabIndex)return!1;let e=t.getAttribute("tabindex");return"-32768"!=e&&!(!e||isNaN(parseInt(e,10)))}function k(t){if(!M(t))return null;const e=parseInt(t.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}class S{constructor(t,e,i,n,a=!1){this._element=t,this._checker=e,this._ngZone=i,this._document=n,this._hasAttached=!1,this.startAnchorListener=()=>this.focusLastTabbableElement(),this.endAnchorListener=()=>this.focusFirstTabbableElement(),this._enabled=!0,a||this.attachAnchors()}get enabled(){return this._enabled}set enabled(t){this._enabled=t,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}destroy(){const t=this._startAnchor,e=this._endAnchor;t&&(t.removeEventListener("focus",this.startAnchorListener),t.parentNode&&t.parentNode.removeChild(t)),e&&(e.removeEventListener("focus",this.endAnchorListener),e.parentNode&&e.parentNode.removeChild(e)),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return!!this._hasAttached||(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(){return new Promise(t=>{this._executeOnStable(()=>t(this.focusInitialElement()))})}focusFirstTabbableElementWhenReady(){return new Promise(t=>{this._executeOnStable(()=>t(this.focusFirstTabbableElement()))})}focusLastTabbableElementWhenReady(){return new Promise(t=>{this._executeOnStable(()=>t(this.focusLastTabbableElement()))})}_getRegionBoundary(t){let e=this._element.querySelectorAll(`[cdk-focus-region-${t}], [cdkFocusRegion${t}], [cdk-focus-${t}]`);for(let i=0;i<e.length;i++)e[i].hasAttribute("cdk-focus-"+t)?console.warn(`Found use of deprecated attribute 'cdk-focus-${t}', use 'cdkFocusRegion${t}' instead. The deprecated attribute will be removed in 8.0.0.`,e[i]):e[i].hasAttribute("cdk-focus-region-"+t)&&console.warn(`Found use of deprecated attribute 'cdk-focus-region-${t}', use 'cdkFocusRegion${t}' instead. The deprecated attribute will be removed in 8.0.0.`,e[i]);return"start"==t?e.length?e[0]:this._getFirstTabbableElement(this._element):e.length?e[e.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(){const t=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");return t?(t.hasAttribute("cdk-focus-initial")&&console.warn("Found use of deprecated attribute 'cdk-focus-initial', use 'cdkFocusInitial' instead. The deprecated attribute will be removed in 8.0.0",t),t.focus(),!0):this.focusFirstTabbableElement()}focusFirstTabbableElement(){const t=this._getRegionBoundary("start");return t&&t.focus(),!!t}focusLastTabbableElement(){const t=this._getRegionBoundary("end");return t&&t.focus(),!!t}hasAttached(){return this._hasAttached}_getFirstTabbableElement(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;let e=t.children||t.childNodes;for(let i=0;i<e.length;i++){let t=e[i].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(e[i]):null;if(t)return t}return null}_getLastTabbableElement(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;let e=t.children||t.childNodes;for(let i=e.length-1;i>=0;i--){let t=e[i].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[i]):null;if(t)return t}return null}_createAnchor(){const t=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,t),t.classList.add("cdk-visually-hidden"),t.classList.add("cdk-focus-trap-anchor"),t.setAttribute("aria-hidden","true"),t}_toggleAnchorTabIndex(t,e){t?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}toggleAnchors(t){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}_executeOnStable(t){this._ngZone.isStable?t():this._ngZone.onStable.pipe(Object(b.a)(1)).subscribe(t)}}let I=(()=>{class t{constructor(t,e,i){this._checker=t,this._ngZone=e,this._document=i}create(t,e=!1){return new S(t,this._checker,this._ngZone,this._document,e)}}return t.\u0275fac=function(e){return new(e||t)(a.ac(w),a.ac(a.C),a.ac(n.e))},t.\u0275prov=Object(a.Mb)({factory:function(){return new t(Object(a.ac)(w),Object(a.ac)(a.C),Object(a.ac)(n.e))},token:t,providedIn:"root"}),t})(),P=(()=>{class t{constructor(t,e,i){this._elementRef=t,this._focusTrapFactory=e,this._previouslyFocusedElement=null,this._document=i,this.focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement,!0)}get enabled(){return this.focusTrap.enabled}set enabled(t){this.focusTrap.enabled=Object(f.c)(t)}get autoCapture(){return this._autoCapture}set autoCapture(t){this._autoCapture=Object(f.c)(t)}ngOnDestroy(){this.focusTrap.destroy(),this._previouslyFocusedElement&&(this._previouslyFocusedElement.focus(),this._previouslyFocusedElement=null)}ngAfterContentInit(){this.focusTrap.attachAnchors(),this.autoCapture&&this._captureFocus()}ngDoCheck(){this.focusTrap.hasAttached()||this.focusTrap.attachAnchors()}ngOnChanges(t){const e=t.autoCapture;e&&!e.firstChange&&this.autoCapture&&this.focusTrap.hasAttached()&&this._captureFocus()}_captureFocus(){this._previouslyFocusedElement=this._document.activeElement,this.focusTrap.focusInitialElementWhenReady()}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(I),a.Qb(n.e))},t.\u0275dir=a.Lb({type:t,selectors:[["","cdkTrapFocus",""]],inputs:{enabled:["cdkTrapFocus","enabled"],autoCapture:["cdkTrapFocusAutoCapture","autoCapture"]},exportAs:["cdkTrapFocus"],features:[a.Bb]}),t})();"undefined"!=typeof Element&∈const V=new a.s("liveAnnouncerElement",{providedIn:"root",factory:function(){return null}}),R=new a.s("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let j=(()=>{class t{constructor(t,e,i,n){this._ngZone=e,this._defaultOptions=n,this._document=i,this._liveElement=t||this._createLiveElement()}announce(t,...e){const i=this._defaultOptions;let n,a;return 1===e.length&&"number"==typeof e[0]?a=e[0]:[n,a]=e,this.clear(),clearTimeout(this._previousTimeout),n||(n=i&&i.politeness?i.politeness:"polite"),null==a&&i&&(a=i.duration),this._liveElement.setAttribute("aria-live",n),this._ngZone.runOutsideAngular(()=>new Promise(e=>{clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=t,e(),"number"==typeof a&&(this._previousTimeout=setTimeout(()=>this.clear(),a))},100)}))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement&&this._liveElement.parentNode&&(this._liveElement.parentNode.removeChild(this._liveElement),this._liveElement=null)}_createLiveElement(){const t=this._document.getElementsByClassName("cdk-live-announcer-element"),e=this._document.createElement("div");for(let i=0;i<t.length;i++)t[i].parentNode.removeChild(t[i]);return e.classList.add("cdk-live-announcer-element"),e.classList.add("cdk-visually-hidden"),e.setAttribute("aria-atomic","true"),e.setAttribute("aria-live","polite"),this._document.body.appendChild(e),e}}return t.\u0275fac=function(e){return new(e||t)(a.ac(V,8),a.ac(a.C),a.ac(n.e),a.ac(R,8))},t.\u0275prov=Object(a.Mb)({factory:function(){return new t(Object(a.ac)(V,8),Object(a.ac)(a.C),Object(a.ac)(n.e),Object(a.ac)(R,8))},token:t,providedIn:"root"}),t})(),A=(()=>{class t{constructor(t,e,i,n){this._elementRef=t,this._liveAnnouncer=e,this._contentObserver=i,this._ngZone=n,this._politeness="polite"}get politeness(){return this._politeness}set politeness(t){this._politeness="off"===t||"assertive"===t?t:"polite","off"===this._politeness?this._subscription&&(this._subscription.unsubscribe(),this._subscription=null):this._subscription||(this._subscription=this._ngZone.runOutsideAngular(()=>this._contentObserver.observe(this._elementRef).subscribe(()=>{const t=this._elementRef.nativeElement.textContent;t!==this._previousAnnouncedText&&(this._liveAnnouncer.announce(t,this._politeness),this._previousAnnouncedText=t)})))}ngOnDestroy(){this._subscription&&this._subscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(j),a.Qb(m.b),a.Qb(a.C))},t.\u0275dir=a.Lb({type:t,selectors:[["","cdkAriaLive",""]],inputs:{politeness:["cdkAriaLive","politeness"]},exportAs:["cdkAriaLive"]}),t})();function W(t){return 0===t.buttons}const T=new a.s("cdk-focus-monitor-default-options"),E=Object(s.f)({passive:!0,capture:!0});let F=(()=>{class t{constructor(t,e,i,n){this._ngZone=t,this._platform=e,this._origin=null,this._windowFocused=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._documentKeydownListener=()=>{this._lastTouchTarget=null,this._setOriginForCurrentEventQueue("keyboard")},this._documentMousedownListener=t=>{if(!this._lastTouchTarget){const e=W(t)?"keyboard":"mouse";this._setOriginForCurrentEventQueue(e)}},this._documentTouchstartListener=t=>{null!=this._touchTimeoutId&&clearTimeout(this._touchTimeoutId),this._lastTouchTarget=L(t),this._touchTimeoutId=setTimeout(()=>this._lastTouchTarget=null,650)},this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=setTimeout(()=>this._windowFocused=!1)},this._rootNodeFocusAndBlurListener=t=>{const e=L(t),i="focus"===t.type?this._onFocus:this._onBlur;for(let n=e;n;n=n.parentElement)i.call(this,t,n)},this._document=i,this._detectionMode=(null==n?void 0:n.detectionMode)||0}monitor(t,e=!1){const i=Object(f.e)(t);if(!this._platform.isBrowser||1!==i.nodeType)return Object(c.a)(null);const n=Object(s.c)(i)||this._getDocument(),a=this._elementInfo.get(i);if(a)return e&&(a.checkChildren=!0),a.subject;const r={checkChildren:e,subject:new o.a,rootNode:n};return this._elementInfo.set(i,r),this._registerGlobalListeners(r),r.subject}stopMonitoring(t){const e=Object(f.e)(t),i=this._elementInfo.get(e);i&&(i.subject.complete(),this._setClasses(e),this._elementInfo.delete(e),this._removeGlobalListeners(i))}focusVia(t,e,i){const n=Object(f.e)(t);this._setOriginForCurrentEventQueue(e),"function"==typeof n.focus&&n.focus(i)}ngOnDestroy(){this._elementInfo.forEach((t,e)=>this.stopMonitoring(e))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_toggleClass(t,e,i){i?t.classList.add(e):t.classList.remove(e)}_getFocusOrigin(t){return this._origin?this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:this._wasCausedByTouch(t)?"touch":"program"}_setClasses(t,e){this._toggleClass(t,"cdk-focused",!!e),this._toggleClass(t,"cdk-touch-focused","touch"===e),this._toggleClass(t,"cdk-keyboard-focused","keyboard"===e),this._toggleClass(t,"cdk-mouse-focused","mouse"===e),this._toggleClass(t,"cdk-program-focused","program"===e)}_setOriginForCurrentEventQueue(t){this._ngZone.runOutsideAngular(()=>{this._origin=t,0===this._detectionMode&&(this._originTimeoutId=setTimeout(()=>this._origin=null,1))})}_wasCausedByTouch(t){const e=L(t);return this._lastTouchTarget instanceof Node&&e instanceof Node&&(e===this._lastTouchTarget||e.contains(this._lastTouchTarget))}_onFocus(t,e){const i=this._elementInfo.get(e);if(!i||!i.checkChildren&&e!==L(t))return;const n=this._getFocusOrigin(t);this._setClasses(e,n),this._emitOrigin(i.subject,n),this._lastFocusOrigin=n}_onBlur(t,e){const i=this._elementInfo.get(e);!i||i.checkChildren&&t.relatedTarget instanceof Node&&e.contains(t.relatedTarget)||(this._setClasses(e),this._emitOrigin(i.subject,null))}_emitOrigin(t,e){this._ngZone.run(()=>t.next(e))}_registerGlobalListeners(t){if(!this._platform.isBrowser)return;const e=t.rootNode,i=this._rootNodeFocusListenerCount.get(e)||0;i||this._ngZone.runOutsideAngular(()=>{e.addEventListener("focus",this._rootNodeFocusAndBlurListener,E),e.addEventListener("blur",this._rootNodeFocusAndBlurListener,E)}),this._rootNodeFocusListenerCount.set(e,i+1),1==++this._monitoredElementCount&&this._ngZone.runOutsideAngular(()=>{const t=this._getDocument(),e=this._getWindow();t.addEventListener("keydown",this._documentKeydownListener,E),t.addEventListener("mousedown",this._documentMousedownListener,E),t.addEventListener("touchstart",this._documentTouchstartListener,E),e.addEventListener("focus",this._windowFocusListener)})}_removeGlobalListeners(t){const e=t.rootNode;if(this._rootNodeFocusListenerCount.has(e)){const t=this._rootNodeFocusListenerCount.get(e);t>1?this._rootNodeFocusListenerCount.set(e,t-1):(e.removeEventListener("focus",this._rootNodeFocusAndBlurListener,E),e.removeEventListener("blur",this._rootNodeFocusAndBlurListener,E),this._rootNodeFocusListenerCount.delete(e))}if(!--this._monitoredElementCount){const t=this._getDocument(),e=this._getWindow();t.removeEventListener("keydown",this._documentKeydownListener,E),t.removeEventListener("mousedown",this._documentMousedownListener,E),t.removeEventListener("touchstart",this._documentTouchstartListener,E),e.removeEventListener("focus",this._windowFocusListener),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._touchTimeoutId),clearTimeout(this._originTimeoutId)}}}return t.\u0275fac=function(e){return new(e||t)(a.ac(a.C),a.ac(s.a),a.ac(n.e,8),a.ac(T,8))},t.\u0275prov=Object(a.Mb)({factory:function(){return new t(Object(a.ac)(a.C),Object(a.ac)(s.a),Object(a.ac)(n.e,8),Object(a.ac)(T,8))},token:t,providedIn:"root"}),t})();function L(t){return t.composedPath?t.composedPath()[0]:t.target}let Q=(()=>{class t{constructor(t,e){this._elementRef=t,this._focusMonitor=e,this.cdkFocusChange=new a.o}ngAfterViewInit(){const t=this._elementRef.nativeElement;this._monitorSubscription=this._focusMonitor.monitor(t,1===t.nodeType&&t.hasAttribute("cdkMonitorSubtreeFocus")).subscribe(t=>this.cdkFocusChange.emit(t))}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._monitorSubscription&&this._monitorSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(F))},t.\u0275dir=a.Lb({type:t,selectors:[["","cdkMonitorElementFocus",""],["","cdkMonitorSubtreeFocus",""]],outputs:{cdkFocusChange:"cdkFocusChange"}}),t})(),N=(()=>{class t{constructor(t,e){this._platform=t,this._document=e}getHighContrastMode(){if(!this._platform.isBrowser)return 0;const t=this._document.createElement("div");t.style.backgroundColor="rgb(1,2,3)",t.style.position="absolute",this._document.body.appendChild(t);const e=this._document.defaultView||window,i=e&&e.getComputedStyle?e.getComputedStyle(t):null,n=(i&&i.backgroundColor||"").replace(/ /g,"");switch(this._document.body.removeChild(t),n){case"rgb(0,0,0)":return 2;case"rgb(255,255,255)":return 1}return 0}_applyBodyHighContrastModeCssClasses(){if(this._platform.isBrowser&&this._document.body){const t=this._document.body.classList;t.remove("cdk-high-contrast-active"),t.remove("cdk-high-contrast-black-on-white"),t.remove("cdk-high-contrast-white-on-black");const e=this.getHighContrastMode();1===e?(t.add("cdk-high-contrast-active"),t.add("cdk-high-contrast-black-on-white")):2===e&&(t.add("cdk-high-contrast-active"),t.add("cdk-high-contrast-white-on-black"))}}}return t.\u0275fac=function(e){return new(e||t)(a.ac(s.a),a.ac(n.e))},t.\u0275prov=Object(a.Mb)({factory:function(){return new t(Object(a.ac)(s.a),Object(a.ac)(n.e))},token:t,providedIn:"root"}),t})(),z=(()=>{class t{constructor(t){t._applyBodyHighContrastModeCssClasses()}}return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)(a.ac(N))},imports:[[s.b,m.c]]}),t})()},uqn4:function(t,e,i){"use strict";i.d(e,"a",(function(){return x}));var n=i("mrSG"),a=i("XNiG"),s=i("LRne"),o=i("vkgz"),r=i("nYR2"),c=i("JIr8"),l=i("lJxs"),d=i("SIQe"),h=i("fXoL"),u=i("tk/3"),p=i("tyNb"),b=i("4zkx"),f=i("AXEc"),m=i("5cI5"),g=i("eiH7"),v=i("rH+9"),_=i("0IaG"),y=i("sYmb");let x=(()=>{class t{constructor(t,e,i,n,s,o,r,c,l){this.http=t,this.router=e,this.headerService=i,this.notify=n,this.localStorage=s,this.privilegeService=o,this.functionsService=r,this.dialog=c,this.translate=l,this.applicationName="",this.loginMessage="",this.authMode="standard",this.authUri="",this.changeKey=null,this.user={},this.noInstall=!1,this.eventAction=new a.a}catchEvent(){return this.eventAction.asObservable()}setEvent(t){return this.eventAction.next(t)}getToken(){return this.localStorage.get("MaarchCourrierToken")}getAppSession(){return this.localStorage.getAppSession()}setAppSession(t){this.localStorage.setAppSession(t)}setCachedUrl(t){this.localStorage.save("MaarchCourrierCachedUrl",t)}getCachedUrl(){return this.localStorage.get("MaarchCourrierCachedUrl")}cleanCachedUrl(){return this.localStorage.remove("MaarchCourrierCachedUrl")}getUrl(t){return this.localStorage.get("MaarchCourrierUrl_"+t)}setUrl(t){const e=t.split("/");-1===e.indexOf("resources")&&-1===e.indexOf("content")&&this.localStorage.save("MaarchCourrierUrl_"+JSON.parse(atob(this.getToken().split(".")[1])).user.id,t)}cleanUrl(t){return this.localStorage.remove("MaarchCourrierUrl_"+t)}setToken(t){this.localStorage.save("MaarchCourrierToken",t)}getRefreshToken(){return this.localStorage.get("MaarchCourrierRefreshToken")}setRefreshToken(t){this.localStorage.save("MaarchCourrierRefreshToken",t)}clearTokens(){this.localStorage.remove("MaarchCourrierToken"),this.localStorage.remove("MaarchCourrierRefreshToken")}logout(t=!0,e=!1){return Object(n.a)(this,void 0,void 0,(function*(){["cas","keycloak","azure_saml"].indexOf(this.authMode)>-1&&!e?this.SsoLogout(t):["process","signatureBook"].indexOf(this.router.url.split("/")[1])>-1?(this.router.navigate(["/home"]),setTimeout(()=>{this.redirectAfterLogout(t),this.router.navigate(["/login"])},500)):(this.redirectAfterLogout(t),yield this.router.navigate(["/login"]))}))}SsoLogout(t=!0){this.http.get("../rest/authenticate/logout").pipe(Object(o.a)(e=>Object(n.a)(this,void 0,void 0,(function*(){this.redirectAfterLogout(t),window.location.href=e.logoutUrl})))).subscribe()}redirectAfterLogout(t=!0){null!==this.getToken()&&t&&this.cleanUrl(JSON.parse(atob(this.getToken().split(".")[1])).user.id),this.headerService.setUser(),this.clearTokens()}saveTokens(t,e){this.setToken(t),this.setRefreshToken(e)}isAuth(){return void 0!==this.headerService.user.id}updateUserInfo(t){const e=this.user.picture;this.user=JSON.parse(atob(t.split(".")[1])).user,this.user.picture=e}updateUserInfoWithTokenRefresh(){this.http.get("../rest/authenticate/token",{params:{refreshToken:this.getRefreshToken()}}).subscribe({next:t=>{this.setToken(t.token),this.updateUserInfo(this.getToken())},error:t=>{this.notify.handleSoftErrors(t)}})}setUser(t){this.user=t}applyMinorUpdate(){console.debug("applyMinorUpdate"),$("body").append('<div id="updateLoading" style="position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width: 200px;text-align: center;"><img src="assets/spinner.gif"></div>'),this.http.put("../rest/versionsUpdateSQL",{}).pipe(Object(r.a)(()=>$("#updateLoading").remove()),Object(c.a)(t=>(this.notify.handleSoftErrors(t),Object(s.a)(!1)))).subscribe()}checkAppSecurity(){console.debug("checkAppSecurity"),this.changeKey&&setTimeout(()=>{this.dialog.open(d.a,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{mode:"danger",title:this.translate.instant("lang.warnPrivateKeyTitle"),msg:this.translate.instant("lang.warnPrivateKey")}})},1e3)}getLoginInformations(t){return this.noInstall?"/install"===t?Object(s.a)(!0):(this.router.navigate(["/install"]),Object(s.a)(!1)):null!==this.getAppSession()?Object(s.a)(!0):this.http.get("../rest/authenticationInformations").pipe(Object(o.a)(t=>{if(console.debug("getLoginInformations"),this.setAppSession(t.instanceId),this.localStorage.save("lang",t.lang),this.translate.use(t.lang),this.changeKey=t.changeKey,this.applicationName=t.applicationName,this.loginMessage=t.loginMessage,this.setEvent("authenticationInformations"),this.authMode=t.authMode,this.authUri=t.authUri,"keycloak"===this.authMode){const e=this.localStorage.get("keycloakState");null!==e&&"null"!==e||this.localStorage.save("keycloakState",t.keycloakState)}this.applyMinorUpdate(),this.checkAppSecurity()}),Object(c.a)(e=>(console.log(e),this.http.get("../rest/validUrl").pipe(Object(l.a)(e=>this.functionsService.empty(e.url)?"moreOneCustom"===e.lang?(this.dialog.open(d.a,{panelClass:"maarch-modal",autoFocus:!1,disableClose:!0,data:{title:this.translate.instant("lang.accessNotFound"),msg:this.translate.instant("lang.moreOneCustom"),hideButton:!0}}),!1):"noConfiguration"===e.lang?(this.noInstall=!0,"/install"===t||(console.log(this.router.url,"navigate to install"),this.router.navigate(["/install"]),!1)):void 0:(window.location.href=e.url,!1))))))}getCurrentUserInfo(){return this.isAuth()?Object(s.a)(!0):this.http.get("../rest/currentUser/profile").pipe(Object(o.a)(t=>{console.debug("getCurrentUserInfo"),this.headerService.user={mode:t.mode,id:t.id,status:t.status,userId:t.user_id,firstname:t.firstname,lastname:t.lastname,entities:t.entities,groups:t.groups,preferences:t.preferences,privileges:"ALL_PRIVILEGES"===t.privileges[0]?this.privilegeService.getAllPrivileges(!t.lockAdvancedPrivileges,this.authMode):t.privileges,featureTour:t.featureTour},this.headerService.nbResourcesFollowed=t.nbFollowedResources,this.privilegeService.resfreshUserShortcuts()}))}}return t.\u0275fac=function(e){return new(e||t)(h.ac(u.b),h.ac(p.c),h.ac(b.a),h.ac(f.a),h.ac(m.a),h.ac(g.a),h.ac(v.a),h.ac(_.b),h.ac(y.e))},t.\u0275prov=h.Mb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()},vWc3:function(t,e,i){"use strict";i.d(e,"a",(function(){return et}));var n=i("ofXK"),a=i("3Pt+"),s=i("tyNb"),o=i("5+WD"),r=i("aEDk"),c=i("fXoL");let l=(()=>{class t{constructor(t,e){this.document=t,this.platformId=e,this.documentIsAccessible=Object(n.I)(this.platformId)}check(t){return!!this.documentIsAccessible&&(t=encodeURIComponent(t),this.getCookieRegExp(t).test(this.document.cookie))}get(t){if(this.documentIsAccessible&&this.check(t)){t=encodeURIComponent(t);const e=this.getCookieRegExp(t).exec(this.document.cookie);return this.safeDecodeURIComponent(e[1])}return""}getAll(){if(!this.documentIsAccessible)return{};const t={},e=this.document;return e.cookie&&""!==e.cookie&&e.cookie.split(";").forEach(e=>{const[i,n]=e.split("=");t[this.safeDecodeURIComponent(i.replace(/^ /,""))]=this.safeDecodeURIComponent(n)}),t}set(t,e,i,n,a,s,o="Lax"){if(!this.documentIsAccessible)return;let r=encodeURIComponent(t)+"="+encodeURIComponent(e)+";";i&&(r+="number"==typeof i?"expires="+new Date((new Date).getTime()+1e3*i*60*60*24).toUTCString()+";":"expires="+i.toUTCString()+";"),n&&(r+="path="+n+";"),a&&(r+="domain="+a+";"),!1===s&&"None"===o&&(s=!0,console.warn(`[ngx-cookie-service] Cookie ${t} was forced with secure flag because sameSite=None.More details : https://github.com/stevermeister/ngx-cookie-service/issues/86#issuecomment-597720130`)),s&&(r+="secure;"),r+="sameSite="+o+";",this.document.cookie=r}delete(t,e,i,n,a="Lax"){this.documentIsAccessible&&this.set(t,"",new Date("Thu, 01 Jan 1970 00:00:01 GMT"),e,i,n,a)}deleteAll(t,e,i,n="Lax"){if(!this.documentIsAccessible)return;const a=this.getAll();for(const s in a)a.hasOwnProperty(s)&&this.delete(s,t,e,i,n)}getCookieRegExp(t){const e=t.replace(/([\[\]\{\}\(\)\|\=\;\+\?\,\.\*\^\$])/gi,"\\$1");return new RegExp("(?:^"+e+"|;\\s*"+e+")=(.*?)(?:;|$)","g")}safeDecodeURIComponent(t){try{return decodeURIComponent(t)}catch(e){return t}}}return t.\u0275fac=function(e){return new(e||t)(c.ac(n.e),c.ac(c.F))},t.\u0275prov=Object(c.Mb)({factory:function(){return new t(Object(c.ac)(n.e),Object(c.ac)(c.F))},token:t,providedIn:"root"}),t})(),d=(()=>{class t{}return t.\u0275mod=c.Ob({type:t}),t.\u0275inj=c.Nb({factory:function(e){return new(e||t)},providers:[r.c,l],imports:[[r.j],r.j]}),t})();var h=i("FKr1"),u=i("lJEt"),p=i("/1cH"),b=i("TU8p"),f=i("2ChS"),m=i("bTqV"),g=i("jaxi"),v=i("Wp6s"),_=i("bSwM"),y=i("A5z7"),x=i("iadO"),C=i("0IaG"),O=i("7EHt"),D=i("zkoq"),w=i("NFeN"),M=i("qFsG"),k=i("MutI"),S=i("STbY"),I=i("M9IT"),P=i("bv9b"),V=i("Xa2L"),R=i("QibW"),j=i("d3UM"),A=i("XhcP"),W=i("1jcm"),T=i("5RNC"),E=i("dNgK"),F=i("Dh3D"),L=i("xHqg"),Q=i("+0xr"),N=i("wZkO"),z=i("/t3+"),B=i("Qu3c"),U=i("vxfF"),$=i("8yBR"),H=i("sYmb");let G=(()=>{class t extends I.b{constructor(t){super(),this.translate=t,this.getRangeLabel=(t,e,i)=>{if(0===i||0===e)return"0 / "+i;i=Math.max(i,0);const n=Math.ceil(i/e);return`${this.translate.instant("lang.page")} ${t+1} / ${n}`},this.getAndInitTranslations()}getAndInitTranslations(){this.itemsPerPageLabel="",this.nextPageLabel=this.translate.instant("lang.nextPage"),this.previousPageLabel=this.translate.instant("lang.prevPage"),this.changes.next()}}return t.\u0275fac=function(e){return new(e||t)(c.ac(H.e))},t.\u0275prov=c.Mb({token:t,factory:t.\u0275fac}),t})(),X=(()=>{class t extends h.w{parse(t){if("string"==typeof t&&t.indexOf("/")>-1){const e=t.split("/"),i=Number(e[2]),n=Number(e[1])-1,a=Number(e[0]);return new Date(i,n,a)}const e="number"==typeof t?t:Date.parse(t);return isNaN(e)?null:new Date(e)}format(t,e){if("input"===e){const e=t.getDate(),i=t.getMonth()+1,n=t.getFullYear();return this._to2digit(e)+"/"+this._to2digit(i)+"/"+n}return t.toLocaleDateString(this.locale,{weekday:"short",year:"numeric",month:"short",day:"numeric"})}_to2digit(t){return("00"+t).slice(-2)}getFirstDayOfWeek(){return 1}}return t.\u0275fac=function(e){return q(e||t)},t.\u0275prov=c.Mb({token:t,factory:t.\u0275fac}),t})();const q=c.Yb(X),K={parse:{dateInput:{month:"short",year:"numeric",day:"numeric"}},display:{dateInput:"input",monthYearLabel:{month:"short",year:"numeric",day:"numeric"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"}}};let Y=(()=>{class t{}return t.\u0275mod=c.Ob({type:t}),t.\u0275inj=c.Nb({factory:function(e){return new(e||t)},providers:[{provide:I.b,useClass:G},{provide:h.f,useValue:"FR-fr"},{provide:h.c,useClass:X},{provide:h.e,useValue:K}],imports:[[_.b,j.b,W.b,M.c,B.c,N.g,A.g,m.c,v.j,g.c,V.b,P.b,z.b,S.c,D.c,Q.q,I.c,F.c,x.i,h.n,O.b,p.b,E.d,w.b,C.g,k.e,y.g,L.g,R.c,T.b,b.b,f.b,$.e,h.v,U.g,u.a.forRoot()],_.b,j.b,W.b,M.c,B.c,N.g,A.g,m.c,v.j,g.c,V.b,P.b,z.b,S.c,D.c,Q.q,I.c,F.c,x.i,h.n,O.b,p.b,E.d,w.b,C.g,k.e,y.g,L.g,R.c,T.b,b.b,f.b,h.v,$.e,U.g,u.a]}),t})();var J=i("AXEc");let Z=(()=>{class t{}return t.\u0275mod=c.Ob({type:t}),t.\u0275inj=c.Nb({factory:function(e){return new(e||t)},providers:[J.a],imports:[[Y,n.c]]}),t})();var tt=i("cMWS");let et=(()=>{class t{constructor(t){t.setDefaultLang("fr")}}return t.\u0275mod=c.Ob({type:t}),t.\u0275inj=c.Nb({factory:function(e){return new(e||t)(c.ac(H.e))},providers:[],imports:[[n.c,s.g,a.o,a.E,Y,o.g,d,Z,tt.a],n.c,a.o,a.E,s.g,Y,d,Z,o.g]}),t})()},vkgz:function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var n=i("7o/Q");function a(){}var s=i("n6bG");function o(t,e,i){return function(n){return n.lift(new r(t,e,i))}}class r{constructor(t,e,i){this.nextOrObserver=t,this.error=e,this.complete=i}call(t,e){return e.subscribe(new c(t,this.nextOrObserver,this.error,this.complete))}}class c extends n.a{constructor(t,e,i,n){super(t),this._tapNext=a,this._tapError=a,this._tapComplete=a,this._tapError=i||a,this._tapComplete=n||a,Object(s.a)(e)?(this._context=this,this._tapNext=e):e&&(this._context=e,this._tapNext=e.next||a,this._tapError=e.error||a,this._tapComplete=e.complete||a)}_next(t){try{this._tapNext.call(this._context,t)}catch(e){return void this.destination.error(e)}this.destination.next(t)}_error(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)}_complete(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()}}},vxfF:function(t,e,i){"use strict";i.d(e,"a",(function(){return R})),i.d(e,"b",(function(){return A})),i.d(e,"c",(function(){return Q})),i.d(e,"d",(function(){return L})),i.d(e,"e",(function(){return E})),i.d(e,"f",(function(){return j})),i.d(e,"g",(function(){return N})),i.d(e,"h",(function(){return W}));var n=i("8LU1"),a=i("fXoL"),s=i("XNiG"),o=i("LRne"),r=i("HDdC"),c=i("xgIS"),l=i("eNwd"),d=i("7Hc7"),h=i("quSY"),u=i("7+OI"),p=i("/uUt"),b=i("3UWI"),f=i("pLZG"),m=i("1G5W"),g=i("JX91"),v=i("7o/Q");class _{call(t,e){return e.subscribe(new y(t))}}class y extends v.a{constructor(t){super(t),this.hasPrev=!1}_next(t){let e;this.hasPrev?e=[this.prev,t]:this.hasPrev=!0,this.prev=t,e&&this.destination.next(e)}}var x=i("eIep"),C=i("UXun"),O=i("nLfN"),D=i("ofXK"),w=i("cH1L"),M=i("0EQZ");const k=["contentWrapper"],S=["*"],I=new a.s("VIRTUAL_SCROLL_STRATEGY");class P{constructor(t,e,i){this._scrolledIndexChange=new s.a,this.scrolledIndexChange=this._scrolledIndexChange.pipe(Object(p.a)()),this._viewport=null,this._itemSize=t,this._minBufferPx=e,this._maxBufferPx=i}attach(t){this._viewport=t,this._updateTotalContentSize(),this._updateRenderedRange()}detach(){this._scrolledIndexChange.complete(),this._viewport=null}updateItemAndBufferSize(t,e,i){this._itemSize=t,this._minBufferPx=e,this._maxBufferPx=i,this._updateTotalContentSize(),this._updateRenderedRange()}onContentScrolled(){this._updateRenderedRange()}onDataLengthChanged(){this._updateTotalContentSize(),this._updateRenderedRange()}onContentRendered(){}onRenderedOffsetChanged(){}scrollToIndex(t,e){this._viewport&&this._viewport.scrollToOffset(t*this._itemSize,e)}_updateTotalContentSize(){this._viewport&&this._viewport.setTotalContentSize(this._viewport.getDataLength()*this._itemSize)}_updateRenderedRange(){if(!this._viewport)return;const t=this._viewport.getRenderedRange(),e={start:t.start,end:t.end},i=this._viewport.getViewportSize(),n=this._viewport.getDataLength();let a=this._viewport.measureScrollOffset(),s=a/this._itemSize;if(e.end>n){const t=Math.ceil(i/this._itemSize),o=Math.max(0,Math.min(s,n-t));s!=o&&(s=o,a=o*this._itemSize,e.start=Math.floor(s)),e.end=Math.max(0,Math.min(n,e.start+t))}const o=a-e.start*this._itemSize;if(o<this._minBufferPx&&0!=e.start){const t=Math.ceil((this._maxBufferPx-o)/this._itemSize);e.start=Math.max(0,e.start-t),e.end=Math.min(n,Math.ceil(s+(i+this._minBufferPx)/this._itemSize))}else{const t=e.end*this._itemSize-(a+i);if(t<this._minBufferPx&&e.end!=n){const i=Math.ceil((this._maxBufferPx-t)/this._itemSize);i>0&&(e.end=Math.min(n,e.end+i),e.start=Math.max(0,Math.floor(s-this._minBufferPx/this._itemSize)))}}this._viewport.setRenderedRange(e),this._viewport.setRenderedContentOffset(this._itemSize*e.start),this._scrolledIndexChange.next(Math.floor(s))}}function V(t){return t._scrollStrategy}let R=(()=>{class t{constructor(){this._itemSize=20,this._minBufferPx=100,this._maxBufferPx=200,this._scrollStrategy=new P(this.itemSize,this.minBufferPx,this.maxBufferPx)}get itemSize(){return this._itemSize}set itemSize(t){this._itemSize=Object(n.f)(t)}get minBufferPx(){return this._minBufferPx}set minBufferPx(t){this._minBufferPx=Object(n.f)(t)}get maxBufferPx(){return this._maxBufferPx}set maxBufferPx(t){this._maxBufferPx=Object(n.f)(t)}ngOnChanges(){this._scrollStrategy.updateItemAndBufferSize(this.itemSize,this.minBufferPx,this.maxBufferPx)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=a.Lb({type:t,selectors:[["cdk-virtual-scroll-viewport","itemSize",""]],inputs:{itemSize:"itemSize",minBufferPx:"minBufferPx",maxBufferPx:"maxBufferPx"},features:[a.Cb([{provide:I,useFactory:V,deps:[Object(a.X)(()=>t)]}]),a.Bb]}),t})(),j=(()=>{class t{constructor(t,e,i){this._ngZone=t,this._platform=e,this._scrolled=new s.a,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=i}register(t){this.scrollContainers.has(t)||this.scrollContainers.set(t,t.elementScrolled().subscribe(()=>this._scrolled.next(t)))}deregister(t){const e=this.scrollContainers.get(t);e&&(e.unsubscribe(),this.scrollContainers.delete(t))}scrolled(t=20){return this._platform.isBrowser?new r.a(e=>{this._globalSubscription||this._addGlobalListener();const i=t>0?this._scrolled.pipe(Object(b.a)(t)).subscribe(e):this._scrolled.subscribe(e);return this._scrolledCount++,()=>{i.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):Object(o.a)()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((t,e)=>this.deregister(e)),this._scrolled.complete()}ancestorScrolled(t,e){const i=this.getAncestorScrollContainers(t);return this.scrolled(e).pipe(Object(f.a)(t=>!t||i.indexOf(t)>-1))}getAncestorScrollContainers(t){const e=[];return this.scrollContainers.forEach((i,n)=>{this._scrollableContainsElement(n,t)&&e.push(n)}),e}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_scrollableContainsElement(t,e){let i=e.nativeElement,n=t.getElementRef().nativeElement;do{if(i==n)return!0}while(i=i.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>{const t=this._getWindow();return Object(c.a)(t.document,"scroll").subscribe(()=>this._scrolled.next())})}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}return t.\u0275fac=function(e){return new(e||t)(a.ac(a.C),a.ac(O.a),a.ac(D.e,8))},t.\u0275prov=Object(a.Mb)({factory:function(){return new t(Object(a.ac)(a.C),Object(a.ac)(O.a),Object(a.ac)(D.e,8))},token:t,providedIn:"root"}),t})(),A=(()=>{class t{constructor(t,e,i,n){this.elementRef=t,this.scrollDispatcher=e,this.ngZone=i,this.dir=n,this._destroyed=new s.a,this._elementScrolled=new r.a(t=>this.ngZone.runOutsideAngular(()=>Object(c.a)(this.elementRef.nativeElement,"scroll").pipe(Object(m.a)(this._destroyed)).subscribe(t)))}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(t){const e=this.elementRef.nativeElement,i=this.dir&&"rtl"==this.dir.value;null==t.left&&(t.left=i?t.end:t.start),null==t.right&&(t.right=i?t.start:t.end),null!=t.bottom&&(t.top=e.scrollHeight-e.clientHeight-t.bottom),i&&0!=Object(O.d)()?(null!=t.left&&(t.right=e.scrollWidth-e.clientWidth-t.left),2==Object(O.d)()?t.left=t.right:1==Object(O.d)()&&(t.left=t.right?-t.right:t.right)):null!=t.right&&(t.left=e.scrollWidth-e.clientWidth-t.right),this._applyScrollToOptions(t)}_applyScrollToOptions(t){const e=this.elementRef.nativeElement;Object(O.g)()?e.scrollTo(t):(null!=t.top&&(e.scrollTop=t.top),null!=t.left&&(e.scrollLeft=t.left))}measureScrollOffset(t){const e=this.elementRef.nativeElement;if("top"==t)return e.scrollTop;if("bottom"==t)return e.scrollHeight-e.clientHeight-e.scrollTop;const i=this.dir&&"rtl"==this.dir.value;return"start"==t?t=i?"right":"left":"end"==t&&(t=i?"left":"right"),i&&2==Object(O.d)()?"left"==t?e.scrollWidth-e.clientWidth-e.scrollLeft:e.scrollLeft:i&&1==Object(O.d)()?"left"==t?e.scrollLeft+e.scrollWidth-e.clientWidth:-e.scrollLeft:"left"==t?e.scrollLeft:e.scrollWidth-e.clientWidth-e.scrollLeft}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(j),a.Qb(a.C),a.Qb(w.c,8))},t.\u0275dir=a.Lb({type:t,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]}),t})(),W=(()=>{class t{constructor(t,e,i){this._platform=t,this._change=new s.a,this._changeListener=t=>{this._change.next(t)},this._document=i,e.runOutsideAngular(()=>{if(t.isBrowser){const t=this._getWindow();t.addEventListener("resize",this._changeListener),t.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._updateViewportSize())})}ngOnDestroy(){if(this._platform.isBrowser){const t=this._getWindow();t.removeEventListener("resize",this._changeListener),t.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}getViewportRect(){const t=this.getViewportScrollPosition(),{width:e,height:i}=this.getViewportSize();return{top:t.top,left:t.left,bottom:t.top+i,right:t.left+e,height:i,width:e}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const t=this._getDocument(),e=this._getWindow(),i=t.documentElement,n=i.getBoundingClientRect();return{top:-n.top||t.body.scrollTop||e.scrollY||i.scrollTop||0,left:-n.left||t.body.scrollLeft||e.scrollX||i.scrollLeft||0}}change(t=20){return t>0?this._change.pipe(Object(b.a)(t)):this._change}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_updateViewportSize(){const t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}}return t.\u0275fac=function(e){return new(e||t)(a.ac(O.a),a.ac(a.C),a.ac(D.e,8))},t.\u0275prov=Object(a.Mb)({factory:function(){return new t(Object(a.ac)(O.a),Object(a.ac)(a.C),Object(a.ac)(D.e,8))},token:t,providedIn:"root"}),t})();const T="undefined"!=typeof requestAnimationFrame?l.a:d.a;let E=(()=>{class t extends A{constructor(t,e,i,n,a,o,c){super(t,o,i,a),this.elementRef=t,this._changeDetectorRef=e,this._scrollStrategy=n,this._detachedSubject=new s.a,this._renderedRangeSubject=new s.a,this._orientation="vertical",this.scrolledIndexChange=new r.a(t=>this._scrollStrategy.scrolledIndexChange.subscribe(e=>Promise.resolve().then(()=>this.ngZone.run(()=>t.next(e))))),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=h.a.EMPTY,c&&(this._viewportChanges=c.change().subscribe(()=>{this.checkViewportSize()}))}get orientation(){return this._orientation}set orientation(t){this._orientation!==t&&(this._orientation=t,this._calculateSpacerSize())}ngOnInit(){super.ngOnInit(),this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._measureViewportSize(),this._scrollStrategy.attach(this),this.elementScrolled().pipe(Object(g.a)(null),Object(b.a)(0,T)).subscribe(()=>this._scrollStrategy.onContentScrolled()),this._markChangeDetectionNeeded()}))}ngOnDestroy(){this.detach(),this._scrollStrategy.detach(),this._renderedRangeSubject.complete(),this._detachedSubject.complete(),this._viewportChanges.unsubscribe(),super.ngOnDestroy()}attach(t){this.ngZone.runOutsideAngular(()=>{this._forOf=t,this._forOf.dataStream.pipe(Object(m.a)(this._detachedSubject)).subscribe(t=>{const e=t.length;e!==this._dataLength&&(this._dataLength=e,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(t){this._totalContentSize!==t&&(this._totalContentSize=t,this._calculateSpacerSize(),this._markChangeDetectionNeeded())}setRenderedRange(t){var e,i;((e=this._renderedRange).start!=(i=t).start||e.end!=i.end)&&(this._renderedRangeSubject.next(this._renderedRange=t),this._markChangeDetectionNeeded(()=>this._scrollStrategy.onContentRendered()))}getOffsetToRenderedContentStart(){return this._renderedContentOffsetNeedsRewrite?null:this._renderedContentOffset}setRenderedContentOffset(t,e="to-start"){const i="horizontal"==this.orientation,n=i?"X":"Y";let a=`translate${n}(${Number((i&&this.dir&&"rtl"==this.dir.value?-1:1)*t)}px)`;this._renderedContentOffset=t,"to-end"===e&&(a+=` translate${n}(-100%)`,this._renderedContentOffsetNeedsRewrite=!0),this._renderedContentTransform!=a&&(this._renderedContentTransform=a,this._markChangeDetectionNeeded(()=>{this._renderedContentOffsetNeedsRewrite?(this._renderedContentOffset-=this.measureRenderedContentSize(),this._renderedContentOffsetNeedsRewrite=!1,this.setRenderedContentOffset(this._renderedContentOffset)):this._scrollStrategy.onRenderedOffsetChanged()}))}scrollToOffset(t,e="auto"){const i={behavior:e};"horizontal"===this.orientation?i.start=t:i.top=t,this.scrollTo(i)}scrollToIndex(t,e="auto"){this._scrollStrategy.scrollToIndex(t,e)}measureScrollOffset(t){return super.measureScrollOffset(t||("horizontal"===this.orientation?"start":"top"))}measureRenderedContentSize(){const t=this._contentWrapper.nativeElement;return"horizontal"===this.orientation?t.offsetWidth:t.offsetHeight}measureRangeSize(t){return this._forOf?this._forOf.measureRangeSize(t,this.orientation):0}checkViewportSize(){this._measureViewportSize(),this._scrollStrategy.onDataLengthChanged()}_measureViewportSize(){const t=this.elementRef.nativeElement;this._viewportSize="horizontal"===this.orientation?t.clientWidth:t.clientHeight}_markChangeDetectionNeeded(t){t&&this._runAfterChangeDetection.push(t),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 t=this._runAfterChangeDetection;this._runAfterChangeDetection=[];for(const e of t)e()}_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)(a.Qb(a.l),a.Qb(a.h),a.Qb(a.C),a.Qb(I,8),a.Qb(w.c,8),a.Qb(j),a.Qb(W))},t.\u0275cmp=a.Kb({type:t,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(t,e){var i;1&t&&a.Kc(k,!0),2&t&&a.yc(i=a.ec())&&(e._contentWrapper=i.first)},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(t,e){2&t&&a.Ib("cdk-virtual-scroll-orientation-horizontal","horizontal"===e.orientation)("cdk-virtual-scroll-orientation-vertical","horizontal"!==e.orientation)},inputs:{orientation:"orientation"},outputs:{scrolledIndexChange:"scrolledIndexChange"},features:[a.Cb([{provide:A,useExisting:t}]),a.Ab],ngContentSelectors:S,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(t,e){1&t&&(a.nc(),a.Wb(0,"div",0,1),a.mc(2),a.Vb(),a.Rb(3,"div",2)),2&t&&(a.Db(3),a.Lc("width",e._totalContentWidth)("height",e._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 F(t,e,i){if(!i.getBoundingClientRect)return 0;const n=i.getBoundingClientRect();return"horizontal"===t?"start"===e?n.left:n.right:"start"===e?n.top:n.bottom}let L=(()=>{class t{constructor(t,e,i,n,a,o){this._viewContainerRef=t,this._template=e,this._differs=i,this._viewRepeater=n,this._viewport=a,this.viewChange=new s.a,this._dataSourceChanges=new s.a,this.dataStream=this._dataSourceChanges.pipe(Object(g.a)(null),t=>t.lift(new _),Object(x.a)(([t,e])=>this._changeDataSource(t,e)),Object(C.a)(1)),this._differ=null,this._needsUpdate=!1,this._destroyed=new s.a,this.dataStream.subscribe(t=>{this._data=t,this._onRenderedDataChange()}),this._viewport.renderedRangeStream.pipe(Object(m.a)(this._destroyed)).subscribe(t=>{this._renderedRange=t,o.run(()=>this.viewChange.next(this._renderedRange)),this._onRenderedDataChange()}),this._viewport.attach(this)}get cdkVirtualForOf(){return this._cdkVirtualForOf}set cdkVirtualForOf(t){this._cdkVirtualForOf=t,Object(M.h)(t)?this._dataSourceChanges.next(t):this._dataSourceChanges.next(new M.a(Object(u.a)(t)?t:Array.from(t||[])))}get cdkVirtualForTrackBy(){return this._cdkVirtualForTrackBy}set cdkVirtualForTrackBy(t){this._needsUpdate=!0,this._cdkVirtualForTrackBy=t?(e,i)=>t(e+(this._renderedRange?this._renderedRange.start:0),i):void 0}set cdkVirtualForTemplate(t){t&&(this._needsUpdate=!0,this._template=t)}get cdkVirtualForTemplateCacheSize(){return this._viewRepeater.viewCacheSize}set cdkVirtualForTemplateCacheSize(t){this._viewRepeater.viewCacheSize=Object(n.f)(t)}measureRangeSize(t,e){if(t.start>=t.end)return 0;const i=t.start-this._renderedRange.start,n=t.end-t.start;let a,s;for(let o=0;o<n;o++){const t=this._viewContainerRef.get(o+i);if(t&&t.rootNodes.length){a=s=t.rootNodes[0];break}}for(let o=n-1;o>-1;o--){const t=this._viewContainerRef.get(o+i);if(t&&t.rootNodes.length){s=t.rootNodes[t.rootNodes.length-1];break}}return a&&s?F(e,"end",s)-F(e,"start",a):0}ngDoCheck(){if(this._differ&&this._needsUpdate){const t=this._differ.diff(this._renderedItems);t?this._applyChanges(t):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(this.cdkVirtualForTrackBy)),this._needsUpdate=!0)}_changeDataSource(t,e){return t&&t.disconnect(this),this._needsUpdate=!0,e?e.connect(this):Object(o.a)()}_updateContext(){const t=this._data.length;let e=this._viewContainerRef.length;for(;e--;){let i=this._viewContainerRef.get(e);i.context.index=this._renderedRange.start+e,i.context.count=t,this._updateComputedContextProperties(i.context),i.detectChanges()}}_applyChanges(t){this._viewRepeater.applyChanges(t,this._viewContainerRef,(t,e,i)=>this._getEmbeddedViewArgs(t,i),t=>t.item),t.forEachIdentityChange(t=>{this._viewContainerRef.get(t.currentIndex).context.$implicit=t.item});const e=this._data.length;let i=this._viewContainerRef.length;for(;i--;){const t=this._viewContainerRef.get(i);t.context.index=this._renderedRange.start+i,t.context.count=e,this._updateComputedContextProperties(t.context)}}_updateComputedContextProperties(t){t.first=0===t.index,t.last=t.index===t.count-1,t.even=t.index%2==0,t.odd=!t.even}_getEmbeddedViewArgs(t,e){return{templateRef:this._template,context:{$implicit:t.item,cdkVirtualForOf:this._cdkVirtualForOf,index:-1,count:-1,first:!1,last:!1,odd:!1,even:!1},index:e}}}return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.T),a.Qb(a.P),a.Qb(a.v),a.Qb(M.g),a.Qb(E,4),a.Qb(a.C))},t.\u0275dir=a.Lb({type:t,selectors:[["","cdkVirtualFor","","cdkVirtualForOf",""]],inputs:{cdkVirtualForOf:"cdkVirtualForOf",cdkVirtualForTrackBy:"cdkVirtualForTrackBy",cdkVirtualForTemplate:"cdkVirtualForTemplate",cdkVirtualForTemplateCacheSize:"cdkVirtualForTemplateCacheSize"},features:[a.Cb([{provide:M.g,useClass:M.f}])]}),t})(),Q=(()=>{class t{}return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)}}),t})(),N=(()=>{class t{}return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)},imports:[[w.a,O.b,Q],w.a,Q]}),t})()},w1tV:function(t,e,i){"use strict";i.d(e,"a",(function(){return b}));var n=i("XNiG"),a=i("HDdC"),s=i("7o/Q"),o=i("quSY");function r(){return function(t){return t.lift(new c(t))}}class c{constructor(t){this.connectable=t}call(t,e){const{connectable:i}=this;i._refCount++;const n=new l(t,i),a=e.subscribe(n);return n.closed||(n.connection=i.connect()),a}}class l extends s.a{constructor(t,e){super(t),this.connectable=e}_unsubscribe(){const{connectable:t}=this;if(!t)return void(this.connection=null);this.connectable=null;const e=t._refCount;if(e<=0)return void(this.connection=null);if(t._refCount=e-1,e>1)return void(this.connection=null);const{connection:i}=this,n=t._connection;this.connection=null,!n||i&&n!==i||n.unsubscribe()}}class d extends a.a{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._refCount=0,this._isComplete=!1}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){const t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject}connect(){let t=this._connection;return t||(this._isComplete=!1,t=this._connection=new o.a,t.add(this.source.subscribe(new u(this.getSubject(),this))),t.closed&&(this._connection=null,t=o.a.EMPTY)),t}refCount(){return r()(this)}}const h=(()=>{const t=d.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 u extends n.b{constructor(t,e){super(t),this.connectable=e}_error(t){this._unsubscribe(),super._error(t)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const t=this.connectable;if(t){this.connectable=null;const e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}}}function p(){return new n.a}function b(){return t=>{return r()((e=p,function(t){let i;i="function"==typeof e?e:function(){return e};const n=Object.create(t,h);return n.source=t,n.subjectFactory=i,n})(t));var e}}},wZkO:function(t,e,i){"use strict";i.d(e,"a",(function(){return J})),i.d(e,"b",(function(){return $})),i.d(e,"c",(function(){return lt})),i.d(e,"d",(function(){return G})),i.d(e,"e",(function(){return Ct})),i.d(e,"f",(function(){return vt})),i.d(e,"g",(function(){return Ot}));var n=i("u47x"),a=i("GU7r"),s=i("+rOU"),o=i("ofXK"),r=i("fXoL"),c=i("FKr1"),l=i("R1ws"),d=i("XNiG"),h=i("quSY"),u=i("VRyK"),p=i("xgIS"),b=i("LRne"),f=i("PqYM"),m=i("R0Ic"),g=i("JX91"),v=i("/uUt"),_=i("1G5W"),y=i("8LU1"),x=i("nLfN"),C=i("FtGj"),O=i("cH1L"),D=i("vxfF");function w(t,e){1&t&&r.mc(0)}const M=["*"];function k(t,e){}const S=function(t){return{animationDuration:t}},I=function(t,e){return{value:t,params:e}},P=["tabBodyWrapper"],V=["tabHeader"];function R(t,e){}function j(t,e){if(1&t&&r.Oc(0,R,0,0,"ng-template",9),2&t){const t=r.hc().$implicit;r.oc("cdkPortalOutlet",t.templateLabel)}}function A(t,e){if(1&t&&r.Qc(0),2&t){const t=r.hc().$implicit;r.Rc(t.textLabel)}}function W(t,e){if(1&t){const t=r.Xb();r.Wb(0,"div",6),r.dc("click",(function(){r.Dc(t);const i=e.$implicit,n=e.index,a=r.hc(),s=r.zc(1);return a._handleClick(i,s,n)})),r.Wb(1,"div",7),r.Oc(2,j,1,1,"ng-template",8),r.Oc(3,A,1,1,"ng-template",8),r.Vb(),r.Vb()}if(2&t){const t=e.$implicit,i=e.index,n=r.hc();r.Ib("mat-tab-label-active",n.selectedIndex==i),r.oc("id",n._getTabLabelId(i))("disabled",t.disabled)("matRippleDisabled",t.disabled||n.disableRipple),r.Eb("tabIndex",n._getTabIndex(t,i))("aria-posinset",i+1)("aria-setsize",n._tabs.length)("aria-controls",n._getTabContentId(i))("aria-selected",n.selectedIndex==i)("aria-label",t.ariaLabel||null)("aria-labelledby",!t.ariaLabel&&t.ariaLabelledby?t.ariaLabelledby:null),r.Db(2),r.oc("ngIf",t.templateLabel),r.Db(1),r.oc("ngIf",!t.templateLabel)}}function T(t,e){if(1&t){const t=r.Xb();r.Wb(0,"mat-tab-body",10),r.dc("_onCentered",(function(){return r.Dc(t),r.hc()._removeTabBodyWrapperHeight()}))("_onCentering",(function(e){return r.Dc(t),r.hc()._setTabBodyWrapperHeight(e)})),r.Vb()}if(2&t){const t=e.$implicit,i=e.index,n=r.hc();r.Ib("mat-tab-body-active",n.selectedIndex==i),r.oc("id",n._getTabContentId(i))("content",t.content)("position",t.position)("origin",t.origin)("animationDuration",n.animationDuration),r.Eb("aria-labelledby",n._getTabLabelId(i))}}const E=["tabListContainer"],F=["tabList"],L=["nextPaginator"],Q=["previousPaginator"],N=["mat-tab-nav-bar",""],z=new r.s("MatInkBarPositioner",{providedIn:"root",factory:function(){return t=>({left:t?(t.offsetLeft||0)+"px":"0",width:t?(t.offsetWidth||0)+"px":"0"})}});let B=(()=>{class t{constructor(t,e,i,n){this._elementRef=t,this._ngZone=e,this._inkBarPositioner=i,this._animationMode=n}alignToElement(t){this.show(),"undefined"!=typeof requestAnimationFrame?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>this._setStyles(t))}):this._setStyles(t)}show(){this._elementRef.nativeElement.style.visibility="visible"}hide(){this._elementRef.nativeElement.style.visibility="hidden"}_setStyles(t){const e=this._inkBarPositioner(t),i=this._elementRef.nativeElement;i.style.left=e.left,i.style.width=e.width}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l),r.Qb(r.C),r.Qb(z),r.Qb(l.a,8))},t.\u0275dir=r.Lb({type:t,selectors:[["mat-ink-bar"]],hostAttrs:[1,"mat-ink-bar"],hostVars:2,hostBindings:function(t,e){2&t&&r.Ib("_mat-animation-noopable","NoopAnimations"===e._animationMode)}}),t})();const U=new r.s("MatTabContent");let $=(()=>{class t{constructor(t){this.template=t}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.P))},t.\u0275dir=r.Lb({type:t,selectors:[["","matTabContent",""]],features:[r.Cb([{provide:U,useExisting:t}])]}),t})();const H=new r.s("MatTabLabel");let G=(()=>{class t extends s.b{}return t.\u0275fac=function(e){return X(e||t)},t.\u0275dir=r.Lb({type:t,selectors:[["","mat-tab-label",""],["","matTabLabel",""]],features:[r.Cb([{provide:H,useExisting:t}]),r.Ab]}),t})();const X=r.Yb(G);class q{}const K=Object(c.C)(q),Y=new r.s("MAT_TAB_GROUP");let J=(()=>{class t extends K{constructor(t,e){super(),this._viewContainerRef=t,this._closestTabGroup=e,this.textLabel="",this._contentPortal=null,this._stateChanges=new d.a,this.position=null,this.origin=null,this.isActive=!1}get templateLabel(){return this._templateLabel}set templateLabel(t){this._setTemplateLabelInput(t)}get content(){return this._contentPortal}ngOnChanges(t){(t.hasOwnProperty("textLabel")||t.hasOwnProperty("disabled"))&&this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}ngOnInit(){this._contentPortal=new s.i(this._explicitContent||this._implicitContent,this._viewContainerRef)}_setTemplateLabelInput(t){t&&(this._templateLabel=t)}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.T),r.Qb(Y,8))},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-tab"]],contentQueries:function(t,e,i){var n;1&t&&(r.Jb(i,H,!0),r.Jc(i,U,!0,r.P)),2&t&&(r.yc(n=r.ec())&&(e.templateLabel=n.first),r.yc(n=r.ec())&&(e._explicitContent=n.first))},viewQuery:function(t,e){var i;1&t&&r.Kc(r.P,!0),2&t&&r.yc(i=r.ec())&&(e._implicitContent=i.first)},inputs:{disabled:"disabled",textLabel:["label","textLabel"],ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"]},exportAs:["matTab"],features:[r.Ab,r.Bb],ngContentSelectors:M,decls:1,vars:0,template:function(t,e){1&t&&(r.nc(),r.Oc(0,w,1,0,"ng-template"))},encapsulation:2}),t})();const Z={translateTab:Object(m.n)("translateTab",[Object(m.k)("center, void, left-origin-center, right-origin-center",Object(m.l)({transform:"none"})),Object(m.k)("left",Object(m.l)({transform:"translate3d(-100%, 0, 0)",minHeight:"1px"})),Object(m.k)("right",Object(m.l)({transform:"translate3d(100%, 0, 0)",minHeight:"1px"})),Object(m.m)("* => left, * => right, left => center, right => center",Object(m.e)("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")),Object(m.m)("void => left-origin-center",[Object(m.l)({transform:"translate3d(-100%, 0, 0)"}),Object(m.e)("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")]),Object(m.m)("void => right-origin-center",[Object(m.l)({transform:"translate3d(100%, 0, 0)"}),Object(m.e)("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")])])};let tt=(()=>{class t extends s.c{constructor(t,e,i,n){super(t,e,n),this._host=i,this._centeringSub=h.a.EMPTY,this._leavingSub=h.a.EMPTY}ngOnInit(){super.ngOnInit(),this._centeringSub=this._host._beforeCentering.pipe(Object(g.a)(this._host._isCenterPosition(this._host._position))).subscribe(t=>{t&&!this.hasAttached()&&this.attach(this._host._content)}),this._leavingSub=this._host._afterLeavingCenter.subscribe(()=>{this.detach()})}ngOnDestroy(){super.ngOnDestroy(),this._centeringSub.unsubscribe(),this._leavingSub.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.j),r.Qb(r.T),r.Qb(Object(r.X)(()=>it)),r.Qb(o.e))},t.\u0275dir=r.Lb({type:t,selectors:[["","matTabBodyHost",""]],features:[r.Ab]}),t})(),et=(()=>{class t{constructor(t,e,i){this._elementRef=t,this._dir=e,this._dirChangeSubscription=h.a.EMPTY,this._translateTabComplete=new d.a,this._onCentering=new r.o,this._beforeCentering=new r.o,this._afterLeavingCenter=new r.o,this._onCentered=new r.o(!0),this.animationDuration="500ms",e&&(this._dirChangeSubscription=e.change.subscribe(t=>{this._computePositionAnimationState(t),i.markForCheck()})),this._translateTabComplete.pipe(Object(v.a)((t,e)=>t.fromState===e.fromState&&t.toState===e.toState)).subscribe(t=>{this._isCenterPosition(t.toState)&&this._isCenterPosition(this._position)&&this._onCentered.emit(),this._isCenterPosition(t.fromState)&&!this._isCenterPosition(this._position)&&this._afterLeavingCenter.emit()})}set position(t){this._positionIndex=t,this._computePositionAnimationState()}ngOnInit(){"center"==this._position&&null!=this.origin&&(this._position=this._computePositionFromOrigin(this.origin))}ngOnDestroy(){this._dirChangeSubscription.unsubscribe(),this._translateTabComplete.complete()}_onTranslateTabStarted(t){const e=this._isCenterPosition(t.toState);this._beforeCentering.emit(e),e&&this._onCentering.emit(this._elementRef.nativeElement.clientHeight)}_getLayoutDirection(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}_isCenterPosition(t){return"center"==t||"left-origin-center"==t||"right-origin-center"==t}_computePositionAnimationState(t=this._getLayoutDirection()){this._position=this._positionIndex<0?"ltr"==t?"left":"right":this._positionIndex>0?"ltr"==t?"right":"left":"center"}_computePositionFromOrigin(t){const e=this._getLayoutDirection();return"ltr"==e&&t<=0||"rtl"==e&&t>0?"left-origin-center":"right-origin-center"}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l),r.Qb(O.c,8),r.Qb(r.h))},t.\u0275dir=r.Lb({type:t,inputs:{animationDuration:"animationDuration",position:"position",_content:["content","_content"],origin:"origin"},outputs:{_onCentering:"_onCentering",_beforeCentering:"_beforeCentering",_afterLeavingCenter:"_afterLeavingCenter",_onCentered:"_onCentered"}}),t})(),it=(()=>{class t extends et{constructor(t,e,i){super(t,e,i)}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l),r.Qb(O.c,8),r.Qb(r.h))},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-tab-body"]],viewQuery:function(t,e){var i;1&t&&r.Xc(s.g,!0),2&t&&r.yc(i=r.ec())&&(e._portalHost=i.first)},hostAttrs:[1,"mat-tab-body"],features:[r.Ab],decls:3,vars:6,consts:[[1,"mat-tab-body-content"],["content",""],["matTabBodyHost",""]],template:function(t,e){1&t&&(r.Wb(0,"div",0,1),r.dc("@translateTab.start",(function(t){return e._onTranslateTabStarted(t)}))("@translateTab.done",(function(t){return e._translateTabComplete.next(t)})),r.Oc(2,k,0,0,"ng-template",2),r.Vb()),2&t&&r.oc("@translateTab",r.wc(3,I,e._position,r.vc(1,S,e.animationDuration)))},directives:[tt],styles:[".mat-tab-body-content{height:100%;overflow:auto}.mat-tab-group-dynamic-height .mat-tab-body-content{overflow:hidden}\n"],encapsulation:2,data:{animation:[Z.translateTab]}}),t})();const nt=new r.s("MAT_TABS_CONFIG");let at=0;class st{}class ot{constructor(t){this._elementRef=t}}const rt=Object(c.A)(Object(c.B)(ot),"primary");let ct=(()=>{class t extends rt{constructor(t,e,i,n){super(t),this._changeDetectorRef=e,this._animationMode=n,this._tabs=new r.H,this._indexToSelect=0,this._tabBodyWrapperHeight=0,this._tabsSubscription=h.a.EMPTY,this._tabLabelSubscription=h.a.EMPTY,this._dynamicHeight=!1,this._selectedIndex=null,this.headerPosition="above",this.selectedIndexChange=new r.o,this.focusChange=new r.o,this.animationDone=new r.o,this.selectedTabChange=new r.o(!0),this._groupId=at++,this.animationDuration=i&&i.animationDuration?i.animationDuration:"500ms",this.disablePagination=!(!i||null==i.disablePagination)&&i.disablePagination}get dynamicHeight(){return this._dynamicHeight}set dynamicHeight(t){this._dynamicHeight=Object(y.c)(t)}get selectedIndex(){return this._selectedIndex}set selectedIndex(t){this._indexToSelect=Object(y.f)(t,null)}get animationDuration(){return this._animationDuration}set animationDuration(t){this._animationDuration=/^\d+$/.test(t)?t+"ms":t}get backgroundColor(){return this._backgroundColor}set backgroundColor(t){const e=this._elementRef.nativeElement;e.classList.remove("mat-background-"+this.backgroundColor),t&&e.classList.add("mat-background-"+t),this._backgroundColor=t}ngAfterContentChecked(){const t=this._indexToSelect=this._clampTabIndex(this._indexToSelect);if(this._selectedIndex!=t){const e=null==this._selectedIndex;e||this.selectedTabChange.emit(this._createChangeEvent(t)),Promise.resolve().then(()=>{this._tabs.forEach((e,i)=>e.isActive=i===t),e||this.selectedIndexChange.emit(t)})}this._tabs.forEach((e,i)=>{e.position=i-t,null==this._selectedIndex||0!=e.position||e.origin||(e.origin=t-this._selectedIndex)}),this._selectedIndex!==t&&(this._selectedIndex=t,this._changeDetectorRef.markForCheck())}ngAfterContentInit(){this._subscribeToAllTabChanges(),this._subscribeToTabLabels(),this._tabsSubscription=this._tabs.changes.subscribe(()=>{if(this._clampTabIndex(this._indexToSelect)===this._selectedIndex){const t=this._tabs.toArray();for(let e=0;e<t.length;e++)if(t[e].isActive){this._indexToSelect=this._selectedIndex=e;break}}this._changeDetectorRef.markForCheck()})}_subscribeToAllTabChanges(){this._allTabs.changes.pipe(Object(g.a)(this._allTabs)).subscribe(t=>{this._tabs.reset(t.filter(t=>!t._closestTabGroup||t._closestTabGroup===this)),this._tabs.notifyOnChanges()})}ngOnDestroy(){this._tabs.destroy(),this._tabsSubscription.unsubscribe(),this._tabLabelSubscription.unsubscribe()}realignInkBar(){this._tabHeader&&this._tabHeader._alignInkBarToSelectedTab()}_focusChanged(t){this.focusChange.emit(this._createChangeEvent(t))}_createChangeEvent(t){const e=new st;return e.index=t,this._tabs&&this._tabs.length&&(e.tab=this._tabs.toArray()[t]),e}_subscribeToTabLabels(){this._tabLabelSubscription&&this._tabLabelSubscription.unsubscribe(),this._tabLabelSubscription=Object(u.a)(...this._tabs.map(t=>t._stateChanges)).subscribe(()=>this._changeDetectorRef.markForCheck())}_clampTabIndex(t){return Math.min(this._tabs.length-1,Math.max(t||0,0))}_getTabLabelId(t){return`mat-tab-label-${this._groupId}-${t}`}_getTabContentId(t){return`mat-tab-content-${this._groupId}-${t}`}_setTabBodyWrapperHeight(t){if(!this._dynamicHeight||!this._tabBodyWrapperHeight)return;const e=this._tabBodyWrapper.nativeElement;e.style.height=this._tabBodyWrapperHeight+"px",this._tabBodyWrapper.nativeElement.offsetHeight&&(e.style.height=t+"px")}_removeTabBodyWrapperHeight(){const t=this._tabBodyWrapper.nativeElement;this._tabBodyWrapperHeight=t.clientHeight,t.style.height="",this.animationDone.emit()}_handleClick(t,e,i){t.disabled||(this.selectedIndex=e.focusIndex=i)}_getTabIndex(t,e){return t.disabled?null:this.selectedIndex===e?0:-1}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l),r.Qb(r.h),r.Qb(nt,8),r.Qb(l.a,8))},t.\u0275dir=r.Lb({type:t,inputs:{headerPosition:"headerPosition",animationDuration:"animationDuration",disablePagination:"disablePagination",dynamicHeight:"dynamicHeight",selectedIndex:"selectedIndex",backgroundColor:"backgroundColor"},outputs:{selectedIndexChange:"selectedIndexChange",focusChange:"focusChange",animationDone:"animationDone",selectedTabChange:"selectedTabChange"},features:[r.Ab]}),t})(),lt=(()=>{class t extends ct{constructor(t,e,i,n){super(t,e,i,n)}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l),r.Qb(r.h),r.Qb(nt,8),r.Qb(l.a,8))},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-tab-group"]],contentQueries:function(t,e,i){var n;1&t&&r.Jb(i,J,!0),2&t&&r.yc(n=r.ec())&&(e._allTabs=n)},viewQuery:function(t,e){var i;1&t&&(r.Xc(P,!0),r.Xc(V,!0)),2&t&&(r.yc(i=r.ec())&&(e._tabBodyWrapper=i.first),r.yc(i=r.ec())&&(e._tabHeader=i.first))},hostAttrs:[1,"mat-tab-group"],hostVars:4,hostBindings:function(t,e){2&t&&r.Ib("mat-tab-group-dynamic-height",e.dynamicHeight)("mat-tab-group-inverted-header","below"===e.headerPosition)},inputs:{color:"color",disableRipple:"disableRipple"},exportAs:["matTabGroup"],features:[r.Cb([{provide:Y,useExisting:t}]),r.Ab],decls:6,vars:7,consts:[[3,"selectedIndex","disableRipple","disablePagination","indexFocused","selectFocusedIndex"],["tabHeader",""],["class","mat-tab-label mat-focus-indicator","role","tab","matTabLabelWrapper","","mat-ripple","","cdkMonitorElementFocus","",3,"id","mat-tab-label-active","disabled","matRippleDisabled","click",4,"ngFor","ngForOf"],[1,"mat-tab-body-wrapper"],["tabBodyWrapper",""],["role","tabpanel",3,"id","mat-tab-body-active","content","position","origin","animationDuration","_onCentered","_onCentering",4,"ngFor","ngForOf"],["role","tab","matTabLabelWrapper","","mat-ripple","","cdkMonitorElementFocus","",1,"mat-tab-label","mat-focus-indicator",3,"id","disabled","matRippleDisabled","click"],[1,"mat-tab-label-content"],[3,"ngIf"],[3,"cdkPortalOutlet"],["role","tabpanel",3,"id","content","position","origin","animationDuration","_onCentered","_onCentering"]],template:function(t,e){1&t&&(r.Wb(0,"mat-tab-header",0,1),r.dc("indexFocused",(function(t){return e._focusChanged(t)}))("selectFocusedIndex",(function(t){return e.selectedIndex=t})),r.Oc(2,W,4,14,"div",2),r.Vb(),r.Wb(3,"div",3,4),r.Oc(5,T,1,8,"mat-tab-body",5),r.Vb()),2&t&&(r.oc("selectedIndex",e.selectedIndex||0)("disableRipple",e.disableRipple)("disablePagination",e.disablePagination),r.Db(2),r.oc("ngForOf",e._tabs),r.Db(1),r.Ib("_mat-animation-noopable","NoopAnimations"===e._animationMode),r.Db(2),r.oc("ngForOf",e._tabs))},directives:function(){return[mt,o.s,ut,c.u,n.e,o.t,s.c,it]},styles:[".mat-tab-group{display:flex;flex-direction:column}.mat-tab-group.mat-tab-group-inverted-header{flex-direction:column-reverse}.mat-tab-label{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;position:relative}.mat-tab-label:focus{outline:none}.mat-tab-label:focus:not(.mat-tab-disabled){opacity:1}.cdk-high-contrast-active .mat-tab-label:focus{outline:dotted 2px;outline-offset:-2px}.mat-tab-label.mat-tab-disabled{cursor:default}.cdk-high-contrast-active .mat-tab-label.mat-tab-disabled{opacity:.5}.mat-tab-label .mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}.cdk-high-contrast-active .mat-tab-label{opacity:1}@media(max-width: 599px){.mat-tab-label{padding:0 12px}}@media(max-width: 959px){.mat-tab-label{padding:0 12px}}.mat-tab-group[mat-stretch-tabs]>.mat-tab-header .mat-tab-label{flex-basis:0;flex-grow:1}.mat-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable.mat-tab-body-wrapper{transition:none;animation:none}.mat-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;flex-basis:100%}.mat-tab-body.mat-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-tab-group.mat-tab-group-dynamic-height .mat-tab-body.mat-tab-body-active{overflow-y:hidden}\n"],encapsulation:2}),t})();class dt{}const ht=Object(c.C)(dt);let ut=(()=>{class t extends ht{constructor(t){super(),this.elementRef=t}focus(){this.elementRef.nativeElement.focus()}getOffsetLeft(){return this.elementRef.nativeElement.offsetLeft}getOffsetWidth(){return this.elementRef.nativeElement.offsetWidth}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l))},t.\u0275dir=r.Lb({type:t,selectors:[["","matTabLabelWrapper",""]],hostVars:3,hostBindings:function(t,e){2&t&&(r.Eb("aria-disabled",!!e.disabled),r.Ib("mat-tab-disabled",e.disabled))},inputs:{disabled:"disabled"},features:[r.Ab]}),t})();const pt=Object(x.f)({passive:!0});let bt=(()=>{class t{constructor(t,e,i,n,a,s,o){this._elementRef=t,this._changeDetectorRef=e,this._viewportRuler=i,this._dir=n,this._ngZone=a,this._platform=s,this._animationMode=o,this._scrollDistance=0,this._selectedIndexChanged=!1,this._destroyed=new d.a,this._showPaginationControls=!1,this._disableScrollAfter=!0,this._disableScrollBefore=!0,this._stopScrolling=new d.a,this.disablePagination=!1,this._selectedIndex=0,this.selectFocusedIndex=new r.o,this.indexFocused=new r.o,a.runOutsideAngular(()=>{Object(p.a)(t.nativeElement,"mouseleave").pipe(Object(_.a)(this._destroyed)).subscribe(()=>{this._stopInterval()})})}get selectedIndex(){return this._selectedIndex}set selectedIndex(t){t=Object(y.f)(t),this._selectedIndex!=t&&(this._selectedIndexChanged=!0,this._selectedIndex=t,this._keyManager&&this._keyManager.updateActiveItem(t))}ngAfterViewInit(){Object(p.a)(this._previousPaginator.nativeElement,"touchstart",pt).pipe(Object(_.a)(this._destroyed)).subscribe(()=>{this._handlePaginatorPress("before")}),Object(p.a)(this._nextPaginator.nativeElement,"touchstart",pt).pipe(Object(_.a)(this._destroyed)).subscribe(()=>{this._handlePaginatorPress("after")})}ngAfterContentInit(){const t=this._dir?this._dir.change:Object(b.a)(null),e=this._viewportRuler.change(150),i=()=>{this.updatePagination(),this._alignInkBarToSelectedTab()};this._keyManager=new n.g(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap(),this._keyManager.updateActiveItem(this._selectedIndex),"undefined"!=typeof requestAnimationFrame?requestAnimationFrame(i):i(),Object(u.a)(t,e,this._items.changes).pipe(Object(_.a)(this._destroyed)).subscribe(()=>{Promise.resolve().then(i),this._keyManager.withHorizontalOrientation(this._getLayoutDirection())}),this._keyManager.change.pipe(Object(_.a)(this._destroyed)).subscribe(t=>{this.indexFocused.emit(t),this._setTabFocus(t)})}ngAfterContentChecked(){this._tabLabelCount!=this._items.length&&(this.updatePagination(),this._tabLabelCount=this._items.length,this._changeDetectorRef.markForCheck()),this._selectedIndexChanged&&(this._scrollToLabel(this._selectedIndex),this._checkScrollingControls(),this._alignInkBarToSelectedTab(),this._selectedIndexChanged=!1,this._changeDetectorRef.markForCheck()),this._scrollDistanceChanged&&(this._updateTabScrollPosition(),this._scrollDistanceChanged=!1,this._changeDetectorRef.markForCheck())}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete(),this._stopScrolling.complete()}_handleKeydown(t){if(!Object(C.v)(t))switch(t.keyCode){case C.g:case C.q:this.focusIndex!==this.selectedIndex&&(this.selectFocusedIndex.emit(this.focusIndex),this._itemSelected(t));break;default:this._keyManager.onKeydown(t)}}_onContentChanges(){const t=this._elementRef.nativeElement.textContent;t!==this._currentTextContent&&(this._currentTextContent=t||"",this._ngZone.run(()=>{this.updatePagination(),this._alignInkBarToSelectedTab(),this._changeDetectorRef.markForCheck()}))}updatePagination(){this._checkPaginationEnabled(),this._checkScrollingControls(),this._updateTabScrollPosition()}get focusIndex(){return this._keyManager?this._keyManager.activeItemIndex:0}set focusIndex(t){this._isValidIndex(t)&&this.focusIndex!==t&&this._keyManager&&this._keyManager.setActiveItem(t)}_isValidIndex(t){if(!this._items)return!0;const e=this._items?this._items.toArray()[t]:null;return!!e&&!e.disabled}_setTabFocus(t){if(this._showPaginationControls&&this._scrollToLabel(t),this._items&&this._items.length){this._items.toArray()[t].focus();const e=this._tabListContainer.nativeElement,i=this._getLayoutDirection();e.scrollLeft="ltr"==i?0:e.scrollWidth-e.offsetWidth}}_getLayoutDirection(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}_updateTabScrollPosition(){if(this.disablePagination)return;const t=this.scrollDistance,e=this._platform,i="ltr"===this._getLayoutDirection()?-t:t;this._tabList.nativeElement.style.transform=`translateX(${Math.round(i)}px)`,e&&(e.TRIDENT||e.EDGE)&&(this._tabListContainer.nativeElement.scrollLeft=0)}get scrollDistance(){return this._scrollDistance}set scrollDistance(t){this._scrollTo(t)}_scrollHeader(t){return this._scrollTo(this._scrollDistance+("before"==t?-1:1)*this._tabListContainer.nativeElement.offsetWidth/3)}_handlePaginatorClick(t){this._stopInterval(),this._scrollHeader(t)}_scrollToLabel(t){if(this.disablePagination)return;const e=this._items?this._items.toArray()[t]:null;if(!e)return;const i=this._tabListContainer.nativeElement.offsetWidth,{offsetLeft:n,offsetWidth:a}=e.elementRef.nativeElement;let s,o;"ltr"==this._getLayoutDirection()?(s=n,o=s+a):(o=this._tabList.nativeElement.offsetWidth-n,s=o-a);const r=this.scrollDistance,c=this.scrollDistance+i;s<r?this.scrollDistance-=r-s+60:o>c&&(this.scrollDistance+=o-c+60)}_checkPaginationEnabled(){if(this.disablePagination)this._showPaginationControls=!1;else{const t=this._tabList.nativeElement.scrollWidth>this._elementRef.nativeElement.offsetWidth;t||(this.scrollDistance=0),t!==this._showPaginationControls&&this._changeDetectorRef.markForCheck(),this._showPaginationControls=t}}_checkScrollingControls(){this.disablePagination?this._disableScrollAfter=this._disableScrollBefore=!0:(this._disableScrollBefore=0==this.scrollDistance,this._disableScrollAfter=this.scrollDistance==this._getMaxScrollDistance(),this._changeDetectorRef.markForCheck())}_getMaxScrollDistance(){return this._tabList.nativeElement.scrollWidth-this._tabListContainer.nativeElement.offsetWidth||0}_alignInkBarToSelectedTab(){const t=this._items&&this._items.length?this._items.toArray()[this.selectedIndex]:null,e=t?t.elementRef.nativeElement:null;e?this._inkBar.alignToElement(e):this._inkBar.hide()}_stopInterval(){this._stopScrolling.next()}_handlePaginatorPress(t,e){e&&null!=e.button&&0!==e.button||(this._stopInterval(),Object(f.a)(650,100).pipe(Object(_.a)(Object(u.a)(this._stopScrolling,this._destroyed))).subscribe(()=>{const{maxScrollDistance:e,distance:i}=this._scrollHeader(t);(0===i||i>=e)&&this._stopInterval()}))}_scrollTo(t){if(this.disablePagination)return{maxScrollDistance:0,distance:0};const e=this._getMaxScrollDistance();return this._scrollDistance=Math.max(0,Math.min(e,t)),this._scrollDistanceChanged=!0,this._checkScrollingControls(),{maxScrollDistance:e,distance:this._scrollDistance}}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l),r.Qb(r.h),r.Qb(D.h),r.Qb(O.c,8),r.Qb(r.C),r.Qb(x.a),r.Qb(l.a,8))},t.\u0275dir=r.Lb({type:t,inputs:{disablePagination:"disablePagination"}}),t})(),ft=(()=>{class t extends bt{constructor(t,e,i,n,a,s,o){super(t,e,i,n,a,s,o),this._disableRipple=!1}get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=Object(y.c)(t)}_itemSelected(t){t.preventDefault()}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l),r.Qb(r.h),r.Qb(D.h),r.Qb(O.c,8),r.Qb(r.C),r.Qb(x.a),r.Qb(l.a,8))},t.\u0275dir=r.Lb({type:t,inputs:{disableRipple:"disableRipple"},features:[r.Ab]}),t})(),mt=(()=>{class t extends ft{constructor(t,e,i,n,a,s,o){super(t,e,i,n,a,s,o)}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l),r.Qb(r.h),r.Qb(D.h),r.Qb(O.c,8),r.Qb(r.C),r.Qb(x.a),r.Qb(l.a,8))},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-tab-header"]],contentQueries:function(t,e,i){var n;1&t&&r.Jb(i,ut,!1),2&t&&r.yc(n=r.ec())&&(e._items=n)},viewQuery:function(t,e){var i;1&t&&(r.Kc(B,!0),r.Kc(E,!0),r.Kc(F,!0),r.Xc(L,!0),r.Xc(Q,!0)),2&t&&(r.yc(i=r.ec())&&(e._inkBar=i.first),r.yc(i=r.ec())&&(e._tabListContainer=i.first),r.yc(i=r.ec())&&(e._tabList=i.first),r.yc(i=r.ec())&&(e._nextPaginator=i.first),r.yc(i=r.ec())&&(e._previousPaginator=i.first))},hostAttrs:[1,"mat-tab-header"],hostVars:4,hostBindings:function(t,e){2&t&&r.Ib("mat-tab-header-pagination-controls-enabled",e._showPaginationControls)("mat-tab-header-rtl","rtl"==e._getLayoutDirection())},inputs:{selectedIndex:"selectedIndex"},outputs:{selectFocusedIndex:"selectFocusedIndex",indexFocused:"indexFocused"},features:[r.Ab],ngContentSelectors:M,decls:13,vars:8,consts:[["aria-hidden","true","mat-ripple","",1,"mat-tab-header-pagination","mat-tab-header-pagination-before","mat-elevation-z4",3,"matRippleDisabled","click","mousedown","touchend"],["previousPaginator",""],[1,"mat-tab-header-pagination-chevron"],[1,"mat-tab-label-container",3,"keydown"],["tabListContainer",""],["role","tablist",1,"mat-tab-list",3,"cdkObserveContent"],["tabList",""],[1,"mat-tab-labels"],["aria-hidden","true","mat-ripple","",1,"mat-tab-header-pagination","mat-tab-header-pagination-after","mat-elevation-z4",3,"matRippleDisabled","mousedown","click","touchend"],["nextPaginator",""]],template:function(t,e){1&t&&(r.nc(),r.Wb(0,"div",0,1),r.dc("click",(function(){return e._handlePaginatorClick("before")}))("mousedown",(function(t){return e._handlePaginatorPress("before",t)}))("touchend",(function(){return e._stopInterval()})),r.Rb(2,"div",2),r.Vb(),r.Wb(3,"div",3,4),r.dc("keydown",(function(t){return e._handleKeydown(t)})),r.Wb(5,"div",5,6),r.dc("cdkObserveContent",(function(){return e._onContentChanges()})),r.Wb(7,"div",7),r.mc(8),r.Vb(),r.Rb(9,"mat-ink-bar"),r.Vb(),r.Vb(),r.Wb(10,"div",8,9),r.dc("mousedown",(function(t){return e._handlePaginatorPress("after",t)}))("click",(function(){return e._handlePaginatorClick("after")}))("touchend",(function(){return e._stopInterval()})),r.Rb(12,"div",2),r.Vb()),2&t&&(r.Ib("mat-tab-header-pagination-disabled",e._disableScrollBefore),r.oc("matRippleDisabled",e._disableScrollBefore||e.disableRipple),r.Db(5),r.Ib("_mat-animation-noopable","NoopAnimations"===e._animationMode),r.Db(5),r.Ib("mat-tab-header-pagination-disabled",e._disableScrollAfter),r.oc("matRippleDisabled",e._disableScrollAfter||e.disableRipple))},directives:[c.u,a.a,B],styles:['.mat-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mat-tab-header-pagination{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:transparent;touch-action:none}.mat-tab-header-pagination-controls-enabled .mat-tab-header-pagination{display:flex}.mat-tab-header-pagination-before,.mat-tab-header-rtl .mat-tab-header-pagination-after{padding-left:4px}.mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-rtl .mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-tab-header-rtl .mat-tab-header-pagination-before,.mat-tab-header-pagination-after{padding-right:4px}.mat-tab-header-rtl .mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;content:"";height:8px;width:8px}.mat-tab-header-pagination-disabled{box-shadow:none;cursor:default}.mat-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-ink-bar{position:absolute;bottom:0;height:2px;transition:500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable.mat-ink-bar{transition:none;animation:none}.mat-tab-group-inverted-header .mat-ink-bar{bottom:auto;top:0}.cdk-high-contrast-active .mat-ink-bar{outline:solid 2px;height:0}.mat-tab-labels{display:flex}[mat-align-tabs=center]>.mat-tab-header .mat-tab-labels{justify-content:center}[mat-align-tabs=end]>.mat-tab-header .mat-tab-labels{justify-content:flex-end}.mat-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1}._mat-animation-noopable.mat-tab-list{transition:none;animation:none}.mat-tab-label{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;position:relative}.mat-tab-label:focus{outline:none}.mat-tab-label:focus:not(.mat-tab-disabled){opacity:1}.cdk-high-contrast-active .mat-tab-label:focus{outline:dotted 2px;outline-offset:-2px}.mat-tab-label.mat-tab-disabled{cursor:default}.cdk-high-contrast-active .mat-tab-label.mat-tab-disabled{opacity:.5}.mat-tab-label .mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}.cdk-high-contrast-active .mat-tab-label{opacity:1}@media(max-width: 599px){.mat-tab-label{min-width:72px}}\n'],encapsulation:2}),t})(),gt=(()=>{class t extends bt{constructor(t,e,i,n,a,s,o){super(t,n,a,e,i,s,o),this._disableRipple=!1,this.color="primary"}get backgroundColor(){return this._backgroundColor}set backgroundColor(t){const e=this._elementRef.nativeElement.classList;e.remove("mat-background-"+this.backgroundColor),t&&e.add("mat-background-"+t),this._backgroundColor=t}get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=Object(y.c)(t)}_itemSelected(){}ngAfterContentInit(){this._items.changes.pipe(Object(g.a)(null),Object(_.a)(this._destroyed)).subscribe(()=>{this.updateActiveLink()}),super.ngAfterContentInit()}updateActiveLink(t){if(!this._items)return;const e=this._items.toArray();for(let i=0;i<e.length;i++)if(e[i].active)return this.selectedIndex=i,void this._changeDetectorRef.markForCheck();this.selectedIndex=-1,this._inkBar.hide()}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l),r.Qb(O.c,8),r.Qb(r.C),r.Qb(r.h),r.Qb(D.h),r.Qb(x.a),r.Qb(l.a,8))},t.\u0275dir=r.Lb({type:t,inputs:{color:"color",backgroundColor:"backgroundColor",disableRipple:"disableRipple"},features:[r.Ab]}),t})(),vt=(()=>{class t extends gt{constructor(t,e,i,n,a,s,o){super(t,e,i,n,a,s,o)}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l),r.Qb(O.c,8),r.Qb(r.C),r.Qb(r.h),r.Qb(D.h),r.Qb(x.a),r.Qb(l.a,8))},t.\u0275cmp=r.Kb({type:t,selectors:[["","mat-tab-nav-bar",""]],contentQueries:function(t,e,i){var n;1&t&&r.Jb(i,Ct,!0),2&t&&r.yc(n=r.ec())&&(e._items=n)},viewQuery:function(t,e){var i;1&t&&(r.Kc(B,!0),r.Kc(E,!0),r.Kc(F,!0),r.Xc(L,!0),r.Xc(Q,!0)),2&t&&(r.yc(i=r.ec())&&(e._inkBar=i.first),r.yc(i=r.ec())&&(e._tabListContainer=i.first),r.yc(i=r.ec())&&(e._tabList=i.first),r.yc(i=r.ec())&&(e._nextPaginator=i.first),r.yc(i=r.ec())&&(e._previousPaginator=i.first))},hostAttrs:[1,"mat-tab-nav-bar","mat-tab-header"],hostVars:10,hostBindings:function(t,e){2&t&&r.Ib("mat-tab-header-pagination-controls-enabled",e._showPaginationControls)("mat-tab-header-rtl","rtl"==e._getLayoutDirection())("mat-primary","warn"!==e.color&&"accent"!==e.color)("mat-accent","accent"===e.color)("mat-warn","warn"===e.color)},inputs:{color:"color"},exportAs:["matTabNavBar","matTabNav"],features:[r.Ab],attrs:N,ngContentSelectors:M,decls:13,vars:8,consts:[["aria-hidden","true","mat-ripple","",1,"mat-tab-header-pagination","mat-tab-header-pagination-before","mat-elevation-z4",3,"matRippleDisabled","click","mousedown","touchend"],["previousPaginator",""],[1,"mat-tab-header-pagination-chevron"],[1,"mat-tab-link-container",3,"keydown"],["tabListContainer",""],[1,"mat-tab-list",3,"cdkObserveContent"],["tabList",""],[1,"mat-tab-links"],["aria-hidden","true","mat-ripple","",1,"mat-tab-header-pagination","mat-tab-header-pagination-after","mat-elevation-z4",3,"matRippleDisabled","mousedown","click","touchend"],["nextPaginator",""]],template:function(t,e){1&t&&(r.nc(),r.Wb(0,"div",0,1),r.dc("click",(function(){return e._handlePaginatorClick("before")}))("mousedown",(function(t){return e._handlePaginatorPress("before",t)}))("touchend",(function(){return e._stopInterval()})),r.Rb(2,"div",2),r.Vb(),r.Wb(3,"div",3,4),r.dc("keydown",(function(t){return e._handleKeydown(t)})),r.Wb(5,"div",5,6),r.dc("cdkObserveContent",(function(){return e._onContentChanges()})),r.Wb(7,"div",7),r.mc(8),r.Vb(),r.Rb(9,"mat-ink-bar"),r.Vb(),r.Vb(),r.Wb(10,"div",8,9),r.dc("mousedown",(function(t){return e._handlePaginatorPress("after",t)}))("click",(function(){return e._handlePaginatorClick("after")}))("touchend",(function(){return e._stopInterval()})),r.Rb(12,"div",2),r.Vb()),2&t&&(r.Ib("mat-tab-header-pagination-disabled",e._disableScrollBefore),r.oc("matRippleDisabled",e._disableScrollBefore||e.disableRipple),r.Db(5),r.Ib("_mat-animation-noopable","NoopAnimations"===e._animationMode),r.Db(5),r.Ib("mat-tab-header-pagination-disabled",e._disableScrollAfter),r.oc("matRippleDisabled",e._disableScrollAfter||e.disableRipple))},directives:[c.u,a.a,B],styles:['.mat-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mat-tab-header-pagination{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:transparent;touch-action:none}.mat-tab-header-pagination-controls-enabled .mat-tab-header-pagination{display:flex}.mat-tab-header-pagination-before,.mat-tab-header-rtl .mat-tab-header-pagination-after{padding-left:4px}.mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-rtl .mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-tab-header-rtl .mat-tab-header-pagination-before,.mat-tab-header-pagination-after{padding-right:4px}.mat-tab-header-rtl .mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;content:"";height:8px;width:8px}.mat-tab-header-pagination-disabled{box-shadow:none;cursor:default}.mat-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-tab-links{display:flex}[mat-align-tabs=center]>.mat-tab-link-container .mat-tab-links{justify-content:center}[mat-align-tabs=end]>.mat-tab-link-container .mat-tab-links{justify-content:flex-end}.mat-ink-bar{position:absolute;bottom:0;height:2px;transition:500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable.mat-ink-bar{transition:none;animation:none}.mat-tab-group-inverted-header .mat-ink-bar{bottom:auto;top:0}.cdk-high-contrast-active .mat-ink-bar{outline:solid 2px;height:0}.mat-tab-link-container{display:flex;flex-grow:1;overflow:hidden;z-index:1}.mat-tab-link{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;vertical-align:top;text-decoration:none;position:relative;overflow:hidden;-webkit-tap-highlight-color:transparent}.mat-tab-link:focus{outline:none}.mat-tab-link:focus:not(.mat-tab-disabled){opacity:1}.cdk-high-contrast-active .mat-tab-link:focus{outline:dotted 2px;outline-offset:-2px}.mat-tab-link.mat-tab-disabled{cursor:default}.cdk-high-contrast-active .mat-tab-link.mat-tab-disabled{opacity:.5}.mat-tab-link .mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}.cdk-high-contrast-active .mat-tab-link{opacity:1}[mat-stretch-tabs] .mat-tab-link{flex-basis:0;flex-grow:1}.mat-tab-link.mat-tab-disabled{pointer-events:none}@media(max-width: 599px){.mat-tab-link{min-width:72px}}\n'],encapsulation:2}),t})();class _t{}const yt=Object(c.F)(Object(c.B)(Object(c.C)(_t)));let xt=(()=>{class t extends yt{constructor(t,e,i,n,a,s){super(),this._tabNavBar=t,this.elementRef=e,this._focusMonitor=a,this._isActive=!1,this.rippleConfig=i||{},this.tabIndex=parseInt(n)||0,"NoopAnimations"===s&&(this.rippleConfig.animation={enterDuration:0,exitDuration:0})}get active(){return this._isActive}set active(t){Object(y.c)(t)!==this._isActive&&(this._isActive=t,this._tabNavBar.updateActiveLink(this.elementRef))}get rippleDisabled(){return this.disabled||this.disableRipple||this._tabNavBar.disableRipple||!!this.rippleConfig.disabled}focus(){this.elementRef.nativeElement.focus()}ngAfterViewInit(){this._focusMonitor.monitor(this.elementRef)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this.elementRef)}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(gt),r.Qb(r.l),r.Qb(c.j,8),r.bc("tabindex"),r.Qb(n.h),r.Qb(l.a,8))},t.\u0275dir=r.Lb({type:t,inputs:{active:"active"},features:[r.Ab]}),t})(),Ct=(()=>{class t extends xt{constructor(t,e,i,n,a,s,o,r){super(t,e,a,s,o,r),this._tabLinkRipple=new c.x(this,i,e,n),this._tabLinkRipple.setupTriggerEvents(e.nativeElement)}ngOnDestroy(){super.ngOnDestroy(),this._tabLinkRipple._removeTriggerEvents()}}return t.\u0275fac=function(e){return new(e||t)(r.Qb(vt),r.Qb(r.l),r.Qb(r.C),r.Qb(x.a),r.Qb(c.j,8),r.bc("tabindex"),r.Qb(n.h),r.Qb(l.a,8))},t.\u0275dir=r.Lb({type:t,selectors:[["","mat-tab-link",""],["","matTabLink",""]],hostAttrs:[1,"mat-tab-link","mat-focus-indicator"],hostVars:7,hostBindings:function(t,e){2&t&&(r.Eb("aria-current",e.active?"page":null)("aria-disabled",e.disabled)("tabIndex",e.tabIndex),r.Ib("mat-tab-disabled",e.disabled)("mat-tab-label-active",e.active))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex"},exportAs:["matTabLink"],features:[r.Ab]}),t})(),Ot=(()=>{class t{}return t.\u0275mod=r.Ob({type:t}),t.\u0275inj=r.Nb({factory:function(e){return new(e||t)},imports:[[o.c,c.k,s.h,c.v,a.c,n.a],c.k]}),t})()},xHqg:function(t,e,i){"use strict";i.d(e,"a",(function(){return N})),i.d(e,"b",(function(){return F})),i.d(e,"c",(function(){return W})),i.d(e,"d",(function(){return V})),i.d(e,"e",(function(){return L})),i.d(e,"f",(function(){return E})),i.d(e,"g",(function(){return X})),i.d(e,"h",(function(){return U})),i.d(e,"i",(function(){return H})),i.d(e,"j",(function(){return B}));var n=i("+rOU"),a=i("B/XX"),s=i("ofXK"),o=i("fXoL"),r=i("bTqV"),c=i("FKr1"),l=i("NFeN"),d=i("XNiG"),h=i("1G5W"),u=i("/uUt"),p=i("R0Ic"),b=i("u47x"),f=i("cH1L");function m(t,e){if(1&t&&o.Sb(0,8),2&t){const t=o.hc();o.oc("ngTemplateOutlet",t.iconOverrides[t.state])("ngTemplateOutletContext",t._getIconContext())}}function g(t,e){if(1&t&&(o.Wb(0,"span"),o.Qc(1),o.Vb()),2&t){const t=o.hc(2);o.Db(1),o.Rc(t._getDefaultTextForState(t.state))}}function v(t,e){if(1&t&&(o.Wb(0,"mat-icon"),o.Qc(1),o.Vb()),2&t){const t=o.hc(2);o.Db(1),o.Rc(t._getDefaultTextForState(t.state))}}function _(t,e){if(1&t&&(o.Ub(0,9),o.Oc(1,g,2,1,"span",10),o.Oc(2,v,2,1,"mat-icon",11),o.Tb()),2&t){const t=o.hc();o.oc("ngSwitch",t.state),o.Db(1),o.oc("ngSwitchCase","number")}}function y(t,e){if(1&t&&(o.Wb(0,"div",12),o.Sb(1,13),o.Vb()),2&t){const t=o.hc();o.Db(1),o.oc("ngTemplateOutlet",t._templateLabel().template)}}function x(t,e){if(1&t&&(o.Wb(0,"div",12),o.Qc(1),o.Vb()),2&t){const t=o.hc();o.Db(1),o.Rc(t.label)}}function C(t,e){if(1&t&&(o.Wb(0,"div",14),o.Qc(1),o.Vb()),2&t){const t=o.hc();o.Db(1),o.Rc(t._intl.optionalLabel)}}function O(t,e){if(1&t&&(o.Wb(0,"div",15),o.Qc(1),o.Vb()),2&t){const t=o.hc();o.Db(1),o.Rc(t.errorMessage)}}function D(t,e){1&t&&o.mc(0)}const w=["*"];function M(t,e){1&t&&o.Rb(0,"div",6)}function k(t,e){if(1&t){const t=o.Xb();o.Ub(0),o.Wb(1,"mat-step-header",4),o.dc("click",(function(){return e.$implicit.select()}))("keydown",(function(e){return o.Dc(t),o.hc()._onKeydown(e)})),o.Vb(),o.Oc(2,M,1,0,"div",5),o.Tb()}if(2&t){const t=e.$implicit,i=e.index,n=e.last,a=o.hc();o.Db(1),o.oc("tabIndex",a._getFocusIndex()===i?0:-1)("id",a._getStepLabelId(i))("index",i)("state",a._getIndicatorType(i,t.state))("label",t.stepLabel||t.label)("selected",a.selectedIndex===i)("active",t.completed||a.selectedIndex===i||!a.linear)("optional",t.optional)("errorMessage",t.errorMessage)("iconOverrides",a._iconOverrides)("disableRipple",a.disableRipple),o.Eb("aria-posinset",i+1)("aria-setsize",a.steps.length)("aria-controls",a._getStepContentId(i))("aria-selected",a.selectedIndex==i)("aria-label",t.ariaLabel||null)("aria-labelledby",!t.ariaLabel&&t.ariaLabelledby?t.ariaLabelledby:null),o.Db(1),o.oc("ngIf",!n)}}function S(t,e){if(1&t){const t=o.Xb();o.Wb(0,"div",7),o.dc("@stepTransition.done",(function(e){return o.Dc(t),o.hc()._animationDone.next(e)})),o.Sb(1,8),o.Vb()}if(2&t){const t=e.$implicit,i=e.index,n=o.hc();o.oc("@stepTransition",n._getAnimationDirection(i))("id",n._getStepContentId(i)),o.Eb("aria-labelledby",n._getStepLabelId(i))("aria-expanded",n.selectedIndex===i),o.Db(1),o.oc("ngTemplateOutlet",t.content)}}function I(t,e){if(1&t){const t=o.Xb();o.Wb(0,"div",1),o.Wb(1,"mat-step-header",2),o.dc("click",(function(){return e.$implicit.select()}))("keydown",(function(e){return o.Dc(t),o.hc()._onKeydown(e)})),o.Vb(),o.Wb(2,"div",3),o.Wb(3,"div",4),o.dc("@stepTransition.done",(function(e){return o.Dc(t),o.hc()._animationDone.next(e)})),o.Wb(4,"div",5),o.Sb(5,6),o.Vb(),o.Vb(),o.Vb(),o.Vb()}if(2&t){const t=e.$implicit,i=e.index,n=e.last,a=o.hc();o.Db(1),o.oc("tabIndex",a._getFocusIndex()==i?0:-1)("id",a._getStepLabelId(i))("index",i)("state",a._getIndicatorType(i,t.state))("label",t.stepLabel||t.label)("selected",a.selectedIndex===i)("active",t.completed||a.selectedIndex===i||!a.linear)("optional",t.optional)("errorMessage",t.errorMessage)("iconOverrides",a._iconOverrides)("disableRipple",a.disableRipple),o.Eb("aria-posinset",i+1)("aria-setsize",a.steps.length)("aria-controls",a._getStepContentId(i))("aria-selected",a.selectedIndex===i)("aria-label",t.ariaLabel||null)("aria-labelledby",!t.ariaLabel&&t.ariaLabelledby?t.ariaLabelledby:null),o.Db(1),o.Ib("mat-stepper-vertical-line",!n),o.Db(1),o.oc("@stepTransition",a._getAnimationDirection(i))("id",a._getStepContentId(i)),o.Eb("aria-labelledby",a._getStepLabelId(i))("aria-expanded",a.selectedIndex===i),o.Db(2),o.oc("ngTemplateOutlet",t.content)}}const P='.mat-stepper-vertical,.mat-stepper-horizontal{display:block}.mat-horizontal-stepper-header-container{white-space:nowrap;display:flex;align-items:center}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header-container{align-items:flex-start}.mat-stepper-horizontal-line{border-top-width:1px;border-top-style:solid;flex:auto;height:0;margin:0 -16px;min-width:32px}.mat-stepper-label-position-bottom .mat-stepper-horizontal-line{margin:0;min-width:0;position:relative}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before,.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after{border-top-width:1px;border-top-style:solid;content:"";display:inline-block;height:0;position:absolute;width:calc(50% - 20px)}.mat-horizontal-stepper-header{display:flex;height:72px;overflow:hidden;align-items:center;padding:0 24px}.mat-horizontal-stepper-header .mat-step-icon{margin-right:8px;flex:none}[dir=rtl] .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:8px}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header{box-sizing:border-box;flex-direction:column;height:auto}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after{right:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before{left:0}[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:last-child::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:first-child::after{display:none}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-label{padding:16px 0 0 0;text-align:center;width:100%}.mat-vertical-stepper-header{display:flex;align-items:center;height:24px}.mat-vertical-stepper-header .mat-step-icon{margin-right:12px}[dir=rtl] .mat-vertical-stepper-header .mat-step-icon{margin-right:0;margin-left:12px}.mat-horizontal-stepper-content{outline:0}.mat-horizontal-stepper-content[aria-expanded=false]{height:0;overflow:hidden}.mat-horizontal-content-container{overflow:hidden;padding:0 24px 24px 24px}.mat-vertical-content-container{margin-left:36px;border:0;position:relative}[dir=rtl] .mat-vertical-content-container{margin-left:0;margin-right:36px}.mat-stepper-vertical-line::before{content:"";position:absolute;left:0;border-left-width:1px;border-left-style:solid}[dir=rtl] .mat-stepper-vertical-line::before{left:auto;right:0}.mat-vertical-stepper-content{overflow:hidden;outline:0}.mat-vertical-content{padding:0 24px 24px 24px}.mat-step:last-child .mat-vertical-content-container{border:none}\n';let V=(()=>{class t extends a.c{}return t.\u0275fac=function(e){return R(e||t)},t.\u0275dir=o.Lb({type:t,selectors:[["","matStepLabel",""]],features:[o.Ab]}),t})();const R=o.Yb(V);let j=(()=>{class t{constructor(){this.changes=new d.a,this.optionalLabel="Optional"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(o.Mb)({factory:function(){return new t},token:t,providedIn:"root"}),t})();const A={provide:j,deps:[[new o.D,new o.N,j]],useFactory:function(t){return t||new j}};let W=(()=>{class t extends a.b{constructor(t,e,i,n){super(i),this._intl=t,this._focusMonitor=e,this._intlSubscription=t.changes.subscribe(()=>n.markForCheck())}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._intlSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._elementRef)}focus(){this._focusMonitor.focusVia(this._elementRef,"program")}_stringLabel(){return this.label instanceof V?null:this.label}_templateLabel(){return this.label instanceof V?this.label:null}_getHostElement(){return this._elementRef.nativeElement}_getIconContext(){return{index:this.index,active:this.active,optional:this.optional}}_getDefaultTextForState(t){return"number"==t?""+(this.index+1):"edit"==t?"create":"error"==t?"warning":t}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(j),o.Qb(b.h),o.Qb(o.l),o.Qb(o.h))},t.\u0275cmp=o.Kb({type:t,selectors:[["mat-step-header"]],hostAttrs:["role","tab",1,"mat-step-header","mat-focus-indicator"],inputs:{state:"state",label:"label",errorMessage:"errorMessage",iconOverrides:"iconOverrides",index:"index",selected:"selected",active:"active",optional:"optional",disableRipple:"disableRipple"},features:[o.Ab],decls:10,vars:19,consts:[["matRipple","",1,"mat-step-header-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-step-icon-content",3,"ngSwitch"],[3,"ngTemplateOutlet","ngTemplateOutletContext",4,"ngSwitchCase"],[3,"ngSwitch",4,"ngSwitchDefault"],[1,"mat-step-label"],["class","mat-step-text-label",4,"ngIf"],["class","mat-step-optional",4,"ngIf"],["class","mat-step-sub-label-error",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[1,"mat-step-text-label"],[3,"ngTemplateOutlet"],[1,"mat-step-optional"],[1,"mat-step-sub-label-error"]],template:function(t,e){1&t&&(o.Rb(0,"div",0),o.Wb(1,"div"),o.Wb(2,"div",1),o.Oc(3,m,1,2,"ng-container",2),o.Oc(4,_,3,2,"ng-container",3),o.Vb(),o.Vb(),o.Wb(5,"div",4),o.Oc(6,y,2,1,"div",5),o.Oc(7,x,2,1,"div",5),o.Oc(8,C,2,1,"div",6),o.Oc(9,O,2,1,"div",7),o.Vb()),2&t&&(o.oc("matRippleTrigger",e._getHostElement())("matRippleDisabled",e.disableRipple),o.Db(1),o.Gb("mat-step-icon-state-",e.state," mat-step-icon"),o.Ib("mat-step-icon-selected",e.selected),o.Db(1),o.oc("ngSwitch",!(!e.iconOverrides||!e.iconOverrides[e.state])),o.Db(1),o.oc("ngSwitchCase",!0),o.Db(2),o.Ib("mat-step-label-active",e.active)("mat-step-label-selected",e.selected)("mat-step-label-error","error"==e.state),o.Db(1),o.oc("ngIf",e._templateLabel()),o.Db(1),o.oc("ngIf",e._stringLabel()),o.Db(1),o.oc("ngIf",e.optional&&"error"!=e.state),o.Db(1),o.oc("ngIf","error"==e.state))},directives:[c.u,s.x,s.y,s.z,s.t,s.A,l.a],styles:[".mat-step-header{overflow:hidden;outline:none;cursor:pointer;position:relative;box-sizing:content-box;-webkit-tap-highlight-color:transparent}.mat-step-optional,.mat-step-sub-label-error{font-size:12px}.mat-step-icon{border-radius:50%;height:24px;width:24px;flex-shrink:0;position:relative}.mat-step-icon-content,.mat-step-icon .mat-icon{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.mat-step-icon .mat-icon{font-size:16px;height:16px;width:16px}.mat-step-icon-state-error .mat-icon{font-size:24px;height:24px;width:24px}.mat-step-label{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:50px;vertical-align:middle}.mat-step-text-label{text-overflow:ellipsis;overflow:hidden}.mat-step-header .mat-step-header-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}\n"],encapsulation:2,changeDetection:0}),t})();const T={horizontalStepTransition:Object(p.n)("stepTransition",[Object(p.k)("previous",Object(p.l)({transform:"translate3d(-100%, 0, 0)",visibility:"hidden"})),Object(p.k)("current",Object(p.l)({transform:"none",visibility:"visible"})),Object(p.k)("next",Object(p.l)({transform:"translate3d(100%, 0, 0)",visibility:"hidden"})),Object(p.m)("* => *",Object(p.e)("500ms cubic-bezier(0.35, 0, 0.25, 1)"))]),verticalStepTransition:Object(p.n)("stepTransition",[Object(p.k)("previous",Object(p.l)({height:"0px",visibility:"hidden"})),Object(p.k)("next",Object(p.l)({height:"0px",visibility:"hidden"})),Object(p.k)("current",Object(p.l)({height:"*",visibility:"visible"})),Object(p.m)("* <=> current",Object(p.e)("225ms cubic-bezier(0.4, 0.0, 0.2, 1)"))])};let E=(()=>{class t{constructor(t){this.templateRef=t}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(o.P))},t.\u0275dir=o.Lb({type:t,selectors:[["ng-template","matStepperIcon",""]],inputs:{name:["matStepperIcon","name"]}}),t})(),F=(()=>{class t extends a.a{constructor(t,e,i){super(t,i),this._errorStateMatcher=e}isErrorState(t,e){return this._errorStateMatcher.isErrorState(t,e)||!!(t&&t.invalid&&this.interacted)}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(Object(o.X)(()=>L)),o.Qb(c.d,4),o.Qb(a.h,8))},t.\u0275cmp=o.Kb({type:t,selectors:[["mat-step"]],contentQueries:function(t,e,i){var n;1&t&&o.Jb(i,V,!0),2&t&&o.yc(n=o.ec())&&(e.stepLabel=n.first)},exportAs:["matStep"],features:[o.Cb([{provide:c.d,useExisting:t},{provide:a.a,useExisting:t}]),o.Ab],ngContentSelectors:w,decls:1,vars:0,template:function(t,e){1&t&&(o.nc(),o.Oc(0,D,1,0,"ng-template"))},encapsulation:2,changeDetection:0}),t})(),L=(()=>{class t extends a.d{constructor(){super(...arguments),this.steps=new o.H,this.animationDone=new o.o,this._iconOverrides={},this._animationDone=new d.a}ngAfterContentInit(){super.ngAfterContentInit(),this._icons.forEach(({name:t,templateRef:e})=>this._iconOverrides[t]=e),this.steps.changes.pipe(Object(h.a)(this._destroyed)).subscribe(()=>{this._stateChanged()}),this._animationDone.pipe(Object(u.a)((t,e)=>t.fromState===e.fromState&&t.toState===e.toState),Object(h.a)(this._destroyed)).subscribe(t=>{"current"===t.toState&&this.animationDone.emit()})}}return t.\u0275fac=function(e){return Q(e||t)},t.\u0275dir=o.Lb({type:t,selectors:[["","matStepper",""]],contentQueries:function(t,e,i){var n;1&t&&(o.Jb(i,F,!0),o.Jb(i,E,!0)),2&t&&(o.yc(n=o.ec())&&(e._steps=n),o.yc(n=o.ec())&&(e._icons=n))},viewQuery:function(t,e){var i;1&t&&o.Xc(W,!0),2&t&&o.yc(i=o.ec())&&(e._stepHeader=i)},inputs:{disableRipple:"disableRipple"},outputs:{animationDone:"animationDone"},features:[o.Cb([{provide:a.d,useExisting:t}]),o.Ab]}),t})();const Q=o.Yb(L);let N=(()=>{class t extends L{constructor(){super(...arguments),this.labelPosition="end"}}return t.\u0275fac=function(e){return z(e||t)},t.\u0275cmp=o.Kb({type:t,selectors:[["mat-horizontal-stepper"]],hostAttrs:["aria-orientation","horizontal","role","tablist",1,"mat-stepper-horizontal"],hostVars:4,hostBindings:function(t,e){2&t&&o.Ib("mat-stepper-label-position-end","end"==e.labelPosition)("mat-stepper-label-position-bottom","bottom"==e.labelPosition)},inputs:{selectedIndex:"selectedIndex",labelPosition:"labelPosition"},exportAs:["matHorizontalStepper"],features:[o.Cb([{provide:L,useExisting:t},{provide:a.d,useExisting:t}]),o.Ab],decls:4,vars:2,consts:[[1,"mat-horizontal-stepper-header-container"],[4,"ngFor","ngForOf"],[1,"mat-horizontal-content-container"],["class","mat-horizontal-stepper-content","role","tabpanel",3,"id",4,"ngFor","ngForOf"],[1,"mat-horizontal-stepper-header",3,"tabIndex","id","index","state","label","selected","active","optional","errorMessage","iconOverrides","disableRipple","click","keydown"],["class","mat-stepper-horizontal-line",4,"ngIf"],[1,"mat-stepper-horizontal-line"],["role","tabpanel",1,"mat-horizontal-stepper-content",3,"id"],[3,"ngTemplateOutlet"]],template:function(t,e){1&t&&(o.Wb(0,"div",0),o.Oc(1,k,3,18,"ng-container",1),o.Vb(),o.Wb(2,"div",2),o.Oc(3,S,2,5,"div",3),o.Vb()),2&t&&(o.Db(1),o.oc("ngForOf",e.steps),o.Db(2),o.oc("ngForOf",e.steps))},directives:[s.s,W,s.t,s.A],styles:[P],encapsulation:2,data:{animation:[T.horizontalStepTransition]},changeDetection:0}),t})();const z=o.Yb(N);let B=(()=>{class t extends L{constructor(t,e,i,n){super(t,e,i,n),this._orientation="vertical"}}return t.\u0275fac=function(e){return new(e||t)(o.Qb(f.c,8),o.Qb(o.h),o.Qb(o.l),o.Qb(s.e))},t.\u0275cmp=o.Kb({type:t,selectors:[["mat-vertical-stepper"]],hostAttrs:["aria-orientation","vertical","role","tablist",1,"mat-stepper-vertical"],inputs:{selectedIndex:"selectedIndex"},exportAs:["matVerticalStepper"],features:[o.Cb([{provide:L,useExisting:t},{provide:a.d,useExisting:t}]),o.Ab],decls:1,vars:1,consts:[["class","mat-step",4,"ngFor","ngForOf"],[1,"mat-step"],[1,"mat-vertical-stepper-header",3,"tabIndex","id","index","state","label","selected","active","optional","errorMessage","iconOverrides","disableRipple","click","keydown"],[1,"mat-vertical-content-container"],["role","tabpanel",1,"mat-vertical-stepper-content",3,"id"],[1,"mat-vertical-content"],[3,"ngTemplateOutlet"]],template:function(t,e){1&t&&o.Oc(0,I,6,24,"div",0),2&t&&o.oc("ngForOf",e.steps)},directives:[s.s,W,s.A],styles:[P],encapsulation:2,data:{animation:[T.verticalStepTransition]},changeDetection:0}),t})(),U=(()=>{class t extends a.f{}return t.\u0275fac=function(e){return $(e||t)},t.\u0275dir=o.Lb({type:t,selectors:[["button","matStepperNext",""]],hostAttrs:[1,"mat-stepper-next"],hostVars:1,hostBindings:function(t,e){2&t&&o.Zb("type",e.type)},inputs:{type:"type"},features:[o.Ab]}),t})();const $=o.Yb(U);let H=(()=>{class t extends a.g{}return t.\u0275fac=function(e){return G(e||t)},t.\u0275dir=o.Lb({type:t,selectors:[["button","matStepperPrevious",""]],hostAttrs:[1,"mat-stepper-previous"],hostVars:1,hostBindings:function(t,e){2&t&&o.Zb("type",e.type)},inputs:{type:"type"},features:[o.Ab]}),t})();const G=o.Yb(H);let X=(()=>{class t{}return t.\u0275mod=o.Ob({type:t}),t.\u0275inj=o.Nb({factory:function(e){return new(e||t)},providers:[A,c.d],imports:[[c.k,s.c,n.h,r.c,a.e,l.b,c.v],c.k]}),t})()},xgIS:function(t,e,i){"use strict";i.d(e,"a",(function(){return r}));var n=i("HDdC"),a=i("DH7j"),s=i("n6bG"),o=i("lJxs");function r(t,e,i,c){return Object(s.a)(i)&&(c=i,i=void 0),c?r(t,e,i).pipe(Object(o.a)(t=>Object(a.a)(t)?c(...t):c(t))):new n.a(n=>{!function t(e,i,n,a,s){let o;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(e)){const t=e;e.addEventListener(i,n,s),o=()=>t.removeEventListener(i,n,s)}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(e)){const t=e;e.on(i,n),o=()=>t.off(i,n)}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(e)){const t=e;e.addListener(i,n),o=()=>t.removeListener(i,n)}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(let o=0,r=e.length;o<r;o++)t(e[o],i,n,a,s)}a.add(o)}(t,e,(function(t){n.next(arguments.length>1?Array.prototype.slice.call(arguments):t)}),n,i)})}},yCtX:function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var n=i("HDdC"),a=i("ngJS"),s=i("jZKg");function o(t,e){return e?Object(s.a)(t,e):new n.a(Object(a.a)(t))}},"z+Ro":function(t,e,i){"use strict";function n(t){return t&&"function"==typeof t.schedule}i.d(e,"a",(function(){return n}))},z6cu:function(t,e,i){"use strict";i.d(e,"a",(function(){return a}));var n=i("HDdC");function a(t,e){return new n.a(e?i=>e.schedule(s,0,{error:t,subscriber:i}):e=>e.error(t))}function s({error:t,subscriber:e}){e.error(t)}},zkoq:function(t,e,i){"use strict";i.d(e,"a",(function(){return b})),i.d(e,"b",(function(){return M})),i.d(e,"c",(function(){return k})),i.d(e,"d",(function(){return u})),i.d(e,"e",(function(){return m})),i.d(e,"f",(function(){return f})),i.d(e,"g",(function(){return p}));var n=i("fXoL"),a=i("FKr1"),s=i("8LU1"),o=i("cH1L");const r=["*"],c=[[["","mat-grid-avatar",""],["","matGridAvatar",""]],[["","mat-line",""],["","matLine",""]],"*"],l=["[mat-grid-avatar], [matGridAvatar]","[mat-line], [matLine]","*"],d=".mat-grid-list{display:block;position:relative}.mat-grid-tile{display:block;position:absolute;overflow:hidden}.mat-grid-tile .mat-figure{top:0;left:0;right:0;bottom:0;position:absolute;display:flex;align-items:center;justify-content:center;height:100%;padding:0;margin:0}.mat-grid-tile .mat-grid-tile-header,.mat-grid-tile .mat-grid-tile-footer{display:flex;align-items:center;height:48px;color:#fff;background:rgba(0,0,0,.38);overflow:hidden;padding:0 16px;position:absolute;left:0;right:0}.mat-grid-tile .mat-grid-tile-header>*,.mat-grid-tile .mat-grid-tile-footer>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-grid-tile .mat-grid-tile-header.mat-2-line,.mat-grid-tile .mat-grid-tile-footer.mat-2-line{height:68px}.mat-grid-tile .mat-grid-list-text{display:flex;flex-direction:column;flex:auto;box-sizing:border-box;overflow:hidden}.mat-grid-tile .mat-grid-list-text>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-grid-tile .mat-grid-list-text:empty{display:none}.mat-grid-tile .mat-grid-tile-header{top:0}.mat-grid-tile .mat-grid-tile-footer{bottom:0}.mat-grid-tile .mat-grid-avatar{padding-right:16px}[dir=rtl] .mat-grid-tile .mat-grid-avatar{padding-right:0;padding-left:16px}.mat-grid-tile .mat-grid-avatar:empty{display:none}\n",h=new n.s("MAT_GRID_LIST");let u=(()=>{class t{constructor(t,e){this._element=t,this._gridList=e,this._rowspan=1,this._colspan=1}get rowspan(){return this._rowspan}set rowspan(t){this._rowspan=Math.round(Object(s.f)(t))}get colspan(){return this._colspan}set colspan(t){this._colspan=Math.round(Object(s.f)(t))}_setStyle(t,e){this._element.nativeElement.style[t]=e}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(h,8))},t.\u0275cmp=n.Kb({type:t,selectors:[["mat-grid-tile"]],hostAttrs:[1,"mat-grid-tile"],hostVars:2,hostBindings:function(t,e){2&t&&n.Eb("rowspan",e.rowspan)("colspan",e.colspan)},inputs:{rowspan:"rowspan",colspan:"colspan"},exportAs:["matGridTile"],ngContentSelectors:r,decls:2,vars:0,consts:[[1,"mat-figure"]],template:function(t,e){1&t&&(n.nc(),n.Wb(0,"figure",0),n.mc(1),n.Vb())},styles:[d],encapsulation:2,changeDetection:0}),t})(),p=(()=>{class t{constructor(t){this._element=t}ngAfterContentInit(){Object(a.G)(this._lines,this._element)}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l))},t.\u0275cmp=n.Kb({type:t,selectors:[["mat-grid-tile-header"],["mat-grid-tile-footer"]],contentQueries:function(t,e,i){var s;1&t&&n.Jb(i,a.l,!0),2&t&&n.yc(s=n.ec())&&(e._lines=s)},ngContentSelectors:l,decls:4,vars:0,consts:[[1,"mat-grid-list-text"]],template:function(t,e){1&t&&(n.nc(c),n.mc(0),n.Wb(1,"div",0),n.mc(2,1),n.Vb(),n.mc(3,2))},encapsulation:2,changeDetection:0}),t})(),b=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["","mat-grid-avatar",""],["","matGridAvatar",""]],hostAttrs:[1,"mat-grid-avatar"]}),t})(),f=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["mat-grid-tile-header"]],hostAttrs:[1,"mat-grid-tile-header"]}),t})(),m=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=n.Lb({type:t,selectors:[["mat-grid-tile-footer"]],hostAttrs:[1,"mat-grid-tile-footer"]}),t})();class g{constructor(){this.columnIndex=0,this.rowIndex=0}get rowCount(){return this.rowIndex+1}get rowspan(){const t=Math.max(...this.tracker);return t>1?this.rowCount+t-1:this.rowCount}update(t,e){this.columnIndex=0,this.rowIndex=0,this.tracker=new Array(t),this.tracker.fill(0,0,this.tracker.length),this.positions=e.map(t=>this._trackTile(t))}_trackTile(t){const e=this._findMatchingGap(t.colspan);return this._markTilePosition(e,t),this.columnIndex=e+t.colspan,new v(this.rowIndex,e)}_findMatchingGap(t){let e=-1,i=-1;do{this.columnIndex+t>this.tracker.length?(this._nextRow(),e=this.tracker.indexOf(0,this.columnIndex),i=this._findGapEndIndex(e)):(e=this.tracker.indexOf(0,this.columnIndex),-1!=e?(i=this._findGapEndIndex(e),this.columnIndex=e+1):(this._nextRow(),e=this.tracker.indexOf(0,this.columnIndex),i=this._findGapEndIndex(e)))}while(i-e<t||0==i);return Math.max(e,0)}_nextRow(){this.columnIndex=0,this.rowIndex++;for(let t=0;t<this.tracker.length;t++)this.tracker[t]=Math.max(0,this.tracker[t]-1)}_findGapEndIndex(t){for(let e=t+1;e<this.tracker.length;e++)if(0!=this.tracker[e])return e;return this.tracker.length}_markTilePosition(t,e){for(let i=0;i<e.colspan;i++)this.tracker[t+i]=e.rowspan}}class v{constructor(t,e){this.row=t,this.col=e}}const _=/^-?\d+((\.\d+)?[A-Za-z%$]?)+$/;class y{constructor(){this._rows=0,this._rowspan=0}init(t,e,i,n){this._gutterSize=w(t),this._rows=e.rowCount,this._rowspan=e.rowspan,this._cols=i,this._direction=n}getBaseTileSize(t,e){return`(${t}% - (${this._gutterSize} * ${e}))`}getTilePosition(t,e){return 0===e?"0":D(`(${t} + ${this._gutterSize}) * ${e}`)}getTileSize(t,e){return`(${t} * ${e}) + (${e-1} * ${this._gutterSize})`}setStyle(t,e,i){let n=100/this._cols,a=(this._cols-1)/this._cols;this.setColStyles(t,i,n,a),this.setRowStyles(t,e,n,a)}setColStyles(t,e,i,n){let a=this.getBaseTileSize(i,n);t._setStyle("rtl"===this._direction?"right":"left",this.getTilePosition(a,e)),t._setStyle("width",D(this.getTileSize(a,t.colspan)))}getGutterSpan(){return`${this._gutterSize} * (${this._rowspan} - 1)`}getTileSpan(t){return`${this._rowspan} * ${this.getTileSize(t,1)}`}getComputedHeight(){return null}}class x extends y{constructor(t){super(),this.fixedRowHeight=t}init(t,e,i,n){super.init(t,e,i,n),this.fixedRowHeight=w(this.fixedRowHeight),_.test(this.fixedRowHeight)}setRowStyles(t,e){t._setStyle("top",this.getTilePosition(this.fixedRowHeight,e)),t._setStyle("height",D(this.getTileSize(this.fixedRowHeight,t.rowspan)))}getComputedHeight(){return["height",D(`${this.getTileSpan(this.fixedRowHeight)} + ${this.getGutterSpan()}`)]}reset(t){t._setListStyle(["height",null]),t._tiles&&t._tiles.forEach(t=>{t._setStyle("top",null),t._setStyle("height",null)})}}class C extends y{constructor(t){super(),this._parseRatio(t)}setRowStyles(t,e,i,n){this.baseTileHeight=this.getBaseTileSize(i/this.rowHeightRatio,n),t._setStyle("marginTop",this.getTilePosition(this.baseTileHeight,e)),t._setStyle("paddingTop",D(this.getTileSize(this.baseTileHeight,t.rowspan)))}getComputedHeight(){return["paddingBottom",D(`${this.getTileSpan(this.baseTileHeight)} + ${this.getGutterSpan()}`)]}reset(t){t._setListStyle(["paddingBottom",null]),t._tiles.forEach(t=>{t._setStyle("marginTop",null),t._setStyle("paddingTop",null)})}_parseRatio(t){const e=t.split(":");this.rowHeightRatio=parseFloat(e[0])/parseFloat(e[1])}}class O extends y{setRowStyles(t,e){let i=this.getBaseTileSize(100/this._rowspan,(this._rows-1)/this._rows);t._setStyle("top",this.getTilePosition(i,e)),t._setStyle("height",D(this.getTileSize(i,t.rowspan)))}reset(t){t._tiles&&t._tiles.forEach(t=>{t._setStyle("top",null),t._setStyle("height",null)})}}function D(t){return`calc(${t})`}function w(t){return t.match(/([A-Za-z%]+)$/)?t:t+"px"}let M=(()=>{class t{constructor(t,e){this._element=t,this._dir=e,this._gutter="1px"}get cols(){return this._cols}set cols(t){this._cols=Math.max(1,Math.round(Object(s.f)(t)))}get gutterSize(){return this._gutter}set gutterSize(t){this._gutter=""+(null==t?"":t)}get rowHeight(){return this._rowHeight}set rowHeight(t){const e=""+(null==t?"":t);e!==this._rowHeight&&(this._rowHeight=e,this._setTileStyler(this._rowHeight))}ngOnInit(){this._checkCols(),this._checkRowHeight()}ngAfterContentChecked(){this._layoutTiles()}_checkCols(){}_checkRowHeight(){this._rowHeight||this._setTileStyler("1:1")}_setTileStyler(t){this._tileStyler&&this._tileStyler.reset(this),this._tileStyler="fit"===t?new O:t&&t.indexOf(":")>-1?new C(t):new x(t)}_layoutTiles(){this._tileCoordinator||(this._tileCoordinator=new g);const t=this._tileCoordinator,e=this._tiles.filter(t=>!t._gridList||t._gridList===this),i=this._dir?this._dir.value:"ltr";this._tileCoordinator.update(this.cols,e),this._tileStyler.init(this.gutterSize,t,this.cols,i),e.forEach((e,i)=>{const n=t.positions[i];this._tileStyler.setStyle(e,n.row,n.col)}),this._setListStyle(this._tileStyler.getComputedHeight())}_setListStyle(t){t&&(this._element.nativeElement.style[t[0]]=t[1])}}return t.\u0275fac=function(e){return new(e||t)(n.Qb(n.l),n.Qb(o.c,8))},t.\u0275cmp=n.Kb({type:t,selectors:[["mat-grid-list"]],contentQueries:function(t,e,i){var a;1&t&&n.Jb(i,u,!0),2&t&&n.yc(a=n.ec())&&(e._tiles=a)},hostAttrs:[1,"mat-grid-list"],hostVars:1,hostBindings:function(t,e){2&t&&n.Eb("cols",e.cols)},inputs:{cols:"cols",gutterSize:"gutterSize",rowHeight:"rowHeight"},exportAs:["matGridList"],features:[n.Cb([{provide:h,useExisting:t}])],ngContentSelectors:r,decls:2,vars:0,template:function(t,e){1&t&&(n.nc(),n.Wb(0,"div"),n.mc(1),n.Vb())},styles:[d],encapsulation:2,changeDetection:0}),t})(),k=(()=>{class t{}return t.\u0275mod=n.Ob({type:t}),t.\u0275inj=n.Nb({factory:function(e){return new(e||t)},imports:[[a.m,a.k],a.m,a.k]}),t})()},zx2A:function(t,e,i){"use strict";i.d(e,"a",(function(){return o})),i.d(e,"b",(function(){return r})),i.d(e,"c",(function(){return c}));var n=i("7o/Q"),a=i("HDdC"),s=i("SeVD");class o extends n.a{constructor(t){super(),this.parent=t}_next(t){this.parent.notifyNext(t)}_error(t){this.parent.notifyError(t),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class r extends n.a{notifyNext(t){this.destination.next(t)}notifyError(t){this.destination.error(t)}notifyComplete(){this.destination.complete()}}function c(t,e){if(!e.closed)return t instanceof a.a?t.subscribe(e):Object(s.a)(t)(e)}}},[[0,0]]]); \ No newline at end of file diff --git a/dist/main-es5.a2812dd763af01c1f025.js b/dist/main-es5.ca1394e9c1df11821f07.js similarity index 69% rename from dist/main-es5.a2812dd763af01c1f025.js rename to dist/main-es5.ca1394e9c1df11821f07.js index 5c973980f60b310c13eeef815bda00defadca498..3f0ff04e797ca82baab626ba4274455f60fb322d 100644 --- a/dist/main-es5.a2812dd763af01c1f025.js +++ b/dist/main-es5.ca1394e9c1df11821f07.js @@ -1 +1 @@ -(function(){function asyncGeneratorStep(t,e,n,i,a,r,o){try{var s=t[r](o),c=s.value}catch(l){return void n(l)}s.done?e(c):Promise.resolve(c).then(i,a)}function _asyncToGenerator(t){return function(){var e=this,n=arguments;return new Promise((function(i,a){var r=t.apply(e,n);function o(t){asyncGeneratorStep(r,i,a,o,s,"next",t)}function s(t){asyncGeneratorStep(r,i,a,o,s,"throw",t)}o(void 0)}))}}function _defineProperty(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _wrapNativeSuper(t){var e="function"==typeof Map?new Map:void 0;return(_wrapNativeSuper=function(t){if(null===t||!_isNativeFunction(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return _construct(t,arguments,_getPrototypeOf(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(n,t)})(t)}function _isNativeFunction(t){return-1!==Function.toString.call(t).indexOf("[native code]")}function _construct(t,e,n){return(_construct=_isNativeReflectConstruct()?Reflect.construct:function(t,e,n){var i=[null];i.push.apply(i,e);var a=new(Function.bind.apply(t,i));return n&&_setPrototypeOf(a,n.prototype),a}).apply(null,arguments)}function _toArray(t){return _arrayWithHoles(t)||_iterableToArray(t)||_unsupportedIterableToArray(t)||_nonIterableRest()}function _slicedToArray(t,e){return _arrayWithHoles(t)||_iterableToArrayLimit(t,e)||_unsupportedIterableToArray(t,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],i=!0,a=!1,r=void 0;try{for(var o,s=t[Symbol.iterator]();!(i=(o=s.next()).done)&&(n.push(o.value),!e||n.length!==e);i=!0);}catch(c){a=!0,r=c}finally{try{i||null==s.return||s.return()}finally{if(a)throw r}}return n}}function _arrayWithHoles(t){if(Array.isArray(t))return t}function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_unsupportedIterableToArray(t)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}function _get(t,e,n){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var i=_superPropBase(t,e);if(i){var a=Object.getOwnPropertyDescriptor(i,e);return a.get?a.get.call(n):a.value}})(t,e,n||t)}function _superPropBase(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=_getPrototypeOf(t)););return t}function _createForOfIteratorHelper(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=_unsupportedIterableToArray(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,a=function(){};return{s:a,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,r=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw r}}}}function _unsupportedIterableToArray(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(t,e):void 0}}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function _createClass(t,e,n){return e&&_defineProperties(t.prototype,e),n&&_defineProperties(t,n),t}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&_setPrototypeOf(t,e)}function _setPrototypeOf(t,e){return(_setPrototypeOf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function _createSuper(t){var e=_isNativeReflectConstruct();return function(){var n,i=_getPrototypeOf(t);if(e){var a=_getPrototypeOf(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return _possibleConstructorReturn(this,n)}}function _possibleConstructorReturn(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?_assertThisInitialized(t):e}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{"+0xr":function(t,e,n){"use strict";n.d(e,"a",(function(){return he})),n.d(e,"b",(function(){return ee})),n.d(e,"c",(function(){return se})),n.d(e,"d",(function(){return de})),n.d(e,"e",(function(){return re})),n.d(e,"f",(function(){return xe})),n.d(e,"g",(function(){return me})),n.d(e,"h",(function(){return le})),n.d(e,"i",(function(){return ie})),n.d(e,"j",(function(){return Ce})),n.d(e,"k",(function(){return be})),n.d(e,"l",(function(){return Me})),n.d(e,"m",(function(){return De})),n.d(e,"n",(function(){return ye})),n.d(e,"o",(function(){return Zt})),n.d(e,"p",(function(){return Ve})),n.d(e,"q",(function(){return Re})),n.d(e,"r",(function(){return Ie}));var i=n("8LU1"),a=n("0EQZ"),r=n("fXoL"),o=n("cH1L"),s=n("nLfN"),c=n("ofXK"),l=n("XNiG"),u=n("Cfvw"),d=n("2Vo4"),f=n("7+OI"),h=n("LRne"),p=n("1G5W"),b=n("IzEk"),g=n("vxfF"),m=[[["caption"]],[["colgroup"],["col"]]],v=["caption","colgroup, col"];function y(t,e){if(1&t&&(r.Wb(0,"th",3),r.Qc(1),r.Vb()),2&t){var n=r.hc();r.Lc("text-align",n.justify),r.Db(1),r.Sc(" ",n.headerText," ")}}function _(t,e){if(1&t&&(r.Wb(0,"td",4),r.Qc(1),r.Vb()),2&t){var n=e.$implicit,i=r.hc();r.Lc("text-align",i.justify),r.Db(1),r.Sc(" ",i.dataAccessor(n,i.name)," ")}}function C(t){return function(t){_inherits(n,t);var e=_createSuper(n);function n(){var t;_classCallCheck(this,n);for(var i=arguments.length,a=new Array(i),r=0;r<i;r++)a[r]=arguments[r];return(t=e.call.apply(e,[this].concat(a)))._sticky=!1,t._hasStickyChanged=!1,t}return _createClass(n,[{key:"hasStickyChanged",value:function(){var t=this._hasStickyChanged;return this._hasStickyChanged=!1,t}},{key:"resetStickyChanged",value:function(){this._hasStickyChanged=!1}},{key:"sticky",get:function(){return this._sticky},set:function(t){var e=this._sticky;this._sticky=Object(i.c)(t),this._hasStickyChanged=e!==this._sticky}}]),n}(t)}var k,x,O,D,w,M,S,I,P,R,V,j,A,W,T,E,F,L,Q,N,z,B,U=new r.s("CDK_TABLE"),H=new r.s("text-column-options"),G=((O=function t(e){_classCallCheck(this,t),this.template=e}).\u0275fac=function(t){return new(t||O)(r.Qb(r.P))},O.\u0275dir=r.Lb({type:O,selectors:[["","cdkCellDef",""]]}),O),$=((x=function t(e){_classCallCheck(this,t),this.template=e}).\u0275fac=function(t){return new(t||x)(r.Qb(r.P))},x.\u0275dir=r.Lb({type:x,selectors:[["","cdkHeaderCellDef",""]]}),x),X=((k=function t(e){_classCallCheck(this,t),this.template=e}).\u0275fac=function(t){return new(t||k)(r.Qb(r.P))},k.\u0275dir=r.Lb({type:k,selectors:[["","cdkFooterCellDef",""]]}),k),q=C((function t(){_classCallCheck(this,t)})),K=((D=function(t){_inherits(n,t);var e=_createSuper(n);function n(t){var i;return _classCallCheck(this,n),(i=e.call(this))._table=t,i._stickyEnd=!1,i}return _createClass(n,[{key:"_updateColumnCssClassName",value:function(){this._columnCssClassName=["cdk-column-"+this.cssClassFriendlyName]}},{key:"_setNameInput",value:function(t){t&&(this._name=t,this.cssClassFriendlyName=t.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName())}},{key:"name",get:function(){return this._name},set:function(t){this._setNameInput(t)}},{key:"stickyEnd",get:function(){return this._stickyEnd},set:function(t){var e=this._stickyEnd;this._stickyEnd=Object(i.c)(t),this._hasStickyChanged=e!==this._stickyEnd}}]),n}(q)).\u0275fac=function(t){return new(t||D)(r.Qb(U,8))},D.\u0275dir=r.Lb({type:D,selectors:[["","cdkColumnDef",""]],contentQueries:function(t,e,n){var i;1&t&&(r.Jb(n,G,!0),r.Jb(n,$,!0),r.Jb(n,X,!0)),2&t&&(r.yc(i=r.ec())&&(e.cell=i.first),r.yc(i=r.ec())&&(e.headerCell=i.first),r.yc(i=r.ec())&&(e.footerCell=i.first))},inputs:{sticky:"sticky",name:["cdkColumnDef","name"],stickyEnd:"stickyEnd"},features:[r.Cb([{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:D}]),r.Ab]}),D),Y=function t(e,n){_classCallCheck(this,t);var i,a=n.nativeElement.classList,r=_createForOfIteratorHelper(e._columnCssClassName);try{for(r.s();!(i=r.n()).done;){var o=i.value;a.add(o)}}catch(s){r.e(s)}finally{r.f()}},J=((S=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){return _classCallCheck(this,n),e.call(this,t,i)}return n}(Y)).\u0275fac=function(t){return new(t||S)(r.Qb(K),r.Qb(r.l))},S.\u0275dir=r.Lb({type:S,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],features:[r.Ab]}),S),Z=((M=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){return _classCallCheck(this,n),e.call(this,t,i)}return n}(Y)).\u0275fac=function(t){return new(t||M)(r.Qb(K),r.Qb(r.l))},M.\u0275dir=r.Lb({type:M,selectors:[["cdk-footer-cell"],["td","cdk-footer-cell",""]],hostAttrs:["role","gridcell",1,"cdk-footer-cell"],features:[r.Ab]}),M),tt=((w=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){return _classCallCheck(this,n),e.call(this,t,i)}return n}(Y)).\u0275fac=function(t){return new(t||w)(r.Qb(K),r.Qb(r.l))},w.\u0275dir=r.Lb({type:w,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:["role","gridcell",1,"cdk-cell"],features:[r.Ab]}),w),et=function t(){_classCallCheck(this,t),this.tasks=[],this.endTasks=[]},nt=new r.s("_COALESCED_STYLE_SCHEDULER"),it=((P=function(){function t(e){_classCallCheck(this,t),this._ngZone=e,this._currentSchedule=null,this._destroyed=new l.a}return _createClass(t,[{key:"schedule",value:function(t){this._createScheduleIfNeeded(),this._currentSchedule.tasks.push(t)}},{key:"scheduleEnd",value:function(t){this._createScheduleIfNeeded(),this._currentSchedule.endTasks.push(t)}},{key:"ngOnDestroy",value:function(){this._destroyed.next(),this._destroyed.complete()}},{key:"_createScheduleIfNeeded",value:function(){var t=this;this._currentSchedule||(this._currentSchedule=new et,this._getScheduleObservable().pipe(Object(p.a)(this._destroyed)).subscribe((function(){for(;t._currentSchedule.tasks.length||t._currentSchedule.endTasks.length;){var e=t._currentSchedule;t._currentSchedule=new et;var n,i=_createForOfIteratorHelper(e.tasks);try{for(i.s();!(n=i.n()).done;)(0,n.value)()}catch(o){i.e(o)}finally{i.f()}var a,r=_createForOfIteratorHelper(e.endTasks);try{for(r.s();!(a=r.n()).done;)(0,a.value)()}catch(o){r.e(o)}finally{r.f()}}t._currentSchedule=null})))}},{key:"_getScheduleObservable",value:function(){return this._ngZone.isStable?Object(u.a)(Promise.resolve(void 0)):this._ngZone.onStable.pipe(Object(b.a)(1))}}]),t}()).\u0275fac=function(t){return new(t||P)(r.ac(r.C))},P.\u0275prov=r.Mb({token:P,factory:P.\u0275fac}),P),at=((I=function(){function t(e,n){_classCallCheck(this,t),this.template=e,this._differs=n}return _createClass(t,[{key:"ngOnChanges",value:function(t){if(!this._columnsDiffer){var e=t.columns&&t.columns.currentValue||[];this._columnsDiffer=this._differs.find(e).create(),this._columnsDiffer.diff(e)}}},{key:"getColumnsDiff",value:function(){return this._columnsDiffer.diff(this.columns)}},{key:"extractCellTemplate",value:function(t){return this instanceof ot?t.headerCell.template:this instanceof ct?t.footerCell.template:t.cell.template}}]),t}()).\u0275fac=function(t){return new(t||I)(r.Qb(r.P),r.Qb(r.v))},I.\u0275dir=r.Lb({type:I,features:[r.Bb]}),I),rt=C(function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return n}(at)),ot=((R=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a){var r;return _classCallCheck(this,n),(r=e.call(this,t,i))._table=a,r}return _createClass(n,[{key:"ngOnChanges",value:function(t){_get(_getPrototypeOf(n.prototype),"ngOnChanges",this).call(this,t)}}]),n}(rt)).\u0275fac=function(t){return new(t||R)(r.Qb(r.P),r.Qb(r.v),r.Qb(U,8))},R.\u0275dir=r.Lb({type:R,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:["cdkHeaderRowDef","columns"],sticky:["cdkHeaderRowDefSticky","sticky"]},features:[r.Ab,r.Bb]}),R),st=C(function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return n}(at)),ct=((F=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a){var r;return _classCallCheck(this,n),(r=e.call(this,t,i))._table=a,r}return _createClass(n,[{key:"ngOnChanges",value:function(t){_get(_getPrototypeOf(n.prototype),"ngOnChanges",this).call(this,t)}}]),n}(st)).\u0275fac=function(t){return new(t||F)(r.Qb(r.P),r.Qb(r.v),r.Qb(U,8))},F.\u0275dir=r.Lb({type:F,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:["cdkFooterRowDef","columns"],sticky:["cdkFooterRowDefSticky","sticky"]},features:[r.Ab,r.Bb]}),F),lt=((E=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a){var r;return _classCallCheck(this,n),(r=e.call(this,t,i))._table=a,r}return n}(at)).\u0275fac=function(t){return new(t||E)(r.Qb(r.P),r.Qb(r.v),r.Qb(U,8))},E.\u0275dir=r.Lb({type:E,selectors:[["","cdkRowDef",""]],inputs:{columns:["cdkRowDefColumns","columns"],when:["cdkRowDefWhen","when"]},features:[r.Ab]}),E),ut=((T=function(){function t(e){_classCallCheck(this,t),this._viewContainer=e,t.mostRecentCellOutlet=this}return _createClass(t,[{key:"ngOnDestroy",value:function(){t.mostRecentCellOutlet===this&&(t.mostRecentCellOutlet=null)}}]),t}()).\u0275fac=function(t){return new(t||T)(r.Qb(r.T))},T.\u0275dir=r.Lb({type:T,selectors:[["","cdkCellOutlet",""]]}),T.mostRecentCellOutlet=null,T),dt=((W=function t(){_classCallCheck(this,t)}).\u0275fac=function(t){return new(t||W)},W.\u0275cmp=r.Kb({type:W,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,e){1&t&&r.Sb(0,0)},directives:[ut],encapsulation:2}),W),ft=((A=function t(){_classCallCheck(this,t)}).\u0275fac=function(t){return new(t||A)},A.\u0275cmp=r.Kb({type:A,selectors:[["cdk-footer-row"],["tr","cdk-footer-row",""]],hostAttrs:["role","row",1,"cdk-footer-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,e){1&t&&r.Sb(0,0)},directives:[ut],encapsulation:2}),A),ht=((j=function t(){_classCallCheck(this,t)}).\u0275fac=function(t){return new(t||j)},j.\u0275cmp=r.Kb({type:j,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,e){1&t&&r.Sb(0,0)},directives:[ut],encapsulation:2}),j),pt=((V=function t(e){_classCallCheck(this,t),this.templateRef=e}).\u0275fac=function(t){return new(t||V)(r.Qb(r.P))},V.\u0275dir=r.Lb({type:V,selectors:[["ng-template","cdkNoDataRow",""]]}),V),bt=["top","bottom","left","right"],gt=function(){function t(e,n,i,a){var r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];_classCallCheck(this,t),this._isNativeHtmlTable=e,this._stickCellCss=n,this.direction=i,this._coalescedStyleScheduler=a,this._isBrowser=r,this._needsPositionStickyOnElement=o}return _createClass(t,[{key:"clearStickyPositioning",value:function(t,e){var n,i=this,a=[],r=_createForOfIteratorHelper(t);try{for(r.s();!(n=r.n()).done;){var o=n.value;if(o.nodeType===o.ELEMENT_NODE){a.push(o);for(var s=0;s<o.children.length;s++)a.push(o.children[s])}}}catch(c){r.e(c)}finally{r.f()}this._scheduleStyleChanges((function(){var t,n=_createForOfIteratorHelper(a);try{for(n.s();!(t=n.n()).done;){var r=t.value;i._removeStickyStyle(r,e)}}catch(c){n.e(c)}finally{n.f()}}))}},{key:"updateStickyColumns",value:function(t,e,n){var i=this;if(t.length&&this._isBrowser&&(e.some((function(t){return t}))||n.some((function(t){return t})))){var a=t[0],r=a.children.length,o=this._getCellWidths(a),s=this._getStickyStartColumnPositions(o,e),c=this._getStickyEndColumnPositions(o,n);this._scheduleStyleChanges((function(){var a,o="rtl"===i.direction,l=o?"right":"left",u=o?"left":"right",d=_createForOfIteratorHelper(t);try{for(d.s();!(a=d.n()).done;)for(var f=a.value,h=0;h<r;h++){var p=f.children[h];e[h]&&i._addStickyStyle(p,l,s[h]),n[h]&&i._addStickyStyle(p,u,c[h])}}catch(b){d.e(b)}finally{d.f()}}))}}},{key:"stickRows",value:function(t,e,n){var i=this;if(this._isBrowser){for(var a="bottom"===n?t.slice().reverse():t,r="bottom"===n?e.slice().reverse():e,o=[],s=[],c=0,l=0;c<a.length;c++)if(o[c]=l,r[c]){var u=a[c];s[c]=this._isNativeHtmlTable?Array.from(u.children):[u],c!==a.length-1&&(l+=u.getBoundingClientRect().height)}this._scheduleStyleChanges((function(){for(var t=0;t<a.length;t++)if(r[t]){var e,c=o[t],l=_createForOfIteratorHelper(s[t]);try{for(l.s();!(e=l.n()).done;){var u=e.value;i._addStickyStyle(u,n,c)}}catch(d){l.e(d)}finally{l.f()}}}))}}},{key:"updateStickyFooterContainer",value:function(t,e){var n=this;if(this._isNativeHtmlTable){var i=t.querySelector("tfoot");this._scheduleStyleChanges((function(){e.some((function(t){return!t}))?n._removeStickyStyle(i,["bottom"]):n._addStickyStyle(i,"bottom",0)}))}}},{key:"_removeStickyStyle",value:function(t,e){var n,i=_createForOfIteratorHelper(e);try{for(i.s();!(n=i.n()).done;){var a=n.value;t.style[a]=""}}catch(r){i.e(r)}finally{i.f()}bt.some((function(n){return-1===e.indexOf(n)&&t.style[n]}))?t.style.zIndex=this._getCalculatedZIndex(t):(t.style.zIndex="",this._needsPositionStickyOnElement&&(t.style.position=""),t.classList.remove(this._stickCellCss))}},{key:"_addStickyStyle",value:function(t,e,n){t.classList.add(this._stickCellCss),t.style[e]=n+"px",t.style.zIndex=this._getCalculatedZIndex(t),this._needsPositionStickyOnElement&&(t.style.cssText+="position: -webkit-sticky; position: sticky; ")}},{key:"_getCalculatedZIndex",value:function(t){var e,n={top:100,bottom:10,left:1,right:1},i=0,a=_createForOfIteratorHelper(bt);try{for(a.s();!(e=a.n()).done;){var r=e.value;t.style[r]&&(i+=n[r])}}catch(o){a.e(o)}finally{a.f()}return i?""+i:""}},{key:"_getCellWidths",value:function(t){for(var e=[],n=t.children,i=0;i<n.length;i++)e.push(n[i].getBoundingClientRect().width);return e}},{key:"_getStickyStartColumnPositions",value:function(t,e){for(var n=[],i=0,a=0;a<t.length;a++)e[a]&&(n[a]=i,i+=t[a]);return n}},{key:"_getStickyEndColumnPositions",value:function(t,e){for(var n=[],i=0,a=t.length;a>0;a--)e[a]&&(n[a]=i,i+=t[a]);return n}},{key:"_scheduleStyleChanges",value:function(t){this._coalescedStyleScheduler?this._coalescedStyleScheduler.schedule(t):t()}}]),t}(),mt=((B=function t(e,n){_classCallCheck(this,t),this.viewContainer=e,this.elementRef=n}).\u0275fac=function(t){return new(t||B)(r.Qb(r.T),r.Qb(r.l))},B.\u0275dir=r.Lb({type:B,selectors:[["","rowOutlet",""]]}),B),vt=((z=function t(e,n){_classCallCheck(this,t),this.viewContainer=e,this.elementRef=n}).\u0275fac=function(t){return new(t||z)(r.Qb(r.T),r.Qb(r.l))},z.\u0275dir=r.Lb({type:z,selectors:[["","headerRowOutlet",""]]}),z),yt=((N=function t(e,n){_classCallCheck(this,t),this.viewContainer=e,this.elementRef=n}).\u0275fac=function(t){return new(t||N)(r.Qb(r.T),r.Qb(r.l))},N.\u0275dir=r.Lb({type:N,selectors:[["","footerRowOutlet",""]]}),N),_t=((Q=function t(e,n){_classCallCheck(this,t),this.viewContainer=e,this.elementRef=n}).\u0275fac=function(t){return new(t||Q)(r.Qb(r.T),r.Qb(r.l))},Q.\u0275dir=r.Lb({type:Q,selectors:[["","noDataRowOutlet",""]]}),Q),Ct=((L=function(){function t(e,n,i,a,r,o,s,c,u){_classCallCheck(this,t),this._differs=e,this._changeDetectorRef=n,this._elementRef=i,this._dir=r,this._platform=s,this._viewRepeater=c,this._coalescedStyleScheduler=u,this._onDestroy=new l.a,this._columnDefsByName=new Map,this._customColumnDefs=new Set,this._customRowDefs=new Set,this._customHeaderRowDefs=new Set,this._customFooterRowDefs=new Set,this._headerRowDefChanged=!0,this._footerRowDefChanged=!0,this._cachedRenderRowsMap=new Map,this.stickyCssClass="cdk-table-sticky",this.needsPositionStickyOnElement=!0,this._isShowingNoDataRow=!1,this._multiTemplateDataRows=!1,this.viewChange=new d.a({start:0,end:Number.MAX_VALUE}),a||this._elementRef.nativeElement.setAttribute("role","grid"),this._document=o,this._isNativeHtmlTable="TABLE"===this._elementRef.nativeElement.nodeName}return _createClass(t,[{key:"ngOnInit",value:function(){var t=this;this._setupStickyStyler(),this._isNativeHtmlTable&&this._applyNativeTableSections(),this._dataDiffer=this._differs.find([]).create((function(e,n){return t.trackBy?t.trackBy(n.dataIndex,n.data):n}))}},{key:"ngAfterContentChecked",value:function(){this._cacheRowDefs(),this._cacheColumnDefs();var t=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():t&&this.updateStickyColumnStyles(),this._checkStickyStates()}},{key:"ngOnDestroy",value:function(){this._rowOutlet.viewContainer.clear(),this._noDataRowOutlet.viewContainer.clear(),this._headerRowOutlet.viewContainer.clear(),this._footerRowOutlet.viewContainer.clear(),this._cachedRenderRowsMap.clear(),this._onDestroy.next(),this._onDestroy.complete(),Object(a.h)(this.dataSource)&&this.dataSource.disconnect(this)}},{key:"renderRows",value:function(){var t=this;this._renderRows=this._getAllRenderRows();var e=this._dataDiffer.diff(this._renderRows);if(e){var n=this._rowOutlet.viewContainer;this._viewRepeater?this._viewRepeater.applyChanges(e,n,(function(e,n,i){return t._getEmbeddedViewArgs(e.item,i)}),(function(t){return t.item.data}),(function(e){1===e.operation&&e.context&&t._renderCellTemplateForItem(e.record.item.rowDef,e.context)})):e.forEachOperation((function(e,i,a){if(null==e.previousIndex){var r=e.item;t._renderRow(t._rowOutlet,r.rowDef,a,{$implicit:r.data})}else if(null==a)n.remove(i);else{var o=n.get(i);n.move(o,a)}})),this._updateRowIndexContext(),e.forEachIdentityChange((function(t){n.get(t.currentIndex).context.$implicit=t.item.data})),this._updateNoDataRow(),this.updateStickyColumnStyles()}else this._updateNoDataRow()}},{key:"addColumnDef",value:function(t){this._customColumnDefs.add(t)}},{key:"removeColumnDef",value:function(t){this._customColumnDefs.delete(t)}},{key:"addRowDef",value:function(t){this._customRowDefs.add(t)}},{key:"removeRowDef",value:function(t){this._customRowDefs.delete(t)}},{key:"addHeaderRowDef",value:function(t){this._customHeaderRowDefs.add(t),this._headerRowDefChanged=!0}},{key:"removeHeaderRowDef",value:function(t){this._customHeaderRowDefs.delete(t),this._headerRowDefChanged=!0}},{key:"addFooterRowDef",value:function(t){this._customFooterRowDefs.add(t),this._footerRowDefChanged=!0}},{key:"removeFooterRowDef",value:function(t){this._customFooterRowDefs.delete(t),this._footerRowDefChanged=!0}},{key:"updateStickyHeaderRowStyles",value:function(){var t=this._getRenderedRows(this._headerRowOutlet),e=this._elementRef.nativeElement.querySelector("thead");e&&(e.style.display=t.length?"":"none");var n=this._headerRowDefs.map((function(t){return t.sticky}));this._stickyStyler.clearStickyPositioning(t,["top"]),this._stickyStyler.stickRows(t,n,"top"),this._headerRowDefs.forEach((function(t){return t.resetStickyChanged()}))}},{key:"updateStickyFooterRowStyles",value:function(){var t=this._getRenderedRows(this._footerRowOutlet),e=this._elementRef.nativeElement.querySelector("tfoot");e&&(e.style.display=t.length?"":"none");var n=this._footerRowDefs.map((function(t){return t.sticky}));this._stickyStyler.clearStickyPositioning(t,["bottom"]),this._stickyStyler.stickRows(t,n,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,n),this._footerRowDefs.forEach((function(t){return t.resetStickyChanged()}))}},{key:"updateStickyColumnStyles",value:function(){var t=this,e=this._getRenderedRows(this._headerRowOutlet),n=this._getRenderedRows(this._rowOutlet),i=this._getRenderedRows(this._footerRowOutlet);this._stickyStyler.clearStickyPositioning([].concat(_toConsumableArray(e),_toConsumableArray(n),_toConsumableArray(i)),["left","right"]),e.forEach((function(e,n){t._addStickyColumnStyles([e],t._headerRowDefs[n])})),this._rowDefs.forEach((function(e){for(var i=[],a=0;a<n.length;a++)t._renderRows[a].rowDef===e&&i.push(n[a]);t._addStickyColumnStyles(i,e)})),i.forEach((function(e,n){t._addStickyColumnStyles([e],t._footerRowDefs[n])})),Array.from(this._columnDefsByName.values()).forEach((function(t){return t.resetStickyChanged()}))}},{key:"_getAllRenderRows",value:function(){var t=[],e=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(var n=0;n<this._data.length;n++){var i=this._data[n],a=this._getRenderRowsForData(i,n,e.get(i));this._cachedRenderRowsMap.has(i)||this._cachedRenderRowsMap.set(i,new WeakMap);for(var r=0;r<a.length;r++){var o=a[r],s=this._cachedRenderRowsMap.get(o.data);s.has(o.rowDef)?s.get(o.rowDef).push(o):s.set(o.rowDef,[o]),t.push(o)}}return t}},{key:"_getRenderRowsForData",value:function(t,e,n){return this._getRowDefs(t,e).map((function(i){var a=n&&n.has(i)?n.get(i):[];if(a.length){var r=a.shift();return r.dataIndex=e,r}return{data:t,rowDef:i,dataIndex:e}}))}},{key:"_cacheColumnDefs",value:function(){var t=this;this._columnDefsByName.clear(),kt(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach((function(e){t._columnDefsByName.has(e.name),t._columnDefsByName.set(e.name,e)}))}},{key:"_cacheRowDefs",value:function(){this._headerRowDefs=kt(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=kt(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=kt(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);var t=this._rowDefs.filter((function(t){return!t.when}));this._defaultRowDef=t[0]}},{key:"_renderUpdatedColumns",value:function(){var t=function(t,e){return t||!!e.getColumnsDiff()},e=this._rowDefs.reduce(t,!1);e&&this._forceRenderDataRows();var n=this._headerRowDefs.reduce(t,!1);n&&this._forceRenderHeaderRows();var i=this._footerRowDefs.reduce(t,!1);return i&&this._forceRenderFooterRows(),e||n||i}},{key:"_switchDataSource",value:function(t){this._data=[],Object(a.h)(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),t||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear()),this._dataSource=t}},{key:"_observeRenderChanges",value:function(){var t,e=this;this.dataSource&&(Object(a.h)(this.dataSource)?t=this.dataSource.connect(this):Object(f.a)(this.dataSource)?t=this.dataSource:Array.isArray(this.dataSource)&&(t=Object(h.a)(this.dataSource)),this._renderChangeSubscription=t.pipe(Object(p.a)(this._onDestroy)).subscribe((function(t){e._data=t||[],e.renderRows()})))}},{key:"_forceRenderHeaderRows",value:function(){var t=this;this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((function(e,n){return t._renderRow(t._headerRowOutlet,e,n)})),this.updateStickyHeaderRowStyles()}},{key:"_forceRenderFooterRows",value:function(){var t=this;this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((function(e,n){return t._renderRow(t._footerRowOutlet,e,n)})),this.updateStickyFooterRowStyles()}},{key:"_addStickyColumnStyles",value:function(t,e){var n=this,i=Array.from(e.columns||[]).map((function(t){return n._columnDefsByName.get(t)})),a=i.map((function(t){return t.sticky})),r=i.map((function(t){return t.stickyEnd}));this._stickyStyler.updateStickyColumns(t,a,r)}},{key:"_getRenderedRows",value:function(t){for(var e=[],n=0;n<t.viewContainer.length;n++){var i=t.viewContainer.get(n);e.push(i.rootNodes[0])}return e}},{key:"_getRowDefs",value:function(t,e){if(1==this._rowDefs.length)return[this._rowDefs[0]];var n=[];if(this.multiTemplateDataRows)n=this._rowDefs.filter((function(n){return!n.when||n.when(e,t)}));else{var i=this._rowDefs.find((function(n){return n.when&&n.when(e,t)}))||this._defaultRowDef;i&&n.push(i)}return n}},{key:"_getEmbeddedViewArgs",value:function(t,e){return{templateRef:t.rowDef.template,context:{$implicit:t.data},index:e}}},{key:"_renderRow",value:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=t.viewContainer.createEmbeddedView(e.template,i,n);return this._renderCellTemplateForItem(e,i),a}},{key:"_renderCellTemplateForItem",value:function(t,e){var n,i=_createForOfIteratorHelper(this._getCellTemplates(t));try{for(i.s();!(n=i.n()).done;){var a=n.value;ut.mostRecentCellOutlet&&ut.mostRecentCellOutlet._viewContainer.createEmbeddedView(a,e)}}catch(r){i.e(r)}finally{i.f()}this._changeDetectorRef.markForCheck()}},{key:"_updateRowIndexContext",value:function(){for(var t=this._rowOutlet.viewContainer,e=0,n=t.length;e<n;e++){var i=t.get(e).context;i.count=n,i.first=0===e,i.last=e===n-1,i.even=e%2==0,i.odd=!i.even,this.multiTemplateDataRows?(i.dataIndex=this._renderRows[e].dataIndex,i.renderIndex=e):i.index=this._renderRows[e].dataIndex}}},{key:"_getCellTemplates",value:function(t){var e=this;return t&&t.columns?Array.from(t.columns,(function(n){var i=e._columnDefsByName.get(n);return t.extractCellTemplate(i)})):[]}},{key:"_applyNativeTableSections",value:function(){for(var t=this._document.createDocumentFragment(),e=0,n=[{tag:"thead",outlets:[this._headerRowOutlet]},{tag:"tbody",outlets:[this._rowOutlet,this._noDataRowOutlet]},{tag:"tfoot",outlets:[this._footerRowOutlet]}];e<n.length;e++){var i=n[e],a=this._document.createElement(i.tag);a.setAttribute("role","rowgroup");var r,o=_createForOfIteratorHelper(i.outlets);try{for(o.s();!(r=o.n()).done;){var s=r.value;a.appendChild(s.elementRef.nativeElement)}}catch(c){o.e(c)}finally{o.f()}t.appendChild(a)}this._elementRef.nativeElement.appendChild(t)}},{key:"_forceRenderDataRows",value:function(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}},{key:"_checkStickyStates",value:function(){var t=function(t,e){return t||e.hasStickyChanged()};this._headerRowDefs.reduce(t,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(t,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(t,!1)&&this.updateStickyColumnStyles()}},{key:"_setupStickyStyler",value:function(){var t=this;this._stickyStyler=new gt(this._isNativeHtmlTable,this.stickyCssClass,this._dir?this._dir.value:"ltr",this._coalescedStyleScheduler,this._platform.isBrowser,this.needsPositionStickyOnElement),(this._dir?this._dir.change:Object(h.a)()).pipe(Object(p.a)(this._onDestroy)).subscribe((function(e){t._stickyStyler.direction=e,t.updateStickyColumnStyles()}))}},{key:"_getOwnDefs",value:function(t){var e=this;return t.filter((function(t){return!t._table||t._table===e}))}},{key:"_updateNoDataRow",value:function(){if(this._noDataRow){var t=0===this._rowOutlet.viewContainer.length;if(t!==this._isShowingNoDataRow){var e=this._noDataRowOutlet.viewContainer;t?e.createEmbeddedView(this._noDataRow.templateRef):e.clear(),this._isShowingNoDataRow=t}}}},{key:"trackBy",get:function(){return this._trackByFn},set:function(t){this._trackByFn=t}},{key:"dataSource",get:function(){return this._dataSource},set:function(t){this._dataSource!==t&&this._switchDataSource(t)}},{key:"multiTemplateDataRows",get:function(){return this._multiTemplateDataRows},set:function(t){this._multiTemplateDataRows=Object(i.c)(t),this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles())}}]),t}()).\u0275fac=function(t){return new(t||L)(r.Qb(r.v),r.Qb(r.h),r.Qb(r.l),r.bc("role"),r.Qb(o.c,8),r.Qb(c.e),r.Qb(s.a),r.Qb(a.g,8),r.Qb(nt,8))},L.\u0275cmp=r.Kb({type:L,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(t,e,n){var i;1&t&&(r.Jb(n,pt,!0),r.Jb(n,K,!0),r.Jb(n,lt,!0),r.Jb(n,ot,!0),r.Jb(n,ct,!0)),2&t&&(r.yc(i=r.ec())&&(e._noDataRow=i.first),r.yc(i=r.ec())&&(e._contentColumnDefs=i),r.yc(i=r.ec())&&(e._contentRowDefs=i),r.yc(i=r.ec())&&(e._contentHeaderRowDefs=i),r.yc(i=r.ec())&&(e._contentFooterRowDefs=i))},viewQuery:function(t,e){var n;1&t&&(r.Kc(mt,!0),r.Kc(vt,!0),r.Kc(yt,!0),r.Kc(_t,!0)),2&t&&(r.yc(n=r.ec())&&(e._rowOutlet=n.first),r.yc(n=r.ec())&&(e._headerRowOutlet=n.first),r.yc(n=r.ec())&&(e._footerRowOutlet=n.first),r.yc(n=r.ec())&&(e._noDataRowOutlet=n.first))},hostAttrs:[1,"cdk-table"],inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:"multiTemplateDataRows"},exportAs:["cdkTable"],features:[r.Cb([{provide:U,useExisting:L},{provide:a.g,useClass:a.e},{provide:nt,useClass:it}])],ngContentSelectors:v,decls:6,vars:0,consts:[["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,e){1&t&&(r.nc(m),r.mc(0),r.mc(1,1),r.Sb(2,0),r.Sb(3,1),r.Sb(4,2),r.Sb(5,3))},directives:[vt,mt,_t,yt],encapsulation:2}),L);function kt(t,e){return t.concat(Array.from(e))}var xt,Ot,Dt=((Ot=function(){function t(e,n){_classCallCheck(this,t),this._table=e,this._options=n,this.justify="start",this._options=n||{}}return _createClass(t,[{key:"ngOnInit",value:function(){this._syncColumnDefName(),void 0===this.headerText&&(this.headerText=this._createDefaultHeaderText()),this.dataAccessor||(this.dataAccessor=this._options.defaultDataAccessor||function(t,e){return t[e]}),this._table&&(this.columnDef.cell=this.cell,this.columnDef.headerCell=this.headerCell,this._table.addColumnDef(this.columnDef))}},{key:"ngOnDestroy",value:function(){this._table&&this._table.removeColumnDef(this.columnDef)}},{key:"_createDefaultHeaderText",value:function(){var t=this.name;return this._options&&this._options.defaultHeaderTextTransform?this._options.defaultHeaderTextTransform(t):t[0].toUpperCase()+t.slice(1)}},{key:"_syncColumnDefName",value:function(){this.columnDef&&(this.columnDef.name=this.name)}},{key:"name",get:function(){return this._name},set:function(t){this._name=t,this._syncColumnDefName()}}]),t}()).\u0275fac=function(t){return new(t||Ot)(r.Qb(Ct,8),r.Qb(H,8))},Ot.\u0275cmp=r.Kb({type:Ot,selectors:[["cdk-text-column"]],viewQuery:function(t,e){var n;1&t&&(r.Kc(K,!0),r.Kc(G,!0),r.Kc($,!0)),2&t&&(r.yc(n=r.ec())&&(e.columnDef=n.first),r.yc(n=r.ec())&&(e.cell=n.first),r.yc(n=r.ec())&&(e.headerCell=n.first))},inputs:{justify:"justify",name:"name",headerText:"headerText",dataAccessor:"dataAccessor"},decls:3,vars:0,consts:[["cdkColumnDef",""],["cdk-header-cell","",3,"text-align",4,"cdkHeaderCellDef"],["cdk-cell","",3,"text-align",4,"cdkCellDef"],["cdk-header-cell",""],["cdk-cell",""]],template:function(t,e){1&t&&(r.Ub(0,0),r.Oc(1,y,2,3,"th",1),r.Oc(2,_,2,3,"td",2),r.Tb())},directives:[K,$,G,J,tt],encapsulation:2}),Ot),wt=((xt=function t(){_classCallCheck(this,t)}).\u0275mod=r.Ob({type:xt}),xt.\u0275inj=r.Nb({factory:function(t){return new(t||xt)},imports:[[g.g]]}),xt),Mt=n("FKr1"),St=n("quSY"),It=n("VRyK"),Pt=n("itXk"),Rt=n("lJxs"),Vt=[[["caption"]],[["colgroup"],["col"]]],jt=["caption","colgroup, col"];function At(t,e){if(1&t&&(r.Wb(0,"th",3),r.Qc(1),r.Vb()),2&t){var n=r.hc();r.Lc("text-align",n.justify),r.Db(1),r.Sc(" ",n.headerText," ")}}function Wt(t,e){if(1&t&&(r.Wb(0,"td",4),r.Qc(1),r.Vb()),2&t){var n=e.$implicit,i=r.hc();r.Lc("text-align",i.justify),r.Db(1),r.Sc(" ",i.dataAccessor(n,i.name)," ")}}var Tt,Et,Ft,Lt,Qt,Nt,zt,Bt,Ut,Ht,Gt,$t,Xt,qt,Kt,Yt,Jt,Zt=((Tt=function(t){_inherits(n,t);var e=_createSuper(n);function n(){var t;return _classCallCheck(this,n),(t=e.apply(this,arguments)).stickyCssClass="mat-table-sticky",t.needsPositionStickyOnElement=!1,t}return n}(Ct)).\u0275fac=function(t){return te(t||Tt)},Tt.\u0275cmp=r.Kb({type:Tt,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-table"],exportAs:["matTable"],features:[r.Cb([{provide:a.g,useClass:a.e},{provide:Ct,useExisting:Tt},{provide:U,useExisting:Tt},{provide:nt,useClass:it}]),r.Ab],ngContentSelectors:jt,decls:6,vars:0,consts:[["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(t,e){1&t&&(r.nc(Vt),r.mc(0),r.mc(1,1),r.Sb(2,0),r.Sb(3,1),r.Sb(4,2),r.Sb(5,3))},directives:[vt,mt,_t,yt],styles:['mat-table{display:block}mat-header-row{min-height:56px}mat-row,mat-footer-row{min-height:48px}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-row::after,mat-header-row::after,mat-footer-row::after{display:inline-block;min-height:inherit;content:""}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}table.mat-table{border-spacing:0}tr.mat-header-row{height:56px}tr.mat-row,tr.mat-footer-row{height:48px}th.mat-header-cell{text-align:left}[dir=rtl] th.mat-header-cell{text-align:right}th.mat-header-cell,td.mat-cell,td.mat-footer-cell{padding:0;border-bottom-width:1px;border-bottom-style:solid}th.mat-header-cell:first-of-type,td.mat-cell:first-of-type,td.mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] th.mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] td.mat-cell:first-of-type:not(:only-of-type),[dir=rtl] td.mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}th.mat-header-cell:last-of-type,td.mat-cell:last-of-type,td.mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] th.mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] td.mat-cell:last-of-type:not(:only-of-type),[dir=rtl] td.mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}.mat-table-sticky{position:-webkit-sticky;position:sticky}\n'],encapsulation:2}),Tt),te=r.Yb(Zt),ee=((Et=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return n}(G)).\u0275fac=function(t){return ne(t||Et)},Et.\u0275dir=r.Lb({type:Et,selectors:[["","matCellDef",""]],features:[r.Cb([{provide:G,useExisting:Et}]),r.Ab]}),Et),ne=r.Yb(ee),ie=((Ft=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return n}($)).\u0275fac=function(t){return ae(t||Ft)},Ft.\u0275dir=r.Lb({type:Ft,selectors:[["","matHeaderCellDef",""]],features:[r.Cb([{provide:$,useExisting:Ft}]),r.Ab]}),Ft),ae=r.Yb(ie),re=((Lt=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return n}(X)).\u0275fac=function(t){return oe(t||Lt)},Lt.\u0275dir=r.Lb({type:Lt,selectors:[["","matFooterCellDef",""]],features:[r.Cb([{provide:X,useExisting:Lt}]),r.Ab]}),Lt),oe=r.Yb(re),se=((Qt=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return _createClass(n,[{key:"_updateColumnCssClassName",value:function(){_get(_getPrototypeOf(n.prototype),"_updateColumnCssClassName",this).call(this),this._columnCssClassName.push("mat-column-"+this.cssClassFriendlyName)}},{key:"name",get:function(){return this._name},set:function(t){this._setNameInput(t)}}]),n}(K)).\u0275fac=function(t){return ce(t||Qt)},Qt.\u0275dir=r.Lb({type:Qt,selectors:[["","matColumnDef",""]],inputs:{sticky:"sticky",name:["matColumnDef","name"]},features:[r.Cb([{provide:K,useExisting:Qt},{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:Qt}]),r.Ab]}),Qt),ce=r.Yb(se),le=((Nt=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return n}(J)).\u0275fac=function(t){return ue(t||Nt)},Nt.\u0275dir=r.Lb({type:Nt,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-header-cell"],features:[r.Ab]}),Nt),ue=r.Yb(le),de=((zt=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return n}(Z)).\u0275fac=function(t){return fe(t||zt)},zt.\u0275dir=r.Lb({type:zt,selectors:[["mat-footer-cell"],["td","mat-footer-cell",""]],hostAttrs:["role","gridcell",1,"mat-footer-cell"],features:[r.Ab]}),zt),fe=r.Yb(de),he=((Bt=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return n}(tt)).\u0275fac=function(t){return pe(t||Bt)},Bt.\u0275dir=r.Lb({type:Bt,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:["role","gridcell",1,"mat-cell"],features:[r.Ab]}),Bt),pe=r.Yb(he),be=((Ut=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return n}(ot)).\u0275fac=function(t){return ge(t||Ut)},Ut.\u0275dir=r.Lb({type:Ut,selectors:[["","matHeaderRowDef",""]],inputs:{columns:["matHeaderRowDef","columns"],sticky:["matHeaderRowDefSticky","sticky"]},features:[r.Cb([{provide:ot,useExisting:Ut}]),r.Ab]}),Ut),ge=r.Yb(be),me=((Ht=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return n}(ct)).\u0275fac=function(t){return ve(t||Ht)},Ht.\u0275dir=r.Lb({type:Ht,selectors:[["","matFooterRowDef",""]],inputs:{columns:["matFooterRowDef","columns"],sticky:["matFooterRowDefSticky","sticky"]},features:[r.Cb([{provide:ct,useExisting:Ht}]),r.Ab]}),Ht),ve=r.Yb(me),ye=((Gt=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return n}(lt)).\u0275fac=function(t){return _e(t||Gt)},Gt.\u0275dir=r.Lb({type:Gt,selectors:[["","matRowDef",""]],inputs:{columns:["matRowDefColumns","columns"],when:["matRowDefWhen","when"]},features:[r.Cb([{provide:lt,useExisting:Gt}]),r.Ab]}),Gt),_e=r.Yb(ye),Ce=(($t=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return n}(dt)).\u0275fac=function(t){return ke(t||$t)},$t.\u0275cmp=r.Kb({type:$t,selectors:[["mat-header-row"],["tr","mat-header-row",""]],hostAttrs:["role","row",1,"mat-header-row"],exportAs:["matHeaderRow"],features:[r.Cb([{provide:dt,useExisting:$t}]),r.Ab],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,e){1&t&&r.Sb(0,0)},directives:[ut],encapsulation:2}),$t),ke=r.Yb(Ce),xe=((Xt=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return n}(ft)).\u0275fac=function(t){return Oe(t||Xt)},Xt.\u0275cmp=r.Kb({type:Xt,selectors:[["mat-footer-row"],["tr","mat-footer-row",""]],hostAttrs:["role","row",1,"mat-footer-row"],exportAs:["matFooterRow"],features:[r.Cb([{provide:ft,useExisting:Xt}]),r.Ab],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,e){1&t&&r.Sb(0,0)},directives:[ut],encapsulation:2}),Xt),Oe=r.Yb(xe),De=((qt=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return n}(ht)).\u0275fac=function(t){return we(t||qt)},qt.\u0275cmp=r.Kb({type:qt,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-row"],exportAs:["matRow"],features:[r.Cb([{provide:ht,useExisting:qt}]),r.Ab],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(t,e){1&t&&r.Sb(0,0)},directives:[ut],encapsulation:2}),qt),we=r.Yb(De),Me=((Kt=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return n}(pt)).\u0275fac=function(t){return Se(t||Kt)},Kt.\u0275dir=r.Lb({type:Kt,selectors:[["ng-template","matNoDataRow",""]],features:[r.Cb([{provide:pt,useExisting:Kt}]),r.Ab]}),Kt),Se=r.Yb(Me),Ie=((Yt=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return n}(Dt)).\u0275fac=function(t){return Pe(t||Yt)},Yt.\u0275cmp=r.Kb({type:Yt,selectors:[["mat-text-column"]],features:[r.Ab],decls:3,vars:0,consts:[["matColumnDef",""],["mat-header-cell","",3,"text-align",4,"matHeaderCellDef"],["mat-cell","",3,"text-align",4,"matCellDef"],["mat-header-cell",""],["mat-cell",""]],template:function(t,e){1&t&&(r.Ub(0,0),r.Oc(1,At,2,3,"th",1),r.Oc(2,Wt,2,3,"td",2),r.Tb())},directives:[se,ie,ee,le,he],encapsulation:2}),Yt),Pe=r.Yb(Ie),Re=((Jt=function t(){_classCallCheck(this,t)}).\u0275mod=r.Ob({type:Jt}),Jt.\u0275inj=r.Nb({factory:function(t){return new(t||Jt)},imports:[[wt,Mt.k],Mt.k]}),Jt),Ve=function(t){_inherits(n,t);var e=_createSuper(n);function n(){var t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return _classCallCheck(this,n),(t=e.call(this))._renderData=new d.a([]),t._filter=new d.a(""),t._internalPageChanges=new l.a,t._renderChangesSubscription=St.a.EMPTY,t.sortingDataAccessor=function(t,e){var n=t[e];if(Object(i.a)(n)){var a=Number(n);return a<9007199254740991?a:n}return n},t.sortData=function(e,n){var i=n.active,a=n.direction;return i&&""!=a?e.sort((function(e,n){var r=t.sortingDataAccessor(e,i),o=t.sortingDataAccessor(n,i),s=typeof r,c=typeof o;s!==c&&("number"===s&&(r+=""),"number"===c&&(o+=""));var l=0;return null!=r&&null!=o?r>o?l=1:r<o&&(l=-1):null!=r?l=1:null!=o&&(l=-1),l*("asc"==a?1:-1)})):e},t.filterPredicate=function(t,e){var n=Object.keys(t).reduce((function(e,n){return e+t[n]+"\u25ec"}),"").toLowerCase(),i=e.trim().toLowerCase();return-1!=n.indexOf(i)},t._data=new d.a(a),t._updateChangeSubscription(),t}return _createClass(n,[{key:"_updateChangeSubscription",value:function(){var t=this,e=this._sort?Object(It.a)(this._sort.sortChange,this._sort.initialized):Object(h.a)(null),n=this._paginator?Object(It.a)(this._paginator.page,this._internalPageChanges,this._paginator.initialized):Object(h.a)(null),i=this._data,a=Object(Pt.a)([i,this._filter]).pipe(Object(Rt.a)((function(e){var n=_slicedToArray(e,1)[0];return t._filterData(n)}))),r=Object(Pt.a)([a,e]).pipe(Object(Rt.a)((function(e){var n=_slicedToArray(e,1)[0];return t._orderData(n)}))),o=Object(Pt.a)([r,n]).pipe(Object(Rt.a)((function(e){var n=_slicedToArray(e,1)[0];return t._pageData(n)})));this._renderChangesSubscription.unsubscribe(),this._renderChangesSubscription=o.subscribe((function(e){return t._renderData.next(e)}))}},{key:"_filterData",value:function(t){var e=this;return this.filteredData=this.filter?t.filter((function(t){return e.filterPredicate(t,e.filter)})):t,this.paginator&&this._updatePaginator(this.filteredData.length),this.filteredData}},{key:"_orderData",value:function(t){return this.sort?this.sortData(t.slice(),this.sort):t}},{key:"_pageData",value:function(t){if(!this.paginator)return t;var e=this.paginator.pageIndex*this.paginator.pageSize;return t.slice(e,e+this.paginator.pageSize)}},{key:"_updatePaginator",value:function(t){var e=this;Promise.resolve().then((function(){var n=e.paginator;if(n&&(n.length=t,n.pageIndex>0)){var i=Math.ceil(n.length/n.pageSize)-1||0,a=Math.min(n.pageIndex,i);a!==n.pageIndex&&(n.pageIndex=a,e._internalPageChanges.next())}}))}},{key:"connect",value:function(){return this._renderData}},{key:"disconnect",value:function(){}},{key:"data",get:function(){return this._data.value},set:function(t){this._data.next(t)}},{key:"filter",get:function(){return this._filter.value},set:function(t){this._filter.next(t)}},{key:"sort",get:function(){return this._sort},set:function(t){this._sort=t,this._updateChangeSubscription()}},{key:"paginator",get:function(){return this._paginator},set:function(t){this._paginator=t,this._updateChangeSubscription()}}]),n}(a.b)},"+rOU":function(t,e,n){"use strict";n.d(e,"a",(function(){return l})),n.d(e,"b",(function(){return f})),n.d(e,"c",(function(){return h})),n.d(e,"d",(function(){return o})),n.d(e,"e",(function(){return d})),n.d(e,"f",(function(){return u})),n.d(e,"g",(function(){return p})),n.d(e,"h",(function(){return g})),n.d(e,"i",(function(){return s}));var i=n("fXoL"),a=n("ofXK"),r=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"attach",value:function(t){return this._attachedHost=t,t.attach(this)}},{key:"detach",value:function(){var t=this._attachedHost;null!=t&&(this._attachedHost=null,t.detach())}},{key:"setAttachedHost",value:function(t){this._attachedHost=t}},{key:"isAttached",get:function(){return null!=this._attachedHost}}]),t}(),o=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a,r){var o;return _classCallCheck(this,n),(o=e.call(this)).component=t,o.viewContainerRef=i,o.injector=a,o.componentFactoryResolver=r,o}return n}(r),s=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a){var r;return _classCallCheck(this,n),(r=e.call(this)).templateRef=t,r.viewContainerRef=i,r.context=a,r}return _createClass(n,[{key:"attach",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.context;return this.context=e,_get(_getPrototypeOf(n.prototype),"attach",this).call(this,t)}},{key:"detach",value:function(){return this.context=void 0,_get(_getPrototypeOf(n.prototype),"detach",this).call(this)}},{key:"origin",get:function(){return this.templateRef.elementRef}}]),n}(r),c=function(t){_inherits(n,t);var e=_createSuper(n);function n(t){var a;return _classCallCheck(this,n),(a=e.call(this)).element=t instanceof i.l?t.nativeElement:t,a}return n}(r),l=function(){function t(){_classCallCheck(this,t),this._isDisposed=!1,this.attachDomPortal=null}return _createClass(t,[{key:"hasAttached",value:function(){return!!this._attachedPortal}},{key:"attach",value:function(t){return t instanceof o?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof s?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof c?(this._attachedPortal=t,this.attachDomPortal(t)):void 0}},{key:"detach",value:function(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}},{key:"dispose",value:function(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}},{key:"setDisposeFn",value:function(t){this._disposeFn=t}},{key:"_invokeDisposeFn",value:function(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}}]),t}(),u=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a,r,o){var s,c;return _classCallCheck(this,n),(c=e.call(this)).outletElement=t,c._componentFactoryResolver=i,c._appRef=a,c._defaultInjector=r,c.attachDomPortal=function(t){var e=t.element,i=c._document.createComment("dom-portal");e.parentNode.insertBefore(i,e),c.outletElement.appendChild(e),_get((s=_assertThisInitialized(c),_getPrototypeOf(n.prototype)),"setDisposeFn",s).call(s,(function(){i.parentNode&&i.parentNode.replaceChild(e,i)}))},c._document=o,c}return _createClass(n,[{key:"attachComponentPortal",value:function(t){var e,n=this,i=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component);return t.viewContainerRef?(e=t.viewContainerRef.createComponent(i,t.viewContainerRef.length,t.injector||t.viewContainerRef.injector),this.setDisposeFn((function(){return e.destroy()}))):(e=i.create(t.injector||this._defaultInjector),this._appRef.attachView(e.hostView),this.setDisposeFn((function(){n._appRef.detachView(e.hostView),e.destroy()}))),this.outletElement.appendChild(this._getComponentRootNode(e)),e}},{key:"attachTemplatePortal",value:function(t){var e=this,n=t.viewContainerRef,i=n.createEmbeddedView(t.templateRef,t.context);return i.rootNodes.forEach((function(t){return e.outletElement.appendChild(t)})),i.detectChanges(),this.setDisposeFn((function(){var t=n.indexOf(i);-1!==t&&n.remove(t)})),i}},{key:"dispose",value:function(){_get(_getPrototypeOf(n.prototype),"dispose",this).call(this),null!=this.outletElement.parentNode&&this.outletElement.parentNode.removeChild(this.outletElement)}},{key:"_getComponentRootNode",value:function(t){return t.hostView.rootNodes[0]}}]),n}(l),d=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return n}(u),f=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){return _classCallCheck(this,n),e.call(this,t,i)}return n}(s);return t.\u0275fac=function(e){return new(e||t)(i.Qb(i.P),i.Qb(i.T))},t.\u0275dir=i.Lb({type:t,selectors:[["","cdkPortal",""]],exportAs:["cdkPortal"],features:[i.Ab]}),t}(),h=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,a,r){var o,s;return _classCallCheck(this,n),(s=e.call(this))._componentFactoryResolver=t,s._viewContainerRef=a,s._isInitialized=!1,s.attached=new i.o,s.attachDomPortal=function(t){var e=t.element,i=s._document.createComment("dom-portal");t.setAttachedHost(_assertThisInitialized(s)),e.parentNode.insertBefore(i,e),s._getRootNode().appendChild(e),_get((o=_assertThisInitialized(s),_getPrototypeOf(n.prototype)),"setDisposeFn",o).call(o,(function(){i.parentNode&&i.parentNode.replaceChild(e,i)}))},s._document=r,s}return _createClass(n,[{key:"ngOnInit",value:function(){this._isInitialized=!0}},{key:"ngOnDestroy",value:function(){_get(_getPrototypeOf(n.prototype),"dispose",this).call(this),this._attachedPortal=null,this._attachedRef=null}},{key:"attachComponentPortal",value:function(t){t.setAttachedHost(this);var e=null!=t.viewContainerRef?t.viewContainerRef:this._viewContainerRef,i=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component),a=e.createComponent(i,e.length,t.injector||e.injector);return e!==this._viewContainerRef&&this._getRootNode().appendChild(a.hostView.rootNodes[0]),_get(_getPrototypeOf(n.prototype),"setDisposeFn",this).call(this,(function(){return a.destroy()})),this._attachedPortal=t,this._attachedRef=a,this.attached.emit(a),a}},{key:"attachTemplatePortal",value:function(t){var e=this;t.setAttachedHost(this);var i=this._viewContainerRef.createEmbeddedView(t.templateRef,t.context);return _get(_getPrototypeOf(n.prototype),"setDisposeFn",this).call(this,(function(){return e._viewContainerRef.clear()})),this._attachedPortal=t,this._attachedRef=i,this.attached.emit(i),i}},{key:"_getRootNode",value:function(){var t=this._viewContainerRef.element.nativeElement;return t.nodeType===t.ELEMENT_NODE?t:t.parentNode}},{key:"portal",get:function(){return this._attachedPortal},set:function(t){(!this.hasAttached()||t||this._isInitialized)&&(this.hasAttached()&&_get(_getPrototypeOf(n.prototype),"detach",this).call(this),t&&_get(_getPrototypeOf(n.prototype),"attach",this).call(this,t),this._attachedPortal=t)}},{key:"attachedRef",get:function(){return this._attachedRef}}]),n}(l);return t.\u0275fac=function(e){return new(e||t)(i.Qb(i.j),i.Qb(i.T),i.Qb(a.e))},t.\u0275dir=i.Lb({type:t,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[i.Ab]}),t}(),p=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return n}(h);return t.\u0275fac=function(e){return b(e||t)},t.\u0275dir=i.Lb({type:t,selectors:[["","cdkPortalHost",""],["","portalHost",""]],inputs:{portal:["cdkPortalHost","portal"]},exportAs:["cdkPortalHost"],features:[i.Cb([{provide:h,useExisting:t}]),i.Ab]}),t}(),b=i.Yb(p),g=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=i.Ob({type:t}),t.\u0275inj=i.Nb({factory:function(e){return new(e||t)}}),t}()},"/1cH":function(t,e,n){"use strict";n.d(e,"a",(function(){return T})),n.d(e,"b",(function(){return $})),n.d(e,"c",(function(){return L})),n.d(e,"d",(function(){return H}));var i=n("u47x"),a=n("8LU1"),r=n("fXoL"),o=n("FKr1"),s=n("quSY"),c=n("XNiG"),l=n("NXyV"),u=n("VRyK"),d=n("LRne"),f=n("xgIS"),h=n("ofXK"),p=n("rDax"),b=n("vxfF"),g=n("FtGj"),m=n("nLfN"),v=n("+rOU"),y=n("3Pt+"),_=n("kmnG"),C=n("IzEk"),k=n("eIep"),x=n("pLZG"),O=n("lJxs"),D=n("vkgz"),w=n("3E0/"),M=n("cH1L"),S=["panel"];function I(t,e){if(1&t&&(r.Wb(0,"div",0,1),r.mc(2),r.Vb()),2&t){var n=r.hc();r.oc("id",n.id)("ngClass",n._classList)}}var P=["*"],R=0,V=function t(e,n){_classCallCheck(this,t),this.source=e,this.option=n},j=Object(o.B)((function t(){_classCallCheck(this,t)})),A=new r.s("mat-autocomplete-default-options",{providedIn:"root",factory:function(){return{autoActiveFirstOption:!1}}}),W=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a){var o;return _classCallCheck(this,n),(o=e.call(this))._changeDetectorRef=t,o._elementRef=i,o._activeOptionChanges=s.a.EMPTY,o.showPanel=!1,o._isOpen=!1,o.displayWith=null,o.optionSelected=new r.o,o.opened=new r.o,o.closed=new r.o,o.optionActivated=new r.o,o._classList={},o.id="mat-autocomplete-"+R++,o._autoActiveFirstOption=!!a.autoActiveFirstOption,o}return _createClass(n,[{key:"ngAfterContentInit",value:function(){var t=this;this._keyManager=new i.b(this.options).withWrap(),this._activeOptionChanges=this._keyManager.change.subscribe((function(e){t.optionActivated.emit({source:t,option:t.options.toArray()[e]||null})})),this._setVisibility()}},{key:"ngOnDestroy",value:function(){this._activeOptionChanges.unsubscribe()}},{key:"_setScrollTop",value:function(t){this.panel&&(this.panel.nativeElement.scrollTop=t)}},{key:"_getScrollTop",value:function(){return this.panel?this.panel.nativeElement.scrollTop:0}},{key:"_setVisibility",value:function(){this.showPanel=!!this.options.length,this._setVisibilityClasses(this._classList),this._changeDetectorRef.markForCheck()}},{key:"_emitSelectEvent",value:function(t){var e=new V(this,t);this.optionSelected.emit(e)}},{key:"_setVisibilityClasses",value:function(t){t[this._visibleClass]=this.showPanel,t[this._hiddenClass]=!this.showPanel}},{key:"isOpen",get:function(){return this._isOpen&&this.showPanel}},{key:"autoActiveFirstOption",get:function(){return this._autoActiveFirstOption},set:function(t){this._autoActiveFirstOption=Object(a.c)(t)}},{key:"classList",set:function(t){this._classList=t&&t.length?t.split(" ").reduce((function(t,e){return t[e.trim()]=!0,t}),{}):{},this._setVisibilityClasses(this._classList),this._elementRef.nativeElement.className=""}}]),n}(j);return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.h),r.Qb(r.l),r.Qb(A))},t.\u0275dir=r.Lb({type:t,viewQuery:function(t,e){var n;1&t&&(r.Kc(r.P,!0),r.Xc(S,!0)),2&t&&(r.yc(n=r.ec())&&(e.template=n.first),r.yc(n=r.ec())&&(e.panel=n.first))},inputs:{displayWith:"displayWith",autoActiveFirstOption:"autoActiveFirstOption",classList:["class","classList"],panelWidth:"panelWidth"},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},features:[r.Ab]}),t}(),T=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(){var t;return _classCallCheck(this,n),(t=e.apply(this,arguments))._visibleClass="mat-autocomplete-visible",t._hiddenClass="mat-autocomplete-hidden",t}return n}(W);return t.\u0275fac=function(e){return E(e||t)},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-autocomplete"]],contentQueries:function(t,e,n){var i;1&t&&(r.Jb(n,o.h,!0),r.Jb(n,o.p,!0)),2&t&&(r.yc(i=r.ec())&&(e.optionGroups=i),r.yc(i=r.ec())&&(e.options=i))},hostAttrs:[1,"mat-autocomplete"],inputs:{disableRipple:"disableRipple"},exportAs:["matAutocomplete"],features:[r.Cb([{provide:o.i,useExisting:t}]),r.Ab],ngContentSelectors:P,decls:1,vars:0,consts:[["role","listbox",1,"mat-autocomplete-panel",3,"id","ngClass"],["panel",""]],template:function(t,e){1&t&&(r.nc(),r.Oc(0,I,3,2,"ng-template"))},directives:[h.q],styles:[".mat-autocomplete-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;visibility:hidden;max-width:none;max-height:256px;position:relative;width:100%;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.mat-autocomplete-panel.mat-autocomplete-visible{visibility:visible}.mat-autocomplete-panel.mat-autocomplete-hidden{visibility:hidden}.mat-autocomplete-panel-above .mat-autocomplete-panel{border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px}.mat-autocomplete-panel .mat-divider-horizontal{margin-top:-1px}.cdk-high-contrast-active .mat-autocomplete-panel{outline:solid 1px}\n"],encapsulation:2,changeDetection:0}),t}(),E=r.Yb(T),F=function(){var t=function t(e){_classCallCheck(this,t),this.elementRef=e};return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l))},t.\u0275dir=r.Lb({type:t}),t}(),L=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return n}(F);return t.\u0275fac=function(e){return Q(e||t)},t.\u0275dir=r.Lb({type:t,selectors:[["","matAutocompleteOrigin",""]],exportAs:["matAutocompleteOrigin"],features:[r.Ab]}),t}(),Q=r.Yb(L),N=new r.s("mat-autocomplete-scroll-strategy"),z={provide:N,deps:[p.c],useFactory:function(t){return function(){return t.scrollStrategies.reposition()}}},B={provide:y.s,useExisting:Object(r.X)((function(){return H})),multi:!0},U=function(){var t=function(){function t(e,n,i,a,r,o,d,f,h,p){var b=this;_classCallCheck(this,t),this._element=e,this._overlay=n,this._viewContainerRef=i,this._zone=a,this._changeDetectorRef=r,this._dir=d,this._formField=f,this._document=h,this._viewportRuler=p,this._componentDestroyed=!1,this._autocompleteDisabled=!1,this._manuallyFloatingLabel=!1,this._viewportSubscription=s.a.EMPTY,this._canOpenOnNextFocus=!0,this._closeKeyEventStream=new c.a,this._windowBlurHandler=function(){b._canOpenOnNextFocus=b._document.activeElement!==b._element.nativeElement||b.panelOpen},this._onChange=function(){},this._onTouched=function(){},this.position="auto",this.autocompleteAttribute="off",this._overlayAttached=!1,this.optionSelections=Object(l.a)((function(){return b.autocomplete&&b.autocomplete.options?Object(u.a).apply(void 0,_toConsumableArray(b.autocomplete.options.map((function(t){return t.onSelectionChange})))):b._zone.onStable.pipe(Object(C.a)(1),Object(k.a)((function(){return b.optionSelections})))})),this._scrollStrategy=o}return _createClass(t,[{key:"ngAfterViewInit",value:function(){var t=this,e=this._getWindow();void 0!==e&&this._zone.runOutsideAngular((function(){return e.addEventListener("blur",t._windowBlurHandler)}))}},{key:"ngOnChanges",value:function(t){t.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}},{key:"ngOnDestroy",value:function(){var t=this._getWindow();void 0!==t&&t.removeEventListener("blur",this._windowBlurHandler),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete()}},{key:"openPanel",value:function(){this._attachOverlay(),this._floatLabel()}},{key:"closePanel",value:function(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this.autocomplete.closed.emit(),this.autocomplete._isOpen=this._overlayAttached=!1,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._componentDestroyed||this._changeDetectorRef.detectChanges())}},{key:"updatePosition",value:function(){this._overlayAttached&&this._overlayRef.updatePosition()}},{key:"_getOutsideClickStream",value:function(){var t=this;return Object(u.a)(Object(f.a)(this._document,"click"),Object(f.a)(this._document,"touchend")).pipe(Object(x.a)((function(e){var n=t._isInsideShadowRoot&&e.composedPath?e.composedPath()[0]:e.target,i=t._formField?t._formField._elementRef.nativeElement:null,a=t.connectedTo?t.connectedTo.elementRef.nativeElement:null;return t._overlayAttached&&n!==t._element.nativeElement&&(!i||!i.contains(n))&&(!a||!a.contains(n))&&!!t._overlayRef&&!t._overlayRef.overlayElement.contains(n)})))}},{key:"writeValue",value:function(t){var e=this;Promise.resolve(null).then((function(){return e._setTriggerValue(t)}))}},{key:"registerOnChange",value:function(t){this._onChange=t}},{key:"registerOnTouched",value:function(t){this._onTouched=t}},{key:"setDisabledState",value:function(t){this._element.nativeElement.disabled=t}},{key:"_handleKeydown",value:function(t){var e=t.keyCode;if(e!==g.h||Object(g.v)(t)||t.preventDefault(),this.activeOption&&e===g.g&&this.panelOpen)this.activeOption._selectViaInteraction(),this._resetActiveItem(),t.preventDefault();else if(this.autocomplete){var n=this.autocomplete._keyManager.activeItem,i=e===g.s||e===g.e;this.panelOpen||e===g.r?this.autocomplete._keyManager.onKeydown(t):i&&this._canOpen()&&this.openPanel(),(i||this.autocomplete._keyManager.activeItem!==n)&&this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0)}}},{key:"_handleInput",value:function(t){var e=t.target,n=e.value;"number"===e.type&&(n=""==n?null:parseFloat(n)),this._previousValue!==n&&(this._previousValue=n,this._onChange(n),this._canOpen()&&this._document.activeElement===t.target&&this.openPanel())}},{key:"_handleFocus",value:function(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}},{key:"_floatLabel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._formField&&"auto"===this._formField.floatLabel&&(t?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}},{key:"_resetLabel",value:function(){this._manuallyFloatingLabel&&(this._formField.floatLabel="auto",this._manuallyFloatingLabel=!1)}},{key:"_subscribeToClosingActions",value:function(){var t=this,e=this._zone.onStable.pipe(Object(C.a)(1)),n=this.autocomplete.options.changes.pipe(Object(D.a)((function(){return t._positionStrategy.reapplyLastPosition()})),Object(w.a)(0));return Object(u.a)(e,n).pipe(Object(k.a)((function(){var e=t.panelOpen;return t._resetActiveItem(),t.autocomplete._setVisibility(),t.panelOpen&&(t._overlayRef.updatePosition(),e!==t.panelOpen&&t.autocomplete.opened.emit()),t.panelClosingActions})),Object(C.a)(1)).subscribe((function(e){return t._setValueAndClose(e)}))}},{key:"_destroyPanel",value:function(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}},{key:"_setTriggerValue",value:function(t){var e=this.autocomplete&&this.autocomplete.displayWith?this.autocomplete.displayWith(t):t,n=null!=e?e:"";this._formField?this._formField._control.value=n:this._element.nativeElement.value=n,this._previousValue=n}},{key:"_setValueAndClose",value:function(t){t&&t.source&&(this._clearPreviousSelectedOption(t.source),this._setTriggerValue(t.source.value),this._onChange(t.source.value),this._element.nativeElement.focus(),this.autocomplete._emitSelectEvent(t.source)),this.closePanel()}},{key:"_clearPreviousSelectedOption",value:function(t){this.autocomplete.options.forEach((function(e){e!==t&&e.selected&&e.deselect()}))}},{key:"_attachOverlay",value:function(){var t=this;null==this._isInsideShadowRoot&&(this._isInsideShadowRoot=!!Object(m.c)(this._element.nativeElement));var e=this._overlayRef;e?(this._positionStrategy.setOrigin(this._getConnectedElement()),e.updateSize({width:this._getPanelWidth()})):(this._portal=new v.i(this.autocomplete.template,this._viewContainerRef),e=this._overlay.create(this._getOverlayConfig()),this._overlayRef=e,e.keydownEvents().subscribe((function(e){(e.keyCode===g.h&&!Object(g.v)(e)||e.keyCode===g.s&&Object(g.v)(e,"altKey"))&&(t._resetActiveItem(),t._closeKeyEventStream.next(),e.stopPropagation(),e.preventDefault())})),this._viewportSubscription=this._viewportRuler.change().subscribe((function(){t.panelOpen&&e&&e.updateSize({width:t._getPanelWidth()})}))),e&&!e.hasAttached()&&(e.attach(this._portal),this._closingActionsSubscription=this._subscribeToClosingActions());var n=this.panelOpen;this.autocomplete._setVisibility(),this.autocomplete._isOpen=this._overlayAttached=!0,this.panelOpen&&n!==this.panelOpen&&this.autocomplete.opened.emit()}},{key:"_getOverlayConfig",value:function(){return new p.d({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir})}},{key:"_getOverlayPosition",value:function(){var t=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(t),this._positionStrategy=t,t}},{key:"_setStrategyPositions",value:function(t){var e,n=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],i=this._aboveClass,a=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:i},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:i}];e="above"===this.position?a:"below"===this.position?n:[].concat(n,a),t.withPositions(e)}},{key:"_getConnectedElement",value:function(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}},{key:"_getPanelWidth",value:function(){return this.autocomplete.panelWidth||this._getHostWidth()}},{key:"_getHostWidth",value:function(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}},{key:"_resetActiveItem",value:function(){this.autocomplete._keyManager.setActiveItem(this.autocomplete.autoActiveFirstOption?0:-1)}},{key:"_canOpen",value:function(){var t=this._element.nativeElement;return!t.readOnly&&!t.disabled&&!this._autocompleteDisabled}},{key:"_getWindow",value:function(){var t;return(null===(t=this._document)||void 0===t?void 0:t.defaultView)||window}},{key:"_scrollToOption",value:function(t){var e=this.autocomplete,n=Object(o.y)(t,e.options,e.optionGroups);if(0===t&&1===n)e._setScrollTop(0);else{var i=e.options.toArray()[t];if(i){var a=i._getHostElement(),r=Object(o.z)(a.offsetTop,a.offsetHeight,e._getScrollTop(),e.panel.nativeElement.offsetHeight);e._setScrollTop(r)}}}},{key:"autocompleteDisabled",get:function(){return this._autocompleteDisabled},set:function(t){this._autocompleteDisabled=Object(a.c)(t)}},{key:"panelOpen",get:function(){return this._overlayAttached&&this.autocomplete.showPanel}},{key:"panelClosingActions",get:function(){var t=this;return Object(u.a)(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(Object(x.a)((function(){return t._overlayAttached}))),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(Object(x.a)((function(){return t._overlayAttached}))):Object(d.a)()).pipe(Object(O.a)((function(t){return t instanceof o.r?t:null})))}},{key:"activeOption",get:function(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l),r.Qb(p.c),r.Qb(r.T),r.Qb(r.C),r.Qb(r.h),r.Qb(N),r.Qb(M.c,8),r.Qb(_.a,9),r.Qb(h.e,8),r.Qb(b.h))},t.\u0275dir=r.Lb({type:t,inputs:{position:["matAutocompletePosition","position"],autocompleteAttribute:["autocomplete","autocompleteAttribute"],autocompleteDisabled:["matAutocompleteDisabled","autocompleteDisabled"],autocomplete:["matAutocomplete","autocomplete"],connectedTo:["matAutocompleteConnectedTo","connectedTo"]},features:[r.Bb]}),t}(),H=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(){var t;return _classCallCheck(this,n),(t=e.apply(this,arguments))._aboveClass="mat-autocomplete-panel-above",t}return n}(U);return t.\u0275fac=function(e){return G(e||t)},t.\u0275dir=r.Lb({type:t,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-autocomplete-trigger"],hostVars:7,hostBindings:function(t,e){1&t&&r.dc("focusin",(function(){return e._handleFocus()}))("blur",(function(){return e._onTouched()}))("input",(function(t){return e._handleInput(t)}))("keydown",(function(t){return e._handleKeydown(t)})),2&t&&r.Eb("autocomplete",e.autocompleteAttribute)("role",e.autocompleteDisabled?null:"combobox")("aria-autocomplete",e.autocompleteDisabled?null:"list")("aria-activedescendant",e.panelOpen&&e.activeOption?e.activeOption.id:null)("aria-expanded",e.autocompleteDisabled?null:e.panelOpen.toString())("aria-owns",e.autocompleteDisabled||!e.panelOpen||null==e.autocomplete?null:e.autocomplete.id)("aria-haspopup",!e.autocompleteDisabled)},exportAs:["matAutocompleteTrigger"],features:[r.Cb([B]),r.Ab]}),t}(),G=r.Yb(H),$=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=r.Ob({type:t}),t.\u0275inj=r.Nb({factory:function(e){return new(e||t)},providers:[z],imports:[[p.f,o.q,o.k,h.c],b.c,o.q,o.k]}),t}()},"/t3+":function(t,e,n){"use strict";n.d(e,"a",(function(){return d})),n.d(e,"b",(function(){return f})),n.d(e,"c",(function(){return u}));var i=n("FKr1"),a=n("ofXK"),r=n("fXoL"),o=n("nLfN"),s=["*",[["mat-toolbar-row"]]],c=["*","mat-toolbar-row"],l=Object(i.A)((function t(e){_classCallCheck(this,t),this._elementRef=e})),u=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Lb({type:t,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),t}(),d=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a){var r;return _classCallCheck(this,n),(r=e.call(this,t))._platform=i,r._document=a,r}return _createClass(n,[{key:"ngAfterViewInit",value:function(){var t=this;this._platform.isBrowser&&(this._checkToolbarMixedModes(),this._toolbarRows.changes.subscribe((function(){return t._checkToolbarMixedModes()})))}},{key:"_checkToolbarMixedModes",value:function(){}}]),n}(l);return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l),r.Qb(o.a),r.Qb(a.e))},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-toolbar"]],contentQueries:function(t,e,n){var i;1&t&&r.Jb(n,u,!0),2&t&&r.yc(i=r.ec())&&(e._toolbarRows=i)},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(t,e){2&t&&r.Ib("mat-toolbar-multiple-rows",e._toolbarRows.length>0)("mat-toolbar-single-row",0===e._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[r.Ab],ngContentSelectors:c,decls:2,vars:0,template:function(t,e){1&t&&(r.nc(s),r.mc(0),r.mc(1,1))},styles:[".cdk-high-contrast-active .mat-toolbar{outline:solid 1px}.mat-toolbar-row,.mat-toolbar-single-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap}.mat-toolbar-multiple-rows{display:flex;box-sizing:border-box;flex-direction:column;width:100%}\n"],encapsulation:2,changeDetection:0}),t}(),f=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=r.Ob({type:t}),t.\u0275inj=r.Nb({factory:function(e){return new(e||t)},imports:[[i.k],i.k]}),t}()},"/uUt":function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n("7o/Q");function a(t,e){return function(n){return n.lift(new r(t,e))}}var r=function(){function t(e,n){_classCallCheck(this,t),this.compare=e,this.keySelector=n}return _createClass(t,[{key:"call",value:function(t,e){return e.subscribe(new o(t,this.compare,this.keySelector))}}]),t}(),o=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a){var r;return _classCallCheck(this,n),(r=e.call(this,t)).keySelector=a,r.hasKey=!1,"function"==typeof i&&(r.compare=i),r}return _createClass(n,[{key:"compare",value:function(t,e){return t===e}},{key:"_next",value:function(t){var e;try{var n=this.keySelector;e=n?n(t):t}catch(a){return this.destination.error(a)}var i=!1;if(this.hasKey)try{i=(0,this.compare)(this.key,e)}catch(a){return this.destination.error(a)}else this.hasKey=!0;i||(this.key=e,this.destination.next(t))}}]),n}(i.a)},0:function(t,e,n){t.exports=n("jj9e")},"0EQZ":function(t,e,n){"use strict";n.d(e,"a",(function(){return l})),n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return f})),n.d(e,"d",(function(){return h})),n.d(e,"e",(function(){return u})),n.d(e,"f",(function(){return d})),n.d(e,"g",(function(){return p})),n.d(e,"h",(function(){return c}));var i=n("7+OI"),a=n("LRne"),r=n("XNiG"),o=n("fXoL"),s=function t(){_classCallCheck(this,t)};function c(t){return t&&"function"==typeof t.connect}var l=function(t){_inherits(n,t);var e=_createSuper(n);function n(t){var i;return _classCallCheck(this,n),(i=e.call(this))._data=t,i}return _createClass(n,[{key:"connect",value:function(){return Object(i.a)(this._data)?this._data:Object(a.a)(this._data)}},{key:"disconnect",value:function(){}}]),n}(s),u=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"applyChanges",value:function(t,e,n,i,a){t.forEachOperation((function(t,i,r){var o,s;if(null==t.previousIndex){var c=n(t,i,r);o=e.createEmbeddedView(c.templateRef,c.context,c.index),s=1}else null==r?(e.remove(i),s=3):(o=e.get(i),e.move(o,r),s=2);a&&a({context:null==o?void 0:o.context,operation:s,record:t})}))}},{key:"detach",value:function(){}}]),t}(),d=function(){function t(){_classCallCheck(this,t),this.viewCacheSize=20,this._viewCache=[]}return _createClass(t,[{key:"applyChanges",value:function(t,e,n,i,a){var r=this;t.forEachOperation((function(t,o,s){var c,l;null==t.previousIndex?l=(c=r._insertView((function(){return n(t,o,s)}),s,e,i(t)))?1:0:null==s?(r._detachAndCacheView(o,e),l=3):(c=r._moveView(o,s,e,i(t)),l=2),a&&a({context:null==c?void 0:c.context,operation:l,record:t})}))}},{key:"detach",value:function(){var t,e=_createForOfIteratorHelper(this._viewCache);try{for(e.s();!(t=e.n()).done;){t.value.destroy()}}catch(n){e.e(n)}finally{e.f()}}},{key:"_insertView",value:function(t,e,n,i){var a=this._insertViewFromCache(e,n);if(!a){var r=t();return n.createEmbeddedView(r.templateRef,r.context,r.index)}a.context.$implicit=i}},{key:"_detachAndCacheView",value:function(t,e){var n=this._detachView(t,e);this._maybeCacheView(n,e)}},{key:"_moveView",value:function(t,e,n,i){var a=n.get(t);return n.move(a,e),a.context.$implicit=i,a}},{key:"_maybeCacheView",value:function(t,e){if(this._viewCache.length<this.viewCacheSize)this._viewCache.push(t);else{var n=e.indexOf(t);-1===n?t.destroy():e.remove(n)}}},{key:"_insertViewFromCache",value:function(t,e){var n=this._viewCache.pop();return n&&e.insert(n,t),n||null}},{key:"_detachView",value:function(t,e){return e.detach(t)}}]),t}(),f=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1?arguments[1]:void 0,a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];_classCallCheck(this,t),this._multiple=n,this._emitChanges=a,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new r.a,i&&i.length&&(n?i.forEach((function(t){return e._markSelected(t)})):this._markSelected(i[0]),this._selectedToEmit.length=0)}return _createClass(t,[{key:"select",value:function(){for(var t=this,e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];this._verifyValueAssignment(n),n.forEach((function(e){return t._markSelected(e)})),this._emitChangeEvent()}},{key:"deselect",value:function(){for(var t=this,e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];this._verifyValueAssignment(n),n.forEach((function(e){return t._unmarkSelected(e)})),this._emitChangeEvent()}},{key:"toggle",value:function(t){this.isSelected(t)?this.deselect(t):this.select(t)}},{key:"clear",value:function(){this._unmarkAll(),this._emitChangeEvent()}},{key:"isSelected",value:function(t){return this._selection.has(t)}},{key:"isEmpty",value:function(){return 0===this._selection.size}},{key:"hasValue",value:function(){return!this.isEmpty()}},{key:"sort",value:function(t){this._multiple&&this.selected&&this._selected.sort(t)}},{key:"isMultipleSelection",value:function(){return this._multiple}},{key:"_emitChangeEvent",value:function(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}},{key:"_markSelected",value:function(t){this.isSelected(t)||(this._multiple||this._unmarkAll(),this._selection.add(t),this._emitChanges&&this._selectedToEmit.push(t))}},{key:"_unmarkSelected",value:function(t){this.isSelected(t)&&(this._selection.delete(t),this._emitChanges&&this._deselectedToEmit.push(t))}},{key:"_unmarkAll",value:function(){var t=this;this.isEmpty()||this._selection.forEach((function(e){return t._unmarkSelected(e)}))}},{key:"_verifyValueAssignment",value:function(t){}},{key:"selected",get:function(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}}]),t}(),h=function(){var t=function(){function t(){_classCallCheck(this,t),this._listeners=[]}return _createClass(t,[{key:"notify",value:function(t,e){var n,i=_createForOfIteratorHelper(this._listeners);try{for(i.s();!(n=i.n()).done;){(0,n.value)(t,e)}}catch(a){i.e(a)}finally{i.f()}}},{key:"listen",value:function(t){var e=this;return this._listeners.push(t),function(){e._listeners=e._listeners.filter((function(e){return t!==e}))}}},{key:"ngOnDestroy",value:function(){this._listeners=[]}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(o.Mb)({factory:function(){return new t},token:t,providedIn:"root"}),t}(),p=new o.s("_ViewRepeater")},"0EUg":function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n("bHdf");function a(){return Object(i.a)(1)}},"0IaG":function(t,e,n){"use strict";n.d(e,"a",(function(){return M})),n.d(e,"b",(function(){return V})),n.d(e,"c",(function(){return E})),n.d(e,"d",(function(){return A})),n.d(e,"e",(function(){return k})),n.d(e,"f",(function(){return T})),n.d(e,"g",(function(){return L})),n.d(e,"h",(function(){return D})),n.d(e,"i",(function(){return W}));var i=n("rDax"),a=n("+rOU"),r=n("fXoL"),o=n("FKr1"),s=n("cH1L"),c=n("ofXK"),l=n("XNiG"),u=n("NXyV"),d=n("LRne"),f=n("pLZG"),h=n("IzEk"),p=n("JX91"),b=n("R0Ic"),g=n("FtGj"),m=n("u47x");function v(t,e){}var y=function t(){_classCallCheck(this,t),this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.maxWidth="80vw",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.autoFocus=!0,this.restoreFocus=!0,this.closeOnNavigation=!0},_={dialogContainer:Object(b.n)("dialogContainer",[Object(b.k)("void, exit",Object(b.l)({opacity:0,transform:"scale(0.7)"})),Object(b.k)("enter",Object(b.l)({transform:"none"})),Object(b.m)("* => enter",Object(b.e)("150ms cubic-bezier(0, 0, 0.2, 1)",Object(b.l)({transform:"none",opacity:1}))),Object(b.m)("* => void, * => exit",Object(b.e)("75ms cubic-bezier(0.4, 0.0, 0.2, 1)",Object(b.l)({opacity:0})))])},C=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a,o,s,c){var l;return _classCallCheck(this,n),(l=e.call(this))._elementRef=t,l._focusTrapFactory=i,l._changeDetectorRef=a,l._config=s,l._focusMonitor=c,l._animationStateChanged=new r.o,l._elementFocusedBeforeDialogWasOpened=null,l._closeInteractionType=null,l.attachDomPortal=function(t){return l._portalOutlet.hasAttached(),l._portalOutlet.attachDomPortal(t)},l._ariaLabelledBy=s.ariaLabelledBy||null,l._document=o,l}return _createClass(n,[{key:"_initializeWithAttachedContent",value:function(){this._setupFocusTrap(),this._capturePreviouslyFocusedElement(),this._focusDialogContainer()}},{key:"attachComponentPortal",value:function(t){return this._portalOutlet.hasAttached(),this._portalOutlet.attachComponentPortal(t)}},{key:"attachTemplatePortal",value:function(t){return this._portalOutlet.hasAttached(),this._portalOutlet.attachTemplatePortal(t)}},{key:"_recaptureFocus",value:function(){this._containsFocus()||(!this._config.autoFocus||!this._focusTrap.focusInitialElement())&&this._elementRef.nativeElement.focus()}},{key:"_trapFocus",value:function(){this._config.autoFocus?this._focusTrap.focusInitialElementWhenReady():this._containsFocus()||this._elementRef.nativeElement.focus()}},{key:"_restoreFocus",value:function(){var t=this._elementFocusedBeforeDialogWasOpened;if(this._config.restoreFocus&&t&&"function"==typeof t.focus){var e=this._document.activeElement,n=this._elementRef.nativeElement;e&&e!==this._document.body&&e!==n&&!n.contains(e)||(this._focusMonitor?(this._focusMonitor.focusVia(t,this._closeInteractionType),this._closeInteractionType=null):t.focus())}this._focusTrap&&this._focusTrap.destroy()}},{key:"_setupFocusTrap",value:function(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement)}},{key:"_capturePreviouslyFocusedElement",value:function(){this._document&&(this._elementFocusedBeforeDialogWasOpened=this._document.activeElement)}},{key:"_focusDialogContainer",value:function(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}},{key:"_containsFocus",value:function(){var t=this._elementRef.nativeElement,e=this._document.activeElement;return t===e||t.contains(e)}}]),n}(a.a);return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l),r.Qb(m.i),r.Qb(r.h),r.Qb(c.e,8),r.Qb(y),r.Qb(m.h))},t.\u0275dir=r.Lb({type:t,viewQuery:function(t,e){var n;1&t&&r.Kc(a.c,!0),2&t&&r.yc(n=r.ec())&&(e._portalOutlet=n.first)},features:[r.Ab]}),t}(),k=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(){var t;return _classCallCheck(this,n),(t=e.apply(this,arguments))._state="enter",t}return _createClass(n,[{key:"_onAnimationDone",value:function(t){var e=t.toState,n=t.totalTime;"enter"===e?(this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:n})):"exit"===e&&(this._restoreFocus(),this._animationStateChanged.next({state:"closed",totalTime:n}))}},{key:"_onAnimationStart",value:function(t){var e=t.toState,n=t.totalTime;"enter"===e?this._animationStateChanged.next({state:"opening",totalTime:n}):"exit"!==e&&"void"!==e||this._animationStateChanged.next({state:"closing",totalTime:n})}},{key:"_startExitAnimation",value:function(){this._state="exit",this._changeDetectorRef.markForCheck()}}]),n}(C);return t.\u0275fac=function(e){return x(e||t)},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1","aria-modal","true",1,"mat-dialog-container"],hostVars:6,hostBindings:function(t,e){1&t&&r.Mc("@dialogContainer.start",(function(t){return e._onAnimationStart(t)}))("@dialogContainer.done",(function(t){return e._onAnimationDone(t)})),2&t&&(r.Zb("id",e._id),r.Eb("role",e._config.role)("aria-labelledby",e._config.ariaLabel?null:e._ariaLabelledBy)("aria-label",e._config.ariaLabel)("aria-describedby",e._config.ariaDescribedBy||null),r.Nc("@dialogContainer",e._state))},features:[r.Ab],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,e){1&t&&r.Oc(0,v,0,0,"ng-template",0)},directives:[a.c],styles:[".mat-dialog-container{display:block;padding:24px;border-radius:4px;box-sizing:border-box;overflow:auto;outline:0;width:100%;height:100%;min-height:inherit;max-height:inherit}.cdk-high-contrast-active .mat-dialog-container{outline:solid 1px}.mat-dialog-content{display:block;margin:0 -24px;padding:0 24px;max-height:65vh;overflow:auto;-webkit-overflow-scrolling:touch}.mat-dialog-title{margin:0 0 20px;display:block}.mat-dialog-actions{padding:8px 0;display:flex;flex-wrap:wrap;min-height:52px;align-items:center;margin-bottom:-24px}.mat-dialog-actions[align=end]{justify-content:flex-end}.mat-dialog-actions[align=center]{justify-content:center}.mat-dialog-actions .mat-button-base+.mat-button-base,.mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}\n"],encapsulation:2,data:{animation:[_.dialogContainer]}}),t}(),x=r.Yb(k),O=0,D=function(){function t(e,n){var i=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"mat-dialog-"+O++;_classCallCheck(this,t),this._overlayRef=e,this._containerInstance=n,this.id=a,this.disableClose=this._containerInstance._config.disableClose,this._afterOpened=new l.a,this._afterClosed=new l.a,this._beforeClosed=new l.a,this._state=0,n._id=a,n._animationStateChanged.pipe(Object(f.a)((function(t){return"opened"===t.state})),Object(h.a)(1)).subscribe((function(){i._afterOpened.next(),i._afterOpened.complete()})),n._animationStateChanged.pipe(Object(f.a)((function(t){return"closed"===t.state})),Object(h.a)(1)).subscribe((function(){clearTimeout(i._closeFallbackTimeout),i._finishDialogClose()})),e.detachments().subscribe((function(){i._beforeClosed.next(i._result),i._beforeClosed.complete(),i._afterClosed.next(i._result),i._afterClosed.complete(),i.componentInstance=null,i._overlayRef.dispose()})),e.keydownEvents().pipe(Object(f.a)((function(t){return t.keyCode===g.h&&!i.disableClose&&!Object(g.v)(t)}))).subscribe((function(t){t.preventDefault(),w(i,"keyboard")})),e.backdropClick().subscribe((function(){i.disableClose?i._containerInstance._recaptureFocus():w(i,"mouse")}))}return _createClass(t,[{key:"close",value:function(t){var e=this;this._result=t,this._containerInstance._animationStateChanged.pipe(Object(f.a)((function(t){return"closing"===t.state})),Object(h.a)(1)).subscribe((function(n){e._beforeClosed.next(t),e._beforeClosed.complete(),e._overlayRef.detachBackdrop(),e._closeFallbackTimeout=setTimeout((function(){return e._finishDialogClose()}),n.totalTime+100)})),this._state=1,this._containerInstance._startExitAnimation()}},{key:"afterOpened",value:function(){return this._afterOpened}},{key:"afterClosed",value:function(){return this._afterClosed}},{key:"beforeClosed",value:function(){return this._beforeClosed}},{key:"backdropClick",value:function(){return this._overlayRef.backdropClick()}},{key:"keydownEvents",value:function(){return this._overlayRef.keydownEvents()}},{key:"updatePosition",value:function(t){var e=this._getPositionStrategy();return t&&(t.left||t.right)?t.left?e.left(t.left):e.right(t.right):e.centerHorizontally(),t&&(t.top||t.bottom)?t.top?e.top(t.top):e.bottom(t.bottom):e.centerVertically(),this._overlayRef.updatePosition(),this}},{key:"updateSize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return this._getPositionStrategy().width(t).height(e),this._overlayRef.updatePosition(),this}},{key:"addPanelClass",value:function(t){return this._overlayRef.addPanelClass(t),this}},{key:"removePanelClass",value:function(t){return this._overlayRef.removePanelClass(t),this}},{key:"getState",value:function(){return this._state}},{key:"_finishDialogClose",value:function(){this._state=2,this._overlayRef.dispose()}},{key:"_getPositionStrategy",value:function(){return this._overlayRef.getConfig().positionStrategy}}]),t}();function w(t,e,n){return void 0!==t._containerInstance&&(t._containerInstance._closeInteractionType=e),t.close(n)}var M=new r.s("MatDialogData"),S=new r.s("mat-dialog-default-options"),I=new r.s("mat-dialog-scroll-strategy"),P={provide:I,deps:[i.c],useFactory:function(t){return function(){return t.scrollStrategies.block()}}},R=function(){var t=function(){function t(e,n,i,a,r,o,s,c,d){var f=this;_classCallCheck(this,t),this._overlay=e,this._injector=n,this._defaultOptions=i,this._parentDialog=a,this._overlayContainer=r,this._dialogRefConstructor=s,this._dialogContainerType=c,this._dialogDataToken=d,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new l.a,this._afterOpenedAtThisLevel=new l.a,this._ariaHiddenElements=new Map,this.afterAllClosed=Object(u.a)((function(){return f.openDialogs.length?f._getAfterAllClosed():f._getAfterAllClosed().pipe(Object(p.a)(void 0))})),this._scrollStrategy=o}return _createClass(t,[{key:"_getAfterAllClosed",value:function(){var t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}},{key:"open",value:function(t,e){var n=this;(e=function(t,e){return Object.assign(Object.assign({},e),t)}(e,this._defaultOptions||new y)).id&&this.getDialogById(e.id);var i=this._createOverlay(e),a=this._attachDialogContainer(i,e),r=this._attachDialogContent(t,a,i,e);return this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(r),r.afterClosed().subscribe((function(){return n._removeOpenDialog(r)})),this.afterOpened.next(r),a._initializeWithAttachedContent(),r}},{key:"closeAll",value:function(){this._closeDialogs(this.openDialogs)}},{key:"getDialogById",value:function(t){return this.openDialogs.find((function(e){return e.id===t}))}},{key:"ngOnDestroy",value:function(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}},{key:"_createOverlay",value:function(t){var e=this._getOverlayConfig(t);return this._overlay.create(e)}},{key:"_getOverlayConfig",value:function(t){var e=new i.d({positionStrategy:this._overlay.position().global(),scrollStrategy:t.scrollStrategy||this._scrollStrategy(),panelClass:t.panelClass,hasBackdrop:t.hasBackdrop,direction:t.direction,minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight,disposeOnNavigation:t.closeOnNavigation});return t.backdropClass&&(e.backdropClass=t.backdropClass),e}},{key:"_attachDialogContainer",value:function(t,e){var n=r.t.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:y,useValue:e}]}),i=new a.d(this._dialogContainerType,e.viewContainerRef,n,e.componentFactoryResolver);return t.attach(i).instance}},{key:"_attachDialogContent",value:function(t,e,n,i){var o=new this._dialogRefConstructor(n,e,i.id);if(t instanceof r.P)e.attachTemplatePortal(new a.i(t,null,{$implicit:i.data,dialogRef:o}));else{var s=this._createInjector(i,o,e),c=e.attachComponentPortal(new a.d(t,i.viewContainerRef,s));o.componentInstance=c.instance}return o.updateSize(i.width,i.height).updatePosition(i.position),o}},{key:"_createInjector",value:function(t,e,n){var i=t&&t.viewContainerRef&&t.viewContainerRef.injector,a=[{provide:this._dialogContainerType,useValue:n},{provide:this._dialogDataToken,useValue:t.data},{provide:this._dialogRefConstructor,useValue:e}];return!t.direction||i&&i.get(s.c,null)||a.push({provide:s.c,useValue:{value:t.direction,change:Object(d.a)()}}),r.t.create({parent:i||this._injector,providers:a})}},{key:"_removeOpenDialog",value:function(t){var e=this.openDialogs.indexOf(t);e>-1&&(this.openDialogs.splice(e,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((function(t,e){t?e.setAttribute("aria-hidden",t):e.removeAttribute("aria-hidden")})),this._ariaHiddenElements.clear(),this._getAfterAllClosed().next()))}},{key:"_hideNonDialogContentFromAssistiveTechnology",value:function(){var t=this._overlayContainer.getContainerElement();if(t.parentElement)for(var e=t.parentElement.children,n=e.length-1;n>-1;n--){var i=e[n];i===t||"SCRIPT"===i.nodeName||"STYLE"===i.nodeName||i.hasAttribute("aria-live")||(this._ariaHiddenElements.set(i,i.getAttribute("aria-hidden")),i.setAttribute("aria-hidden","true"))}}},{key:"_closeDialogs",value:function(t){for(var e=t.length;e--;)t[e].close()}},{key:"openDialogs",get:function(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}},{key:"afterOpened",get:function(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Qb(i.c),r.Qb(r.t),r.Qb(void 0),r.Qb(void 0),r.Qb(i.e),r.Qb(void 0),r.Qb(r.R),r.Qb(r.R),r.Qb(r.s))},t.\u0275dir=r.Lb({type:t}),t}(),V=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a,r,o,s,c){return _classCallCheck(this,n),e.call(this,t,i,r,s,c,o,D,k,M)}return n}(R);return t.\u0275fac=function(e){return new(e||t)(r.ac(i.c),r.ac(r.t),r.ac(c.n,8),r.ac(S,8),r.ac(I),r.ac(t,12),r.ac(i.e))},t.\u0275prov=r.Mb({token:t,factory:t.\u0275fac}),t}(),j=0,A=function(){var t=function(){function t(e,n,i){_classCallCheck(this,t),this.dialogRef=e,this._elementRef=n,this._dialog=i,this.type="button"}return _createClass(t,[{key:"ngOnInit",value:function(){this.dialogRef||(this.dialogRef=F(this._elementRef,this._dialog.openDialogs))}},{key:"ngOnChanges",value:function(t){var e=t._matDialogClose||t._matDialogCloseResult;e&&(this.dialogResult=e.currentValue)}},{key:"_onButtonClick",value:function(t){w(this.dialogRef,0===t.screenX&&0===t.screenY?"keyboard":"mouse",this.dialogResult)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Qb(D,8),r.Qb(r.l),r.Qb(V))},t.\u0275dir=r.Lb({type:t,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(t,e){1&t&&r.dc("click",(function(t){return e._onButtonClick(t)})),2&t&&r.Eb("aria-label",e.ariaLabel||null)("type",e.type)},inputs:{type:"type",dialogResult:["mat-dialog-close","dialogResult"],ariaLabel:["aria-label","ariaLabel"],_matDialogClose:["matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],features:[r.Bb]}),t}(),W=function(){var t=function(){function t(e,n,i){_classCallCheck(this,t),this._dialogRef=e,this._elementRef=n,this._dialog=i,this.id="mat-dialog-title-"+j++}return _createClass(t,[{key:"ngOnInit",value:function(){var t=this;this._dialogRef||(this._dialogRef=F(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then((function(){var e=t._dialogRef._containerInstance;e&&!e._ariaLabelledBy&&(e._ariaLabelledBy=t.id)}))}}]),t}();return t.\u0275fac=function(e){return new(e||t)(r.Qb(D,8),r.Qb(r.l),r.Qb(V))},t.\u0275dir=r.Lb({type:t,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-dialog-title"],hostVars:1,hostBindings:function(t,e){2&t&&r.Zb("id",e.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),t}(),T=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Lb({type:t,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-dialog-content"]}),t}(),E=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Lb({type:t,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-dialog-actions"]}),t}();function F(t,e){for(var n=t.nativeElement.parentElement;n&&!n.classList.contains("mat-dialog-container");)n=n.parentElement;return n?e.find((function(t){return t.id===n.id})):null}var L=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=r.Ob({type:t}),t.\u0275inj=r.Nb({factory:function(e){return new(e||t)},providers:[V,P],imports:[[i.f,a.h,o.k],o.k]}),t}()},"0MNC":function(t,e,n){"use strict";n.d(e,"a",(function(){return O})),n.d(e,"b",(function(){return w}));var i,a,r=n("fXoL"),o=n("8LU1"),s=n("XNiG"),c=n("itXk"),l=n("GyhO"),u=n("HDdC"),d=n("IzEk"),f=n("7o/Q"),h=function(){function t(e){_classCallCheck(this,t),this.total=e}return _createClass(t,[{key:"call",value:function(t,e){return e.subscribe(new p(t,this.total))}}]),t}(),p=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var a;return _classCallCheck(this,n),(a=e.call(this,t)).total=i,a.count=0,a}return _createClass(n,[{key:"_next",value:function(t){++this.count>this.total&&this.destination.next(t)}}]),n}(f.a),b=n("Kj3r"),g=n("lJxs"),m=n("JX91"),v=n("1G5W"),y=n("nLfN"),_=new Set,C=((a=function(){function t(e){_classCallCheck(this,t),this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):k}return _createClass(t,[{key:"matchMedia",value:function(t){return this._platform.WEBKIT&&function(t){if(!_.has(t))try{i||((i=document.createElement("style")).setAttribute("type","text/css"),document.head.appendChild(i)),i.sheet&&(i.sheet.insertRule("@media ".concat(t," {.fx-query-test{ }}"),0),_.add(t))}catch(e){console.error(e)}}(t),this._matchMedia(t)}}]),t}()).\u0275fac=function(t){return new(t||a)(r.ac(y.a))},a.\u0275prov=Object(r.Mb)({factory:function(){return new a(Object(r.ac)(y.a))},token:a,providedIn:"root"}),a);function k(t){return{matches:"all"===t||""===t,media:t,addListener:function(){},removeListener:function(){}}}var x,O=((x=function(){function t(e,n){_classCallCheck(this,t),this._mediaMatcher=e,this._zone=n,this._queries=new Map,this._destroySubject=new s.a}return _createClass(t,[{key:"ngOnDestroy",value:function(){this._destroySubject.next(),this._destroySubject.complete()}},{key:"isMatched",value:function(t){var e=this;return D(Object(o.b)(t)).some((function(t){return e._registerQuery(t).mql.matches}))}},{key:"observe",value:function(t){var e=this,n=D(Object(o.b)(t)).map((function(t){return e._registerQuery(t).observable})),i=Object(c.a)(n);return(i=Object(l.a)(i.pipe(Object(d.a)(1)),i.pipe((function(t){return t.lift(new h(1))}),Object(b.a)(0)))).pipe(Object(g.a)((function(t){var e={matches:!1,breakpoints:{}};return t.forEach((function(t){var n=t.matches,i=t.query;e.matches=e.matches||n,e.breakpoints[i]=n})),e})))}},{key:"_registerQuery",value:function(t){var e=this;if(this._queries.has(t))return this._queries.get(t);var n=this._mediaMatcher.matchMedia(t),i={observable:new u.a((function(t){var i=function(n){return e._zone.run((function(){return t.next(n)}))};return n.addListener(i),function(){n.removeListener(i)}})).pipe(Object(m.a)(n),Object(g.a)((function(e){var n=e.matches;return{query:t,matches:n}})),Object(v.a)(this._destroySubject)),mql:n};return this._queries.set(t,i),i}}]),t}()).\u0275fac=function(t){return new(t||x)(r.ac(C),r.ac(r.C))},x.\u0275prov=Object(r.Mb)({factory:function(){return new x(Object(r.ac)(C),Object(r.ac)(r.C))},token:x,providedIn:"root"}),x);function D(t){return t.map((function(t){return t.split(",")})).reduce((function(t,e){return t.concat(e)})).map((function(t){return t.trim()}))}var w={XSmall:"(max-width: 599.99px)",Small:"(min-width: 600px) and (max-width: 959.99px)",Medium:"(min-width: 960px) and (max-width: 1279.99px)",Large:"(min-width: 1280px) and (max-width: 1919.99px)",XLarge:"(min-width: 1920px)",Handset:"(max-width: 599.99px) and (orientation: portrait), (max-width: 959.99px) and (orientation: landscape)",Tablet:"(min-width: 600px) and (max-width: 839.99px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279.99px) and (orientation: landscape)",Web:"(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)",HandsetPortrait:"(max-width: 599.99px) and (orientation: portrait)",TabletPortrait:"(min-width: 600px) and (max-width: 839.99px) and (orientation: portrait)",WebPortrait:"(min-width: 840px) and (orientation: portrait)",HandsetLandscape:"(max-width: 959.99px) and (orientation: landscape)",TabletLandscape:"(min-width: 960px) and (max-width: 1279.99px) and (orientation: landscape)",WebLandscape:"(min-width: 1280px) and (orientation: landscape)"}},1:function(t,e){},"1G5W":function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n("zx2A");function a(t){return function(e){return e.lift(new r(t))}}var r=function(){function t(e){_classCallCheck(this,t),this.notifier=e}return _createClass(t,[{key:"call",value:function(t,e){var n=new o(t),a=Object(i.c)(this.notifier,new i.a(n));return a&&!n.seenValue?(n.add(a),e.subscribe(n)):n}}]),t}(),o=function(t){_inherits(n,t);var e=_createSuper(n);function n(t){var i;return _classCallCheck(this,n),(i=e.call(this,t)).seenValue=!1,i}return _createClass(n,[{key:"notifyNext",value:function(){this.seenValue=!0,this.complete()}},{key:"notifyComplete",value:function(){}}]),n}(i.b)},"1YbM":function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n("fXoL"),a=n("aEDk"),r=n("rH+9"),o=function(){var t=function(){function t(e,n){_classCallCheck(this,t),this.latinisePipe=e,this.functions=n}return _createClass(t,[{key:"transform",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i="",a="";return this.functions.empty(t)?[]:(t.sort((function(t,r){return void 0===n?(i=e.latinisePipe.transform(t).toLocaleLowerCase(),a=e.latinisePipe.transform(r).toLocaleLowerCase()):(t[n]=null!==t[n]?t[n]:"",r[n]=null!==r[n]?r[n]:"",i="number"!=typeof t[n]?e.latinisePipe.transform(t[n]).toLocaleLowerCase():t[n],a="number"!=typeof r[n]?e.latinisePipe.transform(r[n]).toLocaleLowerCase():r[n]),i<a?-1:i>a?1:0})),t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Qb(a.c),i.Qb(r.a))},t.\u0275pipe=i.Pb({name:"sortBy",type:t,pure:!0}),t}()},"1jcm":function(t,e,n){"use strict";n.d(e,"a",(function(){return _})),n.d(e,"b",(function(){return D})),n.d(e,"c",(function(){return k}));var i=n("GU7r"),a=n("fXoL"),r=n("FKr1"),o=n("8LU1"),s=n("3Pt+"),c=n("R1ws"),l=n("u47x"),u=["thumbContainer"],d=["toggleBar"],f=["input"],h=function(){return{enterDuration:150}},p=["*"],b=new a.s("mat-slide-toggle-default-options",{providedIn:"root",factory:function(){return{disableToggleValue:!1}}}),g=0,m={provide:s.s,useExisting:Object(a.X)((function(){return _})),multi:!0},v=function t(e,n){_classCallCheck(this,t),this.source=e,this.checked=n},y=Object(r.F)(Object(r.A)(Object(r.B)(Object(r.C)((function t(e){_classCallCheck(this,t),this._elementRef=e}))),"accent")),_=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r,o,s,c){var l;return _classCallCheck(this,n),(l=e.call(this,t))._focusMonitor=i,l._changeDetectorRef=r,l.defaults=s,l._animationMode=c,l._onChange=function(t){},l._onTouched=function(){},l._uniqueId="mat-slide-toggle-"+ ++g,l._required=!1,l._checked=!1,l.name=null,l.id=l._uniqueId,l.labelPosition="after",l.ariaLabel=null,l.ariaLabelledby=null,l.change=new a.o,l.toggleChange=new a.o,l.tabIndex=parseInt(o)||0,l}return _createClass(n,[{key:"ngAfterContentInit",value:function(){var t=this;this._focusMonitor.monitor(this._elementRef,!0).subscribe((function(e){"keyboard"===e||"program"===e?t._inputElement.nativeElement.focus():e||Promise.resolve().then((function(){return t._onTouched()}))}))}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef)}},{key:"_onChangeEvent",value:function(t){t.stopPropagation(),this.toggleChange.emit(),this.defaults.disableToggleValue?this._inputElement.nativeElement.checked=this.checked:(this.checked=this._inputElement.nativeElement.checked,this._emitChangeEvent())}},{key:"_onInputClick",value:function(t){t.stopPropagation()}},{key:"writeValue",value:function(t){this.checked=!!t}},{key:"registerOnChange",value:function(t){this._onChange=t}},{key:"registerOnTouched",value:function(t){this._onTouched=t}},{key:"setDisabledState",value:function(t){this.disabled=t,this._changeDetectorRef.markForCheck()}},{key:"focus",value:function(t){this._focusMonitor.focusVia(this._inputElement,"keyboard",t)}},{key:"toggle",value:function(){this.checked=!this.checked,this._onChange(this.checked)}},{key:"_emitChangeEvent",value:function(){this._onChange(this.checked),this.change.emit(new v(this,this.checked))}},{key:"_onLabelTextChange",value:function(){this._changeDetectorRef.detectChanges()}},{key:"required",get:function(){return this._required},set:function(t){this._required=Object(o.c)(t)}},{key:"checked",get:function(){return this._checked},set:function(t){this._checked=Object(o.c)(t),this._changeDetectorRef.markForCheck()}},{key:"inputId",get:function(){return(this.id||this._uniqueId)+"-input"}}]),n}(y);return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(l.h),a.Qb(a.h),a.bc("tabindex"),a.Qb(b),a.Qb(c.a,8))},t.\u0275cmp=a.Kb({type:t,selectors:[["mat-slide-toggle"]],viewQuery:function(t,e){var n;1&t&&(a.Xc(u,!0),a.Xc(d,!0),a.Xc(f,!0)),2&t&&(a.yc(n=a.ec())&&(e._thumbEl=n.first),a.yc(n=a.ec())&&(e._thumbBarEl=n.first),a.yc(n=a.ec())&&(e._inputElement=n.first))},hostAttrs:[1,"mat-slide-toggle"],hostVars:12,hostBindings:function(t,e){2&t&&(a.Zb("id",e.id),a.Eb("tabindex",e.disabled?null:-1)("aria-label",null)("aria-labelledby",null),a.Ib("mat-checked",e.checked)("mat-disabled",e.disabled)("mat-slide-toggle-label-before","before"==e.labelPosition)("_mat-animation-noopable","NoopAnimations"===e._animationMode))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex",name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],required:"required",checked:"checked"},outputs:{change:"change",toggleChange:"toggleChange"},exportAs:["matSlideToggle"],features:[a.Cb([m]),a.Ab],ngContentSelectors:p,decls:16,vars:18,consts:[[1,"mat-slide-toggle-label"],["label",""],[1,"mat-slide-toggle-bar"],["toggleBar",""],["type","checkbox","role","switch",1,"mat-slide-toggle-input","cdk-visually-hidden",3,"id","required","tabIndex","checked","disabled","change","click"],["input",""],[1,"mat-slide-toggle-thumb-container"],["thumbContainer",""],[1,"mat-slide-toggle-thumb"],["mat-ripple","",1,"mat-slide-toggle-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered","matRippleRadius","matRippleAnimation"],[1,"mat-ripple-element","mat-slide-toggle-persistent-ripple"],[1,"mat-slide-toggle-content",3,"cdkObserveContent"],["labelContent",""],[2,"display","none"]],template:function(t,e){if(1&t&&(a.nc(),a.Wb(0,"label",0,1),a.Wb(2,"div",2,3),a.Wb(4,"input",4,5),a.dc("change",(function(t){return e._onChangeEvent(t)}))("click",(function(t){return e._onInputClick(t)})),a.Vb(),a.Wb(6,"div",6,7),a.Rb(8,"div",8),a.Wb(9,"div",9),a.Rb(10,"div",10),a.Vb(),a.Vb(),a.Vb(),a.Wb(11,"span",11,12),a.dc("cdkObserveContent",(function(){return e._onLabelTextChange()})),a.Wb(13,"span",13),a.Qc(14,"\xa0"),a.Vb(),a.mc(15),a.Vb(),a.Vb()),2&t){var n=a.zc(1),i=a.zc(12);a.Eb("for",e.inputId),a.Db(2),a.Ib("mat-slide-toggle-bar-no-side-margin",!i.textContent||!i.textContent.trim()),a.Db(2),a.oc("id",e.inputId)("required",e.required)("tabIndex",e.tabIndex)("checked",e.checked)("disabled",e.disabled),a.Eb("name",e.name)("aria-checked",e.checked.toString())("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby),a.Db(5),a.oc("matRippleTrigger",n)("matRippleDisabled",e.disableRipple||e.disabled)("matRippleCentered",!0)("matRippleRadius",20)("matRippleAnimation",a.uc(17,h))}},directives:[r.u,i.a],styles:[".mat-slide-toggle{display:inline-block;height:24px;max-width:100%;line-height:24px;white-space:nowrap;outline:none;-webkit-tap-highlight-color:transparent}.mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(16px, 0, 0)}[dir=rtl] .mat-slide-toggle.mat-checked .mat-slide-toggle-thumb-container{transform:translate3d(-16px, 0, 0)}.mat-slide-toggle.mat-disabled{opacity:.38}.mat-slide-toggle.mat-disabled .mat-slide-toggle-label,.mat-slide-toggle.mat-disabled .mat-slide-toggle-thumb-container{cursor:default}.mat-slide-toggle-label{display:flex;flex:1;flex-direction:row;align-items:center;height:inherit;cursor:pointer}.mat-slide-toggle-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-slide-toggle-label-before .mat-slide-toggle-label{order:1}.mat-slide-toggle-label-before .mat-slide-toggle-bar{order:2}[dir=rtl] .mat-slide-toggle-label-before .mat-slide-toggle-bar,.mat-slide-toggle-bar{margin-right:8px;margin-left:0}[dir=rtl] .mat-slide-toggle-bar,.mat-slide-toggle-label-before .mat-slide-toggle-bar{margin-left:8px;margin-right:0}.mat-slide-toggle-bar-no-side-margin{margin-left:0;margin-right:0}.mat-slide-toggle-thumb-container{position:absolute;z-index:1;width:20px;height:20px;top:-3px;left:0;transform:translate3d(0, 0, 0);transition:all 80ms linear;transition-property:transform}._mat-animation-noopable .mat-slide-toggle-thumb-container{transition:none}[dir=rtl] .mat-slide-toggle-thumb-container{left:auto;right:0}.mat-slide-toggle-thumb{height:20px;width:20px;border-radius:50%}.mat-slide-toggle-bar{position:relative;width:36px;height:14px;flex-shrink:0;border-radius:8px}.mat-slide-toggle-input{bottom:0;left:10px}[dir=rtl] .mat-slide-toggle-input{left:auto;right:10px}.mat-slide-toggle-bar,.mat-slide-toggle-thumb{transition:all 80ms linear;transition-property:background-color;transition-delay:50ms}._mat-animation-noopable .mat-slide-toggle-bar,._mat-animation-noopable .mat-slide-toggle-thumb{transition:none}.mat-slide-toggle .mat-slide-toggle-ripple{position:absolute;top:calc(50% - 20px);left:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-slide-toggle .mat-slide-toggle-ripple .mat-ripple-element:not(.mat-slide-toggle-persistent-ripple){opacity:.12}.mat-slide-toggle-persistent-ripple{width:100%;height:100%;transform:none}.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:.04}.mat-slide-toggle:not(.mat-disabled).cdk-keyboard-focused .mat-slide-toggle-persistent-ripple{opacity:.12}.mat-slide-toggle-persistent-ripple,.mat-slide-toggle.mat-disabled .mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{opacity:0}@media(hover: none){.mat-slide-toggle-bar:hover .mat-slide-toggle-persistent-ripple{display:none}}.cdk-high-contrast-active .mat-slide-toggle-thumb,.cdk-high-contrast-active .mat-slide-toggle-bar{border:1px solid}.cdk-high-contrast-active .mat-slide-toggle.cdk-keyboard-focused .mat-slide-toggle-bar{outline:2px dotted;outline-offset:5px}\n"],encapsulation:2,changeDetection:0}),t}(),C={provide:s.r,useExisting:Object(a.X)((function(){return k})),multi:!0},k=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return n}(s.b);return t.\u0275fac=function(e){return x(e||t)},t.\u0275dir=a.Lb({type:t,selectors:[["mat-slide-toggle","required","","formControlName",""],["mat-slide-toggle","required","","formControl",""],["mat-slide-toggle","required","","ngModel",""]],features:[a.Cb([C]),a.Ab]}),t}(),x=a.Yb(k),O=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)}}),t}(),D=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)},imports:[[O,r.v,r.k,i.c],O,r.k]}),t}()},2:function(t,e){},"2ChS":function(t,e,n){"use strict";n.d(e,"a",(function(){return p})),n.d(e,"b",(function(){return b}));var i=n("rDax"),a=n("+rOU"),r=n("fXoL"),o=n("FKr1"),s=n("0MNC"),c=n("R0Ic"),l=n("ofXK"),u=(n("cH1L"),n("XNiG"),n("VRyK"),n("LRne"),n("FtGj"),n("pLZG"),n("IzEk"),n("u47x"));function d(t,e){}var f=function t(){_classCallCheck(this,t),this.data=null,this.hasBackdrop=!0,this.disableClose=!1,this.ariaLabel=null,this.closeOnNavigation=!0,this.autoFocus=!1,this.restoreFocus=!0},h={bottomSheetState:Object(c.n)("state",[Object(c.k)("void, hidden",Object(c.l)({transform:"translateY(100%)"})),Object(c.k)("visible",Object(c.l)({transform:"translateY(0%)"})),Object(c.m)("visible => void, visible => hidden",Object(c.e)("".concat(o.b.COMPLEX," ").concat(o.a.ACCELERATION_CURVE))),Object(c.m)("void => visible",Object(c.e)("".concat(o.b.EXITING," ").concat(o.a.DECELERATION_CURVE)))])},p=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a,o,c,l){var u;return _classCallCheck(this,n),(u=e.call(this))._elementRef=t,u._changeDetectorRef=i,u._focusTrapFactory=a,u.bottomSheetConfig=l,u._animationState="void",u._animationStateChanged=new r.o,u._elementFocusedBeforeOpened=null,u.attachDomPortal=function(t){return u._validatePortalAttached(),u._setPanelClass(),u._savePreviouslyFocusedElement(),u._portalOutlet.attachDomPortal(t)},u._document=c,u._breakpointSubscription=o.observe([s.b.Medium,s.b.Large,s.b.XLarge]).subscribe((function(){u._toggleClass("mat-bottom-sheet-container-medium",o.isMatched(s.b.Medium)),u._toggleClass("mat-bottom-sheet-container-large",o.isMatched(s.b.Large)),u._toggleClass("mat-bottom-sheet-container-xlarge",o.isMatched(s.b.XLarge))})),u}return _createClass(n,[{key:"attachComponentPortal",value:function(t){return this._validatePortalAttached(),this._setPanelClass(),this._savePreviouslyFocusedElement(),this._portalOutlet.attachComponentPortal(t)}},{key:"attachTemplatePortal",value:function(t){return this._validatePortalAttached(),this._setPanelClass(),this._savePreviouslyFocusedElement(),this._portalOutlet.attachTemplatePortal(t)}},{key:"enter",value:function(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.detectChanges())}},{key:"exit",value:function(){this._destroyed||(this._animationState="hidden",this._changeDetectorRef.markForCheck())}},{key:"ngOnDestroy",value:function(){this._breakpointSubscription.unsubscribe(),this._destroyed=!0}},{key:"_onAnimationDone",value:function(t){"hidden"===t.toState?this._restoreFocus():"visible"===t.toState&&this._trapFocus(),this._animationStateChanged.emit(t)}},{key:"_onAnimationStart",value:function(t){this._animationStateChanged.emit(t)}},{key:"_toggleClass",value:function(t,e){var n=this._elementRef.nativeElement.classList;e?n.add(t):n.remove(t)}},{key:"_validatePortalAttached",value:function(){this._portalOutlet.hasAttached()}},{key:"_setPanelClass",value:function(){var t=this._elementRef.nativeElement,e=this.bottomSheetConfig.panelClass;Array.isArray(e)?e.forEach((function(e){return t.classList.add(e)})):e&&t.classList.add(e)}},{key:"_trapFocus",value:function(){var t=this._elementRef.nativeElement;if(this._focusTrap||(this._focusTrap=this._focusTrapFactory.create(t)),this.bottomSheetConfig.autoFocus)this._focusTrap.focusInitialElementWhenReady();else{var e=this._document.activeElement;e===t||t.contains(e)||t.focus()}}},{key:"_restoreFocus",value:function(){var t=this._elementFocusedBeforeOpened;if(this.bottomSheetConfig.restoreFocus&&t&&"function"==typeof t.focus){var e=this._document.activeElement,n=this._elementRef.nativeElement;e&&e!==this._document.body&&e!==n&&!n.contains(e)||t.focus()}this._focusTrap&&this._focusTrap.destroy()}},{key:"_savePreviouslyFocusedElement",value:function(){var t=this;this._elementFocusedBeforeOpened=this._document.activeElement,this._elementRef.nativeElement.focus&&Promise.resolve().then((function(){return t._elementRef.nativeElement.focus()}))}}]),n}(a.a);return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l),r.Qb(r.h),r.Qb(u.i),r.Qb(s.a),r.Qb(l.e,8),r.Qb(f))},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-bottom-sheet-container"]],viewQuery:function(t,e){var n;1&t&&r.Kc(a.c,!0),2&t&&r.yc(n=r.ec())&&(e._portalOutlet=n.first)},hostAttrs:["tabindex","-1","role","dialog","aria-modal","true",1,"mat-bottom-sheet-container"],hostVars:2,hostBindings:function(t,e){1&t&&r.Mc("@state.start",(function(t){return e._onAnimationStart(t)}))("@state.done",(function(t){return e._onAnimationDone(t)})),2&t&&(r.Eb("aria-label",null==e.bottomSheetConfig?null:e.bottomSheetConfig.ariaLabel),r.Nc("@state",e._animationState))},features:[r.Ab],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,e){1&t&&r.Oc(0,d,0,0,"ng-template",0)},directives:[a.c],styles:[".mat-bottom-sheet-container{padding:8px 16px;min-width:100vw;box-sizing:border-box;display:block;outline:0;max-height:80vh;overflow:auto}.cdk-high-contrast-active .mat-bottom-sheet-container{outline:1px solid}.mat-bottom-sheet-container-xlarge,.mat-bottom-sheet-container-large,.mat-bottom-sheet-container-medium{border-top-left-radius:4px;border-top-right-radius:4px}.mat-bottom-sheet-container-medium{min-width:384px;max-width:calc(100vw - 128px)}.mat-bottom-sheet-container-large{min-width:512px;max-width:calc(100vw - 256px)}.mat-bottom-sheet-container-xlarge{min-width:576px;max-width:calc(100vw - 384px)}\n"],encapsulation:2,data:{animation:[h.bottomSheetState]},changeDetection:0}),t}(),b=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=r.Ob({type:t}),t.\u0275inj=r.Nb({factory:function(e){return new(e||t)},imports:[[i.f,o.k,a.h],o.k]}),t}()},"2QA8":function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()},"2Vo4":function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("XNiG"),a=n("9ppp"),r=function(t){_inherits(n,t);var e=_createSuper(n);function n(t){var i;return _classCallCheck(this,n),(i=e.call(this))._value=t,i}return _createClass(n,[{key:"_subscribe",value:function(t){var e=_get(_getPrototypeOf(n.prototype),"_subscribe",this).call(this,t);return e&&!e.closed&&t.next(this._value),e}},{key:"getValue",value:function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new a.a;return this._value}},{key:"next",value:function(t){_get(_getPrototypeOf(n.prototype),"next",this).call(this,this._value=t)}},{key:"value",get:function(){return this.getValue()}}]),n}(i.a)},"2fFW":function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=!1,a={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){var e=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+e.stack)}else i&&console.log("RxJS: Back to a better error behavior. Thank you. <3");i=t},get useDeprecatedSynchronousErrorHandling(){return i}}},3:function(t,e){},"3E0/":function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n("D0XW"),a=n("7o/Q"),r=n("WMd4");function o(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.a,a=(e=t)instanceof Date&&!isNaN(+e)?+t-n.now():Math.abs(t);return function(t){return t.lift(new s(a,n))}}var s=function(){function t(e,n){_classCallCheck(this,t),this.delay=e,this.scheduler=n}return _createClass(t,[{key:"call",value:function(t,e){return e.subscribe(new c(t,this.delay,this.scheduler))}}]),t}(),c=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a){var r;return _classCallCheck(this,n),(r=e.call(this,t)).delay=i,r.scheduler=a,r.queue=[],r.active=!1,r.errored=!1,r}return _createClass(n,[{key:"_schedule",value:function(t){this.active=!0,this.destination.add(t.schedule(n.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))}},{key:"scheduleNotification",value:function(t){if(!0!==this.errored){var e=this.scheduler,n=new l(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}}},{key:"_next",value:function(t){this.scheduleNotification(r.a.createNext(t))}},{key:"_error",value:function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()}},{key:"_complete",value:function(){this.scheduleNotification(r.a.createComplete()),this.unsubscribe()}}],[{key:"dispatch",value:function(t){for(var e=t.source,n=e.queue,i=t.scheduler,a=t.destination;n.length>0&&n[0].time-i.now()<=0;)n.shift().notification.observe(a);if(n.length>0){var r=Math.max(0,n[0].time-i.now());this.schedule(t,r)}else this.unsubscribe(),e.active=!1}}]),n}(a.a),l=function t(e,n){_classCallCheck(this,t),this.time=e,this.notification=n}},"3N8a":function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var a;return _classCallCheck(this,n),(a=e.call(this,t,i)).scheduler=t,a.work=i,a.pending=!1,a}return _createClass(n,[{key:"schedule",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(this.closed)return this;this.state=t;var n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(i,this.id,e),this}},{key:"requestAsyncId",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return setInterval(t.flush.bind(t,this),n)}},{key:"recycleAsyncId",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)}},{key:"execute",value:function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}},{key:"_execute",value:function(t,e){var n=!1,i=void 0;try{this.work(t)}catch(a){n=!0,i=!!a&&a||new Error(a)}if(n)return this.unsubscribe(),i}},{key:"_unsubscribe",value:function(){var t=this.id,e=this.scheduler,n=e.actions,i=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&n.splice(i,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null}}]),n}(function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){return _classCallCheck(this,n),e.call(this)}return _createClass(n,[{key:"schedule",value:function(t){return this}}]),n}(n("quSY").a))},"3Pt+":function(t,e,n){"use strict";n.d(e,"a",(function(){return u})),n.d(e,"b",(function(){return Qt})),n.d(e,"c",(function(){return b})),n.d(e,"d",(function(){return h})),n.d(e,"e",(function(){return Bt})),n.d(e,"f",(function(){return ht})),n.d(e,"g",(function(){return jt})),n.d(e,"h",(function(){return Yt})),n.d(e,"i",(function(){return dt})),n.d(e,"j",(function(){return Mt})),n.d(e,"k",(function(){return Tt})),n.d(e,"l",(function(){return ft})),n.d(e,"m",(function(){return It})),n.d(e,"n",(function(){return Rt})),n.d(e,"o",(function(){return Jt})),n.d(e,"p",(function(){return $t})),n.d(e,"q",(function(){return Ht})),n.d(e,"r",(function(){return x})),n.d(e,"s",(function(){return c})),n.d(e,"t",(function(){return m})),n.d(e,"u",(function(){return y})),n.d(e,"v",(function(){return _})),n.d(e,"w",(function(){return gt})),n.d(e,"x",(function(){return xt})),n.d(e,"y",(function(){return _t})),n.d(e,"z",(function(){return z})),n.d(e,"A",(function(){return j})),n.d(e,"B",(function(){return qt})),n.d(e,"C",(function(){return T})),n.d(e,"D",(function(){return F})),n.d(e,"E",(function(){return Zt})),n.d(e,"F",(function(){return Lt})),n.d(e,"G",(function(){return N})),n.d(e,"H",(function(){return H})),n.d(e,"I",(function(){return w})),n.d(e,"J",(function(){return G})),n.d(e,"K",(function(){return Ot}));var i=n("fXoL"),a=n("ofXK"),r=n("cp0P"),o=n("Cfvw"),s=n("lJxs"),c=new i.s("NgValueAccessor"),l={provide:c,useExisting:Object(i.X)((function(){return u})),multi:!0},u=function(){var t=function(){function t(e,n){_classCallCheck(this,t),this._renderer=e,this._elementRef=n,this.onChange=function(t){},this.onTouched=function(){}}return _createClass(t,[{key:"writeValue",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"checked",t)}},{key:"registerOnChange",value:function(t){this.onChange=t}},{key:"registerOnTouched",value:function(t){this.onTouched=t}},{key:"setDisabledState",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Qb(i.I),i.Qb(i.l))},t.\u0275dir=i.Lb({type:t,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(t,e){1&t&&i.dc("change",(function(t){return e.onChange(t.target.checked)}))("blur",(function(){return e.onTouched()}))},features:[i.Cb([l])]}),t}(),d={provide:c,useExisting:Object(i.X)((function(){return h})),multi:!0},f=new i.s("CompositionEventMode"),h=function(){var t=function(){function t(e,n,i){var r;_classCallCheck(this,t),this._renderer=e,this._elementRef=n,this._compositionMode=i,this.onChange=function(t){},this.onTouched=function(){},this._composing=!1,null==this._compositionMode&&(this._compositionMode=(r=Object(a.L)()?Object(a.L)().getUserAgent():"",!/android (\d+)/.test(r.toLowerCase())))}return _createClass(t,[{key:"writeValue",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}},{key:"registerOnChange",value:function(t){this.onChange=t}},{key:"registerOnTouched",value:function(t){this.onTouched=t}},{key:"setDisabledState",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}},{key:"_handleInput",value:function(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}},{key:"_compositionStart",value:function(){this._composing=!0}},{key:"_compositionEnd",value:function(t){this._composing=!1,this._compositionMode&&this.onChange(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Qb(i.I),i.Qb(i.l),i.Qb(f,8))},t.\u0275dir=i.Lb({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(t,e){1&t&&i.dc("input",(function(t){return e._handleInput(t.target.value)}))("blur",(function(){return e.onTouched()}))("compositionstart",(function(){return e._compositionStart()}))("compositionend",(function(t){return e._compositionEnd(t.target.value)}))},features:[i.Cb([d])]}),t}(),p=function(){var t=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"reset",value:function(t){this.control&&this.control.reset(t)}},{key:"hasError",value:function(t,e){return!!this.control&&this.control.hasError(t,e)}},{key:"getError",value:function(t,e){return this.control?this.control.getError(t,e):null}},{key:"value",get:function(){return this.control?this.control.value:null}},{key:"valid",get:function(){return this.control?this.control.valid:null}},{key:"invalid",get:function(){return this.control?this.control.invalid:null}},{key:"pending",get:function(){return this.control?this.control.pending:null}},{key:"disabled",get:function(){return this.control?this.control.disabled:null}},{key:"enabled",get:function(){return this.control?this.control.enabled:null}},{key:"errors",get:function(){return this.control?this.control.errors:null}},{key:"pristine",get:function(){return this.control?this.control.pristine:null}},{key:"dirty",get:function(){return this.control?this.control.dirty:null}},{key:"touched",get:function(){return this.control?this.control.touched:null}},{key:"status",get:function(){return this.control?this.control.status:null}},{key:"untouched",get:function(){return this.control?this.control.untouched:null}},{key:"statusChanges",get:function(){return this.control?this.control.statusChanges:null}},{key:"valueChanges",get:function(){return this.control?this.control.valueChanges:null}},{key:"path",get:function(){return null}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=i.Lb({type:t}),t}(),b=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return _createClass(n,[{key:"formDirective",get:function(){return null}},{key:"path",get:function(){return null}}]),n}(p);return t.\u0275fac=function(e){return g(e||t)},t.\u0275dir=i.Lb({type:t,features:[i.Ab]}),t}(),g=i.Yb(b),m=function(t){_inherits(n,t);var e=_createSuper(n);function n(){var t;return _classCallCheck(this,n),(t=e.apply(this,arguments))._parent=null,t.name=null,t.valueAccessor=null,t._rawValidators=[],t._rawAsyncValidators=[],t}return _createClass(n,[{key:"validator",get:function(){}},{key:"asyncValidator",get:function(){}}]),n}(p),v=function(){function t(e){_classCallCheck(this,t),this._cd=e}return _createClass(t,[{key:"ngClassUntouched",get:function(){return!!this._cd.control&&this._cd.control.untouched}},{key:"ngClassTouched",get:function(){return!!this._cd.control&&this._cd.control.touched}},{key:"ngClassPristine",get:function(){return!!this._cd.control&&this._cd.control.pristine}},{key:"ngClassDirty",get:function(){return!!this._cd.control&&this._cd.control.dirty}},{key:"ngClassValid",get:function(){return!!this._cd.control&&this._cd.control.valid}},{key:"ngClassInvalid",get:function(){return!!this._cd.control&&this._cd.control.invalid}},{key:"ngClassPending",get:function(){return!!this._cd.control&&this._cd.control.pending}}]),t}(),y=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t){return _classCallCheck(this,n),e.call(this,t)}return n}(v);return t.\u0275fac=function(e){return new(e||t)(i.Qb(m,2))},t.\u0275dir=i.Lb({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,e){2&t&&i.Ib("ng-untouched",e.ngClassUntouched)("ng-touched",e.ngClassTouched)("ng-pristine",e.ngClassPristine)("ng-dirty",e.ngClassDirty)("ng-valid",e.ngClassValid)("ng-invalid",e.ngClassInvalid)("ng-pending",e.ngClassPending)},features:[i.Ab]}),t}(),_=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t){return _classCallCheck(this,n),e.call(this,t)}return n}(v);return t.\u0275fac=function(e){return new(e||t)(i.Qb(b,2))},t.\u0275dir=i.Lb({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:14,hostBindings:function(t,e){2&t&&i.Ib("ng-untouched",e.ngClassUntouched)("ng-touched",e.ngClassTouched)("ng-pristine",e.ngClassPristine)("ng-dirty",e.ngClassDirty)("ng-valid",e.ngClassValid)("ng-invalid",e.ngClassInvalid)("ng-pending",e.ngClassPending)},features:[i.Ab]}),t}();function C(t){return null==t||0===t.length}function k(t){return null!=t&&"number"==typeof t.length}var x=new i.s("NgValidators"),O=new i.s("NgAsyncValidators"),D=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,w=function(){function t(){_classCallCheck(this,t)}return _createClass(t,null,[{key:"min",value:function(t){return function(e){if(C(e.value)||C(t))return null;var n=parseFloat(e.value);return!isNaN(n)&&n<t?{min:{min:t,actual:e.value}}:null}}},{key:"max",value:function(t){return function(e){if(C(e.value)||C(t))return null;var n=parseFloat(e.value);return!isNaN(n)&&n>t?{max:{max:t,actual:e.value}}:null}}},{key:"required",value:function(t){return C(t.value)?{required:!0}:null}},{key:"requiredTrue",value:function(t){return!0===t.value?null:{required:!0}}},{key:"email",value:function(t){return C(t.value)||D.test(t.value)?null:{email:!0}}},{key:"minLength",value:function(t){return function(e){return C(e.value)||!k(e.value)?null:e.value.length<t?{minlength:{requiredLength:t,actualLength:e.value.length}}:null}}},{key:"maxLength",value:function(t){return function(e){return k(e.value)&&e.value.length>t?{maxlength:{requiredLength:t,actualLength:e.value.length}}:null}}},{key:"pattern",value:function(e){return e?("string"==typeof e?(i="","^"!==e.charAt(0)&&(i+="^"),i+=e,"$"!==e.charAt(e.length-1)&&(i+="$"),n=new RegExp(i)):(i=e.toString(),n=e),function(t){if(C(t.value))return null;var e=t.value;return n.test(e)?null:{pattern:{requiredPattern:i,actualValue:e}}}):t.nullValidator;var n,i}},{key:"nullValidator",value:function(t){return null}},{key:"compose",value:function(t){if(!t)return null;var e=t.filter(M);return 0==e.length?null:function(t){return I(P(t,e))}}},{key:"composeAsync",value:function(t){if(!t)return null;var e=t.filter(M);return 0==e.length?null:function(t){var n=P(t,e).map(S);return Object(r.a)(n).pipe(Object(s.a)(I))}}}]),t}();function M(t){return null!=t}function S(t){var e=Object(i.vb)(t)?Object(o.a)(t):t;return Object(i.ub)(e),e}function I(t){var e={};return t.forEach((function(t){e=null!=t?Object.assign(Object.assign({},e),t):e})),0===Object.keys(e).length?null:e}function P(t,e){return e.map((function(e){return e(t)}))}function R(t){return t.map((function(t){return function(t){return!t.validate}(t)?t:function(e){return t.validate(e)}}))}var V={provide:c,useExisting:Object(i.X)((function(){return j})),multi:!0},j=function(){var t=function(){function t(e,n){_classCallCheck(this,t),this._renderer=e,this._elementRef=n,this.onChange=function(t){},this.onTouched=function(){}}return _createClass(t,[{key:"writeValue",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}},{key:"registerOnChange",value:function(t){this.onChange=function(e){t(""==e?null:parseFloat(e))}}},{key:"registerOnTouched",value:function(t){this.onTouched=t}},{key:"setDisabledState",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Qb(i.I),i.Qb(i.l))},t.\u0275dir=i.Lb({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(t,e){1&t&&i.dc("input",(function(t){return e.onChange(t.target.value)}))("blur",(function(){return e.onTouched()}))},features:[i.Cb([V])]}),t}(),A={provide:c,useExisting:Object(i.X)((function(){return T})),multi:!0},W=function(){var t=function(){function t(){_classCallCheck(this,t),this._accessors=[]}return _createClass(t,[{key:"add",value:function(t,e){this._accessors.push([t,e])}},{key:"remove",value:function(t){for(var e=this._accessors.length-1;e>=0;--e)if(this._accessors[e][1]===t)return void this._accessors.splice(e,1)}},{key:"select",value:function(t){var e=this;this._accessors.forEach((function(n){e._isSameGroup(n,t)&&n[1]!==t&&n[1].fireUncheck(t.value)}))}},{key:"_isSameGroup",value:function(t,e){return!!t[0].control&&t[0]._parent===e._control._parent&&t[1].name===e.name}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=i.Mb({token:t,factory:t.\u0275fac}),t}(),T=function(){var t=function(){function t(e,n,i,a){_classCallCheck(this,t),this._renderer=e,this._elementRef=n,this._registry=i,this._injector=a,this.onChange=function(){},this.onTouched=function(){}}return _createClass(t,[{key:"ngOnInit",value:function(){this._control=this._injector.get(m),this._checkName(),this._registry.add(this._control,this)}},{key:"ngOnDestroy",value:function(){this._registry.remove(this)}},{key:"writeValue",value:function(t){this._state=t===this.value,this._renderer.setProperty(this._elementRef.nativeElement,"checked",this._state)}},{key:"registerOnChange",value:function(t){var e=this;this._fn=t,this.onChange=function(){t(e.value),e._registry.select(e)}}},{key:"fireUncheck",value:function(t){this.writeValue(t)}},{key:"registerOnTouched",value:function(t){this.onTouched=t}},{key:"setDisabledState",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}},{key:"_checkName",value:function(){!this.name&&this.formControlName&&(this.name=this.formControlName)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Qb(i.I),i.Qb(i.l),i.Qb(W),i.Qb(i.t))},t.\u0275dir=i.Lb({type:t,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(t,e){1&t&&i.dc("change",(function(){return e.onChange()}))("blur",(function(){return e.onTouched()}))},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[i.Cb([A])]}),t}(),E={provide:c,useExisting:Object(i.X)((function(){return F})),multi:!0},F=function(){var t=function(){function t(e,n){_classCallCheck(this,t),this._renderer=e,this._elementRef=n,this.onChange=function(t){},this.onTouched=function(){}}return _createClass(t,[{key:"writeValue",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",parseFloat(t))}},{key:"registerOnChange",value:function(t){this.onChange=function(e){t(""==e?null:parseFloat(e))}}},{key:"registerOnTouched",value:function(t){this.onTouched=t}},{key:"setDisabledState",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Qb(i.I),i.Qb(i.l))},t.\u0275dir=i.Lb({type:t,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(t,e){1&t&&i.dc("change",(function(t){return e.onChange(t.target.value)}))("input",(function(t){return e.onChange(t.target.value)}))("blur",(function(){return e.onTouched()}))},features:[i.Cb([E])]}),t}(),L={provide:c,useExisting:Object(i.X)((function(){return N})),multi:!0};function Q(t,e){return null==t?""+e:(e&&"object"==typeof e&&(e="Object"),"".concat(t,": ").concat(e).slice(0,50))}var N=function(){var t=function(){function t(e,n){_classCallCheck(this,t),this._renderer=e,this._elementRef=n,this._optionMap=new Map,this._idCounter=0,this.onChange=function(t){},this.onTouched=function(){},this._compareWith=Object.is}return _createClass(t,[{key:"writeValue",value:function(t){this.value=t;var e=this._getOptionId(t);null==e&&this._renderer.setProperty(this._elementRef.nativeElement,"selectedIndex",-1);var n=Q(e,t);this._renderer.setProperty(this._elementRef.nativeElement,"value",n)}},{key:"registerOnChange",value:function(t){var e=this;this.onChange=function(n){e.value=e._getOptionValue(n),t(e.value)}}},{key:"registerOnTouched",value:function(t){this.onTouched=t}},{key:"setDisabledState",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}},{key:"_registerOption",value:function(){return(this._idCounter++).toString()}},{key:"_getOptionId",value:function(t){for(var e=0,n=Array.from(this._optionMap.keys());e<n.length;e++){var i=n[e];if(this._compareWith(this._optionMap.get(i),t))return i}return null}},{key:"_getOptionValue",value:function(t){var e=function(t){return t.split(":")[0]}(t);return this._optionMap.has(e)?this._optionMap.get(e):t}},{key:"compareWith",set:function(t){this._compareWith=t}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Qb(i.I),i.Qb(i.l))},t.\u0275dir=i.Lb({type:t,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(t,e){1&t&&i.dc("change",(function(t){return e.onChange(t.target.value)}))("blur",(function(){return e.onTouched()}))},inputs:{compareWith:"compareWith"},features:[i.Cb([L])]}),t}(),z=function(){var t=function(){function t(e,n,i){_classCallCheck(this,t),this._element=e,this._renderer=n,this._select=i,this._select&&(this.id=this._select._registerOption())}return _createClass(t,[{key:"_setElementValue",value:function(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}},{key:"ngOnDestroy",value:function(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}},{key:"ngValue",set:function(t){null!=this._select&&(this._select._optionMap.set(this.id,t),this._setElementValue(Q(this.id,t)),this._select.writeValue(this._select.value))}},{key:"value",set:function(t){this._setElementValue(t),this._select&&this._select.writeValue(this._select.value)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Qb(i.l),i.Qb(i.I),i.Qb(N,9))},t.\u0275dir=i.Lb({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t}(),B={provide:c,useExisting:Object(i.X)((function(){return H})),multi:!0};function U(t,e){return null==t?""+e:("string"==typeof e&&(e="'".concat(e,"'")),e&&"object"==typeof e&&(e="Object"),"".concat(t,": ").concat(e).slice(0,50))}var H=function(){var t=function(){function t(e,n){_classCallCheck(this,t),this._renderer=e,this._elementRef=n,this._optionMap=new Map,this._idCounter=0,this.onChange=function(t){},this.onTouched=function(){},this._compareWith=Object.is}return _createClass(t,[{key:"writeValue",value:function(t){var e,n=this;if(this.value=t,Array.isArray(t)){var i=t.map((function(t){return n._getOptionId(t)}));e=function(t,e){t._setSelected(i.indexOf(e.toString())>-1)}}else e=function(t,e){t._setSelected(!1)};this._optionMap.forEach(e)}},{key:"registerOnChange",value:function(t){var e=this;this.onChange=function(n){var i=[];if(void 0!==n.selectedOptions)for(var a=n.selectedOptions,r=0;r<a.length;r++){var o=a.item(r),s=e._getOptionValue(o.value);i.push(s)}else for(var c=n.options,l=0;l<c.length;l++){var u=c.item(l);if(u.selected){var d=e._getOptionValue(u.value);i.push(d)}}e.value=i,t(i)}}},{key:"registerOnTouched",value:function(t){this.onTouched=t}},{key:"setDisabledState",value:function(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}},{key:"_registerOption",value:function(t){var e=(this._idCounter++).toString();return this._optionMap.set(e,t),e}},{key:"_getOptionId",value:function(t){for(var e=0,n=Array.from(this._optionMap.keys());e<n.length;e++){var i=n[e];if(this._compareWith(this._optionMap.get(i)._value,t))return i}return null}},{key:"_getOptionValue",value:function(t){var e=function(t){return t.split(":")[0]}(t);return this._optionMap.has(e)?this._optionMap.get(e)._value:t}},{key:"compareWith",set:function(t){this._compareWith=t}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Qb(i.I),i.Qb(i.l))},t.\u0275dir=i.Lb({type:t,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(t,e){1&t&&i.dc("change",(function(t){return e.onChange(t.target)}))("blur",(function(){return e.onTouched()}))},inputs:{compareWith:"compareWith"},features:[i.Cb([B])]}),t}(),G=function(){var t=function(){function t(e,n,i){_classCallCheck(this,t),this._element=e,this._renderer=n,this._select=i,this._select&&(this.id=this._select._registerOption(this))}return _createClass(t,[{key:"_setElementValue",value:function(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}},{key:"_setSelected",value:function(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}},{key:"ngOnDestroy",value:function(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}},{key:"ngValue",set:function(t){null!=this._select&&(this._value=t,this._setElementValue(U(this.id,t)),this._select.writeValue(this._select.value))}},{key:"value",set:function(t){this._select?(this._value=t,this._setElementValue(U(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Qb(i.l),i.Qb(i.I),i.Qb(H,9))},t.\u0275dir=i.Lb({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t}();function $(t,e){return[].concat(_toConsumableArray(e.path),[t])}function X(t,e){t.validator=w.compose([t.validator,e.validator]),t.asyncValidator=w.composeAsync([t.asyncValidator,e.asyncValidator]),e.valueAccessor.writeValue(t.value),function(t,e){e.valueAccessor.registerOnChange((function(n){t._pendingValue=n,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&q(t,e)}))}(t,e),function(t,e){t.registerOnChange((function(t,n){e.valueAccessor.writeValue(t),n&&e.viewToModelUpdate(t)}))}(t,e),function(t,e){e.valueAccessor.registerOnTouched((function(){t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&q(t,e),"submit"!==t.updateOn&&t.markAsTouched()}))}(t,e),e.valueAccessor.setDisabledState&&t.registerOnDisabledChange((function(t){e.valueAccessor.setDisabledState(t)})),e._rawValidators.forEach((function(e){e.registerOnValidatorChange&&e.registerOnValidatorChange((function(){return t.updateValueAndValidity()}))})),e._rawAsyncValidators.forEach((function(e){e.registerOnValidatorChange&&e.registerOnValidatorChange((function(){return t.updateValueAndValidity()}))}))}function q(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function K(t,e){t.validator=w.compose([t.validator,e.validator]),t.asyncValidator=w.composeAsync([t.asyncValidator,e.asyncValidator])}function Y(t){return null!=t?w.compose(R(t)):null}function J(t){return null!=t?w.composeAsync(R(t)):null}function Z(t,e){if(!t.hasOwnProperty("model"))return!1;var n=t.model;return!!n.isFirstChange()||!Object.is(e,n.currentValue)}var tt=[u,F,j,N,H,T];function et(t,e){t._syncPendingControls(),e.forEach((function(t){var e=t.control;"submit"===e.updateOn&&e._pendingChange&&(t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1)}))}function nt(t,e){if(!e)return null;Array.isArray(e);var n=void 0,i=void 0,a=void 0;return e.forEach((function(t){var e;t.constructor===h?n=t:(e=t,tt.some((function(t){return e.constructor===t}))?i=t:a=t)})),a||i||n||null}function it(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}function at(t,e,n,a){Object(i.Z)()&&"never"!==a&&((null!==a&&"once"!==a||e._ngModelWarningSentOnce)&&("always"!==a||n._ngModelWarningSent)||(e._ngModelWarningSentOnce=!0,n._ngModelWarningSent=!0))}function rt(t){return(lt(t)?t.validators:t)||null}function ot(t){return Array.isArray(t)?Y(t):t||null}function st(t,e){return(lt(e)?e.asyncValidators:t)||null}function ct(t){return Array.isArray(t)?J(t):t||null}function lt(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}var ut=function(){function t(e,n){_classCallCheck(this,t),this._hasOwnPendingAsyncValidator=!1,this._onCollectionChange=function(){},this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=e,this._rawAsyncValidators=n,this._composedValidatorFn=ot(this._rawValidators),this._composedAsyncValidatorFn=ct(this._rawAsyncValidators)}return _createClass(t,[{key:"setValidators",value:function(t){this._rawValidators=t,this._composedValidatorFn=ot(t)}},{key:"setAsyncValidators",value:function(t){this._rawAsyncValidators=t,this._composedAsyncValidatorFn=ct(t)}},{key:"clearValidators",value:function(){this.validator=null}},{key:"clearAsyncValidators",value:function(){this.asyncValidator=null}},{key:"markAsTouched",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}},{key:"markAllAsTouched",value:function(){this.markAsTouched({onlySelf:!0}),this._forEachChild((function(t){return t.markAllAsTouched()}))}},{key:"markAsUntouched",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=!1,this._pendingTouched=!1,this._forEachChild((function(t){t.markAsUntouched({onlySelf:!0})})),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}},{key:"markAsDirty",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}},{key:"markAsPristine",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!0,this._pendingDirty=!1,this._forEachChild((function(t){t.markAsPristine({onlySelf:!0})})),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}},{key:"markAsPending",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.status="PENDING",!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}},{key:"disable",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this._parentMarkedDirty(t.onlySelf);this.status="DISABLED",this.errors=null,this._forEachChild((function(e){e.disable(Object.assign(Object.assign({},t),{onlySelf:!0}))})),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach((function(t){return t(!0)}))}},{key:"enable",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this._parentMarkedDirty(t.onlySelf);this.status="VALID",this._forEachChild((function(e){e.enable(Object.assign(Object.assign({},t),{onlySelf:!0}))})),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach((function(t){return t(!1)}))}},{key:"_updateAncestors",value:function(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}},{key:"setParent",value:function(t){this._parent=t}},{key:"updateValueAndValidity",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),"VALID"!==this.status&&"PENDING"!==this.status||this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}},{key:"_updateTreeValidity",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{emitEvent:!0};this._forEachChild((function(e){return e._updateTreeValidity(t)})),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}},{key:"_setInitialStatus",value:function(){this.status=this._allControlsDisabled()?"DISABLED":"VALID"}},{key:"_runValidator",value:function(){return this.validator?this.validator(this):null}},{key:"_runAsyncValidator",value:function(t){var e=this;if(this.asyncValidator){this.status="PENDING",this._hasOwnPendingAsyncValidator=!0;var n=S(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe((function(n){e._hasOwnPendingAsyncValidator=!1,e.setErrors(n,{emitEvent:t})}))}}},{key:"_cancelExistingSubscription",value:function(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}},{key:"setErrors",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)}},{key:"get",value:function(t){return function(t,e,n){if(null==e)return null;if(Array.isArray(e)||(e=e.split(".")),Array.isArray(e)&&0===e.length)return null;var i=t;return e.forEach((function(t){i=i instanceof ft?i.controls.hasOwnProperty(t)?i.controls[t]:null:i instanceof ht&&i.at(t)||null})),i}(this,t)}},{key:"getError",value:function(t,e){var n=e?this.get(e):this;return n&&n.errors?n.errors[t]:null}},{key:"hasError",value:function(t,e){return!!this.getError(t,e)}},{key:"_updateControlsErrors",value:function(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}},{key:"_initObservables",value:function(){this.valueChanges=new i.o,this.statusChanges=new i.o}},{key:"_calculateStatus",value:function(){return this._allControlsDisabled()?"DISABLED":this.errors?"INVALID":this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus("PENDING")?"PENDING":this._anyControlsHaveStatus("INVALID")?"INVALID":"VALID"}},{key:"_anyControlsHaveStatus",value:function(t){return this._anyControls((function(e){return e.status===t}))}},{key:"_anyControlsDirty",value:function(){return this._anyControls((function(t){return t.dirty}))}},{key:"_anyControlsTouched",value:function(){return this._anyControls((function(t){return t.touched}))}},{key:"_updatePristine",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}},{key:"_updateTouched",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}},{key:"_isBoxedValue",value:function(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}},{key:"_registerOnCollectionChange",value:function(t){this._onCollectionChange=t}},{key:"_setUpdateStrategy",value:function(t){lt(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}},{key:"_parentMarkedDirty",value:function(t){return!t&&this._parent&&this._parent.dirty&&!this._parent._anyControlsDirty()}},{key:"validator",get:function(){return this._composedValidatorFn},set:function(t){this._rawValidators=this._composedValidatorFn=t}},{key:"asyncValidator",get:function(){return this._composedAsyncValidatorFn},set:function(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}},{key:"parent",get:function(){return this._parent}},{key:"valid",get:function(){return"VALID"===this.status}},{key:"invalid",get:function(){return"INVALID"===this.status}},{key:"pending",get:function(){return"PENDING"==this.status}},{key:"disabled",get:function(){return"DISABLED"===this.status}},{key:"enabled",get:function(){return"DISABLED"!==this.status}},{key:"dirty",get:function(){return!this.pristine}},{key:"untouched",get:function(){return!this.touched}},{key:"updateOn",get:function(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}},{key:"root",get:function(){for(var t=this;t._parent;)t=t._parent;return t}}]),t}(),dt=function(t){_inherits(n,t);var e=_createSuper(n);function n(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,a=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;return _classCallCheck(this,n),(t=e.call(this,rt(a),st(r,a)))._onChange=[],t._applyFormState(i),t._setUpdateStrategy(a),t.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),t._initObservables(),t}return _createClass(n,[{key:"setValue",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.value=this._pendingValue=t,this._onChange.length&&!1!==n.emitModelToViewChange&&this._onChange.forEach((function(t){return t(e.value,!1!==n.emitViewToModelChange)})),this.updateValueAndValidity(n)}},{key:"patchValue",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.setValue(t,e)}},{key:"reset",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}},{key:"_updateValue",value:function(){}},{key:"_anyControls",value:function(t){return!1}},{key:"_allControlsDisabled",value:function(){return this.disabled}},{key:"registerOnChange",value:function(t){this._onChange.push(t)}},{key:"_clearChangeFns",value:function(){this._onChange=[],this._onDisabledChange=[],this._onCollectionChange=function(){}}},{key:"registerOnDisabledChange",value:function(t){this._onDisabledChange.push(t)}},{key:"_forEachChild",value:function(t){}},{key:"_syncPendingControls",value:function(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}},{key:"_applyFormState",value:function(t){this._isBoxedValue(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}}]),n}(ut),ft=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a){var r;return _classCallCheck(this,n),(r=e.call(this,rt(i),st(a,i))).controls=t,r._initObservables(),r._setUpdateStrategy(i),r._setUpControls(),r.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),r}return _createClass(n,[{key:"registerControl",value:function(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}},{key:"addControl",value:function(t,e){this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"removeControl",value:function(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange((function(){})),delete this.controls[t],this.updateValueAndValidity(),this._onCollectionChange()}},{key:"setControl",value:function(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange((function(){})),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"contains",value:function(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}},{key:"setValue",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._checkAllValuesPresent(t),Object.keys(t).forEach((function(i){e._throwIfControlMissing(i),e.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:n.emitEvent})})),this.updateValueAndValidity(n)}},{key:"patchValue",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.keys(t).forEach((function(i){e.controls[i]&&e.controls[i].patchValue(t[i],{onlySelf:!0,emitEvent:n.emitEvent})})),this.updateValueAndValidity(n)}},{key:"reset",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._forEachChild((function(n,i){n.reset(t[i],{onlySelf:!0,emitEvent:e.emitEvent})})),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}},{key:"getRawValue",value:function(){return this._reduceChildren({},(function(t,e,n){return t[n]=e instanceof dt?e.value:e.getRawValue(),t}))}},{key:"_syncPendingControls",value:function(){var t=this._reduceChildren(!1,(function(t,e){return!!e._syncPendingControls()||t}));return t&&this.updateValueAndValidity({onlySelf:!0}),t}},{key:"_throwIfControlMissing",value:function(t){if(!Object.keys(this.controls).length)throw new Error("\n There are no form controls registered with this group yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.controls[t])throw new Error("Cannot find form control with name: ".concat(t,"."))}},{key:"_forEachChild",value:function(t){var e=this;Object.keys(this.controls).forEach((function(n){return t(e.controls[n],n)}))}},{key:"_setUpControls",value:function(){var t=this;this._forEachChild((function(e){e.setParent(t),e._registerOnCollectionChange(t._onCollectionChange)}))}},{key:"_updateValue",value:function(){this.value=this._reduceValue()}},{key:"_anyControls",value:function(t){for(var e=0,n=Object.keys(this.controls);e<n.length;e++){var i=n[e],a=this.controls[i];if(this.contains(i)&&t(a))return!0}return!1}},{key:"_reduceValue",value:function(){var t=this;return this._reduceChildren({},(function(e,n,i){return(n.enabled||t.disabled)&&(e[i]=n.value),e}))}},{key:"_reduceChildren",value:function(t,e){var n=t;return this._forEachChild((function(t,i){n=e(n,t,i)})),n}},{key:"_allControlsDisabled",value:function(){for(var t=0,e=Object.keys(this.controls);t<e.length;t++){var n=e[t];if(this.controls[n].enabled)return!1}return Object.keys(this.controls).length>0||this.disabled}},{key:"_checkAllValuesPresent",value:function(t){this._forEachChild((function(e,n){if(void 0===t[n])throw new Error("Must supply a value for form control with name: '".concat(n,"'."))}))}}]),n}(ut),ht=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a){var r;return _classCallCheck(this,n),(r=e.call(this,rt(i),st(a,i))).controls=t,r._initObservables(),r._setUpdateStrategy(i),r._setUpControls(),r.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),r}return _createClass(n,[{key:"at",value:function(t){return this.controls[t]}},{key:"push",value:function(t){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"insert",value:function(t,e){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity()}},{key:"removeAt",value:function(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange((function(){})),this.controls.splice(t,1),this.updateValueAndValidity()}},{key:"setControl",value:function(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange((function(){})),this.controls.splice(t,1),e&&(this.controls.splice(t,0,e),this._registerControl(e)),this.updateValueAndValidity(),this._onCollectionChange()}},{key:"setValue",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._checkAllValuesPresent(t),t.forEach((function(t,i){e._throwIfControlMissing(i),e.at(i).setValue(t,{onlySelf:!0,emitEvent:n.emitEvent})})),this.updateValueAndValidity(n)}},{key:"patchValue",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.forEach((function(t,i){e.at(i)&&e.at(i).patchValue(t,{onlySelf:!0,emitEvent:n.emitEvent})})),this.updateValueAndValidity(n)}},{key:"reset",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._forEachChild((function(n,i){n.reset(t[i],{onlySelf:!0,emitEvent:e.emitEvent})})),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}},{key:"getRawValue",value:function(){return this.controls.map((function(t){return t instanceof dt?t.value:t.getRawValue()}))}},{key:"clear",value:function(){this.controls.length<1||(this._forEachChild((function(t){return t._registerOnCollectionChange((function(){}))})),this.controls.splice(0),this.updateValueAndValidity())}},{key:"_syncPendingControls",value:function(){var t=this.controls.reduce((function(t,e){return!!e._syncPendingControls()||t}),!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}},{key:"_throwIfControlMissing",value:function(t){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(t))throw new Error("Cannot find form control at index "+t)}},{key:"_forEachChild",value:function(t){this.controls.forEach((function(e,n){t(e,n)}))}},{key:"_updateValue",value:function(){var t=this;this.value=this.controls.filter((function(e){return e.enabled||t.disabled})).map((function(t){return t.value}))}},{key:"_anyControls",value:function(t){return this.controls.some((function(e){return e.enabled&&t(e)}))}},{key:"_setUpControls",value:function(){var t=this;this._forEachChild((function(e){return t._registerControl(e)}))}},{key:"_checkAllValuesPresent",value:function(t){this._forEachChild((function(e,n){if(void 0===t[n])throw new Error("Must supply a value for form control at index: ".concat(n,"."))}))}},{key:"_allControlsDisabled",value:function(){var t,e=_createForOfIteratorHelper(this.controls);try{for(e.s();!(t=e.n()).done;){if(t.value.enabled)return!1}}catch(n){e.e(n)}finally{e.f()}return this.controls.length>0||this.disabled}},{key:"_registerControl",value:function(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}},{key:"length",get:function(){return this.controls.length}}]),n}(ut),pt={provide:b,useExisting:Object(i.X)((function(){return gt}))},bt=Promise.resolve(null),gt=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,a){var r;return _classCallCheck(this,n),(r=e.call(this)).submitted=!1,r._directives=[],r.ngSubmit=new i.o,r.form=new ft({},Y(t),J(a)),r}return _createClass(n,[{key:"ngAfterViewInit",value:function(){this._setUpdateStrategy()}},{key:"addControl",value:function(t){var e=this;bt.then((function(){var n=e._findContainer(t.path);t.control=n.registerControl(t.name,t.control),X(t.control,t),t.control.updateValueAndValidity({emitEvent:!1}),e._directives.push(t)}))}},{key:"getControl",value:function(t){return this.form.get(t.path)}},{key:"removeControl",value:function(t){var e=this;bt.then((function(){var n=e._findContainer(t.path);n&&n.removeControl(t.name),it(e._directives,t)}))}},{key:"addFormGroup",value:function(t){var e=this;bt.then((function(){var n=e._findContainer(t.path),i=new ft({});K(i,t),n.registerControl(t.name,i),i.updateValueAndValidity({emitEvent:!1})}))}},{key:"removeFormGroup",value:function(t){var e=this;bt.then((function(){var n=e._findContainer(t.path);n&&n.removeControl(t.name)}))}},{key:"getFormGroup",value:function(t){return this.form.get(t.path)}},{key:"updateModel",value:function(t,e){var n=this;bt.then((function(){n.form.get(t.path).setValue(e)}))}},{key:"setValue",value:function(t){this.control.setValue(t)}},{key:"onSubmit",value:function(t){return this.submitted=!0,et(this.form,this._directives),this.ngSubmit.emit(t),!1}},{key:"onReset",value:function(){this.resetForm()}},{key:"resetForm",value:function(t){this.form.reset(t),this.submitted=!1}},{key:"_setUpdateStrategy",value:function(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}},{key:"_findContainer",value:function(t){return t.pop(),t.length?this.form.get(t):this.form}},{key:"formDirective",get:function(){return this}},{key:"control",get:function(){return this.form}},{key:"path",get:function(){return[]}},{key:"controls",get:function(){return this.form.controls}}]),n}(b);return t.\u0275fac=function(e){return new(e||t)(i.Qb(x,10),i.Qb(O,10))},t.\u0275dir=i.Lb({type:t,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(t,e){1&t&&i.dc("submit",(function(t){return e.onSubmit(t)}))("reset",(function(){return e.onReset()}))},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[i.Cb([pt]),i.Ab]}),t}(),mt=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return _createClass(n,[{key:"ngOnInit",value:function(){this._checkParentType(),this.formDirective.addFormGroup(this)}},{key:"ngOnDestroy",value:function(){this.formDirective&&this.formDirective.removeFormGroup(this)}},{key:"_checkParentType",value:function(){}},{key:"control",get:function(){return this.formDirective.getFormGroup(this)}},{key:"path",get:function(){return $(null==this.name?this.name:this.name.toString(),this._parent)}},{key:"formDirective",get:function(){return this._parent?this._parent.formDirective:null}},{key:"validator",get:function(){return Y(this._validators)}},{key:"asyncValidator",get:function(){return J(this._asyncValidators)}}]),n}(b);return t.\u0275fac=function(e){return vt(e||t)},t.\u0275dir=i.Lb({type:t,features:[i.Ab]}),t}(),vt=i.Yb(mt),yt={provide:b,useExisting:Object(i.X)((function(){return _t}))},_t=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a){var r;return _classCallCheck(this,n),(r=e.call(this))._parent=t,r._validators=i,r._asyncValidators=a,r}return _createClass(n,[{key:"_checkParentType",value:function(){}}]),n}(mt);return t.\u0275fac=function(e){return new(e||t)(i.Qb(b,5),i.Qb(x,10),i.Qb(O,10))},t.\u0275dir=i.Lb({type:t,selectors:[["","ngModelGroup",""]],inputs:{name:["ngModelGroup","name"]},exportAs:["ngModelGroup"],features:[i.Cb([yt]),i.Ab]}),t}(),Ct={provide:m,useExisting:Object(i.X)((function(){return xt}))},kt=Promise.resolve(null),xt=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,a,r,o){var s;return _classCallCheck(this,n),(s=e.call(this)).control=new dt,s._registered=!1,s.update=new i.o,s._parent=t,s._rawValidators=a||[],s._rawAsyncValidators=r||[],s.valueAccessor=nt(0,o),s}return _createClass(n,[{key:"ngOnChanges",value:function(t){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in t&&this._updateDisabled(t),Z(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}},{key:"ngOnDestroy",value:function(){this.formDirective&&this.formDirective.removeControl(this)}},{key:"viewToModelUpdate",value:function(t){this.viewModel=t,this.update.emit(t)}},{key:"_setUpControl",value:function(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}},{key:"_setUpdateStrategy",value:function(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}},{key:"_isStandalone",value:function(){return!this._parent||!(!this.options||!this.options.standalone)}},{key:"_setUpStandalone",value:function(){X(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})}},{key:"_checkForErrors",value:function(){this._isStandalone()||this._checkParentType(),this._checkName()}},{key:"_checkParentType",value:function(){}},{key:"_checkName",value:function(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}},{key:"_updateValue",value:function(t){var e=this;kt.then((function(){e.control.setValue(t,{emitViewToModelChange:!1})}))}},{key:"_updateDisabled",value:function(t){var e=this,n=t.isDisabled.currentValue,i=""===n||n&&"false"!==n;kt.then((function(){i&&!e.control.disabled?e.control.disable():!i&&e.control.disabled&&e.control.enable()}))}},{key:"path",get:function(){return this._parent?$(this.name,this._parent):[this.name]}},{key:"formDirective",get:function(){return this._parent?this._parent.formDirective:null}},{key:"validator",get:function(){return Y(this._rawValidators)}},{key:"asyncValidator",get:function(){return J(this._rawAsyncValidators)}}]),n}(m);return t.\u0275fac=function(e){return new(e||t)(i.Qb(b,9),i.Qb(x,10),i.Qb(O,10),i.Qb(c,10))},t.\u0275dir=i.Lb({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:[i.Cb([Ct]),i.Ab,i.Bb]}),t}(),Ot=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=i.Lb({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),t}(),Dt=new i.s("NgModelWithFormControlWarning"),wt={provide:m,useExisting:Object(i.X)((function(){return Mt}))},Mt=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,a,r,o){var s;return _classCallCheck(this,n),(s=e.call(this))._ngModelWarningConfig=o,s.update=new i.o,s._ngModelWarningSent=!1,s._rawValidators=t||[],s._rawAsyncValidators=a||[],s.valueAccessor=nt(0,r),s}return _createClass(n,[{key:"ngOnChanges",value:function(t){this._isControlChanged(t)&&(X(this.form,this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this.form.updateValueAndValidity({emitEvent:!1})),Z(t,this.viewModel)&&(at(0,n,this,this._ngModelWarningConfig),this.form.setValue(this.model),this.viewModel=this.model)}},{key:"viewToModelUpdate",value:function(t){this.viewModel=t,this.update.emit(t)}},{key:"_isControlChanged",value:function(t){return t.hasOwnProperty("form")}},{key:"isDisabled",set:function(t){}},{key:"path",get:function(){return[]}},{key:"validator",get:function(){return Y(this._rawValidators)}},{key:"asyncValidator",get:function(){return J(this._rawAsyncValidators)}},{key:"control",get:function(){return this.form}}]),n}(m);return t.\u0275fac=function(e){return new(e||t)(i.Qb(x,10),i.Qb(O,10),i.Qb(c,10),i.Qb(Dt,8))},t.\u0275dir=i.Lb({type:t,selectors:[["","formControl",""]],inputs:{isDisabled:["disabled","isDisabled"],form:["formControl","form"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[i.Cb([wt]),i.Ab,i.Bb]}),t._ngModelWarningSentOnce=!1,t}(),St={provide:b,useExisting:Object(i.X)((function(){return It}))},It=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,a){var r;return _classCallCheck(this,n),(r=e.call(this))._validators=t,r._asyncValidators=a,r.submitted=!1,r.directives=[],r.form=null,r.ngSubmit=new i.o,r}return _createClass(n,[{key:"ngOnChanges",value:function(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations())}},{key:"addControl",value:function(t){var e=this.form.get(t.path);return X(e,t),e.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),e}},{key:"getControl",value:function(t){return this.form.get(t.path)}},{key:"removeControl",value:function(t){it(this.directives,t)}},{key:"addFormGroup",value:function(t){var e=this.form.get(t.path);K(e,t),e.updateValueAndValidity({emitEvent:!1})}},{key:"removeFormGroup",value:function(t){}},{key:"getFormGroup",value:function(t){return this.form.get(t.path)}},{key:"addFormArray",value:function(t){var e=this.form.get(t.path);K(e,t),e.updateValueAndValidity({emitEvent:!1})}},{key:"removeFormArray",value:function(t){}},{key:"getFormArray",value:function(t){return this.form.get(t.path)}},{key:"updateModel",value:function(t,e){this.form.get(t.path).setValue(e)}},{key:"onSubmit",value:function(t){return this.submitted=!0,et(this.form,this.directives),this.ngSubmit.emit(t),!1}},{key:"onReset",value:function(){this.resetForm()}},{key:"resetForm",value:function(t){this.form.reset(t),this.submitted=!1}},{key:"_updateDomValue",value:function(){var t=this;this.directives.forEach((function(e){var n=t.form.get(e.path);e.control!==n&&(function(t,e){var n=function(){};e.valueAccessor.registerOnChange(n),e.valueAccessor.registerOnTouched(n),e._rawValidators.forEach((function(t){t.registerOnValidatorChange&&t.registerOnValidatorChange(null)})),e._rawAsyncValidators.forEach((function(t){t.registerOnValidatorChange&&t.registerOnValidatorChange(null)})),t&&t._clearChangeFns()}(e.control,e),n&&X(n,e),e.control=n)})),this.form._updateTreeValidity({emitEvent:!1})}},{key:"_updateRegistrations",value:function(){var t=this;this.form._registerOnCollectionChange((function(){return t._updateDomValue()})),this._oldForm&&this._oldForm._registerOnCollectionChange((function(){})),this._oldForm=this.form}},{key:"_updateValidators",value:function(){var t=Y(this._validators);this.form.validator=w.compose([this.form.validator,t]);var e=J(this._asyncValidators);this.form.asyncValidator=w.composeAsync([this.form.asyncValidator,e])}},{key:"_checkFormPresent",value:function(){}},{key:"formDirective",get:function(){return this}},{key:"control",get:function(){return this.form}},{key:"path",get:function(){return[]}}]),n}(b);return t.\u0275fac=function(e){return new(e||t)(i.Qb(x,10),i.Qb(O,10))},t.\u0275dir=i.Lb({type:t,selectors:[["","formGroup",""]],hostBindings:function(t,e){1&t&&i.dc("submit",(function(t){return e.onSubmit(t)}))("reset",(function(){return e.onReset()}))},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[i.Cb([St]),i.Ab,i.Bb]}),t}(),Pt={provide:b,useExisting:Object(i.X)((function(){return Rt}))},Rt=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a){var r;return _classCallCheck(this,n),(r=e.call(this))._parent=t,r._validators=i,r._asyncValidators=a,r}return _createClass(n,[{key:"_checkParentType",value:function(){At(this._parent)}}]),n}(mt);return t.\u0275fac=function(e){return new(e||t)(i.Qb(b,13),i.Qb(x,10),i.Qb(O,10))},t.\u0275dir=i.Lb({type:t,selectors:[["","formGroupName",""]],inputs:{name:["formGroupName","name"]},features:[i.Cb([Pt]),i.Ab]}),t}(),Vt={provide:b,useExisting:Object(i.X)((function(){return jt}))},jt=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a){var r;return _classCallCheck(this,n),(r=e.call(this))._parent=t,r._validators=i,r._asyncValidators=a,r}return _createClass(n,[{key:"ngOnInit",value:function(){this._checkParentType(),this.formDirective.addFormArray(this)}},{key:"ngOnDestroy",value:function(){this.formDirective&&this.formDirective.removeFormArray(this)}},{key:"_checkParentType",value:function(){At(this._parent)}},{key:"control",get:function(){return this.formDirective.getFormArray(this)}},{key:"formDirective",get:function(){return this._parent?this._parent.formDirective:null}},{key:"path",get:function(){return $(null==this.name?this.name:this.name.toString(),this._parent)}},{key:"validator",get:function(){return Y(this._validators)}},{key:"asyncValidator",get:function(){return J(this._asyncValidators)}}]),n}(b);return t.\u0275fac=function(e){return new(e||t)(i.Qb(b,13),i.Qb(x,10),i.Qb(O,10))},t.\u0275dir=i.Lb({type:t,selectors:[["","formArrayName",""]],inputs:{name:["formArrayName","name"]},features:[i.Cb([Vt]),i.Ab]}),t}();function At(t){return!(t instanceof Rt||t instanceof It||t instanceof jt)}var Wt={provide:m,useExisting:Object(i.X)((function(){return Tt}))},Tt=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,a,r,o,s){var c;return _classCallCheck(this,n),(c=e.call(this))._ngModelWarningConfig=s,c._added=!1,c.update=new i.o,c._ngModelWarningSent=!1,c._parent=t,c._rawValidators=a||[],c._rawAsyncValidators=r||[],c.valueAccessor=nt(0,o),c}return _createClass(n,[{key:"ngOnChanges",value:function(t){this._added||this._setUpControl(),Z(t,this.viewModel)&&(at(0,n,this,this._ngModelWarningConfig),this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}},{key:"ngOnDestroy",value:function(){this.formDirective&&this.formDirective.removeControl(this)}},{key:"viewToModelUpdate",value:function(t){this.viewModel=t,this.update.emit(t)}},{key:"_checkParentType",value:function(){}},{key:"_setUpControl",value:function(){this._checkParentType(),this.control=this.formDirective.addControl(this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this._added=!0}},{key:"isDisabled",set:function(t){}},{key:"path",get:function(){return $(null==this.name?this.name:this.name.toString(),this._parent)}},{key:"formDirective",get:function(){return this._parent?this._parent.formDirective:null}},{key:"validator",get:function(){return Y(this._rawValidators)}},{key:"asyncValidator",get:function(){return J(this._rawAsyncValidators)}}]),n}(m);return t.\u0275fac=function(e){return new(e||t)(i.Qb(b,13),i.Qb(x,10),i.Qb(O,10),i.Qb(c,10),i.Qb(Dt,8))},t.\u0275dir=i.Lb({type:t,selectors:[["","formControlName",""]],inputs:{isDisabled:["disabled","isDisabled"],name:["formControlName","name"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[i.Cb([Wt]),i.Ab,i.Bb]}),t._ngModelWarningSentOnce=!1,t}(),Et={provide:x,useExisting:Object(i.X)((function(){return Lt})),multi:!0},Ft={provide:x,useExisting:Object(i.X)((function(){return Qt})),multi:!0},Lt=function(){var t=function(){function t(){_classCallCheck(this,t),this._required=!1}return _createClass(t,[{key:"validate",value:function(t){return this.required?w.required(t):null}},{key:"registerOnValidatorChange",value:function(t){this._onChange=t}},{key:"required",get:function(){return this._required},set:function(t){this._required=null!=t&&!1!==t&&""+t!="false",this._onChange&&this._onChange()}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=i.Lb({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(t,e){2&t&&i.Eb("required",e.required?"":null)},inputs:{required:"required"},features:[i.Cb([Et])]}),t}(),Qt=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return _createClass(n,[{key:"validate",value:function(t){return this.required?w.requiredTrue(t):null}}]),n}(Lt);return t.\u0275fac=function(e){return Nt(e||t)},t.\u0275dir=i.Lb({type:t,selectors:[["input","type","checkbox","required","","formControlName",""],["input","type","checkbox","required","","formControl",""],["input","type","checkbox","required","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&i.Eb("required",e.required?"":null)},features:[i.Cb([Ft]),i.Ab]}),t}(),Nt=i.Yb(Qt),zt={provide:x,useExisting:Object(i.X)((function(){return Bt})),multi:!0},Bt=function(){var t=function(){function t(){_classCallCheck(this,t),this._enabled=!1}return _createClass(t,[{key:"validate",value:function(t){return this._enabled?w.email(t):null}},{key:"registerOnValidatorChange",value:function(t){this._onChange=t}},{key:"email",set:function(t){this._enabled=""===t||!0===t||"true"===t,this._onChange&&this._onChange()}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=i.Lb({type:t,selectors:[["","email","","formControlName",""],["","email","","formControl",""],["","email","","ngModel",""]],inputs:{email:"email"},features:[i.Cb([zt])]}),t}(),Ut={provide:x,useExisting:Object(i.X)((function(){return Ht})),multi:!0},Ht=function(){var t=function(){function t(){_classCallCheck(this,t),this._validator=w.nullValidator}return _createClass(t,[{key:"ngOnChanges",value:function(t){"minlength"in t&&(this._createValidator(),this._onChange&&this._onChange())}},{key:"validate",value:function(t){return null==this.minlength?null:this._validator(t)}},{key:"registerOnValidatorChange",value:function(t){this._onChange=t}},{key:"_createValidator",value:function(){this._validator=w.minLength("number"==typeof this.minlength?this.minlength:parseInt(this.minlength,10))}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=i.Lb({type:t,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&i.Eb("minlength",e.minlength?e.minlength:null)},inputs:{minlength:"minlength"},features:[i.Cb([Ut]),i.Bb]}),t}(),Gt={provide:x,useExisting:Object(i.X)((function(){return $t})),multi:!0},$t=function(){var t=function(){function t(){_classCallCheck(this,t),this._validator=w.nullValidator}return _createClass(t,[{key:"ngOnChanges",value:function(t){"maxlength"in t&&(this._createValidator(),this._onChange&&this._onChange())}},{key:"validate",value:function(t){return null!=this.maxlength?this._validator(t):null}},{key:"registerOnValidatorChange",value:function(t){this._onChange=t}},{key:"_createValidator",value:function(){this._validator=w.maxLength("number"==typeof this.maxlength?this.maxlength:parseInt(this.maxlength,10))}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=i.Lb({type:t,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&i.Eb("maxlength",e.maxlength?e.maxlength:null)},inputs:{maxlength:"maxlength"},features:[i.Cb([Gt]),i.Bb]}),t}(),Xt={provide:x,useExisting:Object(i.X)((function(){return qt})),multi:!0},qt=function(){var t=function(){function t(){_classCallCheck(this,t),this._validator=w.nullValidator}return _createClass(t,[{key:"ngOnChanges",value:function(t){"pattern"in t&&(this._createValidator(),this._onChange&&this._onChange())}},{key:"validate",value:function(t){return this._validator(t)}},{key:"registerOnValidatorChange",value:function(t){this._onChange=t}},{key:"_createValidator",value:function(){this._validator=w.pattern(this.pattern)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=i.Lb({type:t,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(t,e){2&t&&i.Eb("pattern",e.pattern?e.pattern:null)},inputs:{pattern:"pattern"},features:[i.Cb([Xt]),i.Bb]}),t}(),Kt=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=i.Ob({type:t}),t.\u0275inj=i.Nb({factory:function(e){return new(e||t)}}),t}(),Yt=function(){var t=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"group",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this._reduceControls(t),i=null,a=null,r=void 0;return null!=e&&(function(t){return void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn}(e)?(i=null!=e.validators?e.validators:null,a=null!=e.asyncValidators?e.asyncValidators:null,r=null!=e.updateOn?e.updateOn:void 0):(i=null!=e.validator?e.validator:null,a=null!=e.asyncValidator?e.asyncValidator:null)),new ft(n,{asyncValidators:a,updateOn:r,validators:i})}},{key:"control",value:function(t,e,n){return new dt(t,e,n)}},{key:"array",value:function(t,e,n){var i=this,a=t.map((function(t){return i._createControl(t)}));return new ht(a,e,n)}},{key:"_reduceControls",value:function(t){var e=this,n={};return Object.keys(t).forEach((function(i){n[i]=e._createControl(t[i])})),n}},{key:"_createControl",value:function(t){return t instanceof dt||t instanceof ft||t instanceof ht?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=i.Mb({token:t,factory:t.\u0275fac}),t}(),Jt=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=i.Ob({type:t}),t.\u0275inj=i.Nb({factory:function(e){return new(e||t)},providers:[W],imports:[Kt]}),t}(),Zt=function(){var t=function(){function t(){_classCallCheck(this,t)}return _createClass(t,null,[{key:"withConfig",value:function(e){return{ngModule:t,providers:[{provide:Dt,useValue:e.warnOnNgModelWithFormControl}]}}}]),t}();return t.\u0275mod=i.Ob({type:t}),t.\u0275inj=i.Nb({factory:function(e){return new(e||t)},providers:[Yt,W],imports:[Kt]}),t}()},"3UWI":function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n("D0XW"),a=n("zx2A"),r=function(){function t(e){_classCallCheck(this,t),this.durationSelector=e}return _createClass(t,[{key:"call",value:function(t,e){return e.subscribe(new o(t,this.durationSelector))}}]),t}(),o=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var a;return _classCallCheck(this,n),(a=e.call(this,t)).durationSelector=i,a.hasValue=!1,a}return _createClass(n,[{key:"_next",value:function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var e;try{e=(0,this.durationSelector)(t)}catch(i){return this.destination.error(i)}var n=Object(a.c)(e,new a.a(this));!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}}},{key:"clearThrottle",value:function(){var t=this.value,e=this.hasValue,n=this.throttled;n&&(this.remove(n),this.throttled=void 0,n.unsubscribe()),e&&(this.value=void 0,this.hasValue=!1,this.destination.next(t))}},{key:"notifyNext",value:function(){this.clearThrottle()}},{key:"notifyComplete",value:function(){this.clearThrottle()}}]),n}(a.b),s=n("PqYM");function c(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.a;return e=function(){return Object(s.a)(t,n)},function(t){return t.lift(new r(e))}}},4:function(t,e){},"4I5i":function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(){function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t}()},"4zkx":function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var i=n("vkgz"),a=n("JIr8"),r=n("lJxs"),o=n("LRne"),s=n("+rOU"),c=n("fXoL"),l=n("sYmb"),u=n("tk/3"),d=n("6Psc"),f=function(){var t=function(){function t(e,n,i,a,r,o){_classCallCheck(this,t),this.translate=e,this.http=n,this.foldersService=i,this.componentFactoryResolver=a,this.injector=r,this.appRef=o,this.sideBarForm=!1,this.sideBarAdmin=!1,this.hideSideBar=!1,this.showhHeaderPanel=!0,this.showMenuShortcut=!0,this.showMenuNav=!0,this.sideNavLeft=null,this.sideBarButton=null,this.currentBasketInfo={ownerId:0,groupId:0,basketId:""},this.folderId=0,this.headerMessageIcon="",this.headerMessage="",this.subHeaderMessage="",this.user={firstname:"",lastname:"",groups:[],privileges:[],preferences:[],featureTour:[]},this.nbResourcesFollowed=0,this.base64=null}return _createClass(t,[{key:"loadHeader",value:function(){var t=this;return new Promise((function(e,n){t.http.get("../rest/header").pipe(Object(i.a)((function(n){t.setUser(n.user),e(!0)})),Object(a.a)((function(t){return console.log(t),e(!1),Object(o.a)(!1)}))).subscribe()}))}},{key:"resfreshCurrentUser",value:function(){var t=this;return new Promise((function(e,n){t.http.get("../rest/currentUser/profile").pipe(Object(r.a)((function(n){t.user={mode:n.mode,id:n.id,userId:n.user_id,firstname:n.firstname,lastname:n.lastname,entities:n.entities,groups:n.groups,preferences:n.preferences,privileges:"ALL_PRIVILEGES"===n.privileges[0]?t.user.privileges:n.privileges,featureTour:n.featureTour},t.nbResourcesFollowed=n.nbFollowedResources,e(!0)}))).subscribe()}))}},{key:"setUser",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{firstname:"",lastname:"",groups:[],privileges:[]};this.user=t}},{key:"getLastLoadedFile",value:function(){return this.base64}},{key:"setLoadedFile",value:function(t){this.base64=t}},{key:"setHeader",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";this.headerMessage=t,this.subHeaderMessage=e,this.headerMessageIcon=n}},{key:"resetSideNavSelection",value:function(){this.currentBasketInfo={ownerId:0,groupId:0,basketId:""},this.foldersService.setFolder({id:0}),this.sideBarForm=!1,this.showhHeaderPanel=!0,this.showMenuShortcut=!0,this.showMenuNav=!0,this.sideBarAdmin=!1,this.sideBarButton=null,this.hideSideBar=!0}},{key:"injectInSideBarLeft",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"adminMenu",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";"form"===i?(this.sideBarForm=!0,this.showhHeaderPanel=!0,this.showMenuShortcut=!1,this.showMenuNav=!1,this.sideBarAdmin=!0):(this.showhHeaderPanel=!0,this.showMenuShortcut=!0,this.showMenuNav=!0),this.portalHost=new s.e(document.querySelector("#"+n),this.componentFactoryResolver,this.appRef,this.injector);var a=new s.i(t,e);this.portalHost.attach(a)}},{key:"initTemplate",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"adminMenu";this.portalHost=new s.e(document.querySelector("#"+n),this.componentFactoryResolver,this.appRef,this.injector);var i=new s.i(t,e);this.portalHost.attach(i)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(c.ac(l.e),c.ac(u.b),c.ac(d.a),c.ac(c.j),c.ac(c.t),c.ac(c.g))},t.\u0275prov=c.Mb({token:t,factory:t.\u0275fac,providedIn:"root"}),t}()},5:function(t,e){},"5+WD":function(t,e,n){"use strict";n.d(e,"a",(function(){return Mt})),n.d(e,"b",(function(){return kt})),n.d(e,"c",(function(){return Ot})),n.d(e,"d",(function(){return wt})),n.d(e,"e",(function(){return _t})),n.d(e,"f",(function(){return gt})),n.d(e,"g",(function(){return Pt})),n.d(e,"h",(function(){return $})),n.d(e,"i",(function(){return X}));var i=n("fXoL"),a=n("ofXK"),r=n("vxfF"),o=n("nLfN"),s=n("8LU1"),c=n("XNiG"),l=n("quSY"),u=n("HDdC"),d=n("D0XW"),f=n("Y7HM");function h(t){var e=t.subscriber,n=t.counter,i=t.period;e.next(n),this.schedule({subscriber:e,counter:n+1,period:i},i)}var p=n("eNwd"),b=n("VRyK"),g=n("1G5W"),m=n("JX91"),v=n("lJxs"),y=n("IzEk"),_=n("vkgz"),C=n("eIep"),k=n("cH1L");function x(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function O(t,e){var n=e?"":"none";x(t.style,{touchAction:e?"":"none",webkitUserDrag:e?"":"none",webkitTapHighlightColor:e?"":"transparent",userSelect:n,msUserSelect:n,webkitUserSelect:n,MozUserSelect:n})}function D(t,e){var n=t.style;n.position=e?"":"fixed",n.top=n.opacity=e?"":"0",n.left=e?"":"-999em"}function w(t){var e=t.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(t)*e}function M(t,e){return t.getPropertyValue(e).split(",").map((function(t){return t.trim()}))}function S(t){var e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}}function I(t,e,n){var i=t.top,a=t.bottom,r=t.left,o=t.right;return n>=i&&n<=a&&e>=r&&e<=o}function P(t,e,n){t.top+=e,t.bottom=t.top+t.height,t.left+=n,t.right=t.left+t.width}function R(t,e,n,i){var a=t.top,r=t.right,o=t.bottom,s=t.left,c=t.width*e,l=t.height*e;return i>a-l&&i<o+l&&n>s-c&&n<r+c}var V=function(){function t(e,n){_classCallCheck(this,t),this._document=e,this._viewportRuler=n,this.positions=new Map}return _createClass(t,[{key:"clear",value:function(){this.positions.clear()}},{key:"cache",value:function(t){var e=this;this.clear(),this.positions.set(this._document,{scrollPosition:this._viewportRuler.getViewportScrollPosition()}),t.forEach((function(t){e.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:S(t)})}))}},{key:"handleScroll",value:function(t){var e=t.target,n=this.positions.get(e);if(!n)return null;var i,a,r=e===this._document?e.documentElement:e,o=n.scrollPosition;if(e===this._document){var s=this._viewportRuler.getViewportScrollPosition();i=s.top,a=s.left}else i=e.scrollTop,a=e.scrollLeft;var c=o.top-i,l=o.left-a;return this.positions.forEach((function(t,n){t.clientRect&&e!==n&&r.contains(n)&&P(t.clientRect,c,l)})),o.top=i,o.left=a,{top:c,left:l}}}]),t}();function j(t){var e=t.cloneNode(!0),n=e.querySelectorAll("[id]"),i=t.nodeName.toLowerCase();e.removeAttribute("id");for(var a=0;a<n.length;a++)n[a].removeAttribute("id");return"canvas"===i?E(t,e):"input"!==i&&"select"!==i&&"textarea"!==i||T(t,e),A("canvas",t,e,E),A("input, textarea, select",t,e,T),e}function A(t,e,n,i){var a=e.querySelectorAll(t);if(a.length)for(var r=n.querySelectorAll(t),o=0;o<a.length;o++)i(a[o],r[o])}var W=0;function T(t,e){"file"!==e.type&&(e.value=t.value),"radio"===e.type&&e.name&&(e.name="mat-clone-".concat(e.name,"-").concat(W++))}function E(t,e){var n=e.getContext("2d");if(n)try{n.drawImage(t,0,0)}catch(i){}}var F=Object(o.f)({passive:!0}),L=Object(o.f)({passive:!1}),Q=function(){function t(e,n,i,a,r,o){var s=this;_classCallCheck(this,t),this._config=n,this._document=i,this._ngZone=a,this._viewportRuler=r,this._dragDropRegistry=o,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._moveEvents=new c.a,this._pointerMoveSubscription=l.a.EMPTY,this._pointerUpSubscription=l.a.EMPTY,this._scrollSubscription=l.a.EMPTY,this._resizeSubscription=l.a.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this._disabled=!1,this.beforeStarted=new c.a,this.started=new c.a,this.released=new c.a,this.ended=new c.a,this.entered=new c.a,this.exited=new c.a,this.dropped=new c.a,this.moved=this._moveEvents,this._pointerDown=function(t){if(s.beforeStarted.next(),s._handles.length){var e=s._handles.find((function(e){var n=t.target;return!!n&&(n===e||e.contains(n))}));!e||s._disabledHandles.has(e)||s.disabled||s._initializeDragSequence(e,t)}else s.disabled||s._initializeDragSequence(s._rootElement,t)},this._pointerMove=function(t){t.preventDefault();var e=s._getPointerPositionOnPage(t);if(s._hasStartedDragging){s._boundaryElement&&(s._previewRect&&(s._previewRect.width||s._previewRect.height)||(s._previewRect=(s._preview||s._rootElement).getBoundingClientRect()));var n=s._getConstrainedPointerPosition(e);if(s._hasMoved=!0,s._lastKnownPointerPosition=e,s._updatePointerDirectionDelta(n),s._dropContainer)s._updateActiveDropContainer(n,e);else{var i=s._activeTransform;i.x=n.x-s._pickupPositionOnPage.x+s._passiveTransform.x,i.y=n.y-s._pickupPositionOnPage.y+s._passiveTransform.y,s._applyRootElementTransform(i.x,i.y),"undefined"!=typeof SVGElement&&s._rootElement instanceof SVGElement&&s._rootElement.setAttribute("transform","translate(".concat(i.x," ").concat(i.y,")"))}s._moveEvents.observers.length&&s._ngZone.run((function(){s._moveEvents.next({source:s,pointerPosition:n,event:t,distance:s._getDragDistance(n),delta:s._pointerDirectionDelta})}))}else if(Math.abs(e.x-s._pickupPositionOnPage.x)+Math.abs(e.y-s._pickupPositionOnPage.y)>=s._config.dragStartThreshold){var a=Date.now()>=s._dragStartTime+s._getDragStartDelay(t),r=s._dropContainer;if(!a)return void s._endDragSequence(t);r&&(r.isDragging()||r.isReceiving())||(s._hasStartedDragging=!0,s._ngZone.run((function(){return s._startDragSequence(t)})))}},this._pointerUp=function(t){s._endDragSequence(t)},this.withRootElement(e),this._parentPositions=new V(i,r),o.registerDragItem(this)}return _createClass(t,[{key:"getPlaceholderElement",value:function(){return this._placeholder}},{key:"getRootElement",value:function(){return this._rootElement}},{key:"getVisibleElement",value:function(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}},{key:"withHandles",value:function(t){return this._handles=t.map((function(t){return Object(s.e)(t)})),this._handles.forEach((function(t){return O(t,!1)})),this._toggleNativeDragInteractions(),this}},{key:"withPreviewTemplate",value:function(t){return this._previewTemplate=t,this}},{key:"withPlaceholderTemplate",value:function(t){return this._placeholderTemplate=t,this}},{key:"withRootElement",value:function(t){var e=this,n=Object(s.e)(t);return n!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular((function(){n.addEventListener("mousedown",e._pointerDown,L),n.addEventListener("touchstart",e._pointerDown,F)})),this._initialTransform=void 0,this._rootElement=n),"undefined"!=typeof SVGElement&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}},{key:"withBoundaryElement",value:function(t){var e=this;return this._boundaryElement=t?Object(s.e)(t):null,this._resizeSubscription.unsubscribe(),t&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe((function(){return e._containInsideBoundaryOnResize()}))),this}},{key:"dispose",value:function(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&B(this._rootElement),B(this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=null}},{key:"isDragging",value:function(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)}},{key:"reset",value:function(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}},{key:"disableHandle",value:function(t){this._handles.indexOf(t)>-1&&this._disabledHandles.add(t)}},{key:"enableHandle",value:function(t){this._disabledHandles.delete(t)}},{key:"withDirection",value:function(t){return this._direction=t,this}},{key:"_withDropContainer",value:function(t){this._dropContainer=t}},{key:"getFreeDragPosition",value:function(){var t=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:t.x,y:t.y}}},{key:"setFreeDragPosition",value:function(t){return this._activeTransform={x:0,y:0},this._passiveTransform.x=t.x,this._passiveTransform.y=t.y,this._dropContainer||this._applyRootElementTransform(t.x,t.y),this}},{key:"_sortFromLastPointerPosition",value:function(){var t=this._lastKnownPointerPosition;t&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(t),t)}},{key:"_removeSubscriptions",value:function(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe()}},{key:"_destroyPreview",value:function(){this._preview&&B(this._preview),this._previewRef&&this._previewRef.destroy(),this._preview=this._previewRef=null}},{key:"_destroyPlaceholder",value:function(){this._placeholder&&B(this._placeholder),this._placeholderRef&&this._placeholderRef.destroy(),this._placeholder=this._placeholderRef=null}},{key:"_endDragSequence",value:function(t){var e=this;this._dragDropRegistry.isDragging(this)&&(this._removeSubscriptions(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging&&(this.released.next({source:this}),this._dropContainer?(this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then((function(){e._cleanupDragArtifacts(t),e._cleanupCachedDimensions(),e._dragDropRegistry.stopDragging(e)}))):(this._passiveTransform.x=this._activeTransform.x,this._passiveTransform.y=this._activeTransform.y,this._ngZone.run((function(){e.ended.next({source:e,distance:e._getDragDistance(e._getPointerPositionOnPage(t))})})),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this))))}},{key:"_startDragSequence",value:function(t){U(t)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();var e,n=this._dropContainer;if(n){var i=this._rootElement,a=i.parentNode,r=this._preview=this._createPreviewElement(),o=this._placeholder=this._createPlaceholderElement(),s=this._anchor=this._anchor||this._document.createComment("");a.insertBefore(s,i),D(i,!1),this._document.body.appendChild(a.replaceChild(o,i)),(e=this._document,e.fullscreenElement||e.webkitFullscreenElement||e.mozFullScreenElement||e.msFullscreenElement||e.body).appendChild(r),this.started.next({source:this}),n.start(),this._initialContainer=n,this._initialIndex=n.getItemIndex(this)}else this.started.next({source:this}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(n?n.getScrollableParents():[])}},{key:"_initializeDragSequence",value:function(t,e){var n=this;e.stopPropagation();var i=this.isDragging(),a=U(e),r=!a&&0!==e.button,o=this._rootElement,s=!a&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now();if(e.target&&e.target.draggable&&"mousedown"===e.type&&e.preventDefault(),!(i||r||s)){this._handles.length&&(this._rootElementTapHighlight=o.style.webkitTapHighlightColor||"",o.style.webkitTapHighlightColor="transparent"),this._hasStartedDragging=this._hasMoved=!1,this._removeSubscriptions(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scroll.subscribe((function(t){n._updateOnScroll(t)})),this._boundaryElement&&(this._boundaryRect=S(this._boundaryElement));var c=this._previewTemplate;this._pickupPositionInElement=c&&c.template&&!c.matchSize?{x:0,y:0}:this._getPointerPositionInElement(t,e);var l=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:l.x,y:l.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}}},{key:"_cleanupDragArtifacts",value:function(t){var e=this;D(this._rootElement,!0),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._boundaryRect=this._previewRect=void 0,this._ngZone.run((function(){var n=e._dropContainer,i=n.getItemIndex(e),a=e._getPointerPositionOnPage(t),r=e._getDragDistance(e._getPointerPositionOnPage(t)),o=n._isOverContainer(a.x,a.y);e.ended.next({source:e,distance:r}),e.dropped.next({item:e,currentIndex:i,previousIndex:e._initialIndex,container:n,previousContainer:e._initialContainer,isPointerOverContainer:o,distance:r}),n.drop(e,i,e._initialContainer,o,r,e._initialIndex),e._dropContainer=e._initialContainer}))}},{key:"_updateActiveDropContainer",value:function(t,e){var n=this,i=t.x,a=t.y,r=e.x,o=e.y,s=this._initialContainer._getSiblingContainerFromPosition(this,i,a);!s&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(i,a)&&(s=this._initialContainer),s&&s!==this._dropContainer&&this._ngZone.run((function(){n.exited.next({item:n,container:n._dropContainer}),n._dropContainer.exit(n),n._dropContainer=s,n._dropContainer.enter(n,i,a,s===n._initialContainer&&s.sortingDisabled?n._initialIndex:void 0),n.entered.next({item:n,container:s,currentIndex:s.getItemIndex(n)})})),this._dropContainer._startScrollingIfNecessary(r,o),this._dropContainer._sortItem(this,i,a,this._pointerDirectionDelta),this._preview.style.transform=N(i-this._pickupPositionInElement.x,a-this._pickupPositionInElement.y)}},{key:"_createPreviewElement",value:function(){var t,e=this._previewTemplate,n=this.previewClass,i=e?e.template:null;if(i&&e){var a=e.matchSize?this._rootElement.getBoundingClientRect():null,r=e.viewContainer.createEmbeddedView(i,e.context);r.detectChanges(),t=H(r,this._document),this._previewRef=r,e.matchSize?G(t,a):t.style.transform=N(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else{var o=this._rootElement;G(t=j(o),o.getBoundingClientRect())}return x(t.style,{pointerEvents:"none",margin:"0",position:"fixed",top:"0",left:"0",zIndex:""+(this._config.zIndex||1e3)}),O(t,!1),t.classList.add("cdk-drag-preview"),t.setAttribute("dir",this._direction),n&&(Array.isArray(n)?n.forEach((function(e){return t.classList.add(e)})):t.classList.add(n)),t}},{key:"_animatePreviewToPlaceholder",value:function(){var t=this;if(!this._hasMoved)return Promise.resolve();var e=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._preview.style.transform=N(e.left,e.top);var n=function(t){var e=getComputedStyle(t),n=M(e,"transition-property"),i=n.find((function(t){return"transform"===t||"all"===t}));if(!i)return 0;var a=n.indexOf(i),r=M(e,"transition-duration"),o=M(e,"transition-delay");return w(r[a])+w(o[a])}(this._preview);return 0===n?Promise.resolve():this._ngZone.runOutsideAngular((function(){return new Promise((function(e){var i=function n(i){(!i||i.target===t._preview&&"transform"===i.propertyName)&&(t._preview.removeEventListener("transitionend",n),e(),clearTimeout(a))},a=setTimeout(i,1.5*n);t._preview.addEventListener("transitionend",i)}))}))}},{key:"_createPlaceholderElement",value:function(){var t,e=this._placeholderTemplate,n=e?e.template:null;return n?(this._placeholderRef=e.viewContainer.createEmbeddedView(n,e.context),this._placeholderRef.detectChanges(),t=H(this._placeholderRef,this._document)):t=j(this._rootElement),t.classList.add("cdk-drag-placeholder"),t}},{key:"_getPointerPositionInElement",value:function(t,e){var n=this._rootElement.getBoundingClientRect(),i=t===this._rootElement?null:t,a=i?i.getBoundingClientRect():n,r=U(e)?e.targetTouches[0]:e,o=this._getViewportScrollPosition();return{x:a.left-n.left+(r.pageX-a.left-o.left),y:a.top-n.top+(r.pageY-a.top-o.top)}}},{key:"_getPointerPositionOnPage",value:function(t){var e=this._getViewportScrollPosition(),n=U(t)?t.touches[0]||t.changedTouches[0]||{pageX:0,pageY:0}:t,i=n.pageX-e.left,a=n.pageY-e.top;if(this._ownerSVGElement){var r=this._ownerSVGElement.getScreenCTM();if(r){var o=this._ownerSVGElement.createSVGPoint();return o.x=i,o.y=a,o.matrixTransform(r.inverse())}}return{x:i,y:a}}},{key:"_getConstrainedPointerPosition",value:function(t){var e=this._dropContainer?this._dropContainer.lockAxis:null,n=this.constrainPosition?this.constrainPosition(t,this):t,i=n.x,a=n.y;if("x"===this.lockAxis||"x"===e?a=this._pickupPositionOnPage.y:"y"!==this.lockAxis&&"y"!==e||(i=this._pickupPositionOnPage.x),this._boundaryRect){var r=this._pickupPositionInElement,o=r.x,s=r.y,c=this._boundaryRect,l=this._previewRect,u=c.top+s,d=c.bottom-(l.height-s);i=z(i,c.left+o,c.right-(l.width-o)),a=z(a,u,d)}return{x:i,y:a}}},{key:"_updatePointerDirectionDelta",value:function(t){var e=t.x,n=t.y,i=this._pointerDirectionDelta,a=this._pointerPositionAtLastDirectionChange,r=Math.abs(e-a.x),o=Math.abs(n-a.y);return r>this._config.pointerDirectionChangeThreshold&&(i.x=e>a.x?1:-1,a.x=e),o>this._config.pointerDirectionChangeThreshold&&(i.y=n>a.y?1:-1,a.y=n),i}},{key:"_toggleNativeDragInteractions",value:function(){if(this._rootElement&&this._handles){var t=this._handles.length>0||!this.isDragging();t!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=t,O(this._rootElement,t))}}},{key:"_removeRootElementListeners",value:function(t){t.removeEventListener("mousedown",this._pointerDown,L),t.removeEventListener("touchstart",this._pointerDown,F)}},{key:"_applyRootElementTransform",value:function(t,e){var n=N(t,e);null==this._initialTransform&&(this._initialTransform=this._rootElement.style.transform||""),this._rootElement.style.transform=this._initialTransform?n+" "+this._initialTransform:n}},{key:"_getDragDistance",value:function(t){var e=this._pickupPositionOnPage;return e?{x:t.x-e.x,y:t.y-e.y}:{x:0,y:0}}},{key:"_cleanupCachedDimensions",value:function(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}},{key:"_containInsideBoundaryOnResize",value:function(){var t=this._passiveTransform,e=t.x,n=t.y;if(!(0===e&&0===n||this.isDragging())&&this._boundaryElement){var i=this._boundaryElement.getBoundingClientRect(),a=this._rootElement.getBoundingClientRect();if(!(0===i.width&&0===i.height||0===a.width&&0===a.height)){var r=i.left-a.left,o=a.right-i.right,s=i.top-a.top,c=a.bottom-i.bottom;i.width>a.width?(r>0&&(e+=r),o>0&&(e-=o)):e=0,i.height>a.height?(s>0&&(n+=s),c>0&&(n-=c)):n=0,e===this._passiveTransform.x&&n===this._passiveTransform.y||this.setFreeDragPosition({y:n,x:e})}}}},{key:"_getDragStartDelay",value:function(t){var e=this.dragStartDelay;return"number"==typeof e?e:U(t)?e.touch:e?e.mouse:0}},{key:"_updateOnScroll",value:function(t){var e=this._parentPositions.handleScroll(t);if(e){var n=t.target;this._boundaryRect&&(n===this._document||n!==this._boundaryElement&&n.contains(this._boundaryElement))&&P(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}},{key:"_getViewportScrollPosition",value:function(){var t=this._parentPositions.positions.get(this._document);return t?t.scrollPosition:this._viewportRuler.getViewportScrollPosition()}},{key:"disabled",get:function(){return this._disabled||!(!this._dropContainer||!this._dropContainer.disabled)},set:function(t){var e=Object(s.c)(t);e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions())}}]),t}();function N(t,e){return"translate3d(".concat(Math.round(t),"px, ").concat(Math.round(e),"px, 0)")}function z(t,e,n){return Math.max(e,Math.min(n,t))}function B(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function U(t){return"t"===t.type[0]}function H(t,e){var n=t.rootNodes;if(1===n.length&&n[0].nodeType===e.ELEMENT_NODE)return n[0];var i=e.createElement("div");return n.forEach((function(t){return i.appendChild(t)})),i}function G(t,e){t.style.width=e.width+"px",t.style.height=e.height+"px",t.style.transform=N(e.left,e.top)}function $(t,e,n){var i=q(e,t.length-1),a=q(n,t.length-1);if(i!==a){for(var r=t[i],o=a<i?-1:1,s=i;s!==a;s+=o)t[s]=t[s+o];t[a]=r}}function X(t,e,n,i){var a=q(n,t.length-1),r=q(i,e.length);t.length&&e.splice(r,0,t.splice(a,1)[0])}function q(t,e){return Math.max(0,Math.min(e,t))}var K=function(){function t(e,n,i,a,r){var o=this;_classCallCheck(this,t),this._dragDropRegistry=n,this._ngZone=a,this._viewportRuler=r,this.disabled=!1,this.sortingDisabled=!1,this.autoScrollDisabled=!1,this.enterPredicate=function(){return!0},this.beforeStarted=new c.a,this.entered=new c.a,this.exited=new c.a,this.dropped=new c.a,this.sorted=new c.a,this._isDragging=!1,this._itemPositions=[],this._previousSwap={drag:null,delta:0,overlaps:!1},this._siblings=[],this._orientation="vertical",this._activeSiblings=new Set,this._direction="ltr",this._viewportScrollSubscription=l.a.EMPTY,this._verticalScrollDirection=0,this._horizontalScrollDirection=0,this._stopScrollTimers=new c.a,this._cachedShadowRoot=null,this._startScrollInterval=function(){o._stopScrolling(),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d.a;return(!Object(f.a)(t)||t<0)&&(t=0),e&&"function"==typeof e.schedule||(e=d.a),new u.a((function(n){return n.add(e.schedule(h,t,{subscriber:n,counter:0,period:t})),n}))}(0,p.a).pipe(Object(g.a)(o._stopScrollTimers)).subscribe((function(){var t=o._scrollNode;1===o._verticalScrollDirection?J(t,-2):2===o._verticalScrollDirection&&J(t,2),1===o._horizontalScrollDirection?Z(t,-2):2===o._horizontalScrollDirection&&Z(t,2)}))},this.element=Object(s.e)(e),this._document=i,this.withScrollableParents([this.element]),n.registerDropContainer(this),this._parentPositions=new V(i,r)}return _createClass(t,[{key:"dispose",value:function(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}},{key:"isDragging",value:function(){return this._isDragging}},{key:"start",value:function(){var t=this,e=Object(s.e)(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=e.msScrollSnapType||e.scrollSnapType||"",e.scrollSnapType=e.msScrollSnapType="none",this._cacheItems(),this._siblings.forEach((function(e){return e._startReceiving(t)})),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}},{key:"enter",value:function(t,e,n,i){var a;this.start(),null==i?-1===(a=this.sortingDisabled?this._draggables.indexOf(t):-1)&&(a=this._getItemIndexFromPointerPosition(t,e,n)):a=i;var r=this._activeDraggables,o=r.indexOf(t),c=t.getPlaceholderElement(),l=r[a];if(l===t&&(l=r[a+1]),o>-1&&r.splice(o,1),l&&!this._dragDropRegistry.isDragging(l)){var u=l.getRootElement();u.parentElement.insertBefore(c,u),r.splice(a,0,t)}else if(this._shouldEnterAsFirstChild(e,n)){var d=r[0].getRootElement();d.parentNode.insertBefore(c,d),r.unshift(t)}else Object(s.e)(this.element).appendChild(c),r.push(t);c.style.transform="",this._cacheItemPositions(),this._cacheParentPositions(),this.entered.next({item:t,container:this,currentIndex:this.getItemIndex(t)})}},{key:"exit",value:function(t){this._reset(),this.exited.next({item:t,container:this})}},{key:"drop",value:function(t,e,n,i,a,r){this._reset(),null==r&&(r=n.getItemIndex(t)),this.dropped.next({item:t,currentIndex:e,previousIndex:r,container:this,previousContainer:n,isPointerOverContainer:i,distance:a})}},{key:"withItems",value:function(t){var e=this,n=this._draggables;return this._draggables=t,t.forEach((function(t){return t._withDropContainer(e)})),this.isDragging()&&(n.filter((function(t){return t.isDragging()})).every((function(e){return-1===t.indexOf(e)}))?this._reset():this._cacheItems()),this}},{key:"withDirection",value:function(t){return this._direction=t,this}},{key:"connectedTo",value:function(t){return this._siblings=t.slice(),this}},{key:"withOrientation",value:function(t){return this._orientation=t,this}},{key:"withScrollableParents",value:function(t){var e=Object(s.e)(this.element);return this._scrollableElements=-1===t.indexOf(e)?[e].concat(_toConsumableArray(t)):t.slice(),this}},{key:"getScrollableParents",value:function(){return this._scrollableElements}},{key:"getItemIndex",value:function(t){return this._isDragging?Y("horizontal"===this._orientation&&"rtl"===this._direction?this._itemPositions.slice().reverse():this._itemPositions,(function(e){return e.drag===t})):this._draggables.indexOf(t)}},{key:"isReceiving",value:function(){return this._activeSiblings.size>0}},{key:"_sortItem",value:function(t,e,n,i){if(!this.sortingDisabled&&R(this._clientRect,.05,e,n)){var a=this._itemPositions,r=this._getItemIndexFromPointerPosition(t,e,n,i);if(!(-1===r&&a.length>0)){var o="horizontal"===this._orientation,s=Y(a,(function(e){return e.drag===t})),c=a[r],l=c.clientRect,u=s>r?1:-1,d=this._getItemOffsetPx(a[s].clientRect,l,u),f=this._getSiblingOffsetPx(s,a,u),h=a.slice();$(a,s,r),this.sorted.next({previousIndex:s,currentIndex:r,container:this,item:t}),a.forEach((function(e,n){if(h[n]!==e){var i=e.drag===t,a=i?d:f,r=i?t.getPlaceholderElement():e.drag.getRootElement();e.offset+=a,o?(r.style.transform="translate3d(".concat(Math.round(e.offset),"px, 0, 0)"),P(e.clientRect,0,a)):(r.style.transform="translate3d(0, ".concat(Math.round(e.offset),"px, 0)"),P(e.clientRect,a,0))}})),this._previousSwap.overlaps=I(l,e,n),this._previousSwap.drag=c.drag,this._previousSwap.delta=o?i.x:i.y}}}},{key:"_startScrollingIfNecessary",value:function(t,e){var n=this;if(!this.autoScrollDisabled){var i,a=0,r=0;if(this._parentPositions.positions.forEach((function(o,s){var c;s!==n._document&&o.clientRect&&!i&&R(o.clientRect,.05,t,e)&&(c=_slicedToArray(function(t,e,n,i){var a=tt(e,i),r=et(e,n),o=0,s=0;if(a){var c=t.scrollTop;1===a?c>0&&(o=1):t.scrollHeight-c>t.clientHeight&&(o=2)}if(r){var l=t.scrollLeft;1===r?l>0&&(s=1):t.scrollWidth-l>t.clientWidth&&(s=2)}return[o,s]}(s,o.clientRect,t,e),2),a=c[0],r=c[1],(a||r)&&(i=s))})),!a&&!r){var o=this._viewportRuler.getViewportSize(),s=o.width,c=o.height,l={width:s,height:c,top:0,right:s,bottom:c,left:0};a=tt(l,e),r=et(l,t),i=window}!i||a===this._verticalScrollDirection&&r===this._horizontalScrollDirection&&i===this._scrollNode||(this._verticalScrollDirection=a,this._horizontalScrollDirection=r,this._scrollNode=i,(a||r)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}}},{key:"_stopScrolling",value:function(){this._stopScrollTimers.next()}},{key:"_cacheParentPositions",value:function(){var t=Object(s.e)(this.element);this._parentPositions.cache(this._scrollableElements),this._clientRect=this._parentPositions.positions.get(t).clientRect}},{key:"_cacheItemPositions",value:function(){var t="horizontal"===this._orientation;this._itemPositions=this._activeDraggables.map((function(t){var e=t.getVisibleElement();return{drag:t,offset:0,clientRect:S(e)}})).sort((function(e,n){return t?e.clientRect.left-n.clientRect.left:e.clientRect.top-n.clientRect.top}))}},{key:"_reset",value:function(){var t=this;this._isDragging=!1;var e=Object(s.e)(this.element).style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._activeDraggables.forEach((function(t){var e=t.getRootElement();e&&(e.style.transform="")})),this._siblings.forEach((function(e){return e._stopReceiving(t)})),this._activeDraggables=[],this._itemPositions=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1,this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}},{key:"_getSiblingOffsetPx",value:function(t,e,n){var i="horizontal"===this._orientation,a=e[t].clientRect,r=e[t+-1*n],o=a[i?"width":"height"]*n;if(r){var s=i?"left":"top",c=i?"right":"bottom";-1===n?o-=r.clientRect[s]-a[c]:o+=a[s]-r.clientRect[c]}return o}},{key:"_getItemOffsetPx",value:function(t,e,n){var i="horizontal"===this._orientation,a=i?e.left-t.left:e.top-t.top;return-1===n&&(a+=i?e.width-t.width:e.height-t.height),a}},{key:"_shouldEnterAsFirstChild",value:function(t,e){if(!this._activeDraggables.length)return!1;var n=this._itemPositions,i="horizontal"===this._orientation;if(n[0].drag!==this._activeDraggables[0]){var a=n[n.length-1].clientRect;return i?t>=a.right:e>=a.bottom}var r=n[0].clientRect;return i?t<=r.left:e<=r.top}},{key:"_getItemIndexFromPointerPosition",value:function(t,e,n,i){var a=this,r="horizontal"===this._orientation;return Y(this._itemPositions,(function(o,s,c){var l=o.drag,u=o.clientRect;if(l===t)return c.length<2;if(i){var d=r?i.x:i.y;if(l===a._previousSwap.drag&&a._previousSwap.overlaps&&d===a._previousSwap.delta)return!1}return r?e>=Math.floor(u.left)&&e<Math.floor(u.right):n>=Math.floor(u.top)&&n<Math.floor(u.bottom)}))}},{key:"_cacheItems",value:function(){this._activeDraggables=this._draggables.slice(),this._cacheItemPositions(),this._cacheParentPositions()}},{key:"_isOverContainer",value:function(t,e){return I(this._clientRect,t,e)}},{key:"_getSiblingContainerFromPosition",value:function(t,e,n){return this._siblings.find((function(i){return i._canReceive(t,e,n)}))}},{key:"_canReceive",value:function(t,e,n){if(!I(this._clientRect,e,n)||!this.enterPredicate(t,this))return!1;var i=this._getShadowRoot().elementFromPoint(e,n);if(!i)return!1;var a=Object(s.e)(this.element);return i===a||a.contains(i)}},{key:"_startReceiving",value:function(t){var e=this._activeSiblings;e.has(t)||(e.add(t),this._cacheParentPositions(),this._listenToScrollEvents())}},{key:"_stopReceiving",value:function(t){this._activeSiblings.delete(t),this._viewportScrollSubscription.unsubscribe()}},{key:"_listenToScrollEvents",value:function(){var t=this;this._viewportScrollSubscription=this._dragDropRegistry.scroll.subscribe((function(e){if(t.isDragging()){var n=t._parentPositions.handleScroll(e);n&&(t._itemPositions.forEach((function(t){P(t.clientRect,n.top,n.left)})),t._itemPositions.forEach((function(e){var n=e.drag;t._dragDropRegistry.isDragging(n)&&n._sortFromLastPointerPosition()})))}else t.isReceiving()&&t._cacheParentPositions()}))}},{key:"_getShadowRoot",value:function(){if(!this._cachedShadowRoot){var t=Object(o.c)(Object(s.e)(this.element));this._cachedShadowRoot=t||this._document}return this._cachedShadowRoot}}]),t}();function Y(t,e){for(var n=0;n<t.length;n++)if(e(t[n],n,t))return n;return-1}function J(t,e){t===window?t.scrollBy(0,e):t.scrollTop+=e}function Z(t,e){t===window?t.scrollBy(e,0):t.scrollLeft+=e}function tt(t,e){var n=t.top,i=t.bottom,a=.05*t.height;return e>=n-a&&e<=n+a?1:e>=i-a&&e<=i+a?2:0}function et(t,e){var n=t.left,i=t.right,a=.05*t.width;return e>=n-a&&e<=n+a?1:e>=i-a&&e<=i+a?2:0}var nt,it,at,rt,ot,st,ct,lt,ut=Object(o.f)({passive:!1,capture:!0}),dt=((nt=function(){function t(e,n){var i=this;_classCallCheck(this,t),this._ngZone=e,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=new Set,this._globalListeners=new Map,this.pointerMove=new c.a,this.pointerUp=new c.a,this.scroll=new c.a,this._preventDefaultWhileDragging=function(t){i._activeDragInstances.size&&t.preventDefault()},this._persistentTouchmoveListener=function(t){i._activeDragInstances.size&&(t.preventDefault(),i.pointerMove.next(t))},this._document=n}return _createClass(t,[{key:"registerDropContainer",value:function(t){this._dropInstances.has(t)||this._dropInstances.add(t)}},{key:"registerDragItem",value:function(t){var e=this;this._dragInstances.add(t),1===this._dragInstances.size&&this._ngZone.runOutsideAngular((function(){e._document.addEventListener("touchmove",e._persistentTouchmoveListener,ut)}))}},{key:"removeDropContainer",value:function(t){this._dropInstances.delete(t)}},{key:"removeDragItem",value:function(t){this._dragInstances.delete(t),this.stopDragging(t),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,ut)}},{key:"startDragging",value:function(t,e){var n=this;if(!this._activeDragInstances.has(t)&&(this._activeDragInstances.add(t),1===this._activeDragInstances.size)){var i=e.type.startsWith("touch");this._globalListeners.set(i?"touchend":"mouseup",{handler:function(t){return n.pointerUp.next(t)},options:!0}).set("scroll",{handler:function(t){return n.scroll.next(t)},options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:ut}),i||this._globalListeners.set("mousemove",{handler:function(t){return n.pointerMove.next(t)},options:ut}),this._ngZone.runOutsideAngular((function(){n._globalListeners.forEach((function(t,e){n._document.addEventListener(e,t.handler,t.options)}))}))}}},{key:"stopDragging",value:function(t){this._activeDragInstances.delete(t),0===this._activeDragInstances.size&&this._clearGlobalListeners()}},{key:"isDragging",value:function(t){return this._activeDragInstances.has(t)}},{key:"ngOnDestroy",value:function(){var t=this;this._dragInstances.forEach((function(e){return t.removeDragItem(e)})),this._dropInstances.forEach((function(e){return t.removeDropContainer(e)})),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}},{key:"_clearGlobalListeners",value:function(){var t=this;this._globalListeners.forEach((function(e,n){t._document.removeEventListener(n,e.handler,e.options)})),this._globalListeners.clear()}}]),t}()).\u0275fac=function(t){return new(t||nt)(i.ac(i.C),i.ac(a.e))},nt.\u0275prov=Object(i.Mb)({factory:function(){return new nt(Object(i.ac)(i.C),Object(i.ac)(a.e))},token:nt,providedIn:"root"}),nt),ft={dragStartThreshold:5,pointerDirectionChangeThreshold:5},ht=((it=function(){function t(e,n,i,a){_classCallCheck(this,t),this._document=e,this._ngZone=n,this._viewportRuler=i,this._dragDropRegistry=a}return _createClass(t,[{key:"createDrag",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ft;return new Q(t,e,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}},{key:"createDropList",value:function(t){return new K(t,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}}]),t}()).\u0275fac=function(t){return new(t||it)(i.ac(a.e),i.ac(i.C),i.ac(r.h),i.ac(dt))},it.\u0275prov=Object(i.Mb)({factory:function(){return new it(Object(i.ac)(a.e),Object(i.ac)(i.C),Object(i.ac)(r.h),Object(i.ac)(dt))},token:it,providedIn:"root"}),it),pt=new i.s("CDK_DRAG_PARENT"),bt=new i.s("CdkDropListGroup"),gt=((at=function(){function t(){_classCallCheck(this,t),this._items=new Set,this._disabled=!1}return _createClass(t,[{key:"ngOnDestroy",value:function(){this._items.clear()}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=Object(s.c)(t)}}]),t}()).\u0275fac=function(t){return new(t||at)},at.\u0275dir=i.Lb({type:at,selectors:[["","cdkDropListGroup",""]],inputs:{disabled:["cdkDropListGroupDisabled","disabled"]},exportAs:["cdkDropListGroup"],features:[i.Cb([{provide:bt,useExisting:at}])]}),at),mt=new i.s("CDK_DRAG_CONFIG"),vt=0,yt=new i.s("CdkDropList"),_t=((rt=function(){function t(e,n,a,r,o,s,l){var u=this;_classCallCheck(this,t),this.element=e,this._changeDetectorRef=a,this._dir=r,this._group=o,this._scrollDispatcher=s,this._destroyed=new c.a,this.connectedTo=[],this.id="cdk-drop-list-"+vt++,this.enterPredicate=function(){return!0},this.dropped=new i.o,this.entered=new i.o,this.exited=new i.o,this.sorted=new i.o,this._unsortedItems=new Set,this._dropListRef=n.createDropList(e),this._dropListRef.data=this,l&&this._assignDefaults(l),this._dropListRef.enterPredicate=function(t,e){return u.enterPredicate(t.data,e.data)},this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),t._dropLists.push(this),o&&o._items.add(this)}return _createClass(t,[{key:"addItem",value:function(t){this._unsortedItems.add(t),this._dropListRef.isDragging()&&this._syncItemsWithRef()}},{key:"removeItem",value:function(t){this._unsortedItems.delete(t),this._dropListRef.isDragging()&&this._syncItemsWithRef()}},{key:"getSortedItems",value:function(){return Array.from(this._unsortedItems).sort((function(t,e){return t._dragRef.getVisibleElement().compareDocumentPosition(e._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}))}},{key:"ngOnDestroy",value:function(){var e=t._dropLists.indexOf(this);e>-1&&t._dropLists.splice(e,1),this._group&&this._group._items.delete(this),this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}},{key:"_setupInputSyncSubscription",value:function(e){var n=this;this._dir&&this._dir.change.pipe(Object(m.a)(this._dir.value),Object(g.a)(this._destroyed)).subscribe((function(t){return e.withDirection(t)})),e.beforeStarted.subscribe((function(){var i=Object(s.b)(n.connectedTo).map((function(e){return"string"==typeof e?t._dropLists.find((function(t){return t.id===e})):e}));if(n._group&&n._group._items.forEach((function(t){-1===i.indexOf(t)&&i.push(t)})),!n._scrollableParentsResolved&&n._scrollDispatcher){var a=n._scrollDispatcher.getAncestorScrollContainers(n.element).map((function(t){return t.getElementRef().nativeElement}));n._dropListRef.withScrollableParents(a),n._scrollableParentsResolved=!0}e.disabled=n.disabled,e.lockAxis=n.lockAxis,e.sortingDisabled=Object(s.c)(n.sortingDisabled),e.autoScrollDisabled=Object(s.c)(n.autoScrollDisabled),e.connectedTo(i.filter((function(t){return t&&t!==n})).map((function(t){return t._dropListRef}))).withOrientation(n.orientation)}))}},{key:"_handleEvents",value:function(t){var e=this;t.beforeStarted.subscribe((function(){e._syncItemsWithRef(),e._changeDetectorRef.markForCheck()})),t.entered.subscribe((function(t){e.entered.emit({container:e,item:t.item.data,currentIndex:t.currentIndex})})),t.exited.subscribe((function(t){e.exited.emit({container:e,item:t.item.data}),e._changeDetectorRef.markForCheck()})),t.sorted.subscribe((function(t){e.sorted.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,container:e,item:t.item.data})})),t.dropped.subscribe((function(t){e.dropped.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,previousContainer:t.previousContainer.data,container:t.container.data,item:t.item.data,isPointerOverContainer:t.isPointerOverContainer,distance:t.distance}),e._changeDetectorRef.markForCheck()}))}},{key:"_assignDefaults",value:function(t){var e=t.lockAxis,n=t.draggingDisabled,i=t.sortingDisabled,a=t.listAutoScrollDisabled,r=t.listOrientation;this.disabled=null!=n&&n,this.sortingDisabled=null!=i&&i,this.autoScrollDisabled=null!=a&&a,this.orientation=r||"vertical",e&&(this.lockAxis=e)}},{key:"_syncItemsWithRef",value:function(){this._dropListRef.withItems(this.getSortedItems().map((function(t){return t._dragRef})))}},{key:"disabled",get:function(){return this._disabled||!!this._group&&this._group.disabled},set:function(t){this._dropListRef.disabled=this._disabled=Object(s.c)(t)}}]),t}()).\u0275fac=function(t){return new(t||rt)(i.Qb(i.l),i.Qb(ht),i.Qb(i.h),i.Qb(k.c,8),i.Qb(bt,12),i.Qb(r.f),i.Qb(mt,8))},rt.\u0275dir=i.Lb({type:rt,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(t,e){2&t&&(i.Zb("id",e.id),i.Ib("cdk-drop-list-disabled",e.disabled)("cdk-drop-list-dragging",e._dropListRef.isDragging())("cdk-drop-list-receiving",e._dropListRef.isReceiving()))},inputs:{connectedTo:["cdkDropListConnectedTo","connectedTo"],id:"id",enterPredicate:["cdkDropListEnterPredicate","enterPredicate"],disabled:["cdkDropListDisabled","disabled"],sortingDisabled:["cdkDropListSortingDisabled","sortingDisabled"],autoScrollDisabled:["cdkDropListAutoScrollDisabled","autoScrollDisabled"],orientation:["cdkDropListOrientation","orientation"],lockAxis:["cdkDropListLockAxis","lockAxis"],data:["cdkDropListData","data"]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],features:[i.Cb([{provide:bt,useValue:void 0},{provide:yt,useExisting:rt}])]}),rt._dropLists=[],rt),Ct=new i.s("CdkDragHandle"),kt=((ot=function(){function t(e,n){_classCallCheck(this,t),this.element=e,this._stateChanges=new c.a,this._disabled=!1,this._parentDrag=n}return _createClass(t,[{key:"ngOnDestroy",value:function(){this._stateChanges.complete()}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=Object(s.c)(t),this._stateChanges.next(this)}}]),t}()).\u0275fac=function(t){return new(t||ot)(i.Qb(i.l),i.Qb(pt,12))},ot.\u0275dir=i.Lb({type:ot,selectors:[["","cdkDragHandle",""]],hostAttrs:[1,"cdk-drag-handle"],inputs:{disabled:["cdkDragHandleDisabled","disabled"]},features:[i.Cb([{provide:Ct,useExisting:ot}])]}),ot),xt=new i.s("CdkDragPlaceholder"),Ot=((st=function t(e){_classCallCheck(this,t),this.templateRef=e}).\u0275fac=function(t){return new(t||st)(i.Qb(i.P))},st.\u0275dir=i.Lb({type:st,selectors:[["ng-template","cdkDragPlaceholder",""]],inputs:{data:"data"},features:[i.Cb([{provide:xt,useExisting:st}])]}),st),Dt=new i.s("CdkDragPreview"),wt=((lt=function(){function t(e){_classCallCheck(this,t),this.templateRef=e,this._matchSize=!1}return _createClass(t,[{key:"matchSize",get:function(){return this._matchSize},set:function(t){this._matchSize=Object(s.c)(t)}}]),t}()).\u0275fac=function(t){return new(t||lt)(i.Qb(i.P))},lt.\u0275dir=i.Lb({type:lt,selectors:[["ng-template","cdkDragPreview",""]],inputs:{matchSize:"matchSize",data:"data"},features:[i.Cb([{provide:Dt,useExisting:lt}])]}),lt),Mt=((ct=function(){function t(e,n,a,r,o,s,l,d,f,h){var p=this;_classCallCheck(this,t),this.element=e,this.dropContainer=n,this._document=a,this._ngZone=r,this._viewContainerRef=o,this._dir=l,this._changeDetectorRef=f,this._selfHandle=h,this._destroyed=new c.a,this.started=new i.o,this.released=new i.o,this.ended=new i.o,this.entered=new i.o,this.exited=new i.o,this.dropped=new i.o,this.moved=new u.a((function(t){var e=p._dragRef.moved.pipe(Object(v.a)((function(t){return{source:p,pointerPosition:t.pointerPosition,event:t.event,delta:t.delta,distance:t.distance}}))).subscribe(t);return function(){e.unsubscribe()}})),this._dragRef=d.createDrag(e,{dragStartThreshold:s&&null!=s.dragStartThreshold?s.dragStartThreshold:5,pointerDirectionChangeThreshold:s&&null!=s.pointerDirectionChangeThreshold?s.pointerDirectionChangeThreshold:5,zIndex:null==s?void 0:s.zIndex}),this._dragRef.data=this,s&&this._assignDefaults(s),n&&(this._dragRef._withDropContainer(n._dropListRef),n.addItem(this)),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}return _createClass(t,[{key:"getPlaceholderElement",value:function(){return this._dragRef.getPlaceholderElement()}},{key:"getRootElement",value:function(){return this._dragRef.getRootElement()}},{key:"reset",value:function(){this._dragRef.reset()}},{key:"getFreeDragPosition",value:function(){return this._dragRef.getFreeDragPosition()}},{key:"ngAfterViewInit",value:function(){var t=this;this._ngZone.onStable.pipe(Object(y.a)(1),Object(g.a)(this._destroyed)).subscribe((function(){t._updateRootElement(),t._handles.changes.pipe(Object(m.a)(t._handles),Object(_.a)((function(e){var n=e.filter((function(e){return e._parentDrag===t})).map((function(t){return t.element}));t._selfHandle&&t.rootElementSelector&&n.push(t.element),t._dragRef.withHandles(n)})),Object(C.a)((function(t){return Object(b.a).apply(void 0,_toConsumableArray(t.map((function(t){return t._stateChanges.pipe(Object(m.a)(t))}))))})),Object(g.a)(t._destroyed)).subscribe((function(e){var n=t._dragRef,i=e.element.nativeElement;e.disabled?n.disableHandle(i):n.enableHandle(i)})),t.freeDragPosition&&t._dragRef.setFreeDragPosition(t.freeDragPosition)}))}},{key:"ngOnChanges",value:function(t){var e=t.rootElementSelector,n=t.freeDragPosition;e&&!e.firstChange&&this._updateRootElement(),n&&!n.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}},{key:"ngOnDestroy",value:function(){this.dropContainer&&this.dropContainer.removeItem(this),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()}},{key:"_updateRootElement",value:function(){var t=this.element.nativeElement,e=this.rootElementSelector?St(t,this.rootElementSelector):t;this._dragRef.withRootElement(e||t)}},{key:"_getBoundaryElement",value:function(){var t=this.boundaryElement;return t?"string"==typeof t?St(this.element.nativeElement,t):Object(s.e)(t):null}},{key:"_syncInputs",value:function(t){var e=this;t.beforeStarted.subscribe((function(){if(!t.isDragging()){var n=e._dir,i=e.dragStartDelay,a=e._placeholderTemplate?{template:e._placeholderTemplate.templateRef,context:e._placeholderTemplate.data,viewContainer:e._viewContainerRef}:null,r=e._previewTemplate?{template:e._previewTemplate.templateRef,context:e._previewTemplate.data,matchSize:e._previewTemplate.matchSize,viewContainer:e._viewContainerRef}:null;t.disabled=e.disabled,t.lockAxis=e.lockAxis,t.dragStartDelay="object"==typeof i&&i?i:Object(s.f)(i),t.constrainPosition=e.constrainPosition,t.previewClass=e.previewClass,t.withBoundaryElement(e._getBoundaryElement()).withPlaceholderTemplate(a).withPreviewTemplate(r),n&&t.withDirection(n.value)}}))}},{key:"_handleEvents",value:function(t){var e=this;t.started.subscribe((function(){e.started.emit({source:e}),e._changeDetectorRef.markForCheck()})),t.released.subscribe((function(){e.released.emit({source:e})})),t.ended.subscribe((function(t){e.ended.emit({source:e,distance:t.distance}),e._changeDetectorRef.markForCheck()})),t.entered.subscribe((function(t){e.entered.emit({container:t.container.data,item:e,currentIndex:t.currentIndex})})),t.exited.subscribe((function(t){e.exited.emit({container:t.container.data,item:e})})),t.dropped.subscribe((function(t){e.dropped.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,previousContainer:t.previousContainer.data,container:t.container.data,isPointerOverContainer:t.isPointerOverContainer,item:e,distance:t.distance})}))}},{key:"_assignDefaults",value:function(t){var e=t.lockAxis,n=t.dragStartDelay,i=t.constrainPosition,a=t.previewClass,r=t.boundaryElement,o=t.draggingDisabled,s=t.rootElementSelector;this.disabled=null!=o&&o,this.dragStartDelay=n||0,e&&(this.lockAxis=e),i&&(this.constrainPosition=i),a&&(this.previewClass=a),r&&(this.boundaryElement=r),s&&(this.rootElementSelector=s)}},{key:"disabled",get:function(){return this._disabled||this.dropContainer&&this.dropContainer.disabled},set:function(t){this._disabled=Object(s.c)(t),this._dragRef.disabled=this._disabled}}]),t}()).\u0275fac=function(t){return new(t||ct)(i.Qb(i.l),i.Qb(yt,12),i.Qb(a.e),i.Qb(i.C),i.Qb(i.T),i.Qb(mt,8),i.Qb(k.c,8),i.Qb(ht),i.Qb(i.h),i.Qb(Ct,10))},ct.\u0275dir=i.Lb({type:ct,selectors:[["","cdkDrag",""]],contentQueries:function(t,e,n){var a;1&t&&(i.Jb(n,Dt,!0),i.Jb(n,xt,!0),i.Jb(n,Ct,!0)),2&t&&(i.yc(a=i.ec())&&(e._previewTemplate=a.first),i.yc(a=i.ec())&&(e._placeholderTemplate=a.first),i.yc(a=i.ec())&&(e._handles=a))},hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(t,e){2&t&&i.Ib("cdk-drag-disabled",e.disabled)("cdk-drag-dragging",e._dragRef.isDragging())},inputs:{disabled:["cdkDragDisabled","disabled"],dragStartDelay:["cdkDragStartDelay","dragStartDelay"],lockAxis:["cdkDragLockAxis","lockAxis"],constrainPosition:["cdkDragConstrainPosition","constrainPosition"],previewClass:["cdkDragPreviewClass","previewClass"],boundaryElement:["cdkDragBoundary","boundaryElement"],rootElementSelector:["cdkDragRootElement","rootElementSelector"],data:["cdkDragData","data"],freeDragPosition:["cdkDragFreeDragPosition","freeDragPosition"]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[i.Cb([{provide:pt,useExisting:ct}]),i.Bb]}),ct);function St(t,e){for(var n=t.parentElement;n;){if(n.matches?n.matches(e):n.msMatchesSelector(e))return n;n=n.parentElement}return null}var It,Pt=((It=function t(){_classCallCheck(this,t)}).\u0275mod=i.Ob({type:It}),It.\u0275inj=i.Nb({factory:function(t){return new(t||It)},providers:[ht],imports:[r.c]}),It)},"5+tZ":function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n("lJxs"),a=n("Cfvw"),r=n("zx2A");function o(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.POSITIVE_INFINITY;return"function"==typeof e?function(r){return r.pipe(o((function(n,r){return Object(a.a)(t(n,r)).pipe(Object(i.a)((function(t,i){return e(n,t,r,i)})))}),n))}:("number"==typeof e&&(n=e),function(e){return e.lift(new s(t,n))})}var s=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.POSITIVE_INFINITY;_classCallCheck(this,t),this.project=e,this.concurrent=n}return _createClass(t,[{key:"call",value:function(t,e){return e.subscribe(new c(t,this.project,this.concurrent))}}]),t}(),c=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var a,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.POSITIVE_INFINITY;return _classCallCheck(this,n),(a=e.call(this,t)).project=i,a.concurrent=r,a.hasCompleted=!1,a.buffer=[],a.active=0,a.index=0,a}return _createClass(n,[{key:"_next",value:function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)}},{key:"_tryNext",value:function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(i){return void this.destination.error(i)}this.active++,this._innerSub(e)}},{key:"_innerSub",value:function(t){var e=new r.a(this),n=this.destination;n.add(e);var i=Object(r.c)(t,e);i!==e&&n.add(i)}},{key:"_complete",value:function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()}},{key:"notifyNext",value:function(t){this.destination.next(t)}},{key:"notifyComplete",value:function(){var t=this.buffer;this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}]),n}(r.b)},"5RNC":function(t,e,n){"use strict";n.d(e,"a",(function(){return y})),n.d(e,"b",(function(){return k}));var i=n("ofXK"),a=n("fXoL"),r=n("FKr1"),o=n("8LU1"),s=n("FtGj"),c=n("3Pt+"),l=n("R1ws"),u=n("nLfN"),d=n("quSY"),f=n("u47x"),h=n("cH1L"),p=["sliderWrapper"],b=Object(u.f)({passive:!1}),g={provide:c.s,useExisting:Object(a.X)((function(){return y})),multi:!0},m=function t(){_classCallCheck(this,t)},v=Object(r.F)(Object(r.A)(Object(r.C)((function t(e){_classCallCheck(this,t),this._elementRef=e})),"accent")),y=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r,o,s,c,l,u){var f;return _classCallCheck(this,n),(f=e.call(this,t))._focusMonitor=i,f._changeDetectorRef=r,f._dir=o,f._ngZone=c,f._animationMode=u,f._invert=!1,f._max=100,f._min=0,f._step=1,f._thumbLabel=!1,f._tickInterval=0,f._value=null,f._vertical=!1,f.change=new a.o,f.input=new a.o,f.valueChange=new a.o,f.onTouched=function(){},f._percent=0,f._isSliding=!1,f._isActive=!1,f._tickIntervalPercent=0,f._sliderDimensions=null,f._controlValueAccessorChangeFn=function(){},f._dirChangeSubscription=d.a.EMPTY,f._pointerDown=function(t){f.disabled||f._isSliding||!_(t)&&0!==t.button||f._ngZone.run((function(){var e=f.value,n=C(t);f._isSliding=!0,f._lastPointerEvent=t,t.preventDefault(),f._focusHostElement(),f._onMouseenter(),f._bindGlobalEvents(t),f._focusHostElement(),f._updateValueFromPosition(n),f._valueOnSlideStart=e,e!=f.value&&f._emitInputEvent()}))},f._pointerMove=function(t){if(f._isSliding){t.preventDefault();var e=f.value;f._lastPointerEvent=t,f._updateValueFromPosition(C(t)),e!=f.value&&f._emitInputEvent()}},f._pointerUp=function(t){f._isSliding&&(t.preventDefault(),f._removeGlobalEvents(),f._isSliding=!1,f._valueOnSlideStart==f.value||f.disabled||f._emitChangeEvent(),f._valueOnSlideStart=f._lastPointerEvent=null)},f._windowBlur=function(){f._lastPointerEvent&&f._pointerUp(f._lastPointerEvent)},f._document=l,f.tabIndex=parseInt(s)||0,c.runOutsideAngular((function(){var e=t.nativeElement;e.addEventListener("mousedown",f._pointerDown,b),e.addEventListener("touchstart",f._pointerDown,b)})),f}return _createClass(n,[{key:"focus",value:function(t){this._focusHostElement(t)}},{key:"blur",value:function(){this._blurHostElement()}},{key:"_shouldInvertAxis",value:function(){return this.vertical?!this.invert:this.invert}},{key:"_isMinValue",value:function(){return 0===this.percent}},{key:"_getThumbGap",value:function(){return this.disabled?7:this._isMinValue()&&!this.thumbLabel?this._isActive?10:7:0}},{key:"_getTrackBackgroundStyles",value:function(){var t=this.vertical?"1, ".concat(1-this.percent,", 1"):1-this.percent+", 1, 1";return{transform:"translate".concat(this.vertical?"Y":"X","(").concat(this._shouldInvertMouseCoords()?"-":"").concat(this._getThumbGap(),"px) scale3d(").concat(t,")")}}},{key:"_getTrackFillStyles",value:function(){var t=this.percent,e=this.vertical?"1, ".concat(t,", 1"):t+", 1, 1";return{transform:"translate".concat(this.vertical?"Y":"X","(").concat(this._shouldInvertMouseCoords()?"":"-").concat(this._getThumbGap(),"px) scale3d(").concat(e,")"),display:0===t?"none":""}}},{key:"_getTicksContainerStyles",value:function(){return{transform:"translate".concat(this.vertical?"Y":"X","(").concat(this.vertical||"rtl"!=this._getDirection()?"-":"").concat(this._tickIntervalPercent/2*100,"%)")}}},{key:"_getTicksStyles",value:function(){var t=100*this._tickIntervalPercent,e={backgroundSize:this.vertical?"2px ".concat(t,"%"):t+"% 2px",transform:"translateZ(0) translate".concat(this.vertical?"Y":"X","(").concat(this.vertical||"rtl"!=this._getDirection()?"":"-").concat(t/2,"%)").concat(this.vertical||"rtl"!=this._getDirection()?"":" rotate(180deg)")};if(this._isMinValue()&&this._getThumbGap()){var n=this._shouldInvertAxis();e["padding"+(this.vertical?n?"Bottom":"Top":n?"Right":"Left")]=this._getThumbGap()+"px"}return e}},{key:"_getThumbContainerStyles",value:function(){var t=this._shouldInvertAxis();return{transform:"translate".concat(this.vertical?"Y":"X","(-").concat(100*(("rtl"!=this._getDirection()||this.vertical?t:!t)?this.percent:1-this.percent),"%)")}}},{key:"_shouldInvertMouseCoords",value:function(){var t=this._shouldInvertAxis();return"rtl"!=this._getDirection()||this.vertical?t:!t}},{key:"_getDirection",value:function(){return this._dir&&"rtl"==this._dir.value?"rtl":"ltr"}},{key:"ngAfterViewInit",value:function(){var t=this;this._focusMonitor.monitor(this._elementRef,!0).subscribe((function(e){t._isActive=!!e&&"keyboard"!==e,t._changeDetectorRef.detectChanges()})),this._dir&&(this._dirChangeSubscription=this._dir.change.subscribe((function(){t._changeDetectorRef.markForCheck()})))}},{key:"ngOnDestroy",value:function(){var t=this._elementRef.nativeElement;t.removeEventListener("mousedown",this._pointerDown,b),t.removeEventListener("touchstart",this._pointerDown,b),this._lastPointerEvent=null,this._removeGlobalEvents(),this._focusMonitor.stopMonitoring(this._elementRef),this._dirChangeSubscription.unsubscribe()}},{key:"_onMouseenter",value:function(){this.disabled||(this._sliderDimensions=this._getSliderDimensions(),this._updateTickIntervalPercent())}},{key:"_onFocus",value:function(){this._sliderDimensions=this._getSliderDimensions(),this._updateTickIntervalPercent()}},{key:"_onBlur",value:function(){this.onTouched()}},{key:"_onKeydown",value:function(t){if(!this.disabled&&!Object(s.v)(t)){var e=this.value;switch(t.keyCode){case s.n:this._increment(10);break;case s.m:this._increment(-10);break;case s.f:this.value=this.max;break;case s.j:this.value=this.min;break;case s.k:this._increment("rtl"==this._getDirection()?1:-1);break;case s.s:this._increment(1);break;case s.o:this._increment("rtl"==this._getDirection()?-1:1);break;case s.e:this._increment(-1);break;default:return}e!=this.value&&(this._emitInputEvent(),this._emitChangeEvent()),this._isSliding=!0,t.preventDefault()}}},{key:"_onKeyup",value:function(){this._isSliding=!1}},{key:"_getWindow",value:function(){return this._document.defaultView||window}},{key:"_bindGlobalEvents",value:function(t){var e=this._document,n=_(t),i=n?"touchend":"mouseup";e.addEventListener(n?"touchmove":"mousemove",this._pointerMove,b),e.addEventListener(i,this._pointerUp,b),n&&e.addEventListener("touchcancel",this._pointerUp,b);var a=this._getWindow();void 0!==a&&a&&a.addEventListener("blur",this._windowBlur)}},{key:"_removeGlobalEvents",value:function(){var t=this._document;t.removeEventListener("mousemove",this._pointerMove,b),t.removeEventListener("mouseup",this._pointerUp,b),t.removeEventListener("touchmove",this._pointerMove,b),t.removeEventListener("touchend",this._pointerUp,b),t.removeEventListener("touchcancel",this._pointerUp,b);var e=this._getWindow();void 0!==e&&e&&e.removeEventListener("blur",this._windowBlur)}},{key:"_increment",value:function(t){this.value=this._clamp((this.value||0)+this.step*t,this.min,this.max)}},{key:"_updateValueFromPosition",value:function(t){if(this._sliderDimensions){var e=this._clamp(((this.vertical?t.y:t.x)-(this.vertical?this._sliderDimensions.top:this._sliderDimensions.left))/(this.vertical?this._sliderDimensions.height:this._sliderDimensions.width));if(this._shouldInvertMouseCoords()&&(e=1-e),0===e)this.value=this.min;else if(1===e)this.value=this.max;else{var n=this._calculateValue(e),i=Math.round((n-this.min)/this.step)*this.step+this.min;this.value=this._clamp(i,this.min,this.max)}}}},{key:"_emitChangeEvent",value:function(){this._controlValueAccessorChangeFn(this.value),this.valueChange.emit(this.value),this.change.emit(this._createChangeEvent())}},{key:"_emitInputEvent",value:function(){this.input.emit(this._createChangeEvent())}},{key:"_updateTickIntervalPercent",value:function(){if(this.tickInterval&&this._sliderDimensions)if("auto"==this.tickInterval){var t=this.vertical?this._sliderDimensions.height:this._sliderDimensions.width,e=Math.ceil(30/(t*this.step/(this.max-this.min)));this._tickIntervalPercent=e*this.step/t}else this._tickIntervalPercent=this.tickInterval*this.step/(this.max-this.min)}},{key:"_createChangeEvent",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.value,e=new m;return e.source=this,e.value=t,e}},{key:"_calculatePercentage",value:function(t){return((t||0)-this.min)/(this.max-this.min)}},{key:"_calculateValue",value:function(t){return this.min+t*(this.max-this.min)}},{key:"_clamp",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.max(e,Math.min(t,n))}},{key:"_getSliderDimensions",value:function(){return this._sliderWrapper?this._sliderWrapper.nativeElement.getBoundingClientRect():null}},{key:"_focusHostElement",value:function(t){this._elementRef.nativeElement.focus(t)}},{key:"_blurHostElement",value:function(){this._elementRef.nativeElement.blur()}},{key:"writeValue",value:function(t){this.value=t}},{key:"registerOnChange",value:function(t){this._controlValueAccessorChangeFn=t}},{key:"registerOnTouched",value:function(t){this.onTouched=t}},{key:"setDisabledState",value:function(t){this.disabled=t}},{key:"invert",get:function(){return this._invert},set:function(t){this._invert=Object(o.c)(t)}},{key:"max",get:function(){return this._max},set:function(t){this._max=Object(o.f)(t,this._max),this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()}},{key:"min",get:function(){return this._min},set:function(t){this._min=Object(o.f)(t,this._min),null===this._value&&(this.value=this._min),this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()}},{key:"step",get:function(){return this._step},set:function(t){this._step=Object(o.f)(t,this._step),this._step%1!=0&&(this._roundToDecimal=this._step.toString().split(".").pop().length),this._changeDetectorRef.markForCheck()}},{key:"thumbLabel",get:function(){return this._thumbLabel},set:function(t){this._thumbLabel=Object(o.c)(t)}},{key:"tickInterval",get:function(){return this._tickInterval},set:function(t){this._tickInterval="auto"===t?"auto":"number"==typeof t||"string"==typeof t?Object(o.f)(t,this._tickInterval):0}},{key:"value",get:function(){return null===this._value&&(this.value=this._min),this._value},set:function(t){if(t!==this._value){var e=Object(o.f)(t);this._roundToDecimal&&(e=parseFloat(e.toFixed(this._roundToDecimal))),this._value=e,this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()}}},{key:"vertical",get:function(){return this._vertical},set:function(t){this._vertical=Object(o.c)(t)}},{key:"displayValue",get:function(){return this.displayWith?this.displayWith(this.value):this._roundToDecimal&&this.value&&this.value%1!=0?this.value.toFixed(this._roundToDecimal):this.value||0}},{key:"percent",get:function(){return this._clamp(this._percent)}}]),n}(v);return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(f.h),a.Qb(a.h),a.Qb(h.c,8),a.bc("tabindex"),a.Qb(a.C),a.Qb(i.e),a.Qb(l.a,8))},t.\u0275cmp=a.Kb({type:t,selectors:[["mat-slider"]],viewQuery:function(t,e){var n;1&t&&a.Xc(p,!0),2&t&&a.yc(n=a.ec())&&(e._sliderWrapper=n.first)},hostAttrs:["role","slider",1,"mat-slider","mat-focus-indicator"],hostVars:28,hostBindings:function(t,e){1&t&&a.dc("focus",(function(){return e._onFocus()}))("blur",(function(){return e._onBlur()}))("keydown",(function(t){return e._onKeydown(t)}))("keyup",(function(){return e._onKeyup()}))("mouseenter",(function(){return e._onMouseenter()}))("selectstart",(function(t){return t.preventDefault()})),2&t&&(a.Zb("tabIndex",e.tabIndex),a.Eb("aria-disabled",e.disabled)("aria-valuemax",e.max)("aria-valuemin",e.min)("aria-valuenow",e.value)("aria-orientation",e.vertical?"vertical":"horizontal"),a.Ib("mat-slider-disabled",e.disabled)("mat-slider-has-ticks",e.tickInterval)("mat-slider-horizontal",!e.vertical)("mat-slider-axis-inverted",e._shouldInvertAxis())("mat-slider-invert-mouse-coords",e._shouldInvertMouseCoords())("mat-slider-sliding",e._isSliding)("mat-slider-thumb-label-showing",e.thumbLabel)("mat-slider-vertical",e.vertical)("mat-slider-min-value",e._isMinValue())("mat-slider-hide-last-tick",e.disabled||e._isMinValue()&&e._getThumbGap()&&e._shouldInvertAxis())("_mat-animation-noopable","NoopAnimations"===e._animationMode))},inputs:{disabled:"disabled",color:"color",tabIndex:"tabIndex",invert:"invert",max:"max",min:"min",value:"value",step:"step",thumbLabel:"thumbLabel",tickInterval:"tickInterval",vertical:"vertical",displayWith:"displayWith"},outputs:{change:"change",input:"input",valueChange:"valueChange"},exportAs:["matSlider"],features:[a.Cb([g]),a.Ab],decls:13,vars:6,consts:[[1,"mat-slider-wrapper"],["sliderWrapper",""],[1,"mat-slider-track-wrapper"],[1,"mat-slider-track-background",3,"ngStyle"],[1,"mat-slider-track-fill",3,"ngStyle"],[1,"mat-slider-ticks-container",3,"ngStyle"],[1,"mat-slider-ticks",3,"ngStyle"],[1,"mat-slider-thumb-container",3,"ngStyle"],[1,"mat-slider-focus-ring"],[1,"mat-slider-thumb"],[1,"mat-slider-thumb-label"],[1,"mat-slider-thumb-label-text"]],template:function(t,e){1&t&&(a.Wb(0,"div",0,1),a.Wb(2,"div",2),a.Rb(3,"div",3),a.Rb(4,"div",4),a.Vb(),a.Wb(5,"div",5),a.Rb(6,"div",6),a.Vb(),a.Wb(7,"div",7),a.Rb(8,"div",8),a.Rb(9,"div",9),a.Wb(10,"div",10),a.Wb(11,"span",11),a.Qc(12),a.Vb(),a.Vb(),a.Vb(),a.Vb()),2&t&&(a.Db(3),a.oc("ngStyle",e._getTrackBackgroundStyles()),a.Db(1),a.oc("ngStyle",e._getTrackFillStyles()),a.Db(1),a.oc("ngStyle",e._getTicksContainerStyles()),a.Db(1),a.oc("ngStyle",e._getTicksStyles()),a.Db(1),a.oc("ngStyle",e._getThumbContainerStyles()),a.Db(5),a.Rc(e.displayValue))},directives:[i.w],styles:['.mat-slider{display:inline-block;position:relative;box-sizing:border-box;padding:8px;outline:none;vertical-align:middle}.mat-slider:not(.mat-slider-disabled):active,.mat-slider.mat-slider-sliding:not(.mat-slider-disabled){cursor:-webkit-grabbing;cursor:grabbing}.mat-slider-wrapper{position:absolute}.mat-slider-track-wrapper{position:absolute;top:0;left:0;overflow:hidden}.mat-slider-track-fill{position:absolute;transform-origin:0 0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-track-background{position:absolute;transform-origin:100% 100%;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-ticks-container{position:absolute;left:0;top:0;overflow:hidden}.mat-slider-ticks{background-repeat:repeat;background-clip:content-box;box-sizing:border-box;opacity:0;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-thumb-container{position:absolute;z-index:1;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-focus-ring{position:absolute;width:30px;height:30px;border-radius:50%;transform:scale(0);opacity:0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider.cdk-keyboard-focused .mat-slider-focus-ring,.mat-slider.cdk-program-focused .mat-slider-focus-ring{transform:scale(1);opacity:1}.mat-slider:not(.mat-slider-disabled):not(.mat-slider-sliding) .mat-slider-thumb-label,.mat-slider:not(.mat-slider-disabled):not(.mat-slider-sliding) .mat-slider-thumb{cursor:-webkit-grab;cursor:grab}.mat-slider-thumb{position:absolute;right:-10px;bottom:-10px;box-sizing:border-box;width:20px;height:20px;border:3px solid transparent;border-radius:50%;transform:scale(0.7);transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),border-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-thumb-label{display:none;align-items:center;justify-content:center;position:absolute;width:28px;height:28px;border-radius:50%;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),border-radius 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.cdk-high-contrast-active .mat-slider-thumb-label{outline:solid 1px}.mat-slider-thumb-label-text{z-index:1;opacity:0;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-sliding .mat-slider-track-fill,.mat-slider-sliding .mat-slider-track-background,.mat-slider-sliding .mat-slider-thumb-container{transition-duration:0ms}.mat-slider-has-ticks .mat-slider-wrapper::after{content:"";position:absolute;border-width:0;border-style:solid;opacity:0;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-has-ticks.cdk-focused:not(.mat-slider-hide-last-tick) .mat-slider-wrapper::after,.mat-slider-has-ticks:hover:not(.mat-slider-hide-last-tick) .mat-slider-wrapper::after{opacity:1}.mat-slider-has-ticks.cdk-focused:not(.mat-slider-disabled) .mat-slider-ticks,.mat-slider-has-ticks:hover:not(.mat-slider-disabled) .mat-slider-ticks{opacity:1}.mat-slider-thumb-label-showing .mat-slider-focus-ring{display:none}.mat-slider-thumb-label-showing .mat-slider-thumb-label{display:flex}.mat-slider-axis-inverted .mat-slider-track-fill{transform-origin:100% 100%}.mat-slider-axis-inverted .mat-slider-track-background{transform-origin:0 0}.mat-slider:not(.mat-slider-disabled).cdk-focused.mat-slider-thumb-label-showing .mat-slider-thumb{transform:scale(0)}.mat-slider:not(.mat-slider-disabled).cdk-focused .mat-slider-thumb-label{border-radius:50% 50% 0}.mat-slider:not(.mat-slider-disabled).cdk-focused .mat-slider-thumb-label-text{opacity:1}.mat-slider:not(.mat-slider-disabled).cdk-mouse-focused .mat-slider-thumb,.mat-slider:not(.mat-slider-disabled).cdk-touch-focused .mat-slider-thumb,.mat-slider:not(.mat-slider-disabled).cdk-program-focused .mat-slider-thumb{border-width:2px;transform:scale(1)}.mat-slider-disabled .mat-slider-focus-ring{transform:scale(0);opacity:0}.mat-slider-disabled .mat-slider-thumb{border-width:4px;transform:scale(0.5)}.mat-slider-disabled .mat-slider-thumb-label{display:none}.mat-slider-horizontal{height:48px;min-width:128px}.mat-slider-horizontal .mat-slider-wrapper{height:2px;top:23px;left:8px;right:8px}.mat-slider-horizontal .mat-slider-wrapper::after{height:2px;border-left-width:2px;right:0;top:0}.mat-slider-horizontal .mat-slider-track-wrapper{height:2px;width:100%}.mat-slider-horizontal .mat-slider-track-fill{height:2px;width:100%;transform:scaleX(0)}.mat-slider-horizontal .mat-slider-track-background{height:2px;width:100%;transform:scaleX(1)}.mat-slider-horizontal .mat-slider-ticks-container{height:2px;width:100%}.cdk-high-contrast-active .mat-slider-horizontal .mat-slider-ticks-container{height:0;outline:solid 2px;top:1px}.mat-slider-horizontal .mat-slider-ticks{height:2px;width:100%}.mat-slider-horizontal .mat-slider-thumb-container{width:100%;height:0;top:50%}.mat-slider-horizontal .mat-slider-focus-ring{top:-15px;right:-15px}.mat-slider-horizontal .mat-slider-thumb-label{right:-14px;top:-40px;transform:translateY(26px) scale(0.01) rotate(45deg)}.mat-slider-horizontal .mat-slider-thumb-label-text{transform:rotate(-45deg)}.mat-slider-horizontal.cdk-focused .mat-slider-thumb-label{transform:rotate(45deg)}.cdk-high-contrast-active .mat-slider-horizontal.cdk-focused .mat-slider-thumb-label,.cdk-high-contrast-active .mat-slider-horizontal.cdk-focused .mat-slider-thumb-label-text{transform:none}.mat-slider-vertical{width:48px;min-height:128px}.mat-slider-vertical .mat-slider-wrapper{width:2px;top:8px;bottom:8px;left:23px}.mat-slider-vertical .mat-slider-wrapper::after{width:2px;border-top-width:2px;bottom:0;left:0}.mat-slider-vertical .mat-slider-track-wrapper{height:100%;width:2px}.mat-slider-vertical .mat-slider-track-fill{height:100%;width:2px;transform:scaleY(0)}.mat-slider-vertical .mat-slider-track-background{height:100%;width:2px;transform:scaleY(1)}.mat-slider-vertical .mat-slider-ticks-container{width:2px;height:100%}.cdk-high-contrast-active .mat-slider-vertical .mat-slider-ticks-container{width:0;outline:solid 2px;left:1px}.mat-slider-vertical .mat-slider-focus-ring{bottom:-15px;left:-15px}.mat-slider-vertical .mat-slider-ticks{width:2px;height:100%}.mat-slider-vertical .mat-slider-thumb-container{height:100%;width:0;left:50%}.mat-slider-vertical .mat-slider-thumb{-webkit-backface-visibility:hidden;backface-visibility:hidden}.mat-slider-vertical .mat-slider-thumb-label{bottom:-14px;left:-40px;transform:translateX(26px) scale(0.01) rotate(-45deg)}.mat-slider-vertical .mat-slider-thumb-label-text{transform:rotate(45deg)}.mat-slider-vertical.cdk-focused .mat-slider-thumb-label{transform:rotate(-45deg)}[dir=rtl] .mat-slider-wrapper::after{left:0;right:auto}[dir=rtl] .mat-slider-horizontal .mat-slider-track-fill{transform-origin:100% 100%}[dir=rtl] .mat-slider-horizontal .mat-slider-track-background{transform-origin:0 0}[dir=rtl] .mat-slider-horizontal.mat-slider-axis-inverted .mat-slider-track-fill{transform-origin:0 0}[dir=rtl] .mat-slider-horizontal.mat-slider-axis-inverted .mat-slider-track-background{transform-origin:100% 100%}.mat-slider._mat-animation-noopable .mat-slider-track-fill,.mat-slider._mat-animation-noopable .mat-slider-track-background,.mat-slider._mat-animation-noopable .mat-slider-ticks,.mat-slider._mat-animation-noopable .mat-slider-thumb-container,.mat-slider._mat-animation-noopable .mat-slider-focus-ring,.mat-slider._mat-animation-noopable .mat-slider-thumb,.mat-slider._mat-animation-noopable .mat-slider-thumb-label,.mat-slider._mat-animation-noopable .mat-slider-thumb-label-text,.mat-slider._mat-animation-noopable .mat-slider-has-ticks .mat-slider-wrapper::after{transition:none}\n'],encapsulation:2,changeDetection:0}),t}();function _(t){return"t"===t.type[0]}function C(t){var e=_(t)?t.touches[0]||t.changedTouches[0]:t;return{x:e.clientX,y:e.clientY}}var k=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)},imports:[[i.c,r.k],r.k]}),t}()},"5cI5":function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n("fXoL"),a=function(){var t=function(){function t(){_classCallCheck(this,t),this.appSession=null}return _createClass(t,[{key:"setAppSession",value:function(t){this.appSession=t}},{key:"getAppSession",value:function(){return this.appSession}},{key:"save",value:function(t,e){localStorage.setItem(t+"_"+this.getAppSession(),e)}},{key:"get",value:function(t){return localStorage.getItem(t+"_"+this.getAppSession())}},{key:"remove",value:function(t){localStorage.removeItem(t+"_"+this.getAppSession())}},{key:"resetLocal",value:function(){for(var t=[],e=0;e<localStorage.length;e++)"filtersAdmin_"===localStorage.key(e).substring(0,13)&&t.push(localStorage.key(e));for(var n=0;n<t.length;n++)localStorage.removeItem(t[n])}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=i.Mb({token:t,factory:t.\u0275fac,providedIn:"root"}),t}()},"6Psc":function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var i=n("XNiG"),a=n("LRne"),r=n("vkgz"),o=n("nYR2"),s=n("JIr8"),c=n("fXoL"),l=n("sYmb"),u=n("tk/3"),d=n("0IaG"),f=n("AXEc"),h=n("tyNb"),p=function(){var t=function(){function t(e,n,a,r,o){_classCallCheck(this,t),this.translate=e,this.http=n,this.dialog=a,this.notify=r,this.router=o,this.loading=!0,this.pinnedFolders=[],this.folders=[],this.currentFolder={id:0},this.eventAction=new i.a}return _createClass(t,[{key:"ngOnInit",value:function(){}},{key:"initFolder",value:function(){this.currentFolder={id:0}}},{key:"catchEvent",value:function(){return this.eventAction.asObservable()}},{key:"setEvent",value:function(t){return this.eventAction.next(t)}},{key:"goToFolder",value:function(t){this.setFolder(t),this.router.navigate(["/folders/"+t.id])}},{key:"setFolder",value:function(t){this.currentFolder=t,this.eventAction.next(t)}},{key:"getCurrentFolder",value:function(){return this.currentFolder}},{key:"getFolders",value:function(){var t=this;this.http.get("../rest/folders").pipe(Object(r.a)((function(e){t.folders=e.folders,t.eventAction.next({type:"initTree",content:""})})),Object(o.a)((function(){return t.loading=!1})),Object(s.a)((function(e){return t.notify.handleErrors(e),Object(a.a)(!1)}))).subscribe()}},{key:"getList",value:function(){return this.folders}},{key:"getPinnedFolders",value:function(){var t=this;this.loading=!0,this.http.get("../rest/pinnedFolders").pipe(Object(r.a)((function(e){t.pinnedFolders=e.folders})),Object(o.a)((function(){return t.loading=!1})),Object(s.a)((function(e){return t.notify.handleErrors(e),Object(a.a)(!1)}))).subscribe()}},{key:"setFolders",value:function(t){this.folders=t}},{key:"getPinnedList",value:function(){return this.pinnedFolders}},{key:"pinFolder",value:function(t){var e=this;this.http.post("../rest/folders/".concat(t.id,"/pin"),{}).pipe(Object(r.a)((function(){e.getPinnedFolders(),e.eventAction.next({type:"refreshFolderPinned",content:{id:t.id,pinned:!0}}),e.notify.success(e.translate.instant("lang.folderPinned"))})),Object(s.a)((function(t){return e.notify.handleErrors(t),Object(a.a)(!1)}))).subscribe()}},{key:"unpinFolder",value:function(t){var e=this;this.http.delete("../rest/folders/".concat(t.id,"/unpin")).pipe(Object(r.a)((function(){e.getPinnedFolders(),e.eventAction.next({type:"refreshFolderPinned",content:{id:t.id,pinned:!1}}),e.notify.success(e.translate.instant("lang.folderUnpinned"))})),Object(s.a)((function(t){return e.notify.handleErrors(t),Object(a.a)(!1)}))).subscribe()}},{key:"getDragIds",value:function(){var t=this.folders.map((function(t){return"treefolder-list-"+t.id}));return this.pinnedFolders.map((function(t){return"folder-list-"+t.id})).concat(t)}},{key:"classifyDocument",value:function(t,e){var n=this;this.http.post("../rest/folders/".concat(e.id,"/resources"),{resources:[t.item.data.resId]}).pipe(Object(r.a)((function(t){void 0!==n.pinnedFolders.filter((function(t){return t.id===e.id}))[0]&&(n.pinnedFolders.filter((function(t){return t.id===e.id}))[0].countResources=t.countResources),n.eventAction.next({type:"refreshFolderCount",content:{id:e.id,countResources:t.countResources}})})),Object(r.a)((function(){n.notify.success(n.translate.instant("lang.mailClassified")),n.eventAction.next({type:"function",content:"refreshDao"})})),Object(o.a)((function(){return e.drag=!1})),Object(s.a)((function(t){return n.notify.handleErrors(t),Object(a.a)(!1)}))).subscribe()}},{key:"getLoader",value:function(){return this.loading}}]),t}();return t.\u0275fac=function(e){return new(e||t)(c.ac(l.e),c.ac(u.b),c.ac(d.b),c.ac(f.a),c.ac(h.c))},t.\u0275prov=c.Mb({token:t,factory:t.\u0275fac}),t}()},"7+OI":function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n("HDdC");function a(t){return!!t&&(t instanceof i.a||"function"==typeof t.lift&&"function"==typeof t.subscribe)}},"7EHt":function(t,e,n){"use strict";n.d(e,"a",(function(){return tt})),n.d(e,"b",(function(){return nt})),n.d(e,"c",(function(){return q})),n.d(e,"d",(function(){return K})),n.d(e,"e",(function(){return G})),n.d(e,"f",(function(){return J})),n.d(e,"g",(function(){return Y})),n.d(e,"h",(function(){return Z}));var i,a,r,o=n("fXoL"),s=n("8LU1"),c=n("XNiG"),l=n("quSY"),u=n("0EQZ"),d=0,f=new o.s("CdkAccordion"),h=((r=function(){function t(){_classCallCheck(this,t),this._stateChanges=new c.a,this._openCloseAllActions=new c.a,this.id="cdk-accordion-"+d++,this._multi=!1}return _createClass(t,[{key:"openAll",value:function(){this._openCloseAll(!0)}},{key:"closeAll",value:function(){this._openCloseAll(!1)}},{key:"ngOnChanges",value:function(t){this._stateChanges.next(t)}},{key:"ngOnDestroy",value:function(){this._stateChanges.complete()}},{key:"_openCloseAll",value:function(t){this.multi&&this._openCloseAllActions.next(t)}},{key:"multi",get:function(){return this._multi},set:function(t){this._multi=Object(s.c)(t)}}]),t}()).\u0275fac=function(t){return new(t||r)},r.\u0275dir=o.Lb({type:r,selectors:[["cdk-accordion"],["","cdkAccordion",""]],inputs:{multi:"multi"},exportAs:["cdkAccordion"],features:[o.Cb([{provide:f,useExisting:r}]),o.Bb]}),r),p=0,b=((a=function(){function t(e,n,i){var a=this;_classCallCheck(this,t),this.accordion=e,this._changeDetectorRef=n,this._expansionDispatcher=i,this._openCloseAllSubscription=l.a.EMPTY,this.closed=new o.o,this.opened=new o.o,this.destroyed=new o.o,this.expandedChange=new o.o,this.id="cdk-accordion-child-"+p++,this._expanded=!1,this._disabled=!1,this._removeUniqueSelectionListener=function(){},this._removeUniqueSelectionListener=i.listen((function(t,e){a.accordion&&!a.accordion.multi&&a.accordion.id===e&&a.id!==t&&(a.expanded=!1)})),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions())}return _createClass(t,[{key:"ngOnDestroy",value:function(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe()}},{key:"toggle",value:function(){this.disabled||(this.expanded=!this.expanded)}},{key:"close",value:function(){this.disabled||(this.expanded=!1)}},{key:"open",value:function(){this.disabled||(this.expanded=!0)}},{key:"_subscribeToOpenCloseAllActions",value:function(){var t=this;return this.accordion._openCloseAllActions.subscribe((function(e){t.disabled||(t.expanded=e)}))}},{key:"expanded",get:function(){return this._expanded},set:function(t){t=Object(s.c)(t),this._expanded!==t&&(this._expanded=t,this.expandedChange.emit(t),t?(this.opened.emit(),this._expansionDispatcher.notify(this.id,this.accordion?this.accordion.id:this.id)):this.closed.emit(),this._changeDetectorRef.markForCheck())}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=Object(s.c)(t)}}]),t}()).\u0275fac=function(t){return new(t||a)(o.Qb(f,12),o.Qb(o.h),o.Qb(u.d))},a.\u0275dir=o.Lb({type:a,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:"expanded",disabled:"disabled"},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[o.Cb([{provide:f,useValue:void 0}])]}),a),g=((i=function t(){_classCallCheck(this,t)}).\u0275mod=o.Ob({type:i}),i.\u0275inj=o.Nb({factory:function(t){return new(t||i)}}),i),m=n("+rOU"),v=n("ofXK"),y=n("u47x"),_=n("/uUt"),C=n("JX91"),k=n("pLZG"),x=n("IzEk"),O=n("FtGj"),D=n("R1ws"),w=n("EY2u"),M=n("VRyK"),S=n("R0Ic"),I=["body"];function P(t,e){}var R=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],V=["mat-expansion-panel-header","*","mat-action-row"];function j(t,e){if(1&t&&o.Rb(0,"span",2),2&t){var n=o.hc();o.oc("@indicatorRotate",n._getExpandedState())}}var A,W,T,E,F,L,Q,N,z=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],B=["mat-panel-title","mat-panel-description","*"],U=new o.s("MAT_ACCORDION"),H={indicatorRotate:Object(S.n)("indicatorRotate",[Object(S.k)("collapsed, void",Object(S.l)({transform:"rotate(0deg)"})),Object(S.k)("expanded",Object(S.l)({transform:"rotate(180deg)"})),Object(S.m)("expanded <=> collapsed, void => collapsed",Object(S.e)("225ms cubic-bezier(0.4,0.0,0.2,1)"))]),bodyExpansion:Object(S.n)("bodyExpansion",[Object(S.k)("collapsed, void",Object(S.l)({height:"0px",visibility:"hidden"})),Object(S.k)("expanded",Object(S.l)({height:"*",visibility:"visible"})),Object(S.m)("expanded <=> collapsed, void => collapsed",Object(S.e)("225ms cubic-bezier(0.4,0.0,0.2,1)"))])},G=((A=function t(e){_classCallCheck(this,t),this._template=e}).\u0275fac=function(t){return new(t||A)(o.Qb(o.P))},A.\u0275dir=o.Lb({type:A,selectors:[["ng-template","matExpansionPanelContent",""]]}),A),$=0,X=new o.s("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS"),q=((Q=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a,r,s,l,u){var d;return _classCallCheck(this,n),(d=e.call(this,t,i,a))._viewContainerRef=r,d._animationMode=l,d._hideToggle=!1,d.afterExpand=new o.o,d.afterCollapse=new o.o,d._inputChanges=new c.a,d._headerId="mat-expansion-panel-header-"+$++,d._bodyAnimationDone=new c.a,d.accordion=t,d._document=s,d._bodyAnimationDone.pipe(Object(_.a)((function(t,e){return t.fromState===e.fromState&&t.toState===e.toState}))).subscribe((function(t){"void"!==t.fromState&&("expanded"===t.toState?d.afterExpand.emit():"collapsed"===t.toState&&d.afterCollapse.emit())})),u&&(d.hideToggle=u.hideToggle),d}return _createClass(n,[{key:"_hasSpacing",value:function(){return!!this.accordion&&this.expanded&&"default"===this.accordion.displayMode}},{key:"_getExpandedState",value:function(){return this.expanded?"expanded":"collapsed"}},{key:"toggle",value:function(){this.expanded=!this.expanded}},{key:"close",value:function(){this.expanded=!1}},{key:"open",value:function(){this.expanded=!0}},{key:"ngAfterContentInit",value:function(){var t=this;this._lazyContent&&this.opened.pipe(Object(C.a)(null),Object(k.a)((function(){return t.expanded&&!t._portal})),Object(x.a)(1)).subscribe((function(){t._portal=new m.i(t._lazyContent._template,t._viewContainerRef)}))}},{key:"ngOnChanges",value:function(t){this._inputChanges.next(t)}},{key:"ngOnDestroy",value:function(){_get(_getPrototypeOf(n.prototype),"ngOnDestroy",this).call(this),this._bodyAnimationDone.complete(),this._inputChanges.complete()}},{key:"_containsFocus",value:function(){if(this._body){var t=this._document.activeElement,e=this._body.nativeElement;return t===e||e.contains(t)}return!1}},{key:"hideToggle",get:function(){return this._hideToggle||this.accordion&&this.accordion.hideToggle},set:function(t){this._hideToggle=Object(s.c)(t)}},{key:"togglePosition",get:function(){return this._togglePosition||this.accordion&&this.accordion.togglePosition},set:function(t){this._togglePosition=t}}]),n}(b)).\u0275fac=function(t){return new(t||Q)(o.Qb(U,12),o.Qb(o.h),o.Qb(u.d),o.Qb(o.T),o.Qb(v.e),o.Qb(D.a,8),o.Qb(X,8))},Q.\u0275cmp=o.Kb({type:Q,selectors:[["mat-expansion-panel"]],contentQueries:function(t,e,n){var i;1&t&&o.Jb(n,G,!0),2&t&&o.yc(i=o.ec())&&(e._lazyContent=i.first)},viewQuery:function(t,e){var n;1&t&&o.Xc(I,!0),2&t&&o.yc(n=o.ec())&&(e._body=n.first)},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(t,e){2&t&&o.Ib("mat-expanded",e.expanded)("_mat-animation-noopable","NoopAnimations"===e._animationMode)("mat-expansion-panel-spacing",e._hasSpacing())},inputs:{disabled:"disabled",expanded:"expanded",hideToggle:"hideToggle",togglePosition:"togglePosition"},outputs:{opened:"opened",closed:"closed",expandedChange:"expandedChange",afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],features:[o.Cb([{provide:U,useValue:void 0}]),o.Ab,o.Bb],ngContentSelectors:V,decls:7,vars:4,consts:[["role","region",1,"mat-expansion-panel-content",3,"id"],["body",""],[1,"mat-expansion-panel-body"],[3,"cdkPortalOutlet"]],template:function(t,e){1&t&&(o.nc(R),o.mc(0),o.Wb(1,"div",0,1),o.dc("@bodyExpansion.done",(function(t){return e._bodyAnimationDone.next(t)})),o.Wb(3,"div",2),o.mc(4,1),o.Oc(5,P,0,0,"ng-template",3),o.Vb(),o.mc(6,2),o.Vb()),2&t&&(o.Db(1),o.oc("@bodyExpansion",e._getExpandedState())("id",e.id),o.Eb("aria-labelledby",e._headerId),o.Db(4),o.oc("cdkPortalOutlet",e._portal))},directives:[m.c],styles:[".mat-expansion-panel{box-sizing:content-box;display:block;margin:0;border-radius:4px;overflow:hidden;transition:margin 225ms cubic-bezier(0.4, 0, 0.2, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);position:relative}.mat-accordion .mat-expansion-panel:not(.mat-expanded),.mat-accordion .mat-expansion-panel:not(.mat-expansion-panel-spacing){border-radius:0}.mat-accordion .mat-expansion-panel:first-of-type{border-top-right-radius:4px;border-top-left-radius:4px}.mat-accordion .mat-expansion-panel:last-of-type{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.cdk-high-contrast-active .mat-expansion-panel{outline:solid 1px}.mat-expansion-panel.ng-animate-disabled,.ng-animate-disabled .mat-expansion-panel,.mat-expansion-panel._mat-animation-noopable{transition:none}.mat-expansion-panel-content{display:flex;flex-direction:column;overflow:visible}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion>.mat-expansion-panel-spacing:first-child,.mat-accordion>*:first-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-top:0}.mat-accordion>.mat-expansion-panel-spacing:last-child,.mat-accordion>*:last-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px}.mat-action-row button.mat-button-base,.mat-action-row button.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-action-row button.mat-button-base,[dir=rtl] .mat-action-row button.mat-mdc-button-base{margin-left:0;margin-right:8px}\n"],encapsulation:2,data:{animation:[H.bodyExpansion]},changeDetection:0}),Q),K=((L=function t(){_classCallCheck(this,t)}).\u0275fac=function(t){return new(t||L)},L.\u0275dir=o.Lb({type:L,selectors:[["mat-action-row"]],hostAttrs:[1,"mat-action-row"]}),L),Y=((F=function(){function t(e,n,i,a,r,o){var s=this;_classCallCheck(this,t),this.panel=e,this._element=n,this._focusMonitor=i,this._changeDetectorRef=a,this._animationMode=o,this._parentChangeSubscription=l.a.EMPTY;var c=e.accordion?e.accordion._stateChanges.pipe(Object(k.a)((function(t){return!(!t.hideToggle&&!t.togglePosition)}))):w.a;this._parentChangeSubscription=Object(M.a)(e.opened,e.closed,c,e._inputChanges.pipe(Object(k.a)((function(t){return!!(t.hideToggle||t.disabled||t.togglePosition)})))).subscribe((function(){return s._changeDetectorRef.markForCheck()})),e.closed.pipe(Object(k.a)((function(){return e._containsFocus()}))).subscribe((function(){return i.focusVia(n,"program")})),r&&(this.expandedHeight=r.expandedHeight,this.collapsedHeight=r.collapsedHeight)}return _createClass(t,[{key:"_toggle",value:function(){this.disabled||this.panel.toggle()}},{key:"_isExpanded",value:function(){return this.panel.expanded}},{key:"_getExpandedState",value:function(){return this.panel._getExpandedState()}},{key:"_getPanelId",value:function(){return this.panel.id}},{key:"_getTogglePosition",value:function(){return this.panel.togglePosition}},{key:"_showToggle",value:function(){return!this.panel.hideToggle&&!this.panel.disabled}},{key:"_getHeaderHeight",value:function(){var t=this._isExpanded();return t&&this.expandedHeight?this.expandedHeight:!t&&this.collapsedHeight?this.collapsedHeight:null}},{key:"_keydown",value:function(t){switch(t.keyCode){case O.q:case O.g:Object(O.v)(t)||(t.preventDefault(),this._toggle());break;default:return void(this.panel.accordion&&this.panel.accordion._handleHeaderKeydown(t))}}},{key:"focus",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"program",e=arguments.length>1?arguments[1]:void 0;this._focusMonitor.focusVia(this._element,t,e)}},{key:"ngAfterViewInit",value:function(){var t=this;this._focusMonitor.monitor(this._element).subscribe((function(e){e&&t.panel.accordion&&t.panel.accordion._handleHeaderFocus(t)}))}},{key:"ngOnDestroy",value:function(){this._parentChangeSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._element)}},{key:"disabled",get:function(){return this.panel.disabled}}]),t}()).\u0275fac=function(t){return new(t||F)(o.Qb(q,1),o.Qb(o.l),o.Qb(y.h),o.Qb(o.h),o.Qb(X,8),o.Qb(D.a,8))},F.\u0275cmp=o.Kb({type:F,selectors:[["mat-expansion-panel-header"]],hostAttrs:["role","button",1,"mat-expansion-panel-header","mat-focus-indicator"],hostVars:15,hostBindings:function(t,e){1&t&&o.dc("click",(function(){return e._toggle()}))("keydown",(function(t){return e._keydown(t)})),2&t&&(o.Eb("id",e.panel._headerId)("tabindex",e.disabled?-1:0)("aria-controls",e._getPanelId())("aria-expanded",e._isExpanded())("aria-disabled",e.panel.disabled),o.Lc("height",e._getHeaderHeight()),o.Ib("mat-expanded",e._isExpanded())("mat-expansion-toggle-indicator-after","after"===e._getTogglePosition())("mat-expansion-toggle-indicator-before","before"===e._getTogglePosition())("_mat-animation-noopable","NoopAnimations"===e._animationMode))},inputs:{expandedHeight:"expandedHeight",collapsedHeight:"collapsedHeight"},ngContentSelectors:B,decls:5,vars:1,consts:[[1,"mat-content"],["class","mat-expansion-indicator",4,"ngIf"],[1,"mat-expansion-indicator"]],template:function(t,e){1&t&&(o.nc(z),o.Wb(0,"span",0),o.mc(1),o.mc(2,1),o.mc(3,2),o.Vb(),o.Oc(4,j,1,1,"span",1)),2&t&&(o.Db(4),o.oc("ngIf",e._showToggle()))},directives:[v.t],styles:['.mat-expansion-panel-header{display:flex;flex-direction:row;align-items:center;padding:0 24px;border-radius:inherit;transition:height 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel-header._mat-animation-noopable{transition:none}.mat-expansion-panel-header:focus,.mat-expansion-panel-header:hover{outline:none}.mat-expansion-panel-header.mat-expanded:focus,.mat-expansion-panel-header.mat-expanded:hover{background:inherit}.mat-expansion-panel-header:not([aria-disabled=true]){cursor:pointer}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before{flex-direction:row-reverse}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 16px 0 0}[dir=rtl] .mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 0 0 16px}.mat-content{display:flex;flex:1;flex-direction:row;overflow:hidden}.mat-expansion-panel-header-title,.mat-expansion-panel-header-description{display:flex;flex-grow:1;margin-right:16px}[dir=rtl] .mat-expansion-panel-header-title,[dir=rtl] .mat-expansion-panel-header-description{margin-right:0;margin-left:16px}.mat-expansion-panel-header-description{flex-grow:2}.mat-expansion-indicator::after{border-style:solid;border-width:0 2px 2px 0;content:"";display:inline-block;padding:3px;transform:rotate(45deg);vertical-align:middle}\n'],encapsulation:2,data:{animation:[H.indicatorRotate]},changeDetection:0}),F),J=((E=function t(){_classCallCheck(this,t)}).\u0275fac=function(t){return new(t||E)},E.\u0275dir=o.Lb({type:E,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"]}),E),Z=((T=function t(){_classCallCheck(this,t)}).\u0275fac=function(t){return new(t||T)},T.\u0275dir=o.Lb({type:T,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"]}),T),tt=((W=function(t){_inherits(n,t);var e=_createSuper(n);function n(){var t;return _classCallCheck(this,n),(t=e.apply(this,arguments))._ownHeaders=new o.H,t._hideToggle=!1,t.displayMode="default",t.togglePosition="after",t}return _createClass(n,[{key:"ngAfterContentInit",value:function(){var t=this;this._headers.changes.pipe(Object(C.a)(this._headers)).subscribe((function(e){t._ownHeaders.reset(e.filter((function(e){return e.panel.accordion===t}))),t._ownHeaders.notifyOnChanges()})),this._keyManager=new y.g(this._ownHeaders).withWrap().withHomeAndEnd()}},{key:"_handleHeaderKeydown",value:function(t){this._keyManager.onKeydown(t)}},{key:"_handleHeaderFocus",value:function(t){this._keyManager.updateActiveItem(t)}},{key:"hideToggle",get:function(){return this._hideToggle},set:function(t){this._hideToggle=Object(s.c)(t)}}]),n}(h)).\u0275fac=function(t){return et(t||W)},W.\u0275dir=o.Lb({type:W,selectors:[["mat-accordion"]],contentQueries:function(t,e,n){var i;1&t&&o.Jb(n,Y,!0),2&t&&o.yc(i=o.ec())&&(e._headers=i)},hostAttrs:[1,"mat-accordion"],hostVars:2,hostBindings:function(t,e){2&t&&o.Ib("mat-accordion-multi",e.multi)},inputs:{multi:"multi",displayMode:"displayMode",togglePosition:"togglePosition",hideToggle:"hideToggle"},exportAs:["matAccordion"],features:[o.Cb([{provide:U,useExisting:W}]),o.Ab]}),W),et=o.Yb(tt),nt=((N=function t(){_classCallCheck(this,t)}).\u0275mod=o.Ob({type:N}),N.\u0275inj=o.Nb({factory:function(t){return new(t||N)},imports:[[v.c,g,m.h]]}),N)},"7Hc7":function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=1,a=Promise.resolve(),r={};function o(t){return t in r&&(delete r[t],!0)}var s=function(t){var e=i++;return r[e]=!0,a.then((function(){return o(e)&&t()})),e},c=function(t){o(t)},l=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var a;return _classCallCheck(this,n),(a=e.call(this,t,i)).scheduler=t,a.work=i,a}return _createClass(n,[{key:"requestAsyncId",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return null!==i&&i>0?_get(_getPrototypeOf(n.prototype),"requestAsyncId",this).call(this,t,e,i):(t.actions.push(this),t.scheduled||(t.scheduled=s(t.flush.bind(t,null))))}},{key:"recycleAsyncId",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(null!==i&&i>0||null===i&&this.delay>0)return _get(_getPrototypeOf(n.prototype),"recycleAsyncId",this).call(this,t,e,i);0===t.actions.length&&(c(e),t.scheduled=void 0)}}]),n}(n("3N8a").a),u=new(function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return _createClass(n,[{key:"flush",value:function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,i=-1,a=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++i<a&&(t=n.shift()));if(this.active=!1,e){for(;++i<a&&(t=n.shift());)t.unsubscribe();throw e}}}]),n}(n("IjjT").a))(l)},"7o/Q":function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var i=n("n6bG"),a=n("gRHU"),r=n("quSY"),o=n("2QA8"),s=n("2fFW"),c=n("NJ4a"),l=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r){var o;switch(_classCallCheck(this,n),(o=e.call(this)).syncErrorValue=null,o.syncErrorThrown=!1,o.syncErrorThrowable=!1,o.isStopped=!1,arguments.length){case 0:o.destination=a.a;break;case 1:if(!t){o.destination=a.a;break}if("object"==typeof t){t instanceof n?(o.syncErrorThrowable=t.syncErrorThrowable,o.destination=t,t.add(_assertThisInitialized(o))):(o.syncErrorThrowable=!0,o.destination=new u(_assertThisInitialized(o),t));break}default:o.syncErrorThrowable=!0,o.destination=new u(_assertThisInitialized(o),t,i,r)}return o}return _createClass(n,[{key:o.a,value:function(){return this}},{key:"next",value:function(t){this.isStopped||this._next(t)}},{key:"error",value:function(t){this.isStopped||(this.isStopped=!0,this._error(t))}},{key:"complete",value:function(){this.isStopped||(this.isStopped=!0,this._complete())}},{key:"unsubscribe",value:function(){this.closed||(this.isStopped=!0,_get(_getPrototypeOf(n.prototype),"unsubscribe",this).call(this))}},{key:"_next",value:function(t){this.destination.next(t)}},{key:"_error",value:function(t){this.destination.error(t),this.unsubscribe()}},{key:"_complete",value:function(){this.destination.complete(),this.unsubscribe()}},{key:"_unsubscribeAndRecycle",value:function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this}}],[{key:"create",value:function(t,e,i){var a=new n(t,e,i);return a.syncErrorThrowable=!1,a}}]),n}(r.a),u=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,r,o,s){var c,l;_classCallCheck(this,n),(c=e.call(this))._parentSubscriber=t;var u=_assertThisInitialized(c);return Object(i.a)(r)?l=r:r&&(l=r.next,o=r.error,s=r.complete,r!==a.a&&(u=Object.create(r),Object(i.a)(u.unsubscribe)&&c.add(u.unsubscribe.bind(u)),u.unsubscribe=c.unsubscribe.bind(_assertThisInitialized(c)))),c._context=u,c._next=l,c._error=o,c._complete=s,c}return _createClass(n,[{key:"next",value:function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;s.a.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}}},{key:"error",value:function(t){if(!this.isStopped){var e=this._parentSubscriber,n=s.a.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):Object(c.a)(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;Object(c.a)(t)}}}},{key:"complete",value:function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};s.a.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}}},{key:"__tryOrUnsub",value:function(t,e){try{t.call(this._context,e)}catch(n){if(this.unsubscribe(),s.a.useDeprecatedSynchronousErrorHandling)throw n;Object(c.a)(n)}}},{key:"__tryOrSetError",value:function(t,e,n){if(!s.a.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(i){return s.a.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=i,t.syncErrorThrown=!0,!0):(Object(c.a)(i),!0)}return!1}},{key:"_unsubscribe",value:function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()}}]),n}(l)},"8LU1":function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return a})),n.d(e,"d",(function(){return c})),n.d(e,"e",(function(){return l})),n.d(e,"f",(function(){return r}));var i=n("fXoL");function a(t){return null!=t&&""+t!="false"}function r(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return o(t)?Number(t):e}function o(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}function s(t){return Array.isArray(t)?t:[t]}function c(t){return null==t?"":"string"==typeof t?t:t+"px"}function l(t){return t instanceof i.l?t.nativeElement:t}},"8yBR":function(t,e,n){"use strict";n.d(e,"a",(function(){return g})),n.d(e,"b",(function(){return _})),n.d(e,"c",(function(){return w})),n.d(e,"d",(function(){return D})),n.d(e,"e",(function(){return O})),n.d(e,"f",(function(){return M})),n.d(e,"g",(function(){return h})),n.d(e,"h",(function(){return p})),n.d(e,"i",(function(){return y})),n.d(e,"j",(function(){return m})),n.d(e,"k",(function(){return k}));var i=n("FvrZ"),a=n("FKr1"),r=n("8LU1"),o=n("0EQZ"),s=n("2Vo4"),c=n("VRyK"),l=n("IzEk"),u=n("lJxs"),d=n("fXoL"),f=Object(a.F)(Object(a.C)(i.e)),h=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a){var r;return _classCallCheck(this,n),(r=e.call(this,t,i))._elementRef=t,r._tree=i,r.role="treeitem",r.tabIndex=Number(a)||0,r}return n}(f);return t.\u0275fac=function(e){return new(e||t)(d.Qb(d.l),d.Qb(i.c),d.bc("tabindex"))},t.\u0275dir=d.Lb({type:t,selectors:[["mat-tree-node"]],hostAttrs:[1,"mat-tree-node"],hostVars:3,hostBindings:function(t,e){2&t&&d.Eb("aria-expanded",e.isExpanded)("aria-level",e.level+1)("role",e.role)},inputs:{disabled:"disabled",tabIndex:"tabIndex",role:"role"},exportAs:["matTreeNode"],features:[d.Cb([{provide:i.e,useExisting:t}]),d.Ab]}),t}(),p=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return n}(i.f);return t.\u0275fac=function(e){return b(e||t)},t.\u0275dir=d.Lb({type:t,selectors:[["","matTreeNodeDef",""]],inputs:{when:["matTreeNodeDefWhen","when"],data:["matTreeNode","data"]},features:[d.Cb([{provide:i.f,useExisting:t}]),d.Ab]}),t}(),b=d.Yb(p),g=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a,r){var o;return _classCallCheck(this,n),(o=e.call(this,t,i,a))._elementRef=t,o._tree=i,o._differs=a,o._disabled=!1,o.tabIndex=Number(r)||0,o}return _createClass(n,[{key:"ngAfterContentInit",value:function(){_get(_getPrototypeOf(n.prototype),"ngAfterContentInit",this).call(this)}},{key:"ngOnDestroy",value:function(){_get(_getPrototypeOf(n.prototype),"ngOnDestroy",this).call(this)}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=Object(r.c)(t)}},{key:"tabIndex",get:function(){return this.disabled?-1:this._tabIndex},set:function(t){this._tabIndex=null!=t?t:0}}]),n}(i.b);return t.\u0275fac=function(e){return new(e||t)(d.Qb(d.l),d.Qb(i.c),d.Qb(d.v),d.bc("tabindex"))},t.\u0275dir=d.Lb({type:t,selectors:[["mat-nested-tree-node"]],hostAttrs:[1,"mat-nested-tree-node"],hostVars:2,hostBindings:function(t,e){2&t&&d.Eb("aria-expanded",e.isExpanded)("role",e.role)},inputs:{tabIndex:"tabIndex",disabled:"disabled",node:["matNestedTreeNode","node"]},exportAs:["matNestedTreeNode"],features:[d.Cb([{provide:i.b,useExisting:t},{provide:i.e,useExisting:t},{provide:i.a,useExisting:t}]),d.Ab]}),t}(),m=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return _createClass(n,[{key:"level",get:function(){return this._level},set:function(t){this._setLevelInput(t)}},{key:"indent",get:function(){return this._indent},set:function(t){this._setIndentInput(t)}}]),n}(i.h);return t.\u0275fac=function(e){return v(e||t)},t.\u0275dir=d.Lb({type:t,selectors:[["","matTreeNodePadding",""]],inputs:{level:["matTreeNodePadding","level"],indent:["matTreeNodePaddingIndent","indent"]},features:[d.Cb([{provide:i.h,useExisting:t}]),d.Ab]}),t}(),v=d.Yb(m),y=function(){var t=function t(e,n){_classCallCheck(this,t),this.viewContainer=e,this._node=n};return t.\u0275fac=function(e){return new(e||t)(d.Qb(d.T),d.Qb(i.a,8))},t.\u0275dir=d.Lb({type:t,selectors:[["","matTreeNodeOutlet",""]],features:[d.Cb([{provide:i.g,useExisting:t}])]}),t}(),_=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return n}(i.c);return t.\u0275fac=function(e){return C(e||t)},t.\u0275cmp=d.Kb({type:t,selectors:[["mat-tree"]],viewQuery:function(t,e){var n;1&t&&d.Kc(y,!0),2&t&&d.yc(n=d.ec())&&(e._nodeOutlet=n.first)},hostAttrs:["role","tree",1,"mat-tree"],exportAs:["matTree"],features:[d.Cb([{provide:i.c,useExisting:t}]),d.Ab],decls:1,vars:0,consts:[["matTreeNodeOutlet",""]],template:function(t,e){1&t&&d.Sb(0,0)},directives:[y],styles:[".mat-tree{display:block}.mat-tree-node{display:flex;align-items:center;flex:1;word-wrap:break-word}.mat-nested-tree-node{border-bottom-width:0}\n"],encapsulation:2}),t}(),C=d.Yb(_),k=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return _createClass(n,[{key:"recursive",get:function(){return this._recursive},set:function(t){this._recursive=Object(r.c)(t)}}]),n}(i.i);return t.\u0275fac=function(e){return x(e||t)},t.\u0275dir=d.Lb({type:t,selectors:[["","matTreeNodeToggle",""]],inputs:{recursive:["matTreeNodeToggleRecursive","recursive"]},features:[d.Cb([{provide:i.i,useExisting:t}]),d.Ab]}),t}(),x=d.Yb(k),O=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=d.Ob({type:t}),t.\u0275inj=d.Nb({factory:function(e){return new(e||t)},imports:[[i.d,a.k],a.k]}),t}(),D=function(){function t(e,n,i,a){_classCallCheck(this,t),this.transformFunction=e,this.getLevel=n,this.isExpandable=i,this.getChildren=a}return _createClass(t,[{key:"_flattenNode",value:function(t,e,n,i){var a=this,r=this.transformFunction(t,e);if(n.push(r),this.isExpandable(r)){var o=this.getChildren(t);o&&(Array.isArray(o)?this._flattenChildren(o,e,n,i):o.pipe(Object(l.a)(1)).subscribe((function(t){a._flattenChildren(t,e,n,i)})))}return n}},{key:"_flattenChildren",value:function(t,e,n,i){var a=this;t.forEach((function(r,o){var s=i.slice();s.push(o!=t.length-1),a._flattenNode(r,e+1,n,s)}))}},{key:"flattenNodes",value:function(t){var e=this,n=[];return t.forEach((function(t){return e._flattenNode(t,0,n,[])})),n}},{key:"expandFlattenedNodes",value:function(t,e){var n=this,i=[],a=[];return a[0]=!0,t.forEach((function(t){for(var r=!0,o=0;o<=n.getLevel(t);o++)r=r&&a[o];r&&i.push(t),n.isExpandable(t)&&(a[n.getLevel(t)+1]=e.isExpanded(t))})),i}}]),t}(),w=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var a,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return _classCallCheck(this,n),(a=e.call(this))._treeControl=t,a._treeFlattener=i,a._flattenedData=new s.a([]),a._expandedData=new s.a([]),a._data=new s.a(r),a}return _createClass(n,[{key:"connect",value:function(t){var e=this,n=[t.viewChange,this._treeControl.expansionModel.changed,this._flattenedData];return Object(c.a).apply(void 0,n).pipe(Object(u.a)((function(){return e._expandedData.next(e._treeFlattener.expandFlattenedNodes(e._flattenedData.value,e._treeControl)),e._expandedData.value})))}},{key:"disconnect",value:function(){}},{key:"data",get:function(){return this._data.value},set:function(t){this._data.next(t),this._flattenedData.next(this._treeFlattener.flattenNodes(this.data)),this._treeControl.dataNodes=this._flattenedData.value}}]),n}(o.b),M=function(t){_inherits(n,t);var e=_createSuper(n);function n(){var t;return _classCallCheck(this,n),(t=e.apply(this,arguments))._data=new s.a([]),t}return _createClass(n,[{key:"connect",value:function(t){var e=this;return Object(c.a)(t.viewChange,this._data).pipe(Object(u.a)((function(){return e.data})))}},{key:"disconnect",value:function(){}},{key:"data",get:function(){return this._data.value},set:function(t){this._data.next(t)}}]),n}(o.b)},"9ppp":function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(){function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t}()},A5z7:function(t,e,n){"use strict";n.d(e,"a",(function(){return M})),n.d(e,"b",(function(){return D})),n.d(e,"c",(function(){return W})),n.d(e,"d",(function(){return j})),n.d(e,"e",(function(){return S})),n.d(e,"f",(function(){return w})),n.d(e,"g",(function(){return E}));var i=n("FtGj"),a=n("fXoL"),r=n("FKr1"),o=n("8LU1"),s=n("ofXK"),c=n("R1ws"),l=n("XNiG"),u=n("VRyK"),d=n("IzEk"),f=n("1G5W"),h=n("JX91"),p=n("u47x"),b=n("0EQZ"),g=n("kmnG"),m=n("nLfN"),v=n("cH1L"),y=n("3Pt+"),_=["*"],C=new a.s("MatChipRemove"),k=new a.s("MatChipAvatar"),x=new a.s("MatChipTrailingIcon"),O=Object(r.F)(Object(r.A)(Object(r.B)((function t(e){_classCallCheck(this,t),this._elementRef=e})),"primary"),-1),D=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=a.Lb({type:t,selectors:[["mat-chip-avatar"],["","matChipAvatar",""]],hostAttrs:[1,"mat-chip-avatar"],features:[a.Cb([{provide:k,useExisting:t}])]}),t}(),w=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=a.Lb({type:t,selectors:[["mat-chip-trailing-icon"],["","matChipTrailingIcon",""]],hostAttrs:[1,"mat-chip-trailing-icon"],features:[a.Cb([{provide:x,useExisting:t}])]}),t}(),M=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,o,s,c,u,d,f){var h;return _classCallCheck(this,n),(h=e.call(this,t))._elementRef=t,h._ngZone=i,h._changeDetectorRef=u,h._hasFocus=!1,h.chipListSelectable=!0,h._chipListMultiple=!1,h._chipListDisabled=!1,h._selected=!1,h._selectable=!0,h._disabled=!1,h._removable=!0,h._onFocus=new l.a,h._onBlur=new l.a,h.selectionChange=new a.o,h.destroyed=new a.o,h.removed=new a.o,h._addHostClassName(),h._chipRippleTarget=(f||document).createElement("div"),h._chipRippleTarget.classList.add("mat-chip-ripple"),h._elementRef.nativeElement.appendChild(h._chipRippleTarget),h._chipRipple=new r.x(_assertThisInitialized(h),i,h._chipRippleTarget,o),h._chipRipple.setupTriggerEvents(t),h.rippleConfig=s||{},h._animationsDisabled="NoopAnimations"===c,h.tabIndex=null!=d&&parseInt(d)||-1,h}return _createClass(n,[{key:"_addHostClassName",value:function(){var t=this._elementRef.nativeElement;t.hasAttribute("mat-basic-chip")||"mat-basic-chip"===t.tagName.toLowerCase()?t.classList.add("mat-basic-chip"):t.classList.add("mat-standard-chip")}},{key:"ngOnDestroy",value:function(){this.destroyed.emit({chip:this}),this._chipRipple._removeTriggerEvents()}},{key:"select",value:function(){this._selected||(this._selected=!0,this._dispatchSelectionChange(),this._markForCheck())}},{key:"deselect",value:function(){this._selected&&(this._selected=!1,this._dispatchSelectionChange(),this._markForCheck())}},{key:"selectViaInteraction",value:function(){this._selected||(this._selected=!0,this._dispatchSelectionChange(!0),this._markForCheck())}},{key:"toggleSelected",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._selected=!this.selected,this._dispatchSelectionChange(t),this._markForCheck(),this.selected}},{key:"focus",value:function(){this._hasFocus||(this._elementRef.nativeElement.focus(),this._onFocus.next({chip:this})),this._hasFocus=!0}},{key:"remove",value:function(){this.removable&&this.removed.emit({chip:this})}},{key:"_handleClick",value:function(t){this.disabled?t.preventDefault():t.stopPropagation()}},{key:"_handleKeydown",value:function(t){if(!this.disabled)switch(t.keyCode){case i.d:case i.b:this.remove(),t.preventDefault();break;case i.q:this.selectable&&this.toggleSelected(!0),t.preventDefault()}}},{key:"_blur",value:function(){var t=this;this._ngZone.onStable.pipe(Object(d.a)(1)).subscribe((function(){t._ngZone.run((function(){t._hasFocus=!1,t._onBlur.next({chip:t})}))}))}},{key:"_dispatchSelectionChange",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.selectionChange.emit({source:this,isUserInput:t,selected:this._selected})}},{key:"_markForCheck",value:function(){this._changeDetectorRef&&this._changeDetectorRef.markForCheck()}},{key:"rippleDisabled",get:function(){return this.disabled||this.disableRipple||!!this.rippleConfig.disabled}},{key:"selected",get:function(){return this._selected},set:function(t){var e=Object(o.c)(t);e!==this._selected&&(this._selected=e,this._dispatchSelectionChange())}},{key:"value",get:function(){return void 0!==this._value?this._value:this._elementRef.nativeElement.textContent},set:function(t){this._value=t}},{key:"selectable",get:function(){return this._selectable&&this.chipListSelectable},set:function(t){this._selectable=Object(o.c)(t)}},{key:"disabled",get:function(){return this._chipListDisabled||this._disabled},set:function(t){this._disabled=Object(o.c)(t)}},{key:"removable",get:function(){return this._removable},set:function(t){this._removable=Object(o.c)(t)}},{key:"ariaSelected",get:function(){return this.selectable&&(this._chipListMultiple||this.selected)?this.selected.toString():null}}]),n}(O);return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(a.C),a.Qb(m.a),a.Qb(r.j,8),a.Qb(c.a,8),a.Qb(a.h),a.bc("tabindex"),a.Qb(s.e,8))},t.\u0275dir=a.Lb({type:t,selectors:[["mat-basic-chip"],["","mat-basic-chip",""],["mat-chip"],["","mat-chip",""]],contentQueries:function(t,e,n){var i;1&t&&(a.Jb(n,k,!0),a.Jb(n,x,!0),a.Jb(n,C,!0)),2&t&&(a.yc(i=a.ec())&&(e.avatar=i.first),a.yc(i=a.ec())&&(e.trailingIcon=i.first),a.yc(i=a.ec())&&(e.removeIcon=i.first))},hostAttrs:["role","option",1,"mat-chip","mat-focus-indicator"],hostVars:14,hostBindings:function(t,e){1&t&&a.dc("click",(function(t){return e._handleClick(t)}))("keydown",(function(t){return e._handleKeydown(t)}))("focus",(function(){return e.focus()}))("blur",(function(){return e._blur()})),2&t&&(a.Eb("tabindex",e.disabled?null:e.tabIndex)("disabled",e.disabled||null)("aria-disabled",e.disabled.toString())("aria-selected",e.ariaSelected),a.Ib("mat-chip-selected",e.selected)("mat-chip-with-avatar",e.avatar)("mat-chip-with-trailing-icon",e.trailingIcon||e.removeIcon)("mat-chip-disabled",e.disabled)("_mat-animation-noopable",e._animationsDisabled))},inputs:{color:"color",disableRipple:"disableRipple",tabIndex:"tabIndex",selected:"selected",value:"value",selectable:"selectable",disabled:"disabled",removable:"removable"},outputs:{selectionChange:"selectionChange",destroyed:"destroyed",removed:"removed"},exportAs:["matChip"],features:[a.Ab]}),t}(),S=function(){var t=function(){function t(e,n){_classCallCheck(this,t),this._parentChip=e,n&&"BUTTON"===n.nativeElement.nodeName&&n.nativeElement.setAttribute("type","button")}return _createClass(t,[{key:"_handleClick",value:function(t){var e=this._parentChip;e.removable&&!e.disabled&&e.remove(),t.stopPropagation()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(a.Qb(M),a.Qb(a.l))},t.\u0275dir=a.Lb({type:t,selectors:[["","matChipRemove",""]],hostAttrs:[1,"mat-chip-remove","mat-chip-trailing-icon"],hostBindings:function(t,e){1&t&&a.dc("click",(function(t){return e._handleClick(t)}))},features:[a.Cb([{provide:C,useExisting:t}])]}),t}(),I=new a.s("mat-chips-default-options"),P=Object(r.D)((function t(e,n,i,a){_classCallCheck(this,t),this._defaultErrorStateMatcher=e,this._parentForm=n,this._parentFormGroup=i,this.ngControl=a})),R=0,V=function t(e,n){_classCallCheck(this,t),this.source=e,this.value=n},j=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r,o,s,c,u){var d;return _classCallCheck(this,n),(d=e.call(this,c,o,s,u))._elementRef=t,d._changeDetectorRef=i,d._dir=r,d.ngControl=u,d.controlType="mat-chip-list",d._lastDestroyedChipIndex=null,d._destroyed=new l.a,d._uid="mat-chip-list-"+R++,d._tabIndex=0,d._userTabIndex=null,d._onTouched=function(){},d._onChange=function(){},d._multiple=!1,d._compareWith=function(t,e){return t===e},d._required=!1,d._disabled=!1,d.ariaOrientation="horizontal",d._selectable=!0,d.change=new a.o,d.valueChange=new a.o,d.ngControl&&(d.ngControl.valueAccessor=_assertThisInitialized(d)),d}return _createClass(n,[{key:"ngAfterContentInit",value:function(){var t=this;this._keyManager=new p.g(this.chips).withWrap().withVerticalOrientation().withHomeAndEnd().withHorizontalOrientation(this._dir?this._dir.value:"ltr"),this._dir&&this._dir.change.pipe(Object(f.a)(this._destroyed)).subscribe((function(e){return t._keyManager.withHorizontalOrientation(e)})),this._keyManager.tabOut.pipe(Object(f.a)(this._destroyed)).subscribe((function(){t._allowFocusEscape()})),this.chips.changes.pipe(Object(h.a)(null),Object(f.a)(this._destroyed)).subscribe((function(){t.disabled&&Promise.resolve().then((function(){t._syncChipsState()})),t._resetChips(),t._initializeSelection(),t._updateTabIndex(),t._updateFocusForDestroyedChips(),t.stateChanges.next()}))}},{key:"ngOnInit",value:function(){this._selectionModel=new b.c(this.multiple,void 0,!1),this.stateChanges.next()}},{key:"ngDoCheck",value:function(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==this._disabled&&(this.disabled=!!this.ngControl.disabled))}},{key:"ngOnDestroy",value:function(){this._destroyed.next(),this._destroyed.complete(),this.stateChanges.complete(),this._dropSubscriptions()}},{key:"registerInput",value:function(t){this._chipInput=t,this._elementRef.nativeElement.setAttribute("data-mat-chip-input",t.id)}},{key:"setDescribedByIds",value:function(t){this._ariaDescribedby=t.join(" ")}},{key:"writeValue",value:function(t){this.chips&&this._setSelectionByValue(t,!1)}},{key:"registerOnChange",value:function(t){this._onChange=t}},{key:"registerOnTouched",value:function(t){this._onTouched=t}},{key:"setDisabledState",value:function(t){this.disabled=t,this.stateChanges.next()}},{key:"onContainerClick",value:function(t){this._originatesFromChip(t)||this.focus()}},{key:"focus",value:function(t){this.disabled||this._chipInput&&this._chipInput.focused||(this.chips.length>0?(this._keyManager.setFirstItemActive(),this.stateChanges.next()):(this._focusInput(t),this.stateChanges.next()))}},{key:"_focusInput",value:function(t){this._chipInput&&this._chipInput.focus(t)}},{key:"_keydown",value:function(t){var e=t.target;t.keyCode===i.b&&this._isInputEmpty(e)?(this._keyManager.setLastItemActive(),t.preventDefault()):e&&e.classList.contains("mat-chip")&&(this._keyManager.onKeydown(t),this.stateChanges.next())}},{key:"_updateTabIndex",value:function(){this._tabIndex=this._userTabIndex||(0===this.chips.length?-1:0)}},{key:"_updateFocusForDestroyedChips",value:function(){if(null!=this._lastDestroyedChipIndex)if(this.chips.length){var t=Math.min(this._lastDestroyedChipIndex,this.chips.length-1);this._keyManager.setActiveItem(t)}else this.focus();this._lastDestroyedChipIndex=null}},{key:"_isValidIndex",value:function(t){return t>=0&&t<this.chips.length}},{key:"_isInputEmpty",value:function(t){return!(!t||"input"!==t.nodeName.toLowerCase()||t.value)}},{key:"_setSelectionByValue",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this._clearSelection(),this.chips.forEach((function(t){return t.deselect()})),Array.isArray(t))t.forEach((function(t){return e._selectValue(t,n)})),this._sortValues();else{var i=this._selectValue(t,n);i&&n&&this._keyManager.setActiveItem(i)}}},{key:"_selectValue",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this.chips.find((function(n){return null!=n.value&&e._compareWith(n.value,t)}));return i&&(n?i.selectViaInteraction():i.select(),this._selectionModel.select(i)),i}},{key:"_initializeSelection",value:function(){var t=this;Promise.resolve().then((function(){(t.ngControl||t._value)&&(t._setSelectionByValue(t.ngControl?t.ngControl.value:t._value,!1),t.stateChanges.next())}))}},{key:"_clearSelection",value:function(t){this._selectionModel.clear(),this.chips.forEach((function(e){e!==t&&e.deselect()})),this.stateChanges.next()}},{key:"_sortValues",value:function(){var t=this;this._multiple&&(this._selectionModel.clear(),this.chips.forEach((function(e){e.selected&&t._selectionModel.select(e)})),this.stateChanges.next())}},{key:"_propagateChanges",value:function(t){var e;e=Array.isArray(this.selected)?this.selected.map((function(t){return t.value})):this.selected?this.selected.value:t,this._value=e,this.change.emit(new V(this,e)),this.valueChange.emit(e),this._onChange(e),this._changeDetectorRef.markForCheck()}},{key:"_blur",value:function(){var t=this;this._hasFocusedChip()||this._keyManager.setActiveItem(-1),this.disabled||(this._chipInput?setTimeout((function(){t.focused||t._markAsTouched()})):this._markAsTouched())}},{key:"_markAsTouched",value:function(){this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next()}},{key:"_allowFocusEscape",value:function(){var t=this;-1!==this._tabIndex&&(this._tabIndex=-1,setTimeout((function(){t._tabIndex=t._userTabIndex||0,t._changeDetectorRef.markForCheck()})))}},{key:"_resetChips",value:function(){this._dropSubscriptions(),this._listenToChipsFocus(),this._listenToChipsSelection(),this._listenToChipsRemoved()}},{key:"_dropSubscriptions",value:function(){this._chipFocusSubscription&&(this._chipFocusSubscription.unsubscribe(),this._chipFocusSubscription=null),this._chipBlurSubscription&&(this._chipBlurSubscription.unsubscribe(),this._chipBlurSubscription=null),this._chipSelectionSubscription&&(this._chipSelectionSubscription.unsubscribe(),this._chipSelectionSubscription=null),this._chipRemoveSubscription&&(this._chipRemoveSubscription.unsubscribe(),this._chipRemoveSubscription=null)}},{key:"_listenToChipsSelection",value:function(){var t=this;this._chipSelectionSubscription=this.chipSelectionChanges.subscribe((function(e){e.source.selected?t._selectionModel.select(e.source):t._selectionModel.deselect(e.source),t.multiple||t.chips.forEach((function(e){!t._selectionModel.isSelected(e)&&e.selected&&e.deselect()})),e.isUserInput&&t._propagateChanges()}))}},{key:"_listenToChipsFocus",value:function(){var t=this;this._chipFocusSubscription=this.chipFocusChanges.subscribe((function(e){var n=t.chips.toArray().indexOf(e.chip);t._isValidIndex(n)&&t._keyManager.updateActiveItem(n),t.stateChanges.next()})),this._chipBlurSubscription=this.chipBlurChanges.subscribe((function(){t._blur(),t.stateChanges.next()}))}},{key:"_listenToChipsRemoved",value:function(){var t=this;this._chipRemoveSubscription=this.chipRemoveChanges.subscribe((function(e){var n=e.chip,i=t.chips.toArray().indexOf(e.chip);t._isValidIndex(i)&&n._hasFocus&&(t._lastDestroyedChipIndex=i)}))}},{key:"_originatesFromChip",value:function(t){for(var e=t.target;e&&e!==this._elementRef.nativeElement;){if(e.classList.contains("mat-chip"))return!0;e=e.parentElement}return!1}},{key:"_hasFocusedChip",value:function(){return this.chips&&this.chips.some((function(t){return t._hasFocus}))}},{key:"_syncChipsState",value:function(){var t=this;this.chips&&this.chips.forEach((function(e){e._chipListDisabled=t._disabled,e._chipListMultiple=t.multiple}))}},{key:"selected",get:function(){return this.multiple?this._selectionModel.selected:this._selectionModel.selected[0]}},{key:"role",get:function(){return this.empty?null:"listbox"}},{key:"multiple",get:function(){return this._multiple},set:function(t){this._multiple=Object(o.c)(t),this._syncChipsState()}},{key:"compareWith",get:function(){return this._compareWith},set:function(t){this._compareWith=t,this._selectionModel&&this._initializeSelection()}},{key:"value",get:function(){return this._value},set:function(t){this.writeValue(t),this._value=t}},{key:"id",get:function(){return this._chipInput?this._chipInput.id:this._uid}},{key:"required",get:function(){return this._required},set:function(t){this._required=Object(o.c)(t),this.stateChanges.next()}},{key:"placeholder",get:function(){return this._chipInput?this._chipInput.placeholder:this._placeholder},set:function(t){this._placeholder=t,this.stateChanges.next()}},{key:"focused",get:function(){return this._chipInput&&this._chipInput.focused||this._hasFocusedChip()}},{key:"empty",get:function(){return(!this._chipInput||this._chipInput.empty)&&(!this.chips||0===this.chips.length)}},{key:"shouldLabelFloat",get:function(){return!this.empty||this.focused}},{key:"disabled",get:function(){return this.ngControl?!!this.ngControl.disabled:this._disabled},set:function(t){this._disabled=Object(o.c)(t),this._syncChipsState()}},{key:"selectable",get:function(){return this._selectable},set:function(t){var e=this;this._selectable=Object(o.c)(t),this.chips&&this.chips.forEach((function(t){return t.chipListSelectable=e._selectable}))}},{key:"tabIndex",set:function(t){this._userTabIndex=t,this._tabIndex=t}},{key:"chipSelectionChanges",get:function(){return Object(u.a).apply(void 0,_toConsumableArray(this.chips.map((function(t){return t.selectionChange}))))}},{key:"chipFocusChanges",get:function(){return Object(u.a).apply(void 0,_toConsumableArray(this.chips.map((function(t){return t._onFocus}))))}},{key:"chipBlurChanges",get:function(){return Object(u.a).apply(void 0,_toConsumableArray(this.chips.map((function(t){return t._onBlur}))))}},{key:"chipRemoveChanges",get:function(){return Object(u.a).apply(void 0,_toConsumableArray(this.chips.map((function(t){return t.destroyed}))))}}]),n}(P);return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(a.h),a.Qb(v.c,8),a.Qb(y.w,8),a.Qb(y.m,8),a.Qb(r.d),a.Qb(y.t,10))},t.\u0275cmp=a.Kb({type:t,selectors:[["mat-chip-list"]],contentQueries:function(t,e,n){var i;1&t&&a.Jb(n,M,!0),2&t&&a.yc(i=a.ec())&&(e.chips=i)},hostAttrs:[1,"mat-chip-list"],hostVars:15,hostBindings:function(t,e){1&t&&a.dc("focus",(function(){return e.focus()}))("blur",(function(){return e._blur()}))("keydown",(function(t){return e._keydown(t)})),2&t&&(a.Zb("id",e._uid),a.Eb("tabindex",e.disabled?null:e._tabIndex)("aria-describedby",e._ariaDescribedby||null)("aria-required",e.role?e.required:null)("aria-disabled",e.disabled.toString())("aria-invalid",e.errorState)("aria-multiselectable",e.multiple)("role",e.role)("aria-orientation",e.ariaOrientation),a.Ib("mat-chip-list-disabled",e.disabled)("mat-chip-list-invalid",e.errorState)("mat-chip-list-required",e.required))},inputs:{ariaOrientation:["aria-orientation","ariaOrientation"],multiple:"multiple",compareWith:"compareWith",value:"value",required:"required",placeholder:"placeholder",disabled:"disabled",selectable:"selectable",tabIndex:"tabIndex",errorStateMatcher:"errorStateMatcher"},outputs:{change:"change",valueChange:"valueChange"},exportAs:["matChipList"],features:[a.Cb([{provide:g.d,useExisting:t}]),a.Ab],ngContentSelectors:_,decls:2,vars:0,consts:[[1,"mat-chip-list-wrapper"]],template:function(t,e){1&t&&(a.nc(),a.Wb(0,"div",0),a.mc(1),a.Vb())},styles:['.mat-chip{position:relative;box-sizing:border-box;-webkit-tap-highlight-color:transparent;transform:translateZ(0);border:none;-webkit-appearance:none;-moz-appearance:none}.mat-standard-chip{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);display:inline-flex;padding:7px 12px;border-radius:16px;align-items:center;cursor:default;min-height:32px;height:1px}._mat-animation-noopable.mat-standard-chip{transition:none;animation:none}.mat-standard-chip .mat-chip-remove.mat-icon{width:18px;height:18px}.mat-standard-chip::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;opacity:0;content:"";pointer-events:none;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-standard-chip:hover::after{opacity:.12}.mat-standard-chip:focus{outline:none}.mat-standard-chip:focus::after{opacity:.16}.cdk-high-contrast-active .mat-standard-chip{outline:solid 1px}.cdk-high-contrast-active .mat-standard-chip:focus{outline:dotted 2px}.mat-standard-chip.mat-chip-disabled::after{opacity:0}.mat-standard-chip.mat-chip-disabled .mat-chip-remove,.mat-standard-chip.mat-chip-disabled .mat-chip-trailing-icon{cursor:default}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar,.mat-standard-chip.mat-chip-with-avatar{padding-top:0;padding-bottom:0}.mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-right:8px;padding-left:0}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon.mat-chip-with-avatar{padding-left:8px;padding-right:0}.mat-standard-chip.mat-chip-with-trailing-icon{padding-top:7px;padding-bottom:7px;padding-right:8px;padding-left:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-trailing-icon{padding-left:8px;padding-right:12px}.mat-standard-chip.mat-chip-with-avatar{padding-left:0;padding-right:12px}[dir=rtl] .mat-standard-chip.mat-chip-with-avatar{padding-right:0;padding-left:12px}.mat-standard-chip .mat-chip-avatar{width:24px;height:24px;margin-right:8px;margin-left:4px}[dir=rtl] .mat-standard-chip .mat-chip-avatar{margin-left:8px;margin-right:4px}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{width:18px;height:18px;cursor:pointer}.mat-standard-chip .mat-chip-remove,.mat-standard-chip .mat-chip-trailing-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-standard-chip .mat-chip-remove,[dir=rtl] .mat-standard-chip .mat-chip-trailing-icon{margin-right:8px;margin-left:0}.mat-chip-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit;overflow:hidden}.mat-chip-list-wrapper{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;margin:-4px}.mat-chip-list-wrapper input.mat-input-element,.mat-chip-list-wrapper .mat-standard-chip{margin:4px}.mat-chip-list-stacked .mat-chip-list-wrapper{flex-direction:column;align-items:flex-start}.mat-chip-list-stacked .mat-chip-list-wrapper .mat-standard-chip{width:100%}.mat-chip-avatar{border-radius:50%;justify-content:center;align-items:center;display:flex;overflow:hidden;object-fit:cover}input.mat-chip-input{width:150px;margin:4px;flex:1 0 150px}\n'],encapsulation:2,changeDetection:0}),t}(),A=0,W=function(){var t=function(){function t(e,n){_classCallCheck(this,t),this._elementRef=e,this._defaultOptions=n,this.focused=!1,this._addOnBlur=!1,this.separatorKeyCodes=this._defaultOptions.separatorKeyCodes,this.chipEnd=new a.o,this.placeholder="",this.id="mat-chip-list-input-"+A++,this._disabled=!1,this._inputElement=this._elementRef.nativeElement}return _createClass(t,[{key:"ngOnChanges",value:function(){this._chipList.stateChanges.next()}},{key:"_keydown",value:function(t){t&&t.keyCode===i.r&&!Object(i.v)(t,"shiftKey")&&this._chipList._allowFocusEscape(),this._emitChipEnd(t)}},{key:"_blur",value:function(){this.addOnBlur&&this._emitChipEnd(),this.focused=!1,this._chipList.focused||this._chipList._blur(),this._chipList.stateChanges.next()}},{key:"_focus",value:function(){this.focused=!0,this._chipList.stateChanges.next()}},{key:"_emitChipEnd",value:function(t){!this._inputElement.value&&t&&this._chipList._keydown(t),t&&!this._isSeparatorKey(t)||(this.chipEnd.emit({input:this._inputElement,value:this._inputElement.value}),t&&t.preventDefault())}},{key:"_onInput",value:function(){this._chipList.stateChanges.next()}},{key:"focus",value:function(t){this._inputElement.focus(t)}},{key:"_isSeparatorKey",value:function(t){return!Object(i.v)(t)&&new Set(this.separatorKeyCodes).has(t.keyCode)}},{key:"chipList",set:function(t){t&&(this._chipList=t,this._chipList.registerInput(this))}},{key:"addOnBlur",get:function(){return this._addOnBlur},set:function(t){this._addOnBlur=Object(o.c)(t)}},{key:"disabled",get:function(){return this._disabled||this._chipList&&this._chipList.disabled},set:function(t){this._disabled=Object(o.c)(t)}},{key:"empty",get:function(){return!this._inputElement.value}}]),t}();return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(I))},t.\u0275dir=a.Lb({type:t,selectors:[["input","matChipInputFor",""]],hostAttrs:[1,"mat-chip-input","mat-input-element"],hostVars:5,hostBindings:function(t,e){1&t&&a.dc("keydown",(function(t){return e._keydown(t)}))("blur",(function(){return e._blur()}))("focus",(function(){return e._focus()}))("input",(function(){return e._onInput()})),2&t&&(a.Zb("id",e.id),a.Eb("disabled",e.disabled||null)("placeholder",e.placeholder||null)("aria-invalid",e._chipList&&e._chipList.ngControl?e._chipList.ngControl.invalid:null)("aria-required",e._chipList&&e._chipList.required||null))},inputs:{separatorKeyCodes:["matChipInputSeparatorKeyCodes","separatorKeyCodes"],placeholder:"placeholder",id:"id",chipList:["matChipInputFor","chipList"],addOnBlur:["matChipInputAddOnBlur","addOnBlur"],disabled:"disabled"},outputs:{chipEnd:"matChipInputTokenEnd"},exportAs:["matChipInput","matChipInputFor"],features:[a.Bb]}),t}(),T={separatorKeyCodes:[i.g]},E=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)},providers:[r.d,{provide:I,useValue:T}]}),t}()},A6w4:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var i=n("fXoL"),a=n("sYmb"),r=n("tk/3"),o=n("AXEc"),s=n("uqn4"),c=n("0IaG"),l=function(){var t=function(){function t(e,n,i,a,r){_classCallCheck(this,t),this.translate=e,this.http=n,this.notify=i,this.authService=a,this.dialog=r,this.screenWidth=1920}return _createClass(t,[{key:"getViewMode",value:function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||this.screenWidth<=768}},{key:"setScreenWidth",value:function(t){this.screenWidth=t}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.ac(a.e),i.ac(r.b),i.ac(o.a),i.ac(s.a),i.ac(c.b))},t.\u0275prov=i.Mb({token:t,factory:t.\u0275fac,providedIn:"root"}),t}()},AXEc:function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n("dNgK"),a=n("fXoL"),r=n("sYmb"),o=n("tyNb"),s=function(){var t=function(){function t(e){_classCallCheck(this,t),this.data=e}return _createClass(t,[{key:"dismiss",value:function(){this.data.close()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(a.Qb(i.a))},t.\u0275cmp=a.Kb({type:t,selectors:[["custom-snackbar"]],decls:7,vars:5,consts:[[1,"notif-container",3,"click"],[1,"notif-container-icon"],[1,"notif-container-content"],[1,"notif-container-content-msg"],[3,"innerHTML"]],template:function(t,e){1&t&&(a.Wb(0,"div",0),a.dc("click",(function(){return e.dismiss()})),a.Wb(1,"div",1),a.Rb(2,"i"),a.Vb(),a.Wb(3,"div",2),a.Wb(4,"div",3),a.Rb(5,"div",4),a.Rb(6,"div",4),a.Vb(),a.Vb(),a.Vb()),2&t&&(a.Db(2),a.Gb("fa fa-",e.data.icon," fa-2x"),a.Db(3),a.oc("innerHTML",e.data.url,a.Ec),a.Db(1),a.oc("innerHTML",e.data.message,a.Ec))},styles:[".notif-container[_ngcontent-%COMP%]{display:flex;align-items:center;padding-top:25px;padding-bottom:25px;cursor:pointer}.notif-container-icon[_ngcontent-%COMP%]{display:flex;width:50px;justify-content:center}.notif-container-content[_ngcontent-%COMP%]{display:flex;flex:1;justify-content:center}.notif-container-content-msg[_ngcontent-%COMP%]{display:flex;flex-direction:column} .mat-snack-bar-container.error-snackbar{color:#8e3e52;background:#fff;border:1px solid #8e3e52} .mat-snack-bar-container.success-snackbar{color:#135f7f;background:#fff;border:1px solid #135f7f}"]}),t}(),c=function(){var t=function(){function t(e,n,i){_classCallCheck(this,t),this.translate=e,this.router=n,this.snackBar=i}return _createClass(t,[{key:"success",value:function(t){var e=this.getMessageDuration(t,2e3),n=this.snackBar.openFromComponent(s,{duration:e,panelClass:"success-snackbar",verticalPosition:"top",data:{message:t,icon:"info-circle",close:function(){n.dismiss()}}})}},{key:"error",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.getMessageDuration(t,4e3),i=this.snackBar.openFromComponent(s,{duration:n,panelClass:"error-snackbar",verticalPosition:"top",data:{url:e,message:t,icon:"exclamation-triangle",close:function(){i.dismiss()}}})}},{key:"handleErrors",value:function(t){console.log(t),0===t.status&&"Unknown Error"===t.statusText?this.error(this.translate.instant("lang.connectionFailed")):void 0!==t.error?void 0!==t.error.errors?(void 0!==t.error.lang?this.error(this.translate.instant("lang."+t.error.lang)):"Document out of perimeter"===t.error.errors||"Resource out of perimeter"===t.error.errors?this.error(this.translate.instant("lang.documentOutOfPerimeter")):"Resources out of perimeter"===t.error.errors?this.error(this.translate.instant("lang.documentsOutOfPerimeter")):this.error(t.error.errors,t.url),403!==t.status&&404!==t.status||this.router.navigate(["/home"])):this.error(void 0!==t.error.exception?t.error.exception[0].message:void 0!==t.error.error?void 0!==t.error.error[0]?t.error.error[0].message:t.error.error.message:"".concat(t.status," : ").concat(t.statusText),t.url):this.error(t)}},{key:"handleSoftErrors",value:function(t){console.log(t),void 0!==t.error?void 0!==t.error.errors?void 0!==t.error.lang?this.error(this.translate.instant("lang."+t.error.lang)):"Document out of perimeter"===t.error.errors||"Resource out of perimeter"===t.error.errors?this.error(this.translate.instant("lang.documentOutOfPerimeter")):"Resources out of perimeter"===t.error.errors?this.error(this.translate.instant("lang.documentsOutOfPerimeter")):this.error(t.error.errors,t.url):this.error(void 0!==t.error.exception?t.error.exception[0].message:void 0!==t.error.error?void 0!==t.error.error[0]?t.error.error[0].message:t.error.error.message:"".concat(t.status," : ").concat(t.statusText),t.url):this.error(t)}},{key:"getMessageDuration",value:function(t,e){var n=t.length/25*1e3;return n<e?e:n>1e4?1e4:n}}]),t}();return t.\u0275fac=function(e){return new(e||t)(a.ac(r.e),a.ac(o.c),a.ac(i.b))},t.\u0275prov=a.Mb({token:t,factory:t.\u0275fac}),t}()},"B/XX":function(t,e,n){"use strict";n.d(e,"a",(function(){return y})),n.d(e,"b",(function(){return b})),n.d(e,"c",(function(){return g})),n.d(e,"d",(function(){return _})),n.d(e,"e",(function(){return x})),n.d(e,"f",(function(){return C})),n.d(e,"g",(function(){return k})),n.d(e,"h",(function(){return v}));var i=n("u47x"),a=n("cH1L"),r=n("8LU1"),o=n("FtGj"),s=n("ofXK"),c=n("fXoL"),l=n("XNiG"),u=n("LRne"),d=n("JX91"),f=n("1G5W");function h(t,e){1&t&&c.mc(0)}var p=["*"],b=function(){var t=function(){function t(e){_classCallCheck(this,t),this._elementRef=e}return _createClass(t,[{key:"focus",value:function(){this._elementRef.nativeElement.focus()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(c.Qb(c.l))},t.\u0275dir=c.Lb({type:t,selectors:[["","cdkStepHeader",""]],hostAttrs:["role","tab"]}),t}(),g=function(){var t=function t(e){_classCallCheck(this,t),this.template=e};return t.\u0275fac=function(e){return new(e||t)(c.Qb(c.P))},t.\u0275dir=c.Lb({type:t,selectors:[["","cdkStepLabel",""]]}),t}(),m=0,v=new c.s("STEPPER_GLOBAL_OPTIONS"),y=function(){var t=function(){function t(e,n){_classCallCheck(this,t),this._stepper=e,this.interacted=!1,this._editable=!0,this._optional=!1,this._completedOverride=null,this._customError=null,this._stepperOptions=n||{},this._displayDefaultIndicatorType=!1!==this._stepperOptions.displayDefaultIndicatorType,this._showError=!!this._stepperOptions.showError}return _createClass(t,[{key:"_getDefaultCompleted",value:function(){return this.stepControl?this.stepControl.valid&&this.interacted:this.interacted}},{key:"_getDefaultError",value:function(){return this.stepControl&&this.stepControl.invalid&&this.interacted}},{key:"select",value:function(){this._stepper.selected=this}},{key:"reset",value:function(){this.interacted=!1,null!=this._completedOverride&&(this._completedOverride=!1),null!=this._customError&&(this._customError=!1),this.stepControl&&this.stepControl.reset()}},{key:"ngOnChanges",value:function(){this._stepper._stateChanged()}},{key:"editable",get:function(){return this._editable},set:function(t){this._editable=Object(r.c)(t)}},{key:"optional",get:function(){return this._optional},set:function(t){this._optional=Object(r.c)(t)}},{key:"completed",get:function(){return null==this._completedOverride?this._getDefaultCompleted():this._completedOverride},set:function(t){this._completedOverride=Object(r.c)(t)}},{key:"hasError",get:function(){return null==this._customError?this._getDefaultError():this._customError},set:function(t){this._customError=Object(r.c)(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(c.Qb(Object(c.X)((function(){return _}))),c.Qb(v,8))},t.\u0275cmp=c.Kb({type:t,selectors:[["cdk-step"]],contentQueries:function(t,e,n){var i;1&t&&c.Jb(n,g,!0),2&t&&c.yc(i=c.ec())&&(e.stepLabel=i.first)},viewQuery:function(t,e){var n;1&t&&c.Kc(c.P,!0),2&t&&c.yc(n=c.ec())&&(e.content=n.first)},inputs:{editable:"editable",optional:"optional",completed:"completed",hasError:"hasError",stepControl:"stepControl",label:"label",errorMessage:"errorMessage",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],state:"state"},exportAs:["cdkStep"],features:[c.Bb],ngContentSelectors:p,decls:1,vars:0,template:function(t,e){1&t&&(c.nc(),c.Oc(0,h,1,0,"ng-template"))},encapsulation:2,changeDetection:0}),t}(),_=function(){var t=function(){function t(e,n,i,a){_classCallCheck(this,t),this._dir=e,this._changeDetectorRef=n,this._elementRef=i,this._destroyed=new l.a,this.steps=new c.H,this._linear=!1,this._selectedIndex=0,this.selectionChange=new c.o,this._orientation="horizontal",this._groupId=m++,this._document=a}return _createClass(t,[{key:"ngAfterContentInit",value:function(){var t=this;this._steps.changes.pipe(Object(d.a)(this._steps),Object(f.a)(this._destroyed)).subscribe((function(e){t.steps.reset(e.filter((function(e){return e._stepper===t}))),t.steps.notifyOnChanges()}))}},{key:"ngAfterViewInit",value:function(){var t=this;this._keyManager=new i.g(this._stepHeader).withWrap().withHomeAndEnd().withVerticalOrientation("vertical"===this._orientation),(this._dir?this._dir.change:Object(u.a)()).pipe(Object(d.a)(this._layoutDirection()),Object(f.a)(this._destroyed)).subscribe((function(e){return t._keyManager.withHorizontalOrientation(e)})),this._keyManager.updateActiveItem(this._selectedIndex),this.steps.changes.subscribe((function(){t.selected||(t._selectedIndex=Math.max(t._selectedIndex-1,0))}))}},{key:"ngOnDestroy",value:function(){this.steps.destroy(),this._destroyed.next(),this._destroyed.complete()}},{key:"next",value:function(){this.selectedIndex=Math.min(this._selectedIndex+1,this.steps.length-1)}},{key:"previous",value:function(){this.selectedIndex=Math.max(this._selectedIndex-1,0)}},{key:"reset",value:function(){this._updateSelectedItemIndex(0),this.steps.forEach((function(t){return t.reset()})),this._stateChanged()}},{key:"_getStepLabelId",value:function(t){return"cdk-step-label-".concat(this._groupId,"-").concat(t)}},{key:"_getStepContentId",value:function(t){return"cdk-step-content-".concat(this._groupId,"-").concat(t)}},{key:"_stateChanged",value:function(){this._changeDetectorRef.markForCheck()}},{key:"_getAnimationDirection",value:function(t){var e=t-this._selectedIndex;return e<0?"rtl"===this._layoutDirection()?"next":"previous":e>0?"rtl"===this._layoutDirection()?"previous":"next":"current"}},{key:"_getIndicatorType",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"number",n=this.steps.toArray()[t],i=this._isCurrentStep(t);return n._displayDefaultIndicatorType?this._getDefaultIndicatorLogic(n,i):this._getGuidelineLogic(n,i,e)}},{key:"_getDefaultIndicatorLogic",value:function(t,e){return t._showError&&t.hasError&&!e?"error":!t.completed||e?"number":t.editable?"edit":"done"}},{key:"_getGuidelineLogic",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"number";return t._showError&&t.hasError&&!e?"error":t.completed&&!e?"done":t.completed&&e?n:t.editable&&e?"edit":n}},{key:"_isCurrentStep",value:function(t){return this._selectedIndex===t}},{key:"_getFocusIndex",value:function(){return this._keyManager?this._keyManager.activeItemIndex:this._selectedIndex}},{key:"_updateSelectedItemIndex",value:function(t){var e=this.steps.toArray();this.selectionChange.emit({selectedIndex:t,previouslySelectedIndex:this._selectedIndex,selectedStep:e[t],previouslySelectedStep:e[this._selectedIndex]}),this._containsFocus()?this._keyManager.setActiveItem(t):this._keyManager.updateActiveItem(t),this._selectedIndex=t,this._stateChanged()}},{key:"_onKeydown",value:function(t){var e=Object(o.v)(t),n=t.keyCode,i=this._keyManager;null==i.activeItemIndex||e||n!==o.q&&n!==o.g?i.onKeydown(t):(this.selectedIndex=i.activeItemIndex,t.preventDefault())}},{key:"_anyControlsInvalidOrPending",value:function(t){var e=this.steps.toArray();return e[this._selectedIndex].interacted=!0,!!(this._linear&&t>=0)&&e.slice(0,t).some((function(t){var e=t.stepControl;return(e?e.invalid||e.pending||!t.interacted:!t.completed)&&!t.optional&&!t._completedOverride}))}},{key:"_layoutDirection",value:function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}},{key:"_containsFocus",value:function(){if(!this._document||!this._elementRef)return!1;var t=this._elementRef.nativeElement,e=this._document.activeElement;return t===e||t.contains(e)}},{key:"linear",get:function(){return this._linear},set:function(t){this._linear=Object(r.c)(t)}},{key:"selectedIndex",get:function(){return this._selectedIndex},set:function(t){var e=Object(r.f)(t);this.steps&&this._steps?this._selectedIndex!=e&&!this._anyControlsInvalidOrPending(e)&&(e>=this._selectedIndex||this.steps.toArray()[e].editable)&&this._updateSelectedItemIndex(t):this._selectedIndex=e}},{key:"selected",get:function(){return this.steps?this.steps.toArray()[this.selectedIndex]:void 0},set:function(t){this.selectedIndex=this.steps?this.steps.toArray().indexOf(t):-1}}]),t}();return t.\u0275fac=function(e){return new(e||t)(c.Qb(a.c,8),c.Qb(c.h),c.Qb(c.l),c.Qb(s.e))},t.\u0275dir=c.Lb({type:t,selectors:[["","cdkStepper",""]],contentQueries:function(t,e,n){var i;1&t&&(c.Jb(n,y,!0),c.Jb(n,b,!0)),2&t&&(c.yc(i=c.ec())&&(e._steps=i),c.yc(i=c.ec())&&(e._stepHeader=i))},inputs:{linear:"linear",selectedIndex:"selectedIndex",selected:"selected"},outputs:{selectionChange:"selectionChange"},exportAs:["cdkStepper"]}),t}(),C=function(){var t=function(){function t(e){_classCallCheck(this,t),this._stepper=e,this.type="submit"}return _createClass(t,[{key:"_handleClick",value:function(){this._stepper.next()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(c.Qb(_))},t.\u0275dir=c.Lb({type:t,selectors:[["button","cdkStepperNext",""]],hostVars:1,hostBindings:function(t,e){1&t&&c.dc("click",(function(){return e._handleClick()})),2&t&&c.Zb("type",e.type)},inputs:{type:"type"}}),t}(),k=function(){var t=function(){function t(e){_classCallCheck(this,t),this._stepper=e,this.type="button"}return _createClass(t,[{key:"_handleClick",value:function(){this._stepper.previous()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(c.Qb(_))},t.\u0275dir=c.Lb({type:t,selectors:[["button","cdkStepperPrevious",""]],hostVars:1,hostBindings:function(t,e){1&t&&c.dc("click",(function(){return e._handleClick()})),2&t&&c.Zb("type",e.type)},inputs:{type:"type"}}),t}(),x=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=c.Ob({type:t}),t.\u0275inj=c.Nb({factory:function(e){return new(e||t)},imports:[[a.a]]}),t}()},Cfvw:function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var i=n("HDdC"),a=n("SeVD"),r=n("quSY"),o=n("kJWO"),s=n("jZKg"),c=n("Lhse"),l=n("c2HN"),u=n("I55L");function d(t,e){return e?function(t,e){if(null!=t){if(function(t){return t&&"function"==typeof t[o.a]}(t))return function(t,e){return new i.a((function(n){var i=new r.a;return i.add(e.schedule((function(){var a=t[o.a]();i.add(a.subscribe({next:function(t){i.add(e.schedule((function(){return n.next(t)})))},error:function(t){i.add(e.schedule((function(){return n.error(t)})))},complete:function(){i.add(e.schedule((function(){return n.complete()})))}}))}))),i}))}(t,e);if(Object(l.a)(t))return function(t,e){return new i.a((function(n){var i=new r.a;return i.add(e.schedule((function(){return t.then((function(t){i.add(e.schedule((function(){n.next(t),i.add(e.schedule((function(){return n.complete()})))})))}),(function(t){i.add(e.schedule((function(){return n.error(t)})))}))}))),i}))}(t,e);if(Object(u.a)(t))return Object(s.a)(t,e);if(function(t){return t&&"function"==typeof t[c.a]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new i.a((function(n){var i,a=new r.a;return a.add((function(){i&&"function"==typeof i.return&&i.return()})),a.add(e.schedule((function(){i=t[c.a](),a.add(e.schedule((function(){if(!n.closed){var t,e;try{var a=i.next();t=a.value,e=a.done}catch(r){return void n.error(r)}e?n.complete():(n.next(t),this.schedule())}})))}))),a}))}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}(t,e):t instanceof i.a?t:new i.a(Object(a.a)(t))}},D0XW:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n("3N8a"),a=new(n("IjjT").a)(i.a)},DH7j:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=Array.isArray||function(t){return t&&"number"==typeof t.length}},Dh3D:function(t,e,n){"use strict";n.d(e,"a",(function(){return g})),n.d(e,"b",(function(){return x})),n.d(e,"c",(function(){return O}));var i=n("fXoL"),a=n("8LU1"),r=n("FKr1"),o=n("FtGj"),s=n("XNiG"),c=n("VRyK"),l=n("R0Ic"),u=n("ofXK"),d=n("u47x"),f=["mat-sort-header",""];function h(t,e){if(1&t){var n=i.Xb();i.Wb(0,"div",3),i.dc("@arrowPosition.start",(function(){return i.Dc(n),i.hc()._disableViewStateAnimation=!0}))("@arrowPosition.done",(function(){return i.Dc(n),i.hc()._disableViewStateAnimation=!1})),i.Rb(1,"div",4),i.Wb(2,"div",5),i.Rb(3,"div",6),i.Rb(4,"div",7),i.Rb(5,"div",8),i.Vb(),i.Vb()}if(2&t){var a=i.hc();i.oc("@arrowOpacity",a._getArrowViewState())("@arrowPosition",a._getArrowViewState())("@allowChildren",a._getArrowDirectionState()),i.Db(2),i.oc("@indicator",a._getArrowDirectionState()),i.Db(1),i.oc("@leftPointer",a._getArrowDirectionState()),i.Db(1),i.oc("@rightPointer",a._getArrowDirectionState())}}var p=["*"],b=Object(r.E)(Object(r.C)((function t(){_classCallCheck(this,t)}))),g=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(){var t;return _classCallCheck(this,n),(t=e.apply(this,arguments)).sortables=new Map,t._stateChanges=new s.a,t.start="asc",t._direction="",t.sortChange=new i.o,t}return _createClass(n,[{key:"register",value:function(t){this.sortables.set(t.id,t)}},{key:"deregister",value:function(t){this.sortables.delete(t.id)}},{key:"sort",value:function(t){this.active!=t.id?(this.active=t.id,this.direction=t.start?t.start:this.start):this.direction=this.getNextSortDirection(t),this.sortChange.emit({active:this.active,direction:this.direction})}},{key:"getNextSortDirection",value:function(t){if(!t)return"";var e,n,i,a=(e=t.start||this.start,n=null!=t.disableClear?t.disableClear:this.disableClear,i=["asc","desc"],"desc"==e&&i.reverse(),n||i.push(""),i),r=a.indexOf(this.direction)+1;return r>=a.length&&(r=0),a[r]}},{key:"ngOnInit",value:function(){this._markInitialized()}},{key:"ngOnChanges",value:function(){this._stateChanges.next()}},{key:"ngOnDestroy",value:function(){this._stateChanges.complete()}},{key:"direction",get:function(){return this._direction},set:function(t){this._direction=t}},{key:"disableClear",get:function(){return this._disableClear},set:function(t){this._disableClear=Object(a.c)(t)}}]),n}(b);return t.\u0275fac=function(e){return m(e||t)},t.\u0275dir=i.Lb({type:t,selectors:[["","matSort",""]],hostAttrs:[1,"mat-sort"],inputs:{disabled:["matSortDisabled","disabled"],start:["matSortStart","start"],direction:["matSortDirection","direction"],disableClear:["matSortDisableClear","disableClear"],active:["matSortActive","active"]},outputs:{sortChange:"matSortChange"},exportAs:["matSort"],features:[i.Ab,i.Bb]}),t}(),m=i.Yb(g),v=r.b.ENTERING+" "+r.a.STANDARD_CURVE,y={indicator:Object(l.n)("indicator",[Object(l.k)("active-asc, asc",Object(l.l)({transform:"translateY(0px)"})),Object(l.k)("active-desc, desc",Object(l.l)({transform:"translateY(10px)"})),Object(l.m)("active-asc <=> active-desc",Object(l.e)(v))]),leftPointer:Object(l.n)("leftPointer",[Object(l.k)("active-asc, asc",Object(l.l)({transform:"rotate(-45deg)"})),Object(l.k)("active-desc, desc",Object(l.l)({transform:"rotate(45deg)"})),Object(l.m)("active-asc <=> active-desc",Object(l.e)(v))]),rightPointer:Object(l.n)("rightPointer",[Object(l.k)("active-asc, asc",Object(l.l)({transform:"rotate(45deg)"})),Object(l.k)("active-desc, desc",Object(l.l)({transform:"rotate(-45deg)"})),Object(l.m)("active-asc <=> active-desc",Object(l.e)(v))]),arrowOpacity:Object(l.n)("arrowOpacity",[Object(l.k)("desc-to-active, asc-to-active, active",Object(l.l)({opacity:1})),Object(l.k)("desc-to-hint, asc-to-hint, hint",Object(l.l)({opacity:.54})),Object(l.k)("hint-to-desc, active-to-desc, desc, hint-to-asc, active-to-asc, asc, void",Object(l.l)({opacity:0})),Object(l.m)("* => asc, * => desc, * => active, * => hint, * => void",Object(l.e)("0ms")),Object(l.m)("* <=> *",Object(l.e)(v))]),arrowPosition:Object(l.n)("arrowPosition",[Object(l.m)("* => desc-to-hint, * => desc-to-active",Object(l.e)(v,Object(l.h)([Object(l.l)({transform:"translateY(-25%)"}),Object(l.l)({transform:"translateY(0)"})]))),Object(l.m)("* => hint-to-desc, * => active-to-desc",Object(l.e)(v,Object(l.h)([Object(l.l)({transform:"translateY(0)"}),Object(l.l)({transform:"translateY(25%)"})]))),Object(l.m)("* => asc-to-hint, * => asc-to-active",Object(l.e)(v,Object(l.h)([Object(l.l)({transform:"translateY(25%)"}),Object(l.l)({transform:"translateY(0)"})]))),Object(l.m)("* => hint-to-asc, * => active-to-asc",Object(l.e)(v,Object(l.h)([Object(l.l)({transform:"translateY(0)"}),Object(l.l)({transform:"translateY(-25%)"})]))),Object(l.k)("desc-to-hint, asc-to-hint, hint, desc-to-active, asc-to-active, active",Object(l.l)({transform:"translateY(0)"})),Object(l.k)("hint-to-desc, active-to-desc, desc",Object(l.l)({transform:"translateY(-25%)"})),Object(l.k)("hint-to-asc, active-to-asc, asc",Object(l.l)({transform:"translateY(25%)"}))]),allowChildren:Object(l.n)("allowChildren",[Object(l.m)("* <=> *",[Object(l.i)("@*",Object(l.f)(),{optional:!0})])])},_=function(){var t=function t(){_classCallCheck(this,t),this.changes=new s.a,this.sortButtonLabel=function(t){return"Change sorting for "+t}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(i.Mb)({factory:function(){return new t},token:t,providedIn:"root"}),t}(),C={provide:_,deps:[[new i.D,new i.N,_]],useFactory:function(t){return t||new _}},k=Object(r.C)((function t(){_classCallCheck(this,t)})),x=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a,r,o,s){var l;return _classCallCheck(this,n),(l=e.call(this))._intl=t,l._sort=a,l._columnDef=r,l._focusMonitor=o,l._elementRef=s,l._showIndicatorHint=!1,l._arrowDirection="",l._disableViewStateAnimation=!1,l.arrowPosition="after",l._rerenderSubscription=Object(c.a)(a.sortChange,a._stateChanges,t.changes).subscribe((function(){l._isSorted()&&l._updateArrowDirection(),!l._isSorted()&&l._viewState&&"active"===l._viewState.toState&&(l._disableViewStateAnimation=!1,l._setAnimationTransitionState({fromState:"active",toState:l._arrowDirection})),i.markForCheck()})),l}return _createClass(n,[{key:"ngOnInit",value:function(){!this.id&&this._columnDef&&(this.id=this._columnDef.name),this._updateArrowDirection(),this._setAnimationTransitionState({toState:this._isSorted()?"active":this._arrowDirection}),this._sort.register(this)}},{key:"ngAfterViewInit",value:function(){var t=this;this._focusMonitor.monitor(this._elementRef,!0).subscribe((function(e){return t._setIndicatorHintVisible(!!e)}))}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef),this._sort.deregister(this),this._rerenderSubscription.unsubscribe()}},{key:"_setIndicatorHintVisible",value:function(t){this._isDisabled()&&t||(this._showIndicatorHint=t,this._isSorted()||(this._updateArrowDirection(),this._setAnimationTransitionState(this._showIndicatorHint?{fromState:this._arrowDirection,toState:"hint"}:{fromState:"hint",toState:this._arrowDirection})))}},{key:"_setAnimationTransitionState",value:function(t){this._viewState=t,this._disableViewStateAnimation&&(this._viewState={toState:t.toState})}},{key:"_toggleOnInteraction",value:function(){this._sort.sort(this),"hint"!==this._viewState.toState&&"active"!==this._viewState.toState||(this._disableViewStateAnimation=!0);var t=this._isSorted()?{fromState:this._arrowDirection,toState:"active"}:{fromState:"active",toState:this._arrowDirection};this._setAnimationTransitionState(t),this._showIndicatorHint=!1}},{key:"_handleClick",value:function(){this._isDisabled()||this._toggleOnInteraction()}},{key:"_handleKeydown",value:function(t){this._isDisabled()||t.keyCode!==o.q&&t.keyCode!==o.g||(t.preventDefault(),this._toggleOnInteraction())}},{key:"_isSorted",value:function(){return this._sort.active==this.id&&("asc"===this._sort.direction||"desc"===this._sort.direction)}},{key:"_getArrowDirectionState",value:function(){return"".concat(this._isSorted()?"active-":"").concat(this._arrowDirection)}},{key:"_getArrowViewState",value:function(){var t=this._viewState.fromState;return(t?t+"-to-":"")+this._viewState.toState}},{key:"_updateArrowDirection",value:function(){this._arrowDirection=this._isSorted()?this._sort.direction:this.start||this._sort.start}},{key:"_isDisabled",value:function(){return this._sort.disabled||this.disabled}},{key:"_getAriaSortAttribute",value:function(){return this._isSorted()?"asc"==this._sort.direction?"ascending":"descending":"none"}},{key:"_renderArrow",value:function(){return!this._isDisabled()||this._isSorted()}},{key:"disableClear",get:function(){return this._disableClear},set:function(t){this._disableClear=Object(a.c)(t)}}]),n}(k);return t.\u0275fac=function(e){return new(e||t)(i.Qb(_),i.Qb(i.h),i.Qb(g,8),i.Qb("MAT_SORT_HEADER_COLUMN_DEF",8),i.Qb(d.h),i.Qb(i.l))},t.\u0275cmp=i.Kb({type:t,selectors:[["","mat-sort-header",""]],hostAttrs:[1,"mat-sort-header"],hostVars:3,hostBindings:function(t,e){1&t&&i.dc("click",(function(){return e._handleClick()}))("keydown",(function(t){return e._handleKeydown(t)}))("mouseenter",(function(){return e._setIndicatorHintVisible(!0)}))("mouseleave",(function(){return e._setIndicatorHintVisible(!1)})),2&t&&(i.Eb("aria-sort",e._getAriaSortAttribute()),i.Ib("mat-sort-header-disabled",e._isDisabled()))},inputs:{disabled:"disabled",arrowPosition:"arrowPosition",disableClear:"disableClear",id:["mat-sort-header","id"],start:"start"},exportAs:["matSortHeader"],features:[i.Ab],attrs:f,ngContentSelectors:p,decls:4,vars:6,consts:[["role","button",1,"mat-sort-header-container","mat-focus-indicator"],[1,"mat-sort-header-content"],["class","mat-sort-header-arrow",4,"ngIf"],[1,"mat-sort-header-arrow"],[1,"mat-sort-header-stem"],[1,"mat-sort-header-indicator"],[1,"mat-sort-header-pointer-left"],[1,"mat-sort-header-pointer-right"],[1,"mat-sort-header-pointer-middle"]],template:function(t,e){1&t&&(i.nc(),i.Wb(0,"div",0),i.Wb(1,"div",1),i.mc(2),i.Vb(),i.Oc(3,h,6,6,"div",2),i.Vb()),2&t&&(i.Ib("mat-sort-header-sorted",e._isSorted())("mat-sort-header-position-before","before"==e.arrowPosition),i.Eb("tabindex",e._isDisabled()?null:0),i.Db(3),i.oc("ngIf",e._renderArrow()))},directives:[u.t],styles:[".mat-sort-header-container{display:flex;cursor:pointer;align-items:center;letter-spacing:normal;outline:0}[mat-sort-header].cdk-keyboard-focused .mat-sort-header-container,[mat-sort-header].cdk-program-focused .mat-sort-header-container{border-bottom:solid 1px currentColor}.mat-sort-header-disabled .mat-sort-header-container{cursor:default}.mat-sort-header-content{text-align:center;display:flex;align-items:center}.mat-sort-header-position-before{flex-direction:row-reverse}.mat-sort-header-arrow{height:12px;width:12px;min-width:12px;position:relative;display:flex;opacity:0}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .mat-sort-header-arrow{margin:0 6px 0 0}.mat-sort-header-stem{background:currentColor;height:10px;width:2px;margin:auto;display:flex;align-items:center}.cdk-high-contrast-active .mat-sort-header-stem{width:0;border-left:solid 2px}.mat-sort-header-indicator{width:100%;height:2px;display:flex;align-items:center;position:absolute;top:0;left:0}.mat-sort-header-pointer-middle{margin:auto;height:2px;width:2px;background:currentColor;transform:rotate(45deg)}.cdk-high-contrast-active .mat-sort-header-pointer-middle{width:0;height:0;border-top:solid 2px;border-left:solid 2px}.mat-sort-header-pointer-left,.mat-sort-header-pointer-right{background:currentColor;width:6px;height:2px;position:absolute;top:0}.cdk-high-contrast-active .mat-sort-header-pointer-left,.cdk-high-contrast-active .mat-sort-header-pointer-right{width:0;height:0;border-left:solid 6px;border-top:solid 2px}.mat-sort-header-pointer-left{transform-origin:right;left:0}.mat-sort-header-pointer-right{transform-origin:left;right:0}\n"],encapsulation:2,data:{animation:[y.indicator,y.leftPointer,y.rightPointer,y.arrowOpacity,y.arrowPosition,y.allowChildren]},changeDetection:0}),t}(),O=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=i.Ob({type:t}),t.\u0275inj=i.Nb({factory:function(e){return new(e||t)},providers:[C],imports:[[u.c]]}),t}()},EY2u:function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return r}));var i=n("HDdC"),a=new i.a((function(t){return t.complete()}));function r(t){return t?function(t){return new i.a((function(e){return t.schedule((function(){return e.complete()}))}))}(t):a}},FKr1:function(t,e,n){"use strict";n.d(e,"a",(function(){return _})),n.d(e,"b",(function(){return C})),n.d(e,"c",(function(){return j})),n.d(e,"d",(function(){return q})),n.d(e,"e",(function(){return A})),n.d(e,"f",(function(){return V})),n.d(e,"g",(function(){return Tt})),n.d(e,"h",(function(){return Ot})),n.d(e,"i",(function(){return It})),n.d(e,"j",(function(){return bt})),n.d(e,"k",(function(){return O})),n.d(e,"l",(function(){return K})),n.d(e,"m",(function(){return ct})),n.d(e,"n",(function(){return X})),n.d(e,"o",(function(){return Dt})),n.d(e,"p",(function(){return Rt})),n.d(e,"q",(function(){return Wt})),n.d(e,"r",(function(){return St})),n.d(e,"s",(function(){return vt})),n.d(e,"t",(function(){return yt})),n.d(e,"u",(function(){return gt})),n.d(e,"v",(function(){return mt})),n.d(e,"w",(function(){return H})),n.d(e,"x",(function(){return pt})),n.d(e,"y",(function(){return Vt})),n.d(e,"z",(function(){return jt})),n.d(e,"A",(function(){return w})),n.d(e,"B",(function(){return M})),n.d(e,"C",(function(){return D})),n.d(e,"D",(function(){return I})),n.d(e,"E",(function(){return P})),n.d(e,"F",(function(){return S})),n.d(e,"G",(function(){return Y}));var i=n("fXoL"),a=n("u47x"),r=n("cH1L"),o=new i.S("10.2.7"),s=n("ofXK"),c=n("8LU1"),l=n("XNiG"),u=n("HDdC"),d=n("nLfN"),f=n("JX91"),h=n("R1ws"),p=n("FtGj"),b=["*",[["mat-option"],["ng-container"]]],g=["*","mat-option, ng-container"];function m(t,e){if(1&t&&i.Rb(0,"mat-pseudo-checkbox",3),2&t){var n=i.hc();i.oc("state",n.selected?"checked":"unchecked")("disabled",n.disabled)}}var v,y=["*"],_=function(){var t=function t(){_classCallCheck(this,t)};return t.STANDARD_CURVE="cubic-bezier(0.4,0.0,0.2,1)",t.DECELERATION_CURVE="cubic-bezier(0.0,0.0,0.2,1)",t.ACCELERATION_CURVE="cubic-bezier(0.4,0.0,1,1)",t.SHARP_CURVE="cubic-bezier(0.4,0.0,0.6,1)",t}(),C=function(){var t=function t(){_classCallCheck(this,t)};return t.COMPLEX="375ms",t.ENTERING="225ms",t.EXITING="195ms",t}(),k=new i.S("10.2.7"),x=new i.s("mat-sanity-checks",{providedIn:"root",factory:function(){return!0}}),O=((v=function(){function t(e,n,i){_classCallCheck(this,t),this._hasDoneGlobalChecks=!1,this._document=i,e._applyBodyHighContrastModeCssClasses(),this._sanityChecks=n,this._hasDoneGlobalChecks||(this._checkDoctypeIsDefined(),this._checkThemeIsPresent(),this._checkCdkVersionMatch(),this._hasDoneGlobalChecks=!0)}return _createClass(t,[{key:"_getDocument",value:function(){var t=this._document||document;return"object"==typeof t&&t?t:null}},{key:"_getWindow",value:function(){var t=this._getDocument(),e=(null==t?void 0:t.defaultView)||window;return"object"==typeof e&&e?e:null}},{key:"_checksAreEnabled",value:function(){return Object(i.Z)()&&!this._isTestEnv()}},{key:"_isTestEnv",value:function(){var t=this._getWindow();return t&&(t.__karma__||t.jasmine)}},{key:"_checkDoctypeIsDefined",value:function(){var t=this._checksAreEnabled()&&(!0===this._sanityChecks||this._sanityChecks.doctype),e=this._getDocument();t&&e&&!e.doctype&&console.warn("Current document does not have a doctype. This may cause some Angular Material components not to behave as expected.")}},{key:"_checkThemeIsPresent",value:function(){var t=!this._checksAreEnabled()||!1===this._sanityChecks||!this._sanityChecks.theme,e=this._getDocument();if(!t&&e&&e.body&&"function"==typeof getComputedStyle){var n=e.createElement("div");n.classList.add("mat-theme-loaded-marker"),e.body.appendChild(n);var i=getComputedStyle(n);i&&"none"!==i.display&&console.warn("Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming"),e.body.removeChild(n)}}},{key:"_checkCdkVersionMatch",value:function(){this._checksAreEnabled()&&(!0===this._sanityChecks||this._sanityChecks.version)&&k.full!==o.full&&console.warn("The Angular Material version ("+k.full+") does not match the Angular CDK version ("+o.full+").\nPlease ensure the versions of these two packages exactly match.")}}]),t}()).\u0275mod=i.Ob({type:v}),v.\u0275inj=i.Nb({factory:function(t){return new(t||v)(i.ac(a.j),i.ac(x,8),i.ac(s.e,8))},imports:[[r.a],r.a]}),v);function D(t){return function(t){_inherits(n,t);var e=_createSuper(n);function n(){var t;_classCallCheck(this,n);for(var i=arguments.length,a=new Array(i),r=0;r<i;r++)a[r]=arguments[r];return(t=e.call.apply(e,[this].concat(a)))._disabled=!1,t}return _createClass(n,[{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=Object(c.c)(t)}}]),n}(t)}function w(t,e){return function(t){_inherits(i,t);var n=_createSuper(i);function i(){var t;_classCallCheck(this,i);for(var a=arguments.length,r=new Array(a),o=0;o<a;o++)r[o]=arguments[o];return(t=n.call.apply(n,[this].concat(r))).defaultColor=e,t.color=e,t}return _createClass(i,[{key:"color",get:function(){return this._color},set:function(t){var e=t||this.defaultColor;e!==this._color&&(this._color&&this._elementRef.nativeElement.classList.remove("mat-"+this._color),e&&this._elementRef.nativeElement.classList.add("mat-"+e),this._color=e)}}]),i}(t)}function M(t){return function(t){_inherits(n,t);var e=_createSuper(n);function n(){var t;_classCallCheck(this,n);for(var i=arguments.length,a=new Array(i),r=0;r<i;r++)a[r]=arguments[r];return(t=e.call.apply(e,[this].concat(a)))._disableRipple=!1,t}return _createClass(n,[{key:"disableRipple",get:function(){return this._disableRipple},set:function(t){this._disableRipple=Object(c.c)(t)}}]),n}(t)}function S(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return function(t){_inherits(i,t);var n=_createSuper(i);function i(){var t;_classCallCheck(this,i);for(var a=arguments.length,r=new Array(a),o=0;o<a;o++)r[o]=arguments[o];return(t=n.call.apply(n,[this].concat(r)))._tabIndex=e,t.defaultTabIndex=e,t}return _createClass(i,[{key:"tabIndex",get:function(){return this.disabled?-1:this._tabIndex},set:function(t){this._tabIndex=null!=t?Object(c.f)(t):this.defaultTabIndex}}]),i}(t)}function I(t){return function(t){_inherits(n,t);var e=_createSuper(n);function n(){var t;_classCallCheck(this,n);for(var i=arguments.length,a=new Array(i),r=0;r<i;r++)a[r]=arguments[r];return(t=e.call.apply(e,[this].concat(a))).errorState=!1,t.stateChanges=new l.a,t}return _createClass(n,[{key:"updateErrorState",value:function(){var t=this.errorState,e=(this.errorStateMatcher||this._defaultErrorStateMatcher).isErrorState(this.ngControl?this.ngControl.control:null,this._parentFormGroup||this._parentForm);e!==t&&(this.errorState=e,this.stateChanges.next())}}]),n}(t)}function P(t){return function(t){_inherits(n,t);var e=_createSuper(n);function n(){var t;_classCallCheck(this,n);for(var i=arguments.length,a=new Array(i),r=0;r<i;r++)a[r]=arguments[r];return(t=e.call.apply(e,[this].concat(a)))._isInitialized=!1,t._pendingSubscribers=[],t.initialized=new u.a((function(e){t._isInitialized?t._notifySubscriber(e):t._pendingSubscribers.push(e)})),t}return _createClass(n,[{key:"_markInitialized",value:function(){this._isInitialized=!0,this._pendingSubscribers.forEach(this._notifySubscriber),this._pendingSubscribers=null}},{key:"_notifySubscriber",value:function(t){t.next(),t.complete()}}]),n}(t)}var R,V=new i.s("MAT_DATE_LOCALE",{providedIn:"root",factory:function(){return Object(i.Y)(i.x)}}),j=function(){function t(){_classCallCheck(this,t),this._localeChanges=new l.a,this.localeChanges=this._localeChanges}return _createClass(t,[{key:"getValidDateOrNull",value:function(t){return this.isDateInstance(t)&&this.isValid(t)?t:null}},{key:"deserialize",value:function(t){return null==t||this.isDateInstance(t)&&this.isValid(t)?t:this.invalid()}},{key:"setLocale",value:function(t){this.locale=t,this._localeChanges.next()}},{key:"compareDate",value:function(t,e){return this.getYear(t)-this.getYear(e)||this.getMonth(t)-this.getMonth(e)||this.getDate(t)-this.getDate(e)}},{key:"sameDate",value:function(t,e){if(t&&e){var n=this.isValid(t),i=this.isValid(e);return n&&i?!this.compareDate(t,e):n==i}return t==e}},{key:"clampDate",value:function(t,e,n){return e&&this.compareDate(t,e)<0?e:n&&this.compareDate(t,n)>0?n:t}}]),t}(),A=new i.s("mat-date-formats");try{R="undefined"!=typeof Intl}catch(Et){R=!1}var W={long:["January","February","March","April","May","June","July","August","September","October","November","December"],short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],narrow:["J","F","M","A","M","J","J","A","S","O","N","D"]},T=L(31,(function(t){return String(t+1)})),E={long:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],narrow:["S","M","T","W","T","F","S"]},F=/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;function L(t,e){for(var n=Array(t),i=0;i<t;i++)n[i]=e(i);return n}var Q,N,z,B,U,H=((N=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var a,r;return _classCallCheck(this,n),(r=e.call(this)).useUtcForDisplay=!0,_get((a=_assertThisInitialized(r),_getPrototypeOf(n.prototype)),"setLocale",a).call(a,t),r.useUtcForDisplay=!i.TRIDENT,r._clampDate=i.TRIDENT||i.EDGE,r}return _createClass(n,[{key:"getYear",value:function(t){return t.getFullYear()}},{key:"getMonth",value:function(t){return t.getMonth()}},{key:"getDate",value:function(t){return t.getDate()}},{key:"getDayOfWeek",value:function(t){return t.getDay()}},{key:"getMonthNames",value:function(t){var e=this;if(R){var n=new Intl.DateTimeFormat(this.locale,{month:t,timeZone:"utc"});return L(12,(function(t){return e._stripDirectionalityCharacters(e._format(n,new Date(2017,t,1)))}))}return W[t]}},{key:"getDateNames",value:function(){var t=this;if(R){var e=new Intl.DateTimeFormat(this.locale,{day:"numeric",timeZone:"utc"});return L(31,(function(n){return t._stripDirectionalityCharacters(t._format(e,new Date(2017,0,n+1)))}))}return T}},{key:"getDayOfWeekNames",value:function(t){var e=this;if(R){var n=new Intl.DateTimeFormat(this.locale,{weekday:t,timeZone:"utc"});return L(7,(function(t){return e._stripDirectionalityCharacters(e._format(n,new Date(2017,0,t+1)))}))}return E[t]}},{key:"getYearName",value:function(t){if(R){var e=new Intl.DateTimeFormat(this.locale,{year:"numeric",timeZone:"utc"});return this._stripDirectionalityCharacters(this._format(e,t))}return String(this.getYear(t))}},{key:"getFirstDayOfWeek",value:function(){return 0}},{key:"getNumDaysInMonth",value:function(t){return this.getDate(this._createDateWithOverflow(this.getYear(t),this.getMonth(t)+1,0))}},{key:"clone",value:function(t){return new Date(t.getTime())}},{key:"createDate",value:function(t,e,n){var i=this._createDateWithOverflow(t,e,n);return i.getMonth(),i}},{key:"today",value:function(){return new Date}},{key:"parse",value:function(t){return"number"==typeof t?new Date(t):t?new Date(Date.parse(t)):null}},{key:"format",value:function(t,e){if(!this.isValid(t))throw Error("NativeDateAdapter: Cannot format invalid date.");if(R){this._clampDate&&(t.getFullYear()<1||t.getFullYear()>9999)&&(t=this.clone(t)).setFullYear(Math.max(1,Math.min(9999,t.getFullYear()))),e=Object.assign(Object.assign({},e),{timeZone:"utc"});var n=new Intl.DateTimeFormat(this.locale,e);return this._stripDirectionalityCharacters(this._format(n,t))}return this._stripDirectionalityCharacters(t.toDateString())}},{key:"addCalendarYears",value:function(t,e){return this.addCalendarMonths(t,12*e)}},{key:"addCalendarMonths",value:function(t,e){var n=this._createDateWithOverflow(this.getYear(t),this.getMonth(t)+e,this.getDate(t));return this.getMonth(n)!=((this.getMonth(t)+e)%12+12)%12&&(n=this._createDateWithOverflow(this.getYear(n),this.getMonth(n),0)),n}},{key:"addCalendarDays",value:function(t,e){return this._createDateWithOverflow(this.getYear(t),this.getMonth(t),this.getDate(t)+e)}},{key:"toIso8601",value:function(t){return[t.getUTCFullYear(),this._2digit(t.getUTCMonth()+1),this._2digit(t.getUTCDate())].join("-")}},{key:"deserialize",value:function(t){if("string"==typeof t){if(!t)return null;if(F.test(t)){var e=new Date(t);if(this.isValid(e))return e}}return _get(_getPrototypeOf(n.prototype),"deserialize",this).call(this,t)}},{key:"isDateInstance",value:function(t){return t instanceof Date}},{key:"isValid",value:function(t){return!isNaN(t.getTime())}},{key:"invalid",value:function(){return new Date(NaN)}},{key:"_createDateWithOverflow",value:function(t,e,n){var i=new Date;return i.setFullYear(t,e,n),i.setHours(0,0,0,0),i}},{key:"_2digit",value:function(t){return("00"+t).slice(-2)}},{key:"_stripDirectionalityCharacters",value:function(t){return t.replace(/[\u200e\u200f]/g,"")}},{key:"_format",value:function(t,e){var n=new Date;return n.setUTCFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setUTCHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),t.format(n)}}]),n}(j)).\u0275fac=function(t){return new(t||N)(i.ac(V,8),i.ac(d.a))},N.\u0275prov=i.Mb({token:N,factory:N.\u0275fac}),N),G=((Q=function t(){_classCallCheck(this,t)}).\u0275mod=i.Ob({type:Q}),Q.\u0275inj=i.Nb({factory:function(t){return new(t||Q)},providers:[{provide:j,useClass:H}],imports:[[d.b]]}),Q),$={parse:{dateInput:null},display:{dateInput:{year:"numeric",month:"numeric",day:"numeric"},monthYearLabel:{year:"numeric",month:"short"},dateA11yLabel:{year:"numeric",month:"long",day:"numeric"},monthYearA11yLabel:{year:"numeric",month:"long"}}},X=((U=function t(){_classCallCheck(this,t)}).\u0275mod=i.Ob({type:U}),U.\u0275inj=i.Nb({factory:function(t){return new(t||U)},providers:[{provide:A,useValue:$}],imports:[[G]]}),U),q=((B=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"isErrorState",value:function(t,e){return!!(t&&t.invalid&&(t.touched||e&&e.submitted))}}]),t}()).\u0275fac=function(t){return new(t||B)},B.\u0275prov=Object(i.Mb)({factory:function(){return new B},token:B,providedIn:"root"}),B),K=((z=function t(){_classCallCheck(this,t)}).\u0275fac=function(t){return new(t||z)},z.\u0275dir=i.Lb({type:z,selectors:[["","mat-line",""],["","matLine",""]],hostAttrs:[1,"mat-line"]}),z);function Y(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"mat";t.changes.pipe(Object(f.a)(t)).subscribe((function(t){var i=t.length;J(e,n+"-2-line",!1),J(e,n+"-3-line",!1),J(e,n+"-multi-line",!1),2===i||3===i?J(e,"".concat(n,"-").concat(i,"-line"),!0):i>3&&J(e,n+"-multi-line",!0)}))}function J(t,e,n){var i=t.nativeElement.classList;n?i.add(e):i.remove(e)}var Z,tt,et,nt,it,at,rt,ot,st,ct=((Z=function t(){_classCallCheck(this,t)}).\u0275mod=i.Ob({type:Z}),Z.\u0275inj=i.Nb({factory:function(t){return new(t||Z)},imports:[[O],O]}),Z),lt=function(){function t(e,n,i){_classCallCheck(this,t),this._renderer=e,this.element=n,this.config=i,this.state=3}return _createClass(t,[{key:"fadeOut",value:function(){this._renderer.fadeOutRipple(this)}}]),t}(),ut={enterDuration:450,exitDuration:400},dt=Object(d.f)({passive:!0}),ft=["mousedown","touchstart"],ht=["mouseup","mouseleave","touchend","touchcancel"],pt=function(){function t(e,n,i,a){_classCallCheck(this,t),this._target=e,this._ngZone=n,this._isPointerDown=!1,this._activeRipples=new Set,this._pointerUpEventsRegistered=!1,a.isBrowser&&(this._containerElement=Object(c.e)(i))}return _createClass(t,[{key:"fadeInRipple",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),r=Object.assign(Object.assign({},ut),i.animation);i.centered&&(t=a.left+a.width/2,e=a.top+a.height/2);var o=i.radius||function(t,e,n){var i=Math.max(Math.abs(t-n.left),Math.abs(t-n.right)),a=Math.max(Math.abs(e-n.top),Math.abs(e-n.bottom));return Math.sqrt(i*i+a*a)}(t,e,a),s=t-a.left,c=e-a.top,l=r.enterDuration,u=document.createElement("div");u.classList.add("mat-ripple-element"),u.style.left=s-o+"px",u.style.top=c-o+"px",u.style.height=2*o+"px",u.style.width=2*o+"px",null!=i.color&&(u.style.backgroundColor=i.color),u.style.transitionDuration=l+"ms",this._containerElement.appendChild(u),window.getComputedStyle(u).getPropertyValue("opacity"),u.style.transform="scale(1)";var d=new lt(this,u,i);return d.state=0,this._activeRipples.add(d),i.persistent||(this._mostRecentTransientRipple=d),this._runTimeoutOutsideZone((function(){var t=d===n._mostRecentTransientRipple;d.state=1,i.persistent||t&&n._isPointerDown||d.fadeOut()}),l),d}},{key:"fadeOutRipple",value:function(t){var e=this._activeRipples.delete(t);if(t===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),this._activeRipples.size||(this._containerRect=null),e){var n=t.element,i=Object.assign(Object.assign({},ut),t.config.animation);n.style.transitionDuration=i.exitDuration+"ms",n.style.opacity="0",t.state=2,this._runTimeoutOutsideZone((function(){t.state=3,n.parentNode.removeChild(n)}),i.exitDuration)}}},{key:"fadeOutAll",value:function(){this._activeRipples.forEach((function(t){return t.fadeOut()}))}},{key:"setupTriggerEvents",value:function(t){var e=Object(c.e)(t);e&&e!==this._triggerElement&&(this._removeTriggerEvents(),this._triggerElement=e,this._registerEvents(ft))}},{key:"handleEvent",value:function(t){"mousedown"===t.type?this._onMousedown(t):"touchstart"===t.type?this._onTouchStart(t):this._onPointerUp(),this._pointerUpEventsRegistered||(this._registerEvents(ht),this._pointerUpEventsRegistered=!0)}},{key:"_onMousedown",value:function(t){var e=Object(a.l)(t),n=this._lastTouchStartEvent&&Date.now()<this._lastTouchStartEvent+800;this._target.rippleDisabled||e||n||(this._isPointerDown=!0,this.fadeInRipple(t.clientX,t.clientY,this._target.rippleConfig))}},{key:"_onTouchStart",value:function(t){if(!this._target.rippleDisabled){this._lastTouchStartEvent=Date.now(),this._isPointerDown=!0;for(var e=t.changedTouches,n=0;n<e.length;n++)this.fadeInRipple(e[n].clientX,e[n].clientY,this._target.rippleConfig)}}},{key:"_onPointerUp",value:function(){this._isPointerDown&&(this._isPointerDown=!1,this._activeRipples.forEach((function(t){!t.config.persistent&&(1===t.state||t.config.terminateOnPointerUp&&0===t.state)&&t.fadeOut()})))}},{key:"_runTimeoutOutsideZone",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this._ngZone.runOutsideAngular((function(){return setTimeout(t,e)}))}},{key:"_registerEvents",value:function(t){var e=this;this._ngZone.runOutsideAngular((function(){t.forEach((function(t){e._triggerElement.addEventListener(t,e,dt)}))}))}},{key:"_removeTriggerEvents",value:function(){var t=this;this._triggerElement&&(ft.forEach((function(e){t._triggerElement.removeEventListener(e,t,dt)})),this._pointerUpEventsRegistered&&ht.forEach((function(e){t._triggerElement.removeEventListener(e,t,dt)})))}}]),t}(),bt=new i.s("mat-ripple-global-options"),gt=((it=function(){function t(e,n,i,a,r){_classCallCheck(this,t),this._elementRef=e,this._animationMode=r,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=a||{},this._rippleRenderer=new pt(this,n,e,i)}return _createClass(t,[{key:"ngOnInit",value:function(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}},{key:"ngOnDestroy",value:function(){this._rippleRenderer._removeTriggerEvents()}},{key:"fadeOutAll",value:function(){this._rippleRenderer.fadeOutAll()}},{key:"_setupTriggerEventsIfEnabled",value:function(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}},{key:"launch",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;return"number"==typeof t?this._rippleRenderer.fadeInRipple(t,e,Object.assign(Object.assign({},this.rippleConfig),n)):this._rippleRenderer.fadeInRipple(0,0,Object.assign(Object.assign({},this.rippleConfig),t))}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=t,this._setupTriggerEventsIfEnabled()}},{key:"trigger",get:function(){return this._trigger||this._elementRef.nativeElement},set:function(t){this._trigger=t,this._setupTriggerEventsIfEnabled()}},{key:"rippleConfig",get:function(){return{centered:this.centered,radius:this.radius,color:this.color,animation:Object.assign(Object.assign(Object.assign({},this._globalOptions.animation),"NoopAnimations"===this._animationMode?{enterDuration:0,exitDuration:0}:{}),this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}},{key:"rippleDisabled",get:function(){return this.disabled||!!this._globalOptions.disabled}}]),t}()).\u0275fac=function(t){return new(t||it)(i.Qb(i.l),i.Qb(i.C),i.Qb(d.a),i.Qb(bt,8),i.Qb(h.a,8))},it.\u0275dir=i.Lb({type:it,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(t,e){2&t&&i.Ib("mat-ripple-unbounded",e.unbounded)},inputs:{radius:["matRippleRadius","radius"],disabled:["matRippleDisabled","disabled"],trigger:["matRippleTrigger","trigger"],color:["matRippleColor","color"],unbounded:["matRippleUnbounded","unbounded"],centered:["matRippleCentered","centered"],animation:["matRippleAnimation","animation"]},exportAs:["matRipple"]}),it),mt=((nt=function t(){_classCallCheck(this,t)}).\u0275mod=i.Ob({type:nt}),nt.\u0275inj=i.Nb({factory:function(t){return new(t||nt)},imports:[[O,d.b],O]}),nt),vt=((et=function t(e){_classCallCheck(this,t),this._animationMode=e,this.state="unchecked",this.disabled=!1}).\u0275fac=function(t){return new(t||et)(i.Qb(h.a,8))},et.\u0275cmp=i.Kb({type:et,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:8,hostBindings:function(t,e){2&t&&i.Ib("mat-pseudo-checkbox-indeterminate","indeterminate"===e.state)("mat-pseudo-checkbox-checked","checked"===e.state)("mat-pseudo-checkbox-disabled",e.disabled)("_mat-animation-noopable","NoopAnimations"===e._animationMode)},inputs:{state:"state",disabled:"disabled"},decls:0,vars:0,template:function(t,e){},styles:['.mat-pseudo-checkbox{width:16px;height:16px;border:2px solid;border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate{border-color:transparent}._mat-animation-noopable.mat-pseudo-checkbox{transition:none;animation:none}._mat-animation-noopable.mat-pseudo-checkbox::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{top:5px;left:1px;width:10px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{top:2.4px;left:1px;width:8px;height:3px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}\n'],encapsulation:2,changeDetection:0}),et),yt=((tt=function t(){_classCallCheck(this,t)}).\u0275mod=i.Ob({type:tt}),tt.\u0275inj=i.Nb({factory:function(t){return new(t||tt)}}),tt),_t=D((function t(){_classCallCheck(this,t)})),Ct=0,kt=((at=function(t){_inherits(n,t);var e=_createSuper(n);function n(){var t;return _classCallCheck(this,n),(t=e.apply(this,arguments))._labelId="mat-optgroup-label-"+Ct++,t}return n}(_t)).\u0275fac=function(t){return xt(t||at)},at.\u0275dir=i.Lb({type:at,inputs:{label:"label"},features:[i.Ab]}),at),xt=i.Yb(kt),Ot=new i.s("MatOptgroup"),Dt=((rt=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return n}(kt)).\u0275fac=function(t){return wt(t||rt)},rt.\u0275cmp=i.Kb({type:rt,selectors:[["mat-optgroup"]],hostAttrs:["role","group",1,"mat-optgroup"],hostVars:4,hostBindings:function(t,e){2&t&&(i.Eb("aria-disabled",e.disabled.toString())("aria-labelledby",e._labelId),i.Ib("mat-optgroup-disabled",e.disabled))},inputs:{disabled:"disabled"},exportAs:["matOptgroup"],features:[i.Cb([{provide:Ot,useExisting:rt}]),i.Ab],ngContentSelectors:g,decls:4,vars:2,consts:[[1,"mat-optgroup-label",3,"id"]],template:function(t,e){1&t&&(i.nc(b),i.Wb(0,"label",0),i.Qc(1),i.mc(2),i.Vb(),i.mc(3,1)),2&t&&(i.oc("id",e._labelId),i.Db(1),i.Sc("",e.label," "))},styles:[".mat-optgroup-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-optgroup-label[disabled]{cursor:default}[dir=rtl] .mat-optgroup-label{text-align:right}.mat-optgroup-label .mat-icon{margin-right:16px;vertical-align:middle}.mat-optgroup-label .mat-icon svg{vertical-align:top}[dir=rtl] .mat-optgroup-label .mat-icon{margin-left:16px;margin-right:0}\n"],encapsulation:2,changeDetection:0}),rt),wt=i.Yb(Dt),Mt=0,St=function t(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];_classCallCheck(this,t),this.source=e,this.isUserInput=n},It=new i.s("MAT_OPTION_PARENT_COMPONENT"),Pt=((st=function(){function t(e,n,a,r){_classCallCheck(this,t),this._element=e,this._changeDetectorRef=n,this._parent=a,this.group=r,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id="mat-option-"+Mt++,this.onSelectionChange=new i.o,this._stateChanges=new l.a}return _createClass(t,[{key:"select",value:function(){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}},{key:"deselect",value:function(){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}},{key:"focus",value:function(t,e){var n=this._getHostElement();"function"==typeof n.focus&&n.focus(e)}},{key:"setActiveStyles",value:function(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}},{key:"setInactiveStyles",value:function(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}},{key:"getLabel",value:function(){return this.viewValue}},{key:"_handleKeydown",value:function(t){t.keyCode!==p.g&&t.keyCode!==p.q||Object(p.v)(t)||(this._selectViaInteraction(),t.preventDefault())}},{key:"_selectViaInteraction",value:function(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}},{key:"_getAriaSelected",value:function(){return this.selected||!this.multiple&&null}},{key:"_getTabIndex",value:function(){return this.disabled?"-1":"0"}},{key:"_getHostElement",value:function(){return this._element.nativeElement}},{key:"ngAfterViewChecked",value:function(){if(this._selected){var t=this.viewValue;t!==this._mostRecentViewValue&&(this._mostRecentViewValue=t,this._stateChanges.next())}}},{key:"ngOnDestroy",value:function(){this._stateChanges.complete()}},{key:"_emitSelectionChangeEvent",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.onSelectionChange.emit(new St(this,t))}},{key:"multiple",get:function(){return this._parent&&this._parent.multiple}},{key:"selected",get:function(){return this._selected}},{key:"disabled",get:function(){return this.group&&this.group.disabled||this._disabled},set:function(t){this._disabled=Object(c.c)(t)}},{key:"disableRipple",get:function(){return this._parent&&this._parent.disableRipple}},{key:"active",get:function(){return this._active}},{key:"viewValue",get:function(){return(this._getHostElement().textContent||"").trim()}}]),t}()).\u0275fac=function(t){return new(t||st)(i.Qb(i.l),i.Qb(i.h),i.Qb(void 0),i.Qb(kt))},st.\u0275dir=i.Lb({type:st,inputs:{id:"id",disabled:"disabled",value:"value"},outputs:{onSelectionChange:"onSelectionChange"}}),st),Rt=((ot=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a,r){return _classCallCheck(this,n),e.call(this,t,i,a,r)}return n}(Pt)).\u0275fac=function(t){return new(t||ot)(i.Qb(i.l),i.Qb(i.h),i.Qb(It,8),i.Qb(Ot,8))},ot.\u0275cmp=i.Kb({type:ot,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-option","mat-focus-indicator"],hostVars:12,hostBindings:function(t,e){1&t&&i.dc("click",(function(){return e._selectViaInteraction()}))("keydown",(function(t){return e._handleKeydown(t)})),2&t&&(i.Zb("id",e.id),i.Eb("tabindex",e._getTabIndex())("aria-selected",e._getAriaSelected())("aria-disabled",e.disabled.toString()),i.Ib("mat-selected",e.selected)("mat-option-multiple",e.multiple)("mat-active",e.active)("mat-option-disabled",e.disabled))},exportAs:["matOption"],features:[i.Ab],ngContentSelectors:y,decls:4,vars:3,consts:[["class","mat-option-pseudo-checkbox",3,"state","disabled",4,"ngIf"],[1,"mat-option-text"],["mat-ripple","",1,"mat-option-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-option-pseudo-checkbox",3,"state","disabled"]],template:function(t,e){1&t&&(i.nc(),i.Oc(0,m,1,2,"mat-pseudo-checkbox",0),i.Wb(1,"span",1),i.mc(2),i.Vb(),i.Rb(3,"div",2)),2&t&&(i.oc("ngIf",e.multiple),i.Db(3),i.oc("matRippleTrigger",e._getHostElement())("matRippleDisabled",e.disabled||e.disableRipple))},directives:[s.t,gt,vt],styles:[".mat-option{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative;cursor:pointer;outline:none;display:flex;flex-direction:row;max-width:100%;box-sizing:border-box;align-items:center;-webkit-tap-highlight-color:transparent}.mat-option[disabled]{cursor:default}[dir=rtl] .mat-option{text-align:right}.mat-option .mat-icon{margin-right:16px;vertical-align:middle}.mat-option .mat-icon svg{vertical-align:top}[dir=rtl] .mat-option .mat-icon{margin-left:16px;margin-right:0}.mat-option[aria-disabled=true]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:32px}[dir=rtl] .mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:16px;padding-right:32px}.cdk-high-contrast-active .mat-option{margin:0 1px}.cdk-high-contrast-active .mat-option.mat-active{border:solid 1px currentColor;margin:0}.mat-option-text{display:inline-block;flex-grow:1;overflow:hidden;text-overflow:ellipsis}.mat-option .mat-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.cdk-high-contrast-active .mat-option .mat-option-ripple{opacity:.5}.mat-option-pseudo-checkbox{margin-right:8px}[dir=rtl] .mat-option-pseudo-checkbox{margin-left:8px;margin-right:0}\n"],encapsulation:2,changeDetection:0}),ot);function Vt(t,e,n){if(n.length){for(var i=e.toArray(),a=n.toArray(),r=0,o=0;o<t+1;o++)i[o].group&&i[o].group===a[r]&&r++;return r}return 0}function jt(t,e,n,i){return t<n?t:t+e>n+i?Math.max(0,t-i+e):n}var At,Wt=((At=function t(){_classCallCheck(this,t)}).\u0275mod=i.Ob({type:At}),At.\u0275inj=i.Nb({factory:function(t){return new(t||At)},imports:[[mt,s.c,yt]]}),At),Tt=new i.s("mat-label-global-options")},FtGj:function(t,e,n){"use strict";n.d(e,"a",(function(){return _})),n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return x})),n.d(e,"d",(function(){return g})),n.d(e,"e",(function(){return b})),n.d(e,"f",(function(){return u})),n.d(e,"g",(function(){return r})),n.d(e,"h",(function(){return o})),n.d(e,"i",(function(){return y})),n.d(e,"j",(function(){return d})),n.d(e,"k",(function(){return f})),n.d(e,"l",(function(){return v})),n.d(e,"m",(function(){return l})),n.d(e,"n",(function(){return c})),n.d(e,"o",(function(){return p})),n.d(e,"p",(function(){return k})),n.d(e,"q",(function(){return s})),n.d(e,"r",(function(){return a})),n.d(e,"s",(function(){return h})),n.d(e,"t",(function(){return C})),n.d(e,"u",(function(){return m})),n.d(e,"v",(function(){return O}));var i=8,a=9,r=13,o=27,s=32,c=33,l=34,u=35,d=36,f=37,h=38,p=39,b=40,g=46,m=48,v=57,y=59,_=65,C=90,k=186,x=188;function O(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return n.length?n.some((function(e){return t[e]})):t.altKey||t.shiftKey||t.ctrlKey||t.metaKey}},FvrZ:function(t,e,n){"use strict";n.d(e,"a",(function(){return m})),n.d(e,"b",(function(){return x})),n.d(e,"c",(function(){return C})),n.d(e,"d",(function(){return M})),n.d(e,"e",(function(){return k})),n.d(e,"f",(function(){return _})),n.d(e,"g",(function(){return v})),n.d(e,"h",(function(){return D})),n.d(e,"i",(function(){return w})),n.d(e,"j",(function(){return b})),n.d(e,"k",(function(){return g}));var i=n("0EQZ"),a=n("7+OI"),r=n("XNiG"),o=n("2Vo4"),s=n("LRne"),c=n("IzEk"),l=n("pLZG"),u=n("1G5W"),d=n("fXoL"),f=n("8LU1"),h=n("cH1L"),p=function(){function t(){_classCallCheck(this,t),this.expansionModel=new i.c(!0)}return _createClass(t,[{key:"toggle",value:function(t){this.expansionModel.toggle(this._trackByValue(t))}},{key:"expand",value:function(t){this.expansionModel.select(this._trackByValue(t))}},{key:"collapse",value:function(t){this.expansionModel.deselect(this._trackByValue(t))}},{key:"isExpanded",value:function(t){return this.expansionModel.isSelected(this._trackByValue(t))}},{key:"toggleDescendants",value:function(t){this.expansionModel.isSelected(this._trackByValue(t))?this.collapseDescendants(t):this.expandDescendants(t)}},{key:"collapseAll",value:function(){this.expansionModel.clear()}},{key:"expandDescendants",value:function(t){var e,n=this,i=[t];i.push.apply(i,_toConsumableArray(this.getDescendants(t))),(e=this.expansionModel).select.apply(e,_toConsumableArray(i.map((function(t){return n._trackByValue(t)}))))}},{key:"collapseDescendants",value:function(t){var e,n=this,i=[t];i.push.apply(i,_toConsumableArray(this.getDescendants(t))),(e=this.expansionModel).deselect.apply(e,_toConsumableArray(i.map((function(t){return n._trackByValue(t)}))))}},{key:"_trackByValue",value:function(t){return this.trackBy?this.trackBy(t):t}}]),t}(),b=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a){var r;return _classCallCheck(this,n),(r=e.call(this)).getLevel=t,r.isExpandable=i,r.options=a,r.options&&(r.trackBy=r.options.trackBy),r}return _createClass(n,[{key:"getDescendants",value:function(t){for(var e=[],n=this.dataNodes.indexOf(t)+1;n<this.dataNodes.length&&this.getLevel(t)<this.getLevel(this.dataNodes[n]);n++)e.push(this.dataNodes[n]);return e}},{key:"expandAll",value:function(){var t,e=this;(t=this.expansionModel).select.apply(t,_toConsumableArray(this.dataNodes.map((function(t){return e._trackByValue(t)}))))}}]),n}(p),g=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var a;return _classCallCheck(this,n),(a=e.call(this)).getChildren=t,a.options=i,a.options&&(a.trackBy=a.options.trackBy),a}return _createClass(n,[{key:"expandAll",value:function(){var t,e=this;this.expansionModel.clear();var n=this.dataNodes.reduce((function(t,n){return[].concat(_toConsumableArray(t),_toConsumableArray(e.getDescendants(n)),[n])}),[]);(t=this.expansionModel).select.apply(t,_toConsumableArray(n.map((function(t){return e._trackByValue(t)}))))}},{key:"getDescendants",value:function(t){var e=[];return this._getDescendants(e,t),e.splice(1)}},{key:"_getDescendants",value:function(t,e){var n=this;t.push(e);var i=this.getChildren(e);Array.isArray(i)?i.forEach((function(e){return n._getDescendants(t,e)})):Object(a.a)(i)&&i.pipe(Object(c.a)(1),Object(l.a)(Boolean)).subscribe((function(e){var i,a=_createForOfIteratorHelper(e);try{for(a.s();!(i=a.n()).done;){var r=i.value;n._getDescendants(t,r)}}catch(o){a.e(o)}finally{a.f()}}))}}]),n}(p),m=new d.s("CDK_TREE_NODE_OUTLET_NODE"),v=function(){var t=function t(e,n){_classCallCheck(this,t),this.viewContainer=e,this._node=n};return t.\u0275fac=function(e){return new(e||t)(d.Qb(d.T),d.Qb(m,8))},t.\u0275dir=d.Lb({type:t,selectors:[["","cdkTreeNodeOutlet",""]]}),t}(),y=function t(e){_classCallCheck(this,t),this.$implicit=e},_=function(){var t=function t(e){_classCallCheck(this,t),this.template=e};return t.\u0275fac=function(e){return new(e||t)(d.Qb(d.P))},t.\u0275dir=d.Lb({type:t,selectors:[["","cdkTreeNodeDef",""]],inputs:{when:["cdkTreeNodeDefWhen","when"]}}),t}(),C=function(){var t=function(){function t(e,n){_classCallCheck(this,t),this._differs=e,this._changeDetectorRef=n,this._onDestroy=new r.a,this._levels=new Map,this.viewChange=new o.a({start:0,end:Number.MAX_VALUE})}return _createClass(t,[{key:"ngOnInit",value:function(){this._dataDiffer=this._differs.find([]).create(this.trackBy)}},{key:"ngOnDestroy",value:function(){this._nodeOutlet.viewContainer.clear(),this.viewChange.complete(),this._onDestroy.next(),this._onDestroy.complete(),this._dataSource&&"function"==typeof this._dataSource.disconnect&&this.dataSource.disconnect(this),this._dataSubscription&&(this._dataSubscription.unsubscribe(),this._dataSubscription=null)}},{key:"ngAfterContentChecked",value:function(){var t=this._nodeDefs.filter((function(t){return!t.when}));this._defaultNodeDef=t[0],this.dataSource&&this._nodeDefs&&!this._dataSubscription&&this._observeRenderChanges()}},{key:"_switchDataSource",value:function(t){this._dataSource&&"function"==typeof this._dataSource.disconnect&&this.dataSource.disconnect(this),this._dataSubscription&&(this._dataSubscription.unsubscribe(),this._dataSubscription=null),t||this._nodeOutlet.viewContainer.clear(),this._dataSource=t,this._nodeDefs&&this._observeRenderChanges()}},{key:"_observeRenderChanges",value:function(){var t,e=this;Object(i.h)(this._dataSource)?t=this._dataSource.connect(this):Object(a.a)(this._dataSource)?t=this._dataSource:Array.isArray(this._dataSource)&&(t=Object(s.a)(this._dataSource)),t&&(this._dataSubscription=t.pipe(Object(u.a)(this._onDestroy)).subscribe((function(t){return e.renderNodeChanges(t)})))}},{key:"renderNodeChanges",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._dataDiffer,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this._nodeOutlet.viewContainer,a=arguments.length>3?arguments[3]:void 0,r=n.diff(t);r&&(r.forEachOperation((function(n,r,o){if(null==n.previousIndex)e.insertNode(t[o],o,i,a);else if(null==o)i.remove(r),e._levels.delete(n.item);else{var s=i.get(r);i.move(s,o)}})),this._changeDetectorRef.detectChanges())}},{key:"_getNodeDef",value:function(t,e){return 1===this._nodeDefs.length?this._nodeDefs.first:this._nodeDefs.find((function(n){return n.when&&n.when(e,t)}))||this._defaultNodeDef}},{key:"insertNode",value:function(t,e,n,i){var a=this._getNodeDef(t,e),r=new y(t);r.level=this.treeControl.getLevel?this.treeControl.getLevel(t):void 0!==i&&this._levels.has(i)?this._levels.get(i)+1:0,this._levels.set(t,r.level),(n||this._nodeOutlet.viewContainer).createEmbeddedView(a.template,r,e),k.mostRecentTreeNode&&(k.mostRecentTreeNode.data=t)}},{key:"dataSource",get:function(){return this._dataSource},set:function(t){this._dataSource!==t&&this._switchDataSource(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(d.Qb(d.v),d.Qb(d.h))},t.\u0275cmp=d.Kb({type:t,selectors:[["cdk-tree"]],contentQueries:function(t,e,n){var i;1&t&&d.Jb(n,_,!0),2&t&&d.yc(i=d.ec())&&(e._nodeDefs=i)},viewQuery:function(t,e){var n;1&t&&d.Kc(v,!0),2&t&&d.yc(n=d.ec())&&(e._nodeOutlet=n.first)},hostAttrs:["role","tree",1,"cdk-tree"],inputs:{dataSource:"dataSource",treeControl:"treeControl",trackBy:"trackBy"},exportAs:["cdkTree"],decls:1,vars:0,consts:[["cdkTreeNodeOutlet",""]],template:function(t,e){1&t&&d.Sb(0,0)},directives:[v],encapsulation:2}),t}(),k=function(){var t=function(){function t(e,n){_classCallCheck(this,t),this._elementRef=e,this._tree=n,this._destroyed=new r.a,this._dataChanges=new r.a,this.role="treeitem",t.mostRecentTreeNode=this}return _createClass(t,[{key:"ngOnDestroy",value:function(){t.mostRecentTreeNode===this&&(t.mostRecentTreeNode=null),this._dataChanges.complete(),this._destroyed.next(),this._destroyed.complete()}},{key:"focus",value:function(){this._elementRef.nativeElement.focus()}},{key:"_setRoleFromData",value:function(){this.role="treeitem"}},{key:"data",get:function(){return this._data},set:function(t){t!==this._data&&(this._data=t,this._setRoleFromData(),this._dataChanges.next())}},{key:"isExpanded",get:function(){return this._tree.treeControl.isExpanded(this._data)}},{key:"level",get:function(){return this._tree.treeControl.getLevel?this._tree.treeControl.getLevel(this._data):0}}]),t}();return t.\u0275fac=function(e){return new(e||t)(d.Qb(d.l),d.Qb(C))},t.\u0275dir=d.Lb({type:t,selectors:[["cdk-tree-node"]],hostAttrs:[1,"cdk-tree-node"],hostVars:3,hostBindings:function(t,e){2&t&&d.Eb("aria-expanded",e.isExpanded)("aria-level",e.level+1)("role",e.role)},inputs:{role:"role"},exportAs:["cdkTreeNode"]}),t.mostRecentTreeNode=null,t}(),x=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a){var r;return _classCallCheck(this,n),(r=e.call(this,t,i))._elementRef=t,r._tree=i,r._differs=a,r}return _createClass(n,[{key:"ngAfterContentInit",value:function(){var t=this;this._dataDiffer=this._differs.find([]).create(this._tree.trackBy);var e=this._tree.treeControl.getChildren(this.data);Array.isArray(e)?this.updateChildrenNodes(e):Object(a.a)(e)&&e.pipe(Object(u.a)(this._destroyed)).subscribe((function(e){return t.updateChildrenNodes(e)})),this.nodeOutlet.changes.pipe(Object(u.a)(this._destroyed)).subscribe((function(){return t.updateChildrenNodes()}))}},{key:"ngOnDestroy",value:function(){this._clear(),_get(_getPrototypeOf(n.prototype),"ngOnDestroy",this).call(this)}},{key:"updateChildrenNodes",value:function(t){var e=this._getNodeOutlet();t&&(this._children=t),e&&this._children?this._tree.renderNodeChanges(this._children,this._dataDiffer,e.viewContainer,this._data):this._dataDiffer.diff([])}},{key:"_clear",value:function(){var t=this._getNodeOutlet();t&&(t.viewContainer.clear(),this._dataDiffer.diff([]))}},{key:"_getNodeOutlet",value:function(){var t=this,e=this.nodeOutlet;return e&&e.find((function(e){return!e._node||e._node===t}))}}]),n}(k);return t.\u0275fac=function(e){return new(e||t)(d.Qb(d.l),d.Qb(C),d.Qb(d.v))},t.\u0275dir=d.Lb({type:t,selectors:[["cdk-nested-tree-node"]],contentQueries:function(t,e,n){var i;1&t&&d.Jb(n,v,!0),2&t&&d.yc(i=d.ec())&&(e.nodeOutlet=i)},hostAttrs:[1,"cdk-tree-node","cdk-nested-tree-node"],hostVars:2,hostBindings:function(t,e){2&t&&d.Eb("aria-expanded",e.isExpanded)("role",e.role)},exportAs:["cdkNestedTreeNode"],features:[d.Cb([{provide:k,useExisting:t},{provide:m,useExisting:t}]),d.Ab]}),t}(),O=/([A-Za-z%]+)$/,D=function(){var t=function(){function t(e,n,i,a,o){var s=this;_classCallCheck(this,t),this._treeNode=e,this._tree=n,this._element=a,this._dir=o,this._destroyed=new r.a,this.indentUnits="px",this._indent=40,this._setPadding(),o&&o.change.pipe(Object(u.a)(this._destroyed)).subscribe((function(){return s._setPadding(!0)})),e._dataChanges.subscribe((function(){return s._setPadding()}))}return _createClass(t,[{key:"ngOnDestroy",value:function(){this._destroyed.next(),this._destroyed.complete()}},{key:"_paddingIndent",value:function(){var t=this._treeNode.data&&this._tree.treeControl.getLevel?this._tree.treeControl.getLevel(this._treeNode.data):null,e=null==this._level?t:this._level;return"number"==typeof e?"".concat(e*this._indent).concat(this.indentUnits):null}},{key:"_setPadding",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._paddingIndent();if(e!==this._currentPadding||t){var n=this._element.nativeElement,i=this._dir&&"rtl"===this._dir.value?"paddingRight":"paddingLeft",a="paddingLeft"===i?"paddingRight":"paddingLeft";n.style[i]=e||"",n.style[a]="",this._currentPadding=e}}},{key:"_setLevelInput",value:function(t){this._level=Object(f.f)(t,null),this._setPadding()}},{key:"_setIndentInput",value:function(t){var e=t,n="px";if("string"==typeof t){var i=t.split(O);e=i[0],n=i[1]||n}this.indentUnits=n,this._indent=Object(f.f)(e),this._setPadding()}},{key:"level",get:function(){return this._level},set:function(t){this._setLevelInput(t)}},{key:"indent",get:function(){return this._indent},set:function(t){this._setIndentInput(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(d.Qb(k),d.Qb(C),d.Qb(d.I),d.Qb(d.l),d.Qb(h.c,8))},t.\u0275dir=d.Lb({type:t,selectors:[["","cdkTreeNodePadding",""]],inputs:{level:["cdkTreeNodePadding","level"],indent:["cdkTreeNodePaddingIndent","indent"]}}),t}(),w=function(){var t=function(){function t(e,n){_classCallCheck(this,t),this._tree=e,this._treeNode=n,this._recursive=!1}return _createClass(t,[{key:"_toggle",value:function(t){this.recursive?this._tree.treeControl.toggleDescendants(this._treeNode.data):this._tree.treeControl.toggle(this._treeNode.data),t.stopPropagation()}},{key:"recursive",get:function(){return this._recursive},set:function(t){this._recursive=Object(f.c)(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(d.Qb(C),d.Qb(k))},t.\u0275dir=d.Lb({type:t,selectors:[["","cdkTreeNodeToggle",""]],hostBindings:function(t,e){1&t&&d.dc("click",(function(t){return e._toggle(t)}))},inputs:{recursive:["cdkTreeNodeToggleRecursive","recursive"]}}),t}(),M=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=d.Ob({type:t}),t.\u0275inj=d.Nb({factory:function(e){return new(e||t)}}),t}()},GU7r:function(t,e,n){"use strict";n.d(e,"a",(function(){return u})),n.d(e,"b",(function(){return l})),n.d(e,"c",(function(){return d}));var i=n("8LU1"),a=n("fXoL"),r=n("HDdC"),o=n("XNiG"),s=n("Kj3r"),c=function(){var t=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"create",value:function(t){return"undefined"==typeof MutationObserver?null:new MutationObserver(t)}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(a.Mb)({factory:function(){return new t},token:t,providedIn:"root"}),t}(),l=function(){var t=function(){function t(e){_classCallCheck(this,t),this._mutationObserverFactory=e,this._observedElements=new Map}return _createClass(t,[{key:"ngOnDestroy",value:function(){var t=this;this._observedElements.forEach((function(e,n){return t._cleanupObserver(n)}))}},{key:"observe",value:function(t){var e=this,n=Object(i.e)(t);return new r.a((function(t){var i=e._observeElement(n).subscribe(t);return function(){i.unsubscribe(),e._unobserveElement(n)}}))}},{key:"_observeElement",value:function(t){if(this._observedElements.has(t))this._observedElements.get(t).count++;else{var e=new o.a,n=this._mutationObserverFactory.create((function(t){return e.next(t)}));n&&n.observe(t,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(t,{observer:n,stream:e,count:1})}return this._observedElements.get(t).stream}},{key:"_unobserveElement",value:function(t){this._observedElements.has(t)&&(this._observedElements.get(t).count--,this._observedElements.get(t).count||this._cleanupObserver(t))}},{key:"_cleanupObserver",value:function(t){if(this._observedElements.has(t)){var e=this._observedElements.get(t),n=e.observer,i=e.stream;n&&n.disconnect(),i.complete(),this._observedElements.delete(t)}}}]),t}();return t.\u0275fac=function(e){return new(e||t)(a.ac(c))},t.\u0275prov=Object(a.Mb)({factory:function(){return new t(Object(a.ac)(c))},token:t,providedIn:"root"}),t}(),u=function(){var t=function(){function t(e,n,i){_classCallCheck(this,t),this._contentObserver=e,this._elementRef=n,this._ngZone=i,this.event=new a.o,this._disabled=!1,this._currentSubscription=null}return _createClass(t,[{key:"ngAfterContentInit",value:function(){this._currentSubscription||this.disabled||this._subscribe()}},{key:"ngOnDestroy",value:function(){this._unsubscribe()}},{key:"_subscribe",value:function(){var t=this;this._unsubscribe();var e=this._contentObserver.observe(this._elementRef);this._ngZone.runOutsideAngular((function(){t._currentSubscription=(t.debounce?e.pipe(Object(s.a)(t.debounce)):e).subscribe(t.event)}))}},{key:"_unsubscribe",value:function(){this._currentSubscription&&this._currentSubscription.unsubscribe()}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=Object(i.c)(t),this._disabled?this._unsubscribe():this._subscribe()}},{key:"debounce",get:function(){return this._debounce},set:function(t){this._debounce=Object(i.f)(t),this._subscribe()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(a.Qb(l),a.Qb(a.l),a.Qb(a.C))},t.\u0275dir=a.Lb({type:t,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),t}(),d=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)},providers:[c]}),t}()},GyhO:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("LRne"),a=n("0EUg");function r(){return Object(a.a)()(Object(i.a).apply(void 0,arguments))}},HDdC:function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i,a=n("7o/Q"),r=n("2QA8"),o=n("gRHU"),s=n("kJWO"),c=n("SpAZ"),l=n("2fFW"),u=((i=function(){function t(e){_classCallCheck(this,t),this._isScalar=!1,e&&(this._subscribe=e)}return _createClass(t,[{key:"lift",value:function(e){var n=new t;return n.source=this,n.operator=e,n}},{key:"subscribe",value:function(t,e,n){var i=this.operator,s=function(t,e,n){if(t){if(t instanceof a.a)return t;if(t[r.a])return t[r.a]()}return t||e||n?new a.a(t,e,n):new a.a(o.a)}(t,e,n);if(s.add(i?i.call(s,this.source):this.source||l.a.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),l.a.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s}},{key:"_trySubscribe",value:function(t){try{return this._subscribe(t)}catch(e){l.a.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function(t){for(;t;){var e=t,n=e.closed,i=e.destination,r=e.isStopped;if(n||r)return!1;t=i&&i instanceof a.a?i:null}return!0}(t)?t.error(e):console.warn(e)}}},{key:"forEach",value:function(t,e){var n=this;return new(e=d(e))((function(e,i){var a;a=n.subscribe((function(e){try{t(e)}catch(n){i(n),a&&a.unsubscribe()}}),i,e)}))}},{key:"_subscribe",value:function(t){var e=this.source;return e&&e.subscribe(t)}},{key:s.a,value:function(){return this}},{key:"pipe",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return 0===e.length?this:(0===(i=e).length?c.a:1===i.length?i[0]:function(t){return i.reduce((function(t,e){return e(t)}),t)})(this);var i}},{key:"toPromise",value:function(t){var e=this;return new(t=d(t))((function(t,n){var i;e.subscribe((function(t){return i=t}),(function(t){return n(t)}),(function(){return t(i)}))}))}}]),t}()).create=function(t){return new i(t)},i);function d(t){if(t||(t=l.a.Promise||Promise),!t)throw new Error("no Promise impl found");return t}},I55L:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t}},IjjT:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=function(){var t=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.now;_classCallCheck(this,t),this.SchedulerAction=e,this.now=n}return _createClass(t,[{key:"schedule",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;return new this.SchedulerAction(this,t).schedule(n,e)}}]),t}();return t.now=function(){return Date.now()},t}(),a=function(t){_inherits(n,t);var e=_createSuper(n);function n(t){var a,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.now;return _classCallCheck(this,n),(a=e.call(this,t,(function(){return n.delegate&&n.delegate!==_assertThisInitialized(a)?n.delegate.now():r()}))).actions=[],a.active=!1,a.scheduled=void 0,a}return _createClass(n,[{key:"schedule",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2?arguments[2]:void 0;return n.delegate&&n.delegate!==this?n.delegate.schedule(t,e,i):_get(_getPrototypeOf(n.prototype),"schedule",this).call(this,t,e,i)}},{key:"flush",value:function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}}}]),n}(i)},IzEk:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n("7o/Q"),a=n("4I5i"),r=n("EY2u");function o(t){return function(e){return 0===t?Object(r.b)():e.lift(new s(t))}}var s=function(){function t(e){if(_classCallCheck(this,t),this.total=e,this.total<0)throw new a.a}return _createClass(t,[{key:"call",value:function(t,e){return e.subscribe(new c(t,this.total))}}]),t}(),c=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var a;return _classCallCheck(this,n),(a=e.call(this,t)).total=i,a.count=0,a}return _createClass(n,[{key:"_next",value:function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))}}]),n}(i.a)},JIr8:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n("zx2A");function a(t){return function(e){var n=new r(t),i=e.lift(n);return n.caught=i}}var r=function(){function t(e){_classCallCheck(this,t),this.selector=e}return _createClass(t,[{key:"call",value:function(t,e){return e.subscribe(new o(t,this.selector,this.caught))}}]),t}(),o=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a){var r;return _classCallCheck(this,n),(r=e.call(this,t)).selector=i,r.caught=a,r}return _createClass(n,[{key:"error",value:function(t){if(!this.isStopped){var e;try{e=this.selector(t,this.caught)}catch(o){return void _get(_getPrototypeOf(n.prototype),"error",this).call(this,o)}this._unsubscribeAndRecycle();var a=new i.a(this);this.add(a);var r=Object(i.c)(e,a);r!==a&&this.add(r)}}}]),n}(i.b)},JX91:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("GyhO"),a=n("z+Ro");function r(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e[e.length-1];return Object(a.a)(r)?(e.pop(),function(t){return Object(i.a)(e,t,r)}):function(t){return Object(i.a)(e,t)}}},Kj3r:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("7o/Q"),a=n("D0XW");function r(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.a;return function(n){return n.lift(new o(t,e))}}var o=function(){function t(e,n){_classCallCheck(this,t),this.dueTime=e,this.scheduler=n}return _createClass(t,[{key:"call",value:function(t,e){return e.subscribe(new s(t,this.dueTime,this.scheduler))}}]),t}(),s=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a){var r;return _classCallCheck(this,n),(r=e.call(this,t)).dueTime=i,r.scheduler=a,r.debouncedSubscription=null,r.lastValue=null,r.hasValue=!1,r}return _createClass(n,[{key:"_next",value:function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(c,this.dueTime,this))}},{key:"_complete",value:function(){this.debouncedNext(),this.destination.complete()}},{key:"debouncedNext",value:function(){if(this.clearDebounce(),this.hasValue){var t=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}}},{key:"clearDebounce",value:function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)}}]),n}(i.a);function c(t){t.debouncedNext()}},LRne:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n("z+Ro"),a=n("yCtX"),r=n("jZKg");function o(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var o=e[e.length-1];return Object(i.a)(o)?(e.pop(),Object(r.a)(e,o)):Object(a.a)(e)}},Lhse:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"},M9IT:function(t,e,n){"use strict";n.d(e,"a",(function(){return k})),n.d(e,"b",(function(){return v})),n.d(e,"c",(function(){return x}));var i=n("ofXK"),a=n("fXoL"),r=n("bTqV"),o=n("d3UM"),s=n("Qu3c"),c=n("8LU1"),l=n("XNiG"),u=n("FKr1"),d=n("kmnG");function f(t,e){if(1&t&&(a.Wb(0,"mat-option",19),a.Qc(1),a.Vb()),2&t){var n=e.$implicit;a.oc("value",n),a.Db(1),a.Sc(" ",n," ")}}function h(t,e){if(1&t){var n=a.Xb();a.Wb(0,"mat-form-field",16),a.Wb(1,"mat-select",17),a.dc("selectionChange",(function(t){return a.Dc(n),a.hc(2)._changePageSize(t.value)})),a.Oc(2,f,2,2,"mat-option",18),a.Vb(),a.Vb()}if(2&t){var i=a.hc(2);a.oc("appearance",i._formFieldAppearance)("color",i.color),a.Db(1),a.oc("value",i.pageSize)("disabled",i.disabled)("aria-label",i._intl.itemsPerPageLabel),a.Db(1),a.oc("ngForOf",i._displayedPageSizeOptions)}}function p(t,e){if(1&t&&(a.Wb(0,"div",20),a.Qc(1),a.Vb()),2&t){var n=a.hc(2);a.Db(1),a.Rc(n.pageSize)}}function b(t,e){if(1&t&&(a.Wb(0,"div",12),a.Wb(1,"div",13),a.Qc(2),a.Vb(),a.Oc(3,h,3,6,"mat-form-field",14),a.Oc(4,p,2,1,"div",15),a.Vb()),2&t){var n=a.hc();a.Db(2),a.Sc(" ",n._intl.itemsPerPageLabel," "),a.Db(1),a.oc("ngIf",n._displayedPageSizeOptions.length>1),a.Db(1),a.oc("ngIf",n._displayedPageSizeOptions.length<=1)}}function g(t,e){if(1&t){var n=a.Xb();a.Wb(0,"button",21),a.dc("click",(function(){return a.Dc(n),a.hc().firstPage()})),a.gc(),a.Wb(1,"svg",7),a.Rb(2,"path",22),a.Vb(),a.Vb()}if(2&t){var i=a.hc();a.oc("matTooltip",i._intl.firstPageLabel)("matTooltipDisabled",i._previousButtonsDisabled())("matTooltipPosition","above")("disabled",i._previousButtonsDisabled()),a.Eb("aria-label",i._intl.firstPageLabel)}}function m(t,e){if(1&t){var n=a.Xb();a.gc(),a.fc(),a.Wb(0,"button",23),a.dc("click",(function(){return a.Dc(n),a.hc().lastPage()})),a.gc(),a.Wb(1,"svg",7),a.Rb(2,"path",24),a.Vb(),a.Vb()}if(2&t){var i=a.hc();a.oc("matTooltip",i._intl.lastPageLabel)("matTooltipDisabled",i._nextButtonsDisabled())("matTooltipPosition","above")("disabled",i._nextButtonsDisabled()),a.Eb("aria-label",i._intl.lastPageLabel)}}var v=function(){var t=function t(){_classCallCheck(this,t),this.changes=new l.a,this.itemsPerPageLabel="Items per page:",this.nextPageLabel="Next page",this.previousPageLabel="Previous page",this.firstPageLabel="First page",this.lastPageLabel="Last page",this.getRangeLabel=function(t,e,n){if(0==n||0==e)return"0 of "+n;var i=t*e;return"".concat(i+1," \u2013 ").concat(i<(n=Math.max(n,0))?Math.min(i+e,n):i+e," of ").concat(n)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Object(a.Mb)({factory:function(){return new t},token:t,providedIn:"root"}),t}(),y={provide:v,deps:[[new a.D,new a.N,v]],useFactory:function(t){return t||new v}},_=new a.s("MAT_PAGINATOR_DEFAULT_OPTIONS"),C=Object(u.C)(Object(u.E)((function t(){_classCallCheck(this,t)}))),k=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r){var o;if(_classCallCheck(this,n),(o=e.call(this))._intl=t,o._changeDetectorRef=i,o._pageIndex=0,o._length=0,o._pageSizeOptions=[],o._hidePageSize=!1,o._showFirstLastButtons=!1,o.page=new a.o,o._intlChanges=t.changes.subscribe((function(){return o._changeDetectorRef.markForCheck()})),r){var s=r.pageSize,c=r.pageSizeOptions,l=r.hidePageSize,u=r.showFirstLastButtons,d=r.formFieldAppearance;null!=s&&(o._pageSize=s),null!=c&&(o._pageSizeOptions=c),null!=l&&(o._hidePageSize=l),null!=u&&(o._showFirstLastButtons=u),null!=d&&(o._formFieldAppearance=d)}return _possibleConstructorReturn(o)}return _createClass(n,[{key:"ngOnInit",value:function(){this._initialized=!0,this._updateDisplayedPageSizeOptions(),this._markInitialized()}},{key:"ngOnDestroy",value:function(){this._intlChanges.unsubscribe()}},{key:"nextPage",value:function(){if(this.hasNextPage()){var t=this.pageIndex;this.pageIndex++,this._emitPageEvent(t)}}},{key:"previousPage",value:function(){if(this.hasPreviousPage()){var t=this.pageIndex;this.pageIndex--,this._emitPageEvent(t)}}},{key:"firstPage",value:function(){if(this.hasPreviousPage()){var t=this.pageIndex;this.pageIndex=0,this._emitPageEvent(t)}}},{key:"lastPage",value:function(){if(this.hasNextPage()){var t=this.pageIndex;this.pageIndex=this.getNumberOfPages()-1,this._emitPageEvent(t)}}},{key:"hasPreviousPage",value:function(){return this.pageIndex>=1&&0!=this.pageSize}},{key:"hasNextPage",value:function(){var t=this.getNumberOfPages()-1;return this.pageIndex<t&&0!=this.pageSize}},{key:"getNumberOfPages",value:function(){return this.pageSize?Math.ceil(this.length/this.pageSize):0}},{key:"_changePageSize",value:function(t){var e=this.pageIndex;this.pageIndex=Math.floor(this.pageIndex*this.pageSize/t)||0,this.pageSize=t,this._emitPageEvent(e)}},{key:"_nextButtonsDisabled",value:function(){return this.disabled||!this.hasNextPage()}},{key:"_previousButtonsDisabled",value:function(){return this.disabled||!this.hasPreviousPage()}},{key:"_updateDisplayedPageSizeOptions",value:function(){this._initialized&&(this.pageSize||(this._pageSize=0!=this.pageSizeOptions.length?this.pageSizeOptions[0]:50),this._displayedPageSizeOptions=this.pageSizeOptions.slice(),-1===this._displayedPageSizeOptions.indexOf(this.pageSize)&&this._displayedPageSizeOptions.push(this.pageSize),this._displayedPageSizeOptions.sort((function(t,e){return t-e})),this._changeDetectorRef.markForCheck())}},{key:"_emitPageEvent",value:function(t){this.page.emit({previousPageIndex:t,pageIndex:this.pageIndex,pageSize:this.pageSize,length:this.length})}},{key:"pageIndex",get:function(){return this._pageIndex},set:function(t){this._pageIndex=Math.max(Object(c.f)(t),0),this._changeDetectorRef.markForCheck()}},{key:"length",get:function(){return this._length},set:function(t){this._length=Object(c.f)(t),this._changeDetectorRef.markForCheck()}},{key:"pageSize",get:function(){return this._pageSize},set:function(t){this._pageSize=Math.max(Object(c.f)(t),0),this._updateDisplayedPageSizeOptions()}},{key:"pageSizeOptions",get:function(){return this._pageSizeOptions},set:function(t){this._pageSizeOptions=(t||[]).map((function(t){return Object(c.f)(t)})),this._updateDisplayedPageSizeOptions()}},{key:"hidePageSize",get:function(){return this._hidePageSize},set:function(t){this._hidePageSize=Object(c.c)(t)}},{key:"showFirstLastButtons",get:function(){return this._showFirstLastButtons},set:function(t){this._showFirstLastButtons=Object(c.c)(t)}}]),n}(C);return t.\u0275fac=function(e){return new(e||t)(a.Qb(v),a.Qb(a.h),a.Qb(_,8))},t.\u0275cmp=a.Kb({type:t,selectors:[["mat-paginator"]],hostAttrs:[1,"mat-paginator"],inputs:{disabled:"disabled",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",color:"color"},outputs:{page:"page"},exportAs:["matPaginator"],features:[a.Ab],decls:14,vars:14,consts:[[1,"mat-paginator-outer-container"],[1,"mat-paginator-container"],["class","mat-paginator-page-size",4,"ngIf"],[1,"mat-paginator-range-actions"],[1,"mat-paginator-range-label"],["mat-icon-button","","type","button","class","mat-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click",4,"ngIf"],["mat-icon-button","","type","button",1,"mat-paginator-navigation-previous",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["viewBox","0 0 24 24","focusable","false",1,"mat-paginator-icon"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],["mat-icon-button","","type","button",1,"mat-paginator-navigation-next",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"],["mat-icon-button","","type","button","class","mat-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click",4,"ngIf"],[1,"mat-paginator-page-size"],[1,"mat-paginator-page-size-label"],["class","mat-paginator-page-size-select",3,"appearance","color",4,"ngIf"],["class","mat-paginator-page-size-value",4,"ngIf"],[1,"mat-paginator-page-size-select",3,"appearance","color"],[3,"value","disabled","aria-label","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"mat-paginator-page-size-value"],["mat-icon-button","","type","button",1,"mat-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"],["mat-icon-button","","type","button",1,"mat-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"]],template:function(t,e){1&t&&(a.Wb(0,"div",0),a.Wb(1,"div",1),a.Oc(2,b,5,3,"div",2),a.Wb(3,"div",3),a.Wb(4,"div",4),a.Qc(5),a.Vb(),a.Oc(6,g,3,5,"button",5),a.Wb(7,"button",6),a.dc("click",(function(){return e.previousPage()})),a.gc(),a.Wb(8,"svg",7),a.Rb(9,"path",8),a.Vb(),a.Vb(),a.fc(),a.Wb(10,"button",9),a.dc("click",(function(){return e.nextPage()})),a.gc(),a.Wb(11,"svg",7),a.Rb(12,"path",10),a.Vb(),a.Vb(),a.Oc(13,m,3,5,"button",11),a.Vb(),a.Vb(),a.Vb()),2&t&&(a.Db(2),a.oc("ngIf",!e.hidePageSize),a.Db(3),a.Sc(" ",e._intl.getRangeLabel(e.pageIndex,e.pageSize,e.length)," "),a.Db(1),a.oc("ngIf",e.showFirstLastButtons),a.Db(1),a.oc("matTooltip",e._intl.previousPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),a.Eb("aria-label",e._intl.previousPageLabel),a.Db(3),a.oc("matTooltip",e._intl.nextPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),a.Eb("aria-label",e._intl.nextPageLabel),a.Db(3),a.oc("ngIf",e.showFirstLastButtons))},directives:[i.t,r.b,s.b,d.c,o.a,i.s,u.p],styles:[".mat-paginator{display:block}.mat-paginator-outer-container{display:flex}.mat-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap-reverse;width:100%}.mat-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-paginator-page-size{margin-right:0;margin-left:8px}.mat-paginator-page-size-label{margin:0 4px}.mat-paginator-page-size-select{margin:6px 4px 0 4px;width:56px}.mat-paginator-page-size-select.mat-form-field-appearance-outline{width:64px}.mat-paginator-page-size-select.mat-form-field-appearance-fill{width:64px}.mat-paginator-range-label{margin:0 32px 0 24px}.mat-paginator-range-actions{display:flex;align-items:center}.mat-paginator-icon{width:28px;fill:currentColor}[dir=rtl] .mat-paginator-icon{transform:rotate(180deg)}\n"],encapsulation:2,changeDetection:0}),t}(),x=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)},providers:[y],imports:[[i.c,r.c,o.b,s.c]]}),t}()},MJ5r:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i={production:!0,VERSION:n("kiQV").version,AUTHOR:n("kiQV").author}},MutI:function(t,e,n){"use strict";n.d(e,"a",(function(){return I})),n.d(e,"b",(function(){return P})),n.d(e,"c",(function(){return R})),n.d(e,"d",(function(){return j})),n.d(e,"e",(function(){return Q})),n.d(e,"f",(function(){return F})),n.d(e,"g",(function(){return V})),n.d(e,"h",(function(){return M})),n.d(e,"i",(function(){return L}));var i=n("ofXK"),a=n("fXoL"),r=n("FKr1"),o=n("8LU1"),s=n("XNiG"),c=n("1G5W"),l=n("JX91"),u=n("u47x"),d=n("0EQZ"),f=n("FtGj"),h=n("3Pt+"),p=n("f0Cb"),b=["*"],g='.mat-subheader{display:flex;box-sizing:border-box;padding:16px;align-items:center}.mat-list-base .mat-subheader{margin:0}.mat-list-base{padding-top:8px;display:block;-webkit-tap-highlight-color:transparent}.mat-list-base .mat-subheader{height:48px;line-height:16px}.mat-list-base .mat-subheader:first-child{margin-top:-8px}.mat-list-base .mat-list-item,.mat-list-base .mat-list-option{display:block;height:48px;-webkit-tap-highlight-color:transparent;width:100%;padding:0}.mat-list-base .mat-list-item .mat-list-item-content,.mat-list-base .mat-list-option .mat-list-item-content{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:0 16px;position:relative;height:inherit}.mat-list-base .mat-list-item .mat-list-item-content-reverse,.mat-list-base .mat-list-option .mat-list-item-content-reverse{display:flex;align-items:center;padding:0 16px;flex-direction:row-reverse;justify-content:space-around}.mat-list-base .mat-list-item .mat-list-item-ripple,.mat-list-base .mat-list-option .mat-list-item-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-list-base .mat-list-item.mat-list-item-with-avatar,.mat-list-base .mat-list-option.mat-list-item-with-avatar{height:56px}.mat-list-base .mat-list-item.mat-2-line,.mat-list-base .mat-list-option.mat-2-line{height:72px}.mat-list-base .mat-list-item.mat-3-line,.mat-list-base .mat-list-option.mat-3-line{height:88px}.mat-list-base .mat-list-item.mat-multi-line,.mat-list-base .mat-list-option.mat-multi-line{height:auto}.mat-list-base .mat-list-item.mat-multi-line .mat-list-item-content,.mat-list-base .mat-list-option.mat-multi-line .mat-list-item-content{padding-top:16px;padding-bottom:16px}.mat-list-base .mat-list-item .mat-list-text,.mat-list-base .mat-list-option .mat-list-text{display:flex;flex-direction:column;flex:auto;box-sizing:border-box;overflow:hidden;padding:0}.mat-list-base .mat-list-item .mat-list-text>*,.mat-list-base .mat-list-option .mat-list-text>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-list-base .mat-list-item .mat-list-text:empty,.mat-list-base .mat-list-option .mat-list-text:empty{display:none}.mat-list-base .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list-base .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,.mat-list-base .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list-base .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:0;padding-left:16px}[dir=rtl] .mat-list-base .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:0}.mat-list-base .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-left:0;padding-right:16px}[dir=rtl] .mat-list-base .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-right:0;padding-left:16px}.mat-list-base .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-list-base .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:16px}.mat-list-base .mat-list-item .mat-list-avatar,.mat-list-base .mat-list-option .mat-list-avatar{flex-shrink:0;width:40px;height:40px;border-radius:50%;object-fit:cover}.mat-list-base .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-list-base .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:72px;width:calc(100% - 72px)}[dir=rtl] .mat-list-base .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-list-base .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:auto;margin-right:72px}.mat-list-base .mat-list-item .mat-list-icon,.mat-list-base .mat-list-option .mat-list-icon{flex-shrink:0;width:24px;height:24px;font-size:24px;box-sizing:content-box;border-radius:50%;padding:4px}.mat-list-base .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-list-base .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:64px;width:calc(100% - 64px)}[dir=rtl] .mat-list-base .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-list-base .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:auto;margin-right:64px}.mat-list-base .mat-list-item .mat-divider,.mat-list-base .mat-list-option .mat-divider{position:absolute;bottom:0;left:0;width:100%;margin:0}[dir=rtl] .mat-list-base .mat-list-item .mat-divider,[dir=rtl] .mat-list-base .mat-list-option .mat-divider{margin-left:auto;margin-right:0}.mat-list-base .mat-list-item .mat-divider.mat-divider-inset,.mat-list-base .mat-list-option .mat-divider.mat-divider-inset{position:absolute}.mat-list-base[dense]{padding-top:4px;display:block}.mat-list-base[dense] .mat-subheader{height:40px;line-height:8px}.mat-list-base[dense] .mat-subheader:first-child{margin-top:-4px}.mat-list-base[dense] .mat-list-item,.mat-list-base[dense] .mat-list-option{display:block;height:40px;-webkit-tap-highlight-color:transparent;width:100%;padding:0}.mat-list-base[dense] .mat-list-item .mat-list-item-content,.mat-list-base[dense] .mat-list-option .mat-list-item-content{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;padding:0 16px;position:relative;height:inherit}.mat-list-base[dense] .mat-list-item .mat-list-item-content-reverse,.mat-list-base[dense] .mat-list-option .mat-list-item-content-reverse{display:flex;align-items:center;padding:0 16px;flex-direction:row-reverse;justify-content:space-around}.mat-list-base[dense] .mat-list-item .mat-list-item-ripple,.mat-list-base[dense] .mat-list-option .mat-list-item-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar{height:48px}.mat-list-base[dense] .mat-list-item.mat-2-line,.mat-list-base[dense] .mat-list-option.mat-2-line{height:60px}.mat-list-base[dense] .mat-list-item.mat-3-line,.mat-list-base[dense] .mat-list-option.mat-3-line{height:76px}.mat-list-base[dense] .mat-list-item.mat-multi-line,.mat-list-base[dense] .mat-list-option.mat-multi-line{height:auto}.mat-list-base[dense] .mat-list-item.mat-multi-line .mat-list-item-content,.mat-list-base[dense] .mat-list-option.mat-multi-line .mat-list-item-content{padding-top:16px;padding-bottom:16px}.mat-list-base[dense] .mat-list-item .mat-list-text,.mat-list-base[dense] .mat-list-option .mat-list-text{display:flex;flex-direction:column;flex:auto;box-sizing:border-box;overflow:hidden;padding:0}.mat-list-base[dense] .mat-list-item .mat-list-text>*,.mat-list-base[dense] .mat-list-option .mat-list-text>*{margin:0;padding:0;font-weight:normal;font-size:inherit}.mat-list-base[dense] .mat-list-item .mat-list-text:empty,.mat-list-base[dense] .mat-list-option .mat-list-text:empty{display:none}.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list-base[dense] .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:0;padding-left:16px}[dir=rtl] .mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-item.mat-list-option .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-option.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:0}.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-left:0;padding-right:16px}[dir=rtl] .mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-item.mat-list-option .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar .mat-list-item-content-reverse .mat-list-text,[dir=rtl] .mat-list-base[dense] .mat-list-option.mat-list-option .mat-list-item-content-reverse .mat-list-text{padding-right:0;padding-left:16px}.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-item.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content-reverse .mat-list-text,.mat-list-base[dense] .mat-list-option.mat-list-item-with-avatar.mat-list-option .mat-list-item-content .mat-list-text{padding-right:16px;padding-left:16px}.mat-list-base[dense] .mat-list-item .mat-list-avatar,.mat-list-base[dense] .mat-list-option .mat-list-avatar{flex-shrink:0;width:36px;height:36px;border-radius:50%;object-fit:cover}.mat-list-base[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,.mat-list-base[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:68px;width:calc(100% - 68px)}[dir=rtl] .mat-list-base[dense] .mat-list-item .mat-list-avatar~.mat-divider-inset,[dir=rtl] .mat-list-base[dense] .mat-list-option .mat-list-avatar~.mat-divider-inset{margin-left:auto;margin-right:68px}.mat-list-base[dense] .mat-list-item .mat-list-icon,.mat-list-base[dense] .mat-list-option .mat-list-icon{flex-shrink:0;width:20px;height:20px;font-size:20px;box-sizing:content-box;border-radius:50%;padding:4px}.mat-list-base[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,.mat-list-base[dense] .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:60px;width:calc(100% - 60px)}[dir=rtl] .mat-list-base[dense] .mat-list-item .mat-list-icon~.mat-divider-inset,[dir=rtl] .mat-list-base[dense] .mat-list-option .mat-list-icon~.mat-divider-inset{margin-left:auto;margin-right:60px}.mat-list-base[dense] .mat-list-item .mat-divider,.mat-list-base[dense] .mat-list-option .mat-divider{position:absolute;bottom:0;left:0;width:100%;margin:0}[dir=rtl] .mat-list-base[dense] .mat-list-item .mat-divider,[dir=rtl] .mat-list-base[dense] .mat-list-option .mat-divider{margin-left:auto;margin-right:0}.mat-list-base[dense] .mat-list-item .mat-divider.mat-divider-inset,.mat-list-base[dense] .mat-list-option .mat-divider.mat-divider-inset{position:absolute}.mat-nav-list a{text-decoration:none;color:inherit}.mat-nav-list .mat-list-item{cursor:pointer;outline:none}mat-action-list button{background:none;color:inherit;border:none;font:inherit;outline:inherit;-webkit-tap-highlight-color:transparent;text-align:left}[dir=rtl] mat-action-list button{text-align:right}mat-action-list button::-moz-focus-inner{border:0}mat-action-list .mat-list-item{cursor:pointer;outline:inherit}.mat-list-option:not(.mat-list-item-disabled){cursor:pointer;outline:none}.mat-list-item-disabled{pointer-events:none}.cdk-high-contrast-active .mat-list-item-disabled{opacity:.5}.cdk-high-contrast-active :host .mat-list-item-disabled{opacity:.5}.cdk-high-contrast-active .mat-selection-list:focus{outline-style:dotted}.cdk-high-contrast-active .mat-list-option:hover,.cdk-high-contrast-active .mat-list-option:focus,.cdk-high-contrast-active .mat-nav-list .mat-list-item:hover,.cdk-high-contrast-active .mat-nav-list .mat-list-item:focus,.cdk-high-contrast-active mat-action-list .mat-list-item:hover,.cdk-high-contrast-active mat-action-list .mat-list-item:focus{outline:dotted 1px}.cdk-high-contrast-active .mat-list-single-selected-option::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}.cdk-high-contrast-active [dir=rtl] .mat-list-single-selected-option::after{right:auto;left:16px}@media(hover: none){.mat-list-option:not(.mat-list-single-selected-option):not(.mat-list-item-disabled):hover,.mat-nav-list .mat-list-item:not(.mat-list-item-disabled):hover,.mat-action-list .mat-list-item:not(.mat-list-item-disabled):hover{background:none}}\n',m=[[["","mat-list-avatar",""],["","mat-list-icon",""],["","matListAvatar",""],["","matListIcon",""]],[["","mat-line",""],["","matLine",""]],"*"],v=["[mat-list-avatar], [mat-list-icon], [matListAvatar], [matListIcon]","[mat-line], [matLine]","*"],y=["text"];function _(t,e){if(1&t&&a.Rb(0,"mat-pseudo-checkbox",5),2&t){var n=a.hc();a.oc("state",n.selected?"checked":"unchecked")("disabled",n.disabled)}}var C=["*",[["","mat-list-avatar",""],["","mat-list-icon",""],["","matListAvatar",""],["","matListIcon",""]]],k=["*","[mat-list-avatar], [mat-list-icon], [matListAvatar], [matListIcon]"],x=Object(r.C)(Object(r.B)((function t(){_classCallCheck(this,t)}))),O=Object(r.B)((function t(){_classCallCheck(this,t)})),D=new a.s("MatList"),w=new a.s("MatNavList"),M=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(){var t;return _classCallCheck(this,n),(t=e.apply(this,arguments))._stateChanges=new s.a,t}return _createClass(n,[{key:"ngOnChanges",value:function(){this._stateChanges.next()}},{key:"ngOnDestroy",value:function(){this._stateChanges.complete()}}]),n}(x);return t.\u0275fac=function(e){return S(e||t)},t.\u0275cmp=a.Kb({type:t,selectors:[["mat-nav-list"]],hostAttrs:["role","navigation",1,"mat-nav-list","mat-list-base"],inputs:{disableRipple:"disableRipple",disabled:"disabled"},exportAs:["matNavList"],features:[a.Cb([{provide:w,useExisting:t}]),a.Ab,a.Bb],ngContentSelectors:b,decls:1,vars:0,template:function(t,e){1&t&&(a.nc(),a.mc(0))},styles:[g],encapsulation:2,changeDetection:0}),t}(),S=a.Yb(M),I=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t){var i;return _classCallCheck(this,n),(i=e.call(this))._elementRef=t,i._stateChanges=new s.a,"action-list"===i._getListType()&&t.nativeElement.classList.add("mat-action-list"),i}return _createClass(n,[{key:"_getListType",value:function(){var t=this._elementRef.nativeElement.nodeName.toLowerCase();return"mat-list"===t?"list":"mat-action-list"===t?"action-list":null}},{key:"ngOnChanges",value:function(){this._stateChanges.next()}},{key:"ngOnDestroy",value:function(){this._stateChanges.complete()}}]),n}(x);return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l))},t.\u0275cmp=a.Kb({type:t,selectors:[["mat-list"],["mat-action-list"]],hostAttrs:[1,"mat-list","mat-list-base"],inputs:{disableRipple:"disableRipple",disabled:"disabled"},exportAs:["matList"],features:[a.Cb([{provide:D,useExisting:t}]),a.Ab,a.Bb],ngContentSelectors:b,decls:1,vars:0,template:function(t,e){1&t&&(a.nc(),a.mc(0))},styles:[g],encapsulation:2,changeDetection:0}),t}(),P=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=a.Lb({type:t,selectors:[["","mat-list-avatar",""],["","matListAvatar",""]],hostAttrs:[1,"mat-list-avatar"]}),t}(),R=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=a.Lb({type:t,selectors:[["","mat-list-icon",""],["","matListIcon",""]],hostAttrs:[1,"mat-list-icon"]}),t}(),V=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=a.Lb({type:t,selectors:[["","mat-subheader",""],["","matSubheader",""]],hostAttrs:[1,"mat-subheader"]}),t}(),j=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a,r){var o;_classCallCheck(this,n),(o=e.call(this))._element=t,o._isInteractiveList=!1,o._destroyed=new s.a,o._disabled=!1,o._isInteractiveList=!!(a||r&&"action-list"===r._getListType()),o._list=a||r;var l=o._getHostElement();return"button"!==l.nodeName.toLowerCase()||l.hasAttribute("type")||l.setAttribute("type","button"),o._list&&o._list._stateChanges.pipe(Object(c.a)(o._destroyed)).subscribe((function(){i.markForCheck()})),o}return _createClass(n,[{key:"ngAfterContentInit",value:function(){Object(r.G)(this._lines,this._element)}},{key:"ngOnDestroy",value:function(){this._destroyed.next(),this._destroyed.complete()}},{key:"_isRippleDisabled",value:function(){return!this._isInteractiveList||this.disableRipple||!(!this._list||!this._list.disableRipple)}},{key:"_getHostElement",value:function(){return this._element.nativeElement}},{key:"disabled",get:function(){return this._disabled||!(!this._list||!this._list.disabled)},set:function(t){this._disabled=Object(o.c)(t)}}]),n}(O);return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(a.h),a.Qb(w,8),a.Qb(D,8))},t.\u0275cmp=a.Kb({type:t,selectors:[["mat-list-item"],["a","mat-list-item",""],["button","mat-list-item",""]],contentQueries:function(t,e,n){var i;1&t&&(a.Jb(n,P,!0),a.Jb(n,R,!0),a.Jb(n,r.l,!0)),2&t&&(a.yc(i=a.ec())&&(e._avatar=i.first),a.yc(i=a.ec())&&(e._icon=i.first),a.yc(i=a.ec())&&(e._lines=i))},hostAttrs:[1,"mat-list-item","mat-focus-indicator"],hostVars:6,hostBindings:function(t,e){2&t&&a.Ib("mat-list-item-disabled",e.disabled)("mat-list-item-avatar",e._avatar||e._icon)("mat-list-item-with-avatar",e._avatar||e._icon)},inputs:{disableRipple:"disableRipple",disabled:"disabled"},exportAs:["matListItem"],features:[a.Ab],ngContentSelectors:v,decls:6,vars:2,consts:[[1,"mat-list-item-content"],["mat-ripple","",1,"mat-list-item-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-list-text"]],template:function(t,e){1&t&&(a.nc(m),a.Wb(0,"div",0),a.Rb(1,"div",1),a.mc(2),a.Wb(3,"div",2),a.mc(4,1),a.Vb(),a.mc(5,2),a.Vb()),2&t&&(a.Db(1),a.oc("matRippleTrigger",e._getHostElement())("matRippleDisabled",e._isRippleDisabled()))},directives:[r.u],encapsulation:2,changeDetection:0}),t}(),A=Object(r.B)((function t(){_classCallCheck(this,t)})),W=Object(r.B)((function t(){_classCallCheck(this,t)})),T={provide:h.s,useExisting:Object(a.X)((function(){return L})),multi:!0},E=function t(e,n,i){_classCallCheck(this,t),this.source=e,this.option=n,this.options=i},F=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a){var r;return _classCallCheck(this,n),(r=e.call(this))._element=t,r._changeDetector=i,r.selectionList=a,r._selected=!1,r._disabled=!1,r._hasFocus=!1,r.checkboxPosition="after",r._inputsInitialized=!1,r}return _createClass(n,[{key:"ngOnInit",value:function(){var t=this,e=this.selectionList;e._value&&e._value.some((function(n){return e.compareWith(n,t._value)}))&&this._setSelected(!0);var n=this._selected;Promise.resolve().then((function(){(t._selected||n)&&(t.selected=!0,t._changeDetector.markForCheck())})),this._inputsInitialized=!0}},{key:"ngAfterContentInit",value:function(){Object(r.G)(this._lines,this._element)}},{key:"ngOnDestroy",value:function(){var t=this;this.selected&&Promise.resolve().then((function(){t.selected=!1}));var e=this._hasFocus,n=this.selectionList._removeOptionFromList(this);e&&n&&n.focus()}},{key:"toggle",value:function(){this.selected=!this.selected}},{key:"focus",value:function(){this._element.nativeElement.focus()}},{key:"getLabel",value:function(){return this._text&&this._text.nativeElement.textContent||""}},{key:"_isRippleDisabled",value:function(){return this.disabled||this.disableRipple||this.selectionList.disableRipple}},{key:"_handleClick",value:function(){this.disabled||!this.selectionList.multiple&&this.selected||(this.toggle(),this.selectionList._emitChangeEvent([this]))}},{key:"_handleFocus",value:function(){this.selectionList._setFocusedOption(this),this._hasFocus=!0}},{key:"_handleBlur",value:function(){this.selectionList._onTouched(),this._hasFocus=!1}},{key:"_getHostElement",value:function(){return this._element.nativeElement}},{key:"_setSelected",value:function(t){return t!==this._selected&&(this._selected=t,t?this.selectionList.selectedOptions.select(this):this.selectionList.selectedOptions.deselect(this),this._changeDetector.markForCheck(),!0)}},{key:"_markForCheck",value:function(){this._changeDetector.markForCheck()}},{key:"color",get:function(){return this._color||this.selectionList.color},set:function(t){this._color=t}},{key:"value",get:function(){return this._value},set:function(t){this.selected&&!this.selectionList.compareWith(t,this.value)&&this._inputsInitialized&&(this.selected=!1),this._value=t}},{key:"disabled",get:function(){return this._disabled||this.selectionList&&this.selectionList.disabled},set:function(t){var e=Object(o.c)(t);e!==this._disabled&&(this._disabled=e,this._changeDetector.markForCheck())}},{key:"selected",get:function(){return this.selectionList.selectedOptions.isSelected(this)},set:function(t){var e=Object(o.c)(t);e!==this._selected&&(this._setSelected(e),this.selectionList._reportValueChange())}}]),n}(W);return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(a.h),a.Qb(Object(a.X)((function(){return L}))))},t.\u0275cmp=a.Kb({type:t,selectors:[["mat-list-option"]],contentQueries:function(t,e,n){var i;1&t&&(a.Jb(n,P,!0),a.Jb(n,R,!0),a.Jb(n,r.l,!0)),2&t&&(a.yc(i=a.ec())&&(e._avatar=i.first),a.yc(i=a.ec())&&(e._icon=i.first),a.yc(i=a.ec())&&(e._lines=i))},viewQuery:function(t,e){var n;1&t&&a.Xc(y,!0),2&t&&a.yc(n=a.ec())&&(e._text=n.first)},hostAttrs:["role","option",1,"mat-list-item","mat-list-option","mat-focus-indicator"],hostVars:15,hostBindings:function(t,e){1&t&&a.dc("focus",(function(){return e._handleFocus()}))("blur",(function(){return e._handleBlur()}))("click",(function(){return e._handleClick()})),2&t&&(a.Eb("aria-selected",e.selected)("aria-disabled",e.disabled)("tabindex",-1),a.Ib("mat-list-item-disabled",e.disabled)("mat-list-item-with-avatar",e._avatar||e._icon)("mat-primary","primary"===e.color)("mat-accent","primary"!==e.color&&"warn"!==e.color)("mat-warn","warn"===e.color)("mat-list-single-selected-option",e.selected&&!e.selectionList.multiple))},inputs:{disableRipple:"disableRipple",checkboxPosition:"checkboxPosition",color:"color",value:"value",selected:"selected",disabled:"disabled"},exportAs:["matListOption"],features:[a.Ab],ngContentSelectors:k,decls:7,vars:5,consts:[[1,"mat-list-item-content"],["mat-ripple","",1,"mat-list-item-ripple",3,"matRippleTrigger","matRippleDisabled"],[3,"state","disabled",4,"ngIf"],[1,"mat-list-text"],["text",""],[3,"state","disabled"]],template:function(t,e){1&t&&(a.nc(C),a.Wb(0,"div",0),a.Rb(1,"div",1),a.Oc(2,_,1,2,"mat-pseudo-checkbox",2),a.Wb(3,"div",3,4),a.mc(5),a.Vb(),a.mc(6,1),a.Vb()),2&t&&(a.Ib("mat-list-item-content-reverse","after"==e.checkboxPosition),a.Db(1),a.oc("matRippleTrigger",e._getHostElement())("matRippleDisabled",e._isRippleDisabled()),a.Db(1),a.oc("ngIf",e.selectionList.multiple))},directives:[r.u,i.t,r.s],encapsulation:2,changeDetection:0}),t}(),L=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r,o){var c;return _classCallCheck(this,n),(c=e.call(this))._element=t,c._changeDetector=r,c._focusMonitor=o,c._multiple=!0,c._contentInitialized=!1,c.selectionChange=new a.o,c.tabIndex=0,c.color="accent",c.compareWith=function(t,e){return t===e},c._disabled=!1,c.selectedOptions=new d.c(c._multiple),c._tabIndex=-1,c._onChange=function(t){},c._destroyed=new s.a,c._onTouched=function(){},c}return _createClass(n,[{key:"ngAfterContentInit",value:function(){var t,e=this;this._contentInitialized=!0,this._keyManager=new u.g(this.options).withWrap().withTypeAhead().withHomeAndEnd().skipPredicate((function(){return!1})).withAllowedModifierKeys(["shiftKey"]),this._value&&this._setOptionsFromValues(this._value),this._keyManager.tabOut.pipe(Object(c.a)(this._destroyed)).subscribe((function(){e._allowFocusEscape()})),this.options.changes.pipe(Object(l.a)(null),Object(c.a)(this._destroyed)).subscribe((function(){e._updateTabIndex()})),this.selectedOptions.changed.pipe(Object(c.a)(this._destroyed)).subscribe((function(t){if(t.added){var e,n=_createForOfIteratorHelper(t.added);try{for(n.s();!(e=n.n()).done;){e.value.selected=!0}}catch(r){n.e(r)}finally{n.f()}}if(t.removed){var i,a=_createForOfIteratorHelper(t.removed);try{for(a.s();!(i=a.n()).done;){i.value.selected=!1}}catch(r){a.e(r)}finally{a.f()}}})),null===(t=this._focusMonitor)||void 0===t||t.monitor(this._element).pipe(Object(c.a)(this._destroyed)).subscribe((function(t){if("keyboard"===t||"program"===t){var n=e._keyManager.activeItemIndex;n&&-1!==n?e._keyManager.setActiveItem(n):e._keyManager.setFirstItemActive()}}))}},{key:"ngOnChanges",value:function(t){var e=t.disableRipple,n=t.color;(e&&!e.firstChange||n&&!n.firstChange)&&this._markOptionsForCheck()}},{key:"ngOnDestroy",value:function(){var t;null===(t=this._focusMonitor)||void 0===t||t.stopMonitoring(this._element),this._destroyed.next(),this._destroyed.complete(),this._isDestroyed=!0}},{key:"focus",value:function(t){this._element.nativeElement.focus(t)}},{key:"selectAll",value:function(){this._setAllOptionsSelected(!0)}},{key:"deselectAll",value:function(){this._setAllOptionsSelected(!1)}},{key:"_setFocusedOption",value:function(t){this._keyManager.updateActiveItem(t)}},{key:"_removeOptionFromList",value:function(t){var e=this._getOptionIndex(t);return e>-1&&this._keyManager.activeItemIndex===e&&(e>0?this._keyManager.updateActiveItem(e-1):0===e&&this.options.length>1&&this._keyManager.updateActiveItem(Math.min(e+1,this.options.length-1))),this._keyManager.activeItem}},{key:"_keydown",value:function(t){var e=t.keyCode,n=this._keyManager,i=n.activeItemIndex,a=Object(f.v)(t);switch(e){case f.q:case f.g:a||n.isTyping()||(this._toggleFocusedOption(),t.preventDefault());break;default:if(e===f.a&&this.multiple&&Object(f.v)(t,"ctrlKey")&&!n.isTyping()){var r=this.options.some((function(t){return!t.disabled&&!t.selected}));this._setAllOptionsSelected(r,!0,!0),t.preventDefault()}else n.onKeydown(t)}this.multiple&&(e===f.s||e===f.e)&&t.shiftKey&&n.activeItemIndex!==i&&this._toggleFocusedOption()}},{key:"_reportValueChange",value:function(){if(this.options&&!this._isDestroyed){var t=this._getSelectedOptionValues();this._onChange(t),this._value=t}}},{key:"_emitChangeEvent",value:function(t){this.selectionChange.emit(new E(this,t[0],t))}},{key:"writeValue",value:function(t){this._value=t,this.options&&this._setOptionsFromValues(t||[])}},{key:"setDisabledState",value:function(t){this.disabled=t}},{key:"registerOnChange",value:function(t){this._onChange=t}},{key:"registerOnTouched",value:function(t){this._onTouched=t}},{key:"_setOptionsFromValues",value:function(t){var e=this;this.options.forEach((function(t){return t._setSelected(!1)})),t.forEach((function(t){var n=e.options.find((function(n){return!n.selected&&e.compareWith(n.value,t)}));n&&n._setSelected(!0)}))}},{key:"_getSelectedOptionValues",value:function(){return this.options.filter((function(t){return t.selected})).map((function(t){return t.value}))}},{key:"_toggleFocusedOption",value:function(){var t=this._keyManager.activeItemIndex;if(null!=t&&this._isValidIndex(t)){var e=this.options.toArray()[t];!e||e.disabled||!this._multiple&&e.selected||(e.toggle(),this._emitChangeEvent([e]))}}},{key:"_setAllOptionsSelected",value:function(t,e,n){var i=[];this.options.forEach((function(n){e&&n.disabled||!n._setSelected(t)||i.push(n)})),i.length&&(this._reportValueChange(),n&&this._emitChangeEvent(i))}},{key:"_isValidIndex",value:function(t){return t>=0&&t<this.options.length}},{key:"_getOptionIndex",value:function(t){return this.options.toArray().indexOf(t)}},{key:"_markOptionsForCheck",value:function(){this.options&&this.options.forEach((function(t){return t._markForCheck()}))}},{key:"_allowFocusEscape",value:function(){var t=this;this._tabIndex=-1,setTimeout((function(){t._tabIndex=0,t._changeDetector.markForCheck()}))}},{key:"_updateTabIndex",value:function(){this._tabIndex=0===this.options.length?-1:0}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=Object(o.c)(t),this._markOptionsForCheck()}},{key:"multiple",get:function(){return this._multiple},set:function(t){var e=Object(o.c)(t);e!==this._multiple&&(this._multiple=e,this.selectedOptions=new d.c(this._multiple,this.selectedOptions.selected))}}]),n}(A);return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.bc("tabindex"),a.Qb(a.h),a.Qb(u.h))},t.\u0275cmp=a.Kb({type:t,selectors:[["mat-selection-list"]],contentQueries:function(t,e,n){var i;1&t&&a.Jb(n,F,!0),2&t&&a.yc(i=a.ec())&&(e.options=i)},hostAttrs:["role","listbox",1,"mat-selection-list","mat-list-base"],hostVars:3,hostBindings:function(t,e){1&t&&a.dc("keydown",(function(t){return e._keydown(t)})),2&t&&a.Eb("aria-multiselectable",e.multiple)("aria-disabled",e.disabled.toString())("tabindex",e._tabIndex)},inputs:{disableRipple:"disableRipple",tabIndex:"tabIndex",color:"color",compareWith:"compareWith",disabled:"disabled",multiple:"multiple"},outputs:{selectionChange:"selectionChange"},exportAs:["matSelectionList"],features:[a.Cb([T]),a.Ab,a.Bb],ngContentSelectors:b,decls:1,vars:0,template:function(t,e){1&t&&(a.nc(),a.mc(0))},styles:[g],encapsulation:2,changeDetection:0}),t}(),Q=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)},imports:[[r.m,r.v,r.k,r.t,i.c],r.m,r.k,r.t,p.b]}),t}()},NFeN:function(t,e,n){"use strict";n.d(e,"a",(function(){return V})),n.d(e,"b",(function(){return j})),n.d(e,"c",(function(){return O}));var i=n("fXoL"),a=n("FKr1"),r=n("8LU1"),o=n("ofXK"),s=n("LRne"),c=n("z6cu"),l=n("cp0P"),u=n("quSY"),d=n("vkgz"),f=n("lJxs"),h=n("JIr8"),p=n("nYR2"),b=n("w1tV"),g=n("IzEk"),m=n("tk/3"),v=n("jhN1"),y=["*"];function _(t){return Error('Unable to find icon with the name "'.concat(t,'"'))}function C(t){return Error("The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was \"".concat(t,'".'))}function k(t){return Error("The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was \"".concat(t,'".'))}var x=function t(e,n,i){_classCallCheck(this,t),this.url=e,this.svgText=n,this.options=i},O=function(){var t=function(){function t(e,n,i,a){_classCallCheck(this,t),this._httpClient=e,this._sanitizer=n,this._errorHandler=a,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._defaultFontSetClass="material-icons",this._document=i}return _createClass(t,[{key:"addSvgIcon",value:function(t,e,n){return this.addSvgIconInNamespace("",t,e,n)}},{key:"addSvgIconLiteral",value:function(t,e,n){return this.addSvgIconLiteralInNamespace("",t,e,n)}},{key:"addSvgIconInNamespace",value:function(t,e,n,i){return this._addSvgIconConfig(t,e,new x(n,null,i))}},{key:"addSvgIconLiteralInNamespace",value:function(t,e,n,a){var r=this._sanitizer.sanitize(i.M.HTML,n);if(!r)throw k(n);return this._addSvgIconConfig(t,e,new x("",r,a))}},{key:"addSvgIconSet",value:function(t,e){return this.addSvgIconSetInNamespace("",t,e)}},{key:"addSvgIconSetLiteral",value:function(t,e){return this.addSvgIconSetLiteralInNamespace("",t,e)}},{key:"addSvgIconSetInNamespace",value:function(t,e,n){return this._addSvgIconSetConfig(t,new x(e,null,n))}},{key:"addSvgIconSetLiteralInNamespace",value:function(t,e,n){var a=this._sanitizer.sanitize(i.M.HTML,e);if(!a)throw k(e);return this._addSvgIconSetConfig(t,new x("",a,n))}},{key:"registerFontClassAlias",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return this._fontCssClassesByAlias.set(t,e),this}},{key:"classNameForFontAlias",value:function(t){return this._fontCssClassesByAlias.get(t)||t}},{key:"setDefaultFontSetClass",value:function(t){return this._defaultFontSetClass=t,this}},{key:"getDefaultFontSetClass",value:function(){return this._defaultFontSetClass}},{key:"getSvgIconFromUrl",value:function(t){var e=this,n=this._sanitizer.sanitize(i.M.RESOURCE_URL,t);if(!n)throw C(t);var a=this._cachedIconsByUrl.get(n);return a?Object(s.a)(D(a)):this._loadSvgIconFromConfig(new x(t,null)).pipe(Object(d.a)((function(t){return e._cachedIconsByUrl.set(n,t)})),Object(f.a)((function(t){return D(t)})))}},{key:"getNamedSvgIcon",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=w(e,t),i=this._svgIconConfigs.get(n);if(i)return this._getSvgFromConfig(i);var a=this._iconSetConfigs.get(e);return a?this._getSvgFromIconSetConfigs(t,a):Object(c.a)(_(n))}},{key:"ngOnDestroy",value:function(){this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}},{key:"_getSvgFromConfig",value:function(t){return t.svgText?Object(s.a)(D(this._svgElementFromConfig(t))):this._loadSvgIconFromConfig(t).pipe(Object(f.a)((function(t){return D(t)})))}},{key:"_getSvgFromIconSetConfigs",value:function(t,e){var n=this,a=this._extractIconWithNameFromAnySet(t,e);if(a)return Object(s.a)(a);var r=e.filter((function(t){return!t.svgText})).map((function(t){return n._loadSvgIconSetFromConfig(t).pipe(Object(h.a)((function(e){var a=n._sanitizer.sanitize(i.M.RESOURCE_URL,t.url);return n._errorHandler.handleError(new Error("Loading icon set URL: ".concat(a," failed: ").concat(e.message))),Object(s.a)(null)})))}));return Object(l.a)(r).pipe(Object(f.a)((function(){var i=n._extractIconWithNameFromAnySet(t,e);if(!i)throw _(t);return i})))}},{key:"_extractIconWithNameFromAnySet",value:function(t,e){for(var n=e.length-1;n>=0;n--){var i=e[n];if(i.svgText&&i.svgText.indexOf(t)>-1){var a=this._svgElementFromConfig(i),r=this._extractSvgIconFromSet(a,t,i.options);if(r)return r}}return null}},{key:"_loadSvgIconFromConfig",value:function(t){var e=this;return this._fetchIcon(t).pipe(Object(d.a)((function(e){return t.svgText=e})),Object(f.a)((function(){return e._svgElementFromConfig(t)})))}},{key:"_loadSvgIconSetFromConfig",value:function(t){return t.svgText?Object(s.a)(null):this._fetchIcon(t).pipe(Object(d.a)((function(e){return t.svgText=e})))}},{key:"_extractSvgIconFromSet",value:function(t,e,n){var i=t.querySelector('[id="'.concat(e,'"]'));if(!i)return null;var a=i.cloneNode(!0);if(a.removeAttribute("id"),"svg"===a.nodeName.toLowerCase())return this._setSvgAttributes(a,n);if("symbol"===a.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(a),n);var r=this._svgElementFromString("<svg></svg>");return r.appendChild(a),this._setSvgAttributes(r,n)}},{key:"_svgElementFromString",value:function(t){var e=this._document.createElement("DIV");e.innerHTML=t;var n=e.querySelector("svg");if(!n)throw Error("<svg> tag not found");return n}},{key:"_toSvgElement",value:function(t){for(var e=this._svgElementFromString("<svg></svg>"),n=t.attributes,i=0;i<n.length;i++){var a=n[i],r=a.name,o=a.value;"id"!==r&&e.setAttribute(r,o)}for(var s=0;s<t.childNodes.length;s++)t.childNodes[s].nodeType===this._document.ELEMENT_NODE&&e.appendChild(t.childNodes[s].cloneNode(!0));return e}},{key:"_setSvgAttributes",value:function(t,e){return t.setAttribute("fit",""),t.setAttribute("height","100%"),t.setAttribute("width","100%"),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.setAttribute("focusable","false"),e&&e.viewBox&&t.setAttribute("viewBox",e.viewBox),t}},{key:"_fetchIcon",value:function(t){var e,n=this,a=t.url,r=t.options,o=null!==(e=null==r?void 0:r.withCredentials)&&void 0!==e&&e;if(!this._httpClient)throw Error("Could not find HttpClient provider for use with Angular Material icons. Please include the HttpClientModule from @angular/common/http in your app imports.");if(null==a)throw Error('Cannot fetch icon from URL "'.concat(a,'".'));var s=this._sanitizer.sanitize(i.M.RESOURCE_URL,a);if(!s)throw C(a);var c=this._inProgressUrlFetches.get(s);if(c)return c;var l=this._httpClient.get(s,{responseType:"text",withCredentials:o}).pipe(Object(p.a)((function(){return n._inProgressUrlFetches.delete(s)})),Object(b.a)());return this._inProgressUrlFetches.set(s,l),l}},{key:"_addSvgIconConfig",value:function(t,e,n){return this._svgIconConfigs.set(w(t,e),n),this}},{key:"_addSvgIconSetConfig",value:function(t,e){var n=this._iconSetConfigs.get(t);return n?n.push(e):this._iconSetConfigs.set(t,[e]),this}},{key:"_svgElementFromConfig",value:function(t){if(!t.svgElement){var e=this._svgElementFromString(t.svgText);this._setSvgAttributes(e,t.options),t.svgElement=e}return t.svgElement}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.ac(m.b,8),i.ac(v.b),i.ac(o.e,8),i.ac(i.n))},t.\u0275prov=Object(i.Mb)({factory:function(){return new t(Object(i.ac)(m.b,8),Object(i.ac)(v.b),Object(i.ac)(o.e,8),Object(i.ac)(i.n))},token:t,providedIn:"root"}),t}();function D(t){return t.cloneNode(!0)}function w(t,e){return t+":"+e}var M=Object(a.A)((function t(e){_classCallCheck(this,t),this._elementRef=e})),S=new i.s("mat-icon-location",{providedIn:"root",factory:function(){var t=Object(i.Y)(o.e),e=t?t.location:null;return{getPathname:function(){return e?e.pathname+e.search:""}}}}),I=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],P=I.map((function(t){return"[".concat(t,"]")})).join(", "),R=/^url\(['"]?#(.*?)['"]?\)$/,V=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a,r,o){var s;return _classCallCheck(this,n),(s=e.call(this,t))._iconRegistry=i,s._location=r,s._errorHandler=o,s._inline=!1,s._currentIconFetch=u.a.EMPTY,a||t.nativeElement.setAttribute("aria-hidden","true"),s}return _createClass(n,[{key:"_splitIconName",value:function(t){if(!t)return["",""];var e=t.split(":");switch(e.length){case 1:return["",e[0]];case 2:return e;default:throw Error('Invalid icon name: "'.concat(t,'"'))}}},{key:"ngOnInit",value:function(){this._updateFontIconClasses()}},{key:"ngAfterViewChecked",value:function(){var t=this._elementsWithExternalReferences;if(t&&t.size){var e=this._location.getPathname();e!==this._previousPath&&(this._previousPath=e,this._prependPathToReferences(e))}}},{key:"ngOnDestroy",value:function(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}},{key:"_usingFontIcon",value:function(){return!this.svgIcon}},{key:"_setSvgElement",value:function(t){this._clearSvgElement();for(var e=t.querySelectorAll("style"),n=0;n<e.length;n++)e[n].textContent+=" ";var i=this._location.getPathname();this._previousPath=i,this._cacheChildrenWithExternalReferences(t),this._prependPathToReferences(i),this._elementRef.nativeElement.appendChild(t)}},{key:"_clearSvgElement",value:function(){var t=this._elementRef.nativeElement,e=t.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();e--;){var n=t.childNodes[e];1===n.nodeType&&"svg"!==n.nodeName.toLowerCase()||t.removeChild(n)}}},{key:"_updateFontIconClasses",value:function(){if(this._usingFontIcon()){var t=this._elementRef.nativeElement,e=this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet):this._iconRegistry.getDefaultFontSetClass();e!=this._previousFontSetClass&&(this._previousFontSetClass&&t.classList.remove(this._previousFontSetClass),e&&t.classList.add(e),this._previousFontSetClass=e),this.fontIcon!=this._previousFontIconClass&&(this._previousFontIconClass&&t.classList.remove(this._previousFontIconClass),this.fontIcon&&t.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}}},{key:"_cleanupFontValue",value:function(t){return"string"==typeof t?t.trim().split(" ")[0]:t}},{key:"_prependPathToReferences",value:function(t){var e=this._elementsWithExternalReferences;e&&e.forEach((function(e,n){e.forEach((function(e){n.setAttribute(e.name,"url('".concat(t,"#").concat(e.value,"')"))}))}))}},{key:"_cacheChildrenWithExternalReferences",value:function(t){for(var e=t.querySelectorAll(P),n=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map,i=function(t){I.forEach((function(i){var a=e[t],r=a.getAttribute(i),o=r?r.match(R):null;if(o){var s=n.get(a);s||(s=[],n.set(a,s)),s.push({name:i,value:o[1]})}}))},a=0;a<e.length;a++)i(a)}},{key:"_updateSvgIcon",value:function(t){var e=this;if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),t){var n=_slicedToArray(this._splitIconName(t),2),i=n[0],a=n[1];i&&(this._svgNamespace=i),a&&(this._svgName=a),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(a,i).pipe(Object(g.a)(1)).subscribe((function(t){return e._setSvgElement(t)}),(function(t){e._errorHandler.handleError(new Error("Error retrieving icon ".concat(i,":").concat(a,"! ").concat(t.message)))}))}}},{key:"inline",get:function(){return this._inline},set:function(t){this._inline=Object(r.c)(t)}},{key:"svgIcon",get:function(){return this._svgIcon},set:function(t){t!==this._svgIcon&&(t?this._updateSvgIcon(t):this._svgIcon&&this._clearSvgElement(),this._svgIcon=t)}},{key:"fontSet",get:function(){return this._fontSet},set:function(t){var e=this._cleanupFontValue(t);e!==this._fontSet&&(this._fontSet=e,this._updateFontIconClasses())}},{key:"fontIcon",get:function(){return this._fontIcon},set:function(t){var e=this._cleanupFontValue(t);e!==this._fontIcon&&(this._fontIcon=e,this._updateFontIconClasses())}}]),n}(M);return t.\u0275fac=function(e){return new(e||t)(i.Qb(i.l),i.Qb(O),i.bc("aria-hidden"),i.Qb(S),i.Qb(i.n))},t.\u0275cmp=i.Kb({type:t,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:7,hostBindings:function(t,e){2&t&&(i.Eb("data-mat-icon-type",e._usingFontIcon()?"font":"svg")("data-mat-icon-name",e._svgName||e.fontIcon)("data-mat-icon-namespace",e._svgNamespace||e.fontSet),i.Ib("mat-icon-inline",e.inline)("mat-icon-no-color","primary"!==e.color&&"accent"!==e.color&&"warn"!==e.color))},inputs:{color:"color",inline:"inline",svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],features:[i.Ab],ngContentSelectors:y,decls:1,vars:0,template:function(t,e){1&t&&(i.nc(),i.mc(0))},styles:[".mat-icon{background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}\n"],encapsulation:2,changeDetection:0}),t}(),j=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=i.Ob({type:t}),t.\u0275inj=i.Nb({factory:function(e){return new(e||t)},imports:[[a.k],a.k]}),t}()},NJ4a:function(t,e,n){"use strict";function i(t){setTimeout((function(){throw t}),0)}n.d(e,"a",(function(){return i}))},NXyV:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n("HDdC"),a=n("Cfvw"),r=n("EY2u");function o(t){return new i.a((function(e){var n;try{n=t()}catch(i){return void e.error(i)}return(n?Object(a.a)(n):Object(r.b)()).subscribe(e)}))}},NpuA:function(t,e,n){var i,a;void 0===(a="function"==typeof(i=function t(){"use strict";var e="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:{},n=!e.document&&!!e.postMessage,i=n&&/blob:/i.test((e.location||{}).protocol),a={},r=0,o={parse:function(n,i){var s=(i=i||{}).dynamicTyping||!1;if(C(s)&&(i.dynamicTypingFunction=s,s={}),i.dynamicTyping=s,i.transform=!!C(i.transform)&&i.transform,i.worker&&o.WORKERS_SUPPORTED){var c=function(){if(!o.WORKERS_SUPPORTED)return!1;var n,i,s=(n=e.URL||e.webkitURL||null,i=t.toString(),o.BLOB_URL||(o.BLOB_URL=n.createObjectURL(new Blob(["(",i,")();"],{type:"text/javascript"})))),c=new e.Worker(s);return c.onmessage=g,c.id=r++,a[c.id]=c}();return c.userStep=i.step,c.userChunk=i.chunk,c.userComplete=i.complete,c.userError=i.error,i.step=C(i.step),i.chunk=C(i.chunk),i.complete=C(i.complete),i.error=C(i.error),delete i.worker,void c.postMessage({input:n,config:i,workerId:c.id})}var h=null;return"string"==typeof n?h=i.download?new l(i):new d(i):!0===n.readable&&C(n.read)&&C(n.on)?h=new f(i):(e.File&&n instanceof File||n instanceof Object)&&(h=new u(i)),h.stream(n)},unparse:function(t,e){var n=!1,i=!0,a=",",r="\r\n",s='"',c=s+s,l=!1,u=null,d=!1;!function(){if("object"==typeof e){if("string"!=typeof e.delimiter||o.BAD_DELIMITERS.filter((function(t){return-1!==e.delimiter.indexOf(t)})).length||(a=e.delimiter),("boolean"==typeof e.quotes||"function"==typeof e.quotes||Array.isArray(e.quotes))&&(n=e.quotes),"boolean"!=typeof e.skipEmptyLines&&"string"!=typeof e.skipEmptyLines||(l=e.skipEmptyLines),"string"==typeof e.newline&&(r=e.newline),"string"==typeof e.quoteChar&&(s=e.quoteChar),"boolean"==typeof e.header&&(i=e.header),Array.isArray(e.columns)){if(0===e.columns.length)throw new Error("Option columns is empty");u=e.columns}void 0!==e.escapeChar&&(c=e.escapeChar+s),"boolean"==typeof e.escapeFormulae&&(d=e.escapeFormulae)}}();var f=new RegExp(p(s),"g");if("string"==typeof t&&(t=JSON.parse(t)),Array.isArray(t)){if(!t.length||Array.isArray(t[0]))return b(null,t,l);if("object"==typeof t[0])return b(u||h(t[0]),t,l)}else if("object"==typeof t)return"string"==typeof t.data&&(t.data=JSON.parse(t.data)),Array.isArray(t.data)&&(t.fields||(t.fields=t.meta&&t.meta.fields),t.fields||(t.fields=Array.isArray(t.data[0])?t.fields:h(t.data[0])),Array.isArray(t.data[0])||"object"==typeof t.data[0]||(t.data=[t.data])),b(t.fields||[],t.data||[],l);throw new Error("Unable to serialize unrecognized input");function h(t){if("object"!=typeof t)return[];var e=[];for(var n in t)e.push(n);return e}function b(t,e,n){var o="";"string"==typeof t&&(t=JSON.parse(t)),"string"==typeof e&&(e=JSON.parse(e));var s=Array.isArray(t)&&0<t.length,c=!Array.isArray(e[0]);if(s&&i){for(var l=0;l<t.length;l++)0<l&&(o+=a),o+=g(t[l],l);0<e.length&&(o+=r)}for(var u=0;u<e.length;u++){var d=s?t.length:e[u].length,f=!1,h=s?0===Object.keys(e[u]).length:0===e[u].length;if(n&&!s&&(f="greedy"===n?""===e[u].join("").trim():1===e[u].length&&0===e[u][0].length),"greedy"===n&&s){for(var p=[],b=0;b<d;b++)p.push(e[u][c?t[b]:b]);f=""===p.join("").trim()}if(!f){for(var m=0;m<d;m++)0<m&&!h&&(o+=a),o+=g(e[u][s&&c?t[m]:m],m);u<e.length-1&&(!n||0<d&&!h)&&(o+=r)}}return o}function g(t,e){if(null==t)return"";if(t.constructor===Date)return JSON.stringify(t).slice(1,25);!0===d&&"string"==typeof t&&null!==t.match(/^[=+\-@].*$/)&&(t="'"+t);var i=t.toString().replace(f,c);return"boolean"==typeof n&&n||"function"==typeof n&&n(t,e)||Array.isArray(n)&&n[e]||function(t,e){for(var n=0;n<e.length;n++)if(-1<t.indexOf(e[n]))return!0;return!1}(i,o.BAD_DELIMITERS)||-1<i.indexOf(a)||" "===i.charAt(0)||" "===i.charAt(i.length-1)?s+i+s:i}}};if(o.RECORD_SEP=String.fromCharCode(30),o.UNIT_SEP=String.fromCharCode(31),o.BYTE_ORDER_MARK="\ufeff",o.BAD_DELIMITERS=["\r","\n",'"',o.BYTE_ORDER_MARK],o.WORKERS_SUPPORTED=!n&&!!e.Worker,o.NODE_STREAM_INPUT=1,o.LocalChunkSize=10485760,o.RemoteChunkSize=5242880,o.DefaultDelimiter=",",o.Parser=b,o.ParserHandle=h,o.NetworkStreamer=l,o.FileStreamer=u,o.StringStreamer=d,o.ReadableStreamStreamer=f,e.jQuery){var s=e.jQuery;s.fn.parse=function(t){var n=t.config||{},i=[];return this.each((function(t){if("INPUT"!==s(this).prop("tagName").toUpperCase()||"file"!==s(this).attr("type").toLowerCase()||!e.FileReader||!this.files||0===this.files.length)return!0;for(var a=0;a<this.files.length;a++)i.push({file:this.files[a],inputElem:this,instanceConfig:s.extend({},n)})})),a(),this;function a(){if(0!==i.length){var e,n,a,c=i[0];if(C(t.before)){var l=t.before(c.file,c.inputElem);if("object"==typeof l){if("abort"===l.action)return e=c.file,n=c.inputElem,a=l.reason,void(C(t.error)&&t.error({name:"AbortError"},e,n,a));if("skip"===l.action)return void r();"object"==typeof l.config&&(c.instanceConfig=s.extend(c.instanceConfig,l.config))}else if("skip"===l)return void r()}var u=c.instanceConfig.complete;c.instanceConfig.complete=function(t){C(u)&&u(t,c.file,c.inputElem),r()},o.parse(c.file,c.instanceConfig)}else C(t.complete)&&t.complete()}function r(){i.splice(0,1),a()}}}function c(t){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(t){var e=y(t);e.chunkSize=parseInt(e.chunkSize),t.step||t.chunk||(e.chunkSize=null),this._handle=new h(e),(this._handle.streamer=this)._config=e}).call(this,t),this.parseChunk=function(t,n){if(this.isFirstChunk&&C(this._config.beforeFirstChunk)){var a=this._config.beforeFirstChunk(t);void 0!==a&&(t=a)}this.isFirstChunk=!1,this._halted=!1;var r=this._partialLine+t;this._partialLine="";var s=this._handle.parse(r,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var c=s.meta.cursor;this._finished||(this._partialLine=r.substring(c-this._baseIndex),this._baseIndex=c),s&&s.data&&(this._rowCount+=s.data.length);var l=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(i)e.postMessage({results:s,workerId:o.WORKER_ID,finished:l});else if(C(this._config.chunk)&&!n){if(this._config.chunk(s,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);s=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(s.data),this._completeResults.errors=this._completeResults.errors.concat(s.errors),this._completeResults.meta=s.meta),this._completed||!l||!C(this._config.complete)||s&&s.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),l||s&&s.meta.paused||this._nextChunk(),s}this._halted=!0},this._sendError=function(t){C(this._config.error)?this._config.error(t):i&&this._config.error&&e.postMessage({workerId:o.WORKER_ID,error:t,finished:!1})}}function l(t){var e;(t=t||{}).chunkSize||(t.chunkSize=o.RemoteChunkSize),c.call(this,t),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(t){this._input=t,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(e=new XMLHttpRequest,this._config.withCredentials&&(e.withCredentials=this._config.withCredentials),n||(e.onload=_(this._chunkLoaded,this),e.onerror=_(this._chunkError,this)),e.open(this._config.downloadRequestBody?"POST":"GET",this._input,!n),this._config.downloadRequestHeaders){var t=this._config.downloadRequestHeaders;for(var i in t)e.setRequestHeader(i,t[i])}this._config.chunkSize&&e.setRequestHeader("Range","bytes="+this._start+"-"+(this._start+this._config.chunkSize-1));try{e.send(this._config.downloadRequestBody)}catch(t){this._chunkError(t.message)}n&&0===e.status&&this._chunkError()}},this._chunkLoaded=function(){4===e.readyState&&(e.status<200||400<=e.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:e.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(t){var e=t.getResponseHeader("Content-Range");return null===e?-1:parseInt(e.substring(e.lastIndexOf("/")+1))}(e),this.parseChunk(e.responseText)))},this._chunkError=function(t){this._sendError(new Error(e.statusText||t))}}function u(t){var e,n;(t=t||{}).chunkSize||(t.chunkSize=o.LocalChunkSize),c.call(this,t);var i="undefined"!=typeof FileReader;this.stream=function(t){this._input=t,n=t.slice||t.webkitSlice||t.mozSlice,i?((e=new FileReader).onload=_(this._chunkLoaded,this),e.onerror=_(this._chunkError,this)):e=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var t=this._input;if(this._config.chunkSize){var a=Math.min(this._start+this._config.chunkSize,this._input.size);t=n.call(t,this._start,a)}var r=e.readAsText(t,this._config.encoding);i||this._chunkLoaded({target:{result:r}})},this._chunkLoaded=function(t){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(t.target.result)},this._chunkError=function(){this._sendError(e.error)}}function d(t){var e;c.call(this,t=t||{}),this.stream=function(t){return e=t,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var t,n=this._config.chunkSize;return n?(t=e.substring(0,n),e=e.substring(n)):(t=e,e=""),this._finished=!e,this.parseChunk(t)}}}function f(t){c.call(this,t=t||{});var e=[],n=!0,i=!1;this.pause=function(){c.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){c.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(t){this._input=t,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){i&&1===e.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),e.length?this.parseChunk(e.shift()):n=!0},this._streamData=_((function(t){try{e.push("string"==typeof t?t:t.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(e.shift()))}catch(t){this._streamError(t)}}),this),this._streamError=_((function(t){this._streamCleanUp(),this._sendError(t)}),this),this._streamEnd=_((function(){this._streamCleanUp(),i=!0,this._streamData("")}),this),this._streamCleanUp=_((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function h(t){var e,n,i,a=Math.pow(2,53),r=-a,s=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)(e[-+]?\d+)?\s*$/,c=/(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))/,l=this,u=0,d=0,f=!1,h=!1,g=[],m={data:[],errors:[],meta:{}};if(C(t.step)){var v=t.step;t.step=function(e){if(m=e,x())k();else{if(k(),0===m.data.length)return;u+=e.data.length,t.preview&&u>t.preview?n.abort():(m.data=m.data[0],v(m,l))}}}function _(e){return"greedy"===t.skipEmptyLines?""===e.join("").trim():1===e.length&&0===e[0].length}function k(){if(m&&i&&(D("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),i=!1),t.skipEmptyLines)for(var e=0;e<m.data.length;e++)_(m.data[e])&&m.data.splice(e--,1);return x()&&function(){if(m)if(Array.isArray(m.data[0])){for(var e=0;x()&&e<m.data.length;e++)m.data[e].forEach(n);m.data.splice(0,1)}else m.data.forEach(n);function n(e,n){C(t.transformHeader)&&(e=t.transformHeader(e,n)),g.push(e)}}(),function(){if(!m||!t.header&&!t.dynamicTyping&&!t.transform)return m;function e(e,n){var i,a=t.header?{}:[];for(i=0;i<e.length;i++){var r=i,o=e[i];t.header&&(r=i>=g.length?"__parsed_extra":g[i]),t.transform&&(o=t.transform(o,r)),o=O(r,o),"__parsed_extra"===r?(a[r]=a[r]||[],a[r].push(o)):a[r]=o}return t.header&&(i>g.length?D("FieldMismatch","TooManyFields","Too many fields: expected "+g.length+" fields but parsed "+i,d+n):i<g.length&&D("FieldMismatch","TooFewFields","Too few fields: expected "+g.length+" fields but parsed "+i,d+n)),a}var n=1;return!m.data.length||Array.isArray(m.data[0])?(m.data=m.data.map(e),n=m.data.length):m.data=e(m.data,0),t.header&&m.meta&&(m.meta.fields=g),d+=n,m}()}function x(){return t.header&&0===g.length}function O(e,n){return i=e,t.dynamicTypingFunction&&void 0===t.dynamicTyping[i]&&(t.dynamicTyping[i]=t.dynamicTypingFunction(i)),!0===(t.dynamicTyping[i]||t.dynamicTyping)?"true"===n||"TRUE"===n||"false"!==n&&"FALSE"!==n&&(function(t){if(s.test(t)){var e=parseFloat(t);if(r<e&&e<a)return!0}return!1}(n)?parseFloat(n):c.test(n)?new Date(n):""===n?null:n):n;var i}function D(t,e,n,i){var a={type:t,code:e,message:n};void 0!==i&&(a.row=i),m.errors.push(a)}this.parse=function(a,r,s){if(t.newline||(t.newline=function(t,e){t=t.substring(0,1048576);var n=new RegExp(p(e)+"([^]*?)"+p(e),"gm"),i=(t=t.replace(n,"")).split("\r"),a=t.split("\n");if(1===i.length||1<a.length&&a[0].length<i[0].length)return"\n";for(var r=0,o=0;o<i.length;o++)"\n"===i[o][0]&&r++;return r>=i.length/2?"\r\n":"\r"}(a,t.quoteChar||'"')),i=!1,t.delimiter)C(t.delimiter)&&(t.delimiter=t.delimiter(a),m.meta.delimiter=t.delimiter);else{var c=function(e,n,i,a,r){var s,c,l,u;r=r||[",","\t","|",";",o.RECORD_SEP,o.UNIT_SEP];for(var d=0;d<r.length;d++){var f=r[d],h=0,p=0,g=0;l=void 0;for(var m=new b({comments:a,delimiter:f,newline:n,preview:10}).parse(e),v=0;v<m.data.length;v++)if(i&&_(m.data[v]))g++;else{var y=m.data[v].length;p+=y,void 0!==l?0<y&&(h+=Math.abs(y-l),l=y):l=y}0<m.data.length&&(p/=m.data.length-g),(void 0===c||h<=c)&&(void 0===u||u<p)&&1.99<p&&(c=h,s=f,u=p)}return{successful:!!(t.delimiter=s),bestDelimiter:s}}(a,t.newline,t.skipEmptyLines,t.comments,t.delimitersToGuess);c.successful?t.delimiter=c.bestDelimiter:(i=!0,t.delimiter=o.DefaultDelimiter),m.meta.delimiter=t.delimiter}var l=y(t);return t.preview&&t.header&&l.preview++,e=a,n=new b(l),m=n.parse(e,r,s),k(),f?{meta:{paused:!0}}:m||{meta:{paused:!1}}},this.paused=function(){return f},this.pause=function(){f=!0,n.abort(),e=C(t.chunk)?"":e.substring(n.getCharIndex())},this.resume=function(){l.streamer._halted?(f=!1,l.streamer.parseChunk(e,!0)):setTimeout(l.resume,3)},this.aborted=function(){return h},this.abort=function(){h=!0,n.abort(),m.meta.aborted=!0,C(t.complete)&&t.complete(m),e=""}}function p(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function b(t){var e,n=(t=t||{}).delimiter,i=t.newline,a=t.comments,r=t.step,s=t.preview,c=t.fastMode,l=e=void 0===t.quoteChar?'"':t.quoteChar;if(void 0!==t.escapeChar&&(l=t.escapeChar),("string"!=typeof n||-1<o.BAD_DELIMITERS.indexOf(n))&&(n=","),a===n)throw new Error("Comment character same as delimiter");!0===a?a="#":("string"!=typeof a||-1<o.BAD_DELIMITERS.indexOf(a))&&(a=!1),"\n"!==i&&"\r"!==i&&"\r\n"!==i&&(i="\n");var u=0,d=!1;this.parse=function(t,o,f){if("string"!=typeof t)throw new Error("Input must be a string");var h=t.length,b=n.length,g=i.length,m=a.length,v=C(r),y=[],_=[],k=[],x=u=0;if(!t)return E();if(c||!1!==c&&-1===t.indexOf(e)){for(var O=t.split(i),D=0;D<O.length;D++){if(u+=(k=O[D]).length,D!==O.length-1)u+=i.length;else if(f)return E();if(!a||k.substring(0,m)!==a){if(v){if(y=[],j(k.split(n)),F(),d)return E()}else j(k.split(n));if(s&&s<=D)return y=y.slice(0,s),E(!0)}}return E()}for(var w=t.indexOf(n,u),M=t.indexOf(i,u),S=new RegExp(p(l)+p(e),"g"),I=t.indexOf(e,u);;)if(t[u]!==e)if(a&&0===k.length&&t.substring(u,u+m)===a){if(-1===M)return E();M=t.indexOf(i,u=M+g),w=t.indexOf(n,u)}else{if(-1!==w&&(w<M||-1===M)){if(!(w<I)){k.push(t.substring(u,w)),w=t.indexOf(n,u=w+b);continue}var P=L(w,I,M);if(P&&void 0!==P.nextDelim){I=P.quoteSearch,k.push(t.substring(u,w=P.nextDelim)),w=t.indexOf(n,u=w+b);continue}}if(-1===M)break;if(k.push(t.substring(u,M)),T(M+g),v&&(F(),d))return E();if(s&&y.length>=s)return E(!0)}else for(I=u,u++;;){if(-1===(I=t.indexOf(e,I+1)))return f||_.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:y.length,index:u}),W();if(I===h-1)return W(t.substring(u,I).replace(S,e));if(e!==l||t[I+1]!==l){if(e===l||0===I||t[I-1]!==l){-1!==w&&w<I+1&&(w=t.indexOf(n,I+1)),-1!==M&&M<I+1&&(M=t.indexOf(i,I+1));var R=A(-1===M?w:Math.min(w,M));if(t[I+1+R]===n){k.push(t.substring(u,I).replace(S,e)),t[u=I+1+R+b]!==e&&(I=t.indexOf(e,u)),w=t.indexOf(n,u),M=t.indexOf(i,u);break}var V=A(M);if(t.substring(I+1+V,I+1+V+g)===i){if(k.push(t.substring(u,I).replace(S,e)),T(I+1+V+g),w=t.indexOf(n,u),I=t.indexOf(e,u),v&&(F(),d))return E();if(s&&y.length>=s)return E(!0);break}_.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:y.length,index:u}),I++}}else I++}return W();function j(t){y.push(t),x=u}function A(e){var n=0;if(-1!==e){var i=t.substring(I+1,e);i&&""===i.trim()&&(n=i.length)}return n}function W(e){return f||(void 0===e&&(e=t.substring(u)),k.push(e),u=h,j(k),v&&F()),E()}function T(e){u=e,j(k),k=[],M=t.indexOf(i,u)}function E(t){return{data:y,errors:_,meta:{delimiter:n,linebreak:i,aborted:d,truncated:!!t,cursor:x+(o||0)}}}function F(){r(E()),y=[],_=[]}function L(i,a,r){var o={nextDelim:void 0,quoteSearch:void 0},s=t.indexOf(e,a+1);if(a<i&&i<s&&(s<r||-1===r)){var c=t.indexOf(n,s);if(-1===c)return o;s<c&&(s=t.indexOf(e,s+1)),o=L(c,s,r)}else o={nextDelim:i,quoteSearch:a};return o}},this.abort=function(){d=!0},this.getCharIndex=function(){return u}}function g(t){var e=t.data,n=a[e.workerId],i=!1;if(e.error)n.userError(e.error,e.file);else if(e.results&&e.results.data){var r={abort:function(){i=!0,m(e.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:v,resume:v};if(C(n.userStep)){for(var o=0;o<e.results.data.length&&(n.userStep({data:e.results.data[o],errors:e.results.errors,meta:e.results.meta},r),!i);o++);delete e.results}else C(n.userChunk)&&(n.userChunk(e.results,r,e.file),delete e.results)}e.finished&&!i&&m(e.workerId,e.results)}function m(t,e){var n=a[t];C(n.userComplete)&&n.userComplete(e),n.terminate(),delete a[t]}function v(){throw new Error("Not implemented.")}function y(t){if("object"!=typeof t||null===t)return t;var e=Array.isArray(t)?[]:{};for(var n in t)e[n]=y(t[n]);return e}function _(t,e){return function(){t.apply(e,arguments)}}function C(t){return"function"==typeof t}return i&&(e.onmessage=function(t){var n=t.data;if(void 0===o.WORKER_ID&&n&&(o.WORKER_ID=n.workerId),"string"==typeof n.input)e.postMessage({workerId:o.WORKER_ID,results:o.parse(n.input,n.config),finished:!0});else if(e.File&&n.input instanceof File||n.input instanceof Object){var i=o.parse(n.input,n.config);i&&e.postMessage({workerId:o.WORKER_ID,results:i,finished:!0})}}),(l.prototype=Object.create(c.prototype)).constructor=l,(u.prototype=Object.create(c.prototype)).constructor=u,(d.prototype=Object.create(d.prototype)).constructor=d,(f.prototype=Object.create(c.prototype)).constructor=f,o})?i.apply(e,[]):i)||(t.exports=a)},PqYM:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n("HDdC"),a=n("D0XW"),r=n("Y7HM"),o=n("z+Ro");function s(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,s=-1;return Object(r.a)(e)?s=Number(e)<1?1:Number(e):Object(o.a)(e)&&(n=e),Object(o.a)(n)||(n=a.a),new i.a((function(e){var i=Object(r.a)(t)?t:+t-n.now();return n.schedule(c,i,{index:0,period:s,subscriber:e})}))}function c(t){var e=t.index,n=t.period,i=t.subscriber;if(i.next(e),!i.closed){if(-1===n)return i.complete();t.index=e+1,this.schedule(t,n)}}},QibW:function(t,e,n){"use strict";n.d(e,"a",(function(){return x})),n.d(e,"b",(function(){return y})),n.d(e,"c",(function(){return O}));var i=n("fXoL"),a=n("FKr1"),r=n("8LU1"),o=n("3Pt+"),s=n("R1ws"),c=n("u47x"),l=n("0EQZ"),u=["input"],d=function(){return{enterDuration:150}},f=["*"],h=new i.s("mat-radio-default-options",{providedIn:"root",factory:function(){return{color:"accent"}}}),p=0,b={provide:o.s,useExisting:Object(i.X)((function(){return y})),multi:!0},g=function t(e,n){_classCallCheck(this,t),this.source=e,this.value=n},m=new i.s("MatRadioGroup"),v=function(){var t=function(){function t(e){_classCallCheck(this,t),this._changeDetector=e,this._value=null,this._name="mat-radio-group-"+p++,this._selected=null,this._isInitialized=!1,this._labelPosition="after",this._disabled=!1,this._required=!1,this._controlValueAccessorChangeFn=function(){},this.onTouched=function(){},this.change=new i.o}return _createClass(t,[{key:"_checkSelectedRadioButton",value:function(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)}},{key:"ngAfterContentInit",value:function(){this._isInitialized=!0}},{key:"_touch",value:function(){this.onTouched&&this.onTouched()}},{key:"_updateRadioButtonNames",value:function(){var t=this;this._radios&&this._radios.forEach((function(e){e.name=t.name,e._markForCheck()}))}},{key:"_updateSelectedRadioFromValue",value:function(){var t=this;this._radios&&(null===this._selected||this._selected.value!==this._value)&&(this._selected=null,this._radios.forEach((function(e){e.checked=t.value===e.value,e.checked&&(t._selected=e)})))}},{key:"_emitChangeEvent",value:function(){this._isInitialized&&this.change.emit(new g(this._selected,this._value))}},{key:"_markRadiosForCheck",value:function(){this._radios&&this._radios.forEach((function(t){return t._markForCheck()}))}},{key:"writeValue",value:function(t){this.value=t,this._changeDetector.markForCheck()}},{key:"registerOnChange",value:function(t){this._controlValueAccessorChangeFn=t}},{key:"registerOnTouched",value:function(t){this.onTouched=t}},{key:"setDisabledState",value:function(t){this.disabled=t,this._changeDetector.markForCheck()}},{key:"name",get:function(){return this._name},set:function(t){this._name=t,this._updateRadioButtonNames()}},{key:"labelPosition",get:function(){return this._labelPosition},set:function(t){this._labelPosition="before"===t?"before":"after",this._markRadiosForCheck()}},{key:"value",get:function(){return this._value},set:function(t){this._value!==t&&(this._value=t,this._updateSelectedRadioFromValue(),this._checkSelectedRadioButton())}},{key:"selected",get:function(){return this._selected},set:function(t){this._selected=t,this.value=t?t.value:null,this._checkSelectedRadioButton()}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=Object(r.c)(t),this._markRadiosForCheck()}},{key:"required",get:function(){return this._required},set:function(t){this._required=Object(r.c)(t),this._markRadiosForCheck()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.Qb(i.h))},t.\u0275dir=i.Lb({type:t,inputs:{name:"name",labelPosition:"labelPosition",value:"value",selected:"selected",disabled:"disabled",required:"required",color:"color"},outputs:{change:"change"}}),t}(),y=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return n}(v);return t.\u0275fac=function(e){return _(e||t)},t.\u0275dir=i.Lb({type:t,selectors:[["mat-radio-group"]],contentQueries:function(t,e,n){var a;1&t&&i.Jb(n,x,!0),2&t&&i.yc(a=i.ec())&&(e._radios=a)},hostAttrs:["role","radiogroup",1,"mat-radio-group"],exportAs:["matRadioGroup"],features:[i.Cb([b,{provide:m,useExisting:t}]),i.Ab]}),t}(),_=i.Yb(y),C=Object(a.B)(Object(a.F)((function t(e){_classCallCheck(this,t),this._elementRef=e}))),k=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,a,o,s,c,l,u,d){var f;return _classCallCheck(this,n),(f=e.call(this,a))._changeDetector=o,f._focusMonitor=s,f._radioDispatcher=c,f._animationMode=l,f._providerOverride=u,f._uniqueId="mat-radio-"+ ++p,f.id=f._uniqueId,f.change=new i.o,f._checked=!1,f._value=null,f._removeUniqueSelectionListener=function(){},f.radioGroup=t,d&&(f.tabIndex=Object(r.f)(d,0)),f._removeUniqueSelectionListener=c.listen((function(t,e){t!==f.id&&e===f.name&&(f.checked=!1)})),f}return _createClass(n,[{key:"focus",value:function(t){this._focusMonitor.focusVia(this._inputElement,"keyboard",t)}},{key:"_markForCheck",value:function(){this._changeDetector.markForCheck()}},{key:"ngOnInit",value:function(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.name=this.radioGroup.name)}},{key:"ngAfterViewInit",value:function(){var t=this;this._focusMonitor.monitor(this._elementRef,!0).subscribe((function(e){!e&&t.radioGroup&&t.radioGroup._touch()}))}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()}},{key:"_emitChangeEvent",value:function(){this.change.emit(new g(this,this._value))}},{key:"_isRippleDisabled",value:function(){return this.disableRipple||this.disabled}},{key:"_onInputClick",value:function(t){t.stopPropagation()}},{key:"_onInputChange",value:function(t){t.stopPropagation();var e=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),e&&this.radioGroup._emitChangeEvent())}},{key:"_setDisabled",value:function(t){this._disabled!==t&&(this._disabled=t,this._changeDetector.markForCheck())}},{key:"checked",get:function(){return this._checked},set:function(t){var e=Object(r.c)(t);this._checked!==e&&(this._checked=e,e&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!e&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),e&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())}},{key:"value",get:function(){return this._value},set:function(t){this._value!==t&&(this._value=t,null!==this.radioGroup&&(this.checked||(this.checked=this.radioGroup.value===t),this.checked&&(this.radioGroup.selected=this)))}},{key:"labelPosition",get:function(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"},set:function(t){this._labelPosition=t}},{key:"disabled",get:function(){return this._disabled||null!==this.radioGroup&&this.radioGroup.disabled},set:function(t){this._setDisabled(Object(r.c)(t))}},{key:"required",get:function(){return this._required||this.radioGroup&&this.radioGroup.required},set:function(t){this._required=Object(r.c)(t)}},{key:"color",get:function(){return this._color||this.radioGroup&&this.radioGroup.color||this._providerOverride&&this._providerOverride.color||"accent"},set:function(t){this._color=t}},{key:"inputId",get:function(){return(this.id||this._uniqueId)+"-input"}}]),n}(C);return t.\u0275fac=function(e){return new(e||t)(i.Qb(v),i.Qb(i.l),i.Qb(i.h),i.Qb(c.h),i.Qb(l.d),i.Qb(String),i.Qb(void 0),i.Qb(String))},t.\u0275dir=i.Lb({type:t,viewQuery:function(t,e){var n;1&t&&i.Xc(u,!0),2&t&&i.yc(n=i.ec())&&(e._inputElement=n.first)},inputs:{id:"id",checked:"checked",value:"value",labelPosition:"labelPosition",disabled:"disabled",required:"required",color:"color",name:"name",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"]},outputs:{change:"change"},features:[i.Ab]}),t}(),x=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a,r,o,s,c,l){return _classCallCheck(this,n),e.call(this,t,i,a,r,o,s,c,l)}return n}(k);return t.\u0275fac=function(e){return new(e||t)(i.Qb(m,8),i.Qb(i.l),i.Qb(i.h),i.Qb(c.h),i.Qb(l.d),i.Qb(s.a,8),i.Qb(h,8),i.bc("tabindex"))},t.\u0275cmp=i.Kb({type:t,selectors:[["mat-radio-button"]],hostAttrs:[1,"mat-radio-button"],hostVars:17,hostBindings:function(t,e){1&t&&i.dc("focus",(function(){return e._inputElement.nativeElement.focus()})),2&t&&(i.Eb("tabindex",-1)("id",e.id)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),i.Ib("mat-radio-checked",e.checked)("mat-radio-disabled",e.disabled)("_mat-animation-noopable","NoopAnimations"===e._animationMode)("mat-primary","primary"===e.color)("mat-accent","accent"===e.color)("mat-warn","warn"===e.color))},inputs:{disableRipple:"disableRipple",tabIndex:"tabIndex"},exportAs:["matRadioButton"],features:[i.Ab],ngContentSelectors:f,decls:13,vars:19,consts:[[1,"mat-radio-label"],["label",""],[1,"mat-radio-container"],[1,"mat-radio-outer-circle"],[1,"mat-radio-inner-circle"],["type","radio",1,"mat-radio-input","cdk-visually-hidden",3,"id","checked","disabled","tabIndex","required","change","click"],["input",""],["mat-ripple","",1,"mat-radio-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered","matRippleRadius","matRippleAnimation"],[1,"mat-ripple-element","mat-radio-persistent-ripple"],[1,"mat-radio-label-content"],[2,"display","none"]],template:function(t,e){if(1&t&&(i.nc(),i.Wb(0,"label",0,1),i.Wb(2,"div",2),i.Rb(3,"div",3),i.Rb(4,"div",4),i.Wb(5,"input",5,6),i.dc("change",(function(t){return e._onInputChange(t)}))("click",(function(t){return e._onInputClick(t)})),i.Vb(),i.Wb(7,"div",7),i.Rb(8,"div",8),i.Vb(),i.Vb(),i.Wb(9,"div",9),i.Wb(10,"span",10),i.Qc(11,"\xa0"),i.Vb(),i.mc(12),i.Vb(),i.Vb()),2&t){var n=i.zc(1);i.Eb("for",e.inputId),i.Db(5),i.oc("id",e.inputId)("checked",e.checked)("disabled",e.disabled)("tabIndex",e.tabIndex)("required",e.required),i.Eb("name",e.name)("value",e.value)("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby)("aria-describedby",e.ariaDescribedby),i.Db(2),i.oc("matRippleTrigger",n)("matRippleDisabled",e._isRippleDisabled())("matRippleCentered",!0)("matRippleRadius",20)("matRippleAnimation",i.uc(18,d)),i.Db(2),i.Ib("mat-radio-label-before","before"==e.labelPosition)}},directives:[a.u],styles:[".mat-radio-button{display:inline-block;-webkit-tap-highlight-color:transparent;outline:0}.mat-radio-label{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;display:inline-flex;align-items:center;white-space:nowrap;vertical-align:middle;width:100%}.mat-radio-container{box-sizing:border-box;display:inline-block;position:relative;width:20px;height:20px;flex-shrink:0}.mat-radio-outer-circle{box-sizing:border-box;height:20px;left:0;position:absolute;top:0;transition:border-color ease 280ms;width:20px;border-width:2px;border-style:solid;border-radius:50%}._mat-animation-noopable .mat-radio-outer-circle{transition:none}.mat-radio-inner-circle{border-radius:50%;box-sizing:border-box;height:20px;left:0;position:absolute;top:0;transition:transform ease 280ms,background-color ease 280ms;width:20px;transform:scale(0.001)}._mat-animation-noopable .mat-radio-inner-circle{transition:none}.mat-radio-checked .mat-radio-inner-circle{transform:scale(0.5)}.cdk-high-contrast-active .mat-radio-checked .mat-radio-inner-circle{border:solid 10px}.mat-radio-label-content{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto;display:inline-block;order:0;line-height:inherit;padding-left:8px;padding-right:0}[dir=rtl] .mat-radio-label-content{padding-right:8px;padding-left:0}.mat-radio-label-content.mat-radio-label-before{order:-1;padding-left:0;padding-right:8px}[dir=rtl] .mat-radio-label-content.mat-radio-label-before{padding-right:0;padding-left:8px}.mat-radio-disabled,.mat-radio-disabled .mat-radio-label{cursor:default}.mat-radio-button .mat-radio-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}.mat-radio-button .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple){opacity:.16}.mat-radio-persistent-ripple{width:100%;height:100%;transform:none}.mat-radio-container:hover .mat-radio-persistent-ripple{opacity:.04}.mat-radio-button:not(.mat-radio-disabled).cdk-keyboard-focused .mat-radio-persistent-ripple,.mat-radio-button:not(.mat-radio-disabled).cdk-program-focused .mat-radio-persistent-ripple{opacity:.12}.mat-radio-persistent-ripple,.mat-radio-disabled .mat-radio-container:hover .mat-radio-persistent-ripple{opacity:0}@media(hover: none){.mat-radio-container:hover .mat-radio-persistent-ripple{display:none}}.mat-radio-input{bottom:0;left:50%}.cdk-high-contrast-active .mat-radio-disabled{opacity:.5}\n"],encapsulation:2,changeDetection:0}),t}(),O=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=i.Ob({type:t}),t.\u0275inj=i.Nb({factory:function(e){return new(e||t)},imports:[[a.v,a.k],a.k]}),t}()},Qu3c:function(t,e,n){"use strict";n.d(e,"a",(function(){return x})),n.d(e,"b",(function(){return O})),n.d(e,"c",(function(){return w})),n.d(e,"d",(function(){return D}));var i=n("rDax"),a=n("u47x"),r=n("ofXK"),o=n("fXoL"),s=n("FKr1"),c=n("vxfF"),l=n("8LU1"),u=n("FtGj"),d=n("0MNC"),f=n("nLfN"),h=n("+rOU"),p=n("XNiG"),b=n("1G5W"),g=n("IzEk"),m=n("R0Ic"),v=n("cH1L"),y={tooltipState:Object(m.n)("state",[Object(m.k)("initial, void, hidden",Object(m.l)({opacity:0,transform:"scale(0)"})),Object(m.k)("visible",Object(m.l)({transform:"scale(1)"})),Object(m.m)("* => visible",Object(m.e)("200ms cubic-bezier(0, 0, 0.2, 1)",Object(m.h)([Object(m.l)({opacity:0,transform:"scale(0)",offset:0}),Object(m.l)({opacity:.5,transform:"scale(0.99)",offset:.5}),Object(m.l)({opacity:1,transform:"scale(1)",offset:1})]))),Object(m.m)("* => hidden",Object(m.e)("100ms cubic-bezier(0, 0, 0.2, 1)",Object(m.l)({opacity:0})))])},_=Object(f.f)({passive:!0}),C=new o.s("mat-tooltip-scroll-strategy"),k={provide:C,deps:[i.c],useFactory:function(t){return function(){return t.scrollStrategies.reposition({scrollThrottle:20})}}},x=new o.s("mat-tooltip-default-options",{providedIn:"root",factory:function(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),O=function(){var t=function(){function t(e,n,i,a,r,o,s,c,l,d,f){var h=this;_classCallCheck(this,t),this._overlay=e,this._elementRef=n,this._scrollDispatcher=i,this._viewContainerRef=a,this._ngZone=r,this._platform=o,this._ariaDescriber=s,this._focusMonitor=c,this._dir=d,this._defaultOptions=f,this._position="below",this._disabled=!1,this._viewInitialized=!1,this._pointerExitEventsInitialized=!1,this.showDelay=this._defaultOptions.showDelay,this.hideDelay=this._defaultOptions.hideDelay,this.touchGestures="auto",this._message="",this._passiveListeners=[],this._destroyed=new p.a,this._handleKeydown=function(t){h._isTooltipVisible()&&t.keyCode===u.h&&!Object(u.v)(t)&&(t.preventDefault(),t.stopPropagation(),h._ngZone.run((function(){return h.hide(0)})))},this._scrollStrategy=l,f&&(f.position&&(this.position=f.position),f.touchGestures&&(this.touchGestures=f.touchGestures)),r.runOutsideAngular((function(){n.nativeElement.addEventListener("keydown",h._handleKeydown)}))}return _createClass(t,[{key:"ngAfterViewInit",value:function(){var t=this;this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Object(b.a)(this._destroyed)).subscribe((function(e){e?"keyboard"===e&&t._ngZone.run((function(){return t.show()})):t._ngZone.run((function(){return t.hide(0)}))}))}},{key:"ngOnDestroy",value:function(){var t=this._elementRef.nativeElement;clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),t.removeEventListener("keydown",this._handleKeydown),this._passiveListeners.forEach((function(e){var n=_slicedToArray(e,2),i=n[0],a=n[1];t.removeEventListener(i,a,_)})),this._passiveListeners.length=0,this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(t,this.message),this._focusMonitor.stopMonitoring(t)}},{key:"show",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.showDelay;if(!this.disabled&&this.message&&(!this._isTooltipVisible()||this._tooltipInstance._showTimeoutId||this._tooltipInstance._hideTimeoutId)){var n=this._createOverlay();this._detach(),this._portal=this._portal||new h.d(D,this._viewContainerRef),this._tooltipInstance=n.attach(this._portal).instance,this._tooltipInstance.afterHidden().pipe(Object(b.a)(this._destroyed)).subscribe((function(){return t._detach()})),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),this._tooltipInstance.show(e)}}},{key:"hide",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hideDelay;this._tooltipInstance&&this._tooltipInstance.hide(t)}},{key:"toggle",value:function(){this._isTooltipVisible()?this.hide():this.show()}},{key:"_isTooltipVisible",value:function(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}},{key:"_createOverlay",value:function(){var t=this;if(this._overlayRef)return this._overlayRef;var e=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef),n=this._overlay.position().flexibleConnectedTo(this._elementRef).withTransformOriginOn(".mat-tooltip").withFlexibleDimensions(!1).withViewportMargin(8).withScrollableContainers(e);return n.positionChanges.pipe(Object(b.a)(this._destroyed)).subscribe((function(e){t._tooltipInstance&&e.scrollableViewProperties.isOverlayClipped&&t._tooltipInstance.isVisible()&&t._ngZone.run((function(){return t.hide(0)}))})),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:n,panelClass:"mat-tooltip-panel",scrollStrategy:this._scrollStrategy()}),this._updatePosition(),this._overlayRef.detachments().pipe(Object(b.a)(this._destroyed)).subscribe((function(){return t._detach()})),this._overlayRef}},{key:"_detach",value:function(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}},{key:"_updatePosition",value:function(){var t=this._overlayRef.getConfig().positionStrategy,e=this._getOrigin(),n=this._getOverlayPosition();t.withPositions([Object.assign(Object.assign({},e.main),n.main),Object.assign(Object.assign({},e.fallback),n.fallback)])}},{key:"_getOrigin",value:function(){var t,e=!this._dir||"ltr"==this._dir.value,n=this.position;"above"==n||"below"==n?t={originX:"center",originY:"above"==n?"top":"bottom"}:"before"==n||"left"==n&&e||"right"==n&&!e?t={originX:"start",originY:"center"}:("after"==n||"right"==n&&e||"left"==n&&!e)&&(t={originX:"end",originY:"center"});var i=this._invertPosition(t.originX,t.originY);return{main:t,fallback:{originX:i.x,originY:i.y}}}},{key:"_getOverlayPosition",value:function(){var t,e=!this._dir||"ltr"==this._dir.value,n=this.position;"above"==n?t={overlayX:"center",overlayY:"bottom"}:"below"==n?t={overlayX:"center",overlayY:"top"}:"before"==n||"left"==n&&e||"right"==n&&!e?t={overlayX:"end",overlayY:"center"}:("after"==n||"right"==n&&e||"left"==n&&!e)&&(t={overlayX:"start",overlayY:"center"});var i=this._invertPosition(t.overlayX,t.overlayY);return{main:t,fallback:{overlayX:i.x,overlayY:i.y}}}},{key:"_updateTooltipMessage",value:function(){var t=this;this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),this._ngZone.onMicrotaskEmpty.pipe(Object(g.a)(1),Object(b.a)(this._destroyed)).subscribe((function(){t._tooltipInstance&&t._overlayRef.updatePosition()})))}},{key:"_setTooltipClass",value:function(t){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=t,this._tooltipInstance._markForCheck())}},{key:"_invertPosition",value:function(t,e){return"above"===this.position||"below"===this.position?"top"===e?e="bottom":"bottom"===e&&(e="top"):"end"===t?t="start":"start"===t&&(t="end"),{x:t,y:e}}},{key:"_setupPointerEnterEventsIfNeeded",value:function(){var t=this;!this._disabled&&this.message&&this._viewInitialized&&!this._passiveListeners.length&&(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",function(){t._setupPointerExitEventsIfNeeded(),t.show()}]):"off"!==this.touchGestures&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",function(){t._setupPointerExitEventsIfNeeded(),clearTimeout(t._touchstartTimeout),t._touchstartTimeout=setTimeout((function(){return t.show()}),500)}])),this._addListeners(this._passiveListeners))}},{key:"_setupPointerExitEventsIfNeeded",value:function(){var t,e=this;if(!this._pointerExitEventsInitialized){this._pointerExitEventsInitialized=!0;var n=[];if(this._platformSupportsMouseEvents())n.push(["mouseleave",function(){return e.hide()}]);else if("off"!==this.touchGestures){this._disableNativeGesturesIfNecessary();var i=function(){clearTimeout(e._touchstartTimeout),e.hide(e._defaultOptions.touchendHideDelay)};n.push(["touchend",i],["touchcancel",i])}this._addListeners(n),(t=this._passiveListeners).push.apply(t,n)}}},{key:"_addListeners",value:function(t){var e=this;t.forEach((function(t){var n=_slicedToArray(t,2),i=n[0],a=n[1];e._elementRef.nativeElement.addEventListener(i,a,_)}))}},{key:"_platformSupportsMouseEvents",value:function(){return!this._platform.IOS&&!this._platform.ANDROID}},{key:"_disableNativeGesturesIfNecessary",value:function(){var t=this.touchGestures;if("off"!==t){var e=this._elementRef.nativeElement,n=e.style;("on"===t||"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName)&&(n.userSelect=n.msUserSelect=n.webkitUserSelect=n.MozUserSelect="none"),"on"!==t&&e.draggable||(n.webkitUserDrag="none"),n.touchAction="none",n.webkitTapHighlightColor="transparent"}}},{key:"position",get:function(){return this._position},set:function(t){t!==this._position&&(this._position=t,this._overlayRef&&(this._updatePosition(),this._tooltipInstance&&this._tooltipInstance.show(0),this._overlayRef.updatePosition()))}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=Object(l.c)(t),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}},{key:"message",get:function(){return this._message},set:function(t){var e=this;this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message),this._message=null!=t?String(t).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage(),this._ngZone.runOutsideAngular((function(){Promise.resolve().then((function(){e._ariaDescriber.describe(e._elementRef.nativeElement,e.message)}))})))}},{key:"tooltipClass",get:function(){return this._tooltipClass},set:function(t){this._tooltipClass=t,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}}]),t}();return t.\u0275fac=function(e){return new(e||t)(o.Qb(i.c),o.Qb(o.l),o.Qb(c.f),o.Qb(o.T),o.Qb(o.C),o.Qb(f.a),o.Qb(a.c),o.Qb(a.h),o.Qb(C),o.Qb(v.c,8),o.Qb(x,8))},t.\u0275dir=o.Lb({type:t,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-tooltip-trigger"],inputs:{showDelay:["matTooltipShowDelay","showDelay"],hideDelay:["matTooltipHideDelay","hideDelay"],touchGestures:["matTooltipTouchGestures","touchGestures"],position:["matTooltipPosition","position"],disabled:["matTooltipDisabled","disabled"],message:["matTooltip","message"],tooltipClass:["matTooltipClass","tooltipClass"]},exportAs:["matTooltip"]}),t}(),D=function(){var t=function(){function t(e,n){_classCallCheck(this,t),this._changeDetectorRef=e,this._breakpointObserver=n,this._visibility="initial",this._closeOnInteraction=!1,this._onHide=new p.a,this._isHandset=this._breakpointObserver.observe(d.b.Handset)}return _createClass(t,[{key:"show",value:function(t){var e=this;this._hideTimeoutId&&(clearTimeout(this._hideTimeoutId),this._hideTimeoutId=null),this._closeOnInteraction=!0,this._showTimeoutId=setTimeout((function(){e._visibility="visible",e._showTimeoutId=null,e._markForCheck()}),t)}},{key:"hide",value:function(t){var e=this;this._showTimeoutId&&(clearTimeout(this._showTimeoutId),this._showTimeoutId=null),this._hideTimeoutId=setTimeout((function(){e._visibility="hidden",e._hideTimeoutId=null,e._markForCheck()}),t)}},{key:"afterHidden",value:function(){return this._onHide}},{key:"isVisible",value:function(){return"visible"===this._visibility}},{key:"ngOnDestroy",value:function(){this._onHide.complete()}},{key:"_animationStart",value:function(){this._closeOnInteraction=!1}},{key:"_animationDone",value:function(t){var e=t.toState;"hidden"!==e||this.isVisible()||this._onHide.next(),"visible"!==e&&"hidden"!==e||(this._closeOnInteraction=!0)}},{key:"_handleBodyInteraction",value:function(){this._closeOnInteraction&&this.hide(0)}},{key:"_markForCheck",value:function(){this._changeDetectorRef.markForCheck()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(o.Qb(o.h),o.Qb(d.a))},t.\u0275cmp=o.Kb({type:t,selectors:[["mat-tooltip-component"]],hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(t,e){1&t&&o.dc("click",(function(){return e._handleBodyInteraction()}),!1,o.Ac),2&t&&o.Lc("zoom","visible"===e._visibility?1:null)},decls:3,vars:7,consts:[[1,"mat-tooltip",3,"ngClass"]],template:function(t,e){var n;1&t&&(o.Wb(0,"div",0),o.dc("@state.start",(function(){return e._animationStart()}))("@state.done",(function(t){return e._animationDone(t)})),o.ic(1,"async"),o.Qc(2),o.Vb()),2&t&&(o.Ib("mat-tooltip-handset",null==(n=o.jc(1,5,e._isHandset))?null:n.matches),o.oc("ngClass",e.tooltipClass)("@state",e._visibility),o.Db(2),o.Rc(e.message))},directives:[r.q],pipes:[r.b],styles:[".mat-tooltip-panel{pointer-events:none !important}.mat-tooltip{color:#fff;border-radius:4px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis}.cdk-high-contrast-active .mat-tooltip{outline:solid 1px}.mat-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}\n"],encapsulation:2,data:{animation:[y.tooltipState]},changeDetection:0}),t}(),w=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=o.Ob({type:t}),t.\u0275inj=o.Nb({factory:function(e){return new(e||t)},providers:[k],imports:[[a.a,r.c,i.f,s.k],s.k,c.c]}),t}()},R0Ic:function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"d",(function(){return m})),n.d(e,"e",(function(){return s})),n.d(e,"f",(function(){return p})),n.d(e,"g",(function(){return c})),n.d(e,"h",(function(){return f})),n.d(e,"i",(function(){return b})),n.d(e,"j",(function(){return l})),n.d(e,"k",(function(){return d})),n.d(e,"l",(function(){return u})),n.d(e,"m",(function(){return h})),n.d(e,"n",(function(){return o})),n.d(e,"o",(function(){return v})),n.d(e,"p",(function(){return y}));var i=function t(){_classCallCheck(this,t)},a=function t(){_classCallCheck(this,t)},r="*";function o(t,e){return{type:7,name:t,definitions:e,options:{}}}function s(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:4,styles:e,timings:t}}function c(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:3,steps:t,options:e}}function l(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{type:2,steps:t,options:e}}function u(t){return{type:6,styles:t,offset:null}}function d(t,e,n){return{type:0,name:t,styles:e,options:n}}function f(t){return{type:5,steps:t}}function h(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return{type:1,expr:t,animation:e,options:n}}function p(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return{type:9,options:t}}function b(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return{type:11,selector:t,animation:e,options:n}}function g(t){Promise.resolve(null).then(t)}var m=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;_classCallCheck(this,t),this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this.parentPlayer=null,this.totalTime=e+n}return _createClass(t,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach((function(t){return t()})),this._onDoneFns=[])}},{key:"onStart",value:function(t){this._onStartFns.push(t)}},{key:"onDone",value:function(t){this._onDoneFns.push(t)}},{key:"onDestroy",value:function(t){this._onDestroyFns.push(t)}},{key:"hasStarted",value:function(){return this._started}},{key:"init",value:function(){}},{key:"play",value:function(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}},{key:"triggerMicrotask",value:function(){var t=this;g((function(){return t._onFinish()}))}},{key:"_onStart",value:function(){this._onStartFns.forEach((function(t){return t()})),this._onStartFns=[]}},{key:"pause",value:function(){}},{key:"restart",value:function(){}},{key:"finish",value:function(){this._onFinish()}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach((function(t){return t()})),this._onDestroyFns=[])}},{key:"reset",value:function(){}},{key:"setPosition",value:function(t){}},{key:"getPosition",value:function(){return 0}},{key:"triggerCallback",value:function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach((function(t){return t()})),e.length=0}}]),t}(),v=function(){function t(e){var n=this;_classCallCheck(this,t),this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=e;var i=0,a=0,r=0,o=this.players.length;0==o?g((function(){return n._onFinish()})):this.players.forEach((function(t){t.onDone((function(){++i==o&&n._onFinish()})),t.onDestroy((function(){++a==o&&n._onDestroy()})),t.onStart((function(){++r==o&&n._onStart()}))})),this.totalTime=this.players.reduce((function(t,e){return Math.max(t,e.totalTime)}),0)}return _createClass(t,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach((function(t){return t()})),this._onDoneFns=[])}},{key:"init",value:function(){this.players.forEach((function(t){return t.init()}))}},{key:"onStart",value:function(t){this._onStartFns.push(t)}},{key:"_onStart",value:function(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach((function(t){return t()})),this._onStartFns=[])}},{key:"onDone",value:function(t){this._onDoneFns.push(t)}},{key:"onDestroy",value:function(t){this._onDestroyFns.push(t)}},{key:"hasStarted",value:function(){return this._started}},{key:"play",value:function(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach((function(t){return t.play()}))}},{key:"pause",value:function(){this.players.forEach((function(t){return t.pause()}))}},{key:"restart",value:function(){this.players.forEach((function(t){return t.restart()}))}},{key:"finish",value:function(){this._onFinish(),this.players.forEach((function(t){return t.finish()}))}},{key:"destroy",value:function(){this._onDestroy()}},{key:"_onDestroy",value:function(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach((function(t){return t.destroy()})),this._onDestroyFns.forEach((function(t){return t()})),this._onDestroyFns=[])}},{key:"reset",value:function(){this.players.forEach((function(t){return t.reset()})),this._destroyed=!1,this._finished=!1,this._started=!1}},{key:"setPosition",value:function(t){var e=t*this.totalTime;this.players.forEach((function(t){var n=t.totalTime?Math.min(1,e/t.totalTime):1;t.setPosition(n)}))}},{key:"getPosition",value:function(){var t=0;return this.players.forEach((function(e){var n=e.getPosition();t=Math.min(n,t)})),t}},{key:"beforeDestroy",value:function(){this.players.forEach((function(t){t.beforeDestroy&&t.beforeDestroy()}))}},{key:"triggerCallback",value:function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach((function(t){return t()})),e.length=0}}]),t}(),y="!"},R1ws:function(t,e,n){"use strict";n.d(e,"a",(function(){return Ce})),n.d(e,"b",(function(){return xe}));var i=n("fXoL"),a=n("jhN1"),r=n("R0Ic");function o(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function s(t){switch(t.length){case 0:return new r.d;case 1:return t[0];default:return new r.o(t)}}function c(t,e,n,i){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},s=[],c=[],l=-1,u=null;if(i.forEach((function(t){var n=t.offset,i=n==l,d=i&&u||{};Object.keys(t).forEach((function(n){var i=n,c=t[n];if("offset"!==n)switch(i=e.normalizePropertyName(i,s),c){case r.p:c=a[n];break;case r.a:c=o[n];break;default:c=e.normalizeStyleValue(n,i,c,s)}d[i]=c})),i||c.push(d),u=d,l=n})),s.length){var d="\n - ";throw new Error("Unable to animate due to the following errors:".concat(d).concat(s.join(d)))}return c}function l(t,e,n,i){switch(e){case"start":t.onStart((function(){return i(n&&u(n,"start",t))}));break;case"done":t.onDone((function(){return i(n&&u(n,"done",t))}));break;case"destroy":t.onDestroy((function(){return i(n&&u(n,"destroy",t))}))}}function u(t,e,n){var i=n.totalTime,a=d(t.element,t.triggerName,t.fromState,t.toState,e||t.phaseName,null==i?t.totalTime:i,!!n.disabled),r=t._data;return null!=r&&(a._data=r),a}function d(t,e,n,i){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,o=arguments.length>6?arguments[6]:void 0;return{element:t,triggerName:e,fromState:n,toState:i,phaseName:a,totalTime:r,disabled:!!o}}function f(t,e,n){var i;return t instanceof Map?(i=t.get(e))||t.set(e,i=n):(i=t[e])||(i=t[e]=n),i}function h(t){var e=t.indexOf(":");return[t.substring(1,e),t.substr(e+1)]}var p=function(t,e){return!1},b=function(t,e){return!1},g=function(t,e,n){return[]},m=o();(m||"undefined"!=typeof Element)&&(p=function(t,e){return t.contains(e)},b=function(){if(m||Element.prototype.matches)return function(t,e){return t.matches(e)};var t=Element.prototype,e=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector;return e?function(t,n){return e.apply(t,[n])}:b}(),g=function(t,e,n){var i=[];if(n)i.push.apply(i,_toConsumableArray(t.querySelectorAll(e)));else{var a=t.querySelector(e);a&&i.push(a)}return i});var v=null,y=!1;function _(t){v||(v=("undefined"!=typeof document?document.body:null)||{},y=!!v.style&&"WebkitAppearance"in v.style);var e=!0;return v.style&&!function(t){return"ebkit"==t.substring(1,6)}(t)&&(!(e=t in v.style)&&y)&&(e="Webkit"+t.charAt(0).toUpperCase()+t.substr(1)in v.style),e}var C=b,k=p,x=g;function O(t){var e={};return Object.keys(t).forEach((function(n){var i=n.replace(/([a-z])([A-Z])/g,"$1-$2");e[i]=t[n]})),e}var D,w=((D=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"validateStyleProperty",value:function(t){return _(t)}},{key:"matchesElement",value:function(t,e){return C(t,e)}},{key:"containsElement",value:function(t,e){return k(t,e)}},{key:"query",value:function(t,e,n){return x(t,e,n)}},{key:"computeStyle",value:function(t,e,n){return n||""}},{key:"animate",value:function(t,e,n,i,a){return new r.d(n,i)}}]),t}()).\u0275fac=function(t){return new(t||D)},D.\u0275prov=i.Mb({token:D,factory:D.\u0275fac}),D),M=function(){var t=function t(){_classCallCheck(this,t)};return t.NOOP=new w,t}();function S(t){if("number"==typeof t)return t;var e=t.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:I(parseFloat(e[1]),e[2])}function I(t,e){switch(e){case"s":return 1e3*t;default:return t}}function P(t,e,n){return t.hasOwnProperty("duration")?t:function(t,e,n){var i,a=0,r="";if("string"==typeof t){var o=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===o)return e.push('The provided timing value "'.concat(t,'" is invalid.')),{duration:0,delay:0,easing:""};i=I(parseFloat(o[1]),o[2]);var s=o[3];null!=s&&(a=I(parseFloat(s),o[4]));var c=o[5];c&&(r=c)}else i=t;if(!n){var l=!1,u=e.length;i<0&&(e.push("Duration values below 0 are not allowed for this animation step."),l=!0),a<0&&(e.push("Delay values below 0 are not allowed for this animation step."),l=!0),l&&e.splice(u,0,'The provided timing value "'.concat(t,'" is invalid.'))}return{duration:i,delay:a,easing:r}}(t,e,n)}function R(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).forEach((function(n){e[n]=t[n]})),e}function V(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e)for(var i in t)n[i]=t[i];else R(t,n);return n}function j(t,e,n){return n?e+":"+n+";":""}function A(t){for(var e="",n=0;n<t.style.length;n++){var i=t.style.item(n);e+=j(0,i,t.style.getPropertyValue(i))}for(var a in t.style)t.style.hasOwnProperty(a)&&!a.startsWith("_")&&(e+=j(0,a.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),t.style[a]));t.setAttribute("style",e)}function W(t,e,n){t.style&&(Object.keys(e).forEach((function(i){var a=B(i);n&&!n.hasOwnProperty(i)&&(n[i]=t.style[a]),t.style[a]=e[i]})),o()&&A(t))}function T(t,e){t.style&&(Object.keys(e).forEach((function(e){var n=B(e);t.style[n]=""})),o()&&A(t))}function E(t){return Array.isArray(t)?1==t.length?t[0]:Object(r.j)(t):t}var F=new RegExp("{{\\s*(.+?)\\s*}}","g");function L(t){var e=[];if("string"==typeof t){for(var n;n=F.exec(t);)e.push(n[1]);F.lastIndex=0}return e}function Q(t,e,n){var i=t.toString(),a=i.replace(F,(function(t,i){var a=e[i];return e.hasOwnProperty(i)||(n.push("Please provide a value for the animation param "+i),a=""),a.toString()}));return a==i?t:a}function N(t){for(var e=[],n=t.next();!n.done;)e.push(n.value),n=t.next();return e}var z=/-+([a-z0-9])/g;function B(t){return t.replace(z,(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e[1].toUpperCase()}))}function U(t,e){return 0===t||0===e}function H(t,e,n){var i=Object.keys(n);if(i.length&&e.length){var a=e[0],r=[];if(i.forEach((function(t){a.hasOwnProperty(t)||r.push(t),a[t]=n[t]})),r.length)for(var o=function(){var n=e[s];r.forEach((function(e){n[e]=$(t,e)}))},s=1;s<e.length;s++)o()}return e}function G(t,e,n){switch(e.type){case 7:return t.visitTrigger(e,n);case 0:return t.visitState(e,n);case 1:return t.visitTransition(e,n);case 2:return t.visitSequence(e,n);case 3:return t.visitGroup(e,n);case 4:return t.visitAnimate(e,n);case 5:return t.visitKeyframes(e,n);case 6:return t.visitStyle(e,n);case 8:return t.visitReference(e,n);case 9:return t.visitAnimateChild(e,n);case 10:return t.visitAnimateRef(e,n);case 11:return t.visitQuery(e,n);case 12:return t.visitStagger(e,n);default:throw new Error("Unable to resolve animation metadata node #"+e.type)}}function $(t,e){return window.getComputedStyle(t)[e]}var X=new Set(["true","1"]),q=new Set(["false","0"]);function K(t,e){var n=X.has(t)||q.has(t),i=X.has(e)||q.has(e);return function(a,r){var o="*"==t||t==a,s="*"==e||e==r;return!o&&n&&"boolean"==typeof a&&(o=a?X.has(t):q.has(t)),!s&&i&&"boolean"==typeof r&&(s=r?X.has(e):q.has(e)),o&&s}}var Y=new RegExp("s*:selfs*,?","g");function J(t,e,n){return new Z(t).build(e,n)}var Z=function(){function t(e){_classCallCheck(this,t),this._driver=e}return _createClass(t,[{key:"build",value:function(t,e){var n=new tt(e);return this._resetContextStyleTimingState(n),G(this,E(t),n)}},{key:"_resetContextStyleTimingState",value:function(t){t.currentQuerySelector="",t.collectedStyles={},t.collectedStyles[""]={},t.currentTime=0}},{key:"visitTrigger",value:function(t,e){var n=this,i=e.queryCount=0,a=e.depCount=0,r=[],o=[];return"@"==t.name.charAt(0)&&e.errors.push("animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"),t.definitions.forEach((function(t){if(n._resetContextStyleTimingState(e),0==t.type){var s=t,c=s.name;c.toString().split(/\s*,\s*/).forEach((function(t){s.name=t,r.push(n.visitState(s,e))})),s.name=c}else if(1==t.type){var l=n.visitTransition(t,e);i+=l.queryCount,a+=l.depCount,o.push(l)}else e.errors.push("only state() and transition() definitions can sit inside of a trigger()")})),{type:7,name:t.name,states:r,transitions:o,queryCount:i,depCount:a,options:null}}},{key:"visitState",value:function(t,e){var n=this.visitStyle(t.styles,e),i=t.options&&t.options.params||null;if(n.containsDynamicStyles){var a=new Set,r=i||{};if(n.styles.forEach((function(t){if(et(t)){var e=t;Object.keys(e).forEach((function(t){L(e[t]).forEach((function(t){r.hasOwnProperty(t)||a.add(t)}))}))}})),a.size){var o=N(a.values());e.errors.push('state("'.concat(t.name,'", ...) must define default values for all the following style substitutions: ').concat(o.join(", ")))}}return{type:0,name:t.name,style:n,options:i?{params:i}:null}}},{key:"visitTransition",value:function(t,e){e.queryCount=0,e.depCount=0;var n,i,a,r=G(this,E(t.animation),e);return{type:1,matchers:(n=t.expr,i=e.errors,a=[],"string"==typeof n?n.split(/\s*,\s*/).forEach((function(t){return function(t,e,n){if(":"==t[0]){var i=function(t,e){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return function(t,e){return parseFloat(e)>parseFloat(t)};case":decrement":return function(t,e){return parseFloat(e)<parseFloat(t)};default:return e.push('The transition alias value "'.concat(t,'" is not supported')),"* => *"}}(t,n);if("function"==typeof i)return void e.push(i);t=i}var a=t.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==a||a.length<4)return n.push('The provided transition expression "'.concat(t,'" is not supported')),e;var r=a[1],o=a[2],s=a[3];e.push(K(r,s)),"<"!=o[0]||"*"==r&&"*"==s||e.push(K(s,r))}(t,a,i)})):a.push(n),a),animation:r,queryCount:e.queryCount,depCount:e.depCount,options:nt(t.options)}}},{key:"visitSequence",value:function(t,e){var n=this;return{type:2,steps:t.steps.map((function(t){return G(n,t,e)})),options:nt(t.options)}}},{key:"visitGroup",value:function(t,e){var n=this,i=e.currentTime,a=0,r=t.steps.map((function(t){e.currentTime=i;var r=G(n,t,e);return a=Math.max(a,e.currentTime),r}));return e.currentTime=a,{type:3,steps:r,options:nt(t.options)}}},{key:"visitAnimate",value:function(t,e){var n,i=function(t,e){var n=null;if(t.hasOwnProperty("duration"))n=t;else if("number"==typeof t)return it(P(t,e).duration,0,"");var i=t;if(i.split(/\s+/).some((function(t){return"{"==t.charAt(0)&&"{"==t.charAt(1)}))){var a=it(0,0,"");return a.dynamic=!0,a.strValue=i,a}return it((n=n||P(i,e)).duration,n.delay,n.easing)}(t.timings,e.errors);e.currentAnimateTimings=i;var a=t.styles?t.styles:Object(r.l)({});if(5==a.type)n=this.visitKeyframes(a,e);else{var o=t.styles,s=!1;if(!o){s=!0;var c={};i.easing&&(c.easing=i.easing),o=Object(r.l)(c)}e.currentTime+=i.duration+i.delay;var l=this.visitStyle(o,e);l.isEmptyStep=s,n=l}return e.currentAnimateTimings=null,{type:4,timings:i,style:n,options:null}}},{key:"visitStyle",value:function(t,e){var n=this._makeStyleAst(t,e);return this._validateStyleAst(n,e),n}},{key:"_makeStyleAst",value:function(t,e){var n=[];Array.isArray(t.styles)?t.styles.forEach((function(t){"string"==typeof t?t==r.a?n.push(t):e.errors.push("The provided style string value ".concat(t," is not allowed.")):n.push(t)})):n.push(t.styles);var i=!1,a=null;return n.forEach((function(t){if(et(t)){var e=t,n=e.easing;if(n&&(a=n,delete e.easing),!i)for(var r in e)if(e[r].toString().indexOf("{{")>=0){i=!0;break}}})),{type:6,styles:n,easing:a,offset:t.offset,containsDynamicStyles:i,options:null}}},{key:"_validateStyleAst",value:function(t,e){var n=this,i=e.currentAnimateTimings,a=e.currentTime,r=e.currentTime;i&&r>0&&(r-=i.duration+i.delay),t.styles.forEach((function(t){"string"!=typeof t&&Object.keys(t).forEach((function(i){if(n._driver.validateStyleProperty(i)){var o,s,c,l,u,d=e.collectedStyles[e.currentQuerySelector],f=d[i],h=!0;f&&(r!=a&&r>=f.startTime&&a<=f.endTime&&(e.errors.push('The CSS property "'.concat(i,'" that exists between the times of "').concat(f.startTime,'ms" and "').concat(f.endTime,'ms" is also being animated in a parallel animation between the times of "').concat(r,'ms" and "').concat(a,'ms"')),h=!1),r=f.startTime),h&&(d[i]={startTime:r,endTime:a}),e.options&&(o=t[i],s=e.options,c=e.errors,l=s.params||{},(u=L(o)).length&&u.forEach((function(t){l.hasOwnProperty(t)||c.push("Unable to resolve the local animation param ".concat(t," in the given list of values"))})))}else e.errors.push('The provided animation property "'.concat(i,'" is not a supported CSS property for animations'))}))}))}},{key:"visitKeyframes",value:function(t,e){var n=this,i={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push("keyframes() must be placed inside of a call to animate()"),i;var a=0,r=[],o=!1,s=!1,c=0,l=t.steps.map((function(t){var i=n._makeStyleAst(t,e),l=null!=i.offset?i.offset:function(t){if("string"==typeof t)return null;var e=null;if(Array.isArray(t))t.forEach((function(t){if(et(t)&&t.hasOwnProperty("offset")){var n=t;e=parseFloat(n.offset),delete n.offset}}));else if(et(t)&&t.hasOwnProperty("offset")){var n=t;e=parseFloat(n.offset),delete n.offset}return e}(i.styles),u=0;return null!=l&&(a++,u=i.offset=l),s=s||u<0||u>1,o=o||u<c,c=u,r.push(u),i}));s&&e.errors.push("Please ensure that all keyframe offsets are between 0 and 1"),o&&e.errors.push("Please ensure that all keyframe offsets are in order");var u=t.steps.length,d=0;a>0&&a<u?e.errors.push("Not all style() steps within the declared keyframes() contain offsets"):0==a&&(d=1/(u-1));var f=u-1,h=e.currentTime,p=e.currentAnimateTimings,b=p.duration;return l.forEach((function(t,a){var o=d>0?a==f?1:d*a:r[a],s=o*b;e.currentTime=h+p.delay+s,p.duration=s,n._validateStyleAst(t,e),t.offset=o,i.styles.push(t)})),i}},{key:"visitReference",value:function(t,e){return{type:8,animation:G(this,E(t.animation),e),options:nt(t.options)}}},{key:"visitAnimateChild",value:function(t,e){return e.depCount++,{type:9,options:nt(t.options)}}},{key:"visitAnimateRef",value:function(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:nt(t.options)}}},{key:"visitQuery",value:function(t,e){var n=e.currentQuerySelector,i=t.options||{};e.queryCount++,e.currentQuery=t;var a=_slicedToArray(function(t){var e=!!t.split(/\s*,\s*/).find((function(t){return":self"==t}));return e&&(t=t.replace(Y,"")),[t=t.replace(/@\*/g,".ng-trigger").replace(/@\w+/g,(function(t){return".ng-trigger-"+t.substr(1)})).replace(/:animating/g,".ng-animating"),e]}(t.selector),2),r=a[0],o=a[1];e.currentQuerySelector=n.length?n+" "+r:r,f(e.collectedStyles,e.currentQuerySelector,{});var s=G(this,E(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=n,{type:11,selector:r,limit:i.limit||0,optional:!!i.optional,includeSelf:o,animation:s,originalSelector:t.selector,options:nt(t.options)}}},{key:"visitStagger",value:function(t,e){e.currentQuery||e.errors.push("stagger() can only be used inside of query()");var n="full"===t.timings?{duration:0,delay:0,easing:"full"}:P(t.timings,e.errors,!0);return{type:12,animation:G(this,E(t.animation),e),timings:n,options:null}}}]),t}(),tt=function t(e){_classCallCheck(this,t),this.errors=e,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};function et(t){return!Array.isArray(t)&&"object"==typeof t}function nt(t){var e;return t?(t=R(t)).params&&(t.params=(e=t.params)?R(e):null):t={},t}function it(t,e,n){return{duration:t,delay:e,easing:n}}function at(t,e,n,i,a,r){var o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]&&arguments[7];return{type:1,element:t,keyframes:e,preStyleProps:n,postStyleProps:i,duration:a,delay:r,totalTime:a+r,easing:o,subTimeline:s}}var rt=function(){function t(){_classCallCheck(this,t),this._map=new Map}return _createClass(t,[{key:"consume",value:function(t){var e=this._map.get(t);return e?this._map.delete(t):e=[],e}},{key:"append",value:function(t,e){var n,i=this._map.get(t);i||this._map.set(t,i=[]),(n=i).push.apply(n,_toConsumableArray(e))}},{key:"has",value:function(t){return this._map.has(t)}},{key:"clear",value:function(){this._map.clear()}}]),t}(),ot=new RegExp(":enter","g"),st=new RegExp(":leave","g");function ct(t,e,n,i,a){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},s=arguments.length>7?arguments[7]:void 0,c=arguments.length>8?arguments[8]:void 0,l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:[];return(new lt).buildKeyframes(t,e,n,i,a,r,o,s,c,l)}var lt=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"buildKeyframes",value:function(t,e,n,i,a,r,o,s,c){var l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:[];c=c||new rt;var u=new dt(t,e,c,i,a,l,[]);u.options=s,u.currentTimeline.setStyles([r],null,u.errors,s),G(this,n,u);var d=u.timelines.filter((function(t){return t.containsAnimation()}));if(d.length&&Object.keys(o).length){var f=d[d.length-1];f.allowOnlyTimelineStyles()||f.setStyles([o],null,u.errors,s)}return d.length?d.map((function(t){return t.buildKeyframes()})):[at(e,[],[],[],0,0,"",!1)]}},{key:"visitTrigger",value:function(t,e){}},{key:"visitState",value:function(t,e){}},{key:"visitTransition",value:function(t,e){}},{key:"visitAnimateChild",value:function(t,e){var n=e.subInstructions.consume(e.element);if(n){var i=e.createSubContext(t.options),a=e.currentTimeline.currentTime,r=this._visitSubInstructions(n,i,i.options);a!=r&&e.transformIntoNewTimeline(r)}e.previousNode=t}},{key:"visitAnimateRef",value:function(t,e){var n=e.createSubContext(t.options);n.transformIntoNewTimeline(),this.visitReference(t.animation,n),e.transformIntoNewTimeline(n.currentTimeline.currentTime),e.previousNode=t}},{key:"_visitSubInstructions",value:function(t,e,n){var i=e.currentTimeline.currentTime,a=null!=n.duration?S(n.duration):null,r=null!=n.delay?S(n.delay):null;return 0!==a&&t.forEach((function(t){var n=e.appendInstructionToTimeline(t,a,r);i=Math.max(i,n.duration+n.delay)})),i}},{key:"visitReference",value:function(t,e){e.updateOptions(t.options,!0),G(this,t.animation,e),e.previousNode=t}},{key:"visitSequence",value:function(t,e){var n=this,i=e.subContextCount,a=e,r=t.options;if(r&&(r.params||r.delay)&&((a=e.createSubContext(r)).transformIntoNewTimeline(),null!=r.delay)){6==a.previousNode.type&&(a.currentTimeline.snapshotCurrentStyles(),a.previousNode=ut);var o=S(r.delay);a.delayNextStep(o)}t.steps.length&&(t.steps.forEach((function(t){return G(n,t,a)})),a.currentTimeline.applyStylesToKeyframe(),a.subContextCount>i&&a.transformIntoNewTimeline()),e.previousNode=t}},{key:"visitGroup",value:function(t,e){var n=this,i=[],a=e.currentTimeline.currentTime,r=t.options&&t.options.delay?S(t.options.delay):0;t.steps.forEach((function(o){var s=e.createSubContext(t.options);r&&s.delayNextStep(r),G(n,o,s),a=Math.max(a,s.currentTimeline.currentTime),i.push(s.currentTimeline)})),i.forEach((function(t){return e.currentTimeline.mergeTimelineCollectedStyles(t)})),e.transformIntoNewTimeline(a),e.previousNode=t}},{key:"_visitTiming",value:function(t,e){if(t.dynamic){var n=t.strValue;return P(e.params?Q(n,e.params,e.errors):n,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}},{key:"visitAnimate",value:function(t,e){var n=e.currentAnimateTimings=this._visitTiming(t.timings,e),i=e.currentTimeline;n.delay&&(e.incrementTime(n.delay),i.snapshotCurrentStyles());var a=t.style;5==a.type?this.visitKeyframes(a,e):(e.incrementTime(n.duration),this.visitStyle(a,e),i.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}},{key:"visitStyle",value:function(t,e){var n=e.currentTimeline,i=e.currentAnimateTimings;!i&&n.getCurrentStyleProperties().length&&n.forwardFrame();var a=i&&i.easing||t.easing;t.isEmptyStep?n.applyEmptyStep(a):n.setStyles(t.styles,a,e.errors,e.options),e.previousNode=t}},{key:"visitKeyframes",value:function(t,e){var n=e.currentAnimateTimings,i=e.currentTimeline.duration,a=n.duration,r=e.createSubContext().currentTimeline;r.easing=n.easing,t.styles.forEach((function(t){r.forwardTime((t.offset||0)*a),r.setStyles(t.styles,t.easing,e.errors,e.options),r.applyStylesToKeyframe()})),e.currentTimeline.mergeTimelineCollectedStyles(r),e.transformIntoNewTimeline(i+a),e.previousNode=t}},{key:"visitQuery",value:function(t,e){var n=this,i=e.currentTimeline.currentTime,a=t.options||{},r=a.delay?S(a.delay):0;r&&(6===e.previousNode.type||0==i&&e.currentTimeline.getCurrentStyleProperties().length)&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=ut);var o=i,s=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!a.optional,e.errors);e.currentQueryTotal=s.length;var c=null;s.forEach((function(i,a){e.currentQueryIndex=a;var s=e.createSubContext(t.options,i);r&&s.delayNextStep(r),i===e.element&&(c=s.currentTimeline),G(n,t.animation,s),s.currentTimeline.applyStylesToKeyframe(),o=Math.max(o,s.currentTimeline.currentTime)})),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(o),c&&(e.currentTimeline.mergeTimelineCollectedStyles(c),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}},{key:"visitStagger",value:function(t,e){var n=e.parentContext,i=e.currentTimeline,a=t.timings,r=Math.abs(a.duration),o=r*(e.currentQueryTotal-1),s=r*e.currentQueryIndex;switch(a.duration<0?"reverse":a.easing){case"reverse":s=o-s;break;case"full":s=n.currentStaggerTime}var c=e.currentTimeline;s&&c.delayNextStep(s);var l=c.currentTime;G(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=i.currentTime-l+(i.startTime-n.currentTimeline.startTime)}}]),t}(),ut={},dt=function(){function t(e,n,i,a,r,o,s,c){_classCallCheck(this,t),this._driver=e,this.element=n,this.subInstructions=i,this._enterClassName=a,this._leaveClassName=r,this.errors=o,this.timelines=s,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=ut,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=c||new ft(this._driver,n,0),s.push(this.currentTimeline)}return _createClass(t,[{key:"updateOptions",value:function(t,e){var n=this;if(t){var i=t,a=this.options;null!=i.duration&&(a.duration=S(i.duration)),null!=i.delay&&(a.delay=S(i.delay));var r=i.params;if(r){var o=a.params;o||(o=this.options.params={}),Object.keys(r).forEach((function(t){e&&o.hasOwnProperty(t)||(o[t]=Q(r[t],o,n.errors))}))}}}},{key:"_copyOptions",value:function(){var t={};if(this.options){var e=this.options.params;if(e){var n=t.params={};Object.keys(e).forEach((function(t){n[t]=e[t]}))}}return t}},{key:"createSubContext",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,a=n||this.element,r=new t(this._driver,a,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(a,i||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(e),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}},{key:"transformIntoNewTimeline",value:function(t){return this.previousNode=ut,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}},{key:"appendInstructionToTimeline",value:function(t,e,n){var i={duration:null!=e?e:t.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+t.delay,easing:""},a=new ht(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,i,t.stretchStartingKeyframe);return this.timelines.push(a),i}},{key:"incrementTime",value:function(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}},{key:"delayNextStep",value:function(t){t>0&&this.currentTimeline.delayNextStep(t)}},{key:"invokeQuery",value:function(t,e,n,i,a,r){var o=[];if(i&&o.push(this.element),t.length>0){t=(t=t.replace(ot,"."+this._enterClassName)).replace(st,"."+this._leaveClassName);var s=this._driver.query(this.element,t,1!=n);0!==n&&(s=n<0?s.slice(s.length+n,s.length):s.slice(0,n)),o.push.apply(o,_toConsumableArray(s))}return a||0!=o.length||r.push('`query("'.concat(e,'")` returned zero elements. (Use `query("').concat(e,'", { optional: true })` if you wish to allow this.)')),o}},{key:"params",get:function(){return this.options.params}}]),t}(),ft=function(){function t(e,n,i,a){_classCallCheck(this,t),this._driver=e,this.element=n,this.startTime=i,this._elementTimelineStylesLookup=a,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(n),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(n,this._localTimelineStyles)),this._loadKeyframe()}return _createClass(t,[{key:"containsAnimation",value:function(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}}},{key:"getCurrentStyleProperties",value:function(){return Object.keys(this._currentKeyframe)}},{key:"delayNextStep",value:function(t){var e=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}},{key:"fork",value:function(e,n){return this.applyStylesToKeyframe(),new t(this._driver,e,n||this.currentTime,this._elementTimelineStylesLookup)}},{key:"_loadKeyframe",value:function(){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))}},{key:"forwardFrame",value:function(){this.duration+=1,this._loadKeyframe()}},{key:"forwardTime",value:function(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}},{key:"_updateStyle",value:function(t,e){this._localTimelineStyles[t]=e,this._globalTimelineStyles[t]=e,this._styleSummary[t]={time:this.currentTime,value:e}}},{key:"allowOnlyTimelineStyles",value:function(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}},{key:"applyEmptyStep",value:function(t){var e=this;t&&(this._previousKeyframe.easing=t),Object.keys(this._globalTimelineStyles).forEach((function(t){e._backFill[t]=e._globalTimelineStyles[t]||r.a,e._currentKeyframe[t]=r.a})),this._currentEmptyStepKeyframe=this._currentKeyframe}},{key:"setStyles",value:function(t,e,n,i){var a=this;e&&(this._previousKeyframe.easing=e);var o=i&&i.params||{},s=function(t,e){var n,i={};return t.forEach((function(t){"*"===t?(n=n||Object.keys(e)).forEach((function(t){i[t]=r.a})):V(t,!1,i)})),i}(t,this._globalTimelineStyles);Object.keys(s).forEach((function(t){var e=Q(s[t],o,n);a._pendingStyles[t]=e,a._localTimelineStyles.hasOwnProperty(t)||(a._backFill[t]=a._globalTimelineStyles.hasOwnProperty(t)?a._globalTimelineStyles[t]:r.a),a._updateStyle(t,e)}))}},{key:"applyStylesToKeyframe",value:function(){var t=this,e=this._pendingStyles,n=Object.keys(e);0!=n.length&&(this._pendingStyles={},n.forEach((function(n){t._currentKeyframe[n]=e[n]})),Object.keys(this._localTimelineStyles).forEach((function(e){t._currentKeyframe.hasOwnProperty(e)||(t._currentKeyframe[e]=t._localTimelineStyles[e])})))}},{key:"snapshotCurrentStyles",value:function(){var t=this;Object.keys(this._localTimelineStyles).forEach((function(e){var n=t._localTimelineStyles[e];t._pendingStyles[e]=n,t._updateStyle(e,n)}))}},{key:"getFinalKeyframe",value:function(){return this._keyframes.get(this.duration)}},{key:"mergeTimelineCollectedStyles",value:function(t){var e=this;Object.keys(t._styleSummary).forEach((function(n){var i=e._styleSummary[n],a=t._styleSummary[n];(!i||a.time>i.time)&&e._updateStyle(n,a.value)}))}},{key:"buildKeyframes",value:function(){var t=this;this.applyStylesToKeyframe();var e=new Set,n=new Set,i=1===this._keyframes.size&&0===this.duration,a=[];this._keyframes.forEach((function(o,s){var c=V(o,!0);Object.keys(c).forEach((function(t){var i=c[t];i==r.p?e.add(t):i==r.a&&n.add(t)})),i||(c.offset=s/t.duration),a.push(c)}));var o=e.size?N(e.values()):[],s=n.size?N(n.values()):[];if(i){var c=a[0],l=R(c);c.offset=0,l.offset=1,a=[c,l]}return at(this.element,a,o,s,this.duration,this.startTime,this.easing,!1)}},{key:"currentTime",get:function(){return this.startTime+this.duration}},{key:"properties",get:function(){var t=[];for(var e in this._currentKeyframe)t.push(e);return t}}]),t}(),ht=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a,r,o,s){var c,l=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return _classCallCheck(this,n),(c=e.call(this,t,i,s.delay)).element=i,c.keyframes=a,c.preStyleProps=r,c.postStyleProps=o,c._stretchStartingKeyframe=l,c.timings={duration:s.duration,delay:s.delay,easing:s.easing},c}return _createClass(n,[{key:"containsAnimation",value:function(){return this.keyframes.length>1}},{key:"buildKeyframes",value:function(){var t=this.keyframes,e=this.timings,n=e.delay,i=e.duration,a=e.easing;if(this._stretchStartingKeyframe&&n){var r=[],o=i+n,s=n/o,c=V(t[0],!1);c.offset=0,r.push(c);var l=V(t[0],!1);l.offset=pt(s),r.push(l);for(var u=t.length-1,d=1;d<=u;d++){var f=V(t[d],!1);f.offset=pt((n+f.offset*i)/o),r.push(f)}i=o,n=0,a="",t=r}return at(this.element,t,this.preStyleProps,this.postStyleProps,i,n,a,!0)}}]),n}(ft);function pt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=Math.pow(10,e-1);return Math.round(t*n)/n}var bt,gt,mt=function t(){_classCallCheck(this,t)},vt=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return _createClass(n,[{key:"normalizePropertyName",value:function(t,e){return B(t)}},{key:"normalizeStyleValue",value:function(t,e,n,i){var a="",r=n.toString().trim();if(yt[e]&&0!==n&&"0"!==n)if("number"==typeof n)a="px";else{var o=n.match(/^[+-]?[\d\.]+([a-z]*)$/);o&&0==o[1].length&&i.push("Please provide a CSS unit value for ".concat(t,":").concat(n))}return r+a}}]),n}(mt),yt=(bt="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(","),gt={},bt.forEach((function(t){return gt[t]=!0})),gt);function _t(t,e,n,i,a,r,o,s,c,l,u,d,f){return{type:0,element:t,triggerName:e,isRemovalTransition:a,fromState:n,fromStyles:r,toState:i,toStyles:o,timelines:s,queriedElements:c,preStyleProps:l,postStyleProps:u,totalTime:d,errors:f}}var Ct={},kt=function(){function t(e,n,i){_classCallCheck(this,t),this._triggerName=e,this.ast=n,this._stateStyles=i}return _createClass(t,[{key:"match",value:function(t,e,n,i){return function(t,e,n,i,a){return t.some((function(t){return t(e,n,i,a)}))}(this.ast.matchers,t,e,n,i)}},{key:"buildStyles",value:function(t,e,n){var i=this._stateStyles["*"],a=this._stateStyles[t],r=i?i.buildStyles(e,n):{};return a?a.buildStyles(e,n):r}},{key:"build",value:function(t,e,n,i,a,r,o,s,c,l){var u=[],d=this.ast.options&&this.ast.options.params||Ct,h=this.buildStyles(n,o&&o.params||Ct,u),p=s&&s.params||Ct,b=this.buildStyles(i,p,u),g=new Set,m=new Map,v=new Map,y="void"===i,_={params:Object.assign(Object.assign({},d),p)},C=l?[]:ct(t,e,this.ast.animation,a,r,h,b,_,c,u),k=0;if(C.forEach((function(t){k=Math.max(t.duration+t.delay,k)})),u.length)return _t(e,this._triggerName,n,i,y,h,b,[],[],m,v,k,u);C.forEach((function(t){var n=t.element,i=f(m,n,{});t.preStyleProps.forEach((function(t){return i[t]=!0}));var a=f(v,n,{});t.postStyleProps.forEach((function(t){return a[t]=!0})),n!==e&&g.add(n)}));var x=N(g.values());return _t(e,this._triggerName,n,i,y,h,b,C,x,m,v,k)}}]),t}(),xt=function(){function t(e,n){_classCallCheck(this,t),this.styles=e,this.defaultParams=n}return _createClass(t,[{key:"buildStyles",value:function(t,e){var n={},i=R(this.defaultParams);return Object.keys(t).forEach((function(e){var n=t[e];null!=n&&(i[e]=n)})),this.styles.styles.forEach((function(t){if("string"!=typeof t){var a=t;Object.keys(a).forEach((function(t){var r=a[t];r.length>1&&(r=Q(r,i,e)),n[t]=r}))}})),n}}]),t}(),Ot=function(){function t(e,n){var i=this;_classCallCheck(this,t),this.name=e,this.ast=n,this.transitionFactories=[],this.states={},n.states.forEach((function(t){i.states[t.name]=new xt(t.style,t.options&&t.options.params||{})})),Dt(this.states,"true","1"),Dt(this.states,"false","0"),n.transitions.forEach((function(t){i.transitionFactories.push(new kt(e,t,i.states))})),this.fallbackTransition=new kt(e,{type:1,animation:{type:2,steps:[],options:null},matchers:[function(t,e){return!0}],options:null,queryCount:0,depCount:0},this.states)}return _createClass(t,[{key:"matchTransition",value:function(t,e,n,i){return this.transitionFactories.find((function(a){return a.match(t,e,n,i)}))||null}},{key:"matchStyles",value:function(t,e,n){return this.fallbackTransition.buildStyles(t,e,n)}},{key:"containsQueries",get:function(){return this.ast.queryCount>0}}]),t}();function Dt(t,e,n){t.hasOwnProperty(e)?t.hasOwnProperty(n)||(t[n]=t[e]):t.hasOwnProperty(n)&&(t[e]=t[n])}var wt=new rt,Mt=function(){function t(e,n,i){_classCallCheck(this,t),this.bodyNode=e,this._driver=n,this._normalizer=i,this._animations={},this._playersById={},this.players=[]}return _createClass(t,[{key:"register",value:function(t,e){var n=[],i=J(this._driver,e,n);if(n.length)throw new Error("Unable to build the animation due to the following errors: "+n.join("\n"));this._animations[t]=i}},{key:"_buildPlayer",value:function(t,e,n){var i=t.element,a=c(0,this._normalizer,0,t.keyframes,e,n);return this._driver.animate(i,a,t.duration,t.delay,t.easing,[],!0)}},{key:"create",value:function(t,e){var n,i=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=[],c=this._animations[t],l=new Map;if(c?(n=ct(this._driver,e,c,"ng-enter","ng-leave",{},{},a,wt,o)).forEach((function(t){var e=f(l,t.element,{});t.postStyleProps.forEach((function(t){return e[t]=null}))})):(o.push("The requested animation doesn't exist or has already been destroyed"),n=[]),o.length)throw new Error("Unable to create the animation due to the following errors: "+o.join("\n"));l.forEach((function(t,e){Object.keys(t).forEach((function(n){t[n]=i._driver.computeStyle(e,n,r.a)}))}));var u=s(n.map((function(t){var e=l.get(t.element);return i._buildPlayer(t,{},e)})));return this._playersById[t]=u,u.onDestroy((function(){return i.destroy(t)})),this.players.push(u),u}},{key:"destroy",value:function(t){var e=this._getPlayer(t);e.destroy(),delete this._playersById[t];var n=this.players.indexOf(e);n>=0&&this.players.splice(n,1)}},{key:"_getPlayer",value:function(t){var e=this._playersById[t];if(!e)throw new Error("Unable to find the timeline player referenced by "+t);return e}},{key:"listen",value:function(t,e,n,i){var a=d(e,"","","");return l(this._getPlayer(t),n,a,i),function(){}}},{key:"command",value:function(t,e,n,i){if("register"!=n)if("create"!=n){var a=this._getPlayer(t);switch(n){case"play":a.play();break;case"pause":a.pause();break;case"reset":a.reset();break;case"restart":a.restart();break;case"finish":a.finish();break;case"init":a.init();break;case"setPosition":a.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(t)}}else this.create(t,e,i[0]||{});else this.register(t,i[0])}}]),t}(),St=[],It={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Pt={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Rt=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";_classCallCheck(this,t),this.namespaceId=n;var i,a=e&&e.hasOwnProperty("value");if(this.value=null!=(i=a?e.value:e)?i:null,a){var r=R(e);delete r.value,this.options=r}else this.options={};this.options.params||(this.options.params={})}return _createClass(t,[{key:"absorbOptions",value:function(t){var e=t.params;if(e){var n=this.options.params;Object.keys(e).forEach((function(t){null==n[t]&&(n[t]=e[t])}))}}},{key:"params",get:function(){return this.options.params}}]),t}(),Vt=new Rt("void"),jt=function(){function t(e,n,i){_classCallCheck(this,t),this.id=e,this.hostElement=n,this._engine=i,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+e,Qt(n,this._hostClassName)}return _createClass(t,[{key:"listen",value:function(t,e,n,i){var a,r=this;if(!this._triggers.hasOwnProperty(e))throw new Error('Unable to listen on the animation trigger event "'.concat(n,'" because the animation trigger "').concat(e,"\" doesn't exist!"));if(null==n||0==n.length)throw new Error('Unable to listen on the animation trigger "'.concat(e,'" because the provided event is undefined!'));if("start"!=(a=n)&&"done"!=a)throw new Error('The provided animation trigger event "'.concat(n,'" for the animation trigger "').concat(e,'" is not supported!'));var o=f(this._elementListeners,t,[]),s={name:e,phase:n,callback:i};o.push(s);var c=f(this._engine.statesByElement,t,{});return c.hasOwnProperty(e)||(Qt(t,"ng-trigger"),Qt(t,"ng-trigger-"+e),c[e]=Vt),function(){r._engine.afterFlush((function(){var t=o.indexOf(s);t>=0&&o.splice(t,1),r._triggers[e]||delete c[e]}))}}},{key:"register",value:function(t,e){return!this._triggers[t]&&(this._triggers[t]=e,!0)}},{key:"_getTrigger",value:function(t){var e=this._triggers[t];if(!e)throw new Error('The provided animation trigger "'.concat(t,'" has not been registered!'));return e}},{key:"trigger",value:function(t,e,n){var i=this,a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=this._getTrigger(e),o=new Wt(this.id,e,t),s=this._engine.statesByElement.get(t);s||(Qt(t,"ng-trigger"),Qt(t,"ng-trigger-"+e),this._engine.statesByElement.set(t,s={}));var c=s[e],l=new Rt(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&c&&l.absorbOptions(c.options),s[e]=l,c||(c=Vt),"void"===l.value||c.value!==l.value){var u=f(this._engine.playersByElement,t,[]);u.forEach((function(t){t.namespaceId==i.id&&t.triggerName==e&&t.queued&&t.destroy()}));var d=r.matchTransition(c.value,l.value,t,l.params),h=!1;if(!d){if(!a)return;d=r.fallbackTransition,h=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:d,fromState:c,toState:l,player:o,isFallbackTransition:h}),h||(Qt(t,"ng-animate-queued"),o.onStart((function(){Nt(t,"ng-animate-queued")}))),o.onDone((function(){var e=i.players.indexOf(o);e>=0&&i.players.splice(e,1);var n=i._engine.playersByElement.get(t);if(n){var a=n.indexOf(o);a>=0&&n.splice(a,1)}})),this.players.push(o),u.push(o),o}if(!function(t,e){var n=Object.keys(t),i=Object.keys(e);if(n.length!=i.length)return!1;for(var a=0;a<n.length;a++){var r=n[a];if(!e.hasOwnProperty(r)||t[r]!==e[r])return!1}return!0}(c.params,l.params)){var p=[],b=r.matchStyles(c.value,c.params,p),g=r.matchStyles(l.value,l.params,p);p.length?this._engine.reportError(p):this._engine.afterFlush((function(){T(t,b),W(t,g)}))}}},{key:"deregister",value:function(t){var e=this;delete this._triggers[t],this._engine.statesByElement.forEach((function(e,n){delete e[t]})),this._elementListeners.forEach((function(n,i){e._elementListeners.set(i,n.filter((function(e){return e.name!=t})))}))}},{key:"clearElementCache",value:function(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);var e=this._engine.playersByElement.get(t);e&&(e.forEach((function(t){return t.destroy()})),this._engine.playersByElement.delete(t))}},{key:"_signalRemovalForInnerTriggers",value:function(t,e){var n=this,i=this._engine.driver.query(t,".ng-trigger",!0);i.forEach((function(t){if(!t.__ng_removed){var i=n._engine.fetchNamespacesByElement(t);i.size?i.forEach((function(n){return n.triggerLeaveAnimation(t,e,!1,!0)})):n.clearElementCache(t)}})),this._engine.afterFlushAnimationsDone((function(){return i.forEach((function(t){return n.clearElementCache(t)}))}))}},{key:"triggerLeaveAnimation",value:function(t,e,n,i){var a=this,r=this._engine.statesByElement.get(t);if(r){var o=[];if(Object.keys(r).forEach((function(e){if(a._triggers[e]){var n=a.trigger(t,e,"void",i);n&&o.push(n)}})),o.length)return this._engine.markElementAsRemoved(this.id,t,!0,e),n&&s(o).onDone((function(){return a._engine.processLeaveNode(t)})),!0}return!1}},{key:"prepareLeaveAnimationListeners",value:function(t){var e=this,n=this._elementListeners.get(t);if(n){var i=new Set;n.forEach((function(n){var a=n.name;if(!i.has(a)){i.add(a);var r=e._triggers[a].fallbackTransition,o=e._engine.statesByElement.get(t)[a]||Vt,s=new Rt("void"),c=new Wt(e.id,a,t);e._engine.totalQueuedPlayers++,e._queue.push({element:t,triggerName:a,transition:r,fromState:o,toState:s,player:c,isFallbackTransition:!0})}}))}}},{key:"removeNode",value:function(t,e){var n=this,i=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),!this.triggerLeaveAnimation(t,e,!0)){var a=!1;if(i.totalAnimations){var r=i.players.length?i.playersByQueriedElement.get(t):[];if(r&&r.length)a=!0;else for(var o=t;o=o.parentNode;)if(i.statesByElement.get(o)){a=!0;break}}if(this.prepareLeaveAnimationListeners(t),a)i.markElementAsRemoved(this.id,t,!1,e);else{var s=t.__ng_removed;s&&s!==It||(i.afterFlush((function(){return n.clearElementCache(t)})),i.destroyInnerAnimations(t),i._onRemovalComplete(t,e))}}}},{key:"insertNode",value:function(t,e){Qt(t,this._hostClassName)}},{key:"drainQueuedTransitions",value:function(t){var e=this,n=[];return this._queue.forEach((function(i){var a=i.player;if(!a.destroyed){var r=i.element,o=e._elementListeners.get(r);o&&o.forEach((function(e){if(e.name==i.triggerName){var n=d(r,i.triggerName,i.fromState.value,i.toState.value);n._data=t,l(i.player,e.phase,n,e.callback)}})),a.markedForDestroy?e._engine.afterFlush((function(){a.destroy()})):n.push(i)}})),this._queue=[],n.sort((function(t,n){var i=t.transition.ast.depCount,a=n.transition.ast.depCount;return 0==i||0==a?i-a:e._engine.driver.containsElement(t.element,n.element)?1:-1}))}},{key:"destroy",value:function(t){this.players.forEach((function(t){return t.destroy()})),this._signalRemovalForInnerTriggers(this.hostElement,t)}},{key:"elementContainsData",value:function(t){var e=!1;return this._elementListeners.has(t)&&(e=!0),e=!!this._queue.find((function(e){return e.element===t}))||e}}]),t}(),At=function(){function t(e,n,i){_classCallCheck(this,t),this.bodyNode=e,this.driver=n,this._normalizer=i,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=function(t,e){}}return _createClass(t,[{key:"_onRemovalComplete",value:function(t,e){this.onRemovalComplete(t,e)}},{key:"createNamespace",value:function(t,e){var n=new jt(t,e,this);return e.parentNode?this._balanceNamespaceList(n,e):(this.newHostElements.set(e,n),this.collectEnterElement(e)),this._namespaceLookup[t]=n}},{key:"_balanceNamespaceList",value:function(t,e){var n=this._namespaceList.length-1;if(n>=0){for(var i=!1,a=n;a>=0;a--)if(this.driver.containsElement(this._namespaceList[a].hostElement,e)){this._namespaceList.splice(a+1,0,t),i=!0;break}i||this._namespaceList.splice(0,0,t)}else this._namespaceList.push(t);return this.namespacesByHostElement.set(e,t),t}},{key:"register",value:function(t,e){var n=this._namespaceLookup[t];return n||(n=this.createNamespace(t,e)),n}},{key:"registerTrigger",value:function(t,e,n){var i=this._namespaceLookup[t];i&&i.register(e,n)&&this.totalAnimations++}},{key:"destroy",value:function(t,e){var n=this;if(t){var i=this._fetchNamespace(t);this.afterFlush((function(){n.namespacesByHostElement.delete(i.hostElement),delete n._namespaceLookup[t];var e=n._namespaceList.indexOf(i);e>=0&&n._namespaceList.splice(e,1)})),this.afterFlushAnimationsDone((function(){return i.destroy(e)}))}}},{key:"_fetchNamespace",value:function(t){return this._namespaceLookup[t]}},{key:"fetchNamespacesByElement",value:function(t){var e=new Set,n=this.statesByElement.get(t);if(n)for(var i=Object.keys(n),a=0;a<i.length;a++){var r=n[i[a]].namespaceId;if(r){var o=this._fetchNamespace(r);o&&e.add(o)}}return e}},{key:"trigger",value:function(t,e,n,i){if(Tt(e)){var a=this._fetchNamespace(t);if(a)return a.trigger(e,n,i),!0}return!1}},{key:"insertNode",value:function(t,e,n,i){if(Tt(e)){var a=e.__ng_removed;if(a&&a.setForRemoval){a.setForRemoval=!1,a.setForMove=!0;var r=this.collectedLeaveElements.indexOf(e);r>=0&&this.collectedLeaveElements.splice(r,1)}if(t){var o=this._fetchNamespace(t);o&&o.insertNode(e,n)}i&&this.collectEnterElement(e)}}},{key:"collectEnterElement",value:function(t){this.collectedEnterElements.push(t)}},{key:"markElementAsDisabled",value:function(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),Qt(t,"ng-animate-disabled")):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Nt(t,"ng-animate-disabled"))}},{key:"removeNode",value:function(t,e,n,i){if(Tt(e)){var a=t?this._fetchNamespace(t):null;if(a?a.removeNode(e,i):this.markElementAsRemoved(t,e,!1,i),n){var r=this.namespacesByHostElement.get(e);r&&r.id!==t&&r.removeNode(e,i)}}else this._onRemovalComplete(e,i)}},{key:"markElementAsRemoved",value:function(t,e,n,i){this.collectedLeaveElements.push(e),e.__ng_removed={namespaceId:t,setForRemoval:i,hasAnimation:n,removedBeforeQueried:!1}}},{key:"listen",value:function(t,e,n,i,a){return Tt(e)?this._fetchNamespace(t).listen(e,n,i,a):function(){}}},{key:"_buildInstruction",value:function(t,e,n,i,a){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,n,i,t.fromState.options,t.toState.options,e,a)}},{key:"destroyInnerAnimations",value:function(t){var e=this,n=this.driver.query(t,".ng-trigger",!0);n.forEach((function(t){return e.destroyActiveAnimationsForElement(t)})),0!=this.playersByQueriedElement.size&&(n=this.driver.query(t,".ng-animating",!0)).forEach((function(t){return e.finishActiveQueriedAnimationOnElement(t)}))}},{key:"destroyActiveAnimationsForElement",value:function(t){var e=this.playersByElement.get(t);e&&e.forEach((function(t){t.queued?t.markedForDestroy=!0:t.destroy()}))}},{key:"finishActiveQueriedAnimationOnElement",value:function(t){var e=this.playersByQueriedElement.get(t);e&&e.forEach((function(t){return t.finish()}))}},{key:"whenRenderingDone",value:function(){var t=this;return new Promise((function(e){if(t.players.length)return s(t.players).onDone((function(){return e()}));e()}))}},{key:"processLeaveNode",value:function(t){var e=this,n=t.__ng_removed;if(n&&n.setForRemoval){if(t.__ng_removed=It,n.namespaceId){this.destroyInnerAnimations(t);var i=this._fetchNamespace(n.namespaceId);i&&i.clearElementCache(t)}this._onRemovalComplete(t,n.setForRemoval)}this.driver.matchesElement(t,".ng-animate-disabled")&&this.markElementAsDisabled(t,!1),this.driver.query(t,".ng-animate-disabled",!0).forEach((function(t){e.markElementAsDisabled(t,!1)}))}},{key:"flush",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,n=[];if(this.newHostElements.size&&(this.newHostElements.forEach((function(e,n){return t._balanceNamespaceList(e,n)})),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(var i=0;i<this.collectedEnterElements.length;i++)Qt(this.collectedEnterElements[i],"ng-star-inserted");if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){var a=[];try{n=this._flushAnimations(a,e)}finally{for(var r=0;r<a.length;r++)a[r]()}}else for(var o=0;o<this.collectedLeaveElements.length;o++)this.processLeaveNode(this.collectedLeaveElements[o]);if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach((function(t){return t()})),this._flushFns=[],this._whenQuietFns.length){var c=this._whenQuietFns;this._whenQuietFns=[],n.length?s(n).onDone((function(){c.forEach((function(t){return t()}))})):c.forEach((function(t){return t()}))}}},{key:"reportError",value:function(t){throw new Error("Unable to process animations due to the following failed trigger transitions\n "+t.join("\n"))}},{key:"_flushAnimations",value:function(t,e){var n=this,i=new rt,a=[],o=new Map,c=[],l=new Map,u=new Map,d=new Map,h=new Set;this.disabledNodes.forEach((function(t){h.add(t);for(var e=n.driver.query(t,".ng-animate-queued",!0),i=0;i<e.length;i++)h.add(e[i])}));var p=this.bodyNode,b=Array.from(this.statesByElement.keys()),g=Lt(b,this.collectedEnterElements),m=new Map,v=0;g.forEach((function(t,e){var n="ng-enter"+v++;m.set(e,n),t.forEach((function(t){return Qt(t,n)}))}));for(var y=[],_=new Set,C=new Set,k=0;k<this.collectedLeaveElements.length;k++){var x=this.collectedLeaveElements[k],O=x.__ng_removed;O&&O.setForRemoval&&(y.push(x),_.add(x),O.hasAnimation?this.driver.query(x,".ng-star-inserted",!0).forEach((function(t){return _.add(t)})):C.add(x))}var D=new Map,w=Lt(b,Array.from(_));w.forEach((function(t,e){var n="ng-leave"+v++;D.set(e,n),t.forEach((function(t){return Qt(t,n)}))})),t.push((function(){g.forEach((function(t,e){var n=m.get(e);t.forEach((function(t){return Nt(t,n)}))})),w.forEach((function(t,e){var n=D.get(e);t.forEach((function(t){return Nt(t,n)}))})),y.forEach((function(t){n.processLeaveNode(t)}))}));for(var M=[],S=[],I=this._namespaceList.length-1;I>=0;I--)this._namespaceList[I].drainQueuedTransitions(e).forEach((function(t){var e=t.player,r=t.element;if(M.push(e),n.collectedEnterElements.length){var o=r.__ng_removed;if(o&&o.setForMove)return void e.destroy()}var s=!p||!n.driver.containsElement(p,r),h=D.get(r),b=m.get(r),g=n._buildInstruction(t,i,b,h,s);if(g.errors&&g.errors.length)S.push(g);else{if(s)return e.onStart((function(){return T(r,g.fromStyles)})),e.onDestroy((function(){return W(r,g.toStyles)})),void a.push(e);if(t.isFallbackTransition)return e.onStart((function(){return T(r,g.fromStyles)})),e.onDestroy((function(){return W(r,g.toStyles)})),void a.push(e);g.timelines.forEach((function(t){return t.stretchStartingKeyframe=!0})),i.append(r,g.timelines),c.push({instruction:g,player:e,element:r}),g.queriedElements.forEach((function(t){return f(l,t,[]).push(e)})),g.preStyleProps.forEach((function(t,e){var n=Object.keys(t);if(n.length){var i=u.get(e);i||u.set(e,i=new Set),n.forEach((function(t){return i.add(t)}))}})),g.postStyleProps.forEach((function(t,e){var n=Object.keys(t),i=d.get(e);i||d.set(e,i=new Set),n.forEach((function(t){return i.add(t)}))}))}}));if(S.length){var P=[];S.forEach((function(t){P.push("@".concat(t.triggerName," has failed due to:\n")),t.errors.forEach((function(t){return P.push("- ".concat(t,"\n"))}))})),M.forEach((function(t){return t.destroy()})),this.reportError(P)}var R=new Map,V=new Map;c.forEach((function(t){var e=t.element;i.has(e)&&(V.set(e,e),n._beforeAnimationBuild(t.player.namespaceId,t.instruction,R))})),a.forEach((function(t){var e=t.element;n._getPreviousPlayers(e,!1,t.namespaceId,t.triggerName,null).forEach((function(t){f(R,e,[]).push(t),t.destroy()}))}));var j=y.filter((function(t){return Bt(t,u,d)})),A=new Map;Ft(A,this.driver,C,d,r.a).forEach((function(t){Bt(t,u,d)&&j.push(t)}));var E=new Map;g.forEach((function(t,e){Ft(E,n.driver,new Set(t),u,r.p)})),j.forEach((function(t){var e=A.get(t),n=E.get(t);A.set(t,Object.assign(Object.assign({},e),n))}));var F=[],L=[],Q={};c.forEach((function(t){var e=t.element,r=t.player,c=t.instruction;if(i.has(e)){if(h.has(e))return r.onDestroy((function(){return W(e,c.toStyles)})),r.disabled=!0,r.overrideTotalTime(c.totalTime),void a.push(r);var l=Q;if(V.size>1){for(var u=e,d=[];u=u.parentNode;){var f=V.get(u);if(f){l=f;break}d.push(u)}d.forEach((function(t){return V.set(t,l)}))}var p=n._buildAnimation(r.namespaceId,c,R,o,E,A);if(r.setRealPlayer(p),l===Q)F.push(r);else{var b=n.playersByElement.get(l);b&&b.length&&(r.parentPlayer=s(b)),a.push(r)}}else T(e,c.fromStyles),r.onDestroy((function(){return W(e,c.toStyles)})),L.push(r),h.has(e)&&a.push(r)})),L.forEach((function(t){var e=o.get(t.element);if(e&&e.length){var n=s(e);t.setRealPlayer(n)}})),a.forEach((function(t){t.parentPlayer?t.syncPlayerEvents(t.parentPlayer):t.destroy()}));for(var N=0;N<y.length;N++){var z=y[N],B=z.__ng_removed;if(Nt(z,"ng-leave"),!B||!B.hasAnimation){var U=[];if(l.size){var H=l.get(z);H&&H.length&&U.push.apply(U,_toConsumableArray(H));for(var G=this.driver.query(z,".ng-animating",!0),$=0;$<G.length;$++){var X=l.get(G[$]);X&&X.length&&U.push.apply(U,_toConsumableArray(X))}}var q=U.filter((function(t){return!t.destroyed}));q.length?zt(this,z,q):this.processLeaveNode(z)}}return y.length=0,F.forEach((function(t){n.players.push(t),t.onDone((function(){t.destroy();var e=n.players.indexOf(t);n.players.splice(e,1)})),t.play()})),F}},{key:"elementContainsData",value:function(t,e){var n=!1,i=e.__ng_removed;return i&&i.setForRemoval&&(n=!0),this.playersByElement.has(e)&&(n=!0),this.playersByQueriedElement.has(e)&&(n=!0),this.statesByElement.has(e)&&(n=!0),this._fetchNamespace(t).elementContainsData(e)||n}},{key:"afterFlush",value:function(t){this._flushFns.push(t)}},{key:"afterFlushAnimationsDone",value:function(t){this._whenQuietFns.push(t)}},{key:"_getPreviousPlayers",value:function(t,e,n,i,a){var r=[];if(e){var o=this.playersByQueriedElement.get(t);o&&(r=o)}else{var s=this.playersByElement.get(t);if(s){var c=!a||"void"==a;s.forEach((function(t){t.queued||(c||t.triggerName==i)&&r.push(t)}))}}return(n||i)&&(r=r.filter((function(t){return!(n&&n!=t.namespaceId||i&&i!=t.triggerName)}))),r}},{key:"_beforeAnimationBuild",value:function(t,e,n){var i,a=this,r=e.element,o=e.isRemovalTransition?void 0:t,s=e.isRemovalTransition?void 0:e.triggerName,c=_createForOfIteratorHelper(e.timelines);try{var l=function(){var t=i.value.element,c=t!==r,l=f(n,t,[]);a._getPreviousPlayers(t,c,o,s,e.toState).forEach((function(t){var e=t.getRealPlayer();e.beforeDestroy&&e.beforeDestroy(),t.destroy(),l.push(t)}))};for(c.s();!(i=c.n()).done;)l()}catch(u){c.e(u)}finally{c.f()}T(r,e.fromStyles)}},{key:"_buildAnimation",value:function(t,e,n,i,a,o){var l=this,u=e.triggerName,d=e.element,h=[],p=new Set,b=new Set,g=e.timelines.map((function(e){var s=e.element;p.add(s);var f=s.__ng_removed;if(f&&f.removedBeforeQueried)return new r.d(e.duration,e.delay);var g,m,v=s!==d,y=(g=(n.get(s)||St).map((function(t){return t.getRealPlayer()})),m=[],function t(e,n){for(var i=0;i<e.length;i++){var a=e[i];a instanceof r.o?t(a.players,n):n.push(a)}}(g,m),m).filter((function(t){return!!t.element&&t.element===s})),_=a.get(s),C=o.get(s),k=c(0,l._normalizer,0,e.keyframes,_,C),x=l._buildPlayer(e,k,y);if(e.subTimeline&&i&&b.add(s),v){var O=new Wt(t,u,s);O.setRealPlayer(x),h.push(O)}return x}));h.forEach((function(t){f(l.playersByQueriedElement,t.element,[]).push(t),t.onDone((function(){return function(t,e,n){var i;if(t instanceof Map){if(i=t.get(e)){if(i.length){var a=i.indexOf(n);i.splice(a,1)}0==i.length&&t.delete(e)}}else if(i=t[e]){if(i.length){var r=i.indexOf(n);i.splice(r,1)}0==i.length&&delete t[e]}return i}(l.playersByQueriedElement,t.element,t)}))})),p.forEach((function(t){return Qt(t,"ng-animating")}));var m=s(g);return m.onDestroy((function(){p.forEach((function(t){return Nt(t,"ng-animating")})),W(d,e.toStyles)})),b.forEach((function(t){f(i,t,[]).push(m)})),m}},{key:"_buildPlayer",value:function(t,e,n){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,n):new r.d(t.duration,t.delay)}},{key:"queuedPlayers",get:function(){var t=[];return this._namespaceList.forEach((function(e){e.players.forEach((function(e){e.queued&&t.push(e)}))})),t}}]),t}(),Wt=function(){function t(e,n,i){_classCallCheck(this,t),this.namespaceId=e,this.triggerName=n,this.element=i,this._player=new r.d,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}return _createClass(t,[{key:"setRealPlayer",value:function(t){var e=this;this._containsRealPlayer||(this._player=t,Object.keys(this._queuedCallbacks).forEach((function(n){e._queuedCallbacks[n].forEach((function(e){return l(t,n,void 0,e)}))})),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}},{key:"getRealPlayer",value:function(){return this._player}},{key:"overrideTotalTime",value:function(t){this.totalTime=t}},{key:"syncPlayerEvents",value:function(t){var e=this,n=this._player;n.triggerCallback&&t.onStart((function(){return n.triggerCallback("start")})),t.onDone((function(){return e.finish()})),t.onDestroy((function(){return e.destroy()}))}},{key:"_queueEvent",value:function(t,e){f(this._queuedCallbacks,t,[]).push(e)}},{key:"onDone",value:function(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}},{key:"onStart",value:function(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}},{key:"onDestroy",value:function(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}},{key:"init",value:function(){this._player.init()}},{key:"hasStarted",value:function(){return!this.queued&&this._player.hasStarted()}},{key:"play",value:function(){!this.queued&&this._player.play()}},{key:"pause",value:function(){!this.queued&&this._player.pause()}},{key:"restart",value:function(){!this.queued&&this._player.restart()}},{key:"finish",value:function(){this._player.finish()}},{key:"destroy",value:function(){this.destroyed=!0,this._player.destroy()}},{key:"reset",value:function(){!this.queued&&this._player.reset()}},{key:"setPosition",value:function(t){this.queued||this._player.setPosition(t)}},{key:"getPosition",value:function(){return this.queued?0:this._player.getPosition()}},{key:"triggerCallback",value:function(t){var e=this._player;e.triggerCallback&&e.triggerCallback(t)}}]),t}();function Tt(t){return t&&1===t.nodeType}function Et(t,e){var n=t.style.display;return t.style.display=null!=e?e:"none",n}function Ft(t,e,n,i,a){var r=[];n.forEach((function(t){return r.push(Et(t))}));var o=[];i.forEach((function(n,i){var r={};n.forEach((function(t){var n=r[t]=e.computeStyle(i,t,a);n&&0!=n.length||(i.__ng_removed=Pt,o.push(i))})),t.set(i,r)}));var s=0;return n.forEach((function(t){return Et(t,r[s++])})),o}function Lt(t,e){var n=new Map;if(t.forEach((function(t){return n.set(t,[])})),0==e.length)return n;var i=new Set(e),a=new Map;return e.forEach((function(t){var e=function t(e){if(!e)return 1;var r=a.get(e);if(r)return r;var o=e.parentNode;return r=n.has(o)?o:i.has(o)?1:t(o),a.set(e,r),r}(t);1!==e&&n.get(e).push(t)})),n}function Qt(t,e){if(t.classList)t.classList.add(e);else{var n=t.$$classes;n||(n=t.$$classes={}),n[e]=!0}}function Nt(t,e){if(t.classList)t.classList.remove(e);else{var n=t.$$classes;n&&delete n[e]}}function zt(t,e,n){s(n).onDone((function(){return t.processLeaveNode(e)}))}function Bt(t,e,n){var i=n.get(t);if(!i)return!1;var a=e.get(t);return a?i.forEach((function(t){return a.add(t)})):e.set(t,i),n.delete(t),!0}var Ut=function(){function t(e,n,i){var a=this;_classCallCheck(this,t),this.bodyNode=e,this._driver=n,this._triggerCache={},this.onRemovalComplete=function(t,e){},this._transitionEngine=new At(e,n,i),this._timelineEngine=new Mt(e,n,i),this._transitionEngine.onRemovalComplete=function(t,e){return a.onRemovalComplete(t,e)}}return _createClass(t,[{key:"registerTrigger",value:function(t,e,n,i,a){var r=t+"-"+i,o=this._triggerCache[r];if(!o){var s=[],c=J(this._driver,a,s);if(s.length)throw new Error('The animation trigger "'.concat(i,'" has failed to build due to the following errors:\n - ').concat(s.join("\n - ")));o=function(t,e){return new Ot(t,e)}(i,c),this._triggerCache[r]=o}this._transitionEngine.registerTrigger(e,i,o)}},{key:"register",value:function(t,e){this._transitionEngine.register(t,e)}},{key:"destroy",value:function(t,e){this._transitionEngine.destroy(t,e)}},{key:"onInsert",value:function(t,e,n,i){this._transitionEngine.insertNode(t,e,n,i)}},{key:"onRemove",value:function(t,e,n,i){this._transitionEngine.removeNode(t,e,i||!1,n)}},{key:"disableAnimations",value:function(t,e){this._transitionEngine.markElementAsDisabled(t,e)}},{key:"process",value:function(t,e,n,i){if("@"==n.charAt(0)){var a=_slicedToArray(h(n),2),r=a[0],o=a[1];this._timelineEngine.command(r,e,o,i)}else this._transitionEngine.trigger(t,e,n,i)}},{key:"listen",value:function(t,e,n,i,a){if("@"==n.charAt(0)){var r=_slicedToArray(h(n),2),o=r[0],s=r[1];return this._timelineEngine.listen(o,e,s,a)}return this._transitionEngine.listen(t,e,n,i,a)}},{key:"flush",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;this._transitionEngine.flush(t)}},{key:"whenRenderingDone",value:function(){return this._transitionEngine.whenRenderingDone()}},{key:"players",get:function(){return this._transitionEngine.players.concat(this._timelineEngine.players)}}]),t}();function Ht(t,e){var n=null,i=null;return Array.isArray(e)&&e.length?(n=$t(e[0]),e.length>1&&(i=$t(e[e.length-1]))):e&&(n=$t(e)),n||i?new Gt(t,n,i):null}var Gt=function(){var t=function(){function t(e,n,i){_classCallCheck(this,t),this._element=e,this._startStyles=n,this._endStyles=i,this._state=0;var a=t.initialStylesByElement.get(e);a||t.initialStylesByElement.set(e,a={}),this._initialStyles=a}return _createClass(t,[{key:"start",value:function(){this._state<1&&(this._startStyles&&W(this._element,this._startStyles,this._initialStyles),this._state=1)}},{key:"finish",value:function(){this.start(),this._state<2&&(W(this._element,this._initialStyles),this._endStyles&&(W(this._element,this._endStyles),this._endStyles=null),this._state=1)}},{key:"destroy",value:function(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(T(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(T(this._element,this._endStyles),this._endStyles=null),W(this._element,this._initialStyles),this._state=3)}}]),t}();return t.initialStylesByElement=new WeakMap,t}();function $t(t){for(var e=null,n=Object.keys(t),i=0;i<n.length;i++){var a=n[i];Xt(a)&&((e=e||{})[a]=t[a])}return e}function Xt(t){return"display"===t||"position"===t}var qt=function(){function t(e,n,i,a,r,o,s){var c=this;_classCallCheck(this,t),this._element=e,this._name=n,this._duration=i,this._delay=a,this._easing=r,this._fillMode=o,this._onDoneFn=s,this._finished=!1,this._destroyed=!1,this._startTime=0,this._position=0,this._eventFn=function(t){return c._handleCallback(t)}}return _createClass(t,[{key:"apply",value:function(){var t,e,n;t=this._element,e="".concat(this._duration,"ms ").concat(this._easing," ").concat(this._delay,"ms 1 normal ").concat(this._fillMode," ").concat(this._name),(n=ee(t,"").trim()).length&&(function(t,e){for(var n=0;n<t.length;n++)t.charAt(n)}(n),e="".concat(n,", ").concat(e)),te(t,"",e),Zt(this._element,this._eventFn,!1),this._startTime=Date.now()}},{key:"pause",value:function(){Kt(this._element,this._name,"paused")}},{key:"resume",value:function(){Kt(this._element,this._name,"running")}},{key:"setPosition",value:function(t){var e=Yt(this._element,this._name);this._position=t*this._duration,te(this._element,"Delay","-".concat(this._position,"ms"),e)}},{key:"getPosition",value:function(){return this._position}},{key:"_handleCallback",value:function(t){var e=t._ngTestManualTimestamp||Date.now(),n=1e3*parseFloat(t.elapsedTime.toFixed(3));t.animationName==this._name&&Math.max(e-this._startTime,0)>=this._delay&&n>=this._duration&&this.finish()}},{key:"finish",value:function(){this._finished||(this._finished=!0,this._onDoneFn(),Zt(this._element,this._eventFn,!0))}},{key:"destroy",value:function(){var t,e,n,i;this._destroyed||(this._destroyed=!0,this.finish(),t=this._element,e=this._name,n=ee(t,"").split(","),(i=Jt(n,e))>=0&&(n.splice(i,1),te(t,"",n.join(","))))}}]),t}();function Kt(t,e,n){te(t,"PlayState",n,Yt(t,e))}function Yt(t,e){var n=ee(t,"");return n.indexOf(",")>0?Jt(n.split(","),e):Jt([n],e)}function Jt(t,e){for(var n=0;n<t.length;n++)if(t[n].indexOf(e)>=0)return n;return-1}function Zt(t,e,n){n?t.removeEventListener("animationend",e):t.addEventListener("animationend",e)}function te(t,e,n,i){var a="animation"+e;if(null!=i){var r=t.style[a];if(r.length){var o=r.split(",");o[i]=n,n=o.join(",")}}t.style[a]=n}function ee(t,e){return t.style["animation"+e]}var ne=function(){function t(e,n,i,a,r,o,s,c){_classCallCheck(this,t),this.element=e,this.keyframes=n,this.animationName=i,this._duration=a,this._delay=r,this._finalStyles=s,this._specialStyles=c,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this._state=0,this.easing=o||"linear",this.totalTime=a+r,this._buildStyler()}return _createClass(t,[{key:"onStart",value:function(t){this._onStartFns.push(t)}},{key:"onDone",value:function(t){this._onDoneFns.push(t)}},{key:"onDestroy",value:function(t){this._onDestroyFns.push(t)}},{key:"destroy",value:function(){this.init(),this._state>=4||(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach((function(t){return t()})),this._onDestroyFns=[])}},{key:"_flushDoneFns",value:function(){this._onDoneFns.forEach((function(t){return t()})),this._onDoneFns=[]}},{key:"_flushStartFns",value:function(){this._onStartFns.forEach((function(t){return t()})),this._onStartFns=[]}},{key:"finish",value:function(){this.init(),this._state>=3||(this._state=3,this._styler.finish(),this._flushStartFns(),this._specialStyles&&this._specialStyles.finish(),this._flushDoneFns())}},{key:"setPosition",value:function(t){this._styler.setPosition(t)}},{key:"getPosition",value:function(){return this._styler.getPosition()}},{key:"hasStarted",value:function(){return this._state>=2}},{key:"init",value:function(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())}},{key:"play",value:function(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2,this._specialStyles&&this._specialStyles.start()),this._styler.resume()}},{key:"pause",value:function(){this.init(),this._styler.pause()}},{key:"restart",value:function(){this.reset(),this.play()}},{key:"reset",value:function(){this._styler.destroy(),this._buildStyler(),this._styler.apply()}},{key:"_buildStyler",value:function(){var t=this;this._styler=new qt(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",(function(){return t.finish()}))}},{key:"triggerCallback",value:function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach((function(t){return t()})),e.length=0}},{key:"beforeDestroy",value:function(){var t=this;this.init();var e={};if(this.hasStarted()){var n=this._state>=3;Object.keys(this._finalStyles).forEach((function(i){"offset"!=i&&(e[i]=n?t._finalStyles[i]:$(t.element,i))}))}this.currentSnapshot=e}}]),t}(),ie=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var a;return _classCallCheck(this,n),(a=e.call(this)).element=t,a._startingStyles={},a.__initialized=!1,a._styles=O(i),a}return _createClass(n,[{key:"init",value:function(){var t=this;!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach((function(e){t._startingStyles[e]=t.element.style[e]})),_get(_getPrototypeOf(n.prototype),"init",this).call(this))}},{key:"play",value:function(){var t=this;this._startingStyles&&(this.init(),Object.keys(this._styles).forEach((function(e){return t.element.style.setProperty(e,t._styles[e])})),_get(_getPrototypeOf(n.prototype),"play",this).call(this))}},{key:"destroy",value:function(){var t=this;this._startingStyles&&(Object.keys(this._startingStyles).forEach((function(e){var n=t._startingStyles[e];n?t.element.style.setProperty(e,n):t.element.style.removeProperty(e)})),this._startingStyles=null,_get(_getPrototypeOf(n.prototype),"destroy",this).call(this))}}]),n}(r.d),ae=function(){function t(){_classCallCheck(this,t),this._count=0,this._head=document.querySelector("head"),this._warningIssued=!1}return _createClass(t,[{key:"validateStyleProperty",value:function(t){return _(t)}},{key:"matchesElement",value:function(t,e){return C(t,e)}},{key:"containsElement",value:function(t,e){return k(t,e)}},{key:"query",value:function(t,e,n){return x(t,e,n)}},{key:"computeStyle",value:function(t,e,n){return window.getComputedStyle(t)[e]}},{key:"buildKeyframeElement",value:function(t,e,n){n=n.map((function(t){return O(t)}));var i="@keyframes ".concat(e," {\n"),a="";n.forEach((function(t){a=" ";var e=parseFloat(t.offset);i+="".concat(a).concat(100*e,"% {\n"),a+=" ",Object.keys(t).forEach((function(e){var n=t[e];switch(e){case"offset":return;case"easing":return void(n&&(i+="".concat(a,"animation-timing-function: ").concat(n,";\n")));default:return void(i+="".concat(a).concat(e,": ").concat(n,";\n"))}})),i+=a+"}\n"})),i+="}\n";var r=document.createElement("style");return r.textContent=i,r}},{key:"animate",value:function(t,e,n,i,a){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],o=arguments.length>6?arguments[6]:void 0;o&&this._notifyFaultyScrubber();var s=r.filter((function(t){return t instanceof ne})),c={};U(n,i)&&s.forEach((function(t){var e=t.currentSnapshot;Object.keys(e).forEach((function(t){return c[t]=e[t]}))}));var l=function(t){var e={};return t&&(Array.isArray(t)?t:[t]).forEach((function(t){Object.keys(t).forEach((function(n){"offset"!=n&&"easing"!=n&&(e[n]=t[n])}))})),e}(e=H(t,e,c));if(0==n)return new ie(t,l);var u="gen_css_kf_"+this._count++,d=this.buildKeyframeElement(t,u,e);document.querySelector("head").appendChild(d);var f=Ht(t,e),h=new ne(t,e,u,n,i,a,l,f);return h.onDestroy((function(){var t;(t=d).parentNode.removeChild(t)})),h}},{key:"_notifyFaultyScrubber",value:function(){this._warningIssued||(console.warn("@angular/animations: please load the web-animations.js polyfill to allow programmatic access...\n"," visit http://bit.ly/IWukam to learn more about using the web-animation-js polyfill."),this._warningIssued=!0)}}]),t}(),re=function(){function t(e,n,i,a){_classCallCheck(this,t),this.element=e,this.keyframes=n,this.options=i,this._specialStyles=a,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}return _createClass(t,[{key:"_onFinish",value:function(){this._finished||(this._finished=!0,this._onDoneFns.forEach((function(t){return t()})),this._onDoneFns=[])}},{key:"init",value:function(){this._buildPlayer(),this._preparePlayerBeforeStart()}},{key:"_buildPlayer",value:function(){var t=this;if(!this._initialized){this._initialized=!0;var e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:{},this.domPlayer.addEventListener("finish",(function(){return t._onFinish()}))}}},{key:"_preparePlayerBeforeStart",value:function(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}},{key:"_triggerWebAnimation",value:function(t,e,n){return t.animate(e,n)}},{key:"onStart",value:function(t){this._onStartFns.push(t)}},{key:"onDone",value:function(t){this._onDoneFns.push(t)}},{key:"onDestroy",value:function(t){this._onDestroyFns.push(t)}},{key:"play",value:function(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach((function(t){return t()})),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}},{key:"pause",value:function(){this.init(),this.domPlayer.pause()}},{key:"finish",value:function(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}},{key:"reset",value:function(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1}},{key:"_resetDomPlayerState",value:function(){this.domPlayer&&this.domPlayer.cancel()}},{key:"restart",value:function(){this.reset(),this.play()}},{key:"hasStarted",value:function(){return this._started}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach((function(t){return t()})),this._onDestroyFns=[])}},{key:"setPosition",value:function(t){this.domPlayer.currentTime=t*this.time}},{key:"getPosition",value:function(){return this.domPlayer.currentTime/this.time}},{key:"beforeDestroy",value:function(){var t=this,e={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach((function(n){"offset"!=n&&(e[n]=t._finished?t._finalKeyframe[n]:$(t.element,n))})),this.currentSnapshot=e}},{key:"triggerCallback",value:function(t){var e="start"==t?this._onStartFns:this._onDoneFns;e.forEach((function(t){return t()})),e.length=0}},{key:"totalTime",get:function(){return this._delay+this._duration}}]),t}(),oe=function(){function t(){_classCallCheck(this,t),this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(se().toString()),this._cssKeyframesDriver=new ae}return _createClass(t,[{key:"validateStyleProperty",value:function(t){return _(t)}},{key:"matchesElement",value:function(t,e){return C(t,e)}},{key:"containsElement",value:function(t,e){return k(t,e)}},{key:"query",value:function(t,e,n){return x(t,e,n)}},{key:"computeStyle",value:function(t,e,n){return window.getComputedStyle(t)[e]}},{key:"overrideWebAnimationsSupport",value:function(t){this._isNativeImpl=t}},{key:"animate",value:function(t,e,n,i,a){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],o=arguments.length>6?arguments[6]:void 0;if(!o&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(t,e,n,i,a,r);var s={duration:n,delay:i,fill:0==i?"both":"forwards"};a&&(s.easing=a);var c={},l=r.filter((function(t){return t instanceof re}));U(n,i)&&l.forEach((function(t){var e=t.currentSnapshot;Object.keys(e).forEach((function(t){return c[t]=e[t]}))}));var u=Ht(t,e=H(t,e=e.map((function(t){return V(t,!1)})),c));return new re(t,e,s,u)}}]),t}();function se(){return"undefined"!=typeof window&&void 0!==window.document&&Element.prototype.animate||{}}var ce,le=n("ofXK"),ue=((ce=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,a){var r;return _classCallCheck(this,n),(r=e.call(this))._nextAnimationId=0,r._renderer=t.createRenderer(a.body,{id:"0",encapsulation:i.U.None,styles:[],data:{animation:[]}}),r}return _createClass(n,[{key:"build",value:function(t){var e=this._nextAnimationId.toString();this._nextAnimationId++;var n=Array.isArray(t)?Object(r.j)(t):t;return he(this._renderer,null,e,"register",[n]),new de(e,this._renderer)}}]),n}(r.b)).\u0275fac=function(t){return new(t||ce)(i.ac(i.J),i.ac(le.e))},ce.\u0275prov=i.Mb({token:ce,factory:ce.\u0275fac}),ce),de=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var a;return _classCallCheck(this,n),(a=e.call(this))._id=t,a._renderer=i,a}return _createClass(n,[{key:"create",value:function(t,e){return new fe(this._id,t,e||{},this._renderer)}}]),n}(r.c),fe=function(){function t(e,n,i,a){_classCallCheck(this,t),this.id=e,this.element=n,this._renderer=a,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}return _createClass(t,[{key:"_listen",value:function(t,e){return this._renderer.listen(this.element,"@@".concat(this.id,":").concat(t),e)}},{key:"_command",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return he(this._renderer,this.element,this.id,t,n)}},{key:"onDone",value:function(t){this._listen("done",t)}},{key:"onStart",value:function(t){this._listen("start",t)}},{key:"onDestroy",value:function(t){this._listen("destroy",t)}},{key:"init",value:function(){this._command("init")}},{key:"hasStarted",value:function(){return this._started}},{key:"play",value:function(){this._command("play"),this._started=!0}},{key:"pause",value:function(){this._command("pause")}},{key:"restart",value:function(){this._command("restart")}},{key:"finish",value:function(){this._command("finish")}},{key:"destroy",value:function(){this._command("destroy")}},{key:"reset",value:function(){this._command("reset")}},{key:"setPosition",value:function(t){this._command("setPosition",t)}},{key:"getPosition",value:function(){return 0}}]),t}();function he(t,e,n,i,a){return t.setProperty(e,"@@".concat(n,":").concat(i),a)}var pe,be,ge,me=((pe=function(){function t(e,n,i){_classCallCheck(this,t),this.delegate=e,this.engine=n,this._zone=i,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),n.onRemovalComplete=function(t,e){e&&e.parentNode(t)&&e.removeChild(t.parentNode,t)}}return _createClass(t,[{key:"createRenderer",value:function(t,e){var n=this,i=this.delegate.createRenderer(t,e);if(!(t&&e&&e.data&&e.data.animation)){var a=this._rendererCache.get(i);return a||(a=new ve("",i,this.engine),this._rendererCache.set(i,a)),a}var r=e.id,o=e.id+"-"+this._currentId;return this._currentId++,this.engine.register(o,t),e.data.animation.forEach((function e(i){Array.isArray(i)?i.forEach(e):n.engine.registerTrigger(r,o,t,i.name,i)})),new ye(this,o,i,this.engine)}},{key:"begin",value:function(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}},{key:"_scheduleCountTask",value:function(){var t=this;this.promise.then((function(){t._microtaskId++}))}},{key:"scheduleListenerCallback",value:function(t,e,n){var i=this;t>=0&&t<this._microtaskId?this._zone.run((function(){return e(n)})):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then((function(){i._zone.run((function(){i._animationCallbacksBuffer.forEach((function(t){var e=_slicedToArray(t,2);(0,e[0])(e[1])})),i._animationCallbacksBuffer=[]}))})),this._animationCallbacksBuffer.push([e,n]))}},{key:"end",value:function(){var t=this;this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular((function(){t._scheduleCountTask(),t.engine.flush(t._microtaskId)})),this.delegate.end&&this.delegate.end()}},{key:"whenRenderingDone",value:function(){return this.engine.whenRenderingDone()}}]),t}()).\u0275fac=function(t){return new(t||pe)(i.ac(i.J),i.ac(Ut),i.ac(i.C))},pe.\u0275prov=i.Mb({token:pe,factory:pe.\u0275fac}),pe),ve=function(){function t(e,n,i){_classCallCheck(this,t),this.namespaceId=e,this.delegate=n,this.engine=i,this.destroyNode=this.delegate.destroyNode?function(t){return n.destroyNode(t)}:null}return _createClass(t,[{key:"destroy",value:function(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}},{key:"createElement",value:function(t,e){return this.delegate.createElement(t,e)}},{key:"createComment",value:function(t){return this.delegate.createComment(t)}},{key:"createText",value:function(t){return this.delegate.createText(t)}},{key:"appendChild",value:function(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)}},{key:"insertBefore",value:function(t,e,n){this.delegate.insertBefore(t,e,n),this.engine.onInsert(this.namespaceId,e,t,!0)}},{key:"removeChild",value:function(t,e,n){this.engine.onRemove(this.namespaceId,e,this.delegate,n)}},{key:"selectRootElement",value:function(t,e){return this.delegate.selectRootElement(t,e)}},{key:"parentNode",value:function(t){return this.delegate.parentNode(t)}},{key:"nextSibling",value:function(t){return this.delegate.nextSibling(t)}},{key:"setAttribute",value:function(t,e,n,i){this.delegate.setAttribute(t,e,n,i)}},{key:"removeAttribute",value:function(t,e,n){this.delegate.removeAttribute(t,e,n)}},{key:"addClass",value:function(t,e){this.delegate.addClass(t,e)}},{key:"removeClass",value:function(t,e){this.delegate.removeClass(t,e)}},{key:"setStyle",value:function(t,e,n,i){this.delegate.setStyle(t,e,n,i)}},{key:"removeStyle",value:function(t,e,n){this.delegate.removeStyle(t,e,n)}},{key:"setProperty",value:function(t,e,n){"@"==e.charAt(0)&&"@.disabled"==e?this.disableAnimations(t,!!n):this.delegate.setProperty(t,e,n)}},{key:"setValue",value:function(t,e){this.delegate.setValue(t,e)}},{key:"listen",value:function(t,e,n){return this.delegate.listen(t,e,n)}},{key:"disableAnimations",value:function(t,e){this.engine.disableAnimations(t,e)}},{key:"data",get:function(){return this.delegate.data}}]),t}(),ye=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a,r){var o;return _classCallCheck(this,n),(o=e.call(this,i,a,r)).factory=t,o.namespaceId=i,o}return _createClass(n,[{key:"setProperty",value:function(t,e,n){"@"==e.charAt(0)?"."==e.charAt(1)&&"@.disabled"==e?this.disableAnimations(t,n=void 0===n||!!n):this.engine.process(this.namespaceId,t,e.substr(1),n):this.delegate.setProperty(t,e,n)}},{key:"listen",value:function(t,e,n){var i,a,r=this;if("@"==e.charAt(0)){var o,s=function(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(t),c=e.substr(1),l="";return"@"!=c.charAt(0)&&(a=(i=c).indexOf("."),c=(o=_slicedToArray([i.substring(0,a),i.substr(a+1)],2))[0],l=o[1]),this.engine.listen(this.namespaceId,s,c,l,(function(t){r.factory.scheduleListenerCallback(t._data||-1,n,t)}))}return this.delegate.listen(t,e,n)}}]),n}(ve),_e=((be=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a){return _classCallCheck(this,n),e.call(this,t.body,i,a)}return n}(Ut)).\u0275fac=function(t){return new(t||be)(i.ac(le.e),i.ac(M),i.ac(mt))},be.\u0275prov=i.Mb({token:be,factory:be.\u0275fac}),be),Ce=new i.s("AnimationModuleType"),ke=[{provide:M,useFactory:function(){return"function"==typeof se()?new oe:new ae}},{provide:Ce,useValue:"BrowserAnimations"},{provide:r.b,useClass:ue},{provide:mt,useFactory:function(){return new vt}},{provide:Ut,useClass:_e},{provide:i.J,useFactory:function(t,e,n){return new me(t,e,n)},deps:[a.f,Ut,i.C]}],xe=((ge=function t(){_classCallCheck(this,t)}).\u0275mod=i.Ob({type:ge}),ge.\u0275inj=i.Nb({factory:function(t){return new(t||ge)},providers:ke,imports:[a.a]}),ge)},SIQe:function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var i=n("0IaG"),a=n("fXoL"),r=n("sYmb"),o=n("ofXK"),s=n("bTqV");function c(t,e){if(1&t&&(a.Wb(0,"h1",5),a.Qc(1),a.Vb()),2&t){var n=a.hc();a.Db(1),a.Rc(n.data.title)}}function l(t,e){if(1&t&&(a.Wb(0,"div",6),a.Rb(1,"div",7),a.Vb()),2&t){var n=a.hc();a.Db(1),a.Gb("alert-message ",n.data.mode,""),a.oc("innerHTML",n.data.msg,a.Ec)}}function u(t,e){if(1&t){var n=a.Xb();a.Wb(0,"div",8),a.Wb(1,"button",9),a.dc("click",(function(){return a.Dc(n),a.hc().dialogRef.close()})),a.Qc(2),a.ic(3,"translate"),a.Vb(),a.Vb()}2&t&&(a.Db(2),a.Rc(a.jc(3,1,"lang.ok")))}var d=function(){var t=function t(e,n,i){_classCallCheck(this,t),this.translate=e,this.data=n,this.dialogRef=i,null==this.data.mode&&(this.data.mode="info"),this.data.mode="alert-message-"+this.data.mode,null===this.data.msg&&(this.data.msg="")};return t.\u0275fac=function(e){return new(e||t)(a.Qb(r.e),a.Qb(i.a),a.Qb(i.h))},t.\u0275cmp=a.Kb({type:t,selectors:[["ng-component"]],decls:5,vars:3,consts:[[1,"mat-dialog-content-container"],["mat-dialog-title","",4,"ngIf"],["mat-dialog-content","",4,"ngIf"],[1,"divider-modal"],["mat-dialog-actions","",4,"ngIf"],["mat-dialog-title",""],["mat-dialog-content",""],[3,"innerHTML"],["mat-dialog-actions",""],["id","alertComponentClose","color","primary","mat-raised-button","",1,"actions",3,"click"]],template:function(t,e){1&t&&(a.Wb(0,"div",0),a.Oc(1,c,2,1,"h1",1),a.Oc(2,l,2,4,"div",2),a.Rb(3,"span",3),a.Oc(4,u,4,3,"div",4),a.Vb()),2&t&&(a.Db(1),a.oc("ngIf",""!==e.data.title),a.Db(1),a.oc("ngIf",""!==e.data.msg),a.Db(2),a.oc("ngIf",!e.data.hideButton))},directives:[o.t,i.i,i.f,i.c,s.b],pipes:[r.d],styles:[".alert-message-info[_ngcontent-%COMP%]{margin:0;font-size:16px}"]}),t}()},STbY:function(t,e,n){"use strict";n.d(e,"a",(function(){return R})),n.d(e,"b",(function(){return A})),n.d(e,"c",(function(){return G})),n.d(e,"d",(function(){return U})),n.d(e,"e",(function(){return Q}));var i=n("u47x"),a=n("8LU1"),r=n("FtGj"),o=n("fXoL"),s=n("XNiG"),c=n("quSY"),l=n("VRyK"),u=n("LRne"),d=n("7Hc7"),f=n("JX91"),h=n("eIep"),p=n("IzEk"),b=n("pLZG"),g=n("1G5W"),m=n("3E0/"),v=n("R0Ic"),y=n("+rOU"),_=n("ofXK"),C=n("FKr1"),k=n("rDax"),x=n("nLfN"),O=n("vxfF"),D=n("cH1L"),w=["mat-menu-item",""],M=["*"];function S(t,e){if(1&t){var n=o.Xb();o.Wb(0,"div",0),o.dc("keydown",(function(t){return o.Dc(n),o.hc()._handleKeydown(t)}))("click",(function(){return o.Dc(n),o.hc().closed.emit("click")}))("@transformMenu.start",(function(t){return o.Dc(n),o.hc()._onAnimationStart(t)}))("@transformMenu.done",(function(t){return o.Dc(n),o.hc()._onAnimationDone(t)})),o.Wb(1,"div",1),o.mc(2),o.Vb(),o.Vb()}if(2&t){var i=o.hc();o.oc("id",i.panelId)("ngClass",i._classList)("@transformMenu",i._panelAnimationState),o.Eb("aria-label",i.ariaLabel||null)("aria-labelledby",i.ariaLabelledby||null)("aria-describedby",i.ariaDescribedby||null)}}var I={transformMenu:Object(v.n)("transformMenu",[Object(v.k)("void",Object(v.l)({opacity:0,transform:"scale(0.8)"})),Object(v.m)("void => enter",Object(v.g)([Object(v.i)(".mat-menu-content, .mat-mdc-menu-content",Object(v.e)("100ms linear",Object(v.l)({opacity:1}))),Object(v.e)("120ms cubic-bezier(0, 0, 0.2, 1)",Object(v.l)({transform:"scale(1)"}))])),Object(v.m)("* => void",Object(v.e)("100ms 25ms linear",Object(v.l)({opacity:0})))]),fadeInItems:Object(v.n)("fadeInItems",[Object(v.k)("showing",Object(v.l)({opacity:1})),Object(v.m)("void => *",[Object(v.l)({opacity:0}),Object(v.e)("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},P=new o.s("MatMenuContent"),R=function(){var t=function(){function t(e,n,i,a,r,o,c){_classCallCheck(this,t),this._template=e,this._componentFactoryResolver=n,this._appRef=i,this._injector=a,this._viewContainerRef=r,this._document=o,this._changeDetectorRef=c,this._attached=new s.a}return _createClass(t,[{key:"attach",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._portal||(this._portal=new y.i(this._template,this._viewContainerRef)),this.detach(),this._outlet||(this._outlet=new y.f(this._document.createElement("div"),this._componentFactoryResolver,this._appRef,this._injector));var e=this._template.elementRef.nativeElement;e.parentNode.insertBefore(this._outlet.outletElement,e),this._changeDetectorRef&&this._changeDetectorRef.markForCheck(),this._portal.attach(this._outlet,t),this._attached.next()}},{key:"detach",value:function(){this._portal.isAttached&&this._portal.detach()}},{key:"ngOnDestroy",value:function(){this._outlet&&this._outlet.dispose()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(o.Qb(o.P),o.Qb(o.j),o.Qb(o.g),o.Qb(o.t),o.Qb(o.T),o.Qb(_.e),o.Qb(o.h))},t.\u0275dir=o.Lb({type:t,selectors:[["ng-template","matMenuContent",""]],features:[o.Cb([{provide:P,useExisting:t}])]}),t}(),V=new o.s("MAT_MENU_PANEL"),j=Object(C.B)(Object(C.C)((function t(){_classCallCheck(this,t)}))),A=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a,r){var o;return _classCallCheck(this,n),(o=e.call(this))._elementRef=t,o._focusMonitor=a,o._parentMenu=r,o.role="menuitem",o._hovered=new s.a,o._focused=new s.a,o._highlighted=!1,o._triggersSubmenu=!1,r&&r.addItem&&r.addItem(_assertThisInitialized(o)),o}return _createClass(n,[{key:"focus",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"program",e=arguments.length>1?arguments[1]:void 0;this._focusMonitor?this._focusMonitor.focusVia(this._getHostElement(),t,e):this._getHostElement().focus(e),this._focused.next(this)}},{key:"ngAfterViewInit",value:function(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}},{key:"ngOnDestroy",value:function(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}},{key:"_getTabIndex",value:function(){return this.disabled?"-1":"0"}},{key:"_getHostElement",value:function(){return this._elementRef.nativeElement}},{key:"_checkDisabled",value:function(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}},{key:"_handleMouseEnter",value:function(){this._hovered.next(this)}},{key:"getLabel",value:function(){for(var t,e,n=this._elementRef.nativeElement.cloneNode(!0),i=n.querySelectorAll("mat-icon, .material-icons"),a=0;a<i.length;a++){var r=i[a];null===(t=r.parentNode)||void 0===t||t.removeChild(r)}return(null===(e=n.textContent)||void 0===e?void 0:e.trim())||""}}]),n}(j);return t.\u0275fac=function(e){return new(e||t)(o.Qb(o.l),o.Qb(_.e),o.Qb(i.h),o.Qb(V,8))},t.\u0275cmp=o.Kb({type:t,selectors:[["","mat-menu-item",""]],hostAttrs:[1,"mat-focus-indicator"],hostVars:10,hostBindings:function(t,e){1&t&&o.dc("click",(function(t){return e._checkDisabled(t)}))("mouseenter",(function(){return e._handleMouseEnter()})),2&t&&(o.Eb("role",e.role)("tabindex",e._getTabIndex())("aria-disabled",e.disabled.toString())("disabled",e.disabled||null),o.Ib("mat-menu-item",!0)("mat-menu-item-highlighted",e._highlighted)("mat-menu-item-submenu-trigger",e._triggersSubmenu))},inputs:{disabled:"disabled",disableRipple:"disableRipple",role:"role"},exportAs:["matMenuItem"],features:[o.Ab],attrs:w,ngContentSelectors:M,decls:2,vars:2,consts:[["matRipple","",1,"mat-menu-ripple",3,"matRippleDisabled","matRippleTrigger"]],template:function(t,e){1&t&&(o.nc(),o.mc(0),o.Rb(1,"div",0)),2&t&&(o.Db(1),o.oc("matRippleDisabled",e.disableRipple||e.disabled)("matRippleTrigger",e._getHostElement()))},directives:[C.u],encapsulation:2,changeDetection:0}),t}(),W=new o.s("mat-menu-default-options",{providedIn:"root",factory:function(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}}),T=0,E=function(){var t=function(){function t(e,n,i){_classCallCheck(this,t),this._elementRef=e,this._ngZone=n,this._defaultOptions=i,this._xPosition=this._defaultOptions.xPosition,this._yPosition=this._defaultOptions.yPosition,this._directDescendantItems=new o.H,this._tabSubscription=c.a.EMPTY,this._classList={},this._panelAnimationState="void",this._animationDone=new s.a,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new o.o,this.close=this.closed,this.panelId="mat-menu-panel-"+T++}return _createClass(t,[{key:"ngOnInit",value:function(){this.setPositionClasses()}},{key:"ngAfterContentInit",value:function(){var t=this;this._updateDirectDescendants(),this._keyManager=new i.g(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._tabSubscription=this._keyManager.tabOut.subscribe((function(){return t.closed.emit("tab")})),this._directDescendantItems.changes.pipe(Object(f.a)(this._directDescendantItems),Object(h.a)((function(t){return Object(l.a).apply(void 0,_toConsumableArray(t.map((function(t){return t._focused}))))}))).subscribe((function(e){return t._keyManager.updateActiveItem(e)}))}},{key:"ngOnDestroy",value:function(){this._directDescendantItems.destroy(),this._tabSubscription.unsubscribe(),this.closed.complete()}},{key:"_hovered",value:function(){return this._directDescendantItems.changes.pipe(Object(f.a)(this._directDescendantItems),Object(h.a)((function(t){return Object(l.a).apply(void 0,_toConsumableArray(t.map((function(t){return t._hovered}))))})))}},{key:"addItem",value:function(t){}},{key:"removeItem",value:function(t){}},{key:"_handleKeydown",value:function(t){var e=t.keyCode,n=this._keyManager;switch(e){case r.h:Object(r.v)(t)||(t.preventDefault(),this.closed.emit("keydown"));break;case r.k:this.parentMenu&&"ltr"===this.direction&&this.closed.emit("keydown");break;case r.o:this.parentMenu&&"rtl"===this.direction&&this.closed.emit("keydown");break;default:e!==r.s&&e!==r.e||n.setFocusOrigin("keyboard"),n.onKeydown(t)}}},{key:"focusFirstItem",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"program";this.lazyContent?this._ngZone.onStable.pipe(Object(p.a)(1)).subscribe((function(){return t._focusFirstItem(e)})):this._focusFirstItem(e)}},{key:"_focusFirstItem",value:function(t){var e=this._keyManager;if(e.setFocusOrigin(t).setFirstItemActive(),!e.activeItem&&this._directDescendantItems.length)for(var n=this._directDescendantItems.first._getHostElement().parentElement;n;){if("menu"===n.getAttribute("role")){n.focus();break}n=n.parentElement}}},{key:"resetActiveItem",value:function(){this._keyManager.setActiveItem(-1)}},{key:"setElevation",value:function(t){var e="mat-elevation-z"+Math.min(4+t,24),n=Object.keys(this._classList).find((function(t){return t.startsWith("mat-elevation-z")}));n&&n!==this._previousElevation||(this._previousElevation&&(this._classList[this._previousElevation]=!1),this._classList[e]=!0,this._previousElevation=e)}},{key:"setPositionClasses",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.xPosition,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.yPosition,n=this._classList;n["mat-menu-before"]="before"===t,n["mat-menu-after"]="after"===t,n["mat-menu-above"]="above"===e,n["mat-menu-below"]="below"===e}},{key:"_startAnimation",value:function(){this._panelAnimationState="enter"}},{key:"_resetAnimation",value:function(){this._panelAnimationState="void"}},{key:"_onAnimationDone",value:function(t){this._animationDone.next(t),this._isAnimating=!1}},{key:"_onAnimationStart",value:function(t){this._isAnimating=!0,"enter"===t.toState&&0===this._keyManager.activeItemIndex&&(t.element.scrollTop=0)}},{key:"_updateDirectDescendants",value:function(){var t=this;this._allItems.changes.pipe(Object(f.a)(this._allItems)).subscribe((function(e){t._directDescendantItems.reset(e.filter((function(e){return e._parentMenu===t}))),t._directDescendantItems.notifyOnChanges()}))}},{key:"xPosition",get:function(){return this._xPosition},set:function(t){this._xPosition=t,this.setPositionClasses()}},{key:"yPosition",get:function(){return this._yPosition},set:function(t){this._yPosition=t,this.setPositionClasses()}},{key:"overlapTrigger",get:function(){return this._overlapTrigger},set:function(t){this._overlapTrigger=Object(a.c)(t)}},{key:"hasBackdrop",get:function(){return this._hasBackdrop},set:function(t){this._hasBackdrop=Object(a.c)(t)}},{key:"panelClass",set:function(t){var e=this,n=this._previousPanelClass;n&&n.length&&n.split(" ").forEach((function(t){e._classList[t]=!1})),this._previousPanelClass=t,t&&t.length&&(t.split(" ").forEach((function(t){e._classList[t]=!0})),this._elementRef.nativeElement.className="")}},{key:"classList",get:function(){return this.panelClass},set:function(t){this.panelClass=t}}]),t}();return t.\u0275fac=function(e){return new(e||t)(o.Qb(o.l),o.Qb(o.C),o.Qb(W))},t.\u0275dir=o.Lb({type:t,contentQueries:function(t,e,n){var i;1&t&&(o.Jb(n,P,!0),o.Jb(n,A,!0),o.Jb(n,A,!1)),2&t&&(o.yc(i=o.ec())&&(e.lazyContent=i.first),o.yc(i=o.ec())&&(e._allItems=i),o.yc(i=o.ec())&&(e.items=i))},viewQuery:function(t,e){var n;1&t&&o.Xc(o.P,!0),2&t&&o.yc(n=o.ec())&&(e.templateRef=n.first)},inputs:{backdropClass:"backdropClass",xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:"overlapTrigger",hasBackdrop:"hasBackdrop",panelClass:["class","panelClass"],classList:"classList",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"]},outputs:{closed:"closed",close:"close"}}),t}(),F=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return n}(E);return t.\u0275fac=function(e){return L(e||t)},t.\u0275dir=o.Lb({type:t,features:[o.Ab]}),t}(),L=o.Yb(F),Q=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a){return _classCallCheck(this,n),e.call(this,t,i,a)}return n}(F);return t.\u0275fac=function(e){return new(e||t)(o.Qb(o.l),o.Qb(o.C),o.Qb(W))},t.\u0275cmp=o.Kb({type:t,selectors:[["mat-menu"]],exportAs:["matMenu"],features:[o.Cb([{provide:V,useExisting:F},{provide:F,useExisting:t}]),o.Ab],ngContentSelectors:M,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-menu-panel",3,"id","ngClass","keydown","click"],[1,"mat-menu-content"]],template:function(t,e){1&t&&(o.nc(),o.Oc(0,S,3,6,"ng-template"))},directives:[_.q],styles:['.mat-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(100vh - 48px);border-radius:4px;outline:0;min-height:64px}.mat-menu-panel.ng-animating{pointer-events:none}.cdk-high-contrast-active .mat-menu-panel{outline:solid 1px}.mat-menu-content:not(:empty){padding-top:8px;padding-bottom:8px}.mat-menu-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;max-width:100%;position:relative}.mat-menu-item::-moz-focus-inner{border:0}.mat-menu-item[disabled]{cursor:default}[dir=rtl] .mat-menu-item{text-align:right}.mat-menu-item .mat-icon{margin-right:16px;vertical-align:middle}.mat-menu-item .mat-icon svg{vertical-align:top}[dir=rtl] .mat-menu-item .mat-icon{margin-left:16px;margin-right:0}.mat-menu-item[disabled]{pointer-events:none}.cdk-high-contrast-active .mat-menu-item.cdk-program-focused,.cdk-high-contrast-active .mat-menu-item.cdk-keyboard-focused,.cdk-high-contrast-active .mat-menu-item-highlighted{outline:dotted 1px}.mat-menu-item-submenu-trigger{padding-right:32px}.mat-menu-item-submenu-trigger::after{width:0;height:0;border-style:solid;border-width:5px 0 5px 5px;border-color:transparent transparent transparent currentColor;content:"";display:inline-block;position:absolute;top:50%;right:16px;transform:translateY(-50%)}[dir=rtl] .mat-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}[dir=rtl] .mat-menu-item-submenu-trigger::after{right:auto;left:16px;transform:rotateY(180deg) translateY(-50%)}button.mat-menu-item{width:100%}.mat-menu-item .mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}\n'],encapsulation:2,data:{animation:[I.transformMenu,I.fadeInItems]},changeDetection:0}),t}(),N=new o.s("mat-menu-scroll-strategy"),z={provide:N,deps:[k.c],useFactory:function(t){return function(){return t.scrollStrategies.reposition()}}},B=Object(x.f)({passive:!0}),U=function(){var t=function(){function t(e,n,i,a,r,s,l,u){var d=this;_classCallCheck(this,t),this._overlay=e,this._element=n,this._viewContainerRef=i,this._parentMenu=r,this._menuItemInstance=s,this._dir=l,this._focusMonitor=u,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=c.a.EMPTY,this._hoverSubscription=c.a.EMPTY,this._menuCloseSubscription=c.a.EMPTY,this._handleTouchStart=function(){return d._openedBy="touch"},this._openedBy=null,this.restoreFocus=!0,this.menuOpened=new o.o,this.onMenuOpen=this.menuOpened,this.menuClosed=new o.o,this.onMenuClose=this.menuClosed,n.nativeElement.addEventListener("touchstart",this._handleTouchStart,B),s&&(s._triggersSubmenu=this.triggersSubmenu()),this._scrollStrategy=a}return _createClass(t,[{key:"ngAfterContentInit",value:function(){this._checkMenu(),this._handleHover()}},{key:"ngOnDestroy",value:function(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,B),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()}},{key:"triggersSubmenu",value:function(){return!(!this._menuItemInstance||!this._parentMenu)}},{key:"toggleMenu",value:function(){return this._menuOpen?this.closeMenu():this.openMenu()}},{key:"openMenu",value:function(){var t=this;if(!this._menuOpen){this._checkMenu();var e=this._createOverlay(),n=e.getConfig();this._setPosition(n.positionStrategy),n.hasBackdrop=null==this.menu.hasBackdrop?!this.triggersSubmenu():this.menu.hasBackdrop,e.attach(this._getPortal()),this.menu.lazyContent&&this.menu.lazyContent.attach(this.menuData),this._closingActionsSubscription=this._menuClosingActions().subscribe((function(){return t.closeMenu()})),this._initMenu(),this.menu instanceof F&&this.menu._startAnimation()}}},{key:"closeMenu",value:function(){this.menu.close.emit()}},{key:"focus",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"program",e=arguments.length>1?arguments[1]:void 0;this._focusMonitor?this._focusMonitor.focusVia(this._element,t,e):this._element.nativeElement.focus(e)}},{key:"_destroyMenu",value:function(){var t=this;if(this._overlayRef&&this.menuOpen){var e=this.menu;this._closingActionsSubscription.unsubscribe(),this._overlayRef.detach(),this._restoreFocus(),e instanceof F?(e._resetAnimation(),e.lazyContent?e._animationDone.pipe(Object(b.a)((function(t){return"void"===t.toState})),Object(p.a)(1),Object(g.a)(e.lazyContent._attached)).subscribe({next:function(){return e.lazyContent.detach()},complete:function(){return t._setIsMenuOpen(!1)}}):this._setIsMenuOpen(!1)):(this._setIsMenuOpen(!1),e.lazyContent&&e.lazyContent.detach())}}},{key:"_initMenu",value:function(){this.menu.parentMenu=this.triggersSubmenu()?this._parentMenu:void 0,this.menu.direction=this.dir,this._setMenuElevation(),this._setIsMenuOpen(!0),this.menu.focusFirstItem(this._openedBy||"program")}},{key:"_setMenuElevation",value:function(){if(this.menu.setElevation){for(var t=0,e=this.menu.parentMenu;e;)t++,e=e.parentMenu;this.menu.setElevation(t)}}},{key:"_restoreFocus",value:function(){this.restoreFocus&&(this._openedBy?this.triggersSubmenu()||this.focus(this._openedBy):this.focus()),this._openedBy=null}},{key:"_setIsMenuOpen",value:function(t){this._menuOpen=t,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&(this._menuItemInstance._highlighted=t)}},{key:"_checkMenu",value:function(){}},{key:"_createOverlay",value:function(){if(!this._overlayRef){var t=this._getOverlayConfig();this._subscribeToPositions(t.positionStrategy),this._overlayRef=this._overlay.create(t),this._overlayRef.keydownEvents().subscribe()}return this._overlayRef}},{key:"_getOverlayConfig",value:function(){return new k.d({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:this.menu.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:this.menu.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir})}},{key:"_subscribeToPositions",value:function(t){var e=this;this.menu.setPositionClasses&&t.positionChanges.subscribe((function(t){e.menu.setPositionClasses("start"===t.connectionPair.overlayX?"after":"before","top"===t.connectionPair.overlayY?"below":"above")}))}},{key:"_setPosition",value:function(t){var e=_slicedToArray("before"===this.menu.xPosition?["end","start"]:["start","end"],2),n=e[0],i=e[1],a=_slicedToArray("above"===this.menu.yPosition?["bottom","top"]:["top","bottom"],2),r=a[0],o=a[1],s=r,c=o,l=n,u=i,d=0;this.triggersSubmenu()?(u=n="before"===this.menu.xPosition?"start":"end",i=l="end"===n?"start":"end",d="bottom"===r?8:-8):this.menu.overlapTrigger||(s="top"===r?"bottom":"top",c="top"===o?"bottom":"top"),t.withPositions([{originX:n,originY:s,overlayX:l,overlayY:r,offsetY:d},{originX:i,originY:s,overlayX:u,overlayY:r,offsetY:d},{originX:n,originY:c,overlayX:l,overlayY:o,offsetY:-d},{originX:i,originY:c,overlayX:u,overlayY:o,offsetY:-d}])}},{key:"_menuClosingActions",value:function(){var t=this,e=this._overlayRef.backdropClick(),n=this._overlayRef.detachments(),i=this._parentMenu?this._parentMenu.closed:Object(u.a)(),a=this._parentMenu?this._parentMenu._hovered().pipe(Object(b.a)((function(e){return e!==t._menuItemInstance})),Object(b.a)((function(){return t._menuOpen}))):Object(u.a)();return Object(l.a)(e,i,a,n)}},{key:"_handleMousedown",value:function(t){Object(i.l)(t)||(this._openedBy=0===t.button?"mouse":null,this.triggersSubmenu()&&t.preventDefault())}},{key:"_handleKeydown",value:function(t){var e=t.keyCode;this.triggersSubmenu()&&(e===r.o&&"ltr"===this.dir||e===r.k&&"rtl"===this.dir)&&this.openMenu()}},{key:"_handleClick",value:function(t){this.triggersSubmenu()?(t.stopPropagation(),this.openMenu()):this.toggleMenu()}},{key:"_handleHover",value:function(){var t=this;this.triggersSubmenu()&&(this._hoverSubscription=this._parentMenu._hovered().pipe(Object(b.a)((function(e){return e===t._menuItemInstance&&!e.disabled})),Object(m.a)(0,d.a)).subscribe((function(){t._openedBy="mouse",t.menu instanceof F&&t.menu._isAnimating?t.menu._animationDone.pipe(Object(p.a)(1),Object(m.a)(0,d.a),Object(g.a)(t._parentMenu._hovered())).subscribe((function(){return t.openMenu()})):t.openMenu()})))}},{key:"_getPortal",value:function(){return this._portal&&this._portal.templateRef===this.menu.templateRef||(this._portal=new y.i(this.menu.templateRef,this._viewContainerRef)),this._portal}},{key:"_deprecatedMatMenuTriggerFor",get:function(){return this.menu},set:function(t){this.menu=t}},{key:"menu",get:function(){return this._menu},set:function(t){var e=this;t!==this._menu&&(this._menu=t,this._menuCloseSubscription.unsubscribe(),t&&(this._menuCloseSubscription=t.close.subscribe((function(t){e._destroyMenu(),"click"!==t&&"tab"!==t||!e._parentMenu||e._parentMenu.closed.emit(t)}))))}},{key:"menuOpen",get:function(){return this._menuOpen}},{key:"dir",get:function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}}]),t}();return t.\u0275fac=function(e){return new(e||t)(o.Qb(k.c),o.Qb(o.l),o.Qb(o.T),o.Qb(N),o.Qb(F,8),o.Qb(A,10),o.Qb(D.c,8),o.Qb(i.h))},t.\u0275dir=o.Lb({type:t,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:["aria-haspopup","true",1,"mat-menu-trigger"],hostVars:2,hostBindings:function(t,e){1&t&&o.dc("mousedown",(function(t){return e._handleMousedown(t)}))("keydown",(function(t){return e._handleKeydown(t)}))("click",(function(t){return e._handleClick(t)})),2&t&&o.Eb("aria-expanded",e.menuOpen||null)("aria-controls",e.menuOpen?e.menu.panelId:null)},inputs:{restoreFocus:["matMenuTriggerRestoreFocus","restoreFocus"],_deprecatedMatMenuTriggerFor:["mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:["matMenuTriggerFor","menu"],menuData:["matMenuTriggerData","menuData"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"]}),t}(),H=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=o.Ob({type:t}),t.\u0275inj=o.Nb({factory:function(e){return new(e||t)},providers:[z],imports:[C.k]}),t}(),G=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=o.Ob({type:t}),t.\u0275inj=o.Nb({factory:function(e){return new(e||t)},providers:[z],imports:[[_.c,C.k,C.v,k.f,H],O.c,C.k,H]}),t}()},SeVD:function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=n("ngJS"),a=n("NJ4a"),r=n("Lhse"),o=n("kJWO"),s=n("I55L"),c=n("c2HN"),l=n("XoHu"),u=function(t){if(t&&"function"==typeof t[o.a])return u=t,function(t){var e=u[o.a]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if(Object(s.a)(t))return Object(i.a)(t);if(Object(c.a)(t))return n=t,function(t){return n.then((function(e){t.closed||(t.next(e),t.complete())}),(function(e){return t.error(e)})).then(null,a.a),t};if(t&&"function"==typeof t[r.a])return e=t,function(t){for(var n=e[r.a]();;){var i=void 0;try{i=n.next()}catch(a){return t.error(a),t}if(i.done){t.complete();break}if(t.next(i.value),t.closed)break}return"function"==typeof n.return&&t.add((function(){n.return&&n.return()})),t};var e,n,u,d=Object(l.a)(t)?"an invalid object":"'".concat(t,"'");throw new TypeError("You provided ".concat(d," where a stream was expected. You can provide an Observable, Promise, Array, or Iterable."))}},SpAZ:function(t,e,n){"use strict";function i(t){return t}n.d(e,"a",(function(){return i}))},TCaw:function(t,e){function n(t){return Promise.resolve().then((function(){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}))}n.keys=function(){return[]},n.resolve=n,t.exports=n,n.id="TCaw"},TU8p:function(t,e,n){"use strict";n.d(e,"a",(function(){return u})),n.d(e,"b",(function(){return d}));var i=n("FKr1"),a=n("u47x"),r=n("8LU1"),o=n("R1ws"),s=n("fXoL"),c=0,l=Object(i.C)((function t(){_classCallCheck(this,t)})),u=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a,r,o){var s;return _classCallCheck(this,n),(s=e.call(this))._ngZone=t,s._elementRef=i,s._ariaDescriber=a,s._renderer=r,s._animationMode=o,s._hasContent=!1,s._color="primary",s._overlap=!0,s.position="above after",s.size="medium",s._id=c++,s}return _createClass(n,[{key:"isAbove",value:function(){return-1===this.position.indexOf("below")}},{key:"isAfter",value:function(){return-1===this.position.indexOf("before")}},{key:"ngOnChanges",value:function(t){var e=t.content;if(e){var n=e.currentValue;this._hasContent=null!=n&&(""+n).trim().length>0,this._updateTextContent()}}},{key:"ngOnDestroy",value:function(){var t=this._badgeElement;t&&(this.description&&this._ariaDescriber.removeDescription(t,this.description),this._renderer.destroyNode&&this._renderer.destroyNode(t))}},{key:"getBadgeElement",value:function(){return this._badgeElement}},{key:"_updateTextContent",value:function(){return this._badgeElement?this._badgeElement.textContent=this._stringifyContent():this._badgeElement=this._createBadgeElement(),this._badgeElement}},{key:"_createBadgeElement",value:function(){var t=this._renderer.createElement("span");return this._clearExistingBadges("mat-badge-content"),t.setAttribute("id","mat-badge-content-"+this._id),t.classList.add("mat-badge-content"),t.textContent=this._stringifyContent(),"NoopAnimations"===this._animationMode&&t.classList.add("_mat-animation-noopable"),this.description&&t.setAttribute("aria-label",this.description),this._elementRef.nativeElement.appendChild(t),"function"==typeof requestAnimationFrame&&"NoopAnimations"!==this._animationMode?this._ngZone.runOutsideAngular((function(){requestAnimationFrame((function(){t.classList.add("mat-badge-active")}))})):t.classList.add("mat-badge-active"),t}},{key:"_updateHostAriaDescription",value:function(t,e){var n=this._updateTextContent();e&&this._ariaDescriber.removeDescription(n,e),t&&this._ariaDescriber.describe(n,t)}},{key:"_setColor",value:function(t){if(t!==this._color){var e=this._elementRef.nativeElement.classList;this._color&&e.remove("mat-badge-"+this._color),t&&e.add("mat-badge-"+t)}}},{key:"_clearExistingBadges",value:function(t){for(var e=this._elementRef.nativeElement,n=e.children.length;n--;){var i=e.children[n];i.classList.contains(t)&&e.removeChild(i)}}},{key:"_stringifyContent",value:function(){var t=this.content;return null==t?"":""+t}},{key:"color",get:function(){return this._color},set:function(t){this._setColor(t),this._color=t}},{key:"overlap",get:function(){return this._overlap},set:function(t){this._overlap=Object(r.c)(t)}},{key:"description",get:function(){return this._description},set:function(t){if(t!==this._description){var e=this._badgeElement;this._updateHostAriaDescription(t,this._description),this._description=t,e&&(t?e.setAttribute("aria-label",t):e.removeAttribute("aria-label"))}}},{key:"hidden",get:function(){return this._hidden},set:function(t){this._hidden=Object(r.c)(t)}}]),n}(l);return t.\u0275fac=function(e){return new(e||t)(s.Qb(s.C),s.Qb(s.l),s.Qb(a.c),s.Qb(s.I),s.Qb(o.a,8))},t.\u0275dir=s.Lb({type:t,selectors:[["","matBadge",""]],hostAttrs:[1,"mat-badge"],hostVars:20,hostBindings:function(t,e){2&t&&s.Ib("mat-badge-overlap",e.overlap)("mat-badge-above",e.isAbove())("mat-badge-below",!e.isAbove())("mat-badge-before",!e.isAfter())("mat-badge-after",e.isAfter())("mat-badge-small","small"===e.size)("mat-badge-medium","medium"===e.size)("mat-badge-large","large"===e.size)("mat-badge-hidden",e.hidden||!e._hasContent)("mat-badge-disabled",e.disabled)},inputs:{disabled:["matBadgeDisabled","disabled"],position:["matBadgePosition","position"],size:["matBadgeSize","size"],color:["matBadgeColor","color"],overlap:["matBadgeOverlap","overlap"],description:["matBadgeDescription","description"],hidden:["matBadgeHidden","hidden"],content:["matBadge","content"]},features:[s.Ab,s.Bb]}),t}(),d=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=s.Ob({type:t}),t.\u0275inj=s.Nb({factory:function(e){return new(e||t)},imports:[[a.a,i.k],i.k]}),t}()},UXun:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n("jtHE");function a(t,e,n){var a;return a=t&&"object"==typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:n},function(t){return t.lift(function(t){var e,n,a=t.bufferSize,r=void 0===a?Number.POSITIVE_INFINITY:a,o=t.windowTime,s=void 0===o?Number.POSITIVE_INFINITY:o,c=t.refCount,l=t.scheduler,u=0,d=!1,f=!1;return function(t){var a;u++,!e||d?(d=!1,e=new i.a(r,s,l),a=e.subscribe(this),n=t.subscribe({next:function(t){e.next(t)},error:function(t){d=!0,e.error(t)},complete:function(){f=!0,n=void 0,e.complete()}})):a=e.subscribe(this),this.add((function(){u--,a.unsubscribe(),n&&!f&&c&&0===u&&(n.unsubscribe(),n=void 0,e=void 0)}))}}(a))}}},VRyK:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n("HDdC"),a=n("z+Ro"),r=n("bHdf"),o=n("yCtX");function s(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var s=Number.POSITIVE_INFINITY,c=null,l=e[e.length-1];return Object(a.a)(l)?(c=e.pop(),e.length>1&&"number"==typeof e[e.length-1]&&(s=e.pop())):"number"==typeof l&&(s=e.pop()),null===c&&1===e.length&&e[0]instanceof i.a?e[0]:Object(r.a)(s)(Object(o.a)(e,c))}},WMd4:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n("EY2u"),a=n("LRne"),r=n("z6cu"),o=function(){var t=function(){function t(e,n,i){_classCallCheck(this,t),this.kind=e,this.value=n,this.error=i,this.hasValue="N"===e}return _createClass(t,[{key:"observe",value:function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}}},{key:"do",value:function(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}}},{key:"accept",value:function(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)}},{key:"toObservable",value:function(){switch(this.kind){case"N":return Object(a.a)(this.value);case"E":return Object(r.a)(this.error);case"C":return Object(i.b)()}throw new Error("unexpected notification kind value")}}],[{key:"createNext",value:function(e){return void 0!==e?new t("N",e):t.undefinedValueNotification}},{key:"createError",value:function(e){return new t("E",void 0,e)}},{key:"createComplete",value:function(){return t.completeNotification}}]),t}();return t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}()},Wp6s:function(t,e,n){"use strict";n.d(e,"a",(function(){return x})),n.d(e,"b",(function(){return b})),n.d(e,"c",(function(){return k})),n.d(e,"d",(function(){return f})),n.d(e,"e",(function(){return g})),n.d(e,"f",(function(){return O})),n.d(e,"g",(function(){return m})),n.d(e,"h",(function(){return _})),n.d(e,"i",(function(){return y})),n.d(e,"j",(function(){return w})),n.d(e,"k",(function(){return v})),n.d(e,"l",(function(){return p})),n.d(e,"m",(function(){return h})),n.d(e,"n",(function(){return D})),n.d(e,"o",(function(){return C}));var i=n("R1ws"),a=n("FKr1"),r=n("fXoL"),o=["*",[["mat-card-footer"]]],s=["*","mat-card-footer"],c=[[["","mat-card-avatar",""],["","matCardAvatar",""]],[["mat-card-title"],["mat-card-subtitle"],["","mat-card-title",""],["","mat-card-subtitle",""],["","matCardTitle",""],["","matCardSubtitle",""]],"*"],l=["[mat-card-avatar], [matCardAvatar]","mat-card-title, mat-card-subtitle,\n [mat-card-title], [mat-card-subtitle],\n [matCardTitle], [matCardSubtitle]","*"],u=[[["mat-card-title"],["mat-card-subtitle"],["","mat-card-title",""],["","mat-card-subtitle",""],["","matCardTitle",""],["","matCardSubtitle",""]],[["img"]],"*"],d=["mat-card-title, mat-card-subtitle,\n [mat-card-title], [mat-card-subtitle],\n [matCardTitle], [matCardSubtitle]","img","*"],f=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Lb({type:t,selectors:[["mat-card-content"],["","mat-card-content",""],["","matCardContent",""]],hostAttrs:[1,"mat-card-content"]}),t}(),h=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Lb({type:t,selectors:[["mat-card-title"],["","mat-card-title",""],["","matCardTitle",""]],hostAttrs:[1,"mat-card-title"]}),t}(),p=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Lb({type:t,selectors:[["mat-card-subtitle"],["","mat-card-subtitle",""],["","matCardSubtitle",""]],hostAttrs:[1,"mat-card-subtitle"]}),t}(),b=function(){var t=function t(){_classCallCheck(this,t),this.align="start"};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Lb({type:t,selectors:[["mat-card-actions"]],hostAttrs:[1,"mat-card-actions"],hostVars:2,hostBindings:function(t,e){2&t&&r.Ib("mat-card-actions-align-end","end"===e.align)},inputs:{align:"align"},exportAs:["matCardActions"]}),t}(),g=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Lb({type:t,selectors:[["mat-card-footer"]],hostAttrs:[1,"mat-card-footer"]}),t}(),m=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Lb({type:t,selectors:[["","mat-card-image",""],["","matCardImage",""]],hostAttrs:[1,"mat-card-image"]}),t}(),v=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Lb({type:t,selectors:[["","mat-card-sm-image",""],["","matCardImageSmall",""]],hostAttrs:[1,"mat-card-sm-image"]}),t}(),y=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Lb({type:t,selectors:[["","mat-card-md-image",""],["","matCardImageMedium",""]],hostAttrs:[1,"mat-card-md-image"]}),t}(),_=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Lb({type:t,selectors:[["","mat-card-lg-image",""],["","matCardImageLarge",""]],hostAttrs:[1,"mat-card-lg-image"]}),t}(),C=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Lb({type:t,selectors:[["","mat-card-xl-image",""],["","matCardImageXLarge",""]],hostAttrs:[1,"mat-card-xl-image"]}),t}(),k=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Lb({type:t,selectors:[["","mat-card-avatar",""],["","matCardAvatar",""]],hostAttrs:[1,"mat-card-avatar"]}),t}(),x=function(){var t=function t(e){_classCallCheck(this,t),this._animationMode=e};return t.\u0275fac=function(e){return new(e||t)(r.Qb(i.a,8))},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-card"]],hostAttrs:[1,"mat-card","mat-focus-indicator"],hostVars:2,hostBindings:function(t,e){2&t&&r.Ib("_mat-animation-noopable","NoopAnimations"===e._animationMode)},exportAs:["matCard"],ngContentSelectors:s,decls:2,vars:0,template:function(t,e){1&t&&(r.nc(o),r.mc(0),r.mc(1,1))},styles:[".mat-card{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);display:block;position:relative;padding:16px;border-radius:4px}._mat-animation-noopable.mat-card{transition:none;animation:none}.mat-card .mat-divider-horizontal{position:absolute;left:0;width:100%}[dir=rtl] .mat-card .mat-divider-horizontal{left:auto;right:0}.mat-card .mat-divider-horizontal.mat-divider-inset{position:static;margin:0}[dir=rtl] .mat-card .mat-divider-horizontal.mat-divider-inset{margin-right:0}.cdk-high-contrast-active .mat-card{outline:solid 1px}.mat-card-actions,.mat-card-subtitle,.mat-card-content{display:block;margin-bottom:16px}.mat-card-title{display:block;margin-bottom:8px}.mat-card-actions{margin-left:-8px;margin-right:-8px;padding:8px 0}.mat-card-actions-align-end{display:flex;justify-content:flex-end}.mat-card-image{width:calc(100% + 32px);margin:0 -16px 16px -16px}.mat-card-footer{display:block;margin:0 -16px -16px -16px}.mat-card-actions .mat-button,.mat-card-actions .mat-raised-button,.mat-card-actions .mat-stroked-button{margin:0 8px}.mat-card-header{display:flex;flex-direction:row}.mat-card-header .mat-card-title{margin-bottom:12px}.mat-card-header-text{margin:0 16px}.mat-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0;object-fit:cover}.mat-card-title-group{display:flex;justify-content:space-between}.mat-card-sm-image{width:80px;height:80px}.mat-card-md-image{width:112px;height:112px}.mat-card-lg-image{width:152px;height:152px}.mat-card-xl-image{width:240px;height:240px;margin:-8px}.mat-card-title-group>.mat-card-xl-image{margin:-8px 0 8px}@media(max-width: 599px){.mat-card-title-group{margin:0}.mat-card-xl-image{margin-left:0;margin-right:0}}.mat-card>:first-child,.mat-card-content>:first-child{margin-top:0}.mat-card>:last-child:not(.mat-card-footer),.mat-card-content>:last-child:not(.mat-card-footer){margin-bottom:0}.mat-card-image:first-child{margin-top:-16px;border-top-left-radius:inherit;border-top-right-radius:inherit}.mat-card>.mat-card-actions:last-child{margin-bottom:-8px;padding-bottom:0}.mat-card-actions .mat-button:first-child,.mat-card-actions .mat-raised-button:first-child,.mat-card-actions .mat-stroked-button:first-child{margin-left:0;margin-right:0}.mat-card-title:not(:first-child),.mat-card-subtitle:not(:first-child){margin-top:-4px}.mat-card-header .mat-card-subtitle:not(:first-child){margin-top:-8px}.mat-card>.mat-card-xl-image:first-child{margin-top:-8px}.mat-card>.mat-card-xl-image:last-child{margin-bottom:-8px}\n"],encapsulation:2,changeDetection:0}),t}(),O=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-card-header"]],hostAttrs:[1,"mat-card-header"],ngContentSelectors:l,decls:4,vars:0,consts:[[1,"mat-card-header-text"]],template:function(t,e){1&t&&(r.nc(c),r.mc(0),r.Wb(1,"div",0),r.mc(2,1),r.Vb(),r.mc(3,2))},encapsulation:2,changeDetection:0}),t}(),D=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-card-title-group"]],hostAttrs:[1,"mat-card-title-group"],ngContentSelectors:d,decls:4,vars:0,template:function(t,e){1&t&&(r.nc(u),r.Wb(0,"div"),r.mc(1),r.Vb(),r.mc(2,1),r.mc(3,2))},encapsulation:2,changeDetection:0}),t}(),w=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=r.Ob({type:t}),t.\u0275inj=r.Nb({factory:function(e){return new(e||t)},imports:[[a.k],a.k]}),t}()},XNiG:function(t,e,n){"use strict";n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return u}));var i=n("HDdC"),a=n("7o/Q"),r=n("quSY"),o=n("9ppp"),s=n("Ylt2"),c=n("2QA8"),l=function(t){_inherits(n,t);var e=_createSuper(n);function n(t){var i;return _classCallCheck(this,n),(i=e.call(this,t)).destination=t,i}return n}(a.a),u=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(){var t;return _classCallCheck(this,n),(t=e.call(this)).observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return _createClass(n,[{key:c.a,value:function(){return new l(this)}},{key:"lift",value:function(t){var e=new d(this,this);return e.operator=t,e}},{key:"next",value:function(t){if(this.closed)throw new o.a;if(!this.isStopped)for(var e=this.observers,n=e.length,i=e.slice(),a=0;a<n;a++)i[a].next(t)}},{key:"error",value:function(t){if(this.closed)throw new o.a;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,n=e.length,i=e.slice(),a=0;a<n;a++)i[a].error(t);this.observers.length=0}},{key:"complete",value:function(){if(this.closed)throw new o.a;this.isStopped=!0;for(var t=this.observers,e=t.length,n=t.slice(),i=0;i<e;i++)n[i].complete();this.observers.length=0}},{key:"unsubscribe",value:function(){this.isStopped=!0,this.closed=!0,this.observers=null}},{key:"_trySubscribe",value:function(t){if(this.closed)throw new o.a;return _get(_getPrototypeOf(n.prototype),"_trySubscribe",this).call(this,t)}},{key:"_subscribe",value:function(t){if(this.closed)throw new o.a;return this.hasError?(t.error(this.thrownError),r.a.EMPTY):this.isStopped?(t.complete(),r.a.EMPTY):(this.observers.push(t),new s.a(this,t))}},{key:"asObservable",value:function(){var t=new i.a;return t.source=this,t}}]),n}(i.a);return t.create=function(t,e){return new d(t,e)},t}(),d=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var a;return _classCallCheck(this,n),(a=e.call(this)).destination=t,a.source=i,a}return _createClass(n,[{key:"next",value:function(t){var e=this.destination;e&&e.next&&e.next(t)}},{key:"error",value:function(t){var e=this.destination;e&&e.error&&this.destination.error(t)}},{key:"complete",value:function(){var t=this.destination;t&&t.complete&&this.destination.complete()}},{key:"_subscribe",value:function(t){return this.source?this.source.subscribe(t):r.a.EMPTY}}]),n}(u)},Xa2L:function(t,e,n){"use strict";n.d(e,"a",(function(){return g})),n.d(e,"b",(function(){return v})),n.d(e,"c",(function(){return m}));var i=n("fXoL"),a=n("ofXK"),r=n("FKr1"),o=n("8LU1"),s=n("nLfN"),c=n("R1ws");function l(t,e){if(1&t&&(i.gc(),i.Rb(0,"circle",3)),2&t){var n=i.hc();i.Lc("animation-name","mat-progress-spinner-stroke-rotate-"+n._spinnerAnimationLabel)("stroke-dashoffset",n._getStrokeDashOffset(),"px")("stroke-dasharray",n._getStrokeCircumference(),"px")("stroke-width",n._getCircleStrokeWidth(),"%"),i.Eb("r",n._getCircleRadius())}}function u(t,e){if(1&t&&(i.gc(),i.Rb(0,"circle",3)),2&t){var n=i.hc();i.Lc("stroke-dashoffset",n._getStrokeDashOffset(),"px")("stroke-dasharray",n._getStrokeCircumference(),"px")("stroke-width",n._getCircleStrokeWidth(),"%"),i.Eb("r",n._getCircleRadius())}}function d(t,e){if(1&t&&(i.gc(),i.Rb(0,"circle",3)),2&t){var n=i.hc();i.Lc("animation-name","mat-progress-spinner-stroke-rotate-"+n._spinnerAnimationLabel)("stroke-dashoffset",n._getStrokeDashOffset(),"px")("stroke-dasharray",n._getStrokeCircumference(),"px")("stroke-width",n._getCircleStrokeWidth(),"%"),i.Eb("r",n._getCircleRadius())}}function f(t,e){if(1&t&&(i.gc(),i.Rb(0,"circle",3)),2&t){var n=i.hc();i.Lc("stroke-dashoffset",n._getStrokeDashOffset(),"px")("stroke-dasharray",n._getStrokeCircumference(),"px")("stroke-width",n._getCircleStrokeWidth(),"%"),i.Eb("r",n._getCircleRadius())}}var h=".mat-progress-spinner{display:block;position:relative}.mat-progress-spinner svg{position:absolute;transform:rotate(-90deg);top:0;left:0;transform-origin:center;overflow:visible}.mat-progress-spinner circle{fill:transparent;transform-origin:center;transition:stroke-dashoffset 225ms linear}._mat-animation-noopable.mat-progress-spinner circle{transition:none;animation:none}.cdk-high-contrast-active .mat-progress-spinner circle{stroke:currentColor}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate]{animation:mat-progress-spinner-linear-rotate 2000ms linear infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate]{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition-property:stroke;animation-duration:4000ms;animation-timing-function:cubic-bezier(0.35, 0, 0.25, 1);animation-iteration-count:infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-animation[mode=indeterminate] circle{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate]{animation:mat-progress-spinner-stroke-rotate-fallback 10000ms cubic-bezier(0.87, 0.03, 0.33, 1) infinite}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate]{transition:none;animation:none}.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] circle{transition-property:stroke}._mat-animation-noopable.mat-progress-spinner.mat-progress-spinner-indeterminate-fallback-animation[mode=indeterminate] circle{transition:none;animation:none}@keyframes mat-progress-spinner-linear-rotate{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes mat-progress-spinner-stroke-rotate-100{0%{stroke-dashoffset:268.606171575px;transform:rotate(0)}12.5%{stroke-dashoffset:56.5486677px;transform:rotate(0)}12.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(72.5deg)}25%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(72.5deg)}25.0001%{stroke-dashoffset:268.606171575px;transform:rotate(270deg)}37.5%{stroke-dashoffset:56.5486677px;transform:rotate(270deg)}37.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(161.5deg)}50%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(161.5deg)}50.0001%{stroke-dashoffset:268.606171575px;transform:rotate(180deg)}62.5%{stroke-dashoffset:56.5486677px;transform:rotate(180deg)}62.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(251.5deg)}75%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(251.5deg)}75.0001%{stroke-dashoffset:268.606171575px;transform:rotate(90deg)}87.5%{stroke-dashoffset:56.5486677px;transform:rotate(90deg)}87.5001%{stroke-dashoffset:56.5486677px;transform:rotateX(180deg) rotate(341.5deg)}100%{stroke-dashoffset:268.606171575px;transform:rotateX(180deg) rotate(341.5deg)}}@keyframes mat-progress-spinner-stroke-rotate-fallback{0%{transform:rotate(0deg)}25%{transform:rotate(1170deg)}50%{transform:rotate(2340deg)}75%{transform:rotate(3510deg)}100%{transform:rotate(4680deg)}}\n",p=Object(r.A)((function t(e){_classCallCheck(this,t),this._elementRef=e}),"primary"),b=new i.s("mat-progress-spinner-default-options",{providedIn:"root",factory:function(){return{diameter:100}}}),g=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a,r,o){var s;_classCallCheck(this,n),(s=e.call(this,t))._elementRef=t,s._document=a,s._diameter=100,s._value=0,s._fallbackAnimation=!1,s.mode="determinate";var c=n._diameters;return s._spinnerAnimationLabel=s._getSpinnerAnimationLabel(),c.has(a.head)||c.set(a.head,new Set([100])),s._fallbackAnimation=i.EDGE||i.TRIDENT,s._noopAnimations="NoopAnimations"===r&&!!o&&!o._forceAnimations,o&&(o.diameter&&(s.diameter=o.diameter),o.strokeWidth&&(s.strokeWidth=o.strokeWidth)),s}return _createClass(n,[{key:"ngOnInit",value:function(){var t=this._elementRef.nativeElement;this._styleRoot=Object(s.c)(t)||this._document.head,this._attachStyleNode(),t.classList.add("mat-progress-spinner-indeterminate".concat(this._fallbackAnimation?"-fallback":"","-animation"))}},{key:"_getCircleRadius",value:function(){return(this.diameter-10)/2}},{key:"_getViewBox",value:function(){var t=2*this._getCircleRadius()+this.strokeWidth;return"0 0 ".concat(t," ").concat(t)}},{key:"_getStrokeCircumference",value:function(){return 2*Math.PI*this._getCircleRadius()}},{key:"_getStrokeDashOffset",value:function(){return"determinate"===this.mode?this._getStrokeCircumference()*(100-this._value)/100:this._fallbackAnimation&&"indeterminate"===this.mode?.2*this._getStrokeCircumference():null}},{key:"_getCircleStrokeWidth",value:function(){return this.strokeWidth/this.diameter*100}},{key:"_attachStyleNode",value:function(){var t=this._styleRoot,e=this._diameter,i=n._diameters,a=i.get(t);if(!a||!a.has(e)){var r=this._document.createElement("style");r.setAttribute("mat-spinner-animation",this._spinnerAnimationLabel),r.textContent=this._getAnimationText(),t.appendChild(r),a||(a=new Set,i.set(t,a)),a.add(e)}}},{key:"_getAnimationText",value:function(){var t=this._getStrokeCircumference();return"\n @keyframes mat-progress-spinner-stroke-rotate-DIAMETER {\n 0% { stroke-dashoffset: START_VALUE; transform: rotate(0); }\n 12.5% { stroke-dashoffset: END_VALUE; transform: rotate(0); }\n 12.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n 25% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(72.5deg); }\n\n 25.0001% { stroke-dashoffset: START_VALUE; transform: rotate(270deg); }\n 37.5% { stroke-dashoffset: END_VALUE; transform: rotate(270deg); }\n 37.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n 50% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(161.5deg); }\n\n 50.0001% { stroke-dashoffset: START_VALUE; transform: rotate(180deg); }\n 62.5% { stroke-dashoffset: END_VALUE; transform: rotate(180deg); }\n 62.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n 75% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(251.5deg); }\n\n 75.0001% { stroke-dashoffset: START_VALUE; transform: rotate(90deg); }\n 87.5% { stroke-dashoffset: END_VALUE; transform: rotate(90deg); }\n 87.5001% { stroke-dashoffset: END_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n 100% { stroke-dashoffset: START_VALUE; transform: rotateX(180deg) rotate(341.5deg); }\n }\n".replace(/START_VALUE/g,""+.95*t).replace(/END_VALUE/g,""+.2*t).replace(/DIAMETER/g,""+this._spinnerAnimationLabel)}},{key:"_getSpinnerAnimationLabel",value:function(){return this.diameter.toString().replace(".","_")}},{key:"diameter",get:function(){return this._diameter},set:function(t){this._diameter=Object(o.f)(t),this._spinnerAnimationLabel=this._getSpinnerAnimationLabel(),!this._fallbackAnimation&&this._styleRoot&&this._attachStyleNode()}},{key:"strokeWidth",get:function(){return this._strokeWidth||this.diameter/10},set:function(t){this._strokeWidth=Object(o.f)(t)}},{key:"value",get:function(){return"determinate"===this.mode?this._value:0},set:function(t){this._value=Math.max(0,Math.min(100,Object(o.f)(t)))}}]),n}(p);return t.\u0275fac=function(e){return new(e||t)(i.Qb(i.l),i.Qb(s.a),i.Qb(a.e,8),i.Qb(c.a,8),i.Qb(b))},t.\u0275cmp=i.Kb({type:t,selectors:[["mat-progress-spinner"]],hostAttrs:["role","progressbar",1,"mat-progress-spinner"],hostVars:10,hostBindings:function(t,e){2&t&&(i.Eb("aria-valuemin","determinate"===e.mode?0:null)("aria-valuemax","determinate"===e.mode?100:null)("aria-valuenow","determinate"===e.mode?e.value:null)("mode",e.mode),i.Lc("width",e.diameter,"px")("height",e.diameter,"px"),i.Ib("_mat-animation-noopable",e._noopAnimations))},inputs:{color:"color",mode:"mode",diameter:"diameter",strokeWidth:"strokeWidth",value:"value"},exportAs:["matProgressSpinner"],features:[i.Ab],decls:3,vars:8,consts:[["preserveAspectRatio","xMidYMid meet","focusable","false",3,"ngSwitch"],["cx","50%","cy","50%",3,"animation-name","stroke-dashoffset","stroke-dasharray","stroke-width",4,"ngSwitchCase"],["cx","50%","cy","50%",3,"stroke-dashoffset","stroke-dasharray","stroke-width",4,"ngSwitchCase"],["cx","50%","cy","50%"]],template:function(t,e){1&t&&(i.gc(),i.Wb(0,"svg",0),i.Oc(1,l,1,9,"circle",1),i.Oc(2,u,1,7,"circle",2),i.Vb()),2&t&&(i.Lc("width",e.diameter,"px")("height",e.diameter,"px"),i.oc("ngSwitch","indeterminate"===e.mode),i.Eb("viewBox",e._getViewBox()),i.Db(1),i.oc("ngSwitchCase",!0),i.Db(1),i.oc("ngSwitchCase",!1))},directives:[a.x,a.y],styles:[h],encapsulation:2,changeDetection:0}),t._diameters=new WeakMap,t}(),m=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a,r,o){var s;return _classCallCheck(this,n),(s=e.call(this,t,i,a,r,o)).mode="indeterminate",s}return n}(g);return t.\u0275fac=function(e){return new(e||t)(i.Qb(i.l),i.Qb(s.a),i.Qb(a.e,8),i.Qb(c.a,8),i.Qb(b))},t.\u0275cmp=i.Kb({type:t,selectors:[["mat-spinner"]],hostAttrs:["role","progressbar","mode","indeterminate",1,"mat-spinner","mat-progress-spinner"],hostVars:6,hostBindings:function(t,e){2&t&&(i.Lc("width",e.diameter,"px")("height",e.diameter,"px"),i.Ib("_mat-animation-noopable",e._noopAnimations))},inputs:{color:"color"},features:[i.Ab],decls:3,vars:8,consts:[["preserveAspectRatio","xMidYMid meet","focusable","false",3,"ngSwitch"],["cx","50%","cy","50%",3,"animation-name","stroke-dashoffset","stroke-dasharray","stroke-width",4,"ngSwitchCase"],["cx","50%","cy","50%",3,"stroke-dashoffset","stroke-dasharray","stroke-width",4,"ngSwitchCase"],["cx","50%","cy","50%"]],template:function(t,e){1&t&&(i.gc(),i.Wb(0,"svg",0),i.Oc(1,d,1,9,"circle",1),i.Oc(2,f,1,7,"circle",2),i.Vb()),2&t&&(i.Lc("width",e.diameter,"px")("height",e.diameter,"px"),i.oc("ngSwitch","indeterminate"===e.mode),i.Eb("viewBox",e._getViewBox()),i.Db(1),i.oc("ngSwitchCase",!0),i.Db(1),i.oc("ngSwitchCase",!1))},directives:[a.x,a.y],styles:[h],encapsulation:2,changeDetection:0}),t}(),v=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=i.Ob({type:t}),t.\u0275inj=i.Nb({factory:function(e){return new(e||t)},imports:[[r.k,a.c],r.k]}),t}()},XhcP:function(t,e,n){"use strict";n.d(e,"a",(function(){return q})),n.d(e,"b",(function(){return K})),n.d(e,"c",(function(){return X})),n.d(e,"d",(function(){return J})),n.d(e,"e",(function(){return tt})),n.d(e,"f",(function(){return Y})),n.d(e,"g",(function(){return nt}));var i=n("nLfN"),a=n("vxfF"),r=n("ofXK"),o=n("fXoL"),s=n("FKr1"),c=n("8LU1"),l=n("FtGj"),u=n("XNiG"),d=n("xgIS"),f=n("VRyK"),h=n("pLZG"),p=n("lJxs"),b=n("7o/Q");function g(t){return function(e){return e.lift(new m(t))}}var m=function(){function t(e){_classCallCheck(this,t),this.value=e}return _createClass(t,[{key:"call",value:function(t,e){return e.subscribe(new v(t,this.value))}}]),t}(),v=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var a;return _classCallCheck(this,n),(a=e.call(this,t)).value=i,a}return _createClass(n,[{key:"_next",value:function(t){this.destination.next(this.value)}}]),n}(b.a),y=n("1G5W"),_=n("/uUt"),C=n("IzEk"),k=n("JX91"),x=n("Kj3r"),O=n("R0Ic"),D=n("R1ws"),w=n("u47x"),M=n("cH1L"),S=["*"];function I(t,e){if(1&t){var n=o.Xb();o.Wb(0,"div",2),o.dc("click",(function(){return o.Dc(n),o.hc()._onBackdropClicked()})),o.Vb()}if(2&t){var i=o.hc();o.Ib("mat-drawer-shown",i._isShowingBackdrop())}}function P(t,e){1&t&&(o.Wb(0,"mat-drawer-content"),o.mc(1,2),o.Vb())}var R=[[["mat-drawer"]],[["mat-drawer-content"]],"*"],V=["mat-drawer","mat-drawer-content","*"];function j(t,e){if(1&t){var n=o.Xb();o.Wb(0,"div",2),o.dc("click",(function(){return o.Dc(n),o.hc()._onBackdropClicked()})),o.Vb()}if(2&t){var i=o.hc();o.Ib("mat-drawer-shown",i._isShowingBackdrop())}}function A(t,e){1&t&&(o.Wb(0,"mat-sidenav-content",3),o.mc(1,2),o.Vb())}var W,T,E,F,L,Q,N,z=[[["mat-sidenav"]],[["mat-sidenav-content"]],"*"],B=["mat-sidenav","mat-sidenav-content","*"],U=".mat-drawer-container{position:relative;z-index:1;box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}.cdk-high-contrast-active .mat-drawer-backdrop{opacity:.5}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}.cdk-high-contrast-active .mat-drawer,.cdk-high-contrast-active [dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}.cdk-high-contrast-active [dir=rtl] .mat-drawer,.cdk-high-contrast-active .mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer{transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto;-webkit-overflow-scrolling:touch}.mat-sidenav-fixed{position:fixed}\n",H={transformDrawer:Object(O.n)("transform",[Object(O.k)("open, open-instant",Object(O.l)({transform:"none",visibility:"visible"})),Object(O.k)("void",Object(O.l)({"box-shadow":"none",visibility:"hidden"})),Object(O.m)("void => open-instant",Object(O.e)("0ms")),Object(O.m)("void <=> open, open-instant => void",Object(O.e)("400ms cubic-bezier(0.25, 0.8, 0.25, 1)"))])},G=new o.s("MAT_DRAWER_DEFAULT_AUTOSIZE",{providedIn:"root",factory:function(){return!1}}),$=new o.s("MAT_DRAWER_CONTAINER"),X=((L=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a,r,o){var s;return _classCallCheck(this,n),(s=e.call(this,a,r,o))._changeDetectorRef=t,s._container=i,s}return _createClass(n,[{key:"ngAfterContentInit",value:function(){var t=this;this._container._contentMarginChanges.subscribe((function(){t._changeDetectorRef.markForCheck()}))}}]),n}(a.b)).\u0275fac=function(t){return new(t||L)(o.Qb(o.h),o.Qb(Object(o.X)((function(){return K}))),o.Qb(o.l),o.Qb(a.f),o.Qb(o.C))},L.\u0275cmp=o.Kb({type:L,selectors:[["mat-drawer-content"]],hostAttrs:[1,"mat-drawer-content"],hostVars:4,hostBindings:function(t,e){2&t&&o.Lc("margin-left",e._container._contentMargins.left,"px")("margin-right",e._container._contentMargins.right,"px")},features:[o.Ab],ngContentSelectors:S,decls:1,vars:0,template:function(t,e){1&t&&(o.nc(),o.mc(0))},encapsulation:2,changeDetection:0}),L),q=((F=function(){function t(e,n,i,a,r,s,c){var f=this;_classCallCheck(this,t),this._elementRef=e,this._focusTrapFactory=n,this._focusMonitor=i,this._platform=a,this._ngZone=r,this._doc=s,this._container=c,this._elementFocusedBeforeDrawerWasOpened=null,this._enableAnimations=!1,this._position="start",this._mode="over",this._disableClose=!1,this._opened=!1,this._animationStarted=new u.a,this._animationEnd=new u.a,this._animationState="void",this.openedChange=new o.o(!0),this._openedStream=this.openedChange.pipe(Object(h.a)((function(t){return t})),Object(p.a)((function(){}))),this.openedStart=this._animationStarted.pipe(Object(h.a)((function(t){return t.fromState!==t.toState&&0===t.toState.indexOf("open")})),g(void 0)),this._closedStream=this.openedChange.pipe(Object(h.a)((function(t){return!t})),Object(p.a)((function(){}))),this.closedStart=this._animationStarted.pipe(Object(h.a)((function(t){return t.fromState!==t.toState&&"void"===t.toState})),g(void 0)),this._destroyed=new u.a,this.onPositionChanged=new o.o,this._modeChanged=new u.a,this.openedChange.subscribe((function(t){t?(f._doc&&(f._elementFocusedBeforeDrawerWasOpened=f._doc.activeElement),f._takeFocus()):f._isFocusWithinDrawer()&&f._restoreFocus()})),this._ngZone.runOutsideAngular((function(){Object(d.a)(f._elementRef.nativeElement,"keydown").pipe(Object(h.a)((function(t){return t.keyCode===l.h&&!f.disableClose&&!Object(l.v)(t)})),Object(y.a)(f._destroyed)).subscribe((function(t){return f._ngZone.run((function(){f.close(),t.stopPropagation(),t.preventDefault()}))}))})),this._animationEnd.pipe(Object(_.a)((function(t,e){return t.fromState===e.fromState&&t.toState===e.toState}))).subscribe((function(t){var e=t.fromState,n=t.toState;(0===n.indexOf("open")&&"void"===e||"void"===n&&0===e.indexOf("open"))&&f.openedChange.emit(f._opened)}))}return _createClass(t,[{key:"_takeFocus",value:function(){var t=this;this.autoFocus&&this._focusTrap&&this._focusTrap.focusInitialElementWhenReady().then((function(e){e||"function"!=typeof t._elementRef.nativeElement.focus||t._elementRef.nativeElement.focus()}))}},{key:"_restoreFocus",value:function(){this.autoFocus&&(this._elementFocusedBeforeDrawerWasOpened?this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened,this._openedVia):this._elementRef.nativeElement.blur(),this._elementFocusedBeforeDrawerWasOpened=null,this._openedVia=null)}},{key:"_isFocusWithinDrawer",value:function(){var t,e=null===(t=this._doc)||void 0===t?void 0:t.activeElement;return!!e&&this._elementRef.nativeElement.contains(e)}},{key:"ngAfterContentInit",value:function(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._updateFocusTrapState()}},{key:"ngAfterContentChecked",value:function(){this._platform.isBrowser&&(this._enableAnimations=!0)}},{key:"ngOnDestroy",value:function(){this._focusTrap&&this._focusTrap.destroy(),this._animationStarted.complete(),this._animationEnd.complete(),this._modeChanged.complete(),this._destroyed.next(),this._destroyed.complete()}},{key:"open",value:function(t){return this.toggle(!0,t)}},{key:"close",value:function(){return this.toggle(!1)}},{key:"_closeViaBackdropClick",value:function(){return this._setOpen(!1,!0)}},{key:"toggle",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:!this.opened,e=arguments.length>1?arguments[1]:void 0;return this._setOpen(t,!t&&this._isFocusWithinDrawer(),e)}},{key:"_setOpen",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"program";return this._opened=t,t?(this._animationState=this._enableAnimations?"open":"open-instant",this._openedVia=i):(this._animationState="void",e&&this._restoreFocus()),this._updateFocusTrapState(),new Promise((function(t){n.openedChange.pipe(Object(C.a)(1)).subscribe((function(e){return t(e?"open":"close")}))}))}},{key:"_getWidth",value:function(){return this._elementRef.nativeElement&&this._elementRef.nativeElement.offsetWidth||0}},{key:"_updateFocusTrapState",value:function(){this._focusTrap&&(this._focusTrap.enabled=this.opened&&"side"!==this.mode)}},{key:"_animationStartListener",value:function(t){this._animationStarted.next(t)}},{key:"_animationDoneListener",value:function(t){this._animationEnd.next(t)}},{key:"position",get:function(){return this._position},set:function(t){(t="end"===t?"end":"start")!=this._position&&(this._position=t,this.onPositionChanged.emit())}},{key:"mode",get:function(){return this._mode},set:function(t){this._mode=t,this._updateFocusTrapState(),this._modeChanged.next()}},{key:"disableClose",get:function(){return this._disableClose},set:function(t){this._disableClose=Object(c.c)(t)}},{key:"autoFocus",get:function(){var t=this._autoFocus;return null==t?"side"!==this.mode:t},set:function(t){this._autoFocus=Object(c.c)(t)}},{key:"opened",get:function(){return this._opened},set:function(t){this.toggle(Object(c.c)(t))}}]),t}()).\u0275fac=function(t){return new(t||F)(o.Qb(o.l),o.Qb(w.i),o.Qb(w.h),o.Qb(i.a),o.Qb(o.C),o.Qb(r.e,8),o.Qb($,8))},F.\u0275cmp=o.Kb({type:F,selectors:[["mat-drawer"]],hostAttrs:["tabIndex","-1",1,"mat-drawer"],hostVars:12,hostBindings:function(t,e){1&t&&o.Mc("@transform.start",(function(t){return e._animationStartListener(t)}))("@transform.done",(function(t){return e._animationDoneListener(t)})),2&t&&(o.Eb("align",null),o.Nc("@transform",e._animationState),o.Ib("mat-drawer-end","end"===e.position)("mat-drawer-over","over"===e.mode)("mat-drawer-push","push"===e.mode)("mat-drawer-side","side"===e.mode)("mat-drawer-opened",e.opened))},inputs:{position:"position",mode:"mode",disableClose:"disableClose",autoFocus:"autoFocus",opened:"opened"},outputs:{openedChange:"openedChange",_openedStream:"opened",openedStart:"openedStart",_closedStream:"closed",closedStart:"closedStart",onPositionChanged:"positionChanged"},exportAs:["matDrawer"],ngContentSelectors:S,decls:2,vars:0,consts:[[1,"mat-drawer-inner-container"]],template:function(t,e){1&t&&(o.nc(),o.Wb(0,"div",0),o.mc(1),o.Vb())},encapsulation:2,data:{animation:[H.transformDrawer]},changeDetection:0}),F),K=((E=function(){function t(e,n,i,a,r){var s=this,c=arguments.length>5&&void 0!==arguments[5]&&arguments[5],l=arguments.length>6?arguments[6]:void 0;_classCallCheck(this,t),this._dir=e,this._element=n,this._ngZone=i,this._changeDetectorRef=a,this._animationMode=l,this._drawers=new o.H,this.backdropClick=new o.o,this._destroyed=new u.a,this._doCheckSubject=new u.a,this._contentMargins={left:null,right:null},this._contentMarginChanges=new u.a,e&&e.change.pipe(Object(y.a)(this._destroyed)).subscribe((function(){s._validateDrawers(),s.updateContentMargins()})),r.change().pipe(Object(y.a)(this._destroyed)).subscribe((function(){return s.updateContentMargins()})),this._autosize=c}return _createClass(t,[{key:"ngAfterContentInit",value:function(){var t=this;this._allDrawers.changes.pipe(Object(k.a)(this._allDrawers),Object(y.a)(this._destroyed)).subscribe((function(e){t._drawers.reset(e.filter((function(e){return!e._container||e._container===t}))),t._drawers.notifyOnChanges()})),this._drawers.changes.pipe(Object(k.a)(null)).subscribe((function(){t._validateDrawers(),t._drawers.forEach((function(e){t._watchDrawerToggle(e),t._watchDrawerPosition(e),t._watchDrawerMode(e)})),(!t._drawers.length||t._isDrawerOpen(t._start)||t._isDrawerOpen(t._end))&&t.updateContentMargins(),t._changeDetectorRef.markForCheck()})),this._ngZone.runOutsideAngular((function(){t._doCheckSubject.pipe(Object(x.a)(10),Object(y.a)(t._destroyed)).subscribe((function(){return t.updateContentMargins()}))}))}},{key:"ngOnDestroy",value:function(){this._contentMarginChanges.complete(),this._doCheckSubject.complete(),this._drawers.destroy(),this._destroyed.next(),this._destroyed.complete()}},{key:"open",value:function(){this._drawers.forEach((function(t){return t.open()}))}},{key:"close",value:function(){this._drawers.forEach((function(t){return t.close()}))}},{key:"updateContentMargins",value:function(){var t=this,e=0,n=0;if(this._left&&this._left.opened)if("side"==this._left.mode)e+=this._left._getWidth();else if("push"==this._left.mode){var i=this._left._getWidth();e+=i,n-=i}if(this._right&&this._right.opened)if("side"==this._right.mode)n+=this._right._getWidth();else if("push"==this._right.mode){var a=this._right._getWidth();n+=a,e-=a}n=n||null,(e=e||null)===this._contentMargins.left&&n===this._contentMargins.right||(this._contentMargins={left:e,right:n},this._ngZone.run((function(){return t._contentMarginChanges.next(t._contentMargins)})))}},{key:"ngDoCheck",value:function(){var t=this;this._autosize&&this._isPushed()&&this._ngZone.runOutsideAngular((function(){return t._doCheckSubject.next()}))}},{key:"_watchDrawerToggle",value:function(t){var e=this;t._animationStarted.pipe(Object(h.a)((function(t){return t.fromState!==t.toState})),Object(y.a)(this._drawers.changes)).subscribe((function(t){"open-instant"!==t.toState&&"NoopAnimations"!==e._animationMode&&e._element.nativeElement.classList.add("mat-drawer-transition"),e.updateContentMargins(),e._changeDetectorRef.markForCheck()})),"side"!==t.mode&&t.openedChange.pipe(Object(y.a)(this._drawers.changes)).subscribe((function(){return e._setContainerClass(t.opened)}))}},{key:"_watchDrawerPosition",value:function(t){var e=this;t&&t.onPositionChanged.pipe(Object(y.a)(this._drawers.changes)).subscribe((function(){e._ngZone.onMicrotaskEmpty.pipe(Object(C.a)(1)).subscribe((function(){e._validateDrawers()}))}))}},{key:"_watchDrawerMode",value:function(t){var e=this;t&&t._modeChanged.pipe(Object(y.a)(Object(f.a)(this._drawers.changes,this._destroyed))).subscribe((function(){e.updateContentMargins(),e._changeDetectorRef.markForCheck()}))}},{key:"_setContainerClass",value:function(t){var e=this._element.nativeElement.classList,n="mat-drawer-container-has-open";t?e.add(n):e.remove(n)}},{key:"_validateDrawers",value:function(){var t=this;this._start=this._end=null,this._drawers.forEach((function(e){"end"==e.position?t._end=e:t._start=e})),this._right=this._left=null,this._dir&&"rtl"===this._dir.value?(this._left=this._end,this._right=this._start):(this._left=this._start,this._right=this._end)}},{key:"_isPushed",value:function(){return this._isDrawerOpen(this._start)&&"over"!=this._start.mode||this._isDrawerOpen(this._end)&&"over"!=this._end.mode}},{key:"_onBackdropClicked",value:function(){this.backdropClick.emit(),this._closeModalDrawersViaBackdrop()}},{key:"_closeModalDrawersViaBackdrop",value:function(){var t=this;[this._start,this._end].filter((function(e){return e&&!e.disableClose&&t._canHaveBackdrop(e)})).forEach((function(t){return t._closeViaBackdropClick()}))}},{key:"_isShowingBackdrop",value:function(){return this._isDrawerOpen(this._start)&&this._canHaveBackdrop(this._start)||this._isDrawerOpen(this._end)&&this._canHaveBackdrop(this._end)}},{key:"_canHaveBackdrop",value:function(t){return"side"!==t.mode||!!this._backdropOverride}},{key:"_isDrawerOpen",value:function(t){return null!=t&&t.opened}},{key:"start",get:function(){return this._start}},{key:"end",get:function(){return this._end}},{key:"autosize",get:function(){return this._autosize},set:function(t){this._autosize=Object(c.c)(t)}},{key:"hasBackdrop",get:function(){return null==this._backdropOverride?!this._start||"side"!==this._start.mode||!this._end||"side"!==this._end.mode:this._backdropOverride},set:function(t){this._backdropOverride=null==t?null:Object(c.c)(t)}},{key:"scrollable",get:function(){return this._userContent||this._content}}]),t}()).\u0275fac=function(t){return new(t||E)(o.Qb(M.c,8),o.Qb(o.l),o.Qb(o.C),o.Qb(o.h),o.Qb(a.h),o.Qb(G),o.Qb(D.a,8))},E.\u0275cmp=o.Kb({type:E,selectors:[["mat-drawer-container"]],contentQueries:function(t,e,n){var i;1&t&&(o.Jb(n,X,!0),o.Jb(n,q,!0)),2&t&&(o.yc(i=o.ec())&&(e._content=i.first),o.yc(i=o.ec())&&(e._allDrawers=i))},viewQuery:function(t,e){var n;1&t&&o.Xc(X,!0),2&t&&o.yc(n=o.ec())&&(e._userContent=n.first)},hostAttrs:[1,"mat-drawer-container"],hostVars:2,hostBindings:function(t,e){2&t&&o.Ib("mat-drawer-container-explicit-backdrop",e._backdropOverride)},inputs:{autosize:"autosize",hasBackdrop:"hasBackdrop"},outputs:{backdropClick:"backdropClick"},exportAs:["matDrawerContainer"],features:[o.Cb([{provide:$,useExisting:E}])],ngContentSelectors:V,decls:4,vars:2,consts:[["class","mat-drawer-backdrop",3,"mat-drawer-shown","click",4,"ngIf"],[4,"ngIf"],[1,"mat-drawer-backdrop",3,"click"]],template:function(t,e){1&t&&(o.nc(R),o.Oc(0,I,1,2,"div",0),o.mc(1),o.mc(2,1),o.Oc(3,P,2,0,"mat-drawer-content",1)),2&t&&(o.oc("ngIf",e.hasBackdrop),o.Db(3),o.oc("ngIf",!e._content))},directives:[r.t,X],styles:[U],encapsulation:2,changeDetection:0}),E),Y=((T=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a,r,o){return _classCallCheck(this,n),e.call(this,t,i,a,r,o)}return n}(X)).\u0275fac=function(t){return new(t||T)(o.Qb(o.h),o.Qb(Object(o.X)((function(){return tt}))),o.Qb(o.l),o.Qb(a.f),o.Qb(o.C))},T.\u0275cmp=o.Kb({type:T,selectors:[["mat-sidenav-content"]],hostAttrs:[1,"mat-drawer-content","mat-sidenav-content"],hostVars:4,hostBindings:function(t,e){2&t&&o.Lc("margin-left",e._container._contentMargins.left,"px")("margin-right",e._container._contentMargins.right,"px")},features:[o.Ab],ngContentSelectors:S,decls:1,vars:0,template:function(t,e){1&t&&(o.nc(),o.mc(0))},encapsulation:2,changeDetection:0}),T),J=((W=function(t){_inherits(n,t);var e=_createSuper(n);function n(){var t;return _classCallCheck(this,n),(t=e.apply(this,arguments))._fixedInViewport=!1,t._fixedTopGap=0,t._fixedBottomGap=0,t}return _createClass(n,[{key:"fixedInViewport",get:function(){return this._fixedInViewport},set:function(t){this._fixedInViewport=Object(c.c)(t)}},{key:"fixedTopGap",get:function(){return this._fixedTopGap},set:function(t){this._fixedTopGap=Object(c.f)(t)}},{key:"fixedBottomGap",get:function(){return this._fixedBottomGap},set:function(t){this._fixedBottomGap=Object(c.f)(t)}}]),n}(q)).\u0275fac=function(t){return Z(t||W)},W.\u0275cmp=o.Kb({type:W,selectors:[["mat-sidenav"]],hostAttrs:["tabIndex","-1",1,"mat-drawer","mat-sidenav"],hostVars:17,hostBindings:function(t,e){2&t&&(o.Eb("align",null),o.Lc("top",e.fixedInViewport?e.fixedTopGap:null,"px")("bottom",e.fixedInViewport?e.fixedBottomGap:null,"px"),o.Ib("mat-drawer-end","end"===e.position)("mat-drawer-over","over"===e.mode)("mat-drawer-push","push"===e.mode)("mat-drawer-side","side"===e.mode)("mat-drawer-opened",e.opened)("mat-sidenav-fixed",e.fixedInViewport))},inputs:{fixedInViewport:"fixedInViewport",fixedTopGap:"fixedTopGap",fixedBottomGap:"fixedBottomGap"},exportAs:["matSidenav"],features:[o.Ab],ngContentSelectors:S,decls:2,vars:0,consts:[[1,"mat-drawer-inner-container"]],template:function(t,e){1&t&&(o.nc(),o.Wb(0,"div",0),o.mc(1),o.Vb())},encapsulation:2,data:{animation:[H.transformDrawer]},changeDetection:0}),W),Z=o.Yb(J),tt=((Q=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return n}(K)).\u0275fac=function(t){return et(t||Q)},Q.\u0275cmp=o.Kb({type:Q,selectors:[["mat-sidenav-container"]],contentQueries:function(t,e,n){var i;1&t&&(o.Jb(n,Y,!0),o.Jb(n,J,!0)),2&t&&(o.yc(i=o.ec())&&(e._content=i.first),o.yc(i=o.ec())&&(e._allDrawers=i))},hostAttrs:[1,"mat-drawer-container","mat-sidenav-container"],hostVars:2,hostBindings:function(t,e){2&t&&o.Ib("mat-drawer-container-explicit-backdrop",e._backdropOverride)},exportAs:["matSidenavContainer"],features:[o.Cb([{provide:$,useExisting:Q}]),o.Ab],ngContentSelectors:B,decls:4,vars:2,consts:[["class","mat-drawer-backdrop",3,"mat-drawer-shown","click",4,"ngIf"],["cdkScrollable","",4,"ngIf"],[1,"mat-drawer-backdrop",3,"click"],["cdkScrollable",""]],template:function(t,e){1&t&&(o.nc(z),o.Oc(0,j,1,2,"div",0),o.mc(1),o.mc(2,1),o.Oc(3,A,2,0,"mat-sidenav-content",1)),2&t&&(o.oc("ngIf",e.hasBackdrop),o.Db(3),o.oc("ngIf",!e._content))},directives:[r.t,Y,a.b],styles:[U],encapsulation:2,changeDetection:0}),Q),et=o.Yb(tt),nt=((N=function t(){_classCallCheck(this,t)}).\u0275mod=o.Ob({type:N}),N.\u0275inj=o.Nb({factory:function(t){return new(t||N)},imports:[[r.c,s.k,i.b,a.c],a.c,s.k]}),N)},XoHu:function(t,e,n){"use strict";function i(t){return null!==t&&"object"==typeof t}n.d(e,"a",(function(){return i}))},XxY3:function(t,e){!function(t,e,n,i){t.DocEditor=function(i,r,o){var s=this,c=r||{};!function t(e,n){for(var i in n)n.hasOwnProperty(i)&&(void 0===e[i]?e[i]=n[i]:"object"==typeof e[i]&&"object"==typeof n[i]&&t(e[i],n[i]));return e}(c,t.DocEditor.defaultConfig),c.editorConfig.canUseHistory=c.events&&!!c.events.onRequestHistory,c.editorConfig.canHistoryClose=c.events&&!!c.events.onRequestHistoryClose,c.editorConfig.canHistoryRestore=c.events&&!!c.events.onRequestRestore,c.editorConfig.canSendEmailAddresses=c.events&&!!c.events.onRequestEmailAddresses,c.editorConfig.canRequestEditRights=c.events&&!!c.events.onRequestEditRights,c.editorConfig.canRequestClose=c.events&&!!c.events.onRequestClose,c.editorConfig.canRename=c.events&&!!c.events.onRequestRename,c.editorConfig.canMakeActionLink=c.events&&!!c.events.onMakeActionLink,c.editorConfig.canRequestUsers=c.events&&!!c.events.onRequestUsers,c.editorConfig.canRequestSendNotify=c.events&&!!c.events.onRequestSendNotify,c.editorConfig.mergeFolderUrl=c.editorConfig.mergeFolderUrl||c.editorConfig.saveAsUrl,c.editorConfig.canRequestSaveAs=c.events&&!!c.events.onRequestSaveAs,c.editorConfig.canRequestInsertImage=c.events&&!!c.events.onRequestInsertImage,c.editorConfig.canRequestMailMergeRecipients=c.events&&!!c.events.onRequestMailMergeRecipients,c.editorConfig.canRequestCompareFile=c.events&&!!c.events.onRequestCompareFile,c.editorConfig.canRequestSharingSettings=c.events&&!!c.events.onRequestSharingSettings,c.editorConfig.canRequestCreateNew=c.events&&!!c.events.onRequestCreateNew,c.frameEditorId=i,c.parentOrigin=e.location.origin,c.onlyOfficeIp=o;var l,u=function(t){C(t)},d=function(){e.addEventListener?e.addEventListener("mouseup",u,!1):e.attachEvent&&e.attachEvent("onmouseup",u)},f=function(){e.removeEventListener?e.removeEventListener("mouseup",u,!1):e.detachEvent&&e.detachEvent("onmouseup",u)};(l=/[\?\&]placement=(\w+)&?/.exec(e.location.search))&&l.length&&"desktop"==l[1]&&(c.editorConfig.targetApp=l[1],c.editorConfig.customization||(c.editorConfig.customization={}),c.editorConfig.customization.about=!1,c.editorConfig.customization.compactHeader=!1);var h,p=n.getElementById(i);if(p&&function(){if(c.document){if(!c.document.url||("string"!=typeof c.document.fileType||""==c.document.fileType)&&("string"!=typeof c.documentType||""==c.documentType))return e.alert("One or more required parameter for the config object is not set"),!1;var t;if("string"==typeof c.documentType&&""!=c.documentType){if(!(t={text:"docx","text-pdf":"pdf",spreadsheet:"xlsx",presentation:"pptx"}[c.documentType.toLowerCase()]))return e.alert('The "documentType" parameter for the config object is invalid. Please correct it.'),!1;"string"==typeof c.document.fileType&&""!=c.document.fileType||(c.document.fileType=t)}if("string"==typeof c.document.fileType&&""!=c.document.fileType){var n;if(c.document.fileType=c.document.fileType.toLowerCase(),!(n=/^(?:(xls|xlsx|ods|csv|xlst|xlsy|gsheet|xlsm|xlt|xltm|xltx|fods|ots)|(pps|ppsx|ppt|pptx|odp|pptt|ppty|gslides|pot|potm|potx|ppsm|pptm|fodp|otp)|(doc|docx|doct|odt|gdoc|txt|rtf|pdf|mht|htm|html|epub|djvu|xps|docm|dot|dotm|dotx|fodt|ott))$/.exec(c.document.fileType)))return e.alert('The "document.fileType" parameter for the config object is invalid. Please correct it.'),!1;"string"==typeof c.documentType&&""!=c.documentType||("string"==typeof n[1]?c.documentType="spreadsheet":"string"==typeof n[2]?c.documentType="presentation":"string"==typeof n[3]&&(c.documentType="text"))}if((n=/^(?:(pdf|djvu|xps))$/.exec(c.document.fileType))&&"string"==typeof n[1]&&(c.editorConfig.canUseHistory=!1),c.document.title&&""!=c.document.title||(c.document.title="Unnamed."+c.document.fileType),c.document.key){if("string"!=typeof c.document.key)return e.alert('The "document.key" parameter for the config object must be string. Please correct it.'),!1}else c.document.key="xxxxxxxxxxxxxxxxxxxx".replace(/[x]/g,(function(t){return(16*Math.random()|0).toString(16)}));c.document.token=c.token}return!0}()){if((h=function(t){var e=n.createElement("iframe");return e.src=function(t){var e=("undefined"==typeof extensionParams||null==extensionParams.url?null:extensionParams.url+"apps/")||function(t){return t.onlyOfficeIp+"/web-apps/apps/"}(t),n={text:"documenteditor","text-pdf":"documenteditor",spreadsheet:"spreadsheeteditor",presentation:"presentationeditor"},i=n.text;if("string"==typeof t.documentType)i=n[t.documentType.toLowerCase()];else if(t.document&&"string"==typeof t.document.fileType){var a=/^(?:(xls|xlsx|ods|csv|xlst|xlsy|gsheet|xlsm|xlt|xltm|xltx|fods|ots)|(pps|ppsx|ppt|pptx|odp|pptt|ppty|gslides|pot|potm|potx|ppsm|pptm|fodp|otp))$/.exec(t.document.fileType);a&&("string"==typeof a[1]?i=n.spreadsheet:"string"==typeof a[2]&&(i=n.presentation))}var r=navigator.userAgent.toLowerCase(),o=function(t){return t.test(r)},s=!o(/opera/)&&(o(/msie/)||o(/trident/)||o(/edge/)),c=!s&&o(/\bchrome\b/),l=!s&&!c&&o(/safari/)&&navigator.maxTouchPoints>0;e+=i+"/";var u="/index.html";if(t.editorConfig){var d=t.editorConfig.customization;"object"==typeof d&&(d.toolbarNoTabs||"desktop"!==t.editorConfig.targetApp&&(d.loaderName||d.loaderLogo))?u="/index_loader.html":"editdiagram"!=t.editorConfig.mode&&"editmerge"!=t.editorConfig.mode||(u="/index_internal.html")}return(e+="mobile"===t.type||l?"mobile":"embedded"===t.type?"embed":"main")+u}(t)+function(t){var e="?_dc=6.0.2-5";return t.editorConfig&&t.editorConfig.lang&&(e+="&lang="+t.editorConfig.lang),t.editorConfig&&"desktop"!==t.editorConfig.targetApp&&("object"==typeof t.editorConfig.customization&&t.editorConfig.customization.loaderName?"none"!==t.editorConfig.customization.loaderName&&(e+="&customer="+t.editorConfig.customization.loaderName):e+="&customer=ONLYOFFICE","object"==typeof t.editorConfig.customization&&t.editorConfig.customization.loaderLogo?""!==t.editorConfig.customization.loaderLogo&&(e+="&logo="+t.editorConfig.customization.loaderLogo):"object"==typeof t.editorConfig.customization&&t.editorConfig.customization.logo&&("embedded"==t.type&&t.editorConfig.customization.logo.imageEmbedded?e+="&headerlogo="+t.editorConfig.customization.logo.imageEmbedded:"embedded"!=t.type&&t.editorConfig.customization.logo.image&&(e+="&headerlogo="+t.editorConfig.customization.logo.image))),!t.editorConfig||"editdiagram"!=t.editorConfig.mode&&"editmerge"!=t.editorConfig.mode||(e+="&internal=true"),t.frameEditorId&&(e+="&frameEditorId="+t.frameEditorId),(t.editorConfig&&"view"==t.editorConfig.mode||t.document&&t.document.permissions&&!1===t.document.permissions.edit&&!t.document.permissions.review)&&(e+="&mode=view"),t.editorConfig&&t.editorConfig.customization&&t.editorConfig.customization.compactHeader&&(e+="&compact=true"),t.editorConfig&&t.editorConfig.customization&&!1===t.editorConfig.customization.toolbar&&(e+="&toolbar=false"),t.parentOrigin&&(e+="&parentOrigin="+t.parentOrigin),e}(t),e.width=t.width,e.height=t.height,e.align="top",e.frameBorder=0,e.name="frameEditor",e.allowFullscreen=!0,e.setAttribute("allowfullscreen",""),e.setAttribute("onmousewheel",""),e.setAttribute("allow","autoplay"),"mobile"==t.type&&(e.style.position="fixed",e.style.overflow="hidden",n.body.style.overscrollBehaviorY="contain"),e}(c)).src){var b=h.src.split("/");this.frameOrigin=b[0]+"//"+b[2]}p.parentNode&&p.parentNode.replaceChild(h,p);var g=new a((function(t){if(t)if("onExternalPluginMessage"===t.type)m(t);else if(t.frameEditorId==i){var e=(c.events||{})[t.event];"onRequestEditRights"!==t.event||e?"onInternalMessage"===t.event&&t.data&&"localstorage"==t.data.type?function(t){if("get"==t.cmd){if(t.keys&&t.keys.length){var e=t.keys.split(","),n=e[0];for(i=0;++i<e.length;)n+="|"+e[i];for(i in n=new RegExp(n),a={},localStorage)n.test(i)&&(a[i]=localStorage[i])}else a=localStorage;m({command:"internalCommand",data:{type:"localstorage",keys:a}})}else if("set"==t.cmd){var i,a=t.keys;for(i in a)localStorage.setItem(i,a[i])}}(t.data.data):("onAppReady"===t.event&&("mobile"===c.type&&(n.body.onfocus=function(t){setTimeout((function(){h.contentWindow.focus(),m({command:"resetFocus",data:{}})}),10)}),d(),c.editorConfig&&v(c.editorConfig),c.document&&y(c.document)),e&&"function"==typeof e&&e.call(s,{target:s,data:t.data})):_(!1,"handler isn't defined")}}),this)}var m=function(t){var n;h&&h.contentWindow&&(n=h.contentWindow)&&n.postMessage&&e.JSON&&n.postMessage(e.JSON.stringify(t),"*")},v=function(t){m({command:"init",data:{config:t}})},y=function(t){m({command:"openDocument",data:{doc:t}})},_=function(t,e){m({command:"applyEditRights",data:{allowed:t,message:e}})},C=function(t){var e=h.getBoundingClientRect();m({command:"processMouse",data:{type:t.type,x:t.x-e.left,y:t.y-e.top,event:t}})};return{showMessage:function(t,e){m({command:"showMessage",data:{msg:e=e||t}})},processSaveResult:function(t,e){m({command:"processSaveResult",data:{result:t,message:e}})},processRightsChange:function(t,e){m({command:"processRightsChange",data:{enabled:t,message:e}})},denyEditingRights:function(t){m({command:"processRightsChange",data:{enabled:!1,message:t}})},refreshHistory:function(t,e){m({command:"refreshHistory",data:{data:t,message:e}})},setHistoryData:function(t,e){m({command:"setHistoryData",data:{data:t,message:e}})},setEmailAddresses:function(t){m({command:"setEmailAddresses",data:{data:t}})},setActionLink:function(t){m({command:"setActionLink",data:{url:t}})},processMailMerge:function(t,e){m({command:"processMailMerge",data:{enabled:t,message:e}})},downloadAs:function(t){m({command:"downloadAs",data:t})},serviceCommand:function(t,e){m({command:"internalCommand",data:{command:t,data:e}})},attachMouseEvents:d,detachMouseEvents:f,destroyEditor:function(t){var e=n.createElement("div");e.setAttribute("id",i),h&&(g&&g.unbindEvents(),f(),h.parentNode&&h.parentNode.replaceChild(e,h))},setUsers:function(t){m({command:"setUsers",data:t})},showSharingSettings:function(t){m({command:"showSharingSettings",data:t})},setSharingSettings:function(t){m({command:"setSharingSettings",data:t})},insertImage:function(t){m({command:"insertImage",data:t})},setMailMergeRecipients:function(t){m({command:"setMailMergeRecipients",data:t})},setRevisedFile:function(t){m({command:"setRevisedFile",data:t})}}},t.DocEditor.defaultConfig={type:"desktop",width:"100%",height:"100%",editorConfig:{lang:"en",canCoAuthoring:!0,customization:{about:!0,feedback:!1}}},t.DocEditor.version=function(){return"6.0.2"};var a=function(t,n){var i=t,a=n||e,r=function(t){o(t)},o=function(t){if(t&&e.JSON&&a.frameOrigin==t.origin)try{t=e.JSON.parse(t.data),i&&i.call(a,t)}catch(n){}};return(function(){e.addEventListener?e.addEventListener("message",r,!1):e.attachEvent&&e.attachEvent("onmessage",r)}).call(this),{unbindEvents:function(){e.removeEventListener?e.removeEventListener("message",r,!1):e.detachEvent&&e.detachEvent("onmessage",r)}}}}(window.DocsAPI=window.DocsAPI||{},window,document)},Y7HM:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n("DH7j");function a(t){return!Object(i.a)(t)&&t-parseFloat(t)+1>=0}},Ylt2:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var a;return _classCallCheck(this,n),(a=e.call(this)).subject=t,a.subscriber=i,a.closed=!1,a}return _createClass(n,[{key:"unsubscribe",value:function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}}}]),n}(n("quSY").a)},aEDk:function(t,e,n){"use strict";n.d(e,"a",(function(){return u})),n.d(e,"b",(function(){return C})),n.d(e,"c",(function(){return k})),n.d(e,"d",(function(){return M})),n.d(e,"e",(function(){return f})),n.d(e,"f",(function(){return x})),n.d(e,"g",(function(){return I})),n.d(e,"h",(function(){return D})),n.d(e,"i",(function(){return W})),n.d(e,"j",(function(){return R})),n.d(e,"k",(function(){return h})),n.d(e,"l",(function(){return s})),n.d(e,"m",(function(){return S})),n.d(e,"n",(function(){return p})),n.d(e,"o",(function(){return b})),n.d(e,"p",(function(){return g})),n.d(e,"q",(function(){return _})),n.d(e,"r",(function(){return m})),n.d(e,"s",(function(){return w})),n.d(e,"t",(function(){return v})),n.d(e,"u",(function(){return y})),n.d(e,"v",(function(){return d})),n.d(e,"w",(function(){return O})),n.d(e,"x",(function(){return P}));var i=n("fXoL");function a(t){return"string"==typeof t}function r(t){return-1!==["a","e","i","o","u"].indexOf(t)}function o(t){var e=_toArray(t.split(/\s/g)),n=e[0],i=e.slice(1);return[n.toLowerCase().split(/(?=['|-])/g).map((function(t){return t.indexOf("-")+t.indexOf("'")>-2?t.slice(0,2).toUpperCase()+t.slice(2):t.slice(0,1).toUpperCase()+t.slice(1)})).join("")].concat(_toConsumableArray(i)).join(" ")}var s=function(){var t=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"transform",value:function(t){return a(t)?t.split("").reverse().join(""):Array.isArray(t)?t.slice().reverse():t}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=i.Pb({name:"reverse",type:t,pure:!0}),t}(),c=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=i.Ob({type:t}),t.\u0275inj=i.Nb({factory:function(e){return new(e||t)},imports:[[]]}),t}(),l=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=i.Ob({type:t}),t.\u0275inj=i.Nb({factory:function(e){return new(e||t)},imports:[[]]}),t}(),u=function(){var t=function(){function t(){_classCallCheck(this,t),this.irregularMap={herb:"an",honor:"an",honorable:"an",hour:"an",mba:"an",msc:"an","m.sc.":"an",unicorn:"a"}}return _createClass(t,[{key:"transform",value:function(t){if(t&&""!==t){var e=t.trim().split(" ")[0];return this.irregularMap[e.toLocaleLowerCase()]?"".concat(this.irregularMap[e.toLocaleLowerCase()]," ").concat(t):r(t[0])?"an "+t:"a "+t}return""}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=i.Pb({name:"aOrAn",type:t,pure:!0}),t}(),d=function(){var t=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"transform",value:function(t){return a(t)?t.split(" ").map((function(t){return o(t)})).join(" "):t}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=i.Pb({name:"ucwords",type:t,pure:!0}),t}(),f=function(){var t=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"transform",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"\\s";return a(t)?t.replace(new RegExp("^[".concat(e,"]+")),""):t}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=i.Pb({name:"ltrim",type:t,pure:!0}),t}(),h=function(){var t=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"transform",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(e<=0)throw new RangeError;return 1===e?t:this.repeat(t,e-1,n)}},{key:"repeat",value:function(t,e,n){return a(t)?0===e?t:t+n+this.repeat(t,e-1,n):t}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=i.Pb({name:"repeat",type:t,pure:!0}),t}(),p=function(){var t=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"transform",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"\\s";return a(t)?t.replace(new RegExp("[".concat(e,"]+$")),""):t}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=i.Pb({name:"rtrim",type:t,pure:!0}),t}(),b=function(){var t=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"transform",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return a(t)?t.replace(/\{(\d+)}/g,(function(t,n){return void 0===e[n]?t:e[n]})):t}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=i.Pb({name:"scan",type:t,pure:!0}),t}(),g=function(){var t=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"transform",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!a(t))return t;if(t.length>e){if(i)return t.slice(0,e)+n;if(~t.indexOf(" ",e))return t.slice(0,t.indexOf(" ",e))+n}return t}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=i.Pb({name:"shorten",type:t,pure:!0}),t}(),m=function(){var t=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"transform",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return t.replace(n.length>0?new RegExp("<(?!/?(".concat(n.join("|"),")s*/?)[^>]+>"),"g"):/<(?:.|\s)*?>/g,"")}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=i.Pb({name:"stripTags",type:t,pure:!0}),t}(),v=function(){var t=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"transform",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"\\s";return a(t)?t.replace(new RegExp("^[".concat(e,"]+|[").concat(e,"]+$"),"g"),""):t}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=i.Pb({name:"trim",type:t,pure:!0}),t}(),y=function(){var t=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"transform",value:function(t){return a(t)?o(t):t}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=i.Pb({name:"ucfirst",type:t,pure:!0}),t}(),_=function(){var t=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"transform",value:function(t){return a(t)?t.toLowerCase().trim().replace(/[^\w\-]+/g," ").replace(/\s+/g,"-"):t}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=i.Pb({name:"slugify",type:t,pure:!0}),t}(),C=function(){var t=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"transform",value:function(t){return a(t)?t.toLowerCase().split(/[-_\s]/g).filter((function(t){return!!t})).map((function(t,e){return e?t.slice(0,1).toUpperCase()+t.slice(1):t})).join(""):t}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=i.Pb({name:"camelize",type:t,pure:!0}),t}(),k=function(){var t=function(){function t(){_classCallCheck(this,t),this.latinMap={"\xc1":"A","\u0102":"A","\u1eae":"A","\u1eb6":"A","\u1eb0":"A","\u1eb2":"A","\u1eb4":"A","\u01cd":"A","\xc2":"A","\u1ea4":"A","\u1eac":"A","\u1ea6":"A","\u1ea8":"A","\u1eaa":"A","\xc4":"A","\u01de":"A","\u0226":"A","\u01e0":"A","\u1ea0":"A","\u0200":"A","\xc0":"A","\u1ea2":"A","\u0202":"A","\u0100":"A","\u0104":"A","\xc5":"A","\u01fa":"A","\u1e00":"A","\u023a":"A","\xc3":"A","\ua732":"AA","\xc6":"AE","\u01fc":"AE","\u01e2":"AE","\ua734":"AO","\ua736":"AU","\ua738":"AV","\ua73a":"AV","\ua73c":"AY","\u1e02":"B","\u1e04":"B","\u0181":"B","\u1e06":"B","\u0243":"B","\u0182":"B","\u0106":"C","\u010c":"C","\xc7":"C","\u1e08":"C","\u0108":"C","\u010a":"C","\u0187":"C","\u023b":"C","\u010e":"D","\u1e10":"D","\u1e12":"D","\u1e0a":"D","\u1e0c":"D","\u018a":"D","\u1e0e":"D","\u01f2":"D","\u01c5":"D","\u0110":"D","\u018b":"D","\u01f1":"DZ","\u01c4":"DZ","\xc9":"E","\u0114":"E","\u011a":"E","\u0228":"E","\u1e1c":"E","\xca":"E","\u1ebe":"E","\u1ec6":"E","\u1ec0":"E","\u1ec2":"E","\u1ec4":"E","\u1e18":"E","\xcb":"E","\u0116":"E","\u1eb8":"E","\u0204":"E","\xc8":"E","\u1eba":"E","\u0206":"E","\u0112":"E","\u1e16":"E","\u1e14":"E","\u0118":"E","\u0246":"E","\u1ebc":"E","\u1e1a":"E","\ua76a":"ET","\u1e1e":"F","\u0191":"F","\u01f4":"G","\u011e":"G","\u01e6":"G","\u0122":"G","\u011c":"G","\u0120":"G","\u0193":"G","\u1e20":"G","\u01e4":"G","\u1e2a":"H","\u021e":"H","\u1e28":"H","\u0124":"H","\u2c67":"H","\u1e26":"H","\u1e22":"H","\u1e24":"H","\u0126":"H","\xcd":"I","\u012c":"I","\u01cf":"I","\xce":"I","\xcf":"I","\u1e2e":"I","\u0130":"I","\u1eca":"I","\u0208":"I","\xcc":"I","\u1ec8":"I","\u020a":"I","\u012a":"I","\u012e":"I","\u0197":"I","\u0128":"I","\u1e2c":"I","\ua779":"D","\ua77b":"F","\ua77d":"G","\ua782":"R","\ua784":"S","\ua786":"T","\ua76c":"IS","\u0134":"J","\u0248":"J","\u1e30":"K","\u01e8":"K","\u0136":"K","\u2c69":"K","\ua742":"K","\u1e32":"K","\u0198":"K","\u1e34":"K","\ua740":"K","\ua744":"K","\u0139":"L","\u023d":"L","\u013d":"L","\u013b":"L","\u1e3c":"L","\u1e36":"L","\u1e38":"L","\u2c60":"L","\ua748":"L","\u1e3a":"L","\u013f":"L","\u2c62":"L","\u01c8":"L","\u0141":"L","\u01c7":"LJ","\u1e3e":"M","\u1e40":"M","\u1e42":"M","\u2c6e":"M","\u0143":"N","\u0147":"N","\u0145":"N","\u1e4a":"N","\u1e44":"N","\u1e46":"N","\u01f8":"N","\u019d":"N","\u1e48":"N","\u0220":"N","\u01cb":"N","\xd1":"N","\u01ca":"NJ","\xd3":"O","\u014e":"O","\u01d1":"O","\xd4":"O","\u1ed0":"O","\u1ed8":"O","\u1ed2":"O","\u1ed4":"O","\u1ed6":"O","\xd6":"O","\u022a":"O","\u022e":"O","\u0230":"O","\u1ecc":"O","\u0150":"O","\u020c":"O","\xd2":"O","\u1ece":"O","\u01a0":"O","\u1eda":"O","\u1ee2":"O","\u1edc":"O","\u1ede":"O","\u1ee0":"O","\u020e":"O","\ua74a":"O","\ua74c":"O","\u014c":"O","\u1e52":"O","\u1e50":"O","\u019f":"O","\u01ea":"O","\u01ec":"O","\xd8":"O","\u01fe":"O","\xd5":"O","\u1e4c":"O","\u1e4e":"O","\u022c":"O","\u01a2":"OI","\ua74e":"OO","\u0190":"E","\u0186":"O","\u0222":"OU","\u1e54":"P","\u1e56":"P","\ua752":"P","\u01a4":"P","\ua754":"P","\u2c63":"P","\ua750":"P","\ua758":"Q","\ua756":"Q","\u0154":"R","\u0158":"R","\u0156":"R","\u1e58":"R","\u1e5a":"R","\u1e5c":"R","\u0210":"R","\u0212":"R","\u1e5e":"R","\u024c":"R","\u2c64":"R","\ua73e":"C","\u018e":"E","\u015a":"S","\u1e64":"S","\u0160":"S","\u1e66":"S","\u015e":"S","\u015c":"S","\u0218":"S","\u1e60":"S","\u1e62":"S","\u1e68":"S","\u1e9e":"SS","\u0164":"T","\u0162":"T","\u1e70":"T","\u021a":"T","\u023e":"T","\u1e6a":"T","\u1e6c":"T","\u01ac":"T","\u1e6e":"T","\u01ae":"T","\u0166":"T","\u2c6f":"A","\ua780":"L","\u019c":"M","\u0245":"V","\ua728":"TZ","\xda":"U","\u016c":"U","\u01d3":"U","\xdb":"U","\u1e76":"U","\xdc":"U","\u01d7":"U","\u01d9":"U","\u01db":"U","\u01d5":"U","\u1e72":"U","\u1ee4":"U","\u0170":"U","\u0214":"U","\xd9":"U","\u1ee6":"U","\u01af":"U","\u1ee8":"U","\u1ef0":"U","\u1eea":"U","\u1eec":"U","\u1eee":"U","\u0216":"U","\u016a":"U","\u1e7a":"U","\u0172":"U","\u016e":"U","\u0168":"U","\u1e78":"U","\u1e74":"U","\ua75e":"V","\u1e7e":"V","\u01b2":"V","\u1e7c":"V","\ua760":"VY","\u1e82":"W","\u0174":"W","\u1e84":"W","\u1e86":"W","\u1e88":"W","\u1e80":"W","\u2c72":"W","\u1e8c":"X","\u1e8a":"X","\xdd":"Y","\u0176":"Y","\u0178":"Y","\u1e8e":"Y","\u1ef4":"Y","\u1ef2":"Y","\u01b3":"Y","\u1ef6":"Y","\u1efe":"Y","\u0232":"Y","\u024e":"Y","\u1ef8":"Y","\u0179":"Z","\u017d":"Z","\u1e90":"Z","\u2c6b":"Z","\u017b":"Z","\u1e92":"Z","\u0224":"Z","\u1e94":"Z","\u01b5":"Z","\u0132":"IJ","\u0152":"OE","\u1d00":"A","\u1d01":"AE","\u0299":"B","\u1d03":"B","\u1d04":"C","\u1d05":"D","\u1d07":"E","\ua730":"F","\u0262":"G","\u029b":"G","\u029c":"H","\u026a":"I","\u0281":"R","\u1d0a":"J","\u1d0b":"K","\u029f":"L","\u1d0c":"L","\u1d0d":"M","\u0274":"N","\u1d0f":"O","\u0276":"OE","\u1d10":"O","\u1d15":"OU","\u1d18":"P","\u0280":"R","\u1d0e":"N","\u1d19":"R","\ua731":"S","\u1d1b":"T","\u2c7b":"E","\u1d1a":"R","\u1d1c":"U","\u1d20":"V","\u1d21":"W","\u028f":"Y","\u1d22":"Z","\xe1":"a","\u0103":"a","\u1eaf":"a","\u1eb7":"a","\u1eb1":"a","\u1eb3":"a","\u1eb5":"a","\u01ce":"a","\xe2":"a","\u1ea5":"a","\u1ead":"a","\u1ea7":"a","\u1ea9":"a","\u1eab":"a","\xe4":"a","\u01df":"a","\u0227":"a","\u01e1":"a","\u1ea1":"a","\u0201":"a","\xe0":"a","\u1ea3":"a","\u0203":"a","\u0101":"a","\u0105":"a","\u1d8f":"a","\u1e9a":"a","\xe5":"a","\u01fb":"a","\u1e01":"a","\u2c65":"a","\xe3":"a","\ua733":"aa","\xe6":"ae","\u01fd":"ae","\u01e3":"ae","\ua735":"ao","\ua737":"au","\ua739":"av","\ua73b":"av","\ua73d":"ay","\u1e03":"b","\u1e05":"b","\u0253":"b","\u1e07":"b","\u1d6c":"b","\u1d80":"b","\u0180":"b","\u0183":"b","\u0275":"o","\u0107":"c","\u010d":"c","\xe7":"c","\u1e09":"c","\u0109":"c","\u0255":"c","\u010b":"c","\u0188":"c","\u023c":"c","\u010f":"d","\u1e11":"d","\u1e13":"d","\u0221":"d","\u1e0b":"d","\u1e0d":"d","\u0257":"d","\u1d91":"d","\u1e0f":"d","\u1d6d":"d","\u1d81":"d","\u0111":"d","\u0256":"d","\u018c":"d","\u0131":"i","\u0237":"j","\u025f":"j","\u0284":"j","\u01f3":"dz","\u01c6":"dz","\xe9":"e","\u0115":"e","\u011b":"e","\u0229":"e","\u1e1d":"e","\xea":"e","\u1ebf":"e","\u1ec7":"e","\u1ec1":"e","\u1ec3":"e","\u1ec5":"e","\u1e19":"e","\xeb":"e","\u0117":"e","\u1eb9":"e","\u0205":"e","\xe8":"e","\u1ebb":"e","\u0207":"e","\u0113":"e","\u1e17":"e","\u1e15":"e","\u2c78":"e","\u0119":"e","\u1d92":"e","\u0247":"e","\u1ebd":"e","\u1e1b":"e","\ua76b":"et","\u1e1f":"f","\u0192":"f","\u1d6e":"f","\u1d82":"f","\u01f5":"g","\u011f":"g","\u01e7":"g","\u0123":"g","\u011d":"g","\u0121":"g","\u0260":"g","\u1e21":"g","\u1d83":"g","\u01e5":"g","\u1e2b":"h","\u021f":"h","\u1e29":"h","\u0125":"h","\u2c68":"h","\u1e27":"h","\u1e23":"h","\u1e25":"h","\u0266":"h","\u1e96":"h","\u0127":"h","\u0195":"hv","\xed":"i","\u012d":"i","\u01d0":"i","\xee":"i","\xef":"i","\u1e2f":"i","\u1ecb":"i","\u0209":"i","\xec":"i","\u1ec9":"i","\u020b":"i","\u012b":"i","\u012f":"i","\u1d96":"i","\u0268":"i","\u0129":"i","\u1e2d":"i","\ua77a":"d","\ua77c":"f","\u1d79":"g","\ua783":"r","\ua785":"s","\ua787":"t","\ua76d":"is","\u01f0":"j","\u0135":"j","\u029d":"j","\u0249":"j","\u1e31":"k","\u01e9":"k","\u0137":"k","\u2c6a":"k","\ua743":"k","\u1e33":"k","\u0199":"k","\u1e35":"k","\u1d84":"k","\ua741":"k","\ua745":"k","\u013a":"l","\u019a":"l","\u026c":"l","\u013e":"l","\u013c":"l","\u1e3d":"l","\u0234":"l","\u1e37":"l","\u1e39":"l","\u2c61":"l","\ua749":"l","\u1e3b":"l","\u0140":"l","\u026b":"l","\u1d85":"l","\u026d":"l","\u0142":"l","\u01c9":"lj","\u017f":"s","\u1e9c":"s","\u1e9b":"s","\u1e9d":"s","\u1e3f":"m","\u1e41":"m","\u1e43":"m","\u0271":"m","\u1d6f":"m","\u1d86":"m","\u0144":"n","\u0148":"n","\u0146":"n","\u1e4b":"n","\u0235":"n","\u1e45":"n","\u1e47":"n","\u01f9":"n","\u0272":"n","\u1e49":"n","\u019e":"n","\u1d70":"n","\u1d87":"n","\u0273":"n","\xf1":"n","\u01cc":"nj","\xf3":"o","\u014f":"o","\u01d2":"o","\xf4":"o","\u1ed1":"o","\u1ed9":"o","\u1ed3":"o","\u1ed5":"o","\u1ed7":"o","\xf6":"o","\u022b":"o","\u022f":"o","\u0231":"o","\u1ecd":"o","\u0151":"o","\u020d":"o","\xf2":"o","\u1ecf":"o","\u01a1":"o","\u1edb":"o","\u1ee3":"o","\u1edd":"o","\u1edf":"o","\u1ee1":"o","\u020f":"o","\ua74b":"o","\ua74d":"o","\u2c7a":"o","\u014d":"o","\u1e53":"o","\u1e51":"o","\u01eb":"o","\u01ed":"o","\xf8":"o","\u01ff":"o","\xf5":"o","\u1e4d":"o","\u1e4f":"o","\u022d":"o","\u01a3":"oi","\ua74f":"oo","\u025b":"e","\u1d93":"e","\u0254":"o","\u1d97":"o","\u0223":"ou","\u1e55":"p","\u1e57":"p","\ua753":"p","\u01a5":"p","\u1d71":"p","\u1d88":"p","\ua755":"p","\u1d7d":"p","\ua751":"p","\ua759":"q","\u02a0":"q","\u024b":"q","\ua757":"q","\u0155":"r","\u0159":"r","\u0157":"r","\u1e59":"r","\u1e5b":"r","\u1e5d":"r","\u0211":"r","\u027e":"r","\u1d73":"r","\u0213":"r","\u1e5f":"r","\u027c":"r","\u1d72":"r","\u1d89":"r","\u024d":"r","\u027d":"r","\u2184":"c","\ua73f":"c","\u0258":"e","\u027f":"r","\u015b":"s","\u1e65":"s","\u0161":"s","\u1e67":"s","\u015f":"s","\u015d":"s","\u0219":"s","\u1e61":"s","\u1e63":"s","\u1e69":"s","\u0282":"s","\u1d74":"s","\u1d8a":"s","\u023f":"s","\u0261":"g","\xdf":"ss","\u1d11":"o","\u1d13":"o","\u1d1d":"u","\u0165":"t","\u0163":"t","\u1e71":"t","\u021b":"t","\u0236":"t","\u1e97":"t","\u2c66":"t","\u1e6b":"t","\u1e6d":"t","\u01ad":"t","\u1e6f":"t","\u1d75":"t","\u01ab":"t","\u0288":"t","\u0167":"t","\u1d7a":"th","\u0250":"a","\u1d02":"ae","\u01dd":"e","\u1d77":"g","\u0265":"h","\u02ae":"h","\u02af":"h","\u1d09":"i","\u029e":"k","\ua781":"l","\u026f":"m","\u0270":"m","\u1d14":"oe","\u0279":"r","\u027b":"r","\u027a":"r","\u2c79":"r","\u0287":"t","\u028c":"v","\u028d":"w","\u028e":"y","\ua729":"tz","\xfa":"u","\u016d":"u","\u01d4":"u","\xfb":"u","\u1e77":"u","\xfc":"u","\u01d8":"u","\u01da":"u","\u01dc":"u","\u01d6":"u","\u1e73":"u","\u1ee5":"u","\u0171":"u","\u0215":"u","\xf9":"u","\u1ee7":"u","\u01b0":"u","\u1ee9":"u","\u1ef1":"u","\u1eeb":"u","\u1eed":"u","\u1eef":"u","\u0217":"u","\u016b":"u","\u1e7b":"u","\u0173":"u","\u1d99":"u","\u016f":"u","\u0169":"u","\u1e79":"u","\u1e75":"u","\u1d6b":"ue","\ua778":"um","\u2c74":"v","\ua75f":"v","\u1e7f":"v","\u028b":"v","\u1d8c":"v","\u2c71":"v","\u1e7d":"v","\ua761":"vy","\u1e83":"w","\u0175":"w","\u1e85":"w","\u1e87":"w","\u1e89":"w","\u1e81":"w","\u2c73":"w","\u1e98":"w","\u1e8d":"x","\u1e8b":"x","\u1d8d":"x","\xfd":"y","\u0177":"y","\xff":"y","\u1e8f":"y","\u1ef5":"y","\u1ef3":"y","\u01b4":"y","\u1ef7":"y","\u1eff":"y","\u0233":"y","\u1e99":"y","\u024f":"y","\u1ef9":"y","\u017a":"z","\u017e":"z","\u1e91":"z","\u0291":"z","\u2c6c":"z","\u017c":"z","\u1e93":"z","\u0225":"z","\u1e95":"z","\u1d76":"z","\u1d8e":"z","\u0290":"z","\u01b6":"z","\u0240":"z","\ufb00":"ff","\ufb03":"ffi","\ufb04":"ffl","\ufb01":"fi","\ufb02":"fl","\u0133":"ij","\u0153":"oe","\ufb06":"st","\u2090":"a","\u2091":"e","\u1d62":"i","\u2c7c":"j","\u2092":"o","\u1d63":"r","\u1d64":"u","\u1d65":"v","\u2093":"x"}}return _createClass(t,[{key:"transform",value:function(t){var e=this;return a(t)?t.replace(/[^A-Za-z0-9]/g,(function(t){return e.latinMap[t]||t})):t}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=i.Pb({name:"latinise",type:t,pure:!0}),t}(),x=function(){var t=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"transform",value:function(t){return a(t)?t.replace(/\r\n/g,"\n").split("\n"):t}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=i.Pb({name:"lines",type:t,pure:!0}),t}(),O=function(){var t=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"transform",value:function(t){return a(t)?t.trim().replace(/\s+/g,"").replace(/[A-Z]/g,(function(t,e){return e?"_"+t.toLowerCase():t.toLowerCase()})):t}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=i.Pb({name:"underscore",type:t,pure:!0}),t}(),D=function(){var t=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"transform",value:function(t,e,n){return a(t)?t.match(new RegExp(e,n)):t}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=i.Pb({name:"match",type:t,pure:!0}),t}(),w=function(){var t=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"transform",value:function(t,e,n){return a(t)?new RegExp(e,n).test(t):t}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=i.Pb({name:"test",type:t,pure:!0}),t}(),M=function(){var t=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"transform",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:" ";if(!a(t)||t.length>=e)return t;for(;t.length<e;)t=n+t;return t}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=i.Pb({name:"lpad",type:t,pure:!0}),t}(),S=function(){var t=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"transform",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:" ";if(!a(t)||t.length>=e)return t;for(;t.length<e;)t+=n;return t}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=i.Pb({name:"rpad",type:t,pure:!0}),t}(),I=function(){var t=function(){function t(){_classCallCheck(this,t),this.irregularMap={addendum:"addenda",alga:"algae",alumna:"alumnae",alumnus:"alumni",analysis:"analyses",antenna:"antennae",appendix:"appendices",aquarium:"aquaria",arch:"arches",axe:"axes",axis:"axes",bacillus:"bacilli",bacterium:"bacteria",basis:"bases",batch:"batches",beach:"beaches",beau:"beaux",bison:"bison",brush:"brushes",buffalo:"buffaloes",bureau:"bureaus",bus:"busses",cactus:"cacti",calf:"calves",chateau:"chateaux",cherry:"cherries",child:"children",church:"churches",circus:"circuses",cod:"cod",corps:"corps",corpus:"corpora",crisis:"crises",criterion:"criteria",curriculum:"curricula",datum:"data",deer:"deer",diagnosis:"diagnoses",die:"dice",domino:"dominoes",dwarf:"dwarves",echo:"echoes",elf:"elves",ellipsis:"ellipses",embargo:"embargoes",emphasis:"emphases",erratum:"errata",fax:"faxes",fireman:"firemen",fish:"fish",flush:"flushes",focus:"foci",foot:"feet",formula:"formulas",fungus:"fungi",genus:"genera",goose:"geese",grafito:"grafiti",half:"halves",hero:"heroes",hoax:"hoaxes",hoof:"hooves",hypothesis:"hypotheses",index:"indices",kiss:"kisses",knife:"knives",leaf:"leaves",life:"lives",loaf:"loaves",louse:"lice",man:"men",mango:"mangoes",matrix:"matrices",means:"means",medium:"media",memorandum:"memoranda",millennium:"milennia",moose:"moose",mosquito:"mosquitoes",motto:"mottoes",mouse:"mice",nebula:"nebulae",neurosis:"neuroses",nucleus:"nuclei",oasis:"oases",octopus:"octopodes",ovum:"ova",ox:"oxen",paralysis:"paralyses",parenthesis:"parentheses",person:"people",phenomenon:"phenomena",plateau:"plateaux",potato:"potatoes",quiz:"quizzes",radius:"radii",reflex:"reflexes","runner-up":"runners-up",scampo:"scampi",scarf:"scarves",scissors:"scissors",scratch:"scratches",self:"selves",series:"series",sheaf:"sheaves",sheep:"sheep",shelf:"shelves","son-in-law":"sons-in-law",species:"species",splash:"splashes",stimulus:"stimuli",stitch:"stitches",stratum:"strata",syllabus:"syllabi",symposium:"symposia",synopsis:"synopses",synthesis:"syntheses",tableau:"tableaux",tax:"taxes",that:"those",thesis:"theses",thief:"thieves",this:"these",tomato:"tomatoes",tooth:"teeth",tornado:"tornadoes",torpedo:"torpedoes",vertebra:"vertebrae",veto:"vetoes",vita:"vitae",volcano:"volcanoes",waltz:"waltzes",wash:"washes",watch:"watches",wharf:"wharves",wife:"wives",wolf:"wolves",woman:"women",zero:"zeroes"}}return _createClass(t,[{key:"transform",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!t||""===t)return"";if(1===e)return t;var n=t.trim().split(" ")[t.trim().split(" ").length-1];return this.irregularMap[n.toLocaleLowerCase()]?n[0]===n[0].toLocaleUpperCase()?t.replace(n,this.irregularMap[n.toLocaleLowerCase()].replace(this.irregularMap[n.toLocaleLowerCase()][0],this.irregularMap[n.toLocaleLowerCase()][0].toLocaleUpperCase())):t.replace(n,this.irregularMap[n.toLocaleLowerCase()]):"y"===n[n.length-1]?r(n[n.length-2])?t+"s":t.replace(n,n.slice(0,-1)+"ies"):"s"===n[n.length-1]?t+"es":t+"s"}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=i.Pb({name:"makePluralString",type:t,pure:!0}),t}(),P=function(){var t=function(){function t(){_classCallCheck(this,t)}return _createClass(t,[{key:"transform",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return a(t)?(e&&a(e)?e:"")+t+(n&&a(n)?n:""):t}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe=i.Pb({name:"wrap",type:t,pure:!0}),t}(),R=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=i.Ob({type:t}),t.\u0275inj=i.Nb({factory:function(e){return new(e||t)},imports:[[]]}),t}(),V=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=i.Ob({type:t}),t.\u0275inj=i.Nb({factory:function(e){return new(e||t)},imports:[[]]}),t}(),j=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=i.Ob({type:t}),t.\u0275inj=i.Nb({factory:function(e){return new(e||t)},imports:[[]]}),t}(),A=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=i.Ob({type:t}),t.\u0275inj=i.Nb({factory:function(e){return new(e||t)},imports:[[]]}),t}(),W=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=i.Ob({type:t}),t.\u0275inj=i.Nb({factory:function(e){return new(e||t)},imports:[c,R,V,j,l,A]}),t}()},bHdf:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n("5+tZ"),a=n("SpAZ");function r(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Number.POSITIVE_INFINITY;return Object(i.a)(a.a,t)}},bOdf:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=n("5+tZ");function a(t,e){return Object(i.a)(t,e,1)}},bSwM:function(t,e,n){"use strict";n.d(e,"a",(function(){return y})),n.d(e,"b",(function(){return O})),n.d(e,"c",(function(){return C}));var i=n("8LU1"),a=n("fXoL"),r=n("3Pt+"),o=n("FKr1"),s=n("R1ws"),c=n("GU7r"),l=n("u47x"),u=["input"],d=function(){return{enterDuration:150}},f=["*"],h=new a.s("mat-checkbox-default-options",{providedIn:"root",factory:function(){return{color:"accent",clickAction:"check-indeterminate"}}}),p=new a.s("mat-checkbox-click-action"),b=0,g={provide:r.s,useExisting:Object(a.X)((function(){return y})),multi:!0},m=function t(){_classCallCheck(this,t)},v=Object(o.F)(Object(o.A)(Object(o.B)(Object(o.C)((function t(e){_classCallCheck(this,t),this._elementRef=e}))))),y=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,r,o,s,c,l,u){var d;return _classCallCheck(this,n),(d=e.call(this,t))._changeDetectorRef=i,d._focusMonitor=r,d._ngZone=o,d._clickAction=c,d._animationMode=l,d._options=u,d.ariaLabel="",d.ariaLabelledby=null,d._uniqueId="mat-checkbox-"+ ++b,d.id=d._uniqueId,d.labelPosition="after",d.name=null,d.change=new a.o,d.indeterminateChange=new a.o,d._onTouched=function(){},d._currentAnimationClass="",d._currentCheckState=0,d._controlValueAccessorChangeFn=function(){},d._checked=!1,d._disabled=!1,d._indeterminate=!1,d._options=d._options||{},d._options.color&&(d.color=d.defaultColor=d._options.color),d.tabIndex=parseInt(s)||0,d._clickAction=d._clickAction||d._options.clickAction,d}return _createClass(n,[{key:"ngAfterViewInit",value:function(){var t=this;this._focusMonitor.monitor(this._elementRef,!0).subscribe((function(e){e||Promise.resolve().then((function(){t._onTouched(),t._changeDetectorRef.markForCheck()}))})),this._syncIndeterminate(this._indeterminate)}},{key:"ngAfterViewChecked",value:function(){}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef)}},{key:"_isRippleDisabled",value:function(){return this.disableRipple||this.disabled}},{key:"_onLabelTextChange",value:function(){this._changeDetectorRef.detectChanges()}},{key:"writeValue",value:function(t){this.checked=!!t}},{key:"registerOnChange",value:function(t){this._controlValueAccessorChangeFn=t}},{key:"registerOnTouched",value:function(t){this._onTouched=t}},{key:"setDisabledState",value:function(t){this.disabled=t}},{key:"_getAriaChecked",value:function(){return this.checked?"true":this.indeterminate?"mixed":"false"}},{key:"_transitionCheckState",value:function(t){var e=this._currentCheckState,n=this._elementRef.nativeElement;if(e!==t&&(this._currentAnimationClass.length>0&&n.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(e,t),this._currentCheckState=t,this._currentAnimationClass.length>0)){n.classList.add(this._currentAnimationClass);var i=this._currentAnimationClass;this._ngZone.runOutsideAngular((function(){setTimeout((function(){n.classList.remove(i)}),1e3)}))}}},{key:"_emitChangeEvent",value:function(){var t=new m;t.source=this,t.checked=this.checked,this._controlValueAccessorChangeFn(this.checked),this.change.emit(t)}},{key:"toggle",value:function(){this.checked=!this.checked}},{key:"_onInputClick",value:function(t){var e=this;t.stopPropagation(),this.disabled||"noop"===this._clickAction?this.disabled||"noop"!==this._clickAction||(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate):(this.indeterminate&&"check"!==this._clickAction&&Promise.resolve().then((function(){e._indeterminate=!1,e.indeterminateChange.emit(e._indeterminate)})),this.toggle(),this._transitionCheckState(this._checked?1:2),this._emitChangeEvent())}},{key:"focus",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"keyboard",e=arguments.length>1?arguments[1]:void 0;this._focusMonitor.focusVia(this._inputElement,t,e)}},{key:"_onInteractionEvent",value:function(t){t.stopPropagation()}},{key:"_getAnimationClassForCheckStateTransition",value:function(t,e){if("NoopAnimations"===this._animationMode)return"";var n="";switch(t){case 0:if(1===e)n="unchecked-checked";else{if(3!=e)return"";n="unchecked-indeterminate"}break;case 2:n=1===e?"unchecked-checked":"unchecked-indeterminate";break;case 1:n=2===e?"checked-unchecked":"checked-indeterminate";break;case 3:n=1===e?"indeterminate-checked":"indeterminate-unchecked"}return"mat-checkbox-anim-"+n}},{key:"_syncIndeterminate",value:function(t){var e=this._inputElement;e&&(e.nativeElement.indeterminate=t)}},{key:"inputId",get:function(){return(this.id||this._uniqueId)+"-input"}},{key:"required",get:function(){return this._required},set:function(t){this._required=Object(i.c)(t)}},{key:"checked",get:function(){return this._checked},set:function(t){t!=this.checked&&(this._checked=t,this._changeDetectorRef.markForCheck())}},{key:"disabled",get:function(){return this._disabled},set:function(t){var e=Object(i.c)(t);e!==this.disabled&&(this._disabled=e,this._changeDetectorRef.markForCheck())}},{key:"indeterminate",get:function(){return this._indeterminate},set:function(t){var e=t!=this._indeterminate;this._indeterminate=Object(i.c)(t),e&&(this._transitionCheckState(this._indeterminate?3:this.checked?1:2),this.indeterminateChange.emit(this._indeterminate)),this._syncIndeterminate(this._indeterminate)}}]),n}(v);return t.\u0275fac=function(e){return new(e||t)(a.Qb(a.l),a.Qb(a.h),a.Qb(l.h),a.Qb(a.C),a.bc("tabindex"),a.Qb(p,8),a.Qb(s.a,8),a.Qb(h,8))},t.\u0275cmp=a.Kb({type:t,selectors:[["mat-checkbox"]],viewQuery:function(t,e){var n;1&t&&(a.Xc(u,!0),a.Xc(o.u,!0)),2&t&&(a.yc(n=a.ec())&&(e._inputElement=n.first),a.yc(n=a.ec())&&(e.ripple=n.first))},hostAttrs:[1,"mat-checkbox"],hostVars:12,hostBindings:function(t,e){2&t&&(a.Zb("id",e.id),a.Eb("tabindex",null),a.Ib("mat-checkbox-indeterminate",e.indeterminate)("mat-checkbox-checked",e.checked)("mat-checkbox-disabled",e.disabled)("mat-checkbox-label-before","before"==e.labelPosition)("_mat-animation-noopable","NoopAnimations"===e._animationMode))},inputs:{disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],id:"id",labelPosition:"labelPosition",name:"name",required:"required",checked:"checked",disabled:"disabled",indeterminate:"indeterminate",ariaDescribedby:["aria-describedby","ariaDescribedby"],value:"value"},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],features:[a.Cb([g]),a.Ab],ngContentSelectors:f,decls:17,vars:20,consts:[[1,"mat-checkbox-layout"],["label",""],[1,"mat-checkbox-inner-container"],["type","checkbox",1,"mat-checkbox-input","cdk-visually-hidden",3,"id","required","checked","disabled","tabIndex","change","click"],["input",""],["matRipple","",1,"mat-checkbox-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleRadius","matRippleCentered","matRippleAnimation"],[1,"mat-ripple-element","mat-checkbox-persistent-ripple"],[1,"mat-checkbox-frame"],[1,"mat-checkbox-background"],["version","1.1","focusable","false","viewBox","0 0 24 24",0,"xml","space","preserve",1,"mat-checkbox-checkmark"],["fill","none","stroke","white","d","M4.1,12.7 9,17.6 20.3,6.3",1,"mat-checkbox-checkmark-path"],[1,"mat-checkbox-mixedmark"],[1,"mat-checkbox-label",3,"cdkObserveContent"],["checkboxLabel",""],[2,"display","none"]],template:function(t,e){if(1&t&&(a.nc(),a.Wb(0,"label",0,1),a.Wb(2,"div",2),a.Wb(3,"input",3,4),a.dc("change",(function(t){return e._onInteractionEvent(t)}))("click",(function(t){return e._onInputClick(t)})),a.Vb(),a.Wb(5,"div",5),a.Rb(6,"div",6),a.Vb(),a.Rb(7,"div",7),a.Wb(8,"div",8),a.gc(),a.Wb(9,"svg",9),a.Rb(10,"path",10),a.Vb(),a.fc(),a.Rb(11,"div",11),a.Vb(),a.Vb(),a.Wb(12,"span",12,13),a.dc("cdkObserveContent",(function(){return e._onLabelTextChange()})),a.Wb(14,"span",14),a.Qc(15,"\xa0"),a.Vb(),a.mc(16),a.Vb(),a.Vb()),2&t){var n=a.zc(1),i=a.zc(13);a.Eb("for",e.inputId),a.Db(2),a.Ib("mat-checkbox-inner-container-no-side-margin",!i.textContent||!i.textContent.trim()),a.Db(1),a.oc("id",e.inputId)("required",e.required)("checked",e.checked)("disabled",e.disabled)("tabIndex",e.tabIndex),a.Eb("value",e.value)("name",e.name)("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby)("aria-checked",e._getAriaChecked())("aria-describedby",e.ariaDescribedby),a.Db(2),a.oc("matRippleTrigger",n)("matRippleDisabled",e._isRippleDisabled())("matRippleRadius",20)("matRippleCentered",!0)("matRippleAnimation",a.uc(19,d))}},directives:[o.u,c.a],styles:["@keyframes mat-checkbox-fade-in-background{0%{opacity:0}50%{opacity:1}}@keyframes mat-checkbox-fade-out-background{0%,50%{opacity:1}100%{opacity:0}}@keyframes mat-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:22.910259}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1)}100%{stroke-dashoffset:0}}@keyframes mat-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mat-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);stroke-dashoffset:0}to{stroke-dashoffset:-22.910259}}@keyframes mat-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(45deg)}}@keyframes mat-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:0;transform:rotate(45deg)}to{opacity:1;transform:rotate(360deg)}}@keyframes mat-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:0;transform:rotate(-45deg)}to{opacity:1;transform:rotate(0deg)}}@keyframes mat-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(315deg)}}@keyframes mat-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;opacity:1;transform:scaleX(1)}32.8%,100%{opacity:0;transform:scaleX(0)}}.mat-checkbox-background,.mat-checkbox-frame{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:2px;box-sizing:border-box;pointer-events:none}.mat-checkbox{transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);cursor:pointer;-webkit-tap-highlight-color:transparent}._mat-animation-noopable.mat-checkbox{transition:none;animation:none}.mat-checkbox .mat-ripple-element:not(.mat-checkbox-persistent-ripple){opacity:.16}.mat-checkbox-layout{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:inherit;align-items:baseline;vertical-align:middle;display:inline-flex;white-space:nowrap}.mat-checkbox-label{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.mat-checkbox-inner-container{display:inline-block;height:16px;line-height:0;margin:auto;margin-right:8px;order:0;position:relative;vertical-align:middle;white-space:nowrap;width:16px;flex-shrink:0}[dir=rtl] .mat-checkbox-inner-container{margin-left:8px;margin-right:auto}.mat-checkbox-inner-container-no-side-margin{margin-left:0;margin-right:0}.mat-checkbox-frame{background-color:transparent;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1);border-width:2px;border-style:solid}._mat-animation-noopable .mat-checkbox-frame{transition:none}.cdk-high-contrast-active .mat-checkbox.cdk-keyboard-focused .mat-checkbox-frame{border-style:dotted}.mat-checkbox-background{align-items:center;display:inline-flex;justify-content:center;transition:background-color 90ms cubic-bezier(0, 0, 0.2, 0.1),opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}._mat-animation-noopable .mat-checkbox-background{transition:none}.cdk-high-contrast-active .mat-checkbox .mat-checkbox-background{background:none}.mat-checkbox-persistent-ripple{width:100%;height:100%;transform:none}.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:.04}.mat-checkbox.cdk-keyboard-focused .mat-checkbox-persistent-ripple{opacity:.12}.mat-checkbox-persistent-ripple,.mat-checkbox.mat-checkbox-disabled .mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:0}@media(hover: none){.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{display:none}}.mat-checkbox-checkmark{top:0;left:0;right:0;bottom:0;position:absolute;width:100%}.mat-checkbox-checkmark-path{stroke-dashoffset:22.910259;stroke-dasharray:22.910259;stroke-width:2.1333333333px}.cdk-high-contrast-black-on-white .mat-checkbox-checkmark-path{stroke:#000 !important}.mat-checkbox-mixedmark{width:calc(100% - 6px);height:2px;opacity:0;transform:scaleX(0) rotate(0deg);border-radius:2px}.cdk-high-contrast-active .mat-checkbox-mixedmark{height:0;border-top:solid 2px;margin-top:2px}.mat-checkbox-label-before .mat-checkbox-inner-container{order:1;margin-left:8px;margin-right:auto}[dir=rtl] .mat-checkbox-label-before .mat-checkbox-inner-container{margin-left:auto;margin-right:8px}.mat-checkbox-checked .mat-checkbox-checkmark{opacity:1}.mat-checkbox-checked .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-checked .mat-checkbox-mixedmark{transform:scaleX(1) rotate(-45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark{opacity:0;transform:rotate(45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-indeterminate .mat-checkbox-mixedmark{opacity:1;transform:scaleX(1) rotate(0deg)}.mat-checkbox-unchecked .mat-checkbox-background{background-color:transparent}.mat-checkbox-disabled{cursor:default}.cdk-high-contrast-active .mat-checkbox-disabled{opacity:.5}.mat-checkbox-anim-unchecked-checked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-checked .mat-checkbox-checkmark-path{animation:180ms linear 0ms mat-checkbox-unchecked-checked-checkmark-path}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-unchecked-indeterminate-mixedmark}.mat-checkbox-anim-checked-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-checked-unchecked .mat-checkbox-checkmark-path{animation:90ms linear 0ms mat-checkbox-checked-unchecked-checkmark-path}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-checkmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-checkmark}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-mixedmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-checkmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-checkmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-mixedmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-mixedmark}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-mixedmark{animation:300ms linear 0ms mat-checkbox-indeterminate-unchecked-mixedmark}.mat-checkbox-input{bottom:0;left:50%}.mat-checkbox .mat-checkbox-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}\n"],encapsulation:2,changeDetection:0}),t}(),_={provide:r.r,useExisting:Object(a.X)((function(){return C})),multi:!0},C=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return n}(r.b);return t.\u0275fac=function(e){return k(e||t)},t.\u0275dir=a.Lb({type:t,selectors:[["mat-checkbox","required","","formControlName",""],["mat-checkbox","required","","formControl",""],["mat-checkbox","required","","ngModel",""]],features:[a.Cb([_]),a.Ab]}),t}(),k=a.Yb(C),x=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)}}),t}(),O=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=a.Ob({type:t}),t.\u0275inj=a.Nb({factory:function(e){return new(e||t)},imports:[[o.v,o.k,c.c,x],o.k,x]}),t}()},bTqV:function(t,e,n){"use strict";n.d(e,"a",(function(){return h})),n.d(e,"b",(function(){return f})),n.d(e,"c",(function(){return p}));var i=n("FKr1"),a=n("R1ws"),r=n("fXoL"),o=n("u47x"),s=["mat-button",""],c=["*"],l=".mat-button .mat-button-focus-overlay,.mat-icon-button .mat-button-focus-overlay{opacity:0}.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:.04}@media(hover: none){.mat-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay,.mat-stroked-button:hover:not(.mat-button-disabled) .mat-button-focus-overlay{opacity:0}}.mat-button,.mat-icon-button,.mat-stroked-button,.mat-flat-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-button.mat-button-disabled,.mat-icon-button.mat-button-disabled,.mat-stroked-button.mat-button-disabled,.mat-flat-button.mat-button-disabled{cursor:default}.mat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-button.cdk-program-focused .mat-button-focus-overlay,.mat-icon-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-icon-button.cdk-program-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-stroked-button.cdk-program-focused .mat-button-focus-overlay,.mat-flat-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-flat-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-button::-moz-focus-inner,.mat-icon-button::-moz-focus-inner,.mat-stroked-button::-moz-focus-inner,.mat-flat-button::-moz-focus-inner{border:0}.mat-raised-button{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-raised-button::-moz-focus-inner{border:0}.mat-raised-button.mat-button-disabled{cursor:default}.mat-raised-button.cdk-keyboard-focused .mat-button-focus-overlay,.mat-raised-button.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-raised-button::-moz-focus-inner{border:0}._mat-animation-noopable.mat-raised-button{transition:none;animation:none}.mat-stroked-button{border:1px solid currentColor;padding:0 15px;line-height:34px}.mat-stroked-button .mat-button-ripple.mat-ripple,.mat-stroked-button .mat-button-focus-overlay{top:-1px;left:-1px;right:-1px;bottom:-1px}.mat-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:56px;height:56px;padding:0;flex-shrink:0}.mat-fab::-moz-focus-inner{border:0}.mat-fab.mat-button-disabled{cursor:default}.mat-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-fab::-moz-focus-inner{border:0}._mat-animation-noopable.mat-fab{transition:none;animation:none}.mat-fab .mat-button-wrapper{padding:16px 0;display:inline-block;line-height:24px}.mat-mini-fab{box-sizing:border-box;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;display:inline-block;white-space:nowrap;text-decoration:none;vertical-align:baseline;text-align:center;margin:0;min-width:64px;line-height:36px;padding:0 16px;border-radius:4px;overflow:visible;transform:translate3d(0, 0, 0);transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);min-width:0;border-radius:50%;width:40px;height:40px;padding:0;flex-shrink:0}.mat-mini-fab::-moz-focus-inner{border:0}.mat-mini-fab.mat-button-disabled{cursor:default}.mat-mini-fab.cdk-keyboard-focused .mat-button-focus-overlay,.mat-mini-fab.cdk-program-focused .mat-button-focus-overlay{opacity:.12}.mat-mini-fab::-moz-focus-inner{border:0}._mat-animation-noopable.mat-mini-fab{transition:none;animation:none}.mat-mini-fab .mat-button-wrapper{padding:8px 0;display:inline-block;line-height:24px}.mat-icon-button{padding:0;min-width:0;width:40px;height:40px;flex-shrink:0;line-height:40px;border-radius:50%}.mat-icon-button i,.mat-icon-button .mat-icon{line-height:24px}.mat-button-ripple.mat-ripple,.mat-button-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-button-ripple.mat-ripple:not(:empty){transform:translateZ(0)}.mat-button-focus-overlay{opacity:0;transition:opacity 200ms cubic-bezier(0.35, 0, 0.25, 1),background-color 200ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-button-focus-overlay{transition:none}.mat-button-ripple-round{border-radius:50%;z-index:1}.mat-button .mat-button-wrapper>*,.mat-flat-button .mat-button-wrapper>*,.mat-stroked-button .mat-button-wrapper>*,.mat-raised-button .mat-button-wrapper>*,.mat-icon-button .mat-button-wrapper>*,.mat-fab .mat-button-wrapper>*,.mat-mini-fab .mat-button-wrapper>*{vertical-align:middle}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button{display:block;font-size:inherit;width:2.5em;height:2.5em}.cdk-high-contrast-active .mat-button,.cdk-high-contrast-active .mat-flat-button,.cdk-high-contrast-active .mat-raised-button,.cdk-high-contrast-active .mat-icon-button,.cdk-high-contrast-active .mat-fab,.cdk-high-contrast-active .mat-mini-fab{outline:solid 1px}.cdk-high-contrast-active .mat-button-base.cdk-keyboard-focused,.cdk-high-contrast-active .mat-button-base.cdk-program-focused{outline:solid 3px}\n",u=["mat-button","mat-flat-button","mat-icon-button","mat-raised-button","mat-stroked-button","mat-mini-fab","mat-fab"],d=Object(i.A)(Object(i.C)(Object(i.B)((function t(e){_classCallCheck(this,t),this._elementRef=e})))),f=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a){var r;_classCallCheck(this,n),(r=e.call(this,t))._focusMonitor=i,r._animationMode=a,r.isRoundButton=r._hasHostAttributes("mat-fab","mat-mini-fab"),r.isIconButton=r._hasHostAttributes("mat-icon-button");var o,s=_createForOfIteratorHelper(u);try{for(s.s();!(o=s.n()).done;){var c=o.value;r._hasHostAttributes(c)&&r._getHostElement().classList.add(c)}}catch(l){s.e(l)}finally{s.f()}return t.nativeElement.classList.add("mat-button-base"),r.isRoundButton&&(r.color="accent"),r}return _createClass(n,[{key:"ngAfterViewInit",value:function(){this._focusMonitor.monitor(this._elementRef,!0)}},{key:"ngOnDestroy",value:function(){this._focusMonitor.stopMonitoring(this._elementRef)}},{key:"focus",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"program",e=arguments.length>1?arguments[1]:void 0;this._focusMonitor.focusVia(this._getHostElement(),t,e)}},{key:"_getHostElement",value:function(){return this._elementRef.nativeElement}},{key:"_isRippleDisabled",value:function(){return this.disableRipple||this.disabled}},{key:"_hasHostAttributes",value:function(){for(var t=this,e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return n.some((function(e){return t._getHostElement().hasAttribute(e)}))}}]),n}(d);return t.\u0275fac=function(e){return new(e||t)(r.Qb(r.l),r.Qb(o.h),r.Qb(a.a,8))},t.\u0275cmp=r.Kb({type:t,selectors:[["button","mat-button",""],["button","mat-raised-button",""],["button","mat-icon-button",""],["button","mat-fab",""],["button","mat-mini-fab",""],["button","mat-stroked-button",""],["button","mat-flat-button",""]],viewQuery:function(t,e){var n;1&t&&r.Xc(i.u,!0),2&t&&r.yc(n=r.ec())&&(e.ripple=n.first)},hostAttrs:[1,"mat-focus-indicator"],hostVars:5,hostBindings:function(t,e){2&t&&(r.Eb("disabled",e.disabled||null),r.Ib("_mat-animation-noopable","NoopAnimations"===e._animationMode)("mat-button-disabled",e.disabled))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color"},exportAs:["matButton"],features:[r.Ab],attrs:s,ngContentSelectors:c,decls:4,vars:5,consts:[[1,"mat-button-wrapper"],["matRipple","",1,"mat-button-ripple",3,"matRippleDisabled","matRippleCentered","matRippleTrigger"],[1,"mat-button-focus-overlay"]],template:function(t,e){1&t&&(r.nc(),r.Wb(0,"span",0),r.mc(1),r.Vb(),r.Rb(2,"span",1),r.Rb(3,"span",2)),2&t&&(r.Db(2),r.Ib("mat-button-ripple-round",e.isRoundButton||e.isIconButton),r.oc("matRippleDisabled",e._isRippleDisabled())("matRippleCentered",e.isIconButton)("matRippleTrigger",e._getHostElement()))},directives:[i.u],styles:[l],encapsulation:2,changeDetection:0}),t}(),h=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a){return _classCallCheck(this,n),e.call(this,i,t,a)}return _createClass(n,[{key:"_haltDisabledEvents",value:function(t){this.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}}]),n}(f);return t.\u0275fac=function(e){return new(e||t)(r.Qb(o.h),r.Qb(r.l),r.Qb(a.a,8))},t.\u0275cmp=r.Kb({type:t,selectors:[["a","mat-button",""],["a","mat-raised-button",""],["a","mat-icon-button",""],["a","mat-fab",""],["a","mat-mini-fab",""],["a","mat-stroked-button",""],["a","mat-flat-button",""]],hostAttrs:[1,"mat-focus-indicator"],hostVars:7,hostBindings:function(t,e){1&t&&r.dc("click",(function(t){return e._haltDisabledEvents(t)})),2&t&&(r.Eb("tabindex",e.disabled?-1:e.tabIndex||0)("disabled",e.disabled||null)("aria-disabled",e.disabled.toString()),r.Ib("_mat-animation-noopable","NoopAnimations"===e._animationMode)("mat-button-disabled",e.disabled))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex"},exportAs:["matButton","matAnchor"],features:[r.Ab],attrs:s,ngContentSelectors:c,decls:4,vars:5,consts:[[1,"mat-button-wrapper"],["matRipple","",1,"mat-button-ripple",3,"matRippleDisabled","matRippleCentered","matRippleTrigger"],[1,"mat-button-focus-overlay"]],template:function(t,e){1&t&&(r.nc(),r.Wb(0,"span",0),r.mc(1),r.Vb(),r.Rb(2,"span",1),r.Rb(3,"span",2)),2&t&&(r.Db(2),r.Ib("mat-button-ripple-round",e.isRoundButton||e.isIconButton),r.oc("matRippleDisabled",e._isRippleDisabled())("matRippleCentered",e.isIconButton)("matRippleTrigger",e._getHostElement()))},directives:[i.u],styles:[l],encapsulation:2,changeDetection:0}),t}(),p=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=r.Ob({type:t}),t.\u0275inj=r.Nb({factory:function(e){return new(e||t)},imports:[[i.v,i.k],i.k]}),t}()},bv9b:function(t,e,n){"use strict";n.d(e,"a",(function(){return b})),n.d(e,"b",(function(){return m}));var i=n("fXoL"),a=n("ofXK"),r=n("FKr1"),o=n("8LU1"),s=n("R1ws"),c=n("quSY"),l=n("xgIS"),u=n("pLZG"),d=["primaryValueBar"],f=Object(r.A)((function t(e){_classCallCheck(this,t),this._elementRef=e}),"primary"),h=new i.s("mat-progress-bar-location",{providedIn:"root",factory:function(){var t=Object(i.Y)(a.e),e=t?t.location:null;return{getPathname:function(){return e?e.pathname+e.search:""}}}}),p=0,b=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,a,r,o){var s;_classCallCheck(this,n),(s=e.call(this,t))._elementRef=t,s._ngZone=a,s._animationMode=r,s._isNoopAnimation=!1,s._value=0,s._bufferValue=0,s.animationEnd=new i.o,s._animationEndSubscription=c.a.EMPTY,s.mode="determinate",s.progressbarId="mat-progress-bar-"+p++;var l=o?o.getPathname().split("#")[0]:"";return s._rectangleFillValue="url('".concat(l,"#").concat(s.progressbarId,"')"),s._isNoopAnimation="NoopAnimations"===r,s}return _createClass(n,[{key:"_primaryTransform",value:function(){return{transform:"scaleX(".concat(this.value/100,")")}}},{key:"_bufferTransform",value:function(){return"buffer"===this.mode?{transform:"scaleX(".concat(this.bufferValue/100,")")}:null}},{key:"ngAfterViewInit",value:function(){var t=this;this._ngZone.runOutsideAngular((function(){var e=t._primaryValueBar.nativeElement;t._animationEndSubscription=Object(l.a)(e,"transitionend").pipe(Object(u.a)((function(t){return t.target===e}))).subscribe((function(){"determinate"!==t.mode&&"buffer"!==t.mode||t._ngZone.run((function(){return t.animationEnd.next({value:t.value})}))}))}))}},{key:"ngOnDestroy",value:function(){this._animationEndSubscription.unsubscribe()}},{key:"value",get:function(){return this._value},set:function(t){this._value=g(Object(o.f)(t)||0)}},{key:"bufferValue",get:function(){return this._bufferValue},set:function(t){this._bufferValue=g(t||0)}}]),n}(f);return t.\u0275fac=function(e){return new(e||t)(i.Qb(i.l),i.Qb(i.C),i.Qb(s.a,8),i.Qb(h,8))},t.\u0275cmp=i.Kb({type:t,selectors:[["mat-progress-bar"]],viewQuery:function(t,e){var n;1&t&&i.Xc(d,!0),2&t&&i.yc(n=i.ec())&&(e._primaryValueBar=n.first)},hostAttrs:["role","progressbar","aria-valuemin","0","aria-valuemax","100",1,"mat-progress-bar"],hostVars:4,hostBindings:function(t,e){2&t&&(i.Eb("aria-valuenow","indeterminate"===e.mode||"query"===e.mode?null:e.value)("mode",e.mode),i.Ib("_mat-animation-noopable",e._isNoopAnimation))},inputs:{color:"color",mode:"mode",value:"value",bufferValue:"bufferValue"},outputs:{animationEnd:"animationEnd"},exportAs:["matProgressBar"],features:[i.Ab],decls:9,vars:4,consts:[["width","100%","height","4","focusable","false",1,"mat-progress-bar-background","mat-progress-bar-element"],["x","4","y","0","width","8","height","4","patternUnits","userSpaceOnUse",3,"id"],["cx","2","cy","2","r","2"],["width","100%","height","100%"],[1,"mat-progress-bar-buffer","mat-progress-bar-element",3,"ngStyle"],[1,"mat-progress-bar-primary","mat-progress-bar-fill","mat-progress-bar-element",3,"ngStyle"],["primaryValueBar",""],[1,"mat-progress-bar-secondary","mat-progress-bar-fill","mat-progress-bar-element"]],template:function(t,e){1&t&&(i.gc(),i.Wb(0,"svg",0),i.Wb(1,"defs"),i.Wb(2,"pattern",1),i.Rb(3,"circle",2),i.Vb(),i.Vb(),i.Rb(4,"rect",3),i.Vb(),i.fc(),i.Rb(5,"div",4),i.Rb(6,"div",5,6),i.Rb(8,"div",7)),2&t&&(i.Db(2),i.oc("id",e.progressbarId),i.Db(2),i.Eb("fill",e._rectangleFillValue),i.Db(1),i.oc("ngStyle",e._bufferTransform()),i.Db(1),i.oc("ngStyle",e._primaryTransform()))},directives:[a.w],styles:['.mat-progress-bar{display:block;height:4px;overflow:hidden;position:relative;transition:opacity 250ms linear;width:100%}._mat-animation-noopable.mat-progress-bar{transition:none;animation:none}.mat-progress-bar .mat-progress-bar-element,.mat-progress-bar .mat-progress-bar-fill::after{height:100%;position:absolute;width:100%}.mat-progress-bar .mat-progress-bar-background{width:calc(100% + 10px)}.cdk-high-contrast-active .mat-progress-bar .mat-progress-bar-background{display:none}.mat-progress-bar .mat-progress-bar-buffer{transform-origin:top left;transition:transform 250ms ease}.cdk-high-contrast-active .mat-progress-bar .mat-progress-bar-buffer{border-top:solid 5px;opacity:.5}.mat-progress-bar .mat-progress-bar-secondary{display:none}.mat-progress-bar .mat-progress-bar-fill{animation:none;transform-origin:top left;transition:transform 250ms ease}.cdk-high-contrast-active .mat-progress-bar .mat-progress-bar-fill{border-top:solid 4px}.mat-progress-bar .mat-progress-bar-fill::after{animation:none;content:"";display:inline-block;left:0}.mat-progress-bar[dir=rtl],[dir=rtl] .mat-progress-bar{transform:rotateY(180deg)}.mat-progress-bar[mode=query]{transform:rotateZ(180deg)}.mat-progress-bar[mode=query][dir=rtl],[dir=rtl] .mat-progress-bar[mode=query]{transform:rotateZ(180deg) rotateY(180deg)}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-fill,.mat-progress-bar[mode=query] .mat-progress-bar-fill{transition:none}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-primary,.mat-progress-bar[mode=query] .mat-progress-bar-primary{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-primary-indeterminate-translate 2000ms infinite linear;left:-145.166611%}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-primary.mat-progress-bar-fill::after,.mat-progress-bar[mode=query] .mat-progress-bar-primary.mat-progress-bar-fill::after{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-primary-indeterminate-scale 2000ms infinite linear}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-secondary,.mat-progress-bar[mode=query] .mat-progress-bar-secondary{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-secondary-indeterminate-translate 2000ms infinite linear;left:-54.888891%;display:block}.mat-progress-bar[mode=indeterminate] .mat-progress-bar-secondary.mat-progress-bar-fill::after,.mat-progress-bar[mode=query] .mat-progress-bar-secondary.mat-progress-bar-fill::after{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-secondary-indeterminate-scale 2000ms infinite linear}.mat-progress-bar[mode=buffer] .mat-progress-bar-background{-webkit-backface-visibility:hidden;backface-visibility:hidden;animation:mat-progress-bar-background-scroll 250ms infinite linear;display:block}.mat-progress-bar._mat-animation-noopable .mat-progress-bar-fill,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-fill::after,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-buffer,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-primary,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-primary.mat-progress-bar-fill::after,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-secondary,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-secondary.mat-progress-bar-fill::after,.mat-progress-bar._mat-animation-noopable .mat-progress-bar-background{animation:none;transition-duration:1ms}@keyframes mat-progress-bar-primary-indeterminate-translate{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(83.67142%)}100%{transform:translateX(200.611057%)}}@keyframes mat-progress-bar-primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes mat-progress-bar-secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(37.651913%)}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(84.386165%)}100%{transform:translateX(160.277782%)}}@keyframes mat-progress-bar-secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes mat-progress-bar-background-scroll{to{transform:translateX(-8px)}}\n'],encapsulation:2,changeDetection:0}),t}();function g(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100;return Math.max(e,Math.min(n,t))}var m=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=i.Ob({type:t}),t.\u0275inj=i.Nb({factory:function(e){return new(e||t)},imports:[[a.c,r.k],r.k]}),t}()},c2HN:function(t,e,n){"use strict";function i(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}n.d(e,"a",(function(){return i}))},cH1L:function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return o}));var i=n("fXoL"),a=n("ofXK"),r=new i.s("cdk-dir-doc",{providedIn:"root",factory:function(){return Object(i.Y)(a.e)}}),o=function(){var t=function(){function t(e){if(_classCallCheck(this,t),this.value="ltr",this.change=new i.o,e){var n=e.documentElement?e.documentElement.dir:null,a=(e.body?e.body.dir:null)||n;this.value="ltr"===a||"rtl"===a?a:"ltr"}}return _createClass(t,[{key:"ngOnDestroy",value:function(){this.change.complete()}}]),t}();return t.\u0275fac=function(e){return new(e||t)(i.ac(r,8))},t.\u0275prov=Object(i.Mb)({factory:function(){return new t(Object(i.ac)(r,8))},token:t,providedIn:"root"}),t}(),s=function(){var t=function(){function t(){_classCallCheck(this,t),this._dir="ltr",this._isInitialized=!1,this.change=new i.o}return _createClass(t,[{key:"ngAfterContentInit",value:function(){this._isInitialized=!0}},{key:"ngOnDestroy",value:function(){this.change.complete()}},{key:"dir",get:function(){return this._dir},set:function(t){var e=this._dir,n=t?t.toLowerCase():t;this._rawDir=t,this._dir="ltr"===n||"rtl"===n?n:"ltr",e!==this._dir&&this._isInitialized&&this.change.emit(this._dir)}},{key:"value",get:function(){return this.dir}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=i.Lb({type:t,selectors:[["","dir",""]],hostVars:1,hostBindings:function(t,e){2&t&&i.Eb("dir",e._rawDir)},inputs:{dir:"dir"},outputs:{change:"dirChange"},exportAs:["dir"],features:[i.Cb([{provide:o,useExisting:t}])]}),t}(),c=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=i.Ob({type:t}),t.\u0275inj=i.Nb({factory:function(e){return new(e||t)}}),t}()},cMWS:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n("tk/3"),a=n("ofXK"),r=n("sYmb"),o=n("fXoL"),s=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=o.Ob({type:t}),t.\u0275inj=o.Nb({factory:function(e){return new(e||t)},providers:[],imports:[[a.c,r.c.forRoot({loader:{provide:r.b,useFactory:l,deps:[i.b]}})],r.c]}),t}(),c=function(){function t(e){_classCallCheck(this,t),this.http=e}return _createClass(t,[{key:"getTranslation",value:function(t){return this.http.get("../rest/languages/"+t)}}]),t}();function l(t){return new c(t)}},cp0P:function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n("HDdC"),a=n("DH7j"),r=n("lJxs"),o=n("XoHu"),s=n("Cfvw");function c(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(1===e.length){var i=e[0];if(Object(a.a)(i))return l(i,null);if(Object(o.a)(i)&&Object.getPrototypeOf(i)===Object.prototype){var s=Object.keys(i);return l(s.map((function(t){return i[t]})),s)}}if("function"==typeof e[e.length-1]){var c=e.pop();return l(e=1===e.length&&Object(a.a)(e[0])?e[0]:e,null).pipe(Object(r.a)((function(t){return c.apply(void 0,_toConsumableArray(t))})))}return l(e,null)}function l(t,e){return new i.a((function(n){var i=t.length;if(0!==i)for(var a=new Array(i),r=0,o=0,c=function(c){var l=Object(s.a)(t[c]),u=!1;n.add(l.subscribe({next:function(t){u||(u=!0,o++),a[c]=t},error:function(t){return n.error(t)},complete:function(){++r!==i&&u||(o===i&&n.next(e?e.reduce((function(t,e,n){return t[e]=a[n],t}),{}):a),n.complete())}}))},l=0;l<i;l++)c(l);else n.complete()}))}},d3UM:function(t,e,n){"use strict";n.d(e,"a",(function(){return U})),n.d(e,"b",(function(){return H})),n.d(e,"c",(function(){return B}));var i=n("rDax"),a=n("ofXK"),r=n("fXoL"),o=n("FKr1"),s=n("kmnG"),c=n("vxfF"),l=n("u47x"),u=n("8LU1"),d=n("0EQZ"),f=n("FtGj"),h=n("XNiG"),p=n("NXyV"),b=n("VRyK"),g=n("JX91"),m=n("eIep"),v=n("IzEk"),y=n("pLZG"),_=n("lJxs"),C=n("/uUt"),k=n("1G5W"),x=n("R0Ic"),O=n("cH1L"),D=n("3Pt+"),w=["trigger"],M=["panel"];function S(t,e){if(1&t&&(r.Wb(0,"span",8),r.Qc(1),r.Vb()),2&t){var n=r.hc();r.Db(1),r.Rc(n.placeholder||"\xa0")}}function I(t,e){if(1&t&&(r.Wb(0,"span"),r.Qc(1),r.Vb()),2&t){var n=r.hc(2);r.Db(1),r.Rc(n.triggerValue||"\xa0")}}function P(t,e){1&t&&r.mc(0,0,["*ngSwitchCase","true"])}function R(t,e){if(1&t&&(r.Wb(0,"span",9),r.Oc(1,I,2,1,"span",10),r.Oc(2,P,1,0,"ng-content",11),r.Vb()),2&t){var n=r.hc();r.oc("ngSwitch",!!n.customTrigger),r.Db(2),r.oc("ngSwitchCase",!0)}}function V(t,e){if(1&t){var n=r.Xb();r.Wb(0,"div",12),r.Wb(1,"div",13,14),r.dc("@transformPanel.done",(function(t){return r.Dc(n),r.hc()._panelDoneAnimatingStream.next(t.toState)}))("keydown",(function(t){return r.Dc(n),r.hc()._handleKeydown(t)})),r.mc(3,1),r.Vb(),r.Vb()}if(2&t){var i=r.hc();r.oc("@transformPanelWrap",void 0),r.Db(1),r.Gb("mat-select-panel ",i._getPanelTheme(),""),r.Lc("transform-origin",i._transformOrigin)("font-size",i._triggerFontSize,"px"),r.oc("ngClass",i.panelClass)("@transformPanel",i.multiple?"showing-multiple":"showing"),r.Eb("id",i.id+"-panel")("aria-multiselectable",i.multiple)("aria-label",i.ariaLabel||null)("aria-labelledby",i._getPanelAriaLabelledby())}}var j=[[["mat-select-trigger"]],"*"],A=["mat-select-trigger","*"],W={transformPanelWrap:Object(x.n)("transformPanelWrap",[Object(x.m)("* => void",Object(x.i)("@transformPanel",[Object(x.f)()],{optional:!0}))]),transformPanel:Object(x.n)("transformPanel",[Object(x.k)("void",Object(x.l)({transform:"scaleY(0.8)",minWidth:"100%",opacity:0})),Object(x.k)("showing",Object(x.l)({opacity:1,minWidth:"calc(100% + 32px)",transform:"scaleY(1)"})),Object(x.k)("showing-multiple",Object(x.l)({opacity:1,minWidth:"calc(100% + 64px)",transform:"scaleY(1)"})),Object(x.m)("void => *",Object(x.e)("120ms cubic-bezier(0, 0, 0.2, 1)")),Object(x.m)("* => void",Object(x.e)("100ms 25ms linear",Object(x.l)({opacity:0})))])},T=0,E=new r.s("mat-select-scroll-strategy"),F=new r.s("MAT_SELECT_CONFIG"),L={provide:E,deps:[i.c],useFactory:function(t){return function(){return t.scrollStrategies.reposition()}}},Q=function t(e,n){_classCallCheck(this,t),this.source=e,this.value=n},N=Object(o.B)(Object(o.F)(Object(o.C)(Object(o.D)((function t(e,n,i,a,r){_classCallCheck(this,t),this._elementRef=e,this._defaultErrorStateMatcher=n,this._parentForm=i,this._parentFormGroup=a,this.ngControl=r}))))),z=new r.s("MatSelectTrigger"),B=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=r.Lb({type:t,selectors:[["mat-select-trigger"]],features:[r.Cb([{provide:z,useExisting:t}])]}),t}(),U=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a,o,s,c,l,u,d,f,C,k,x,O){var D;return _classCallCheck(this,n),(D=e.call(this,s,o,l,u,f))._viewportRuler=t,D._changeDetectorRef=i,D._ngZone=a,D._dir=c,D._parentFormField=d,D.ngControl=f,D._liveAnnouncer=x,D._panelOpen=!1,D._required=!1,D._scrollTop=0,D._multiple=!1,D._compareWith=function(t,e){return t===e},D._uid="mat-select-"+T++,D._triggerAriaLabelledBy=null,D._destroy=new h.a,D._triggerFontSize=0,D._onChange=function(){},D._onTouched=function(){},D._valueId="mat-select-value-"+T++,D._transformOrigin="top",D._panelDoneAnimatingStream=new h.a,D._offsetY=0,D._positions=[{originX:"start",originY:"top",overlayX:"start",overlayY:"top"},{originX:"start",originY:"bottom",overlayX:"start",overlayY:"bottom"}],D._disableOptionCentering=!1,D._focused=!1,D.controlType="mat-select",D.ariaLabel="",D.optionSelectionChanges=Object(p.a)((function(){var t=D.options;return t?t.changes.pipe(Object(g.a)(t),Object(m.a)((function(){return Object(b.a).apply(void 0,_toConsumableArray(t.map((function(t){return t.onSelectionChange}))))}))):D._ngZone.onStable.pipe(Object(v.a)(1),Object(m.a)((function(){return D.optionSelectionChanges})))})),D.openedChange=new r.o,D._openedStream=D.openedChange.pipe(Object(y.a)((function(t){return t})),Object(_.a)((function(){}))),D._closedStream=D.openedChange.pipe(Object(y.a)((function(t){return!t})),Object(_.a)((function(){}))),D.selectionChange=new r.o,D.valueChange=new r.o,D.ngControl&&(D.ngControl.valueAccessor=_assertThisInitialized(D)),D._scrollStrategyFactory=k,D._scrollStrategy=D._scrollStrategyFactory(),D.tabIndex=parseInt(C)||0,D.id=D.id,O&&(null!=O.disableOptionCentering&&(D.disableOptionCentering=O.disableOptionCentering),null!=O.typeaheadDebounceInterval&&(D.typeaheadDebounceInterval=O.typeaheadDebounceInterval)),D}return _createClass(n,[{key:"ngOnInit",value:function(){var t=this;this._selectionModel=new d.c(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(Object(C.a)(),Object(k.a)(this._destroy)).subscribe((function(){t.panelOpen?(t._scrollTop=0,t.openedChange.emit(!0)):(t.openedChange.emit(!1),t.overlayDir.offsetX=0,t._changeDetectorRef.markForCheck())})),this._viewportRuler.change().pipe(Object(k.a)(this._destroy)).subscribe((function(){t._panelOpen&&(t._triggerRect=t.trigger.nativeElement.getBoundingClientRect(),t._changeDetectorRef.markForCheck())}))}},{key:"ngAfterContentInit",value:function(){var t=this;this._initKeyManager(),this._selectionModel.changed.pipe(Object(k.a)(this._destroy)).subscribe((function(t){t.added.forEach((function(t){return t.select()})),t.removed.forEach((function(t){return t.deselect()}))})),this.options.changes.pipe(Object(g.a)(null),Object(k.a)(this._destroy)).subscribe((function(){t._resetOptions(),t._initializeSelection()}))}},{key:"ngDoCheck",value:function(){var t=this._getTriggerAriaLabelledby();if(t!==this._triggerAriaLabelledBy){var e=this._elementRef.nativeElement;this._triggerAriaLabelledBy=t,t?e.setAttribute("aria-labelledby",t):e.removeAttribute("aria-labelledby")}this.ngControl&&this.updateErrorState()}},{key:"ngOnChanges",value:function(t){t.disabled&&this.stateChanges.next(),t.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this._typeaheadDebounceInterval)}},{key:"ngOnDestroy",value:function(){this._destroy.next(),this._destroy.complete(),this.stateChanges.complete()}},{key:"toggle",value:function(){this.panelOpen?this.close():this.open()}},{key:"open",value:function(){var t=this;!this.disabled&&this.options&&this.options.length&&!this._panelOpen&&(this._triggerRect=this.trigger.nativeElement.getBoundingClientRect(),this._triggerFontSize=parseInt(getComputedStyle(this.trigger.nativeElement).fontSize||"0"),this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._calculateOverlayPosition(),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this._ngZone.onStable.pipe(Object(v.a)(1)).subscribe((function(){t._triggerFontSize&&t.overlayDir.overlayRef&&t.overlayDir.overlayRef.overlayElement&&(t.overlayDir.overlayRef.overlayElement.style.fontSize=t._triggerFontSize+"px")})))}},{key:"close",value:function(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched())}},{key:"writeValue",value:function(t){this.value=t}},{key:"registerOnChange",value:function(t){this._onChange=t}},{key:"registerOnTouched",value:function(t){this._onTouched=t}},{key:"setDisabledState",value:function(t){this.disabled=t,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}},{key:"_isRtl",value:function(){return!!this._dir&&"rtl"===this._dir.value}},{key:"_handleKeydown",value:function(t){this.disabled||(this.panelOpen?this._handleOpenKeydown(t):this._handleClosedKeydown(t))}},{key:"_handleClosedKeydown",value:function(t){var e=t.keyCode,n=e===f.e||e===f.s||e===f.k||e===f.o,i=e===f.g||e===f.q,a=this._keyManager;if(!a.isTyping()&&i&&!Object(f.v)(t)||(this.multiple||t.altKey)&&n)t.preventDefault(),this.open();else if(!this.multiple){var r=this.selected;a.onKeydown(t);var o=this.selected;o&&r!==o&&this._liveAnnouncer.announce(o.viewValue,1e4)}}},{key:"_handleOpenKeydown",value:function(t){var e=this._keyManager,n=t.keyCode,i=n===f.e||n===f.s,a=e.isTyping();if(i&&t.altKey)t.preventDefault(),this.close();else if(a||n!==f.g&&n!==f.q||!e.activeItem||Object(f.v)(t))if(!a&&this._multiple&&n===f.a&&t.ctrlKey){t.preventDefault();var r=this.options.some((function(t){return!t.disabled&&!t.selected}));this.options.forEach((function(t){t.disabled||(r?t.select():t.deselect())}))}else{var o=e.activeItemIndex;e.onKeydown(t),this._multiple&&i&&t.shiftKey&&e.activeItem&&e.activeItemIndex!==o&&e.activeItem._selectViaInteraction()}else t.preventDefault(),e.activeItem._selectViaInteraction()}},{key:"_onFocus",value:function(){this.disabled||(this._focused=!0,this.stateChanges.next())}},{key:"_onBlur",value:function(){this._focused=!1,this.disabled||this.panelOpen||(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}},{key:"_onAttached",value:function(){var t=this;this.overlayDir.positionChange.pipe(Object(v.a)(1)).subscribe((function(){t._changeDetectorRef.detectChanges(),t._calculateOverlayOffsetX(),t.panel.nativeElement.scrollTop=t._scrollTop}))}},{key:"_getPanelTheme",value:function(){return this._parentFormField?"mat-"+this._parentFormField.color:""}},{key:"_initializeSelection",value:function(){var t=this;Promise.resolve().then((function(){t._setSelectionByValue(t.ngControl?t.ngControl.value:t._value),t.stateChanges.next()}))}},{key:"_setSelectionByValue",value:function(t){var e=this;if(this.multiple&&t)Array.isArray(t),this._selectionModel.clear(),t.forEach((function(t){return e._selectValue(t)})),this._sortValues();else{this._selectionModel.clear();var n=this._selectValue(t);n?this._keyManager.updateActiveItem(n):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}},{key:"_selectValue",value:function(t){var e=this,n=this.options.find((function(n){try{return null!=n.value&&e._compareWith(n.value,t)}catch(i){return!1}}));return n&&this._selectionModel.select(n),n}},{key:"_initKeyManager",value:function(){var t=this;this._keyManager=new l.b(this.options).withTypeAhead(this._typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withAllowedModifierKeys(["shiftKey"]),this._keyManager.tabOut.pipe(Object(k.a)(this._destroy)).subscribe((function(){t.panelOpen&&(!t.multiple&&t._keyManager.activeItem&&t._keyManager.activeItem._selectViaInteraction(),t.focus(),t.close())})),this._keyManager.change.pipe(Object(k.a)(this._destroy)).subscribe((function(){t._panelOpen&&t.panel?t._scrollActiveOptionIntoView():t._panelOpen||t.multiple||!t._keyManager.activeItem||t._keyManager.activeItem._selectViaInteraction()}))}},{key:"_resetOptions",value:function(){var t=this,e=Object(b.a)(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Object(k.a)(e)).subscribe((function(e){t._onSelect(e.source,e.isUserInput),e.isUserInput&&!t.multiple&&t._panelOpen&&(t.close(),t.focus())})),Object(b.a).apply(void 0,_toConsumableArray(this.options.map((function(t){return t._stateChanges})))).pipe(Object(k.a)(e)).subscribe((function(){t._changeDetectorRef.markForCheck(),t.stateChanges.next()}))}},{key:"_onSelect",value:function(t,e){var n=this._selectionModel.isSelected(t);null!=t.value||this._multiple?(n!==t.selected&&(t.selected?this._selectionModel.select(t):this._selectionModel.deselect(t)),e&&this._keyManager.setActiveItem(t),this.multiple&&(this._sortValues(),e&&this.focus())):(t.deselect(),this._selectionModel.clear(),null!=this.value&&this._propagateChanges(t.value)),n!==this._selectionModel.isSelected(t)&&this._propagateChanges(),this.stateChanges.next()}},{key:"_sortValues",value:function(){var t=this;if(this.multiple){var e=this.options.toArray();this._selectionModel.sort((function(n,i){return t.sortComparator?t.sortComparator(n,i,e):e.indexOf(n)-e.indexOf(i)})),this.stateChanges.next()}}},{key:"_propagateChanges",value:function(t){var e;e=this.multiple?this.selected.map((function(t){return t.value})):this.selected?this.selected.value:t,this._value=e,this.valueChange.emit(e),this._onChange(e),this.selectionChange.emit(new Q(this,e)),this._changeDetectorRef.markForCheck()}},{key:"_highlightCorrectOption",value:function(){this._keyManager&&(this.empty?this._keyManager.setFirstItemActive():this._keyManager.setActiveItem(this._selectionModel.selected[0]))}},{key:"_scrollActiveOptionIntoView",value:function(){var t=this._keyManager.activeItemIndex||0,e=Object(o.y)(t,this.options,this.optionGroups),n=this._getItemHeight();this.panel.nativeElement.scrollTop=Object(o.z)((t+e)*n,n,this.panel.nativeElement.scrollTop,256)}},{key:"focus",value:function(t){this._elementRef.nativeElement.focus(t)}},{key:"_getOptionIndex",value:function(t){return this.options.reduce((function(e,n,i){return void 0!==e?e:t===n?i:void 0}),void 0)}},{key:"_calculateOverlayPosition",value:function(){var t=this._getItemHeight(),e=this._getItemCount(),n=Math.min(e*t,256),i=e*t-n,a=this.empty?0:this._getOptionIndex(this._selectionModel.selected[0]);a+=Object(o.y)(a,this.options,this.optionGroups);var r=n/2;this._scrollTop=this._calculateOverlayScroll(a,r,i),this._offsetY=this._calculateOverlayOffsetY(a,r,i),this._checkOverlayWithinViewport(i)}},{key:"_calculateOverlayScroll",value:function(t,e,n){var i=this._getItemHeight();return Math.min(Math.max(0,i*t-e+i/2),n)}},{key:"_getPanelAriaLabelledby",value:function(){if(this.ariaLabel)return null;var t=this._getLabelId();return this.ariaLabelledby?t+" "+this.ariaLabelledby:t}},{key:"_getAriaActiveDescendant",value:function(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}},{key:"_getLabelId",value:function(){var t;return(null===(t=this._parentFormField)||void 0===t?void 0:t.getLabelId())||""}},{key:"_calculateOverlayOffsetX",value:function(){var t,e=this.overlayDir.overlayRef.overlayElement.getBoundingClientRect(),n=this._viewportRuler.getViewportSize(),i=this._isRtl(),a=this.multiple?56:32;if(this.multiple)t=40;else{var r=this._selectionModel.selected[0]||this.options.first;t=r&&r.group?32:16}i||(t*=-1);var o=0-(e.left+t-(i?a:0)),s=e.right+t-n.width+(i?0:a);o>0?t+=o+8:s>0&&(t-=s+8),this.overlayDir.offsetX=Math.round(t),this.overlayDir.overlayRef.updatePosition()}},{key:"_calculateOverlayOffsetY",value:function(t,e,n){var i,a=this._getItemHeight(),r=(a-this._triggerRect.height)/2,o=Math.floor(256/a);return this._disableOptionCentering?0:(i=0===this._scrollTop?t*a:this._scrollTop===n?(t-(this._getItemCount()-o))*a+(a-(this._getItemCount()*a-256)%a):e-a/2,Math.round(-1*i-r))}},{key:"_checkOverlayWithinViewport",value:function(t){var e=this._getItemHeight(),n=this._viewportRuler.getViewportSize(),i=this._triggerRect.top-8,a=n.height-this._triggerRect.bottom-8,r=Math.abs(this._offsetY),o=Math.min(this._getItemCount()*e,256)-r-this._triggerRect.height;o>a?this._adjustPanelUp(o,a):r>i?this._adjustPanelDown(r,i,t):this._transformOrigin=this._getOriginBasedOnOption()}},{key:"_adjustPanelUp",value:function(t,e){var n=Math.round(t-e);this._scrollTop-=n,this._offsetY-=n,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop<=0&&(this._scrollTop=0,this._offsetY=0,this._transformOrigin="50% bottom 0px")}},{key:"_adjustPanelDown",value:function(t,e,n){var i=Math.round(t-e);if(this._scrollTop+=i,this._offsetY+=i,this._transformOrigin=this._getOriginBasedOnOption(),this._scrollTop>=n)return this._scrollTop=n,this._offsetY=0,void(this._transformOrigin="50% top 0px")}},{key:"_getOriginBasedOnOption",value:function(){var t=this._getItemHeight(),e=(t-this._triggerRect.height)/2;return"50% ".concat(Math.abs(this._offsetY)-e+t/2,"px 0px")}},{key:"_getItemCount",value:function(){return this.options.length+this.optionGroups.length}},{key:"_getItemHeight",value:function(){return 3*this._triggerFontSize}},{key:"_getTriggerAriaLabelledby",value:function(){if(this.ariaLabel)return null;var t=this._getLabelId()+" "+this._valueId;return this.ariaLabelledby&&(t+=" "+this.ariaLabelledby),t}},{key:"setDescribedByIds",value:function(t){this._ariaDescribedby=t.join(" ")}},{key:"onContainerClick",value:function(){this.focus(),this.open()}},{key:"focused",get:function(){return this._focused||this._panelOpen}},{key:"placeholder",get:function(){return this._placeholder},set:function(t){this._placeholder=t,this.stateChanges.next()}},{key:"required",get:function(){return this._required},set:function(t){this._required=Object(u.c)(t),this.stateChanges.next()}},{key:"multiple",get:function(){return this._multiple},set:function(t){this._multiple=Object(u.c)(t)}},{key:"disableOptionCentering",get:function(){return this._disableOptionCentering},set:function(t){this._disableOptionCentering=Object(u.c)(t)}},{key:"compareWith",get:function(){return this._compareWith},set:function(t){this._compareWith=t,this._selectionModel&&this._initializeSelection()}},{key:"value",get:function(){return this._value},set:function(t){t!==this._value&&(this.options&&this._setSelectionByValue(t),this._value=t)}},{key:"typeaheadDebounceInterval",get:function(){return this._typeaheadDebounceInterval},set:function(t){this._typeaheadDebounceInterval=Object(u.f)(t)}},{key:"id",get:function(){return this._id},set:function(t){this._id=t||this._uid,this.stateChanges.next()}},{key:"panelOpen",get:function(){return this._panelOpen}},{key:"selected",get:function(){return this.multiple?this._selectionModel.selected:this._selectionModel.selected[0]}},{key:"triggerValue",get:function(){if(this.empty)return"";if(this._multiple){var t=this._selectionModel.selected.map((function(t){return t.viewValue}));return this._isRtl()&&t.reverse(),t.join(", ")}return this._selectionModel.selected[0].viewValue}},{key:"empty",get:function(){return!this._selectionModel||this._selectionModel.isEmpty()}},{key:"shouldLabelFloat",get:function(){return this._panelOpen||!this.empty}}]),n}(N);return t.\u0275fac=function(e){return new(e||t)(r.Qb(c.h),r.Qb(r.h),r.Qb(r.C),r.Qb(o.d),r.Qb(r.l),r.Qb(O.c,8),r.Qb(D.w,8),r.Qb(D.m,8),r.Qb(s.a,8),r.Qb(D.t,10),r.bc("tabindex"),r.Qb(E),r.Qb(l.k),r.Qb(F,8))},t.\u0275cmp=r.Kb({type:t,selectors:[["mat-select"]],contentQueries:function(t,e,n){var i;1&t&&(r.Jb(n,z,!0),r.Jb(n,o.p,!0),r.Jb(n,o.h,!0)),2&t&&(r.yc(i=r.ec())&&(e.customTrigger=i.first),r.yc(i=r.ec())&&(e.options=i),r.yc(i=r.ec())&&(e.optionGroups=i))},viewQuery:function(t,e){var n;1&t&&(r.Xc(w,!0),r.Xc(M,!0),r.Xc(i.a,!0)),2&t&&(r.yc(n=r.ec())&&(e.trigger=n.first),r.yc(n=r.ec())&&(e.panel=n.first),r.yc(n=r.ec())&&(e.overlayDir=n.first))},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","true",1,"mat-select"],hostVars:20,hostBindings:function(t,e){1&t&&r.dc("keydown",(function(t){return e._handleKeydown(t)}))("focus",(function(){return e._onFocus()}))("blur",(function(){return e._onBlur()})),2&t&&(r.Eb("id",e.id)("tabindex",e.tabIndex)("aria-controls",e.panelOpen?e.id+"-panel":null)("aria-expanded",e.panelOpen)("aria-label",e.ariaLabel||null)("aria-required",e.required.toString())("aria-disabled",e.disabled.toString())("aria-invalid",e.errorState)("aria-describedby",e._ariaDescribedby||null)("aria-activedescendant",e._getAriaActiveDescendant()),r.Ib("mat-select-disabled",e.disabled)("mat-select-invalid",e.errorState)("mat-select-required",e.required)("mat-select-empty",e.empty)("mat-select-multiple",e.multiple))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex",ariaLabel:["aria-label","ariaLabel"],id:"id",disableOptionCentering:"disableOptionCentering",typeaheadDebounceInterval:"typeaheadDebounceInterval",placeholder:"placeholder",required:"required",multiple:"multiple",compareWith:"compareWith",value:"value",panelClass:"panelClass",ariaLabelledby:["aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",sortComparator:"sortComparator"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],features:[r.Cb([{provide:s.d,useExisting:t},{provide:o.i,useExisting:t}]),r.Ab,r.Bb],ngContentSelectors:A,decls:9,vars:10,consts:[["cdk-overlay-origin","",1,"mat-select-trigger",3,"click"],["origin","cdkOverlayOrigin","trigger",""],[1,"mat-select-value",3,"ngSwitch"],["class","mat-select-placeholder",4,"ngSwitchCase"],["class","mat-select-value-text",3,"ngSwitch",4,"ngSwitchCase"],[1,"mat-select-arrow-wrapper"],[1,"mat-select-arrow"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayMinWidth","cdkConnectedOverlayOffsetY","backdropClick","attach","detach"],[1,"mat-select-placeholder"],[1,"mat-select-value-text",3,"ngSwitch"],[4,"ngSwitchDefault"],[4,"ngSwitchCase"],[1,"mat-select-panel-wrap"],["role","listbox","tabindex","-1",3,"ngClass","keydown"],["panel",""]],template:function(t,e){if(1&t&&(r.nc(j),r.Wb(0,"div",0,1),r.dc("click",(function(){return e.toggle()})),r.Wb(3,"div",2),r.Oc(4,S,2,1,"span",3),r.Oc(5,R,3,2,"span",4),r.Vb(),r.Wb(6,"div",5),r.Rb(7,"div",6),r.Vb(),r.Vb(),r.Oc(8,V,4,14,"ng-template",7),r.dc("backdropClick",(function(){return e.close()}))("attach",(function(){return e._onAttached()}))("detach",(function(){return e.close()}))),2&t){var n=r.zc(1);r.Db(3),r.oc("ngSwitch",e.empty),r.Eb("id",e._valueId),r.Db(1),r.oc("ngSwitchCase",!0),r.Db(1),r.oc("ngSwitchCase",!1),r.Db(3),r.oc("cdkConnectedOverlayScrollStrategy",e._scrollStrategy)("cdkConnectedOverlayOrigin",n)("cdkConnectedOverlayOpen",e.panelOpen)("cdkConnectedOverlayPositions",e._positions)("cdkConnectedOverlayMinWidth",null==e._triggerRect?null:e._triggerRect.width)("cdkConnectedOverlayOffsetY",e._offsetY)}},directives:[i.b,a.x,a.y,i.a,a.z,a.q],styles:[".mat-select{display:inline-block;width:100%;outline:none}.mat-select-trigger{display:inline-table;cursor:pointer;position:relative;box-sizing:border-box}.mat-select-disabled .mat-select-trigger{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-select-value{display:table-cell;max-width:0;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-select-arrow-wrapper{display:table-cell;vertical-align:middle}.mat-form-field-appearance-fill .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-outline .mat-select-arrow-wrapper{transform:translateY(-25%)}.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(-50%)}.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable.mat-form-field-appearance-standard .mat-select.mat-select-empty .mat-select-arrow-wrapper{transition:none}.mat-select-arrow{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;margin:0 4px}.mat-select-panel-wrap{flex-basis:100%}.mat-select-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;padding-top:0;padding-bottom:0;max-height:256px;min-width:100%;border-radius:4px}.cdk-high-contrast-active .mat-select-panel{outline:solid 1px}.mat-select-panel .mat-optgroup-label,.mat-select-panel .mat-option{font-size:inherit;line-height:3em;height:3em}.mat-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-form-field-flex{cursor:pointer}.mat-form-field-type-mat-select .mat-form-field-label{width:calc(100% - 18px)}.mat-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable .mat-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-select-placeholder{color:transparent;-webkit-text-fill-color:transparent;transition:none;display:block}\n"],encapsulation:2,data:{animation:[W.transformPanelWrap,W.transformPanel]},changeDetection:0}),t}(),H=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=r.Ob({type:t}),t.\u0275inj=r.Nb({factory:function(e){return new(e||t)},providers:[L],imports:[[a.c,i.f,o.q,o.k],c.c,s.e,o.q,o.k]}),t}()},dNgK:function(t,e,n){"use strict";n.d(e,"a",(function(){return m})),n.d(e,"b",(function(){return w})),n.d(e,"c",(function(){return x})),n.d(e,"d",(function(){return O}));var i=n("rDax"),a=n("+rOU"),r=n("ofXK"),o=n("fXoL"),s=n("FKr1"),c=n("bTqV"),l=n("XNiG"),u=n("IzEk"),d=n("1G5W"),f=n("R0Ic"),h=n("u47x"),p=n("0MNC");function b(t,e){if(1&t){var n=o.Xb();o.Wb(0,"div",1),o.Wb(1,"button",2),o.dc("click",(function(){return o.Dc(n),o.hc().action()})),o.Qc(2),o.Vb(),o.Vb()}if(2&t){var i=o.hc();o.Db(2),o.Rc(i.data.action)}}function g(t,e){}var m=new o.s("MatSnackBarData"),v=function t(){_classCallCheck(this,t),this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"},y=Math.pow(2,31)-1,_=function(){function t(e,n){var i=this;_classCallCheck(this,t),this._overlayRef=n,this._afterDismissed=new l.a,this._afterOpened=new l.a,this._onAction=new l.a,this._dismissedByAction=!1,this.containerInstance=e,this.onAction().subscribe((function(){return i.dismiss()})),e._onExit.subscribe((function(){return i._finishDismiss()}))}return _createClass(t,[{key:"dismiss",value:function(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}},{key:"dismissWithAction",value:function(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete())}},{key:"closeWithAction",value:function(){this.dismissWithAction()}},{key:"_dismissAfter",value:function(t){var e=this;this._durationTimeoutId=setTimeout((function(){return e.dismiss()}),Math.min(t,y))}},{key:"_open",value:function(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}},{key:"_finishDismiss",value:function(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}},{key:"afterDismissed",value:function(){return this._afterDismissed}},{key:"afterOpened",value:function(){return this.containerInstance._onEnter}},{key:"onAction",value:function(){return this._onAction}}]),t}(),C=function(){var t=function(){function t(e,n){_classCallCheck(this,t),this.snackBarRef=e,this.data=n}return _createClass(t,[{key:"action",value:function(){this.snackBarRef.dismissWithAction()}},{key:"hasAction",get:function(){return!!this.data.action}}]),t}();return t.\u0275fac=function(e){return new(e||t)(o.Qb(_),o.Qb(m))},t.\u0275cmp=o.Kb({type:t,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-simple-snackbar"],decls:3,vars:2,consts:[["class","mat-simple-snackbar-action",4,"ngIf"],[1,"mat-simple-snackbar-action"],["mat-button","",3,"click"]],template:function(t,e){1&t&&(o.Wb(0,"span"),o.Qc(1),o.Vb(),o.Oc(2,b,3,1,"div",0)),2&t&&(o.Db(1),o.Rc(e.data.message),o.Db(1),o.oc("ngIf",e.hasAction))},directives:[r.t,c.b],styles:[".mat-simple-snackbar{display:flex;justify-content:space-between;align-items:center;line-height:20px;opacity:1}.mat-simple-snackbar-action{flex-shrink:0;margin:-8px -8px -8px 8px}.mat-simple-snackbar-action button{max-height:36px;min-width:0}[dir=rtl] .mat-simple-snackbar-action{margin-left:-8px;margin-right:8px}\n"],encapsulation:2,changeDetection:0}),t}(),k={snackBarState:Object(f.n)("state",[Object(f.k)("void, hidden",Object(f.l)({transform:"scale(0.8)",opacity:0})),Object(f.k)("visible",Object(f.l)({transform:"scale(1)",opacity:1})),Object(f.m)("* => visible",Object(f.e)("150ms cubic-bezier(0, 0, 0.2, 1)")),Object(f.m)("* => void, * => hidden",Object(f.e)("75ms cubic-bezier(0.4, 0.0, 1, 1)",Object(f.l)({opacity:0})))])},x=function(){var t=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i,a,r){var o;return _classCallCheck(this,n),(o=e.call(this))._ngZone=t,o._elementRef=i,o._changeDetectorRef=a,o.snackBarConfig=r,o._destroyed=!1,o._onExit=new l.a,o._onEnter=new l.a,o._animationState="void",o.attachDomPortal=function(t){return o._assertNotAttached(),o._applySnackBarClasses(),o._portalOutlet.attachDomPortal(t)},o._role="assertive"!==r.politeness||r.announcementMessage?"off"===r.politeness?null:"status":"alert",o}return _createClass(n,[{key:"attachComponentPortal",value:function(t){return this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachComponentPortal(t)}},{key:"attachTemplatePortal",value:function(t){return this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachTemplatePortal(t)}},{key:"onAnimationEnd",value:function(t){var e=t.fromState,n=t.toState;if(("void"===n&&"void"!==e||"hidden"===n)&&this._completeExit(),"visible"===n){var i=this._onEnter;this._ngZone.run((function(){i.next(),i.complete()}))}}},{key:"enter",value:function(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.detectChanges())}},{key:"exit",value:function(){return this._animationState="hidden",this._elementRef.nativeElement.setAttribute("mat-exit",""),this._onExit}},{key:"ngOnDestroy",value:function(){this._destroyed=!0,this._completeExit()}},{key:"_completeExit",value:function(){var t=this;this._ngZone.onMicrotaskEmpty.pipe(Object(u.a)(1)).subscribe((function(){t._onExit.next(),t._onExit.complete()}))}},{key:"_applySnackBarClasses",value:function(){var t=this._elementRef.nativeElement,e=this.snackBarConfig.panelClass;e&&(Array.isArray(e)?e.forEach((function(e){return t.classList.add(e)})):t.classList.add(e)),"center"===this.snackBarConfig.horizontalPosition&&t.classList.add("mat-snack-bar-center"),"top"===this.snackBarConfig.verticalPosition&&t.classList.add("mat-snack-bar-top")}},{key:"_assertNotAttached",value:function(){this._portalOutlet.hasAttached()}}]),n}(a.a);return t.\u0275fac=function(e){return new(e||t)(o.Qb(o.C),o.Qb(o.l),o.Qb(o.h),o.Qb(v))},t.\u0275cmp=o.Kb({type:t,selectors:[["snack-bar-container"]],viewQuery:function(t,e){var n;1&t&&o.Kc(a.c,!0),2&t&&o.yc(n=o.ec())&&(e._portalOutlet=n.first)},hostAttrs:[1,"mat-snack-bar-container"],hostVars:2,hostBindings:function(t,e){1&t&&o.Mc("@state.done",(function(t){return e.onAnimationEnd(t)})),2&t&&(o.Eb("role",e._role),o.Nc("@state",e._animationState))},features:[o.Ab],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(t,e){1&t&&o.Oc(0,g,0,0,"ng-template",0)},directives:[a.c],styles:[".mat-snack-bar-container{border-radius:4px;box-sizing:border-box;display:block;margin:24px;max-width:33vw;min-width:344px;padding:14px 16px;min-height:48px;transform-origin:center}.cdk-high-contrast-active .mat-snack-bar-container{border:solid 1px}.mat-snack-bar-handset{width:100%}.mat-snack-bar-handset .mat-snack-bar-container{margin:8px;max-width:100%;min-width:0;width:100%}\n"],encapsulation:2,data:{animation:[k.snackBarState]}}),t}(),O=function(){var t=function t(){_classCallCheck(this,t)};return t.\u0275mod=o.Ob({type:t}),t.\u0275inj=o.Nb({factory:function(e){return new(e||t)},imports:[[i.f,a.h,r.c,c.c,s.k],s.k]}),t}(),D=new o.s("mat-snack-bar-default-options",{providedIn:"root",factory:function(){return new v}}),w=function(){var t=function(){function t(e,n,i,a,r,o){_classCallCheck(this,t),this._overlay=e,this._live=n,this._injector=i,this._breakpointObserver=a,this._parentSnackBar=r,this._defaultConfig=o,this._snackBarRefAtThisLevel=null,this.simpleSnackBarComponent=C,this.snackBarContainerComponent=x,this.handsetCssClass="mat-snack-bar-handset"}return _createClass(t,[{key:"openFromComponent",value:function(t,e){return this._attach(t,e)}},{key:"openFromTemplate",value:function(t,e){return this._attach(t,e)}},{key:"open",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,i=Object.assign(Object.assign({},this._defaultConfig),n);return i.data={message:t,action:e},i.announcementMessage===t&&(i.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,i)}},{key:"dismiss",value:function(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}},{key:"ngOnDestroy",value:function(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}},{key:"_attachSnackBarContainer",value:function(t,e){var n=o.t.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:v,useValue:e}]}),i=new a.d(this.snackBarContainerComponent,e.viewContainerRef,n),r=t.attach(i);return r.instance.snackBarConfig=e,r.instance}},{key:"_attach",value:function(t,e){var n=this,i=Object.assign(Object.assign(Object.assign({},new v),this._defaultConfig),e),r=this._createOverlay(i),s=this._attachSnackBarContainer(r,i),c=new _(s,r);if(t instanceof o.P){var l=new a.i(t,null,{$implicit:i.data,snackBarRef:c});c.instance=s.attachTemplatePortal(l)}else{var u=this._createInjector(i,c),f=new a.d(t,void 0,u),h=s.attachComponentPortal(f);c.instance=h.instance}return this._breakpointObserver.observe(p.b.HandsetPortrait).pipe(Object(d.a)(r.detachments())).subscribe((function(t){var e=r.overlayElement.classList;t.matches?e.add(n.handsetCssClass):e.remove(n.handsetCssClass)})),this._animateSnackBar(c,i),this._openedSnackBarRef=c,this._openedSnackBarRef}},{key:"_animateSnackBar",value:function(t,e){var n=this;t.afterDismissed().subscribe((function(){n._openedSnackBarRef==t&&(n._openedSnackBarRef=null),e.announcementMessage&&n._live.clear()})),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe((function(){t.containerInstance.enter()})),this._openedSnackBarRef.dismiss()):t.containerInstance.enter(),e.duration&&e.duration>0&&t.afterOpened().subscribe((function(){return t._dismissAfter(e.duration)})),e.announcementMessage&&this._live.announce(e.announcementMessage,e.politeness)}},{key:"_createOverlay",value:function(t){var e=new i.d;e.direction=t.direction;var n=this._overlay.position().global(),a="rtl"===t.direction,r="left"===t.horizontalPosition||"start"===t.horizontalPosition&&!a||"end"===t.horizontalPosition&&a,o=!r&&"center"!==t.horizontalPosition;return r?n.left("0"):o?n.right("0"):n.centerHorizontally(),"top"===t.verticalPosition?n.top("0"):n.bottom("0"),e.positionStrategy=n,this._overlay.create(e)}},{key:"_createInjector",value:function(t,e){return o.t.create({parent:t&&t.viewContainerRef&&t.viewContainerRef.injector||this._injector,providers:[{provide:_,useValue:e},{provide:m,useValue:t.data}]})}},{key:"_openedSnackBarRef",get:function(){var t=this._parentSnackBar;return t?t._openedSnackBarRef:this._snackBarRefAtThisLevel},set:function(t){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=t:this._snackBarRefAtThisLevel=t}}]),t}();return t.\u0275fac=function(e){return new(e||t)(o.ac(i.c),o.ac(h.k),o.ac(o.t),o.ac(p.a),o.ac(t,12),o.ac(D))},t.\u0275prov=Object(o.Mb)({factory:function(){return new t(Object(o.ac)(i.c),Object(o.ac)(h.k),Object(o.ac)(o.p),Object(o.ac)(p.a),Object(o.ac)(t,12),Object(o.ac)(D))},token:t,providedIn:O}),t}()},eIep:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n("lJxs"),a=n("Cfvw"),r=n("zx2A");function o(t,e){return"function"==typeof e?function(n){return n.pipe(o((function(n,r){return Object(a.a)(t(n,r)).pipe(Object(i.a)((function(t,i){return e(n,t,r,i)})))})))}:function(e){return e.lift(new s(t))}}var s=function(){function t(e){_classCallCheck(this,t),this.project=e}return _createClass(t,[{key:"call",value:function(t,e){return e.subscribe(new c(t,this.project))}}]),t}(),c=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var a;return _classCallCheck(this,n),(a=e.call(this,t)).project=i,a.index=0,a}return _createClass(n,[{key:"_next",value:function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(i){return void this.destination.error(i)}this._innerSub(e)}},{key:"_innerSub",value:function(t){var e=this.innerSubscription;e&&e.unsubscribe();var n=new r.a(this),i=this.destination;i.add(n),this.innerSubscription=Object(r.c)(t,n),this.innerSubscription!==n&&i.add(this.innerSubscription)}},{key:"_complete",value:function(){var t=this.innerSubscription;t&&!t.closed||_get(_getPrototypeOf(n.prototype),"_complete",this).call(this),this.unsubscribe()}},{key:"_unsubscribe",value:function(){this.innerSubscription=void 0}},{key:"notifyComplete",value:function(){this.innerSubscription=void 0,this.isStopped&&_get(_getPrototypeOf(n.prototype),"_complete",this).call(this)}},{key:"notifyNext",value:function(t){this.destination.next(t)}}]),n}(r.b)},eNwd:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var i=function(t){_inherits(n,t);var e=_createSuper(n);function n(t,i){var a;return _classCallCheck(this,n),(a=e.call(this,t,i)).scheduler=t,a.work=i,a}return _createClass(n,[{key:"requestAsyncId",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return null!==i&&i>0?_get(_getPrototypeOf(n.prototype),"requestAsyncId",this).call(this,t,e,i):(t.actions.push(this),t.scheduled||(t.scheduled=requestAnimationFrame((function(){return t.flush(null)}))))}},{key:"recycleAsyncId",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(null!==i&&i>0||null===i&&this.delay>0)return _get(_getPrototypeOf(n.prototype),"recycleAsyncId",this).call(this,t,e,i);0===t.actions.length&&(cancelAnimationFrame(e),t.scheduled=void 0)}}]),n}(n("3N8a").a),a=new(function(t){_inherits(n,t);var e=_createSuper(n);function n(){return _classCallCheck(this,n),e.apply(this,arguments)}return _createClass(n,[{key:"flush",value:function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,i=-1,a=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++i<a&&(t=n.shift()));if(this.active=!1,e){for(;++i<a&&(t=n.shift());)t.unsubscribe();throw e}}}]),n}(n("IjjT").a))(i)},eiH7:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n("fXoL"),a=n("sYmb"),r=n("4zkx"),o=function(){var t=function(){function t(e,n){_classCallCheck(this,t),this.translate=e,this.headerService=n,this.administrations=[{id:"admin_users",label:"lang.users",comment:"lang.adminUsersDesc",route:"/administration/users",unit:"organisation",style:"fa fa-user",angular:!0,hasParams:!0},{id:"admin_groups",label:"lang.groups",comment:"lang.adminGroupsDesc",route:"/administration/groups",unit:"organisation",style:"fa fa-users",angular:!0,hasParams:!1},{id:"manage_entities",label:"lang.entities",comment:"lang.adminEntitiesDesc",route:"/administration/entities",unit:"organisation",style:"fa fa-sitemap",angular:!0,hasParams:!1},{id:"admin_listmodels",label:"lang.workflowModels",comment:"lang.adminWorkflowModelsDesc",route:"/administration/diffusionModels",unit:"organisation",style:"fa fa-th-list",angular:!0,hasParams: